github-actions[bot] commented on code in PR #40162: URL: https://github.com/apache/doris/pull/40162#discussion_r1740437030
########## be/src/vec/functions/function_string.h: ########## @@ -1556,86 +1556,110 @@ class FunctionStringPad : public IFunction { const auto* padcol = assert_cast<const ColumnString*>(col[2].get()); const auto& padcol_offsets = padcol->get_offsets(); const auto& padcol_chars = padcol->get_chars(); + std::visit( + [&](auto str_const, auto len_const, auto pad_const) { + execute_utf8<str_const, len_const, pad_const>( + strcol_offsets, strcol_chars, col_len_data, padcol_offsets, + padcol_chars, res_offsets, res_chars, null_map_data, input_rows_count); + }, + vectorized::make_bool_variant(col_const[0]), + vectorized::make_bool_variant(col_const[1]), + vectorized::make_bool_variant(col_const[2])); - std::vector<size_t> str_index; + block.get_by_position(result).column = + ColumnNullable::create(std::move(res), std::move(null_map)); + return Status::OK(); + } + + template <bool str_const, bool len_const, bool pad_const> + void execute_utf8(const ColumnString::Offsets& strcol_offsets, Review Comment: warning: function 'execute_utf8' exceeds recommended size/complexity thresholds [readability-function-size] ```cpp void execute_utf8(const ColumnString::Offsets& strcol_offsets, ^ ``` <details> <summary>Additional context</summary> **be/src/vec/functions/function_string.h:1574:** 82 lines including whitespace and comments (threshold 80) ```cpp void execute_utf8(const ColumnString::Offsets& strcol_offsets, ^ ``` </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