Merge pull request #33658 from den-crane/tests/issue_33592

test for #33592
This commit is contained in:
Maksim Kita 2022-01-15 14:31:21 +01:00 committed by GitHub
commit 998b330507
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 23 additions and 0 deletions

View File

@ -0,0 +1,6 @@
1970-01-01
1970-01-01
1970-01-01
1970-01-04
1
1

View File

@ -0,0 +1,17 @@
SELECT toStartOfWeek(toDateTime('1970-01-01 00:00:00', 'UTC'));
SELECT toStartOfWeek(toDateTime('1970-01-01 00:00:00', 'Europe/Moscow'));
SELECT toStartOfWeek(toDateTime('1970-01-01 00:00:00', 'Canada/Atlantic'));
SELECT toStartOfWeek(toDateTime('1970-01-04 00:00:00'));
DROP TABLE IF EXISTS t02176;
CREATE TABLE t02176(timestamp DateTime) ENGINE = MergeTree
PARTITION BY toStartOfWeek(timestamp)
ORDER BY tuple();
INSERT INTO t02176 VALUES (1559952000);
SELECT count() FROM t02176 WHERE timestamp >= toDateTime('1970-01-01 00:00:00');
SELECT count() FROM t02176 WHERE identity(timestamp) >= toDateTime('1970-01-01 00:00:00');
DROP TABLE t02176;