diff --git a/src/client/src/tscLocalMerge.c b/src/client/src/tscLocalMerge.c index c66c4f684c1ae4184238bcd1f081fbd37892bcf3..0440ef77ada747ff361e7481b4da0bc7784b8bc0 100644 --- a/src/client/src/tscLocalMerge.c +++ b/src/client/src/tscLocalMerge.c @@ -1251,7 +1251,7 @@ bool genFinalResults(SSqlObj *pSql, SLocalReducer *pLocalReducer, bool noMoreCur if (tscIsSecondStageQuery(pQueryInfo)) { char* pbuf = calloc(1,pResBuf->num * pModel->rowSize); - doArithmeticCalculate(pQueryInfo, pbuf, pResBuf->data, pResBuf->num); + doArithmeticCalculate(pQueryInfo, pbuf, pResBuf->data, (int32_t)pResBuf->num); memcpy(pResBuf->data, pbuf, pResBuf->num * pModel->rowSize); free(pbuf); } diff --git a/src/client/src/tscSQLParser.c b/src/client/src/tscSQLParser.c index f23a632b67ad6d209dd5f3339160db75f13070b8..b56603e557d849173e6223299c223d128bc109f2 100644 --- a/src/client/src/tscSQLParser.c +++ b/src/client/src/tscSQLParser.c @@ -1410,7 +1410,7 @@ static int32_t handleArithmeticExpr(SSqlCmd* pCmd, int32_t clauseIndex, int32_t // TODO: other error handling } END_TRY - pInfo->pArithExprInfo->base.arg[0].argBytes = tbufTell(&bw); + pInfo->pArithExprInfo->base.arg[0].argBytes = (int16_t) tbufTell(&bw); pInfo->pArithExprInfo->base.arg[0].argValue.pz = tbufGetData(&bw, true); pInfo->pArithExprInfo->base.arg[0].argType = TSDB_DATA_TYPE_BINARY; tbufCloseWriter(&bw); diff --git a/src/client/src/tscServer.c b/src/client/src/tscServer.c index 343eba6ddc8c6fc88110425bfb7f3e3afb5faddb..e8b6cb284ee40a3b2200e8d54913dca4ca158309 100644 --- a/src/client/src/tscServer.c +++ b/src/client/src/tscServer.c @@ -789,7 +789,7 @@ int tscBuildQueryMsg(SSqlObj *pSql, SSqlInfo *pInfo) { if(tscIsSecondStageQuery(pQueryInfo)) { size_t output = tscNumOfFields(pQueryInfo); - pQueryMsg->secondStageOutput = htonl(output); + pQueryMsg->secondStageOutput = htonl((int32_t) output); SSqlFuncMsg *pSqlFuncExpr1 = (SSqlFuncMsg *)pMsg;