Kikyou1997 commented on code in PR #11842:
URL: https://github.com/apache/doris/pull/11842#discussion_r956611207


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/Expression.java:
##########
@@ -146,4 +153,34 @@ public boolean equals(Object o) {
     public int hashCode() {
         return 0;
     }
+
+    public List<DataType> getChildrenType() {
+        List<DataType> typeList = new ArrayList<>();
+        for (Expression child : children) {
+            typeList.add(child.getDataType());
+        }
+        return typeList;
+    }
+
+    /**
+     * Collect CatalogType of children.
+     * @return Catalog type array
+     */
+    public Type[] getChildrenCatalogType() {
+        int childrenSize = children.size();
+        Type[] typeList = new Type[childrenSize];
+        for (int i = 0; i < childrenSize; i++) {
+            typeList[i] = child(i).getDataType().toCatalogDataType();
+        }
+        return typeList;
+    }
+
+    protected Function getBuiltinFunction(String name, Type[] argTypes, 
Function.CompareMode mode)  {
+        FunctionName fnName = new FunctionName(name);
+        Function searchDesc = new Function(fnName, Arrays.asList(argTypes), 
Type.INVALID, false,
+                VectorizedUtil.isVectorized());
+        // TODO: process RAND function.
+        return Env.getCurrentEnv().getFunction(searchDesc, mode);
+    }
+

Review Comment:
   done



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