MCPcopy Create free account
hub / github.com/apache/impala / WeekOfYear

Method WeekOfYear

be/src/exprs/timestamp-functions-ir.cc:241–247  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

239}
240
241IntVal TimestampFunctions::WeekOfYear(FunctionContext* context,
242 const TimestampVal& ts_val) {
243 if (ts_val.is_null) return IntVal::null();
244 const TimestampValue& ts_value = TimestampValue::FromTimestampVal(ts_val);
245 if (!ts_value.HasDate()) return IntVal::null();
246 return IntVal(ts_value.date().week_number());
247}
248
249IntVal TimestampFunctions::Hour(FunctionContext* context, const TimestampVal& ts_val) {
250 if (ts_val.is_null) return IntVal::null();

Callers

nothing calls this directly

Calls 2

IntValClass · 0.85
HasDateMethod · 0.80

Tested by

no test coverage detected