Github user wuchong commented on a diff in the pull request:
https://github.com/apache/flink/pull/2182#discussion_r68969768
--- Diff:
flink-libraries/flink-table/src/main/scala/org/apache/flink/api/table/codegen/calls/CallGenerator.scala
---
@@ -43,11 +43,16 @@ object CallGenerator {
val nullTerm = newName("isNull")
val resultTypeTerm = primitiveTypeTermForTypeInfo(returnType)
val defaultValue = primitiveDefaultValue(returnType)
+ val nullCheckTerms = if(operands.size > 0) {
+ operands.map(_.nullTerm).mkString(" || ")
+ } else {
+ nullCheck + ""
+ }
--- End diff --
It seems that when operands.size == 0 and nullCheck is enable, the
`$nullTerm` will always be true, which means `$resultTerm` always be the
default value. That may be wrong.
---
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.
---