db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-4389) ArrayIndexOutOfBoundsException in RIGHT JOIN with COALESCE
Date Fri, 25 Sep 2009 21:21:16 GMT

    [ https://issues.apache.org/jira/browse/DERBY-4389?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12759750#action_12759750
] 

Knut Anders Hatlen commented on DERBY-4389:
-------------------------------------------

Stack trace for the assert failure:

org.apache.derby.shared.common.sanity.AssertFailure: ASSERT FAILED sourceResultSetNumber expected
to be >= 0 for T1.X
        at org.apache.derby.shared.common.sanity.SanityManager.THROWASSERT(SanityManager.java:162)
        at org.apache.derby.shared.common.sanity.SanityManager.THROWASSERT(SanityManager.java:147)
        at org.apache.derby.impl.sql.compile.ColumnReference.generateExpression(ColumnReference.java:941)
        at org.apache.derby.impl.sql.compile.CoalesceFunctionNode.generateExpression(CoalesceFunctionNode.java:262)
        at org.apache.derby.impl.sql.compile.BinaryOperatorNode.generateExpression(BinaryOperatorNode.java:600)
        at org.apache.derby.impl.sql.compile.ProjectRestrictNode.generateMinion(ProjectRestrictNode.java:1521)
        at org.apache.derby.impl.sql.compile.ProjectRestrictNode.generate(ProjectRestrictNode.java:1341)
        at org.apache.derby.impl.sql.compile.JoinNode.getJoinArguments(JoinNode.java:1588)
        at org.apache.derby.impl.sql.compile.JoinNode.generateCore(JoinNode.java:1566)
        at org.apache.derby.impl.sql.compile.JoinNode.generateCore(JoinNode.java:1503)
        at org.apache.derby.impl.sql.compile.HalfOuterJoinNode.generate(HalfOuterJoinNode.java:691)
        at org.apache.derby.impl.sql.compile.ProjectRestrictNode.generateMinion(ProjectRestrictNode.java:1390)
        at org.apache.derby.impl.sql.compile.ProjectRestrictNode.generate(ProjectRestrictNode.java:1341)
        at org.apache.derby.impl.sql.compile.ProjectRestrictNode.generateMinion(ProjectRestrictNode.java:1390)
        at org.apache.derby.impl.sql.compile.ProjectRestrictNode.generate(ProjectRestrictNode.java:1341)
        at org.apache.derby.impl.sql.compile.ScrollInsensitiveResultSetNode.generate(ScrollInsensitiveResultSetNode.java:109)
        at org.apache.derby.impl.sql.compile.CursorNode.generate(CursorNode.java:623)
        at org.apache.derby.impl.sql.compile.StatementNode.generate(StatementNode.java:347)
        at org.apache.derby.impl.sql.GenericStatement.prepMinion(GenericStatement.java:458)
        at org.apache.derby.impl.sql.GenericStatement.prepare(GenericStatement.java:88)
        at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(GenericLanguageConnectionContext.java:824)
        at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:606)
        at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:555)

> ArrayIndexOutOfBoundsException in RIGHT JOIN with COALESCE
> ----------------------------------------------------------
>
>                 Key: DERBY-4389
>                 URL: https://issues.apache.org/jira/browse/DERBY-4389
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.0.2.1, 10.1.3.1, 10.2.2.0, 10.3.3.0, 10.4.2.0, 10.5.3.0, 10.6.0.0
>            Reporter: Knut Anders Hatlen
>
> Dag H. Wanvik identified this problematic query in DERBY-4342:
> ij> create table t(x int, y int);
> 0 rows inserted/updated/deleted
> ij> insert into t values (1,2);
> 1 row inserted/updated/deleted
> ij> select * from t t1 right join t t2 on t1.x=t2.x where coalesce(t1.x,t1.y) = 1;
> ERROR 38000: The exception 'java.lang.ArrayIndexOutOfBoundsException: -1' was thrown
while evaluating an expression.
> ERROR XJ001: Java exception: '-1: java.lang.ArrayIndexOutOfBoundsException'.
> With a debug build, an assert failure is raised instead:
> ij> select * from t t1 right join t t2 on t1.x=t2.x where coalesce(t1.x,t1.y) = 1;
> ERROR XJ001: Java exception: 'ASSERT FAILED sourceResultSetNumber expected to be >=
0 for T1.X: org.apache.derby.shared.common.sanity.AssertFailure'.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message