Repository navigation
fix: coerce INT96 in two-level and legacy Parquet lists - #26464
Open
ranflarion wants to merge 1 commit into
Open
ranflarion wants to merge 1 commit into
ranflarion wants to merge 1 commit into
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #26464 +/- ##
==========================================
- Coverage 82.89% 82.89% -0.01%
==========================================
Files 1154 1154
Lines 457656 457678 +22
Branches 457656 457678 +22
==========================================
+ Hits 379391 379398 +7
- Misses 55261 55272 +11
- Partials 23004 23008 +4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Rationale for this change
With
coerce_int96set, INT96 timestamps inside Hive's two-level lists (how Hive writesarray<timestamp>), barerepeated int96fields and parquet-mr Avro'sarraylists stayTimestamp(Nanosecond, None), so values outside 1677-2262 overflow on decode, which is whatcoerce_int96exists to prevent.What changes are included in this PR?
Int96Coercerno longer rebuilds Parquet paths from Arrow field names, which assumed the three-level<list>.list.<element>layout. For each top-level field it records which of its Parquet leaf columns are INT96, in the depth-first order in which arrow-rs maps them to Arrow leaves, and walks the field's Arrow type in that order, so the list or map encoding no longer matters. Top-level fields are still matched by name, so a projected file schema keeps working. The walk now also descendsLargeListandFixedSizeList, and replaces the explicit stack with a short recursion that keeps field metadata viafield_with_new_type.What is the testing strategy for this PR?
coerce_int96_to_resolution_with_two_level_and_legacy_listscovers a Hive two-level list, a bare repeated field, an Avro-stylearraylist of structs, a three-level list, a map value and a non-INT96 nanosecond timestamp, and then a projected, reordered file schema. It fails on main for the first three. The existing nested-type and field-metadata tests pass unchanged.Are there any user-facing changes?
No API changes. INT96 columns in those list layouts now coerce like the rest.