PageRenderTime 18ms CodeModel.GetById 13ms app.highlight 1ms RepoModel.GetById 2ms app.codeStats 0ms

/tags/release-0.0.0-rc0/hive/external/ql/src/test/queries/clientpositive/auto_join25.q

#
text | 28 lines | 16 code | 12 blank | 0 comment | 0 complexity | 0caff4f7ce1650837139c84f0317a6ea MD5 | raw file
 1set hive.auto.convert.join = true;
 2set hive.mapjoin.localtask.max.memory.usage = 0.0001;
 3set hive.mapjoin.check.memory.rows = 2;
 4
 5CREATE TABLE dest1(key INT, value STRING) STORED AS TEXTFILE;
 6
 7FROM srcpart src1 JOIN src src2 ON (src1.key = src2.key)
 8INSERT OVERWRITE TABLE dest1 SELECT src1.key, src2.value 
 9where (src1.ds = '2008-04-08' or src1.ds = '2008-04-09' )and (src1.hr = '12' or src1.hr = '11');
10
11SELECT sum(hash(dest1.key,dest1.value)) FROM dest1;
12
13
14
15CREATE TABLE dest_j2(key INT, value STRING) STORED AS TEXTFILE;
16
17FROM src src1 JOIN src src2 ON (src1.key = src2.key) JOIN src src3 ON (src1.key + src2.key = src3.key)
18INSERT OVERWRITE TABLE dest_j2 SELECT src1.key, src3.value;
19
20SELECT sum(hash(dest_j2.key,dest_j2.value)) FROM dest_j2;
21
22CREATE TABLE dest_j1(key INT, value STRING) STORED AS TEXTFILE;
23
24FROM src src1 JOIN src src2 ON (src1.key = src2.key)
25INSERT OVERWRITE TABLE dest_j1 SELECT src1.key, src2.value;
26
27SELECT sum(hash(dest_j1.key,dest_j1.value)) FROM dest_j1;
28