Skip to content

Conversation

@mrhhsg
Copy link
Member

@mrhhsg mrhhsg commented Mar 31, 2025

Pick #49403
If the two arrays have the same non-null elements, they are considered overlapping, and the result is 1.
If the two arrays have no common non-null elements and either array contains a null element, the result is null.
Otherwise, the result is 0.

select arrays_overlap([1, 2, 3], [1, null]);  -- result should be 1

select arrays_overlap([2, 3], [1, null]);  -- result should be null

select arrays_overlap([2, 3], [1]);   -- result should be 0

What problem does this PR solve?

Issue Number: close #xxx

Related PR: #xxx

Problem Summary:

Release note

None

Check List (For Author)

  • Test

    • Regression test
    • Unit Test
    • Manual test (add detailed scripts or steps below)
    • No need to test or manual test. Explain why:
      • This is a refactor/code format and no logic has been changed.
      • Previous test can cover this change.
      • No code files have been changed.
      • Other reason
  • Behavior changed:

    • No.
    • Yes.
  • Does this need documentation?

    • No.
    • Yes.

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

@mrhhsg mrhhsg requested a review from yiguolei as a code owner March 31, 2025 09:48
@Thearas
Copy link
Contributor

Thearas commented Mar 31, 2025

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?

@mrhhsg
Copy link
Member Author

mrhhsg commented Mar 31, 2025

run buildall

@mrhhsg
Copy link
Member Author

mrhhsg commented Apr 3, 2025

run buildall

@doris-robot
Copy link

BE UT Coverage Report

Increment line coverage 78.18% (43/55) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 38.19% (10062/26350)
Line Coverage 29.21% (82924/283879)
Region Coverage 27.88% (42627/152918)
Branch Coverage 24.49% (21600/88196)

If the two arrays have the same non-null elements, they are considered
overlapping, and the result is 1.
If the two arrays have no common non-null elements and either array
contains a null element, the result is null.
Otherwise, the result is 0.

```
select arrays_overlap([1, 2, 3], [1, null]);  -- result should be 1

select arrays_overlap([2, 3], [1, null]);  -- result should be null

select arrays_overlap([2, 3], [1]);   -- result should be 0
```
@mrhhsg
Copy link
Member Author

mrhhsg commented Apr 3, 2025

run buildall

@hello-stephen
Copy link
Contributor

BE UT Coverage Report

Increment line coverage 78.18% (43/55) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 38.19% (10062/26350)
Line Coverage 29.21% (82915/283879)
Region Coverage 27.87% (42621/152918)
Branch Coverage 24.49% (21596/88196)

@yiguolei yiguolei merged commit c0bc16d into apache:branch-2.1 Apr 4, 2025
19 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants