tisonkun opened a new issue, #717:
URL: https://github.com/apache/datasketches-java/issues/717

   The C++ impl checks:
   
   ```cpp
   if (lg_size < 2) throw std::invalid_argument("lg_size must be >= 2");
   if (num_valid_bits < 1 || num_valid_bits > 32) throw 
std::invalid_argument("num_valid_bits must be between 1 and 32");
   ```
   
   The Java impl checks:
   
   
https://github.com/apache/datasketches-java/blob/23072ed1d7bcb16d38583f01e643a5a67510c07d/src/main/java/org/apache/datasketches/cpc/PairTable.java#L49
   
   While we also have:
   
   
https://github.com/apache/datasketches-java/blob/23072ed1d7bcb16d38583f01e643a5a67510c07d/src/main/java/org/apache/datasketches/cpc/PairTable.java#L139-L140
   
   So I think we may align all these checks, and we actually have an assertion 
that `lgSizeInts < numValidBits` which holds for all the construction calls.
   
   BTW, IIUC the `PairTable` is:
   
   ```rust
   /// A highly specialized hash table used for sparse data.
   ///
   /// This table stores `(row, col)` pairs and uses linear probing for 
collision resolution. It is
   /// optimized for scenarios where the cardinality of entries is low.
   ```


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