g0itb4 opened a new pull request, #4468: URL: https://github.com/apache/iceberg-python/pull/4468
Closes #4467 # Rationale for this change `_cast_if_needed` relabels a UTC alias (`+00:00`, `Etc/UTC`, `Z`) to `UTC` for `timestamptz` columns but not for `timestamptz_ns`. A table whose files come from writers that label UTC differently, or where some files predate the column, then fails in `pa.concat_tables`. This adds the same handling for `TimestamptzNanoType`, for nanosecond values only: no unit conversion, so a value is never widened or truncated. ## Are these changes tested? Yes. `test__to_requested_schema_timestamptz_ns_utc_alias_concatenates` projects a file without the column and a file with a `+00:00`-labelled `timestamp[ns]` column, checks the label is `UTC`, and concatenates them; nanosecond digits are kept. It fails on main and passes with the change. ## Are there any user-facing changes? Scans of such tables succeed instead of raising `ArrowTypeError`. No API change. -- 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]
