Add test for monthName

This commit is contained in:
usurai 2022-01-07 00:33:01 +08:00
parent c0892f6e6c
commit b9e69296da
2 changed files with 84 additions and 0 deletions

View File

@ -0,0 +1,12 @@
January January January
February February February
March March March
April April April
May May May
June June June
July July July
August August August
September September September
October October October
November November November
December December December

View File

@ -0,0 +1,72 @@
WITH
toDate('2021-01-14') AS date_value,
toDateTime('2021-01-14 11:22:33') AS date_time_value,
toDateTime64('2021-01-14 11:22:33', 3) AS date_time_64_value
SELECT monthName(date_value), monthName(date_time_value), monthName(date_time_64_value);
WITH
toDate('2021-02-14') AS date_value,
toDateTime('2021-02-14 11:22:33') AS date_time_value,
toDateTime64('2021-02-14 11:22:33', 3) AS date_time_64_value
SELECT monthName(date_value), monthName(date_time_value), monthName(date_time_64_value);
WITH
toDate('2021-03-14') AS date_value,
toDateTime('2021-03-14 11:22:33') AS date_time_value,
toDateTime64('2021-03-14 11:22:33', 3) AS date_time_64_value
SELECT monthName(date_value), monthName(date_time_value), monthName(date_time_64_value);
WITH
toDate('2021-04-14') AS date_value,
toDateTime('2021-04-14 11:22:33') AS date_time_value,
toDateTime64('2021-04-14 11:22:33', 3) AS date_time_64_value
SELECT monthName(date_value), monthName(date_time_value), monthName(date_time_64_value);
WITH
toDate('2021-05-14') AS date_value,
toDateTime('2021-05-14 11:22:33') AS date_time_value,
toDateTime64('2021-05-14 11:22:33', 3) AS date_time_64_value
SELECT monthName(date_value), monthName(date_time_value), monthName(date_time_64_value);
WITH
toDate('2021-06-14') AS date_value,
toDateTime('2021-06-14 11:22:33') AS date_time_value,
toDateTime64('2021-06-14 11:22:33', 3) AS date_time_64_value
SELECT monthName(date_value), monthName(date_time_value), monthName(date_time_64_value);
WITH
toDate('2021-07-14') AS date_value,
toDateTime('2021-07-14 11:22:33') AS date_time_value,
toDateTime64('2021-07-14 11:22:33', 3) AS date_time_64_value
SELECT monthName(date_value), monthName(date_time_value), monthName(date_time_64_value);
WITH
toDate('2021-08-14') AS date_value,
toDateTime('2021-08-14 11:22:33') AS date_time_value,
toDateTime64('2021-08-14 11:22:33', 3) AS date_time_64_value
SELECT monthName(date_value), monthName(date_time_value), monthName(date_time_64_value);
WITH
toDate('2021-09-14') AS date_value,
toDateTime('2021-09-14 11:22:33') AS date_time_value,
toDateTime64('2021-09-14 11:22:33', 3) AS date_time_64_value
SELECT monthName(date_value), monthName(date_time_value), monthName(date_time_64_value);
WITH
toDate('2021-10-14') AS date_value,
toDateTime('2021-10-14 11:22:33') AS date_time_value,
toDateTime64('2021-10-14 11:22:33', 3) AS date_time_64_value
SELECT monthName(date_value), monthName(date_time_value), monthName(date_time_64_value);
WITH
toDate('2021-11-14') AS date_value,
toDateTime('2021-11-14 11:22:33') AS date_time_value,
toDateTime64('2021-11-14 11:22:33', 3) AS date_time_64_value
SELECT monthName(date_value), monthName(date_time_value), monthName(date_time_64_value);
WITH
toDate('2021-12-14') AS date_value,
toDateTime('2021-12-14 11:22:33') AS date_time_value,
toDateTime64('2021-12-14 11:22:33', 3) AS date_time_64_value
SELECT monthName(date_value), monthName(date_time_value), monthName(date_time_64_value);