mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-28 18:42:26 +00:00
Extend 02763_last_day_of_week test: add Date32 and DateTime64 types
This commit is contained in:
parent
03ca3f96d2
commit
d19d36aad1
@ -1,10 +1,10 @@
|
||||
2018-12-25 2018-12-25 00:00:00 2018-12-29 2018-12-29 2018-12-30 2018-12-30
|
||||
2018-12-26 2018-12-26 00:00:00 2018-12-29 2018-12-29 2018-12-30 2018-12-30
|
||||
2018-12-27 2018-12-27 00:00:00 2018-12-29 2018-12-29 2018-12-30 2018-12-30
|
||||
2018-12-28 2018-12-28 00:00:00 2018-12-29 2018-12-29 2018-12-30 2018-12-30
|
||||
2018-12-29 2018-12-29 00:00:00 2018-12-29 2018-12-29 2018-12-30 2018-12-30
|
||||
2018-12-30 2018-12-30 00:00:00 2019-01-05 2019-01-05 2018-12-30 2018-12-30
|
||||
2018-12-31 2018-12-31 00:00:00 2019-01-05 2019-01-05 2019-01-06 2019-01-06
|
||||
2019-01-01 2019-01-01 00:00:00 2019-01-05 2019-01-05 2019-01-06 2019-01-06
|
||||
2019-01-02 2019-01-02 00:00:00 2019-01-05 2019-01-05 2019-01-06 2019-01-06
|
||||
2019-01-03 2019-01-03 00:00:00 2019-01-05 2019-01-05 2019-01-06 2019-01-06
|
||||
2018-12-25 00:00:00 2018-12-29 2018-12-29 2018-12-29 2018-12-29 2018-12-30 2018-12-30 2018-12-30 2018-12-30
|
||||
2018-12-26 00:00:00 2018-12-29 2018-12-29 2018-12-29 2018-12-29 2018-12-30 2018-12-30 2018-12-30 2018-12-30
|
||||
2018-12-27 00:00:00 2018-12-29 2018-12-29 2018-12-29 2018-12-29 2018-12-30 2018-12-30 2018-12-30 2018-12-30
|
||||
2018-12-28 00:00:00 2018-12-29 2018-12-29 2018-12-29 2018-12-29 2018-12-30 2018-12-30 2018-12-30 2018-12-30
|
||||
2018-12-29 00:00:00 2018-12-29 2018-12-29 2018-12-29 2018-12-29 2018-12-30 2018-12-30 2018-12-30 2018-12-30
|
||||
2018-12-30 00:00:00 2019-01-05 2019-01-05 2019-01-05 2019-01-05 2018-12-30 2018-12-30 2018-12-30 2018-12-30
|
||||
2018-12-31 00:00:00 2019-01-05 2019-01-05 2019-01-05 2019-01-05 2019-01-06 2019-01-06 2019-01-06 2019-01-06
|
||||
2019-01-01 00:00:00 2019-01-05 2019-01-05 2019-01-05 2019-01-05 2019-01-06 2019-01-06 2019-01-06 2019-01-06
|
||||
2019-01-02 00:00:00 2019-01-05 2019-01-05 2019-01-05 2019-01-05 2019-01-06 2019-01-06 2019-01-06 2019-01-06
|
||||
2019-01-03 00:00:00 2019-01-05 2019-01-05 2019-01-05 2019-01-05 2019-01-06 2019-01-06 2019-01-06 2019-01-06
|
||||
|
@ -1,9 +1,17 @@
|
||||
WITH
|
||||
toDate('2018-12-25') + number AS d,
|
||||
toDate32(d) AS d32,
|
||||
toDateTime(d) AS dt,
|
||||
toDateTime64(d, 0) AS dt64
|
||||
SELECT
|
||||
toDate('2018-12-25') + number AS x,
|
||||
toDateTime(x) AS x_t,
|
||||
toLastDayOfWeek(x) AS w0,
|
||||
toLastDayOfWeek(x_t) AS wt0,
|
||||
toLastDayOfWeek(x, 3) AS w3,
|
||||
toLastDayOfWeek(x_t, 3) AS wt3
|
||||
dt64,
|
||||
toLastDayOfWeek(d) AS wd_0,
|
||||
toLastDayOfWeek(d32) AS wd32_0,
|
||||
toLastDayOfWeek(dt) AS wdt_0,
|
||||
toLastDayOfWeek(dt64) AS wdt64_0,
|
||||
toLastDayOfWeek(d, 3) AS wd_3,
|
||||
toLastDayOfWeek(d32, 3) AS wd32_3,
|
||||
toLastDayOfWeek(dt, 3) AS wdt_3,
|
||||
toLastDayOfWeek(dt64, 3) AS wdt64_3
|
||||
FROM numbers(10);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user