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

Method LongMonthName

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

Source from the content-addressed store, hash-verified

118}
119
120StringVal DateFunctions::LongMonthName(FunctionContext* context, const DateVal& d_val) {
121 if (d_val.is_null) return StringVal::null();
122 DateValue dv = DateValue::FromDateVal(d_val);
123
124 int year, month, day;
125 if (!dv.ToYearMonthDay(&year, &month, &day)) return StringVal::null();
126
127 DCHECK_GE(month, 1);
128 DCHECK_LE(month, 12);
129 const string& mn =
130 TimestampFunctions::MONTH_NAMES[TimestampFunctions::CAPITALIZED][month - 1];
131 return StringVal(reinterpret_cast<uint8_t*>(const_cast<char*>(mn.data())), mn.size());
132}
133
134DateVal DateFunctions::NextDay(FunctionContext* context, const DateVal& d_val,
135 const StringVal& weekday) {

Callers

nothing calls this directly

Calls 4

StringValClass · 0.85
ToYearMonthDayMethod · 0.80
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected