File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
sql/core/src/main/scala/org/apache/spark/sql/execution Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -152,6 +152,12 @@ trait CodegenSupport extends SparkPlan {
152152
153153 // Under certain conditions, we can put the logic to consume the rows of this operator into
154154 // another function. So we can prevent a generated function too long to be optimized by JIT.
155+ // The conditions:
156+ // 1. The parent uses all variables in output. we can't defer variable evaluation when consume
157+ // in another function.
158+ // 2. The output variables are not empty. If it's empty, we don't bother to do that.
159+ // 3. We don't use row variable. The construction of row uses deferred variable evaluation. We
160+ // can't do it.
155161 val requireAllOutput = output.forall(parent.usedInputs.contains(_))
156162 val consumeFunc =
157163 if (row == null && outputVars.nonEmpty && requireAllOutput) {
You can’t perform that action at this time.
0 commit comments