aboutsummaryrefslogtreecommitdiff
path: root/sql/core/src/test/resources/sql-tests/results/literals.sql.out
blob: 95d4413148f644b614e3f379bcfd6173bdc86149 (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
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
-- Automatically generated by SQLQueryTestSuite
-- Number of queries: 43


-- !query 0
select null, Null, nUll
-- !query 0 schema
struct<NULL:null,NULL:null,NULL:null>
-- !query 0 output
NULL	NULL	NULL


-- !query 1
select true, tRue, false, fALse
-- !query 1 schema
struct<true:boolean,true:boolean,false:boolean,false:boolean>
-- !query 1 output
true	true	false	false


-- !query 2
select 1Y
-- !query 2 schema
struct<1:tinyint>
-- !query 2 output
1


-- !query 3
select 127Y, -128Y
-- !query 3 schema
struct<127:tinyint,-128:tinyint>
-- !query 3 output
127	-128


-- !query 4
select 128Y
-- !query 4 schema
struct<>
-- !query 4 output
org.apache.spark.sql.catalyst.parser.ParseException

Numeric literal 128 does not fit in range [-128, 127] for type tinyint(line 1, pos 7)

== SQL ==
select 128Y
-------^^^


-- !query 5
select 1S
-- !query 5 schema
struct<1:smallint>
-- !query 5 output
1


-- !query 6
select 32767S, -32768S
-- !query 6 schema
struct<32767:smallint,-32768:smallint>
-- !query 6 output
32767	-32768


-- !query 7
select 32768S
-- !query 7 schema
struct<>
-- !query 7 output
org.apache.spark.sql.catalyst.parser.ParseException

Numeric literal 32768 does not fit in range [-32768, 32767] for type smallint(line 1, pos 7)

== SQL ==
select 32768S
-------^^^


-- !query 8
select 1L, 2147483648L
-- !query 8 schema
struct<1:bigint,2147483648:bigint>
-- !query 8 output
1	2147483648


-- !query 9
select 9223372036854775807L, -9223372036854775808L
-- !query 9 schema
struct<9223372036854775807:bigint,-9223372036854775808:bigint>
-- !query 9 output
9223372036854775807	-9223372036854775808


-- !query 10
select 9223372036854775808L
-- !query 10 schema
struct<>
-- !query 10 output
org.apache.spark.sql.catalyst.parser.ParseException

Numeric literal 9223372036854775808 does not fit in range [-9223372036854775808, 9223372036854775807] for type bigint(line 1, pos 7)

== SQL ==
select 9223372036854775808L
-------^^^


-- !query 11
select 1, -1
-- !query 11 schema
struct<1:int,-1:int>
-- !query 11 output
1	-1


-- !query 12
select 2147483647, -2147483648
-- !query 12 schema
struct<2147483647:int,-2147483648:int>
-- !query 12 output
2147483647	-2147483648


-- !query 13
select 9223372036854775807, -9223372036854775808
-- !query 13 schema
struct<9223372036854775807:bigint,-9223372036854775808:bigint>
-- !query 13 output
9223372036854775807	-9223372036854775808


-- !query 14
select 9223372036854775808, -9223372036854775809
-- !query 14 schema
struct<9223372036854775808:decimal(19,0),-9223372036854775809:decimal(19,0)>
-- !query 14 output
9223372036854775808	-9223372036854775809


-- !query 15
select 1234567890123456789012345678901234567890
-- !query 15 schema
struct<>
-- !query 15 output
org.apache.spark.sql.catalyst.parser.ParseException

DecimalType can only support precision up to 38
== SQL ==
select 1234567890123456789012345678901234567890


-- !query 16
select 1234567890123456789012345678901234567890.0
-- !query 16 schema
struct<>
-- !query 16 output
org.apache.spark.sql.catalyst.parser.ParseException

DecimalType can only support precision up to 38
== SQL ==
select 1234567890123456789012345678901234567890.0


-- !query 17
select 1D, 1.2D, 1e10, 1.5e5, .10D, 0.10D, .1e5, .9e+2, 0.9e+2, 900e-1, 9.e+1
-- !query 17 schema
struct<1.0:double,1.2:double,1E+10:decimal(1,-10),1.5E+5:decimal(2,-4),0.1:double,0.1:double,1E+4:decimal(1,-4),9E+1:decimal(1,-1),9E+1:decimal(1,-1),90.0:decimal(3,1),9E+1:decimal(1,-1)>
-- !query 17 output
1.0	1.2	10000000000	150000	0.1	0.1	10000	90	90	90	90


-- !query 18
select -1D, -1.2D, -1e10, -1.5e5, -.10D, -0.10D, -.1e5
-- !query 18 schema
struct<-1.0:double,-1.2:double,-1E+10:decimal(1,-10),-1.5E+5:decimal(2,-4),-0.1:double,-0.1:double,-1E+4:decimal(1,-4)>
-- !query 18 output
-1.0	-1.2	-10000000000	-150000	-0.1	-0.1	-10000


-- !query 19
select .e3
-- !query 19 schema
struct<>
-- !query 19 output
org.apache.spark.sql.catalyst.parser.ParseException

no viable alternative at input 'select .'(line 1, pos 7)

== SQL ==
select .e3
-------^^^


-- !query 20
select 1E309, -1E309
-- !query 20 schema
struct<1E+309:decimal(1,-309),-1E+309:decimal(1,-309)>
-- !query 20 output
1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000	-1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000


-- !query 21
select 0.3, -0.8, .5, -.18, 0.1111, .1111
-- !query 21 schema
struct<0.3:decimal(1,1),-0.8:decimal(1,1),0.5:decimal(1,1),-0.18:decimal(2,2),0.1111:decimal(4,4),0.1111:decimal(4,4)>
-- !query 21 output
0.3	-0.8	0.5	-0.18	0.1111	0.1111


-- !query 22
select 123456789012345678901234567890123456789e10d, 123456789012345678901234567890123456789.1e10d
-- !query 22 schema
struct<1.2345678901234568E48:double,1.2345678901234568E48:double>
-- !query 22 output
1.2345678901234568E48	1.2345678901234568E48


-- !query 23
select "Hello Peter!", 'hello lee!'
-- !query 23 schema
struct<Hello Peter!:string,hello lee!:string>
-- !query 23 output
Hello Peter!	hello lee!


-- !query 24
select 'hello' 'world', 'hello' " " 'lee'
-- !query 24 schema
struct<helloworld:string,hello lee:string>
-- !query 24 output
helloworld	hello lee


-- !query 25
select "hello 'peter'"
-- !query 25 schema
struct<hello 'peter':string>
-- !query 25 output
hello 'peter'


-- !query 26
select 'pattern%', 'no-pattern\%', 'pattern\\%', 'pattern\\\%'
-- !query 26 schema
struct<pattern%:string,no-pattern\%:string,pattern\%:string,pattern\\%:string>
-- !query 26 output
pattern%	no-pattern\%	pattern\%	pattern\\%


-- !query 27
select '\'', '"', '\n', '\r', '\t', 'Z'
-- !query 27 schema
struct<':string,":string,
:string,
:string,	:string,Z:string>
-- !query 27 output
'	"	
	
			Z


-- !query 28
select '\110\145\154\154\157\041'
-- !query 28 schema
struct<Hello!:string>
-- !query 28 output
Hello!


-- !query 29
select '\u0057\u006F\u0072\u006C\u0064\u0020\u003A\u0029'
-- !query 29 schema
struct<World :):string>
-- !query 29 output
World :)


