Allow user defined ExecutionPlans to benefit from pushdown behavior
- 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?
https://github.com/apache/arrow-datafusion/pull/8073 adds support for projection pushdown in the physical optimizer.
However, its implementation directly checks for and special cases the built in ExecutionPlan nodes in DataFusion (which other optimizer passes do as well)
For example
```rust
} else if let Some(output_req) = input.downcast_ref::() {
try_swapping_with_output_req(projection, output_req)?
} else if input.is::() {
try_swapping_with_coalesce_partitions(projection)?
} else if let Some(filter) = input.downcast_ref::() {
try_swapping_with_filter(projection, filter)?
} else if let Some(repartition) = input.downcast_ref::() {
try_swapping_with_repartition(projection, repartition)?
} else if let Some(sort) = input.downcast_ref::() {
try_swapping_with_sort(projection, sort)?
```
### Describe the solution you'd like
It would be nice if there was an abstraction somehow where ProjectionPushdown could be used by extension / user defined `ExecutionPlan` nodes
### Describe alternatives you've considered
There is a really nice discussion between @crepererum and @ozankabak here https://github.com/apache/arrow-datafusion/pull/8073#discussion_r1386515290 that provides insight and various options.
### Additional context
_No response_
Contributor guide
Research direction
Start with PR 8073 and its physical optimizer projection-pushdown implementation, especially the built-in ExecutionPlan checks shown here. Review the linked discussion for the proposed abstraction options and determine how user-defined ExecutionPlan nodes should participate; done means extension nodes can benefit from ProjectionPushdown without built-in-node special cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend, backend-api-design
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100