You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "tibrewalpratik17 (via GitHub)" <gi...@apache.org> on 2023/02/27 13:18:40 UTC

[GitHub] [pinot] tibrewalpratik17 commented on a diff in pull request #10336: [Multistage] Allow queries on multiple tables of same tenant to be executed from controller UI

tibrewalpratik17 commented on code in PR #10336:
URL: https://github.com/apache/pinot/pull/10336#discussion_r1118723829


##########
pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotQueryResource.java:
##########
@@ -226,6 +228,31 @@ private String getQueryResponse(String query, @Nullable SqlNode sqlNode, String
     return sendRequestToBroker(query, instanceId, traceEnabled, queryOptions, httpHeaders);
   }
 
+  // get list of common broker instances for a given set of tables
+  private List<String> getCommonInstances(List<String> tableNames) {
+    boolean firstTable = true;
+    Set<String> brokerInstanceList = new HashSet<>();
+    for (String tableName : tableNames) {
+      String rawTableName = TableNameBuilder.extractRawTableName(_pinotHelixResourceManager
+              .getActualTableName(tableName));
+      List<String> tableBrokerInstances;
+      try {
+        tableBrokerInstances = _pinotHelixResourceManager.getLiveBrokersForTable(rawTableName);

Review Comment:
   Yeah good point! I was thinking along the same lines of removing this.



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