lance-format / lance-format/lance

Allow filtering of projected fields

Open
#2,971 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Users can introduce new fields using projection. However, they cannot turn around and filter on these fields. This can perhaps wait until we have general SQL support but it could be implemented earlier.

The challenge is that we compile filters against the scan input schema and this does not contain the projected fields. We should compile the filter against the final projected schema. Then we can subtract fields that don't exist in the scan input schema and add a final FilterExec after the project.

This is a little bit tricky because, if we do the above directly, then the take step will try and take these fields and not find them. So we need to change the take logic slightly as well.

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 filter compilation against the scan input schema, the final projected schema, and the take logic. Verify that projected fields can be filtered, fields absent from the scan input are handled appropriately, a final FilterExec follows the project, and the take step still succeeds.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.