From d163a16f3a1e02128250b1b2327bf7014a952030 Mon Sep 17 00:00:00 2001 From: Ganlin Zhao Date: Tue, 11 Apr 2023 15:46:32 +0800 Subject: [PATCH] fix: fix max/min(tag) random result --- source/libs/executor/src/scanoperator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/libs/executor/src/scanoperator.c b/source/libs/executor/src/scanoperator.c index 29990f2d06..ea834e90ca 100644 --- a/source/libs/executor/src/scanoperator.c +++ b/source/libs/executor/src/scanoperator.c @@ -484,7 +484,7 @@ int32_t addTagPseudoColumnData(SReadHandle* pHandle, const SExprInfo* pExpr, int int32_t code = 0; // backup the rows - int32_t backupRows = pBlock->info.rows; + int32_t backupRows = (rows == 1) ? rows : pBlock->info.rows; pBlock->info.rows = rows; bool freeReader = false; -- GitLab