YufeiLiu created FLINK-18212:
--------------------------------
Summary: Init lookup join failed when use udf on lookup table
Key: FLINK-18212
URL:
https://issues.apache.org/jira/browse/FLINK-18212 Project: Flink
Issue Type: Bug
Components: Table SQL / Planner
Affects Versions: 1.10.1
Reporter: YufeiLiu
Throw exception
{code}
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)
{code}
SQL:
{code: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'
{code}
When use function a RexCall can't match RexInputRef and cause this error, myabe shoud add {{case _ => return}} to skip this.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)