Skip to content

chore: add boolean match plan scaffold#5635

Merged
BubbleCal merged 2 commits intomainfrom
yang/fts-wand-limit
Jan 6, 2026
Merged

chore: add boolean match plan scaffold#5635
BubbleCal merged 2 commits intomainfrom
yang/fts-wand-limit

Conversation

@BubbleCal
Copy link
Copy Markdown
Contributor

@BubbleCal BubbleCal commented Jan 6, 2026

This is part 1 of improving boolean query performance

Summary

  • Introduce an internal BooleanMatchPlan that normalizes match-only boolean FTS queries into a single-column plan.
    Add unit tests covering valid/invalid plan construction.
  • No runtime behavior changes yet; this is a prep step for WAND-based boolean execution.
    Motivation
  • Current boolean FTS planning drops limit, preventing WAND pruning. This PR lays the groundwork for an index-level boolean execution path by providing a normalized, index-executable plan.

@github-actions github-actions Bot added the chore label Jan 6, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jan 6, 2026

Code Review

This scaffold for BooleanMatchPlan looks solid overall. The code is well-structured with good test coverage for the various rejection cases.

Minor suggestions (not blocking):

  1. Consider using std::borrow::Cow for the column field if performance becomes a concern - currently cloning the column string on every push_match call. However, this is likely negligible for typical query sizes.

  2. Duplicate logic in try_build - The three loops for should/must/must_not have identical structure. Consider extracting to a helper to reduce repetition.

No P0/P1 issues identified. Good test coverage for edge cases (mixed columns, non-match queries, only must_not, missing column).

@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 6, 2026

Codecov Report

❌ Patch coverage is 95.83333% with 4 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
rust/lance-index/src/scalar/inverted/query.rs 95.83% 1 Missing and 3 partials ⚠️

📢 Thoughts on this report? Let us know!

@BubbleCal BubbleCal merged commit 21bac7b into main Jan 6, 2026
26 of 29 checks passed
@BubbleCal BubbleCal deleted the yang/fts-wand-limit branch January 6, 2026 12:15
jackye1995 pushed a commit to jackye1995/lance that referenced this pull request Jan 21, 2026
This is part 1 of improving boolean query performance

## Summary

- Introduce an internal BooleanMatchPlan that normalizes match-only
boolean FTS queries into a single-column plan.
Add unit tests covering valid/invalid plan construction.
- No runtime behavior changes yet; this is a prep step for WAND-based
boolean execution.
Motivation
- Current boolean FTS planning drops limit, preventing WAND pruning.
This PR lays the groundwork for an index-level boolean execution path by
providing a normalized, index-executable plan.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants