Skip to content

Commit ef9bc90

Browse files
authored
Minor: add a sql_planner benchmarks to reflecte select many field on a huge table (#9536)
1 parent 30c4fd7 commit ef9bc90

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

datafusion/core/benches/sql_planner.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,8 @@ fn create_context() -> SessionContext {
166166
.unwrap();
167167
ctx.register_table("t700", create_table_provider("c", 700))
168168
.unwrap();
169+
ctx.register_table("t1000", create_table_provider("d", 1000))
170+
.unwrap();
169171

170172
let tpch_schemas = create_tpch_schemas();
171173
tpch_schemas.iter().for_each(|(name, schema)| {
@@ -194,6 +196,16 @@ fn criterion_benchmark(c: &mut Criterion) {
194196
b.iter(|| physical_plan(&ctx, "SELECT c1 FROM t700"))
195197
});
196198

199+
// Test simplest
200+
c.bench_function("logical_select_all_from_1000", |b| {
201+
b.iter(|| logical_plan(&ctx, "SELECT * FROM t1000"))
202+
});
203+
204+
// Test simplest
205+
c.bench_function("physical_select_all_from_1000", |b| {
206+
b.iter(|| physical_plan(&ctx, "SELECT * FROM t1000"))
207+
});
208+
197209
c.bench_function("logical_trivial_join_low_numbered_columns", |b| {
198210
b.iter(|| {
199211
logical_plan(

0 commit comments

Comments
 (0)