| 128 | |
| 129 | template <class T> |
| 130 | optional_idx FunctionBinder::MultipleCandidateException(const string &catalog_name, const string &schema_name, |
| 131 | const string &name, FunctionSet<T> &functions, |
| 132 | vector<idx_t> &candidate_functions, |
| 133 | const vector<LogicalType> &arguments, ErrorData &error) { |
| 134 | D_ASSERT(functions.functions.size() > 1); |
| 135 | // there are multiple possible function definitions |
| 136 | // throw an exception explaining which overloads are there |
| 137 | string call_str = Function::CallToString(catalog_name, schema_name, name, arguments); |
| 138 | string candidate_str; |
| 139 | for (auto &conf : candidate_functions) { |
| 140 | T f = functions.GetFunctionByOffset(conf); |
| 141 | candidate_str += "\t" + f.ToString() + "\n"; |
| 142 | } |
| 143 | error = ErrorData( |
| 144 | ExceptionType::BINDER, |
| 145 | StringUtil::Format("Could not choose a best candidate function for the function call \"%s\". In order to " |
| 146 | "select one, please add explicit type casts.\n\tCandidate functions:\n%s", |
| 147 | call_str, candidate_str)); |
| 148 | return optional_idx(); |
| 149 | } |
| 150 | |
| 151 | template <class T> |
| 152 | optional_idx FunctionBinder::BindFunctionFromArguments(const string &name, FunctionSet<T> &functions, |
nothing calls this directly
no test coverage detected