[TD-6046]<fix> fix ts derivative error

This commit is contained in:
wangmm0220 2021-08-17 01:02:53 +08:00
parent 43a6843dba
commit dff67958b1
1 changed files with 7 additions and 4 deletions

View File

@ -3662,10 +3662,13 @@ void copyTsColoum(SSDataBlock* pRes, SQLFunctionCtx* pCtx, int32_t numOfOutput)
if (tsNum < 2) return; if (tsNum < 2) return;
if (src == NULL) return; if (src == NULL) return;
for (int32_t col = 0; col < numOfOutput; ++col) { for (int32_t i = 0; i < numOfOutput; i++) {
SColumnInfoData* pColRes = taosArrayGet(pRes->pDataBlock, col); int32_t functionId = pCtx[i].functionId;
if(functionId == TSDB_FUNC_TS_DUMMY) {
SColumnInfoData* pColRes = taosArrayGet(pRes->pDataBlock, i);
memcpy(pColRes->pData, src, pColRes->info.bytes * pRes->info.rows); memcpy(pColRes->pData, src, pColRes->info.bytes * pRes->info.rows);
} }
}
} }
void initCtxOutputBuffer(SQLFunctionCtx* pCtx, int32_t size) { void initCtxOutputBuffer(SQLFunctionCtx* pCtx, int32_t size) {