@@ -30,7 +30,7 @@ A materialized view(MV) could be use to compute a Query if:
3030
3131Vocabulary:
3232 origin_query: the SQL we want to query.
33- mv_query: for materialized view's corresponding query, the SELECT part of a Create Materialized View.
33+ view_query: the materialized view's corresponding query, SELECT part of Create Materialized View statement .
3434
3535Construct Rows
3636--------------
@@ -39,7 +39,7 @@ If MV has all rows of query needed, it means that MV query's restrictions are lo
3939For AQUMV_MVP0, we only do logistic transformation.
4040All rewrites are on the Query tree, neither Equivalent Classes nor Restrictions are used.
4141For a single relation:
42- process mv_query and origin_query's WHERE part to set:
42+ process view_query and origin_query's WHERE part to set:
4343mv_query_quals and origin_query_quals.
4444
4545example0:
@@ -134,14 +134,14 @@ mv5 has all rows {a = 1} and only have column 'a', but the query want additional
134134We couldn't rewrite it by just adding the {b = 2} to MV as no equivalent b in MV relation.
135135 Wrong: SELECT a FROM mv5 WHERE b = 2;
136136
137- The algorithm behind that is: all quals's expression could be computed from a mv_query 's target list.
137+ The algorithm behind that is: all quals's expression could be computed from a view_query 's target list.
138138That's what Construct Columns does.
139139
140140Construct Columns
141141-----------------
142142
143143A MV could be a candidate if the query's target list and the post_quals could be computed form
144- mv_query 's target list and rewrite to expressions bases on MV relation's columns itself.
144+ view_query 's target list and rewrite to expressions bases on MV relation's columns itself.
145145
146146example6:
147147 CREATE MATERIALIZED VIEW mv6 AS SELECT abs(c) as mc1, b as mc2 FROM t WHERE a = 1;
@@ -218,13 +218,13 @@ Let the planner decide the best one.
218218
219219AQUMV_MVP
220220---------
221- Support SELECT FROM a single relation both for mv_query and the origin_query.
221+ Support SELECT FROM a single relation both for view_query and the origin_query.
222222Below are not supported now:
223- Aggregation (on mv_query )
223+ Aggregation (on view_query )
224224 Subquery
225225 Join
226226 Sublink
227- Group By/Grouping Sets/Rollup/Cube (on mv_query )
227+ Group By/Grouping Sets/Rollup/Cube (on view_query )
228228 Window Functions
229229 CTE
230230 Distinct
0 commit comments