Skip to content

Commit 4512cb1

Browse files
committed
Update docs
1 parent f1fbe4c commit 4512cb1

File tree

5 files changed

+15
-14
lines changed

5 files changed

+15
-14
lines changed

docs/source/user-guide/channel-resolver.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ async fn main() {
4343
let state = SessionStateBuilder::new()
4444
// these two are mandatory.
4545
.with_distributed_worker_resolver(todo!())
46-
.with_physical_optimizer_rule(Arc::new(DistributedPhysicalOptimizerRule))
46+
.with_distributed_physical_optimizer_rules()
4747
// the CustomChannelResolver needs to be passed here once...
4848
.with_distributed_channel_resolver(channel_resolver.clone())
4949
.build();

docs/source/user-guide/concepts.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,6 @@ You'll see these concepts mentioned extensively across the documentation and the
2424

2525
Some other more tangible concepts are the structs and traits exposed publicly, the most important are:
2626

27-
## [DistributedPhysicalOptimizerRule](https://github.com/datafusion-contrib/datafusion-distributed/blob/main/src/distributed_planner/distributed_physical_optimizer_rule.rs)
28-
29-
A physical optimizer rule that transforms single-node DataFusion query plans into distributed query plans. It reads
30-
a fully formed physical plan and injects the appropriate nodes to execute the query in a distributed fashion.
31-
32-
It builds the distributed plan from bottom to top, injecting network boundaries at appropriate locations based on
33-
the nodes present in the original plan.
34-
3527
## [Worker](https://github.com/datafusion-contrib/datafusion-distributed/blob/main/src/flight_service/worker.rs)
3628

3729
Arrow Flight server implementation that integrates with the Tonic ecosystem and listens to serialized plans that get
@@ -70,3 +62,12 @@ data. If you are on the task with index 2, you might want to return the last 1/3
7062

7163
Optional extension trait that allows to customize how connections are established to workers. Given one of the
7264
URLs returned by the `WorkerResolver`, it builds an Arrow Flight client ready for serving queries.
65+
66+
## [NetworkBoundaryPlaceholder](https://github.com/datafusion-contrib/datafusion-distributed/blob/main/src/distributed_planner/network_boundary_placeholder.rs)
67+
68+
A custom ExecutionPlan implementation that acts as a placeholder for the distributed planner to place network boundaries
69+
that spawn the specified amount of tasks.
70+
71+
Users can create their own physical optimizer rules and place them before this project's ApplyNetworkBoundaries rule
72+
in order to customize their distributed plan.
73+

docs/source/user-guide/getting-started.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ impl WorkerResolver for LocalhostWorkerResolver {
4949
}
5050
```
5151

52-
Register both the `WorkerResolver` implementation and the `DistributedPhysicalOptimizerRule` in DataFusion's
52+
Register both the `WorkerResolver` implementation and the distributed physical optimization rules in DataFusion's
5353
`SessionStateBuilder` to enable distributed query planning:
5454

5555
```rs
@@ -59,7 +59,7 @@ let localhost_worker_resolver = LocalhostWorkerResolver {
5959

6060
let state = SessionStateBuilder::new()
6161
.with_distributed_worker_resolver(localhost_worker_resolver)
62-
.with_physical_optimizer_rule(Arc::new(DistributedPhysicalOptimizerRule))
62+
.with_distributed_physical_optimizer_rules()
6363
.build();
6464

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

docs/source/user-guide/worker-resolver.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ impl WorkerResolver for CustomWorkerResolver {
2424
async fn main() {
2525
let state = SessionStateBuilder::new()
2626
.with_distributed_worker_resolver(CustomWorkerResolver)
27-
.with_physical_optimizer_rule(Arc::new(DistributedPhysicalOptimizerRule))
27+
.with_distributed_physical_optimizer_rules()
2828
.build();
2929
}
3030
```

src/distributed_planner/distributed_config.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@ impl ConfigExtension for DistributedConfig {
118118
// FIXME: Ideally, both ChannelResolverExtension and TaskEstimators would be passed as
119119
// extensions in SessionConfig's AnyMap instead of the ConfigOptions. However, we need
120120
// to pass this as ConfigOptions as we need these two fields to be present during
121-
// planning in the DistributedPhysicalOptimizerRule, and the signature of the optimize()
122-
// method there accepts a ConfigOptions instead of a SessionConfig.
121+
// distributed planning, and the signature of the optimize() method there accepts a
122+
// ConfigOptions instead of a SessionConfig.
123123
// The following PR addresses this: https://github.com/apache/datafusion/pull/18168
124124
// but it still has not been accepted or merged.
125125
// Because of this, all the boilerplate trait implementations below are needed.

0 commit comments

Comments
 (0)