lancedb / lance

Modern columnar data format for ML and LLMs implemented in Rust. Convert from parquet in 2 lines of code for 100x faster random access, vector index, and data versioning. Compatible with Pandas, DuckDB, Polars, Pyarrow, and PyTorch with more integrations coming..
https://lancedb.github.io/lance/
Apache License 2.0
3.97k stars 224 forks source link

fix: handle filter on empty partition #3151

Closed eddyxu closed 12 hours ago

eddyxu commented 12 hours ago

It panicked when it applies filter on an empty partition

thread 'index::vector::pq::tests::test_filter_on_empty_pq_code' panicked at rust/lance/src/index/vector/pq.rs:125:14:
chunk size must be non-zero
codecov-commenter commented 12 hours ago

Codecov Report

Attention: Patch coverage is 48.38710% with 16 lines in your changes missing coverage. Please review.

Project coverage is 77.86%. Comparing base (8069936) to head (451d4c0).

Files with missing lines Patch % Lines
rust/lance/src/index/vector/pq.rs 48.38% 15 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #3151 +/- ## ========================================== - Coverage 77.89% 77.86% -0.04% ========================================== Files 242 242 Lines 82183 82214 +31 Branches 82183 82214 +31 ========================================== - Hits 64020 64016 -4 - Misses 14973 14979 +6 - Partials 3190 3219 +29 ``` | [Flag](https://app.codecov.io/gh/lancedb/lance/pull/3151/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=lancedb) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/lancedb/lance/pull/3151/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=lancedb) | `77.86% <48.38%> (-0.04%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=lancedb#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


🚨 Try these New Features: