[td-3009] <fix>: diff can not be applied to unsigned numeric data type.

This commit is contained in:
Haojun Liao 2021-02-25 17:39:46 +08:00
parent cfcec60f67
commit 6376cf2f98
1 changed files with 2 additions and 0 deletions

View File

@ -2023,6 +2023,8 @@ int32_t addExprAndResultField(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, int32_t col
if (!IS_NUMERIC_TYPE(colType)) {
return invalidSqlErrMsg(tscGetErrorMsgPayload(pCmd), msg1);
} else if (IS_UNSIGNED_NUMERIC_TYPE(colType) && optr == TK_DIFF) {
return invalidSqlErrMsg(tscGetErrorMsgPayload(pCmd), msg10);
}
int16_t resultType = 0;