Skip to content

fix(arrow): preserve INT96 timestamptz values in projections - #3632

Open
sam-1112 wants to merge 3 commits into
apache:mainfrom
sam-1112:fix/int96-timestamptz-projection
Open

sam-1112 wants to merge 3 commits into
apache:mainfrom
sam-1112:fix/int96-timestamptz-projection

Conversation

@sam-1112

@sam-1112 sam-1112 commented Nov 5, 2026

Copy link
Copy Markdown

Which issue does this PR close?

Closes #3611.

What changes are included in this PR?

INT96 timestamp coercion preserves a timezone-less Arrow type even when Iceberg requests timestamptz. Projection compatibility checks then exclude the column, causing multi-column reads to silently return NULL.

Coerce confirmed physical INT96 columns to the precision and timezone required by the Iceberg schema, including timezone-only adjustments for timestamptz_ns. Preserve field metadata and nested structures while leaving non-INT96 timestamp types unchanged.

Are these changes tested?

Regression tests compare complete batches and physical projection masks across projection orders, embedded field IDs, name mapping, and positional fallback. Coverage includes genuine NULLs, missing fields and defaults, mixed timestamp encodings, nested structs/lists/maps, and dates outside the nanosecond range.

Validation passed:

  • INT96 tests: 29 passed.
  • Full iceberg library suite: 2,131 passed, 1 ignored.
  • Doctests, all-targets/all-features Clippy, and formatting checks.
  • Public API generation: no snapshot changes.

Also validated alongside #3624 at 30b9c20. Its additional Name Mapping parameter required a one-line adjustment to the mask-test helper in the isolated checkout.

AI Disclosure

OpenAI Codex assisted with implementation and tests. Review should focus on the assumption that full Arrow primitive traversal matches physical Parquet column order, and on UTC schema-hint handling for INT96 timestamptz types.

@sam-1112
sam-1112 marked this pull request as ready for review November 7, 2026 00:25

@rich7420 rich7420 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for the patch

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

INT96 timestamptz column silently returns NULL when projected alongside other columns

2 participants