asl3 commented on code in PR #53571:
URL: https://github.com/apache/spark/pull/53571#discussion_r2725874814
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/WriteToDataSourceV2Exec.scala:
##########
@@ -504,6 +508,54 @@ trait V2TableWriteExec extends V2CommandExec with
UnaryExecNode with AdaptiveSpa
)
}
}
+
+ private object SourceAncestor {
+ def unapply(p: SparkPlan): Option[SparkPlan] = p match {
+ case w: WholeStageCodegenExec => Some(w.child)
+ case i: InputAdapter => Some(i.child)
+ case p: ProjectExec => Some(p.child)
Review Comment:
I find that this test for example fails when we remove ProjectExec `Merge
metrics with matched, not matched, and not matched by source clauses: update`
The source side plan is like:
```
Sort [pk#204 ASC NULLS FIRST], false, 0
+- AQEShuffleRead coalesced
+- ShuffleQueryStage 1
+- Exchange hashpartitioning(pk#204, 5), ENSURE_REQUIREMENTS,
[plan_id=335]
+- *(2) Project [value#200 AS pk#204, true AS __row_from_source#217]
+- *(2) LocalTableScan [value#200]
```
seems ProjectExec does not guarantee to have numOutputRows
--
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]