Latest Results
feat(inline-agg): add AnyValue accumulator (#7036)
## Summary
Add `AggExpr::AnyValue` support to the inline grouped aggregation path
in `src/daft-recordbatch/src/ops/inline_agg.rs`. Numeric dtypes only
(Int8-64, UInt8-64, Float32/64); other dtypes continue to use the
fallback path.
## Why
Part of #6585 item 7 (more accumulator types). Without inline AnyValue,
any query mixing AnyValue with Sum/Min/Max/Count on numeric columns
falls entirely back to the slower path. This keeps mixed queries on the
inline path when the AnyValue target is numeric.
## Changes Made
- New `define_any_value_accum!` macro with 10 instantiations
(`AnyValueAccumI8..I64`, `AnyValueAccumU8..U64`, `AnyValueAccumF32/F64`)
- 10 new variants on `AggAccumulator`
- New `AggExpr::AnyValue` arm in `try_create_accumulator` dispatching by
dtype
- `can_inline_agg` extended to accept `AggExpr::AnyValue` for the same
numeric dtype set as Sum/Min/Max
- 7 new tests
## Behavior
Per-group state is `Option<Option<T>>`:
- `None`: group has not been touched yet
- `Some(None)`: group locked with a null value (`ignore_nulls=false`
only)
- `Some(Some(v))`: group locked with value `v`
Three branches in `update_batch`:
1. `source.null_count() == 0`: tight loop, `ignore_nulls` irrelevant,
first row per group wins.
2. `ignore_nulls=true`: scan each group until a non-null value is seen;
lock thereafter. If all values are null, the group stays `None` and the
result is null.
3. `ignore_nulls=false`: first row wins per group, null or not.
Non-numeric AnyValue (Utf8, Binary, etc.) bails to fallback via
`can_inline_agg`, preserving existing semantics.
## Test Plan
- `cargo test -p daft-recordbatch --lib inline_agg::tests`: 39/39 pass
- `cargo fmt -p daft-recordbatch` clean
- `cargo clippy -p daft-recordbatch --lib --tests` clean
- 7 new tests covering: ignore_nulls=true/false on int values with
nulls; first-row-is-null edge case for both modes; Float64; Int8 (small
int widening class); mixed AnyValue + Sum + Min + Max in one query
## Related Issues
Part of #6585 item 7. Latest Branches
0%
capyBearista:feat-overlay-3792 0%
jackylee-ch:codex-sql-read-parquet-ignore-corrupt-files 0%
johnquevedo:issue-5690-ray-sample-by-size © 2026 CodSpeed Technology