Apache Arrow is the universal columnar format and multi-language toolbox for fast data interchange and in-memory analytics
14.65k
stars
3.55k
forks
source link
[FlightRPC][C++] Precision of `arrow.flight.Timestamp` is OS-dependent #44679
Closed
EnricoMi closed 1 week ago
Describe the bug, including details regarding any error messages, version, and platform.
The precision of is supposed to be nanoseconds precision: https://github.com/apache/arrow/blob/093655c60783321c786a8e69632f185d37520f4d/cpp/src/arrow/flight/types.h#L77
Actually, the current precision of
arrow.flight.Timestamp
not nanoseconds on most operation systems: https://github.com/apache/arrow/blob/093655c60783321c786a8e69632f185d37520f4d/cpp/src/arrow/flight/types.h#L83 The precision ofstd::chrono::system_clock::time_point
ishttps://github.com/apache/arrow/blob/093655c60783321c786a8e69632f185d37520f4d/cpp/src/arrow/flight/flight_internals_test.cc#L187-L192
In order to be OS-agnostic, the timestamp resolution should be nanoseconds everywhere.
In Python, the equivalent type
TimePoint
is correctly defined with nanoseconds precision for any OS: https://github.com/apache/arrow/blob/093655c60783321c786a8e69632f185d37520f4d/python/pyarrow/src/arrow/python/datetime.h#L88-L89Component(s)
C++