Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
4e6caa34
T
TDengine
项目概览
taosdata
/
TDengine
大约 2 年 前同步成功
通知
1193
Star
22018
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
4e6caa34
编写于
4月 16, 2022
作者:
S
slzhou
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
before using ssdatablock for udfd/udfdc communication
上级
7ed76243
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
9 addition
and
3 deletion
+9
-3
source/libs/function/inc/tudf.h
source/libs/function/inc/tudf.h
+5
-0
source/libs/function/inc/tudfInt.h
source/libs/function/inc/tudfInt.h
+1
-0
source/libs/function/src/tudf.c
source/libs/function/src/tudf.c
+2
-3
source/libs/function/src/udfd.c
source/libs/function/src/udfd.c
+1
-0
未找到文件。
source/libs/function/inc/tudf.h
浏览文件 @
4e6caa34
...
@@ -125,6 +125,11 @@ int32_t teardownUdf(UdfHandle handle);
...
@@ -125,6 +125,11 @@ int32_t teardownUdf(UdfHandle handle);
typedef
int32_t
(
*
TUdfSetupFunc
)();
typedef
int32_t
(
*
TUdfSetupFunc
)();
typedef
int32_t
(
*
TUdfTeardownFunc
)();
typedef
int32_t
(
*
TUdfTeardownFunc
)();
//TODO: another way to manage memory is provide api for UDF to add data to SUdfColumnData and UDF framework will allocate memory.
// then UDF framework will free the memory
//typedef int32_t addFixedLengthColumnData(SColumnData *columnData, int rowIndex, bool isNull, int32_t colBytes, char* data);
//typedef int32_t addVariableLengthColumnData(SColumnData *columnData, int rowIndex, bool isNull, int32_t dataLen, char * data);
typedef
int32_t
(
*
TUdfFreeUdfColumnDataFunc
)(
SUdfColumnData
*
columnData
);
typedef
int32_t
(
*
TUdfFreeUdfColumnDataFunc
)(
SUdfColumnData
*
columnData
);
typedef
int32_t
(
*
TUdfScalarProcFunc
)(
SUdfDataBlock
block
,
SUdfColumnData
*
resultData
);
typedef
int32_t
(
*
TUdfScalarProcFunc
)(
SUdfDataBlock
block
,
SUdfColumnData
*
resultData
);
...
...
source/libs/function/inc/tudfInt.h
浏览文件 @
4e6caa34
...
@@ -51,6 +51,7 @@ typedef struct SUdfCallRequest {
...
@@ -51,6 +51,7 @@ typedef struct SUdfCallRequest {
SUdfDataBlock
block
;
SUdfDataBlock
block
;
SUdfInterBuf
interBuf
;
SUdfInterBuf
interBuf
;
SUdfInterBuf
interBuf2
;
bool
initFirst
;
bool
initFirst
;
}
SUdfCallRequest
;
}
SUdfCallRequest
;
...
...
source/libs/function/src/tudf.c
浏览文件 @
4e6caa34
...
@@ -372,7 +372,6 @@ int32_t serializeUdfInterBuf(SUdfInterBuf *state, char *pBuf) {
...
@@ -372,7 +372,6 @@ int32_t serializeUdfInterBuf(SUdfInterBuf *state, char *pBuf) {
*
(
int32_t
*
)
pBuf
=
state
->
bufLen
;
*
(
int32_t
*
)
pBuf
=
state
->
bufLen
;
pBuf
+=
sizeof
(
int32_t
);
pBuf
+=
sizeof
(
int32_t
);
memcpy
(
pBuf
,
state
->
buf
,
state
->
bufLen
);
memcpy
(
pBuf
,
state
->
buf
,
state
->
bufLen
);
pBuf
+=
state
->
bufLen
;
pBuf
+=
state
->
bufLen
;
...
@@ -463,6 +462,8 @@ int32_t serializeUdfCallRequest(SUdfCallRequest *call, char *buf) {
...
@@ -463,6 +462,8 @@ int32_t serializeUdfCallRequest(SUdfCallRequest *call, char *buf) {
buf
+=
l
;
buf
+=
l
;
l
=
serializeUdfInterBuf
(
&
call
->
interBuf
,
buf
);
l
=
serializeUdfInterBuf
(
&
call
->
interBuf
,
buf
);
buf
+=
l
;
buf
+=
l
;
l
=
serializeUdfInterBuf
(
&
call
->
interBuf2
,
buf
);
buf
+=
l
;
*
(
bool
*
)
buf
=
call
->
initFirst
;
*
(
bool
*
)
buf
=
call
->
initFirst
;
buf
+=
sizeof
(
bool
);
buf
+=
sizeof
(
bool
);
...
@@ -1253,8 +1254,6 @@ int32_t callUdf(UdfHandle handle, int8_t callType, SUdfDataBlock *input, SUdfInt
...
@@ -1253,8 +1254,6 @@ int32_t callUdf(UdfHandle handle, int8_t callType, SUdfDataBlock *input, SUdfInt
}
}
}
}
udfcRunUvTask
(
task
,
UV_TASK_REQ_RSP
);
udfcRunUvTask
(
task
,
UV_TASK_REQ_RSP
);
SUdfCallResponse
*
rsp
=
&
task
->
_call
.
rsp
;
SUdfCallResponse
*
rsp
=
&
task
->
_call
.
rsp
;
...
...
source/libs/function/src/udfd.c
浏览文件 @
4e6caa34
...
@@ -393,6 +393,7 @@ int32_t closeUdfdClientRpc(SUdfdContext *ctx) {
...
@@ -393,6 +393,7 @@ int32_t closeUdfdClientRpc(SUdfdContext *ctx) {
return
0
;
return
0
;
}
}
int
main
()
{
int
main
()
{
debugPrint
(
"libuv version: %x"
,
UV_VERSION_HEX
);
debugPrint
(
"libuv version: %x"
,
UV_VERSION_HEX
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录