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

Function CivilSecondsToTimestampValue

be/src/runtime/timestamp-value.cc:116–126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

114}
115
116TimestampValue CivilSecondsToTimestampValue(const cctz::civil_second& cs, int64_t nanos) {
117 // boost::gregorian::date() throws boost::gregorian::bad_year if year is not in the
118 // 1400..9999 range. Need to check validity before creating the date object.
119 if (UNLIKELY(IsDateOutOfRange(cs))) {
120 return TimestampValue();
121 } else {
122 return TimestampValue(
123 date(cs.year(), cs.month(), cs.day()),
124 time_duration(cs.hour(), cs.minute(), cs.second(), nanos));
125 }
126}
127
128}
129

Callers 1

UtcToLocalMethod · 0.85

Calls 7

IsDateOutOfRangeFunction · 0.85
time_durationClass · 0.85
yearMethod · 0.80
monthMethod · 0.80
dayMethod · 0.80
hourMethod · 0.80
TimestampValueClass · 0.70

Tested by

no test coverage detected