Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(mito): avoid buffering all batches for the same primary key #2658

Merged
merged 7 commits into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/mito2/src/read.rs
Original file line number Diff line number Diff line change
Expand Up @@ -647,6 +647,17 @@ impl Source {
Source::Iter(iter) => iter.next().transpose(),
}
}

/// Returns next non-empty [Batch].
pub(crate) async fn next_non_empty_batch(&mut self) -> Result<Option<Batch>> {
evenyag marked this conversation as resolved.
Show resolved Hide resolved
while let Some(batch) = self.next_batch().await? {
if !batch.is_empty() {
return Ok(Some(batch));
}
}

Ok(None)
}
}

/// Async batch reader.
Expand Down
Loading
Loading