sdf-jkl commented on code in PR #26939:
URL: https://github.com/apache/datafusion/pull/26939#discussion_r4446131356


##########
datafusion/functions-aggregate/src/min_max.rs:
##########
@@ -207,6 +208,16 @@ impl FromColumnStatistics for Max {
     }
 }
 
+/// Returns the field of the result of `min` or `max`. The result has the type 
of the argument,
+/// so it keeps the metadata of the argument field, such as an extension type.
+fn min_max_return_field(
+    func: &impl AggregateUDFImpl,
+    arg_fields: &[FieldRef],
+) -> Result<FieldRef> {
+    let field = udaf_default_return_field(func, arg_fields)?;
+    Ok(FieldMetadata::from(arg_fields[0].as_ref()).add_to_field_ref(field))

Review Comment:
   Filed here -- https://github.com/apache/datafusion/issues/27013



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