Signed-off-by: freemandealer <freeman.zhang1992@gmail.com>
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
create TABLE `bitmap_basic_agg` (
|
||||
create TABLE if not exists `bitmap_basic_agg` (
|
||||
`k1` int(11) NULL,
|
||||
`k2` bitmap BITMAP_UNION NULL
|
||||
)AGGREGATE KEY(`k1`)
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
create TABLE `hll_basic_agg` (
|
||||
create TABLE if not exists `hll_basic_agg` (
|
||||
`k1` int(11) NULL,
|
||||
`k2` hll HLL_UNION NULL
|
||||
)AGGREGATE KEY(`k1`)
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
CREATE TABLE `test_basic_agg` (
|
||||
CREATE TABLE IF NOT EXISTS `test_basic_agg` (
|
||||
`k1` tinyint(4) NULL COMMENT "",
|
||||
`k2` smallint(6) NULL COMMENT "",
|
||||
`k3` int(11) NULL COMMENT "",
|
||||
|
||||
@ -20,7 +20,7 @@ suite("test_bitmap_intersect", "p0") {
|
||||
def tbName = "test_bitmap_intersect"
|
||||
sql """ SET enable_vectorized_engine = FALSE; """
|
||||
sql """ DROP TABLE IF EXISTS ${tbName} """
|
||||
sql """ create table ${tbName} (tag varchar(20),user_ids bitmap bitmap_union) aggregate key (tag) distributed by hash (tag) PROPERTIES("replication_num" = "1"); """
|
||||
sql """ create table if not exists ${tbName} (tag varchar(20),user_ids bitmap bitmap_union) aggregate key (tag) distributed by hash (tag) PROPERTIES("replication_num" = "1"); """
|
||||
sql """ insert into ${tbName} values('A', to_bitmap(1)); """
|
||||
sql """ insert into ${tbName} values('A', to_bitmap(2)); """
|
||||
sql """ insert into ${tbName} values('A', to_bitmap(3)); """
|
||||
|
||||
@ -22,7 +22,7 @@ suite("test_bloom_filter") {
|
||||
def test_tb = "test_array_bloom_filter_tb"
|
||||
sql """DROP TABLE IF EXISTS ${test_tb}"""
|
||||
test {
|
||||
sql """CREATE TABLE ${test_tb} (
|
||||
sql """CREATE TABLE IF NOT EXISTS ${test_tb} (
|
||||
`k1` int(11) NOT NULL,
|
||||
`a1` array<boolean> NOT NULL
|
||||
) ENGINE=OLAP
|
||||
@ -35,7 +35,7 @@ suite("test_bloom_filter") {
|
||||
exception "not supported in bloom filter index"
|
||||
}
|
||||
|
||||
sql """CREATE TABLE ${test_tb} (
|
||||
sql """CREATE TABLE IF NOT EXISTS ${test_tb} (
|
||||
`k1` int(11) NOT NULL,
|
||||
`a1` array<boolean> NOT NULL
|
||||
) ENGINE=OLAP
|
||||
|
||||
@ -19,7 +19,7 @@ suite("test_bloom_filter_is_not_null") {
|
||||
|
||||
sql """drop TABLE if exists ${table_name}"""
|
||||
|
||||
sql """CREATE TABLE ${table_name} (
|
||||
sql """CREATE TABLE IF NOT EXISTS ${table_name} (
|
||||
`a` varchar(150) NULL
|
||||
) ENGINE=OLAP
|
||||
AGGREGATE KEY(`a`)
|
||||
|
||||
@ -18,7 +18,7 @@
|
||||
suite("test_create_table_with_bloom_filter") {
|
||||
sql """DROP TABLE IF EXISTS test_bloom_filter"""
|
||||
sql """
|
||||
CREATE TABLE test_bloom_filter(
|
||||
CREATE TABLE IF NOT EXISTS test_bloom_filter(
|
||||
tinyint_key TINYINT NOT NULL,
|
||||
smallint_key SMALLINT NOT NULL,
|
||||
int_key INT NOT NULL,
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
|
||||
suite("create_table_use_partion_policy") {
|
||||
def create_table_partion_use_not_create_policy = try_sql """
|
||||
CREATE TABLE create_table_partion_use_not_create_policy
|
||||
CREATE TABLE IF NOT EXISTS create_table_partion_use_not_create_policy
|
||||
(
|
||||
k1 DATE,
|
||||
k2 INT,
|
||||
@ -96,7 +96,7 @@ suite("create_table_use_partion_policy") {
|
||||
|
||||
// success
|
||||
def create_table_partition_use_created_policy = try_sql """
|
||||
CREATE TABLE create_table_partion_use_created_policy
|
||||
CREATE TABLE IF NOT EXISTS create_table_partion_use_created_policy
|
||||
(
|
||||
k1 DATE,
|
||||
k2 INT,
|
||||
@ -114,7 +114,7 @@ suite("create_table_use_partion_policy") {
|
||||
"""
|
||||
|
||||
def create_table_partition_use_created_policy_1 = try_sql """
|
||||
CREATE TABLE create_table_partion_use_created_policy_1
|
||||
CREATE TABLE IF NOT EXISTS create_table_partion_use_created_policy_1
|
||||
(
|
||||
k1 DATEV2,
|
||||
k2 INT,
|
||||
@ -132,7 +132,7 @@ suite("create_table_use_partion_policy") {
|
||||
"""
|
||||
|
||||
def create_table_partition_use_created_policy_2 = try_sql """
|
||||
CREATE TABLE create_table_partion_use_created_policy_2
|
||||
CREATE TABLE IF NOT EXISTS create_table_partion_use_created_policy_2
|
||||
(
|
||||
k1 DATETIMEV2(3),
|
||||
k2 INT,
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
|
||||
suite("create_table_use_policy") {
|
||||
def create_table_use_not_create_policy = try_sql """
|
||||
CREATE TABLE create_table_use_not_create_policy
|
||||
CREATE TABLE IF NOT EXISTS create_table_use_not_create_policy
|
||||
(
|
||||
k1 BIGINT,
|
||||
k2 LARGEINT,
|
||||
|
||||
@ -34,7 +34,7 @@ suite("use_default_storage_policy") {
|
||||
|
||||
if (!storage_exist.call("default_storage_policy")) {
|
||||
def create_table_use_default_policy_but_not_set_default_policy_result = try_sql """
|
||||
CREATE TABLE use_default_storage_policy
|
||||
CREATE TABLE IF NOT EXISTS use_default_storage_policy
|
||||
( k1 DATE, k2 INT, V1 VARCHAR(2048) REPLACE )
|
||||
PARTITION BY RANGE (k1)
|
||||
(
|
||||
@ -67,7 +67,7 @@ suite("use_default_storage_policy") {
|
||||
}
|
||||
|
||||
def create_table_use_default_policy_has_set_default_policy_result = try_sql """
|
||||
CREATE TABLE use_default_storage_policy
|
||||
CREATE TABLE IF NOT EXISTS use_default_storage_policy
|
||||
( k1 DATE, k2 INT, V1 VARCHAR(2048) REPLACE )
|
||||
PARTITION BY RANGE (k1)
|
||||
(
|
||||
|
||||
@ -59,7 +59,7 @@ suite("test_compaction_agg_keys") {
|
||||
|
||||
sql """ DROP TABLE IF EXISTS ${tableName} """
|
||||
sql """
|
||||
CREATE TABLE ${tableName} (
|
||||
CREATE TABLE IF NOT EXISTS ${tableName} (
|
||||
`user_id` LARGEINT NOT NULL COMMENT "用户id",
|
||||
`date` DATE NOT NULL COMMENT "数据灌入日期时间",
|
||||
`datev2` DATEV2 NOT NULL COMMENT "数据灌入日期时间",
|
||||
|
||||
@ -59,7 +59,7 @@ suite("test_compaction_dup_keys") {
|
||||
|
||||
sql """ DROP TABLE IF EXISTS ${tableName} """
|
||||
sql """
|
||||
CREATE TABLE ${tableName} (
|
||||
CREATE TABLE IF NOT EXISTS ${tableName} (
|
||||
`user_id` LARGEINT NOT NULL COMMENT "用户id",
|
||||
`date` DATE NOT NULL COMMENT "数据灌入日期时间",
|
||||
`datev2` DATEV2 NOT NULL COMMENT "数据灌入日期时间",
|
||||
|
||||
@ -59,7 +59,7 @@ suite("test_compaction_uniq_keys") {
|
||||
|
||||
sql """ DROP TABLE IF EXISTS ${tableName} """
|
||||
sql """
|
||||
CREATE TABLE ${tableName} (
|
||||
CREATE TABLE IF NOT EXISTS ${tableName} (
|
||||
`user_id` LARGEINT NOT NULL COMMENT "用户id",
|
||||
`date` DATE NOT NULL COMMENT "数据灌入日期时间",
|
||||
`datev2` DATEV2 NOT NULL COMMENT "数据灌入日期时间",
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
sql """ DROP TABLE IF EXISTS wftest1 """
|
||||
sql """ DROP TABLE IF EXISTS wftest2 """
|
||||
sql """
|
||||
CREATE TABLE `wftest1` (
|
||||
CREATE TABLE IF NOT EXISTS `wftest1` (
|
||||
`aa` varchar(200) NULL COMMENT "",
|
||||
`bb` int NULL COMMENT ""
|
||||
) ENGINE=OLAP
|
||||
@ -32,7 +32,7 @@
|
||||
)
|
||||
"""
|
||||
sql """
|
||||
CREATE TABLE `wftest2` (
|
||||
CREATE TABLE IF NOT EXISTS `wftest2` (
|
||||
`cc` varchar(200) NULL COMMENT "",
|
||||
`dd` int NULL COMMENT ""
|
||||
) ENGINE=OLAP
|
||||
|
||||
@ -22,11 +22,11 @@ suite("test_crossjoin_inlineview_slot") {
|
||||
sql "DROP TABLE IF EXISTS t3;"
|
||||
sql "DROP TABLE IF EXISTS t4;"
|
||||
|
||||
sql """create table t0 (id0 int) engine=olap distributed by hash(id0) buckets 1 properties("replication_num"="1");"""
|
||||
sql """create table t1 (id1 int) engine=olap distributed by hash(id1) buckets 1 properties("replication_num"="1");"""
|
||||
sql """create table t2 (id2 tinyint(4), status tinyint(4)) engine=olap distributed by hash(id2) buckets 1 properties("replication_num"="1");"""
|
||||
sql """create table t3 (id3 int) engine=olap distributed by hash(id3) buckets 1 properties("replication_num"="1");"""
|
||||
sql """create table t4 (id4 int) engine=olap distributed by hash(id4) buckets 1 properties("replication_num"="1");"""
|
||||
sql """create table if not exists t0 (id0 int) engine=olap distributed by hash(id0) buckets 1 properties("replication_num"="1");"""
|
||||
sql """create table if not exists t1 (id1 int) engine=olap distributed by hash(id1) buckets 1 properties("replication_num"="1");"""
|
||||
sql """create table if not exists t2 (id2 tinyint(4), status tinyint(4)) engine=olap distributed by hash(id2) buckets 1 properties("replication_num"="1");"""
|
||||
sql """create table if not exists t3 (id3 int) engine=olap distributed by hash(id3) buckets 1 properties("replication_num"="1");"""
|
||||
sql """create table if not exists t4 (id4 int) engine=olap distributed by hash(id4) buckets 1 properties("replication_num"="1");"""
|
||||
|
||||
sql "insert into t0 values (1);"
|
||||
sql "insert into t1 values (1);"
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
sql """ DROP TABLE IF EXISTS bm """
|
||||
sql """ DROP TABLE IF EXISTS gp """
|
||||
sql """
|
||||
CREATE TABLE `bm` (
|
||||
CREATE TABLE IF NOT EXISTS `bm` (
|
||||
`id` bigint(20) NULL,
|
||||
`hid` smallint(6) NULL,
|
||||
`bitmap` bitmap BITMAP_UNION NULL
|
||||
@ -34,7 +34,7 @@
|
||||
)
|
||||
"""
|
||||
sql """
|
||||
CREATE TABLE `gp` (
|
||||
CREATE TABLE IF NOT EXISTS `gp` (
|
||||
`id` varchar(128) NOT NULL,
|
||||
`uh` bigint(20) NOT NULL,
|
||||
`uid` varchar(128) MAX NULL,
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
sql """ DROP TABLE IF EXISTS dim_comp_tags """
|
||||
sql """ DROP TABLE IF EXISTS ods_comp_info_q """
|
||||
sql """
|
||||
CREATE TABLE `dim_comp_tags`
|
||||
CREATE TABLE IF NOT EXISTS `dim_comp_tags`
|
||||
(
|
||||
`stock_code` varchar(100) NULL COMMENT "",
|
||||
`first_tag` varchar(100) NULL COMMENT "",
|
||||
@ -35,7 +35,7 @@
|
||||
);
|
||||
"""
|
||||
sql """
|
||||
CREATE TABLE `ods_comp_info_q`
|
||||
CREATE TABLE IF NOT EXISTS `ods_comp_info_q`
|
||||
(
|
||||
`stock_code` varchar(100) NULL COMMENT "",
|
||||
`data_time` date NOT NULL COMMENT "",
|
||||
|
||||
@ -32,7 +32,7 @@ The same resolve error occurs when re-analyze v2.
|
||||
def viewName = "v_pushdown_pred_to_view";
|
||||
sql """ DROP TABLE IF EXISTS ${tableName} """
|
||||
sql """
|
||||
CREATE TABLE ${tableName} (
|
||||
CREATE TABLE IF NOT EXISTS ${tableName} (
|
||||
`id` int
|
||||
) ENGINE=OLAP
|
||||
AGGREGATE KEY(`id`)
|
||||
|
||||
@ -18,7 +18,7 @@
|
||||
suite("test_union_with_subquery") {
|
||||
sql """ DROP TABLE IF EXISTS A_union; """
|
||||
sql """
|
||||
create table A_union ( a int not null, b varchar(10) null )ENGINE=OLAP
|
||||
create table if not exists A_union ( a int not null, b varchar(10) null )ENGINE=OLAP
|
||||
DISTRIBUTED BY HASH(a) BUCKETS 1
|
||||
PROPERTIES (
|
||||
"replication_allocation" = "tag.location.default: 1",
|
||||
|
||||
@ -27,7 +27,7 @@ Type before bug fix: varchar(*)
|
||||
|
||||
sql """ DROP TABLE IF EXISTS ${tableName} """
|
||||
sql """
|
||||
CREATE TABLE ${tableName} (
|
||||
CREATE TABLE IF NOT EXISTS ${tableName} (
|
||||
`id` int,
|
||||
`name` varchar(32)
|
||||
) ENGINE=OLAP
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
|
||||
sql """ DROP TABLE IF EXISTS ${tableName} """
|
||||
sql """
|
||||
CREATE TABLE ${tableName} (
|
||||
CREATE TABLE IF NOT EXISTS ${tableName} (
|
||||
`a` datetime NOT NULL,
|
||||
`b` date NOT NULL,
|
||||
`c` int(11) NOT NULL,
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
|
||||
sql """ DROP TABLE IF EXISTS ${tableName} """
|
||||
sql """
|
||||
create table ${tableName} (tag varchar(20),user_ids bitmap bitmap_union) aggregate key (tag)
|
||||
create table if not exists ${tableName} (tag varchar(20),user_ids bitmap bitmap_union) aggregate key (tag)
|
||||
distributed by hash (tag) PROPERTIES("replication_num" = "1");
|
||||
"""
|
||||
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
|
||||
sql """ DROP TABLE IF EXISTS ${tableName} """
|
||||
sql """
|
||||
create table ${tableName} (tag varchar(20),user_ids bitmap bitmap_union) aggregate key (tag)
|
||||
create table if not exists ${tableName} (tag varchar(20),user_ids bitmap bitmap_union) aggregate key (tag)
|
||||
distributed by hash (tag) PROPERTIES("replication_num" = "1");
|
||||
"""
|
||||
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
sql """ DROP TABLE IF EXISTS ${colocateTableName} """
|
||||
sql """ DROP TABLE IF EXISTS ${rightTable} """
|
||||
sql """
|
||||
CREATE TABLE `${colocateTableName}` (
|
||||
CREATE TABLE IF NOT EXISTS `${colocateTableName}` (
|
||||
`c1` int(11) NULL COMMENT "",
|
||||
`c2` int(11) NULL COMMENT "",
|
||||
`c3` int(11) NULL COMMENT ""
|
||||
@ -42,7 +42,7 @@
|
||||
)
|
||||
"""
|
||||
sql """
|
||||
CREATE TABLE `${rightTable}` (
|
||||
CREATE TABLE IF NOT EXISTS `${rightTable}` (
|
||||
`k1` int(11) NOT NULL COMMENT "",
|
||||
`v1` int(11) NOT NULL COMMENT ""
|
||||
) ENGINE=OLAP
|
||||
|
||||
@ -20,7 +20,7 @@ suite("test_current_timestamp") {
|
||||
|
||||
sql """ DROP TABLE IF EXISTS ${tableName} """
|
||||
sql """
|
||||
CREATE TABLE ${tableName}
|
||||
CREATE TABLE IF NOT EXISTS ${tableName}
|
||||
(
|
||||
id TINYINT,
|
||||
name CHAR(10) NOT NULL DEFAULT "zs",
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
|
||||
sql """ DROP TABLE IF EXISTS ${tableName} """
|
||||
sql """
|
||||
CREATE TABLE ${tableName} (
|
||||
CREATE TABLE IF NOT EXISTS ${tableName} (
|
||||
`a` int,
|
||||
`b` char(10)
|
||||
) ENGINE=OLAP
|
||||
|
||||
@ -21,7 +21,7 @@ suite("test_first_value_window") {
|
||||
|
||||
sql """ DROP TABLE IF EXISTS ${tableName} """
|
||||
sql """
|
||||
CREATE TABLE ${tableName} (
|
||||
CREATE TABLE IF NOT EXISTS ${tableName} (
|
||||
`myday` INT,
|
||||
`time_col` VARCHAR(40) NOT NULL,
|
||||
`state` INT
|
||||
|
||||
@ -22,7 +22,7 @@ suite("test_group_by_constant") {
|
||||
"""
|
||||
|
||||
sql """
|
||||
CREATE TABLE `table_group_by_constant` (
|
||||
CREATE TABLE IF NOT EXISTS `table_group_by_constant` (
|
||||
`inc_day` date NULL
|
||||
) ENGINE=OLAP
|
||||
UNIQUE KEY(`inc_day`)
|
||||
|
||||
@ -29,7 +29,7 @@ suite("test_join_should_not_reorder") {
|
||||
"""
|
||||
|
||||
sql """
|
||||
CREATE TABLE `reorder_a` (
|
||||
CREATE TABLE IF NOT EXISTS `reorder_a` (
|
||||
`id` varchar(10),
|
||||
`name` varchar(10),
|
||||
`dt` date
|
||||
@ -43,7 +43,7 @@ suite("test_join_should_not_reorder") {
|
||||
"""
|
||||
|
||||
sql """
|
||||
CREATE TABLE `reorder_b` (
|
||||
CREATE TABLE IF NOT EXISTS `reorder_b` (
|
||||
`id` varchar(10),
|
||||
`name` varchar(10),
|
||||
`dt1` date,
|
||||
@ -58,7 +58,7 @@ suite("test_join_should_not_reorder") {
|
||||
"""
|
||||
|
||||
sql """
|
||||
CREATE TABLE `reorder_c` (
|
||||
CREATE TABLE IF NOT EXISTS `reorder_c` (
|
||||
`id` varchar(10),
|
||||
`name` varchar(10),
|
||||
`dt` date
|
||||
|
||||
@ -25,7 +25,7 @@ suite("test_join_with_projection") {
|
||||
"""
|
||||
|
||||
sql """
|
||||
create table test_join_with_projection_outerjoin_A ( a int not null )
|
||||
create table if not exists test_join_with_projection_outerjoin_A ( a int not null )
|
||||
ENGINE=OLAP
|
||||
DISTRIBUTED BY HASH(a) BUCKETS 1
|
||||
PROPERTIES (
|
||||
@ -36,7 +36,7 @@ suite("test_join_with_projection") {
|
||||
"""
|
||||
|
||||
sql """
|
||||
create table test_join_with_projection_outerjoin_B ( a int not null )
|
||||
create table if not exists test_join_with_projection_outerjoin_B ( a int not null )
|
||||
ENGINE=OLAP
|
||||
DISTRIBUTED BY HASH(a) BUCKETS 1
|
||||
PROPERTIES (
|
||||
|
||||
@ -21,7 +21,7 @@ suite("test_lag_lead_window") {
|
||||
|
||||
sql """ DROP TABLE IF EXISTS ${tableName} """
|
||||
sql """
|
||||
CREATE TABLE ${tableName} ( `aa` varchar(10) NULL COMMENT "", `bb` text NULL COMMENT "", `cc` text NULL COMMENT "" )
|
||||
CREATE TABLE IF NOT EXISTS ${tableName} ( `aa` varchar(10) NULL COMMENT "", `bb` text NULL COMMENT "", `cc` text NULL COMMENT "" )
|
||||
ENGINE=OLAP UNIQUE KEY(`aa`) DISTRIBUTED BY HASH(`aa`) BUCKETS 3
|
||||
PROPERTIES ( "replication_allocation" = "tag.location.default: 1", "in_memory" = "false", "storage_format" = "V2" );
|
||||
"""
|
||||
|
||||
@ -21,7 +21,7 @@ suite("test_last_value_window") {
|
||||
|
||||
sql """ DROP TABLE IF EXISTS ${tableName} """
|
||||
sql """
|
||||
CREATE TABLE ${tableName} (
|
||||
CREATE TABLE IF NOT EXISTS ${tableName} (
|
||||
`myday` INT,
|
||||
`time_col` VARCHAR(40) NOT NULL,
|
||||
`state` INT
|
||||
|
||||
@ -21,7 +21,7 @@ suite("test_like_predicate_with_nullable") {
|
||||
|
||||
sql """ DROP TABLE IF EXISTS ${tableName} """
|
||||
sql """
|
||||
CREATE TABLE ${tableName} (
|
||||
CREATE TABLE IF NOT EXISTS ${tableName} (
|
||||
`id` INT,
|
||||
`url` STRING NULL
|
||||
) ENGINE=OLAP
|
||||
|
||||
@ -21,7 +21,7 @@ suite("test_min_max_window") {
|
||||
|
||||
sql """ DROP TABLE IF EXISTS ${tableName} """
|
||||
sql """
|
||||
CREATE TABLE ${tableName} (
|
||||
CREATE TABLE IF NOT EXISTS ${tableName} (
|
||||
`myday` INT,
|
||||
`time_col` VARCHAR(40) NOT NULL,
|
||||
`state` INT
|
||||
|
||||
@ -21,7 +21,7 @@ suite("test_no_grouping_window") {
|
||||
"""
|
||||
|
||||
sql """
|
||||
create table test_no_grouping_window_outerjoin_A ( a int not null )
|
||||
create table if not exists test_no_grouping_window_outerjoin_A ( a int not null )
|
||||
ENGINE=OLAP
|
||||
DISTRIBUTED BY HASH(a) BUCKETS 1
|
||||
PROPERTIES (
|
||||
|
||||
@ -21,7 +21,7 @@ suite("test_null_predicate") {
|
||||
|
||||
sql """ DROP TABLE IF EXISTS ${tableName} """
|
||||
sql """
|
||||
CREATE TABLE ${tableName} (
|
||||
CREATE TABLE IF NOT EXISTS ${tableName} (
|
||||
`id` INT,
|
||||
`name` STRING NULL
|
||||
) ENGINE=OLAP
|
||||
|
||||
@ -29,7 +29,7 @@ suite("test_outer_join_sort") {
|
||||
"""
|
||||
|
||||
sql """
|
||||
create table test_test_outer_join_sort_outerjoin_A ( a int not null )
|
||||
create table if not exists test_test_outer_join_sort_outerjoin_A ( a int not null )
|
||||
ENGINE=OLAP
|
||||
DISTRIBUTED BY HASH(a) BUCKETS 1
|
||||
PROPERTIES (
|
||||
@ -40,7 +40,7 @@ suite("test_outer_join_sort") {
|
||||
"""
|
||||
|
||||
sql """
|
||||
create table test_outer_join_sort_outerjoin_B ( a int not null )
|
||||
create table if not exists test_outer_join_sort_outerjoin_B ( a int not null )
|
||||
ENGINE=OLAP
|
||||
DISTRIBUTED BY HASH(a) BUCKETS 1
|
||||
PROPERTIES (
|
||||
@ -51,7 +51,7 @@ suite("test_outer_join_sort") {
|
||||
"""
|
||||
|
||||
sql """
|
||||
create table outerjoin_C ( a int not null )
|
||||
create table if not exists outerjoin_C ( a int not null )
|
||||
ENGINE=OLAP
|
||||
DISTRIBUTED BY HASH(a) BUCKETS 1
|
||||
PROPERTIES (
|
||||
|
||||
@ -33,7 +33,7 @@ suite("test_outer_join_with_cross_join") {
|
||||
"""
|
||||
|
||||
sql """
|
||||
create table test_outer_join_with_cross_join_outerjoin_A ( a int not null )
|
||||
create table if not exists test_outer_join_with_cross_join_outerjoin_A ( a int not null )
|
||||
ENGINE=OLAP
|
||||
DISTRIBUTED BY HASH(a) BUCKETS 1
|
||||
PROPERTIES (
|
||||
@ -44,7 +44,7 @@ suite("test_outer_join_with_cross_join") {
|
||||
"""
|
||||
|
||||
sql """
|
||||
create table test_outer_join_with_cross_join_outerjoin_B ( a int not null )
|
||||
create table if not exists test_outer_join_with_cross_join_outerjoin_B ( a int not null )
|
||||
ENGINE=OLAP
|
||||
DISTRIBUTED BY HASH(a) BUCKETS 1
|
||||
PROPERTIES (
|
||||
@ -55,7 +55,7 @@ suite("test_outer_join_with_cross_join") {
|
||||
"""
|
||||
|
||||
sql """
|
||||
create table test_outer_join_with_cross_join_outerjoin_C ( a int not null )
|
||||
create table if not exists test_outer_join_with_cross_join_outerjoin_C ( a int not null )
|
||||
ENGINE=OLAP
|
||||
DISTRIBUTED BY HASH(a) BUCKETS 1
|
||||
PROPERTIES (
|
||||
@ -66,7 +66,7 @@ suite("test_outer_join_with_cross_join") {
|
||||
"""
|
||||
|
||||
sql """
|
||||
create table test_outer_join_with_cross_join_outerjoin_D ( a int not null )
|
||||
create table if not exists test_outer_join_with_cross_join_outerjoin_D ( a int not null )
|
||||
ENGINE=OLAP
|
||||
DISTRIBUTED BY HASH(a) BUCKETS 1
|
||||
PROPERTIES (
|
||||
|
||||
@ -25,7 +25,7 @@ suite("test_outer_join_with_empty_node") {
|
||||
"""
|
||||
|
||||
sql """
|
||||
CREATE TABLE `t1` (
|
||||
CREATE TABLE IF NOT EXISTS `t1` (
|
||||
`k1` int(11) NULL COMMENT "",
|
||||
`k2` int(11) NULL COMMENT ""
|
||||
) ENGINE=OLAP
|
||||
@ -40,7 +40,7 @@ suite("test_outer_join_with_empty_node") {
|
||||
"""
|
||||
|
||||
sql """
|
||||
CREATE TABLE `t2` (
|
||||
CREATE TABLE IF NOT EXISTS `t2` (
|
||||
`j1` int(11) NULL COMMENT "",
|
||||
`j2` int(11) NULL COMMENT ""
|
||||
) ENGINE=OLAP
|
||||
|
||||
@ -25,7 +25,7 @@ suite("test_outer_join_with_grouping") {
|
||||
"""
|
||||
|
||||
sql """
|
||||
CREATE TABLE `table_a` (
|
||||
CREATE TABLE IF NOT EXISTS `table_a` (
|
||||
`id` bigint(20) NOT NULL COMMENT '',
|
||||
`moid` int(11) REPLACE_IF_NOT_NULL NULL COMMENT '',
|
||||
`sid` int(11) REPLACE_IF_NOT_NULL NULL COMMENT ''
|
||||
@ -42,7 +42,7 @@ suite("test_outer_join_with_grouping") {
|
||||
"""
|
||||
|
||||
sql """
|
||||
CREATE TABLE `table_b` (
|
||||
CREATE TABLE IF NOT EXISTS `table_b` (
|
||||
`id` bigint(20) NOT NULL COMMENT '',
|
||||
`name` varchar(192) NOT NULL COMMENT ''
|
||||
) ENGINE=OLAP
|
||||
|
||||
@ -29,7 +29,7 @@ suite("test_outer_join_with_order_by") {
|
||||
"""
|
||||
|
||||
sql """
|
||||
create table test_outer_join_with_order_by_outer_join_A ( a int not null )
|
||||
create table if not exists test_outer_join_with_order_by_outer_join_A ( a int not null )
|
||||
ENGINE=OLAP
|
||||
DISTRIBUTED BY HASH(a) BUCKETS 1
|
||||
PROPERTIES (
|
||||
@ -40,7 +40,7 @@ suite("test_outer_join_with_order_by") {
|
||||
"""
|
||||
|
||||
sql """
|
||||
create table test_outer_join_with_order_by_outer_join_B ( a int not null )
|
||||
create table if not exists test_outer_join_with_order_by_outer_join_B ( a int not null )
|
||||
ENGINE=OLAP
|
||||
DISTRIBUTED BY HASH(a) BUCKETS 1
|
||||
PROPERTIES (
|
||||
@ -51,7 +51,7 @@ suite("test_outer_join_with_order_by") {
|
||||
"""
|
||||
|
||||
sql """
|
||||
create table test_outer_join_with_order_by_outer_join_C ( a int not null )
|
||||
create table if not exists test_outer_join_with_order_by_outer_join_C ( a int not null )
|
||||
ENGINE=OLAP
|
||||
DISTRIBUTED BY HASH(a) BUCKETS 1
|
||||
PROPERTIES (
|
||||
|
||||
@ -21,7 +21,7 @@ suite("test_outer_join_with_with_window_function") {
|
||||
"""
|
||||
|
||||
sql """
|
||||
CREATE TABLE `dwd_online_detail` (
|
||||
CREATE TABLE IF NOT EXISTS `dwd_online_detail` (
|
||||
`logout_time` datetime NOT NULL DEFAULT "9999-12-30 00:00:00",
|
||||
`login_time` datetime NOT NULL DEFAULT "9999-12-30 00:00:00",
|
||||
`game_code` varchar(50) NOT NULL DEFAULT "-",
|
||||
@ -50,7 +50,7 @@ suite("test_outer_join_with_with_window_function") {
|
||||
"""
|
||||
|
||||
sql """
|
||||
CREATE TABLE `ods_logout` (
|
||||
CREATE TABLE IF NOT EXISTS `ods_logout` (
|
||||
`day` date NULL COMMENT "",
|
||||
`game` varchar(500) NULL COMMENT "",
|
||||
`plat` varchar(500) NULL COMMENT "",
|
||||
@ -92,7 +92,7 @@ suite("test_outer_join_with_with_window_function") {
|
||||
"""
|
||||
|
||||
sql """
|
||||
CREATE TABLE `dim_account_userid_mapping` (
|
||||
CREATE TABLE IF NOT EXISTS `dim_account_userid_mapping` (
|
||||
`end_time` datetime NOT NULL DEFAULT "9999-12-30 00:00:00",
|
||||
`start_time` datetime NOT NULL DEFAULT "9999-12-30 00:00:00",
|
||||
`game_code` varchar(50) NOT NULL,
|
||||
@ -119,7 +119,7 @@ suite("test_outer_join_with_with_window_function") {
|
||||
"""
|
||||
|
||||
sql """
|
||||
CREATE TABLE `ods_login` (
|
||||
CREATE TABLE IF NOT EXISTS `ods_login` (
|
||||
`day` date NULL COMMENT "",
|
||||
`game` varchar(500) NULL COMMENT "",
|
||||
`plat` varchar(500) NULL COMMENT "",
|
||||
|
||||
@ -21,7 +21,7 @@ suite("test_outer_join_with_window_function_datev2") {
|
||||
"""
|
||||
|
||||
sql """
|
||||
CREATE TABLE `dwd_online_detail` (
|
||||
CREATE TABLE IF NOT EXISTS `dwd_online_detail` (
|
||||
`logout_time` datetimev2 NOT NULL DEFAULT "9999-12-30 00:00:00",
|
||||
`login_time` datetimev2 NOT NULL DEFAULT "9999-12-30 00:00:00",
|
||||
`game_code` varchar(50) NOT NULL DEFAULT "-",
|
||||
@ -50,7 +50,7 @@ suite("test_outer_join_with_window_function_datev2") {
|
||||
"""
|
||||
|
||||
sql """
|
||||
CREATE TABLE `ods_logout` (
|
||||
CREATE TABLE IF NOT EXISTS `ods_logout` (
|
||||
`day` datev2 NULL COMMENT "",
|
||||
`game` varchar(500) NULL COMMENT "",
|
||||
`plat` varchar(500) NULL COMMENT "",
|
||||
@ -92,7 +92,7 @@ suite("test_outer_join_with_window_function_datev2") {
|
||||
"""
|
||||
|
||||
sql """
|
||||
CREATE TABLE `dim_account_userid_mapping` (
|
||||
CREATE TABLE IF NOT EXISTS `dim_account_userid_mapping` (
|
||||
`end_time` datetimev2 NOT NULL DEFAULT "9999-12-30 00:00:00",
|
||||
`start_time` datetimev2 NOT NULL DEFAULT "9999-12-30 00:00:00",
|
||||
`game_code` varchar(50) NOT NULL,
|
||||
@ -119,7 +119,7 @@ suite("test_outer_join_with_window_function_datev2") {
|
||||
"""
|
||||
|
||||
sql """
|
||||
CREATE TABLE `ods_login` (
|
||||
CREATE TABLE IF NOT EXISTS `ods_login` (
|
||||
`day` datev2 NULL COMMENT "",
|
||||
`game` varchar(500) NULL COMMENT "",
|
||||
`plat` varchar(500) NULL COMMENT "",
|
||||
|
||||
@ -18,7 +18,7 @@
|
||||
suite("test_pushdown_constant") {
|
||||
sql """ DROP TABLE IF EXISTS `test_pushdown_constant` """
|
||||
sql """
|
||||
CREATE TABLE `test_pushdown_constant` (
|
||||
CREATE TABLE IF NOT EXISTS `test_pushdown_constant` (
|
||||
`id` int
|
||||
) ENGINE=OLAP
|
||||
AGGREGATE KEY(`id`)
|
||||
|
||||
@ -19,7 +19,7 @@ suite("test_select_stddev_variance_window") {
|
||||
|
||||
sql """ DROP TABLE IF EXISTS ${tableName} """
|
||||
sql """
|
||||
CREATE TABLE `${tableName}` (
|
||||
CREATE TABLE IF NOT EXISTS `${tableName}` (
|
||||
`k1` tinyint(4) NULL COMMENT "",
|
||||
`k2` smallint(6) NULL COMMENT "",
|
||||
`k3` int(11) NULL COMMENT "",
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
|
||||
sql """ DROP TABLE IF EXISTS ${tableName} """
|
||||
sql """
|
||||
CREATE TABLE ${tableName} ( `aa` int NULL COMMENT "", `bb` decimal(27,9) NULL COMMENT "" )
|
||||
CREATE TABLE IF NOT EXISTS ${tableName} ( `aa` int NULL COMMENT "", `bb` decimal(27,9) NULL COMMENT "" )
|
||||
ENGINE=OLAP UNIQUE KEY(`aa`) DISTRIBUTED BY HASH(`aa`) BUCKETS 3
|
||||
PROPERTIES ( "replication_allocation" = "tag.location.default: 1", "in_memory" = "false", "storage_format" = "V2" );
|
||||
"""
|
||||
|
||||
@ -22,7 +22,7 @@ suite("test_sort") {
|
||||
"""
|
||||
|
||||
sql """
|
||||
CREATE TABLE `test_sort_table` (
|
||||
CREATE TABLE IF NOT EXISTS `test_sort_table` (
|
||||
`p_partkey` int(11) NOT NULL COMMENT "",
|
||||
`p_name` varchar(23) NOT NULL COMMENT "",
|
||||
`p_mfgr` varchar(7) NOT NULL COMMENT "",
|
||||
|
||||
@ -21,7 +21,7 @@ suite("test_string_pad_function") {
|
||||
"""
|
||||
|
||||
sql """
|
||||
create table table_pad (
|
||||
create table if not exists table_pad (
|
||||
a int not null,
|
||||
b varchar(10) not null
|
||||
)
|
||||
|
||||
@ -21,7 +21,7 @@ suite("test_subquery_with_agg") {
|
||||
"""
|
||||
|
||||
sql """
|
||||
CREATE TABLE agg_subquery_table
|
||||
CREATE TABLE IF NOT EXISTS agg_subquery_table
|
||||
(
|
||||
gid varchar(50) NOT NULL,
|
||||
num int(11) SUM NOT NULL DEFAULT "0",
|
||||
|
||||
@ -79,7 +79,7 @@ suite("test_csv_with_header") {
|
||||
|
||||
sql "DROP TABLE IF EXISTS ${testTable}"
|
||||
def result1 = sql """
|
||||
CREATE TABLE `${testTable}` (
|
||||
CREATE TABLE IF NOT EXISTS `${testTable}` (
|
||||
`event_day` date NULL COMMENT "",
|
||||
`event_day1` datev2 NULL COMMENT "",
|
||||
`event_day2` datetimev2 NULL COMMENT "",
|
||||
|
||||
@ -22,7 +22,7 @@ suite("test_dup_tab_basic_int") {
|
||||
sql "drop table if exists ${table1}"
|
||||
|
||||
sql """
|
||||
CREATE TABLE `${table1}` (
|
||||
CREATE TABLE IF NOT EXISTS `${table1}` (
|
||||
`siteid` int(11) NOT NULL COMMENT "",
|
||||
`citycode` int(11) NOT NULL COMMENT "",
|
||||
`userid` int(11) NOT NULL COMMENT "",
|
||||
|
||||
@ -22,7 +22,7 @@ suite("test_dup_tab_basic_int_nullable") {
|
||||
sql "drop table if exists ${table1}"
|
||||
|
||||
sql """
|
||||
CREATE TABLE `${table1}` (
|
||||
CREATE TABLE IF NOT EXISTS `${table1}` (
|
||||
`siteid` int(11) NULL COMMENT "",
|
||||
`citycode` int(11) NULL COMMENT "",
|
||||
`userid` int(11) NULL COMMENT "",
|
||||
|
||||
@ -23,7 +23,7 @@ suite("test_dup_tab_basic_varchar") {
|
||||
sql "drop table if exists ${table1}"
|
||||
|
||||
sql """
|
||||
CREATE TABLE `${table1}` (
|
||||
CREATE TABLE IF NOT EXISTS `${table1}` (
|
||||
`city` varchar(20) NOT NULL COMMENT "",
|
||||
`name` varchar(20) NOT NULL COMMENT "",
|
||||
`addr` varchar(20) NOT NULL COMMENT "",
|
||||
|
||||
@ -22,7 +22,7 @@ suite("test_dup_tab_basic_varchar_nullable") {
|
||||
sql "drop table if exists ${table1}"
|
||||
|
||||
sql """
|
||||
CREATE TABLE `${table1}` (
|
||||
CREATE TABLE IF NOT EXISTS `${table1}` (
|
||||
`city` varchar(20) NULL COMMENT "",
|
||||
`name` varchar(20) NULL COMMENT "",
|
||||
`addr` varchar(20) NULL COMMENT "",
|
||||
|
||||
@ -22,7 +22,7 @@ suite("test_dup_tab_char") {
|
||||
sql "drop table if exists ${table1}"
|
||||
|
||||
sql """
|
||||
CREATE TABLE `${table1}` (
|
||||
CREATE TABLE IF NOT EXISTS `${table1}` (
|
||||
`city` char(20) NOT NULL COMMENT "",
|
||||
`name` char(20) NOT NULL COMMENT "",
|
||||
`addr` char(20) NOT NULL COMMENT "",
|
||||
|
||||
@ -22,7 +22,7 @@ suite("test_dup_tab_char_nullable") {
|
||||
sql "drop table if exists ${table1}"
|
||||
|
||||
sql """
|
||||
CREATE TABLE `${table1}` (
|
||||
CREATE TABLE IF NOT EXISTS `${table1}` (
|
||||
`city` char(20) NULL COMMENT "",
|
||||
`name` char(20) NULL COMMENT "",
|
||||
`addr` char(20) NULL COMMENT "",
|
||||
|
||||
@ -22,7 +22,7 @@ suite("test_dup_tab_date") {
|
||||
sql "drop table if exists ${table1}"
|
||||
|
||||
sql """
|
||||
CREATE TABLE `${table1}` (
|
||||
CREATE TABLE IF NOT EXISTS `${table1}` (
|
||||
`siteid` int(11) NOT NULL COMMENT "",
|
||||
`date1` date NOT NULL COMMENT "",
|
||||
`date2` date NOT NULL COMMENT "",
|
||||
|
||||
@ -22,7 +22,7 @@ suite("test_dup_tab_date_nullable") {
|
||||
sql "drop table if exists ${table1}"
|
||||
|
||||
sql """
|
||||
CREATE TABLE `${table1}` (
|
||||
CREATE TABLE IF NOT EXISTS `${table1}` (
|
||||
`siteid` int(11) NULL COMMENT "",
|
||||
`date1` date NULL COMMENT "",
|
||||
`date2` date NULL COMMENT "",
|
||||
|
||||
@ -22,7 +22,7 @@ suite("test_dup_tab_datetime") {
|
||||
sql "drop table if exists ${table1}"
|
||||
|
||||
sql """
|
||||
CREATE TABLE `${table1}` (
|
||||
CREATE TABLE IF NOT EXISTS `${table1}` (
|
||||
`siteid` int(11) NOT NULL COMMENT "",
|
||||
`datetime1` datetime NOT NULL COMMENT "",
|
||||
`datetime2` datetime NOT NULL COMMENT "",
|
||||
|
||||
@ -22,7 +22,7 @@ suite("test_dup_tab_datetime_nullable") {
|
||||
sql "drop table if exists ${table1}"
|
||||
|
||||
sql """
|
||||
CREATE TABLE `${table1}` (
|
||||
CREATE TABLE IF NOT EXISTS `${table1}` (
|
||||
`siteid` int(11) NULL COMMENT "",
|
||||
`datetime1` datetime NULL COMMENT "",
|
||||
`datetime2` datetime NULL COMMENT "",
|
||||
|
||||
@ -22,7 +22,7 @@ suite("test_dup_tab_decimal") {
|
||||
sql "drop table if exists ${table1}"
|
||||
|
||||
sql """
|
||||
CREATE TABLE `${table1}` (
|
||||
CREATE TABLE IF NOT EXISTS `${table1}` (
|
||||
`siteid` decimal(10, 5) NOT NULL COMMENT "",
|
||||
`citycode` decimal(10, 5) NOT NULL COMMENT "",
|
||||
`userid` decimal(10, 5) NOT NULL COMMENT "",
|
||||
|
||||
@ -22,7 +22,7 @@ suite("test_dup_tab_decimal_nullable") {
|
||||
sql "drop table if exists ${table1}"
|
||||
|
||||
sql """
|
||||
CREATE TABLE `${table1}` (
|
||||
CREATE TABLE IF NOT EXISTS `${table1}` (
|
||||
`siteid` decimal(10, 5) NULL COMMENT "",
|
||||
`citycode` decimal(10, 5) NULL COMMENT "",
|
||||
`userid` decimal(10, 5) NULL COMMENT "",
|
||||
|
||||
@ -23,7 +23,7 @@ suite("test_dup_tab_mixed_type") {
|
||||
|
||||
sql """
|
||||
|
||||
CREATE TABLE `${table1}` (
|
||||
CREATE TABLE IF NOT EXISTS `${table1}` (
|
||||
`siteid` int(11) NOT NULL COMMENT "",
|
||||
`cardid` int(11) NOT NULL COMMENT "",
|
||||
`low` double NOT NULL COMMENT "",
|
||||
|
||||
@ -22,7 +22,7 @@ suite("test_dup_tab_mixed_type_nullable") {
|
||||
sql "drop table if exists ${table1}"
|
||||
|
||||
sql """
|
||||
CREATE TABLE `${table1}` (
|
||||
CREATE TABLE IF NOT EXISTS `${table1}` (
|
||||
`siteid` int(11) NULL COMMENT "",
|
||||
`cardid` int(11) NULL COMMENT "",
|
||||
`low` double NULL COMMENT "",
|
||||
|
||||
@ -18,7 +18,7 @@
|
||||
suite("test_bitmap_int") {
|
||||
sql "DROP TABLE IF EXISTS test_int_bitmap"
|
||||
sql """
|
||||
CREATE TABLE test_int_bitmap (`id` int, `bitmap_set` bitmap bitmap_union)
|
||||
CREATE TABLE IF NOT EXISTS test_int_bitmap (`id` int, `bitmap_set` bitmap bitmap_union)
|
||||
ENGINE=OLAP DISTRIBUTED BY HASH(`id`) BUCKETS 5 properties("replication_num" = "1");
|
||||
"""
|
||||
sql "insert into test_int_bitmap values(1, bitmap_hash(1)), (2, bitmap_hash(2)), (3, bitmap_hash(3))"
|
||||
@ -32,7 +32,7 @@ suite("test_bitmap_int") {
|
||||
|
||||
// bitmap_hash64
|
||||
sql """
|
||||
CREATE TABLE test_int_bitmap (`id` int, `bitmap_set` bitmap bitmap_union)
|
||||
CREATE TABLE IF NOT EXISTS test_int_bitmap (`id` int, `bitmap_set` bitmap bitmap_union)
|
||||
ENGINE=OLAP DISTRIBUTED BY HASH(`id`) BUCKETS 5 properties("replication_num" = "1");
|
||||
"""
|
||||
sql "insert into test_int_bitmap values(1, bitmap_hash64(1)), (2, bitmap_hash64(2)), (3, bitmap_hash64(3))"
|
||||
|
||||
@ -18,7 +18,7 @@
|
||||
suite("test_hll_int") {
|
||||
sql "DROP TABLE IF EXISTS test_int_hll"
|
||||
sql """
|
||||
CREATE TABLE test_int_hll (`id` int COMMENT "", `hll_set` hll hll_union COMMENT "")
|
||||
CREATE TABLE IF NOT EXISTS test_int_hll (`id` int COMMENT "", `hll_set` hll hll_union COMMENT "")
|
||||
ENGINE=OLAP DISTRIBUTED BY HASH(`id`) BUCKETS 5 properties("replication_num" = "1");
|
||||
"""
|
||||
sql "insert into test_int_hll values(1, hll_hash(1)), (2, hll_hash(2)), (3, hll_hash(3))"
|
||||
|
||||
@ -19,22 +19,22 @@ suite("test_string_basic") {
|
||||
sql "drop table if exists fail_tb1"
|
||||
// first column could not be string
|
||||
test {
|
||||
sql """CREATE TABLE fail_tb1 (k1 STRING NOT NULL, v1 STRING NOT NULL) DISTRIBUTED BY HASH(k1) BUCKETS 5 properties("replication_num" = "1")"""
|
||||
sql """CREATE TABLE IF NOT EXISTS fail_tb1 (k1 STRING NOT NULL, v1 STRING NOT NULL) DISTRIBUTED BY HASH(k1) BUCKETS 5 properties("replication_num" = "1")"""
|
||||
exception "The olap table first column could not be float, double, string use decimal or varchar instead."
|
||||
}
|
||||
// string type should could not be key
|
||||
test {
|
||||
sql """
|
||||
CREATE TABLE fail_tb1 ( k1 INT NOT NULL, k2 STRING NOT NULL)
|
||||
CREATE TABLE IF NOT EXISTS fail_tb1 ( k1 INT NOT NULL, k2 STRING NOT NULL)
|
||||
DUPLICATE KEY(k1,k2) DISTRIBUTED BY HASH(k1) BUCKETS 5 properties("replication_num" = "1")
|
||||
"""
|
||||
exception "String Type should not be used in key column[k2]"
|
||||
}
|
||||
// create table with string column, insert and select ok
|
||||
// create table if not exists with string column, insert and select ok
|
||||
def tbName = "str_tb"
|
||||
sql "drop table if exists ${tbName}"
|
||||
sql """
|
||||
CREATE TABLE ${tbName} (k1 VARCHAR(10) NULL, v1 STRING NULL)
|
||||
CREATE TABLE IF NOT EXISTS ${tbName} (k1 VARCHAR(10) NULL, v1 STRING NULL)
|
||||
UNIQUE KEY(k1) DISTRIBUTED BY HASH(k1) BUCKETS 5 properties("replication_num" = "1")
|
||||
"""
|
||||
sql """
|
||||
|
||||
@ -34,8 +34,8 @@ suite("test_ctas") {
|
||||
|
||||
sql """ INSERT INTO test_ctas(test_varchar, test_datetime) VALUES ('test1','2022-04-27 16:00:33'),('test2','2022-04-27 16:00:54') """
|
||||
|
||||
sql """
|
||||
CREATE TABLE IF NOT EXISTS `test_ctas1`
|
||||
sql """
|
||||
CREATE TABLE IF NOT EXISTS `test_ctas1`
|
||||
PROPERTIES (
|
||||
"replication_allocation" = "tag.location.default: 1",
|
||||
"in_memory" = "false",
|
||||
|
||||
@ -32,7 +32,7 @@ suite("test_ctl") {
|
||||
)
|
||||
"""
|
||||
|
||||
sql """
|
||||
sql """
|
||||
CREATE TABLE IF NOT EXISTS `test_ctl1` LIKE `test_ctl`
|
||||
"""
|
||||
|
||||
|
||||
@ -22,7 +22,7 @@ suite("test_array_column_delete") {
|
||||
sql "ADMIN SET FRONTEND CONFIG ('enable_array_type' = 'true')"
|
||||
|
||||
sql """ DROP TABLE IF EXISTS ${tableName}; """
|
||||
sql """ CREATE TABLE ${tableName} (id INT NULL, c_array ARRAY<INT> NULL) ENGINE=OLAP DUPLICATE KEY(id) DISTRIBUTED BY HASH(id) BUCKETS 4 PROPERTIES ( "replication_allocation" = "tag.location.default: 1","in_memory" = "false","storage_format" = "V2") """
|
||||
sql """ CREATE TABLE IF NOT EXISTS ${tableName} (id INT NULL, c_array ARRAY<INT> NULL) ENGINE=OLAP DUPLICATE KEY(id) DISTRIBUTED BY HASH(id) BUCKETS 4 PROPERTIES ( "replication_allocation" = "tag.location.default: 1","in_memory" = "false","storage_format" = "V2") """
|
||||
sql """ insert into ${tableName} values(1, NULL),(2,[12,3]),(3,[]),(4,NULL),(5,NULL) """
|
||||
sql """ DELETE FROM ${tableName} WHERE c_array is NULL """
|
||||
qt_sql """ SELECT * FROM ${tableName} order by id """
|
||||
|
||||
@ -19,7 +19,7 @@ suite("test_delete") {
|
||||
def tableName = "delete_regression_test"
|
||||
|
||||
sql """ DROP TABLE IF EXISTS ${tableName} """
|
||||
sql """ CREATE TABLE ${tableName} (c1 varchar(190) NOT NULL COMMENT "",c2 bigint(20) NOT NULL COMMENT "", c3 varchar(160) NULL COMMENT "" ) ENGINE=OLAP DUPLICATE KEY(c1, c2) COMMENT "OLAP" DISTRIBUTED BY HASH(c3) BUCKETS 3
|
||||
sql """ CREATE TABLE IF NOT EXISTS ${tableName} (c1 varchar(190) NOT NULL COMMENT "",c2 bigint(20) NOT NULL COMMENT "", c3 varchar(160) NULL COMMENT "" ) ENGINE=OLAP DUPLICATE KEY(c1, c2) COMMENT "OLAP" DISTRIBUTED BY HASH(c3) BUCKETS 3
|
||||
PROPERTIES ( "replication_num" = "1" );"""
|
||||
|
||||
sql """INSERT INTO ${tableName} VALUES ('abcdef',1,'fjdsajfldjafljdslajfdl'),('abcdef',2,'fjdsajfldjafljdslajfdl'),('abcdef',4,'fjdsajfldjafljdslajfdl'),('abcdef',5,'fjdsajfldjafljdslajfdl')"""
|
||||
@ -34,7 +34,7 @@ suite("test_delete") {
|
||||
|
||||
sql """ DROP TABLE IF EXISTS ${tableName} """
|
||||
|
||||
sql """ CREATE TABLE delete_regression_test (k1 varchar(190) NOT NULL COMMENT "", k2 DATEV2 NOT NULL COMMENT "", k3 DATETIMEV2 NOT NULL COMMENT "", k4 DATETIMEV2(3) NOT NULL COMMENT "", v1 DATEV2 NOT NULL COMMENT "", v2 DATETIMEV2 NOT NULL COMMENT "", v3 DATETIMEV2(3) NOT NULL COMMENT "" ) ENGINE=OLAP DUPLICATE KEY(k1, k2, k3, k4) COMMENT "OLAP" DISTRIBUTED BY HASH(k1, k2, k3, k4) BUCKETS 3
|
||||
sql """ CREATE TABLE IF NOT EXISTS delete_regression_test (k1 varchar(190) NOT NULL COMMENT "", k2 DATEV2 NOT NULL COMMENT "", k3 DATETIMEV2 NOT NULL COMMENT "", k4 DATETIMEV2(3) NOT NULL COMMENT "", v1 DATEV2 NOT NULL COMMENT "", v2 DATETIMEV2 NOT NULL COMMENT "", v3 DATETIMEV2(3) NOT NULL COMMENT "" ) ENGINE=OLAP DUPLICATE KEY(k1, k2, k3, k4) COMMENT "OLAP" DISTRIBUTED BY HASH(k1, k2, k3, k4) BUCKETS 3
|
||||
PROPERTIES ( "replication_num" = "1" );"""
|
||||
|
||||
sql """ INSERT INTO delete_regression_test VALUES ('abcdef','2022-08-16','2022-08-16 11:11:11.111111','2022-08-16 11:11:11.111111','2022-08-16','2022-08-16 11:11:11.111111','2022-08-16 11:11:11.111111'),('abcdef','2022-08-12','2022-08-16 12:11:11.111111','2022-08-16 12:11:11.111111','2022-08-12','2022-08-16 12:11:11.111111','2022-08-16 12:11:11.111111'); """
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
DROP TABLE IF EXISTS delete_sign_test_mow;
|
||||
|
||||
CREATE TABLE delete_sign_test_mow (
|
||||
CREATE TABLE IF NOT EXISTS delete_sign_test_mow (
|
||||
`uid` BIGINT NULL,
|
||||
`v1` BIGINT NULL
|
||||
)
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
DROP TABLE IF EXISTS delete_sign_test;
|
||||
|
||||
CREATE TABLE delete_sign_test (
|
||||
CREATE TABLE IF NOT EXISTS delete_sign_test (
|
||||
`uid` BIGINT NULL,
|
||||
`v1` BIGINT NULL
|
||||
)
|
||||
|
||||
@ -20,7 +20,7 @@ suite("test_multi_columns_delete") {
|
||||
|
||||
sql """ SET enable_vectorized_engine = TRUE; """
|
||||
sql """ DROP TABLE IF EXISTS ${tableName}; """
|
||||
sql """ CREATE TABLE ${tableName} ( id INT NULL COMMENT "",name VARCHAR(500) NULL COMMENT "",gender VARCHAR(500) NULL COMMENT "",remark VARCHAR(500) NULL COMMENT "" ) ENGINE=OLAP DUPLICATE KEY(id, name) DISTRIBUTED BY HASH(id, name) BUCKETS 4 PROPERTIES ( "replication_allocation" = "tag.location.default: 1","in_memory" = "false","storage_format" = "V2");"""
|
||||
sql """ CREATE TABLE IF NOT EXISTS ${tableName} ( id INT NULL COMMENT "",name VARCHAR(500) NULL COMMENT "",gender VARCHAR(500) NULL COMMENT "",remark VARCHAR(500) NULL COMMENT "" ) ENGINE=OLAP DUPLICATE KEY(id, name) DISTRIBUTED BY HASH(id, name) BUCKETS 4 PROPERTIES ( "replication_allocation" = "tag.location.default: 1","in_memory" = "false","storage_format" = "V2");"""
|
||||
|
||||
sql """ INSERT INTO ${tableName} VALUES (1125,'mus','f','xDavis'),(1338,'mos','f','kDiaz'),(1443,'mus','f','enim_unde_quae'),(1564,'mos','f','quasi'),(1745,'mus','m','sit_et_quidem'),(1898,'mos','m','est_sit'),(2256,'mus','f','SusanHolmes'),(2316,'mus','f','jSpencer'),(2448,'mus','f','impedit_exercitationem_nobis'),(2493,'mus','f','aut_id'),(2768,'mos','f','dolor_neque'),(2813,'mos','f','SeanHill'),(2834,'mus','f','xMorrison'),(2894,'mos','m','incidunt'),(2933,'mos','m','CharlesFisher'),(2978,'mus','m','fTaylor'),(3017,'mos','m','RaymondCruz'),(3059,'mos','m','autem'),(3366,'mus','m','doloremque_vel'),(3433,'mus','m','odio_voluptatem'),(3878,'mos','m','ut_animi_necessitatibus'),(3986,'mus','m','ut'),(4510,'mos','m','NicoleBarnes'),(4551,'mos','f','libero_maxime'),(1225,'mus','m','ArthurBarnes'),(1412,'mus','f','JessicaWoods'),(1413,'mus','m','NancyCarroll'),(1496,'mos','m','RalphHicks'),(1515,'mus','m','et'),(1706,'mos','f','JesseBryant'),(1736,'mos','f','PhilipChavez'),(1951,'mos','f','aWilson'),(2290,'mos','m','JamesHernandez'),(2398,'mus','m','provident_consequuntur'),(2618,'mus','f','quas_expedita_nulla'),(2726,'mus','m','PatrickJackson'),(2778,'mos','f','oAndrews'),(2911,'mos','f','dolore'),(2962,'mus','f','4Stevens'),(3280,'mus','m','quaerat'),(3383,'mus','m','qui_molestiae_consequatur'),(3438,'mus','f','odio_eos'),(3724,'mus','f','voluptatem_non_eum'),(3979,'mos','f','ToddRomero'),(4016,'mos','f','gBlack'),(4029,'mos','m','uWright'),(4138,'mos','f','MariaPatterson'),(4214,'mus','f','ipsa'),(4265,'mus','f','EvelynWebb'),(4379,'mus','f','hWheeler'),(4436,'mus','m','aNelson'),(1315,'mos','m','doloribus'),(1995,'mus','m','rerum'),(2093,'mus','m','PeterFuller'),(2151,'mos','f','qGarrett'),(2271,'mus','f','cEvans'),(2422,'mus','f','MargaretHunt'),(2691,'mus','m','0Alexander'),(2917,'mus','m','id'),(2920,'mus','f','eos_voluptas_minima'),(3037,'mos','f','gFowler'),(3074,'mos','m','1Stanley'),(3159,'mos','f','aut'),(3340,'mos','f','KarenFuller'),(3564,'mus','f','cum_maiores'),(3623,'mos','f','CynthiaGarrett'),(3895,'mus','m','bWatkins'),(3992,'mos','f','hJames'),(4055,'mos','f','RogerThomas'),(4291,'mus','f','FredJohnson'),(4326,'mos','f','AndrewRodriguez'),(1302,'mus','f','sed_qui_aut'),(1312,'mus','f','qBoyd'),(1418,'mus','m','KeithRogers'),(1553,'mus','f','molestiae'),(1596,'mus','f','KennethJohnston'),(1618,'mus','m','veniam_rem'),(1822,'mus','f','5Fernandez'),(1916,'mus','f','uDiaz'),(2194,'mos','m','tHayes'),(2334,'mus','f','GregorySchmidt'),(2363,'mos','f','itaque_minima_placeat'),(2370,'mos','m','et_velit_in'),(2589,'mos','f','CherylBailey'),(2606,'mus','f','SaraBerry'),(2650,'mus','f','VirginiaVasquez'),(2883,'mus','m','quia_quae_repudiandae'),(2904,'mus','f','TerryRivera'),(3338,'mos','m','VictorOlson'),(3393,'mus','m','itaque_eum'),(3602,'mus','f','wWells'),(3635,'mus','m','mPorter'),(3697,'mus','m','CharlesRobinson'),(3936,'mos','f','facere_corrupti_velit'),(4158,'mos','f','in_nostrum'),(4212,'mus','m','JonathanStanley'),(4231,'mus','f','lSchmidt'),(4259,'mos','f','voluptas_culpa'),(4492,'mos','f','excepturi_eum'),(4555,'mus','f','9Powell'); """
|
||||
sql """ DELETE FROM ${tableName} WHERE name = 'mos' AND gender = 'm'; """
|
||||
|
||||
@ -21,12 +21,12 @@ suite("test_segment_iterator_delete") {
|
||||
|
||||
// test duplicate key
|
||||
sql """ DROP TABLE IF EXISTS ${tableName} """
|
||||
sql """ CREATE TABLE ${tableName} (c1 int NOT NULL, c2 int NOT NULL , c3 int not null ) ENGINE=OLAP DUPLICATE KEY(c1, c2) COMMENT "OLAP" DISTRIBUTED BY HASH(c3) BUCKETS 1
|
||||
sql """ CREATE TABLE IF NOT EXISTS ${tableName} (c1 int NOT NULL, c2 int NOT NULL , c3 int not null ) ENGINE=OLAP DUPLICATE KEY(c1, c2) COMMENT "OLAP" DISTRIBUTED BY HASH(c3) BUCKETS 1
|
||||
PROPERTIES ( "replication_num" = "1" );"""
|
||||
|
||||
sql """ DROP TABLE IF EXISTS ${tableName_dict} """
|
||||
sql """
|
||||
CREATE TABLE ${tableName_dict} (
|
||||
CREATE TABLE IF NOT EXISTS ${tableName_dict} (
|
||||
`tinyint_key` tinyint(4) NOT NULL,
|
||||
`char_50_key` char(50) NOT NULL,
|
||||
`character_key` varchar(500) NOT NULL
|
||||
@ -75,7 +75,7 @@ suite("test_segment_iterator_delete") {
|
||||
|
||||
// test unique key
|
||||
sql """ DROP TABLE IF EXISTS ${tableName} """
|
||||
sql """ CREATE TABLE ${tableName} (c1 int NOT NULL, c2 int NOT NULL , c3 int not null ) ENGINE=OLAP UNIQUE KEY(c1, c2) COMMENT "OLAP" DISTRIBUTED BY HASH(c1) BUCKETS 1
|
||||
sql """ CREATE TABLE IF NOT EXISTS ${tableName} (c1 int NOT NULL, c2 int NOT NULL , c3 int not null ) ENGINE=OLAP UNIQUE KEY(c1, c2) COMMENT "OLAP" DISTRIBUTED BY HASH(c1) BUCKETS 1
|
||||
PROPERTIES ( "replication_num" = "1" );"""
|
||||
|
||||
sql """INSERT INTO ${tableName} VALUES (1,1,1)"""
|
||||
|
||||
@ -18,7 +18,7 @@
|
||||
suite("event_action") {
|
||||
def createTable = { tableName ->
|
||||
sql """
|
||||
create table ${tableName}
|
||||
create table if not exists ${tableName}
|
||||
(id int)
|
||||
distributed by hash(id)
|
||||
properties
|
||||
|
||||
@ -136,7 +136,7 @@ suite("test_outfile") {
|
||||
try {
|
||||
sql """ DROP TABLE IF EXISTS ${tableName} """
|
||||
sql """
|
||||
CREATE TABLE ${tableName} (
|
||||
CREATE TABLE IF NOT EXISTS ${tableName} (
|
||||
`k1` int(11) NOT NULL,
|
||||
`v1` hll HLL_UNION NOT NULL,
|
||||
`v2` int(11) SUM NOT NULL
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
CREATE TABLE github_events
|
||||
CREATE TABLE IF NOT EXISTS github_events
|
||||
(
|
||||
repo_name STRING NOT NULL,
|
||||
created_at DATETIME NOT NULL,
|
||||
|
||||
@ -67,9 +67,9 @@ suite("test_query_stmt") {
|
||||
assertEquals(obj.msg, SUCCESS_MSG)
|
||||
assertEquals(obj.code, SUCCESS_CODE)
|
||||
|
||||
// test create table
|
||||
// test create table if not exists
|
||||
def stmt2 = """
|
||||
CREATE TABLE ${tableName}
|
||||
CREATE TABLE IF NOT EXISTS ${tableName}
|
||||
(
|
||||
id TINYINT,
|
||||
name CHAR(10) NOT NULL DEFAULT "zs"
|
||||
|
||||
@ -22,7 +22,7 @@ suite("test_bitmap_index_load") {
|
||||
drop TABLE if exists `${tbName}` force;
|
||||
"""
|
||||
sql """
|
||||
CREATE TABLE `${tbName}` (
|
||||
CREATE TABLE IF NOT EXISTS `${tbName}` (
|
||||
`a` decimal(12, 6) NOT NULL
|
||||
) ENGINE = OLAP
|
||||
DUPLICATE KEY(`a`)
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
CREATE TABLE `datatype` (
|
||||
CREATE TABLE IF NOT EXISTS `datatype` (
|
||||
c_bigint bigint,
|
||||
c_double double,
|
||||
c_string string,
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
CREATE TABLE `mutable_datatype` (
|
||||
CREATE TABLE IF NOT EXISTS `mutable_datatype` (
|
||||
c_bigint bigint,
|
||||
c_double double,
|
||||
c_string string,
|
||||
|
||||
@ -28,7 +28,7 @@ suite("test_insert_nested_array", "load") {
|
||||
|
||||
sql "DROP TABLE IF EXISTS ${tableName}"
|
||||
sql """
|
||||
CREATE TABLE ${tableName} (
|
||||
CREATE TABLE IF NOT EXISTS ${tableName} (
|
||||
`key` INT,
|
||||
value ARRAY<ARRAY<INT>>
|
||||
) DUPLICATE KEY (`key`) DISTRIBUTED BY HASH (`key`) BUCKETS 1
|
||||
@ -65,7 +65,7 @@ suite("test_insert_nested_array", "load") {
|
||||
|
||||
sql "DROP TABLE IF EXISTS ${tableName}"
|
||||
sql """
|
||||
CREATE TABLE ${tableName} (
|
||||
CREATE TABLE IF NOT EXISTS ${tableName} (
|
||||
`key` INT,
|
||||
value ARRAY<ARRAY<ARRAY<INT>>>
|
||||
) DUPLICATE KEY (`key`) DISTRIBUTED BY HASH (`key`) BUCKETS 1
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
CREATE TABLE parquet_s3_case1 (
|
||||
CREATE TABLE IF NOT EXISTS parquet_s3_case1 (
|
||||
p_partkey int NOT NULL DEFAULT "1",
|
||||
p_name VARCHAR(55) NOT NULL DEFAULT "2",
|
||||
p_mfgr VARCHAR(25) NOT NULL DEFAULT "3",
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
CREATE TABLE parquet_s3_case2 (
|
||||
CREATE TABLE IF NOT EXISTS parquet_s3_case2 (
|
||||
p_partkey int NOT NULL DEFAULT "1",
|
||||
p_name VARCHAR(55) NOT NULL DEFAULT "2",
|
||||
p_mfgr VARCHAR(25) NOT NULL DEFAULT "3",
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
CREATE TABLE parquet_s3_case3 (
|
||||
CREATE TABLE IF NOT EXISTS parquet_s3_case3 (
|
||||
p_partkey int NOT NULL DEFAULT "1",
|
||||
p_name VARCHAR(55) NOT NULL DEFAULT "2",
|
||||
p_mfgr VARCHAR(25) NOT NULL DEFAULT "3",
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
CREATE TABLE parquet_s3_case4 (
|
||||
CREATE TABLE IF NOT EXISTS parquet_s3_case4 (
|
||||
col1 int NOT NULL DEFAULT "1",
|
||||
col2 VARCHAR(55) NOT NULL DEFAULT "2",
|
||||
col3 VARCHAR(25) NOT NULL DEFAULT "3",
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
CREATE TABLE parquet_s3_case5 (
|
||||
CREATE TABLE IF NOT EXISTS parquet_s3_case5 (
|
||||
p_partkey int NOT NULL DEFAULT "1",
|
||||
p_name VARCHAR(55) NOT NULL DEFAULT "2",
|
||||
p_mfgr VARCHAR(25) NOT NULL DEFAULT "3",
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
CREATE TABLE parquet_s3_case6 (
|
||||
CREATE TABLE IF NOT EXISTS parquet_s3_case6 (
|
||||
p_partkey int NOT NULL DEFAULT "1",
|
||||
p_name VARCHAR(55) NOT NULL DEFAULT "2",
|
||||
p_mfgr VARCHAR(25) NOT NULL DEFAULT "3",
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
CREATE TABLE parquet_s3_case7 (
|
||||
CREATE TABLE IF NOT EXISTS parquet_s3_case7 (
|
||||
p_partkey int NOT NULL DEFAULT "1",
|
||||
p_name VARCHAR(55) NOT NULL DEFAULT "2",
|
||||
p_mfgr VARCHAR(25) NOT NULL DEFAULT "3",
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
CREATE TABLE parquet_s3_case8 (
|
||||
CREATE TABLE IF NOT EXISTS parquet_s3_case8 (
|
||||
p_partkey int NOT NULL DEFAULT "1",
|
||||
p_name VARCHAR(55) NOT NULL DEFAULT "2",
|
||||
p_mfgr VARCHAR(25) NOT NULL DEFAULT "3"
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
create table parquet_s3_case9 (
|
||||
create table if not exists parquet_s3_case9 (
|
||||
tinyint_col tinyint,
|
||||
smallint_col smallint,
|
||||
int_col int,
|
||||
|
||||
@ -22,7 +22,7 @@ suite("test_stream_load", "p0") {
|
||||
|
||||
sql """ DROP TABLE IF EXISTS ${tableName} """
|
||||
sql """
|
||||
CREATE TABLE ${tableName} (
|
||||
CREATE TABLE IF NOT EXISTS ${tableName} (
|
||||
`k1` bigint(20) NULL,
|
||||
`k2` bigint(20) NULL,
|
||||
`v1` tinyint(4) SUM NULL,
|
||||
@ -91,7 +91,7 @@ suite("test_stream_load", "p0") {
|
||||
|
||||
sql """ DROP TABLE IF EXISTS ${tableName} """
|
||||
sql """
|
||||
CREATE TABLE ${tableName} (
|
||||
CREATE TABLE IF NOT EXISTS ${tableName} (
|
||||
`id` int(11) NULL,
|
||||
`value` varchar(64) NULL
|
||||
) ENGINE=OLAP
|
||||
@ -136,7 +136,7 @@ suite("test_stream_load", "p0") {
|
||||
def tableName2 = "load_nullable_to_not_nullable"
|
||||
sql """ DROP TABLE IF EXISTS ${tableName2} """
|
||||
sql """
|
||||
CREATE TABLE `${tableName2}` (
|
||||
CREATE TABLE IF NOT EXISTS `${tableName2}` (
|
||||
k1 int(32) NOT NULL,
|
||||
k2 smallint NOT NULL,
|
||||
k3 int NOT NULL,
|
||||
@ -193,7 +193,7 @@ suite("test_stream_load", "p0") {
|
||||
sql """ DROP TABLE IF EXISTS ${tableName7} """
|
||||
sql """ DROP TABLE IF EXISTS ${tableName8} """
|
||||
sql """
|
||||
CREATE TABLE ${tableName3} (
|
||||
CREATE TABLE IF NOT EXISTS ${tableName3} (
|
||||
`k1` int(11) NULL,
|
||||
`k2` tinyint(4) NULL,
|
||||
`k3` smallint(6) NULL,
|
||||
@ -215,7 +215,7 @@ suite("test_stream_load", "p0") {
|
||||
"""
|
||||
|
||||
sql """
|
||||
CREATE TABLE ${tableName4} (
|
||||
CREATE TABLE IF NOT EXISTS ${tableName4} (
|
||||
`k1` int(11) NULL,
|
||||
`k2` tinyint(4) NULL,
|
||||
`k3` smallint(6) NULL,
|
||||
@ -229,7 +229,7 @@ suite("test_stream_load", "p0") {
|
||||
"""
|
||||
|
||||
sql """
|
||||
CREATE TABLE ${tableName5} (
|
||||
CREATE TABLE IF NOT EXISTS ${tableName5} (
|
||||
`k1` int(11) NULL,
|
||||
`k2` tinyint(4) NULL,
|
||||
`v1` bitmap bitmap_union,
|
||||
@ -242,7 +242,7 @@ suite("test_stream_load", "p0") {
|
||||
"""
|
||||
|
||||
sql """
|
||||
CREATE TABLE ${tableName6} (
|
||||
CREATE TABLE IF NOT EXISTS ${tableName6} (
|
||||
`k1` int(11) NULL,
|
||||
`k2` tinyint(4) NULL,
|
||||
`v1` varchar(1024)
|
||||
@ -255,7 +255,7 @@ suite("test_stream_load", "p0") {
|
||||
"""
|
||||
|
||||
sql """
|
||||
CREATE TABLE ${tableName7} (
|
||||
CREATE TABLE IF NOT EXISTS ${tableName7} (
|
||||
`k1` int(11) NULL,
|
||||
`k2` tinyint(4) NULL,
|
||||
`v1` varchar(1024)
|
||||
@ -268,7 +268,7 @@ suite("test_stream_load", "p0") {
|
||||
);
|
||||
"""
|
||||
sql """
|
||||
CREATE TABLE ${tableName8} (
|
||||
CREATE TABLE IF NOT EXISTS ${tableName8} (
|
||||
`k1` INT(11) NULL COMMENT "",
|
||||
`k2` ARRAY<SMALLINT> NULL COMMENT "",
|
||||
`k3` ARRAY<INT(11)> NULL COMMENT "",
|
||||
|
||||
@ -24,7 +24,7 @@ suite("agg_with_const") {
|
||||
DROP TABLE IF EXISTS agg_with_const_tbl
|
||||
"""
|
||||
|
||||
sql """CREATE TABLE agg_with_const_tbl (col1 int not null, col2 int not null, col3 int not null)
|
||||
sql """CREATE TABLE IF NOT EXISTS agg_with_const_tbl (col1 int not null, col2 int not null, col3 int not null)
|
||||
DISTRIBUTED BY HASH(col3)
|
||||
BUCKETS 1
|
||||
PROPERTIES(
|
||||
|
||||
@ -23,7 +23,7 @@ suite("test_nereids_having") {
|
||||
sql "DROP TABLE IF EXISTS test_nereids_having_tbl"
|
||||
|
||||
sql """
|
||||
CREATE TABLE test_nereids_having_tbl (
|
||||
CREATE TABLE IF NOT EXISTS test_nereids_having_tbl (
|
||||
pk INT,
|
||||
a1 INT,
|
||||
a2 INT
|
||||
|
||||
@ -21,7 +21,7 @@ suite("rollup") {
|
||||
DROP TABLE IF EXISTS `rollup_t1`
|
||||
"""
|
||||
sql """
|
||||
CREATE TABLE `rollup_t1` (
|
||||
CREATE TABLE IF NOT EXISTS `rollup_t1` (
|
||||
`k1` int(11) NULL,
|
||||
`k2` int(11) NULL,
|
||||
`k3` int(11) NULL,
|
||||
|
||||
@ -50,7 +50,7 @@ suite ("sub_query_correlated") {
|
||||
"""
|
||||
|
||||
sql """
|
||||
create table subquery1
|
||||
create table if not exists subquery1
|
||||
(k1 bigint, k2 bigint)
|
||||
duplicate key(k1)
|
||||
distributed by hash(k2) buckets 1
|
||||
@ -58,7 +58,7 @@ suite ("sub_query_correlated") {
|
||||
"""
|
||||
|
||||
sql """
|
||||
create table subquery2
|
||||
create table if not exists subquery2
|
||||
(k1 varchar(10), k2 bigint)
|
||||
partition by range(k2)
|
||||
(partition p1 values less than("10"))
|
||||
@ -67,14 +67,14 @@ suite ("sub_query_correlated") {
|
||||
"""
|
||||
|
||||
sql """
|
||||
create table subquery3
|
||||
create table if not exists subquery3
|
||||
(k1 int not null, k2 varchar(128), k3 bigint, v1 bigint, v2 bigint)
|
||||
distributed by hash(k2) buckets 1
|
||||
properties('replication_num' = '1')
|
||||
"""
|
||||
|
||||
sql """
|
||||
create table subquery4
|
||||
create table if not exists subquery4
|
||||
(k1 bigint, k2 bigint)
|
||||
duplicate key(k1)
|
||||
distributed by hash(k2) buckets 1
|
||||
|
||||
@ -1,18 +1,18 @@
|
||||
Create table opensky (
|
||||
Create table if not exists opensky (
|
||||
origin varchar(128),
|
||||
destination varchar(128),
|
||||
callsign varchar(128),
|
||||
number String,
|
||||
icao24 String,
|
||||
registration String,
|
||||
typecode String,
|
||||
firstseen DateTime,
|
||||
lastseen DateTime,
|
||||
day DateTime,
|
||||
latitude_1 double,
|
||||
longitude_1 double,
|
||||
altitude_1 double,
|
||||
latitude_2 double,
|
||||
longitude_2 double,
|
||||
callsign varchar(128),
|
||||
number String,
|
||||
icao24 String,
|
||||
registration String,
|
||||
typecode String,
|
||||
firstseen DateTime,
|
||||
lastseen DateTime,
|
||||
day DateTime,
|
||||
latitude_1 double,
|
||||
longitude_1 double,
|
||||
altitude_1 double,
|
||||
latitude_2 double,
|
||||
longitude_2 double,
|
||||
altitude_2 double )
|
||||
DUPLICATE KEY (origin, destination, callsign) DISTRIBUTED BY HASH(origin, destination, callsign) BUCKETS 4 properties ("replication_num"="1");
|
||||
|
||||
@ -19,7 +19,7 @@ suite("test_dynamic_partition") {
|
||||
// todo: test dynamic partition
|
||||
sql "drop table if exists dy_par"
|
||||
sql """
|
||||
CREATE TABLE dy_par ( k1 date NOT NULL, k2 varchar(20) NOT NULL, k3 int sum NOT NULL )
|
||||
CREATE TABLE IF NOT EXISTS dy_par ( k1 date NOT NULL, k2 varchar(20) NOT NULL, k3 int sum NOT NULL )
|
||||
AGGREGATE KEY(k1,k2)
|
||||
PARTITION BY RANGE(k1) ( )
|
||||
DISTRIBUTED BY HASH(k1) BUCKETS 3
|
||||
@ -41,7 +41,7 @@ suite("test_dynamic_partition") {
|
||||
sql "drop table if exists dy_par_bad"
|
||||
test {
|
||||
sql """
|
||||
CREATE TABLE dy_par_bad ( k1 date NOT NULL, k2 varchar(20) NOT NULL, k3 int sum NOT NULL )
|
||||
CREATE TABLE IF NOT EXISTS dy_par_bad ( k1 date NOT NULL, k2 varchar(20) NOT NULL, k3 int sum NOT NULL )
|
||||
AGGREGATE KEY(k1,k2)
|
||||
PARTITION BY RANGE(k1) ( )
|
||||
DISTRIBUTED BY HASH(k1) BUCKETS 3
|
||||
@ -61,7 +61,7 @@ suite("test_dynamic_partition") {
|
||||
sql "drop table if exists dy_par_bad"
|
||||
|
||||
sql """
|
||||
CREATE TABLE dy_par ( k1 datev2 NOT NULL, k2 varchar(20) NOT NULL, k3 int sum NOT NULL )
|
||||
CREATE TABLE IF NOT EXISTS dy_par ( k1 datev2 NOT NULL, k2 varchar(20) NOT NULL, k3 int sum NOT NULL )
|
||||
AGGREGATE KEY(k1,k2)
|
||||
PARTITION BY RANGE(k1) ( )
|
||||
DISTRIBUTED BY HASH(k1) BUCKETS 3
|
||||
@ -83,7 +83,7 @@ suite("test_dynamic_partition") {
|
||||
sql "drop table if exists dy_par_bad"
|
||||
test {
|
||||
sql """
|
||||
CREATE TABLE dy_par_bad ( k1 datev2 NOT NULL, k2 varchar(20) NOT NULL, k3 int sum NOT NULL )
|
||||
CREATE TABLE IF NOT EXISTS dy_par_bad ( k1 datev2 NOT NULL, k2 varchar(20) NOT NULL, k3 int sum NOT NULL )
|
||||
AGGREGATE KEY(k1,k2)
|
||||
PARTITION BY RANGE(k1) ( )
|
||||
DISTRIBUTED BY HASH(k1) BUCKETS 3
|
||||
|
||||
@ -19,7 +19,7 @@ suite("test_list_partition") {
|
||||
// todo: test list partitions, such as: create, alter table partition ...
|
||||
sql "drop table if exists list_par"
|
||||
sql """
|
||||
CREATE TABLE list_par (
|
||||
CREATE TABLE IF NOT EXISTS list_par (
|
||||
k1 tinyint NOT NULL,
|
||||
k2 smallint NOT NULL,
|
||||
k3 int NOT NULL,
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user