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

Method FindMiddleDate

be/src/runtime/date-value.cc:382–387  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

380}
381
382DateValue DateValue::FindMiddleDate(const DateValue& min, const DateValue& max) {
383 if (UNLIKELY(!min.IsValid() || !max.IsValid())) {
384 return DateValue();
385 }
386 return DateValue((min.days_since_epoch_ + max.days_since_epoch_) / 2);
387}
388
389bool DateValue::ToDaysSinceEpoch(int32_t* days) const {
390 DCHECK(days != nullptr);

Callers

nothing calls this directly

Calls 2

DateValueClass · 0.70
IsValidMethod · 0.45

Tested by

no test coverage detected