Files
impala/testdata/workloads/functional-query/queries/QueryTest/hdfs-scan-node.test
Lenni Kuff 04edc8f534 Update benchmark tests to run against generic workload, data loading with scale factor, +more
This change updates the run-benchmark script to enable it to target one or more
workloads. Now benchmarks can be run like:

./run-benchmark --workloads=hive-benchmark,tpch

We lookup the workload in the workloads directory, then read the associated
query .test files and start executing them.

To ensure the queries are not duplicated between benchmark and query tests, I
moved all existing queries (under fe/src/test/resources/* to the workloads
directory. You do NOT need to look through all the .test files, I've just moved
them. The one new file is the 'hive-benchmark.test' which contains the hive
benchmark queries.

Also added support for generating schema for different scale factors as well as
executing against these scale factors. For example, let's say we have a dataset
with a scale factor called "SF1". We would first generate the schema using:

./generate_schema_statements --workload=<workload> --scale_factor="SF3"
This will create tables with a unique names from the other scale factors.

Run the generated .sql file to load the data. Alternatively, the data can loaded
by running a new python script:
./bin/load-data.py -w <workload1>,<workload2> -e <exploration strategy> -s [scale factor]
For example: load-data.sh -w tpch -e core -s SF3

Then run against this:
./run-benchmark --workloads=<workload> --scale_factor=SF3

This changeset also includes a few other minor tweaks to some of the test
scripts.

Change-Id: Ife8a8d91567d75c9612be37bec96c1e7780f50d6
2014-01-08 10:44:22 -08:00

759 lines
26 KiB
Plaintext

select a.id, b.date_string_col from
alltypessmall$TABLE a join alltypessmall$TABLE b on (a.id = b.id)
---- TYPES
int, string
---- RESULTS
0,'01/01/09'
1,'01/01/09'
10,'01/02/09'
11,'01/02/09'
12,'01/02/09'
13,'01/02/09'
14,'01/02/09'
15,'01/02/09'
16,'01/02/09'
17,'01/02/09'
18,'01/02/09'
19,'01/02/09'
2,'01/01/09'
20,'01/03/09'
21,'01/03/09'
22,'01/03/09'
23,'01/03/09'
24,'01/03/09'
25,'02/01/09'
26,'02/01/09'
27,'02/01/09'
28,'02/01/09'
29,'02/01/09'
3,'01/01/09'
30,'02/01/09'
31,'02/01/09'
32,'02/01/09'
33,'02/01/09'
34,'02/01/09'
35,'02/02/09'
36,'02/02/09'
37,'02/02/09'
38,'02/02/09'
39,'02/02/09'
4,'01/01/09'
40,'02/02/09'
41,'02/02/09'
42,'02/02/09'
43,'02/02/09'
44,'02/02/09'
45,'02/03/09'
46,'02/03/09'
47,'02/03/09'
48,'02/03/09'
49,'02/03/09'
5,'01/01/09'
50,'03/01/09'
51,'03/01/09'
52,'03/01/09'
53,'03/01/09'
54,'03/01/09'
55,'03/01/09'
56,'03/01/09'
57,'03/01/09'
58,'03/01/09'
59,'03/01/09'
6,'01/01/09'
60,'03/02/09'
61,'03/02/09'
62,'03/02/09'
63,'03/02/09'
64,'03/02/09'
65,'03/02/09'
66,'03/02/09'
67,'03/02/09'
68,'03/02/09'
69,'03/02/09'
7,'01/01/09'
70,'03/03/09'
71,'03/03/09'
72,'03/03/09'
73,'03/03/09'
74,'03/03/09'
75,'04/01/09'
76,'04/01/09'
77,'04/01/09'
78,'04/01/09'
79,'04/01/09'
8,'01/01/09'
80,'04/01/09'
81,'04/01/09'
82,'04/01/09'
83,'04/01/09'
84,'04/01/09'
85,'04/02/09'
86,'04/02/09'
87,'04/02/09'
88,'04/02/09'
89,'04/02/09'
9,'01/01/09'
90,'04/02/09'
91,'04/02/09'
92,'04/02/09'
93,'04/02/09'
94,'04/02/09'
95,'04/03/09'
96,'04/03/09'
97,'04/03/09'
98,'04/03/09'
99,'04/03/09'
====
select c.id, d.date_string_col from
alltypessmall$TABLE d join (select a.id as id, b.date_string_col from
alltypessmall$TABLE a join alltypessmall$TABLE b on (a.id = b.id)) c on c.id = d.id
---- TYPES
int, string
---- RESULTS
0,'01/01/09'
1,'01/01/09'
10,'01/02/09'
11,'01/02/09'
12,'01/02/09'
13,'01/02/09'
14,'01/02/09'
15,'01/02/09'
16,'01/02/09'
17,'01/02/09'
18,'01/02/09'
19,'01/02/09'
2,'01/01/09'
20,'01/03/09'
21,'01/03/09'
22,'01/03/09'
23,'01/03/09'
24,'01/03/09'
25,'02/01/09'
26,'02/01/09'
27,'02/01/09'
28,'02/01/09'
29,'02/01/09'
3,'01/01/09'
30,'02/01/09'
31,'02/01/09'
32,'02/01/09'
33,'02/01/09'
34,'02/01/09'
35,'02/02/09'
36,'02/02/09'
37,'02/02/09'
38,'02/02/09'
39,'02/02/09'
4,'01/01/09'
40,'02/02/09'
41,'02/02/09'
42,'02/02/09'
43,'02/02/09'
44,'02/02/09'
45,'02/03/09'
46,'02/03/09'
47,'02/03/09'
48,'02/03/09'
49,'02/03/09'
5,'01/01/09'
50,'03/01/09'
51,'03/01/09'
52,'03/01/09'
53,'03/01/09'
54,'03/01/09'
55,'03/01/09'
56,'03/01/09'
57,'03/01/09'
58,'03/01/09'
59,'03/01/09'
6,'01/01/09'
60,'03/02/09'
61,'03/02/09'
62,'03/02/09'
63,'03/02/09'
64,'03/02/09'
65,'03/02/09'
66,'03/02/09'
67,'03/02/09'
68,'03/02/09'
69,'03/02/09'
7,'01/01/09'
70,'03/03/09'
71,'03/03/09'
72,'03/03/09'
73,'03/03/09'
74,'03/03/09'
75,'04/01/09'
76,'04/01/09'
77,'04/01/09'
78,'04/01/09'
79,'04/01/09'
8,'01/01/09'
80,'04/01/09'
81,'04/01/09'
82,'04/01/09'
83,'04/01/09'
84,'04/01/09'
85,'04/02/09'
86,'04/02/09'
87,'04/02/09'
88,'04/02/09'
89,'04/02/09'
9,'01/01/09'
90,'04/02/09'
91,'04/02/09'
92,'04/02/09'
93,'04/02/09'
94,'04/02/09'
95,'04/03/09'
96,'04/03/09'
97,'04/03/09'
98,'04/03/09'
99,'04/03/09'
====
select id, bool_col, tinyint_col, smallint_col, int_col, bigint_col, float_col,
double_col, date_string_col, string_col, timestamp_col
from alltypessmall$TABLE
---- TYPES
int, boolean, tinyint, smallint, int, bigint, float, double, string, string, timestamp
---- RESULTS
0,true,0,0,0,0,0,0,'01/01/09','0',2009-01-01 00:00:00
1,false,1,1,1,10,1.100000023841858,10.1,'01/01/09','1',2009-01-01 00:01:00
10,true,0,0,0,0,0,0,'01/02/09','0',2009-01-02 00:10:00.450000000
11,false,1,1,1,10,1.100000023841858,10.1,'01/02/09','1',2009-01-02 00:11:00.450000000
12,true,2,2,2,20,2.200000047683716,20.2,'01/02/09','2',2009-01-02 00:12:00.460000000
13,false,3,3,3,30,3.299999952316284,30.3,'01/02/09','3',2009-01-02 00:13:00.480000000
14,true,4,4,4,40,4.400000095367432,40.4,'01/02/09','4',2009-01-02 00:14:00.510000000
15,false,5,5,5,50,5.5,50.5,'01/02/09','5',2009-01-02 00:15:00.550000000
16,true,6,6,6,60,6.599999904632568,60.6,'01/02/09','6',2009-01-02 00:16:00.600000000
17,false,7,7,7,70,7.699999809265137,70.7,'01/02/09','7',2009-01-02 00:17:00.660000000
18,true,8,8,8,80,8.800000190734863,80.8,'01/02/09','8',2009-01-02 00:18:00.730000000
19,false,9,9,9,90,9.899999618530273,90.90000000000001,'01/02/09','9',2009-01-02 00:19:00.810000000
2,true,2,2,2,20,2.200000047683716,20.2,'01/01/09','2',2009-01-01 00:02:00.100000000
20,true,0,0,0,0,0,0,'01/03/09','0',2009-01-03 00:20:00.900000000
21,false,1,1,1,10,1.100000023841858,10.1,'01/03/09','1',2009-01-03 00:21:00.900000000
22,true,2,2,2,20,2.200000047683716,20.2,'01/03/09','2',2009-01-03 00:22:00.910000000
23,false,3,3,3,30,3.299999952316284,30.3,'01/03/09','3',2009-01-03 00:23:00.930000000
24,true,4,4,4,40,4.400000095367432,40.4,'01/03/09','4',2009-01-03 00:24:00.960000000
25,false,0,0,0,0,0,0,'02/01/09','0',2009-02-01 00:00:00
26,true,1,1,1,10,1.100000023841858,10.1,'02/01/09','1',2009-02-01 00:01:00
27,false,2,2,2,20,2.200000047683716,20.2,'02/01/09','2',2009-02-01 00:02:00.100000000
28,true,3,3,3,30,3.299999952316284,30.3,'02/01/09','3',2009-02-01 00:03:00.300000000
29,false,4,4,4,40,4.400000095367432,40.4,'02/01/09','4',2009-02-01 00:04:00.600000000
3,false,3,3,3,30,3.299999952316284,30.3,'01/01/09','3',2009-01-01 00:03:00.300000000
30,true,5,5,5,50,5.5,50.5,'02/01/09','5',2009-02-01 00:05:00.100000000
31,false,6,6,6,60,6.599999904632568,60.6,'02/01/09','6',2009-02-01 00:06:00.150000000
32,true,7,7,7,70,7.699999809265137,70.7,'02/01/09','7',2009-02-01 00:07:00.210000000
33,false,8,8,8,80,8.800000190734863,80.8,'02/01/09','8',2009-02-01 00:08:00.280000000
34,true,9,9,9,90,9.899999618530273,90.90000000000001,'02/01/09','9',2009-02-01 00:09:00.360000000
35,false,0,0,0,0,0,0,'02/02/09','0',2009-02-02 00:10:00.450000000
36,true,1,1,1,10,1.100000023841858,10.1,'02/02/09','1',2009-02-02 00:11:00.450000000
37,false,2,2,2,20,2.200000047683716,20.2,'02/02/09','2',2009-02-02 00:12:00.460000000
38,true,3,3,3,30,3.299999952316284,30.3,'02/02/09','3',2009-02-02 00:13:00.480000000
39,false,4,4,4,40,4.400000095367432,40.4,'02/02/09','4',2009-02-02 00:14:00.510000000
4,true,4,4,4,40,4.400000095367432,40.4,'01/01/09','4',2009-01-01 00:04:00.600000000
40,true,5,5,5,50,5.5,50.5,'02/02/09','5',2009-02-02 00:15:00.550000000
41,false,6,6,6,60,6.599999904632568,60.6,'02/02/09','6',2009-02-02 00:16:00.600000000
42,true,7,7,7,70,7.699999809265137,70.7,'02/02/09','7',2009-02-02 00:17:00.660000000
43,false,8,8,8,80,8.800000190734863,80.8,'02/02/09','8',2009-02-02 00:18:00.730000000
44,true,9,9,9,90,9.899999618530273,90.90000000000001,'02/02/09','9',2009-02-02 00:19:00.810000000
45,false,0,0,0,0,0,0,'02/03/09','0',2009-02-03 00:20:00.900000000
46,true,1,1,1,10,1.100000023841858,10.1,'02/03/09','1',2009-02-03 00:21:00.900000000
47,false,2,2,2,20,2.200000047683716,20.2,'02/03/09','2',2009-02-03 00:22:00.910000000
48,true,3,3,3,30,3.299999952316284,30.3,'02/03/09','3',2009-02-03 00:23:00.930000000
49,false,4,4,4,40,4.400000095367432,40.4,'02/03/09','4',2009-02-03 00:24:00.960000000
5,false,5,5,5,50,5.5,50.5,'01/01/09','5',2009-01-01 00:05:00.100000000
50,true,0,0,0,0,0,0,'03/01/09','0',2009-03-01 00:00:00
51,false,1,1,1,10,1.100000023841858,10.1,'03/01/09','1',2009-03-01 00:01:00
52,true,2,2,2,20,2.200000047683716,20.2,'03/01/09','2',2009-03-01 00:02:00.100000000
53,false,3,3,3,30,3.299999952316284,30.3,'03/01/09','3',2009-03-01 00:03:00.300000000
54,true,4,4,4,40,4.400000095367432,40.4,'03/01/09','4',2009-03-01 00:04:00.600000000
55,false,5,5,5,50,5.5,50.5,'03/01/09','5',2009-03-01 00:05:00.100000000
56,true,6,6,6,60,6.599999904632568,60.6,'03/01/09','6',2009-03-01 00:06:00.150000000
57,false,7,7,7,70,7.699999809265137,70.7,'03/01/09','7',2009-03-01 00:07:00.210000000
58,true,8,8,8,80,8.800000190734863,80.8,'03/01/09','8',2009-03-01 00:08:00.280000000
59,false,9,9,9,90,9.899999618530273,90.90000000000001,'03/01/09','9',2009-03-01 00:09:00.360000000
6,true,6,6,6,60,6.599999904632568,60.6,'01/01/09','6',2009-01-01 00:06:00.150000000
60,true,0,0,0,0,0,0,'03/02/09','0',2009-03-02 00:10:00.450000000
61,false,1,1,1,10,1.100000023841858,10.1,'03/02/09','1',2009-03-02 00:11:00.450000000
62,true,2,2,2,20,2.200000047683716,20.2,'03/02/09','2',2009-03-02 00:12:00.460000000
63,false,3,3,3,30,3.299999952316284,30.3,'03/02/09','3',2009-03-02 00:13:00.480000000
64,true,4,4,4,40,4.400000095367432,40.4,'03/02/09','4',2009-03-02 00:14:00.510000000
65,false,5,5,5,50,5.5,50.5,'03/02/09','5',2009-03-02 00:15:00.550000000
66,true,6,6,6,60,6.599999904632568,60.6,'03/02/09','6',2009-03-02 00:16:00.600000000
67,false,7,7,7,70,7.699999809265137,70.7,'03/02/09','7',2009-03-02 00:17:00.660000000
68,true,8,8,8,80,8.800000190734863,80.8,'03/02/09','8',2009-03-02 00:18:00.730000000
69,false,9,9,9,90,9.899999618530273,90.90000000000001,'03/02/09','9',2009-03-02 00:19:00.810000000
7,false,7,7,7,70,7.699999809265137,70.7,'01/01/09','7',2009-01-01 00:07:00.210000000
70,true,0,0,0,0,0,0,'03/03/09','0',2009-03-03 00:20:00.900000000
71,false,1,1,1,10,1.100000023841858,10.1,'03/03/09','1',2009-03-03 00:21:00.900000000
72,true,2,2,2,20,2.200000047683716,20.2,'03/03/09','2',2009-03-03 00:22:00.910000000
73,false,3,3,3,30,3.299999952316284,30.3,'03/03/09','3',2009-03-03 00:23:00.930000000
74,true,4,4,4,40,4.400000095367432,40.4,'03/03/09','4',2009-03-03 00:24:00.960000000
75,false,0,0,0,0,0,0,'04/01/09','0',2009-04-01 00:00:00
76,true,1,1,1,10,1.100000023841858,10.1,'04/01/09','1',2009-04-01 00:01:00
77,false,2,2,2,20,2.200000047683716,20.2,'04/01/09','2',2009-04-01 00:02:00.100000000
78,true,3,3,3,30,3.299999952316284,30.3,'04/01/09','3',2009-04-01 00:03:00.300000000
79,false,4,4,4,40,4.400000095367432,40.4,'04/01/09','4',2009-04-01 00:04:00.600000000
8,true,8,8,8,80,8.800000190734863,80.8,'01/01/09','8',2009-01-01 00:08:00.280000000
80,true,5,5,5,50,5.5,50.5,'04/01/09','5',2009-04-01 00:05:00.100000000
81,false,6,6,6,60,6.599999904632568,60.6,'04/01/09','6',2009-04-01 00:06:00.150000000
82,true,7,7,7,70,7.699999809265137,70.7,'04/01/09','7',2009-04-01 00:07:00.210000000
83,false,8,8,8,80,8.800000190734863,80.8,'04/01/09','8',2009-04-01 00:08:00.280000000
84,true,9,9,9,90,9.899999618530273,90.90000000000001,'04/01/09','9',2009-04-01 00:09:00.360000000
85,false,0,0,0,0,0,0,'04/02/09','0',2009-04-02 00:10:00.450000000
86,true,1,1,1,10,1.100000023841858,10.1,'04/02/09','1',2009-04-02 00:11:00.450000000
87,false,2,2,2,20,2.200000047683716,20.2,'04/02/09','2',2009-04-02 00:12:00.460000000
88,true,3,3,3,30,3.299999952316284,30.3,'04/02/09','3',2009-04-02 00:13:00.480000000
89,false,4,4,4,40,4.400000095367432,40.4,'04/02/09','4',2009-04-02 00:14:00.510000000
9,false,9,9,9,90,9.899999618530273,90.90000000000001,'01/01/09','9',2009-01-01 00:09:00.360000000
90,true,5,5,5,50,5.5,50.5,'04/02/09','5',2009-04-02 00:15:00.550000000
91,false,6,6,6,60,6.599999904632568,60.6,'04/02/09','6',2009-04-02 00:16:00.600000000
92,true,7,7,7,70,7.699999809265137,70.7,'04/02/09','7',2009-04-02 00:17:00.660000000
93,false,8,8,8,80,8.800000190734863,80.8,'04/02/09','8',2009-04-02 00:18:00.730000000
94,true,9,9,9,90,9.899999618530273,90.90000000000001,'04/02/09','9',2009-04-02 00:19:00.810000000
95,false,0,0,0,0,0,0,'04/03/09','0',2009-04-03 00:20:00.900000000
96,true,1,1,1,10,1.100000023841858,10.1,'04/03/09','1',2009-04-03 00:21:00.900000000
97,false,2,2,2,20,2.200000047683716,20.2,'04/03/09','2',2009-04-03 00:22:00.910000000
98,true,3,3,3,30,3.299999952316284,30.3,'04/03/09','3',2009-04-03 00:23:00.930000000
99,false,4,4,4,40,4.400000095367432,40.4,'04/03/09','4',2009-04-03 00:24:00.960000000
====
select id from alltypessmall$TABLE
---- TYPES
int
---- RESULTS
0
1
10
11
12
13
14
15
16
17
18
19
2
20
21
22
23
24
25
26
27
28
29
3
30
31
32
33
34
35
36
37
38
39
4
40
41
42
43
44
45
46
47
48
49
5
50
51
52
53
54
55
56
57
58
59
6
60
61
62
63
64
65
66
67
68
69
7
70
71
72
73
74
75
76
77
78
79
8
80
81
82
83
84
85
86
87
88
89
9
90
91
92
93
94
95
96
97
98
99
====
select * from alltypessmall$TABLE
---- TYPES
int, int, int, boolean, tinyint, smallint, int, bigint, float, double, string, string, timestamp
---- RESULTS
2009,1,0,true,0,0,0,0,0,0,'01/01/09','0',2009-01-01 00:00:00
2009,1,1,false,1,1,1,10,1.100000023841858,10.1,'01/01/09','1',2009-01-01 00:01:00
2009,1,10,true,0,0,0,0,0,0,'01/02/09','0',2009-01-02 00:10:00.450000000
2009,1,11,false,1,1,1,10,1.100000023841858,10.1,'01/02/09','1',2009-01-02 00:11:00.450000000
2009,1,12,true,2,2,2,20,2.200000047683716,20.2,'01/02/09','2',2009-01-02 00:12:00.460000000
2009,1,13,false,3,3,3,30,3.299999952316284,30.3,'01/02/09','3',2009-01-02 00:13:00.480000000
2009,1,14,true,4,4,4,40,4.400000095367432,40.4,'01/02/09','4',2009-01-02 00:14:00.510000000
2009,1,15,false,5,5,5,50,5.5,50.5,'01/02/09','5',2009-01-02 00:15:00.550000000
2009,1,16,true,6,6,6,60,6.599999904632568,60.6,'01/02/09','6',2009-01-02 00:16:00.600000000
2009,1,17,false,7,7,7,70,7.699999809265137,70.7,'01/02/09','7',2009-01-02 00:17:00.660000000
2009,1,18,true,8,8,8,80,8.800000190734863,80.8,'01/02/09','8',2009-01-02 00:18:00.730000000
2009,1,19,false,9,9,9,90,9.899999618530273,90.90000000000001,'01/02/09','9',2009-01-02 00:19:00.810000000
2009,1,2,true,2,2,2,20,2.200000047683716,20.2,'01/01/09','2',2009-01-01 00:02:00.100000000
2009,1,20,true,0,0,0,0,0,0,'01/03/09','0',2009-01-03 00:20:00.900000000
2009,1,21,false,1,1,1,10,1.100000023841858,10.1,'01/03/09','1',2009-01-03 00:21:00.900000000
2009,1,22,true,2,2,2,20,2.200000047683716,20.2,'01/03/09','2',2009-01-03 00:22:00.910000000
2009,1,23,false,3,3,3,30,3.299999952316284,30.3,'01/03/09','3',2009-01-03 00:23:00.930000000
2009,1,24,true,4,4,4,40,4.400000095367432,40.4,'01/03/09','4',2009-01-03 00:24:00.960000000
2009,1,3,false,3,3,3,30,3.299999952316284,30.3,'01/01/09','3',2009-01-01 00:03:00.300000000
2009,1,4,true,4,4,4,40,4.400000095367432,40.4,'01/01/09','4',2009-01-01 00:04:00.600000000
2009,1,5,false,5,5,5,50,5.5,50.5,'01/01/09','5',2009-01-01 00:05:00.100000000
2009,1,6,true,6,6,6,60,6.599999904632568,60.6,'01/01/09','6',2009-01-01 00:06:00.150000000
2009,1,7,false,7,7,7,70,7.699999809265137,70.7,'01/01/09','7',2009-01-01 00:07:00.210000000
2009,1,8,true,8,8,8,80,8.800000190734863,80.8,'01/01/09','8',2009-01-01 00:08:00.280000000
2009,1,9,false,9,9,9,90,9.899999618530273,90.90000000000001,'01/01/09','9',2009-01-01 00:09:00.360000000
2009,2,25,false,0,0,0,0,0,0,'02/01/09','0',2009-02-01 00:00:00
2009,2,26,true,1,1,1,10,1.100000023841858,10.1,'02/01/09','1',2009-02-01 00:01:00
2009,2,27,false,2,2,2,20,2.200000047683716,20.2,'02/01/09','2',2009-02-01 00:02:00.100000000
2009,2,28,true,3,3,3,30,3.299999952316284,30.3,'02/01/09','3',2009-02-01 00:03:00.300000000
2009,2,29,false,4,4,4,40,4.400000095367432,40.4,'02/01/09','4',2009-02-01 00:04:00.600000000
2009,2,30,true,5,5,5,50,5.5,50.5,'02/01/09','5',2009-02-01 00:05:00.100000000
2009,2,31,false,6,6,6,60,6.599999904632568,60.6,'02/01/09','6',2009-02-01 00:06:00.150000000
2009,2,32,true,7,7,7,70,7.699999809265137,70.7,'02/01/09','7',2009-02-01 00:07:00.210000000
2009,2,33,false,8,8,8,80,8.800000190734863,80.8,'02/01/09','8',2009-02-01 00:08:00.280000000
2009,2,34,true,9,9,9,90,9.899999618530273,90.90000000000001,'02/01/09','9',2009-02-01 00:09:00.360000000
2009,2,35,false,0,0,0,0,0,0,'02/02/09','0',2009-02-02 00:10:00.450000000
2009,2,36,true,1,1,1,10,1.100000023841858,10.1,'02/02/09','1',2009-02-02 00:11:00.450000000
2009,2,37,false,2,2,2,20,2.200000047683716,20.2,'02/02/09','2',2009-02-02 00:12:00.460000000
2009,2,38,true,3,3,3,30,3.299999952316284,30.3,'02/02/09','3',2009-02-02 00:13:00.480000000
2009,2,39,false,4,4,4,40,4.400000095367432,40.4,'02/02/09','4',2009-02-02 00:14:00.510000000
2009,2,40,true,5,5,5,50,5.5,50.5,'02/02/09','5',2009-02-02 00:15:00.550000000
2009,2,41,false,6,6,6,60,6.599999904632568,60.6,'02/02/09','6',2009-02-02 00:16:00.600000000
2009,2,42,true,7,7,7,70,7.699999809265137,70.7,'02/02/09','7',2009-02-02 00:17:00.660000000
2009,2,43,false,8,8,8,80,8.800000190734863,80.8,'02/02/09','8',2009-02-02 00:18:00.730000000
2009,2,44,true,9,9,9,90,9.899999618530273,90.90000000000001,'02/02/09','9',2009-02-02 00:19:00.810000000
2009,2,45,false,0,0,0,0,0,0,'02/03/09','0',2009-02-03 00:20:00.900000000
2009,2,46,true,1,1,1,10,1.100000023841858,10.1,'02/03/09','1',2009-02-03 00:21:00.900000000
2009,2,47,false,2,2,2,20,2.200000047683716,20.2,'02/03/09','2',2009-02-03 00:22:00.910000000
2009,2,48,true,3,3,3,30,3.299999952316284,30.3,'02/03/09','3',2009-02-03 00:23:00.930000000
2009,2,49,false,4,4,4,40,4.400000095367432,40.4,'02/03/09','4',2009-02-03 00:24:00.960000000
2009,3,50,true,0,0,0,0,0,0,'03/01/09','0',2009-03-01 00:00:00
2009,3,51,false,1,1,1,10,1.100000023841858,10.1,'03/01/09','1',2009-03-01 00:01:00
2009,3,52,true,2,2,2,20,2.200000047683716,20.2,'03/01/09','2',2009-03-01 00:02:00.100000000
2009,3,53,false,3,3,3,30,3.299999952316284,30.3,'03/01/09','3',2009-03-01 00:03:00.300000000
2009,3,54,true,4,4,4,40,4.400000095367432,40.4,'03/01/09','4',2009-03-01 00:04:00.600000000
2009,3,55,false,5,5,5,50,5.5,50.5,'03/01/09','5',2009-03-01 00:05:00.100000000
2009,3,56,true,6,6,6,60,6.599999904632568,60.6,'03/01/09','6',2009-03-01 00:06:00.150000000
2009,3,57,false,7,7,7,70,7.699999809265137,70.7,'03/01/09','7',2009-03-01 00:07:00.210000000
2009,3,58,true,8,8,8,80,8.800000190734863,80.8,'03/01/09','8',2009-03-01 00:08:00.280000000
2009,3,59,false,9,9,9,90,9.899999618530273,90.90000000000001,'03/01/09','9',2009-03-01 00:09:00.360000000
2009,3,60,true,0,0,0,0,0,0,'03/02/09','0',2009-03-02 00:10:00.450000000
2009,3,61,false,1,1,1,10,1.100000023841858,10.1,'03/02/09','1',2009-03-02 00:11:00.450000000
2009,3,62,true,2,2,2,20,2.200000047683716,20.2,'03/02/09','2',2009-03-02 00:12:00.460000000
2009,3,63,false,3,3,3,30,3.299999952316284,30.3,'03/02/09','3',2009-03-02 00:13:00.480000000
2009,3,64,true,4,4,4,40,4.400000095367432,40.4,'03/02/09','4',2009-03-02 00:14:00.510000000
2009,3,65,false,5,5,5,50,5.5,50.5,'03/02/09','5',2009-03-02 00:15:00.550000000
2009,3,66,true,6,6,6,60,6.599999904632568,60.6,'03/02/09','6',2009-03-02 00:16:00.600000000
2009,3,67,false,7,7,7,70,7.699999809265137,70.7,'03/02/09','7',2009-03-02 00:17:00.660000000
2009,3,68,true,8,8,8,80,8.800000190734863,80.8,'03/02/09','8',2009-03-02 00:18:00.730000000
2009,3,69,false,9,9,9,90,9.899999618530273,90.90000000000001,'03/02/09','9',2009-03-02 00:19:00.810000000
2009,3,70,true,0,0,0,0,0,0,'03/03/09','0',2009-03-03 00:20:00.900000000
2009,3,71,false,1,1,1,10,1.100000023841858,10.1,'03/03/09','1',2009-03-03 00:21:00.900000000
2009,3,72,true,2,2,2,20,2.200000047683716,20.2,'03/03/09','2',2009-03-03 00:22:00.910000000
2009,3,73,false,3,3,3,30,3.299999952316284,30.3,'03/03/09','3',2009-03-03 00:23:00.930000000
2009,3,74,true,4,4,4,40,4.400000095367432,40.4,'03/03/09','4',2009-03-03 00:24:00.960000000
2009,4,75,false,0,0,0,0,0,0,'04/01/09','0',2009-04-01 00:00:00
2009,4,76,true,1,1,1,10,1.100000023841858,10.1,'04/01/09','1',2009-04-01 00:01:00
2009,4,77,false,2,2,2,20,2.200000047683716,20.2,'04/01/09','2',2009-04-01 00:02:00.100000000
2009,4,78,true,3,3,3,30,3.299999952316284,30.3,'04/01/09','3',2009-04-01 00:03:00.300000000
2009,4,79,false,4,4,4,40,4.400000095367432,40.4,'04/01/09','4',2009-04-01 00:04:00.600000000
2009,4,80,true,5,5,5,50,5.5,50.5,'04/01/09','5',2009-04-01 00:05:00.100000000
2009,4,81,false,6,6,6,60,6.599999904632568,60.6,'04/01/09','6',2009-04-01 00:06:00.150000000
2009,4,82,true,7,7,7,70,7.699999809265137,70.7,'04/01/09','7',2009-04-01 00:07:00.210000000
2009,4,83,false,8,8,8,80,8.800000190734863,80.8,'04/01/09','8',2009-04-01 00:08:00.280000000
2009,4,84,true,9,9,9,90,9.899999618530273,90.90000000000001,'04/01/09','9',2009-04-01 00:09:00.360000000
2009,4,85,false,0,0,0,0,0,0,'04/02/09','0',2009-04-02 00:10:00.450000000
2009,4,86,true,1,1,1,10,1.100000023841858,10.1,'04/02/09','1',2009-04-02 00:11:00.450000000
2009,4,87,false,2,2,2,20,2.200000047683716,20.2,'04/02/09','2',2009-04-02 00:12:00.460000000
2009,4,88,true,3,3,3,30,3.299999952316284,30.3,'04/02/09','3',2009-04-02 00:13:00.480000000
2009,4,89,false,4,4,4,40,4.400000095367432,40.4,'04/02/09','4',2009-04-02 00:14:00.510000000
2009,4,90,true,5,5,5,50,5.5,50.5,'04/02/09','5',2009-04-02 00:15:00.550000000
2009,4,91,false,6,6,6,60,6.599999904632568,60.6,'04/02/09','6',2009-04-02 00:16:00.600000000
2009,4,92,true,7,7,7,70,7.699999809265137,70.7,'04/02/09','7',2009-04-02 00:17:00.660000000
2009,4,93,false,8,8,8,80,8.800000190734863,80.8,'04/02/09','8',2009-04-02 00:18:00.730000000
2009,4,94,true,9,9,9,90,9.899999618530273,90.90000000000001,'04/02/09','9',2009-04-02 00:19:00.810000000
2009,4,95,false,0,0,0,0,0,0,'04/03/09','0',2009-04-03 00:20:00.900000000
2009,4,96,true,1,1,1,10,1.100000023841858,10.1,'04/03/09','1',2009-04-03 00:21:00.900000000
2009,4,97,false,2,2,2,20,2.200000047683716,20.2,'04/03/09','2',2009-04-03 00:22:00.910000000
2009,4,98,true,3,3,3,30,3.299999952316284,30.3,'04/03/09','3',2009-04-03 00:23:00.930000000
2009,4,99,false,4,4,4,40,4.400000095367432,40.4,'04/03/09','4',2009-04-03 00:24:00.960000000
====
select month, date_string_col, year from alltypessmall$TABLE
---- TYPES
int, string, int
---- RESULTS
1,'01/01/09',2009
1,'01/01/09',2009
1,'01/01/09',2009
1,'01/01/09',2009
1,'01/01/09',2009
1,'01/01/09',2009
1,'01/01/09',2009
1,'01/01/09',2009
1,'01/01/09',2009
1,'01/01/09',2009
1,'01/02/09',2009
1,'01/02/09',2009
1,'01/02/09',2009
1,'01/02/09',2009
1,'01/02/09',2009
1,'01/02/09',2009
1,'01/02/09',2009
1,'01/02/09',2009
1,'01/02/09',2009
1,'01/02/09',2009
1,'01/03/09',2009
1,'01/03/09',2009
1,'01/03/09',2009
1,'01/03/09',2009
1,'01/03/09',2009
2,'02/01/09',2009
2,'02/01/09',2009
2,'02/01/09',2009
2,'02/01/09',2009
2,'02/01/09',2009
2,'02/01/09',2009
2,'02/01/09',2009
2,'02/01/09',2009
2,'02/01/09',2009
2,'02/01/09',2009
2,'02/02/09',2009
2,'02/02/09',2009
2,'02/02/09',2009
2,'02/02/09',2009
2,'02/02/09',2009
2,'02/02/09',2009
2,'02/02/09',2009
2,'02/02/09',2009
2,'02/02/09',2009
2,'02/02/09',2009
2,'02/03/09',2009
2,'02/03/09',2009
2,'02/03/09',2009
2,'02/03/09',2009
2,'02/03/09',2009
3,'03/01/09',2009
3,'03/01/09',2009
3,'03/01/09',2009
3,'03/01/09',2009
3,'03/01/09',2009
3,'03/01/09',2009
3,'03/01/09',2009
3,'03/01/09',2009
3,'03/01/09',2009
3,'03/01/09',2009
3,'03/02/09',2009
3,'03/02/09',2009
3,'03/02/09',2009
3,'03/02/09',2009
3,'03/02/09',2009
3,'03/02/09',2009
3,'03/02/09',2009
3,'03/02/09',2009
3,'03/02/09',2009
3,'03/02/09',2009
3,'03/03/09',2009
3,'03/03/09',2009
3,'03/03/09',2009
3,'03/03/09',2009
3,'03/03/09',2009
4,'04/01/09',2009
4,'04/01/09',2009
4,'04/01/09',2009
4,'04/01/09',2009
4,'04/01/09',2009
4,'04/01/09',2009
4,'04/01/09',2009
4,'04/01/09',2009
4,'04/01/09',2009
4,'04/01/09',2009
4,'04/02/09',2009
4,'04/02/09',2009
4,'04/02/09',2009
4,'04/02/09',2009
4,'04/02/09',2009
4,'04/02/09',2009
4,'04/02/09',2009
4,'04/02/09',2009
4,'04/02/09',2009
4,'04/02/09',2009
4,'04/03/09',2009
4,'04/03/09',2009
4,'04/03/09',2009
4,'04/03/09',2009
4,'04/03/09',2009
====
select id from alltypessmall$TABLE where id = 10
---- TYPES
int
---- RESULTS
10
====
# We expect that conversion errors are turned into NULLs
select id, bool_col, tinyint_col, smallint_col, int_col, bigint_col, float_col, double_col, date_string_col, string_col
from alltypeserror$TABLE
---- TYPES
int, boolean, tinyint, smallint, int, bigint, float, double, string, string
---- RESULTS
0,NULL,NULL,0,0,0,0,0,'01/01/09','0'
1,NULL,NULL,1,1,10,1,10.1,'01/01/09','1'
10,NULL,NULL,NULL,0,0,0,0,'02/01/09','0'
11,false,NULL,NULL,NULL,10,1,10.1,'02/01/09','1'
12,true,2,NULL,NULL,NULL,2,20.2,'02/01/09','2'
13,false,3,3,NULL,NULL,NULL,NULL,'02/01/09','3'
14,true,4,4,4,40,NULL,NULL,'02/01/09','4'
15,false,NULL,5,5,50,5,50.5,'02/01/09','5'
16,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'02/01/09','6'
17,false,7,7,7,70,7,NULL,'02/01/09','7'
18,true,8,8,8,80,8,80.8,'02/01/09','8'
19,false,9,9,9,90,9,90.90000000000001,'02/01/09','9'
2,true,NULL,NULL,2,20,2,20.2,'01/01/09','2'
20,true,0,0,0,0,0,0,'03/01/09','0'
21,false,1,1,1,10,1,10.1,'03/01/09','1'
22,true,2,2,2,20,2,20.2,'03/01/09','2'
23,false,3,NULL,3,30,3,30.3,'03/01/09','3'
24,true,4,4,4,40,4,40.4,'03/01/09','4'
25,false,5,5,NULL,50,5,50.5,'03/01/09','5'
26,true,6,6,6,60,6,60.6,'03/01/09','6'
27,false,NULL,7,7,70,7,70.7,'03/01/09','7'
28,true,8,8,8,80,8,80.8,'03/01/09','8'
29,false,9,9,NULL,90,9,90.90000000000001,'03/01/09','9'
3,false,3,NULL,NULL,30,3,30.3,'01/01/09','3'
4,true,4,4,NULL,NULL,4,40.4,'01/01/09','4'
5,false,5,5,5,NULL,NULL,50.5,'01/01/09','5'
6,true,6,6,6,60,NULL,NULL,'01/01/09','6'
7,NULL,NULL,7,7,70,7,NULL,'01/01/09','7'
8,false,NULL,NULL,8,80,8,80.8,'01/01/09','8'
9,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'01/01/09','9'
====
# We expect that conversion errors are turned into NULLs
select id, bool_col, tinyint_col, smallint_col, int_col, bigint_col, float_col, double_col, date_string_col, string_col
from alltypeserrornonulls$TABLE
---- TYPES
int, boolean, tinyint, smallint, int, bigint, float, double, string, string
---- RESULTS
0,true,0,0,0,0,0,0,'01/01/09','0'
1,NULL,1,1,1,10,1,10.1,'01/01/09','1'
10,true,0,0,0,0,0,0,'02/01/09','0'
11,false,1,1,1,10,1,10.1,'02/01/09','1'
12,true,2,2,2,20,2,20.2,'02/01/09','2'
13,false,3,3,3,30,NULL,NULL,'02/01/09','3'
14,true,4,4,4,40,4,40.4,'02/01/09','4'
15,false,NULL,5,5,50,5,50.5,'02/01/09','5'
16,true,6,6,6,60,6,60.6,'02/01/09','6'
17,false,7,7,7,70,7,NULL,'02/01/09','7'
18,true,8,8,8,80,8,80.8,'02/01/09','8'
19,false,9,9,9,90,9,90.90000000000001,'02/01/09','9'
2,true,NULL,2,2,20,2,20.2,'01/01/09','2'
20,true,0,0,0,0,0,0,'03/01/09','0'
21,false,1,1,1,10,1,10.1,'03/01/09','1'
22,true,2,2,2,20,2,20.2,'03/01/09','2'
23,false,3,NULL,3,30,3,30.3,'03/01/09','3'
24,true,4,4,4,40,4,40.4,'03/01/09','4'
25,false,5,5,NULL,50,5,50.5,'03/01/09','5'
26,true,6,6,6,60,6,60.6,'03/01/09','6'
27,false,NULL,7,7,70,7,70.7,'03/01/09','7'
28,true,8,8,8,80,8,80.8,'03/01/09','8'
29,false,9,9,NULL,90,9,90.90000000000001,'03/01/09','9'
3,false,3,NULL,3,30,3,30.3,'01/01/09','3'
4,true,4,4,NULL,40,4,40.4,'01/01/09','4'
5,false,5,5,5,NULL,5,50.5,'01/01/09','5'
6,true,6,6,6,60,NULL,60.6,'01/01/09','6'
7,false,7,7,7,70,7,NULL,'01/01/09','7'
8,false,8,8,8,80,8,80.8,'01/01/09','8'
9,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'01/01/09','9'
====
# partition key values are materialized correctly across file boundaries
select day, month, year, string_col
from alltypesagg$TABLE
where string_col = '0'
---- TYPES
int, int, int, string
---- RESULTS
1,1,2010,'0'
10,1,2010,'0'
2,1,2010,'0'
3,1,2010,'0'
4,1,2010,'0'
5,1,2010,'0'
6,1,2010,'0'
7,1,2010,'0'
8,1,2010,'0'
9,1,2010,'0'
====
# Tests escape characters
select * from EscapeNoQuotes
---- TYPES
string, string, int, int
---- RESULTS
'one','two',3,4
'one,one','two',3,4
'one\','two',3,4
'one\,one','two',3,4
'one\\','two',3,4
====
# Test multi files non-partitioned table (hdfs)
select count(*) from AllTypesAggMultiFilesNoPart$TABLE
---- TYPES
bigint
---- RESULTS
10000
====
# Test multi files non-partitioned table (text)
select count(*) from AllTypesAggMultiFilesNoPart
---- TYPES
bigint
---- RESULTS
10000
====