Skip to content

Commit

Permalink
update format
Browse files Browse the repository at this point in the history
  • Loading branch information
Yulei-Yang committed Sep 30, 2024
1 parent 9b06342 commit c9da20f
Show file tree
Hide file tree
Showing 9 changed files with 60 additions and 35 deletions.
10 changes: 7 additions & 3 deletions docs/table-design/temporary-table.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ under the License.
-->

:::note
Supported since Doris version 2.1.7 / 3.0.2
Supported since Doris version 2.1.8 / 3.0.3
:::

When handling complex data processing, saving intermediate calculation results as physical tables is a great method to significantly reduce SQL complexity and improve data debuggability. However, such tables need to be manually cleaned up after use. Currently, Doris only supports defining non-physical temporary tables through the WITH clause.
Expand Down Expand Up @@ -52,5 +52,9 @@ The other uses of temporary tables are basically the same as regular internal ta
## Notes

- Temporary tables can only be created in the Internal Catalog.
- The `ENGINE` must be `OLAP` when creating the table.
- Due to their temporary nature, creating views and materialized views based on temporary tables is not supported.
- The ENGINE must be set to OLAP when creating a table.
- Alter statements are not supported for modifying temporary tables.
- Due to their temporary nature, creating views and materialized views based on temporary tables is not supported.
- Temporary tables cannot be backed up and are not supported for synchronization using CCR/Sync Job.
- Export, Stream Load, Broker Load, S3 Load, MySQL Load, Routine Load, and Spark Load are not supported.
- When a temporary table is deleted, it does not go to the recycle bin but is permanently deleted immediately.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ distribution_desc
```

#### TEMPORARY
创建临时表。临时表仅在当前session 可见,会话结束自动删除
创建临时表。临时表仅在当前 Session 可见,会话结束自动删除

#### column_definition_list

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ under the License.
-->

:::info 备注
Supported since Doris version 2.1.7 / 3.0.2
2.1.8 / 3.0.3 版本开始支持
:::

在进行复杂数据处理时,将中间计算结果保存为实体表是一种可显著降低 sql 复杂度、提高数据可调试性的好方法。但这种表需要在使用完毕之后手动清理。目前 Doris 仅支持通过 with 从句定义非实体临时表。
在进行复杂数据处理时,将中间计算结果保存为实体表是一种可显著降低 SQL 复杂度、提高数据可调试性的好方法。但这种表需要在使用完毕之后手动清理。目前 Doris 仅支持通过 with 从句定义非实体临时表。

为了解决上述问题,Doris 引入临时表类型。临时表是一种临时存在的物化内表,和内表的主要区别是其仅存在于创建它的 Session 中,它的生命周期和当前 Session 绑定。当会话结束时,在其中创建的临时表会被自动删除。从另一方面讲,临时表的可见性也仅在创建它的会话中,即使同一时间同一个用户的另一个会话也不可见。
为了解决上述问题,Doris 引入临时表类型。临时表是一种临时存在的物化内表,和内表的主要区别是其仅存在于创建它的 Session中,它的生命周期和当前 Session 绑定。当会话结束时,在其中创建的临时表会被自动删除。从另一方面讲,临时表的可见性也仅在创建它的会话中,即使同一时间同一个用户的另一个会话也不可见。


:::info 备注
Expand All @@ -41,7 +41,7 @@ Supported since Doris version 2.1.7 / 3.0.2
## 用法

### 创建临时表
各种模型的表都可以被定义为临时表, 不论是Unique、Aggregate 或是 Duplicate模型。可以在下列 SQL 中添加 TEMPORARY 关键字创建临时表:
各种模型的表都可以被定义为临时表, 不论是 Unique、Aggregate 或是 Duplicate 模型。可以在下列 SQL 中添加 TEMPORARY 关键字创建临时表:
- [CREATE TABLE](../sql-manual/sql-statements/Data-Definition-Statements/Create/CREATE-TABLE)
- [CREATE TABLE AS SELECT](../sql-manual/sql-statements/Data-Definition-Statements/Create/CREATE-TABLE-AS-SELECT)
- [CREATE TABLE LIKE](../sql-manual/sql-statements/Data-Definition-Statements/Create/CREATE-TABLE-LIKE)
Expand All @@ -50,6 +50,10 @@ Supported since Doris version 2.1.7 / 3.0.2

## 注意事项

- 临时表只能在 Internal Catalog 中创建
- 建表时 `ENGINE` 必须为 `OLAP`
- 由于临时性,不支持基于临时表创建视图和物化视图
- 临时表只能在 Internal Catalog 中创建
- 建表时 `ENGINE` 必须为 `OLAP`
- 不支持使用 Alter 语句修改临时表
- 由于临时性,不支持基于临时表创建视图和物化视图
- 不支持备份临时表,不支持使用 CCR / Sync Job 同步临时表
- 不支持导出、Stream Load、Broker Load、S3 Load、Mysql Load、Routine Load、Spark Load
- 删除临时表时,不进回收站,直接彻底删除
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ distribution_desc
```

