-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
improve spill counters #41724
base: spill_and_reserve
Are you sure you want to change the base?
improve spill counters #41724
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
|
||
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] { |
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: lambda has cognitive complexity of 56 (threshold 50) [readability-function-cognitive-complexity]
auto spill_func = [query_id, state, this] {
^
Additional context
be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:178: +1, including nesting penalty of 0, nesting level increased to 1
for (uint32_t partition_index = 0; partition_index != p._partition_count;
^
be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:182: +2, including nesting penalty of 1, nesting level increased to 2
if (partitioned_block) {
^
be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:184: +3, including nesting penalty of 2, nesting level increased to 3
if (size >= vectorized::SpillStream::MIN_SPILL_WRITE_BATCH_MEM) {
^
be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:187: +1, nesting level increased to 3
} else {
^
be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:192: +2, including nesting penalty of 1, nesting level increased to 2
if (blocks.empty()) {
^
be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:197: +2, including nesting penalty of 1, nesting level increased to 2
if (!spilling_stream) {
^
be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:198: +3, including nesting penalty of 2, nesting level increased to 3
RETURN_IF_ERROR(ExecEnv::GetInstance()->spill_stream_mgr()->register_spill_stream(
^
be/src/common/status.h:639: expanded from macro 'RETURN_IF_ERROR'
do { \
^
be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:198: +4, including nesting penalty of 3, nesting level increased to 4
RETURN_IF_ERROR(ExecEnv::GetInstance()->spill_stream_mgr()->register_spill_stream(
^
be/src/common/status.h:641: expanded from macro 'RETURN_IF_ERROR'
if (UNLIKELY(!_status_.ok())) { \
^
be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:205: +2, including nesting penalty of 1, nesting level increased to 2
while (!blocks.empty() && !state->is_cancelled()) {
^
be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:205: +1
while (!blocks.empty() && !state->is_cancelled()) {
^
be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:209: +3, including nesting penalty of 2, nesting level increased to 3
RETURN_IF_ERROR(merged_block->merge(std::move(block)));
^
be/src/common/status.h:639: expanded from macro 'RETURN_IF_ERROR'
do { \
^
be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:209: +4, including nesting penalty of 3, nesting level increased to 4
RETURN_IF_ERROR(merged_block->merge(std::move(block)));
^
be/src/common/status.h:641: expanded from macro 'RETURN_IF_ERROR'
if (UNLIKELY(!_status_.ok())) { \
^
be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:210: +3, including nesting penalty of 2, nesting level increased to 3
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'
if (UNLIKELY(config::enable_debug_points)) { \
^
be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:210: +4, including nesting penalty of 3, nesting level increased to 4
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'
if (dp) { \
^
be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:215: +3, including nesting penalty of 2, nesting level increased to 3
if (merged_block->allocated_bytes() >=
^
be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:218: +4, including nesting penalty of 3, nesting level increased to 4
RETURN_IF_ERROR(
^
be/src/common/status.h:639: expanded from macro 'RETURN_IF_ERROR'
do { \
^
be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:218: +5, including nesting penalty of 4, nesting level increased to 5
RETURN_IF_ERROR(
^
be/src/common/status.h:641: expanded from macro 'RETURN_IF_ERROR'
if (UNLIKELY(!_status_.ok())) { \
^
be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:224: +2, including nesting penalty of 1, nesting level increased to 2
if (!merged_block->empty()) {
^
be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:226: +3, including nesting penalty of 2, nesting level increased to 3
RETURN_IF_ERROR(
^
be/src/common/status.h:639: expanded from macro 'RETURN_IF_ERROR'
do { \
^
be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:226: +4, including nesting penalty of 3, nesting level increased to 4
RETURN_IF_ERROR(
^
be/src/common/status.h:641: expanded from macro 'RETURN_IF_ERROR'
if (UNLIKELY(!_status_.ok())) { \
^
|
||
auto spill_func = [this, state, query_id, &parent, submit_timer] { | ||
_spill_wait_in_queue_timer->update(submit_timer.elapsed_time()); | ||
auto spill_func = [this, state, query_id, &parent] { |
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: lambda has cognitive complexity of 52 (threshold 50) [readability-function-cognitive-complexity]
auto spill_func = [this, state, query_id, &parent] {
^
Additional context
be/src/pipeline/exec/spill_sort_source_operator.cpp:101: +1, including nesting penalty of 0, nesting level increased to 1
while (!state->is_cancelled()) {
^
be/src/pipeline/exec/spill_sort_source_operator.cpp:108: nesting level increased to 2
SCOPED_TIMER(Base::_spill_recover_time);
^
be/src/util/runtime_profile.h:67: expanded from macro 'SCOPED_TIMER'
#define SCOPED_TIMER(c) ScopedTimer<MonotonicStopWatch> MACRO_CONCAT(SCOPED_TIMER, __COUNTER__)(c)
^
be/src/pipeline/exec/spill_sort_source_operator.cpp:113: +2, including nesting penalty of 1, nesting level increased to 2
RETURN_IF_ERROR(_status);
^
be/src/common/status.h:639: expanded from macro 'RETURN_IF_ERROR'
do { \
^
be/src/pipeline/exec/spill_sort_source_operator.cpp:113: +3, including nesting penalty of 2, nesting level increased to 3
RETURN_IF_ERROR(_status);
^
be/src/common/status.h:641: expanded from macro 'RETURN_IF_ERROR'
if (UNLIKELY(!_status_.ok())) { \
^
be/src/pipeline/exec/spill_sort_source_operator.cpp:116: +2, including nesting penalty of 1, nesting level increased to 2
if (_shared_state->sorted_streams.empty()) {
^
be/src/pipeline/exec/spill_sort_source_operator.cpp:125: +2, including nesting penalty of 1, nesting level increased to 2
RETURN_IF_ERROR(_status);
^
be/src/common/status.h:639: expanded from macro 'RETURN_IF_ERROR'
do { \
^
be/src/pipeline/exec/spill_sort_source_operator.cpp:125: +3, including nesting penalty of 2, nesting level increased to 3
RETURN_IF_ERROR(_status);
^
be/src/common/status.h:641: expanded from macro 'RETURN_IF_ERROR'
if (UNLIKELY(!_status_.ok())) { \
^
be/src/pipeline/exec/spill_sort_source_operator.cpp:130: +2, including nesting penalty of 1, nesting level increased to 2
while (!eos && !state->is_cancelled()) {
^
be/src/pipeline/exec/spill_sort_source_operator.cpp:130: +1
while (!eos && !state->is_cancelled()) {
^
be/src/pipeline/exec/spill_sort_source_operator.cpp:133: nesting level increased to 3
SCOPED_TIMER(Base::_spill_recover_time);
^
be/src/util/runtime_profile.h:67: expanded from macro 'SCOPED_TIMER'
#define SCOPED_TIMER(c) ScopedTimer<MonotonicStopWatch> MACRO_CONCAT(SCOPED_TIMER, __COUNTER__)(c)
^
be/src/pipeline/exec/spill_sort_source_operator.cpp:134: +3, including nesting penalty of 2, nesting level increased to 3
DBUG_EXECUTE_IF("fault_inject::spill_sort_source::recover_spill_data", {
^
be/src/util/debug_points.h:36: expanded from macro 'DBUG_EXECUTE_IF'
if (UNLIKELY(config::enable_debug_points)) { \
^
be/src/pipeline/exec/spill_sort_source_operator.cpp:134: +4, including nesting penalty of 3, nesting level increased to 4
DBUG_EXECUTE_IF("fault_inject::spill_sort_source::recover_spill_data", {
^
be/src/util/debug_points.h:38: expanded from macro 'DBUG_EXECUTE_IF'
if (dp) { \
^
be/src/pipeline/exec/spill_sort_source_operator.cpp:139: +3, including nesting penalty of 2, nesting level increased to 3
if (_status.ok()) {
^
be/src/pipeline/exec/spill_sort_source_operator.cpp:143: +3, including nesting penalty of 2, nesting level increased to 3
RETURN_IF_ERROR(_status);
^
be/src/common/status.h:639: expanded from macro 'RETURN_IF_ERROR'
do { \
^
be/src/pipeline/exec/spill_sort_source_operator.cpp:143: +4, including nesting penalty of 3, nesting level increased to 4
RETURN_IF_ERROR(_status);
^
be/src/common/status.h:641: expanded from macro 'RETURN_IF_ERROR'
if (UNLIKELY(!_status_.ok())) { \
^
be/src/pipeline/exec/spill_sort_source_operator.cpp:145: +3, including nesting penalty of 2, nesting level increased to 3
if (_status.ok()) {
^
be/src/pipeline/exec/spill_sort_source_operator.cpp:146: +4, including nesting penalty of 3, nesting level increased to 4
DBUG_EXECUTE_IF("fault_inject::spill_sort_source::spill_merged_data", {
^
be/src/util/debug_points.h:36: expanded from macro 'DBUG_EXECUTE_IF'
if (UNLIKELY(config::enable_debug_points)) { \
^
be/src/pipeline/exec/spill_sort_source_operator.cpp:146: +5, including nesting penalty of 4, nesting level increased to 5
DBUG_EXECUTE_IF("fault_inject::spill_sort_source::spill_merged_data", {
^
be/src/util/debug_points.h:38: expanded from macro 'DBUG_EXECUTE_IF'
if (dp) { \
^
be/src/pipeline/exec/spill_sort_source_operator.cpp:152: +3, including nesting penalty of 2, nesting level increased to 3
RETURN_IF_ERROR(_status);
^
be/src/common/status.h:639: expanded from macro 'RETURN_IF_ERROR'
do { \
^
be/src/pipeline/exec/spill_sort_source_operator.cpp:152: +4, including nesting penalty of 3, nesting level increased to 4
RETURN_IF_ERROR(_status);
^
be/src/common/status.h:641: expanded from macro 'RETURN_IF_ERROR'
if (UNLIKELY(!_status_.ok())) { \
^
ce2c4da
to
625dfa2
Compare
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
|
||
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] { |
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: lambda has cognitive complexity of 56 (threshold 50) [readability-function-cognitive-complexity]
auto spill_func = [query_id, state, this] {
^
Additional context
be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:181: +1, including nesting penalty of 0, nesting level increased to 1
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
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
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
} else {
^
be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:195: +2, including nesting penalty of 1, nesting level increased to 2
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
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
RETURN_IF_ERROR(ExecEnv::GetInstance()->spill_stream_mgr()->register_spill_stream(
^
be/src/common/status.h:639: expanded from macro 'RETURN_IF_ERROR'
do { \
^
be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:201: +4, including nesting penalty of 3, nesting level increased to 4
RETURN_IF_ERROR(ExecEnv::GetInstance()->spill_stream_mgr()->register_spill_stream(
^
be/src/common/status.h:641: expanded from macro 'RETURN_IF_ERROR'
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
while (!blocks.empty() && !state->is_cancelled()) {
^
be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:208: +1
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
RETURN_IF_ERROR(merged_block->merge(std::move(block)));
^
be/src/common/status.h:639: expanded from macro 'RETURN_IF_ERROR'
do { \
^
be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:212: +4, including nesting penalty of 3, nesting level increased to 4
RETURN_IF_ERROR(merged_block->merge(std::move(block)));
^
be/src/common/status.h:641: expanded from macro 'RETURN_IF_ERROR'
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
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'
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
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'
if (dp) { \
^
be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:218: +3, including nesting penalty of 2, nesting level increased to 3
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
RETURN_IF_ERROR(
^
be/src/common/status.h:639: expanded from macro 'RETURN_IF_ERROR'
do { \
^
be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:221: +5, including nesting penalty of 4, nesting level increased to 5
RETURN_IF_ERROR(
^
be/src/common/status.h:641: expanded from macro 'RETURN_IF_ERROR'
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
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
RETURN_IF_ERROR(
^
be/src/common/status.h:639: expanded from macro 'RETURN_IF_ERROR'
do { \
^
be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:229: +4, including nesting penalty of 3, nesting level increased to 4
RETURN_IF_ERROR(
^
be/src/common/status.h:641: expanded from macro 'RETURN_IF_ERROR'
if (UNLIKELY(!_status_.ok())) { \
^
625dfa2
to
31c91a3
Compare
9f4c269
to
8848213
Compare
31c91a3
to
633f8ef
Compare
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
|
||
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] { |
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: lambda has cognitive complexity of 56 (threshold 50) [readability-function-cognitive-complexity]
auto spill_func = [query_id, state, this] {
^
Additional context
be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:183: +1, including nesting penalty of 0, nesting level increased to 1
for (uint32_t partition_index = 0; partition_index != p._partition_count;
^
be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:187: +2, including nesting penalty of 1, nesting level increased to 2
if (partitioned_block) {
^
be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:189: +3, including nesting penalty of 2, nesting level increased to 3
if (size >= vectorized::SpillStream::MIN_SPILL_WRITE_BATCH_MEM) {
^
be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:192: +1, nesting level increased to 3
} else {
^
be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:197: +2, including nesting penalty of 1, nesting level increased to 2
if (blocks.empty()) {
^
be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:202: +2, including nesting penalty of 1, nesting level increased to 2
if (!spilling_stream) {
^
be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:203: +3, including nesting penalty of 2, nesting level increased to 3
RETURN_IF_ERROR(ExecEnv::GetInstance()->spill_stream_mgr()->register_spill_stream(
^
be/src/common/status.h:639: expanded from macro 'RETURN_IF_ERROR'
do { \
^
be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:203: +4, including nesting penalty of 3, nesting level increased to 4
RETURN_IF_ERROR(ExecEnv::GetInstance()->spill_stream_mgr()->register_spill_stream(
^
be/src/common/status.h:641: expanded from macro 'RETURN_IF_ERROR'
if (UNLIKELY(!_status_.ok())) { \
^
be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:211: +2, including nesting penalty of 1, nesting level increased to 2
while (!blocks.empty() && !state->is_cancelled()) {
^
be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:211: +1
while (!blocks.empty() && !state->is_cancelled()) {
^
be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:215: +3, including nesting penalty of 2, nesting level increased to 3
RETURN_IF_ERROR(merged_block->merge(std::move(block)));
^
be/src/common/status.h:639: expanded from macro 'RETURN_IF_ERROR'
do { \
^
be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:215: +4, including nesting penalty of 3, nesting level increased to 4
RETURN_IF_ERROR(merged_block->merge(std::move(block)));
^
be/src/common/status.h:641: expanded from macro 'RETURN_IF_ERROR'
if (UNLIKELY(!_status_.ok())) { \
^
be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:216: +3, including nesting penalty of 2, nesting level increased to 3
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'
if (UNLIKELY(config::enable_debug_points)) { \
^
be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:216: +4, including nesting penalty of 3, nesting level increased to 4
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'
if (dp) { \
^
be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:221: +3, including nesting penalty of 2, nesting level increased to 3
if (merged_block->allocated_bytes() >=
^
be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:224: +4, including nesting penalty of 3, nesting level increased to 4
RETURN_IF_ERROR(
^
be/src/common/status.h:639: expanded from macro 'RETURN_IF_ERROR'
do { \
^
be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:224: +5, including nesting penalty of 4, nesting level increased to 5
RETURN_IF_ERROR(
^
be/src/common/status.h:641: expanded from macro 'RETURN_IF_ERROR'
if (UNLIKELY(!_status_.ok())) { \
^
be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:230: +2, including nesting penalty of 1, nesting level increased to 2
if (!merged_block->empty()) {
^
be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:232: +3, including nesting penalty of 2, nesting level increased to 3
RETURN_IF_ERROR(
^
be/src/common/status.h:639: expanded from macro 'RETURN_IF_ERROR'
do { \
^
be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:232: +4, including nesting penalty of 3, nesting level increased to 4
RETURN_IF_ERROR(
^
be/src/common/status.h:641: expanded from macro 'RETURN_IF_ERROR'
if (UNLIKELY(!_status_.ok())) { \
^
|
||
auto spill_func = [this, state, query_id, &parent, submit_timer] { | ||
_spill_wait_in_queue_timer->update(submit_timer.elapsed_time()); | ||
auto spill_func = [this, state, query_id, &parent] { |
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: lambda has cognitive complexity of 52 (threshold 50) [readability-function-cognitive-complexity]
auto spill_func = [this, state, query_id, &parent] {
^
Additional context
be/src/pipeline/exec/spill_sort_source_operator.cpp:103: +1, including nesting penalty of 0, nesting level increased to 1
while (!state->is_cancelled()) {
^
be/src/pipeline/exec/spill_sort_source_operator.cpp:110: nesting level increased to 2
SCOPED_TIMER(Base::_spill_recover_time);
^
be/src/util/runtime_profile.h:67: expanded from macro 'SCOPED_TIMER'
#define SCOPED_TIMER(c) ScopedTimer<MonotonicStopWatch> MACRO_CONCAT(SCOPED_TIMER, __COUNTER__)(c)
^
be/src/pipeline/exec/spill_sort_source_operator.cpp:115: +2, including nesting penalty of 1, nesting level increased to 2
RETURN_IF_ERROR(_status);
^
be/src/common/status.h:639: expanded from macro 'RETURN_IF_ERROR'
do { \
^
be/src/pipeline/exec/spill_sort_source_operator.cpp:115: +3, including nesting penalty of 2, nesting level increased to 3
RETURN_IF_ERROR(_status);
^
be/src/common/status.h:641: expanded from macro 'RETURN_IF_ERROR'
if (UNLIKELY(!_status_.ok())) { \
^
be/src/pipeline/exec/spill_sort_source_operator.cpp:118: +2, including nesting penalty of 1, nesting level increased to 2
if (_shared_state->sorted_streams.empty()) {
^
be/src/pipeline/exec/spill_sort_source_operator.cpp:127: +2, including nesting penalty of 1, nesting level increased to 2
RETURN_IF_ERROR(_status);
^
be/src/common/status.h:639: expanded from macro 'RETURN_IF_ERROR'
do { \
^
be/src/pipeline/exec/spill_sort_source_operator.cpp:127: +3, including nesting penalty of 2, nesting level increased to 3
RETURN_IF_ERROR(_status);
^
be/src/common/status.h:641: expanded from macro 'RETURN_IF_ERROR'
if (UNLIKELY(!_status_.ok())) { \
^
be/src/pipeline/exec/spill_sort_source_operator.cpp:133: +2, including nesting penalty of 1, nesting level increased to 2
while (!eos && !state->is_cancelled()) {
^
be/src/pipeline/exec/spill_sort_source_operator.cpp:133: +1
while (!eos && !state->is_cancelled()) {
^
be/src/pipeline/exec/spill_sort_source_operator.cpp:136: nesting level increased to 3
SCOPED_TIMER(Base::_spill_recover_time);
^
be/src/util/runtime_profile.h:67: expanded from macro 'SCOPED_TIMER'
#define SCOPED_TIMER(c) ScopedTimer<MonotonicStopWatch> MACRO_CONCAT(SCOPED_TIMER, __COUNTER__)(c)
^
be/src/pipeline/exec/spill_sort_source_operator.cpp:137: +3, including nesting penalty of 2, nesting level increased to 3
DBUG_EXECUTE_IF("fault_inject::spill_sort_source::recover_spill_data", {
^
be/src/util/debug_points.h:36: expanded from macro 'DBUG_EXECUTE_IF'
if (UNLIKELY(config::enable_debug_points)) { \
^
be/src/pipeline/exec/spill_sort_source_operator.cpp:137: +4, including nesting penalty of 3, nesting level increased to 4
DBUG_EXECUTE_IF("fault_inject::spill_sort_source::recover_spill_data", {
^
be/src/util/debug_points.h:38: expanded from macro 'DBUG_EXECUTE_IF'
if (dp) { \
^
be/src/pipeline/exec/spill_sort_source_operator.cpp:142: +3, including nesting penalty of 2, nesting level increased to 3
if (_status.ok()) {
^
be/src/pipeline/exec/spill_sort_source_operator.cpp:146: +3, including nesting penalty of 2, nesting level increased to 3
RETURN_IF_ERROR(_status);
^
be/src/common/status.h:639: expanded from macro 'RETURN_IF_ERROR'
do { \
^
be/src/pipeline/exec/spill_sort_source_operator.cpp:146: +4, including nesting penalty of 3, nesting level increased to 4
RETURN_IF_ERROR(_status);
^
be/src/common/status.h:641: expanded from macro 'RETURN_IF_ERROR'
if (UNLIKELY(!_status_.ok())) { \
^
be/src/pipeline/exec/spill_sort_source_operator.cpp:148: +3, including nesting penalty of 2, nesting level increased to 3
if (_status.ok()) {
^
be/src/pipeline/exec/spill_sort_source_operator.cpp:149: +4, including nesting penalty of 3, nesting level increased to 4
DBUG_EXECUTE_IF("fault_inject::spill_sort_source::spill_merged_data", {
^
be/src/util/debug_points.h:36: expanded from macro 'DBUG_EXECUTE_IF'
if (UNLIKELY(config::enable_debug_points)) { \
^
be/src/pipeline/exec/spill_sort_source_operator.cpp:149: +5, including nesting penalty of 4, nesting level increased to 5
DBUG_EXECUTE_IF("fault_inject::spill_sort_source::spill_merged_data", {
^
be/src/util/debug_points.h:38: expanded from macro 'DBUG_EXECUTE_IF'
if (dp) { \
^
be/src/pipeline/exec/spill_sort_source_operator.cpp:155: +3, including nesting penalty of 2, nesting level increased to 3
RETURN_IF_ERROR(_status);
^
be/src/common/status.h:639: expanded from macro 'RETURN_IF_ERROR'
do { \
^
be/src/pipeline/exec/spill_sort_source_operator.cpp:155: +4, including nesting penalty of 3, nesting level increased to 4
RETURN_IF_ERROR(_status);
^
be/src/common/status.h:641: expanded from macro 'RETURN_IF_ERROR'
if (UNLIKELY(!_status_.ok())) { \
^
Proposed changes
Issue Number: close #xxx