abhishekbafna commented on code in PR #15634:
URL: https://github.com/apache/pinot/pull/15634#discussion_r2087164640


##########
pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/BaseSingleStageBrokerRequestHandler.java:
##########
@@ -388,17 +394,37 @@ protected BrokerResponse doHandleRequest(long requestId, 
String query, SqlNodeAn
     BrokerRequest brokerRequest = 
CalciteSqlCompiler.convertToBrokerRequest(pinotQuery);
     BrokerRequest serverBrokerRequest =
         serverPinotQuery == pinotQuery ? brokerRequest : 
CalciteSqlCompiler.convertToBrokerRequest(serverPinotQuery);
-    AuthorizationResult authorizationResult = 
accessControl.authorize(requesterIdentity, serverBrokerRequest);
 
-    _brokerMetrics.addPhaseTiming(rawTableName, BrokerQueryPhase.AUTHORIZATION,
-        System.nanoTime() - compilationEndTimeNs);
+    TableRouteProvider routeProvider;
 
-    if (!authorizationResult.hasAccess()) {
-      throwAccessDeniedError(requestId, query, requestContext, tableName, 
authorizationResult);
+    if (logicalTable != null) {
+      AuthorizationResult authorizationResult =
+          hasTableAccess(requesterIdentity, 
logicalTable.getPhysicalTableConfigMap().keySet(), requestContext,
+              httpHeaders);
+      if (!authorizationResult.hasAccess()) {
+        throwAccessDeniedError(requestId, query, requestContext, tableName, 
authorizationResult);
+      }
+
+      // Validate QPS
+      if (hasExceededQPSQuota(database, 
logicalTable.getPhysicalTableConfigMap().keySet(), requestContext)) {

Review Comment:
   Logical table also has the quota config -> QPS config, are we adding that 
check as well?



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