-- !query 30
select dAte '2016-03-12'
-- !query 30 schema
struct<DATE '2016-03-12':date>
-- !query 30 output
2016-03-12


-- !query 31
select date 'mar 11 2016'
-- !query 31 schema
struct<>
-- !query 31 output
org.apache.spark.sql.catalyst.parser.ParseException

Exception parsing DATE(line 1, pos 7)

== SQL ==
select date 'mar 11 2016'
-------^^^


-- !query 32
select tImEstAmp '2016-03-11 20:54:00.000'
-- !query 32 schema
struct<TIMESTAMP('2016-03-11 20:54:00.0'):timestamp>
-- !query 32 output
2016-03-11 20:54:00


-- !query 33
select timestamp '2016-33-11 20:54:00.000'
-- !query 33 schema
struct<>
-- !query 33 output
org.apache.spark.sql.catalyst.parser.ParseException

Timestamp format must be yyyy-mm-dd hh:mm:ss[.fffffffff](line 1, pos 7)

== SQL ==
select timestamp '2016-33-11 20:54:00.000'
-------^^^


-- !query 34
select interval 13.123456789 seconds, interval -13.123456789 second
-- !query 34 schema
struct<>
-- !query 34 output
scala.MatchError
(interval 13 seconds 123 milliseconds 456 microseconds,CalendarIntervalType) (of class scala.Tuple2)


