You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "jacktengg (via GitHub)" <gi...@apache.org> on 2024/09/26 03:09:49 UTC
[PR] [fix](window_func) fix bug of agg function used in window function and add many test cases (#40678) [doris]
jacktengg opened a new pull request, #41328:
URL: https://github.com/apache/doris/pull/41328
## Proposed changes
Issue Number: close #xxx
BP #40678
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [fix](window_func) fix bug of agg function used in window function and add many test cases (#40678) [doris]
Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #41328:
URL: https://github.com/apache/doris/pull/41328#issuecomment-2375882054
TeamCity be ut coverage result:
Function Coverage: 36.14% (9347/25863)
Line Coverage: 27.66% (76757/277468)
Region Coverage: 26.44% (39412/149063)
Branch Coverage: 23.22% (20057/86368)
Coverage Report: http://coverage.selectdb-in.cc/coverage/c2b3cb7903c7dfc29f670944dbd0ff04861bc1bd_c2b3cb7903c7dfc29f670944dbd0ff04861bc1bd/report/index.html
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [fix](window_func) fix bug of agg function used in window function and add many test cases (#40678) [doris]
Posted by "yiguolei (via GitHub)" <gi...@apache.org>.
yiguolei merged PR #41328:
URL: https://github.com/apache/doris/pull/41328
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [fix](window_func) fix bug of agg function used in window function and add many test cases (#40678) [doris]
Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #41328:
URL: https://github.com/apache/doris/pull/41328#issuecomment-2375761158
Thank you for your contribution to Apache Doris.
Don't know what should be done next? See [How to process your PR](https://cwiki.apache.org/confluence/display/DORIS/How+to+process+your+PR)
Since 2024-03-18, the Document has been moved to [doris-website](https://github.com/apache/doris-website).
See [Doris Document](https://cwiki.apache.org/confluence/display/DORIS/Doris+Document).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [fix](window_func) fix bug of agg function used in window function and add many test cases (#40678) [doris]
Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #41328:
URL: https://github.com/apache/doris/pull/41328#issuecomment-2376226699
TeamCity be ut coverage result:
Function Coverage: 36.14% (9347/25863)
Line Coverage: 27.67% (76769/277469)
Region Coverage: 26.44% (39407/149063)
Branch Coverage: 23.23% (20062/86368)
Coverage Report: http://coverage.selectdb-in.cc/coverage/c22e17e5765a7792bc3adc5d7afda69d0893c0e0_c22e17e5765a7792bc3adc5d7afda69d0893c0e0/report/index.html
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [fix](window_func) fix bug of agg function used in window function and add many test cases (#40678) [doris]
Posted by "jacktengg (via GitHub)" <gi...@apache.org>.
jacktengg commented on PR #41328:
URL: https://github.com/apache/doris/pull/41328#issuecomment-2376158144
run buildall
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [fix](window_func) fix bug of agg function used in window function and add many test cases (#40678) [doris]
Posted by "jacktengg (via GitHub)" <gi...@apache.org>.
jacktengg commented on PR #41328:
URL: https://github.com/apache/doris/pull/41328#issuecomment-2375761530
run buildall
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [fix](window_func) fix bug of agg function used in window function and add many test cases (#40678) [doris]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on code in PR #41328:
URL: https://github.com/apache/doris/pull/41328#discussion_r1776298981
##########
be/src/vec/aggregate_functions/aggregate_function_window_funnel.h:
##########
@@ -146,26 +143,23 @@ struct WindowFunnelState {
}
void sort() {
- if (sorted) {
- return;
- }
-
Block tmp_block = mutable_block.to_block();
auto block = tmp_block.clone_without_columns();
sort_block(tmp_block, block, sort_description, 0);
- mutable_block = MutableBlock(std::move(block));
- sorted = true;
+ mutable_block = std::move(block);
+ _reset_columns_ptr();
}
template <WindowFunnelMode WINDOW_FUNNEL_MODE>
- int _match_event_list(size_t& start_row, size_t row_count,
- const NativeType* timestamp_data) const {
+ int _match_event_list(size_t& start_row, size_t row_count) const {
Review Comment:
warning: function '_match_event_list' has cognitive complexity of 64 (threshold 50) [readability-function-cognitive-complexity]
```cpp
int _match_event_list(size_t& start_row, size_t row_count) const {
^
```
<details>
<summary>Additional context</summary>
**be/src/vec/aggregate_functions/aggregate_function_window_funnel.h:167:** +1, including nesting penalty of 0, nesting level increased to 1
```cpp
if (match_row < row_count) {
^
```
**be/src/vec/aggregate_functions/aggregate_function_window_funnel.h:177:** +2, including nesting penalty of 1, nesting level increased to 2
```cpp
for (; column_idx < event_count + 1 && match_row < row_count;
^
```
**be/src/vec/aggregate_functions/aggregate_function_window_funnel.h:177:** +1
```cpp
for (; column_idx < event_count + 1 && match_row < row_count;
^
```
**be/src/vec/aggregate_functions/aggregate_function_window_funnel.h:182:** +3, including nesting penalty of 2, nesting level increased to 3
```cpp
if constexpr (WINDOW_FUNNEL_MODE == WindowFunnelMode::FIXED) {
^
```
**be/src/vec/aggregate_functions/aggregate_function_window_funnel.h:183:** +4, including nesting penalty of 3, nesting level increased to 4
```cpp
if (event_data[match_row] == 1) {
^
```
**be/src/vec/aggregate_functions/aggregate_function_window_funnel.h:186:** +5, including nesting penalty of 4, nesting level increased to 5
```cpp
if (current_timestamp <= end_timestamp) {
^
```
**be/src/vec/aggregate_functions/aggregate_function_window_funnel.h:194:** +3, including nesting penalty of 2, nesting level increased to 3
```cpp
if (match_row < row_count) {
^
```
**be/src/vec/aggregate_functions/aggregate_function_window_funnel.h:198:** +4, including nesting penalty of 3, nesting level increased to 4
```cpp
if (is_matched) {
^
```
**be/src/vec/aggregate_functions/aggregate_function_window_funnel.h:199:** +5, including nesting penalty of 4, nesting level increased to 5
```cpp
if constexpr (WINDOW_FUNNEL_MODE == WindowFunnelMode::INCREASE) {
^
```
**be/src/vec/aggregate_functions/aggregate_function_window_funnel.h:203:** +4, including nesting penalty of 3, nesting level increased to 4
```cpp
if (!is_matched) {
^
```
**be/src/vec/aggregate_functions/aggregate_function_window_funnel.h:206:** +4, including nesting penalty of 3, nesting level increased to 4
```cpp
if constexpr (WINDOW_FUNNEL_MODE == WindowFunnelMode::INCREASE) {
^
```
**be/src/vec/aggregate_functions/aggregate_function_window_funnel.h:210:** +4, including nesting penalty of 3, nesting level increased to 4
```cpp
if constexpr (WINDOW_FUNNEL_MODE == WindowFunnelMode::DEDUPLICATION) {
^
```
**be/src/vec/aggregate_functions/aggregate_function_window_funnel.h:212:** +5, including nesting penalty of 4, nesting level increased to 5
```cpp
if (match_row != last_match_row + 1) {
^
```
**be/src/vec/aggregate_functions/aggregate_function_window_funnel.h:213:** +6, including nesting penalty of 5, nesting level increased to 6
```cpp
for (int tmp_column_idx = 1; tmp_column_idx < column_idx;
^
```
**be/src/vec/aggregate_functions/aggregate_function_window_funnel.h:222:** +7, including nesting penalty of 6, nesting level increased to 7
```cpp
if (dup_match_row < match_row) {
^
```
**be/src/vec/aggregate_functions/aggregate_function_window_funnel.h:228:** +5, including nesting penalty of 4, nesting level increased to 5
```cpp
if (is_dup) {
^
```
**be/src/vec/aggregate_functions/aggregate_function_window_funnel.h:234:** +1, nesting level increased to 3
```cpp
} else {
^
```
</details>
##########
be/src/vec/aggregate_functions/aggregate_function_window_funnel.h:
##########
@@ -146,26 +143,23 @@
}
void sort() {
- if (sorted) {
- return;
- }
-
Block tmp_block = mutable_block.to_block();
auto block = tmp_block.clone_without_columns();
sort_block(tmp_block, block, sort_description, 0);
- mutable_block = MutableBlock(std::move(block));
- sorted = true;
+ mutable_block = std::move(block);
+ _reset_columns_ptr();
}
template <WindowFunnelMode WINDOW_FUNNEL_MODE>
- int _match_event_list(size_t& start_row, size_t row_count,
- const NativeType* timestamp_data) const {
+ int _match_event_list(size_t& start_row, size_t row_count) const {
Review Comment:
warning: function '_match_event_list' exceeds recommended size/complexity thresholds [readability-function-size]
```cpp
int _match_event_list(size_t& start_row, size_t row_count) const {
^
```
<details>
<summary>Additional context</summary>
**be/src/vec/aggregate_functions/aggregate_function_window_funnel.h:153:** 87 lines including whitespace and comments (threshold 80)
```cpp
int _match_event_list(size_t& start_row, size_t row_count) const {
^
```
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org