From 906fb8ef871fef4bfdb4e5be6bfb9a5fad4d0d8b Mon Sep 17 00:00:00 2001 From: Pascal Seitz Date: Mon, 7 Sep 2026 18:19:11 +0800 Subject: [PATCH] update comment --- src/aggregation/bucket/term_agg/mod.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/aggregation/bucket/term_agg/mod.rs b/src/aggregation/bucket/term_agg/mod.rs index 2805d8f77..08ec2f093 100644 --- a/src/aggregation/bucket/term_agg/mod.rs +++ b/src/aggregation/bucket/term_agg/mod.rs @@ -1465,7 +1465,9 @@ where out.push((IntermediateKey::IpAddr(val), intermediate_entry)); } } else if term_req.column_type == ColumnType::F64 { - // Distinct f64 encodings can normalize to the same public key, notably -0.0 and +0.0. + // -0.0 and +0.0 both normalize to I64(0). Sort by normalized key to merge their + // buckets below. Other distinct f64 encodings, including NaNs, remain distinct: + // NaNs are not normalized and IntermediateKey compares them using total_cmp. let normalized_key = |val: u64| -> IntermediateKey { NumericalValue::from(f64::from_u64(val)).normalize().into() };