ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roman Shtykh (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (IGNITE-7622) SQL: Subquery fails in non-collocated mode
Date Mon, 05 Feb 2018 09:00:03 GMT

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

Roman Shtykh commented on IGNITE-7622:
--------------------------------------

Added the code to reproduce.

> SQL: Subquery fails in non-collocated mode
> ------------------------------------------
>
>                 Key: IGNITE-7622
>                 URL: https://issues.apache.org/jira/browse/IGNITE-7622
>             Project: Ignite
>          Issue Type: Bug
>          Components: sql
>    Affects Versions: 2.3
>            Reporter: Roman Shtykh
>            Priority: Major
>         Attachments: TPCH_Q8.java
>
>
> When trying to execute query 8 from TPC-H benchmarks with a non-collocated mode, I get
_java.lang.ArrayIndexOutOfBoundsException_.
> {noformat}
> General error: "java.lang.ArrayIndexOutOfBoundsException" [50000-195]
>     at org.h2.message.DbException.getJdbcSQLException(DbException.java:345)
>     at org.h2.message.DbException.get(DbException.java:168)
>     at org.h2.message.DbException.convert(DbException.java:295)
>     at org.h2.message.DbException.toSQLException(DbException.java:268)
>     at org.h2.message.TraceObject.logAndConvert(TraceObject.java:352)
>     at org.h2.jdbc.JdbcConnection.prepareStatement(JdbcConnection.java:292)
>     at org.apache.ignite.internal.processors.query.h2.sql.GridSqlQuerySplitter.optimize(GridSqlQuerySplitter.java:1627)
>     at org.apache.ignite.internal.processors.query.h2.sql.GridSqlQuerySplitter.split(GridSqlQuerySplitter.java:236)
>     at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.queryDistributedSqlFields(IgniteH2Indexing.java:1307)
>     ... 17 more
> Caused by: java.lang.ArrayIndexOutOfBoundsException
>     at java.lang.System.arraycopy(Native Method)
>     at org.apache.ignite.internal.processors.query.h2.opt.GridH2CollocationModel.childFilters(GridH2CollocationModel.java:227)
>     at org.apache.ignite.internal.processors.query.h2.opt.GridH2CollocationModel.buildCollocationModel(GridH2CollocationModel.java:689)
>     at org.apache.ignite.internal.processors.query.h2.opt.GridH2IndexBase.getDistributedMultiplier(GridH2IndexBase.java:295)
>     at org.apache.ignite.internal.processors.query.h2.opt.GridH2PrimaryScanIndex.getCost(GridH2PrimaryScanIndex.java:76)
>     at org.h2.table.Table.getBestPlanItem(Table.java:708)
>     at org.h2.table.TableFilter.getBestPlanItem(TableFilter.java:221)
>     at org.h2.table.Plan.calculateCost(Plan.java:123)
>     at org.h2.command.dml.Optimizer.calculateBruteForceSome(Optimizer.java:142)
>     at org.h2.command.dml.Optimizer.calculateBestPlan(Optimizer.java:87)
>     at org.h2.command.dml.Optimizer.optimize(Optimizer.java:244)
>     at org.h2.command.dml.Select.preparePlan(Select.java:1002)
>     at org.h2.command.dml.Select.prepare(Select.java:865)
>     at org.h2.command.Parser.prepare(Parser.java:242)
>     at org.h2.engine.Session.prepare(Session.java:538)
>     at org.h2.index.ViewIndex.prepareSubQuery(ViewIndex.java:176)
>     at org.h2.index.ViewIndex.getQuery(ViewIndex.java:312)
>     at org.h2.index.ViewIndex.<init>(ViewIndex.java:104)
>     at org.h2.table.TableView.getBestPlanItem(TableView.java:248)
>     at org.h2.table.TableView.getScanIndex(TableView.java:459)
>     at org.h2.table.TableFilter.getBestPlanItem(TableFilter.java:202)
>     at org.h2.table.Plan.calculateCost(Plan.java:123)
>     at org.h2.command.dml.Optimizer.testPlan(Optimizer.java:185)
>     at org.h2.command.dml.Optimizer.calculateBestPlan(Optimizer.java:81)
>     at org.h2.command.dml.Optimizer.optimize(Optimizer.java:244)
>     at org.h2.command.dml.Select.preparePlan(Select.java:1002)
>     at org.h2.command.dml.Select.prepare(Select.java:865)
>     at org.h2.command.Parser.prepareCommand(Parser.java:262)
>     at org.h2.engine.Session.prepareLocal(Session.java:573)
>     at org.h2.engine.Session.prepareCommand(Session.java:514)
>     at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1204)
>     at org.h2.jdbc.JdbcPreparedStatement.<init>(JdbcPreparedStatement.java:73)
>     at org.h2.jdbc.JdbcConnection.prepareStatement(JdbcConnection.java:288)
>     ... 20 more{noformat}
> I realize that for such queries collocation has to be done, but it should probably produce
a hint or an error with better explanations.



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

Mime
View raw message