liucao-dd commented on code in PR #56705:
URL: https://github.com/apache/spark/pull/56705#discussion_r3476240444


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/BatchScanExec.scala:
##########
@@ -49,10 +49,11 @@ case class BatchScanExec(
   override protected lazy val sparkMetrics: Map[String, SQLMetric] = {
     val name = "number of output rows"
     val metric = table match {
-      // Use SLAM for the scan-output count when this scan reads on behalf of 
a row-level DELETE,
-      // so that the driver-side derivation `numDeletedRows = numScannedRows - 
numCopiedRows` in
-      // `ReplaceDataExec.getWriteSummary` stays correct under stage retries.
-      case rlot: RowLevelOperationTable if rlot.operation.command() == DELETE 
=>
+      // Use SLAM for the scan-output count when this scan reads on behalf of 
a row-level DELETE or
+      // REPLACE, so that the driver-side derivation `numDeletedRows = 
numScannedRows -
+      // numCopiedRows` in `ReplaceDataExec` stays correct under stage retries.
+      case rlot: RowLevelOperationTable
+          if Seq(DELETE, REPLACE).contains(rlot.operation.command()) =>

Review Comment:
   fixed to use == DELETE pattern



-- 
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]

Reply via email to