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 734b258e159 [feature](create table) show create table print storage medium (#29080) 734b258e159 is described below commit 734b258e1590636730eb8a4a1baa1731e5d3a7a7 Author: yujun <yu.jun.re...@gmail.com> AuthorDate: Sat Jan 6 22:40:51 2024 +0800 [feature](create table) show create table print storage medium (#29080) --- .../main/java/org/apache/doris/catalog/Env.java | 5 +++++ .../java/org/apache/doris/catalog/OlapTable.java | 14 +++++++++++++ .../org/apache/doris/catalog/TableProperty.java | 19 ++++++++++++++++++ .../apache/doris/datasource/InternalCatalog.java | 8 +++++--- .../analysis/CreateTableAsSelectStmtTest.java | 21 ++++++++++++++++++++ .../org/apache/doris/catalog/CreateTableTest.java | 23 ++++++++++++++++++++++ .../show_p0/test_show_create_table_and_views.out | 8 ++++---- 7 files changed, 91 insertions(+), 7 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 b4b48373851..197f5218a1b 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 @@ -3290,6 +3290,11 @@ public class Env { sb.append(olapTable.isInMemory()).append("\""); } + // storage medium + sb.append(",\n\"").append(PropertyAnalyzer.PROPERTIES_STORAGE_MEDIUM).append("\" = \""); + sb.append(olapTable.getStorageMedium() == null ? "" : 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 be1ded6eebe..e70b08e6c8d 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 @@ -1945,6 +1945,20 @@ public class OlapTable extends Table { return quorum; } + 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 54a6041b504..3cbd8a6381f 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 Boolean isBeingSynced = null; private BinlogConfig binlogConfig; + private TStorageMedium storageMedium = null; + /* * the default storage format of this table. * DEFAULT: depends on BE's config 'default_rowset_type' @@ -126,6 +129,7 @@ public class TableProperty implements Writable { case OperationType.OP_MODIFY_IN_MEMORY: buildInMemory(); buildMinLoadReplicaNum(); + buildStorageMedium(); buildStoragePolicy(); buildIsBeingSynced(); buildCompactionPolicy(); @@ -303,6 +307,20 @@ public class TableProperty implements Writable { return minLoadReplicaNum; } + 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() .buildMinLoadReplicaNum() + .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 5adb18e344d..cc04dd195f4 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 @@ -2313,7 +2313,8 @@ public class InternalCatalog implements CatalogIf<Database> { DataProperty dataProperty = null; try { dataProperty = PropertyAnalyzer.analyzeDataProperty(stmt.getProperties(), - new DataProperty(DataProperty.DEFAULT_STORAGE_MEDIUM)); + new DataProperty(DataProperty.DEFAULT_STORAGE_MEDIUM)); + olapTable.setStorageMedium(dataProperty.getStorageMedium()); } catch (AnalysisException e) { throw new DdlException(e.getMessage()); } @@ -2494,8 +2495,8 @@ public class InternalCatalog implements CatalogIf<Database> { } else if (partitionInfo.getType() == PartitionType.RANGE || partitionInfo.getType() == PartitionType.LIST) { try { - PropertyAnalyzer.analyzeDataProperty(stmt.getProperties(), - new DataProperty(DataProperty.DEFAULT_STORAGE_MEDIUM)); + 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()) { @@ -2504,6 +2505,7 @@ public class InternalCatalog implements CatalogIf<Database> { } // just for remove entries in stmt.getProperties(), // and then check if there still has unknown properties + 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 d2a2e0bf68e..96df0d9c74d 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 @@ -94,6 +94,7 @@ public class CreateTableAsSelectStmtTest extends TestWithFeService { + "\"replication_allocation\" = \"tag.location.default: 1\",\n" + "\"min_load_replica_num\" = \"-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" @@ -117,6 +118,7 @@ public class CreateTableAsSelectStmtTest extends TestWithFeService { + "\"replication_allocation\" = \"tag.location.default: 1\",\n" + "\"min_load_replica_num\" = \"-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" @@ -136,6 +138,7 @@ public class CreateTableAsSelectStmtTest extends TestWithFeService { + "\"replication_allocation\" = \"tag.location.default: 1\",\n" + "\"min_load_replica_num\" = \"-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" @@ -173,6 +176,7 @@ public class CreateTableAsSelectStmtTest extends TestWithFeService { + "\"replication_allocation\" = \"tag.location.default: 1\",\n" + "\"min_load_replica_num\" = \"-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" @@ -199,6 +203,7 @@ public class CreateTableAsSelectStmtTest extends TestWithFeService { + "\"replication_allocation\" = \"tag.location.default: 1\",\n" + "\"min_load_replica_num\" = \"-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" @@ -227,6 +232,7 @@ public class CreateTableAsSelectStmtTest extends TestWithFeService { + "\"replication_allocation\" = \"tag.location.default: 1\",\n" + "\"min_load_replica_num\" = \"-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" @@ -252,6 +258,7 @@ public class CreateTableAsSelectStmtTest extends TestWithFeService { + "\"replication_allocation\" = \"tag.location.default: 1\",\n" + "\"min_load_replica_num\" = \"-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" @@ -273,6 +280,7 @@ public class CreateTableAsSelectStmtTest extends TestWithFeService { + "\"replication_allocation\" = \"tag.location.default: 1\",\n" + "\"min_load_replica_num\" = \"-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" @@ -301,6 +309,7 @@ public class CreateTableAsSelectStmtTest extends TestWithFeService { + "\"replication_allocation\" = \"tag.location.default: 1\",\n" + "\"min_load_replica_num\" = \"-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" @@ -326,6 +335,7 @@ public class CreateTableAsSelectStmtTest extends TestWithFeService { + "\"replication_allocation\" = \"tag.location.default: 1\",\n" + "\"min_load_replica_num\" = \"-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" @@ -355,6 +365,7 @@ public class CreateTableAsSelectStmtTest extends TestWithFeService { + "\"replication_allocation\" = \"tag.location.default: 1\",\n" + "\"min_load_replica_num\" = \"-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 +392,7 @@ public class CreateTableAsSelectStmtTest extends TestWithFeService { + "\"replication_allocation\" = \"tag.location.default: 1\",\n" + "\"min_load_replica_num\" = \"-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" @@ -406,6 +418,7 @@ public class CreateTableAsSelectStmtTest extends TestWithFeService { + "\"replication_allocation\" = \"tag.location.default: 1\",\n" + "\"min_load_replica_num\" = \"-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" @@ -427,6 +440,7 @@ public class CreateTableAsSelectStmtTest extends TestWithFeService { + "\"replication_allocation\" = \"tag.location.default: 1\",\n" + "\"min_load_replica_num\" = \"-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" @@ -455,6 +469,7 @@ public class CreateTableAsSelectStmtTest extends TestWithFeService { + "\"replication_allocation\" = \"tag.location.default: 1\",\n" + "\"min_load_replica_num\" = \"-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" @@ -482,6 +497,7 @@ public class CreateTableAsSelectStmtTest extends TestWithFeService { + "\"replication_allocation\" = \"tag.location.default: 1\",\n" + "\"min_load_replica_num\" = \"-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" @@ -508,6 +524,7 @@ public class CreateTableAsSelectStmtTest extends TestWithFeService { + "\"replication_allocation\" = \"tag.location.default: 1\",\n" + "\"min_load_replica_num\" = \"-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" @@ -535,6 +552,7 @@ public class CreateTableAsSelectStmtTest extends TestWithFeService { + "\"replication_allocation\" = \"tag.location.default: 1\",\n" + "\"min_load_replica_num\" = \"-1\",\n" + "\"is_being_synced\" = \"false\",\n" + + "\"storage_medium\" = \"hdd\",\n" + "\"storage_format\" = \"V2\",\n" + "\"enable_unique_key_merge_on_write\" = \"true\",\n" + "\"light_schema_change\" = \"true\",\n" @@ -587,6 +605,7 @@ public class CreateTableAsSelectStmtTest extends TestWithFeService { + "\"replication_allocation\" = \"tag.location.default: 1\",\n" + "\"min_load_replica_num\" = \"-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" @@ -606,6 +625,7 @@ public class CreateTableAsSelectStmtTest extends TestWithFeService { + "\"replication_allocation\" = \"tag.location.default: 1\",\n" + "\"min_load_replica_num\" = \"-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" @@ -639,6 +659,7 @@ public class CreateTableAsSelectStmtTest extends TestWithFeService { + "\"replication_allocation\" = \"tag.location.default: 1\",\n" + "\"min_load_replica_num\" = \"-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 c1a4bc63937..0c73fee2319 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 @@ -119,6 +119,16 @@ public class CreateTableTest extends TestWithFeService { .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" @@ -276,6 +286,19 @@ public class CreateTableTest extends TestWithFeService { "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 and avail capacity of backends.\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 111d1d035bd..53c1da08b9a 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 NOT NULL,\n `good_id` LARGEINT NOT NULL,\n `cost` BIGINT 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"), ("400")),\nPAR [...] +show_create_table_and_views_table CREATE TABLE `show_create_table_and_views_table` (\n `user_id` LARGEINT NOT NULL,\n `good_id` LARGEINT NOT NULL,\n `cost` BIGINT 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"), ("400")),\nPAR [...] -- !select -- 1 1 30 @@ -36,11 +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 NOT NULL,\n `good_id` LARGEINT NOT NULL,\n `cost` BIGINT 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"), ("400")),\nPAR [...] +show_create_table_and_views_table CREATE TABLE `show_create_table_and_views_table` (\n `user_id` LARGEINT NOT NULL,\n `good_id` LARGEINT NOT NULL,\n `cost` BIGINT 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"), ("400")),\nPAR [...] -- !show -- -show_create_table_and_views_like CREATE TABLE `show_create_table_and_views_like` (\n `user_id` LARGEINT NOT NULL,\n `good_id` LARGEINT NOT NULL,\n `cost` BIGINT 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"), ("400")),\nPARTI [...] +show_create_table_and_views_like CREATE TABLE `show_create_table_and_views_like` (\n `user_id` LARGEINT NOT NULL,\n `good_id` LARGEINT NOT NULL,\n `cost` BIGINT 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"), ("400")),\nPARTI [...] -- !show -- -show_create_table_and_views_like_with_rollup CREATE TABLE `show_create_table_and_views_like_with_rollup` (\n `user_id` LARGEINT NOT NULL,\n `good_id` LARGEINT NOT NULL,\n `cost` BIGINT 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 [( [...] +show_create_table_and_views_like_with_rollup CREATE TABLE `show_create_table_and_views_like_with_rollup` (\n `user_id` LARGEINT NOT NULL,\n `good_id` LARGEINT NOT NULL,\n `cost` BIGINT 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 [( [...] --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org