提交 4e6caa34 编写于 作者: S slzhou

before using ssdatablock for udfd/udfdc communication

上级 7ed76243
...@@ -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);
......
...@@ -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;
......
...@@ -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;
......
...@@ -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.
先完成此消息的编辑!
想要评论请 注册