Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-5631

Drill pushing invalid SQL to ORACLE when quantified predicate with correlated subquery used

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.10.0
    • Fix Version/s: None
    • Component/s: Server
    • Labels:
      None
    • Environment:

      Drill 1.10
      ORACLE 12C2

      Description

      plugin to ORACLE 12C2 using JDBC defined

      following statement sent to DRILL

      SQL: select RNUM, C1, C2 FROM certora.DBCERT.TSET1 as T1 where exists ( select C1 from certora.DBCERT.TSET2 where C1 = T1.C1 )

      DATA_READ ERROR: The JDBC storage plugin failed while trying setup the SQL query.

      sql SELECT *
      FROM "DBCERT"."TSET1"
      INNER JOIN (SELECT "C10", MIN("$f0") "$f1"
      FROM (SELECT "t0"."C1" "C10", TRUE "$f0"
      FROM "DBCERT"."TSET2"
      INNER JOIN (SELECT "C1"
      FROM (SELECT "C1"
      FROM "DBCERT"."TSET1") "t"
      GROUP BY "C1") "t0" ON "TSET2"."C1" = "t0"."C1") "t1"
      GROUP BY "C10") "t2" ON "TSET1"."C1" = "t2"."C10"

      ORACLE DDL

      CREATE TABLE "DBCERT"."TSET1"
      ( "RNUM" NUMBER(*,0),
      "C1" NUMBER(*,0),
      "C2" CHAR(3 BYTE)
      ) ;
      GRANT SELECT ON "DBCERT"."TSET1" TO PUBLIC;
      --------------------------------------------------------
      – DDL for Table TSET2
      --------------------------------------------------------

      CREATE TABLE "DBCERT"."TSET2"
      ( "RNUM" NUMBER(*,0),
      "C1" NUMBER(*,0),
      "C2" CHAR(3 BYTE)
      ) ;
      GRANT SELECT ON "DBCERT"."TSET2" TO PUBLIC;

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              the6campbells N Campbell
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: