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


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/scalar/ArrayMap.java:
##########
@@ -66,6 +66,13 @@ public ArrayMap withChildren(List<Expression> children) {
     public DataType getDataType() {
         Preconditions.checkArgument(children.get(0) instanceof Lambda,
                 "The first arg of array_map must be lambda");
+        Preconditions.checkArgument(children.size() > 1,
+                "The args of array_map must more than 1");
+        // children after lambda must be array
+        for (int i = 1; i < children.size(); i++) {
+            Preconditions.checkArgument(children.get(i).getDataType() 
instanceof ArrayType,
+                    "The next arg of array_map must be array");

Review Comment:
   here is no need to add this check , because child of lambda is 
ArrayItemReference, which already has type limit 



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