[ https://issues.apache.org/jira/browse/FLINK-33597?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17788053#comment-17788053 ]
Dawid Wysakowicz commented on FLINK-33597: ------------------------------------------ Yes, we would need a custom RexSimplify. Until recently we had that though. > There was some recent discussion about nested fields and nullability. Maybe > this is fixed in current master already? Do you have any pointers to the discussions? I can't see any changes that would help us. I am aware of https://issues.apache.org/jira/browse/FLINK-31349 but this talks about ROW constructor and as far as I can tell does not touch the {{GET}} behaviour. > 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)