DRILL-1886: Project on subquery containing a union all causes NPE