drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jacques Nadeau (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (DRILL-1692) select * on mongo join returns invalid results
Date Fri, 09 Jan 2015 15:44:34 GMT

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

Jacques Nadeau edited comment on DRILL-1692 at 1/9/15 3:44 PM:
---------------------------------------------------------------

There is a bug in * handling in the MongoDB plugin.  Right now, if you query the mongo data:

Data
{code}
{a: 4, b:6}
{code}

Currently
{code}
select * from mongo;
{code}
|*|
|{a: 4, b:6}|

should be:
{code}
select * from mongo;
{code}
|a|b|
|4|6|

The first level document map should be translated into the first level of columns in the Drill
record.  See the JSONReader to see how it handles the top level of the record.


was (Author: jnadeau):
There is a bug in * handling in the MongoDB plugin.  Right now, if you query the mongo data:

Data
{code}
{a: 4, b:6}
{code}

Currently
{code}
select * from mongo;
|*|
|{a: 4, b:6}|
{code}

should be:
{code}
select * from mongo;
|a|b|
|4|6|

The first level document map should be translated into the first level of columns in the Drill
record.  See the JSONReader to see how it handles the top level of the record.

> select * on mongo join returns invalid results
> ----------------------------------------------
>
>                 Key: DRILL-1692
>                 URL: https://issues.apache.org/jira/browse/DRILL-1692
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Storage - MongoDB
>    Affects Versions: 0.6.0
>         Environment: select * queries on mongo joins
>            Reporter: B Anil Kumar
>            Assignee: B Anil Kumar
>            Priority: Critical
>             Fix For: 0.8.0
>
>
> select * on mongo joins gives improper results. Need to modify the schema handling logic
in the case of 'select *' logic in MongoRecordReader.
> For example when we fire a below query on mongo.employee.`join1` table, the results are
as below.
> SELECT  * FROM mongo.employee.`join1` t1 JOIN  mongo.employee.`join1` t2 ON  t1.`employee_id`
= t2.`employee_id`
> sample documents in mongo.employee.`join1` table:
> { "employee_id" : 1 , "first_name" : "Anil"} 
> { "employee_id" : 2 , "first_name" : "Kamesh"}
> Results:
> {noformat}
> { "employee_id" : 1 , "first_name" : "Anil"}	{ "employee_id" : 1 , "first_name" : "Anil"}
> { "employee_id" : 1 , "first_name" : "Anil"}	{ "employee_id" : 2 , "first_name" : "Kamesh"}
> { "employee_id" : 2 , "first_name" : "Kamesh"}	{ "employee_id" : 1 , "first_name" : "Anil"}
> { "employee_id" : 2 , "first_name" : "Kamesh"}	{ "employee_id" : 2 , "first_name" : "Kamesh"}
> {noformat}



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

Mime
View raw message