提交 8e7a7a1f 编写于 作者: H Heikki Linnakangas

Update GPORCA to version 1.621.

This version changes the spelling of the error message of violating a NOT
NULL-constraint, to match the message of the same error in the executor, so
those differences in regression test expected output can now be reverted.
上级 bb8fe443
......@@ -22,7 +22,7 @@
</configurations>
<dependencies>
<dependency org="emc" name="optimizer" rev="1.620" conf="osx106_x86->osx106_x86_32;rhel5_x86_64->rhel5_x86_64;suse10_x86_64->suse10_x86_64;suse11_x86_64->suse10_x86_64" />
<dependency org="emc" name="optimizer" rev="1.621" conf="osx106_x86->osx106_x86_32;rhel5_x86_64->rhel5_x86_64;suse10_x86_64->suse10_x86_64;suse11_x86_64->suse10_x86_64" />
<dependency org="emc" name="libgpos" rev="1.135" conf="osx106_x86->osx106_x86_32;rhel5_x86_64->rhel5_x86_64;suse10_x86_64->suse10_x86_64;suse11_x86_64->suse10_x86_64" />
<dependency org="xerces" name="xerces-c" rev="3.1.1-p1" conf="osx106_x86->osx106_x86_32;rhel5_x86_64->rhel5_x86_64;suse10_x86_64->suse10_x86_64;suse11_x86_64->suse10_x86_64" />
<dependency org="OpenSSL" name="openssl" rev="0.9.8zg" conf="osx106_x86->osx105_x86;aix5_ppc_32->aix5_ppc_32;aix5_ppc_64->aix5_ppc_64;hpux_ia64->hpux_ia64;rhel5_x86_32->rhel5_x86_32;rhel5_x86_64->rhel5_x86_64;rhel6_x86_64->rhel6_x86_64;sol10_x86_32->sol10_x86_32;sol10_x86_64->sol10_x86_64;sol10_sparc_32->sol10_sparc_32;sol10_sparc_64->sol10_sparc_64;suse10_x86_64->suse10_x86_64;suse11_x86_64->suse11_x86_64" />
......
......@@ -1757,7 +1757,7 @@ create table ao1(col1 varchar(2), col2 int) WITH (APPENDONLY=TRUE) distributed r
alter table ao1 add column col3 char(1) not null default NULL;
-- this should fail (same behavior as heap tables)
insert into ao1(col1, col2) values('a', 10);
ERROR: NULL value in column "col3" violates not-null constraint (COptTasks.cpp:1289)
ERROR: null value in column "col3" violates not-null constraint
---
--- alter add with no default should continue to fail
---
......@@ -1889,7 +1889,7 @@ WITH (APPENDONLY=TRUE, ORIENTATION=column) distributed randomly;
alter table aoco1 add column col3 char(1) not null default NULL;
-- this should fail (same behavior as heap tables)
insert into aoco1 (col1, col2) values('a', 10);
ERROR: NULL value in column "col3" violates not-null constraint (COptTasks.cpp:1289)
ERROR: null value in column "col3" violates not-null constraint
drop table if exists aoco1;
create table aoco1(col1 varchar(2), col2 int not null)
WITH (APPENDONLY=TRUE, ORIENTATION=column) distributed randomly;
......
......@@ -138,7 +138,7 @@ create table nulltest
, col5 dcheck CHECK (col5 IN ('c', 'd'))
);
INSERT INTO nulltest DEFAULT VALUES;
ERROR: NULL value in column "col3" violates not-null constraint
ERROR: null value in column "col3" violates not-null constraint
INSERT INTO nulltest values ('a', 'b', 'c', 'd', 'c'); -- Good
insert into nulltest values ('a', 'b', 'c', 'd', NULL);
ERROR: domain dcheck does not allow null values
......
--
-- insert with DEFAULT in the target_list
--
create table inserttest (col1 int4, col2 int4 NOT NULL, col3 text default 'testing');
NOTICE: Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'col1' 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 inserttest (col1, col2, col3) values (DEFAULT, DEFAULT, DEFAULT);
ERROR: NULL value in column "col2" violates not-null constraint (seg0 sysadmins-macbook-pro.local:34701 pid=46538)
insert into inserttest (col2, col3) values (3, DEFAULT);
insert into inserttest (col1, col2, col3) values (DEFAULT, 5, DEFAULT);
insert into inserttest values (DEFAULT, 5, 'test');
insert into inserttest values (DEFAULT, 7);
select * from inserttest order by 1,2,3;
col1 | col2 | col3
------+------+---------
| 3 | testing
| 5 | test
| 5 | testing
| 7 | testing
(4 rows)
--
-- insert with similar expression / target_list values (all fail)
--
insert into inserttest (col1, col2, col3) values (DEFAULT, DEFAULT);
ERROR: INSERT has more target columns than expressions
insert into inserttest (col1, col2, col3) values (1, 2);
ERROR: INSERT has more target columns than expressions
insert into inserttest (col1) values (1, 2);
ERROR: INSERT has more expressions than target columns
insert into inserttest (col1) values (DEFAULT, DEFAULT);
ERROR: INSERT has more expressions than target columns
select * from inserttest order by 1,2,3;
col1 | col2 | col3
------+------+---------
| 3 | testing
| 5 | test
| 5 | testing
| 7 | testing
(4 rows)
--
-- VALUES test
--
insert into inserttest values(10, 20, '40'), (-1, 2, DEFAULT),
((select 2), (select i from (values(3)) as foo (i)), 'values are fun!');
select * from inserttest order by 1,2,3;
col1 | col2 | col3
------+------+-----------------
-1 | 2 | testing
2 | 3 | values are fun!
10 | 20 | 40
| 3 | testing
| 5 | test
| 5 | testing
| 7 | testing
(7 rows)
drop table inserttest;
-- MPP-6775 : Adding and dropping a column. Then perform an insert.
create table bar(x int) distributed randomly;
create table foo(like bar) distributed randomly;
alter table foo add column y int;
alter table foo drop column y;
insert into bar values(1);
insert into bar values(2);
insert into foo(x) select t1.x from bar t1 join bar t2 on t1.x=t2.x;
insert into foo(x) select t1.x from bar t1;
insert into foo(x) select t1.x from bar t1 group by t1.x;
drop table if exists foo;
drop table if exists bar;
-- MPP-6775 : Dropping a column. Then perform an insert.
create table bar(x int, y int) distributed randomly;
create table foo(like bar) distributed randomly;
alter table foo drop column y;
insert into bar values(1,1);
insert into bar values(2,2);
insert into foo(x) select t1.x from bar t1 join bar t2 on t1.x=t2.x;
insert into foo(x) select t1.x from bar t1;
insert into foo(x) select t1.x from bar t1 group by t1.x;
drop table if exists foo;
drop table if exists bar;
......@@ -316,7 +316,7 @@ ERROR: duplicate key violates unique constraint "primary_tbl_pkey"
INSERT INTO PRIMARY_TBL VALUES (4, 'three');
INSERT INTO PRIMARY_TBL VALUES (5, 'one');
INSERT INTO PRIMARY_TBL (t) VALUES ('six');
ERROR: NULL value in column "i" violates not-null constraint (COptTasks.cpp:1289)
ERROR: null value in column "i" violates not-null constraint
SELECT '' AS four, * FROM PRIMARY_TBL;
four | i | t
------+---+-------
......@@ -336,7 +336,7 @@ INSERT INTO PRIMARY_TBL VALUES (1, 'three');
INSERT INTO PRIMARY_TBL VALUES (4, 'three');
INSERT INTO PRIMARY_TBL VALUES (5, 'one');
INSERT INTO PRIMARY_TBL (t) VALUES ('six');
ERROR: NULL value in column "i" violates not-null constraint (COptTasks.cpp:1289)
ERROR: null value in column "i" violates not-null constraint
SELECT '' AS three, * FROM PRIMARY_TBL;
three | i | t
-------+---+-------
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册