Commit 09174bc
authored
feat: support wider hamming hashes (#7767)
## Summary
- Support `FixedSizeList<UInt8, N>` hamming hashes where `N` is a
positive multiple of 8 bytes.
- Reuse the SIMD `u64` pairwise path lane-by-lane for wider hashes.
- Add Rust and Python coverage for 16-byte and wider hash clustering,
including invalid-width rejection.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Expanded Hamming-distance clustering to support binary hashes of any
positive, 8-byte-aligned width (`FixedSizeList<UInt8, N>`), including
16-byte hashes.
* Added sequential and parallel pairwise Hamming-distance APIs for
multi-lane binary hashes, with support for extracting fixed-list hash
values.
* **Bug Fixes**
* Improved validation and error handling for malformed or inconsistent
fixed-list hash inputs and byte widths.
* **Tests**
* Broadened and parameterized clustering and distance test coverage for
8- and 16-byte hashes, multi-segment behavior, and
sequential-vs-parallel consistency.
* **Documentation**
* Updated API docs and parameter descriptions to reflect the generalized
hash column shape.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->1 parent 5bda9bd commit 09174bc
6 files changed
Lines changed: 584 additions & 69 deletions
File tree
- python
- python
- lance
- tests
- src
- rust
- lance-linalg/src
- distance
- lance/src/index/vector
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
856 | 856 | | |
857 | 857 | | |
858 | 858 | | |
859 | | - | |
| 859 | + | |
| 860 | + | |
860 | 861 | | |
861 | 862 | | |
862 | 863 | | |
| |||
898 | 899 | | |
899 | 900 | | |
900 | 901 | | |
901 | | - | |
| 902 | + | |
| 903 | + | |
902 | 904 | | |
903 | 905 | | |
904 | 906 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
158 | | - | |
| 158 | + | |
159 | 159 | | |
160 | | - | |
| 160 | + | |
| 161 | + | |
161 | 162 | | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
162 | 166 | | |
163 | 167 | | |
164 | | - | |
| 168 | + | |
165 | 169 | | |
166 | 170 | | |
167 | 171 | | |
168 | 172 | | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
173 | 178 | | |
174 | 179 | | |
175 | 180 | | |
| |||
189 | 194 | | |
190 | 195 | | |
191 | 196 | | |
192 | | - | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
193 | 215 | | |
194 | 216 | | |
195 | | - | |
196 | | - | |
| 217 | + | |
| 218 | + | |
197 | 219 | | |
198 | 220 | | |
199 | 221 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3768 | 3768 | | |
3769 | 3769 | | |
3770 | 3770 | | |
3771 | | - | |
| 3771 | + | |
| 3772 | + | |
3772 | 3773 | | |
3773 | 3774 | | |
3774 | 3775 | | |
| |||
3811 | 3812 | | |
3812 | 3813 | | |
3813 | 3814 | | |
3814 | | - | |
| 3815 | + | |
| 3816 | + | |
3815 | 3817 | | |
3816 | 3818 | | |
3817 | 3819 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | | - | |
33 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
34 | 36 | | |
35 | 37 | | |
36 | 38 | | |
| |||
0 commit comments