Casting Int96 Timestamp from Parquet to Go
To cast an int96 value representing a timestamp from a Parquet file to a Go timestamp, follow these steps:
Separate the Int96 Value: The int96 timestamp is a 12-byte array consisting of two parts:
Parse Time from First 8 Bytes:
Extract Date from Last 4 Bytes:
Note: The int96 timestamp in Parquet is not measured from the epoch but from midnight. Keep this in mind when converting to a Go timestamp.
The above is the detailed content of How Do I Convert a Parquet Int96 Timestamp to a Go Timestamp?. For more information, please follow other related articles on the PHP Chinese website!