Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
Query in this test returns the wrong result (it returns empty result):
@Test @Ignore public void testWhereInOr() throws Exception { CalciteAssert.hr() .query("select \"empid\"\n" + "from \"hr\".\"emps\" t\n" + " where (\"empid\" in (select \"empid\" from \"hr\".\"emps\") \n" + " or \"empid\" in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, " + " 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25) )\n" + " and \"empid\" in (100, 200, 150)") .returns("empid=100\n" + "empid=200\n" + "empid=150\n"); }
Without condition in or operator
\"empid\" in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25)
it returns the right result.
Attachments
Issue Links
- is duplicated by
-
CALCITE-2103 error logical plan when size of In-list connected with OR exceeds inSubQueryThreshold
- Closed
- is related to
-
CALCITE-1483 Suboptimal plan for NOT IN query
- Closed
-
CALCITE-4887 Filter subQuery remove not fully optimized
- Open