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


##########
datafusion/expr/src/type_coercion/functions.rs:
##########
@@ -440,13 +440,13 @@ fn get_valid_types(
     fn function_length_check(length: usize, expected_length: usize) -> 
Result<()> {
         if length < 1 {

Review Comment:
   We can remove this check, 0 arg is handled early in 
   
   ```rust
       if current_types.is_empty() {
           if type_signature.supports_zero_argument() {
               return Ok(vec![]);
           } else if type_signature.used_to_support_zero_arguments() {
               // Special error to help during upgrade: 
https://github.com/apache/datafusion/issues/13763
               return plan_err!("{} does not support zero arguments. Use 
TypeSignature::Nullary for zero arguments.", func.name());
           } else {
               return plan_err!("{} does not support zero arguments.", 
func.name());
           }
       }
   ```



-- 
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: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to