You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Aleksey Plekhanov (Jira)" <ji...@apache.org> on 2022/09/30 10:39:00 UTC
[jira] [Updated] (IGNITE-16053) Calcite. Some kind of CROSS JOIN based queries can`t be parsed.
[ https://issues.apache.org/jira/browse/IGNITE-16053?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Aleksey Plekhanov updated IGNITE-16053:
---------------------------------------
Labels: calcite calcite3-required ignite-3 (was: calcite calcite2-required calcite3-required ignite-3)
> Calcite. Some kind of CROSS JOIN based queries can`t be parsed.
> ---------------------------------------------------------------
>
> Key: IGNITE-16053
> URL: https://issues.apache.org/jira/browse/IGNITE-16053
> Project: Ignite
> Issue Type: Bug
> Components: sql
> Reporter: Evgeny Stanilovsky
> Assignee: Aleksey Plekhanov
> Priority: Major
> Labels: calcite, calcite3-required, ignite-3
> Fix For: 2.15
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> Queries like attached can`t be planned.
> /modules/calcite/src/test/sql/sqlite/aggregates/agg1.test_ignored
> {noformat}
> statement ok
> CREATE TABLE tab0(col0 INTEGER, col1 INTEGER, col2 INTEGER)
> statement ok
> CREATE TABLE tab1(col0 INTEGER, col1 INTEGER, col2 INTEGER)
> statement ok
> CREATE TABLE tab2(col0 INTEGER, col1 INTEGER, col2 INTEGER)
> statement ok
> INSERT INTO tab0 VALUES(97,1,99)
> query I rowsort
> SELECT - 92 AS col1 FROM ( tab1 AS cor0 CROSS JOIN tab2 AS cor1 )
> ----
> 9 values hashing to 1af709a79a3e56281ffdce4d931d5965
> query I rowsort
> SELECT - 13 FROM ( tab2 cor0 CROSS JOIN tab2 AS cor1 )
> ----
> 9 values hashing to e95f5f4bd0f480397cced5f5e8a23792
> query I rowsort
> SELECT ALL + - 37 AS col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
> ----
> 9 values hashing to ed4644af7729c2425ea6cc3d84c6504f
> {noformat}
> {noformat}
> Caused by: class org.apache.ignite.internal.processors.query.IgniteSQLException: Failed to parse query.
> at org.apache.ignite.internal.processors.query.calcite.util.Commons.parse(Commons.java:207)
> at org.apache.ignite.internal.processors.query.calcite.CalciteQueryProcessor.query(CalciteQueryProcessor.java:339)
> at org.apache.ignite.internal.processors.query.calcite.logical.SqlScriptRunner.sql(SqlScriptRunner.java:149)
> at org.apache.ignite.internal.processors.query.calcite.logical.SqlScriptRunner.access$600(SqlScriptRunner.java:58)
> at org.apache.ignite.internal.processors.query.calcite.logical.SqlScriptRunner$Query.execute(SqlScriptRunner.java:570)
> ... 3 more
> Caused by: org.apache.calcite.sql.parser.SqlParseException: Non-query expression encountered in illegal context
> at org.apache.ignite.internal.processors.query.calcite.sql.IgniteSqlParserImpl.convertException(IgniteSqlParserImpl.java:397)
> at org.apache.ignite.internal.processors.query.calcite.sql.IgniteSqlParserImpl.normalizeException(IgniteSqlParserImpl.java:161)
> at org.apache.calcite.sql.parser.SqlParser.handleException(SqlParser.java:145)
> at org.apache.calcite.sql.parser.SqlParser.parseStmtList(SqlParser.java:200)
> at org.apache.ignite.internal.processors.query.calcite.util.Commons.parse(Commons.java:222)
> at org.apache.ignite.internal.processors.query.calcite.util.Commons.parse(Commons.java:204)
> ... 7 more
> Caused by: org.apache.calcite.runtime.CalciteException: Non-query expression encountered in illegal context
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
> at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
> at org.apache.calcite.runtime.Resources$ExInstWithCause.ex(Resources.java:505)
> at org.apache.calcite.runtime.Resources$ExInst.ex(Resources.java:599)
> at org.apache.calcite.sql.SqlUtil.newContextException(SqlUtil.java:932)
> at org.apache.calcite.sql.SqlUtil.newContextException(SqlUtil.java:917)
> at org.apache.ignite.internal.processors.query.calcite.sql.IgniteSqlParserImpl.checkNonQueryExpression(IgniteSqlParserImpl.java:320)
> at org.apache.ignite.internal.processors.query.calcite.sql.IgniteSqlParserImpl.Expression3(IgniteSqlParserImpl.java:4471)
> at org.apache.ignite.internal.processors.query.calcite.sql.IgniteSqlParserImpl.Expression2b(IgniteSqlParserImpl.java:4163)
> at org.apache.ignite.internal.processors.query.calcite.sql.IgniteSqlParserImpl.Expression2(IgniteSqlParserImpl.java:4204)
> at org.apache.ignite.internal.processors.query.calcite.sql.IgniteSqlParserImpl.Expression(IgniteSqlParserImpl.java:4134)
> at org.apache.ignite.internal.processors.query.calcite.sql.IgniteSqlParserImpl.LeafQueryOrExpr(IgniteSqlParserImpl.java:4116)
> at org.apache.ignite.internal.processors.query.calcite.sql.IgniteSqlParserImpl.QueryOrExpr(IgniteSqlParserImpl.java:4038)
> at org.apache.ignite.internal.processors.query.calcite.sql.IgniteSqlParserImpl.OrderedQueryOrExpr(IgniteSqlParserImpl.java:513)
> at org.apache.ignite.internal.processors.query.calcite.sql.IgniteSqlParserImpl.ParenthesizedExpression(IgniteSqlParserImpl.java:632)
> at org.apache.ignite.internal.processors.query.calcite.sql.IgniteSqlParserImpl.TableRef2(IgniteSqlParserImpl.java:2700)
> at org.apache.ignite.internal.processors.query.calcite.sql.IgniteSqlParserImpl.TableRef(IgniteSqlParserImpl.java:2641)
> at org.apache.ignite.internal.processors.query.calcite.sql.IgniteSqlParserImpl.FromClause(IgniteSqlParserImpl.java:2542)
> at org.apache.ignite.internal.processors.query.calcite.sql.IgniteSqlParserImpl.SqlSelect(IgniteSqlParserImpl.java:1783)
> at org.apache.ignite.internal.processors.query.calcite.sql.IgniteSqlParserImpl.LeafQuery(IgniteSqlParserImpl.java:601)
> at org.apache.ignite.internal.processors.query.calcite.sql.IgniteSqlParserImpl.LeafQueryOrExpr(IgniteSqlParserImpl.java:4119)
> at org.apache.ignite.internal.processors.query.calcite.sql.IgniteSqlParserImpl.QueryOrExpr(IgniteSqlParserImpl.java:4038)
> at org.apache.ignite.internal.processors.query.calcite.sql.IgniteSqlParserImpl.OrderedQueryOrExpr(IgniteSqlParserImpl.java:513)
> at org.apache.ignite.internal.processors.query.calcite.sql.IgniteSqlParserImpl.SqlStmt(IgniteSqlParserImpl.java:956)
> at org.apache.ignite.internal.processors.query.calcite.sql.IgniteSqlParserImpl.SqlStmtList(IgniteSqlParserImpl.java:906)
> at org.apache.ignite.internal.processors.query.calcite.sql.IgniteSqlParserImpl.parseSqlStmtList(IgniteSqlParserImpl.java:213)
> at org.apache.calcite.sql.parser.SqlParser.parseStmtList(SqlParser.java:198)
> ... 9 more
> {noformat}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)