yiguolei commented on code in PR #2671:
URL: https://github.com/apache/doris-website/pull/2671#discussion_r2246696125
##########
i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/array-functions/array-compact.md:
##########
@@ -1,55 +1,193 @@
---
{
- "title": "ARRAY_COMPACY",
+ "title": "ARRAY_COMPACT",
"language": "zh-CN"
}
---
+## array_compact
+
+<version since="2.0.0">
+
+</version>
+
## 描述
-从数组中删除连续地重复元素,结果值的顺序由源数组中的顺序决定。
+去除数组中连续重复的元素,只保留每个不同值的第一个出现位置。该函数从左到右遍历数组,遇到与前一个元素相同的值时会跳过该元素,只保留第一个出现的值。
## 语法
+
```sql
-ARRAY_COMPACT(<arr>)
+array_compact(ARRAY<T> arr)
```
-## 参数
-| 参数 | 说明 |
-|---|---|
-| `<arr>` | 用于删除其中连续重复元素的数组 |
+### 参数
+
+- `arr`:ARRAY<T> 类型,要去重的数组。支持列名或常量值。
+
+**T 支持的类型:**
+- 数值类型:TINYINT、SMALLINT、INT、BIGINT、LARGEINT、FLOAT、DOUBLE、DECIMAL
+- 字符串类型:CHAR、VARCHAR、STRING
+- 日期时间类型:DATE、DATETIME、DATEV2、DATETIMEV2
+- 布尔类型:BOOLEAN
+- IP 类型:IPV4、IPV6
Review Comment:
我们不支持json 类型吗?
--
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]