Add a test case for monotonicity totimezone

This commit is contained in:
huangzhaowei 2021-07-15 10:39:34 +08:00
parent d9f490a300
commit d5e907ac8d
2 changed files with 7 additions and 0 deletions

View File

@ -0,0 +1,6 @@
DROP TABLE IF EXISTS totimezone_op_mono;
CREATE TABLE totimezone_op_mono(i int, tz String, create_time DateTime) ENGINE MergeTree PARTITION BY toDate(create_time) ORDER BY i;
INSERT INTO totimezone_op_mono VALUES (1, 'UTC', toDateTime('2020-09-01 00:00:00', 'UTC')), (2, 'UTC', toDateTime('2020-09-02 00:00:00', 'UTC'));
SET max_rows_to_read = 1;
SELECT count() FROM totimezone_op_mono WHERE toTimeZone(create_time, 'UTC') = '2020-09-01 00:00:00';
DROP TABLE IF EXISTS totimezone_op_mono;