tibrewalpratik17 commented on code in PR #11241:
URL: https://github.com/apache/pinot/pull/11241#discussion_r1284243199
##########
pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotQueryResource.java:
##########
@@ -202,43 +203,28 @@ private String getMultiStageQueryResponse(String query,
String queryOptions, Htt
QueryEnvironment queryEnvironment = new QueryEnvironment(new
TypeFactory(new TypeSystem()),
CalciteSchemaBuilder.asRootSchema(new
PinotCatalog(_pinotHelixResourceManager.getTableCache())), null, null);
List<String> tableNames = queryEnvironment.getTableNamesForQuery(query);
- String brokerTenant;
+ List<String> instanceIds;
if (tableNames.size() != 0) {
List<TableConfig> tableConfigList = getListTableConfigs(tableNames);
if (tableConfigList == null || tableConfigList.size() == 0) {
return
QueryException.getException(QueryException.TABLE_DOES_NOT_EXIST_ERROR,
new Exception("Unable to find table in cluster, table does not
exist")).toString();
}
- // When routing a query, there should be at least one common broker
tenant for the table. However, the server
- // tenants can be completely disjoint. The leaf stages which access
segments will be processed on the respective
- // server tenants for each table. The intermediate stages can be
processed in either or all of the server tenants
- // belonging to the tables.
- brokerTenant = getCommonBrokerTenant(tableConfigList);
- if (brokerTenant == null) {
+ // find the unions of all the broker tenant tags of the queried tables.
+ Set<String> brokerTenantsUnion =
getBrokerTenantTagsUnion(tableConfigList);
Review Comment:
Sounds good!
--
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]