Spark 4.2: Add insert, update, and delete write summaries to snapshot summary - #17955
Open
rahulsmahadev wants to merge 1 commit into
Open
Spark 4.2: Add insert, update, and delete write summaries to snapshot summary#17955rahulsmahadev wants to merge 1 commit into
rahulsmahadev wants to merge 1 commit into
Conversation
… summary Persist the row-level operation metrics that Spark 4.2 reports via the new InsertSummary, UpdateSummary, and DeleteSummary write summaries into the Iceberg snapshot summary, mirroring the existing MERGE support. Adds spark.insert.num-inserted-rows, spark.update.num-updated-rows / num-copied-rows, and spark.delete.num-deleted-rows / num-copied-rows, with copy-on-write and merge-on-read tests and documentation.
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.
Persists the row-level operation metrics that Spark 4.2 reports via the new
InsertSummary,UpdateSummary, andDeleteSummarywrite summaries into the Iceberg snapshot summary, mirroring the existingMergeSummarysupport added in #15014.Spark 4.2's
WriteToDataSourceV2Execpasses an operation-specificWriteSummarytoBatchWrite.commit(messages, summary)for INSERT (append), UPDATE, and DELETE. This change consumes them in Iceberg's commit path and records the following snapshot summary fields:spark.insert.num-inserted-rowsspark.update.num-updated-rows,spark.update.num-copied-rowsspark.delete.num-deleted-rows,spark.delete.num-copied-rowsnum-copied-rowscounts unmodified rows rewritten in copy-on-write mode and is0in merge-on-read. The append path (BatchAppend) now forwards theInsertSummaryon commit; the copy-on-write and merge-on-read row-level paths already forward their summaries.Metric tests are added for copy-on-write and merge-on-read, and the new fields are documented in
spark-writes.md.