github-actions[bot] commented on code in PR #14216:
URL: https://github.com/apache/doris/pull/14216#discussion_r1039392700
##########
be/src/vec/functions/function_string.h:
##########
@@ -1351,6 +1352,137 @@ class FunctionSplitPart : public IFunction {
}
};
+class FunctionSplitByChar : public IFunction {
+public:
+ static constexpr auto name = "split_by_char";
+
+ static FunctionPtr create() { return
std::make_shared<FunctionSplitByChar>(); }
+ using NullMapType = PaddedPODArray<UInt8>;
+
+ String get_name() const override { return name; }
+
+ bool is_variadic() const override { return false; }
+
+ size_t get_number_of_arguments() const override { return 2; }
+
+ DataTypePtr get_return_type_impl(const DataTypes& arguments) const
override {
+ DCHECK(is_string(arguments[0]))
+ << "first argument for function: " << name << " should be
string"
+ << " and arguments[0] is " << arguments[0]->get_name();
+ DCHECK(is_string(arguments[1]))
+ << "second argument for function: " << name << " should be
char"
+ << " and arguments[1] is " << arguments[1]->get_name();
+ return std::make_shared<DataTypeArray>(arguments[0]);
+ }
+
+ Status execute_impl(FunctionContext* context, Block& block, const
ColumnNumbers& arguments,
Review Comment:
warning: parameter 'context' is unused [misc-unused-parameters]
```suggestion
Status execute_impl(FunctionContext* /*context*/, Block& block, const
ColumnNumbers& 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: [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]