apache / apache/datafusion

Move Accumulator trait to physical-expr

Open
#2,349 2 comments 2 reactions 0 assignees View on GitHub
enhancement
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.**
`Accumulator` is the state of an aggregate function, and has nothing to do with a logical expression.

The current blocker is AggregateUDF which mixes both the function signature and the function implementation. AggregateUDF exists in `datafusion-expr` because of its signature parts.

**Describe the solution you'd like**
1. Move Accumulator trait into `datafusion-physical-expr`.
2. Split AggregateUDF into parts, one remains in `datafusion-expr` that represents AggregateUDF's signature, and the other in `datafusion-physical-expr` for its implementation.

**Describe alternatives you've considered**
Don't move.

Contributor guide

Open the contributing guide

Research direction

Start by locating the Accumulator trait and AggregateUDF definitions in the datafusion-expr and datafusion-physical-expr crates, then trace their dependencies and current uses. The work is done when Accumulator is owned by physical-expr and AggregateUDF is split between signature and implementation parts without breaking the existing crate interfaces.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend, data-engineering
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.