Jefffrey commented on code in PR #19463:
URL: https://github.com/apache/datafusion/pull/19463#discussion_r2643654286
##########
datafusion/functions-aggregate/src/correlation.rs:
##########
@@ -85,8 +86,11 @@ impl Correlation {
/// Create a new CORR aggregate function
pub fn new() -> Self {
Self {
- signature: Signature::exact(
- vec![DataType::Float64, DataType::Float64],
+ signature: Signature::coercible(
+ vec![
+ Coercion::new_exact(TypeSignatureClass::Numeric),
+ Coercion::new_exact(TypeSignatureClass::Numeric),
+ ],
Review Comment:
I'm not a fan of the approach to do the cast internally in the function
implementation, especially if that can be represented at the signature level
instead.
I feel we should take a more targeted approach, one by one, instead of
trying all these functions together, as they seem to handle things differently
in subtle ways.
--
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]