Rich-T-kid opened a new pull request, #27445: URL: https://github.com/apache/datafusion/pull/27445
## Which issue does this PR close? - Follow-up to #24112. ## Rationale for this change With Parquet RLE dictionary reads enabled, low-cardinality string columns can remain `Dictionary<*, Utf8>`. `MIN` and `MAX` currently coerce those inputs to plain `Utf8` before aggregation, materializing every row even though grouped aggregation can compare the referenced dictionary values directly. ## What changes are included in this PR? - Preserve `Dictionary<*, Utf8>` input for `MIN` and `MAX` while keeping their state and result type as plain `Utf8`. - Let grouped aggregation dereference dictionary keys directly, including null keys, null dictionary values, filters, changing dictionaries, and all dictionary key widths. - Keep single-group and sliding aggregation on the same logical output contract. The change intentionally covers only the `Utf8` dictionary shape exercised by the existing ClickBench suite. It does not add a custom benchmark. ## What is the testing strategy for this PR? - `cargo test -p datafusion-functions-aggregate min_max --lib` (35 passed) - `cargo clippy -p datafusion-functions-aggregate --all-targets -- -D warnings` - Full repository pre-push checks: fmt, workspace/all-target Clippy with repository features, and typos - Existing partitioned ClickBench Q21/Q22/Q28 screen against exact `upstream/main` `73e0b0339`, five iterations and 12 partitions with RLE dictionary reads enabled on both sides. The order-balanced pooled medians were Q21 1154.15 ms to 1152.73 ms, Q22 2653.09 ms to 2679.84 ms, and Q28 1880.83 ms to 1791.24 ms. The PR is draft while the hosted TPC-H, TPC-DS, and partitioned ClickBench comparison runs. ## Are there any user-facing changes? No API or SQL behavior changes. This changes the physical representation consumed by string `MIN` and `MAX`. -- 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]
