Skip to content

[branch-4.0](function) add a lambda functor version for array_sort (#57828)#62829

Open
csun5285 wants to merge 1 commit intoapache:branch-4.0from
csun5285:fix-opensource-324
Open

[branch-4.0](function) add a lambda functor version for array_sort (#57828)#62829
csun5285 wants to merge 1 commit intoapache:branch-4.0from
csun5285:fix-opensource-324

Conversation

@csun5285
Copy link
Copy Markdown
Contributor

pick from master #57828

@csun5285
Copy link
Copy Markdown
Contributor Author

run buildall

@hello-stephen
Copy link
Copy Markdown
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@hello-stephen
Copy link
Copy Markdown
Contributor

FE UT Coverage Report

Increment line coverage 1.41% (1/71) 🎉
Increment coverage report
Complete coverage report

@hello-stephen
Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 0.00% (0/1) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 54.35% (19352/35608)
Line Coverage 35.33% (175117/495604)
Region Coverage 29.70% (127826/430354)
Branch Coverage 31.14% (56457/181285)

@csun5285 csun5285 changed the title [enhance](function) add a lambda functor version for array_sort (#57828) [branch-4.0](function) add a lambda functor version for array_sort (#57828) Apr 25, 2026
…he#57828)

add a lambda functor version for array_sort

Issue Number: apache#48203

Problem Summary:
```text
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| array_sort((x, y) -> CASE WHEN x IS NULL THEN -1
                                 WHEN y IS NULL THEN 1
                                 WHEN x < y THEN 1
                                 WHEN x = y THEN 0
                                 ELSE -1 END,
                                 [3, 2, null, 5, null, 1, 2]) |
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| [null, null, 5, 3, 2, 2, 1]                                                                                                                                                                                                                                                                                               |
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| array_sort((x, y) -> IF(length(x) < length(y), -1,  IF(length(x) = length(y), 0, 1)),  ['a', 'abcd', 'abc']) |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| ["a", "abc", "abcd"]                                                                                                                                                     |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
```
@csun5285 csun5285 force-pushed the fix-opensource-324 branch from dc22bc4 to d9951fd Compare April 26, 2026 08:24
@csun5285
Copy link
Copy Markdown
Contributor Author

run buildall

@hello-stephen
Copy link
Copy Markdown
Contributor

FE UT Coverage Report

Increment line coverage 1.41% (1/71) 🎉
Increment coverage report
Complete coverage report

@github-actions github-actions Bot added the approved Indicates a PR has been approved by one committer. label May 1, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 1, 2026

PR approved by at least one committer and no changes requested.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 1, 2026

PR approved by anyone and no changes requested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by one committer. reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants