ump45nose opened a new pull request, #3807: URL: https://github.com/apache/iceberg-rust/pull/3807
## Which issue does this PR close? - Closes #3607. ## What changes are included in this PR? `CachingDeleteFileLoader::parse_equality_deletes_record_batch_stream` derived the Iceberg types of the equality columns by converting the delete batch's Arrow schema back with `arrow_schema_to_schema`. A uuid column stored as `FIXED_LEN_BYTE_ARRAY(16)` without the Parquet `UUID` annotation has no `arrow.uuid` extension, so it converted to `fixed(16)` and building the delete predicate failed with `Can't convert datum from fixed(16) type to uuid type`. The loader already reads the delete file as the table schema pruned to the equality fields (`evolve_equality_delete_stream`). That pruning is now a small helper, `equality_delete_schema`, and the same pruned schema is passed to the parser, so the equality column types come from the table schema, like `DeleteFilter` in Java (`TypeUtil.selectInIdOrder`). The parser keeps the Arrow-schema fallback when no schema is given; only the existing unit tests that parse raw files directly use it. Out of scope: the lower-priority point in the issue about relabelling `Equivalent` data batches with the table schema's extension metadata is not touched here. ## Are these changes tested? Yes. `test_uuid_equality_delete_without_uuid_annotation` writes an equality delete file with a plain `FixedSizeBinary(16)` column (field id 1, no `arrow.uuid`), loads it through `load_deletes` for a table with `required 1: u uuid`, and checks the bound predicate is `u IS NULL OR u != <uuid>`. On main it fails with `DataInvalid => Can't convert datum from fixed(16) type to uuid type.`; with this change it passes. Locally: `cargo test -p iceberg --lib` (2356 passed), `cargo clippy -p iceberg --all-targets -- -D warnings`, and `cargo fmt --all -- --check` pass. ## AI Disclosure This change and its test were written with an AI coding assistant. I ran the test on main to confirm it reproduces the issue, and ran the checks above with the change. -- 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]
