public Ordering getTimeOrder() {
    checkState(timeOrderPriority != -1, "The time order is not specified.");
    return sortItemList.get(timeOrderPriority).getOrdering();
  }
The order of query result set
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/component/OrderByComponent.java