Projecting values from a single column, from the output of Union All results in SqlValidatorException: Column count mismatch in Union All.
Tests were run on a 4 node cluster.
case 1) select distinct values from column, fails.
case 2) select non distinct values from column fails.
Results returned by the sub-query.(this sub-query is used in the Union All query above in case 1 and case 2)
Case where, select * from (Query 1) Union All (Query 2); This query returns correct results. this is the case where we project all columns from output of Union All
Data from the test file used in above tests
Stack trace from drillbit.log