[td-1067] fix bugs in lastrow query.
This commit is contained in:
parent
a21bc56722
commit
c5cfeee493
|
@ -5262,7 +5262,7 @@ static void stableQueryImpl(SQInfo *pQInfo) {
|
|||
int64_t st = taosGetTimestampUs();
|
||||
|
||||
if (QUERY_IS_INTERVAL_QUERY(pQuery) ||
|
||||
(isFixedOutputQuery(pRuntimeEnv) && (!isPointInterpoQuery(pQuery)) && !pRuntimeEnv->groupbyNormalCol)) {
|
||||
(isFixedOutputQuery(pRuntimeEnv) && (!isPointInterpoQuery(pQuery)) && (!pRuntimeEnv->groupbyNormalCol))) {
|
||||
multiTableQueryProcess(pQInfo);
|
||||
} else {
|
||||
assert((pQuery->checkBuffer == 1 && pQuery->intervalTime == 0) || isPointInterpoQuery(pQuery) ||
|
||||
|
|
|
@ -301,6 +301,9 @@ TsdbQueryHandleT tsdbQueryLastRow(TSDB_REPO_T *tsdb, STsdbQueryCond *pCond, STab
|
|||
pCond->order = TSDB_ORDER_DESC;
|
||||
pCond->twindow = changeTableGroupByLastrow(groupList);
|
||||
|
||||
//descending order query, skey >= ekey
|
||||
SWAP(pCond->twindow.skey, pCond->twindow.ekey, TSKEY);
|
||||
|
||||
STsdbQueryHandle *pQueryHandle = (STsdbQueryHandle*) tsdbQueryTables(tsdb, pCond, groupList, qinfo);
|
||||
return pQueryHandle;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue