fix: accept legacy Athena field names in manifest list parsing#369
Open
JanKaul wants to merge 2 commits into
Open
fix: accept legacy Athena field names in manifest list parsing#369JanKaul wants to merge 2 commits into
JanKaul wants to merge 2 commits into
Conversation
Some query engines (e.g. AWS Athena) write `added_data_files_count`, `existing_data_files_count`, and `deleted_data_files_count` instead of the spec-correct `added_files_count` etc. (apache/iceberg#8684). Supplying a reader schema to apache_avro triggers Avro-level field resolution by name, which fails silently for these files because avro-rs has no alias support. We now read without a reader schema so the embedded writer field names reach the serde layer, where `#[serde(alias)]` maps both legacy and canonical names correctly. Fixes #367 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
gruuya
approved these changes
Jul 16, 2026
gruuya
left a comment
Contributor
There was a problem hiding this comment.
I think this will work, we'd love to try it out.
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.
Summary
added_data_files_count,existing_data_files_count, anddeleted_data_files_countin manifest list files instead of the spec-correct names — a known early misalignment tracked in apache/iceberg#8684Missing field in record: "added_files_count"becauseapache_avroperforms Avro-level field resolution by name when a reader schema is supplied, andavro-rshas no alias support#[serde(alias)]to accept both the legacy and spec-correct names on all three affected fields across V1/V2/V3 serde structsTODOcomment marks the reader-schema removal as temporary — to be reverted once all major query engines write the spec-correct namesFixes #367
Test plan
test_manifest_list_v1/v2/v3unit tests pass🤖 Generated with Claude Code