fix: avoid panic while hitting non-null empty multi-vector#5588
Conversation
Code ReviewP0: Bug in
|
BubbleCal
left a comment
There was a problem hiding this comment.
Where does it panic before this change?
| let multivector = v.as_fixed_size_list(); | ||
| match distance_type { | ||
| if multivector.len() == 0 { | ||
| return Err(ArrowError::InvalidArgumentError(format!( |
There was a problem hiding this comment.
can we just assume the distance to a empty multivector is NaN and then exclude it from the results?
There was a problem hiding this comment.
Let me know if 0a61738 is what you want
Our tokio runtime worker panic at lance/rust/lance-index/src/vector/flat.rs Line 147 in 543eb86 Resulted by lance/rust/lance-linalg/src/distance.rs Lines 142 to 149 in 543eb86 |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
…mat#5588) This PR will avoid panic while hitting non-null empty multi-vector --- **Parts of this PR were drafted with assistance from Codex (with `gpt-5.2`) and fully reviewed and edited by me. I take full responsibility for all changes.**
This PR will avoid panic while hitting non-null empty multi-vector
Parts of this PR were drafted with assistance from Codex (with
gpt-5.2) and fully reviewed and edited by me. I take full responsibility for all changes.