Github user sameeragarwal commented on a diff in the pull request:
https://github.com/apache/spark/pull/14227#discussion_r71389155
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Expression.scala
---
@@ -377,6 +377,7 @@ abstract class UnaryExpression extends Expression {
""")
} else {
ev.copy(code = s"""
+ boolean ${ev.isNull} = false;
--- End diff --
@cloud-fan ideally it shouldn't be referenced but we recently discovered
these incorrect patterns in the code (e.g.,
https://github.com/apache/spark/pull/14168/files#diff-39298b470865a4cbc67398a4ea11e767L290)
where the non-nullable branches were not explicitly tested. This change was
just a defensive measure for codegen to not break in those cases. Let me also
add a comment here to reduce confusion.
---
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 [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]