Skip to content

Commit 659754f

Browse files
committed
count group benchmark check
1 parent 45a19b0 commit 659754f

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

datafusion/functions-aggregate/benches/count_distinct.rs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,7 @@ fn count_distinct_groups_benchmark(c: &mut Criterion) {
224224
let (_schema, args) = prepare_args(DataType::Int64);
225225

226226
if count_fn.groups_accumulator_supported(args.clone()) {
227+
<<<<<<< Updated upstream
227228
c.bench_function(&format!("count_distinct_groups {name}"), |b| {
228229
b.iter(|| {
229230
let (_schema, args) = prepare_args(DataType::Int64);
@@ -238,6 +239,25 @@ fn count_distinct_groups_benchmark(c: &mut Criterion) {
238239
acc.evaluate(EmitTo::All).unwrap()
239240
})
240241
});
242+
=======
243+
c.bench_function(
244+
&format!("count_distinct_groups i64 {num_groups} groups"),
245+
|b| {
246+
b.iter(|| {
247+
let mut acc =
248+
count_fn.create_groups_accumulator(args.clone()).unwrap();
249+
acc.update_batch(
250+
std::slice::from_ref(&values),
251+
&group_indices,
252+
None,
253+
num_groups,
254+
)
255+
.unwrap();
256+
acc.evaluate(EmitTo::All).unwrap()
257+
})
258+
},
259+
);
260+
>>>>>>> Stashed changes
241261
} else {
242262
c.bench_function(&format!("count_distinct_groups {name}"), |b| {
243263
b.iter(|| {

0 commit comments

Comments
 (0)