MongoDB Decimal128 Support

Hey I am using Dremio Latest version and Mongo DB 4.0. In collection we are using Decimal128 data type. I successfully connected to my Mongo DB but when I am trying to fetch the data it is showing the following error.

Please let me know if you need more information.

Dremio 4.1.8 and older versions use an older version of MongoDB’s JDBC driver, you could try to see if you get the same error with Dremio 4.1.8 or previous versions.

I tried with Dremio 4.1.8 and lower version but still getting the same error.

020-06-09T15:21:02.951+0000: [GC (Allocation Failure) [PSYoungGen: 678910K->106983K(695808K)] 841564K->275552K(967168K), 0.1526652 secs] [Times: user=0.27 sys=0.01, real=0.15 secs]
2020-06-09 15:21:09,656 [e0 - 21205726-76af-0233-82f6-c74c6f885300:frag:0:0] ERROR com.dremio.sabot.driver.SmartOp - UnsupportedOperationException
com.dremio.common.exceptions.UserException: UnsupportedOperationException
at com.dremio.common.exceptions.UserException$Builder.build(UserException.java:776) ~[dremio-common-4.1.8-202003120636020140-9c2a6b13.jar:4.1.8-202003120636020140-9c2a6b13]
at com.dremio.sabot.driver.SmartOp.contextualize(SmartOp.java:140) [dremio-sabot-kernel-4.1.8-202003120636020140-9c2a6b13.jar:4.1.8-202003120636020140-9c2a6b13]
at com.dremio.sabot.driver.SmartOp$SmartProducer.outputData(SmartOp.java:523) [dremio-sabot-kernel-4.1.8-202003120636020140-9c2a6b13.jar:4.1.8-202003120636020140-9c2a6b13]
at com.dremio.sabot.driver.StraightPipe.pump(StraightPipe.java:56) [dremio-sabot-kernel-4.1.8-202003120636020140-9c2a6b13.jar:4.1.8-202003120636020140-9c2a6b13]
at com.dremio.sabot.driver.Pipeline.doPump(Pipeline.java:109) [dremio-sabot-kernel-4.1.8-202003120636020140-9c2a6b13.jar:4.1.8-202003120636020140-9c2a6b13]
at com.dremio.sabot.driver.Pipeline.pumpOnce(Pipeline.java:99) [dremio-sabot-kernel-4.1.8-202003120636020140-9c2a6b13.jar:4.1.8-202003120636020140-9c2a6b13]
at com.dremio.sabot.exec.fragment.FragmentExecutor$DoAsPumper.run(FragmentExecutor.java:336) [dremio-sabot-kernel-4.1.8-202003120636020140-9c2a6b13.jar:4.1.8-202003120636020140-9c2a6b13]
at com.dremio.sabot.exec.fragment.FragmentExecutor.run(FragmentExecutor.java:285) [dremio-sabot-kernel-4.1.8-202003120636020140-9c2a6b13.jar:4.1.8-202003120636020140-9c2a6b13]
at com.dremio.sabot.exec.fragment.FragmentExecutor.access$1200(FragmentExecutor.java:92) [dremio-sabot-kernel-4.1.8-202003120636020140-9c2a6b13.jar:4.1.8-202003120636020140-9c2a6b13]
at com.dremio.sabot.exec.fragment.FragmentExecutor$AsyncTaskImpl.run(FragmentExecutor.java:674) [dremio-sabot-kernel-4.1.8-202003120636020140-9c2a6b13.jar:4.1.8-202003120636020140-9c2a6b13]
at com.dremio.sabot.task.AsyncTaskWrapper.run(AsyncTaskWrapper.java:104) [dremio-sabot-kernel-4.1.8-202003120636020140-9c2a6b13.jar:4.1.8-202003120636020140-9c2a6b13]
at com.dremio.sabot.task.slicing.SlicingThread.mainExecutionLoop(SlicingThread.java:226) [dremio-ce-sabot-scheduler-4.1.8-202003120636020140-9c2a6b13.jar:4.1.8-202003120636020140-9c2a6b13]
at com.dremio.sabot.task.slicing.SlicingThread.run(SlicingThread.java:156) [dremio-ce-sabot-scheduler-4.1.8-202003120636020140-9c2a6b13.jar:4.1.8-202003120636020140-9c2a6b13]
Caused by: java.lang.UnsupportedOperationException: null
at java.util.Collections$UnmodifiableMap.put(Collections.java:1459) ~[na:1.8.0_242]
at com.dremio.plugins.mongo.execution.BsonRecordReader.writeDecimal(BsonRecordReader.java:336) ~[dremio-ce-mongo-plugin-4.1.8-202003120636020140-9c2a6b13.jar:4.1.8-202003120636020140-9c2a6b13]
at com.dremio.plugins.mongo.execution.BsonRecordReader.writeToListOrMap(BsonRecordReader.java:145) ~[dremio-ce-mongo-plugin-4.1.8-202003120636020140-9c2a6b13.jar:4.1.8-202003120636020140-9c2a6b13]
at com.dremio.plugins.mongo.execution.BsonRecordReader.writeToListOrMap(BsonRecordReader.java:141) ~[dremio-ce-mongo-plugin-4.1.8-202003120636020140-9c2a6b13.jar:4.1.8-202003120636020140-9c2a6b13]
at com.dremio.plugins.mongo.execution.BsonRecordReader.write(BsonRecordReader.java:65) ~[dremio-ce-mongo-plugin-4.1.8-202003120636020140-9c2a6b13.jar:4.1.8-202003120636020140-9c2a6b13]
at com.dremio.plugins.mongo.execution.MongoRecordReader.next(MongoRecordReader.java:251) ~[dremio-ce-mongo-plugin-4.1.8-202003120636020140-9c2a6b13.jar:4.1.8-202003120636020140-9c2a6b13]
at com.dremio.sabot.op.scan.ScanOperator.outputData(ScanOperator.java:236) ~[dremio-sabot-kernel-4.1.8-202003120636020140-9c2a6b13.jar:4.1.8-202003120636020140-9c2a6b13]
at com.dremio.sabot.driver.SmartOp$SmartProducer.outputData(SmartOp.java:521) [dremio-sabot-kernel-4.1.8-202003120636020140-9c2a6b13.jar:4.1.8-202003120636020140-9c2a6b13]
… 10 common frames omitted

