compile in windows

This commit is contained in:
Shengliang Guan 2020-09-17 10:52:50 +08:00
parent 34c948aa9a
commit 46516d98a3
3 changed files with 5 additions and 5 deletions

View File

@ -334,7 +334,7 @@ typedef struct STscObj {
struct SSqlStream *streamList; struct SSqlStream *streamList;
void* pDnodeConn; void* pDnodeConn;
pthread_mutex_t mutex; pthread_mutex_t mutex;
T_REF_DECLARE(); T_REF_DECLARE()
} STscObj; } STscObj;
typedef struct SSqlObj { typedef struct SSqlObj {
@ -470,7 +470,7 @@ static FORCE_INLINE void tscGetResultColumnChr(SSqlRes* pRes, SFieldInfo* pField
int32_t type = pInfo->pSqlExpr->resType; int32_t type = pInfo->pSqlExpr->resType;
int32_t bytes = pInfo->pSqlExpr->resBytes; int32_t bytes = pInfo->pSqlExpr->resBytes;
char* pData = pRes->data + pInfo->pSqlExpr->offset * pRes->numOfRows + bytes * pRes->row; char* pData = pRes->data + (int32_t)(pInfo->pSqlExpr->offset * pRes->numOfRows + bytes * pRes->row);
// user defined constant value output columns // user defined constant value output columns
if (TSDB_COL_IS_UD_COL(pInfo->pSqlExpr->colInfo.flag)) { if (TSDB_COL_IS_UD_COL(pInfo->pSqlExpr->colInfo.flag)) {

View File

@ -2453,11 +2453,11 @@ static void percentile_function(SQLFunctionCtx *pCtx) {
if (pInfo->stage == 0) { if (pInfo->stage == 0) {
if (pCtx->preAggVals.isSet) { if (pCtx->preAggVals.isSet) {
if (pInfo->minval > pCtx->preAggVals.statis.min) { if (pInfo->minval > pCtx->preAggVals.statis.min) {
pInfo->minval = pCtx->preAggVals.statis.min; pInfo->minval = (double)pCtx->preAggVals.statis.min;
} }
if (pInfo->maxval < pCtx->preAggVals.statis.max) { if (pInfo->maxval < pCtx->preAggVals.statis.max) {
pInfo->maxval = pCtx->preAggVals.statis.max; pInfo->maxval = (double)pCtx->preAggVals.statis.max;
} }
pInfo->numOfElems += (pCtx->size - pCtx->preAggVals.statis.numOfNull); pInfo->numOfElems += (pCtx->size - pCtx->preAggVals.statis.numOfNull);

View File

@ -1950,7 +1950,7 @@ int32_t tscHandleMultivnodeInsert(SSqlObj *pSql) {
SSqlCmd *pCmd = &pSql->cmd; SSqlCmd *pCmd = &pSql->cmd;
SSqlRes *pRes = &pSql->res; SSqlRes *pRes = &pSql->res;
pSql->numOfSubs = taosArrayGetSize(pCmd->pDataBlocks); pSql->numOfSubs = (uint16_t)taosArrayGetSize(pCmd->pDataBlocks);
assert(pSql->numOfSubs > 0); assert(pSql->numOfSubs > 0);
pRes->code = TSDB_CODE_SUCCESS; pRes->code = TSDB_CODE_SUCCESS;