lance-format / lance-format/lance
Don't use MaterializeIndex if there is a block list
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 7.1k
- Forks
- 852
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 272
Description
Given the query SELECT * FROM ... WHERE id = 7, assuming a scalar index on id, we generate a small allow_list, materialize it, and feed it to take. This works well.
Given the query SELECT * FROM ... WHERE id != 7, we do the same thing, this does not work well.
Instead, we should do a full scan, then apply a filter to remove the rows that are in the block list (or just don't use the index at all)
Note: this only applies to queries WITHOUT a vector search. When there is a vector index we don't need to materialize the scalar index results and so the rationale is completely different.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No file, test, or entry point is named. Start by locating the scalar-index path that materializes allow_list results for non-vector queries, then compare the id = and id != cases described here. Done means block-list queries avoid MaterializeIndex without changing the vector-search path, with regression coverage for both behaviors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust, sql
- Domain
- database
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100