You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Evgeny Stanilovsky (Jira)" <ji...@apache.org> on 2021/09/24 12:26:00 UTC
[jira] [Updated] (IGNITE-15594) Calcite.
ArrayIndexOutOfBoundsException with left outer join on subquery.
[ https://issues.apache.org/jira/browse/IGNITE-15594?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Evgeny Stanilovsky updated IGNITE-15594:
----------------------------------------
Description:
{noformat}
# left outer join on subquery only involving RHS works
query TT
SELECT * FROM integers s1 LEFT OUTER JOIN integers s2 ON s1.i=s2.i AND (SELECT CASE WHEN s2.i>2 THEN TRUE ELSE FALSE END) ORDER BY s1.i NULLS FIRST;
----
NULL NULL
1 NULL
2 NULL
3 3
statement ok
CREATE TABLE tbl(a TINYINT, b SMALLINT, c INTEGER, d BIGINT, e VARCHAR, f DATE, g TIMESTAMP)
statement ok
INSERT INTO tbl VALUES (1, 2, 3, 4, '5', DATE '1992-01-01', TIMESTAMP '1992-01-01 00:00:00')
query TTTTTTTTTTTTTT
SELECT * FROM tbl t1 LEFT JOIN tbl t2 ON (SELECT t2.a)<100
----
1 2 3 4 5 1992-01-01 1992-01-01 00:00:00 1 2 3 4 5 1992-01-01 1992-01-01 00:00:0
{noformat}
{noformat}
/subquery/scalar/test_complex_correlated_subquery.test[_ignore]
{noformat}
{noformat}
[2021-09-24 14:35:07,214][WARN ][calciteQry-#147%srv1%][org.apache.ignite.internal.processors.query.calcite.exec.QueryTaskExecutorImplc{1}] Uncaught exception
class org.apache.ignite.IgniteException: Unexpected exception
at org.apache.ignite.internal.processors.query.calcite.exec.ExecutionContext.lambda$execute$0(ExecutionContext.java:309)
at org.apache.ignite.internal.processors.query.calcite.exec.QueryTaskExecutorImpl.lambda$execute$0(QueryTaskExecutorImpl.java:68)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 5
at org.apache.ignite.internal.processors.query.calcite.exec.ArrayRowHandler.get(ArrayRowHandler.java:36)
at org.apache.ignite.internal.processors.query.calcite.exec.ArrayRowHandler.get(ArrayRowHandler.java:27)
at SC.execute(Unknown Source)
{noformat}
was:
{noformat}
# left outer join on subquery only involving RHS works
query TT
SELECT * FROM integers s1 LEFT OUTER JOIN integers s2 ON s1.i=s2.i AND (SELECT CASE WHEN s2.i>2 THEN TRUE ELSE FALSE END) ORDER BY s1.i NULLS FIRST;
----
NULL NULL
1 NULL
2 NULL
3 3
{noformat}
{noformat}
/subquery/scalar/test_complex_correlated_subquery.test[_ignore]
{noformat}
{noformat}
[2021-09-24 14:35:07,214][WARN ][calciteQry-#147%srv1%][org.apache.ignite.internal.processors.query.calcite.exec.QueryTaskExecutorImplc{1}] Uncaught exception
class org.apache.ignite.IgniteException: Unexpected exception
at org.apache.ignite.internal.processors.query.calcite.exec.ExecutionContext.lambda$execute$0(ExecutionContext.java:309)
at org.apache.ignite.internal.processors.query.calcite.exec.QueryTaskExecutorImpl.lambda$execute$0(QueryTaskExecutorImpl.java:68)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 5
at org.apache.ignite.internal.processors.query.calcite.exec.ArrayRowHandler.get(ArrayRowHandler.java:36)
at org.apache.ignite.internal.processors.query.calcite.exec.ArrayRowHandler.get(ArrayRowHandler.java:27)
at SC.execute(Unknown Source)
{noformat}
> Calcite. ArrayIndexOutOfBoundsException with left outer join on subquery.
> -------------------------------------------------------------------------
>
> Key: IGNITE-15594
> URL: https://issues.apache.org/jira/browse/IGNITE-15594
> Project: Ignite
> Issue Type: Bug
> Components: sql
> Reporter: Evgeny Stanilovsky
> Priority: Major
> Labels: calcite, calcite2-required, calcite3-required, ignite-3
>
> {noformat}
> # left outer join on subquery only involving RHS works
> query TT
> SELECT * FROM integers s1 LEFT OUTER JOIN integers s2 ON s1.i=s2.i AND (SELECT CASE WHEN s2.i>2 THEN TRUE ELSE FALSE END) ORDER BY s1.i NULLS FIRST;
> ----
> NULL NULL
> 1 NULL
> 2 NULL
> 3 3
> statement ok
> CREATE TABLE tbl(a TINYINT, b SMALLINT, c INTEGER, d BIGINT, e VARCHAR, f DATE, g TIMESTAMP)
> statement ok
> INSERT INTO tbl VALUES (1, 2, 3, 4, '5', DATE '1992-01-01', TIMESTAMP '1992-01-01 00:00:00')
> query TTTTTTTTTTTTTT
> SELECT * FROM tbl t1 LEFT JOIN tbl t2 ON (SELECT t2.a)<100
> ----
> 1 2 3 4 5 1992-01-01 1992-01-01 00:00:00 1 2 3 4 5 1992-01-01 1992-01-01 00:00:0
> {noformat}
> {noformat}
> /subquery/scalar/test_complex_correlated_subquery.test[_ignore]
> {noformat}
> {noformat}
> [2021-09-24 14:35:07,214][WARN ][calciteQry-#147%srv1%][org.apache.ignite.internal.processors.query.calcite.exec.QueryTaskExecutorImplc{1}] Uncaught exception
> class org.apache.ignite.IgniteException: Unexpected exception
> at org.apache.ignite.internal.processors.query.calcite.exec.ExecutionContext.lambda$execute$0(ExecutionContext.java:309)
> at org.apache.ignite.internal.processors.query.calcite.exec.QueryTaskExecutorImpl.lambda$execute$0(QueryTaskExecutorImpl.java:68)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> at java.lang.Thread.run(Thread.java:748)
> Caused by: java.lang.ArrayIndexOutOfBoundsException: 5
> at org.apache.ignite.internal.processors.query.calcite.exec.ArrayRowHandler.get(ArrayRowHandler.java:36)
> at org.apache.ignite.internal.processors.query.calcite.exec.ArrayRowHandler.get(ArrayRowHandler.java:27)
> at SC.execute(Unknown Source)
> {noformat}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)