ump45nose opened a new pull request, #3806:
URL: https://github.com/apache/iceberg-rust/pull/3806

   ## Which issue does this PR close?
   
   - Closes #3608.
   
   ## What changes are included in this PR?
   
   `ArrowReader` decided whether a Parquet file has field ids by looking only 
at the first top-level field. If that field had no id and the task had no name 
mapping, the position-based fallback assigned ids to every column and overwrote 
the ids the other columns carried. A column whose embedded id differs from its 
1-based position then read as NULL, or as another column's values.
   
   The file now counts as having no field ids only when no field at any depth 
carries one, which is what the code comment already says it mirrors (Java's 
`ParquetSchemaUtil.hasIds()`). Files with no ids at all still take the position 
fallback or the name mapping, as before.
   
   ## Are these changes tested?
   
   Yes. A new test in `arrow::reader::projection` writes `junk` (no id) and `c` 
(id 4) and projects field 4 without a name mapping. It returns `[0, 0]` on main 
and `[7, 8]` with the change. The `arrow::` lib tests (408), `cargo clippy -p 
iceberg --all-targets -- -D warnings` and `cargo fmt --check` pass locally.
   
   ## AI Disclosure
   
   I used an AI assistant to write the change and the test, and I reviewed and 
ran both myself. The issue's reproduction is covered. I did not add a test for 
ids that exist only on nested fields; the helper checks struct, list and map 
children, but only the top-level case is exercised.
   


-- 
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]

Reply via email to