morrySnow commented on code in PR #24156:
URL: https://github.com/apache/doris/pull/24156#discussion_r1322747581


##########
regression-test/data/nereids_p0/json_p0/test_json.csv:
##########
@@ -0,0 +1,25 @@
+1      \N
+2      null
+3      true

Review Comment:
   add all jsonb function test in 
regression-test/suites/nereids_function_p0/scalar_function



##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/CheckDataTypes.java:
##########
@@ -95,8 +95,6 @@ private void checkTypes(DataType dataType) {
                 checkTypes(((MapType) dataType).getValueType());
             } else if (dataType instanceof StructType) {
                 ((StructType) dataType).getFields().forEach(f -> 
this.checkTypes(f.getDataType()));
-            } else if (UNSUPPORTED_TYPE.contains(dataType.getClass())) {
-                throw new AnalysisException(String.format("type %s is 
unsupported for Nereids", dataType));

Review Comment:
   should not remove this



##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/scalar/JsonbExtract.java:
##########
@@ -39,24 +40,25 @@ public class JsonbExtract extends ScalarFunction
         implements BinaryExpression, ExplicitlyCastableSignature, 
AlwaysNullable {
 
     public static final List<FunctionSignature> SIGNATURES = ImmutableList.of(
-            FunctionSignature.ret(JsonType.INSTANCE).args(JsonType.INSTANCE, 
VarcharType.SYSTEM_DEFAULT),
-            FunctionSignature.ret(JsonType.INSTANCE).args(JsonType.INSTANCE, 
StringType.INSTANCE)
+            
FunctionSignature.ret(JsonType.INSTANCE).varArgs(JsonType.INSTANCE, 
VarcharType.SYSTEM_DEFAULT),
+            
FunctionSignature.ret(JsonType.INSTANCE).varArgs(JsonType.INSTANCE, 
StringType.INSTANCE)
     );
 
     /**
-     * constructor with 2 arguments.
+     * constructor with 2 or more arguments.
      */
-    public JsonbExtract(Expression arg0, Expression arg1) {
-        super("jsonb_extract", arg0, arg1);
+    public JsonbExtract(Expression arg0, Expression arg1, Expression... 
varArgs) {
+        super("jsonb_extract", ExpressionUtils.mergeArguments(arg0, arg1, 
varArgs));
     }
 
     /**
      * withChildren.
      */
     @Override
     public JsonbExtract withChildren(List<Expression> children) {
-        Preconditions.checkArgument(children.size() == 2);
-        return new JsonbExtract(children.get(0), children.get(1));
+        Preconditions.checkArgument(children.size() >= 2);

Review Comment:
   add check msg



##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/visitor/ScalarFunctionVisitor.java:
##########
@@ -1072,6 +1073,10 @@ default R 
visitJsonbParseNullableErrorToValue(JsonbParseNullableErrorToValue fun
         return visitScalarFunction(function, context);
     }
 
+    default R visitJsonbValid(JsonbValid jsonbValid, C context) {

Review Comment:
   add in lexicographical order



-- 
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-unsubscr...@doris.apache.org

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


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

Reply via email to