Added test

This commit is contained in:
Alexey Milovidov 2020-01-31 05:07:02 +03:00
parent 54f1cea22c
commit 51f55b3eed
2 changed files with 22 additions and 0 deletions

View File

@ -0,0 +1,3 @@
1 2020-01-02
3 2020-01-02
4 2020-01-02

View File

@ -0,0 +1,19 @@
DROP TABLE IF EXISTS merge_tree;
CREATE TABLE merge_tree (d Date) ENGINE = MergeTree ORDER BY d PARTITION BY d;
INSERT INTO merge_tree VALUES ('2020-01-02');
SELECT 1, * FROM merge_tree;
-- ALTER TABLE merge_tree DROP PARTITION 2020-01-02; -- This does not even parse
-- SELECT 2, * FROM merge_tree;
ALTER TABLE merge_tree DROP PARTITION 20200102;
SELECT 3, * FROM merge_tree;
ALTER TABLE merge_tree DROP PARTITION '20200102'; -- { serverError 38 }
SELECT 4, * FROM merge_tree;
ALTER TABLE merge_tree DROP PARTITION '2020-01-02';
SELECT 5, * FROM merge_tree;
DROP TABLE merge_tree;