Skip to content

Commit

Permalink
fix: removing size=0 case for listview
Browse files Browse the repository at this point in the history
  • Loading branch information
vibhatha committed Jul 30, 2024
1 parent 8b4438e commit 92f8065
Showing 1 changed file with 0 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -281,14 +281,6 @@ private void writeFromVectorIntoJson(Field field, FieldVector vector) throws IOE
vectorBufferTmp.setLong(0, 0);
writeValueToGenerator(bufferType, vectorBufferTmp, null, vector, i);
}
} else if (bufferType.equals(SIZE)
&& vector.getValueCount() == 0
&& vector.getMinorType() == MinorType.LISTVIEW) {
// Empty vectors may not have allocated a sizes buffer
try (ArrowBuf vectorBufferTmp = vector.getAllocator().buffer(4)) {
vectorBufferTmp.setInt(0, 0);
writeValueToGenerator(bufferType, vectorBufferTmp, null, vector, i);
}
} else {
writeValueToGenerator(bufferType, vectorBuffer, null, vector, i);
}
Expand Down

0 comments on commit 92f8065

Please sign in to comment.