Details

HIVE-384. Fixing UNION ALL when the first job is a map-only job. (Namit Jain via zshao)

Description

Union needs special handling.

explain
select unionsrc.key, count(1) FROM (select s2.key as key, s2.value as value from src1 s2
UNION ALL
select 'tst1' as key, cast(count(1) as string) as value from src s1)
unionsrc group by unionsrc.key;