emkornfield commented on a change in pull request #10983:
URL: https://github.com/apache/arrow/pull/10983#discussion_r700732056
##########
File path:
java/adapter/jdbc/src/main/java/org/apache/arrow/adapter/jdbc/ArrowVectorIterator.java
##########
@@ -137,48 +139,46 @@ private VectorSchemaRoot createVectorSchemaRoot() {
// Loads the next schema root or null if no more rows are available.
private void load(VectorSchemaRoot root) throws SQLException {
-
- for (int i = 1; i <= consumers.length; i++) {
- consumers[i -
1].resetValueVector(root.getVector(rsmd.getColumnLabel(i)));
+ for (int i = 0; i < consumers.length; i++) {
+ consumers[i].resetValueVector(root.getVector(i));
}
consumeData(root);
-
- if (root.getRowCount() == 0) {
- root.close();
- nextBatch = null;
- } else {
- nextBatch = root;
- }
}
@Override
public boolean hasNext() {
- return nextBatch != null;
+ try {
+ return !resultSet.isAfterLast();
Review comment:
is this guaranteed to be implemented by most JDBC providers?
--
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]