public void sort(int lo, int hi) {
    if (lo == hi) {
      return;
    }
    if (hi - lo <= SMALL_ARRAY_LENGTH) {
      int initRunLen = countRunAndMakeAscending(lo, hi);
      binarySort(lo, hi, lo + initRunLen);
      return;
    }
    int mid = (lo + hi) >>> 1;
    sort(lo, mid);
    sort(mid, hi);
    merge(lo, mid, hi);
  }
the entrance of tim_sort; 1. array_size <= 32, use binary sort. 2. recursively invoke merge
sort.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/datastructure/TimSort.java