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

fix: filter the vec index in function Index::scalar_index_info #3000

Merged
merged 2 commits into from
Oct 14, 2024

Conversation

SaintBacchus
Copy link
Contributor

Create the vector index error when the schema has nullable field.

image

When the vector column had build index already, the dataset scaner will assign the filter in function compute_partitions.

    if dataset.schema.field(column).nullable and filter_nan:
        filt = f"{column} is not null"
    else:
        filt = None

The scanner will use the scalar index scanner and this scanner treat the vector index as scalar index(btree index).

This pr will filter the vector index in scalar_index_info and it will only return the scalar index now.

@github-actions github-actions bot added the bug Something isn't working label Oct 12, 2024
@codecov-commenter
Copy link

codecov-commenter commented Oct 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.80%. Comparing base (cdac5de) to head (c67edfd).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3000      +/-   ##
==========================================
+ Coverage   78.77%   78.80%   +0.02%     
==========================================
  Files         237      237              
  Lines       74099    74106       +7     
  Branches    74099    74106       +7     
==========================================
+ Hits        58374    58398      +24     
  Misses      12703    12703              
+ Partials     3022     3005      -17     
Flag Coverage Δ
unittests 78.80% <100.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@wjones127 wjones127 left a comment

Choose a reason for hiding this comment

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

Looks reasonable. Thank you! 👍

@wjones127 wjones127 merged commit f98ffdd into lancedb:main Oct 14, 2024
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants