fix query bugs.

This commit is contained in:
hjxilinx 2020-02-10 03:28:11 +08:00
parent fbe202ce41
commit 79b0ff88fb
1 changed files with 2 additions and 1 deletions

View File

@ -7245,7 +7245,8 @@ static void doApplyIntervalQueryOnBlock_rv(SMeterQuerySupportObj *pSupporter, SM
// while the interval time window is less than the time range gap between two points, nextKey may be greater than
// pSupporter->rawEKey
if (pQuery->ekey == pSupporter->rawEKey || nextKey > pSupporter->rawEKey) {
if (pQuery->ekey == pSupporter->rawEKey || (nextKey > pSupporter->rawEKey && QUERY_IS_ASC_QUERY(pQuery)) ||
(nextKey < pSupporter->rawEKey && !QUERY_IS_ASC_QUERY(pQuery))) {
/* whole query completed, save result and abort */
saveResult(pSupporter, pMeterQueryInfo, pMeterQueryInfo->lastResRows);