Merge pull request #21283 from taosdata/szhou/fix-ts3400
fix: disable table count scan optimization when filters and group by both exist
This commit is contained in:
commit
35bfb81cca
|
@ -2594,7 +2594,9 @@ static bool tbCntScanOptIsEligibleConds(STbCntScanOptInfo* pInfo, SNode* pCondit
|
|||
if (NULL == pConditions) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (LIST_LENGTH(pInfo->pAgg->pGroupKeys) != 0) {
|
||||
return false;
|
||||
}
|
||||
if (QUERY_NODE_LOGIC_CONDITION == nodeType(pConditions)) {
|
||||
return tbCntScanOptIsEligibleLogicCond(pInfo, (SLogicConditionNode*)pConditions);
|
||||
}
|
||||
|
|
|
@ -103,7 +103,14 @@ endi
|
|||
if $data62 != 5 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
sql select count(table_name) from information_schema.ins_tables where db_name='db1' and stable_name='sta' group by stable_name
|
||||
print $rows , $data00
|
||||
if $rows != 1 then
|
||||
return -1
|
||||
endi
|
||||
if $data00 != 8 then
|
||||
return -1
|
||||
endi
|
||||
sql select distinct db_name from information_schema.ins_tables;
|
||||
print $rows
|
||||
if $rows != 4 then
|
||||
|
|
Loading…
Reference in New Issue