drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason Altekruse (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DRILL-1323) Query on complex json is returning nulls
Date Sat, 27 Sep 2014 00:07:34 GMT

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

Jason Altekruse commented on DRILL-1323:
----------------------------------------

Querying the provided file does work, however the syntax used is currently not supported.
There are two issues, the first is that to index into a complex field, we currently require
the complex reference to begin with a table name. I believe this was a conscious decision
made to avoid issue with table name ambiguities. The second issue is around the use of backticks,
we do not allow references down a complex column to happen within backticks. A quick look
around online seems to indicate that while it would be incredibly stupid many databases support
the dot character as valid in a column identifier. Therefore we would introduce an ambiguity
between column names and digging down a complex tree to support this syntax.
select `trans_id`, `date`, `time`, ms.user_info.cust_id, ms.user_info.device, ms.trans_info.prod_id
from dfs.`mobile-small.json` as ms

> Query on complex json is returning nulls 
> -----------------------------------------
>
>                 Key: DRILL-1323
>                 URL: https://issues.apache.org/jira/browse/DRILL-1323
>             Project: Apache Drill
>          Issue Type: Bug
>            Reporter: Parth Chandra
>             Fix For: 0.6.0
>
>         Attachments: mobile-small.json
>
>
> The query 
> select `trans_id`, `date`, `time`, `user_info.cust_id`, `user_info.device`, `trans_info.prod_id`
from dfs.`mobile-small.json`
> returns null for the columns that are part of complex data. 
> The query 
> select `trans_id`, `date`, `time`, `user_info`, `trans_info` from dfs.`mobile-small.json`
> returns data correctly.



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

Mime
View raw message