diff --git a/CMakeLists.txt b/CMakeLists.txt index 0436f5b25923927edaa7568ba57c7b948446f8b1..8fe6cc69e05e47b9d9ecfd1b8534d215f597e033 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.16) +cmake_minimum_required(VERSION 3.0) project( TDengine diff --git a/cmake/cmake.define b/cmake/cmake.define index a8bab17aba8a412099b34c6d82c9787468bc89e8..5637c666b99294a536288741948877450cdb9eb5 100644 --- a/cmake/cmake.define +++ b/cmake/cmake.define @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.16) +cmake_minimum_required(VERSION 3.0) set(CMAKE_VERBOSE_MAKEFILE OFF) diff --git a/cmake/cmake.platform b/cmake/cmake.platform index 0312f92a5b4116cad03d4bb9c2e7556d7a35deb2..acf17e9427bc453e1ece67cca5cbfe45f8827337 100644 --- a/cmake/cmake.platform +++ b/cmake/cmake.platform @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.16) +cmake_minimum_required(VERSION 3.0) MESSAGE("Current system is ${CMAKE_SYSTEM_NAME}") diff --git a/docs-cn/12-taos-sql/01-data-type.md b/docs-cn/12-taos-sql/01-data-type.md index be5c9a8cb4ed7f4ed9f9c7e11faf1b0f8f6e51b8..8ac6ee3b872bd31f616ea0aea3fd4a093abb4402 100644 --- a/docs-cn/12-taos-sql/01-data-type.md +++ b/docs-cn/12-taos-sql/01-data-type.md @@ -4,6 +4,8 @@ title: 支持的数据类型 description: "TDengine 支持的数据类型: 时间戳、浮点型、JSON 类型等" --- +## 时间戳 + 使用 TDengine,最重要的是时间戳。创建并插入记录、查询历史记录的时候,均需要指定时间戳。时间戳有如下规则: - 时间格式为 `YYYY-MM-DD HH:mm:ss.MS`,默认时间分辨率为毫秒。比如:`2017-08-12 18:25:58.128` @@ -12,39 +14,59 @@ description: "TDengine 支持的数据类型: 时间戳、浮点型、JSON 类 - Epoch Time:时间戳也可以是一个长整数,表示从格林威治时间 1970-01-01 00:00:00.000 (UTC/GMT) 开始的毫秒数(相应地,如果所在 Database 的时间精度设置为“微秒”,则长整型格式的时间戳含义也就对应于从格林威治时间 1970-01-01 00:00:00.000 (UTC/GMT) 开始的微秒数;纳秒精度逻辑类似。) - 时间可以加减,比如 now-2h,表明查询时刻向前推 2 个小时(最近 2 小时)。数字后面的时间单位可以是 b(纳秒)、u(微秒)、a(毫秒)、s(秒)、m(分)、h(小时)、d(天)、w(周)。 比如 `select * from t1 where ts > now-2w and ts <= now-1w`,表示查询两周前整整一周的数据。在指定降采样操作(down sampling)的时间窗口(interval)时,时间单位还可以使用 n (自然月) 和 y (自然年)。 -TDengine 缺省的时间戳精度是毫秒,但通过在 `CREATE DATABASE` 时传递的 PRECISION 参数也可以支持微秒和纳秒。(从 2.1.5.0 版本开始支持纳秒精度) +TDengine 缺省的时间戳精度是毫秒,但通过在 `CREATE DATABASE` 时传递的 PRECISION 参数也可以支持微秒和纳秒。 ```sql CREATE DATABASE db_name PRECISION 'ns'; ``` +## 数据类型 -在 TDengine 中,普通表的数据模型中可使用以下 10 种数据类型。 +在 TDengine 中,普通表的数据模型中可使用以下数据类型。 | # | **类型** | **Bytes** | **说明** | | --- | :-------: | --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| 1 | TIMESTAMP | 8 | 时间戳。缺省精度毫秒,可支持微秒和纳秒。从格林威治时间 1970-01-01 00:00:00.000 (UTC/GMT) 开始,计时不能早于该时间。(从 2.0.18.0 版本开始,已经去除了这一时间范围限制)(从 2.1.5.0 版本开始支持纳秒精度) | -| 2 | INT | 4 | 整型,范围 [-2^31+1, 2^31-1], -2^31 用作 NULL | -| 3 | BIGINT | 8 | 长整型,范围 [-2^63+1, 2^63-1], -2^63 用作 NULL | -| 4 | FLOAT | 4 | 浮点型,有效位数 6-7,范围 [-3.4E38, 3.4E38] | -| 5 | DOUBLE | 8 | 双精度浮点型,有效位数 15-16,范围 [-1.7E308, 1.7E308] | -| 6 | BINARY | 自定义 | 记录单字节字符串,建议只用于处理 ASCII 可见字符,中文等多字节字符需使用 nchar。理论上,最长可以有 16374 字节。binary 仅支持字符串输入,字符串两端需使用单引号引用。使用时须指定大小,如 binary(20) 定义了最长为 20 个单字节字符的字符串,每个字符占 1 byte 的存储空间,总共固定占用 20 bytes 的空间,此时如果用户字符串超出 20 字节将会报错。对于字符串内的单引号,可以用转义字符反斜线加单引号来表示,即 `\’`。 | -| 7 | SMALLINT | 2 | 短整型, 范围 [-32767, 32767], -32768 用作 NULL | -| 8 | TINYINT | 1 | 单字节整型,范围 [-127, 127], -128 用作 NULL | -| 9 | BOOL | 1 | 布尔型,{true, false} | -| 10 | NCHAR | 自定义 | 记录包含多字节字符在内的字符串,如中文字符。每个 nchar 字符占用 4 bytes 的存储空间。字符串两端使用单引号引用,字符串内的单引号需用转义字符 `\’`。nchar 使用时须指定字符串大小,类型为 nchar(10) 的列表示此列的字符串最多存储 10 个 nchar 字符,会固定占用 40 bytes 的空间。如果用户字符串长度超出声明长度,将会报错。 | -| 11 | JSON | | json 数据类型, 只有 tag 可以是 json 格式 | - -:::tip -TDengine 对 SQL 语句中的英文字符不区分大小写,自动转化为小写执行。因此用户大小写敏感的字符串及密码,需要使用单引号将字符串引起来。 +| 1 | TIMESTAMP | 8 | 时间戳。缺省精度毫秒,可支持微秒和纳秒,详细说明见上节。 | +| 2 | INT | 4 | 整型,范围 [-2^31, 2^31-1] | +| 3 | INT UNSIGNED| 4| 无符号整数,[0, 2^32-1] +| 4 | BIGINT | 8 | 长整型,范围 [-2^63, 2^63-1] | +| 5 | BIGINT UNSIGNED | 8 | 长整型,范围 [0, 2^64-1] | +| 6 | FLOAT | 4 | 浮点型,有效位数 6-7,范围 [-3.4E38, 3.4E38] | +| 7 | DOUBLE | 8 | 双精度浮点型,有效位数 15-16,范围 [-1.7E308, 1.7E308] | +| 8 | BINARY | 自定义 | 记录单字节字符串,建议只用于处理 ASCII 可见字符,中文等多字节字符需使用 nchar。 | +| 9 | SMALLINT | 2 | 短整型, 范围 [-32768, 32767] | +| 10 | SMALLINT UNSIGNED | 2| 无符号短整型,范围 [0, 655357] | +| 11 | TINYINT | 1 | 单字节整型,范围 [-128, 127] | +| 12 | TINYINT UNSIGNED | 1 | 无符号单字节整型,范围 [0, 255] | +| 13 | BOOL | 1 | 布尔型,{true, false} | +| 14 | NCHAR | 自定义 | 记录包含多字节字符在内的字符串,如中文字符。每个 nchar 字符占用 4 bytes 的存储空间。字符串两端使用单引号引用,字符串内的单引号需用转义字符 `\’`。nchar 使用时须指定字符串大小,类型为 nchar(10) 的列表示此列的字符串最多存储 10 个 nchar 字符,会固定占用 40 bytes 的空间。如果用户字符串长度超出声明长度,将会报错。 | +| 15 | JSON | | json 数据类型, 只有 tag 可以是 json 格式 | +| 16 | VARCHAR | 自定义 | BINARY类型的别名 | -::: :::note -虽然 BINARY 类型在底层存储上支持字节型的二进制字符,但不同编程语言对二进制数据的处理方式并不保证一致,因此建议在 BINARY 类型中只存储 ASCII 可见字符,而避免存储不可见字符。多字节的数据,例如中文字符,则需要使用 NCHAR 类型进行保存。如果强行使用 BINARY 类型保存中文字符,虽然有时也能正常读写,但并不带有字符集信息,很容易出现数据乱码甚至数据损坏等情况。 +- TDengine 对 SQL 语句中的英文字符不区分大小写,自动转化为小写执行。因此用户大小写敏感的字符串及密码,需要使用单引号将字符串引起来。 +- 虽然 BINARY 类型在底层存储上支持字节型的二进制字符,但不同编程语言对二进制数据的处理方式并不保证一致,因此建议在 BINARY 类型中只存储 ASCII 可见字符,而避免存储不可见字符。多字节的数据,例如中文字符,则需要使用 NCHAR 类型进行保存。如果强行使用 BINARY 类型保存中文字符,虽然有时也能正常读写,但并不带有字符集信息,很容易出现数据乱码甚至数据损坏等情况。 +- BINARY 类型理论上最长可以有 16374 字节。binary 仅支持字符串输入,字符串两端需使用单引号引用。使用时须指定大小,如 binary(20) 定义了最长为 20 个单字节字符的字符串,每个字符占 1 byte 的存储空间,总共固定占用 20 bytes 的空间,此时如果用户字符串超出 20 字节将会报错。对于字符串内的单引号,可以用转义字符反斜线加单引号来表示,即 `\’`。 +- SQL 语句中的数值类型将依据是否存在小数点,或使用科学计数法表示,来判断数值类型是否为整型或者浮点型,因此在使用时要注意相应类型越界的情况。例如,9999999999999999999 会认为超过长整型的上边界而溢出,而 9999999999999999999.0 会被认为是有效的浮点数。 ::: + +## 常量 +TDengine支持多个类型的常量,细节如下表: + +| # | **语法** | **类型** | **说明** | +| --- | :-------: | --------- | -------------------------------------- | +| 1 | [{+ \| -}]123 | BIGINT | 整型数值的字面量的类型均为BIGINT。如果用户输入超过了BIGINT的表示范围,TDengine 按BIGINT对数值进行截断。| +| 2 | 123.45 | DOUBLE | 浮点数值的字面量的类型均为DOUBLE。TDengine依据是否存在小数点,或使用科学计数法表示,来判断数值类型是否为整型或者浮点型。| +| 3 | 1.2E3 | DOUBLE | 科学计数法的字面量的类型为DOUBLE。| +| 4 | 'abc' | BINARY | 单引号括住的内容为字符串字面值,其类型为BINARY,BINARY的size为实际的字符个数。对于字符串内的单引号,可以用转义字符反斜线加单引号来表示,即 \'。| +| 5 | "abc" | BINARY | 双引号括住的内容为字符串字面值,其类型为BINARY,BINARY的size为实际的字符个数。对于字符串内的双引号,可以用转义字符反斜线加单引号来表示,即 \"。 | +| 6 | TIMESTAMP {'literal' \| "literal"} | TIMESTAMP | TIMESTAMP关键字表示后面的字符串字面量需要被解释为TIMESTAMP类型。字符串需要满足YYYY-MM-DD HH:mm:ss.MS格式,其时间分辨率为当前数据库的时间分辨率。 | +| 7 | {TRUE \| FALSE} | BOOL | 布尔类型字面量。 | +| 8 | {'' \| "" \| '\t' \| "\t" \| ' ' \| " " \| NULL } | -- | 空值字面量。可以用于任意类型。| + :::note -SQL 语句中的数值类型将依据是否存在小数点,或使用科学计数法表示,来判断数值类型是否为整型或者浮点型,因此在使用时要注意相应类型越界的情况。例如,9999999999999999999 会认为超过长整型的上边界而溢出,而 9999999999999999999.0 会被认为是有效的浮点数。 +- TDengine依据是否存在小数点,或使用科学计数法表示,来判断数值类型是否为整型或者浮点型,因此在使用时要注意相应类型越界的情况。例如,9999999999999999999会认为超过长整型的上边界而溢出,而9999999999999999999.0会被认为是有效的浮点数。 ::: diff --git a/docs-cn/12-taos-sql/07-function.md b/docs-cn/12-taos-sql/07-function.md index 68dfd579badc1814852fc7a529831667d4383278..2349e6aa3c02eb62fba1fc7e4eef15e08e3924d1 100644 --- a/docs-cn/12-taos-sql/07-function.md +++ b/docs-cn/12-taos-sql/07-function.md @@ -261,6 +261,92 @@ taos> select hyperloglog(dbig) from shll; Query OK, 1 row(s) in set (0.008388s) ``` +### HISTOGRAM + +``` +SELECT HISTOGRAM(field_name,bin_type, bin_description, normalized) FROM tb_name [WHERE clause]; +``` + +**功能说明**:统计数据按照用户指定区间的分布。 + +**返回结果类型**:如归一化参数 normalized 设置为 1,返回结果为双精度浮点类型 DOUBLE,否则为长整形 INT64。 + +**应用字段**:数值型字段。 + +**支持的版本**:2.6.0.0 及以后的版本。 + +**适用于**: 表和超级表。 + +**说明**: +1. bin_type 用户指定的分桶类型, 有效输入类型为"user_input“, ”linear_bin", "log_bin"。 +2. bin_description 描述如何生成分桶区间,针对三种桶类型,分别为以下描述格式(均为 JSON 格式字符串): + - "user_input": "[1, 3, 5, 7]" + 用户指定 bin 的具体数值。 + + - "linear_bin": "{"start": 0.0, "width": 5.0, "count": 5, "infinity": true}" + "start" 表示数据起始点,"width" 表示每次 bin 偏移量, "count" 为 bin 的总数,"infinity" 表示是否添加(-inf, inf)作为区间起点跟终点, + 生成区间为[-inf, 0.0, 5.0, 10.0, 15.0, 20.0, +inf]。 + + - "log_bin": "{"start":1.0, "factor": 2.0, "count": 5, "infinity": true}" + "start" 表示数据起始点,"factor" 表示按指数递增的因子,"count" 为 bin 的总数,"infinity" 表示是否添加(-inf, inf)作为区间起点跟终点, + 生成区间为[-inf, 1.0, 2.0, 4.0, 8.0, 16.0, +inf]。 +3. normalized 是否将返回结果归一化到 0~1 之间 。有效输入为 0 和 1。 + +**示例**: + +```mysql +taos> SELECT HISTOGRAM(voltage, "user_input", "[1,3,5,7]", 1) FROM meters; + histogram(voltage, "user_input", "[1,3,5,7]", 1) | + ======================================================= + {"lower_bin":1, "upper_bin":3, "count":0.333333} | + {"lower_bin":3, "upper_bin":5, "count":0.333333} | + {"lower_bin":5, "upper_bin":7, "count":0.333333} | + Query OK, 3 row(s) in set (0.004273s) + +taos> SELECT HISTOGRAM(voltage, 'linear_bin', '{"start": 1, "width": 3, "count": 3, "infinity": false}', 0) FROM meters; + histogram(voltage, 'linear_bin', '{"start": 1, "width": 3, " | + =================================================================== + {"lower_bin":1, "upper_bin":4, "count":3} | + {"lower_bin":4, "upper_bin":7, "count":3} | + {"lower_bin":7, "upper_bin":10, "count":3} | + Query OK, 3 row(s) in set (0.004887s) + +taos> SELECT HISTOGRAM(voltage, 'log_bin', '{"start": 1, "factor": 3, "count": 3, "infinity": true}', 0) FROM meters; + histogram(voltage, 'log_bin', '{"start": 1, "factor": 3, "count" | + =================================================================== + {"lower_bin":-inf, "upper_bin":1, "count":3} | + {"lower_bin":1, "upper_bin":3, "count":2} | + {"lower_bin":3, "upper_bin":9, "count":6} | + {"lower_bin":9, "upper_bin":27, "count":3} | + {"lower_bin":27, "upper_bin":inf, "count":1} | +``` + +### ELAPSED + +```mysql +SELECT ELAPSED(field_name[, time_unit]) FROM { tb_name | stb_name } [WHERE clause] [INTERVAL(interval [, offset]) [SLIDING sliding]]; +``` + +**功能说明**:elapsed函数表达了统计周期内连续的时间长度,和twa函数配合使用可以计算统计曲线下的面积。在通过INTERVAL子句指定窗口的情况下,统计在给定时间范围内的每个窗口内有数据覆盖的时间范围;如果没有INTERVAL子句,则返回整个给定时间范围内的有数据覆盖的时间范围。注意,ELAPSED返回的并不是时间范围的绝对值,而是绝对值除以time_unit所得到的单位个数。 + +**返回结果类型**:Double + +**应用字段**:Timestamp类型 + +**支持的版本**:2.6.0.0 及以后的版本。 + +**适用于**: 表,超级表,嵌套查询的外层查询 + +**说明**: +- field_name参数只能是表的第一列,即timestamp主键列。 +- 按time_unit参数指定的时间单位返回,最小是数据库的时间分辨率。time_unit参数未指定时,以数据库的时间分辨率为时间单位。 +- 可以和interval组合使用,返回每个时间窗口的时间戳差值。需要特别注意的是,除第一个时间窗口和最后一个时间窗口外,中间窗口的时间戳差值均为窗口长度。 +- order by asc/desc不影响差值的计算结果。 +- 对于超级表,需要和group by tbname子句组合使用,不可以直接使用。 +- 对于普通表,不支持和group by子句组合使用。 +- 对于嵌套查询,仅当内层查询会输出隐式时间戳列时有效。例如select elapsed(ts) from (select diff(value) from sub1)语句,diff函数会让内层查询输出隐式时间戳列,此为主键列,可以用于elapsed函数的第一个参数。相反,例如select elapsed(ts) from (select * from sub1) 语句,ts列输出到外层时已经没有了主键列的含义,无法使用elapsed函数。此外,elapsed函数作为一个与时间线强依赖的函数,形如select elapsed(ts) from (select diff(value) from st group by tbname)尽管会返回一条计算结果,但并无实际意义,这种用法后续也将被限制。 +- 不支持与leastsquares、diff、derivative、top、bottom、last_row、interp等函数混合使用。 + ## 选择函数 在使用所有的选择函数的时候,可以同时指定输出 ts 列或标签列(包括 tbname),这样就可以方便地知道被选出的值是源于哪个数据行的。 diff --git a/docs-cn/12-taos-sql/12-keywords/index.md b/docs-cn/12-taos-sql/12-keywords/index.md index a64a7161d03f28c131a07e5b1077d7b956e44007..0e8e1edfee4a4aa3f05ef7bfd99ca156e44afd2e 100644 --- a/docs-cn/12-taos-sql/12-keywords/index.md +++ b/docs-cn/12-taos-sql/12-keywords/index.md @@ -85,3 +85,44 @@ title: TDengine 参数限制与保留关键字 | CONNECTIONS | HAVING | NOT | SOFFSET | VNODES | | CONNS | ID | NOTNULL | STABLE | WAL | | COPY | IF | NOW | STABLES | WHERE | +| _C0 | _QSTART | _QSTOP | _QDURATION | _WSTART | +| _WSTOP | _WDURATION | _ROWTS | + +## 特殊说明 +### TBNAME +`TBNAME` 可以视为超级表中一个特殊的标签,代表子表的表名。 + +获取一个超级表所有的子表名及相关的标签信息: +```mysql +SELECT TBNAME, location FROM meters; + +统计超级表下辖子表数量: +```mysql +SELECT COUNT(TBNAME) FROM meters; +``` + +以上两个查询均只支持在WHERE条件子句中添加针对标签(TAGS)的过滤条件。例如: +```mysql +taos> SELECT TBNAME, location FROM meters; + tbname | location | +================================================================== + d1004 | California.SanFrancisco | + d1003 | California.SanFrancisco | + d1002 | California.LosAngeles | + d1001 | California.LosAngeles | +Query OK, 4 row(s) in set (0.000881s) + +taos> SELECT COUNT(tbname) FROM meters WHERE groupId > 2; + count(tbname) | +======================== + 2 | +Query OK, 1 row(s) in set (0.001091s) +``` +### _QSTART/_QSTOP/_QDURATION +表示查询过滤窗口的起始,结束以及持续时间。 + +### _WSTART/_WSTOP/_WDURATION +窗口切分聚合查询(例如 interval/session window/state window)中表示每个切分窗口的起始,结束以及持续时间。 + +### _c0/_ROWTS +_c0 _ROWTS 等价,表示表或超级表的第一列 diff --git a/docs-cn/20-third-party/11-kafka.md b/docs-cn/20-third-party/11-kafka.md index 0de5b43a396fa3bb4aba558308f95cb0d6f96bc5..8369806adcfe1b195348e7d60160609cde9150e8 100644 --- a/docs-cn/20-third-party/11-kafka.md +++ b/docs-cn/20-third-party/11-kafka.md @@ -7,7 +7,7 @@ TDengine Kafka Connector 包含两个插件: TDengine Source Connector 和 TDeng ## 什么是 Kafka Connect? -Kafka Connect 是 Apache Kafka 的一个组件,用于使其它系统,比如数据库、云服务、文件系统等能方便地连接到 Kafka。数据既可以通过 Kafka Connect 从其它系统流向 Kafka, 也可以通过 Kafka Connect 从 Kafka 流向其它系统。从其它系统读数据的插件称为 Source Connector, 写数据到其它系统的插件称为 Sink Connector。Source Connector 和 Sink Connector 都不会直接连接 Kafka Broker,Source Connector 把数据转交给 Kafka Connect。Sink Connector 从 Kafka Connect 接收数据。 +Kafka Connect 是 [Apache Kafka](https://kafka.apache.org/) 的一个组件,用于使其它系统,比如数据库、云服务、文件系统等能方便地连接到 Kafka。数据既可以通过 Kafka Connect 从其它系统流向 Kafka, 也可以通过 Kafka Connect 从 Kafka 流向其它系统。从其它系统读数据的插件称为 Source Connector, 写数据到其它系统的插件称为 Sink Connector。Source Connector 和 Sink Connector 都不会直接连接 Kafka Broker,Source Connector 把数据转交给 Kafka Connect。Sink Connector 从 Kafka Connect 接收数据。 ![TDengine Database Kafka Connector -- Kafka Connect structure](kafka/Kafka_Connect.webp) @@ -17,7 +17,7 @@ TDengine Source Connector 用于把数据实时地从 TDengine 读出来发送 ## 什么是 Confluent? -Confluent 在 Kafka 的基础上增加很多扩展功能。包括: +[Confluent](https://www.confluent.io/) 在 Kafka 的基础上增加很多扩展功能。包括: 1. Schema Registry 2. REST 代理 @@ -81,10 +81,10 @@ Development: false git clone https://github.com:taosdata/kafka-connect-tdengine.git cd kafka-connect-tdengine mvn clean package -unzip -d $CONFLUENT_HOME/share/confluent-hub-components/ target/components/packages/taosdata-kafka-connect-tdengine-0.1.0.zip +unzip -d $CONFLUENT_HOME/share/java/ target/components/packages/taosdata-kafka-connect-tdengine-*.zip ``` -以上脚本先 clone 项目源码,然后用 Maven 编译打包。打包完成后在 `target/components/packages/` 目录生成了插件的 zip 包。把这个 zip 包解压到安装插件的路径即可。安装插件的路径在配置文件 `$CONFLUENT_HOME/etc/kafka/connect-standalone.properties` 中。默认的路径为 `$CONFLUENT_HOME/share/confluent-hub-components/`。 +以上脚本先 clone 项目源码,然后用 Maven 编译打包。打包完成后在 `target/components/packages/` 目录生成了插件的 zip 包。把这个 zip 包解压到安装插件的路径即可。上面的示例中使用了内置的插件安装路径: `$CONFLUENT_HOME/share/java/`。 ### 用 confluent-hub 安装 @@ -98,7 +98,7 @@ confluent local services start ``` :::note -一定要先安装插件再启动 Confluent, 否则会出现找不到类的错误。Kafka Connect 的日志(默认路径: /tmp/confluent.xxxx/connect/logs/connect.log)中会输出成功安装的插件,据此可判断插件是否安装成功。 +一定要先安装插件再启动 Confluent, 否则加载插件会失败。 ::: :::tip @@ -125,6 +125,61 @@ Control Center is [UP] 清空数据可执行 `rm -rf /tmp/confluent.106668`。 ::: +### 验证各个组件是否启动成功 + +输入命令: + +``` +confluent local services status +``` + +如果各组件都启动成功,会得到如下输出: + +``` +Connect is [UP] +Control Center is [UP] +Kafka is [UP] +Kafka REST is [UP] +ksqlDB Server is [UP] +Schema Registry is [UP] +ZooKeeper is [UP] +``` + +### 验证插件是否安装成功 + +在 Kafka Connect 组件完全启动后,可用以下命令列出成功加载的插件: + +``` +confluent local services connect plugin list +``` + +如果成功安装,会输出如下: + +```txt {4,9} +Available Connect Plugins: +[ + { + "class": "com.taosdata.kafka.connect.sink.TDengineSinkConnector", + "type": "sink", + "version": "1.0.0" + }, + { + "class": "com.taosdata.kafka.connect.source.TDengineSourceConnector", + "type": "source", + "version": "1.0.0" + }, +...... +``` + +如果插件安装失败,请检查 Kafka Connect 的启动日志是否有异常信息,用以下命令输出日志路径: +``` +echo `cat /tmp/confluent.current`/connect/connect.stdout +``` +该命令的输出类似: `/tmp/confluent.104086/connect/connect.stdout`。 + +与日志文件 `connect.stdout` 同一目录,还有一个文件名为: `connect.properties`。在这个文件的末尾,可以看到最终生效的 `plugin.path`, 它是一系列用逗号分割的路径。如果插件安装失败,很可能是因为实际的安装路径不包含在 `plugin.path` 中。 + + ## TDengine Sink Connector 的使用 TDengine Sink Connector 的作用是同步指定 topic 的数据到 TDengine。用户无需提前创建数据库和超级表。可手动指定目标数据库的名字(见配置参数 connection.database), 也可按一定规则生成(见配置参数 connection.database.prefix)。 @@ -144,7 +199,7 @@ vi sink-demo.properties sink-demo.properties 内容如下: ```ini title="sink-demo.properties" -name=tdengine-sink-demo +name=TDengineSinkConnector connector.class=com.taosdata.kafka.connect.sink.TDengineSinkConnector tasks.max=1 topics=meters @@ -153,6 +208,7 @@ connection.user=root connection.password=taosdata connection.database=power db.schemaless=line +data.precision=ns key.converter=org.apache.kafka.connect.storage.StringConverter value.converter=org.apache.kafka.connect.storage.StringConverter ``` @@ -179,6 +235,7 @@ confluent local services connect connector load TDengineSinkConnector --config . "connection.url": "jdbc:TAOS://127.0.0.1:6030", "connection.user": "root", "connector.class": "com.taosdata.kafka.connect.sink.TDengineSinkConnector", + "data.precision": "ns", "db.schemaless": "line", "key.converter": "org.apache.kafka.connect.storage.StringConverter", "tasks.max": "1", @@ -223,10 +280,10 @@ Database changed. taos> select * from meters; ts | current | voltage | phase | groupid | location | =============================================================================================================================================================== - 2022-03-28 09:56:51.249000000 | 11.800000000 | 221.000000000 | 0.280000000 | 2 | California.LosAngeles | - 2022-03-28 09:56:51.250000000 | 13.400000000 | 223.000000000 | 0.290000000 | 2 | California.LosAngeles | - 2022-03-28 09:56:51.249000000 | 10.800000000 | 223.000000000 | 0.290000000 | 3 | California.LosAngeles | - 2022-03-28 09:56:51.250000000 | 11.300000000 | 221.000000000 | 0.350000000 | 3 | California.LosAngeles | + 2022-03-28 09:56:51.249000000 | 11.800000000 | 221.000000000 | 0.280000000 | 2 | California.LosAngeles | + 2022-03-28 09:56:51.250000000 | 13.400000000 | 223.000000000 | 0.290000000 | 2 | California.LosAngeles | + 2022-03-28 09:56:51.249000000 | 10.800000000 | 223.000000000 | 0.290000000 | 3 | California.LosAngeles | + 2022-03-28 09:56:51.250000000 | 11.300000000 | 221.000000000 | 0.350000000 | 3 | California.LosAngeles | Query OK, 4 row(s) in set (0.004208s) ``` @@ -356,21 +413,33 @@ confluent local services connect connector unload TDengineSourceConnector 2. `connection.database.prefix`: 当 connection.database 为 null 时, 目标数据库的前缀。可以包含占位符 '${topic}'。 比如 kafka_${topic}, 对于主题 'orders' 将写入数据库 'kafka_orders'。 默认 null。当为 null 时,目标数据库的名字和主题的名字是一致的。 3. `batch.size`: 分批写入每批记录数。当 Sink Connector 一次接收到的数据大于这个值时将分批写入。 4. `max.retries`: 发生错误时的最大重试次数。默认为 1。 -5. `retry.backoff.ms`: 发送错误时重试的时间间隔。单位毫秒,默认 3000。 -6. `db.schemaless`: 数据格式,必须指定为: line、json、telnet 中的一个。分别代表 InfluxDB 行协议格式、 OpenTSDB JSON 格式、 OpenTSDB Telnet 行协议格式。 +5. `retry.backoff.ms`: 发送错误时重试的时间间隔。单位毫秒,默认为 3000。 +6. `db.schemaless`: 数据格式,可选值为: + 1. line :代表 InfluxDB 行协议格式 + 2. json : 代表 OpenTSDB JSON 格式 + 3. telnet :代表 OpenTSDB Telnet 行协议格式 +7. `data.precision`: 使用 InfluxDB 行协议格式时,时间戳的精度。可选值为: + 1. ms : 表示毫秒 + 2. us : 表示微秒 + 3. ns : 表示纳秒。默认为纳秒。 ### TDengine Source Connector 特有的配置 1. `connection.database`: 源数据库名称,无缺省值。 2. `topic.prefix`: 数据导入 kafka 后 topic 名称前缀。 使用 `topic.prefix` + `connection.database` 名称作为完整 topic 名。默认为空字符串 ""。 -3. `timestamp.initial`: 数据同步起始时间。格式为'yyyy-MM-dd HH:mm:ss'。默认 "1970-01-01 00:00:00"。 -4. `poll.interval.ms`: 拉取数据间隔,单位为 ms。默认 1000。 +3. `timestamp.initial`: 数据同步起始时间。格式为'yyyy-MM-dd HH:mm:ss'。默认为 "1970-01-01 00:00:00"。 +4. `poll.interval.ms`: 拉取数据间隔,单位为 ms。默认为 1000。 5. `fetch.max.rows` : 检索数据库时最大检索条数。 默认为 100。 -6. `out.format`: 数据格式。取值 line 或 json。line 表示 InfluxDB Line 协议格式, json 表示 OpenTSDB JSON 格式。默认 line。 +6. `out.format`: 数据格式。取值 line 或 json。line 表示 InfluxDB Line 协议格式, json 表示 OpenTSDB JSON 格式。默认为 line。 + +## 其他说明 + +1. 插件的安装位置可以自定义,请参考官方文档:https://docs.confluent.io/home/connect/self-managed/install.html#install-connector-manually。 +2. 本教程的示例程序使用了 Confluent 平台,但是 TDengine Kafka Connector 本身同样适用于独立安装的 Kafka, 且配置方法相同。关于如何在独立安装的 Kafka 环境使用 Kafka Connect 插件, 请参考官方文档: https://kafka.apache.org/documentation/#connect。 ## 问题反馈 -https://github.com/taosdata/kafka-connect-tdengine/issues +无论遇到任何问题,都欢迎在本项目的 Github 仓库反馈: https://github.com/taosdata/kafka-connect-tdengine/issues。 ## 参考 diff --git a/docs-en/05-get-started/_pkg_install.mdx b/docs-en/05-get-started/_pkg_install.mdx index af04d2b70bda7575e57cc49a5aa60f19689113e6..cf10497c96ba1d777e45340b0312d97c127b6fcb 100644 --- a/docs-en/05-get-started/_pkg_install.mdx +++ b/docs-en/05-get-started/_pkg_install.mdx @@ -12,6 +12,6 @@ Between two major release versions, some beta versions may be delivered for user For the details please refer to [Install and Uninstall](/operation/pkg-install)。 -To see the details of versions, please refer to [Download List](https://www.taosdata.com/all-downloads) and [Release Notes](https://github.com/taosdata/TDengine/releases). +To see the details of versions, please refer to [Download List](https://tdengine.com/all-downloads) and [Release Notes](https://github.com/taosdata/TDengine/releases). diff --git a/docs-en/12-taos-sql/01-data-type.md b/docs-en/12-taos-sql/01-data-type.md index 3f5a49e3135771c6c1e62bcf158a99ee30f1ed9d..d038219c8ac66db52416001f7a79c71018e2ca33 100644 --- a/docs-en/12-taos-sql/01-data-type.md +++ b/docs-en/12-taos-sql/01-data-type.md @@ -3,6 +3,8 @@ title: Data Types description: "TDengine supports a variety of data types including timestamp, float, JSON and many others." --- +## TIMESTAMP + When using TDengine to store and query data, the most important part of the data is timestamp. Timestamp must be specified when creating and inserting data rows. Timestamp must follow the rules below: - The format must be `YYYY-MM-DD HH:mm:ss.MS`, the default time precision is millisecond (ms), for example `2017-08-12 18:25:58.128` @@ -17,33 +19,51 @@ Time precision in TDengine can be set by the `PRECISION` parameter when executin CREATE DATABASE db_name PRECISION 'ns'; ``` +## Data Types + In TDengine, the data types below can be used when specifying a column or tag. | # | **type** | **Bytes** | **Description** | | --- | :-------: | --------- | ------------------------- | | 1 | TIMESTAMP | 8 | Default precision is millisecond, microsecond and nanosecond are also supported | -| 2 | INT | 4 | Integer, the value range is [-2^31+1, 2^31-1], while -2^31 is treated as NULL | -| 3 | BIGINT | 8 | Long integer, the value range is [-2^63+1, 2^63-1], while -2^63 is treated as NULL | -| 4 | FLOAT | 4 | Floating point number, the effective number of digits is 6-7, the value range is [-3.4E38, 3.4E38] | -| 5 | DOUBLE | 8 | Double precision floating point number, the effective number of digits is 15-16, the value range is [-1.7E308, 1.7E308] | -| 6 | BINARY | User Defined | Single-byte string for ASCII visible characters. Length must be specified when defining a column or tag of binary type. The string length can be up to 16374 bytes. The string value must be quoted with single quotes. The literal single quote inside the string must be preceded with back slash like `\'` | -| 7 | SMALLINT | 2 | Short integer, the value range is [-32767, 32767], while -32768 is treated as NULL | -| 8 | TINYINT | 1 | Single-byte integer, the value range is [-127, 127], while -128 is treated as NULL | -| 9 | BOOL | 1 | Bool, the value range is {true, false} | -| 10 | NCHAR | User Defined| Multi-Byte string that can include multi byte characters like Chinese characters. Each character of NCHAR type consumes 4 bytes storage. The string value should be quoted with single quotes. Literal single quote inside the string must be preceded with backslash, like `\’`. The length must be specified when defining a column or tag of NCHAR type, for example nchar(10) means it can store at most 10 characters of nchar type and will consume fixed storage of 40 bytes. An error will be reported if the string value exceeds the length defined. | -| 11 | JSON | | JSON type can only be used on tags. A tag of json type is excluded with any other tags of any other type | - -:::tip -TDengine is case insensitive and treats any characters in the sql command as lower case by default, case sensitive strings must be quoted with single quotes. - -::: +| 2 | INT | 4 | Integer, the value range is [-2^31, 2^31-1] | +| 3 |INT UNSIGNED|4 | Unsigned integer, the value range is [0, 2^31-1] | +| 4 | BIGINT | 8 | Long integer, the value range is [-2^63, 2^63-1] | +| 5 | BIGINT UNSIGNED | 8 | Unsigned long integer, the value range is [0, 2^63-1] | +| 6 | FLOAT | 4 | Floating point number, the effective number of digits is 6-7, the value range is [-3.4E38, 3.4E38] | +| 7 | DOUBLE | 8 | Double precision floating point number, the effective number of digits is 15-16, the value range is [-1.7E308, 1.7E308] | +| 8 | BINARY | User Defined | Single-byte string for ASCII visible characters. Length must be specified when defining a column or tag of binary type. The string length can be up to 16374 bytes. The string value must be quoted with single quotes. The literal single quote inside the string must be preceded with back slash like `\'` | +| 9 | SMALLINT | 2 | Short integer, the value range is [-32768, 32767] | +| 10 | SMALLINT UNSIGNED | 2 | Unsigned short integer, the value range is [0, 32767] | +| 11 | TINYINT | 1 | Single-byte integer, the value range is [-128, 127] | +| 12 | TINYINT UNSIGNED | 1 | Unsigned single-byte integer, the value range is [0, 127] | +| 13 | BOOL | 1 | Bool, the value range is {true, false} | +| 14 | NCHAR | User Defined| Multi-Byte string that can include multi byte characters like Chinese characters. Each character of NCHAR type consumes 4 bytes storage. The string value should be quoted with single quotes. Literal single quote inside the string must be preceded with backslash, like `\’`. The length must be specified when defining a column or tag of NCHAR type, for example nchar(10) means it can store at most 10 characters of nchar type and will consume fixed storage of 40 bytes. An error will be reported if the string value exceeds the length defined. | +| 15 | JSON | | JSON type can only be used on tags. A tag of json type is excluded with any other tags of any other type | +| 16 | VARCHAR | User Defined| Alias of BINARY type | :::note -Only ASCII visible characters are suggested to be used in a column or tag of BINARY type. Multi-byte characters must be stored in NCHAR type. +- TDengine is case insensitive and treats any characters in the sql command as lower case by default, case sensitive strings must be quoted with single quotes. +- Only ASCII visible characters are suggested to be used in a column or tag of BINARY type. Multi-byte characters must be stored in NCHAR type. +- Numeric values in SQL statements will be determined as integer or float type according to whether there is decimal point or whether scientific notation is used, so attention must be paid to avoid overflow. For example, 9999999999999999999 will be considered as overflow because it exceeds the upper limit of long integer, but 9999999999999999999.0 will be considered as a legal float number. ::: +## Constants +TDengine supports constants of multiple data type. + +| # | **Syntax** | **Type** | **Description** | +| --- | :-------: | --------- | -------------------------------------- | +| 1 | [{+ \| -}]123 | BIGINT | Numeric constants are treated as BIGINT type. The value will be truncated if it exceeds the range of BIGINT type. | +| 2 | 123.45 | DOUBLE | Floating number constants are treated as DOUBLE type. TDengine determines whether it's a floating number based on if decimal point or scientific notation is used. | +| 3 | 1.2E3 | DOUBLE | Constants in scientific notation are treated ad DOUBLE type. | +| 4 | 'abc' | BINARY | String constants enclosed by single quotes are treated as BINARY type. Its size is determined as the acutal length. Single quote itself can be included by preceding backslash, i.e. `\'`, in a string constant. | +| 5 | "abc" | BINARY | String constants enclosed by double quotes are treated as BINARY type. Its size is determined as the acutal length. Double quote itself can be included by preceding backslash, i.e. `\"`, in a string constant. | +| 6 | TIMESTAMP {'literal' \| "literal"} | TIMESTAMP | A string constant following `TIMESTAMP` keyword is treated as TIMESTAMP type. The string should be in the format of "YYYY-MM-DD HH:mm:ss.MS". Its time precision is same as that of the current database being used. | +| 7 | {TRUE \| FALSE} | BOOL | BOOL type contant. | +| 8 | {'' \| "" \| '\t' \| "\t" \| ' ' \| " " \| NULL } | -- | NULL constant, it can be used for any type.| + :::note -Numeric values in SQL statements will be determined as integer or float type according to whether there is decimal point or whether scientific notation is used, so attention must be paid to avoid overflow. For example, 9999999999999999999 will be considered as overflow because it exceeds the upper limit of long integer, but 9999999999999999999.0 will be considered as a legal float number. +- TDengine determines whether it's a floating number based on if decimal point or scientific notation is used. So whether the value is determined as overflow depends on both the value and the determined type. For example, 9999999999999999999 is determined as overflow because it exceeds the upper limit of BIGINT type, while 9999999999999999999.0 is considered as a valid floating number because it is within the range of DOUBLE type. ::: diff --git a/docs-en/12-taos-sql/07-function.md b/docs-en/12-taos-sql/07-function.md index 825aeea354fb684e47ceed7afb2bc66d97b23c09..3589efe9cdd618110203a8439ba03eaaf315f48c 100644 --- a/docs-en/12-taos-sql/07-function.md +++ b/docs-en/12-taos-sql/07-function.md @@ -259,6 +259,100 @@ taos> select hyperloglog(dbig) from shll; Query OK, 1 row(s) in set (0.008388s) ``` +### HISTOGRAM + +``` +SELECT HISTOGRAM(field_name,bin_type, bin_description, normalized) FROM tb_name [WHERE clause]; +``` + +**Description**:Returns count of data points in user-specified ranges. + +**Return value type**:Double or INT64, depends on normalized parameter settings. + +**Applicable column type**:Numerical types. + +**Applicable versions**:Since version 2.6.0.0. + +**Applicable table types**: table, STable + +**Explanations**: + +1. bin_type: parameter to indicate the bucket type, valid inputs are: "user_input", "linear_bin", "log_bin"。 +2. bin_description: parameter to describe how to generate buckets,can be in the following JSON formats for each bin_type respectively: + + - "user_input": "[1, 3, 5, 7]": User specified bin values. + + - "linear_bin": "{"start": 0.0, "width": 5.0, "count": 5, "infinity": true}" + "start" - bin starting point. + "width" - bin offset. + "count" - number of bins generated. + "infinity" - whether to add(-inf, inf)as start/end point in generated set of bins. + The above "linear_bin" descriptor generates a set of bins: [-inf, 0.0, 5.0, 10.0, 15.0, 20.0, +inf]. + + - "log_bin": "{"start":1.0, "factor": 2.0, "count": 5, "infinity": true}" + "start" - bin starting point. + "factor" - exponential factor of bin offset. + "count" - number of bins generated. + "infinity" - whether to add(-inf, inf)as start/end point in generated range of bins. + The above "log_bin" descriptor generates a set of bins:[-inf, 1.0, 2.0, 4.0, 8.0, 16.0, +inf]. + +3. normalized: setting to 1/0 to turn on/off result normalization. + +**Example**: + +```mysql +taos> SELECT HISTOGRAM(voltage, "user_input", "[1,3,5,7]", 1) FROM meters; + histogram(voltage, "user_input", "[1,3,5,7]", 1) | + ======================================================= + {"lower_bin":1, "upper_bin":3, "count":0.333333} | + {"lower_bin":3, "upper_bin":5, "count":0.333333} | + {"lower_bin":5, "upper_bin":7, "count":0.333333} | + Query OK, 3 row(s) in set (0.004273s) + +taos> SELECT HISTOGRAM(voltage, 'linear_bin', '{"start": 1, "width": 3, "count": 3, "infinity": false}', 0) FROM meters; + histogram(voltage, 'linear_bin', '{"start": 1, "width": 3, " | + =================================================================== + {"lower_bin":1, "upper_bin":4, "count":3} | + {"lower_bin":4, "upper_bin":7, "count":3} | + {"lower_bin":7, "upper_bin":10, "count":3} | + Query OK, 3 row(s) in set (0.004887s) + +taos> SELECT HISTOGRAM(voltage, 'log_bin', '{"start": 1, "factor": 3, "count": 3, "infinity": true}', 0) FROM meters; + histogram(voltage, 'log_bin', '{"start": 1, "factor": 3, "count" | + =================================================================== + {"lower_bin":-inf, "upper_bin":1, "count":3} | + {"lower_bin":1, "upper_bin":3, "count":2} | + {"lower_bin":3, "upper_bin":9, "count":6} | + {"lower_bin":9, "upper_bin":27, "count":3} | + {"lower_bin":27, "upper_bin":inf, "count":1} | +``` + +### ELAPSED + +```mysql +SELECT ELAPSED(field_name[, time_unit]) FROM { tb_name | stb_name } [WHERE clause] [INTERVAL(interval [, offset]) [SLIDING sliding]]; +``` + +**Description**:`elapsed` function can be used to calculate the continuous time length in which there is valid data. If it's used with `INTERVAL` clause, the returned result is the calcualted time length within each time window. If it's used without `INTERVAL` caluse, the returned result is the calculated time length within the specified time range. Please be noted that the return value of `elapsed` is the number of `time_unit` in the calculated time length. + +**Return value type**:Double + +**Applicable Column type**:Timestamp + +**Applicable versions**:Sicne version 2.6.0.0 + +**Applicable tables**: table, STable, outter in nested query + +**Explanations**: +- `field_name` parameter can only be the first column of a table, i.e. timestamp primary key. +- The minimum value of `time_unit` is the time precision of the database. If `time_unit` is not specified, the time precision of the database is used as the default ime unit. +- It can be used with `INTERVAL` to get the time valid time length of each time window. Please be noted that the return value is same as the time window for all time windows except for the first and the last time window. +- `order by asc/desc` has no effect on the result. +- `group by tbname` must be used together when `elapsed` is used against a STable. +- `group by` must NOT be used together when `elapsed` is used against a table or sub table. +- When used in nested query, it's only applicable when the inner query outputs an implicit timestamp column as the primary key. For example, `select elapsed(ts) from (select diff(value) from sub1)` is legal usage while `select elapsed(ts) from (select * from sub1)` is not. +- It can't be used with `leastsquares`, `diff`, `derivative`, `top`, `bottom`, `last_row`, `interp`. + ## Selection Functions When any select function is used, timestamp column or tag columns including `tbname` can be specified to show that the selected value are from which rows. diff --git a/docs-en/12-taos-sql/12-keywords.md b/docs-en/12-taos-sql/12-keywords.md index fa750300b71251e1172dba13f91d05822f9ac1f4..8f045f48019e419d21d3bd22f432a024551c585c 100644 --- a/docs-en/12-taos-sql/12-keywords.md +++ b/docs-en/12-taos-sql/12-keywords.md @@ -46,3 +46,44 @@ There are about 200 keywords reserved by TDengine, they can't be used as the nam | CONNECTIONS | HAVING | NOT | SOFFSET | VNODES | | CONNS | ID | NOTNULL | STable | WAL | | COPY | IF | NOW | STableS | WHERE | +| _C0 | _QSTART | _QSTOP | _QDURATION | _WSTART | +| _WSTOP | _WDURATION | _ROWTS | + +## Explanations +### TBNAME +`TBNAME` can be considered as a special tag, which represents the name of the subtable, in a STable. + +Get the table name and tag values of all subtables in a STable. +```mysql +SELECT TBNAME, location FROM meters; + +Count the number of subtables in a STable. +```mysql +SELECT COUNT(TBNAME) FROM meters; +``` + +Only filter on TAGS can be used in WHERE clause in the above two query statements. +```mysql +taos> SELECT TBNAME, location FROM meters; + tbname | location | +================================================================== + d1004 | California.SanFrancisco | + d1003 | California.SanFrancisco | + d1002 | California.LosAngeles | + d1001 | California.LosAngeles | +Query OK, 4 row(s) in set (0.000881s) + +taos> SELECT COUNT(tbname) FROM meters WHERE groupId > 2; + count(tbname) | +======================== + 2 | +Query OK, 1 row(s) in set (0.001091s) +``` +### _QSTART/_QSTOP/_QDURATION +The start, stop and duration of a query time window. + +### _WSTART/_WSTOP/_WDURATION +The start, stop and duration of aggegate query by time window, like interval, session window, state window. + +### _c0/_ROWTS +_c0 is equal to _ROWTS, it means the first column of a table or STable. diff --git a/docs-en/14-reference/03-connector/cpp.mdx b/docs-en/14-reference/03-connector/cpp.mdx index 4b388d32a9050645e268bb267d16e9a5b8aa4bda..d13a74384ccc99b4200f89cdba98e5ba902e41f8 100644 --- a/docs-en/14-reference/03-connector/cpp.mdx +++ b/docs-en/14-reference/03-connector/cpp.mdx @@ -4,7 +4,7 @@ sidebar_label: C/C++ title: C/C++ Connector --- -C/C++ developers can use TDengine's client driver and the C/C++ connector, to develop their applications to connect to TDengine clusters for data writing, querying, and other functions. To use it, you need to include the TDengine header file _taos.h_, which lists the function prototypes of the provided APIs; the application also needs to link to the corresponding dynamic libraries on the platform where it is located. +C/C++ developers can use TDengine's client driver and the C/C++ connector, to develop their applications to connect to TDengine clusters for data writing, querying, and other functions. To use the C/C++ connector you must include the TDengine header file _taos.h_, which lists the function prototypes of the provided APIs. The application also needs to link to the corresponding dynamic libraries on the platform where it is located. ```c #include @@ -26,7 +26,7 @@ Please refer to [list of supported platforms](/reference/connector#supported-pla ## Supported versions -The version number of the TDengine client driver and the version number of the TDengine server require one-to-one correspondence and recommend using the same version of client driver as what the TDengine server version is. Although a lower version of the client driver is compatible to work with a higher version of the server, if the first three version numbers are the same (i.e., only the fourth version number is different), but it is not recommended. It is strongly discouraged to use a higher version of the client driver to access a lower version of the TDengine server. +The version number of the TDengine client driver and the version number of the TDengine server should be the same. A lower version of the client driver is compatible with a higher version of the server, if the first three version numbers are the same (i.e., only the fourth version number is different). For e.g. if the client version is x.y.z.1 and the server version is x.y.z.2 the client and server are compatible. But in general we do not recommend using a lower client version with a newer server version. It is also strongly discouraged to use a higher version of the client driver to access a lower version of the TDengine server. ## Installation steps @@ -55,7 +55,7 @@ In the above example code, `taos_connect()` establishes a connection to port 603 :::note -- If not specified, when the return value of the API is an integer, _0_ means success, the others are error codes representing the reason for failure, and when the return value is a pointer, _NULL_ means failure. +- If not specified, when the return value of the API is an integer, _0_ means success. All others are error codes representing the reason for failure. When the return value is a pointer, _NULL_ means failure. - All error codes and their corresponding causes are described in the `taoserror.h` file. ::: @@ -140,13 +140,12 @@ The base API is used to do things like create database connections and provide a - `void taos_cleanup()` - Clean up the runtime environment and should be called before the application exits. + Cleans up the runtime environment and should be called before the application exits. - ` int taos_options(TSDB_OPTION option, const void * arg, ...) ` Set client options, currently supports region setting (`TSDB_OPTION_LOCALE`), character set -(`TSDB_OPTION_CHARSET`), time zone -(`TSDB_OPTION_TIMEZONE`), configuration file path (`TSDB_OPTION_CONFIGDIR`) . The region setting, character set, and time zone default to the current settings of the operating system. +(`TSDB_OPTION_CHARSET`), time zone (`TSDB_OPTION_TIMEZONE`), configuration file path (`TSDB_OPTION_CONFIGDIR`). The region setting, character set, and time zone default to the current settings of the operating system. - `char *taos_get_client_info()` @@ -159,7 +158,7 @@ The base API is used to do things like create database connections and provide a - host: FQDN of any node in the TDengine cluster - user: user name - pass: password - - db: database name, if the user does not provide, it can also be connected correctly, the user can create a new database through this connection, if the user provides the database name, it means that the database user has already created, the default use of the database + - db: the database name. Even if the user does not provide this, the connection will still work correctly. The user can create a new database through this connection. If the user provides the database name, it means that the database has already been created and the connection can be used for regular operations on the database. - port: the port the taosd program is listening on NULL indicates a failure. The application needs to save the returned parameters for subsequent use. @@ -187,7 +186,7 @@ The APIs described in this subsection are all synchronous interfaces. After bein - `TAOS_RES* taos_query(TAOS *taos, const char *sql)` - Executes an SQL command, either a DQL, DML, or DDL statement. The `taos` parameter is a handle obtained with `taos_connect()`. You can't tell if the result failed by whether the return value is `NULL`, but by parsing the error code in the result set with the `taos_errno()` function. + Executes an SQL command, either a DQL, DML, or DDL statement. The `taos` parameter is a handle obtained with `taos_connect()`. If the return value is `NULL` this does not necessarily indicate a failure. You can get the error code, if any, by parsing the error code in the result set with the `taos_errno()` function. - `int taos_result_precision(TAOS_RES *res)` @@ -231,7 +230,7 @@ typedef struct taosField { - ` void taos_free_result(TAOS_RES *res)` - Frees the query result set and the associated resources. Be sure to call this API to free the resources after the query is completed. Otherwise, it may lead to a memory leak in the application. However, note that the application will crash if you call a function like `taos_consume()` to get the query results after freeing the resources. + Frees the query result set and the associated resources. Be sure to call this API to free the resources after the query is completed. Failing to call this, may lead to a memory leak in the application. However, note that the application will crash if you call a function like `taos_consume()` to get the query results after freeing the resources. - `char *taos_errstr(TAOS_RES *res)` @@ -242,7 +241,7 @@ typedef struct taosField { Get the reason for the last API call failure. The return value is the error code. :::note -TDengine version 2.0 and above recommends that each thread of a database application create a separate connection or a connection pool based on threads. It is not recommended to pass the connection (TAOS\*) structure to different threads for shared use in the application. Queries, writes, etc., issued based on TAOS structures are multi-thread safe, but state quantities such as "USE statement" may interfere between threads. In addition, the C connector can dynamically create new database-oriented connections on demand (this procedure is not visible to the user), and it is recommended that `taos_close()` be called only at the final exit of the program to close the connection. +TDengine version 2.0 and above recommends that each thread of a database application create a separate connection or a connection pool based on threads. It is not recommended to pass the connection (TAOS\*) structure to different threads for shared use in the application. Queries, writes, and other operations issued that are based on TAOS structures are multi-thread safe, but state quantities such as the "USE statement" may interfere between threads. In addition, the C connector can dynamically create new database-oriented connections on demand (this procedure is not visible to the user), and it is recommended that `taos_close()` be called only at the final exit of the program to close the connection. ::: @@ -274,12 +273,12 @@ All TDengine's asynchronous APIs use a non-blocking call pattern. Applications c ### Parameter Binding API -In addition to direct calls to `taos_query()` to perform queries, TDengine also provides a set of `bind` APIs that supports parameter binding, similar in style to MySQL, and currently only supports using a question mark `? ` to represent the parameter to be bound. +In addition to direct calls to `taos_query()` to perform queries, TDengine also provides a set of `bind` APIs that supports parameter binding, similar in style to MySQL. TDengine currently only supports using a question mark `? ` to represent the parameter to be bound. -Starting with versions 2.1.1.0 and 2.1.2.0, TDengine has significantly improved the bind APIs to support for data writing (INSERT) scenarios. This avoids the resource consumption of SQL syntax parsing when writing data through the parameter binding interface, thus significantly improving write performance in most cases. A typical operation, in this case, is as follows. +Starting with versions 2.1.1.0 and 2.1.2.0, TDengine has significantly improved the bind APIs to support data writing (INSERT) scenarios. This avoids the resource consumption of SQL syntax parsing when writing data through the parameter binding interface, thus significantly improving write performance in most cases. A typical operation, in this case, is as follows. 1. call `taos_stmt_init()` to create the parameter binding object. -2. call `taos_stmt_prepare()` to parse the INSERT statement. 3. +2. call `taos_stmt_prepare()` to parse the INSERT statement. 3. call `taos_stmt_set_tbname()` to set the table name if it is reserved in the INSERT statement but not the TAGS. 4. call `taos_stmt_set_tbname_tags()` to set the table name and TAGS values if the table name and TAGS are reserved in the INSERT statement (for example, if the INSERT statement takes an automatic table build). 5. call `taos_stmt_bind_param_batch()` to set the value of VALUES in multiple columns, or call `taos_stmt_bind_param()` to set the value of VALUES in a single row. @@ -383,7 +382,7 @@ In addition to writing data using the SQL method or the parameter binding API, w **return value** TAOS_RES structure, application can get error message by using `taos_errstr()` and also error code by using `taos_errno()`. In some cases, the returned TAOS_RES is `NULL`, and it is still possible to call `taos_errno()` to safely get the error code information. - The returned TAOS_RES needs to be freed by the caller. Otherwise, a memory leak will occur. + The returned TAOS_RES needs to be freed by the caller in order to avoid memory leaks. **Description** The protocol type is enumerated and contains the following three formats. @@ -416,13 +415,13 @@ The Subscription API currently supports subscribing to one or more tables and co This function is responsible for starting the subscription service, returning the subscription object on success and `NULL` on failure, with the following parameters. - - taos: the database connection that has been established - - restart: if the subscription already exists, whether to restart or continue the previous subscription - - topic: the topic of the subscription (i.e., the name). This parameter is the unique identifier of the subscription - - sql: the query statement of the subscription, this statement can only be _select_ statement, only the original data should be queried, only the data can be queried in time order - - fp: the callback function when the query result is received (the function prototype will be introduced later), only used when called asynchronously. This parameter should be passed `NULL` when called synchronously - - param: additional parameter when calling the callback function, the system API will pass it to the callback function as it is, without any processing - - interval: polling period in milliseconds. The callback function will be called periodically according to this parameter when called asynchronously. not recommended to set this parameter too small To avoid impact on system performance when called synchronously. If the interval between two calls to `taos_consume()` is less than this period, the API will block until the interval exceeds this period. + - taos: the database connection that has been established. + - restart: if the subscription already exists, whether to restart or continue the previous subscription. + - topic: the topic of the subscription (i.e., the name). This parameter is the unique identifier of the subscription. + - sql: the query statement of the subscription which can only be a _select_ statement. Only the original data should be queried, and data can only be queried in temporal order. + - fp: the callback function when the query result is received only used when called asynchronously. This parameter should be passed `NULL` when called synchronously. The function prototype is described below. + - param: additional parameter when calling the callback function. The system API will pass it to the callback function as is, without any processing. + - interval: polling period in milliseconds. The callback function will be called periodically according to this parameter when called asynchronously. The interval should not be too small to avoid impact on system performance when called synchronously. If the interval between two calls to `taos_consume()` is less than this period, the API will block until the interval exceeds this period. - ` typedef void (*TAOS_SUBSCRIBE_CALLBACK)(TAOS_SUB* tsub, TAOS_RES *res, void* param, int code)` diff --git a/docs-en/14-reference/03-connector/csharp.mdx b/docs-en/14-reference/03-connector/csharp.mdx index 1b0748fbd0d769b949d7eeb3fc72463539cc7564..5eb322cf9125fe036349de22ceea5988de46e404 100644 --- a/docs-en/14-reference/03-connector/csharp.mdx +++ b/docs-en/14-reference/03-connector/csharp.mdx @@ -179,7 +179,7 @@ namespace TDengineExample 1. "Unable to establish connection", "Unable to resolve FQDN" - Usually, it cause by the FQDN configuration is incorrect, you can refer to [How to understand TDengine's FQDN (Chinese)](https://www.taosdata.com/blog/2021/07/29/2741.html) to solve it. + Usually, it's caused by an incorrect FQDN configuration. Please refer to this section in the [FAQ](https://docs.tdengine.com/2.4/train-faq/faq/#2-how-to-handle-unable-to-establish-connection) to troubleshoot. 2. Unhandled exception. System.DllNotFoundException: Unable to load DLL 'taos' or one of its dependencies: The specified module cannot be found. diff --git a/docs-en/14-reference/03-connector/node.mdx b/docs-en/14-reference/03-connector/node.mdx index 0774c35d626dcde16c1a834677da5aacf07a392e..8f586acde4848af71efcb23358be1f8486cedb8e 100644 --- a/docs-en/14-reference/03-connector/node.mdx +++ b/docs-en/14-reference/03-connector/node.mdx @@ -225,7 +225,7 @@ See [video tutorial](https://www.taosdata.com/blog/2020/11/11/1957.html) for the 2. "Unable to establish connection", "Unable to resolve FQDN" - Usually, root cause is the FQDN is not configured correctly. You can refer to [How to understand TDengine's FQDN (In Chinese)](https://www.taosdata.com/blog/2021/07/29/2741.html). + Usually, the root cause is an incorrect FQDN configuration. You can refer to this section in the [FAQ](https://docs.tdengine.com/2.4/train-faq/faq/#2-how-to-handle-unable-to-establish-connection) to troubleshoot. ## Important Updates diff --git a/docs-en/14-reference/05-taosbenchmark.md b/docs-en/14-reference/05-taosbenchmark.md index 1e2b0b99f652bca0d775bebe28378600470f8661..b029f3d3eea0b010354dac1eb3ffecbc872e597f 100644 --- a/docs-en/14-reference/05-taosbenchmark.md +++ b/docs-en/14-reference/05-taosbenchmark.md @@ -7,7 +7,7 @@ description: "taosBenchmark (once called taosdemo ) is a tool for testing the pe ## Introduction -taosBenchmark (formerly taosdemo ) is a tool for testing the performance of TDengine products. taosBenchmark can test the performance of TDengine's insert, query, and subscription functions and simulate large amounts of data generated by many devices. taosBenchmark can flexibly control the number and type of databases, supertables, tag columns, number and type of data columns, and sub-tables, and types of databases, super tables, the number and types of data columns, the number of sub-tables, the amount of data per sub-table, the time interval for inserting data, the number of working threads, whether and how to insert disordered data, and so on. The installer provides taosdemo as a soft link to taosBenchmark for compatibility with past users. +taosBenchmark (formerly taosdemo ) is a tool for testing the performance of TDengine products. taosBenchmark can test the performance of TDengine's insert, query, and subscription functions and simulate large amounts of data generated by many devices. taosBenchmark can flexibly control the number and type of databases, supertables, tag columns, number and type of data columns, and sub-tables, and types of databases, super tables, the number and types of data columns, the number of sub-tables, the amount of data per sub-table, the time interval for inserting data, the number of working threads, whether and how to insert disordered data, and so on. The installer provides taosdemo as a soft link to taosBenchmark for compatibility and for the convenience of past users. ## Installation @@ -21,7 +21,7 @@ There are two ways to install taosBenchmark: ### Configuration and running methods -taosBenchmark supports two configuration methods: [Command-line arguments](#Command-line arguments in detailed) and [JSON configuration file](#Configuration file arguments in detailed). These two methods are mutually exclusive, and with only one command-line parameter, users can use `-f ` to specify a configuration file when using a configuration file. When running taosBenchmark with command-line arguments and controlling its behavior, users should use other parameters for configuration rather than `-f` parameter. In addition, taosBenchmark offers a special way of running without parameters. +taosBenchmark supports two configuration methods: [Command-line arguments](#Command-line arguments in detailed) and [JSON configuration file](#Configuration file arguments in detailed). These two methods are mutually exclusive. Users can use `-f ` to specify a configuration file. When running taosBenchmark with command-line arguments to control its behavior, users should use other parameters for configuration, but not the `-f` parameter. In addition, taosBenchmark offers a special way of running without parameters. taosBenchmark supports complete performance testing of TDengine. taosBenchmark supports the TDengine functions in three categories: write, query, and subscribe. These three functions are mutually exclusive, and users can select only one of them each time taosBenchmark runs. It is important to note that the type of functionality to be tested is not configurable when using the command-line configuration method, which can only test writing performance. To test the query and subscription performance of the TDengine, you must use the configuration file method and specify the function type to test via the parameter `filetype` in the configuration file. @@ -35,7 +35,7 @@ Execute the following commands to quickly experience taosBenchmark's default con taosBenchmark ``` -When run without parameters, taosBenchmark connects to the TDengine cluster specified in `/etc/taos` by default and creates a database named test in TDengine, a super table named `meters` under the test database, and 10,000 tables under the super table with 10,000 records written to each table. Note that if there is already a test database, this table is not used. Note that if there is already a test database, this command will delete it first and create a new test database. +When run without parameters, taosBenchmark connects to the TDengine cluster specified in `/etc/taos` by default and creates a database named `test`, a super table named `meters` under the test database, and 10,000 tables under the super table with 10,000 records written to each table. Note that if there is already a database named "test" this command will delete it first and create a new database. ### Run with command-line configuration parameters @@ -45,7 +45,7 @@ The `-f ` argument cannot be used when running taosBenchmark with com taosBenchmark -I stmt -n 200 -t 100 ``` -The above command, `taosBenchmark` will create a database named `test`, create a super table `meters` in it, create 100 sub-tables in the super table and insert 200 records for each sub-table using parameter binding. +Using the above command, `taosBenchmark` will create a database named `test`, create a super table `meters` in it, create 100 sub-tables in the super table and insert 200 records for each sub-table using parameter binding. ### Run with the configuration file @@ -95,10 +95,10 @@ taosBenchmark -f ## Command-line argument in detailed - **-f/--file ** : - specify the configuration file to use. This file includes All parameters. And users should not use this parameter with other parameters on the command-line. There is no default value. + specify the configuration file to use. This file includes All parameters. Users should not use this parameter with other parameters on the command-line. There is no default value. - **-c/--config-dir ** : - specify the directory where the TDengine cluster configuration file. the default path is `/etc/taos`. + specify the directory where the TDengine cluster configuration file. The default path is `/etc/taos`. - **-h/--host ** : Specify the FQDN of the TDengine server to connect to. The default value is localhost. @@ -272,13 +272,13 @@ The parameters for creating super tables are configured in `super_tables` in the - **child_table_prefix** : The prefix of the child table name, mandatory configuration item, no default value. -- **escape_character**: specify the super table and child table names containing escape characters. By default is "no". The value can be "yes" or "no". +- **escape_character**: specify the super table and child table names containing escape characters. The value can be "yes" or "no". The default is "no". - **auto_create_table**: only when insert_mode is taosc, rest, stmt, and childtable_exists is "no". "yes" means taosBenchmark will automatically create non-existent tables when inserting data; "no" means that taosBenchmark will create all tables before inserting. -- **batch_create_tbl_num** : the number of tables per batch when creating sub-tables, default is 10. Note: the actual number of batches may not be the same as this value when the executed SQL statement is larger than the maximum length supported, it will be automatically truncated and re-executed to continue creating. +- **batch_create_tbl_num** : the number of tables per batch when creating sub-tables, default is 10. Note: the actual number of batches may not be the same as this value. If the executed SQL statement is larger than the maximum length supported, it will be automatically truncated and re-executed to continue creating. -- **data_source**: specify the source of data-generating. Default is taosBenchmark randomly generated. Users can configure it as "rand" and "sample". When "sample" is used, taosBenchmark will use the data in the file specified by the `sample_file` parameter. +- **data_source**: specify the source of data-generation. Default is taosBenchmark randomly generated. Users can configure it as "rand" and "sample". When "sample" is used, taosBenchmark will use the data in the file specified by the `sample_file` parameter. - **insert_mode**: insertion mode with options taosc, rest, stmt, sml, sml-rest, corresponding to normal write, restful interface write, parameter binding interface write, schemaless interface write, restful schemaless interface write (provided by taosAdapter). The default value is taosc. @@ -300,15 +300,15 @@ The parameters for creating super tables are configured in `super_tables` in the - **partial_col_num**: If this value is a positive number n, only the first n columns are written to, only if insert_mode is taosc and rest, or all columns if n is 0. -- **disorder_ratio** : Specifies the percentage probability of disordered data in the value range [0,50]. The default is 0, which means there is no disorder data. +- **disorder_ratio** : Specifies the percentage probability of disordered (i.e. out-of-order) data in the value range [0,50]. The default is 0, which means there is no disorder data. -- **disorder_range** : Specifies the timestamp fallback range for the disordered data. The generated disorder timestamp is the timestamp that should be used in the non-disorder case minus a random value in this range. Valid only if the percentage of disordered data specified by `-O/--disorder` is greater than 0. +- **disorder_range** : Specifies the timestamp fallback range for the disordered data. The disordered timestamp is generated by subtracting a random value in this range, from the timestamp that would be used in the non-disorder case. Valid only if the percentage of disordered data specified by `-O/--disorder` is greater than 0. -- **timestamp_step**: The timestamp step for inserting data in each child table, in units consistent with the `precision` of the database, the default value is 1. +- **timestamp_step**: The timestamp step for inserting data in each child table, in units consistent with the `precision` of the database. For e.g. if the `precision` is milliseconds, the timestamp step will be in milliseconds. The default value is 1. - **start_timestamp** : The timestamp start value of each sub-table, the default value is now. -- **sample_format**: The type of the sample data file, now only "csv" is supported. +- **sample_format**: The type of the sample data file; for now only "csv" is supported. - **sample_file**: Specify a CSV format file as the data source. It only works when data_source is a sample. If the number of rows in the CSV file is less than or equal to prepared_rand, then taosBenchmark will read the CSV file data cyclically until it is the same as prepared_rand; otherwise, taosBenchmark will read only the rows with the number of prepared_rand. The final number of rows of data generated is the smaller of the two. @@ -341,7 +341,7 @@ The configuration parameters for specifying super table tag columns and data col - **create_table_thread_count** : The number of threads to build the table, default is 8. -- **connection_pool_size** : The number of pre-established connections to the TDengine server. If not configured, it is the same number of threads specified. +- **connection_pool_size** : The number of pre-established connections to the TDengine server. If not configured, it is the same as number of threads specified. - **result_file** : The path to the result output file, the default value is . /output.txt. diff --git a/docs-en/14-reference/06-taosdump.md b/docs-en/14-reference/06-taosdump.md index a7e216398a183a096678d8d70c429606d4e5f809..5403e40925f633ce62795cc6037fc8c8f7aad07a 100644 --- a/docs-en/14-reference/06-taosdump.md +++ b/docs-en/14-reference/06-taosdump.md @@ -1,16 +1,17 @@ --- title: taosdump -description: "taosdump is a tool application that supports backing up data from a running TDengine cluster and restoring the backed up data to the same or another running TDengine cluster." +description: "taosdump is a tool that supports backing up data from a running TDengine cluster and restoring the backed up data to the same, or another running TDengine cluster." --- ## Introduction -taosdump is a tool application that supports backing up data from a running TDengine cluster and restoring the backed up data to the same or another running TDengine cluster. +taosdump is a tool that supports backing up data from a running TDengine cluster and restoring the backed up data to the same, or another running TDengine cluster. taosdump can back up a database, a super table, or a normal table as a logical data unit or backup data records in the database, super tables, and normal tables. When using taosdump, you can specify the directory path for data backup. If you do not specify a directory, taosdump will back up the data to the current directory by default. -Suppose the specified location already has data files. In that case, taosdump will prompt the user and exit immediately to avoid data overwriting which means that the same path can only be used for one backup. -Please be careful if you see a prompt for this. +If the specified location already has data files, taosdump will prompt the user and exit immediately to avoid data overwriting. This means that the same path can only be used for one backup. + +Please be careful if you see a prompt for this and please ensure that you follow best practices and relevant SOPs for data integrity, backup and data security. Users should not use taosdump to back up raw data, environment settings, hardware information, server configuration, or cluster topology. taosdump uses [Apache AVRO](https://avro.apache.org/) as the data file format to store backup data. @@ -30,7 +31,7 @@ There are two ways to install taosdump: 2. backup multiple specified databases: use `-D db1,db2,... ` parameters; 3. back up some super or normal tables in the specified database: use `-dbname stbname1 stbname2 tbname1 tbname2 ... ` parameters. Note that the first parameter of this input sequence is the database name, and only one database is supported. The second and subsequent parameters are the names of super or normal tables in that database, separated by spaces. 4. back up the system log database: TDengine clusters usually contain a system database named `log`. The data in this database is the data that TDengine runs itself, and the taosdump will not back up the log database by default. If users need to back up the log database, users can use the `-a` or `-allow-sys` command-line parameter. -5. Loose mode backup: taosdump version 1.4.1 onwards provides `-n` and `-L` parameters for backing up data without using escape characters and "loose" mode, which can reduce the number of backups if table names, column names, tag names do not use This can reduce the backup data time and backup data footprint if table names, column names, and tag names do not use `escape character`. If you are unsure about using `-n` and `-L` conditions, please use the default parameters for "strict" mode backup. See the [official documentation](/taos-sql/escape) for a description of escaped characters. +5. Loose mode backup: taosdump version 1.4.1 onwards provides `-n` and `-L` parameters for backing up data without using escape characters and "loose" mode, which can reduce the number of backups if table names, column names, tag names do not use escape characters. This can also reduce the backup data time and backup data footprint. If you are unsure about using `-n` and `-L` conditions, please use the default parameters for "strict" mode backup. See the [official documentation](/taos-sql/escape) for a description of escaped characters. :::tip - taosdump versions after 1.4.1 provide the `-I` argument for parsing Avro file schema and data. If users specify `-s` then only taosdump will parse schema. @@ -58,7 +59,7 @@ Usage: taosdump [OPTION...] dbname [tbname ...] or: taosdump [OPTION...] -i inpath or: taosdump [OPTION...] -o outpath - -h, --host=HOST Server host dumping data from. Default is + -h, --host=HOST Server host from which to dump data. Default is localhost. -p, --password User password to connect to server. Default is taosdata. @@ -71,10 +72,10 @@ Usage: taosdump [OPTION...] dbname [tbname ...] -r, --resultFile=RESULTFILE DumpOut/In Result file path and name. -a, --allow-sys Allow to dump system database -A, --all-databases Dump all databases. - -D, --databases=DATABASES Dump inputted databases. Use comma to separate - databases' name. + -D, --databases=DATABASES Dump listed databases. Use comma to separate + database names. -N, --without-property Dump database without its properties. - -s, --schemaonly Only dump tables' schema. + -s, --schemaonly Only dump table schemas. -y, --answer-yes Input yes for prompt. It will skip data file checking! -d, --avro-codec=snappy Choose an avro codec among null, deflate, snappy, @@ -97,7 +98,7 @@ Usage: taosdump [OPTION...] dbname [tbname ...] and try. The workable value is related to the length of the row and type of table schema. -I, --inspect inspect avro file content and print on screen - -L, --loose-mode Using loose mode if the table name and column name + -L, --loose-mode Use loose mode if the table name and column name use letter and number only. Default is NOT. -n, --no-escape No escape char '`'. Default is using it. -T, --thread-num=THREAD_NUM Number of thread for dump in file. Default is diff --git a/docs-en/14-reference/07-tdinsight/index.md b/docs-en/14-reference/07-tdinsight/index.md index 16bae615c04ab92e4934418d6c0a3aaf1e1ccde8..cebfafa225e6e8de75ff84bb51fa664784177910 100644 --- a/docs-en/14-reference/07-tdinsight/index.md +++ b/docs-en/14-reference/07-tdinsight/index.md @@ -5,11 +5,11 @@ sidebar_label: TDinsight TDinsight is a solution for monitoring TDengine using the builtin native monitoring database and [Grafana]. -After TDengine starts, it will automatically create a monitoring database `log`. TDengine will automatically write many metrics in specific intervals into the `log` database. The metrics may include the server's CPU, memory, hard disk space, network bandwidth, number of requests, disk read/write speed, slow queries, other information like important system operations (user login, database creation, database deletion, etc.), and error alarms. With [Grafana] and [TDengine Data Source Plugin](https://github.com/taosdata/grafanaplugin/releases), TDinsight can visualize cluster status, node information, insertion and query requests, resource usage, etc., and also vnode, dnode, and mnode status, and exception alerts. Developers monitoring TDengine cluster operation status in real-time can be very convinient. This article will guide users to install the Grafana server, automatically install the TDengine data source plug-in, and deploy the TDinsight visualization panel through `TDinsight.sh` installation script. +After TDengine starts, it will automatically create a monitoring database `log`. TDengine will automatically write many metrics in specific intervals into the `log` database. The metrics may include the server's CPU, memory, hard disk space, network bandwidth, number of requests, disk read/write speed, slow queries, other information like important system operations (user login, database creation, database deletion, etc.), and error alarms. With [Grafana] and [TDengine Data Source Plugin](https://github.com/taosdata/grafanaplugin/releases), TDinsight can visualize cluster status, node information, insertion and query requests, resource usage, vnode, dnode, and mnode status, exception alerts and many other metrics. This is very convenient for developers who want to monitor TDengine cluster status in real-time. This article will guide users to install the Grafana server, automatically install the TDengine data source plug-in, and deploy the TDinsight visualization panel using the `TDinsight.sh` installation script. ## System Requirements -To deploy TDinsight, a single-node TDengine server or a multi-nodes TDengine cluster and a [Grafana] server are required. This dashboard requires TDengine 2.3.3.0 and above, with the `log` database enabled (`monitor = 1`). +To deploy TDinsight, a single-node TDengine server or a multi-node TDengine cluster and a [Grafana] server are required. This dashboard requires TDengine 2.3.3.0 and above, with the `log` database enabled (`monitor = 1`). ## Installing Grafana @@ -17,7 +17,7 @@ We recommend using the latest [Grafana] version 7 or 8 here. You can install Gra ### Installing Grafana on Debian or Ubuntu -For Debian or Ubuntu operating systems, we recommend the Grafana image repository and Use the following command to install from scratch. +For Debian or Ubuntu operating systems, we recommend the Grafana image repository and using the following command to install from scratch. ```bash sudo apt-get install -y apt-transport-https @@ -71,7 +71,7 @@ chmod +x TDinsight.sh ./TDinsight.sh ``` -This script will automatically download the latest [Grafana TDengine data source plugin](https://github.com/taosdata/grafanaplugin/releases/latest) and [TDinsight dashboard](https://grafana.com/grafana/dashboards/15167) with configurable parameters from the command-line options to the [Grafana Provisioning](https://grafana.com/docs/grafana/latest/administration/provisioning/) configuration file to automate deployment and updates, etc. With the alert setting options provided by this script, you can also get built-in support for AliCloud SMS alert notifications. +This script will automatically download the latest [Grafana TDengine data source plugin](https://github.com/taosdata/grafanaplugin/releases/latest) and [TDinsight dashboard](https://grafana.com/grafana/dashboards/15167) with configurable parameters for command-line options to the [Grafana Provisioning](https://grafana.com/docs/grafana/latest/administration/provisioning/) configuration file to automate deployment and updates, etc. With the alert setting options provided by this script, you can also get built-in support for AliCloud SMS alert notifications. Assume you use TDengine and Grafana's default services on the same host. Run `. /TDinsight.sh` and open the Grafana browser window to see the TDinsight dashboard. diff --git a/docs-en/14-reference/11-docker/index.md b/docs-en/14-reference/11-docker/index.md index f532a263d88def21bd8b0fe9c59adaf982ee2404..b7e60ab3e7f04a6078950977a563382a3524ebaa 100644 --- a/docs-en/14-reference/11-docker/index.md +++ b/docs-en/14-reference/11-docker/index.md @@ -13,7 +13,7 @@ The TDengine image starts with the HTTP service activated by default, using the docker run -d --name tdengine -p 6041:6041 tdengine/tdengine ``` -The above command starts a container named "tdengine" and maps the HTTP service end 6041 to the host port 6041. You can verify that the HTTP service provided in this container is available using the following command. +The above command starts a container named "tdengine" and maps the HTTP service port 6041 to the host port 6041. You can verify that the HTTP service provided in this container is available using the following command. ```shell curl -u root:taosdata -d "show databases" localhost:6041/rest/sql @@ -34,7 +34,7 @@ taos> show databases; Query OK, 1 row(s) in set (0.002843s) ``` -The TDengine server running in the container uses the container's hostname to establish a connection. Using TDengine CLI or various connectors (such as JDBC-JNI) to access the TDengine inside the container from outside the container is more complicated. So the above is the simplest way to access the TDengine service in the container and is suitable for some simple scenarios. Please refer to the next section if you want to access the TDengine service in the container from containerized using TDengine CLI or various connectors in some complex scenarios. +The TDengine server running in the container uses the container's hostname to establish a connection. Using TDengine CLI or various connectors (such as JDBC-JNI) to access the TDengine inside the container from outside the container is more complicated. So the above is the simplest way to access the TDengine service in the container and is suitable for some simple scenarios. Please refer to the next section if you want to access the TDengine service in the container from outside the container using TDengine CLI or various connectors for complex scenarios. ## Start TDengine on the host network @@ -42,7 +42,7 @@ The TDengine server running in the container uses the container's hostname to es docker run -d --name tdengine --network host tdengine/tdengine ``` -The above command starts TDengine on the host network and uses the host's FQDN to establish a connection instead of the container's hostname. It works too, like using `systemctl` to start TDengine on the host. If the TDengine client is already installed on the host, you can access it directly with the following command. +The above command starts TDengine on the host network and uses the host's FQDN to establish a connection instead of the container's hostname. It is the equivalent of using `systemctl` to start TDengine on the host. If the TDengine client is already installed on the host, you can access it directly with the following command. ```shell $ taos @@ -382,7 +382,7 @@ password: taosdata Suppose you want to deploy multiple taosAdapters to improve throughput and provide high availability. In that case, the recommended configuration method uses a reverse proxy such as Nginx to offer a unified access entry. For specific configuration methods, please refer to the official documentation of Nginx. Here is an example: ```docker - ersion: "3" + version: "3" networks: inter: diff --git a/docs-en/14-reference/12-config/index.md b/docs-en/14-reference/12-config/index.md index 10e23bbdb85c1aa65ffa021d3d7a7fdaf7b77b09..8ad9a474a02c5cc52559ccdc5910ad9d7b6264ae 100644 --- a/docs-en/14-reference/12-config/index.md +++ b/docs-en/14-reference/12-config/index.md @@ -78,7 +78,7 @@ taos --dump-config | Note | REST service is provided by `taosd` before 2.4.0.0 but by `taosAdapter` after 2.4.0.0, the default port of REST service is 6041 | :::note -TDengine uses continuous 13 ports, both TCP and UDP, from the port specified by `serverPort`. These ports need to be kept open if firewall is enabled. Below table describes the ports used by TDengine in details. +TDengine uses 13 continuous ports, both TCP and UDP, starting with the port specified by `serverPort`. You should ensure, in your firewall rules, that these ports are kept open. Below table describes the ports used by TDengine in details. ::: @@ -197,7 +197,7 @@ TDengine uses continuous 13 ports, both TCP and UDP, from the port specified by | Default Value | TimeZone configured in the host | :::info -To handle the data insertion and data query from multiple timezones, Unix Timestamp is used and stored TDengine. The timestamp generated from any timezones at same time is same in Unix timestamp. To make sure the time on client side can be converted to Unix timestamp correctly, the timezone must be set properly. +To handle the data insertion and data query from multiple timezones, Unix Timestamp is used and stored in TDengine. The timestamp generated from any timezones at same time is same in Unix timestamp. To make sure the time on client side can be converted to Unix timestamp correctly, the timezone must be set properly. On Linux system, TDengine clients automatically obtain timezone from the host. Alternatively, the timezone can be configured explicitly in configuration file `taos.cfg` like below. @@ -209,7 +209,7 @@ timezone Asia/Shanghai The above examples are all proper configuration for the timezone of UTC+8. On Windows system, however, `timezone Asia/Shanghai` is not supported, it must be set as `timezone UTC-8`. -The setting for timezone impacts the strings not in Unix timestamp, keywords or functions related to date/time, for example +The setting for timezone impacts strings that are not in Unix timestamp format and keywords or functions related to date/time. For example: ```sql SELECT count(*) FROM table_name WHERE TS<'2019-04-11 12:01:08'; @@ -227,7 +227,7 @@ If the timezone is UTC, it's equal to SELECT count(*) FROM table_name WHERE TS<1554984068000; ``` -To avoid the problems of using time strings, Unix timestamp can be used directly. Furthermore, time strings with timezone can be used in SQL statement, for example "2013-04-12T15:52:01.123+08:00" in RFC3339 format or "2013-04-12T15:52:01.123+0800" in ISO-8601 format, they are not influenced by timezone setting when converted to Unix timestamp. +To avoid the problems of using time strings, Unix timestamp can be used directly. Furthermore, time strings with timezone can be used in SQL statements. For example "2013-04-12T15:52:01.123+08:00" in RFC3339 format or "2013-04-12T15:52:01.123+0800" in ISO-8601 format are not influenced by timezone setting when converted to Unix timestamp. ::: @@ -244,7 +244,7 @@ A specific type "nchar" is provided in TDengine to store non-ASCII characters su The characters input on the client side are encoded using the default system encoding, which is UTF-8 on Linux, or GB18030 or GBK on some systems in Chinese, POSIX in docker, CP936 on Windows in Chinese. The encoding of the operating system in use must be set correctly so that the characters in nchar type can be converted to UCS4-LE. -The locale definition standard on Linux is: \_., for example, in "zh_CN.UTF-8", "zh" means Chinese, "CN" means China mainland, "UTF-8" means charset. On Linux andMac OSX, the charset can be set by locale in the system. On Windows system another configuration parameter `charset` must be used to configure charset because the locale used on Windows is not POSIX standard. Of course, `charset` can also be used on Linux to specify the charset. +The locale definition standard on Linux is: \_., for example, in "zh_CN.UTF-8", "zh" means Chinese, "CN" means China mainland, "UTF-8" means charset. On Linux and Mac OSX, the charset can be set by locale in the system. On Windows system another configuration parameter `charset` must be used to configure charset because the locale used on Windows is not POSIX standard. Of course, `charset` can also be used on Linux to specify the charset. ::: @@ -263,7 +263,7 @@ On Linux, if `charset` is not set in `taos.cfg`, when `taos` is started, the cha locale zh_CN.UTF-8 ``` -Besides, on Linux system, if the charset contained in `locale` is not consistent with that set by `charset`, the one who comes later in the configuration file is used. +On a Linux system, if the charset contained in `locale` is not consistent with that set by `charset`, the later setting in the configuration file takes precedence. ```title="Effective charset is GBK" locale zh_CN.UTF-8 @@ -778,7 +778,7 @@ To prevent system resource from being exhausted by multiple concurrent streams, ## HTTP Parameters :::note -HTTP server had been provided by `taosd` prior to version 2.4.0.0, now is provided by `taosAdapter` after version 2.4.0.0. +HTTP service was provided by `taosd` prior to version 2.4.0.0 and is provided by `taosAdapter` after version 2.4.0.0. The parameters described in this section are only application in versions prior to 2.4.0.0. If you are using any version from 2.4.0.0, please refer to [taosAdapter](/reference/taosadapter/). ::: diff --git a/docs-en/14-reference/13-schemaless/13-schemaless.md b/docs-en/14-reference/13-schemaless/13-schemaless.md index 2393cbe346dc5c50f19d36e8a6e3f49015a9e259..acbbb1cd3c5a7c50e226644f2de9e0e77274c6dd 100644 --- a/docs-en/14-reference/13-schemaless/13-schemaless.md +++ b/docs-en/14-reference/13-schemaless/13-schemaless.md @@ -1,11 +1,11 @@ --- title: Schemaless Writing -description: "The Schemaless write method eliminates the need to create super tables/sub tables in advance and automatically creates the storage structure corresponding to the data as it is written to the interface." +description: "The Schemaless write method eliminates the need to create super tables/sub tables in advance and automatically creates the storage structure corresponding to the data, as it is written to the interface." --- -In IoT applications, many data items are often collected for intelligent control, business analysis, device monitoring, etc. Due to the version upgrades of the application logic, or the hardware adjustment of the devices themselves, the data collection items may change frequently. To facilitate the data logging work in such cases, TDengine starting from version 2.2.0.0 provides a series of interfaces to the schemaless writing method, which eliminate the need to create super tables and subtables in advance by automatically creating the storage structure corresponding to the data as the data is written to the interface. And when necessary, schemaless writing will automatically add the required columns to ensure that the data written by the user is stored correctly. +In IoT applications, data is collected for many purposes such as intelligent control, business analysis, device monitoring and so on. Due to changes in business or functional requirements or changes in device hardware, the application logic and even the data collected may change. To provide the flexibility needed in such cases and in a rapidly changing IoT landscape, TDengine starting from version 2.2.0.0, provides a series of interfaces for the schemaless writing method. These interfaces eliminate the need to create super tables and subtables in advance by automatically creating the storage structure corresponding to the data as the data is written to the interface. When necessary, schemaless writing will automatically add the required columns to ensure that the data written by the user is stored correctly. -The schemaless writing method creates super tables and their corresponding subtables completely indistinguishable from the super tables and subtables created directly via SQL. You can write data directly to them via SQL statements. Note that the names of tables created by schemaless writing are based on fixed mapping rules for tag values, so they are not explicitly ideographic and lack readability. +The schemaless writing method creates super tables and their corresponding subtables. These are completely indistinguishable from the super tables and subtables created directly via SQL. You can write data directly to them via SQL statements. Note that the names of tables created by schemaless writing are based on fixed mapping rules for tag values, so they are not explicitly ideographic and they lack readability. ## Schemaless Writing Line Protocol @@ -76,8 +76,7 @@ If the subtable obtained by the parse line protocol does not exist, Schemaless c 8. Errors encountered throughout the processing will interrupt the writing process and return an error code. :::tip -All processing logic of schemaless will still follow TDengine's underlying restrictions on data structures, such as the total length of each row of data cannot exceed -48k bytes. See [TAOS SQL Boundary Limits](/taos-sql/limit) for specific constraints in this area. +All processing logic of schemaless will still follow TDengine's underlying restrictions on data structures, such as the total length of each row of data cannot exceed 48k bytes. See [TAOS SQL Boundary Limits](/taos-sql/limit) for specific constraints in this area. ::: ## Time resolution recognition @@ -87,7 +86,7 @@ Three specified modes are supported in the schemaless writing process, as follow | **Serial** | **Value** | **Description** | | -------- | ------------------- | ------------------------------- | | 1 | SML_LINE_PROTOCOL | InfluxDB Line Protocol | -| 2 | SML_TELNET_PROTOCOL | OpenTSDB Text Line Protocol | | 2 | SML_TELNET_PROTOCOL | OpenTSDB Text Line Protocol +| 2 | SML_TELNET_PROTOCOL | OpenTSDB Text Line Protocol | | 3 | SML_JSON_PROTOCOL | JSON protocol format | In the SML_LINE_PROTOCOL parsing mode, the user is required to specify the time resolution of the input timestamp. The available time resolutions are shown in the following table. @@ -106,8 +105,11 @@ In SML_TELNET_PROTOCOL and SML_JSON_PROTOCOL modes, the time precision is determ ## Data schema mapping rules -This section describes how data for line protocols are mapped to data with a schema. The data measurement in each line protocol is mapped to -The tag name in tag_set is the name of the tag in the data schema, and the name in field_set is the column's name. The following data is used as an example to illustrate the mapping rules. +This section describes how data for line protocols are mapped to data with a schema. The data measurement in each line protocol is mapped as follows: +- The tag name in tag_set is the name of the tag in the data schema +- The name in field_set is the column's name. + +The following data is used as an example to illustrate the mapping rules. ```json st,t1=3,t2=4,t3=t3 c1=3i64,c3="passit",c2=false,c4=4f64 1626006833639000000 @@ -139,7 +141,7 @@ st,t1=3,t2=4,t3=t3 c1=3i64,c5="pass" 1626006833639000000 st,t1=3,t2=4,t3=t3 c1=3i64,c5="passit" 1626006833640000000 ``` -The first line of the line protocol parsing will declare column c5 is a BINARY(4) field, the second line data write will extract column c5 is still a BINARY column. Still, its width is 6, then you need to increase the width of the BINARY field to be able to accommodate the new string. +The first line of the line protocol parsing will declare column c5 is a BINARY(4) field. The second line data write will parse column c5 as a BINARY column. But in the second line, c5's width is 6 so you need to increase the width of the BINARY field to be able to accommodate the new string. ```json st,t1=3,t2=4,t3=t3 c1=3i64 1626006833639000000 diff --git a/docs-en/14-reference/_tcollector.mdx b/docs-en/14-reference/_tcollector.mdx index 85794d54007b70acf205b1bbc897cec1d0c4f824..42b021410e3862c4fa328d8dae40dcac1456e929 100644 --- a/docs-en/14-reference/_tcollector.mdx +++ b/docs-en/14-reference/_tcollector.mdx @@ -17,7 +17,7 @@ password = "taosdata" ... ``` -The taosAdapter writes to the database with the default name `tcollector`. You can also modify the taosAdapter configuration file dbs entry to specify a different name. user and password fill in the actual TDengine configuration values. After changing the configuration file, you need to restart the taosAdapter. +The taosAdapter writes to the database with the default name `tcollector`. You can also modify the taosAdapter configuration file dbs entry to specify a different name. Fill in the actual user and password for TDengine. After changing the configuration file, you need to restart the taosAdapter. - You can also enable taosAdapter to receive tcollector data by using the taosAdapter command-line parameters or setting environment variables. @@ -25,7 +25,7 @@ The taosAdapter writes to the database with the default name `tcollector`. You c To use TCollector, you need to download its [source code](https://github.com/OpenTSDB/tcollector). Its configuration items are in its source code. Note: TCollector differs significantly from version to version, so here is an example of the latest code for the current master branch (git commit: 37ae920). -Modify the contents of the `collectors/etc/config.py` and `tcollector.py` files. Change the address of the OpenTSDB host to the domain name or IP address of the server where taosAdapter is deployed, and change the port to the port that taosAdapter supports TCollector on (default is 6049). +Modify the contents of the `collectors/etc/config.py` and `tcollector.py` files. Change the address of the OpenTSDB host to the domain name or IP address of the server where taosAdapter is deployed, and change the port to the port on which taosAdapter supports TCollector (default is 6049). Example of git diff output of source code changes. diff --git a/docs-en/20-third-party/01-grafana.mdx b/docs-en/20-third-party/01-grafana.mdx index dc2033ae6f789908d4d9f9ecd96c9396748c4400..b3cab6271001feb56714f808906cb78ba1098593 100644 --- a/docs-en/20-third-party/01-grafana.mdx +++ b/docs-en/20-third-party/01-grafana.mdx @@ -3,13 +3,13 @@ sidebar_label: Grafana title: Grafana --- -TDengine can be quickly integrated with the open-source data visualization system [Grafana](https://www.grafana.com/) to build a data monitoring and alerting system. The whole process does not require any code development. And you can visualize the contents of the data tables in TDengine on a DashBoard. +TDengine can be quickly integrated with the open-source data visualization system [Grafana](https://www.grafana.com/) to build a data monitoring and alerting system. The whole process does not require any code development. And you can visualize the contents of the data tables in TDengine on a dashboard. You can learn more about using the TDengine plugin on [GitHub](https://github.com/taosdata/grafanaplugin/blob/master/README.md). ## Prerequisites -In order for Grafana to add the TDengine data source successfully, the following preparations are required: +In order for Grafana to add the TDengine data source successfully, the following preparation is required: 1. The TDengine cluster is deployed and functioning properly 2. taosAdapter is installed and running properly. Please refer to the taosAdapter manual for details. @@ -36,7 +36,7 @@ GF_VERSION=3.1.4 wget https://github.com/taosdata/grafanaplugin/releases/download/v$GF_VERSION/tdengine-datasource-$GF_VERSION.zip ``` -Take CentOS 7.2 for example, extract the plugin package to /var/lib/grafana/plugins directory, and restart grafana. +In CentOS 7.2 for example, extract the plugin package to /var/lib/grafana/plugins directory, and restart grafana. ```bash sudo unzip tdengine-datasource-$GF_VERSION.zip -d /var/lib/grafana/plugins/ @@ -76,13 +76,13 @@ Enter the datasource configuration page, and follow the default prompts to modif - User: TDengine user name. - Password: TDengine user password. -Click `Save & Test` to test. Follows are a success. +Click `Save & Test` to test. You should see a success message if the test worked. ![TDengine Database TDinsight plugin add database 4](./grafana/add_datasource4.webp) ### Create Dashboard -Go back to the main interface to create the Dashboard, click Add Query to enter the panel query page: +Go back to the main interface to create a dashboard and click Add Query to enter the panel query page: ![TDengine Database TDinsight plugin create dashboard 1](./grafana/create_dashboard1.webp) diff --git a/docs-en/20-third-party/03-telegraf.md b/docs-en/20-third-party/03-telegraf.md index 0d563c9ff36268ac27e18e21fefed789789dc1a7..6a7aac322f9def880f58d7ed0adcc4a8f3687ed1 100644 --- a/docs-en/20-third-party/03-telegraf.md +++ b/docs-en/20-third-party/03-telegraf.md @@ -5,7 +5,7 @@ title: Telegraf writing import Telegraf from "../14-reference/_telegraf.mdx" -Telegraf is a viral metrics collection open-source software. Telegraf can collect the operation information of various components without writing any scripts to collect regularly, reducing the difficulty of data acquisition. +Telegraf is a viral, open-source, metrics collection software. Telegraf can collect the operation information of various components without having to write any scripts to collect regularly, reducing the difficulty of data acquisition. Telegraf's data can be written to TDengine by simply adding the output configuration of Telegraf to the URL corresponding to taosAdapter and modifying several configuration items. The presence of Telegraf data in TDengine can take advantage of TDengine's efficient storage query performance and clustering capabilities for time-series data. diff --git a/docs-en/20-third-party/06-statsd.md b/docs-en/20-third-party/06-statsd.md index bf4b6c7ab5dac4114cad0d650b2aeb026a67581c..40e927b9fd1d2eca9d454a987ac51d533eb75005 100644 --- a/docs-en/20-third-party/06-statsd.md +++ b/docs-en/20-third-party/06-statsd.md @@ -7,7 +7,7 @@ import StatsD from "../14-reference/_statsd.mdx" StatsD is a simple daemon for aggregating application metrics, which has evolved rapidly in recent years into a unified protocol for collecting application performance metrics. -You can write StatsD data to TDengine by simply modifying in the configuration file of StatsD with the domain name (or IP address) of the server running taosAdapter and the corresponding port. It can take full advantage of TDengine's efficient storage query performance and clustering capabilities for time-series data. +You can write StatsD data to TDengine by simply modifying the configuration file of StatsD with the domain name (or IP address) of the server running taosAdapter and the corresponding port. It can take full advantage of TDengine's efficient storage query performance and clustering capabilities for time-series data. ## Prerequisites diff --git a/docs-en/20-third-party/07-icinga2.md b/docs-en/20-third-party/07-icinga2.md index ba9cde8cea7504ac9df871d5f6aa42cc5c94d895..b27196dfe313b468eeb73ff4b114d9d955618c3e 100644 --- a/docs-en/20-third-party/07-icinga2.md +++ b/docs-en/20-third-party/07-icinga2.md @@ -5,7 +5,7 @@ title: icinga2 writing import Icinga2 from "../14-reference/_icinga2.mdx" -icinga2 is an open-source software monitoring host and network initially developed from the Nagios network monitoring application. Currently, icinga2 is distributed under the GNU GPL v2 license. +icinga2 is an open-source, host and network monitoring software initially developed from the Nagios network monitoring application. Currently, icinga2 is distributed under the GNU GPL v2 license. You can write the data collected by icinga2 to TDengine by simply modifying the icinga2 configuration to point to the taosAdapter server and the corresponding port, taking advantage of TDengine's efficient storage and query performance and clustering capabilities for time-series data. diff --git a/docs-en/20-third-party/09-emq-broker.md b/docs-en/20-third-party/09-emq-broker.md index 738372cabd736c0be47b4080cc2c984e5110236c..d3eafebc14e8ddc29b03abf8785a6c0a013ef014 100644 --- a/docs-en/20-third-party/09-emq-broker.md +++ b/docs-en/20-third-party/09-emq-broker.md @@ -3,7 +3,7 @@ sidebar_label: EMQX Broker title: EMQX Broker writing --- -MQTT is a popular IoT data transfer protocol, [EMQX](https://github.com/emqx/emqx) is an open-source MQTT Broker software, you can write MQTT data directly to TDengine without any code, you only need to use "rules" in EMQX Dashboard to create a simple configuration. EMQX supports saving data to TDengine by sending it to web services and provides a native TDengine driver for direct saving in the Enterprise Edition. Please refer to the [EMQX official documentation](https://www.emqx.io/docs/en/v4.4/rule/rule-engine.html) for details on how to use it.). +MQTT is a popular IoT data transfer protocol. [EMQX](https://github.com/emqx/emqx) is an open-source MQTT Broker software. You can write MQTT data directly to TDengine without any code. You only need to setup "rules" in EMQX Dashboard to create a simple configuration. EMQX supports saving data to TDengine by sending data to a web service and provides a native TDengine driver for direct saving in the Enterprise Edition. Please refer to the [EMQX official documentation](https://www.emqx.io/docs/en/v4.4/rule/rule-engine.html) for details on how to use it.). ## Prerequisites diff --git a/docs-en/20-third-party/11-kafka.md b/docs-en/20-third-party/11-kafka.md index 9c78a6645a0578d3b8d494d1fa60831eb88b3c81..6720af8bf81ea2f4fce415a54847453f578ababf 100644 --- a/docs-en/20-third-party/11-kafka.md +++ b/docs-en/20-third-party/11-kafka.md @@ -7,7 +7,7 @@ TDengine Kafka Connector contains two plugins: TDengine Source Connector and TDe ## What is Kafka Connect? -Kafka Connect is a component of Apache Kafka that enables other systems, such as databases, cloud services, file systems, etc., to connect to Kafka easily. Data can flow from other software to Kafka via Kafka Connect and Kafka to other systems via Kafka Connect. Plugins that read data from other software are called Source Connectors, and plugins that write data to other software are called Sink Connectors. Neither Source Connector nor Sink Connector will directly connect to Kafka Broker, and Source Connector transfers data to Kafka Connect. Sink Connector receives data from Kafka Connect. +Kafka Connect is a component of [Apache Kafka](https://kafka.apache.org/) that enables other systems, such as databases, cloud services, file systems, etc., to connect to Kafka easily. Data can flow from other software to Kafka via Kafka Connect and Kafka to other systems via Kafka Connect. Plugins that read data from other software are called Source Connectors, and plugins that write data to other software are called Sink Connectors. Neither Source Connector nor Sink Connector will directly connect to Kafka Broker, and Source Connector transfers data to Kafka Connect. Sink Connector receives data from Kafka Connect. ![TDengine Database Kafka Connector -- Kafka Connect](kafka/Kafka_Connect.webp) @@ -17,7 +17,7 @@ TDengine Source Connector is used to read data from TDengine in real-time and se ## What is Confluent? -Confluent adds many extensions to Kafka. include: +[Confluent](https://www.confluent.io/) adds many extensions to Kafka. include: 1. Schema Registry 2. REST Proxy @@ -79,10 +79,10 @@ Development: false git clone https://github.com:taosdata/kafka-connect-tdengine.git cd kafka-connect-tdengine mvn clean package -unzip -d $CONFLUENT_HOME/share/confluent-hub-components/ target/components/packages/taosdata-kafka-connect-tdengine-0.1.0.zip +unzip -d $CONFLUENT_HOME/share/java/ target/components/packages/taosdata-kafka-connect-tdengine-*.zip ``` -The above script first clones the project source code and then compiles and packages it with Maven. After the package is complete, the zip package of the plugin is generated in the `target/components/packages/` directory. Unzip this zip package to the path where the plugin is installed. The path to install the plugin is in the configuration file `$CONFLUENT_HOME/etc/kafka/connect-standalone.properties`. The default path is `$CONFLUENT_HOME/share/confluent-hub-components/`. +The above script first clones the project source code and then compiles and packages it with Maven. After the package is complete, the zip package of the plugin is generated in the `target/components/packages/` directory. Unzip this zip package to plugin path. We used `$CONFLUENT_HOME/share/java/` above because it's a build in plugin path. ### Install with confluent-hub @@ -96,7 +96,7 @@ confluent local services start ``` :::note -Be sure to install the plugin before starting Confluent. Otherwise, there will be a class not found error. The log of Kafka Connect (default path: /tmp/confluent.xxxx/connect/logs/connect.log) will output the successfully installed plugin, which users can use to determine whether the plugin is installed successfully. +Be sure to install the plugin before starting Confluent. Otherwise, Kafka Connect will fail to discover the plugins. ::: :::tip @@ -123,6 +123,59 @@ Control Center is [UP] To clear data, execute `rm -rf /tmp/confluent.106668`. ::: +### Check Confluent Services Status + +Use command bellow to check the status of all service: + +``` +confluent local services status +``` + +The expected output is: +``` +Connect is [UP] +Control Center is [UP] +Kafka is [UP] +Kafka REST is [UP] +ksqlDB Server is [UP] +Schema Registry is [UP] +ZooKeeper is [UP] +``` + +### Check Successfully Loaded Plugin + +After Kafka Connect was completely started, you can use bellow command to check if our plugins are installed successfully: +``` +confluent local services connect plugin list +``` + +The output should contains `TDengineSinkConnector` and `TDengineSourceConnector` as bellow: + +``` +Available Connect Plugins: +[ + { + "class": "com.taosdata.kafka.connect.sink.TDengineSinkConnector", + "type": "sink", + "version": "1.0.0" + }, + { + "class": "com.taosdata.kafka.connect.source.TDengineSourceConnector", + "type": "source", + "version": "1.0.0" + }, +...... +``` + +If not, please check the log file of Kafka Connect. To view the log file path, please execute: + +``` +echo `cat /tmp/confluent.current`/connect/connect.stdout +``` +It should produce a path like:`/tmp/confluent.104086/connect/connect.stdout` + +Besides log file `connect.stdout` there is a file named `connect.properties`. At the end of this file you can see the effective `plugin.path` which is a series of paths joined by comma. If Kafka Connect not found our plugins, it's probably because the installed path is not included in `plugin.path`. + ## The use of TDengine Sink Connector The role of the TDengine Sink Connector is to synchronize the data of the specified topic to TDengine. Users do not need to create databases and super tables in advance. The name of the target database can be specified manually (see the configuration parameter connection.database), or it can be generated according to specific rules (see the configuration parameter connection.database.prefix). @@ -142,7 +195,7 @@ vi sink-demo.properties sink-demo.properties' content is following: ```ini title="sink-demo.properties" -name=tdengine-sink-demo +name=TDengineSinkConnector connector.class=com.taosdata.kafka.connect.sink.TDengineSinkConnector tasks.max=1 topics=meters @@ -151,6 +204,7 @@ connection.user=root connection.password=taosdata connection.database=power db.schemaless=line +data.precision=ns key.converter=org.apache.kafka.connect.storage.StringConverter value.converter=org.apache.kafka.connect.storage.StringConverter ``` @@ -177,6 +231,7 @@ If the above command is executed successfully, the output is as follows: "connection.url": "jdbc:TAOS://127.0.0.1:6030", "connection.user": "root", "connector.class": "com.taosdata.kafka.connect.sink.TDengineSinkConnector", + "data.precision": "ns", "db.schemaless": "line", "key.converter": "org.apache.kafka.connect.storage.StringConverter", "tasks.max": "1", @@ -221,10 +276,10 @@ Database changed. taos> select * from meters; ts | current | voltage | phase | groupid | location | =============================================================================================================================================================== - 2022-03-28 09:56:51.249000000 | 11.800000000 | 221.000000000 | 0.280000000 | 2 | California.LoSangeles | - 2022-03-28 09:56:51.250000000 | 13.400000000 | 223.000000000 | 0.290000000 | 2 | California.LoSangeles | - 2022-03-28 09:56:51.249000000 | 10.800000000 | 223.000000000 | 0.290000000 | 3 | California.LoSangeles | - 2022-03-28 09:56:51.250000000 | 11.300000000 | 221.000000000 | 0.350000000 | 3 | California.LoSangeles | + 2022-03-28 09:56:51.249000000 | 11.800000000 | 221.000000000 | 0.280000000 | 2 | California.LosAngeles | + 2022-03-28 09:56:51.250000000 | 13.400000000 | 223.000000000 | 0.290000000 | 2 | California.LosAngeles | + 2022-03-28 09:56:51.249000000 | 10.800000000 | 223.000000000 | 0.290000000 | 3 | California.LosAngeles | + 2022-03-28 09:56:51.250000000 | 11.300000000 | 221.000000000 | 0.350000000 | 3 | California.LosAngeles | Query OK, 4 row(s) in set (0.004208s) ``` @@ -356,6 +411,7 @@ The following configuration items apply to TDengine Sink Connector and TDengine 4. `max.retries`: The maximum number of retries when an error occurs. Defaults to 1. 5. `retry.backoff.ms`: The time interval for retry when sending an error. The unit is milliseconds. The default is 3000. 6. `db.schemaless`: Data format, could be one of `line`, `json`, and `telnet`. Represent InfluxDB line protocol format, OpenTSDB JSON format, and OpenTSDB Telnet line protocol format. +7. `data.precision`: The time precision when use InfluxDB line protocol format data, could be one of `ms`, `us` and `ns`. The default is `ns`. ### TDengine Source Connector specific configuration @@ -366,7 +422,13 @@ The following configuration items apply to TDengine Sink Connector and TDengine 5. `fetch.max.rows`: The maximum number of rows retrieved when retrieving the database. Default is 100. 6. `out.format`: The data format. The value could be line or json. The line represents the InfluxDB Line protocol format, and json represents the OpenTSDB JSON format. Default is `line`. -## feedback + +## Other notes + +1. To install plugin to a customized location, refer to https://docs.confluent.io/home/connect/self-managed/install.html#install-connector-manually. +2. To use Kafka Connect without confluent, refer to https://kafka.apache.org/documentation/#connect. + +## Feedback https://github.com/taosdata/kafka-connect-tdengine/issues diff --git a/docs-en/21-tdinternal/01-arch.md b/docs-en/21-tdinternal/01-arch.md index 16d4b7afe26107e251a542ee24b644c1d372def0..4d8bed4d2d6b3a0404e10213aeab599767325cc2 100644 --- a/docs-en/21-tdinternal/01-arch.md +++ b/docs-en/21-tdinternal/01-arch.md @@ -5,11 +5,11 @@ title: Architecture ## Cluster and Primary Logic Unit -The design of TDengine is based on the assumption that any hardware or software system is not 100% reliable and that no single node can provide sufficient computing and storage resources to process massive data. Therefore, TDengine has been designed in a distributed and high-reliability architecture since day one of the development, so that hardware failure or software failure of any single even multiple servers will not affect the availability and reliability of the system. At the same time, through node virtualization and automatic load-balancing technology, TDengine can make the most efficient use of computing and storage resources in heterogeneous clusters to reduce hardware resources significantly. +The design of TDengine is based on the assumption that any hardware or software system is not 100% reliable and that no single node can provide sufficient computing and storage resources to process massive data. Therefore, since day one, TDengine has been designed as a natively distributed system, with high-reliability architecture. Hardware failure or software failure of a single, or even multiple servers will not affect the availability and reliability of the system. At the same time, through node virtualization and automatic load-balancing technology, TDengine can make the most efficient use of computing and storage resources in heterogeneous clusters to reduce hardware resource needs, significantly. ### Primary Logic Unit -Logical structure diagram of TDengine distributed architecture as following: +Logical structure diagram of TDengine's distributed architecture is as follows: ![TDengine Database architecture diagram](structure.webp)
Figure 1: TDengine architecture diagram
@@ -18,25 +18,25 @@ A complete TDengine system runs on one or more physical nodes. Logically, it inc **Physical node (pnode)**: A pnode is a computer that runs independently and has its own computing, storage and network capabilities. It can be a physical machine, virtual machine, or Docker container installed with OS. The physical node is identified by its configured FQDN (Fully Qualified Domain Name). TDengine relies entirely on FQDN for network communication. If you don't know about FQDN, please check [wikipedia](https://en.wikipedia.org/wiki/Fully_qualified_domain_name). -**Data node (dnode):** A dnode is a running instance of the TDengine server-side execution code taosd on a physical node. A working system must have at least one data node. A dnode contains zero to multiple logical virtual nodes (VNODE), zero or at most one logical management node (mnode). The unique identification of a dnode in the system is determined by the instance's End Point (EP). EP is a combination of FQDN (Fully Qualified Domain Name) of the physical node where the dnode is located and the network port number (Port) configured by the system. By configuring different ports, a physical node (a physical machine, virtual machine or container) can run multiple instances or have multiple data nodes. +**Data node (dnode):** A dnode is a running instance of the TDengine server-side execution code taosd on a physical node (pnode). A working system must have at least one data node. A dnode contains zero to multiple logical virtual nodes (VNODE) and zero or at most one logical management node (mnode). The unique identification of a dnode in the system is determined by the instance's End Point (EP). EP is a combination of FQDN (Fully Qualified Domain Name) of the physical node where the dnode is located and the network port number (Port) configured by the system. By configuring different ports, a physical node (a physical machine, virtual machine or container) can run multiple instances or have multiple data nodes. -**Virtual node (vnode)**: To better support data sharding, load balancing and prevent data from overheating or skewing, data nodes are virtualized into multiple virtual nodes (vnode, V2, V3, V4, etc. in the figure). Each vnode is a relatively independent work unit, which is the basic unit of time-series data storage and has independent running threads, memory space and persistent storage path. A vnode contains a certain number of tables (data collection points). When a new table is created, the system checks whether a new vnode needs to be created. The number of vnodes that can be created on a data node depends on the hardware capacities of the physical node where the data node is located. A vnode belongs to only one DB, but a DB can have multiple vnodes. In addition to the stored time-series data, a vnode also stores the schema and tag values of the included tables. A virtual node is uniquely identified in the system by the EP of the data node and the VGroup ID to which it belongs and is created and managed by the management node. +**Virtual node (vnode)**: To better support data sharding, load balancing and prevent data from overheating or skewing, data nodes are virtualized into multiple virtual nodes (vnode, V2, V3, V4, etc. in the figure). Each vnode is a relatively independent work unit, which is the basic unit of time-series data storage and has independent running threads, memory space and persistent storage path. A vnode contains a certain number of tables (data collection points). When a new table is created, the system checks whether a new vnode needs to be created. The number of vnodes that can be created on a data node depends on the capacity of the hardware of the physical node where the data node is located. A vnode belongs to only one DB, but a DB can have multiple vnodes. In addition to the stored time-series data, a vnode also stores the schema and tag values of the included tables. A virtual node is uniquely identified in the system by the EP of the data node and the VGroup ID to which it belongs and is created and managed by the management node. -**Management node (mnode)**: A virtual logical unit responsible for monitoring and maintaining the running status of all data nodes and load balancing among nodes (M in the figure). At the same time, the management node is also responsible for the storage and management of metadata (including users, databases, tables, static tags, etc.), so it is also called Meta Node. Multiple (up to 5) mnodes can be configured in a TDengine cluster, and they are automatically constructed into a virtual management node group (M0, M1, M2 in the figure). The master/slave mechanism is adopted for the mnode group and the data synchronization is carried out in a strongly consistent way. Any data update operation can only be executed on the master. The creation of mnode cluster is completed automatically by the system without manual intervention. There is at most one mnode on each dnode, which is uniquely identified by the EP of the data node to which it belongs. Each dnode automatically obtains the EP of the dnode where all mnodes in the whole cluster are located through internal messaging interaction. +**Management node (mnode)**: A virtual logical unit responsible for monitoring and maintaining the running status of all data nodes and load balancing among nodes (M in the figure). At the same time, the management node is also responsible for the storage and management of metadata (including users, databases, tables, static tags, etc.), so it is also called Meta Node. Multiple (up to 5) mnodes can be configured in a TDengine cluster, and they are automatically constructed into a virtual management node group (M0, M1, M2 in the figure). The master/slave mechanism is adopted for the mnode group and the data synchronization is carried out in a strongly consistent way. Any data update operation can only be executed on the master. The creation of mnode cluster is completed automatically by the system without manual intervention. There is at most one mnode on each dnode, which is uniquely identified by the EP of the data node to which it belongs. Each dnode automatically obtains the EP of the dnode where all mnodes in the whole cluster are located, through internal messaging interaction. -**Virtual node group (VGroup)**: Vnodes on different data nodes can form a virtual node group to ensure the high availability of the system. The virtual node group is managed in a master/slave mechanism. Write operations can only be performed on the master vnode, and then replicated to slave vnodes, thus ensuring that one single replica of data is copied on multiple physical nodes. The number of virtual nodes in a vgroup equals the number of data replicas. If the number of replicas of a DB is N, the system must have at least N data nodes. The number of replicas can be specified by the parameter `“replica”` when creating DB, and the default is 1. Using the multi-replication feature of TDengine, the same high data reliability can be achieved without the need for expensive storage devices such as disk arrays. Virtual node group is created and managed by the management node, and the management node assigns a system unique ID, aka VGroup ID. If two virtual nodes have the same vnode group ID, means that they belong to the same group and the data is backed up to each other. The number of virtual nodes in a virtual node group can be dynamically changed, allowing only one, that is, no data replication. VGroup ID is never changed. Even if a virtual node group is deleted, its ID will not be reused. +**Virtual node group (VGroup)**: Vnodes on different data nodes can form a virtual node group to ensure the high availability of the system. The virtual node group is managed in a master/slave mechanism. Write operations can only be performed on the master vnode, and then replicated to slave vnodes, thus ensuring that one single replica of data is copied on multiple physical nodes. The number of virtual nodes in a vgroup equals the number of data replicas. If the number of replicas of a DB is N, the system must have at least N data nodes. The number of replicas can be specified by the parameter `“replica”` when creating a DB, and the default is 1. Using the multi-replication feature of TDengine, the same high data reliability can be achieved without the need for expensive storage devices such as disk arrays. Virtual node groups are created and managed by the management node, and the management node assigns a system unique ID, aka VGroup ID. If two virtual nodes have the same vnode group ID, it means that they belong to the same group and the data is backed up to each other. The number of virtual nodes in a virtual node group can be dynamically changed, allowing only one, that is, no data replication. VGroup ID is never changed. Even if a virtual node group is deleted, its ID will not be reused. -**TAOSC**: TAOSC is the driver provided by TDengine to applications, which is responsible for dealing with the interaction between application and cluster, and provides the native interface of C/C++ language, which is embedded in JDBC, C #, Python, Go, Node.js language connection libraries. Applications interact with the whole cluster through TAOSC instead of directly connecting to data nodes in the cluster. This module is responsible for obtaining and caching metadata; forwarding requests for insertion, query, etc. to the correct data node; when returning the results to the application, TAOSC also needs to be responsible for the final level of aggregation, sorting, filtering and other operations. For JDBC, C/C++/C #/Python/Go/Node.js interfaces, this module runs on the physical node where the application is located. At the same time, in order to support the fully distributed RESTful interface, TAOSC has a running instance on each dnode of TDengine cluster. +**TAOSC**: TAOSC is the driver provided by TDengine to applications. It is responsible for dealing with the interaction between application and cluster, and provides the native interface for the C/C++ language. It is also embedded in the JDBC, C #, Python, Go, Node.js language connection libraries. Applications interact with the whole cluster through TAOSC instead of directly connecting to data nodes in the cluster. This module is responsible for obtaining and caching metadata; forwarding requests for insertion, query, etc. to the correct data node; when returning the results to the application, TAOSC also needs to be responsible for the final level of aggregation, sorting, filtering and other operations. For JDBC, C/C++/C#/Python/Go/Node.js interfaces, this module runs on the physical node where the application is located. At the same time, in order to support the fully distributed RESTful interface, TAOSC has a running instance on each dnode of TDengine cluster. ### Node Communication -**Communication mode**: The communication among each data node of TDengine system, and among the client driver and each data node is carried out through TCP/UDP. Considering an IoT scenario, the data writing packets are generally not large, so TDengine uses UDP in addition to TCP for transmission, because UDP is more efficient and is not limited by the number of connections. TDengine implements its own timeout, retransmission, confirmation and other mechanisms to ensure reliable transmission of UDP. For packets with a data volume of less than 15K, UDP is adopted for transmission, and TCP is automatically adopted for transmission of packets with a data volume of more than 15K or query operations. At the same time, TDengine will automatically compress/decompress the data, digital sign/authenticate the data according to the configuration and data packet. For data replication among data nodes, only TCP is used for data transportation. +**Communication mode**: The communication among each data node of TDengine system, and among the client driver and each data node is carried out through TCP/UDP. Considering an IoT scenario, the data writing packets are generally not large, so TDengine uses UDP in addition to TCP for transmission, because UDP is more efficient and is not limited by the number of connections. TDengine implements its own timeout, retransmission, confirmation and other mechanisms to ensure reliable transmission of UDP. For packets with a data volume of less than 15K, UDP is adopted for transmission, and TCP is automatically adopted for transmission of packets with a data volume of more than 15K or query operations. At the same time, TDengine will automatically compress/decompress the data, digitally sign/authenticate the data according to the configuration and data packet. For data replication among data nodes, only TCP is used for data transportation. **FQDN configuration:** A data node has one or more FQDNs, which can be specified in the system configuration file taos.cfg with the parameter “fqdn”. If it is not specified, the system will automatically use the hostname of the computer as its FQDN. If the node is not configured with FQDN, you can directly set the configuration parameter “fqdn” of the node to its IP address. However, IP is not recommended because IP address may be changed, and once it changes, the cluster will not work properly. The EP (End Point) of a data node consists of FQDN + Port. With FQDN, it is necessary to ensure the DNS service is running, or hosts files on nodes are configured properly. **Port configuration**: The external port of a data node is determined by the system configuration parameter “serverPort” in TDengine, and the port for internal communication of cluster is serverPort+5. The data replication operation among data nodes in the cluster also occupies a TCP port, which is serverPort+10. In order to support multithreading and efficient processing of UDP data, each internal and external UDP connection needs to occupy 5 consecutive ports. Therefore, the total port range of a data node will be serverPort to serverPort + 10, for a total of 11 TCP/UDP ports. To run the system, make sure that the firewall keeps these ports open. Each data node can be configured with a different serverPort. -**Cluster external connection**: TDengine cluster can accommodate one single, multiple or even thousands of data nodes. The application only needs to initiate a connection to any data node in the cluster. The network parameter required for connection is the End Point (FQDN plus configured port number) of a data node. When starting the application taos through CLI, the FQDN of the data node can be specified through the option `-h`, and the configured port number can be specified through `-p`. If the port is not configured, the system configuration parameter “serverPort” of TDengine will be adopted. +**Cluster external connection**: TDengine cluster can accommodate a single, multiple or even thousands of data nodes. The application only needs to initiate a connection to any data node in the cluster. The network parameter required for connection is the End Point (FQDN plus configured port number) of a data node. When starting the application taos through CLI, the FQDN of the data node can be specified through the option `-h`, and the configured port number can be specified through `-p`. If the port is not configured, the system configuration parameter “serverPort” of TDengine will be adopted. **Inter-cluster communication**: Data nodes connect with each other through TCP/UDP. When a data node starts, it will obtain the EP information of the dnode where the mnode is located, and then establish a connection with the mnode in the system to exchange information. There are three steps to obtain EP information of the mnode: @@ -44,11 +44,13 @@ A complete TDengine system runs on one or more physical nodes. Logically, it inc 2. Check the system configuration file taos.cfg to obtain node configuration parameters “firstEp” and “secondEp” (the node specified by these two parameters can be a normal node without mnode, in this case, the node will try to redirect to the mnode node when connected). If these two configuration parameters do not exist or do not exist in taos.cfg, or are invalid, skip to the third step; 3. Set your own EP as a mnode EP and run it independently. After obtaining the mnode EP list, the data node initiates the connection. It will successfully join the working cluster after connection. If not successful, it will try the next item in the mnode EP list. If all attempts are made, but the connection still fails, sleep for a few seconds before trying again. -**The choice of MNODE**: TDengine logically has a management node, but there is no separated execution code. The server-side only has a set of execution code taosd. So which data node will be the management node? This is determined automatically by the system without any manual intervention. The principle is as follows: when a data node starts, it will check its End Point and compare it with the obtained mnode EP List. If its EP exists in it, the data node shall start the mnode module and become a mnode. If your own EP is not in the mnode EP List, the mnode module will not start. During the system operation, due to load balancing, downtime and other reasons, mnode may migrate to the new dnode, while totally transparent without manual intervention. The modification of configuration parameters is the decision made by mnode itself according to resources usage. +**The choice of MNODE**: TDengine logically has a management node, but there is no separate execution code. The server-side only has one set of execution code, taosd. So which data node will be the management node? This is determined automatically by the system without any manual intervention. The principle is as follows: when a data node starts, it will check its End Point and compare it with the obtained mnode EP List. If its EP exists in it, the data node shall start the mnode module and become a mnode. If your own EP is not in the mnode EP List, the mnode module will not start. During the system operation, due to load balancing, downtime and other reasons, mnode may migrate to the new dnode, totally transparently and without manual intervention. The modification of configuration parameters is the decision made by mnode itself according to resources usage. -**Add new data nodes:** After the system has a data node, it has become a working system. There are two steps to add a new node into the cluster. Step1: Connect to the existing working data node using TDengine CLI, and then add the End Point of the new data node with the command "create dnode"; Step 2: In the system configuration parameter file taos.cfg of the new data node, set the “firstEp” and “secondEp” parameters to the EP of any two data nodes in the existing cluster. Please refer to the detailed user tutorial for detailed steps. In this way, the cluster will be established step by step. +**Add new data nodes:** After the system has a data node, it has become a working system. There are two steps to add a new node into the cluster. +- Step1: Connect to the existing working data node using TDengine CLI, and then add the End Point of the new data node with the command "create dnode" +- Step 2: In the system configuration parameter file taos.cfg of the new data node, set the “firstEp” and “secondEp” parameters to the EP of any two data nodes in the existing cluster. Please refer to the user tutorial for detailed steps. In this way, the cluster will be established step by step. -**Redirection**: No matter about dnode or TAOSC, the connection to the mnode shall be initiated first, but the mnode is automatically created and maintained by the system, so the user does not know which dnode is running the mnode. TDengine only requires a connection to any working dnode in the system. Because any running dnode maintains the currently running mnode EP List, when receiving a connecting request from the newly started dnode or TAOSC, if it’s not a mnode by self, it will reply to the mnode EP List back. After receiving this list, TAOSC or the newly started dnode will try to establish the connection again. When the mnode EP List changes, each data node quickly obtains the latest list and notifies TAOSC through messaging interaction among nodes. +**Redirection**: Regardless of dnode or TAOSC, the connection to the mnode is initiated first. The mnode is automatically created and maintained by the system, so the user does not know which dnode is running the mnode. TDengine only requires a connection to any working dnode in the system. Because any running dnode maintains the currently running mnode EP List, when receiving a connecting request from the newly started dnode or TAOSC, if it’s not an mnode itself, it will reply to the mnode with the EP List. After receiving this list, TAOSC or the newly started dnode will try to establish the connection again. When the mnode EP List changes, each data node quickly obtains the latest list and notifies TAOSC through messaging interaction among nodes. ### A Typical Data Writing Process @@ -58,17 +60,17 @@ To explain the relationship between vnode, mnode, TAOSC and application and thei
Figure 2: Typical process of TDengine
1. Application initiates a request to insert data through JDBC, ODBC, or other APIs. -2. TAOSC checks if meta data existing for the table in the cache. If so, go straight to Step 4. If not, TAOSC sends a get meta-data request to mnode. +2. TAOSC checks the cache to see if meta data exists for the table. If it does, it goes straight to Step 4. If not, TAOSC sends a get meta-data request to mnode. 3. Mnode returns the meta-data of the table to TAOSC. Meta-data contains the schema of the table, and also the vgroup information to which the table belongs (the vnode ID and the End Point of the dnode where the table belongs. If the number of replicas is N, there will be N groups of End Points). If TAOSC does not receive a response from the mnode for a long time, and there are multiple mnodes, TAOSC will send a request to the next mnode. 4. TAOSC initiates an insert request to master vnode. 5. After vnode inserts the data, it gives a reply to TAOSC, indicating that the insertion is successful. If TAOSC doesn't get a response from vnode for a long time, TAOSC will treat this node as offline. In this case, if there are multiple replicas of the inserted database, TAOSC will issue an insert request to the next vnode in vgroup. 6. TAOSC notifies APP that writing is successful. -For Step 2 and 3, when TAOSC starts, it does not know the End Point of mnode, so it will directly initiate a request to the configured serving End Point of the cluster. If the dnode that receives the request does not have a mnode configured, it will inform the mnode EP list in a reply message, so that TAOSC will re-issue a request to obtain meta-data to the EP of another new mnode. +For Step 2 and 3, when TAOSC starts, it does not know the End Point of mnode, so it will directly initiate a request to the configured serving End Point of the cluster. If the dnode that receives the request does not have a mnode configured, it will reply with the mnode EP list, so that TAOSC will re-issue a request to obtain meta-data to the EP of another mnode. -For Step 4 and 5, without caching, TAOSC can't recognize the master in the virtual node group, so assumes that the first vnode is the master and sends a request to it. If this vnode is not the master, it will reply to the actual master as a new target where TAOSC shall send a request to. Once the reply of successful insertion is obtained, TAOSC will cache the information of master node. +For Step 4 and 5, without caching, TAOSC can't recognize the master in the virtual node group, so assumes that the first vnode is the master and sends a request to it. If this vnode is not the master, it will reply to the actual master as a new target to which TAOSC shall send a request. Once a response of successful insertion is obtained, TAOSC will cache the information of master node. -The above is the process of inserting data, and the processes of querying and computing are the same. TAOSC encapsulates and hides all these complicated processes, and it is transparent to applications. +The above describes the process of inserting data. The processes of querying and computing are the same. TAOSC encapsulates and hides all these complicated processes, and it is transparent to applications. Through TAOSC caching mechanism, mnode needs to be accessed only when a table is accessed for the first time, so mnode will not become a system bottleneck. However, because schema and vgroup may change (such as load balancing), TAOSC will interact with mnode regularly to automatically update the cache. @@ -76,24 +78,24 @@ Through TAOSC caching mechanism, mnode needs to be accessed only when a table is ### Storage Model -The data stored by TDengine include collected time-series data, metadata related to database and tables, tag data, etc. These data are specifically divided into three parts: +The data stored by TDengine includes collected time-series data, metadata related to database and tables, tag data, etc. All of the data is specifically divided into three parts: -- Time-series data: stored in vnode and composed of data, head and last files. The amount of data is large and query amount depends on the application scenario. Out-of-order writing is allowed, but delete operation is not supported for the time being, and update operation is only allowed when database “update” parameter is set to 1. By adopting the model with **one table for each data collection point**, the data of a given time period is continuously stored, and the writing against one single table is a simple appending operation. Multiple records can be read at one time, thus ensuring the insert and query operation of a single data collection point with the best performance. -- Tag data: meta files stored in vnode. Four standard operations of create, read, update and delete are supported. The amount of data is not large. If there are N tables, there are N records, so all can be stored in memory. To make tag filtering efficient, TDengine supports multi-core and multi-threaded concurrent queries. As long as the computing resources are sufficient, even in face of millions of tables, the tag filtering results will return in milliseconds. -- Metadata: stored in mnode, including system node, user, DB, Table Schema and other information. Four standard operations of create, delete, update and read are supported. The amount of these data are not large and can be stored in memory, moreover, the query amount is not large because of the client cache. Therefore, TDengine uses centralized storage management, however, there will be no performance bottleneck. +- Time-series data: stored in vnode and composed of data, head and last files. The amount of data is large and query amount depends on the application scenario. Out-of-order writing is allowed, but delete operation is not supported for the time being, and update operation is only allowed when database “update” parameter is set to 1. By adopting the model with **one table for each data collection point**, the data of a given time period is continuously stored, and the writing against one single table is a simple appending operation. Multiple records can be read at one time, thus ensuring the best performance for both insert and query operations of a single data collection point. +- Tag data: meta files stored in vnode. Four standard operations of create, read, update and delete are supported. The amount of data is not large. If there are N tables, there are N records, so all can be stored in memory. To make tag filtering efficient, TDengine supports multi-core and multi-threaded concurrent queries. As long as the computing resources are sufficient, even with millions of tables, the tag filtering results will return in milliseconds. +- Metadata: stored in mnode and includes system node, user, DB, table schema and other information. Four standard operations of create, delete, update and read are supported. The amount of this data is not large and can be stored in memory. Moreover, the number of queries is not large because of client cache. Even though TDengine uses centralized storage management, because of the architecture, there is no performance bottleneck. -Compared with the typical NoSQL storage model, TDengine stores tag data and time-series data completely separately, which has two major advantages: +Compared with the typical NoSQL storage model, TDengine stores tag data and time-series data completely separately. This has two major advantages: -- Reduce the redundancy of tag data storage significantly: general NoSQL database or time-series database adopts K-V storage, in which Key includes a timestamp, a device ID and various tags. Each record carries these duplicated tags, so storage space is wasted. Moreover, if the application needs to add, modify or delete tags on historical data, it has to traverse the data and rewrite them again, which is extremely expensive to operate. -- Aggregate data efficiently between multiple tables: when aggregating data between multiple tables, it first finds out the tables which satisfy the filtering conditions, and then find out the corresponding data blocks of these tables to greatly reduce the data sets to be scanned, thus greatly improving the aggregation efficiency. Moreover, tag data is managed and maintained in a full-memory structure, and tag data queries in tens of millions can return in milliseconds. +- Reduces the redundancy of tag data storage significantly. General NoSQL database or time-series database adopts K-V (key-value) storage, in which the key includes a timestamp, a device ID and various tags. Each record carries these duplicated tags, so storage space is wasted. Moreover, if the application needs to add, modify or delete tags on historical data, it has to traverse the data and rewrite them again, which is an extremely expensive operation. +- Aggregate data efficiently between multiple tables: when aggregating data between multiple tables, it first finds the tables which satisfy the filtering conditions, and then finds the corresponding data blocks of these tables. This greatly reduces the data sets to be scanned which in turn improves the aggregation efficiency. Moreover, tag data is managed and maintained in a full-memory structure, and tag data queries in tens of millions can return in milliseconds. ### Data Sharding -For large-scale data management, to achieve scale-out, it is generally necessary to adopt the Partitioning or Sharding strategy. TDengine implements data sharding via vnode, and time-series data partitioning via one data file for a time range. +For large-scale data management, to achieve scale-out, it is generally necessary to adopt a Partitioning or Sharding strategy. TDengine implements data sharding via vnode, and time-series data partitioning via one data file for a time range. VNode (Virtual Data Node) is responsible for providing writing, query and computing functions for collected time-series data. To facilitate load balancing, data recovery and support heterogeneous environments, TDengine splits a data node into multiple vnodes according to its computing and storage resources. The management of these vnodes is done automatically by TDengine and is completely transparent to the application. -For a single data collection point, regardless of the amount of data, a vnode (or vnode group, if the number of replicas is greater than 1) has enough computing resource and storage resource to process (if a 16-byte record is generated per second, the original data generated in one year will be less than 0.5 G), so TDengine stores all the data of a table (a data collection point) in one vnode instead of distributing the data to two or more dnodes. Moreover, a vnode can store data from multiple data collection points (tables), and the upper limit of the tables’ quantity for a vnode is one million. By design, all tables in a vnode belong to the same DB. On a data node, unless specially configured, the number of vnodes owned by a DB will not exceed the number of system cores. +For a single data collection point, regardless of the amount of data, a vnode (or vnode group, if the number of replicas is greater than 1) has enough computing resource and storage resource to process (if a 16-byte record is generated per second, the original data generated in one year will be less than 0.5 G). So TDengine stores all the data of a table (a data collection point) in one vnode instead of distributing the data to two or more dnodes. Moreover, a vnode can store data from multiple data collection points (tables), and the upper limit of the tables’ quantity for a vnode is one million. By design, all tables in a vnode belong to the same DB. On a data node, unless specially configured, the number of vnodes owned by a DB will not exceed the number of system cores. When creating a DB, the system does not allocate resources immediately. However, when creating a table, the system will check if there is an allocated vnode with free tablespace. If so, the table will be created in the vacant vnode immediately. If not, the system will create a new vnode on a dnode from the cluster according to the current workload, and then a table. If there are multiple replicas of a DB, the system does not create only one vnode, but a vgroup (virtual data node group). The system has no limit on the number of vnodes, which is just limited by the computing and storage resources of physical nodes. @@ -101,23 +103,23 @@ The meta data of each table (including schema, tags, etc.) is also stored in vno ### Data Partitioning -In addition to vnode sharding, TDengine partitions the time-series data by time range. Each data file contains only one time range of time-series data, and the length of the time range is determined by DB's configuration parameter `“days”`. This method of partitioning by time rang is also convenient to efficiently implement the data retention policy. As long as the data file exceeds the specified number of days (system configuration parameter `“keep”`), it will be automatically deleted. Moreover, different time ranges can be stored in different paths and storage media, so as to facilitate the tiered-storage. Cold/hot data can be stored in different storage media to reduce the storage cost. +In addition to vnode sharding, TDengine partitions the time-series data by time range. Each data file contains only one time range of time-series data, and the length of the time range is determined by the database configuration parameter `“days”`. This method of partitioning by time range is also convenient to efficiently implement data retention policies. As long as the data file exceeds the specified number of days (system configuration parameter `“keep”`), it will be automatically deleted. Moreover, different time ranges can be stored in different paths and storage media, so as to facilitate tiered-storage. Cold/hot data can be stored in different storage media to significantly reduce storage costs. In general, **TDengine splits big data by vnode and time range in two dimensions** to manage the data efficiently with horizontal scalability. ### Load Balancing -Each dnode regularly reports its status (including hard disk space, memory size, CPU, network, number of virtual nodes, etc.) to the mnode (virtual management node), so mnode knows the status of the entire cluster. Based on the overall status, when the mnode finds a dnode is overloaded, it will migrate one or more vnodes to other dnodes. During the process, TDengine services keep running and the data insertion, query and computing operations are not affected. +Each dnode regularly reports its status (including hard disk space, memory size, CPU, network, number of virtual nodes, etc.) to the mnode (virtual management node) so that the mnode knows the status of the entire cluster. Based on the overall status, when the mnode finds a dnode is overloaded, it will migrate one or more vnodes to other dnodes. During the process, TDengine services keep running and the data insertion, query and computing operations are not affected. -If the mnode has not received the dnode status for a period of time, the dnode will be treated as offline. When offline lasts a certain period of time (configured by parameter `“offlineThreshold”`), the dnode will be forcibly removed from the cluster by mnode. If the number of replicas of vnodes on this dnode is greater than one, the system will automatically create new replicas on other dnodes to ensure the replica number. If there are other mnodes on this dnode and the number of mnodes replicas is greater than one, the system will automatically create new mnodes on other dnodes to ensure the replica number. +If the mnode has not received the dnode status for a period of time, the dnode will be treated as offline. If the dnode stays offline beyond the time configured by parameter `“offlineThreshold”`, the dnode will be forcibly removed from the cluster by mnode. If the number of replicas of vnodes on this dnode is greater than one, the system will automatically create new replicas on other dnodes to ensure the replica number. If there are other mnodes on this dnode and the number of mnodes replicas is greater than one, the system will automatically create new mnodes on other dnodes to ensure the replica number. -When new data nodes are added to the cluster, with new computing and storage resources are added, the system will automatically start the load balancing process. +When new data nodes are added to the cluster, with new computing and storage resources, the system will automatically start the load balancing process. The load balancing process does not require any manual intervention, and it is transparent to the application. **Note: load balancing is controlled by parameter “balance”, which determines to turn on/off automatic load balancing.** ## Data Writing and Replication Process -If a database has N replicas, thus a virtual node group has N virtual nodes, but only one as Master and all others are slaves. When the application writes a new record to system, only the Master vnode can accept the writing request. If a slave vnode receives a writing request, the system will notifies TAOSC to redirect. +If a database has N replicas, a virtual node group has N virtual nodes. But only one is the Master and all others are slaves. When the application writes a new record to system, only the Master vnode can accept the writing request. If a slave vnode receives a writing request, the system will notifies TAOSC to redirect. ### Master vnode Writing Process @@ -130,7 +132,7 @@ Master Vnode uses a writing process as follows: 2. If the system configuration parameter `“walLevel”` is greater than 0, vnode will write the original request packet into database log file WAL. If walLevel is set to 2 and fsync is set to 0, TDengine will make WAL data written immediately to ensure that even system goes down, all data can be recovered from database log file; 3. If there are multiple replicas, vnode will forward data packet to slave vnodes in the same virtual node group, and the forwarded packet has a version number with data; 4. Write into memory and add the record to “skip list”; -5. Master vnode returns a confirmation message to the application, indicating a successful writing. +5. Master vnode returns a confirmation message to the application, indicating a successful write. 6. If any of Step 2, 3 or 4 fails, the error will directly return to the application. ### Slave vnode Writing Process @@ -146,19 +148,19 @@ For a slave vnode, the write process as follows: Compared with Master vnode, slave vnode has no forwarding or reply confirmation step, means two steps less. But writing into memory and WAL is exactly the same. -### Remote Disaster Recovery and IDC Migration +### Remote Disaster Recovery and IDC (Internet Data Center) Migration -As above Master and Slave processes discussed, TDengine adopts asynchronous replication for data synchronization. This method can greatly improve the writing performance, with no obvious impact from network delay. By configuring IDC and rack number for each physical node, it can be ensured that for a virtual node group, virtual nodes are composed of physical nodes from different IDC and different racks, thus implementing remote disaster recovery without other tools. +As discussed above, TDengine writes using Master and Slave processes. TDengine adopts asynchronous replication for data synchronization. This method can greatly improve write performance, with no obvious impact from network delay. By configuring IDC and rack number for each physical node, it can be ensured that for a virtual node group, virtual nodes are composed of physical nodes from different IDC and different racks, thus implementing remote disaster recovery without other tools. -On the other hand, TDengine supports dynamic modification of the replicas number. Once the number of replicas increases, the newly added virtual nodes will immediately enter the data synchronization process. After synchronization completed, added virtual nodes can provide services. In the synchronization process, master and other synchronized virtual nodes keep serving. With this feature, TDengine can provide IDC migration without service interruption. It is only necessary to add new physical nodes to the existing IDC cluster, and then remove old physical nodes after the data synchronization is completed. +On the other hand, TDengine supports dynamic modification of the replica number. Once the number of replicas increases, the newly added virtual nodes will immediately enter the data synchronization process. After synchronization is complete, added virtual nodes can provide services. In the synchronization process, master and other synchronized virtual nodes keep serving. With this feature, TDengine can provide IDC migration without service interruption. It is only necessary to add new physical nodes to the existing IDC cluster, and then remove old physical nodes after the data synchronization is completed. -However, the asynchronous replication has a tiny time window where data can be lost. The specific scenario is as follows: +However, the asynchronous replication has a very low probability scenario where data may be lost. The specific scenario is as follows: -1. Master vnode has finished its 5-step operations, confirmed the success of writing to APP, and then went down; +1. Master vnode has finished its 5-step operations, confirmed the success of writing to APP, and then goes down; 2. Slave vnode receives the write request, then processing fails before writing to the log in Step 2; 3. Slave vnode will become the new master, thus losing one record. -In theory, for asynchronous replication, there is no guarantee to prevent data loss. However, this window is extremely small, only if mater and slave fail at the same time, and just confirm the successful write to the application before. +In theory, for asynchronous replication, there is no guarantee to prevent data loss. However, this is an extremely low probability scenario as described above. Note: Remote disaster recovery and no-downtime IDC migration are only supported by Enterprise Edition. **Hint: This function is not available yet** @@ -171,43 +173,43 @@ When a vnode starts, the roles (master, slave) are uncertain, and the data is in 1. If there’s only one replica, it’s always master 2. When all replicas are online, the one with latest version is master 3. Over half of online nodes are virtual nodes, and some virtual node is slave, it will automatically become master -4. For 2 and 3, if multiple virtual nodes meet the requirement, the first vnode in virtual node group list will be selected as master +4. For 2 and 3, if multiple virtual nodes meet the requirement, the first vnode in virtual node group list will be selected as master. ### Synchronous Replication For scenarios with strong data consistency requirements, asynchronous data replication is not applicable, because there is a small probability of data loss. So, TDengine provides a synchronous replication mechanism for users. When creating a database, in addition to specifying the number of replicas, user also needs to specify a new parameter “quorum”. If quorum is greater than one, it means that every time the Master forwards a message to the replica, it needs to wait for “quorum-1” reply confirms before informing the application that data has been successfully written in slave. If “quorum-1” reply confirms are not received within a certain period of time, the master vnode will return an error to the application. -With synchronous replication, performance of system will decrease and latency will increase. Because metadata needs strong consistent, the default for data synchronization between mnodes is synchronous replication. +With synchronous replication, performance of system will decrease and latency will increase. Because metadata needs strong consistency, the default for data synchronization between mnodes is synchronous replication. ## Caching and Persistence ### Caching -TDengine adopts a time-driven cache management strategy (First-In-First-Out, FIFO), also known as a Write-driven Cache Management Mechanism. This strategy is different from the read-driven data caching mode (Least-Recent-Used, LRU), which directly put the most recently written data in the system buffer. When the buffer reaches a threshold, the earliest data are written to disk in batches. Generally speaking, for the use of IoT data, users are most concerned about the newly generated data, that is, the current status. TDengine takes full advantage of this feature to put the most recently arrived (current state) data in the buffer. +TDengine adopts a time-driven cache management strategy (First-In-First-Out, FIFO), also known as a Write-driven Cache Management Mechanism. This strategy is different from the read-driven data caching mode (Least-Recent-Used, LRU), which directly puts the most recently written data in the system buffer. When the buffer reaches a threshold, the earliest data are written to disk in batches. Generally speaking, for the use of IoT data, users are most concerned about the most recently generated data, that is, the current status. TDengine takes full advantage of this feature to put the most recently arrived (current state) data in the buffer. -TDengine provides millisecond-level data collecting capability to users through query functions. Putting the recently arrived data directly in the buffer can respond to users' analysis query for the latest piece or batch of data more quickly, and provide faster database query response capability as a whole. In this sense, **TDengine can be used as a data cache by setting appropriate configuration parameters without deploying Redis or other additional cache systems**, which can effectively simplify the system architecture and reduce the operation costs. It should be noted that after the TDengine is restarted, the buffer of the system will be emptied, the previously cached data will be written to disk in batches, and the previously cached data will not be reloaded into the buffer as so in a proprietary key-value cache system. +TDengine provides millisecond-level data collecting capability to users through query functions. Putting the recently arrived data directly in the buffer can respond to users' analysis query for the latest piece or batch of data more quickly, and provide faster database query response capability as a whole. In this sense, **TDengine can be used as a data cache by setting appropriate configuration parameters without deploying Redis or other additional cache systems**. This can effectively simplify the system architecture and reduce operational costs. It should be noted that after TDengine is restarted, the buffer of the system will be emptied, the previously cached data will be written to disk in batches, and the previously cached data will not be reloaded into the buffer. In this sense, TDengine's cache differs from proprietary key-value cache systems. Each vnode has its own independent memory, and it is composed of multiple memory blocks of fixed size, and different vnodes are completely isolated. When writing data, similar to the writing of logs, data is sequentially added to memory, but each vnode maintains its own skip list for quick search. When more than one third of the memory block are used, the disk writing operation will start, and the subsequent writing operation is carried out in a new memory block. By this design, one third of the memory blocks in a vnode keep the latest data, so as to achieve the purpose of caching and quick search. The number of memory blocks of a vnode is determined by the configuration parameter “blocks”, and the size of memory blocks is determined by the configuration parameter “cache”. ### Persistent Storage -TDengine uses a data-driven method to write the data from buffer into hard disk for persistent storage. When the cached data in vnode reaches a certain volume, TDengine will also pull up the disk-writing thread to write the cached data into persistent storage in order not to block subsequent data writing. TDengine will open a new database log file when the data is written, and delete the old database log file after written successfully to avoid unlimited log growth. +TDengine uses a data-driven method to write the data from buffer into hard disk for persistent storage. When the cached data in vnode reaches a certain volume, TDengine will pull up the disk-writing thread to write the cached data into persistent storage so that subsequent data writing is not blocked. TDengine will open a new database log file when the data is written, and delete the old database log file after successfull persistence, to avoid unlimited log growth. -To make full use of the characteristics of time-series data, TDengine splits the data stored in persistent storage by a vnode into multiple files, each file only saves data for a fixed number of days, which is determined by the system configuration parameter `“days”`. By so, for the given start and end date of a query, you can locate the data files to open immediately without any index, thus greatly speeding up reading operations. +To make full use of the characteristics of time-series data, TDengine splits the data stored in persistent storage by a vnode into multiple files, each file only saves data for a fixed number of days, which is determined by the system configuration parameter `“days”`. Thus for given start and end dates of a query, you can locate the data files to open immediately without any index. This greatly speeds up read operations. For time-series data, there is generally a retention policy, which is determined by the system configuration parameter `“keep”`. Data files exceeding this set number of days will be automatically deleted by the system to free up storage space. Given “days” and “keep” parameters, the total number of data files in a vnode is: keep/days. The total number of data files should not be too large or too small. 10 to 100 is appropriate. Based on this principle, reasonable days can be set. In the current version, parameter “keep” can be modified, but parameter “days” cannot be modified once it is set. -In each data file, the data of a table is stored by blocks. A table can have one or more data file blocks. In a file block, data is stored in columns, occupying a continuous storage space, thus greatly improving the reading speed. The size of file block is determined by the system parameter `“maxRows”` (the maximum number of records per block), and the default value is 4096. This value should not be too large or too small. If it is too large, the data locating in search will cost longer; if too small, the index of data block is too large, and the compression efficiency will be low with slower reading speed. +In each data file, the data of a table is stored in blocks. A table can have one or more data file blocks. In a file block, data is stored in columns, occupying a continuous storage space, thus greatly improving the reading speed. The size of file block is determined by the system parameter `“maxRows”` (the maximum number of records per block), and the default value is 4096. This value should not be too large or too small. If it is too large, data location for queries will take a longer tim. If it is too small, the index of data block is too large, and the compression efficiency will be low with slower reading speed. -Each data file (with a .data postfix) has a corresponding index file (with a .head postfix). The index file has summary information of a data block for each table, recording the offset of each data block in the data file, start and end time of data and other information, so as to lead system quickly locate the data to be found. Each data file also has a corresponding last file (with a .last postfix), which is designed to prevent data block fragmentation when written in disk. If the number of written records from a table does not reach the system configuration parameter `“minRows”` (minimum number of records per block), it will be stored in the last file first. When write to disk next time, the newly written records will be merged with the records in last file and then written into data file. +Each data file (with a .data postfix) has a corresponding index file (with a .head postfix). The index file has summary information of a data block for each table, recording the offset of each data block in the data file, start and end time of data and other information which allows the system to locate the data to be found very quickly. Each data file also has a corresponding last file (with a .last postfix), which is designed to prevent data block fragmentation when written in disk. If the number of written records from a table does not reach the system configuration parameter `“minRows”` (minimum number of records per block), it will be stored in the last file first. At the next write operation to the disk, the newly written records will be merged with the records in last file and then written into data file. -When data is written to disk, it is decided whether to compress the data according to system configuration parameter `“comp”`. TDengine provides three compression options: no compression, one-stage compression and two-stage compression, corresponding to comp values of 0, 1 and 2 respectively. One-stage compression is carried out according to the type of data. Compression algorithms include delta-delta coding, simple 8B method, zig-zag coding, LZ4 and other algorithms. Two-stage compression is based on one-stage compression and compressed by general compression algorithm, which has higher compression ratio. +When data is written to disk, the system decideswhether to compress the data based on the system configuration parameter `“comp”`. TDengine provides three compression options: no compression, one-stage compression and two-stage compression, corresponding to comp values of 0, 1 and 2 respectively. One-stage compression is carried out according to the type of data. Compression algorithms include delta-delta coding, simple 8B method, zig-zag coding, LZ4 and other algorithms. Two-stage compression is based on one-stage compression and compressed by general compression algorithm, which has higher compression ratio. ### Tiered Storage -By default, TDengine saves all data in /var/lib/taos directory, and the data files of each vnode are saved in a different directory under this directory. In order to expand the storage space, minimize the bottleneck of file reading and improve the data throughput rate, TDengine can configure the system parameter “dataDir” to allow multiple mounted hard disks to be used by system at the same time. In addition, TDengine also provides the function of tiered data storage, i.e. storage on different storage media according to the time stamps of data files. For example, the latest data is stored on SSD, the data for more than one week is stored on local hard disk, and the data for more than four weeks is stored on network storage device, thus reducing the storage cost and ensuring efficient data access. The movement of data on different storage media is automatically done by the system and completely transparent to applications. Tiered storage of data is also configured through the system parameter “dataDir”. +By default, TDengine saves all data in /var/lib/taos directory, and the data files of each vnode are saved in a different directory under this directory. In order to expand the storage space, minimize the bottleneck of file reading and improve the data throughput rate, TDengine can configure the system parameter “dataDir” to allow multiple mounted hard disks to be used by system at the same time. In addition, TDengine also provides the function of tiered data storage, i.e. storage on different storage media according to the time stamps of data files. For example, the latest data is stored on SSD, the data older than a week is stored on local hard disk, and data older than four weeks is stored on network storage device. This reduces storage costs and ensures efficient data access. The movement of data on different storage media is automatically done by the system and is completely transparent to applications. Tiered storage of data is also configured through the system parameter “dataDir”. dataDir format is as follows: ``` @@ -216,7 +218,7 @@ dataDir data_path [tier_level] Where data_path is the folder path of mount point and tier_level is the media storage-tier. The higher the media storage-tier, means the older the data file. Multiple hard disks can be mounted at the same storage-tier, and data files on the same storage-tier are distributed on all hard disks within the tier. TDengine supports up to 3 tiers of storage, so tier_level values are 0, 1, and 2. When configuring dataDir, there must be only one mount path without specifying tier_level, which is called special mount disk (path). The mount path defaults to level 0 storage media and contains special file links, which cannot be removed, otherwise it will have a devastating impact on the written data. -Suppose a physical node with six mountable hard disks/mnt/disk1,/mnt/disk2, …,/mnt/disk6, where disk1 and disk2 need to be designated as level 0 storage media, disk3 and disk4 are level 1 storage media, and disk5 and disk6 are level 2 storage media. Disk1 is a special mount disk, you can configure it in/etc/taos/taos.cfg as follows: +Suppose there is a physical node with six mountable hard disks/mnt/disk1,/mnt/disk2, …,/mnt/disk6, where disk1 and disk2 need to be designated as level 0 storage media, disk3 and disk4 are level 1 storage media, and disk5 and disk6 are level 2 storage media. Disk1 is a special mount disk, you can configure it in/etc/taos/taos.cfg as follows: ``` dataDir /mnt/disk1/taos @@ -233,11 +235,11 @@ Note: Tiered Storage is only supported in Enterprise Edition ## Data Query -TDengine provides a variety of query processing functions for tables and STables. In addition to common aggregation queries, TDengine also provides window queries and statistical aggregation functions for time-series data. The query processing of TDengine needs the collaboration of client, vnode and mnode. +TDengine provides a variety of query processing functions for tables and STables. In addition to common aggregation queries, TDengine also provides window queries and statistical aggregation functions for time-series data. Query processing in TDengine needs the collaboration of client, vnode and mnode. ### Single Table Query -The parsing and verification of SQL statements are completed on the client side. SQL statements are parsed and generate an Abstract Syntax Tree (AST), which is then checksummed. Then request metadata information (table metadata) for the table specified in the query from management node (mnode). +The parsing and verification of SQL statements are completed on the client side. SQL statements are parsed and generate an Abstract Syntax Tree (AST), which is then checksummed. Then metadata information (table metadata) for the table specified is requested in the query from management node (mnode). According to the End Point information in metadata information, the query request is serialized and sent to the data node (dnode) where the table is located. After receiving the query, the dnode identifies the virtual node (vnode) pointed to and forwards the message to the query execution queue of the vnode. The query execution thread of vnode establishes the basic query execution environment, immediately returns the query request and starts executing the query at the same time. @@ -245,9 +247,9 @@ When client obtains query result, the worker thread in query execution queue of ### Aggregation by Time Axis, Downsampling, Interpolation -The remarkable feature that time-series data is different from ordinary data is that each record has a timestamp, so aggregating data with timestamps on the time axis is an important and distinct feature from common databases. From this point of view, it is similar to the window query of stream computing engine. +Time-series data is different from ordinary data in that each record has a timestamp. So aggregating data by timestamps on the time axis is an important and distinct feature of time-series databases which is different from that of common databases. It is similar to the window query of stream computing engines. -The keyword `interval` is introduced into TDengine to split fixed length time windows on time axis, and the data are aggregated based on time windows, and the data within window range are aggregated as needed. For example: +The keyword `interval` is introduced into TDengine to split fixed length time windows on the time axis. The data is aggregated based on time windows, and the data within time window ranges is aggregated as needed. For example: ```mysql select count(*) from d1001 interval(1h); @@ -265,7 +267,7 @@ For the data collected by device D1001, the number of records per hour is counte ### Multi-table Aggregation Query -TDengine creates a separate table for each data collection point, but in practical applications, it is often necessary to aggregate data from different data collection points. In order to perform aggregation operations efficiently, TDengine introduces the concept of STable. STable is used to represent a specific type of data collection point. It is a table set containing multiple tables. The schema of each table in the set is the same, but each table has its own static tag. The tags can be multiple and be added, deleted and modified at any time. Applications can aggregate or statistically operate all or a subset of tables under a STABLE by specifying tag filters, thus greatly simplifying the development of applications. The process is shown in the following figure: +TDengine creates a separate table for each data collection point, but in practical applications, it is often necessary to aggregate data from different data collection points. In order to perform aggregation operations efficiently, TDengine introduces the concept of STable (super table). STable is used to represent a specific type of data collection point. It is a table set containing multiple tables. The schema of each table in the set is the same, but each table has its own static tag. There can be multiple tags which can be added, deleted and modified at any time. Applications can aggregate or statistically operate on all or a subset of tables under a STABLE by specifying tag filters. This greatly simplifies the development of applications. The process is shown in the following figure: ![TDengine Database Diagram of multi-table aggregation query](multi_tables.webp)
Figure 5: Diagram of multi-table aggregation query
@@ -274,12 +276,12 @@ TDengine creates a separate table for each data collection point, but in practic 2. TAOSC sends the STable name to Meta Node(management node); 3. Management node sends the vnode list owned by the STable back to TAOSC; 4. TAOSC sends the computing request together with tag filters to multiple data nodes corresponding to these vnodes; -5. Each vnode first finds out the set of tables within its own node that meet the tag filters from memory, then scans the stored time-series data, completes corresponding aggregation calculations, and returns result to TAOSC; +5. Each vnode first finds the set of tables within its own node that meet the tag filters from memory, then scans the stored time-series data, completes corresponding aggregation calculations, and returns result to TAOSC; 6. TAOSC finally aggregates the results returned by multiple data nodes and send them back to application. -Since TDengine stores tag data and time-series data separately in vnode, by filtering tag data in memory, the set of tables that need to participate in aggregation operation is first found, which greatly reduces the volume of data scanned and improves aggregation speed. At the same time, because the data is distributed in multiple vnodes/dnodes, the aggregation operation is carried out concurrently in multiple vnodes, which further improves the aggregation speed. Aggregation functions for ordinary tables and most operations are applicable to STables. The syntax is exactly the same. Please see TAOS SQL for details. +Since TDengine stores tag data and time-series data separately in vnode, by filtering tag data in memory, the set of tables that need to participate in aggregation operation is first found, which reduces the volume of data to be scanned and improves aggregation speed. At the same time, because the data is distributed in multiple vnodes/dnodes, the aggregation operation is carried out concurrently in multiple vnodes, which further improves the aggregation speed. Aggregation functions for ordinary tables and most operations are applicable to STables. The syntax is exactly the same. Please see TAOS SQL for details. ### Precomputation -In order to effectively improve the performance of query processing, based-on the unchangeable feature of IoT data, statistical information of data stored in data block is recorded in the head of data block, including max value, min value, and sum. We call it a precomputing unit. If the query processing involves all the data of a whole data block, the pre-calculated results are directly used, and no need to read the data block contents at all. Since the amount of pre-calculated data is much smaller than the actual size of data block stored on disk, for query processing with disk IO as bottleneck, the use of pre-calculated results can greatly reduce the pressure of reading IO and accelerate the query process. The precomputation mechanism is similar to the index BRIN (Block Range Index) of PostgreSQL. +In order to effectively improve the performance of query processing, based-on the unchangeable feature of IoT data, statistical information of data stored in data block is recorded in the head of data block, including max value, min value, and sum. We call it a precomputing unit. If the query processing involves all the data of a whole data block, the pre-calculated results are directly used, and no need to read the data block contents at all. Since the amount of pre-calculated data is much smaller than the actual size of data block stored on disk, for query processing with disk IO as bottleneck, the use of pre-calculated results can greatly reduce the pressure of reading IO and accelerate the query process. The precomputation mechanism is similar to the BRIN (Block Range Index) of PostgreSQL. diff --git a/docs-en/25-application/01-telegraf.md b/docs-en/25-application/01-telegraf.md index 6a57145cd3d82ca5ec1ab828bfc7b6270bbe9d47..d30a23fe1b942e1411e8b5f1320e1c54ae2b407f 100644 --- a/docs-en/25-application/01-telegraf.md +++ b/docs-en/25-application/01-telegraf.md @@ -5,16 +5,16 @@ title: Quickly Build IT DevOps Visualization System with TDengine + Telegraf + G ## Background -TDengine is a big data platform designed and optimized for IoT (Internet of Things), Vehicle Telematics, Industrial Internet, IT DevOps, etc. by TAOSData. Since it opened its source code in July 2019, it has won the favor of a large number of time-series data developers with its innovative data modeling design, convenient installation, easy-to-use programming interface, and powerful data writing and query performance. +TDengine is a big data platform designed and optimized for IoT (Internet of Things), Vehicle Telemetry, Industrial Internet, IT DevOps and other applications. Since it was open-sourced in July 2019, it has won the favor of a large number of time-series data developers with its innovative data modeling design, convenient installation, easy-to-use programming interface, and powerful data writing and query performance. IT DevOps metric data usually are time sensitive, for example: - System resource metrics: CPU, memory, IO, bandwidth, etc. - Software system metrics: health status, number of connections, number of requests, number of timeouts, number of errors, response time, service type, and other business-related metrics. -Current mainstream IT DevOps system usually include a data collection module, a data persistent module, and a visualization module; Telegraf and Grafana are one of the most popular data collection modules and visualization modules, respectively. The data persistent module is available in a wide range of options, with OpenTSDB or InfluxDB being the most popular. TDengine, as an emerging time-series big data platform, has the advantages of high performance, high reliability, easy management and easy maintenance. +Current mainstream IT DevOps system usually include a data collection module, a data persistent module, and a visualization module; Telegraf and Grafana are one of the most popular data collection modules and visualization modules, respectively. The data persistence module is available in a wide range of options, with OpenTSDB or InfluxDB being the most popular. TDengine, as an emerging time-series big data platform, has the advantages of high performance, high reliability, easy management and easy maintenance. -This article introduces how to quickly build a TDengine + Telegraf + Grafana based IT DevOps visualization system without writing even a single line of code and by simply modifying a few lines of configuration files. The architecture is as follows. +This article introduces how to quickly build a TDengine + Telegraf + Grafana based IT DevOps visualization system without writing even a single line of code and by simply modifying a few lines in configuration files. The architecture is as follows. ![TDengine Database IT-DevOps-Solutions-Telegraf](./IT-DevOps-Solutions-Telegraf.webp) @@ -79,5 +79,5 @@ Click on the plus icon on the left and select `Import` to get the data from `htt ## Wrap-up -The above demonstrates how to quickly build a IT DevOps visualization system. Thanks to the new schemaless protocol parsing feature in TDengine version 2.4.0.0 and the powerful ecological software adaptation capability, users can build an efficient and easy-to-use IT DevOps visualization system in just a few minutes. +The above demonstrates how to quickly build a IT DevOps visualization system. Thanks to the new schemaless protocol parsing feature in TDengine version 2.4.0.0 and ability to integrate easily with a large software ecosystem, users can build an efficient and easy-to-use IT DevOps visualization system in just a few minutes. Please refer to the official documentation and product implementation cases for other features. diff --git a/docs-en/25-application/02-collectd.md b/docs-en/25-application/02-collectd.md index 963881eafa6e5085eab951c1b1ab54faeba1fa7b..1733ed1b1af8c9375c3773d1ca86831396499a78 100644 --- a/docs-en/25-application/02-collectd.md +++ b/docs-en/25-application/02-collectd.md @@ -5,17 +5,17 @@ title: Quickly build an IT DevOps visualization system using TDengine + collectd ## Background -TDengine is a big data platform designed and optimized for IoT (Internet of Things), Vehicle Telematics, Industrial Internet, IT DevOps, etc. by TAOSData. Since it opened its source code in July 2019, it has won the favor of a large number of time-series data developers with its innovative data modeling design, convenient installation, easy-to-use programming interface, and powerful data writing and query performance. +TDengine is a big data platform designed and optimized for IoT (Internet of Things), Vehicle Telemetry, Industrial Internet, IT DevOps and other applications. Since it was open-sourced in July 2019, it has won the favor of a large number of time-series data developers with its innovative data modeling design, convenient installation, easy-to-use programming interface, and powerful data writing and query performance. IT DevOps metric data usually are time sensitive, for example: - System resource metrics: CPU, memory, IO, bandwidth, etc. - Software system metrics: health status, number of connections, number of requests, number of timeouts, number of errors, response time, service type, and other business-related metrics. -The current mainstream IT DevOps visualization system usually contains a data collection module, a data persistent module, and a visual display module. collectd/StatsD, as an old-fashion open source data collection tool, has a wide user base. However, collectd/StatsD has limited functionality, and often needs to be combined with Telegraf, Grafana, and a time-series database to build a complete monitoring system. +The current mainstream IT DevOps visualization system usually contains a data collection module, a data persistence module, and a visual display module. collectd/StatsD, as an old-fashion open source data collection tool, has a wide user base. However, collectd/StatsD has limited functionality, and often needs to be combined with Telegraf, Grafana, and a time-series database to build a complete monitoring system. The new version of TDengine supports multiple data protocols and can accept data from collectd and StatsD directly, and provides Grafana dashboard for graphical display. -This article introduces how to quickly build an IT DevOps visualization system based on TDengine + collectd / StatsD + Grafana without writing even a single line of code but by simply modifying a few lines of configuration files. The architecture is shown in the following figure. +This article introduces how to quickly build an IT DevOps visualization system based on TDengine + collectd / StatsD + Grafana without writing even a single line of code but by simply modifying a few lines in configuration files. The architecture is shown in the following figure. ![TDengine Database IT-DevOps-Solutions-Collectd-StatsD](./IT-DevOps-Solutions-Collectd-StatsD.webp) @@ -99,6 +99,6 @@ Download the dashboard json from `https://github.com/taosdata/grafanaplugin/blob ## Wrap-up -TDengine, as an emerging time-series big data platform, has the advantages of high performance, high reliability, easy management and easy maintenance. Thanks to the new schemaless protocol parsing function in TDengine version 2.4.0.0 and the powerful ecological software adaptation capability, users can build an efficient and easy-to-use IT DevOps visualization system or adapt to an existing system in just a few minutes. +TDengine, as an emerging time-series big data platform, has the advantages of high performance, high reliability, easy management and easy maintenance. Thanks to the new schemaless protocol parsing feature in TDengine version 2.4.0.0 and ability to integrate easily with a large software ecosystem, users can build an efficient and easy-to-use IT DevOps visualization system, or adapt an existing system, in just a few minutes. For TDengine's powerful data writing and querying performance and other features, please refer to the official documentation and successful product implementation cases. diff --git a/docs-en/25-application/03-immigrate.md b/docs-en/25-application/03-immigrate.md index 69166bf78b66a23af35af726f2e5c477195a3595..4d47aec1d76014ba63f6be91004abcc3934769f7 100644 --- a/docs-en/25-application/03-immigrate.md +++ b/docs-en/25-application/03-immigrate.md @@ -3,10 +3,9 @@ sidebar_label: OpenTSDB Migration to TDengine title: Best Practices for Migrating OpenTSDB Applications to TDengine --- -As a distributed, scalable, HBase-based distributed time-series database software, thanks to its first-mover advantage, OpenTSDB has been introduced and widely used in DevOps by people. However, using new technologies like cloud computing, microservices, and containerization technology with rapid development. Enterprise-level services are becoming more and more diverse. The architecture is becoming more complex. +As a distributed, scalable, distributed time-series database platform based on HBase, and thanks to its first-mover advantage, OpenTSDB is widely used for monitoring in DevOps. However, as new technologies like cloud computing, microservices, and containerization technology has developed rapidly, Enterprise-level services are becoming more and more diverse and the architecture is becoming more complex. -From this situation, it increasingly plagues to use of OpenTSDB as a DevOps backend storage for monitoring by performance issues and delayed feature upgrades. The resulting increase in application deployment costs and reduced operational efficiency. -These problems are becoming increasingly severe as the system scales up. +As a result, as a DevOps backend for monitoring, OpenTSDB is plagued by performance issues and delayed feature upgrades. This has resulted in increased application deployment costs and reduced operational efficiency. These problems become increasingly severe as the system tries to scale up. To meet the fast-growing IoT big data market and technical needs, TAOSData developed an innovative big-data processing product, **TDengine**. @@ -14,14 +13,14 @@ After learning the advantages of many traditional relational databases and NoSQL Compared with OpenTSDB, TDengine has the following distinctive features. -- Performance of data writing and querying far exceeds that of OpenTSDB. -- Efficient compression mechanism for time-series data, which compresses less than 1/5 of the storage space on disk. -- The installation and deployment are straightforward. A single installation package can complete the installation and deployment and does not rely on other third-party software. The entire installation and deployment process in a few seconds; -- The built-in functions cover all of OpenTSDB's query functions. And support more time-series data query functions, scalar functions, and aggregation functions. And support advanced query functions such as multiple time-window aggregations, join query, expression operation, multiple group aggregation, user-defined sorting, and user-defined functions. Adopting SQL-like syntax rules is more straightforward and has no learning cost. +- Data writing and querying performance far exceeds that of OpenTSDB. +- Efficient compression mechanism for time-series data, which compresses to less than 1/5 of the storage space, on disk. +- The installation and deployment are straightforward. A single installation package can complete the installation and deployment and does not rely on other third-party software. The entire installation and deployment process takes a few seconds. +- The built-in functions cover all of OpenTSDB's query functions and TDengine supports more time-series data query functions, scalar functions, and aggregation functions. TDengine also supports advanced query functions such as multiple time-window aggregations, join query, expression operation, multiple group aggregation, user-defined sorting, and user-defined functions. With a SQL-like query language, querying is more straightforward and has no learning cost. - Supports up to 128 tags, with a total tag length of 16 KB. - In addition to the REST interface, it also provides interfaces to Java, Python, C, Rust, Go, C# and other languages. Its supports a variety of enterprise-class standard connector protocols such as JDBC. -If we migrate the applications originally running on OpenTSDB to TDengine, we will effectively reduce the compute and storage resource consumption and the number of deployed servers. And will also significantly reduce the operation and maintenance costs, making operation and maintenance management more straightforward and more accessible, and considerably reducing the total cost of ownership. Like OpenTSDB, TDengine has also been open-sourced, including the stand-alone version and the cluster version source code. So there is no need to be concerned about the vendor-lock problem. +Migrating applications originally running on OpenTSDB to TDengine, effectively reduces compute and storage resource consumption and the number of deployed servers. It also significantly reduces operation and maintenance costs, makes operation and maintenance management more straightforward and more accessible, and considerably reduces the total cost of ownership. Like OpenTSDB, TDengine has also been open-sourced. Both the stand-alone version and the cluster version are open-sourced and there is no need to be concerned about the vendor-lock problem. We will explain how to migrate OpenTSDB applications to TDengine quickly, securely, and reliably without coding, using the most typical DevOps scenarios. Subsequent chapters will go into more depth to facilitate migration for non-DevOps systems. @@ -34,7 +33,7 @@ The following figure (Figure 1) shows the system's overall architecture for a ty **Figure 1. Typical architecture in a DevOps scenario** ![TDengine Database IT-DevOps-Solutions-Immigrate-OpenTSDB-Arch](./IT-DevOps-Solutions-Immigrate-OpenTSDB-Arch.webp "Figure 1. Typical architecture in a DevOps scenario") -In this application scenario, there are Agent tools deployed in the application environment to collect machine metrics, network metrics, and application metrics. Data collectors to aggregate information collected by agents, systems for persistent data storage and management, and tools for monitoring data visualization (e.g., Grafana, etc.). +In this application scenario, there are Agent tools deployed in the application environment to collect machine metrics, network metrics, and application metrics. There are also data collectors to aggregate information collected by agents, systems for persistent data storage and management, and tools for data visualization (e.g., Grafana, etc.). The agents deployed in the application nodes are responsible for providing operational metrics from different sources to collectd/Statsd. And collectd/StatsD is accountable for pushing the aggregated data to the OpenTSDB cluster system and then visualizing the data using the visualization kanban board software, Grafana. @@ -44,15 +43,15 @@ The agents deployed in the application nodes are responsible for providing opera First of all, please install TDengine. Download the latest stable version of TDengine from the official website and install it. For help with using various installation packages, please refer to the blog ["Installation and Uninstallation of TDengine Multiple Installation Packages"](https://www.taosdata.com/blog/2019/08/09/566.html). -Note that once the installation is complete, do not start the `taosd` service immediately, but after properly configuring the parameters. +Note that once the installation is complete, do not start the `taosd` service before properly configuring the parameters. - **Adjusting the data collector configuration** TDengine version 2.4 and later version includes `taosAdapter`. taosAdapter is a stateless, rapidly elastic, and scalable component. taosAdapter supports Influxdb's Line Protocol and OpenTSDB's telnet/JSON writing protocol specification, providing rich data access capabilities, effectively saving user migration costs and reducing the difficulty of user migration. -Users can flexibly deploy taosAdapter instances according to their requirements to rapidly improve the throughput of data writes in conjunction with the needs of scenarios and provide guarantees for data writes in different application scenarios. +Users can flexibly deploy taosAdapter instances, based on their requirements, to improve data writing throughput and provide guarantees for data writes in different application scenarios. -Through taosAdapter, users can directly push the data collected by `collectd` or `StatsD` to TDengine to achieve seamless migration of application scenarios, which is very easy and convenient. taosAdapter also supports Telegraf, Icinga, TCollector, and node_exporter data. For more details, please refer to [taosAdapter](/reference/taosadapter/). +Through taosAdapter, users can directly write the data collected by `collectd` or `StatsD` to TDengine to achieve easy, convenient and seamless migration in application scenarios. taosAdapter also supports Telegraf, Icinga, TCollector, and node_exporter data. For more details, please refer to [taosAdapter](/reference/taosadapter/). If using collectd, modify the configuration file in its default location `/etc/collectd/collectd.conf` to point to the IP address and port of the node where to deploy taosAdapter. For example, assuming the taosAdapter IP address is 192.168.1.130 and port 6046, configure it as follows. @@ -66,56 +65,55 @@ LoadPlugin write_tsdb ``` -You can use collectd and push the data to taosAdapter utilizing the push to OpenTSDB plugin. taosAdapter will call the API to write the data to TDengine, thus completing the writing of the data. If you are using StatsD, adjust the profile information accordingly. +You can use collectd and push the data to taosAdapter utilizing the write_tsdb plugin. taosAdapter will call the API to write the data to TDengine. If you are using StatsD, adjust the profile information accordingly. - **Tuning the Dashboard system** -After writing the data to TDengine properly, you can adapt Grafana to visualize the data written to TDengine. To obtain and use the Grafana plugin provided by TDengine, please refer to [Links to other tools](/third-party/grafana). +After writing the data to TDengine, you can configure Grafana to visualize the data written to TDengine. To obtain and use the Grafana plugin provided by TDengine, please refer to [Links to other tools](/third-party/grafana). TDengine provides two sets of Dashboard templates by default, and users only need to import the templates from the Grafana directory into Grafana to activate their use. **Importing Grafana Templates** Figure 2. ![TDengine Database IT-DevOps-Solutions-Immigrate-OpenTSDB-Dashboard](./IT-DevOps-Solutions-Immigrate-OpenTSDB-Dashboard.webp "Figure 2. Importing a Grafana Template") -After the above steps, you completed the migration to replace OpenTSDB with TDengine. You can see that the whole process is straightforward, there is no need to write any code, and only some configuration files need to be adjusted to meet the migration work. +With the above steps completed, you have finished replacing OpenTSDB with TDengine. You can see that the whole process is straightforward, there is no need to write any code, and only some configuration files need to be changed. ### 3. Post-migration architecture -After completing the migration, the figure below (Figure 3) shows the system's overall architecture. The whole process of the acquisition side, the data writing, and the monitoring and presentation side are all kept stable, except for a few configuration adjustments, which do not involve any critical changes or alterations. OpenTSDB to TDengine migration action, using TDengine more powerful processing power and query performance. +After completing the migration, the figure below (Figure 3) shows the system's overall architecture. The whole process of the acquisition side, the data writing, and the monitoring and presentation side are all kept stable. There are a few configuration adjustments, which do not involve any critical changes or alterations. Migrating to TDengine from OpenTSDB leads to powerful processing power and query performance. -In most DevOps scenarios, if you have a small OpenTSDB cluster (3 or fewer nodes) for providing the storage layer of DevOps and rely on OpenTSDB to give a data persistence layer and query capabilities, you can safely replace OpenTSDB with TDengine. TDengine will save more compute and storage resources. With the same compute resource allocation, a single TDengine can meet the service capacity provided by 3 to 5 OpenTSDB nodes. If the scale is more prominent, then TDengine clustering is required. - -Suppose your application is particularly complex, or the application domain is not a DevOps scenario. You can continue reading subsequent chapters for a more comprehensive and in-depth look at the advanced topics of migrating an OpenTSDB application to TDengine. +In most DevOps scenarios, if you have a small OpenTSDB cluster (3 or fewer nodes) which provides storage and data persistence layer in addition to query capability, you can safely replace OpenTSDB with TDengine. TDengine will save compute and storage resources. With the same compute resource allocation, a single TDengine can meet the service capacity provided by 3 to 5 OpenTSDB nodes. TDengine clustering may be required depending on the scale of the application. **Figure 3. System architecture after migration** ![TDengine Database IT-DevOps-Solutions-Immigrate-TDengine-Arch](./IT-DevOps-Solutions-Immigrate-TDengine-Arch.webp "Figure 3. System architecture after migration completion") +The following chapters provide a more comprehensive and in-depth look at the advanced topics of migrating an OpenTSDB application to TDengine. This will be useful if your application is particularly complex and is not a DevOps application. + ## Migration evaluation and strategy for other scenarios ### 1. Differences between TDengine and OpenTSDB This chapter describes the differences between OpenTSDB and TDengine at the system functionality level. After reading this chapter, you can fully evaluate whether you can migrate some complex OpenTSDB-based applications to TDengine, and what you should pay attention to after migration. -TDengine currently only supports Grafana for visual kanban rendering, so if your application uses front-end kanban boards other than Grafana (e.g., [TSDash](https://github.com/facebook/tsdash), [Status Wolf](https://github.com/box/StatusWolf), etc.). You cannot directly migrate those front-end kanbans to TDengine, and the front-end kanban will need to be ported to Grafana to work correctly. +TDengine currently only supports Grafana for visual kanban rendering, so if your application uses front-end kanban boards other than Grafana (e.g., [TSDash](https://github.com/facebook/tsdash), [Status Wolf](https://github.com/box/StatusWolf), etc.) you cannot directly migrate those front-end kanbans to TDengine. The front-end kanban will need to be ported to Grafana to work correctly. -TDengine version 2.3.0.x only supports collectd and StatsD as data collection aggregation software but will provide more data collection aggregation software in the future. If you use other data aggregators on the collection side, your application needs to be ported to these two data aggregation systems to write data correctly. +TDengine version 2.3.0.x only supports collectd and StatsD as data collection and aggregation software but future versions will provide support for more data collection and aggregation software in the future. If you use other data aggregators on the collection side, your application needs to be ported to these two data aggregation systems to write data correctly. In addition to the two data aggregator software protocols mentioned above, TDengine also supports writing data directly via InfluxDB's line protocol and OpenTSDB's data writing protocol, JSON format. You can rewrite the logic on the data push side to write data using the line protocols supported by TDengine. -In addition, if your application uses the following features of OpenTSDB, you need to understand the following considerations before migrating your application to TDengine. +In addition, if your application uses the following features of OpenTSDB, you need to take into account the following considerations before migrating your application to TDengine. 1. `/api/stats`: If your application uses this feature to monitor the service status of OpenTSDB, and you have built the relevant logic to link the processing in your application, then this part of the status reading and fetching logic needs to be re-adapted to TDengine. TDengine provides a new mechanism for handling cluster state monitoring to meet the monitoring and maintenance needs of your application. -2. `/api/tree`: If you rely on this feature of OpenTSDB for the hierarchical organization and maintenance of timelines, you cannot migrate it directly to TDengine, which uses a database -> super table -> sub-table hierarchy to organize and maintain timelines, with all timelines belonging to the same super table in the same system hierarchy, but it is possible to simulate a logical multi-level structure of the application through the unique construction of different tag values. -3. `Rollup And PreAggregates`: The use of Rollup and PreAggregates requires the application to decide where to access the Rollup results and, in some scenarios, to access the actual results. The opacity of this structure makes the application processing logic extraordinarily complex and not portable at all. We think this strategy is a compromise when the time-series database does not. -TDengine does not support automatic downsampling of multiple timelines and preaggregation (for a range of periods) for the time being. Still, thanks to its high-performance query processing logic can provide very high-performance query responses without relying on Rollup and preaggregation (for a range of periods), making your application query processing logic much more straightforward. -The logic is much simpler. -4. `Rate`: TDengine provides two functions to calculate the rate of change of values, namely `Derivative` (the result is consistent with the Derivative behavior of InfluxDB) and `IRate` (the result is compatible with the IRate function in Prometheus). However, the results of these two functions are slightly different from Rate, but the functions are more powerful overall. In addition, TDengine supports all the calculation functions provided by OpenTSDB, and TDengine's query functions are much more potent than those supported by OpenTSDB, which can significantly simplify the processing logic of your application. +2. `/api/tree`: If you rely on this feature of OpenTSDB for the hierarchical organization and maintenance of timelines, you cannot migrate it directly to TDengine, which uses a database -> super table -> sub-table hierarchy to organize and maintain timelines, with all timelines belonging to the same super table in the same system hierarchy. But it is possible to simulate a logical multi-level structure of the application through the unique construction of different tag values. +3. `Rollup And PreAggregates`: The use of Rollup and PreAggregates requires the application to decide where to access the Rollup results and, in some scenarios, to access the actual results. The opacity of this structure makes the application processing logic extraordinarily complex and not portable at all. +While TDengine does not currently support automatic downsampling of multiple timelines and preaggregation (for a range of periods), thanks to its high-performance query processing logic, it can provide very high-performance query responses without relying on Rollup and preaggregation (for a range of periods). This makes your application query processing logic straightforward and simple. +4. `Rate`: TDengine provides two functions to calculate the rate of change of values, namely `Derivative` (the result is consistent with the Derivative behavior of InfluxDB) and `IRate` (the result is compatible with the IRate function in Prometheus). However, the results of these two functions are slightly different from that of Rate. But the TDengine functions are more powerful. In addition, TDengine supports all the calculation functions provided by OpenTSDB. TDengine's query functions are much more powerful than those supported by OpenTSDB, which can significantly simplify the processing logic of your application. -Through the above introduction, I believe you should be able to understand the changes brought about by the migration of OpenTSDB to TDengine. And this information will also help you correctly determine whether you would migrate your application to TDengine to experience the powerful and convenient time-series data processing capability provided by TDengine. +With the above introduction, we believe you should be able to understand the changes brought about by the migration of OpenTSDB to TDengine. And this information will also help you correctly determine whether you should migrate your application to TDengine to experience the powerful and convenient time-series data processing capability provided by TDengine. ### 2. Migration strategy suggestion -First, the OpenTSDB-based system migration involves data schema design, system scale estimation, and data write end transformation, data streaming, and application adaptation; after that, the two systems will run in parallel for a while and then migrate the historical data to TDengine. Of course, if your application has some functions that strongly depend on the above OpenTSDB features and you do not want to stop using them, you can migrate the historical data to TDengine. -You can consider keeping the original OpenTSDB system running while starting TDengine to provide the primary services. +OpenTSDB-based system migration involves data schema design, system scale estimation, data write transformation, data streaming, and application changes. The two systems should run in parallel for a while and then the historical data should be migrated to TDengine if your application has some functions that strongly depend on the above OpenTSDB features and you do not want to stop using them. +You can also consider keeping the original OpenTSDB system running while using TDengine to provide the primary services. ## Data model design @@ -129,16 +127,19 @@ Let us now assume a DevOps scenario where we use collectd to collect the underly | 2 | swap | value | double | host | swap_type | swap_type_instance | source | n/a | | 3 | disk | value | double | host | disk_point | disk_instance | disk_type | source | -TDengine requires the data stored to have a data schema, i.e., you need to create a super table and specify the schema of the super table before writing the data. For data schema creation, you have two ways to do this: 1) Take advantage of TDengine's native data writing support for OpenTSDB by calling the TDengine API to write (text line or JSON format) -and automate the creation of single-value models. This approach does not require significant adjustments to the data writing application, nor does it require converting the written data format. +TDengine requires the data stored to have a data schema, i.e., you need to create a super table and specify the schema of the super table before writing the data. For data schema creation, you have two ways to do this: +1) Take advantage of TDengine's native data writing support for OpenTSDB by calling the TDengine API to write (text line or JSON format) and automate the creation of single-value models. This approach does not require significant adjustments to the data writing application, nor does it require converting the written data format. At the C level, TDengine provides the `taos_schemaless_insert()` function to write data in OpenTSDB format directly (in early version this function was named `taos_insert_lines()`). Please refer to the sample code `schemaless.c` in the installation package directory as reference. -(2) based on a complete understanding of TDengine's data model, to establish the mapping relationship between OpenTSDB and TDengine's data model adjustment manually. Considering that OpenTSDB is a single-value mapping model, recommended using the single-value model in TDengine. TDengine can support both multi-value and single-value models. +(2) Based on a thorough understanding of TDengine's data model, establish a mapping between OpenTSDB and TDengine's data model. Considering that OpenTSDB is a single-value mapping model, we recommended using the single-value model in TDengine for simplicity. But keep in mind that TDengine supports both multi-value and single-value models. - **Single-valued model**. -The steps are as follows: use the name of the metrics as the name of the TDengine super table, which build with two basic data columns - timestamp and value, and the label of the super table is equivalent to the label information of the metrics, and the number of labels is equal to the number of labels of the metrics. The names of sub-tables are named with fixed rules: `metric + '_' + tags1_value + '_' + tag2_value + '_' + tag3_value ...` as the sub-table name. +The steps are as follows: +- Use the name of the metrics as the name of the TDengine super table +- Build with two basic data columns - timestamp and value. The label of the super table is equivalent to the label information of the metrics, and the number of labels is equal to the number of labels of the metrics. +- The names of sub-tables are named with fixed rules: `metric + '_' + tags1_value + '_' + tag2_value + '_' + tag3_value ...` as the sub-table name. Create 3 super tables in TDengine. @@ -158,13 +159,13 @@ The final system will have about 340 sub-tables and three super-tables. Note tha - **Multi-value model** -Suppose you want to take advantage of TDengine's multi-value modeling capabilities. In that case, you need first to meet the requirements that different collection quantities have the same collection frequency and can reach the **data write side simultaneously via a message queue**, thus ensuring writing multiple metrics at once using SQL statements. The metric's name is used as the name of the super table to create a multi-column model of data that has the same collection frequency and can arrive simultaneously. The names of the sub-tables are named using a fixed rule. Each of the above metrics contains only one measurement value, so converting it into a multi-value model is impossible. +Ideally you should take advantage of TDengine's multi-value modeling capabilities. In that case, you first need to meet the requirement that different collection quantities have the same collection frequency and can reach the **data write side simultaneously via a message queue**, thus ensuring writing multiple metrics at once, using SQL statements. The metric's name is used as the name of the super table to create a multi-column model of data that has the same collection frequency and can arrive simultaneously. The sub-tables are named using a fixed rule. Each of the above metrics contains only one measurement value, so converting it into a multi-value model is impossible. ## Data triage and application adaptation -Subscribe data from the message queue and start the adapted writer to write the data. +Subscribe to the message queue and start writing data to TDengine. -After writing the data starts for a while, you can use SQL statements to check whether the amount of data written meets the expected writing requirements. Use the following SQL statement to count the amount of data. +After data has been written for a while, you can use SQL statements to check whether the amount of data written meets the expected writing requirements. Use the following SQL statement to count the amount of data. ```sql select count(*) from memory @@ -184,7 +185,7 @@ To facilitate historical data migration, we provide a plug-in for the data synch For the specific usage of DataX and how to use DataX to write data to TDengine, please refer to [DataX-based TDengine Data Migration Tool](https://www.taosdata.com/blog/2021/10/26/3156.html). -After migrating via DataX, we found that we can significantly improve the efficiency of migrating historical data by starting multiple processes and migrating numerous metrics simultaneously. The following are some records of the migration process. I wish to use these for application migration as a reference. +After migrating via DataX, we found that we can significantly improve the efficiency of migrating historical data by starting multiple processes and migrating numerous metrics simultaneously. The following are some records of the migration process. We provide these as a reference for application migration. | Number of datax instances (number of concurrent processes) | Migration record speed (pieces/second) | | ----------------------------- | ------------------- -- | @@ -202,13 +203,13 @@ Suppose you need to use the multi-value model for data writing. In that case, yo Manual migration of data requires attention to the following two issues: -1) When storing the exported data on the disk, the disk needs to have enough storage space to accommodate the exported data files fully. Adopting the partial import mode to avoid the shortage of disk file storage after the total amount of data is exported. Preferentially export the timelines belonging to the same super table. Then the exported data files are imported into the TDengine system. +1) When storing the exported data on the disk, the disk needs to have enough storage space to accommodate the exported data files fully. To avoid running out of disk space, you can adopt a partial import mode in which you preferentially export the timelines belonging to the same super table and then only those files are imported into TDengine. -2) Under the full load of the system, if there are enough remaining computing and IO resources, establish a multi-threaded importing to maximize the efficiency of data migration. Considering the vast load that data parsing brings to the CPU, it is necessary to control the maximum number of parallel tasks to avoid the overall overload of the system triggered by importing historical data. +2) Under the full load of the system, if there are enough remaining computing and IO resources, establish a multi-threaded import to maximize the efficiency of data migration. Considering the vast load that data parsing brings to the CPU, it is necessary to control the maximum number of parallel tasks to avoid overloading the system when importing historical data. Due to the ease of operation of TDengine itself, there is no need to perform index maintenance and data format change processing in the entire process. The whole process only needs to be executed sequentially. -When wholly importing the historical data into TDengine, the two systems run simultaneously and then switch the query request to TDengine to achieve seamless application switching. +While importing historical data into TDengine, the two systems should run simultaneously. Once all the data is migrated, switch the query request to TDengine to achieve seamless application switching. ## Appendix 1: OpenTSDB query function correspondence table @@ -222,12 +223,12 @@ Example: SELECT avg(val) FROM (SELECT first(val) FROM super_table WHERE ts >= startTime and ts <= endTime INTERVAL(20s) Fill(linear)) INTERVAL(20s) ``` -Remark: +Remarks: 1. The value in Interval needs to be the same as the interval value in the outer query. -2. The interpolation processing in TDengine needs to use subqueries to assist in the completion. As shown above, it is enough to specify the interpolation type in the inner query. Since the interpolation of the values ​​in OpenTSDB uses linear interpolation, use fill( in the interpolation clause. linear) to declare the interpolation type. The following functions with the exact interpolation calculation requirements are processed by this method. -3. The parameter 20s in Interval indicates that the inner query will generate results according to a time window of 20 seconds. In an actual query, it needs to adjust to the time interval between different records. It ensures that producing interpolation results equivalent to the original data. -4. Due to the particular interpolation strategy and mechanism of OpenTSDB, the method of the first interpolation and then calculation in the aggregate query (Aggregate) makes the calculation results impossible to be utterly consistent with TDengine. But in the case of downsampling (Downsample), TDengine and OpenTSDB can obtain consistent results (since OpenTSDB performs aggregation and downsampling queries). +2. Interpolation processing in TDengine uses subqueries to assist in completion. As shown above, it is enough to specify the interpolation type in the inner query. Since OpenTSDB uses linear interpolation, use `fill(linear)` to declare the interpolation type in TDengine. Some of the functions mentioned below have exactly the same interpolation calculation requirements. +3. The parameter 20s in Interval indicates that the inner query will generate results according to a time window of 20 seconds. In an actual query, it needs to adjust to the time interval between different records. It ensures that interpolation results are equivalent to the original data. +4. Due to the particular interpolation strategy and mechanism of OpenTSDB i.e. interpolation followed by aggregate calculation, it is impossible for the results to be completely consistent with those of TDengine. But in the case of downsampling (Downsample), TDengine and OpenTSDB can obtain consistent results (since OpenTSDB performs aggregation and downsampling queries). ### Count @@ -261,7 +262,7 @@ Select apercentile(col1, 50, “t-digest”) from table_name Remark: -1. During the approximate query processing, OpenTSDB uses the t-digest algorithm by default, so in order to obtain the same calculation result, the algorithm used needs to be specified in the `apercentile()` function. TDengine can support two different approximation processing algorithms, declared by "default" and "t-digest" respectively. +1. When calculating estimate percentiles, OpenTSDB uses the t-digest algorithm by default. In order to obtain the same calculation results in TDengine, the algorithm used needs to be specified in the `apercentile()` function. TDengine can support two different percentile calculation algorithms named "default" and "t-digest" respectively. ### First @@ -379,35 +380,34 @@ We still use the hypothetical environment from Chapter 4. There are three measur ### Storage resource estimation Assuming that the number of sensor devices that generate data and need to be stored is `n`, the frequency of data generation is `t` per second, and the length of each record is `L` bytes, the scale of data generated per day is `n * t * L` bytes. Assuming the compression ratio is `C`, the daily data size is `(n * t * L)/C` bytes. The storage resources are estimated to accommodate the data scale for 1.5 years. In the production environment, the compression ratio C of TDengine is generally between 5 and 7. -With additional 20% ​​redundancy, you can calculate the required storage resources: +With additional 20% redundancy, you can calculate the required storage resources: ```matlab (n * t * L) * (365 * 1.5) * (1+20%)/C ```` - -Combined with the above calculation formula, bring the parameters into the formula, and the raw data scale generated every year is 11.8TB without considering the label information. Note that since tag information is associated with each timeline in TDengine, not every record. The scale of the amount of data to be recorded is somewhat reduced relative to the generated data, and this part of label data can be ignored as a whole. Assuming a compression ratio of 5, the size of the retained data ends up being 2.56 TB. +Substituting in the above formula, the raw data generated every year is 11.8TB without considering the label information. Note that tag information is associated with each timeline in TDengine, not every record. The amount of data to be recorded is somewhat reduced relative to the generated data, and label data can be ignored as a whole. Assuming a compression ratio of 5, the size of the retained data ends up being 2.56 TB. ### Storage Device Selection Considerations -The hard disk should be capable of better random read performance. Considering using an SSD as much as possible is a better choice. A disk with better random read performance is a great help to improve the system's query performance and improve the query response performance as a whole system. To obtain better query performance, the performance index of the single-threaded random read IOPS of the hard disk device should not be lower than 1000, and it is better to reach 5000 IOPS or more. Recommend to use `fio` utility software to evaluate the running performance (please refer to Appendix 1 for specific usage) for the random IO read of the current device to confirm whether it can meet the requirements of random read of large files. +A disk with better random read performance, such as an SSD, improves the system's query performance and improves the query response performance of the whole system. To obtain better query performance, the performance index of the single-threaded random read IOPS of the hard disk device should not be lower than 1000, and it is better to reach 5000 IOPS or more. We recommend using `fio` utility software to evaluate the running performance (please refer to Appendix 1 for specific usage) for the random IO read of the current device to confirm whether it can meet the requirements of random read of large files. Hard disk writing performance has little effect on TDengine. The TDengine writing process adopts the append write mode, so as long as it has good sequential write performance, both SAS hard disks and SSDs in the general sense can well meet TDengine's requirements for disk write performance. ### Computational resource estimates -Due to the particularity of IoT data, after the frequency of data generation is consistent, the writing process of TDengine maintains a relatively fixed amount of resource consumption (computing and storage). According to the [TDengine Operation and Maintenance Guide](/operation/) description, the system consumes less than 1 CPU core at 22,000 writes per second. +Due to the characteristics of IoT data, when the frequency of data generation is consistent, the writing process of TDengine maintains a relatively fixed amount of resource consumption (computing and storage). According to the [TDengine Operation and Maintenance Guide](/operation/) description, the system consumes less than 1 CPU core at 22,000 writes per second. -In estimating the CPU resources consumed by the query, assuming that the application requires the database to provide 10,000 QPS, the CPU time consumed by each query is about 1 ms. The query provided by each core per second is 1,000 QPS, which satisfies 10,000 QPS. The query request requires at least 10 cores. For the system as a whole system to have less than 50% CPU load, the entire cluster needs twice as many as 10 cores or 20 cores. +In estimating the CPU resources consumed by the query, assuming that the application requires the database to provide 10,000 QPS, the CPU time consumed by each query is about 1 ms. The query provided by each core per second is 1,000 QPS, which satisfies 10,000 QPS. The query request requires at least 10 cores. For the system as a whole system to have less than 50% CPU load, the entire cluster needs twice as many cores i.e. 20 cores. ### Memory resource estimation -The database allocates 16MB\*3 buffer memory for each Vnode by default. If the cluster system includes 22 CPU cores, TDengine will create 22 Vnodes (virtual nodes) by default. Each Vnode contains 1000 tables, which can accommodate all the tables. Then it takes about 1.5 hours to write a block, which triggers the drop, and no adjustment is required. A total of 22 Vnodes require about 1GB of memory cache. Considering the memory needed for the query, assuming that the memory overhead of each query is about 50MB, the memory required for 500 queries concurrently is about 25GB. +The database allocates 16MB\*3 buffer memory for each Vnode by default. If the cluster system includes 22 CPU cores, TDengine will create 22 Vnodes (virtual nodes) by default. Each Vnode contains 1000 tables, which is more than enough to accommodate all the tables in our hypothetical scenario. Then it takes about 1.5 hours to write a block, which triggers persistence to disk without requiring any adjustment. A total of 22 Vnodes require about 1GB of memory cache. Considering the memory needed for the query, assuming that the memory overhead of each query is about 50MB, the memory required for 500 queries concurrently is about 25GB. In summary, using a single 16-core 32GB machine or a cluster of 2 8-core 16GB machines is enough. ## Appendix 3: Cluster Deployment and Startup -TDengine provides a wealth of help documents to explain many aspects of cluster installation and deployment. Here is the list of corresponding document for your reference. +TDengine provides a wealth of help documents to explain many aspects of cluster installation and deployment. Here is the list of documents for your reference. ### Cluster Deployment @@ -421,7 +421,7 @@ To ensure that the system can obtain the necessary information for regular opera FQDN, firstEp, secondEP, dataDir, logDir, tmpDir, serverPort. For the specific meaning and setting requirements of each parameter, please refer to the document "[TDengine Cluster Installation and Management](/cluster/)" -Follow the same steps to set parameters on the nodes that need running, start the taosd service, and then add Dnodes to the cluster. +Follow the same steps to set parameters on the other nodes, start the taosd service, and then add Dnodes to the cluster. Finally, start `taos` and execute the `show dnodes` command. If you can see all the nodes that have joined the cluster, the cluster building process was successfully completed. For specific operation procedures and precautions, please refer to the document "[TDengine Cluster Installation and Management](/cluster/)". diff --git a/docs-en/27-train-faq/01-faq.md b/docs-en/27-train-faq/01-faq.md index 439775170937ef11fc964914232b2739d688b26f..e182e25b9e98bad11b9c90146400e3720605489e 100644 --- a/docs-en/27-train-faq/01-faq.md +++ b/docs-en/27-train-faq/01-faq.md @@ -5,38 +5,38 @@ title: Frequently Asked Questions ## Submit an Issue -If the tips in FAQ don't help much, please submit an issue on [GitHub](https://github.com/taosdata/TDengine) to describe your problem description, including TDengine version, hardware and OS information, the steps to reproduce the problem, etc. It would be very helpful if you package the contents in `/var/log/taos` and `/etc/taos` and upload. These two are the default directories used by TDengine, if they have been changed in your configuration, please use according to the actual configuration. It's recommended to firstly set `debugFlag` to 135 in `taos.cfg`, restart `taosd`, then reproduce the problem and collect logs. If you don't want to restart, an alternative way of setting `debugFlag` is executing `alter dnode debugFlag 135` command in TDengine CLI `taos`. During normal running, however, please make sure `debugFlag` is set to 131. +If the tips in FAQ don't help much, please submit an issue on [GitHub](https://github.com/taosdata/TDengine) to describe your problem. In your description please include the TDengine version, hardware and OS information, the steps to reproduce the problem and any other relevant information. It would be very helpful if you can package the contents in `/var/log/taos` and `/etc/taos` and upload. These two are the default directories used by TDengine. If you have changed the default directories in your configuration, please package the files in your configured directories. We recommended setting `debugFlag` to 135 in `taos.cfg`, restarting `taosd`, then reproducing the problem and collecting the logs. If you don't want to restart, an alternative way of setting `debugFlag` is executing `alter dnode debugFlag 135` command in TDengine CLI `taos`. During normal running, however, please make sure `debugFlag` is set to 131. ## Frequently Asked Questions ### 1. How to upgrade to TDengine 2.0 from older version? -version 2.x is not compatible with version 1.x regarding configuration file and data file, please do following before upgrading: +version 2.x is not compatible with version 1.x. With regard to the configuration and data files, please perform the following steps before upgrading. Please follow data integrity, security, backup and other relevant SOPs, best practices before removing/deleting any data. -1. Delete configuration files: `sudo rm -rf /etc/taos/taos.cfg` +1. Delete configuration files: `sudo rm -rf /etc/taos/taos.cfg` 2. Delete log files: `sudo rm -rf /var/log/taos/` 3. Delete data files if the data doesn't need to be kept: `sudo rm -rf /var/lib/taos/` -4. Install latests 2.x version -5. If the data needs to be kept and migrated to newer version, please contact professional service of TDengine for assistance +4. Install latest 2.x version +5. If the data needs to be kept and migrated to newer version, please contact professional service at TDengine for assistance. ### 2. How to handle "Unable to establish connection"? -When the client is unable to connect to the server, you can try following ways to find out why. +When the client is unable to connect to the server, you can try the following ways to troubleshoot and resolve the problem. 1. Check the network - - Check if the hosts where the client and server are running can be accessible to each other, for example by `ping` command. - - Check if the TCP/UDP on port 6030-6042 are open for access if firewall is enabled. It's better to firstly disable firewall for diagnostics. - - Check if the FQDN and serverPort are configured correctly in `taos.cfg` used by the server side - - Check if the `firstEp` is set properly in the `taos.cfg` used by the client side + - Check if the hosts where the client and server are running are accessible to each other, for example by `ping` command. + - Check if the TCP/UDP on port 6030-6042 are open for access if firewall is enabled. If possible, disable the firewall for diagnostics, but please ensure that you are following security and other relevant protocols. + - Check if the FQDN and serverPort are configured correctly in `taos.cfg` used by the server side. + - Check if the `firstEp` is set properly in the `taos.cfg` used by the client side. 2. Make sure the client version and server version are same. 3. On server side, check the running status of `taosd` by executing `systemctl status taosd` . If your server is started using another way instead of `systemctl`, use the proper method to check whether the server process is running normally. -4. If using connector of Python, Java, Go, Rust, C#, node.JS on Linux to connect toe the server, please make sure `libtaos.so` is in directory `/usr/local/taos/driver` and `/usr/local/taos/driver` is in system lib search environment variable `LD_LIBRARY_PATH`. +4. If using connector of Python, Java, Go, Rust, C#, node.JS on Linux to connect to the server, please make sure `libtaos.so` is in directory `/usr/local/taos/driver` and `/usr/local/taos/driver` is in system lib search environment variable `LD_LIBRARY_PATH`. -5. If using connector on Windows, please make sure `C:\TDengine\driver\taos.dll` is in your system lib search path, it's suggested to put `taos.dll` under `C:\Windows\System32`. +5. If using connector on Windows, please make sure `C:\TDengine\driver\taos.dll` is in your system lib search path. We recommend putting `taos.dll` under `C:\Windows\System32`. 6. Some advanced network diagnostics tools @@ -45,7 +45,7 @@ When the client is unable to connect to the server, you can try following ways t Check whether a TCP port on server side is open: `nc -l {port}` Check whether a TCP port on client side is open: `nc {hostIP} {port}` - - On Windows system `Net-TestConnection -ComputerName {fqdn} -Port {port}` on PowerShell can be used to check whether the port on serer side is open for access. + - On Windows system `Net-TestConnection -ComputerName {fqdn} -Port {port}` on PowerShell can be used to check whether the port on server side is open for access. 7. TDengine CLI `taos` can also be used to check network, please refer to [TDengine CLI](/reference/taos-shell). diff --git a/docs-en/27-train-faq/03-docker.md b/docs-en/27-train-faq/03-docker.md index 8f27c35d7945043d39ad83626ceccee941ad135e..afee13c1377b0b4331d6f7ec20251d1aa2db81a1 100644 --- a/docs-en/27-train-faq/03-docker.md +++ b/docs-en/27-train-faq/03-docker.md @@ -3,15 +3,15 @@ sidebar_label: TDengine in Docker title: Deploy TDengine in Docker --- -Even though it's not recommended to deploy TDengine using docker in production system, docker is still very useful in development environment, especially when your host is not Linux. From version 2.0.14.0, the official image of TDengine can support X86-64, X86, arm64, and rm32 . +We do not recommend deploying TDengine using Docker in a production system. However, Docker is still very useful in a development environment, especially when your host is not Linux. From version 2.0.14.0, the official image of TDengine can support X86-64, X86, arm64, and rm32 . -In this chapter a simple step by step guide of using TDengine in docker is introduced. +In this chapter we introduce a simple step by step guide to use TDengine in Docker. ## Install Docker -The installation of docker please refer to [Get Docker](https://docs.docker.com/get-docker/). +To install Docker please refer to [Get Docker](https://docs.docker.com/get-docker/). -After docker is installed, you can check whether Docker is installed properly by displaying Docker version. +After Docker is installed, you can check whether Docker is installed properly by displaying Docker version. ```bash $ docker -v @@ -27,7 +27,7 @@ $ docker run -d -p 6030-6049:6030-6049 -p 6030-6049:6030-6049/udp tdengine/tdeng 526aa188da767ae94b244226a2b2eec2b5f17dd8eff592893d9ec0cd0f3a1ccd ``` -In the above command, a docker container is started to run TDengine server, the port range 6030-6049 of the container is mapped to host port range 6030-6049. If port range 6030-6049 has been occupied on the host, please change to an available host port range. Regarding the requirements about ports on the host, please refer to [Port Configuration](/reference/config/#serverport). +In the above command, a docker container is started to run TDengine server, the port range 6030-6049 of the container is mapped to host port range 6030-6049. If port range 6030-6049 has been occupied on the host, please change to an available host port range. For port requirements on the host, please refer to [Port Configuration](/reference/config/#serverport). - **docker run**: Launch a docker container - **-d**: the container will run in background mode @@ -95,7 +95,7 @@ In TDengine CLI, SQL commands can be executed to create/drop databases, tables, ### Access TDengine from host -If `-p` used to map ports properly between host and container, it's also able to access TDengine in container from the host as long as `firstEp` is configured correctly for the client on host. +If option `-p` used to map ports properly between host and container, it's also able to access TDengine in container from the host as long as `firstEp` is configured correctly for the client on host. ``` $ taos @@ -271,7 +271,7 @@ Below is an example output: ### Access TDengine from 3rd party tools -A lot of 3rd party tools can be used to write data into TDengine through `taosAdapter` , for details please refer to [3rd party tools](/third-party/). +A lot of 3rd party tools can be used to write data into TDengine through `taosAdapter`, for details please refer to [3rd party tools](/third-party/). There is nothing different from the 3rd party side to access TDengine server inside a container, as long as the end point is specified correctly, the end point should be the FQDN and the mapped port of the host. diff --git a/example/src/tmq.c b/example/src/tmq.c index 8d64bd3e79fc2b74c5e626ded3b017f2203c2b0b..7e4de21f2eeeedde3b252bc9eae407fd3f1cc7d9 100644 --- a/example/src/tmq.c +++ b/example/src/tmq.c @@ -106,8 +106,8 @@ int32_t create_topic() { } taos_free_result(pRes); - pRes = taos_query(pConn, "create topic topic_ctb_column as database abc1"); - /*pRes = taos_query(pConn, "create topic topic_ctb_column as select ts, c1, c2, c3 from st1");*/ + /*pRes = taos_query(pConn, "create topic topic_ctb_column as database abc1");*/ + pRes = taos_query(pConn, "create topic topic_ctb_column as select ts, c1, c2, c3 from st1"); if (taos_errno(pRes) != 0) { printf("failed to create topic topic_ctb_column, reason:%s\n", taos_errstr(pRes)); return -1; diff --git a/include/common/tmsg.h b/include/common/tmsg.h index e870eefd77fd0bcfd4e9eca577e3e6c4304c59be..4c7549812268bf28fc8b018d73ce85b1bd87130b 100644 --- a/include/common/tmsg.h +++ b/include/common/tmsg.h @@ -1483,9 +1483,9 @@ typedef struct { int8_t igExists; int8_t subType; char* sql; + char subDbName[TSDB_DB_FNAME_LEN]; union { char* ast; - char subDbName[TSDB_DB_FNAME_LEN]; char subStbName[TSDB_TABLE_FNAME_LEN]; }; } SCMCreateTopicReq; diff --git a/include/common/ttokendef.h b/include/common/ttokendef.h index 41c8111eea0e9cfc4dbd0b4a5d1c1b6833846e91..c3b0e54f3da416ccc2e2b2dbd6c05ec356a50a30 100644 --- a/include/common/ttokendef.h +++ b/include/common/ttokendef.h @@ -127,42 +127,42 @@ #define TK_BLOB 109 #define TK_VARBINARY 110 #define TK_DECIMAL 111 -#define TK_DELAY 112 -#define TK_FILE_FACTOR 113 -#define TK_NK_FLOAT 114 -#define TK_ROLLUP 115 -#define TK_TTL 116 -#define TK_SMA 117 -#define TK_SHOW 118 -#define TK_DATABASES 119 -#define TK_TABLES 120 -#define TK_STABLES 121 -#define TK_MNODES 122 -#define TK_MODULES 123 -#define TK_QNODES 124 -#define TK_FUNCTIONS 125 -#define TK_INDEXES 126 -#define TK_ACCOUNTS 127 -#define TK_APPS 128 -#define TK_CONNECTIONS 129 -#define TK_LICENCE 130 -#define TK_GRANTS 131 -#define TK_QUERIES 132 -#define TK_SCORES 133 -#define TK_TOPICS 134 -#define TK_VARIABLES 135 -#define TK_BNODES 136 -#define TK_SNODES 137 -#define TK_CLUSTER 138 -#define TK_TRANSACTIONS 139 -#define TK_LIKE 140 -#define TK_INDEX 141 -#define TK_FULLTEXT 142 -#define TK_FUNCTION 143 -#define TK_INTERVAL 144 -#define TK_TOPIC 145 -#define TK_AS 146 -#define TK_CGROUP 147 +#define TK_FILE_FACTOR 112 +#define TK_NK_FLOAT 113 +#define TK_ROLLUP 114 +#define TK_TTL 115 +#define TK_SMA 116 +#define TK_SHOW 117 +#define TK_DATABASES 118 +#define TK_TABLES 119 +#define TK_STABLES 120 +#define TK_MNODES 121 +#define TK_MODULES 122 +#define TK_QNODES 123 +#define TK_FUNCTIONS 124 +#define TK_INDEXES 125 +#define TK_ACCOUNTS 126 +#define TK_APPS 127 +#define TK_CONNECTIONS 128 +#define TK_LICENCE 129 +#define TK_GRANTS 130 +#define TK_QUERIES 131 +#define TK_SCORES 132 +#define TK_TOPICS 133 +#define TK_VARIABLES 134 +#define TK_BNODES 135 +#define TK_SNODES 136 +#define TK_CLUSTER 137 +#define TK_TRANSACTIONS 138 +#define TK_LIKE 139 +#define TK_INDEX 140 +#define TK_FULLTEXT 141 +#define TK_FUNCTION 142 +#define TK_INTERVAL 143 +#define TK_TOPIC 144 +#define TK_AS 145 +#define TK_CONSUMER 146 +#define TK_GROUP 147 #define TK_DESC 148 #define TK_DESCRIBE 149 #define TK_RESET 150 @@ -237,22 +237,21 @@ #define TK_PREV 219 #define TK_LINEAR 220 #define TK_NEXT 221 -#define TK_GROUP 222 -#define TK_HAVING 223 -#define TK_ORDER 224 -#define TK_SLIMIT 225 -#define TK_SOFFSET 226 -#define TK_LIMIT 227 -#define TK_OFFSET 228 -#define TK_ASC 229 -#define TK_NULLS 230 -#define TK_ID 231 -#define TK_NK_BITNOT 232 -#define TK_INSERT 233 -#define TK_VALUES 234 -#define TK_IMPORT 235 -#define TK_NK_SEMI 236 -#define TK_FILE 237 +#define TK_HAVING 222 +#define TK_ORDER 223 +#define TK_SLIMIT 224 +#define TK_SOFFSET 225 +#define TK_LIMIT 226 +#define TK_OFFSET 227 +#define TK_ASC 228 +#define TK_NULLS 229 +#define TK_ID 230 +#define TK_NK_BITNOT 231 +#define TK_INSERT 232 +#define TK_VALUES 233 +#define TK_IMPORT 234 +#define TK_NK_SEMI 235 +#define TK_FILE 236 #define TK_NK_SPACE 300 #define TK_NK_COMMENT 301 diff --git a/include/libs/nodes/cmdnodes.h b/include/libs/nodes/cmdnodes.h index f84eef6baf88c8d1f04b43f25550583b36c04d0d..c92a9498b2846049348064e8576ff10e9d453c1a 100644 --- a/include/libs/nodes/cmdnodes.h +++ b/include/libs/nodes/cmdnodes.h @@ -80,7 +80,6 @@ typedef struct SAlterDatabaseStmt { typedef struct STableOptions { ENodeType type; char comment[TSDB_TB_COMMENT_LEN]; - int32_t delay; float filesFactor; SNodeList* pRollupFuncs; int32_t ttl; diff --git a/include/util/tdef.h b/include/util/tdef.h index 7c1f46ce69715431e073f2e5d0af473aa66c8a6f..1e1770d1b9faa73fc716ed4db0bf5873e24f8c84 100644 --- a/include/util/tdef.h +++ b/include/util/tdef.h @@ -344,9 +344,6 @@ typedef enum ELogicConditionType { #define TSDB_MIN_ROLLUP_FILE_FACTOR 0 #define TSDB_MAX_ROLLUP_FILE_FACTOR 1 #define TSDB_DEFAULT_ROLLUP_FILE_FACTOR 0.1 -#define TSDB_MIN_ROLLUP_DELAY 1 -#define TSDB_MAX_ROLLUP_DELAY 10 -#define TSDB_DEFAULT_ROLLUP_DELAY 2 #define TSDB_MIN_TABLE_TTL 0 #define TSDB_DEFAULT_TABLE_TTL 0 diff --git a/packaging/docker/Dockerfile b/packaging/docker/Dockerfile index 26349e257676d99d0ea81e03509c8b09c20a2248..35bea0e65ccc5070fe9d4e82adadc7132ae7cc81 100644 --- a/packaging/docker/Dockerfile +++ b/packaging/docker/Dockerfile @@ -1,32 +1,25 @@ -FROM ubuntu:18.04 - -WORKDIR /root - -ARG pkgFile -ARG dirName -ARG cpuType -RUN echo ${pkgFile} && echo ${dirName} - -COPY ${pkgFile} /root/ -RUN tar -zxf ${pkgFile} -WORKDIR /root/ -RUN cd /root/${dirName}/ && /bin/bash install.sh -e no && cd /root -RUN rm /root/${pkgFile} -RUN rm -rf /root/${dirName} - -ENV DEBIAN_FRONTEND=noninteractive -RUN apt-get clean && apt-get update && apt-get install -y locales tzdata netcat && locale-gen en_US.UTF-8 -ENV LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/lib" \ - LC_CTYPE=en_US.UTF-8 \ - LANG=en_US.UTF-8 \ - LC_ALL=en_US.UTF-8 - -COPY ./bin/* /usr/bin/ - -ENV TINI_VERSION v0.19.0 -RUN bash -c 'echo -e "Downloading tini-${cpuType} ..."' -ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-${cpuType} /tini -RUN chmod +x /tini -ENTRYPOINT ["/tini", "--", "/usr/bin/entrypoint.sh"] -CMD ["taosd"] -VOLUME [ "/var/lib/taos", "/var/log/taos", "/corefile" ] +FROM ubuntu:18.04 + +WORKDIR /root + +ARG pkgFile +ARG dirName +ARG cpuType +RUN echo ${pkgFile} && echo ${dirName} + +COPY ${pkgFile} /root/ +ENV TINI_VERSION v0.19.0 +ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-${cpuType} /tini +ENV DEBIAN_FRONTEND=noninteractive +WORKDIR /root/ +RUN tar -zxf ${pkgFile} && cd /root/${dirName}/ && /bin/bash install.sh -e no && cd /root && rm /root/${pkgFile} && rm -rf /root/${dirName} && apt-get update && apt-get install -y locales tzdata netcat && locale-gen en_US.UTF-8 && apt-get clean && rm -rf /var/lib/apt/lists/ && chmod +x /tini + +ENV LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/lib" \ + LC_CTYPE=en_US.UTF-8 \ + LANG=en_US.UTF-8 \ + LC_ALL=en_US.UTF-8 +COPY ./bin/* /usr/bin/ + +ENTRYPOINT ["/tini", "--", "/usr/bin/entrypoint.sh"] +CMD ["taosd"] +VOLUME [ "/var/lib/taos", "/var/log/taos", "/corefile" ] diff --git a/packaging/docker/bin/entrypoint.sh b/packaging/docker/bin/entrypoint.sh index 5fb441004d8b454de1039eb3f4b23eb51f32be64..f4be349c0de0ea0df382fc6fee033120c5c48007 100644 --- a/packaging/docker/bin/entrypoint.sh +++ b/packaging/docker/bin/entrypoint.sh @@ -11,39 +11,22 @@ DISABLE_ADAPTER=${TAOS_DISABLE_ADAPTER:-0} unset TAOS_DISABLE_ADAPTER # to get mnodeEpSet from data dir -DATA_DIR=${TAOS_DATA_DIR:-/var/lib/taos} +DATA_DIR=$(taosd -C|grep -E 'dataDir.*(\S+)' -o |head -n1|sed 's/dataDir *//') +DATA_DIR=${DATA_DIR:-/var/lib/taos} -# append env to custom taos.cfg -CFG_DIR=/tmp/taos -CFG_FILE=$CFG_DIR/taos.cfg - -mkdir -p $CFG_DIR >/dev/null 2>&1 - -[ -f /etc/taos/taos.cfg ] && cat /etc/taos/taos.cfg | grep -E -v "^#|^\s*$" >$CFG_FILE -env-to-cfg >>$CFG_FILE - -FQDN=$(cat $CFG_FILE | grep -E -v "^#|^$" | grep fqdn | tail -n1 | sed -E 's/.*fqdn\s+//') +FQDN=$(taosd -C|grep -E 'fqdn.*(\S+)' -o |head -n1|sed 's/fqdn *//') # ensure the fqdn is resolved as localhost grep "$FQDN" /etc/hosts >/dev/null || echo "127.0.0.1 $FQDN" >>/etc/hosts - +FIRSET_EP=$(taosd -C|grep -E 'firstEp.*(\S+)' -o |head -n1|sed 's/firstEp *//') # parse first ep host and port -FIRST_EP_HOST=${TAOS_FIRST_EP%:*} -FIRST_EP_PORT=${TAOS_FIRST_EP#*:} +FIRST_EP_HOST=${FIRSET_EP%:*} +FIRST_EP_PORT=${FIRSET_EP#*:} # in case of custom server port -SERVER_PORT=$(cat $CFG_FILE | grep -E -v "^#|^$" | grep serverPort | tail -n1 | sed -E 's/.*serverPort\s+//') +SERVER_PORT=$(taosd -C|grep -E 'serverPort.*(\S+)' -o |head -n1|sed 's/serverPort *//') SERVER_PORT=${SERVER_PORT:-6030} -# for other binaries like interpreters -if echo $1 | grep -E "taosd$" - >/dev/null; then - true # will run taosd -else - cp -f $CFG_FILE /etc/taos/taos.cfg || true - $@ - exit $? -fi - set +e ulimit -c unlimited # set core files pattern, maybe failed @@ -62,22 +45,23 @@ fi # if has mnode ep set or the host is first ep or not for cluster, just start. if [ -f "$DATA_DIR/dnode/mnodeEpSet.json" ] || [ "$TAOS_FQDN" = "$FIRST_EP_HOST" ]; then - $@ -c $CFG_DIR + $@ # others will first wait the first ep ready. else if [ "$TAOS_FIRST_EP" = "" ]; then echo "run TDengine with single node." - $@ -c $CFG_DIR + $@ exit $? fi while true; do - es=0 - taos -h $FIRST_EP_HOST -P $FIRST_EP_PORT -n startup >/dev/null || es=$? - if [ "$es" -eq 0 ]; then + es=$(taos -h $FIRST_EP_HOST -P $FIRST_EP_PORT --check) + echo ${es} + if [ "${es%%:*}" -eq 2 ]; then + echo "execute create dnode" taos -h $FIRST_EP_HOST -P $FIRST_EP_PORT -s "create dnode \"$FQDN:$SERVER_PORT\";" break fi sleep 1s done - $@ -c $CFG_DIR + $@ fi diff --git a/packaging/docker/bin/taos-check b/packaging/docker/bin/taos-check new file mode 100644 index 0000000000000000000000000000000000000000..5dc06b6018b93b627610b446ca6363773fd0fd72 --- /dev/null +++ b/packaging/docker/bin/taos-check @@ -0,0 +1,8 @@ +#!/bin/sh +es=$(taos --check) +code=${es%%:*} +if [ "$code" -ne "0" ] && [ "$code" -ne "4" ]; then + exit 0 +fi +echo $es +exit 1 diff --git a/source/common/src/tmsg.c b/source/common/src/tmsg.c index e33b516ac0dcac86c44e27a7ebd520c1137e6860..751c990ca4f907cc28bd0b81f43395083e4b3eb4 100644 --- a/source/common/src/tmsg.c +++ b/source/common/src/tmsg.c @@ -2675,8 +2675,8 @@ int32_t tSerializeSCMCreateTopicReq(void *buf, int32_t bufLen, const SCMCreateTo if (tEncodeCStr(&encoder, pReq->name) < 0) return -1; if (tEncodeI8(&encoder, pReq->igExists) < 0) return -1; if (tEncodeI8(&encoder, pReq->subType) < 0) return -1; + if (tEncodeCStr(&encoder, pReq->subDbName) < 0) return -1; if (TOPIC_SUB_TYPE__DB == pReq->subType) { - if (tEncodeCStr(&encoder, pReq->subDbName) < 0) return -1; } else if (TOPIC_SUB_TYPE__TABLE == pReq->subType) { if (tEncodeCStr(&encoder, pReq->subStbName) < 0) return -1; } else { @@ -2704,8 +2704,8 @@ int32_t tDeserializeSCMCreateTopicReq(void *buf, int32_t bufLen, SCMCreateTopicR if (tDecodeCStrTo(&decoder, pReq->name) < 0) return -1; if (tDecodeI8(&decoder, &pReq->igExists) < 0) return -1; if (tDecodeI8(&decoder, &pReq->subType) < 0) return -1; + if (tDecodeCStrTo(&decoder, pReq->subDbName) < 0) return -1; if (TOPIC_SUB_TYPE__DB == pReq->subType) { - if (tDecodeCStrTo(&decoder, pReq->subDbName) < 0) return -1; } else if (TOPIC_SUB_TYPE__TABLE == pReq->subType) { if (tDecodeCStrTo(&decoder, pReq->subStbName) < 0) return -1; } else { diff --git a/source/dnode/mnode/impl/test/db/CMakeLists.txt b/source/dnode/mnode/impl/test/db/CMakeLists.txt index 3f6a80835ffa7b2a0a6fcdcff21e1cfd39a02c5f..e28cdd4f61824c04f62513868a9010113140fd31 100644 --- a/source/dnode/mnode/impl/test/db/CMakeLists.txt +++ b/source/dnode/mnode/impl/test/db/CMakeLists.txt @@ -5,7 +5,9 @@ target_link_libraries( PUBLIC sut ) -add_test( - NAME dbTest - COMMAND dbTest -) +if(NOT TD_WINDOWS) + add_test( + NAME dbTest + COMMAND dbTest + ) +endif(NOT TD_WINDOWS) diff --git a/source/dnode/mnode/impl/test/sma/CMakeLists.txt b/source/dnode/mnode/impl/test/sma/CMakeLists.txt index 3f9ec123a80e88371a98fa54c99342726831372d..fd596c5021674bb9d4ec185924129b0fd3bbade8 100644 --- a/source/dnode/mnode/impl/test/sma/CMakeLists.txt +++ b/source/dnode/mnode/impl/test/sma/CMakeLists.txt @@ -5,7 +5,9 @@ target_link_libraries( PUBLIC sut ) -add_test( - NAME smaTest - COMMAND smaTest -) +if(NOT TD_WINDOWS) + add_test( + NAME smaTest + COMMAND smaTest + ) +endif(NOT TD_WINDOWS) diff --git a/source/dnode/mnode/impl/test/stb/CMakeLists.txt b/source/dnode/mnode/impl/test/stb/CMakeLists.txt index d2fe3879979f4f52a215a3d44e25e912be3abb90..857c404c1c299767685fa1572a7f5a0b6463c939 100644 --- a/source/dnode/mnode/impl/test/stb/CMakeLists.txt +++ b/source/dnode/mnode/impl/test/stb/CMakeLists.txt @@ -5,7 +5,9 @@ target_link_libraries( PUBLIC sut ) -add_test( - NAME stbTest - COMMAND stbTest -) +if(NOT TD_WINDOWS) + add_test( + NAME stbTest + COMMAND stbTest + ) +endif(NOT TD_WINDOWS) \ No newline at end of file diff --git a/source/libs/function/src/builtins.c b/source/libs/function/src/builtins.c index c9d556c86b42dfe8fab7e4a2c2056a1aebb03c49..4725f117150ec3211bb402a042d68bdd667a8003 100644 --- a/source/libs/function/src/builtins.c +++ b/source/libs/function/src/builtins.c @@ -703,7 +703,7 @@ static int32_t translateFirstLast(SFunctionNode* pFunc, char* pErrBuf, int32_t l static int32_t translateUnique(SFunctionNode* pFunc, char* pErrBuf, int32_t len) { if (1 != LIST_LENGTH(pFunc->pParameterList)) { - return TSDB_CODE_SUCCESS; + return invaildFuncParaNumErrMsg(pErrBuf, len, pFunc->functionName); } SNode* pPara = nodesListGetNode(pFunc->pParameterList, 0); diff --git a/source/libs/nodes/src/nodesCloneFuncs.c b/source/libs/nodes/src/nodesCloneFuncs.c index 68d3741b482105d02d4751847f01f3fbdc32986f..84b5e0a04337854dcdea703c97f0be9bad8a81ca 100644 --- a/source/libs/nodes/src/nodesCloneFuncs.c +++ b/source/libs/nodes/src/nodesCloneFuncs.c @@ -305,6 +305,7 @@ static SNode* logicNodeCopy(const SLogicNode* pSrc, SLogicNode* pDst) { CLONE_NODE_FIELD(pConditions); CLONE_NODE_LIST_FIELD(pChildren); COPY_SCALAR_FIELD(optimizedFlag); + COPY_SCALAR_FIELD(precision); return (SNode*)pDst; } diff --git a/source/libs/parser/inc/parAst.h b/source/libs/parser/inc/parAst.h index 70fb1a82efeab0b2f6031c8f04b0379fb7d1f5b5..7dd0ef2616bf3fda27192fa7099906348753c163 100644 --- a/source/libs/parser/inc/parAst.h +++ b/source/libs/parser/inc/parAst.h @@ -59,7 +59,6 @@ typedef enum EDatabaseOptionType { typedef enum ETableOptionType { TABLE_OPTION_COMMENT = 1, - TABLE_OPTION_DELAY, TABLE_OPTION_FILE_FACTOR, TABLE_OPTION_ROLLUP, TABLE_OPTION_TTL, diff --git a/source/libs/parser/inc/sql.y b/source/libs/parser/inc/sql.y index 61c9d00ae18d86a2611caf2d8e5efe76c06ed297..75eceedb1b1113b5b186fa8083a2b6899d1b7ac3 100644 --- a/source/libs/parser/inc/sql.y +++ b/source/libs/parser/inc/sql.y @@ -313,7 +313,6 @@ tags_def(A) ::= TAGS NK_LP column_def_list(B) NK_RP. table_options(A) ::= . { A = createDefaultTableOptions(pCxt); } table_options(A) ::= table_options(B) COMMENT NK_STRING(C). { A = setTableOption(pCxt, B, TABLE_OPTION_COMMENT, &C); } -table_options(A) ::= table_options(B) DELAY NK_INTEGER(C). { A = setTableOption(pCxt, B, TABLE_OPTION_DELAY, &C); } table_options(A) ::= table_options(B) FILE_FACTOR NK_FLOAT(C). { A = setTableOption(pCxt, B, TABLE_OPTION_FILE_FACTOR, &C); } table_options(A) ::= table_options(B) ROLLUP NK_LP func_name_list(C) NK_RP. { A = setTableOption(pCxt, B, TABLE_OPTION_ROLLUP, C); } table_options(A) ::= table_options(B) TTL NK_INTEGER(C). { A = setTableOption(pCxt, B, TABLE_OPTION_TTL, &C); } @@ -408,7 +407,7 @@ cmd ::= CREATE TOPIC not_exists_opt(A) topic_name(B) AS DATABASE db_name(C). cmd ::= CREATE TOPIC not_exists_opt(A) topic_name(B) AS STABLE full_table_name(C). { pCxt->pRootNode = createCreateTopicStmt(pCxt, A, &B, NULL, NULL, C); } cmd ::= DROP TOPIC exists_opt(A) topic_name(B). { pCxt->pRootNode = createDropTopicStmt(pCxt, A, &B); } -cmd ::= DROP CGROUP exists_opt(A) cgroup_name(B) ON topic_name(C). { pCxt->pRootNode = createDropCGroupStmt(pCxt, A, &B, &C); } +cmd ::= DROP CONSUMER GROUP exists_opt(A) cgroup_name(B) ON topic_name(C). { pCxt->pRootNode = createDropCGroupStmt(pCxt, A, &B, &C); } /************************************************ desc/describe *******************************************************/ cmd ::= DESC full_table_name(A). { pCxt->pRootNode = createDescribeStmt(pCxt, A); } diff --git a/source/libs/parser/src/parAstCreater.c b/source/libs/parser/src/parAstCreater.c index b87bbb65d3cac7bad6c51a46315c9f29863c4292..e9335d2d464da06328030c404dd03f2abc0af537 100644 --- a/source/libs/parser/src/parAstCreater.c +++ b/source/libs/parser/src/parAstCreater.c @@ -857,7 +857,6 @@ SNode* createDefaultTableOptions(SAstCreateContext* pCxt) { CHECK_PARSER_STATUS(pCxt); STableOptions* pOptions = nodesMakeNode(QUERY_NODE_TABLE_OPTIONS); CHECK_OUT_OF_MEM(pOptions); - pOptions->delay = TSDB_DEFAULT_ROLLUP_DELAY; pOptions->filesFactor = TSDB_DEFAULT_ROLLUP_FILE_FACTOR; pOptions->ttl = TSDB_DEFAULT_TABLE_TTL; return (SNode*)pOptions; @@ -867,7 +866,6 @@ SNode* createAlterTableOptions(SAstCreateContext* pCxt) { CHECK_PARSER_STATUS(pCxt); STableOptions* pOptions = nodesMakeNode(QUERY_NODE_TABLE_OPTIONS); CHECK_OUT_OF_MEM(pOptions); - pOptions->delay = -1; pOptions->filesFactor = -1; pOptions->ttl = -1; return (SNode*)pOptions; @@ -882,9 +880,6 @@ SNode* setTableOption(SAstCreateContext* pCxt, SNode* pOptions, ETableOptionType sizeof(((STableOptions*)pOptions)->comment)); } break; - case TABLE_OPTION_DELAY: - ((STableOptions*)pOptions)->delay = taosStr2Int32(((SToken*)pVal)->z, NULL, 10); - break; case TABLE_OPTION_FILE_FACTOR: ((STableOptions*)pOptions)->filesFactor = taosStr2Float(((SToken*)pVal)->z, NULL); break; diff --git a/source/libs/parser/src/parTokenizer.c b/source/libs/parser/src/parTokenizer.c index b6f9ba138d96f69903afb06d27c3521825787e6a..e9539073583c6d21a100efa5b33516eb9db18393 100644 --- a/source/libs/parser/src/parTokenizer.c +++ b/source/libs/parser/src/parTokenizer.c @@ -53,7 +53,6 @@ static SKeyword keywordTable[] = { {"CACHE", TK_CACHE}, {"CACHELAST", TK_CACHELAST}, {"CAST", TK_CAST}, - {"CGROUP", TK_CGROUP}, {"CLUSTER", TK_CLUSTER}, {"COLUMN", TK_COLUMN}, {"COMMENT", TK_COMMENT}, @@ -62,13 +61,13 @@ static SKeyword keywordTable[] = { {"CONNS", TK_CONNS}, {"CONNECTION", TK_CONNECTION}, {"CONNECTIONS", TK_CONNECTIONS}, + {"CONSUMER", TK_CONSUMER}, {"COUNT", TK_COUNT}, {"CREATE", TK_CREATE}, {"DATABASE", TK_DATABASE}, {"DATABASES", TK_DATABASES}, {"DAYS", TK_DAYS}, {"DBS", TK_DBS}, - {"DELAY", TK_DELAY}, {"DESC", TK_DESC}, {"DESCRIBE", TK_DESCRIBE}, {"DISTINCT", TK_DISTINCT}, diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c index 33ea092a109e47c9667a88b45305b4f56c27d751..9fff330ef03c18762db04b9849dc265006b0beca 100644 --- a/source/libs/parser/src/parTranslater.c +++ b/source/libs/parser/src/parTranslater.c @@ -465,20 +465,22 @@ static bool isPrimaryKey(STempTableNode* pTable, SNode* pExpr) { return isPrimaryKeyImpl(pTable, pExpr); } -static bool findAndSetColumn(SColumnNode** pColRef, const STableNode* pTable) { +static int32_t findAndSetColumn(STranslateContext* pCxt, SColumnNode** pColRef, const STableNode* pTable, + bool* pFound) { SColumnNode* pCol = *pColRef; - bool found = false; + *pFound = false; if (QUERY_NODE_REAL_TABLE == nodeType(pTable)) { const STableMeta* pMeta = ((SRealTableNode*)pTable)->pMeta; if (isInternalPrimaryKey(pCol)) { setColumnInfoBySchema((SRealTableNode*)pTable, pMeta->schema, false, pCol); - return true; + *pFound = true; + return TSDB_CODE_SUCCESS; } int32_t nums = pMeta->tableInfo.numOfTags + pMeta->tableInfo.numOfColumns; for (int32_t i = 0; i < nums; ++i) { if (0 == strcmp(pCol->colName, pMeta->schema[i].name)) { setColumnInfoBySchema((SRealTableNode*)pTable, pMeta->schema + i, (i >= pMeta->tableInfo.numOfColumns), pCol); - found = true; + *pFound = true; break; } } @@ -489,13 +491,15 @@ static bool findAndSetColumn(SColumnNode** pColRef, const STableNode* pTable) { SExprNode* pExpr = (SExprNode*)pNode; if (0 == strcmp(pCol->colName, pExpr->aliasName) || (isPrimaryKey((STempTableNode*)pTable, pNode) && isInternalPrimaryKey(pCol))) { + if (*pFound) { + return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_AMBIGUOUS_COLUMN, pCol->colName); + } setColumnInfoByExpr(pTable, pExpr, pColRef); - found = true; - break; + *pFound = true; } } } - return found; + return TSDB_CODE_SUCCESS; } static EDealRes translateColumnWithPrefix(STranslateContext* pCxt, SColumnNode** pCol) { @@ -506,7 +510,12 @@ static EDealRes translateColumnWithPrefix(STranslateContext* pCxt, SColumnNode** STableNode* pTable = taosArrayGetP(pTables, i); if (belongTable(pCxt->pParseCxt->db, (*pCol), pTable)) { foundTable = true; - if (findAndSetColumn(pCol, pTable)) { + bool foundCol = false; + pCxt->errCode = findAndSetColumn(pCxt, pCol, pTable, &foundCol); + if (TSDB_CODE_SUCCESS != pCxt->errCode) { + return DEAL_RES_ERROR; + } + if (foundCol) { break; } return generateDealNodeErrMsg(pCxt, TSDB_CODE_PAR_INVALID_COLUMN, (*pCol)->colName); @@ -525,14 +534,19 @@ static EDealRes translateColumnWithoutPrefix(STranslateContext* pCxt, SColumnNod bool isInternalPk = isInternalPrimaryKey(*pCol); for (size_t i = 0; i < nums; ++i) { STableNode* pTable = taosArrayGetP(pTables, i); - if (findAndSetColumn(pCol, pTable)) { + bool foundCol = false; + pCxt->errCode = findAndSetColumn(pCxt, pCol, pTable, &foundCol); + if (TSDB_CODE_SUCCESS != pCxt->errCode) { + return DEAL_RES_ERROR; + } + if (foundCol) { if (found) { return generateDealNodeErrMsg(pCxt, TSDB_CODE_PAR_AMBIGUOUS_COLUMN, (*pCol)->colName); } found = true; - if (isInternalPk) { - break; - } + } + if (isInternalPk) { + break; } } if (!found) { @@ -1939,7 +1953,9 @@ static int32_t createPrimaryKeyColByTable(STranslateContext* pCxt, STableNode* p } pCol->colId = PRIMARYKEY_TIMESTAMP_COL_ID; strcpy(pCol->colName, PK_TS_COL_INTERNAL_NAME); - if (!findAndSetColumn(&pCol, pTable)) { + bool found = false; + int32_t code = findAndSetColumn(pCxt, &pCol, pTable, &found); + if (TSDB_CODE_SUCCESS != code || !found) { return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_TIMELINE_FUNC); } *pPrimaryKey = (SNode*)pCol; @@ -2617,10 +2633,7 @@ static int32_t checkTableSchema(STranslateContext* pCxt, SCreateTableStmt* pStmt } static int32_t checkCreateTable(STranslateContext* pCxt, SCreateTableStmt* pStmt) { - int32_t code = checkRangeOption(pCxt, "delay", pStmt->pOptions->delay, TSDB_MIN_ROLLUP_DELAY, TSDB_MAX_ROLLUP_DELAY); - if (TSDB_CODE_SUCCESS == code) { - code = checTableFactorOption(pCxt, pStmt->pOptions->filesFactor); - } + int32_t code = checTableFactorOption(pCxt, pStmt->pOptions->filesFactor); if (TSDB_CODE_SUCCESS == code) { code = checkTableRollupOption(pCxt, pStmt->pOptions->pRollupFuncs); } @@ -2861,7 +2874,6 @@ static int32_t buildRollupAst(STranslateContext* pCxt, SCreateTableStmt* pStmt, static int32_t buildCreateStbReq(STranslateContext* pCxt, SCreateTableStmt* pStmt, SMCreateStbReq* pReq) { pReq->igExists = pStmt->ignoreExists; pReq->xFilesFactor = pStmt->pOptions->filesFactor; - pReq->delay = pStmt->pOptions->delay; pReq->ttl = pStmt->pOptions->ttl; columnDefNodeToField(pStmt->pCols, &pReq->pColumns); columnDefNodeToField(pStmt->pTags, &pReq->pTags); @@ -3305,6 +3317,10 @@ static int32_t buildCreateTopicReq(STranslateContext* pCxt, SCreateTopicStmt* pS tNameGetFullDbName(&name, pReq->subDbName); } else { pReq->subType = TOPIC_SUB_TYPE__COLUMN; + tNameSetDbName(&name, pCxt->pParseCxt->acctId, + ((SRealTableNode*)(((SSelectStmt*)pStmt->pQuery)->pFromTable))->table.dbName, + strlen(pStmt->subDbName)); + tNameGetFullDbName(&name, pReq->subDbName); pCxt->pParseCxt->topicQuery = true; code = translateQuery(pCxt, pStmt->pQuery); if (TSDB_CODE_SUCCESS == code) { diff --git a/source/libs/parser/src/sql.c b/source/libs/parser/src/sql.c index 76e461f2b879392f071fee4965f919884c924c44..d180b4892f2c12a2f49c666dee96503b227af869 100644 --- a/source/libs/parser/src/sql.c +++ b/source/libs/parser/src/sql.c @@ -1,3 +1,5 @@ +/* This file is automatically generated by Lemon from input grammar +** source file "sql.y". */ /* ** 2000-05-29 ** @@ -22,10 +24,7 @@ ** The following is the concatenation of all %include directives from the ** input grammar file: */ -#include -#include /************ Begin %include sections from the grammar ************************/ - #include #include #include @@ -38,11 +37,247 @@ #include "ttokendef.h" #include "parAst.h" /**************** End of %include directives **********************************/ -/* These constants specify the various numeric values for terminal symbols -** in a format understandable to "makeheaders". This section is blank unless -** "lemon" is run with the "-m" command-line option. -***************** Begin makeheaders token definitions *************************/ -/**************** End makeheaders token definitions ***************************/ +/* These constants specify the various numeric values for terminal symbols. +***************** Begin token definitions *************************************/ +#ifndef TK_OR +#define TK_OR 1 +#define TK_AND 2 +#define TK_UNION 3 +#define TK_ALL 4 +#define TK_MINUS 5 +#define TK_EXCEPT 6 +#define TK_INTERSECT 7 +#define TK_NK_BITAND 8 +#define TK_NK_BITOR 9 +#define TK_NK_LSHIFT 10 +#define TK_NK_RSHIFT 11 +#define TK_NK_PLUS 12 +#define TK_NK_MINUS 13 +#define TK_NK_STAR 14 +#define TK_NK_SLASH 15 +#define TK_NK_REM 16 +#define TK_NK_CONCAT 17 +#define TK_CREATE 18 +#define TK_ACCOUNT 19 +#define TK_NK_ID 20 +#define TK_PASS 21 +#define TK_NK_STRING 22 +#define TK_ALTER 23 +#define TK_PPS 24 +#define TK_TSERIES 25 +#define TK_STORAGE 26 +#define TK_STREAMS 27 +#define TK_QTIME 28 +#define TK_DBS 29 +#define TK_USERS 30 +#define TK_CONNS 31 +#define TK_STATE 32 +#define TK_USER 33 +#define TK_PRIVILEGE 34 +#define TK_DROP 35 +#define TK_GRANT 36 +#define TK_ON 37 +#define TK_TO 38 +#define TK_REVOKE 39 +#define TK_FROM 40 +#define TK_NK_COMMA 41 +#define TK_READ 42 +#define TK_WRITE 43 +#define TK_NK_DOT 44 +#define TK_DNODE 45 +#define TK_PORT 46 +#define TK_NK_INTEGER 47 +#define TK_DNODES 48 +#define TK_NK_IPTOKEN 49 +#define TK_LOCAL 50 +#define TK_QNODE 51 +#define TK_BNODE 52 +#define TK_SNODE 53 +#define TK_MNODE 54 +#define TK_DATABASE 55 +#define TK_USE 56 +#define TK_IF 57 +#define TK_NOT 58 +#define TK_EXISTS 59 +#define TK_BUFFER 60 +#define TK_CACHELAST 61 +#define TK_COMP 62 +#define TK_DAYS 63 +#define TK_NK_VARIABLE 64 +#define TK_FSYNC 65 +#define TK_MAXROWS 66 +#define TK_MINROWS 67 +#define TK_KEEP 68 +#define TK_PAGES 69 +#define TK_PAGESIZE 70 +#define TK_PRECISION 71 +#define TK_REPLICA 72 +#define TK_STRICT 73 +#define TK_WAL 74 +#define TK_VGROUPS 75 +#define TK_SINGLE_STABLE 76 +#define TK_RETENTIONS 77 +#define TK_SCHEMALESS 78 +#define TK_NK_COLON 79 +#define TK_TABLE 80 +#define TK_NK_LP 81 +#define TK_NK_RP 82 +#define TK_STABLE 83 +#define TK_ADD 84 +#define TK_COLUMN 85 +#define TK_MODIFY 86 +#define TK_RENAME 87 +#define TK_TAG 88 +#define TK_SET 89 +#define TK_NK_EQ 90 +#define TK_USING 91 +#define TK_TAGS 92 +#define TK_COMMENT 93 +#define TK_BOOL 94 +#define TK_TINYINT 95 +#define TK_SMALLINT 96 +#define TK_INT 97 +#define TK_INTEGER 98 +#define TK_BIGINT 99 +#define TK_FLOAT 100 +#define TK_DOUBLE 101 +#define TK_BINARY 102 +#define TK_TIMESTAMP 103 +#define TK_NCHAR 104 +#define TK_UNSIGNED 105 +#define TK_JSON 106 +#define TK_VARCHAR 107 +#define TK_MEDIUMBLOB 108 +#define TK_BLOB 109 +#define TK_VARBINARY 110 +#define TK_DECIMAL 111 +#define TK_FILE_FACTOR 112 +#define TK_NK_FLOAT 113 +#define TK_ROLLUP 114 +#define TK_TTL 115 +#define TK_SMA 116 +#define TK_SHOW 117 +#define TK_DATABASES 118 +#define TK_TABLES 119 +#define TK_STABLES 120 +#define TK_MNODES 121 +#define TK_MODULES 122 +#define TK_QNODES 123 +#define TK_FUNCTIONS 124 +#define TK_INDEXES 125 +#define TK_ACCOUNTS 126 +#define TK_APPS 127 +#define TK_CONNECTIONS 128 +#define TK_LICENCE 129 +#define TK_GRANTS 130 +#define TK_QUERIES 131 +#define TK_SCORES 132 +#define TK_TOPICS 133 +#define TK_VARIABLES 134 +#define TK_BNODES 135 +#define TK_SNODES 136 +#define TK_CLUSTER 137 +#define TK_TRANSACTIONS 138 +#define TK_LIKE 139 +#define TK_INDEX 140 +#define TK_FULLTEXT 141 +#define TK_FUNCTION 142 +#define TK_INTERVAL 143 +#define TK_TOPIC 144 +#define TK_AS 145 +#define TK_CONSUMER 146 +#define TK_GROUP 147 +#define TK_DESC 148 +#define TK_DESCRIBE 149 +#define TK_RESET 150 +#define TK_QUERY 151 +#define TK_CACHE 152 +#define TK_EXPLAIN 153 +#define TK_ANALYZE 154 +#define TK_VERBOSE 155 +#define TK_NK_BOOL 156 +#define TK_RATIO 157 +#define TK_COMPACT 158 +#define TK_VNODES 159 +#define TK_IN 160 +#define TK_OUTPUTTYPE 161 +#define TK_AGGREGATE 162 +#define TK_BUFSIZE 163 +#define TK_STREAM 164 +#define TK_INTO 165 +#define TK_TRIGGER 166 +#define TK_AT_ONCE 167 +#define TK_WINDOW_CLOSE 168 +#define TK_WATERMARK 169 +#define TK_KILL 170 +#define TK_CONNECTION 171 +#define TK_TRANSACTION 172 +#define TK_MERGE 173 +#define TK_VGROUP 174 +#define TK_REDISTRIBUTE 175 +#define TK_SPLIT 176 +#define TK_SYNCDB 177 +#define TK_NULL 178 +#define TK_NK_QUESTION 179 +#define TK_NK_ARROW 180 +#define TK_ROWTS 181 +#define TK_TBNAME 182 +#define TK_QSTARTTS 183 +#define TK_QENDTS 184 +#define TK_WSTARTTS 185 +#define TK_WENDTS 186 +#define TK_WDURATION 187 +#define TK_CAST 188 +#define TK_NOW 189 +#define TK_TODAY 190 +#define TK_TIMEZONE 191 +#define TK_COUNT 192 +#define TK_FIRST 193 +#define TK_LAST 194 +#define TK_LAST_ROW 195 +#define TK_BETWEEN 196 +#define TK_IS 197 +#define TK_NK_LT 198 +#define TK_NK_GT 199 +#define TK_NK_LE 200 +#define TK_NK_GE 201 +#define TK_NK_NE 202 +#define TK_MATCH 203 +#define TK_NMATCH 204 +#define TK_CONTAINS 205 +#define TK_JOIN 206 +#define TK_INNER 207 +#define TK_SELECT 208 +#define TK_DISTINCT 209 +#define TK_WHERE 210 +#define TK_PARTITION 211 +#define TK_BY 212 +#define TK_SESSION 213 +#define TK_STATE_WINDOW 214 +#define TK_SLIDING 215 +#define TK_FILL 216 +#define TK_VALUE 217 +#define TK_NONE 218 +#define TK_PREV 219 +#define TK_LINEAR 220 +#define TK_NEXT 221 +#define TK_HAVING 222 +#define TK_ORDER 223 +#define TK_SLIMIT 224 +#define TK_SOFFSET 225 +#define TK_LIMIT 226 +#define TK_OFFSET 227 +#define TK_ASC 228 +#define TK_NULLS 229 +#define TK_ID 230 +#define TK_NK_BITNOT 231 +#define TK_INSERT 232 +#define TK_VALUES 233 +#define TK_IMPORT 234 +#define TK_NK_SEMI 235 +#define TK_FILE 236 +#endif +/**************** End token definitions ***************************************/ /* The next sections is a series of control #defines. ** various aspects of the generated parser. @@ -100,25 +335,25 @@ #endif /************* Begin control #defines *****************************************/ #define YYCODETYPE unsigned short int -#define YYNOCODE 358 +#define YYNOCODE 357 #define YYACTIONTYPE unsigned short int #define ParseTOKENTYPE SToken typedef union { int yyinit; ParseTOKENTYPE yy0; - EOrder yy14; - ENullOrder yy17; - SNodeList* yy60; - SToken yy105; - int32_t yy140; - SNode* yy172; - EFillMode yy202; - SDataType yy248; - EOperatorType yy572; - int64_t yy593; - SAlterOption yy609; - bool yy617; - EJoinType yy636; + SAlterOption yy53; + ENullOrder yy109; + SToken yy113; + EJoinType yy120; + int64_t yy123; + bool yy131; + EOrder yy428; + SDataType yy490; + EFillMode yy522; + int32_t yy550; + EOperatorType yy632; + SNodeList* yy670; + SNode* yy686; } YYMINORTYPE; #ifndef YYSTACKDEPTH #define YYSTACKDEPTH 100 @@ -135,16 +370,17 @@ typedef union { #define ParseCTX_STORE #define YYFALLBACK 1 #define YYNSTATE 612 -#define YYNRULE 452 -#define YYNTOKEN 238 +#define YYNRULE 451 +#define YYNRULE_WITH_ACTION 451 +#define YYNTOKEN 237 #define YY_MAX_SHIFT 611 -#define YY_MIN_SHIFTREDUCE 899 -#define YY_MAX_SHIFTREDUCE 1350 -#define YY_ERROR_ACTION 1351 -#define YY_ACCEPT_ACTION 1352 -#define YY_NO_ACTION 1353 -#define YY_MIN_REDUCE 1354 -#define YY_MAX_REDUCE 1805 +#define YY_MIN_SHIFTREDUCE 898 +#define YY_MAX_SHIFTREDUCE 1348 +#define YY_ERROR_ACTION 1349 +#define YY_ACCEPT_ACTION 1350 +#define YY_NO_ACTION 1351 +#define YY_MIN_REDUCE 1352 +#define YY_MAX_REDUCE 1802 /************* End control #defines *******************************************/ #define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0]))) @@ -211,616 +447,622 @@ typedef union { ** yy_default[] Default action for each state. ** *********** Begin parsing tables **********************************************/ -#define YY_ACTTAB_COUNT (2214) +#define YY_ACTTAB_COUNT (2125) static const YYACTIONTYPE yy_action[] = { - /* 0 */ 132, 1783, 345, 1639, 1442, 1639, 294, 385, 311, 386, - /* 10 */ 1386, 78, 35, 33, 1782, 1474, 24, 1652, 1780, 131, - /* 20 */ 303, 1366, 1164, 1636, 114, 1636, 36, 34, 32, 31, - /* 30 */ 30, 393, 1477, 386, 1386, 1783, 1476, 1783, 1632, 1638, - /* 40 */ 1632, 1638, 1783, 524, 62, 1668, 929, 1162, 147, 528, - /* 50 */ 1781, 528, 1780, 488, 1780, 146, 1636, 109, 14, 1780, - /* 60 */ 35, 33, 1291, 508, 1170, 485, 1480, 1622, 303, 524, - /* 70 */ 1164, 1632, 1638, 1188, 36, 34, 32, 31, 30, 28, - /* 80 */ 228, 1, 528, 1681, 933, 934, 82, 1653, 511, 1655, - /* 90 */ 1656, 507, 402, 528, 113, 1162, 1721, 479, 1530, 1668, - /* 100 */ 296, 1717, 142, 608, 39, 293, 14, 478, 35, 33, - /* 110 */ 1528, 512, 1170, 489, 1163, 1377, 303, 1576, 1164, 461, - /* 120 */ 277, 1749, 36, 34, 32, 31, 30, 55, 56, 2, - /* 130 */ 95, 111, 485, 94, 93, 92, 91, 90, 89, 88, - /* 140 */ 87, 86, 477, 1162, 1202, 525, 217, 1728, 484, 55, - /* 150 */ 483, 608, 1253, 1783, 14, 384, 1165, 105, 388, 1783, - /* 160 */ 1170, 113, 1163, 351, 423, 1622, 148, 286, 277, 390, - /* 170 */ 1780, 451, 146, 1563, 1485, 1186, 1780, 2, 1168, 1169, - /* 180 */ 157, 1215, 1216, 1218, 1219, 1220, 1221, 1222, 504, 526, - /* 190 */ 1230, 1231, 1232, 1233, 1234, 1235, 1735, 275, 111, 608, - /* 200 */ 1253, 344, 1254, 343, 1165, 55, 392, 524, 149, 388, - /* 210 */ 1163, 1783, 487, 143, 1728, 1729, 287, 1733, 285, 284, - /* 220 */ 1732, 425, 1259, 198, 146, 427, 1168, 1169, 1780, 1215, - /* 230 */ 1216, 1218, 1219, 1220, 1221, 1222, 504, 526, 1230, 1231, - /* 240 */ 1232, 1233, 1234, 1235, 946, 141, 945, 1463, 426, 55, - /* 250 */ 1254, 65, 1165, 1376, 149, 1189, 1315, 1524, 27, 301, - /* 260 */ 1248, 1249, 1250, 1251, 1252, 1256, 1257, 1258, 38, 1187, - /* 270 */ 1259, 604, 603, 947, 1168, 1169, 149, 1215, 1216, 1218, - /* 280 */ 1219, 1220, 1221, 1222, 504, 526, 1230, 1231, 1232, 1233, - /* 290 */ 1234, 1235, 35, 33, 1354, 471, 1313, 1314, 1316, 1317, - /* 300 */ 303, 1190, 1164, 1622, 402, 155, 27, 301, 1248, 1249, - /* 310 */ 1250, 1251, 1252, 1256, 1257, 1258, 178, 525, 104, 103, - /* 320 */ 102, 101, 100, 99, 98, 97, 96, 1162, 140, 349, - /* 330 */ 60, 1652, 149, 59, 419, 415, 411, 407, 177, 1462, - /* 340 */ 35, 33, 1236, 307, 1170, 525, 1485, 562, 303, 554, - /* 350 */ 1164, 129, 36, 34, 32, 31, 30, 105, 26, 1668, - /* 360 */ 1487, 8, 496, 63, 428, 313, 175, 509, 36, 34, - /* 370 */ 32, 31, 30, 129, 1485, 1162, 149, 508, 315, 525, - /* 380 */ 1352, 1622, 1487, 608, 1375, 1566, 1568, 512, 35, 33, - /* 390 */ 306, 350, 1170, 1575, 1163, 149, 303, 1681, 1164, 375, - /* 400 */ 82, 1653, 511, 1655, 1656, 507, 525, 528, 1485, 9, - /* 410 */ 1721, 474, 316, 1298, 296, 1717, 1796, 485, 360, 1188, - /* 420 */ 129, 525, 1305, 1162, 174, 1755, 166, 219, 171, 1487, - /* 430 */ 169, 608, 560, 361, 1622, 1485, 1165, 566, 319, 1457, - /* 440 */ 1170, 1611, 1163, 1241, 159, 158, 113, 164, 525, 1188, - /* 450 */ 1485, 559, 558, 1374, 557, 556, 555, 9, 1168, 1169, - /* 460 */ 401, 1215, 1216, 1218, 1219, 1220, 1221, 1222, 504, 526, - /* 470 */ 1230, 1231, 1232, 1233, 1234, 1235, 336, 1485, 1783, 608, - /* 480 */ 480, 475, 1530, 111, 1165, 1373, 326, 130, 149, 308, - /* 490 */ 1163, 146, 256, 1470, 1528, 1780, 338, 334, 144, 1728, - /* 500 */ 1729, 945, 1733, 1622, 254, 53, 1168, 1169, 52, 1215, - /* 510 */ 1216, 1218, 1219, 1220, 1221, 1222, 504, 526, 1230, 1231, - /* 520 */ 1232, 1233, 1234, 1235, 560, 160, 421, 485, 437, 436, - /* 530 */ 64, 292, 1165, 435, 192, 1622, 110, 432, 1372, 493, - /* 540 */ 431, 430, 429, 559, 558, 565, 557, 556, 555, 497, - /* 550 */ 55, 32, 31, 30, 1168, 1169, 113, 1215, 1216, 1218, - /* 560 */ 1219, 1220, 1221, 1222, 504, 526, 1230, 1231, 1232, 1233, - /* 570 */ 1234, 1235, 35, 33, 274, 489, 1186, 525, 1530, 427, - /* 580 */ 303, 1217, 1164, 368, 1472, 314, 380, 80, 1622, 1482, - /* 590 */ 1528, 525, 1468, 111, 1640, 36, 34, 32, 31, 30, - /* 600 */ 54, 1371, 426, 1602, 381, 1460, 1485, 1162, 217, 1728, - /* 610 */ 484, 1217, 483, 1735, 1636, 1783, 1255, 58, 57, 348, - /* 620 */ 1485, 525, 154, 1370, 1170, 62, 1530, 342, 146, 1632, - /* 630 */ 1638, 998, 1780, 459, 11, 10, 1260, 1731, 1529, 273, - /* 640 */ 528, 2, 332, 1367, 328, 324, 151, 1481, 1000, 1369, - /* 650 */ 1485, 1622, 1036, 551, 550, 549, 1040, 548, 1042, 1043, - /* 660 */ 547, 1045, 544, 608, 1051, 541, 1053, 1054, 538, 535, - /* 670 */ 434, 433, 25, 1622, 1163, 379, 1355, 149, 374, 373, - /* 680 */ 372, 371, 370, 367, 366, 365, 364, 363, 359, 358, - /* 690 */ 357, 356, 355, 354, 353, 352, 1290, 95, 560, 1622, - /* 700 */ 94, 93, 92, 91, 90, 89, 88, 87, 86, 1416, - /* 710 */ 36, 34, 32, 31, 30, 1267, 1165, 559, 558, 501, - /* 720 */ 557, 556, 555, 1368, 494, 1365, 578, 576, 525, 1364, - /* 730 */ 1652, 1347, 1735, 36, 34, 32, 31, 30, 1168, 1169, - /* 740 */ 522, 1215, 1216, 1218, 1219, 1220, 1221, 1222, 504, 526, - /* 750 */ 1230, 1231, 1232, 1233, 1234, 1235, 1730, 1485, 1668, 525, - /* 760 */ 1363, 1652, 1461, 71, 1567, 1568, 509, 577, 1443, 437, - /* 770 */ 436, 523, 7, 1622, 435, 1622, 508, 110, 432, 1622, - /* 780 */ 1622, 431, 430, 429, 1478, 489, 1362, 1191, 1485, 1668, - /* 790 */ 36, 34, 32, 31, 30, 1188, 1681, 509, 1361, 81, - /* 800 */ 1653, 511, 1655, 1656, 507, 1360, 528, 508, 339, 1721, - /* 810 */ 1622, 1622, 1346, 276, 1717, 1652, 489, 525, 195, 562, - /* 820 */ 1359, 491, 1164, 250, 485, 1783, 1515, 1681, 1358, 241, - /* 830 */ 81, 1653, 511, 1655, 1656, 507, 1622, 528, 148, 1245, - /* 840 */ 1721, 129, 1780, 1668, 276, 1717, 1485, 1162, 1622, 458, - /* 850 */ 1488, 488, 1357, 113, 525, 1622, 1783, 223, 310, 309, - /* 860 */ 1202, 508, 1413, 503, 1170, 1622, 317, 128, 1178, 146, - /* 870 */ 1622, 933, 934, 1780, 1740, 1286, 183, 185, 1622, 181, - /* 880 */ 184, 1681, 1403, 1485, 82, 1653, 511, 1655, 1656, 507, - /* 890 */ 111, 528, 187, 1171, 1721, 186, 1149, 1150, 296, 1717, - /* 900 */ 142, 1289, 1622, 608, 438, 145, 1728, 1729, 189, 1733, - /* 910 */ 1170, 188, 220, 204, 1163, 553, 1652, 472, 467, 1748, - /* 920 */ 119, 452, 584, 583, 582, 318, 1398, 581, 580, 579, - /* 930 */ 115, 574, 573, 572, 571, 570, 569, 568, 567, 122, - /* 940 */ 563, 1396, 1286, 46, 1668, 449, 11, 10, 440, 529, - /* 950 */ 207, 1173, 509, 1349, 1350, 37, 1165, 1217, 447, 214, - /* 960 */ 1174, 463, 508, 443, 1172, 77, 1622, 1387, 37, 1642, - /* 970 */ 37, 230, 117, 118, 119, 73, 46, 1669, 1168, 1169, - /* 980 */ 1652, 533, 1681, 420, 1312, 82, 1653, 511, 1655, 1656, - /* 990 */ 507, 209, 528, 118, 1525, 1721, 1261, 119, 1751, 296, - /* 1000 */ 1717, 1796, 1179, 120, 118, 486, 1644, 222, 1668, 1223, - /* 1010 */ 1778, 1122, 232, 517, 238, 1029, 509, 249, 1176, 225, - /* 1020 */ 227, 3, 1057, 970, 1182, 1186, 508, 321, 325, 282, - /* 1030 */ 1622, 1175, 998, 362, 1061, 526, 1230, 1231, 1068, 1652, - /* 1040 */ 971, 283, 442, 1133, 1066, 121, 1681, 246, 156, 82, - /* 1050 */ 1653, 511, 1655, 1656, 507, 369, 528, 450, 1565, 1721, - /* 1060 */ 377, 382, 1192, 296, 1717, 1796, 376, 1668, 383, 391, - /* 1070 */ 378, 191, 1195, 394, 1739, 509, 395, 163, 1194, 396, - /* 1080 */ 165, 1196, 399, 445, 168, 508, 1652, 397, 439, 1622, - /* 1090 */ 398, 170, 1193, 190, 489, 173, 400, 61, 403, 422, - /* 1100 */ 176, 424, 1475, 180, 1471, 1681, 182, 85, 263, 1653, - /* 1110 */ 511, 1655, 1656, 507, 1668, 528, 291, 123, 51, 1170, - /* 1120 */ 124, 50, 509, 1473, 1469, 193, 125, 126, 453, 454, - /* 1130 */ 1606, 196, 508, 1652, 1783, 460, 1622, 199, 247, 457, - /* 1140 */ 464, 489, 202, 1191, 462, 1762, 1742, 148, 465, 1752, - /* 1150 */ 473, 1780, 1681, 515, 213, 263, 1653, 511, 1655, 1656, - /* 1160 */ 507, 1668, 528, 205, 1652, 1761, 470, 6, 208, 509, - /* 1170 */ 482, 469, 295, 112, 476, 1286, 5, 1190, 1736, 508, - /* 1180 */ 215, 1783, 40, 1622, 498, 297, 495, 1799, 216, 18, - /* 1190 */ 1702, 1574, 1668, 136, 146, 1779, 513, 514, 1780, 1681, - /* 1200 */ 509, 305, 83, 1653, 511, 1655, 1656, 507, 1573, 528, - /* 1210 */ 508, 518, 1721, 72, 1622, 221, 1720, 1717, 492, 224, - /* 1220 */ 234, 499, 1652, 226, 236, 519, 70, 520, 1486, 248, - /* 1230 */ 1681, 531, 251, 83, 1653, 511, 1655, 1656, 507, 1458, - /* 1240 */ 528, 243, 607, 1721, 253, 47, 255, 500, 1717, 257, - /* 1250 */ 1668, 264, 135, 1616, 258, 1615, 320, 1612, 506, 322, - /* 1260 */ 323, 1158, 327, 1159, 152, 1610, 329, 330, 508, 1609, - /* 1270 */ 331, 333, 1622, 1608, 335, 1607, 337, 1592, 153, 340, - /* 1280 */ 341, 1652, 1136, 1135, 1586, 1585, 346, 347, 1681, 1584, - /* 1290 */ 1583, 271, 1653, 511, 1655, 1656, 507, 505, 528, 502, - /* 1300 */ 1693, 1558, 1105, 1557, 1556, 1555, 1554, 1553, 1552, 1668, - /* 1310 */ 1551, 1550, 1549, 1548, 1547, 1546, 1545, 509, 1544, 1543, - /* 1320 */ 1542, 1541, 116, 1540, 1539, 1538, 1537, 508, 1536, 1535, - /* 1330 */ 1534, 1622, 1533, 1532, 1531, 1415, 1652, 1383, 161, 1107, - /* 1340 */ 139, 936, 1382, 1600, 387, 935, 107, 1681, 179, 404, - /* 1350 */ 133, 1653, 511, 1655, 1656, 507, 1594, 528, 1582, 1581, - /* 1360 */ 1571, 1464, 1414, 1412, 1668, 1410, 389, 1408, 1406, 1395, - /* 1370 */ 1394, 1381, 509, 1466, 162, 108, 167, 172, 45, 1465, - /* 1380 */ 49, 406, 508, 127, 456, 197, 1622, 410, 203, 1652, - /* 1390 */ 405, 414, 409, 408, 490, 1797, 1072, 413, 412, 1071, - /* 1400 */ 964, 418, 1681, 1404, 416, 83, 1653, 511, 1655, 1656, - /* 1410 */ 507, 417, 528, 1399, 611, 1721, 288, 1668, 289, 997, - /* 1420 */ 1718, 996, 995, 994, 575, 509, 441, 991, 245, 577, - /* 1430 */ 1397, 290, 1380, 446, 1379, 508, 448, 990, 989, 1622, - /* 1440 */ 106, 84, 468, 1599, 1652, 444, 600, 596, 592, 588, - /* 1450 */ 244, 1143, 1593, 455, 1580, 1681, 1652, 1579, 272, 1653, - /* 1460 */ 511, 1655, 1656, 507, 1578, 528, 1570, 66, 4, 37, - /* 1470 */ 201, 15, 1668, 212, 206, 79, 43, 211, 239, 1311, - /* 1480 */ 509, 134, 210, 22, 1668, 1642, 16, 1304, 67, 23, - /* 1490 */ 508, 218, 509, 41, 1622, 137, 42, 1283, 13, 48, - /* 1500 */ 1282, 1340, 508, 17, 1329, 1335, 1622, 1334, 298, 19, - /* 1510 */ 1681, 10, 521, 267, 1653, 511, 1655, 1656, 507, 1339, - /* 1520 */ 528, 1338, 1681, 29, 299, 133, 1653, 511, 1655, 1656, - /* 1530 */ 507, 1225, 528, 1652, 138, 1224, 150, 466, 1210, 1569, - /* 1540 */ 200, 229, 235, 516, 12, 1641, 20, 237, 21, 1180, - /* 1550 */ 231, 481, 1309, 1227, 233, 240, 68, 1141, 1035, 194, - /* 1560 */ 1246, 1668, 69, 1684, 510, 527, 44, 532, 1058, 509, - /* 1570 */ 1798, 73, 312, 1055, 534, 530, 536, 537, 539, 508, - /* 1580 */ 1052, 540, 542, 1622, 1046, 543, 300, 545, 1044, 1652, - /* 1590 */ 552, 546, 1050, 1049, 1048, 74, 75, 1067, 76, 1681, - /* 1600 */ 1047, 1064, 272, 1653, 511, 1655, 1656, 507, 1065, 528, - /* 1610 */ 1063, 962, 986, 561, 242, 1004, 564, 1668, 984, 983, - /* 1620 */ 979, 982, 981, 980, 978, 506, 977, 1001, 1652, 999, - /* 1630 */ 974, 973, 972, 969, 1411, 508, 968, 967, 585, 1622, - /* 1640 */ 586, 587, 1409, 589, 590, 591, 1407, 593, 594, 595, - /* 1650 */ 1405, 598, 597, 599, 1393, 1681, 1668, 1652, 271, 1653, - /* 1660 */ 511, 1655, 1656, 507, 509, 528, 601, 1694, 602, 1392, - /* 1670 */ 1378, 605, 606, 609, 508, 1166, 610, 252, 1622, 1353, - /* 1680 */ 1353, 302, 1353, 1353, 1353, 1668, 1652, 1353, 1353, 1353, - /* 1690 */ 1353, 1353, 1353, 509, 1681, 1353, 1353, 272, 1653, 511, - /* 1700 */ 1655, 1656, 507, 508, 528, 1353, 1353, 1622, 1353, 1353, - /* 1710 */ 304, 1353, 1353, 1353, 1668, 1353, 1353, 1652, 1353, 1353, - /* 1720 */ 1353, 1353, 509, 1681, 1353, 1353, 272, 1653, 511, 1655, - /* 1730 */ 1656, 507, 508, 528, 1353, 1353, 1622, 1353, 1353, 1353, - /* 1740 */ 1353, 1353, 1353, 1353, 1353, 1668, 1353, 1353, 1652, 1353, - /* 1750 */ 1353, 1353, 1681, 509, 1353, 259, 1653, 511, 1655, 1656, - /* 1760 */ 507, 1353, 528, 508, 1353, 1353, 1353, 1622, 1353, 1353, - /* 1770 */ 1353, 1353, 1353, 1353, 1353, 1353, 1668, 1353, 1353, 1652, - /* 1780 */ 1353, 1353, 1353, 1681, 509, 1353, 266, 1653, 511, 1655, - /* 1790 */ 1656, 507, 1353, 528, 508, 1353, 1353, 1353, 1622, 1353, - /* 1800 */ 1353, 1353, 1353, 1353, 1353, 1353, 1353, 1668, 1353, 1353, - /* 1810 */ 1353, 1652, 1353, 1353, 1681, 509, 1353, 268, 1653, 511, - /* 1820 */ 1655, 1656, 507, 1353, 528, 508, 1353, 1353, 1652, 1622, - /* 1830 */ 1353, 1353, 1353, 1353, 1353, 1353, 1353, 1353, 1353, 1668, - /* 1840 */ 1353, 1353, 1353, 1353, 1353, 1681, 1353, 509, 260, 1653, - /* 1850 */ 511, 1655, 1656, 507, 1353, 528, 1668, 508, 1353, 1353, - /* 1860 */ 1353, 1622, 1353, 1353, 509, 1353, 1353, 1652, 1353, 1353, - /* 1870 */ 1353, 1353, 1353, 1353, 508, 1353, 1353, 1681, 1622, 1353, - /* 1880 */ 269, 1653, 511, 1655, 1656, 507, 1353, 528, 1353, 1353, - /* 1890 */ 1353, 1353, 1353, 1353, 1681, 1668, 1353, 261, 1653, 511, - /* 1900 */ 1655, 1656, 507, 509, 528, 1353, 1652, 1353, 1353, 1353, - /* 1910 */ 1353, 1353, 1353, 508, 1353, 1353, 1353, 1622, 1353, 1353, - /* 1920 */ 1353, 1353, 1353, 1652, 1353, 1353, 1353, 1353, 1353, 1353, - /* 1930 */ 1353, 1353, 1353, 1681, 1668, 1652, 270, 1653, 511, 1655, - /* 1940 */ 1656, 507, 509, 528, 1353, 1353, 1353, 1353, 1353, 1353, - /* 1950 */ 1353, 1668, 508, 1353, 1353, 1353, 1622, 1353, 1353, 509, - /* 1960 */ 1353, 1353, 1353, 1668, 1353, 1353, 1353, 1353, 1353, 508, - /* 1970 */ 1353, 509, 1681, 1622, 1652, 262, 1653, 511, 1655, 1656, - /* 1980 */ 507, 508, 528, 1353, 1353, 1622, 1353, 1652, 1353, 1681, - /* 1990 */ 1353, 1353, 1664, 1653, 511, 1655, 1656, 507, 1353, 528, - /* 2000 */ 1353, 1681, 1668, 1353, 1663, 1653, 511, 1655, 1656, 507, - /* 2010 */ 509, 528, 1353, 1353, 1353, 1668, 1353, 1353, 1353, 1353, - /* 2020 */ 508, 1353, 1353, 509, 1622, 1353, 1652, 1353, 1353, 1353, - /* 2030 */ 1353, 1353, 1353, 508, 1353, 1353, 1353, 1622, 1353, 1353, - /* 2040 */ 1681, 1353, 1353, 1662, 1653, 511, 1655, 1656, 507, 1353, - /* 2050 */ 528, 1353, 1353, 1681, 1668, 1353, 280, 1653, 511, 1655, - /* 2060 */ 1656, 507, 509, 528, 1353, 1353, 1353, 1353, 1353, 1353, - /* 2070 */ 1353, 1353, 508, 1353, 1353, 1353, 1622, 1353, 1353, 1353, - /* 2080 */ 1353, 1652, 1353, 1353, 1353, 1353, 1353, 1353, 1353, 1353, - /* 2090 */ 1652, 1353, 1681, 1353, 1353, 279, 1653, 511, 1655, 1656, - /* 2100 */ 507, 1353, 528, 1353, 1353, 1353, 1353, 1353, 1353, 1668, - /* 2110 */ 1353, 1353, 1353, 1353, 1353, 1353, 1353, 509, 1668, 1353, - /* 2120 */ 1353, 1353, 1353, 1353, 1353, 1353, 509, 508, 1353, 1353, - /* 2130 */ 1353, 1622, 1353, 1353, 1353, 1353, 508, 1652, 1353, 1353, - /* 2140 */ 1622, 1353, 1353, 1353, 1353, 1353, 1353, 1681, 1353, 1353, - /* 2150 */ 281, 1653, 511, 1655, 1656, 507, 1681, 528, 1353, 278, - /* 2160 */ 1653, 511, 1655, 1656, 507, 1668, 528, 1353, 1353, 1353, - /* 2170 */ 1353, 1353, 1353, 509, 1353, 1353, 1353, 1353, 1353, 1353, - /* 2180 */ 1353, 1353, 1353, 508, 1353, 1353, 1353, 1622, 1353, 1353, - /* 2190 */ 1353, 1353, 1353, 1353, 1353, 1353, 1353, 1353, 1353, 1353, - /* 2200 */ 1353, 1353, 1353, 1681, 1353, 1353, 265, 1653, 511, 1655, - /* 2210 */ 1656, 507, 1353, 528, + /* 0 */ 132, 1780, 345, 1636, 1440, 1636, 294, 385, 311, 386, + /* 10 */ 1384, 78, 35, 33, 1779, 1472, 24, 1649, 1777, 131, + /* 20 */ 303, 1364, 1162, 1633, 114, 1633, 36, 34, 32, 31, + /* 30 */ 30, 1780, 1475, 36, 34, 32, 31, 30, 1629, 1635, + /* 40 */ 1629, 1635, 1780, 525, 147, 1665, 928, 1160, 1777, 529, + /* 50 */ 525, 529, 1350, 489, 393, 146, 386, 1384, 14, 1777, + /* 60 */ 35, 33, 1289, 509, 1168, 56, 384, 1619, 303, 388, + /* 70 */ 1162, 36, 34, 32, 31, 30, 36, 34, 32, 31, + /* 80 */ 30, 1, 77, 1678, 932, 933, 82, 1650, 512, 1652, + /* 90 */ 1653, 508, 73, 529, 1375, 1160, 1718, 1414, 1780, 1296, + /* 100 */ 296, 1714, 142, 608, 39, 1186, 14, 1353, 35, 33, + /* 110 */ 319, 1778, 1168, 1161, 220, 1777, 303, 277, 1162, 462, + /* 120 */ 468, 1745, 36, 34, 32, 31, 30, 71, 95, 2, + /* 130 */ 1374, 94, 93, 92, 91, 90, 89, 88, 87, 86, + /* 140 */ 525, 1200, 55, 1160, 1619, 315, 1303, 307, 1476, 1251, + /* 150 */ 1780, 608, 1563, 1565, 14, 129, 1163, 438, 437, 1780, + /* 160 */ 1168, 1161, 436, 146, 1485, 110, 433, 1777, 277, 432, + /* 170 */ 431, 430, 146, 945, 497, 944, 1777, 2, 1166, 1167, + /* 180 */ 1619, 1213, 1214, 1216, 1217, 1218, 1219, 1220, 505, 527, + /* 190 */ 1228, 1229, 1230, 1231, 1232, 1233, 286, 1239, 1252, 608, + /* 200 */ 1251, 38, 946, 1186, 1163, 55, 62, 95, 149, 1161, + /* 210 */ 94, 93, 92, 91, 90, 89, 88, 87, 86, 1257, + /* 220 */ 1732, 36, 34, 32, 31, 30, 1166, 1167, 1479, 1213, + /* 230 */ 1214, 1216, 1217, 1218, 1219, 1220, 505, 527, 1228, 1229, + /* 240 */ 1230, 1231, 1232, 1233, 1729, 287, 1373, 285, 284, 1252, + /* 250 */ 426, 403, 1163, 1372, 428, 27, 301, 1246, 1247, 1248, + /* 260 */ 1249, 1250, 1254, 1255, 1256, 513, 1188, 1215, 306, 149, + /* 270 */ 1257, 1572, 28, 228, 1166, 1167, 427, 1213, 1214, 1216, + /* 280 */ 1217, 1218, 1219, 1220, 505, 527, 1228, 1229, 1230, 1231, + /* 290 */ 1232, 1233, 35, 33, 1352, 1313, 1619, 64, 292, 1461, + /* 300 */ 303, 192, 1162, 1619, 526, 351, 27, 301, 1246, 1247, + /* 310 */ 1248, 1249, 1250, 1254, 1255, 1256, 349, 1189, 104, 103, + /* 320 */ 102, 101, 100, 99, 98, 97, 96, 1160, 149, 452, + /* 330 */ 560, 1649, 149, 1483, 472, 1311, 1312, 1314, 1315, 275, + /* 340 */ 35, 33, 1234, 1162, 1168, 486, 313, 1665, 303, 559, + /* 350 */ 1162, 558, 557, 556, 129, 479, 403, 1345, 526, 1665, + /* 360 */ 498, 8, 1371, 1485, 1560, 1215, 526, 489, 1160, 1780, + /* 370 */ 350, 157, 1527, 392, 113, 1160, 388, 509, 360, 293, + /* 380 */ 1186, 1619, 146, 608, 1525, 1168, 1777, 1483, 35, 33, + /* 390 */ 478, 219, 1168, 1161, 1370, 1483, 303, 1678, 1162, 1459, + /* 400 */ 82, 1650, 512, 1652, 1653, 508, 55, 529, 26, 9, + /* 410 */ 1718, 111, 1619, 1288, 296, 1714, 142, 141, 36, 34, + /* 420 */ 32, 31, 30, 1160, 608, 488, 143, 1725, 1726, 1521, + /* 430 */ 1730, 608, 62, 1369, 1161, 1746, 1163, 1344, 438, 437, + /* 440 */ 1168, 1161, 204, 436, 1619, 109, 110, 433, 11, 10, + /* 450 */ 432, 431, 430, 480, 1478, 1368, 562, 9, 1166, 1167, + /* 460 */ 475, 1213, 1214, 1216, 1217, 1218, 1219, 1220, 505, 527, + /* 470 */ 1228, 1229, 1230, 1231, 1232, 1233, 1187, 1163, 316, 608, + /* 480 */ 344, 336, 343, 1619, 1163, 1460, 129, 997, 149, 1161, + /* 490 */ 36, 34, 32, 31, 30, 1485, 1527, 604, 603, 1166, + /* 500 */ 1167, 338, 334, 308, 999, 1619, 1166, 1167, 1525, 1213, + /* 510 */ 1214, 1216, 1217, 1218, 1219, 1220, 505, 527, 1228, 1229, + /* 520 */ 1230, 1231, 1232, 1233, 36, 34, 32, 31, 30, 1265, + /* 530 */ 481, 476, 1163, 149, 7, 1035, 552, 551, 550, 1039, + /* 540 */ 549, 1041, 1042, 548, 1044, 545, 1367, 1050, 542, 1052, + /* 550 */ 1053, 539, 536, 1366, 1166, 1167, 1649, 1213, 1214, 1216, + /* 560 */ 1217, 1218, 1219, 1220, 505, 527, 1228, 1229, 1230, 1231, + /* 570 */ 1232, 1233, 35, 33, 274, 375, 1184, 1411, 560, 526, + /* 580 */ 303, 526, 1162, 368, 1665, 1732, 380, 250, 155, 390, + /* 590 */ 1513, 105, 507, 361, 1200, 1184, 1619, 559, 424, 558, + /* 600 */ 557, 556, 509, 1619, 381, 1527, 1619, 1160, 1483, 1728, + /* 610 */ 1483, 1363, 314, 60, 1253, 513, 59, 1525, 1287, 159, + /* 620 */ 158, 1573, 1678, 128, 1168, 270, 1650, 512, 1652, 1653, + /* 630 */ 508, 506, 529, 503, 1690, 1258, 486, 584, 583, 582, + /* 640 */ 318, 2, 581, 580, 579, 115, 574, 573, 572, 571, + /* 650 */ 570, 569, 568, 567, 122, 563, 1362, 32, 31, 30, + /* 660 */ 1186, 1619, 1361, 608, 1360, 113, 435, 434, 562, 578, + /* 670 */ 576, 25, 1359, 1161, 379, 1458, 1358, 374, 373, 372, + /* 680 */ 371, 370, 367, 366, 365, 364, 363, 359, 358, 357, + /* 690 */ 356, 355, 354, 353, 352, 486, 1564, 1565, 526, 932, + /* 700 */ 933, 1732, 111, 1527, 1284, 198, 1619, 54, 1357, 1356, + /* 710 */ 402, 526, 1619, 1355, 1619, 1526, 1163, 144, 1725, 1726, + /* 720 */ 1185, 1730, 1619, 105, 113, 1727, 1619, 1483, 129, 1649, + /* 730 */ 429, 55, 566, 65, 1455, 1365, 1474, 1486, 1166, 1167, + /* 740 */ 1483, 1213, 1214, 1216, 1217, 1218, 1219, 1220, 505, 527, + /* 750 */ 1228, 1229, 1230, 1231, 1232, 1233, 1633, 1665, 1619, 1619, + /* 760 */ 1649, 111, 1608, 1619, 428, 510, 969, 944, 560, 1737, + /* 770 */ 1284, 1629, 1635, 1147, 1148, 509, 145, 1725, 1726, 1619, + /* 780 */ 1730, 555, 529, 970, 490, 526, 427, 559, 1665, 558, + /* 790 */ 557, 556, 422, 502, 577, 1678, 510, 1480, 81, 1650, + /* 800 */ 512, 1652, 1653, 508, 494, 529, 509, 326, 1718, 1468, + /* 810 */ 1619, 526, 276, 1714, 1483, 490, 183, 185, 1637, 181, + /* 820 */ 184, 1649, 1215, 1599, 1780, 187, 1678, 1470, 186, 81, + /* 830 */ 1650, 512, 1652, 1653, 508, 339, 529, 148, 1633, 1718, + /* 840 */ 1483, 1777, 1639, 276, 1714, 130, 310, 309, 526, 1665, + /* 850 */ 256, 565, 450, 1629, 1635, 1780, 1176, 510, 149, 1466, + /* 860 */ 460, 195, 254, 53, 529, 448, 52, 509, 146, 504, + /* 870 */ 526, 1619, 1777, 443, 526, 189, 119, 1483, 188, 1641, + /* 880 */ 46, 1169, 523, 160, 1649, 207, 524, 1678, 451, 526, + /* 890 */ 82, 1650, 512, 1652, 1653, 508, 1171, 529, 1168, 1483, + /* 900 */ 1718, 241, 191, 1483, 296, 1714, 1793, 1401, 55, 1396, + /* 910 */ 1394, 526, 1665, 1243, 446, 1752, 554, 464, 1483, 440, + /* 920 */ 510, 1310, 1441, 317, 190, 37, 209, 492, 1170, 439, + /* 930 */ 509, 441, 444, 37, 1619, 1347, 1348, 530, 46, 223, + /* 940 */ 1483, 37, 11, 10, 80, 230, 117, 1172, 459, 51, + /* 950 */ 1678, 473, 50, 82, 1650, 512, 1652, 1653, 508, 453, + /* 960 */ 529, 214, 1174, 1718, 1666, 421, 1259, 296, 1714, 1793, + /* 970 */ 1649, 1385, 118, 119, 1221, 58, 57, 348, 1775, 249, + /* 980 */ 154, 1522, 1120, 222, 1748, 342, 232, 518, 495, 534, + /* 990 */ 1177, 118, 119, 487, 1173, 225, 1184, 273, 1665, 3, + /* 1000 */ 332, 1649, 328, 324, 151, 321, 510, 227, 325, 120, + /* 1010 */ 282, 997, 1180, 238, 1028, 1131, 509, 246, 118, 283, + /* 1020 */ 1619, 362, 1562, 527, 1228, 1229, 156, 369, 377, 1665, + /* 1030 */ 1056, 376, 1060, 1066, 378, 149, 1678, 510, 382, 82, + /* 1040 */ 1650, 512, 1652, 1653, 508, 1190, 529, 509, 383, 1718, + /* 1050 */ 1064, 1619, 391, 296, 1714, 1793, 490, 1193, 486, 121, + /* 1060 */ 394, 163, 1649, 395, 1736, 165, 1192, 1678, 1194, 397, + /* 1070 */ 261, 1650, 512, 1652, 1653, 508, 396, 529, 168, 399, + /* 1080 */ 170, 400, 1191, 401, 173, 61, 425, 113, 404, 176, + /* 1090 */ 1665, 1473, 423, 180, 1168, 291, 1780, 1469, 510, 85, + /* 1100 */ 247, 454, 1603, 455, 182, 193, 490, 458, 509, 148, + /* 1110 */ 123, 124, 1619, 1777, 1471, 1467, 125, 490, 196, 126, + /* 1120 */ 461, 199, 202, 1189, 111, 1649, 1759, 466, 1678, 474, + /* 1130 */ 516, 261, 1650, 512, 1652, 1653, 508, 1758, 529, 217, + /* 1140 */ 1725, 485, 465, 484, 6, 483, 1780, 471, 463, 205, + /* 1150 */ 208, 470, 295, 1665, 477, 213, 1649, 1780, 1739, 148, + /* 1160 */ 1284, 510, 5, 1777, 1749, 1188, 112, 1733, 40, 136, + /* 1170 */ 146, 509, 499, 496, 1777, 1619, 215, 18, 1571, 1570, + /* 1180 */ 1796, 514, 519, 297, 1665, 515, 305, 520, 234, 216, + /* 1190 */ 521, 1678, 510, 236, 83, 1650, 512, 1652, 1653, 508, + /* 1200 */ 1699, 529, 509, 248, 1718, 70, 1619, 72, 1717, 1714, + /* 1210 */ 1649, 1484, 251, 607, 532, 1456, 1776, 221, 47, 1649, + /* 1220 */ 135, 493, 1678, 243, 224, 83, 1650, 512, 1652, 1653, + /* 1230 */ 508, 500, 529, 226, 262, 1718, 272, 263, 1665, 501, + /* 1240 */ 1714, 253, 255, 1613, 1612, 320, 510, 1665, 1609, 322, + /* 1250 */ 323, 1156, 1157, 152, 327, 510, 509, 1607, 329, 330, + /* 1260 */ 1619, 331, 1606, 333, 1605, 509, 335, 1604, 337, 1619, + /* 1270 */ 1589, 153, 340, 341, 1134, 1133, 1678, 346, 347, 133, + /* 1280 */ 1650, 512, 1652, 1653, 508, 1678, 529, 1583, 83, 1650, + /* 1290 */ 512, 1652, 1653, 508, 1582, 529, 611, 1649, 1718, 1103, + /* 1300 */ 1555, 1554, 1553, 1715, 1581, 1580, 1552, 1551, 1649, 1550, + /* 1310 */ 245, 1549, 1548, 1547, 1546, 1545, 1544, 1543, 1542, 1541, + /* 1320 */ 1540, 1539, 106, 491, 1794, 1665, 1538, 1537, 600, 596, + /* 1330 */ 592, 588, 244, 510, 1536, 116, 1665, 1535, 1534, 1533, + /* 1340 */ 1532, 1531, 1530, 509, 510, 1105, 1529, 1619, 161, 935, + /* 1350 */ 469, 1528, 1413, 1381, 509, 1380, 1597, 79, 1619, 107, + /* 1360 */ 239, 934, 108, 1678, 1591, 139, 271, 1650, 512, 1652, + /* 1370 */ 1653, 508, 387, 529, 1678, 389, 1649, 266, 1650, 512, + /* 1380 */ 1652, 1653, 508, 162, 529, 1579, 167, 169, 1578, 1568, + /* 1390 */ 1462, 172, 963, 522, 1412, 1410, 407, 405, 1408, 411, + /* 1400 */ 1406, 1404, 406, 415, 1665, 409, 410, 413, 414, 419, + /* 1410 */ 418, 1393, 510, 1392, 417, 482, 1070, 179, 467, 1379, + /* 1420 */ 1464, 200, 509, 1463, 1069, 1649, 1619, 996, 995, 994, + /* 1430 */ 993, 990, 575, 45, 577, 1402, 1649, 288, 1397, 1139, + /* 1440 */ 289, 194, 1678, 989, 988, 133, 1650, 512, 1652, 1653, + /* 1450 */ 508, 442, 529, 1665, 1395, 290, 445, 1378, 447, 1377, + /* 1460 */ 1596, 510, 449, 84, 1665, 201, 456, 1577, 1141, 1590, + /* 1470 */ 1576, 509, 507, 1575, 1567, 1619, 212, 49, 300, 41, + /* 1480 */ 66, 457, 509, 4, 15, 134, 1619, 1649, 37, 48, + /* 1490 */ 1795, 1678, 206, 43, 271, 1650, 512, 1652, 1653, 508, + /* 1500 */ 1639, 529, 1678, 211, 1309, 270, 1650, 512, 1652, 1653, + /* 1510 */ 508, 210, 529, 197, 1691, 1665, 203, 10, 22, 23, + /* 1520 */ 42, 1302, 67, 510, 178, 218, 1649, 1281, 1280, 127, + /* 1530 */ 137, 1338, 1327, 509, 17, 1333, 140, 1619, 19, 1649, + /* 1540 */ 302, 1332, 420, 416, 412, 408, 177, 298, 1337, 1336, + /* 1550 */ 299, 1244, 29, 1678, 1665, 138, 271, 1650, 512, 1652, + /* 1560 */ 1653, 508, 510, 529, 1223, 1222, 12, 1665, 20, 1208, + /* 1570 */ 150, 63, 509, 21, 175, 510, 1619, 229, 1307, 304, + /* 1580 */ 231, 1566, 16, 235, 1178, 509, 13, 511, 1649, 1619, + /* 1590 */ 233, 517, 1678, 68, 69, 271, 1650, 512, 1652, 1653, + /* 1600 */ 508, 237, 529, 1638, 240, 1678, 1225, 73, 257, 1650, + /* 1610 */ 512, 1652, 1653, 508, 1681, 529, 1665, 1649, 528, 44, + /* 1620 */ 531, 1057, 533, 312, 510, 535, 537, 1054, 1049, 538, + /* 1630 */ 540, 174, 1051, 166, 509, 171, 541, 398, 1619, 543, + /* 1640 */ 1045, 546, 544, 1034, 547, 1665, 1043, 1048, 1047, 553, + /* 1650 */ 74, 75, 1065, 510, 1678, 164, 1649, 265, 1650, 512, + /* 1660 */ 1652, 1653, 508, 509, 529, 76, 1063, 1619, 1062, 961, + /* 1670 */ 1046, 561, 985, 1003, 564, 242, 983, 982, 981, 980, + /* 1680 */ 979, 978, 977, 1678, 1665, 976, 267, 1650, 512, 1652, + /* 1690 */ 1653, 508, 510, 529, 998, 973, 972, 971, 968, 967, + /* 1700 */ 966, 1000, 509, 1409, 585, 1649, 1619, 586, 587, 1407, + /* 1710 */ 589, 590, 591, 1405, 593, 594, 1649, 595, 1403, 597, + /* 1720 */ 599, 598, 1678, 1391, 601, 258, 1650, 512, 1652, 1653, + /* 1730 */ 508, 1390, 529, 1665, 602, 1376, 605, 606, 1351, 1351, + /* 1740 */ 609, 510, 1164, 252, 1665, 610, 1351, 1351, 1351, 1351, + /* 1750 */ 1351, 509, 510, 1351, 1351, 1619, 1351, 1351, 1351, 1351, + /* 1760 */ 1351, 1351, 509, 1351, 1351, 1649, 1619, 1351, 1351, 1351, + /* 1770 */ 1351, 1678, 1351, 1351, 268, 1650, 512, 1652, 1653, 508, + /* 1780 */ 1649, 529, 1678, 1351, 1351, 259, 1650, 512, 1652, 1653, + /* 1790 */ 508, 1351, 529, 1665, 1351, 1351, 1351, 1649, 1351, 1351, + /* 1800 */ 1351, 510, 1351, 1351, 1351, 1351, 1351, 1351, 1665, 1351, + /* 1810 */ 1351, 509, 1649, 1351, 1351, 1619, 510, 1351, 1351, 1351, + /* 1820 */ 1351, 1351, 1351, 1351, 1351, 1665, 509, 1351, 1351, 1649, + /* 1830 */ 1619, 1678, 1351, 510, 269, 1650, 512, 1652, 1653, 508, + /* 1840 */ 1665, 529, 1351, 509, 1351, 1351, 1678, 1619, 510, 260, + /* 1850 */ 1650, 512, 1652, 1653, 508, 1351, 529, 1665, 509, 1351, + /* 1860 */ 1351, 1351, 1619, 1678, 1351, 510, 1661, 1650, 512, 1652, + /* 1870 */ 1653, 508, 1351, 529, 1351, 509, 1649, 1351, 1678, 1619, + /* 1880 */ 1351, 1660, 1650, 512, 1652, 1653, 508, 1351, 529, 1351, + /* 1890 */ 1351, 1351, 1351, 1351, 1351, 1678, 1351, 1351, 1659, 1650, + /* 1900 */ 512, 1652, 1653, 508, 1665, 529, 1351, 1351, 1649, 1351, + /* 1910 */ 1351, 1351, 510, 1351, 1351, 1351, 1351, 1351, 1351, 1351, + /* 1920 */ 1351, 1351, 509, 1351, 1351, 1649, 1619, 1351, 1351, 1351, + /* 1930 */ 1351, 1351, 1351, 1351, 1351, 1351, 1665, 1351, 1351, 1351, + /* 1940 */ 1351, 1351, 1678, 1351, 510, 280, 1650, 512, 1652, 1653, + /* 1950 */ 508, 1351, 529, 1665, 509, 1351, 1351, 1649, 1619, 1351, + /* 1960 */ 1351, 510, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, + /* 1970 */ 1351, 509, 1351, 1351, 1678, 1619, 1351, 279, 1650, 512, + /* 1980 */ 1652, 1653, 508, 1351, 529, 1665, 1351, 1351, 1351, 1351, + /* 1990 */ 1351, 1678, 1351, 510, 281, 1650, 512, 1652, 1653, 508, + /* 2000 */ 1351, 529, 1351, 509, 1351, 1351, 1649, 1619, 1351, 1351, + /* 2010 */ 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 486, + /* 2020 */ 1351, 1351, 1351, 1678, 1351, 1351, 278, 1650, 512, 1652, + /* 2030 */ 1653, 508, 1351, 529, 1665, 1351, 1351, 1351, 1351, 1351, + /* 2040 */ 1351, 1351, 510, 1351, 1351, 1351, 1351, 1351, 113, 1351, + /* 2050 */ 1351, 1351, 509, 1351, 1351, 1351, 1619, 1351, 1351, 1351, + /* 2060 */ 1351, 1351, 1351, 1351, 1351, 1351, 1351, 490, 1351, 1351, + /* 2070 */ 1351, 1351, 1678, 1351, 1351, 264, 1650, 512, 1652, 1653, + /* 2080 */ 508, 1351, 529, 1351, 1351, 111, 1351, 1351, 1351, 1351, + /* 2090 */ 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, + /* 2100 */ 217, 1725, 485, 1351, 484, 1351, 1351, 1780, 1351, 1351, + /* 2110 */ 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, + /* 2120 */ 146, 1351, 1351, 1351, 1777, }; static const YYCODETYPE yy_lookahead[] = { - /* 0 */ 254, 336, 296, 271, 258, 271, 274, 244, 274, 246, - /* 10 */ 247, 251, 12, 13, 349, 270, 2, 241, 353, 240, - /* 20 */ 20, 242, 22, 291, 264, 291, 12, 13, 14, 15, - /* 30 */ 16, 244, 272, 246, 247, 336, 271, 336, 306, 307, - /* 40 */ 306, 307, 336, 20, 253, 269, 4, 47, 349, 317, - /* 50 */ 349, 317, 353, 277, 353, 349, 291, 266, 58, 353, - /* 60 */ 12, 13, 14, 287, 64, 248, 275, 291, 20, 20, - /* 70 */ 22, 306, 307, 20, 12, 13, 14, 15, 16, 321, - /* 80 */ 322, 81, 317, 307, 42, 43, 310, 311, 312, 313, - /* 90 */ 314, 315, 57, 317, 277, 47, 320, 20, 269, 269, - /* 100 */ 324, 325, 326, 103, 81, 276, 58, 277, 12, 13, - /* 110 */ 281, 287, 64, 296, 114, 241, 20, 293, 22, 296, - /* 120 */ 58, 345, 12, 13, 14, 15, 16, 81, 4, 81, - /* 130 */ 21, 314, 248, 24, 25, 26, 27, 28, 29, 30, - /* 140 */ 31, 32, 312, 47, 82, 248, 329, 330, 331, 81, - /* 150 */ 333, 103, 90, 336, 58, 245, 156, 260, 248, 336, - /* 160 */ 64, 277, 114, 248, 267, 291, 349, 35, 58, 14, - /* 170 */ 353, 296, 349, 277, 277, 20, 353, 81, 178, 179, - /* 180 */ 284, 181, 182, 183, 184, 185, 186, 187, 188, 189, - /* 190 */ 190, 191, 192, 193, 194, 195, 308, 282, 314, 103, - /* 200 */ 90, 155, 140, 157, 156, 81, 245, 20, 208, 248, - /* 210 */ 114, 336, 328, 329, 330, 331, 84, 333, 86, 87, - /* 220 */ 332, 89, 160, 55, 349, 93, 178, 179, 353, 181, + /* 0 */ 253, 335, 295, 270, 257, 270, 273, 243, 273, 245, + /* 10 */ 246, 250, 12, 13, 348, 269, 2, 240, 352, 239, + /* 20 */ 20, 241, 22, 290, 263, 290, 12, 13, 14, 15, + /* 30 */ 16, 335, 271, 12, 13, 14, 15, 16, 305, 306, + /* 40 */ 305, 306, 335, 20, 348, 268, 4, 47, 352, 316, + /* 50 */ 20, 316, 237, 276, 243, 348, 245, 246, 58, 352, + /* 60 */ 12, 13, 14, 286, 64, 4, 244, 290, 20, 247, + /* 70 */ 22, 12, 13, 14, 15, 16, 12, 13, 14, 15, + /* 80 */ 16, 81, 81, 306, 42, 43, 309, 310, 311, 312, + /* 90 */ 313, 314, 91, 316, 240, 47, 319, 0, 335, 14, + /* 100 */ 323, 324, 325, 103, 81, 20, 58, 0, 12, 13, + /* 110 */ 295, 348, 64, 113, 337, 352, 20, 58, 22, 295, + /* 120 */ 343, 344, 12, 13, 14, 15, 16, 250, 21, 81, + /* 130 */ 240, 24, 25, 26, 27, 28, 29, 30, 31, 32, + /* 140 */ 20, 82, 81, 47, 290, 278, 82, 260, 271, 90, + /* 150 */ 335, 103, 285, 286, 58, 268, 156, 60, 61, 335, + /* 160 */ 64, 113, 65, 348, 277, 68, 69, 352, 58, 72, + /* 170 */ 73, 74, 348, 20, 41, 22, 352, 81, 178, 179, + /* 180 */ 290, 181, 182, 183, 184, 185, 186, 187, 188, 189, + /* 190 */ 190, 191, 192, 193, 194, 195, 35, 14, 139, 103, + /* 200 */ 90, 81, 49, 20, 156, 81, 252, 21, 208, 113, + /* 210 */ 24, 25, 26, 27, 28, 29, 30, 31, 32, 160, + /* 220 */ 307, 12, 13, 14, 15, 16, 178, 179, 274, 181, /* 230 */ 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, - /* 240 */ 192, 193, 194, 195, 20, 268, 22, 0, 116, 81, - /* 250 */ 140, 83, 156, 241, 208, 20, 178, 280, 196, 197, - /* 260 */ 198, 199, 200, 201, 202, 203, 204, 205, 81, 20, - /* 270 */ 160, 249, 250, 49, 178, 179, 208, 181, 182, 183, + /* 240 */ 192, 193, 194, 195, 331, 84, 240, 86, 87, 139, + /* 250 */ 89, 57, 156, 240, 93, 196, 197, 198, 199, 200, + /* 260 */ 201, 202, 203, 204, 205, 286, 20, 182, 289, 208, + /* 270 */ 160, 292, 320, 321, 178, 179, 115, 181, 182, 183, /* 280 */ 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, - /* 290 */ 194, 195, 12, 13, 0, 217, 218, 219, 220, 221, - /* 300 */ 20, 20, 22, 291, 57, 55, 196, 197, 198, 199, - /* 310 */ 200, 201, 202, 203, 204, 205, 33, 248, 24, 25, - /* 320 */ 26, 27, 28, 29, 30, 31, 32, 47, 45, 260, - /* 330 */ 80, 241, 208, 83, 51, 52, 53, 54, 55, 0, - /* 340 */ 12, 13, 14, 261, 64, 248, 277, 57, 20, 92, - /* 350 */ 22, 269, 12, 13, 14, 15, 16, 260, 2, 269, - /* 360 */ 278, 81, 41, 80, 267, 261, 83, 277, 12, 13, - /* 370 */ 14, 15, 16, 269, 277, 47, 208, 287, 279, 248, - /* 380 */ 238, 291, 278, 103, 241, 286, 287, 287, 12, 13, - /* 390 */ 290, 260, 64, 293, 114, 208, 20, 307, 22, 75, - /* 400 */ 310, 311, 312, 313, 314, 315, 248, 317, 277, 81, - /* 410 */ 320, 144, 261, 14, 324, 325, 326, 248, 260, 20, - /* 420 */ 269, 248, 82, 47, 141, 335, 143, 146, 145, 278, - /* 430 */ 147, 103, 93, 260, 291, 277, 156, 257, 296, 259, - /* 440 */ 64, 0, 114, 14, 120, 121, 277, 164, 248, 20, - /* 450 */ 277, 112, 113, 241, 115, 116, 117, 81, 178, 179, - /* 460 */ 260, 181, 182, 183, 184, 185, 186, 187, 188, 189, - /* 470 */ 190, 191, 192, 193, 194, 195, 151, 277, 336, 103, - /* 480 */ 213, 214, 269, 314, 156, 241, 45, 18, 208, 276, - /* 490 */ 114, 349, 23, 270, 281, 353, 171, 172, 329, 330, - /* 500 */ 331, 22, 333, 291, 35, 36, 178, 179, 39, 181, + /* 290 */ 194, 195, 12, 13, 0, 178, 290, 165, 166, 0, + /* 300 */ 20, 169, 22, 290, 247, 247, 196, 197, 198, 199, + /* 310 */ 200, 201, 202, 203, 204, 205, 259, 20, 24, 25, + /* 320 */ 26, 27, 28, 29, 30, 31, 32, 47, 208, 295, + /* 330 */ 93, 240, 208, 276, 217, 218, 219, 220, 221, 281, + /* 340 */ 12, 13, 14, 22, 64, 247, 260, 268, 20, 112, + /* 350 */ 22, 114, 115, 116, 268, 276, 57, 148, 247, 268, + /* 360 */ 227, 81, 240, 277, 276, 182, 247, 276, 47, 335, + /* 370 */ 259, 283, 268, 244, 276, 47, 247, 286, 259, 275, + /* 380 */ 20, 290, 348, 103, 280, 64, 352, 276, 12, 13, + /* 390 */ 311, 145, 64, 113, 240, 276, 20, 306, 22, 0, + /* 400 */ 309, 310, 311, 312, 313, 314, 81, 316, 2, 81, + /* 410 */ 319, 313, 290, 4, 323, 324, 325, 267, 12, 13, + /* 420 */ 14, 15, 16, 47, 103, 327, 328, 329, 330, 279, + /* 430 */ 332, 103, 252, 240, 113, 344, 156, 228, 60, 61, + /* 440 */ 64, 113, 145, 65, 290, 265, 68, 69, 1, 2, + /* 450 */ 72, 73, 74, 20, 274, 240, 57, 81, 178, 179, + /* 460 */ 143, 181, 182, 183, 184, 185, 186, 187, 188, 189, + /* 470 */ 190, 191, 192, 193, 194, 195, 20, 156, 260, 103, + /* 480 */ 155, 151, 157, 290, 156, 0, 268, 47, 208, 113, + /* 490 */ 12, 13, 14, 15, 16, 277, 268, 248, 249, 178, + /* 500 */ 179, 171, 172, 275, 64, 290, 178, 179, 280, 181, /* 510 */ 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, - /* 520 */ 192, 193, 194, 195, 93, 56, 47, 248, 60, 61, - /* 530 */ 165, 166, 156, 65, 169, 291, 68, 69, 241, 41, - /* 540 */ 72, 73, 74, 112, 113, 64, 115, 116, 117, 228, - /* 550 */ 81, 14, 15, 16, 178, 179, 277, 181, 182, 183, + /* 520 */ 192, 193, 194, 195, 12, 13, 14, 15, 16, 82, + /* 530 */ 213, 214, 156, 208, 37, 94, 95, 96, 97, 98, + /* 540 */ 99, 100, 101, 102, 103, 104, 240, 106, 107, 108, + /* 550 */ 109, 110, 111, 240, 178, 179, 240, 181, 182, 183, /* 560 */ 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, - /* 570 */ 194, 195, 12, 13, 18, 296, 20, 248, 269, 93, - /* 580 */ 20, 182, 22, 27, 270, 276, 30, 118, 291, 260, - /* 590 */ 281, 248, 270, 314, 271, 12, 13, 14, 15, 16, - /* 600 */ 3, 241, 116, 260, 48, 0, 277, 47, 329, 330, - /* 610 */ 331, 182, 333, 308, 291, 336, 140, 148, 149, 150, - /* 620 */ 277, 248, 153, 241, 64, 253, 269, 158, 349, 306, - /* 630 */ 307, 47, 353, 260, 1, 2, 160, 332, 281, 170, - /* 640 */ 317, 81, 173, 242, 175, 176, 177, 275, 64, 241, - /* 650 */ 277, 291, 94, 95, 96, 97, 98, 99, 100, 101, - /* 660 */ 102, 103, 104, 103, 106, 107, 108, 109, 110, 111, - /* 670 */ 255, 256, 196, 291, 114, 119, 0, 208, 122, 123, + /* 570 */ 194, 195, 12, 13, 18, 75, 20, 0, 93, 247, + /* 580 */ 20, 247, 22, 27, 268, 307, 30, 261, 55, 14, + /* 590 */ 264, 259, 276, 259, 82, 20, 290, 112, 266, 114, + /* 600 */ 115, 116, 286, 290, 48, 268, 290, 47, 276, 331, + /* 610 */ 276, 240, 275, 80, 139, 286, 83, 280, 209, 119, + /* 620 */ 120, 292, 306, 145, 64, 309, 310, 311, 312, 313, + /* 630 */ 314, 315, 316, 317, 318, 160, 247, 60, 61, 62, + /* 640 */ 63, 81, 65, 66, 67, 68, 69, 70, 71, 72, + /* 650 */ 73, 74, 75, 76, 77, 78, 240, 14, 15, 16, + /* 660 */ 20, 290, 240, 103, 240, 276, 254, 255, 57, 254, + /* 670 */ 255, 196, 240, 113, 118, 0, 240, 121, 122, 123, /* 680 */ 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, - /* 690 */ 134, 135, 136, 137, 138, 139, 4, 21, 93, 291, - /* 700 */ 24, 25, 26, 27, 28, 29, 30, 31, 32, 0, - /* 710 */ 12, 13, 14, 15, 16, 82, 156, 112, 113, 58, - /* 720 */ 115, 116, 117, 241, 226, 241, 255, 256, 248, 241, - /* 730 */ 241, 148, 308, 12, 13, 14, 15, 16, 178, 179, - /* 740 */ 260, 181, 182, 183, 184, 185, 186, 187, 188, 189, - /* 750 */ 190, 191, 192, 193, 194, 195, 332, 277, 269, 248, - /* 760 */ 241, 241, 0, 251, 286, 287, 277, 41, 258, 60, - /* 770 */ 61, 260, 37, 291, 65, 291, 287, 68, 69, 291, - /* 780 */ 291, 72, 73, 74, 272, 296, 241, 20, 277, 269, - /* 790 */ 12, 13, 14, 15, 16, 20, 307, 277, 241, 310, - /* 800 */ 311, 312, 313, 314, 315, 241, 317, 287, 82, 320, - /* 810 */ 291, 291, 229, 324, 325, 241, 296, 248, 270, 57, - /* 820 */ 241, 224, 22, 262, 248, 336, 265, 307, 241, 260, - /* 830 */ 310, 311, 312, 313, 314, 315, 291, 317, 349, 178, - /* 840 */ 320, 269, 353, 269, 324, 325, 277, 47, 291, 300, - /* 850 */ 278, 277, 241, 277, 248, 291, 336, 356, 12, 13, - /* 860 */ 82, 287, 0, 270, 64, 291, 260, 146, 22, 349, - /* 870 */ 291, 42, 43, 353, 206, 207, 85, 85, 291, 88, - /* 880 */ 88, 307, 0, 277, 310, 311, 312, 313, 314, 315, - /* 890 */ 314, 317, 85, 47, 320, 88, 167, 168, 324, 325, - /* 900 */ 326, 209, 291, 103, 22, 329, 330, 331, 85, 333, - /* 910 */ 64, 88, 338, 146, 114, 270, 241, 347, 344, 345, - /* 920 */ 41, 304, 60, 61, 62, 63, 0, 65, 66, 67, - /* 930 */ 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, - /* 940 */ 78, 0, 207, 41, 269, 21, 1, 2, 22, 103, - /* 950 */ 41, 47, 277, 193, 194, 41, 156, 182, 34, 341, - /* 960 */ 114, 82, 287, 22, 47, 81, 291, 247, 41, 44, - /* 970 */ 41, 41, 41, 41, 41, 91, 41, 269, 178, 179, - /* 980 */ 241, 41, 307, 249, 82, 310, 311, 312, 313, 314, - /* 990 */ 315, 82, 317, 41, 280, 320, 82, 41, 309, 324, - /* 1000 */ 325, 326, 156, 41, 41, 334, 81, 350, 269, 82, - /* 1010 */ 335, 82, 82, 82, 82, 82, 277, 82, 114, 350, - /* 1020 */ 350, 337, 82, 47, 178, 20, 287, 248, 45, 305, - /* 1030 */ 291, 114, 47, 248, 82, 189, 190, 191, 82, 241, - /* 1040 */ 64, 255, 4, 154, 82, 82, 307, 298, 40, 310, - /* 1050 */ 311, 312, 313, 314, 315, 285, 317, 19, 248, 320, - /* 1060 */ 140, 248, 20, 324, 325, 326, 283, 269, 243, 243, - /* 1070 */ 283, 33, 20, 302, 335, 277, 287, 253, 20, 295, - /* 1080 */ 253, 20, 277, 45, 253, 287, 241, 297, 50, 291, - /* 1090 */ 295, 253, 20, 55, 296, 253, 288, 253, 248, 243, - /* 1100 */ 253, 269, 269, 269, 269, 307, 269, 248, 310, 311, - /* 1110 */ 312, 313, 314, 315, 269, 317, 243, 269, 80, 64, - /* 1120 */ 269, 83, 277, 269, 269, 251, 269, 269, 163, 301, - /* 1130 */ 291, 251, 287, 241, 336, 248, 291, 251, 302, 287, - /* 1140 */ 277, 296, 251, 20, 295, 346, 343, 349, 288, 309, - /* 1150 */ 216, 353, 307, 215, 342, 310, 311, 312, 313, 314, - /* 1160 */ 315, 269, 317, 292, 241, 346, 291, 223, 292, 277, - /* 1170 */ 222, 211, 291, 277, 291, 207, 210, 20, 308, 287, - /* 1180 */ 339, 336, 40, 291, 227, 230, 225, 357, 327, 81, - /* 1190 */ 323, 292, 269, 340, 349, 352, 291, 291, 353, 307, - /* 1200 */ 277, 291, 310, 311, 312, 313, 314, 315, 292, 317, - /* 1210 */ 287, 143, 320, 81, 291, 351, 324, 325, 352, 351, - /* 1220 */ 277, 352, 241, 351, 251, 289, 251, 288, 277, 265, - /* 1230 */ 307, 273, 248, 310, 311, 312, 313, 314, 315, 259, - /* 1240 */ 317, 251, 243, 320, 252, 299, 239, 324, 325, 263, - /* 1250 */ 269, 263, 303, 0, 263, 0, 72, 0, 277, 47, - /* 1260 */ 174, 47, 174, 47, 47, 0, 47, 47, 287, 0, - /* 1270 */ 174, 47, 291, 0, 47, 0, 47, 0, 81, 160, - /* 1280 */ 159, 241, 114, 156, 0, 0, 152, 151, 307, 0, - /* 1290 */ 0, 310, 311, 312, 313, 314, 315, 316, 317, 318, - /* 1300 */ 319, 0, 44, 0, 0, 0, 0, 0, 0, 269, - /* 1310 */ 0, 0, 0, 0, 0, 0, 0, 277, 0, 0, - /* 1320 */ 0, 0, 40, 0, 0, 0, 0, 287, 0, 0, - /* 1330 */ 0, 291, 0, 0, 0, 0, 241, 0, 40, 22, - /* 1340 */ 41, 14, 0, 0, 44, 14, 37, 307, 88, 47, - /* 1350 */ 310, 311, 312, 313, 314, 315, 0, 317, 0, 0, - /* 1360 */ 0, 0, 0, 0, 269, 0, 44, 0, 0, 0, - /* 1370 */ 0, 0, 277, 0, 38, 37, 37, 37, 90, 0, - /* 1380 */ 146, 37, 287, 161, 146, 143, 291, 37, 141, 241, - /* 1390 */ 45, 37, 45, 47, 354, 355, 47, 45, 47, 22, - /* 1400 */ 59, 37, 307, 0, 47, 310, 311, 312, 313, 314, - /* 1410 */ 315, 45, 317, 0, 19, 320, 22, 269, 22, 47, - /* 1420 */ 325, 47, 47, 47, 41, 277, 48, 47, 33, 41, - /* 1430 */ 0, 22, 0, 22, 0, 287, 22, 47, 47, 291, - /* 1440 */ 45, 20, 294, 0, 241, 47, 51, 52, 53, 54, - /* 1450 */ 55, 47, 0, 22, 0, 307, 241, 0, 310, 311, - /* 1460 */ 312, 313, 314, 315, 0, 317, 0, 81, 41, 41, - /* 1470 */ 37, 212, 269, 44, 82, 80, 41, 41, 83, 82, - /* 1480 */ 277, 81, 81, 81, 269, 44, 212, 82, 81, 41, - /* 1490 */ 287, 44, 277, 206, 291, 44, 41, 82, 212, 146, - /* 1500 */ 82, 82, 287, 41, 82, 47, 291, 47, 47, 41, - /* 1510 */ 307, 2, 117, 310, 311, 312, 313, 314, 315, 47, - /* 1520 */ 317, 47, 307, 81, 47, 310, 311, 312, 313, 314, - /* 1530 */ 315, 82, 317, 241, 44, 82, 44, 142, 22, 0, - /* 1540 */ 145, 82, 37, 144, 81, 44, 81, 141, 81, 22, - /* 1550 */ 81, 348, 82, 82, 81, 44, 81, 162, 22, 164, - /* 1560 */ 178, 269, 81, 81, 180, 81, 81, 47, 82, 277, - /* 1570 */ 355, 91, 47, 82, 81, 92, 47, 81, 47, 287, - /* 1580 */ 82, 81, 47, 291, 82, 81, 294, 47, 82, 241, - /* 1590 */ 93, 81, 105, 105, 105, 81, 81, 47, 81, 307, - /* 1600 */ 105, 47, 310, 311, 312, 313, 314, 315, 114, 317, - /* 1610 */ 22, 59, 47, 58, 41, 64, 79, 269, 47, 47, - /* 1620 */ 22, 47, 47, 47, 47, 277, 47, 64, 241, 47, - /* 1630 */ 47, 47, 47, 47, 0, 287, 47, 47, 47, 291, - /* 1640 */ 45, 37, 0, 47, 45, 37, 0, 47, 45, 37, - /* 1650 */ 0, 45, 47, 37, 0, 307, 269, 241, 310, 311, - /* 1660 */ 312, 313, 314, 315, 277, 317, 47, 319, 46, 0, - /* 1670 */ 0, 22, 21, 21, 287, 22, 20, 22, 291, 358, - /* 1680 */ 358, 294, 358, 358, 358, 269, 241, 358, 358, 358, - /* 1690 */ 358, 358, 358, 277, 307, 358, 358, 310, 311, 312, - /* 1700 */ 313, 314, 315, 287, 317, 358, 358, 291, 358, 358, - /* 1710 */ 294, 358, 358, 358, 269, 358, 358, 241, 358, 358, - /* 1720 */ 358, 358, 277, 307, 358, 358, 310, 311, 312, 313, - /* 1730 */ 314, 315, 287, 317, 358, 358, 291, 358, 358, 358, - /* 1740 */ 358, 358, 358, 358, 358, 269, 358, 358, 241, 358, - /* 1750 */ 358, 358, 307, 277, 358, 310, 311, 312, 313, 314, - /* 1760 */ 315, 358, 317, 287, 358, 358, 358, 291, 358, 358, - /* 1770 */ 358, 358, 358, 358, 358, 358, 269, 358, 358, 241, - /* 1780 */ 358, 358, 358, 307, 277, 358, 310, 311, 312, 313, - /* 1790 */ 314, 315, 358, 317, 287, 358, 358, 358, 291, 358, - /* 1800 */ 358, 358, 358, 358, 358, 358, 358, 269, 358, 358, - /* 1810 */ 358, 241, 358, 358, 307, 277, 358, 310, 311, 312, - /* 1820 */ 313, 314, 315, 358, 317, 287, 358, 358, 241, 291, - /* 1830 */ 358, 358, 358, 358, 358, 358, 358, 358, 358, 269, - /* 1840 */ 358, 358, 358, 358, 358, 307, 358, 277, 310, 311, - /* 1850 */ 312, 313, 314, 315, 358, 317, 269, 287, 358, 358, - /* 1860 */ 358, 291, 358, 358, 277, 358, 358, 241, 358, 358, - /* 1870 */ 358, 358, 358, 358, 287, 358, 358, 307, 291, 358, - /* 1880 */ 310, 311, 312, 313, 314, 315, 358, 317, 358, 358, - /* 1890 */ 358, 358, 358, 358, 307, 269, 358, 310, 311, 312, - /* 1900 */ 313, 314, 315, 277, 317, 358, 241, 358, 358, 358, - /* 1910 */ 358, 358, 358, 287, 358, 358, 358, 291, 358, 358, - /* 1920 */ 358, 358, 358, 241, 358, 358, 358, 358, 358, 358, - /* 1930 */ 358, 358, 358, 307, 269, 241, 310, 311, 312, 313, - /* 1940 */ 314, 315, 277, 317, 358, 358, 358, 358, 358, 358, - /* 1950 */ 358, 269, 287, 358, 358, 358, 291, 358, 358, 277, - /* 1960 */ 358, 358, 358, 269, 358, 358, 358, 358, 358, 287, - /* 1970 */ 358, 277, 307, 291, 241, 310, 311, 312, 313, 314, - /* 1980 */ 315, 287, 317, 358, 358, 291, 358, 241, 358, 307, - /* 1990 */ 358, 358, 310, 311, 312, 313, 314, 315, 358, 317, - /* 2000 */ 358, 307, 269, 358, 310, 311, 312, 313, 314, 315, - /* 2010 */ 277, 317, 358, 358, 358, 269, 358, 358, 358, 358, - /* 2020 */ 287, 358, 358, 277, 291, 358, 241, 358, 358, 358, - /* 2030 */ 358, 358, 358, 287, 358, 358, 358, 291, 358, 358, - /* 2040 */ 307, 358, 358, 310, 311, 312, 313, 314, 315, 358, - /* 2050 */ 317, 358, 358, 307, 269, 358, 310, 311, 312, 313, - /* 2060 */ 314, 315, 277, 317, 358, 358, 358, 358, 358, 358, - /* 2070 */ 358, 358, 287, 358, 358, 358, 291, 358, 358, 358, - /* 2080 */ 358, 241, 358, 358, 358, 358, 358, 358, 358, 358, - /* 2090 */ 241, 358, 307, 358, 358, 310, 311, 312, 313, 314, - /* 2100 */ 315, 358, 317, 358, 358, 358, 358, 358, 358, 269, - /* 2110 */ 358, 358, 358, 358, 358, 358, 358, 277, 269, 358, - /* 2120 */ 358, 358, 358, 358, 358, 358, 277, 287, 358, 358, - /* 2130 */ 358, 291, 358, 358, 358, 358, 287, 241, 358, 358, - /* 2140 */ 291, 358, 358, 358, 358, 358, 358, 307, 358, 358, - /* 2150 */ 310, 311, 312, 313, 314, 315, 307, 317, 358, 310, - /* 2160 */ 311, 312, 313, 314, 315, 269, 317, 358, 358, 358, - /* 2170 */ 358, 358, 358, 277, 358, 358, 358, 358, 358, 358, - /* 2180 */ 358, 358, 358, 287, 358, 358, 358, 291, 358, 358, - /* 2190 */ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, - /* 2200 */ 358, 358, 358, 307, 358, 358, 310, 311, 312, 313, - /* 2210 */ 314, 315, 358, 317, + /* 690 */ 134, 135, 136, 137, 138, 247, 285, 286, 247, 42, + /* 700 */ 43, 307, 313, 268, 207, 55, 290, 3, 240, 240, + /* 710 */ 259, 247, 290, 240, 290, 280, 156, 328, 329, 330, + /* 720 */ 20, 332, 290, 259, 276, 331, 290, 276, 268, 240, + /* 730 */ 266, 81, 256, 83, 258, 241, 270, 277, 178, 179, + /* 740 */ 276, 181, 182, 183, 184, 185, 186, 187, 188, 189, + /* 750 */ 190, 191, 192, 193, 194, 195, 290, 268, 290, 290, + /* 760 */ 240, 313, 0, 290, 93, 276, 47, 22, 93, 206, + /* 770 */ 207, 305, 306, 167, 168, 286, 328, 329, 330, 290, + /* 780 */ 332, 92, 316, 64, 295, 247, 115, 112, 268, 114, + /* 790 */ 115, 116, 47, 58, 41, 306, 276, 259, 309, 310, + /* 800 */ 311, 312, 313, 314, 41, 316, 286, 45, 319, 269, + /* 810 */ 290, 247, 323, 324, 276, 295, 85, 85, 270, 88, + /* 820 */ 88, 240, 182, 259, 335, 85, 306, 269, 88, 309, + /* 830 */ 310, 311, 312, 313, 314, 82, 316, 348, 290, 319, + /* 840 */ 276, 352, 44, 323, 324, 18, 12, 13, 247, 268, + /* 850 */ 23, 64, 21, 305, 306, 335, 22, 276, 208, 269, + /* 860 */ 259, 269, 35, 36, 316, 34, 39, 286, 348, 269, + /* 870 */ 247, 290, 352, 4, 247, 85, 41, 276, 88, 81, + /* 880 */ 41, 47, 259, 56, 240, 41, 259, 306, 19, 247, + /* 890 */ 309, 310, 311, 312, 313, 314, 47, 316, 64, 276, + /* 900 */ 319, 259, 33, 276, 323, 324, 325, 0, 81, 0, + /* 910 */ 0, 247, 268, 178, 45, 334, 269, 82, 276, 50, + /* 920 */ 276, 82, 257, 259, 55, 41, 82, 223, 47, 22, + /* 930 */ 286, 22, 22, 41, 290, 193, 194, 103, 41, 355, + /* 940 */ 276, 41, 1, 2, 117, 41, 41, 113, 299, 80, + /* 950 */ 306, 346, 83, 309, 310, 311, 312, 313, 314, 303, + /* 960 */ 316, 340, 113, 319, 268, 248, 82, 323, 324, 325, + /* 970 */ 240, 246, 41, 41, 82, 148, 149, 150, 334, 82, + /* 980 */ 153, 279, 82, 349, 308, 158, 82, 82, 225, 41, + /* 990 */ 156, 41, 41, 333, 113, 349, 20, 170, 268, 336, + /* 1000 */ 173, 240, 175, 176, 177, 247, 276, 349, 45, 41, + /* 1010 */ 304, 47, 178, 82, 82, 154, 286, 297, 41, 254, + /* 1020 */ 290, 247, 247, 189, 190, 191, 40, 284, 139, 268, + /* 1030 */ 82, 282, 82, 82, 282, 208, 306, 276, 247, 309, + /* 1040 */ 310, 311, 312, 313, 314, 20, 316, 286, 242, 319, + /* 1050 */ 82, 290, 242, 323, 324, 325, 295, 20, 247, 82, + /* 1060 */ 301, 252, 240, 286, 334, 252, 20, 306, 20, 296, + /* 1070 */ 309, 310, 311, 312, 313, 314, 294, 316, 252, 294, + /* 1080 */ 252, 276, 20, 287, 252, 252, 268, 276, 247, 252, + /* 1090 */ 268, 268, 242, 268, 64, 242, 335, 268, 276, 247, + /* 1100 */ 301, 163, 290, 300, 268, 250, 295, 286, 286, 348, + /* 1110 */ 268, 268, 290, 352, 268, 268, 268, 295, 250, 268, + /* 1120 */ 247, 250, 250, 20, 313, 240, 345, 287, 306, 216, + /* 1130 */ 215, 309, 310, 311, 312, 313, 314, 345, 316, 328, + /* 1140 */ 329, 330, 276, 332, 222, 147, 335, 290, 294, 291, + /* 1150 */ 291, 211, 290, 268, 290, 341, 240, 335, 342, 348, + /* 1160 */ 207, 276, 210, 352, 308, 20, 276, 307, 40, 339, + /* 1170 */ 348, 286, 226, 224, 352, 290, 338, 81, 291, 291, + /* 1180 */ 356, 290, 142, 229, 268, 290, 290, 288, 276, 326, + /* 1190 */ 287, 306, 276, 250, 309, 310, 311, 312, 313, 314, + /* 1200 */ 322, 316, 286, 264, 319, 250, 290, 81, 323, 324, + /* 1210 */ 240, 276, 247, 242, 272, 258, 351, 350, 298, 240, + /* 1220 */ 302, 351, 306, 250, 350, 309, 310, 311, 312, 313, + /* 1230 */ 314, 351, 316, 350, 262, 319, 262, 262, 268, 323, + /* 1240 */ 324, 251, 238, 0, 0, 72, 276, 268, 0, 47, + /* 1250 */ 174, 47, 47, 47, 174, 276, 286, 0, 47, 47, + /* 1260 */ 290, 174, 0, 47, 0, 286, 47, 0, 47, 290, + /* 1270 */ 0, 81, 160, 159, 113, 156, 306, 152, 151, 309, + /* 1280 */ 310, 311, 312, 313, 314, 306, 316, 0, 309, 310, + /* 1290 */ 311, 312, 313, 314, 0, 316, 19, 240, 319, 44, + /* 1300 */ 0, 0, 0, 324, 0, 0, 0, 0, 240, 0, + /* 1310 */ 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, + /* 1320 */ 0, 0, 45, 353, 354, 268, 0, 0, 51, 52, + /* 1330 */ 53, 54, 55, 276, 0, 40, 268, 0, 0, 0, + /* 1340 */ 0, 0, 0, 286, 276, 22, 0, 290, 40, 14, + /* 1350 */ 293, 0, 0, 0, 286, 0, 0, 80, 290, 37, + /* 1360 */ 83, 14, 37, 306, 0, 41, 309, 310, 311, 312, + /* 1370 */ 313, 314, 44, 316, 306, 44, 240, 309, 310, 311, + /* 1380 */ 312, 313, 314, 38, 316, 0, 37, 147, 0, 0, + /* 1390 */ 0, 37, 59, 116, 0, 0, 37, 47, 0, 37, + /* 1400 */ 0, 0, 45, 37, 268, 47, 45, 47, 45, 37, + /* 1410 */ 45, 0, 276, 0, 47, 347, 47, 88, 141, 0, + /* 1420 */ 0, 144, 286, 0, 22, 240, 290, 47, 47, 47, + /* 1430 */ 47, 47, 41, 90, 41, 0, 240, 22, 0, 162, + /* 1440 */ 22, 164, 306, 47, 47, 309, 310, 311, 312, 313, + /* 1450 */ 314, 48, 316, 268, 0, 22, 47, 0, 22, 0, + /* 1460 */ 0, 276, 22, 20, 268, 37, 22, 0, 47, 0, + /* 1470 */ 0, 286, 276, 0, 0, 290, 44, 145, 293, 206, + /* 1480 */ 81, 145, 286, 41, 212, 81, 290, 240, 41, 145, + /* 1490 */ 354, 306, 82, 41, 309, 310, 311, 312, 313, 314, + /* 1500 */ 44, 316, 306, 41, 82, 309, 310, 311, 312, 313, + /* 1510 */ 314, 81, 316, 142, 318, 268, 140, 2, 81, 41, + /* 1520 */ 41, 82, 81, 276, 33, 44, 240, 82, 82, 161, + /* 1530 */ 44, 82, 82, 286, 41, 47, 45, 290, 41, 240, + /* 1540 */ 293, 47, 51, 52, 53, 54, 55, 47, 47, 47, + /* 1550 */ 47, 178, 81, 306, 268, 44, 309, 310, 311, 312, + /* 1560 */ 313, 314, 276, 316, 82, 82, 81, 268, 81, 22, + /* 1570 */ 44, 80, 286, 81, 83, 276, 290, 82, 82, 293, + /* 1580 */ 81, 0, 212, 37, 22, 286, 212, 180, 240, 290, + /* 1590 */ 81, 143, 306, 81, 81, 309, 310, 311, 312, 313, + /* 1600 */ 314, 140, 316, 44, 44, 306, 82, 91, 309, 310, + /* 1610 */ 311, 312, 313, 314, 81, 316, 268, 240, 81, 81, + /* 1620 */ 92, 82, 47, 47, 276, 81, 47, 82, 105, 81, + /* 1630 */ 47, 140, 82, 142, 286, 144, 81, 146, 290, 47, + /* 1640 */ 82, 47, 81, 22, 81, 268, 82, 105, 105, 93, + /* 1650 */ 81, 81, 47, 276, 306, 164, 240, 309, 310, 311, + /* 1660 */ 312, 313, 314, 286, 316, 81, 113, 290, 22, 59, + /* 1670 */ 105, 58, 47, 64, 79, 41, 47, 47, 47, 47, + /* 1680 */ 47, 22, 47, 306, 268, 47, 309, 310, 311, 312, + /* 1690 */ 313, 314, 276, 316, 47, 47, 47, 47, 47, 47, + /* 1700 */ 47, 64, 286, 0, 47, 240, 290, 45, 37, 0, + /* 1710 */ 47, 45, 37, 0, 47, 45, 240, 37, 0, 47, + /* 1720 */ 37, 45, 306, 0, 47, 309, 310, 311, 312, 313, + /* 1730 */ 314, 0, 316, 268, 46, 0, 22, 21, 357, 357, + /* 1740 */ 21, 276, 22, 22, 268, 20, 357, 357, 357, 357, + /* 1750 */ 357, 286, 276, 357, 357, 290, 357, 357, 357, 357, + /* 1760 */ 357, 357, 286, 357, 357, 240, 290, 357, 357, 357, + /* 1770 */ 357, 306, 357, 357, 309, 310, 311, 312, 313, 314, + /* 1780 */ 240, 316, 306, 357, 357, 309, 310, 311, 312, 313, + /* 1790 */ 314, 357, 316, 268, 357, 357, 357, 240, 357, 357, + /* 1800 */ 357, 276, 357, 357, 357, 357, 357, 357, 268, 357, + /* 1810 */ 357, 286, 240, 357, 357, 290, 276, 357, 357, 357, + /* 1820 */ 357, 357, 357, 357, 357, 268, 286, 357, 357, 240, + /* 1830 */ 290, 306, 357, 276, 309, 310, 311, 312, 313, 314, + /* 1840 */ 268, 316, 357, 286, 357, 357, 306, 290, 276, 309, + /* 1850 */ 310, 311, 312, 313, 314, 357, 316, 268, 286, 357, + /* 1860 */ 357, 357, 290, 306, 357, 276, 309, 310, 311, 312, + /* 1870 */ 313, 314, 357, 316, 357, 286, 240, 357, 306, 290, + /* 1880 */ 357, 309, 310, 311, 312, 313, 314, 357, 316, 357, + /* 1890 */ 357, 357, 357, 357, 357, 306, 357, 357, 309, 310, + /* 1900 */ 311, 312, 313, 314, 268, 316, 357, 357, 240, 357, + /* 1910 */ 357, 357, 276, 357, 357, 357, 357, 357, 357, 357, + /* 1920 */ 357, 357, 286, 357, 357, 240, 290, 357, 357, 357, + /* 1930 */ 357, 357, 357, 357, 357, 357, 268, 357, 357, 357, + /* 1940 */ 357, 357, 306, 357, 276, 309, 310, 311, 312, 313, + /* 1950 */ 314, 357, 316, 268, 286, 357, 357, 240, 290, 357, + /* 1960 */ 357, 276, 357, 357, 357, 357, 357, 357, 357, 357, + /* 1970 */ 357, 286, 357, 357, 306, 290, 357, 309, 310, 311, + /* 1980 */ 312, 313, 314, 357, 316, 268, 357, 357, 357, 357, + /* 1990 */ 357, 306, 357, 276, 309, 310, 311, 312, 313, 314, + /* 2000 */ 357, 316, 357, 286, 357, 357, 240, 290, 357, 357, + /* 2010 */ 357, 357, 357, 357, 357, 357, 357, 357, 357, 247, + /* 2020 */ 357, 357, 357, 306, 357, 357, 309, 310, 311, 312, + /* 2030 */ 313, 314, 357, 316, 268, 357, 357, 357, 357, 357, + /* 2040 */ 357, 357, 276, 357, 357, 357, 357, 357, 276, 357, + /* 2050 */ 357, 357, 286, 357, 357, 357, 290, 357, 357, 357, + /* 2060 */ 357, 357, 357, 357, 357, 357, 357, 295, 357, 357, + /* 2070 */ 357, 357, 306, 357, 357, 309, 310, 311, 312, 313, + /* 2080 */ 314, 357, 316, 357, 357, 313, 357, 357, 357, 357, + /* 2090 */ 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, + /* 2100 */ 328, 329, 330, 357, 332, 357, 357, 335, 357, 357, + /* 2110 */ 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, + /* 2120 */ 348, 357, 357, 357, 352, 237, 237, 237, 237, 237, + /* 2130 */ 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, + /* 2140 */ 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, + /* 2150 */ 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, + /* 2160 */ 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, + /* 2170 */ 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, + /* 2180 */ 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, + /* 2190 */ 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, + /* 2200 */ 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, + /* 2210 */ 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, + /* 2220 */ 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, + /* 2230 */ 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, + /* 2240 */ 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, + /* 2250 */ 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, + /* 2260 */ 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, + /* 2270 */ 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, + /* 2280 */ 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, + /* 2290 */ 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, + /* 2300 */ 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, + /* 2310 */ 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, + /* 2320 */ 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, + /* 2330 */ 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, + /* 2340 */ 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, + /* 2350 */ 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, + /* 2360 */ 237, 237, }; #define YY_SHIFT_COUNT (611) #define YY_SHIFT_MIN (0) -#define YY_SHIFT_MAX (1670) +#define YY_SHIFT_MAX (1735) static const unsigned short int yy_shift_ofst[] = { - /* 0 */ 469, 0, 0, 48, 96, 96, 96, 96, 280, 280, + /* 0 */ 827, 0, 0, 48, 96, 96, 96, 96, 280, 280, /* 10 */ 96, 96, 328, 376, 560, 376, 376, 376, 376, 376, /* 20 */ 376, 376, 376, 376, 376, 376, 376, 376, 376, 376, - /* 30 */ 376, 376, 376, 376, 376, 376, 376, 376, 187, 187, - /* 40 */ 23, 23, 23, 846, 846, 846, 846, 46, 168, 68, - /* 50 */ 49, 49, 42, 42, 124, 68, 68, 49, 49, 49, - /* 60 */ 49, 49, 49, 35, 49, 49, 53, 77, 235, 53, - /* 70 */ 49, 49, 53, 49, 53, 53, 235, 53, 49, 290, - /* 80 */ 556, 62, 110, 110, 109, 468, 800, 800, 800, 800, - /* 90 */ 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, - /* 100 */ 800, 800, 800, 800, 800, 132, 224, 155, 155, 247, - /* 110 */ 584, 281, 281, 281, 762, 584, 249, 235, 53, 53, - /* 120 */ 235, 257, 481, 558, 558, 558, 558, 558, 558, 558, - /* 130 */ 1395, 676, 709, 583, 78, 365, 267, 399, 429, 829, - /* 140 */ 479, 486, 767, 668, 735, 668, 597, 597, 597, 692, - /* 150 */ 775, 1005, 983, 985, 889, 1005, 1005, 1008, 920, 920, - /* 160 */ 1005, 1042, 1042, 1052, 35, 235, 35, 1058, 1061, 35, - /* 170 */ 1058, 35, 249, 1072, 35, 35, 1005, 35, 1042, 53, - /* 180 */ 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, - /* 190 */ 1005, 1042, 1055, 1052, 290, 965, 235, 290, 1005, 1058, - /* 200 */ 290, 249, 1072, 290, 1123, 934, 938, 1055, 934, 938, - /* 210 */ 1055, 1055, 53, 944, 948, 960, 966, 968, 249, 1157, - /* 220 */ 1142, 957, 961, 955, 957, 961, 957, 961, 1108, 938, - /* 230 */ 1055, 1055, 938, 1055, 1068, 249, 1072, 290, 257, 290, - /* 240 */ 249, 1132, 481, 1005, 290, 1042, 2214, 2214, 2214, 2214, - /* 250 */ 2214, 2214, 2214, 862, 283, 294, 1038, 339, 605, 340, - /* 260 */ 14, 356, 721, 778, 431, 698, 698, 698, 698, 698, - /* 270 */ 698, 698, 698, 325, 250, 324, 633, 476, 537, 537, - /* 280 */ 537, 537, 441, 726, 791, 792, 807, 823, 882, 926, - /* 290 */ 941, 924, 729, 879, 902, 909, 945, 760, 498, 321, - /* 300 */ 914, 661, 927, 925, 929, 930, 931, 932, 933, 904, - /* 310 */ 917, 935, 940, 952, 956, 962, 963, 884, 976, 1253, - /* 320 */ 1255, 1184, 1257, 1212, 1086, 1214, 1216, 1217, 1088, 1265, - /* 330 */ 1219, 1220, 1096, 1269, 1224, 1273, 1227, 1275, 1229, 1277, - /* 340 */ 1197, 1119, 1121, 1168, 1127, 1284, 1285, 1134, 1136, 1289, - /* 350 */ 1290, 1258, 1301, 1303, 1304, 1305, 1306, 1307, 1308, 1310, - /* 360 */ 1311, 1312, 1313, 1314, 1315, 1316, 1318, 1319, 1320, 1321, - /* 370 */ 1282, 1323, 1324, 1325, 1326, 1328, 1329, 1317, 1330, 1332, - /* 380 */ 1333, 1334, 1335, 1337, 1298, 1309, 1299, 1327, 1300, 1331, - /* 390 */ 1322, 1342, 1336, 1338, 1343, 1356, 1358, 1339, 1359, 1360, - /* 400 */ 1340, 1361, 1341, 1362, 1363, 1302, 1345, 1344, 1365, 1346, - /* 410 */ 1347, 1350, 1367, 1351, 1352, 1354, 1368, 1357, 1366, 1364, - /* 420 */ 1369, 1370, 1371, 1373, 1288, 1260, 1349, 1377, 1379, 1372, - /* 430 */ 1374, 1375, 1376, 1383, 1388, 1380, 1390, 1391, 1403, 1394, - /* 440 */ 1413, 1396, 1378, 1430, 1409, 1398, 1432, 1411, 1434, 1414, - /* 450 */ 1421, 1443, 1234, 1404, 1452, 1222, 1431, 1238, 1242, 1454, - /* 460 */ 1457, 1464, 1353, 1466, 1386, 1433, 1247, 1427, 1428, 1259, - /* 470 */ 1392, 1435, 1397, 1400, 1401, 1402, 1405, 1436, 1429, 1441, - /* 480 */ 1407, 1448, 1274, 1415, 1418, 1447, 1287, 1455, 1451, 1419, - /* 490 */ 1462, 1286, 1422, 1458, 1460, 1461, 1472, 1474, 1477, 1422, - /* 500 */ 1509, 1382, 1468, 1449, 1442, 1453, 1490, 1463, 1465, 1492, - /* 510 */ 1516, 1384, 1467, 1459, 1470, 1469, 1473, 1399, 1475, 1539, - /* 520 */ 1505, 1406, 1481, 1480, 1501, 1511, 1482, 1471, 1484, 1527, - /* 530 */ 1485, 1483, 1486, 1520, 1525, 1493, 1491, 1529, 1496, 1498, - /* 540 */ 1531, 1500, 1502, 1535, 1504, 1506, 1540, 1510, 1487, 1488, - /* 550 */ 1489, 1495, 1536, 1497, 1514, 1515, 1550, 1517, 1494, 1554, - /* 560 */ 1588, 1552, 1555, 1565, 1551, 1537, 1573, 1571, 1572, 1574, - /* 570 */ 1575, 1576, 1598, 1577, 1579, 1563, 1383, 1582, 1388, 1583, - /* 580 */ 1584, 1585, 1586, 1589, 1590, 1634, 1591, 1595, 1604, 1642, - /* 590 */ 1596, 1599, 1608, 1646, 1600, 1603, 1612, 1650, 1605, 1606, - /* 600 */ 1616, 1654, 1619, 1622, 1669, 1670, 1649, 1651, 1653, 1655, - /* 610 */ 1652, 1656, + /* 30 */ 376, 376, 376, 376, 376, 376, 376, 376, 120, 120, + /* 40 */ 23, 23, 23, 834, 834, 834, 834, 325, 650, 124, + /* 50 */ 30, 30, 42, 42, 61, 124, 124, 30, 30, 30, + /* 60 */ 30, 30, 30, 194, 30, 30, 360, 433, 456, 360, + /* 70 */ 30, 30, 360, 30, 360, 360, 456, 360, 30, 611, + /* 80 */ 556, 59, 110, 110, 186, 378, 321, 321, 321, 321, + /* 90 */ 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, + /* 100 */ 321, 321, 321, 321, 321, 161, 153, 575, 575, 299, + /* 110 */ 440, 246, 246, 246, 399, 440, 700, 456, 360, 360, + /* 120 */ 456, 689, 787, 441, 441, 441, 441, 441, 441, 441, + /* 130 */ 1277, 107, 97, 209, 117, 132, 317, 85, 183, 657, + /* 140 */ 745, 671, 297, 563, 497, 563, 704, 704, 704, 409, + /* 150 */ 640, 976, 963, 964, 861, 976, 976, 986, 889, 889, + /* 160 */ 976, 1025, 1025, 1037, 194, 456, 194, 1046, 1048, 194, + /* 170 */ 1046, 194, 700, 1062, 194, 194, 976, 194, 1025, 360, + /* 180 */ 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, + /* 190 */ 976, 1025, 1030, 1037, 611, 938, 456, 611, 976, 1046, + /* 200 */ 611, 700, 1062, 611, 1103, 913, 915, 1030, 913, 915, + /* 210 */ 1030, 1030, 360, 922, 998, 940, 952, 953, 700, 1145, + /* 220 */ 1128, 946, 949, 954, 946, 949, 946, 949, 1096, 915, + /* 230 */ 1030, 1030, 915, 1030, 1040, 700, 1062, 611, 689, 611, + /* 240 */ 700, 1126, 787, 976, 611, 1025, 2125, 2125, 2125, 2125, + /* 250 */ 2125, 2125, 2125, 577, 1491, 294, 869, 64, 14, 406, + /* 260 */ 478, 512, 485, 675, 21, 21, 21, 21, 21, 21, + /* 270 */ 21, 21, 237, 330, 533, 500, 447, 475, 643, 643, + /* 280 */ 643, 643, 762, 753, 731, 732, 740, 790, 907, 909, + /* 290 */ 910, 831, 606, 835, 839, 844, 941, 742, 763, 133, + /* 300 */ 884, 735, 892, 798, 900, 904, 905, 931, 932, 849, + /* 310 */ 881, 897, 948, 950, 951, 968, 977, 1, 719, 1243, + /* 320 */ 1244, 1173, 1248, 1202, 1076, 1204, 1205, 1206, 1080, 1257, + /* 330 */ 1211, 1212, 1087, 1262, 1216, 1264, 1219, 1267, 1221, 1270, + /* 340 */ 1190, 1112, 1114, 1161, 1119, 1287, 1294, 1125, 1127, 1304, + /* 350 */ 1305, 1255, 1300, 1301, 1302, 1306, 1307, 1309, 1311, 1312, + /* 360 */ 1313, 1314, 1315, 1316, 1317, 1318, 1319, 1320, 1321, 1326, + /* 370 */ 1295, 1327, 1334, 1337, 1338, 1339, 1340, 1323, 1341, 1342, + /* 380 */ 1346, 1351, 1352, 1353, 1308, 1322, 1324, 1335, 1328, 1347, + /* 390 */ 1331, 1355, 1345, 1325, 1356, 1364, 1385, 1349, 1240, 1388, + /* 400 */ 1389, 1354, 1390, 1333, 1394, 1395, 1350, 1357, 1359, 1398, + /* 410 */ 1358, 1361, 1362, 1400, 1360, 1363, 1366, 1401, 1367, 1365, + /* 420 */ 1372, 1411, 1413, 1419, 1420, 1343, 1329, 1369, 1402, 1423, + /* 430 */ 1380, 1381, 1382, 1383, 1391, 1393, 1384, 1396, 1397, 1435, + /* 440 */ 1415, 1438, 1418, 1403, 1454, 1433, 1409, 1457, 1436, 1459, + /* 450 */ 1440, 1443, 1460, 1332, 1421, 1469, 1368, 1444, 1336, 1371, + /* 460 */ 1467, 1470, 1473, 1344, 1474, 1399, 1428, 1376, 1442, 1447, + /* 470 */ 1272, 1410, 1452, 1422, 1404, 1430, 1437, 1439, 1462, 1432, + /* 480 */ 1456, 1441, 1478, 1370, 1445, 1446, 1481, 1273, 1479, 1486, + /* 490 */ 1449, 1493, 1374, 1450, 1488, 1494, 1500, 1501, 1502, 1503, + /* 500 */ 1450, 1515, 1373, 1497, 1482, 1471, 1483, 1511, 1485, 1487, + /* 510 */ 1526, 1547, 1407, 1492, 1495, 1496, 1499, 1509, 1448, 1512, + /* 520 */ 1581, 1546, 1461, 1513, 1516, 1559, 1560, 1533, 1524, 1537, + /* 530 */ 1562, 1538, 1528, 1539, 1575, 1576, 1544, 1545, 1579, 1548, + /* 540 */ 1550, 1583, 1555, 1558, 1592, 1561, 1564, 1594, 1563, 1523, + /* 550 */ 1542, 1543, 1565, 1621, 1556, 1569, 1570, 1605, 1584, 1553, + /* 560 */ 1646, 1610, 1613, 1625, 1609, 1595, 1634, 1629, 1630, 1631, + /* 570 */ 1632, 1633, 1659, 1635, 1638, 1637, 1391, 1647, 1393, 1648, + /* 580 */ 1649, 1650, 1651, 1652, 1653, 1703, 1657, 1662, 1671, 1709, + /* 590 */ 1663, 1666, 1675, 1713, 1667, 1670, 1680, 1718, 1672, 1676, + /* 600 */ 1683, 1723, 1677, 1688, 1731, 1735, 1714, 1716, 1720, 1721, + /* 610 */ 1719, 1725, }; #define YY_REDUCE_COUNT (252) -#define YY_REDUCE_MIN (-335) -#define YY_REDUCE_MAX (1896) +#define YY_REDUCE_MIN (-334) +#define YY_REDUCE_MAX (1772) static const short yy_reduce_ofst[] = { - /* 0 */ 142, 489, 520, 574, -224, 90, 675, 739, 798, 845, - /* 10 */ 892, 923, 981, 1040, 1095, 1148, 1203, 1215, 1292, 1348, - /* 20 */ 1387, 1416, 1445, 1476, 1507, 1538, 1570, 1587, 1626, 1665, - /* 30 */ 1682, 1694, 1733, 1746, 1785, 1840, 1849, 1896, -183, 279, - /* 40 */ -116, 169, 576, -268, -266, -235, 323, -294, -177, -125, - /* 50 */ -103, 97, -237, -213, -335, -301, -299, 69, 131, 158, - /* 60 */ 173, 200, 329, -209, 343, 373, -171, -170, 100, 82, - /* 70 */ 480, 511, 213, 569, 104, 309, 99, 151, 606, -240, - /* 80 */ -85, -242, -242, -242, -221, -254, -126, 12, 143, 212, - /* 90 */ 244, 297, 360, 382, 408, 482, 484, 488, 519, 545, - /* 100 */ 557, 564, 579, 587, 611, -23, 22, -90, -39, 372, - /* 110 */ 415, -112, 305, 424, 512, 471, -104, -176, 572, 357, - /* 120 */ 478, 561, 180, -255, 223, 314, 322, 548, 593, 645, - /* 130 */ 549, 401, 510, 501, 570, 617, 618, 708, 708, 720, - /* 140 */ 734, 714, 689, 671, 671, 671, 657, 669, 670, 684, - /* 150 */ 708, 779, 724, 786, 749, 785, 810, 770, 783, 787, - /* 160 */ 813, 825, 826, 771, 824, 789, 827, 784, 790, 831, - /* 170 */ 795, 838, 805, 808, 842, 844, 850, 847, 856, 832, - /* 180 */ 833, 834, 835, 837, 848, 851, 854, 855, 857, 858, - /* 190 */ 859, 873, 839, 836, 874, 828, 852, 880, 887, 849, - /* 200 */ 886, 863, 860, 891, 840, 799, 871, 875, 819, 876, - /* 210 */ 881, 883, 708, 803, 812, 853, 841, 671, 896, 870, - /* 220 */ 861, 843, 864, 830, 866, 868, 869, 872, 867, 899, - /* 230 */ 905, 906, 916, 910, 936, 943, 939, 973, 964, 975, - /* 240 */ 951, 958, 980, 984, 990, 999, 946, 949, 986, 988, - /* 250 */ 991, 992, 1007, + /* 0 */ -185, 489, 520, -223, 91, 581, 644, 730, 761, 822, + /* 10 */ 885, 916, 316, 970, 979, 1057, 1068, 1136, 1185, 1196, + /* 20 */ 1247, 1286, 1299, 1348, 1377, 1416, 1465, 1476, 1525, 1540, + /* 30 */ 1557, 1572, 1589, 1636, 1668, 1685, 1717, 1766, 811, 1772, + /* 40 */ 98, 389, 448, -267, -265, 466, 548, -293, -176, 34, + /* 50 */ 332, 464, -236, -189, -334, -304, -237, 57, 111, 119, + /* 60 */ 334, 451, 538, 180, 564, 601, 104, 79, -21, -113, + /* 70 */ 623, 627, 228, 642, 86, 337, -133, 218, 664, -239, + /* 80 */ 58, -48, -48, -48, -220, -253, -146, -110, 6, 13, + /* 90 */ 122, 154, 193, 215, 306, 313, 371, 416, 422, 424, + /* 100 */ 432, 436, 468, 469, 473, 150, 249, -178, 129, -46, + /* 110 */ 412, -87, 278, 394, -123, 415, 88, 329, 460, 435, + /* 120 */ 411, 326, 476, -254, 540, 558, 590, 592, 600, 647, + /* 130 */ 649, 494, 665, 584, 605, 656, 621, 696, 696, 725, + /* 140 */ 717, 702, 676, 660, 660, 660, 634, 646, 658, 663, + /* 150 */ 696, 758, 706, 765, 720, 774, 775, 743, 749, 752, + /* 160 */ 791, 806, 810, 759, 809, 777, 813, 782, 773, 826, + /* 170 */ 785, 828, 805, 796, 832, 833, 841, 837, 850, 818, + /* 180 */ 823, 825, 829, 836, 842, 843, 846, 847, 848, 851, + /* 190 */ 852, 853, 812, 799, 855, 803, 821, 868, 873, 854, + /* 200 */ 871, 866, 840, 872, 856, 781, 858, 857, 792, 859, + /* 210 */ 862, 864, 696, 816, 814, 830, 838, 660, 890, 860, + /* 220 */ 863, 865, 867, 824, 870, 874, 880, 883, 878, 887, + /* 230 */ 891, 895, 888, 896, 899, 912, 903, 943, 939, 955, + /* 240 */ 935, 942, 957, 965, 973, 971, 920, 918, 972, 974, + /* 250 */ 975, 990, 1004, }; static const YYACTIONTYPE yy_default[] = { - /* 0 */ 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, - /* 10 */ 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, - /* 20 */ 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, - /* 30 */ 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, - /* 40 */ 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, - /* 50 */ 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, - /* 60 */ 1351, 1351, 1351, 1420, 1351, 1351, 1351, 1351, 1351, 1351, - /* 70 */ 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1418, - /* 80 */ 1559, 1351, 1723, 1351, 1351, 1351, 1351, 1351, 1351, 1351, - /* 90 */ 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, - /* 100 */ 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1420, - /* 110 */ 1351, 1734, 1734, 1734, 1418, 1351, 1351, 1351, 1351, 1351, - /* 120 */ 1351, 1514, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, - /* 130 */ 1595, 1351, 1351, 1800, 1351, 1601, 1758, 1351, 1351, 1351, - /* 140 */ 1351, 1467, 1750, 1726, 1740, 1727, 1785, 1785, 1785, 1743, - /* 150 */ 1351, 1351, 1351, 1351, 1587, 1351, 1351, 1564, 1561, 1561, - /* 160 */ 1351, 1351, 1351, 1351, 1420, 1351, 1420, 1351, 1351, 1420, - /* 170 */ 1351, 1420, 1351, 1351, 1420, 1420, 1351, 1420, 1351, 1351, - /* 180 */ 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, - /* 190 */ 1351, 1351, 1351, 1351, 1418, 1597, 1351, 1418, 1351, 1351, - /* 200 */ 1418, 1351, 1351, 1418, 1351, 1765, 1763, 1351, 1765, 1763, - /* 210 */ 1351, 1351, 1351, 1777, 1773, 1756, 1754, 1740, 1351, 1351, - /* 220 */ 1351, 1791, 1787, 1803, 1791, 1787, 1791, 1787, 1351, 1763, - /* 230 */ 1351, 1351, 1763, 1351, 1572, 1351, 1351, 1418, 1351, 1418, - /* 240 */ 1351, 1483, 1351, 1351, 1418, 1351, 1589, 1603, 1517, 1517, - /* 250 */ 1517, 1421, 1356, 1351, 1351, 1351, 1351, 1351, 1351, 1351, - /* 260 */ 1351, 1351, 1351, 1351, 1479, 1667, 1776, 1775, 1699, 1698, - /* 270 */ 1697, 1695, 1666, 1351, 1351, 1351, 1351, 1351, 1660, 1661, - /* 280 */ 1659, 1658, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, - /* 290 */ 1351, 1351, 1351, 1351, 1351, 1351, 1724, 1351, 1788, 1792, - /* 300 */ 1351, 1351, 1351, 1643, 1351, 1351, 1351, 1351, 1351, 1351, - /* 310 */ 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, - /* 320 */ 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, - /* 330 */ 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, - /* 340 */ 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, - /* 350 */ 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, - /* 360 */ 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, - /* 370 */ 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, - /* 380 */ 1351, 1351, 1351, 1351, 1351, 1351, 1385, 1351, 1351, 1351, - /* 390 */ 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, - /* 400 */ 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, - /* 410 */ 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, - /* 420 */ 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, - /* 430 */ 1351, 1351, 1351, 1448, 1447, 1351, 1351, 1351, 1351, 1351, - /* 440 */ 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, - /* 450 */ 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, - /* 460 */ 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1747, 1757, 1351, - /* 470 */ 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1643, - /* 480 */ 1351, 1774, 1351, 1733, 1729, 1351, 1351, 1725, 1351, 1351, - /* 490 */ 1786, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, - /* 500 */ 1719, 1351, 1692, 1351, 1351, 1351, 1351, 1351, 1351, 1351, - /* 510 */ 1351, 1654, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, - /* 520 */ 1351, 1351, 1351, 1351, 1642, 1351, 1683, 1351, 1351, 1351, - /* 530 */ 1351, 1351, 1351, 1351, 1351, 1511, 1351, 1351, 1351, 1351, - /* 540 */ 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1496, 1494, - /* 550 */ 1493, 1492, 1351, 1489, 1351, 1351, 1351, 1351, 1351, 1351, - /* 560 */ 1351, 1351, 1351, 1351, 1351, 1351, 1440, 1351, 1351, 1351, - /* 570 */ 1351, 1351, 1351, 1351, 1351, 1351, 1431, 1351, 1430, 1351, - /* 580 */ 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, - /* 590 */ 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, - /* 600 */ 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, - /* 610 */ 1351, 1351, + /* 0 */ 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, + /* 10 */ 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, + /* 20 */ 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, + /* 30 */ 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, + /* 40 */ 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, + /* 50 */ 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, + /* 60 */ 1349, 1349, 1349, 1418, 1349, 1349, 1349, 1349, 1349, 1349, + /* 70 */ 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1416, + /* 80 */ 1556, 1349, 1720, 1349, 1349, 1349, 1349, 1349, 1349, 1349, + /* 90 */ 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, + /* 100 */ 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1418, + /* 110 */ 1349, 1731, 1731, 1731, 1416, 1349, 1349, 1349, 1349, 1349, + /* 120 */ 1349, 1512, 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, + /* 130 */ 1592, 1349, 1349, 1797, 1349, 1598, 1755, 1349, 1349, 1349, + /* 140 */ 1349, 1465, 1747, 1723, 1737, 1724, 1782, 1782, 1782, 1740, + /* 150 */ 1349, 1349, 1349, 1349, 1584, 1349, 1349, 1561, 1558, 1558, + /* 160 */ 1349, 1349, 1349, 1349, 1418, 1349, 1418, 1349, 1349, 1418, + /* 170 */ 1349, 1418, 1349, 1349, 1418, 1418, 1349, 1418, 1349, 1349, + /* 180 */ 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, + /* 190 */ 1349, 1349, 1349, 1349, 1416, 1594, 1349, 1416, 1349, 1349, + /* 200 */ 1416, 1349, 1349, 1416, 1349, 1762, 1760, 1349, 1762, 1760, + /* 210 */ 1349, 1349, 1349, 1774, 1770, 1753, 1751, 1737, 1349, 1349, + /* 220 */ 1349, 1788, 1784, 1800, 1788, 1784, 1788, 1784, 1349, 1760, + /* 230 */ 1349, 1349, 1760, 1349, 1569, 1349, 1349, 1416, 1349, 1416, + /* 240 */ 1349, 1481, 1349, 1349, 1416, 1349, 1586, 1600, 1515, 1515, + /* 250 */ 1515, 1419, 1354, 1349, 1349, 1349, 1349, 1349, 1349, 1349, + /* 260 */ 1349, 1349, 1349, 1349, 1664, 1773, 1772, 1696, 1695, 1694, + /* 270 */ 1692, 1663, 1477, 1349, 1349, 1349, 1349, 1349, 1657, 1658, + /* 280 */ 1656, 1655, 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, + /* 290 */ 1349, 1349, 1349, 1349, 1349, 1349, 1721, 1349, 1785, 1789, + /* 300 */ 1349, 1349, 1349, 1640, 1349, 1349, 1349, 1349, 1349, 1349, + /* 310 */ 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, + /* 320 */ 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, + /* 330 */ 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, + /* 340 */ 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, + /* 350 */ 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, + /* 360 */ 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, + /* 370 */ 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, + /* 380 */ 1349, 1349, 1349, 1349, 1349, 1349, 1383, 1349, 1349, 1349, + /* 390 */ 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, + /* 400 */ 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, + /* 410 */ 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, + /* 420 */ 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, + /* 430 */ 1349, 1349, 1349, 1349, 1446, 1445, 1349, 1349, 1349, 1349, + /* 440 */ 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, + /* 450 */ 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, + /* 460 */ 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1744, 1754, + /* 470 */ 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, + /* 480 */ 1640, 1349, 1771, 1349, 1730, 1726, 1349, 1349, 1722, 1349, + /* 490 */ 1349, 1783, 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, + /* 500 */ 1349, 1716, 1349, 1689, 1349, 1349, 1349, 1349, 1349, 1349, + /* 510 */ 1349, 1349, 1651, 1349, 1349, 1349, 1349, 1349, 1349, 1349, + /* 520 */ 1349, 1349, 1349, 1349, 1349, 1639, 1349, 1680, 1349, 1349, + /* 530 */ 1349, 1349, 1349, 1349, 1349, 1349, 1509, 1349, 1349, 1349, + /* 540 */ 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1494, + /* 550 */ 1492, 1491, 1490, 1349, 1487, 1349, 1349, 1349, 1349, 1349, + /* 560 */ 1349, 1349, 1349, 1349, 1349, 1349, 1438, 1349, 1349, 1349, + /* 570 */ 1349, 1349, 1349, 1349, 1349, 1349, 1429, 1349, 1428, 1349, + /* 580 */ 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, + /* 590 */ 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, + /* 600 */ 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, + /* 610 */ 1349, 1349, }; /********** End of lemon-generated parsing tables *****************************/ @@ -952,7 +1194,6 @@ static const YYCODETYPE yyFallback[] = { 0, /* BLOB => nothing */ 0, /* VARBINARY => nothing */ 0, /* DECIMAL => nothing */ - 0, /* DELAY => nothing */ 0, /* FILE_FACTOR => nothing */ 0, /* NK_FLOAT => nothing */ 0, /* ROLLUP => nothing */ @@ -987,7 +1228,8 @@ static const YYCODETYPE yyFallback[] = { 0, /* INTERVAL => nothing */ 0, /* TOPIC => nothing */ 0, /* AS => nothing */ - 0, /* CGROUP => nothing */ + 0, /* CONSUMER => nothing */ + 0, /* GROUP => nothing */ 0, /* DESC => nothing */ 0, /* DESCRIBE => nothing */ 0, /* RESET => nothing */ @@ -1062,7 +1304,6 @@ static const YYCODETYPE yyFallback[] = { 0, /* PREV => nothing */ 0, /* LINEAR => nothing */ 0, /* NEXT => nothing */ - 0, /* GROUP => nothing */ 0, /* HAVING => nothing */ 0, /* ORDER => nothing */ 0, /* SLIMIT => nothing */ @@ -1072,12 +1313,12 @@ static const YYCODETYPE yyFallback[] = { 0, /* ASC => nothing */ 0, /* NULLS => nothing */ 0, /* ID => nothing */ - 231, /* NK_BITNOT => ID */ - 231, /* INSERT => ID */ - 231, /* VALUES => ID */ - 231, /* IMPORT => ID */ - 231, /* NK_SEMI => ID */ - 231, /* FILE => ID */ + 230, /* NK_BITNOT => ID */ + 230, /* INSERT => ID */ + 230, /* VALUES => ID */ + 230, /* IMPORT => ID */ + 230, /* NK_SEMI => ID */ + 230, /* FILE => ID */ }; #endif /* YYFALLBACK */ @@ -1129,6 +1370,7 @@ struct yyParser { }; typedef struct yyParser yyParser; +#include #ifndef NDEBUG #include static FILE *yyTraceFILE = 0; @@ -1277,42 +1519,42 @@ static const char *const yyTokenName[] = { /* 109 */ "BLOB", /* 110 */ "VARBINARY", /* 111 */ "DECIMAL", - /* 112 */ "DELAY", - /* 113 */ "FILE_FACTOR", - /* 114 */ "NK_FLOAT", - /* 115 */ "ROLLUP", - /* 116 */ "TTL", - /* 117 */ "SMA", - /* 118 */ "SHOW", - /* 119 */ "DATABASES", - /* 120 */ "TABLES", - /* 121 */ "STABLES", - /* 122 */ "MNODES", - /* 123 */ "MODULES", - /* 124 */ "QNODES", - /* 125 */ "FUNCTIONS", - /* 126 */ "INDEXES", - /* 127 */ "ACCOUNTS", - /* 128 */ "APPS", - /* 129 */ "CONNECTIONS", - /* 130 */ "LICENCE", - /* 131 */ "GRANTS", - /* 132 */ "QUERIES", - /* 133 */ "SCORES", - /* 134 */ "TOPICS", - /* 135 */ "VARIABLES", - /* 136 */ "BNODES", - /* 137 */ "SNODES", - /* 138 */ "CLUSTER", - /* 139 */ "TRANSACTIONS", - /* 140 */ "LIKE", - /* 141 */ "INDEX", - /* 142 */ "FULLTEXT", - /* 143 */ "FUNCTION", - /* 144 */ "INTERVAL", - /* 145 */ "TOPIC", - /* 146 */ "AS", - /* 147 */ "CGROUP", + /* 112 */ "FILE_FACTOR", + /* 113 */ "NK_FLOAT", + /* 114 */ "ROLLUP", + /* 115 */ "TTL", + /* 116 */ "SMA", + /* 117 */ "SHOW", + /* 118 */ "DATABASES", + /* 119 */ "TABLES", + /* 120 */ "STABLES", + /* 121 */ "MNODES", + /* 122 */ "MODULES", + /* 123 */ "QNODES", + /* 124 */ "FUNCTIONS", + /* 125 */ "INDEXES", + /* 126 */ "ACCOUNTS", + /* 127 */ "APPS", + /* 128 */ "CONNECTIONS", + /* 129 */ "LICENCE", + /* 130 */ "GRANTS", + /* 131 */ "QUERIES", + /* 132 */ "SCORES", + /* 133 */ "TOPICS", + /* 134 */ "VARIABLES", + /* 135 */ "BNODES", + /* 136 */ "SNODES", + /* 137 */ "CLUSTER", + /* 138 */ "TRANSACTIONS", + /* 139 */ "LIKE", + /* 140 */ "INDEX", + /* 141 */ "FULLTEXT", + /* 142 */ "FUNCTION", + /* 143 */ "INTERVAL", + /* 144 */ "TOPIC", + /* 145 */ "AS", + /* 146 */ "CONSUMER", + /* 147 */ "GROUP", /* 148 */ "DESC", /* 149 */ "DESCRIBE", /* 150 */ "RESET", @@ -1387,142 +1629,141 @@ static const char *const yyTokenName[] = { /* 219 */ "PREV", /* 220 */ "LINEAR", /* 221 */ "NEXT", - /* 222 */ "GROUP", - /* 223 */ "HAVING", - /* 224 */ "ORDER", - /* 225 */ "SLIMIT", - /* 226 */ "SOFFSET", - /* 227 */ "LIMIT", - /* 228 */ "OFFSET", - /* 229 */ "ASC", - /* 230 */ "NULLS", - /* 231 */ "ID", - /* 232 */ "NK_BITNOT", - /* 233 */ "INSERT", - /* 234 */ "VALUES", - /* 235 */ "IMPORT", - /* 236 */ "NK_SEMI", - /* 237 */ "FILE", - /* 238 */ "cmd", - /* 239 */ "account_options", - /* 240 */ "alter_account_options", - /* 241 */ "literal", - /* 242 */ "alter_account_option", - /* 243 */ "user_name", - /* 244 */ "privileges", - /* 245 */ "priv_level", - /* 246 */ "priv_type_list", - /* 247 */ "priv_type", - /* 248 */ "db_name", - /* 249 */ "dnode_endpoint", - /* 250 */ "dnode_host_name", - /* 251 */ "not_exists_opt", - /* 252 */ "db_options", - /* 253 */ "exists_opt", - /* 254 */ "alter_db_options", - /* 255 */ "integer_list", - /* 256 */ "variable_list", - /* 257 */ "retention_list", - /* 258 */ "alter_db_option", - /* 259 */ "retention", - /* 260 */ "full_table_name", - /* 261 */ "column_def_list", - /* 262 */ "tags_def_opt", - /* 263 */ "table_options", - /* 264 */ "multi_create_clause", - /* 265 */ "tags_def", - /* 266 */ "multi_drop_clause", - /* 267 */ "alter_table_clause", - /* 268 */ "alter_table_options", - /* 269 */ "column_name", - /* 270 */ "type_name", - /* 271 */ "signed_literal", - /* 272 */ "create_subtable_clause", - /* 273 */ "specific_tags_opt", - /* 274 */ "literal_list", - /* 275 */ "drop_table_clause", - /* 276 */ "col_name_list", - /* 277 */ "table_name", - /* 278 */ "column_def", - /* 279 */ "func_name_list", - /* 280 */ "alter_table_option", - /* 281 */ "col_name", - /* 282 */ "db_name_cond_opt", - /* 283 */ "like_pattern_opt", - /* 284 */ "table_name_cond", - /* 285 */ "from_db_opt", - /* 286 */ "func_name", - /* 287 */ "function_name", - /* 288 */ "index_name", - /* 289 */ "index_options", - /* 290 */ "func_list", - /* 291 */ "duration_literal", - /* 292 */ "sliding_opt", - /* 293 */ "func", - /* 294 */ "expression_list", - /* 295 */ "topic_name", - /* 296 */ "query_expression", - /* 297 */ "cgroup_name", - /* 298 */ "analyze_opt", - /* 299 */ "explain_options", - /* 300 */ "agg_func_opt", - /* 301 */ "bufsize_opt", - /* 302 */ "stream_name", - /* 303 */ "stream_options", - /* 304 */ "into_opt", - /* 305 */ "dnode_list", - /* 306 */ "signed", - /* 307 */ "literal_func", - /* 308 */ "table_alias", - /* 309 */ "column_alias", - /* 310 */ "expression", - /* 311 */ "pseudo_column", - /* 312 */ "column_reference", - /* 313 */ "function_expression", - /* 314 */ "subquery", - /* 315 */ "star_func", - /* 316 */ "star_func_para_list", - /* 317 */ "noarg_func", - /* 318 */ "other_para_list", - /* 319 */ "star_func_para", - /* 320 */ "predicate", - /* 321 */ "compare_op", - /* 322 */ "in_op", - /* 323 */ "in_predicate_value", - /* 324 */ "boolean_value_expression", - /* 325 */ "boolean_primary", - /* 326 */ "common_expression", - /* 327 */ "from_clause", - /* 328 */ "table_reference_list", - /* 329 */ "table_reference", - /* 330 */ "table_primary", - /* 331 */ "joined_table", - /* 332 */ "alias_opt", - /* 333 */ "parenthesized_joined_table", - /* 334 */ "join_type", - /* 335 */ "search_condition", - /* 336 */ "query_specification", - /* 337 */ "set_quantifier_opt", - /* 338 */ "select_list", - /* 339 */ "where_clause_opt", - /* 340 */ "partition_by_clause_opt", - /* 341 */ "twindow_clause_opt", - /* 342 */ "group_by_clause_opt", - /* 343 */ "having_clause_opt", - /* 344 */ "select_sublist", - /* 345 */ "select_item", - /* 346 */ "fill_opt", - /* 347 */ "fill_mode", - /* 348 */ "group_by_list", - /* 349 */ "query_expression_body", - /* 350 */ "order_by_clause_opt", - /* 351 */ "slimit_clause_opt", - /* 352 */ "limit_clause_opt", - /* 353 */ "query_primary", - /* 354 */ "sort_specification_list", - /* 355 */ "sort_specification", - /* 356 */ "ordering_specification_opt", - /* 357 */ "null_ordering_opt", + /* 222 */ "HAVING", + /* 223 */ "ORDER", + /* 224 */ "SLIMIT", + /* 225 */ "SOFFSET", + /* 226 */ "LIMIT", + /* 227 */ "OFFSET", + /* 228 */ "ASC", + /* 229 */ "NULLS", + /* 230 */ "ID", + /* 231 */ "NK_BITNOT", + /* 232 */ "INSERT", + /* 233 */ "VALUES", + /* 234 */ "IMPORT", + /* 235 */ "NK_SEMI", + /* 236 */ "FILE", + /* 237 */ "cmd", + /* 238 */ "account_options", + /* 239 */ "alter_account_options", + /* 240 */ "literal", + /* 241 */ "alter_account_option", + /* 242 */ "user_name", + /* 243 */ "privileges", + /* 244 */ "priv_level", + /* 245 */ "priv_type_list", + /* 246 */ "priv_type", + /* 247 */ "db_name", + /* 248 */ "dnode_endpoint", + /* 249 */ "dnode_host_name", + /* 250 */ "not_exists_opt", + /* 251 */ "db_options", + /* 252 */ "exists_opt", + /* 253 */ "alter_db_options", + /* 254 */ "integer_list", + /* 255 */ "variable_list", + /* 256 */ "retention_list", + /* 257 */ "alter_db_option", + /* 258 */ "retention", + /* 259 */ "full_table_name", + /* 260 */ "column_def_list", + /* 261 */ "tags_def_opt", + /* 262 */ "table_options", + /* 263 */ "multi_create_clause", + /* 264 */ "tags_def", + /* 265 */ "multi_drop_clause", + /* 266 */ "alter_table_clause", + /* 267 */ "alter_table_options", + /* 268 */ "column_name", + /* 269 */ "type_name", + /* 270 */ "signed_literal", + /* 271 */ "create_subtable_clause", + /* 272 */ "specific_tags_opt", + /* 273 */ "literal_list", + /* 274 */ "drop_table_clause", + /* 275 */ "col_name_list", + /* 276 */ "table_name", + /* 277 */ "column_def", + /* 278 */ "func_name_list", + /* 279 */ "alter_table_option", + /* 280 */ "col_name", + /* 281 */ "db_name_cond_opt", + /* 282 */ "like_pattern_opt", + /* 283 */ "table_name_cond", + /* 284 */ "from_db_opt", + /* 285 */ "func_name", + /* 286 */ "function_name", + /* 287 */ "index_name", + /* 288 */ "index_options", + /* 289 */ "func_list", + /* 290 */ "duration_literal", + /* 291 */ "sliding_opt", + /* 292 */ "func", + /* 293 */ "expression_list", + /* 294 */ "topic_name", + /* 295 */ "query_expression", + /* 296 */ "cgroup_name", + /* 297 */ "analyze_opt", + /* 298 */ "explain_options", + /* 299 */ "agg_func_opt", + /* 300 */ "bufsize_opt", + /* 301 */ "stream_name", + /* 302 */ "stream_options", + /* 303 */ "into_opt", + /* 304 */ "dnode_list", + /* 305 */ "signed", + /* 306 */ "literal_func", + /* 307 */ "table_alias", + /* 308 */ "column_alias", + /* 309 */ "expression", + /* 310 */ "pseudo_column", + /* 311 */ "column_reference", + /* 312 */ "function_expression", + /* 313 */ "subquery", + /* 314 */ "star_func", + /* 315 */ "star_func_para_list", + /* 316 */ "noarg_func", + /* 317 */ "other_para_list", + /* 318 */ "star_func_para", + /* 319 */ "predicate", + /* 320 */ "compare_op", + /* 321 */ "in_op", + /* 322 */ "in_predicate_value", + /* 323 */ "boolean_value_expression", + /* 324 */ "boolean_primary", + /* 325 */ "common_expression", + /* 326 */ "from_clause", + /* 327 */ "table_reference_list", + /* 328 */ "table_reference", + /* 329 */ "table_primary", + /* 330 */ "joined_table", + /* 331 */ "alias_opt", + /* 332 */ "parenthesized_joined_table", + /* 333 */ "join_type", + /* 334 */ "search_condition", + /* 335 */ "query_specification", + /* 336 */ "set_quantifier_opt", + /* 337 */ "select_list", + /* 338 */ "where_clause_opt", + /* 339 */ "partition_by_clause_opt", + /* 340 */ "twindow_clause_opt", + /* 341 */ "group_by_clause_opt", + /* 342 */ "having_clause_opt", + /* 343 */ "select_sublist", + /* 344 */ "select_item", + /* 345 */ "fill_opt", + /* 346 */ "fill_mode", + /* 347 */ "group_by_list", + /* 348 */ "query_expression_body", + /* 349 */ "order_by_clause_opt", + /* 350 */ "slimit_clause_opt", + /* 351 */ "limit_clause_opt", + /* 352 */ "query_primary", + /* 353 */ "sort_specification_list", + /* 354 */ "sort_specification", + /* 355 */ "ordering_specification_opt", + /* 356 */ "null_ordering_opt", }; #endif /* defined(YYCOVERAGE) || !defined(NDEBUG) */ @@ -1695,293 +1936,292 @@ static const char *const yyRuleName[] = { /* 162 */ "tags_def ::= TAGS NK_LP column_def_list NK_RP", /* 163 */ "table_options ::=", /* 164 */ "table_options ::= table_options COMMENT NK_STRING", - /* 165 */ "table_options ::= table_options DELAY NK_INTEGER", - /* 166 */ "table_options ::= table_options FILE_FACTOR NK_FLOAT", - /* 167 */ "table_options ::= table_options ROLLUP NK_LP func_name_list NK_RP", - /* 168 */ "table_options ::= table_options TTL NK_INTEGER", - /* 169 */ "table_options ::= table_options SMA NK_LP col_name_list NK_RP", - /* 170 */ "alter_table_options ::= alter_table_option", - /* 171 */ "alter_table_options ::= alter_table_options alter_table_option", - /* 172 */ "alter_table_option ::= COMMENT NK_STRING", - /* 173 */ "alter_table_option ::= TTL NK_INTEGER", - /* 174 */ "col_name_list ::= col_name", - /* 175 */ "col_name_list ::= col_name_list NK_COMMA col_name", - /* 176 */ "col_name ::= column_name", - /* 177 */ "cmd ::= SHOW DNODES", - /* 178 */ "cmd ::= SHOW USERS", - /* 179 */ "cmd ::= SHOW DATABASES", - /* 180 */ "cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt", - /* 181 */ "cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt", - /* 182 */ "cmd ::= SHOW db_name_cond_opt VGROUPS", - /* 183 */ "cmd ::= SHOW MNODES", - /* 184 */ "cmd ::= SHOW MODULES", - /* 185 */ "cmd ::= SHOW QNODES", - /* 186 */ "cmd ::= SHOW FUNCTIONS", - /* 187 */ "cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt", - /* 188 */ "cmd ::= SHOW STREAMS", - /* 189 */ "cmd ::= SHOW ACCOUNTS", - /* 190 */ "cmd ::= SHOW APPS", - /* 191 */ "cmd ::= SHOW CONNECTIONS", - /* 192 */ "cmd ::= SHOW LICENCE", - /* 193 */ "cmd ::= SHOW GRANTS", - /* 194 */ "cmd ::= SHOW CREATE DATABASE db_name", - /* 195 */ "cmd ::= SHOW CREATE TABLE full_table_name", - /* 196 */ "cmd ::= SHOW CREATE STABLE full_table_name", - /* 197 */ "cmd ::= SHOW QUERIES", - /* 198 */ "cmd ::= SHOW SCORES", - /* 199 */ "cmd ::= SHOW TOPICS", - /* 200 */ "cmd ::= SHOW VARIABLES", - /* 201 */ "cmd ::= SHOW BNODES", - /* 202 */ "cmd ::= SHOW SNODES", - /* 203 */ "cmd ::= SHOW CLUSTER", - /* 204 */ "cmd ::= SHOW TRANSACTIONS", - /* 205 */ "db_name_cond_opt ::=", - /* 206 */ "db_name_cond_opt ::= db_name NK_DOT", - /* 207 */ "like_pattern_opt ::=", - /* 208 */ "like_pattern_opt ::= LIKE NK_STRING", - /* 209 */ "table_name_cond ::= table_name", - /* 210 */ "from_db_opt ::=", - /* 211 */ "from_db_opt ::= FROM db_name", - /* 212 */ "func_name_list ::= func_name", - /* 213 */ "func_name_list ::= func_name_list NK_COMMA func_name", - /* 214 */ "func_name ::= function_name", - /* 215 */ "cmd ::= CREATE SMA INDEX not_exists_opt index_name ON table_name index_options", - /* 216 */ "cmd ::= CREATE FULLTEXT INDEX not_exists_opt index_name ON table_name NK_LP col_name_list NK_RP", - /* 217 */ "cmd ::= DROP INDEX exists_opt index_name ON table_name", - /* 218 */ "index_options ::=", - /* 219 */ "index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt", - /* 220 */ "index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt", - /* 221 */ "func_list ::= func", - /* 222 */ "func_list ::= func_list NK_COMMA func", - /* 223 */ "func ::= function_name NK_LP expression_list NK_RP", - /* 224 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_expression", - /* 225 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name", - /* 226 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name", - /* 227 */ "cmd ::= DROP TOPIC exists_opt topic_name", - /* 228 */ "cmd ::= DROP CGROUP exists_opt cgroup_name ON topic_name", - /* 229 */ "cmd ::= DESC full_table_name", - /* 230 */ "cmd ::= DESCRIBE full_table_name", - /* 231 */ "cmd ::= RESET QUERY CACHE", - /* 232 */ "cmd ::= EXPLAIN analyze_opt explain_options query_expression", - /* 233 */ "analyze_opt ::=", - /* 234 */ "analyze_opt ::= ANALYZE", - /* 235 */ "explain_options ::=", - /* 236 */ "explain_options ::= explain_options VERBOSE NK_BOOL", - /* 237 */ "explain_options ::= explain_options RATIO NK_FLOAT", - /* 238 */ "cmd ::= COMPACT VNODES IN NK_LP integer_list NK_RP", - /* 239 */ "cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt", - /* 240 */ "cmd ::= DROP FUNCTION exists_opt function_name", - /* 241 */ "agg_func_opt ::=", - /* 242 */ "agg_func_opt ::= AGGREGATE", - /* 243 */ "bufsize_opt ::=", - /* 244 */ "bufsize_opt ::= BUFSIZE NK_INTEGER", - /* 245 */ "cmd ::= CREATE STREAM not_exists_opt stream_name stream_options into_opt AS query_expression", - /* 246 */ "cmd ::= DROP STREAM exists_opt stream_name", - /* 247 */ "into_opt ::=", - /* 248 */ "into_opt ::= INTO full_table_name", - /* 249 */ "stream_options ::=", - /* 250 */ "stream_options ::= stream_options TRIGGER AT_ONCE", - /* 251 */ "stream_options ::= stream_options TRIGGER WINDOW_CLOSE", - /* 252 */ "stream_options ::= stream_options WATERMARK duration_literal", - /* 253 */ "cmd ::= KILL CONNECTION NK_INTEGER", - /* 254 */ "cmd ::= KILL QUERY NK_INTEGER", - /* 255 */ "cmd ::= KILL TRANSACTION NK_INTEGER", - /* 256 */ "cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER", - /* 257 */ "cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list", - /* 258 */ "cmd ::= SPLIT VGROUP NK_INTEGER", - /* 259 */ "dnode_list ::= DNODE NK_INTEGER", - /* 260 */ "dnode_list ::= dnode_list DNODE NK_INTEGER", - /* 261 */ "cmd ::= SYNCDB db_name REPLICA", - /* 262 */ "cmd ::= query_expression", - /* 263 */ "literal ::= NK_INTEGER", - /* 264 */ "literal ::= NK_FLOAT", - /* 265 */ "literal ::= NK_STRING", - /* 266 */ "literal ::= NK_BOOL", - /* 267 */ "literal ::= TIMESTAMP NK_STRING", - /* 268 */ "literal ::= duration_literal", - /* 269 */ "literal ::= NULL", - /* 270 */ "literal ::= NK_QUESTION", - /* 271 */ "duration_literal ::= NK_VARIABLE", - /* 272 */ "signed ::= NK_INTEGER", - /* 273 */ "signed ::= NK_PLUS NK_INTEGER", - /* 274 */ "signed ::= NK_MINUS NK_INTEGER", - /* 275 */ "signed ::= NK_FLOAT", - /* 276 */ "signed ::= NK_PLUS NK_FLOAT", - /* 277 */ "signed ::= NK_MINUS NK_FLOAT", - /* 278 */ "signed_literal ::= signed", - /* 279 */ "signed_literal ::= NK_STRING", - /* 280 */ "signed_literal ::= NK_BOOL", - /* 281 */ "signed_literal ::= TIMESTAMP NK_STRING", - /* 282 */ "signed_literal ::= duration_literal", - /* 283 */ "signed_literal ::= NULL", - /* 284 */ "signed_literal ::= literal_func", - /* 285 */ "literal_list ::= signed_literal", - /* 286 */ "literal_list ::= literal_list NK_COMMA signed_literal", - /* 287 */ "db_name ::= NK_ID", - /* 288 */ "table_name ::= NK_ID", - /* 289 */ "column_name ::= NK_ID", - /* 290 */ "function_name ::= NK_ID", - /* 291 */ "table_alias ::= NK_ID", - /* 292 */ "column_alias ::= NK_ID", - /* 293 */ "user_name ::= NK_ID", - /* 294 */ "index_name ::= NK_ID", - /* 295 */ "topic_name ::= NK_ID", - /* 296 */ "stream_name ::= NK_ID", - /* 297 */ "cgroup_name ::= NK_ID", - /* 298 */ "expression ::= literal", - /* 299 */ "expression ::= pseudo_column", - /* 300 */ "expression ::= column_reference", - /* 301 */ "expression ::= function_expression", - /* 302 */ "expression ::= subquery", - /* 303 */ "expression ::= NK_LP expression NK_RP", - /* 304 */ "expression ::= NK_PLUS expression", - /* 305 */ "expression ::= NK_MINUS expression", - /* 306 */ "expression ::= expression NK_PLUS expression", - /* 307 */ "expression ::= expression NK_MINUS expression", - /* 308 */ "expression ::= expression NK_STAR expression", - /* 309 */ "expression ::= expression NK_SLASH expression", - /* 310 */ "expression ::= expression NK_REM expression", - /* 311 */ "expression ::= column_reference NK_ARROW NK_STRING", - /* 312 */ "expression_list ::= expression", - /* 313 */ "expression_list ::= expression_list NK_COMMA expression", - /* 314 */ "column_reference ::= column_name", - /* 315 */ "column_reference ::= table_name NK_DOT column_name", - /* 316 */ "pseudo_column ::= ROWTS", - /* 317 */ "pseudo_column ::= TBNAME", - /* 318 */ "pseudo_column ::= table_name NK_DOT TBNAME", - /* 319 */ "pseudo_column ::= QSTARTTS", - /* 320 */ "pseudo_column ::= QENDTS", - /* 321 */ "pseudo_column ::= WSTARTTS", - /* 322 */ "pseudo_column ::= WENDTS", - /* 323 */ "pseudo_column ::= WDURATION", - /* 324 */ "function_expression ::= function_name NK_LP expression_list NK_RP", - /* 325 */ "function_expression ::= star_func NK_LP star_func_para_list NK_RP", - /* 326 */ "function_expression ::= CAST NK_LP expression AS type_name NK_RP", - /* 327 */ "function_expression ::= literal_func", - /* 328 */ "literal_func ::= noarg_func NK_LP NK_RP", - /* 329 */ "literal_func ::= NOW", - /* 330 */ "noarg_func ::= NOW", - /* 331 */ "noarg_func ::= TODAY", - /* 332 */ "noarg_func ::= TIMEZONE", - /* 333 */ "star_func ::= COUNT", - /* 334 */ "star_func ::= FIRST", - /* 335 */ "star_func ::= LAST", - /* 336 */ "star_func ::= LAST_ROW", - /* 337 */ "star_func_para_list ::= NK_STAR", - /* 338 */ "star_func_para_list ::= other_para_list", - /* 339 */ "other_para_list ::= star_func_para", - /* 340 */ "other_para_list ::= other_para_list NK_COMMA star_func_para", - /* 341 */ "star_func_para ::= expression", - /* 342 */ "star_func_para ::= table_name NK_DOT NK_STAR", - /* 343 */ "predicate ::= expression compare_op expression", - /* 344 */ "predicate ::= expression BETWEEN expression AND expression", - /* 345 */ "predicate ::= expression NOT BETWEEN expression AND expression", - /* 346 */ "predicate ::= expression IS NULL", - /* 347 */ "predicate ::= expression IS NOT NULL", - /* 348 */ "predicate ::= expression in_op in_predicate_value", - /* 349 */ "compare_op ::= NK_LT", - /* 350 */ "compare_op ::= NK_GT", - /* 351 */ "compare_op ::= NK_LE", - /* 352 */ "compare_op ::= NK_GE", - /* 353 */ "compare_op ::= NK_NE", - /* 354 */ "compare_op ::= NK_EQ", - /* 355 */ "compare_op ::= LIKE", - /* 356 */ "compare_op ::= NOT LIKE", - /* 357 */ "compare_op ::= MATCH", - /* 358 */ "compare_op ::= NMATCH", - /* 359 */ "compare_op ::= CONTAINS", - /* 360 */ "in_op ::= IN", - /* 361 */ "in_op ::= NOT IN", - /* 362 */ "in_predicate_value ::= NK_LP expression_list NK_RP", - /* 363 */ "boolean_value_expression ::= boolean_primary", - /* 364 */ "boolean_value_expression ::= NOT boolean_primary", - /* 365 */ "boolean_value_expression ::= boolean_value_expression OR boolean_value_expression", - /* 366 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression", - /* 367 */ "boolean_primary ::= predicate", - /* 368 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP", - /* 369 */ "common_expression ::= expression", - /* 370 */ "common_expression ::= boolean_value_expression", - /* 371 */ "from_clause ::= FROM table_reference_list", - /* 372 */ "table_reference_list ::= table_reference", - /* 373 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference", - /* 374 */ "table_reference ::= table_primary", - /* 375 */ "table_reference ::= joined_table", - /* 376 */ "table_primary ::= table_name alias_opt", - /* 377 */ "table_primary ::= db_name NK_DOT table_name alias_opt", - /* 378 */ "table_primary ::= subquery alias_opt", - /* 379 */ "table_primary ::= parenthesized_joined_table", - /* 380 */ "alias_opt ::=", - /* 381 */ "alias_opt ::= table_alias", - /* 382 */ "alias_opt ::= AS table_alias", - /* 383 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP", - /* 384 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP", - /* 385 */ "joined_table ::= table_reference join_type JOIN table_reference ON search_condition", - /* 386 */ "join_type ::=", - /* 387 */ "join_type ::= INNER", - /* 388 */ "query_specification ::= SELECT set_quantifier_opt select_list from_clause where_clause_opt partition_by_clause_opt twindow_clause_opt group_by_clause_opt having_clause_opt", - /* 389 */ "set_quantifier_opt ::=", - /* 390 */ "set_quantifier_opt ::= DISTINCT", - /* 391 */ "set_quantifier_opt ::= ALL", - /* 392 */ "select_list ::= NK_STAR", - /* 393 */ "select_list ::= select_sublist", - /* 394 */ "select_sublist ::= select_item", - /* 395 */ "select_sublist ::= select_sublist NK_COMMA select_item", - /* 396 */ "select_item ::= common_expression", - /* 397 */ "select_item ::= common_expression column_alias", - /* 398 */ "select_item ::= common_expression AS column_alias", - /* 399 */ "select_item ::= table_name NK_DOT NK_STAR", - /* 400 */ "where_clause_opt ::=", - /* 401 */ "where_clause_opt ::= WHERE search_condition", - /* 402 */ "partition_by_clause_opt ::=", - /* 403 */ "partition_by_clause_opt ::= PARTITION BY expression_list", - /* 404 */ "twindow_clause_opt ::=", - /* 405 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP", - /* 406 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP expression NK_RP", - /* 407 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt", - /* 408 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt", - /* 409 */ "sliding_opt ::=", - /* 410 */ "sliding_opt ::= SLIDING NK_LP duration_literal NK_RP", - /* 411 */ "fill_opt ::=", - /* 412 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP", - /* 413 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP", - /* 414 */ "fill_mode ::= NONE", - /* 415 */ "fill_mode ::= PREV", - /* 416 */ "fill_mode ::= NULL", - /* 417 */ "fill_mode ::= LINEAR", - /* 418 */ "fill_mode ::= NEXT", - /* 419 */ "group_by_clause_opt ::=", - /* 420 */ "group_by_clause_opt ::= GROUP BY group_by_list", - /* 421 */ "group_by_list ::= expression", - /* 422 */ "group_by_list ::= group_by_list NK_COMMA expression", - /* 423 */ "having_clause_opt ::=", - /* 424 */ "having_clause_opt ::= HAVING search_condition", - /* 425 */ "query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt", - /* 426 */ "query_expression_body ::= query_primary", - /* 427 */ "query_expression_body ::= query_expression_body UNION ALL query_expression_body", - /* 428 */ "query_expression_body ::= query_expression_body UNION query_expression_body", - /* 429 */ "query_primary ::= query_specification", - /* 430 */ "query_primary ::= NK_LP query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt NK_RP", - /* 431 */ "order_by_clause_opt ::=", - /* 432 */ "order_by_clause_opt ::= ORDER BY sort_specification_list", - /* 433 */ "slimit_clause_opt ::=", - /* 434 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER", - /* 435 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER", - /* 436 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER", - /* 437 */ "limit_clause_opt ::=", - /* 438 */ "limit_clause_opt ::= LIMIT NK_INTEGER", - /* 439 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER", - /* 440 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER", - /* 441 */ "subquery ::= NK_LP query_expression NK_RP", - /* 442 */ "search_condition ::= common_expression", - /* 443 */ "sort_specification_list ::= sort_specification", - /* 444 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification", - /* 445 */ "sort_specification ::= expression ordering_specification_opt null_ordering_opt", - /* 446 */ "ordering_specification_opt ::=", - /* 447 */ "ordering_specification_opt ::= ASC", - /* 448 */ "ordering_specification_opt ::= DESC", - /* 449 */ "null_ordering_opt ::=", - /* 450 */ "null_ordering_opt ::= NULLS FIRST", - /* 451 */ "null_ordering_opt ::= NULLS LAST", + /* 165 */ "table_options ::= table_options FILE_FACTOR NK_FLOAT", + /* 166 */ "table_options ::= table_options ROLLUP NK_LP func_name_list NK_RP", + /* 167 */ "table_options ::= table_options TTL NK_INTEGER", + /* 168 */ "table_options ::= table_options SMA NK_LP col_name_list NK_RP", + /* 169 */ "alter_table_options ::= alter_table_option", + /* 170 */ "alter_table_options ::= alter_table_options alter_table_option", + /* 171 */ "alter_table_option ::= COMMENT NK_STRING", + /* 172 */ "alter_table_option ::= TTL NK_INTEGER", + /* 173 */ "col_name_list ::= col_name", + /* 174 */ "col_name_list ::= col_name_list NK_COMMA col_name", + /* 175 */ "col_name ::= column_name", + /* 176 */ "cmd ::= SHOW DNODES", + /* 177 */ "cmd ::= SHOW USERS", + /* 178 */ "cmd ::= SHOW DATABASES", + /* 179 */ "cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt", + /* 180 */ "cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt", + /* 181 */ "cmd ::= SHOW db_name_cond_opt VGROUPS", + /* 182 */ "cmd ::= SHOW MNODES", + /* 183 */ "cmd ::= SHOW MODULES", + /* 184 */ "cmd ::= SHOW QNODES", + /* 185 */ "cmd ::= SHOW FUNCTIONS", + /* 186 */ "cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt", + /* 187 */ "cmd ::= SHOW STREAMS", + /* 188 */ "cmd ::= SHOW ACCOUNTS", + /* 189 */ "cmd ::= SHOW APPS", + /* 190 */ "cmd ::= SHOW CONNECTIONS", + /* 191 */ "cmd ::= SHOW LICENCE", + /* 192 */ "cmd ::= SHOW GRANTS", + /* 193 */ "cmd ::= SHOW CREATE DATABASE db_name", + /* 194 */ "cmd ::= SHOW CREATE TABLE full_table_name", + /* 195 */ "cmd ::= SHOW CREATE STABLE full_table_name", + /* 196 */ "cmd ::= SHOW QUERIES", + /* 197 */ "cmd ::= SHOW SCORES", + /* 198 */ "cmd ::= SHOW TOPICS", + /* 199 */ "cmd ::= SHOW VARIABLES", + /* 200 */ "cmd ::= SHOW BNODES", + /* 201 */ "cmd ::= SHOW SNODES", + /* 202 */ "cmd ::= SHOW CLUSTER", + /* 203 */ "cmd ::= SHOW TRANSACTIONS", + /* 204 */ "db_name_cond_opt ::=", + /* 205 */ "db_name_cond_opt ::= db_name NK_DOT", + /* 206 */ "like_pattern_opt ::=", + /* 207 */ "like_pattern_opt ::= LIKE NK_STRING", + /* 208 */ "table_name_cond ::= table_name", + /* 209 */ "from_db_opt ::=", + /* 210 */ "from_db_opt ::= FROM db_name", + /* 211 */ "func_name_list ::= func_name", + /* 212 */ "func_name_list ::= func_name_list NK_COMMA func_name", + /* 213 */ "func_name ::= function_name", + /* 214 */ "cmd ::= CREATE SMA INDEX not_exists_opt index_name ON table_name index_options", + /* 215 */ "cmd ::= CREATE FULLTEXT INDEX not_exists_opt index_name ON table_name NK_LP col_name_list NK_RP", + /* 216 */ "cmd ::= DROP INDEX exists_opt index_name ON table_name", + /* 217 */ "index_options ::=", + /* 218 */ "index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt", + /* 219 */ "index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt", + /* 220 */ "func_list ::= func", + /* 221 */ "func_list ::= func_list NK_COMMA func", + /* 222 */ "func ::= function_name NK_LP expression_list NK_RP", + /* 223 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_expression", + /* 224 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name", + /* 225 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name", + /* 226 */ "cmd ::= DROP TOPIC exists_opt topic_name", + /* 227 */ "cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name", + /* 228 */ "cmd ::= DESC full_table_name", + /* 229 */ "cmd ::= DESCRIBE full_table_name", + /* 230 */ "cmd ::= RESET QUERY CACHE", + /* 231 */ "cmd ::= EXPLAIN analyze_opt explain_options query_expression", + /* 232 */ "analyze_opt ::=", + /* 233 */ "analyze_opt ::= ANALYZE", + /* 234 */ "explain_options ::=", + /* 235 */ "explain_options ::= explain_options VERBOSE NK_BOOL", + /* 236 */ "explain_options ::= explain_options RATIO NK_FLOAT", + /* 237 */ "cmd ::= COMPACT VNODES IN NK_LP integer_list NK_RP", + /* 238 */ "cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt", + /* 239 */ "cmd ::= DROP FUNCTION exists_opt function_name", + /* 240 */ "agg_func_opt ::=", + /* 241 */ "agg_func_opt ::= AGGREGATE", + /* 242 */ "bufsize_opt ::=", + /* 243 */ "bufsize_opt ::= BUFSIZE NK_INTEGER", + /* 244 */ "cmd ::= CREATE STREAM not_exists_opt stream_name stream_options into_opt AS query_expression", + /* 245 */ "cmd ::= DROP STREAM exists_opt stream_name", + /* 246 */ "into_opt ::=", + /* 247 */ "into_opt ::= INTO full_table_name", + /* 248 */ "stream_options ::=", + /* 249 */ "stream_options ::= stream_options TRIGGER AT_ONCE", + /* 250 */ "stream_options ::= stream_options TRIGGER WINDOW_CLOSE", + /* 251 */ "stream_options ::= stream_options WATERMARK duration_literal", + /* 252 */ "cmd ::= KILL CONNECTION NK_INTEGER", + /* 253 */ "cmd ::= KILL QUERY NK_INTEGER", + /* 254 */ "cmd ::= KILL TRANSACTION NK_INTEGER", + /* 255 */ "cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER", + /* 256 */ "cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list", + /* 257 */ "cmd ::= SPLIT VGROUP NK_INTEGER", + /* 258 */ "dnode_list ::= DNODE NK_INTEGER", + /* 259 */ "dnode_list ::= dnode_list DNODE NK_INTEGER", + /* 260 */ "cmd ::= SYNCDB db_name REPLICA", + /* 261 */ "cmd ::= query_expression", + /* 262 */ "literal ::= NK_INTEGER", + /* 263 */ "literal ::= NK_FLOAT", + /* 264 */ "literal ::= NK_STRING", + /* 265 */ "literal ::= NK_BOOL", + /* 266 */ "literal ::= TIMESTAMP NK_STRING", + /* 267 */ "literal ::= duration_literal", + /* 268 */ "literal ::= NULL", + /* 269 */ "literal ::= NK_QUESTION", + /* 270 */ "duration_literal ::= NK_VARIABLE", + /* 271 */ "signed ::= NK_INTEGER", + /* 272 */ "signed ::= NK_PLUS NK_INTEGER", + /* 273 */ "signed ::= NK_MINUS NK_INTEGER", + /* 274 */ "signed ::= NK_FLOAT", + /* 275 */ "signed ::= NK_PLUS NK_FLOAT", + /* 276 */ "signed ::= NK_MINUS NK_FLOAT", + /* 277 */ "signed_literal ::= signed", + /* 278 */ "signed_literal ::= NK_STRING", + /* 279 */ "signed_literal ::= NK_BOOL", + /* 280 */ "signed_literal ::= TIMESTAMP NK_STRING", + /* 281 */ "signed_literal ::= duration_literal", + /* 282 */ "signed_literal ::= NULL", + /* 283 */ "signed_literal ::= literal_func", + /* 284 */ "literal_list ::= signed_literal", + /* 285 */ "literal_list ::= literal_list NK_COMMA signed_literal", + /* 286 */ "db_name ::= NK_ID", + /* 287 */ "table_name ::= NK_ID", + /* 288 */ "column_name ::= NK_ID", + /* 289 */ "function_name ::= NK_ID", + /* 290 */ "table_alias ::= NK_ID", + /* 291 */ "column_alias ::= NK_ID", + /* 292 */ "user_name ::= NK_ID", + /* 293 */ "index_name ::= NK_ID", + /* 294 */ "topic_name ::= NK_ID", + /* 295 */ "stream_name ::= NK_ID", + /* 296 */ "cgroup_name ::= NK_ID", + /* 297 */ "expression ::= literal", + /* 298 */ "expression ::= pseudo_column", + /* 299 */ "expression ::= column_reference", + /* 300 */ "expression ::= function_expression", + /* 301 */ "expression ::= subquery", + /* 302 */ "expression ::= NK_LP expression NK_RP", + /* 303 */ "expression ::= NK_PLUS expression", + /* 304 */ "expression ::= NK_MINUS expression", + /* 305 */ "expression ::= expression NK_PLUS expression", + /* 306 */ "expression ::= expression NK_MINUS expression", + /* 307 */ "expression ::= expression NK_STAR expression", + /* 308 */ "expression ::= expression NK_SLASH expression", + /* 309 */ "expression ::= expression NK_REM expression", + /* 310 */ "expression ::= column_reference NK_ARROW NK_STRING", + /* 311 */ "expression_list ::= expression", + /* 312 */ "expression_list ::= expression_list NK_COMMA expression", + /* 313 */ "column_reference ::= column_name", + /* 314 */ "column_reference ::= table_name NK_DOT column_name", + /* 315 */ "pseudo_column ::= ROWTS", + /* 316 */ "pseudo_column ::= TBNAME", + /* 317 */ "pseudo_column ::= table_name NK_DOT TBNAME", + /* 318 */ "pseudo_column ::= QSTARTTS", + /* 319 */ "pseudo_column ::= QENDTS", + /* 320 */ "pseudo_column ::= WSTARTTS", + /* 321 */ "pseudo_column ::= WENDTS", + /* 322 */ "pseudo_column ::= WDURATION", + /* 323 */ "function_expression ::= function_name NK_LP expression_list NK_RP", + /* 324 */ "function_expression ::= star_func NK_LP star_func_para_list NK_RP", + /* 325 */ "function_expression ::= CAST NK_LP expression AS type_name NK_RP", + /* 326 */ "function_expression ::= literal_func", + /* 327 */ "literal_func ::= noarg_func NK_LP NK_RP", + /* 328 */ "literal_func ::= NOW", + /* 329 */ "noarg_func ::= NOW", + /* 330 */ "noarg_func ::= TODAY", + /* 331 */ "noarg_func ::= TIMEZONE", + /* 332 */ "star_func ::= COUNT", + /* 333 */ "star_func ::= FIRST", + /* 334 */ "star_func ::= LAST", + /* 335 */ "star_func ::= LAST_ROW", + /* 336 */ "star_func_para_list ::= NK_STAR", + /* 337 */ "star_func_para_list ::= other_para_list", + /* 338 */ "other_para_list ::= star_func_para", + /* 339 */ "other_para_list ::= other_para_list NK_COMMA star_func_para", + /* 340 */ "star_func_para ::= expression", + /* 341 */ "star_func_para ::= table_name NK_DOT NK_STAR", + /* 342 */ "predicate ::= expression compare_op expression", + /* 343 */ "predicate ::= expression BETWEEN expression AND expression", + /* 344 */ "predicate ::= expression NOT BETWEEN expression AND expression", + /* 345 */ "predicate ::= expression IS NULL", + /* 346 */ "predicate ::= expression IS NOT NULL", + /* 347 */ "predicate ::= expression in_op in_predicate_value", + /* 348 */ "compare_op ::= NK_LT", + /* 349 */ "compare_op ::= NK_GT", + /* 350 */ "compare_op ::= NK_LE", + /* 351 */ "compare_op ::= NK_GE", + /* 352 */ "compare_op ::= NK_NE", + /* 353 */ "compare_op ::= NK_EQ", + /* 354 */ "compare_op ::= LIKE", + /* 355 */ "compare_op ::= NOT LIKE", + /* 356 */ "compare_op ::= MATCH", + /* 357 */ "compare_op ::= NMATCH", + /* 358 */ "compare_op ::= CONTAINS", + /* 359 */ "in_op ::= IN", + /* 360 */ "in_op ::= NOT IN", + /* 361 */ "in_predicate_value ::= NK_LP expression_list NK_RP", + /* 362 */ "boolean_value_expression ::= boolean_primary", + /* 363 */ "boolean_value_expression ::= NOT boolean_primary", + /* 364 */ "boolean_value_expression ::= boolean_value_expression OR boolean_value_expression", + /* 365 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression", + /* 366 */ "boolean_primary ::= predicate", + /* 367 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP", + /* 368 */ "common_expression ::= expression", + /* 369 */ "common_expression ::= boolean_value_expression", + /* 370 */ "from_clause ::= FROM table_reference_list", + /* 371 */ "table_reference_list ::= table_reference", + /* 372 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference", + /* 373 */ "table_reference ::= table_primary", + /* 374 */ "table_reference ::= joined_table", + /* 375 */ "table_primary ::= table_name alias_opt", + /* 376 */ "table_primary ::= db_name NK_DOT table_name alias_opt", + /* 377 */ "table_primary ::= subquery alias_opt", + /* 378 */ "table_primary ::= parenthesized_joined_table", + /* 379 */ "alias_opt ::=", + /* 380 */ "alias_opt ::= table_alias", + /* 381 */ "alias_opt ::= AS table_alias", + /* 382 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP", + /* 383 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP", + /* 384 */ "joined_table ::= table_reference join_type JOIN table_reference ON search_condition", + /* 385 */ "join_type ::=", + /* 386 */ "join_type ::= INNER", + /* 387 */ "query_specification ::= SELECT set_quantifier_opt select_list from_clause where_clause_opt partition_by_clause_opt twindow_clause_opt group_by_clause_opt having_clause_opt", + /* 388 */ "set_quantifier_opt ::=", + /* 389 */ "set_quantifier_opt ::= DISTINCT", + /* 390 */ "set_quantifier_opt ::= ALL", + /* 391 */ "select_list ::= NK_STAR", + /* 392 */ "select_list ::= select_sublist", + /* 393 */ "select_sublist ::= select_item", + /* 394 */ "select_sublist ::= select_sublist NK_COMMA select_item", + /* 395 */ "select_item ::= common_expression", + /* 396 */ "select_item ::= common_expression column_alias", + /* 397 */ "select_item ::= common_expression AS column_alias", + /* 398 */ "select_item ::= table_name NK_DOT NK_STAR", + /* 399 */ "where_clause_opt ::=", + /* 400 */ "where_clause_opt ::= WHERE search_condition", + /* 401 */ "partition_by_clause_opt ::=", + /* 402 */ "partition_by_clause_opt ::= PARTITION BY expression_list", + /* 403 */ "twindow_clause_opt ::=", + /* 404 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP", + /* 405 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP expression NK_RP", + /* 406 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt", + /* 407 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt", + /* 408 */ "sliding_opt ::=", + /* 409 */ "sliding_opt ::= SLIDING NK_LP duration_literal NK_RP", + /* 410 */ "fill_opt ::=", + /* 411 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP", + /* 412 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP", + /* 413 */ "fill_mode ::= NONE", + /* 414 */ "fill_mode ::= PREV", + /* 415 */ "fill_mode ::= NULL", + /* 416 */ "fill_mode ::= LINEAR", + /* 417 */ "fill_mode ::= NEXT", + /* 418 */ "group_by_clause_opt ::=", + /* 419 */ "group_by_clause_opt ::= GROUP BY group_by_list", + /* 420 */ "group_by_list ::= expression", + /* 421 */ "group_by_list ::= group_by_list NK_COMMA expression", + /* 422 */ "having_clause_opt ::=", + /* 423 */ "having_clause_opt ::= HAVING search_condition", + /* 424 */ "query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt", + /* 425 */ "query_expression_body ::= query_primary", + /* 426 */ "query_expression_body ::= query_expression_body UNION ALL query_expression_body", + /* 427 */ "query_expression_body ::= query_expression_body UNION query_expression_body", + /* 428 */ "query_primary ::= query_specification", + /* 429 */ "query_primary ::= NK_LP query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt NK_RP", + /* 430 */ "order_by_clause_opt ::=", + /* 431 */ "order_by_clause_opt ::= ORDER BY sort_specification_list", + /* 432 */ "slimit_clause_opt ::=", + /* 433 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER", + /* 434 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER", + /* 435 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER", + /* 436 */ "limit_clause_opt ::=", + /* 437 */ "limit_clause_opt ::= LIMIT NK_INTEGER", + /* 438 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER", + /* 439 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER", + /* 440 */ "subquery ::= NK_LP query_expression NK_RP", + /* 441 */ "search_condition ::= common_expression", + /* 442 */ "sort_specification_list ::= sort_specification", + /* 443 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification", + /* 444 */ "sort_specification ::= expression ordering_specification_opt null_ordering_opt", + /* 445 */ "ordering_specification_opt ::=", + /* 446 */ "ordering_specification_opt ::= ASC", + /* 447 */ "ordering_specification_opt ::= DESC", + /* 448 */ "null_ordering_opt ::=", + /* 449 */ "null_ordering_opt ::= NULLS FIRST", + /* 450 */ "null_ordering_opt ::= NULLS LAST", }; #endif /* NDEBUG */ @@ -2108,174 +2348,174 @@ static void yy_destructor( */ /********* Begin destructor definitions ***************************************/ /* Default NON-TERMINAL Destructor */ - case 238: /* cmd */ - case 241: /* literal */ - case 252: /* db_options */ - case 254: /* alter_db_options */ - case 259: /* retention */ - case 260: /* full_table_name */ - case 263: /* table_options */ - case 267: /* alter_table_clause */ - case 268: /* alter_table_options */ - case 271: /* signed_literal */ - case 272: /* create_subtable_clause */ - case 275: /* drop_table_clause */ - case 278: /* column_def */ - case 281: /* col_name */ - case 282: /* db_name_cond_opt */ - case 283: /* like_pattern_opt */ - case 284: /* table_name_cond */ - case 285: /* from_db_opt */ - case 286: /* func_name */ - case 289: /* index_options */ - case 291: /* duration_literal */ - case 292: /* sliding_opt */ - case 293: /* func */ - case 296: /* query_expression */ - case 299: /* explain_options */ - case 303: /* stream_options */ - case 304: /* into_opt */ - case 306: /* signed */ - case 307: /* literal_func */ - case 310: /* expression */ - case 311: /* pseudo_column */ - case 312: /* column_reference */ - case 313: /* function_expression */ - case 314: /* subquery */ - case 319: /* star_func_para */ - case 320: /* predicate */ - case 323: /* in_predicate_value */ - case 324: /* boolean_value_expression */ - case 325: /* boolean_primary */ - case 326: /* common_expression */ - case 327: /* from_clause */ - case 328: /* table_reference_list */ - case 329: /* table_reference */ - case 330: /* table_primary */ - case 331: /* joined_table */ - case 333: /* parenthesized_joined_table */ - case 335: /* search_condition */ - case 336: /* query_specification */ - case 339: /* where_clause_opt */ - case 341: /* twindow_clause_opt */ - case 343: /* having_clause_opt */ - case 345: /* select_item */ - case 346: /* fill_opt */ - case 349: /* query_expression_body */ - case 351: /* slimit_clause_opt */ - case 352: /* limit_clause_opt */ - case 353: /* query_primary */ - case 355: /* sort_specification */ + case 237: /* cmd */ + case 240: /* literal */ + case 251: /* db_options */ + case 253: /* alter_db_options */ + case 258: /* retention */ + case 259: /* full_table_name */ + case 262: /* table_options */ + case 266: /* alter_table_clause */ + case 267: /* alter_table_options */ + case 270: /* signed_literal */ + case 271: /* create_subtable_clause */ + case 274: /* drop_table_clause */ + case 277: /* column_def */ + case 280: /* col_name */ + case 281: /* db_name_cond_opt */ + case 282: /* like_pattern_opt */ + case 283: /* table_name_cond */ + case 284: /* from_db_opt */ + case 285: /* func_name */ + case 288: /* index_options */ + case 290: /* duration_literal */ + case 291: /* sliding_opt */ + case 292: /* func */ + case 295: /* query_expression */ + case 298: /* explain_options */ + case 302: /* stream_options */ + case 303: /* into_opt */ + case 305: /* signed */ + case 306: /* literal_func */ + case 309: /* expression */ + case 310: /* pseudo_column */ + case 311: /* column_reference */ + case 312: /* function_expression */ + case 313: /* subquery */ + case 318: /* star_func_para */ + case 319: /* predicate */ + case 322: /* in_predicate_value */ + case 323: /* boolean_value_expression */ + case 324: /* boolean_primary */ + case 325: /* common_expression */ + case 326: /* from_clause */ + case 327: /* table_reference_list */ + case 328: /* table_reference */ + case 329: /* table_primary */ + case 330: /* joined_table */ + case 332: /* parenthesized_joined_table */ + case 334: /* search_condition */ + case 335: /* query_specification */ + case 338: /* where_clause_opt */ + case 340: /* twindow_clause_opt */ + case 342: /* having_clause_opt */ + case 344: /* select_item */ + case 345: /* fill_opt */ + case 348: /* query_expression_body */ + case 350: /* slimit_clause_opt */ + case 351: /* limit_clause_opt */ + case 352: /* query_primary */ + case 354: /* sort_specification */ { - nodesDestroyNode((yypminor->yy172)); + nodesDestroyNode((yypminor->yy686)); } break; - case 239: /* account_options */ - case 240: /* alter_account_options */ - case 242: /* alter_account_option */ - case 301: /* bufsize_opt */ + case 238: /* account_options */ + case 239: /* alter_account_options */ + case 241: /* alter_account_option */ + case 300: /* bufsize_opt */ { } break; - case 243: /* user_name */ - case 245: /* priv_level */ - case 248: /* db_name */ - case 249: /* dnode_endpoint */ - case 250: /* dnode_host_name */ - case 269: /* column_name */ - case 277: /* table_name */ - case 287: /* function_name */ - case 288: /* index_name */ - case 295: /* topic_name */ - case 297: /* cgroup_name */ - case 302: /* stream_name */ - case 308: /* table_alias */ - case 309: /* column_alias */ - case 315: /* star_func */ - case 317: /* noarg_func */ - case 332: /* alias_opt */ + case 242: /* user_name */ + case 244: /* priv_level */ + case 247: /* db_name */ + case 248: /* dnode_endpoint */ + case 249: /* dnode_host_name */ + case 268: /* column_name */ + case 276: /* table_name */ + case 286: /* function_name */ + case 287: /* index_name */ + case 294: /* topic_name */ + case 296: /* cgroup_name */ + case 301: /* stream_name */ + case 307: /* table_alias */ + case 308: /* column_alias */ + case 314: /* star_func */ + case 316: /* noarg_func */ + case 331: /* alias_opt */ { } break; - case 244: /* privileges */ - case 246: /* priv_type_list */ - case 247: /* priv_type */ + case 243: /* privileges */ + case 245: /* priv_type_list */ + case 246: /* priv_type */ { } break; - case 251: /* not_exists_opt */ - case 253: /* exists_opt */ - case 298: /* analyze_opt */ - case 300: /* agg_func_opt */ - case 337: /* set_quantifier_opt */ + case 250: /* not_exists_opt */ + case 252: /* exists_opt */ + case 297: /* analyze_opt */ + case 299: /* agg_func_opt */ + case 336: /* set_quantifier_opt */ { } break; - case 255: /* integer_list */ - case 256: /* variable_list */ - case 257: /* retention_list */ - case 261: /* column_def_list */ - case 262: /* tags_def_opt */ - case 264: /* multi_create_clause */ - case 265: /* tags_def */ - case 266: /* multi_drop_clause */ - case 273: /* specific_tags_opt */ - case 274: /* literal_list */ - case 276: /* col_name_list */ - case 279: /* func_name_list */ - case 290: /* func_list */ - case 294: /* expression_list */ - case 305: /* dnode_list */ - case 316: /* star_func_para_list */ - case 318: /* other_para_list */ - case 338: /* select_list */ - case 340: /* partition_by_clause_opt */ - case 342: /* group_by_clause_opt */ - case 344: /* select_sublist */ - case 348: /* group_by_list */ - case 350: /* order_by_clause_opt */ - case 354: /* sort_specification_list */ + case 254: /* integer_list */ + case 255: /* variable_list */ + case 256: /* retention_list */ + case 260: /* column_def_list */ + case 261: /* tags_def_opt */ + case 263: /* multi_create_clause */ + case 264: /* tags_def */ + case 265: /* multi_drop_clause */ + case 272: /* specific_tags_opt */ + case 273: /* literal_list */ + case 275: /* col_name_list */ + case 278: /* func_name_list */ + case 289: /* func_list */ + case 293: /* expression_list */ + case 304: /* dnode_list */ + case 315: /* star_func_para_list */ + case 317: /* other_para_list */ + case 337: /* select_list */ + case 339: /* partition_by_clause_opt */ + case 341: /* group_by_clause_opt */ + case 343: /* select_sublist */ + case 347: /* group_by_list */ + case 349: /* order_by_clause_opt */ + case 353: /* sort_specification_list */ { - nodesDestroyList((yypminor->yy60)); + nodesDestroyList((yypminor->yy670)); } break; - case 258: /* alter_db_option */ - case 280: /* alter_table_option */ + case 257: /* alter_db_option */ + case 279: /* alter_table_option */ { } break; - case 270: /* type_name */ + case 269: /* type_name */ { } break; - case 321: /* compare_op */ - case 322: /* in_op */ + case 320: /* compare_op */ + case 321: /* in_op */ { } break; - case 334: /* join_type */ + case 333: /* join_type */ { } break; - case 347: /* fill_mode */ + case 346: /* fill_mode */ { } break; - case 356: /* ordering_specification_opt */ + case 355: /* ordering_specification_opt */ { } break; - case 357: /* null_ordering_opt */ + case 356: /* null_ordering_opt */ { } @@ -2403,15 +2643,18 @@ static YYACTIONTYPE yy_find_shift_action( do{ i = yy_shift_ofst[stateno]; assert( i>=0 ); - /* assert( i+YYNTOKEN<=(int)YY_NLOOKAHEAD ); */ + assert( i<=YY_ACTTAB_COUNT ); + assert( i+YYNTOKEN<=(int)YY_NLOOKAHEAD ); assert( iLookAhead!=YYNOCODE ); assert( iLookAhead < YYNTOKEN ); i += iLookAhead; - if( i>=YY_NLOOKAHEAD || yy_lookahead[i]!=iLookAhead ){ + assert( i<(int)YY_NLOOKAHEAD ); + if( yy_lookahead[i]!=iLookAhead ){ #ifdef YYFALLBACK YYCODETYPE iFallback; /* Fallback token */ - if( iLookAhead %s\n", @@ -2426,16 +2669,8 @@ static YYACTIONTYPE yy_find_shift_action( #ifdef YYWILDCARD { int j = i - iLookAhead + YYWILDCARD; - if( -#if YY_SHIFT_MIN+YYWILDCARD<0 - j>=0 && -#endif -#if YY_SHIFT_MAX+YYWILDCARD>=YY_ACTTAB_COUNT - j0 - ){ + assert( j<(int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0])) ); + if( yy_lookahead[j]==YYWILDCARD && iLookAhead>0 ){ #ifndef NDEBUG if( yyTraceFILE ){ fprintf(yyTraceFILE, "%sWILDCARD %s => %s\n", @@ -2449,6 +2684,7 @@ static YYACTIONTYPE yy_find_shift_action( #endif /* YYWILDCARD */ return yy_default[stateno]; }else{ + assert( i>=0 && i<(int)(sizeof(yy_action)/sizeof(yy_action[0])) ); return yy_action[i]; } }while(1); @@ -2567,465 +2803,916 @@ static void yy_shift( yyTraceShift(yypParser, yyNewState, "Shift"); } -/* The following table contains information about every rule that -** is used during the reduce. -*/ -static const struct { - YYCODETYPE lhs; /* Symbol on the left-hand side of the rule */ - signed char nrhs; /* Negative of the number of RHS symbols in the rule */ -} yyRuleInfo[] = { - { 238, -6 }, /* (0) cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */ - { 238, -4 }, /* (1) cmd ::= ALTER ACCOUNT NK_ID alter_account_options */ - { 239, 0 }, /* (2) account_options ::= */ - { 239, -3 }, /* (3) account_options ::= account_options PPS literal */ - { 239, -3 }, /* (4) account_options ::= account_options TSERIES literal */ - { 239, -3 }, /* (5) account_options ::= account_options STORAGE literal */ - { 239, -3 }, /* (6) account_options ::= account_options STREAMS literal */ - { 239, -3 }, /* (7) account_options ::= account_options QTIME literal */ - { 239, -3 }, /* (8) account_options ::= account_options DBS literal */ - { 239, -3 }, /* (9) account_options ::= account_options USERS literal */ - { 239, -3 }, /* (10) account_options ::= account_options CONNS literal */ - { 239, -3 }, /* (11) account_options ::= account_options STATE literal */ - { 240, -1 }, /* (12) alter_account_options ::= alter_account_option */ - { 240, -2 }, /* (13) alter_account_options ::= alter_account_options alter_account_option */ - { 242, -2 }, /* (14) alter_account_option ::= PASS literal */ - { 242, -2 }, /* (15) alter_account_option ::= PPS literal */ - { 242, -2 }, /* (16) alter_account_option ::= TSERIES literal */ - { 242, -2 }, /* (17) alter_account_option ::= STORAGE literal */ - { 242, -2 }, /* (18) alter_account_option ::= STREAMS literal */ - { 242, -2 }, /* (19) alter_account_option ::= QTIME literal */ - { 242, -2 }, /* (20) alter_account_option ::= DBS literal */ - { 242, -2 }, /* (21) alter_account_option ::= USERS literal */ - { 242, -2 }, /* (22) alter_account_option ::= CONNS literal */ - { 242, -2 }, /* (23) alter_account_option ::= STATE literal */ - { 238, -5 }, /* (24) cmd ::= CREATE USER user_name PASS NK_STRING */ - { 238, -5 }, /* (25) cmd ::= ALTER USER user_name PASS NK_STRING */ - { 238, -5 }, /* (26) cmd ::= ALTER USER user_name PRIVILEGE NK_STRING */ - { 238, -3 }, /* (27) cmd ::= DROP USER user_name */ - { 238, -6 }, /* (28) cmd ::= GRANT privileges ON priv_level TO user_name */ - { 238, -6 }, /* (29) cmd ::= REVOKE privileges ON priv_level FROM user_name */ - { 244, -1 }, /* (30) privileges ::= ALL */ - { 244, -1 }, /* (31) privileges ::= priv_type_list */ - { 246, -1 }, /* (32) priv_type_list ::= priv_type */ - { 246, -3 }, /* (33) priv_type_list ::= priv_type_list NK_COMMA priv_type */ - { 247, -1 }, /* (34) priv_type ::= READ */ - { 247, -1 }, /* (35) priv_type ::= WRITE */ - { 245, -3 }, /* (36) priv_level ::= NK_STAR NK_DOT NK_STAR */ - { 245, -3 }, /* (37) priv_level ::= db_name NK_DOT NK_STAR */ - { 238, -3 }, /* (38) cmd ::= CREATE DNODE dnode_endpoint */ - { 238, -5 }, /* (39) cmd ::= CREATE DNODE dnode_host_name PORT NK_INTEGER */ - { 238, -3 }, /* (40) cmd ::= DROP DNODE NK_INTEGER */ - { 238, -3 }, /* (41) cmd ::= DROP DNODE dnode_endpoint */ - { 238, -4 }, /* (42) cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ - { 238, -5 }, /* (43) cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */ - { 238, -4 }, /* (44) cmd ::= ALTER ALL DNODES NK_STRING */ - { 238, -5 }, /* (45) cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */ - { 249, -1 }, /* (46) dnode_endpoint ::= NK_STRING */ - { 250, -1 }, /* (47) dnode_host_name ::= NK_ID */ - { 250, -1 }, /* (48) dnode_host_name ::= NK_IPTOKEN */ - { 238, -3 }, /* (49) cmd ::= ALTER LOCAL NK_STRING */ - { 238, -4 }, /* (50) cmd ::= ALTER LOCAL NK_STRING NK_STRING */ - { 238, -5 }, /* (51) cmd ::= CREATE QNODE ON DNODE NK_INTEGER */ - { 238, -5 }, /* (52) cmd ::= DROP QNODE ON DNODE NK_INTEGER */ - { 238, -5 }, /* (53) cmd ::= CREATE BNODE ON DNODE NK_INTEGER */ - { 238, -5 }, /* (54) cmd ::= DROP BNODE ON DNODE NK_INTEGER */ - { 238, -5 }, /* (55) cmd ::= CREATE SNODE ON DNODE NK_INTEGER */ - { 238, -5 }, /* (56) cmd ::= DROP SNODE ON DNODE NK_INTEGER */ - { 238, -5 }, /* (57) cmd ::= CREATE MNODE ON DNODE NK_INTEGER */ - { 238, -5 }, /* (58) cmd ::= DROP MNODE ON DNODE NK_INTEGER */ - { 238, -5 }, /* (59) cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ - { 238, -4 }, /* (60) cmd ::= DROP DATABASE exists_opt db_name */ - { 238, -2 }, /* (61) cmd ::= USE db_name */ - { 238, -4 }, /* (62) cmd ::= ALTER DATABASE db_name alter_db_options */ - { 251, -3 }, /* (63) not_exists_opt ::= IF NOT EXISTS */ - { 251, 0 }, /* (64) not_exists_opt ::= */ - { 253, -2 }, /* (65) exists_opt ::= IF EXISTS */ - { 253, 0 }, /* (66) exists_opt ::= */ - { 252, 0 }, /* (67) db_options ::= */ - { 252, -3 }, /* (68) db_options ::= db_options BUFFER NK_INTEGER */ - { 252, -3 }, /* (69) db_options ::= db_options CACHELAST NK_INTEGER */ - { 252, -3 }, /* (70) db_options ::= db_options COMP NK_INTEGER */ - { 252, -3 }, /* (71) db_options ::= db_options DAYS NK_INTEGER */ - { 252, -3 }, /* (72) db_options ::= db_options DAYS NK_VARIABLE */ - { 252, -3 }, /* (73) db_options ::= db_options FSYNC NK_INTEGER */ - { 252, -3 }, /* (74) db_options ::= db_options MAXROWS NK_INTEGER */ - { 252, -3 }, /* (75) db_options ::= db_options MINROWS NK_INTEGER */ - { 252, -3 }, /* (76) db_options ::= db_options KEEP integer_list */ - { 252, -3 }, /* (77) db_options ::= db_options KEEP variable_list */ - { 252, -3 }, /* (78) db_options ::= db_options PAGES NK_INTEGER */ - { 252, -3 }, /* (79) db_options ::= db_options PAGESIZE NK_INTEGER */ - { 252, -3 }, /* (80) db_options ::= db_options PRECISION NK_STRING */ - { 252, -3 }, /* (81) db_options ::= db_options REPLICA NK_INTEGER */ - { 252, -3 }, /* (82) db_options ::= db_options STRICT NK_INTEGER */ - { 252, -3 }, /* (83) db_options ::= db_options WAL NK_INTEGER */ - { 252, -3 }, /* (84) db_options ::= db_options VGROUPS NK_INTEGER */ - { 252, -3 }, /* (85) db_options ::= db_options SINGLE_STABLE NK_INTEGER */ - { 252, -3 }, /* (86) db_options ::= db_options RETENTIONS retention_list */ - { 252, -3 }, /* (87) db_options ::= db_options SCHEMALESS NK_INTEGER */ - { 254, -1 }, /* (88) alter_db_options ::= alter_db_option */ - { 254, -2 }, /* (89) alter_db_options ::= alter_db_options alter_db_option */ - { 258, -2 }, /* (90) alter_db_option ::= BUFFER NK_INTEGER */ - { 258, -2 }, /* (91) alter_db_option ::= CACHELAST NK_INTEGER */ - { 258, -2 }, /* (92) alter_db_option ::= FSYNC NK_INTEGER */ - { 258, -2 }, /* (93) alter_db_option ::= KEEP integer_list */ - { 258, -2 }, /* (94) alter_db_option ::= KEEP variable_list */ - { 258, -2 }, /* (95) alter_db_option ::= PAGES NK_INTEGER */ - { 258, -2 }, /* (96) alter_db_option ::= REPLICA NK_INTEGER */ - { 258, -2 }, /* (97) alter_db_option ::= STRICT NK_INTEGER */ - { 258, -2 }, /* (98) alter_db_option ::= WAL NK_INTEGER */ - { 255, -1 }, /* (99) integer_list ::= NK_INTEGER */ - { 255, -3 }, /* (100) integer_list ::= integer_list NK_COMMA NK_INTEGER */ - { 256, -1 }, /* (101) variable_list ::= NK_VARIABLE */ - { 256, -3 }, /* (102) variable_list ::= variable_list NK_COMMA NK_VARIABLE */ - { 257, -1 }, /* (103) retention_list ::= retention */ - { 257, -3 }, /* (104) retention_list ::= retention_list NK_COMMA retention */ - { 259, -3 }, /* (105) retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ - { 238, -9 }, /* (106) cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ - { 238, -3 }, /* (107) cmd ::= CREATE TABLE multi_create_clause */ - { 238, -9 }, /* (108) cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ - { 238, -3 }, /* (109) cmd ::= DROP TABLE multi_drop_clause */ - { 238, -4 }, /* (110) cmd ::= DROP STABLE exists_opt full_table_name */ - { 238, -3 }, /* (111) cmd ::= ALTER TABLE alter_table_clause */ - { 238, -3 }, /* (112) cmd ::= ALTER STABLE alter_table_clause */ - { 267, -2 }, /* (113) alter_table_clause ::= full_table_name alter_table_options */ - { 267, -5 }, /* (114) alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ - { 267, -4 }, /* (115) alter_table_clause ::= full_table_name DROP COLUMN column_name */ - { 267, -5 }, /* (116) alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ - { 267, -5 }, /* (117) alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ - { 267, -5 }, /* (118) alter_table_clause ::= full_table_name ADD TAG column_name type_name */ - { 267, -4 }, /* (119) alter_table_clause ::= full_table_name DROP TAG column_name */ - { 267, -5 }, /* (120) alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ - { 267, -5 }, /* (121) alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ - { 267, -6 }, /* (122) alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */ - { 264, -1 }, /* (123) multi_create_clause ::= create_subtable_clause */ - { 264, -2 }, /* (124) multi_create_clause ::= multi_create_clause create_subtable_clause */ - { 272, -10 }, /* (125) create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_tags_opt TAGS NK_LP literal_list NK_RP table_options */ - { 266, -1 }, /* (126) multi_drop_clause ::= drop_table_clause */ - { 266, -2 }, /* (127) multi_drop_clause ::= multi_drop_clause drop_table_clause */ - { 275, -2 }, /* (128) drop_table_clause ::= exists_opt full_table_name */ - { 273, 0 }, /* (129) specific_tags_opt ::= */ - { 273, -3 }, /* (130) specific_tags_opt ::= NK_LP col_name_list NK_RP */ - { 260, -1 }, /* (131) full_table_name ::= table_name */ - { 260, -3 }, /* (132) full_table_name ::= db_name NK_DOT table_name */ - { 261, -1 }, /* (133) column_def_list ::= column_def */ - { 261, -3 }, /* (134) column_def_list ::= column_def_list NK_COMMA column_def */ - { 278, -2 }, /* (135) column_def ::= column_name type_name */ - { 278, -4 }, /* (136) column_def ::= column_name type_name COMMENT NK_STRING */ - { 270, -1 }, /* (137) type_name ::= BOOL */ - { 270, -1 }, /* (138) type_name ::= TINYINT */ - { 270, -1 }, /* (139) type_name ::= SMALLINT */ - { 270, -1 }, /* (140) type_name ::= INT */ - { 270, -1 }, /* (141) type_name ::= INTEGER */ - { 270, -1 }, /* (142) type_name ::= BIGINT */ - { 270, -1 }, /* (143) type_name ::= FLOAT */ - { 270, -1 }, /* (144) type_name ::= DOUBLE */ - { 270, -4 }, /* (145) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ - { 270, -1 }, /* (146) type_name ::= TIMESTAMP */ - { 270, -4 }, /* (147) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ - { 270, -2 }, /* (148) type_name ::= TINYINT UNSIGNED */ - { 270, -2 }, /* (149) type_name ::= SMALLINT UNSIGNED */ - { 270, -2 }, /* (150) type_name ::= INT UNSIGNED */ - { 270, -2 }, /* (151) type_name ::= BIGINT UNSIGNED */ - { 270, -1 }, /* (152) type_name ::= JSON */ - { 270, -4 }, /* (153) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ - { 270, -1 }, /* (154) type_name ::= MEDIUMBLOB */ - { 270, -1 }, /* (155) type_name ::= BLOB */ - { 270, -4 }, /* (156) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ - { 270, -1 }, /* (157) type_name ::= DECIMAL */ - { 270, -4 }, /* (158) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ - { 270, -6 }, /* (159) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ - { 262, 0 }, /* (160) tags_def_opt ::= */ - { 262, -1 }, /* (161) tags_def_opt ::= tags_def */ - { 265, -4 }, /* (162) tags_def ::= TAGS NK_LP column_def_list NK_RP */ - { 263, 0 }, /* (163) table_options ::= */ - { 263, -3 }, /* (164) table_options ::= table_options COMMENT NK_STRING */ - { 263, -3 }, /* (165) table_options ::= table_options DELAY NK_INTEGER */ - { 263, -3 }, /* (166) table_options ::= table_options FILE_FACTOR NK_FLOAT */ - { 263, -5 }, /* (167) table_options ::= table_options ROLLUP NK_LP func_name_list NK_RP */ - { 263, -3 }, /* (168) table_options ::= table_options TTL NK_INTEGER */ - { 263, -5 }, /* (169) table_options ::= table_options SMA NK_LP col_name_list NK_RP */ - { 268, -1 }, /* (170) alter_table_options ::= alter_table_option */ - { 268, -2 }, /* (171) alter_table_options ::= alter_table_options alter_table_option */ - { 280, -2 }, /* (172) alter_table_option ::= COMMENT NK_STRING */ - { 280, -2 }, /* (173) alter_table_option ::= TTL NK_INTEGER */ - { 276, -1 }, /* (174) col_name_list ::= col_name */ - { 276, -3 }, /* (175) col_name_list ::= col_name_list NK_COMMA col_name */ - { 281, -1 }, /* (176) col_name ::= column_name */ - { 238, -2 }, /* (177) cmd ::= SHOW DNODES */ - { 238, -2 }, /* (178) cmd ::= SHOW USERS */ - { 238, -2 }, /* (179) cmd ::= SHOW DATABASES */ - { 238, -4 }, /* (180) cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */ - { 238, -4 }, /* (181) cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ - { 238, -3 }, /* (182) cmd ::= SHOW db_name_cond_opt VGROUPS */ - { 238, -2 }, /* (183) cmd ::= SHOW MNODES */ - { 238, -2 }, /* (184) cmd ::= SHOW MODULES */ - { 238, -2 }, /* (185) cmd ::= SHOW QNODES */ - { 238, -2 }, /* (186) cmd ::= SHOW FUNCTIONS */ - { 238, -5 }, /* (187) cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ - { 238, -2 }, /* (188) cmd ::= SHOW STREAMS */ - { 238, -2 }, /* (189) cmd ::= SHOW ACCOUNTS */ - { 238, -2 }, /* (190) cmd ::= SHOW APPS */ - { 238, -2 }, /* (191) cmd ::= SHOW CONNECTIONS */ - { 238, -2 }, /* (192) cmd ::= SHOW LICENCE */ - { 238, -2 }, /* (193) cmd ::= SHOW GRANTS */ - { 238, -4 }, /* (194) cmd ::= SHOW CREATE DATABASE db_name */ - { 238, -4 }, /* (195) cmd ::= SHOW CREATE TABLE full_table_name */ - { 238, -4 }, /* (196) cmd ::= SHOW CREATE STABLE full_table_name */ - { 238, -2 }, /* (197) cmd ::= SHOW QUERIES */ - { 238, -2 }, /* (198) cmd ::= SHOW SCORES */ - { 238, -2 }, /* (199) cmd ::= SHOW TOPICS */ - { 238, -2 }, /* (200) cmd ::= SHOW VARIABLES */ - { 238, -2 }, /* (201) cmd ::= SHOW BNODES */ - { 238, -2 }, /* (202) cmd ::= SHOW SNODES */ - { 238, -2 }, /* (203) cmd ::= SHOW CLUSTER */ - { 238, -2 }, /* (204) cmd ::= SHOW TRANSACTIONS */ - { 282, 0 }, /* (205) db_name_cond_opt ::= */ - { 282, -2 }, /* (206) db_name_cond_opt ::= db_name NK_DOT */ - { 283, 0 }, /* (207) like_pattern_opt ::= */ - { 283, -2 }, /* (208) like_pattern_opt ::= LIKE NK_STRING */ - { 284, -1 }, /* (209) table_name_cond ::= table_name */ - { 285, 0 }, /* (210) from_db_opt ::= */ - { 285, -2 }, /* (211) from_db_opt ::= FROM db_name */ - { 279, -1 }, /* (212) func_name_list ::= func_name */ - { 279, -3 }, /* (213) func_name_list ::= func_name_list NK_COMMA func_name */ - { 286, -1 }, /* (214) func_name ::= function_name */ - { 238, -8 }, /* (215) cmd ::= CREATE SMA INDEX not_exists_opt index_name ON table_name index_options */ - { 238, -10 }, /* (216) cmd ::= CREATE FULLTEXT INDEX not_exists_opt index_name ON table_name NK_LP col_name_list NK_RP */ - { 238, -6 }, /* (217) cmd ::= DROP INDEX exists_opt index_name ON table_name */ - { 289, 0 }, /* (218) index_options ::= */ - { 289, -9 }, /* (219) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt */ - { 289, -11 }, /* (220) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt */ - { 290, -1 }, /* (221) func_list ::= func */ - { 290, -3 }, /* (222) func_list ::= func_list NK_COMMA func */ - { 293, -4 }, /* (223) func ::= function_name NK_LP expression_list NK_RP */ - { 238, -6 }, /* (224) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_expression */ - { 238, -7 }, /* (225) cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name */ - { 238, -7 }, /* (226) cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name */ - { 238, -4 }, /* (227) cmd ::= DROP TOPIC exists_opt topic_name */ - { 238, -6 }, /* (228) cmd ::= DROP CGROUP exists_opt cgroup_name ON topic_name */ - { 238, -2 }, /* (229) cmd ::= DESC full_table_name */ - { 238, -2 }, /* (230) cmd ::= DESCRIBE full_table_name */ - { 238, -3 }, /* (231) cmd ::= RESET QUERY CACHE */ - { 238, -4 }, /* (232) cmd ::= EXPLAIN analyze_opt explain_options query_expression */ - { 298, 0 }, /* (233) analyze_opt ::= */ - { 298, -1 }, /* (234) analyze_opt ::= ANALYZE */ - { 299, 0 }, /* (235) explain_options ::= */ - { 299, -3 }, /* (236) explain_options ::= explain_options VERBOSE NK_BOOL */ - { 299, -3 }, /* (237) explain_options ::= explain_options RATIO NK_FLOAT */ - { 238, -6 }, /* (238) cmd ::= COMPACT VNODES IN NK_LP integer_list NK_RP */ - { 238, -10 }, /* (239) cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt */ - { 238, -4 }, /* (240) cmd ::= DROP FUNCTION exists_opt function_name */ - { 300, 0 }, /* (241) agg_func_opt ::= */ - { 300, -1 }, /* (242) agg_func_opt ::= AGGREGATE */ - { 301, 0 }, /* (243) bufsize_opt ::= */ - { 301, -2 }, /* (244) bufsize_opt ::= BUFSIZE NK_INTEGER */ - { 238, -8 }, /* (245) cmd ::= CREATE STREAM not_exists_opt stream_name stream_options into_opt AS query_expression */ - { 238, -4 }, /* (246) cmd ::= DROP STREAM exists_opt stream_name */ - { 304, 0 }, /* (247) into_opt ::= */ - { 304, -2 }, /* (248) into_opt ::= INTO full_table_name */ - { 303, 0 }, /* (249) stream_options ::= */ - { 303, -3 }, /* (250) stream_options ::= stream_options TRIGGER AT_ONCE */ - { 303, -3 }, /* (251) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ - { 303, -3 }, /* (252) stream_options ::= stream_options WATERMARK duration_literal */ - { 238, -3 }, /* (253) cmd ::= KILL CONNECTION NK_INTEGER */ - { 238, -3 }, /* (254) cmd ::= KILL QUERY NK_INTEGER */ - { 238, -3 }, /* (255) cmd ::= KILL TRANSACTION NK_INTEGER */ - { 238, -4 }, /* (256) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ - { 238, -4 }, /* (257) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ - { 238, -3 }, /* (258) cmd ::= SPLIT VGROUP NK_INTEGER */ - { 305, -2 }, /* (259) dnode_list ::= DNODE NK_INTEGER */ - { 305, -3 }, /* (260) dnode_list ::= dnode_list DNODE NK_INTEGER */ - { 238, -3 }, /* (261) cmd ::= SYNCDB db_name REPLICA */ - { 238, -1 }, /* (262) cmd ::= query_expression */ - { 241, -1 }, /* (263) literal ::= NK_INTEGER */ - { 241, -1 }, /* (264) literal ::= NK_FLOAT */ - { 241, -1 }, /* (265) literal ::= NK_STRING */ - { 241, -1 }, /* (266) literal ::= NK_BOOL */ - { 241, -2 }, /* (267) literal ::= TIMESTAMP NK_STRING */ - { 241, -1 }, /* (268) literal ::= duration_literal */ - { 241, -1 }, /* (269) literal ::= NULL */ - { 241, -1 }, /* (270) literal ::= NK_QUESTION */ - { 291, -1 }, /* (271) duration_literal ::= NK_VARIABLE */ - { 306, -1 }, /* (272) signed ::= NK_INTEGER */ - { 306, -2 }, /* (273) signed ::= NK_PLUS NK_INTEGER */ - { 306, -2 }, /* (274) signed ::= NK_MINUS NK_INTEGER */ - { 306, -1 }, /* (275) signed ::= NK_FLOAT */ - { 306, -2 }, /* (276) signed ::= NK_PLUS NK_FLOAT */ - { 306, -2 }, /* (277) signed ::= NK_MINUS NK_FLOAT */ - { 271, -1 }, /* (278) signed_literal ::= signed */ - { 271, -1 }, /* (279) signed_literal ::= NK_STRING */ - { 271, -1 }, /* (280) signed_literal ::= NK_BOOL */ - { 271, -2 }, /* (281) signed_literal ::= TIMESTAMP NK_STRING */ - { 271, -1 }, /* (282) signed_literal ::= duration_literal */ - { 271, -1 }, /* (283) signed_literal ::= NULL */ - { 271, -1 }, /* (284) signed_literal ::= literal_func */ - { 274, -1 }, /* (285) literal_list ::= signed_literal */ - { 274, -3 }, /* (286) literal_list ::= literal_list NK_COMMA signed_literal */ - { 248, -1 }, /* (287) db_name ::= NK_ID */ - { 277, -1 }, /* (288) table_name ::= NK_ID */ - { 269, -1 }, /* (289) column_name ::= NK_ID */ - { 287, -1 }, /* (290) function_name ::= NK_ID */ - { 308, -1 }, /* (291) table_alias ::= NK_ID */ - { 309, -1 }, /* (292) column_alias ::= NK_ID */ - { 243, -1 }, /* (293) user_name ::= NK_ID */ - { 288, -1 }, /* (294) index_name ::= NK_ID */ - { 295, -1 }, /* (295) topic_name ::= NK_ID */ - { 302, -1 }, /* (296) stream_name ::= NK_ID */ - { 297, -1 }, /* (297) cgroup_name ::= NK_ID */ - { 310, -1 }, /* (298) expression ::= literal */ - { 310, -1 }, /* (299) expression ::= pseudo_column */ - { 310, -1 }, /* (300) expression ::= column_reference */ - { 310, -1 }, /* (301) expression ::= function_expression */ - { 310, -1 }, /* (302) expression ::= subquery */ - { 310, -3 }, /* (303) expression ::= NK_LP expression NK_RP */ - { 310, -2 }, /* (304) expression ::= NK_PLUS expression */ - { 310, -2 }, /* (305) expression ::= NK_MINUS expression */ - { 310, -3 }, /* (306) expression ::= expression NK_PLUS expression */ - { 310, -3 }, /* (307) expression ::= expression NK_MINUS expression */ - { 310, -3 }, /* (308) expression ::= expression NK_STAR expression */ - { 310, -3 }, /* (309) expression ::= expression NK_SLASH expression */ - { 310, -3 }, /* (310) expression ::= expression NK_REM expression */ - { 310, -3 }, /* (311) expression ::= column_reference NK_ARROW NK_STRING */ - { 294, -1 }, /* (312) expression_list ::= expression */ - { 294, -3 }, /* (313) expression_list ::= expression_list NK_COMMA expression */ - { 312, -1 }, /* (314) column_reference ::= column_name */ - { 312, -3 }, /* (315) column_reference ::= table_name NK_DOT column_name */ - { 311, -1 }, /* (316) pseudo_column ::= ROWTS */ - { 311, -1 }, /* (317) pseudo_column ::= TBNAME */ - { 311, -3 }, /* (318) pseudo_column ::= table_name NK_DOT TBNAME */ - { 311, -1 }, /* (319) pseudo_column ::= QSTARTTS */ - { 311, -1 }, /* (320) pseudo_column ::= QENDTS */ - { 311, -1 }, /* (321) pseudo_column ::= WSTARTTS */ - { 311, -1 }, /* (322) pseudo_column ::= WENDTS */ - { 311, -1 }, /* (323) pseudo_column ::= WDURATION */ - { 313, -4 }, /* (324) function_expression ::= function_name NK_LP expression_list NK_RP */ - { 313, -4 }, /* (325) function_expression ::= star_func NK_LP star_func_para_list NK_RP */ - { 313, -6 }, /* (326) function_expression ::= CAST NK_LP expression AS type_name NK_RP */ - { 313, -1 }, /* (327) function_expression ::= literal_func */ - { 307, -3 }, /* (328) literal_func ::= noarg_func NK_LP NK_RP */ - { 307, -1 }, /* (329) literal_func ::= NOW */ - { 317, -1 }, /* (330) noarg_func ::= NOW */ - { 317, -1 }, /* (331) noarg_func ::= TODAY */ - { 317, -1 }, /* (332) noarg_func ::= TIMEZONE */ - { 315, -1 }, /* (333) star_func ::= COUNT */ - { 315, -1 }, /* (334) star_func ::= FIRST */ - { 315, -1 }, /* (335) star_func ::= LAST */ - { 315, -1 }, /* (336) star_func ::= LAST_ROW */ - { 316, -1 }, /* (337) star_func_para_list ::= NK_STAR */ - { 316, -1 }, /* (338) star_func_para_list ::= other_para_list */ - { 318, -1 }, /* (339) other_para_list ::= star_func_para */ - { 318, -3 }, /* (340) other_para_list ::= other_para_list NK_COMMA star_func_para */ - { 319, -1 }, /* (341) star_func_para ::= expression */ - { 319, -3 }, /* (342) star_func_para ::= table_name NK_DOT NK_STAR */ - { 320, -3 }, /* (343) predicate ::= expression compare_op expression */ - { 320, -5 }, /* (344) predicate ::= expression BETWEEN expression AND expression */ - { 320, -6 }, /* (345) predicate ::= expression NOT BETWEEN expression AND expression */ - { 320, -3 }, /* (346) predicate ::= expression IS NULL */ - { 320, -4 }, /* (347) predicate ::= expression IS NOT NULL */ - { 320, -3 }, /* (348) predicate ::= expression in_op in_predicate_value */ - { 321, -1 }, /* (349) compare_op ::= NK_LT */ - { 321, -1 }, /* (350) compare_op ::= NK_GT */ - { 321, -1 }, /* (351) compare_op ::= NK_LE */ - { 321, -1 }, /* (352) compare_op ::= NK_GE */ - { 321, -1 }, /* (353) compare_op ::= NK_NE */ - { 321, -1 }, /* (354) compare_op ::= NK_EQ */ - { 321, -1 }, /* (355) compare_op ::= LIKE */ - { 321, -2 }, /* (356) compare_op ::= NOT LIKE */ - { 321, -1 }, /* (357) compare_op ::= MATCH */ - { 321, -1 }, /* (358) compare_op ::= NMATCH */ - { 321, -1 }, /* (359) compare_op ::= CONTAINS */ - { 322, -1 }, /* (360) in_op ::= IN */ - { 322, -2 }, /* (361) in_op ::= NOT IN */ - { 323, -3 }, /* (362) in_predicate_value ::= NK_LP expression_list NK_RP */ - { 324, -1 }, /* (363) boolean_value_expression ::= boolean_primary */ - { 324, -2 }, /* (364) boolean_value_expression ::= NOT boolean_primary */ - { 324, -3 }, /* (365) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ - { 324, -3 }, /* (366) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ - { 325, -1 }, /* (367) boolean_primary ::= predicate */ - { 325, -3 }, /* (368) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ - { 326, -1 }, /* (369) common_expression ::= expression */ - { 326, -1 }, /* (370) common_expression ::= boolean_value_expression */ - { 327, -2 }, /* (371) from_clause ::= FROM table_reference_list */ - { 328, -1 }, /* (372) table_reference_list ::= table_reference */ - { 328, -3 }, /* (373) table_reference_list ::= table_reference_list NK_COMMA table_reference */ - { 329, -1 }, /* (374) table_reference ::= table_primary */ - { 329, -1 }, /* (375) table_reference ::= joined_table */ - { 330, -2 }, /* (376) table_primary ::= table_name alias_opt */ - { 330, -4 }, /* (377) table_primary ::= db_name NK_DOT table_name alias_opt */ - { 330, -2 }, /* (378) table_primary ::= subquery alias_opt */ - { 330, -1 }, /* (379) table_primary ::= parenthesized_joined_table */ - { 332, 0 }, /* (380) alias_opt ::= */ - { 332, -1 }, /* (381) alias_opt ::= table_alias */ - { 332, -2 }, /* (382) alias_opt ::= AS table_alias */ - { 333, -3 }, /* (383) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ - { 333, -3 }, /* (384) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ - { 331, -6 }, /* (385) joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ - { 334, 0 }, /* (386) join_type ::= */ - { 334, -1 }, /* (387) join_type ::= INNER */ - { 336, -9 }, /* (388) query_specification ::= SELECT set_quantifier_opt select_list from_clause where_clause_opt partition_by_clause_opt twindow_clause_opt group_by_clause_opt having_clause_opt */ - { 337, 0 }, /* (389) set_quantifier_opt ::= */ - { 337, -1 }, /* (390) set_quantifier_opt ::= DISTINCT */ - { 337, -1 }, /* (391) set_quantifier_opt ::= ALL */ - { 338, -1 }, /* (392) select_list ::= NK_STAR */ - { 338, -1 }, /* (393) select_list ::= select_sublist */ - { 344, -1 }, /* (394) select_sublist ::= select_item */ - { 344, -3 }, /* (395) select_sublist ::= select_sublist NK_COMMA select_item */ - { 345, -1 }, /* (396) select_item ::= common_expression */ - { 345, -2 }, /* (397) select_item ::= common_expression column_alias */ - { 345, -3 }, /* (398) select_item ::= common_expression AS column_alias */ - { 345, -3 }, /* (399) select_item ::= table_name NK_DOT NK_STAR */ - { 339, 0 }, /* (400) where_clause_opt ::= */ - { 339, -2 }, /* (401) where_clause_opt ::= WHERE search_condition */ - { 340, 0 }, /* (402) partition_by_clause_opt ::= */ - { 340, -3 }, /* (403) partition_by_clause_opt ::= PARTITION BY expression_list */ - { 341, 0 }, /* (404) twindow_clause_opt ::= */ - { 341, -6 }, /* (405) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ - { 341, -4 }, /* (406) twindow_clause_opt ::= STATE_WINDOW NK_LP expression NK_RP */ - { 341, -6 }, /* (407) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ - { 341, -8 }, /* (408) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ - { 292, 0 }, /* (409) sliding_opt ::= */ - { 292, -4 }, /* (410) sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ - { 346, 0 }, /* (411) fill_opt ::= */ - { 346, -4 }, /* (412) fill_opt ::= FILL NK_LP fill_mode NK_RP */ - { 346, -6 }, /* (413) fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */ - { 347, -1 }, /* (414) fill_mode ::= NONE */ - { 347, -1 }, /* (415) fill_mode ::= PREV */ - { 347, -1 }, /* (416) fill_mode ::= NULL */ - { 347, -1 }, /* (417) fill_mode ::= LINEAR */ - { 347, -1 }, /* (418) fill_mode ::= NEXT */ - { 342, 0 }, /* (419) group_by_clause_opt ::= */ - { 342, -3 }, /* (420) group_by_clause_opt ::= GROUP BY group_by_list */ - { 348, -1 }, /* (421) group_by_list ::= expression */ - { 348, -3 }, /* (422) group_by_list ::= group_by_list NK_COMMA expression */ - { 343, 0 }, /* (423) having_clause_opt ::= */ - { 343, -2 }, /* (424) having_clause_opt ::= HAVING search_condition */ - { 296, -4 }, /* (425) query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt */ - { 349, -1 }, /* (426) query_expression_body ::= query_primary */ - { 349, -4 }, /* (427) query_expression_body ::= query_expression_body UNION ALL query_expression_body */ - { 349, -3 }, /* (428) query_expression_body ::= query_expression_body UNION query_expression_body */ - { 353, -1 }, /* (429) query_primary ::= query_specification */ - { 353, -6 }, /* (430) query_primary ::= NK_LP query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt NK_RP */ - { 350, 0 }, /* (431) order_by_clause_opt ::= */ - { 350, -3 }, /* (432) order_by_clause_opt ::= ORDER BY sort_specification_list */ - { 351, 0 }, /* (433) slimit_clause_opt ::= */ - { 351, -2 }, /* (434) slimit_clause_opt ::= SLIMIT NK_INTEGER */ - { 351, -4 }, /* (435) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ - { 351, -4 }, /* (436) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - { 352, 0 }, /* (437) limit_clause_opt ::= */ - { 352, -2 }, /* (438) limit_clause_opt ::= LIMIT NK_INTEGER */ - { 352, -4 }, /* (439) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ - { 352, -4 }, /* (440) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - { 314, -3 }, /* (441) subquery ::= NK_LP query_expression NK_RP */ - { 335, -1 }, /* (442) search_condition ::= common_expression */ - { 354, -1 }, /* (443) sort_specification_list ::= sort_specification */ - { 354, -3 }, /* (444) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ - { 355, -3 }, /* (445) sort_specification ::= expression ordering_specification_opt null_ordering_opt */ - { 356, 0 }, /* (446) ordering_specification_opt ::= */ - { 356, -1 }, /* (447) ordering_specification_opt ::= ASC */ - { 356, -1 }, /* (448) ordering_specification_opt ::= DESC */ - { 357, 0 }, /* (449) null_ordering_opt ::= */ - { 357, -2 }, /* (450) null_ordering_opt ::= NULLS FIRST */ - { 357, -2 }, /* (451) null_ordering_opt ::= NULLS LAST */ +/* For rule J, yyRuleInfoLhs[J] contains the symbol on the left-hand side +** of that rule */ +static const YYCODETYPE yyRuleInfoLhs[] = { + 237, /* (0) cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */ + 237, /* (1) cmd ::= ALTER ACCOUNT NK_ID alter_account_options */ + 238, /* (2) account_options ::= */ + 238, /* (3) account_options ::= account_options PPS literal */ + 238, /* (4) account_options ::= account_options TSERIES literal */ + 238, /* (5) account_options ::= account_options STORAGE literal */ + 238, /* (6) account_options ::= account_options STREAMS literal */ + 238, /* (7) account_options ::= account_options QTIME literal */ + 238, /* (8) account_options ::= account_options DBS literal */ + 238, /* (9) account_options ::= account_options USERS literal */ + 238, /* (10) account_options ::= account_options CONNS literal */ + 238, /* (11) account_options ::= account_options STATE literal */ + 239, /* (12) alter_account_options ::= alter_account_option */ + 239, /* (13) alter_account_options ::= alter_account_options alter_account_option */ + 241, /* (14) alter_account_option ::= PASS literal */ + 241, /* (15) alter_account_option ::= PPS literal */ + 241, /* (16) alter_account_option ::= TSERIES literal */ + 241, /* (17) alter_account_option ::= STORAGE literal */ + 241, /* (18) alter_account_option ::= STREAMS literal */ + 241, /* (19) alter_account_option ::= QTIME literal */ + 241, /* (20) alter_account_option ::= DBS literal */ + 241, /* (21) alter_account_option ::= USERS literal */ + 241, /* (22) alter_account_option ::= CONNS literal */ + 241, /* (23) alter_account_option ::= STATE literal */ + 237, /* (24) cmd ::= CREATE USER user_name PASS NK_STRING */ + 237, /* (25) cmd ::= ALTER USER user_name PASS NK_STRING */ + 237, /* (26) cmd ::= ALTER USER user_name PRIVILEGE NK_STRING */ + 237, /* (27) cmd ::= DROP USER user_name */ + 237, /* (28) cmd ::= GRANT privileges ON priv_level TO user_name */ + 237, /* (29) cmd ::= REVOKE privileges ON priv_level FROM user_name */ + 243, /* (30) privileges ::= ALL */ + 243, /* (31) privileges ::= priv_type_list */ + 245, /* (32) priv_type_list ::= priv_type */ + 245, /* (33) priv_type_list ::= priv_type_list NK_COMMA priv_type */ + 246, /* (34) priv_type ::= READ */ + 246, /* (35) priv_type ::= WRITE */ + 244, /* (36) priv_level ::= NK_STAR NK_DOT NK_STAR */ + 244, /* (37) priv_level ::= db_name NK_DOT NK_STAR */ + 237, /* (38) cmd ::= CREATE DNODE dnode_endpoint */ + 237, /* (39) cmd ::= CREATE DNODE dnode_host_name PORT NK_INTEGER */ + 237, /* (40) cmd ::= DROP DNODE NK_INTEGER */ + 237, /* (41) cmd ::= DROP DNODE dnode_endpoint */ + 237, /* (42) cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ + 237, /* (43) cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */ + 237, /* (44) cmd ::= ALTER ALL DNODES NK_STRING */ + 237, /* (45) cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */ + 248, /* (46) dnode_endpoint ::= NK_STRING */ + 249, /* (47) dnode_host_name ::= NK_ID */ + 249, /* (48) dnode_host_name ::= NK_IPTOKEN */ + 237, /* (49) cmd ::= ALTER LOCAL NK_STRING */ + 237, /* (50) cmd ::= ALTER LOCAL NK_STRING NK_STRING */ + 237, /* (51) cmd ::= CREATE QNODE ON DNODE NK_INTEGER */ + 237, /* (52) cmd ::= DROP QNODE ON DNODE NK_INTEGER */ + 237, /* (53) cmd ::= CREATE BNODE ON DNODE NK_INTEGER */ + 237, /* (54) cmd ::= DROP BNODE ON DNODE NK_INTEGER */ + 237, /* (55) cmd ::= CREATE SNODE ON DNODE NK_INTEGER */ + 237, /* (56) cmd ::= DROP SNODE ON DNODE NK_INTEGER */ + 237, /* (57) cmd ::= CREATE MNODE ON DNODE NK_INTEGER */ + 237, /* (58) cmd ::= DROP MNODE ON DNODE NK_INTEGER */ + 237, /* (59) cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ + 237, /* (60) cmd ::= DROP DATABASE exists_opt db_name */ + 237, /* (61) cmd ::= USE db_name */ + 237, /* (62) cmd ::= ALTER DATABASE db_name alter_db_options */ + 250, /* (63) not_exists_opt ::= IF NOT EXISTS */ + 250, /* (64) not_exists_opt ::= */ + 252, /* (65) exists_opt ::= IF EXISTS */ + 252, /* (66) exists_opt ::= */ + 251, /* (67) db_options ::= */ + 251, /* (68) db_options ::= db_options BUFFER NK_INTEGER */ + 251, /* (69) db_options ::= db_options CACHELAST NK_INTEGER */ + 251, /* (70) db_options ::= db_options COMP NK_INTEGER */ + 251, /* (71) db_options ::= db_options DAYS NK_INTEGER */ + 251, /* (72) db_options ::= db_options DAYS NK_VARIABLE */ + 251, /* (73) db_options ::= db_options FSYNC NK_INTEGER */ + 251, /* (74) db_options ::= db_options MAXROWS NK_INTEGER */ + 251, /* (75) db_options ::= db_options MINROWS NK_INTEGER */ + 251, /* (76) db_options ::= db_options KEEP integer_list */ + 251, /* (77) db_options ::= db_options KEEP variable_list */ + 251, /* (78) db_options ::= db_options PAGES NK_INTEGER */ + 251, /* (79) db_options ::= db_options PAGESIZE NK_INTEGER */ + 251, /* (80) db_options ::= db_options PRECISION NK_STRING */ + 251, /* (81) db_options ::= db_options REPLICA NK_INTEGER */ + 251, /* (82) db_options ::= db_options STRICT NK_INTEGER */ + 251, /* (83) db_options ::= db_options WAL NK_INTEGER */ + 251, /* (84) db_options ::= db_options VGROUPS NK_INTEGER */ + 251, /* (85) db_options ::= db_options SINGLE_STABLE NK_INTEGER */ + 251, /* (86) db_options ::= db_options RETENTIONS retention_list */ + 251, /* (87) db_options ::= db_options SCHEMALESS NK_INTEGER */ + 253, /* (88) alter_db_options ::= alter_db_option */ + 253, /* (89) alter_db_options ::= alter_db_options alter_db_option */ + 257, /* (90) alter_db_option ::= BUFFER NK_INTEGER */ + 257, /* (91) alter_db_option ::= CACHELAST NK_INTEGER */ + 257, /* (92) alter_db_option ::= FSYNC NK_INTEGER */ + 257, /* (93) alter_db_option ::= KEEP integer_list */ + 257, /* (94) alter_db_option ::= KEEP variable_list */ + 257, /* (95) alter_db_option ::= PAGES NK_INTEGER */ + 257, /* (96) alter_db_option ::= REPLICA NK_INTEGER */ + 257, /* (97) alter_db_option ::= STRICT NK_INTEGER */ + 257, /* (98) alter_db_option ::= WAL NK_INTEGER */ + 254, /* (99) integer_list ::= NK_INTEGER */ + 254, /* (100) integer_list ::= integer_list NK_COMMA NK_INTEGER */ + 255, /* (101) variable_list ::= NK_VARIABLE */ + 255, /* (102) variable_list ::= variable_list NK_COMMA NK_VARIABLE */ + 256, /* (103) retention_list ::= retention */ + 256, /* (104) retention_list ::= retention_list NK_COMMA retention */ + 258, /* (105) retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ + 237, /* (106) cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ + 237, /* (107) cmd ::= CREATE TABLE multi_create_clause */ + 237, /* (108) cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ + 237, /* (109) cmd ::= DROP TABLE multi_drop_clause */ + 237, /* (110) cmd ::= DROP STABLE exists_opt full_table_name */ + 237, /* (111) cmd ::= ALTER TABLE alter_table_clause */ + 237, /* (112) cmd ::= ALTER STABLE alter_table_clause */ + 266, /* (113) alter_table_clause ::= full_table_name alter_table_options */ + 266, /* (114) alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ + 266, /* (115) alter_table_clause ::= full_table_name DROP COLUMN column_name */ + 266, /* (116) alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ + 266, /* (117) alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ + 266, /* (118) alter_table_clause ::= full_table_name ADD TAG column_name type_name */ + 266, /* (119) alter_table_clause ::= full_table_name DROP TAG column_name */ + 266, /* (120) alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ + 266, /* (121) alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ + 266, /* (122) alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */ + 263, /* (123) multi_create_clause ::= create_subtable_clause */ + 263, /* (124) multi_create_clause ::= multi_create_clause create_subtable_clause */ + 271, /* (125) create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_tags_opt TAGS NK_LP literal_list NK_RP table_options */ + 265, /* (126) multi_drop_clause ::= drop_table_clause */ + 265, /* (127) multi_drop_clause ::= multi_drop_clause drop_table_clause */ + 274, /* (128) drop_table_clause ::= exists_opt full_table_name */ + 272, /* (129) specific_tags_opt ::= */ + 272, /* (130) specific_tags_opt ::= NK_LP col_name_list NK_RP */ + 259, /* (131) full_table_name ::= table_name */ + 259, /* (132) full_table_name ::= db_name NK_DOT table_name */ + 260, /* (133) column_def_list ::= column_def */ + 260, /* (134) column_def_list ::= column_def_list NK_COMMA column_def */ + 277, /* (135) column_def ::= column_name type_name */ + 277, /* (136) column_def ::= column_name type_name COMMENT NK_STRING */ + 269, /* (137) type_name ::= BOOL */ + 269, /* (138) type_name ::= TINYINT */ + 269, /* (139) type_name ::= SMALLINT */ + 269, /* (140) type_name ::= INT */ + 269, /* (141) type_name ::= INTEGER */ + 269, /* (142) type_name ::= BIGINT */ + 269, /* (143) type_name ::= FLOAT */ + 269, /* (144) type_name ::= DOUBLE */ + 269, /* (145) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ + 269, /* (146) type_name ::= TIMESTAMP */ + 269, /* (147) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ + 269, /* (148) type_name ::= TINYINT UNSIGNED */ + 269, /* (149) type_name ::= SMALLINT UNSIGNED */ + 269, /* (150) type_name ::= INT UNSIGNED */ + 269, /* (151) type_name ::= BIGINT UNSIGNED */ + 269, /* (152) type_name ::= JSON */ + 269, /* (153) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ + 269, /* (154) type_name ::= MEDIUMBLOB */ + 269, /* (155) type_name ::= BLOB */ + 269, /* (156) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ + 269, /* (157) type_name ::= DECIMAL */ + 269, /* (158) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ + 269, /* (159) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ + 261, /* (160) tags_def_opt ::= */ + 261, /* (161) tags_def_opt ::= tags_def */ + 264, /* (162) tags_def ::= TAGS NK_LP column_def_list NK_RP */ + 262, /* (163) table_options ::= */ + 262, /* (164) table_options ::= table_options COMMENT NK_STRING */ + 262, /* (165) table_options ::= table_options FILE_FACTOR NK_FLOAT */ + 262, /* (166) table_options ::= table_options ROLLUP NK_LP func_name_list NK_RP */ + 262, /* (167) table_options ::= table_options TTL NK_INTEGER */ + 262, /* (168) table_options ::= table_options SMA NK_LP col_name_list NK_RP */ + 267, /* (169) alter_table_options ::= alter_table_option */ + 267, /* (170) alter_table_options ::= alter_table_options alter_table_option */ + 279, /* (171) alter_table_option ::= COMMENT NK_STRING */ + 279, /* (172) alter_table_option ::= TTL NK_INTEGER */ + 275, /* (173) col_name_list ::= col_name */ + 275, /* (174) col_name_list ::= col_name_list NK_COMMA col_name */ + 280, /* (175) col_name ::= column_name */ + 237, /* (176) cmd ::= SHOW DNODES */ + 237, /* (177) cmd ::= SHOW USERS */ + 237, /* (178) cmd ::= SHOW DATABASES */ + 237, /* (179) cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */ + 237, /* (180) cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ + 237, /* (181) cmd ::= SHOW db_name_cond_opt VGROUPS */ + 237, /* (182) cmd ::= SHOW MNODES */ + 237, /* (183) cmd ::= SHOW MODULES */ + 237, /* (184) cmd ::= SHOW QNODES */ + 237, /* (185) cmd ::= SHOW FUNCTIONS */ + 237, /* (186) cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ + 237, /* (187) cmd ::= SHOW STREAMS */ + 237, /* (188) cmd ::= SHOW ACCOUNTS */ + 237, /* (189) cmd ::= SHOW APPS */ + 237, /* (190) cmd ::= SHOW CONNECTIONS */ + 237, /* (191) cmd ::= SHOW LICENCE */ + 237, /* (192) cmd ::= SHOW GRANTS */ + 237, /* (193) cmd ::= SHOW CREATE DATABASE db_name */ + 237, /* (194) cmd ::= SHOW CREATE TABLE full_table_name */ + 237, /* (195) cmd ::= SHOW CREATE STABLE full_table_name */ + 237, /* (196) cmd ::= SHOW QUERIES */ + 237, /* (197) cmd ::= SHOW SCORES */ + 237, /* (198) cmd ::= SHOW TOPICS */ + 237, /* (199) cmd ::= SHOW VARIABLES */ + 237, /* (200) cmd ::= SHOW BNODES */ + 237, /* (201) cmd ::= SHOW SNODES */ + 237, /* (202) cmd ::= SHOW CLUSTER */ + 237, /* (203) cmd ::= SHOW TRANSACTIONS */ + 281, /* (204) db_name_cond_opt ::= */ + 281, /* (205) db_name_cond_opt ::= db_name NK_DOT */ + 282, /* (206) like_pattern_opt ::= */ + 282, /* (207) like_pattern_opt ::= LIKE NK_STRING */ + 283, /* (208) table_name_cond ::= table_name */ + 284, /* (209) from_db_opt ::= */ + 284, /* (210) from_db_opt ::= FROM db_name */ + 278, /* (211) func_name_list ::= func_name */ + 278, /* (212) func_name_list ::= func_name_list NK_COMMA func_name */ + 285, /* (213) func_name ::= function_name */ + 237, /* (214) cmd ::= CREATE SMA INDEX not_exists_opt index_name ON table_name index_options */ + 237, /* (215) cmd ::= CREATE FULLTEXT INDEX not_exists_opt index_name ON table_name NK_LP col_name_list NK_RP */ + 237, /* (216) cmd ::= DROP INDEX exists_opt index_name ON table_name */ + 288, /* (217) index_options ::= */ + 288, /* (218) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt */ + 288, /* (219) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt */ + 289, /* (220) func_list ::= func */ + 289, /* (221) func_list ::= func_list NK_COMMA func */ + 292, /* (222) func ::= function_name NK_LP expression_list NK_RP */ + 237, /* (223) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_expression */ + 237, /* (224) cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name */ + 237, /* (225) cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name */ + 237, /* (226) cmd ::= DROP TOPIC exists_opt topic_name */ + 237, /* (227) cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ + 237, /* (228) cmd ::= DESC full_table_name */ + 237, /* (229) cmd ::= DESCRIBE full_table_name */ + 237, /* (230) cmd ::= RESET QUERY CACHE */ + 237, /* (231) cmd ::= EXPLAIN analyze_opt explain_options query_expression */ + 297, /* (232) analyze_opt ::= */ + 297, /* (233) analyze_opt ::= ANALYZE */ + 298, /* (234) explain_options ::= */ + 298, /* (235) explain_options ::= explain_options VERBOSE NK_BOOL */ + 298, /* (236) explain_options ::= explain_options RATIO NK_FLOAT */ + 237, /* (237) cmd ::= COMPACT VNODES IN NK_LP integer_list NK_RP */ + 237, /* (238) cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt */ + 237, /* (239) cmd ::= DROP FUNCTION exists_opt function_name */ + 299, /* (240) agg_func_opt ::= */ + 299, /* (241) agg_func_opt ::= AGGREGATE */ + 300, /* (242) bufsize_opt ::= */ + 300, /* (243) bufsize_opt ::= BUFSIZE NK_INTEGER */ + 237, /* (244) cmd ::= CREATE STREAM not_exists_opt stream_name stream_options into_opt AS query_expression */ + 237, /* (245) cmd ::= DROP STREAM exists_opt stream_name */ + 303, /* (246) into_opt ::= */ + 303, /* (247) into_opt ::= INTO full_table_name */ + 302, /* (248) stream_options ::= */ + 302, /* (249) stream_options ::= stream_options TRIGGER AT_ONCE */ + 302, /* (250) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ + 302, /* (251) stream_options ::= stream_options WATERMARK duration_literal */ + 237, /* (252) cmd ::= KILL CONNECTION NK_INTEGER */ + 237, /* (253) cmd ::= KILL QUERY NK_INTEGER */ + 237, /* (254) cmd ::= KILL TRANSACTION NK_INTEGER */ + 237, /* (255) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ + 237, /* (256) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ + 237, /* (257) cmd ::= SPLIT VGROUP NK_INTEGER */ + 304, /* (258) dnode_list ::= DNODE NK_INTEGER */ + 304, /* (259) dnode_list ::= dnode_list DNODE NK_INTEGER */ + 237, /* (260) cmd ::= SYNCDB db_name REPLICA */ + 237, /* (261) cmd ::= query_expression */ + 240, /* (262) literal ::= NK_INTEGER */ + 240, /* (263) literal ::= NK_FLOAT */ + 240, /* (264) literal ::= NK_STRING */ + 240, /* (265) literal ::= NK_BOOL */ + 240, /* (266) literal ::= TIMESTAMP NK_STRING */ + 240, /* (267) literal ::= duration_literal */ + 240, /* (268) literal ::= NULL */ + 240, /* (269) literal ::= NK_QUESTION */ + 290, /* (270) duration_literal ::= NK_VARIABLE */ + 305, /* (271) signed ::= NK_INTEGER */ + 305, /* (272) signed ::= NK_PLUS NK_INTEGER */ + 305, /* (273) signed ::= NK_MINUS NK_INTEGER */ + 305, /* (274) signed ::= NK_FLOAT */ + 305, /* (275) signed ::= NK_PLUS NK_FLOAT */ + 305, /* (276) signed ::= NK_MINUS NK_FLOAT */ + 270, /* (277) signed_literal ::= signed */ + 270, /* (278) signed_literal ::= NK_STRING */ + 270, /* (279) signed_literal ::= NK_BOOL */ + 270, /* (280) signed_literal ::= TIMESTAMP NK_STRING */ + 270, /* (281) signed_literal ::= duration_literal */ + 270, /* (282) signed_literal ::= NULL */ + 270, /* (283) signed_literal ::= literal_func */ + 273, /* (284) literal_list ::= signed_literal */ + 273, /* (285) literal_list ::= literal_list NK_COMMA signed_literal */ + 247, /* (286) db_name ::= NK_ID */ + 276, /* (287) table_name ::= NK_ID */ + 268, /* (288) column_name ::= NK_ID */ + 286, /* (289) function_name ::= NK_ID */ + 307, /* (290) table_alias ::= NK_ID */ + 308, /* (291) column_alias ::= NK_ID */ + 242, /* (292) user_name ::= NK_ID */ + 287, /* (293) index_name ::= NK_ID */ + 294, /* (294) topic_name ::= NK_ID */ + 301, /* (295) stream_name ::= NK_ID */ + 296, /* (296) cgroup_name ::= NK_ID */ + 309, /* (297) expression ::= literal */ + 309, /* (298) expression ::= pseudo_column */ + 309, /* (299) expression ::= column_reference */ + 309, /* (300) expression ::= function_expression */ + 309, /* (301) expression ::= subquery */ + 309, /* (302) expression ::= NK_LP expression NK_RP */ + 309, /* (303) expression ::= NK_PLUS expression */ + 309, /* (304) expression ::= NK_MINUS expression */ + 309, /* (305) expression ::= expression NK_PLUS expression */ + 309, /* (306) expression ::= expression NK_MINUS expression */ + 309, /* (307) expression ::= expression NK_STAR expression */ + 309, /* (308) expression ::= expression NK_SLASH expression */ + 309, /* (309) expression ::= expression NK_REM expression */ + 309, /* (310) expression ::= column_reference NK_ARROW NK_STRING */ + 293, /* (311) expression_list ::= expression */ + 293, /* (312) expression_list ::= expression_list NK_COMMA expression */ + 311, /* (313) column_reference ::= column_name */ + 311, /* (314) column_reference ::= table_name NK_DOT column_name */ + 310, /* (315) pseudo_column ::= ROWTS */ + 310, /* (316) pseudo_column ::= TBNAME */ + 310, /* (317) pseudo_column ::= table_name NK_DOT TBNAME */ + 310, /* (318) pseudo_column ::= QSTARTTS */ + 310, /* (319) pseudo_column ::= QENDTS */ + 310, /* (320) pseudo_column ::= WSTARTTS */ + 310, /* (321) pseudo_column ::= WENDTS */ + 310, /* (322) pseudo_column ::= WDURATION */ + 312, /* (323) function_expression ::= function_name NK_LP expression_list NK_RP */ + 312, /* (324) function_expression ::= star_func NK_LP star_func_para_list NK_RP */ + 312, /* (325) function_expression ::= CAST NK_LP expression AS type_name NK_RP */ + 312, /* (326) function_expression ::= literal_func */ + 306, /* (327) literal_func ::= noarg_func NK_LP NK_RP */ + 306, /* (328) literal_func ::= NOW */ + 316, /* (329) noarg_func ::= NOW */ + 316, /* (330) noarg_func ::= TODAY */ + 316, /* (331) noarg_func ::= TIMEZONE */ + 314, /* (332) star_func ::= COUNT */ + 314, /* (333) star_func ::= FIRST */ + 314, /* (334) star_func ::= LAST */ + 314, /* (335) star_func ::= LAST_ROW */ + 315, /* (336) star_func_para_list ::= NK_STAR */ + 315, /* (337) star_func_para_list ::= other_para_list */ + 317, /* (338) other_para_list ::= star_func_para */ + 317, /* (339) other_para_list ::= other_para_list NK_COMMA star_func_para */ + 318, /* (340) star_func_para ::= expression */ + 318, /* (341) star_func_para ::= table_name NK_DOT NK_STAR */ + 319, /* (342) predicate ::= expression compare_op expression */ + 319, /* (343) predicate ::= expression BETWEEN expression AND expression */ + 319, /* (344) predicate ::= expression NOT BETWEEN expression AND expression */ + 319, /* (345) predicate ::= expression IS NULL */ + 319, /* (346) predicate ::= expression IS NOT NULL */ + 319, /* (347) predicate ::= expression in_op in_predicate_value */ + 320, /* (348) compare_op ::= NK_LT */ + 320, /* (349) compare_op ::= NK_GT */ + 320, /* (350) compare_op ::= NK_LE */ + 320, /* (351) compare_op ::= NK_GE */ + 320, /* (352) compare_op ::= NK_NE */ + 320, /* (353) compare_op ::= NK_EQ */ + 320, /* (354) compare_op ::= LIKE */ + 320, /* (355) compare_op ::= NOT LIKE */ + 320, /* (356) compare_op ::= MATCH */ + 320, /* (357) compare_op ::= NMATCH */ + 320, /* (358) compare_op ::= CONTAINS */ + 321, /* (359) in_op ::= IN */ + 321, /* (360) in_op ::= NOT IN */ + 322, /* (361) in_predicate_value ::= NK_LP expression_list NK_RP */ + 323, /* (362) boolean_value_expression ::= boolean_primary */ + 323, /* (363) boolean_value_expression ::= NOT boolean_primary */ + 323, /* (364) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ + 323, /* (365) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ + 324, /* (366) boolean_primary ::= predicate */ + 324, /* (367) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ + 325, /* (368) common_expression ::= expression */ + 325, /* (369) common_expression ::= boolean_value_expression */ + 326, /* (370) from_clause ::= FROM table_reference_list */ + 327, /* (371) table_reference_list ::= table_reference */ + 327, /* (372) table_reference_list ::= table_reference_list NK_COMMA table_reference */ + 328, /* (373) table_reference ::= table_primary */ + 328, /* (374) table_reference ::= joined_table */ + 329, /* (375) table_primary ::= table_name alias_opt */ + 329, /* (376) table_primary ::= db_name NK_DOT table_name alias_opt */ + 329, /* (377) table_primary ::= subquery alias_opt */ + 329, /* (378) table_primary ::= parenthesized_joined_table */ + 331, /* (379) alias_opt ::= */ + 331, /* (380) alias_opt ::= table_alias */ + 331, /* (381) alias_opt ::= AS table_alias */ + 332, /* (382) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ + 332, /* (383) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ + 330, /* (384) joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ + 333, /* (385) join_type ::= */ + 333, /* (386) join_type ::= INNER */ + 335, /* (387) query_specification ::= SELECT set_quantifier_opt select_list from_clause where_clause_opt partition_by_clause_opt twindow_clause_opt group_by_clause_opt having_clause_opt */ + 336, /* (388) set_quantifier_opt ::= */ + 336, /* (389) set_quantifier_opt ::= DISTINCT */ + 336, /* (390) set_quantifier_opt ::= ALL */ + 337, /* (391) select_list ::= NK_STAR */ + 337, /* (392) select_list ::= select_sublist */ + 343, /* (393) select_sublist ::= select_item */ + 343, /* (394) select_sublist ::= select_sublist NK_COMMA select_item */ + 344, /* (395) select_item ::= common_expression */ + 344, /* (396) select_item ::= common_expression column_alias */ + 344, /* (397) select_item ::= common_expression AS column_alias */ + 344, /* (398) select_item ::= table_name NK_DOT NK_STAR */ + 338, /* (399) where_clause_opt ::= */ + 338, /* (400) where_clause_opt ::= WHERE search_condition */ + 339, /* (401) partition_by_clause_opt ::= */ + 339, /* (402) partition_by_clause_opt ::= PARTITION BY expression_list */ + 340, /* (403) twindow_clause_opt ::= */ + 340, /* (404) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ + 340, /* (405) twindow_clause_opt ::= STATE_WINDOW NK_LP expression NK_RP */ + 340, /* (406) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ + 340, /* (407) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ + 291, /* (408) sliding_opt ::= */ + 291, /* (409) sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ + 345, /* (410) fill_opt ::= */ + 345, /* (411) fill_opt ::= FILL NK_LP fill_mode NK_RP */ + 345, /* (412) fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */ + 346, /* (413) fill_mode ::= NONE */ + 346, /* (414) fill_mode ::= PREV */ + 346, /* (415) fill_mode ::= NULL */ + 346, /* (416) fill_mode ::= LINEAR */ + 346, /* (417) fill_mode ::= NEXT */ + 341, /* (418) group_by_clause_opt ::= */ + 341, /* (419) group_by_clause_opt ::= GROUP BY group_by_list */ + 347, /* (420) group_by_list ::= expression */ + 347, /* (421) group_by_list ::= group_by_list NK_COMMA expression */ + 342, /* (422) having_clause_opt ::= */ + 342, /* (423) having_clause_opt ::= HAVING search_condition */ + 295, /* (424) query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt */ + 348, /* (425) query_expression_body ::= query_primary */ + 348, /* (426) query_expression_body ::= query_expression_body UNION ALL query_expression_body */ + 348, /* (427) query_expression_body ::= query_expression_body UNION query_expression_body */ + 352, /* (428) query_primary ::= query_specification */ + 352, /* (429) query_primary ::= NK_LP query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt NK_RP */ + 349, /* (430) order_by_clause_opt ::= */ + 349, /* (431) order_by_clause_opt ::= ORDER BY sort_specification_list */ + 350, /* (432) slimit_clause_opt ::= */ + 350, /* (433) slimit_clause_opt ::= SLIMIT NK_INTEGER */ + 350, /* (434) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ + 350, /* (435) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + 351, /* (436) limit_clause_opt ::= */ + 351, /* (437) limit_clause_opt ::= LIMIT NK_INTEGER */ + 351, /* (438) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ + 351, /* (439) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + 313, /* (440) subquery ::= NK_LP query_expression NK_RP */ + 334, /* (441) search_condition ::= common_expression */ + 353, /* (442) sort_specification_list ::= sort_specification */ + 353, /* (443) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ + 354, /* (444) sort_specification ::= expression ordering_specification_opt null_ordering_opt */ + 355, /* (445) ordering_specification_opt ::= */ + 355, /* (446) ordering_specification_opt ::= ASC */ + 355, /* (447) ordering_specification_opt ::= DESC */ + 356, /* (448) null_ordering_opt ::= */ + 356, /* (449) null_ordering_opt ::= NULLS FIRST */ + 356, /* (450) null_ordering_opt ::= NULLS LAST */ +}; + +/* For rule J, yyRuleInfoNRhs[J] contains the negative of the number +** of symbols on the right-hand side of that rule. */ +static const signed char yyRuleInfoNRhs[] = { + -6, /* (0) cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */ + -4, /* (1) cmd ::= ALTER ACCOUNT NK_ID alter_account_options */ + 0, /* (2) account_options ::= */ + -3, /* (3) account_options ::= account_options PPS literal */ + -3, /* (4) account_options ::= account_options TSERIES literal */ + -3, /* (5) account_options ::= account_options STORAGE literal */ + -3, /* (6) account_options ::= account_options STREAMS literal */ + -3, /* (7) account_options ::= account_options QTIME literal */ + -3, /* (8) account_options ::= account_options DBS literal */ + -3, /* (9) account_options ::= account_options USERS literal */ + -3, /* (10) account_options ::= account_options CONNS literal */ + -3, /* (11) account_options ::= account_options STATE literal */ + -1, /* (12) alter_account_options ::= alter_account_option */ + -2, /* (13) alter_account_options ::= alter_account_options alter_account_option */ + -2, /* (14) alter_account_option ::= PASS literal */ + -2, /* (15) alter_account_option ::= PPS literal */ + -2, /* (16) alter_account_option ::= TSERIES literal */ + -2, /* (17) alter_account_option ::= STORAGE literal */ + -2, /* (18) alter_account_option ::= STREAMS literal */ + -2, /* (19) alter_account_option ::= QTIME literal */ + -2, /* (20) alter_account_option ::= DBS literal */ + -2, /* (21) alter_account_option ::= USERS literal */ + -2, /* (22) alter_account_option ::= CONNS literal */ + -2, /* (23) alter_account_option ::= STATE literal */ + -5, /* (24) cmd ::= CREATE USER user_name PASS NK_STRING */ + -5, /* (25) cmd ::= ALTER USER user_name PASS NK_STRING */ + -5, /* (26) cmd ::= ALTER USER user_name PRIVILEGE NK_STRING */ + -3, /* (27) cmd ::= DROP USER user_name */ + -6, /* (28) cmd ::= GRANT privileges ON priv_level TO user_name */ + -6, /* (29) cmd ::= REVOKE privileges ON priv_level FROM user_name */ + -1, /* (30) privileges ::= ALL */ + -1, /* (31) privileges ::= priv_type_list */ + -1, /* (32) priv_type_list ::= priv_type */ + -3, /* (33) priv_type_list ::= priv_type_list NK_COMMA priv_type */ + -1, /* (34) priv_type ::= READ */ + -1, /* (35) priv_type ::= WRITE */ + -3, /* (36) priv_level ::= NK_STAR NK_DOT NK_STAR */ + -3, /* (37) priv_level ::= db_name NK_DOT NK_STAR */ + -3, /* (38) cmd ::= CREATE DNODE dnode_endpoint */ + -5, /* (39) cmd ::= CREATE DNODE dnode_host_name PORT NK_INTEGER */ + -3, /* (40) cmd ::= DROP DNODE NK_INTEGER */ + -3, /* (41) cmd ::= DROP DNODE dnode_endpoint */ + -4, /* (42) cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ + -5, /* (43) cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */ + -4, /* (44) cmd ::= ALTER ALL DNODES NK_STRING */ + -5, /* (45) cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */ + -1, /* (46) dnode_endpoint ::= NK_STRING */ + -1, /* (47) dnode_host_name ::= NK_ID */ + -1, /* (48) dnode_host_name ::= NK_IPTOKEN */ + -3, /* (49) cmd ::= ALTER LOCAL NK_STRING */ + -4, /* (50) cmd ::= ALTER LOCAL NK_STRING NK_STRING */ + -5, /* (51) cmd ::= CREATE QNODE ON DNODE NK_INTEGER */ + -5, /* (52) cmd ::= DROP QNODE ON DNODE NK_INTEGER */ + -5, /* (53) cmd ::= CREATE BNODE ON DNODE NK_INTEGER */ + -5, /* (54) cmd ::= DROP BNODE ON DNODE NK_INTEGER */ + -5, /* (55) cmd ::= CREATE SNODE ON DNODE NK_INTEGER */ + -5, /* (56) cmd ::= DROP SNODE ON DNODE NK_INTEGER */ + -5, /* (57) cmd ::= CREATE MNODE ON DNODE NK_INTEGER */ + -5, /* (58) cmd ::= DROP MNODE ON DNODE NK_INTEGER */ + -5, /* (59) cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ + -4, /* (60) cmd ::= DROP DATABASE exists_opt db_name */ + -2, /* (61) cmd ::= USE db_name */ + -4, /* (62) cmd ::= ALTER DATABASE db_name alter_db_options */ + -3, /* (63) not_exists_opt ::= IF NOT EXISTS */ + 0, /* (64) not_exists_opt ::= */ + -2, /* (65) exists_opt ::= IF EXISTS */ + 0, /* (66) exists_opt ::= */ + 0, /* (67) db_options ::= */ + -3, /* (68) db_options ::= db_options BUFFER NK_INTEGER */ + -3, /* (69) db_options ::= db_options CACHELAST NK_INTEGER */ + -3, /* (70) db_options ::= db_options COMP NK_INTEGER */ + -3, /* (71) db_options ::= db_options DAYS NK_INTEGER */ + -3, /* (72) db_options ::= db_options DAYS NK_VARIABLE */ + -3, /* (73) db_options ::= db_options FSYNC NK_INTEGER */ + -3, /* (74) db_options ::= db_options MAXROWS NK_INTEGER */ + -3, /* (75) db_options ::= db_options MINROWS NK_INTEGER */ + -3, /* (76) db_options ::= db_options KEEP integer_list */ + -3, /* (77) db_options ::= db_options KEEP variable_list */ + -3, /* (78) db_options ::= db_options PAGES NK_INTEGER */ + -3, /* (79) db_options ::= db_options PAGESIZE NK_INTEGER */ + -3, /* (80) db_options ::= db_options PRECISION NK_STRING */ + -3, /* (81) db_options ::= db_options REPLICA NK_INTEGER */ + -3, /* (82) db_options ::= db_options STRICT NK_INTEGER */ + -3, /* (83) db_options ::= db_options WAL NK_INTEGER */ + -3, /* (84) db_options ::= db_options VGROUPS NK_INTEGER */ + -3, /* (85) db_options ::= db_options SINGLE_STABLE NK_INTEGER */ + -3, /* (86) db_options ::= db_options RETENTIONS retention_list */ + -3, /* (87) db_options ::= db_options SCHEMALESS NK_INTEGER */ + -1, /* (88) alter_db_options ::= alter_db_option */ + -2, /* (89) alter_db_options ::= alter_db_options alter_db_option */ + -2, /* (90) alter_db_option ::= BUFFER NK_INTEGER */ + -2, /* (91) alter_db_option ::= CACHELAST NK_INTEGER */ + -2, /* (92) alter_db_option ::= FSYNC NK_INTEGER */ + -2, /* (93) alter_db_option ::= KEEP integer_list */ + -2, /* (94) alter_db_option ::= KEEP variable_list */ + -2, /* (95) alter_db_option ::= PAGES NK_INTEGER */ + -2, /* (96) alter_db_option ::= REPLICA NK_INTEGER */ + -2, /* (97) alter_db_option ::= STRICT NK_INTEGER */ + -2, /* (98) alter_db_option ::= WAL NK_INTEGER */ + -1, /* (99) integer_list ::= NK_INTEGER */ + -3, /* (100) integer_list ::= integer_list NK_COMMA NK_INTEGER */ + -1, /* (101) variable_list ::= NK_VARIABLE */ + -3, /* (102) variable_list ::= variable_list NK_COMMA NK_VARIABLE */ + -1, /* (103) retention_list ::= retention */ + -3, /* (104) retention_list ::= retention_list NK_COMMA retention */ + -3, /* (105) retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ + -9, /* (106) cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ + -3, /* (107) cmd ::= CREATE TABLE multi_create_clause */ + -9, /* (108) cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ + -3, /* (109) cmd ::= DROP TABLE multi_drop_clause */ + -4, /* (110) cmd ::= DROP STABLE exists_opt full_table_name */ + -3, /* (111) cmd ::= ALTER TABLE alter_table_clause */ + -3, /* (112) cmd ::= ALTER STABLE alter_table_clause */ + -2, /* (113) alter_table_clause ::= full_table_name alter_table_options */ + -5, /* (114) alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ + -4, /* (115) alter_table_clause ::= full_table_name DROP COLUMN column_name */ + -5, /* (116) alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ + -5, /* (117) alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ + -5, /* (118) alter_table_clause ::= full_table_name ADD TAG column_name type_name */ + -4, /* (119) alter_table_clause ::= full_table_name DROP TAG column_name */ + -5, /* (120) alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ + -5, /* (121) alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ + -6, /* (122) alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */ + -1, /* (123) multi_create_clause ::= create_subtable_clause */ + -2, /* (124) multi_create_clause ::= multi_create_clause create_subtable_clause */ + -10, /* (125) create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_tags_opt TAGS NK_LP literal_list NK_RP table_options */ + -1, /* (126) multi_drop_clause ::= drop_table_clause */ + -2, /* (127) multi_drop_clause ::= multi_drop_clause drop_table_clause */ + -2, /* (128) drop_table_clause ::= exists_opt full_table_name */ + 0, /* (129) specific_tags_opt ::= */ + -3, /* (130) specific_tags_opt ::= NK_LP col_name_list NK_RP */ + -1, /* (131) full_table_name ::= table_name */ + -3, /* (132) full_table_name ::= db_name NK_DOT table_name */ + -1, /* (133) column_def_list ::= column_def */ + -3, /* (134) column_def_list ::= column_def_list NK_COMMA column_def */ + -2, /* (135) column_def ::= column_name type_name */ + -4, /* (136) column_def ::= column_name type_name COMMENT NK_STRING */ + -1, /* (137) type_name ::= BOOL */ + -1, /* (138) type_name ::= TINYINT */ + -1, /* (139) type_name ::= SMALLINT */ + -1, /* (140) type_name ::= INT */ + -1, /* (141) type_name ::= INTEGER */ + -1, /* (142) type_name ::= BIGINT */ + -1, /* (143) type_name ::= FLOAT */ + -1, /* (144) type_name ::= DOUBLE */ + -4, /* (145) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ + -1, /* (146) type_name ::= TIMESTAMP */ + -4, /* (147) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ + -2, /* (148) type_name ::= TINYINT UNSIGNED */ + -2, /* (149) type_name ::= SMALLINT UNSIGNED */ + -2, /* (150) type_name ::= INT UNSIGNED */ + -2, /* (151) type_name ::= BIGINT UNSIGNED */ + -1, /* (152) type_name ::= JSON */ + -4, /* (153) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ + -1, /* (154) type_name ::= MEDIUMBLOB */ + -1, /* (155) type_name ::= BLOB */ + -4, /* (156) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ + -1, /* (157) type_name ::= DECIMAL */ + -4, /* (158) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ + -6, /* (159) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ + 0, /* (160) tags_def_opt ::= */ + -1, /* (161) tags_def_opt ::= tags_def */ + -4, /* (162) tags_def ::= TAGS NK_LP column_def_list NK_RP */ + 0, /* (163) table_options ::= */ + -3, /* (164) table_options ::= table_options COMMENT NK_STRING */ + -3, /* (165) table_options ::= table_options FILE_FACTOR NK_FLOAT */ + -5, /* (166) table_options ::= table_options ROLLUP NK_LP func_name_list NK_RP */ + -3, /* (167) table_options ::= table_options TTL NK_INTEGER */ + -5, /* (168) table_options ::= table_options SMA NK_LP col_name_list NK_RP */ + -1, /* (169) alter_table_options ::= alter_table_option */ + -2, /* (170) alter_table_options ::= alter_table_options alter_table_option */ + -2, /* (171) alter_table_option ::= COMMENT NK_STRING */ + -2, /* (172) alter_table_option ::= TTL NK_INTEGER */ + -1, /* (173) col_name_list ::= col_name */ + -3, /* (174) col_name_list ::= col_name_list NK_COMMA col_name */ + -1, /* (175) col_name ::= column_name */ + -2, /* (176) cmd ::= SHOW DNODES */ + -2, /* (177) cmd ::= SHOW USERS */ + -2, /* (178) cmd ::= SHOW DATABASES */ + -4, /* (179) cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */ + -4, /* (180) cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ + -3, /* (181) cmd ::= SHOW db_name_cond_opt VGROUPS */ + -2, /* (182) cmd ::= SHOW MNODES */ + -2, /* (183) cmd ::= SHOW MODULES */ + -2, /* (184) cmd ::= SHOW QNODES */ + -2, /* (185) cmd ::= SHOW FUNCTIONS */ + -5, /* (186) cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ + -2, /* (187) cmd ::= SHOW STREAMS */ + -2, /* (188) cmd ::= SHOW ACCOUNTS */ + -2, /* (189) cmd ::= SHOW APPS */ + -2, /* (190) cmd ::= SHOW CONNECTIONS */ + -2, /* (191) cmd ::= SHOW LICENCE */ + -2, /* (192) cmd ::= SHOW GRANTS */ + -4, /* (193) cmd ::= SHOW CREATE DATABASE db_name */ + -4, /* (194) cmd ::= SHOW CREATE TABLE full_table_name */ + -4, /* (195) cmd ::= SHOW CREATE STABLE full_table_name */ + -2, /* (196) cmd ::= SHOW QUERIES */ + -2, /* (197) cmd ::= SHOW SCORES */ + -2, /* (198) cmd ::= SHOW TOPICS */ + -2, /* (199) cmd ::= SHOW VARIABLES */ + -2, /* (200) cmd ::= SHOW BNODES */ + -2, /* (201) cmd ::= SHOW SNODES */ + -2, /* (202) cmd ::= SHOW CLUSTER */ + -2, /* (203) cmd ::= SHOW TRANSACTIONS */ + 0, /* (204) db_name_cond_opt ::= */ + -2, /* (205) db_name_cond_opt ::= db_name NK_DOT */ + 0, /* (206) like_pattern_opt ::= */ + -2, /* (207) like_pattern_opt ::= LIKE NK_STRING */ + -1, /* (208) table_name_cond ::= table_name */ + 0, /* (209) from_db_opt ::= */ + -2, /* (210) from_db_opt ::= FROM db_name */ + -1, /* (211) func_name_list ::= func_name */ + -3, /* (212) func_name_list ::= func_name_list NK_COMMA func_name */ + -1, /* (213) func_name ::= function_name */ + -8, /* (214) cmd ::= CREATE SMA INDEX not_exists_opt index_name ON table_name index_options */ + -10, /* (215) cmd ::= CREATE FULLTEXT INDEX not_exists_opt index_name ON table_name NK_LP col_name_list NK_RP */ + -6, /* (216) cmd ::= DROP INDEX exists_opt index_name ON table_name */ + 0, /* (217) index_options ::= */ + -9, /* (218) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt */ + -11, /* (219) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt */ + -1, /* (220) func_list ::= func */ + -3, /* (221) func_list ::= func_list NK_COMMA func */ + -4, /* (222) func ::= function_name NK_LP expression_list NK_RP */ + -6, /* (223) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_expression */ + -7, /* (224) cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name */ + -7, /* (225) cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name */ + -4, /* (226) cmd ::= DROP TOPIC exists_opt topic_name */ + -7, /* (227) cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ + -2, /* (228) cmd ::= DESC full_table_name */ + -2, /* (229) cmd ::= DESCRIBE full_table_name */ + -3, /* (230) cmd ::= RESET QUERY CACHE */ + -4, /* (231) cmd ::= EXPLAIN analyze_opt explain_options query_expression */ + 0, /* (232) analyze_opt ::= */ + -1, /* (233) analyze_opt ::= ANALYZE */ + 0, /* (234) explain_options ::= */ + -3, /* (235) explain_options ::= explain_options VERBOSE NK_BOOL */ + -3, /* (236) explain_options ::= explain_options RATIO NK_FLOAT */ + -6, /* (237) cmd ::= COMPACT VNODES IN NK_LP integer_list NK_RP */ + -10, /* (238) cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt */ + -4, /* (239) cmd ::= DROP FUNCTION exists_opt function_name */ + 0, /* (240) agg_func_opt ::= */ + -1, /* (241) agg_func_opt ::= AGGREGATE */ + 0, /* (242) bufsize_opt ::= */ + -2, /* (243) bufsize_opt ::= BUFSIZE NK_INTEGER */ + -8, /* (244) cmd ::= CREATE STREAM not_exists_opt stream_name stream_options into_opt AS query_expression */ + -4, /* (245) cmd ::= DROP STREAM exists_opt stream_name */ + 0, /* (246) into_opt ::= */ + -2, /* (247) into_opt ::= INTO full_table_name */ + 0, /* (248) stream_options ::= */ + -3, /* (249) stream_options ::= stream_options TRIGGER AT_ONCE */ + -3, /* (250) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ + -3, /* (251) stream_options ::= stream_options WATERMARK duration_literal */ + -3, /* (252) cmd ::= KILL CONNECTION NK_INTEGER */ + -3, /* (253) cmd ::= KILL QUERY NK_INTEGER */ + -3, /* (254) cmd ::= KILL TRANSACTION NK_INTEGER */ + -4, /* (255) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ + -4, /* (256) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ + -3, /* (257) cmd ::= SPLIT VGROUP NK_INTEGER */ + -2, /* (258) dnode_list ::= DNODE NK_INTEGER */ + -3, /* (259) dnode_list ::= dnode_list DNODE NK_INTEGER */ + -3, /* (260) cmd ::= SYNCDB db_name REPLICA */ + -1, /* (261) cmd ::= query_expression */ + -1, /* (262) literal ::= NK_INTEGER */ + -1, /* (263) literal ::= NK_FLOAT */ + -1, /* (264) literal ::= NK_STRING */ + -1, /* (265) literal ::= NK_BOOL */ + -2, /* (266) literal ::= TIMESTAMP NK_STRING */ + -1, /* (267) literal ::= duration_literal */ + -1, /* (268) literal ::= NULL */ + -1, /* (269) literal ::= NK_QUESTION */ + -1, /* (270) duration_literal ::= NK_VARIABLE */ + -1, /* (271) signed ::= NK_INTEGER */ + -2, /* (272) signed ::= NK_PLUS NK_INTEGER */ + -2, /* (273) signed ::= NK_MINUS NK_INTEGER */ + -1, /* (274) signed ::= NK_FLOAT */ + -2, /* (275) signed ::= NK_PLUS NK_FLOAT */ + -2, /* (276) signed ::= NK_MINUS NK_FLOAT */ + -1, /* (277) signed_literal ::= signed */ + -1, /* (278) signed_literal ::= NK_STRING */ + -1, /* (279) signed_literal ::= NK_BOOL */ + -2, /* (280) signed_literal ::= TIMESTAMP NK_STRING */ + -1, /* (281) signed_literal ::= duration_literal */ + -1, /* (282) signed_literal ::= NULL */ + -1, /* (283) signed_literal ::= literal_func */ + -1, /* (284) literal_list ::= signed_literal */ + -3, /* (285) literal_list ::= literal_list NK_COMMA signed_literal */ + -1, /* (286) db_name ::= NK_ID */ + -1, /* (287) table_name ::= NK_ID */ + -1, /* (288) column_name ::= NK_ID */ + -1, /* (289) function_name ::= NK_ID */ + -1, /* (290) table_alias ::= NK_ID */ + -1, /* (291) column_alias ::= NK_ID */ + -1, /* (292) user_name ::= NK_ID */ + -1, /* (293) index_name ::= NK_ID */ + -1, /* (294) topic_name ::= NK_ID */ + -1, /* (295) stream_name ::= NK_ID */ + -1, /* (296) cgroup_name ::= NK_ID */ + -1, /* (297) expression ::= literal */ + -1, /* (298) expression ::= pseudo_column */ + -1, /* (299) expression ::= column_reference */ + -1, /* (300) expression ::= function_expression */ + -1, /* (301) expression ::= subquery */ + -3, /* (302) expression ::= NK_LP expression NK_RP */ + -2, /* (303) expression ::= NK_PLUS expression */ + -2, /* (304) expression ::= NK_MINUS expression */ + -3, /* (305) expression ::= expression NK_PLUS expression */ + -3, /* (306) expression ::= expression NK_MINUS expression */ + -3, /* (307) expression ::= expression NK_STAR expression */ + -3, /* (308) expression ::= expression NK_SLASH expression */ + -3, /* (309) expression ::= expression NK_REM expression */ + -3, /* (310) expression ::= column_reference NK_ARROW NK_STRING */ + -1, /* (311) expression_list ::= expression */ + -3, /* (312) expression_list ::= expression_list NK_COMMA expression */ + -1, /* (313) column_reference ::= column_name */ + -3, /* (314) column_reference ::= table_name NK_DOT column_name */ + -1, /* (315) pseudo_column ::= ROWTS */ + -1, /* (316) pseudo_column ::= TBNAME */ + -3, /* (317) pseudo_column ::= table_name NK_DOT TBNAME */ + -1, /* (318) pseudo_column ::= QSTARTTS */ + -1, /* (319) pseudo_column ::= QENDTS */ + -1, /* (320) pseudo_column ::= WSTARTTS */ + -1, /* (321) pseudo_column ::= WENDTS */ + -1, /* (322) pseudo_column ::= WDURATION */ + -4, /* (323) function_expression ::= function_name NK_LP expression_list NK_RP */ + -4, /* (324) function_expression ::= star_func NK_LP star_func_para_list NK_RP */ + -6, /* (325) function_expression ::= CAST NK_LP expression AS type_name NK_RP */ + -1, /* (326) function_expression ::= literal_func */ + -3, /* (327) literal_func ::= noarg_func NK_LP NK_RP */ + -1, /* (328) literal_func ::= NOW */ + -1, /* (329) noarg_func ::= NOW */ + -1, /* (330) noarg_func ::= TODAY */ + -1, /* (331) noarg_func ::= TIMEZONE */ + -1, /* (332) star_func ::= COUNT */ + -1, /* (333) star_func ::= FIRST */ + -1, /* (334) star_func ::= LAST */ + -1, /* (335) star_func ::= LAST_ROW */ + -1, /* (336) star_func_para_list ::= NK_STAR */ + -1, /* (337) star_func_para_list ::= other_para_list */ + -1, /* (338) other_para_list ::= star_func_para */ + -3, /* (339) other_para_list ::= other_para_list NK_COMMA star_func_para */ + -1, /* (340) star_func_para ::= expression */ + -3, /* (341) star_func_para ::= table_name NK_DOT NK_STAR */ + -3, /* (342) predicate ::= expression compare_op expression */ + -5, /* (343) predicate ::= expression BETWEEN expression AND expression */ + -6, /* (344) predicate ::= expression NOT BETWEEN expression AND expression */ + -3, /* (345) predicate ::= expression IS NULL */ + -4, /* (346) predicate ::= expression IS NOT NULL */ + -3, /* (347) predicate ::= expression in_op in_predicate_value */ + -1, /* (348) compare_op ::= NK_LT */ + -1, /* (349) compare_op ::= NK_GT */ + -1, /* (350) compare_op ::= NK_LE */ + -1, /* (351) compare_op ::= NK_GE */ + -1, /* (352) compare_op ::= NK_NE */ + -1, /* (353) compare_op ::= NK_EQ */ + -1, /* (354) compare_op ::= LIKE */ + -2, /* (355) compare_op ::= NOT LIKE */ + -1, /* (356) compare_op ::= MATCH */ + -1, /* (357) compare_op ::= NMATCH */ + -1, /* (358) compare_op ::= CONTAINS */ + -1, /* (359) in_op ::= IN */ + -2, /* (360) in_op ::= NOT IN */ + -3, /* (361) in_predicate_value ::= NK_LP expression_list NK_RP */ + -1, /* (362) boolean_value_expression ::= boolean_primary */ + -2, /* (363) boolean_value_expression ::= NOT boolean_primary */ + -3, /* (364) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ + -3, /* (365) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ + -1, /* (366) boolean_primary ::= predicate */ + -3, /* (367) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ + -1, /* (368) common_expression ::= expression */ + -1, /* (369) common_expression ::= boolean_value_expression */ + -2, /* (370) from_clause ::= FROM table_reference_list */ + -1, /* (371) table_reference_list ::= table_reference */ + -3, /* (372) table_reference_list ::= table_reference_list NK_COMMA table_reference */ + -1, /* (373) table_reference ::= table_primary */ + -1, /* (374) table_reference ::= joined_table */ + -2, /* (375) table_primary ::= table_name alias_opt */ + -4, /* (376) table_primary ::= db_name NK_DOT table_name alias_opt */ + -2, /* (377) table_primary ::= subquery alias_opt */ + -1, /* (378) table_primary ::= parenthesized_joined_table */ + 0, /* (379) alias_opt ::= */ + -1, /* (380) alias_opt ::= table_alias */ + -2, /* (381) alias_opt ::= AS table_alias */ + -3, /* (382) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ + -3, /* (383) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ + -6, /* (384) joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ + 0, /* (385) join_type ::= */ + -1, /* (386) join_type ::= INNER */ + -9, /* (387) query_specification ::= SELECT set_quantifier_opt select_list from_clause where_clause_opt partition_by_clause_opt twindow_clause_opt group_by_clause_opt having_clause_opt */ + 0, /* (388) set_quantifier_opt ::= */ + -1, /* (389) set_quantifier_opt ::= DISTINCT */ + -1, /* (390) set_quantifier_opt ::= ALL */ + -1, /* (391) select_list ::= NK_STAR */ + -1, /* (392) select_list ::= select_sublist */ + -1, /* (393) select_sublist ::= select_item */ + -3, /* (394) select_sublist ::= select_sublist NK_COMMA select_item */ + -1, /* (395) select_item ::= common_expression */ + -2, /* (396) select_item ::= common_expression column_alias */ + -3, /* (397) select_item ::= common_expression AS column_alias */ + -3, /* (398) select_item ::= table_name NK_DOT NK_STAR */ + 0, /* (399) where_clause_opt ::= */ + -2, /* (400) where_clause_opt ::= WHERE search_condition */ + 0, /* (401) partition_by_clause_opt ::= */ + -3, /* (402) partition_by_clause_opt ::= PARTITION BY expression_list */ + 0, /* (403) twindow_clause_opt ::= */ + -6, /* (404) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ + -4, /* (405) twindow_clause_opt ::= STATE_WINDOW NK_LP expression NK_RP */ + -6, /* (406) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ + -8, /* (407) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ + 0, /* (408) sliding_opt ::= */ + -4, /* (409) sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ + 0, /* (410) fill_opt ::= */ + -4, /* (411) fill_opt ::= FILL NK_LP fill_mode NK_RP */ + -6, /* (412) fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */ + -1, /* (413) fill_mode ::= NONE */ + -1, /* (414) fill_mode ::= PREV */ + -1, /* (415) fill_mode ::= NULL */ + -1, /* (416) fill_mode ::= LINEAR */ + -1, /* (417) fill_mode ::= NEXT */ + 0, /* (418) group_by_clause_opt ::= */ + -3, /* (419) group_by_clause_opt ::= GROUP BY group_by_list */ + -1, /* (420) group_by_list ::= expression */ + -3, /* (421) group_by_list ::= group_by_list NK_COMMA expression */ + 0, /* (422) having_clause_opt ::= */ + -2, /* (423) having_clause_opt ::= HAVING search_condition */ + -4, /* (424) query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt */ + -1, /* (425) query_expression_body ::= query_primary */ + -4, /* (426) query_expression_body ::= query_expression_body UNION ALL query_expression_body */ + -3, /* (427) query_expression_body ::= query_expression_body UNION query_expression_body */ + -1, /* (428) query_primary ::= query_specification */ + -6, /* (429) query_primary ::= NK_LP query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt NK_RP */ + 0, /* (430) order_by_clause_opt ::= */ + -3, /* (431) order_by_clause_opt ::= ORDER BY sort_specification_list */ + 0, /* (432) slimit_clause_opt ::= */ + -2, /* (433) slimit_clause_opt ::= SLIMIT NK_INTEGER */ + -4, /* (434) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ + -4, /* (435) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + 0, /* (436) limit_clause_opt ::= */ + -2, /* (437) limit_clause_opt ::= LIMIT NK_INTEGER */ + -4, /* (438) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ + -4, /* (439) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + -3, /* (440) subquery ::= NK_LP query_expression NK_RP */ + -1, /* (441) search_condition ::= common_expression */ + -1, /* (442) sort_specification_list ::= sort_specification */ + -3, /* (443) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ + -3, /* (444) sort_specification ::= expression ordering_specification_opt null_ordering_opt */ + 0, /* (445) ordering_specification_opt ::= */ + -1, /* (446) ordering_specification_opt ::= ASC */ + -1, /* (447) ordering_specification_opt ::= DESC */ + 0, /* (448) null_ordering_opt ::= */ + -2, /* (449) null_ordering_opt ::= NULLS FIRST */ + -2, /* (450) null_ordering_opt ::= NULLS LAST */ }; static void yy_accept(yyParser*); /* Forward Declaration */ @@ -3055,51 +3742,6 @@ static YYACTIONTYPE yy_reduce( (void)yyLookahead; (void)yyLookaheadToken; yymsp = yypParser->yytos; -#ifndef NDEBUG - if( yyTraceFILE && yyruleno<(int)(sizeof(yyRuleName)/sizeof(yyRuleName[0])) ){ - yysize = yyRuleInfo[yyruleno].nrhs; - if( yysize ){ - fprintf(yyTraceFILE, "%sReduce %d [%s], go to state %d.\n", - yyTracePrompt, - yyruleno, yyRuleName[yyruleno], yymsp[yysize].stateno); - }else{ - fprintf(yyTraceFILE, "%sReduce %d [%s].\n", - yyTracePrompt, yyruleno, yyRuleName[yyruleno]); - } - } -#endif /* NDEBUG */ - - /* Check that the stack is large enough to grow by a single entry - ** if the RHS of the rule is empty. This ensures that there is room - ** enough on the stack to push the LHS value */ - if( yyRuleInfo[yyruleno].nrhs==0 ){ -#ifdef YYTRACKMAXSTACKDEPTH - if( (int)(yypParser->yytos - yypParser->yystack)>yypParser->yyhwm ){ - yypParser->yyhwm++; - assert( yypParser->yyhwm == (int)(yypParser->yytos - yypParser->yystack)); - } -#endif -#if YYSTACKDEPTH>0 - if( yypParser->yytos>=yypParser->yystackEnd ){ - yyStackOverflow(yypParser); - /* The call to yyStackOverflow() above pops the stack until it is - ** empty, causing the main parser loop to exit. So the return value - ** is never used and does not matter. */ - return 0; - } -#else - if( yypParser->yytos>=&yypParser->yystack[yypParser->yystksz-1] ){ - if( yyGrowStack(yypParser) ){ - yyStackOverflow(yypParser); - /* The call to yyStackOverflow() above pops the stack until it is - ** empty, causing the main parser loop to exit. So the return value - ** is never used and does not matter. */ - return 0; - } - yymsp = yypParser->yytos; - } -#endif - } switch( yyruleno ){ /* Beginning here are the reduction cases. A typical example @@ -3114,11 +3756,11 @@ static YYACTIONTYPE yy_reduce( YYMINORTYPE yylhsminor; case 0: /* cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */ { pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); } - yy_destructor(yypParser,239,&yymsp[0].minor); + yy_destructor(yypParser,238,&yymsp[0].minor); break; case 1: /* cmd ::= ALTER ACCOUNT NK_ID alter_account_options */ { pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); } - yy_destructor(yypParser,240,&yymsp[0].minor); + yy_destructor(yypParser,239,&yymsp[0].minor); break; case 2: /* account_options ::= */ { } @@ -3132,20 +3774,20 @@ static YYACTIONTYPE yy_reduce( case 9: /* account_options ::= account_options USERS literal */ yytestcase(yyruleno==9); case 10: /* account_options ::= account_options CONNS literal */ yytestcase(yyruleno==10); case 11: /* account_options ::= account_options STATE literal */ yytestcase(yyruleno==11); -{ yy_destructor(yypParser,239,&yymsp[-2].minor); +{ yy_destructor(yypParser,238,&yymsp[-2].minor); { } - yy_destructor(yypParser,241,&yymsp[0].minor); + yy_destructor(yypParser,240,&yymsp[0].minor); } break; case 12: /* alter_account_options ::= alter_account_option */ -{ yy_destructor(yypParser,242,&yymsp[0].minor); +{ yy_destructor(yypParser,241,&yymsp[0].minor); { } } break; case 13: /* alter_account_options ::= alter_account_options alter_account_option */ -{ yy_destructor(yypParser,240,&yymsp[-1].minor); +{ yy_destructor(yypParser,239,&yymsp[-1].minor); { } - yy_destructor(yypParser,242,&yymsp[0].minor); + yy_destructor(yypParser,241,&yymsp[0].minor); } break; case 14: /* alter_account_option ::= PASS literal */ @@ -3159,63 +3801,63 @@ static YYACTIONTYPE yy_reduce( case 22: /* alter_account_option ::= CONNS literal */ yytestcase(yyruleno==22); case 23: /* alter_account_option ::= STATE literal */ yytestcase(yyruleno==23); { } - yy_destructor(yypParser,241,&yymsp[0].minor); + yy_destructor(yypParser,240,&yymsp[0].minor); break; case 24: /* cmd ::= CREATE USER user_name PASS NK_STRING */ -{ pCxt->pRootNode = createCreateUserStmt(pCxt, &yymsp[-2].minor.yy105, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createCreateUserStmt(pCxt, &yymsp[-2].minor.yy113, &yymsp[0].minor.yy0); } break; case 25: /* cmd ::= ALTER USER user_name PASS NK_STRING */ -{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy105, TSDB_ALTER_USER_PASSWD, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy113, TSDB_ALTER_USER_PASSWD, &yymsp[0].minor.yy0); } break; case 26: /* cmd ::= ALTER USER user_name PRIVILEGE NK_STRING */ -{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy105, TSDB_ALTER_USER_PRIVILEGES, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy113, TSDB_ALTER_USER_PRIVILEGES, &yymsp[0].minor.yy0); } break; case 27: /* cmd ::= DROP USER user_name */ -{ pCxt->pRootNode = createDropUserStmt(pCxt, &yymsp[0].minor.yy105); } +{ pCxt->pRootNode = createDropUserStmt(pCxt, &yymsp[0].minor.yy113); } break; case 28: /* cmd ::= GRANT privileges ON priv_level TO user_name */ -{ pCxt->pRootNode = createGrantStmt(pCxt, yymsp[-4].minor.yy593, &yymsp[-2].minor.yy105, &yymsp[0].minor.yy105); } +{ pCxt->pRootNode = createGrantStmt(pCxt, yymsp[-4].minor.yy123, &yymsp[-2].minor.yy113, &yymsp[0].minor.yy113); } break; case 29: /* cmd ::= REVOKE privileges ON priv_level FROM user_name */ -{ pCxt->pRootNode = createRevokeStmt(pCxt, yymsp[-4].minor.yy593, &yymsp[-2].minor.yy105, &yymsp[0].minor.yy105); } +{ pCxt->pRootNode = createRevokeStmt(pCxt, yymsp[-4].minor.yy123, &yymsp[-2].minor.yy113, &yymsp[0].minor.yy113); } break; case 30: /* privileges ::= ALL */ -{ yymsp[0].minor.yy593 = PRIVILEGE_TYPE_ALL; } +{ yymsp[0].minor.yy123 = PRIVILEGE_TYPE_ALL; } break; case 31: /* privileges ::= priv_type_list */ case 32: /* priv_type_list ::= priv_type */ yytestcase(yyruleno==32); -{ yylhsminor.yy593 = yymsp[0].minor.yy593; } - yymsp[0].minor.yy593 = yylhsminor.yy593; +{ yylhsminor.yy123 = yymsp[0].minor.yy123; } + yymsp[0].minor.yy123 = yylhsminor.yy123; break; case 33: /* priv_type_list ::= priv_type_list NK_COMMA priv_type */ -{ yylhsminor.yy593 = yymsp[-2].minor.yy593 | yymsp[0].minor.yy593; } - yymsp[-2].minor.yy593 = yylhsminor.yy593; +{ yylhsminor.yy123 = yymsp[-2].minor.yy123 | yymsp[0].minor.yy123; } + yymsp[-2].minor.yy123 = yylhsminor.yy123; break; case 34: /* priv_type ::= READ */ -{ yymsp[0].minor.yy593 = PRIVILEGE_TYPE_READ; } +{ yymsp[0].minor.yy123 = PRIVILEGE_TYPE_READ; } break; case 35: /* priv_type ::= WRITE */ -{ yymsp[0].minor.yy593 = PRIVILEGE_TYPE_WRITE; } +{ yymsp[0].minor.yy123 = PRIVILEGE_TYPE_WRITE; } break; case 36: /* priv_level ::= NK_STAR NK_DOT NK_STAR */ -{ yylhsminor.yy105 = yymsp[-2].minor.yy0; } - yymsp[-2].minor.yy105 = yylhsminor.yy105; +{ yylhsminor.yy113 = yymsp[-2].minor.yy0; } + yymsp[-2].minor.yy113 = yylhsminor.yy113; break; case 37: /* priv_level ::= db_name NK_DOT NK_STAR */ -{ yylhsminor.yy105 = yymsp[-2].minor.yy105; } - yymsp[-2].minor.yy105 = yylhsminor.yy105; +{ yylhsminor.yy113 = yymsp[-2].minor.yy113; } + yymsp[-2].minor.yy113 = yylhsminor.yy113; break; case 38: /* cmd ::= CREATE DNODE dnode_endpoint */ -{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[0].minor.yy105, NULL); } +{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[0].minor.yy113, NULL); } break; case 39: /* cmd ::= CREATE DNODE dnode_host_name PORT NK_INTEGER */ -{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[-2].minor.yy105, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[-2].minor.yy113, &yymsp[0].minor.yy0); } break; case 40: /* cmd ::= DROP DNODE NK_INTEGER */ { pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[0].minor.yy0); } break; case 41: /* cmd ::= DROP DNODE dnode_endpoint */ -{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[0].minor.yy105); } +{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[0].minor.yy113); } break; case 42: /* cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ { pCxt->pRootNode = createAlterDnodeStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, NULL); } @@ -3232,26 +3874,26 @@ static YYACTIONTYPE yy_reduce( case 46: /* dnode_endpoint ::= NK_STRING */ case 47: /* dnode_host_name ::= NK_ID */ yytestcase(yyruleno==47); case 48: /* dnode_host_name ::= NK_IPTOKEN */ yytestcase(yyruleno==48); - case 287: /* db_name ::= NK_ID */ yytestcase(yyruleno==287); - case 288: /* table_name ::= NK_ID */ yytestcase(yyruleno==288); - case 289: /* column_name ::= NK_ID */ yytestcase(yyruleno==289); - case 290: /* function_name ::= NK_ID */ yytestcase(yyruleno==290); - case 291: /* table_alias ::= NK_ID */ yytestcase(yyruleno==291); - case 292: /* column_alias ::= NK_ID */ yytestcase(yyruleno==292); - case 293: /* user_name ::= NK_ID */ yytestcase(yyruleno==293); - case 294: /* index_name ::= NK_ID */ yytestcase(yyruleno==294); - case 295: /* topic_name ::= NK_ID */ yytestcase(yyruleno==295); - case 296: /* stream_name ::= NK_ID */ yytestcase(yyruleno==296); - case 297: /* cgroup_name ::= NK_ID */ yytestcase(yyruleno==297); - case 330: /* noarg_func ::= NOW */ yytestcase(yyruleno==330); - case 331: /* noarg_func ::= TODAY */ yytestcase(yyruleno==331); - case 332: /* noarg_func ::= TIMEZONE */ yytestcase(yyruleno==332); - case 333: /* star_func ::= COUNT */ yytestcase(yyruleno==333); - case 334: /* star_func ::= FIRST */ yytestcase(yyruleno==334); - case 335: /* star_func ::= LAST */ yytestcase(yyruleno==335); - case 336: /* star_func ::= LAST_ROW */ yytestcase(yyruleno==336); -{ yylhsminor.yy105 = yymsp[0].minor.yy0; } - yymsp[0].minor.yy105 = yylhsminor.yy105; + case 286: /* db_name ::= NK_ID */ yytestcase(yyruleno==286); + case 287: /* table_name ::= NK_ID */ yytestcase(yyruleno==287); + case 288: /* column_name ::= NK_ID */ yytestcase(yyruleno==288); + case 289: /* function_name ::= NK_ID */ yytestcase(yyruleno==289); + case 290: /* table_alias ::= NK_ID */ yytestcase(yyruleno==290); + case 291: /* column_alias ::= NK_ID */ yytestcase(yyruleno==291); + case 292: /* user_name ::= NK_ID */ yytestcase(yyruleno==292); + case 293: /* index_name ::= NK_ID */ yytestcase(yyruleno==293); + case 294: /* topic_name ::= NK_ID */ yytestcase(yyruleno==294); + case 295: /* stream_name ::= NK_ID */ yytestcase(yyruleno==295); + case 296: /* cgroup_name ::= NK_ID */ yytestcase(yyruleno==296); + case 329: /* noarg_func ::= NOW */ yytestcase(yyruleno==329); + case 330: /* noarg_func ::= TODAY */ yytestcase(yyruleno==330); + case 331: /* noarg_func ::= TIMEZONE */ yytestcase(yyruleno==331); + case 332: /* star_func ::= COUNT */ yytestcase(yyruleno==332); + case 333: /* star_func ::= FIRST */ yytestcase(yyruleno==333); + case 334: /* star_func ::= LAST */ yytestcase(yyruleno==334); + case 335: /* star_func ::= LAST_ROW */ yytestcase(yyruleno==335); +{ yylhsminor.yy113 = yymsp[0].minor.yy0; } + yymsp[0].minor.yy113 = yylhsminor.yy113; break; case 49: /* cmd ::= ALTER LOCAL NK_STRING */ { pCxt->pRootNode = createAlterLocalStmt(pCxt, &yymsp[0].minor.yy0, NULL); } @@ -3284,1157 +3926,1153 @@ static YYACTIONTYPE yy_reduce( { pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_MNODE_STMT, &yymsp[0].minor.yy0); } break; case 59: /* cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ -{ pCxt->pRootNode = createCreateDatabaseStmt(pCxt, yymsp[-2].minor.yy617, &yymsp[-1].minor.yy105, yymsp[0].minor.yy172); } +{ pCxt->pRootNode = createCreateDatabaseStmt(pCxt, yymsp[-2].minor.yy131, &yymsp[-1].minor.yy113, yymsp[0].minor.yy686); } break; case 60: /* cmd ::= DROP DATABASE exists_opt db_name */ -{ pCxt->pRootNode = createDropDatabaseStmt(pCxt, yymsp[-1].minor.yy617, &yymsp[0].minor.yy105); } +{ pCxt->pRootNode = createDropDatabaseStmt(pCxt, yymsp[-1].minor.yy131, &yymsp[0].minor.yy113); } break; case 61: /* cmd ::= USE db_name */ -{ pCxt->pRootNode = createUseDatabaseStmt(pCxt, &yymsp[0].minor.yy105); } +{ pCxt->pRootNode = createUseDatabaseStmt(pCxt, &yymsp[0].minor.yy113); } break; case 62: /* cmd ::= ALTER DATABASE db_name alter_db_options */ -{ pCxt->pRootNode = createAlterDatabaseStmt(pCxt, &yymsp[-1].minor.yy105, yymsp[0].minor.yy172); } +{ pCxt->pRootNode = createAlterDatabaseStmt(pCxt, &yymsp[-1].minor.yy113, yymsp[0].minor.yy686); } break; case 63: /* not_exists_opt ::= IF NOT EXISTS */ -{ yymsp[-2].minor.yy617 = true; } +{ yymsp[-2].minor.yy131 = true; } break; case 64: /* not_exists_opt ::= */ case 66: /* exists_opt ::= */ yytestcase(yyruleno==66); - case 233: /* analyze_opt ::= */ yytestcase(yyruleno==233); - case 241: /* agg_func_opt ::= */ yytestcase(yyruleno==241); - case 389: /* set_quantifier_opt ::= */ yytestcase(yyruleno==389); -{ yymsp[1].minor.yy617 = false; } + case 232: /* analyze_opt ::= */ yytestcase(yyruleno==232); + case 240: /* agg_func_opt ::= */ yytestcase(yyruleno==240); + case 388: /* set_quantifier_opt ::= */ yytestcase(yyruleno==388); +{ yymsp[1].minor.yy131 = false; } break; case 65: /* exists_opt ::= IF EXISTS */ -{ yymsp[-1].minor.yy617 = true; } +{ yymsp[-1].minor.yy131 = true; } break; case 67: /* db_options ::= */ -{ yymsp[1].minor.yy172 = createDefaultDatabaseOptions(pCxt); } +{ yymsp[1].minor.yy686 = createDefaultDatabaseOptions(pCxt); } break; case 68: /* db_options ::= db_options BUFFER NK_INTEGER */ -{ yylhsminor.yy172 = setDatabaseOption(pCxt, yymsp[-2].minor.yy172, DB_OPTION_BUFFER, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; +{ yylhsminor.yy686 = setDatabaseOption(pCxt, yymsp[-2].minor.yy686, DB_OPTION_BUFFER, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy686 = yylhsminor.yy686; break; case 69: /* db_options ::= db_options CACHELAST NK_INTEGER */ -{ yylhsminor.yy172 = setDatabaseOption(pCxt, yymsp[-2].minor.yy172, DB_OPTION_CACHELAST, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; +{ yylhsminor.yy686 = setDatabaseOption(pCxt, yymsp[-2].minor.yy686, DB_OPTION_CACHELAST, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy686 = yylhsminor.yy686; break; case 70: /* db_options ::= db_options COMP NK_INTEGER */ -{ yylhsminor.yy172 = setDatabaseOption(pCxt, yymsp[-2].minor.yy172, DB_OPTION_COMP, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; +{ yylhsminor.yy686 = setDatabaseOption(pCxt, yymsp[-2].minor.yy686, DB_OPTION_COMP, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy686 = yylhsminor.yy686; break; case 71: /* db_options ::= db_options DAYS NK_INTEGER */ case 72: /* db_options ::= db_options DAYS NK_VARIABLE */ yytestcase(yyruleno==72); -{ yylhsminor.yy172 = setDatabaseOption(pCxt, yymsp[-2].minor.yy172, DB_OPTION_DAYS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; +{ yylhsminor.yy686 = setDatabaseOption(pCxt, yymsp[-2].minor.yy686, DB_OPTION_DAYS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy686 = yylhsminor.yy686; break; case 73: /* db_options ::= db_options FSYNC NK_INTEGER */ -{ yylhsminor.yy172 = setDatabaseOption(pCxt, yymsp[-2].minor.yy172, DB_OPTION_FSYNC, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; +{ yylhsminor.yy686 = setDatabaseOption(pCxt, yymsp[-2].minor.yy686, DB_OPTION_FSYNC, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy686 = yylhsminor.yy686; break; case 74: /* db_options ::= db_options MAXROWS NK_INTEGER */ -{ yylhsminor.yy172 = setDatabaseOption(pCxt, yymsp[-2].minor.yy172, DB_OPTION_MAXROWS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; +{ yylhsminor.yy686 = setDatabaseOption(pCxt, yymsp[-2].minor.yy686, DB_OPTION_MAXROWS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy686 = yylhsminor.yy686; break; case 75: /* db_options ::= db_options MINROWS NK_INTEGER */ -{ yylhsminor.yy172 = setDatabaseOption(pCxt, yymsp[-2].minor.yy172, DB_OPTION_MINROWS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; +{ yylhsminor.yy686 = setDatabaseOption(pCxt, yymsp[-2].minor.yy686, DB_OPTION_MINROWS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy686 = yylhsminor.yy686; break; case 76: /* db_options ::= db_options KEEP integer_list */ case 77: /* db_options ::= db_options KEEP variable_list */ yytestcase(yyruleno==77); -{ yylhsminor.yy172 = setDatabaseOption(pCxt, yymsp[-2].minor.yy172, DB_OPTION_KEEP, yymsp[0].minor.yy60); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; +{ yylhsminor.yy686 = setDatabaseOption(pCxt, yymsp[-2].minor.yy686, DB_OPTION_KEEP, yymsp[0].minor.yy670); } + yymsp[-2].minor.yy686 = yylhsminor.yy686; break; case 78: /* db_options ::= db_options PAGES NK_INTEGER */ -{ yylhsminor.yy172 = setDatabaseOption(pCxt, yymsp[-2].minor.yy172, DB_OPTION_PAGES, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; +{ yylhsminor.yy686 = setDatabaseOption(pCxt, yymsp[-2].minor.yy686, DB_OPTION_PAGES, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy686 = yylhsminor.yy686; break; case 79: /* db_options ::= db_options PAGESIZE NK_INTEGER */ -{ yylhsminor.yy172 = setDatabaseOption(pCxt, yymsp[-2].minor.yy172, DB_OPTION_PAGESIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; +{ yylhsminor.yy686 = setDatabaseOption(pCxt, yymsp[-2].minor.yy686, DB_OPTION_PAGESIZE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy686 = yylhsminor.yy686; break; case 80: /* db_options ::= db_options PRECISION NK_STRING */ -{ yylhsminor.yy172 = setDatabaseOption(pCxt, yymsp[-2].minor.yy172, DB_OPTION_PRECISION, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; +{ yylhsminor.yy686 = setDatabaseOption(pCxt, yymsp[-2].minor.yy686, DB_OPTION_PRECISION, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy686 = yylhsminor.yy686; break; case 81: /* db_options ::= db_options REPLICA NK_INTEGER */ -{ yylhsminor.yy172 = setDatabaseOption(pCxt, yymsp[-2].minor.yy172, DB_OPTION_REPLICA, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; +{ yylhsminor.yy686 = setDatabaseOption(pCxt, yymsp[-2].minor.yy686, DB_OPTION_REPLICA, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy686 = yylhsminor.yy686; break; case 82: /* db_options ::= db_options STRICT NK_INTEGER */ -{ yylhsminor.yy172 = setDatabaseOption(pCxt, yymsp[-2].minor.yy172, DB_OPTION_STRICT, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; +{ yylhsminor.yy686 = setDatabaseOption(pCxt, yymsp[-2].minor.yy686, DB_OPTION_STRICT, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy686 = yylhsminor.yy686; break; case 83: /* db_options ::= db_options WAL NK_INTEGER */ -{ yylhsminor.yy172 = setDatabaseOption(pCxt, yymsp[-2].minor.yy172, DB_OPTION_WAL, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; +{ yylhsminor.yy686 = setDatabaseOption(pCxt, yymsp[-2].minor.yy686, DB_OPTION_WAL, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy686 = yylhsminor.yy686; break; case 84: /* db_options ::= db_options VGROUPS NK_INTEGER */ -{ yylhsminor.yy172 = setDatabaseOption(pCxt, yymsp[-2].minor.yy172, DB_OPTION_VGROUPS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; +{ yylhsminor.yy686 = setDatabaseOption(pCxt, yymsp[-2].minor.yy686, DB_OPTION_VGROUPS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy686 = yylhsminor.yy686; break; case 85: /* db_options ::= db_options SINGLE_STABLE NK_INTEGER */ -{ yylhsminor.yy172 = setDatabaseOption(pCxt, yymsp[-2].minor.yy172, DB_OPTION_SINGLE_STABLE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; +{ yylhsminor.yy686 = setDatabaseOption(pCxt, yymsp[-2].minor.yy686, DB_OPTION_SINGLE_STABLE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy686 = yylhsminor.yy686; break; case 86: /* db_options ::= db_options RETENTIONS retention_list */ -{ yylhsminor.yy172 = setDatabaseOption(pCxt, yymsp[-2].minor.yy172, DB_OPTION_RETENTIONS, yymsp[0].minor.yy60); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; +{ yylhsminor.yy686 = setDatabaseOption(pCxt, yymsp[-2].minor.yy686, DB_OPTION_RETENTIONS, yymsp[0].minor.yy670); } + yymsp[-2].minor.yy686 = yylhsminor.yy686; break; case 87: /* db_options ::= db_options SCHEMALESS NK_INTEGER */ -{ yylhsminor.yy172 = setDatabaseOption(pCxt, yymsp[-2].minor.yy172, DB_OPTION_SCHEMALESS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; +{ yylhsminor.yy686 = setDatabaseOption(pCxt, yymsp[-2].minor.yy686, DB_OPTION_SCHEMALESS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy686 = yylhsminor.yy686; break; case 88: /* alter_db_options ::= alter_db_option */ -{ yylhsminor.yy172 = createAlterDatabaseOptions(pCxt); yylhsminor.yy172 = setAlterDatabaseOption(pCxt, yylhsminor.yy172, &yymsp[0].minor.yy609); } - yymsp[0].minor.yy172 = yylhsminor.yy172; +{ yylhsminor.yy686 = createAlterDatabaseOptions(pCxt); yylhsminor.yy686 = setAlterDatabaseOption(pCxt, yylhsminor.yy686, &yymsp[0].minor.yy53); } + yymsp[0].minor.yy686 = yylhsminor.yy686; break; case 89: /* alter_db_options ::= alter_db_options alter_db_option */ -{ yylhsminor.yy172 = setAlterDatabaseOption(pCxt, yymsp[-1].minor.yy172, &yymsp[0].minor.yy609); } - yymsp[-1].minor.yy172 = yylhsminor.yy172; +{ yylhsminor.yy686 = setAlterDatabaseOption(pCxt, yymsp[-1].minor.yy686, &yymsp[0].minor.yy53); } + yymsp[-1].minor.yy686 = yylhsminor.yy686; break; case 90: /* alter_db_option ::= BUFFER NK_INTEGER */ -{ yymsp[-1].minor.yy609.type = DB_OPTION_BUFFER; yymsp[-1].minor.yy609.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy53.type = DB_OPTION_BUFFER; yymsp[-1].minor.yy53.val = yymsp[0].minor.yy0; } break; case 91: /* alter_db_option ::= CACHELAST NK_INTEGER */ -{ yymsp[-1].minor.yy609.type = DB_OPTION_CACHELAST; yymsp[-1].minor.yy609.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy53.type = DB_OPTION_CACHELAST; yymsp[-1].minor.yy53.val = yymsp[0].minor.yy0; } break; case 92: /* alter_db_option ::= FSYNC NK_INTEGER */ -{ yymsp[-1].minor.yy609.type = DB_OPTION_FSYNC; yymsp[-1].minor.yy609.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy53.type = DB_OPTION_FSYNC; yymsp[-1].minor.yy53.val = yymsp[0].minor.yy0; } break; case 93: /* alter_db_option ::= KEEP integer_list */ case 94: /* alter_db_option ::= KEEP variable_list */ yytestcase(yyruleno==94); -{ yymsp[-1].minor.yy609.type = DB_OPTION_KEEP; yymsp[-1].minor.yy609.pList = yymsp[0].minor.yy60; } +{ yymsp[-1].minor.yy53.type = DB_OPTION_KEEP; yymsp[-1].minor.yy53.pList = yymsp[0].minor.yy670; } break; case 95: /* alter_db_option ::= PAGES NK_INTEGER */ -{ yymsp[-1].minor.yy609.type = DB_OPTION_PAGES; yymsp[-1].minor.yy609.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy53.type = DB_OPTION_PAGES; yymsp[-1].minor.yy53.val = yymsp[0].minor.yy0; } break; case 96: /* alter_db_option ::= REPLICA NK_INTEGER */ -{ yymsp[-1].minor.yy609.type = DB_OPTION_REPLICA; yymsp[-1].minor.yy609.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy53.type = DB_OPTION_REPLICA; yymsp[-1].minor.yy53.val = yymsp[0].minor.yy0; } break; case 97: /* alter_db_option ::= STRICT NK_INTEGER */ -{ yymsp[-1].minor.yy609.type = DB_OPTION_STRICT; yymsp[-1].minor.yy609.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy53.type = DB_OPTION_STRICT; yymsp[-1].minor.yy53.val = yymsp[0].minor.yy0; } break; case 98: /* alter_db_option ::= WAL NK_INTEGER */ -{ yymsp[-1].minor.yy609.type = DB_OPTION_WAL; yymsp[-1].minor.yy609.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy53.type = DB_OPTION_WAL; yymsp[-1].minor.yy53.val = yymsp[0].minor.yy0; } break; case 99: /* integer_list ::= NK_INTEGER */ -{ yylhsminor.yy60 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy60 = yylhsminor.yy60; +{ yylhsminor.yy670 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy670 = yylhsminor.yy670; break; case 100: /* integer_list ::= integer_list NK_COMMA NK_INTEGER */ - case 260: /* dnode_list ::= dnode_list DNODE NK_INTEGER */ yytestcase(yyruleno==260); -{ yylhsminor.yy60 = addNodeToList(pCxt, yymsp[-2].minor.yy60, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } - yymsp[-2].minor.yy60 = yylhsminor.yy60; + case 259: /* dnode_list ::= dnode_list DNODE NK_INTEGER */ yytestcase(yyruleno==259); +{ yylhsminor.yy670 = addNodeToList(pCxt, yymsp[-2].minor.yy670, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } + yymsp[-2].minor.yy670 = yylhsminor.yy670; break; case 101: /* variable_list ::= NK_VARIABLE */ -{ yylhsminor.yy60 = createNodeList(pCxt, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy60 = yylhsminor.yy60; +{ yylhsminor.yy670 = createNodeList(pCxt, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy670 = yylhsminor.yy670; break; case 102: /* variable_list ::= variable_list NK_COMMA NK_VARIABLE */ -{ yylhsminor.yy60 = addNodeToList(pCxt, yymsp[-2].minor.yy60, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[-2].minor.yy60 = yylhsminor.yy60; +{ yylhsminor.yy670 = addNodeToList(pCxt, yymsp[-2].minor.yy670, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[-2].minor.yy670 = yylhsminor.yy670; break; case 103: /* retention_list ::= retention */ case 123: /* multi_create_clause ::= create_subtable_clause */ yytestcase(yyruleno==123); case 126: /* multi_drop_clause ::= drop_table_clause */ yytestcase(yyruleno==126); case 133: /* column_def_list ::= column_def */ yytestcase(yyruleno==133); - case 174: /* col_name_list ::= col_name */ yytestcase(yyruleno==174); - case 212: /* func_name_list ::= func_name */ yytestcase(yyruleno==212); - case 221: /* func_list ::= func */ yytestcase(yyruleno==221); - case 285: /* literal_list ::= signed_literal */ yytestcase(yyruleno==285); - case 339: /* other_para_list ::= star_func_para */ yytestcase(yyruleno==339); - case 394: /* select_sublist ::= select_item */ yytestcase(yyruleno==394); - case 443: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==443); -{ yylhsminor.yy60 = createNodeList(pCxt, yymsp[0].minor.yy172); } - yymsp[0].minor.yy60 = yylhsminor.yy60; + case 173: /* col_name_list ::= col_name */ yytestcase(yyruleno==173); + case 211: /* func_name_list ::= func_name */ yytestcase(yyruleno==211); + case 220: /* func_list ::= func */ yytestcase(yyruleno==220); + case 284: /* literal_list ::= signed_literal */ yytestcase(yyruleno==284); + case 338: /* other_para_list ::= star_func_para */ yytestcase(yyruleno==338); + case 393: /* select_sublist ::= select_item */ yytestcase(yyruleno==393); + case 442: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==442); +{ yylhsminor.yy670 = createNodeList(pCxt, yymsp[0].minor.yy686); } + yymsp[0].minor.yy670 = yylhsminor.yy670; break; case 104: /* retention_list ::= retention_list NK_COMMA retention */ case 134: /* column_def_list ::= column_def_list NK_COMMA column_def */ yytestcase(yyruleno==134); - case 175: /* col_name_list ::= col_name_list NK_COMMA col_name */ yytestcase(yyruleno==175); - case 213: /* func_name_list ::= func_name_list NK_COMMA func_name */ yytestcase(yyruleno==213); - case 222: /* func_list ::= func_list NK_COMMA func */ yytestcase(yyruleno==222); - case 286: /* literal_list ::= literal_list NK_COMMA signed_literal */ yytestcase(yyruleno==286); - case 340: /* other_para_list ::= other_para_list NK_COMMA star_func_para */ yytestcase(yyruleno==340); - case 395: /* select_sublist ::= select_sublist NK_COMMA select_item */ yytestcase(yyruleno==395); - case 444: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==444); -{ yylhsminor.yy60 = addNodeToList(pCxt, yymsp[-2].minor.yy60, yymsp[0].minor.yy172); } - yymsp[-2].minor.yy60 = yylhsminor.yy60; + case 174: /* col_name_list ::= col_name_list NK_COMMA col_name */ yytestcase(yyruleno==174); + case 212: /* func_name_list ::= func_name_list NK_COMMA func_name */ yytestcase(yyruleno==212); + case 221: /* func_list ::= func_list NK_COMMA func */ yytestcase(yyruleno==221); + case 285: /* literal_list ::= literal_list NK_COMMA signed_literal */ yytestcase(yyruleno==285); + case 339: /* other_para_list ::= other_para_list NK_COMMA star_func_para */ yytestcase(yyruleno==339); + case 394: /* select_sublist ::= select_sublist NK_COMMA select_item */ yytestcase(yyruleno==394); + case 443: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==443); +{ yylhsminor.yy670 = addNodeToList(pCxt, yymsp[-2].minor.yy670, yymsp[0].minor.yy686); } + yymsp[-2].minor.yy670 = yylhsminor.yy670; break; case 105: /* retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ -{ yylhsminor.yy172 = createNodeListNodeEx(pCxt, createDurationValueNode(pCxt, &yymsp[-2].minor.yy0), createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; +{ yylhsminor.yy686 = createNodeListNodeEx(pCxt, createDurationValueNode(pCxt, &yymsp[-2].minor.yy0), createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[-2].minor.yy686 = yylhsminor.yy686; break; case 106: /* cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ case 108: /* cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ yytestcase(yyruleno==108); -{ pCxt->pRootNode = createCreateTableStmt(pCxt, yymsp[-6].minor.yy617, yymsp[-5].minor.yy172, yymsp[-3].minor.yy60, yymsp[-1].minor.yy60, yymsp[0].minor.yy172); } +{ pCxt->pRootNode = createCreateTableStmt(pCxt, yymsp[-6].minor.yy131, yymsp[-5].minor.yy686, yymsp[-3].minor.yy670, yymsp[-1].minor.yy670, yymsp[0].minor.yy686); } break; case 107: /* cmd ::= CREATE TABLE multi_create_clause */ -{ pCxt->pRootNode = createCreateMultiTableStmt(pCxt, yymsp[0].minor.yy60); } +{ pCxt->pRootNode = createCreateMultiTableStmt(pCxt, yymsp[0].minor.yy670); } break; case 109: /* cmd ::= DROP TABLE multi_drop_clause */ -{ pCxt->pRootNode = createDropTableStmt(pCxt, yymsp[0].minor.yy60); } +{ pCxt->pRootNode = createDropTableStmt(pCxt, yymsp[0].minor.yy670); } break; case 110: /* cmd ::= DROP STABLE exists_opt full_table_name */ -{ pCxt->pRootNode = createDropSuperTableStmt(pCxt, yymsp[-1].minor.yy617, yymsp[0].minor.yy172); } +{ pCxt->pRootNode = createDropSuperTableStmt(pCxt, yymsp[-1].minor.yy131, yymsp[0].minor.yy686); } break; case 111: /* cmd ::= ALTER TABLE alter_table_clause */ case 112: /* cmd ::= ALTER STABLE alter_table_clause */ yytestcase(yyruleno==112); - case 262: /* cmd ::= query_expression */ yytestcase(yyruleno==262); -{ pCxt->pRootNode = yymsp[0].minor.yy172; } + case 261: /* cmd ::= query_expression */ yytestcase(yyruleno==261); +{ pCxt->pRootNode = yymsp[0].minor.yy686; } break; case 113: /* alter_table_clause ::= full_table_name alter_table_options */ -{ yylhsminor.yy172 = createAlterTableModifyOptions(pCxt, yymsp[-1].minor.yy172, yymsp[0].minor.yy172); } - yymsp[-1].minor.yy172 = yylhsminor.yy172; +{ yylhsminor.yy686 = createAlterTableModifyOptions(pCxt, yymsp[-1].minor.yy686, yymsp[0].minor.yy686); } + yymsp[-1].minor.yy686 = yylhsminor.yy686; break; case 114: /* alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ -{ yylhsminor.yy172 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy172, TSDB_ALTER_TABLE_ADD_COLUMN, &yymsp[-1].minor.yy105, yymsp[0].minor.yy248); } - yymsp[-4].minor.yy172 = yylhsminor.yy172; +{ yylhsminor.yy686 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy686, TSDB_ALTER_TABLE_ADD_COLUMN, &yymsp[-1].minor.yy113, yymsp[0].minor.yy490); } + yymsp[-4].minor.yy686 = yylhsminor.yy686; break; case 115: /* alter_table_clause ::= full_table_name DROP COLUMN column_name */ -{ yylhsminor.yy172 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy172, TSDB_ALTER_TABLE_DROP_COLUMN, &yymsp[0].minor.yy105); } - yymsp[-3].minor.yy172 = yylhsminor.yy172; +{ yylhsminor.yy686 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy686, TSDB_ALTER_TABLE_DROP_COLUMN, &yymsp[0].minor.yy113); } + yymsp[-3].minor.yy686 = yylhsminor.yy686; break; case 116: /* alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ -{ yylhsminor.yy172 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy172, TSDB_ALTER_TABLE_UPDATE_COLUMN_BYTES, &yymsp[-1].minor.yy105, yymsp[0].minor.yy248); } - yymsp[-4].minor.yy172 = yylhsminor.yy172; +{ yylhsminor.yy686 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy686, TSDB_ALTER_TABLE_UPDATE_COLUMN_BYTES, &yymsp[-1].minor.yy113, yymsp[0].minor.yy490); } + yymsp[-4].minor.yy686 = yylhsminor.yy686; break; case 117: /* alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ -{ yylhsminor.yy172 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy172, TSDB_ALTER_TABLE_UPDATE_COLUMN_NAME, &yymsp[-1].minor.yy105, &yymsp[0].minor.yy105); } - yymsp[-4].minor.yy172 = yylhsminor.yy172; +{ yylhsminor.yy686 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy686, TSDB_ALTER_TABLE_UPDATE_COLUMN_NAME, &yymsp[-1].minor.yy113, &yymsp[0].minor.yy113); } + yymsp[-4].minor.yy686 = yylhsminor.yy686; break; case 118: /* alter_table_clause ::= full_table_name ADD TAG column_name type_name */ -{ yylhsminor.yy172 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy172, TSDB_ALTER_TABLE_ADD_TAG, &yymsp[-1].minor.yy105, yymsp[0].minor.yy248); } - yymsp[-4].minor.yy172 = yylhsminor.yy172; +{ yylhsminor.yy686 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy686, TSDB_ALTER_TABLE_ADD_TAG, &yymsp[-1].minor.yy113, yymsp[0].minor.yy490); } + yymsp[-4].minor.yy686 = yylhsminor.yy686; break; case 119: /* alter_table_clause ::= full_table_name DROP TAG column_name */ -{ yylhsminor.yy172 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy172, TSDB_ALTER_TABLE_DROP_TAG, &yymsp[0].minor.yy105); } - yymsp[-3].minor.yy172 = yylhsminor.yy172; +{ yylhsminor.yy686 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy686, TSDB_ALTER_TABLE_DROP_TAG, &yymsp[0].minor.yy113); } + yymsp[-3].minor.yy686 = yylhsminor.yy686; break; case 120: /* alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ -{ yylhsminor.yy172 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy172, TSDB_ALTER_TABLE_UPDATE_TAG_BYTES, &yymsp[-1].minor.yy105, yymsp[0].minor.yy248); } - yymsp[-4].minor.yy172 = yylhsminor.yy172; +{ yylhsminor.yy686 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy686, TSDB_ALTER_TABLE_UPDATE_TAG_BYTES, &yymsp[-1].minor.yy113, yymsp[0].minor.yy490); } + yymsp[-4].minor.yy686 = yylhsminor.yy686; break; case 121: /* alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ -{ yylhsminor.yy172 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy172, TSDB_ALTER_TABLE_UPDATE_TAG_NAME, &yymsp[-1].minor.yy105, &yymsp[0].minor.yy105); } - yymsp[-4].minor.yy172 = yylhsminor.yy172; +{ yylhsminor.yy686 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy686, TSDB_ALTER_TABLE_UPDATE_TAG_NAME, &yymsp[-1].minor.yy113, &yymsp[0].minor.yy113); } + yymsp[-4].minor.yy686 = yylhsminor.yy686; break; case 122: /* alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */ -{ yylhsminor.yy172 = createAlterTableSetTag(pCxt, yymsp[-5].minor.yy172, &yymsp[-2].minor.yy105, yymsp[0].minor.yy172); } - yymsp[-5].minor.yy172 = yylhsminor.yy172; +{ yylhsminor.yy686 = createAlterTableSetTag(pCxt, yymsp[-5].minor.yy686, &yymsp[-2].minor.yy113, yymsp[0].minor.yy686); } + yymsp[-5].minor.yy686 = yylhsminor.yy686; break; case 124: /* multi_create_clause ::= multi_create_clause create_subtable_clause */ case 127: /* multi_drop_clause ::= multi_drop_clause drop_table_clause */ yytestcase(yyruleno==127); -{ yylhsminor.yy60 = addNodeToList(pCxt, yymsp[-1].minor.yy60, yymsp[0].minor.yy172); } - yymsp[-1].minor.yy60 = yylhsminor.yy60; +{ yylhsminor.yy670 = addNodeToList(pCxt, yymsp[-1].minor.yy670, yymsp[0].minor.yy686); } + yymsp[-1].minor.yy670 = yylhsminor.yy670; break; case 125: /* create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_tags_opt TAGS NK_LP literal_list NK_RP table_options */ -{ yylhsminor.yy172 = createCreateSubTableClause(pCxt, yymsp[-9].minor.yy617, yymsp[-8].minor.yy172, yymsp[-6].minor.yy172, yymsp[-5].minor.yy60, yymsp[-2].minor.yy60, yymsp[0].minor.yy172); } - yymsp[-9].minor.yy172 = yylhsminor.yy172; +{ yylhsminor.yy686 = createCreateSubTableClause(pCxt, yymsp[-9].minor.yy131, yymsp[-8].minor.yy686, yymsp[-6].minor.yy686, yymsp[-5].minor.yy670, yymsp[-2].minor.yy670, yymsp[0].minor.yy686); } + yymsp[-9].minor.yy686 = yylhsminor.yy686; break; case 128: /* drop_table_clause ::= exists_opt full_table_name */ -{ yylhsminor.yy172 = createDropTableClause(pCxt, yymsp[-1].minor.yy617, yymsp[0].minor.yy172); } - yymsp[-1].minor.yy172 = yylhsminor.yy172; +{ yylhsminor.yy686 = createDropTableClause(pCxt, yymsp[-1].minor.yy131, yymsp[0].minor.yy686); } + yymsp[-1].minor.yy686 = yylhsminor.yy686; break; case 129: /* specific_tags_opt ::= */ case 160: /* tags_def_opt ::= */ yytestcase(yyruleno==160); - case 402: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==402); - case 419: /* group_by_clause_opt ::= */ yytestcase(yyruleno==419); - case 431: /* order_by_clause_opt ::= */ yytestcase(yyruleno==431); -{ yymsp[1].minor.yy60 = NULL; } + case 401: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==401); + case 418: /* group_by_clause_opt ::= */ yytestcase(yyruleno==418); + case 430: /* order_by_clause_opt ::= */ yytestcase(yyruleno==430); +{ yymsp[1].minor.yy670 = NULL; } break; case 130: /* specific_tags_opt ::= NK_LP col_name_list NK_RP */ -{ yymsp[-2].minor.yy60 = yymsp[-1].minor.yy60; } +{ yymsp[-2].minor.yy670 = yymsp[-1].minor.yy670; } break; case 131: /* full_table_name ::= table_name */ -{ yylhsminor.yy172 = createRealTableNode(pCxt, NULL, &yymsp[0].minor.yy105, NULL); } - yymsp[0].minor.yy172 = yylhsminor.yy172; +{ yylhsminor.yy686 = createRealTableNode(pCxt, NULL, &yymsp[0].minor.yy113, NULL); } + yymsp[0].minor.yy686 = yylhsminor.yy686; break; case 132: /* full_table_name ::= db_name NK_DOT table_name */ -{ yylhsminor.yy172 = createRealTableNode(pCxt, &yymsp[-2].minor.yy105, &yymsp[0].minor.yy105, NULL); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; +{ yylhsminor.yy686 = createRealTableNode(pCxt, &yymsp[-2].minor.yy113, &yymsp[0].minor.yy113, NULL); } + yymsp[-2].minor.yy686 = yylhsminor.yy686; break; case 135: /* column_def ::= column_name type_name */ -{ yylhsminor.yy172 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy105, yymsp[0].minor.yy248, NULL); } - yymsp[-1].minor.yy172 = yylhsminor.yy172; +{ yylhsminor.yy686 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy113, yymsp[0].minor.yy490, NULL); } + yymsp[-1].minor.yy686 = yylhsminor.yy686; break; case 136: /* column_def ::= column_name type_name COMMENT NK_STRING */ -{ yylhsminor.yy172 = createColumnDefNode(pCxt, &yymsp[-3].minor.yy105, yymsp[-2].minor.yy248, &yymsp[0].minor.yy0); } - yymsp[-3].minor.yy172 = yylhsminor.yy172; +{ yylhsminor.yy686 = createColumnDefNode(pCxt, &yymsp[-3].minor.yy113, yymsp[-2].minor.yy490, &yymsp[0].minor.yy0); } + yymsp[-3].minor.yy686 = yylhsminor.yy686; break; case 137: /* type_name ::= BOOL */ -{ yymsp[0].minor.yy248 = createDataType(TSDB_DATA_TYPE_BOOL); } +{ yymsp[0].minor.yy490 = createDataType(TSDB_DATA_TYPE_BOOL); } break; case 138: /* type_name ::= TINYINT */ -{ yymsp[0].minor.yy248 = createDataType(TSDB_DATA_TYPE_TINYINT); } +{ yymsp[0].minor.yy490 = createDataType(TSDB_DATA_TYPE_TINYINT); } break; case 139: /* type_name ::= SMALLINT */ -{ yymsp[0].minor.yy248 = createDataType(TSDB_DATA_TYPE_SMALLINT); } +{ yymsp[0].minor.yy490 = createDataType(TSDB_DATA_TYPE_SMALLINT); } break; case 140: /* type_name ::= INT */ case 141: /* type_name ::= INTEGER */ yytestcase(yyruleno==141); -{ yymsp[0].minor.yy248 = createDataType(TSDB_DATA_TYPE_INT); } +{ yymsp[0].minor.yy490 = createDataType(TSDB_DATA_TYPE_INT); } break; case 142: /* type_name ::= BIGINT */ -{ yymsp[0].minor.yy248 = createDataType(TSDB_DATA_TYPE_BIGINT); } +{ yymsp[0].minor.yy490 = createDataType(TSDB_DATA_TYPE_BIGINT); } break; case 143: /* type_name ::= FLOAT */ -{ yymsp[0].minor.yy248 = createDataType(TSDB_DATA_TYPE_FLOAT); } +{ yymsp[0].minor.yy490 = createDataType(TSDB_DATA_TYPE_FLOAT); } break; case 144: /* type_name ::= DOUBLE */ -{ yymsp[0].minor.yy248 = createDataType(TSDB_DATA_TYPE_DOUBLE); } +{ yymsp[0].minor.yy490 = createDataType(TSDB_DATA_TYPE_DOUBLE); } break; case 145: /* type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy248 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy0); } +{ yymsp[-3].minor.yy490 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy0); } break; case 146: /* type_name ::= TIMESTAMP */ -{ yymsp[0].minor.yy248 = createDataType(TSDB_DATA_TYPE_TIMESTAMP); } +{ yymsp[0].minor.yy490 = createDataType(TSDB_DATA_TYPE_TIMESTAMP); } break; case 147: /* type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy248 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, &yymsp[-1].minor.yy0); } +{ yymsp[-3].minor.yy490 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, &yymsp[-1].minor.yy0); } break; case 148: /* type_name ::= TINYINT UNSIGNED */ -{ yymsp[-1].minor.yy248 = createDataType(TSDB_DATA_TYPE_UTINYINT); } +{ yymsp[-1].minor.yy490 = createDataType(TSDB_DATA_TYPE_UTINYINT); } break; case 149: /* type_name ::= SMALLINT UNSIGNED */ -{ yymsp[-1].minor.yy248 = createDataType(TSDB_DATA_TYPE_USMALLINT); } +{ yymsp[-1].minor.yy490 = createDataType(TSDB_DATA_TYPE_USMALLINT); } break; case 150: /* type_name ::= INT UNSIGNED */ -{ yymsp[-1].minor.yy248 = createDataType(TSDB_DATA_TYPE_UINT); } +{ yymsp[-1].minor.yy490 = createDataType(TSDB_DATA_TYPE_UINT); } break; case 151: /* type_name ::= BIGINT UNSIGNED */ -{ yymsp[-1].minor.yy248 = createDataType(TSDB_DATA_TYPE_UBIGINT); } +{ yymsp[-1].minor.yy490 = createDataType(TSDB_DATA_TYPE_UBIGINT); } break; case 152: /* type_name ::= JSON */ -{ yymsp[0].minor.yy248 = createDataType(TSDB_DATA_TYPE_JSON); } +{ yymsp[0].minor.yy490 = createDataType(TSDB_DATA_TYPE_JSON); } break; case 153: /* type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy248 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, &yymsp[-1].minor.yy0); } +{ yymsp[-3].minor.yy490 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, &yymsp[-1].minor.yy0); } break; case 154: /* type_name ::= MEDIUMBLOB */ -{ yymsp[0].minor.yy248 = createDataType(TSDB_DATA_TYPE_MEDIUMBLOB); } +{ yymsp[0].minor.yy490 = createDataType(TSDB_DATA_TYPE_MEDIUMBLOB); } break; case 155: /* type_name ::= BLOB */ -{ yymsp[0].minor.yy248 = createDataType(TSDB_DATA_TYPE_BLOB); } +{ yymsp[0].minor.yy490 = createDataType(TSDB_DATA_TYPE_BLOB); } break; case 156: /* type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy248 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, &yymsp[-1].minor.yy0); } +{ yymsp[-3].minor.yy490 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, &yymsp[-1].minor.yy0); } break; case 157: /* type_name ::= DECIMAL */ -{ yymsp[0].minor.yy248 = createDataType(TSDB_DATA_TYPE_DECIMAL); } +{ yymsp[0].minor.yy490 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; case 158: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy248 = createDataType(TSDB_DATA_TYPE_DECIMAL); } +{ yymsp[-3].minor.yy490 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; case 159: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ -{ yymsp[-5].minor.yy248 = createDataType(TSDB_DATA_TYPE_DECIMAL); } +{ yymsp[-5].minor.yy490 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; case 161: /* tags_def_opt ::= tags_def */ - case 338: /* star_func_para_list ::= other_para_list */ yytestcase(yyruleno==338); - case 393: /* select_list ::= select_sublist */ yytestcase(yyruleno==393); -{ yylhsminor.yy60 = yymsp[0].minor.yy60; } - yymsp[0].minor.yy60 = yylhsminor.yy60; + case 337: /* star_func_para_list ::= other_para_list */ yytestcase(yyruleno==337); + case 392: /* select_list ::= select_sublist */ yytestcase(yyruleno==392); +{ yylhsminor.yy670 = yymsp[0].minor.yy670; } + yymsp[0].minor.yy670 = yylhsminor.yy670; break; case 162: /* tags_def ::= TAGS NK_LP column_def_list NK_RP */ -{ yymsp[-3].minor.yy60 = yymsp[-1].minor.yy60; } +{ yymsp[-3].minor.yy670 = yymsp[-1].minor.yy670; } break; case 163: /* table_options ::= */ -{ yymsp[1].minor.yy172 = createDefaultTableOptions(pCxt); } +{ yymsp[1].minor.yy686 = createDefaultTableOptions(pCxt); } break; case 164: /* table_options ::= table_options COMMENT NK_STRING */ -{ yylhsminor.yy172 = setTableOption(pCxt, yymsp[-2].minor.yy172, TABLE_OPTION_COMMENT, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; - break; - case 165: /* table_options ::= table_options DELAY NK_INTEGER */ -{ yylhsminor.yy172 = setTableOption(pCxt, yymsp[-2].minor.yy172, TABLE_OPTION_DELAY, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; +{ yylhsminor.yy686 = setTableOption(pCxt, yymsp[-2].minor.yy686, TABLE_OPTION_COMMENT, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy686 = yylhsminor.yy686; break; - case 166: /* table_options ::= table_options FILE_FACTOR NK_FLOAT */ -{ yylhsminor.yy172 = setTableOption(pCxt, yymsp[-2].minor.yy172, TABLE_OPTION_FILE_FACTOR, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; + case 165: /* table_options ::= table_options FILE_FACTOR NK_FLOAT */ +{ yylhsminor.yy686 = setTableOption(pCxt, yymsp[-2].minor.yy686, TABLE_OPTION_FILE_FACTOR, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy686 = yylhsminor.yy686; break; - case 167: /* table_options ::= table_options ROLLUP NK_LP func_name_list NK_RP */ -{ yylhsminor.yy172 = setTableOption(pCxt, yymsp[-4].minor.yy172, TABLE_OPTION_ROLLUP, yymsp[-1].minor.yy60); } - yymsp[-4].minor.yy172 = yylhsminor.yy172; + case 166: /* table_options ::= table_options ROLLUP NK_LP func_name_list NK_RP */ +{ yylhsminor.yy686 = setTableOption(pCxt, yymsp[-4].minor.yy686, TABLE_OPTION_ROLLUP, yymsp[-1].minor.yy670); } + yymsp[-4].minor.yy686 = yylhsminor.yy686; break; - case 168: /* table_options ::= table_options TTL NK_INTEGER */ -{ yylhsminor.yy172 = setTableOption(pCxt, yymsp[-2].minor.yy172, TABLE_OPTION_TTL, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; + case 167: /* table_options ::= table_options TTL NK_INTEGER */ +{ yylhsminor.yy686 = setTableOption(pCxt, yymsp[-2].minor.yy686, TABLE_OPTION_TTL, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy686 = yylhsminor.yy686; break; - case 169: /* table_options ::= table_options SMA NK_LP col_name_list NK_RP */ -{ yylhsminor.yy172 = setTableOption(pCxt, yymsp[-4].minor.yy172, TABLE_OPTION_SMA, yymsp[-1].minor.yy60); } - yymsp[-4].minor.yy172 = yylhsminor.yy172; + case 168: /* table_options ::= table_options SMA NK_LP col_name_list NK_RP */ +{ yylhsminor.yy686 = setTableOption(pCxt, yymsp[-4].minor.yy686, TABLE_OPTION_SMA, yymsp[-1].minor.yy670); } + yymsp[-4].minor.yy686 = yylhsminor.yy686; break; - case 170: /* alter_table_options ::= alter_table_option */ -{ yylhsminor.yy172 = createAlterTableOptions(pCxt); yylhsminor.yy172 = setTableOption(pCxt, yylhsminor.yy172, yymsp[0].minor.yy609.type, &yymsp[0].minor.yy609.val); } - yymsp[0].minor.yy172 = yylhsminor.yy172; + case 169: /* alter_table_options ::= alter_table_option */ +{ yylhsminor.yy686 = createAlterTableOptions(pCxt); yylhsminor.yy686 = setTableOption(pCxt, yylhsminor.yy686, yymsp[0].minor.yy53.type, &yymsp[0].minor.yy53.val); } + yymsp[0].minor.yy686 = yylhsminor.yy686; break; - case 171: /* alter_table_options ::= alter_table_options alter_table_option */ -{ yylhsminor.yy172 = setTableOption(pCxt, yymsp[-1].minor.yy172, yymsp[0].minor.yy609.type, &yymsp[0].minor.yy609.val); } - yymsp[-1].minor.yy172 = yylhsminor.yy172; + case 170: /* alter_table_options ::= alter_table_options alter_table_option */ +{ yylhsminor.yy686 = setTableOption(pCxt, yymsp[-1].minor.yy686, yymsp[0].minor.yy53.type, &yymsp[0].minor.yy53.val); } + yymsp[-1].minor.yy686 = yylhsminor.yy686; break; - case 172: /* alter_table_option ::= COMMENT NK_STRING */ -{ yymsp[-1].minor.yy609.type = TABLE_OPTION_COMMENT; yymsp[-1].minor.yy609.val = yymsp[0].minor.yy0; } + case 171: /* alter_table_option ::= COMMENT NK_STRING */ +{ yymsp[-1].minor.yy53.type = TABLE_OPTION_COMMENT; yymsp[-1].minor.yy53.val = yymsp[0].minor.yy0; } break; - case 173: /* alter_table_option ::= TTL NK_INTEGER */ -{ yymsp[-1].minor.yy609.type = TABLE_OPTION_TTL; yymsp[-1].minor.yy609.val = yymsp[0].minor.yy0; } + case 172: /* alter_table_option ::= TTL NK_INTEGER */ +{ yymsp[-1].minor.yy53.type = TABLE_OPTION_TTL; yymsp[-1].minor.yy53.val = yymsp[0].minor.yy0; } break; - case 176: /* col_name ::= column_name */ -{ yylhsminor.yy172 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy105); } - yymsp[0].minor.yy172 = yylhsminor.yy172; + case 175: /* col_name ::= column_name */ +{ yylhsminor.yy686 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy113); } + yymsp[0].minor.yy686 = yylhsminor.yy686; break; - case 177: /* cmd ::= SHOW DNODES */ + case 176: /* cmd ::= SHOW DNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DNODES_STMT, NULL, NULL); } break; - case 178: /* cmd ::= SHOW USERS */ + case 177: /* cmd ::= SHOW USERS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_USERS_STMT, NULL, NULL); } break; - case 179: /* cmd ::= SHOW DATABASES */ + case 178: /* cmd ::= SHOW DATABASES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DATABASES_STMT, NULL, NULL); } break; - case 180: /* cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */ -{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TABLES_STMT, yymsp[-2].minor.yy172, yymsp[0].minor.yy172); } + case 179: /* cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */ +{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TABLES_STMT, yymsp[-2].minor.yy686, yymsp[0].minor.yy686); } break; - case 181: /* cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ -{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_STABLES_STMT, yymsp[-2].minor.yy172, yymsp[0].minor.yy172); } + case 180: /* cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ +{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_STABLES_STMT, yymsp[-2].minor.yy686, yymsp[0].minor.yy686); } break; - case 182: /* cmd ::= SHOW db_name_cond_opt VGROUPS */ -{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, yymsp[-1].minor.yy172, NULL); } + case 181: /* cmd ::= SHOW db_name_cond_opt VGROUPS */ +{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, yymsp[-1].minor.yy686, NULL); } break; - case 183: /* cmd ::= SHOW MNODES */ + case 182: /* cmd ::= SHOW MNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_MNODES_STMT, NULL, NULL); } break; - case 184: /* cmd ::= SHOW MODULES */ + case 183: /* cmd ::= SHOW MODULES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_MODULES_STMT, NULL, NULL); } break; - case 185: /* cmd ::= SHOW QNODES */ + case 184: /* cmd ::= SHOW QNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QNODES_STMT, NULL, NULL); } break; - case 186: /* cmd ::= SHOW FUNCTIONS */ + case 185: /* cmd ::= SHOW FUNCTIONS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_FUNCTIONS_STMT, NULL, NULL); } break; - case 187: /* cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ -{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, yymsp[-1].minor.yy172, yymsp[0].minor.yy172); } + case 186: /* cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ +{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, yymsp[-1].minor.yy686, yymsp[0].minor.yy686); } break; - case 188: /* cmd ::= SHOW STREAMS */ + case 187: /* cmd ::= SHOW STREAMS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_STREAMS_STMT, NULL, NULL); } break; - case 189: /* cmd ::= SHOW ACCOUNTS */ + case 188: /* cmd ::= SHOW ACCOUNTS */ { pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); } break; - case 190: /* cmd ::= SHOW APPS */ + case 189: /* cmd ::= SHOW APPS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_APPS_STMT, NULL, NULL); } break; - case 191: /* cmd ::= SHOW CONNECTIONS */ + case 190: /* cmd ::= SHOW CONNECTIONS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CONNECTIONS_STMT, NULL, NULL); } break; - case 192: /* cmd ::= SHOW LICENCE */ - case 193: /* cmd ::= SHOW GRANTS */ yytestcase(yyruleno==193); + case 191: /* cmd ::= SHOW LICENCE */ + case 192: /* cmd ::= SHOW GRANTS */ yytestcase(yyruleno==192); { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LICENCE_STMT, NULL, NULL); } break; - case 194: /* cmd ::= SHOW CREATE DATABASE db_name */ -{ pCxt->pRootNode = createShowCreateDatabaseStmt(pCxt, &yymsp[0].minor.yy105); } + case 193: /* cmd ::= SHOW CREATE DATABASE db_name */ +{ pCxt->pRootNode = createShowCreateDatabaseStmt(pCxt, &yymsp[0].minor.yy113); } break; - case 195: /* cmd ::= SHOW CREATE TABLE full_table_name */ -{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_TABLE_STMT, yymsp[0].minor.yy172); } + case 194: /* cmd ::= SHOW CREATE TABLE full_table_name */ +{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_TABLE_STMT, yymsp[0].minor.yy686); } break; - case 196: /* cmd ::= SHOW CREATE STABLE full_table_name */ -{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_STABLE_STMT, yymsp[0].minor.yy172); } + case 195: /* cmd ::= SHOW CREATE STABLE full_table_name */ +{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_STABLE_STMT, yymsp[0].minor.yy686); } break; - case 197: /* cmd ::= SHOW QUERIES */ + case 196: /* cmd ::= SHOW QUERIES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QUERIES_STMT, NULL, NULL); } break; - case 198: /* cmd ::= SHOW SCORES */ + case 197: /* cmd ::= SHOW SCORES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SCORES_STMT, NULL, NULL); } break; - case 199: /* cmd ::= SHOW TOPICS */ + case 198: /* cmd ::= SHOW TOPICS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TOPICS_STMT, NULL, NULL); } break; - case 200: /* cmd ::= SHOW VARIABLES */ + case 199: /* cmd ::= SHOW VARIABLES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_VARIABLE_STMT, NULL, NULL); } break; - case 201: /* cmd ::= SHOW BNODES */ + case 200: /* cmd ::= SHOW BNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_BNODES_STMT, NULL, NULL); } break; - case 202: /* cmd ::= SHOW SNODES */ + case 201: /* cmd ::= SHOW SNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SNODES_STMT, NULL, NULL); } break; - case 203: /* cmd ::= SHOW CLUSTER */ + case 202: /* cmd ::= SHOW CLUSTER */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CLUSTER_STMT, NULL, NULL); } break; - case 204: /* cmd ::= SHOW TRANSACTIONS */ + case 203: /* cmd ::= SHOW TRANSACTIONS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TRANSACTIONS_STMT, NULL, NULL); } break; - case 205: /* db_name_cond_opt ::= */ - case 210: /* from_db_opt ::= */ yytestcase(yyruleno==210); -{ yymsp[1].minor.yy172 = createDefaultDatabaseCondValue(pCxt); } + case 204: /* db_name_cond_opt ::= */ + case 209: /* from_db_opt ::= */ yytestcase(yyruleno==209); +{ yymsp[1].minor.yy686 = createDefaultDatabaseCondValue(pCxt); } break; - case 206: /* db_name_cond_opt ::= db_name NK_DOT */ -{ yylhsminor.yy172 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy105); } - yymsp[-1].minor.yy172 = yylhsminor.yy172; + case 205: /* db_name_cond_opt ::= db_name NK_DOT */ +{ yylhsminor.yy686 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy113); } + yymsp[-1].minor.yy686 = yylhsminor.yy686; break; - case 207: /* like_pattern_opt ::= */ - case 218: /* index_options ::= */ yytestcase(yyruleno==218); - case 247: /* into_opt ::= */ yytestcase(yyruleno==247); - case 400: /* where_clause_opt ::= */ yytestcase(yyruleno==400); - case 404: /* twindow_clause_opt ::= */ yytestcase(yyruleno==404); - case 409: /* sliding_opt ::= */ yytestcase(yyruleno==409); - case 411: /* fill_opt ::= */ yytestcase(yyruleno==411); - case 423: /* having_clause_opt ::= */ yytestcase(yyruleno==423); - case 433: /* slimit_clause_opt ::= */ yytestcase(yyruleno==433); - case 437: /* limit_clause_opt ::= */ yytestcase(yyruleno==437); -{ yymsp[1].minor.yy172 = NULL; } + case 206: /* like_pattern_opt ::= */ + case 217: /* index_options ::= */ yytestcase(yyruleno==217); + case 246: /* into_opt ::= */ yytestcase(yyruleno==246); + case 399: /* where_clause_opt ::= */ yytestcase(yyruleno==399); + case 403: /* twindow_clause_opt ::= */ yytestcase(yyruleno==403); + case 408: /* sliding_opt ::= */ yytestcase(yyruleno==408); + case 410: /* fill_opt ::= */ yytestcase(yyruleno==410); + case 422: /* having_clause_opt ::= */ yytestcase(yyruleno==422); + case 432: /* slimit_clause_opt ::= */ yytestcase(yyruleno==432); + case 436: /* limit_clause_opt ::= */ yytestcase(yyruleno==436); +{ yymsp[1].minor.yy686 = NULL; } break; - case 208: /* like_pattern_opt ::= LIKE NK_STRING */ -{ yymsp[-1].minor.yy172 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } + case 207: /* like_pattern_opt ::= LIKE NK_STRING */ +{ yymsp[-1].minor.yy686 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } break; - case 209: /* table_name_cond ::= table_name */ -{ yylhsminor.yy172 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy105); } - yymsp[0].minor.yy172 = yylhsminor.yy172; + case 208: /* table_name_cond ::= table_name */ +{ yylhsminor.yy686 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy113); } + yymsp[0].minor.yy686 = yylhsminor.yy686; break; - case 211: /* from_db_opt ::= FROM db_name */ -{ yymsp[-1].minor.yy172 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy105); } + case 210: /* from_db_opt ::= FROM db_name */ +{ yymsp[-1].minor.yy686 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy113); } break; - case 214: /* func_name ::= function_name */ -{ yylhsminor.yy172 = createFunctionNode(pCxt, &yymsp[0].minor.yy105, NULL); } - yymsp[0].minor.yy172 = yylhsminor.yy172; + case 213: /* func_name ::= function_name */ +{ yylhsminor.yy686 = createFunctionNode(pCxt, &yymsp[0].minor.yy113, NULL); } + yymsp[0].minor.yy686 = yylhsminor.yy686; break; - case 215: /* cmd ::= CREATE SMA INDEX not_exists_opt index_name ON table_name index_options */ -{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_SMA, yymsp[-4].minor.yy617, &yymsp[-3].minor.yy105, &yymsp[-1].minor.yy105, NULL, yymsp[0].minor.yy172); } + case 214: /* cmd ::= CREATE SMA INDEX not_exists_opt index_name ON table_name index_options */ +{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_SMA, yymsp[-4].minor.yy131, &yymsp[-3].minor.yy113, &yymsp[-1].minor.yy113, NULL, yymsp[0].minor.yy686); } break; - case 216: /* cmd ::= CREATE FULLTEXT INDEX not_exists_opt index_name ON table_name NK_LP col_name_list NK_RP */ -{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_FULLTEXT, yymsp[-6].minor.yy617, &yymsp[-5].minor.yy105, &yymsp[-3].minor.yy105, yymsp[-1].minor.yy60, NULL); } + case 215: /* cmd ::= CREATE FULLTEXT INDEX not_exists_opt index_name ON table_name NK_LP col_name_list NK_RP */ +{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_FULLTEXT, yymsp[-6].minor.yy131, &yymsp[-5].minor.yy113, &yymsp[-3].minor.yy113, yymsp[-1].minor.yy670, NULL); } break; - case 217: /* cmd ::= DROP INDEX exists_opt index_name ON table_name */ -{ pCxt->pRootNode = createDropIndexStmt(pCxt, yymsp[-3].minor.yy617, &yymsp[-2].minor.yy105, &yymsp[0].minor.yy105); } + case 216: /* cmd ::= DROP INDEX exists_opt index_name ON table_name */ +{ pCxt->pRootNode = createDropIndexStmt(pCxt, yymsp[-3].minor.yy131, &yymsp[-2].minor.yy113, &yymsp[0].minor.yy113); } break; - case 219: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt */ -{ yymsp[-8].minor.yy172 = createIndexOption(pCxt, yymsp[-6].minor.yy60, releaseRawExprNode(pCxt, yymsp[-2].minor.yy172), NULL, yymsp[0].minor.yy172); } + case 218: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt */ +{ yymsp[-8].minor.yy686 = createIndexOption(pCxt, yymsp[-6].minor.yy670, releaseRawExprNode(pCxt, yymsp[-2].minor.yy686), NULL, yymsp[0].minor.yy686); } break; - case 220: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt */ -{ yymsp[-10].minor.yy172 = createIndexOption(pCxt, yymsp[-8].minor.yy60, releaseRawExprNode(pCxt, yymsp[-4].minor.yy172), releaseRawExprNode(pCxt, yymsp[-2].minor.yy172), yymsp[0].minor.yy172); } + case 219: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt */ +{ yymsp[-10].minor.yy686 = createIndexOption(pCxt, yymsp[-8].minor.yy670, releaseRawExprNode(pCxt, yymsp[-4].minor.yy686), releaseRawExprNode(pCxt, yymsp[-2].minor.yy686), yymsp[0].minor.yy686); } break; - case 223: /* func ::= function_name NK_LP expression_list NK_RP */ -{ yylhsminor.yy172 = createFunctionNode(pCxt, &yymsp[-3].minor.yy105, yymsp[-1].minor.yy60); } - yymsp[-3].minor.yy172 = yylhsminor.yy172; + case 222: /* func ::= function_name NK_LP expression_list NK_RP */ +{ yylhsminor.yy686 = createFunctionNode(pCxt, &yymsp[-3].minor.yy113, yymsp[-1].minor.yy670); } + yymsp[-3].minor.yy686 = yylhsminor.yy686; break; - case 224: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_expression */ -{ pCxt->pRootNode = createCreateTopicStmt(pCxt, yymsp[-3].minor.yy617, &yymsp[-2].minor.yy105, yymsp[0].minor.yy172, NULL, NULL); } + case 223: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_expression */ +{ pCxt->pRootNode = createCreateTopicStmt(pCxt, yymsp[-3].minor.yy131, &yymsp[-2].minor.yy113, yymsp[0].minor.yy686, NULL, NULL); } break; - case 225: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name */ -{ pCxt->pRootNode = createCreateTopicStmt(pCxt, yymsp[-4].minor.yy617, &yymsp[-3].minor.yy105, NULL, &yymsp[0].minor.yy105, NULL); } + case 224: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name */ +{ pCxt->pRootNode = createCreateTopicStmt(pCxt, yymsp[-4].minor.yy131, &yymsp[-3].minor.yy113, NULL, &yymsp[0].minor.yy113, NULL); } break; - case 226: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name */ -{ pCxt->pRootNode = createCreateTopicStmt(pCxt, yymsp[-4].minor.yy617, &yymsp[-3].minor.yy105, NULL, NULL, yymsp[0].minor.yy172); } + case 225: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name */ +{ pCxt->pRootNode = createCreateTopicStmt(pCxt, yymsp[-4].minor.yy131, &yymsp[-3].minor.yy113, NULL, NULL, yymsp[0].minor.yy686); } break; - case 227: /* cmd ::= DROP TOPIC exists_opt topic_name */ -{ pCxt->pRootNode = createDropTopicStmt(pCxt, yymsp[-1].minor.yy617, &yymsp[0].minor.yy105); } + case 226: /* cmd ::= DROP TOPIC exists_opt topic_name */ +{ pCxt->pRootNode = createDropTopicStmt(pCxt, yymsp[-1].minor.yy131, &yymsp[0].minor.yy113); } break; - case 228: /* cmd ::= DROP CGROUP exists_opt cgroup_name ON topic_name */ -{ pCxt->pRootNode = createDropCGroupStmt(pCxt, yymsp[-3].minor.yy617, &yymsp[-2].minor.yy105, &yymsp[0].minor.yy105); } + case 227: /* cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ +{ pCxt->pRootNode = createDropCGroupStmt(pCxt, yymsp[-3].minor.yy131, &yymsp[-2].minor.yy113, &yymsp[0].minor.yy113); } break; - case 229: /* cmd ::= DESC full_table_name */ - case 230: /* cmd ::= DESCRIBE full_table_name */ yytestcase(yyruleno==230); -{ pCxt->pRootNode = createDescribeStmt(pCxt, yymsp[0].minor.yy172); } + case 228: /* cmd ::= DESC full_table_name */ + case 229: /* cmd ::= DESCRIBE full_table_name */ yytestcase(yyruleno==229); +{ pCxt->pRootNode = createDescribeStmt(pCxt, yymsp[0].minor.yy686); } break; - case 231: /* cmd ::= RESET QUERY CACHE */ + case 230: /* cmd ::= RESET QUERY CACHE */ { pCxt->pRootNode = createResetQueryCacheStmt(pCxt); } break; - case 232: /* cmd ::= EXPLAIN analyze_opt explain_options query_expression */ -{ pCxt->pRootNode = createExplainStmt(pCxt, yymsp[-2].minor.yy617, yymsp[-1].minor.yy172, yymsp[0].minor.yy172); } + case 231: /* cmd ::= EXPLAIN analyze_opt explain_options query_expression */ +{ pCxt->pRootNode = createExplainStmt(pCxt, yymsp[-2].minor.yy131, yymsp[-1].minor.yy686, yymsp[0].minor.yy686); } break; - case 234: /* analyze_opt ::= ANALYZE */ - case 242: /* agg_func_opt ::= AGGREGATE */ yytestcase(yyruleno==242); - case 390: /* set_quantifier_opt ::= DISTINCT */ yytestcase(yyruleno==390); -{ yymsp[0].minor.yy617 = true; } + case 233: /* analyze_opt ::= ANALYZE */ + case 241: /* agg_func_opt ::= AGGREGATE */ yytestcase(yyruleno==241); + case 389: /* set_quantifier_opt ::= DISTINCT */ yytestcase(yyruleno==389); +{ yymsp[0].minor.yy131 = true; } break; - case 235: /* explain_options ::= */ -{ yymsp[1].minor.yy172 = createDefaultExplainOptions(pCxt); } + case 234: /* explain_options ::= */ +{ yymsp[1].minor.yy686 = createDefaultExplainOptions(pCxt); } break; - case 236: /* explain_options ::= explain_options VERBOSE NK_BOOL */ -{ yylhsminor.yy172 = setExplainVerbose(pCxt, yymsp[-2].minor.yy172, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; + case 235: /* explain_options ::= explain_options VERBOSE NK_BOOL */ +{ yylhsminor.yy686 = setExplainVerbose(pCxt, yymsp[-2].minor.yy686, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy686 = yylhsminor.yy686; break; - case 237: /* explain_options ::= explain_options RATIO NK_FLOAT */ -{ yylhsminor.yy172 = setExplainRatio(pCxt, yymsp[-2].minor.yy172, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; + case 236: /* explain_options ::= explain_options RATIO NK_FLOAT */ +{ yylhsminor.yy686 = setExplainRatio(pCxt, yymsp[-2].minor.yy686, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy686 = yylhsminor.yy686; break; - case 238: /* cmd ::= COMPACT VNODES IN NK_LP integer_list NK_RP */ -{ pCxt->pRootNode = createCompactStmt(pCxt, yymsp[-1].minor.yy60); } + case 237: /* cmd ::= COMPACT VNODES IN NK_LP integer_list NK_RP */ +{ pCxt->pRootNode = createCompactStmt(pCxt, yymsp[-1].minor.yy670); } break; - case 239: /* cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt */ -{ pCxt->pRootNode = createCreateFunctionStmt(pCxt, yymsp[-6].minor.yy617, yymsp[-8].minor.yy617, &yymsp[-5].minor.yy105, &yymsp[-3].minor.yy0, yymsp[-1].minor.yy248, yymsp[0].minor.yy140); } + case 238: /* cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt */ +{ pCxt->pRootNode = createCreateFunctionStmt(pCxt, yymsp[-6].minor.yy131, yymsp[-8].minor.yy131, &yymsp[-5].minor.yy113, &yymsp[-3].minor.yy0, yymsp[-1].minor.yy490, yymsp[0].minor.yy550); } break; - case 240: /* cmd ::= DROP FUNCTION exists_opt function_name */ -{ pCxt->pRootNode = createDropFunctionStmt(pCxt, yymsp[-1].minor.yy617, &yymsp[0].minor.yy105); } + case 239: /* cmd ::= DROP FUNCTION exists_opt function_name */ +{ pCxt->pRootNode = createDropFunctionStmt(pCxt, yymsp[-1].minor.yy131, &yymsp[0].minor.yy113); } break; - case 243: /* bufsize_opt ::= */ -{ yymsp[1].minor.yy140 = 0; } + case 242: /* bufsize_opt ::= */ +{ yymsp[1].minor.yy550 = 0; } break; - case 244: /* bufsize_opt ::= BUFSIZE NK_INTEGER */ -{ yymsp[-1].minor.yy140 = taosStr2Int32(yymsp[0].minor.yy0.z, NULL, 10); } + case 243: /* bufsize_opt ::= BUFSIZE NK_INTEGER */ +{ yymsp[-1].minor.yy550 = taosStr2Int32(yymsp[0].minor.yy0.z, NULL, 10); } break; - case 245: /* cmd ::= CREATE STREAM not_exists_opt stream_name stream_options into_opt AS query_expression */ -{ pCxt->pRootNode = createCreateStreamStmt(pCxt, yymsp[-5].minor.yy617, &yymsp[-4].minor.yy105, yymsp[-2].minor.yy172, yymsp[-3].minor.yy172, yymsp[0].minor.yy172); } + case 244: /* cmd ::= CREATE STREAM not_exists_opt stream_name stream_options into_opt AS query_expression */ +{ pCxt->pRootNode = createCreateStreamStmt(pCxt, yymsp[-5].minor.yy131, &yymsp[-4].minor.yy113, yymsp[-2].minor.yy686, yymsp[-3].minor.yy686, yymsp[0].minor.yy686); } break; - case 246: /* cmd ::= DROP STREAM exists_opt stream_name */ -{ pCxt->pRootNode = createDropStreamStmt(pCxt, yymsp[-1].minor.yy617, &yymsp[0].minor.yy105); } + case 245: /* cmd ::= DROP STREAM exists_opt stream_name */ +{ pCxt->pRootNode = createDropStreamStmt(pCxt, yymsp[-1].minor.yy131, &yymsp[0].minor.yy113); } break; - case 248: /* into_opt ::= INTO full_table_name */ - case 371: /* from_clause ::= FROM table_reference_list */ yytestcase(yyruleno==371); - case 401: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==401); - case 424: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==424); -{ yymsp[-1].minor.yy172 = yymsp[0].minor.yy172; } + case 247: /* into_opt ::= INTO full_table_name */ + case 370: /* from_clause ::= FROM table_reference_list */ yytestcase(yyruleno==370); + case 400: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==400); + case 423: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==423); +{ yymsp[-1].minor.yy686 = yymsp[0].minor.yy686; } break; - case 249: /* stream_options ::= */ -{ yymsp[1].minor.yy172 = createStreamOptions(pCxt); } + case 248: /* stream_options ::= */ +{ yymsp[1].minor.yy686 = createStreamOptions(pCxt); } break; - case 250: /* stream_options ::= stream_options TRIGGER AT_ONCE */ -{ ((SStreamOptions*)yymsp[-2].minor.yy172)->triggerType = STREAM_TRIGGER_AT_ONCE; yylhsminor.yy172 = yymsp[-2].minor.yy172; } - yymsp[-2].minor.yy172 = yylhsminor.yy172; + case 249: /* stream_options ::= stream_options TRIGGER AT_ONCE */ +{ ((SStreamOptions*)yymsp[-2].minor.yy686)->triggerType = STREAM_TRIGGER_AT_ONCE; yylhsminor.yy686 = yymsp[-2].minor.yy686; } + yymsp[-2].minor.yy686 = yylhsminor.yy686; break; - case 251: /* stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ -{ ((SStreamOptions*)yymsp[-2].minor.yy172)->triggerType = STREAM_TRIGGER_WINDOW_CLOSE; yylhsminor.yy172 = yymsp[-2].minor.yy172; } - yymsp[-2].minor.yy172 = yylhsminor.yy172; + case 250: /* stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ +{ ((SStreamOptions*)yymsp[-2].minor.yy686)->triggerType = STREAM_TRIGGER_WINDOW_CLOSE; yylhsminor.yy686 = yymsp[-2].minor.yy686; } + yymsp[-2].minor.yy686 = yylhsminor.yy686; break; - case 252: /* stream_options ::= stream_options WATERMARK duration_literal */ -{ ((SStreamOptions*)yymsp[-2].minor.yy172)->pWatermark = releaseRawExprNode(pCxt, yymsp[0].minor.yy172); yylhsminor.yy172 = yymsp[-2].minor.yy172; } - yymsp[-2].minor.yy172 = yylhsminor.yy172; + case 251: /* stream_options ::= stream_options WATERMARK duration_literal */ +{ ((SStreamOptions*)yymsp[-2].minor.yy686)->pWatermark = releaseRawExprNode(pCxt, yymsp[0].minor.yy686); yylhsminor.yy686 = yymsp[-2].minor.yy686; } + yymsp[-2].minor.yy686 = yylhsminor.yy686; break; - case 253: /* cmd ::= KILL CONNECTION NK_INTEGER */ + case 252: /* cmd ::= KILL CONNECTION NK_INTEGER */ { pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_CONNECTION_STMT, &yymsp[0].minor.yy0); } break; - case 254: /* cmd ::= KILL QUERY NK_INTEGER */ + case 253: /* cmd ::= KILL QUERY NK_INTEGER */ { pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_QUERY_STMT, &yymsp[0].minor.yy0); } break; - case 255: /* cmd ::= KILL TRANSACTION NK_INTEGER */ + case 254: /* cmd ::= KILL TRANSACTION NK_INTEGER */ { pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_TRANSACTION_STMT, &yymsp[0].minor.yy0); } break; - case 256: /* cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ + case 255: /* cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ { pCxt->pRootNode = createMergeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } break; - case 257: /* cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ -{ pCxt->pRootNode = createRedistributeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy60); } + case 256: /* cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ +{ pCxt->pRootNode = createRedistributeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy670); } break; - case 258: /* cmd ::= SPLIT VGROUP NK_INTEGER */ + case 257: /* cmd ::= SPLIT VGROUP NK_INTEGER */ { pCxt->pRootNode = createSplitVgroupStmt(pCxt, &yymsp[0].minor.yy0); } break; - case 259: /* dnode_list ::= DNODE NK_INTEGER */ -{ yymsp[-1].minor.yy60 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } - break; - case 261: /* cmd ::= SYNCDB db_name REPLICA */ -{ pCxt->pRootNode = createSyncdbStmt(pCxt, &yymsp[-1].minor.yy105); } - break; - case 263: /* literal ::= NK_INTEGER */ -{ yylhsminor.yy172 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy172 = yylhsminor.yy172; - break; - case 264: /* literal ::= NK_FLOAT */ -{ yylhsminor.yy172 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy172 = yylhsminor.yy172; - break; - case 265: /* literal ::= NK_STRING */ -{ yylhsminor.yy172 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy172 = yylhsminor.yy172; - break; - case 266: /* literal ::= NK_BOOL */ -{ yylhsminor.yy172 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy172 = yylhsminor.yy172; - break; - case 267: /* literal ::= TIMESTAMP NK_STRING */ -{ yylhsminor.yy172 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0)); } - yymsp[-1].minor.yy172 = yylhsminor.yy172; - break; - case 268: /* literal ::= duration_literal */ - case 278: /* signed_literal ::= signed */ yytestcase(yyruleno==278); - case 298: /* expression ::= literal */ yytestcase(yyruleno==298); - case 299: /* expression ::= pseudo_column */ yytestcase(yyruleno==299); - case 300: /* expression ::= column_reference */ yytestcase(yyruleno==300); - case 301: /* expression ::= function_expression */ yytestcase(yyruleno==301); - case 302: /* expression ::= subquery */ yytestcase(yyruleno==302); - case 327: /* function_expression ::= literal_func */ yytestcase(yyruleno==327); - case 363: /* boolean_value_expression ::= boolean_primary */ yytestcase(yyruleno==363); - case 367: /* boolean_primary ::= predicate */ yytestcase(yyruleno==367); - case 369: /* common_expression ::= expression */ yytestcase(yyruleno==369); - case 370: /* common_expression ::= boolean_value_expression */ yytestcase(yyruleno==370); - case 372: /* table_reference_list ::= table_reference */ yytestcase(yyruleno==372); - case 374: /* table_reference ::= table_primary */ yytestcase(yyruleno==374); - case 375: /* table_reference ::= joined_table */ yytestcase(yyruleno==375); - case 379: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==379); - case 426: /* query_expression_body ::= query_primary */ yytestcase(yyruleno==426); - case 429: /* query_primary ::= query_specification */ yytestcase(yyruleno==429); -{ yylhsminor.yy172 = yymsp[0].minor.yy172; } - yymsp[0].minor.yy172 = yylhsminor.yy172; - break; - case 269: /* literal ::= NULL */ -{ yylhsminor.yy172 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy172 = yylhsminor.yy172; - break; - case 270: /* literal ::= NK_QUESTION */ -{ yylhsminor.yy172 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy172 = yylhsminor.yy172; - break; - case 271: /* duration_literal ::= NK_VARIABLE */ -{ yylhsminor.yy172 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy172 = yylhsminor.yy172; - break; - case 272: /* signed ::= NK_INTEGER */ -{ yylhsminor.yy172 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy172 = yylhsminor.yy172; - break; - case 273: /* signed ::= NK_PLUS NK_INTEGER */ -{ yymsp[-1].minor.yy172 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } - break; - case 274: /* signed ::= NK_MINUS NK_INTEGER */ + case 258: /* dnode_list ::= DNODE NK_INTEGER */ +{ yymsp[-1].minor.yy670 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } + break; + case 260: /* cmd ::= SYNCDB db_name REPLICA */ +{ pCxt->pRootNode = createSyncdbStmt(pCxt, &yymsp[-1].minor.yy113); } + break; + case 262: /* literal ::= NK_INTEGER */ +{ yylhsminor.yy686 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy686 = yylhsminor.yy686; + break; + case 263: /* literal ::= NK_FLOAT */ +{ yylhsminor.yy686 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy686 = yylhsminor.yy686; + break; + case 264: /* literal ::= NK_STRING */ +{ yylhsminor.yy686 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy686 = yylhsminor.yy686; + break; + case 265: /* literal ::= NK_BOOL */ +{ yylhsminor.yy686 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy686 = yylhsminor.yy686; + break; + case 266: /* literal ::= TIMESTAMP NK_STRING */ +{ yylhsminor.yy686 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0)); } + yymsp[-1].minor.yy686 = yylhsminor.yy686; + break; + case 267: /* literal ::= duration_literal */ + case 277: /* signed_literal ::= signed */ yytestcase(yyruleno==277); + case 297: /* expression ::= literal */ yytestcase(yyruleno==297); + case 298: /* expression ::= pseudo_column */ yytestcase(yyruleno==298); + case 299: /* expression ::= column_reference */ yytestcase(yyruleno==299); + case 300: /* expression ::= function_expression */ yytestcase(yyruleno==300); + case 301: /* expression ::= subquery */ yytestcase(yyruleno==301); + case 326: /* function_expression ::= literal_func */ yytestcase(yyruleno==326); + case 362: /* boolean_value_expression ::= boolean_primary */ yytestcase(yyruleno==362); + case 366: /* boolean_primary ::= predicate */ yytestcase(yyruleno==366); + case 368: /* common_expression ::= expression */ yytestcase(yyruleno==368); + case 369: /* common_expression ::= boolean_value_expression */ yytestcase(yyruleno==369); + case 371: /* table_reference_list ::= table_reference */ yytestcase(yyruleno==371); + case 373: /* table_reference ::= table_primary */ yytestcase(yyruleno==373); + case 374: /* table_reference ::= joined_table */ yytestcase(yyruleno==374); + case 378: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==378); + case 425: /* query_expression_body ::= query_primary */ yytestcase(yyruleno==425); + case 428: /* query_primary ::= query_specification */ yytestcase(yyruleno==428); +{ yylhsminor.yy686 = yymsp[0].minor.yy686; } + yymsp[0].minor.yy686 = yylhsminor.yy686; + break; + case 268: /* literal ::= NULL */ +{ yylhsminor.yy686 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy686 = yylhsminor.yy686; + break; + case 269: /* literal ::= NK_QUESTION */ +{ yylhsminor.yy686 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy686 = yylhsminor.yy686; + break; + case 270: /* duration_literal ::= NK_VARIABLE */ +{ yylhsminor.yy686 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy686 = yylhsminor.yy686; + break; + case 271: /* signed ::= NK_INTEGER */ +{ yylhsminor.yy686 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy686 = yylhsminor.yy686; + break; + case 272: /* signed ::= NK_PLUS NK_INTEGER */ +{ yymsp[-1].minor.yy686 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } + break; + case 273: /* signed ::= NK_MINUS NK_INTEGER */ { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yylhsminor.yy172 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &t); + yylhsminor.yy686 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &t); } - yymsp[-1].minor.yy172 = yylhsminor.yy172; + yymsp[-1].minor.yy686 = yylhsminor.yy686; break; - case 275: /* signed ::= NK_FLOAT */ -{ yylhsminor.yy172 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy172 = yylhsminor.yy172; + case 274: /* signed ::= NK_FLOAT */ +{ yylhsminor.yy686 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy686 = yylhsminor.yy686; break; - case 276: /* signed ::= NK_PLUS NK_FLOAT */ -{ yymsp[-1].minor.yy172 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } + case 275: /* signed ::= NK_PLUS NK_FLOAT */ +{ yymsp[-1].minor.yy686 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } break; - case 277: /* signed ::= NK_MINUS NK_FLOAT */ + case 276: /* signed ::= NK_MINUS NK_FLOAT */ { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yylhsminor.yy172 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &t); + yylhsminor.yy686 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &t); } - yymsp[-1].minor.yy172 = yylhsminor.yy172; + yymsp[-1].minor.yy686 = yylhsminor.yy686; break; - case 279: /* signed_literal ::= NK_STRING */ -{ yylhsminor.yy172 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy172 = yylhsminor.yy172; + case 278: /* signed_literal ::= NK_STRING */ +{ yylhsminor.yy686 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy686 = yylhsminor.yy686; break; - case 280: /* signed_literal ::= NK_BOOL */ -{ yylhsminor.yy172 = createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy172 = yylhsminor.yy172; + case 279: /* signed_literal ::= NK_BOOL */ +{ yylhsminor.yy686 = createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy686 = yylhsminor.yy686; break; - case 281: /* signed_literal ::= TIMESTAMP NK_STRING */ -{ yymsp[-1].minor.yy172 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } + case 280: /* signed_literal ::= TIMESTAMP NK_STRING */ +{ yymsp[-1].minor.yy686 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } break; - case 282: /* signed_literal ::= duration_literal */ - case 284: /* signed_literal ::= literal_func */ yytestcase(yyruleno==284); - case 341: /* star_func_para ::= expression */ yytestcase(yyruleno==341); - case 396: /* select_item ::= common_expression */ yytestcase(yyruleno==396); - case 442: /* search_condition ::= common_expression */ yytestcase(yyruleno==442); -{ yylhsminor.yy172 = releaseRawExprNode(pCxt, yymsp[0].minor.yy172); } - yymsp[0].minor.yy172 = yylhsminor.yy172; + case 281: /* signed_literal ::= duration_literal */ + case 283: /* signed_literal ::= literal_func */ yytestcase(yyruleno==283); + case 340: /* star_func_para ::= expression */ yytestcase(yyruleno==340); + case 395: /* select_item ::= common_expression */ yytestcase(yyruleno==395); + case 441: /* search_condition ::= common_expression */ yytestcase(yyruleno==441); +{ yylhsminor.yy686 = releaseRawExprNode(pCxt, yymsp[0].minor.yy686); } + yymsp[0].minor.yy686 = yylhsminor.yy686; break; - case 283: /* signed_literal ::= NULL */ -{ yylhsminor.yy172 = createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy172 = yylhsminor.yy172; + case 282: /* signed_literal ::= NULL */ +{ yylhsminor.yy686 = createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy686 = yylhsminor.yy686; break; - case 303: /* expression ::= NK_LP expression NK_RP */ - case 368: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==368); -{ yylhsminor.yy172 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy172)); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; + case 302: /* expression ::= NK_LP expression NK_RP */ + case 367: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==367); +{ yylhsminor.yy686 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy686)); } + yymsp[-2].minor.yy686 = yylhsminor.yy686; break; - case 304: /* expression ::= NK_PLUS expression */ + case 303: /* expression ::= NK_PLUS expression */ { - SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy172); - yylhsminor.yy172 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, releaseRawExprNode(pCxt, yymsp[0].minor.yy172)); + SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy686); + yylhsminor.yy686 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, releaseRawExprNode(pCxt, yymsp[0].minor.yy686)); } - yymsp[-1].minor.yy172 = yylhsminor.yy172; + yymsp[-1].minor.yy686 = yylhsminor.yy686; break; - case 305: /* expression ::= NK_MINUS expression */ + case 304: /* expression ::= NK_MINUS expression */ { - SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy172); - yylhsminor.yy172 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, createOperatorNode(pCxt, OP_TYPE_MINUS, releaseRawExprNode(pCxt, yymsp[0].minor.yy172), NULL)); + SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy686); + yylhsminor.yy686 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, createOperatorNode(pCxt, OP_TYPE_MINUS, releaseRawExprNode(pCxt, yymsp[0].minor.yy686), NULL)); } - yymsp[-1].minor.yy172 = yylhsminor.yy172; + yymsp[-1].minor.yy686 = yylhsminor.yy686; break; - case 306: /* expression ::= expression NK_PLUS expression */ + case 305: /* expression ::= expression NK_PLUS expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy172); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy172); - yylhsminor.yy172 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_ADD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy172), releaseRawExprNode(pCxt, yymsp[0].minor.yy172))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy686); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy686); + yylhsminor.yy686 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_ADD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy686), releaseRawExprNode(pCxt, yymsp[0].minor.yy686))); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; + yymsp[-2].minor.yy686 = yylhsminor.yy686; break; - case 307: /* expression ::= expression NK_MINUS expression */ + case 306: /* expression ::= expression NK_MINUS expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy172); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy172); - yylhsminor.yy172 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[-2].minor.yy172), releaseRawExprNode(pCxt, yymsp[0].minor.yy172))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy686); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy686); + yylhsminor.yy686 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[-2].minor.yy686), releaseRawExprNode(pCxt, yymsp[0].minor.yy686))); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; + yymsp[-2].minor.yy686 = yylhsminor.yy686; break; - case 308: /* expression ::= expression NK_STAR expression */ + case 307: /* expression ::= expression NK_STAR expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy172); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy172); - yylhsminor.yy172 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MULTI, releaseRawExprNode(pCxt, yymsp[-2].minor.yy172), releaseRawExprNode(pCxt, yymsp[0].minor.yy172))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy686); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy686); + yylhsminor.yy686 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MULTI, releaseRawExprNode(pCxt, yymsp[-2].minor.yy686), releaseRawExprNode(pCxt, yymsp[0].minor.yy686))); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; + yymsp[-2].minor.yy686 = yylhsminor.yy686; break; - case 309: /* expression ::= expression NK_SLASH expression */ + case 308: /* expression ::= expression NK_SLASH expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy172); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy172); - yylhsminor.yy172 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_DIV, releaseRawExprNode(pCxt, yymsp[-2].minor.yy172), releaseRawExprNode(pCxt, yymsp[0].minor.yy172))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy686); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy686); + yylhsminor.yy686 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_DIV, releaseRawExprNode(pCxt, yymsp[-2].minor.yy686), releaseRawExprNode(pCxt, yymsp[0].minor.yy686))); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; + yymsp[-2].minor.yy686 = yylhsminor.yy686; break; - case 310: /* expression ::= expression NK_REM expression */ + case 309: /* expression ::= expression NK_REM expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy172); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy172); - yylhsminor.yy172 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MOD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy172), releaseRawExprNode(pCxt, yymsp[0].minor.yy172))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy686); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy686); + yylhsminor.yy686 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MOD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy686), releaseRawExprNode(pCxt, yymsp[0].minor.yy686))); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; + yymsp[-2].minor.yy686 = yylhsminor.yy686; break; - case 311: /* expression ::= column_reference NK_ARROW NK_STRING */ + case 310: /* expression ::= column_reference NK_ARROW NK_STRING */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy172); - yylhsminor.yy172 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_JSON_GET_VALUE, releaseRawExprNode(pCxt, yymsp[-2].minor.yy172), createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy686); + yylhsminor.yy686 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_JSON_GET_VALUE, releaseRawExprNode(pCxt, yymsp[-2].minor.yy686), createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0))); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; - break; - case 312: /* expression_list ::= expression */ -{ yylhsminor.yy60 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy172)); } - yymsp[0].minor.yy60 = yylhsminor.yy60; - break; - case 313: /* expression_list ::= expression_list NK_COMMA expression */ -{ yylhsminor.yy60 = addNodeToList(pCxt, yymsp[-2].minor.yy60, releaseRawExprNode(pCxt, yymsp[0].minor.yy172)); } - yymsp[-2].minor.yy60 = yylhsminor.yy60; - break; - case 314: /* column_reference ::= column_name */ -{ yylhsminor.yy172 = createRawExprNode(pCxt, &yymsp[0].minor.yy105, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy105)); } - yymsp[0].minor.yy172 = yylhsminor.yy172; - break; - case 315: /* column_reference ::= table_name NK_DOT column_name */ -{ yylhsminor.yy172 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy105, &yymsp[0].minor.yy105, createColumnNode(pCxt, &yymsp[-2].minor.yy105, &yymsp[0].minor.yy105)); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; - break; - case 316: /* pseudo_column ::= ROWTS */ - case 317: /* pseudo_column ::= TBNAME */ yytestcase(yyruleno==317); - case 319: /* pseudo_column ::= QSTARTTS */ yytestcase(yyruleno==319); - case 320: /* pseudo_column ::= QENDTS */ yytestcase(yyruleno==320); - case 321: /* pseudo_column ::= WSTARTTS */ yytestcase(yyruleno==321); - case 322: /* pseudo_column ::= WENDTS */ yytestcase(yyruleno==322); - case 323: /* pseudo_column ::= WDURATION */ yytestcase(yyruleno==323); - case 329: /* literal_func ::= NOW */ yytestcase(yyruleno==329); -{ yylhsminor.yy172 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL)); } - yymsp[0].minor.yy172 = yylhsminor.yy172; - break; - case 318: /* pseudo_column ::= table_name NK_DOT TBNAME */ -{ yylhsminor.yy172 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy105, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-2].minor.yy105)))); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; - break; - case 324: /* function_expression ::= function_name NK_LP expression_list NK_RP */ - case 325: /* function_expression ::= star_func NK_LP star_func_para_list NK_RP */ yytestcase(yyruleno==325); -{ yylhsminor.yy172 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy105, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy105, yymsp[-1].minor.yy60)); } - yymsp[-3].minor.yy172 = yylhsminor.yy172; - break; - case 326: /* function_expression ::= CAST NK_LP expression AS type_name NK_RP */ -{ yylhsminor.yy172 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createCastFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy172), yymsp[-1].minor.yy248)); } - yymsp[-5].minor.yy172 = yylhsminor.yy172; - break; - case 328: /* literal_func ::= noarg_func NK_LP NK_RP */ -{ yylhsminor.yy172 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy105, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-2].minor.yy105, NULL)); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; - break; - case 337: /* star_func_para_list ::= NK_STAR */ -{ yylhsminor.yy60 = createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy60 = yylhsminor.yy60; - break; - case 342: /* star_func_para ::= table_name NK_DOT NK_STAR */ - case 399: /* select_item ::= table_name NK_DOT NK_STAR */ yytestcase(yyruleno==399); -{ yylhsminor.yy172 = createColumnNode(pCxt, &yymsp[-2].minor.yy105, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; - break; - case 343: /* predicate ::= expression compare_op expression */ - case 348: /* predicate ::= expression in_op in_predicate_value */ yytestcase(yyruleno==348); + yymsp[-2].minor.yy686 = yylhsminor.yy686; + break; + case 311: /* expression_list ::= expression */ +{ yylhsminor.yy670 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy686)); } + yymsp[0].minor.yy670 = yylhsminor.yy670; + break; + case 312: /* expression_list ::= expression_list NK_COMMA expression */ +{ yylhsminor.yy670 = addNodeToList(pCxt, yymsp[-2].minor.yy670, releaseRawExprNode(pCxt, yymsp[0].minor.yy686)); } + yymsp[-2].minor.yy670 = yylhsminor.yy670; + break; + case 313: /* column_reference ::= column_name */ +{ yylhsminor.yy686 = createRawExprNode(pCxt, &yymsp[0].minor.yy113, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy113)); } + yymsp[0].minor.yy686 = yylhsminor.yy686; + break; + case 314: /* column_reference ::= table_name NK_DOT column_name */ +{ yylhsminor.yy686 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy113, &yymsp[0].minor.yy113, createColumnNode(pCxt, &yymsp[-2].minor.yy113, &yymsp[0].minor.yy113)); } + yymsp[-2].minor.yy686 = yylhsminor.yy686; + break; + case 315: /* pseudo_column ::= ROWTS */ + case 316: /* pseudo_column ::= TBNAME */ yytestcase(yyruleno==316); + case 318: /* pseudo_column ::= QSTARTTS */ yytestcase(yyruleno==318); + case 319: /* pseudo_column ::= QENDTS */ yytestcase(yyruleno==319); + case 320: /* pseudo_column ::= WSTARTTS */ yytestcase(yyruleno==320); + case 321: /* pseudo_column ::= WENDTS */ yytestcase(yyruleno==321); + case 322: /* pseudo_column ::= WDURATION */ yytestcase(yyruleno==322); + case 328: /* literal_func ::= NOW */ yytestcase(yyruleno==328); +{ yylhsminor.yy686 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL)); } + yymsp[0].minor.yy686 = yylhsminor.yy686; + break; + case 317: /* pseudo_column ::= table_name NK_DOT TBNAME */ +{ yylhsminor.yy686 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy113, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-2].minor.yy113)))); } + yymsp[-2].minor.yy686 = yylhsminor.yy686; + break; + case 323: /* function_expression ::= function_name NK_LP expression_list NK_RP */ + case 324: /* function_expression ::= star_func NK_LP star_func_para_list NK_RP */ yytestcase(yyruleno==324); +{ yylhsminor.yy686 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy113, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy113, yymsp[-1].minor.yy670)); } + yymsp[-3].minor.yy686 = yylhsminor.yy686; + break; + case 325: /* function_expression ::= CAST NK_LP expression AS type_name NK_RP */ +{ yylhsminor.yy686 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createCastFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy686), yymsp[-1].minor.yy490)); } + yymsp[-5].minor.yy686 = yylhsminor.yy686; + break; + case 327: /* literal_func ::= noarg_func NK_LP NK_RP */ +{ yylhsminor.yy686 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy113, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-2].minor.yy113, NULL)); } + yymsp[-2].minor.yy686 = yylhsminor.yy686; + break; + case 336: /* star_func_para_list ::= NK_STAR */ +{ yylhsminor.yy670 = createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy670 = yylhsminor.yy670; + break; + case 341: /* star_func_para ::= table_name NK_DOT NK_STAR */ + case 398: /* select_item ::= table_name NK_DOT NK_STAR */ yytestcase(yyruleno==398); +{ yylhsminor.yy686 = createColumnNode(pCxt, &yymsp[-2].minor.yy113, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy686 = yylhsminor.yy686; + break; + case 342: /* predicate ::= expression compare_op expression */ + case 347: /* predicate ::= expression in_op in_predicate_value */ yytestcase(yyruleno==347); { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy172); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy172); - yylhsminor.yy172 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, yymsp[-1].minor.yy572, releaseRawExprNode(pCxt, yymsp[-2].minor.yy172), releaseRawExprNode(pCxt, yymsp[0].minor.yy172))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy686); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy686); + yylhsminor.yy686 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, yymsp[-1].minor.yy632, releaseRawExprNode(pCxt, yymsp[-2].minor.yy686), releaseRawExprNode(pCxt, yymsp[0].minor.yy686))); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; + yymsp[-2].minor.yy686 = yylhsminor.yy686; break; - case 344: /* predicate ::= expression BETWEEN expression AND expression */ + case 343: /* predicate ::= expression BETWEEN expression AND expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-4].minor.yy172); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy172); - yylhsminor.yy172 = createRawExprNodeExt(pCxt, &s, &e, createBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-4].minor.yy172), releaseRawExprNode(pCxt, yymsp[-2].minor.yy172), releaseRawExprNode(pCxt, yymsp[0].minor.yy172))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-4].minor.yy686); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy686); + yylhsminor.yy686 = createRawExprNodeExt(pCxt, &s, &e, createBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-4].minor.yy686), releaseRawExprNode(pCxt, yymsp[-2].minor.yy686), releaseRawExprNode(pCxt, yymsp[0].minor.yy686))); } - yymsp[-4].minor.yy172 = yylhsminor.yy172; + yymsp[-4].minor.yy686 = yylhsminor.yy686; break; - case 345: /* predicate ::= expression NOT BETWEEN expression AND expression */ + case 344: /* predicate ::= expression NOT BETWEEN expression AND expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-5].minor.yy172); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy172); - yylhsminor.yy172 = createRawExprNodeExt(pCxt, &s, &e, createNotBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy172), releaseRawExprNode(pCxt, yymsp[-2].minor.yy172), releaseRawExprNode(pCxt, yymsp[0].minor.yy172))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-5].minor.yy686); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy686); + yylhsminor.yy686 = createRawExprNodeExt(pCxt, &s, &e, createNotBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy686), releaseRawExprNode(pCxt, yymsp[-2].minor.yy686), releaseRawExprNode(pCxt, yymsp[0].minor.yy686))); } - yymsp[-5].minor.yy172 = yylhsminor.yy172; + yymsp[-5].minor.yy686 = yylhsminor.yy686; break; - case 346: /* predicate ::= expression IS NULL */ + case 345: /* predicate ::= expression IS NULL */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy172); - yylhsminor.yy172 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NULL, releaseRawExprNode(pCxt, yymsp[-2].minor.yy172), NULL)); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy686); + yylhsminor.yy686 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NULL, releaseRawExprNode(pCxt, yymsp[-2].minor.yy686), NULL)); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; + yymsp[-2].minor.yy686 = yylhsminor.yy686; break; - case 347: /* predicate ::= expression IS NOT NULL */ + case 346: /* predicate ::= expression IS NOT NULL */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-3].minor.yy172); - yylhsminor.yy172 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NOT_NULL, releaseRawExprNode(pCxt, yymsp[-3].minor.yy172), NULL)); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-3].minor.yy686); + yylhsminor.yy686 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NOT_NULL, releaseRawExprNode(pCxt, yymsp[-3].minor.yy686), NULL)); } - yymsp[-3].minor.yy172 = yylhsminor.yy172; + yymsp[-3].minor.yy686 = yylhsminor.yy686; break; - case 349: /* compare_op ::= NK_LT */ -{ yymsp[0].minor.yy572 = OP_TYPE_LOWER_THAN; } + case 348: /* compare_op ::= NK_LT */ +{ yymsp[0].minor.yy632 = OP_TYPE_LOWER_THAN; } break; - case 350: /* compare_op ::= NK_GT */ -{ yymsp[0].minor.yy572 = OP_TYPE_GREATER_THAN; } + case 349: /* compare_op ::= NK_GT */ +{ yymsp[0].minor.yy632 = OP_TYPE_GREATER_THAN; } break; - case 351: /* compare_op ::= NK_LE */ -{ yymsp[0].minor.yy572 = OP_TYPE_LOWER_EQUAL; } + case 350: /* compare_op ::= NK_LE */ +{ yymsp[0].minor.yy632 = OP_TYPE_LOWER_EQUAL; } break; - case 352: /* compare_op ::= NK_GE */ -{ yymsp[0].minor.yy572 = OP_TYPE_GREATER_EQUAL; } + case 351: /* compare_op ::= NK_GE */ +{ yymsp[0].minor.yy632 = OP_TYPE_GREATER_EQUAL; } break; - case 353: /* compare_op ::= NK_NE */ -{ yymsp[0].minor.yy572 = OP_TYPE_NOT_EQUAL; } + case 352: /* compare_op ::= NK_NE */ +{ yymsp[0].minor.yy632 = OP_TYPE_NOT_EQUAL; } break; - case 354: /* compare_op ::= NK_EQ */ -{ yymsp[0].minor.yy572 = OP_TYPE_EQUAL; } + case 353: /* compare_op ::= NK_EQ */ +{ yymsp[0].minor.yy632 = OP_TYPE_EQUAL; } break; - case 355: /* compare_op ::= LIKE */ -{ yymsp[0].minor.yy572 = OP_TYPE_LIKE; } + case 354: /* compare_op ::= LIKE */ +{ yymsp[0].minor.yy632 = OP_TYPE_LIKE; } break; - case 356: /* compare_op ::= NOT LIKE */ -{ yymsp[-1].minor.yy572 = OP_TYPE_NOT_LIKE; } + case 355: /* compare_op ::= NOT LIKE */ +{ yymsp[-1].minor.yy632 = OP_TYPE_NOT_LIKE; } break; - case 357: /* compare_op ::= MATCH */ -{ yymsp[0].minor.yy572 = OP_TYPE_MATCH; } + case 356: /* compare_op ::= MATCH */ +{ yymsp[0].minor.yy632 = OP_TYPE_MATCH; } break; - case 358: /* compare_op ::= NMATCH */ -{ yymsp[0].minor.yy572 = OP_TYPE_NMATCH; } + case 357: /* compare_op ::= NMATCH */ +{ yymsp[0].minor.yy632 = OP_TYPE_NMATCH; } break; - case 359: /* compare_op ::= CONTAINS */ -{ yymsp[0].minor.yy572 = OP_TYPE_JSON_CONTAINS; } + case 358: /* compare_op ::= CONTAINS */ +{ yymsp[0].minor.yy632 = OP_TYPE_JSON_CONTAINS; } break; - case 360: /* in_op ::= IN */ -{ yymsp[0].minor.yy572 = OP_TYPE_IN; } + case 359: /* in_op ::= IN */ +{ yymsp[0].minor.yy632 = OP_TYPE_IN; } break; - case 361: /* in_op ::= NOT IN */ -{ yymsp[-1].minor.yy572 = OP_TYPE_NOT_IN; } + case 360: /* in_op ::= NOT IN */ +{ yymsp[-1].minor.yy632 = OP_TYPE_NOT_IN; } break; - case 362: /* in_predicate_value ::= NK_LP expression_list NK_RP */ -{ yylhsminor.yy172 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createNodeListNode(pCxt, yymsp[-1].minor.yy60)); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; + case 361: /* in_predicate_value ::= NK_LP expression_list NK_RP */ +{ yylhsminor.yy686 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createNodeListNode(pCxt, yymsp[-1].minor.yy670)); } + yymsp[-2].minor.yy686 = yylhsminor.yy686; break; - case 364: /* boolean_value_expression ::= NOT boolean_primary */ + case 363: /* boolean_value_expression ::= NOT boolean_primary */ { - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy172); - yylhsminor.yy172 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_NOT, releaseRawExprNode(pCxt, yymsp[0].minor.yy172), NULL)); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy686); + yylhsminor.yy686 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_NOT, releaseRawExprNode(pCxt, yymsp[0].minor.yy686), NULL)); } - yymsp[-1].minor.yy172 = yylhsminor.yy172; + yymsp[-1].minor.yy686 = yylhsminor.yy686; break; - case 365: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ + case 364: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy172); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy172); - yylhsminor.yy172 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy172), releaseRawExprNode(pCxt, yymsp[0].minor.yy172))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy686); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy686); + yylhsminor.yy686 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy686), releaseRawExprNode(pCxt, yymsp[0].minor.yy686))); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; + yymsp[-2].minor.yy686 = yylhsminor.yy686; break; - case 366: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ + case 365: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy172); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy172); - yylhsminor.yy172 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy172), releaseRawExprNode(pCxt, yymsp[0].minor.yy172))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy686); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy686); + yylhsminor.yy686 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy686), releaseRawExprNode(pCxt, yymsp[0].minor.yy686))); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; + yymsp[-2].minor.yy686 = yylhsminor.yy686; break; - case 373: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */ -{ yylhsminor.yy172 = createJoinTableNode(pCxt, JOIN_TYPE_INNER, yymsp[-2].minor.yy172, yymsp[0].minor.yy172, NULL); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; + case 372: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */ +{ yylhsminor.yy686 = createJoinTableNode(pCxt, JOIN_TYPE_INNER, yymsp[-2].minor.yy686, yymsp[0].minor.yy686, NULL); } + yymsp[-2].minor.yy686 = yylhsminor.yy686; break; - case 376: /* table_primary ::= table_name alias_opt */ -{ yylhsminor.yy172 = createRealTableNode(pCxt, NULL, &yymsp[-1].minor.yy105, &yymsp[0].minor.yy105); } - yymsp[-1].minor.yy172 = yylhsminor.yy172; + case 375: /* table_primary ::= table_name alias_opt */ +{ yylhsminor.yy686 = createRealTableNode(pCxt, NULL, &yymsp[-1].minor.yy113, &yymsp[0].minor.yy113); } + yymsp[-1].minor.yy686 = yylhsminor.yy686; break; - case 377: /* table_primary ::= db_name NK_DOT table_name alias_opt */ -{ yylhsminor.yy172 = createRealTableNode(pCxt, &yymsp[-3].minor.yy105, &yymsp[-1].minor.yy105, &yymsp[0].minor.yy105); } - yymsp[-3].minor.yy172 = yylhsminor.yy172; + case 376: /* table_primary ::= db_name NK_DOT table_name alias_opt */ +{ yylhsminor.yy686 = createRealTableNode(pCxt, &yymsp[-3].minor.yy113, &yymsp[-1].minor.yy113, &yymsp[0].minor.yy113); } + yymsp[-3].minor.yy686 = yylhsminor.yy686; break; - case 378: /* table_primary ::= subquery alias_opt */ -{ yylhsminor.yy172 = createTempTableNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy172), &yymsp[0].minor.yy105); } - yymsp[-1].minor.yy172 = yylhsminor.yy172; + case 377: /* table_primary ::= subquery alias_opt */ +{ yylhsminor.yy686 = createTempTableNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy686), &yymsp[0].minor.yy113); } + yymsp[-1].minor.yy686 = yylhsminor.yy686; break; - case 380: /* alias_opt ::= */ -{ yymsp[1].minor.yy105 = nil_token; } + case 379: /* alias_opt ::= */ +{ yymsp[1].minor.yy113 = nil_token; } break; - case 381: /* alias_opt ::= table_alias */ -{ yylhsminor.yy105 = yymsp[0].minor.yy105; } - yymsp[0].minor.yy105 = yylhsminor.yy105; + case 380: /* alias_opt ::= table_alias */ +{ yylhsminor.yy113 = yymsp[0].minor.yy113; } + yymsp[0].minor.yy113 = yylhsminor.yy113; break; - case 382: /* alias_opt ::= AS table_alias */ -{ yymsp[-1].minor.yy105 = yymsp[0].minor.yy105; } + case 381: /* alias_opt ::= AS table_alias */ +{ yymsp[-1].minor.yy113 = yymsp[0].minor.yy113; } break; - case 383: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */ - case 384: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==384); -{ yymsp[-2].minor.yy172 = yymsp[-1].minor.yy172; } + case 382: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */ + case 383: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==383); +{ yymsp[-2].minor.yy686 = yymsp[-1].minor.yy686; } break; - case 385: /* joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ -{ yylhsminor.yy172 = createJoinTableNode(pCxt, yymsp[-4].minor.yy636, yymsp[-5].minor.yy172, yymsp[-2].minor.yy172, yymsp[0].minor.yy172); } - yymsp[-5].minor.yy172 = yylhsminor.yy172; + case 384: /* joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ +{ yylhsminor.yy686 = createJoinTableNode(pCxt, yymsp[-4].minor.yy120, yymsp[-5].minor.yy686, yymsp[-2].minor.yy686, yymsp[0].minor.yy686); } + yymsp[-5].minor.yy686 = yylhsminor.yy686; break; - case 386: /* join_type ::= */ -{ yymsp[1].minor.yy636 = JOIN_TYPE_INNER; } + case 385: /* join_type ::= */ +{ yymsp[1].minor.yy120 = JOIN_TYPE_INNER; } break; - case 387: /* join_type ::= INNER */ -{ yymsp[0].minor.yy636 = JOIN_TYPE_INNER; } + case 386: /* join_type ::= INNER */ +{ yymsp[0].minor.yy120 = JOIN_TYPE_INNER; } break; - case 388: /* query_specification ::= SELECT set_quantifier_opt select_list from_clause where_clause_opt partition_by_clause_opt twindow_clause_opt group_by_clause_opt having_clause_opt */ + case 387: /* query_specification ::= SELECT set_quantifier_opt select_list from_clause where_clause_opt partition_by_clause_opt twindow_clause_opt group_by_clause_opt having_clause_opt */ { - yymsp[-8].minor.yy172 = createSelectStmt(pCxt, yymsp[-7].minor.yy617, yymsp[-6].minor.yy60, yymsp[-5].minor.yy172); - yymsp[-8].minor.yy172 = addWhereClause(pCxt, yymsp[-8].minor.yy172, yymsp[-4].minor.yy172); - yymsp[-8].minor.yy172 = addPartitionByClause(pCxt, yymsp[-8].minor.yy172, yymsp[-3].minor.yy60); - yymsp[-8].minor.yy172 = addWindowClauseClause(pCxt, yymsp[-8].minor.yy172, yymsp[-2].minor.yy172); - yymsp[-8].minor.yy172 = addGroupByClause(pCxt, yymsp[-8].minor.yy172, yymsp[-1].minor.yy60); - yymsp[-8].minor.yy172 = addHavingClause(pCxt, yymsp[-8].minor.yy172, yymsp[0].minor.yy172); + yymsp[-8].minor.yy686 = createSelectStmt(pCxt, yymsp[-7].minor.yy131, yymsp[-6].minor.yy670, yymsp[-5].minor.yy686); + yymsp[-8].minor.yy686 = addWhereClause(pCxt, yymsp[-8].minor.yy686, yymsp[-4].minor.yy686); + yymsp[-8].minor.yy686 = addPartitionByClause(pCxt, yymsp[-8].minor.yy686, yymsp[-3].minor.yy670); + yymsp[-8].minor.yy686 = addWindowClauseClause(pCxt, yymsp[-8].minor.yy686, yymsp[-2].minor.yy686); + yymsp[-8].minor.yy686 = addGroupByClause(pCxt, yymsp[-8].minor.yy686, yymsp[-1].minor.yy670); + yymsp[-8].minor.yy686 = addHavingClause(pCxt, yymsp[-8].minor.yy686, yymsp[0].minor.yy686); } break; - case 391: /* set_quantifier_opt ::= ALL */ -{ yymsp[0].minor.yy617 = false; } + case 390: /* set_quantifier_opt ::= ALL */ +{ yymsp[0].minor.yy131 = false; } break; - case 392: /* select_list ::= NK_STAR */ -{ yymsp[0].minor.yy60 = NULL; } + case 391: /* select_list ::= NK_STAR */ +{ yymsp[0].minor.yy670 = NULL; } break; - case 397: /* select_item ::= common_expression column_alias */ -{ yylhsminor.yy172 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy172), &yymsp[0].minor.yy105); } - yymsp[-1].minor.yy172 = yylhsminor.yy172; + case 396: /* select_item ::= common_expression column_alias */ +{ yylhsminor.yy686 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy686), &yymsp[0].minor.yy113); } + yymsp[-1].minor.yy686 = yylhsminor.yy686; break; - case 398: /* select_item ::= common_expression AS column_alias */ -{ yylhsminor.yy172 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy172), &yymsp[0].minor.yy105); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; + case 397: /* select_item ::= common_expression AS column_alias */ +{ yylhsminor.yy686 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy686), &yymsp[0].minor.yy113); } + yymsp[-2].minor.yy686 = yylhsminor.yy686; break; - case 403: /* partition_by_clause_opt ::= PARTITION BY expression_list */ - case 420: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==420); - case 432: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==432); -{ yymsp[-2].minor.yy60 = yymsp[0].minor.yy60; } + case 402: /* partition_by_clause_opt ::= PARTITION BY expression_list */ + case 419: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==419); + case 431: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==431); +{ yymsp[-2].minor.yy670 = yymsp[0].minor.yy670; } break; - case 405: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ -{ yymsp[-5].minor.yy172 = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy172), releaseRawExprNode(pCxt, yymsp[-1].minor.yy172)); } + case 404: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ +{ yymsp[-5].minor.yy686 = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy686), releaseRawExprNode(pCxt, yymsp[-1].minor.yy686)); } break; - case 406: /* twindow_clause_opt ::= STATE_WINDOW NK_LP expression NK_RP */ -{ yymsp[-3].minor.yy172 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy172)); } + case 405: /* twindow_clause_opt ::= STATE_WINDOW NK_LP expression NK_RP */ +{ yymsp[-3].minor.yy686 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy686)); } break; - case 407: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ -{ yymsp[-5].minor.yy172 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy172), NULL, yymsp[-1].minor.yy172, yymsp[0].minor.yy172); } + case 406: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ +{ yymsp[-5].minor.yy686 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy686), NULL, yymsp[-1].minor.yy686, yymsp[0].minor.yy686); } break; - case 408: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ -{ yymsp[-7].minor.yy172 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy172), releaseRawExprNode(pCxt, yymsp[-3].minor.yy172), yymsp[-1].minor.yy172, yymsp[0].minor.yy172); } + case 407: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ +{ yymsp[-7].minor.yy686 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy686), releaseRawExprNode(pCxt, yymsp[-3].minor.yy686), yymsp[-1].minor.yy686, yymsp[0].minor.yy686); } break; - case 410: /* sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ -{ yymsp[-3].minor.yy172 = releaseRawExprNode(pCxt, yymsp[-1].minor.yy172); } + case 409: /* sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ +{ yymsp[-3].minor.yy686 = releaseRawExprNode(pCxt, yymsp[-1].minor.yy686); } break; - case 412: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */ -{ yymsp[-3].minor.yy172 = createFillNode(pCxt, yymsp[-1].minor.yy202, NULL); } + case 411: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */ +{ yymsp[-3].minor.yy686 = createFillNode(pCxt, yymsp[-1].minor.yy522, NULL); } break; - case 413: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */ -{ yymsp[-5].minor.yy172 = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, yymsp[-1].minor.yy60)); } + case 412: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */ +{ yymsp[-5].minor.yy686 = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, yymsp[-1].minor.yy670)); } break; - case 414: /* fill_mode ::= NONE */ -{ yymsp[0].minor.yy202 = FILL_MODE_NONE; } + case 413: /* fill_mode ::= NONE */ +{ yymsp[0].minor.yy522 = FILL_MODE_NONE; } break; - case 415: /* fill_mode ::= PREV */ -{ yymsp[0].minor.yy202 = FILL_MODE_PREV; } + case 414: /* fill_mode ::= PREV */ +{ yymsp[0].minor.yy522 = FILL_MODE_PREV; } break; - case 416: /* fill_mode ::= NULL */ -{ yymsp[0].minor.yy202 = FILL_MODE_NULL; } + case 415: /* fill_mode ::= NULL */ +{ yymsp[0].minor.yy522 = FILL_MODE_NULL; } break; - case 417: /* fill_mode ::= LINEAR */ -{ yymsp[0].minor.yy202 = FILL_MODE_LINEAR; } + case 416: /* fill_mode ::= LINEAR */ +{ yymsp[0].minor.yy522 = FILL_MODE_LINEAR; } break; - case 418: /* fill_mode ::= NEXT */ -{ yymsp[0].minor.yy202 = FILL_MODE_NEXT; } + case 417: /* fill_mode ::= NEXT */ +{ yymsp[0].minor.yy522 = FILL_MODE_NEXT; } break; - case 421: /* group_by_list ::= expression */ -{ yylhsminor.yy60 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy172))); } - yymsp[0].minor.yy60 = yylhsminor.yy60; + case 420: /* group_by_list ::= expression */ +{ yylhsminor.yy670 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy686))); } + yymsp[0].minor.yy670 = yylhsminor.yy670; break; - case 422: /* group_by_list ::= group_by_list NK_COMMA expression */ -{ yylhsminor.yy60 = addNodeToList(pCxt, yymsp[-2].minor.yy60, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy172))); } - yymsp[-2].minor.yy60 = yylhsminor.yy60; + case 421: /* group_by_list ::= group_by_list NK_COMMA expression */ +{ yylhsminor.yy670 = addNodeToList(pCxt, yymsp[-2].minor.yy670, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy686))); } + yymsp[-2].minor.yy670 = yylhsminor.yy670; break; - case 425: /* query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt */ + case 424: /* query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt */ { - yylhsminor.yy172 = addOrderByClause(pCxt, yymsp[-3].minor.yy172, yymsp[-2].minor.yy60); - yylhsminor.yy172 = addSlimitClause(pCxt, yylhsminor.yy172, yymsp[-1].minor.yy172); - yylhsminor.yy172 = addLimitClause(pCxt, yylhsminor.yy172, yymsp[0].minor.yy172); + yylhsminor.yy686 = addOrderByClause(pCxt, yymsp[-3].minor.yy686, yymsp[-2].minor.yy670); + yylhsminor.yy686 = addSlimitClause(pCxt, yylhsminor.yy686, yymsp[-1].minor.yy686); + yylhsminor.yy686 = addLimitClause(pCxt, yylhsminor.yy686, yymsp[0].minor.yy686); } - yymsp[-3].minor.yy172 = yylhsminor.yy172; + yymsp[-3].minor.yy686 = yylhsminor.yy686; break; - case 427: /* query_expression_body ::= query_expression_body UNION ALL query_expression_body */ -{ yylhsminor.yy172 = createSetOperator(pCxt, SET_OP_TYPE_UNION_ALL, yymsp[-3].minor.yy172, yymsp[0].minor.yy172); } - yymsp[-3].minor.yy172 = yylhsminor.yy172; + case 426: /* query_expression_body ::= query_expression_body UNION ALL query_expression_body */ +{ yylhsminor.yy686 = createSetOperator(pCxt, SET_OP_TYPE_UNION_ALL, yymsp[-3].minor.yy686, yymsp[0].minor.yy686); } + yymsp[-3].minor.yy686 = yylhsminor.yy686; break; - case 428: /* query_expression_body ::= query_expression_body UNION query_expression_body */ -{ yylhsminor.yy172 = createSetOperator(pCxt, SET_OP_TYPE_UNION, yymsp[-2].minor.yy172, yymsp[0].minor.yy172); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; + case 427: /* query_expression_body ::= query_expression_body UNION query_expression_body */ +{ yylhsminor.yy686 = createSetOperator(pCxt, SET_OP_TYPE_UNION, yymsp[-2].minor.yy686, yymsp[0].minor.yy686); } + yymsp[-2].minor.yy686 = yylhsminor.yy686; break; - case 430: /* query_primary ::= NK_LP query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt NK_RP */ -{ yymsp[-5].minor.yy172 = yymsp[-4].minor.yy172; } - yy_destructor(yypParser,350,&yymsp[-3].minor); - yy_destructor(yypParser,351,&yymsp[-2].minor); - yy_destructor(yypParser,352,&yymsp[-1].minor); + case 429: /* query_primary ::= NK_LP query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt NK_RP */ +{ yymsp[-5].minor.yy686 = yymsp[-4].minor.yy686; } + yy_destructor(yypParser,349,&yymsp[-3].minor); + yy_destructor(yypParser,350,&yymsp[-2].minor); + yy_destructor(yypParser,351,&yymsp[-1].minor); break; - case 434: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */ - case 438: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==438); -{ yymsp[-1].minor.yy172 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); } + case 433: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */ + case 437: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==437); +{ yymsp[-1].minor.yy686 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); } break; - case 435: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ - case 439: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==439); -{ yymsp[-3].minor.yy172 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); } + case 434: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ + case 438: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==438); +{ yymsp[-3].minor.yy686 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); } break; - case 436: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - case 440: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==440); -{ yymsp[-3].minor.yy172 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); } + case 435: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + case 439: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==439); +{ yymsp[-3].minor.yy686 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); } break; - case 441: /* subquery ::= NK_LP query_expression NK_RP */ -{ yylhsminor.yy172 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy172); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; + case 440: /* subquery ::= NK_LP query_expression NK_RP */ +{ yylhsminor.yy686 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy686); } + yymsp[-2].minor.yy686 = yylhsminor.yy686; break; - case 445: /* sort_specification ::= expression ordering_specification_opt null_ordering_opt */ -{ yylhsminor.yy172 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy172), yymsp[-1].minor.yy14, yymsp[0].minor.yy17); } - yymsp[-2].minor.yy172 = yylhsminor.yy172; + case 444: /* sort_specification ::= expression ordering_specification_opt null_ordering_opt */ +{ yylhsminor.yy686 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy686), yymsp[-1].minor.yy428, yymsp[0].minor.yy109); } + yymsp[-2].minor.yy686 = yylhsminor.yy686; break; - case 446: /* ordering_specification_opt ::= */ -{ yymsp[1].minor.yy14 = ORDER_ASC; } + case 445: /* ordering_specification_opt ::= */ +{ yymsp[1].minor.yy428 = ORDER_ASC; } break; - case 447: /* ordering_specification_opt ::= ASC */ -{ yymsp[0].minor.yy14 = ORDER_ASC; } + case 446: /* ordering_specification_opt ::= ASC */ +{ yymsp[0].minor.yy428 = ORDER_ASC; } break; - case 448: /* ordering_specification_opt ::= DESC */ -{ yymsp[0].minor.yy14 = ORDER_DESC; } + case 447: /* ordering_specification_opt ::= DESC */ +{ yymsp[0].minor.yy428 = ORDER_DESC; } break; - case 449: /* null_ordering_opt ::= */ -{ yymsp[1].minor.yy17 = NULL_ORDER_DEFAULT; } + case 448: /* null_ordering_opt ::= */ +{ yymsp[1].minor.yy109 = NULL_ORDER_DEFAULT; } break; - case 450: /* null_ordering_opt ::= NULLS FIRST */ -{ yymsp[-1].minor.yy17 = NULL_ORDER_FIRST; } + case 449: /* null_ordering_opt ::= NULLS FIRST */ +{ yymsp[-1].minor.yy109 = NULL_ORDER_FIRST; } break; - case 451: /* null_ordering_opt ::= NULLS LAST */ -{ yymsp[-1].minor.yy17 = NULL_ORDER_LAST; } + case 450: /* null_ordering_opt ::= NULLS LAST */ +{ yymsp[-1].minor.yy109 = NULL_ORDER_LAST; } break; default: break; /********** End reduce actions ************************************************/ }; - assert( yyrulenoyytos>=yypParser->yystack ); assert( yyact==yypParser->yytos->stateno ); yyact = yy_find_shift_action((YYCODETYPE)yymajor,yyact); if( yyact >= YY_MIN_REDUCE ){ - yyact = yy_reduce(yypParser,yyact-YY_MIN_REDUCE,yymajor, - yyminor ParseCTX_PARAM); + unsigned int yyruleno = yyact - YY_MIN_REDUCE; /* Reduce by this rule */ +#ifndef NDEBUG + assert( yyruleno<(int)(sizeof(yyRuleName)/sizeof(yyRuleName[0])) ); + if( yyTraceFILE ){ + int yysize = yyRuleInfoNRhs[yyruleno]; + if( yysize ){ + fprintf(yyTraceFILE, "%sReduce %d [%s]%s, pop back to state %d.\n", + yyTracePrompt, + yyruleno, yyRuleName[yyruleno], + yyrulenoyytos[yysize].stateno); + }else{ + fprintf(yyTraceFILE, "%sReduce %d [%s]%s.\n", + yyTracePrompt, yyruleno, yyRuleName[yyruleno], + yyrulenoyytos - yypParser->yystack)>yypParser->yyhwm ){ + yypParser->yyhwm++; + assert( yypParser->yyhwm == + (int)(yypParser->yytos - yypParser->yystack)); + } +#endif +#if YYSTACKDEPTH>0 + if( yypParser->yytos>=yypParser->yystackEnd ){ + yyStackOverflow(yypParser); + break; + } +#else + if( yypParser->yytos>=&yypParser->yystack[yypParser->yystksz-1] ){ + if( yyGrowStack(yypParser) ){ + yyStackOverflow(yypParser); + break; + } + } +#endif + } + yyact = yy_reduce(yypParser,yyruleno,yymajor,yyminor ParseCTX_PARAM); }else if( yyact <= YY_MAX_SHIFTREDUCE ){ yy_shift(yypParser,yyact,(YYCODETYPE)yymajor,yyminor); #ifndef YYNOERRORRECOVERY @@ -4642,14 +5324,13 @@ void Parse( yy_destructor(yypParser, (YYCODETYPE)yymajor, &yyminorunion); yymajor = YYNOCODE; }else{ - while( yypParser->yytos >= yypParser->yystack - && (yyact = yy_find_reduce_action( - yypParser->yytos->stateno, - YYERRORSYMBOL)) > YY_MAX_SHIFTREDUCE - ){ + while( yypParser->yytos > yypParser->yystack ){ + yyact = yy_find_reduce_action(yypParser->yytos->stateno, + YYERRORSYMBOL); + if( yyact<=YY_MAX_SHIFTREDUCE ) break; yy_pop_parser_stack(yypParser); } - if( yypParser->yytos < yypParser->yystack || yymajor==0 ){ + if( yypParser->yytos <= yypParser->yystack || yymajor==0 ){ yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion); yy_parse_failed(yypParser); #ifndef YYNOERRORRECOVERY @@ -4699,7 +5380,7 @@ void Parse( break; #endif } - }while( yypParser->yytos>yypParser->yystack ); + } #ifndef NDEBUG if( yyTraceFILE ){ yyStackEntry *i; @@ -4721,11 +5402,10 @@ void Parse( */ int ParseFallback(int iToken){ #ifdef YYFALLBACK - if( iToken<(int)(sizeof(yyFallback)/sizeof(yyFallback[0])) ){ - return yyFallback[iToken]; - } + assert( iToken<(int)(sizeof(yyFallback)/sizeof(yyFallback[0])) ); + return yyFallback[iToken]; #else (void)iToken; -#endif return 0; +#endif } diff --git a/source/libs/parser/test/parInitialCTest.cpp b/source/libs/parser/test/parInitialCTest.cpp index 940856749e4c7ac626e2610d2c76cdfee6f2399f..8b545b3cb4d3f2e19edaa832870abd46430a6aae 100644 --- a/source/libs/parser/test/parInitialCTest.cpp +++ b/source/libs/parser/test/parInitialCTest.cpp @@ -298,14 +298,12 @@ TEST_F(ParserInitialCTest, createStable) { auto setCreateStbReqFunc = [&](const char* pTbname, int8_t igExists = 0, float xFilesFactor = TSDB_DEFAULT_ROLLUP_FILE_FACTOR, - int32_t delay = TSDB_DEFAULT_ROLLUP_DELAY, int32_t ttl = TSDB_DEFAULT_TABLE_TTL, - const char* pComment = nullptr) { + int32_t ttl = TSDB_DEFAULT_TABLE_TTL, const char* pComment = nullptr) { memset(&expect, 0, sizeof(SMCreateStbReq)); int32_t len = snprintf(expect.name, sizeof(expect.name), "0.test.%s", pTbname); expect.name[len] = '\0'; expect.igExists = igExists; expect.xFilesFactor = xFilesFactor; - expect.delay = delay; expect.ttl = ttl; if (nullptr != pComment) { expect.comment = strdup(pComment); @@ -393,7 +391,7 @@ TEST_F(ParserInitialCTest, createStable) { addFieldToCreateStbReqFunc(false, "id", TSDB_DATA_TYPE_INT); run("CREATE STABLE t1(ts TIMESTAMP, c1 INT) TAGS(id INT)"); - setCreateStbReqFunc("t1", 1, 0.1, 2, 100, "test create table"); + setCreateStbReqFunc("t1", 1, 0.1, 100, "test create table"); addFieldToCreateStbReqFunc(true, "ts", TSDB_DATA_TYPE_TIMESTAMP, 0, 0); addFieldToCreateStbReqFunc(true, "c1", TSDB_DATA_TYPE_INT); addFieldToCreateStbReqFunc(true, "c2", TSDB_DATA_TYPE_UINT); @@ -431,7 +429,7 @@ TEST_F(ParserInitialCTest, createStable) { "TAGS (a1 TIMESTAMP, a2 INT, a3 INT UNSIGNED, a4 BIGINT, a5 BIGINT UNSIGNED, a6 FLOAT, a7 DOUBLE, " "a8 BINARY(20), a9 SMALLINT, a10 SMALLINT UNSIGNED COMMENT 'test column comment', a11 TINYINT, " "a12 TINYINT UNSIGNED, a13 BOOL, a14 NCHAR(30), a15 VARCHAR(50)) " - "TTL 100 COMMENT 'test create table' SMA(c1, c2, c3) ROLLUP (MIN) FILE_FACTOR 0.1 DELAY 2"); + "TTL 100 COMMENT 'test create table' SMA(c1, c2, c3) ROLLUP (MIN) FILE_FACTOR 0.1"); } TEST_F(ParserInitialCTest, createStream) { @@ -464,7 +462,7 @@ TEST_F(ParserInitialCTest, createTable) { "TAGS (a1 TIMESTAMP, a2 INT, a3 INT UNSIGNED, a4 BIGINT, a5 BIGINT UNSIGNED, a6 FLOAT, a7 DOUBLE, a8 BINARY(20), " "a9 SMALLINT, a10 SMALLINT UNSIGNED COMMENT 'test column comment', a11 TINYINT, a12 TINYINT UNSIGNED, a13 BOOL, " "a14 NCHAR(30), a15 VARCHAR(50)) " - "TTL 100 COMMENT 'test create table' SMA(c1, c2, c3) ROLLUP (MIN) FILE_FACTOR 0.1 DELAY 2"); + "TTL 100 COMMENT 'test create table' SMA(c1, c2, c3) ROLLUP (MIN) FILE_FACTOR 0.1"); run("CREATE TABLE IF NOT EXISTS t1 USING st1 TAGS(1, 'wxy')"); diff --git a/source/libs/parser/test/parInitialDTest.cpp b/source/libs/parser/test/parInitialDTest.cpp index 57d349e7eeecd33fd9855f5a0d8df22548c5ceee..5ad427d964ad1dc47a4fed64b51f89257ae53da6 100644 --- a/source/libs/parser/test/parInitialDTest.cpp +++ b/source/libs/parser/test/parInitialDTest.cpp @@ -32,7 +32,7 @@ TEST_F(ParserInitialDTest, dropBnode) { run("DROP BNODE ON DNODE 1"); } -// DROP CGROUP [ IF EXISTS ] cgroup_name ON topic_name +// DROP CONSUMER GROUP [ IF EXISTS ] cgroup_name ON topic_name TEST_F(ParserInitialDTest, dropCGroup) { useDb("root", "test"); @@ -56,10 +56,10 @@ TEST_F(ParserInitialDTest, dropCGroup) { }); setDropCgroupReqFunc("tp1", "cg1"); - run("DROP CGROUP cg1 ON tp1"); + run("DROP CONSUMER GROUP cg1 ON tp1"); setDropCgroupReqFunc("tp1", "cg1", 1); - run("DROP CGROUP IF EXISTS cg1 ON tp1"); + run("DROP CONSUMER GROUP IF EXISTS cg1 ON tp1"); } // todo drop database diff --git a/source/libs/parser/test/parSelectTest.cpp b/source/libs/parser/test/parSelectTest.cpp index a675bb936fb42271ec474027e7c31a8c2ad21652..a5192595f0be83afa459429748dab3d8e9b65c4e 100644 --- a/source/libs/parser/test/parSelectTest.cpp +++ b/source/libs/parser/test/parSelectTest.cpp @@ -252,6 +252,8 @@ TEST_F(ParserSelectTest, semanticError) { // TSDB_CODE_PAR_AMBIGUOUS_COLUMN run("SELECT c2 FROM t1 tt1, t1 tt2 WHERE tt1.c1 = tt2.c1", TSDB_CODE_PAR_AMBIGUOUS_COLUMN, PARSER_STAGE_TRANSLATE); + run("SELECT c2 FROM (SELECT c1 c2, c2 FROM t1)", TSDB_CODE_PAR_AMBIGUOUS_COLUMN, PARSER_STAGE_TRANSLATE); + // TSDB_CODE_PAR_WRONG_VALUE_TYPE run("SELECT timestamp '2010a' FROM t1", TSDB_CODE_PAR_WRONG_VALUE_TYPE, PARSER_STAGE_TRANSLATE); diff --git a/source/libs/planner/src/planLogicCreater.c b/source/libs/planner/src/planLogicCreater.c index 467b26b7c4af61a8f0cca3d706f34c0133995fe3..2df248e53f65ace76e3680943509626e73804071 100644 --- a/source/libs/planner/src/planLogicCreater.c +++ b/source/libs/planner/src/planLogicCreater.c @@ -124,6 +124,7 @@ static int32_t createChildLogicNode(SLogicPlanContext* pCxt, SSelectStmt* pSelec SLogicNode* pNode = NULL; int32_t code = func(pCxt, pSelect, &pNode); if (TSDB_CODE_SUCCESS == code && NULL != pNode) { + pNode->precision = pSelect->precision; code = pushLogicNode(pCxt, pRoot, pNode); } if (TSDB_CODE_SUCCESS != code) { @@ -400,6 +401,7 @@ static int32_t createLogicNodeByTable(SLogicPlanContext* pCxt, SSelectStmt* pSel nodesDestroyNode(pNode); return TSDB_CODE_OUT_OF_MEMORY; } + pNode->precision = pSelect->precision; *pLogicNode = pNode; } return code; diff --git a/source/libs/scalar/test/scalar/CMakeLists.txt b/source/libs/scalar/test/scalar/CMakeLists.txt index 672cb5a3de39bfed51c9d399ac3d0431614f50ab..86b936d93ae950e27069835cffcb0e8a99768ac9 100644 --- a/source/libs/scalar/test/scalar/CMakeLists.txt +++ b/source/libs/scalar/test/scalar/CMakeLists.txt @@ -17,9 +17,7 @@ TARGET_INCLUDE_DIRECTORIES( PUBLIC "${TD_SOURCE_DIR}/source/libs/parser/inc" PRIVATE "${TD_SOURCE_DIR}/source/libs/scalar/inc" ) -if(NOT TD_WINDOWS) - add_test( - NAME scalarTest - COMMAND scalarTest - ) -endif(NOT TD_WINDOWS) +add_test( + NAME scalarTest + COMMAND scalarTest +) diff --git a/source/libs/scalar/test/scalar/scalarTests.cpp b/source/libs/scalar/test/scalar/scalarTests.cpp index 3fafc83b18365d490003a792748606c8d4fce804..6a32c6577532c7c7bbb3f07e0f012706dd7163df 100644 --- a/source/libs/scalar/test/scalar/scalarTests.cpp +++ b/source/libs/scalar/test/scalar/scalarTests.cpp @@ -2498,7 +2498,7 @@ TEST(ScalarFunctionTest, tanFunction_column) { code = tanFunction(pInput, 1, pOutput); ASSERT_EQ(code, TSDB_CODE_SUCCESS); for (int32_t i = 0; i < rowNum; ++i) { - ASSERT_EQ(*((double *)colDataGetData(pOutput->columnData, i)), result[i]); + ASSERT_NEAR(*((double *)colDataGetData(pOutput->columnData, i)), result[i], 1e-15); PRINTF("tiny_int after TAN:%f\n", *((double *)colDataGetData(pOutput->columnData, i))); } scltDestroyDataBlock(pInput); @@ -2517,7 +2517,7 @@ TEST(ScalarFunctionTest, tanFunction_column) { code = tanFunction(pInput, 1, pOutput); ASSERT_EQ(code, TSDB_CODE_SUCCESS); for (int32_t i = 0; i < rowNum; ++i) { - ASSERT_EQ(*((double *)colDataGetData(pOutput->columnData, i)), result[i]); + ASSERT_NEAR(*((double *)colDataGetData(pOutput->columnData, i)), result[i], 1e-15); PRINTF("float after TAN:%f\n", *((double *)colDataGetData(pOutput->columnData, i))); } diff --git a/tests/script/general/alter/table.sim b/tests/script/general/alter/table.sim index cd0397760276c775d170e90831f6674880cb8f81..9ca2f60bdc37f827e0832dc59399bf73732d7748 100644 --- a/tests/script/general/alter/table.sim +++ b/tests/script/general/alter/table.sim @@ -252,6 +252,7 @@ endi print ======== step8 sql alter table tb add column h binary(10) +sql select * from tb sql describe tb if $data00 != ts then return -1 @@ -304,7 +305,7 @@ endi if $data80 != h then return -1 endi -if $data81 != BINARY then +if $data81 != VARCHAR then return -1 endi if $data82 != 10 then @@ -371,7 +372,7 @@ endi if $data80 != h then return -1 endi -if $data81 != BINARY then +if $data81 != VARCHAR then return -1 endi if $data82 != 10 then @@ -447,7 +448,7 @@ endi if $data70 != h then return -1 endi -if $data71 != BINARY then +if $data71 != VARCHAR then return -1 endi if $data72 != 10 then @@ -496,7 +497,7 @@ endi if $data60 != h then return -1 endi -if $data61 != BINARY then +if $data61 != VARCHAR then return -1 endi if $data62 != 10 then @@ -539,7 +540,7 @@ endi if $data50 != h then return -1 endi -if $data51 != BINARY then +if $data51 != VARCHAR then return -1 endi if $data52 != 10 then @@ -576,7 +577,7 @@ endi if $data40 != h then return -1 endi -if $data41 != BINARY then +if $data41 != VARCHAR then return -1 endi if $data42 != 10 then @@ -607,7 +608,7 @@ endi if $data30 != h then return -1 endi -if $data31 != BINARY then +if $data31 != VARCHAR then return -1 endi if $data32 != 10 then @@ -632,7 +633,7 @@ endi if $data20 != h then return -1 endi -if $data21 != BINARY then +if $data21 != VARCHAR then return -1 endi if $data22 != 10 then diff --git a/tests/script/jenkins/basic.txt b/tests/script/jenkins/basic.txt index 217c23158dd08739caea79d5b74679d4da291968..b2ffe83b0b091940c0bcf4c947893e40734c1e90 100644 --- a/tests/script/jenkins/basic.txt +++ b/tests/script/jenkins/basic.txt @@ -104,6 +104,10 @@ ./test.sh -f tsim/stable/tag_modify.sim ./test.sh -f tsim/stable/tag_rename.sim ./test.sh -f tsim/stable/alter_comment.sim +./test.sh -f tsim/stable/alter_count.sim +./test.sh -f tsim/stable/alter_insert1.sim +./test.sh -f tsim/stable/alter_insert2.sim +./test.sh -f tsim/stable/alter_import.sim # --- for multi process mode ./test.sh -f tsim/user/basic1.sim -m diff --git a/tests/script/tsim/insert/update0.sim b/tests/script/tsim/insert/update0.sim index 3cb5e4008e3a57e3178721b7e3f5458ef07be52b..0ba3e98c913e1c37c50c351bed7d7385a1cad0d3 100644 --- a/tests/script/tsim/insert/update0.sim +++ b/tests/script/tsim/insert/update0.sim @@ -9,7 +9,7 @@ sql create database d0 keep 365000d,365000d,365000d sql use d0 print =============== create super table and register rsma -sql create table if not exists stb (ts timestamp, c1 int) tags (city binary(20),district binary(20)) rollup(min) file_factor 0.1 delay 2; +sql create table if not exists stb (ts timestamp, c1 int) tags (city binary(20),district binary(20)) rollup(min) file_factor 0.1; sql show stables if $rows != 1 then diff --git a/tests/script/tsim/sma/rsmaCreateInsertQuery.sim b/tests/script/tsim/sma/rsmaCreateInsertQuery.sim index 5d9425e5064d3fc65038c174dae109cc6283991e..f929dda18cb1b287c3ffe05487464624ff0eebc5 100644 --- a/tests/script/tsim/sma/rsmaCreateInsertQuery.sim +++ b/tests/script/tsim/sma/rsmaCreateInsertQuery.sim @@ -9,7 +9,7 @@ sql create database d0 retentions 15s:7d,1m:21d,15m:365d; sql use d0 print =============== create super table and register rsma -sql create table if not exists stb (ts timestamp, c1 int) tags (city binary(20),district binary(20)) rollup(min) file_factor 0.1 delay 2; +sql create table if not exists stb (ts timestamp, c1 int) tags (city binary(20),district binary(20)) rollup(min) file_factor 0.1; sql show stables if $rows != 1 then diff --git a/tests/script/general/alter/import.sim b/tests/script/tsim/stable/alter_import.sim similarity index 84% rename from tests/script/general/alter/import.sim rename to tests/script/tsim/stable/alter_import.sim index 175e084b7f1aa73a1c8b599752fd0b7de59efda7..cdd7b60e14fc5e8f46f3413e9037a95f534718e1 100644 --- a/tests/script/general/alter/import.sim +++ b/tests/script/tsim/stable/alter_import.sim @@ -29,14 +29,14 @@ if $data00 != 3 then endi print ========= step3 -sql import into tb values(now-23d, -23, 0) -sql import into tb values(now-21d, -21, 0) +sql insert into tb values(now-23d, -23, 0) +sql insert into tb values(now-21d, -21, 0) sql select count(b) from tb if $data00 != 5 then return -1 endi -sql import into tb values(now-29d, -29, 0) +sql insert into tb values(now-29d, -29, 0) sql select count(b) from tb if $data00 != 6 then return -1 diff --git a/tests/script/general/alter/insert1.sim b/tests/script/tsim/stable/alter_insert1.sim similarity index 100% rename from tests/script/general/alter/insert1.sim rename to tests/script/tsim/stable/alter_insert1.sim diff --git a/tests/script/general/alter/insert2.sim b/tests/script/tsim/stable/alter_insert2.sim similarity index 100% rename from tests/script/general/alter/insert2.sim rename to tests/script/tsim/stable/alter_insert2.sim diff --git a/tests/script/general/alter/metrics.sim b/tests/script/tsim/stable/alter_metrics.sim similarity index 97% rename from tests/script/general/alter/metrics.sim rename to tests/script/tsim/stable/alter_metrics.sim index ec8c980c16adcf512975e54fa492d3c22b12c195..f33246dfe2d14c092cb9483ce31c0788da9e5397 100644 --- a/tests/script/general/alter/metrics.sim +++ b/tests/script/tsim/stable/alter_metrics.sim @@ -347,7 +347,7 @@ endi if $data80 != h then return -1 endi -if $data81 != BINARY then +if $data81 != VARCHAR then return -1 endi if $data82 != 10 then @@ -363,9 +363,8 @@ endi print ======== step9 print ======== step10 system sh/exec.sh -n dnode1 -s stop -x SIGINT -sleep 3000 system sh/exec.sh -n dnode1 -s start -sleep 3000 +sql connect sql use d2 sql describe tb @@ -420,7 +419,7 @@ endi if $data80 != h then return -1 endi -if $data81 != BINARY then +if $data81 != VARCHAR then return -1 endi if $data82 != 10 then @@ -502,7 +501,7 @@ endi if $data70 != h then return -1 endi -if $data71 != BINARY then +if $data71 != VARCHAR then return -1 endi if $data72 != 10 then @@ -557,7 +556,7 @@ endi if $data60 != h then return -1 endi -if $data61 != BINARY then +if $data61 != VARCHAR then return -1 endi if $data62 != 10 then @@ -606,7 +605,7 @@ endi if $data50 != h then return -1 endi -if $data51 != BINARY then +if $data51 != VARCHAR then return -1 endi if $data52 != 10 then @@ -649,7 +648,7 @@ endi if $data40 != h then return -1 endi -if $data41 != BINARY then +if $data41 != VARCHAR then return -1 endi if $data42 != 10 then @@ -686,7 +685,7 @@ endi if $data30 != h then return -1 endi -if $data31 != BINARY then +if $data31 != VARCHAR then return -1 endi if $data32 != 10 then @@ -717,7 +716,7 @@ endi if $data20 != h then return -1 endi -if $data21 != BINARY then +if $data21 != VARCHAR then return -1 endi if $data22 != 10 then @@ -758,7 +757,7 @@ endi print ======= over sql drop database d2 sql show databases -if $rows != 0 then +if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/stable/column_modify.sim b/tests/script/tsim/stable/column_modify.sim index 16e7ff8f67f1d9818947c54f6929728b086f44ab..e2752ccf951cef30587aa1f604f92cbbaa265b85 100644 --- a/tests/script/tsim/stable/column_modify.sim +++ b/tests/script/tsim/stable/column_modify.sim @@ -79,28 +79,31 @@ system sh/exec.sh -n dnode1 -s stop -x SIGINT system sh/exec.sh -n dnode1 -s start sql connect -sql select * from db.ctb + +sql select * from db.stb +print $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4] $data[0][5] $data[0][6] +print $data[1][0] $data[1][1] $data[1][2] $data[1][3] $data[1][4] $data[1][5] $data[1][6] if $rows != 2 then return -1 endi -#if $data[0][1] != 1 then -# return -1 -#endi -#if $data[0][2] != 1234 then -# return -1 -#endi -#if $data[0][3] != 101 then -# return -1 -#endi -#if $data[1][1] != 1 then -# return -1 -#endi -#if $data[1][2] != 12345 then -# return -1 -#endi -#if $data[1][3] != 101 then -# return -1 -#endi +if $data[0][1] != 1 then + return -1 +endi +if $data[0][2] != 1234 then + return -1 +endi +if $data[0][3] != 101 then + return -1 +endi +if $data[1][1] != 1 then + return -1 +endi +if $data[1][2] != 12345 then + return -1 +endi +if $data[1][3] != 101 then + return -1 +endi system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/tsim/stable/disk.sim b/tests/script/tsim/stable/disk.sim index eeaa8293a505a7af3b774eb2e0d3b7fab5b6fe49..ff734b4234263ca71253dee97eaa0158fe5221c4 100644 --- a/tests/script/tsim/stable/disk.sim +++ b/tests/script/tsim/stable/disk.sim @@ -49,10 +49,9 @@ if $data00 != $totalNum then return -1 endi -sleep 1000 system sh/exec.sh -n dnode1 -s stop -x SIGINT -sleep 1000 system sh/exec.sh -n dnode1 -s start +sql connect sql use $db sql show vgroups diff --git a/tests/script/tsim/stable/metrics.sim b/tests/script/tsim/stable/metrics.sim index 26323b4a92539ed62fdd060cc7e73dfafec70101..c652670d7f4e904461adf33af8f1d10fc9e9e319 100644 --- a/tests/script/tsim/stable/metrics.sim +++ b/tests/script/tsim/stable/metrics.sim @@ -93,9 +93,6 @@ $i = 2 $tb = $tbPrefix . $i sql insert into $tb values (now + 1m , 1 ) -print sleep 2000 -sleep 2000 - print =============== step6 # sql select * from $mt diff --git a/tests/system-test/2-query/unique.py b/tests/system-test/2-query/unique.py new file mode 100644 index 0000000000000000000000000000000000000000..227efa6f9ceda24df73830bd46838fd657b67d48 --- /dev/null +++ b/tests/system-test/2-query/unique.py @@ -0,0 +1,457 @@ +from math import floor +from random import randint, random +from numpy import equal +import taos +import sys +import datetime +import inspect + +from util.log import * +from util.sql import * +from util.cases import * + +class TDTestCase: + updatecfgDict = {'debugFlag': 143 ,"cDebugFlag":143,"uDebugFlag":143 ,"rpcDebugFlag":143 , "tmrDebugFlag":143 , + "jniDebugFlag":143 ,"simDebugFlag":143,"dDebugFlag":143, "dDebugFlag":143,"vDebugFlag":143,"mDebugFlag":143,"qDebugFlag":143, + "wDebugFlag":143,"sDebugFlag":143,"tsdbDebugFlag":143,"tqDebugFlag":143 ,"fsDebugFlag":143 ,"fnDebugFlag":143} + + def init(self, conn, logSql): + tdLog.debug(f"start to excute {__file__}") + tdSql.init(conn.cursor()) + + def prepare_datas(self): + tdSql.execute( + '''create table stb1 + (ts timestamp, c1 int, c2 bigint, c3 smallint, c4 tinyint, c5 float, c6 double, c7 bool, c8 binary(16),c9 nchar(32), c10 timestamp) + tags (t1 int) + ''' + ) + + tdSql.execute( + ''' + create table t1 + (ts timestamp, c1 int, c2 bigint, c3 smallint, c4 tinyint, c5 float, c6 double, c7 bool, c8 binary(16),c9 nchar(32), c10 timestamp) + ''' + ) + for i in range(4): + tdSql.execute(f'create table ct{i+1} using stb1 tags ( {i+1} )') + + for i in range(9): + tdSql.execute( + f"insert into ct1 values ( now()-{i*10}s, {1*i}, {11111*i}, {111*i}, {11*i}, {1.11*i}, {11.11*i}, {i%2}, 'binary{i}', 'nchar{i}', now()+{1*i}a )" + ) + tdSql.execute( + f"insert into ct4 values ( now()-{i*90}d, {1*i}, {11111*i}, {111*i}, {11*i}, {1.11*i}, {11.11*i}, {i%2}, 'binary{i}', 'nchar{i}', now()+{1*i}a )" + ) + tdSql.execute("insert into ct1 values (now()-45s, 0, 0, 0, 0, 0, 0, 0, 'binary0', 'nchar0', now()+8a )") + tdSql.execute("insert into ct1 values (now()+10s, 9, -99999, -999, -99, -9.99, -99.99, 1, 'binary9', 'nchar9', now()+9a )") + tdSql.execute("insert into ct1 values (now()+15s, 9, -99999, -999, -99, -9.99, NULL, 1, 'binary9', 'nchar9', now()+9a )") + tdSql.execute("insert into ct1 values (now()+20s, 9, -99999, -999, NULL, -9.99, -99.99, 1, 'binary9', 'nchar9', now()+9a )") + + tdSql.execute("insert into ct4 values (now()-810d, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ) ") + tdSql.execute("insert into ct4 values (now()-400d, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ) ") + tdSql.execute("insert into ct4 values (now()+90d, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ) ") + + tdSql.execute( + f'''insert into t1 values + ( '2020-04-21 01:01:01.000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ) + ( '2020-10-21 01:01:01.000', 1, 11111, 111, 11, 1.11, 11.11, 1, "binary1", "nchar1", now()+1a ) + ( '2020-12-31 01:01:01.000', 2, 22222, 222, 22, 2.22, 22.22, 0, "binary2", "nchar2", now()+2a ) + ( '2021-01-01 01:01:06.000', 3, 33333, 333, 33, 3.33, 33.33, 0, "binary3", "nchar3", now()+3a ) + ( '2021-05-07 01:01:10.000', 4, 44444, 444, 44, 4.44, 44.44, 1, "binary4", "nchar4", now()+4a ) + ( '2021-07-21 01:01:01.000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ) + ( '2021-09-30 01:01:16.000', 5, 55555, 555, 55, 5.55, 55.55, 0, "binary5", "nchar5", now()+5a ) + ( '2022-02-01 01:01:20.000', 6, 66666, 666, 66, 6.66, 66.66, 1, "binary6", "nchar6", now()+6a ) + ( '2022-10-28 01:01:26.000', 7, 00000, 000, 00, 0.00, 00.00, 1, "binary7", "nchar7", "1970-01-01 08:00:00.000" ) + ( '2022-12-01 01:01:30.000', 8, -88888, -888, -88, -8.88, -88.88, 0, "binary8", "nchar8", "1969-01-01 01:00:00.000" ) + ( '2022-12-31 01:01:36.000', 9, -99999999999999999, -999, -99, -9.99, -999999999999999999999.99, 1, "binary9", "nchar9", "1900-01-01 00:00:00.000" ) + ( '2023-02-21 01:01:01.000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ) + ''' + ) + + def test_errors(self): + error_sql_lists = [ + "select unique from t1", + "select unique(123--123)==1 from t1", + "select unique(123,123) from t1", + "select unique(c1,ts) from t1", + "select unique(c1,c1,ts) from t1", + "select unique(c1) as 'd1' from t1", + "select unique(c1 ,c2 ) from t1", + "select unique(c1 ,NULL) from t1", + "select unique(,) from t1;", + "select unique(floor(c1) ab from t1)", + "select unique(c1) as int from t1", + "select unique('c1') from t1", + "select unique(NULL) from t1", + "select unique('') from t1", + "select unique(c%) from t1", + "select unique(t1) from t1", + "select unique(True) from t1", + "select unique(c1) , count(c1) from t1", + "select unique(c1) , avg(c1) from t1", + "select unique(c1) , min(c1) from t1", + "select unique(c1) , spread(c1) from t1", + "select unique(c1) , diff(c1) from t1", + "select unique(c1) , abs(c1) from t1", + "select unique(c1) , c1 from t1", + "select unique from stb1 partition by tbname", + "select unique(123--123)==1 from stb1 partition by tbname", + "select unique(123) from stb1 partition by tbname", + "select unique(c1,ts) from stb1 partition by tbname", + "select unique(c1,c1,ts) from stb1 partition by tbname", + "select unique(c1) as 'd1' from stb1 partition by tbname", + "select unique(c1 ,c2 ) from stb1 partition by tbname", + "select unique(c1 ,NULL) from stb1 partition by tbname", + "select unique(,) from stb1 partition by tbname;", + "select unique(floor(c1) ab from stb1 partition by tbname)", + "select unique(c1) as int from stb1 partition by tbname", + "select unique('c1') from stb1 partition by tbname", + "select unique(NULL) from stb1 partition by tbname", + "select unique('') from stb1 partition by tbname", + "select unique(c%) from stb1 partition by tbname", + #"select unique(t1) from stb1 partition by tbname", + "select unique(True) from stb1 partition by tbname", + "select unique(c1) , count(c1) from stb1 partition by tbname", + "select unique(c1) , avg(c1) from stb1 partition by tbname", + "select unique(c1) , min(c1) from stb1 partition by tbname", + "select unique(c1) , spread(c1) from stb1 partition by tbname", + "select unique(c1) , diff(c1) from stb1 partition by tbname", + "select unique(c1) , abs(c1) from stb1 partition by tbname", + "select unique(c1) , c1 from stb1 partition by tbname" + + ] + for error_sql in error_sql_lists: + tdSql.error(error_sql) + pass + + def support_types(self): + other_no_value_types = [ + "select unique(ts) from t1" , + "select unique(c7) from t1", + "select unique(c8) from t1", + "select unique(c9) from t1", + "select unique(ts) from ct1" , + "select unique(c7) from ct1", + "select unique(c8) from ct1", + "select unique(c9) from ct1", + "select unique(ts) from ct3" , + "select unique(c7) from ct3", + "select unique(c8) from ct3", + "select unique(c9) from ct3", + "select unique(ts) from ct4" , + "select unique(c7) from ct4", + "select unique(c8) from ct4", + "select unique(c9) from ct4", + "select unique(ts) from stb1 partition by tbname" , + "select unique(c7) from stb1 partition by tbname", + "select unique(c8) from stb1 partition by tbname", + "select unique(c9) from stb1 partition by tbname" + ] + + for type_sql in other_no_value_types: + tdSql.query(type_sql) + tdLog.info("support type ok , sql is : %s"%type_sql) + + type_sql_lists = [ + "select unique(c1) from t1", + "select unique(c2) from t1", + "select unique(c3) from t1", + "select unique(c4) from t1", + "select unique(c5) from t1", + "select unique(c6) from t1", + + "select unique(c1) from ct1", + "select unique(c2) from ct1", + "select unique(c3) from ct1", + "select unique(c4) from ct1", + "select unique(c5) from ct1", + "select unique(c6) from ct1", + + "select unique(c1) from ct3", + "select unique(c2) from ct3", + "select unique(c3) from ct3", + "select unique(c4) from ct3", + "select unique(c5) from ct3", + "select unique(c6) from ct3", + + "select unique(c1) from stb1 partition by tbname", + "select unique(c2) from stb1 partition by tbname", + "select unique(c3) from stb1 partition by tbname", + "select unique(c4) from stb1 partition by tbname", + "select unique(c5) from stb1 partition by tbname", + "select unique(c6) from stb1 partition by tbname", + + "select unique(c6) as alisb from stb1 partition by tbname", + "select unique(c6) alisb from stb1 partition by tbname", + ] + + for type_sql in type_sql_lists: + tdSql.query(type_sql) + + def check_unique_table(self , unique_sql): + # unique_sql = "select unique(c1) from ct1" + origin_sql = unique_sql.replace("unique(","").replace(")","") + tdSql.query(unique_sql) + unique_result = tdSql.queryResult + + unique_datas = [] + for elem in unique_result: + unique_datas.append(elem[0]) + + + tdSql.query(origin_sql) + origin_result = tdSql.queryResult + origin_datas = [] + for elem in origin_result: + origin_datas.append(elem[0]) + + pre_unique = [] + for elem in origin_datas: + if elem in pre_unique: + continue + else: + pre_unique.append(elem) + + if pre_unique == unique_datas: + tdLog.info(" unique query check pass , unique sql is: %s" %unique_sql) + else: + tdLog.exit(" unique query check fail , unique sql is: %s " %unique_sql) + + def basic_unique_function(self): + + # basic query + tdSql.query("select c1 from ct3") + tdSql.checkRows(0) + tdSql.query("select c1 from t1") + tdSql.checkRows(12) + tdSql.query("select c1 from stb1") + tdSql.checkRows(25) + + # used for empty table , ct3 is empty + tdSql.query("select unique(c1) from ct3") + tdSql.checkRows(0) + tdSql.query("select unique(c2) from ct3") + tdSql.checkRows(0) + tdSql.query("select unique(c3) from ct3") + tdSql.checkRows(0) + tdSql.query("select unique(c4) from ct3") + tdSql.checkRows(0) + tdSql.query("select unique(c5) from ct3") + tdSql.checkRows(0) + tdSql.query("select unique(c6) from ct3") + + # will support _rowts mix with + # tdSql.query("select unique(c6),_rowts from ct3") + + # auto check for t1 table + # used for regular table + tdSql.query("select unique(c1) from t1") + + tdSql.query("desc t1") + col_lists_rows = tdSql.queryResult + col_lists = [] + for col_name in col_lists_rows: + col_lists.append(col_name[0]) + + for col in col_lists: + self.check_unique_table(f"select unique({col}) from t1") + + # unique with super tags + + tdSql.query("select unique(c1) from ct1") + tdSql.checkRows(10) + + tdSql.query("select unique(c1) from ct4") + tdSql.checkRows(10) + + tdSql.error("select unique(c1),tbname from ct1") + tdSql.error("select unique(c1),t1 from ct1") + + # unique with common col + tdSql.error("select unique(c1) ,ts from ct1") + tdSql.error("select unique(c1) ,c1 from ct1") + + # unique with scalar function + tdSql.error("select unique(c1) ,abs(c1) from ct1") + tdSql.error("select unique(c1) , unique(c2) from ct1") + tdSql.error("select unique(c1) , abs(c2)+2 from ct1") + + + # unique with aggregate function + tdSql.error("select unique(c1) ,sum(c1) from ct1") + tdSql.error("select unique(c1) ,max(c1) from ct1") + tdSql.error("select unique(c1) ,csum(c1) from ct1") + tdSql.error("select unique(c1) ,count(c1) from ct1") + + # unique with filter where + tdSql.query("select unique(c1) from ct4 where c1 is null") + tdSql.checkData(0, 0, None) + + tdSql.query("select unique(c1) from ct4 where c1 >2 ") + tdSql.checkData(0, 0, 8) + tdSql.checkData(1, 0, 7) + tdSql.checkData(2, 0, 6) + tdSql.checkData(5, 0, 3) + + tdSql.query("select unique(c1) from ct4 where c2 between 0 and 99999") + tdSql.checkData(0, 0, 8) + tdSql.checkData(1, 0, 7) + tdSql.checkData(2, 0, 6) + tdSql.checkData(3, 0, 5) + tdSql.checkData(4, 0, 4) + tdSql.checkData(5, 0, 3) + tdSql.checkData(6, 0, 2) + tdSql.checkData(7, 0, 1) + tdSql.checkData(8, 0, 0) + + # unique with union all + tdSql.query("select unique(c1) from ct4 union all select c1 from ct1") + tdSql.checkRows(23) + tdSql.query("select unique(c1) from ct4 union all select distinct(c1) from ct4") + tdSql.checkRows(20) + tdSql.query("select unique(c2) from ct4 union all select abs(c2)/2 from ct4") + tdSql.checkRows(22) + + # unique with join + # prepare join datas with same ts + + tdSql.execute(" use db ") + tdSql.execute(" create stable st1 (ts timestamp , num int) tags(ind int)") + tdSql.execute(" create table tb1 using st1 tags(1)") + tdSql.execute(" create table tb2 using st1 tags(2)") + + tdSql.execute(" create stable st2 (ts timestamp , num int) tags(ind int)") + tdSql.execute(" create table ttb1 using st2 tags(1)") + tdSql.execute(" create table ttb2 using st2 tags(2)") + + start_ts = 1622369635000 # 2021-05-30 18:13:55 + + for i in range(10): + ts_value = start_ts+i*1000 + tdSql.execute(f" insert into tb1 values({ts_value} , {i})") + tdSql.execute(f" insert into tb2 values({ts_value} , {i})") + + tdSql.execute(f" insert into ttb1 values({ts_value} , {i})") + tdSql.execute(f" insert into ttb2 values({ts_value} , {i})") + + tdSql.query("select unique(tb2.num) from tb1, tb2 where tb1.ts=tb2.ts ") + tdSql.checkRows(10) + tdSql.checkData(0,0,0) + tdSql.checkData(1,0,1) + tdSql.checkData(2,0,2) + tdSql.checkData(9,0,9) + + tdSql.query("select unique(tb2.num) from tb1, tb2 where tb1.ts=tb2.ts union all select unique(tb1.num) from tb1, tb2 where tb1.ts=tb2.ts ") + tdSql.checkRows(20) + tdSql.checkData(0,0,0) + tdSql.checkData(1,0,1) + tdSql.checkData(2,0,2) + tdSql.checkData(9,0,9) + + # nest query + # tdSql.query("select unique(c1) from (select c1 from ct1)") + tdSql.query("select c1 from (select unique(c1) c1 from ct4)") + tdSql.checkRows(10) + tdSql.checkData(0, 0, None) + tdSql.checkData(1, 0, 8) + tdSql.checkData(9, 0, 0) + + tdSql.query("select sum(c1) from (select unique(c1) c1 from ct1)") + tdSql.checkRows(1) + tdSql.checkData(0, 0, 45) + + tdSql.query("select sum(c1) from (select distinct(c1) c1 from ct1) union all select sum(c1) from (select unique(c1) c1 from ct1)") + tdSql.checkRows(2) + tdSql.checkData(0, 0, 45) + tdSql.checkData(1, 0, 45) + + tdSql.query("select 1-abs(c1) from (select unique(c1) c1 from ct4)") + tdSql.checkRows(10) + tdSql.checkData(0, 0, None) + tdSql.checkData(1, 0, -7.000000000) + + + # bug for stable + #partition by tbname + # tdSql.query(" select unique(c1) from stb1 partition by tbname ") + # tdSql.checkRows(21) + + # tdSql.query(" select unique(c1) from stb1 partition by tbname ") + # tdSql.checkRows(21) + + # group by + tdSql.error("select unique(c1) from ct1 group by c1") + tdSql.error("select unique(c1) from ct1 group by tbname") + + # super table + + + + + def check_boundary_values(self): + + tdSql.execute("drop database if exists bound_test") + tdSql.execute("create database if not exists bound_test") + tdSql.execute("use bound_test") + tdSql.execute( + "create table stb_bound (ts timestamp, c1 int, c2 bigint, c3 smallint, c4 tinyint, c5 float, c6 double, c7 bool, c8 binary(32),c9 nchar(32), c10 timestamp) tags (t1 int);" + ) + tdSql.execute(f'create table sub1_bound using stb_bound tags ( 1 )') + tdSql.execute( + f"insert into sub1_bound values ( now()-1s, 2147483647, 9223372036854775807, 32767, 127, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )" + ) + tdSql.execute( + f"insert into sub1_bound values ( now(), 2147483646, 9223372036854775806, 32766, 126, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )" + ) + + tdSql.execute( + f"insert into sub1_bound values ( now(), -2147483646, -9223372036854775806, -32766, -126, -3.40E+38, -1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )" + ) + + tdSql.execute( + f"insert into sub1_bound values ( now(), 2147483643, 9223372036854775803, 32763, 123, 3.39E+38, 1.69e+308, True, 'binary_tb1', 'nchar_tb1', now() )" + ) + + tdSql.execute( + f"insert into sub1_bound values ( now(), -2147483643, -9223372036854775803, -32763, -123, -3.39E+38, -1.69e+308, True, 'binary_tb1', 'nchar_tb1', now() )" + ) + + tdSql.error( + f"insert into sub1_bound values ( now()+1s, 2147483648, 9223372036854775808, 32768, 128, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )" + ) + + tdSql.query("select unique(c2) from sub1_bound") + tdSql.checkRows(5) + tdSql.checkData(0,0,9223372036854775807) + + def run(self): # sourcery skip: extract-duplicate-method, remove-redundant-fstring + tdSql.prepare() + + tdLog.printNoPrefix("==========step1:create table ==============") + + self.prepare_datas() + + tdLog.printNoPrefix("==========step2:test errors ==============") + + self.test_errors() + + tdLog.printNoPrefix("==========step3:support types ============") + + self.support_types() + + tdLog.printNoPrefix("==========step4: floor basic query ============") + + self.basic_unique_function() + + tdLog.printNoPrefix("==========step5: floor boundary query ============") + + self.check_boundary_values() + + + def stop(self): + tdSql.close() + tdLog.success(f"{__file__} successfully executed") + +tdCases.addLinux(__file__, TDTestCase()) +tdCases.addWindows(__file__, TDTestCase()) diff --git a/tests/system-test/fulltest.sh b/tests/system-test/fulltest.sh index 6331086fb3bb842bd255c41b2388136e6a977770..f9e9679df4b98dcd093e8bba3147f87ec17ed34e 100644 --- a/tests/system-test/fulltest.sh +++ b/tests/system-test/fulltest.sh @@ -72,7 +72,9 @@ python3 ./test.py -f 2-query/arccos.py python3 ./test.py -f 2-query/arctan.py python3 ./test.py -f 2-query/query_cols_tags_and_or.py # python3 ./test.py -f 2-query/nestedQuery.py -python3 ./test.py -f 2-query/nestedQuery_str.py +# TD-15983 subquery output duplicate name column. +# Please Xiangyang Guo modify the following script +# python3 ./test.py -f 2-query/nestedQuery_str.py python3 ./test.py -f 2-query/avg.py python3 ./test.py -f 2-query/elapsed.py python3 ./test.py -f 2-query/csum.py @@ -80,6 +82,7 @@ python3 ./test.py -f 2-query/mavg.py python3 ./test.py -f 2-query/diff.py python3 ./test.py -f 2-query/sample.py python3 ./test.py -f 2-query/function_diff.py +python3 ./test.py -f 2-query/unique.py python3 ./test.py -f 7-tmq/basic5.py python3 ./test.py -f 7-tmq/subscribeDb.py @@ -91,4 +94,3 @@ python3 ./test.py -f 7-tmq/subscribeStb1.py python3 ./test.py -f 7-tmq/subscribeStb2.py python3 ./test.py -f 7-tmq/subscribeStb3.py python3 ./test.py -f 7-tmq/subscribeStb4.py -python3 ./test.py -f 7-tmq/subscribeStb2.py \ No newline at end of file diff --git a/tests/system-test/insert.json b/tests/system-test/insert.json deleted file mode 100644 index 5dea9eabfef35de733e70c7a7ac251b53f5c3563..0000000000000000000000000000000000000000 --- a/tests/system-test/insert.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "filetype": "insert", - "cfgdir": "/etc/taos", - "host": "127.0.0.1", - "port": 6030, - "user": "root", - "password": "taosdata", - "thread_count": 16, - "create_table_thread_count": 1, - "result_file": "./insert_res.txt", - "confirm_parameter_prompt": "no", - "insert_interval": 0, - "interlace_rows": 0, - "num_of_records_per_req": 10000, - "prepared_rand": 10000, - "chinese": "no", - "databases": [ - { - "dbinfo": { - "name": "db", - "drop": "yes", - "vgroups":4, - "replica": 1, - "precision": "ms" - }, - "super_tables": [ - { - "name": "stb", - "child_table_exists": "no", - "childtable_count": 1000, - "childtable_prefix": "stb_", - "escape_character": "no", - "auto_create_table": "no", - "batch_create_tbl_num": 10, - "data_source": "rand", - "insert_mode": "taosc", - "non_stop_mode": "no", - "line_protocol": "line", - "insert_rows": 100000, - "interlace_rows": 0, - "insert_interval": 0, - "disorder_ratio": 0, - "timestamp_step": 1, - "start_timestamp": "2020-10-01 00:00:00.000", - "use_sample_ts": "no", - "tags_file": "", - "columns": [ - { - "type": "FLOAT", - "name": "current", - "count": 4, - "max": 12, - "min": 8 - }, - { "type": "INT", "name": "voltage", "max": 225, "min": 215 }, - { "type": "FLOAT", "name": "phase", "max": 1, "min": 0 } - ], - "tags": [ - { - "type": "TINYINT", - "name": "groupid", - "max": 10, - "min": 1 - }, - { - "name": "location", - "type": "BINARY", - "len": 16, - "values": ["beijing", "shanghai"] - } - ] - } - ] - } - ] -}