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 16d1570  [IOTDB-552] Restrictions of predicates in ALIGN_BY_DEVICE 
statements are not well stated (#898)
16d1570 is described below

commit 16d1570fc4a703d06108af95378a633da6838745
Author: Xiangwei Wei <[email protected]>
AuthorDate: Wed Mar 11 11:36:14 2020 +0800

    [IOTDB-552] Restrictions of predicates in ALIGN_BY_DEVICE statements are 
not well stated (#898)
---
 .../UserGuide/5-Operation Manual/4-SQL Reference.md           | 10 ++++++++--
 .../UserGuide/5-Operation Manual/4-SQL Reference.md           | 11 +++++++++--
 2 files changed, 17 insertions(+), 4 deletions(-)

diff --git a/docs/Documentation-CHN/UserGuide/5-Operation Manual/4-SQL 
Reference.md b/docs/Documentation-CHN/UserGuide/5-Operation Manual/4-SQL 
Reference.md
index 240c35f..ee9b46a 100644
--- a/docs/Documentation-CHN/UserGuide/5-Operation Manual/4-SQL Reference.md    
+++ b/docs/Documentation-CHN/UserGuide/5-Operation Manual/4-SQL Reference.md    
@@ -396,12 +396,19 @@ root.sg1.d0.s0 is INT32 while root.sg2.d3.s0 is FLOAT.
 
 7. 在Select子句中重复写列名是生效的。例如, "select s0,s0,s1 from root.sg.* align by device" 
不等于 "select s0,s1 from root.sg.* align by device".
 
-8. 更多正例: 
+8. 在Where子句中时间过滤条件和值过滤条件均可以使用,值过滤条件可以使用叶子节点 path,或以 root 开头的整个 
path,不允许存在通配符。例如,
+- select * from root.sg.* where time = 1 align by device
+- select * from root.sg.* where s0 < 100 align by device
+- select * from root.sg.* where time < 20 AND s0 > 50 align by device
+- select * from root.sg.d0 where root.sg.d0.s0 = 15 align by device
+
+9. 更多正例:
    - select * from root.vehicle align by device
    - select s0,s0,s1 from root.vehicle.* align by device
    - select s0,s1 from root.vehicle.* limit 10 offset 1 align by device
    - select * from root.vehicle slimit 10 soffset 2 align by device
    - select * from root.vehicle where time > 10 align by device
+   - select * from root.vehicle.* where time < 10 AND s0 > 25 align by device
    - select * from root.vehicle where root.vehicle.d0.s0>0 align by device
    - select count(*) from root.vehicle align by device
    - select sum(*) from root.vehicle GROUP BY (20ms,0,[2,50]) align by device
@@ -882,4 +889,3 @@ eg. root.ln.wf01.wt01.*
 eg. *.wt01.*
 eg. *
 ```
-
diff --git a/docs/Documentation/UserGuide/5-Operation Manual/4-SQL Reference.md 
b/docs/Documentation/UserGuide/5-Operation Manual/4-SQL Reference.md
index 463de8d..ca30a34 100644
--- a/docs/Documentation/UserGuide/5-Operation Manual/4-SQL Reference.md        
+++ b/docs/Documentation/UserGuide/5-Operation Manual/4-SQL Reference.md        
@@ -353,7 +353,7 @@ Rules:
 Correct example: select * from root.sg1 align by device  
 Correct example: select * from root.sg1 ALIGN BY DEVICE  
 
-2. GroupbyDeviceClause can only be used at the end of a query statement.  
+2. AlignbyDeviceClause can only be used at the end of a query statement.  
 Correct example: select * from root.sg1 where time > 10 align by device  
 Wrong example: select * from root.sg1 align by device where time > 10  
 
@@ -406,12 +406,19 @@ For example. "select s0,s1 from root.sg.*,root.sg.d0 
align by device" is equal t
 7. The duplicated measurements in the suffix paths are not neglected.  
 For example, "select s0,s0,s1 from root.sg.* align by device" is not equal to 
"select s0,s1 from root.sg.* align by device".
 
-8. More correct examples: 
+8. Both time predicates and value predicates are allowed in Where Clause. The 
paths of the value predicates can be the leaf node or full path started with 
ROOT. And wildcard is not allowed here. For example:
+- select * from root.sg.* where time = 1 align by device
+- select * from root.sg.* where s0 < 100 align by device
+- select * from root.sg.* where time < 20 AND s0 > 50 align by device
+- select * from root.sg.d0 where root.sg.d0.s0 = 15 align by device
+
+9. More correct examples:
    - select * from root.vehicle align by device
    - select s0,s0,s1 from root.vehicle.* align by device
    - select s0,s1 from root.vehicle.* limit 10 offset 1 align by device
    - select * from root.vehicle slimit 10 soffset 2 align by device
    - select * from root.vehicle where time > 10 align by device
+   - select * from root.vehicle.* where time < 10 AND s0 > 25 align by device
    - select * from root.vehicle where root.vehicle.d0.s0>0 align by device
    - select count(*) from root.vehicle align by device
    - select sum(*) from root.vehicle GROUP BY (20ms,0,[2,50]) align by device

Reply via email to