Fokko commented on code in PR #2294:
URL: https://github.com/apache/iceberg-python/pull/2294#discussion_r2261029419


##########
pyiceberg/io/pyarrow.py:
##########
@@ -1288,6 +1306,11 @@ def primitive(self, primitive: pa.DataType) -> 
PrimitiveType:
             elif primitive.unit == "ns":
                 if self._downcast_ns_timestamp_to_us:
                     logger.warning("Iceberg does not yet support 'ns' 
timestamp precision. Downcasting to 'us'.")

Review Comment:
   I think this if-else branch reads a bit odd, should we include:
   ```suggestion
                       logger.warning("Iceberg does not yet support 'ns' 
timestamp precision. Downcasting to 'us'.")
                       
                       if primitive.tz in UTC_ALIASES:
                           return TimestamptzType()
                       elif primitive.tz is None:
                           return TimestampType()
   ```
   And remove it below?



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to