github-actions[bot] commented on code in PR #24631:
URL: https://github.com/apache/doris/pull/24631#discussion_r1334280728
##########
be/test/vec/function/function_jsonb_test.cpp:
##########
@@ -1487,4 +1487,148 @@ TEST(FunctionJsonbTEST, JsonbCastFromOtherTest) {
"CAST", {Notnull {TypeIndex::String}, ConstedNotnull
{TypeIndex::JSONB}},
{{{STRING(R"("abcd")"), Null()}, STRING(R"("abcd")")}});
}
+
+TEST(FunctionJsonbTEST, GetJSONSTRINGTest) {
+ std::string func_name = "get_json_string";
+ InputTypeSet input_types = {TypeIndex::JSONB, TypeIndex::String};
Review Comment:
warning: variable 'input_types' is not initialized
[cppcoreguidelines-init-variables]
```suggestion
InputTypeSet input_types = 0 = {TypeIndex::JSONB, TypeIndex::String};
```
##########
be/src/vec/functions/function_jsonb.cpp:
##########
@@ -352,6 +353,13 @@ class FunctionJsonbExtract : public IFunction {
DataTypePtr get_return_type_impl(const DataTypes& arguments) const
override {
return make_nullable(std::make_shared<typename Impl::ReturnType>());
}
+ DataTypes get_variadic_argument_types_impl() const override {
Review Comment:
warning: function 'get_variadic_argument_types_impl' should be marked
[[nodiscard]] [modernize-use-nodiscard]
```suggestion
[[nodiscard]] DataTypes get_variadic_argument_types_impl() const
override {
```
##########
be/test/vec/function/function_jsonb_test.cpp:
##########
@@ -1487,4 +1487,148 @@ TEST(FunctionJsonbTEST, JsonbCastFromOtherTest) {
"CAST", {Notnull {TypeIndex::String}, ConstedNotnull
{TypeIndex::JSONB}},
{{{STRING(R"("abcd")"), Null()}, STRING(R"("abcd")")}});
}
+
+TEST(FunctionJsonbTEST, GetJSONSTRINGTest) {
+ std::string func_name = "get_json_string";
+ InputTypeSet input_types = {TypeIndex::JSONB, TypeIndex::String};
+
+ // get json from root
+ DataSet data_set = {
Review Comment:
warning: variable 'data_set' is not initialized
[cppcoreguidelines-init-variables]
```suggestion
DataSet data_set = 0 = {
```
##########
be/src/vec/functions/function_totype.h:
##########
@@ -385,6 +386,14 @@ class FunctionBinaryStringOperateToNullType : public
IFunction {
DataTypePtr get_return_type_impl(const DataTypes& arguments) const
override {
return make_nullable(std::make_shared<typename Impl::ReturnType>());
}
+
+ DataTypes get_variadic_argument_types_impl() const override {
Review Comment:
warning: function 'get_variadic_argument_types_impl' should be marked
[[nodiscard]] [modernize-use-nodiscard]
```suggestion
[[nodiscard]] DataTypes get_variadic_argument_types_impl() const
override {
```
--
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]