lidavidm commented on code in PR #43583:
URL: https://github.com/apache/arrow/pull/43583#discussion_r1716123188


##########
java/vector/src/main/java/org/apache/arrow/vector/complex/AbstractStructVector.java:
##########
@@ -382,12 +382,23 @@ public VectorWithOrdinal getChildVectorWithOrdinal(String 
name) {
     return new VectorWithOrdinal(vector, ordinal);
   }
 
+  /**
+   * Return the underlying buffers associated with this vector. Note that this 
doesn't impact the
+   * reference counts for this buffer, so it only should be used for 
in-context access. Also note
+   * that this buffer changes regularly, thus external classes shouldn't hold 
a reference to it
+   * (unless they change it).
+   *
+   * @param clear Whether to clear vector before returning, the buffers will 
still be refcounted but
+   *     the returned array will be the only reference to them. Also, this 
won't clear the child
+   *     buffers.
+   * @return The underlying {@link ArrowBuf buffers} that is used by this 
vector instance.
+   */
   @Override
   public ArrowBuf[] getBuffers(boolean clear) {
     final List<ArrowBuf> buffers = new ArrayList<>();
 
     for (final ValueVector vector : vectors.values()) {
-      for (final ArrowBuf buf : vector.getBuffers(false)) {
+      for (final ArrowBuf buf : vector.getBuffers(clear)) {

Review Comment:
   We _don't_ want to do this now, right?



-- 
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-unsubscr...@arrow.apache.org

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

Reply via email to