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: flat KNN column stats order doesn't match schema #3451

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

BubbleCal
Copy link
Contributor

this causes an error when query with distance range, and there are unindexed rows

@BubbleCal BubbleCal marked this pull request as ready for review February 14, 2025 13:21
@github-actions github-actions bot added the bug Something isn't working label Feb 14, 2025
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.83%. Comparing base (a6101e5) to head (fb014b3).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3451      +/-   ##
==========================================
+ Coverage   78.81%   78.83%   +0.02%     
==========================================
  Files         251      251              
  Lines       92821    92824       +3     
  Branches    92821    92824       +3     
==========================================
+ Hits        73159    73182      +23     
+ Misses      16686    16663      -23     
- Partials     2976     2979       +3     
Flag Coverage Δ
unittests 78.83% <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.

.zip(schema.fields())
.filter(|(_, field)| field.name() != DIST_COL)
.map(|(stats, _)| stats)
.chain(std::iter::once(ColumnStatistics::new_unknown()))
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe not important, but I feel like we could do better with:

  • min -> 0.0
  • null_count -> vector_column.null_count

@QianZhu
Copy link
Contributor

QianZhu commented Feb 15, 2025

@BubbleCal can we add a test?

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.

4 participants