Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
joseph-isaacs committed Nov 22, 2024
1 parent a1b266e commit 9f40559
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion datafusion/functions/benches/repeat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ fn criterion_benchmark(c: &mut Criterion) {
|b| {
b.iter(|| {
#[allow(deprecated)] // TODO use invoke_batch
black_box(repeat.invoke_batch(&args))
black_box(repeat.invoke_batch(&args, size))
})
},
);
Expand Down
11 changes: 7 additions & 4 deletions datafusion/functions/src/unicode/translate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ use datafusion_common::{exec_err, Result};
use datafusion_expr::scalar_doc_sections::DOC_SECTION_STRING;
use datafusion_expr::TypeSignature::Exact;
use datafusion_expr::{
ColumnarValue, Documentation, ScalarFunctionArgs, ScalarUDFImpl, Signature,
Volatility,
ColumnarValue, Documentation, ScalarUDFImpl, Signature, Volatility,
};

#[derive(Debug)]
Expand Down Expand Up @@ -77,8 +76,12 @@ impl ScalarUDFImpl for TranslateFunc {
utf8_to_str_type(&arg_types[0], "translate")
}

fn invoke_with_args(&self, args: ScalarFunctionArgs) -> Result<ColumnarValue> {
make_scalar_function(invoke_translate, vec![])(args.args.as_slice())
fn invoke_batch(
&self,
args: &[ColumnarValue],
_number_rows: usize,
) -> Result<ColumnarValue> {
make_scalar_function(invoke_translate, vec![])(args)
}

fn documentation(&self) -> Option<&Documentation> {
Expand Down

0 comments on commit 9f40559

Please sign in to comment.