提交 56cc2c06 编写于 作者: S slzhou

fix: udf aggregate function handle does not exist

上级 a58a0e79
...@@ -1500,6 +1500,9 @@ int32_t udfAggProcess(struct SqlFunctionCtx *pCtx) { ...@@ -1500,6 +1500,9 @@ int32_t udfAggProcess(struct SqlFunctionCtx *pCtx) {
SUdfAggRes* udfRes = (SUdfAggRes *)GET_ROWCELL_INTERBUF(GET_RES_INFO(pCtx)); SUdfAggRes* udfRes = (SUdfAggRes *)GET_ROWCELL_INTERBUF(GET_RES_INFO(pCtx));
SClientUdfUvSession *session = udfRes->session; SClientUdfUvSession *session = udfRes->session;
if (session == NULL) {
return TSDB_CODE_UDF_PIPE_NO_PIPE;
}
udfRes->finalResBuf = (char*)udfRes + sizeof(SUdfAggRes); udfRes->finalResBuf = (char*)udfRes + sizeof(SUdfAggRes);
udfRes->interResBuf = (char*)udfRes + sizeof(SUdfAggRes) + session->outputLen; udfRes->interResBuf = (char*)udfRes + sizeof(SUdfAggRes) + session->outputLen;
...@@ -1552,6 +1555,9 @@ int32_t udfAggProcess(struct SqlFunctionCtx *pCtx) { ...@@ -1552,6 +1555,9 @@ int32_t udfAggProcess(struct SqlFunctionCtx *pCtx) {
int32_t udfAggFinalize(struct SqlFunctionCtx *pCtx, SSDataBlock* pBlock) { int32_t udfAggFinalize(struct SqlFunctionCtx *pCtx, SSDataBlock* pBlock) {
SUdfAggRes* udfRes = (SUdfAggRes *)GET_ROWCELL_INTERBUF(GET_RES_INFO(pCtx)); SUdfAggRes* udfRes = (SUdfAggRes *)GET_ROWCELL_INTERBUF(GET_RES_INFO(pCtx));
SClientUdfUvSession *session = udfRes->session; SClientUdfUvSession *session = udfRes->session;
if (session == NULL) {
return TSDB_CODE_UDF_PIPE_NO_PIPE;
}
udfRes->finalResBuf = (char*)udfRes + sizeof(SUdfAggRes); udfRes->finalResBuf = (char*)udfRes + sizeof(SUdfAggRes);
udfRes->interResBuf = (char*)udfRes + sizeof(SUdfAggRes) + session->outputLen; udfRes->interResBuf = (char*)udfRes + sizeof(SUdfAggRes) + session->outputLen;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册