Skip to content

Commit

Permalink
chore: return if nothing to fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
evenyag committed Nov 3, 2023
1 parent 49ead77 commit 15b6bad
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/mito2/src/sst/parquet/row_group.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ impl<'a> InMemoryRowGroup<'a> {
// Now we only use cache in dense chunk data.
self.fetch_pages_from_cache(projection);

let fetch_ranges = self
let fetch_ranges: Vec<_> = self
.column_chunks
.iter()
.zip(&self.column_cached_pages)
Expand All @@ -160,6 +160,11 @@ impl<'a> InMemoryRowGroup<'a> {
})
.collect();

if fetch_ranges.is_empty() {
// Nothing to fetch.
return Ok(());
}

let mut chunk_data = input.get_byte_ranges(fetch_ranges).await?.into_iter();

for (idx, (chunk, cached_pages)) in self
Expand Down

0 comments on commit 15b6bad

Please sign in to comment.