-
Notifications
You must be signed in to change notification settings - Fork 2k
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
[BugFix] fix concat_ws(',', 1, NULL) incorrect result when last element is NULL #56384
Conversation
…nt is NULL Signed-off-by: kaijian.ding <[email protected]>
fe/fe-core/src/main/java/com/starrocks/sql/optimizer/rewrite/ScalarOperatorFunctions.java
Show resolved
Hide resolved
final StringBuilder resultBuilder = new StringBuilder(); | ||
for (int i = 0; i < values.length - 1; i++) { | ||
if (values[i].isNull()) { | ||
boolean first = true; |
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.
values.stream().filter(v -> !v.isNull()).map(v -> value.getVarchar()).collect(Collection.join(separator));
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.
done
Signed-off-by: kaijian.ding <[email protected]>
|
[Java-Extensions Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
[FE Incremental Coverage Report]✅ pass : 6 / 6 (100.00%) file detail
|
[BE Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
@Mergifyio backport branch-3.3 |
@Mergifyio backport branch-3.2 |
@Mergifyio backport branch-3.4 |
✅ Backports have been created
|
✅ Backports have been created
|
✅ Backports have been created
|
…nt is NULL (#56384) Signed-off-by: kaijian.ding <[email protected]> (cherry picked from commit 9b56f66)
…nt is NULL (#56384) Signed-off-by: kaijian.ding <[email protected]> (cherry picked from commit 9b56f66)
…nt is NULL (#56384) Signed-off-by: kaijian.ding <[email protected]> (cherry picked from commit 9b56f66)
…nt is NULL (StarRocks#56384) Signed-off-by: kaijian.ding <[email protected]>
…nt is NULL (StarRocks#56384) Signed-off-by: kaijian.ding <[email protected]> Signed-off-by: 00193254 <[email protected]>
…nt is NULL (backport #56384) (#56455) Co-authored-by: kaijianding <[email protected]>
…nt is NULL (backport #56384) (#56456) Co-authored-by: kaijianding <[email protected]>
…nt is NULL (backport #56384) (#56454) Co-authored-by: kaijianding <[email protected]>
Why I'm doing:
concat_ws(',', 1, NULL)
is1,
the correct result should be
1
What I'm doing:
Fixes #issue
What type of PR is this:
Does this PR entail a change in behavior?
Checklist:
Bugfix cherry-pick branch check: