-
Notifications
You must be signed in to change notification settings - Fork 684
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a test for citus_shards where table names have spaces
There was a bug reported for previous versions of Citus where shard_size was returning NULL for tables with spaces in them. It works fine on the main branch though, but I'm still adding a test for this to the main branch because it seems a good test to have.
- Loading branch information
Showing
4 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
CREATE SCHEMA citus_shards; | ||
SET search_path TO citus_shards; | ||
SET citus.shard_count TO 4; | ||
SET citus.shard_replication_factor TO 1; | ||
SET citus.next_shard_id TO 99456900; | ||
-- add tests here | ||
SET client_min_messages TO WARNING; | ||
DROP SCHEMA citus_shards CASCADE; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
CREATE SCHEMA citus_shards; | ||
SET search_path TO citus_shards; | ||
SET citus.shard_count TO 4; | ||
SET citus.shard_replication_factor TO 1; | ||
SET citus.next_shard_id TO 99456900; | ||
|
||
CREATE TABLE t1 (i int); | ||
SELECT create_distributed_table('t1', 'i'); | ||
CREATE TABLE "t with space" (i int); | ||
SELECT create_distributed_table('"t with space"', 'i'); | ||
INSERT INTO t1 SELECT generate_series(1, 100); | ||
INSERT INTO "t with space" SELECT generate_series(1, 1000); | ||
SELECT * FROM citus_shards; | ||
|
||
SET client_min_messages TO WARNING; | ||
DROP SCHEMA citus_shards CASCADE; |