I have a query which uses union all to combine data from two tables. The first query before union all returns records but the second query returns no records ( zero records only for this run. We may have records for the next load). The issue is hive throws a Nullpointer Exception when i do not have any records from the second query.
select col1,col2,col3 from A
union all
select col1,col2,col3 from B
I have records in A table. But, number of records in B table may vary depending on each load. Query works perfectly when there are records in B table.
I'm aware of the fact that this is a bug in hive until the version 0.12. But i'm using version 0.14. Any ideas what could be the root cause.
Note: My B table is partitioned. When i remove the partition, I do not face any issue. But partition is required.