mirror of https://github.com/citusdata/citus.git
Add a config for arbitrary config tests where all the tables are null-shard-key tables (#6783/#6788)
parent
cdf54ff4b1
commit
ac0ffc9839
|
@ -76,6 +76,17 @@ def run_for_config(config, lock, sql_schedule_name):
|
|||
cfg.SUPER_USER_NAME,
|
||||
)
|
||||
common.save_regression_diff("postgres", config.output_dir)
|
||||
elif config.all_null_dist_key:
|
||||
exitCode |= common.run_pg_regress_without_exit(
|
||||
config.bindir,
|
||||
config.pg_srcdir,
|
||||
config.coordinator_port(),
|
||||
cfg.NULL_DIST_KEY_PREP_SCHEDULE,
|
||||
config.output_dir,
|
||||
config.input_dir,
|
||||
cfg.SUPER_USER_NAME,
|
||||
)
|
||||
common.save_regression_diff("null_dist_key_prep_regression", config.output_dir)
|
||||
|
||||
exitCode |= _run_pg_regress_on_port(
|
||||
config, config.coordinator_port(), cfg.CREATE_SCHEDULE
|
||||
|
|
|
@ -22,6 +22,7 @@ ARBITRARY_SCHEDULE_NAMES = [
|
|||
"sql_schedule",
|
||||
"sql_base_schedule",
|
||||
"postgres_schedule",
|
||||
"null_dist_key_prep_schedule",
|
||||
]
|
||||
|
||||
BEFORE_PG_UPGRADE_SCHEDULE = "./before_pg_upgrade_schedule"
|
||||
|
@ -29,6 +30,7 @@ AFTER_PG_UPGRADE_SCHEDULE = "./after_pg_upgrade_schedule"
|
|||
|
||||
CREATE_SCHEDULE = "./create_schedule"
|
||||
POSTGRES_SCHEDULE = "./postgres_schedule"
|
||||
NULL_DIST_KEY_PREP_SCHEDULE = "./null_dist_key_prep_schedule"
|
||||
SQL_SCHEDULE = "./sql_schedule"
|
||||
SQL_BASE_SCHEDULE = "./sql_base_schedule"
|
||||
|
||||
|
@ -101,6 +103,7 @@ class CitusBaseClusterConfig(object, metaclass=NewInitCaller):
|
|||
self.dbname = DATABASE_NAME
|
||||
self.is_mx = True
|
||||
self.is_citus = True
|
||||
self.all_null_dist_key = False
|
||||
self.name = type(self).__name__
|
||||
self.settings = {
|
||||
"shared_preload_libraries": "citus",
|
||||
|
@ -203,6 +206,49 @@ class PostgresConfig(CitusDefaultClusterConfig):
|
|||
]
|
||||
|
||||
|
||||
class AllNullDistKeyDefaultConfig(CitusDefaultClusterConfig):
|
||||
def __init__(self, arguments):
|
||||
super().__init__(arguments)
|
||||
self.all_null_dist_key = True
|
||||
self.skip_tests += [
|
||||
# i) Skip the following tests because they require SQL support beyond
|
||||
# router planner / supporting more DDL command types.
|
||||
#
|
||||
# group 1
|
||||
"dropped_columns_create_load",
|
||||
"dropped_columns_1",
|
||||
# group 2
|
||||
"distributed_planning_create_load",
|
||||
"distributed_planning",
|
||||
# group 4
|
||||
"views_create",
|
||||
"views",
|
||||
# group 5
|
||||
"intermediate_result_pruning_create",
|
||||
"intermediate_result_pruning_queries_1",
|
||||
"intermediate_result_pruning_queries_2",
|
||||
# group 6
|
||||
"local_dist_join_load",
|
||||
"local_dist_join",
|
||||
"arbitrary_configs_recurring_outer_join",
|
||||
# group 7
|
||||
"sequences_create",
|
||||
"sequences",
|
||||
# group 8
|
||||
"function_create",
|
||||
"functions",
|
||||
# group 9
|
||||
"merge_arbitrary_create",
|
||||
"merge_arbitrary",
|
||||
# group 10
|
||||
"arbitrary_configs_router_create",
|
||||
"arbitrary_configs_router",
|
||||
#
|
||||
# ii) Skip the following test as it requires support for create_distributed_function.
|
||||
"nested_execution",
|
||||
]
|
||||
|
||||
|
||||
class CitusSingleNodeClusterConfig(CitusDefaultClusterConfig):
|
||||
def __init__(self, arguments):
|
||||
super().__init__(arguments)
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
ALTER FUNCTION create_distributed_table RENAME TO create_distributed_table_internal;
|
||||
CREATE OR REPLACE FUNCTION pg_catalog.create_distributed_table(table_name regclass,
|
||||
distribution_column text,
|
||||
distribution_type citus.distribution_type DEFAULT 'hash',
|
||||
colocate_with text DEFAULT 'default',
|
||||
shard_count int DEFAULT NULL)
|
||||
RETURNS void
|
||||
LANGUAGE plpgsql
|
||||
AS $function$
|
||||
BEGIN
|
||||
PERFORM create_distributed_table_internal(table_name, NULL, NULL, colocate_with, NULL);
|
||||
END;
|
||||
$function$;
|
|
@ -0,0 +1 @@
|
|||
test: null_dist_key_prep
|
|
@ -0,0 +1,14 @@
|
|||
ALTER FUNCTION create_distributed_table RENAME TO create_distributed_table_internal;
|
||||
|
||||
CREATE OR REPLACE FUNCTION pg_catalog.create_distributed_table(table_name regclass,
|
||||
distribution_column text,
|
||||
distribution_type citus.distribution_type DEFAULT 'hash',
|
||||
colocate_with text DEFAULT 'default',
|
||||
shard_count int DEFAULT NULL)
|
||||
RETURNS void
|
||||
LANGUAGE plpgsql
|
||||
AS $function$
|
||||
BEGIN
|
||||
PERFORM create_distributed_table_internal(table_name, NULL, NULL, colocate_with, NULL);
|
||||
END;
|
||||
$function$;
|
Loading…
Reference in New Issue