cgivre commented on a change in pull request #2414:
URL: https://github.com/apache/drill/pull/2414#discussion_r779657432



##########
File path: 
contrib/storage-http/src/main/java/org/apache/drill/exec/store/http/HttpBatchReader.java
##########
@@ -216,13 +246,15 @@ protected HttpProxyConfig proxySettings(Config 
drillConfig, HttpUrl url) {
 
   @Override
   public boolean next() {
-    recordCount++;
+    boolean result = jsonLoader.readBatch();
 
-    // Stop after the limit has been reached
-    if (maxRecords >= 1 && recordCount > maxRecords) {
-      return false;
+    // Allows limitless pagination.
+    if (paginator != null &&
+      maxRecords < 0 && (resultSetLoader.totalRowCount()) < 
paginator.getMaxPageSize()) {
+      logger.debug("Ending pagination: Pages too small");

Review comment:
       Fixed.




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