AndreaBozzo opened a new pull request, #20079: URL: https://github.com/apache/datafusion/pull/20079
## Which issue does this PR close? - Closes #19870. ## Rationale for this change Some UDFs/UDAFs implement `return_field_from_args` / `return_field` instead of `return_type`. The information schema was calling `return_type` directly, which fails for those functions. The default implementation of `return_field_from_args` already delegates to `return_type`, so switching to the newer API works for all functions. ## What changes are included in this PR? - **`information_schema.rs`**: `get_udf_args_and_return_types` now calls `return_field_from_args` instead of `return_type`; `get_udaf_args_and_return_types` now calls `return_field` instead of `return_type`. Removed stale comments referencing the old API. - **`date_trunc.rs`**: `return_type` now returns `internal_err`, and `return_field_from_args` is self-contained (no longer delegates to `return_type`), following the same pattern as other UDFs like `named_struct` and `map_from_arrays` (ref: #19275). ## Are these changes tested? Covered by existing information_schema sqllogictests and `datafusion-functions` unit tests. ## Are there any user-facing changes? No. -- 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]
