morrySnow commented on code in PR #10847: URL: https://github.com/apache/doris/pull/10847#discussion_r921033403
########## fe/fe-core/src/main/java/org/apache/doris/analysis/FunctionCallExpr.java: ########## @@ -1303,7 +1303,24 @@ public void finalizeImplForNereids() throws AnalysisException { fn = getBuiltinFunction(fnName.getFunction(), new Type[]{childType}, Function.CompareMode.IS_NONSTRICT_SUPERTYPE_OF); type = fn.getReturnType(); + } else if (fnName.getFunction().equalsIgnoreCase("substring")) { + Type[] childTypes = getChildren().stream().map(t -> t.type).toArray(Type[]::new); + fn = getBuiltinFunction(fnName.getFunction(), childTypes, Function.CompareMode.IS_NONSTRICT_SUPERTYPE_OF); + type = fn.getReturnType(); + } + if (!fn.getFunctionName().getFunction().equals(ELEMENT_EXTRACT_FN_NAME)) { + Type[] args = fn.getArgs(); + // Implicitly cast all the children to match the function if necessary Review Comment: cast child should happen in nereids -- 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