From d800e2f46f087a99d262659d686700275237a934 Mon Sep 17 00:00:00 2001 From: Sven Klemm Date: Fri, 18 Jun 2021 17:17:09 +0200 Subject: [PATCH] Add missing ORDER BY clause to dist_hypertable test --- tsl/test/expected/dist_hypertable-12.out | 16 ++++++++-------- tsl/test/expected/dist_hypertable-13.out | 16 ++++++++-------- tsl/test/sql/dist_hypertable.sql.in | 12 ++++++------ 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/tsl/test/expected/dist_hypertable-12.out b/tsl/test/expected/dist_hypertable-12.out index 326e9b9d4..3b0524423 100644 --- a/tsl/test/expected/dist_hypertable-12.out +++ b/tsl/test/expected/dist_hypertable-12.out @@ -130,7 +130,7 @@ $$); CREATE TRIGGER _0_test_trigger_insert BEFORE INSERT ON disttable FOR EACH ROW EXECUTE FUNCTION test_trigger(); -SELECT * FROM _timescaledb_catalog.hypertable_data_node; +SELECT * FROM _timescaledb_catalog.hypertable_data_node ORDER BY 1,2,3; hypertable_id | node_hypertable_id | node_name | block_chunks ---------------+--------------------+----------------------+-------------- 1 | 1 | db_dist_hypertable_1 | f @@ -141,7 +141,7 @@ SELECT * FROM _timescaledb_catalog.hypertable_data_node; 2 | 2 | db_dist_hypertable_3 | f (6 rows) -SELECT * FROM _timescaledb_catalog.chunk_data_node; +SELECT * FROM _timescaledb_catalog.chunk_data_node ORDER BY 1,2,3; chunk_id | node_chunk_id | node_name ----------+---------------+----------- (0 rows) @@ -304,7 +304,7 @@ FROM show_chunks('disttable'); (6 rows) -- Show that there are assigned node_chunk_id:s in chunk data node mappings -SELECT * FROM _timescaledb_catalog.chunk_data_node; +SELECT * FROM _timescaledb_catalog.chunk_data_node ORDER BY 1,2,3; chunk_id | node_chunk_id | node_name ----------+---------------+---------------------- 1 | 1 | db_dist_hypertable_1 @@ -1031,7 +1031,7 @@ FROM test.show_subtables('disttable') st; (0 rows) -- Check that the chunks are assigned data nodes -SELECT * FROM _timescaledb_catalog.chunk_data_node; +SELECT * FROM _timescaledb_catalog.chunk_data_node ORDER BY 1,2,3; chunk_id | node_chunk_id | node_name ----------+---------------+---------------------- 1 | 1 | db_dist_hypertable_1 @@ -1613,12 +1613,12 @@ ORDER BY hypertable_schema, hypertable_name; INSERT INTO underreplicated VALUES ('2017-01-01 06:01', 1, 1.1), ('2017-01-02 07:01', 2, 3.5); WARNING: insufficient number of data nodes -SELECT * FROM _timescaledb_catalog.chunk_data_node; +SELECT * FROM _timescaledb_catalog.chunk_data_node ORDER BY 1,2,3; chunk_id | node_chunk_id | node_name ----------+---------------+---------------------- - 10 | 4 | db_dist_hypertable_3 10 | 4 | db_dist_hypertable_1 10 | 4 | db_dist_hypertable_2 + 10 | 4 | db_dist_hypertable_3 (3 rows) SELECT (_timescaledb_internal.show_chunk(show_chunks)).* @@ -1629,12 +1629,12 @@ FROM show_chunks('underreplicated'); (1 row) -- Show chunk data node mappings -SELECT * FROM _timescaledb_catalog.chunk_data_node; +SELECT * FROM _timescaledb_catalog.chunk_data_node ORDER BY 1,2,3; chunk_id | node_chunk_id | node_name ----------+---------------+---------------------- - 10 | 4 | db_dist_hypertable_3 10 | 4 | db_dist_hypertable_1 10 | 4 | db_dist_hypertable_2 + 10 | 4 | db_dist_hypertable_3 (3 rows) -- Show that chunks are created on remote data nodes and that all diff --git a/tsl/test/expected/dist_hypertable-13.out b/tsl/test/expected/dist_hypertable-13.out index d785f7b39..8418b2e8e 100644 --- a/tsl/test/expected/dist_hypertable-13.out +++ b/tsl/test/expected/dist_hypertable-13.out @@ -130,7 +130,7 @@ $$); CREATE TRIGGER _0_test_trigger_insert BEFORE INSERT ON disttable FOR EACH ROW EXECUTE FUNCTION test_trigger(); -SELECT * FROM _timescaledb_catalog.hypertable_data_node; +SELECT * FROM _timescaledb_catalog.hypertable_data_node ORDER BY 1,2,3; hypertable_id | node_hypertable_id | node_name | block_chunks ---------------+--------------------+----------------------+-------------- 1 | 1 | db_dist_hypertable_1 | f @@ -141,7 +141,7 @@ SELECT * FROM _timescaledb_catalog.hypertable_data_node; 2 | 2 | db_dist_hypertable_3 | f (6 rows) -SELECT * FROM _timescaledb_catalog.chunk_data_node; +SELECT * FROM _timescaledb_catalog.chunk_data_node ORDER BY 1,2,3; chunk_id | node_chunk_id | node_name ----------+---------------+----------- (0 rows) @@ -304,7 +304,7 @@ FROM show_chunks('disttable'); (6 rows) -- Show that there are assigned node_chunk_id:s in chunk data node mappings -SELECT * FROM _timescaledb_catalog.chunk_data_node; +SELECT * FROM _timescaledb_catalog.chunk_data_node ORDER BY 1,2,3; chunk_id | node_chunk_id | node_name ----------+---------------+---------------------- 1 | 1 | db_dist_hypertable_1 @@ -1030,7 +1030,7 @@ FROM test.show_subtables('disttable') st; (0 rows) -- Check that the chunks are assigned data nodes -SELECT * FROM _timescaledb_catalog.chunk_data_node; +SELECT * FROM _timescaledb_catalog.chunk_data_node ORDER BY 1,2,3; chunk_id | node_chunk_id | node_name ----------+---------------+---------------------- 1 | 1 | db_dist_hypertable_1 @@ -1612,12 +1612,12 @@ ORDER BY hypertable_schema, hypertable_name; INSERT INTO underreplicated VALUES ('2017-01-01 06:01', 1, 1.1), ('2017-01-02 07:01', 2, 3.5); WARNING: insufficient number of data nodes -SELECT * FROM _timescaledb_catalog.chunk_data_node; +SELECT * FROM _timescaledb_catalog.chunk_data_node ORDER BY 1,2,3; chunk_id | node_chunk_id | node_name ----------+---------------+---------------------- - 10 | 4 | db_dist_hypertable_3 10 | 4 | db_dist_hypertable_1 10 | 4 | db_dist_hypertable_2 + 10 | 4 | db_dist_hypertable_3 (3 rows) SELECT (_timescaledb_internal.show_chunk(show_chunks)).* @@ -1628,12 +1628,12 @@ FROM show_chunks('underreplicated'); (1 row) -- Show chunk data node mappings -SELECT * FROM _timescaledb_catalog.chunk_data_node; +SELECT * FROM _timescaledb_catalog.chunk_data_node ORDER BY 1,2,3; chunk_id | node_chunk_id | node_name ----------+---------------+---------------------- - 10 | 4 | db_dist_hypertable_3 10 | 4 | db_dist_hypertable_1 10 | 4 | db_dist_hypertable_2 + 10 | 4 | db_dist_hypertable_3 (3 rows) -- Show that chunks are created on remote data nodes and that all diff --git a/tsl/test/sql/dist_hypertable.sql.in b/tsl/test/sql/dist_hypertable.sql.in index 0ede699b5..c97489e91 100644 --- a/tsl/test/sql/dist_hypertable.sql.in +++ b/tsl/test/sql/dist_hypertable.sql.in @@ -124,8 +124,8 @@ CREATE TRIGGER _0_test_trigger_insert BEFORE INSERT ON disttable FOR EACH ROW EXECUTE FUNCTION test_trigger(); -SELECT * FROM _timescaledb_catalog.hypertable_data_node; -SELECT * FROM _timescaledb_catalog.chunk_data_node; +SELECT * FROM _timescaledb_catalog.hypertable_data_node ORDER BY 1,2,3; +SELECT * FROM _timescaledb_catalog.chunk_data_node ORDER BY 1,2,3; -- The constraints, indexes, and triggers on the hypertable SELECT * FROM test.show_constraints('disttable'); @@ -213,7 +213,7 @@ SELECT (_timescaledb_internal.show_chunk(show_chunks)).* FROM show_chunks('disttable'); -- Show that there are assigned node_chunk_id:s in chunk data node mappings -SELECT * FROM _timescaledb_catalog.chunk_data_node; +SELECT * FROM _timescaledb_catalog.chunk_data_node ORDER BY 1,2,3; -- Show that chunks are created on data nodes and that each data node -- has their own unique slice in the space (device) dimension. @@ -334,7 +334,7 @@ SELECT st."Child" as chunk_relid, test.show_triggers((st)."Child") FROM test.show_subtables('disttable') st; -- Check that the chunks are assigned data nodes -SELECT * FROM _timescaledb_catalog.chunk_data_node; +SELECT * FROM _timescaledb_catalog.chunk_data_node ORDER BY 1,2,3; -- Adding a new trigger should not recurse to foreign chunks CREATE TRIGGER _1_test_trigger_insert @@ -494,12 +494,12 @@ ORDER BY hypertable_schema, hypertable_name; INSERT INTO underreplicated VALUES ('2017-01-01 06:01', 1, 1.1), ('2017-01-02 07:01', 2, 3.5); -SELECT * FROM _timescaledb_catalog.chunk_data_node; +SELECT * FROM _timescaledb_catalog.chunk_data_node ORDER BY 1,2,3; SELECT (_timescaledb_internal.show_chunk(show_chunks)).* FROM show_chunks('underreplicated'); -- Show chunk data node mappings -SELECT * FROM _timescaledb_catalog.chunk_data_node; +SELECT * FROM _timescaledb_catalog.chunk_data_node ORDER BY 1,2,3; -- Show that chunks are created on remote data nodes and that all -- data nodes/chunks have the same data due to replication