Github user cloud-fan commented on the issue:
https://github.com/apache/spark/pull/19813
After some more thoughts, this PR makes a new contract that Spark doesn't
promise before: `Expression.genCode` must output something that can be used as
parameter name or literal.
I do remember in some places we just output statement like `a + 1` for
codegen, but I could be wrong. At least we need to check all the places and
document this new contract before merging this PR.
Another solution is to not make this contract. By a quick look this seems
hard to do, because at the time of doing this, the code(method body) is already
generated and we don't know how to replace statement like `a + 1` with the
generated parameter name, inside the method body. We may need to do this fix
earlier in the codegen procedure.
I'm going to revert it, let's have a proper design doc and resubmit this.
Sorry for the inconvenient!
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]