In #623, we add a new rewrite API prior to displaying:
let plan =
rewrite_distributed_plan_with_dynamic_filters(plan).await?;
// 4. Fold the per-task metrics back into the plan...
let plan =
rewrite_distributed_plan_with_metrics(plan, DistributedMetricsFormat::Aggregated).await?;
// 5. ...and render it.
println!("{}", display_plan_ascii(plan.as_ref(), true));
It's annoying to have to call those two rewrites.
Ideally, if you set with_distributed_dynamic_filter_collection or with_distributed_metrics_collection, then displaying is handled automatically. One downside to this is that those settings are stored in the SessionConfig, so you would have to pass a SessionConfig to display_plan_ascii, which isn't great.
Another way to do it is to add options to explain_analyze or display_plan_ascii
DisplayOptions {
metrics_mode: Aggregated | PerTask
dynamic_filters: bool
}
and have those methods handle the rewrites for you.
I imagine we want to improve the API for both metrics and
In #623, we add a new rewrite API prior to displaying:
It's annoying to have to call those two rewrites.
Ideally, if you set
with_distributed_dynamic_filter_collectionorwith_distributed_metrics_collection, then displaying is handled automatically. One downside to this is that those settings are stored in theSessionConfig, so you would have to pass aSessionConfigtodisplay_plan_ascii, which isn't great.Another way to do it is to add options to
explain_analyzeordisplay_plan_asciiand have those methods handle the rewrites for you.
I imagine we want to improve the API for both metrics and