cloud-fan commented on a change in pull request #29107:
URL: https://github.com/apache/spark/pull/29107#discussion_r458041744
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/Optimizer.scala
##########
@@ -497,8 +497,8 @@ object LimitPushDown extends Rule[LogicalPlan] {
// Note: right now Union means UNION ALL, which does not de-duplicate
rows, so it is safe to
// pushdown Limit through it. Once we add UNION DISTINCT, however, we will
not be able to
// pushdown Limit.
- case LocalLimit(exp, Union(children)) =>
- LocalLimit(exp, Union(children.map(maybePushLocalLimit(exp, _))))
+ case LocalLimit(exp, Union(children, byName, allowMissingCol)) =>
+ LocalLimit(exp, Union(children.map(maybePushLocalLimit(exp, _)), byName,
allowMissingCol))
Review comment:
nit: use `copy` would be better.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]