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

[GitHub] [spark] HyukjinKwon commented on a diff in pull request #42475: [SPARK-44793][SQL] Fixing pipelineTime metric for WholeStageCodegen

HyukjinKwon commented on code in PR #42475:
URL: https://github.com/apache/spark/pull/42475#discussion_r1299546504


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/WholeStageCodegenEvaluatorFactory.scala:
##########
@@ -41,7 +41,7 @@ class WholeStageCodegenEvaluatorFactory(
       new Iterator[InternalRow] {
         override def hasNext: Boolean = {
           val v = buffer.hasNext
-          if (!v) durationMs += buffer.durationMs()
+          if (!v) durationMs.set(buffer.durationMs())

Review Comment:
   why and how was this wrong?



##########
sql/core/src/main/scala/org/apache/spark/sql/execution/WholeStageCodegenEvaluatorFactory.scala:
##########
@@ -41,7 +41,7 @@ class WholeStageCodegenEvaluatorFactory(
       new Iterator[InternalRow] {
         override def hasNext: Boolean = {
           val v = buffer.hasNext
-          if (!v) durationMs += buffer.durationMs()
+          if (!v) durationMs.set(buffer.durationMs())

Review Comment:
   and how did you test?



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