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] Updated: (DERBY-4342) SQLSTATE 38000 (NullPointerException) at inner self join and value(x1, x2...)
Date Fri, 25 Sep 2009 14:12:16 GMT

     [ https://issues.apache.org/jira/browse/DERBY-4342?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Knut Anders Hatlen updated DERBY-4342:

    Attachment: derby-4342-1a.diff

As far as I can see, all node types that have arguments or operands override ValueNode.remapColumnReferencesToExpressions()
so that it is called recursively on all arguments/operands. I haven't been able to find anything
indicating that the method was left out of CFN intentionally. The javadoc comment in ValueNode
says that it should remap "all ColumnReferences in this tree", so calling it recursively on
the arguments on CFN sounds like the right thing to do.

I therefore believe that the suggested change in CoalesceFunctionNode is the correct fix for
this issue, and the assert failure in the right outer join is probably a different bug. (Note
also that a similar NPE with a right outer join, but without VALUE/COALESCE, has been logged
as DERBY-4388.)

The attached patch adds the missing method override to CoalesceFunctionNode, and it also adds
a regression test case to CoalesceTest.

> SQLSTATE 38000 (NullPointerException) at inner self join and value(x1, x2...)
> -----------------------------------------------------------------------------
>                 Key: DERBY-4342
>                 URL: https://issues.apache.org/jira/browse/DERBY-4342
>             Project: Derby
>          Issue Type: Bug
>    Affects Versions:,,,,,,,,,,
>         Environment: WINXP
>            Reporter: Hubert Garm
>            Assignee: Knut Anders Hatlen
>         Attachments: derby-4342-1a.diff
> create table xyz (c1 int, c2 int);
> insert into xyz values(1,2);
> select * from xyz t1 inner join xyz t2 on t1.c1 = t2.c1 where value(t1.c1, t1.c2) = 1;
> causes the following error:
> FEHLER 38000: Bei der Auswertung eines Ausdrucks wurde die Ausnahme 'java.lang.NullPointerException'
> FEHLER XJ001: Java-Ausnahme: ': java.lang.NullPointerException'.

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

View raw message