From 4e0877075904f0ffedbd3ce534821afa879b6028 Mon Sep 17 00:00:00 2001 From: Andy Grove Date: Wed, 11 Dec 2024 07:21:10 -0700 Subject: [PATCH] address feedback --- datafusion/core/src/catalog_common/information_schema.rs | 1 + datafusion/expr/src/udf.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/datafusion/core/src/catalog_common/information_schema.rs b/datafusion/core/src/catalog_common/information_schema.rs index 1d4a3c15f7ca..604209e7ab29 100644 --- a/datafusion/core/src/catalog_common/information_schema.rs +++ b/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)] let return_type = udf.return_type(&arg_types).ok().map(|t| t.to_string()); let arg_types = arg_types .into_iter() diff --git a/datafusion/expr/src/udf.rs b/datafusion/expr/src/udf.rs index 238bc3bcbeca..5cc0321b7493 100644 --- a/datafusion/expr/src/udf.rs +++ b/datafusion/expr/src/udf.rs @@ -173,6 +173,7 @@ impl ScalarUDF { /// its [`ScalarUDFImpl::return_type`] should raise an error. /// /// See [`ScalarUDFImpl::return_type`] for more details. + #[deprecated(since = "44.0.0", note = "Use return_type_from_exprs() instead")] pub fn return_type(&self, arg_types: &[DataType]) -> Result { #[allow(deprecated)] self.inner.return_type(arg_types)