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 2022/11/02 02:55:36 UTC

[iotdb] branch master updated: init (#7863)

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/iotdb.git


The following commit(s) were added to refs/heads/master by this push:
     new ff5b62f113 init (#7863)
ff5b62f113 is described below

commit ff5b62f113580b3efdd89021ab840e943f344ec0
Author: Liao Lanyu <14...@qq.com>
AuthorDate: Wed Nov 2 10:55:29 2022 +0800

    init (#7863)
---
 docs/UserGuide/Alert/Triggers.md                           |  8 ++++----
 docs/UserGuide/Process-Data/UDF-User-Defined-Function.md   | 14 +++-----------
 docs/zh/UserGuide/Alert/Triggers.md                        |  4 ++--
 .../zh/UserGuide/Process-Data/UDF-User-Defined-Function.md | 12 ++++--------
 4 files changed, 13 insertions(+), 25 deletions(-)

diff --git a/docs/UserGuide/Alert/Triggers.md b/docs/UserGuide/Alert/Triggers.md
index bcd8c9a9c9..bc0cfc354f 100644
--- a/docs/UserGuide/Alert/Triggers.md
+++ b/docs/UserGuide/Alert/Triggers.md
@@ -343,7 +343,7 @@ The complete SQL syntax is as follows:
 ```sql
 // Create Trigger
 createTrigger
-    : CREATE triggerType TRIGGER triggerName=identifier triggerEventClause ON prefixPath AS className=STRING_LITERAL jarLocation triggerAttributeClause?
+    : CREATE triggerType TRIGGER triggerName=identifier triggerEventClause ON pathPattern AS className=STRING_LITERAL uriClause? triggerAttributeClause?
     ;
 
 triggerType
@@ -355,11 +355,11 @@ triggerEventClause
     ;
         
 uriClause
-: USING URI uri
+    : USING URI uri
     ;
 
 uri
-: STRING_LITERAL
+    : STRING_LITERAL
     ;
     
 triggerAttributeClause
@@ -376,7 +376,7 @@ Below is the explanation for the SQL syntax:
 - triggerName: The trigger ID, which is globally unique and used to distinguish different triggers, is case-sensitive.
 - triggerType: Trigger types are divided into two categories, STATELESS and STATEFUL.
 - triggerEventClause: when the trigger fires, BEFORE INSERT and AFTER INSERT are supported now.
-- prefixPath:The path pattern the trigger listens on, can contain wildcards * and **.
+- pathPattern:The path pattern the trigger listens on, can contain wildcards * and **.
 - className:The class name of the Trigger class.
 - jarLocation: Optional. When this option is not specified, by default, we consider that the DBA has placed the JAR package required to create the trigger in the trigger_root_dir directory (configuration item, default is IOTDB_HOME/ext/trigger) of each DataNode node. When this option is specified, we will download and distribute the file resource corresponding to the URI to the trigger_root_dir/install directory of each DataNode.
 - triggerAttributeClause: It is used to specify the parameters that need to be set when the trigger instance is created. This part is optional in the SQL syntax.
diff --git a/docs/UserGuide/Process-Data/UDF-User-Defined-Function.md b/docs/UserGuide/Process-Data/UDF-User-Defined-Function.md
index 00ab5ac16c..82a3cab44b 100644
--- a/docs/UserGuide/Process-Data/UDF-User-Defined-Function.md
+++ b/docs/UserGuide/Process-Data/UDF-User-Defined-Function.md
@@ -459,18 +459,10 @@ The usage of UDF is similar to that of built-in aggregation functions.
 
 * Support `SLIMIT` / `SOFFSET`
 * Support `LIMIT` / `OFFSET`
-* Support `NON ALIGN`
 * Support queries with time filters
 * Support queries with value filters
 
 
-
-### Queries with Aligned Timeseries 
-
-Aligned Timeseries has not been supported in UDF queries yet. An error message is expected if you use UDF functions with Aligned Timeseries selected.
-
-
-
 ### Queries with * in SELECT Clauses
 
 Assume that there are 2 time series (`root.sg.d1.s1` and `root.sg.d1.s2`)  in the system.
@@ -567,8 +559,8 @@ This part mainly introduces how external users can contribute their own UDFs to
 
 #### UDF Source Code
 
-1. Create the UDF main class and related classes in `src/main/java/org/apache/iotdb/db/query/udf/builtin` or in its subfolders.
-2. Register your UDF in `src/main/java/org/apache/iotdb/db/query/udf/builtin/BuiltinFunction.java`.
+1. Create the UDF main class and related classes in `node-commons/src/main/java/org/apache/iotdb/commons/udf/builtin` or in its subfolders.
+2. Register your UDF in `node-commons/src/main/java/org/apache/iotdb/commons/udf/builtin/BuiltinTimeSeriesGeneratingFunction.java`.
 
 
 
@@ -576,7 +568,7 @@ This part mainly introduces how external users can contribute their own UDFs to
 
 At a minimum, you need to write integration tests for the UDF.
 
-You can add a test class in `server/src/test/java/org/apache/iotdb/db/integration`. 
+You can add a test class in `integration-test/src/test/java/org/apache/iotdb/db/it/udf`. 
 
 
 
diff --git a/docs/zh/UserGuide/Alert/Triggers.md b/docs/zh/UserGuide/Alert/Triggers.md
index bbf17329ec..29bbb6d168 100644
--- a/docs/zh/UserGuide/Alert/Triggers.md
+++ b/docs/zh/UserGuide/Alert/Triggers.md
@@ -334,7 +334,7 @@ public class ClusterAlertingExample implements Trigger {
 ```sql
 // Create Trigger
 createTrigger
-    : CREATE triggerType TRIGGER triggerName=identifier triggerEventClause ON prefixPath AS className=STRING_LITERAL uriClause? triggerAttributeClause?
+    : CREATE triggerType TRIGGER triggerName=identifier triggerEventClause ON pathPattern AS className=STRING_LITERAL uriClause? triggerAttributeClause?
     ;
 
 triggerType
@@ -366,7 +366,7 @@ triggerAttribute
 - triggerName:触发器 ID,该 ID 是全局唯一的,用于区分不同触发器,大小写敏感。
 - triggerType:触发器类型,分为无状态(STATELESS)和有状态(STATEFUL)两类。
 - triggerEventClause:触发时机,目前仅支持写入前(BEFORE INSERT)和写入后(AFTER INSERT)两种。
-- prefixPath:触发器侦听的路径模式,可以包含通配符 * 和 **。
+- pathPattern:触发器侦听的路径模式,可以包含通配符 * 和 **。
 - className:触发器实现类的类名。
 - uriClause:可选项,当不指定该选项时,我们默认 DBA 已经在各个 DataNode 节点的 trigger_root_dir 目录(配置项,默认为 IOTDB_HOME/ext/trigger)下放置好创建该触发器需要的 JAR 包。当指定该选项时,我们会将该 URI 对应的文件资源下载并分发到各 DataNode 的 trigger_root_dir/install 目录下。
 - triggerAttributeClause:用于指定触发器实例创建时需要设置的参数,SQL 语法中该部分是可选项。
diff --git a/docs/zh/UserGuide/Process-Data/UDF-User-Defined-Function.md b/docs/zh/UserGuide/Process-Data/UDF-User-Defined-Function.md
index d68e5eb907..af305c9015 100644
--- a/docs/zh/UserGuide/Process-Data/UDF-User-Defined-Function.md
+++ b/docs/zh/UserGuide/Process-Data/UDF-User-Defined-Function.md
@@ -360,7 +360,7 @@ UDTF 的结束方法,您可以在此方法中进行一些资源释放等的操
 
 ## 完整 Maven 项目示例
 
-如果您使用 [Maven](http://search.maven.org/),可以参考我们编写的示例项目** udf-example**。您可以在 [这里](https://github.com/apache/iotdb/tree/master/example/udf) 找到它。
+如果您使用 [Maven](http://search.maven.org/),可以参考我们编写的示例项目**udf-example**。您可以在 [这里](https://github.com/apache/iotdb/tree/master/example/udf) 找到它。
 
 ## UDF 注册
 
@@ -416,13 +416,9 @@ UDF 的使用方法与普通内建函数的类似。
 
 * `SLIMIT` / `SOFFSET`
 * `LIMIT` / `OFFSET`
-* `NON ALIGN`
 * 支持值过滤
 * 支持时间过滤
 
-### 对齐时间序列查询
-
-UDF 查询目前不支持对对齐时间序列(Aligned Timeseries)进行查询,当您在`SELECT`子句中选择的序列中包含对齐时间序列时,会提示错误。
 
 ### 带 * 查询
 
@@ -502,14 +498,14 @@ SHOW FUNCTIONS
 
 #### 源代码
 
-1. 在`src/main/java/org/apache/iotdb/db/query/udf/builtin`或者它的子文件夹中创建 UDF 主类和相关的辅助类。
-2. 在`src/main/java/org/apache/iotdb/db/query/udf/builtin/BuiltinFunction.java`中注册您编写的 UDF。
+1. 在`node-commons/src/main/java/org/apache/iotdb/commons/udf/builtin`中创建 UDF 主类和相关的辅助类。
+2. 在`node-commons/src/main/java/org/apache/iotdb/commons/udf/builtin/BuiltinTimeSeriesGeneratingFunction.java`中注册您编写的 UDF。
 
 #### 测试用例
 
 您至少需要为您贡献的 UDF 编写集成测试。
 
-您可以在`server/src/test/java/org/apache/iotdb/db/integration`中为您贡献的 UDF 新增一个测试类进行测试。
+您可以在`integration-test/src/test/java/org/apache/iotdb/db/it/udf`中为您贡献的 UDF 新增一个测试类进行测试。
 
 #### 使用说明