2010YOUY01 commented on issue #11618:
URL: https://github.com/apache/datafusion/issues/11618#issuecomment-2254841284

   > @2010YOUY01 just to confirm, for example in this case
   > 
   > 
https://github.com/apache/datafusion/blob/a721be1b1d863b5b15a7a945c37ec051c449c46f/datafusion/functions-nested/src/resize.rs#L72
   > 
   > 
   > it should return a planner error, not an exec_error. Also the check on the 
length of the arguments should be done in `return_type` and not in
   > 
https://github.com/apache/datafusion/blob/a721be1b1d863b5b15a7a945c37ec051c449c46f/datafusion/functions-nested/src/resize.rs#L90
   > 
   > Is this correct?
   
   I agree.
   
   The first error can be triggered by bad input, so it's a planning error
   ```
   > select array_resize('foo', 5, 0);
   Execution error: Not reachable, data_type should be List, LargeList or 
FixedSizeList
   ```
   
   The second one is redundant, but it's also okay to change it to 
`internal_err!("Not reachable, arguments number check should already be done")`


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