Skip to content

search: statistic skips for regex constraint #101

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

MichaHoffmann
Copy link
Collaborator

No description provided.

@MichaHoffmann MichaHoffmann force-pushed the mhoffmann/statistic-skips-for-regex-constraint branch from 2ce1f8f to 5e9a263 Compare August 8, 2025 18:32
Copy link
Collaborator

@yeya24 yeya24 left a comment

Choose a reason for hiding this comment

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

If the regex has prefix, maybe we can also do binary search if it is primary to find the matching rows instead of scanning. Could be helpful if the page matches but the min or max doesn't match so that we know binary search could help

Copy link
Collaborator

@yeya24 yeya24 left a comment

Choose a reason for hiding this comment

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

This is great work. Looking forward to getting this merged!

case labels.MatchRegexp:
res, err := labels.NewFastRegexMatcher(matcher.Value)
if matcher.GetRegexString() == ".+" {
Copy link
Collaborator

Choose a reason for hiding this comment

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

We can also handle .* to skip it

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