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

   ## Which issue does this PR close?
   
   - Closes #26290.
   
   ## Rationale for this change
   
   `MIN`/`MAX` fail with an internal error on `Dictionary<_, RunEndEncoded<_, 
_>>` columns, and return a `Dictionary` type instead of the value type for 
`Dictionary<_, Dictionary<_, _>>` columns. See #26290.
   
   ## What changes are included in this PR?
   
   The `Dictionary` arm of `get_min_max_result_type` now recurses into its 
value type, the same as the `RunEndEncoded` arm added in #26248.
   
   ## What is the testing strategy for this PR?
   
   - `test_get_min_max_return_type_coerce_dictionary` covers `Dictionary<Int32, 
RunEndEncoded<Int32, UInt32>>` → `UInt32` and `Dictionary<Int32, 
Dictionary<Int32, UInt32>>` → `UInt32`.
   - New cases in `dictionary.slt` run `MIN`/`MAX` and `arrow_typeof(MAX(...))` 
over both column types, one query per type.
   
   Without the fix, the `Dictionary<_, RunEndEncoded<_, _>>` query fails with 
the internal error, and the `Dictionary<_, Dictionary<_, _>>` query returns a 
`Dictionary` type.
   
   ## Are there any user-facing changes?
   
   `MIN` and `MAX` over a `Dictionary` column whose values are encoded now 
return the plain value type. There are no API changes.
   
   Generated-by: Claude Code (Claude Opus 5.5). I reviewed the change and can 
answer for it.
   


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