drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chun Chang (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DRILL-1945) max() of all 0.0 value gives wrong results
Date Thu, 05 Mar 2015 20:01:38 GMT

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

Chun Chang commented on DRILL-1945:
-----------------------------------

verified fix with build
#Wed Mar 04 01:23:42 EST 2015
git.commit.id.abbrev=71b6bfe

{code}
0: jdbc:drill:schema=dfs.drillTestDirComplexJ> select max(t.sfa[0]) sfamax from `complex.json`
t;
+------------+
|   sfamax   |
+------------+
| 0.0        |
+------------+
{code}

> max() of all 0.0 value gives wrong results
> ------------------------------------------
>
>                 Key: DRILL-1945
>                 URL: https://issues.apache.org/jira/browse/DRILL-1945
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Functions - Drill
>    Affects Versions: 0.8.0
>            Reporter: Chun Chang
>            Assignee: Mehant Baid
>         Attachments: DRILL-1945.patch
>
>
> #Fri Jan 02 21:20:47 EST 2015
> git.commit.id.abbrev=b491cdb
> test data can be accessed from  https://s3.amazonaws.com/apache-drill/files/complex.json.gz
> Using the above dataset, the t.sfa[0] field is all 0.0.
> {code}
> 0: jdbc:drill:schema=dfs.drillTestDirMondrian> select t.sfa[0] from `complex.json`
t limit 10;
> +------------+
> |   EXPR$0   |
> +------------+
> | 0.0        |
> | 0.0        |
> | 0.0        |
> | 0.0        |
> | 0.0        |
> | 0.0        |
> | 0.0        |
> | 0.0        |
> | 0.0        |
> | 0.0        |
> +------------+
> 10 rows selected (0.083 seconds)
> 0: jdbc:drill:schema=dfs.drillTestDirMondrian> select t.sfa[0] from `complex.json`
t where t.sfa[0] <> 0.0;
> +------------+
> |   EXPR$0   |
> +------------+
> +------------+
> No rows selected (15.616 seconds)
> {code}
> The max value of this field in a group by query gives wrong results.
> {code}
> 0: jdbc:drill:schema=dfs.drillTestDirMondrian> select mod(trunc(t.sfa[1]), 10) sfamod,
max(t.sfa[0]) sfamax from `complex.json` t group by mod(trunc(t.sfa[1]), 10);
> +------------+------------+
> |   sfamod   |   sfamax   |
> +------------+------------+
> | 1.0        | 4.9E-324   |
> | 2.0        | 4.9E-324   |
> | 3.0        | 4.9E-324   |
> | 4.0        | 4.9E-324   |
> | 5.0        | 4.9E-324   |
> | 6.0        | 4.9E-324   |
> | 7.0        | 4.9E-324   |
> | 8.0        | 4.9E-324   |
> | 9.0        | 4.9E-324   |
> | 0.0        | 4.9E-324   |
> +------------+------------+
> 10 rows selected (14.474 seconds)
> {code}
> simple max() on the field also gives the same wrong result.
> {code}
> 0: jdbc:drill:schema=dfs.drillTestDirMondrian> select max(t.sfa[0]) sfamax from `complex.json`
t;
> +------------+
> |   sfamax   |
> +------------+
> | 4.9E-324   |
> +------------+
> 1 row selected (15.666 seconds)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message