#
#   Distinct symbol
#
set max 100
test select distinct symbol from alltypes
>_,TIMESTAMP,SYMBOL,TYPE,$SYMBOL
0,_,,S0
1,_,,S1
!end
#
#   Distinct INTEGER 
#
test select distinct int_c_8 from alltypes
>_,TIMESTAMP,SYMBOL,TYPE,int_c_8
0,_,,-127
1,_,,1
2,_,,2
3,_,,3
4,_,,4
5,_,,5
6,_,,6
7,_,,7
8,_,,8
9,_,,9
10,_,,10
11,_,,11
12,_,,12
13,_,,13
14,_,,14
15,_,,15
16,_,,16
17,_,,17
18,_,,18
19,_,,19
20,_,,20
21,_,,21
22,_,,22
23,_,,23
24,_,,24
25,_,,25
26,_,,0
27,_,,-1
28,_,,-2
29,_,,-3
30,_,,-4
31,_,,-5
32,_,,-6
33,_,,-7
34,_,,-8
35,_,,-9
36,_,,-10
37,_,,-11
38,_,,-12
39,_,,-13
40,_,,-14
41,_,,-15
42,_,,-16
43,_,,-17
44,_,,-18
45,_,,-19
46,_,,-20
47,_,,-21
48,_,,-22
49,_,,-23
50,_,,-24
51,_,,-25
52,_,,127
!end
#
#   Distinct INTEGER where ...
#
set max 100
test select distinct int_c_8 from alltypes where symbol=='S1' and int_c_8 < 10 and int_c_8 > -10
>_,TIMESTAMP,SYMBOL,TYPE,int_c_8
0,_,,1
1,_,,2
2,_,,3
3,_,,4
4,_,,5
5,_,,6
6,_,,7
7,_,,8
8,_,,9
9,_,,0
10,_,,-1
11,_,,-2
12,_,,-3
13,_,,-4
14,_,,-5
15,_,,-6
16,_,,-7
17,_,,-8
18,_,,-9
!end
#
#   Clean enum
#
test select distinct enum_c from alltypes
>_,TIMESTAMP,SYMBOL,TYPE,enum_c
0,_,,RED
1,_,,GREEN
2,_,,BLUE
!end
#
#   Nullable enum
#
test select distinct enum_n from alltypes
>_,TIMESTAMP,SYMBOL,TYPE,enum_n
0,_,,RED
1,_,,GREEN
2,_,,BLUE
3,_,,_
!end
#
#   Nullable time of day
#
set max 15
test select distinct tod_n from alltypes
>_,TIMESTAMP,SYMBOL,TYPE,tod_n
0,_,,00:00
1,_,,00:01
2,_,,00:02
3,_,,00:03
4,_,,00:04
5,_,,00:05
6,_,,00:06
7,_,,00:07
8,_,,00:08
9,_,,_
10,_,,00:10
11,_,,00:11
12,_,,00:12
13,_,,00:13
14,_,,00:14
!end
#
#   Bitmask
#
set max 100
test select distinct bitmask_c from alltypes
>_,TIMESTAMP,SYMBOL,TYPE,bitmask_c
0,_,,
1,_,,BIT0
2,_,,BIT1
3,_,,BIT0|BIT1
4,_,,BIT2
5,_,,BIT0|BIT2
6,_,,BIT1|BIT2
7,_,,BIT0|BIT1|BIT2
8,_,,BIT3
9,_,,BIT0|BIT3
10,_,,BIT1|BIT3
11,_,,BIT0|BIT1|BIT3
12,_,,BIT2|BIT3
13,_,,BIT0|BIT2|BIT3
14,_,,BIT1|BIT2|BIT3
15,_,,BIT0|BIT1|BIT2|BIT3
!end
#
#   ALPHANUMERIC
#
test select distinct varchar_n_alpha10 from alltypes
>_,TIMESTAMP,SYMBOL,TYPE,varchar_n_alpha10
0,_,,
1,_,,1
2,_,,12
3,_,,123
4,_,,1234
5,_,,12345
6,_,,123456
7,_,,1234567
8,_,,12345678
9,_,,_
10,_,,123456789A
11,_,,123456789
!end
#
test select distinct varchar_n_alpha5_s from alltypes
>_,TIMESTAMP,SYMBOL,TYPE,varchar_n_alpha5_s
0,_,,
1,_,,1
2,_,,12
3,_,,123
4,_,,1234
5,_,,12345
6,_,,_
!end
