You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Small optimization that allows the dynamic planner to collocate
single-tasked stages into the same machine that is acting as
coordinator.
During dynamic planning, if all stages are small, they will just use 1
task, and before this PR, there was already some logic for co-locating
all stages in a single worker. The challenge:
The single worker was a random worker in the cluster.
This means that if the coordinating context also happens to be in the
scope of a worker, there's a missed chance for running everything
locally, almost as if it was just single-node DataFusion.
This PRs unlocks this scenario by allowing users to inject their own
`LocalWorkerContext` into the coordinating `SessionContext`. That way,
the coordinator itself can recognize it's also a worker, and can send to
itself all these single-tasked stages, avoiding network hops and data
serialization.
## Benchmarks
TPCH-SF1: 1.12 faster ✔
TPCH-SF10: 1.06 faster ✔
TPCH-SF100: 1.01 faster ✔
TPC-DS: 1.08 faster ✔
ClickBench: 1.01 faster ✔
0 commit comments