#### TEMPORARY
创建临时表。临时表仅在当前session 可见,会话结束自动删除
创建临时表。临时表仅在当前 Session 可见,会话结束自动删除

#### column_definition_list

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ under the License.
-->

:::info 备注
Supported since Doris version 2.1.7 / 3.0.2
2.1.8 / 3.0.3 版本开始支持
:::

在进行复杂数据处理时,将中间计算结果保存为实体表是一种可显著降低 sql 复杂度、提高数据可调试性的好方法。但这种表需要在使用完毕之后手动清理。目前 Doris 仅支持通过 with 从句定义非实体临时表。
在进行复杂数据处理时,将中间计算结果保存为实体表是一种可显著降低 SQL 复杂度、提高数据可调试性的好方法。但这种表需要在使用完毕之后手动清理。目前 Doris 仅支持通过 with 从句定义非实体临时表。

为了解决上述问题,Doris 引入临时表类型。临时表是一种临时存在的物化内表,和内表的主要区别是其仅存在于创建它的 Session 中,它的生命周期和当前 Session 绑定。当会话结束时,在其中创建的临时表会被自动删除。从另一方面讲,临时表的可见性也仅在创建它的会话中,即使同一时间同一个用户的另一个会话也不可见。
为了解决上述问题,Doris 引入临时表类型。临时表是一种临时存在的物化内表,和内表的主要区别是其仅存在于创建它的 Session中,它的生命周期和当前 Session 绑定。当会话结束时,在其中创建的临时表会被自动删除。从另一方面讲,临时表的可见性也仅在创建它的会话中,即使同一时间同一个用户的另一个会话也不可见。


:::info 备注
Expand All @@ -41,15 +41,20 @@ Supported since Doris version 2.1.7 / 3.0.2
## 用法

### 创建临时表
各种模型的表都可以被定义为临时表, 不论是Unique、Aggregate 或是 Duplicate模型。可以在下列 SQL 中添加 TEMPORARY 关键字创建临时表:
各种模型的表都可以被定义为临时表, 不论是 Unique、Aggregate 或是 Duplicate 模型。可以在下列 SQL 中添加 TEMPORARY 关键字创建临时表:
- [CREATE TABLE](../sql-manual/sql-statements/Data-Definition-Statements/Create/CREATE-TABLE)
- [CREATE TABLE AS SELECT](../sql-manual/sql-statements/Data-Definition-Statements/Create/CREATE-TABLE-AS-SELECT)
- [CREATE TABLE LIKE](../sql-manual/sql-statements/Data-Definition-Statements/Create/CREATE-TABLE-LIKE)

临时表的其它用法基本和普通内表相同。除上述 Create 语句外, 其它 DDL 及 DML 语句无需添加 TEMPORARY 关键字。
临时表的其它用法基本和普通内表相同。除上述 Create 语句外, 其它 DDL 及 DML 语句无需添加 TEMPORARY 关键字。

## 注意事项

