14654 {
14655 if (info.type != AlterType::ALTER_SCALAR_FUNCTION) {
14656 throw InternalException("Attempting to alter ScalarFunctionCatalogEntry with unsupported alter type");
14657 }
14658 auto &function_info = info.Cast<AlterScalarFunctionInfo>();
14659 if (function_info.alter_scalar_function_type != AlterScalarFunctionType::ADD_FUNCTION_OVERLOADS) {
14660 throw InternalException(
14661 "Attempting to alter ScalarFunctionCatalogEntry with unsupported alter scalar function type");
14662 }
14663 auto &add_overloads = function_info.Cast<AddScalarFunctionOverloadInfo>();
14664
14666 if (!new_set.MergeFunctionSet(add_overloads.new_overloads->functions, true)) {
14667 throw BinderException(
14668 "Failed to add new function overloads to function \"%s\": function overload already exists", name);
14669 }
14670 CreateScalarFunctionInfo new_info(std::move(new_set));
14672 new_info.descriptions = descriptions;
14673 new_info.descriptions.insert(new_info.descriptions.end(), add_overloads.new_overloads->descriptions.begin(),
14674 add_overloads.new_overloads->descriptions.end());
14675 return make_uniq<ScalarFunctionCatalogEntry>(
catalog,
schema, new_info);
14676}
bool internal
Whether or not the entry is an internal entry (cannot be deleted, not dumped, etc)
Definition duckdb.hpp:6317