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

    https://github.com/apache/spark/pull/17122#discussion_r103858494
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/WholeStageCodegenExec.scala
 ---
    @@ -77,6 +77,10 @@ trait CodegenSupport extends SparkPlan {
        */
       final def produce(ctx: CodegenContext, parent: CodegenSupport): String = 
executeQuery {
         this.parent = parent
    +
    +    // to track the existence of apply() call in the current 
produce-consume cycle
    +    // if apply is not called (e.g. in aggregation), we can skip shoudStop 
in the inner-most loop
    +    parent.shouldStopRequired = false
    --- End diff --
    
    I wanted to ensure `produce()` starts with `parent.shouldStopRequired = 
false`. This is because I am afraid other produce-consume may set true into 
`shouldStopRequired` if we have more than one-produce-consume in one parent.
    However, in most of cases, it would not happen. For the simplicity, I 
eliminated this.


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

Reply via email to