You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Chun Chang (JIRA)" <ji...@apache.org> on 2014/06/20 23:42:25 UTC

[jira] [Commented] (DRILL-1043) decimal28 negative number compares larger than positive int

    [ https://issues.apache.org/jira/browse/DRILL-1043?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14039409#comment-14039409 ] 

Chun Chang commented on DRILL-1043:
-----------------------------------

this has been fixed as of

#Fri Jun 20 13:40:42 PDT 2014
git.commit.id.abbrev=efa3274

> 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)