Skip to content

Commit ee2a6d6

Browse files
committed
cargo fmt
1 parent 4c19675 commit ee2a6d6

File tree

1 file changed

+31
-11
lines changed

1 file changed

+31
-11
lines changed

datafusion/physical-plan/benches/sort_merge_join.rs

Lines changed: 31 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,7 @@ fn create_test_data() -> SortMergeJoinExec {
5353
)];
5454
let sort_options = vec![SortOptions::default(); on.len()];
5555

56-
SortMergeJoinExec::try_new(left, right, on, None, Inner, sort_options, false)
57-
.unwrap()
56+
SortMergeJoinExec::try_new(left, right, on, None, Inner, sort_options, false).unwrap()
5857
}
5958

6059
// `cargo bench --bench sort_merge_join`
@@ -78,19 +77,40 @@ fn bench_spill(c: &mut Criterion) {
7877

7978
group.bench_function("SortMergeJoinExec_spill", |b| {
8079
b.iter(|| {
81-
criterion::black_box(
82-
rt.block_on(async {
83-
let stream = sort_merge_join_exec.execute(0, Arc::clone(&task_ctx)).unwrap();
84-
collect(stream).await.unwrap()
85-
})
86-
)
80+
criterion::black_box(rt.block_on(async {
81+
let stream = sort_merge_join_exec
82+
.execute(0, Arc::clone(&task_ctx))
83+
.unwrap();
84+
collect(stream).await.unwrap()
85+
}))
8786
})
8887
});
8988
group.finish();
9089

91-
assert!(sort_merge_join_exec.metrics().unwrap().spill_count().unwrap() > 0);
92-
assert!(sort_merge_join_exec.metrics().unwrap().spilled_bytes().unwrap() > 0);
93-
assert!(sort_merge_join_exec.metrics().unwrap().spilled_rows().unwrap() > 0);
90+
assert!(
91+
sort_merge_join_exec
92+
.metrics()
93+
.unwrap()
94+
.spill_count()
95+
.unwrap()
96+
> 0
97+
);
98+
assert!(
99+
sort_merge_join_exec
100+
.metrics()
101+
.unwrap()
102+
.spilled_bytes()
103+
.unwrap()
104+
> 0
105+
);
106+
assert!(
107+
sort_merge_join_exec
108+
.metrics()
109+
.unwrap()
110+
.spilled_rows()
111+
.unwrap()
112+
> 0
113+
);
94114
}
95115

96116
criterion_group!(benches, bench_spill);

0 commit comments

Comments
 (0)