[ https://issues.apache.org/jira/browse/FLINK-32969?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lyn Zhang updated FLINK-32969: ------------------------------ Description: If Functions will cause NullPointException when the third param is other function. h1. Example: {code:java} CREATE TABLE source ( name STRING , score INT ) WITH ( 'connector' = 'socket', 'hostname' = 'localhost:9999', 'port' = '9999', 'byte-delimiter' = '10', 'format' = 'json' );CREATE TABLE print( name STRING, score INT ) WITH ('connector' = 'print');INSERT INTO print SELECT IF(name = 'aa', 'null', CONCAT(name,'x')) ,score FROM source;{code} -- {"name":"aa","score":10} h1. Code Generator Result [^if_function_codegen.java] !image-2023-08-28-10-55-26-228.png! was: If Functions will cause NullPointException when the third param is other function. h1. Example: {code:java} CREATE TABLE source ( name STRING , score INT ) WITH ( 'connector' = 'socket', 'hostname' = 'localhost:9999', 'port' = '9999', 'byte-delimiter' = '10', 'format' = 'json' );CREATE TABLE print( name STRING, score INT ) WITH ('connector' = 'print');INSERT INTO print SELECT IF(name = 'aa', 'null', CONCAT(name,'x')) ,score FROM source; -- {"name":"aa","score":10} {code} h1. Code Generator Result [^if_function_codegen.java] !image-2023-08-28-10-55-26-228.png! > IfCallGen NullPointException Bug > -------------------------------- > > Key: FLINK-32969 > URL: https://issues.apache.org/jira/browse/FLINK-32969 > Project: Flink > Issue Type: Bug > Components: Table SQL / Planner > Affects Versions: 1.17.1 > Reporter: Lyn Zhang > Priority: Major > Attachments: if_function_codegen.java, > image-2023-08-28-10-55-26-228.png > > > If Functions will cause NullPointException when the third param is other > function. > h1. Example: > {code:java} > CREATE TABLE source ( > name STRING , > score INT > ) WITH ( > 'connector' = 'socket', > 'hostname' = 'localhost:9999', > 'port' = '9999', > 'byte-delimiter' = '10', > 'format' = 'json' > );CREATE TABLE print( > name STRING, > score INT > ) WITH ('connector' = 'print');INSERT INTO print > SELECT IF(name = 'aa', 'null', CONCAT(name,'x')) > ,score > FROM source;{code} > -- {"name":"aa","score":10} > h1. Code Generator Result > [^if_function_codegen.java] > !image-2023-08-28-10-55-26-228.png! -- This message was sent by Atlassian Jira (v8.20.10#820010)