[TD-2609]<fix>: fix the crash in case of only one negative value to apply apercentile query.

This commit is contained in:
Haojun Liao 2020-12-29 18:48:52 +08:00
parent 1967949112
commit fe15fc8a84
1 changed files with 1 additions and 1 deletions

View File

@ -174,7 +174,7 @@ int32_t tHistogramAdd(SHistogramInfo** pHisto, double val) {
}
assert((*pHisto)->elems[idx].val > val);
} else {
} else if ((*pHisto)->numOfElems > 0) {
assert((*pHisto)->elems[(*pHisto)->numOfEntries].val < val);
}