Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
1.22.0
-
None
-
None
Description
As described in CALCITE-2792 large OR clauses lead to a StackOverflowError. While the ticket was closed with the remark "Resolved in release 1.22.0", the issue originally stated was not (completely) resolved. To reproduce this, I implemented following simple test case:
@Test public void testLargeOr() { String orClause = IntStream.range(0, 1000).boxed() .map(i -> "e.\"empid\"=" + i) .collect(Collectors.joining(" OR ")); final String sql = "SELECT * FROM \"hr\".\"emps\" e WHERE " + orClause; CalciteAssert.model(JdbcTest.HR_MODEL) .query(sql) .runs(); }
The stackoverflow can be seen in the attached log.
As also CALCITE-2696 and CALCITE-2630 are not fixed, this is a blocking issue in our current use case.