You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by kx...@apache.org on 2023/08/17 08:02:12 UTC
[doris] branch branch-2.0 updated: [branch-2.0-fix](regression)remove tests related to auto increment column #22977 (#23038)
This is an automated email from the ASF dual-hosted git repository.
kxiao pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.0 by this push:
new 6d9be033e0 [branch-2.0-fix](regression)remove tests related to auto increment column #22977 (#23038)
6d9be033e0 is described below
commit 6d9be033e039e3678a2ee2e27d6eafcb74a40448
Author: bobhan1 <bh...@outlook.com>
AuthorDate: Thu Aug 17 16:02:05 2023 +0800
[branch-2.0-fix](regression)remove tests related to auto increment column #22977 (#23038)
---
.../storage/test_dup_table_auto_inc_col.out | 23 ---
.../aggregate/test_aggregate_table.groovy | 19 --
.../storage/test_dup_table_auto_inc_col.groovy | 222 ---------------------
.../data_model_p0/unique/test_unique_table.groovy | 16 --
4 files changed, 280 deletions(-)
diff --git a/regression-test/data/data_model_p0/duplicate/storage/test_dup_table_auto_inc_col.out b/regression-test/data/data_model_p0/duplicate/storage/test_dup_table_auto_inc_col.out
deleted file mode 100644
index f1dbbd892f..0000000000
--- a/regression-test/data/data_model_p0/duplicate/storage/test_dup_table_auto_inc_col.out
+++ /dev/null
@@ -1,23 +0,0 @@
--- This file is automatically generated. You should know what you did if you want to edit this
--- !desc --
-id BIGINT No true \N AUTO_INCREMENT
-value INT No false \N NONE
-
--- !desc --
-id INT No true \N
-value BIGINT No false \N NONE,AUTO_INCREMENT
-
--- !sql --
-1
-1
-5
-5
-9
-9
-13
-13
-13
-13
-17
-17
-
diff --git a/regression-test/suites/data_model_p0/aggregate/test_aggregate_table.groovy b/regression-test/suites/data_model_p0/aggregate/test_aggregate_table.groovy
index 463b548bb5..f7c4d8266a 100644
--- a/regression-test/suites/data_model_p0/aggregate/test_aggregate_table.groovy
+++ b/regression-test/suites/data_model_p0/aggregate/test_aggregate_table.groovy
@@ -99,23 +99,4 @@ suite("test_aggregate_table") {
qt_desc_date_table """desc date_agg"""
sql """DROP TABLE date_agg"""
-
- def table_auto_inc = "test_aggregate_tab_with_auto_inc_col"
- sql "drop table if exists ${table_auto_inc}"
- test {
- sql """
- CREATE TABLE IF NOT EXISTS ${table_auto_inc} (
- k BIGINT NOT NULL AUTO_INCREMENT,
- int_value_sum int sum,
- int_value_max int max,
- int_value_min int min,
- int_value_replace int replace,
- int_value_replace_if_not_null int replace_if_not_null
- )
- AGGREGATE KEY(k)
- DISTRIBUTED BY HASH(k) BUCKETS 5 properties("replication_num" = "1");
- """
- exception "the auto increment is only supported in duplicate table."
- }
- // sql "drop database ${dbName}"
}
diff --git a/regression-test/suites/data_model_p0/duplicate/storage/test_dup_table_auto_inc_col.groovy b/regression-test/suites/data_model_p0/duplicate/storage/test_dup_table_auto_inc_col.groovy
deleted file mode 100644
index 1a0977dc56..0000000000
--- a/regression-test/suites/data_model_p0/duplicate/storage/test_dup_table_auto_inc_col.groovy
+++ /dev/null
@@ -1,222 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements. See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership. The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied. See the License for the
-// specific language governing permissions and limitations
-// under the License.
-
-suite("test_dup_table_auto_inc_col") {
-
- // duplicate table with a auto-increment key column
- def table1 = "test_dup_tab_auto_inc_col1"
- sql "drop table if exists ${table1}"
- sql """
- CREATE TABLE IF NOT EXISTS `${table1}` (
- `id` BIGINT NOT NULL AUTO_INCREMENT COMMENT "",
- `value` int(11) NOT NULL COMMENT ""
- ) ENGINE=OLAP
- DUPLICATE KEY(`id`)
- COMMENT "OLAP"
- DISTRIBUTED BY HASH(`id`) BUCKETS 1
- PROPERTIES (
- "replication_allocation" = "tag.location.default: 1",
- "in_memory" = "false",
- "storage_format" = "V2"
- )
- """
- qt_desc "desc ${table1}"
- def res = sql "show create table ${table1};"
- assertTrue(res.size() != 0)
-
- // duplicate table with a auto-increment value column
- def table2 = "test_dup_tab_auto_inc_col2"
- sql "drop table if exists ${table2}"
- sql """
- CREATE TABLE IF NOT EXISTS `${table2}` (
- `id` int(11) NOT NULL COMMENT "",
- `value` BIGINT NOT NULL AUTO_INCREMENT COMMENT ""
- ) ENGINE=OLAP
- DUPLICATE KEY(`id`)
- COMMENT "OLAP"
- DISTRIBUTED BY HASH(`id`) BUCKETS 1
- PROPERTIES (
- "replication_allocation" = "tag.location.default: 1",
- "in_memory" = "false",
- "storage_format" = "V2"
- )
- """
- qt_desc "desc ${table2}"
- res = sql "show create table ${table2};"
- assertTrue(res.size() != 0)
-
- // duplicate table with two auto-increment columns
- def table3 = "test_dup_tab_auto_inc_col3"
- sql "drop table if exists ${table3}"
- test {
- sql """
- CREATE TABLE IF NOT EXISTS `${table3}` (
- `id` BIGINT NOT NULL AUTO_INCREMENT COMMENT "",
- `value` BIGINT NOT NULL AUTO_INCREMENT COMMENT ""
- ) ENGINE=OLAP
- DUPLICATE KEY(`id`)
- COMMENT "OLAP"
- DISTRIBUTED BY HASH(`id`) BUCKETS 1
- PROPERTIES (
- "replication_allocation" = "tag.location.default: 1",
- "in_memory" = "false",
- "storage_format" = "V2"
- )
- """
- exception "there can be at most one auto increment column in OlapTable."
- }
-
- // duplicate table with a auto-increment key column
- // insert values and check query
- def table4 = "test_dup_tab_basic_int_tab1"
- sql "drop table if exists ${table4}"
- sql """
-CREATE TABLE IF NOT EXISTS `${table4}` (
- `siteid` BIGINT NOT NULL AUTO_INCREMENT COMMENT "",
- `citycode` int(11) NOT NULL COMMENT "",
- `userid` int(11) NOT NULL COMMENT "",
- `pv` int(11) NOT NULL COMMENT ""
-) ENGINE=OLAP
-DUPLICATE KEY(`siteid`)
-COMMENT "OLAP"
-DISTRIBUTED BY HASH(`siteid`) BUCKETS 1
-PROPERTIES (
-"replication_allocation" = "tag.location.default: 1",
-"in_memory" = "false",
-"storage_format" = "V2"
-)
-
-"""
- sql """insert into ${table4} values
- (9,10,11,12),
- (9,10,11,12),
- (1,2,3,4),
- (13,21,22,16),
- (13,14,15,16),
- (17,18,19,20),
- (1,2,3,4),
- (13,21,22,16),
- (13,14,15,16),
- (17,18,19,20),
- (5,6,7,8),
- (5,6,7,8)
-"""
- // read key column
- qt_sql """select siteid from ${table4} order by siteid"""
- // read non-key column
- sql """select citycode from ${table4} order by citycode"""
- sql "drop table if exists ${table4}"
-
- // duplicate table with a auto-increment value column
- // insert values and check query
- def table5 = "test_dup_tab_basic_int_tab2"
- sql "drop table if exists ${table5}"
- sql """
-CREATE TABLE IF NOT EXISTS `${table5}` (
- `siteid` int(11) NOT NULL COMMENT "",
- `citycode` BIGINT NOT NULL AUTO_INCREMENT COMMENT "",
- `userid` int(11) NOT NULL COMMENT "",
- `pv` int(11) NOT NULL COMMENT ""
-) ENGINE=OLAP
-DUPLICATE KEY(`siteid`)
-COMMENT "OLAP"
-DISTRIBUTED BY HASH(`siteid`) BUCKETS 1
-PROPERTIES (
-"replication_allocation" = "tag.location.default: 1",
-"in_memory" = "false",
-"storage_format" = "V2"
-) """
- sql """insert into ${table5} values
- (9,10,11,12),
- (9,10,11,12),
- (1,2,3,4),
- (13,21,22,16),
- (13,14,15,16),
- (17,18,19,20),
- (1,2,3,4),
- (13,21,22,16),
- (13,14,15,16),
- (17,18,19,20),
- (5,6,7,8),
- (5,6,7,8) """
-
- // read key column
- sql """select siteid from ${table5} order by siteid"""
-
- // read non-key column
- sql """select citycode from ${table5} order by citycode"""
- sql "drop table if exists ${table5}"
-
- def table_check = "test_dup_tab_auto_inc_col_check"
- sql "drop table if exists ${table_check}"
-
- test {
- sql """
- CREATE TABLE IF NOT EXISTS `${table_check}` (
- `id` BIGINT AUTO_INCREMENT COMMENT "",
- `value` int(11) NOT NULL COMMENT ""
- ) ENGINE=OLAP
- DUPLICATE KEY(`id`)
- COMMENT "OLAP"
- DISTRIBUTED BY HASH(`id`) BUCKETS 1
- PROPERTIES (
- "replication_allocation" = "tag.location.default: 1",
- "in_memory" = "false",
- "storage_format" = "V2"
- )
- """
- exception "the auto increment column should be NOT NULL."
- }
-
- sql "drop table if exists ${table_check}"
- test {
- sql """
- CREATE TABLE IF NOT EXISTS `${table_check}` (
- `id` VARCHAR NOT NULL AUTO_INCREMENT COMMENT "",
- `value` int(11) NOT NULL COMMENT ""
- ) ENGINE=OLAP
- DUPLICATE KEY(`id`)
- COMMENT "OLAP"
- DISTRIBUTED BY HASH(`id`) BUCKETS 1
- PROPERTIES (
- "replication_allocation" = "tag.location.default: 1",
- "in_memory" = "false",
- "storage_format" = "V2"
- )
- """
- exception "the auto increment must be BIGINT type."
- }
-
- sql "drop table if exists ${table_check}"
- test {
- sql """
- CREATE TABLE IF NOT EXISTS `${table_check}` (
- `id` BIGINT NOT NULL AUTO_INCREMENT DEFAULT "0" COMMENT "",
- `value` int(11) NOT NULL COMMENT ""
- ) ENGINE=OLAP
- DUPLICATE KEY(`id`)
- COMMENT "OLAP"
- DISTRIBUTED BY HASH(`id`) BUCKETS 1
- PROPERTIES (
- "replication_allocation" = "tag.location.default: 1",
- "in_memory" = "false",
- "storage_format" = "V2"
- )
- """
- exception "the auto increment column can't have default value."
- }
-}
\ No newline at end of file
diff --git a/regression-test/suites/data_model_p0/unique/test_unique_table.groovy b/regression-test/suites/data_model_p0/unique/test_unique_table.groovy
index f3fdc71bde..eb9bd2b57d 100644
--- a/regression-test/suites/data_model_p0/unique/test_unique_table.groovy
+++ b/regression-test/suites/data_model_p0/unique/test_unique_table.groovy
@@ -42,20 +42,4 @@ suite("test_unique_table") {
order_qt_select_uniq_table "select * from ${tbName}"
qt_desc_uniq_table "desc ${tbName}"
sql "DROP TABLE ${tbName}"
-
- def table_auto_inc = "test_aggregate_tab_with_auto_inc_col"
- sql "drop table if exists ${table_auto_inc}"
- test {
- sql """
- CREATE TABLE IF NOT EXISTS ${table_auto_inc} (
- k BIGINT NOT NULL AUTO_INCREMENT,
- int_value int,
- char_value char(10),
- date_value date
- )
- UNIQUE KEY(k)
- DISTRIBUTED BY HASH(k) BUCKETS 5 properties("replication_num" = "1");
- """
- exception "the auto increment is only supported in duplicate table."
- }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org