diff --git a/src/backend/distributed/commands/README.md b/src/backend/distributed/commands/README.md index 56b8cf6da..633bf56e5 100644 --- a/src/backend/distributed/commands/README.md +++ b/src/backend/distributed/commands/README.md @@ -23,7 +23,7 @@ they are often moved to files that are named after the command. | `table.c` | | | `transmit.c` | Implementation of `COPY` commands with `format transmit` set in the options. This format is used to transfer files from one node to another node | | `truncate.c` | Implementation of `TRUNCATE` commands on distributed tables | -| `utility_hook.c` | This is the entry point from postgres into the commands module of citus. It contains the implementation that gets registered in postgres' `ProcessUtility_hook` callback to extends the functionality of the original ProcessUtility. This code is used to route the incomming commands to their respective implementation in Citus | +| `utility_hook.c` | This is the entry point from postgres into the commands module of citus. It contains the implementation that gets registered in postgres' `ProcessUtility_hook` callback to extends the functionality of the original ProcessUtility. This code is used to route the incoming commands to their respective implementation in Citus | | `vacuum.c` | Implementation of `VACUUM` commands on distributed tables | # COPY diff --git a/src/backend/distributed/commands/collation.c b/src/backend/distributed/commands/collation.c index 98e8e7e85..645ca13b7 100644 --- a/src/backend/distributed/commands/collation.c +++ b/src/backend/distributed/commands/collation.c @@ -455,7 +455,7 @@ AlterCollationSchemaStmtObjectAddress(Node *node, bool missing_ok) * EnsureSequentialModeForCollationDDL makes sure that the current transaction is already in * sequential mode, or can still safely be put in sequential mode, it errors if that is * not possible. The error contains information for the user to retry the transaction with - * sequential mode set from the begining. + * sequential mode set from the beginning. * * As collations are node scoped objects there exists only 1 instance of the collation used by * potentially multiple shards. To make sure all shards in the transaction can interact diff --git a/src/backend/distributed/commands/function.c b/src/backend/distributed/commands/function.c index c6e9a3519..2c4a3509a 100644 --- a/src/backend/distributed/commands/function.c +++ b/src/backend/distributed/commands/function.c @@ -260,7 +260,7 @@ DistributeFunctionColocatedWithDistributedTable(RegProcedure funcOid, { /* * cannot provide colocate_with without distribution_arg_name when the function - * is not collocated with a reference table + * is not colocated with a reference table */ if (pg_strncasecmp(colocateWithTableName, "default", NAMEDATALEN) != 0) { @@ -1487,7 +1487,7 @@ PreprocessDropFunctionStmt(Node *node, const char *queryString, { /* * extensions should be created separately on the workers, types cascading from an - * extension should therefor not be propagated here. + * extension should therefore not be propagated here. */ return NIL; } @@ -1588,7 +1588,7 @@ PreprocessAlterFunctionDependsStmt(Node *node, const char *queryString, { /* * extensions should be created separately on the workers, types cascading from an - * extension should therefor not be propagated here. + * extension should therefore not be propagated here. */ return NIL; } diff --git a/src/backend/distributed/commands/role.c b/src/backend/distributed/commands/role.c index 511f54f3c..34ced53d0 100644 --- a/src/backend/distributed/commands/role.c +++ b/src/backend/distributed/commands/role.c @@ -630,7 +630,7 @@ GetRoleNameFromDbRoleSetting(HeapTuple tuple, TupleDesc DbRoleSettingDescription /* - * MakeSetStatementArgs parses a configuraton value and creates an List of A_Const + * MakeSetStatementArgs parses a configuration value and creates an List of A_Const * Nodes with appropriate types. * * The allowed A_Const types are Integer, Float, and String. diff --git a/src/backend/distributed/commands/schema.c b/src/backend/distributed/commands/schema.c index 9f6683496..97c0a4e67 100644 --- a/src/backend/distributed/commands/schema.c +++ b/src/backend/distributed/commands/schema.c @@ -253,7 +253,7 @@ FilterDistributedSchemas(List *schemas) * EnsureSequentialModeForSchemaDDL makes sure that the current transaction is already in * sequential mode, or can still safely be put in sequential mode, it errors if that is * not possible. The error contains information for the user to retry the transaction with - * sequential mode set from the begining. + * sequential mode set from the beginning. * * Copy-pasted from type.c */ diff --git a/src/backend/distributed/commands/sequence.c b/src/backend/distributed/commands/sequence.c index dd7390b45..f1c2339a2 100644 --- a/src/backend/distributed/commands/sequence.c +++ b/src/backend/distributed/commands/sequence.c @@ -234,7 +234,7 @@ PreprocessDropSequenceStmt(Node *node, const char *queryString, { /* * extensions should be created separately on the workers, sequences cascading - * from an extension should therefor not be propagated here. + * from an extension should therefore not be propagated here. */ return NIL; } diff --git a/src/backend/distributed/commands/table.c b/src/backend/distributed/commands/table.c index 3405b3c3e..8ea36fdeb 100644 --- a/src/backend/distributed/commands/table.c +++ b/src/backend/distributed/commands/table.c @@ -1276,7 +1276,7 @@ ConvertPostgresLocalTablesToCitusLocalTables(AlterTableStmt *alterTableStatement bool cascade = true; /* - * Withoud this check, we would be erroring out in CreateCitusLocalTable + * Without this check, we would be erroring out in CreateCitusLocalTable * for this case anyway. The purpose of this check&error is to provide * a more meaningful message for the user. */ diff --git a/src/backend/distributed/commands/truncate.c b/src/backend/distributed/commands/truncate.c index b42a7c5b8..ab24b05e5 100644 --- a/src/backend/distributed/commands/truncate.c +++ b/src/backend/distributed/commands/truncate.c @@ -424,7 +424,7 @@ AcquireDistributedLockOnRelations(List *relationIdList, LOCKMODE lockMode) const char *lockModeText = LockModeToLockModeText(lockMode); /* - * We want to acquire locks in the same order accross the nodes. + * We want to acquire locks in the same order across the nodes. * Although relation ids may change, their ordering will not. */ relationIdList = SortList(relationIdList, CompareOids); diff --git a/src/backend/distributed/commands/type.c b/src/backend/distributed/commands/type.c index 83cdc1a6b..6492c4893 100644 --- a/src/backend/distributed/commands/type.c +++ b/src/backend/distributed/commands/type.c @@ -316,7 +316,7 @@ PostprocessCreateEnumStmt(Node *node, const char *queryString) * * Since it is an alter of an existing type we actually have the ObjectAddress. This is * used to check if the type is distributed, if so the alter will be executed on the - * workers directly to keep the types in sync accross the cluster. + * workers directly to keep the types in sync across the cluster. */ List * PreprocessAlterEnumStmt(Node *node, const char *queryString, @@ -1125,7 +1125,7 @@ MakeTypeNameFromRangeVar(const RangeVar *relation) * EnsureSequentialModeForTypeDDL makes sure that the current transaction is already in * sequential mode, or can still safely be put in sequential mode, it errors if that is * not possible. The error contains information for the user to retry the transaction with - * sequential mode set from the begining. + * sequential mode set from the beginning. * * As types are node scoped objects there exists only 1 instance of the type used by * potentially multiple shards. To make sure all shards in the transaction can interact diff --git a/src/backend/distributed/connection/connection_management.c b/src/backend/distributed/connection/connection_management.c index 612453ef9..4ce015361 100644 --- a/src/backend/distributed/connection/connection_management.c +++ b/src/backend/distributed/connection/connection_management.c @@ -948,7 +948,7 @@ FinishConnectionListEstablishment(List *multiConnectionList) if (eventCount == 0) { /* - * timeout has occured on waitset, double check the timeout since + * timeout has occurred on waitset, double check the timeout since * connectionStart and if passed close all non-finished connections */ diff --git a/src/backend/distributed/connection/locally_reserved_shared_connections.c b/src/backend/distributed/connection/locally_reserved_shared_connections.c index f9c04be47..44e1340c2 100644 --- a/src/backend/distributed/connection/locally_reserved_shared_connections.c +++ b/src/backend/distributed/connection/locally_reserved_shared_connections.c @@ -21,7 +21,7 @@ * For COPY command, we use this fact to reserve connections to the remote nodes * in the same order as the adaptive executor in order to prevent any resource * starvations. We need to do this because COPY establishes connections when it - * recieves a tuple that targets a remote node. This is a valuable optimization + * receives a tuple that targets a remote node. This is a valuable optimization * to prevent unnecessary connection establishments, which are pretty expensive. * Instead, COPY command can reserve connections upfront, and utilize them when * they are actually needed. @@ -191,7 +191,7 @@ InitializeLocallyReservedSharedConnections(void) uint32 hashFlags = (HASH_ELEM | HASH_FUNCTION | HASH_CONTEXT | HASH_COMPARE); SessionLocalReservedConnections = - hash_create("citus session level reserved connectios (host,port,database,user)", + hash_create("citus session level reserved connections (host,port,database,user)", 64, &reservedConnectionInfo, hashFlags); } diff --git a/src/backend/distributed/executor/adaptive_executor.c b/src/backend/distributed/executor/adaptive_executor.c index b605ff719..11e7ff8c8 100644 --- a/src/backend/distributed/executor/adaptive_executor.c +++ b/src/backend/distributed/executor/adaptive_executor.c @@ -5199,7 +5199,7 @@ RebuildWaitEventSetFlags(WaitEventSet *waitEventSet, List *sessionList) * ModifyWaitEvent may throw hard errors. For example, when the underlying * socket for a connection is closed by the remote server and already * reflected by the OS, however Citus hasn't had a chance to get this - * information. In that case, if repliction factor is >1, Citus can + * information. In that case, if replication factor is >1, Citus can * failover to other nodes for executing the query. Even if replication * factor = 1, Citus can give much nicer errors. * diff --git a/src/backend/distributed/executor/local_executor.c b/src/backend/distributed/executor/local_executor.c index 48e056cca..eefef65c2 100644 --- a/src/backend/distributed/executor/local_executor.c +++ b/src/backend/distributed/executor/local_executor.c @@ -649,7 +649,7 @@ ExecuteLocalTaskPlan(PlannedStmt *taskPlan, char *queryString, int localPlacementIndex = 0; /* - * Use the tupleStore provided by the scanState because it is shared accross + * Use the tupleStore provided by the scanState because it is shared across * the other task executions and the adaptive executor. * * Also note that as long as the tupleDest is provided, local execution always diff --git a/src/backend/distributed/executor/multi_executor.c b/src/backend/distributed/executor/multi_executor.c index f41553cb6..5c36d5bba 100644 --- a/src/backend/distributed/executor/multi_executor.c +++ b/src/backend/distributed/executor/multi_executor.c @@ -322,7 +322,7 @@ ReturnTupleFromTuplestore(CitusScanState *scanState) { /* * If there is a very selective qual on the Citus Scan node we might block - * interupts for a longer time if we would not check for interrupts in this loop + * interrupts for a longer time if we would not check for interrupts in this loop */ CHECK_FOR_INTERRUPTS(); diff --git a/src/backend/distributed/metadata/dependency.c b/src/backend/distributed/metadata/dependency.c index 340f5ea41..975fd7d5b 100644 --- a/src/backend/distributed/metadata/dependency.c +++ b/src/backend/distributed/metadata/dependency.c @@ -788,7 +788,7 @@ FollowNewSupportedDependencies(ObjectAddressCollector *collector, /* * If the object is already distributed it is not a `new` object that needs to be - * distributed before we create a dependant object + * distributed before we create a dependent object */ if (IsObjectDistributed(&address)) { diff --git a/src/backend/distributed/metadata/metadata_sync.c b/src/backend/distributed/metadata/metadata_sync.c index 6e305ef62..2e9f6489b 100644 --- a/src/backend/distributed/metadata/metadata_sync.c +++ b/src/backend/distributed/metadata/metadata_sync.c @@ -239,7 +239,7 @@ StartMetadataSyncToNode(const char *nodeNameString, int32 nodePort) * EnsureSequentialModeMetadataOperations makes sure that the current transaction is * already in sequential mode, or can still safely be put in sequential mode, * it errors if that is not possible. The error contains information for the user to - * retry the transaction with sequential mode set from the begining. + * retry the transaction with sequential mode set from the beginning. * * Metadata objects (e.g., distributed table on the workers) exists only 1 instance of * the type used by potentially multiple other shards/connections. To make sure all diff --git a/src/backend/distributed/operations/delete_protocol.c b/src/backend/distributed/operations/delete_protocol.c index 8f71dcd5f..075499890 100644 --- a/src/backend/distributed/operations/delete_protocol.c +++ b/src/backend/distributed/operations/delete_protocol.c @@ -234,7 +234,7 @@ DropShards(Oid relationId, char *schemaName, char *relationName, UseCoordinatedTransaction(); /* - * We will use below variable accross this function to decide if we can + * We will use below variable across this function to decide if we can * use local execution */ int32 localGroupId = GetLocalGroupId(); diff --git a/src/backend/distributed/operations/shard_rebalancer.c b/src/backend/distributed/operations/shard_rebalancer.c index 4e24d8055..773c9e8b6 100644 --- a/src/backend/distributed/operations/shard_rebalancer.c +++ b/src/backend/distributed/operations/shard_rebalancer.c @@ -614,7 +614,7 @@ GetColocatedRebalanceSteps(List *placementUpdateList) /* * AcquireColocationLock tries to acquire a lock for rebalance/replication. If * this is it not possible it fails instantly because this means another - * rebalance/repliction is currently happening. This would really mess up + * rebalance/replication is currently happening. This would really mess up * planning. */ static void diff --git a/src/backend/distributed/planner/multi_router_planner.c b/src/backend/distributed/planner/multi_router_planner.c index 6274eb061..60d3facc2 100644 --- a/src/backend/distributed/planner/multi_router_planner.c +++ b/src/backend/distributed/planner/multi_router_planner.c @@ -1957,7 +1957,7 @@ ReorderTaskPlacementsByTaskAssignmentPolicy(Job *job, * because the user is trying to distributed the load across nodes via * round-robin policy. Otherwise, the local execution would prioritize * executing the local tasks and especially for reference tables on the - * coordinator this would prevent load balancing accross nodes. + * coordinator this would prevent load balancing across nodes. * * For other worker nodes in Citus MX, we let the local execution to kick-in * even for round-robin policy, that's because we expect the clients to evenly diff --git a/src/backend/distributed/shared_library_init.c b/src/backend/distributed/shared_library_init.c index fc1f5c0fb..09187427a 100644 --- a/src/backend/distributed/shared_library_init.c +++ b/src/backend/distributed/shared_library_init.c @@ -1413,7 +1413,7 @@ RegisterCitusConfigVariables(void) DefineCustomBoolVariable( "citus.override_table_visibility", - gettext_noop("Enables replacing occurencens of pg_catalog.pg_table_visible() " + gettext_noop("Enables replacing occurrrences of pg_catalog.pg_table_visible() " "with pg_catalog.citus_table_visible()"), gettext_noop("When enabled, shards on the Citus MX worker (data) nodes would be " "filtered out by many psql commands to provide better user " diff --git a/src/backend/distributed/sql/udfs/create_time_partitions/10.2-1.sql b/src/backend/distributed/sql/udfs/create_time_partitions/10.2-1.sql index 176d61637..11edcc5ac 100644 --- a/src/backend/distributed/sql/udfs/create_time_partitions/10.2-1.sql +++ b/src/backend/distributed/sql/udfs/create_time_partitions/10.2-1.sql @@ -11,7 +11,7 @@ DECLARE schema_name_text name; table_name_text name; - -- record for to-be-created parttion + -- record for to-be-created partition missing_partition_record record; -- result indiciates whether any partitions were created diff --git a/src/backend/distributed/sql/udfs/create_time_partitions/latest.sql b/src/backend/distributed/sql/udfs/create_time_partitions/latest.sql index 176d61637..11edcc5ac 100644 --- a/src/backend/distributed/sql/udfs/create_time_partitions/latest.sql +++ b/src/backend/distributed/sql/udfs/create_time_partitions/latest.sql @@ -11,7 +11,7 @@ DECLARE schema_name_text name; table_name_text name; - -- record for to-be-created parttion + -- record for to-be-created partition missing_partition_record record; -- result indiciates whether any partitions were created diff --git a/src/backend/distributed/transaction/citus_dist_stat_activity.c b/src/backend/distributed/transaction/citus_dist_stat_activity.c index ec24dc2a6..ec631204d 100644 --- a/src/backend/distributed/transaction/citus_dist_stat_activity.c +++ b/src/backend/distributed/transaction/citus_dist_stat_activity.c @@ -3,7 +3,7 @@ * citus_dist_stat_activity.c * * This file contains functions for monitoring the distributed transactions - * accross the cluster. + * across the cluster. * * Copyright (c) Citus Data, Inc. * diff --git a/src/backend/distributed/transaction/relation_access_tracking.c b/src/backend/distributed/transaction/relation_access_tracking.c index 522717375..53a598e23 100644 --- a/src/backend/distributed/transaction/relation_access_tracking.c +++ b/src/backend/distributed/transaction/relation_access_tracking.c @@ -673,7 +673,7 @@ GetRelationAccessMode(Oid relationId, ShardPlacementAccessType accessType) * of the relation accesses. * * In many cases, we'd only need IsMultiStatementTransaction(), however, for some - * cases such as CTEs, where Citus uses the same connections accross multiple queries, + * cases such as CTEs, where Citus uses the same connections across multiple queries, * we should still record the relation accesses even not inside an explicit transaction * block. Thus, keeping track of the relation accesses inside coordinated transactions * is also required. diff --git a/src/backend/distributed/utils/citus_safe_lib.c b/src/backend/distributed/utils/citus_safe_lib.c index d474a140f..466c598be 100644 --- a/src/backend/distributed/utils/citus_safe_lib.c +++ b/src/backend/distributed/utils/citus_safe_lib.c @@ -83,11 +83,11 @@ SafeStringToInt64(const char *str) } else if ((errno == ERANGE && number == LLONG_MIN) || number < INT64_MIN) { - ereport(ERROR, (errmsg("Error parsing %s as int64, underflow occured\n", str))); + ereport(ERROR, (errmsg("Error parsing %s as int64, underflow occurred\n", str))); } else if ((errno == ERANGE && number == LLONG_MAX) || number > INT64_MAX) { - ereport(ERROR, (errmsg("Error parsing %s as int64, overflow occured\n", str))); + ereport(ERROR, (errmsg("Error parsing %s as int64, overflow occurred\n", str))); } else if (errno == EINVAL) { @@ -130,7 +130,7 @@ SafeStringToUint64(const char *str) } else if ((errno == ERANGE && number == ULLONG_MAX) || number > UINT64_MAX) { - ereport(ERROR, (errmsg("Error parsing %s as uint64, overflow occured\n", str))); + ereport(ERROR, (errmsg("Error parsing %s as uint64, overflow occurred\n", str))); } else if (errno == EINVAL) { diff --git a/src/backend/distributed/utils/enable_ssl.c b/src/backend/distributed/utils/enable_ssl.c index a6a8dc065..3d10d97b8 100644 --- a/src/backend/distributed/utils/enable_ssl.c +++ b/src/backend/distributed/utils/enable_ssl.c @@ -196,7 +196,7 @@ GloballyReloadConfig() /* * ShouldUseAutoSSL checks if citus should enable ssl based on the connection settings it * uses for outward connections. When the outward connection is configured to require ssl - * it assumes the other nodes in the network have the same setting and therefor it will + * it assumes the other nodes in the network have the same setting and therefore it will * automatically enable ssl during installation. */ static bool diff --git a/src/backend/distributed/utils/role.c b/src/backend/distributed/utils/role.c index 667ea5fc5..3a9a90f9f 100644 --- a/src/backend/distributed/utils/role.c +++ b/src/backend/distributed/utils/role.c @@ -63,7 +63,7 @@ alter_role_if_exists(PG_FUNCTION_ARGS) * If the role does exist it will run the query provided in alter_role_utility_query to * change the existing user in such a way that it is compatible with the user on the * coordinator. This query is expected to be a AlterRoleStmt, if a different statement is - * provdided the function will raise an error. + * provided the function will raise an error. * * For both queries a NULL value can be passed to omit the execution of that condition. * diff --git a/src/backend/distributed/worker/worker_shard_visibility.c b/src/backend/distributed/worker/worker_shard_visibility.c index 3afd33873..22dfcac65 100644 --- a/src/backend/distributed/worker/worker_shard_visibility.c +++ b/src/backend/distributed/worker/worker_shard_visibility.c @@ -275,7 +275,7 @@ ReplaceTableVisibleFunction(Node *inputNode) /* - * ReplaceTableVisibleFunction replaces all occurences of + * ReplaceTableVisibleFunction replaces all occurrences of * pg_catalog.pg_table_visible() to * pg_catalog.citus_table_visible() in the given input node. * diff --git a/src/include/distributed/multi_server_executor.h b/src/include/distributed/multi_server_executor.h index fab0d31d6..56dd6d808 100644 --- a/src/include/distributed/multi_server_executor.h +++ b/src/include/distributed/multi_server_executor.h @@ -17,7 +17,7 @@ #include "distributed/multi_physical_planner.h" #include "distributed/worker_manager.h" -/* Adaptive executor repartioning related defines */ +/* Adaptive executor repartitioning related defines */ #define WORKER_CREATE_SCHEMA_QUERY "SELECT worker_create_schema (" UINT64_FORMAT ", %s);" #define WORKER_REPARTITION_CLEANUP_QUERY "SELECT worker_repartition_cleanup (" \ UINT64_FORMAT \ diff --git a/src/test/regress/expected/ch_bench_subquery_repartition.out b/src/test/regress/expected/ch_bench_subquery_repartition.out index b6c56cc39..a7bc57b5b 100644 --- a/src/test/regress/expected/ch_bench_subquery_repartition.out +++ b/src/test/regress/expected/ch_bench_subquery_repartition.out @@ -94,7 +94,7 @@ INSERT INTO order_line SELECT c, c, c, c, c, NULL, c, c, c, 'abc' FROM generate_ INSERT INTO stock SELECT c, c, c, c, c, c, 'abc', c, c, c, c, c, c, c, c, c, c FROM generate_series(1, 5) as c; INSERT INTO item SELECT c, 'abc', c, 'abc', c FROM generate_series(1, 3) as c; INSERT INTO item SELECT 10+c, 'abc', c, 'abc', c FROM generate_series(1, 3) as c; --- Subquery + repartion is supported when it is an IN query where the subquery +-- Subquery + repartition is supported when it is an IN query where the subquery -- returns unique results (because it's converted to an INNER JOIN) select s_i_id from stock, order_line @@ -109,7 +109,7 @@ select s_i_id 3 (3 rows) --- Subquery + repartion is not supported when it is an IN query where the +-- Subquery + repartition is not supported when it is an IN query where the -- subquery doesn't return unique results select s_i_id from stock, order_line @@ -117,7 +117,7 @@ select s_i_id s_i_id in (select i_im_id from item) AND s_i_id = ol_i_id; ERROR: complex joins are only supported when all distributed tables are co-located and joined on their distribution columns --- Subquery + repartion is supported when it is a NOT IN query where the subquery +-- Subquery + repartition is supported when it is a NOT IN query where the subquery -- returns unique results select s_i_id from stock, order_line @@ -125,7 +125,7 @@ select s_i_id s_i_id not in (select i_id from item) AND s_i_id = ol_i_id; ERROR: complex joins are only supported when all distributed tables are co-located and joined on their distribution columns --- Subquery + repartion is not supported when it is a NOT IN where the subquery +-- Subquery + repartition is not supported when it is a NOT IN where the subquery -- doesn't return unique results select s_i_id from stock, order_line @@ -144,7 +144,7 @@ select s_i_id --------------------------------------------------------------------- (0 rows) --- Subquery + repartion is not supported when it contains both an IN and a NOT IN +-- Subquery + repartition is not supported when it contains both an IN and a NOT IN -- where both subqueries return unique results select s_i_id from stock, order_line @@ -153,7 +153,7 @@ select s_i_id AND s_i_id not in (select i_id from item) AND s_i_id = ol_i_id; ERROR: complex joins are only supported when all distributed tables are co-located and joined on their distribution columns --- Subquery + repartion is not supported when it contains both an IN and a NOT IN +-- Subquery + repartition is not supported when it contains both an IN and a NOT IN -- where the IN subquery returns unique results and the NOT IN returns non unique results select s_i_id from stock, order_line @@ -162,7 +162,7 @@ select s_i_id AND s_i_id not in (select i_im_id from item) AND s_i_id = ol_i_id; ERROR: complex joins are only supported when all distributed tables are co-located and joined on their distribution columns --- Subquery + repartion is not supported when it contains both an IN and a NOT IN +-- Subquery + repartition is not supported when it contains both an IN and a NOT IN -- where the IN subquery returns non unique results and the NOT IN returns unique results select s_i_id from stock, order_line @@ -171,7 +171,7 @@ select s_i_id AND s_i_id not in (select i_id from item) AND s_i_id = ol_i_id; ERROR: complex joins are only supported when all distributed tables are co-located and joined on their distribution columns --- Subquery + repartion is not supported when it contains both an IN and a NOT IN +-- Subquery + repartition is not supported when it contains both an IN and a NOT IN -- where both subqueries return non unique results select s_i_id from stock, order_line diff --git a/src/test/regress/expected/ch_benchmarks_3.out b/src/test/regress/expected/ch_benchmarks_3.out index aedba5623..f40df90b1 100644 --- a/src/test/regress/expected/ch_benchmarks_3.out +++ b/src/test/regress/expected/ch_benchmarks_3.out @@ -1,5 +1,5 @@ SET search_path to "ch benchmarks"; --- Subquery + repartion is supported when it is an IN query where the subquery +-- Subquery + repartition is supported when it is an IN query where the subquery -- returns unique results (because it's converted to an INNER JOIN) select s_i_id from stock, order_line diff --git a/src/test/regress/expected/distributed_planning.out b/src/test/regress/expected/distributed_planning.out index a659ffc44..4fecef905 100644 --- a/src/test/regress/expected/distributed_planning.out +++ b/src/test/regress/expected/distributed_planning.out @@ -282,7 +282,7 @@ LIMIT 1; 7 | 1 | 7 | 1 (1 row) --- Check repartion joins are supported +-- Check repartition joins are supported SELECT * FROM test t1, test t2 WHERE t1.x = t2.y ORDER BY t1.x, t2.x, t1.y, t2.y; x | y | x | y --------------------------------------------------------------------- diff --git a/src/test/regress/expected/dml_recursive.out b/src/test/regress/expected/dml_recursive.out index bf2da3866..b1d521ca2 100644 --- a/src/test/regress/expected/dml_recursive.out +++ b/src/test/regress/expected/dml_recursive.out @@ -228,7 +228,7 @@ ORDER BY foo_inner_1.tenant_id; RESET citus.enable_repartition_joins; -- there is a lateral join (e.g., correlated subquery) thus the subqueries cannot be --- recursively planned, this one can not be planned by the repartion planner +-- recursively planned, this one can not be planned by the repartition planner -- because of the IN query on a non unique column UPDATE second_distributed_table diff --git a/src/test/regress/expected/follower_single_node.out b/src/test/regress/expected/follower_single_node.out index b2d3efb4b..efc855824 100644 --- a/src/test/regress/expected/follower_single_node.out +++ b/src/test/regress/expected/follower_single_node.out @@ -37,7 +37,7 @@ CREATE TABLE local(c int, d int); INSERT INTO test VALUES (1, 2), (3, 4), (5, 6), (2, 7), (4, 5); INSERT INTO ref VALUES (1, 2), (5, 6), (7, 8); INSERT INTO local VALUES (1, 2), (3, 4), (7, 8); --- Check repartion joins are supported +-- Check repartition joins are supported SET citus.enable_repartition_joins TO ON; SELECT * FROM test t1, test t2 WHERE t1.x = t2.y ORDER BY t1.x; x | y | x | y diff --git a/src/test/regress/expected/issue_5248.out b/src/test/regress/expected/issue_5248.out index 720fea804..7f9e45417 100644 --- a/src/test/regress/expected/issue_5248.out +++ b/src/test/regress/expected/issue_5248.out @@ -72,7 +72,7 @@ create table events ( ); create index event_time_idx on events using BRIN (event_time); create index event_json_idx on events using gin(payload); -select create_distributed_table('events', 'user_id'); -- on purpose don't collocate on correctly on org_id +select create_distributed_table('events', 'user_id'); -- on purpose don't colocate on correctly on org_id create_distributed_table --------------------------------------------------------------------- diff --git a/src/test/regress/expected/multi_explain.out b/src/test/regress/expected/multi_explain.out index e2fe379d2..048397aec 100644 --- a/src/test/regress/expected/multi_explain.out +++ b/src/test/regress/expected/multi_explain.out @@ -306,8 +306,8 @@ Aggregate (actual rows=1 loops=1) Merge Task Count: 4 -- Confirm repartiton join in distributed subplan works EXPLAIN (COSTS off, ANALYZE on, TIMING off, SUMMARY off) -WITH repartion AS (SELECT count(*) FROM t1, t2 WHERE t1.a=t2.b) -SELECT count(*) from repartion; +WITH repartition AS (SELECT count(*) FROM t1, t2 WHERE t1.a=t2.b) +SELECT count(*) from repartition; Custom Scan (Citus Adaptive) (actual rows=1 loops=1) -> Distributed Subplan XXX_1 Intermediate Data Size: 14 bytes diff --git a/src/test/regress/expected/multi_index_statements.out b/src/test/regress/expected/multi_index_statements.out index 3ac1f063f..52125cc65 100644 --- a/src/test/regress/expected/multi_index_statements.out +++ b/src/test/regress/expected/multi_index_statements.out @@ -66,7 +66,7 @@ CREATE INDEX lineitem_partkey_desc_index ON public.lineitem (l_partkey DESC); CREATE INDEX lineitem_partial_index ON public.lineitem (l_shipdate) WHERE l_shipdate < '1995-01-01'; CREATE INDEX lineitem_colref_index ON public.lineitem (record_ne(lineitem.*, NULL)); -SET client_min_messages = ERROR; -- avoid version dependant warning about WAL +SET client_min_messages = ERROR; -- avoid version dependent warning about WAL CREATE INDEX lineitem_orderkey_hash_index ON public.lineitem USING hash (l_partkey); CREATE UNIQUE INDEX index_test_range_index_a ON index_test_range(a); CREATE UNIQUE INDEX index_test_range_index_a_b ON index_test_range(a,b); diff --git a/src/test/regress/expected/multi_partitioning.out b/src/test/regress/expected/multi_partitioning.out index 5ae3d04bc..fed9039a2 100644 --- a/src/test/regress/expected/multi_partitioning.out +++ b/src/test/regress/expected/multi_partitioning.out @@ -933,7 +933,7 @@ SELECT * FROM partitioning_test WHERE id = 25 ORDER BY 1; 25 | 10-10-2010 | (2 rows) --- perform operations on partition and partioned tables together +-- perform operations on partition and partitioned tables together INSERT INTO partitioning_test VALUES(26, '2010-02-02', 26); INSERT INTO partitioning_test_2010 VALUES(26, '2010-02-02', 26); COPY partitioning_test FROM STDIN WITH CSV; diff --git a/src/test/regress/expected/multi_subquery_behavioral_analytics.out b/src/test/regress/expected/multi_subquery_behavioral_analytics.out index d8f245893..e357132b4 100644 --- a/src/test/regress/expected/multi_subquery_behavioral_analytics.out +++ b/src/test/regress/expected/multi_subquery_behavioral_analytics.out @@ -875,7 +875,7 @@ SET citus.subquery_pushdown to ON; NOTICE: Setting citus.subquery_pushdown flag is discouraged becuase it forces the planner to pushdown certain queries, skipping relevant correctness checks. DETAIL: When enabled, the planner skips many correctness checks for subqueries and pushes down the queries to shards as-is. It means that the queries are likely to return wrong results unless the user is absolutely sure that pushing down the subquery is safe. This GUC is maintained only for backward compatibility, no new users are supposed to use it. The planner is capable of pushing down as much computation as possible to the shards depending on the query. -- multi-subquery-join --- The first query has filters on partion column to make it router plannable +-- The first query has filters on partition column to make it router plannable -- but it is processed by logical planner since we disabled router execution SELECT e1.user_id, diff --git a/src/test/regress/expected/non_colocated_leaf_subquery_joins.out b/src/test/regress/expected/non_colocated_leaf_subquery_joins.out index 6909696a2..1a4f20529 100644 --- a/src/test/regress/expected/non_colocated_leaf_subquery_joins.out +++ b/src/test/regress/expected/non_colocated_leaf_subquery_joins.out @@ -1,6 +1,6 @@ -- =================================================================== -- test recursive planning functionality for non-colocated subqueries --- We prefered to use EXPLAIN almost all the queries here, +-- We preferred to use EXPLAIN almost all the queries here, -- otherwise the execution time of so many repartition queries would -- be too high for the regression tests. Also, note that we're mostly -- interested in recurive planning side of the things, thus supressing diff --git a/src/test/regress/expected/non_colocated_subquery_joins.out b/src/test/regress/expected/non_colocated_subquery_joins.out index f03091f9a..4fa460f4a 100644 --- a/src/test/regress/expected/non_colocated_subquery_joins.out +++ b/src/test/regress/expected/non_colocated_subquery_joins.out @@ -1,6 +1,6 @@ -- =================================================================== -- test recursive planning functionality for non-colocated subqueries --- We prefered to use EXPLAIN almost all the queries here, +-- We preferred to use EXPLAIN almost all the queries here, -- otherwise the execution time of so many repartition queries would -- be too high for the regression tests. Also, note that we're mostly -- interested in recurive planning side of the things, thus supressing diff --git a/src/test/regress/expected/single_node.out b/src/test/regress/expected/single_node.out index 25f10703f..2d709ac86 100644 --- a/src/test/regress/expected/single_node.out +++ b/src/test/regress/expected/single_node.out @@ -953,7 +953,7 @@ SELECT * FROM ref, local WHERE a = c ORDER BY a; 7 | 8 | 7 | 8 (2 rows) --- Check repartion joins are supported +-- Check repartition joins are supported SET citus.enable_repartition_joins TO ON; SELECT * FROM test t1, test t2 WHERE t1.x = t2.y ORDER BY t1.x; x | y | x | y diff --git a/src/test/regress/expected/sqlsmith_failures.out b/src/test/regress/expected/sqlsmith_failures.out index 6a2df9b99..46d71e8ef 100644 --- a/src/test/regress/expected/sqlsmith_failures.out +++ b/src/test/regress/expected/sqlsmith_failures.out @@ -92,7 +92,7 @@ create table events ( ); create index event_time_idx on events using BRIN (event_time); create index event_json_idx on events using gin(payload); -select create_distributed_table('events', 'user_id'); -- on purpose don't collocate on correctly on org_id +select create_distributed_table('events', 'user_id'); -- on purpose don't colocate on correctly on org_id create_distributed_table --------------------------------------------------------------------- diff --git a/src/test/regress/expected/values.out b/src/test/regress/expected/values.out index 9e0eede92..8509cd971 100644 --- a/src/test/regress/expected/values.out +++ b/src/test/regress/expected/values.out @@ -579,7 +579,7 @@ DEBUG: CTE cte_1 is going to be inlined via distributed planning 3 (1 row) --- prepared statements with volatile functtions should be still pushed down +-- prepared statements with volatile functions should be still pushed down -- because the function is evaluated on the coordinator CREATE OR REPLACE FUNCTION fixed_volatile_value() RETURNS integer VOLATILE AS $$ BEGIN diff --git a/src/test/regress/sql/ch_bench_subquery_repartition.sql b/src/test/regress/sql/ch_bench_subquery_repartition.sql index 1821972d0..2392c39ec 100644 --- a/src/test/regress/sql/ch_bench_subquery_repartition.sql +++ b/src/test/regress/sql/ch_bench_subquery_repartition.sql @@ -78,7 +78,7 @@ INSERT INTO item SELECT c, 'abc', c, 'abc', c FROM generate_series(1, 3) as c; INSERT INTO item SELECT 10+c, 'abc', c, 'abc', c FROM generate_series(1, 3) as c; --- Subquery + repartion is supported when it is an IN query where the subquery +-- Subquery + repartition is supported when it is an IN query where the subquery -- returns unique results (because it's converted to an INNER JOIN) select s_i_id from stock, order_line @@ -88,7 +88,7 @@ select s_i_id order by s_i_id; --- Subquery + repartion is not supported when it is an IN query where the +-- Subquery + repartition is not supported when it is an IN query where the -- subquery doesn't return unique results select s_i_id from stock, order_line @@ -96,7 +96,7 @@ select s_i_id s_i_id in (select i_im_id from item) AND s_i_id = ol_i_id; --- Subquery + repartion is supported when it is a NOT IN query where the subquery +-- Subquery + repartition is supported when it is a NOT IN query where the subquery -- returns unique results select s_i_id from stock, order_line @@ -104,7 +104,7 @@ select s_i_id s_i_id not in (select i_id from item) AND s_i_id = ol_i_id; --- Subquery + repartion is not supported when it is a NOT IN where the subquery +-- Subquery + repartition is not supported when it is a NOT IN where the subquery -- doesn't return unique results select s_i_id from stock, order_line @@ -120,7 +120,7 @@ select s_i_id s_i_id in (select i_id from item) AND s_i_id not in (select i_im_id from item); --- Subquery + repartion is not supported when it contains both an IN and a NOT IN +-- Subquery + repartition is not supported when it contains both an IN and a NOT IN -- where both subqueries return unique results select s_i_id from stock, order_line @@ -129,7 +129,7 @@ select s_i_id AND s_i_id not in (select i_id from item) AND s_i_id = ol_i_id; --- Subquery + repartion is not supported when it contains both an IN and a NOT IN +-- Subquery + repartition is not supported when it contains both an IN and a NOT IN -- where the IN subquery returns unique results and the NOT IN returns non unique results select s_i_id from stock, order_line @@ -139,7 +139,7 @@ select s_i_id AND s_i_id = ol_i_id; --- Subquery + repartion is not supported when it contains both an IN and a NOT IN +-- Subquery + repartition is not supported when it contains both an IN and a NOT IN -- where the IN subquery returns non unique results and the NOT IN returns unique results select s_i_id from stock, order_line @@ -148,7 +148,7 @@ select s_i_id AND s_i_id not in (select i_id from item) AND s_i_id = ol_i_id; --- Subquery + repartion is not supported when it contains both an IN and a NOT IN +-- Subquery + repartition is not supported when it contains both an IN and a NOT IN -- where both subqueries return non unique results select s_i_id from stock, order_line diff --git a/src/test/regress/sql/ch_benchmarks_3.sql b/src/test/regress/sql/ch_benchmarks_3.sql index e0270e0cd..55e0690ad 100644 --- a/src/test/regress/sql/ch_benchmarks_3.sql +++ b/src/test/regress/sql/ch_benchmarks_3.sql @@ -1,6 +1,6 @@ SET search_path to "ch benchmarks"; --- Subquery + repartion is supported when it is an IN query where the subquery +-- Subquery + repartition is supported when it is an IN query where the subquery -- returns unique results (because it's converted to an INNER JOIN) select s_i_id from stock, order_line diff --git a/src/test/regress/sql/distributed_planning.sql b/src/test/regress/sql/distributed_planning.sql index 346852c01..9e466647e 100644 --- a/src/test/regress/sql/distributed_planning.sql +++ b/src/test/regress/sql/distributed_planning.sql @@ -141,7 +141,7 @@ WHERE ORDER BY 1 DESC, 2 DESC, 3 DESC, 4 DESC LIMIT 1; --- Check repartion joins are supported +-- Check repartition joins are supported SELECT * FROM test t1, test t2 WHERE t1.x = t2.y ORDER BY t1.x, t2.x, t1.y, t2.y; diff --git a/src/test/regress/sql/dml_recursive.sql b/src/test/regress/sql/dml_recursive.sql index cf456410b..89e654b6c 100644 --- a/src/test/regress/sql/dml_recursive.sql +++ b/src/test/regress/sql/dml_recursive.sql @@ -174,7 +174,7 @@ RESET citus.enable_repartition_joins; -- there is a lateral join (e.g., correlated subquery) thus the subqueries cannot be --- recursively planned, this one can not be planned by the repartion planner +-- recursively planned, this one can not be planned by the repartition planner -- because of the IN query on a non unique column UPDATE second_distributed_table diff --git a/src/test/regress/sql/follower_single_node.sql b/src/test/regress/sql/follower_single_node.sql index 757d03902..4cd7d9d0a 100644 --- a/src/test/regress/sql/follower_single_node.sql +++ b/src/test/regress/sql/follower_single_node.sql @@ -22,7 +22,7 @@ INSERT INTO test VALUES (1, 2), (3, 4), (5, 6), (2, 7), (4, 5); INSERT INTO ref VALUES (1, 2), (5, 6), (7, 8); INSERT INTO local VALUES (1, 2), (3, 4), (7, 8); --- Check repartion joins are supported +-- Check repartition joins are supported SET citus.enable_repartition_joins TO ON; SELECT * FROM test t1, test t2 WHERE t1.x = t2.y ORDER BY t1.x; SET citus.enable_single_hash_repartition_joins TO ON; diff --git a/src/test/regress/sql/issue_5248.sql b/src/test/regress/sql/issue_5248.sql index 1122b418c..fe42e3771 100644 --- a/src/test/regress/sql/issue_5248.sql +++ b/src/test/regress/sql/issue_5248.sql @@ -54,7 +54,7 @@ create table events ( ); create index event_time_idx on events using BRIN (event_time); create index event_json_idx on events using gin(payload); -select create_distributed_table('events', 'user_id'); -- on purpose don't collocate on correctly on org_id +select create_distributed_table('events', 'user_id'); -- on purpose don't colocate on correctly on org_id create table local_data( id bigserial primary key diff --git a/src/test/regress/sql/multi_explain.sql b/src/test/regress/sql/multi_explain.sql index d2a89d3ee..5067cf5a1 100644 --- a/src/test/regress/sql/multi_explain.sql +++ b/src/test/regress/sql/multi_explain.sql @@ -98,8 +98,8 @@ SET LOCAL citus.enable_repartition_joins TO true; EXPLAIN (COSTS off, ANALYZE on, TIMING off, SUMMARY off) SELECT count(*) FROM t1, t2 WHERE t1.a=t2.b; -- Confirm repartiton join in distributed subplan works EXPLAIN (COSTS off, ANALYZE on, TIMING off, SUMMARY off) -WITH repartion AS (SELECT count(*) FROM t1, t2 WHERE t1.a=t2.b) -SELECT count(*) from repartion; +WITH repartition AS (SELECT count(*) FROM t1, t2 WHERE t1.a=t2.b) +SELECT count(*) from repartition; END; DROP TABLE t1, t2; diff --git a/src/test/regress/sql/multi_index_statements.sql b/src/test/regress/sql/multi_index_statements.sql index f31329dcc..c19384ab3 100644 --- a/src/test/regress/sql/multi_index_statements.sql +++ b/src/test/regress/sql/multi_index_statements.sql @@ -45,7 +45,7 @@ CREATE INDEX lineitem_partial_index ON public.lineitem (l_shipdate) CREATE INDEX lineitem_colref_index ON public.lineitem (record_ne(lineitem.*, NULL)); -SET client_min_messages = ERROR; -- avoid version dependant warning about WAL +SET client_min_messages = ERROR; -- avoid version dependent warning about WAL CREATE INDEX lineitem_orderkey_hash_index ON public.lineitem USING hash (l_partkey); CREATE UNIQUE INDEX index_test_range_index_a ON index_test_range(a); CREATE UNIQUE INDEX index_test_range_index_a_b ON index_test_range(a,b); diff --git a/src/test/regress/sql/multi_partitioning.sql b/src/test/regress/sql/multi_partitioning.sql index c2adc8463..d5c513b7c 100644 --- a/src/test/regress/sql/multi_partitioning.sql +++ b/src/test/regress/sql/multi_partitioning.sql @@ -565,7 +565,7 @@ UPDATE partitioning_test SET time = '2010-10-10' WHERE id = 25; -- see the data is updated SELECT * FROM partitioning_test WHERE id = 25 ORDER BY 1; --- perform operations on partition and partioned tables together +-- perform operations on partition and partitioned tables together INSERT INTO partitioning_test VALUES(26, '2010-02-02', 26); INSERT INTO partitioning_test_2010 VALUES(26, '2010-02-02', 26); COPY partitioning_test FROM STDIN WITH CSV; diff --git a/src/test/regress/sql/multi_subquery_behavioral_analytics.sql b/src/test/regress/sql/multi_subquery_behavioral_analytics.sql index 9dc1b310e..3e8953ead 100644 --- a/src/test/regress/sql/multi_subquery_behavioral_analytics.sql +++ b/src/test/regress/sql/multi_subquery_behavioral_analytics.sql @@ -725,7 +725,7 @@ GROUP BY SET citus.subquery_pushdown to ON; -- multi-subquery-join --- The first query has filters on partion column to make it router plannable +-- The first query has filters on partition column to make it router plannable -- but it is processed by logical planner since we disabled router execution SELECT e1.user_id, diff --git a/src/test/regress/sql/non_colocated_leaf_subquery_joins.sql b/src/test/regress/sql/non_colocated_leaf_subquery_joins.sql index 23eeb1bb2..b2a251675 100644 --- a/src/test/regress/sql/non_colocated_leaf_subquery_joins.sql +++ b/src/test/regress/sql/non_colocated_leaf_subquery_joins.sql @@ -1,6 +1,6 @@ -- =================================================================== -- test recursive planning functionality for non-colocated subqueries --- We prefered to use EXPLAIN almost all the queries here, +-- We preferred to use EXPLAIN almost all the queries here, -- otherwise the execution time of so many repartition queries would -- be too high for the regression tests. Also, note that we're mostly -- interested in recurive planning side of the things, thus supressing diff --git a/src/test/regress/sql/non_colocated_subquery_joins.sql b/src/test/regress/sql/non_colocated_subquery_joins.sql index 37b22db5f..d8a2aaea1 100644 --- a/src/test/regress/sql/non_colocated_subquery_joins.sql +++ b/src/test/regress/sql/non_colocated_subquery_joins.sql @@ -1,6 +1,6 @@ -- =================================================================== -- test recursive planning functionality for non-colocated subqueries --- We prefered to use EXPLAIN almost all the queries here, +-- We preferred to use EXPLAIN almost all the queries here, -- otherwise the execution time of so many repartition queries would -- be too high for the regression tests. Also, note that we're mostly -- interested in recurive planning side of the things, thus supressing diff --git a/src/test/regress/sql/single_node.sql b/src/test/regress/sql/single_node.sql index 2ee0d456b..fed898084 100644 --- a/src/test/regress/sql/single_node.sql +++ b/src/test/regress/sql/single_node.sql @@ -529,7 +529,7 @@ SELECT count(*) FROM local; SELECT * FROM local ORDER BY c; SELECT * FROM ref, local WHERE a = c ORDER BY a; --- Check repartion joins are supported +-- Check repartition joins are supported SET citus.enable_repartition_joins TO ON; SELECT * FROM test t1, test t2 WHERE t1.x = t2.y ORDER BY t1.x; SET citus.enable_single_hash_repartition_joins TO ON; diff --git a/src/test/regress/sql/sqlsmith_failures.sql b/src/test/regress/sql/sqlsmith_failures.sql index 146147b2f..cacbf1e98 100644 --- a/src/test/regress/sql/sqlsmith_failures.sql +++ b/src/test/regress/sql/sqlsmith_failures.sql @@ -77,7 +77,7 @@ create table events ( ); create index event_time_idx on events using BRIN (event_time); create index event_json_idx on events using gin(payload); -select create_distributed_table('events', 'user_id'); -- on purpose don't collocate on correctly on org_id +select create_distributed_table('events', 'user_id'); -- on purpose don't colocate on correctly on org_id create table local_data( id bigserial primary key diff --git a/src/test/regress/sql/values.sql b/src/test/regress/sql/values.sql index c4cc46af8..51328d4ff 100644 --- a/src/test/regress/sql/values.sql +++ b/src/test/regress/sql/values.sql @@ -373,7 +373,7 @@ EXECUTE test_values_pushdown(1,2,3); EXECUTE test_values_pushdown(1,2,3); EXECUTE test_values_pushdown(1,2,3); --- prepared statements with volatile functtions should be still pushed down +-- prepared statements with volatile functions should be still pushed down -- because the function is evaluated on the coordinator CREATE OR REPLACE FUNCTION fixed_volatile_value() RETURNS integer VOLATILE AS $$ BEGIN