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

Function DecodeInt96Timestamp

cpp/src/parquet/types.h:727–736  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

725};
726
727static inline DecodedInt96 DecodeInt96Timestamp(const parquet::Int96& i96) {
728 // We do the computations in the unsigned domain to avoid unsigned behaviour
729 // on overflow.
730 DecodedInt96 result;
731 result.days_since_epoch = i96.value[2] - static_cast<uint64_t>(kJulianToUnixEpochDays);
732 result.nanoseconds = 0;
733
734 memcpy(&result.nanoseconds, &i96.value, sizeof(uint64_t));
735 return result;
736}
737
738static inline int64_t Int96GetNanoSeconds(const parquet::Int96& i96) {
739 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