Hi, all, The result set our ALIGEND BY DEVICE query returns contains two important columns: timestamp and device.
See the implementation of AlignByDeviceDataSet https://github.com/apache/iotdb/blob/e4b7f64deb54b3fc186424cf969a68bff23a6fc7/server/src/main/java/org/apache/iotdb/db/query/dataset/AlignByDeviceDataSet.java#L129-L226 It iterates device firstly, and then timestamp. So what is the order of the devices? Is it sorted by alphabet? I didn't find any explanations in the official documents. In my opinion, other strange and unpredictable sorting method may hard to be understood and explained, and the most important, implemented in a cluster query. As it supports LIMIT and OFFSET clauses, the query result should be stable and consistent both in standalone and cluster environment, if they have the same data.
