Merge pull request #3488 from citusdata/fix-typos

Fix typos noticed while reading through code trying to understand HAVING
pull/3482/head^2
Hadi Moshayedi 2020-02-11 15:40:13 -08:00 committed by GitHub
commit fc1fe0244e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
21 changed files with 34 additions and 62 deletions

View File

@ -140,8 +140,8 @@ FileOpenForTransmit(const char *filename, int fileFlags, int fileMode)
{
struct stat fileStat;
int fileStated = stat(filename, &fileStat);
if (fileStated >= 0)
int statOK = stat(filename, &fileStat);
if (statOK >= 0)
{
if (S_ISDIR(fileStat.st_mode))
{

View File

@ -1,27 +0,0 @@
# ------------------------------------------
# Citus Database Worker Node Membership List
# ------------------------------------------
#
# This file contains list of worker node names; these names are used both for
# initializing the worker nodes, and later for communicating with them. Records
# in this file are in the following format:
#
# HOSTNAME [PORT] [RACK]
#
# (The uppercase items must be replaced by actual values.)
#
# HOSTNAME specifies the DNS resolvable host name for the worker node. In test
# environments, localhost may be used to loopback to the current node.
#
# PORT specifies the port number to connect to at the specified host. This value
# is optional; in its absence, the port configuration value is used as the
# default.
#
# RACK specifies the host's network location for the purposes of performing rack
# aware data distribution. This value is optional; in its absence, a generic
# value is used as the default.
# Put your actual configuration here
# ----------------------------------
#
# HOSTNAME [PORT] [RACK]

View File

@ -1139,7 +1139,7 @@ RecordSubPlansUsedInPlan(DistributedPlan *plan, Query *originalQuery)
* may still prefer to write locally.
*
* If any of the subplansInHaving is used in other parts of the query,
* we'll later merge it those subPlans and send it to remote.
* we'll later merge those subPlans and send to remote.
*/
UpdateUsedPlanListLocation(subplansInHaving, SUBPLAN_ACCESS_LOCAL);
}

View File

@ -2432,8 +2432,7 @@ ProcessHavingClauseForWorkerQuery(Node *originalHavingQual,
* We converted the having expression to a list in subquery pushdown
* planner. However, this query cannot be parsed as it is in the worker.
* We should convert this back to being explicit for worker query
* so that it can be parsed when it hits to the standard planner in
* worker.
* so that it can be parsed when it hits the standard planner in worker.
*/
if (IsA(originalHavingQual, List))
{
@ -4085,7 +4084,7 @@ FindReferencedTableColumn(Expr *columnExpression, List *parentQueryList, Query *
/*
* We currently don't support finding partition keys in the subqueries
* that references from outer subqueries. For example, in corrolated
* that reference outer subqueries. For example, in corrolated
* subqueries in WHERE clause, we don't support use of partition keys
* in the subquery that is referred from the outer query.
*/

View File

@ -334,14 +334,14 @@ TargetListOnPartitionColumn(Query *query, List *targetEntryList)
/*
* AllTargetExpressionsAreColumnReferences returns true if non of the
* AllTargetExpressionsAreColumnReferences returns true if none of the
* elements in the target entry list belong to an outer query (for
* example the query is a sublink and references to another query
* in the from list).
*
* The function also returns true if any of the target entries is not
* a column itself. This might be too restrictive, but, given that we're
* handling a very specific type of queries, that seems acceptable for now.
* handling very specific type of queries, that seems acceptable for now.
*/
static bool
AllTargetExpressionsAreColumnReferences(List *targetEntryList)

View File

@ -951,7 +951,7 @@ TargetEntryList(List *expressionList)
/*
* AddAnyValueAggregates wraps all vars that do not apear in the GROUP BY
* AddAnyValueAggregates wraps all vars that do not appear in the GROUP BY
* clause or are inside an aggregate function in an any_value aggregate
* function. This is needed for repartition joins because primary keys are not
* present on intermediate tables.

View File

@ -1544,7 +1544,7 @@ SubqueryPushdownMultiNodeTree(Query *queryTree)
* SELECT
* s1.a AS worker_column_0,
* s2.c AS worker_column_1,
* s2.b AS as worker_column_2
* s2.b AS worker_column_2
* FROM (some subquery) s1, (some subquery) s2
* WHERE s1.a = s2.a) worker_subquery
* GROUP BY worker_column_0
@ -1712,7 +1712,7 @@ FlattenJoinVarsMutator(Node *node, Query *queryTree)
return (Node *) column;
}
/* join RTE does not have and alias defined at this level, deeper look is needed */
/* join RTE does not have an alias defined at this level, deeper look is needed */
Assert(column->varattno > 0);
Node *newColumn = (Node *) list_nth(rte->joinaliasvars, column->varattno - 1);
Assert(newColumn != NULL);
@ -1836,7 +1836,7 @@ UpdateColumnToMatchingTargetEntry(Var *column, Node *flattenedExpr, List *target
else if (IsA(targetEntry->expr, CoalesceExpr))
{
/*
* FlattenJoinVars() flattens full oter joins' columns that is
* FlattenJoinVars() flattens full outer joins' columns that is
* in the USING part into COALESCE(left_col, right_col)
*/

View File

@ -896,7 +896,7 @@ ShouldRecursivelyPlanSubquery(Query *subquery, RecursivePlanningContext *context
/*
* Citus can pushdown this subquery, no need to recursively
* plan which is much expensive than pushdown.
* plan which is much more expensive than pushdown.
*/
return false;
}
@ -1565,7 +1565,7 @@ BuildSubPlanResultQuery(List *targetEntryList, List *columnAliasList, char *resu
/*
* BuildSubPlanResultQuery returns a query of the form:
* BuildReadIntermediateResultsArrayQuery returns a query of the form:
*
* SELECT
* <target list>

View File

@ -722,8 +722,8 @@ CitusRemoveDirectory(const char *filename)
struct stat fileStat;
int removed = 0;
int fileStated = stat(filename, &fileStat);
if (fileStated < 0)
int statOK = stat(filename, &fileStat);
if (statOK < 0)
{
if (errno == ENOENT)
{