diff --git a/source/libs/planner/src/planSpliter.c b/source/libs/planner/src/planSpliter.c index 4a3d689f0431ba13e2110362e409c3379e82e7c1..fd77261818702defef8aa928e10a73cb66e28b20 100644 --- a/source/libs/planner/src/planSpliter.c +++ b/source/libs/planner/src/planSpliter.c @@ -1366,7 +1366,7 @@ static int32_t unAllSplCreateExchangeNode(SSplitContext* pCxt, int32_t startGrou pExchange->node.precision = pProject->node.precision; pExchange->node.pTargets = nodesCloneList(pProject->node.pTargets); pExchange->node.pConditions = nodesCloneNode(pProject->node.pConditions); - if (NULL == pExchange->node.pTargets || NULL == pExchange->node.pConditions) { + if (NULL == pExchange->node.pTargets || (NULL != pProject->node.pConditions && NULL == pExchange->node.pConditions)) { return TSDB_CODE_OUT_OF_MEMORY; } TSWAP(pExchange->node.pLimit, pProject->node.pLimit);