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-2348) 'null' is not treated correctly when compared with int
Date Sat, 28 Feb 2015 02:47:04 GMT

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

Chun Chang commented on DRILL-2348:
-----------------------------------

Jacques points out that based on sql standards, 'null' <> 2 will return false. Because
my data contains null, so this is not a bug.

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

Mime
View raw message