From 6c16d01214f05d9cb55cf2724fd3fe2536c6d48d Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Tue, 8 Mar 2022 20:02:46 +0800 Subject: [PATCH] fix error in windows --- src/query/src/qAggMain.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/query/src/qAggMain.c b/src/query/src/qAggMain.c index 4f221d6837..75f9ea3e89 100644 --- a/src/query/src/qAggMain.c +++ b/src/query/src/qAggMain.c @@ -5164,7 +5164,7 @@ static void copyRes(SQLFunctionCtx *pCtx, void *data, int32_t bytes) { char *tsOutput = pCtx->ptsOutputBuf; char *output = pCtx->pOutput; int32_t step = GET_FORWARD_DIRECTION_FACTOR(pCtx->param[3].i64); - char *tvp = data + (size * ((pCtx->param[3].i64 == TSDB_ORDER_ASC) ? 0 : len -1)); + char *tvp = (char*)data + (size * ((pCtx->param[3].i64 == TSDB_ORDER_ASC) ? 0 : len -1)); for (int32_t i = 0; i < len; ++i) { memcpy(tsOutput, tvp, sizeof(int64_t)); memcpy(output, tvp + sizeof(int64_t), bytes); @@ -5184,7 +5184,7 @@ static void copyRes(SQLFunctionCtx *pCtx, void *data, int32_t bytes) { pData[i] = pCtx->tagInfo.pTagCtxList[i]->pOutput; } - tvp = data + (size * ((pCtx->param[3].i64 == TSDB_ORDER_ASC) ? 0 : len -1)); + tvp = (char*)data + (size * ((pCtx->param[3].i64 == TSDB_ORDER_ASC) ? 0 : len -1)); for (int32_t i = 0; i < len; ++i) { int32_t offset = (int32_t)sizeof(int64_t) + bytes; for (int32_t j = 0; j < pCtx->tagInfo.numOfTagCols; ++j) { @@ -5596,7 +5596,7 @@ static void tail_func_finalizer(SQLFunctionCtx *pCtx) { } // if(pCtx->stableQuery){ - GET_RES_INFO(pCtx)->numOfRes = pRes->num - pCtx->param[1].i64; + GET_RES_INFO(pCtx)->numOfRes = pRes->num - (int32_t)pCtx->param[1].i64; // }else{ // GET_RES_INFO(pCtx)->numOfRes = pRes->num; // } @@ -5611,7 +5611,7 @@ static void tail_func_finalizer(SQLFunctionCtx *pCtx) { return; } for(int32_t i = 0; i < GET_RES_INFO(pCtx)->numOfRes; i++){ - memcpy(data + i * size, pRes->res[i], size); + memcpy((char*)data + i * size, pRes->res[i], size); } SortSupporter support = {0}; -- GitLab