risingwave_frontend::optimizer

Function require_additional_exchange_on_root_in_distributed_mode

source
fn require_additional_exchange_on_root_in_distributed_mode(
    plan: PlanRef,
) -> bool
Expand description

As we always run the root stage locally, for some plan in root stage which need to execute in compute node we insert an additional exhchange before it to avoid to include it in the root stage.

Returns true if we must insert an additional exchange to ensure this.