morrySnow commented on code in PR #1907:
URL: https://github.com/apache/doris-website/pull/1907#discussion_r1944058230


##########
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>)
 ```
-1. To generate array of int:
-The parameters are all positive integers. 
-start default value is 0, and step default value is 1.
-Return the array which numbers from start to end - 1 by step.
 
-2. To generate array of datetime:
-At least taking two parameters. 
-The first two parameters are all datetimev2, the third is positive integer.
-If the third part is missing, `INTERVAL 1 DAY` will be default value.
-UNIT supports YEAR/MONTH/WEEK/DAY/HOUR/MINUTE/SECOND.
-Return the array of datetimev2 between start_datetime and closest to 
end_datetime by interval_step UNIT.
+## Parameters
 
-### notice
+| Parameter | Description |
+|--|--|
+| `<start>` | The starting value is a positive integer, the default value is 0 
|
+| `<end>` | End value, a positive integer |
+| `<step>` | Step size, a positive integer, default is 1 |
+| `<start_datetime>` | Start date, datetimev2 type |
+| `<end_datetime>` | End date, datetimev2 type |
+| `<interval_step>` | Interval value, default is 1 |
+| `<UNIT>` | Interval unit, supports year/month/week/day/hour/minute/second, 
default is day |

Review Comment:
   需要跟随语法中的修改,一起修改
   ```suggestion
   | `<unit>` | Interval unit, supports year/month/week/day/hour/minute/second, 
default is day |
   ```



##########
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> [, ... ])
 ```
-mysql> select k1,k2,k3,array_union(k2,k3) from array_type_table;
-+------+-----------------+--------------+-------------------------+
-| k1   | k2              | k3           | array_union(`k2`, `k3`) |
-+------+-----------------+--------------+-------------------------+
-|    1 | [1, 2, 3]       | [2, 4, 5]    | [1, 2, 3, 4, 5]         |
-|    2 | [2, 3]          | [1, 5]       | [2, 3, 1, 5]            |
-|    3 | [1, 1, 1]       | [2, 2, 2]    | [1, 2]                  |
-+------+-----------------+--------------+-------------------------+
 
-mysql> select k1,k2,k3,array_union(k2,k3) from array_type_table_nullable;
-+------+-----------------+--------------+-------------------------+
-| k1   | k2              | k3           | array_union(`k2`, `k3`) |
-+------+-----------------+--------------+-------------------------+
-|    1 | [1, NULL, 3]    | [1, 3, 5]    | [1, NULL, 3, 5]         |
-|    2 | [NULL, NULL, 2] | [2, NULL, 4] | [NULL, 2, 4]            |
-|    3 | NULL            | [1, 2, 3]    | NULL                    |
-+------+-----------------+--------------+-------------------------+
+## Parameters
 
-mysql> select k1,k2,k3,array_union(k2,k3) from array_type_table_varchar;
-+------+----------------------------+----------------------------------+---------------------------------------------------+
-| k1   | k2                         | k3                               | 
array_union(`k2`, `k3`)                           |
-+------+----------------------------+----------------------------------+---------------------------------------------------+
-|    1 | ['hello', 'world', 'c++']  | ['I', 'am', 'c++']               | 
['hello', 'world', 'c++', 'I', 'am']              |
-|    2 | ['a1', 'equals', 'b1']     | ['a2', 'equals', 'b2']           | 
['a1', 'equals', 'b1', 'a2', 'b2']                |
-|    3 | ['hasnull', NULL, 'value'] | ['nohasnull', 'nonull', 'value'] | 
['hasnull', NULL, 'value', 'nohasnull', 'nonull'] |
-|    4 | ['hasnull', NULL, 'value'] | ['hasnull', NULL, 'value']       | 
['hasnull', NULL, 'value']                        |
-+------+----------------------------+----------------------------------+---------------------------------------------------+
+| Parameter | Description |
+|--|--|
+| `<array>` | The array to be merged |
 
-mysql> select k1,k2,k3,array_union(k2,k3) from array_type_table_decimal;
-+------+------------------+-------------------+----------------------------+
-| k1   | k2               | k3                | array_union(`k2`, `k3`)    |
-+------+------------------+-------------------+----------------------------+
-|    1 | [1.1, 2.1, 3.44] | [2.1, 3.4, 5.4]   | [1.1, 2.1, 3.44, 3.4, 5.4] |
-|    2 | [NULL, 2, 5]     | [NULL, NULL, 5.4] | [NULL, 2, 5, 5.4]          |
-|    4 | [1, NULL, 2, 5]  | [1, 3.1, 5.4]     | [1, NULL, 2, 5, 3.1, 5.4]  |
-+------+------------------+-------------------+----------------------------+
+## Return Value
 
-```
+Returns an array containing all elements in the union of array1 and array2, 
excluding duplicates. If the input parameter is NULL, it returns NULL.

Review Comment:
   ```suggestion
   Returns an array containing all elements in the union of all arrays, 
excluding duplicates. If the input parameter is NULL, it returns NULL.
   ```



##########
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 element

Review Comment:
   ```suggestion
   Generates an array containing n repeated elements
   ```



##########
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 element
 
-#### 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 element. array_repeat has 
the same function as array_with_constant and is used to be compatible with the 
hive syntax format.

Review Comment:
   ```suggestion
   Returns an array containing n repeated elements. array_repeat has the same 
function as array_with_constant and is used to be compatible with the hive 
syntax format.
   ```



##########
docs/sql-manual/sql-functions/scalar-functions/array-functions/array-repeat.md:
##########
@@ -23,3 +23,39 @@ KIND, either express or implied.  See the License for the
 specific language governing permissions and limitations
 under the License.
 -->
+
+
+## Description
+
+Generates an array containing n repeated elements T

Review Comment:
   如果 array_repeat 是 array_with_constant 的别名的话,把这俩合到一起吧。然后再 array_with_constant 
中加个别名章节,写上 array_repeat 就可以了
   ```
   ## Alias
   - ARRAY_REPEAT
   ```
   



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to