drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sudheesh Katkam (JIRA)" <j...@apache.org>
Subject [jira] [Assigned] (DRILL-961) 0.0 divided by a very small number should be zero
Date Tue, 17 Jun 2014 00:47:01 GMT

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

Sudheesh Katkam reassigned DRILL-961:
-------------------------------------

    Assignee: Mehant Baid  (was: Sudheesh Katkam)

> 0.0 divided by a very small number should be zero
> -------------------------------------------------
>
>                 Key: DRILL-961
>                 URL: https://issues.apache.org/jira/browse/DRILL-961
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Functions - Drill
>            Reporter: Chun Chang
>            Assignee: Mehant Baid
>
> #Wed Jun 11 10:19:21 PDT 2014
> git.commit.id.abbrev=27a9c98
> In handling non-precise division, the following should be handled well:
> double / decimal18(18,9)
> 0 / -0.000000010
> This yields as -0 in postgres:
> foodmart=# select c_row, c_float8, cast(c_decimal18 as decimal(18,9)),  c_float8 / cast(c_decimal18
as decimal(18,9)) from data where c_row = 7;
>  c_row | c_float8 | c_decimal18  | ?column?
> -------+----------+--------------+----------
>      7 |        0 | -0.000000010 |       -0
> Drill yields NaN:
> 0: jdbc:drill:schema=dfs> select c_row, c_float8, cast(c_decimal18 as decimal(18,9)),
 c_float8 / cast(c_decimal18 as decimal(18,9)) from data where c_row = 7;
> +------------+------------+------------+------------+
> |   c_row    |  c_float8  |   EXPR$2   |   EXPR$3   |
> +------------+------------+------------+------------+
> | 7          | 0.0        | -1.0E-8    | NaN        |
> +------------+------------+------------+------------+



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

Mime
View raw message