haridsv commented on code in PR #2176:
URL: https://github.com/apache/phoenix/pull/2176#discussion_r2128045531


##########
phoenix-core-client/src/main/java/org/apache/phoenix/jdbc/PhoenixPrefetchedResultSet.java:
##########
@@ -42,7 +42,8 @@ public PhoenixPrefetchedResultSet(RowProjector rowProjector,
 
   @Override
   protected Tuple getCurrentRowImpl() {
-    return prefetchedRows.get(prefetchedRowsIndex++);
+    return prefetchedRows.size() > prefetchedRowsIndex ? 
prefetchedRows.get(prefetchedRowsIndex++)
+            : null;

Review Comment:
   Thanks! I also 
[added](https://github.com/apache/phoenix/pull/2176/files#diff-064ec4a242ed8c46fdd6c4597fa03cf2f7aae5366c97aba1d87c3ae8b15f3017R503)
 an explicit next() to catch this.



-- 
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: issues-unsubscr...@phoenix.apache.org

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

Reply via email to