tohuya6 opened a new pull request, #23786:
URL: https://github.com/apache/datafusion/pull/23786

   ## Which issue does this PR close?
   
   - Part of #22715.
   
   ## Rationale for this change
   
   `multi_group_by::group_column_supported_type` gates which GROUP BY columns 
may
   use the column-wise `GroupValuesColumn` fast path, and the gate is
   all-or-nothing: a single unsupported column forces the **entire** grouping 
onto
   the byte-encoded `GroupValuesRows` fallback, even when every other key column
   would have qualified. An `Interval` key triggers exactly that today.
   
   All three `Interval` units reuse the existing `PrimitiveGroupValueBuilder` 
with
   no new builder type and no new `HashValue` impl — the `i32` / 
`IntervalDayTime`
   / `IntervalMonthDayNano` natives already implement it.
   
   ## What changes are included in this PR?
   
   - Dispatch the three `Interval*Type` units in `make_group_column`. 
`IntervalUnit`
     has exactly three variants, so the match is exhaustive with no fallback arm
     (unlike `Time32`/`Time64`, which must reject invalid unit combinations).
   - Accept `Interval(_)` in `group_column_supported_type`.
   - Extend the `group_column_supported_type` ↔ `make_group_column` consistency
     fuzz with the three Interval units.
   - Add an `(Interval, Int32)` group-count benchmark to 
`benches/multi_group_by.rs`.
   
   ## Are these changes tested?
   
   Yes.
   - New unit test: an `Interval` key stays on the `GroupValuesColumn` path, 
dedups
     including nulls, keeps "1 month" and "30 days" as **distinct** groups (no
     cross-unit folding), and round-trips with the `Interval` output type 
preserved.
   - The consistency fuzz now asserts all three Interval units route through the
     dispatcher.
   - New single- and multi-column `Interval` `GROUP BY` coverage in 
`aggregate.slt`.
   
   ## Are there any user-facing changes?
   
   No API changes. `GROUP BY` queries with an `Interval` key now use the
   column-wise fast path instead of the row-encoded fallback; results are 
unchanged.


-- 
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