You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "Jackie-Jiang (via GitHub)" <gi...@apache.org> on 2023/04/14 22:57:38 UTC

[GitHub] [pinot] Jackie-Jiang commented on a diff in pull request #10599: [multistage] improve error message in case of non-existent table queried from controller

Jackie-Jiang commented on code in PR #10599:
URL: https://github.com/apache/pinot/pull/10599#discussion_r1167322913


##########
pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotQueryResource.java:
##########
@@ -178,6 +178,14 @@ private String getMultiStageQueryResponse(String query, String queryOptions, Htt
           new Exception("Unable to find table name from SQL thus cannot dispatch to broker.")).toString();
     }
 
+    for (String tableName : tableNames) {

Review Comment:
   We are looping over these tables 3 times (once here, once in `getCommonBrokerTenant()`, once in `getCommonServerTenant()`), and check if table exists, which is one ZK access per check. Can we merge them into one method and only loop over the tables once?



-- 
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-unsubscribe@pinot.apache.org

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


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