[
https://issues.apache.org/jira/browse/DRILL-961?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sudheesh Katkam reassigned DRILL-961:
-------------------------------------
Assignee: Sudheesh Katkam (was: Mehant Baid)
> 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: Sudheesh Katkam
>
> #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)