QasimKhan5d opened a new pull request, #34: URL: https://github.com/apache/datasketches-go/pull/34
### 1. Enhanced correctness and numerical stability in `CpcSketch`: - **Canonicalized `float64` inputs:** - Unified handling of `+0.0` and `-0.0`. - Normalized all NaN values to a single canonical representation (`0x7ff8000000000000`). - Fixed edge-case handling when `rowCol == -1` for large `lgK` values (≥26). - Improved `promoteSparseToWindowed` by returning errors instead of panicking. - Corrected loop boundaries in `refreshKXP`. - Completed implementation of serialization method `ToCompactSlice()` and added helper method `String()` for easier debugging. ### 2. Improved robustness and clarity in `CpcUnion`: - Clearly documented and refactored the `Update()` method: - Explicit handling and clear separation of sketch flavors (`Sparse`, `Hybrid`, `Pinned`, `Sliding`). - Replaced unsafe direct sketch assignment with deep copying. - Enhanced error checks and state validation. - Added `GetBitMatrix()` helper for testing and validation purposes. ### 3. Strengthened internal consistency and testability of `pairTable`: - Refactored internal methods (`maybeInsert`, `maybeDelete`) for clearer logic and consistency: - Introduced proper cluster draining and reinsertion during deletion. - Ensured accurate resizing and rehashing via improved `rebuild()` logic. - Added utility methods (`newInstanceFromPairsArray()`, `unwrappingGetItems()`, `equals()`) to enable deterministic testing and structural equality checks. - Enhanced inline documentation and removed redundant assertions. -- 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: dev-unsubscr...@datasketches.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@datasketches.apache.org For additional commands, e-mail: dev-h...@datasketches.apache.org