ankitsultana commented on code in PR #10336:
URL: https://github.com/apache/pinot/pull/10336#discussion_r1119349115
##########
pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotQueryResource.java:
##########
@@ -170,10 +171,10 @@ private String getMultiStageQueryResponse(String query,
String queryOptions, Htt
return QueryException.ACCESS_DENIED_ERROR.toString();
}
- // Get brokers, only DEFAULT tenant is supported for now.
- // TODO: implement logic that only allows executing query where all
accessed tables are within the same tenant.
- List<String> instanceIds = new
ArrayList<>(_pinotHelixResourceManager.getAllInstancesForBrokerTenant(
- TagNameUtils.DEFAULT_TENANT_NAME));
+ SqlNodeAndOptions sqlNodeAndOptions = RequestUtils.parseQuery(query);
+ List<String> tableNames =
CalciteSqlParser.extractTableNamesFromNode(sqlNodeAndOptions.getSqlNode());
+
+ List<String> instanceIds = getCommonInstances(tableNames);
Review Comment:
> the actual broker API only supports default tenant (hard-coded in many
places)
You mean for multistage? We are actually running it in a non-default tenant
internally. Queries work if you directly hit the broker that you know is in the
tenant that you want.
--
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]