提交 0070e7f1 编写于 作者: H Haojun Liao

[TD-2895] refactor

上级 36c9ba0c
......@@ -3980,7 +3980,7 @@ void copyToOutputBuf(SQInfo *pQInfo, SResultRowInfo *pResultInfo) {
SGroupResInfo *pGroupResInfo = &pQInfo->groupResInfo;
assert(pQuery->rec.rows == 0 && pGroupResInfo->currentGroup <= pGroupResInfo->totalGroup);
if (pGroupResInfo->index >= taosArrayGetSize(pGroupResInfo->pRows)) {
if (!hasRemainData(pGroupResInfo)) {
return;
}
......@@ -4034,6 +4034,10 @@ bool hasNotReturnedResults(SQueryRuntimeEnv* pRuntimeEnv, SGroupResInfo* pGroupR
SQuery *pQuery = pRuntimeEnv->pQuery;
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) {
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)) {
// all data scanned, the group by normal column can return
int32_t numOfClosed = numOfClosedResultRows(&pRuntimeEnv->resultRowInfo);
if (pQuery->limit.offset > numOfClosed) {
if (pQuery->limit.offset > numOfClosed || numOfClosed == 0) {
return;
}
......
......@@ -334,6 +334,9 @@ sql insert into tm0 values(10000, 1) (20000, 2)(30000, 3) (40000, NULL) (50000,
#=============================tbase-1205
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
sql select * from tm0 where ts>11000 and ts< 20000 order by ts asc
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册