diff --git a/src/client/src/tscLocalMerge.c b/src/client/src/tscLocalMerge.c index f9100163effa6ed008c75dd05085aec6d9da8d85..19abbe32e5ce67b626dd94c3db9574d6a3afe6e8 100644 --- a/src/client/src/tscLocalMerge.c +++ b/src/client/src/tscLocalMerge.c @@ -373,8 +373,8 @@ void tscCreateLocalReducer(tExtMemBuffer **pMemBuffer, int32_t numOfBuffer, tOrd if (pQueryInfo->fillType != TSDB_FILL_NONE) { SFillColInfo* pFillCol = createFillColInfo(pQueryInfo); pReducer->pFillInfo = taosInitFillInfo(pQueryInfo->order.order, revisedSTime, pQueryInfo->groupbyExpr.numOfGroupCols, - 4096, (int32_t)numOfCols, &pQueryInfo->interval, tinfo.precision, - pQueryInfo->fillType, pFillCol); + 4096, (int32_t)numOfCols, pQueryInfo->interval.sliding, pQueryInfo->interval.slidingUnit, + tinfo.precision, pQueryInfo->fillType, pFillCol); } } diff --git a/src/query/inc/qFill.h b/src/query/inc/qFill.h index c1a5a5be8eb7d5342ca23b10c6b45e76a71816cd..6d44fee09557fa8b8d73527677a2c7b238ecb42c 100644 --- a/src/query/inc/qFill.h +++ b/src/query/inc/qFill.h @@ -66,7 +66,8 @@ typedef struct SPoint { } SPoint; SFillInfo* taosInitFillInfo(int32_t order, TSKEY skey, int32_t numOfTags, int32_t capacity, int32_t numOfCols, - SInterval* pInterval, int8_t precision, int32_t fillType, SFillColInfo* pFillCol); + int64_t slidingTime, int8_t slidingUnit, int8_t precision, int32_t fillType, + SFillColInfo* pFillCol); void taosResetFillInfo(SFillInfo* pFillInfo, TSKEY startTimestamp); diff --git a/src/query/src/qExecutor.c b/src/query/src/qExecutor.c index ad9b5a9a84d4383e6eafec42401b2723f7c46618..d3f44cdcc715bb236fafaa4947a54771052df307 100644 --- a/src/query/src/qExecutor.c +++ b/src/query/src/qExecutor.c @@ -4581,7 +4581,8 @@ int32_t doInitQInfo(SQInfo *pQInfo, STSBuf *pTsBuf, void *tsdb, int32_t vgId, bo getAlignQueryTimeWindow(pQuery, pQuery->window.skey, sk, ek, &w); pRuntimeEnv->pFillInfo = taosInitFillInfo(pQuery->order.order, w.skey, 0, (int32_t)pQuery->rec.capacity, pQuery->numOfOutput, - &pQuery->interval, (int8_t)pQuery->precision, pQuery->fillType, pColInfo); + pQuery->interval.sliding, pQuery->interval.slidingUnit, (int8_t)pQuery->precision, + pQuery->fillType, pColInfo); } setQueryStatus(pQuery, QUERY_NOT_COMPLETED); diff --git a/src/query/src/qFill.c b/src/query/src/qFill.c index 24fb9caa511726c14952076bddd6f0b5b74c5932..f186726c0120f2e2e34580fec0da00c2083e5da9 100644 --- a/src/query/src/qFill.c +++ b/src/query/src/qFill.c @@ -23,7 +23,7 @@ #define FILL_IS_ASC_FILL(_f) ((_f)->order == TSDB_ORDER_ASC) SFillInfo* taosInitFillInfo(int32_t order, TSKEY skey, int32_t numOfTags, int32_t capacity, int32_t numOfCols, - SInterval* pInterval, int8_t precision, int32_t fillType, SFillColInfo* pFillCol) { + int64_t slidingTime, int8_t slidingUnit, int8_t precision, int32_t fillType, SFillColInfo* pFillCol) { if (fillType == TSDB_FILL_NONE) { return NULL; } @@ -38,7 +38,11 @@ SFillInfo* taosInitFillInfo(int32_t order, TSKEY skey, int32_t numOfTags, int32_ pFillInfo->numOfTags = numOfTags; pFillInfo->numOfCols = numOfCols; pFillInfo->precision = precision; - memcpy(&pFillInfo->interval, pInterval, sizeof(SInterval)); + + pFillInfo->interval.interval = slidingTime; + pFillInfo->interval.intervalUnit = slidingUnit; + pFillInfo->interval.sliding = slidingTime; + pFillInfo->interval.slidingUnit = slidingUnit; pFillInfo->pData = malloc(POINTER_BYTES * numOfCols); if (numOfTags > 0) {