Shuo Cheng created FLINK-22148: ---------------------------------- Summary: Planner rules should use RexCall#equsls to check whether two rexCalls are equivalent Key: FLINK-22148 URL: https://issues.apache.org/jira/browse/FLINK-22148 Project: Flink Issue Type: Bug Components: Table SQL / Planner Affects Versions: 1.12.2 Reporter: Shuo Cheng Fix For: 1.13.0
Reproduce the bug by add the following test to `SemiAntiJoinTest` {code:java} // code placeholder @Test def testNotSimplifyJoinConditionWithSameDigest(): Unit = { val sqlQuery = """ |SELECT a |FROM l |WHERE c NOT IN ( | SELECT f FROM r WHERE f = c) |""".stripMargin util.verifyRelPlan(sqlQuery) } {code} CannotPlanException will be thrown, this is because Calcite planner will normalize a RexCall in the `equals` method (from 1.24), while in Flink planer rules, we still use toString to check two RexCalls are equivalent. -- This message was sent by Atlassian Jira (v8.3.4#803005)