[opt](Nereids) auto fallback when meet udf override (#33708)

This commit is contained in:
morrySnow
2024-04-16 18:30:55 +08:00
committed by yiguolei
parent 81f7c53bad
commit db846709d2

View File

@ -154,7 +154,14 @@ public class FunctionRegistry {
}
if (candidateBuilders.size() > 1) {
String candidateHints = getCandidateHint(name, candidateBuilders);
// NereidsPlanner not supported override function by the same arity, should we support it?
// TODO: NereidsPlanner not supported override function by the same arity, we will support it later
if (ConnectContext.get() != null) {
try {
ConnectContext.get().getSessionVariable().enableFallbackToOriginalPlannerOnce();
} catch (Throwable t) {
// ignore error
}
}
throw new AnalysisException("Function '" + qualifiedName + "' is ambiguous: " + candidateHints);
}