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

IF FUNCTION is FALSE and the false_value parameter is a function, then an exception will be thrown

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 1.17.1
    • 1.16.3, 1.17.2
    • None

    Description

      It is successful to execute certain functions individually.

      SELECT SPLIT_INDEX('TEST:ABC', ':', 0); 

       

      And it is also successful for these functions to be located in the true_value parameter of the IF function.

      SELECT IF(2>1, SPLIT_INDEX('TEST:ABC', ':', 1), 'FALSE'); 

       

      Only when these functions are located in the false_value parameter of the IF function, an exception will be thrown.

       func1.

      SELECT IF(2>1, 'TRUE', SPLIT_INDEX('TEST:ABC', ':', 0)); 

      func2. 

      SELECT IF(2>1, 'TRUE', LOWER('TEST')); 


       
      And it is also successful for CASE function

      SELECT CASE WHEN 2=1 THEN 'TRUE' ELSE SPLIT_INDEX('TEST:ABC', ':', 0) END; 

      Attachments

        1. flink-1.17.1_logs_jarieshan_20230630.tgz
          26 kB
          Han Zhuo
        2. image-2023-06-30-15-02-13-197.png
          6 kB
          Han Zhuo
        3. image-2023-06-30-15-02-26-099.png
          23 kB
          Han Zhuo
        4. image-2023-06-30-15-02-57-082.png
          6 kB
          Han Zhuo
        5. image-2023-06-30-15-07-08-588.png
          37 kB
          Han Zhuo
        6. image-2023-06-30-15-09-44-623.png
          36 kB
          Han Zhuo
        7. image-2023-06-30-15-10-08-619.png
          7 kB
          Han Zhuo
        8. image-2023-06-30-15-13-56-625.png
          320 kB
          Han Zhuo
        9. image-2023-06-30-15-14-21-038.png
          320 kB
          Han Zhuo

        Activity

          People

            Unassigned Unassigned
            jarieshan Han Zhuo
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: