c21 commented on a change in pull request #32159:
URL: https://github.com/apache/spark/pull/32159#discussion_r613730549



##########
File path: core/src/main/scala/org/apache/spark/util/collection/BitSet.scala
##########
@@ -240,7 +240,7 @@ class BitSet(numBits: Int) extends Serializable {
    * Compute bit-wise union with another BitSet and overwrite bits in this 
BitSet with the result.
    */
   def union(other: BitSet): Unit = {
-    require(this.numWords <= other.numWords)
+    require(this.numWords >= other.numWords)
     var ind = 0
     while( ind < this.numWords ) {

Review comment:
       Force equal length of two bitsets sounds fine. btw Java 
`java.util.BitSet` allows two bitsets to be different lengths (`or()`, `and()`, 
etc).




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

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