[
https://issues.apache.org/jira/browse/DERBY-5313?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13450743#comment-13450743
]
Mamta A. Satoor commented on DERBY-5313:
----------------------------------------
I ran the ij script on top of the trunk and saw the assert failure. I tried it
in on top of 10.4 codeline which is 10.4.2.1 and saw the same failure there as
well. Knut, did it not reproduce for you say on 10.4 codeline?
The complete stack trace on trunk is as follows
ERROR XJ001: Java exception: 'ASSERT FAILED retVN expected to be instanceof
ColumnReference, not org.apache.derby.impl.sql.compile.ConditionalNode:
org.apache.derby.shared.common.sanity.AssertFailure'.
java.sql.SQLException: Java exception: 'ASSERT FAILED retVN expected to be
instanceof ColumnReference, not
org.apache.derby.impl.sql.compile.ConditionalNode:
org.apache.derby.shared.common.sanity.AssertFailure'.
at
org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(SQLExceptionFactory40.java:98)
at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Util.java:142)
at org.apache.derby.impl.jdbc.Util.javaException(Util.java:299)
at
org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(TransactionResourceImpl.java:436)
at
org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(TransactionResourceImpl.java:353)
at
org.apache.derby.impl.jdbc.EmbedConnection.handleException(EmbedConnection.java:2363)
at
org.apache.derby.impl.jdbc.ConnectionChild.handleException(ConnectionChild.java:82)
at
org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:619)
at
org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:559)
at org.apache.derby.impl.tools.ij.ij.executeImmediate(ij.java:367)
at org.apache.derby.impl.tools.ij.utilMain.doCatch(utilMain.java:527)
at
org.apache.derby.impl.tools.ij.utilMain.runScriptGuts(utilMain.java:369)
at org.apache.derby.impl.tools.ij.utilMain.go(utilMain.java:245)
at org.apache.derby.impl.tools.ij.Main.go(Main.java:229)
at org.apache.derby.impl.tools.ij.Main.mainCore(Main.java:184)
at org.apache.derby.impl.tools.ij.Main.main(Main.java:75)
at org.apache.derby.tools.ij.main(ij.java:59)
Caused by: java.sql.SQLException: Java exception: 'ASSERT FAILED retVN expected
to be instanceof ColumnReference, not
org.apache.derby.impl.sql.compile.ConditionalNode:
org.apache.derby.shared.common.sanity.AssertFailure'.
at
org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:42)
at
org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(SQLExceptionFactory40.java:122)
at
org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(SQLExceptionFactory40.java:71)
... 16 more
Caused by: org.apache.derby.shared.common.sanity.AssertFailure: ASSERT FAILED
retVN expected to be instanceof ColumnReference, not
org.apache.derby.impl.sql.compile.ConditionalNode
at
org.apache.derby.shared.common.sanity.SanityManager.ASSERT(SanityManager.java:120)
at
org.apache.derby.impl.sql.compile.GroupByList.remapColumnReferencesToExpressions(GroupByList.java:290)
at
org.apache.derby.impl.sql.compile.JoinNode.flatten(JoinNode.java:1482)
at
org.apache.derby.impl.sql.compile.FromList.flattenFromTables(FromList.java:763)
at
org.apache.derby.impl.sql.compile.SelectNode.preprocess(SelectNode.java:1094)
at
org.apache.derby.impl.sql.compile.DMLStatementNode.optimizeStatement(DMLStatementNode.java:302)
at
org.apache.derby.impl.sql.compile.CursorNode.optimizeStatement(CursorNode.java:591)
at
org.apache.derby.impl.sql.GenericStatement.prepMinion(GenericStatement.java:457)
at
org.apache.derby.impl.sql.GenericStatement.prepare(GenericStatement.java:99)
at
org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(GenericLanguageConnectionContext.java:1103)
at
org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:610)
> Assert failure with CASE expression in GROUP BY clause
> ------------------------------------------------------
>
> Key: DERBY-5313
> URL: https://issues.apache.org/jira/browse/DERBY-5313
> Project: Derby
> Issue Type: Bug
> Components: SQL
> Affects Versions: 10.5.3.0, 10.6.1.0, 10.6.2.1, 10.7.1.1, 10.8.1.2
> Reporter: Knut Anders Hatlen
> Labels: derby_triage10_9
>
> I see the following assert failure with debug jars on 10.5.3.0 and later
> (doesn't fail on 10.5.1.1 and earlier):
> ij> create table t(x int);
> 0 rows inserted/updated/deleted
> ij> insert into t values 1;
> 1 row inserted/updated/deleted
> ij> select case when a=1 then 1 else 2 end
> from t t1(a) join t t2(b) on a=b
> group by case when a=1 then 1 else 2 end;
> ERROR XJ001: Java exception: 'ASSERT FAILED retVN expected to be instanceof
> ColumnReference, not org.apache.derby.impl.sql.compile.ConditionalNode:
> org.apache.derby.shared.common.sanity.AssertFailure'.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira