setup.ans 7.6 KB
Newer Older
N
Ning Wu 已提交
1 2 3 4 5
DROP DATABASE IF EXISTS reuse_gptest;
DROP DATABASE
CREATE DATABASE reuse_gptest;
CREATE DATABASE
You are now connected to database "reuse_gptest" as user "gpadmin".
6 7
CREATE SCHEMA test;
CREATE SCHEMA
8 9
DROP EXTERNAL TABLE IF EXISTS temp_gpload_staging_table;
DROP EXTERNAL TABLE
N
Ning Wu 已提交
10 11 12
DROP TABLE IF EXISTS texttable;
NOTICE:  table "texttable" does not exist, skipping
DROP TABLE
13 14 15
DROP TABLE IF EXISTS csvtable;
NOTICE:  table "csvtable" does not exist, skipping
DROP TABLE
N
Ning Wu 已提交
16 17 18 19 20
CREATE TABLE texttable (
            s1 text, s2 text, s3 text, dt timestamp,
            n1 smallint, n2 integer, n3 bigint, n4 decimal,
            n5 numeric, n6 real, n7 double precision) DISTRIBUTED BY (n1);
CREATE TABLE
21 22 23 24
CREATE TABLE csvtable (
	    year int, make text, model text, decription text, price decimal)
            DISTRIBUTED BY (year);
CREATE TABLE
25 26 27 28
CREATE TABLE test.csvtable (
	    year int, make text, model text, decription text, price decimal)
            DISTRIBUTED BY (year);
CREATE TABLE
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105
create table testpk (n1 integer, s1 integer, s2 varchar(128), n2 integer, primary key(n1,s1,s2))
partition by range (s1)
 subpartition by list(s2)
 SUBPARTITION TEMPLATE
 ( SUBPARTITION usa VALUES ('usa'),
        SUBPARTITION asia VALUES ('asia'),
        SUBPARTITION europe VALUES ('europe'),
        DEFAULT SUBPARTITION other_regions)