-- !query 35
select interval 1 year 2 month 3 week 4 day 5 hour 6 minute 7 seconds 8 millisecond, 9 microsecond
-- !query 35 schema
struct<>
-- !query 35 output
scala.MatchError
(interval 1 years 2 months 3 weeks 4 days 5 hours 6 minutes 7 seconds 8 milliseconds,CalendarIntervalType) (of class scala.Tuple2)


-- !query 36
select interval 10 nanoseconds
-- !query 36 schema
struct<>
-- !query 36 output
org.apache.spark.sql.catalyst.parser.ParseException

No interval can be constructed(line 1, pos 16)

== SQL ==
select interval 10 nanoseconds
----------------^^^


-- !query 37
select GEO '(10,-6)'
-- !query 37 schema
struct<>
-- !query 37 output
org.apache.spark.sql.catalyst.parser.ParseException

Literals of type 'GEO' are currently not supported.(line 1, pos 7)

== SQL ==
select GEO '(10,-6)'
-------^^^


-- !query 38
select 90912830918230182310293801923652346786BD, 123.0E-28BD, 123.08BD
-- !query 38 schema
struct<90912830918230182310293801923652346786:decimal(38,0),1.230E-26:decimal(29,29),123.08:decimal(5,2)>
-- !query 38 output
90912830918230182310293801923652346786	0.0000000000000000000000000123	123.08


-- !query 39
select 1.20E-38BD
-- !query 39 schema
struct<>
-- !query 39 output
org.apache.spark.sql.catalyst.parser.ParseException

DecimalType can only support precision up to 38(line 1, pos 7)

== SQL ==
select 1.20E-38BD
-------^^^


-- !query 40
select x'2379ACFe'
-- !query 40 schema
struct<X'2379ACFE':binary>
-- !query 40 output
#y��


-- !query 41
select X'XuZ'
-- !query 41 schema
struct<>
-- !query 41 output
org.apache.spark.sql.catalyst.parser.ParseException

contains illegal character for hexBinary: 0XuZ(line 1, pos 7)

== SQL ==
select X'XuZ'
-------^^^


-- !query 42
SELECT 3.14, -3.14, 3.14e8, 3.14e-8, -3.14e8, -3.14e-8, 3.14e+8, 3.14E8, 3.14E-8
-- !query 42 schema
struct<3.14:decimal(3,2),-3.14:decimal(3,2),3.14E+8:decimal(3,-6),3.14E-8:decimal(10,10),-3.14E+8:decimal(3,-6),-3.14E-8:decimal(10,10),3.14E+8:decimal(3,-6),3.14E+8:decimal(3,-6),3.14E-8:decimal(10,10)>
-- !query 42 output
3.14	-3.14	314000000	0.0000000314	-314000000	-0.0000000314	314000000	314000000	0.0000000314