Hi,

I submitted a pr to add an order-by-heat feature in show time series syntax.


PR:                   https://github.com/apache/incubator-iotdb/pull/1341

ISSUE-1281:    https://github.com/apache/incubator-iotdb/issues/1281


Best,
---------------
Yuan Tian


> -----原始邮件-----
> 发件人: "田原" <[email protected]>
> 发送时间: 2020-06-10 15:29:16 (星期三)
> 收件人: [email protected]
> 抄送: 
> 主题: [ISSUE-1281] Show timeseries in descending ordered of last point time
> 
> Hi,
> 
> 
> I'm working on the 
> issue-1281(https://github.com/apache/incubator-iotdb/issues/1281). I plan to 
> add a sub clause in show timeseries syntax, like:
> 
> 
> SHOW TIMESERIES prefixPath? showWhereClause? orderByHeatClause? limitClause?
> 
> 
> 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.
> 
> 
> Best,
> ---------------
> Yuan Tian

Reply via email to