morrySnow commented on code in PR #1907: URL: https://github.com/apache/doris-website/pull/1907#discussion_r1942188458
########## docs/sql-manual/sql-functions/scalar-functions/array-functions/array-union.md: ########## @@ -24,61 +24,37 @@ specific language governing permissions and limitations under the License. --> -## array_union -array_union +## Description -### description +Merge multiple arrays without duplicate elements to generate a new array -#### Syntax - -`ARRAY<T> array_union(ARRAY<T> array1, ARRAY<T> array2)` - -Returns an array of the elements in the union of array1 and array2, without duplicates. If the input parameter is null, null is returned. - -### example +## Syntax +```sql +ARRAY_UNION(<array>[, <array> ]) Review Comment: ```suggestion ARRAY_UNION(<array>, <array> [, ... ]) ``` ########## docs/sql-manual/sql-functions/scalar-functions/array-functions/array-range.md: ########## @@ -24,76 +24,53 @@ specific language governing permissions and limitations under the License. --> -## array_range -array_range +## Description -### description +1. Generate int array +2. Generate date and time array -#### Syntax +## Aliases + +- SEQUENCE + +## Syntax ```sql -ARRAY<Int> array_range(Int end) -ARRAY<Int> array_range(Int start, Int end) -ARRAY<Int> array_range(Int start, Int end, Int step) -ARRAY<Datetime> array_range(Datetime start_datetime, Datetime end_datetime) -ARRAY<Datetime> array_range(Datetime start_datetime, Datetime end_datetime, INTERVAL Int interval_step UNIT) +ARRAY_RANGE(<end>) +ARRAY_RANGE(<start>, <end>) +ARRAY_RANGE(<start>, <end>, <step>) +ARRAY_RANGE(<start_datetime>, <end_datetime>) +ARRAY_RANGE(<start_datetime>, <end_datetime>, INTERVAL <interval_step> <UNIT>) Review Comment: ```suggestion ARRAY_RANGE(<start_datetime>, <end_datetime>, INTERVAL <interval_step> <unit>) ``` ########## docs/sql-manual/sql-functions/scalar-functions/array-functions/array-with-constant.md: ########## @@ -22,57 +22,38 @@ specific language governing permissions and limitations under the License. --> -## array_with_constant -array_with_constant +## Description -### description +Generates an array containing n repeated elements T -#### Syntax +## Syntax ```sql -ARRAY<T> array_with_constant(n, T) -ARRAY<T> array_repeat(T, n) +ARRAY_WITH_CONSTANT(<n>, <element>) ``` -get array of constants with n length, array_repeat has the same function as array_with_constant and is used to be compatible with the hive syntax format -### example +## Parameters -``` -mysql> select array_with_constant(2, "hello"), array_repeat("hello", 2); -+---------------------------------+--------------------------+ -| array_with_constant(2, 'hello') | array_repeat('hello', 2) | -+---------------------------------+--------------------------+ -| ['hello', 'hello'] | ['hello', 'hello'] | -+---------------------------------+--------------------------+ -1 row in set (0.04 sec) +| Parameter | Description | +|--|--| +| `<n>` | Number of digits | +| `<element>` | Specifying Elements | -mysql> select array_with_constant(3, 12345), array_repeat(12345, 3); -+-------------------------------+------------------------+ -| array_with_constant(3, 12345) | array_repeat(12345, 3) | -+-------------------------------+------------------------+ -| [12345, 12345, 12345] | [12345, 12345, 12345] | -+-------------------------------+------------------------+ -1 row in set (0.01 sec) +## Return Value -mysql> select array_with_constant(3, null), array_repeat(null, 3); -+------------------------------+-----------------------+ -| array_with_constant(3, NULL) | array_repeat(NULL, 3) | -+------------------------------+-----------------------+ -| [NULL, NULL, NULL] | [NULL, NULL, NULL] | -+------------------------------+-----------------------+ -1 row in set (0.01 sec) +Returns an array containing n repeated elements of T. array_repeat has the same function as array_with_constant and is used to be compatible with the hive syntax format. Review Comment: 同样的,T 需要被更新一下 ########## docs/sql-manual/sql-functions/scalar-functions/array-functions/array-with-constant.md: ########## @@ -22,57 +22,38 @@ specific language governing permissions and limitations under the License. --> -## array_with_constant -array_with_constant +## Description -### description +Generates an array containing n repeated elements T Review Comment: 语法中已经没有 T 了,描述需要根据新的语法更新一下 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org