Skip to content

Commit 1a22df3

Browse files
authored
Merge pull request #13 from dariocurr/update-deps
bump datafusion from 43 to 49
2 parents 5fa184d + e532e19 commit 1a22df3

File tree

17 files changed

+942
-650
lines changed

17 files changed

+942
-650
lines changed

.github/dependabot.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
version: 2
2+
3+
updates:
4+
- package-ecosystem: github-actions
5+
directory: /
6+
schedule:
7+
interval: daily
8+
target-branch: develop
9+
10+
- package-ecosystem: cargo
11+
directory: /
12+
schedule:
13+
interval: daily
14+
target-branch: develop

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ fail_fast: true
1919

2020
repos:
2121
- repo: https://github.com/pre-commit/pre-commit-hooks
22-
rev: v4.0.1
22+
rev: v6.0.0
2323
hooks:
2424
- id: check-yaml
2525
- id: check-toml

.rustfmt.toml

Lines changed: 0 additions & 18 deletions
This file was deleted.

Cargo.toml

Lines changed: 31 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -18,34 +18,47 @@
1818
[package]
1919
name = "datafusion-functions-extra"
2020
version = "0.2.0"
21-
edition = "2021"
21+
edition = "2024"
2222
description = "Extra Functions for DataFusion"
2323
readme = "README.md"
2424
license = "Apache-2.0"
25-
keywords = ["datafusion", "functions-extra", "aggregations"]
25+
keywords = [
26+
"aggregations",
27+
"datafusion",
28+
"functions-extra",
29+
]
2630
repository = "https://github.com/datafusion-contrib/datafusion-functions-extra/"
27-
rust-version = "1.76"
28-
29-
[lib]
30-
name = "datafusion_functions_extra"
31-
path = "src/lib.rs"
3231

3332
[dependencies]
34-
arrow = { version = "53.0.0", features = ["test_utils"] }
35-
datafusion = "42"
36-
log = "^0.4"
37-
paste = "1"
33+
log = "0.4"
34+
paste = "1.0"
35+
36+
[dependencies.datafusion]
37+
default-features = false
38+
version = "49.0"
3839

3940
[dev-dependencies]
40-
arrow = { version = "53.0.0", features = ["test_utils"] }
41-
criterion = { version = "0.5", features = ["async_tokio"] }
42-
insta = { version = "1.40.0", features = ["yaml"] }
43-
tokio = { version = "1.36", features = ["full"] }
41+
criterion = "0.7"
42+
rand = "0.9"
43+
tokio = "1.47"
4444

45-
[lints.clippy]
46-
dbg_macro = "deny"
47-
print_stdout = "deny"
45+
[dev-dependencies.arrow]
46+
default-features = false
47+
features = [
48+
"test_utils",
49+
]
50+
version = "55.0"
51+
52+
[dev-dependencies.insta]
53+
features = [
54+
"yaml",
55+
]
56+
version = "1.43"
4857

4958
[[bench]]
5059
name = "mode"
5160
harness = false
61+
62+
[lints.clippy]
63+
dbg_macro = "deny"
64+
print_stdout = "deny"

benches/mode.rs

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -15,44 +15,40 @@
1515
// specific language governing permissions and limitations
1616
// under the License.
1717

18-
use std::sync::Arc;
19-
2018
use arrow::util::bench_util::{create_primitive_array, create_string_array};
21-
use criterion::{black_box, criterion_group, criterion_main, Criterion};
22-
use datafusion::{
23-
arrow::{
24-
self,
25-
array::ArrayRef,
26-
datatypes::{DataType, Int32Type},
27-
},
28-
logical_expr::Accumulator,
29-
};
19+
use criterion::{Criterion, criterion_group, criterion_main};
20+
use datafusion::{arrow, logical_expr::Accumulator};
3021
use datafusion_functions_extra::common::mode::{BytesModeAccumulator, PrimitiveModeAccumulator};
22+
use std::{hint, slice, sync};
3123

3224
fn prepare_primitive_mode_accumulator() -> Box<dyn Accumulator> {
33-
Box::new(PrimitiveModeAccumulator::<Int32Type>::new(&DataType::Int32))
25+
Box::new(
26+
PrimitiveModeAccumulator::<arrow::datatypes::Int32Type>::new(
27+
&arrow::datatypes::DataType::Int32,
28+
),
29+
)
3430
}
3531

3632
fn prepare_bytes_mode_accumulator() -> Box<dyn Accumulator> {
37-
Box::new(BytesModeAccumulator::new(&DataType::Utf8))
33+
Box::new(BytesModeAccumulator::new(&arrow::datatypes::DataType::Utf8))
3834
}
3935

40-
fn mode_bench_primitive(c: &mut Criterion, name: &str, values: ArrayRef) {
36+
fn mode_bench_primitive(c: &mut Criterion, name: &str, values: arrow::array::ArrayRef) {
4137
let mut accumulator = prepare_primitive_mode_accumulator();
4238
c.bench_function(name, |b| {
4339
b.iter(|| {
44-
accumulator.update_batch(&[values.clone()]).unwrap();
45-
black_box(accumulator.evaluate().unwrap());
40+
accumulator.update_batch(slice::from_ref(&values)).unwrap();
41+
hint::black_box(accumulator.evaluate().unwrap());
4642
});
4743
});
4844
}
4945

50-
fn mode_bench_bytes(c: &mut Criterion, name: &str, values: ArrayRef) {
46+
fn mode_bench_bytes(c: &mut Criterion, name: &str, values: arrow::array::ArrayRef) {
5147
let mut accumulator = prepare_bytes_mode_accumulator();
5248
c.bench_function(name, |b| {
5349
b.iter(|| {
54-
accumulator.update_batch(&[values.clone()]).unwrap();
55-
black_box(accumulator.evaluate().unwrap());
50+
accumulator.update_batch(slice::from_ref(&values)).unwrap();
51+
hint::black_box(accumulator.evaluate().unwrap());
5652
});
5753
});
5854
}
@@ -63,7 +59,10 @@ fn mode_benchmark(c: &mut Criterion) {
6359

6460
for &size in &sizes {
6561
for &null_percentage in &null_percentages {
66-
let values = Arc::new(create_primitive_array::<Int32Type>(size, null_percentage)) as ArrayRef;
62+
let values = sync::Arc::new(create_primitive_array::<arrow::datatypes::Int32Type>(
63+
size,
64+
null_percentage,
65+
)) as arrow::array::ArrayRef;
6766
let name = format!(
6867
"PrimitiveModeAccumulator: {} elements, {}% nulls",
6968
size,
@@ -75,7 +74,8 @@ fn mode_benchmark(c: &mut Criterion) {
7574

7675
for &size in &sizes {
7776
for &null_percentage in &null_percentages {
78-
let values = Arc::new(create_string_array::<i32>(size, null_percentage)) as ArrayRef;
77+
let values = sync::Arc::new(create_string_array::<i32>(size, null_percentage))
78+
as arrow::array::ArrayRef;
7979
let name = format!(
8080
"BytesModeAccumulator: {} elements, {}% nulls",
8181
size,
File renamed without changes.

0 commit comments

Comments
 (0)