mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-26 01:22:04 +00:00
Better exception message in case of duplicate dictionary
This commit is contained in:
parent
4555d1398c
commit
cfeaea2627
@ -286,7 +286,9 @@ void DatabaseOnDisk::createDictionary(
|
|||||||
String full_name = database.getDatabaseName() + "." + dictionary_name;
|
String full_name = database.getDatabaseName() + "." + dictionary_name;
|
||||||
auto & external_loader = const_cast<ExternalDictionariesLoader &>(context.getExternalDictionariesLoader());
|
auto & external_loader = const_cast<ExternalDictionariesLoader &>(context.getExternalDictionariesLoader());
|
||||||
if (external_loader.getCurrentStatus(full_name) != ExternalLoader::Status::NOT_EXIST)
|
if (external_loader.getCurrentStatus(full_name) != ExternalLoader::Status::NOT_EXIST)
|
||||||
throw Exception("Dictionary " + backQuote(full_name) + " already exists.", ErrorCodes::DICTIONARY_ALREADY_EXISTS);
|
throw Exception(
|
||||||
|
"Dictionary " + backQuote(database.getDatabaseName()) + "." + backQuote(dictionary_name) + " already exists.",
|
||||||
|
ErrorCodes::DICTIONARY_ALREADY_EXISTS);
|
||||||
|
|
||||||
if (database.isTableExist(context, dictionary_name))
|
if (database.isTableExist(context, dictionary_name))
|
||||||
throw Exception("Table " + backQuote(database.getDatabaseName()) + "." + backQuote(dictionary_name) + " already exists.", ErrorCodes::TABLE_ALREADY_EXISTS);
|
throw Exception("Table " + backQuote(database.getDatabaseName()) + "." + backQuote(dictionary_name) + " already exists.", ErrorCodes::TABLE_ALREADY_EXISTS);
|
||||||
|
Loading…
Reference in New Issue
Block a user