zclllyybb commented on code in PR #33055: URL: https://github.com/apache/doris/pull/33055#discussion_r1548815822
########## be/src/vec/functions/function_string.cpp: ########## @@ -57,6 +57,25 @@ struct StringASCII { } }; +struct NameQuote { + static constexpr auto name = "quote"; +}; + +struct NameQuoteImpl { + static Status vector(const ColumnString::Chars& data, const ColumnString::Offsets& offsets, + ColumnString::Chars& res_data, ColumnString::Offsets& res_offsets) { + size_t offset_size = offsets.size(); + res_offsets.resize(offset_size); + res_data.reserve(data.size() + offset_size * 2); + for (int i = 0; i < offset_size; i++) { + ColumnString::Offset size = offsets[i] - offsets[i - 1]; + StringOP::push_value_string_with_single_quotes(&data[offsets[i - 1]], size, i, res_data, Review Comment: this function is only used here, you should: 1. don't wrap it in a new function. just coding here. 2. or, introduce a new function using template to accept variadic arguments -- 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