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-website.git
The following commit(s) were added to refs/heads/master by this push: new afde073e521 [opt](autoinc) add introduction for auto increment column (#1745) afde073e521 is described below commit afde073e521176fcaf4800f0b22af8839697dc7f Author: Yongqiang YANG <yangyongqi...@selectdb.com> AuthorDate: Sun Jan 12 22:13:07 2025 +0800 [opt](autoinc) add introduction for auto increment column (#1745) ## Versions - [x] dev - [x] 3.0 - [x] 2.1 - [ ] 2.0 ## Languages - [x] Chinese - [x] English ## Docs Checklist - [ ] Checked by AI - [ ] Test Cases Built Co-authored-by: Yongqiang YANG <yangyogqi...@selectdb.com> --- docs/table-design/auto-increment.md | 10 +--------- .../current/table-design/auto-increment.md | 10 +--------- .../version-2.1/table-design/auto-increment.md | 10 +--------- .../version-3.0/table-design/auto-increment.md | 12 ++---------- .../version-2.1/table-design/auto-increment.md | 20 +++++++------------- .../version-3.0/table-design/auto-increment.md | 12 +++--------- 6 files changed, 15 insertions(+), 59 deletions(-) diff --git a/docs/table-design/auto-increment.md b/docs/table-design/auto-increment.md index b1f726d1631..964e6d7f136 100644 --- a/docs/table-design/auto-increment.md +++ b/docs/table-design/auto-increment.md @@ -24,9 +24,7 @@ specific language governing permissions and limitations under the License. --> -When writing data, Doris automatically assigns unique values to rows that do not have specified values in the **auto-increment column**. - ---- +In Doris, the auto increment column is a feature that automatically generates a unique numeric value, commonly used to create unique identifiers for each row of data, such as primary keys. Each time a new record is inserted, the auto increment column automatically assigns an incrementing value, eliminating the need for manually specifying the number. By using Doris's auto increment column, data uniqueness and consistency are ensured, simplifying the data insertion process, reducing human [...] ## Functionality @@ -45,8 +43,6 @@ For tables with an auto-increment column, Doris processes data writes as follows User-provided non-null values can disrupt the uniqueness of the auto-increment column. ::: ---- - ### Uniqueness Doris guarantees **table-wide uniqueness** for values it generates in the auto-increment column. However: @@ -54,8 +50,6 @@ Doris guarantees **table-wide uniqueness** for values it generates in the auto-i - **Guaranteed Uniqueness**: This applies only to system-generated values. - **User-Provided Values**: Doris does not validate or enforce uniqueness for values specified by users in the auto-increment column. This may result in duplicate entries. ---- - ### Density Auto-increment values generated by Doris are generally **dense** but with some considerations: @@ -67,8 +61,6 @@ Auto-increment values generated by Doris are generally **dense** but with some c Auto-increment values cannot be used to infer the chronological order of writes. ::: ---- - ## Syntax To use auto-increment columns, you need to add the `AUTO_INCREMENT` attribute to the corresponding column during table creation ([CREATE-TABLE](../sql-manual/sql-statements/Data-Definition-Statements/Create/CREATE-TABLE)). To manually specify the starting value for an auto-increment column, you can do so by using the `AUTO_INCREMENT(start_value)` statement when creating the table. If not specified, the default starting value is 1. diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/table-design/auto-increment.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/table-design/auto-increment.md index 6d40aa2bc07..c28deba3253 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/table-design/auto-increment.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/table-design/auto-increment.md @@ -24,11 +24,7 @@ specific language governing permissions and limitations under the License. --> - - -在导入数据时,Doris 会为在自增列上没有指定值的数据行分配一个表内唯一的值。 - ---- +在 Doris 中,自增列(Auto Increment Column)是一种自动生成唯一数字值的功能,常用于为每一行数据生成唯一的标识符,如主键。每当插入新记录时,自增列会自动分配一个递增的值,避免了手动指定数字的繁琐操作。使用 Doris 自增列,可以确保数据的唯一性和一致性,简化数据插入过程,减少人为错误,并提高数据管理的效率。这使得自增列成为处理需要唯一标识的场景(如用户 ID 等)时的理想选择。 ## 功能 @@ -44,8 +40,6 @@ under the License. :::caution 重要 用户提供的非空值可能会破坏自增列的唯一性。 ::: - ---- ### 唯一性 @@ -54,8 +48,6 @@ Doris保证自增列中生成的值具有**表级唯一性**。但是: - **保证唯一性**:这仅适用于系统生成的值。 - **用户提供的值**:Doris不会验证或强制执行用户在自增列中指定的值的唯一性。这可能导致重复条目。 ---- - ### 聚集性 Doris生成的自增值通常是**密集的**,但有一些考虑: diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/table-design/auto-increment.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/table-design/auto-increment.md index 6d40aa2bc07..c28deba3253 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/table-design/auto-increment.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/table-design/auto-increment.md @@ -24,11 +24,7 @@ specific language governing permissions and limitations under the License. --> - - -在导入数据时,Doris 会为在自增列上没有指定值的数据行分配一个表内唯一的值。 - ---- +在 Doris 中,自增列(Auto Increment Column)是一种自动生成唯一数字值的功能,常用于为每一行数据生成唯一的标识符,如主键。每当插入新记录时,自增列会自动分配一个递增的值,避免了手动指定数字的繁琐操作。使用 Doris 自增列,可以确保数据的唯一性和一致性,简化数据插入过程,减少人为错误,并提高数据管理的效率。这使得自增列成为处理需要唯一标识的场景(如用户 ID 等)时的理想选择。 ## 功能 @@ -44,8 +40,6 @@ under the License. :::caution 重要 用户提供的非空值可能会破坏自增列的唯一性。 ::: - ---- ### 唯一性 @@ -54,8 +48,6 @@ Doris保证自增列中生成的值具有**表级唯一性**。但是: - **保证唯一性**:这仅适用于系统生成的值。 - **用户提供的值**:Doris不会验证或强制执行用户在自增列中指定的值的唯一性。这可能导致重复条目。 ---- - ### 聚集性 Doris生成的自增值通常是**密集的**,但有一些考虑: diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/table-design/auto-increment.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/table-design/auto-increment.md index 407f94857f3..c28deba3253 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/table-design/auto-increment.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/table-design/auto-increment.md @@ -24,11 +24,7 @@ specific language governing permissions and limitations under the License. --> - - -在导入数据时,Doris 会为在自增列上没有指定值的数据行分配一个表内唯一的值。 - ---- +在 Doris 中,自增列(Auto Increment Column)是一种自动生成唯一数字值的功能,常用于为每一行数据生成唯一的标识符,如主键。每当插入新记录时,自增列会自动分配一个递增的值,避免了手动指定数字的繁琐操作。使用 Doris 自增列,可以确保数据的唯一性和一致性,简化数据插入过程,减少人为错误,并提高数据管理的效率。这使得自增列成为处理需要唯一标识的场景(如用户 ID 等)时的理想选择。 ## 功能 @@ -45,8 +41,6 @@ under the License. 用户提供的非空值可能会破坏自增列的唯一性。 ::: ---- - ### 唯一性 Doris保证自增列中生成的值具有**表级唯一性**。但是: @@ -54,8 +48,6 @@ Doris保证自增列中生成的值具有**表级唯一性**。但是: - **保证唯一性**:这仅适用于系统生成的值。 - **用户提供的值**:Doris不会验证或强制执行用户在自增列中指定的值的唯一性。这可能导致重复条目。 ---- - ### 聚集性 Doris生成的自增值通常是**密集的**,但有一些考虑: @@ -66,7 +58,7 @@ Doris生成的自增值通常是**密集的**,但有一些考虑: :::info 注意 自增值不能用于推断写入的时间顺序。 ::: - + ## 语法 要使用自增列,需要在建表[CREATE-TABLE](../sql-manual/sql-statements/Data-Definition-Statements/Create/CREATE-TABLE)时为对应的列添加`AUTO_INCREMENT`属性。若要手动指定自增列起始值,可以通过建表时`AUTO_INCREMENT(start_value)`语句指定,如果未指定,则默认起始值为 1。 diff --git a/versioned_docs/version-2.1/table-design/auto-increment.md b/versioned_docs/version-2.1/table-design/auto-increment.md index 49eb1b4eb60..964e6d7f136 100644 --- a/versioned_docs/version-2.1/table-design/auto-increment.md +++ b/versioned_docs/version-2.1/table-design/auto-increment.md @@ -24,9 +24,7 @@ specific language governing permissions and limitations under the License. --> -When writing data, Doris automatically assigns unique values to rows that do not have specified values in the **auto-increment column**. - ---- +In Doris, the auto increment column is a feature that automatically generates a unique numeric value, commonly used to create unique identifiers for each row of data, such as primary keys. Each time a new record is inserted, the auto increment column automatically assigns an incrementing value, eliminating the need for manually specifying the number. By using Doris's auto increment column, data uniqueness and consistency are ensured, simplifying the data insertion process, reducing human [...] ## Functionality @@ -36,15 +34,15 @@ For tables with an auto-increment column, Doris processes data writes as follows If the written data does not include the auto-increment column, Doris generates and populates unique values for this column. - **Partial Specification (Column Included)**: + - **Null Values**: Doris replaces null values in the written data with system-generated unique values. + - **Non-Null Values**: User-provided values remain unchanged. :::caution Attention User-provided non-null values can disrupt the uniqueness of the auto-increment column. ::: ---- - ### Uniqueness Doris guarantees **table-wide uniqueness** for values it generates in the auto-increment column. However: @@ -52,8 +50,6 @@ Doris guarantees **table-wide uniqueness** for values it generates in the auto-i - **Guaranteed Uniqueness**: This applies only to system-generated values. - **User-Provided Values**: Doris does not validate or enforce uniqueness for values specified by users in the auto-increment column. This may result in duplicate entries. ---- - ### Density Auto-increment values generated by Doris are generally **dense** but with some considerations: @@ -61,12 +57,10 @@ Auto-increment values generated by Doris are generally **dense** but with some c - **Potential Gaps**: Gaps may appear due to performance optimizations. Each backend node (BE) pre-allocates a block of unique values for efficiency, and these blocks do not overlap between nodes. - **Non-Chronological Values**: Doris does not guarantee that values generated in later writes are larger than those from earlier writes. -:::info Note -Auto-increment values cannot be used to infer the chronological order of writes. -::: - ---- - + :::info Note + Auto-increment values cannot be used to infer the chronological order of writes. + ::: + ## Syntax To use auto-increment columns, you need to add the `AUTO_INCREMENT` attribute to the corresponding column during table creation ([CREATE-TABLE](../sql-manual/sql-statements/Data-Definition-Statements/Create/CREATE-TABLE)). To manually specify the starting value for an auto-increment column, you can do so by using the `AUTO_INCREMENT(start_value)` statement when creating the table. If not specified, the default starting value is 1. diff --git a/versioned_docs/version-3.0/table-design/auto-increment.md b/versioned_docs/version-3.0/table-design/auto-increment.md index f6a7204e506..964e6d7f136 100644 --- a/versioned_docs/version-3.0/table-design/auto-increment.md +++ b/versioned_docs/version-3.0/table-design/auto-increment.md @@ -24,9 +24,7 @@ specific language governing permissions and limitations under the License. --> -When writing data, Doris automatically assigns unique values to rows that do not have specified values in the **auto-increment column**. - ---- +In Doris, the auto increment column is a feature that automatically generates a unique numeric value, commonly used to create unique identifiers for each row of data, such as primary keys. Each time a new record is inserted, the auto increment column automatically assigns an incrementing value, eliminating the need for manually specifying the number. By using Doris's auto increment column, data uniqueness and consistency are ensured, simplifying the data insertion process, reducing human [...] ## Functionality @@ -36,15 +34,15 @@ For tables with an auto-increment column, Doris processes data writes as follows If the written data does not include the auto-increment column, Doris generates and populates unique values for this column. - **Partial Specification (Column Included)**: + - **Null Values**: Doris replaces null values in the written data with system-generated unique values. + - **Non-Null Values**: User-provided values remain unchanged. :::caution Attention User-provided non-null values can disrupt the uniqueness of the auto-increment column. ::: ---- - ### Uniqueness Doris guarantees **table-wide uniqueness** for values it generates in the auto-increment column. However: @@ -52,8 +50,6 @@ Doris guarantees **table-wide uniqueness** for values it generates in the auto-i - **Guaranteed Uniqueness**: This applies only to system-generated values. - **User-Provided Values**: Doris does not validate or enforce uniqueness for values specified by users in the auto-increment column. This may result in duplicate entries. ---- - ### Density Auto-increment values generated by Doris are generally **dense** but with some considerations: @@ -65,8 +61,6 @@ Auto-increment values generated by Doris are generally **dense** but with some c Auto-increment values cannot be used to infer the chronological order of writes. ::: ---- - ## Syntax To use auto-increment columns, you need to add the `AUTO_INCREMENT` attribute to the corresponding column during table creation ([CREATE-TABLE](../sql-manual/sql-statements/Data-Definition-Statements/Create/CREATE-TABLE)). To manually specify the starting value for an auto-increment column, you can do so by using the `AUTO_INCREMENT(start_value)` statement when creating the table. If not specified, the default starting value is 1. --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org