alamb commented on code in PR #13717:
URL: https://github.com/apache/datafusion/pull/13717#discussion_r1883886706


##########
datafusion/core/src/catalog_common/information_schema.rs:
##########
@@ -406,6 +406,7 @@ fn get_udf_args_and_return_types(
             .into_iter()
             .map(|arg_types| {
                 // only handle the function which implemented 
[`ScalarUDFImpl::return_type`] method
+                #[allow(deprecated)]

Review Comment:
   While reading https://github.com/apache/datafusion/issues/13735 and thinking 
about the churn we had recently with `invoke_with_batch` and 
`invoke_with_args`, etc
   
   What if we made a new API that could accomodate both usecases. Something like
   
   ```rust
   struct ReturnTypeArgs {
          // Argments, if available. This may not be available in some contexts
          // such as information_table schema queries
           args: Option<&[Expr]>
          // schema, if available. 
           schema: Option<&dyn ExprSchema>,
           arg_types: &[DataType],
   }
   
   impl ScalarUdfImpl {
     /// returns the result type, given `args` if possible
     /// if not possible, returns `Ok(None)`
     fn return_type_with_args(&self, args: &ReturnTypeArgs) -> 
Result<Option<DataType>> 
   }
   ```
   
   🤔 
       



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