aboutsummaryrefslogtreecommitdiff
path: root/sql/core/src/test/resources/sql-tests/results/arithmetic.sql.out
blob: f2b40a00d062dc251757501d23a4fced9d2fcafc (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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
-- Automatically generated by SQLQueryTestSuite
-- Number of queries: 22


-- !query 0
select -100
-- !query 0 schema
struct<-100:int>
-- !query 0 output
-100


-- !query 1
select +230
-- !query 1 schema
struct<230:int>
-- !query 1 output
230


-- !query 2
select -5.2
-- !query 2 schema
struct<-5.2:decimal(2,1)>
-- !query 2 output
-5.2


-- !query 3
select +6.8e0
-- !query 3 schema
struct<6.8:double>
-- !query 3 output
6.8


-- !query 4
select -key, +key from testdata where key = 2
-- !query 4 schema
struct<(- key):int,key:int>
-- !query 4 output
-2	2


-- !query 5
select -(key + 1), - key + 1, +(key + 5) from testdata where key = 1
-- !query 5 schema
struct<(- (key + 1)):int,((- key) + 1):int,(key + 5):int>
-- !query 5 output
-2	0	6


-- !query 6
select -max(key), +max(key) from testdata
-- !query 6 schema
struct<(- max(key)):int,max(key):int>
-- !query 6 output
-100	100


-- !query 7
select - (-10)
-- !query 7 schema
struct<(- -10):int>
-- !query 7 output
10


-- !query 8
select + (-key) from testdata where key = 32
-- !query 8 schema
struct<(- key):int>
-- !query 8 output
-32


-- !query 9
select - (+max(key)) from testdata
-- !query 9 schema
struct<(- max(key)):int>
-- !query 9 output
-100


-- !query 10
select - - 3
-- !query 10 schema
struct<(- -3):int>
-- !query 10 output
3


-- !query 11
select - + 20
-- !query 11 schema
struct<(- 20):int>
-- !query 11 output
-20


-- !query 12
select + + 100
-- !query 12 schema
struct<100:int>
-- !query 12 output
100


-- !query 13
select - - max(key) from testdata
-- !query 13 schema
struct<(- (- max(key))):int>
-- !query 13 output
100


-- !query 14
select + - key from testdata where key = 33
-- !query 14 schema
struct<(- key):int>
-- !query 14 output
-33


-- !query 15
select 1 + 2
-- !query 15 schema
struct<(1 + 2):int>
-- !query 15 output
3


-- !query 16
select 1 - 2
-- !query 16 schema
struct<(1 - 2):int>
-- !query 16 output
-1


-- !query 17
select 2 * 5
-- !query 17 schema
struct<(2 * 5):int>
-- !query 17 output
10


-- !query 18
select 5 / 2
-- !query 18 schema
struct<(CAST(5 AS DOUBLE) / CAST(2 AS DOUBLE)):double>
-- !query 18 output
2.5


-- !query 19
select 5 div 2
-- !query 19 schema
struct<CAST((CAST(5 AS DOUBLE) / CAST(2 AS DOUBLE)) AS BIGINT):bigint>
-- !query 19 output
2


-- !query 20
select 5 % 3
-- !query 20 schema
struct<(5 % 3):int>
-- !query 20 output
2


-- !query 21
select pmod(-7, 3)
-- !query 21 schema
struct<pmod(-7, 3):int>
-- !query 21 output
2