liyafan82 commented on a change in pull request #6912: URL: https://github.com/apache/arrow/pull/6912#discussion_r411352198
########## File path: java/vector/src/main/java/org/apache/arrow/vector/ValueVector.java ########## @@ -283,4 +283,10 @@ * @return the name of the vector. */ String getName(); + + /** + * Validate the vector, will throw exception if validate fail. + */ + void validate(); Review comment: I agree with you that it makes the client code simpler. IMO, the real benefits are 1) one fewer virtual function call; and 2) one fewer stack frame. However, the cost is that it makes the interface larger and difficult to maintain. In addition, adding new APIs to a public interface has the risk of crashing client code. So I think the method of adding new APIs should be reserved for performance-critical operations. ---------------------------------------------------------------- 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