-
Notifications
You must be signed in to change notification settings - Fork 743
feat: optimize indices #1841
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: optimize indices #1841
Changes from 7 commits
d61bbe4
d21ea6b
0afc5a3
b8943cd
e6e5129
7d81511
e14d418
2d5dcef
200c34f
7a11266
72024e4
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 |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| // Copyright 2024 Lance Developers. | ||
| // | ||
| // Licensed under the Apache License, Version 2.0 (the "License"); | ||
| // you may not use this file except in compliance with the License. | ||
| // You may obtain a copy of the License at | ||
| // | ||
| // http://www.apache.org/licenses/LICENSE-2.0 | ||
| // | ||
| // Unless required by applicable law or agreed to in writing, software | ||
| // distributed under the License is distributed on an "AS IS" BASIS, | ||
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| // See the License for the specific language governing permissions and | ||
| // limitations under the License. | ||
|
|
||
| /// Options for optimizing all indices. | ||
| #[derive(Debug)] | ||
| pub struct OptimizeOptions { | ||
| /// Number of delta indices to merge for one column. Default: 1. | ||
| /// | ||
| /// If `num_indices_to_merge` is 0, a new delta index will be created. | ||
| /// If `num_indices_to_merge` is 1, the delta updates will be merged into the latest index. | ||
| /// If `num_indices_to_merge` is more than 1, the delta updates and latest N indices | ||
| /// will be merged into one single index. | ||
|
Comment on lines
+20
to
+23
Member
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. I think we need to explain to the user why they would change this parameter.
Member
Author
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. Updated the doc
Member
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. Don't worry too much. We can tweak this if/when the parameter becomes public. I'm guessing that there is some kind of cost-to-compute/accuracy-of-index tradeoff here? Or is it a cost-to-compute/cost-to-search tradeoff? In other words, "why wouldn't I merge the indicies into one big index every time?" or "why wouldn't I make every index a delta index?" I'm still not sure it is clear from the comment. |
||
| pub num_indices_to_merge: usize, | ||
| } | ||
|
|
||
| impl Default for OptimizeOptions { | ||
| fn default() -> Self { | ||
| Self { | ||
| num_indices_to_merge: 1, | ||
| } | ||
| } | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.