drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chun Chang (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DRILL-421) Unable to convert type DATE to a drill constant expression
Date Thu, 29 May 2014 18:31:02 GMT

    [ https://issues.apache.org/jira/browse/DRILL-421?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14012664#comment-14012664
] 

Chun Chang commented on DRILL-421:
----------------------------------

fixed. the extra time portion is covered in another JIRA, JIRA805.

0: jdbc:drill:schema=dfs> select date '2013-12-31' from customer limit 1;
+------------+
|   EXPR$0   |
+------------+
| 2013-12-31T00:00:00.000-08:00 |
+------------+



> Unable to convert type DATE to a drill constant expression
> ----------------------------------------------------------
>
>                 Key: DRILL-421
>                 URL: https://issues.apache.org/jira/browse/DRILL-421
>             Project: Apache Drill
>          Issue Type: Bug
>    Affects Versions: 1.0.0-rc1
>            Reporter: Chun Chang
>
> The following query works with postgres:
> foodmart=# select date '2013-12-31' from customer limit 1;
>     date
> ------------
>  2013-12-31
> (1 row)
> But failed with Drill:
> 0: jdbc:drill:> select date '2013-12-31' from `customer.json` limit 1;
> Query failed: org.apache.drill.exec.rpc.RpcException: Remote failure while running query.[error_id:
"2019f569-1437-4a13-9365-8bd10016f402"
> endpoint {
>   address: "qa-node118.qa.lab"
>   user_port: 31010
>   control_port: 31011
>   data_port: 31012
> }
> error_type: 0
> message: "Failure while parsing sql. < UnsupportedOperationException:[ Unable to convert
the value of 2013-12-31 and type DATE to a Drill constant expression. ]"
> ]
> Error: exception while executing query (state=,code=0)
> Stack trace:
> 12:08:42.804 [WorkManager Event Thread] DEBUG o.apache.drill.exec.work.WorkManager -
Starting pending task org.apache.drill.exec.work.foreman.Foreman@5ab0f09f
> 12:08:42.817 [WorkManager-1] ERROR o.a.drill.exec.work.foreman.Foreman - Error 2019f569-1437-4a13-9365-8bd10016f402:
Failure while parsing sql.
> java.lang.UnsupportedOperationException: Unable to convert the value of 2013-12-31 and
type DATE to a Drill constant expression.
> 	at org.apache.drill.exec.planner.logical.DrillOptiq$RexToDrill.visitLiteral(DrillOptiq.java:205)
~[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
> 	at org.apache.drill.exec.planner.logical.DrillOptiq$RexToDrill.visitLiteral(DrillOptiq.java:63)
~[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
> 	at org.eigenbase.rex.RexLiteral.accept(RexLiteral.java:599) ~[optiq-core-0.4.18.jar:na]
> 	at org.apache.drill.exec.planner.logical.DrillOptiq.toDrill(DrillOptiq.java:60) ~[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
> 	at org.apache.drill.exec.planner.logical.DrillProjectRel.implement(DrillProjectRel.java:81)
~[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
> 	at org.apache.drill.exec.planner.logical.DrillImplementor.visitChild(DrillImplementor.java:74)
~[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
> 	at org.apache.drill.exec.planner.logical.DrillLimitRel.implement(DrillLimitRel.java:52)
~[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
> 	at org.apache.drill.exec.planner.logical.DrillImplementor.visitChild(DrillImplementor.java:74)
~[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
> 	at org.apache.drill.exec.planner.logical.DrillScreenRel.implement(DrillScreenRel.java:72)
~[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
> 	at org.apache.drill.exec.planner.logical.DrillImplementor.go(DrillImplementor.java:61)
~[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
> 	at org.apache.drill.exec.planner.sql.DrillSqlWorker.getPlan(DrillSqlWorker.java:85)
~[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
> 	at org.apache.drill.exec.work.foreman.Foreman.runSQL(Foreman.java:350) [drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
> 	at org.apache.drill.exec.work.foreman.Foreman.run(Foreman.java:175) [drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_45]
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_45]
> 	at java.lang.Thread.run(Thread.java:744) [na:1.7.0_45]



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message