提交 5423ebdc 编写于 作者: H Heikki Linnakangas

Remove uninteresting tests on using + operator in DML queries.

These expressions are as simple as it gets. If any of these queries would
fail, the system would be so broken that you would notice it very quickly.

(These tests had nothing to do with MPP-21090, like the description tags
claimed. That bug happened when you dropped a column and then added a
partition, and there are no DROP COLUMNS or ADD PARTITIONS in these tests.)
上级 4e0739eb
DROP TABLE IF EXISTS computedcol_dml_decimal;
psql:/data/prabhd/test/tincrepo/main/dml/functional/output/computedcol_dml_decimal_opt.sql:14: NOTICE: table "computedcol_dml_decimal" does not exist, skipping
DROP TABLE
CREATE TABLE computedcol_dml_decimal
(
col1 decimal DEFAULT 1.00,
col2 decimal,
col3 char,
col4 decimal,
col5 int
)
DISTRIBUTED by (col1)
PARTITION BY RANGE(col2)(partition partone start(1.00) end(10.00) WITH (APPENDONLY=true, COMPRESSLEVEL=5, ORIENTATION=column),partition parttwo start(10.00) end(20.00) WITH (APPENDONLY=true, COMPRESSLEVEL=5, ORIENTATION=row),partition partthree start(20.00) end(30.00), default partition def);
psql:/data/prabhd/test/tincrepo/main/dml/functional/output/computedcol_dml_decimal_opt.sql:24: NOTICE: CREATE TABLE will create partition "computedcol_dml_decimal_1_prt_def" for table "computedcol_dml_decimal"
psql:/data/prabhd/test/tincrepo/main/dml/functional/output/computedcol_dml_decimal_opt.sql:24: NOTICE: CREATE TABLE will create partition "computedcol_dml_decimal_1_prt_partone" for table "computedcol_dml_decimal"
psql:/data/prabhd/test/tincrepo/main/dml/functional/output/computedcol_dml_decimal_opt.sql:24: NOTICE: CREATE TABLE will create partition "computedcol_dml_decimal_1_prt_parttwo" for table "computedcol_dml_decimal"
psql:/data/prabhd/test/tincrepo/main/dml/functional/output/computedcol_dml_decimal_opt.sql:24: NOTICE: CREATE TABLE will create partition "computedcol_dml_decimal_1_prt_partthree" for table "computedcol_dml_decimal"
CREATE TABLE
INSERT INTO computedcol_dml_decimal(col2,col1,col3,col5,col4) SELECT 2.00::decimal+1.00::decimal, 2.00::decimal+1.00::decimal, 'a', 1,2.00::decimal+1.00::decimal;
INSERT 0 1
INSERT INTO computedcol_dml_decimal(col2,col3,col5,col4) SELECT 2.00::decimal+1.00::decimal,'a', 1,2.00::decimal+1.00::decimal;
INSERT 0 1
SELECT * FROM computedcol_dml_decimal ORDER BY 1,2,3,4;
col1 | col2 | col3 | col4 | col5
------+------+------+------+------
1.00 | 3.00 | a | 3.00 | 1
3.00 | 3.00 | a | 3.00 | 1
(2 rows)
UPDATE computedcol_dml_decimal SET col1=2.00::decimal+1.00::decimal;
UPDATE 2
SELECT * FROM computedcol_dml_decimal ORDER BY 1,2,3,4;
col1 | col2 | col3 | col4 | col5
------+------+------+------+------
3.00 | 3.00 | a | 3.00 | 1
3.00 | 3.00 | a | 3.00 | 1
(2 rows)
DELETE FROM computedcol_dml_decimal WHERE col1=1.00::decimal + 2.00::decimal;
DELETE 2
SELECT * FROM computedcol_dml_decimal ORDER BY 1,2,3,4;
col1 | col2 | col3 | col4 | col5
------+------+------+------+------
(0 rows)
DROP TABLE IF EXISTS computedcol_dml_int4;
psql:/data/prabhd/test/tincrepo/main/dml/functional/output/computedcol_dml_int4_opt.sql:14: NOTICE: table "computedcol_dml_int4" does not exist, skipping
DROP TABLE
CREATE TABLE computedcol_dml_int4
(
col1 int4 DEFAULT 10000000,
col2 int4,
col3 char,
col4 int4,
col5 int
)
DISTRIBUTED by (col1)
PARTITION BY RANGE(col2)(partition partone start(1) end(100000001) WITH (APPENDONLY=true, COMPRESSLEVEL=5, ORIENTATION=column),partition parttwo start(100000001) end(200000001) WITH (APPENDONLY=true, COMPRESSLEVEL=5, ORIENTATION=row),partition partthree start(200000001) end(300000001), default partition def);
psql:/data/prabhd/test/tincrepo/main/dml/functional/output/computedcol_dml_int4_opt.sql:24: NOTICE: CREATE TABLE will create partition "computedcol_dml_int4_1_prt_def" for table "computedcol_dml_int4"
psql:/data/prabhd/test/tincrepo/main/dml/functional/output/computedcol_dml_int4_opt.sql:24: NOTICE: CREATE TABLE will create partition "computedcol_dml_int4_1_prt_partone" for table "computedcol_dml_int4"
psql:/data/prabhd/test/tincrepo/main/dml/functional/output/computedcol_dml_int4_opt.sql:24: NOTICE: CREATE TABLE will create partition "computedcol_dml_int4_1_prt_parttwo" for table "computedcol_dml_int4"
psql:/data/prabhd/test/tincrepo/main/dml/functional/output/computedcol_dml_int4_opt.sql:24: NOTICE: CREATE TABLE will create partition "computedcol_dml_int4_1_prt_partthree" for table "computedcol_dml_int4"
CREATE TABLE
INSERT INTO computedcol_dml_int4(col2,col1,col3,col5,col4) SELECT 20000000::int4+10000000::int4, 20000000::int4+10000000::int4, 'a', 1,20000000::int4+10000000::int4;
INSERT 0 1
INSERT INTO computedcol_dml_int4(col2,col3,col5,col4) SELECT 20000000::int4+10000000::int4,'a', 1,20000000::int4+10000000::int4;
INSERT 0 1
SELECT * FROM computedcol_dml_int4 ORDER BY 1,2,3,4;
col1 | col2 | col3 | col4 | col5
----------+----------+------+----------+------
10000000 | 30000000 | a | 30000000 | 1
30000000 | 30000000 | a | 30000000 | 1
(2 rows)
UPDATE computedcol_dml_int4 SET col1=20000000::int4+10000000::int4;
UPDATE 2
SELECT * FROM computedcol_dml_int4 ORDER BY 1,2,3,4;
col1 | col2 | col3 | col4 | col5
----------+----------+------+----------+------
30000000 | 30000000 | a | 30000000 | 1
30000000 | 30000000 | a | 30000000 | 1
(2 rows)
DELETE FROM computedcol_dml_int4 WHERE col1=10000000::int4 + 20000000::int4;
DELETE 2
SELECT * FROM computedcol_dml_int4 ORDER BY 1,2,3,4;
col1 | col2 | col3 | col4 | col5
------+------+------+------+------
(0 rows)
DROP TABLE IF EXISTS computedcol_dml_int8;
psql:/data/prabhd/test/tincrepo/main/dml/functional/output/computedcol_dml_int8_opt.sql:14: NOTICE: table "computedcol_dml_int8" does not exist, skipping
DROP TABLE
CREATE TABLE computedcol_dml_int8
(
col1 int8 DEFAULT 1000000000000000000,
col2 int8,
col3 char,
col4 int8,
col5 int
)
DISTRIBUTED by (col1)
PARTITION BY RANGE(col2)(partition partone start(1) end(1000000000000000001) WITH (APPENDONLY=true, COMPRESSLEVEL=5, ORIENTATION=column),partition parttwo start(1000000000000000001) end(2000000000000000001) WITH (APPENDONLY=true, COMPRESSLEVEL=5, ORIENTATION=row),partition partthree start(2000000000000000001) end(3000000000000000001), default partition def);
psql:/data/prabhd/test/tincrepo/main/dml/functional/output/computedcol_dml_int8_opt.sql:24: NOTICE: CREATE TABLE will create partition "computedcol_dml_int8_1_prt_def" for table "computedcol_dml_int8"
psql:/data/prabhd/test/tincrepo/main/dml/functional/output/computedcol_dml_int8_opt.sql:24: NOTICE: CREATE TABLE will create partition "computedcol_dml_int8_1_prt_partone" for table "computedcol_dml_int8"
psql:/data/prabhd/test/tincrepo/main/dml/functional/output/computedcol_dml_int8_opt.sql:24: NOTICE: CREATE TABLE will create partition "computedcol_dml_int8_1_prt_parttwo" for table "computedcol_dml_int8"
psql:/data/prabhd/test/tincrepo/main/dml/functional/output/computedcol_dml_int8_opt.sql:24: NOTICE: CREATE TABLE will create partition "computedcol_dml_int8_1_prt_partthree" for table "computedcol_dml_int8"
CREATE TABLE
INSERT INTO computedcol_dml_int8(col2,col1,col3,col5,col4) SELECT 200000000000000000::int8+1000000000000000000::int8, 200000000000000000::int8+1000000000000000000::int8, 'a', 1,200000000000000000::int8+1000000000000000000::int8;
INSERT 0 1
INSERT INTO computedcol_dml_int8(col2,col3,col5,col4) SELECT 200000000000000000::int8+1000000000000000000::int8,'a', 1,200000000000000000::int8+1000000000000000000::int8;
INSERT 0 1
SELECT * FROM computedcol_dml_int8 ORDER BY 1,2,3,4;
col1 | col2 | col3 | col4 | col5
---------------------+---------------------+------+---------------------+------
1000000000000000000 | 1200000000000000000 | a | 1200000000000000000 | 1
1200000000000000000 | 1200000000000000000 | a | 1200000000000000000 | 1
(2 rows)
UPDATE computedcol_dml_int8 SET col1=200000000000000000::int8+1000000000000000000::int8;
UPDATE 2
SELECT * FROM computedcol_dml_int8 ORDER BY 1,2,3,4;
col1 | col2 | col3 | col4 | col5
---------------------+---------------------+------+---------------------+------
1200000000000000000 | 1200000000000000000 | a | 1200000000000000000 | 1
1200000000000000000 | 1200000000000000000 | a | 1200000000000000000 | 1
(2 rows)
DELETE FROM computedcol_dml_int8 WHERE col1=1000000000000000000::int8 + 200000000000000000::int8;
DELETE 2
SELECT * FROM computedcol_dml_int8 ORDER BY 1,2,3,4;
col1 | col2 | col3 | col4 | col5
------+------+------+------+------
(0 rows)
DROP TABLE IF EXISTS computedcol_dml_interval;
psql:/data/prabhd/test/tincrepo/main/dml/functional/output/computedcol_dml_interval_opt.sql:14: NOTICE: table "computedcol_dml_interval" does not exist, skipping
DROP TABLE
CREATE TABLE computedcol_dml_interval
(
col1 interval DEFAULT '11 hours',
col2 interval,
col3 char,
col4 interval,
col5 int
)
DISTRIBUTED by (col1)
PARTITION BY RANGE(col2)(partition partone start('1 sec') end('1 min') WITH (APPENDONLY=true, COMPRESSLEVEL=5, ORIENTATION=column),partition parttwo start('1 min') end('1 hour') WITH (APPENDONLY=true, COMPRESSLEVEL=5, ORIENTATION=row),partition partthree start('1 hour') end('12 hours'), default partition def);
psql:/data/prabhd/test/tincrepo/main/dml/functional/output/computedcol_dml_interval_opt.sql:24: NOTICE: CREATE TABLE will create partition "computedcol_dml_interval_1_prt_def" for table "computedcol_dml_interval"
psql:/data/prabhd/test/tincrepo/main/dml/functional/output/computedcol_dml_interval_opt.sql:24: NOTICE: CREATE TABLE will create partition "computedcol_dml_interval_1_prt_partone" for table "computedcol_dml_interval"
psql:/data/prabhd/test/tincrepo/main/dml/functional/output/computedcol_dml_interval_opt.sql:24: NOTICE: CREATE TABLE will create partition "computedcol_dml_interval_1_prt_parttwo" for table "computedcol_dml_interval"
psql:/data/prabhd/test/tincrepo/main/dml/functional/output/computedcol_dml_interval_opt.sql:24: NOTICE: CREATE TABLE will create partition "computedcol_dml_interval_1_prt_partthree" for table "computedcol_dml_interval"
CREATE TABLE
INSERT INTO computedcol_dml_interval(col2,col1,col3,col5,col4) SELECT '10 secs'::interval+'11 hours'::interval, '10 secs'::interval+'11 hours'::interval, 'a', 1,'10 secs'::interval+'11 hours'::interval;
INSERT 0 1
INSERT INTO computedcol_dml_interval(col2,col3,col5,col4) SELECT '10 secs'::interval+'11 hours'::interval,'a', 1,'10 secs'::interval+'11 hours'::interval;
INSERT 0 1
SELECT * FROM computedcol_dml_interval ORDER BY 1,2,3,4;
col1 | col2 | col3 | col4 | col5
----------+----------+------+----------+------
11:00:00 | 11:00:10 | a | 11:00:10 | 1
11:00:10 | 11:00:10 | a | 11:00:10 | 1
(2 rows)
UPDATE computedcol_dml_interval SET col1='10 secs'::interval+'11 hours'::interval;
UPDATE 2
SELECT * FROM computedcol_dml_interval ORDER BY 1,2,3,4;
col1 | col2 | col3 | col4 | col5
----------+----------+------+----------+------
11:00:10 | 11:00:10 | a | 11:00:10 | 1
11:00:10 | 11:00:10 | a | 11:00:10 | 1
(2 rows)
DELETE FROM computedcol_dml_interval WHERE col1='11 hours'::interval + '10 secs'::interval;
DELETE 2
SELECT * FROM computedcol_dml_interval ORDER BY 1,2,3,4;
col1 | col2 | col3 | col4 | col5
------+------+------+------+------
(0 rows)
DROP TABLE IF EXISTS computedcol_dml_numeric;
psql:/data/prabhd/test/tincrepo/main/dml/functional/output/computedcol_dml_numeric_opt.sql:14: NOTICE: table "computedcol_dml_numeric" does not exist, skipping
DROP TABLE
CREATE TABLE computedcol_dml_numeric
(
col1 numeric DEFAULT 1.000000,
col2 numeric,
col3 char,
col4 numeric,
col5 int
)
DISTRIBUTED by (col1)
PARTITION BY RANGE(col2)(partition partone start(1.000000) end(10.000000) WITH (APPENDONLY=true, COMPRESSLEVEL=5, ORIENTATION=column),partition parttwo start(10.000000) end(20.000000) WITH (APPENDONLY=true, COMPRESSLEVEL=5, ORIENTATION=row),partition partthree start(20.000000) end(30.000000), default partition def);
psql:/data/prabhd/test/tincrepo/main/dml/functional/output/computedcol_dml_numeric_opt.sql:24: NOTICE: CREATE TABLE will create partition "computedcol_dml_numeric_1_prt_def" for table "computedcol_dml_numeric"
psql:/data/prabhd/test/tincrepo/main/dml/functional/output/computedcol_dml_numeric_opt.sql:24: NOTICE: CREATE TABLE will create partition "computedcol_dml_numeric_1_prt_partone" for table "computedcol_dml_numeric"
psql:/data/prabhd/test/tincrepo/main/dml/functional/output/computedcol_dml_numeric_opt.sql:24: NOTICE: CREATE TABLE will create partition "computedcol_dml_numeric_1_prt_parttwo" for table "computedcol_dml_numeric"
psql:/data/prabhd/test/tincrepo/main/dml/functional/output/computedcol_dml_numeric_opt.sql:24: NOTICE: CREATE TABLE will create partition "computedcol_dml_numeric_1_prt_partthree" for table "computedcol_dml_numeric"
CREATE TABLE
INSERT INTO computedcol_dml_numeric(col2,col1,col3,col5,col4) SELECT 2.000000::numeric+1.000000::numeric, 2.000000::numeric+1.000000::numeric, 'a', 1,2.000000::numeric+1.000000::numeric;
INSERT 0 1
INSERT INTO computedcol_dml_numeric(col2,col3,col5,col4) SELECT 2.000000::numeric+1.000000::numeric,'a', 1,2.000000::numeric+1.000000::numeric;
INSERT 0 1
SELECT * FROM computedcol_dml_numeric ORDER BY 1,2,3,4;
col1 | col2 | col3 | col4 | col5
----------+----------+------+----------+------
1.000000 | 3.000000 | a | 3.000000 | 1
3.000000 | 3.000000 | a | 3.000000 | 1
(2 rows)
UPDATE computedcol_dml_numeric SET col1=2.000000::numeric+1.000000::numeric;
UPDATE 2
SELECT * FROM computedcol_dml_numeric ORDER BY 1,2,3,4;
col1 | col2 | col3 | col4 | col5
----------+----------+------+----------+------
3.000000 | 3.000000 | a | 3.000000 | 1
3.000000 | 3.000000 | a | 3.000000 | 1
(2 rows)
DELETE FROM computedcol_dml_numeric WHERE col1=1.000000::numeric + 2.000000::numeric;
DELETE 2
SELECT * FROM computedcol_dml_numeric ORDER BY 1,2,3,4;
col1 | col2 | col3 | col4 | col5
------+------+------+------+------
(0 rows)
-- @author prabhd
-- @created 2014-04-01 12:00:00
-- @modified 2012-04-01 12:00:00
-- @tags dml MPP-21090 ORCA
-- @product_version gpdb: [4.3-]
-- @optimizer_mode on
-- @description Tests for MPP-21090
\echo --start_ignore
set gp_enable_column_oriented_table=on;
\echo --end_ignore
DROP TABLE IF EXISTS computedcol_dml_decimal;
CREATE TABLE computedcol_dml_decimal
(
col1 decimal DEFAULT 1.00,
col2 decimal,
col3 char,
col4 decimal,
col5 int
)
DISTRIBUTED by (col1)
PARTITION BY RANGE(col2)(partition partone start(1.00) end(10.00) WITH (APPENDONLY=true, COMPRESSLEVEL=5, ORIENTATION=column),partition parttwo start(10.00) end(20.00) WITH (APPENDONLY=true, COMPRESSLEVEL=5, ORIENTATION=row),partition partthree start(20.00) end(30.00), default partition def);
INSERT INTO computedcol_dml_decimal(col2,col1,col3,col5,col4) SELECT 2.00::decimal+1.00::decimal, 2.00::decimal+1.00::decimal, 'a', 1,2.00::decimal+1.00::decimal;
INSERT INTO computedcol_dml_decimal(col2,col3,col5,col4) SELECT 2.00::decimal+1.00::decimal,'a', 1,2.00::decimal+1.00::decimal;
SELECT * FROM computedcol_dml_decimal ORDER BY 1,2,3,4;
UPDATE computedcol_dml_decimal SET col1=2.00::decimal+1.00::decimal;
SELECT * FROM computedcol_dml_decimal ORDER BY 1,2,3,4;
DELETE FROM computedcol_dml_decimal WHERE col1=1.00::decimal + 2.00::decimal;
SELECT * FROM computedcol_dml_decimal ORDER BY 1,2,3,4;
-- @author prabhd
-- @created 2014-04-01 12:00:00
-- @modified 2012-04-01 12:00:00
-- @tags dml MPP-21090 ORCA
-- @product_version gpdb: [4.3-]
-- @optimizer_mode on
-- @description Tests for MPP-21090
\echo --start_ignore
set gp_enable_column_oriented_table=on;
\echo --end_ignore
DROP TABLE IF EXISTS computedcol_dml_int4;
CREATE TABLE computedcol_dml_int4
(
col1 int4 DEFAULT 10000000,
col2 int4,
col3 char,
col4 int4,
col5 int
)
DISTRIBUTED by (col1)
PARTITION BY RANGE(col2)(partition partone start(1) end(100000001) WITH (APPENDONLY=true, COMPRESSLEVEL=5, ORIENTATION=column),partition parttwo start(100000001) end(200000001) WITH (APPENDONLY=true, COMPRESSLEVEL=5, ORIENTATION=row),partition partthree start(200000001) end(300000001), default partition def);
INSERT INTO computedcol_dml_int4(col2,col1,col3,col5,col4) SELECT 20000000::int4+10000000::int4, 20000000::int4+10000000::int4, 'a', 1,20000000::int4+10000000::int4;
INSERT INTO computedcol_dml_int4(col2,col3,col5,col4) SELECT 20000000::int4+10000000::int4,'a', 1,20000000::int4+10000000::int4;
SELECT * FROM computedcol_dml_int4 ORDER BY 1,2,3,4;
UPDATE computedcol_dml_int4 SET col1=20000000::int4+10000000::int4;
SELECT * FROM computedcol_dml_int4 ORDER BY 1,2,3,4;
DELETE FROM computedcol_dml_int4 WHERE col1=10000000::int4 + 20000000::int4;
SELECT * FROM computedcol_dml_int4 ORDER BY 1,2,3,4;
-- @author prabhd
-- @created 2014-04-01 12:00:00
-- @modified 2012-04-01 12:00:00
-- @tags dml MPP-21090 ORCA
-- @product_version gpdb: [4.3-]
-- @optimizer_mode on
-- @description Tests for MPP-21090
\echo --start_ignore
set gp_enable_column_oriented_table=on;
\echo --end_ignore
DROP TABLE IF EXISTS computedcol_dml_int8;
CREATE TABLE computedcol_dml_int8
(
col1 int8 DEFAULT 1000000000000000000,
col2 int8,
col3 char,
col4 int8,
col5 int
)
DISTRIBUTED by (col1)
PARTITION BY RANGE(col2)(partition partone start(1) end(1000000000000000001) WITH (APPENDONLY=true, COMPRESSLEVEL=5, ORIENTATION=column),partition parttwo start(1000000000000000001) end(2000000000000000001) WITH (APPENDONLY=true, COMPRESSLEVEL=5, ORIENTATION=row),partition partthree start(2000000000000000001) end(3000000000000000001), default partition def);
INSERT INTO computedcol_dml_int8(col2,col1,col3,col5,col4) SELECT 200000000000000000::int8+1000000000000000000::int8, 200000000000000000::int8+1000000000000000000::int8, 'a', 1,200000000000000000::int8+1000000000000000000::int8;
INSERT INTO computedcol_dml_int8(col2,col3,col5,col4) SELECT 200000000000000000::int8+1000000000000000000::int8,'a', 1,200000000000000000::int8+1000000000000000000::int8;
SELECT * FROM computedcol_dml_int8 ORDER BY 1,2,3,4;
UPDATE computedcol_dml_int8 SET col1=200000000000000000::int8+1000000000000000000::int8;
SELECT * FROM computedcol_dml_int8 ORDER BY 1,2,3,4;
DELETE FROM computedcol_dml_int8 WHERE col1=1000000000000000000::int8 + 200000000000000000::int8;
SELECT * FROM computedcol_dml_int8 ORDER BY 1,2,3,4;
-- @author prabhd
-- @created 2014-04-01 12:00:00
-- @modified 2012-04-01 12:00:00
-- @tags dml MPP-21090 ORCA
-- @product_version gpdb: [4.3-]
-- @optimizer_mode on
-- @description Tests for MPP-21090
\echo --start_ignore
set gp_enable_column_oriented_table=on;
\echo --end_ignore
DROP TABLE IF EXISTS computedcol_dml_interval;
CREATE TABLE computedcol_dml_interval
(
col1 interval DEFAULT '11 hours',
col2 interval,
col3 char,
col4 interval,
col5 int
)
DISTRIBUTED by (col1)
PARTITION BY RANGE(col2)(partition partone start('1 sec') end('1 min') WITH (APPENDONLY=true, COMPRESSLEVEL=5, ORIENTATION=column),partition parttwo start('1 min') end('1 hour') WITH (APPENDONLY=true, COMPRESSLEVEL=5, ORIENTATION=row),partition partthree start('1 hour') end('12 hours'), default partition def);
INSERT INTO computedcol_dml_interval(col2,col1,col3,col5,col4) SELECT '10 secs'::interval+'11 hours'::interval, '10 secs'::interval+'11 hours'::interval, 'a', 1,'10 secs'::interval+'11 hours'::interval;
INSERT INTO computedcol_dml_interval(col2,col3,col5,col4) SELECT '10 secs'::interval+'11 hours'::interval,'a', 1,'10 secs'::interval+'11 hours'::interval;
SELECT * FROM computedcol_dml_interval ORDER BY 1,2,3,4;
UPDATE computedcol_dml_interval SET col1='10 secs'::interval+'11 hours'::interval;
SELECT * FROM computedcol_dml_interval ORDER BY 1,2,3,4;
DELETE FROM computedcol_dml_interval WHERE col1='11 hours'::interval + '10 secs'::interval;
SELECT * FROM computedcol_dml_interval ORDER BY 1,2,3,4;
-- @author prabhd
-- @created 2014-04-01 12:00:00
-- @modified 2012-04-01 12:00:00
-- @tags dml MPP-21090 ORCA
-- @product_version gpdb: [4.3-]
-- @optimizer_mode on
-- @description Tests for MPP-21090
\echo --start_ignore
set gp_enable_column_oriented_table=on;
\echo --end_ignore
DROP TABLE IF EXISTS computedcol_dml_numeric;
CREATE TABLE computedcol_dml_numeric
(
col1 numeric DEFAULT 1.000000,
col2 numeric,
col3 char,
col4 numeric,
col5 int
)
DISTRIBUTED by (col1)
PARTITION BY RANGE(col2)(partition partone start(1.000000) end(10.000000) WITH (APPENDONLY=true, COMPRESSLEVEL=5, ORIENTATION=column),partition parttwo start(10.000000) end(20.000000) WITH (APPENDONLY=true, COMPRESSLEVEL=5, ORIENTATION=row),partition partthree start(20.000000) end(30.000000), default partition def);
INSERT INTO computedcol_dml_numeric(col2,col1,col3,col5,col4) SELECT 2.000000::numeric+1.000000::numeric, 2.000000::numeric+1.000000::numeric, 'a', 1,2.000000::numeric+1.000000::numeric;
INSERT INTO computedcol_dml_numeric(col2,col3,col5,col4) SELECT 2.000000::numeric+1.000000::numeric,'a', 1,2.000000::numeric+1.000000::numeric;
SELECT * FROM computedcol_dml_numeric ORDER BY 1,2,3,4;
UPDATE computedcol_dml_numeric SET col1=2.000000::numeric+1.000000::numeric;
SELECT * FROM computedcol_dml_numeric ORDER BY 1,2,3,4;
DELETE FROM computedcol_dml_numeric WHERE col1=1.000000::numeric + 2.000000::numeric;
SELECT * FROM computedcol_dml_numeric ORDER BY 1,2,3,4;
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册