fix: fill null value issue

This commit is contained in:
dapan1121 2022-12-22 14:59:41 +08:00
parent 6b8a603d27
commit dacb2cd533
1 changed files with 3 additions and 1 deletions

View File

@ -293,7 +293,9 @@ static int32_t fillResultImpl(SFillInfo* pFillInfo, SSDataBlock* pBlock, int32_t
int64_t ts = ((int64_t*)pTsCol->pData)[pFillInfo->index]; int64_t ts = ((int64_t*)pTsCol->pData)[pFillInfo->index];
// set the next value for interpolation // set the next value for interpolation
if ((pFillInfo->currentKey < ts && ascFill) || (pFillInfo->currentKey > ts && !ascFill)) { if (pFillInfo->currentKey < ts && ascFill) {
copyCurrentRowIntoBuf(pFillInfo, pFillInfo->index, &pFillInfo->prev);
} else if (pFillInfo->currentKey > ts && !ascFill) {
copyCurrentRowIntoBuf(pFillInfo, pFillInfo->index, &pFillInfo->next); copyCurrentRowIntoBuf(pFillInfo, pFillInfo->index, &pFillInfo->next);
} }