Github user gatorsmile commented on a diff in the pull request:
https://github.com/apache/spark/pull/7334#discussion_r51973696
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/execution/SparkStrategies.scala ---
@@ -337,8 +337,12 @@ private[sql] abstract class SparkStrategies extends
QueryPlanner[SparkPlan] {
execution.Sample(lb, ub, withReplacement, seed, planLater(child))
:: Nil
case logical.LocalRelation(output, data) =>
LocalTableScan(output, data) :: Nil
+ case logical.ReturnAnswer(logical.Limit(IntegerLiteral(limit),
child)) =>
+ execution.CollectLimit(limit, planLater(child)) :: Nil
case logical.Limit(IntegerLiteral(limit), child) =>
- execution.Limit(limit, planLater(child)) :: Nil
+ val perPartitionLimit = execution.LocalLimit(limit,
planLater(child))
--- End diff --
@JoshRosen Thank you for your explanation! That is so great that my
previous PR are useful. So far, I am unable to find more operators for limit
push down, except outer join and union all:
https://github.com/apache/spark/pull/10454 and
https://github.com/apache/spark/pull/10451
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]