@@ -225,11 +225,13 @@ impl ScalarUDF {
225
225
self . inner . is_nullable ( args, schema)
226
226
}
227
227
228
+ #[ deprecated( since = "46.0.0" , note = "Use `invoke_with_args` instead" ) ]
228
229
pub fn invoke_batch (
229
230
& self ,
230
231
args : & [ ColumnarValue ] ,
231
232
number_rows : usize ,
232
233
) -> Result < ColumnarValue > {
234
+ #[ allow( deprecated) ]
233
235
self . inner . invoke_batch ( args, number_rows)
234
236
}
235
237
@@ -244,15 +246,15 @@ impl ScalarUDF {
244
246
///
245
247
/// Note: This method is deprecated and will be removed in future releases.
246
248
/// User defined functions should implement [`Self::invoke_with_args`] instead.
247
- #[ deprecated( since = "42.1.0" , note = "Use `invoke_batch ` instead" ) ]
249
+ #[ deprecated( since = "42.1.0" , note = "Use `invoke_with_args ` instead" ) ]
248
250
pub fn invoke_no_args ( & self , number_rows : usize ) -> Result < ColumnarValue > {
249
251
#[ allow( deprecated) ]
250
252
self . inner . invoke_no_args ( number_rows)
251
253
}
252
254
253
255
/// Returns a `ScalarFunctionImplementation` that can invoke the function
254
256
/// during execution
255
- #[ deprecated( since = "42.0.0" , note = "Use `invoke_batch ` instead" ) ]
257
+ #[ deprecated( since = "42.0.0" , note = "Use `invoke_with_args ` instead" ) ]
256
258
pub fn fun ( & self ) -> ScalarFunctionImplementation {
257
259
let captured = Arc :: clone ( & self . inner ) ;
258
260
#[ allow( deprecated) ]
@@ -613,6 +615,7 @@ pub trait ScalarUDFImpl: Debug + Send + Sync {
613
615
/// User defined functions should implement [`Self::invoke_with_args`] instead.
614
616
///
615
617
/// See <https://github.com/apache/datafusion/issues/13515> for more details.
618
+ #[ deprecated( since = "46.0.0" , note = "Use `invoke_with_args` instead" ) ]
616
619
fn invoke_batch (
617
620
& self ,
618
621
args : & [ ColumnarValue ] ,
@@ -643,6 +646,7 @@ pub trait ScalarUDFImpl: Debug + Send + Sync {
643
646
/// [`ColumnarValue::values_to_arrays`] can be used to convert the arguments
644
647
/// to arrays, which will likely be simpler code, but be slower.
645
648
fn invoke_with_args ( & self , args : ScalarFunctionArgs ) -> Result < ColumnarValue > {
649
+ #[ allow( deprecated) ]
646
650
self . invoke_batch ( & args. args , args. number_rows )
647
651
}
648
652
0 commit comments