mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-27 01:51:59 +00:00
Use more suitable method hasRealColumn. [#CLICKHOUSE-2896]
This commit is contained in:
parent
9ce4ff4c5b
commit
c6eb11aad5
@ -240,7 +240,7 @@ void InterpreterAlterQuery::PartitionCommands::validate(const IStorage * table)
|
||||
{
|
||||
String column_name = command.column_name.safeGet<String>();
|
||||
|
||||
if (table->getColumnsList().filter(Names{column_name}).empty())
|
||||
if (!table->hasRealColumn(column_name))
|
||||
{
|
||||
throw Exception("Wrong column name. Cannot find column " + column_name + " to clear it from partition",
|
||||
DB::ErrorCodes::ILLEGAL_COLUMN);
|
||||
|
Loading…
Reference in New Issue
Block a user