Skip to content

Commit da2550c

Browse files
💬Generate LLM translations (#1041)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 761938b commit da2550c

22 files changed

+84
-84
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"label": "Conversion Functions"
2+
"label": "转换函数"
33
}

docs/cn/sql-reference/20-sql-functions/02-conversion-functions/build-bitmap.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
title: BUILD_BITMAP
33
---
44

5-
Converts an array of positive integers to a BITMAP value.
5+
将一个正整数数组转换为 BITMAP 值。
66

7-
## Syntax
7+
## 语法
88

99
```sql
1010
BUILD_BITMAP( <expr> )
1111
```
1212

13-
## Examples
13+
## 示例
1414

1515
```sql
1616
SELECT BUILD_BITMAP([1,4,5])::String;

docs/cn/sql-reference/20-sql-functions/02-conversion-functions/cast.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@
22
title: "CAST, ::"
33
---
44

5-
Converts a value from one data type to another. `::` is an alias for CAST.
5+
将一个值从一种数据类型转换为另一种数据类型。`::` CAST 的别名。
66

7-
See also: [TRY_CAST](try-cast.md)
7+
另请参阅:[TRY_CAST](try-cast.md)
88

9-
## Syntax
9+
## 语法
1010

1111
```sql
1212
CAST( <expr> AS <data_type> )
1313

1414
<expr>::<data_type>
1515
```
1616

17-
## Examples
17+
## 示例
1818

1919
```sql
2020
SELECT CAST(1 AS VARCHAR), 1::VARCHAR;
Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
---
2-
title: 'Conversion Functions'
2+
title: '转换函数'
33
---
44

55
import IndexOverviewList from '@site/src/components/IndexOverviewList';
66

7-
This section provides reference information for the conversion functions in Databend.
7+
本节提供 Databend 中转换函数的参考信息。
88

99
<IndexOverviewList />
1010

11-
Please note the following when converting a value from one type to another:
11+
在将一个值从一种类型转换为另一种类型时,请注意以下事项:
1212

13-
- When converting from floating-point, decimal numbers, or strings to integers or decimal numbers with fractional parts, Databend rounds the values to the nearest integer. This is determined by the setting `numeric_cast_option` (defaults to 'rounding') which controls the behavior of numeric casting operations. When `numeric_cast_option` is explicitly set to 'truncating', Databend will truncate the decimal part, discarding any fractional values.
13+
- 当从浮点数、十进制数或字符串转换为整数或带有小数部分的十进制数时,Databend 会将值四舍五入为最接近的整数。这是由设置 `numeric_cast_option`(默认为 'rounding')控制的,该设置控制数值类型转换操作的行为。当 `numeric_cast_option` 被显式设置为 'truncating' 时,Databend 将截断小数部分,丢弃任何小数值。
1414

15-
```sql title='Example:'
15+
```sql title='示例:'
1616
SELECT CAST('0.6' AS DECIMAL(10, 0)), CAST(0.6 AS DECIMAL(10, 0)), CAST(1.5 AS INT);
1717

1818
┌──────────────────────────────────────────────────────────────────────────────────┐
@@ -32,16 +32,16 @@ Please note the following when converting a value from one type to another:
3232
└──────────────────────────────────────────────────────────────────────────────────┘
3333
```
3434

35-
The table below presents a summary of numeric casting operations, highlighting the casting possibilities between different source and target numeric data types. Please note that, it specifies the requirement for String to Integer casting, where the source string must contain an integer value.
35+
下表总结了数值类型转换操作,突出显示了不同源和目标数值数据类型之间的转换可能性。请注意,它指定了字符串到整数转换的要求,其中源字符串必须包含一个整数值。
3636

37-
| Source Type | Target Type |
37+
| 源类型 | 目标类型 |
3838
|----------------|-------------|
39-
| String | Decimal |
40-
| Float | Decimal |
41-
| Decimal | Decimal |
42-
| Float | Int |
43-
| Decimal | Int |
44-
| String (Int) | Int |
39+
| 字符串 | 十进制 |
40+
| 浮点数 | 十进制 |
41+
| 十进制 | 十进制 |
42+
| 浮点数 | 整数 |
43+
| 十进制 | 整数 |
44+
| 字符串(整数) | 整数 |
4545

4646

47-
- Databend also offers a variety of functions for converting expressions into different date and time formats. For more information, see [Date & Time Functions](../05-datetime-functions/index.md).
47+
- Databend 还提供了多种函数,用于将表达式转换为不同的日期和时间格式。更多信息,请参见 [日期与时间函数](../05-datetime-functions/index.md)

docs/cn/sql-reference/20-sql-functions/02-conversion-functions/to-bitmap.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,22 @@
22
title: TO_BITMAP
33
---
44

5-
Converts a value to BITMAP data type.
5+
将一个值转换为 BITMAP 数据类型。
66

7-
## Syntax
7+
## 语法
88

99
```sql
1010
TO_BITMAP( <expr> )
1111
```
1212

13-
## Examples
13+
## 示例
1414

1515
```sql
1616
SELECT TO_BITMAP('1101');
1717

