@@ -164,7 +164,8 @@ macro_rules! make_math_unary_udf {
164
164
use datafusion_expr:: interval_arithmetic:: Interval ;
165
165
use datafusion_expr:: sort_properties:: { ExprProperties , SortProperties } ;
166
166
use datafusion_expr:: {
167
- ColumnarValue , Documentation , ScalarUDFImpl , Signature , Volatility ,
167
+ ColumnarValue , Documentation , ScalarFunctionArgs , ScalarUDFImpl ,
168
+ Signature , Volatility ,
168
169
} ;
169
170
170
171
#[ derive( Debug ) ]
@@ -218,12 +219,11 @@ macro_rules! make_math_unary_udf {
218
219
$EVALUATE_BOUNDS( inputs)
219
220
}
220
221
221
- fn invoke_batch (
222
+ fn invoke_with_args (
222
223
& self ,
223
- args: & [ ColumnarValue ] ,
224
- _number_rows: usize ,
224
+ args: ScalarFunctionArgs ,
225
225
) -> Result <ColumnarValue > {
226
- let args = ColumnarValue :: values_to_arrays( args) ?;
226
+ let args = ColumnarValue :: values_to_arrays( & args . args) ?;
227
227
let arr: ArrayRef = match args[ 0 ] . data_type( ) {
228
228
DataType :: Float64 => Arc :: new(
229
229
args[ 0 ]
@@ -278,7 +278,8 @@ macro_rules! make_math_binary_udf {
278
278
use datafusion_expr:: sort_properties:: { ExprProperties , SortProperties } ;
279
279
use datafusion_expr:: TypeSignature ;
280
280
use datafusion_expr:: {
281
- ColumnarValue , Documentation , ScalarUDFImpl , Signature , Volatility ,
281
+ ColumnarValue , Documentation , ScalarFunctionArgs , ScalarUDFImpl ,
282
+ Signature , Volatility ,
282
283
} ;
283
284
284
285
#[ derive( Debug ) ]
@@ -330,12 +331,11 @@ macro_rules! make_math_binary_udf {
330
331
$OUTPUT_ORDERING( input)
331
332
}
332
333
333
- fn invoke_batch (
334
+ fn invoke_with_args (
334
335
& self ,
335
- args: & [ ColumnarValue ] ,
336
- _number_rows: usize ,
336
+ args: ScalarFunctionArgs ,
337
337
) -> Result <ColumnarValue > {
338
- let args = ColumnarValue :: values_to_arrays( args) ?;
338
+ let args = ColumnarValue :: values_to_arrays( & args . args) ?;
339
339
let arr: ArrayRef = match args[ 0 ] . data_type( ) {
340
340
DataType :: Float64 => {
341
341
let y = args[ 0 ] . as_primitive:: <Float64Type >( ) ;
0 commit comments