fix: stream and columns in targets issue
This commit is contained in:
parent
f19f790131
commit
cbfc52427e
|
@ -407,7 +407,7 @@ static int32_t makeScanLogicNode(SLogicPlanContext* pCxt, SRealTableNode* pRealT
|
|||
static bool needScanDefaultCol(EScanType scanType) { return SCAN_TYPE_TABLE_COUNT != scanType; }
|
||||
|
||||
static int32_t updateScanNoPseudoRefAfterGrp(SSelectStmt* pSelect, SScanLogicNode* pScan, SRealTableNode* pRealTable) {
|
||||
if (NULL == pScan->pScanPseudoCols || pScan->pScanPseudoCols->length <= 0) {
|
||||
if (NULL == pScan->pScanPseudoCols || pScan->pScanPseudoCols->length <= 0 || NULL != pSelect->pTags) {
|
||||
return TSDB_CODE_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
|
@ -3307,6 +3307,16 @@ static int32_t partTagsOptRemovePseudoCols(SScanLogicNode* pScan) {
|
|||
return TSDB_CODE_SUCCESS;
|
||||
}
|
||||
|
||||
SNode* pNode = NULL, *pTarget = NULL;
|
||||
FOREACH(pNode, pScan->pScanPseudoCols) {
|
||||
FOREACH(pTarget, pScan->node.pTargets) {
|
||||
if (0 == strcmp(((SExprNode*)pNode)->aliasName, ((SColumnNode*)pTarget)->colName)) {
|
||||
ERASE_NODE(pScan->node.pTargets);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
nodesDestroyList(pScan->pScanPseudoCols);
|
||||
pScan->pScanPseudoCols = NULL;
|
||||
|
||||
|
|
Loading…
Reference in New Issue