Repository navigation
Commit 1c0f4d0
committed
refactor(physical-plan): extract make_group_column factory + tighten Time variants
Preparation PR for #22682 / #22715 (full GroupValuesColumn type
coverage). No new builders; this PR only refactors the dispatch so
subsequent PRs that add FixedSizeList / Struct / List support can plug
into one well-defined factory instead of growing the inline match in
GroupValuesColumn::intern, and tightens the Time32 / Time64 variant
allow-listing to match the actually-supported Arrow combinations.
## What changed
1. Factory extraction. The inline match in GroupValuesColumn::intern
that maps each schema field to a Box<dyn GroupColumn> builder moves
into a free function make_group_column(field: &Field). The eager
construction now happens at try_new time, so per-field builders are
ready before any intern call and any unsupported schema fails fast.
emit(EmitTo::All) and clear_shrink both refresh the builder vector
via the same helper so the post-condition (one builder per schema
field) holds across the aggregator's lifetime.
2. Time32 / Time64 supported_type alignment. Previously supported_type
matched Time32(_) (admitting the invalid Microsecond / Nanosecond
combinations) and did not match Time64(_) at all. Tighten
supported_type to the exact set the dispatcher constructs. The
dispatcher's wildcard arms for invalid Time variants now return
not_impl_err instead of silently producing an empty builder vector.
3. supported_type ↔ make_group_column consistency fuzz. New unit test
iterates a representative set of 20 supported and 6 unsupported
DataType values and asserts the biconditional. Pins the alignment
so future contributors who add a type to one side without the
other trip a unit test immediately.1 parent f033199 commit 1c0f4d0
1 file changed
Lines changed: 297 additions & 171 deletions
0 commit comments