walterddr commented on code in PR #11912:
URL: https://github.com/apache/pinot/pull/11912#discussion_r1378058081
##########
pinot-query-planner/src/main/java/org/apache/pinot/query/planner/logical/PlanFragmenter.java:
##########
@@ -126,49 +124,65 @@ public PlanNode visitExchange(ExchangeNode node, Context
context) {
if (!isPlanFragmentSplitter(node)) {
return process(node, context);
}
- int currentPlanFragmentId = context._previousPlanFragmentId;
- int nextPlanFragmentId = ++context._currentPlanFragmentId;
- // Set previous PlanFragment ID in the context to be the next PlanFragment
ID to be used by the child node.
- context._previousPlanFragmentId = nextPlanFragmentId;
- PlanNode nextPlanFragmentRoot = node.getInputs().get(0).visit(this,
context);
+ // Split the ExchangeNode to a MailboxReceiveNode and a MailboxSendNode,
where MailboxReceiveNode is the leave node
+ // of the current PlanFragment, and MailboxSendNode is the root node of
the next PlanFragment.
+ int receiverPlanFragmentId = context._currentPlanFragmentId;
+ int senderPlanFragmentId = context._nextPlanFragmentId.getAndIncrement();
Review Comment:
yes i think that's correct. i was wondering if we can make it even more
straightforward.
- IMO the "context" is pre-fragment
- but the global next ID is per planFragmenter --> we can create a global
next ID tracker inside the planFragmenter instead (ditch the static INSTANCE
approach)
WDYT?
--
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]