Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-4272

Incorrect sub-query to JDBC driver

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.23.0
    • Fix Version/s: 1.25.0
    • Component/s: core
    • Labels:
      None

      Description

      run  a query  like   

      select t.id, t.c11 from foo t join bar tt on t.id = tt.id limit 10

      calcite makes a sub-query to JDBC driver like 

      SELECT "t0"."ID", "t0"."C11" 

      FROM ( SELECT * FROM "FOO" INNER JOIN (SELECT "ID" FROM "BAR") AS "t" ON "FOO"."ID" = "t"."ID" 

      FETCH NEXT 10 ROWS ONLY ) AS "t0"

       

      which cannot be executed since ID column present in both tables,  see example in attachment 

       

       

       

        Attachments

        1. podd-tests.zip
          157 kB
          Roman Churganov

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              rrrrrr111 Roman Churganov
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: