[jira] [Created] (CALCITE-2722) SqlImplementor createLeftCall method throws StackOverflowError

2018-12-03 Thread Mykola Zerniuk (JIRA)
Mykola Zerniuk created CALCITE-2722:
---

 Summary: SqlImplementor createLeftCall method throws 
StackOverflowError
 Key: CALCITE-2722
 URL: https://issues.apache.org/jira/browse/CALCITE-2722
 Project: Calcite
  Issue Type: Bug
  Components: core
Reporter: Mykola Zerniuk
Assignee: Julian Hyde


SqlImplementor _createLeftCall_ method is implemented using recursion. In this 
case if sql has a lot of AND or OR operators it throws StackOverflowError.
{code:java}
Caused by: java.lang.StackOverflowError
at org.apache.calcite.util.Util.skipLast(Util.java:1940)
at org.apache.calcite.util.Util.skipLast(Util.java:1935)
at 
org.apache.calcite.rel.rel2sql.SqlImplementor$Context.createLeftCall(SqlImplementor.java:763)
at 
org.apache.calcite.rel.rel2sql.SqlImplementor$Context.createLeftCall(SqlImplementor.java:765)
at 
org.apache.calcite.rel.rel2sql.SqlImplementor$Context.createLeftCall(SqlImplementor.java:765){code}
Since calcite converts IN list to OR this bug is also reproduces on huge IN 
list.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Closed] (CALCITE-2706) Do not make IN conversion

2018-11-26 Thread Mykola Zerniuk (JIRA)


 [ 
https://issues.apache.org/jira/browse/CALCITE-2706?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mykola Zerniuk closed CALCITE-2706.
---
Resolution: Duplicate

> Do not make IN conversion
> -
>
> Key: CALCITE-2706
> URL: https://issues.apache.org/jira/browse/CALCITE-2706
> Project: Calcite
>  Issue Type: Bug
>Reporter: Mykola Zerniuk
>Assignee: Julian Hyde
>Priority: Major
>
> We current have only two options with IN operator handling - replace it with 
> ORs or sub-queries depending on the inSubQueryThreshold. Add third option to 
> prevent any conversions and leave IN `as is`.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CALCITE-2706) Do not make IN conversion

2018-11-26 Thread Mykola Zerniuk (JIRA)


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

Mykola Zerniuk commented on CALCITE-2706:
-

 Yes, sorry. Let's to continue discussion there.

> Do not make IN conversion
> -
>
> Key: CALCITE-2706
> URL: https://issues.apache.org/jira/browse/CALCITE-2706
> Project: Calcite
>  Issue Type: Bug
>Reporter: Mykola Zerniuk
>Assignee: Julian Hyde
>Priority: Major
>
> We current have only two options with IN operator handling - replace it with 
> ORs or sub-queries depending on the inSubQueryThreshold. Add third option to 
> prevent any conversions and leave IN `as is`.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)