Files
impala/testdata/workloads/functional-query/queries/QueryTest/hbase-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

473 lines
23 KiB
Plaintext

select id, bool_col, tinyint_col, smallint_col, int_col, bigint_col, float_col,
double_col, date_string_col, string_col, timestamp_col
from hbasealltypessmall
---- 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 hbasealltypessmall
---- 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
====
# Notice the columns are ordered by family/qualifier
# and are not in the order declared in the DDL
select * from hbasealltypessmall
---- TYPES
int, boolean, double, float, bigint, int, smallint, tinyint, string, string, timestamp
---- RESULTS
0,true,0,0,0,0,0,0,'01/01/09','0',2009-01-01 00:00:00
1,false,10.1,1.100000023841858,10,1,1,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,10.1,1.100000023841858,10,1,1,1,'01/02/09','1',2009-01-02 00:11:00.450000000
12,true,20.2,2.200000047683716,20,2,2,2,'01/02/09','2',2009-01-02 00:12:00.460000000
13,false,30.3,3.299999952316284,30,3,3,3,'01/02/09','3',2009-01-02 00:13:00.480000000
14,true,40.4,4.400000095367432,40,4,4,4,'01/02/09','4',2009-01-02 00:14:00.510000000
15,false,50.5,5.5,50,5,5,5,'01/02/09','5',2009-01-02 00:15:00.550000000
16,true,60.6,6.599999904632568,60,6,6,6,'01/02/09','6',2009-01-02 00:16:00.600000000
17,false,70.7,7.699999809265137,70,7,7,7,'01/02/09','7',2009-01-02 00:17:00.660000000
18,true,80.8,8.800000190734863,80,8,8,8,'01/02/09','8',2009-01-02 00:18:00.730000000
19,false,90.90000000000001,9.899999618530273,90,9,9,9,'01/02/09','9',2009-01-02 00:19:00.810000000
2,true,20.2,2.200000047683716,20,2,2,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,10.1,1.100000023841858,10,1,1,1,'01/03/09','1',2009-01-03 00:21:00.900000000
22,true,20.2,2.200000047683716,20,2,2,2,'01/03/09','2',2009-01-03 00:22:00.910000000
23,false,30.3,3.299999952316284,30,3,3,3,'01/03/09','3',2009-01-03 00:23:00.930000000
24,true,40.4,4.400000095367432,40,4,4,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,10.1,1.100000023841858,10,1,1,1,'02/01/09','1',2009-02-01 00:01:00
27,false,20.2,2.200000047683716,20,2,2,2,'02/01/09','2',2009-02-01 00:02:00.100000000
28,true,30.3,3.299999952316284,30,3,3,3,'02/01/09','3',2009-02-01 00:03:00.300000000
29,false,40.4,4.400000095367432,40,4,4,4,'02/01/09','4',2009-02-01 00:04:00.600000000
3,false,30.3,3.299999952316284,30,3,3,3,'01/01/09','3',2009-01-01 00:03:00.300000000
30,true,50.5,5.5,50,5,5,5,'02/01/09','5',2009-02-01 00:05:00.100000000
31,false,60.6,6.599999904632568,60,6,6,6,'02/01/09','6',2009-02-01 00:06:00.150000000
32,true,70.7,7.699999809265137,70,7,7,7,'02/01/09','7',2009-02-01 00:07:00.210000000
33,false,80.8,8.800000190734863,80,8,8,8,'02/01/09','8',2009-02-01 00:08:00.280000000
34,true,90.90000000000001,9.899999618530273,90,9,9,9,'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,10.1,1.100000023841858,10,1,1,1,'02/02/09','1',2009-02-02 00:11:00.450000000
37,false,20.2,2.200000047683716,20,2,2,2,'02/02/09','2',2009-02-02 00:12:00.460000000
38,true,30.3,3.299999952316284,30,3,3,3,'02/02/09','3',2009-02-02 00:13:00.480000000
39,false,40.4,4.400000095367432,40,4,4,4,'02/02/09','4',2009-02-02 00:14:00.510000000
4,true,40.4,4.400000095367432,40,4,4,4,'01/01/09','4',2009-01-01 00:04:00.600000000
40,true,50.5,5.5,50,5,5,5,'02/02/09','5',2009-02-02 00:15:00.550000000
41,false,60.6,6.599999904632568,60,6,6,6,'02/02/09','6',2009-02-02 00:16:00.600000000
42,true,70.7,7.699999809265137,70,7,7,7,'02/02/09','7',2009-02-02 00:17:00.660000000
43,false,80.8,8.800000190734863,80,8,8,8,'02/02/09','8',2009-02-02 00:18:00.730000000
44,true,90.90000000000001,9.899999618530273,90,9,9,9,'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,10.1,1.100000023841858,10,1,1,1,'02/03/09','1',2009-02-03 00:21:00.900000000
47,false,20.2,2.200000047683716,20,2,2,2,'02/03/09','2',2009-02-03 00:22:00.910000000
48,true,30.3,3.299999952316284,30,3,3,3,'02/03/09','3',2009-02-03 00:23:00.930000000
49,false,40.4,4.400000095367432,40,4,4,4,'02/03/09','4',2009-02-03 00:24:00.960000000
5,false,50.5,5.5,50,5,5,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,10.1,1.100000023841858,10,1,1,1,'03/01/09','1',2009-03-01 00:01:00
52,true,20.2,2.200000047683716,20,2,2,2,'03/01/09','2',2009-03-01 00:02:00.100000000
53,false,30.3,3.299999952316284,30,3,3,3,'03/01/09','3',2009-03-01 00:03:00.300000000
54,true,40.4,4.400000095367432,40,4,4,4,'03/01/09','4',2009-03-01 00:04:00.600000000
55,false,50.5,5.5,50,5,5,5,'03/01/09','5',2009-03-01 00:05:00.100000000
56,true,60.6,6.599999904632568,60,6,6,6,'03/01/09','6',2009-03-01 00:06:00.150000000
57,false,70.7,7.699999809265137,70,7,7,7,'03/01/09','7',2009-03-01 00:07:00.210000000
58,true,80.8,8.800000190734863,80,8,8,8,'03/01/09','8',2009-03-01 00:08:00.280000000
59,false,90.90000000000001,9.899999618530273,90,9,9,9,'03/01/09','9',2009-03-01 00:09:00.360000000
6,true,60.6,6.599999904632568,60,6,6,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,10.1,1.100000023841858,10,1,1,1,'03/02/09','1',2009-03-02 00:11:00.450000000
62,true,20.2,2.200000047683716,20,2,2,2,'03/02/09','2',2009-03-02 00:12:00.460000000
63,false,30.3,3.299999952316284,30,3,3,3,'03/02/09','3',2009-03-02 00:13:00.480000000
64,true,40.4,4.400000095367432,40,4,4,4,'03/02/09','4',2009-03-02 00:14:00.510000000
65,false,50.5,5.5,50,5,5,5,'03/02/09','5',2009-03-02 00:15:00.550000000
66,true,60.6,6.599999904632568,60,6,6,6,'03/02/09','6',2009-03-02 00:16:00.600000000
67,false,70.7,7.699999809265137,70,7,7,7,'03/02/09','7',2009-03-02 00:17:00.660000000
68,true,80.8,8.800000190734863,80,8,8,8,'03/02/09','8',2009-03-02 00:18:00.730000000
69,false,90.90000000000001,9.899999618530273,90,9,9,9,'03/02/09','9',2009-03-02 00:19:00.810000000
7,false,70.7,7.699999809265137,70,7,7,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,10.1,1.100000023841858,10,1,1,1,'03/03/09','1',2009-03-03 00:21:00.900000000
72,true,20.2,2.200000047683716,20,2,2,2,'03/03/09','2',2009-03-03 00:22:00.910000000
73,false,30.3,3.299999952316284,30,3,3,3,'03/03/09','3',2009-03-03 00:23:00.930000000
74,true,40.4,4.400000095367432,40,4,4,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,10.1,1.100000023841858,10,1,1,1,'04/01/09','1',2009-04-01 00:01:00
77,false,20.2,2.200000047683716,20,2,2,2,'04/01/09','2',2009-04-01 00:02:00.100000000
78,true,30.3,3.299999952316284,30,3,3,3,'04/01/09','3',2009-04-01 00:03:00.300000000
79,false,40.4,4.400000095367432,40,4,4,4,'04/01/09','4',2009-04-01 00:04:00.600000000
8,true,80.8,8.800000190734863,80,8,8,8,'01/01/09','8',2009-01-01 00:08:00.280000000
80,true,50.5,5.5,50,5,5,5,'04/01/09','5',2009-04-01 00:05:00.100000000
81,false,60.6,6.599999904632568,60,6,6,6,'04/01/09','6',2009-04-01 00:06:00.150000000
82,true,70.7,7.699999809265137,70,7,7,7,'04/01/09','7',2009-04-01 00:07:00.210000000
83,false,80.8,8.800000190734863,80,8,8,8,'04/01/09','8',2009-04-01 00:08:00.280000000
84,true,90.90000000000001,9.899999618530273,90,9,9,9,'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,10.1,1.100000023841858,10,1,1,1,'04/02/09','1',2009-04-02 00:11:00.450000000
87,false,20.2,2.200000047683716,20,2,2,2,'04/02/09','2',2009-04-02 00:12:00.460000000
88,true,30.3,3.299999952316284,30,3,3,3,'04/02/09','3',2009-04-02 00:13:00.480000000
89,false,40.4,4.400000095367432,40,4,4,4,'04/02/09','4',2009-04-02 00:14:00.510000000
9,false,90.90000000000001,9.899999618530273,90,9,9,9,'01/01/09','9',2009-01-01 00:09:00.360000000
90,true,50.5,5.5,50,5,5,5,'04/02/09','5',2009-04-02 00:15:00.550000000
91,false,60.6,6.599999904632568,60,6,6,6,'04/02/09','6',2009-04-02 00:16:00.600000000
92,true,70.7,7.699999809265137,70,7,7,7,'04/02/09','7',2009-04-02 00:17:00.660000000
93,false,80.8,8.800000190734863,80,8,8,8,'04/02/09','8',2009-04-02 00:18:00.730000000
94,true,90.90000000000001,9.899999618530273,90,9,9,9,'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,10.1,1.100000023841858,10,1,1,1,'04/03/09','1',2009-04-03 00:21:00.900000000
97,false,20.2,2.200000047683716,20,2,2,2,'04/03/09','2',2009-04-03 00:22:00.910000000
98,true,30.3,3.299999952316284,30,3,3,3,'04/03/09','3',2009-04-03 00:23:00.930000000
99,false,40.4,4.400000095367432,40,4,4,4,'04/03/09','4',2009-04-03 00:24:00.960000000
====
select count(*) from hbasealltypesagg where smallint_col is null and string_col is not null
---- TYPES
bigint
---- RESULTS
100
====
# show that the hdfs table has identical results
select count(*) from alltypesagg where smallint_col is null and string_col is not null
---- TYPES
bigint
---- RESULTS
100
====
# HBase does not return rows if the selected columns don't exist.
# Since only smallint_col is selected, those expected NULLs don't appear.
# Therefore, the result returned by this query is zero.
select count(*) from hbasealltypesagg where smallint_col is null
---- TYPES
bigint
---- RESULTS
0
====
# Compare this hdfs-equivalent query with the above one.
select count(*) from alltypesagg where smallint_col is null
---- TYPES
bigint
---- RESULTS
100
====
# test adapted from aggregation.test but using the hbase equivalent table
select tinyint_col, count(bool_col) from hbasealltypesagg group by 1
---- TYPES
tinyint, bigint
---- RESULTS
1,1000
2,1000
3,1000
4,1000
5,1000
6,1000
7,1000
8,1000
9,1000
NULL,1000
====
# test adapted from aggregation.test but using the hbase equivalent table
# notice that the NULL value is missing because HBase does not
# return those rows where tinyint_col does not exist
select tinyint_col, count(*) from hbasealltypesagg group by 1
---- TYPES
tinyint, bigint
---- RESULTS
1,1000
2,1000
3,1000
4,1000
5,1000
6,1000
7,1000
8,1000
9,1000
====
select tinyint_col, int_col % 10, count(*) from hbasealltypesagg group by 1, 2
---- TYPES
tinyint, int, bigint
---- RESULTS
1,1,1000
2,2,1000
3,3,1000
4,4,1000
5,5,1000
6,6,1000
7,7,1000
8,8,1000
9,9,1000
NULL,0,990
====
select tinyint_col, count(*) from hbasealltypesagg where (int_col % 10) = 0 group by tinyint_col
---- TYPES
tinyint, bigint
---- RESULTS
NULL,990
====
select * from hbasealltypeserrornonulls
---- TYPES
int, boolean, double, float, bigint, int, smallint, tinyint, string, string, timestamp
---- RESULTS
0,true,0,0,0,0,0,0,'01/01/09','0',NULL
1,NULL,10.1,1,10,1,1,1,'01/01/09','1',NULL
10,true,0,0,0,0,0,0,'02/01/09','0',2012-03-22 11:20:01.123000000
11,false,10.1,1,10,1,1,1,'02/01/09','1',2012-03-22 11:20:01.123000000
12,true,20.2,2,20,2,2,2,'02/01/09','2',2012-03-22 11:20:01.123000000
13,false,NULL,NULL,30,3,3,3,'02/01/09','3',2012-03-22 11:20:01.123000000
14,true,40.4,4,40,4,4,4,'02/01/09','4',2012-03-22 11:20:01.123000000
15,false,50.5,5,50,5,5,NULL,'02/01/09','5',2012-03-22 11:20:01.123000000
16,true,60.6,6,60,6,6,6,'02/01/09','6',2012-03-22 11:20:01.123000000
17,false,NULL,7,70,7,7,7,'02/01/09','7',2012-03-22 11:20:01.123000000
18,true,80.8,8,80,8,8,8,'02/01/09','8',2012-03-22 11:20:01.123000000
19,false,90.90000000000001,9,90,9,9,9,'02/01/09','9',2012-03-22 11:20:01.123000000
2,true,20.2,2,20,2,2,NULL,'01/01/09','2',2012-03-22 11:20:01.123000000
20,true,0,0,0,0,0,0,'03/01/09','0',2012-03-22 11:20:01.123000000
21,false,10.1,1,10,1,1,1,'03/01/09','1',2012-03-22 11:20:01.123000000
22,true,20.2,2,20,2,2,2,'03/01/09','2',2012-03-22 11:20:01.123000000
23,false,30.3,3,30,3,NULL,3,'03/01/09','3',2012-03-22 11:20:01.123000000
24,true,40.4,4,40,4,4,4,'03/01/09','4',2012-03-22 11:20:01.123000000
25,false,50.5,5,50,NULL,5,5,'03/01/09','5',2012-03-22 11:20:01.123000000
26,true,60.6,6,60,6,6,6,'03/01/09','6',2012-03-22 11:20:01.123000000
27,false,70.7,7,70,7,7,NULL,'03/01/09','7',2012-03-22 11:20:01.123000000
28,true,80.8,8,80,8,8,8,'03/01/09','8',NULL
29,false,90.90000000000001,9,90,NULL,9,9,'03/01/09','9',2012-03-22
3,false,30.3,3,30,3,NULL,3,'01/01/09','3',2012-03-22 11:20:01.123000000
4,true,40.4,4,40,NULL,4,4,'01/01/09','4',2012-03-22 11:20:01.123000000
5,false,50.5,5,NULL,5,5,5,'01/01/09','5',2012-03-22 11:20:01.123000000
6,true,60.6,NULL,60,6,6,6,'01/01/09','6',2012-03-22 11:20:01.123000000
7,false,NULL,7,70,7,7,7,'01/01/09','7',2012-03-22 11:20:01.123000000
8,false,80.8,8,80,8,8,8,'01/01/09','8',2012-03-22 11:20:01.123000000
9,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'01/01/09','9',2012-03-22 11:20:01.123000000
====
select * from hbasealltypeserror
---- TYPES
int, boolean, double, float, bigint, int, smallint, tinyint, string, string, timestamp
---- RESULTS
0,NULL,0,0,0,0,0,NULL,'01/01/09','0',00:00:00
1,NULL,10.1,1,10,1,1,NULL,'01/01/09','1',1999-10-10
10,NULL,0,0,0,0,NULL,NULL,'02/01/09','0',2009-01-01 00:00:00
11,false,10.1,1,10,NULL,NULL,NULL,'02/01/09','1',2009-01-01 00:00:00
12,true,20.2,2,NULL,NULL,NULL,2,'02/01/09','2',2009-01-01 00:00:00
13,false,NULL,NULL,NULL,NULL,3,3,'02/01/09','3',2009-01-01 00:00:00
14,true,NULL,NULL,40,4,4,4,'02/01/09','4',2009-01-01 00:00:00
15,false,50.5,5,50,5,5,NULL,'02/01/09','5',NULL
16,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'02/01/09','6',00:00:00
17,false,NULL,7,70,7,7,7,'02/01/09','7',2009-01-01 00:00:00
18,true,80.8,8,80,8,8,8,'02/01/09','8',2009-01-01 00:00:00
19,false,90.90000000000001,9,90,9,9,9,'02/01/09','9',2009-01-01 00:00:00
2,true,20.2,2,20,2,NULL,NULL,'01/01/09','2',1999-10-13 18:10:10
20,true,0,0,0,0,0,0,'03/01/09','0',2020-10-10 10:10:10.123000000
21,false,10.1,1,10,1,1,1,'03/01/09','1',NULL
22,true,20.2,2,20,2,2,2,'03/01/09','2',NULL
23,false,30.3,3,30,3,NULL,3,'03/01/09','3',2020-10-12 12:10:10.123000000
24,true,40.4,4,40,4,4,4,'03/01/09','4',2020-10-10 11:10:10.123000000
25,false,50.5,5,50,NULL,5,5,'03/01/09','5',2020-10-10 10:10:10.123000000
26,true,60.6,6,60,6,6,6,'03/01/09','6',2020-10-10 10:10:10.123000000
27,false,70.7,7,70,7,7,NULL,'03/01/09','7',2020-10-10 10:10:10.123000000
28,true,80.8,8,80,8,8,8,'03/01/09','8',2020-10-10 10:10:10.123000000
29,false,90.90000000000001,9,90,NULL,9,9,'03/01/09','9',2020-10-10 10:10:10.123000000
3,false,30.3,3,30,NULL,NULL,3,'01/01/09','3',NULL
4,true,40.4,4,NULL,NULL,4,4,'01/01/09','4',1970-01-01 00:00:00
5,false,50.5,NULL,NULL,5,5,5,'01/01/09','5',1970-01-01 00:00:00
6,true,NULL,NULL,60,6,6,6,'01/01/09','6',1970-01-01 00:00:00
7,NULL,NULL,7,70,7,7,NULL,'01/01/09','7',1970-01-01 00:00:00
8,false,80.8,8,80,8,NULL,NULL,'01/01/09','8',1970-01-01 00:00:00
9,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'01/01/09','9',NULL
====