edouardmulliez opened a new pull request, #294: URL: https://github.com/apache/datasketches-rust/pull/294
When an HLL sketch retains valid update history, `estimate()` uses HIP and can return different estimates for the same values inserted in different orders. Callers currently cannot explicitly select the composite estimator, even though it is already implemented internally. Add `HllSketch::composite_estimate()` and `HllUnion::composite_estimate()`, matching Java's `getCompositeEstimate()`. The methods query the existing register-based composite estimator in HLL mode and the existing coupon-count estimator in LIST/SET modes. They preserve HIP state, the behavior of `estimate()`, and the serialization format. The API docs explain the accuracy tradeoff and include usage examples. Validation: - `cargo x prepare-testdata` - `cargo x test` (full workspace tests, cross-language serialization fixtures, and doctests) - `cargo x check` (feature matrix) - `cargo x lint` New integration tests cover insertion-order independence across all HLL types, LIST/SET behavior, agreement with merged estimates, serialization round trips, preservation of HIP and subsequent updates, and direct-update/single-input/merged/empty union cases. -- 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]
