yiguolei commented on code in PR #2721:
URL: https://github.com/apache/doris-website/pull/2721#discussion_r2293409659


##########
i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/array-functions/array-avg.md:
##########
@@ -5,57 +5,157 @@
 }
 ---
 
+## array_avg
+
+<version since="2.0.0">
+
+</version>
+
 ## 描述
 
-返回数组中所有元素的平均值,数组中的`NULL`值会被跳过。空数组以及元素全为`NULL`值的数组,结果返回`NULL`值。
+计算数组中所有数值元素的平均值。函数会跳过数组中的 null 值和非数值元素,只对有效的数值元素进行平均值计算。
 
 ## 语法
+
 ```sql
-ARRAY_AVG(<arr>)
+array_avg(ARRAY<T> arr)
 ```
 
-## 参数
-| 参数 | 说明 |
-|---|---|
-| `<arr>` | 用于计算平均值的数组 |
+### 参数
+
+- `arr`:ARRAY<T> 类型,要计算平均值的数组。支持列名或常量值。
 
-## 返回值
-返回一个常量,特殊情况:
-- 数组中的`NULL`值会被跳过。
-- 数组的字符串会被跳过
+**T 支持的类型:**
+- 数值类型:TINYINT、SMALLINT、INT、BIGINT、LARGEINT、FLOAT、DOUBLE、DECIMAL
+- 字符串类型:CHAR、VARCHAR、STRING(会尝试转换为数值)

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