You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/12/07 02:39:36 UTC

[GitHub] [doris] github-actions[bot] commented on a diff in pull request #13741: [feature](split_by_string)support split by string function

github-actions[bot] commented on code in PR #13741:
URL: https://github.com/apache/doris/pull/13741#discussion_r1041693095


##########
be/src/vec/functions/function_string.h:
##########
@@ -1351,6 +1352,124 @@
     }
 };
 
+class FunctionSplitByString : public IFunction {
+public:
+    static constexpr auto name = "split_by_string";
+
+    static FunctionPtr create() { return std::make_shared<FunctionSplitByString>(); }
+    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 {
+        return std::make_shared<DataTypeArray>(make_nullable(arguments[0]));
+    }
+
+    Status execute_impl(FunctionContext* context, Block& block, const ColumnNumbers& arguments,
+                        size_t result, size_t input_rows_count) override {

Review Comment:
   warning: parameter 'input_rows_count' is unused [misc-unused-parameters]
   
   ```suggestion
                           size_t result, size_t  /*input_rows_count*/) override {
   ```
   



##########
be/src/vec/functions/function_string.h:
##########
@@ -1351,6 +1352,124 @@ class FunctionSplitPart : public IFunction {
     }
 };
 
+class FunctionSplitByString : public IFunction {
+public:
+    static constexpr auto name = "split_by_string";
+
+    static FunctionPtr create() { return std::make_shared<FunctionSplitByString>(); }
+    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 {
+        return std::make_shared<DataTypeArray>(make_nullable(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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org