Skip to content

branch-4.2: [fix](function) Require the array_sort comparator to return -1, 0 or 1 - #69342

Merged
yiguolei merged 1 commit into
apache:branch-4.2from
csun5285:pick-4.2/pr-68612
Oct 21, 2026
Merged

yiguolei merged 1 commit into
apache:branch-4.2from
csun5285:pick-4.2/pr-68612

Conversation

@csun5285

Copy link
Copy Markdown
Contributor

cherry-pick #68612

apache#68612)

```sql
SELECT array_sort((x, y) -> x < y, [3, 2, 1]);
-- before: [FATAL_ERROR]assert cast err ... Bad cast from type:doris::ColumnNullable* to doris::ColumnVector<(doris::PrimitiveType)3> const* (a debug/ASAN BE aborts)
-- after:  When using lambda as the parameter of array_sort, the lambda must return -1, 0 or 1 for less than, equal to or greater than, but it returns BOOLEAN
```

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit ee9d26b)
@csun5285
csun5285 requested a review from yiguolei as a code owner October 20, 2026 10:35
@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?

@csun5285

Copy link
Copy Markdown
Contributor Author

run buildall

@hello-stephen

Copy link
Copy Markdown
Contributor

BE UT Coverage Report

Increment line coverage 71.74% (33/46) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 64.06% (29712/46382)
Line Coverage 48.91% (313159/640259)
Region Coverage 44.75% (252058/563255)
Branch Coverage 46.43% (118927/256121)

@hello-stephen

Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 95.65% (44/46) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 76.30% (34376/45052)
Line Coverage 61.12% (388092/634933)
Region Coverage 57.90% (326705/564239)
Branch Coverage 58.92% (150748/255861)

@hello-stephen

Copy link
Copy Markdown
Contributor

FE Regression Coverage Report

Increment line coverage 100.00% (3/3) 🎉
Increment coverage report
Complete coverage report

@hello-stephen

Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 95.65% (44/46) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 76.30% (34376/45052)
Line Coverage 61.12% (388092/634933)
Region Coverage 57.90% (326705/564239)
Branch Coverage 58.92% (150748/255861)

@hello-stephen

Copy link
Copy Markdown
Contributor

FE Regression Coverage Report

Increment line coverage 100.00% (3/3) 🎉
Increment coverage report
Complete coverage report

@yiguolei
yiguolei merged commit 017be6c into apache:branch-4.2 Oct 21, 2026
29 of 30 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

PR approved by anyone and no changes requested.

@github-actions github-actions Bot added the approved Indicates a PR has been approved by one committer. label Oct 21, 2026
@github-actions

Copy link
Copy Markdown
Contributor

PR approved by at least one committer 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.

3 participants