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

flink sql The custom function in ROW type is executed multiple times

    XMLWordPrintableJSON

Details

    Description

      val tableA = tableEnv.sqlQuery("select custom_func(a) as a, custom_func(b) as b from tableS")

      tableEnv.registerTable("tableA", tableA)

      val tableB = tableEnv.sqlQuery("select ROW(a, b) as body from tableA")

      tableEnv.registerTable("tableB", tableB)

      val tableC = tableEnv.sqlQuery("select body.a, body.b from tableB")

      In this logic, the custom_func is executed four times

      tableC === select Row(custom_func(a) as a, custom_func(b) as b).a, Row(custom_func(a) as a, custom_func(b) as b).b from tableS

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: