-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
[Improve](array-func)improve array union support multi params #24327
[Improve](array-func)improve array union support multi params #24327
Conversation
run buildall |
clang-tidy review says "All clean, LGTM! 👍" |
TeamCity be ut coverage result: |
(From new machine)TeamCity pipeline, clickbench performance test result: |
clang-tidy review says "All clean, LGTM! 👍" |
run buildall |
TeamCity be ut coverage result: |
(From new machine)TeamCity pipeline, clickbench performance test result: |
[['array_union'], 'ARRAY_VARCHAR', ['ARRAY_VARCHAR', 'ARRAY_VARCHAR'], ''], | ||
[['array_union'], 'ARRAY_STRING', ['ARRAY_STRING', 'ARRAY_STRING'], ''], | ||
[['array_union'], 'ARRAY_BOOLEAN', ['ARRAY_BOOLEAN', 'ARRAY_BOOLEAN', '...'], ''], | ||
[['array_union'], 'ARRAY_TINYINT', ['ARRAY_TINYINT', 'ARRAY_TINYINT', '...'], ''], |
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.
should update org.apache.doris.nereids.trees.expressions.functions.scalar.ArrayUnion
to let it support multi param in Nereids too
if (entry.get_mapped() == params.size()) { | ||
if constexpr (operation == MapOperation::INTERSECT) { | ||
if (entry.get_mapped() == params.size()) { | ||
++dst_off; |
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.
same code as line 99~103
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.
I will make micro define
if (!set.find(elem)) { | ||
set.insert(elem); | ||
return true; | ||
void apply(Map& map, const int arg_idx, const int row_idx, |
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.
- row_idx better use 64bit instead int.
- const int == int?
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.
maybe size_t is better ?
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
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.
Why calculate multi array union need a map structure? Set is not enough?
because MapImpl can apply const ColumnArrayExecutionDatas params, but SetImpl just apply one ColumnArrayExecutionData |
clang-tidy review says "All clean, LGTM! 👍" |
clang-tidy review says "All clean, LGTM! 👍" |
run buildall |
TeamCity be ut coverage result: |
(From new machine)TeamCity pipeline, clickbench performance test result: |
PR approved by at least one committer and no changes requested. |
PR approved by anyone and no changes requested. |
clang-tidy review says "All clean, LGTM! 👍" |
TeamCity be ut coverage result: |
(From new machine)TeamCity pipeline, clickbench performance test result: |
run buildall |
clang-tidy review says "All clean, LGTM! 👍" |
TeamCity be ut coverage result: |
(From new machine)TeamCity pipeline, clickbench performance test result: |
run p0 |
run p1 |
PR approved by at least one committer and no changes requested. |
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
Proposed changes
Issue Number: close #xxx
Now we just support array union with two arrays
Further comments
If this is a relatively large or complex change, kick off the discussion at [email protected] by explaining why you chose the solution you did and what alternatives you considered, etc...