Merge pull request #25274 from den-crane/tests/partition_by_multiply_by_zero

test for `PARTITION BY 0 * id`
This commit is contained in:
alexey-milovidov 2021-06-15 02:58:21 +03:00 committed by GitHub
commit 65f9473317
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 25 additions and 0 deletions

View File

@ -0,0 +1,2 @@
58
58

View File

@ -0,0 +1,23 @@
DROP TABLE IF EXISTS t_01906;
CREATE TABLE t_01906
(
`id` UInt64,
`update_ts` DateTime,
`value` UInt32
)
ENGINE = ReplacingMergeTree(update_ts)
PARTITION BY 0 * id
ORDER BY (update_ts, id);
INSERT INTO t_01906 SELECT
number,
toDateTime('2020-01-01 00:00:00'),
1
FROM numbers(100);
SELECT count() FROM t_01906 WHERE id >= 42;
SELECT count() FROM t_01906 FINAL WHERE id >= 42 and update_ts <= '2021-01-01 00:00:00';
DROP TABLE t_01906;