Improve exception in ALTER query

This commit is contained in:
Nikolay Degterinsky 2023-08-09 21:40:06 +00:00
parent abc48a0b73
commit f2c3000a93
3 changed files with 8 additions and 0 deletions

View File

@ -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,

View 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;