[
https://issues.apache.org/jira/browse/DRILL-7094?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17250471#comment-17250471
]
ASF GitHub Bot commented on DRILL-7094:
---------------------------------------
vvysotskyi commented on a change in pull request #2128:
URL: https://github.com/apache/drill/pull/2128#discussion_r544476918
##########
File path:
exec/java-exec/src/main/java/org/apache/drill/exec/store/bson/BsonRecordReader.java
##########
@@ -356,7 +358,25 @@ private void writeInt32(int readInt32, final
MapOrListWriterImpl writer, String
}
}
- public void ensureAtLeastOneField(ComplexWriter writer) {
+ private void writeDecimal128(BigDecimal readBigDecimal, final
MapOrListWriterImpl writer, String fieldName, boolean isList) {
+ final VarDecimalHolder varDecimalHolder = new VarDecimalHolder();
+ byte[] bytes = readBigDecimal.unscaledValue().toByteArray();
+ ensure(bytes.length);
+ workBuf.setBytes(0, bytes);
+ varDecimalHolder.buffer = workBuf;
+ varDecimalHolder.scale = readBigDecimal.scale();
+ varDecimalHolder.precision = readBigDecimal.precision();
+ varDecimalHolder.start = 0;
+ varDecimalHolder.end = bytes.length;
+ if (isList == false) {
+ writer.varDecimal(fieldName, varDecimalHolder.precision,
varDecimalHolder.scale).write(varDecimalHolder);
+ } else {
+ writer.list.varDecimal().write(varDecimalHolder);
+ }
Review comment:
You haven't removed the code where creating varDecimalHolder, it is not
required for now.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> UnSupported Bson type: DECIMAL128 Mongodb 3.6 onwards
> -----------------------------------------------------
>
> Key: DRILL-7094
> URL: https://issues.apache.org/jira/browse/DRILL-7094
> Project: Apache Drill
> Issue Type: Bug
> Components: Storage - MongoDB
> Affects Versions: 1.15.0
> Reporter: Binod Sarkar
> Priority: Major
> Fix For: 1.19.0
>
>
> DECIMAL128 not working with Mongodb 3.6 onwards. Showing same errorĀ *Error:
> INTERNAL_ERROR ERROR: UnSupported Bson type: DECIMAL128*
--
This message was sent by Atlassian Jira
(v8.3.4#803005)