amorynan commented on code in PR #50308:
URL: https://github.com/apache/doris/pull/50308#discussion_r2055171446


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/scalar/JsonInsert.java:
##########
@@ -47,6 +44,21 @@ public JsonInsert(Expression arg0, Expression arg1, 
Expression arg2, Expression.
         super("json_insert", ExpressionUtils.mergeArguments(arg0, arg1, arg2, 
varArgs));
     }
 
+    @Override
+    public FunctionSignature customSignature() {
+        List<DataType> arguments = new ArrayList<>();
+        arguments.add(VarcharType.SYSTEM_DEFAULT); // json_str
+        for (int i = 1; i < arity(); i++) {
+            if ((i & 1) == 0 && (getArgumentType(i).isComplexType() || 
getArgumentType(i).isJsonType())) {

Review Comment:
   (i & 1) == 0 determines the even position, which exactly corresponds to the 
position of the value parameter. pass the origin value type to BE and should 
not cast to varchar 



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