cloud-fan commented on code in PR #50868:
URL: https://github.com/apache/spark/pull/50868#discussion_r2086791626


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/UnionLoopExec.scala:
##########
@@ -221,22 +221,20 @@ case class UnionLoopExec(
 
       unionChildren += prevPlan
 
-      currentNumRows += prevCount
-
-      if (limit.isDefined) {
+      if (rowLimit != -1) {
         currentLimit -= prevCount.toInt
         if (currentLimit <= 0) {
-          limitReached = true
+          if (rowLimitChanged) {
+            limitReached = true

Review Comment:
   hmmm do we still need this variable?



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

Reply via email to