vvysotskyi commented on a change in pull request #1695: DRILL-7103: Incorrect 
conversion to integer in BsonRecordReader#writeTimeStamp
URL: https://github.com/apache/drill/pull/1695#discussion_r266371875
 
 

 ##########
 File path: 
exec/java-exec/src/test/java/org/apache/drill/exec/store/bson/TestBsonRecordReader.java
 ##########
 @@ -81,11 +81,13 @@ public void testIntType() throws IOException {
   @Test
   public void testTimeStampType() throws IOException {
     BsonDocument bsonDoc = new BsonDocument();
-    bsonDoc.append("ts", new BsonTimestamp(1000, 10));
+    bsonDoc.append("ts_small", new BsonTimestamp(1000, 10));
+    bsonDoc.append("ts_large", new BsonTimestamp(1000000000, 10));
     writer.reset();
     bsonReader.write(writer, new BsonDocumentReader(bsonDoc));
     SingleMapReaderImpl mapReader = (SingleMapReaderImpl) 
writer.getMapVector().getReader();
-    assertEquals(1000000l, 
mapReader.reader("ts").readLocalDateTime().atZone(ZoneOffset.systemDefault()).toInstant().toEpochMilli());
+    assertEquals(1000000l, 
mapReader.reader("ts_small").readLocalDateTime().atZone(ZoneOffset.systemDefault()).toInstant().toEpochMilli());
 
 Review comment:
   Please change`l` to upper case.
   ```suggestion
       assertEquals(1000000L, 
mapReader.reader("ts_small").readLocalDateTime().atZone(ZoneOffset.systemDefault()).toInstant().toEpochMilli());
   ```

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to