adamkennedy commented on code in PR #38266:
URL: https://github.com/apache/arrow/pull/38266#discussion_r1361166092


##########
java/vector/src/main/java/org/apache/arrow/vector/LargeVarCharVector.java:
##########
@@ -120,12 +123,28 @@ public byte[] get(int index) {
    * @return Text object for non-null element, null otherwise
    */
   public Text getObject(int index) {
-    byte[] b = get(index);
-    if (b == null) {
+    assert index >= 0;
+    if (NULL_CHECKING_ENABLED && isSet(index) == 0) {
       return null;
-    } else {
-      return new Text(b);
     }
+
+    final Text result = new Text();
+    readBytes(index, result);
+    return result;
+  }
+
+  /**
+   * Read the value at the given position to the given output buffer.
+   * The caller is responsible for checking for nullity first.
+   *
+   * @param index position of element.
+   * @param outputBuffer the buffer to write into.
+   */
+  public void readBytes(int index, ReusableBuffer<?> outputBuffer) {
+    final long startOffset = getStartOffset(index);
+    final int dataLength =

Review Comment:
   Similar to above comment, I thought main purpose of the Large variants was 
to allow for values larger than max integer.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to