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


##########
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:
   I think you are referring to `coerced_from`? I want to deprecate that 
function because the downside of having single truth of coercion make updating 
the coercion rule unpredictable, easy to cause bug without notice (hard to have 
full test coverage too). The new approach is to handle the coercion by 
signature.
   
   I think I could change the signature to `Coercible(vec![Float64])` #12275 



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