[ https://issues.apache.org/jira/browse/CALCITE-4364?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17727374#comment-17727374 ]
Xin Chen commented on CALCITE-4364: ----------------------------------- Thank you for above descriptions! But I currently hava a question about "simplify”. Simplification seem to not take into account that the specified field is of array type. In other words,it can simplify "a = 1 AND a = 2" to "false",but can not simplify “a = [1,2] AND a = [2,3]” to "false". Obviously, was there no consideration given to the field type being an array?I found this issue while debugging the Flink SQL task. Link to https://issues.apache.org/jira/browse/FLINK-32188. Thank you for answer! > Simplify "a IN (1, 2) AND a = 1" to "a = 1" > ------------------------------------------- > > Key: CALCITE-4364 > URL: https://issues.apache.org/jira/browse/CALCITE-4364 > Project: Calcite > Issue Type: Bug > Components: core > Affects Versions: 1.26.0 > Reporter: Danny Chen > Assignee: Danny Chen > Priority: Major > Labels: pull-request-available > Fix For: 1.27.0 > > Time Spent: 7h 20m > Remaining Estimate: 0h > > Calcite should simplify "\{{a IN (1, 2) AND a = 1}}" to "\{{a = 1}}". Check > this test in {{RexProgramTest}}: > {code:java} > @Test void testSimplifyInAnd() { > // deptno in (20, 10) and deptno = 10 > // ==> > // deptno = 10 > final RexNode e = > and( > in(vInt(), literal(20), literal(10)), > eq(vInt(), literal(10))); > checkSimplify(e, "=(?0.int0, 10)"); > } > {code} -- This message was sent by Atlassian Jira (v8.20.10#820010)