Repository navigation
feat(format): add the MinHash LSH scalar index specification (experimental) - #9076
Conversation
|
Important Format specification voteThis PR modifies the Lance format specification, so it requires 3 binding +1 votes from PMC members (excluding the proposer), at least one of them on the latest commit, and a minimum 72-hour voting period, weekends excluded, before it can merge. Vote by approving this PR (+1) or requesting changes (−1, a veto). See the voting process. Approvals carry over across pushes, so a rebase or a typo fix does not send everyone back to re-vote. Whoever approves the latest commit is vouching that nothing substantive has changed since the earlier approvals; if something has, ask for fresh votes. Status: ❌ Blocked — 0 of 3 required approvals
Updated automatically by the format-spec vote gate, which re-checks every 15 minutes — just voted? Re-check now (press Run workflow; leave the input blank to re-check every open format PR). A PMC member may apply the |
0dffacf to
0047b54
Compare
Add the persisted contract of the MinHash LSH scalar index for near-duplicate search over text: the MinHashLshIndexDetails message and the format specification of its two files. - Details: num_hashes (1..4096, a multiple of num_bands), num_bands (1..256), shingle_size (>= 1), the tokenizer recorded as a full text search index records it, and signature_version. Readers validate every field before allocating or reading; version 0 admits only tokenizers whose data ships with Lance and rejects dictionary-backed ones. - Signature procedure pinned for version 0: tokenizer output bytes joined by 0x1F into shingles, XXH64 (seed 42), SplitMix64 coefficients and their draw order, 64-bit permutations, multiply-shift compression to 16 bits, band keys; with known-answer vectors an implementation must reproduce. - Files: signatures.lance (_rowid, FixedSizeList<u16, num_hashes>, full-zip, no compression, row number = segment-local doc id) and bands.lance ((band_key, doc_id) sorted, 4096-row logical pages, page table in a global buffer), given as PyArrow schemas with their schema metadata; both repeat the serialized details and are verified when a segment is opened. - Reader navigation, multi-segment semantics, appends, merging, deletes. Library edits are limited to what compiles the proto: index.proto imports index_old.proto for the cross-package reference, and the lance-index build script generates index_old.proto in its own pass and maps lance.table to crate::pbold for the index.proto pass.
0047b54 to
29712dc
Compare
There was a problem hiding this comment.
✅ Gate recommendation: approve.
The experimental designation is consistent with Lance’s unstable-format contract, and its rollback boundary remains confined to index metadata and files rather than dataset data. The previously verified signature algorithm and storage layouts are unchanged, while current unknown-index handling keeps unsupported indexes out of query use without erasing them during unrelated maintenance.
Add the persisted contract of the MinHash LSH scalar index for near-duplicate search over text: the MinHashLshIndexDetails message and the format specification of its two files.
Library edits are limited to what compiles the proto: index.proto imports index_old.proto for the cross-package reference, and the lance-index build script generates index_old.proto in its own pass and maps lance.table to crate::pbold for the index.proto pass.