mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 15:42:02 +00:00
Improve exception in ALTER query
This commit is contained in:
parent
abc48a0b73
commit
f2c3000a93
@ -3166,6 +3166,10 @@ void MergeTreeData::checkAlterIsPossible(const AlterCommands & commands, Context
|
||||
}
|
||||
}
|
||||
|
||||
if (command.type == AlterCommand::MODIFY_QUERY)
|
||||
throw Exception(ErrorCodes::NOT_IMPLEMENTED,
|
||||
"ALTER MODIFY QUERY is not supported by MergeTree engines family");
|
||||
|
||||
if (command.type == AlterCommand::MODIFY_ORDER_BY && !is_custom_partitioned)
|
||||
{
|
||||
throw Exception(ErrorCodes::BAD_ARGUMENTS,
|
||||
|
4
tests/queries/0_stateless/02834_alter_exception.sql
Normal file
4
tests/queries/0_stateless/02834_alter_exception.sql
Normal file
@ -0,0 +1,4 @@
|
||||
DROP TABLE IF EXISTS alter_02834;
|
||||
CREATE TABLE alter_02834 (a UInt64) ENGINE=MergeTree() ORDER BY a;
|
||||
ALTER TABLE alter_02834 MODIFY QUERY SELECT a FROM alter_02834; -- { serverError NOT_IMPLEMENTED }
|
||||
DROP TABLE alter_02834;
|
Loading…
Reference in New Issue
Block a user