This is an automated email from the ASF dual-hosted git repository. dataroaring 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 13f74088fa [Improve](row-store) check light schema change enabled (#16358) 13f74088fa is described below commit 13f74088fad806de6145ff6081a7056863d35d06 Author: lihangyu <15605149...@163.com> AuthorDate: Thu Feb 2 20:57:18 2023 +0800 [Improve](row-store) check light schema change enabled (#16358) --- .../org/apache/doris/datasource/InternalCatalog.java | 4 ++++ .../suites/point_query_p0/test_point_query.groovy | 18 +++++++++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/datasource/InternalCatalog.java b/fe/fe-core/src/main/java/org/apache/doris/datasource/InternalCatalog.java index c8214ec7d4..31455d814c 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/datasource/InternalCatalog.java +++ b/fe/fe-core/src/main/java/org/apache/doris/datasource/InternalCatalog.java @@ -1949,6 +1949,10 @@ public class InternalCatalog implements CatalogIf<Database> { boolean storeRowColumn = false; try { storeRowColumn = PropertyAnalyzer.analyzeStoreRowColumn(properties); + if (storeRowColumn && !enableLightSchemaChange) { + throw new DdlException( + "Row store column rely on light schema change, enable light schema change first"); + } } catch (AnalysisException e) { throw new DdlException(e.getMessage()); } diff --git a/regression-test/suites/point_query_p0/test_point_query.groovy b/regression-test/suites/point_query_p0/test_point_query.groovy index 6806650dfb..5d36a4eb31 100644 --- a/regression-test/suites/point_query_p0/test_point_query.groovy +++ b/regression-test/suites/point_query_p0/test_point_query.groovy @@ -24,6 +24,22 @@ suite("test_point_query") { def url = context.config.jdbcUrl + "&useServerPrepStmts=true" def result1 = connect(user=user, password=password, url=url) { sql """DROP TABLE IF EXISTS ${tableName}""" + test { + // abnormal case + sql """ + CREATE TABLE IF NOT EXISTS ${tableName} ( + `k1` int NULL COMMENT "" + ) ENGINE=OLAP + UNIQUE KEY(`k1`) + DISTRIBUTED BY HASH(`k1`) BUCKETS 1 + PROPERTIES ( + "replication_allocation" = "tag.location.default: 1", + "store_row_column" = "true", + "light_schema_change" = "false" + ) + """ + exception "errCode = 2, detailMessage = Row store column rely on light schema change, enable light schema change first" + } sql """ CREATE TABLE IF NOT EXISTS ${tableName} ( `k1` int(11) NULL COMMENT "", @@ -123,4 +139,4 @@ suite("test_point_query") { qt_sql """execute stmt2 using (1231, 119291.11, 'ddd')""" qt_sql """execute stmt2 using (1237, 120939.11130, 'a ddd')""" } -} \ No newline at end of file +} --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org