Add split ID inclusion filter - #6706
Open
Mallets wants to merge 6 commits into
Open
Conversation
Allow callers to restrict split listings to a specified set while keeping file-backed and PostgreSQL metastores aligned.
Mallets
marked this pull request as ready for review
August 18, 2026 16:27
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: de029043a3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Ensure file-backed split listings honor inclusion filters when a maturity filter is also present.
guilload
reviewed
Aug 18, 2026
| return false; | ||
| } | ||
|
|
||
| if let Some(included_split_ids) = &query.included_split_ids |
Member
There was a problem hiding this comment.
The inclusion and exclusion logic should live next to each other.
Contributor
Author
There was a problem hiding this comment.
Done in b99cb9d.
I moved both cheap included and excluded checks at the beginning since this comment applies to both.
Deduplicate PostgreSQL split-ID array binding and omit absent inclusion filters from serialized queries for rollback compatibility.
Reject included and excluded split IDs before evaluating more expensive file-backed query predicates.
Use distinct names for converted PostgreSQL array values in inclusion and exclusion filters.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR extends
ListSplitsQuerywith an optional inclusion filter that limits results to a caller-provided set of split IDs.The filter is implemented consistently in both metastore backends:
= ANY(...), avoiding PostgreSQL's parameter limit for large sets.An empty inclusion set deliberately matches no splits; an absent filter leaves listings unchanged.
How was this PR tested?
cargo test -p quickwit-metastore --all-features included_split_ids --lib— validates the PostgreSQL SQL builder and backward-compatible query deserialization.cargo test -p quickwit-metastore --all-features test_metastore_list_all_splits --lib— the file-backed metastore integration test passed; the PostgreSQL variant requiresQW_TEST_DATABASE_URL, which is not configured locally.