fix comments
This commit is contained in:
parent
b589f9089c
commit
cb44efd329
|
@ -2960,7 +2960,16 @@ static SNode* nodesListFindNode(SNodeList* pList, SNode* pNode) {
|
|||
}
|
||||
|
||||
int32_t nodesListDeduplicate(SNodeList** ppList) {
|
||||
if (!ppList || LIST_LENGTH(*ppList) == 0) return TSDB_CODE_SUCCESS;
|
||||
if (!ppList || LIST_LENGTH(*ppList) <= 1) return TSDB_CODE_SUCCESS;
|
||||
if (LIST_LENGTH(*ppList) == 2) {
|
||||
SNode* pNode1 = nodesListGetNode(*ppList, 0);
|
||||
SNode* pNode2 = nodesListGetNode(*ppList, 1);
|
||||
if (nodesEqualNode(pNode1, pNode2)) {
|
||||
SListCell* pCell = nodesListGetCell(*ppList, 1);
|
||||
(void)nodesListErase(*ppList, pCell);
|
||||
}
|
||||
return TSDB_CODE_SUCCESS;
|
||||
}
|
||||
SNodeList* pTmp = NULL;
|
||||
int32_t code = nodesMakeList(&pTmp);
|
||||
if (TSDB_CODE_SUCCESS == code) {
|
||||
|
|
|
@ -326,7 +326,6 @@ static int32_t calcConstProjections(SCalcConstContext* pCxt, SSelectStmt* pSelec
|
|||
|
||||
static int32_t calcConstGroupBy(SCalcConstContext* pCxt, SSelectStmt* pSelect) {
|
||||
int32_t code = calcConstList(pSelect->pGroupByList);
|
||||
#if 0
|
||||
if (TSDB_CODE_SUCCESS == code) {
|
||||
SNode* pNode = NULL;
|
||||
FOREACH(pNode, pSelect->pGroupByList) {
|
||||
|
@ -337,9 +336,11 @@ static int32_t calcConstGroupBy(SCalcConstContext* pCxt, SSelectStmt* pSelect) {
|
|||
}
|
||||
}
|
||||
}
|
||||
NODES_DESTORY_LIST(pSelect->pGroupByList);
|
||||
FOREACH(pNode, pSelect->pGroupByList) {
|
||||
if (!cell->pPrev) continue;
|
||||
ERASE_NODE(pSelect->pGroupByList);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
return code;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue