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

   ## 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. A `Decimal256` key triggers exactly that today.
   
   Although `i256` is a 32-byte native rather than a machine-word scalar, it is
   `Copy` and already implements `ArrowNativeTypeOp` + `HashValue`, so 
`Decimal256`
   reuses the existing `PrimitiveGroupValueBuilder` with no new builder type 
and no
   `T: Copy` relaxation — it mirrors the `Decimal128` arm that already exists.
   
   ## What changes are included in this PR?
   
   - Dispatch `Decimal256Type` in `make_group_column`, mirroring the 
`Decimal128` arm.
   - Accept `Decimal256(_, _)` in `group_column_supported_type`.
   - Update the `group_column_supported_type` ↔ `make_group_column` consistency
     fuzz: `Decimal256` previously served as the stock *unsupported* example, 
so it
     moves into the supported set (`Float16` / invalid `Time` unit combinations
     remain as the negative examples).
   - Add a `Decimal256` group-count benchmark to `benches/multi_group_by.rs`.
   
   ## Are these changes tested?
   
   Yes.
   - New unit test: a `Decimal256` key (precision > 38, so genuinely 256-bit) 
stays
     on the `GroupValuesColumn` path, dedups including nulls, and round-trips 
with
     the `Decimal256(precision, scale)` output type preserved.
   - The consistency fuzz now asserts `Decimal256` routes through the 
dispatcher.
   - New single- and multi-column `Decimal256` `GROUP BY` coverage in 
`aggregate.slt`.
   
   ## Are there any user-facing changes?
   
   No API changes. `GROUP BY` queries with a `Decimal256` 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