提交 fb78311f 编写于 作者: H Heikki Linnakangas

Remove a few redundant tables from test cases.

上级 13fce543
......@@ -415,7 +415,6 @@ order by gid;
G |
(6 rows)
drop table case_genders;
select CASE 'M'
WHEN IS NOT DISTINCT FROM 'M' THEN 'Male'
WHEN IS NOT DISTINCT FROM 'F' THEN 'Female'
......@@ -437,14 +436,6 @@ select CASE null
Other
(1 row)
create table case_genders (gid integer, gender char(1)) distributed by (gid);
insert into case_genders(gid, gender) values
(1, 'F'),
(2, 'M'),
(3, 'Z'),
(4, ''),
(5, null),
(6, 'G');
select gender, CASE gender
WHEN IS NOT DISTINCT FROM 'M' THEN 'Male'
WHEN IS NOT DISTINCT FROM 'F' THEN 'Female'
......
......@@ -1133,26 +1133,10 @@ select * from decode_view order by region, country_code;
(5 rows)
--
begin;
create table office2
(
locid integer,
bus_name text,
country_code char(2)
);
NOTICE: Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'locid' as the Greenplum Database data distribution key for this table.
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 office2(locid, bus_name, country_code) values
(1000, 'Test Solutions', 'CN'),
(1011, 'Taing Consulting', 'US'),
(2000, 'Parts Plus', 'IT'),
(1055, 'Computers Unlimited', 'IL'),
(2005, 'Kangaroos Inc.', 'AU');
commit;
select locid,
bus_name,
country_code
from office2
from locations
where decode(country_code, 'US', 'Americas', 'CA', 'Americas', 'MX', 'Americas',
'CN', 'APJ', 'JP', 'APJ', 'RU', 'APJ', 'UK', 'EMEA', 'FR', 'EMEA',
'IL', 'EMEA', 'IT', 'EMEA', 'IE', 'EMEA') = 'EMEA'
......
......@@ -202,8 +202,6 @@ select gender, CASE gender
from case_genders
order by gid;
drop table case_genders;
select CASE 'M'
WHEN IS NOT DISTINCT FROM 'M' THEN 'Male'
WHEN IS NOT DISTINCT FROM 'F' THEN 'Female'
......@@ -217,16 +215,6 @@ select CASE null
WHEN IS NOT DISTINCT FROM '' THEN 'Not Specified'
ELSE 'Other' END;
create table case_genders (gid integer, gender char(1)) distributed by (gid);
insert into case_genders(gid, gender) values
(1, 'F'),
(2, 'M'),
(3, 'Z'),
(4, ''),
(5, null),
(6, 'G');
select gender, CASE gender
WHEN IS NOT DISTINCT FROM 'M' THEN 'Male'
WHEN IS NOT DISTINCT FROM 'F' THEN 'Female'
......
......@@ -761,26 +761,11 @@ order by locid, country_code;
select * from decode_view order by region, country_code;
--
begin;
create table office2
(
locid integer,
bus_name text,
country_code char(2)
);
insert into office2(locid, bus_name, country_code) values
(1000, 'Test Solutions', 'CN'),
(1011, 'Taing Consulting', 'US'),
(2000, 'Parts Plus', 'IT'),
(1055, 'Computers Unlimited', 'IL'),
(2005, 'Kangaroos Inc.', 'AU');
commit;
select locid,
bus_name,
country_code
from office2
from locations
where decode(country_code, 'US', 'Americas', 'CA', 'Americas', 'MX', 'Americas',
'CN', 'APJ', 'JP', 'APJ', 'RU', 'APJ', 'UK', 'EMEA', 'FR', 'EMEA',
'IL', 'EMEA', 'IT', 'EMEA', 'IE', 'EMEA') = 'EMEA'
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册