提交 e7aebe26 编写于 作者: wmmhello's avatar wmmhello

Merge branch 'feature/TD-11208-new' into feature/TD-10987

...@@ -382,7 +382,7 @@ int32_t getResultDataInfo(int32_t dataType, int32_t dataBytes, int32_t functionI ...@@ -382,7 +382,7 @@ int32_t getResultDataInfo(int32_t dataType, int32_t dataBytes, int32_t functionI
if (size > MAX_UNIQUE_RESULT_SIZE) { if (size > MAX_UNIQUE_RESULT_SIZE) {
size = MAX_UNIQUE_RESULT_SIZE; size = MAX_UNIQUE_RESULT_SIZE;
} }
*bytes = size; *bytes = (int32_t)size;
*interBytes = *bytes; *interBytes = *bytes;
return TSDB_CODE_SUCCESS; return TSDB_CODE_SUCCESS;
...@@ -5143,7 +5143,7 @@ static void copyUniqueRes(SQLFunctionCtx *pCtx, int32_t bytes) { ...@@ -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)); tvp = pRes->res + (size * ((pCtx->param[2].i64 == TSDB_ORDER_ASC) ? 0 : len -1));
for (int32_t i = 0; i < len; ++i) { 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) { for (int32_t j = 0; j < pCtx->tagInfo.numOfTagCols; ++j) {
memcpy(pData[j], tvp + offset, (size_t)pCtx->tagInfo.pTagCtxList[j]->outputBytes); memcpy(pData[j], tvp + offset, (size_t)pCtx->tagInfo.pTagCtxList[j]->outputBytes);
offset += pCtx->tagInfo.pTagCtxList[j]->outputBytes; offset += pCtx->tagInfo.pTagCtxList[j]->outputBytes;
...@@ -5255,7 +5255,7 @@ typedef struct{ ...@@ -5255,7 +5255,7 @@ typedef struct{
static int32_t uniqueCompareFn(const void *p1, const void *p2, const void *param) { static int32_t uniqueCompareFn(const void *p1, const void *p2, const void *param) {
UiqueSupporter *support = (UiqueSupporter *)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) { static void unique_func_finalizer(SQLFunctionCtx *pCtx) {
......
...@@ -362,7 +362,7 @@ SSDataBlock* createOutputBuf(SExprInfo* pExpr, int32_t numOfOutput, int32_t numO ...@@ -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"); qError("size is too large, failed to allocate column buffer for output buffer");
tmp = 128*1024*1024; 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 idata.pData = calloc(1, size); // at least to hold a pointer on x64 platform
if (idata.pData == NULL) { if (idata.pData == NULL) {
qError("failed to allocate column buffer for output buffer"); qError("failed to allocate column buffer for output buffer");
......
...@@ -209,7 +209,7 @@ SResultRowPool* initResultRowPool(size_t size) { ...@@ -209,7 +209,7 @@ SResultRowPool* initResultRowPool(size_t size) {
qError("ResultRow blockSize is too large:%" PRId64, tmp); qError("ResultRow blockSize is too large:%" PRId64, tmp);
tmp = 128*1024*1024; tmp = 128*1024*1024;
} }
p->blockSize = tmp; p->blockSize = (int32_t)tmp;
p->position.pos = 0; p->position.pos = 0;
p->pData = taosArrayInit(8, POINTER_BYTES); p->pData = taosArrayInit(8, POINTER_BYTES);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册