This is an automated email from the ASF dual-hosted git repository.
luzhijing pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris-website.git
The following commit(s) were added to refs/heads/master by this push:
new 5d9634bc5d [fix](agg_state) agg_state syntax is outdated (#559)
5d9634bc5d is described below
commit 5d9634bc5d6a856e25042a0c0f309211f3c87332
Author: morrySnow <[email protected]>
AuthorDate: Tue Apr 16 16:39:43 2024 +0800
[fix](agg_state) agg_state syntax is outdated (#559)
---
docs/data-table/data-model.md | 4 ++--
.../current/data-table/data-model.md | 4 ++--
.../version-2.1/data-table/data-model.md | 12 ++++++++++
.../sql-reference/Data-Types/AGG_STATE.md | 11 +++++++++
.../version-2.1/data-table/data-model.md | 12 ++++++++++
.../sql-reference/Data-Types/AGG_STATE.md | 27 +++++++++++++++-------
6 files changed, 58 insertions(+), 12 deletions(-)
diff --git a/docs/data-table/data-model.md b/docs/data-table/data-model.md
index 76756ee577..b4d988d4c1 100644
--- a/docs/data-table/data-model.md
+++ b/docs/data-table/data-model.md
@@ -306,8 +306,8 @@ CREATE TABLE
set enable_agg_state=true;
create table aggstate(
k1 int null,
- k2 agg_state sum(int),
- k3 agg_state group_concat(string)
+ k2 agg_state<sum(int)> generic,
+ k3 agg_state<group_concat(string)> generic
)
aggregate key (k1)
distributed BY hash(k1) buckets 3
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/data-table/data-model.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/data-table/data-model.md
index 41b8c6b9e7..1f80cfe628 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/data-table/data-model.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/data-table/data-model.md
@@ -312,8 +312,8 @@ insert into example_db.example_tbl_agg1 values
set enable_agg_state=true;
create table aggstate(
k1 int null,
- k2 agg_state sum(int),
- k3 agg_state group_concat(string)
+ k2 agg_state<sum(int)> generic,
+ k3 agg_state<group_concat(string)> generic
)
aggregate key (k1)
distributed BY hash(k1) buckets 3
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/data-table/data-model.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/data-table/data-model.md
index fc65972dba..ab9894479b 100644
---
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/data-table/data-model.md
+++
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/data-table/data-model.md
@@ -310,6 +310,18 @@ insert into example_db.example_tbl_agg1 values
```sql
set enable_agg_state=true;
+
+-- after doris-2.1.1
+create table aggstate(
+ k1 int null,
+ k2 agg_state<sum(int)> generic,
+ k3 agg_state<group_concat(string)> generic
+)
+aggregate key (k1)
+distributed BY hash(k1) buckets 3
+properties("replication_num" = "1");
+
+-- until doris-2.1.0
create table aggstate(
k1 int null,
k2 agg_state sum(int),
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-reference/Data-Types/AGG_STATE.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-reference/Data-Types/AGG_STATE.md
index 18dc95c324..c640ff6aa6 100644
---
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-reference/Data-Types/AGG_STATE.md
+++
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-reference/Data-Types/AGG_STATE.md
@@ -39,6 +39,17 @@ under the License.
建表示例如下:
```sql
+ -- after doris-2.1.1
+ create table a_table(
+ k1 int null,
+ k2 agg_state<max_by(int not null,int)> generic,
+ k3 agg_state<group_concat(string) generic
+ )
+ aggregate key (k1)
+ distributed BY hash(k1) buckets 3
+ properties("replication_num" = "1");
+
+ -- until doris-2.1.0
create table a_table(
k1 int null,
k2 agg_state max_by(int not null,int),
diff --git a/versioned_docs/version-2.1/data-table/data-model.md
b/versioned_docs/version-2.1/data-table/data-model.md
index 3dbab1d071..83456d7da6 100644
--- a/versioned_docs/version-2.1/data-table/data-model.md
+++ b/versioned_docs/version-2.1/data-table/data-model.md
@@ -304,6 +304,18 @@ CREATE TABLE
```sql
set enable_agg_state=true;
+
+-- after doris-2.1.1
+create table aggstate(
+ k1 int null,
+ k2 agg_state<sum(int)> generic,
+ k3 agg_state<group_concat(string)> generic
+)
+aggregate key (k1)
+distributed BY hash(k1) buckets 3
+properties("replication_num" = "1");
+
+-- until doris-2.1.0
create table aggstate(
k1 int null,
k2 agg_state sum(int),
diff --git
a/versioned_docs/version-2.1/sql-manual/sql-reference/Data-Types/AGG_STATE.md
b/versioned_docs/version-2.1/sql-manual/sql-reference/Data-Types/AGG_STATE.md
index 41535d923b..6d2e4b4dba 100644
---
a/versioned_docs/version-2.1/sql-manual/sql-reference/Data-Types/AGG_STATE.md
+++
b/versioned_docs/version-2.1/sql-manual/sql-reference/Data-Types/AGG_STATE.md
@@ -39,14 +39,25 @@ under the License.
Create table example:
```sql
- create table a_table(
- k1 int null,
- k2 agg_state max_by(int not null,int),
- k3 agg_state group_concat(string)
- )
- aggregate key (k1)
- distributed BY hash(k1) buckets 3
- properties("replication_num" = "1");
+ -- after doris-2.1.1
+ create table a_table(
+ k1 int null,
+ k2 agg_state<max_by(int not null,int)> generic,
+ k3 agg_state<group_concat(string) generic
+ )
+ aggregate key (k1)
+ distributed BY hash(k1) buckets 3
+ properties("replication_num" = "1");
+
+ -- until doris-2.1.0
+ create table a_table(
+ k1 int null,
+ k2 agg_state max_by(int not null,int),
+ k3 agg_state group_concat(string)
+ )
+ aggregate key (k1)
+ distributed BY hash(k1) buckets 3
+ properties("replication_num" = "1");
```
Here k2 and k3 use max_by and group_concat as aggregation types respectively.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]