Avoid unnecessary RepartitionExec with RoundRobinBatch partitioning
- Dominant language
- Rust
- Stars
- 9.3k
- Forks
- 2.4k
- Avg merge
- 3d 7h
- Merged PRs (30d)
- 344
Description
**Is your feature request related to a problem or challenge? Please describe what you are trying to do.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
(This section helps Arrow developers understand the context and *why* for this feature, in addition to the *what*)
The current `Enforcement` rule implementation does not take the local repartition requirements into account.
And the RoundRobinBatch RepartitionExec was added by the `Repartition` rule which might add unnecessary
RepartitionExecs.
We can refer to PrestoSQL/Trino's approach and implement a top-down and requirement driven process to add
RepartitionExecs on demands.
https://github.com/trinodb/trino/blob/45e111cf6b775a03a92a13af06f22eecd1a40787/core/trino-main/src/main/java/io/trino/sql/planner/optimizations/AddLocalExchanges.java
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.
Contributor guide
Research direction
Start by reading the Enforcement and Repartition rule implementations to understand how local repartition requirements and RoundRobinBatch RepartitionExecs are currently handled. Compare the design with the linked Trino AddLocalExchanges implementation. Done means the planner adds RepartitionExec only when required and avoids unnecessary RoundRobinBatch repartitions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100