Skip to content

Commit aa875a9

Browse files
committed
typo(docs): fix some docs problem
+ `print(adbc_driver_flightsql.__version__)` throw error. + fix `Can not found function 'sum_merge'` + fix `Can not found function 'sum_union'` + fix ```errCode = 2, detailMessage = Table testdb.test_partition is not a dynamic partition table. Use command `HELP ALTER TABLE` to see how to change a normal table to a dynamic partition table.``` + docs change `SHOW INDEX FROM idx_name` into `SHOW INDEX FROM table_name` + fix `errCode = 2, detailMessage = Can not drop key column when table has value column with REPLACE aggregation method`
1 parent a537395 commit aa875a9

File tree

81 files changed

+242
-218
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+242
-218
lines changed

docs/db-connect/arrow-flight-sql-connect.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ In Doris, query results are organized in columnar format as Blocks. In versions
3434

3535
To install Apache Arrow, you can find detailed installation instructions in the official documentation [Apache Arrow](https://arrow.apache.org/install/). For more information on how Doris implements the Arrow Flight protocol, you can refer to [Doris support Arrow Flight SQL protocol](https://github.com/apache/doris/issues/25514).
3636

37-
3837
## Python Usage
3938

4039
Use Python's ADBC ​​Driver to connect to Doris to achieve extremely fast data reading. The following steps use Python (version >= 3.9) ADBC ​​Driver to perform a series of common database syntax operations, including DDL, DML, setting Session variables, and Show statements.
@@ -52,6 +51,7 @@ Import the following modules/libraries in the code to use the installed Library:
5251

5352
```Python
5453
import adbc_driver_manager
54+
import adbc_driver_flightsql
5555
import adbc_driver_flightsql.dbapi as flight_sql
5656

5757
>>> print(adbc_driver_manager.__version__)
@@ -283,6 +283,7 @@ cursor.close()
283283
The open source JDBC driver of Arrow Flight SQL protocol is compatible with the standard JDBC API, which can be used by most BI tools to access Doris through JDBC and supports high-speed transmission of Apache Arrow data. The usage is similar to connecting to Doris through the JDBC driver of MySQL protocol. You only need to replace the jdbc:mysql protocol in the link URL with the jdbc:arrow-flight-sql protocol. The query results are still returned in the JDBC ResultSet data structure.
284284

285285
POM dependency:
286+
286287
```Java
287288
<properties>
288289
<arrow.version>17.0.0</arrow.version>
@@ -340,6 +341,7 @@ conn.close();
340341
In addition to using JDBC, similar to Python, JAVA can also create a Driver to read Doris and return data in Arrow format. The following are how to use AdbcDriver and JdbcDriver to connect to Doris Arrow Flight Server.
341342

342343
POM dependency:
344+
343345
```Java
344346
<properties>
345347
<adbc.version>0.15.0</adbc.version>

docs/table-design/data-model/aggregate.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ select group_concat_merge(v2) from aggstate;
179179
If you do not want the final aggregation result, you can use `union` to combine multiple intermediate aggregation results and generate a new intermediate result.
180180

181181
```sql
182-
insert into aggstate select 3,sum_union(k2),group_concat_union(k3) from aggstate;
182+
insert into aggstate select 3,sum(v1),group_concat_union(v2) from aggstate;
183183
```
184184

185185
The calculations in the table are as follows:
@@ -189,16 +189,16 @@ The calculations in the table are as follows:
189189
The query result is as follows:
190190

191191
```sql
192-
mysql> select sum_merge(k2) , group_concat_merge(k3)from aggstate;
192+
mysql> select sum(v1), group_concat_merge(v2) from aggstate;
193193
+---------------+------------------------+
194-
| sum_merge(k2) | group_concat_merge(k3) |
194+
| sum(v1) | group_concat_merge(v2) |
195195
+---------------+------------------------+
196196
| 20 | c,b,a,d,c,b,a,d |
197197
+---------------+------------------------+
198198

199-
mysql> select sum_merge(k2) , group_concat_merge(k3)from aggstate where k1 != 2;
199+
mysql> select sum(v1), group_concat_merge(v2) from aggstate where k1 != 2;
200200
+---------------+------------------------+
201-
| sum_merge(k2) | group_concat_merge(k3) |
201+
| sum(v1) | group_concat_merge(v2) |
202202
+---------------+------------------------+
203203
| 16 | c,b,a,d,c,b,a |
204204
+---------------+------------------------+

docs/table-design/data-partitioning/dynamic-partitioning.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,13 @@ When using the ALTER TABLE statement to modify dynamic partitioning, the changes
8686
In the example below, the ALTER TABLE statement is used to modify a non-dynamic partitioned table to a dynamic partitioned table:
8787

8888
```sql
89-
CREATE TABLE test_dynamic_partition(
89+
CREATE TABLE test_partition(
9090
order_id BIGINT,
9191
create_dt DATE,
9292
username VARCHAR(20)
9393
)
9494
DUPLICATE KEY(order_id)
95+
PARTITION BY RANGE(create_dt) ()
9596
DISTRIBUTED BY HASH(order_id) BUCKETS 10;
9697

9798
ALTER TABLE test_partition SET (

docs/table-design/index/inverted-index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ ALTER TABLE table_name DROP INDEX idx_name;
264264
SHOW CREATE TABLE table_name;
265265

266266
-- Syntax 2: IndexType as INVERTED indicates an inverted index
267-
SHOW INDEX FROM idx_name;
267+
SHOW INDEX FROM table_name;
268268

269269
## Using Indexes
270270

@@ -415,7 +415,7 @@ PROPERTIES ("replication_num" = "1");
415415
```
416416
wget https://qa-build.oss-cn-beijing.aliyuncs.com/regression/index/hacknernews_1m.csv.gz
417417
418-
curl --location-trusted -u root: -H "compress_type:gz" -T hacknernews_1m.csv.gz http://127.0.0.1:8030/api/test_inverted_index/hackernews_1m/_stream_load
418+
curl --location-trusted -u root: -H "compress_type:gz" -T hacknernews_1m.csv.gz -XPUT http://127.0.0.1:8030/api/test_inverted_index/hackernews_1m/_stream_load
419419
{
420420
"TxnId": 2,
421421
"Label": "a8a3e802-2329-49e8-912b-04c800a461a6",

docs/table-design/index/ngram-bloomfilter-index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ SHOW CREATE TABLE table_name;
7474

7575
-- Syntax 2: IndexType as NGRAM_BF indicates an inverted index
7676
```sql
77-
SHOW INDEX FROM idx_name;
77+
SHOW INDEX FROM table_name;
7878
```
7979

8080
### Deleting an NGram BloomFilter Index

docs/table-design/schema-change.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ MODIFY COLUMN col1 BIGINT KEY DEFAULT "1" AFTER col2;
266266

267267
Note: Whether modifying a key column or a value column, the complete column information must be declared.
268268

269-
3. Modify the maximum length of the `val1` column in the base table. The original `val1` was (val1 VARCHAR(32) REPLACE DEFAULT "abc")
269+
3. Modify the maximum length of the `val5` column in the base table. The original `val5` was (val5 VARCHAR(32) REPLACE DEFAULT "abc")
270270

271271
```sql
272272
ALTER TABLE example_db.my_table

docs/table-design/tiered-storage/remote-storage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ To optimize query performance and save object storage resources, local Cache has
203203

204204
- The Cache is managed through LRU and does not support TTL.
205205

206-
For specific configurations, please refer to (../../lakehouse/filecache).
206+
For specific configurations, please refer to [Data Cache](../../lakehouse/filecache).
207207

208208
## FAQ
209209

i18n/zh-CN/docusaurus-plugin-content-docs/current/admin-manual/auth/authentication-and-authorization.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,9 @@ Doris 支持以下密码策略,可以帮助用户更好的进行密码管理
129129
- 设置用户属性:[SET PROPERTY](../../sql-manual/sql-statements/account-management/SET-PROPERTY)
130130
- 查看用户属性:[SHOW PROPERTY](../../sql-manual/sql-statements/account-management/SHOW-PROPERTY)
131131
- 修改密码:[SET PASSWORD](../../sql-manual/sql-statements/account-management/SET-PASSWORD)
132-
- 查看支持的所有权限项:[SHOW PRIVILEGES]
133-
- 查看行权限策略 [SHOW ROW POLICY]
134-
- 创建行权限策略 [CREATE ROW POLICY]
132+
- 查看支持的所有权限项:[SHOW PRIVILEGES](../../../../sql-manual/sql-statements/account-management/SHOW-PRIVILEGES)
133+
- 查看行权限策略[SHOW ROW POLICY](../../../../sql-manual/sql-statements/data-governance/SHOW-ROW-POLICY)
134+
- 创建行权限策略[CREATE ROW POLICY](../../../../sql-manual/sql-statements/data-governance/CREATE-ROW-POLICY)
135135

136136
### 权限类型
137137

i18n/zh-CN/docusaurus-plugin-content-docs/current/admin-manual/trouble-shooting/memory-management/memory-feature/memory-tracker.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ Orphan Memory Tracker 是默认 Memory Tracker,值为正数或负数都意味
9898

9999
- 如果线程开始时 TLS 中没有绑定 Memory Tracker,那么 Doris Allocator 会默认将内存记录到 Orphan Memory Tracker 中,意味着这部分内存不知所属,有关 Doris Allocator 记录内存的原理参考上文 [内存跟踪原理]
100100

101-
- Query 或 Load 等任务 Memory Tracker 析构时如果值不等于 0,通常意味着这部分内存没有释放,将把这部分剩余的内存记录到 Orphan Memory Tracker 中,相当于将剩余内存交由 Orphan Memory Tracker 继续跟踪。从而保证 Orphan Memory Tracker 和其他 Memory Tracker 之和等于 Doris Allocator 分配出去的所有内存。
101+
- Query 或 Load 等任务 Memory Tracker 析构时如果值不等于 0,通常意味着这部分内存没有释放,将把这部分剩余的内存记录到 Orphan Memory Tracker 中,相当于将剩余内存交由 Orphan Memory Tracker 继续跟踪。从而保证 Orphan Memory Tracker 和其他 Memory Tracker 之和等于 Doris Allocator 分配出去的所有内存。
102102

103103
理想情况下,期望 Orphan Memory Tracker 的值接近 0。所以我们希望所有线程开始时都 Attach 一个 Orphan 之外的 Memory Tracker,比如 Query 或 Load Memory Tracker。并且所有 Query 或 Load Memory Tracker 析构时都等于 0,这意味着 Query 或 Load 执行过程中使用的内存在析构时都已经被释放。
104104

i18n/zh-CN/docusaurus-plugin-content-docs/current/db-connect/arrow-flight-sql-connect.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ under the License.
3434

3535
安装 Apache Arrow 你可以去官方文档 [Apache Arrow](https://arrow.apache.org/install/) 找到详细的安装教程。更多关于 Doris 实现 Arrow Flight 协议的原理可以参考 [Doris support Arrow Flight SQL protocol](https://github.com/apache/doris/issues/25514)
3636

37-
3837
## Python 使用方法
3938

4039
使用 Python 的 ADBC Driver 连接 Doris 实现数据的极速读取,下面的步骤使用 Python(版本 >= 3.9)的 ADBC Driver 执行一系列常见的数据库语法操作,包括 DDL、DML、设置 Session 变量以及 Show 语句等。
@@ -52,6 +51,7 @@ pip install adbc_driver_flightsql
5251

5352
```Python
5453
import adbc_driver_manager
54+
import adbc_driver_flightsql
5555
import adbc_driver_flightsql.dbapi as flight_sql
5656

5757
>>> print(adbc_driver_manager.__version__)
@@ -283,6 +283,7 @@ cursor.close()
283283
Arrow Flight SQL 协议的开源 JDBC 驱动兼容标准的 JDBC API,可用于大多数 BI 工具通过 JDBC 访问 Doris,并支持高速传输 Apache Arrow 数据。使用方法与通过 MySQL 协议的 JDBC 驱动连接 Doris 类似,只需将链接 URL 中的 jdbc:mysql 协议换成 jdbc:arrow-flight-sql 协议,查询返回的结果依然是 JDBC 的 ResultSet 数据结构。
284284

285285
POM dependency:
286+
286287
```Java
287288
<properties>
288289
<arrow.version>17.0.0</arrow.version>
@@ -340,6 +341,7 @@ conn.close();
340341
除了使用 JDBC,与 Python 类似,Java 也可以创建 Driver 读取 Doris 并返回 Arrow 格式的数据,下面分别是使用 AdbcDriver 和 JdbcDriver 连接 Doris Arrow Flight Server。
341342

342343
POM dependency:
344+
343345
```Java
344346
<properties>
345347
<adbc.version>0.15.0</adbc.version>

i18n/zh-CN/docusaurus-plugin-content-docs/current/ecosystem/beats.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ queue.mem:
189189
flush.timeout: 10s
190190
191191
# 4. output 部分负责数据输出
192-
# doris output 将数据输出到 Doris,使用的是 Stream Load HTTP 接口。通过 headers 参数指定了 Stream Load 的数据格式为 JSON,通过 codec_format_string 参数用类似 printf 的方式格式化输出到 Doris 的数据。比如下面的例子基于 filebeat 内部的字段 format 出一个 JSON,这些字段可以是 filebeat 内置字段如 agent.hostname,也可以是 processor 比如 dissect 生产的字段如 day,通过 %{[a][b]} 的方式引用,Stream Load 会自动将 JSON 字段写入对应的 Doris 表的字段。
192+
# doris output 将数据输出到 Doris,使用的是 Stream Load HTTP 接口。通过 headers 参数指定了 Stream Load 的数据格式为 JSON,通过 codec_format_string 参数用类似 printf 的方式格式化输出到 Doris 的数据。比如下面的例子基于 filebeat 内部的字段 format 出一个 JSON,这些字段可以是 filebeat 内置字段如 agent.hostname,也可以是 processor 比如 dissect 生产的字段如 day,通过 %{[a][b]} 的方式引用,Stream Load 会自动将 JSON 字段写入对应的 Doris 表的字段。
193193
output.doris:
194194
fenodes: [ "http://fehost1:http_port", "http://fehost2:http_port", "http://fehost3:http_port" ]
195195
user: "your_username"

i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/account-management/ALTER-USER.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ password_policy:
4949

5050
> 一个用户的唯一标识,语法为:'user_name'@'host'
5151
> `user_identity` 由两部分组成,user_name 和 host,其中 username 为用户名。host 标识用户端连接所在的主机地址。host 部分可以使用 % 进行模糊匹配。如果不指定 host,默认为 '%',即表示该用户可以从任意 host 连接到 Doris。
52-
> host 部分也可指定为 domain,即使用中括号包围,则 Doris 会认为这个是一个 domain,并尝试解析其 ip 地址。
52+
> host 部分也可指定为 domain,即使用中括号包围,则 Doris 会认为这个是一个 domain,并尝试解析其 ip 地址。
5353
5454
## 可选参数
5555

i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/account-management/CREATE-USER.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ password_policy:
4949

5050
> 一个用户的唯一标识,语法为:'user_name'@'host'
5151
> `user_identity` 由两部分组成,user_name 和 host,其中 username 为用户名。host 标识用户端连接所在的主机地址。host 部分可以使用 % 进行模糊匹配。如果不指定 host,默认为 '%',即表示该用户可以从任意 host 连接到 Doris。
52-
> host 部分也可指定为 domain,即使用中括号包围,则 Doris 会认为这个是一个 domain,并尝试解析其 ip 地址。
52+
> host 部分也可指定为 domain,即使用中括号包围,则 Doris 会认为这个是一个 domain,并尝试解析其 ip 地址。
5353
5454
## 可选参数
5555

i18n/zh-CN/docusaurus-plugin-content-docs/current/table-design/best-practice.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ DISTRIBUTED BY HASH(`siteid`) BUCKETS 10;
321321
4. 亿级别以上数据,如果有模糊匹配,使用倒排索引或者是 NGram Bloomfilter
322322
:::
323323

324-
### 2.6 Bitmap 索引
324+
### 6 Bitmap 索引
325325

326326
为了加速数据查询,Doris 支持用户为某些字段添加 Bitmap 索引,适合在基数较低的列上进行等值查询或范围查询的场景。
327327

i18n/zh-CN/docusaurus-plugin-content-docs/current/table-design/data-model/aggregate.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ AGGREGATE KEY(k1)
135135
DISTRIBUTED BY HASH(k1) BUCKETS 3;
136136
```
137137

138-
在此示例中,`agg_state` 用于声明数据类型,`sum/group_concat` 为聚合函数签名。agg_state 是一种数据类型,类似于 int、array、string。agg_state 只能与 [state](../../sql-manual/sql-functions/combinators/state)[merge](../../sql-manual/sql-functions/combinators/merge)[union](../../sql-manual/sql-functions/combinators/union) 函数组合器配合使用。它表示聚合函数的中间结果,例如 `group_concat` 的中间状态,而非最终结果。
138+
在此示例中,`agg_state` 用于声明数据类型,`sum/group_concat` 为聚合函数签名。agg_state 是一种数据类型,类似于 int、array、string。agg_state 只能与 [state](../../sql-manual/sql-functions/combinators/state)[merge](../../sql-manual/sql-functions/combinators/merge)[union](../../sql-manual/sql-functions/combinators/union) 函数组合器配合使用。它表示聚合函数的中间结果,例如 `group_concat` 的中间状态,而非最终结果。
139139

140140
agg_state 类型需要使用 state 函数来生成,对于当前的这个表,需要使用 `group_concat_state`
141141

@@ -164,7 +164,7 @@ select group_concat_merge(v2) from aggstate;
164164
如果不想要最终的聚合结果,而希望保留中间结果,可以使用 `union` 操作:
165165

166166
```sql
167-
insert into aggstate select 3,sum_union(k2),group_concat_union(k3) from aggstate;
167+
insert into aggstate select 3,sum(v1),group_concat_union(v2) from aggstate;
168168
```
169169

170170
此时表中计算如下:
@@ -174,16 +174,16 @@ insert into aggstate select 3,sum_union(k2),group_concat_union(k3) from aggstate
174174
查询结果如下:
175175

176176
```sql
177-
mysql> select sum_merge(k2) , group_concat_merge(k3)from aggstate;
177+
mysql> select sum(v1), group_concat_merge(v2) from aggstate;
178178
+---------------+------------------------+
179-
| sum_merge(k2) | group_concat_merge(k3) |
179+
| sum(v1) | group_concat_merge(v2) |
180180
+---------------+------------------------+
181181
| 20 | c,b,a,d,c,b,a,d |
182182
+---------------+------------------------+
183183

184-
mysql> select sum_merge(k2) , group_concat_merge(k3)from aggstate where k1 != 2;
184+
mysql> select sum(v1), group_concat_merge(v2) from aggstate where k1 != 2;
185185
+---------------+------------------------+
186-
| sum_merge(k2) | group_concat_merge(k3) |
186+
| sum(v1) | group_concat_merge(v2) |
187187
+---------------+------------------------+
188188
| 16 | c,b,a,d,c,b,a |
189189
+---------------+------------------------+

i18n/zh-CN/docusaurus-plugin-content-docs/current/table-design/data-model/unique.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ specific language governing permissions and limitations
2424
under the License.
2525
-->
2626

27-
2827
当需要更新数据时,可以选择主键模型(Unique Key Model)。该模型保证 Key 列的唯一性,插入或更新数据时,新数据会覆盖具有相同 Key 的旧数据,确保数据记录为最新。与其他数据模型相比,主键模型适用于数据的更新场景,在插入过程中进行主键级别的更新覆盖。
2928

3029
主键模型有以下特点:
@@ -49,7 +48,7 @@ under the License.
4948

5049
* **写时合并**(merge-on-write):自 1.2 版本起,Doris 默认使用写时合并模式,数据在写入时立即合并相同 Key 的记录,确保存储的始终是最新数据。写时合并兼顾查询和写入性能,避免多个版本的数据合并,并支持谓词下推到存储层。大多数场景推荐使用此模式;
5150

52-
* **读时合并**(merge-on-read):在 1.2 版本前,Doris 中的主键模型默认使用读时合并模式,数据在写入时并不进行合并,以增量的方式被追加存储,在 Doris 内保留多个版本。查询或 Compaction 时,会对数据进行相同 Key 的版本合并。读时合并适合写多读少的场景,在查询是需要进行多个版本合并,谓词无法下推,可能会影响到查询速度。
51+
* **读时合并**(merge-on-read):在 1.2 版本前,Doris 中的主键模型默认使用读时合并模式,数据在写入时并不进行合并,以增量的方式被追加存储,在 Doris 内保留多个版本。查询或 Compaction 时,会对数据进行相同 Key 的版本合并。读时合并适合写多读少的场景,在查询时需要进行多个版本合并,谓词无法下推,可能会影响到查询速度。
5352

5453
在 Doris 中基于主键模型更新有两种语义:
5554

i18n/zh-CN/docusaurus-plugin-content-docs/current/table-design/data-partitioning/dynamic-partitioning.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,13 @@ PROPERTIES(
8787
下例中通过 ALTER TABLE 语句,将非动态分区表修改为动态分区:
8888

8989
```sql
90-
CREATE TABLE test_dynamic_partition(
90+
CREATE TABLE test_partition(
9191
order_id BIGINT,
9292
create_dt DATE,
9393
username VARCHAR(20)
9494
)
9595
DUPLICATE KEY(order_id)
96+
PARTITION BY RANGE(create_dt) ()
9697
DISTRIBUTED BY HASH(order_id) BUCKETS 10;
9798

9899
ALTER TABLE test_partition SET (

0 commit comments

Comments
 (0)