diff options
author | Tomas Vondra | 2017-05-06 21:47:28 +0000 |
---|---|---|
committer | Tomas Vondra | 2017-05-06 21:47:28 +0000 |
commit | 1e3d451d2f9559ed4fe390e36a0e13b93c62b560 (patch) | |
tree | 841945d6092b9c973985bcf5fc74cee5b62d25a5 | |
parent | 6a873fb5982777c22e165ac8a3838134d0ad263e (diff) |
Resolve failures in json and jsonb regression tests
The failures were caused by failed distribution key updates, which also
caused differences in subsequent query results. Instead of making the
table replicated as usual, I've decided to use DISTRIBUTE RANDOMLY in
this case, because we don't have that exercised in the tests yet.
-rw-r--r-- | src/test/regress/expected/json.out | 4 | ||||
-rw-r--r-- | src/test/regress/expected/jsonb.out | 2 | ||||
-rw-r--r-- | src/test/regress/sql/json.sql | 4 | ||||
-rw-r--r-- | src/test/regress/sql/jsonb.sql | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/src/test/regress/expected/json.out b/src/test/regress/expected/json.out index efcdc4141e..7cb0f27883 100644 --- a/src/test/regress/expected/json.out +++ b/src/test/regress/expected/json.out @@ -362,11 +362,11 @@ FROM (SELECT $$a$$ || x AS b, "z":[{"f1":2,"f2":[1,2,3]},{"f1":5,"f2":[4,5,6]}]} (4 rows) -CREATE TEMP TABLE rows AS +CREATE TEMP TABLE rows DISTRIBUTED RANDOMLY AS SELECT x, 'txt' || x as y FROM generate_series(1,3) AS x; SELECT row_to_json(q,true) -FROM rows q; +FROM rows q ORDER BY x, y; row_to_json -------------- {"x":1, + diff --git a/src/test/regress/expected/jsonb.out b/src/test/regress/expected/jsonb.out index a6d25defb0..e0ab3d3994 100644 --- a/src/test/regress/expected/jsonb.out +++ b/src/test/regress/expected/jsonb.out @@ -345,7 +345,7 @@ select to_jsonb(timestamptz '-Infinity'); (1 row) --jsonb_agg -CREATE TEMP TABLE rows AS +CREATE TEMP TABLE rows DISTRIBUTED RANDOMLY AS SELECT x, 'txt' || x as y FROM generate_series(1,3) AS x; SELECT jsonb_agg(q) diff --git a/src/test/regress/sql/json.sql b/src/test/regress/sql/json.sql index 603288bd1a..3685a54377 100644 --- a/src/test/regress/sql/json.sql +++ b/src/test/regress/sql/json.sql @@ -93,12 +93,12 @@ FROM (SELECT $$a$$ || x AS b, FROM generate_series(1,2) x, generate_series(4,5) y) q; -CREATE TEMP TABLE rows AS +CREATE TEMP TABLE rows DISTRIBUTED RANDOMLY AS SELECT x, 'txt' || x as y FROM generate_series(1,3) AS x; SELECT row_to_json(q,true) -FROM rows q; +FROM rows q ORDER BY x, y; SELECT row_to_json(row((select array_agg(x) as d from generate_series(5,10) x)),false); diff --git a/src/test/regress/sql/jsonb.sql b/src/test/regress/sql/jsonb.sql index b84bd70a29..fbdfbd8964 100644 --- a/src/test/regress/sql/jsonb.sql +++ b/src/test/regress/sql/jsonb.sql @@ -84,7 +84,7 @@ select to_jsonb(timestamptz '-Infinity'); --jsonb_agg -CREATE TEMP TABLE rows AS +CREATE TEMP TABLE rows DISTRIBUTED RANDOMLY AS SELECT x, 'txt' || x as y FROM generate_series(1,3) AS x; |