You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by hu...@apache.org on 2023/03/02 15:17:32 UTC
[iotdb] branch master updated: Update query user guide (#9205)
This is an automated email from the ASF dual-hosted git repository.
hui pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/master by this push:
new 10ef294d72 Update query user guide (#9205)
10ef294d72 is described below
commit 10ef294d724c9552e516c5503244ea2dedf3725f
Author: liuminghui233 <36...@users.noreply.github.com>
AuthorDate: Thu Mar 2 23:17:24 2023 +0800
Update query user guide (#9205)
---
docs/UserGuide/Query-Data/Pagination.md | 6 +++---
docs/UserGuide/Query-Data/Select-Into.md | 24 ++++++++++++------------
docs/zh/UserGuide/Query-Data/Pagination.md | 4 ++--
docs/zh/UserGuide/Query-Data/Select-Into.md | 26 +++++++++++++-------------
4 files changed, 30 insertions(+), 30 deletions(-)
diff --git a/docs/UserGuide/Query-Data/Pagination.md b/docs/UserGuide/Query-Data/Pagination.md
index 42ea36f621..ae265fb316 100644
--- a/docs/UserGuide/Query-Data/Pagination.md
+++ b/docs/UserGuide/Query-Data/Pagination.md
@@ -287,16 +287,16 @@ Total line number = 6
It costs 0.005s
```
-If the parameter N/SN of LIMIT/SLIMIT clause exceeds the allowable maximum value (N/SN is of type int32), the system prompts errors. For example, executing the following SQL statement:
+If the parameter N/SN of LIMIT/SLIMIT clause exceeds the allowable maximum value (N/SN is of type int64), the system prompts errors. For example, executing the following SQL statement:
```sql
-select status,temperature from root.ln.wf01.wt01 where time > 2017-11-01T00:05:00.000 and time < 2017-11-01T00:12:00.000 limit 1234567890123456789
+select status,temperature from root.ln.wf01.wt01 where time > 2017-11-01T00:05:00.000 and time < 2017-11-01T00:12:00.000 limit 9223372036854775808
```
The SQL statement will not be executed and the corresponding error prompt is given as follows:
```
-Msg: 416: Out of range. LIMIT <N>: N should be Int32.
+Msg: 416: Out of range. LIMIT <N>: N should be Int64.
```
If the parameter N/SN of LIMIT/SLIMIT clause is not a positive intege, the system prompts errors. For example, executing the following SQL statement:
diff --git a/docs/UserGuide/Query-Data/Select-Into.md b/docs/UserGuide/Query-Data/Select-Into.md
index da9005051c..a285afbb68 100644
--- a/docs/UserGuide/Query-Data/Select-Into.md
+++ b/docs/UserGuide/Query-Data/Select-Into.md
@@ -278,18 +278,18 @@ This statement specifies that `root.sg_copy.d1` is an unaligned device and `root
### Implement IoTDB internal ETL
ETL the original data and write a new time series.
```shell
-IOTDB > SELECT preprocess_udf(*) INTO ::(preprocessed_${3}) FROM root.sg.*;
-+-------------------------------+---------------------------+--------+
-| source column| target timeseries| written|
-+-------------------------------+---------------------------+--------+
-| preprocess_udf(root.sg.d1.s1)| root.sg.d1.preprocessed_s1| 8000|
-+-------------------------------+---------------------------+--------+
-| preprocess_udf(root.sg.d1.s2)| root.sg.d1.preprocessed_s1| 10000|
-+-------------------------------+---------------------------+--------+
-| preprocess_udf(root.sg.d2.s1)| root.sg.d2.preprocessed_s1| 11000|
-+-------------------------------+---------------------------+--------+
-| preprocess_udf(root.sg.d2.s2)| root.sg.d2.preprocessed_s1| 9000|
-+-------------------------------+---------------------------+--------+
+IOTDB > SELECT preprocess_udf(s1, s2) INTO ::(preprocessed_s1, preprocessed_s2) FROM root.sg.* ALIGN BY DEIVCE;
++--------------+-------------------+---------------------------+--------+
+| source device| source column| target timeseries| written|
++--------------+-------------------+---------------------------+--------+
+| root.sg.d1| preprocess_udf(s1)| root.sg.d1.preprocessed_s1| 8000|
++--------------+-------------------+---------------------------+--------+
+| root.sg.d1| preprocess_udf(s2)| root.sg.d1.preprocessed_s2| 10000|
++--------------+-------------------+---------------------------+--------+
+| root.sg.d2| preprocess_udf(s1)| root.sg.d2.preprocessed_s1| 11000|
++--------------+-------------------+---------------------------+--------+
+| root.sg.d2| preprocess_udf(s2)| root.sg.d2.preprocessed_s2| 9000|
++--------------+-------------------+---------------------------+--------+
```
### Query result storage
diff --git a/docs/zh/UserGuide/Query-Data/Pagination.md b/docs/zh/UserGuide/Query-Data/Pagination.md
index 489b3fade3..242bc6f33b 100644
--- a/docs/zh/UserGuide/Query-Data/Pagination.md
+++ b/docs/zh/UserGuide/Query-Data/Pagination.md
@@ -33,7 +33,7 @@
注意:
- 当 `rowOffset` 超过结果集的大小时,返回空结果集。
- 当 `rowLimit` 超过结果集的大小时,返回所有查询结果。
-- 当 `rowLimit` 和 `rowOffset` 不是正整数,或超过 `INT32` 允许的最大值时,系统将提示错误。
+- 当 `rowLimit` 和 `rowOffset` 不是正整数,或超过 `INT64` 允许的最大值时,系统将提示错误。
我们将通过以下示例演示如何使用 `LIMIT` 和 `OFFSET` 子句。
@@ -161,7 +161,7 @@ It costs 0.016s
- 仅用于控制值列,对时间列和设备列无效。
- 当 `seriesOffset` 超过结果集的大小时,返回空结果集。
- 当 `seriesLimit` 超过结果集的大小时,返回所有查询结果。
-- 当 `seriesLimit` 和 `seriesOffset` 不是正整数,或超过 `INT32` 允许的最大值时,系统将提示错误。
+- 当 `seriesLimit` 和 `seriesOffset` 不是正整数,或超过 `INT64` 允许的最大值时,系统将提示错误。
我们将通过以下示例演示如何使用 `SLIMIT` 和 `SOFFSET` 子句。
diff --git a/docs/zh/UserGuide/Query-Data/Select-Into.md b/docs/zh/UserGuide/Query-Data/Select-Into.md
index 4a9a22a592..15869ef74a 100644
--- a/docs/zh/UserGuide/Query-Data/Select-Into.md
+++ b/docs/zh/UserGuide/Query-Data/Select-Into.md
@@ -275,22 +275,22 @@ select s1, s2 into root.sg_copy.d1(t1, t2), aligned root.sg_copy.d2(t1, t2) from
- 当查询的序列不存在或查询的序列不存在数据,则不会自动创建目标序列。
### 应用举例
-
+
#### 实现 IoTDB 内部 ETL
对原始数据进行 ETL 处理后写入新序列。
```shell
-IOTDB > SELECT preprocess_udf(*) INTO ::(preprocessed_${3}) FROM root.sg.*;
-+-------------------------------+---------------------------+--------+
-| source column| target timeseries| written|
-+-------------------------------+---------------------------+--------+
-| preprocess_udf(root.sg.d1.s1)| root.sg.d1.preprocessed_s1| 8000|
-+-------------------------------+---------------------------+--------+
-| preprocess_udf(root.sg.d1.s2)| root.sg.d1.preprocessed_s1| 10000|
-+-------------------------------+---------------------------+--------+
-| preprocess_udf(root.sg.d2.s1)| root.sg.d2.preprocessed_s1| 11000|
-+-------------------------------+---------------------------+--------+
-| preprocess_udf(root.sg.d2.s2)| root.sg.d2.preprocessed_s1| 9000|
-+-------------------------------+---------------------------+--------+
+IOTDB > SELECT preprocess_udf(s1, s2) INTO ::(preprocessed_s1, preprocessed_s2) FROM root.sg.* ALIGN BY DEIVCE;
++--------------+-------------------+---------------------------+--------+
+| source device| source column| target timeseries| written|
++--------------+-------------------+---------------------------+--------+
+| root.sg.d1| preprocess_udf(s1)| root.sg.d1.preprocessed_s1| 8000|
++--------------+-------------------+---------------------------+--------+
+| root.sg.d1| preprocess_udf(s2)| root.sg.d1.preprocessed_s2| 10000|
++--------------+-------------------+---------------------------+--------+
+| root.sg.d2| preprocess_udf(s1)| root.sg.d2.preprocessed_s1| 11000|
++--------------+-------------------+---------------------------+--------+
+| root.sg.d2| preprocess_udf(s2)| root.sg.d2.preprocessed_s2| 9000|
++--------------+-------------------+---------------------------+--------+
```
以上语句使用自定义函数对数据进行预处理,将预处理后的结果持久化存储到新序列中。