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

Init lookup join failed when use udf on lookup table

    XMLWordPrintableJSON

    Details

      Description

      Throw exception

      Caused by: scala.MatchError: (CONCAT(_UTF-16LE'Hello', $2),_UTF-16LE'Hello,Jark':VARCHAR(2147483647) CHARACTER SET "UTF-16LE") (of class scala.Tuple2)
      	at org.apache.flink.table.planner.plan.nodes.common.CommonLookupJoin.org$apache$flink$table$planner$plan$nodes$common$CommonLookupJoin$$extractConstantField(CommonLookupJoin.scala:617)
      	at org.apache.flink.table.planner.plan.nodes.common.CommonLookupJoin.extractConstantFieldsFromEquiCondition(CommonLookupJoin.scala:607)
      	at org.apache.flink.table.planner.plan.nodes.common.CommonLookupJoin.analyzeLookupKeys(CommonLookupJoin.scala:567)
      	at org.apache.flink.table.planner.plan.nodes.common.CommonLookupJoin.<init>(CommonLookupJoin.scala:129)
      	at org.apache.flink.table.planner.plan.nodes.physical.stream.StreamExecLookupJoin.<init>(StreamExecLookupJoin.scala:49)
      

      SQL:

      SELECT
        T.id, T.len, T.content, D.name 
      FROM 
        T JOIN userTable for system_time as of T.proctime AS D 
      ON T.id = D.id 
      WHERE 
        add(T.id, D.id) > 3 AND add(T.id, 2) > 3 AND CONCAT('Hello', D.name) = 'Hello,Jark'
      

      When use function a RexCall can't match RexInputRef and cause this error, myabe shoud add condition"case _ => return" to skip this.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jark Jark Wu
                Reporter:
                liuyufei YufeiLiu
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: