From 5f0f7945c9e48aa9ae1b765f4d03dc91e8ed6a32 Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Wed, 14 Jul 2021 23:48:13 +0800 Subject: [PATCH] merge develop --- src/client/src/tscSubquery.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/client/src/tscSubquery.c b/src/client/src/tscSubquery.c index 918bd1a658..a0d8bea96c 100644 --- a/src/client/src/tscSubquery.c +++ b/src/client/src/tscSubquery.c @@ -1454,6 +1454,7 @@ static void joinRetrieveFinalResCallback(void* param, TAOS_RES* tres, int numOfR } // update the records for each subquery in parent sql object. + bool stableQuery = tscIsTwoStageSTableQuery(pQueryInfo, 0); for (int32_t i = 0; i < pState->numOfSub; ++i) { if (pParentSql->pSubs[i] == NULL) { tscDebug("0x%"PRIx64" %p sub:%d not retrieve data", pParentSql->self, NULL, i); @@ -1469,7 +1470,7 @@ static void joinRetrieveFinalResCallback(void* param, TAOS_RES* tres, int numOfR pParentSql->pSubs[i]->self, i, pRes1->numOfRows, pRes1->numOfTotal); assert(pRes1->row < pRes1->numOfRows); } else { - if (!pQueryInfo->globalMerge) { + if (!stableQuery) { pRes1->numOfClauseTotal += pRes1->numOfRows; } @@ -2314,8 +2315,6 @@ int32_t tscHandleFirstRoundStableQuery(SSqlObj *pSql) { pNewQueryInfo->window = pQueryInfo->window; pNewQueryInfo->interval = pQueryInfo->interval; pNewQueryInfo->sessionWindow = pQueryInfo->sessionWindow; - pNewQueryInfo->globalMerge = pQueryInfo->globalMerge; - assert(pNewQueryInfo->globalMerge); pCmd->command = TSDB_SQL_SELECT; pNew->fp = tscFirstRoundCallback; -- GitLab