Ngone51 commented on code in PR #49501: URL: https://github.com/apache/spark/pull/49501#discussion_r1916114001
########## sql/core/src/main/scala/org/apache/spark/sql/execution/WholeStageCodegenExec.scala: ########## @@ -485,8 +487,16 @@ trait InputRDDCodegen extends CodegenSupport { "" } s""" - | while ($limitNotReachedCond $input.hasNext()) { + | long $numOutputRows = 0; + | boolean $taskInterrupted = false; + | while ($limitNotReachedCond !$taskInterrupted && $input.hasNext()) { | InternalRow $row = (InternalRow) $input.next(); + | $numOutputRows++; + | if ($numOutputRows % 1000 == 0) { Review Comment: Yea, it's by intuition. And yes we expect 1000 rows to finish quickly soon. -- 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-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org