flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-9332) Fix Codegen error of CallGenerator
Date Fri, 11 May 2018 14:45:00 GMT

    [ https://issues.apache.org/jira/browse/FLINK-9332?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16472023#comment-16472023
] 

ASF GitHub Bot commented on FLINK-9332:
---------------------------------------

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) {}


> Fix Codegen error of CallGenerator  
> ------------------------------------
>
>                 Key: FLINK-9332
>                 URL: https://issues.apache.org/jira/browse/FLINK-9332
>             Project: Flink
>          Issue Type: Bug
>          Components: Table API &amp; SQL
>            Reporter: Ruidong Li
>            Assignee: Ruidong Li
>            Priority: Major
>
> function call may return null, but nullTerm did not handle it correctly.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message