Github user viirya commented on a diff in the pull request:
https://github.com/apache/spark/pull/19813#discussion_r156238903
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Expression.scala
---
@@ -105,6 +105,12 @@ abstract class Expression extends TreeNode[Expression]
{
val isNull = ctx.freshName("isNull")
val value = ctx.freshName("value")
val eval = doGenCode(ctx, ExprCode("", isNull, value))
+ eval.isNull = if (this.nullable) eval.isNull else "false"
--- End diff --
Compilation error like:
```
[info] Cause: org.codehaus.commons.compiler.CompileException: File
'generated.java', Line 59, Column 14: failed to compile:
org.codehaus.commons.compiler.CompileException: File 'generated.java', Line 59,
Column 14: Identifier expected instead of 'false'
```
Seems some expressions uses `eval.isNull` as lvalue. Do you think we should
find them out and change them?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]