Skip to content

Commit e4f8e56

Browse files
committed
update
1 parent 36d7092 commit e4f8e56

File tree

1 file changed

+16
-13
lines changed

1 file changed

+16
-13
lines changed

datafusion/core/benches/sql_planner.rs

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -62,26 +62,29 @@ pub fn create_table_provider(column_prefix: &str, num_columns: usize) -> Arc<Mem
6262

6363
fn create_context() -> SessionContext {
6464
let ctx = SessionContext::new();
65-
ctx.register_table("t1", create_table_provider("a", 200)).unwrap();
66-
ctx.register_table("t2", create_table_provider("b", 200)).unwrap();
67-
ctx.register_table("t700", create_table_provider("c", 700)).unwrap();
65+
ctx.register_table("t1", create_table_provider("a", 200))
66+
.unwrap();
67+
ctx.register_table("t2", create_table_provider("b", 200))
68+
.unwrap();
69+
ctx.register_table("t700", create_table_provider("c", 700))
70+
.unwrap();
6871
ctx
6972
}
7073

7174
fn criterion_benchmark(c: &mut Criterion) {
7275
let ctx = create_context();
7376

7477
// Test simplest
75-
c.bench_function("select_one_from_700", |b| {
76-
b.iter(|| {
77-
physical_plan(
78-
&ctx,
79-
"SELECT c1 FROM t700",
80-
)
81-
})
78+
c.bench_function("logical_select_one_from_700", |b| {
79+
b.iter(|| logical_plan(&ctx, "SELECT c1 FROM t700"))
80+
});
81+
82+
// Test simplest
83+
c.bench_function("physical_select_one_from_700", |b| {
84+
b.iter(|| physical_plan(&ctx, "SELECT c1 FROM t700"))
8285
});
8386

84-
c.bench_function("trivial join low numbered columns", |b| {
87+
c.bench_function("logical_trivial_join_low_numbered_columns", |b| {
8588
b.iter(|| {
8689
logical_plan(
8790
&ctx,
@@ -91,7 +94,7 @@ fn criterion_benchmark(c: &mut Criterion) {
9194
})
9295
});
9396

94-
c.bench_function("trivial join high numbered columns", |b| {
97+
c.bench_function("logical_trivial_join_high_numbered_columns", |b| {
9598
b.iter(|| {
9699
logical_plan(
97100
&ctx,
@@ -101,7 +104,7 @@ fn criterion_benchmark(c: &mut Criterion) {
101104
})
102105
});
103106

104-
c.bench_function("aggregate with join", |b| {
107+
c.bench_function("logical_aggregate_with_join", |b| {
105108
b.iter(|| {
106109
logical_plan(
107110
&ctx,

0 commit comments

Comments
 (0)