diff --git a/source/libs/command/inc/commandInt.h b/source/libs/command/inc/commandInt.h index 53d118e1ad..706985f894 100644 --- a/source/libs/command/inc/commandInt.h +++ b/source/libs/command/inc/commandInt.h @@ -100,7 +100,6 @@ extern "C" { typedef struct SExplainGroup { int32_t nodeNum; int32_t physiPlanExecNum; - int32_t physiPlanNum; int32_t physiPlanExecIdx; SRWLatch lock; SSubplan *plan; diff --git a/source/libs/command/src/explain.c b/source/libs/command/src/explain.c index 9da9168555..afc09262de 100644 --- a/source/libs/command/src/explain.c +++ b/source/libs/command/src/explain.c @@ -296,8 +296,6 @@ int32_t qExplainGenerateResNode(SPhysiNode *pNode, SExplainGroup *group, SExplai QRY_ERR_JRET(qExplainGenerateResChildren(pNode, group, &resNode->pChildren)); - ++group->physiPlanNum; - *pResNode = resNode; return TSDB_CODE_SUCCESS; @@ -1548,12 +1546,6 @@ int32_t qExplainAppendGroupResRows(void *pCtx, int32_t groupId, int32_t level) { QRY_ERR_RET(qExplainGenerateResNode(group->plan->pNode, group, &node)); - if ((EXPLAIN_MODE_ANALYZE == ctx->mode) && (group->physiPlanNum != group->physiPlanExecNum)) { - qError("physiPlanNum %d mismatch with physiExecNum %d in group %d", group->physiPlanNum, group->physiPlanExecNum, - groupId); - QRY_ERR_JRET(TSDB_CODE_QRY_APP_ERROR); - } - QRY_ERR_JRET(qExplainResNodeToRows(node, ctx, level)); _return: diff --git a/tests/script/tsim/query/explain.sim b/tests/script/tsim/query/explain.sim index 40635dbfd3..30a857815c 100644 --- a/tests/script/tsim/query/explain.sim +++ b/tests/script/tsim/query/explain.sim @@ -74,6 +74,7 @@ sql explain analyze verbose true select ts from tb1 where f1 > 0; sql explain analyze verbose true select f1 from st1 where f1 > 0 and ts > '2020-10-31 00:00:00' and ts < '2021-10-31 00:00:00'; sql explain analyze verbose true select * from information_schema.ins_stables where db_name='db2'; sql explain analyze verbose true select * from (select min(f1),count(*) a from st1 where f1 > 0) where a < 0; +sql explain analyze verbose true select count(f1) from st1 group by tbname; #not pass case #sql explain verbose true select count(*),sum(f1) as aa from tb1 where (f1 > 0 or f1 < -1) and ts > '2020-10-31 00:00:00' and ts < '2021-10-31 00:00:00' order by aa;