facebookincubator / velox

A composable and fully extensible C++ execution engine library for data management systems.
https://velox-lib.io/
Apache License 2.0
3.53k stars 1.16k forks source link

[Parquet] TimestampPrecision / TimestampUnit mismatch in read / write files, particular for unit tests #11607

Open zuyu opened 5 days ago

zuyu commented 5 days ago

Bug description

https://github.com/facebookincubator/velox/blob/473902a63ed6a8bac85a2f598b360de739f3bfe4/velox/type/Timestamp.h#L33-L37

https://github.com/facebookincubator/velox/blob/473902a63ed6a8bac85a2f598b360de739f3bfe4/velox/vector/arrow/Bridge.h#L28-L33

Proposed Fixes

Yuhta commented 5 days ago

I would say just align them. Adding kNotSet will make the thing unnecessarily complicated.

zuyu commented 5 days ago

@Yuhta How about TimestampUnit::kSecond, remove it or add TimestampPrecision::kSecond? I prefer to removing it, as it equals to that nanos is 0.

Yuhta commented 4 days ago

@zuyu We can remove it if neither Presto or Spark support it