[ https://issues.apache.org/jira/browse/FLINK-33597?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17791152#comment-17791152 ]
Timo Walther commented on FLINK-33597: -------------------------------------- Thanks for linking the issue [~lincoln.86xy]. Yes, this was the issue I was talking about. Seems we are trying to solve the same issue. I remember this was an issue multiple times in the past. If we can solve it with a minimal fix that would definitely be preferred over a full blown FLIP but I will read the linked issue in more detail and join the discussion. > Can not use a nested column for a join condition > ------------------------------------------------ > > Key: FLINK-33597 > URL: https://issues.apache.org/jira/browse/FLINK-33597 > Project: Flink > Issue Type: Bug > Components: Table SQL / Planner > Reporter: Dawid Wysakowicz > Assignee: Dawid Wysakowicz > Priority: Major > Fix For: 1.19.0 > > > Query: > {code} > SELECT A.after.CUSTOMER_ID FROM `CUSTOMERS` A INNER JOIN `PRODUCTS` B ON > A.after.CUSTOMER_ID = B.after.PURCHASER; > {code} > fails with: > {code} > java.lang.RuntimeException: Error while applying rule > FlinkProjectWatermarkAssignerTransposeRule, args > [rel#411017:LogicalProject.NONE.any.None: > 0.[NONE].[NONE](input=RelSubset#411016,exprs=[$2, $2.CUSTOMER_ID]), > rel#411015:LogicalWatermarkAssigner.NONE.any.None: > 0.[NONE].[NONE](input=RelSubset#411014,rowtime=$rowtime,watermark=SOURCE_WATERMARK())] > at > org.apache.calcite.plan.volcano.VolcanoRuleCall.onMatch(VolcanoRuleCall.java:250) > ... > Caused by: java.lang.IllegalArgumentException: Type mismatch: > rel rowtype: RecordType(RecordType:peek_no_expand(INTEGER NOT NULL > CUSTOMER_ID, VARCHAR(2147483647) CHARACTER SET "UTF-16LE" CUSTOMER_NAME, > VARCHAR(2147483647) CHARACTER SET "UTF-16LE" TITLE, INTEGER DOB) after, > INTEGER $f8) NOT NULL > equiv rowtype: RecordType(RecordType:peek_no_expand(INTEGER NOT NULL > CUSTOMER_ID, VARCHAR(2147483647) CHARACTER SET "UTF-16LE" CUSTOMER_NAME, > VARCHAR(2147483647) CHARACTER SET "UTF-16LE" TITLE, INTEGER DOB) after, > INTEGER NOT NULL $f8) NOT NULL > Difference: > $f8: INTEGER -> INTEGER NOT NULL > at > org.apache.calcite.plan.volcano.VolcanoPlanner.register(VolcanoPlanner.java:592) > at > org.apache.calcite.plan.volcano.VolcanoPlanner.ensureRegistered(VolcanoPlanner.java:613) > at > org.apache.calcite.plan.volcano.VolcanoRuleCall.transformTo(VolcanoRuleCall.java:144) > ... 50 more > {code} -- This message was sent by Atlassian Jira (v8.20.10#820010)