siddharthteotia commented on code in PR #8558: URL: https://github.com/apache/pinot/pull/8558#discussion_r855374289
########## pinot-query-planner/src/main/java/org/apache/pinot/query/planner/StagePlanner.java: ########## @@ -67,11 +68,12 @@ public QueryPlan makePlan(RelNode relRoot) { StageNode globalStageRoot = walkRelPlan(relRoot, getNewStageId()); // global root needs to send results back to the ROOT, a.k.a. the client response node. - // the last stage is always a broadcast-gather. + // the last stage only has one receiver so doesn't matter what the exchange type is. Review Comment: I agree that the last exchange at the top (between sender(s) in 1st stage and single receiver in 0th stage) can be anything. May be RelDistribution.Type.ANY is more suitable ? Slightly related question - I think exchange type information is enough to decide the kind of sender (like right now it will be broadcast, later it could be shuffle / hash partition exchange). How do we decide the kind of exact receiver ? Especially for the receiver in the root stage, we ideally want to know if the receiver is unordered or ordered for simple v/s sorted merge respectively ? -- 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: commits-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org