fix: when the set operator statement is used for subquery, the outer layer filtering fails.
This commit is contained in:
parent
c1452851e3
commit
f30cb8e527
|
@ -1089,9 +1089,15 @@ static int32_t doCreateExchangePhysiNode(SPhysiPlanContext* pCxt, SExchangeLogic
|
|||
pExchange->srcStartGroupId = pExchangeLogicNode->srcStartGroupId;
|
||||
pExchange->srcEndGroupId = pExchangeLogicNode->srcEndGroupId;
|
||||
pExchange->seqRecvData = pExchangeLogicNode->seqRecvData;
|
||||
*pPhyNode = (SPhysiNode*)pExchange;
|
||||
|
||||
return TSDB_CODE_SUCCESS;
|
||||
int32_t code = setConditionsSlotId(pCxt, (const SLogicNode*)pExchangeLogicNode, (SPhysiNode*)pExchange);
|
||||
if (TSDB_CODE_SUCCESS == code) {
|
||||
*pPhyNode = (SPhysiNode*)pExchange;
|
||||
} else {
|
||||
nodesDestroyNode((SNode*)pExchange);
|
||||
}
|
||||
|
||||
return code;
|
||||
}
|
||||
|
||||
static int32_t createStreamScanPhysiNodeByExchange(SPhysiPlanContext* pCxt, SExchangeLogicNode* pExchangeLogicNode,
|
||||
|
@ -1119,6 +1125,9 @@ static int32_t createStreamScanPhysiNodeByExchange(SPhysiPlanContext* pCxt, SExc
|
|||
if (TSDB_CODE_SUCCESS == code) {
|
||||
code = addDataBlockSlots(pCxt, pScan->pScanCols, pScan->node.pOutputDataBlockDesc);
|
||||
}
|
||||
if (TSDB_CODE_SUCCESS == code) {
|
||||
code = setConditionsSlotId(pCxt, (const SLogicNode*)pExchangeLogicNode, (SPhysiNode*)pScan);
|
||||
}
|
||||
|
||||
if (TSDB_CODE_SUCCESS == code) {
|
||||
*pPhyNode = (SPhysiNode*)pScan;
|
||||
|
|
|
@ -1365,7 +1365,8 @@ static int32_t unAllSplCreateExchangeNode(SSplitContext* pCxt, int32_t startGrou
|
|||
pExchange->srcEndGroupId = pCxt->groupId - 1;
|
||||
pExchange->node.precision = pProject->node.precision;
|
||||
pExchange->node.pTargets = nodesCloneList(pProject->node.pTargets);
|
||||
if (NULL == pExchange->node.pTargets) {
|
||||
pExchange->node.pConditions = nodesCloneNode(pProject->node.pConditions);
|
||||
if (NULL == pExchange->node.pTargets || NULL == pExchange->node.pConditions) {
|
||||
return TSDB_CODE_OUT_OF_MEMORY;
|
||||
}
|
||||
TSWAP(pExchange->node.pLimit, pProject->node.pLimit);
|
||||
|
|
Loading…
Reference in New Issue