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/02/28 03:26:04 UTC
[jira] [Created] (DRILL-2348) 'null' is not treated correctly when
compared with int
Chun Chang created DRILL-2348:
---------------------------------
Summary: 'null' is not treated correctly when compared with int
Key: DRILL-2348
URL: https://issues.apache.org/jira/browse/DRILL-2348
Project: Apache Drill
Issue Type: Bug
Reporter: Chun Chang
Priority: Critical
#Wed Feb 25 17:07:31 EST 2015
git.commit.id.abbrev=f7ef5ec
Dataset can be downloaded from
https://s3.amazonaws.com/apache-drill/files/complex.json.gz
The following three query results do not add up.
{code}
0: jdbc:drill:schema=dfs.drillTestDirComplexJ> select count(tt.gbyi) from (select t.gbyi gbyi, t.ooa[0] ooa0, t.ooa[1] ooa1, t.ooa[2] ooa2 from `complex.json` t) tt where tt.ooa0.`in` <> tt.ooa1.`in`;
+------------+
| EXPR$0 |
+------------+
+------------+
No rows selected (22.952 seconds)
0: jdbc:drill:schema=dfs.drillTestDirComplexJ> select count(tt.gbyi) from (select t.gbyi gbyi, t.ooa[0] ooa0, t.ooa[1] ooa1, t.ooa[2] ooa2 from `complex.json` t) tt where tt.ooa0.`in` = tt.ooa1.`in`;
+------------+
| EXPR$0 |
+------------+
| 949954 |
+------------+
1 row selected (23.053 seconds)
0: jdbc:drill:schema=dfs.drillTestDirComplexJ> select count(tt.gbyi) from (select t.gbyi gbyi, t.ooa[0] ooa0, t.ooa[1] ooa1, t.ooa[2] ooa2 from `complex.json` t) tt;
+------------+
| EXPR$0 |
+------------+
| 1000000 |
+------------+
1 row selected (13.242 seconds)
{code}
Without any comparison condition, the total count is 1,000,000. This is correct. But the two query results with <> and = does not add up to the total. I am not sure if this has anything to do with subquery with complex type. Will investigate more.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)