Merge pull request #16306 from taosdata/fix/TD-18412
fix:fix explain analyze validate issue
This commit is contained in:
commit
0ac18e51cb
|
@ -100,7 +100,6 @@ extern "C" {
|
||||||
typedef struct SExplainGroup {
|
typedef struct SExplainGroup {
|
||||||
int32_t nodeNum;
|
int32_t nodeNum;
|
||||||
int32_t physiPlanExecNum;
|
int32_t physiPlanExecNum;
|
||||||
int32_t physiPlanNum;
|
|
||||||
int32_t physiPlanExecIdx;
|
int32_t physiPlanExecIdx;
|
||||||
SRWLatch lock;
|
SRWLatch lock;
|
||||||
SSubplan *plan;
|
SSubplan *plan;
|
||||||
|
|
|
@ -296,8 +296,6 @@ int32_t qExplainGenerateResNode(SPhysiNode *pNode, SExplainGroup *group, SExplai
|
||||||
|
|
||||||
QRY_ERR_JRET(qExplainGenerateResChildren(pNode, group, &resNode->pChildren));
|
QRY_ERR_JRET(qExplainGenerateResChildren(pNode, group, &resNode->pChildren));
|
||||||
|
|
||||||
++group->physiPlanNum;
|
|
||||||
|
|
||||||
*pResNode = resNode;
|
*pResNode = resNode;
|
||||||
|
|
||||||
return TSDB_CODE_SUCCESS;
|
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));
|
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));
|
QRY_ERR_JRET(qExplainResNodeToRows(node, ctx, level));
|
||||||
|
|
||||||
_return:
|
_return:
|
||||||
|
|
|
@ -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 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 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 * 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
|
#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;
|
#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;
|
||||||
|
|
Loading…
Reference in New Issue