[ 
https://issues.apache.org/jira/browse/ARROW-1717?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16243127#comment-16243127
 ] 

ASF GitHub Bot commented on ARROW-1717:
---------------------------------------

icexelloss commented on a change in pull request #1290: ARROW-1717: Refactor 
JsonReader
URL: https://github.com/apache/arrow/pull/1290#discussion_r149543200
 
 

 ##########
 File path: 
java/vector/src/main/java/org/apache/arrow/vector/file/json/JsonFileReader.java
 ##########
 @@ -183,6 +185,282 @@ public VectorSchemaRoot read() throws IOException {
     }
   }
 
+  private abstract class BufferReader {
+    abstract protected ArrowBuf read(BufferAllocator allocator, int count) 
throws IOException;
+
+    final ArrowBuf readBuffer(BufferAllocator allocator, int count) throws 
IOException {
+      readToken(START_ARRAY);
+      ArrowBuf buf = read(allocator, count);
+      readToken(END_ARRAY);
+      return buf;
+    }
+  }
+
+  private class BufferHelper {
+     BufferReader BIT = new BufferReader() {
+
+      @Override
+      protected ArrowBuf read(BufferAllocator allocator, int count) throws 
IOException {
+        final int bufferSize = BitVectorHelper.getValidityBufferSize(count);
+        ArrowBuf buf = allocator.buffer(bufferSize);
+
+        // C++ integration test fails without this.
+        buf.setZero(0, bufferSize);
 
 Review comment:
   See https://issues.apache.org/jira/browse/ARROW-1779

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


> [Java] Remove public static helper method in vector classes for 
> JSONReader/Writer
> ---------------------------------------------------------------------------------
>
>                 Key: ARROW-1717
>                 URL: https://issues.apache.org/jira/browse/ARROW-1717
>             Project: Apache Arrow
>          Issue Type: Sub-task
>            Reporter: Li Jin
>            Assignee: Li Jin
>              Labels: pull-request-available
>             Fix For: 0.8.0
>
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to