- 临时表只能在 Internal Catalog 中创建
- 建表时 `ENGINE` 必须为 `OLAP`
- 由于临时性,不支持基于临时表创建视图和物化视图
- 临时表只能在 Internal Catalog 中创建
- 建表时 `ENGINE` 必须为 `OLAP`
- 不支持使用 Alter 语句修改临时表
- 由于临时性,不支持基于临时表创建视图和物化视图
- 不支持备份临时表,不支持使用 CCR / Sync Job 同步临时表
- 不支持导出、Stream Load、Broker Load、S3 Load、Mysql Load、Routine Load、Spark Load
- 删除临时表时,不进回收站,直接彻底删除
-
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ distribution_desc
```

#### TEMPORARY
创建临时表。临时表仅在当前session 可见,会话结束自动删除
创建临时表。临时表仅在当前 Session 可见,会话结束自动删除

#### column_definition_list

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ under the License.
-->

:::info 备注
Supported since Doris version 2.1.7 / 3.0.2
2.1.8 / 3.0.3 版本开始支持
:::

在进行复杂数据处理时,将中间计算结果保存为实体表是一种可显著降低 sql 复杂度、提高数据可调试性的好方法。但这种表需要在使用完毕之后手动清理。目前 Doris 仅支持通过 with 从句定义非实体临时表。
在进行复杂数据处理时,将中间计算结果保存为实体表是一种可显著降低 SQL 复杂度、提高数据可调试性的好方法。但这种表需要在使用完毕之后手动清理。目前 Doris 仅支持通过 with 从句定义非实体临时表。

为了解决上述问题,Doris 引入临时表类型。临时表是一种临时存在的物化内表,和内表的主要区别是其仅存在于创建它的 Session 中,它的生命周期和当前 Session 绑定。当会话结束时,在其中创建的临时表会被自动删除。从另一方面讲,临时表的可见性也仅在创建它的会话中,即使同一时间同一个用户的另一个会话也不可见。
为了解决上述问题,Doris 引入临时表类型。临时表是一种临时存在的物化内表,和内表的主要区别是其仅存在于创建它的 Session中,它的生命周期和当前 Session 绑定。当会话结束时,在其中创建的临时表会被自动删除。从另一方面讲,临时表的可见性也仅在创建它的会话中,即使同一时间同一个用户的另一个会话也不可见。


:::info 备注
Expand All @@ -41,15 +41,19 @@ Supported since Doris version 2.1.7 / 3.0.2
## 用法

### 创建临时表
各种模型的表都可以被定义为临时表, 不论是Unique、Aggregate 或是 Duplicate模型。可以在下列 SQL 中添加 TEMPORARY 关键字创建临时表:
各种模型的表都可以被定义为临时表, 不论是 Unique、Aggregate 或是 Duplicate 模型。可以在下列 SQL 中添加 TEMPORARY 关键字创建临时表:
- [CREATE TABLE](../sql-manual/sql-statements/Data-Definition-Statements/Create/CREATE-TABLE)
- [CREATE TABLE AS SELECT](../sql-manual/sql-statements/Data-Definition-Statements/Create/CREATE-TABLE-AS-SELECT)
- [CREATE TABLE LIKE](../sql-manual/sql-statements/Data-Definition-Statements/Create/CREATE-TABLE-LIKE)

临时表的其它用法基本和普通内表相同。除上述 Create 语句外, 其它 DDL 及 DML 语句无需添加 TEMPORARY 关键字。
临时表的其它用法基本和普通内表相同。除上述 Create 语句外, 其它 DDL 及 DML 语句无需添加 TEMPORARY 关键字。

## 注意事项

- 临时表只能在 Internal Catalog 中创建
- 建表时 `ENGINE` 必须为 `OLAP`
- 由于临时性,不支持基于临时表创建视图和物化视图
- 临时表只能在 Internal Catalog 中创建
- 建表时 `ENGINE` 必须为 `OLAP`
- 不支持使用 Alter 语句修改临时表
- 由于临时性,不支持基于临时表创建视图和物化视图
- 不支持备份临时表,不支持使用 CCR / Sync Job 同步临时表
- 不支持导出、Stream Load、Broker Load、S3 Load、Mysql Load、Routine Load、Spark Load
- 删除临时表时,不进回收站,直接彻底删除
10 changes: 7 additions & 3 deletions versioned_docs/version-2.1/table-design/temporary-table.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ under the License.
-->

:::note
Supported since Doris version 2.1.7 / 3.0.2
Supported since Doris version 2.1.8 / 3.0.3
:::

When handling complex data processing, saving intermediate calculation results as physical tables is a great method to significantly reduce SQL complexity and improve data debuggability. However, such tables need to be manually cleaned up after use. Currently, Doris only supports defining non-physical temporary tables through the WITH clause.
Expand Down Expand Up @@ -52,5 +52,9 @@ The other uses of temporary tables are basically the same as regular internal ta
## Notes

- Temporary tables can only be created in the Internal Catalog.
- The `ENGINE` must be `OLAP` when creating the table.
- Due to their temporary nature, creating views and materialized views based on temporary tables is not supported.
- The ENGINE must be set to OLAP when creating a table.
- Alter statements are not supported for modifying temporary tables.
- Due to their temporary nature, creating views and materialized views based on temporary tables is not supported.
- Temporary tables cannot be backed up and are not supported for synchronization using CCR/Sync Job.
- Export, Stream Load, Broker Load, S3 Load, MySQL Load, Routine Load, and Spark Load are not supported.
- When a temporary table is deleted, it does not go to the recycle bin but is permanently deleted immediately.
10 changes: 7 additions & 3 deletions versioned_docs/version-3.0/table-design/temporary-table.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ under the License.
-->

:::note
Supported since Doris version 2.1.7 / 3.0.2
Supported since Doris version 2.1.8 / 3.0.3
:::

When handling complex data processing, saving intermediate calculation results as physical tables is a great method to significantly reduce SQL complexity and improve data debuggability. However, such tables need to be manually cleaned up after use. Currently, Doris only supports defining non-physical temporary tables through the WITH clause.
Expand Down Expand Up @@ -52,5 +52,9 @@ The other uses of temporary tables are basically the same as regular internal ta
## Notes

- Temporary tables can only be created in the Internal Catalog.
- The `ENGINE` must be `OLAP` when creating the table.
- Due to their temporary nature, creating views and materialized views based on temporary tables is not supported.
- The ENGINE must be set to OLAP when creating a table.
- Alter statements are not supported for modifying temporary tables.
- Due to their temporary nature, creating views and materialized views based on temporary tables is not supported.
- Temporary tables cannot be backed up and are not supported for synchronization using CCR/Sync Job.
- Export, Stream Load, Broker Load, S3 Load, MySQL Load, Routine Load, and Spark Load are not supported.
- When a temporary table is deleted, it does not go to the recycle bin but is permanently deleted immediately.

0 comments on commit c9da20f

Please sign in to comment.