-
Notifications
You must be signed in to change notification settings - Fork 1.6k
[ENH] Prefetch block by prefixes #4623
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
base: sicheng/05-19-_tst_add_unit_test_for_literal_expr
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -125,6 +125,18 @@ impl< | |
} | ||
} | ||
|
||
pub async fn load_blocks_for_prefixes<'prefix>( | ||
&self, | ||
prefixes: impl IntoIterator<Item = &'prefix str>, | ||
) { | ||
match self { | ||
BlockfileReader::MemoryBlockfileReader(_reader) => unimplemented!(), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [BestPractice] It looks like you've implemented an unimplemented!() case for MemoryBlockfileReader. While this works for now, consider adding a TODO comment explaining when this might be implemented or why it's left unimplemented to help future developers understand the design decision. |
||
BlockfileReader::ArrowBlockfileReader(reader) => { | ||
reader.load_blocks_for_prefixes(prefixes).await | ||
} | ||
} | ||
} | ||
|
||
pub async fn rank( | ||
&'referred_data self, | ||
prefix: &'referred_data str, | ||
|
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.
[Documentation]
The new
get_block_ids_for_prefixes
function could benefit from some documentation comments explaining its purpose, behavior, and usage - especially since it's a key component of the newly added functionality.