提交 27d0ae5d 编写于 作者: J Jimmy Yih

ICW changes for subselect_gp, gppc, and gpload.

For subselect_gp test, we were removing the distribution policy of a
table to see if it would do a gather motion or not. Since it's
technically a corrupted table, we should delete it after we're done
with it. We also remove a quicklz reference that should not have been
there.

For gppc test, they were using the regression database. This made our
gpcheckcat call at the end of ICW relatively useless since all our
data would have been deleted due to gppc tests recreating the
regression database.

For gpload test, some generated files were previously commited. We
should be actively cautious of this and remove them when we see them.
上级 ebc36838
query*.out query*.out
query*.sql query*.sql
gpload/config
gpload2/config gpload2/config
gpload2/setup.out gpload2/setup.out
gpload2/data_file.txt
...@@ -31,10 +31,11 @@ mkpath = lambda *x: os.path.join(MYD, *x) ...@@ -31,10 +31,11 @@ mkpath = lambda *x: os.path.join(MYD, *x)
UPD = os.path.abspath(mkpath('..')) UPD = os.path.abspath(mkpath('..'))
dataPath = MYD + "/data" dataPath = MYD + "/data"
configPath = MYD + "/config" configPath = MYD + "/config"
if not os.path.exists(configPath):
os.mkdir(configPath)
if UPD not in sys.path: if UPD not in sys.path:
sys.path.append(UPD) sys.path.append(UPD)
if platform.system() in ['Windows', 'Microsoft']: if platform.system() in ['Windows', 'Microsoft']:
remove_command = "del" remove_command = "del"
copy_command = 'copy' copy_command = 'copy'
......
version: 1.0.0.1
database: gptest
user: gpadmin
host: 172.17.0.5
gpload:
input:
- source:
local_hostname:
- 172.17.0.5
file: [ /home/gpadmin/gpload/gpdb/gpMgmt/bin/gpload_test/gpload/data/lineitem.tbl.small ]
- delimiter: '|'
output:
- table: lineitem
aaa|qwer|shjhjg|2012-06-01 15:30:30|1|111|834567|45.67|789.123|7.12345|123.456789|q|a
bbb|twob|shpits|2011-06-01 12:30:30|2|222|834567|45.67|789.123|7.12345|987.654321|w|a
fff|twof|shpits|2011-06-01 12:30:30|3|333|834567|45.67|789.123|7.12345|654.321987|e|a
eee|twoe|shpits|2011-06-01 12:30:30|4|444|834567|45.67|789.123|7.12345|145.456789|r|a
ggg|twog|shpits|2011-06-01 12:30:30|5|555|834567|45.67|789.123|7.12345|123.222289|t|a
iii|twoi|shpits|2011-06-01 12:30:30|6|666|834567|45.67|789.123|7.12345|122.444789|y|a
ccc|twoc|shpits|2011-06-01 12:30:30|7|777|834567|45.67|789.123|7.12345|123.456111|u|a
hhh|twoh|shpits|2011-06-01 12:30:30|8|732|834567|45.67|789.123|7.12345|123.456222|i|a
ddd|twod|shpits|2011-06-01 12:30:30|9|732|834567|45.67|789.123|7.12345|123.423658|o|a
lll|tloj|shpits|2011-06-01 12:30:30|10|732|834567|45.67|789.123|7.12345|323.454539|p|a
uuu|twuj|shpits|2011-06-01 12:30:30|11|732|834567|45.67|789.123|7.12345|456.454658|a|a
qqq|qwoj|shpits|2011-06-01 12:30:30|12|732|834567|45.67|789.123|7.12345|867.456780|s|a
www|twww|shpits|2011-06-01 12:30:30|13|732|834567|45.67|789.123|7.12345|733.456788|d|a
zzz|zwoj|shpits|2011-06-01 12:30:30|14|732|834567|45.67|789.123|7.12345|723.456776|f|a
xxx|txxx|shpits|2011-06-01 12:30:30|15|732|834567|45.67|789.123|7.12345|523.456754|g|a
ttt|ttgt|shpits|2011-06-01 12:30:30|16|732|834567|45.67|789.123|7.12345|156.456178|h|a
kkk|zxcv|iuytrf|2011-06-01 12:30:30|17|888|834567|45.67|789.123|7.12345|357.159483|j|a
yyy|yycy|iuyyyf|2011-06-01 12:30:30|18|999|834567|45.67|789.123|7.12345|854.548732|k|a
ppp|kzxv|iuytrf|2011-06-01 12:30:30|19|777|834567|45.67|789.123|7.12345|111.159483|l|a
mmm|kmmv|ighmmf|2011-06-01 12:30:30|20|909|834567|45.67|789.123|7.12345|222.159483|z|a
...@@ -23,6 +23,6 @@ PG_CPPFLAGS = -I$(shell $(PG_CONFIG) --includedir) ...@@ -23,6 +23,6 @@ PG_CPPFLAGS = -I$(shell $(PG_CONFIG) --includedir)
SHLIB_LINK = -L$(shell $(PG_CONFIG) --libdir) -lgppc SHLIB_LINK = -L$(shell $(PG_CONFIG) --libdir) -lgppc
include $(PGXS) include $(PGXS)
REGRESS_OPTS = --init-file=init_file REGRESS_OPTS = --dbname=gppc_demo --init-file=init_file
installcheck: install installcheck: install
...@@ -23,6 +23,6 @@ PG_CPPFLAGS = -I$(shell $(PG_CONFIG) --includedir) ...@@ -23,6 +23,6 @@ PG_CPPFLAGS = -I$(shell $(PG_CONFIG) --includedir)
SHLIB_LINK = -L$(shell $(PG_CONFIG) --libdir) -lgppc SHLIB_LINK = -L$(shell $(PG_CONFIG) --libdir) -lgppc
include $(PGXS) include $(PGXS)
REGRESS_OPTS = --init-file=init_file REGRESS_OPTS = --dbname=gppc_basic --init-file=init_file
installcheck: install installcheck: install
...@@ -23,6 +23,6 @@ PG_CPPFLAGS = -I$(shell $(PG_CONFIG) --includedir) ...@@ -23,6 +23,6 @@ PG_CPPFLAGS = -I$(shell $(PG_CONFIG) --includedir)
SHLIB_LINK = -L$(shell $(PG_CONFIG) --libdir) -lgppc SHLIB_LINK = -L$(shell $(PG_CONFIG) --libdir) -lgppc
include $(PGXS) include $(PGXS)
REGRESS_OPTS = --init-file=init_file REGRESS_OPTS = --dbname=tabfunc_gppc_demo --init-file=init_file
installcheck: install installcheck: install
...@@ -378,14 +378,14 @@ select array(select x from csq_d1); -- {1} ...@@ -378,14 +378,14 @@ select array(select x from csq_d1); -- {1}
-- --
-- CSQs involving master-only and distributed tables -- CSQs involving master-only and distributed tables
-- --
drop table if exists t3coquicklz; drop table if exists t3cozlib;
NOTICE: table "t3coquicklz" does not exist, skipping NOTICE: table "t3cozlib" does not exist, skipping
create table t3coquicklz (c1 int , c2 varchar) with (appendonly=true, compresstype=quicklz, orientation=column) distributed by (c1); create table t3cozlib (c1 int , c2 varchar) with (appendonly=true, compresstype=zlib, orientation=column) distributed by (c1);
drop table if exists pg_attribute_storage; drop table if exists pg_attribute_storage;
NOTICE: table "pg_attribute_storage" does not exist, skipping NOTICE: table "pg_attribute_storage" does not exist, skipping
create table pg_attribute_storage (attrelid int, attnum int, attoptions text[]) distributed by (attrelid); create table pg_attribute_storage (attrelid int, attnum int, attoptions text[]) distributed by (attrelid);
insert into pg_attribute_storage values ('t3coquicklz'::regclass, 1, E'{\'something\'}'); insert into pg_attribute_storage values ('t3cozlib'::regclass, 1, E'{\'something\'}');
insert into pg_attribute_storage values ('t3coquicklz'::regclass, 2, E'{\'something2\'}'); insert into pg_attribute_storage values ('t3cozlib'::regclass, 2, E'{\'something2\'}');
SELECT a.attname SELECT a.attname
, pg_catalog.format_type(a.atttypid, a.atttypmod) , pg_catalog.format_type(a.atttypid, a.atttypmod)
, ( SELECT substring(pg_catalog.pg_get_expr(d.adbin, d.adrelid) for 128) , ( SELECT substring(pg_catalog.pg_get_expr(d.adbin, d.adrelid) for 128)
...@@ -401,7 +401,7 @@ FROM pg_attribute_storage s ...@@ -401,7 +401,7 @@ FROM pg_attribute_storage s
WHERE s.attrelid = a.attrelid AND s.attnum = a.attnum WHERE s.attrelid = a.attrelid AND s.attnum = a.attnum
) newcolumn ) newcolumn
FROM pg_catalog.pg_attribute a FROM pg_catalog.pg_attribute a
WHERE a.attrelid = 't3coquicklz'::regclass AND a.attnum > 0 AND NOT a.attisdropped WHERE a.attrelid = 't3cozlib'::regclass AND a.attnum > 0 AND NOT a.attisdropped
ORDER BY a.attnum ORDER BY a.attnum
; -- expect to see 2 rows ; -- expect to see 2 rows
attname | format_type | ?column? | attnotnull | attnum | attstorage | col_description | newcolumn attname | format_type | ?column? | attnotnull | attnum | attstorage | col_description | newcolumn
...@@ -486,6 +486,8 @@ select * from csq_d1 where x not in (select x from csq_m1) or x < -100; -- (4) ...@@ -486,6 +486,8 @@ select * from csq_d1 where x not in (select x from csq_m1) or x < -100; -- (4)
4 4
(1 row) (1 row)
-- drop csq_m1 since we deleted its gp_distribution_policy entry
drop table csq_m1;
-- --
-- MPP-14441 Don't lose track of initplans -- MPP-14441 Don't lose track of initplans
-- --
......
...@@ -308,14 +308,14 @@ select array(select x from csq_d1); -- {1} ...@@ -308,14 +308,14 @@ select array(select x from csq_d1); -- {1}
-- --
-- CSQs involving master-only and distributed tables -- CSQs involving master-only and distributed tables
-- --
drop table if exists t3coquicklz; drop table if exists t3cozlib;
NOTICE: table "t3coquicklz" does not exist, skipping NOTICE: table "t3cozlib" does not exist, skipping
create table t3coquicklz (c1 int , c2 varchar) with (appendonly=true, compresstype=quicklz, orientation=column) distributed by (c1); create table t3cozlib (c1 int , c2 varchar) with (appendonly=true, compresstype=zlib, orientation=column) distributed by (c1);
drop table if exists pg_attribute_storage; drop table if exists pg_attribute_storage;
NOTICE: table "pg_attribute_storage" does not exist, skipping NOTICE: table "pg_attribute_storage" does not exist, skipping
create table pg_attribute_storage (attrelid int, attnum int, attoptions text[]) distributed by (attrelid); create table pg_attribute_storage (attrelid int, attnum int, attoptions text[]) distributed by (attrelid);
insert into pg_attribute_storage values ('t3coquicklz'::regclass, 1, E'{\'something\'}'); insert into pg_attribute_storage values ('t3cozlib'::regclass, 1, E'{\'something\'}');
insert into pg_attribute_storage values ('t3coquicklz'::regclass, 2, E'{\'something2\'}'); insert into pg_attribute_storage values ('t3cozlib'::regclass, 2, E'{\'something2\'}');
SELECT a.attname SELECT a.attname
, pg_catalog.format_type(a.atttypid, a.atttypmod) , pg_catalog.format_type(a.atttypid, a.atttypmod)
, ( SELECT substring(pg_catalog.pg_get_expr(d.adbin, d.adrelid) for 128) , ( SELECT substring(pg_catalog.pg_get_expr(d.adbin, d.adrelid) for 128)
...@@ -331,7 +331,7 @@ FROM pg_attribute_storage s ...@@ -331,7 +331,7 @@ FROM pg_attribute_storage s
WHERE s.attrelid = a.attrelid AND s.attnum = a.attnum WHERE s.attrelid = a.attrelid AND s.attnum = a.attnum
) newcolumn ) newcolumn
FROM pg_catalog.pg_attribute a FROM pg_catalog.pg_attribute a
WHERE a.attrelid = 't3coquicklz'::regclass AND a.attnum > 0 AND NOT a.attisdropped WHERE a.attrelid = 't3cozlib'::regclass AND a.attnum > 0 AND NOT a.attisdropped
ORDER BY a.attnum ORDER BY a.attnum
; -- expect to see 2 rows ; -- expect to see 2 rows
attname | format_type | ?column? | attnotnull | attnum | attstorage | col_description | newcolumn attname | format_type | ?column? | attnotnull | attnum | attstorage | col_description | newcolumn
...@@ -437,6 +437,8 @@ select * from csq_d1 where x not in (select x from csq_m1) or x < -100; -- (4) ...@@ -437,6 +437,8 @@ select * from csq_d1 where x not in (select x from csq_m1) or x < -100; -- (4)
4 4
(1 row) (1 row)
-- drop csq_m1 since we deleted its gp_distribution_policy entry
drop table csq_m1;
-- --
-- MPP-14441 Don't lose track of initplans -- MPP-14441 Don't lose track of initplans
-- --
......
...@@ -144,16 +144,16 @@ select array(select x from csq_d1); -- {1} ...@@ -144,16 +144,16 @@ select array(select x from csq_d1); -- {1}
-- CSQs involving master-only and distributed tables -- CSQs involving master-only and distributed tables
-- --
drop table if exists t3coquicklz; drop table if exists t3cozlib;
create table t3coquicklz (c1 int , c2 varchar) with (appendonly=true, compresstype=quicklz, orientation=column) distributed by (c1); create table t3cozlib (c1 int , c2 varchar) with (appendonly=true, compresstype=zlib, orientation=column) distributed by (c1);
drop table if exists pg_attribute_storage; drop table if exists pg_attribute_storage;
create table pg_attribute_storage (attrelid int, attnum int, attoptions text[]) distributed by (attrelid); create table pg_attribute_storage (attrelid int, attnum int, attoptions text[]) distributed by (attrelid);
insert into pg_attribute_storage values ('t3coquicklz'::regclass, 1, E'{\'something\'}'); insert into pg_attribute_storage values ('t3cozlib'::regclass, 1, E'{\'something\'}');
insert into pg_attribute_storage values ('t3coquicklz'::regclass, 2, E'{\'something2\'}'); insert into pg_attribute_storage values ('t3cozlib'::regclass, 2, E'{\'something2\'}');
SELECT a.attname SELECT a.attname
, pg_catalog.format_type(a.atttypid, a.atttypmod) , pg_catalog.format_type(a.atttypid, a.atttypmod)
...@@ -172,7 +172,7 @@ WHERE s.attrelid = a.attrelid AND s.attnum = a.attnum ...@@ -172,7 +172,7 @@ WHERE s.attrelid = a.attrelid AND s.attnum = a.attnum
) newcolumn ) newcolumn
FROM pg_catalog.pg_attribute a FROM pg_catalog.pg_attribute a
WHERE a.attrelid = 't3coquicklz'::regclass AND a.attnum > 0 AND NOT a.attisdropped WHERE a.attrelid = 't3cozlib'::regclass AND a.attnum > 0 AND NOT a.attisdropped
ORDER BY a.attnum ORDER BY a.attnum
; -- expect to see 2 rows ; -- expect to see 2 rows
...@@ -210,6 +210,9 @@ select * from csq_m1 where x not in (select x from csq_d1) or x < -100; -- (3) ...@@ -210,6 +210,9 @@ select * from csq_m1 where x not in (select x from csq_d1) or x < -100; -- (3)
explain select * from csq_d1 where x not in (select x from csq_m1) or x < -100; -- broadcast motion explain select * from csq_d1 where x not in (select x from csq_m1) or x < -100; -- broadcast motion
select * from csq_d1 where x not in (select x from csq_m1) or x < -100; -- (4) select * from csq_d1 where x not in (select x from csq_m1) or x < -100; -- (4)
-- drop csq_m1 since we deleted its gp_distribution_policy entry
drop table csq_m1;
-- --
-- MPP-14441 Don't lose track of initplans -- MPP-14441 Don't lose track of initplans
-- --
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册