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

Method Month

be/src/exprs/date-functions-ir.cc:54–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52}
53
54IntVal DateFunctions::Month(FunctionContext* context, const DateVal& d_val) {
55 if (d_val.is_null) return IntVal::null();
56 DateValue dv = DateValue::FromDateVal(d_val);
57
58 int year, month, day;
59 if (!dv.ToYearMonthDay(&year, &month, &day)) return IntVal::null();
60 return IntVal(month);
61}
62
63IntVal DateFunctions::DayOfWeek(FunctionContext* context, const DateVal& d_val) {
64 if (d_val.is_null) return IntVal::null();

Callers

nothing calls this directly

Calls 2

IntValClass · 0.85
ToYearMonthDayMethod · 0.80

Tested by

no test coverage detected