Skip to content

Commit 47fe6d9

Browse files
Clean some typos about IVM (apache#825)
No code changes. Just clean some typos about IVM‘s comments. Parts of typos are from pg_ivm.
1 parent 976e4c8 commit 47fe6d9

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

src/backend/commands/createas.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1346,7 +1346,7 @@ check_ivm_restriction_walker(Node *node, check_ivm_restriction_context *context)
13461346
if (qry->havingQual != NULL)
13471347
ereport(ERROR,
13481348
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
1349-
errmsg(" HAVING clause is not supported on incrementally maintainable materialized view")));
1349+
errmsg("HAVING clause is not supported on incrementally maintainable materialized view")));
13501350
if (qry->sortClause != NIL) /* There is a possibility that we don't need to return an error */
13511351
ereport(ERROR,
13521352
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),

src/backend/commands/matview.c

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ ExecRefreshMatView(RefreshMatViewStmt *stmt, const char *queryString,
510510

511511
/*
512512
* Fast path to REFRESH a view:
513-
* avoid do the real REFRESH if the data of view
513+
* avoid doing the real REFRESH if the data of view
514514
* is up to date. The data should be the logically same as after
515515
* REFRESH when there is data changed since latest REFRESH.
516516
* In that case we may save a lot, ex: a cron task REFRESH view periodically
@@ -772,17 +772,17 @@ refresh_matview_datafill(DestReceiver *dest, Query *query,
772772

773773
/*
774774
* Cloudberry specific behavior:
775-
* MPP architecture need to make sure OIDs of the temp table are the same
775+
* MPP architecture needs to make sure OIDs of the temp table are the same
776776
* among QD and all QEs. It stores the OID in the static variable dispatch_oids.
777777
* This variable will be consumed for each dispatch.
778778
*
779779
* During planning, Cloudberry might pre-evalute some function expr, this will
780-
* lead to dispatch if the function is in SQL or PLPGSQL and consume the above
780+
* lead to dispatch if the function is in SQL or PLPGSQL and consumes the above
781781
* static variable. So later refresh matview's dispatch will not find the
782782
* oid on QEs.
783783
*
784784
* We first store the OIDs information in a local variable, and then restore
785-
* it for later refresh matview's dispatch to solve the above issue.
785+
* it is for later refresh matview's dispatch to solve the above issue.
786786
*
787787
* See Github Issue for details: https://github.com/greenplum-db/gpdb/issues/11956
788788
*/
@@ -2897,7 +2897,7 @@ get_operation_string(IvmOp op, const char *col, const char *arg1, const char *ar
28972897
* get_null_condition_string
28982898
*
28992899
* Build a predicate string for CASE clause to check if an aggregate value
2900-
* will became NULL after the given operation is applied.
2900+
* will become NULL after the given operation is applied.
29012901
*/
29022902
static char *
29032903
get_null_condition_string(IvmOp op, const char *arg1, const char *arg2,
@@ -2933,12 +2933,12 @@ get_null_condition_string(IvmOp op, const char *arg1, const char *arg2,
29332933
/*
29342934
* apply_old_delta_with_count
29352935
*
2936-
* Execute a query for applying a delta table given by deltname_old
2937-
* which contains tuples to be deleted from to a materialized view given by
2936+
* Execute a query for applying a delta table given by deltaname_old
2937+
* which contains tuples to be deleted from a materialized view given by
29382938
* matviewname. This is used when counting is required, that is, the view
29392939
* has aggregate or distinct.
29402940
*
2941-
* If the view desn't have aggregates or has GROUP BY, this requires a keys
2941+
* If the view doesn't have aggregates or has GROUP BY, this requires a keys
29422942
* list to identify a tuple in the view. If the view has aggregates, this
29432943
* requires strings representing resnames of aggregates and SET clause for
29442944
* updating aggregate values.
@@ -3047,8 +3047,8 @@ apply_old_delta_with_count(const char *matviewname, Oid matviewRelid, const char
30473047
/*
30483048
* apply_old_delta
30493049
*
3050-
* Execute a query for applying a delta table given by deltname_old
3051-
* which contains tuples to be deleted from to a materialized view given by
3050+
* Execute a query for applying a delta table given by deltaname_old
3051+
* which contains tuples to be deleted from a materialized view given by
30523052
* matviewname. This is used when counting is not required.
30533053
*/
30543054
static void
@@ -3097,13 +3097,13 @@ apply_old_delta(const char *matviewname, const char *deltaname_old,
30973097
/*
30983098
* apply_new_delta_with_count
30993099
*
3100-
* Execute a query for applying a delta table given by deltname_new
3100+
* Execute a query for applying a delta table given by deltaname_new
31013101
* which contains tuples to be inserted into a materialized view given by
31023102
* matviewname. This is used when counting is required, that is, the view
31033103
* has aggregate or distinct. Also, when a table in EXISTS sub queries
31043104
* is modified.
31053105
*
3106-
* If the view desn't have aggregates or has GROUP BY, this requires a keys
3106+
* If the view doesn't have aggregates or has GROUP BY, this requires a keys
31073107
* list to identify a tuple in the view. If the view has aggregates, this
31083108
* requires strings representing SET clause for updating aggregate values.
31093109
*/
@@ -3188,7 +3188,7 @@ apply_new_delta_with_count(const char *matviewname, const char* deltaname_new,
31883188
/*
31893189
* apply_new_delta
31903190
*
3191-
* Execute a query for applying a delta table given by deltname_new
3191+
* Execute a query for applying a delta table given by deltaname_new
31923192
* which contains tuples to be inserted into a materialized view given by
31933193
* matviewname. This is used when counting is not required.
31943194
*/
@@ -3458,7 +3458,7 @@ clean_up_ivm_dsm_entry(MV_TriggerHashEntry *entry)
34583458
/*
34593459
* isIvmName
34603460
*
3461-
* Check if this is a IVM hidden column from the name.
3461+
* Check if this is an IVM hidden column from the name.
34623462
*/
34633463
bool
34643464
isIvmName(const char *s)

src/test/regress/expected/incremental_matview.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -882,7 +882,7 @@ CREATE INCREMENTAL MATERIALIZED VIEW mv_ivm07 AS SELECT i,j,k FROM mv_base_a a I
882882
ERROR: ORDER BY clause is not supported on incrementally maintainable materialized view
883883
-- contain HAVING
884884
CREATE INCREMENTAL MATERIALIZED VIEW mv_ivm08 AS SELECT i,j,k FROM mv_base_a a INNER JOIN mv_base_b b USING(i) GROUP BY i,j,k HAVING SUM(i) > 5;
885-
ERROR: HAVING clause is not supported on incrementally maintainable materialized view
885+
ERROR: HAVING clause is not supported on incrementally maintainable materialized view
886886
-- contain view or materialized view
887887
CREATE VIEW b_view AS SELECT i,k FROM mv_base_b;
888888
CREATE MATERIALIZED VIEW b_mview AS SELECT i,k FROM mv_base_b;

0 commit comments

Comments
 (0)