code: public static double estimateSelectivity(
        final Iterator<ImmutableBitmap> bitmaps,
        final long totalNumRows
    )
    {
      long numMatchedRows = 0;
      while (bitmaps.hasNext()) {
        final ImmutableBitmap bitmap = bitmaps.next();
        numMatchedRows += bitmap.size();
      }
  
      return Math.min(1., (double) numMatchedRows / totalNumRows);
    }
docs: Return an estimated selectivity for bitmaps given by an iterator.
  
  @param bitmaps      iterator of bitmaps
  @param totalNumRows number of rows in the column associated with this bitmap index
  
  @return estimated selectivity