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

Method Year

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

Source from the content-addressed store, hash-verified

192}
193
194IntVal TimestampFunctions::Year(FunctionContext* context, const TimestampVal& ts_val) {
195 if (ts_val.is_null) return IntVal::null();
196 const TimestampValue& ts_value = TimestampValue::FromTimestampVal(ts_val);
197 if (!ts_value.HasDate()) return IntVal::null();
198 return IntVal(ts_value.date().year());
199}
200
201IntVal TimestampFunctions::Month(FunctionContext* context, const TimestampVal& ts_val) {
202 if (ts_val.is_null) return IntVal::null();

Callers

nothing calls this directly

Calls 3

IntValClass · 0.85
HasDateMethod · 0.80
yearMethod · 0.80

Tested by

no test coverage detected