| 725 | }; |
| 726 | |
| 727 | static 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 | |
| 738 | static inline int64_t Int96GetNanoSeconds(const parquet::Int96& i96) { |
| 739 | const auto decoded = DecodeInt96Timestamp(i96); |
no outgoing calls
no test coverage detected