From ecd8dd246591c8779009a5c200405b8e9e3c54e4 Mon Sep 17 00:00:00 2001 From: Ahmet Gedemenli Date: Wed, 20 Oct 2021 18:45:58 +0300 Subject: [PATCH] Fix rebase error --- .../expected/multi_master_delete_protocol.out | 105 ------------------ .../sql/multi_master_delete_protocol.sql | 17 --- 2 files changed, 122 deletions(-) delete mode 100644 src/test/regress/expected/multi_master_delete_protocol.out delete mode 100644 src/test/regress/sql/multi_master_delete_protocol.sql diff --git a/src/test/regress/expected/multi_master_delete_protocol.out b/src/test/regress/expected/multi_master_delete_protocol.out deleted file mode 100644 index 365201f36..000000000 --- a/src/test/regress/expected/multi_master_delete_protocol.out +++ /dev/null @@ -1,105 +0,0 @@ --- --- MULTI_MASTER_DELETE_PROTOCOL --- -SET citus.next_shard_id TO 320000; --- Create a new range partitioned customer_delete_protocol table and load data into it. -CREATE TABLE customer_delete_protocol ( - c_custkey integer not null, - c_name varchar(25) not null, - c_address varchar(40) not null, - c_nationkey integer not null, - c_phone char(15) not null, - c_acctbal decimal(15,2) not null, - c_mktsegment char(10) not null, - c_comment varchar(117) not null); -SELECT master_create_distributed_table('customer_delete_protocol', 'c_custkey', 'append'); - master_create_distributed_table ---------------------------------------------------------------------- - -(1 row) - -\copy customer_delete_protocol FROM '/home/ahmet/citus/src/test/regress/data/customer.1.data' with delimiter '|' -\copy customer_delete_protocol FROM '/home/ahmet/citus/src/test/regress/data/customer.2.data' with delimiter '|' -\copy customer_delete_protocol FROM '/home/ahmet/citus/src/test/regress/data/customer.3.data' with delimiter '|' --- Testing master_apply_delete_command --- Check that we don't support conditions on columns other than partition key. -SELECT master_apply_delete_command('DELETE FROM customer_delete_protocol - WHERE c_acctbal > 0.0'); -ERROR: cannot delete from distributed table -DETAIL: Where clause includes a column other than partition column --- Check that we delete a shard if and only if all rows in the shard satisfy the condition. -SELECT master_apply_delete_command('DELETE FROM customer_delete_protocol - WHERE c_custkey > 6500'); - master_apply_delete_command ---------------------------------------------------------------------- - 0 -(1 row) - -SELECT count(*) from customer_delete_protocol; - count ---------------------------------------------------------------------- - 3000 -(1 row) - --- Delete one shard that satisfies the given conditions. -SELECT master_apply_delete_command('DELETE FROM customer_delete_protocol - WHERE c_custkey > 1000 AND c_custkey < 3000'); - master_apply_delete_command ---------------------------------------------------------------------- - 1 -(1 row) - -SELECT count(*) from customer_delete_protocol; - count ---------------------------------------------------------------------- - 2000 -(1 row) - --- Delete all shards if no condition is provided. -SELECT master_apply_delete_command('DELETE FROM customer_delete_protocol'); - master_apply_delete_command ---------------------------------------------------------------------- - 2 -(1 row) - -SELECT count(*) FROM customer_delete_protocol; - count ---------------------------------------------------------------------- - 0 -(1 row) - --- Verify that empty shards are deleted if no condition is provided -SELECT 1 AS one FROM master_create_empty_shard('customer_delete_protocol'); - one ---------------------------------------------------------------------- - 1 -(1 row) - -SELECT master_apply_delete_command('DELETE FROM customer_delete_protocol - WHERE c_custkey > 1000'); - master_apply_delete_command ---------------------------------------------------------------------- - 0 -(1 row) - -SELECT master_apply_delete_command('DELETE FROM customer_delete_protocol'); - master_apply_delete_command ---------------------------------------------------------------------- - 1 -(1 row) - --- Verify that master_apply_delete_command can be called in a transaction block -SELECT 1 AS one FROM master_create_empty_shard('customer_delete_protocol'); - one ---------------------------------------------------------------------- - 1 -(1 row) - -BEGIN; -SELECT master_apply_delete_command('DELETE FROM customer_delete_protocol'); - master_apply_delete_command ---------------------------------------------------------------------- - 1 -(1 row) - -COMMIT; diff --git a/src/test/regress/sql/multi_master_delete_protocol.sql b/src/test/regress/sql/multi_master_delete_protocol.sql deleted file mode 100644 index ce4c65c5d..000000000 --- a/src/test/regress/sql/multi_master_delete_protocol.sql +++ /dev/null @@ -1,17 +0,0 @@ --- --- MULTI_MASTER_PROTOCOL --- --- Tests that check the metadata returned by the master node. - - -SET citus.next_shard_id TO 740000; - - -SELECT part_storage_type, part_key, part_replica_count, part_max_size, - part_placement_policy FROM master_get_table_metadata('lineitem'); - -SELECT * FROM master_get_table_ddl_events('lineitem') order by 1; - -SELECT * FROM master_get_new_shardid(); - -SELECT * FROM master_get_active_worker_nodes();