| 717 | }; |
| 718 | |
| 719 | static 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 | |
| 730 | static inline int64_t Int96GetNanoSeconds(const parquet::Int96& i96) { |
| 731 | const auto decoded = DecodeInt96Timestamp(i96); |
no outgoing calls
no test coverage detected