This is an automated email from the ASF dual-hosted git repository. dataroaring pushed a commit to branch branch-2.0 in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.0 by this push: new 94815b177e5 [branch-2.0](create table) show create table print storage medium #29080 (#34028) 94815b177e5 is described below commit 94815b177e525c799a1e713c5b5c4978ea9a739e Author: yujun <yu.jun.re...@gmail.com> AuthorDate: Sun Apr 28 16:11:06 2024 +0800 [branch-2.0](create table) show create table print storage medium #29080 (#34028) --- .../main/java/org/apache/doris/catalog/Env.java | 7 +++++++ .../java/org/apache/doris/catalog/OlapTable.java | 14 +++++++++++++ .../org/apache/doris/catalog/TableProperty.java | 19 ++++++++++++++++++ .../apache/doris/datasource/InternalCatalog.java | 12 +++++++++-- .../analysis/CreateTableAsSelectStmtTest.java | 21 ++++++++++++++++++++ .../org/apache/doris/catalog/CreateTableTest.java | 23 ++++++++++++++++++++++ .../show_p0/test_show_create_table_and_views.out | 9 +++++---- 7 files changed, 99 insertions(+), 6 deletions(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/catalog/Env.java b/fe/fe-core/src/main/java/org/apache/doris/catalog/Env.java index 5f22c99d790..6f3c6e303d2 100755 --- a/fe/fe-core/src/main/java/org/apache/doris/catalog/Env.java +++ b/fe/fe-core/src/main/java/org/apache/doris/catalog/Env.java @@ -3124,6 +3124,13 @@ public class Env { sb.append(olapTable.isInMemory()).append("\""); } + // storage medium + if (olapTable.getStorageMedium() != null) { + sb.append(",\n\"").append(PropertyAnalyzer.PROPERTIES_STORAGE_MEDIUM).append("\" = \""); + sb.append(olapTable.getStorageMedium().name().toLowerCase()); + sb.append("\""); + } + // storage type sb.append(",\n\"").append(PropertyAnalyzer.PROPERTIES_STORAGE_FORMAT).append("\" = \""); sb.append(olapTable.getStorageFormat()).append("\""); diff --git a/fe/fe-core/src/main/java/org/apache/doris/catalog/OlapTable.java b/fe/fe-core/src/main/java/org/apache/doris/catalog/OlapTable.java index 384e47dc69b..a6525831197 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/catalog/OlapTable.java +++ b/fe/fe-core/src/main/java/org/apache/doris/catalog/OlapTable.java @@ -1934,6 +1934,20 @@ public class OlapTable extends Table { tableProperty.buildEnableLightSchemaChange(); } + public void setStorageMedium(TStorageMedium medium) { + TableProperty tableProperty = getOrCreatTableProperty(); + tableProperty.modifyTableProperties(PropertyAnalyzer.PROPERTIES_STORAGE_MEDIUM, + medium == null ? "" : medium.name()); + tableProperty.buildStorageMedium(); + } + + public TStorageMedium getStorageMedium() { + if (tableProperty != null) { + return tableProperty.getStorageMedium(); + } + return null; + } + public void setStoragePolicy(String storagePolicy) throws UserException { if (!Config.enable_storage_policy && !Strings.isNullOrEmpty(storagePolicy)) { throw new UserException("storage policy feature is disabled by default. " diff --git a/fe/fe-core/src/main/java/org/apache/doris/catalog/TableProperty.java b/fe/fe-core/src/main/java/org/apache/doris/catalog/TableProperty.java index 66d321b13ee..24920d5cea6 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/catalog/TableProperty.java +++ b/fe/fe-core/src/main/java/org/apache/doris/catalog/TableProperty.java @@ -27,6 +27,7 @@ import org.apache.doris.persist.OperationType; import org.apache.doris.persist.gson.GsonUtils; import org.apache.doris.thrift.TCompressionType; import org.apache.doris.thrift.TStorageFormat; +import org.apache.doris.thrift.TStorageMedium; import com.google.common.base.Strings; import com.google.common.collect.Maps; @@ -64,6 +65,8 @@ public class TableProperty implements Writable { private BinlogConfig binlogConfig; private boolean isDynamicSchema = false; + private TStorageMedium storageMedium = null; + /* * the default storage format of this table. * DEFAULT: depends on BE's config 'default_rowset_type' @@ -128,6 +131,7 @@ public class TableProperty implements Writable { break; case OperationType.OP_MODIFY_IN_MEMORY: buildInMemory(); + buildStorageMedium(); buildStoragePolicy(); buildIsBeingSynced(); buildCompactionPolicy(); @@ -306,6 +310,20 @@ public class TableProperty implements Writable { return timeSeriesCompactionLevelThreshold; } + public TableProperty buildStorageMedium() { + String storageMediumStr = properties.get(PropertyAnalyzer.PROPERTIES_STORAGE_MEDIUM); + if (Strings.isNullOrEmpty(storageMediumStr)) { + storageMedium = null; + } else { + storageMedium = TStorageMedium.valueOf(storageMediumStr); + } + return this; + } + + public TStorageMedium getStorageMedium() { + return storageMedium; + } + public TableProperty buildStoragePolicy() { storagePolicy = properties.getOrDefault(PropertyAnalyzer.PROPERTIES_STORAGE_POLICY, ""); return this; @@ -529,6 +547,7 @@ public class TableProperty implements Writable { .executeBuildDynamicProperty() .buildInMemory() .buildDynamicSchema() + .buildStorageMedium() .buildStorageFormat() .buildDataSortInfo() .buildCompressionType() 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 506da48d7a0..f97fd41dbae 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 @@ -2340,6 +2340,7 @@ public class InternalCatalog implements CatalogIf<Database> { try { dataProperty = PropertyAnalyzer.analyzeDataProperty(stmt.getProperties(), new DataProperty(DataProperty.DEFAULT_STORAGE_MEDIUM)); + olapTable.setStorageMedium(dataProperty.getStorageMedium()); } catch (AnalysisException e) { throw new DdlException(e.getMessage()); } @@ -2511,10 +2512,17 @@ public class InternalCatalog implements CatalogIf<Database> { } else if (partitionInfo.getType() == PartitionType.RANGE || partitionInfo.getType() == PartitionType.LIST) { try { + DataProperty dataProperty = PropertyAnalyzer.analyzeDataProperty(stmt.getProperties(), + new DataProperty(DataProperty.DEFAULT_STORAGE_MEDIUM)); + Map<String, String> propertiesCheck = new HashMap<>(properties); + propertiesCheck.entrySet().removeIf(entry -> entry.getKey().contains("dynamic_partition")); + if (propertiesCheck != null && !propertiesCheck.isEmpty()) { + // here, all properties should be checked + throw new DdlException("Unknown properties: " + propertiesCheck); + } // just for remove entries in stmt.getProperties(), // and then check if there still has unknown properties - PropertyAnalyzer.analyzeDataProperty(stmt.getProperties(), - new DataProperty(DataProperty.DEFAULT_STORAGE_MEDIUM)); + olapTable.setStorageMedium(dataProperty.getStorageMedium()); if (partitionInfo.getType() == PartitionType.RANGE) { DynamicPartitionUtil.checkAndSetDynamicPartitionProperty(olapTable, properties, db); } else if (partitionInfo.getType() == PartitionType.LIST) { diff --git a/fe/fe-core/src/test/java/org/apache/doris/analysis/CreateTableAsSelectStmtTest.java b/fe/fe-core/src/test/java/org/apache/doris/analysis/CreateTableAsSelectStmtTest.java index c6c258d0da0..c64e304d061 100644 --- a/fe/fe-core/src/test/java/org/apache/doris/analysis/CreateTableAsSelectStmtTest.java +++ b/fe/fe-core/src/test/java/org/apache/doris/analysis/CreateTableAsSelectStmtTest.java @@ -93,6 +93,7 @@ public class CreateTableAsSelectStmtTest extends TestWithFeService { + "PROPERTIES (\n" + "\"replication_allocation\" = \"tag.location.default: 1\",\n" + "\"is_being_synced\" = \"false\",\n" + + "\"storage_medium\" = \"hdd\",\n" + "\"storage_format\" = \"V2\",\n" + "\"light_schema_change\" = \"true\",\n" + "\"disable_auto_compaction\" = \"false\",\n" @@ -114,6 +115,7 @@ public class CreateTableAsSelectStmtTest extends TestWithFeService { + "PROPERTIES (\n" + "\"replication_allocation\" = \"tag.location.default: 1\",\n" + "\"is_being_synced\" = \"false\",\n" + + "\"storage_medium\" = \"hdd\",\n" + "\"storage_format\" = \"V2\",\n" + "\"light_schema_change\" = \"true\",\n" + "\"disable_auto_compaction\" = \"false\",\n" @@ -131,6 +133,7 @@ public class CreateTableAsSelectStmtTest extends TestWithFeService { + "PROPERTIES (\n" + "\"replication_allocation\" = \"tag.location.default: 1\",\n" + "\"is_being_synced\" = \"false\",\n" + + "\"storage_medium\" = \"hdd\",\n" + "\"storage_format\" = \"V2\",\n" + "\"light_schema_change\" = \"true\",\n" + "\"disable_auto_compaction\" = \"false\",\n" @@ -166,6 +169,7 @@ public class CreateTableAsSelectStmtTest extends TestWithFeService { + "PROPERTIES (\n" + "\"replication_allocation\" = \"tag.location.default: 1\",\n" + "\"is_being_synced\" = \"false\",\n" + + "\"storage_medium\" = \"hdd\",\n" + "\"storage_format\" = \"V2\",\n" + "\"light_schema_change\" = \"true\",\n" + "\"disable_auto_compaction\" = \"false\",\n" @@ -190,6 +194,7 @@ public class CreateTableAsSelectStmtTest extends TestWithFeService { + "PROPERTIES (\n" + "\"replication_allocation\" = \"tag.location.default: 1\",\n" + "\"is_being_synced\" = \"false\",\n" + + "\"storage_medium\" = \"hdd\",\n" + "\"storage_format\" = \"V2\",\n" + "\"light_schema_change\" = \"true\",\n" + "\"disable_auto_compaction\" = \"false\",\n" @@ -216,6 +221,7 @@ public class CreateTableAsSelectStmtTest extends TestWithFeService { + "PROPERTIES (\n" + "\"replication_allocation\" = \"tag.location.default: 1\",\n" + "\"is_being_synced\" = \"false\",\n" + + "\"storage_medium\" = \"hdd\",\n" + "\"storage_format\" = \"V2\",\n" + "\"light_schema_change\" = \"true\",\n" + "\"disable_auto_compaction\" = \"false\",\n" @@ -239,6 +245,7 @@ public class CreateTableAsSelectStmtTest extends TestWithFeService { + "PROPERTIES (\n" + "\"replication_allocation\" = \"tag.location.default: 1\",\n" + "\"is_being_synced\" = \"false\",\n" + + "\"storage_medium\" = \"hdd\",\n" + "\"storage_format\" = \"V2\",\n" + "\"light_schema_change\" = \"true\",\n" + "\"disable_auto_compaction\" = \"false\",\n" @@ -258,6 +265,7 @@ public class CreateTableAsSelectStmtTest extends TestWithFeService { + "PROPERTIES (\n" + "\"replication_allocation\" = \"tag.location.default: 1\",\n" + "\"is_being_synced\" = \"false\",\n" + + "\"storage_medium\" = \"hdd\",\n" + "\"storage_format\" = \"V2\",\n" + "\"light_schema_change\" = \"true\",\n" + "\"disable_auto_compaction\" = \"false\",\n" @@ -284,6 +292,7 @@ public class CreateTableAsSelectStmtTest extends TestWithFeService { + "PROPERTIES (\n" + "\"replication_allocation\" = \"tag.location.default: 1\",\n" + "\"is_being_synced\" = \"false\",\n" + + "\"storage_medium\" = \"hdd\",\n" + "\"storage_format\" = \"V2\",\n" + "\"light_schema_change\" = \"true\",\n" + "\"disable_auto_compaction\" = \"false\",\n" @@ -307,6 +316,7 @@ public class CreateTableAsSelectStmtTest extends TestWithFeService { + "PROPERTIES (\n" + "\"replication_allocation\" = \"tag.location.default: 1\",\n" + "\"is_being_synced\" = \"false\",\n" + + "\"storage_medium\" = \"hdd\",\n" + "\"storage_format\" = \"V2\",\n" + "\"light_schema_change\" = \"true\",\n" + "\"disable_auto_compaction\" = \"false\",\n" @@ -334,6 +344,7 @@ public class CreateTableAsSelectStmtTest extends TestWithFeService { + "PROPERTIES (\n" + "\"replication_allocation\" = \"tag.location.default: 1\",\n" + "\"is_being_synced\" = \"false\",\n" + + "\"storage_medium\" = \"hdd\",\n" + "\"storage_format\" = \"V2\",\n" + "\"light_schema_change\" = \"true\",\n" + "\"disable_auto_compaction\" = \"false\",\n" @@ -358,6 +369,7 @@ public class CreateTableAsSelectStmtTest extends TestWithFeService { + "PROPERTIES (\n" + "\"replication_allocation\" = \"tag.location.default: 1\",\n" + "\"is_being_synced\" = \"false\",\n" + + "\"storage_medium\" = \"hdd\",\n" + "\"storage_format\" = \"V2\",\n" + "\"light_schema_change\" = \"true\",\n" + "\"disable_auto_compaction\" = \"false\",\n" @@ -381,6 +393,7 @@ public class CreateTableAsSelectStmtTest extends TestWithFeService { + "PROPERTIES (\n" + "\"replication_allocation\" = \"tag.location.default: 1\",\n" + "\"is_being_synced\" = \"false\",\n" + + "\"storage_medium\" = \"hdd\",\n" + "\"storage_format\" = \"V2\",\n" + "\"light_schema_change\" = \"true\",\n" + "\"disable_auto_compaction\" = \"false\",\n" @@ -400,6 +413,7 @@ public class CreateTableAsSelectStmtTest extends TestWithFeService { + "PROPERTIES (\n" + "\"replication_allocation\" = \"tag.location.default: 1\",\n" + "\"is_being_synced\" = \"false\",\n" + + "\"storage_medium\" = \"hdd\",\n" + "\"storage_format\" = \"V2\",\n" + "\"light_schema_change\" = \"true\",\n" + "\"disable_auto_compaction\" = \"false\",\n" @@ -426,6 +440,7 @@ public class CreateTableAsSelectStmtTest extends TestWithFeService { + "PROPERTIES (\n" + "\"replication_allocation\" = \"tag.location.default: 1\",\n" + "\"is_being_synced\" = \"false\",\n" + + "\"storage_medium\" = \"hdd\",\n" + "\"storage_format\" = \"V2\",\n" + "\"light_schema_change\" = \"true\",\n" + "\"disable_auto_compaction\" = \"false\",\n" @@ -451,6 +466,7 @@ public class CreateTableAsSelectStmtTest extends TestWithFeService { + "PROPERTIES (\n" + "\"replication_allocation\" = \"tag.location.default: 1\",\n" + "\"is_being_synced\" = \"false\",\n" + + "\"storage_medium\" = \"hdd\",\n" + "\"storage_format\" = \"V2\",\n" + "\"light_schema_change\" = \"true\",\n" + "\"disable_auto_compaction\" = \"false\",\n" @@ -475,6 +491,7 @@ public class CreateTableAsSelectStmtTest extends TestWithFeService { + "PROPERTIES (\n" + "\"replication_allocation\" = \"tag.location.default: 1\",\n" + "\"is_being_synced\" = \"false\",\n" + + "\"storage_medium\" = \"hdd\",\n" + "\"storage_format\" = \"V2\",\n" + "\"light_schema_change\" = \"true\",\n" + "\"disable_auto_compaction\" = \"false\",\n" @@ -500,6 +517,7 @@ public class CreateTableAsSelectStmtTest extends TestWithFeService { + "PROPERTIES (\n" + "\"replication_allocation\" = \"tag.location.default: 1\",\n" + "\"is_being_synced\" = \"false\",\n" + + "\"storage_medium\" = \"hdd\",\n" + "\"storage_format\" = \"V2\",\n" + "\"light_schema_change\" = \"true\",\n" + "\"disable_auto_compaction\" = \"false\",\n" @@ -549,6 +567,7 @@ public class CreateTableAsSelectStmtTest extends TestWithFeService { + "PROPERTIES (\n" + "\"replication_allocation\" = \"tag.location.default: 1\",\n" + "\"is_being_synced\" = \"false\",\n" + + "\"storage_medium\" = \"hdd\",\n" + "\"storage_format\" = \"V2\",\n" + "\"light_schema_change\" = \"true\",\n" + "\"disable_auto_compaction\" = \"false\",\n" @@ -566,6 +585,7 @@ public class CreateTableAsSelectStmtTest extends TestWithFeService { + "PROPERTIES (\n" + "\"replication_allocation\" = \"tag.location.default: 1\",\n" + "\"is_being_synced\" = \"false\",\n" + + "\"storage_medium\" = \"hdd\",\n" + "\"storage_format\" = \"V2\",\n" + "\"light_schema_change\" = \"true\",\n" + "\"disable_auto_compaction\" = \"false\",\n" @@ -597,6 +617,7 @@ public class CreateTableAsSelectStmtTest extends TestWithFeService { + "PROPERTIES (\n" + "\"replication_allocation\" = \"tag.location.default: 1\",\n" + "\"is_being_synced\" = \"false\",\n" + + "\"storage_medium\" = \"hdd\",\n" + "\"storage_format\" = \"V2\",\n" + "\"light_schema_change\" = \"true\",\n" + "\"disable_auto_compaction\" = \"false\",\n" diff --git a/fe/fe-core/src/test/java/org/apache/doris/catalog/CreateTableTest.java b/fe/fe-core/src/test/java/org/apache/doris/catalog/CreateTableTest.java index 7d457524264..4001d805f1a 100644 --- a/fe/fe-core/src/test/java/org/apache/doris/catalog/CreateTableTest.java +++ b/fe/fe-core/src/test/java/org/apache/doris/catalog/CreateTableTest.java @@ -146,6 +146,16 @@ public class CreateTableTest { .expectThrowsNoException(() -> createTable("create table test.tb7(key1 int, key2 varchar(10)) \n" + "distributed by hash(key1) buckets 1 properties('replication_num' = '1', 'storage_medium' = 'ssd');")); + ConfigBase.setMutableConfig("disable_storage_medium_check", "true"); + ExceptionChecker + .expectThrowsNoException(() -> createTable("create table test.tb7_1(key1 int, key2 varchar(10))\n" + + "PARTITION BY RANGE(`key1`) (\n" + + " PARTITION `p1` VALUES LESS THAN (\"10\"),\n" + + " PARTITION `p2` VALUES LESS THAN (\"20\"),\n" + + " PARTITION `p3` VALUES LESS THAN (\"30\"))\n" + + "distributed by hash(key1)\n" + + "buckets 1 properties('replication_num' = '1', 'storage_medium' = 'ssd');")); + ExceptionChecker .expectThrowsNoException(() -> createTable("create table test.compression1(key1 int, key2 varchar(10)) \n" + "distributed by hash(key1) buckets 1 \n" @@ -301,6 +311,19 @@ public class CreateTableTest { () -> createTable("create table test.tb7(key1 int, key2 varchar(10)) distributed by hash(key1) \n" + "buckets 1 properties('replication_num' = '1', 'storage_medium' = 'ssd');")); + ExceptionChecker + .expectThrowsWithMsg(DdlException.class, + "Failed to find enough backend, please check the replication num,replication tag and storage medium.\n" + + "Create failed replications:\n" + + "replication tag: {\"location\" : \"default\"}, replication num: 1, storage medium: SSD", + () -> createTable("create table test.tb7_1(key1 int, key2 varchar(10))\n" + + "PARTITION BY RANGE(`key1`) (\n" + + " PARTITION `p1` VALUES LESS THAN (\"10\"),\n" + + " PARTITION `p2` VALUES LESS THAN (\"20\"),\n" + + " PARTITION `p3` VALUES LESS THAN (\"30\"))\n" + + "distributed by hash(key1)\n" + + "buckets 1 properties('replication_num' = '1', 'storage_medium' = 'ssd');")); + ExceptionChecker .expectThrowsWithMsg(DdlException.class, "sequence column only support UNIQUE_KEYS", () -> createTable("create table test.atbl8\n" + "(k1 varchar(40), k2 int, v1 int sum)\n" diff --git a/regression-test/data/show_p0/test_show_create_table_and_views.out b/regression-test/data/show_p0/test_show_create_table_and_views.out index 46eec5f1cfd..1e27c1bcf13 100644 --- a/regression-test/data/show_p0/test_show_create_table_and_views.out +++ b/regression-test/data/show_p0/test_show_create_table_and_views.out @@ -1,6 +1,6 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !show -- -show_create_table_and_views_table CREATE TABLE `show_create_table_and_views_table` (\n `user_id` largeint(40) NOT NULL,\n `good_id` largeint(40) NOT NULL,\n `cost` bigint(20) SUM NULL DEFAULT "0"\n) ENGINE=OLAP\nAGGREGATE KEY(`user_id`, `good_id`)\nCOMMENT 'OLAP'\nPARTITION BY RANGE(`good_id`)\n(PARTITION p1 VALUES [("-170141183460469231731687303715884105728"), ("100")),\nPARTITION p2 VALUES [("100"), ("200")),\nPARTITION p3 VALUES [("200"), ("300")),\nPARTITION p4 VALUES [("300"), (" [...] +show_create_table_and_views_table CREATE TABLE `show_create_table_and_views_table` (\n `user_id` largeint(40) NOT NULL,\n `good_id` largeint(40) NOT NULL,\n `cost` bigint(20) SUM NULL DEFAULT "0"\n) ENGINE=OLAP\nAGGREGATE KEY(`user_id`, `good_id`)\nCOMMENT 'OLAP'\nPARTITION BY RANGE(`good_id`)\n(PARTITION p1 VALUES [("-170141183460469231731687303715884105728"), ("100")),\nPARTITION p2 VALUES [("100"), ("200")),\nPARTITION p3 VALUES [("200"), ("300")),\nPARTITION p4 VALUES [("300"), (" [...] -- !select -- 1 1 30 @@ -36,10 +36,11 @@ show_create_table_and_views_view CREATE VIEW `show_create_table_and_views_view` 300 1 -- !show -- -show_create_table_and_views_table CREATE TABLE `show_create_table_and_views_table` (\n `user_id` largeint(40) NOT NULL,\n `good_id` largeint(40) NOT NULL,\n `cost` bigint(20) SUM NULL DEFAULT "0"\n) ENGINE=OLAP\nAGGREGATE KEY(`user_id`, `good_id`)\nCOMMENT 'OLAP'\nPARTITION BY RANGE(`good_id`)\n(PARTITION p1 VALUES [("-170141183460469231731687303715884105728"), ("100")),\nPARTITION p2 VALUES [("100"), ("200")),\nPARTITION p3 VALUES [("200"), ("300")),\nPARTITION p4 VALUES [("300"), (" [...] +show_create_table_and_views_table CREATE TABLE `show_create_table_and_views_table` (\n `user_id` largeint(40) NOT NULL,\n `good_id` largeint(40) NOT NULL,\n `cost` bigint(20) SUM NULL DEFAULT "0"\n) ENGINE=OLAP\nAGGREGATE KEY(`user_id`, `good_id`)\nCOMMENT 'OLAP'\nPARTITION BY RANGE(`good_id`)\n(PARTITION p1 VALUES [("-170141183460469231731687303715884105728"), ("100")),\nPARTITION p2 VALUES [("100"), ("200")),\nPARTITION p3 VALUES [("200"), ("300")),\nPARTITION p4 VALUES [("300"), (" [...] -- !show -- -show_create_table_and_views_like CREATE TABLE `show_create_table_and_views_like` (\n `user_id` largeint(40) NOT NULL,\n `good_id` largeint(40) NOT NULL,\n `cost` bigint(20) SUM NULL DEFAULT "0"\n) ENGINE=OLAP\nAGGREGATE KEY(`user_id`, `good_id`)\nCOMMENT 'OLAP'\nPARTITION BY RANGE(`good_id`)\n(PARTITION p1 VALUES [("-170141183460469231731687303715884105728"), ("100")),\nPARTITION p2 VALUES [("100"), ("200")),\nPARTITION p3 VALUES [("200"), ("300")),\nPARTITION p4 VALUES [("300"), ("40 [...] +show_create_table_and_views_like CREATE TABLE `show_create_table_and_views_like` (\n `user_id` largeint(40) NOT NULL,\n `good_id` largeint(40) NOT NULL,\n `cost` bigint(20) SUM NULL DEFAULT "0"\n) ENGINE=OLAP\nAGGREGATE KEY(`user_id`, `good_id`)\nCOMMENT 'OLAP'\nPARTITION BY RANGE(`good_id`)\n(PARTITION p1 VALUES [("-170141183460469231731687303715884105728"), ("100")),\nPARTITION p2 VALUES [("100"), ("200")),\nPARTITION p3 VALUES [("200"), ("300")),\nPARTITION p4 VALUES [("300"), ("40 [...] -- !show -- -show_create_table_and_views_like_with_rollup CREATE TABLE `show_create_table_and_views_like_with_rollup` (\n `user_id` largeint(40) NOT NULL,\n `good_id` largeint(40) NOT NULL,\n `cost` bigint(20) SUM NULL DEFAULT "0"\n) ENGINE=OLAP\nAGGREGATE KEY(`user_id`, `good_id`)\nCOMMENT 'OLAP'\nPARTITION BY RANGE(`good_id`)\n(PARTITION p1 VALUES [("-170141183460469231731687303715884105728"), ("100")),\nPARTITION p2 VALUES [("100"), ("200")),\nPARTITION p3 VALUES [("200"), ("300")),\nPARTITION [...] +show_create_table_and_views_like_with_rollup CREATE TABLE `show_create_table_and_views_like_with_rollup` (\n `user_id` largeint(40) NOT NULL,\n `good_id` largeint(40) NOT NULL,\n `cost` bigint(20) SUM NULL DEFAULT "0"\n) ENGINE=OLAP\nAGGREGATE KEY(`user_id`, `good_id`)\nCOMMENT 'OLAP'\nPARTITION BY RANGE(`good_id`)\n(PARTITION p1 VALUES [("-170141183460469231731687303715884105728"), ("100")),\nPARTITION p2 VALUES [("100"), ("200")),\nPARTITION p3 VALUES [("200"), ("300")),\nPARTITION [...] + --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org