未验证 提交 4dd6e5e4 编写于 作者: V Vector7 提交者: GitHub

Updata this file for Issues #8274 again

Modified declaring r to be of type long, "r = v" will not have the loss of accuracy of data problem in this way.
上级 8bfcf8eb
......@@ -17,7 +17,7 @@ typedef struct SUdfInit{
void abs_max(char* data, short itype, short ibytes, int numOfRows, long long* ts, char* dataOutput, char* interBuf, char* tsOutput,
int* numOfOutput, short otype, short obytes, SUdfInit* buf) {
int i;
int r = 0;
long r = 0;
printf("abs_max input data:%p, type:%d, rows:%d, ts:%p,%lld, dataoutput:%p, tsOutput:%p, numOfOutput:%p, buf:%p\n", data, itype, numOfRows, ts, *ts, dataOutput, tsOutput, numOfOutput, buf);
if (itype == 5) {
r=*(long *)dataOutput;
......@@ -29,7 +29,7 @@ void abs_max(char* data, short itype, short ibytes, int numOfRows, long long* ts
}
*numOfOutput=1;
long v = abs(*((long *)data + i));
long v = labs(*((long *)data + i));
if (v > r) {
r = v;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册