Skip to content

Commit

Permalink
comment
Browse files Browse the repository at this point in the history
  • Loading branch information
ViggoC committed Jan 24, 2025
1 parent b431cf0 commit 16c9e2f
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1368,8 +1368,8 @@ protected final void setBytes(int index, byte[] value, int start, int length) {
int writePosition = index * ELEMENT_SIZE;

if (length <= INLINE_SIZE) {
// to clear the memory segment of view being written to
// if it has been set
// Check if the memory segment has been written, and clear it if it has been set.
// It is recommended to batch initialize the viewBuffer before setBytes.
if (viewBuffer.getLong(writePosition) != 0 || viewBuffer.getLong(writePosition + 8) != 0) {
viewBuffer.setZero(writePosition, ELEMENT_SIZE);
}
Expand Down Expand Up @@ -1414,8 +1414,8 @@ protected final void setBytes(int index, ArrowBuf valueBuf, int start, int lengt
int writePosition = index * ELEMENT_SIZE;

if (length <= INLINE_SIZE) {
// to clear the memory segment of view being written to
// if it has been set
// Check if the memory segment has been written, and clear it if it has been set.
// It is recommended to batch initialize the viewBuffer before setBytes.
if (viewBuffer.getLong(writePosition) != 0 || viewBuffer.getLong(writePosition + 8) != 0) {
viewBuffer.setZero(writePosition, ELEMENT_SIZE);
}
Expand Down

0 comments on commit 16c9e2f

Please sign in to comment.