Skip to content
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

Small optimization of LIKE patterns with > 1 trailing % #46869

Merged
merged 2 commits into from
Feb 26, 2023

Conversation

rschu1ze
Copy link
Member

@rschu1ze rschu1ze commented Feb 25, 2023

Previously, LIKE pattern %%%ab became re2 regexp .*.*ab. Now, it becomes ab which should be a bit faster.

Courtesy to @XenoAmess's #46695. Pushed this optimization separately because LIKEly (pun intended) the other PR is no longer needed.

+ minor code cleanup
+ a minor doc update

Also see #46592

Changelog category (leave one):

  • Not for changelog (changelog entry is not required)

@robot-clickhouse-ci-1 robot-clickhouse-ci-1 added the pr-not-for-changelog This PR should not be mentioned in the changelog label Feb 25, 2023
@rschu1ze rschu1ze force-pushed the rs/like-with-trailing-percentage branch 3 times, most recently from f313505 to 22ec5c7 Compare February 25, 2023 18:19
Previously, LIKE pattern '%%%ab' became '.*.*ab'. Now, it becomes 'ab'
which is a bit faster (perhaps).

+ minor code cleanup + a minor doc update
Copy link
Member

@SmitaRKulkarni SmitaRKulkarni left a comment

Choose a reason for hiding this comment

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

LGTM

@rschu1ze rschu1ze merged commit 61706df into master Feb 26, 2023
@rschu1ze rschu1ze deleted the rs/like-with-trailing-percentage branch February 26, 2023 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-not-for-changelog This PR should not be mentioned in the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants