zhuqi-lucas commented on PR #23628: URL: https://github.com/apache/datafusion/pull/23628#issuecomment-5175261406
@alamb @kosiew — the `first_last` benchmark currently only covers **primitive** value types, so `run benchmark first_last` on this PR doesn't exercise the nested path this PR speeds up (which is why the diff above shows no change). I've opened #24075 to add nested-type cases — `List<i64>`, `Struct<i64,utf8,f64>`, `Map<utf8,i64>`, and a composite `List<Struct>` — to the `first_last` benchmark, each with the same coverage as the primitive cases (first/last update + merge, plus evaluate, at 0%/90% nulls). `prepare_typed_groups_accumulator` there 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`. So the *same* benchmark case runs the fallback on a build without native nested support and the native path on one that has it. **Plan:** merge #24075 first, then I'll rebase this PR on top — after which `run benchmark first_last` will show the fallback → native speedup per nested type automatically. Local preview (1024 groups): `first_value` struct `update` ~112ms (fallback) → ~24ms (native) ≈ **4.7×**; the gap widens with group cardinality (an end-to-end `GROUP BY` over ~100k groups is ~16×). -- 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]
