You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datasketches.apache.org by ti...@apache.org on 2026/07/25 13:45:33 UTC

(datasketches-rust) 03/13: refactor: standardize seed hash mismatch errors

This is an automated email from the ASF dual-hosted git repository.

tisonkun pushed a commit to branch codex/naming-drift-audit
in repository https://gitbox.apache.org/repos/asf/datasketches-rust.git

commit 0646322c23c6f400d16c6685571775f8f0e5cabf
Author: tison <wa...@gmail.com>
AuthorDate: Sat Jul 25 21:40:30 2026 +0800

    refactor: standardize seed hash mismatch errors
---
 datasketches/src/cpc/sketch.rs          | 2 +-
 datasketches/src/thetacommon/a_not_b.rs | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/datasketches/src/cpc/sketch.rs b/datasketches/src/cpc/sketch.rs
index 8f8687b..53bdea8 100644
--- a/datasketches/src/cpc/sketch.rs
+++ b/datasketches/src/cpc/sketch.rs
@@ -629,7 +629,7 @@ impl CpcSketch {
             return Err(Error::new(
                 ErrorKind::InvalidData,
                 format!(
-                    "seed hash mismatch: expected {}, got {}",
+                    "incompatible seed hash: expected {}, got {}",
                     compute_seed_hash(seed),
                     seed_hash
                 ),
diff --git a/datasketches/src/thetacommon/a_not_b.rs b/datasketches/src/thetacommon/a_not_b.rs
index 937f69e..98ebae3 100644
--- a/datasketches/src/thetacommon/a_not_b.rs
+++ b/datasketches/src/thetacommon/a_not_b.rs
@@ -66,7 +66,7 @@ impl RawAnotB {
         // A is non-empty, so its seed must be compatible.
         if a.seed_hash() != self.seed_hash {
             return Err(Error::invalid_argument(format!(
-                "A seed hash mismatch: expected {}, got {}",
+                "incompatible seed hash for A: expected {}, got {}",
                 self.seed_hash,
                 a.seed_hash()
             )));
@@ -82,7 +82,7 @@ impl RawAnotB {
         // B is non-empty, so its seed must be compatible.
         if b.seed_hash() != self.seed_hash {
             return Err(Error::invalid_argument(format!(
-                "B seed hash mismatch: expected {}, got {}",
+                "incompatible seed hash for B: expected {}, got {}",
                 self.seed_hash,
                 b.seed_hash()
             )));


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org
For additional commands, e-mail: commits-help@datasketches.apache.org