You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Ignite TC Bot (Jira)" <ji...@apache.org> on 2025/06/17 18:35:00 UTC

[jira] [Commented] (IGNITE-25258) Calcite engine. Subquery dependent on two tables can't be planned

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

Ignite TC Bot commented on IGNITE-25258:
----------------------------------------

{panel:title=Branch: [pull/12111/head] Base: [master] : No blockers found!|borderStyle=dashed|borderColor=#ccc|titleBGColor=#D6F7C1}{panel}
{panel:title=Branch: [pull/12111/head] Base: [master] : New Tests (3)|borderStyle=dashed|borderColor=#ccc|titleBGColor=#D6F7C1}
{color:#00008b}Calcite SQL{color} [[tests 3|https://ci2.ignite.apache.org/viewLog.html?buildId=8484374]]
* {color:#013220}IgniteCalciteTestSuite: CorrelatesIntegrationTest.testTwoTablesCorrelatedSubquery[sqlTxMode=NONE] - PASSED{color}
* {color:#013220}IgniteCalciteTestSuite: CorrelatesIntegrationTest.testTwoTablesCorrelatedSubquery[sqlTxMode=RANDOM] - PASSED{color}
* {color:#013220}IgniteCalciteTestSuite: CorrelatesIntegrationTest.testTwoTablesCorrelatedSubquery[sqlTxMode=ALL] - PASSED{color}

{panel}
[TeamCity *--&gt; Run :: All* Results|https://ci2.ignite.apache.org/viewLog.html?buildId=8455556&amp;buildTypeId=IgniteTests24Java8_RunAll]

> Calcite engine. Subquery dependent on two tables can't be planned
> -----------------------------------------------------------------
>
>                 Key: IGNITE-25258
>                 URL: https://issues.apache.org/jira/browse/IGNITE-25258
>             Project: Ignite
>          Issue Type: Bug
>            Reporter: Aleksey Plekhanov
>            Assignee: Aleksey Plekhanov
>            Priority: Major
>              Labels: calcite, ise
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> Reproducer:
> {code:java}
>     @Test
>     public void testSubqueryWithTwoDependentTables() throws Exception {
>         IgniteSchema schema = createSchema(
>             createTable("T1", IgniteDistributions.single(), "ID", Integer.class, "REF", Integer.class),
>             createTable("T2", IgniteDistributions.single(), "ID", Integer.class, "REF", Integer.class),
>             createTable("T3", IgniteDistributions.single(), "ID1", Integer.class, "ID2", Integer.class)
>         );
>         assertPlan("SELECT * FROM T1 JOIN T2 ON (T1.ID = T2.ID) " +
>                 "WHERE NOT EXISTS (SELECT 1 FROM T3 WHERE T3.ID1 = T1.REF AND T3.ID2 = T2.REF)", schema,
>             nodeOrAnyChild(isTableScan("T3")));
>     }
> {code}
> Throws an exception:
> {noformat}
> Caused by: java.lang.AssertionError: All correlation variables should resolve to the same namespace. Prev ns=org.apache.calcite.sql.validate.IdentifierNamespace@5fac9c8f, new ns=org.apache.calcite.sql.validate.IdentifierNamespace@558b73eb
> 	at org.apache.calcite.sql2rel.SqlToRelConverter.getCorrelationUse(SqlToRelConverter.java:3074) ~[calcite-core-1.37.0.jar:1.37.0]
> 	at org.apache.calcite.sql2rel.SqlToRelConverter.access$1900(SqlToRelConverter.java:241) ~[calcite-core-1.37.0.jar:1.37.0]
> 	at org.apache.calcite.sql2rel.SqlToRelConverter$Blackboard.convertExpression(SqlToRelConverter.java:5526) ~[calcite-core-1.37.0.jar:1.37.0]
> 	at org.apache.calcite.sql2rel.StandardConvertletTable.convertOperands(StandardConvertletTable.java:1125) ~[calcite-core-1.37.0.jar:1.37.0]
> 	at org.apache.calcite.sql2rel.StandardConvertletTable.convertOperands(StandardConvertletTable.java:1117) ~[calcite-core-1.37.0.jar:1.37.0]
> 	at org.apache.calcite.sql2rel.StandardConvertletTable.convertCall(StandardConvertletTable.java:1070) ~[calcite-core-1.37.0.jar:1.37.0]
> 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
> 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
> 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
> 	at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
> 	at org.apache.calcite.sql2rel.ReflectiveConvertletTable.lambda$registerNodeTypeMethod$1(ReflectiveConvertletTable.java:95) ~[calcite-core-1.37.0.jar:1.37.0]
> 	... 31 more
> {noformat}



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