Skip to content

Commit 49fe0aa

Browse files
github-actions[bot]soyeric128
authored andcommitted
💬Generate LLM translations
1 parent 08d0a86 commit 49fe0aa

File tree

3 files changed

+78
-4
lines changed

3 files changed

+78
-4
lines changed

docs/cn/sql-reference/10-sql-commands/00-ddl/04-stream/create-stream.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ CREATE [ OR REPLACE ] STREAM [ IF NOT EXISTS ] [ <database_name>. ]<stream_name>
2424

2525
| 参数 | 描述 |
2626
|---------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
27-
| `< database_name >` | 流被视为属于特定数据库的对象,类似于表或视图。CREATE STREAM 允许流和关联表之间使用不同的数据库。如果没有明确指定数据库,则当前数据库将作为您创建的流的数据库。 |
28-
| AT | 当使用 `AT` 后跟 `TIMESTAMP =>``SNAPSHOT =>` 时,您可以通过时间戳或快照 ID 创建一个包含特定历史点之后数据变化的流;当 `AT` 后跟 `STREAM =>` 时,它允许创建一个与现有流相同的新流,保留相同的数据变化。 |
29-
| APPEND_ONLY | 当设置为 `true` 时,流以 `Append-Only` 模式运行;当设置为 `false` 时,它以 `Standard` 模式运行。默认为 `false`。有关流操作模式的更多详细信息,请参阅 [How Stream Works](/guides/load-data/continuous-data-pipelines/stream#how-stream-works)|
27+
| `< database_name >` | 流被视为属于特定数据库的对象,类似于表或视图。CREATE STREAM 允许流和关联表之间使用不同的数据库。如果未明确指定数据库,则当前数据库将作为您创建的流的数据库。 |
28+
| AT | 当使用 `AT` 后跟 `TIMESTAMP =>``SNAPSHOT =>` 时,您可以通过时间戳或快照 ID 创建一个包含特定历史时间点之后数据变化的流;当 `AT` 后跟 `STREAM =>` 时,它允许创建一个与现有流相同的新流,保留相同的数据变化。 |
29+
| APPEND_ONLY | 当设置为 `true` 时,流以 `Append-Only` 模式运行;当设置为 `false` 时,它以 `Standard` 模式运行。默认为 `true`。有关流操作模式的更多详细信息,请参阅 [流的工作原理](/guides/load-data/continuous-data-pipelines/stream#how-stream-works)|
3030

3131
## 示例
3232

docs/cn/sql-reference/20-sql-functions/06-string-functions/index.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: 字符串函数
33
---
44

5-
本节提供 Databend 中与字符串相关的函数的参考信息。
5+
本节提供了 Databend 中与字符串相关的函数的参考信息。
66

77
## 字符串操作:
88
- [CONCAT](concat.md)
@@ -39,6 +39,7 @@ title: 字符串函数
3939
- [ORD](ord.md)
4040
- [POSITION](position.md)
4141
- [STRCMP](strcmp.md)
42+
- [JARO_WINKLER](jaro-winkler.md)
4243

4344
## 大小写转换:
4445
- [LCASE](lcase.md)
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
---
2+
title: JARO_WINKLER
3+
---
4+
5+
import FunctionDescription from '@site/src/components/FunctionDescription';
6+
7+
<FunctionDescription description="引入或更新: v1.2.675"/>
8+
9+
计算两个字符串之间的 [Jaro-Winkler 距离](https://en.wikipedia.org/wiki/Jaro%E2%80%93Winkler_distance)。它通常用于衡量字符串之间的相似性,取值范围从 0.0(完全不相似)到 1.0(完全相同)。
10+
11+
## 语法
12+
13+
```sql
14+
JARO_WINKLER(<string1>, <string2>)
15+
```
16+
17+
## 返回类型
18+
19+
JARO_WINKLER 函数返回一个 FLOAT64 值,表示两个输入字符串之间的相似性。返回值遵循以下规则:
20+
21+
- 相似性范围:结果范围从 0.0(完全不相似)到 1.0(完全相同)。
22+
23+
```sql title='示例:'
24+
SELECT JARO_WINKLER('databend', 'Databend') AS similarity;
25+
26+
┌────────────────────┐
27+
│ similarity │
28+
├────────────────────┤
29+
0.9166666666666666
30+
└────────────────────┘
31+
32+
SELECT JARO_WINKLER('databend', 'database') AS similarity;
33+
34+
┌────────────┐
35+
│ similarity │
36+
├────────────┤
37+
0.9
38+
└────────────┘
39+
```
40+
- NULL 处理:如果 string1 或 string2 为 NULL,结果为 NULL
41+
42+
```sql title='示例:'
43+
SELECT JARO_WINKLER('databend', NULL) AS similarity;
44+
45+
┌────────────┐
46+
│ similarity │
47+
├────────────┤
48+
│ NULL │
49+
└────────────┘
50+
```
51+
- 空字符串:
52+
- 比较两个空字符串返回 1.0
53+
54+
```sql title='示例:'
55+
SELECT JARO_WINKLER('', '') AS similarity;
56+
57+
┌────────────┐
58+
│ similarity │
59+
├────────────┤
60+
│ 1 │
61+
└────────────┘
62+
```
63+
- 比较一个空字符串与一个非空字符串返回 0.0
64+
65+
```sql title='示例:'
66+
SELECT JARO_WINKLER('databend', '') AS similarity;
67+
68+
┌────────────┐
69+
│ similarity │
70+
├────────────┤
71+
│ 0 │
72+
└────────────┘
73+
```

0 commit comments

Comments
 (0)