[
https://issues.apache.org/jira/browse/DRILL-4558?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15822142#comment-15822142
]
ASF GitHub Bot commented on DRILL-4558:
---------------------------------------
Github user paul-rogers commented on a diff in the pull request:
https://github.com/apache/drill/pull/696#discussion_r96048977
--- Diff:
exec/java-exec/src/test/java/org/apache/drill/exec/store/bson/TestBsonRecordReader.java
---
@@ -103,6 +103,17 @@ public void testStringType() throws IOException {
}
@Test
+ public void testSpecialCharStringType() throws IOException {
+ BsonDocument bsonDoc = new BsonDocument();
+ bsonDoc.append("stringKey", new BsonString("§§§§§§§§§1"));
--- End diff --
Might want to put your value in a string, convert to byte but, and assert
that the byte buf length differs in length from the string length. This will
verify that this test is, in fact, testing the problem case.
> When a query returns diacritics in a string, the string is cut
> --------------------------------------------------------------
>
> Key: DRILL-4558
> URL: https://issues.apache.org/jira/browse/DRILL-4558
> Project: Apache Drill
> Issue Type: Bug
> Components: Storage - MongoDB
> Environment: Apache Drill 1.6
> MongoDB 3.2.1
> Reporter: Vincent Uribe
> Assignee: Chunhui Shi
>
> With the given document in a collection "Test" from a database testDb :
> {
> "_id" : ObjectId("56e7f1bd0944228aab06d0e2"),
> "ID_ATTRIBUT" : "3",
> "VAL_ATTRIBUT" : "Végétaux",
> "UPDATED" : ISODate("2016-01-09T23:00:00.000Z")
> }
> When querying select * from mongoStorage.testDb.Test I get
> _id: [B@affb65
> ID_ATTRIBUT: 3
> VAL_ATTRIBUT: *Végéta*
> UPDATED: 2016-01-09T23:00:00.000Z
> As you can see, the two 'é' cut the string "végétaux" by 2 characters, giving
> végéta.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)