Github user hvanhovell commented on a diff in the pull request:

    https://github.com/apache/spark/pull/18955#discussion_r133438086
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/SparkStrategies.scala ---
    @@ -72,7 +72,12 @@ abstract class SparkStrategies extends 
QueryPlanner[SparkPlan] {
               execution.TakeOrderedAndProjectExec(
                 limit, order, projectList, planLater(child)) :: Nil
             case logical.Limit(IntegerLiteral(limit), child) =>
    -          execution.CollectLimitExec(limit, planLater(child)) :: Nil
    +          // Normally wrapping child with `LocalLimitExec` here is a 
no-op, because
    +          // `CollectLimitExec.executeCollect` will call 
`LogicalLimitExec.executeTake`, which
    +          // calls `child.executeTake`. If child supports whole stage 
codegen, adding this
    +          // `LocalLimitExec` can break the input consuming loop inside 
whole stage codegen and
    --- End diff --
    
    By `...break the input consuming loop...` you mean stop processing, and 
break whole stage code gen. We may need to word this slightly differently :)...


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to