You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@doris.apache.org by GitBox <gi...@apache.org> on 2019/07/03 01:15:22 UTC

[GitHub] [incubator-doris] morningman commented on a change in pull request #1418: Set stmt support Expr

morningman commented on a change in pull request #1418: Set stmt support Expr
URL: https://github.com/apache/incubator-doris/pull/1418#discussion_r299743123
 
 

 ##########
 File path: fe/src/main/java/org/apache/doris/analysis/ExpressionFunctions.java
 ##########
 @@ -162,13 +160,52 @@ public FEFunctionSignature getSignature() {
             return signature;
         }
 
+        // Now we only support functions which contain only one variable-length arg or fixed-length args 
+        // which does't contain any arrays.
         public LiteralExpr invoke(List<Expr> args) throws AnalysisException {
+            boolean isArray = false;
+            for (Class<?> argType : method.getParameterTypes()) {
+                if (argType.isArray()) {
+                    Preconditions.checkArgument(method.getParameterTypes().length == 1);
 
 Review comment:
   Why using Preconditions, not throw an exception?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@doris.apache.org
For additional commands, e-mail: dev-help@doris.apache.org