You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Knut Anders Hatlen (JIRA)" <ji...@apache.org> on 2009/10/05 17:40:31 UTC

[jira] Commented: (DERBY-4380) SOME not allowed in ON clause

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

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

Here's a stripped down repro for the NPEs seen in the lojreorder test with the patch:

ij> create table t(x int);
0 rows inserted/updated/deleted
ij> insert into t values 1;
1 row inserted/updated/deleted
ij> select * from t t1 right join t t2 on 1=1 and t1.x in (select a.x from t a left join t b on 1=0 where a.x=b.x);
X          |X          
-----------------------
ERROR 38000: The exception 'java.lang.NullPointerException' was thrown while evaluating an expression.
ERROR XJ001: Java exception: ': java.lang.NullPointerException'.
ij> select * from t t1 right join t t2 on 1=1 and t1.x >= ALL (select a.x from t a left join t b on 1=0 where a.x=b.x);
X          |X          
-----------------------
ERROR 38000: The exception 'java.lang.NullPointerException' was thrown while evaluating an expression.
ERROR XJ001: Java exception: ': java.lang.NullPointerException'.

> SOME not allowed in ON clause
> -----------------------------
>
>                 Key: DERBY-4380
>                 URL: https://issues.apache.org/jira/browse/DERBY-4380
>             Project: Derby
>          Issue Type: Bug
>          Components: Store
>            Reporter: Bernt M. Johnsen
>         Attachments: on_subquery.diff
>
>
> SOME is not allowed in ON-clause:
> ij> create table t1 (i integer);
> 0 rows inserted/updated/deleted
> ij> create table t2 (i integer);
> 0 rows inserted/updated/deleted
> ij> create table t3 (i integer);
> 0 rows inserted/updated/deleted
> ij> insert into t1 values (1);
> 1 row inserted/updated/deleted
> ij> insert into t2 values (2);
> 1 row inserted/updated/deleted
> ij> insert into t3 values 2,3,4;
> 3 rows inserted/updated/deleted
> ij> select * from t1 where t1.i = some (select i from t3);
> I          
> -----------
> 0 rows selected
> ij> select * from t1 inner join t2 on  t1.i = some (select i from t3);
> ERROR 42972: An ON clause associated with a JOIN operator is not valid.
> ij> 

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