In most cases, view processing merges the view definition in the main query. There are, however, cases when a view needs to be materialized, as in the case of a self-join:
create view v3(cc31, sum_c32) as select c31, sum(c32) from t3 group by c31 select * from v3 a, v3 b where a.c31 = b.c31
In such a case, the abstract plan exposes the worktable and the store operator that materializes it. The two scans of the worktable are identified through their correlation names:
(sequence (store (group_sorted (i_scan i_c31 t3) ) ) (m_join (sort (t_scan (work_t (a Worktable))) ( sort (t_scan (work_t (b Worktable))) ) ) )
The handling of vector aggregation in an abstract plan is described in the next section.