HappenLee commented on code in PR #67805:
URL: https://github.com/apache/doris/pull/67805#discussion_r3981729693
##########
be/src/exprs/aggregate/aggregate_function_percentile_reservoir.h:
##########
@@ -44,7 +45,15 @@ struct QuantileReservoirSampler {
}
void merge(const QuantileReservoirSampler& rhs) {
- level = rhs.level;
+ if (rhs.data.empty()) {
+ return;
+ }
+ if (data.empty()) {
+ level = rhs.level;
+ } else if (UNLIKELY(level != rhs.level)) {
Review Comment:
Implemented locally in the FE PercentileReservoir legality check: changed
the rejection condition to `!(value >= 0 && value <= 1)` and added a comment
explaining that the old out-of-range comparisons both evaluate to false for
NaN. The new condition rejects NaN and infinities while preserving valid
levels, including 0 and 1. StateCombinator and CombineCombinator delegate to
this nested legality check as well.
This is a scoped FE validation change. No BE validation or handling of
previously serialized NaN-configured states is added.
FE Checkstyle passed with zero violations, git diff --check passed, and
manual Java predicate checks covered NaN, both infinities, out-of-range values,
negative zero, endpoints and an interior value. FE unit tests, SQL regression
tests and the binary prepared-statement path were not run. The change is saved
in local commit 243c526d7cb and has not been pushed to this PR.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]