public void clear() {
    heapSize = 0;
    lastTime = Long.MIN_VALUE;
  }
Calculates the children indexes for a given index and checks to see which one is smaller and
returns the index.

@param index the given index
@return index of a smaller child or -1 if no children
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/datastructure/TimeSelector.java