PrachiKhobragade commented on code in PR #8550:
URL: https://github.com/apache/pinot/pull/8550#discussion_r854543760


##########
pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/BaseBrokerRequestHandler.java:
##########
@@ -2151,6 +2152,18 @@ static void validateRequest(PinotQuery pinotQuery, int 
queryResponseLimit) {
         || !QueryOptionsUtils.isResponseFormatSQL(queryOptions)) {
       throw new IllegalStateException("SQL query should always have response 
format and group-by mode set to SQL");
     }
+    try {
+    // throw errors if options is less than 1 or invalid
+      Integer numReplicaGroupsToQuery = 
QueryOptionsUtils.getNumReplicaGroupsToQuery(queryOptions);
+      if (numReplicaGroupsToQuery != null) {
+        Preconditions.checkState(numReplicaGroupsToQuery > 0, 
"numReplicaGroups must be "

Review Comment:
   PredConditions check will throw an IllegalStateException, which will be 
caught to set a response with a ProcessingException and error code 
QUERY_VALIDATION_ERROR_CODE = 700 [ 
BaseBrokerRequestHandler.java#L371](https://github.com/apache/pinot/blob/master/pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/BaseBrokerRequestHandler.java#L371)
 In PinotClientRequest I believe it will just return this response



-- 
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: commits-unsubscr...@pinot.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to