diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c index f254d87487..03fa65ee49 100644 --- a/source/libs/parser/src/parTranslater.c +++ b/source/libs/parser/src/parTranslater.c @@ -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); }