Spark: Apply custom snapshot properties to Metadata-Only DELETE operations (Rebased #15061)#15836
Open
rdeepak2002 wants to merge 4 commits intoapache:mainfrom
Open
Spark: Apply custom snapshot properties to Metadata-Only DELETE operations (Rebased #15061)#15836rdeepak2002 wants to merge 4 commits intoapache:mainfrom
rdeepak2002 wants to merge 4 commits intoapache:mainfrom
Conversation
This fixes an inconsistency where DELETE operations did not respect custom snapshot properties set via session config, while INSERT and UPDATE operations did. Closes apache#15060
fdbe316 to
7b62e75
Compare
7b62e75 to
b6b6d4c
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.
PR Description
This is a rebased version of #15061 by @Heatao to resolve merge conflicts with the latest
mainbranch.Summary
DELETE operations did not respect custom snapshot properties set via session config (
spark.sql.iceberg.snapshot-property.*), while INSERT and UPDATE operations did. This change addsSparkWriteConf.extraSnapshotMetadata()to thedeleteWhere()method inSparkTableso that metadata-only DELETEs also pick up those properties.Changes (identical for Spark 4.0 and 4.1):
extraSnapshotMetadatafromSparkWriteConfinSparkTable.deleteWhere()Closes #15060.
Context
The original PR was approved by @amogh-jahagirdar, @ebyhr, and @yingjianwu98 but could not be merged due to conflicts and the thread has been inactive for 3 weeks. All original review feedback was addressed. I have only resolved the merge conflicts - the code changes are @Heatao's work.