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 2020/06/17 12:02:39 UTC

[GitHub] [arrow] tianchen92 commented on a change in pull request #6156: ARROW-7539: [Java] FieldVector getFieldBuffers API should not set reader/writer indices

tianchen92 commented on a change in pull request #6156:
URL: https://github.com/apache/arrow/pull/6156#discussion_r441492478



##########
File path: java/vector/src/main/java/org/apache/arrow/vector/complex/ListVector.java
##########
@@ -662,15 +661,11 @@ public void reset() {
   public ArrowBuf[] getBuffers(boolean clear) {
     setReaderAndWriterIndex();
     final ArrowBuf[] buffers;
-    if (getBufferSize() == 0) {
-      buffers = new ArrowBuf[0];
-    } else {
-      List<ArrowBuf> list = new ArrayList<>();
-      list.add(offsetBuffer);
-      list.add(validityBuffer);
-      list.addAll(Arrays.asList(vector.getBuffers(false)));
-      buffers = list.toArray(new ArrowBuf[list.size()]);
-    }
+    List<ArrowBuf> list = new ArrayList<>();
+    list.add(validityBuffer);
+    list.add(offsetBuffer);

Review comment:
       @projjal Thanks for your testing result!
   Seems like a legacy problem here, and I think validityBuffer->offsetBuffer should be the right order considering other vectors.
   @jacques-n @pravindra  any thoughts on how to resolve the conflicts? :)




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