You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Jingsong Lee (Jira)" <ji...@apache.org> on 2020/02/20 03:00:00 UTC

[jira] [Commented] (FLINK-16181) IfCallGen will throw NPE for primitive types in blink

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

Jingsong Lee commented on FLINK-16181:
--------------------------------------

Thanks [~libenchao] for reporting.

You are right, it is a bug. We should deal with nullTerms. Do you want to fix this?

> IfCallGen will throw NPE for primitive types in blink
> -----------------------------------------------------
>
>                 Key: FLINK-16181
>                 URL: https://issues.apache.org/jira/browse/FLINK-16181
>             Project: Flink
>          Issue Type: Bug
>            Reporter: Benchao Li
>            Priority: Major
>
> It can be reproduced by a simple test case:
> Add below to {{ScalarOperatorsTest}}
> {code:java}
> testSqlApi("IF(true, CAST('non-numeric' AS BIGINT), 0)", "null")
> {code}
>  
> IMO, it's {{IfCallGen}}'s bug, which should judge the nullTerm of operands first before assignment.
> cc [~lzljs3620320] [~jark]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)