This is an automated email from the ASF dual-hosted git repository.
eldenmoon pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 837e7be3f64 [improve](nestedtype) support schema change for nested
type (#39210)
837e7be3f64 is described below
commit 837e7be3f647c86b16b3def77d7450dc933811ba
Author: amory <[email protected]>
AuthorDate: Wed Aug 14 18:34:30 2024 +0800
[improve](nestedtype) support schema change for nested type (#39210)
---
.../main/java/org/apache/doris/catalog/Column.java | 5 +
.../java/org/apache/doris/catalog/ColumnType.java | 6 +-
.../ddl/create_nestedtypes_with_schemachange.out | 46 ++++
.../create_nestedtypes_with_schemachange.groovy | 65 ++++++
.../test_dup_schema_value_modify3.groovy | 230 ++++++++++----------
.../test_dup_schema_value_modify4.groovy | 238 ++++++++++-----------
.../test_unique_schema_value_modify3.groovy | 60 +++---
7 files changed, 383 insertions(+), 267 deletions(-)
diff --git a/fe/fe-core/src/main/java/org/apache/doris/catalog/Column.java
b/fe/fe-core/src/main/java/org/apache/doris/catalog/Column.java
index d7965470e64..98acd9453dd 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/catalog/Column.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/catalog/Column.java
@@ -819,6 +819,11 @@ public class Column implements GsonPostProcessable {
throw new DdlException("Dest column name is empty");
}
+ // now nested type can only support change order
+ if (type.isComplexType() && !type.equals(other.type)) {
+ throw new DdlException("Can not change " + type + " to " + other);
+ }
+
if (!ColumnType.isSchemaChangeAllowed(type, other.type)) {
throw new DdlException("Can not change " + getDataType() + " to "
+ other.getDataType());
}
diff --git a/fe/fe-core/src/main/java/org/apache/doris/catalog/ColumnType.java
b/fe/fe-core/src/main/java/org/apache/doris/catalog/ColumnType.java
index 974ad691c99..458a6a46110 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/catalog/ColumnType.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/catalog/ColumnType.java
@@ -159,9 +159,9 @@ public abstract class ColumnType {
schemaChangeMatrix[PrimitiveType.DATETIMEV2.ordinal()][PrimitiveType.DATETIMEV2.ordinal()]
= true;
// Currently, we do not support schema change between complex types
with subtypes.
-
schemaChangeMatrix[PrimitiveType.ARRAY.ordinal()][PrimitiveType.ARRAY.ordinal()]
= false;
-
schemaChangeMatrix[PrimitiveType.STRUCT.ordinal()][PrimitiveType.STRUCT.ordinal()]
= false;
-
schemaChangeMatrix[PrimitiveType.MAP.ordinal()][PrimitiveType.MAP.ordinal()] =
false;
+
schemaChangeMatrix[PrimitiveType.ARRAY.ordinal()][PrimitiveType.ARRAY.ordinal()]
= true;
+
schemaChangeMatrix[PrimitiveType.STRUCT.ordinal()][PrimitiveType.STRUCT.ordinal()]
= true;
+
schemaChangeMatrix[PrimitiveType.MAP.ordinal()][PrimitiveType.MAP.ordinal()] =
true;
}
static boolean isSchemaChangeAllowed(Type lhs, Type rhs) {
diff --git
a/regression-test/data/datatype_p0/nested_types/ddl/create_nestedtypes_with_schemachange.out
b/regression-test/data/datatype_p0/nested_types/ddl/create_nestedtypes_with_schemachange.out
new file mode 100644
index 00000000000..af88eb6b9bb
--- /dev/null
+++
b/regression-test/data/datatype_p0/nested_types/ddl/create_nestedtypes_with_schemachange.out
@@ -0,0 +1,46 @@
+-- This file is automatically generated. You should know what you did if you
want to edit this
+-- !sql --
+col0 bigint No true \N
+col_array array<text> Yes false \N NONE
+col2 int No false \N NONE
+col3 array<int> Yes false \N NONE
+col4 map<int,int> Yes false \N NONE
+col5 struct<f1:int> Yes false \N NONE
+
+-- !sql --
+col0 bigint No true \N
+col_map map<char(32),text> Yes false \N NONE
+col2 int No false \N NONE
+col3 array<int> Yes false \N NONE
+col4 map<int,int> Yes false \N NONE
+col5 struct<f1:int> Yes false \N NONE
+
+-- !sql --
+col0 bigint No true \N
+col_struct struct<f1:varchar(1)> Yes false \N NONE
+col2 int No false \N NONE
+col3 array<int> Yes false \N NONE
+col4 map<int,int> Yes false \N NONE
+col5 struct<f1:int> Yes false \N NONE
+
+-- !sql --
+col0 bigint No true \N
+col2 int No false \N NONE
+col3 array<int> Yes false \N NONE
+col4 map<int,int> Yes false \N NONE
+col5 struct<f1:int> Yes false \N NONE
+
+-- !sql --
+col0 bigint No true \N
+col2 int No false \N NONE
+col3 array<int> Yes false \N NONE
+col4 map<int,int> Yes false \N NONE
+col5 struct<f1:int> Yes false \N NONE
+
+-- !sql --
+col0 bigint No true \N
+col2 int No false \N NONE
+col3 array<int> Yes false \N NONE
+col4 map<int,int> Yes false \N NONE
+col5 struct<f1:int> Yes false \N NONE
+
diff --git
a/regression-test/suites/datatype_p0/nested_types/ddl/create_nestedtypes_with_schemachange.groovy
b/regression-test/suites/datatype_p0/nested_types/ddl/create_nestedtypes_with_schemachange.groovy
new file mode 100644
index 00000000000..ec0f163821d
--- /dev/null
+++
b/regression-test/suites/datatype_p0/nested_types/ddl/create_nestedtypes_with_schemachange.groovy
@@ -0,0 +1,65 @@
+// 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("create_nestedtypes_with_schemachange", "p0") {
+
+ def create_nested_table_and_schema_change = {testTablex, nested_type,
column_name, error ->
+ // create basic type
+ sql "DROP TABLE IF EXISTS $testTablex"
+ sql """ CREATE TABLE $testTablex (
+ col0 BIGINT NOT NULL, col2 int NOT NULL, col3 array<int>
NULL, col4 map<int, int> NULL, col5 struct<f1: int> NULL
+ )
+ /* mow */
+ UNIQUE KEY(col0) DISTRIBUTED BY HASH(col0) BUCKETS 4
PROPERTIES (
+ "enable_unique_key_merge_on_write" = "true",
+ "replication_num" = "1"
+ ); """
+ // alter table add nested type
+ if (error != '') {
+ // check nested type do not support other type
+ test {
+ sql "ALTER TABLE $testTablex MODIFY COLUMN $column_name
$nested_type AFTER col0"
+ exception (error)
+ }
+ } else {
+ // check nested type can only support change order
+ sql "ALTER TABLE $testTablex ADD COLUMN $column_name $nested_type"
+ sql "ALTER TABLE $testTablex MODIFY COLUMN $column_name
$nested_type AFTER col0"
+ waitForSchemaChangeDone {
+ sql """ SHOW ALTER TABLE COLUMN WHERE IndexName='$testTablex'
ORDER BY createtime DESC LIMIT 1 """
+ time 600
+ }
+ }
+ // desc table
+ qt_sql "DESC $testTablex"
+ }
+
+ // array
+ create_nested_table_and_schema_change.call("test_array_schemachange",
"ARRAY<STRING>", "col_array", '')
+ // map
+ create_nested_table_and_schema_change.call("test_map_schemachange",
"MAP<char(32), string>", "col_map", '')
+ // struct
+ create_nested_table_and_schema_change.call("test_struct_schemachange",
"STRUCT<f1: varchar(1)>", "col_struct", '')
+
+ // array with other type
+ create_nested_table_and_schema_change.call("test_array_schemachange_1",
"ARRAY<STRING>", "col3", "errCode = 2");
+ // map with other type
+ create_nested_table_and_schema_change.call("test_map_schemachange_1",
"MAP<char(32), string>", "col4", "errCode = 2");
+ // struct with other type
+ create_nested_table_and_schema_change.call("test_struct_schemachange_1",
"STRUCT<f1: varchar(1)>", "col5", "errCode = 2");
+
+}
diff --git
a/regression-test/suites/schema_change_p0/test_dup_schema_value_modify3.groovy
b/regression-test/suites/schema_change_p0/test_dup_schema_value_modify3.groovy
index f6dafb80aee..caa7a3ffa79 100644
---
a/regression-test/suites/schema_change_p0/test_dup_schema_value_modify3.groovy
+++
b/regression-test/suites/schema_change_p0/test_dup_schema_value_modify3.groovy
@@ -88,8 +88,8 @@ suite("test_dup_schema_value_modify3", "p0") {
" (789012345, 'Grace', 2.19656, 'Xian', 29, 0,
13333333333, 'No. 222 Street, Xian', '2022-07-07 22:00:00', {'a': 700, 'b':
200}, '[\"abc\", \"def\"]');"
//TODO Test the dup model by modify a value type from MAP to BOOLEAN
- errorMessage = "errCode = 2, detailMessage = Can not change MAP to BOOLEAN"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column m BOOLEAN """
@@ -102,8 +102,8 @@ suite("test_dup_schema_value_modify3", "p0") {
// TODO Test the dup model by modify a value type from MAP to TINYINT
- errorMessage = "errCode = 2, detailMessage = Can not change MAP to TINYINT"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column m TINYINT """
@@ -116,8 +116,8 @@ suite("test_dup_schema_value_modify3", "p0") {
//Test the dup model by modify a value type from MAP to SMALLINT
- errorMessage = "errCode = 2, detailMessage = Can not change MAP to
SMALLINT"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column m SMALLINT """
@@ -130,8 +130,8 @@ suite("test_dup_schema_value_modify3", "p0") {
}, errorMessage)
//Test the dup model by modify a value type from MAP to INT
- errorMessage = "errCode = 2, detailMessage = Can not change MAP to INT"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column m INT """
@@ -145,8 +145,8 @@ suite("test_dup_schema_value_modify3", "p0") {
//Test the dup model by modify a value type from MAP to BIGINT
- errorMessage = "errCode = 2, detailMessage = Can not change MAP to BIGINT"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column m BIGINT """
@@ -159,8 +159,8 @@ suite("test_dup_schema_value_modify3", "p0") {
}, errorMessage)
//Test the dup model by modify a value type from MAP to LARGEINT
- errorMessage = "errCode = 2, detailMessage = Can not change MAP to
LARGEINT"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column m LARGEINT """
@@ -173,8 +173,8 @@ suite("test_dup_schema_value_modify3", "p0") {
//Test the dup model by modify a value type from MAP to FLOAT
- errorMessage = "errCode = 2, detailMessage = Can not change MAP to FLOAT"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column m FLOAT """
@@ -187,8 +187,8 @@ suite("test_dup_schema_value_modify3", "p0") {
//TODO Test the dup model by modify a value type from MAP to DECIMAL
- errorMessage = "errCode = 2, detailMessage = Can not change MAP to
DECIMAL128"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column m DECIMAL(38,0) """
@@ -202,8 +202,8 @@ suite("test_dup_schema_value_modify3", "p0") {
//TODO Test the dup model by modify a value type from MAP to DATE
- errorMessage = "errCode = 2, detailMessage = Can not change MAP to DATEV2"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column m DATE """
@@ -216,8 +216,8 @@ suite("test_dup_schema_value_modify3", "p0") {
}, errorMessage)
//TODO Test the dup model by modify a value type from MAP to DATEV2
- errorMessage = "errCode = 2, detailMessage = Can not change MAP to DATEV2"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column m DATEV2 """
@@ -231,8 +231,8 @@ suite("test_dup_schema_value_modify3", "p0") {
//TODO Test the dup model by modify a value type from MAP to DATETIME
- errorMessage = "errCode = 2, detailMessage = Can not change MAP to
DATETIMEV2"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column m DATETIME """
@@ -245,8 +245,8 @@ suite("test_dup_schema_value_modify3", "p0") {
}, errorMessage)
//TODO Test the dup model by modify a value type from MAP to DATETIME
- errorMessage = "errCode = 2, detailMessage = Can not change MAP to
DATETIMEV2"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column m DATETIMEV2 """
@@ -260,8 +260,8 @@ suite("test_dup_schema_value_modify3", "p0") {
//Test the dup model by modify a value type from MAP to VARCHAR
- errorMessage = "errCode = 2, detailMessage = Can not change MAP to VARCHAR"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column m VARCHAR(100) """
@@ -273,8 +273,8 @@ suite("test_dup_schema_value_modify3", "p0") {
}, errorMessage)
//Test the dup model by modify a value type from MAP to STRING
- errorMessage = "errCode = 2, detailMessage = Can not change MAP to STRING"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column m STRING """
@@ -286,8 +286,8 @@ suite("test_dup_schema_value_modify3", "p0") {
}, errorMessage)
//Test the dup model by modify a value type from MAP to JSON
- errorMessage = "errCode = 2, detailMessage = Can not change MAP to JSON"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column m JSON """
@@ -333,7 +333,7 @@ suite("test_dup_schema_value_modify3", "p0") {
//TODO Test the dup model by modify a value type from JSON to BOOLEAN
errorMessage = "errCode = 2, detailMessage = Can not change JSON to
BOOLEAN"
- expectException({
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column j BOOLEAN """
@@ -347,7 +347,7 @@ suite("test_dup_schema_value_modify3", "p0") {
// TODO Test the dup model by modify a value type from JSON to TINYINT
errorMessage = "errCode = 2, detailMessage = Can not change JSON to
TINYINT"
- expectException({
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column j TINYINT """
@@ -361,7 +361,7 @@ suite("test_dup_schema_value_modify3", "p0") {
//Test the dup model by modify a value type from JSON to SMALLINT
errorMessage = "errCode = 2, detailMessage = Can not change JSON to
SMALLINT"
- expectException({
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column j SMALLINT """
@@ -375,7 +375,7 @@ suite("test_dup_schema_value_modify3", "p0") {
//Test the dup model by modify a value type from JSON to INT
errorMessage = "errCode = 2, detailMessage = Can not change JSON to INT"
- expectException({
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column j INT """
@@ -390,7 +390,7 @@ suite("test_dup_schema_value_modify3", "p0") {
//Test the dup model by modify a value type from JSON to BIGINT
errorMessage = "errCode = 2, detailMessage = Can not change JSON to BIGINT"
- expectException({
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column j BIGINT """
@@ -404,7 +404,7 @@ suite("test_dup_schema_value_modify3", "p0") {
//Test the dup model by modify a value type from JSON to LARGEINT
errorMessage = "errCode = 2, detailMessage = Can not change JSON to
LARGEINT"
- expectException({
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column j LARGEINT """
@@ -418,7 +418,7 @@ suite("test_dup_schema_value_modify3", "p0") {
//Test the dup model by modify a value type from JSON to FLOAT
errorMessage = "errCode = 2, detailMessage = Can not change JSON to FLOAT"
- expectException({
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column j FLOAT """
@@ -432,7 +432,7 @@ suite("test_dup_schema_value_modify3", "p0") {
//TODO Test the dup model by modify a value type from JSON to DECIMAL
errorMessage = "errCode = 2, detailMessage = Can not change JSON to
DECIMAL128"
- expectException({
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column j DECIMAL(38,0) """
@@ -447,7 +447,7 @@ suite("test_dup_schema_value_modify3", "p0") {
//TODO Test the dup model by modify a value type from JSON to DATE
errorMessage = "errCode = 2, detailMessage = Can not change JSON to DATEV2"
- expectException({
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column j DATE """
@@ -461,7 +461,7 @@ suite("test_dup_schema_value_modify3", "p0") {
//TODO Test the dup model by modify a value type from JSON to DATEV2
errorMessage = "errCode = 2, detailMessage = Can not change JSON to DATEV2"
- expectException({
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column j DATEV2 """
@@ -476,7 +476,7 @@ suite("test_dup_schema_value_modify3", "p0") {
//TODO Test the dup model by modify a value type from JSON to DATETIME
errorMessage = "errCode = 2, detailMessage = Can not change JSON to
DATETIMEV2"
- expectException({
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column j DATETIME """
@@ -490,7 +490,7 @@ suite("test_dup_schema_value_modify3", "p0") {
//TODO Test the dup model by modify a value type from JSON to DATETIME
errorMessage = "errCode = 2, detailMessage = Can not change JSON to
DATETIMEV2"
- expectException({
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column j DATETIMEV2 """
@@ -505,7 +505,7 @@ suite("test_dup_schema_value_modify3", "p0") {
//Test the dup model by modify a value type from JSON to VARCHAR
errorMessage = "errCode = 2, detailMessage = Can not change JSON to
VARCHAR"
- expectException({
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column j VARCHAR(100) """
@@ -518,7 +518,7 @@ suite("test_dup_schema_value_modify3", "p0") {
//Test the dup model by modify a value type from JSON to STRING
errorMessage = "errCode = 2, detailMessage = Can not change JSON to STRING"
- expectException({
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column j STRING """
@@ -530,11 +530,11 @@ suite("test_dup_schema_value_modify3", "p0") {
}, errorMessage)
//Test the dup model by modify a value type from JSON to MAP
- errorMessage = "expected:<[FINISH]ED> but was:<[CANCELL]ED>"
- expectException({
+ errorMessage = "errCode = 2"
+ expectExceptionLike({
sql initTable
sql initTableData
- sql """ alter table ${tbName1} MODIFY column j JSON """
+ sql """ alter table ${tbName1} MODIFY column j Map<STRING, INT> """
insertSql = "insert into ${tbName1} values(923456689, 'Alice', 8.47,
'yaan', 25, 0, 13812345678, 'No. 123 Street, Beijing', '2022-01-01 10:00:00',
{'a': 700, 'b': 200}, {'a': 700, 'b': 200}); "
waitForSchemaChangeDone({
sql getTableStatusSql
@@ -577,8 +577,8 @@ suite("test_dup_schema_value_modify3", "p0") {
" (789012345, 'Grace', 2.19656, 'Xian', 29, 0,
13333333333, 'No. 222 Street, Xian', '2022-07-07 22:00:00', {'a': 700, 'b':
200}, '[\"abc\", \"def\"]', [6,7,8], {1, 'sn1', 'sa1'});"
//TODO Test the dup model by modify a value type from array to BOOLEAN
- errorMessage = "errCode = 2, detailMessage = Can not change ARRAY to
BOOLEAN"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column array BOOLEAN """
@@ -591,8 +591,8 @@ suite("test_dup_schema_value_modify3", "p0") {
// TODO Test the dup model by modify a value type from ARRAY to TINYINT
- errorMessage = "errCode = 2, detailMessage = Can not change ARRAY to
TINYINT"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column array TINYINT """
@@ -605,8 +605,8 @@ suite("test_dup_schema_value_modify3", "p0") {
//Test the dup model by modify a value type from ARRAY to SMALLINT
- errorMessage = "errCode = 2, detailMessage = Can not change ARRAY to
SMALLINT"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column array SMALLINT """
@@ -619,8 +619,8 @@ suite("test_dup_schema_value_modify3", "p0") {
}, errorMessage)
//Test the dup model by modify a value type from ARRAY to INT
- errorMessage = "errCode = 2, detailMessage = Can not change ARRAY to INT"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column array INT """
@@ -634,8 +634,8 @@ suite("test_dup_schema_value_modify3", "p0") {
//Test the dup model by modify a value type from ARRAY to BIGINT
- errorMessage = "errCode = 2, detailMessage = Can not change ARRAY to
BIGINT"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column array BIGINT """
@@ -648,8 +648,8 @@ suite("test_dup_schema_value_modify3", "p0") {
}, errorMessage)
//Test the dup model by modify a value type from ARRAY to LARGEINT
- errorMessage = "errCode = 2, detailMessage = Can not change ARRAY to
LARGEINT"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column array LARGEINT """
@@ -662,8 +662,8 @@ suite("test_dup_schema_value_modify3", "p0") {
//Test the dup model by modify a value type from ARRAY to FLOAT
- errorMessage = "errCode = 2, detailMessage = Can not change ARRAY to FLOAT"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column array FLOAT """
@@ -676,8 +676,8 @@ suite("test_dup_schema_value_modify3", "p0") {
//TODO Test the dup model by modify a value type from ARRAY to DECIMAL
- errorMessage = "errCode = 2, detailMessage = Can not change ARRAY to
DECIMAL128"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column array DECIMAL(38,0) """
@@ -691,8 +691,8 @@ suite("test_dup_schema_value_modify3", "p0") {
//TODO Test the dup model by modify a value type from ARRAY to DATE
- errorMessage = "errCode = 2, detailMessage = Can not change ARRAY to
DATEV2"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column array DATE """
@@ -705,8 +705,8 @@ suite("test_dup_schema_value_modify3", "p0") {
}, errorMessage)
//TODO Test the dup model by modify a value type from ARRAY to DATEV2
- errorMessage = "errCode = 2, detailMessage = Can not change ARRAY to
DATEV2"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column array DATEV2 """
@@ -720,8 +720,8 @@ suite("test_dup_schema_value_modify3", "p0") {
//TODO Test the dup model by modify a value type from ARRAY to DATETIME
- errorMessage = "errCode = 2, detailMessage = Can not change ARRAY to
DATETIMEV2"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column array DATETIME """
@@ -734,8 +734,8 @@ suite("test_dup_schema_value_modify3", "p0") {
}, errorMessage)
//TODO Test the dup model by modify a value type from ARRAY to DATETIME
- errorMessage = "errCode = 2, detailMessage = Can not change ARRAY to
DATETIMEV2"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column array DATETIMEV2 """
@@ -749,8 +749,8 @@ suite("test_dup_schema_value_modify3", "p0") {
//Test the dup model by modify a value type from ARRAY to VARCHAR
- errorMessage = "errCode = 2, detailMessage = Can not change ARRAY to
VARCHAR"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column array VARCHAR(100) """
@@ -762,8 +762,8 @@ suite("test_dup_schema_value_modify3", "p0") {
}, errorMessage)
//Test the dup model by modify a value type from ARRAY to STRING
- errorMessage = "errCode = 2, detailMessage = Can not change ARRAY to
STRING"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column array STRING """
@@ -775,8 +775,8 @@ suite("test_dup_schema_value_modify3", "p0") {
}, errorMessage)
//Test the dup model by modify a value type from ARRAY to JSON
- errorMessage = "errCode = 2, detailMessage = Can not change ARRAY to JSON"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column array JSON """
@@ -788,8 +788,8 @@ suite("test_dup_schema_value_modify3", "p0") {
}, errorMessage)
//Test the dup model by modify a value type from ARRAY to JSON
- errorMessage = "errCode = 2, detailMessage = Can not change ARRAY to MAP"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column array Map<STRING, INT>
"""
@@ -802,8 +802,8 @@ suite("test_dup_schema_value_modify3", "p0") {
//Test the dup model by modify a value type from ARRAY to JSON
- errorMessage = "errCode = 2, detailMessage = Can not change ARRAY to
STRUCT"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column array
STRUCT<s_id:int(11), s_name:string, s_address:string> """
@@ -850,8 +850,8 @@ suite("test_dup_schema_value_modify3", "p0") {
" (789012345, 'Grace', 2.19656, 'Xian', 29, 0,
13333333333, 'No. 222 Street, Xian', '2022-07-07 22:00:00', {'a': 700, 'b':
200}, '[\"abc\", \"def\"]', [6,7,8], {1, 'sn1', 'sa1'});"
//TODO Test the dup model by modify a value type from STRUCT to BOOLEAN
- errorMessage = "errCode = 2, detailMessage = Can not change STRUCT to
BOOLEAN"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column STRUCT BOOLEAN """
@@ -864,8 +864,8 @@ suite("test_dup_schema_value_modify3", "p0") {
// TODO Test the dup model by modify a value type from STRUCT to TINYINT
- errorMessage = "errCode = 2, detailMessage = Can not change STRUCT to
TINYINT"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column STRUCT TINYINT """
@@ -878,8 +878,8 @@ suite("test_dup_schema_value_modify3", "p0") {
//Test the dup model by modify a value type from STRUCT to SMALLINT
- errorMessage = "errCode = 2, detailMessage = Can not change STRUCT to
SMALLINT"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column STRUCT SMALLINT """
@@ -892,8 +892,8 @@ suite("test_dup_schema_value_modify3", "p0") {
}, errorMessage)
//Test the dup model by modify a value type from STRUCT to INT
- errorMessage = "errCode = 2, detailMessage = Can not change STRUCT to INT"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column STRUCT INT """
@@ -907,8 +907,8 @@ suite("test_dup_schema_value_modify3", "p0") {
//Test the dup model by modify a value type from STRUCT to BIGINT
- errorMessage = "errCode = 2, detailMessage = Can not change STRUCT to
BIGINT"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column STRUCT BIGINT """
@@ -921,8 +921,8 @@ suite("test_dup_schema_value_modify3", "p0") {
}, errorMessage)
//Test the dup model by modify a value type from STRUCT to LARGEINT
- errorMessage = "errCode = 2, detailMessage = Can not change STRUCT to
LARGEINT"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column STRUCT LARGEINT """
@@ -935,8 +935,8 @@ suite("test_dup_schema_value_modify3", "p0") {
//Test the dup model by modify a value type from STRUCT to FLOAT
- errorMessage = "errCode = 2, detailMessage = Can not change STRUCT to
FLOAT"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column STRUCT FLOAT """
@@ -949,8 +949,8 @@ suite("test_dup_schema_value_modify3", "p0") {
//TODO Test the dup model by modify a value type from STRUCT to DECIMAL
- errorMessage = "errCode = 2, detailMessage = Can not change STRUCT to
DECIMAL128"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column STRUCT DECIMAL(38,0)
"""
@@ -964,8 +964,8 @@ suite("test_dup_schema_value_modify3", "p0") {
//TODO Test the dup model by modify a value type from STRUCT to DATE
- errorMessage = "errCode = 2, detailMessage = Can not change STRUCT to
DATEV2"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column STRUCT DATE """
@@ -978,8 +978,8 @@ suite("test_dup_schema_value_modify3", "p0") {
}, errorMessage)
//TODO Test the dup model by modify a value type from STRUCT to DATEV2
- errorMessage = "errCode = 2, detailMessage = Can not change STRUCT to
DATEV2"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column STRUCT DATEV2 """
@@ -993,8 +993,8 @@ suite("test_dup_schema_value_modify3", "p0") {
//TODO Test the dup model by modify a value type from STRUCT to DATETIME
- errorMessage = "errCode = 2, detailMessage = Can not change STRUCT to
DATETIMEV2"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column STRUCT DATETIME """
@@ -1007,8 +1007,8 @@ suite("test_dup_schema_value_modify3", "p0") {
}, errorMessage)
//TODO Test the dup model by modify a value type from STRUCT to DATETIME
- errorMessage = "errCode = 2, detailMessage = Can not change STRUCT to
DATETIMEV2"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column STRUCT DATETIMEV2 """
@@ -1022,8 +1022,8 @@ suite("test_dup_schema_value_modify3", "p0") {
//Test the dup model by modify a value type from STRUCT to VARCHAR
- errorMessage = "errCode = 2, detailMessage = Can not change STRUCT to
VARCHAR"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column STRUCT VARCHAR(100) """
@@ -1035,8 +1035,8 @@ suite("test_dup_schema_value_modify3", "p0") {
}, errorMessage)
//Test the dup model by modify a value type from STRUCT to STRING
- errorMessage = "errCode = 2, detailMessage = Can not change STRUCT to
STRING"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column STRUCT STRING """
@@ -1048,8 +1048,8 @@ suite("test_dup_schema_value_modify3", "p0") {
}, errorMessage)
//Test the dup model by modify a value type from STRUCT to JSON
- errorMessage = "errCode = 2, detailMessage = Can not change STRUCT to JSON"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column STRUCT JSON """
@@ -1061,8 +1061,8 @@ suite("test_dup_schema_value_modify3", "p0") {
}, errorMessage)
//Test the dup model by modify a value type from STRUCT to MAP
- errorMessage = "errCode = 2, detailMessage = Can not change STRUCT to MAP"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column STRUCT Map<STRING, INT>
"""
@@ -1075,8 +1075,8 @@ suite("test_dup_schema_value_modify3", "p0") {
//Test the dup model by modify a value type from STRUCT to ARRAY
- errorMessage = "errCode = 2, detailMessage = Can not change STRUCT to
ARRAY"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column STRUCT ARRAY<int(11)>
"""
diff --git
a/regression-test/suites/schema_change_p0/test_dup_schema_value_modify4.groovy
b/regression-test/suites/schema_change_p0/test_dup_schema_value_modify4.groovy
index 23ffe95f2de..525fc691688 100644
---
a/regression-test/suites/schema_change_p0/test_dup_schema_value_modify4.groovy
+++
b/regression-test/suites/schema_change_p0/test_dup_schema_value_modify4.groovy
@@ -87,8 +87,8 @@ suite("test_dup_schema_value_modify4", "p0") {
" (789012345, 'Grace', 2.19656, 'Xian', 29, 0,
13333333333, 'No. 222 Street, Xian', '2022-07-07 22:00:00', {'a': 700, 'b':
200}, '[\"abc\", \"def\"]');"
//TODO Test the dup model by modify a value type from MAP to BOOLEAN
- errorMessage = "errCode = 2, detailMessage = Can not change MAP to BOOLEAN"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column m BOOLEAN """
@@ -101,22 +101,22 @@ suite("test_dup_schema_value_modify4", "p0") {
// TODO Test the dup model by modify a value type from MAP to TINYINT
- errorMessage = "errCode = 2, detailMessage = Can not change MAP to TINYINT"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column m TINYINT """
insertSql = "insert into ${tbName1} values(923456689, 'Alice', 2.2,
'yaan', 25, 0, 13812345678, 'No. 123 Street, Beijing', '2022-01-01 10:00:00',
1, '{\"k1\":\"v1\", \"k2\": 200}'); "
waitForSchemaChangeDone({
sql getTableStatusSql
- time 120
+ time 600
}, insertSql, true, "${tbName1}")
}, errorMessage)
//Test the dup model by modify a value type from MAP to SMALLINT
- errorMessage = "errCode = 2, detailMessage = Can not change MAP to
SMALLINT"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column m SMALLINT """
@@ -129,8 +129,8 @@ suite("test_dup_schema_value_modify4", "p0") {
}, errorMessage)
//Test the dup model by modify a value type from MAP to INT
- errorMessage = "errCode = 2, detailMessage = Can not change MAP to INT"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column m INT """
@@ -144,8 +144,8 @@ suite("test_dup_schema_value_modify4", "p0") {
//Test the dup model by modify a value type from MAP to BIGINT
- errorMessage = "errCode = 2, detailMessage = Can not change MAP to BIGINT"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column m BIGINT """
@@ -158,8 +158,8 @@ suite("test_dup_schema_value_modify4", "p0") {
}, errorMessage)
//Test the dup model by modify a value type from MAP to LARGEINT
- errorMessage = "errCode = 2, detailMessage = Can not change MAP to
LARGEINT"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column m LARGEINT """
@@ -172,8 +172,8 @@ suite("test_dup_schema_value_modify4", "p0") {
//Test the dup model by modify a value type from MAP to FLOAT
- errorMessage = "errCode = 2, detailMessage = Can not change MAP to FLOAT"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column m FLOAT """
@@ -186,8 +186,8 @@ suite("test_dup_schema_value_modify4", "p0") {
//TODO Test the dup model by modify a value type from MAP to DECIMAL
- errorMessage = "errCode = 2, detailMessage = Can not change MAP to
DECIMAL128"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column m DECIMAL(38,0) """
@@ -201,8 +201,8 @@ suite("test_dup_schema_value_modify4", "p0") {
//TODO Test the dup model by modify a value type from MAP to DATE
- errorMessage = "errCode = 2, detailMessage = Can not change MAP to DATEV2"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column m DATE """
@@ -215,8 +215,8 @@ suite("test_dup_schema_value_modify4", "p0") {
}, errorMessage)
//TODO Test the dup model by modify a value type from MAP to DATEV2
- errorMessage = "errCode = 2, detailMessage = Can not change MAP to DATEV2"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column m DATEV2 """
@@ -230,8 +230,8 @@ suite("test_dup_schema_value_modify4", "p0") {
//TODO Test the dup model by modify a value type from MAP to DATETIME
- errorMessage = "errCode = 2, detailMessage = Can not change MAP to
DATETIMEV2"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column m DATETIME """
@@ -244,8 +244,8 @@ suite("test_dup_schema_value_modify4", "p0") {
}, errorMessage)
//TODO Test the dup model by modify a value type from MAP to DATETIME
- errorMessage = "errCode = 2, detailMessage = Can not change MAP to
DATETIMEV2"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column m DATETIMEV2 """
@@ -259,8 +259,8 @@ suite("test_dup_schema_value_modify4", "p0") {
//Test the dup model by modify a value type from MAP to VARCHAR
- errorMessage = "errCode = 2, detailMessage = Can not change MAP to VARCHAR"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column m VARCHAR(100) """
@@ -272,8 +272,8 @@ suite("test_dup_schema_value_modify4", "p0") {
}, errorMessage)
//Test the dup model by modify a value type from MAP to STRING
- errorMessage = "errCode = 2, detailMessage = Can not change MAP to STRING"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column m STRING """
@@ -285,8 +285,8 @@ suite("test_dup_schema_value_modify4", "p0") {
}, errorMessage)
//Test the dup model by modify a value type from MAP to JSON
- errorMessage = "errCode = 2, detailMessage = Can not change MAP to JSON"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column m JSON """
@@ -332,7 +332,7 @@ suite("test_dup_schema_value_modify4", "p0") {
//TODO Test the dup model by modify a value type from JSON to BOOLEAN
errorMessage = "errCode = 2, detailMessage = Can not change JSON to
BOOLEAN"
- expectException({
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column j BOOLEAN """
@@ -346,21 +346,21 @@ suite("test_dup_schema_value_modify4", "p0") {
// TODO Test the dup model by modify a value type from JSON to TINYINT
errorMessage = "errCode = 2, detailMessage = Can not change JSON to
TINYINT"
- expectException({
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column j TINYINT """
insertSql = "insert into ${tbName1} values(923456689, 'Alice', 2.2,
'yaan', 25, 0, 13812345678, 'No. 123 Street, Beijing', '2022-01-01 10:00:00',
{'a': 700, 'b': 200}, 1); "
waitForSchemaChangeDone({
sql getTableStatusSql
- time 120
+ time 600
}, insertSql, true, "${tbName1}")
}, errorMessage)
//Test the dup model by modify a value type from JSON to SMALLINT
errorMessage = "errCode = 2, detailMessage = Can not change JSON to
SMALLINT"
- expectException({
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column j SMALLINT """
@@ -374,7 +374,7 @@ suite("test_dup_schema_value_modify4", "p0") {
//Test the dup model by modify a value type from JSON to INT
errorMessage = "errCode = 2, detailMessage = Can not change JSON to INT"
- expectException({
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column j INT """
@@ -389,7 +389,7 @@ suite("test_dup_schema_value_modify4", "p0") {
//Test the dup model by modify a value type from JSON to BIGINT
errorMessage = "errCode = 2, detailMessage = Can not change JSON to BIGINT"
- expectException({
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column j BIGINT """
@@ -403,7 +403,7 @@ suite("test_dup_schema_value_modify4", "p0") {
//Test the dup model by modify a value type from JSON to LARGEINT
errorMessage = "errCode = 2, detailMessage = Can not change JSON to
LARGEINT"
- expectException({
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column j LARGEINT """
@@ -417,7 +417,7 @@ suite("test_dup_schema_value_modify4", "p0") {
//Test the dup model by modify a value type from JSON to FLOAT
errorMessage = "errCode = 2, detailMessage = Can not change JSON to FLOAT"
- expectException({
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column j FLOAT """
@@ -431,7 +431,7 @@ suite("test_dup_schema_value_modify4", "p0") {
//TODO Test the dup model by modify a value type from JSON to DECIMAL
errorMessage = "errCode = 2, detailMessage = Can not change JSON to
DECIMAL128"
- expectException({
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column j DECIMAL(38,0) """
@@ -446,7 +446,7 @@ suite("test_dup_schema_value_modify4", "p0") {
//TODO Test the dup model by modify a value type from JSON to DATE
errorMessage = "errCode = 2, detailMessage = Can not change JSON to DATEV2"
- expectException({
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column j DATE """
@@ -460,7 +460,7 @@ suite("test_dup_schema_value_modify4", "p0") {
//TODO Test the dup model by modify a value type from JSON to DATEV2
errorMessage = "errCode = 2, detailMessage = Can not change JSON to DATEV2"
- expectException({
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column j DATEV2 """
@@ -475,7 +475,7 @@ suite("test_dup_schema_value_modify4", "p0") {
//TODO Test the dup model by modify a value type from JSON to DATETIME
errorMessage = "errCode = 2, detailMessage = Can not change JSON to
DATETIMEV2"
- expectException({
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column j DATETIME """
@@ -489,7 +489,7 @@ suite("test_dup_schema_value_modify4", "p0") {
//TODO Test the dup model by modify a value type from JSON to DATETIME
errorMessage = "errCode = 2, detailMessage = Can not change JSON to
DATETIMEV2"
- expectException({
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column j DATETIMEV2 """
@@ -504,7 +504,7 @@ suite("test_dup_schema_value_modify4", "p0") {
//Test the dup model by modify a value type from JSON to VARCHAR
errorMessage = "errCode = 2, detailMessage = Can not change JSON to
VARCHAR"
- expectException({
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column j VARCHAR(100) """
@@ -517,7 +517,7 @@ suite("test_dup_schema_value_modify4", "p0") {
//Test the dup model by modify a value type from JSON to STRING
errorMessage = "errCode = 2, detailMessage = Can not change JSON to STRING"
- expectException({
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column j STRING """
@@ -529,11 +529,11 @@ suite("test_dup_schema_value_modify4", "p0") {
}, errorMessage)
//Test the dup model by modify a value type from JSON to MAP
- errorMessage = "expected:<[FINISH]ED> but was:<[CANCELL]ED>"
- expectException({
+ errorMessage = "errCode = 2"
+ expectExceptionLike({
sql initTable
sql initTableData
- sql """ alter table ${tbName1} MODIFY column j JSON """
+ sql """ alter table ${tbName1} MODIFY column j Map<STRING, INT> """
insertSql = "insert into ${tbName1} values(923456689, 'Alice', 8.47,
'yaan', 25, 0, 13812345678, 'No. 123 Street, Beijing', '2022-01-01 10:00:00',
{'a': 700, 'b': 200}, {'a': 700, 'b': 200}); "
waitForSchemaChangeDone({
sql getTableStatusSql
@@ -576,8 +576,8 @@ suite("test_dup_schema_value_modify4", "p0") {
" (789012345, 'Grace', 2.19656, 'Xian', 29, 0,
13333333333, 'No. 222 Street, Xian', '2022-07-07 22:00:00', {'a': 700, 'b':
200}, '[\"abc\", \"def\"]', [6,7,8], {1, 'sn1', 'sa1'});"
//TODO Test the dup model by modify a value type from array to BOOLEAN
- errorMessage = "errCode = 2, detailMessage = Can not change ARRAY to
BOOLEAN"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column array BOOLEAN """
@@ -590,22 +590,22 @@ suite("test_dup_schema_value_modify4", "p0") {
// TODO Test the dup model by modify a value type from ARRAY to TINYINT
- errorMessage = "errCode = 2, detailMessage = Can not change ARRAY to
TINYINT"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column array TINYINT """
insertSql = "insert into ${tbName1} values(923456689, 'Alice', 2.2,
'yaan', 25, 0, 13812345678, 'No. 123 Street, Beijing', '2022-01-01 10:00:00',
{'a': 700, 'b': 200}, '[\\\"abc\\\", \\\"def\\\"]', 1, {1, 'sn1', 'sa1'}); "
waitForSchemaChangeDone({
sql getTableStatusSql
- time 120
+ time 600
}, insertSql, true, "${tbName1}")
}, errorMessage)
//Test the dup model by modify a value type from ARRAY to SMALLINT
- errorMessage = "errCode = 2, detailMessage = Can not change ARRAY to
SMALLINT"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column array SMALLINT """
@@ -618,8 +618,8 @@ suite("test_dup_schema_value_modify4", "p0") {
}, errorMessage)
//Test the dup model by modify a value type from ARRAY to INT
- errorMessage = "errCode = 2, detailMessage = Can not change ARRAY to INT"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column array INT """
@@ -633,8 +633,8 @@ suite("test_dup_schema_value_modify4", "p0") {
//Test the dup model by modify a value type from ARRAY to BIGINT
- errorMessage = "errCode = 2, detailMessage = Can not change ARRAY to
BIGINT"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column array BIGINT """
@@ -647,8 +647,8 @@ suite("test_dup_schema_value_modify4", "p0") {
}, errorMessage)
//Test the dup model by modify a value type from ARRAY to LARGEINT
- errorMessage = "errCode = 2, detailMessage = Can not change ARRAY to
LARGEINT"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column array LARGEINT """
@@ -661,8 +661,8 @@ suite("test_dup_schema_value_modify4", "p0") {
//Test the dup model by modify a value type from ARRAY to FLOAT
- errorMessage = "errCode = 2, detailMessage = Can not change ARRAY to FLOAT"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column array FLOAT """
@@ -675,8 +675,8 @@ suite("test_dup_schema_value_modify4", "p0") {
//TODO Test the dup model by modify a value type from ARRAY to DECIMAL
- errorMessage = "errCode = 2, detailMessage = Can not change ARRAY to
DECIMAL128"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column array DECIMAL(38,0) """
@@ -690,8 +690,8 @@ suite("test_dup_schema_value_modify4", "p0") {
//TODO Test the dup model by modify a value type from ARRAY to DATE
- errorMessage = "errCode = 2, detailMessage = Can not change ARRAY to
DATEV2"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column array DATE """
@@ -704,8 +704,8 @@ suite("test_dup_schema_value_modify4", "p0") {
}, errorMessage)
//TODO Test the dup model by modify a value type from ARRAY to DATEV2
- errorMessage = "errCode = 2, detailMessage = Can not change ARRAY to
DATEV2"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column array DATEV2 """
@@ -719,8 +719,8 @@ suite("test_dup_schema_value_modify4", "p0") {
//TODO Test the dup model by modify a value type from ARRAY to DATETIME
- errorMessage = "errCode = 2, detailMessage = Can not change ARRAY to
DATETIMEV2"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column array DATETIME """
@@ -733,8 +733,8 @@ suite("test_dup_schema_value_modify4", "p0") {
}, errorMessage)
//TODO Test the dup model by modify a value type from ARRAY to DATETIME
- errorMessage = "errCode = 2, detailMessage = Can not change ARRAY to
DATETIMEV2"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column array DATETIMEV2 """
@@ -748,8 +748,8 @@ suite("test_dup_schema_value_modify4", "p0") {
//Test the dup model by modify a value type from ARRAY to VARCHAR
- errorMessage = "errCode = 2, detailMessage = Can not change ARRAY to
VARCHAR"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column array VARCHAR(100) """
@@ -761,8 +761,8 @@ suite("test_dup_schema_value_modify4", "p0") {
}, errorMessage)
//Test the dup model by modify a value type from ARRAY to STRING
- errorMessage = "errCode = 2, detailMessage = Can not change ARRAY to
STRING"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column array STRING """
@@ -774,8 +774,8 @@ suite("test_dup_schema_value_modify4", "p0") {
}, errorMessage)
//Test the dup model by modify a value type from ARRAY to JSON
- errorMessage = "errCode = 2, detailMessage = Can not change ARRAY to JSON"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column array JSON """
@@ -787,8 +787,8 @@ suite("test_dup_schema_value_modify4", "p0") {
}, errorMessage)
//Test the dup model by modify a value type from ARRAY to JSON
- errorMessage = "errCode = 2, detailMessage = Can not change ARRAY to MAP"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column array Map<STRING, INT>
"""
@@ -801,8 +801,8 @@ suite("test_dup_schema_value_modify4", "p0") {
//Test the dup model by modify a value type from ARRAY to JSON
- errorMessage = "errCode = 2, detailMessage = Can not change ARRAY to
STRUCT"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column array
STRUCT<s_id:int(11), s_name:string, s_address:string> """
@@ -849,8 +849,8 @@ suite("test_dup_schema_value_modify4", "p0") {
" (789012345, 'Grace', 2.19656, 'Xian', 29, 0,
13333333333, 'No. 222 Street, Xian', '2022-07-07 22:00:00', {'a': 700, 'b':
200}, '[\"abc\", \"def\"]', [6,7,8], {1, 'sn1', 'sa1'});"
//TODO Test the dup model by modify a value type from STRUCT to BOOLEAN
- errorMessage = "errCode = 2, detailMessage = Can not change STRUCT to
BOOLEAN"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column STRUCT BOOLEAN """
@@ -863,22 +863,22 @@ suite("test_dup_schema_value_modify4", "p0") {
// TODO Test the dup model by modify a value type from STRUCT to TINYINT
- errorMessage = "errCode = 2, detailMessage = Can not change STRUCT to
TINYINT"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column STRUCT TINYINT """
insertSql = "insert into ${tbName1} values(923456689, 'Alice', 2.2,
'yaan', 25, 0, 13812345678, 'No. 123 Street, Beijing', '2022-01-01 10:00:00',
{'a': 700, 'b': 200}, '[\\\"abc\\\", \\\"def\\\"]', [6,7,8], 1); "
waitForSchemaChangeDone({
sql getTableStatusSql
- time 120
+ time 600
}, insertSql, true, "${tbName1}")
}, errorMessage)
//Test the dup model by modify a value type from STRUCT to SMALLINT
- errorMessage = "errCode = 2, detailMessage = Can not change STRUCT to
SMALLINT"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column STRUCT SMALLINT """
@@ -891,8 +891,8 @@ suite("test_dup_schema_value_modify4", "p0") {
}, errorMessage)
//Test the dup model by modify a value type from STRUCT to INT
- errorMessage = "errCode = 2, detailMessage = Can not change STRUCT to INT"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column STRUCT INT """
@@ -906,8 +906,8 @@ suite("test_dup_schema_value_modify4", "p0") {
//Test the dup model by modify a value type from STRUCT to BIGINT
- errorMessage = "errCode = 2, detailMessage = Can not change STRUCT to
BIGINT"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column STRUCT BIGINT """
@@ -920,8 +920,8 @@ suite("test_dup_schema_value_modify4", "p0") {
}, errorMessage)
//Test the dup model by modify a value type from STRUCT to LARGEINT
- errorMessage = "errCode = 2, detailMessage = Can not change STRUCT to
LARGEINT"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column STRUCT LARGEINT """
@@ -934,8 +934,8 @@ suite("test_dup_schema_value_modify4", "p0") {
//Test the dup model by modify a value type from STRUCT to FLOAT
- errorMessage = "errCode = 2, detailMessage = Can not change STRUCT to
FLOAT"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column STRUCT FLOAT """
@@ -948,8 +948,8 @@ suite("test_dup_schema_value_modify4", "p0") {
//TODO Test the dup model by modify a value type from STRUCT to DECIMAL
- errorMessage = "errCode = 2, detailMessage = Can not change STRUCT to
DECIMAL128"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column STRUCT DECIMAL(38,0)
"""
@@ -963,8 +963,8 @@ suite("test_dup_schema_value_modify4", "p0") {
//TODO Test the dup model by modify a value type from STRUCT to DATE
- errorMessage = "errCode = 2, detailMessage = Can not change STRUCT to
DATEV2"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column STRUCT DATE """
@@ -977,8 +977,8 @@ suite("test_dup_schema_value_modify4", "p0") {
}, errorMessage)
//TODO Test the dup model by modify a value type from STRUCT to DATEV2
- errorMessage = "errCode = 2, detailMessage = Can not change STRUCT to
DATEV2"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column STRUCT DATEV2 """
@@ -992,8 +992,8 @@ suite("test_dup_schema_value_modify4", "p0") {
//TODO Test the dup model by modify a value type from STRUCT to DATETIME
- errorMessage = "errCode = 2, detailMessage = Can not change STRUCT to
DATETIMEV2"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column STRUCT DATETIME """
@@ -1006,8 +1006,8 @@ suite("test_dup_schema_value_modify4", "p0") {
}, errorMessage)
//TODO Test the dup model by modify a value type from STRUCT to DATETIME
- errorMessage = "errCode = 2, detailMessage = Can not change STRUCT to
DATETIMEV2"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column STRUCT DATETIMEV2 """
@@ -1021,8 +1021,8 @@ suite("test_dup_schema_value_modify4", "p0") {
//Test the dup model by modify a value type from STRUCT to VARCHAR
- errorMessage = "errCode = 2, detailMessage = Can not change STRUCT to
VARCHAR"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column STRUCT VARCHAR(100) """
@@ -1034,8 +1034,8 @@ suite("test_dup_schema_value_modify4", "p0") {
}, errorMessage)
//Test the dup model by modify a value type from STRUCT to STRING
- errorMessage = "errCode = 2, detailMessage = Can not change STRUCT to
STRING"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column STRUCT STRING """
@@ -1047,8 +1047,8 @@ suite("test_dup_schema_value_modify4", "p0") {
}, errorMessage)
//Test the dup model by modify a value type from STRUCT to JSON
- errorMessage = "errCode = 2, detailMessage = Can not change STRUCT to JSON"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column STRUCT JSON """
@@ -1060,8 +1060,8 @@ suite("test_dup_schema_value_modify4", "p0") {
}, errorMessage)
//Test the dup model by modify a value type from STRUCT to MAP
- errorMessage = "errCode = 2, detailMessage = Can not change STRUCT to MAP"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column STRUCT Map<STRING, INT>
"""
@@ -1074,8 +1074,8 @@ suite("test_dup_schema_value_modify4", "p0") {
//Test the dup model by modify a value type from STRUCT to ARRAY
- errorMessage = "errCode = 2, detailMessage = Can not change STRUCT to
ARRAY"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName1} MODIFY column STRUCT ARRAY<int(11)>
"""
diff --git
a/regression-test/suites/schema_change_p0/test_unique_schema_value_modify3.groovy
b/regression-test/suites/schema_change_p0/test_unique_schema_value_modify3.groovy
index 07ed02f154a..0c9bcbf29e8 100644
---
a/regression-test/suites/schema_change_p0/test_unique_schema_value_modify3.groovy
+++
b/regression-test/suites/schema_change_p0/test_unique_schema_value_modify3.groovy
@@ -90,8 +90,8 @@ suite("test_unique_schema_value_modify3", "p0") {
" (789012345, 'Grace', 2.19656, 'Xian', 29, 0,
13333333333, 'No. 222 Street, Xian', '2022-07-07 22:00:00', {'a': 700, 'b':
200}, '[\"abc\", \"def\"]');"
//TODO Test the unique model by modify a value type from MAP to BOOLEAN
- errorMessage = "errCode = 2, detailMessage = Can not change MAP to BOOLEAN"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName} MODIFY column m BOOLEAN """
@@ -104,8 +104,8 @@ suite("test_unique_schema_value_modify3", "p0") {
// TODO Test the unique model by modify a value type from MAP to TINYINT
- errorMessage = "errCode = 2, detailMessage = Can not change MAP to TINYINT"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName} MODIFY column m TINYINT """
@@ -118,8 +118,8 @@ suite("test_unique_schema_value_modify3", "p0") {
//Test the unique model by modify a value type from MAP to SMALLINT
- errorMessage = "errCode = 2, detailMessage = Can not change MAP to
SMALLINT"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName} MODIFY column m SMALLINT """
@@ -132,8 +132,8 @@ suite("test_unique_schema_value_modify3", "p0") {
}, errorMessage)
//Test the unique model by modify a value type from MAP to INT
- errorMessage = "errCode = 2, detailMessage = Can not change MAP to INT"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName} MODIFY column m INT """
@@ -147,8 +147,8 @@ suite("test_unique_schema_value_modify3", "p0") {
//Test the unique model by modify a value type from MAP to BIGINT
- errorMessage = "errCode = 2, detailMessage = Can not change MAP to BIGINT"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName} MODIFY column m BIGINT """
@@ -161,8 +161,8 @@ suite("test_unique_schema_value_modify3", "p0") {
}, errorMessage)
//Test the unique model by modify a value type from MAP to LARGEINT
- errorMessage = "errCode = 2, detailMessage = Can not change MAP to
LARGEINT"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName} MODIFY column m LARGEINT """
@@ -175,8 +175,8 @@ suite("test_unique_schema_value_modify3", "p0") {
//Test the unique model by modify a value type from MAP to FLOAT
- errorMessage = "errCode = 2, detailMessage = Can not change MAP to FLOAT"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName} MODIFY column m FLOAT """
@@ -189,8 +189,8 @@ suite("test_unique_schema_value_modify3", "p0") {
//TODO Test the unique model by modify a value type from MAP to DECIMAL
- errorMessage = "errCode = 2, detailMessage = Can not change MAP to
DECIMAL128"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName} MODIFY column m DECIMAL(38,0) """
@@ -204,8 +204,8 @@ suite("test_unique_schema_value_modify3", "p0") {
//TODO Test the unique model by modify a value type from MAP to DATE
- errorMessage = "errCode = 2, detailMessage = Can not change MAP to DATEV2"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName} MODIFY column m DATE """
@@ -218,8 +218,8 @@ suite("test_unique_schema_value_modify3", "p0") {
}, errorMessage)
//TODO Test the unique model by modify a value type from MAP to DATEV2
- errorMessage = "errCode = 2, detailMessage = Can not change MAP to DATEV2"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName} MODIFY column m DATEV2 """
@@ -233,8 +233,8 @@ suite("test_unique_schema_value_modify3", "p0") {
//TODO Test the unique model by modify a value type from MAP to DATETIME
- errorMessage = "errCode = 2, detailMessage = Can not change MAP to
DATETIMEV2"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName} MODIFY column m DATETIME """
@@ -247,8 +247,8 @@ suite("test_unique_schema_value_modify3", "p0") {
}, errorMessage)
//TODO Test the unique model by modify a value type from MAP to DATETIME
- errorMessage = "errCode = 2, detailMessage = Can not change MAP to
DATETIMEV2"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName} MODIFY column m DATETIMEV2 """
@@ -262,8 +262,8 @@ suite("test_unique_schema_value_modify3", "p0") {
//Test the unique model by modify a value type from MAP to VARCHAR
- errorMessage = "errCode = 2, detailMessage = Can not change MAP to VARCHAR"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName} MODIFY column m VARCHAR(100) """
@@ -275,8 +275,8 @@ suite("test_unique_schema_value_modify3", "p0") {
}, errorMessage)
//Test the unique model by modify a value type from MAP to STRING
- errorMessage = "errCode = 2, detailMessage = Can not change MAP to STRING"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName} MODIFY column m STRING """
@@ -288,8 +288,8 @@ suite("test_unique_schema_value_modify3", "p0") {
}, errorMessage)
//Test the unique model by modify a value type from MAP to JSON
- errorMessage = "errCode = 2, detailMessage = Can not change MAP to JSON"
- expectException({
+ errorMessage = "errCode = 2, detailMessage = Can not change"
+ expectExceptionLike({
sql initTable
sql initTableData
sql """ alter table ${tbName} MODIFY column m JSON """
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]