You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by "Chun Chang (JIRA)" <ji...@apache.org> on 2015/01/07 02:21:34 UTC
[jira] [Created] (DRILL-1945) max() of all 0.0 value gives wrong
results
Chun Chang created DRILL-1945:
---------------------------------
Summary: 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: Aman Sinha
#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)