Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Increase benches
Browse files Browse the repository at this point in the history
blaginin committed Feb 1, 2025
1 parent f051444 commit 2df8087
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions datafusion/core/benches/aggregate_query_sql.rs
Original file line number Diff line number Diff line change
@@ -174,31 +174,35 @@ fn criterion_benchmark(c: &mut Criterion) {
})
});

c.bench_function("first_many_columns", |b| {
c.bench_function("first_last_many_columns", |b| {
b.iter(|| {
query(
ctx.clone(),
"SELECT first_value(u64_wide order by f64, u64_narrow, utf8) \
FROM t group by u64_narrow",
"SELECT first_value(u64_wide order by f64, u64_narrow, utf8),\
last_value(u64_wide order by f64, u64_narrow, utf8) \
FROM t GROUP BY u64_narrow",
)
})
});

c.bench_function("first_ignore_nulls", |b| {
c.bench_function("first_last_ignore_nulls", |b| {
b.iter(|| {
query(
ctx.clone(),
"SELECT first_value(u64_wide ignore nulls order by f64, u64_narrow, utf8) \
FROM t group by u64_narrow",
"SELECT first_value(u64_wide ignore nulls order by f64, u64_narrow, utf8), \
last_value(u64_wide ignore nulls order by f64, u64_narrow, utf8) \
FROM t GROUP BY u64_narrow",
)
})
});

c.bench_function("first_one_column", |b| {
c.bench_function("first_last_one_column", |b| {
b.iter(|| {
query(
ctx.clone(),
"SELECT first_value(u64_wide order by f64) FROM t group by u64_narrow",
"SELECT first_value(u64_wide order by f64), \
last_value(u64_wide order by f64) \
FROM t GROUP BY u64_narrow",
)
})
});

0 comments on commit 2df8087

Please sign in to comment.