hawkingrei commented on code in PR #181:
URL: https://github.com/apache/datasketches-rust/pull/181#discussion_r3718219764
##########
datasketches/src/thetafamily/common/jaccard_similarity.rs:
##########
@@ -299,6 +269,71 @@ impl JaccardSimilarityOperator {
union.theta64(),
)
}
+
+ pub(crate) fn exactly_equal<A, B>(&self, sketch_a: &A, sketch_b: &B) ->
Result<bool, Error>
+ where
+ A: ThetaKeySketchView,
+ B: ThetaKeySketchView,
+ {
+ if sketch_a.is_empty() && sketch_b.is_empty() {
+ return Ok(true);
+ }
+ if sketch_a.is_empty() || sketch_b.is_empty() {
Review Comment:
Thanks for catching this. The empty-input short-circuit is intentional, so I
updated both public docs to state that seed mismatches are errors only when
both sketches are non-empty. I also added Theta and Tuple regression coverage
for an empty sketch paired with a non-empty sketch built with a different seed.
--
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]