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

Method GetIso8601WeekNumberingYear

be/src/runtime/datetime-iso-sql-format-parser.cc:410–418  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

408}
409
410int IsoSqlFormatParser::GetIso8601WeekNumberingYear(const TimestampValue* now) {
411 DCHECK(now != nullptr);
412 DCHECK(now->HasDate());
413
414 static const boost::gregorian::date EPOCH(1970, 1, 1);
415 DateValue dv = DateValue((now->date() - EPOCH).days());
416 DCHECK(dv.IsValid());
417 return dv.Iso8601WeekNumberingYear();
418}
419
420bool IsoSqlFormatParser::Iso8601WeekBasedDateParseResult::ExtractYearMonthDay(
421 DateTimeParseResult* result) const {

Callers

nothing calls this directly

Calls 4

HasDateMethod · 0.80
DateValueClass · 0.70
IsValidMethod · 0.45

Tested by

no test coverage detected