Preserve physical leaf identity for duplicate primitive root paths
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- java
- Domain
- data-engineering
Research direction
Start with the proposed owner test, TestDuplicateRootIdentity, and run the 112 targeted tests on JDK 17 with the required upstream modules. Trace footer column conversion and page/index selection by physical ordinal, then cover the listed duplicate-root, malformed metadata, projection, and deferred-key cases. Done means the targeted tests pass while preserving first-root identity without broadening the stated scope.
Written by the indexing model from the issue text.
Description
Problem
Duplicate primitive root names can lose physical column identity when converting the footer and selecting pages/indexes. Name-path lookup can assign the later root's primitive type to an earlier physical column, while path-keyed page/index storage can replace an earlier chunk with a later one.
Original consumer report and standalone Rust fixture plus Spark reproduction: https://github.com/apache/datafusion-comet/issues/5964. Its Spark 4.1.3 vectorized, separate single-field-ID reads over INT64/id1 followed by INT32/id2 produce an anomalous zero. That report is not a claim of general duplicate-name support or a proposed requirement to reproduce the zero.
Proposed bounded fix
Associate footer column metadata with schema leaves by physical ordinal and validate available path/type and column count before using them. For duplicate primitive root paths, preserve the first selected page chunk and its matching column index. Keep column-key decryption lazy. Nested duplicate resolution, encrypted duplicate reads, simultaneous aliases, and nonvectorized consumer duplicate reads are outside this proposal.
Reproduction in the proposed owner test
TestDuplicateRootIdentity writes normal Parquet pages, then renames the second physical root in the Thrift footer to match the first. It deliberately gives the two roots different physical types and page layouts. Tests check first-root index selection, partial-row-group reads filtered on another column, nested nonduplicate ordinal controls, malformed column counts/path/types, empty projections, and deferred key retrieval. No external binary fixture is required.
The proposed port targets current master, not the older 1.16.0 release used during initial consumer investigation. The owner module and required upstream modules have been built on JDK 17 with Thrift 0.24.0; 112 targeted tests pass. Full reactor suites remain unrun.
- Dominant language
- Java
- Stars
- 3.1k
- Forks
- 1.6k
- Avg merge
- 4d 12h
- Merged PRs (30d)
- 28
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/parquet-java
-
Type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
apache/parquet-java#3792 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
apache/parquet-java#3767 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
apache/parquet-java#3695 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
apache/parquet-java#3667 ·
-
Type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
apache/parquet-java#3587 ·
All issues in apache/parquet-java
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
elastic/gradle-plugins#157 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
cryptomator/hub#497 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
johanhaleby/occurrent#1120 ·