This is an automated email from the ASF dual-hosted git repository. yjhjstz pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/cloudberry.git
commit 7349bb4c214ce18e2d694ea62b1e2c7ed9bfec4e Author: Divyesh Vanjare <[email protected]> AuthorDate: Tue Aug 23 21:40:13 2022 -0700 Fix for ICW test alter_table_aocs2 Change table name in alter_table_aocs2 to avoid collision with other test alter_table_aocs using same table name --- src/test/regress/expected/alter_table_aocs2.out | 22 +++++++++++----------- src/test/regress/sql/alter_table_aocs2.sql | 22 +++++++++++----------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/src/test/regress/expected/alter_table_aocs2.out b/src/test/regress/expected/alter_table_aocs2.out index e0622f8a92..882e75984f 100644 --- a/src/test/regress/expected/alter_table_aocs2.out +++ b/src/test/regress/expected/alter_table_aocs2.out @@ -970,26 +970,26 @@ SELECT * FROM subpartition_aoco_leaf; (6 rows) -- Check if add column doesn't rewrite the table -CREATE TABLE addcol(i int) WITH (appendonly=true, orientation=column); -INSERT INTO addcol SELECT generate_series(1, 5); -CREATE TEMP TABLE relfilebefore AS - SELECT -1 segid, relname, relfilenode FROM pg_class WHERE relname LIKE 'addcol%' +CREATE TABLE testaddcol(i int) WITH (appendonly=true, orientation=column); +INSERT INTO testaddcol SELECT generate_series(1, 5); +CREATE TEMP TABLE relfilebeforetestaddcol AS + SELECT -1 segid, relname, relfilenode FROM pg_class WHERE relname LIKE 'testaddcol%' UNION SELECT gp_segment_id segid, relname, relfilenode FROM gp_dist_random('pg_class') - WHERE relname LIKE 'addcol%' ORDER BY segid; -ALTER TABLE addcol ADD COLUMN j int DEFAULT 5; -CREATE TEMP TABLE relfileafter AS - SELECT -1 segid, relname, relfilenode FROM pg_class WHERE relname LIKE 'addcol%' + WHERE relname LIKE 'testaddcol%' ORDER BY segid; +ALTER TABLE testaddcol ADD COLUMN j int DEFAULT 5; +CREATE TEMP TABLE relfileaftertestaddcol AS + SELECT -1 segid, relname, relfilenode FROM pg_class WHERE relname LIKE 'testaddcol%' UNION SELECT gp_segment_id segid, relname, relfilenode FROM gp_dist_random('pg_class') - WHERE relname LIKE 'addcol%' ORDER BY segid; + WHERE relname LIKE 'testaddcol%' ORDER BY segid; -- table shouldn't be rewritten -SELECT count(*) FROM (SELECT * FROM relfilebefore UNION SELECT * FROM relfileafter)a; +SELECT count(*) FROM (SELECT * FROM relfilebeforetestaddcol UNION SELECT * FROM relfileaftertestaddcol)a; count ------- 4 (1 row) -- data is intact -SELECT * FROM addcol; +SELECT * FROM testaddcol; i | j ---+--- 2 | 5 diff --git a/src/test/regress/sql/alter_table_aocs2.sql b/src/test/regress/sql/alter_table_aocs2.sql index 1312abf68e..2c1589af0e 100644 --- a/src/test/regress/sql/alter_table_aocs2.sql +++ b/src/test/regress/sql/alter_table_aocs2.sql @@ -613,23 +613,23 @@ SELECT * FROM subpartition_aoco_leaf; :chk_co_opt_qry; -- Check if add column doesn't rewrite the table -CREATE TABLE addcol(i int) WITH (appendonly=true, orientation=column); -INSERT INTO addcol SELECT generate_series(1, 5); +CREATE TABLE testaddcol(i int) WITH (appendonly=true, orientation=column); +INSERT INTO testaddcol SELECT generate_series(1, 5); -CREATE TEMP TABLE relfilebefore AS - SELECT -1 segid, relname, relfilenode FROM pg_class WHERE relname LIKE 'addcol%' +CREATE TEMP TABLE relfilebeforetestaddcol AS + SELECT -1 segid, relname, relfilenode FROM pg_class WHERE relname LIKE 'testaddcol%' UNION SELECT gp_segment_id segid, relname, relfilenode FROM gp_dist_random('pg_class') - WHERE relname LIKE 'addcol%' ORDER BY segid; + WHERE relname LIKE 'testaddcol%' ORDER BY segid; -ALTER TABLE addcol ADD COLUMN j int DEFAULT 5; +ALTER TABLE testaddcol ADD COLUMN j int DEFAULT 5; -CREATE TEMP TABLE relfileafter AS - SELECT -1 segid, relname, relfilenode FROM pg_class WHERE relname LIKE 'addcol%' +CREATE TEMP TABLE relfileaftertestaddcol AS + SELECT -1 segid, relname, relfilenode FROM pg_class WHERE relname LIKE 'testaddcol%' UNION SELECT gp_segment_id segid, relname, relfilenode FROM gp_dist_random('pg_class') - WHERE relname LIKE 'addcol%' ORDER BY segid; + WHERE relname LIKE 'testaddcol%' ORDER BY segid; -- table shouldn't be rewritten -SELECT count(*) FROM (SELECT * FROM relfilebefore UNION SELECT * FROM relfileafter)a; +SELECT count(*) FROM (SELECT * FROM relfilebeforetestaddcol UNION SELECT * FROM relfileaftertestaddcol)a; -- data is intact -SELECT * FROM addcol; +SELECT * FROM testaddcol; --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
