Github user mgaido91 commented on a diff in the pull request:
https://github.com/apache/spark/pull/19813#discussion_r154191102
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Expression.scala
---
@@ -105,6 +105,7 @@ abstract class Expression extends TreeNode[Expression] {
val isNull = ctx.freshName("isNull")
val value = ctx.freshName("value")
val eval = doGenCode(ctx, ExprCode("", isNull, value))
+ populateInputs(ctx, eval)
--- End diff --
nit: I would prefer not to change `eval` inside a function, in order to be
more compliant to functional programming principle that methods should be
without side effects. Since setting the `inputRow` is trivial I'd inline it
here, while for the current variables, I'd prefer to assign them here by
returning them from `populateInputs` (which would need to be renamed in this
case)
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]