minor: derive group_column_supported_type from make_group_column - #25541
Merged
jayzhan211 merged 1 commit intoSep 20, 2026
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #25541 +/- ##
==========================================
- Coverage 82.39% 82.39% -0.01%
==========================================
Files 1138 1138
Lines 434623 434617 -6
Branches 434623 434617 -6
==========================================
- Hits 358100 358090 -10
Misses 54856 54856
- Partials 21667 21671 +4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
zhuqi-lucas
approved these changes
Sep 20, 2026
zhuqi-lucas
left a comment
Contributor
There was a problem hiding this comment.
LGTM, thanks @jayzhan211 !
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Rationale for this change
multi_group_bykeeps the set of typesGroupValuesColumnsupports in two places:make_group_column, the factory that builds aGroupColumnfor a field, andgroup_column_supported_type, a hand-written allow-list thatsupported_schemauses to choose betweenGroupValuesColumnand theGroupValuesRowsfallback.The two must accept exactly the same types: if the allow-list accepts a type the factory rejects, the planner picks
GroupValuesColumnand the query then fails withnot_impl_errwhen the columns are built. Today that is enforced by "keep the two in lockstep" comments on both sides (validTime32/Time64units, non-negativeFixedSizeBinarywidth, the nested/row-backed fallback, recursion intoListandDictionary) and by a pinning test over a sample of types. Every new specialization has to be added twice.One case had already drifted: a
Dictionarywith a non-integer key type is accepted by the allow-list but rejected by the factory. It is not a valid Arrow type, so it is not reachable in practice, but it shows the shape of the problem.What changes are included in this PR?
group_column_supported_typenow asks the factory:make_group_column(..).is_ok(). The 50-line allow-list and the lockstep comments are removed, so the two cannot disagree. Building a column only creates empty buffers, and this runs once per stream, not per batch.Dictionary(Utf8, Int32)case, which fails onmain(expected group_column_supported_type=false).No behaviour change for any valid Arrow type.
What is the testing strategy for this PR?
Existing tests:
group_column_supported_type_matches_make_group_column(supported and intentionally unsupported types, including nested and row-backed cases), thesupported_schema_*tests and the rest of themulti_group_bytests.Are there any user-facing changes?
No.