Re: [I] Improve consistency and documentation on error handling in in UDFs [datafusion]

2025-02-12 Thread via GitHub
davidhewitt commented on issue #11618: URL: https://github.com/apache/datafusion/issues/11618#issuecomment-2653788835 I just got here after discovering that the `get_field` UDF returns `exec_err!` when passed an invalid argument type. (We treat `exec_err!` as 500 and `plan_err!` as 400 in P

Re: [I] Improve consistency and documentation on error handling in in UDFs [datafusion]

2024-08-09 Thread via GitHub
jayzhan211 commented on issue #11618: URL: https://github.com/apache/datafusion/issues/11618#issuecomment-2278919160 > Only if we use refined types it would be possible to avoid I think I guess at least we could verified it with `UserDefined` and check against all the edge case in `co

Re: [I] Improve consistency and documentation on error handling in in UDFs [datafusion]

2024-08-09 Thread via GitHub
edmondop commented on issue #11618: URL: https://github.com/apache/datafusion/issues/11618#issuecomment-2278917105 > IMO we should improve on signature instead of adding check in different function. This not only add unnecessary overhead and let the code less readable. And ideally we don't

Re: [I] Improve consistency and documentation on error handling in in UDFs [datafusion]

2024-08-09 Thread via GitHub
jayzhan211 commented on issue #11618: URL: https://github.com/apache/datafusion/issues/11618#issuecomment-2278911574 IMO we should improve on signature instead of adding check in different function. This not only add unnecessary overhead and let the code less readable. -- This is an autom

Re: [I] Improve consistency and documentation on error handling in in UDFs [datafusion]

2024-08-09 Thread via GitHub
edmondop commented on issue #11618: URL: https://github.com/apache/datafusion/issues/11618#issuecomment-2278752770 @jayzhan211 do you think we should start by adding an helper macro for pattern matching branches of UDF `invoke` that should never happen? ```rust udf_unreachable!()

Re: [I] Improve consistency and documentation on error handling in in UDFs [datafusion]

2024-08-07 Thread via GitHub
jayzhan211 commented on issue #11618: URL: https://github.com/apache/datafusion/issues/11618#issuecomment-2274574830 I had file an issue to improve on signature for coercion and length + type checking for functions https://github.com/apache/datafusion/issues/10507 Although I'm not sur

Re: [I] Improve consistency and documentation on error handling in in UDFs [datafusion]

2024-08-07 Thread via GitHub
jayzhan211 commented on issue #11618: URL: https://github.com/apache/datafusion/issues/11618#issuecomment-2274547936 Ideally argument check should be handled by `signature` not `return_type`. Types are also coerced correctly when it reaches `return_type`. But before the `signature` ar

Re: [I] Improve consistency and documentation on error handling in in UDFs [datafusion]

2024-07-28 Thread via GitHub
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-nest

Re: [I] Improve consistency and documentation on error handling in in UDFs [datafusion]

2024-07-28 Thread via GitHub
edmondop commented on issue #11618: URL: https://github.com/apache/datafusion/issues/11618#issuecomment-2254569681 @2010YOUY01 just to confirm, for example in this case https://github.com/apache/datafusion/blob/a721be1b1d863b5b15a7a945c37ec051c449c46f/datafusion/functions-nested/src/resize.

Re: [I] Improve consistency and documentation on error handling in in UDFs [datafusion]

2024-07-24 Thread via GitHub
Omega359 commented on issue #11618: URL: https://github.com/apache/datafusion/issues/11618#issuecomment-2248727261 I had done some work in aligning the errors in the past, see #9164 for details -- This is an automated message from the Apache Git Service. To respond to the message, please

Re: [I] Improve consistency and documentation on error handling in in UDFs [datafusion]

2024-07-24 Thread via GitHub
alamb commented on issue #11618: URL: https://github.com/apache/datafusion/issues/11618#issuecomment-2248668609 I agree with what @2010YOUY01 says Some additional comments about "Planning Error" are that for most UDFs that provide a signature DataFusion will ensure that the function

Re: [I] Improve consistency and documentation on error handling in in UDFs [datafusion]

2024-07-23 Thread via GitHub
2010YOUY01 commented on issue #11618: URL: https://github.com/apache/datafusion/issues/11618#issuecomment-2245388504 We should definitely explain them better in the doc. Here is my understanding. I'm wondering if anyone has additional thoughts or if I'm understanding something wrong.

[I] Improve consistency and documentation on error handling in in UDFs [datafusion]

2024-07-23 Thread via GitHub
edmondop opened a new issue, #11618: URL: https://github.com/apache/datafusion/issues/11618 ### Is your feature request related to a problem or challenge? When writing a new UDF, a developer needs to decide how to perform error management in functions that return `Result`, such as `re