kszucs commented on a change in pull request #10575:
URL: https://github.com/apache/arrow/pull/10575#discussion_r673291847
##########
File path: python/pyarrow/_parquet.pyx
##########
@@ -952,6 +953,21 @@ cdef class ParquetReader(_Weakrefable):
arrow_props.set_pre_buffer(pre_buffer)
+ if (
+ coerce_int96_timestamp_unit is None or
+ coerce_int96_timestamp_unit == "ns"
+ ):
+ arrow_props.set_coerce_int96_timestamp_unit(TimeUnit_NANO)
+ elif coerce_int96_timestamp_unit == "us":
+ arrow_props.set_coerce_int96_timestamp_unit(TimeUnit_MICRO)
+ elif coerce_int96_timestamp_unit == "ms":
+ arrow_props.set_coerce_int96_timestamp_unit(TimeUnit_MILLI)
+ elif coerce_int96_timestamp_unit == "s":
+ arrow_props.set_coerce_int96_timestamp_unit(TimeUnit_SECOND)
+ else:
Review comment:
How about:
```
elif coerce_int96_timestamp_unit is not None:
```
so we'd leave `coerce_int96_timestamp_unit` to be set by the C++
implementation by default?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]