comphead commented on code in PR #16039:
URL: https://github.com/apache/datafusion/pull/16039#discussion_r2087285264
##########
datafusion/expr/src/udf.rs:
##########
@@ -451,7 +451,7 @@ pub trait ScalarUDFImpl: Debug + Send + Sync {
///
/// # Notes
///
- /// Most UDFs should implement [`Self::return_type`] and not this
+ /// Most UDFs can implement [`Self::return_type`] and not this
/// function as the output type for most functions only depends on the
types
/// of their inputs (e.g. `sqrt(f32)` is always `f32`).
Review Comment:
```suggestion
/// For the majority of UDFs, implementing [`Self::return_type`] is
sufficient,
/// as the result type is typically a deterministic function of the input
types
/// (e.g., `sqrt(f32)` consistently yields `f32`). Implementing this method
directly
/// is generally unnecessary unless the return type depends on runtime
values.
```
?
--
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]