mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-26 17:41:59 +00:00
fix flaky 02864_statistics_uniq
This commit is contained in:
parent
87b91c6115
commit
bcdbb4ce08
@ -1057,7 +1057,7 @@ bool AlterCommand::isRemovingProperty() const
|
||||
|
||||
bool AlterCommand::isDropSomething() const
|
||||
{
|
||||
return type == Type::DROP_COLUMN || type == Type::DROP_INDEX
|
||||
return type == Type::DROP_COLUMN || type == Type::DROP_INDEX || type == Type::DROP_STATISTICS
|
||||
|| type == Type::DROP_CONSTRAINT || type == Type::DROP_PROJECTION;
|
||||
}
|
||||
|
||||
|
@ -8083,6 +8083,13 @@ void MergeTreeData::checkDropCommandDoesntAffectInProgressMutations(const AlterC
|
||||
throw_exception(mutation_name, "column", command.column_name);
|
||||
}
|
||||
}
|
||||
else if (command.type == AlterCommand::DROP_STATISTICS)
|
||||
{
|
||||
for (const auto & stats_col1 : command.statistics_columns)
|
||||
for (const auto & stats_col2 : mutation_command.statistics_columns)
|
||||
if (stats_col1 == stats_col2)
|
||||
throw_exception(mutation_name, "statistics", stats_col1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1269,6 +1269,7 @@ MergeMutateSelectedEntryPtr StorageMergeTree::selectPartsToMutate(
|
||||
if (command.type != MutationCommand::Type::DROP_COLUMN
|
||||
&& command.type != MutationCommand::Type::DROP_INDEX
|
||||
&& command.type != MutationCommand::Type::DROP_PROJECTION
|
||||
&& command.type != MutationCommand::Type::DROP_STATISTICS
|
||||
&& command.type != MutationCommand::Type::RENAME_COLUMN)
|
||||
{
|
||||
commands_for_size_validation.push_back(command);
|
||||
|
@ -2,6 +2,7 @@ DROP TABLE IF EXISTS t1;
|
||||
|
||||
SET allow_experimental_statistics = 1;
|
||||
SET allow_statistics_optimize = 1;
|
||||
SET mutations_sync = 1;
|
||||
|
||||
CREATE TABLE t1
|
||||
(
|
||||
|
Loading…
Reference in New Issue
Block a user