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] [Updated] (DRILL-591) explicit cast fail to convert 0.00000001 to int
Date Mon, 09 Jun 2014 06:49:34 GMT

     [ https://issues.apache.org/jira/browse/DRILL-591?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jacques Nadeau updated DRILL-591:
---------------------------------

    Component/s: Functions - Drill
       Assignee: Mehant Baid

> explicit cast fail to convert 0.00000001 to int
> -----------------------------------------------
>
>                 Key: DRILL-591
>                 URL: https://issues.apache.org/jira/browse/DRILL-591
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Functions - Drill
>            Reporter: Chun Chang
>            Assignee: Mehant Baid
>
> The following number can be converted to int 0 on postgres:
> foodmart=# select c_decimal9 from data where c_row =6;
>  c_decimal9
> ------------
>  0.00000001
> (1 row)
> foodmart=# select cast(c_decimal9 as int) from data where c_row = 6;
>  c_decimal9
> ------------
>           0
> (1 row)
> But with Drill, it fails:
> 0: jdbc:drill:schema=dfs> select cast(c_decimal9 as varchar(20)) from data where c_row
=6;
> +------------+
> |   EXPR$0   |
> +------------+
> | 0.00000001 |
> +------------+
> 1 row selected (0.117 seconds)
> 0: jdbc:drill:schema=dfs> select cast(c_decimal9 as int) from data where c_row = 6;
> Query failed: org.apache.drill.exec.rpc.RpcException: Remote failure while running query.[error_id:
"ae039e8f-1c9a-435c-92fe-d4f0b7614cb8"
> endpoint {
>   address: "qa-node118.qa.lab"
>   user_port: 31010
>   control_port: 31011
>   data_port: 31012
> }
> error_type: 0
> message: "Failure while running fragment. < NumberFormatException:[ 0.00000001 ]"
> ]
> Error: exception while executing query (state=,code=0)



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

Mime
View raw message