You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Mehant Baid (JIRA)" <ji...@apache.org> on 2014/06/21 02:06:24 UTC
[jira] [Resolved] (DRILL-1027) negative decimal28 values is
compared larger than zero
[ https://issues.apache.org/jira/browse/DRILL-1027?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mehant Baid resolved DRILL-1027.
--------------------------------
Resolution: Fixed
Fixed as part of or before 79c1502c1e96596d4db302c2dd1c9f78d0f4d43d
> negative decimal28 values is compared larger than zero
> ------------------------------------------------------
>
> Key: DRILL-1027
> URL: https://issues.apache.org/jira/browse/DRILL-1027
> Project: Apache Drill
> Issue Type: Bug
> Components: Functions - Drill
> Reporter: Chun Chang
> Assignee: Mehant Baid
>
> #Wed Jun 18 10:27:23 PDT 2014
> git.commit.id.abbrev=894037a
> The following negative decimal28 numbers are compared as larger than zero:
> -999999999.000000000
> -1.0E-8
> -999999999999999999.000000000
> Drill:
> 0: jdbc:drill:schema=dfs> select c_row, cast(c_decimal28 as decimal(28,9)), sqrt(cast(c_decimal28 as decimal(28,9))) from data where c_row < 12 and cast(c_decimal28 as decimal(28,9)) > 0;
> +------------+------------+------------+
> | c_row | EXPR$1 | EXPR$2 |
> +------------+------------+------------+
> | 2 | 1.000000000 | 1.0 |
> | 3 | 123456789.000000000 | 11111.111060555555 |
> | 4 | 999999999.000000000 | 31622.776585872405 |
> | 5 | -999999999.000000000 | 31622.776585872405 |
> | 6 | 1.0E-8 | 1.0E-4 |
> | 7 | -1.0E-8 | 1.0E-4 |
> | 8 | 12345.678900000 | 111.11111060555555 |
> | 9 | 123456789.123456789 | 11111.11106611111 |
> | 10 | 999999999999999999.000000000 | 1.0E9 |
> | 11 | -999999999999999999.000000000 | 1.0E9 |
> +------------+------------+------------+
> 10 rows selected (0.283 seconds)
> Postgres:
> foodmart=# select c_row, cast(c_decimal28 as decimal(28,9)), sqrt(cast(c_decimal28 as decimal(28,9))) from data where c_row < 12 and cast(c_decimal28 as decimal(28,9)) > 0;
> c_row | c_decimal28 | sqrt
> -------+------------------------------+-----------------------
> 2 | 1.000000000 | 1.000000000000000
> 3 | 123456789.000000000 | 11111.11106055556
> 4 | 999999999.000000000 | 31622.77658587241
> 6 | 0.000000010 | 0.0001000000000000000
> 8 | 12345.678900000 | 111.1111106055556
> 9 | 123456789.123456789 | 11111.11106611111
> 10 | 999999999999999999.000000000 | 1000000000.000000000
> (7 rows)
--
This message was sent by Atlassian JIRA
(v6.2#6252)