-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[featrue](expr) support common subexpression elimination be part #32673
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. |
|
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
| // input expr -> intermediate_projections[0] -> intermediate_projections[1] -> intermediate_projections[2] ... -> final projections -> output expr | ||
| // prepare _row_descriptor intermediate_row_desc[0] intermediate_row_desc[1] intermediate_row_desc.end() _output_row_descriptor | ||
|
|
||
| [[nodiscard]] const RowDescriptor& projections_row_desc() const { |
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: method 'projections_row_desc' can be made static [readability-convert-member-functions-to-static]
| [[nodiscard]] const RowDescriptor& projections_row_desc() const { | |
| [[nodiscard]] static const RowDescriptor& projections_row_desc() { |
| // input expr -> intermediate_projections[0] -> intermediate_projections[1] -> intermediate_projections[2] ... -> final projections -> output expr | ||
| // prepare _row_descriptor intermediate_row_desc[0] intermediate_row_desc[1] intermediate_row_desc.end() _output_row_descriptor | ||
|
|
||
| [[nodiscard]] const RowDescriptor& projections_row_desc() const { |
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: method 'projections_row_desc' can be made static [readability-convert-member-functions-to-static]
| [[nodiscard]] const RowDescriptor& projections_row_desc() const { | |
| [[nodiscard]] static const RowDescriptor& projections_row_desc() { |
|
TeamCity be ut coverage result: |
|
run buildall |
TPC-H: Total hot run time: 38346 ms |
TPC-DS: Total hot run time: 181939 ms |
|
Load test result on machine: 'aliyun_ecs.c7a.8xlarge_32C64G' |
|
TeamCity be ut coverage result: |
|
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
| } | ||
| } | ||
|
|
||
| [[nodiscard]] const RowDescriptor& intermediate_row_desc(int 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.
warning: method 'intermediate_row_desc' can be made const [readability-make-member-function-const]
| [[nodiscard]] const RowDescriptor& intermediate_row_desc(int idx) { | |
| [[nodiscard]] const RowDescriptor& intermediate_row_desc(int idx) const { |
| } | ||
| } | ||
|
|
||
| [[nodiscard]] const RowDescriptor& intermediate_row_desc(int 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.
warning: method 'intermediate_row_desc' can be made const [readability-make-member-function-const]
| [[nodiscard]] const RowDescriptor& intermediate_row_desc(int idx) { | |
| [[nodiscard]] const RowDescriptor& intermediate_row_desc(int idx) const { |
|
TeamCity be ut coverage result: |
|
run buildall |
|
TeamCity be ut coverage result: |
TPC-H: Total hot run time: 38076 ms |
TPC-DS: Total hot run time: 187172 ms |
|
Load test result on machine: 'aliyun_ecs.c7a.8xlarge_32C64G' |
|
run buildall |
|
run buildall |
|
TeamCity be ut coverage result: |
TPC-H: Total hot run time: 37727 ms |
TPC-DS: Total hot run time: 186464 ms |
|
Load test result on machine: 'aliyun_ecs.c7a.8xlarge_32C64G' |
|
run buildall |
|
TeamCity be ut coverage result: |
|
PR approved by at least one committer and no changes requested. |
be/src/vec/exec/scan/vscanner.cpp
Outdated
|
|
||
| vectorized::Block input_block = *origin_block; | ||
|
|
||
| const size_t rows = input_block.rows(); |
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.
do the check before copy *origin_block
| } | ||
|
|
||
| void Block::shuffle_columns(std::vector<int>& result_column_ids) { | ||
| Container tmp_data; |
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.
tmp_data(result_column_ids.size())
be/src/vec/core/block.cpp
Outdated
| row_same_bit = std::move(other.row_same_bit); | ||
| } | ||
|
|
||
| void Block::shuffle_columns(std::vector<int>& result_column_ids) { |
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.
const reference?
be/src/exec/exec_node.h
Outdated
| std::unique_ptr<RowDescriptor> _output_row_descriptor; | ||
| vectorized::VExprContextSPtrs _projections; | ||
|
|
||
| std::vector<std::unique_ptr<RowDescriptor>> _intermediate_output_row_descriptor; |
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 here need unique_ptr ? not std::vector
recheck the logic:_output_row_descriptor
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.
_output_row_descriptor needs to be a pointer because it could be null, null means that no projection is required.
be/src/exec/exec_node.cpp
Outdated
| } | ||
| _projections = _intermediate_projections.back(); | ||
| _intermediate_projections.pop_back(); | ||
|
|
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.
del space
|
run buildall |
TPC-H: Total hot run time: 38575 ms |
TPC-DS: Total hot run time: 182097 ms |
|
Load test result on machine: 'aliyun_ecs.c7a.8xlarge_32C64G' |
|
TeamCity be ut coverage result: |
HappenLee
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
|
PR approved by at least one committer and no changes requested. |
Proposed changes
fe code #32004
test pr #32770
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...