MCPcopy Create free account
hub / github.com/apache/arrow / DecodeInt96Timestamp

Function DecodeInt96Timestamp

cpp/src/parquet/types.h:719–728  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

717};
718
719static inline DecodedInt96 DecodeInt96Timestamp(const parquet::Int96& i96) {
720 // We do the computations in the unsigned domain to avoid unsigned behaviour
721 // on overflow.
722 DecodedInt96 result;
723 result.days_since_epoch = i96.value[2] - static_cast<uint64_t>(kJulianToUnixEpochDays);
724 result.nanoseconds = 0;
725
726 memcpy(&result.nanoseconds, &i96.value, sizeof(uint64_t));
727 return result;
728}
729
730static inline int64_t Int96GetNanoSeconds(const parquet::Int96& i96) {
731 const auto decoded = DecodeInt96Timestamp(i96);

Callers 4

Int96GetNanoSecondsFunction · 0.85
Int96GetMicroSecondsFunction · 0.85
Int96GetMilliSecondsFunction · 0.85
Int96GetSecondsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected