ClickHouse/tests/queries/0_stateless/01349_mutation_datetime_key.sql

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

22 lines
519 B
MySQL
Raw Normal View History

2020-06-27 20:01:40 +00:00
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;
2020-06-27 21:19:55 +00:00
ALTER TABLE cdp_orders DELETE WHERE order_time >= '2019-12-03 00:00:00';
2020-06-27 20:01:40 +00:00
SELECT * FROM cdp_orders;
DROP TABLE cdp_orders;