lance-format / lance-format/lance

Don't materialize any data on `count_rows` if the filter can be satisfied by a scalar index

Open
#2,682 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

good first issue help wanted
Dominant language
Rust
Stars
7.1k
Forks
852
Avg merge
3d 18h
Merged PRs (30d)
272

Description

If we can satisfy a filter with a scalar index then we should be able to implement a fast path for count_rows where we simply return the size of the allow_list or even possibly subtract the size of the block_list from the metadata-only count_rows (might be some tricky bits if there are deletion vectors) to quickly answer queries like count_rows("x != 'foo'").

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the count_rows path and scalar-index filter handling, with deletion-vector behavior in scope. Done means count_rows avoids materializing data when the filter is satisfied by a scalar index and returns a correct count for allow_list and block_list cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
databases, performance
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.