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


##########
datafusion/functions/src/string/repeat.rs:
##########
@@ -65,10 +65,17 @@ impl Default for RepeatFunc {
 impl RepeatFunc {
     pub fn new() -> Self {
         Self {
-            signature: Signature::coercible(
+            signature: Signature::coercible_v2(
                 vec![
-                    TypeSignatureClass::Native(logical_string()),
-                    TypeSignatureClass::Native(logical_int64()),
+                    Coercion {
+                        desired_type: 
TypeSignatureClass::Native(logical_string()),
+                        allowed_casts: vec![],
+                    },
+                    // Accept all integer types but cast them to i64
+                    Coercion {
+                        desired_type: 
TypeSignatureClass::Native(logical_int64()),
+                        allowed_casts: vec![TypeSignatureClass::Integer],

Review Comment:
   Without this, i32 is rejected.



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