vrajat commented on code in PR #16102:
URL: https://github.com/apache/pinot/pull/16102#discussion_r2144992580
##########
pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotQueryResource.java:
##########
@@ -332,38 +308,43 @@ private StreamingOutput getQueryResponse(String query,
@Nullable SqlNode sqlNode
}
// given a list of tables, returns the list of tableConfigs
- private List<TableConfig> getListTableConfigs(List<String> tableNames,
String database) {
- List<TableConfig> allTableConfigList = new ArrayList<>();
+ private Set<String> getBrokerTenants(List<String> tableNames, String
database) {
+ Set<String> brokerTenants = new HashSet<>(tableNames.size());
+ List<String> tablesNotFound = new ArrayList<>(tableNames.size());
for (String tableName : tableNames) {
+ boolean found = false;
String actualTableName =
_pinotHelixResourceManager.getActualTableName(tableName, database);
- List<TableConfig> tableConfigList = new ArrayList<>();
if (_pinotHelixResourceManager.hasRealtimeTable(actualTableName)) {
-
tableConfigList.add(Objects.requireNonNull(_pinotHelixResourceManager.getRealtimeTableConfig(actualTableName)));
+
brokerTenants.add(Objects.requireNonNull(_pinotHelixResourceManager.getRealtimeTableConfig(actualTableName)).getTenantConfig()
+ .getBroker());
+ found = true;
}
if (_pinotHelixResourceManager.hasOfflineTable(actualTableName)) {
-
tableConfigList.add(Objects.requireNonNull(_pinotHelixResourceManager.getOfflineTableConfig(actualTableName)));
+
brokerTenants.add(Objects.requireNonNull(_pinotHelixResourceManager.getOfflineTableConfig(actualTableName)).getTenantConfig().getBroker());
Review Comment:
Fixed
--
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]