You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Michael Gokhman (JIRA)" <ji...@apache.org> on 2016/01/24 18:03:39 UTC

[jira] [Issue Comment Deleted] (DRILL-4307) new MongoDB BSON record reader breaks _id SELECT-ion

     [ https://issues.apache.org/jira/browse/DRILL-4307?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Gokhman updated DRILL-4307:
-----------------------------------
    Comment: was deleted

(was: ok thanks, I indeed managed to select using:

{code}
SELECT * from mongo.db.collection WHERE _id=BINARY_STRING('V)x\x84H0\x8F\x11\x94\x11\x1Eq') limit 1;
{code}

And I also see that the binary value is a hex-decoding of the original $oid. in python:
{code}
'V)x\x84H0\x8F\x11\x94\x11\x1Eq'.encode('hex') = '5629788448308f1194111e71'
{code}

I think it will be much more intuitive if instead of the pointer-thing, the SELECT will simply return the original $oid string, i.e. 
"5629788448308f1194111e71" in the case above (as returned by mongo cli)

Thanks

)

> new MongoDB BSON record reader breaks _id SELECT-ion
> ----------------------------------------------------
>
>                 Key: DRILL-4307
>                 URL: https://issues.apache.org/jira/browse/DRILL-4307
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Storage - MongoDB
>    Affects Versions: 1.5.0
>            Reporter: Michael Gokhman
>
> in Drill 1.4, SELECT-ing an _id results in:
> {code}
> {"$oid":"567ff2697f2310849fea0666"} 
> {code}
> as expected.
> however, when working with the master branch, SELECT-ing an _id results in a something that looks like a pointer:
> {code}
> [B@3149a…]
> {code}
> This is caused by DRILL-3478, and can be avoided by disabling the new BSON record reder:
> {code:sql}
> ALTER SESSION SET store.mongo.bson.record.reader = false
> {code}



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