diff --git a/src/query/src/qAggMain.c b/src/query/src/qAggMain.c index 46d8f40d0a36b31294ea765e36ce17f892038483..f3eabb3d802456782a5e8a32856d36d07032670a 100644 --- a/src/query/src/qAggMain.c +++ b/src/query/src/qAggMain.c @@ -382,7 +382,7 @@ int32_t getResultDataInfo(int32_t dataType, int32_t dataBytes, int32_t functionI if (size > MAX_UNIQUE_RESULT_SIZE) { size = MAX_UNIQUE_RESULT_SIZE; } - *bytes = size; + *bytes = (int32_t)size; *interBytes = *bytes; return TSDB_CODE_SUCCESS; @@ -5143,7 +5143,7 @@ static void copyUniqueRes(SQLFunctionCtx *pCtx, int32_t bytes) { tvp = pRes->res + (size * ((pCtx->param[2].i64 == TSDB_ORDER_ASC) ? 0 : len -1)); for (int32_t i = 0; i < len; ++i) { - int16_t offset = sizeof(UniqueUnit) + bytes; + int32_t offset = (int32_t)sizeof(UniqueUnit) + bytes; for (int32_t j = 0; j < pCtx->tagInfo.numOfTagCols; ++j) { memcpy(pData[j], tvp + offset, (size_t)pCtx->tagInfo.pTagCtxList[j]->outputBytes); offset += pCtx->tagInfo.pTagCtxList[j]->outputBytes; @@ -5255,7 +5255,7 @@ typedef struct{ static int32_t uniqueCompareFn(const void *p1, const void *p2, const void *param) { UiqueSupporter *support = (UiqueSupporter *)param; - return support->comparFn(p1 + support->dataOffset, p2 + support->dataOffset); + return support->comparFn((const char*)p1 + support->dataOffset, (const char*)p2 + support->dataOffset); } static void unique_func_finalizer(SQLFunctionCtx *pCtx) { diff --git a/src/query/src/qExecutor.c b/src/query/src/qExecutor.c index 85b0b7c061f2c1bee2d50578f64d64c5fcbd4bfc..9b8dbdd65e3d85c4071a08f5be618a6c4b2c0774 100644 --- a/src/query/src/qExecutor.c +++ b/src/query/src/qExecutor.c @@ -362,7 +362,7 @@ SSDataBlock* createOutputBuf(SExprInfo* pExpr, int32_t numOfOutput, int32_t numO qError("size is too large, failed to allocate column buffer for output buffer"); tmp = 128*1024*1024; } - int32_t size = MAX(tmp, minSize); + int32_t size = (int32_t)MAX(tmp, minSize); idata.pData = calloc(1, size); // at least to hold a pointer on x64 platform if (idata.pData == NULL) { qError("failed to allocate column buffer for output buffer"); diff --git a/src/query/src/qUtil.c b/src/query/src/qUtil.c index be5abf8daefdacf6a5164e504d616eb550166c17..6af5de813fe957d0c504f74f462e63e5a2984afc 100644 --- a/src/query/src/qUtil.c +++ b/src/query/src/qUtil.c @@ -209,7 +209,7 @@ SResultRowPool* initResultRowPool(size_t size) { qError("ResultRow blockSize is too large:%" PRId64, tmp); tmp = 128*1024*1024; } - p->blockSize = tmp; + p->blockSize = (int32_t)tmp; p->position.pos = 0; p->pData = taosArrayInit(8, POINTER_BYTES);