aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/sql/suites/datetime/date_bitcast.sql
blob: 94b56286054e608f5b53be8d21314b5baad3ffb2 (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
/* postgres can not */
select bitcast(Yql::Date(AsAtom("1")) as Uint8);
select bitcast(Yql::Date(AsAtom("1")) as Int8);
select bitcast(Yql::Date(AsAtom("1")) as Uint16);
select bitcast(Yql::Date(AsAtom("1")) as Int16);
select bitcast(Yql::Date(AsAtom("1")) as Uint32);
select bitcast(Yql::Date(AsAtom("1")) as Int32);
select bitcast(Yql::Date(AsAtom("1")) as Uint64);
select bitcast(Yql::Date(AsAtom("1")) as Int64);

select bitcast(Yql::Datetime(AsAtom("1")) as Uint8);
select bitcast(Yql::Datetime(AsAtom("1")) as Int8);
select bitcast(Yql::Datetime(AsAtom("1")) as Uint16);
select bitcast(Yql::Datetime(AsAtom("1")) as Int16);
select bitcast(Yql::Datetime(AsAtom("1")) as Uint32);
select bitcast(Yql::Datetime(AsAtom("1")) as Int32);
select bitcast(Yql::Datetime(AsAtom("1")) as Uint64);
select bitcast(Yql::Datetime(AsAtom("1")) as Int64);

select bitcast(Yql::Timestamp(AsAtom("1")) as Uint8);
select bitcast(Yql::Timestamp(AsAtom("1")) as Int8);
select bitcast(Yql::Timestamp(AsAtom("1")) as Uint16);
select bitcast(Yql::Timestamp(AsAtom("1")) as Int16);
select bitcast(Yql::Timestamp(AsAtom("1")) as Uint32);
select bitcast(Yql::Timestamp(AsAtom("1")) as Int32);
select bitcast(Yql::Timestamp(AsAtom("1")) as Uint64);
select bitcast(Yql::Timestamp(AsAtom("1")) as Int64);

select bitcast(Yql::Interval(AsAtom("1")) as Uint8);
select bitcast(Yql::Interval(AsAtom("1")) as Int8);
select bitcast(Yql::Interval(AsAtom("1")) as Uint16);
select bitcast(Yql::Interval(AsAtom("1")) as Int16);
select bitcast(Yql::Interval(AsAtom("1")) as Uint32);
select bitcast(Yql::Interval(AsAtom("1")) as Int32);
select bitcast(Yql::Interval(AsAtom("1")) as Uint64);
select bitcast(Yql::Interval(AsAtom("1")) as Int64);