fix: avoid tag scan when scan cols is not empty

This commit is contained in:
slzhou@taodata.com 2022-07-12 09:24:57 +08:00
parent f26063202e
commit 5e50bf8dc8
1 changed files with 4 additions and 1 deletions

View File

@ -2090,7 +2090,10 @@ static bool tagScanMayBeOptimized(SLogicNode* pNode) {
if (QUERY_NODE_LOGIC_PLAN_SCAN != nodeType(pNode) || (SCAN_TYPE_TAG == ((SScanLogicNode*)pNode)->scanType)) {
return false;
}
SScanLogicNode *pScan = (SScanLogicNode*)pNode;
if (NULL != pScan->pScanCols) {
return false;
}
if (NULL == pNode->pParent || QUERY_NODE_LOGIC_PLAN_AGG != nodeType(pNode->pParent) || 1 != LIST_LENGTH(pNode->pParent->pChildren)) {
return false;
}