-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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](Nereids) fix fe folding constant of string functions and add more cases #45233
Conversation
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
run buildall |
TPC-H: Total hot run time: 40102 ms
|
TPC-DS: Total hot run time: 198377 ms
|
ClickBench: Total hot run time: 32.22 s
|
8e936a9
to
7a9d32b
Compare
run buildall |
TPC-H: Total hot run time: 40232 ms
|
TPC-DS: Total hot run time: 195402 ms
|
ClickBench: Total hot run time: 32.39 s
|
run buildall |
TPC-H: Total hot run time: 39851 ms
|
TPC-DS: Total hot run time: 196138 ms
|
ClickBench: Total hot run time: 32.16 s
|
run buildall |
1 similar comment
run buildall |
TPC-H: Total hot run time: 39705 ms
|
TPC-DS: Total hot run time: 196387 ms
|
ClickBench: Total hot run time: 32.24 s
|
run p0 |
...n/java/org/apache/doris/nereids/trees/expressions/functions/executable/StringArithmetic.java
Show resolved
Hide resolved
run buildall |
return castStringLikeLiteral(first, trimImpl(first.getValue(), " ", false, true)); | ||
} | ||
|
||
/** | ||
* Executable arithmetic functions rtrim | ||
*/ | ||
@ExecFunction(name = "rtrim") | ||
public static Expression rtrimVarcharVarchar(StringLikeLiteral first, StringLikeLiteral second) { | ||
public static Expression rtrimVarchar(StringLikeLiteral first, StringLikeLiteral second) { |
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.
why remove signature in name? and give it a meaningless name?
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.
because Signature in name is included by StringLikeLiteral, we need this signature before to indicate it is VarcharLiteral or StringLiteral. But now we can use StringlikeLiteral to include them all. Keep one in function to indicate the difference between rtrim and rtrimVarchar
PR approved by at least one committer and no changes requested. |
PR approved by anyone and no changes requested. |
8cff18a
to
b607a04
Compare
TPC-H: Total hot run time: 32472 ms
|
TPC-DS: Total hot run time: 189907 ms
|
ClickBench: Total hot run time: 30.86 s
|
...ssion-test/suites/nereids_p0/expression/fold_constant/fold_constant_string_arithmatic.groovy
Show resolved
Hide resolved
run buildall |
TPC-H: Total hot run time: 32871 ms
|
TPC-DS: Total hot run time: 196664 ms
|
ClickBench: Total hot run time: 31.33 s
|
PR approved by at least one committer and no changes requested. |
run cloud_p0 |
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
…re cases (apache#45233) Issue Number: apache#44666 Related PR: apache#40441 Problem Summary: - select substring_index('哈哈哈AAA','A', 1); String.split function has second parameter 'limit', which is default zero. When 'limit' is zero, it means it would remove trailing empty strings split of '哈哈哈AAA', which would be '哈哈哈' only. But what we expect is '哈哈哈', '','','' when part function is used by substring index. So we should change splitpart limit to -1 to enable trailing empty character in splitpart list - reorganize fold constant of string functions in fe and add more cases
…re cases (apache#45233) Issue Number: apache#44666 Related PR: apache#40441 Problem Summary: - select substring_index('哈哈哈AAA','A', 1); String.split function has second parameter 'limit', which is default zero. When 'limit' is zero, it means it would remove trailing empty strings split of '哈哈哈AAA', which would be '哈哈哈' only. But what we expect is '哈哈哈', '','','' when part function is used by substring index. So we should change splitpart limit to -1 to enable trailing empty character in splitpart list - reorganize fold constant of string functions in fe and add more cases
…re cases (#45233) (#46525) pick: #45233 Issue Number: #44666 Related PR: #40441 Problem Summary: - select substring_index('哈哈哈AAA','A', 1); String.split function has second parameter 'limit', which is default zero. When 'limit' is zero, it means it would remove trailing empty strings split of '哈哈哈AAA', which would be '哈哈哈' only. But what we expect is '哈哈哈', '','','' when part function is used by substring index. So we should change splitpart limit to -1 to enable trailing empty character in splitpart list - reorganize fold constant of string functions in fe and add more cases --------- Co-authored-by: Mryange <[email protected]>
…s and add more cases #45233 (#46523) pick: #45233 Issue Number: #44666 Related PR: #40441 Problem Summary: - select substring_index('哈哈哈AAA','A', 1); String.split function has second parameter 'limit', which is default zero. When 'limit' is zero, it means it would remove trailing empty strings split of '哈哈哈AAA', which would be '哈哈哈' only. But what we expect is '哈哈哈', '','','' when part function is used by substring index. So we should change splitpart limit to -1 to enable trailing empty character in splitpart list - reorganize fold constant of string functions in fe and add more cases --------- Co-authored-by: Mryange <[email protected]>
Issue Number: close #44666
Related PR: #40441
Problem Summary:
select substring_index('哈哈哈AAA','A', 1);
String.split function has second parameter 'limit', which is default zero. When 'limit' is zero, it means it would remove trailing
empty strings split of '哈哈哈AAA', which would be '哈哈哈' only. But what we expect is '哈哈哈', '','','' when part function is used by substring index.
So we should change splitpart limit to -1 to enable trailing empty character in splitpart list
reorganize fold constant of string functions in fe and add more cases
Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)