[TD-2895] refactor
This commit is contained in:
parent
36c9ba0c9b
commit
0070e7f143
|
@ -3980,7 +3980,7 @@ void copyToOutputBuf(SQInfo *pQInfo, SResultRowInfo *pResultInfo) {
|
||||||
SGroupResInfo *pGroupResInfo = &pQInfo->groupResInfo;
|
SGroupResInfo *pGroupResInfo = &pQInfo->groupResInfo;
|
||||||
|
|
||||||
assert(pQuery->rec.rows == 0 && pGroupResInfo->currentGroup <= pGroupResInfo->totalGroup);
|
assert(pQuery->rec.rows == 0 && pGroupResInfo->currentGroup <= pGroupResInfo->totalGroup);
|
||||||
if (pGroupResInfo->index >= taosArrayGetSize(pGroupResInfo->pRows)) {
|
if (!hasRemainData(pGroupResInfo)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4034,6 +4034,10 @@ bool hasNotReturnedResults(SQueryRuntimeEnv* pRuntimeEnv, SGroupResInfo* pGroupR
|
||||||
SQuery *pQuery = pRuntimeEnv->pQuery;
|
SQuery *pQuery = pRuntimeEnv->pQuery;
|
||||||
SFillInfo *pFillInfo = pRuntimeEnv->pFillInfo;
|
SFillInfo *pFillInfo = pRuntimeEnv->pFillInfo;
|
||||||
|
|
||||||
|
if (!Q_STATUS_EQUAL(pQuery->status, QUERY_COMPLETED)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (pQuery->limit.limit > 0 && pQuery->rec.total >= pQuery->limit.limit) {
|
if (pQuery->limit.limit > 0 && pQuery->rec.total >= pQuery->limit.limit) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -5682,7 +5686,7 @@ static void tableIntervalProcess(SQInfo *pQInfo, STableQueryInfo* pTableInfo) {
|
||||||
if (pQuery->fillType == TSDB_FILL_NONE || pRuntimeEnv->resultRowInfo.size == 0 || isPointInterpoQuery(pQuery)) {
|
if (pQuery->fillType == TSDB_FILL_NONE || pRuntimeEnv->resultRowInfo.size == 0 || isPointInterpoQuery(pQuery)) {
|
||||||
// all data scanned, the group by normal column can return
|
// all data scanned, the group by normal column can return
|
||||||
int32_t numOfClosed = numOfClosedResultRows(&pRuntimeEnv->resultRowInfo);
|
int32_t numOfClosed = numOfClosedResultRows(&pRuntimeEnv->resultRowInfo);
|
||||||
if (pQuery->limit.offset > numOfClosed) {
|
if (pQuery->limit.offset > numOfClosed || numOfClosed == 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -334,6 +334,9 @@ sql insert into tm0 values(10000, 1) (20000, 2)(30000, 3) (40000, NULL) (50000,
|
||||||
|
|
||||||
#=============================tbase-1205
|
#=============================tbase-1205
|
||||||
sql select count(*) from tm1 where ts<now and ts>= now -1d interval(1h) fill(NULL);
|
sql select count(*) from tm1 where ts<now and ts>= now -1d interval(1h) fill(NULL);
|
||||||
|
if $rows != 0 then
|
||||||
|
return -1
|
||||||
|
endi
|
||||||
|
|
||||||
print ===================>TD-1834
|
print ===================>TD-1834
|
||||||
sql select * from tm0 where ts>11000 and ts< 20000 order by ts asc
|
sql select * from tm0 where ts>11000 and ts< 20000 order by ts asc
|
||||||
|
|
Loading…
Reference in New Issue