aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/sql/suites/datetime/date_tz_cast.sql
blob: 84b60de923115dd02ab45836024f6d52fe838189 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/* postgres can not */
select cast(Yql::TzDate(AsAtom("1,UTC")) as Uint8);
select cast(Yql::TzDate(AsAtom("1,UTC")) as Uint32);
select cast(Yql::TzDate(AsAtom("1,UTC")) as Int32);
select cast(Yql::TzDate(AsAtom("1,UTC")) as Uint64);
select cast(Yql::TzDate(AsAtom("1,UTC")) as Int64);

select cast(Yql::TzDatetime(AsAtom("1,UTC")) as Uint8);
select cast(Yql::TzDatetime(AsAtom("1,UTC")) as Uint32);
select cast(Yql::TzDatetime(AsAtom("1,UTC")) as Int32);
select cast(Yql::TzDatetime(AsAtom("1,UTC")) as Uint64);
select cast(Yql::TzDatetime(AsAtom("1,UTC")) as Int64);

select cast(Yql::TzTimestamp(AsAtom("1,UTC")) as Uint8);
select cast(Yql::TzTimestamp(AsAtom("1,UTC")) as Uint32);
select cast(Yql::TzTimestamp(AsAtom("1,UTC")) as Int32);
select cast(Yql::TzTimestamp(AsAtom("1,UTC")) as Uint64);
select cast(Yql::TzTimestamp(AsAtom("1,UTC")) as Int64);

select cast(1ut as TzDate);
select cast(1u as TzDate);
select cast(1 as TzDate);
select cast(1ul as TzDate);
select cast(1l as TzDate);
select cast(-1 as TzDate);
select cast(1/1 as TzDate);
select cast(-1/1 as TzDate);

select cast(1ut as TzDatetime);
select cast(1u as TzDatetime);
select cast(1 as TzDatetime);
select cast(1ul as TzDatetime);
select cast(1l as TzDatetime);
select cast(-1 as TzDatetime);
select cast(1/1 as TzDatetime);
select cast(-1/1 as TzDatetime);
select cast(1/0 as TzDatetime);

select cast(1ut as TzTimestamp);
select cast(1u as TzTimestamp);
select cast(1 as TzTimestamp);
select cast(1ul as TzTimestamp);
select cast(1l as TzTimestamp);
select cast(-1 as TzTimestamp);
select cast(1/1 as TzTimestamp);
select cast(-1/1 as TzTimestamp);
select cast(1/0 as TzTimestamp);