skip empty result optimization
This commit is contained in:
parent
2c0dd3db03
commit
a8efcfcce9
|
@ -4405,10 +4405,10 @@ static int32_t translateWhere(STranslateContext* pCxt, SSelectStmt* pSelect) {
|
|||
if (TSDB_CODE_SUCCESS == code) {
|
||||
code = getQueryTimeRange(pCxt, pSelect->pWhere, &pSelect->timeRange);
|
||||
}
|
||||
if (TSDB_CODE_SUCCESS == code && pSelect->timeRange.skey > pSelect->timeRange.ekey
|
||||
&& (pSelect->pGroupByList == NULL || pSelect->pGroupByList->length == 0)) {
|
||||
pSelect->isEmptyResult = true;
|
||||
}
|
||||
// skip optimization, because need result meta info.(tbname,colname and so on)
|
||||
// if (TSDB_CODE_SUCCESS == code && pSelect->timeRange.skey > pSelect->timeRange.ekey) {
|
||||
// pSelect->isEmptyResult = true;
|
||||
// }
|
||||
if (pSelect->pWhere != NULL) {
|
||||
setTableVgroupsFromEqualTbnameCond(pCxt, pSelect);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue