JackieTien97 opened a new pull request #1341: URL: https://github.com/apache/incubator-iotdb/pull/1341
The 'orderByHeatClause' is added to support this feature. The detailed syntax is: orderByHeatClause : ORDER BY HEAT ; It's an optional clause, if user doesn't specify it. The action of 'show timeseries' will just be like before, the result set is sorted by the registered time of the time series. If it is specified, firstly we will obtain all the satisfying timeseries as before, then we will sort them by the last point's timestamp. That means if the timeseries is inserted recently, it will be shown in the front. In the implementation, as we have got the LeafMNode before, so we can use the cachedLastValuePair field in it to get last timestamp, if the cachedLastValuePair is null, we will construct a LastQueryPlan to get it. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org