Merge pull request #20724 from taosdata/fix/main_bugfix_wxy
fix: error in optimizing useless columns for multi-level set operators
This commit is contained in:
commit
a75da00071
|
@ -337,8 +337,14 @@ static SNodeList* getChildProjection(SNode* pStmt) {
|
|||
static void eraseSetOpChildProjection(SSetOperator* pSetOp, int32_t index) {
|
||||
SNodeList* pLeftProjs = getChildProjection(pSetOp->pLeft);
|
||||
nodesListErase(pLeftProjs, nodesListGetCell(pLeftProjs, index));
|
||||
if (QUERY_NODE_SET_OPERATOR == nodeType(pSetOp->pLeft)) {
|
||||
eraseSetOpChildProjection((SSetOperator*)pSetOp->pLeft, index);
|
||||
}
|
||||
SNodeList* pRightProjs = getChildProjection(pSetOp->pRight);
|
||||
nodesListErase(pRightProjs, nodesListGetCell(pRightProjs, index));
|
||||
if (QUERY_NODE_SET_OPERATOR == nodeType(pSetOp->pRight)) {
|
||||
eraseSetOpChildProjection((SSetOperator*)pSetOp->pRight, index);
|
||||
}
|
||||
}
|
||||
|
||||
typedef struct SNotRefByOrderByCxt {
|
||||
|
|
Loading…
Reference in New Issue