Blizzara commented on code in PR #12274:
URL: https://github.com/apache/datafusion/pull/12274#discussion_r1743339844


##########
datafusion/functions-aggregate/src/approx_median.rs:
##########
@@ -116,4 +112,8 @@ impl AggregateUDFImpl for ApproxMedian {
             acc_args.exprs[0].data_type(acc_args.schema)?,
         )))
     }
+
+    fn coerce_types(&self, _arg_types: &[DataType]) -> Result<Vec<DataType>> {
+        Ok(vec![DataType::Float64])

Review Comment:
   OOC, why this instead of just defining the signature as DataType::Float64? 
Afaik DF already tries to coerce inputs to the signature



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