Skip to content

Commit 081e763

Browse files
github-actions[bot]Chasen-Zhang
authored andcommitted
💬Generate LLM translations
1 parent 7287fca commit 081e763

File tree

3 files changed

+83
-78
lines changed

3 files changed

+83
-78
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,42 @@
11
---
2-
title: FUSE 引擎
2+
title: Fuse 引擎
33
---
44
import FunctionDescription from '@site/src/components/FunctionDescription';
55

6-
<FunctionDescription description="引入或更新v1.2.223"/>
6+
<FunctionDescription description="引入或更新: v1.2.617"/>
77

8-
Databend 使用 FUSE 引擎作为其默认引擎,提供了一个类似于 Git 的用户友好界面的数据管理系统。用户可以随时轻松查询数据,并且可以轻松地将数据恢复到任何期望的时间点。
9-
10-
**相关主题**[在 Databend 中找到 Peter Parker](https://www.databend.com/blog/time-travel)
8+
Databend 使用 Fuse 引擎作为其默认引擎,提供了一个类似于 Git 的用户友好界面的数据管理系统。用户可以轻松地在任何给定时刻查询数据,并轻松地将数据恢复到任何所需的时间点。
119

1210
## 语法
1311

1412
```sql
15-
CREATE TABLE table_name (
16-
column_name1 column_type1,
17-
column_name2 column_type2,
18-
...
19-
) [ENGINE = FUSE] [CLUSTER BY(<expr> [, <expr>, ...] )] [选项];
13+
CREATE TABLE <table_name> (
14+
<column_definitions>
15+
) [ENGINE = FUSE]
16+
[CLUSTER BY (<expr> [, <expr>, ...] )]
17+
[<Options>];
2018
```
2119

22-
有关 CREATE TABLE 命令的更多信息,请参见 [CREATE TABLE](../../10-sql-commands/00-ddl/01-table/10-ddl-create-table.md)
23-
24-
### ENGINE
25-
26-
如果没有明确指定引擎,Databend 将自动默认使用 FUSE 引擎来创建表,这等同于 `Engine = FUSE`
27-
28-
### CLUSTER BY
29-
30-
`CLUSTER BY` 参数指定了由多个表达式组成的数据的排序方法,这在压缩或重新聚类时非常有用。合适的 `CLUSTER BY` 参数可以显著加速查询。
31-
32-
### 选项
33-
34-
FUSE 引擎提供以下选项(不区分大小写),使您能够进一步自定义引擎的功能。要修改现有表的选项,请使用 [ALTER TABLE OPTION](../../10-sql-commands/00-ddl/01-table/90-alter-table-option.md) 命令。
35-
36-
| 选项 | 语法 | 描述 |
37-
|---------------------- |----------------------------------------------------- |------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
38-
| bloom_index_columns | `bloom_index_columns = '<column> [, <column> ...]'` | 指定用于布隆索引的列。这些列的数据类型可以是 Map、Number、String、Date 或 Timestamp。如果没有指定特定列,则默认在所有支持的列上创建布隆索引。`bloom_index_columns=''` 禁用布隆索引。 |
39-
| compression | `compression = '<compression>'` | 指定引擎的压缩方法。压缩选项包括 lz4、zstd、snappy 或 none。在对象存储中,默认的压缩方法为 zstd,在文件系统(fs)存储中为 lz4。 |
40-
| storage_format | `storage_format = '<storage_format>'` | 指定数据的存储方式。默认情况下,storage_format 设置为 **Parquet**,它提供高压缩率,非常适合云原生对象存储。此外,还支持实验性的 **Native** 格式,优化了存储设备(如文件系统)的内存复制开销。 |
41-
| snapshot_loc | `snapshot_loc = '<snapshot_loc>'` | 以字符串格式指定位置参数,允许轻松共享表而无需数据复制。 |
42-
| block_size_threshold | `block_size_threshold = '<block_size_threshold>'` | 指定最大块大小(以字节为单位)。默认为 104,857,600 字节。 |
43-
| block_per_segment | `block_per_segment = '<block_per_segment>'` | 指定段中的最大块数。默认为 1,000。 |
44-
| row_per_block | `row_per_block = '<row_per_block>'` | 指定文件中的最大行数。默认为 1,000,000。 |
45-
| change_tracking | `change_tracking = True / False` | 在 FUSE 引擎中将此选项设置为 `True` 允许跟踪表的更改。<br/>为表创建流将自动将 `change_tracking` 设置为 `True` 并为表引入额外的隐藏列作为更改跟踪元数据。更多信息,请参见 [流是如何工作的](../../10-sql-commands/00-ddl/04-stream/index.md#how-stream-works)|
20+
有关 `CREATE TABLE` 语法的更多详细信息,请参阅 [CREATE TABLE](../../10-sql-commands/00-ddl/01-table/10-ddl-create-table.md)
21+
22+
| 参数 | 描述 |
23+
|--------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
24+
| `ENGINE` | 如果未明确指定引擎,Databend 将自动默认使用 Fuse 引擎创建表,这等同于 `ENGINE = FUSE`|
25+
| `CLUSTER BY` | 指定由多个表达式组成的数据的排序方法。更多信息,请参阅 [Cluster Key](/guides/performance/cluster-key)|
26+
| `<Options>` | Fuse 引擎提供了各种选项(不区分大小写),允许您自定义表的属性。详情请参阅 [Fuse 引擎选项](#fuse-engine-options)。<br/>- 使用空格分隔多个选项。<br/>- 使用 [ALTER TABLE OPTION](../../10-sql-commands/00-ddl/01-table/90-alter-table-option.md) 修改表的选项。<br/>- 使用 [SHOW CREATE TABLE](../../10-sql-commands/00-ddl/01-table/show-create-table.md) 显示表的选项。|
27+
28+
## Fuse 引擎选项
29+
30+
以下是可用的 Fuse 引擎选项:
31+
32+
| 选项 | 语法 | 描述 |
33+
|---------------------- |----------------------------------------------------- |------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
34+
| bloom_index_columns | `bloom_index_columns = '<column> [, <column> ...]'` | 指定用于布隆索引的列。这些列的数据类型可以是 Map、Number、String、Date 或 Timestamp。如果没有指定特定列,布隆索引默认在所有支持的列上创建。`bloom_index_columns=''` 禁用布隆索引。 |
35+
| compression | `compression = '<compression>'` | 指定引擎的压缩方法。压缩选项包括 lz4、zstd、snappy 或 none。压缩方法在对象存储中默认为 zstd,在文件系统(fs)存储中默认为 lz4。 |
36+
| storage_format | `storage_format = '<storage_format>'` | 指定数据的存储方式。默认情况下,storage_format 设置为 **Parquet**,它提供高压缩率,非常适合云原生对象存储。此外,还支持实验性的 **Native** 格式,优化了文件系统等存储设备的内存复制开销。 |
37+
| snapshot_loc | `snapshot_loc = '<snapshot_loc>'` | 指定一个字符串格式的位置参数,允许在不复制数据的情况下轻松共享表。 |
38+
| block_size_threshold | `block_size_threshold = <n>` | 指定块的最大大小(以字节为单位)。默认值为 104,857,600 字节。 |
39+
| block_per_segment | `block_per_segment = <n>` | 指定段中的最大块数。默认值为 1,000。 |
40+
| row_per_block | `row_per_block = <n>` | 指定文件中的最大行数。默认值为 1,000,000。 |
41+
| change_tracking | `change_tracking = True / False` | 在 Fuse 引擎中将此选项设置为 `True` 允许跟踪表的更改。<br/>为表创建流将自动将 `change_tracking` 设置为 `True`,并在表中引入额外的隐藏列作为更改跟踪元数据。更多信息,请参阅 [How Stream Works](/guides/load-data/continuous-data-pipelines/stream#how-stream-works)|
42+
| data_retention_period_in_hours | `data_retention_period_in_hours = <n>` | 指定保留表数据的小时数。最小值为 1 小时。最大值由 [databend-query.toml](https://github.com/datafuselabs/databend/blob/main/scripts/distribution/configs/databend-query.toml) 配置文件中的 `data_retention_time_in_days_max` 设置定义,如果未指定,则默认为 2,160 小时(90 天 x 24 小时)。|

docs/cn/sql-reference/10-sql-commands/00-ddl/01-table/90-alter-table-option.md

+30-31
Original file line numberDiff line numberDiff line change
@@ -4,45 +4,44 @@ sidebar_position: 5
44
---
55
import FunctionDescription from '@site/src/components/FunctionDescription';
66

7-
<FunctionDescription description="引入: v1.2.25"/>
7+
<FunctionDescription description="引入或更新: v1.2.25"/>
88

9-
修改使用默认[Fuse引擎](../../../00-sql-reference/30-table-engines/00-fuse.md)创建的表的选项。对于可以修改的可用选项,请参见[选项](../../../00-sql-reference/30-table-engines/00-fuse.md#options)
9+
修改使用 [Fuse Engine](../../../00-sql-reference/30-table-engines/00-fuse.md) 创建的表的选项。有关可用选项,请参见 [Fuse Engine Options](../../../00-sql-reference/30-table-engines/00-fuse.md#fuse-engine-options)
1010

1111
## 语法
1212

1313
```sql
14-
ALTER TABLE [ <database_name>. ]<table_name> SET OPTIONS (options)
14+
ALTER TABLE [ <database_name>. ]<table_name>
15+
SET OPTIONS (<options>)
1516
```
1617

1718
## 示例
1819

20+
此示例演示如何修改 Fuse Engine 选项并通过 [SHOW CREATE TABLE](show-create-table.md) 验证更改:
21+
1922
```sql
20-
create table t(a int, b int);
21-
22-
alter table t set options(bloom_index_columns='a');
23-
24-
set hide_options_in_show_create_table=0;
25-
26-
show create table t;
27-
+-------+-------------------------------------------------------------------------+
28-
| Table | Create Table |
29-
+-------+-------------------------------------------------------------------------+
30-
| t | CREATE TABLE `t` (
31-
`a` INT,
32-
`b` INT
33-
) ENGINE=FUSE BLOOM_INDEX_COLUMNS='a' COMPRESSION='zstd' STORAGE_FORMAT='parquet' |
34-
+-------+-------------------------------------------------------------------------+
35-
36-
-- 禁用所有布隆过滤器索引。
37-
alter table t set options(bloom_index_columns='');
38-
39-
show create table t;
40-
+-------+-------------------------------------------------------------------------+
41-
| Table | Create Table |
42-
+-------+-------------------------------------------------------------------------+
43-
| t | CREATE TABLE `t` (
44-
`a` INT,
45-
`b` INT
46-
) ENGINE=FUSE BLOOM_INDEX_COLUMNS='' COMPRESSION='zstd' STORAGE_FORMAT='parquet' |
47-
+-------+-------------------------------------------------------------------------+
23+
CREATE TABLE fuse_table (a int);
24+
25+
SET hide_options_in_show_create_table=0;
26+
27+
-- 显示当前的 CREATE TABLE 语句,包括 Fuse Engine 选项
28+
SHOW CREATE TABLE fuse_table;
29+
30+
-[ RECORD 1 ]-----------------------------------
31+
Table: fuse_table
32+
Create Table: CREATE TABLE fuse_table (
33+
a INT NULL
34+
) ENGINE=FUSE COMPRESSION='lz4' STORAGE_FORMAT='native'
35+
36+
-- 将数据保留期更改为 240 小时
37+
ALTER TABLE fuse_table SET OPTIONS (data_retention_period_in_hours = 240);
38+
39+
-- 显示更新后的 CREATE TABLE 语句,反映新的选项
40+
SHOW CREATE TABLE fuse_table;
41+
42+
-[ RECORD 1 ]-----------------------------------
43+
Table: fuse_table
44+
Create Table: CREATE TABLE fuse_table (
45+
a INT NULL
46+
) ENGINE=FUSE COMPRESSION='lz4' DATA_RETENTION_PERIOD_IN_HOURS='240' STORAGE_FORMAT='native'
4847
```

docs/cn/sql-reference/10-sql-commands/00-ddl/01-table/show-create-table.md

+22-13
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,36 @@ title: SHOW CREATE TABLE
33
sidebar_position: 10
44
---
55

6-
显示创建指定表的CREATE TABLE语句。
6+
显示指定表的CREATE TABLE语句。要包含Fuse Engine选项在结果中,设置`hide_options_in_show_create_table``0`
77

88
## 语法
99

1010
```sql
11-
SHOW CREATE TABLE [ <database_name>. ]table_name
11+
SHOW CREATE TABLE [ <database_name>. ]<table_name>
1212
```
1313

1414
## 示例
1515

16-
:::tip
17-
numbers(N) – 一个用于测试的表,包含单个 `number` 列(UInt64),包含从0到N-1的整数。
18-
:::
16+
此示例展示了如何通过将`hide_options_in_show_create_table`设置为`0`来显示完整的CREATE TABLE语句,包括Fuse Engine选项:
1917

2018
```sql
21-
SHOW CREATE TABLE system.numbers;
22-
+---------+--------------------------------------------------------------------+
23-
| Table | Create Table |
24-
+---------+--------------------------------------------------------------------+
25-
| numbers | CREATE TABLE `numbers` (
26-
`number` UInt64,
27-
) ENGINE=SystemNumbers |
28-
+---------+--------------------------------------------------------------------+
19+
CREATE TABLE fuse_table (a int);
20+
21+
SHOW CREATE TABLE fuse_table;
22+
23+
-[ RECORD 1 ]-----------------------------------
24+
Table: fuse_table
25+
Create Table: CREATE TABLE fuse_table (
26+
a INT NULL
27+
) ENGINE=FUSE
28+
29+
SET hide_options_in_show_create_table=0;
30+
31+
SHOW CREATE TABLE fuse_table;
32+
33+
-[ RECORD 1 ]-----------------------------------
34+
Table: fuse_table
35+
Create Table: CREATE TABLE fuse_table (
36+
a INT NULL
37+
) ENGINE=FUSE COMPRESSION='lz4' DATA_RETENTION_PERIOD_IN_HOURS='240' STORAGE_FORMAT='native'
2938
```

0 commit comments

Comments
 (0)