fix issue
This commit is contained in:
parent
9a7ffe38ac
commit
235a082406
|
@ -128,9 +128,9 @@ SFillColInfo* createFillColInfo(SExprInfo* pExpr, int32_t numOfFillExpr, SExprIn
|
||||||
int32_t numOfNotFillCols, const struct SNodeListNode* val);
|
int32_t numOfNotFillCols, const struct SNodeListNode* val);
|
||||||
bool taosFillHasMoreResults(struct SFillInfo* pFillInfo);
|
bool taosFillHasMoreResults(struct SFillInfo* pFillInfo);
|
||||||
|
|
||||||
void taosCreateFillInfo(TSKEY skey, int32_t numOfFillCols, int32_t numOfNotFillCols, int32_t capacity,
|
int32_t taosCreateFillInfo(TSKEY skey, int32_t numOfFillCols, int32_t numOfNotFillCols, int32_t capacity,
|
||||||
SInterval* pInterval, int32_t fillType, struct SFillColInfo* pCol, int32_t slotId,
|
SInterval* pInterval, int32_t fillType, struct SFillColInfo* pCol, int32_t slotId,
|
||||||
int32_t order, const char* id, SExecTaskInfo* pTaskInfo, SFillInfo** ppFillInfo);
|
int32_t order, const char* id, SExecTaskInfo* pTaskInfo, SFillInfo** ppFillInfo);
|
||||||
|
|
||||||
void* taosDestroyFillInfo(struct SFillInfo* pFillInfo);
|
void* taosDestroyFillInfo(struct SFillInfo* pFillInfo);
|
||||||
int32_t taosFillResultDataBlock(struct SFillInfo* pFillInfo, SSDataBlock* p, int32_t capacity);
|
int32_t taosFillResultDataBlock(struct SFillInfo* pFillInfo, SSDataBlock* p, int32_t capacity);
|
||||||
|
|
|
@ -405,8 +405,12 @@ static int32_t initFillInfo(SFillOperatorInfo* pInfo, SExprInfo* pExpr, int32_t
|
||||||
// STimeWindow w = {0};
|
// STimeWindow w = {0};
|
||||||
// getInitialStartTimeWindow(pInterval, startKey, &w, order == TSDB_ORDER_ASC);
|
// getInitialStartTimeWindow(pInterval, startKey, &w, order == TSDB_ORDER_ASC);
|
||||||
pInfo->pFillInfo = NULL;
|
pInfo->pFillInfo = NULL;
|
||||||
taosCreateFillInfo(startKey, numOfCols, numOfNotFillCols, capacity, pInterval, fillType, pColInfo,
|
int32_t code = taosCreateFillInfo(startKey, numOfCols, numOfNotFillCols, capacity, pInterval, fillType, pColInfo,
|
||||||
pInfo->primaryTsCol, order, id, pTaskInfo, &pInfo->pFillInfo);
|
pInfo->primaryTsCol, order, id, pTaskInfo, &pInfo->pFillInfo);
|
||||||
|
if (code != TSDB_CODE_SUCCESS) {
|
||||||
|
qError("%s failed at line %d since %s", __func__, __LINE__, tstrerror(code));
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
if (order == TSDB_ORDER_ASC) {
|
if (order == TSDB_ORDER_ASC) {
|
||||||
pInfo->win.skey = win.skey;
|
pInfo->win.skey = win.skey;
|
||||||
|
|
|
@ -523,14 +523,14 @@ static int32_t taosNumOfRemainRows(SFillInfo* pFillInfo) {
|
||||||
return pFillInfo->numOfRows - pFillInfo->index;
|
return pFillInfo->numOfRows - pFillInfo->index;
|
||||||
}
|
}
|
||||||
|
|
||||||
void taosCreateFillInfo(TSKEY skey, int32_t numOfFillCols, int32_t numOfNotFillCols, int32_t capacity,
|
int32_t taosCreateFillInfo(TSKEY skey, int32_t numOfFillCols, int32_t numOfNotFillCols, int32_t capacity,
|
||||||
SInterval* pInterval, int32_t fillType, struct SFillColInfo* pCol, int32_t primaryTsSlotId,
|
SInterval* pInterval, int32_t fillType, struct SFillColInfo* pCol, int32_t primaryTsSlotId,
|
||||||
int32_t order, const char* id, SExecTaskInfo* pTaskInfo, SFillInfo** ppFillInfo) {
|
int32_t order, const char* id, SExecTaskInfo* pTaskInfo, SFillInfo** ppFillInfo) {
|
||||||
int32_t code = TSDB_CODE_SUCCESS;
|
int32_t code = TSDB_CODE_SUCCESS;
|
||||||
int32_t lino = 0;
|
int32_t lino = 0;
|
||||||
if (fillType == TSDB_FILL_NONE) {
|
if (fillType == TSDB_FILL_NONE) {
|
||||||
(*ppFillInfo) = NULL;
|
(*ppFillInfo) = NULL;
|
||||||
return;
|
return code;
|
||||||
}
|
}
|
||||||
|
|
||||||
SFillInfo* pFillInfo = taosMemoryCalloc(1, sizeof(SFillInfo));
|
SFillInfo* pFillInfo = taosMemoryCalloc(1, sizeof(SFillInfo));
|
||||||
|
@ -572,10 +572,9 @@ _end:
|
||||||
if (code != TSDB_CODE_SUCCESS) {
|
if (code != TSDB_CODE_SUCCESS) {
|
||||||
taosArrayDestroy(pFillInfo->next.pRowVal);
|
taosArrayDestroy(pFillInfo->next.pRowVal);
|
||||||
taosArrayDestroy(pFillInfo->prev.pRowVal);
|
taosArrayDestroy(pFillInfo->prev.pRowVal);
|
||||||
terrno = code;
|
|
||||||
T_LONG_JMP(pTaskInfo->env, code);
|
|
||||||
}
|
}
|
||||||
(*ppFillInfo) = pFillInfo;
|
(*ppFillInfo) = pFillInfo;
|
||||||
|
return code;
|
||||||
}
|
}
|
||||||
|
|
||||||
void taosResetFillInfo(SFillInfo* pFillInfo, TSKEY startTimestamp) {
|
void taosResetFillInfo(SFillInfo* pFillInfo, TSKEY startTimestamp) {
|
||||||
|
|
Loading…
Reference in New Issue