fix(query): avg sum operation check range build error
This commit is contained in:
parent
e9f7572a54
commit
1ac428ff61
|
@ -612,7 +612,7 @@ int32_t avgFunction(SqlFunctionCtx* pCtx) {
|
||||||
for (int32_t i = pInput->startRowIndex; i < pInput->numOfRows + pInput->startRowIndex; ++i) {
|
for (int32_t i = pInput->startRowIndex; i < pInput->numOfRows + pInput->startRowIndex; ++i) {
|
||||||
if (type == TSDB_DATA_TYPE_BIGINT) {
|
if (type == TSDB_DATA_TYPE_BIGINT) {
|
||||||
CHECK_OVERFLOW_SUM_SIGNED(pAvgRes, plist[i])
|
CHECK_OVERFLOW_SUM_SIGNED(pAvgRes, plist[i])
|
||||||
\ } else {
|
} else {
|
||||||
CHECK_OVERFLOW_SUM_UNSIGNED(pAvgRes, (uint64_t)plist[i])
|
CHECK_OVERFLOW_SUM_UNSIGNED(pAvgRes, (uint64_t)plist[i])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue