diff --git a/docs-cn/08-advance-feature/04-udf.md b/docs-cn/08-advance-feature/04-udf.md index c0c3eec4ad6b3b07e3170a0680daba0dab13ef9b..41088f97c1fe3ca4c83a2061e37566a5732bc3fb 100644 --- a/docs-cn/08-advance-feature/04-udf.md +++ b/docs-cn/08-advance-feature/04-udf.md @@ -173,7 +173,10 @@ SELECT X(c) FROM table/stable; ## 示例代码 -### [add_one.c](https://github.com/taosdata/TDengine/blob/develop/tests/script/sh/add_one.c) +### 标量函数示例 [add_one](https://github.com/taosdata/TDengine/blob/develop/tests/script/sh/add_one.c) + +
+add_one.c ```c #include @@ -209,7 +212,12 @@ void add_one(char* data, short itype, short ibytes, int numOfRows, long long* ts } ``` -### [abs_max.c](https://github.com/taosdata/TDengine/blob/develop/tests/script/sh/abs_max.c) +
+ +### 向量函数示例 [abs_max](https://github.com/taosdata/TDengine/blob/develop/tests/script/sh/abs_max.c) + +
+abs_max.c ```c #include @@ -309,7 +317,12 @@ void abs_max_destroy(SUdfInit* buf) { } ``` -### [demo.c](https://github.com/taosdata/TDengine/blob/develop/tests/script/sh/demo.c) +
+ +### 使用中间计算结果示例 [demo](https://github.com/taosdata/TDengine/blob/develop/tests/script/sh/demo.c) + +
+demo.c ```c #include @@ -424,3 +437,5 @@ void demo_destroy(SUdfInit* buf) { printf("demo destroy\n"); } ``` + +