fix: udfScalarProcFunc exception
This commit is contained in:
parent
d9043d6984
commit
a707a2921b
|
@ -691,7 +691,7 @@ void udfdProcessCallRequest(SUvUdfWork *uvUdf, SUdfRequest *request) {
|
|||
convertDataBlockToUdfDataBlock(&call->block, &input);
|
||||
code = udf->scriptPlugin->udfScalarProcFunc(&input, &output, udf->scriptUdfCtx);
|
||||
freeUdfDataDataBlock(&input);
|
||||
convertUdfColumnToDataBlock(&output, &response.callRsp.resultData);
|
||||
if(code == 0) convertUdfColumnToDataBlock(&output, &response.callRsp.resultData);
|
||||
freeUdfColumn(&output);
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -18,6 +18,7 @@ DLL_EXPORT int32_t udf2_start(SUdfInterBuf* buf) {
|
|||
}
|
||||
|
||||
DLL_EXPORT int32_t udf2(SUdfDataBlock* block, SUdfInterBuf* interBuf, SUdfInterBuf* newInterBuf) {
|
||||
if(newInterBuf->buf == NULL || newInterBuf->bufLen < (sizeof(double))) return TSDB_CODE_UDF_INVALID_BUFSIZE;
|
||||
double sumSquares = 0;
|
||||
if (interBuf->numOfResult == 1) {
|
||||
sumSquares = *(double*)interBuf->buf;
|
||||
|
|
Loading…
Reference in New Issue