Skip to content

Commit

Permalink
try next instead of collect
Browse files Browse the repository at this point in the history
  • Loading branch information
jiacai2050 committed Nov 14, 2022
1 parent bdd9b7b commit 4043ce1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions benchmarks/src/parquet_bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ impl ParquetBench {
let open_cost = open_instant.elapsed();

let filter_begin_instant = Instant::now();
let stream = ParquetRecordBatchStreamBuilder::new(cursor)
let mut stream = ParquetRecordBatchStreamBuilder::new(cursor)
.await
.unwrap()
.with_batch_size(self.batch_size)
Expand All @@ -143,7 +143,7 @@ impl ParquetBench {
let mut total_rows = 0;
let mut batch_num = 0;
let iter_begin_instant = Instant::now();
for record_batch in stream.try_collect::<Vec<_>>().await.unwrap() {
for record_batch in stream.try_next().await.unwrap() {
let num_rows = record_batch.num_rows();
total_rows += num_rows;
batch_num += 1;
Expand Down

0 comments on commit 4043ce1

Please sign in to comment.