szehon-ho commented on code in PR #15014:
URL: https://github.com/apache/iceberg/pull/15014#discussion_r2678376955
##########
spark/v4.1/spark/src/main/java/org/apache/iceberg/spark/source/SparkWrite.java:
##########
@@ -244,6 +255,31 @@ private void commitOperation(SnapshotUpdate<?> operation,
String description) {
}
}
+ private void setMergeSummaryProperties(SnapshotUpdate<?> operation,
MergeSummary mergeSummary) {
+ setIfPositive(operation, "numTargetRowsCopied",
mergeSummary.numTargetRowsCopied());
+ setIfPositive(operation, "numTargetRowsDeleted",
mergeSummary.numTargetRowsDeleted());
+ setIfPositive(operation, "numTargetRowsUpdated",
mergeSummary.numTargetRowsUpdated());
+ setIfPositive(operation, "numTargetRowsInserted",
mergeSummary.numTargetRowsInserted());
+ setIfPositive(
+ operation, "numTargetRowsMatchedUpdated",
mergeSummary.numTargetRowsMatchedUpdated());
+ setIfPositive(
+ operation, "numTargetRowsMatchedDeleted",
mergeSummary.numTargetRowsMatchedDeleted());
+ setIfPositive(
+ operation,
+ "numTargetRowsNotMatchedBySourceUpdated",
+ mergeSummary.numTargetRowsNotMatchedBySourceUpdated());
+ setIfPositive(
+ operation,
+ "numTargetRowsNotMatchedBySourceDeleted",
+ mergeSummary.numTargetRowsNotMatchedBySourceDeleted());
Review Comment:
yea, this works for me. looks like there is already spark.xxx for other
things.
thanks for the feedback, welcome other thoughts as well !
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]