From 4860491a76f2c093ee34506d6491d0a3b28b93c8 Mon Sep 17 00:00:00 2001 From: CosmosNi <40288034+CosmosNi@users.noreply.github.com> Date: Thu, 2 Jan 2025 18:16:20 +0800 Subject: [PATCH] [Doc][Transform-v2] Update doc for Array function (#8419) --- docs/en/transform-v2/sql-functions.md | 13 +++++-------- docs/zh/transform-v2/sql-functions.md | 13 +++++-------- 2 files changed, 10 insertions(+), 16 deletions(-) diff --git a/docs/en/transform-v2/sql-functions.md b/docs/en/transform-v2/sql-functions.md index a613b41356e..870471c866d 100644 --- a/docs/en/transform-v2/sql-functions.md +++ b/docs/en/transform-v2/sql-functions.md @@ -994,17 +994,14 @@ select UUID() as seatunnel_uuid ### ARRAY -Generate an array. +```ARRAY 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 diff --git a/docs/zh/transform-v2/sql-functions.md b/docs/zh/transform-v2/sql-functions.md index a5c616926fa..ae14cdf204e 100644 --- a/docs/zh/transform-v2/sql-functions.md +++ b/docs/zh/transform-v2/sql-functions.md @@ -987,17 +987,14 @@ select UUID() as seatunnel_uuid ### ARRAY -生成一个数组。 +```ARRAY 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几种类型