alamb commented on code in PR #12275:
URL: https://github.com/apache/datafusion/pull/12275#discussion_r1740736302


##########
datafusion/expr-common/src/signature.rs:
##########
@@ -105,6 +105,7 @@ pub enum TypeSignature {
     Uniform(usize, Vec<DataType>),
     /// Exact number of arguments of an exact type
     Exact(Vec<DataType>),
+    Coercible(Vec<DataType>),

Review Comment:
   perhaps we could add some comments here explaining what Coercible meant? 
Maybe it means that the input arguments can be coerced to one of the target 
types (in order)? 



##########
datafusion/expr-common/src/type_coercion/aggregates.rs:
##########
@@ -128,9 +128,11 @@ pub fn check_arg_count(
                 );
             }
         }
-        TypeSignature::UserDefined | TypeSignature::Numeric(_) => {
+        TypeSignature::UserDefined
+        | TypeSignature::Numeric(_)
+        | TypeSignature::Coercible(_) => {
             // User-defined signature is validated in `coerce_types`
-            // Numreic signature is validated in `get_valid_types`
+            // Numreic and Coercible signature is validated in 
`get_valid_types`

Review Comment:
   ```suggestion
               // Numeric and Coercible signature is validated in 
`get_valid_types`
   ```



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