You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/08/31 06:59:19 UTC

[GitHub] [arrow] liyafan82 commented on a change in pull request #11029: ARROW-13792 [Java]: The toString representation is incorrect for unsigned integer vectors

liyafan82 commented on a change in pull request #11029:
URL: https://github.com/apache/arrow/pull/11029#discussion_r699038480



##########
File path: java/vector/src/test/java/org/apache/arrow/vector/TestValueVector.java
##########
@@ -2791,6 +2791,38 @@ public void testToString() {
     }
   }
 
+  @Test
+  public void testUInt1VectorToString() {
+    try (final UInt1Vector uInt1Vector = new UInt1Vector("uInt1Vector", allocator)) {
+      setVector(uInt1Vector, (byte) 0xff);
+      assertEquals("[255]", uInt1Vector.toString());
+    }
+  }
+
+  @Test
+  public void testUInt2VectorToString() {
+    try (final UInt2Vector uInt2Vector = new UInt2Vector("uInt2Vector", allocator)) {
+      setVector(uInt2Vector, (char) 0xffff);
+      assertEquals("[" + new Character((char) 0xffff) + "]", uInt2Vector.toString());

Review comment:
       Thanks for your feedback. Revised accordingly. 




-- 
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.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org