Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-2354

BitSet Range Expanded when creating new one

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Not A Problem
    • 1.0.0, 1.1.0
    • None
    • Spark Core
    • None

    Description

      BitSet has a constructor parameter named "numBits: Int" and indicate the bit num inside.
      And also, there is a function called "capacity" which represents the long words number to hold the bits.

      When creating new BitSet,for example in '|', I thought the new created one shouldn't be the size of longer words' length, instead, it should be the longer set's num of bit

      def |(other: BitSet): BitSet = {
          val newBS = new BitSet(math.max(numBits, other.numBits)) 
      // I know by now the numBits isn't a field
      

      Does it have any other reason to expand the BitSet range I don't know?

      Attachments

        Activity

          People

            Unassigned Unassigned
            yijieshen Yijie Shen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: