Affects Version/s: 1.0.0, 1.3.0
Fix Version/s: 2.0.0
In Hive for union right most type wins out for most primitive types during plan gen. However when union op gets initialized the type gets switched.
This could result in bad data & type exceptions.
This happens only in non cbo mode.
In CBO mode, Hive would add explicit type casts that would prevent such type issues.
select cd/sum(cd) over() from(select cd from u1 union all select cd from u2 union all select cd from u3)u4;