kevinjqliu commented on code in PR #2333:
URL: https://github.com/apache/iceberg-python/pull/2333#discussion_r2283986226
##########
pyiceberg/io/pyarrow.py:
##########
@@ -1802,13 +1795,22 @@ def _cast_if_needed(self, field: NestedField, values:
pa.Array) -> pa.Array:
pa.types.is_timestamp(target_type)
and target_type.tz == "UTC"
and pa.types.is_timestamp(values.type)
- and values.type.tz in UTC_ALIASES
+ and (values.type.tz in UTC_ALIASES or values.type.tz
is None)
Review Comment:
also allow when type.tz is None, mirrors the logic here
https://github.com/apache/iceberg-python/blob/8b43eb88fcc80b4980ce16b71852d211d7e93b13/pyiceberg/io/pyarrow.py#L1350-L1353
--
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]