drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Gokhman (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DRILL-4307) new MongoDB BSON record reader breaks _id SELECT-ion
Date Sun, 24 Jan 2016 17:03:39 GMT

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

Michael Gokhman commented on DRILL-4307:
----------------------------------------

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)

Mime
View raw message