diff --git a/source/libs/planner/src/planOptimizer.c b/source/libs/planner/src/planOptimizer.c index 284cda64ada418560a8e7bb7b7503756a14170dd..5a7bf0ddc2fca849a4d63ab92bd1777948f1c0a6 100644 --- a/source/libs/planner/src/planOptimizer.c +++ b/source/libs/planner/src/planOptimizer.c @@ -2198,7 +2198,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; } }