Merge pull request #3570 from taosdata/feature/td-1245
td-1245: fix failed case 'lastrow.sim'
This commit is contained in:
commit
93af6ba530
|
@ -373,8 +373,8 @@ void tscCreateLocalReducer(tExtMemBuffer **pMemBuffer, int32_t numOfBuffer, tOrd
|
||||||
if (pQueryInfo->fillType != TSDB_FILL_NONE) {
|
if (pQueryInfo->fillType != TSDB_FILL_NONE) {
|
||||||
SFillColInfo* pFillCol = createFillColInfo(pQueryInfo);
|
SFillColInfo* pFillCol = createFillColInfo(pQueryInfo);
|
||||||
pReducer->pFillInfo = taosInitFillInfo(pQueryInfo->order.order, revisedSTime, pQueryInfo->groupbyExpr.numOfGroupCols,
|
pReducer->pFillInfo = taosInitFillInfo(pQueryInfo->order.order, revisedSTime, pQueryInfo->groupbyExpr.numOfGroupCols,
|
||||||
4096, (int32_t)numOfCols, &pQueryInfo->interval, tinfo.precision,
|
4096, (int32_t)numOfCols, pQueryInfo->interval.sliding, pQueryInfo->interval.slidingUnit,
|
||||||
pQueryInfo->fillType, pFillCol);
|
tinfo.precision, pQueryInfo->fillType, pFillCol);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -66,7 +66,8 @@ typedef struct SPoint {
|
||||||
} SPoint;
|
} SPoint;
|
||||||
|
|
||||||
SFillInfo* taosInitFillInfo(int32_t order, TSKEY skey, int32_t numOfTags, int32_t capacity, int32_t numOfCols,
|
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);
|
void taosResetFillInfo(SFillInfo* pFillInfo, TSKEY startTimestamp);
|
||||||
|
|
||||||
|
|
|
@ -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);
|
getAlignQueryTimeWindow(pQuery, pQuery->window.skey, sk, ek, &w);
|
||||||
|
|
||||||
pRuntimeEnv->pFillInfo = taosInitFillInfo(pQuery->order.order, w.skey, 0, (int32_t)pQuery->rec.capacity, pQuery->numOfOutput,
|
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);
|
setQueryStatus(pQuery, QUERY_NOT_COMPLETED);
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
#define FILL_IS_ASC_FILL(_f) ((_f)->order == TSDB_ORDER_ASC)
|
#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,
|
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) {
|
if (fillType == TSDB_FILL_NONE) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -38,7 +38,11 @@ SFillInfo* taosInitFillInfo(int32_t order, TSKEY skey, int32_t numOfTags, int32_
|
||||||
pFillInfo->numOfTags = numOfTags;
|
pFillInfo->numOfTags = numOfTags;
|
||||||
pFillInfo->numOfCols = numOfCols;
|
pFillInfo->numOfCols = numOfCols;
|
||||||
pFillInfo->precision = precision;
|
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);
|
pFillInfo->pData = malloc(POINTER_BYTES * numOfCols);
|
||||||
if (numOfTags > 0) {
|
if (numOfTags > 0) {
|
||||||
|
|
Loading…
Reference in New Issue