ChenMiaoi commented on code in PR #50151:
URL: https://github.com/apache/doris/pull/50151#discussion_r2056403234


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/scalar/JsonSearch.java:
##########
@@ -37,22 +37,42 @@ public class JsonSearch extends ScalarFunction implements 
ExplicitlyCastableSign
 
     public static final List<FunctionSignature> SIGNATURES = ImmutableList.of(
             FunctionSignature.ret(JsonType.INSTANCE)
-                    .args(VarcharType.SYSTEM_DEFAULT, 
VarcharType.SYSTEM_DEFAULT, VarcharType.SYSTEM_DEFAULT)
+                    .args(VarcharType.SYSTEM_DEFAULT, 
VarcharType.SYSTEM_DEFAULT, VarcharType.SYSTEM_DEFAULT),
+            FunctionSignature.ret(JsonType.INSTANCE)
+                    .args(VarcharType.SYSTEM_DEFAULT, 
VarcharType.SYSTEM_DEFAULT, VarcharType.SYSTEM_DEFAULT,
+                            VarcharType.SYSTEM_DEFAULT),
+            FunctionSignature.ret(JsonType.INSTANCE)
+                    .args(VarcharType.SYSTEM_DEFAULT, 
VarcharType.SYSTEM_DEFAULT, VarcharType.SYSTEM_DEFAULT,
+                            VarcharType.SYSTEM_DEFAULT, 
VarcharType.SYSTEM_DEFAULT)
     );
 
     public JsonSearch(Expression arg0, Expression arg1, Expression arg2) {
         super("json_search", arg0, arg1, arg2);
     }
 
+    public JsonSearch(Expression arg0, Expression arg1, Expression arg2, 
Expression arg3) {
+        super("json_search", arg0, arg1, arg2, arg3);
+    }
+
+    public JsonSearch(Expression arg0, Expression arg1, Expression arg2, 
Expression arg3, Expression arg4) {
+        super("json_search", arg0, arg1, arg2, arg3, arg4);
+    }
+
     @Override
     public List<FunctionSignature> getSignatures() {
         return SIGNATURES;
     }
 
     @Override
     public JsonSearch withChildren(List<Expression> children) {
-        Preconditions.checkArgument(children.size() == 3);
-        return new JsonSearch(children.get(0), children.get(1), 
children.get(2));
+        Preconditions.checkArgument(children.size() == 3 || children.size() == 
4 || children.size() == 5);
+        if (children.size() == 3) {
+            return new JsonSearch(children.get(0), children.get(1), 
children.get(2));
+        } else if (children.size() == 4) {

Review Comment:
   done the fe check



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