xy720 commented on code in PR #31312: URL: https://github.com/apache/doris/pull/31312#discussion_r1504019968
########## fe/fe-core/src/main/java/org/apache/doris/catalog/FunctionSet.java: ########## @@ -495,6 +495,12 @@ public static boolean isCastMatchAllowed(Function desc, Function candicate) { return false; } } + if (FunctionCallExpr.STRING_SEARCH_FUNCTION_SET.contains(desc.functionName())) { + if (descArgTypes[1].isStringType() && candicateArgTypes[1].isArrayType()) { + // The needles arg of search functions should not be allowed to cast from string. Review Comment: because the cast function wrapped a nullable layer above the result type when it encountered a string input. -- 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