github-actions[bot] commented on code in PR #33243:
URL: https://github.com/apache/doris/pull/33243#discussion_r1561992220
##########
be/src/vec/functions/function_string.h:
##########
@@ -3914,4 +3914,108 @@ class FunctionIntToChar : public IFunction {
#endif
}
};
+
+class FunctionStrInsert : public IFunction {
+public:
+ static constexpr auto name = "str_insert";
+ static FunctionPtr create() { return
std::make_shared<FunctionStrInsert>(); }
+ String get_name() const override { return name; }
+ size_t get_number_of_arguments() const override { return 4; }
+
+ DataTypePtr get_return_type_impl(const DataTypes& arguments) const
override {
+ return std::make_shared<DataTypeString>();
+ }
+
+ Status execute_impl(FunctionContext* context, Block& block, const
ColumnNumbers& arguments,
Review Comment:
warning: method 'execute_impl' can be made static
[readability-convert-member-functions-to-static]
```suggestion
String>();static
```
be/src/vec/functions/function_string.h:3930:
```diff
- const override {
+ override {
```
##########
be/test/vec/function/function_string_test.cpp:
##########
@@ -1199,6 +1199,250 @@ TEST(function_string_test, function_uuid_test) {
}
}
+TEST(function_string_test, function_str_insert_test) {
+ std::string func_name = "str_insert";
+ {
+ InputTypeSet input_types = {
+ TypeIndex::String,
+ TypeIndex::Int32,
+ TypeIndex::Int32,
+ TypeIndex::String,
+ };
+ DataSet data_set = {
+ {{
+ Null(),
Review Comment:
warning: function 'TEST' exceeds recommended size/complexity thresholds
[readability-function-size]
```cpp
^
```
<details>
<summary>Additional context</summary>
**be/test/vec/function/function_string_test.cpp:1212:** 243 lines including
whitespace and comments (threshold 80)
```cpp
^
```
</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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]