You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by qi...@apache.org on 2020/04/23 13:55:26 UTC

[incubator-iotdb] branch master updated: update limit doc (#1091)

This is an automated email from the ASF dual-hosted git repository.

qiaojialin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-iotdb.git


The following commit(s) were added to refs/heads/master by this push:
     new 7f216db  update limit doc (#1091)
7f216db is described below

commit 7f216db21e00a66ed5676bec21d2479fd812d73a
Author: Jialin Qiao <qj...@mails.tsinghua.edu.cn>
AuthorDate: Thu Apr 23 21:50:01 2020 +0800

    update limit doc (#1091)
    
    * update limit in show timeseries doc
---
 .../1-DDL Data Definition Language.md              | 29 +++++++++++++++++-----
 .../5-Operation Manual/4-SQL Reference.md          | 22 ++++++++++++++++
 .../1-DDL Data Definition Language.md              | 26 +++++++++++++++----
 .../5-Operation Manual/4-SQL Reference.md          | 21 ++++++++++++++++
 4 files changed, 87 insertions(+), 11 deletions(-)

diff --git a/docs/UserGuide/5-Operation Manual/1-DDL Data Definition Language.md b/docs/UserGuide/5-Operation Manual/1-DDL Data Definition Language.md
index 4efbf03..d1b67fe 100644
--- a/docs/UserGuide/5-Operation Manual/1-DDL Data Definition Language.md	
+++ b/docs/UserGuide/5-Operation Manual/1-DDL Data Definition Language.md	
@@ -76,6 +76,7 @@ Please refer to [Encoding](../2-Concept/3-Encoding.html) for correspondence betw
 
 We can also add an alias, extra tag and attribute information while creating one timeseries.
 The SQL statements for creating timeseries with extra tag and attribute information are extended as follows:
+
 ```
 create timeseries root.turbine.d1.s1(temprature) with datatype=FLOAT, encoding=RLE, compression=SNAPPY tags(tag1=v1, tag2=v2) attributes(attr1=v1, attr2=v2)
 ```
@@ -88,24 +89,36 @@ The only difference between tag and attribute is that we will maintain an invert
 
 ## Show Timeseries
 
-Currently, IoTDB supports three ways of viewing timeseries:
+* SHOW TIMESERIES prefixPath? showWhereClause? limitClause?
+
+  There are three optional clauses could be added behind SHOW TIMESERIES, return information of time series 
+  
+Timeseries information includes: timeseries path, alias of measurement, storage group it belongs to, data type, encoding type, compression type, tags and attributes.
+ 
+Examples:
+
+* SHOW TIMESERIES
 
-* SHOW TIMESERIES statement presents all timeseries information in JSON form 
-* SHOW TIMESERIES <`Path`> statement returns all timeseries information and the total number of timeseries under the given <`Path`>  in tabular form. timeseries information includes: timeseries path, storage group it belongs to, data type, encoding type.  <`Path`> needs to be a prefix path or a path with star or a timeseries path. SQL statements are as follows:
+  presents all timeseries information in JSON form
+ 
+* SHOW TIMESERIES <`Path`> 
+  
+  returns all timeseries information under the given <`Path`>.  <`Path`> needs to be a prefix path or a path with star or a timeseries path. SQL statements are as follows:
 
 ```
 IoTDB> show timeseries root
 IoTDB> show timeseries root.ln
 ```
 
-The results are shown below respectly:
+The results are shown below respectively:
 
 <center><img style="width:100%; max-width:800px; max-height:600px; margin-left:auto; margin-right:auto; display:block;" src="https://user-images.githubusercontent.com/13203019/51577347-8db7d780-1ef4-11e9-91d6-764e58c10e94.jpg"></center>
 <center><img style="width:100%; max-width:800px; max-height:600px; margin-left:auto; margin-right:auto; display:block;" src="https://user-images.githubusercontent.com/13203019/51577359-97413f80-1ef4-11e9-8c10-53b291fc10a5.jpg"></center>
 
+* SHOW TIMESERIES (<`PrefixPath`>)? WhereClause
+ 
+  returns all the timeseries information that satisfy the where condition and start with the prefixPath SQL statements are as follows:
 
-* SHOW TIMESERIES (<`PrefixPath`>)? WhereClause statement returns all the timeseries information that satisfy the where condition and start with the prefixPath
-SQL statements are as follows:
 ```
 show timeseries root.ln where unit=c
 show timeseries root.ln where description contains 'test1'
@@ -116,6 +129,10 @@ The results are shown below respectly:
 
 > Notice that, we only support one condition in the where clause. Either it's an equal filter or it is an `contains` filter. In both case, the property in the where condition must be a tag.
 
+* SHOW TIMESERIES LIMIT INT OFFSET INT
+
+  returns all the timeseries information start from the offset and limit the number of series returned
+  
 It is worth noting that when the queried path does not exist, the system will return no timeseries.  
 
 ## Count Timeseries
diff --git a/docs/UserGuide/5-Operation Manual/4-SQL Reference.md b/docs/UserGuide/5-Operation Manual/4-SQL Reference.md
index 6fadc22..8fe78c2 100644
--- a/docs/UserGuide/5-Operation Manual/4-SQL Reference.md	
+++ b/docs/UserGuide/5-Operation Manual/4-SQL Reference.md	
@@ -125,6 +125,7 @@ Note: This statement can be used in IoTDB Client and JDBC.
 ```
 
 * Show Specific Timeseries Statement with where clause
+
 ```
 SHOW TIMESERIES prefixPath? showWhereClause?
 showWhereClause
@@ -138,6 +139,27 @@ Eg: show timeseries root.ln where unit='c'
 Eg: show timeseries root.ln where description contains 'test1'
 ```
 
+* Show Specific Timeseries Statement with where clause start from offset and limit the total number of result
+
+```
+SHOW TIMESERIES prefixPath? showWhereClause? limitClause?
+
+showWhereClause
+    : WHERE (property | containsExpression)
+    ;
+containsExpression
+    : name=ID OPERATOR_CONTAINS value=propertyValue
+    ;
+limitClause
+    : LIMIT INT offsetClause?
+    | offsetClause? LIMIT INT
+    ;
+    
+Eg: show timeseries root.ln where unit='c'
+Eg: show timeseries root.ln where description contains 'test1'
+Eg: show timeseries root.ln where unit='c' limit 10 offset 10
+```
+
 * Show Storage Group Statement
 
 ```
diff --git a/docs/zh/UserGuide/5-Operation Manual/1-DDL Data Definition Language.md b/docs/zh/UserGuide/5-Operation Manual/1-DDL Data Definition Language.md
index 9adc599..95ce913 100644
--- a/docs/zh/UserGuide/5-Operation Manual/1-DDL Data Definition Language.md	
+++ b/docs/zh/UserGuide/5-Operation Manual/1-DDL Data Definition Language.md	
@@ -88,11 +88,21 @@ create timeseries root.turbine.d1.s1(temprature) with datatype=FLOAT, encoding=R
 
 ## 查看时间序列
 
-目前,IoTDB支持三种查看时间序列的方式:
+* SHOW TIMESERIES prefixPath? showWhereClause? limitClause?
 
-* SHOW TIMESERIES语句以JSON形式展示系统中所有的时间序列信息
+  SHOW TIMESERIES 后可以跟三种可选的子句,查询结果为这些时间序列的所有信息
 
-* SHOW TIMESERIES <`Path`>语句以表格的形式返回给定路径的下的所有时间序列信息及时间序列总数。时间序列信息具体包括:时间序列路径名,数据类型,编码类型。其中,`Path`需要为一个前缀路径、带星路径或时间序列路径。例如,分别查看`root`路径和`root.ln`路径下的时间序列,SQL语句如下所示:
+时间序列信息具体包括:时间序列路径名,存储组,Measurement别名,数据类型,编码方式,压缩方式,属性和标签。
+
+示例:
+
+* SHOW TIMESERIES
+
+  展示系统中所有的时间序列信息
+
+* SHOW TIMESERIES <`Path`>
+
+  返回给定路径的下的所有时间序列信息。其中 `Path` 需要为一个前缀路径、带星路径或时间序列路径。例如,分别查看`root`路径和`root.ln`路径下的时间序列,SQL语句如下所示:
 
 ```
 IoTDB> show timeseries root
@@ -104,8 +114,10 @@ IoTDB> show timeseries root.ln
 <center><img style="width:100%; max-width:800px; max-height:600px; margin-left:auto; margin-right:auto; display:block;" src="https://user-images.githubusercontent.com/13203019/51577347-8db7d780-1ef4-11e9-91d6-764e58c10e94.jpg"></center>
 <center><img style="width:100%; max-width:800px; max-height:600px; margin-left:auto; margin-right:auto; display:block;" src="https://user-images.githubusercontent.com/13203019/51577359-97413f80-1ef4-11e9-8c10-53b291fc10a5.jpg"></center>
 
-* SHOW TIMESERIES (<`PrefixPath`>)? WhereClause 语句返回给定路径的下的所有满足条件的时间序列信息
-,SQL语句如下所示:
+* SHOW TIMESERIES (<`PrefixPath`>)? WhereClause 
+  
+  返回给定路径的下的所有满足条件的时间序列信息,SQL语句如下所示:
+
 ```
 show timeseries root.ln where unit=c
 show timeseries root.ln where description contains 'test1'
@@ -116,6 +128,10 @@ show timeseries root.ln where description contains 'test1'
 
 > 注意,现在我们只支持一个查询条件,要么是等值条件查询,要么是包含条件查询。当然where子句中涉及的必须是标签值,而不能是属性值。
 
+* SHOW TIMESERIES LIMIT INT OFFSET INT
+
+  只返回从指定下标开始的结果,最大返回条数被 LIMIT 限制,用于分页查询
+
 需要注意的是,当查询路径不存在时,系统会返回0条时间序列。
 
 ## 统计时间序列总数
diff --git a/docs/zh/UserGuide/5-Operation Manual/4-SQL Reference.md b/docs/zh/UserGuide/5-Operation Manual/4-SQL Reference.md
index 50b8dbc..1f06137 100644
--- a/docs/zh/UserGuide/5-Operation Manual/4-SQL Reference.md	
+++ b/docs/zh/UserGuide/5-Operation Manual/4-SQL Reference.md	
@@ -128,6 +128,27 @@ Eg: show timeseries root.ln where unit='c'
 Eg: show timeseries root.ln where description contains 'test1'
 ```
 
+* 分页显示满足条件的时间序列语句
+
+```
+SHOW TIMESERIES prefixPath? showWhereClause? limitClause?
+
+showWhereClause
+    : WHERE (property | containsExpression)
+    ;
+containsExpression
+    : name=ID OPERATOR_CONTAINS value=propertyValue
+    ;
+limitClause
+    : LIMIT INT offsetClause?
+    | offsetClause? LIMIT INT
+    ;
+    
+Eg: show timeseries root.ln where unit='c'
+Eg: show timeseries root.ln where description contains 'test1'
+Eg: show timeseries root.ln where unit='c' limit 10 offset 10
+```
+
 * 显示存储组语句
 
 ```