diff --git a/source/libs/executor/src/executorInt.c b/source/libs/executor/src/executorInt.c index 1b823bf69d..1e6647c01a 100644 --- a/source/libs/executor/src/executorInt.c +++ b/source/libs/executor/src/executorInt.c @@ -552,8 +552,10 @@ int32_t setResultRowInitCtx(SResultRow* pResult, SqlFunctionCtx* pCtx, int32_t n int32_t code = pCtx[i].fpSet.init(&pCtx[i], pResInfo); if (code != TSDB_CODE_SUCCESS && fmIsUserDefinedFunc(pCtx[i].functionId)) { pResInfo->initialized = false; + qError("failed to initialize udf, funcId:%d error:%s", pCtx[i].functionId, tstrerror(code)); return TSDB_CODE_UDF_FUNC_EXEC_FAILURE; } else if (code != TSDB_CODE_SUCCESS) { + qError("failed to initialize function context, funcId:%d error:%s", pCtx[i].functionId, tstrerror(code)); return code; } } else { diff --git a/source/libs/executor/src/timewindowoperator.c b/source/libs/executor/src/timewindowoperator.c index 667deee4c6..e4e1ef9eaa 100644 --- a/source/libs/executor/src/timewindowoperator.c +++ b/source/libs/executor/src/timewindowoperator.c @@ -81,6 +81,7 @@ static int32_t setTimeWindowOutputBuf(SResultRowInfo* pResultRowInfo, STimeWindo if (pResultRow == NULL || pTaskInfo->code != 0) { *pResult = NULL; + qError("failed to set result output buffer, error:%s", tstrerror(pTaskInfo->code)); return pTaskInfo->code; } @@ -1042,7 +1043,7 @@ static void doStateWindowAggImpl(SOperatorInfo* pOperator, SStateWindowOperatorI int32_t ret = setTimeWindowOutputBuf(&pInfo->binfo.resultRowInfo, &window, masterScan, &pResult, gid, pSup->pCtx, numOfOutput, pSup->rowEntryInfoOffset, &pInfo->aggSup, pTaskInfo); if (ret != TSDB_CODE_SUCCESS) { // null data, too many state code - T_LONG_JMP(pTaskInfo->env, TSDB_CODE_APP_ERROR); + T_LONG_JMP(pTaskInfo->env, ret); } updateTimeWindowInfo(&pInfo->twAggSup.timeWindowData, &window, 0); @@ -1070,7 +1071,7 @@ static void doStateWindowAggImpl(SOperatorInfo* pOperator, SStateWindowOperatorI int32_t ret = setTimeWindowOutputBuf(&pInfo->binfo.resultRowInfo, &pRowSup->win, masterScan, &pResult, gid, pSup->pCtx, numOfOutput, pSup->rowEntryInfoOffset, &pInfo->aggSup, pTaskInfo); if (ret != TSDB_CODE_SUCCESS) { // null data, too many state code - T_LONG_JMP(pTaskInfo->env, TSDB_CODE_APP_ERROR); + T_LONG_JMP(pTaskInfo->env, ret); } updateTimeWindowInfo(&pInfo->twAggSup.timeWindowData, &pRowSup->win, 0); @@ -1532,7 +1533,7 @@ static void doSessionWindowAggImpl(SOperatorInfo* pOperator, SSessionAggOperator setTimeWindowOutputBuf(&pInfo->binfo.resultRowInfo, &window, masterScan, &pResult, gid, pSup->pCtx, numOfOutput, pSup->rowEntryInfoOffset, &pInfo->aggSup, pTaskInfo); if (ret != TSDB_CODE_SUCCESS) { // null data, too many state code - T_LONG_JMP(pTaskInfo->env, TSDB_CODE_APP_ERROR); + T_LONG_JMP(pTaskInfo->env, ret); } // pInfo->numOfRows data belong to the current session window @@ -1555,7 +1556,7 @@ static void doSessionWindowAggImpl(SOperatorInfo* pOperator, SSessionAggOperator int32_t ret = setTimeWindowOutputBuf(&pInfo->binfo.resultRowInfo, &pRowSup->win, masterScan, &pResult, gid, pSup->pCtx, numOfOutput, pSup->rowEntryInfoOffset, &pInfo->aggSup, pTaskInfo); if (ret != TSDB_CODE_SUCCESS) { // null data, too many state code - T_LONG_JMP(pTaskInfo->env, TSDB_CODE_APP_ERROR); + T_LONG_JMP(pTaskInfo->env, ret); } updateTimeWindowInfo(&pInfo->twAggSup.timeWindowData, &pRowSup->win, 0);