github-actions[bot] commented on code in PR #41724:
URL: https://github.com/apache/doris/pull/41724#discussion_r1796813605
##########
be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:
##########
@@ -182,11 +174,7 @@ Status
PartitionedHashJoinProbeLocalState::spill_probe_blocks(
auto* spill_io_pool =
ExecEnv::GetInstance()->spill_stream_mgr()->get_spill_io_thread_pool();
auto query_id = state->query_id();
- MonotonicStopWatch submit_timer;
- submit_timer.start();
-
- auto spill_func = [query_id, state, submit_timer, this] {
- _spill_wait_in_queue_timer->update(submit_timer.elapsed_time());
+ auto spill_func = [query_id, state, this] {
Review Comment:
warning: lambda has cognitive complexity of 56 (threshold 50)
[readability-function-cognitive-complexity]
```cpp
auto spill_func = [query_id, state, this] {
^
```
<details>
<summary>Additional context</summary>
**be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:181:** +1,
including nesting penalty of 0, nesting level increased to 1
```cpp
for (uint32_t partition_index = 0; partition_index !=
p._partition_count;
^
```
**be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:185:** +2,
including nesting penalty of 1, nesting level increased to 2
```cpp
if (partitioned_block) {
^
```
**be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:187:** +3,
including nesting penalty of 2, nesting level increased to 3
```cpp
if (size >=
vectorized::SpillStream::MIN_SPILL_WRITE_BATCH_MEM) {
^
```
**be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:190:** +1,
nesting level increased to 3
```cpp
} else {
^
```
**be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:195:** +2,
including nesting penalty of 1, nesting level increased to 2
```cpp
if (blocks.empty()) {
^
```
**be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:200:** +2,
including nesting penalty of 1, nesting level increased to 2
```cpp
if (!spilling_stream) {
^
```
**be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:201:** +3,
including nesting penalty of 2, nesting level increased to 3
```cpp
RETURN_IF_ERROR(ExecEnv::GetInstance()->spill_stream_mgr()->register_spill_stream(
^
```
**be/src/common/status.h:639:** expanded from macro 'RETURN_IF_ERROR'
```cpp
do { \
^
```
**be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:201:** +4,
including nesting penalty of 3, nesting level increased to 4
```cpp
RETURN_IF_ERROR(ExecEnv::GetInstance()->spill_stream_mgr()->register_spill_stream(
^
```
**be/src/common/status.h:641:** expanded from macro 'RETURN_IF_ERROR'
```cpp
if (UNLIKELY(!_status_.ok())) { \
^
```
**be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:208:** +2,
including nesting penalty of 1, nesting level increased to 2
```cpp
while (!blocks.empty() && !state->is_cancelled()) {
^
```
**be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:208:** +1
```cpp
while (!blocks.empty() && !state->is_cancelled()) {
^
```
**be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:212:** +3,
including nesting penalty of 2, nesting level increased to 3
```cpp
RETURN_IF_ERROR(merged_block->merge(std::move(block)));
^
```
**be/src/common/status.h:639:** expanded from macro 'RETURN_IF_ERROR'
```cpp
do { \
^
```
**be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:212:** +4,
including nesting penalty of 3, nesting level increased to 4
```cpp
RETURN_IF_ERROR(merged_block->merge(std::move(block)));
^
```
**be/src/common/status.h:641:** expanded from macro 'RETURN_IF_ERROR'
```cpp
if (UNLIKELY(!_status_.ok())) { \
^
```
**be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:213:** +3,
including nesting penalty of 2, nesting level increased to 3
```cpp
DBUG_EXECUTE_IF("fault_inject::partitioned_hash_join_probe::spill_probe_blocks",
{
^
```
**be/src/util/debug_points.h:36:** expanded from macro 'DBUG_EXECUTE_IF'
```cpp
if (UNLIKELY(config::enable_debug_points)) {
\
^
```
**be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:213:** +4,
including nesting penalty of 3, nesting level increased to 4
```cpp
DBUG_EXECUTE_IF("fault_inject::partitioned_hash_join_probe::spill_probe_blocks",
{
^
```
**be/src/util/debug_points.h:38:** expanded from macro 'DBUG_EXECUTE_IF'
```cpp
if (dp) {
\
^
```
**be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:218:** +3,
including nesting penalty of 2, nesting level increased to 3
```cpp
if (merged_block->allocated_bytes() >=
^
```
**be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:221:** +4,
including nesting penalty of 3, nesting level increased to 4
```cpp
RETURN_IF_ERROR(
^
```
**be/src/common/status.h:639:** expanded from macro 'RETURN_IF_ERROR'
```cpp
do { \
^
```
**be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:221:** +5,
including nesting penalty of 4, nesting level increased to 5
```cpp
RETURN_IF_ERROR(
^
```
**be/src/common/status.h:641:** expanded from macro 'RETURN_IF_ERROR'
```cpp
if (UNLIKELY(!_status_.ok())) { \
^
```
**be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:227:** +2,
including nesting penalty of 1, nesting level increased to 2
```cpp
if (!merged_block->empty()) {
^
```
**be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:229:** +3,
including nesting penalty of 2, nesting level increased to 3
```cpp
RETURN_IF_ERROR(
^
```
**be/src/common/status.h:639:** expanded from macro 'RETURN_IF_ERROR'
```cpp
do { \
^
```
**be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:229:** +4,
including nesting penalty of 3, nesting level increased to 4
```cpp
RETURN_IF_ERROR(
^
```
**be/src/common/status.h:641:** expanded from macro 'RETURN_IF_ERROR'
```cpp
if (UNLIKELY(!_status_.ok())) { \
^
```
</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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]