lance-format/lance

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

Open

#2,682 opened on Aug 2, 2024

View on GitHub
 (2 comments) (1 reaction) (0 assignees)Rust (695 forks)github user discovery
good first issuehelp wanted

Repository metrics

Stars
 (6,582 stars)
PR merge metrics
 (Avg merge 6d 1h) (219 merged PRs in 30d)

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