diff --git a/src/query/src/qExecutor.c b/src/query/src/qExecutor.c index fdb7ae374b0c4f898c7365769b69a6403c617767..3af41395f336e9afb000932d1aae8d27975d9d4b 100644 --- a/src/query/src/qExecutor.c +++ b/src/query/src/qExecutor.c @@ -4265,6 +4265,7 @@ static void doCopyQueryResultToMsg(SQInfo *pQInfo, int32_t numOfRows, char *data } qDebug("QInfo:0x%"PRIx64" set %d subscribe info", pQInfo->qId, total); + // Check if query is completed or not for stable query or normal table query respectively. if (Q_STATUS_EQUAL(pRuntimeEnv->status, QUERY_COMPLETED) && pRuntimeEnv->proot->status == OP_EXEC_DONE) { setQueryStatus(pRuntimeEnv, QUERY_OVER); @@ -7079,10 +7080,6 @@ static SSDataBlock* doTagScan(void* param, bool* newgroup) { qDebug("QInfo:0x%"PRIx64" create tag values results completed, rows:%d", GET_QID(pRuntimeEnv), count); } - if (pOperator->status == OP_EXEC_DONE) { - setQueryStatus(pOperator->pRuntimeEnv, QUERY_COMPLETED); - } - pRes->info.rows = count; return (pRes->info.rows == 0)? NULL:pInfo->pRes; }