Github user Xpray commented on a diff in the pull request:

    https://github.com/apache/flink/pull/5988#discussion_r187636169
  
    --- Diff: 
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/codegen/calls/CallGenerator.scala
 ---
    @@ -64,17 +65,28 @@ object CallGenerator {
     
         val (auxiliaryStmt, result) = call(operands.map(_.resultTerm))
     
    +    val nullTermCode = if (
    +      nullCheck &&
    +      isReference(returnType) &&
    +      !TypeCheckUtils.isTemporal(returnType)) {
    --- End diff --
    
    In flink we use primitive types such as 'long' in code generation while 
it's returnType is a time type with isReference is true, so I exclude it to 
avoid these cases like 
    long a;  if (a == null) {}


---

Reply via email to