-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[ENH] Implement rank() for blockfile #3331
Conversation
Reviewer ChecklistPlease leverage this checklist to ensure your code review is thorough before approving Testing, Bugs, Errors, Logs, Documentation
System Compatibility
Quality
|
This stack of pull requests is managed by Graphite. Learn more about stacking. |
@@ -657,6 +657,54 @@ impl<'me, K: ArrowReadableKey<'me> + Into<KeyWrapper>, V: ArrowReadableValue<'me | |||
self.root.id | |||
} | |||
|
|||
pub(crate) async fn rank( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a comment here as to what this function does
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added comments
Err(e) | ||
} | ||
} | ||
pub(crate) fn get_offset_stream<'me>( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a comment on the contract of this method. It's not clear from the names
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added comments
c6192f7
to
5c09493
Compare
Description of changes
Summarize the changes made by this PR.
rank(prefix, key)
method for blockfile, which calculates the number of elements in the blockfile that is strictly less than the given prefix-key pair. In otherword, the given prefix-key pair can be inserted at its rank without breaking the order of the blockfile.rank(prefix, key)
method to replaceget_at_index(index)
inLimitOperator
andRecordSegmentReader
.Test plan
How are these changes tested?
pytest
for python,yarn test
for js,cargo test
for rustDocumentation Changes
Are all docstrings for user-facing APIs updated if required? Do we need to make documentation changes in the docs repository?