Thanks to visit codestin.com
Credit goes to github.com

Skip to content

aggregate fns to have grouped aggregate kernels for sum and count#8314

Merged
onursatici merged 5 commits into
developfrom
os/grouped-agg
Jun 12, 2026
Merged

aggregate fns to have grouped aggregate kernels for sum and count#8314
onursatici merged 5 commits into
developfrom
os/grouped-agg

Conversation

@onursatici

@onursatici onursatici commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Summary

aggregate functions to be able to do grouped aggregations before the fallback that slices group by group.

Implements count for all arrays and sum for primitives.

API Changes

Grouped aggregate kernels now receive a single GroupedArray enum, covering ListViewArray and FixedSizeListArray, instead of exposing separate methods for each list representation

@onursatici onursatici requested a review from a team June 9, 2026 13:24
@onursatici onursatici added the changelog/break A breaking API change label Jun 9, 2026
Comment thread vortex-array/src/aggregate_fn/accumulator_grouped.rs Outdated
Comment thread vortex-array/src/aggregate_fn/accumulator_grouped.rs
Comment thread vortex-array/src/aggregate_fn/accumulator_grouped.rs Outdated

@joseph-isaacs joseph-isaacs left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like a good idea

@codspeed-hq

codspeed-hq Bot commented Jun 9, 2026

Copy link
Copy Markdown

Merging this PR will improve performance by ×4.3

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

⚡ 5 improved benchmarks
✅ 1527 untouched benchmarks

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation count_i32_clustered_nulls 641.9 µs 55.2 µs ×12
Simulation sum_i32_clustered_nulls 545.4 µs 71.8 µs ×7.6
Simulation sum_i32_nullable_all_valid 335.5 µs 73.4 µs ×4.6
Simulation count_varbinview 252.5 µs 75.8 µs ×3.3
Simulation encode_varbin[(1000, 2)] 175.4 µs 158 µs +11.06%

Tip

Curious why this is faster? Comment @codspeedbot explain why this is faster on this PR, or directly use the CodSpeed MCP with your agent.


Comparing os/grouped-agg (5d009d0) with develop (1082a5d)

Open in CodSpeed

Signed-off-by: Onur Satici <[email protected]>
Signed-off-by: Onur Satici <[email protected]>
Signed-off-by: Onur Satici <[email protected]>
/// Explicit ranges extracted from a list-view array.
ListView {
/// The `(offset, size)` ranges.
ranges: Vec<(usize, usize)>,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did try making this lazy but it didn't help much, it is faster but not clear if it is faster across the board

Comment thread vortex-array/src/aggregate_fn/fns/count/grouped.rs Outdated
Comment thread vortex-array/src/aggregate_fn/fns/sum/grouped.rs
Signed-off-by: Onur Satici <[email protected]>
@onursatici onursatici merged commit 1a0fe25 into develop Jun 12, 2026
68 of 70 checks passed
@onursatici onursatici deleted the os/grouped-agg branch June 12, 2026 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/break A breaking API change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants