Skip to content

Spark: Apply custom snapshot properties to Metadata-Only DELETE operations (Rebased #15061)#15836

Open
rdeepak2002 wants to merge 4 commits intoapache:mainfrom
rdeepak2002:heatao-fix-custom-snapshot
Open

Spark: Apply custom snapshot properties to Metadata-Only DELETE operations (Rebased #15061)#15836
rdeepak2002 wants to merge 4 commits intoapache:mainfrom
rdeepak2002:heatao-fix-custom-snapshot

Conversation

@rdeepak2002
Copy link
Copy Markdown

@rdeepak2002 rdeepak2002 commented Mar 31, 2026

PR Description

This is a rebased version of #15061 by @Heatao to resolve merge conflicts with the latest main branch.

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 adds SparkWriteConf.extraSnapshotMetadata() to the deleteWhere() method in SparkTable so that metadata-only DELETEs also pick up those properties.

Changes (identical for Spark 4.0 and 4.1):

  • Apply extraSnapshotMetadata from SparkWriteConf in SparkTable.deleteWhere()
  • Add test coverage for copy-on-write, merge-on-read, and metadata-only DELETE operations

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.

Heatao and others added 3 commits March 31, 2026 11:47
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
@github-actions github-actions bot added the spark label Mar 31, 2026
@rdeepak2002 rdeepak2002 force-pushed the heatao-fix-custom-snapshot branch 3 times, most recently from fdbe316 to 7b62e75 Compare March 31, 2026 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DELETE operations don't apply custom snapshot properties from session config

2 participants