zhuqi-lucas opened a new pull request, #24075:
URL: https://github.com/apache/datafusion/pull/24075

   ## Which issue does this PR close?
   
   Groundwork for benchmarking #23628 (native `GroupsAccumulator` for nested 
value types in `first_value` / `last_value`).
   
   ## Rationale for this change
   
   The `first_last` benchmark only covers primitive value types today. #23628 
adds a native `GroupsAccumulator` for **nested** value types (`List`, `Struct`, 
`Map`), which previously fell back to one per-group `Accumulator` via 
`GroupsAccumulatorAdapter`. To measure that work we need nested-type cases in 
the benchmark.
   
   Landing this first (with the fallback path on current `main`) means that 
once #23628 is in flight, a `run benchmark first_last` diff shows the fallback 
→ native speedup per type automatically.
   
   ## What changes are included in this PR?
   
   - Adds `List<Int64>`, `Struct<i64,utf8,f64>`, `Map<utf8,i64>` and a 
composite `List<Struct<i64,utf8>>` value column, each with the same coverage as 
the primitive cases: `first_value`/`last_value` update + merge, plus 
`first_value` evaluate, at 0% and 90% nulls.
   - `prepare_typed_groups_accumulator` now mirrors the planner: it uses the 
native `GroupsAccumulator` when the value type is supported and otherwise falls 
back to a `GroupsAccumulatorAdapter` around one per-group `Accumulator`. The 
same benchmark case therefore runs the fallback on a build without native 
nested support and the native path on one that has it.
   
   ## Are these changes tested?
   
   Benchmark-only. Runs locally on `main` (all nested cases exercise the 
fallback path). As a preview of the intended signal, `first_value struct 
update` goes ~112ms (fallback) → ~24ms (native, with #23628) at 1024 groups.
   
   ## Are there any user-facing changes?
   
   No — benchmark only.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to