You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by "Khurram Faraaz (JIRA)" <ji...@apache.org> on 2017/03/30 06:08:41 UTC

[jira] [Created] (DRILL-5401) wrong results - IS NULL / IS NOT NULL over a list in JSON

Khurram Faraaz created DRILL-5401:
-------------------------------------

             Summary: wrong results - IS NULL / IS NOT NULL over a list in JSON
                 Key: DRILL-5401
                 URL: https://issues.apache.org/jira/browse/DRILL-5401
             Project: Apache Drill
          Issue Type: Bug
          Components: Execution - Flow
    Affects Versions: 1.11.0
            Reporter: Khurram Faraaz


Checking if a list is null or if it is not null, results in incorrect results.
Drill 1.11.0 commit id: adbf363d

Data used in test

{noformat}
[root@centos-01 ~]# cat empty_array.json
{ "a": { "b": { "c": [ { "d": { "e": "f" } } ] } } }
{ "a": { "b": { "c": [] } } }
{noformat}

{noformat}
0: jdbc:drill:schema=dfs.tmp> alter session set `store.json.all_text_mode`=true;
+-------+------------------------------------+
|  ok   |              summary               |
+-------+------------------------------------+
| true  | store.json.all_text_mode updated.  |
+-------+------------------------------------+
1 row selected (0.189 seconds)
0: jdbc:drill:schema=dfs.tmp> select * from `empty_array.json`;
+--------------------------------+
|               a                |
+--------------------------------+
| {"b":{"c":[{"d":{"e":"f"}}]}}  |
| {"b":{"c":[]}}                 |
+--------------------------------+
2 rows selected (0.138 seconds)

/* wrong results */

0: jdbc:drill:schema=dfs.tmp> select * from `empty_array.json` t where t.b.c IS NULL;
+--------------------------------+
|               a                |
+--------------------------------+
| {"b":{"c":[{"d":{"e":"f"}}]}}  |
| {"b":{"c":[]}}                 |
+--------------------------------+
2 rows selected (0.152 seconds)

/* wrong results */

0: jdbc:drill:schema=dfs.tmp> select * from `empty_array.json` t where t.b.c IS NOT NULL;
+----+
| a  |
+----+
+----+
No rows selected (0.154 seconds)
{noformat}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)