ClickHouse/tests/queries/0_stateless/02668_ulid_decoding.sql

11 lines
749 B
MySQL
Raw Normal View History

2023-03-01 15:37:20 +00:00
-- Tags: no-fasttest
2023-03-29 23:37:01 +00:00
SELECT dateDiff('minute', ULIDStringToDateTime(generateULID()), now()) = 0;
2023-03-29 19:41:09 +00:00
SELECT toTimezone(ULIDStringToDateTime('01GWJWKW30MFPQJRYEAF4XFZ9E'), 'America/Costa_Rica');
2023-03-28 01:48:25 +00:00
SELECT ULIDStringToDateTime('01GWJWKW30MFPQJRYEAF4XFZ9E', 'America/Costa_Rica');
SELECT ULIDStringToDateTime('01GWJWKW30MFPQJRYEAF4XFZ9', 'America/Costa_Rica'); -- { serverError ILLEGAL_COLUMN }
SELECT ULIDStringToDateTime('01GWJWKW30MFPQJRYEAF4XFZ9E', 'America/Costa_Ric'); -- { serverError POCO_EXCEPTION }
SELECT ULIDStringToDateTime('01GWJWKW30MFPQJRYEAF4XFZ9E0'); -- { serverError ILLEGAL_COLUMN }
SELECT ULIDStringToDateTime(1); -- { serverError ILLEGAL_TYPE_OF_ARGUMENT }
SELECT ULIDStringToDateTime(1, 2); -- { serverError ILLEGAL_TYPE_OF_ARGUMENT }