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

critas pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iotdb-docs.git


The following commit(s) were added to refs/heads/main by this push:
     new a68b3bef The requirement to query the latest data point with other 
filtering conditions can be implemented through function composition (#806)
a68b3bef is described below

commit a68b3bef9e8a9b338594fbe68032af3fc7c16f7d
Author: leto-b <[email protected]>
AuthorDate: Thu Jul 24 10:08:15 2025 +0800

    The requirement to query the latest data point with other filtering 
conditions can be implemented through function composition (#806)
---
 src/UserGuide/Master/Tree/Basic-Concept/Query-Data.md    | 13 +++++++++++++
 src/UserGuide/V1.3.x/Basic-Concept/Query-Data.md         | 14 ++++++++++++++
 src/UserGuide/dev-1.3/Basic-Concept/Query-Data.md        | 14 ++++++++++++++
 src/UserGuide/latest/Basic-Concept/Query-Data.md         | 14 ++++++++++++++
 src/zh/UserGuide/Master/Tree/Basic-Concept/Query-Data.md | 14 ++++++++++++++
 src/zh/UserGuide/V1.3.x/Basic-Concept/Query-Data.md      | 14 ++++++++++++++
 src/zh/UserGuide/dev-1.3/Basic-Concept/Query-Data.md     | 16 +++++++++++++++-
 src/zh/UserGuide/latest/Basic-Concept/Query-Data.md      | 14 ++++++++++++++
 8 files changed, 112 insertions(+), 1 deletion(-)

diff --git a/src/UserGuide/Master/Tree/Basic-Concept/Query-Data.md 
b/src/UserGuide/Master/Tree/Basic-Concept/Query-Data.md
index f98c5ec3..f020821f 100644
--- a/src/UserGuide/Master/Tree/Basic-Concept/Query-Data.md
+++ b/src/UserGuide/Master/Tree/Basic-Concept/Query-Data.md
@@ -427,6 +427,19 @@ Total line number = 2
 It costs 0.002s
 ```
 
+**Note:** The requirement to query the latest data point with other filtering 
conditions can be implemented through function composition. For example:
+
+```
+IoTDB> select max_time(*), last_value(*) from root.ln.wf01.wt01 where time >= 
2017-11-07T23:50:00 and status = false align by device
++-----------------+---------------------+----------------+-----------------------+------------------+
+|           
Device|max_time(temperature)|max_time(status)|last_value(temperature)|last_value(status)|
++-----------------+---------------------+----------------+-----------------------+------------------+
+|root.ln.wf01.wt01|        1510077540000|   1510077540000|              
21.067368|             false|
++-----------------+---------------------+----------------+-----------------------+------------------+
+Total line number = 1
+It costs 0.021s
+```
+
 ## 3. `WHERE` CLAUSE
 
 In IoTDB query statements, two filter conditions, **time filter** and **value 
filter**, are supported.
diff --git a/src/UserGuide/V1.3.x/Basic-Concept/Query-Data.md 
b/src/UserGuide/V1.3.x/Basic-Concept/Query-Data.md
index d312503c..5d85a156 100644
--- a/src/UserGuide/V1.3.x/Basic-Concept/Query-Data.md
+++ b/src/UserGuide/V1.3.x/Basic-Concept/Query-Data.md
@@ -427,6 +427,20 @@ Total line number = 2
 It costs 0.002s
 ```
 
+**Note:** The requirement to query the latest data point with other filtering 
conditions can be implemented through function composition. For example:
+
+```
+IoTDB> select max_time(*), last_value(*) from root.ln.wf01.wt01 where time >= 
2017-11-07T23:50:00 and status = false align by device
++-----------------+---------------------+----------------+-----------------------+------------------+
+|           
Device|max_time(temperature)|max_time(status)|last_value(temperature)|last_value(status)|
++-----------------+---------------------+----------------+-----------------------+------------------+
+|root.ln.wf01.wt01|        1510077540000|   1510077540000|              
21.067368|             false|
++-----------------+---------------------+----------------+-----------------------+------------------+
+Total line number = 1
+It costs 0.021s
+```
+
+
 ## `WHERE` CLAUSE
 
 In IoTDB query statements, two filter conditions, **time filter** and **value 
filter**, are supported.
diff --git a/src/UserGuide/dev-1.3/Basic-Concept/Query-Data.md 
b/src/UserGuide/dev-1.3/Basic-Concept/Query-Data.md
index d312503c..5d85a156 100644
--- a/src/UserGuide/dev-1.3/Basic-Concept/Query-Data.md
+++ b/src/UserGuide/dev-1.3/Basic-Concept/Query-Data.md
@@ -427,6 +427,20 @@ Total line number = 2
 It costs 0.002s
 ```
 
+**Note:** The requirement to query the latest data point with other filtering 
conditions can be implemented through function composition. For example:
+
+```
+IoTDB> select max_time(*), last_value(*) from root.ln.wf01.wt01 where time >= 
2017-11-07T23:50:00 and status = false align by device
++-----------------+---------------------+----------------+-----------------------+------------------+
+|           
Device|max_time(temperature)|max_time(status)|last_value(temperature)|last_value(status)|
++-----------------+---------------------+----------------+-----------------------+------------------+
+|root.ln.wf01.wt01|        1510077540000|   1510077540000|              
21.067368|             false|
++-----------------+---------------------+----------------+-----------------------+------------------+
+Total line number = 1
+It costs 0.021s
+```
+
+
 ## `WHERE` CLAUSE
 
 In IoTDB query statements, two filter conditions, **time filter** and **value 
filter**, are supported.
diff --git a/src/UserGuide/latest/Basic-Concept/Query-Data.md 
b/src/UserGuide/latest/Basic-Concept/Query-Data.md
index f98c5ec3..ce50bb6f 100644
--- a/src/UserGuide/latest/Basic-Concept/Query-Data.md
+++ b/src/UserGuide/latest/Basic-Concept/Query-Data.md
@@ -427,6 +427,20 @@ Total line number = 2
 It costs 0.002s
 ```
 
+**Note:** The requirement to query the latest data point with other filtering 
conditions can be implemented through function composition. For example:
+
+```
+IoTDB> select max_time(*), last_value(*) from root.ln.wf01.wt01 where time >= 
2017-11-07T23:50:00 and status = false align by device
++-----------------+---------------------+----------------+-----------------------+------------------+
+|           
Device|max_time(temperature)|max_time(status)|last_value(temperature)|last_value(status)|
++-----------------+---------------------+----------------+-----------------------+------------------+
+|root.ln.wf01.wt01|        1510077540000|   1510077540000|              
21.067368|             false|
++-----------------+---------------------+----------------+-----------------------+------------------+
+Total line number = 1
+It costs 0.021s
+```
+
+
 ## 3. `WHERE` CLAUSE
 
 In IoTDB query statements, two filter conditions, **time filter** and **value 
filter**, are supported.
diff --git a/src/zh/UserGuide/Master/Tree/Basic-Concept/Query-Data.md 
b/src/zh/UserGuide/Master/Tree/Basic-Concept/Query-Data.md
index b5085b32..ba97766b 100644
--- a/src/zh/UserGuide/Master/Tree/Basic-Concept/Query-Data.md
+++ b/src/zh/UserGuide/Master/Tree/Basic-Concept/Query-Data.md
@@ -680,6 +680,20 @@ Total line number = 2
 It costs 0.002s
 ```
 
+**注意:** 可以通过函数组合方式实现其他过滤条件查询最新点的需求,例如
+
+```
+IoTDB> select max_time(*), last_value(*) from root.ln.wf01.wt01 where time >= 
2017-11-07T23:50:00 and status = false align by device
++-----------------+---------------------+----------------+-----------------------+------------------+
+|           
Device|max_time(temperature)|max_time(status)|last_value(temperature)|last_value(status)|
++-----------------+---------------------+----------------+-----------------------+------------------+
+|root.ln.wf01.wt01|        1510077540000|   1510077540000|              
21.067368|             false|
++-----------------+---------------------+----------------+-----------------------+------------------+
+Total line number = 1
+It costs 0.021s
+```
+
+
 ## 3. 查询过滤条件(WHERE 子句)
 
 `WHERE` 子句指定了对数据行的筛选条件,由一个 `whereCondition` 组成。
diff --git a/src/zh/UserGuide/V1.3.x/Basic-Concept/Query-Data.md 
b/src/zh/UserGuide/V1.3.x/Basic-Concept/Query-Data.md
index cc7895a9..ca7730a1 100644
--- a/src/zh/UserGuide/V1.3.x/Basic-Concept/Query-Data.md
+++ b/src/zh/UserGuide/V1.3.x/Basic-Concept/Query-Data.md
@@ -680,6 +680,20 @@ Total line number = 2
 It costs 0.002s
 ```
 
+**注意:** 可以通过函数组合方式实现其他过滤条件查询最新点的需求,例如
+
+```
+IoTDB> select max_time(*), last_value(*) from root.ln.wf01.wt01 where time >= 
2017-11-07T23:50:00 and status = false align by device
++-----------------+---------------------+----------------+-----------------------+------------------+
+|           
Device|max_time(temperature)|max_time(status)|last_value(temperature)|last_value(status)|
++-----------------+---------------------+----------------+-----------------------+------------------+
+|root.ln.wf01.wt01|        1510077540000|   1510077540000|              
21.067368|             false|
++-----------------+---------------------+----------------+-----------------------+------------------+
+Total line number = 1
+It costs 0.021s
+```
+
+
 ## 查询过滤条件(WHERE 子句)
 
 `WHERE` 子句指定了对数据行的筛选条件,由一个 `whereCondition` 组成。
diff --git a/src/zh/UserGuide/dev-1.3/Basic-Concept/Query-Data.md 
b/src/zh/UserGuide/dev-1.3/Basic-Concept/Query-Data.md
index cc7895a9..04a053ea 100644
--- a/src/zh/UserGuide/dev-1.3/Basic-Concept/Query-Data.md
+++ b/src/zh/UserGuide/dev-1.3/Basic-Concept/Query-Data.md
@@ -613,7 +613,7 @@ select last <Path> [COMMA <Path>]* from < PrefixPath > 
[COMMA < PrefixPath >]* <
 
 其含义是: 查询时间序列 prefixPath.path 中最近时间戳的数据。
 
-- `whereClause` 中当前只支持时间过滤条件,任何其他过滤条件都将会返回异常。当缓存的最新点不满足过滤条件时,IoTDB 
需要从存储中获取结果,此时性能将会有所下降。
+- `whereClause` 中当前**只支持时间过滤条件**,任何其他过滤条件都将会返回异常。当缓存的最新点不满足过滤条件时,IoTDB 
需要从存储中获取结果,此时性能将会有所下降。
 
 - 结果集为四列的结构:
 
@@ -680,6 +680,20 @@ Total line number = 2
 It costs 0.002s
 ```
 
+**注意:** 可以通过函数组合方式实现其他过滤条件查询最新点的需求,例如
+
+```
+IoTDB> select max_time(*), last_value(*) from root.ln.wf01.wt01 where time >= 
2017-11-07T23:50:00 and status = false align by device
++-----------------+---------------------+----------------+-----------------------+------------------+
+|           
Device|max_time(temperature)|max_time(status)|last_value(temperature)|last_value(status)|
++-----------------+---------------------+----------------+-----------------------+------------------+
+|root.ln.wf01.wt01|        1510077540000|   1510077540000|              
21.067368|             false|
++-----------------+---------------------+----------------+-----------------------+------------------+
+Total line number = 1
+It costs 0.021s
+```
+
+
 ## 查询过滤条件(WHERE 子句)
 
 `WHERE` 子句指定了对数据行的筛选条件,由一个 `whereCondition` 组成。
diff --git a/src/zh/UserGuide/latest/Basic-Concept/Query-Data.md 
b/src/zh/UserGuide/latest/Basic-Concept/Query-Data.md
index b5085b32..ba97766b 100644
--- a/src/zh/UserGuide/latest/Basic-Concept/Query-Data.md
+++ b/src/zh/UserGuide/latest/Basic-Concept/Query-Data.md
@@ -680,6 +680,20 @@ Total line number = 2
 It costs 0.002s
 ```
 
+**注意:** 可以通过函数组合方式实现其他过滤条件查询最新点的需求,例如
+
+```
+IoTDB> select max_time(*), last_value(*) from root.ln.wf01.wt01 where time >= 
2017-11-07T23:50:00 and status = false align by device
++-----------------+---------------------+----------------+-----------------------+------------------+
+|           
Device|max_time(temperature)|max_time(status)|last_value(temperature)|last_value(status)|
++-----------------+---------------------+----------------+-----------------------+------------------+
+|root.ln.wf01.wt01|        1510077540000|   1510077540000|              
21.067368|             false|
++-----------------+---------------------+----------------+-----------------------+------------------+
+Total line number = 1
+It costs 0.021s
+```
+
+
 ## 3. 查询过滤条件(WHERE 子句)
 
 `WHERE` 子句指定了对数据行的筛选条件,由一个 `whereCondition` 组成。

Reply via email to