You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/07/27 07:04:42 UTC

[GitHub] [spark] cloud-fan commented on a diff in pull request #37284: [SPARK-39867][SQL] Global limit should not inherit OrderPreservingUnaryNode

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


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/basicLogicalOperators.scala:
##########
@@ -1430,9 +1430,13 @@ object Limit {
 /**
  * A global (coordinated) limit. This operator can emit at most `limitExpr` number in total.
  *
+ * We can not make it inherit [[OrderPreservingUnaryNode]] due to the different strategy of
+ * physical plan. The output ordering of child will be broken if a shuffle exchange comes in
+ * between the child and global limit.

Review Comment:
   ```suggestion
    * between the child and global limit, due to the fact that shuffle reader fetches blocks in random order.
   ```



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