This is an automated email from the ASF dual-hosted git repository.
szehon pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iceberg.git
The following commit(s) were added to refs/heads/main by this push:
new 017e81300c [Docs] Add Spark MERGE INTO fields in snapshot summary
(#15390)
017e81300c is described below
commit 017e81300c02cdbd8b7586d5d447aecbda442a0f
Author: Szehon Ho <[email protected]>
AuthorDate: Thu Feb 26 12:08:32 2026 -0800
[Docs] Add Spark MERGE INTO fields in snapshot summary (#15390)
---
docs/docs/spark-writes.md | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/docs/docs/spark-writes.md b/docs/docs/spark-writes.md
index f224894a45..31a0bbc211 100644
--- a/docs/docs/spark-writes.md
+++ b/docs/docs/spark-writes.md
@@ -100,6 +100,24 @@ Spark 3.5 added support for `WHEN NOT MATCHED BY SOURCE
... THEN ...` to update
WHEN NOT MATCHED BY SOURCE THEN UPDATE SET status = 'invalid'
```
+#### Snapshot summary
+
+After a `MERGE INTO` commit, the [snapshot
summary](../../spec.md#optional-snapshot-summary-fields) may include the
following fields. Each value is the string form of a non-negative count. A
field is omitted when the value is unknown (e.g., not reported by Spark).
+
+!!! info
+ Only available in Spark 4.1 and higher.
+
+| Field |
Description |
+|-----------------------------------------------------------------------|-----------------------------------------------------------------------------|
+| **`spark.merge-into.num-target-rows-copied`** |
Number of target rows copied unmodified because they did not match any action |
+| **`spark.merge-into.num-target-rows-deleted`** |
Number of target rows deleted |
+| **`spark.merge-into.num-target-rows-updated`** |
Number of target rows updated |
+| **`spark.merge-into.num-target-rows-inserted`** |
Number of target rows inserted |
+| **`spark.merge-into.num-target-rows-matched-updated`** |
Number of target rows updated by a MATCHED clause |
+| **`spark.merge-into.num-target-rows-matched-deleted`** |
Number of target rows deleted by a MATCHED clause |
+| **`spark.merge-into.num-target-rows-not-matched-by-source-updated`** |
Number of target rows updated by a NOT MATCHED BY SOURCE clause |
+| **`spark.merge-into.num-target-rows-not-matched-by-source-deleted`** |
Number of target rows deleted by a NOT MATCHED BY SOURCE clause |
+
### `INSERT OVERWRITE`
`INSERT OVERWRITE` can replace data in the table with the result of a query.
Overwrites are atomic operations for Iceberg tables.