You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/05/24 12:17:40 UTC

[GitHub] [arrow] tom-s-powell commented on a diff in pull request #12692: ARROW-16005: [Java] Fix ArrayConsumer when using ArrowVectorIterator

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


##########
java/adapter/jdbc/src/main/java/org/apache/arrow/adapter/jdbc/ArrowVectorIterator.java:
##########
@@ -134,11 +122,26 @@ private VectorSchemaRoot createVectorSchemaRoot() {
       }
       throw new RuntimeException("Error occurred while creating schema root.", e);
     }
+
+    // ensure consumers have been initialized
+    ensureInitialized(root);
     return root;
   }
 
+  private void ensureInitialized(VectorSchemaRoot root) throws SQLException {
+    if (!initialized) {

Review Comment:
   Ah yes good point!



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org