Github user cloud-fan commented on a diff in the pull request:
https://github.com/apache/spark/pull/19803#discussion_r153017609
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/execution/WholeStageCodegenExec.scala
---
@@ -147,6 +149,11 @@ trait CodegenSupport extends SparkPlan {
}
}
+ // Set up the `currentVars` in the codegen context, as we generate the
code of `inputVars`
+ // before calling `parent.doConsume`. We can't set up `INPUT_ROW`,
because parent needs to
+ // generate code of `rowVar` manually.
+ ctx.currentVars = inputVars
+ ctx.INPUT_ROW = null
--- End diff --
`splitExpressions` doesn't work for whole stage codegen. Here I just made
it more clear.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]