pmcgleenon opened a new issue, #277: URL: https://github.com/apache/datasketches-rust/issues/277
I asked Claude to look for bugs and it reported this against the [T-digest merge operation](https://github.com/apache/datasketches-rust/blob/main/datasketches/src/tdigest/sketch.rs#L337-L345) > T-Digest merge() silently corrupts min/max — HIGH datasketches/src/tdigest/sketch.rs:337-345 // merge() never reads other.min / other.max — // it infers them from compress_sorted_centroids(), which takes // the extreme centroids' *means*, not their true min/max T-Digest already stores explicit min/max fields — a correct merge just needs self.min = self.min.min(other.min). Instead it re-derives them from centroid means, which is only exact when the extreme centroids have unit weight. After ordinary compression this need not hold. Result: min_value()/max_value() drift, and rank()'s tail-interpolation formula silently degrades. This is a pure merge-algorithm defect — the input digest doesn't need to be malformed in any way, just legitimately compressed. Does this seem like a valid bug? -- 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]
