You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2015/10/20 11:38:27 UTC

[jira] [Commented] (DRILL-3505) MongoDB _id is returned as null when t.*, t._id is used in the projection

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

ASF GitHub Bot commented on DRILL-3505:
---------------------------------------

GitHub user tgrall opened a pull request:

    https://github.com/apache/drill/pull/210

    Add the _id when using a * projection see JIRA : DRILL-3505

    When the user is doing STAR_COLUMN , the system now asks mongodb to return the _id.
    
    Behing the scene the mongo query does not have any field  in the projection, so it returns all fields including the _id.
    
    I was not able to run succesfully any test in the current branch so I could not add test. (will ask question on ml)

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/tgrall/drill DRILL-3505

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/drill/pull/210.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #210
    
----
commit 2e3229d20a8e06920f8f6102568fe9779abfddb3
Author: Tugdual Grall <tu...@gmail.com>
Date:   2015-10-20T09:32:37Z

    Add the _id when using a * projection see JIRA : DRILL-3505

----


> MongoDB _id is returned as null when  t.*, t._id is used in the projection
> --------------------------------------------------------------------------
>
>                 Key: DRILL-3505
>                 URL: https://issues.apache.org/jira/browse/DRILL-3505
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Storage - MongoDB
>    Affects Versions: 1.1.0
>         Environment: Drill 1.1 Stand alone
> Java 8 OSX
> MongoDB 3.0.4
>            Reporter: Tugdual Grall
>            Priority: Minor
>             Fix For: Future
>
>
> By default, and choice of implementation the _id is not visible when using
> {code}
> select * from mongo.db.collection c
> {code}
> and this is OK
> However, if I want to return the _id I need to specify it in the projection
> {code}
> select c._id , c.name from mongo.db.collection c
> {code}
> but if I want "all the column" I would like to be able to write:
> {code}
> select c._id , c.* from mongo.db.collection c
> {code}
> but this return "NULL" for the _id column



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