Skip to content

refactor: multiple feats and fixes#117

Merged
usamoi merged 3 commits into
supervc-stack:mainfrom
usamoi:prefilter-fallback
Apr 28, 2026
Merged

refactor: multiple feats and fixes#117
usamoi merged 3 commits into
supervc-stack:mainfrom
usamoi:prefilter-fallback

Conversation

@usamoi
Copy link
Copy Markdown
Contributor

@usamoi usamoi commented Apr 27, 2026

No description provided.

usamoi added 2 commits April 27, 2026 16:59
Signed-off-by: usamoi <usamoi@outlook.com>
Signed-off-by: usamoi <usamoi@outlook.com>
@usamoi usamoi requested a review from Copilot April 28, 2026 08:55
@usamoi usamoi marked this pull request as ready for review April 28, 2026 08:55
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR tightens bm25 query/index correctness and expands configurability by adding per-index prefilter reloptions (with GUC fallback behavior), while also refactoring bm25 index build code paths and extending sqllogictest coverage.

Changes:

  • Add a RelationId trait and wire it through scanner builders so a bm25query can validate it’s used with the intended index.
  • Introduce prefilter as a bm25 index reloption and update GUC handling to fall back to reloptions when the GUC is default.
  • Refactor bm25 index build implementation to consolidate sequential/parallel build logic; add/extend sqllogictest cases.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/sqllogictest/fallback_parameter.slt Adds coverage for prefilter reloption affecting filtered queries under a low bm25 limit.
tests/sqllogictest/bm25query.slt New test ensuring to_bm25query(..., index_name) errors if the planner uses a different (e.g., partial) bm25 index.
src/lib.rs Adds a main-process assertion for temporary-name generation.
src/index/storage.rs Implements RelationId for PostgresRelation using the underlying relation OID.
src/index/scanners.rs Requires RelationId for SearchBuilder::new so builders can capture the index identity.
src/index/gucs.rs Adds config pointer tracking for bm25.prefilter and implements GUC-vs-reloption precedence for bm25_prefilter.
src/index/bm25/scanners/default.rs Captures index OID in the builder and validates the bm25query.index matches the scan’s index.
src/index/bm25/am/mod.rs Adds prefilter to bm25 reloptions parsing/registration and wires bm25_prefilter(relation) into scan options.
src/index/bm25/am/am_build.rs Refactors parallel/sequential build into a shared build function and factors out DSM path parsing.
crates/index/src/relation.rs Introduces the RelationId trait in the index crate API.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Signed-off-by: usamoi <usamoi@outlook.com>
@usamoi usamoi force-pushed the prefilter-fallback branch from 70b2955 to abd7040 Compare April 28, 2026 09:07
@usamoi usamoi merged commit 14fc2a3 into supervc-stack:main Apr 28, 2026
20 checks passed
@usamoi usamoi deleted the prefilter-fallback branch April 28, 2026 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants