QasimKhan5d commented on code in PR #29:
URL: https://github.com/apache/datasketches-go/pull/29#discussion_r2002981253


##########
cpc/pair_table.go:
##########
@@ -237,3 +237,63 @@ func mergePairs(arrA []int, startA, lengthA int, arrB 
[]int, startB, lengthB int
                c++
        }
 }
+
+// Copy creates and returns a deep copy of the pairTable.
+func (p *pairTable) Copy() *pairTable {
+       // Create a new pairTable using the same lgSizeInts and validBits.
+       newPT, err := NewPairTable(p.lgSizeInts, p.validBits)
+       if err != nil {
+               // This should not happen if p is valid.
+               panic(err)

Review Comment:
   returning nil, error instead



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