Skip to content

Commit 706193a

Browse files
authored
fix: Enable distributed plan for localhost_run (#166)
1 parent ef3e33c commit 706193a

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

examples/localhost_run.rs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ struct Args {
2727

2828
#[structopt(long)]
2929
explain: bool,
30+
31+
#[structopt(long, default_value = "3")]
32+
network_shuffle_tasks: usize,
33+
34+
#[structopt(long, default_value = "3")]
35+
network_coalesce_tasks: usize,
3036
}
3137

3238
#[tokio::main]
@@ -41,7 +47,11 @@ async fn main() -> Result<(), Box<dyn Error>> {
4147
let state = SessionStateBuilder::new()
4248
.with_default_features()
4349
.with_distributed_channel_resolver(localhost_resolver)
44-
.with_physical_optimizer_rule(Arc::new(DistributedPhysicalOptimizerRule::new()))
50+
.with_physical_optimizer_rule(Arc::new(
51+
DistributedPhysicalOptimizerRule::new()
52+
.with_network_coalesce_tasks(args.network_coalesce_tasks)
53+
.with_network_shuffle_tasks(args.network_shuffle_tasks),
54+
))
4555
.build();
4656

4757
let ctx = SessionContext::from(state);

0 commit comments

Comments
 (0)