prakharjain09 opened a new pull request, #2519:
URL: https://github.com/apache/iceberg-rust/pull/2519
## Which issue does this PR close?
Closes #2518
## What changes are included in this PR?
Parses the `schema.name-mapping.default` table property once during
`TableScanBuilder::build` and threads the resulting `Arc<NameMapping>`
through `PlanContext` → `ManifestFileContext` → `ManifestEntryContext` so
it
lands on `FileScanTask` instead of always being `None`.
This unblocks readers that rely on the name mapping to resolve field IDs for
Parquet files lacking
field IDs (or with conflicting IDs). Malformed JSON in the property
surfaces
as `ErrorKind::DataInvalid` from `build()` rather than being silently
dropped.
Removes the corresponding TODO in `crates/iceberg/src/scan/context.rs`.
## Are these changes tested?
Three new unit tests in `scan::tests`:
- `test_table_scan_without_name_mapping_property` — absent property leaves
`plan_context.name_mapping` as `None`.
- `test_table_scan_with_name_mapping_property` — valid JSON parses into the
expected `NameMapping` fields on `PlanContext`.
- `test_table_scan_with_malformed_name_mapping_property` — invalid JSON
returns `ErrorKind::DataInvalid` from `build()`.
All `scan::` tests (37) pass.
--
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]