adarshsanjeev commented on code in PR #14512:
URL: https://github.com/apache/druid/pull/14512#discussion_r1250168251


##########
extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/sql/resources/SqlStatementResource.java:
##########
@@ -284,28 +285,25 @@ public Response doGetResults(
       }
       final AuthenticationResult authenticationResult = 
AuthorizationUtils.authenticationResultFromRequest(req);
 
-      if (offset != null && offset < 0) {
+      if (page == null) {
         return buildNonOkResponse(
             DruidException.forPersona(DruidException.Persona.USER)
                           .ofCategory(DruidException.Category.INVALID_INPUT)
                           .build(
-                              "offset cannot be negative. Please pass a 
positive number."
+                              "Page cannot be null."
                           )
         );
       }
-      if (numberOfRows != null && numberOfRows < 0) {
+      if (page < 0) {
         return buildNonOkResponse(
             DruidException.forPersona(DruidException.Persona.USER)
                           .ofCategory(DruidException.Category.INVALID_INPUT)
                           .build(
-                              "numRows cannot be negative. Please pass a 
positive number."
+                              "Page cannot be negative. Please pass a positive 
number."
                           )
         );
       }
 

Review Comment:
   I have added this check below as "if page > 0" for the report since we don't 
really have a list of pages to check the index for yet and manually creating a 
list of a single page to check this doesn't make sense



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