drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mehant Baid (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (DRILL-1043) decimal28 negative number compares larger than positive int
Date Fri, 20 Jun 2014 23:58:25 GMT

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

Mehant Baid resolved DRILL-1043.
--------------------------------

    Resolution: Fixed

Fixed as part of or before 79c1502c1e96596d4db302c2dd1c9f78d0f4d43d

> decimal28 negative number compares larger than positive int
> -----------------------------------------------------------
>
>                 Key: DRILL-1043
>                 URL: https://issues.apache.org/jira/browse/DRILL-1043
>             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 negative decimal28 number such as -999999999.000000000 and -999999999999999999.000000000
is compared larger than positive int value:
> postgres:
> foodmart=# select c_row, c_int, cast(c_decimal28 as decimal(28,9)) from data where c_row
< 12 and c_int >= cast(c_decimal28 as decimal(28,9));
>  c_row |  c_int   |          c_decimal28
> -------+----------+-------------------------------
>      1 |        0 |                   0.000000000
>      2 |        1 |                   1.000000000
>      5 |      123 |          -999999999.000000000
>      6 | 92032039 |                   0.000000010
>     11 |    32767 | -999999999999999999.000000000
> (5 rows)
> drill:
> 0: jdbc:drill:schema=dfs> select c_row, c_int, cast(c_decimal28 as decimal(28,9))
from data where c_row < 12 and c_int >= cast(c_decimal28 as decimal(28,9));
> +------------+------------+------------+
> |   c_row    |   c_int    |   EXPR$2   |
> +------------+------------+------------+
> | 1          | 0          | 0E-9       |
> | 2          | 1          | 1.000000000 |
> | 6          | 92032039   | 1.0E-8     |
> +------------+------------+------------+
> 3 rows selected (0.249 seconds)
> notice two rows are missing from drill output due to the comparison error.



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

Mime
View raw message