eldenmoon commented on code in PR #52724:
URL: https://github.com/apache/doris/pull/52724#discussion_r2191384439


##########
be/src/vec/functions/function_jsonb.cpp:
##########
@@ -1537,6 +1539,105 @@ struct JsonbContainsUtil {
     }
 };
 
+template <bool ignore_null>
+class FunctionJsonbArray : public IFunction {
+public:
+    static constexpr auto name = "json_array";
+    static constexpr auto alias = "jsonb_array";
+
+    static FunctionPtr create() { return 
std::make_shared<FunctionJsonbArray>(); }
+
+    String get_name() const override { return name; }
+
+    size_t get_number_of_arguments() const override { return 0; }
+    bool is_variadic() const override { return true; }
+
+    bool use_default_implementation_for_nulls() const override { return false; 
}
+
+    DataTypePtr get_return_type_impl(const DataTypes& arguments) const 
override {
+        return std::make_shared<DataTypeJsonb>();
+    }
+
+    Status execute_impl(FunctionContext* context, Block& block, const 
ColumnNumbers& arguments,
+                        uint32_t result, size_t input_rows_count) const 
override {
+        auto return_data_type = std::make_shared<DataTypeJsonb>();
+        DorisVector<JsonbWriter*> writers(input_rows_count);

Review Comment:
   why not just use DorisVector<JsonbWriter> writers(input_rows_count);



-- 
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]

Reply via email to