-
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
[refactor](exec) refactor analytic operator to improve performance #46181
Conversation
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
run buildall |
TPC-H: Total hot run time: 32773 ms
|
TeamCity be ut coverage result: |
run buildall |
TPC-H: Total hot run time: 32571 ms
|
TeamCity be ut coverage result: |
c2155d6
to
3cd5904
Compare
run buildall |
TPC-H: Total hot run time: 32757 ms
|
TeamCity be ut coverage result: |
run buildall |
2 similar comments
run buildall |
run buildall |
TPC-H: Total hot run time: 33981 ms
|
TPC-DS: Total hot run time: 194699 ms
|
TeamCity be ut coverage result: |
ClickBench: Total hot run time: 31.57 s
|
run buildall |
TPC-H: Total hot run time: 33810 ms
|
TeamCity be ut coverage result: |
run buildall |
TPC-H: Total hot run time: 33825 ms
|
TPC-DS: Total hot run time: 195996 ms
|
TeamCity be ut coverage result: |
ClickBench: Total hot run time: 31.36 s
|
run buildall |
TPC-H: Total hot run time: 33899 ms
|
TeamCity be ut coverage result: |
run buildall |
4dafaea
to
3e57bb0
Compare
run buildall |
TeamCity be ut coverage result: |
TPC-H: Total hot run time: 32743 ms
|
TPC-DS: Total hot run time: 192889 ms
|
ClickBench: Total hot run time: 31.5 s
|
run buildall |
TPC-H: Total hot run time: 32219 ms
|
TeamCity be ut coverage result: |
TPC-DS: Total hot run time: 183616 ms
|
ClickBench: Total hot run time: 31.27 s
|
run buildall |
TPC-H: Total hot run time: 32819 ms
|
TPC-DS: Total hot run time: 185511 ms
|
ClickBench: Total hot run time: 30.75 s
|
TeamCity be ut coverage result: |
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. |
PR approved by anyone and no changes requested. |
_average_size = 0; | ||
} | ||
|
||
bool is_high_cardinality() const { return _count > 16 && _average_size < 8; } |
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.
better avoid use magic number
### What problem does this PR solve? Problem Summary: the _num_rows_returned have been add twice introduced by #46181, and only in master.
What problem does this PR solve?
Problem Summary:
Refactoring of Window Function Logic
The previous implementation of the window function operator had complex logic and poor execution performance. In this refactored version, we have categorized the window types and mapped them to corresponding execution functions. The logic is now divided into three major types, with further subdivisions based on specific window types:
No Window
Execution Function:
_get_next_for_partition: [unbounded preceding, unbounded following]
Range Window
Execution Functions:
_get_next_for_partition: [unbounded preceding,unbounded following]
_get_next_for_unbounded_range [RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW]
_get_next_for_range_between [RANGE BETWEEN M PRECEDING AND N FOLLOWING]
Rows Window
Execution Functions:
_get_next_for_partition : [unbounded preceding,unbounded following]
_get_next_for_unbounded_rows: [ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW]
_get_next_for_sliding_rows: [ROWS BETWEEN M PRECEDING AND N FOLLOWING]
Refactoring of Partition Boundary Search
Previously, the boundary search method used a two-level approach:
Firstly need Locate the block position
and then use binary search within the block to find partition boundary
Now, all data is written into a single large column, and binary search is performed directly within this column.
Changes to Operator Dependency Logic
The operator dependency logic has been modified to control the shared buffer:
When the buffer is too full: sink dependency will be blocked, source is running.
When the buffer is empty: sink is resumed, source is blocked.
These changes aim to enhance the functionality and performance of analytic processing and window functions in the pipeline.
and have test in case, this refactor have improve performance 5~10%
Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)