adiranjan25 opened a new pull request, #19208:
URL: https://github.com/apache/iceberg/pull/19208
## Summary
Addresses the add_files branch-isolation violation reported in #19188.
Previously, invoking add_files with a branch-qualified destination could
successfully import files while advancing the main branch instead of
the requested destination branch.
This behavior violates branch isolation and can introduce unintended
data into the main table snapshot.
## Implementation
- Propagate the destination branch through file-path and catalog-table
import operations.
- Route append operations to the requested branch.
- Retrieve procedure output from the destination branch snapshot.
- Evaluate duplicate-file detection against the destination branch.
- Preserve existing import utility signatures and default main-branch
behavior.
## Regression coverage
Added tests covering:
- Unpartitioned file imports into a branch.
- Partitioned file imports into a branch.
- Unpartitioned Hive catalog imports into a branch.
- Duplicate-file detection across independent branches.
- Rejection of repeated imports into the destination branch.
## Validation
Spark 3.5, Java 17.
Original regression:
- Before fix: 3 failed.
- After fix: 3 passed.
Full TestAddFilesProcedure suite:
- Total: 135
- Passed: 134
- Failed: 0
- Errors: 0
- Skipped: 1
Spotless formatting and git diff --check passed.
## Review considerations
This draft focuses on add_files in Spark 3.5.
Maintainer feedback is requested on the intended branch-qualified
procedure semantics, invalid branch handling, partitioned catalog
imports, concurrent operations, and applicability to other Spark
versions.
Other procedures mentioned in #19188 are outside this draft's scope.
Related to #19188.
--
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]