-
Notifications
You must be signed in to change notification settings - Fork 222
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
fix: list_indices never updated after first call #2936
Conversation
Signed-off-by: BubbleCal <bubble-cal@outlook.com>
Signed-off-by: BubbleCal <bubble-cal@outlook.com>
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.
Looks fine but could maybe use one more test case
python/python/lance/dataset.py
Outdated
num_indices_to_merge: int, default 1 | ||
The number of indices to merge. | ||
If set to 0, new delta index will be created. | ||
indexe_names: List[str], default None |
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.
indexe_names: List[str], default None | |
index_names: List[str], default None |
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.
fixed
dataset | ||
.optimize_indices(&OptimizeOptions { | ||
num_indices_to_merge: 0, // Just create index for delta | ||
index_names: Some(vec![]), // Optimize nothing | ||
}) | ||
.await | ||
.unwrap(); |
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.
Do you want to add a test case where index_names
is set but non-empty?
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.
good point, added tests to cover it
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2936 +/- ##
==========================================
+ Coverage 77.76% 77.77% +0.01%
==========================================
Files 231 231
Lines 70487 70562 +75
Branches 70487 70562 +75
==========================================
+ Hits 54817 54883 +66
+ Misses 12771 12769 -2
- Partials 2899 2910 +11
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
lance in rust would cache the index metadata so no need to cache it in python. - also added an option to control which indices to optimize - also added tests for optimize_indices --------- Signed-off-by: BubbleCal <bubble-cal@outlook.com>
lance in rust would cache the index metadata so no need to cache it in python.