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] [Commented] (DRILL-4307) new MongoDB BSON record reader breaks _id SELECT-ion
Date Sun, 24 Jan 2016 16:33:39 GMT

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

Jacques Nadeau commented on DRILL-4307:
---------------------------------------

The weird pointer thing is due to how Java converts a binary object into a string for printing.
The actual interface is simply an array of bytes. 

To see a binary representation of the value:
{code}
SELECT STRING_BINARY(_id) from t1
{code}

To compare to a known value:

{code}
SELECT * FROM t1 WHERE BINARY_STRING('\x00\x00...')
{code}

If you use the JDBC or ODBC interface directly, you are then just dealing with a byte[].



> 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