[ 
https://issues.apache.org/jira/browse/CALCITE-5845?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17742759#comment-17742759
 ] 

LakeShen commented on CALCITE-5845:
-----------------------------------

Hi [~libenchao],this is a single test case for Presto,the code is 
:https://github.com/prestodb/presto/blob/1250341e05ac3b53f1d8146fe5808deb6e93c28a/presto-tests/src/main/java/com/facebook/presto/tests/AbstractTestDistributedQueries.java#L1015C5-L1020C1

Presto Sql Planner was able to pass this single test correctly. However, I have 
not encountered this case in the real scene.

I want to solve this problem in the underlying source code, but I don't have 
any ideas at the moment, if the solution cost is very large, maybe I can use 
your suggestion.

> select a very large predicate throw threw 'java.lang.StackOverflowError' 
> exception in SqlNode to RelNode phase
> --------------------------------------------------------------------------------------------------------------
>
>                 Key: CALCITE-5845
>                 URL: https://issues.apache.org/jira/browse/CALCITE-5845
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.34.0
>            Reporter: LakeShen
>            Priority: Major
>             Fix For: 1.36.0
>
>         Attachments: image-2023-07-13-16-10-19-643.png, 
> image-2023-07-13-16-17-37-600.png
>
>
> When I run an SQL and it selects a very large predicate that has one thousand 
> 1 = 1 predicate, all of them connected AND, the sql like this :
> {code:java}
> select 1 = 1 and 1 = 1 and 1 = 1 and 1 = 1 ......(one thousand 1 = 1){code}
> At the SqlNode to RelNode phase,Calcite throw StackOverflowError exception:
> !image-2023-07-13-16-10-19-643.png|width=949,height=186!



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to