HIVE-6566: Incorrect union-all plan with map-joins on Tez (Gunther Hagleitner, reviewed by Sergey Shelukhin)