apache / apache/datafusion

skip expensive ptr chase & comparission in ByteGroupValueBuilder

Open Beginner friendly
#24,570 0 comments 0 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?

in `datafusion/datafusion/physical-plan/src/aggregates/group_values/multi_group_by/bytes.rs` at https://github.com/apache/datafusion/blob/7538aefbe9ee224814570798cd381d1948029efa/datafusion/physical-plan/src/aggregates/group_values/multi_group_by/bytes.rs#L173 we can avoid the expensive double buffer look up by doing a length comparison

### Describe the solution you'd like

short circuit buffer check if lengths mismatch

### Describe alternatives you've considered

n/a

### Additional context

_No response_

Contributor guide

Open the contributing guide

Research direction

Start in datafusion/datafusion/physical-plan/src/aggregates/group_values/multi_group_by/bytes.rs at the ByteGroupValueBuilder code around line 173. Trace the current buffer comparison and confirm where lengths can be compared first; done means mismatched lengths avoid the buffer check without changing grouping behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
data-engineering, performance
Issue type
Refactor
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
78/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.