-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
[fix](hyperscan) Fix hyper scan fall back to re2 #44547
Conversation
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
run buildall |
clang-tidy review says "All clean, LGTM! 👍" |
TPC-H: Total hot run time: 40112 ms
|
TPC-DS: Total hot run time: 197785 ms
|
TeamCity be ut coverage result: |
ClickBench: Total hot run time: 32.49 s
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
PR approved by at least one committer and no changes requested. |
PR approved by anyone and no changes requested. |
@@ -499,9 +496,6 @@ Status FunctionLikeBase::hs_prepare(FunctionContext* context, const char* expres | |||
hs_free_database(*database); | |||
*database = nullptr; | |||
*scratch = nullptr; | |||
if (context) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please leave a comment here, avoid somebody add these codes back again next time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK,I will add some test and comment.
run buildall |
TPC-H: Total hot run time: 39832 ms
|
TeamCity be ut coverage result: |
TPC-DS: Total hot run time: 196595 ms
|
ClickBench: Total hot run time: 33.84 s
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
PR approved by at least one committer and no changes requested. |
* Core modification When hyper scan failed, we should not set_error in FunctionContext. Since set_error will try cancel query, but actually we want to fall back to re2 in this case. * Some refactor Rename FunctionRegexp so that we can distinguish regexp match with regexp_extract. * Reproduce ```cpp SELECT * FROM regexp_test_chinese WHERE city REGEXP "^上海|^北京" ORDER BY id; ``` Note, the `|` in above sql is a Chinese character.
* Core modification When hyper scan failed, we should not set_error in FunctionContext. Since set_error will try cancel query, but actually we want to fall back to re2 in this case. * Some refactor Rename FunctionRegexp so that we can distinguish regexp match with regexp_extract. * Reproduce ```cpp SELECT * FROM regexp_test_chinese WHERE city REGEXP "^上海|^北京" ORDER BY id; ``` Note, the `|` in above sql is a Chinese character.
* Core modification When hyper scan failed, we should not set_error in FunctionContext. Since set_error will try cancel query, but actually we want to fall back to re2 in this case. * Some refactor Rename FunctionRegexp so that we can distinguish regexp match with regexp_extract. * Reproduce ```cpp SELECT * FROM regexp_test_chinese WHERE city REGEXP "^上海|^北京" ORDER BY id; ``` Note, the `|` in above sql is a Chinese character.
What problem does this PR solve?
Core modification
When hyper scan failed, we should not set_error in FunctionContext.
Since set_error will try cancel query, but actually we want to fall back to re2 in this case.
Some refactor
Rename FunctionRegexp so that we can distinguish regexp match with regexp_extract.
Reproduce
SELECT * FROM regexp_test_chinese WHERE city REGEXP "^上海|^北京" ORDER BY id;
Note, the
|
in above sql is a Chinese character.Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)