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

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

#
text | 18 lines | 13 code | 5 blank | 0 comment | 0 complexity | 8e6843eb5811d7ff349a068455b0aee5 MD5 | raw file
 1set hive.map.aggr = true;
 2
 3-- union case: 1 subquery is a map-reduce job, different inputs for sub-queries, followed by reducesink
 4
 5explain 
 6  select unionsrc.key, count(1) FROM (select 'tst1' as key, cast(count(1) as string) as value from src s1
 7                                        UNION  ALL  
 8                                            select s2.key as key, s2.value as value from src1 s2
 9                                        UNION  ALL  
10                                            select s3.key as key, s3.value as value from src1 s3) unionsrc group by unionsrc.key;
11
12  select unionsrc.key, count(1) FROM (select 'tst1' as key, cast(count(1) as string) as value from src s1
13                                        UNION  ALL  
14                                            select s2.key as key, s2.value as value from src1 s2
15                                        UNION  ALL  
16                                            select s3.key as key, s3.value as value from src1 s3) unionsrc group by unionsrc.key;
17
18