ZENOTME commented on code in PR #84:
URL: https://github.com/apache/datasketches-rust/pull/84#discussion_r2764002660


##########
datasketches/src/hash/mod.rs:
##########
@@ -37,6 +37,19 @@ pub(crate) use self::xxhash::XxHash64;
 /// a history of stored sketches you are stuck with it.
 pub(crate) const DEFAULT_UPDATE_SEED: u64 = 9001;
 
+/// Computes and checks the 16-bit seed hash from the given long seed.
+///
+/// The seed hash may not be zero in order to maintain compatibility with 
older serialized
+/// versions that did not have this concept.

Review Comment:
   Does this mean that we should check the return value to prevent 0?



##########
datasketches/src/cpc/pair_table.rs:
##########
@@ -64,17 +64,13 @@ impl PairTable {
         // sorted pairs array. However, we are starting out with the correct 
final table size, so
         // the problem might not occur.
 
-        for slot in slots {
-            table.must_insert(slot);
+        for i in 0..num_items {

Review Comment:
   In here, we have the invariant: `num_items <= slots.size()`, should we 
expression explicitly using assert or comment.



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