[ 
https://issues.apache.org/jira/browse/DRILL-5401?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Khurram Faraaz updated DRILL-5401:
----------------------------------
    Summary: isnotnull(MAP-REPEATED) - IS NULL / IS NOT NULL over a list in 
JSON  (was: wrong results - IS NULL / IS NOT NULL over a list in JSON)

> isnotnull(MAP-REPEATED) - 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)

Reply via email to