You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Stephan Pirnbaum (Jira)" <ji...@apache.org> on 2020/03/24 07:28:00 UTC
[jira] [Created] (CALCITE-3869) Stackoverflow with large OR
statements
Stephan Pirnbaum created CALCITE-3869:
-----------------------------------------
Summary: Stackoverflow with large OR statements
Key: CALCITE-3869
URL: https://issues.apache.org/jira/browse/CALCITE-3869
Project: Calcite
Issue Type: Bug
Components: core
Affects Versions: 1.22.0
Reporter: Stephan Pirnbaum
Attachments: stackoverflow.txt
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:
{code:java}
@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();
}{code}
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.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)