FrankChen021 commented on code in PR #19946:
URL: https://github.com/apache/druid/pull/19946#discussion_r3749650175


##########
sql/src/main/java/org/apache/druid/sql/avatica/DruidJdbcResultSet.java:
##########
@@ -130,7 +130,7 @@ public Meta.Frame call()
         rowCount++;
       }
 
-      final Meta.Frame result = new Meta.Frame(offset, yielder.isDone(), rows);
+      final Meta.Frame result = new Meta.Frame(offset, yielder.isDone() || 
offset >= limit, rows);

Review Comment:
   [P1] Row-limit completion checks the pre-fetch offset
   
   When the current frame reaches the configured limit, offset has not yet been 
incremented, so done remains false and the client must request an extra empty 
frame before the result set terminates. Check offset + rowCount >= limit, or 
increment before checking, so the final frame is terminal.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to