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

/tags/release-0.0.0-rc0/hive/external/ql/src/test/queries/clientnegative/union2.q

#
text | 13 lines | 10 code | 3 blank | 0 comment | 0 complexity | 735db3eda148c25fffc84b19146c0a85 MD5 | raw file
 1
 2
 3create table if not exists union2_t1(r string, c string, v string);
 4create table if not exists union2_t2(s string, c string, v string);
 5
 6explain
 7SELECT s.r, s.c, sum(s.v)
 8FROM (
 9  SELECT a.r AS r, a.c AS c, a.v AS v FROM union2_t1 a
10  UNION ALL
11  SELECT b.s AS r, b.c AS c, 0 + b.v AS v FROM union2_t2 b
12) s
13GROUP BY s.r, s.c;