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: [email protected]

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

Reply via email to