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

When using Pyflink Table API, 'where' clause seems to work incorrectly

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.13.0
    • None
    • API / Python
    • None
    • Python 3.6.9, Pyflink 1.13.0, kafka2.12-2.4.0

    Description

      The UDF I used just returns a float, the first four data it returns 1.0, 2.0, 3.0 and 4.0, then it returns 0.0. I use 'where' in the sql to filter the 0.0 result. So the expected result I want to see in the kafka should be 1.0, 2.0, 3.0 and 4.0. However kafka consumer gives four 0.0.

      The sql is as follow:

      "insert into algorithmsink select dt.my_result from(select udf1(a) AS my_result from mysource) AS dt where dt.my_result > 0.0" (udf1 is my UDF)

      After I  removed the 'where dt.my_result > 0.0' part, it workd well. Kafka gave 1.0, 2.0, 3.0, 4.0, 0.0, 0.0, 0.0……

      Attachments

        1. sql_explain.txt
          3 kB
          TongMeng

        Activity

          People

            Unassigned Unassigned
            paranoia TongMeng
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: