uros-b commented on code in PR #57355:
URL: https://github.com/apache/spark/pull/57355#discussion_r3624782105


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/exchange/ShuffleExchangeExec.scala:
##########
@@ -343,7 +362,8 @@ object ShuffleExchangeExec {
       outputAttributes: Seq[Attribute],
       newPartitioning: Partitioning,
       serializer: Serializer,
-      writeMetrics: Map[String, SQLMetric])
+      writeMetrics: Map[String, SQLMetric],
+      customWriteMetrics: Map[String, SQLMetric] = Map.empty)

Review Comment:
   The default empty customWriteMetrics means the three callers in limit.scala 
(CollectLimitExec, CollectTailExec, and TakeOrderedAndProjectExec) silently 
discard metrics returned by the shuffle plugin.
   
   These operators already expose built-in shuffle metrics, so they should also 
create collision-filtered custom metrics, include them in metrics, and pass 
them to prepareShuffleDependency.
   
   Could you also add a regression test covering a multi-partition limit 
shuffle?



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