blob: fbc83bc4c1ab54894bf2a494dc5768da7a7be022 [file] [log] [blame]
-- Tests a query with union all that can be optimized by removing the union operator
create table if not exists test_table(column1 string, column2 int);
insert into test_table values('a',1),('b',2);
set hive.optimize.union.remove=true;
explain
select column1 from test_table group by column1
union all
select column1 from test_table group by column1;
select column1 from test_table group by column1
union all
select column1 from test_table group by column1;
drop table test_table;