From c6eb11aad5ad4f74dcd0cc3c3dcc2b358da2698b Mon Sep 17 00:00:00 2001 From: Vitaliy Lyudvichenko Date: Sat, 15 Jul 2017 00:51:52 +0300 Subject: [PATCH] Use more suitable method hasRealColumn. [#CLICKHOUSE-2896] --- dbms/src/Interpreters/InterpreterAlterQuery.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbms/src/Interpreters/InterpreterAlterQuery.cpp b/dbms/src/Interpreters/InterpreterAlterQuery.cpp index 53e8e44503e..2834fb4636a 100644 --- a/dbms/src/Interpreters/InterpreterAlterQuery.cpp +++ b/dbms/src/Interpreters/InterpreterAlterQuery.cpp @@ -240,7 +240,7 @@ void InterpreterAlterQuery::PartitionCommands::validate(const IStorage * table) { String column_name = command.column_name.safeGet(); - 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);