PageRenderTime 7ms CodeModel.GetById 1ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 1ms

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

#
text | 28 lines | 24 code | 4 blank | 0 comment | 0 complexity | 7a219dd2a5f644ae54547cfa1dcbf649 MD5 | raw file
 1EXPLAIN
 2SELECT /*+ MAPJOIN(z) */ subq.key1, z.value
 3FROM
 4(SELECT /*+ MAPJOIN(x) */ x.key as key1, x.value as value1, y.key as key2, y.value as value2 
 5 FROM src1 x JOIN src y ON (x.key = y.key)) subq
 6 JOIN srcpart z ON (subq.key1 = z.key and z.ds='2008-04-08' and z.hr=11);
 7 
 8SELECT /*+ MAPJOIN(z) */ subq.key1, z.value
 9FROM
10(SELECT /*+ MAPJOIN(x) */ x.key as key1, x.value as value1, y.key as key2, y.value as value2 
11 FROM src1 x JOIN src y ON (x.key = y.key)) subq
12 JOIN srcpart z ON (subq.key1 = z.key and z.ds='2008-04-08' and z.hr=11);
13 
14EXPLAIN 
15SELECT /*+ MAPJOIN(z) */ subq.key1, z.value
16FROM
17(SELECT /*+ MAPJOIN(x) */ x.key as key1, x.value as value1, y.key as key2, y.value as value2 
18 FROM src1 x JOIN src y ON (x.key = y.key)) subq
19 JOIN srcpart z ON (subq.key1 = z.key and z.ds='2008-04-08' and z.hr=11) 
20 order by subq.key1;
21
22
23SELECT /*+ MAPJOIN(z) */ subq.key1, z.value
24FROM
25(SELECT /*+ MAPJOIN(x) */ x.key as key1, x.value as value1, y.key as key2, y.value as value2  
26 FROM src1 x JOIN src y ON (x.key = y.key)) subq 
27 JOIN srcpart z ON (subq.key1 = z.key and z.ds='2008-04-08' and z.hr=11)  
28 order by subq.key1;