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