From bf7d86a3e8605aad07b7f5bda92db939af2f4bb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20Dub=C3=A9?= Date: Fri, 27 Dec 2019 22:16:19 +0000 Subject: [PATCH] Fix typo: aggragate -> aggregate --- .../planner/multi_logical_optimizer.c | 20 +++++++++---------- .../expected/multi_mx_router_planner.out | 2 +- .../regress/expected/multi_router_planner.out | 2 +- .../multi_router_planner_fast_path.out | 2 +- .../regress/expected/window_functions.out | 2 +- .../regress/sql/multi_mx_router_planner.sql | 2 +- src/test/regress/sql/multi_router_planner.sql | 2 +- .../sql/multi_router_planner_fast_path.sql | 2 +- src/test/regress/sql/window_functions.sql | 2 +- 9 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/backend/distributed/planner/multi_logical_optimizer.c b/src/backend/distributed/planner/multi_logical_optimizer.c index 1583d8f11..bffaf4d1a 100644 --- a/src/backend/distributed/planner/multi_logical_optimizer.c +++ b/src/backend/distributed/planner/multi_logical_optimizer.c @@ -206,7 +206,7 @@ static Expr * AddTypeConversion(Node *originalAggregate, Node *newExpression); static MultiExtendedOp * WorkerExtendedOpNode(MultiExtendedOp *originalOpNode, ExtendedOpNodeProperties * extendedOpNodeProperties); -static bool TargetListHasAggragates(List *targetEntryList); +static bool TargetListHasAggregates(List *targetEntryList); static void ProcessTargetListForWorkerQuery(List *targetEntryList, ExtendedOpNodeProperties * extendedOpNodeProperties, @@ -2176,7 +2176,7 @@ WorkerExtendedOpNode(MultiExtendedOp *originalOpNode, bool hasDistinctOn = originalOpNode->hasDistinctOn; int originalGroupClauseLength = list_length(originalGroupClauseList); - bool queryHasAggregates = TargetListHasAggragates(originalTargetEntryList); + bool queryHasAggregates = TargetListHasAggregates(originalTargetEntryList); /* initialize to default values */ memset(&queryTargetList, 0, sizeof(queryTargetList)); @@ -2288,7 +2288,7 @@ WorkerExtendedOpNode(MultiExtendedOp *originalOpNode, * the worker with two expressions count() and sum(). Thus, a single target entry * might end up with multiple expressions in the worker query. * - * The function doesn't change the aggragates in the window functions and sends them + * The function doesn't change the aggregates in the window functions and sends them * as-is. The reason is that Citus currently only supports pushing down window * functions as-is. As we implement pull-to-master window functions, we should * revisit here as well. @@ -2519,9 +2519,9 @@ ProcessDistinctClauseForWorkerQuery(List *distinctClause, bool hasDistinctOn, * Note that even though Citus only pushes down the window functions, it may need to * modify the target list of the worker query when the window function refers to * an avg(). The reason is that any aggregate which is also referred by other - * target entries would be mutated by Citus. Thus, we add a copy of the same aggragate + * target entries would be mutated by Citus. Thus, we add a copy of the same aggregate * to the worker target list to make sure that the window function refers to the - * non-mutated aggragate. + * non-mutated aggregate. * * inputs: windowClauseList, originalTargetEntryList * outputs: queryWindowClause, queryTargetList @@ -2563,8 +2563,8 @@ ProcessWindowFunctionsForWorkerQuery(List *windowClauseList, /* * Note that even Citus does push down the window clauses as-is, we may still need to - * add the generated entries to the target list. The reason is that the same aggragates - * might be referred from another target entry that is a bare aggragate (e.g., no window + * add the generated entries to the target list. The reason is that the same aggregates + * might be referred from another target entry that is a bare aggregate (e.g., no window * functions), which would have been mutated. For instance, when an average aggregate * is mutated on the target list, the window function would refer to a sum aggregate, * which is obviously wrong. @@ -2651,11 +2651,11 @@ BuildOrderByLimitReference(bool hasDistinctOn, bool groupedByDisjointPartitionCo /* - * TargetListHasAggragates returns true if any of the elements in the - * target list contain aggragates that are not inside the window functions. + * TargetListHasAggregates returns true if any of the elements in the + * target list contain aggregates that are not inside the window functions. */ static bool -TargetListHasAggragates(List *targetEntryList) +TargetListHasAggregates(List *targetEntryList) { ListCell *targetEntryCell = NULL; diff --git a/src/test/regress/expected/multi_mx_router_planner.out b/src/test/regress/expected/multi_mx_router_planner.out index 3e2cd40ff..791b86a46 100644 --- a/src/test/regress/expected/multi_mx_router_planner.out +++ b/src/test/regress/expected/multi_mx_router_planner.out @@ -1330,7 +1330,7 @@ CREATE TEMP TABLE temp_articles_hash_mx as DEBUG: Creating router plan DEBUG: Plan is router executable DETAIL: distribution column value: 1 --- router plannable queries may include filter for aggragates +-- router plannable queries may include filter for aggregates SELECT count(*), count(*) FILTER (WHERE id < 3) FROM articles_hash_mx WHERE author_id = 1; diff --git a/src/test/regress/expected/multi_router_planner.out b/src/test/regress/expected/multi_router_planner.out index 2b470c5dc..15409515f 100644 --- a/src/test/regress/expected/multi_router_planner.out +++ b/src/test/regress/expected/multi_router_planner.out @@ -2178,7 +2178,7 @@ CREATE TEMP TABLE temp_articles_hash as DEBUG: Creating router plan DEBUG: Plan is router executable DETAIL: distribution column value: 1 --- router plannable queries may include filter for aggragates +-- router plannable queries may include filter for aggregates SELECT count(*), count(*) FILTER (WHERE id < 3) FROM articles_hash WHERE author_id = 1; diff --git a/src/test/regress/expected/multi_router_planner_fast_path.out b/src/test/regress/expected/multi_router_planner_fast_path.out index d9e4f136c..7799e6365 100644 --- a/src/test/regress/expected/multi_router_planner_fast_path.out +++ b/src/test/regress/expected/multi_router_planner_fast_path.out @@ -1470,7 +1470,7 @@ DEBUG: Distributed planning for a fast-path router query DEBUG: Creating router plan DEBUG: Plan is router executable DETAIL: distribution column value: 1 --- fast-path router plannable queries may include filter for aggragates +-- fast-path router plannable queries may include filter for aggregates SELECT count(*), count(*) FILTER (WHERE id < 3) FROM articles_hash WHERE author_id = 1; diff --git a/src/test/regress/expected/window_functions.out b/src/test/regress/expected/window_functions.out index bc5d45914..3cdfdff85 100644 --- a/src/test/regress/expected/window_functions.out +++ b/src/test/regress/expected/window_functions.out @@ -263,7 +263,7 @@ ORDER BY LIMIT 10; ERROR: could not run distributed query because the window function that is used cannot be pushed down HINT: Window functions are supported in two ways. Either add an equality filter on the distributed tables' partition column or use the window functions with a PARTITION BY clause containing the distribution column --- ORDER BY in the window function is an aggragate +-- ORDER BY in the window function is an aggregate SELECT user_id, rank() OVER my_win as rnk, avg(value_2) as avg_val_2 FROM diff --git a/src/test/regress/sql/multi_mx_router_planner.sql b/src/test/regress/sql/multi_mx_router_planner.sql index 5734220cd..8f93f1b3e 100644 --- a/src/test/regress/sql/multi_mx_router_planner.sql +++ b/src/test/regress/sql/multi_mx_router_planner.sql @@ -569,7 +569,7 @@ CREATE TEMP TABLE temp_articles_hash_mx as WHERE author_id = 1 ORDER BY id; --- router plannable queries may include filter for aggragates +-- router plannable queries may include filter for aggregates SELECT count(*), count(*) FILTER (WHERE id < 3) FROM articles_hash_mx WHERE author_id = 1; diff --git a/src/test/regress/sql/multi_router_planner.sql b/src/test/regress/sql/multi_router_planner.sql index 5bbcdebb3..8a062089f 100644 --- a/src/test/regress/sql/multi_router_planner.sql +++ b/src/test/regress/sql/multi_router_planner.sql @@ -1016,7 +1016,7 @@ CREATE TEMP TABLE temp_articles_hash as WHERE author_id = 1 ORDER BY id; --- router plannable queries may include filter for aggragates +-- router plannable queries may include filter for aggregates SELECT count(*), count(*) FILTER (WHERE id < 3) FROM articles_hash WHERE author_id = 1; diff --git a/src/test/regress/sql/multi_router_planner_fast_path.sql b/src/test/regress/sql/multi_router_planner_fast_path.sql index c4c1ad33e..05879f363 100644 --- a/src/test/regress/sql/multi_router_planner_fast_path.sql +++ b/src/test/regress/sql/multi_router_planner_fast_path.sql @@ -635,7 +635,7 @@ CREATE TEMP TABLE temp_articles_hash as WHERE author_id = 1 ORDER BY id; --- fast-path router plannable queries may include filter for aggragates +-- fast-path router plannable queries may include filter for aggregates SELECT count(*), count(*) FILTER (WHERE id < 3) FROM articles_hash WHERE author_id = 1; diff --git a/src/test/regress/sql/window_functions.sql b/src/test/regress/sql/window_functions.sql index 728abf2f2..6fb378f9e 100644 --- a/src/test/regress/sql/window_functions.sql +++ b/src/test/regress/sql/window_functions.sql @@ -150,7 +150,7 @@ ORDER BY rnk DESC, 1 DESC LIMIT 10; --- ORDER BY in the window function is an aggragate +-- ORDER BY in the window function is an aggregate SELECT user_id, rank() OVER my_win as rnk, avg(value_2) as avg_val_2 FROM