@Override
  public boolean opAllowedBeforeMapJoin() {
    return false;
  }
Union operators are not allowed either before or after a explicit mapjoin hint.
Note that, the same query would just work without the mapjoin hint (by setting
hive.auto.convert.join to true).
ql/src/java/org/apache/hadoop/hive/ql/exec/UnionOperator.java