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

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

#
text | 25 lines | 20 code | 5 blank | 0 comment | 0 complexity | a2c774d01347d43593a1dcc7160643aa MD5 | raw file
 1
 2
 3set hive.auto.convert.join = true;
 4
 5
 6explain
 7SELECT sum(hash(src1.c1, src2.c4)) 
 8FROM
 9(SELECT src.key as c1, src.value as c2 from src) src1
10JOIN
11(SELECT src.key as c3, src.value as c4 from src) src2
12ON src1.c1 = src2.c3 AND src1.c1 < 100
13JOIN
14(SELECT src.key as c5, src.value as c6 from src) src3
15ON src1.c1 = src3.c5 AND src3.c5 < 80;
16
17SELECT sum(hash(src1.c1, src2.c4)) 
18FROM
19(SELECT src.key as c1, src.value as c2 from src) src1
20JOIN
21(SELECT src.key as c3, src.value as c4 from src) src2
22ON src1.c1 = src2.c3 AND src1.c1 < 100
23JOIN
24(SELECT src.key as c5, src.value as c6 from src) src3
25ON src1.c1 = src3.c5 AND src3.c5 < 80;