Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-32969

IfCallGen NullPointException Bug

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.17.1
    • 1.18.0
    • Table SQL / Planner
    • None

    Description

      If Function will cause NullPointException when the third param is a udf.

      Example:

      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 Generator Result

      if_function_codegen.java

      Exception Stack

      Attachments

        1. if_function_codegen.java
          7 kB
          Lyn Zhang
        2. image-2023-08-28-10-55-26-228.png
          166 kB
          Lyn Zhang
        3. image-2023-08-28-11-02-03-842.png
          234 kB
          Lyn Zhang

        Activity

          People

            Unassigned Unassigned
            zicat Lyn Zhang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: