davidlghellin commented on code in PR #22248:
URL: https://github.com/apache/datafusion/pull/22248#discussion_r3252888198


##########
datafusion/functions/src/math/ceil.rs:
##########
@@ -191,11 +191,66 @@ impl ScalarUDFImpl for CeilFunc {
     }
 
     fn evaluate_bounds(&self, inputs: &[&Interval]) -> Result<Interval> {
-        let data_type = inputs[0].data_type();
-        Interval::make_unbounded(&data_type)
+        let [input] = inputs else {
+            return Interval::make_unbounded(&DataType::Float64);

Review Comment:
   Applied — returning exec_err! for unexpected arity is cleaner; ceil is 
strictly a 1-argument function and wrong arity signals a caller bug that should 
surface as an error rather than silently returning a potentially mistyped 
interval.



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