morrySnow commented on code in PR #28233: URL: https://github.com/apache/doris/pull/28233#discussion_r1427637649
########## fe/fe-core/src/main/java/org/apache/doris/catalog/FunctionTypeDeducers.java: ########## @@ -23,26 +23,48 @@ import java.util.List; public class FunctionTypeDeducers { - public interface TypeDeducer { - public Type deduce(Type[] args); + public Type deduce(int argIdx, Type[] args); } public static final ImmutableMap<String, TypeDeducer> DEDUCERS = ImmutableMap.<String, TypeDeducer>builder() .put("named_struct", new NamedStructDeducer()) .put("struct_element", new StructElementDeducer()) + .put("array_contains", new ArrayElemFuncDeducer()) + .put("array_pushback", new ArrayElemFuncDeducer()) + .put("element_at", new ArrayElemFuncDeducer()) .build(); - public static Type deduce(String fnName, Type[] args) { + public static Type deduce(String fnName, int argIdx, Type[] args) { if (DEDUCERS.containsKey(fnName)) { - return DEDUCERS.get(fnName).deduce(args); + return DEDUCERS.get(fnName).deduce(argIdx, args); } return null; } + public static class ArrayElemFuncDeducer implements TypeDeducer { Review Comment: i think u should add some comments for this function -- 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