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

Bhallamudi Venkata Siva Kamesh commented on DRILL-4038:
-------------------------------------------------------

When the property store.mongo.read_numbers_as_double is *false*
{code}
0: jdbc:drill:zk=localhost:2181> ALTER SYSTEM SET 
`store.mongo.read_numbers_as_double` = false;
+-------+----------------------------------------------+
|  ok   |                   summary                    |
+-------+----------------------------------------------+
| true  | store.mongo.read_numbers_as_double updated.  |
+-------+----------------------------------------------+
1 row selected (0.28 seconds)

0: jdbc:drill:zk=localhost:2181> select * from input;
Error: SYSTEM ERROR: IllegalArgumentException: You tried to write a BigInt type 
when you are using a ValueWriter of type NullableFloat8WriterImpl.

Fragment 0:0
[Error Id: ad521f97-a1ef-4ba4-8beb-67470109b42f on localhost:31010] 
(state=,code=0)
{code}

When the property store.mongo.read_numbers_as_double is *true*
{code}
0: jdbc:drill:zk=localhost:2181> ALTER SYSTEM SET 
`store.mongo.read_numbers_as_double` = true;
+-------+----------------------------------------------+
|  ok   |                   summary                    |
+-------+----------------------------------------------+
| true  | store.mongo.read_numbers_as_double updated.  |
+-------+----------------------------------------------+
1 row selected (0.091 seconds)

0: jdbc:drill:zk=localhost:2181> select * from input;
+--------------------------------------+---------------------+
|                 _id                  | MoyLignesPreparees  |
+--------------------------------------+---------------------+
| {"$oid":"5622bcebf9f16d8b892d498e"}  | 0.0                 |
| {"$oid":"5622bcebf9f16d8b892d498d"}  | 0.5                 |
| {"$oid":"5622bcebf9f16d8b892d498f"}  | 100.0               |
| {"$oid":"5622bcebf9f16d8b892d498a"}  | 200.0               |
+--------------------------------------+---------------------+
4 rows selected (0.143 seconds)
{code}

Closing this as *Not A Problem*. Please feel free to reopen this, incase if you 
are still having issues

> [MongoDB] Exception on bson mixin
> ---------------------------------
>
>                 Key: DRILL-4038
>                 URL: https://issues.apache.org/jira/browse/DRILL-4038
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Storage - MongoDB
>    Affects Versions: 1.2.0
>         Environment: Drill running on Linux Suse 2.6
>            Reporter: W.
>
> org.apache.drill.common.exceptions.UserRemoteException: SYSTEM ERROR: 
> IllegalArgumentException: You tried to write a BigInt type when you are using 
> a ValueWriter of type NullableFloat8WriterImpl. Fragment 0:0 [Error Id: 
> 337c58a4-2f3c-4f12-bb9b-ecd2c58a9b65
> If collection owns data of different bson type 1 (double) and 16 (32 bits 
> integer), I'm getting the given exception
> Data:
> // 2 documents in the collection
> > db.test.find().pretty()
> { "_id" : ObjectId("5622bcebf9f16d8b892d498e"), "MoyLignesPreparees" : 0 }
> { "_id" : ObjectId("5622bcebf9f16d8b892d498d"), "MoyLignesPreparees" : 0.5 }
> // 2 types of data
> > db.test.count({ "MoyLignesPreparees": { $type: 1 } })
> 1
> > db.test.count({ "MoyLignesPreparees": { $type: 16 } })
> 1



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

Reply via email to