diff --git a/source/libs/planner/src/planOptimizer.c b/source/libs/planner/src/planOptimizer.c index b6c7c3b35966938b4b07f91ac89b5f4975f58409..59b7c417a060245900e683815d9e8c402affaf0a 100644 --- a/source/libs/planner/src/planOptimizer.c +++ b/source/libs/planner/src/planOptimizer.c @@ -2233,7 +2233,7 @@ static bool lastRowScanOptMayBeOptimized(SLogicNode* pNode) { SNode* pPar = nodesListGetNode(pAggFunc->pParameterList, 0); if (QUERY_NODE_COLUMN == nodeType(pPar)) { SColumnNode* pCol = (SColumnNode*)pPar; - if (pCol->colType == COLUMN_TYPE_TAG) { + if (pCol->colType != COLUMN_TYPE_COLUMN) { return false; } }