private BitMap sortBitMap(BitMap bitMap, Integer[] index) {
    BitMap sortedBitMap = new BitMap(bitMap.getSize());
    for (int i = 0; i < index.length; i++) {
      if (bitMap.isMarked(index[i])) {
        sortedBitMap.mark(i);
      }
    }
    return sortedBitMap;
  }
sort BitMap by index

@param bitMap BitMap to be sorted
@param index index
@return sorted bitMap
iotdb-client/session/src/main/java/org/apache/iotdb/session/Session.java