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

Remove redundant direct dispatch tests.

These exact same tests were in both 'direct_dispatch', and in
'bfv_dd_types'. Oddly, one SELECT was missing from 'bfv_dd_types', though.
Add the missing SELECT there, and remove all these type tests from
'direct_dispatch'.

Now that there are no duplicate table names in these tests, also run
'direct_dispatch' in the same parallel group as the rest of the direct
dispatch tests. That's a more logical grouping.
上级 b81a2ca0
......@@ -227,6 +227,13 @@ INFO: Dispatch command to SINGLE content
12:34:56:78:90:ab
(1 row)
select 1 from direct_test_type_tinterval where x = '["2008-08-08" "2010-10-10"]';
INFO: Dispatch command to SINGLE content
?column?
----------
1
(1 row)
select * from direct_test_type_varbit where x = '0101010';
INFO: Dispatch command to SINGLE content
x
......
......@@ -227,6 +227,13 @@ INFO: Dispatch command to SINGLE content
12:34:56:78:90:ab
(1 row)
select 1 from direct_test_type_tinterval where x = '["2008-08-08" "2010-10-10"]';
INFO: Dispatch command to SINGLE content
?column?
----------
1
(1 row)
select * from direct_test_type_varbit where x = '0101010';
INFO: Dispatch command to SINGLE content
x
......
......@@ -63,22 +63,6 @@ NOTICE: CREATE TABLE will create partition "direct_test_range_partition_1_prt_7
NOTICE: CREATE TABLE will create partition "direct_test_range_partition_1_prt_8" for table "direct_test_range_partition"
NOTICE: CREATE TABLE will create partition "direct_test_range_partition_1_prt_9" for table "direct_test_range_partition"
insert into direct_test_range_partition select i, i+1, i+2, i+3 from generate_series(1, 2) i;
create table direct_test_type_real (real1 real, smallint1 smallint, boolean1 boolean, int1 int, double1 double precision, date1 date, numeric1 numeric) distributed by (real1);
create table direct_test_type_smallint (real1 real, smallint1 smallint, boolean1 boolean, int1 int, double1 double precision, date1 date, numeric1 numeric) distributed by (smallint1);
create table direct_test_type_boolean (real1 real, smallint1 smallint, boolean1 boolean, int1 int, double1 double precision, date1 date, numeric1 numeric) distributed by (boolean1);
create table direct_test_type_int (real1 real, smallint1 smallint, boolean1 boolean, int1 int, double1 double precision, date1 date, numeric1 numeric) distributed by (int1);
create table direct_test_type_double (real1 real, smallint1 smallint, boolean1 boolean, int1 int, double1 double precision, date1 date, numeric1 numeric) distributed by (double1);
create table direct_test_type_date (real1 real, smallint1 smallint, boolean1 boolean, int1 int, double1 double precision, date1 date, numeric1 numeric) distributed by (date1);
create table direct_test_type_numeric (real1 real, smallint1 smallint, boolean1 boolean, int1 int, double1 double precision, date1 date, numeric1 numeric) distributed by (numeric1);
create table direct_test_type_abstime (x abstime) distributed by (x);
create table direct_test_type_bit (x bit) distributed by (x);
create table direct_test_type_bpchar (x bpchar) distributed by (x);
create table direct_test_type_bytea (x bytea) distributed by (x);
create table direct_test_type_cidr (x cidr) distributed by (x);
create table direct_test_type_inet (x inet) distributed by (x);
create table direct_test_type_macaddr (x macaddr) distributed by (x);
create table direct_test_type_tinterval (x tinterval) distributed by (x);
create table direct_test_type_varbit (x varbit) distributed by (x);
commit;
-- enable printing of printing info
set test_print_direct_dispatch_info=on;
......@@ -295,81 +279,6 @@ INFO: Dispatch command to SINGLE content
1
(1 row)
----------------------------------------------------------------------------------
-- MPP-7643: various types
--
set optimizer_enable_constant_expression_evaluation=on;
insert into direct_test_type_real values (8,8,true,8,8,'2008-08-08',8.8);
INFO: Dispatch command to SINGLE content
INFO: Distributed transaction command 'Distributed Prepare' to SINGLE content
INFO: Distributed transaction command 'Distributed Commit Prepared' to SINGLE content
insert into direct_test_type_smallint values (8,8,true,8,8,'2008-08-08',8.8);
INFO: Dispatch command to SINGLE content
INFO: Distributed transaction command 'Distributed Prepare' to SINGLE content
INFO: Distributed transaction command 'Distributed Commit Prepared' to SINGLE content
insert into direct_test_type_boolean values (8,8,true,8,8,'2008-08-08',8.8);
INFO: Dispatch command to SINGLE content
INFO: Distributed transaction command 'Distributed Prepare' to SINGLE content
INFO: Distributed transaction command 'Distributed Commit Prepared' to SINGLE content
insert into direct_test_type_int values (8,8,true,8,8,'2008-08-08',8.8);
INFO: Dispatch command to SINGLE content
INFO: Distributed transaction command 'Distributed Prepare' to SINGLE content
INFO: Distributed transaction command 'Distributed Commit Prepared' to SINGLE content
insert into direct_test_type_double values (8,8,true,8,8,'2008-08-08',8.8);
INFO: Dispatch command to SINGLE content
INFO: Distributed transaction command 'Distributed Prepare' to SINGLE content
INFO: Distributed transaction command 'Distributed Commit Prepared' to SINGLE content
insert into direct_test_type_date values (8,8,true,8,8,'2008-08-08',8.8);
INFO: Dispatch command to SINGLE content
INFO: Distributed transaction command 'Distributed Prepare' to SINGLE content
INFO: Distributed transaction command 'Distributed Commit Prepared' to SINGLE content
insert into direct_test_type_numeric values (8,8,true,8,8,'2008-08-08',8.8);
INFO: Dispatch command to SINGLE content
INFO: Distributed transaction command 'Distributed Prepare' to SINGLE content
INFO: Distributed transaction command 'Distributed Commit Prepared' to SINGLE content
reset optimizer_enable_constant_expression_evaluation;
select * from direct_test_type_real where real1 = 8::real;
INFO: Dispatch command to SINGLE content
real1 | smallint1 | boolean1 | int1 | double1 | date1 | numeric1
-------+-----------+----------+------+---------+------------+----------
8 | 8 | t | 8 | 8 | 08-08-2008 | 8.8
(1 row)
select * from direct_test_type_smallint where smallint1 = 8::smallint;
INFO: Dispatch command to SINGLE content
real1 | smallint1 | boolean1 | int1 | double1 | date1 | numeric1
-------+-----------+----------+------+---------+------------+----------
8 | 8 | t | 8 | 8 | 08-08-2008 | 8.8
(1 row)
select * from direct_test_type_int where int1 = 8;
INFO: Dispatch command to SINGLE content
real1 | smallint1 | boolean1 | int1 | double1 | date1 | numeric1
-------+-----------+----------+------+---------+------------+----------
8 | 8 | t | 8 | 8 | 08-08-2008 | 8.8
(1 row)
select * from direct_test_type_double where double1 = 8;
INFO: Dispatch command to SINGLE content
real1 | smallint1 | boolean1 | int1 | double1 | date1 | numeric1
-------+-----------+----------+------+---------+------------+----------
8 | 8 | t | 8 | 8 | 08-08-2008 | 8.8
(1 row)
select * from direct_test_type_date where date1 = '2008-08-08';
INFO: Dispatch command to SINGLE content
real1 | smallint1 | boolean1 | int1 | double1 | date1 | numeric1
-------+-----------+----------+------+---------+------------+----------
8 | 8 | t | 8 | 8 | 08-08-2008 | 8.8
(1 row)
select * from direct_test_type_numeric where numeric1 = 8.8;
INFO: Dispatch command to SINGLE content
real1 | smallint1 | boolean1 | int1 | double1 | date1 | numeric1
-------+-----------+----------+------+---------+------------+----------
8 | 8 | t | 8 | 8 | 08-08-2008 | 8.8
(1 row)
----------------------------------------------------------------------------------
-- Prepared statements
-- do same as above ones but using prepared statements, verify data goes to the right spot
......@@ -483,308 +392,6 @@ INFO: Dispatch command to ALL contents
INFO: Dispatch command to SINGLE content
INFO: Distributed transaction command 'Distributed Prepare' to ALL contents
INFO: Distributed transaction command 'Distributed Commit Prepared' to ALL contents
------------------------------------
-- more type tests
--
-- abstime
insert into direct_test_type_abstime values('2008-08-08');
INFO: Dispatch command to SINGLE content
INFO: Distributed transaction command 'Distributed Prepare' to SINGLE content
INFO: Distributed transaction command 'Distributed Commit Prepared' to SINGLE content
select 1 from direct_test_type_abstime where x = '2008-08-08';
INFO: Dispatch command to SINGLE content
?column?
----------
1
(1 row)
insert into direct_test_type_bit values('1');
INFO: Dispatch command to SINGLE content
INFO: Distributed transaction command 'Distributed Prepare' to SINGLE content
INFO: Distributed transaction command 'Distributed Commit Prepared' to SINGLE content
select * from direct_test_type_bit where x = '1';
INFO: Dispatch command to SINGLE content
x
---
1
(1 row)
insert into direct_test_type_bpchar values('abs');
INFO: Dispatch command to SINGLE content
INFO: Distributed transaction command 'Distributed Prepare' to SINGLE content
INFO: Distributed transaction command 'Distributed Commit Prepared' to SINGLE content
select * from direct_test_type_bpchar where x = 'abs';
INFO: Dispatch command to SINGLE content
x
-----
abs
(1 row)
insert into direct_test_type_bytea values('greenplum');
INFO: Dispatch command to SINGLE content
INFO: Distributed transaction command 'Distributed Prepare' to SINGLE content
INFO: Distributed transaction command 'Distributed Commit Prepared' to SINGLE content
select * from direct_test_type_bytea where x = 'greenplum';
INFO: Dispatch command to SINGLE content
x
-----------
greenplum
(1 row)
insert into direct_test_type_cidr values('68.44.55.111');
INFO: Dispatch command to SINGLE content
INFO: Distributed transaction command 'Distributed Prepare' to SINGLE content
INFO: Distributed transaction command 'Distributed Commit Prepared' to SINGLE content
-- Known_opt_diff: MPP-21346
select * from direct_test_type_cidr where x = '68.44.55.111';
INFO: Dispatch command to SINGLE content
x
-----------------
68.44.55.111/32
(1 row)
insert into direct_test_type_inet values('68.44.55.111');
INFO: Dispatch command to SINGLE content
INFO: Distributed transaction command 'Distributed Prepare' to SINGLE content
INFO: Distributed transaction command 'Distributed Commit Prepared' to SINGLE content
select * from direct_test_type_inet where x = '68.44.55.111';
INFO: Dispatch command to SINGLE content
x
--------------
68.44.55.111
(1 row)
insert into direct_test_type_macaddr values('12:34:56:78:90:ab');
INFO: Dispatch command to SINGLE content
INFO: Distributed transaction command 'Distributed Prepare' to SINGLE content
INFO: Distributed transaction command 'Distributed Commit Prepared' to SINGLE content
select * from direct_test_type_macaddr where x = '12:34:56:78:90:ab';
INFO: Dispatch command to SINGLE content
x
-------------------
12:34:56:78:90:ab
(1 row)
insert into direct_test_type_tinterval values('["2008-08-08" "2010-10-10"]');
INFO: Dispatch command to SINGLE content
INFO: Distributed transaction command 'Distributed Prepare' to SINGLE content
INFO: Distributed transaction command 'Distributed Commit Prepared' to SINGLE content
select 1 from direct_test_type_tinterval where x = '["2008-08-08" "2010-10-10"]';
INFO: Dispatch command to SINGLE content
?column?
----------
1
(1 row)
insert into direct_test_type_varbit values('0101010');
INFO: Dispatch command to SINGLE content
INFO: Distributed transaction command 'Distributed Prepare' to SINGLE content
INFO: Distributed transaction command 'Distributed Commit Prepared' to SINGLE content
select * from direct_test_type_varbit where x = '0101010';
INFO: Dispatch command to SINGLE content
x
---------
0101010
(1 row)
------------------------------------
-- int28, int82, etc. checks
set test_print_direct_dispatch_info=off;
CREATE TABLE direct_test_type_int2 (id int2) DISTRIBUTED BY (id);
CREATE TABLE direct_test_type_int4 (id int4) DISTRIBUTED BY (id);
CREATE TABLE direct_test_type_int8 (id int8) DISTRIBUTED BY (id);
INSERT INTO direct_test_type_int2 VALUES (1);
INSERT INTO direct_test_type_int4 VALUES (1);
INSERT INTO direct_test_type_int8 VALUES (1);
set test_print_direct_dispatch_info=on;
SELECT * FROM direct_test_type_int2 WHERE id = 1::int2;
INFO: Dispatch command to SINGLE content
id
----
1
(1 row)
SELECT * FROM direct_test_type_int2 WHERE id = 1::int4;
INFO: Dispatch command to SINGLE content
id
----
1
(1 row)
SELECT * FROM direct_test_type_int2 WHERE id = 1::int8;
INFO: Dispatch command to SINGLE content
id
----
1
(1 row)
-- Known_opt_diff: MPP-21346
SELECT * FROM direct_test_type_int2 WHERE 1::int2 = id;
INFO: Dispatch command to SINGLE content
id
----
1
(1 row)
-- Known_opt_diff: MPP-21346
SELECT * FROM direct_test_type_int2 WHERE 1::int4 = id;
INFO: Dispatch command to SINGLE content
id
----
1
(1 row)
-- Known_opt_diff: MPP-21346
SELECT * FROM direct_test_type_int2 WHERE 1::int8 = id;
INFO: Dispatch command to SINGLE content
id
----
1
(1 row)
SELECT * FROM direct_test_type_int4 WHERE id = 1::int2;
INFO: Dispatch command to SINGLE content
id
----
1
(1 row)
SELECT * FROM direct_test_type_int4 WHERE id = 1::int4;
INFO: Dispatch command to SINGLE content
id
----
1
(1 row)
SELECT * FROM direct_test_type_int4 WHERE id = 1::int8;
INFO: Dispatch command to SINGLE content
id
----
1
(1 row)
-- Known_opt_diff: MPP-21346
SELECT * FROM direct_test_type_int4 WHERE 1::int2 = id;
INFO: Dispatch command to SINGLE content
id
----
1
(1 row)
-- Known_opt_diff: MPP-21346
SELECT * FROM direct_test_type_int4 WHERE 1::int4 = id;
INFO: Dispatch command to SINGLE content
id
----
1
(1 row)
-- Known_opt_diff: MPP-21346
SELECT * FROM direct_test_type_int4 WHERE 1::int8 = id;
INFO: Dispatch command to SINGLE content
id
----
1
(1 row)
SELECT * FROM direct_test_type_int8 WHERE id = 1::int2;
INFO: Dispatch command to SINGLE content
id
----
1
(1 row)
SELECT * FROM direct_test_type_int8 WHERE id = 1::int4;
INFO: Dispatch command to SINGLE content
id
----
1
(1 row)
SELECT * FROM direct_test_type_int8 WHERE id = 1::int8;
INFO: Dispatch command to SINGLE content
id
----
1
(1 row)
-- Known_opt_diff: MPP-21346
SELECT * FROM direct_test_type_int8 WHERE 1::int2 = id;
INFO: Dispatch command to SINGLE content
id
----
1
(1 row)
-- Known_opt_diff: MPP-21346
SELECT * FROM direct_test_type_int8 WHERE 1::int4 = id;
INFO: Dispatch command to SINGLE content
id
----
1
(1 row)
-- Known_opt_diff: MPP-21346
SELECT * FROM direct_test_type_int8 WHERE 1::int8 = id;
INFO: Dispatch command to SINGLE content
id
----
1
(1 row)
-- overflow test
SELECT * FROM direct_test_type_int2 WHERE id = 32768::int4;
INFO: Dispatch command to SINGLE content
id
----
(0 rows)
SELECT * FROM direct_test_type_int2 WHERE id = -32769::int4;
INFO: Dispatch command to SINGLE content
id
----
(0 rows)
-- Known_opt_diff: MPP-21346
SELECT * FROM direct_test_type_int2 WHERE 32768::int4 = id;
INFO: Dispatch command to SINGLE content
id
----
(0 rows)
-- Known_opt_diff: MPP-21346
SELECT * FROM direct_test_type_int2 WHERE -32769::int4 = id;
INFO: Dispatch command to SINGLE content
id
----
(0 rows)
SELECT * FROM direct_test_type_int2 WHERE id = 2147483648::int8;
INFO: Dispatch command to SINGLE content
id
----
(0 rows)
SELECT * FROM direct_test_type_int2 WHERE id = -2147483649::int8;
INFO: Dispatch command to SINGLE content
id
----
(0 rows)
-- Known_opt_diff: MPP-21346
SELECT * FROM direct_test_type_int2 WHERE 2147483648::int8 = id;
INFO: Dispatch command to SINGLE content
id
----
(0 rows)
-- Known_opt_diff: MPP-21346
SELECT * FROM direct_test_type_int2 WHERE -2147483649::int8 = id;
INFO: Dispatch command to SINGLE content
id
----
(0 rows)
-- tests with subplans (MPP-22019)
CREATE TABLE MPP_22019_a ( i INT, j INT) DISTRIBUTED BY (i);
INFO: Distributed transaction command 'Distributed Prepare' to ALL contents
......@@ -844,27 +451,8 @@ drop table if exists direct_test_two_column;
drop table if exists direct_test_bitmap;
drop table if exists direct_test_partition;
drop table if exists direct_test_range_partition;
drop table if exists direct_test_type_real;
drop table if exists direct_test_type_smallint;
drop table if exists direct_test_type_boolean;
drop table if exists direct_test_type_int;
drop table if exists direct_test_type_double;
drop table if exists direct_test_type_date;
drop table if exists direct_test_type_numeric;
drop table if exists direct_dispatch_foo;
drop table if exists direct_dispatch_bar;
drop table if exists direct_test_type_int2;
drop table if exists direct_test_type_int4;
drop table if exists direct_test_type_int8;
drop table if exists direct_test_type_abstime;
drop table if exists direct_test_type_bit;
drop table if exists direct_test_type_bpchar;
drop table if exists direct_test_type_bytea;
drop table if exists direct_test_type_cidr;
drop table if exists direct_test_type_inet;
drop table if exists direct_test_type_macaddr;
drop table if exists direct_test_type_tinterval;
drop table if exists direct_test_type_varbit;
drop table if exists MPP_22019_a;
drop table if exists MPP_22019_b;
commit;
......@@ -63,22 +63,6 @@ NOTICE: CREATE TABLE will create partition "direct_test_range_partition_1_prt_7
NOTICE: CREATE TABLE will create partition "direct_test_range_partition_1_prt_8" for table "direct_test_range_partition"
NOTICE: CREATE TABLE will create partition "direct_test_range_partition_1_prt_9" for table "direct_test_range_partition"
insert into direct_test_range_partition select i, i+1, i+2, i+3 from generate_series(1, 2) i;
create table direct_test_type_real (real1 real, smallint1 smallint, boolean1 boolean, int1 int, double1 double precision, date1 date, numeric1 numeric) distributed by (real1);
create table direct_test_type_smallint (real1 real, smallint1 smallint, boolean1 boolean, int1 int, double1 double precision, date1 date, numeric1 numeric) distributed by (smallint1);
create table direct_test_type_boolean (real1 real, smallint1 smallint, boolean1 boolean, int1 int, double1 double precision, date1 date, numeric1 numeric) distributed by (boolean1);
create table direct_test_type_int (real1 real, smallint1 smallint, boolean1 boolean, int1 int, double1 double precision, date1 date, numeric1 numeric) distributed by (int1);
create table direct_test_type_double (real1 real, smallint1 smallint, boolean1 boolean, int1 int, double1 double precision, date1 date, numeric1 numeric) distributed by (double1);
create table direct_test_type_date (real1 real, smallint1 smallint, boolean1 boolean, int1 int, double1 double precision, date1 date, numeric1 numeric) distributed by (date1);
create table direct_test_type_numeric (real1 real, smallint1 smallint, boolean1 boolean, int1 int, double1 double precision, date1 date, numeric1 numeric) distributed by (numeric1);
create table direct_test_type_abstime (x abstime) distributed by (x);
create table direct_test_type_bit (x bit) distributed by (x);
create table direct_test_type_bpchar (x bpchar) distributed by (x);
create table direct_test_type_bytea (x bytea) distributed by (x);
create table direct_test_type_cidr (x cidr) distributed by (x);
create table direct_test_type_inet (x inet) distributed by (x);
create table direct_test_type_macaddr (x macaddr) distributed by (x);
create table direct_test_type_tinterval (x tinterval) distributed by (x);
create table direct_test_type_varbit (x varbit) distributed by (x);
commit;
-- enable printing of printing info
set test_print_direct_dispatch_info=on;
......@@ -295,81 +279,6 @@ INFO: Dispatch command to ALL contents
1
(1 row)
----------------------------------------------------------------------------------
-- MPP-7643: various types
--
set optimizer_enable_constant_expression_evaluation=on;
insert into direct_test_type_real values (8,8,true,8,8,'2008-08-08',8.8);
INFO: Dispatch command to SINGLE content
INFO: Distributed transaction command 'Distributed Prepare' to SINGLE content
INFO: Distributed transaction command 'Distributed Commit Prepared' to SINGLE content
insert into direct_test_type_smallint values (8,8,true,8,8,'2008-08-08',8.8);
INFO: Dispatch command to SINGLE content
INFO: Distributed transaction command 'Distributed Prepare' to SINGLE content
INFO: Distributed transaction command 'Distributed Commit Prepared' to SINGLE content
insert into direct_test_type_boolean values (8,8,true,8,8,'2008-08-08',8.8);
INFO: Dispatch command to SINGLE content
INFO: Distributed transaction command 'Distributed Prepare' to SINGLE content
INFO: Distributed transaction command 'Distributed Commit Prepared' to SINGLE content
insert into direct_test_type_int values (8,8,true,8,8,'2008-08-08',8.8);
INFO: Dispatch command to SINGLE content
INFO: Distributed transaction command 'Distributed Prepare' to SINGLE content
INFO: Distributed transaction command 'Distributed Commit Prepared' to SINGLE content
insert into direct_test_type_double values (8,8,true,8,8,'2008-08-08',8.8);
INFO: Dispatch command to SINGLE content
INFO: Distributed transaction command 'Distributed Prepare' to SINGLE content
INFO: Distributed transaction command 'Distributed Commit Prepared' to SINGLE content
insert into direct_test_type_date values (8,8,true,8,8,'2008-08-08',8.8);
INFO: Dispatch command to SINGLE content
INFO: Distributed transaction command 'Distributed Prepare' to SINGLE content
INFO: Distributed transaction command 'Distributed Commit Prepared' to SINGLE content
insert into direct_test_type_numeric values (8,8,true,8,8,'2008-08-08',8.8);
INFO: Dispatch command to SINGLE content
INFO: Distributed transaction command 'Distributed Prepare' to SINGLE content
INFO: Distributed transaction command 'Distributed Commit Prepared' to SINGLE content
reset optimizer_enable_constant_expression_evaluation;
select * from direct_test_type_real where real1 = 8::real;
INFO: Dispatch command to SINGLE content
real1 | smallint1 | boolean1 | int1 | double1 | date1 | numeric1
-------+-----------+----------+------+---------+------------+----------
8 | 8 | t | 8 | 8 | 08-08-2008 | 8.8
(1 row)
select * from direct_test_type_smallint where smallint1 = 8::smallint;
INFO: Dispatch command to SINGLE content
real1 | smallint1 | boolean1 | int1 | double1 | date1 | numeric1
-------+-----------+----------+------+---------+------------+----------
8 | 8 | t | 8 | 8 | 08-08-2008 | 8.8
(1 row)
select * from direct_test_type_int where int1 = 8;
INFO: Dispatch command to SINGLE content
real1 | smallint1 | boolean1 | int1 | double1 | date1 | numeric1
-------+-----------+----------+------+---------+------------+----------
8 | 8 | t | 8 | 8 | 08-08-2008 | 8.8
(1 row)
select * from direct_test_type_double where double1 = 8;
INFO: Dispatch command to SINGLE content
real1 | smallint1 | boolean1 | int1 | double1 | date1 | numeric1
-------+-----------+----------+------+---------+------------+----------
8 | 8 | t | 8 | 8 | 08-08-2008 | 8.8
(1 row)
select * from direct_test_type_date where date1 = '2008-08-08';
INFO: Dispatch command to SINGLE content
real1 | smallint1 | boolean1 | int1 | double1 | date1 | numeric1
-------+-----------+----------+------+---------+------------+----------
8 | 8 | t | 8 | 8 | 08-08-2008 | 8.8
(1 row)
select * from direct_test_type_numeric where numeric1 = 8.8;
INFO: Dispatch command to SINGLE content
real1 | smallint1 | boolean1 | int1 | double1 | date1 | numeric1
-------+-----------+----------+------+---------+------------+----------
8 | 8 | t | 8 | 8 | 08-08-2008 | 8.8
(1 row)
----------------------------------------------------------------------------------
-- Prepared statements
-- do same as above ones but using prepared statements, verify data goes to the right spot
......@@ -486,308 +395,6 @@ INFO: Dispatch command to ALL contents
INFO: Dispatch command to ALL contents
INFO: Distributed transaction command 'Distributed Prepare' to ALL contents
INFO: Distributed transaction command 'Distributed Commit Prepared' to ALL contents
------------------------------------
-- more type tests
--
-- abstime
insert into direct_test_type_abstime values('2008-08-08');
INFO: Dispatch command to SINGLE content
INFO: Distributed transaction command 'Distributed Prepare' to SINGLE content
INFO: Distributed transaction command 'Distributed Commit Prepared' to SINGLE content
select 1 from direct_test_type_abstime where x = '2008-08-08';
INFO: Dispatch command to SINGLE content
?column?
----------
1
(1 row)
insert into direct_test_type_bit values('1');
INFO: Dispatch command to SINGLE content
INFO: Distributed transaction command 'Distributed Prepare' to SINGLE content
INFO: Distributed transaction command 'Distributed Commit Prepared' to SINGLE content
select * from direct_test_type_bit where x = '1';
INFO: Dispatch command to SINGLE content
x
---
1
(1 row)
insert into direct_test_type_bpchar values('abs');
INFO: Dispatch command to SINGLE content
INFO: Distributed transaction command 'Distributed Prepare' to SINGLE content
INFO: Distributed transaction command 'Distributed Commit Prepared' to SINGLE content
select * from direct_test_type_bpchar where x = 'abs';
INFO: Dispatch command to SINGLE content
x
-----
abs
(1 row)
insert into direct_test_type_bytea values('greenplum');
INFO: Dispatch command to SINGLE content
INFO: Distributed transaction command 'Distributed Prepare' to SINGLE content
INFO: Distributed transaction command 'Distributed Commit Prepared' to SINGLE content
select * from direct_test_type_bytea where x = 'greenplum';
INFO: Dispatch command to SINGLE content
x
-----------
greenplum
(1 row)
insert into direct_test_type_cidr values('68.44.55.111');
INFO: Dispatch command to SINGLE content
INFO: Distributed transaction command 'Distributed Prepare' to SINGLE content
INFO: Distributed transaction command 'Distributed Commit Prepared' to SINGLE content
-- Known_opt_diff: MPP-21346
select * from direct_test_type_cidr where x = '68.44.55.111';
INFO: Dispatch command to ALL contents
x
-----------------
68.44.55.111/32
(1 row)
insert into direct_test_type_inet values('68.44.55.111');
INFO: Dispatch command to SINGLE content
INFO: Distributed transaction command 'Distributed Prepare' to SINGLE content
INFO: Distributed transaction command 'Distributed Commit Prepared' to SINGLE content
select * from direct_test_type_inet where x = '68.44.55.111';
INFO: Dispatch command to SINGLE content
x
--------------
68.44.55.111
(1 row)
insert into direct_test_type_macaddr values('12:34:56:78:90:ab');
INFO: Dispatch command to SINGLE content
INFO: Distributed transaction command 'Distributed Prepare' to SINGLE content
INFO: Distributed transaction command 'Distributed Commit Prepared' to SINGLE content
select * from direct_test_type_macaddr where x = '12:34:56:78:90:ab';
INFO: Dispatch command to SINGLE content
x
-------------------
12:34:56:78:90:ab
(1 row)
insert into direct_test_type_tinterval values('["2008-08-08" "2010-10-10"]');
INFO: Dispatch command to SINGLE content
INFO: Distributed transaction command 'Distributed Prepare' to SINGLE content
INFO: Distributed transaction command 'Distributed Commit Prepared' to SINGLE content
select 1 from direct_test_type_tinterval where x = '["2008-08-08" "2010-10-10"]';
INFO: Dispatch command to SINGLE content
?column?
----------
1
(1 row)
insert into direct_test_type_varbit values('0101010');
INFO: Dispatch command to SINGLE content
INFO: Distributed transaction command 'Distributed Prepare' to SINGLE content
INFO: Distributed transaction command 'Distributed Commit Prepared' to SINGLE content
select * from direct_test_type_varbit where x = '0101010';
INFO: Dispatch command to SINGLE content
x
---------
0101010
(1 row)
------------------------------------
-- int28, int82, etc. checks
set test_print_direct_dispatch_info=off;
CREATE TABLE direct_test_type_int2 (id int2) DISTRIBUTED BY (id);
CREATE TABLE direct_test_type_int4 (id int4) DISTRIBUTED BY (id);
CREATE TABLE direct_test_type_int8 (id int8) DISTRIBUTED BY (id);
INSERT INTO direct_test_type_int2 VALUES (1);
INSERT INTO direct_test_type_int4 VALUES (1);
INSERT INTO direct_test_type_int8 VALUES (1);
set test_print_direct_dispatch_info=on;
SELECT * FROM direct_test_type_int2 WHERE id = 1::int2;
INFO: Dispatch command to SINGLE content
id
----
1
(1 row)
SELECT * FROM direct_test_type_int2 WHERE id = 1::int4;
INFO: Dispatch command to SINGLE content
id
----
1
(1 row)
SELECT * FROM direct_test_type_int2 WHERE id = 1::int8;
INFO: Dispatch command to SINGLE content
id
----
1
(1 row)
-- Known_opt_diff: MPP-21346
SELECT * FROM direct_test_type_int2 WHERE 1::int2 = id;
INFO: Dispatch command to ALL contents
id
----
1
(1 row)
-- Known_opt_diff: MPP-21346
SELECT * FROM direct_test_type_int2 WHERE 1::int4 = id;
INFO: Dispatch command to ALL contents
id
----
1
(1 row)
-- Known_opt_diff: MPP-21346
SELECT * FROM direct_test_type_int2 WHERE 1::int8 = id;
INFO: Dispatch command to ALL contents
id
----
1
(1 row)
SELECT * FROM direct_test_type_int4 WHERE id = 1::int2;
INFO: Dispatch command to SINGLE content
id
----
1
(1 row)
SELECT * FROM direct_test_type_int4 WHERE id = 1::int4;
INFO: Dispatch command to SINGLE content
id
----
1
(1 row)
SELECT * FROM direct_test_type_int4 WHERE id = 1::int8;
INFO: Dispatch command to SINGLE content
id
----
1
(1 row)
-- Known_opt_diff: MPP-21346
SELECT * FROM direct_test_type_int4 WHERE 1::int2 = id;
INFO: Dispatch command to ALL contents
id
----
1
(1 row)
-- Known_opt_diff: MPP-21346
SELECT * FROM direct_test_type_int4 WHERE 1::int4 = id;
INFO: Dispatch command to ALL contents
id
----
1
(1 row)
-- Known_opt_diff: MPP-21346
SELECT * FROM direct_test_type_int4 WHERE 1::int8 = id;
INFO: Dispatch command to ALL contents
id
----
1
(1 row)
SELECT * FROM direct_test_type_int8 WHERE id = 1::int2;
INFO: Dispatch command to SINGLE content
id
----
1
(1 row)
SELECT * FROM direct_test_type_int8 WHERE id = 1::int4;
INFO: Dispatch command to SINGLE content
id
----
1
(1 row)
SELECT * FROM direct_test_type_int8 WHERE id = 1::int8;
INFO: Dispatch command to SINGLE content
id
----
1
(1 row)
-- Known_opt_diff: MPP-21346
SELECT * FROM direct_test_type_int8 WHERE 1::int2 = id;
INFO: Dispatch command to ALL contents
id
----
1
(1 row)
-- Known_opt_diff: MPP-21346
SELECT * FROM direct_test_type_int8 WHERE 1::int4 = id;
INFO: Dispatch command to ALL contents
id
----
1
(1 row)
-- Known_opt_diff: MPP-21346
SELECT * FROM direct_test_type_int8 WHERE 1::int8 = id;
INFO: Dispatch command to ALL contents
id
----
1
(1 row)
-- overflow test
SELECT * FROM direct_test_type_int2 WHERE id = 32768::int4;
INFO: Dispatch command to SINGLE content
id
----
(0 rows)
SELECT * FROM direct_test_type_int2 WHERE id = -32769::int4;
INFO: Dispatch command to SINGLE content
id
----
(0 rows)
-- Known_opt_diff: MPP-21346
SELECT * FROM direct_test_type_int2 WHERE 32768::int4 = id;
INFO: Dispatch command to ALL contents
id
----
(0 rows)
-- Known_opt_diff: MPP-21346
SELECT * FROM direct_test_type_int2 WHERE -32769::int4 = id;
INFO: Dispatch command to ALL contents
id
----
(0 rows)
SELECT * FROM direct_test_type_int2 WHERE id = 2147483648::int8;
INFO: Dispatch command to SINGLE content
id
----
(0 rows)
SELECT * FROM direct_test_type_int2 WHERE id = -2147483649::int8;
INFO: Dispatch command to SINGLE content
id
----
(0 rows)
-- Known_opt_diff: MPP-21346
SELECT * FROM direct_test_type_int2 WHERE 2147483648::int8 = id;
INFO: Dispatch command to ALL contents
id
----
(0 rows)
-- Known_opt_diff: MPP-21346
SELECT * FROM direct_test_type_int2 WHERE -2147483649::int8 = id;
INFO: Dispatch command to ALL contents
id
----
(0 rows)
-- tests with subplans (MPP-22019)
CREATE TABLE MPP_22019_a ( i INT, j INT) DISTRIBUTED BY (i);
INFO: Distributed transaction command 'Distributed Prepare' to ALL contents
......@@ -851,27 +458,8 @@ drop table if exists direct_test_two_column;
drop table if exists direct_test_bitmap;
drop table if exists direct_test_partition;
drop table if exists direct_test_range_partition;
drop table if exists direct_test_type_real;
drop table if exists direct_test_type_smallint;
drop table if exists direct_test_type_boolean;
drop table if exists direct_test_type_int;
drop table if exists direct_test_type_double;
drop table if exists direct_test_type_date;
drop table if exists direct_test_type_numeric;
drop table if exists direct_dispatch_foo;
drop table if exists direct_dispatch_bar;
drop table if exists direct_test_type_int2;
drop table if exists direct_test_type_int4;
drop table if exists direct_test_type_int8;
drop table if exists direct_test_type_abstime;
drop table if exists direct_test_type_bit;
drop table if exists direct_test_type_bpchar;
drop table if exists direct_test_type_bytea;
drop table if exists direct_test_type_cidr;
drop table if exists direct_test_type_inet;
drop table if exists direct_test_type_macaddr;
drop table if exists direct_test_type_tinterval;
drop table if exists direct_test_type_varbit;
drop table if exists MPP_22019_a;
drop table if exists MPP_22019_b;
commit;
......@@ -85,10 +85,10 @@ test: wrkloadadmin
# vacuum from removing dead tuples.
test: gp_toolkit
test: filespace trig auth_constraint role rle portals_updatable plpgsql_cache timeseries resource_queue_function pg_stat_last_operation gp_numeric_agg partindex_test direct_dispatch partition_pruning_with_fn dsp runtime_stats
test: filespace trig auth_constraint role rle portals_updatable plpgsql_cache timeseries resource_queue_function pg_stat_last_operation gp_numeric_agg partindex_test partition_pruning_with_fn dsp runtime_stats
# direct dispatch tests
test: bfv_dd bfv_dd_multicolumn bfv_dd_types
test: direct_dispatch bfv_dd bfv_dd_multicolumn bfv_dd_types
# catalog test uses pg_get_constraintdef which may report ERROR when executed
# concurrently with other tests. Cause pg_get_constraintdef() looks up
......
......@@ -77,6 +77,7 @@ select * from direct_test_type_cidr where x = '68.44.55.111';
select * from direct_test_type_inet where x = '68.44.55.111';
select * from direct_test_type_macaddr where x = '12:34:56:78:90:ab';
select 1 from direct_test_type_tinterval where x = '["2008-08-08" "2010-10-10"]';
select * from direct_test_type_varbit where x = '0101010';
SELECT * FROM direct_test_type_int2 WHERE id = 1::int2;
......@@ -138,4 +139,4 @@ drop table direct_test_type_macaddr;
drop table direct_test_type_tinterval;
drop table direct_test_type_varbit;
drop table direct_test_type_boolean2;
reset test_print_direct_dispatch_info;
\ No newline at end of file
reset test_print_direct_dispatch_info;
......@@ -38,23 +38,6 @@ create unique index direct_test_uk on direct_test_partition(trans_id);
create table direct_test_range_partition (a int, b int, c int, d int) distributed by (a) partition by range(d) (start(1) end(10) every(1));
insert into direct_test_range_partition select i, i+1, i+2, i+3 from generate_series(1, 2) i;
create table direct_test_type_real (real1 real, smallint1 smallint, boolean1 boolean, int1 int, double1 double precision, date1 date, numeric1 numeric) distributed by (real1);
create table direct_test_type_smallint (real1 real, smallint1 smallint, boolean1 boolean, int1 int, double1 double precision, date1 date, numeric1 numeric) distributed by (smallint1);
create table direct_test_type_boolean (real1 real, smallint1 smallint, boolean1 boolean, int1 int, double1 double precision, date1 date, numeric1 numeric) distributed by (boolean1);
create table direct_test_type_int (real1 real, smallint1 smallint, boolean1 boolean, int1 int, double1 double precision, date1 date, numeric1 numeric) distributed by (int1);
create table direct_test_type_double (real1 real, smallint1 smallint, boolean1 boolean, int1 int, double1 double precision, date1 date, numeric1 numeric) distributed by (double1);
create table direct_test_type_date (real1 real, smallint1 smallint, boolean1 boolean, int1 int, double1 double precision, date1 date, numeric1 numeric) distributed by (date1);
create table direct_test_type_numeric (real1 real, smallint1 smallint, boolean1 boolean, int1 int, double1 double precision, date1 date, numeric1 numeric) distributed by (numeric1);
create table direct_test_type_abstime (x abstime) distributed by (x);
create table direct_test_type_bit (x bit) distributed by (x);
create table direct_test_type_bpchar (x bpchar) distributed by (x);
create table direct_test_type_bytea (x bytea) distributed by (x);
create table direct_test_type_cidr (x cidr) distributed by (x);
create table direct_test_type_inet (x inet) distributed by (x);
create table direct_test_type_macaddr (x macaddr) distributed by (x);
create table direct_test_type_tinterval (x tinterval) distributed by (x);
create table direct_test_type_varbit (x varbit) distributed by (x);
commit;
-- enable printing of printing info
......@@ -168,25 +151,6 @@ select * from direct_test_partition where trans_id =1;
-- Known_opt_diff: MPP-21346
select count(*) from direct_test_range_partition where a =1;
----------------------------------------------------------------------------------
-- MPP-7643: various types
--
set optimizer_enable_constant_expression_evaluation=on;
insert into direct_test_type_real values (8,8,true,8,8,'2008-08-08',8.8);
insert into direct_test_type_smallint values (8,8,true,8,8,'2008-08-08',8.8);
insert into direct_test_type_boolean values (8,8,true,8,8,'2008-08-08',8.8);
insert into direct_test_type_int values (8,8,true,8,8,'2008-08-08',8.8);
insert into direct_test_type_double values (8,8,true,8,8,'2008-08-08',8.8);
insert into direct_test_type_date values (8,8,true,8,8,'2008-08-08',8.8);
insert into direct_test_type_numeric values (8,8,true,8,8,'2008-08-08',8.8);
reset optimizer_enable_constant_expression_evaluation;
select * from direct_test_type_real where real1 = 8::real;
select * from direct_test_type_smallint where smallint1 = 8::smallint;
select * from direct_test_type_int where int1 = 8;
select * from direct_test_type_double where double1 = 8;
select * from direct_test_type_date where date1 = '2008-08-08';
select * from direct_test_type_numeric where numeric1 = 8.8;
----------------------------------------------------------------------------------
-- Prepared statements
-- do same as above ones but using prepared statements, verify data goes to the right spot
prepare test_insert (int) as insert into direct_test values ($1,100);
......@@ -237,100 +201,6 @@ delete from direct_dispatch_foo where id * id = (select max(id2) from direct_dis
-- Known_opt_diff: MPP-21346
delete from direct_dispatch_foo where id * id = (select max(id2) from direct_dispatch_bar) AND id = 3;
------------------------------------
-- more type tests
--
-- abstime
insert into direct_test_type_abstime values('2008-08-08');
select 1 from direct_test_type_abstime where x = '2008-08-08';
insert into direct_test_type_bit values('1');
select * from direct_test_type_bit where x = '1';
insert into direct_test_type_bpchar values('abs');
select * from direct_test_type_bpchar where x = 'abs';
insert into direct_test_type_bytea values('greenplum');
select * from direct_test_type_bytea where x = 'greenplum';
insert into direct_test_type_cidr values('68.44.55.111');
-- Known_opt_diff: MPP-21346
select * from direct_test_type_cidr where x = '68.44.55.111';
insert into direct_test_type_inet values('68.44.55.111');
select * from direct_test_type_inet where x = '68.44.55.111';
insert into direct_test_type_macaddr values('12:34:56:78:90:ab');
select * from direct_test_type_macaddr where x = '12:34:56:78:90:ab';
insert into direct_test_type_tinterval values('["2008-08-08" "2010-10-10"]');
select 1 from direct_test_type_tinterval where x = '["2008-08-08" "2010-10-10"]';
insert into direct_test_type_varbit values('0101010');
select * from direct_test_type_varbit where x = '0101010';
------------------------------------
-- int28, int82, etc. checks
set test_print_direct_dispatch_info=off;
CREATE TABLE direct_test_type_int2 (id int2) DISTRIBUTED BY (id);
CREATE TABLE direct_test_type_int4 (id int4) DISTRIBUTED BY (id);
CREATE TABLE direct_test_type_int8 (id int8) DISTRIBUTED BY (id);
INSERT INTO direct_test_type_int2 VALUES (1);
INSERT INTO direct_test_type_int4 VALUES (1);
INSERT INTO direct_test_type_int8 VALUES (1);
set test_print_direct_dispatch_info=on;
SELECT * FROM direct_test_type_int2 WHERE id = 1::int2;
SELECT * FROM direct_test_type_int2 WHERE id = 1::int4;
SELECT * FROM direct_test_type_int2 WHERE id = 1::int8;
-- Known_opt_diff: MPP-21346
SELECT * FROM direct_test_type_int2 WHERE 1::int2 = id;
-- Known_opt_diff: MPP-21346
SELECT * FROM direct_test_type_int2 WHERE 1::int4 = id;
-- Known_opt_diff: MPP-21346
SELECT * FROM direct_test_type_int2 WHERE 1::int8 = id;
SELECT * FROM direct_test_type_int4 WHERE id = 1::int2;
SELECT * FROM direct_test_type_int4 WHERE id = 1::int4;
SELECT * FROM direct_test_type_int4 WHERE id = 1::int8;
-- Known_opt_diff: MPP-21346
SELECT * FROM direct_test_type_int4 WHERE 1::int2 = id;
-- Known_opt_diff: MPP-21346
SELECT * FROM direct_test_type_int4 WHERE 1::int4 = id;
-- Known_opt_diff: MPP-21346
SELECT * FROM direct_test_type_int4 WHERE 1::int8 = id;
SELECT * FROM direct_test_type_int8 WHERE id = 1::int2;
SELECT * FROM direct_test_type_int8 WHERE id = 1::int4;
SELECT * FROM direct_test_type_int8 WHERE id = 1::int8;
-- Known_opt_diff: MPP-21346
SELECT * FROM direct_test_type_int8 WHERE 1::int2 = id;
-- Known_opt_diff: MPP-21346
SELECT * FROM direct_test_type_int8 WHERE 1::int4 = id;
-- Known_opt_diff: MPP-21346
SELECT * FROM direct_test_type_int8 WHERE 1::int8 = id;
-- overflow test
SELECT * FROM direct_test_type_int2 WHERE id = 32768::int4;
SELECT * FROM direct_test_type_int2 WHERE id = -32769::int4;
-- Known_opt_diff: MPP-21346
SELECT * FROM direct_test_type_int2 WHERE 32768::int4 = id;
-- Known_opt_diff: MPP-21346
SELECT * FROM direct_test_type_int2 WHERE -32769::int4 = id;
SELECT * FROM direct_test_type_int2 WHERE id = 2147483648::int8;
SELECT * FROM direct_test_type_int2 WHERE id = -2147483649::int8;
-- Known_opt_diff: MPP-21346
SELECT * FROM direct_test_type_int2 WHERE 2147483648::int8 = id;
-- Known_opt_diff: MPP-21346
SELECT * FROM direct_test_type_int2 WHERE -2147483649::int8 = id;
-- tests with subplans (MPP-22019)
CREATE TABLE MPP_22019_a ( i INT, j INT) DISTRIBUTED BY (i);
INSERT INTO MPP_22019_a (
......@@ -350,28 +220,9 @@ drop table if exists direct_test_two_column;
drop table if exists direct_test_bitmap;
drop table if exists direct_test_partition;
drop table if exists direct_test_range_partition;
drop table if exists direct_test_type_real;
drop table if exists direct_test_type_smallint;
drop table if exists direct_test_type_boolean;
drop table if exists direct_test_type_int;
drop table if exists direct_test_type_double;
drop table if exists direct_test_type_date;
drop table if exists direct_test_type_numeric;
drop table if exists direct_dispatch_foo;
drop table if exists direct_dispatch_bar;
drop table if exists direct_test_type_int2;
drop table if exists direct_test_type_int4;
drop table if exists direct_test_type_int8;
drop table if exists direct_test_type_abstime;
drop table if exists direct_test_type_bit;
drop table if exists direct_test_type_bpchar;
drop table if exists direct_test_type_bytea;
drop table if exists direct_test_type_cidr;
drop table if exists direct_test_type_inet;
drop table if exists direct_test_type_macaddr;
drop table if exists direct_test_type_tinterval;
drop table if exists direct_test_type_varbit;
drop table if exists MPP_22019_a;
drop table if exists MPP_22019_b;
commit;
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册