mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-18 04:12:19 +00:00
fix failed stateless tests
This commit is contained in:
parent
eda299b48b
commit
d6247338de
@ -110,7 +110,7 @@ public:
|
|||||||
/// Note: we don't use toString because it will cause writeCString naming conflict in src/Dictionaries/MongoDBDictionarySource.cpp
|
/// Note: we don't use toString because it will cause writeCString naming conflict in src/Dictionaries/MongoDBDictionarySource.cpp
|
||||||
for (auto & hint : hints)
|
for (auto & hint : hints)
|
||||||
hint = "'" + hint + "'";
|
hint = "'" + hint + "'";
|
||||||
return !hints.empty() ? ", may be you meant: " + boost::algorithm::join(hints, ",") : "";
|
return !hints.empty() ? ", may be you meant: [" + boost::algorithm::join(hints, ",") + "]" : "";
|
||||||
}
|
}
|
||||||
|
|
||||||
IHints() = default;
|
IHints() = default;
|
||||||
|
@ -1046,8 +1046,10 @@ void AlterCommands::validate(const StorageInMemoryMetadata & metadata, ContextPt
|
|||||||
if (!all_columns.has(column_name))
|
if (!all_columns.has(column_name))
|
||||||
{
|
{
|
||||||
if (!command.if_exists)
|
if (!command.if_exists)
|
||||||
throw Exception{"Wrong column name. Cannot find column " + backQuote(column_name) + " to modify",
|
throw Exception{
|
||||||
ErrorCodes::NOT_FOUND_COLUMN_IN_BLOCK};
|
"Wrong column name. Cannot find column " + backQuote(column_name) + " to modify"
|
||||||
|
+ all_columns.getHintsString(column_name),
|
||||||
|
ErrorCodes::NOT_FOUND_COLUMN_IN_BLOCK};
|
||||||
else
|
else
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -1153,7 +1155,8 @@ void AlterCommands::validate(const StorageInMemoryMetadata & metadata, ContextPt
|
|||||||
}
|
}
|
||||||
else if (!command.if_exists)
|
else if (!command.if_exists)
|
||||||
throw Exception(
|
throw Exception(
|
||||||
"Wrong column name. Cannot find column " + backQuote(command.column_name) + " to drop",
|
"Wrong column name. Cannot find column " + backQuote(command.column_name) + " to drop"
|
||||||
|
+ all_columns.getHintsString(command.column_name),
|
||||||
ErrorCodes::NOT_FOUND_COLUMN_IN_BLOCK);
|
ErrorCodes::NOT_FOUND_COLUMN_IN_BLOCK);
|
||||||
}
|
}
|
||||||
else if (command.type == AlterCommand::COMMENT_COLUMN)
|
else if (command.type == AlterCommand::COMMENT_COLUMN)
|
||||||
@ -1161,8 +1164,10 @@ void AlterCommands::validate(const StorageInMemoryMetadata & metadata, ContextPt
|
|||||||
if (!all_columns.has(command.column_name))
|
if (!all_columns.has(command.column_name))
|
||||||
{
|
{
|
||||||
if (!command.if_exists)
|
if (!command.if_exists)
|
||||||
throw Exception{"Wrong column name. Cannot find column " + backQuote(command.column_name) + " to comment",
|
throw Exception{
|
||||||
ErrorCodes::NOT_FOUND_COLUMN_IN_BLOCK};
|
"Wrong column name. Cannot find column " + backQuote(command.column_name) + " to comment"
|
||||||
|
+ all_columns.getHintsString(command.column_name),
|
||||||
|
ErrorCodes::NOT_FOUND_COLUMN_IN_BLOCK};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (command.type == AlterCommand::MODIFY_SETTING || command.type == AlterCommand::RESET_SETTING)
|
else if (command.type == AlterCommand::MODIFY_SETTING || command.type == AlterCommand::RESET_SETTING)
|
||||||
@ -1196,8 +1201,10 @@ void AlterCommands::validate(const StorageInMemoryMetadata & metadata, ContextPt
|
|||||||
if (!all_columns.has(command.column_name))
|
if (!all_columns.has(command.column_name))
|
||||||
{
|
{
|
||||||
if (!command.if_exists)
|
if (!command.if_exists)
|
||||||
throw Exception{"Wrong column name. Cannot find column " + backQuote(command.column_name) + " to rename",
|
throw Exception{
|
||||||
ErrorCodes::NOT_FOUND_COLUMN_IN_BLOCK};
|
"Wrong column name. Cannot find column " + backQuote(command.column_name) + " to rename"
|
||||||
|
+ all_columns.getHintsString(command.column_name),
|
||||||
|
ErrorCodes::NOT_FOUND_COLUMN_IN_BLOCK};
|
||||||
else
|
else
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user