xiangfu0 commented on code in PR #10748:
URL: https://github.com/apache/pinot/pull/10748#discussion_r1190344319
##########
pinot-query-planner/src/main/java/org/apache/pinot/query/QueryEnvironment.java:
##########
@@ -155,9 +157,12 @@ public QueryPlannerResult planQuery(String sqlQuery,
SqlNodeAndOptions sqlNodeAn
try (PlannerContext plannerContext = new PlannerContext(_config,
_catalogReader, _typeFactory, _hepProgram)) {
plannerContext.setOptions(sqlNodeAndOptions.getOptions());
RelRoot relRoot = compileQuery(sqlNodeAndOptions.getSqlNode(),
plannerContext);
- Set<String> tableNames = getTableNamesFromRelRoot(relRoot.rel);
- return new QueryPlannerResult(toDispatchablePlan(relRoot,
plannerContext, requestId, tableNames), null,
- tableNames);
+ SubPlan subPlan = toSubPlan(relRoot);
+ // TODO: current code only assume one SubPlan per query, but we should
support multiple SubPlans per query.
+ // Each SubPlan should be able to run independently from Broker then set
the results into the dependent
+ // SubPlan for further processing.
+ DispatchableSubPlan dispatchableSubPlan = toDispatchableSubPlan(subPlan,
plannerContext, requestId);
+ return new QueryPlannerResult(dispatchableSubPlan, null,
dispatchableSubPlan.getTableNames());
Review Comment:
QueryPlannerResult is just the DispatchableSubPlan for one SubPlan
(subplanRoot).
--
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]