morningman commented on a change in pull request #2979: Incomplete support 
Array type (#2871)
URL: https://github.com/apache/incubator-doris/pull/2979#discussion_r386469025
 
 

 ##########
 File path: fe/src/main/java/org/apache/doris/rewrite/FEFunctions.java
 ##########
 @@ -421,4 +422,21 @@ public static LiteralExpr ifNullBigInt(LiteralExpr first, 
LiteralExpr second) th
     public static LiteralExpr ifNullDateTime(LiteralExpr first, LiteralExpr 
second) throws AnalysisException {
         return first instanceof NullLiteral ? second : first;
     }
+
+    /**
+     
------------------------------------------------------------------------------
+     */
+
+    /**
+     * Nest type function
+     */
+    @FEFunction(name = "array", argTypes = {"INT"}, returnType = "ARRAY")
+    public static LiteralExpr arrayInt(LiteralExpr... exprs) throws 
AnalysisException {
+        return new ArrayLiteral(exprs);
+    }
+
+    @FEFunction(name = "array", argTypes = {"VARCHAR"}, returnType = "ARRAY")
+    public static LiteralExpr array(StringLiteral... exprs) throws 
AnalysisException {
 
 Review comment:
   better to call arrayString()?

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

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

Reply via email to