bug5635: Optimization: Use partition elimination for from clause sub queries and views with union / union all
bug5634: Optimization: Project only the necessary columns from views with union all or union

Optimization for FROM clause subquery. Subquery only projects columns that are needed by the parent select; The
filters that only involve the FROM subquery columns are being moved to inside the FROM subquery.