-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[feat](nereids) revert #23421: add between predicate back #48104
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
Conversation
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
|
run buildall |
TPC-H: Total hot run time: 31554 ms |
TPC-DS: Total hot run time: 189840 ms |
ClickBench: Total hot run time: 30.14 s |
|
run buildall |
097e500 to
e0e2ddd
Compare
|
run buildall |
TPC-H: Total hot run time: 31365 ms |
TPC-DS: Total hot run time: 183203 ms |
ClickBench: Total hot run time: 30.21 s |
e0e2ddd to
cfe2326
Compare
|
run buildall |
TPC-H: Total hot run time: 31733 ms |
TPC-DS: Total hot run time: 183803 ms |
ClickBench: Total hot run time: 30.91 s |
659a933 to
a6f0bd8
Compare
|
run buildall |
2 similar comments
|
run buildall |
|
run buildall |
TPC-H: Total hot run time: 31873 ms |
TPC-DS: Total hot run time: 190594 ms |
ClickBench: Total hot run time: 31.3 s |
|
run p0 |
|
run cloud_p0 |
|
run buildall |
fd3d269 to
ee0951b
Compare
|
run buildall |
|
PR approved by at least one committer and no changes requested. |
|
PR approved by anyone and no changes requested. |
TPC-H: Total hot run time: 31389 ms |
TPC-DS: Total hot run time: 189821 ms |
ClickBench: Total hot run time: 31.66 s |
|
run p0 |
1 similar comment
|
run p0 |
|
cod too old, use a new pr: #55407 |
What problem does this PR solve?
When parse SQL
random(1, 10) between 2 and 8, it will rewrite asrandom(1, 10) >= 2 and random(1, 10) <= 8. But at the rewritten moment, the random is still an unbound function, and it can't be known that it's a non-foldable function. Then it will bound it to RANDOM function, but since it contains two unbound random functions, so it will got two distinct bounded RANDOM function, and the expression will evaluate random two times. It's wrong, so at the parse phase, BETWEEN shold not rewrite to AND. Only after had bounded functions, can rewrite BETWEEN to AND.So we need to add between predicate back. Just revert #23421.
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)