shangxinli opened a new pull request, #14199:
URL: https://github.com/apache/iceberg/pull/14199
This commit resolves the TODO in DeleteFilter.fileProjection() that
previously prevented equality deletes from working with nested columns.
The original code used tableSchema.asStruct().field(fieldId) which only
finds top-level fields, causing "Cannot find required field for ID X" errors
when equality delete files referenced nested fields.
Changes:
- Use Schema.findField() to recursively find the fieldId
Tests:
- Because the change is on the critical path, extensive tests are added
below(Use AI tools generated)
1. Nested Fields with Correct Return Validation
- testSimpleNestedFieldsReturnCorrectDetails() - Verifies that nested
fields are returned with correct name, type, field ID, and optional status
2. Multiple Layer Nesting Variants
Deep Struct Nesting:
- testMultipleLayerNesting() - Tests 4-level deep nesting
(struct→struct→struct→field)
- testMultipleFieldsInDifferentLevels() - Tests fields at different
nesting depths simultaneously
List Types:
- testListElementFields() - Tests nested fields within list elements
- testMultipleListElementFields() - Tests multiple fields within the same
list element struct
Map Types:
- testMapValueFields() - Tests nested fields within map values
- testMapKeyFields() - Tests nested fields within map keys (complex case)
- testMapKeyAndValueFields() - Tests both map key and value fields together
Complex Combinations:
- testComplexCombination() - Tests the most complex case: List of Maps
with struct values
- testMixedNestedAndTopLevelFields() - Tests combination of nested fields
from different structures
3. Regression Tests for Non-Nested Fields
- testRegressionSimpleTopLevelFields() - Ensures simple top-level fields
continue to work
- testRegressionNoDeleteFiles() - Tests behavior when no delete files are
present
- testRegressionAllFieldsAlreadyInRequested() - Tests when all required
fields are already in requested schema
--
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]