db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yip Ng (JIRA)" <j...@apache.org>
Subject [jira] Updated: (DERBY-2008) NullPointerException with 2-argument SUBSTR() call in GROUP BY clause.
Date Sun, 29 Oct 2006 08:16:17 GMT
     [ http://issues.apache.org/jira/browse/DERBY-2008?page=all ]

Yip Ng updated DERBY-2008:
--------------------------

    Fix Version/s: 10.3.0.0

> NullPointerException with 2-argument SUBSTR() call in GROUP BY clause.
> ----------------------------------------------------------------------
>
>                 Key: DERBY-2008
>                 URL: http://issues.apache.org/jira/browse/DERBY-2008
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.2.1.6, 10.3.0.0
>            Reporter: A B
>         Assigned To: Yip Ng
>            Priority: Minor
>             Fix For: 10.3.0.0
>
>         Attachments: derby2008-trunk-diff01.txt, derby2008-trunk-stat01.txt
>
>
> The following query, which fails with a syntax error in 10.1.3 (because functions are
not allowed in a GROUP BY expression for 10.1) fails with a NullPointerException in 10.2 and
in the codeline (10.3):
> create table dt (vc varchar(30)); 
> insert into dt values ('1928-09-21'), ('1903-12-08'); 
> select substr(vc, 3) from dt group by substr(vc, 3); 
> Result (on trunk) is:
> java.lang.NullPointerException
> 	at org.apache.derby.impl.sql.compile.TernaryOperatorNode.isEquivalent(TernaryOperatorNode.java:924)
> 	at org.apache.derby.impl.sql.compile.GroupByList.findGroupingColumn(GroupByList.java:244)
> 	at org.apache.derby.impl.sql.compile.VerifyAggregateExpressionsVisitor.skipChildren(VerifyAggregateExpressionsVisitor.java:146)
> 	at org.apache.derby.impl.sql.compile.TernaryOperatorNode.accept(TernaryOperatorNode.java:497)
> 	at org.apache.derby.impl.sql.compile.ResultColumn.accept(ResultColumn.java:1515)
> 	at org.apache.derby.impl.sql.compile.QueryTreeNodeVector.accept(QueryTreeNodeVector.java:159)
> 	at org.apache.derby.impl.sql.compile.SelectNode.bindExpressions(SelectNode.java:619)
> 	at org.apache.derby.impl.sql.compile.FromSubquery.bindExpressions(FromSubquery.java:262)
> 	at org.apache.derby.impl.sql.compile.FromList.bindExpressions(FromList.java:337)
> 	at org.apache.derby.impl.sql.compile.SelectNode.bindExpressions(SelectNode.java:500)
> 	at org.apache.derby.impl.sql.compile.DMLStatementNode.bindExpressions(DMLStatementNode.java:249)
> 	at org.apache.derby.impl.sql.compile.DMLStatementNode.bind(DMLStatementNode.java:162)
> 	at org.apache.derby.impl.sql.compile.CursorNode.bind(CursorNode.java:253)
> 	at org.apache.derby.impl.sql.GenericStatement.prepMinion(GenericStatement.java:345)
> 	at org.apache.derby.impl.sql.GenericStatement.prepare(GenericStatement.java:119)
> 	at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(GenericLanguageConnectionContext.java:745)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:568)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:517)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message