(start (1) end (13) every (1),
default partition others)
;
NOTICE:  CREATE TABLE will create partition "testpk_1_prt_others" for table "testpk"
NOTICE:  CREATE TABLE will create partition "testpk_1_prt_others_2_prt_usa" for table "testpk_1_prt_others"
NOTICE:  CREATE TABLE will create partition "testpk_1_prt_others_2_prt_asia" for table "testpk_1_prt_others"
NOTICE:  CREATE TABLE will create partition "testpk_1_prt_others_2_prt_europe" for table "testpk_1_prt_others"
NOTICE:  CREATE TABLE will create partition "testpk_1_prt_others_2_prt_other_regions" for table "testpk_1_prt_others"
NOTICE:  CREATE TABLE will create partition "testpk_1_prt_2" for table "testpk"
NOTICE:  CREATE TABLE will create partition "testpk_1_prt_2_2_prt_usa" for table "testpk_1_prt_2"
NOTICE:  CREATE TABLE will create partition "testpk_1_prt_2_2_prt_asia" for table "testpk_1_prt_2"
NOTICE:  CREATE TABLE will create partition "testpk_1_prt_2_2_prt_europe" for table "testpk_1_prt_2"
NOTICE:  CREATE TABLE will create partition "testpk_1_prt_2_2_prt_other_regions" for table "testpk_1_prt_2"
NOTICE:  CREATE TABLE will create partition "testpk_1_prt_3" for table "testpk"
NOTICE:  CREATE TABLE will create partition "testpk_1_prt_3_2_prt_usa" for table "testpk_1_prt_3"
NOTICE:  CREATE TABLE will create partition "testpk_1_prt_3_2_prt_asia" for table "testpk_1_prt_3"
NOTICE:  CREATE TABLE will create partition "testpk_1_prt_3_2_prt_europe" for table "testpk_1_prt_3"
NOTICE:  CREATE TABLE will create partition "testpk_1_prt_3_2_prt_other_regions" for table "testpk_1_prt_3"
NOTICE:  CREATE TABLE will create partition "testpk_1_prt_4" for table "testpk"
NOTICE:  CREATE TABLE will create partition "testpk_1_prt_4_2_prt_usa" for table "testpk_1_prt_4"
NOTICE:  CREATE TABLE will create partition "testpk_1_prt_4_2_prt_asia" for table "testpk_1_prt_4"
NOTICE:  CREATE TABLE will create partition "testpk_1_prt_4_2_prt_europe" for table "testpk_1_prt_4"
NOTICE:  CREATE TABLE will create partition "testpk_1_prt_4_2_prt_other_regions" for table "testpk_1_prt_4"
NOTICE:  CREATE TABLE will create partition "testpk_1_prt_5" for table "testpk"
NOTICE:  CREATE TABLE will create partition "testpk_1_prt_5_2_prt_usa" for table "testpk_1_prt_5"
NOTICE:  CREATE TABLE will create partition "testpk_1_prt_5_2_prt_asia" for table "testpk_1_prt_5"
NOTICE:  CREATE TABLE will create partition "testpk_1_prt_5_2_prt_europe" for table "testpk_1_prt_5"
NOTICE:  CREATE TABLE will create partition "testpk_1_prt_5_2_prt_other_regions" for table "testpk_1_prt_5"
NOTICE:  CREATE TABLE will create partition "testpk_1_prt_6" for table "testpk"
NOTICE:  CREATE TABLE will create partition "testpk_1_prt_6_2_prt_usa" for table "testpk_1_prt_6"
NOTICE:  CREATE TABLE will create partition "testpk_1_prt_6_2_prt_asia" for table "testpk_1_prt_6"
NOTICE:  CREATE TABLE will create partition "testpk_1_prt_6_2_prt_europe" for table "testpk_1_prt_6"
NOTICE:  CREATE TABLE will create partition "testpk_1_prt_6_2_prt_other_regions" for table "testpk_1_prt_6"
NOTICE:  CREATE TABLE will create partition "testpk_1_prt_7" for table "testpk"
NOTICE:  CREATE TABLE will create partition "testpk_1_prt_7_2_prt_usa" for table "testpk_1_prt_7"
NOTICE:  CREATE TABLE will create partition "testpk_1_prt_7_2_prt_asia" for table "testpk_1_prt_7"
NOTICE:  CREATE TABLE will create partition "testpk_1_prt_7_2_prt_europe" for table "testpk_1_prt_7"
NOTICE:  CREATE TABLE will create partition "testpk_1_prt_7_2_prt_other_regions" for table "testpk_1_prt_7"
NOTICE:  CREATE TABLE will create partition "testpk_1_prt_8" for table "testpk"
NOTICE:  CREATE TABLE will create partition "testpk_1_prt_8_2_prt_usa" for table "testpk_1_prt_8"
NOTICE:  CREATE TABLE will create partition "testpk_1_prt_8_2_prt_asia" for table "testpk_1_prt_8"
NOTICE:  CREATE TABLE will create partition "testpk_1_prt_8_2_prt_europe" for table "testpk_1_prt_8"
NOTICE:  CREATE TABLE will create partition "testpk_1_prt_8_2_prt_other_regions" for table "testpk_1_prt_8"
NOTICE:  CREATE TABLE will create partition "testpk_1_prt_9" for table "testpk"
NOTICE:  CREATE TABLE will create partition "testpk_1_prt_9_2_prt_usa" for table "testpk_1_prt_9"
NOTICE:  CREATE TABLE will create partition "testpk_1_prt_9_2_prt_asia" for table "testpk_1_prt_9"
NOTICE:  CREATE TABLE will create partition "testpk_1_prt_9_2_prt_europe" for table "testpk_1_prt_9"
NOTICE:  CREATE TABLE will create partition "testpk_1_prt_9_2_prt_other_regions" for table "testpk_1_prt_9"
NOTICE:  CREATE TABLE will create partition "testpk_1_prt_10" for table "testpk"
NOTICE:  CREATE TABLE will create partition "testpk_1_prt_10_2_prt_usa" for table "testpk_1_prt_10"
NOTICE:  CREATE TABLE will create partition "testpk_1_prt_10_2_prt_asia" for table "testpk_1_prt_10"
NOTICE:  CREATE TABLE will create partition "testpk_1_prt_10_2_prt_europe" for table "testpk_1_prt_10"
NOTICE:  CREATE TABLE will create partition "testpk_1_prt_10_2_prt_other_regions" for table "testpk_1_prt_10"
NOTICE:  CREATE TABLE will create partition "testpk_1_prt_11" for table "testpk"
NOTICE:  CREATE TABLE will create partition "testpk_1_prt_11_2_prt_usa" for table "testpk_1_prt_11"
NOTICE:  CREATE TABLE will create partition "testpk_1_prt_11_2_prt_asia" for table "testpk_1_prt_11"
NOTICE:  CREATE TABLE will create partition "testpk_1_prt_11_2_prt_europe" for table "testpk_1_prt_11"
NOTICE:  CREATE TABLE will create partition "testpk_1_prt_11_2_prt_other_regions" for table "testpk_1_prt_11"
NOTICE:  CREATE TABLE will create partition "testpk_1_prt_12" for table "testpk"
NOTICE:  CREATE TABLE will create partition "testpk_1_prt_12_2_prt_usa" for table "testpk_1_prt_12"
NOTICE:  CREATE TABLE will create partition "testpk_1_prt_12_2_prt_asia" for table "testpk_1_prt_12"
NOTICE:  CREATE TABLE will create partition "testpk_1_prt_12_2_prt_europe" for table "testpk_1_prt_12"
NOTICE:  CREATE TABLE will create partition "testpk_1_prt_12_2_prt_other_regions" for table "testpk_1_prt_12"
NOTICE:  CREATE TABLE will create partition "testpk_1_prt_13" for table "testpk"
NOTICE:  CREATE TABLE will create partition "testpk_1_prt_13_2_prt_usa" for table "testpk_1_prt_13"
NOTICE:  CREATE TABLE will create partition "testpk_1_prt_13_2_prt_asia" for table "testpk_1_prt_13"
NOTICE:  CREATE TABLE will create partition "testpk_1_prt_13_2_prt_europe" for table "testpk_1_prt_13"
NOTICE:  CREATE TABLE will create partition "testpk_1_prt_13_2_prt_other_regions" for table "testpk_1_prt_13"
CREATE TABLE