Skip to content

Commit

Permalink
[Doc][Transform-v2] Update doc for Array function (#8419)
Browse files Browse the repository at this point in the history
  • Loading branch information
CosmosNi authored Jan 2, 2025
1 parent 857aab5 commit 4860491
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 16 deletions.
13 changes: 5 additions & 8 deletions docs/en/transform-v2/sql-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -994,17 +994,14 @@ select UUID() as seatunnel_uuid

### ARRAY

Generate an array.
```ARRAY<T> array(T, ...)```
Create an array consisting of variadic elements and return it. Here, T can be either “column” or “literal”.

Example:

SELECT Array('c_1','c_2') as string_array,
Array(1.23,2.34) as double_array,
Array(1,2) as int_array,
Array(2147483648,2147483649) as long_array,
Array(1.23,2147483648) as double_array_1,
Array(1.23,2147483648,'c_1') as string_array_1
FROM fake
select ARRAY(1,2,3) as arrays
select ARRAY('c_1',2,3.12) as arrays
select ARRAY(column1,column2,column3) as arrays

notes: Currently only string, double, long, int types are supported

Expand Down
13 changes: 5 additions & 8 deletions docs/zh/transform-v2/sql-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -987,17 +987,14 @@ select UUID() as seatunnel_uuid

### ARRAY

生成一个数组。
```ARRAY<T> array(T, ...)```
创建一个由可变参数元素组成的数组并返回它。这里,T 可以是“列”或“常量”。。

示例:

SELECT Array('c_1','c_2') as string_array,
Array(1.23,2.34) as double_array,
Array(1,2) as int_array,
Array(2147483648,2147483649) as long_array,
Array(1.23,2147483648) as double_array_1,
Array(1.23,2147483648,'c_1') as string_array_1
FROM fake
select ARRAY(1,2,3) as arrays
select ARRAY('c_1',2,3.12) as arrays
select ARRAY(column1,column2,column3) as arrays

注意:目前仅支持string、double、long、int几种类型

Expand Down

0 comments on commit 4860491

Please sign in to comment.