-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[Improvement](agg) Improve count distinct distribute keys #33167
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. Since 2024-03-18, the Document has been moved to doris-website. |
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.
clang-tidy made some suggestions
|
|
||
| #pragma once | ||
|
|
||
| #include <stddef.h> |
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.
warning: inclusion of deprecated C++ header 'stddef.h'; consider using 'cstddef' instead [modernize-deprecated-headers]
| #include <stddef.h> | |
| #include <cstddef> |
| #include <stddef.h> | ||
|
|
||
| #include <algorithm> | ||
| #include <boost/iterator/iterator_facade.hpp> |
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.
warning: 'boost/iterator/iterator_facade.hpp' file not found [clang-diagnostic-error]
#include <boost/iterator/iterator_facade.hpp>
^| namespace doris { | ||
| namespace vectorized { |
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.
warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces]
| namespace doris { | |
| namespace vectorized { | |
| namespace doris::vectorized { |
be/src/vec/aggregate_functions/aggregate_function_uniq_without_key.h:48:
- } // namespace vectorized
- } // namespace doris
+ } // namespace doris| auto data = reinterpret_cast<const UInt64*>( | ||
| assert_cast<const ColumnFixedLengthObject&>(column).get_data().data()); | ||
| for (size_t i = 0; i != num_rows; ++i) { | ||
| auto rhs_place = places + sizeof(Data) * i; |
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.
warning: 'auto rhs_place' can be declared as 'auto *rhs_place' [readability-qualified-auto]
| auto rhs_place = places + sizeof(Data) * i; | |
| auto *rhs_place = places + sizeof(Data) * i; |
|
run buildall |
|
run buildall |
|
TeamCity be ut coverage result: |
ClickBench: Total hot run time: 31.27 s |
be/src/vec/aggregate_functions/aggregate_function_uniq_without_key.h
Outdated
Show resolved
Hide resolved
be/src/vec/aggregate_functions/aggregate_function_uniq_without_key.h
Outdated
Show resolved
Hide resolved
|
PR approved by at least one committer and no changes requested. |
|
PR approved by anyone and no changes requested. |
be/src/vec/aggregate_functions/aggregate_function_uniq_without_key.h
Outdated
Show resolved
Hide resolved
|
run buildall |
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.
clang-tidy made some suggestions
|
|
||
| #pragma once | ||
|
|
||
| #include <stddef.h> |
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.
warning: inclusion of deprecated C++ header 'stddef.h'; consider using 'cstddef' instead [modernize-deprecated-headers]
| #include <stddef.h> | |
| #include <cstddef> |
| #include <stddef.h> | ||
|
|
||
| #include <algorithm> | ||
| #include <boost/iterator/iterator_facade.hpp> |
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.
warning: 'boost/iterator/iterator_facade.hpp' file not found [clang-diagnostic-error]
#include <boost/iterator/iterator_facade.hpp>
^| namespace doris { | ||
| namespace vectorized { |
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.
warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces]
| namespace doris { | |
| namespace vectorized { | |
| namespace doris::vectorized { |
be/src/vec/aggregate_functions/aggregate_function_uniq_distribute_key.h:48:
- } // namespace vectorized
- } // namespace doris
+ } // namespace doris| auto data = reinterpret_cast<const UInt64*>( | ||
| assert_cast<const ColumnFixedLengthObject&>(column).get_data().data()); | ||
| for (size_t i = 0; i != num_rows; ++i) { | ||
| auto rhs_place = places + sizeof(Data) * i; |
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.
warning: 'auto rhs_place' can be declared as 'auto *rhs_place' [readability-qualified-auto]
| auto rhs_place = places + sizeof(Data) * i; | |
| auto *rhs_place = places + sizeof(Data) * i; |
|
PR approved by at least one committer and no changes requested. |
|
TeamCity be ut coverage result: |
TPC-H: Total hot run time: 40813 ms |
TPC-DS: Total hot run time: 186747 ms |
Proposed changes
Implement another count distinct function.
Further comments
If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...