ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Taras Ledkov (Jira)" <j...@apache.org>
Subject [jira] [Created] (IGNITE-13339) Sql query fails with NullPointerException caused by calling CAST in order by clause
Date Fri, 07 Aug 2020 08:46:00 GMT
Taras Ledkov created IGNITE-13339:
-------------------------------------

             Summary: Sql query fails with NullPointerException caused by calling CAST in
order by clause
                 Key: IGNITE-13339
                 URL: https://issues.apache.org/jira/browse/IGNITE-13339
             Project: Ignite
          Issue Type: Test
          Components: sql
    Affects Versions: 2.8.1
            Reporter: Taras Ledkov
            Assignee: Taras Ledkov
             Fix For: 2.9


Sql statements to reproduce:

CREATE TABLE Person(ID INTEGER PRIMARY KEY, NAME VARCHAR(100));
INSERT INTO Person(ID, NAME) VALUES (1, 'Ed'), (2, 'Ann'), (3, 'Emma');
select name,id from Person order by CAST(id as long)

Result:

{code:java}
javax.cache.CacheException: class org.apache.ignite.IgniteCheckedException: null
	at org.apache.ignite.internal.processors.query.GridQueryProcessor.executeQuerySafe(GridQueryProcessor.java:2572)
	at org.apache.ignite.internal.processors.query.GridQueryProcessor.querySqlFields(GridQueryProcessor.java:2505)
	at org.apache.ignite.internal.processors.query.GridQueryProcessor.querySqlFields(GridQueryProcessor.java:2463)
	at org.apache.ignite.internal.visor.query.VisorQueryUtils.lambda$scheduleQueryStart$0(VisorQueryUtils.java:409)
	at org.apache.ignite.internal.util.IgniteUtils.wrapThreadLoader(IgniteUtils.java:7157)
	at org.apache.ignite.internal.processors.closure.GridClosureProcessor$1.body(GridClosureProcessor.java:826)
	at org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:119)
	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: class org.apache.ignite.IgniteCheckedException: null
	at org.apache.ignite.internal.processors.query.GridQueryProcessor.executeQuery(GridQueryProcessor.java:3050)
	at org.apache.ignite.internal.processors.query.GridQueryProcessor.lambda$querySqlFields$1(GridQueryProcessor.java:2531)
	at org.apache.ignite.internal.processors.query.GridQueryProcessor.executeQuerySafe(GridQueryProcessor.java:2569)
	... 9 more
Caused by: java.lang.NullPointerException
	at org.apache.ignite.internal.processors.query.h2.sql.GridSqlFunction.getSQL(GridSqlFunction.java:124)
	at org.apache.ignite.internal.processors.query.h2.sql.GridSqlQuery.getSortLimitSQL(GridSqlQuery.java:171)
	at org.apache.ignite.internal.processors.query.h2.sql.GridSqlSelect.getSQL(GridSqlSelect.java:182)
	at org.apache.ignite.internal.processors.query.h2.sql.GridSqlQuerySplitter.splitQuery(GridSqlQuerySplitter.java:371)
	at org.apache.ignite.internal.processors.query.h2.sql.GridSqlQuerySplitter.split0(GridSqlQuerySplitter.java:280)
	at org.apache.ignite.internal.processors.query.h2.sql.GridSqlQuerySplitter.split(GridSqlQuerySplitter.java:212)
	at org.apache.ignite.internal.processors.query.h2.QueryParser.parseH2(QueryParser.java:501)
	at org.apache.ignite.internal.processors.query.h2.QueryParser.parse0(QueryParser.java:173)
	at org.apache.ignite.internal.processors.query.h2.QueryParser.parse(QueryParser.java:132)
	at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.querySqlFields(IgniteH2Indexing.java:1115)
	at org.apache.ignite.internal.processors.query.GridQueryProcessor$4.applyx(GridQueryProcessor.java:2515)
	at org.apache.ignite.internal.processors.query.GridQueryProcessor$4.applyx(GridQueryProcessor.java:2511)
	at org.apache.ignite.internal.util.lang.IgniteOutClosureX.apply(IgniteOutClosureX.java:35)
	at org.apache.ignite.internal.processors.query.GridQueryProcessor.executeQuery(GridQueryProcessor.java:3027)
	... 11 more
{code}




--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Mime
View raw message