[ https://issues.apache.org/jira/browse/FLINK-32969?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lyn Zhang updated FLINK-32969: ------------------------------ Attachment: image-2023-08-28-10-55-26-228.png if_function_codegen.java Component/s: Table SQL / Planner Affects Version/s: 1.17.1 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' = 'host.docker.internal', '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} h1. Code Generator Result [^if_function_codegen.java] !image-2023-08-28-10-55-26-228.png! Summary: IfCallGen NullPointException Bug (was: IfCallGen Bug) > 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' = 'host.docker.internal', > '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} > 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)