rishiiicreates opened a new pull request, #26938: URL: https://github.com/apache/datafusion/pull/26938
## Which issue does this PR close? Closes #26916 ## Rationale for this change max() and min() aggregate functions return values of the same type as the input column, but were dropping field metadata and arrow extension types like uuid and json from the result schema. first_value() and last_value() already preserve input field metadata. ## What changes are included in this PR? implements return_field on Max and Min in datafusion-functions-aggregate to carry over the input field metadata using with_metadata(arg_fields[0].metadata().clone()). ## What is the testing strategy for this PR? added unit test test_min_max_preserve_metadata in min_max.rs and added sqllogictest cases in metadata.slt verifying that both aggregate and window calls of max and min preserve field metadata. ## Are there any user-facing changes? no breaking changes. max and min now retain field metadata in their output schema. -- 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]
