This is an automated email from the ASF dual-hosted git repository. panxiaolei pushed a commit to branch dev_0902 in repository https://gitbox.apache.org/repos/asf/doris-website.git
commit 7ff5f1c22d7b7308d7e3836465694bc8867f004a Author: BiteTheDDDDt <pxl...@qq.com> AuthorDate: Mon Sep 2 14:37:35 2024 +0800 add warning for agg_state --- docs/sql-manual/sql-data-types/aggregate/AGG_STATE.md | 2 ++ .../current/sql-manual/sql-data-types/aggregate/AGG-STATE.md | 2 ++ .../version-2.0/sql-manual/sql-data-types/aggregate/AGG-STATE.md | 3 +++ .../version-2.1/sql-manual/sql-data-types/aggregate/AGG-STATE.md | 3 +++ .../version-3.0/sql-manual/sql-data-types/aggregate/AGG-STATE.md | 3 +++ .../version-2.0/sql-manual/sql-data-types/aggregate/AGG-STATE.md | 2 ++ .../version-2.1/sql-manual/sql-data-types/aggregate/AGG-STATE.md | 2 ++ .../version-3.0/sql-manual/sql-data-types/aggregate/AGG-STATE.md | 2 ++ 8 files changed, 19 insertions(+) diff --git a/docs/sql-manual/sql-data-types/aggregate/AGG_STATE.md b/docs/sql-manual/sql-data-types/aggregate/AGG_STATE.md index 6d2e4b4dba..46afe4a0c0 100644 --- a/docs/sql-manual/sql-data-types/aggregate/AGG_STATE.md +++ b/docs/sql-manual/sql-data-types/aggregate/AGG_STATE.md @@ -35,6 +35,8 @@ under the License. It should be noted that the signature of the aggregation function is also part of the type, and agg_state with different signatures cannot be mixed. For example, if the signature of the table creation statement is `max_by(int,int)`, then `max_by(bigint,int)` or `group_concat(varchar)` cannot be inserted. The nullable attribute here is also part of the signature. If you can confirm that you will not enter a null value, you can declare the parameter as not null, which can obtain a smaller storage size and reduce serialization/deserialization overhead. +**Note: Because agg_state stores the intermediate result of the aggregation function, the read and write process is strongly dependent on the specific implementation of the aggregation function, if the implementation of the aggregation function is modified during the Doris version upgrade, it may cause incompatible situations. If the incompatibility occurs, the materialized view using the corresponding agg_state needs to be dropped and recreated, and the underlying aggregation table invo [...] + ### example Create table example: diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-data-types/aggregate/AGG-STATE.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-data-types/aggregate/AGG-STATE.md index 2ef59c216f..4a5dcb0e24 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-data-types/aggregate/AGG-STATE.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-data-types/aggregate/AGG-STATE.md @@ -35,6 +35,8 @@ under the License. 需要注意的是,聚合函数的签名也是类型的一部分,不同签名的 agg_state 无法混合使用。比如如果建表声明的签名为`max_by(int,int)`,那就无法插入`max_by(bigint,int)`或者`group_concat(varchar)`。 此处 nullable 属性也是签名的一部分,如果能确定不会输入 null 值,可以将参数声明为 not null,这样可以获得更小的存储大小和减少序列化/反序列化开销。 +**注意: 因为agg_state存储的是聚合函数的中间结果,所以读写过程都强依赖于聚合函数的具体实现,如果在doris版本升级时对聚合函数实现做了修改,则可能会造成不兼容的情况。如果出现不兼容的情况,使用到对应agg_state的物化视图需要drop并重新创建,另外涉及到的基础聚合表则会直接不可用,所以需要慎重使用agg_state。** + ### example 建表示例如下: diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0/sql-manual/sql-data-types/aggregate/AGG-STATE.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0/sql-manual/sql-data-types/aggregate/AGG-STATE.md index 2ef59c216f..a260f3a6a2 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0/sql-manual/sql-data-types/aggregate/AGG-STATE.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0/sql-manual/sql-data-types/aggregate/AGG-STATE.md @@ -35,6 +35,9 @@ under the License. 需要注意的是,聚合函数的签名也是类型的一部分,不同签名的 agg_state 无法混合使用。比如如果建表声明的签名为`max_by(int,int)`,那就无法插入`max_by(bigint,int)`或者`group_concat(varchar)`。 此处 nullable 属性也是签名的一部分,如果能确定不会输入 null 值,可以将参数声明为 not null,这样可以获得更小的存储大小和减少序列化/反序列化开销。 +**注意: 因为agg_state存储的是聚合函数的中间结果,所以读写过程都强依赖于聚合函数的具体实现,如果在doris版本升级时对聚合函数实现做了修改,则可能会造成不兼容的情况。如果出现不兼容的情况,使用到对应agg_state的物化视图需要drop并重新创建,另外涉及到的基础聚合表则会直接不可用,所以需要慎重使用agg_state。** + + ### example 建表示例如下: diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-data-types/aggregate/AGG-STATE.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-data-types/aggregate/AGG-STATE.md index 2ef59c216f..a260f3a6a2 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-data-types/aggregate/AGG-STATE.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-data-types/aggregate/AGG-STATE.md @@ -35,6 +35,9 @@ under the License. 需要注意的是,聚合函数的签名也是类型的一部分,不同签名的 agg_state 无法混合使用。比如如果建表声明的签名为`max_by(int,int)`,那就无法插入`max_by(bigint,int)`或者`group_concat(varchar)`。 此处 nullable 属性也是签名的一部分,如果能确定不会输入 null 值,可以将参数声明为 not null,这样可以获得更小的存储大小和减少序列化/反序列化开销。 +**注意: 因为agg_state存储的是聚合函数的中间结果,所以读写过程都强依赖于聚合函数的具体实现,如果在doris版本升级时对聚合函数实现做了修改,则可能会造成不兼容的情况。如果出现不兼容的情况,使用到对应agg_state的物化视图需要drop并重新创建,另外涉及到的基础聚合表则会直接不可用,所以需要慎重使用agg_state。** + + ### example 建表示例如下: diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-data-types/aggregate/AGG-STATE.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-data-types/aggregate/AGG-STATE.md index ebc1c26a61..456dbbc546 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-data-types/aggregate/AGG-STATE.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-data-types/aggregate/AGG-STATE.md @@ -33,6 +33,9 @@ AGG_STATE 只能配合[state](../../sql-functions/combinators/state.md) 需要注意的是,聚合函数的签名也是类型的一部分,不同签名的 agg_state 无法混合使用。比如如果建表声明的签名为`max_by(int,int)`,那就无法插入`max_by(bigint,int)`或者`group_concat(varchar)`。此处 nullable 属性也是签名的一部分,如果能确定不会输入 null 值,可以将参数声明为 not null,这样可以获得更小的存储大小和减少序列化/反序列化开销。 +**注意: 因为agg_state存储的是聚合函数的中间结果,所以读写过程都强依赖于聚合函数的具体实现,如果在doris版本升级时对聚合函数实现做了修改,则可能会造成不兼容的情况。如果出现不兼容的情况,使用到对应agg_state的物化视图需要drop并重新创建,另外涉及到的基础聚合表则会直接不可用,所以需要慎重使用agg_state。** + + ## Example 建表示例如下: diff --git a/versioned_docs/version-2.0/sql-manual/sql-data-types/aggregate/AGG-STATE.md b/versioned_docs/version-2.0/sql-manual/sql-data-types/aggregate/AGG-STATE.md index 6d2e4b4dba..46afe4a0c0 100644 --- a/versioned_docs/version-2.0/sql-manual/sql-data-types/aggregate/AGG-STATE.md +++ b/versioned_docs/version-2.0/sql-manual/sql-data-types/aggregate/AGG-STATE.md @@ -35,6 +35,8 @@ under the License. It should be noted that the signature of the aggregation function is also part of the type, and agg_state with different signatures cannot be mixed. For example, if the signature of the table creation statement is `max_by(int,int)`, then `max_by(bigint,int)` or `group_concat(varchar)` cannot be inserted. The nullable attribute here is also part of the signature. If you can confirm that you will not enter a null value, you can declare the parameter as not null, which can obtain a smaller storage size and reduce serialization/deserialization overhead. +**Note: Because agg_state stores the intermediate result of the aggregation function, the read and write process is strongly dependent on the specific implementation of the aggregation function, if the implementation of the aggregation function is modified during the Doris version upgrade, it may cause incompatible situations. If the incompatibility occurs, the materialized view using the corresponding agg_state needs to be dropped and recreated, and the underlying aggregation table invo [...] + ### example Create table example: diff --git a/versioned_docs/version-2.1/sql-manual/sql-data-types/aggregate/AGG-STATE.md b/versioned_docs/version-2.1/sql-manual/sql-data-types/aggregate/AGG-STATE.md index 6d2e4b4dba..46afe4a0c0 100644 --- a/versioned_docs/version-2.1/sql-manual/sql-data-types/aggregate/AGG-STATE.md +++ b/versioned_docs/version-2.1/sql-manual/sql-data-types/aggregate/AGG-STATE.md @@ -35,6 +35,8 @@ under the License. It should be noted that the signature of the aggregation function is also part of the type, and agg_state with different signatures cannot be mixed. For example, if the signature of the table creation statement is `max_by(int,int)`, then `max_by(bigint,int)` or `group_concat(varchar)` cannot be inserted. The nullable attribute here is also part of the signature. If you can confirm that you will not enter a null value, you can declare the parameter as not null, which can obtain a smaller storage size and reduce serialization/deserialization overhead. +**Note: Because agg_state stores the intermediate result of the aggregation function, the read and write process is strongly dependent on the specific implementation of the aggregation function, if the implementation of the aggregation function is modified during the Doris version upgrade, it may cause incompatible situations. If the incompatibility occurs, the materialized view using the corresponding agg_state needs to be dropped and recreated, and the underlying aggregation table invo [...] + ### example Create table example: diff --git a/versioned_docs/version-3.0/sql-manual/sql-data-types/aggregate/AGG-STATE.md b/versioned_docs/version-3.0/sql-manual/sql-data-types/aggregate/AGG-STATE.md index 6d2e4b4dba..46afe4a0c0 100644 --- a/versioned_docs/version-3.0/sql-manual/sql-data-types/aggregate/AGG-STATE.md +++ b/versioned_docs/version-3.0/sql-manual/sql-data-types/aggregate/AGG-STATE.md @@ -35,6 +35,8 @@ under the License. It should be noted that the signature of the aggregation function is also part of the type, and agg_state with different signatures cannot be mixed. For example, if the signature of the table creation statement is `max_by(int,int)`, then `max_by(bigint,int)` or `group_concat(varchar)` cannot be inserted. The nullable attribute here is also part of the signature. If you can confirm that you will not enter a null value, you can declare the parameter as not null, which can obtain a smaller storage size and reduce serialization/deserialization overhead. +**Note: Because agg_state stores the intermediate result of the aggregation function, the read and write process is strongly dependent on the specific implementation of the aggregation function, if the implementation of the aggregation function is modified during the Doris version upgrade, it may cause incompatible situations. If the incompatibility occurs, the materialized view using the corresponding agg_state needs to be dropped and recreated, and the underlying aggregation table invo [...] + ### example Create table example: --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org