wangyum commented on PR #40462:
URL: https://github.com/apache/spark/pull/40462#issuecomment-1487849388

   How about reverting this PR directly? Otherwise, we need to change 
`LimitPushDown`, which is not elegant:
   ```scala
   case Limit(exp, u: Union) if 
u.children.exists(_.isInstanceOf[HasPartitionExpressions]) =>
     val newChildren = u.children.map {
       case r: RebalancePartitions =>
         maybePushLocalLimit(exp, r.child)
       case r: RepartitionByExpression
           if r.partitionExpressions.nonEmpty && 
r.partitionExpressions.forall(_.deterministic) =>
         maybePushLocalLimit(exp, r.child)
       case o =>
         maybePushLocalLimit(exp, o)
     }
     Limit(exp, u.copy(children = newChildren))
   ```


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to