Skip to content

fix(manifest-list): read V1 file counts written with spec field names - #3447

Draft
kacper-li-airspace-intelligence wants to merge 6 commits into
apache:mainfrom
kacper-li-airspace-intelligence:fix-v1-manifest-list-count-names
Draft

kacper-li-airspace-intelligence wants to merge 6 commits into
apache:mainfrom
kacper-li-airspace-intelligence:fix-v1-manifest-list-count-names

Conversation

@kacper-li-airspace-intelligence

Copy link
Copy Markdown

Which issue does this PR close?

What changes are included in this PR?

Stacked on #3224; only the last commit is new.

ManifestFileV1 only knows added_data_files_count, existing_data_files_count and deleted_data_files_count. Java and the spec use added_files_count, existing_files_count and deleted_files_count, so these counts in V1 lists written by Java parse as None. Add the serde aliases ManifestFileV2 already has. This relies on #3224 reading V1 against the writer schema; resolution against MANIFEST_LIST_AVRO_SCHEMA_V1 filled the old names with null before serde saw the record.

Are these changes tested?

test_parse_manifest_list_v1_with_spec_field_names writes a V1 list with the spec field names and parses it. It fails without the aliases.

AI Disclosure

AI assisted with the implementation, test and description.

Resolve the parse_with_version conflict by reading entries with
into_deser_iter and the Resolved adapter from apache#3354.
Cover round trips, empty lists, truncated input and V1 read as V2 as
separate unit tests, and drop the allocation-budget integration test.
Drop the round-trip and V1-as-V2 tests, which duplicate
test_parse_manifest_list_v* and test_manifest_list_writer_v1_as_v2.
Set a non-empty key_metadata and null contains_nan and upper_bound on
existing entries to keep that coverage.
Java and the spec name the V1 count fields added_files_count,
existing_files_count and deleted_files_count. Add them as serde
aliases on ManifestFileV1, as ManifestFileV2 already has.

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.

V1 manifest lists written by Java lose added/existing/deleted file counts

1 participant