mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-05 15:21:43 +00:00
32 lines
784 B
SQL
32 lines
784 B
SQL
-- -- Error cases
|
|
SELECT snowflakeToDateTime(); -- {serverError 42}
|
|
SELECT snowflakeToDateTime64(); -- {serverError 42}
|
|
|
|
SELECT snowflakeToDateTime('abc'); -- {serverError 43}
|
|
SELECT snowflakeToDateTime64('abc'); -- {serverError 43}
|
|
|
|
SELECT snowflakeToDateTime('abc', 123); -- {serverError 43}
|
|
SELECT snowflakeToDateTime64('abc', 123); -- {serverError 43}
|
|
|
|
SELECT 'const column';
|
|
WITH
|
|
CAST(1426860704886947840 AS Int64) AS i64,
|
|
'UTC' AS tz
|
|
SELECT
|
|
tz,
|
|
i64,
|
|
snowflakeToDateTime(i64, tz) as dt,
|
|
toTypeName(dt),
|
|
snowflakeToDateTime64(i64, tz) as dt64,
|
|
toTypeName(dt64);
|
|
|
|
WITH
|
|
CAST(1426860704886947840 AS Int64) AS i64,
|
|
'Asia/Shanghai' AS tz
|
|
SELECT
|
|
tz,
|
|
i64,
|
|
snowflakeToDateTime(i64, tz) as dt,
|
|
toTypeName(dt),
|
|
snowflakeToDateTime64(i64, tz) as dt64,
|
|
toTypeName(dt64); |