Compare commits

...

3 Commits

Author SHA1 Message Date
Duc Canh Le
add4f74f48
Merge 64525044fb into 7fd2207626 2024-09-18 13:53:10 +02:00
Duc Canh Le
64525044fb Merge branch 'master' into fix_remove_settings_coredump
Fix CI
2024-09-18 09:19:39 +00:00
Duc Canh Le
8b2404e2b2 fix coredump when remove column settings on special columns
Signed-off-by: Duc Canh Le <duccanh.le@ahrefs.com>
2024-09-16 13:48:47 +00:00
2 changed files with 10 additions and 0 deletions

View File

@ -1488,6 +1488,11 @@ void AlterCommands::validate(const StoragePtr & table, ContextPtr context) const
ErrorCodes::BAD_ARGUMENTS,
"Column {} doesn't have COMMENT, cannot remove it",
backQuote(column_name));
if (command.to_remove == AlterCommand::RemoveProperty::SETTINGS && column_from_table.settings.empty())
throw Exception(
ErrorCodes::BAD_ARGUMENTS,
"Column {} doesn't have SETTINGS, cannot remove it",
backQuote(column_name));
}
modified_columns.emplace(column_name);

View File

@ -71,3 +71,8 @@ CREATE TABLE tab
ENGINE = MergeTree
ORDER BY id
SETTINGS min_bytes_for_wide_part = 1; -- {serverError UNKNOWN_SETTING}
-- https://github.com/ClickHouse/ClickHouse/issues/69634
CREATE TABLE t0 (c0 Int8) ENGINE = CollapsingMergeTree(c0) ORDER BY tuple();
ALTER TABLE t0 MODIFY COLUMN c0 REMOVE SETTINGS; -- {serverError BAD_ARGUMENTS}
DROP TABLE t0;