drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "N Campbell (JIRA)" <j...@apache.org>
Subject [jira] [Created] (DRILL-5622) DISTINCT predicate generates invalid SQL for a JDBC data source such as ORACLE
Date Thu, 29 Jun 2017 12:42:00 GMT
N Campbell created DRILL-5622:
---------------------------------

             Summary: DISTINCT predicate generates invalid SQL for a JDBC data source such
as ORACLE
                 Key: DRILL-5622
                 URL: https://issues.apache.org/jira/browse/DRILL-5622
             Project: Apache Drill
          Issue Type: Bug
          Components:  Server
    Affects Versions: 1.10.0
         Environment: ORACLE 12
Apache Drill 1.10
            Reporter: N Campbell


The SQL generated by DRILL to a database such as ORACLE is inavlid

SELECT RNUM, TINT.CINT FROM certora.DBCERT.TINT WHERE TINT.CINT IS DISTINCT FROM 1

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

SELECT *
FROM "DBCERT"."TINT"
WHERE CAST(CASE WHEN "CINT" IS NULL THEN 1 IS NOT NULL WHEN 1 IS NULL THEN "CINT" IS NOT NULL
ELSE "CINT" <> 1 END AS BOOLEAN)
plugin certora
Fragment 0:0



 CREATE TABLE "DBCERT"."TINT" 
   (	"RNUM" NUMBER, 
	"CINT" NUMBER(9,0)
   ) ;

Insert into DBCERT.TINT (RNUM,CINT) values (0,null);
Insert into DBCERT.TINT (RNUM,CINT) values (1,-1);
Insert into DBCERT.TINT (RNUM,CINT) values (2,0);
Insert into DBCERT.TINT (RNUM,CINT) values (3,1);
Insert into DBCERT.TINT (RNUM,CINT) values (4,10);



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message