fix: set parent of new logic node to null
This commit is contained in:
parent
a215003146
commit
683cf87676
|
@ -107,6 +107,7 @@ int32_t createColumnByRewriteExpr(SNode* pExpr, SNodeList** pList) {
|
|||
int32_t replaceLogicNode(SLogicSubplan* pSubplan, SLogicNode* pOld, SLogicNode* pNew) {
|
||||
if (NULL == pOld->pParent) {
|
||||
pSubplan->pNode = (SLogicNode*)pNew;
|
||||
pNew->pParent = NULL;
|
||||
return TSDB_CODE_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
|
@ -57,4 +57,6 @@ TEST_F(PlanOptimizeTest, eliminateProjection) {
|
|||
useDb("root", "test");
|
||||
|
||||
run("SELECT c1, sum(c3) FROM t1 GROUP BY c1");
|
||||
run("SELECT c1 FROM t1");
|
||||
run("SELECT * FROM st1");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue