Skip to content

Conversation

@jacktengg
Copy link
Contributor

BP #42136

@doris-robot
Copy link

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR

Since 2024-03-18, the Document has been moved to doris-website.
See Doris Document.

@jacktengg
Copy link
Contributor Author

run buildall

Copy link
Contributor

@github-actions github-actions bot left a 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

return result_type;
}

Status execute_impl(FunctionContext* context, Block& block, const ColumnNumbers& arguments,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: function 'execute_impl' has cognitive complexity of 55 (threshold 50) [readability-function-cognitive-complexity]

    Status execute_impl(FunctionContext* context, Block& block, const ColumnNumbers& arguments,
           ^
Additional context

be/src/vec/functions/function_coalesce.cpp:85: +1, including nesting penalty of 0, nesting level increased to 1

        if (!func_is_not_null) [[unlikely]] {
        ^

be/src/vec/functions/function_coalesce.cpp:97: +1, including nesting penalty of 0, nesting level increased to 1

        for (size_t i = 0; i < arguments.size(); ++i) {
        ^

be/src/vec/functions/function_coalesce.cpp:100: +2, including nesting penalty of 1, nesting level increased to 2

            if (!arg_type->is_nullable()) {
            ^

be/src/vec/functions/function_coalesce.cpp:101: +3, including nesting penalty of 2, nesting level increased to 3

                if (i == 0) {
                ^

be/src/vec/functions/function_coalesce.cpp:106: +1, nesting level increased to 3

                } else {
                  ^

be/src/vec/functions/function_coalesce.cpp:122: +1, including nesting penalty of 0, nesting level increased to 1

        if (!result_type->is_nullable()) {
        ^

be/src/vec/functions/function_coalesce.cpp:124: +1, nesting level increased to 1

        } else {
          ^

be/src/vec/functions/function_coalesce.cpp:131: +1, including nesting penalty of 0, nesting level increased to 1

        if (is_string_result) {
        ^

be/src/vec/functions/function_coalesce.cpp:133: +1, nesting level increased to 1

        } else {
          ^

be/src/vec/functions/function_coalesce.cpp:143: +1, including nesting penalty of 0, nesting level increased to 1

        for (size_t i = 0; i < argument_size; ++i) {
        ^

be/src/vec/functions/function_coalesce.cpp:148: +2, including nesting penalty of 1, nesting level increased to 2

            if (auto* nullable = check_and_get_column<const ColumnNullable>(*argument_columns[i])) {
            ^

be/src/vec/functions/function_coalesce.cpp:157: +1, including nesting penalty of 0, nesting level increased to 1

        for (size_t i = 0; i < argument_size && remaining_rows; ++i) {
        ^

be/src/vec/functions/function_coalesce.cpp:157: +1

        for (size_t i = 0; i < argument_size && remaining_rows; ++i) {
                                             ^

be/src/vec/functions/function_coalesce.cpp:160: +2, including nesting penalty of 1, nesting level increased to 2

            RETURN_IF_ERROR(
            ^

be/src/common/status.h:619: expanded from macro 'RETURN_IF_ERROR'

    do {                                \
    ^

be/src/vec/functions/function_coalesce.cpp:160: +3, including nesting penalty of 2, nesting level increased to 3

            RETURN_IF_ERROR(
            ^

be/src/common/status.h:621: expanded from macro 'RETURN_IF_ERROR'

        if (UNLIKELY(!_status_.ok())) { \
        ^

be/src/vec/functions/function_coalesce.cpp:172: +2, including nesting penalty of 1, nesting level increased to 2

            for (size_t j = 0; j < input_rows_count; ++j) {
            ^

be/src/vec/functions/function_coalesce.cpp:178: +2, including nesting penalty of 1, nesting level increased to 2

            if (remaining_rows == 0) {
            ^

be/src/vec/functions/function_coalesce.cpp:182: +3, including nesting penalty of 2, nesting level increased to 3

                for (size_t row = 0; row < input_rows_count; ++row) {
                ^

be/src/vec/functions/function_coalesce.cpp:186: +3, including nesting penalty of 2, nesting level increased to 3

                if (is_same_column_count == input_rows_count) {
                ^

be/src/vec/functions/function_coalesce.cpp:187: +4, including nesting penalty of 3, nesting level increased to 4

                    if (result_type->is_nullable()) {
                    ^

be/src/vec/functions/function_coalesce.cpp:190: +1, nesting level increased to 4

                    } else {
                      ^

be/src/vec/functions/function_coalesce.cpp:197: +2, including nesting penalty of 1, nesting level increased to 2

            if (!is_string_result) {
            ^

be/src/vec/functions/function_coalesce.cpp:201: +3, including nesting penalty of 2, nesting level increased to 3

                RETURN_IF_ERROR(filled_result_column(result_type, result_column,
                ^

be/src/common/status.h:619: expanded from macro 'RETURN_IF_ERROR'

    do {                                \
    ^

be/src/vec/functions/function_coalesce.cpp:201: +4, including nesting penalty of 3, nesting level increased to 4

                RETURN_IF_ERROR(filled_result_column(result_type, result_column,
                ^

be/src/common/status.h:621: expanded from macro 'RETURN_IF_ERROR'

        if (UNLIKELY(!_status_.ok())) { \
        ^

be/src/vec/functions/function_coalesce.cpp:207: +1, including nesting penalty of 0, nesting level increased to 1

        if (is_string_result) {
        ^

be/src/vec/functions/function_coalesce.cpp:209: +2, including nesting penalty of 1, nesting level increased to 2

            for (size_t row = 0; row < input_rows_count; ++row) {
            ^

be/src/vec/functions/function_coalesce.cpp:210: +3, including nesting penalty of 2, nesting level increased to 3

                if (null_map_data[row]) { //should be null
                ^

be/src/vec/functions/function_coalesce.cpp:212: +1, nesting level increased to 3

                } else {
                  ^

be/src/vec/functions/function_coalesce.cpp:218: +1, including nesting penalty of 0, nesting level increased to 1

        if (result_type->is_nullable()) {
        ^

be/src/vec/functions/function_coalesce.cpp:221: +1, nesting level increased to 1

        } else {
          ^

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 36.04% (9364/25983)
Line Coverage: 27.61% (76954/278753)
Region Coverage: 26.38% (39512/149754)
Branch Coverage: 23.17% (20100/86768)
Coverage Report: http://coverage.selectdb-in.cc/coverage/70359c923a0534e3add6985b272880dca5792a6e_70359c923a0534e3add6985b272880dca5792a6e/report/index.html

@yiguolei yiguolei merged commit 64d0c55 into apache:branch-2.1 Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants