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

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

icexelloss commented on a change in pull request #1316: ARROW-1476: [JAVA] 
Implement Final ValueVector Updates
URL: https://github.com/apache/arrow/pull/1316#discussion_r151149051
 
 

 ##########
 File path: 
java/vector/src/main/java/org/apache/arrow/vector/BaseNullableVariableWidthVector.java
 ##########
 @@ -836,17 +858,259 @@ public int getLastSet() {
     * @return starting offset for the element
     */
    public long getStartEnd(int index) {
-      return (long)offsetBuffer.getInt(index * OFFSET_WIDTH);
+      return offsetBuffer.getLong(index * OFFSET_WIDTH);
    }
 
    /**
     * Mark the particular position in the vector as non-null.
     *
     * @param index position of the element.
     */
+   @Override
    public void setIndexDefined(int index) {
-      handleSafe(index, 0);
+      while (index >= getValidityBufferValueCapacity()) {
+         validityBuffer = reallocBufferHelper(validityBuffer, false);
+      }
+      BitVectorHelper.setValidityBitToOne(validityBuffer, index);
+   }
+
+   /**
+    * Sets the value length for an element.
+    *
+    * @param index   position of the element to set
+    * @param length  length of the element
+    */
+   public void setValueLengthSafe(int index, int length) {
 
 Review comment:
   Ping @siddharthteotia , can you explain why do we need this as a public API? 
When would a user want to just sent length for an element?

----------------------------------------------------------------
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] Implement final ValueVector updates
> ------------------------------------------
>
>                 Key: ARROW-1476
>                 URL: https://issues.apache.org/jira/browse/ARROW-1476
>             Project: Apache Arrow
>          Issue Type: Sub-task
>            Reporter: Jacques Nadeau
>            Assignee: Siddharth Teotia
>              Labels: pull-request-available
>




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

Reply via email to