tianchen92 commented on a change in pull request #6912: URL: https://github.com/apache/arrow/pull/6912#discussion_r415229312
########## File path: java/vector/src/main/java/org/apache/arrow/vector/complex/NonNullableStructVector.java ########## @@ -320,6 +322,20 @@ public int hashCode(int index, ArrowBufHasher hasher) { return visitor.visit(this, value); } + @Override + public void validate() { + if (getValueCount() < 0) { + throw new RuntimeException("vector valueCount is negative"); + } + + if (getNullCount() > getValueCount()) { Review comment: Thanks, fixed. ---------------------------------------------------------------- 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: us...@infra.apache.org