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


##########
docs/sql-manual/sql-functions/scalar-functions/array-functions/array-map.md:
##########
@@ -49,9 +45,27 @@ array_map((x,y,z)->(abs(x)+y*z), array1, array2, array3);
 
 ### example
 
-```shell
-
-mysql [test]>select *, array_map(x->x,[1,2,3]) from array_test2 order by id;
+```sql
+CREATE TABLE array_test2 (
+    id INT,
+    c_array1 ARRAY<INT>,
+    c_array2 ARRAY<INT>
+    )
+duplicate key (id)
+distributed by hash(id) buckets 1
+properties(
+    'replication_num' = '1'
+    );
+INSERT INTO array_test2 (id, c_array1, c_array2) VALUES
+                                                     (1, [1, 2, 3, 4, 5], [10, 
20, -40, 80, -100]),
+                                                     (2, [6, 7, 8], [10, 12, 
13]),
+                                                     (3, [1], [-100]),
+                                                     (4, NULL, NULL);
+```
+```sql
+select *, array_map(x->x,[1,2,3]) from array_test2 order by id;
+```

Review Comment:
   如果这是一段示例,放到一个code block中



##########
docs/sql-manual/sql-functions/scalar-functions/array-functions/array-map.md:
##########
@@ -24,19 +24,15 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-## array_map
-
-array_map(lambda,array,....)
-
 ### description
 
-#### Syntax
-`ARRAY<T> array_map(lambda, ARRAY<T> array1, ARRAY<T> array2)`
-
 Use a lambda expression as the input parameter to calculate the corresponding 
expression for the internal data of other input ARRAY parameters.
-The number of parameters entered in the lambda expression is 1 or more, which 
must be consistent with the number of input array columns.
+The number of parameters entered the lambda expression is 1 or more, which 
must be consistent with the number of input array columns.
 The scalar functions can be executed in lambda, and aggregate functions are 
not supported.
 
+#### Syntax
+`ARRAY<T> array_map(lambda, ARRAY<T> array1, ARRAY<T> array2)`

Review Comment:
   ```suggestion
   ARRAY_MAP(<lambda>, <array1>)`
   ```



##########
docs/sql-manual/sql-functions/scalar-functions/array-functions/array-map.md:
##########
@@ -24,19 +24,15 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-## array_map
-
-array_map(lambda,array,....)
-
 ### description
 
-#### Syntax
-`ARRAY<T> array_map(lambda, ARRAY<T> array1, ARRAY<T> array2)`
-
 Use a lambda expression as the input parameter to calculate the corresponding 
expression for the internal data of other input ARRAY parameters.
-The number of parameters entered in the lambda expression is 1 or more, which 
must be consistent with the number of input array columns.
+The number of parameters entered the lambda expression is 1 or more, which 
must be consistent with the number of input array columns.
 The scalar functions can be executed in lambda, and aggregate functions are 
not supported.
 
+#### Syntax
+`ARRAY<T> array_map(lambda, ARRAY<T> array1, ARRAY<T> array2)`
+
 ```

Review Comment:
   删掉语法下面这一段示例



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