[ https://issues.apache.org/jira/browse/IGNITE-13159?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Taras Ledkov updated IGNITE-13159: ---------------------------------- Labels: calcite3-required (was: calcite2-required calcite3-required) > 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 > Assignee: Stanilovsky Evgeny > Priority: Minor > Labels: calcite3-required > Time Spent: 20m > Remaining Estimate: 0h > > Now Calcite SqlToRelConverter throws an exception if found a subquery in > ALL\SOME operator. See SubqueryRewriteRuleTest.testNonAllToSemiAntiJoinRule > 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)