This is an automated email from the ASF dual-hosted git repository.
kxiao pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-3.0 by this push:
new fbbe82bfe14 [fix](variant) fix variant cast case #39377 (#39493)
fbbe82bfe14 is described below
commit fbbe82bfe14222fff5e70c8d407d8a590b77b931
Author: amory <[email protected]>
AuthorDate: Sat Aug 17 10:59:43 2024 +0800
[fix](variant) fix variant cast case #39377 (#39493)
---
.../doris/nereids/trees/expressions/Cast.java | 2 +
.../suites/query_p0/cast/test_cast.groovy | 6 ++-
.../test_dup_schema_value_modify3.groovy | 60 +++++++++++-----------
.../test_dup_schema_value_modify4.groovy | 60 +++++++++++-----------
.../test_unique_schema_value_modify3.groovy | 60 +++++++++++-----------
5 files changed, 96 insertions(+), 92 deletions(-)
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/Cast.java
b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/Cast.java
index 124ed589d49..9122f0f4adb 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/Cast.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/Cast.java
@@ -81,6 +81,8 @@ public class Cast extends Expression implements
UnaryExpression {
return true;
} else if (childDataType.isJsonType() || targetType.isJsonType()) {
return true;
+ } else if (childDataType.isVariantType() ||
targetType.isVariantType()) {
+ return true;
} else {
return child().nullable();
}
diff --git a/regression-test/suites/query_p0/cast/test_cast.groovy
b/regression-test/suites/query_p0/cast/test_cast.groovy
index 2fe4d53eb80..dae669e2965 100644
--- a/regression-test/suites/query_p0/cast/test_cast.groovy
+++ b/regression-test/suites/query_p0/cast/test_cast.groovy
@@ -150,7 +150,8 @@ suite('test_cast', "arrow_flight_sql") {
sql """
CREATE TABLE IF NOT EXISTS test_json (
id INT not null,
- j JSON not null
+ j JSON not null,
+ v variant not null
)
DUPLICATE KEY(id)
DISTRIBUTED BY HASH(id) BUCKETS 10
@@ -158,9 +159,10 @@ suite('test_cast', "arrow_flight_sql") {
"""
sql """
- INSERT INTO test_json VALUES(26, '{"k1":"v1", "k2": 200}');
+ INSERT INTO test_json VALUES(26, '{"k1":"v1", "k2": 200}', '[\"asd]');
"""
sql "sync"
sql "Select cast(j as int) from test_json"
+ sql "select cast(v as int) from test_json"
sql "DROP TABLE IF EXISTS test_json"
}
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..245189776a2 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 """
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..da3e9a50383 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,8 +101,8 @@ 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 """
@@ -115,8 +115,8 @@ suite("test_dup_schema_value_modify4", "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 """
@@ -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 """
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]