diff --git a/source/libs/executor/src/scanoperator.c b/source/libs/executor/src/scanoperator.c index ea834e90caeb931119f38f36b5629aa0d1fa4fba..f0827886a02956385d6dbe2d64b00a1f5c59f4c0 100644 --- a/source/libs/executor/src/scanoperator.c +++ b/source/libs/executor/src/scanoperator.c @@ -484,8 +484,8 @@ int32_t addTagPseudoColumnData(SReadHandle* pHandle, const SExprInfo* pExpr, int int32_t code = 0; // backup the rows - int32_t backupRows = (rows == 1) ? rows : pBlock->info.rows; - pBlock->info.rows = rows; + int32_t backupRows = pBlock->info.rows; + pBlock->info.rows = (rows < pBlock->info.rows) ? pBlock->info.rows : rows; bool freeReader = false; STableCachedVal val = {0};