[
https://issues.apache.org/jira/browse/IGNITE-13159?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Andrey Mashenkov updated IGNITE-13159:
--------------------------------------
Description:
Now Calcite SqlToRelConverter throws an exception if found a subquery in
ALL\SOME operator. See SubqueryRewriteRuleTest.testNonInToSemiAntiJoinRule test
and find stack trace below.
We have to either set flag "expand=false" and implement LogicalCorrelate
converter
or some rules to overcome the issue.
However, setting flag "expand=false" makes query pass, but with wrong join type
(left and inner instead of anti) and moreover it brakes other queries due to
weird decorrelator behavior. Possibly there is bug in Calcite.
{code:java}
Caused by: java.lang.RuntimeException: ALL is only supported if expand =
falseCaused by: java.lang.RuntimeException: ALL is only supported if expand =
false at
org.apache.calcite.sql2rel.SqlToRelConverter$Blackboard.convertExpression(SqlToRelConverter.java:4814)
at
org.apache.calcite.sql2rel.SqlToRelConverter.convertWhere(SqlToRelConverter.java:1016)
at
org.apache.calcite.sql2rel.SqlToRelConverter.convertSelectImpl(SqlToRelConverter.java:662)
at
org.apache.calcite.sql2rel.SqlToRelConverter.convertSelect(SqlToRelConverter.java:640)
at
org.apache.calcite.sql2rel.SqlToRelConverter.convertQueryRecursive(SqlToRelConverter.java:3384)
at
org.apache.calcite.sql2rel.SqlToRelConverter.convertQuery(SqlToRelConverter.java:566)
at
org.apache.ignite.internal.processors.query.calcite.prepare.IgnitePlanner.rel(IgnitePlanner.java:203)
at
org.apache.ignite.internal.processors.query.calcite.exec.ExecutionServiceImpl.optimize(ExecutionServiceImpl.java:618)
at
org.apache.ignite.internal.processors.query.calcite.exec.ExecutionServiceImpl.prepareExplain(ExecutionServiceImpl.java:644)
at
org.apache.ignite.internal.processors.query.calcite.exec.ExecutionServiceImpl.prepareSingle(ExecutionServiceImpl.java:573)
at
org.apache.ignite.internal.processors.query.calcite.exec.ExecutionServiceImpl.prepare0(ExecutionServiceImpl.java:531)
... 16 more
{code}
was:
Now Calcite SqlToRelConverter throws an exception if found a subquery in
ALL\SOME operator. See SubqueryRewriteRuleTest.testNonInToSemiAntiJoinRule test
and find stack trace below.
We have to either set flag "expand=false" and implement LogicalCorrelate
converter
or some rules to overcome the issue.
However, setting flag "expand=false" makes query pass, but with wrong join type
(left and inner instead of anti) and moreover it brakes other queries due to
weird decorrelator behavior. Possibly there is bug in Calcite.
{code:java}
Caused by: java.lang.RuntimeException: ALL is only supported if expand =
falseCaused by: java.lang.RuntimeException: ALL is only supported if expand =
false at
org.apache.calcite.sql2rel.SqlToRelConverter$Blackboard.convertExpression(SqlToRelConverter.java:4814)
at
org.apache.calcite.sql2rel.SqlToRelConverter.convertWhere(SqlToRelConverter.java:1016)
at
org.apache.calcite.sql2rel.SqlToRelConverter.convertSelectImpl(SqlToRelConverter.java:662)
at
org.apache.calcite.sql2rel.SqlToRelConverter.convertSelect(SqlToRelConverter.java:640)
at
org.apache.calcite.sql2rel.SqlToRelConverter.convertQueryRecursive(SqlToRelConverter.java:3384)
at
org.apache.calcite.sql2rel.SqlToRelConverter.convertQuery(SqlToRelConverter.java:566)
at
org.apache.ignite.internal.processors.query.calcite.prepare.IgnitePlanner.rel(IgnitePlanner.java:203)
at
org.apache.ignite.internal.processors.query.calcite.exec.ExecutionServiceImpl.optimize(ExecutionServiceImpl.java:618)
at
org.apache.ignite.internal.processors.query.calcite.exec.ExecutionServiceImpl.prepareExplain(ExecutionServiceImpl.java:644)
at
org.apache.ignite.internal.processors.query.calcite.exec.ExecutionServiceImpl.prepareSingle(ExecutionServiceImpl.java:573)
at
org.apache.ignite.internal.processors.query.calcite.exec.ExecutionServiceImpl.prepare0(ExecutionServiceImpl.java:531)
... 16 more
{code}
> Calcite integration. Decorrelator support SOME and ALL operator.
> ----------------------------------------------------------------
>
> Key: IGNITE-13159
> URL: https://issues.apache.org/jira/browse/IGNITE-13159
> Project: Ignite
> Issue Type: Bug
> Reporter: Andrey Mashenkov
> Priority: Major
>
> Now Calcite SqlToRelConverter throws an exception if found a subquery in
> ALL\SOME operator. See SubqueryRewriteRuleTest.testNonInToSemiAntiJoinRule
> test and find stack trace below.
> We have to either set flag "expand=false" and implement LogicalCorrelate
> converter
> or some rules to overcome the issue.
> However, setting flag "expand=false" makes query pass, but with wrong join
> type (left and inner instead of anti) and moreover it brakes other queries
> due to weird decorrelator behavior. Possibly there is bug in Calcite.
> {code:java}
> Caused by: java.lang.RuntimeException: ALL is only supported if expand =
> falseCaused by: java.lang.RuntimeException: ALL is only supported if expand =
> false at
> org.apache.calcite.sql2rel.SqlToRelConverter$Blackboard.convertExpression(SqlToRelConverter.java:4814)
> at
> org.apache.calcite.sql2rel.SqlToRelConverter.convertWhere(SqlToRelConverter.java:1016)
> at
> org.apache.calcite.sql2rel.SqlToRelConverter.convertSelectImpl(SqlToRelConverter.java:662)
> at
> org.apache.calcite.sql2rel.SqlToRelConverter.convertSelect(SqlToRelConverter.java:640)
> at
> org.apache.calcite.sql2rel.SqlToRelConverter.convertQueryRecursive(SqlToRelConverter.java:3384)
> at
> org.apache.calcite.sql2rel.SqlToRelConverter.convertQuery(SqlToRelConverter.java:566)
> at
> org.apache.ignite.internal.processors.query.calcite.prepare.IgnitePlanner.rel(IgnitePlanner.java:203)
> at
> org.apache.ignite.internal.processors.query.calcite.exec.ExecutionServiceImpl.optimize(ExecutionServiceImpl.java:618)
> at
> org.apache.ignite.internal.processors.query.calcite.exec.ExecutionServiceImpl.prepareExplain(ExecutionServiceImpl.java:644)
> at
> org.apache.ignite.internal.processors.query.calcite.exec.ExecutionServiceImpl.prepareSingle(ExecutionServiceImpl.java:573)
> at
> org.apache.ignite.internal.processors.query.calcite.exec.ExecutionServiceImpl.prepare0(ExecutionServiceImpl.java:531)
> ... 16 more
> {code}
>
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)