You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by wuchong <gi...@git.apache.org> on 2016/06/29 15:32:13 UTC

[GitHub] flink pull request #2182: [Flink-4130] CallGenerator could generate illegal ...

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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---