You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Khurram Faraaz (JIRA)" <ji...@apache.org> on 2017/03/31 10:13:41 UTC
[jira] [Updated] (DRILL-5401) isnotnull(MAP-REPEATED) - IS NULL /
IS NOT NULL over a list in JSON
[ https://issues.apache.org/jira/browse/DRILL-5401?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Khurram Faraaz updated DRILL-5401:
----------------------------------
Description:
Checking if a list is null or if it is not null, results in SchemaChangeException.
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}
was:
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}
> 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 SchemaChangeException.
> 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)