Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions datafusion/core/benches/aggregate_query_sql.rs
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,39 @@ fn criterion_benchmark(c: &mut Criterion) {
)
})
});

c.bench_function("string_agg_query_group_by_few_groups", |b| {
b.iter(|| {
query(
ctx.clone(),
&rt,
"SELECT u64_narrow, string_agg(utf8, ',') \
FROM t GROUP BY u64_narrow",
)
})
});

c.bench_function("string_agg_query_group_by_mid_groups", |b| {
b.iter(|| {
query(
ctx.clone(),
&rt,
"SELECT u64_mid, string_agg(utf8, ',') \
FROM t GROUP BY u64_mid",
)
})
});

c.bench_function("string_agg_query_group_by_many_groups", |b| {
b.iter(|| {
query(
ctx.clone(),
&rt,
"SELECT u64_wide, string_agg(utf8, ',') \
FROM t GROUP BY u64_wide",
)
})
});
}

criterion_group!(benches, criterion_benchmark);
Expand Down
Loading
Loading