Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.26.0
Description
Calcite should simplify "a IN (1, 2) AND a = 1" to "a = 1". Check this test in RexProgramTest:
@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)"); }
Attachments
Issue Links
- causes
-
FLINK-19811 FlinkRexUtil#simplify should simplify search in conjunctions
- Closed
- depends upon
-
CALCITE-4352 RelBuilder/RexSimplify/Sarg incorrectly transforms complex expressions with IS NULL/IS NOT NULL
- Closed
- duplicates
-
CALCITE-4365 SEARCHes in ANDs and ORs cannot be simplified if the complexity of its SARG can actually be reduced to 1
- Closed
- links to