seragAhmed opened a new pull request, #371:
URL: https://github.com/apache/datasketches-rust/pull/371

   ## Summary
   
   `KllSketch::merge` returned `Ok(())` for an empty `other` before comparing 
`m`, so an empty sketch with an incompatible `m` was accepted while a non-empty 
one was rejected. The `m` check now comes first, as `ReqSketch::merge` does for 
`rank_accuracy`.
   
   - The `# Errors` doc now lists both conditions (different `m`, combined 
weight above `u64::MAX`) and states that the sketch is not modified on error.
   - A unit test in `kll/sketch.rs` builds an empty sketch with a non-default 
`m` (only reachable from inside the module, since `new` and `deserialize` 
produce `DEFAULT_M`) and checks for `InvalidArgument` with the target unchanged.
   - `CHANGELOG.md` has a bug-fix entry under Unreleased.
   
   `cargo x check` and `cargo x test` pass (with `cargo x prepare-testdata`). 
Clippy, rustfmt and rustdoc from `cargo x lint` pass; taplo could not be 
installed on my Windows toolchain, and this change touches no TOML.
   
   Closes #363
   
   This PR was prepared with AI assistance (Claude Code); I reviewed the change 
and the test.


-- 
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]

Reply via email to