fix(datafusion): reject non-append insert operations#2714
Open
u70b3 wants to merge 1 commit into
Open
Conversation
CTTY
approved these changes
Jun 29, 2026
CTTY
left a comment
Collaborator
There was a problem hiding this comment.
LGTM! Just one minor comment
| ), | ||
| "unexpected error: {error}" | ||
| ); | ||
| } |
Collaborator
There was a problem hiding this comment.
How about merging these 2 tests into 1 test_catalog_backed_provider_rejects_non_append_op
Author
There was a problem hiding this comment.
thanks for the comment, already merge two testcase
b824bb5 to
4c1f548
Compare
1a8f80a to
d1e1c26
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
What changes are included in this PR?
Reject DataFusion
InsertOp::OverwriteandInsertOp::Replacebefore constructing an Iceberg write plan.Previously,
IcebergTableProvider::insert_intoignored the requested insert operation while the commit executor always usedfast_append. Unsupported overwrite or replace requests could therefore be silently executed with append semantics.This patch keeps the existing append path unchanged and returns
DataFusionError::NotImplementedfor unsupported insert operations. It preserves the existing_insert_opparameter name to avoid changing the generated public API snapshot.Are these changes tested?
Yes. Added unit tests verifying that:
InsertOp::OverwritereturnsDataFusionError::NotImplemented.InsertOp::ReplacereturnsDataFusionError::NotImplemented.Local verification:
cargo test -p iceberg-datafusion test_catalog_backed_provider_rejects -- --nocapturecargo fmt --all -- --checkgit diff --check