diff --git a/src/mito2/src/sst/parquet/row_group.rs b/src/mito2/src/sst/parquet/row_group.rs index ef2225f2a3a1..827db8999ae8 100644 --- a/src/mito2/src/sst/parquet/row_group.rs +++ b/src/mito2/src/sst/parquet/row_group.rs @@ -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) @@ -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