mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 23:52:03 +00:00
Add RESET_SETTING to check if is a settings alter
This commit is contained in:
parent
ba7c3c5eae
commit
0a35a072d9
@ -509,7 +509,7 @@ bool ASTAlterQuery::isOneCommandTypeOnly(const ASTAlterCommand::Type & type) con
|
||||
|
||||
bool ASTAlterQuery::isSettingsAlter() const
|
||||
{
|
||||
return isOneCommandTypeOnly(ASTAlterCommand::MODIFY_SETTING);
|
||||
return isOneCommandTypeOnly(ASTAlterCommand::MODIFY_SETTING) || isOneCommandTypeOnly(ASTAlterCommand::RESET_SETTING);
|
||||
}
|
||||
|
||||
bool ASTAlterQuery::isFreezeAlter() const
|
||||
|
@ -52,3 +52,14 @@ def test_default_database_on_cluster(started_cluster):
|
||||
database="test_default_database",
|
||||
sql="SHOW CREATE test_local_table FORMAT TSV",
|
||||
).endswith("old_parts_lifetime = 100\n")
|
||||
|
||||
ch1.query(
|
||||
database="test_default_database",
|
||||
sql="ALTER TABLE test_local_table ON CLUSTER 'cluster' RESET SETTING old_parts_lifetime;",
|
||||
)
|
||||
|
||||
for node in [ch1, ch2]:
|
||||
assert not node.query(
|
||||
database="test_default_database",
|
||||
sql="SHOW CREATE test_local_table FORMAT TSV",
|
||||
).endswith("old_parts_lifetime = 100\n")
|
||||
|
Loading…
Reference in New Issue
Block a user