8000 MINOR: Add explicit exception when no more buffer can be read when loading buffers by viirya · Pull Request #649 · apache/arrow-java · GitHub
[go: up one dir, main page]

Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,10 @@ private void loadBuffers(
(int) (variadicBufferLayoutCount + TypeLayout.getTypeBufferCount(field.getType()));
List<ArrowBuf> ownBuffers = new ArrayList<>(bufferLayoutCount);
for (int j = 0; j < bufferLayoutCount; j++) {
if (!buffers.hasNext()) {
throw new IllegalArgumentException(
"no more buffers for field " + field + ". Expected " + bufferLayoutCount);
}
ArrowBuf nextBuf = buffers.next();
// for vectors without nulls, the buffer is empty, so there is no need to decompress it.
ArrowBuf bufferToAdd =
Expand Down
Loading
0