before using ssdatablock for udfd/udfdc communication
This commit is contained in:
parent
7ed7624306
commit
4e6caa3495
|
@ -125,6 +125,11 @@ int32_t teardownUdf(UdfHandle handle);
|
|||
typedef int32_t (*TUdfSetupFunc)();
|
||||
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 (*TUdfScalarProcFunc)(SUdfDataBlock block, SUdfColumnData *resultData);
|
||||
|
|
|
@ -51,6 +51,7 @@ typedef struct SUdfCallRequest {
|
|||
|
||||
SUdfDataBlock block;
|
||||
SUdfInterBuf interBuf;
|
||||
SUdfInterBuf interBuf2;
|
||||
bool initFirst;
|
||||
} SUdfCallRequest;
|
||||
|
||||
|
|
|
@ -372,7 +372,6 @@ int32_t serializeUdfInterBuf(SUdfInterBuf *state, char *pBuf) {
|
|||
|
||||
*(int32_t*)pBuf = state->bufLen;
|
||||
pBuf += sizeof(int32_t);
|
||||
|
||||
memcpy(pBuf, state->buf, state->bufLen);
|
||||
pBuf += state->bufLen;
|
||||
|
||||
|
@ -463,6 +462,8 @@ int32_t serializeUdfCallRequest(SUdfCallRequest *call, char *buf) {
|
|||
buf += l;
|
||||
l = serializeUdfInterBuf(&call->interBuf, buf);
|
||||
buf += l;
|
||||
l = serializeUdfInterBuf(&call->interBuf2, buf);
|
||||
buf += l;
|
||||
|
||||
*(bool*)buf = call->initFirst;
|
||||
buf += sizeof(bool);
|
||||
|
@ -1253,8 +1254,6 @@ int32_t callUdf(UdfHandle handle, int8_t callType, SUdfDataBlock *input, SUdfInt
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
udfcRunUvTask(task, UV_TASK_REQ_RSP);
|
||||
|
||||
SUdfCallResponse *rsp = &task->_call.rsp;
|
||||
|
|
|
@ -393,6 +393,7 @@ int32_t closeUdfdClientRpc(SUdfdContext *ctx) {
|
|||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int main() {
|
||||
debugPrint("libuv version: %x", UV_VERSION_HEX);
|
||||
|
||||
|
|
Loading…
Reference in New Issue