Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-4380

Subqueries not allowed in ON clause

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 10.5.3.0
    • 10.6.1.0
    • SQL
    • None
    • Release Note Needed, Repro attached

    Description

      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>

      Attachments

        1. on_subquery_v2.diff
          30 kB
          Knut Anders Hatlen
        2. on_subquery_v2.stat
          0.9 kB
          Knut Anders Hatlen
        3. on_subquery.diff
          17 kB
          Knut Anders Hatlen
        4. releaseNote.html
          5 kB
          Knut Anders Hatlen
        5. remove_translations.diff
          14 kB
          Knut Anders Hatlen

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            knutanders Knut Anders Hatlen
            bernt Bernt Johnsen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment