drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jacques Nadeau (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DRILL-773) MIN and MAX against to_timestamp not working
Date Thu, 12 Jun 2014 16:48:10 GMT

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

Jacques Nadeau commented on DRILL-773:
--------------------------------------

fixed within 4198a17~21

> MIN and MAX against to_timestamp not working
> --------------------------------------------
>
>                 Key: DRILL-773
>                 URL: https://issues.apache.org/jira/browse/DRILL-773
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Functions - Drill
>            Reporter: Krystal
>            Assignee: DrillCommitter
>             Fix For: 1.0.0-BETA1
>
>         Attachments: DRILL-773.patch
>
>
> git.commit.id.abbrev=70fab8c
> The following query returns correct result:
> 0: jdbc:drill:schema=dfs> select to_timestamp(create_time, 'YYYY-MM-dd HH:mm:ss')
from voter;
> +------------+
> |   EXPR$0   |
> +------------+
> | 2014-05-25T03:41:54.000-07:00 |
> | 2014-07-30T08:03:11.000-07:00 |
> | 2014-09-15T02:33:11.000-07:00 |
> .
> .
> .
> However, when using max or min function against to_timestamp query failed to execute:
> 0: jdbc:drill:schema=dfs> select max(to_timestamp(create_time, 'YYYY-MM-dd HH:mm:ss'))
from voter; 
> Query failed: org.apache.drill.exec.rpc.RpcException: Remote failure while running query.[error_id:
"d50e202c-9665-43a1-96b2-399393f29726"
> endpoint {
>   address: "qa-node64.qa.lab"
>   user_port: 31010
>   control_port: 31011
>   data_port: 31012
> }
> error_type: 0
> message: "Failure while setting up Foreman. < AssertionError:[ Internal error: while
converting `to_timestamp`(`create_time`, 'YYYY-MM-dd HH:mm:ss') ] < InvocationTargetException
< UnsupportedOperationException:[ class org.eigenbase.sql.SqlUnresolvedFunction: to_timestamp
]"
> ]
> Stack trace:
> java.lang.UnsupportedOperationException: class org.eigenbase.sql.SqlUnresolvedFunction:
to_timestamp
> org.eigenbase.util.Util.needToImplement(Util.java:903) ~[optiq-core-0.7-20140513.013236-5.jar:na]
> org.eigenbase.sql.SqlOperator.inferReturnType(SqlOperator.java:456) ~[optiq-core-0.7-20140513.013236-5.jar:na]
> org.eigenbase.rex.RexBuilder.deriveReturnType(RexBuilder.java:260) ~[optiq-core-0.7-20140513.013236-5.jar:na]
> org.eigenbase.rex.RexBuilder.makeCall(RexBuilder.java:219) ~[optiq-core-0.7-20140513.013236-5.jar:na]
> org.eigenbase.sql2rel.StandardConvertletTable.convertFunction(StandardConvertletTable.java:597)
~[optiq-core-0.7-20140513.013236-5.jar:na]
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)(NativeMethodAccessorImpl.java)
~[na:1.7.0_45]
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_45]
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
~[na:1.7.0_45]
> java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_45]
> org.eigenbase.sql2rel.ReflectiveConvertletTable$2.convertCall(ReflectiveConvertletTable.java:139)
~[optiq-core-0.7-20140513.013236-5.jar:na]
> org.eigenbase.sql2rel.SqlNodeToRexConverterImpl.convertCall(SqlNodeToRexConverterImpl.java:52)
~[optiq-core-0.7-20140513.013236-5.jar:na]
> org.eigenbase.sql2rel.SqlToRelConverter$Blackboard.visit(SqlToRelConverter.java:4210)
~[optiq-core-0.7-20140513.013236-5.jar:na]
> org.eigenbase.sql2rel.SqlToRelConverter$Blackboard.visit(SqlToRelConverter.java:3611)
~[optiq-core-0.7-20140513.013236-5.jar:na]
> org.eigenbase.sql.SqlCall.accept(SqlCall.java:133) ~[optiq-core-0.7-20140513.013236-5.jar:na]
> org.eigenbase.sql2rel.SqlToRelConverter$Blackboard.convertExpression(SqlToRelConverter.java:4116)
~[optiq-core-0.7-20140513.013236-5.jar:na]
> org.eigenbase.sql2rel.SqlToRelConverter$AggConverter.visit(SqlToRelConverter.java:4517)
~[optiq-core-0.7-20140513.013236-5.jar:na]
> org.eigenbase.sql2rel.SqlToRelConverter$AggConverter.visit(SqlToRelConverter.java:4363)
~[optiq-core-0.7-20140513.013236-5.jar:na]
> org.eigenbase.sql.SqlCall.accept(SqlCall.java:133) ~[optiq-core-0.7-20140513.013236-5.jar:na]
> org.eigenbase.sql2rel.SqlToRelConverter$AggConverter.visit(SqlToRelConverter.java:4473)
~[optiq-core-0.7-20140513.013236-5.jar:na]
> org.eigenbase.sql2rel.SqlToRelConverter$AggConverter.visit(SqlToRelConverter.java:4363)
~[optiq-core-0.7-20140513.013236-5.jar:na]
> org.eigenbase.sql.SqlNodeList.accept(SqlNodeList.java:149) ~[optiq-core-0.7-20140513.013236-5.jar:na]
> org.eigenbase.sql2rel.SqlToRelConverter.createAggImpl(SqlToRelConverter.java:2427) ~[optiq-core-0.7-20140513.013236-5.jar:na]
> org.eigenbase.sql2rel.SqlToRelConverter.convertAgg(SqlToRelConverter.java:2321) ~[optiq-core-0.7-20140513.013236-5.jar:na]
> org.eigenbase.sql2rel.SqlToRelConverter.convertSelectImpl(SqlToRelConverter.java:514)
~[optiq-core-0.7-20140513.013236-5.jar:na]
> org.eigenbase.sql2rel.SqlToRelConverter.convertSelect(SqlToRelConverter.java:474) ~[optiq-core-0.7-20140513.013236-5.jar:na]
> org.eigenbase.sql2rel.SqlToRelConverter.convertQueryRecursive(SqlToRelConverter.java:2787)
~[optiq-core-0.7-20140513.013236-5.jar:na]
> org.eigenbase.sql2rel.SqlToRelConverter.convertQuery(SqlToRelConverter.java:432) ~[optiq-core-0.7-20140513.013236-5.jar:na]
> net.hydromatic.optiq.prepare.PlannerImpl.convert(PlannerImpl.java:192) ~[optiq-core-0.7-20140513.013236-5.jar:na]
> org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.convertToRel(DefaultSqlHandler.java:103)
~[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
> org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.getPlan(DefaultSqlHandler.java:85)
~[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
> org.apache.drill.exec.planner.sql.DrillSqlWorker.getPlan(DrillSqlWorker.java:134) ~[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
> org.apache.drill.exec.work.foreman.Foreman.runSQL(Foreman.java:338) ~[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
> org.apache.drill.exec.work.foreman.Foreman.run(Foreman.java:186) ~[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_45]
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_45]
> 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