mirror of
https://github.com/quickwit-oss/tantivy.git
synced 2026-06-19 09:16:45 +00:00
Built SUM final result in each branch directly.
Keeps the empty-bucket coercion visible at the boundary instead of a shared binding, following the reviewer's suggested shape.
This commit is contained in:
parent
fc88d80726
commit
799f7b4646
1 changed files with 5 additions and 5 deletions
|
|
@ -387,12 +387,12 @@ impl IntermediateMetricResult {
|
|||
.and_then(|sum| sum.none_if_no_match)
|
||||
.unwrap_or(false);
|
||||
let value = intermediate_sum.finalize();
|
||||
let coerced = if none_if_no_match {
|
||||
value
|
||||
if none_if_no_match {
|
||||
MetricResult::Sum(value.into())
|
||||
} else {
|
||||
Some(value.unwrap_or(0.0))
|
||||
};
|
||||
MetricResult::Sum(coerced.into())
|
||||
let value = Some(value.unwrap_or(0.0));
|
||||
MetricResult::Sum(value.into())
|
||||
}
|
||||
}
|
||||
IntermediateMetricResult::Percentiles(percentiles) => MetricResult::Percentiles(
|
||||
percentiles
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue