Github user hvanhovell commented on a diff in the pull request: https://github.com/apache/spark/pull/15693#discussion_r85738758 --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/ReferenceToExpressions.scala --- @@ -67,11 +67,27 @@ case class ReferenceToExpressions(result: Expression, children: Seq[Expression]) case (childGen, child) => LambdaVariable(childGen.value, childGen.isNull, child.dataType) } + // SPARK-18125: The children vars are local variables. If the result expression uses + // splitExpression, those variables cannot be accessed so compilation fails. + // To fix it, we use class variables to hold those local variables. + val initClassChildVars = childrenVars.map { childVar => --- End diff -- Shouldn't we merge this with `childrenVars`?
--- 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