Skip to content

Commit 68ab97a

Browse files
authored
Directory structure adjustment (#435)
1 parent 4f38d8f commit 68ab97a

File tree

16 files changed

+116
-275
lines changed

16 files changed

+116
-275
lines changed

src/.vuepress/sidebar/V1.3.x/en.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ export const enSidebar = {
212212
text: 'Syntax-Rule',
213213
collapsible: true,
214214
children: [
215-
{ text: 'Reserved Words&Identifiers', link: 'Syntax-Rule' },
215+
{ text: 'Identifiers', link: 'Syntax-Rule' },
216216
{ text: 'Keywords', link: 'Keywords' },
217217
],
218218
},

src/.vuepress/sidebar/V1.3.x/zh.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,14 +205,14 @@ export const zhSidebar = {
205205
collapsible: true,
206206
children: [
207207
{ text: 'UDF函数库', link: 'UDF-Libraries_apache' },
208-
{ text: '函数和操作符', link: 'Operator-and-Expression' },
208+
{ text: '函数与运算符', link: 'Operator-and-Expression' },
209209
],
210210
},
211211
{
212212
text: '语法约定',
213213
collapsible: true,
214214
children: [
215-
{ text: '保留字&标识符', link: 'Syntax-Rule' },
215+
{ text: '标识符', link: 'Syntax-Rule' },
216216
{ text: '关键字', link: 'Keywords' },
217217
],
218218
},

src/.vuepress/sidebar_timecho/V1.3.x/en.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ export const enSidebar = {
225225
text: 'Syntax-Rule',
226226
collapsible: true,
227227
children: [
228-
{ text: 'Reserved Words&Identifiers', link: 'Syntax-Rule' },
228+
{ text: 'Identifiers', link: 'Syntax-Rule' },
229229
{ text: 'Keywords', link: 'Keywords' },
230230
],
231231
},

src/.vuepress/sidebar_timecho/V1.3.x/zh.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,14 +218,14 @@ export const zhSidebar = {
218218
collapsible: true,
219219
children: [
220220
{ text: 'UDF函数库', link: 'UDF-Libraries_timecho' },
221-
{ text: '函数和操作符', link: 'Operator-and-Expression' },
221+
{ text: '函数与运算符', link: 'Operator-and-Expression' },
222222
],
223223
},
224224
{
225225
text: '语法约定',
226226
collapsible: true,
227227
children: [
228-
{ text: '保留字&标识符', link: 'Syntax-Rule' },
228+
{ text: '标识符', link: 'Syntax-Rule' },
229229
{ text: '关键字', link: 'Keywords' },
230230
],
231231
},

src/UserGuide/Master/Tree/Reference/Operator-and-Expression.md

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -252,31 +252,6 @@ For details and examples, see the document [Sample Functions](../Reference/Funct
252252

253253
For details and examples, see the document [Time-Series](../Reference/Function-and-Expression.md#time-series-processing).
254254

255-
## DATA QUALITY FUNCTION LIBRARY
256-
257-
### About
258-
259-
For applications based on time series data, data quality is vital. **UDF Library** is IoTDB User Defined Functions (UDF) about data quality, including data profiling, data quality evalution and data repairing. It effectively meets the demand for data quality in the industrial field.
260-
261-
### Quick Start
262-
263-
The functions in this function library are not built-in functions, and must be loaded into the system before use.
264-
265-
1. [Download](https://archive.apache.org/dist/iotdb/1.0.1/apache-iotdb-1.0.1-library-udf-bin.zip) the JAR with all dependencies and the script of registering UDF.
266-
2. Copy the JAR package to `ext\udf` under the directory of IoTDB system (Please put JAR to this directory of all DataNodes if you use Cluster).
267-
3. Run `sbin\start-confignode.bat` and then `sbin\start-datanode.bat` (for Windows) or `sbin\start-confignode.sh` and `sbin\start-datanode.sh` (for Linux or MacOS) to start IoTDB server.
268-
4. Copy the script to the directory of IoTDB system (under the root directory, at the same level as `sbin`), modify the parameters in the script if needed and run it to register UDF.
269-
270-
### Implemented Functions
271-
272-
1. Data Quality related functions, such as `Completeness`. For details and examples, see the document [Data-Quality](../Reference/UDF-Libraries.md#data-quality).
273-
2. Data Profiling related functions, such as `ACF`. For details and examples, see the document [Data-Profiling](../Reference/UDF-Libraries.md#data-profiling).
274-
3. Anomaly Detection related functions, such as `IQR`. For details and examples, see the document [Anomaly-Detection](../Reference/UDF-Libraries.md#anomaly-detection).
275-
4. Frequency Domain Analysis related functions, such as `Conv`. For details and examples, see the document [Frequency-Domain](../Reference/UDF-Libraries.md#frequency-domain-analysis).
276-
5. Data Matching related functions, such as `DTW`. For details and examples, see the document [Data-Matching](../Reference/UDF-Libraries.md#data-matching).
277-
6. Data Repairing related functions, such as `TimestampRepair`. For details and examples, see the document [Data-Repairing](../Reference/UDF-Libraries.md#timestamprepair).
278-
7. Series Discovery related functions, such as `ConsecutiveSequences`. For details and examples, see the document [Series-Discovery](../Reference/UDF-Libraries.md).
279-
8. Machine Learning related functions, such as `AR`. For details and examples, see the document [Machine-Learning](../Reference/UDF-Libraries.md#machine-learning).
280255

281256
## LAMBDA EXPRESSION
282257

src/UserGuide/Master/Tree/User-Manual/Syntax-Rule.md renamed to src/UserGuide/Master/Tree/Reference/Syntax-Rule.md

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
2020
-->
2121

22-
# Syntax Rule
22+
# Identifiers
2323

2424
## Literal Values
2525

@@ -278,16 +278,3 @@ Examples of case in which quoted identifier is used :
278278

279279
- Nodes except database in the path are allowed to contain the "*" symbol, when using this symbol it is required to enclose the node in backquotes, e.g., root.db.`*`, but this usage is only recommended when the path cannot avoid containing the "*" symbol.
280280

281-
## KeyWords Words
282-
283-
Keywords are words that have significance in SQL. Keywords can be used as an identifier. Certain keywords, such as TIME/TIMESTAMP and ROOT, are reserved and cannot use as identifiers.
284-
285-
[Keywords](../Reference/Keywords.md) shows the keywords in IoTDB.
286-
287-
## Detailed Definitions of Lexical and Grammar
288-
289-
Please read the lexical and grammar description files in our code repository:
290-
291-
Lexical file: `antlr/src/main/antlr4/org/apache/iotdb/db/qp/sql/IoTDBSqlLexer.g4`
292-
293-
Grammer file: `antlr/src/main/antlr4/org/apache/iotdb/db/qp/sql/IoTDBSqlParser.g4`

src/UserGuide/Master/Tree/User-Manual/Database-Programming.md

Lines changed: 26 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,16 @@
1919
2020
-->
2121

22-
# Database Programming
22+
# CONTINUOUS QUERY(CQ)
2323

24-
## CONTINUOUS QUERY (CQ)
2524

26-
### Introduction
25+
## Introduction
2726

2827
Continuous queries(CQ) are queries that run automatically and periodically on realtime data and store query results in other specified time series.
2928

3029
Users can implement sliding window streaming computing through continuous query, such as calculating the hourly average temperature of a sequence and writing it into a new sequence. Users can customize the `RESAMPLE` clause to create different sliding windows, which can achieve a certain degree of tolerance for out-of-order data.
3130

32-
### Syntax
31+
## Syntax
3332

3433
```sql
3534
CREATE (CONTINUOUS QUERY | CQ) <cq_id>
@@ -58,7 +57,7 @@ END
5857
> 2. GROUP BY TIME CLAUSE is different, it doesn't contain its original first display window parameter which is [start_time, end_time). It's still because IoTDB will automatically generate a time range for the query each time it's executed.
5958
> 3. If there is no group by time clause in query, EVERY clause is required, otherwise IoTDB will throw an error.
6059
61-
#### Descriptions of parameters in CQ syntax
60+
### Descriptions of parameters in CQ syntax
6261

6362
- `<cq_id>` specifies the globally unique id of CQ.
6463
- `<every_interval>` specifies the query execution time interval. We currently support the units of ns, us, ms, s, m, h, d, w, and its value should not be lower than the minimum threshold configured by the user, which is `continuous_query_min_every_interval`. It's an optional parameter, default value is set to `group_by_interval` in group by clause.
@@ -80,19 +79,19 @@ END
8079
> - If `<start_time_offset>` is less than `<every_interval>`, there may be uncovered data between each query window.
8180
> - `start_time_offset` should be larger than `end_time_offset`, otherwise the system will throw an error.
8281
83-
##### `<start_time_offset>` == `<every_interval>`
82+
#### `<start_time_offset>` == `<every_interval>`
8483

8584
![1](https://alioss.timecho.com/docs/img/UserGuide/Process-Data/Continuous-Query/pic1.png?raw=true)
8685

87-
##### `<start_time_offset>` > `<every_interval>`
86+
#### `<start_time_offset>` > `<every_interval>`
8887

8988
![2](https://alioss.timecho.com/docs/img/UserGuide/Process-Data/Continuous-Query/pic2.png?raw=true)
9089

91-
##### `<start_time_offset>` < `<every_interval>`
90+
#### `<start_time_offset>` < `<every_interval>`
9291

9392
![3](https://alioss.timecho.com/docs/img/UserGuide/Process-Data/Continuous-Query/pic3.png?raw=true)
9493

95-
##### `<every_interval>` is not zero
94+
#### `<every_interval>` is not zero
9695

9796
![](https://alioss.timecho.com/docs/img/UserGuide/Process-Data/Continuous-Query/pic4.png?raw=true)
9897

@@ -102,7 +101,7 @@ END
102101
- `DISCARD` means that we just discard the current cq execution task and wait for the next execution time and do the next time interval cq task. If using `DISCARD` policy, some time intervals won't be executed when the execution time of one cq task is longer than the `<every_interval>`. However, once a cq task is executed, it will use the latest time interval, so it can catch up at the sacrifice of some time intervals being discarded.
103102

104103

105-
### Examples of CQ
104+
## Examples of CQ
106105

107106
The examples below use the following sample data. It's a real time data stream and we can assume that the data arrives on time.
108107

@@ -122,7 +121,7 @@ The examples below use the following sample data. It's a real time data stream a
122121
+-----------------------------+-----------------------------+-----------------------------+-----------------------------+-----------------------------+
123122
````
124123

125-
#### Configuring execution intervals
124+
### Configuring execution intervals
126125

127126
Use an `EVERY` interval in the `RESAMPLE` clause to specify the CQ’s execution interval, if not specific, default value is equal to `group_by_interval`.
128127

@@ -180,7 +179,7 @@ At **2021-05-11T22:19:00.000+08:00**, `cq1` executes a query within the time ran
180179
+-----------------------------+---------------------------------+---------------------------------+---------------------------------+---------------------------------+
181180
````
182181

183-
#### Configuring time range for resampling
182+
### Configuring time range for resampling
184183

185184
Use `start_time_offset` in the `RANGE` clause to specify the start time of the CQ’s time range, if not specific, default value is equal to `EVERY` interval.
186185

@@ -255,7 +254,7 @@ At **2021-05-11T22:19:00.000+08:00**, `cq2` executes a query within the time ran
255254
+-----------------------------+---------------------------------+---------------------------------+---------------------------------+---------------------------------+
256255
````
257256

258-
#### Configuring execution intervals and CQ time ranges
257+
### Configuring execution intervals and CQ time ranges
259258

260259
Use an `EVERY` interval and `RANGE` interval in the `RESAMPLE` clause to specify the CQ’s execution interval and the length of the CQ’s time range. And use `fill()` to change the value reported for time intervals with no data.
261260

@@ -320,7 +319,7 @@ Notice that `cq3` will calculate the results for some time interval many times,
320319
+-----------------------------+---------------------------------+---------------------------------+---------------------------------+---------------------------------+
321320
````
322321

323-
#### Configuring end_time_offset for CQ time range
322+
### Configuring end_time_offset for CQ time range
324323

325324
Use an `EVERY` interval and `RANGE` interval in the RESAMPLE clause to specify the CQ’s execution interval and the length of the CQ’s time range. And use `fill()` to change the value reported for time intervals with no data.
326325

@@ -379,7 +378,7 @@ Notice that `cq4` will calculate the results for all time intervals only once af
379378
+-----------------------------+---------------------------------+---------------------------------+---------------------------------+---------------------------------+
380379
````
381380

382-
#### CQ without group by clause
381+
### CQ without group by clause
383382

384383
Use an `EVERY` interval in the `RESAMPLE` clause to specify the CQ’s execution interval and the length of the CQ’s time range.
385384

@@ -485,9 +484,9 @@ At **2021-05-11T22:19:00.000+08:00**, `cq5` executes a query within the time ran
485484
+-----------------------------+-------------------------------+-----------+
486485
````
487486

488-
### CQ Management
487+
## CQ Management
489488

490-
#### Listing continuous queries
489+
### Listing continuous queries
491490

492491
List every CQ on the IoTDB Cluster with:
493492

@@ -497,7 +496,7 @@ SHOW (CONTINUOUS QUERIES | CQS)
497496

498497
`SHOW (CONTINUOUS QUERIES | CQS)` order results by `cq_id`.
499498

500-
##### Examples
499+
#### Examples
501500

502501
```sql
503502
SHOW CONTINUOUS QUERIES;
@@ -510,7 +509,7 @@ we will get:
510509
| s1_count_cq | CREATE CQ s1_count_cq<br/>BEGIN<br/>SELECT count(s1)<br/>INTO root.sg_count.d.count_s1<br/>FROM root.sg.d<br/>GROUP BY(30m)<br/>END | active |
511510

512511

513-
#### Dropping continuous queries
512+
### Dropping continuous queries
514513

515514
Drop a CQ with a specific `cq_id`:
516515

@@ -520,36 +519,36 @@ DROP (CONTINUOUS QUERY | CQ) <cq_id>
520519

521520
DROP CQ returns an empty result.
522521

523-
##### Examples
522+
#### Examples
524523

525524
Drop the CQ named `s1_count_cq`:
526525

527526
```sql
528527
DROP CONTINUOUS QUERY s1_count_cq;
529528
```
530529

531-
#### Altering continuous queries
530+
### Altering continuous queries
532531

533532
CQs can't be altered once they're created. To change a CQ, you must `DROP` and re`CREATE` it with the updated settings.
534533

535534

536-
### CQ Use Cases
535+
## CQ Use Cases
537536

538-
#### Downsampling and Data Retention
537+
### Downsampling and Data Retention
539538

540539
Use CQs with `TTL` set on database in IoTDB to mitigate storage concerns. Combine CQs and `TTL` to automatically downsample high precision data to a lower precision and remove the dispensable, high precision data from the database.
541540

542-
#### Recalculating expensive queries
541+
### Recalculating expensive queries
543542

544543
Shorten query runtimes by pre-calculating expensive queries with CQs. Use a CQ to automatically downsample commonly-queried, high precision data to a lower precision. Queries on lower precision data require fewer resources and return faster.
545544

546545
> Pre-calculate queries for your preferred graphing tool to accelerate the population of graphs and dashboards.
547546
548-
#### Substituting for sub-query
547+
### Substituting for sub-query
549548

550549
IoTDB does not support sub queries. We can get the same functionality by creating a CQ as a sub query and store its result into other time series and then querying from those time series again will be like doing nested sub query.
551550

552-
##### Example
551+
#### Example
553552

554553
IoTDB does not accept the following query with a nested sub query. The query calculates the average number of non-null values of `s1` at 30 minute intervals:
555554

@@ -584,7 +583,7 @@ SELECT avg(count_s1) from root.sg_count.d;
584583
```
585584

586585

587-
### System Parameter Configuration
586+
## System Parameter Configuration
588587

589588
| Name | Description | Data Type | Default Value |
590589
| :------------------------------------------ | ------------------------------------------------------------ | --------- | ------------- |

src/UserGuide/latest/Reference/Operator-and-Expression.md

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -252,31 +252,6 @@ For details and examples, see the document [Sample Functions](../Reference/Funct
252252

253253
For details and examples, see the document [Time-Series](../Reference/Function-and-Expression.md#time-series-processing).
254254

255-
## DATA QUALITY FUNCTION LIBRARY
256-
257-
### About
258-
259-
For applications based on time series data, data quality is vital. **UDF Library** is IoTDB User Defined Functions (UDF) about data quality, including data profiling, data quality evalution and data repairing. It effectively meets the demand for data quality in the industrial field.
260-
261-
### Quick Start
262-
263-
The functions in this function library are not built-in functions, and must be loaded into the system before use.
264-
265-
1. [Download](https://archive.apache.org/dist/iotdb/1.0.1/apache-iotdb-1.0.1-library-udf-bin.zip) the JAR with all dependencies and the script of registering UDF.
266-
2. Copy the JAR package to `ext\udf` under the directory of IoTDB system (Please put JAR to this directory of all DataNodes if you use Cluster).
267-
3. Run `sbin\start-confignode.bat` and then `sbin\start-datanode.bat` (for Windows) or `sbin\start-confignode.sh` and `sbin\start-datanode.sh` (for Linux or MacOS) to start IoTDB server.
268-
4. Copy the script to the directory of IoTDB system (under the root directory, at the same level as `sbin`), modify the parameters in the script if needed and run it to register UDF.
269-
270-
### Implemented Functions
271-
272-
1. Data Quality related functions, such as `Completeness`. For details and examples, see the document [Data-Quality](../Reference/UDF-Libraries.md#data-quality).
273-
2. Data Profiling related functions, such as `ACF`. For details and examples, see the document [Data-Profiling](../Reference/UDF-Libraries.md#data-profiling).
274-
3. Anomaly Detection related functions, such as `IQR`. For details and examples, see the document [Anomaly-Detection](../Reference/UDF-Libraries.md#anomaly-detection).
275-
4. Frequency Domain Analysis related functions, such as `Conv`. For details and examples, see the document [Frequency-Domain](../Reference/UDF-Libraries.md#frequency-domain-analysis).
276-
5. Data Matching related functions, such as `DTW`. For details and examples, see the document [Data-Matching](../Reference/UDF-Libraries.md#data-matching).
277-
6. Data Repairing related functions, such as `TimestampRepair`. For details and examples, see the document [Data-Repairing](../Reference/UDF-Libraries.md#timestamprepair).
278-
7. Series Discovery related functions, such as `ConsecutiveSequences`. For details and examples, see the document [Series-Discovery](../Reference/UDF-Libraries.md).
279-
8. Machine Learning related functions, such as `AR`. For details and examples, see the document [Machine-Learning](../Reference/UDF-Libraries.md#machine-learning).
280255

281256
## LAMBDA EXPRESSION
282257

src/UserGuide/latest/User-Manual/Syntax-Rule.md renamed to src/UserGuide/latest/Reference/Syntax-Rule.md

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
2020
-->
2121

22-
# Syntax Rule
22+
# Identifiers
2323

2424
## Literal Values
2525

@@ -277,17 +277,3 @@ Examples of case in which quoted identifier is used :
277277
- The key/value of an attribute can be String Literal and identifier, more details can be found at **key-value pair** part.
278278

279279
- Nodes except database in the path are allowed to contain the "*" symbol, when using this symbol it is required to enclose the node in backquotes, e.g., root.db.`*`, but this usage is only recommended when the path cannot avoid containing the "*" symbol.
280-
281-
## KeyWords Words
282-
283-
Keywords are words that have significance in SQL. Keywords can be used as an identifier. Certain keywords, such as TIME/TIMESTAMP and ROOT, are reserved and cannot use as identifiers.
284-
285-
[Keywords](../Reference/Keywords.md) shows the keywords in IoTDB.
286-
287-
## Detailed Definitions of Lexical and Grammar
288-
289-
Please read the lexical and grammar description files in our code repository:
290-
291-
Lexical file: `antlr/src/main/antlr4/org/apache/iotdb/db/qp/sql/IoTDBSqlLexer.g4`
292-
293-
Grammer file: `antlr/src/main/antlr4/org/apache/iotdb/db/qp/sql/IoTDBSqlParser.g4`

0 commit comments

Comments
 (0)