github-actions[bot] commented on code in PR #45159: URL: https://github.com/apache/doris/pull/45159#discussion_r1883214966
########## be/test/vec/function/function_time_test.cpp: ########## @@ -15,6 +15,7 @@ // specific language governing permissions and limitations // under the License. +#include <gtest/gtest.h> Review Comment: warning: 'gtest/gtest.h' file not found [clang-diagnostic-error] ```cpp #include <gtest/gtest.h> ^ ``` ########## be/test/vec/function/function_test_util.h: ########## @@ -214,7 +214,8 @@ void check_vec_table_function(TableFunction* fn, const InputTypeSet& input_types // A DataSet with a constant column can only have one row of data template <typename ReturnType, bool nullable = false> Status check_function(const std::string& func_name, const InputTypeSet& input_types, Review Comment: warning: function 'check_function' has cognitive complexity of 58 (threshold 50) [readability-function-cognitive-complexity] ```cpp Status check_function(const std::string& func_name, const InputTypeSet& input_types, ^ ``` <details> <summary>Additional context</summary> **be/test/vec/function/function_test_util.h:225:** +1, including nesting penalty of 0, nesting level increased to 1 ```cpp for (size_t i = 0; i < descs.size(); ++i) { ^ ``` **be/test/vec/function/function_test_util.h:231:** +2, including nesting penalty of 1, nesting level increased to 2 ```cpp ? ((DataTypeNullable*)(desc.data_type.get()))->get_nested_type() ^ ``` **be/test/vec/function/function_test_util.h:233:** +2, including nesting penalty of 1, nesting level increased to 2 ```cpp for (int j = 0; j < row_size; j++) { ^ ``` **be/test/vec/function/function_test_util.h:237:** +2, including nesting penalty of 1, nesting level increased to 2 ```cpp if (desc.is_const) { ^ ``` **be/test/vec/function/function_test_util.h:248:** +1, including nesting penalty of 0, nesting level increased to 1 ```cpp for (size_t i = 0; i < descs.size(); ++i) { ^ ``` **be/test/vec/function/function_test_util.h:252:** +2, including nesting penalty of 1, nesting level increased to 2 ```cpp if (desc.is_const) { ^ ``` **be/test/vec/function/function_test_util.h:256:** +1, nesting level increased to 2 ```cpp } else { ^ ``` **be/test/vec/function/function_test_util.h:262:** +1, including nesting penalty of 0, nesting level increased to 1 ```cpp auto return_type = nullable ? make_nullable(std::make_shared<ReturnType>()) ^ ``` **be/test/vec/function/function_test_util.h:266:** +1, including nesting penalty of 0, nesting level increased to 1 ```cpp if (expect_not_found_function) { ^ ``` **be/test/vec/function/function_test_util.h:273:** +1, including nesting penalty of 0, nesting level increased to 1 ```cpp if constexpr (std::is_same_v<ReturnType, DataTypeUInt8>) { ^ ``` **be/test/vec/function/function_test_util.h:275:** +1, nesting level increased to 1 ```cpp } else if constexpr (std::is_same_v<ReturnType, DataTypeInt32>) { ^ ``` **be/test/vec/function/function_test_util.h:277:** +1, nesting level increased to 1 ```cpp } else if constexpr (std::is_same_v<ReturnType, DataTypeFloat64> || ^ ``` **be/test/vec/function/function_test_util.h:280:** +1, nesting level increased to 1 ```cpp } else if constexpr (std::is_same_v<ReturnType, DateTime>) { ^ ``` **be/test/vec/function/function_test_util.h:282:** +1, nesting level increased to 1 ```cpp } else if (std::is_same_v<ReturnType, DateV2>) { ^ ``` **be/test/vec/function/function_test_util.h:284:** +1, nesting level increased to 1 ```cpp } else if (std::is_same_v<ReturnType, DateTimeV2>) { ^ ``` **be/test/vec/function/function_test_util.h:286:** +1, nesting level increased to 1 ```cpp } else if (std::is_same_v<ReturnType, Decimal128V2>) { ^ ``` **be/test/vec/function/function_test_util.h:288:** +1, nesting level increased to 1 ```cpp } else if (std::is_same_v<ReturnType, Decimal32>) { ^ ``` **be/test/vec/function/function_test_util.h:290:** +1, nesting level increased to 1 ```cpp } else if (std::is_same_v<ReturnType, Decimal64>) { ^ ``` **be/test/vec/function/function_test_util.h:292:** +1, nesting level increased to 1 ```cpp } else if (std::is_same_v<ReturnType, Decimal128V3>) { ^ ``` **be/test/vec/function/function_test_util.h:294:** +1, nesting level increased to 1 ```cpp } else if (std::is_same_v<ReturnType, Decimal256>) { ^ ``` **be/test/vec/function/function_test_util.h:296:** +1, nesting level increased to 1 ```cpp } else { ^ ``` **be/test/vec/function/function_test_util.h:310:** +1, including nesting penalty of 0, nesting level increased to 1 ```cpp if (expect_fail) { ^ ``` **be/test/vec/function/function_test_util.h:313:** +1, nesting level increased to 1 ```cpp } else { ^ ``` **be/test/vec/function/function_test_util.h:324:** +1, including nesting penalty of 0, nesting level increased to 1 ```cpp for (int i = 0; i < row_size; ++i) { ^ ``` **be/test/vec/function/function_test_util.h:326:** +2, including nesting penalty of 1, nesting level increased to 2 ```cpp if (row_size > 1) { ^ ``` **be/test/vec/function/function_test_util.h:329:** nesting level increased to 2 ```cpp auto check_column_data = [&]() { ^ ``` **be/test/vec/function/function_test_util.h:330:** +3, including nesting penalty of 2, nesting level increased to 3 ```cpp if constexpr (std::is_same_v<ReturnType, DataTypeJsonb>) { ^ ``` **be/test/vec/function/function_test_util.h:333:** +4, including nesting penalty of 3, nesting level increased to 4 ```cpp if (expect_data.empty()) { ^ ``` **be/test/vec/function/function_test_util.h:336:** +1, nesting level increased to 4 ```cpp } else { ^ ``` **be/test/vec/function/function_test_util.h:341:** +1, nesting level increased to 3 ```cpp } else { ^ ``` **be/test/vec/function/function_test_util.h:348:** +4, including nesting penalty of 3, nesting level increased to 4 ```cpp if constexpr (std::is_same_v<ReturnType, DataTypeDecimal<Decimal128V2>>) { ^ ``` **be/test/vec/function/function_test_util.h:351:** +1, nesting level increased to 4 ```cpp } else if constexpr (std::is_same_v<ReturnType, DataTypeBitMap>) { ^ ``` **be/test/vec/function/function_test_util.h:353:** +5, including nesting penalty of 4, nesting level increased to 5 ```cpp if constexpr (nullable) { ^ ``` **be/test/vec/function/function_test_util.h:358:** +1, nesting level increased to 5 ```cpp } else { ^ ``` **be/test/vec/function/function_test_util.h:363:** +1, nesting level increased to 4 ```cpp } else if constexpr (std::is_same_v<ReturnType, DataTypeFloat32> || ^ ``` **be/test/vec/function/function_test_util.h:368:** +1, nesting level increased to 4 ```cpp } else { ^ ``` **be/test/vec/function/function_test_util.h:375:** +2, including nesting penalty of 1, nesting level increased to 2 ```cpp if constexpr (nullable) { ^ ``` **be/test/vec/function/function_test_util.h:378:** +3, including nesting penalty of 2, nesting level increased to 3 ```cpp if (!is_null) { ^ ``` **be/test/vec/function/function_test_util.h:381:** +1, nesting level increased to 2 ```cpp } else { ^ ``` </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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org