Skip to content

Commit

Permalink
remove dep
Browse files Browse the repository at this point in the history
  • Loading branch information
joseph-isaacs committed Nov 22, 2024
1 parent 51140b8 commit f997f1c
Show file tree
Hide file tree
Showing 12 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion datafusion/functions/benches/concat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ fn criterion_benchmark(c: &mut Criterion) {
let mut group = c.benchmark_group("concat function");
group.bench_function(BenchmarkId::new("concat", size), |b| {
b.iter(|| {
#[allow(deprecated)] // TODO use invoke_with_args
// TODO use invoke_with_args
criterion::black_box(concat().invoke_batch(&args, size).unwrap())
})
});
Expand Down
4 changes: 2 additions & 2 deletions datafusion/functions/benches/cot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ fn criterion_benchmark(c: &mut Criterion) {
let f32_args = vec![ColumnarValue::Array(f32_array)];
c.bench_function(&format!("cot f32 array: {}", size), |b| {
b.iter(|| {
#[allow(deprecated)] // TODO use invoke_with_args
// TODO use invoke_with_args
black_box(cot_fn.invoke_batch(&f32_args, size).unwrap())
})
});
let f64_array = Arc::new(create_primitive_array::<Float64Type>(size, 0.2));
let f64_args = vec![ColumnarValue::Array(f64_array)];
c.bench_function(&format!("cot f64 array: {}", size), |b| {
b.iter(|| {
#[allow(deprecated)] // TODO use invoke_with_args
// TODO use invoke_with_args
black_box(cot_fn.invoke_batch(&f64_args, size).unwrap())
})
});
Expand Down
2 changes: 1 addition & 1 deletion datafusion/functions/benches/date_bin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ fn criterion_benchmark(c: &mut Criterion) {
let udf = date_bin();

b.iter(|| {
#[allow(deprecated)] // TODO use invoke_with_args
// TODO use invoke_with_args
black_box(
udf.invoke_batch(&[interval.clone(), timestamps.clone()], batch_len)
.expect("date_bin should work on valid values"),
Expand Down
4 changes: 2 additions & 2 deletions datafusion/functions/benches/isnan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ fn criterion_benchmark(c: &mut Criterion) {
let f32_args = vec![ColumnarValue::Array(f32_array)];
c.bench_function(&format!("isnan f32 array: {}", size), |b| {
b.iter(|| {
#[allow(deprecated)] // TODO use invoke_with_args
// TODO use invoke_with_args
black_box(isnan.invoke_batch(&f32_args, size).unwrap())
})
});
let f64_array = Arc::new(create_primitive_array::<Float64Type>(size, 0.2));
let f64_args = vec![ColumnarValue::Array(f64_array)];
c.bench_function(&format!("isnan f64 array: {}", size), |b| {
b.iter(|| {
#[allow(deprecated)] // TODO use invoke_with_args
// TODO use invoke_with_args
black_box(isnan.invoke_batch(&f64_args, size).unwrap())
})
});
Expand Down
2 changes: 1 addition & 1 deletion datafusion/functions/benches/ltrim.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ fn run_with_string_type<M: Measurement>(
),
|b| {
b.iter(|| {
#[allow(deprecated)] // TODO use invoke_with_args
// TODO use invoke_with_args
black_box(ltrim.invoke_batch(&args, size))
})
},
Expand Down
2 changes: 1 addition & 1 deletion datafusion/functions/benches/nullif.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ fn criterion_benchmark(c: &mut Criterion) {
];
c.bench_function(&format!("nullif scalar array: {}", size), |b| {
b.iter(|| {
#[allow(deprecated)] // TODO use invoke_with_args
// TODO use invoke_with_args
black_box(nullif.invoke_batch(&args, size).unwrap())
})
});
Expand Down
2 changes: 1 addition & 1 deletion datafusion/functions/benches/signum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ fn criterion_benchmark(c: &mut Criterion) {
let f64_args = vec![ColumnarValue::Array(f64_array)];
c.bench_function(&format!("signum f64 array: {}", size), |b| {
b.iter(|| {
#[allow(deprecated)] // TODO use invoke_with_args
// TODO use invoke_with_args
black_box(signum.invoke_batch(&f64_args, batch_len).unwrap())
})
});
Expand Down
4 changes: 2 additions & 2 deletions datafusion/functions/benches/substr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ fn criterion_benchmark(c: &mut Criterion) {
),
|b| {
b.iter(|| {
#[allow(deprecated)] // TODO use invoke_with_args
// TODO use invoke_with_args
black_box(substr.invoke_batch(&args, size))
})
},
Expand All @@ -205,7 +205,7 @@ fn criterion_benchmark(c: &mut Criterion) {
),
|b| {
b.iter(|| {
#[allow(deprecated)] // TODO use invoke_with_args
// TODO use invoke_with_args
black_box(substr.invoke_batch(&args, size))
})
},
Expand Down
4 changes: 2 additions & 2 deletions datafusion/functions/benches/to_char.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ fn criterion_benchmark(c: &mut Criterion) {
let patterns = ColumnarValue::Array(Arc::new(patterns(&mut rng)) as ArrayRef);

b.iter(|| {
#[allow(deprecated)] // TODO use invoke_with_args
// TODO use invoke_with_args
black_box(
to_char()
.invoke_batch(&[data.clone(), patterns.clone()], batch_len)
Expand All @@ -106,7 +106,7 @@ fn criterion_benchmark(c: &mut Criterion) {
ColumnarValue::Scalar(ScalarValue::Utf8(Some("%Y-%m-%d".to_string())));

b.iter(|| {
#[allow(deprecated)] // TODO use invoke_with_args
// TODO use invoke_with_args
black_box(
to_char()
.invoke_batch(&[data.clone(), patterns.clone()], batch_len)
Expand Down
4 changes: 2 additions & 2 deletions datafusion/functions/benches/trunc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ fn criterion_benchmark(c: &mut Criterion) {
let f32_args = vec![ColumnarValue::Array(f32_array)];
c.bench_function(&format!("trunc f32 array: {}", size), |b| {
b.iter(|| {
#[allow(deprecated)] // TODO use invoke_with_args
// TODO use invoke_with_args
black_box(trunc.invoke_batch(&f32_args, size).unwrap())
})
});
let f64_array = Arc::new(create_primitive_array::<Float64Type>(size, 0.2));
let f64_args = vec![ColumnarValue::Array(f64_array)];
c.bench_function(&format!("trunc f64 array: {}", size), |b| {
b.iter(|| {
#[allow(deprecated)] // TODO use invoke_with_args
// TODO use invoke_with_args
black_box(trunc.invoke_batch(&f64_args, size).unwrap())
})
});
Expand Down
2 changes: 1 addition & 1 deletion datafusion/functions/benches/upper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ fn criterion_benchmark(c: &mut Criterion) {
let args = create_args(size, 32);
c.bench_function("upper_all_values_are_ascii", |b| {
b.iter(|| {
#[allow(deprecated)] // TODO use invoke_with_args
// TODO use invoke_with_args
black_box(upper.invoke_batch(&args, size))
})
});
Expand Down
4 changes: 2 additions & 2 deletions datafusion/functions/src/datetime/from_unixtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ mod test {
fn test_without_timezone() {
let args = [ColumnarValue::Scalar(Int64(Some(1729900800)))];

#[allow(deprecated)] // TODO use invoke_batch
// TODO use invoke_with_args
let result = FromUnixtimeFunc::new().invoke_batch(&args, 1).unwrap();

match result {
Expand All @@ -186,7 +186,7 @@ mod test {
))),
];

#[allow(deprecated)] // TODO use invoke_batch
// TODO use invoke_with_args
let result = FromUnixtimeFunc::new().invoke_batch(&args, 2).unwrap();

match result {
Expand Down

0 comments on commit f997f1c

Please sign in to comment.