morrySnow commented on code in PR #1881: URL: https://github.com/apache/doris-website/pull/1881#discussion_r1923226899
########## docs/sql-manual/sql-functions/scalar-functions/array-functions/array-count.md: ########## @@ -24,66 +24,86 @@ specific language governing permissions and limitations under the License. --> -## array_count +## Description -array_count +Use lambda expressions as input parameters to perform corresponding expression calculations on the internal data of other input ARRAY parameters. +Returns the number of elements such that the return value of `lambda(array1[i], ...)` is not 0. Returns 0 if no element is found that satisfies this condition. + +There are one or more parameters are input in the lambda expression, which must be consistent with the number of input array columns later.The number of elements of all input arrays must be the same. Legal scalar functions can be executed in lambda, aggregate functions, etc. are not supported. -### description +## Syntax ```sql -array_count(lambda, array1, ...) +ARRAY_COUNT(<arr>), +ARRAY_COUNT(<lambda>, <arr>[, ... ]) ``` +## Parameters -Use lambda expressions as input parameters to perform corresponding expression calculations on the internal data of other input ARRAY parameters. -Returns the number of elements such that the return value of `lambda(array1[i], ...)` is not 0. Returns 0 if no element is found that satisfies this condition. - -There are one or more parameters are input in the lambda expression, which must be consistent with the number of input array columns later.The number of elements of all input arrays must be the same. Legal scalar functions can be executed in lambda, aggregate functions, etc. are not supported. +| Parameter | Description | +| --- | --- | +| `lambda` | A lambda expression where the input parameters must match the number of columns in the given array. The expression can execute valid scalar functions but does not support aggregate functions. | Review Comment: ```suggestion | `<lambda>` | A lambda expression where the input parameters must match the number of columns in the given array. The expression can execute valid scalar functions but does not support aggregate functions. | ``` ########## docs/sql-manual/sql-functions/scalar-functions/array-functions/array-exists.md: ########## @@ -24,36 +24,38 @@ specific language governing permissions and limitations under the License. --> -## array_exists +## Description + +Use an optional lambda expression as an input parameter to perform corresponding expression calculations on the internal data of other input ARRAY parameters. Returns 1 when the calculation returns something other than 0; otherwise returns 0. +There are one or more parameters input in the lambda expression, which must be consistent with the number of input array columns later. Legal scalar functions can be executed in lambda, aggregate functions, etc. are not supported. +When lambda expression is not used as a parameter, array1 is used as the calculation result. -array_exists(lambda,array1,array2....) -array_exists(array1) -### description +## Syntax -#### Syntax ```sql -BOOLEAN array_exists(lambda, ARRAY<T> arr1, ARRAY<T> arr2, ... ) -BOOLEAN array_exists(ARRAY<T> arr) +ARRAY_EXISTS(<arr>) +ARRAY_EXISTS(<lambda>, <arr> [, ...] ) ``` -Use an optional lambda expression as an input parameter to perform corresponding expression calculations on the internal data of other input ARRAY parameters. Returns 1 when the calculation returns something other than 0; otherwise returns 0. -There are one or more parameters input in the lambda expression, which must be consistent with the number of input array columns later. Legal scalar functions can be executed in lambda, aggregate functions, etc. are not supported. -When lambda expression is not used as a parameter, array1 is used as the calculation result. +## Parameters -``` -array_exists(x->x, array1); -array_exists(x->(x%2 = 0), array1); -array_exists(x->(abs(x)-1), array1); -array_exists((x,y)->(x = y), array1, array2); -array_exists(array1); -``` +| Parameter | Description | +| --- | --- | +| `lambda` | A lambda expression where the input parameters must match the number of columns in the given array. The expression can execute valid scalar functions but does not support aggregate functions. | 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: 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