HappenLee commented on code in PR #67805:
URL: https://github.com/apache/doris/pull/67805#discussion_r3981679777
##########
be/src/exprs/aggregate/aggregate_function_percentile.h:
##########
@@ -736,8 +739,9 @@ struct PercentileExactState {
if (!inited_flag) {
levels = rhs.levels;
inited_flag = true;
- } else {
- levels.merge(rhs.levels);
+ } else if (UNLIKELY(levels.quantiles != rhs.levels.quantiles)) {
Review Comment:
We do not consider this a bug under the intended parameter-compatibility
contract. An uninitialized state has no quantile configuration and can be
ignored. A state built from all-NaN input is initialized and retains its
explicitly configured quantile, even though it has no retained samples. Merging
a 0.25-configured state with a 0.75-configured state must therefore reject the
mismatch in either operand order, including after serialization. Sample
emptiness does not erase an established configuration. We will keep the current
exact-percentile check; the reservoir implementation does not define the
contract for this function.
--
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]