emkornfield commented on a change in pull request #7837:
URL: https://github.com/apache/arrow/pull/7837#discussion_r463913775
##########
File path:
java/algorithm/src/main/java/org/apache/arrow/algorithm/sort/FixedWidthOutOfPlaceVectorSorter.java
##########
@@ -44,6 +45,13 @@ public void sortOutOfPlace(V srcVector, V dstVector,
VectorValueComparator<V> co
ArrowBuf dstValidityBuffer = dstVector.getValidityBuffer();
ArrowBuf dstValueBuffer = dstVector.getDataBuffer();
+ // check buffer size
+ Preconditions.checkArgument(dstValidityBuffer.capacity() * 8 >=
srcVector.getValueCount(),
+ "No enough capacity for the validity buffer of the dst vector");
Review comment:
nit: here and other locations "No" -> "Not". It might also pay to
include actual values using format strings in the error message.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]