Removed 'DELETE' keyword from default TTL syntax description.

This commit is contained in:
Vladimir Chebotarev 2019-10-31 16:50:56 +03:00
parent 58e824b6a1
commit 773bf7b35c
3 changed files with 3 additions and 3 deletions

View File

@ -20,7 +20,7 @@ void ASTTTLElement::formatImpl(const FormatSettings & settings, FormatState & st
}
else if (destination_type == TTLDestinationType::DELETE)
{
settings.ostr << " DELETE";
/// It would be better to output "DELETE" here but that will break compatibility with earlier versions.
}
}

View File

@ -1,4 +1,4 @@
CREATE TABLE default.ttl (`d` Date, `a` Int32) ENGINE = MergeTree PARTITION BY toDayOfMonth(d) ORDER BY a TTL d + toIntervalDay(1) DELETE SETTINGS index_granularity = 8192
CREATE TABLE default.ttl (`d` Date, `a` Int32) ENGINE = MergeTree PARTITION BY toDayOfMonth(d) ORDER BY a TTL d + toIntervalDay(1) SETTINGS index_granularity = 8192
2100-10-10 3
2100-10-10 4
d Date

View File

@ -1,3 +1,3 @@
200
400
CREATE TABLE test.ttl_repl2 (`d` Date, `x` UInt32) ENGINE = ReplicatedMergeTree(\'/clickhouse/tables/test/ttl_repl\', \'2\') PARTITION BY toDayOfMonth(d) ORDER BY x TTL d + toIntervalDay(1) DELETE SETTINGS index_granularity = 8192
CREATE TABLE test.ttl_repl2 (`d` Date, `x` UInt32) ENGINE = ReplicatedMergeTree(\'/clickhouse/tables/test/ttl_repl\', \'2\') PARTITION BY toDayOfMonth(d) ORDER BY x TTL d + toIntervalDay(1) SETTINGS index_granularity = 8192