DRILL-6622: Fixed a NullPointerException in a query with Union