spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From viirya <>
Subject [GitHub] spark pull request #18931: [SPARK-21717][SQL] Decouple consume functions of ...
Date Mon, 04 Sep 2017 04:19:15 GMT
Github user viirya commented on a diff in the pull request:
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/WholeStageCodegenExec.scala
    @@ -149,14 +149,146 @@ trait CodegenSupport extends SparkPlan {
         ctx.freshNamePrefix = parent.variablePrefix
         val evaluated = evaluateRequiredVariables(output, inputVars, parent.usedInputs)
    +    // Under certain conditions, we can put the logic to consume the rows of this operator
    +    // another function. So we can prevent a generated function too long to be optimized
by JIT.
    +    // The conditions:
    +    // 1. The parent uses all variables in output. we can't defer variable evaluation
when consume
    +    //    in another function.
    +    // 2. The output variables are not empty. If it's empty, we don't bother to do that.
    +    // 3. We don't use row variable. The construction of row uses deferred variable evaluation.
    --- End diff --
    The same reason as above. The variables used to evaluate the row can be out of scope because
row construction is deferred until it is used actually.

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

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message