yiguolei commented on code in PR #2671: URL: https://github.com/apache/doris-website/pull/2671#discussion_r2246691663
########## i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/array-functions/array-filter.md: ########## @@ -5,115 +5,252 @@ } --- +## array_filter + +<version since="2.0.0"> + +</version> + ## 描述 -使用 lambda 表达式作为输入参数,计算筛选另外的输入参数 ARRAY 列的数据。 -并过滤掉在结果中 0 和 NULL 的值。 +根据条件过滤数组元素,返回满足条件的元素组成的新数组。函数支持两种调用方式:使用 lambda 表达式的高阶函数形式,以及直接使用布尔数组的过滤形式。 ## 语法 ```sql -ARRAY_FILTER(<lambda>, <arr>) -ARRAY_FILTER(<arr>, <filter_column>) +array_filter(lambda, array1, ...) +array_filter(array1, array<boolean> filter_array) +``` + +### 参数 + +- `lambda`:lambda 表达式,用于对数组元素进行判断,返回 true/false 或可以转换为布尔值的表达式 +- `array1, ...`:一个或多个 ARRAY\<T> 类型参数 +- `filter_array`:ARRAY\<BOOLEAN> 类型,用于过滤的布尔数组 Review Comment: 这个filter array的长度,是不是必须得跟array1的长度一样?如果不一样会怎么办? -- 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]
