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

Null point exception when non-native udf used in join condition

    XMLWordPrintableJSON

Details

    Description

      Any non-native udf used in hive-parser join condition. 

      It will caused NullPointException.

      It can reproduced by follow code by adding this test to 

      org.apache.flink.connectors.hive.HiveDialectQueryITCase

       

      // Add follow code to org.apache.flink.connectors.hive.HiveDialectQueryITCase
      @Test
      public void testUdfInJoinCondition() throws Exception {
          List<Row> result = CollectionUtil.iteratorToList(tableEnv.executeSql(
                  "select foo.y, bar.I from bar join foo on hiveudf(foo.x) = bar.I where bar.I > 1").collect());
          assertThat(result.toString())
                  .isEqualTo("[+I[2, 2]]");
      } 

      Attachments

        Activity

          People

            yunfanfighting@foxmail.com yunfan
            yunfanfighting@foxmail.com yunfan
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: