Skip to content

fix(avro): read files without field IDs - #1109

Draft
manuzhang wants to merge 1 commit into
apache:mainfrom
manuzhang:fix/avro-no-field-ids
Draft

manuzhang wants to merge 1 commit into
apache:mainfrom
manuzhang:fix/avro-no-field-ids

Conversation

@manuzhang

@manuzhang manuzhang commented Nov 10, 2026 •

Copy link
Copy Markdown
Member

Summary

Fix Avro reads of files with no embedded field IDs when an explicit name mapping covers only part of the file. Follows the clarification in apache/iceberg#19037.

  • Skip unmapped record fields. Treat lists and maps with missing child IDs as absent, using the existing missing-field rules. Preserve identity partition value precedence from feat(read): read identity partition columns from file scan tasks #1068.
  • Keep the native Avro map's implicit string key, put both IDs in the same attribute set, and preserve the logical type on array-backed maps.
  • Consume null union branches in the direct decoder so the resolving decoder can advance to the next field.

The PR does not change rejection of ID-free files without a mapping or Avro files with a mix of embedded and missing IDs.

Testing

  • Regression tests cover explicit and partial name mappings on both the direct-decoder and GenericDatum paths, and both Avro map representations.
  • clang-format 22.1.5 and git diff --check passed. Current-head C++ test results are not yet available.

🤖 Original patch generated with Claude Code; rebased with Codex.

Copilot AI balanced review requested due to automatic review settings November 10, 2026 14:43

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

@manuzhang
manuzhang force-pushed the fix/avro-no-field-ids branch from c2b29a2 to 85f26b7 Compare November 25, 2026 06:38
Preserve identity partition precedence from apache#1068 and apply the
per-file name-mapping rules clarified in apache/iceberg#19037.

Co-authored-by: Manu Zhang <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: Codex <[email protected]>
@manuzhang
manuzhang force-pushed the fix/avro-no-field-ids branch from 85f26b7 to f3850fe Compare December 1, 2026 16:23

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.

2 participants