[ https://issues.apache.org/jira/browse/DRILL-4396?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Serge Harnyk updated DRILL-4396: -------------------------------- Assignee: (was: Serge Harnyk) > Generates invalid cast specification in re-written query to Postgres > -------------------------------------------------------------------- > > Key: DRILL-4396 > URL: https://issues.apache.org/jira/browse/DRILL-4396 > Project: Apache Drill > Issue Type: Bug > Components: Storage - JDBC > Affects Versions: 1.5.0 > Reporter: N Campbell > > select vint.rnum, tflt.rnum from postgres.public.vint , postgres.public.tflt > where vint.cint = tflt.cflt > Error: DATA_READ ERROR: The JDBC storage plugin failed while trying setup the > SQL query. > sql SELECT * > FROM (SELECT "rnum", CAST("cint" AS DOUBLE) AS "$f2" > FROM "public"."vint") AS "t" > INNER JOIN "public"."tflt" ON "t"."$f2" = "tflt"."cflt" > plugin postgres > Fragment 0:0 > [Error Id: 9985ca6b-1faf-43e0-9465-b7a6e8876c6d on centos1:31010] > (org.postgresql.util.PSQLException) ERROR: type "double" does not exist > Position: 46 > org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse():2182 > org.postgresql.core.v3.QueryExecutorImpl.processResults():1911 > org.postgresql.core.v3.QueryExecutorImpl.execute():173 > org.postgresql.jdbc.PgStatement.execute():622 > org.postgresql.jdbc.PgStatement.executeWithFlags():458 > org.postgresql.jdbc.PgStatement.executeQuery():374 > org.apache.commons.dbcp.DelegatingStatement.executeQuery():208 > org.apache.commons.dbcp.DelegatingStatement.executeQuery():208 > org.apache.drill.exec.store.jdbc.JdbcRecordReader.setup():177 > org.apache.drill.exec.physical.impl.ScanBatch.<init>():108 > org.apache.drill.exec.physical.impl.ScanBatch.<init>():136 > org.apache.drill.exec.store.jdbc.JdbcBatchCreator.getBatch():40 > org.apache.drill.exec.store.jdbc.JdbcBatchCreator.getBatch():33 > org.apache.drill.exec.physical.impl.ImplCreator.getRecordBatch():147 > org.apache.drill.exec.physical.impl.ImplCreator.getChildren():170 > org.apache.drill.exec.physical.impl.ImplCreator.getRecordBatch():127 > org.apache.drill.exec.physical.impl.ImplCreator.getChildren():170 > org.apache.drill.exec.physical.impl.ImplCreator.getRecordBatch():127 > org.apache.drill.exec.physical.impl.ImplCreator.getChildren():170 > org.apache.drill.exec.physical.impl.ImplCreator.getRootExec():101 > org.apache.drill.exec.physical.impl.ImplCreator.getExec():79 > org.apache.drill.exec.work.fragment.FragmentExecutor.run():230 > org.apache.drill.common.SelfCleaningRunnable.run():38 > java.util.concurrent.ThreadPoolExecutor.runWorker():1142 > java.util.concurrent.ThreadPoolExecutor$Worker.run():617 > java.lang.Thread.run():745 > SQLState: null > ErrorCode: 0 > create table TINT ( RNUM integer not null , CINT integer ) ; > create view VINT as select * from TINT; > create table TFLT ( RNUM integer not null , CFLT float ) ; > create view VFLT as select * from TFLT; -- This message was sent by Atlassian JIRA (v6.3.4#6332)