ViggoC commented on code in PR #557:
URL: https://github.com/apache/arrow-java/pull/557#discussion_r1928077801


##########
vector/src/main/java/org/apache/arrow/vector/BaseVariableWidthViewVector.java:
##########
@@ -1367,11 +1367,13 @@ protected ArrowBuf allocateOrGetLastDataBuffer(int 
length) {
   protected final void setBytes(int index, byte[] value, int start, int 
length) {
     int writePosition = index * ELEMENT_SIZE;
 
-    // to clear the memory segment of view being written to
-    // this is helpful in case of overwriting the value
-    viewBuffer.setZero(writePosition, ELEMENT_SIZE);
-
     if (length <= INLINE_SIZE) {
+      // to clear the memory segment of view being written to
+      // if it has been set
+      if (viewBuffer.getLong(writePosition) != 0 || 
viewBuffer.getLong(writePosition + 8) != 0) {

Review Comment:
   Update in 16c9e2f4bc5921a4d6e0572954b19b5f958dbf85



-- 
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