I tried with Dremio 4.1.8 and lower version but still getting the same error.

020-06-09T15:21:02.951+0000: [GC (Allocation Failure) [PSYoungGen: 678910K->106983K(695808K)] 841564K->275552K(967168K), 0.1526652 secs] [Times: user=0.27 sys=0.01, real=0.15 secs]
2020-06-09 15:21:09,656 [e0 - 21205726-76af-0233-82f6-c74c6f885300:frag:0:0] ERROR com.dremio.sabot.driver.SmartOp - UnsupportedOperationException
com.dremio.common.exceptions.UserException: UnsupportedOperationException
at com.dremio.common.exceptions.UserException$Builder.build(UserException.java:776) ~[dremio-common-4.1.8-202003120636020140-9c2a6b13.jar:4.1.8-202003120636020140-9c2a6b13]
at com.dremio.sabot.driver.SmartOp.contextualize(SmartOp.java:140) [dremio-sabot-kernel-4.1.8-202003120636020140-9c2a6b13.jar:4.1.8-202003120636020140-9c2a6b13]
at com.dremio.sabot.driver.SmartOp$SmartProducer.outputData(SmartOp.java:523) [dremio-sabot-kernel-4.1.8-202003120636020140-9c2a6b13.jar:4.1.8-202003120636020140-9c2a6b13]
at com.dremio.sabot.driver.StraightPipe.pump(StraightPipe.java:56) [dremio-sabot-kernel-4.1.8-202003120636020140-9c2a6b13.jar:4.1.8-202003120636020140-9c2a6b13]
at com.dremio.sabot.driver.Pipeline.doPump(Pipeline.java:109) [dremio-sabot-kernel-4.1.8-202003120636020140-9c2a6b13.jar:4.1.8-202003120636020140-9c2a6b13]
at com.dremio.sabot.driver.Pipeline.pumpOnce(Pipeline.java:99) [dremio-sabot-kernel-4.1.8-202003120636020140-9c2a6b13.jar:4.1.8-202003120636020140-9c2a6b13]
at com.dremio.sabot.exec.fragment.FragmentExecutor$DoAsPumper.run(FragmentExecutor.java:336) [dremio-sabot-kernel-4.1.8-202003120636020140-9c2a6b13.jar:4.1.8-202003120636020140-9c2a6b13]
at com.dremio.sabot.exec.fragment.FragmentExecutor.run(FragmentExecutor.java:285) [dremio-sabot-kernel-4.1.8-202003120636020140-9c2a6b13.jar:4.1.8-202003120636020140-9c2a6b13]
at com.dremio.sabot.exec.fragment.FragmentExecutor.access$1200(FragmentExecutor.java:92) [dremio-sabot-kernel-4.1.8-202003120636020140-9c2a6b13.jar:4.1.8-202003120636020140-9c2a6b13]
at com.dremio.sabot.exec.fragment.FragmentExecutor$AsyncTaskImpl.run(FragmentExecutor.java:674) [dremio-sabot-kernel-4.1.8-202003120636020140-9c2a6b13.jar:4.1.8-202003120636020140-9c2a6b13]
at com.dremio.sabot.task.AsyncTaskWrapper.run(AsyncTaskWrapper.java:104) [dremio-sabot-kernel-4.1.8-202003120636020140-9c2a6b13.jar:4.1.8-202003120636020140-9c2a6b13]
at com.dremio.sabot.task.slicing.SlicingThread.mainExecutionLoop(SlicingThread.java:226) [dremio-ce-sabot-scheduler-4.1.8-202003120636020140-9c2a6b13.jar:4.1.8-202003120636020140-9c2a6b13]
at com.dremio.sabot.task.slicing.SlicingThread.run(SlicingThread.java:156) [dremio-ce-sabot-scheduler-4.1.8-202003120636020140-9c2a6b13.jar:4.1.8-202003120636020140-9c2a6b13]
Caused by: java.lang.UnsupportedOperationException: null
at java.util.Collections$UnmodifiableMap.put(Collections.java:1459) ~[na:1.8.0_242]
at com.dremio.plugins.mongo.execution.BsonRecordReader.writeDecimal(BsonRecordReader.java:336) ~[dremio-ce-mongo-plugin-4.1.8-202003120636020140-9c2a6b13.jar:4.1.8-202003120636020140-9c2a6b13]
at com.dremio.plugins.mongo.execution.BsonRecordReader.writeToListOrMap(BsonRecordReader.java:145) ~[dremio-ce-mongo-plugin-4.1.8-202003120636020140-9c2a6b13.jar:4.1.8-202003120636020140-9c2a6b13]
at com.dremio.plugins.mongo.execution.BsonRecordReader.writeToListOrMap(BsonRecordReader.java:141) ~[dremio-ce-mongo-plugin-4.1.8-202003120636020140-9c2a6b13.jar:4.1.8-202003120636020140-9c2a6b13]
at com.dremio.plugins.mongo.execution.BsonRecordReader.write(BsonRecordReader.java:65) ~[dremio-ce-mongo-plugin-4.1.8-202003120636020140-9c2a6b13.jar:4.1.8-202003120636020140-9c2a6b13]
at com.dremio.plugins.mongo.execution.MongoRecordReader.next(MongoRecordReader.java:251) ~[dremio-ce-mongo-plugin-4.1.8-202003120636020140-9c2a6b13.jar:4.1.8-202003120636020140-9c2a6b13]
at com.dremio.sabot.op.scan.ScanOperator.outputData(ScanOperator.java:236) ~[dremio-sabot-kernel-4.1.8-202003120636020140-9c2a6b13.jar:4.1.8-202003120636020140-9c2a6b13]
at com.dremio.sabot.driver.SmartOp$SmartProducer.outputData(SmartOp.java:521) [dremio-sabot-kernel-4.1.8-202003120636020140-9c2a6b13.jar:4.1.8-202003120636020140-9c2a6b13]
… 10 common frames omitted

@RGupta2020

Currently we only support Mongo 3.x, we are in the process of releasing support for Mongo 4.x

The release notes will have the update when it is available

Thaks
@balaji.ramaswamy