You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Chris Mathews (JIRA)" <ji...@apache.org> on 2015/10/13 18:12:05 UTC

[jira] [Commented] (DRILL-3922) select * on json document with dot in key name results in failure

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

Chris Mathews commented on DRILL-3922:
--------------------------------------

I think this is related since the same error message is returned; so I do not think this is just a JSON issue.

>From the following examples it can be seen that when accessing parquet files the results are inconsistent, but a similar error message is returned:

{noformat:bgColor=#B2D1A7}
0: jdbc:drill:> select  count(z_timestamp) from zen.pm.ERICSSON_WRAN;
+-----------+
|  EXPR$0   |
+-----------+
| 10972390  |
+-----------+
1 row selected (1.444 seconds)
{noformat}

{noformat:bgColor=#B2D1A7}
0: jdbc:drill:> select  count(`H3_VS.RB.PS.Int.DL.384`)  from zen.pm.ERICSSON_WRAN;
Error: SYSTEM ERROR: UnsupportedOperationException: Field references must be singular names.
{noformat}

{noformat:bgColor=#DEA897}
0: jdbc:drill:> select  `H3_VS.RB.PS.Int.DL.384` from zen.pm.ERICSSON_WRAN limit 1;
Error: SYSTEM ERROR: UnsupportedOperationException: Field references must be singular names.

Fragment 1:0
{noformat}

{noformat:bgColor=#B2D1A7}
0: jdbc:drill:> select  `H3_VS.RB.PS.Int.DL.384` as `xyz`  from zen.pm.ERICSSON_WRAN limit 1;
+-------+
|  xyz  |
+-------+
| null  |
+-------+
1 row selected (3.749 seconds)
{noformat}

And using another parquet file with column names containing dot:

{noformat:bgColor=#B2D1A7}
0: jdbc:drill:> select `z.date`  from zen.root.cjm;
+----------------+
|     z.date     |
+----------------+
| 1429592610462  |
+----------------+
1 row selected (0.133 seconds)
{noformat}

{noformat:bgColor=#B2D1A7}
0: jdbc:drill:> select `z.date` as  `H3_VS.RB.PS.Int.DL.384`    from zen.root.cjm;
+-------------------------+
| H3_VS.RB.PS.Int.DL.384  |
+-------------------------+
| 1429592610462           |
+-------------------------+
1 row selected (0.11 seconds)
{noformat}

{noformat:bgColor=#DEA897}
0: jdbc:drill:> select count(`z.date`)  from zen.root.cjm;
Error: SYSTEM ERROR: UnsupportedOperationException: Field references must be singular names.
{noformat}

{noformat:bgColor=#B2D1A7}
0: jdbc:drill:> select count(*) from zen.root.cjm;
+---------+
| EXPR$0  |
+---------+
| 1       |
+---------+
1 row selected (0.141 seconds)
{noformat}

> select * on json document with dot in key name results in failure
> -----------------------------------------------------------------
>
>                 Key: DRILL-3922
>                 URL: https://issues.apache.org/jira/browse/DRILL-3922
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Storage - JSON
>    Affects Versions: 1.1.0, 1.2.0
>            Reporter: John Omernik
>             Fix For: Future
>
>
> If there is a dot in the key name of a json field, and the user issues a select * from `path/to/file.json` it will result a system error: "Unsupported Operation Exception: Field references must be singular names"
> To reproduce:
> {"hello":"goodbye", "yousayyes":"Isayno"}
>  Works fine
> {"hello.yoko":"goodbye", "yousayyes":"Isayno"}
> Fails.
> Note, this is only if you do select * if you do select `hello.yoko` from file then it will work fine.   
> The select * is needed to help with data exploration.  



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)