You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "beliefer (via GitHub)" <gi...@apache.org> on 2023/04/12 11:22:45 UTC

[GitHub] [spark] beliefer commented on a diff in pull request #40754: [SPARK-37099][SQL][FOLLOWUP] Add numOutputRows metric for WindowGroupLimitExec

beliefer commented on code in PR #40754:
URL: https://github.com/apache/spark/pull/40754#discussion_r1163992394


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/window/WindowGroupLimitExec.scala:
##########
@@ -116,7 +129,8 @@ abstract class BaseLimitIterator extends Iterator[InternalRow] {
 
 case class SimpleLimitIterator(
     input: Iterator[InternalRow],
-    limit: Int) extends BaseLimitIterator {
+    limit: Int,
+    numOutputRows: SQLMetric) extends BaseLimitIterator {

Review Comment:
   Could we avoid it as parameter ?
   It seems just put
   ```
   override lazy val metrics = Map(
        "numOutputRows" -> SQLMetrics.createMetric(sparkContext, "number of output rows"))
   ```
   into BaseLimitIterator directly.



-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org