1818
┌───────────────────┐
1919
│ to_bitmap('1101') │
2020
├───────────────────┤
21-
<bitmap binary>
21+
<bitmap 二进制>
2222
└───────────────────┘
2323
```

docs/cn/sql-reference/20-sql-functions/02-conversion-functions/to-boolean.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
title: TO_BOOLEAN
33
---
44

5-
Converts a value to BOOLEAN data type.
5+
将一个值转换为 BOOLEAN 数据类型。
66

7-
## Syntax
7+
## 语法
88

99
```sql
1010
TO_BOOLEAN( <expr> )
1111
```
1212

13-
## Examples
13+
## 示例
1414

1515
```sql
1616
SELECT TO_BOOLEAN('true');

docs/cn/sql-reference/20-sql-functions/02-conversion-functions/to-float32.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
title: TO_FLOAT32
33
---
44

5-
Converts a value to FLOAT32 data type.
5+
将一个值转换为 FLOAT32 数据类型。
66

7-
## Syntax
7+
## 语法
88

99
```sql
1010
TO_FLOAT32( <expr> )
1111
```
1212

13-
## Examples
13+
## 示例
1414

1515
```sql
1616
SELECT TO_FLOAT32('1.2');

docs/cn/sql-reference/20-sql-functions/02-conversion-functions/to-float64.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
title: TO_FLOAT64
33
---
44

5-
Converts a value to FLOAT64 data type.
5+
将一个值转换为 FLOAT64 数据类型。
66

7-
## Syntax
7+
## 语法
88

99
```sql
1010
TO_FLOAT64( <expr> )
1111
```
1212

13-
## Examples
13+
## 示例
1414

1515
```sql
1616
SELECT TO_FLOAT64('1.2');

docs/cn/sql-reference/20-sql-functions/02-conversion-functions/to-hex.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,21 @@
22
title: TO_HEX
33
---
44

5-
For a string argument str, TO_HEX() returns a hexadecimal string representation of str where each byte of each character in str is converted to two hexadecimal digits. The inverse of this operation is performed by the UNHEX() function.
5+
对于字符串参数 `str``TO_HEX()` 返回 `str` 的十六进制字符串表示形式,其中 `str` 中的每个字符的每个字节都被转换为两个十六进制数字。此操作的逆操作由 `UNHEX()` 函数执行。
66

7-
For a numeric argument N, TO_HEX() returns a hexadecimal string representation of the value of N treated as a longlong (BIGINT) number.
7+
对于数值参数 `N``TO_HEX()` 返回 `N` 的十六进制字符串表示形式,其中 `N` 被视为长长整型(BIGINT)数字。
88

9-
## Syntax
9+
## 语法
1010

1111
```sql
1212
TO_HEX(<expr>)
1313
```
1414

15-
## Aliases
15+
## 别名
1616

1717
- [HEX](../06-string-functions/hex.md)
1818

19-
## Examples
19+
## 示例
2020

2121
```sql
2222
SELECT HEX('abc'), TO_HEX('abc');
@@ -34,4 +34,4 @@ SELECT HEX(255), TO_HEX(255);
3434
├──────────┼─────────────┤
3535
│ ff │ ff │
3636
└────────────────────────┘
37-
```
37+
```

docs/cn/sql-reference/20-sql-functions/02-conversion-functions/to-int16.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
title: TO_INT16
33
---
44

5-
Converts a value to INT16 data type.
5+
将一个值转换为 INT16 数据类型。
66

7-
## Syntax
7+
## 语法
88

99
```sql
1010
TO_INT16( <expr> )
1111
```
1212

13-
## Examples
13+
## 示例
1414

1515
```sql
1616
SELECT TO_INT16('123');

0 commit comments

Comments
 (0)