fix : udf2 overflow for large int multiply large int

This commit is contained in:
slzhou 2022-05-13 21:02:32 +08:00
parent d54e345dc9
commit a6900a7e96
1 changed files with 1 additions and 1 deletions

View File

@ -44,7 +44,7 @@ int32_t udf2(SUdfDataBlock* block, SUdfInterBuf *interBuf, SUdfInterBuf *newInte
case TSDB_DATA_TYPE_INT: {
char* cell = udfColDataGetData(col, j);
int32_t num = *(int32_t*)cell;
sumSquares += num * num;
sumSquares += (double)num * num;
break;
}
case TSDB_DATA_TYPE_DOUBLE: {