mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 00:22:29 +00:00
Added a test for #8550
This commit is contained in:
parent
5ed815c63e
commit
1a1d1ef516
@ -0,0 +1 @@
|
|||||||
|
hello world 2020-01-02 03:04:05
|
21
tests/queries/0_stateless/01349_mutation_datetime_key.sql
Normal file
21
tests/queries/0_stateless/01349_mutation_datetime_key.sql
Normal 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;
|
Loading…
Reference in New Issue
Block a user