Skip to content

Spark: Apply extra snapshot properties to DELETE operations#17016

Open
yadavay-amzn wants to merge 1 commit into
apache:mainfrom
yadavay-amzn:fix/15060-delete-snapshot-properties
Open

Spark: Apply extra snapshot properties to DELETE operations#17016
yadavay-amzn wants to merge 1 commit into
apache:mainfrom
yadavay-amzn:fix/15060-delete-snapshot-properties

Conversation

@yadavay-amzn

Copy link
Copy Markdown
Contributor

Propagates the configured extra snapshot properties (SparkWriteConf.extraSnapshotMetadata()) to the DeleteFiles operation in SparkTable.deleteWhere, mirroring the write path in SparkWrite, so metadata-only DELETEs carry the user's snapshot-property.* session-config metadata in the resulting snapshot summary (previously they were dropped).

Applied to Spark v3.5, v4.0, and v4.1. For v3.5, SparkWriteConf.extraSnapshotMetadata() is also brought to parity with v4.0/v4.1 (reads session config in addition to write options), since deleteWhere has no write-options injection point and session config is the only mechanism available to inject snapshot properties on a metadata-only delete.

Tests: per-version cases set a snapshot-property.* session config, run a partition-aligned metadata-only DELETE, and assert the property appears in the snapshot summary.

Closes #15060.


AI assistance: authored with assistance by Claude Opus 4.8. I understand the change end-to-end and have verified it locally (per-version tests green; spotless and checkstyle clean).

@github-actions github-actions Bot added the spark label Jun 30, 2026
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

1 participant