fix(query): fix interp + fill(prev) result error

This commit is contained in:
Ganlin Zhao 2022-08-06 14:42:48 +08:00
parent d5d873c7f8
commit 70f3967993
1 changed files with 4 additions and 0 deletions

View File

@ -2291,6 +2291,10 @@ static SSDataBlock* doTimeslice(SOperatorInfo* pOperator) {
break;
}
} else if (ts < pSliceInfo->current) {
//in case interpolation window starts and ends between two datapoints, fill(prev) need to interpolate
doKeepPrevRows(pSliceInfo, pBlock, i);
isPrevRowSet = true;
if (i < pBlock->info.rows - 1) {
int64_t nextTs = *(int64_t*)colDataGetData(pTsCol, i + 1);
if (nextTs > pSliceInfo->current) {