提交 00dd1ead 编写于 作者: J Jimmy Yih 提交者: Ben Christel

Make zstd tests more deterministic

The current tests would diff on the SELECT queries containing ORDER BY
LIMIT on a gpdemo cluster (seen on my MacOS Mojave laptop and on a
CentOS 6 & 7 VM). Most likely the test answer file was created from a
cluster that was not the test standard 3 primary segment configuration
so the SELECT may output differently.
Co-authored-by: NKaren Huddleston <khuddleston@pivotal.io>
上级 dc5acb72
...@@ -5,23 +5,23 @@ HINT: The 'DISTRIBUTED BY' clause determines the distribution of data. Make sur ...@@ -5,23 +5,23 @@ HINT: The 'DISTRIBUTED BY' clause determines the distribution of data. Make sur
INSERT INTO zstdtest SELECT g, 'foo' || g FROM generate_series(1, 100000) g; INSERT INTO zstdtest SELECT g, 'foo' || g FROM generate_series(1, 100000) g;
INSERT INTO zstdtest SELECT g, 'bar' || g FROM generate_series(1, 100000) g; INSERT INTO zstdtest SELECT g, 'bar' || g FROM generate_series(1, 100000) g;
-- Check contents, at the beginning of the table and at the end. -- Check contents, at the beginning of the table and at the end.
SELECT * FROM zstdtest ORDER BY id LIMIT 5; SELECT * FROM zstdtest ORDER BY (id, t) LIMIT 5;
id | t id | t
----+------ ----+------
1 | bar1 1 | bar1
1 | foo1 1 | foo1
2 | foo2
2 | bar2 2 | bar2
2 | foo2
3 | bar3 3 | bar3
(5 rows) (5 rows)
SELECT * FROM zstdtest ORDER BY id DESC LIMIT 5; SELECT * FROM zstdtest ORDER BY (id, t) DESC LIMIT 5;
id | t id | t
--------+----------- --------+-----------
100000 | bar100000
100000 | foo100000 100000 | foo100000
99999 | bar99999 100000 | bar100000
99999 | foo99999 99999 | foo99999
99999 | bar99999
99998 | foo99998 99998 | foo99998
(5 rows) (5 rows)
...@@ -37,46 +37,46 @@ NOTICE: Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'id' a ...@@ -37,46 +37,46 @@ NOTICE: Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'id' a
HINT: The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew. HINT: The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.
INSERT INTO zstdtest_1 SELECT g, 'foo' || g FROM generate_series(1, 10000) g; INSERT INTO zstdtest_1 SELECT g, 'foo' || g FROM generate_series(1, 10000) g;
INSERT INTO zstdtest_1 SELECT g, 'bar' || g FROM generate_series(1, 10000) g; INSERT INTO zstdtest_1 SELECT g, 'bar' || g FROM generate_series(1, 10000) g;
SELECT * FROM zstdtest_1 ORDER BY id LIMIT 5; SELECT * FROM zstdtest_1 ORDER BY (id, t) LIMIT 5;
id | t id | t
----+------ ----+------
1 | bar1 1 | bar1
1 | foo1 1 | foo1
2 | foo2
2 | bar2 2 | bar2
2 | foo2
3 | bar3 3 | bar3
(5 rows) (5 rows)
SELECT * FROM zstdtest_1 ORDER BY id DESC LIMIT 5; SELECT * FROM zstdtest_1 ORDER BY (id, t) DESC LIMIT 5;
id | t id | t
-------+---------- -------+----------
10000 | foo10000 10000 | foo10000
10000 | bar10000 10000 | bar10000
9999 | bar9999
9999 | foo9999 9999 | foo9999
9998 | bar9998 9999 | bar9999
9998 | foo9998
(5 rows) (5 rows)
INSERT INTO zstdtest_19 SELECT g, 'foo' || g FROM generate_series(1, 10000) g; INSERT INTO zstdtest_19 SELECT g, 'foo' || g FROM generate_series(1, 10000) g;
INSERT INTO zstdtest_19 SELECT g, 'bar' || g FROM generate_series(1, 10000) g; INSERT INTO zstdtest_19 SELECT g, 'bar' || g FROM generate_series(1, 10000) g;
SELECT * FROM zstdtest_19 ORDER BY id LIMIT 5; SELECT * FROM zstdtest_19 ORDER BY (id, t) LIMIT 5;
id | t id | t
----+------ ----+------
1 | bar1 1 | bar1
1 | foo1 1 | foo1
2 | foo2
2 | bar2 2 | bar2
2 | foo2
3 | bar3 3 | bar3
(5 rows) (5 rows)
SELECT * FROM zstdtest_19 ORDER BY id DESC LIMIT 5; SELECT * FROM zstdtest_19 ORDER BY (id, t) DESC LIMIT 5;
id | t id | t
-------+---------- -------+----------
10000 | foo10000 10000 | foo10000
10000 | bar10000 10000 | bar10000
9999 | bar9999
9999 | foo9999 9999 | foo9999
9998 | bar9998 9999 | bar9999
9998 | foo9998
(5 rows) (5 rows)
-- Test the bounds of compresslevel. None of these are allowed. -- Test the bounds of compresslevel. None of these are allowed.
......
...@@ -6,8 +6,8 @@ INSERT INTO zstdtest SELECT g, 'foo' || g FROM generate_series(1, 100000) g; ...@@ -6,8 +6,8 @@ INSERT INTO zstdtest SELECT g, 'foo' || g FROM generate_series(1, 100000) g;
INSERT INTO zstdtest SELECT g, 'bar' || g FROM generate_series(1, 100000) g; INSERT INTO zstdtest SELECT g, 'bar' || g FROM generate_series(1, 100000) g;
-- Check contents, at the beginning of the table and at the end. -- Check contents, at the beginning of the table and at the end.
SELECT * FROM zstdtest ORDER BY id LIMIT 5; SELECT * FROM zstdtest ORDER BY (id, t) LIMIT 5;
SELECT * FROM zstdtest ORDER BY id DESC LIMIT 5; SELECT * FROM zstdtest ORDER BY (id, t) DESC LIMIT 5;
-- Test different compression levels: -- Test different compression levels:
...@@ -17,13 +17,13 @@ CREATE TABLE zstdtest_19 (id int4, t text) WITH (appendonly=true, compresstype=z ...@@ -17,13 +17,13 @@ CREATE TABLE zstdtest_19 (id int4, t text) WITH (appendonly=true, compresstype=z
INSERT INTO zstdtest_1 SELECT g, 'foo' || g FROM generate_series(1, 10000) g; INSERT INTO zstdtest_1 SELECT g, 'foo' || g FROM generate_series(1, 10000) g;
INSERT INTO zstdtest_1 SELECT g, 'bar' || g FROM generate_series(1, 10000) g; INSERT INTO zstdtest_1 SELECT g, 'bar' || g FROM generate_series(1, 10000) g;
SELECT * FROM zstdtest_1 ORDER BY id LIMIT 5; SELECT * FROM zstdtest_1 ORDER BY (id, t) LIMIT 5;
SELECT * FROM zstdtest_1 ORDER BY id DESC LIMIT 5; SELECT * FROM zstdtest_1 ORDER BY (id, t) DESC LIMIT 5;
INSERT INTO zstdtest_19 SELECT g, 'foo' || g FROM generate_series(1, 10000) g; INSERT INTO zstdtest_19 SELECT g, 'foo' || g FROM generate_series(1, 10000) g;
INSERT INTO zstdtest_19 SELECT g, 'bar' || g FROM generate_series(1, 10000) g; INSERT INTO zstdtest_19 SELECT g, 'bar' || g FROM generate_series(1, 10000) g;
SELECT * FROM zstdtest_19 ORDER BY id LIMIT 5; SELECT * FROM zstdtest_19 ORDER BY (id, t) LIMIT 5;
SELECT * FROM zstdtest_19 ORDER BY id DESC LIMIT 5; SELECT * FROM zstdtest_19 ORDER BY (id, t) DESC LIMIT 5;
-- Test the bounds of compresslevel. None of these are allowed. -- Test the bounds of compresslevel. None of these are allowed.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册