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