Skip to content

Commit 8f2f537

Browse files
authored
chore: Migrate Encoding functions to invoke_with_args (#14727)
1 parent 19fe44c commit 8f2f537

File tree

1 file changed

+6
-8
lines changed
  • datafusion/functions/src/encoding

1 file changed

+6
-8
lines changed

datafusion/functions/src/encoding/inner.rs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,11 @@ impl ScalarUDFImpl for EncodeFunc {
103103
})
104104
}
105105

106-
fn invoke_batch(
106+
fn invoke_with_args(
107107
&self,
108-
args: &[ColumnarValue],
109-
_number_rows: usize,
108+
args: datafusion_expr::ScalarFunctionArgs,
110109
) -> Result<ColumnarValue> {
111-
encode(args)
110+
encode(&args.args)
112111
}
113112

114113
fn coerce_types(&self, arg_types: &[DataType]) -> Result<Vec<DataType>> {
@@ -183,12 +182,11 @@ impl ScalarUDFImpl for DecodeFunc {
183182
Ok(arg_types[0].to_owned())
184183
}
185184

186-
fn invoke_batch(
185+
fn invoke_with_args(
187186
&self,
188-
args: &[ColumnarValue],
189-
_number_rows: usize,
187+
args: datafusion_expr::ScalarFunctionArgs,
190188
) -> Result<ColumnarValue> {
191-
decode(args)
189+
decode(&args.args)
192190
}
193191

194192
fn coerce_types(&self, arg_types: &[DataType]) -> Result<Vec<DataType>> {

0 commit comments

Comments
 (0)