[jira] [Updated] (IGNITE-8639) Query with a lot of nesting causes NPE in org.h2.util.StringUtils.indent
[ https://issues.apache.org/jira/browse/IGNITE-8639?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Vladimir Ozerov updated IGNITE-8639: Fix Version/s: 2.8 > Query with a lot of nesting causes NPE in org.h2.util.StringUtils.indent > > > Key: IGNITE-8639 > URL: https://issues.apache.org/jira/browse/IGNITE-8639 > Project: Ignite > Issue Type: Bug > Components: sql >Affects Versions: 2.6 >Reporter: Ilya Kasnacheev >Assignee: Taras Ledkov >Priority: Minor > Labels: test > Fix For: 2.8 > > Attachments: SqlNestedQuerySelfTest.java > > > Worked in 1.7! > But now: > {code} > sql("WITH cacheJoin (txId, stage, tStamp)" + > " AS (SELECT t.txId, o.stage, o.tStamp FROM txs t INNER JOIN > ops o ON t.txId = o.txId)" + > " SELECT ou.stage, COUNT(*) as cou, SUM(CASE WHEN ou.stage = > in.stage THEN 1 ELSE 0 END) AS ttl" + > " FROM (SELECT txId, stage FROM cacheJoin cte GROUP BY txId, > stage) ou" + > " INNER JOIN (SELECT mx.txId, mx.stage FROM (SELECT txId, > tStamp, stage FROM cacheJoin cte) mx" + > " INNER JOIN (SELECT txId, MAX(tStamp) AS maxTStamp FROM > cacheJoin cte GROUP BY txId) mix" + > " ON mx.txId = mix.txId AND mx.tStamp = mix.maxTStamp) in > ON ou.txId = in.txId" + > " GROUP BY ou.stage"); > {code} > {code} > class org.apache.ignite.internal.processors.query.IgniteSQLException: Failed > to parse query. Внутренняя ошибка: "java.lang.NullPointerException" > General error: "java.lang.NullPointerException" [5-195] > at > org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.prepareStatementAndCaches(IgniteH2Indexing.java:2026) > at > org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.parseAndSplit(IgniteH2Indexing.java:1796) > at > org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.querySqlFields(IgniteH2Indexing.java:1652) > at > org.apache.ignite.internal.processors.query.GridQueryProcessor$4.applyx(GridQueryProcessor.java:2035) > at > org.apache.ignite.internal.processors.query.GridQueryProcessor$4.applyx(GridQueryProcessor.java:2030) > at > org.apache.ignite.internal.util.lang.IgniteOutClosureX.apply(IgniteOutClosureX.java:36) > at > org.apache.ignite.internal.processors.query.GridQueryProcessor.executeQuery(GridQueryProcessor.java:2578) > at > org.apache.ignite.internal.processors.query.GridQueryProcessor.querySqlFields(GridQueryProcessor.java:2044) > at > org.apache.ignite.internal.processors.query.GridQueryProcessor.querySqlFields(GridQueryProcessor.java:1990) > at > org.apache.ignite.internal.processors.query.SqlNestedQuerySelfTest.sql(SqlNestedQuerySelfTest.java:73) > at > org.apache.ignite.internal.processors.query.SqlNestedQuerySelfTest.testNestingQuery(SqlNestedQuerySelfTest.java:54) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at junit.framework.TestCase.runTest(TestCase.java:176) > at > org.apache.ignite.testframework.junits.GridAbstractTest.runTestInternal(GridAbstractTest.java:2086) > at > org.apache.ignite.testframework.junits.GridAbstractTest.access$000(GridAbstractTest.java:140) > at > org.apache.ignite.testframework.junits.GridAbstractTest$5.run(GridAbstractTest.java:2001) > at java.lang.Thread.run(Thread.java:748) > Caused by: org.h2.jdbc.JdbcSQLException: Внутренняя ошибка: > "java.lang.NullPointerException" > General error: "java.lang.NullPointerException" [5-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.IgniteH2Indexing.prepare0(IgniteH2Indexing.java:484) > at > org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.prepareStatement(IgniteH2Indexing.java:452) > at > org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.prepareStatement(IgniteH2Indexing.java:419) > at > org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.prepareStatementAndCaches(IgniteH2Indexing.java:2
[jira] [Updated] (IGNITE-8639) Query with a lot of nesting causes NPE in org.h2.util.StringUtils.indent
[ https://issues.apache.org/jira/browse/IGNITE-8639?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ilya Kasnacheev updated IGNITE-8639: Attachment: SqlNestedQuerySelfTest.java > Query with a lot of nesting causes NPE in org.h2.util.StringUtils.indent > > > Key: IGNITE-8639 > URL: https://issues.apache.org/jira/browse/IGNITE-8639 > Project: Ignite > Issue Type: Bug > Components: sql >Affects Versions: 2.6 >Reporter: Ilya Kasnacheev >Priority: Minor > Labels: test > Attachments: SqlNestedQuerySelfTest.java > > > Worked in 1.7! > But now: > {code} > sql("WITH cacheJoin (txId, stage, tStamp)" + > " AS (SELECT t.txId, o.stage, o.tStamp FROM txs t INNER JOIN > ops o ON t.txId = o.txId)" + > " SELECT ou.stage, COUNT(*) as cou, SUM(CASE WHEN ou.stage = > in.stage THEN 1 ELSE 0 END) AS ttl" + > " FROM (SELECT txId, stage FROM cacheJoin cte GROUP BY txId, > stage) ou" + > " INNER JOIN (SELECT mx.txId, mx.stage FROM (SELECT txId, > tStamp, stage FROM cacheJoin cte) mx" + > " INNER JOIN (SELECT txId, MAX(tStamp) AS maxTStamp FROM > cacheJoin cte GROUP BY txId) mix" + > " ON mx.txId = mix.txId AND mx.tStamp = mix.maxTStamp) in > ON ou.txId = in.txId" + > " GROUP BY ou.stage"); > {code} > {code} > class org.apache.ignite.internal.processors.query.IgniteSQLException: Failed > to parse query. Внутренняя ошибка: "java.lang.NullPointerException" > General error: "java.lang.NullPointerException" [5-195] > at > org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.prepareStatementAndCaches(IgniteH2Indexing.java:2026) > at > org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.parseAndSplit(IgniteH2Indexing.java:1796) > at > org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.querySqlFields(IgniteH2Indexing.java:1652) > at > org.apache.ignite.internal.processors.query.GridQueryProcessor$4.applyx(GridQueryProcessor.java:2035) > at > org.apache.ignite.internal.processors.query.GridQueryProcessor$4.applyx(GridQueryProcessor.java:2030) > at > org.apache.ignite.internal.util.lang.IgniteOutClosureX.apply(IgniteOutClosureX.java:36) > at > org.apache.ignite.internal.processors.query.GridQueryProcessor.executeQuery(GridQueryProcessor.java:2578) > at > org.apache.ignite.internal.processors.query.GridQueryProcessor.querySqlFields(GridQueryProcessor.java:2044) > at > org.apache.ignite.internal.processors.query.GridQueryProcessor.querySqlFields(GridQueryProcessor.java:1990) > at > org.apache.ignite.internal.processors.query.SqlNestedQuerySelfTest.sql(SqlNestedQuerySelfTest.java:73) > at > org.apache.ignite.internal.processors.query.SqlNestedQuerySelfTest.testNestingQuery(SqlNestedQuerySelfTest.java:54) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at junit.framework.TestCase.runTest(TestCase.java:176) > at > org.apache.ignite.testframework.junits.GridAbstractTest.runTestInternal(GridAbstractTest.java:2086) > at > org.apache.ignite.testframework.junits.GridAbstractTest.access$000(GridAbstractTest.java:140) > at > org.apache.ignite.testframework.junits.GridAbstractTest$5.run(GridAbstractTest.java:2001) > at java.lang.Thread.run(Thread.java:748) > Caused by: org.h2.jdbc.JdbcSQLException: Внутренняя ошибка: > "java.lang.NullPointerException" > General error: "java.lang.NullPointerException" [5-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.IgniteH2Indexing.prepare0(IgniteH2Indexing.java:484) > at > org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.prepareStatement(IgniteH2Indexing.java:452) > at > org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.prepareStatement(IgniteH2Indexing.java:419) > at > org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.prepareStatementAndCaches(IgniteH2Indexing.java:2008) > ... 19 more > Caused by: java.l