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: Iterator for single shard in the tree #14

Merged
merged 24 commits into from
Feb 8, 2024

Conversation

evenyag
Copy link
Owner

@evenyag evenyag commented Feb 6, 2024

I hereby agree to the terms of the GreptimeDB CLA

What's changed and what's your intention?

This PR implements the iterator ShardIter to scan a single shard in the merge tree.

Checklist

  • I have written the necessary rustdoc comments.
  • I have added the necessary unit tests and integration tests.
  • This PR does not require documentation updates.

Refer to a related PR or issue link (optional)

@evenyag evenyag marked this pull request as ready for review February 7, 2024 08:40
src/mito2/src/memtable/merge_tree/tree.rs Outdated Show resolved Hide resolved
}

/// Converts current [RecordBatch] to [Batch].
fn convert_current_record_batch(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Owner Author

@evenyag evenyag Feb 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Slicing the record batch is a bit wasteful as it clones the underlying Vec<ArrayRef>. The data iter also has this issue as it has to clone the record batch for each pk index.

@evenyag evenyag merged commit e3a4317 into poc/compact-memtable Feb 8, 2024
14 of 15 checks passed
@evenyag evenyag deleted the feat/scan-tree branch February 8, 2024 06:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants