-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[fix](function) wrong result of arrays_overlap #49403
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
Conversation
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
|
run buildall |
TPC-H: Total hot run time: 34233 ms |
TPC-DS: Total hot run time: 193754 ms |
ClickBench: Total hot run time: 30.73 s |
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
| 2019-01-01 26823b3995ee38bd145ddd910b2f6300 ["x"] | ||
| 2019-01-01 a648a447b8f71522f11632eba4b4adde ["p", "q", "r", "s", "t"] | ||
| 2019-01-01 a9fb5c985c90bf05f3bee5ca3ae95260 ["u", "v"] | ||
| 2019-01-01 ee27ee1da291e46403c408e220bed6e1 ["y"] |
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.
我们改了arrays overlap,为啥会改array contains的case?
|
PR approved by at least one committer and no changes requested. |
|
PR approved by anyone and no changes requested. |
| const UInt8* dst_nullmap_data, UInt8* dst_data) const { | ||
| const ColumnArrayExecutionData& right_data, UInt8* dst_nullmap_data, | ||
| UInt8* dst_data) const { | ||
| using ExecutorImpl = OverlapSetImpl<T>; |
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.
is this logic same with inverted index case ?
amorynan
left a comment
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
airborne12
left a comment
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
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 ```
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 ```
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 ```
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 ```
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 ```
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 ```
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 ```
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?
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? 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 ```
apache/doris#49403 ## Versions - [x] dev - [ ] 3.0 - [ ] 2.1 - [ ] 2.0 ## Languages - [x] Chinese - [x] English ## Docs Checklist - [ ] Checked by AI - [ ] Test Cases Built
What problem does this PR solve?
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.
Related PR: #xxx
Problem Summary:
Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)