tom-s-powell commented on code in PR #12692:
URL: https://github.com/apache/arrow/pull/12692#discussion_r881557986


##########
java/adapter/jdbc/src/main/java/org/apache/arrow/adapter/jdbc/consumer/ArrayConsumer.java:
##########
@@ -90,13 +97,12 @@ public void consume(ResultSet resultSet) throws 
SQLException, IOException {
         int count = 0;
         try (ResultSet rs = array.getResultSet()) {
           while (rs.next()) {
-            ensureInnerVectorCapacity(innerVectorIndex + count + 1);

Review Comment:
   I've reverted the change to `innerVectorIndex`. Only thing I've done is 
reset it to 0 when we reset inner vector.
   
   I've added unit tests for Arrays which covers the two issues when reusing 
`VectorSchemaRoot`:
   1) NPE error from `ArrowVectorIterator`.
   2) `ArrayConsumer` not reseting the delegate consumer.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to