Added a test for #8550

This commit is contained in:
Alexey Milovidov 2020-06-27 23:01:40 +03:00
parent 5ed815c63e
commit 1a1d1ef516
2 changed files with 22 additions and 0 deletions

View File

@ -0,0 +1 @@
hello world 2020-01-02 03:04:05

View File

@ -0,0 +1,21 @@
DROP TABLE IF EXISTS cdp_orders;
CREATE TABLE cdp_orders
(
`order_id` String,
`order_status` String,
`order_time` DateTime
)
ENGINE = ReplacingMergeTree()
PARTITION BY toYYYYMMDD(order_time)
ORDER BY (order_time, order_id)
SETTINGS index_granularity = 8192;
INSERT INTO cdp_orders VALUES ('hello', 'world', '2020-01-02 03:04:05');
SELECT * FROM cdp_orders;
SET mutations_sync = 1;
ALTER TABLE default.cdp_orders DELETE WHERE order_time >= '2019-12-03 00:00:00';
SELECT * FROM cdp_orders;
DROP TABLE cdp_orders;