You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by mo...@apache.org on 2020/04/07 11:51:27 UTC
[incubator-doris] branch master updated: [Doc] Add example of
timeout property in alter table stmt (#3274)
This is an automated email from the ASF dual-hosted git repository.
morningman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git
The following commit(s) were added to refs/heads/master by this push:
new d0f8772 [Doc] Add example of timeout property in alter table stmt (#3274)
d0f8772 is described below
commit d0f87728e0e0a2227f19cd0e3fbe5173ecfe2587
Author: EmmyMiao87 <52...@qq.com>
AuthorDate: Tue Apr 7 19:51:16 2020 +0800
[Doc] Add example of timeout property in alter table stmt (#3274)
---
.../sql-statements/Data Definition/ALTER TABLE.md | 13 +++++++++++--
.../sql-statements/Data Definition/ALTER TABLE_EN.md | 10 +++++++++-
2 files changed, 20 insertions(+), 3 deletions(-)
diff --git a/docs/documentation/cn/sql-reference/sql-statements/Data Definition/ALTER TABLE.md b/docs/documentation/cn/sql-reference/sql-statements/Data Definition/ALTER TABLE.md
index b8974f6..2f1ba92 100644
--- a/docs/documentation/cn/sql-reference/sql-statements/Data Definition/ALTER TABLE.md
+++ b/docs/documentation/cn/sql-reference/sql-statements/Data Definition/ALTER TABLE.md
@@ -72,6 +72,8 @@ under the License.
ADD ROLLUP rollup_name (column_name1, column_name2, ...)
[FROM from_index_name]
[PROPERTIES ("key"="value", ...)]
+
+ properties: 支持设置超时时间,默认超时时间为1天。
例子:
ADD ROLLUP r1(col1,col2) from r0
1.2 批量创建 rollup index
@@ -234,11 +236,18 @@ under the License.
ALTER TABLE example_db.my_table
ADD ROLLUP example_rollup_index2 (k1, v1)
FROM example_rollup_index;
-
- 3. 删除 index: example_rollup_index2
+
+ 3. 创建 index: example_rollup_index3, 基于 base index (k1,k2,k3,v1), 自定义 rollup 超时时间一小时。
+ ALTER TABLE example_db.my_table
+ ADD ROLLUP example_rollup_index(k1, k3, v1)
+ PROPERTIES("storage_type"="column", "timeout" = "3600");
+
+ 4. 删除 index: example_rollup_index2
ALTER TABLE example_db.my_table
DROP ROLLUP example_rollup_index2;
+
+
[schema change]
1. 向 example_rollup_index 的 col1 后添加一个key列 new_col(非聚合模型)
ALTER TABLE example_db.my_table
diff --git a/docs/documentation/en/sql-reference/sql-statements/Data Definition/ALTER TABLE_EN.md b/docs/documentation/en/sql-reference/sql-statements/Data Definition/ALTER TABLE_EN.md
index bfbed30..35712b2 100644
--- a/docs/documentation/en/sql-reference/sql-statements/Data Definition/ALTER TABLE_EN.md
+++ b/docs/documentation/en/sql-reference/sql-statements/Data Definition/ALTER TABLE_EN.md
@@ -72,6 +72,8 @@ under the License.
ADD ROLLUP rollup_name (column_name1, column_name2, ...)
[FROM from_index_name]
[PROPERTIES ("key"="value", ...)]
+
+ properties: Support setting timeout time, the default timeout time is 1 day.
example:
ADD ROLLUP r1(col1,col2) from r0
1.2 Batch create rollup index
@@ -236,6 +238,12 @@ under the License.
ALTER TABLE example_db.my_table
ADD ROLLUP example_rollup_index2 (k1, v1)
FROM example_rollup_index;
+
+ 3. Create index: example_rollup_index3, based on base index (k1, k2, k3, v1), custom rollup timeout time is one hour.
+
+ ALTER TABLE example_db.my_table
+ ADD ROLLUP example_rollup_index(k1, k3, v1)
+ PROPERTIES("storage_type"="column", "timeout" = "3600");
3. Delete index: example_rollup_index2
ALTER TABLE example_db.my_table
@@ -261,7 +269,7 @@ under the License.
ALTER TABLE example_db.my_table
ADD COLUMN new_col INT SUM DEFAULT "0" AFTER col1
TO example_rollup_index;
-
+
5. Add multiple columns to the example_rollup_index (aggregate model)
ALTER TABLE example_db.my_table
ADD COLUMN (col1 INT DEFAULT "1", col2 FLOAT SUM DEFAULT "2.3")
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org