cloud-fan commented on code in PR #50868: URL: https://github.com/apache/spark/pull/50868#discussion_r2086788659
########## sql/core/src/main/scala/org/apache/spark/sql/execution/UnionLoopExec.scala: ########## @@ -162,7 +162,9 @@ case class UnionLoopExec( // the number of rows generated in that step. // If limit is not passed down, currentLimit is set to be zero and won't be considered in the // condition of while loop down (limit.isEmpty will be true). - var currentLimit = limit.getOrElse(-1) + var currentLimit = limit.getOrElse(rowLimit) + + val rowLimitChanged = limit.isDefined Review Comment: ```suggestion val userSpecifiedLimit = limit.isDefined ``` -- 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