jatin510 commented on PR #14236: URL: https://github.com/apache/datafusion/pull/14236#issuecomment-2609876428
> Thansk for working on this @jatin510 and @korowa -- another way to implement this same functionality would using the `signature` (in which case DataFusion will handle the casting for you) > > It seems like the current method simply accepts any argument types > > https://github.com/apache/datafusion/blob/4e877a08d224d992a8cbcc9a14f59468e312b13f/datafusion/functions-nested/src/repeat.rs#L104 > > I think you could potentially use a signature https://docs.rs/datafusion/latest/datafusion/logical_expr/struct.Signature.html > > Or maybe you could implement https://docs.rs/datafusion/latest/datafusion/logical_expr/trait.ScalarUDFImpl.html#method.coerce_types directly > > (and simply say the second argument must be an Int64 or UInt64) > > 🤔 It makes sense. I will update the `signature` of the `array_repeat` to handle casting and type conversion. -- 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]
