fix nodes ret check

This commit is contained in:
wangjiaming0909 2024-07-22 13:38:04 +08:00
parent 9b3409c13e
commit aa791c1bb0
4 changed files with 12 additions and 12 deletions

View File

@ -1083,5 +1083,6 @@ int32_t nodesCloneList(const SNodeList* pList, SNodeList** ppList) {
return code; return code;
} }
} }
*ppList = pDst;
return TSDB_CODE_SUCCESS; return TSDB_CODE_SUCCESS;
} }

View File

@ -8368,6 +8368,7 @@ static int32_t createRollupFuncs(SCreateTableStmt* pStmt, SNodeList** ppList) {
} }
} }
} }
*ppList = pFuncs;
return code;; return code;;
} }
@ -12760,14 +12761,14 @@ static int32_t rewriteShowTags(STranslateContext* pCxt, SQuery* pQuery) {
return code; return code;
} }
static int32_t createTagsFunction(SNode** ppNode) { static int32_t createTagsFunction(SFunctionNode** ppNode) {
SFunctionNode* pFunc = NULL; SFunctionNode* pFunc = NULL;
int32_t code = nodesMakeNode(QUERY_NODE_FUNCTION, (SNode**)&pFunc); int32_t code = nodesMakeNode(QUERY_NODE_FUNCTION, (SNode**)&pFunc);
if (NULL == pFunc) { if (NULL == pFunc) {
return code; return code;
} }
strcpy(pFunc->functionName, "_tags"); strcpy(pFunc->functionName, "_tags");
*ppNode = (SNode*)pFunc; *ppNode = pFunc;
return code; return code;
} }
@ -12781,11 +12782,12 @@ static int32_t createShowTableTagsProjections(SNodeList** pProjections, SNodeLis
if (TSDB_CODE_SUCCESS == code) { if (TSDB_CODE_SUCCESS == code) {
code = nodesListMakeStrictAppend(pProjections, (SNode*)pTbNameFunc); code = nodesListMakeStrictAppend(pProjections, (SNode*)pTbNameFunc);
} }
SFunctionNode* pTagsFunc = NULL;
if (TSDB_CODE_SUCCESS == code) { if (TSDB_CODE_SUCCESS == code) {
code = createTbnameFunction(&pTbNameFunc); code = createTagsFunction(&pTagsFunc);
} }
if (TSDB_CODE_SUCCESS == code) { if (TSDB_CODE_SUCCESS == code) {
code = nodesListStrictAppend(*pProjections, (SNode*)pTbNameFunc); code = nodesListStrictAppend(*pProjections, (SNode*)pTagsFunc);
} }
return code; return code;
} }

View File

@ -1013,7 +1013,7 @@ static int32_t createWindowLogicNodeByState(SLogicPlanContext* pCxt, SStateWindo
pCxt->pPlanCxt->streamQuery ? DATA_ORDER_LEVEL_GLOBAL : pWindow->node.requireDataOrder; pCxt->pPlanCxt->streamQuery ? DATA_ORDER_LEVEL_GLOBAL : pWindow->node.requireDataOrder;
pWindow->pStateExpr = NULL; pWindow->pStateExpr = NULL;
code = nodesCloneNode(pState->pExpr, &pWindow->pStateExpr); code = nodesCloneNode(pState->pExpr, &pWindow->pStateExpr);
if (TSDB_CODE_SUCCESS == code) { if (TSDB_CODE_SUCCESS != code) {
nodesDestroyNode((SNode*)pWindow); nodesDestroyNode((SNode*)pWindow);
return code; return code;
} }
@ -1231,13 +1231,13 @@ static int32_t partFillExprs(SSelectStmt* pSelect, SNodeList** pFillExprs, SNode
SNode* pExpr = ((SOrderByExprNode*)pOrderExpr)->pExpr; SNode* pExpr = ((SOrderByExprNode*)pOrderExpr)->pExpr;
if (needFillValue(pExpr)) { if (needFillValue(pExpr)) {
SNode* pNew = NULL; SNode* pNew = NULL;
code = nodesCloneNode(pProject, &pExpr); code = nodesCloneNode(pExpr, &pNew);
if (TSDB_CODE_SUCCESS == code) { if (TSDB_CODE_SUCCESS == code) {
code = nodesListMakeStrictAppend(pFillExprs, pNew); code = nodesListMakeStrictAppend(pFillExprs, pNew);
} }
} else if (QUERY_NODE_VALUE != nodeType(pExpr)) { } else if (QUERY_NODE_VALUE != nodeType(pExpr)) {
SNode* pNew = NULL; SNode* pNew = NULL;
code = nodesCloneNode(pProject, &pExpr); code = nodesCloneNode(pExpr, &pNew);
if (TSDB_CODE_SUCCESS == code) { if (TSDB_CODE_SUCCESS == code) {
code = nodesListMakeStrictAppend(pNotFillExprs, pNew); code = nodesListMakeStrictAppend(pNotFillExprs, pNew);
} }
@ -1293,7 +1293,7 @@ static int32_t createFillLogicNode(SLogicPlanContext* pCxt, SSelectStmt* pSelect
pFill->pValues = NULL; pFill->pValues = NULL;
code = nodesCloneNode(pFillNode->pValues, &pFill->pValues); code = nodesCloneNode(pFillNode->pValues, &pFill->pValues);
if (TSDB_CODE_SUCCESS == code) { if (TSDB_CODE_SUCCESS == code) {
code = nodesCloneNode(pFillNode->pWStartTs, &pFillNode->pWStartTs); code = nodesCloneNode(pFillNode->pWStartTs, &pFill->pWStartTs);
} }
if (TSDB_CODE_SUCCESS == code && 0 == LIST_LENGTH(pFill->node.pTargets)) { if (TSDB_CODE_SUCCESS == code && 0 == LIST_LENGTH(pFill->node.pTargets)) {

View File

@ -2404,10 +2404,7 @@ static int32_t createFillPhysiNode(SPhysiPlanContext* pCxt, SNodeList* pChildren
} }
if (TSDB_CODE_SUCCESS == code && NULL != pFillNode->pValues) { if (TSDB_CODE_SUCCESS == code && NULL != pFillNode->pValues) {
code = nodesCloneNode(pFillNode->pValues, &pFillNode->pValues); code = nodesCloneNode(pFillNode->pValues, &pFill->pValues);
if (NULL == pFill->pValues) {
code = code;
}
} }
if (TSDB_CODE_SUCCESS == code) { if (TSDB_CODE_SUCCESS == code) {