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/09/21 12:08:18 UTC

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

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

Knut Anders Hatlen updated DERBY-4380:
--------------------------------------

    Attachment: on_subquery.diff

Attached is a patch (not for commit) that removes the restriction that ON clauses can't contain subqueries. It also adds a test case to JoinTest and updates negative test cases in lang/outerjoin.sql, lang/innerjoin.sql and lang/lojreorder.sql so that they expect results to be returned instead of an exception.

With this patch, two of the test cases in lang/lojreorder.sql that used to raise ERROR 42972, now raise a NullPointerException. The stack trace looks similar to DERBY-4342. The patch should not be committed until this has been investigated and dealt with.

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