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-4391) NullPointerException when comparing indexed column with result from a set operation
Date Tue, 13 Oct 2009 11:46:31 GMT

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

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

> Btw, I saw this inside setUnionResultExpression
>
>  /* DB2 requires both sides of union to have same name for the result to
>   * have that name. Otherwise, leave it or set it to a generated name */
>
> Wonder what the standard says about this?

Sounds like it's compliant. See SQL:2003, part 2, 7.13 <query expression>, syntax rules:

16) If a <query term> immediately contains a set operator, then:
    a) Let C be the <column name> of the i-th column of T1. If the <column name>
of the i-th column of T2
         is C, then the <column name> of the i-th column of TR is C; otherwise, the
<column name> of the i-th
         column of TR is implementation-dependent.

> NullPointerException when comparing indexed column with result from a set operation
> -----------------------------------------------------------------------------------
>
>                 Key: DERBY-4391
>                 URL: https://issues.apache.org/jira/browse/DERBY-4391
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.2.2.0, 10.3.3.0, 10.4.2.0, 10.5.3.0, 10.6.0.0
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>             Fix For: 10.6.0.0
>
>         Attachments: d4391-1a.diff, d4391-1a.stat, d4391-1b.diff
>
>
> I'm reporting this issue on behalf of Bernt M. Johnsen.
> If an indexed column is compared with a UNION query (or some other set operation), a
NullPointerException is raised, as can be seen by this sequence of statements in ij:
> ij> create table t(a int not null primary key, b int);
> 0 rows inserted/updated/deleted
> ij> select * from t where a < (values 4 union values 4);
> ERROR XJ001: Java exception: ': java.lang.NullPointerException'.

-- 
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