[td-225] fix compiler error.

This commit is contained in:
Haojun Liao 2021-06-07 15:28:57 +08:00
parent 76638283b1
commit e275dd32cd
2 changed files with 2 additions and 1 deletions

View File

@ -2161,7 +2161,7 @@ int32_t addExprAndResultField(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, int32_t col
case TSDB_FUNC_STDDEV:
case TSDB_FUNC_LEASTSQR: {
// 1. valid the number of parameters
int32_t numOfParams = (pItem->pNode->pParam == NULL)? 0: taosArrayGetSize(pItem->pNode->pParam);
int32_t numOfParams = (pItem->pNode->pParam == NULL)? 0: (int32_t) taosArrayGetSize(pItem->pNode->pParam);
if (pItem->pNode->pParam == NULL ||
(functionId != TSDB_FUNC_LEASTSQR && functionId != TSDB_FUNC_DERIVATIVE && numOfParams != 1) ||
((functionId == TSDB_FUNC_LEASTSQR || functionId == TSDB_FUNC_DERIVATIVE) && numOfParams != 3)) {

View File

@ -3764,6 +3764,7 @@ static void diff_function(SQLFunctionCtx *pCtx) {
}
break;
}
case TSDB_DATA_TYPE_TINYINT: {
int8_t *pData = (int8_t *)data;
int8_t *pOutput = (int8_t *)pCtx->pOutput;