mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 09:32:06 +00:00
Add test for issue #42520
This commit is contained in:
parent
501e43dd01
commit
ab0174f3e8
25
tests/queries/0_stateless/02477_number_to_date.reference
Normal file
25
tests/queries/0_stateless/02477_number_to_date.reference
Normal file
@ -0,0 +1,25 @@
|
||||
-- { echoOn }
|
||||
select toDate(1666249120::Float);
|
||||
2022-10-20
|
||||
select toDate(1666249120::Double);
|
||||
2022-10-20
|
||||
select toDate(1666249120::UInt32);
|
||||
2022-10-20
|
||||
select toDate32(1666249120::Float);
|
||||
2022-10-20
|
||||
select toDate32(1666249120::Double);
|
||||
2022-10-20
|
||||
select toDate32(1666249120::UInt32);
|
||||
2022-10-20
|
||||
select toDateTime(1666249120::Float);
|
||||
2022-10-20 06:58:08
|
||||
select toDateTime(1666249120::Double);
|
||||
2022-10-20 06:58:40
|
||||
select toDateTime(1666249120::UInt32);
|
||||
2022-10-20 06:58:40
|
||||
select toDateTime64(1666249120::Float, 3);
|
||||
2022-10-20 06:58:49.984
|
||||
select toDateTime64(1666249120::Double, 3);
|
||||
2022-10-20 06:58:40.000
|
||||
select toDateTime64(1666249120::UInt32, 3);
|
||||
2022-10-20 06:58:40.000
|
17
tests/queries/0_stateless/02477_number_to_date.sql
Normal file
17
tests/queries/0_stateless/02477_number_to_date.sql
Normal file
@ -0,0 +1,17 @@
|
||||
-- { echoOn }
|
||||
select toDate(1666249120::Float);
|
||||
select toDate(1666249120::Double);
|
||||
select toDate(1666249120::UInt32);
|
||||
|
||||
select toDate32(1666249120::Float);
|
||||
select toDate32(1666249120::Double);
|
||||
select toDate32(1666249120::UInt32);
|
||||
|
||||
select toDateTime(1666249120::Float);
|
||||
select toDateTime(1666249120::Double);
|
||||
select toDateTime(1666249120::UInt32);
|
||||
|
||||
select toDateTime64(1666249120::Float, 3);
|
||||
select toDateTime64(1666249120::Double, 3);
|
||||
select toDateTime64(1666249120::UInt32, 3);
|
||||
-- { echoOff }
|
Loading…
Reference in New Issue
Block a user