diff --git a/cmake/taostools_CMakeLists.txt.in b/cmake/taostools_CMakeLists.txt.in
index 448c2b99c0..5d2fcf27b2 100644
--- a/cmake/taostools_CMakeLists.txt.in
+++ b/cmake/taostools_CMakeLists.txt.in
@@ -2,7 +2,7 @@
# taos-tools
ExternalProject_Add(taos-tools
GIT_REPOSITORY https://github.com/taosdata/taos-tools.git
- GIT_TAG f03c09a
+ GIT_TAG 70f5a1c
SOURCE_DIR "${TD_SOURCE_DIR}/tools/taos-tools"
BINARY_DIR ""
#BUILD_IN_SOURCE TRUE
diff --git a/docs/en/07-develop/03-insert-data/02-influxdb-line.mdx b/docs/en/07-develop/03-insert-data/02-influxdb-line.mdx
index 11db3daeb0..c91dbba5d2 100644
--- a/docs/en/07-develop/03-insert-data/02-influxdb-line.mdx
+++ b/docs/en/07-develop/03-insert-data/02-influxdb-line.mdx
@@ -37,7 +37,8 @@ meters,location=California.LosAngeles,groupid=2 current=13.4,voltage=223,phase=0
- All the data in `tag_set` will be converted to nchar type automatically .
- Each data in `field_set` must be self-descriptive for its data type. For example 1.2f32 means a value 1.2 of float type. Without the "f" type suffix, it will be treated as type double.
- Multiple kinds of precision can be used for the `timestamp` field. Time precision can be from nanosecond (ns) to hour (h).
-
+- You can configure smlChildTableName in taos.cfg to specify table names, for example, `smlChildTableName=tname`. You can insert `st,tname=cpul,t1=4 c1=3 1626006833639000000` and the cpu1 table will be automatically created. Note that if multiple rows have the same tname but different tag_set values, the tag_set of the first row is used to create the table and the others are ignored.
+- It is assumed that the order of field_set in a supertable is consistent, meaning that the first record contains all fields and subsequent records store fields in the same order. If the order is not consistent, set smlDataFormat in taos.cfg to false. Otherwise, data will be written out of order and a database error will occur.(smlDataFormat in taos.cfg default to false after version of 3.0.1.3)
:::
For more details please refer to [InfluxDB Line Protocol](https://docs.influxdata.com/influxdb/v2.0/reference/syntax/line-protocol/) and [TDengine Schemaless](/reference/schemaless/#Schemaless-Line-Protocol)
@@ -64,3 +65,7 @@ For more details please refer to [InfluxDB Line Protocol](https://docs.influxdat
+
+## Query Examples
+If you want query the data of `location=California.LosAngeles,groupid=2`,here is the query sql:
+select * from `meters.voltage` where location="California.LosAngeles" and groupid=2
diff --git a/docs/en/07-develop/03-insert-data/03-opentsdb-telnet.mdx b/docs/en/07-develop/03-insert-data/03-opentsdb-telnet.mdx
index db9bfd7364..d88a6335cb 100644
--- a/docs/en/07-develop/03-insert-data/03-opentsdb-telnet.mdx
+++ b/docs/en/07-develop/03-insert-data/03-opentsdb-telnet.mdx
@@ -31,7 +31,7 @@ For example:
```txt
meters.current 1648432611250 11.3 location=California.LosAngeles groupid=3
```
-
+- The defult child table name is generated by rules.You can configure smlChildTableName in taos.cfg to specify chile table names, for example, `smlChildTableName=tname`. You can insert `meters.current 1648432611250 11.3 tname=cpu1 location=California.LosAngeles groupid=3` and the cpu1 table will be automatically created. Note that if multiple rows have the same tname but different tag_set values, the tag_set of the first row is used to create the table and the others are ignored.
Please refer to [OpenTSDB Telnet API](http://opentsdb.net/docs/build/html/api_telnet/put.html) for more details.
## Examples
@@ -79,3 +79,6 @@ taos> select tbname, * from `meters.current`;
t_7e7b26dd860280242c6492a16... | 2022-03-28 09:56:51.250 | 12.600000000 | 2 | California.SanFrancisco |
Query OK, 4 row(s) in set (0.005399s)
```
+## Query Examples
+If you want query the data of `location=California.LosAngeles groupid=3`,here is the query sql:
+select * from `meters.voltage` where location="California.LosAngeles" and groupid=3
diff --git a/docs/en/07-develop/03-insert-data/04-opentsdb-json.mdx b/docs/en/07-develop/03-insert-data/04-opentsdb-json.mdx
index 23703f4087..e2e6d6fc9f 100644
--- a/docs/en/07-develop/03-insert-data/04-opentsdb-json.mdx
+++ b/docs/en/07-develop/03-insert-data/04-opentsdb-json.mdx
@@ -48,7 +48,7 @@ Please refer to [OpenTSDB HTTP API](http://opentsdb.net/docs/build/html/api_http
- In JSON protocol, strings will be converted to nchar type and numeric values will be converted to double type.
- Only data in array format is accepted and so an array must be used even if there is only one row.
-
+- The defult child table name is generated by rules.You can configure smlChildTableName in taos.cfg to specify chile table names, for example, `smlChildTableName=tname`. You can insert `"tags": { "host": "web02","dc": "lga","tname":"cpu1"}` and the cpu1 table will be automatically created. Note that if multiple rows have the same tname but different tag_set values, the tag_set of the first row is used to create the table and the others are ignored.
:::
## Examples
@@ -94,3 +94,6 @@ taos> select * from `meters.current`;
2022-03-28 09:56:51.250 | 12.600000000 | 2.000000000 | California.SanFrancisco |
Query OK, 2 row(s) in set (0.004076s)
```
+## Query Examples
+If you want query the data of "tags": {"location": "California.LosAngeles", "groupid": 1},here is the query sql:
+select * from `meters.voltage` where location="California.LosAngeles" and groupid=1
diff --git a/docs/en/12-taos-sql/06-select.md b/docs/en/12-taos-sql/06-select.md
index 786444ad77..c065245827 100644
--- a/docs/en/12-taos-sql/06-select.md
+++ b/docs/en/12-taos-sql/06-select.md
@@ -181,6 +181,14 @@ In TDengine, the first column of all tables must be a timestamp. This column is
select _rowts, max(current) from meters;
```
+**\_IROWTS**
+
+The \_IROWTS pseudocolumn can only be used with INTERP function. This pseudocolumn can be used to retrieve the corresponding timestamp column associated with the interpolation results.
+
+```sql
+select _irowts, interp(current) from meters range('2020-01-01 10:00:00', '2020-01-01 10:30:00') every(1s) fill(linear);
+```
+
## Query Objects
`FROM` can be followed by a number of tables or super tables, or can be followed by a sub-query.
diff --git a/docs/en/12-taos-sql/10-function.md b/docs/en/12-taos-sql/10-function.md
index 14dedfb216..243ede5fcb 100644
--- a/docs/en/12-taos-sql/10-function.md
+++ b/docs/en/12-taos-sql/10-function.md
@@ -867,6 +867,7 @@ INTERP(expr)
- The number of rows in the result set of `INTERP` is determined by the parameter `EVERY`. Starting from timestamp1, one interpolation is performed for every time interval specified `EVERY` parameter.
- Interpolation is performed based on `FILL` parameter.
- `INTERP` can only be used to interpolate in single timeline. So it must be used with `partition by tbname` when it's used on a STable.
+- Pseudo column `_irowts` can be used along with `INTERP` to return the timestamps associated with interpolation points(support after version 3.0.1.4).
### LAST
diff --git a/docs/en/12-taos-sql/20-keywords.md b/docs/en/12-taos-sql/20-keywords.md
index f7eb067c96..4b479b866b 100644
--- a/docs/en/12-taos-sql/20-keywords.md
+++ b/docs/en/12-taos-sql/20-keywords.md
@@ -343,6 +343,7 @@ The following list shows all reserved keywords:
### \_
- \_C0
+- \_IROWTS
- \_QDURATION
- \_QEND
- \_QSTART
diff --git a/docs/en/12-taos-sql/22-meta.md b/docs/en/12-taos-sql/22-meta.md
index 9bda5a0a10..0a59777946 100644
--- a/docs/en/12-taos-sql/22-meta.md
+++ b/docs/en/12-taos-sql/22-meta.md
@@ -11,7 +11,15 @@ TDengine includes a built-in database named `INFORMATION_SCHEMA` to provide acce
4. Future versions of TDengine can add new columns to INFORMATION_SCHEMA tables without affecting existing business systems.
5. It is easier for users coming from other database management systems. For example, Oracle users can query data dictionary tables.
-Note: SHOW statements are still supported for the convenience of existing users.
+:::info
+
+- SHOW statements are still supported for the convenience of existing users.
+- Some columns in the system table may be keywords, and you need to use the escape character '\`' when querying, for example, to query the VGROUPS in the database `test`:
+```sql
+ select `vgroups` from ins_databases where name = 'test';
+```
+
+:::
This document introduces the tables of INFORMATION_SCHEMA and their structure.
@@ -102,7 +110,11 @@ Provides information about user-created databases. Similar to SHOW DATABASES.
| 24 | wal_retention_period | INT | WAL retention period |
| 25 | wal_retention_size | INT | Maximum WAL size |
| 26 | wal_roll_period | INT | WAL rotation period |
-| 27 | wal_segment_size | WAL file size |
+| 27 | wal_segment_size | BIGINT | WAL file size |
+| 28 | stt_trigger | SMALLINT | The threshold for number of files to trigger file merging |
+| 29 | table_prefix | SMALLINT | The prefix length in the table name that is ignored when distributing table to vnode based on table name |
+| 30 | table_suffix | SMALLINT | The suffix length in the table name that is ignored when distributing table to vnode based on table name |
+| 31 | tsdb_pagesize | INT | The page size for internal storage engine, its unit is KB |
## INS_FUNCTIONS
diff --git a/docs/en/12-taos-sql/29-changes.md b/docs/en/12-taos-sql/29-changes.md
index 8532eeac5d..78b6d5fc05 100644
--- a/docs/en/12-taos-sql/29-changes.md
+++ b/docs/en/12-taos-sql/29-changes.md
@@ -11,12 +11,13 @@ description: "This document explains how TDengine SQL has changed in version 3.0
| 1 | VARCHAR | Added | Alias of BINARY.
| 2 | TIMESTAMP literal | Added | TIMESTAMP 'timestamp format' syntax now supported.
| 3 | _ROWTS pseudocolumn | Added | Indicates the primary key. Alias of _C0.
-| 4 | INFORMATION_SCHEMA | Added | Database for system metadata containing all schema definitions
-| 5 | PERFORMANCE_SCHEMA | Added | Database for system performance information.
-| 6 | Connection queries | Deprecated | Connection queries are no longer supported. The syntax and interfaces are deprecated.
-| 7 | Mixed operations | Enhanced | Mixing scalar and vector operations in queries has been enhanced and is supported in all SELECT clauses.
-| 8 | Tag operations | Added | Tag columns can be used in queries and clauses like data columns.
-| 9 | Timeline clauses and time functions in supertables | Enhanced | When PARTITION BY is not used, data in supertables is merged into a single timeline.
+| 4 | _IROWTS pseudocolumn | Added | Used to retrieve timestamps with INTERP function.
+| 5 | INFORMATION_SCHEMA | Added | Database for system metadata containing all schema definitions
+| 6 | PERFORMANCE_SCHEMA | Added | Database for system performance information.
+| 7 | Connection queries | Deprecated | Connection queries are no longer supported. The syntax and interfaces are deprecated.
+| 8 | Mixed operations | Enhanced | Mixing scalar and vector operations in queries has been enhanced and is supported in all SELECT clauses.
+| 9 | Tag operations | Added | Tag columns can be used in queries and clauses like data columns.
+| 10 | Timeline clauses and time functions in supertables | Enhanced | When PARTITION BY is not used, data in supertables is merged into a single timeline.
## SQL Syntax
diff --git a/docs/en/14-reference/12-config/index.md b/docs/en/14-reference/12-config/index.md
index 5ab6f59454..726a1ccd69 100644
--- a/docs/en/14-reference/12-config/index.md
+++ b/docs/en/14-reference/12-config/index.md
@@ -177,12 +177,21 @@ The parameters described in this document by the effect that they have on the sy
### maxNumOfDistinctRes
| Attribute | Description |
-| -------- | -------------------------------- | --- |
+| -------- | -------------------------------- |
| Applicable | Server Only |
| Meaning | The maximum number of distinct rows returned |
| Value Range | [100,000 - 100,000,000] |
| Default Value | 100,000 |
+### keepColumnName
+
+| Attribute | Description |
+| -------- | -------------------------------- |
+| Applicable | Client only |
+| Meaning | When the Last, First, LastRow function is queried, whether the returned column name contains the function name. |
+| Value Range | 0 means including the function name, 1 means not including the function name. |
+| Default Value | 0 |
+
## Locale Parameters
### timezone
diff --git a/docs/en/14-reference/13-schemaless/13-schemaless.md b/docs/en/14-reference/13-schemaless/13-schemaless.md
index 4f50c38cbb..5b7924ce56 100644
--- a/docs/en/14-reference/13-schemaless/13-schemaless.md
+++ b/docs/en/14-reference/13-schemaless/13-schemaless.md
@@ -47,9 +47,8 @@ In the schemaless writing data line protocol, each data item in the field_set ne
- `t`, `T`, `true`, `True`, `TRUE`, `f`, `F`, `false`, and `False` will be handled directly as BOOL types.
-For example, the following data rows indicate that the t1 label is "3" (NCHAR), the t2 label is "4" (NCHAR), and the t3 label
-is "t3" to the super table named `st` labeled "t3" (NCHAR), write c1 column as 3 (BIGINT), c2 column as false (BOOL), c3 column
-is "passit" (BINARY), c4 column is 4 (DOUBLE), and the primary key timestamp is 1626006833639000000 in one row.
+For example, the following data rows write c1 column as 3 (BIGINT), c2 column as false (BOOL), c3 column
+as "passit" (BINARY), c4 column as 4 (DOUBLE), and the primary key timestamp as 1626006833639000000 to child table with the t1 label as "3" (NCHAR), the t2 label as "4" (NCHAR), and the t3 label as "t3" (NCHAR) and the super table named `st`.
```json
st,t1=3,t2=4,t3=t3 c1=3i64,c3="passit",c2=false,c4=4f64 1626006833639000000
@@ -69,7 +68,7 @@ Schemaless writes process row data according to the following principles.
Note that tag_key1, tag_key2 are not the original order of the tags entered by the user but the result of using the tag names in ascending order of the strings. Therefore, tag_key1 is not the first tag entered in the line protocol.
The string's MD5 hash value "md5_val" is calculated after the ranking is completed. The calculation result is then combined with the string to generate the table name: "t_md5_val". "t_" is a fixed prefix that every table generated by this mapping relationship has.
-You can configure smlChildTableName to specify table names, for example, `smlChildTableName=tname`. You can insert `st,tname=cpul,t1=4 c1=3 1626006833639000000` and the cpu1 table will be automatically created. Note that if multiple rows have the same tname but different tag_set values, the tag_set of the first row is used to create the table and the others are ignored.
+You can configure smlChildTableName in taos.cfg to specify table names, for example, `smlChildTableName=tname`. You can insert `st,tname=cpul,t1=4 c1=3 1626006833639000000` and the cpu1 table will be automatically created. Note that if multiple rows have the same tname but different tag_set values, the tag_set of the first row is used to create the table and the others are ignored.
2. If the super table obtained by parsing the line protocol does not exist, this super table is created.
3. If the subtable obtained by the parse line protocol does not exist, Schemaless creates the sub-table according to the subtable name determined in steps 1 or 2.
@@ -78,7 +77,7 @@ You can configure smlChildTableName to specify table names, for example, `smlChi
NULL.
6. For BINARY or NCHAR columns, if the length of the value provided in a data row exceeds the column type limit, the maximum length of characters allowed to be stored in the column is automatically increased (only incremented and not decremented) to ensure complete preservation of the data.
7. Errors encountered throughout the processing will interrupt the writing process and return an error code.
-8. It is assumed that the order of field_set in a supertable is consistent, meaning that the first record contains all fields and subsequent records store fields in the same order. If the order is not consistent, set smlDataFormat to false. Otherwise, data will be written out of order and a database error will occur.
+8. It is assumed that the order of field_set in a supertable is consistent, meaning that the first record contains all fields and subsequent records store fields in the same order. If the order is not consistent, set smlDataFormat in taos.cfg to false. Otherwise, data will be written out of order and a database error will occur.(smlDataFormat in taos.cfg default to false after version of 3.0.1.3)
:::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
diff --git a/docs/en/28-releases/01-tdengine.md b/docs/en/28-releases/01-tdengine.md
index 414986d107..a65a2fff63 100644
--- a/docs/en/28-releases/01-tdengine.md
+++ b/docs/en/28-releases/01-tdengine.md
@@ -6,6 +6,10 @@ description: TDengine release history, Release Notes and download links.
import Release from "/components/ReleaseV3";
+## 3.0.1.3
+
+
+
## 3.0.1.2
diff --git a/docs/en/28-releases/02-tools.md b/docs/en/28-releases/02-tools.md
index 086d3adea2..a83723bff7 100644
--- a/docs/en/28-releases/02-tools.md
+++ b/docs/en/28-releases/02-tools.md
@@ -6,6 +6,10 @@ description: taosTools release history, Release Notes, download links.
import Release from "/components/ReleaseV3";
+## 2.2.3
+
+
+
## 2.2.2
diff --git a/docs/zh/07-develop/03-insert-data/02-influxdb-line.mdx b/docs/zh/07-develop/03-insert-data/02-influxdb-line.mdx
index f88284ad67..a107ffb1b6 100644
--- a/docs/zh/07-develop/03-insert-data/02-influxdb-line.mdx
+++ b/docs/zh/07-develop/03-insert-data/02-influxdb-line.mdx
@@ -37,7 +37,9 @@ meters,location=California.LosAngeles,groupid=2 current=13.4,voltage=223,phase=0
- tag_set 中的所有的数据自动转化为 nchar 数据类型;
- field_set 中的每个数据项都需要对自身的数据类型进行描述, 比如 1.2f32 代表 float 类型的数值 1.2, 如果不带类型后缀会被当作 double 处理;
- timestamp 支持多种时间精度。写入数据的时候需要用参数指定时间精度,支持从小时到纳秒的 6 种时间精度。
-
+- 为了提高写入的效率,默认假设同一个超级表中 field_set 的顺序是一样的(第一条数据包含所有的 field,后面的数据按照这个顺序),如果顺序不一样,需要配置参数 smlDataFormat 为 false,否则,数据写入按照相同顺序写入,库中数据会异常。(3.0.1.3之后的版本 smlDataFormat 默认为 false) [TDengine 无模式写入参考指南](/reference/schemaless/#无模式写入行协议)
+- 默认生产的子表名是根据规则生成的唯一ID值。为了让用户可以指定生成的表名,可以通过在taos.cfg里配置 smlChildTableName 参数来指定。
+举例如下:配置 smlChildTableName=tname 插入数据为 st,tname=cpu1,t1=4 c1=3 1626006833639000000 则创建的表名为 cpu1,注意如果多行数据 tname 相同,但是后面的 tag_set 不同,则使用第一行自动建表时指定的 tag_set,其他的行会忽略)。[TDengine 无模式写入参考指南](/reference/schemaless/#无模式写入行协议)
:::
要了解更多可参考:[InfluxDB Line 协议官方文档](https://docs.influxdata.com/influxdb/v2.0/reference/syntax/line-protocol/) 和 [TDengine 无模式写入参考指南](/reference/schemaless/#无模式写入行协议)
@@ -64,3 +66,7 @@ meters,location=California.LosAngeles,groupid=2 current=13.4,voltage=223,phase=0
+
+## 查询示例
+比如查询 location=California.LosAngeles,groupid=2 子表的数据可以通过如下sql:
+select * from meters where location=California.LosAngeles and groupid=2
diff --git a/docs/zh/07-develop/03-insert-data/03-opentsdb-telnet.mdx b/docs/zh/07-develop/03-insert-data/03-opentsdb-telnet.mdx
index 4f63e17635..58bca7f843 100644
--- a/docs/zh/07-develop/03-insert-data/03-opentsdb-telnet.mdx
+++ b/docs/zh/07-develop/03-insert-data/03-opentsdb-telnet.mdx
@@ -32,6 +32,8 @@ OpenTSDB 行协议同样采用一行字符串来表示一行数据。OpenTSDB
meters.current 1648432611250 11.3 location=California.LosAngeles groupid=3
```
+- 默认生产的子表名是根据规则生成的唯一ID值。为了让用户可以指定生成的表名,可以通过在taos.cfg里配置 smlChildTableName 参数来指定。
+举例如下:配置 smlChildTableName=tname 插入数据为 meters.current 1648432611250 11.3 tname=cpu1 location=California.LosAngeles groupid=3 则创建的表名为 cpu1,注意如果多行数据 tname 相同,但是后面的 tag_set 不同,则使用第一行自动建表时指定的 tag_set,其他的行会忽略)。
参考[OpenTSDB Telnet API 文档](http://opentsdb.net/docs/build/html/api_telnet/put.html)。
## 示例代码
@@ -79,3 +81,6 @@ taos> select tbname, * from `meters.current`;
t_7e7b26dd860280242c6492a16... | 2022-03-28 09:56:51.250 | 12.600000000 | 2 | California.SanFrancisco |
Query OK, 4 row(s) in set (0.005399s)
```
+## 查询示例:
+想要查询 location=California.LosAngeles groupid=3 的数据,可以通过如下sql:
+select * from `meters.voltage` where location="California.LosAngeles" and groupid=3
diff --git a/docs/zh/07-develop/03-insert-data/04-opentsdb-json.mdx b/docs/zh/07-develop/03-insert-data/04-opentsdb-json.mdx
index b0257b9cb7..aa3e5980cf 100644
--- a/docs/zh/07-develop/03-insert-data/04-opentsdb-json.mdx
+++ b/docs/zh/07-develop/03-insert-data/04-opentsdb-json.mdx
@@ -48,7 +48,8 @@ OpenTSDB JSON 格式协议采用一个 JSON 字符串表示一行或多行数据
- 对于 JSON 格式协议,TDengine 并不会自动把所有标签转成 nchar 类型, 字符串将将转为 nchar 类型, 数值将同样转换为 double 类型。
- TDengine 只接收 JSON **数组格式**的字符串,即使一行数据也需要转换成数组形式。
-
+- 默认生产的子表名是根据规则生成的唯一ID值。为了让用户可以指定生成的表名,可以通过在taos.cfg里配置 smlChildTableName 参数来指定。
+举例如下:配置 smlChildTableName=tname 插入数据为 "tags": { "host": "web02","dc": "lga","tname":"cpu1"} 则创建的表名为 cpu1,注意如果多行数据 tname 相同,但是后面的 tag_set 不同,则使用第一行自动建表时指定的 tag_set,其他的行会忽略)。
:::
## 示例代码
@@ -94,3 +95,7 @@ taos> select * from `meters.current`;
2022-03-28 09:56:51.250 | 12.600000000 | 2.000000000 | California.SanFrancisco |
Query OK, 2 row(s) in set (0.004076s)
```
+
+## 查询示例
+想要查询"tags": {"location": "California.LosAngeles", "groupid": 1} 的数据,可以通过如下sql:
+select * from `meters.voltage` where location="California.LosAngeles" and groupid=1
diff --git a/docs/zh/12-taos-sql/06-select.md b/docs/zh/12-taos-sql/06-select.md
index 394e4a99d5..b3b8ef3887 100644
--- a/docs/zh/12-taos-sql/06-select.md
+++ b/docs/zh/12-taos-sql/06-select.md
@@ -182,6 +182,14 @@ TDengine 中,所有表的第一列都必须是时间戳类型,且为其主
select _rowts, max(current) from meters;
```
+**\_IROWTS**
+
+\_irowts 伪列只能与 interp 函数一起使用,用于返回 interp 函数插值结果对应的时间戳列。
+
+```sql
+select _irowts, interp(current) from meters range('2020-01-01 10:00:00', '2020-01-01 10:30:00') every(1s) fill(linear);
+```
+
## 查询对象
FROM 关键字后面可以是若干个表(超级表)列表,也可以是子查询的结果。
diff --git a/docs/zh/12-taos-sql/10-function.md b/docs/zh/12-taos-sql/10-function.md
index 2a4d82045f..4c33b5232a 100644
--- a/docs/zh/12-taos-sql/10-function.md
+++ b/docs/zh/12-taos-sql/10-function.md
@@ -868,6 +868,7 @@ INTERP(expr)
- INTERP 根据 EVERY 字段来确定输出时间范围内的结果条数,即从 timestamp1 开始每隔固定长度的时间(EVERY 值)进行插值。如果没有指定 EVERY,则默认窗口大小为无穷大,即从 timestamp1 开始只有一个窗口。
- INTERP 根据 FILL 字段来决定在每个符合输出条件的时刻如何进行插值。
- INTERP 只能在一个时间序列内进行插值,因此当作用于超级表时必须跟 partition by tbname 一起使用。
+- INTERP 可以与伪列 _irowts 一起使用,返回插值点所对应的时间戳(3.0.1.4版本以后支持)。
### LAST
diff --git a/docs/zh/12-taos-sql/20-keywords.md b/docs/zh/12-taos-sql/20-keywords.md
index 7530e803db..8013698fce 100644
--- a/docs/zh/12-taos-sql/20-keywords.md
+++ b/docs/zh/12-taos-sql/20-keywords.md
@@ -344,6 +344,7 @@ description: TDengine 保留关键字的详细列表
### \_
- \_C0
+- \_IROWTS
- \_QDURATION
- \_QEND
- \_QSTART
diff --git a/docs/zh/12-taos-sql/22-meta.md b/docs/zh/12-taos-sql/22-meta.md
index c1ffc4a757..c192d0e5e8 100644
--- a/docs/zh/12-taos-sql/22-meta.md
+++ b/docs/zh/12-taos-sql/22-meta.md
@@ -12,7 +12,15 @@ TDengine 内置了一个名为 `INFORMATION_SCHEMA` 的数据库,提供对数
4. TDengine 在后续演进中可以灵活的添加已有 INFORMATION_SCHEMA 中表的列,而不用担心对既有业务系统造成影响
5. 与其他数据库系统更具互操作性。例如,Oracle 数据库用户熟悉查询 Oracle 数据字典中的表
-Note: 由于 SHOW 语句已经被开发者熟悉和广泛使用,所以它们仍然被保留。
+:::info
+
+- 由于 SHOW 语句已经被开发者熟悉和广泛使用,所以它们仍然被保留。
+- 系统表中的一些列可能是关键字,在查询时需要使用转义符'\`',例如查询数据库 test 有几个 VGROUP:
+```sql
+ select `vgroups` from ins_databases where name = 'test';
+```
+
+:::
本章将详细介绍 `INFORMATION_SCHEMA` 这个内置元数据库中的表和表结构。
@@ -103,7 +111,11 @@ Note: 由于 SHOW 语句已经被开发者熟悉和广泛使用,所以它们
| 24 | wal_retention_period | INT | WAL 的保存时长 |
| 25 | wal_retention_size | INT | WAL 的保存上限 |
| 26 | wal_roll_period | INT | wal 文件切换时长 |
-| 27 | wal_segment_size | wal 单个文件大小 |
+| 27 | wal_segment_size | BIGINT | wal 单个文件大小 |
+| 28 | stt_trigger | SMALLINT | 触发文件合并的落盘文件的个数 |
+| 29 | table_prefix | SMALLINT | 内部存储引擎根据表名分配存储该表数据的 VNODE 时要忽略的前缀的长度 |
+| 30 | table_suffix | SMALLINT | 内部存储引擎根据表名分配存储该表数据的 VNODE 时要忽略的后缀的长度 |
+| 31 | tsdb_pagesize | INT | 时序数据存储引擎中的页大小 |
## INS_FUNCTIONS
diff --git a/docs/zh/12-taos-sql/29-changes.md b/docs/zh/12-taos-sql/29-changes.md
index e63825045d..7da8e9f331 100644
--- a/docs/zh/12-taos-sql/29-changes.md
+++ b/docs/zh/12-taos-sql/29-changes.md
@@ -11,12 +11,13 @@ description: "TDengine 3.0 版本的语法变更说明"
| 1 | VARCHAR | 新增 | BINARY类型的别名。
| 2 | TIMESTAMP字面量 | 新增 | 新增支持 TIMESTAMP 'timestamp format' 语法。
| 3 | _ROWTS伪列 | 新增 | 表示时间戳主键。是_C0伪列的别名。
-| 4 | INFORMATION_SCHEMA | 新增 | 包含各种SCHEMA定义的系统数据库。
-| 5 | PERFORMANCE_SCHEMA | 新增 | 包含运行信息的系统数据库。
-| 6 | 连续查询 | 废除 | 不再支持连续查询。相关的各种语法和接口废除。
-| 7 | 混合运算 | 增强 | 查询中的混合运算(标量运算和矢量运算混合)全面增强,SELECT的各个子句均全面支持符合语法语义的混合运算。
-| 8 | 标签运算 | 新增 |在查询中,标签列可以像普通列一样参与各种运算,用于各种子句。
-| 9 | 时间线子句和时间函数用于超级表查询 | 增强 |没有PARTITION BY时,超级表的数据会被合并成一条时间线。
+| 4 | _IROWTS伪列 | 新增 | 用于返回 interp 函数插值结果对应的时间戳列。
+| 5 | INFORMATION_SCHEMA | 新增 | 包含各种SCHEMA定义的系统数据库。
+| 6 | PERFORMANCE_SCHEMA | 新增 | 包含运行信息的系统数据库。
+| 7 | 连续查询 | 废除 | 不再支持连续查询。相关的各种语法和接口废除。
+| 8 | 混合运算 | 增强 | 查询中的混合运算(标量运算和矢量运算混合)全面增强,SELECT的各个子句均全面支持符合语法语义的混合运算。
+| 9 | 标签运算 | 新增 |在查询中,标签列可以像普通列一样参与各种运算,用于各种子句。
+| 10 | 时间线子句和时间函数用于超级表查询 | 增强 |没有PARTITION BY时,超级表的数据会被合并成一条时间线。
## SQL 语句变更
diff --git a/docs/zh/14-reference/12-config/index.md b/docs/zh/14-reference/12-config/index.md
index 179a3c6df0..6f26878cdd 100644
--- a/docs/zh/14-reference/12-config/index.md
+++ b/docs/zh/14-reference/12-config/index.md
@@ -177,12 +177,21 @@ taos --dump-config
### maxNumOfDistinctRes
| 属性 | 说明 |
-| -------- | -------------------------------- | --- |
+| -------- | -------------------------------- |
| 适用范围 | 仅服务端适用 |
| 含义 | 允许返回的 distinct 结果最大行数 |
| 取值范围 | 默认值为 10 万,最大值 1 亿 |
| 缺省值 | 10 万 |
+### keepColumnName
+
+| 属性 | 说明 |
+| -------- | -------------------------------- |
+| 适用范围 | 仅客户端适用 |
+| 含义 | Last、First、LastRow 函数查询时,返回的列名是否包含函数名。 |
+| 取值范围 | 0 表示包含函数名,1 表示不包含函数名。 |
+| 缺省值 | 0 |
+
## 区域相关
### timezone
diff --git a/docs/zh/14-reference/13-schemaless/13-schemaless.md b/docs/zh/14-reference/13-schemaless/13-schemaless.md
index a33abafaf8..07d5b0692b 100644
--- a/docs/zh/14-reference/13-schemaless/13-schemaless.md
+++ b/docs/zh/14-reference/13-schemaless/13-schemaless.md
@@ -67,9 +67,12 @@ st,t1=3,t2=4,t3=t3 c1=3i64,c3="passit",c2=false,c4=4f64 1626006833639000000
"measurement,tag_key1=tag_value1,tag_key2=tag_value2"
```
+:::tip
需要注意的是,这里的 tag_key1, tag_key2 并不是用户输入的标签的原始顺序,而是使用了标签名称按照字符串升序排列后的结果。所以,tag_key1 并不是在行协议中输入的第一个标签。
排列完成以后计算该字符串的 MD5 散列值 "md5_val"。然后将计算的结果与字符串组合生成表名:“t_md5_val”。其中的 “t_” 是固定的前缀,每个通过该映射关系自动生成的表都具有该前缀。
-为了让用户可以指定生成的表名,可以通过配置 smlChildTableName 来指定(比如 配置 smlChildTableName=tname 插入数据为 st,tname=cpu1,t1=4 c1=3 1626006833639000000 则创建的表名为 cpu1,注意如果多行数据 tname 相同,但是后面的 tag_set 不同,则使用第一次自动建表时指定的 tag_set,其他的会忽略)。
+:::tip
+为了让用户可以指定生成的表名,可以通过在taos.cfg里配置 smlChildTableName 参数来指定。
+举例如下:配置 smlChildTableName=tname 插入数据为 st,tname=cpu1,t1=4 c1=3 1626006833639000000 则创建的表名为 cpu1,注意如果多行数据 tname 相同,但是后面的 tag_set 不同,则使用第一行自动建表时指定的 tag_set,其他的行会忽略)。
2. 如果解析行协议获得的超级表不存在,则会创建这个超级表(不建议手动创建超级表,不然插入数据可能异常)。
3. 如果解析行协议获得子表不存在,则 Schemaless 会按照步骤 1 或 2 确定的子表名来创建子表。
diff --git a/docs/zh/28-releases/01-tdengine.md b/docs/zh/28-releases/01-tdengine.md
index b05cf7a942..597e98238b 100644
--- a/docs/zh/28-releases/01-tdengine.md
+++ b/docs/zh/28-releases/01-tdengine.md
@@ -6,6 +6,10 @@ description: TDengine 发布历史、Release Notes 及下载链接
import Release from "/components/ReleaseV3";
+## 3.0.1.3
+
+
+
## 3.0.1.2
diff --git a/docs/zh/28-releases/02-tools.md b/docs/zh/28-releases/02-tools.md
index f793981d06..8604885d3c 100644
--- a/docs/zh/28-releases/02-tools.md
+++ b/docs/zh/28-releases/02-tools.md
@@ -6,6 +6,10 @@ description: taosTools 的发布历史、Release Notes 和下载链接
import Release from "/components/ReleaseV3";
+## 2.2.3
+
+
+
## 2.2.2
diff --git a/examples/lua/README.md b/examples/lua/README.md
index 32d6a4cace..5abf0c1aab 100644
--- a/examples/lua/README.md
+++ b/examples/lua/README.md
@@ -1,6 +1,12 @@
# TDengine driver connector for Lua
It's a Lua implementation for [TDengine](https://github.com/taosdata/TDengine), an open-sourced big data platform designed and optimized for the Internet of Things (IoT), Connected Cars, Industrial IoT, and IT Infrastructure and Application Monitoring. You may need to install Lua5.3 .
+As TDengine is built with lua-enable with default configure, the built-in lua lib conflicts with external lua lib. The following commands require TDengine built with lua-disable.
+To disable built-in lua:
+```
+mkdir debug && cd debug
+cmake .. -DBUILD_LUA=false && cmake --build .
+```
## Lua Dependencies
- Lua:
diff --git a/examples/lua/lua51/lua_connector51.c b/examples/lua/lua51/lua_connector51.c
index 4c702b2aae..8a9051dd0c 100644
--- a/examples/lua/lua51/lua_connector51.c
+++ b/examples/lua/lua51/lua_connector51.c
@@ -29,7 +29,7 @@ static int l_connect(lua_State *L){
luaL_checktype(L, 1, LUA_TTABLE);
lua_getfield(L, 1,"host");
- if (lua_isstring(L,-1)){
+ if (lua_isstring(L, -1)){
host = lua_tostring(L, -1);
// printf("host = %s\n", host);
}
@@ -58,8 +58,9 @@ static int l_connect(lua_State *L){
//printf("password = %s\n", password);
}
- lua_settop(L,0);
+ lua_settop(L, 0);
+ taos_init();
lua_newtable(L);
int table_index = lua_gettop(L);
@@ -125,7 +126,7 @@ static int l_query(lua_State *L){
//printf("row index:%d\n",rows);
rows++;
- lua_pushnumber(L,rows);
+ lua_pushnumber(L, rows);
lua_newtable(L);
for (int i = 0; i < num_fields; ++i) {
@@ -136,15 +137,19 @@ static int l_query(lua_State *L){
lua_pushstring(L,fields[i].name);
int32_t* length = taos_fetch_lengths(result);
switch (fields[i].type) {
+ case TSDB_DATA_TYPE_UTINYINT:
case TSDB_DATA_TYPE_TINYINT:
lua_pushinteger(L,*((char *)row[i]));
break;
+ case TSDB_DATA_TYPE_USMALLINT:
case TSDB_DATA_TYPE_SMALLINT:
lua_pushinteger(L,*((short *)row[i]));
break;
+ case TSDB_DATA_TYPE_UINT:
case TSDB_DATA_TYPE_INT:
lua_pushinteger(L,*((int *)row[i]));
break;
+ case TSDB_DATA_TYPE_UBIGINT:
case TSDB_DATA_TYPE_BIGINT:
lua_pushinteger(L,*((int64_t *)row[i]));
break;
@@ -154,6 +159,7 @@ static int l_query(lua_State *L){
case TSDB_DATA_TYPE_DOUBLE:
lua_pushnumber(L,*((double *)row[i]));
break;
+ case TSDB_DATA_TYPE_JSON:
case TSDB_DATA_TYPE_BINARY:
case TSDB_DATA_TYPE_NCHAR:
//printf("type:%d, max len:%d, current len:%d\n",fields[i].type, fields[i].bytes, length[i]);
@@ -197,7 +203,7 @@ void async_query_callback(void *param, TAOS_RES *result, int code){
printf("failed, reason:%s\n", taos_errstr(result));
lua_pushinteger(L, -1);
lua_setfield(L, table_index, "code");
- lua_pushstring(L,"something is wrong");// taos_errstr(taos));
+ lua_pushstring(L, taos_errstr(result));
lua_setfield(L, table_index, "error");
}else{
//printf("success to async query.\n");
@@ -214,9 +220,9 @@ void async_query_callback(void *param, TAOS_RES *result, int code){
static int l_async_query(lua_State *L){
int r = luaL_ref(L, LUA_REGISTRYINDEX);
- TAOS * taos = (TAOS*)lua_topointer(L,1);
- const char * sqlstr = lua_tostring(L,2);
- // int stime = luaL_checknumber(L,3);
+ TAOS * taos = (TAOS*)lua_topointer(L, 1);
+ const char * sqlstr = lua_tostring(L, 2);
+ // int stime = luaL_checknumber(L, 3);
lua_newtable(L);
int table_index = lua_gettop(L);
@@ -224,7 +230,7 @@ static int l_async_query(lua_State *L){
struct async_query_callback_param *p = malloc(sizeof(struct async_query_callback_param));
p->state = L;
p->callback=r;
- // printf("r:%d, L:%d\n",r,L);
+ // printf("r:%d, L:%d\n", r, L);
taos_query_a(taos,sqlstr,async_query_callback,p);
lua_pushnumber(L, 0);
@@ -267,7 +273,7 @@ static const struct luaL_Reg lib[] = {
extern int luaopen_luaconnector51(lua_State* L)
{
// luaL_register(L, "luaconnector51", lib);
- lua_newtable (L);
+ lua_newtable(L);
luaL_setfuncs(L,lib,0);
return 1;
}
diff --git a/examples/lua/lua_connector.c b/examples/lua/lua_connector.c
index ce13ab3829..c3d8bcb995 100644
--- a/examples/lua/lua_connector.c
+++ b/examples/lua/lua_connector.c
@@ -29,7 +29,7 @@ static int l_connect(lua_State *L){
luaL_checktype(L, 1, LUA_TTABLE);
lua_getfield(L, 1,"host");
- if (lua_isstring(L,-1)){
+ if (lua_isstring(L, -1)){
host = lua_tostring(L, -1);
// printf("host = %s\n", host);
}
@@ -58,7 +58,7 @@ static int l_connect(lua_State *L){
//printf("password = %s\n", password);
}
- lua_settop(L,0);
+ lua_settop(L, 0);
taos_init();
@@ -126,7 +126,7 @@ static int l_query(lua_State *L){
//printf("row index:%d\n",rows);
rows++;
- lua_pushnumber(L,rows);
+ lua_pushnumber(L, rows);
lua_newtable(L);
for (int i = 0; i < num_fields; ++i) {
@@ -203,7 +203,7 @@ void async_query_callback(void *param, TAOS_RES *result, int code){
printf("failed, reason:%s\n", taos_errstr(result));
lua_pushinteger(L, -1);
lua_setfield(L, table_index, "code");
- lua_pushstring(L,"something is wrong");// taos_errstr(taos));
+ lua_pushstring(L, taos_errstr(result));
lua_setfield(L, table_index, "error");
}else{
//printf("success to async query.\n");
@@ -220,9 +220,9 @@ void async_query_callback(void *param, TAOS_RES *result, int code){
static int l_async_query(lua_State *L){
int r = luaL_ref(L, LUA_REGISTRYINDEX);
- TAOS * taos = (TAOS*)lua_topointer(L,1);
- const char * sqlstr = lua_tostring(L,2);
- // int stime = luaL_checknumber(L,3);
+ TAOS * taos = (TAOS*)lua_topointer(L, 1);
+ const char * sqlstr = lua_tostring(L, 2);
+ // int stime = luaL_checknumber(L, 3);
lua_newtable(L);
int table_index = lua_gettop(L);
@@ -230,7 +230,7 @@ static int l_async_query(lua_State *L){
struct async_query_callback_param *p = malloc(sizeof(struct async_query_callback_param));
p->state = L;
p->callback=r;
- // printf("r:%d, L:%d\n",r,L);
+ // printf("r:%d, L:%d\n", r, L);
taos_query_a(taos,sqlstr,async_query_callback,p);
lua_pushnumber(L, 0);
diff --git a/examples/lua/test.lua b/examples/lua/test.lua
index 3d725cc6a3..94415982e7 100644
--- a/examples/lua/test.lua
+++ b/examples/lua/test.lua
@@ -176,8 +176,14 @@ end
driver.query_a(conn,"INSERT INTO therm1 VALUES ('2019-09-01 00:00:00.005', 100),('2019-09-01 00:00:00.006', 101),('2019-09-01 00:00:00.007', 102)", async_query_callback)
res = driver.query(conn, "create stream stream_avg_degree into avg_degree as select avg(degree) from thermometer interval(5s) sliding(1s)")
+if res.code ~=0 then
+ print("create stream--- failed:"..res.error)
+ return
+else
+ print("create stream--- pass")
+end
-print("From now on we start continous insert in an definite loop, pls wait for about 10 seconds and check stream table for result.")
+print("From now on we start continous insertion in an definite loop, please wait for about 10 seconds and check stream table avg_degree for result.")
local loop_index = 0
while loop_index < 10 do
local t = os.time()*1000
@@ -193,5 +199,5 @@ while loop_index < 10 do
os.execute("sleep " .. 1)
loop_index = loop_index + 1
end
-driver.query(conn,"DROP STREAM IF EXISTS avg_therm_s")
+driver.query(conn,"DROP STREAM IF EXISTS stream_avg_degree")
driver.close(conn)
diff --git a/include/common/tglobal.h b/include/common/tglobal.h
index 9b69bec5b3..bd5e74387e 100644
--- a/include/common/tglobal.h
+++ b/include/common/tglobal.h
@@ -98,6 +98,7 @@ extern int32_t tsQueryRsmaTolerance;
extern bool tsQueryPlannerTrace;
extern int32_t tsQueryNodeChunkSize;
extern bool tsQueryUseNodeAllocator;
+extern bool tsKeepColumnName;
// client
extern int32_t tsMinSlidingTime;
diff --git a/include/common/tmsg.h b/include/common/tmsg.h
index 49db88d703..7aec00c7c1 100644
--- a/include/common/tmsg.h
+++ b/include/common/tmsg.h
@@ -55,11 +55,10 @@ extern int32_t tMsgDict[];
#define TMSG_SEG_CODE(TYPE) (((TYPE)&0xff00) >> 8)
#define TMSG_SEG_SEQ(TYPE) ((TYPE)&0xff)
-#define TMSG_INFO(TYPE) \
- ((TYPE) >= 0 && ((TYPE) < TDMT_DND_MAX_MSG || (TYPE) < TDMT_MND_MAX_MSG || (TYPE) < TDMT_VND_MAX_MSG || \
- (TYPE) < TDMT_SCH_MAX_MSG || (TYPE) < TDMT_STREAM_MAX_MSG || (TYPE) < TDMT_MON_MAX_MSG || \
- (TYPE) < TDMT_SYNC_MAX_MSG)) \
- ? tMsgInfo[tMsgDict[TMSG_SEG_CODE(TYPE)] + TMSG_SEG_SEQ(TYPE)] \
+#define TMSG_INFO(TYPE) \
+ ((TYPE) < TDMT_DND_MAX_MSG || (TYPE) < TDMT_MND_MAX_MSG || (TYPE) < TDMT_VND_MAX_MSG || (TYPE) < TDMT_SCH_MAX_MSG || \
+ (TYPE) < TDMT_STREAM_MAX_MSG || (TYPE) < TDMT_MON_MAX_MSG || (TYPE) < TDMT_SYNC_MAX_MSG) \
+ ? tMsgInfo[tMsgDict[TMSG_SEG_CODE(TYPE)] + TMSG_SEG_SEQ(TYPE)] \
: 0
#define TMSG_INDEX(TYPE) (tMsgDict[TMSG_SEG_CODE(TYPE)] + TMSG_SEG_SEQ(TYPE))
diff --git a/include/common/ttokendef.h b/include/common/ttokendef.h
index f40ff275ca..94128a4999 100644
--- a/include/common/ttokendef.h
+++ b/include/common/ttokendef.h
@@ -226,110 +226,111 @@
#define TK_WSTART 208
#define TK_WEND 209
#define TK_WDURATION 210
-#define TK_CAST 211
-#define TK_NOW 212
-#define TK_TODAY 213
-#define TK_TIMEZONE 214
-#define TK_CLIENT_VERSION 215
-#define TK_SERVER_VERSION 216
-#define TK_SERVER_STATUS 217
-#define TK_CURRENT_USER 218
-#define TK_COUNT 219
-#define TK_LAST_ROW 220
-#define TK_CASE 221
-#define TK_END 222
-#define TK_WHEN 223
-#define TK_THEN 224
-#define TK_ELSE 225
-#define TK_BETWEEN 226
-#define TK_IS 227
-#define TK_NK_LT 228
-#define TK_NK_GT 229
-#define TK_NK_LE 230
-#define TK_NK_GE 231
-#define TK_NK_NE 232
-#define TK_MATCH 233
-#define TK_NMATCH 234
-#define TK_CONTAINS 235
-#define TK_IN 236
-#define TK_JOIN 237
-#define TK_INNER 238
-#define TK_SELECT 239
-#define TK_DISTINCT 240
-#define TK_WHERE 241
-#define TK_PARTITION 242
-#define TK_BY 243
-#define TK_SESSION 244
-#define TK_STATE_WINDOW 245
-#define TK_SLIDING 246
-#define TK_FILL 247
-#define TK_VALUE 248
-#define TK_NONE 249
-#define TK_PREV 250
-#define TK_LINEAR 251
-#define TK_NEXT 252
-#define TK_HAVING 253
-#define TK_RANGE 254
-#define TK_EVERY 255
-#define TK_ORDER 256
-#define TK_SLIMIT 257
-#define TK_SOFFSET 258
-#define TK_LIMIT 259
-#define TK_OFFSET 260
-#define TK_ASC 261
-#define TK_NULLS 262
-#define TK_ABORT 263
-#define TK_AFTER 264
-#define TK_ATTACH 265
-#define TK_BEFORE 266
-#define TK_BEGIN 267
-#define TK_BITAND 268
-#define TK_BITNOT 269
-#define TK_BITOR 270
-#define TK_BLOCKS 271
-#define TK_CHANGE 272
-#define TK_COMMA 273
-#define TK_COMPACT 274
-#define TK_CONCAT 275
-#define TK_CONFLICT 276
-#define TK_COPY 277
-#define TK_DEFERRED 278
-#define TK_DELIMITERS 279
-#define TK_DETACH 280
-#define TK_DIVIDE 281
-#define TK_DOT 282
-#define TK_EACH 283
-#define TK_FAIL 284
-#define TK_FILE 285
-#define TK_FOR 286
-#define TK_GLOB 287
-#define TK_ID 288
-#define TK_IMMEDIATE 289
-#define TK_IMPORT 290
-#define TK_INITIALLY 291
-#define TK_INSTEAD 292
-#define TK_ISNULL 293
-#define TK_KEY 294
-#define TK_NK_BITNOT 295
-#define TK_NK_SEMI 296
-#define TK_NOTNULL 297
-#define TK_OF 298
-#define TK_PLUS 299
-#define TK_PRIVILEGE 300
-#define TK_RAISE 301
-#define TK_REPLACE 302
-#define TK_RESTRICT 303
-#define TK_ROW 304
-#define TK_SEMI 305
-#define TK_STAR 306
-#define TK_STATEMENT 307
-#define TK_STRING 308
-#define TK_TIMES 309
-#define TK_UPDATE 310
-#define TK_VALUES 311
-#define TK_VARIABLE 312
-#define TK_VIEW 313
-#define TK_WAL 314
+#define TK_IROWTS 211
+#define TK_CAST 212
+#define TK_NOW 213
+#define TK_TODAY 214
+#define TK_TIMEZONE 215
+#define TK_CLIENT_VERSION 216
+#define TK_SERVER_VERSION 217
+#define TK_SERVER_STATUS 218
+#define TK_CURRENT_USER 219
+#define TK_COUNT 220
+#define TK_LAST_ROW 221
+#define TK_CASE 222
+#define TK_END 223
+#define TK_WHEN 224
+#define TK_THEN 225
+#define TK_ELSE 226
+#define TK_BETWEEN 227
+#define TK_IS 228
+#define TK_NK_LT 229
+#define TK_NK_GT 230
+#define TK_NK_LE 231
+#define TK_NK_GE 232
+#define TK_NK_NE 233
+#define TK_MATCH 234
+#define TK_NMATCH 235
+#define TK_CONTAINS 236
+#define TK_IN 237
+#define TK_JOIN 238
+#define TK_INNER 239
+#define TK_SELECT 240
+#define TK_DISTINCT 241
+#define TK_WHERE 242
+#define TK_PARTITION 243
+#define TK_BY 244
+#define TK_SESSION 245
+#define TK_STATE_WINDOW 246
+#define TK_SLIDING 247
+#define TK_FILL 248
+#define TK_VALUE 249
+#define TK_NONE 250
+#define TK_PREV 251
+#define TK_LINEAR 252
+#define TK_NEXT 253
+#define TK_HAVING 254
+#define TK_RANGE 255
+#define TK_EVERY 256
+#define TK_ORDER 257
+#define TK_SLIMIT 258
+#define TK_SOFFSET 259
+#define TK_LIMIT 260
+#define TK_OFFSET 261
+#define TK_ASC 262
+#define TK_NULLS 263
+#define TK_ABORT 264
+#define TK_AFTER 265
+#define TK_ATTACH 266
+#define TK_BEFORE 267
+#define TK_BEGIN 268
+#define TK_BITAND 269
+#define TK_BITNOT 270
+#define TK_BITOR 271
+#define TK_BLOCKS 272
+#define TK_CHANGE 273
+#define TK_COMMA 274
+#define TK_COMPACT 275
+#define TK_CONCAT 276
+#define TK_CONFLICT 277
+#define TK_COPY 278
+#define TK_DEFERRED 279
+#define TK_DELIMITERS 280
+#define TK_DETACH 281
+#define TK_DIVIDE 282
+#define TK_DOT 283
+#define TK_EACH 284
+#define TK_FAIL 285
+#define TK_FILE 286
+#define TK_FOR 287
+#define TK_GLOB 288
+#define TK_ID 289
+#define TK_IMMEDIATE 290
+#define TK_IMPORT 291
+#define TK_INITIALLY 292
+#define TK_INSTEAD 293
+#define TK_ISNULL 294
+#define TK_KEY 295
+#define TK_NK_BITNOT 296
+#define TK_NK_SEMI 297
+#define TK_NOTNULL 298
+#define TK_OF 299
+#define TK_PLUS 300
+#define TK_PRIVILEGE 301
+#define TK_RAISE 302
+#define TK_REPLACE 303
+#define TK_RESTRICT 304
+#define TK_ROW 305
+#define TK_SEMI 306
+#define TK_STAR 307
+#define TK_STATEMENT 308
+#define TK_STRING 309
+#define TK_TIMES 310
+#define TK_UPDATE 311
+#define TK_VALUES 312
+#define TK_VARIABLE 313
+#define TK_VIEW 314
+#define TK_WAL 315
#define TK_NK_SPACE 300
#define TK_NK_COMMENT 301
diff --git a/include/libs/executor/executor.h b/include/libs/executor/executor.h
index 8c1d957381..81882ca1ac 100644
--- a/include/libs/executor/executor.h
+++ b/include/libs/executor/executor.h
@@ -136,7 +136,7 @@ int32_t qGetQueryTableSchemaVersion(qTaskInfo_t tinfo, char* dbName, char* table
* @param handle
* @return
*/
-int32_t qExecTaskOpt(qTaskInfo_t tinfo, SArray* pResList, uint64_t* useconds, SLocalFetch *pLocal);
+int32_t qExecTaskOpt(qTaskInfo_t tinfo, SArray* pResList, uint64_t* useconds, bool* hasMore, SLocalFetch *pLocal);
int32_t qExecTask(qTaskInfo_t tinfo, SSDataBlock** pBlock, uint64_t* useconds);
/**
diff --git a/include/libs/function/functionMgt.h b/include/libs/function/functionMgt.h
index c9c19579cb..cb4960707b 100644
--- a/include/libs/function/functionMgt.h
+++ b/include/libs/function/functionMgt.h
@@ -119,9 +119,10 @@ typedef enum EFunctionType {
FUNCTION_TYPE_WSTART,
FUNCTION_TYPE_WEND,
FUNCTION_TYPE_WDURATION,
+ FUNCTION_TYPE_IROWTS,
// internal function
- FUNCTION_TYPE_SELECT_VALUE,
+ FUNCTION_TYPE_SELECT_VALUE = 3750,
FUNCTION_TYPE_BLOCK_DIST, // block distribution aggregate function
FUNCTION_TYPE_BLOCK_DIST_INFO, // block distribution pseudo column function
FUNCTION_TYPE_TO_COLUMN,
@@ -212,6 +213,7 @@ bool fmIsClientPseudoColumnFunc(int32_t funcId);
bool fmIsMultiRowsFunc(int32_t funcId);
bool fmIsKeepOrderFunc(int32_t funcId);
bool fmIsCumulativeFunc(int32_t funcId);
+bool fmIsInterpPseudoColumnFunc(int32_t funcId);
int32_t fmGetDistMethod(const SFunctionNode* pFunc, SFunctionNode** pPartialFunc, SFunctionNode** pMergeFunc);
diff --git a/include/libs/nodes/nodes.h b/include/libs/nodes/nodes.h
index 32249e3d8b..560832cd74 100644
--- a/include/libs/nodes/nodes.h
+++ b/include/libs/nodes/nodes.h
@@ -239,6 +239,7 @@ typedef enum ENodeType {
QUERY_NODE_PHYSICAL_PLAN_STREAM_FINAL_INTERVAL,
QUERY_NODE_PHYSICAL_PLAN_STREAM_SEMI_INTERVAL,
QUERY_NODE_PHYSICAL_PLAN_FILL,
+ QUERY_NODE_PHYSICAL_PLAN_STREAM_FILL,
QUERY_NODE_PHYSICAL_PLAN_MERGE_SESSION,
QUERY_NODE_PHYSICAL_PLAN_STREAM_SESSION,
QUERY_NODE_PHYSICAL_PLAN_STREAM_SEMI_SESSION,
diff --git a/include/libs/nodes/plannodes.h b/include/libs/nodes/plannodes.h
index e6e34648f9..25ff18a8fc 100644
--- a/include/libs/nodes/plannodes.h
+++ b/include/libs/nodes/plannodes.h
@@ -464,6 +464,8 @@ typedef struct SFillPhysiNode {
EOrder inputTsOrder;
} SFillPhysiNode;
+typedef SFillPhysiNode SStreamFillPhysiNode;
+
typedef struct SMultiTableIntervalPhysiNode {
SIntervalPhysiNode interval;
SNodeList* pPartitionKeys;
diff --git a/include/libs/stream/streamState.h b/include/libs/stream/streamState.h
index 849d83a58b..0adcf976f0 100644
--- a/include/libs/stream/streamState.h
+++ b/include/libs/stream/streamState.h
@@ -31,6 +31,7 @@ typedef struct {
TDB* db;
TTB* pStateDb;
TTB* pFuncStateDb;
+ TTB* pFillStateDb; // todo refactor
TXN txn;
} SStreamState;
@@ -51,15 +52,22 @@ int32_t streamStateFuncDel(SStreamState* pState, const STupleKey* key);
int32_t streamStatePut(SStreamState* pState, const SWinKey* key, const void* value, int32_t vLen);
int32_t streamStateGet(SStreamState* pState, const SWinKey* key, void** pVal, int32_t* pVLen);
int32_t streamStateDel(SStreamState* pState, const SWinKey* key);
+
+int32_t streamStateFillPut(SStreamState* pState, const SWinKey* key, const void* value, int32_t vLen);
+int32_t streamStateFillGet(SStreamState* pState, const SWinKey* key, void** pVal, int32_t* pVLen);
+int32_t streamStateFillDel(SStreamState* pState, const SWinKey* key);
+
int32_t streamStateAddIfNotExist(SStreamState* pState, const SWinKey* key, void** pVal, int32_t* pVLen);
int32_t streamStateReleaseBuf(SStreamState* pState, const SWinKey* key, void* pVal);
void streamFreeVal(void* val);
SStreamStateCur* streamStateGetCur(SStreamState* pState, const SWinKey* key);
-SStreamStateCur* streamStateSeekKeyNext(SStreamState* pState, const SWinKey* key);
-SStreamStateCur* streamStateSeekKeyPrev(SStreamState* pState, const SWinKey* key);
+SStreamStateCur* streamStateGetAndCheckCur(SStreamState* pState, SWinKey* key);
+SStreamStateCur* streamStateFillSeekKeyNext(SStreamState* pState, const SWinKey* key);
+SStreamStateCur* streamStateFillSeekKeyPrev(SStreamState* pState, const SWinKey* key);
void streamStateFreeCur(SStreamStateCur* pCur);
+int32_t streamStateGetGroupKVByCur(SStreamStateCur* pCur, SWinKey* pKey, const void** pVal, int32_t* pVLen);
int32_t streamStateGetKVByCur(SStreamStateCur* pCur, SWinKey* pKey, const void** pVal, int32_t* pVLen);
int32_t streamStateSeekFirst(SStreamState* pState, SStreamStateCur* pCur);
diff --git a/packaging/cfg/nginxd.service b/packaging/cfg/nginxd.service
deleted file mode 100644
index 50bbc1a21d..0000000000
--- a/packaging/cfg/nginxd.service
+++ /dev/null
@@ -1,22 +0,0 @@
-[Unit]
-Description=Nginx For TDengine Service
-After=network-online.target
-Wants=network-online.target
-
-[Service]
-Type=forking
-PIDFile=/usr/local/nginxd/logs/nginx.pid
-ExecStart=/usr/local/nginxd/sbin/nginx
-ExecStop=/usr/local/nginxd/sbin/nginx -s stop
-TimeoutStopSec=1000000s
-LimitNOFILE=infinity
-LimitNPROC=infinity
-LimitCORE=infinity
-TimeoutStartSec=0
-StandardOutput=null
-Restart=always
-StartLimitBurst=3
-StartLimitInterval=60s
-
-[Install]
-WantedBy=multi-user.target
diff --git a/packaging/check_package.sh b/packaging/check_package.sh
index e728c6455a..5c3a2f9267 100644
--- a/packaging/check_package.sh
+++ b/packaging/check_package.sh
@@ -38,8 +38,6 @@ temp_version=""
fin_result=""
service_config_dir="/etc/systemd/system"
-nginx_port=6060
-nginx_dir="/usr/local/nginxd"
# Color setting
RED='\033[0;31m'
@@ -132,10 +130,7 @@ function check_main_path() {
check_file ${install_main_dir} $i
done
if [ "$verMode" == "cluster" ]; then
- nginx_main_dir=("admin" "conf" "html" "sbin" "logs")
- for i in "${nginx_main_dir[@]}";do
- check_file ${nginx_dir} $i
- done
+ check_file ${install_main_dir} "share/admin"
fi
echo -e "Check main path:\033[32mOK\033[0m!"
}
@@ -150,9 +145,6 @@ function check_bin_path() {
for i in "${lbin_dir[@]}";do
check_link ${bin_link_dir}/$i
done
- if [ "$verMode" == "cluster" ]; then
- check_file ${nginx_dir}/sbin nginx
- fi
echo -e "Check bin path:\033[32mOK\033[0m!"
}
diff --git a/packaging/tools/install.sh b/packaging/tools/install.sh
index 5088e9bdac..9694a89a8f 100755
--- a/packaging/tools/install.sh
+++ b/packaging/tools/install.sh
@@ -50,8 +50,7 @@ install_main_dir=${installDir}
bin_dir="${installDir}/bin"
service_config_dir="/etc/systemd/system"
-nginx_port=6060
-nginx_dir="/usr/local/nginxd"
+web_port=6041
# Color setting
RED='\033[0;31m'
@@ -182,7 +181,7 @@ function install_main_path() {
${csudo}mkdir -p ${install_main_dir}/include
# ${csudo}mkdir -p ${install_main_dir}/init.d
if [ "$verMode" == "cluster" ]; then
- ${csudo}mkdir -p ${nginx_dir}
+ ${csudo}mkdir -p ${install_main_dir}/share
fi
if [[ -e ${script_dir}/email ]]; then
@@ -218,12 +217,6 @@ function install_bin() {
[ -x ${install_main_dir}/bin/TDinsight.sh ] && ${csudo}ln -s ${install_main_dir}/bin/TDinsight.sh ${bin_link_dir}/TDinsight.sh || :
[ -x ${install_main_dir}/bin/remove.sh ] && ${csudo}ln -s ${install_main_dir}/bin/remove.sh ${bin_link_dir}/${uninstallScript} || :
[ -x ${install_main_dir}/bin/set_core.sh ] && ${csudo}ln -s ${install_main_dir}/bin/set_core.sh ${bin_link_dir}/set_core || :
-
- if [ "$verMode" == "cluster" ]; then
- ${csudo}cp -r ${script_dir}/nginxd/* ${nginx_dir} && ${csudo}chmod 0555 ${nginx_dir}/*
- ${csudo}mkdir -p ${nginx_dir}/logs
- ${csudo}chmod 777 ${nginx_dir}/sbin/nginx
- fi
}
function install_lib() {
@@ -574,6 +567,13 @@ function install_examples() {
fi
}
+function install_web() {
+ if [ -d "${script_dir}/share" ]; then
+ ${csudo}cp -rf ${script_dir}/share/* ${install_main_dir}/share
+ fi
+}
+
+
function clean_service_on_sysvinit() {
if pidof ${serverName} &>/dev/null; then
${csudo}service ${serverName} stop || :
@@ -654,16 +654,6 @@ function clean_service_on_systemd() {
fi
${csudo}systemctl disable tarbitratord &>/dev/null || echo &>/dev/null
${csudo}rm -f ${tarbitratord_service_config}
-
- if [ "$verMode" == "cluster" ]; then
- nginx_service_config="${service_config_dir}/nginxd.service"
- if systemctl is-active --quiet nginxd; then
- echo "Nginx for ${productName} is running, stopping it..."
- ${csudo}systemctl stop nginxd &>/dev/null || echo &>/dev/null
- fi
- ${csudo}systemctl disable nginxd &>/dev/null || echo &>/dev/null
- ${csudo}rm -f ${nginx_service_config}
- fi
}
function install_service_on_systemd() {
@@ -677,19 +667,6 @@ function install_service_on_systemd() {
${csudo}systemctl enable ${serverName}
${csudo}systemctl daemon-reload
-
- if [ "$verMode" == "cluster" ]; then
- [ -f ${script_dir}/cfg/nginxd.service ] &&
- ${csudo}cp ${script_dir}/cfg/nginxd.service \
- ${service_config_dir}/ || :
- ${csudo}systemctl daemon-reload
-
- if ! ${csudo}systemctl enable nginxd &>/dev/null; then
- ${csudo}systemctl daemon-reexec
- ${csudo}systemctl enable nginxd
- fi
- ${csudo}systemctl start nginxd
- fi
}
function install_adapter_service() {
@@ -793,19 +770,6 @@ function updateProduct() {
sleep 1
fi
- if [ "$verMode" == "cluster" ]; then
- if pidof nginx &>/dev/null; then
- if ((${service_mod} == 0)); then
- ${csudo}systemctl stop nginxd || :
- elif ((${service_mod} == 1)); then
- ${csudo}service nginxd stop || :
- else
- kill_process nginx
- fi
- sleep 1
- fi
- fi
-
install_main_path
install_log
@@ -817,6 +781,7 @@ function updateProduct() {
fi
install_examples
+ install_web
if [ -z $1 ]; then
install_bin
install_service
@@ -825,18 +790,6 @@ function updateProduct() {
install_adapter_config
openresty_work=false
- if [ "$verMode" == "cluster" ]; then
- # Check if openresty is installed
- # Check if nginx is installed successfully
- if type curl &>/dev/null; then
- if curl -sSf http://127.0.0.1:${nginx_port} &>/dev/null; then
- echo -e "\033[44;32;1mNginx for ${productName} is updated successfully!${NC}"
- openresty_work=true
- else
- echo -e "\033[44;31;5mNginx for ${productName} does not work! Please try again!\033[0m"
- fi
- fi
- fi
echo
echo -e "${GREEN_DARK}To configure ${productName} ${NC}: edit ${cfg_install_dir}/${configFile}"
@@ -857,7 +810,7 @@ function updateProduct() {
fi
if [ ${openresty_work} = 'true' ]; then
- echo -e "${GREEN_DARK}To access ${productName} ${NC}: use ${GREEN_UNDERLINE}${clientName} -h $serverFqdn${NC} in shell OR from ${GREEN_UNDERLINE}http://127.0.0.1:${nginx_port}${NC}"
+ echo -e "${GREEN_DARK}To access ${productName} ${NC}: use ${GREEN_UNDERLINE}${clientName} -h $serverFqdn${NC} in shell OR from ${GREEN_UNDERLINE}http://127.0.0.1:${web_port}${NC}"
else
echo -e "${GREEN_DARK}To access ${productName} ${NC}: use ${GREEN_UNDERLINE}${clientName} -h $serverFqdn${NC} in shell${NC}"
fi
@@ -906,6 +859,7 @@ function installProduct() {
install_connector
fi
install_examples
+ install_web
if [ -z $1 ]; then # install service and client
# For installing new
@@ -915,17 +869,6 @@ function installProduct() {
install_adapter_config
openresty_work=false
- if [ "$verMode" == "cluster" ]; then
- # Check if nginx is installed successfully
- if type curl &>/dev/null; then
- if curl -sSf http://127.0.0.1:${nginx_port} &>/dev/null; then
- echo -e "\033[44;32;1mNginx for ${productName} is installed successfully!${NC}"
- openresty_work=true
- else
- echo -e "\033[44;31;5mNginx for ${productName} does not work! Please try again!\033[0m"
- fi
- fi
- fi
install_config
diff --git a/packaging/tools/make_install.sh b/packaging/tools/make_install.sh
index d1e7a222cc..58b4385001 100755
--- a/packaging/tools/make_install.sh
+++ b/packaging/tools/make_install.sh
@@ -151,6 +151,7 @@ function install_main_path() {
${csudo}mkdir -p ${install_main_dir}/driver
${csudo}mkdir -p ${install_main_dir}/examples
${csudo}mkdir -p ${install_main_dir}/include
+ ${csudo}mkdir -p ${install_main_dir}/share
# ${csudo}mkdir -p ${install_main_dir}/init.d
else
${csudo}rm -rf ${install_main_dir} || ${csudo}rm -rf ${install_main_2_dir} || :
@@ -161,6 +162,7 @@ function install_main_path() {
${csudo}mkdir -p ${install_main_dir}/driver || ${csudo}mkdir -p ${install_main_2_dir}/driver
${csudo}mkdir -p ${install_main_dir}/examples || ${csudo}mkdir -p ${install_main_2_dir}/examples
${csudo}mkdir -p ${install_main_dir}/include || ${csudo}mkdir -p ${install_main_2_dir}/include
+ ${csudo}mkdir -p ${install_main_dir}/share || ${csudo}mkdir -p ${install_main_2_dir}/share
fi
}
@@ -469,6 +471,16 @@ function install_examples() {
fi
}
+function install_web() {
+ if [ -d "${binary_dir}/build/share" ]; then
+ if [ "$osType" != "Darwin" ]; then
+ ${csudo}cp -rf ${binary_dir}/build/share/* ${install_main_dir}/share || :
+ else
+ ${csudo}cp -rf ${binary_dir}/build/share/* ${install_main_dir}/share || ${csudo}cp -rf ${binary_dir}/build/share/* ${install_main_2_dir}/share || :
+ fi
+ fi
+}
+
function clean_service_on_sysvinit() {
if pidof ${serverName} &>/dev/null; then
${csudo}service ${serverName} stop || :
@@ -596,6 +608,7 @@ function update_TDengine() {
install_lib
# install_connector
install_examples
+ install_web
install_bin
install_service
diff --git a/packaging/tools/makepkg.sh b/packaging/tools/makepkg.sh
index 2305b96b36..fb0ef4f9a3 100755
--- a/packaging/tools/makepkg.sh
+++ b/packaging/tools/makepkg.sh
@@ -107,7 +107,7 @@ else
fi
install_files="${script_dir}/install.sh"
-nginx_dir="${top_dir}/../enterprise/src/plugins/web"
+web_dir="${top_dir}/../enterprise/src/plugins/web"
init_file_deb=${script_dir}/../deb/taosd
init_file_rpm=${script_dir}/../rpm/taosd
@@ -132,10 +132,6 @@ if [ -f "${cfg_dir}/${serverName}.service" ]; then
cp ${cfg_dir}/${serverName}.service ${install_dir}/cfg || :
fi
-if [ -f "${top_dir}/packaging/cfg/nginxd.service" ]; then
- cp ${top_dir}/packaging/cfg/nginxd.service ${install_dir}/cfg || :
-fi
-
mkdir -p ${install_dir}/bin && cp ${bin_files} ${install_dir}/bin && chmod a+x ${install_dir}/bin/* || :
mkdir -p ${install_dir}/init.d && cp ${init_file_deb} ${install_dir}/init.d/${serverName}.deb
mkdir -p ${install_dir}/init.d && cp ${init_file_rpm} ${install_dir}/init.d/${serverName}.rpm
@@ -222,16 +218,6 @@ if [ "$verMode" == "cluster" ]; then
sed 's/verMode=edge/verMode=cluster/g' ${install_dir}/bin/remove.sh >>remove_temp.sh
mv remove_temp.sh ${install_dir}/bin/remove.sh
- mkdir -p ${install_dir}/nginxd && cp -r ${nginx_dir}/* ${install_dir}/nginxd
- cp ${nginx_dir}/png/taos.png ${install_dir}/nginxd/admin/images/taos.png
- rm -rf ${install_dir}/nginxd/png
-
- if [ "$cpuType" == "aarch64" ]; then
- cp -f ${install_dir}/nginxd/sbin/arm/64bit/nginx ${install_dir}/nginxd/sbin/
- elif [ "$cpuType" == "aarch32" ]; then
- cp -f ${install_dir}/nginxd/sbin/arm/32bit/nginx ${install_dir}/nginxd/sbin/
- fi
- rm -rf ${install_dir}/nginxd/sbin/arm
fi
cd ${install_dir}
@@ -288,6 +274,13 @@ if [[ $dbName == "taos" ]]; then
cp -r ${examples_dir}/C# ${install_dir}/examples
mkdir -p ${install_dir}/examples/taosbenchmark-json && cp ${examples_dir}/../tools/taos-tools/example/* ${install_dir}/examples/taosbenchmark-json
fi
+
+ # Add web files
+ if [ -d "${web_dir}/admin" ]; then
+ mkdir -p ${install_dir}/share/
+ cp ${web_dir}/admin ${install_dir}/share/ -r
+ cp ${web_dir}/png/taos.png ${install_dir}/share/admin/images/taos.png
+ fi
fi
# Copy driver
diff --git a/packaging/tools/remove.sh b/packaging/tools/remove.sh
index bf4ff564f5..a648750904 100755
--- a/packaging/tools/remove.sh
+++ b/packaging/tools/remove.sh
@@ -27,13 +27,11 @@ local_bin_link_dir="/usr/local/bin"
lib_link_dir="/usr/lib"
lib64_link_dir="/usr/lib64"
inc_link_dir="/usr/include"
-install_nginxd_dir="/usr/local/nginxd"
service_config_dir="/etc/systemd/system"
taos_service_name=${serverName}
taosadapter_service_name="taosadapter"
tarbitrator_service_name="tarbitratord"
-nginx_service_name="nginxd"
csudo=""
if command -v sudo >/dev/null; then
csudo="sudo "
@@ -153,18 +151,6 @@ function clean_service_on_systemd() {
fi
${csudo}systemctl disable ${tarbitrator_service_name} &>/dev/null || echo &>/dev/null
${csudo}rm -f ${tarbitratord_service_config}
-
- if [ "$verMode" == "cluster" ]; then
- nginx_service_config="${service_config_dir}/${nginx_service_name}.service"
- if [ -d ${install_nginxd_dir} ]; then
- if systemctl is-active --quiet ${nginx_service_name}; then
- echo "Nginx for ${productName} is running, stopping it..."
- ${csudo}systemctl stop ${nginx_service_name} &>/dev/null || echo &>/dev/null
- fi
- ${csudo}systemctl disable ${nginx_service_name} &>/dev/null || echo &>/dev/null
- ${csudo}rm -f ${nginx_service_config}
- fi
- fi
}
function clean_service_on_sysvinit() {
@@ -239,7 +225,6 @@ clean_config
${csudo}rm -rf ${data_link_dir} || :
${csudo}rm -rf ${install_main_dir}
-${csudo}rm -rf ${install_nginxd_dir}
if [[ -e /etc/os-release ]]; then
osinfo=$(awk -F= '/^NAME/{print $2}' /etc/os-release)
else
diff --git a/source/client/src/clientEnv.c b/source/client/src/clientEnv.c
index 6a4ef3d821..5792f498ef 100644
--- a/source/client/src/clientEnv.c
+++ b/source/client/src/clientEnv.c
@@ -19,6 +19,7 @@
#include "functionMgt.h"
#include "os.h"
#include "query.h"
+#include "qworker.h"
#include "scheduler.h"
#include "tcache.h"
#include "tglobal.h"
@@ -27,7 +28,6 @@
#include "trpc.h"
#include "tsched.h"
#include "ttime.h"
-#include "qworker.h"
#define TSC_VAR_NOT_RELEASE 1
#define TSC_VAR_RELEASED 0
@@ -70,11 +70,10 @@ static void deregisterRequest(SRequestObj *pRequest) {
int32_t currentInst = atomic_sub_fetch_64((int64_t *)&pActivity->currentRequests, 1);
int32_t num = atomic_sub_fetch_32(&pTscObj->numOfReqs, 1);
- int64_t nowUs = taosGetTimestampUs();
- int64_t duration = nowUs - pRequest->metric.start;
- tscDebug("0x%" PRIx64 " free Request from connObj: 0x%" PRIx64 ", reqId:0x%" PRIx64 " elapsed:%" PRIu64
- " ms, current:%d, app current:%d",
- pRequest->self, pTscObj->id, pRequest->requestId, duration / 1000, num, currentInst);
+ int64_t duration = taosGetTimestampUs() - pRequest->metric.start;
+ tscDebug("0x%" PRIx64 " free Request from connObj: 0x%" PRIx64 ", reqId:0x%" PRIx64 " elapsed:%.2f ms, "
+ "current:%d, app current:%d",
+ pRequest->self, pTscObj->id, pRequest->requestId, duration / 1000.0, num, currentInst);
if (QUERY_NODE_VNODE_MODIF_STMT == pRequest->stmtType) {
tscPerf("insert duration %" PRId64 "us: syntax:%" PRId64 "us, ctg:%" PRId64 "us, semantic:%" PRId64
@@ -85,11 +84,12 @@ static void deregisterRequest(SRequestObj *pRequest) {
atomic_add_fetch_64((int64_t *)&pActivity->insertElapsedTime, duration);
} else if (QUERY_NODE_SELECT_STMT == pRequest->stmtType) {
tscPerf("select duration %" PRId64 "us: syntax:%" PRId64 "us, ctg:%" PRId64 "us, semantic:%" PRId64
- "us, planner:%" PRId64 "us, exec:%" PRId64 "us",
+ "us, planner:%" PRId64 "us, exec:%" PRId64 "us, reqId:0x%"PRIx64,
duration, pRequest->metric.syntaxEnd - pRequest->metric.syntaxStart,
pRequest->metric.ctgEnd - pRequest->metric.ctgStart, pRequest->metric.semanticEnd - pRequest->metric.ctgEnd,
pRequest->metric.planEnd - pRequest->metric.semanticEnd,
- pRequest->metric.resultReady - pRequest->metric.planEnd);
+ pRequest->metric.resultReady - pRequest->metric.planEnd, pRequest->requestId);
+
atomic_add_fetch_64((int64_t *)&pActivity->queryElapsedTime, duration);
}
diff --git a/source/client/src/clientImpl.c b/source/client/src/clientImpl.c
index be907ea1e2..594200b5fb 100644
--- a/source/client/src/clientImpl.c
+++ b/source/client/src/clientImpl.c
@@ -483,8 +483,8 @@ void setResPrecision(SReqResultInfo* pResInfo, int32_t precision) {
int32_t buildVnodePolicyNodeList(SRequestObj* pRequest, SArray** pNodeList, SArray* pMnodeList, SArray* pDbVgList) {
SArray* nodeList = taosArrayInit(4, sizeof(SQueryNodeLoad));
- char *policy = (tsQueryPolicy == QUERY_POLICY_VNODE) ? "vnode" : "client";
-
+ char* policy = (tsQueryPolicy == QUERY_POLICY_VNODE) ? "vnode" : "client";
+
int32_t dbNum = taosArrayGetSize(pDbVgList);
for (int32_t i = 0; i < dbNum; ++i) {
SArray* pVg = taosArrayGetP(pDbVgList, i);
@@ -815,7 +815,7 @@ int32_t handleCreateTbExecRes(void* res, SCatalog* pCatalog) {
int32_t handleQueryExecRsp(SRequestObj* pRequest) {
if (NULL == pRequest->body.resInfo.execRes.res) {
- return TSDB_CODE_SUCCESS;
+ return pRequest->code;
}
SCatalog* pCatalog = NULL;
@@ -868,10 +868,12 @@ int32_t handleQueryExecRsp(SRequestObj* pRequest) {
return code;
}
+//todo refacto the error code mgmt
void schedulerExecCb(SExecResult* pResult, void* param, int32_t code) {
SRequestObj* pRequest = (SRequestObj*)param;
- pRequest->code = code;
+ STscObj* pTscObj = pRequest->pTscObj;
+ pRequest->code = code;
pRequest->metric.resultReady = taosGetTimestampUs();
if (pResult) {
@@ -879,33 +881,32 @@ void schedulerExecCb(SExecResult* pResult, void* param, int32_t code) {
memcpy(&pRequest->body.resInfo.execRes, pResult, sizeof(*pResult));
}
- if (TDMT_VND_SUBMIT == pRequest->type || TDMT_VND_DELETE == pRequest->type ||
- TDMT_VND_CREATE_TABLE == pRequest->type) {
+ int32_t type = pRequest->type;
+ if (TDMT_VND_SUBMIT == type || TDMT_VND_DELETE == type || TDMT_VND_CREATE_TABLE == type) {
if (pResult) {
pRequest->body.resInfo.numOfRows = pResult->numOfRows;
- if (TDMT_VND_SUBMIT == pRequest->type) {
- STscObj* pTscObj = pRequest->pTscObj;
+
+ // record the insert rows
+ if (TDMT_VND_SUBMIT == type) {
SAppClusterSummary* pActivity = &pTscObj->pAppInfo->summary;
atomic_add_fetch_64((int64_t*)&pActivity->numOfInsertRows, pResult->numOfRows);
}
}
schedulerFreeJob(&pRequest->body.queryJob, 0);
-
- pRequest->metric.execEnd = taosGetTimestampUs();
}
taosMemoryFree(pResult);
+ tscDebug("0x%" PRIx64 " enter scheduler exec cb, code:%s, reqId:0x%" PRIx64, pRequest->self, tstrerror(code),
+ pRequest->requestId);
- tscDebug("0x%" PRIx64 " enter scheduler exec cb, code:%d - %s, reqId:0x%" PRIx64, pRequest->self, code,
- tstrerror(code), pRequest->requestId);
-
- STscObj* pTscObj = pRequest->pTscObj;
if (code != TSDB_CODE_SUCCESS && NEED_CLIENT_HANDLE_ERROR(code) && pRequest->sqlstr != NULL) {
- tscDebug("0x%" PRIx64 " client retry to handle the error, code:%d - %s, tryCount:%d, reqId:0x%" PRIx64,
- pRequest->self, code, tstrerror(code), pRequest->retry, pRequest->requestId);
+ tscDebug("0x%" PRIx64 " client retry to handle the error, code:%s, tryCount:%d, reqId:0x%" PRIx64,
+ pRequest->self, tstrerror(code), pRequest->retry, pRequest->requestId);
pRequest->prevCode = code;
schedulerFreeJob(&pRequest->body.queryJob, 0);
+ qDestroyQuery(pRequest->pQuery);
+ pRequest->pQuery = NULL;
doAsyncQuery(pRequest, true);
return;
}
@@ -915,7 +916,11 @@ void schedulerExecCb(SExecResult* pResult, void* param, int32_t code) {
removeMeta(pTscObj, pRequest->targetTableList);
}
- handleQueryExecRsp(pRequest);
+ pRequest->metric.execEnd = taosGetTimestampUs();
+ int32_t code1 = handleQueryExecRsp(pRequest);
+ if (pRequest->code == TSDB_CODE_SUCCESS && pRequest->code != code1) {
+ pRequest->code = code1;
+ }
// return to client
pRequest->body.queryFp(pRequest->body.param, pRequest, code);
diff --git a/source/client/src/clientMain.c b/source/client/src/clientMain.c
index 650b16f855..5ec4ddf2e5 100644
--- a/source/client/src/clientMain.c
+++ b/source/client/src/clientMain.c
@@ -20,13 +20,13 @@
#include "functionMgt.h"
#include "os.h"
#include "query.h"
+#include "qworker.h"
#include "scheduler.h"
#include "tglobal.h"
#include "tmsg.h"
#include "tref.h"
#include "trpc.h"
#include "version.h"
-#include "qworker.h"
#define TSC_VAR_NOT_RELEASE 1
#define TSC_VAR_RELEASED 0
@@ -700,6 +700,7 @@ void retrieveMetaCallback(SMetaData *pResultMeta, void *param, int32_t code) {
SQuery *pQuery = pRequest->pQuery;
pRequest->metric.ctgEnd = taosGetTimestampUs();
+ qDebug("0x%" PRIx64 " start to semantic analysis, reqId:0x%" PRIx64, pRequest->self, pRequest->requestId);
if (code == TSDB_CODE_SUCCESS) {
code = qAnalyseSqlSemantic(pWrapper->pCtx, &pWrapper->catalogReq, pResultMeta, pQuery);
@@ -723,13 +724,16 @@ void retrieveMetaCallback(SMetaData *pResultMeta, void *param, int32_t code) {
destorySqlParseWrapper(pWrapper);
- tscDebug("0x%" PRIx64 " analysis semantics completed, start async query, reqId:0x%" PRIx64, pRequest->self,
- pRequest->requestId);
+ double el = (pRequest->metric.semanticEnd - pRequest->metric.ctgEnd)/1000.0;
+ tscDebug("0x%" PRIx64 " analysis semantics completed, start async query, elapsed time:%.2f ms, reqId:0x%" PRIx64,
+ pRequest->self, el, pRequest->requestId);
+
launchAsyncQuery(pRequest, pQuery, pResultMeta);
} else {
destorySqlParseWrapper(pWrapper);
qDestroyQuery(pRequest->pQuery);
pRequest->pQuery = NULL;
+
if (NEED_CLIENT_HANDLE_ERROR(code)) {
tscDebug("0x%" PRIx64 " client retry to handle the error, code:%d - %s, tryCount:%d, reqId:0x%" PRIx64,
pRequest->self, code, tstrerror(code), pRequest->retry, pRequest->requestId);
diff --git a/source/common/src/tglobal.c b/source/common/src/tglobal.c
index e1d7569e29..c0203dadb8 100644
--- a/source/common/src/tglobal.c
+++ b/source/common/src/tglobal.c
@@ -85,8 +85,7 @@ uint16_t tsTelemPort = 80;
char tsSmlTagName[TSDB_COL_NAME_LEN] = "_tag_null";
char tsSmlChildTableName[TSDB_TABLE_NAME_LEN] = ""; // user defined child table name can be specified in tag value.
// If set to empty system will generate table name using MD5 hash.
-bool tsSmlDataFormat =
- true; // true means that the name and order of cols in each line are the same(only for influx protocol)
+bool tsSmlDataFormat = false; // true means that the name and order of cols in each line are the same(only for influx protocol)
// query
int32_t tsQueryPolicy = 1;
@@ -95,6 +94,7 @@ int32_t tsQueryRsmaTolerance = 1000; // the tolerance time (ms) to judge from w
bool tsQueryPlannerTrace = false;
int32_t tsQueryNodeChunkSize = 32 * 1024;
bool tsQueryUseNodeAllocator = true;
+bool tsKeepColumnName = false;
/*
* denote if the server needs to compress response message at the application layer to client, including query rsp,
@@ -205,7 +205,9 @@ static int32_t taosLoadCfg(SConfig *pCfg, const char **envCmd, const char *input
tstrncpy(cfgFile, cfgDir, sizeof(cfgDir));
}
- if (apolloUrl == NULL || apolloUrl[0] == '\0') cfgGetApollUrl(envCmd, envFile, apolloUrl);
+ if (apolloUrl != NULL && apolloUrl[0] == '\0') {
+ cfgGetApollUrl(envCmd, envFile, apolloUrl);
+ }
if (cfgLoad(pCfg, CFG_STYPE_APOLLO_URL, apolloUrl) != 0) {
uError("failed to load from apollo url:%s since %s", apolloUrl, terrstr());
@@ -290,6 +292,7 @@ static int32_t taosAddClientCfg(SConfig *pCfg) {
if (cfgAddBool(pCfg, "queryPlannerTrace", tsQueryPlannerTrace, true) != 0) return -1;
if (cfgAddInt32(pCfg, "queryNodeChunkSize", tsQueryNodeChunkSize, 1024, 128 * 1024, true) != 0) return -1;
if (cfgAddBool(pCfg, "queryUseNodeAllocator", tsQueryUseNodeAllocator, true) != 0) return -1;
+ if (cfgAddBool(pCfg, "keepColumnName", tsKeepColumnName, true) != 0) return -1;
if (cfgAddString(pCfg, "smlChildTableName", "", 1) != 0) return -1;
if (cfgAddString(pCfg, "smlTagName", tsSmlTagName, 1) != 0) return -1;
if (cfgAddBool(pCfg, "smlDataFormat", tsSmlDataFormat, 1) != 0) return -1;
@@ -652,6 +655,7 @@ static int32_t taosSetClientCfg(SConfig *pCfg) {
tsQueryPlannerTrace = cfgGetItem(pCfg, "queryPlannerTrace")->bval;
tsQueryNodeChunkSize = cfgGetItem(pCfg, "queryNodeChunkSize")->i32;
tsQueryUseNodeAllocator = cfgGetItem(pCfg, "queryUseNodeAllocator")->bval;
+ tsKeepColumnName = cfgGetItem(pCfg, "keepColumnName")->bval;
return 0;
}
@@ -845,6 +849,9 @@ int32_t taosSetCfg(SConfig *pCfg, char *name) {
break;
}
case 'k': {
+ if (strcasecmp("keepColumnName", name) == 0) {
+ tsKeepColumnName = cfgGetItem(pCfg, "keepColumnName")->bval;
+ }
break;
}
case 'l': {
@@ -921,9 +928,9 @@ int32_t taosSetCfg(SConfig *pCfg, char *name) {
}
case 'u': {
if (strcasecmp("multiProcess", name) == 0) {
- #if !defined(WINDOWS) && !defined(DARWIN)
+#if !defined(WINDOWS) && !defined(DARWIN)
tsMultiProcess = cfgGetItem(pCfg, "multiProcess")->bval;
- #endif
+#endif
} else if (strcasecmp("udfDebugFlag", name) == 0) {
udfDebugFlag = cfgGetItem(pCfg, "udfDebugFlag")->i32;
}
@@ -1126,11 +1133,20 @@ int32_t taosCreateLog(const char *logname, int32_t logFileNum, const char *cfgDi
if (tsc) {
tsLogEmbedded = 0;
- if (taosAddClientLogCfg(pCfg) != 0) return -1;
+ if (taosAddClientLogCfg(pCfg) != 0) {
+ cfgCleanup(pCfg);
+ return -1;
+ }
} else {
tsLogEmbedded = 1;
- if (taosAddClientLogCfg(pCfg) != 0) return -1;
- if (taosAddServerLogCfg(pCfg) != 0) return -1;
+ if (taosAddClientLogCfg(pCfg) != 0) {
+ cfgCleanup(pCfg);
+ return -1;
+ }
+ if (taosAddServerLogCfg(pCfg) != 0) {
+ cfgCleanup(pCfg);
+ return -1;
+ }
}
if (taosLoadCfg(pCfg, envCmd, cfgDir, envFile, apolloUrl) != 0) {
diff --git a/source/dnode/mgmt/mgmt_qnode/src/qmWorker.c b/source/dnode/mgmt/mgmt_qnode/src/qmWorker.c
index 1c7edbe6be..66386b0ee0 100644
--- a/source/dnode/mgmt/mgmt_qnode/src/qmWorker.c
+++ b/source/dnode/mgmt/mgmt_qnode/src/qmWorker.c
@@ -87,6 +87,7 @@ int32_t qmPutRpcMsgToQueue(SQnodeMgmt *pMgmt, EQueueType qtype, SRpcMsg *pRpc) {
return 0;
default:
terrno = TSDB_CODE_INVALID_PARA;
+ taosFreeQitem(pMsg);
return -1;
}
}
diff --git a/source/dnode/mgmt/mgmt_vnode/src/vmFile.c b/source/dnode/mgmt/mgmt_vnode/src/vmFile.c
index cbcb541200..82fc286a94 100644
--- a/source/dnode/mgmt/mgmt_vnode/src/vmFile.c
+++ b/source/dnode/mgmt/mgmt_vnode/src/vmFile.c
@@ -135,12 +135,14 @@ _OVER:
if (content != NULL) taosMemoryFree(content);
if (root != NULL) cJSON_Delete(root);
if (pFile != NULL) taosCloseFile(&pFile);
+ if (*ppCfgs == NULL && pCfgs != NULL) taosMemoryFree(pCfgs);
terrno = code;
return code;
}
int32_t vmWriteVnodeListToFile(SVnodeMgmt *pMgmt) {
+ int32_t ret = 0;
char file[PATH_MAX] = {0};
char realfile[PATH_MAX] = {0};
snprintf(file, sizeof(file), "%s%svnodes.json.bak", pMgmt->path, TD_DIRSEP);
@@ -161,13 +163,16 @@ int32_t vmWriteVnodeListToFile(SVnodeMgmt *pMgmt) {
char *content = taosMemoryCalloc(1, maxLen + 1);
if (content == NULL) {
terrno = TSDB_CODE_OUT_OF_MEMORY;
- return -1;
+ ret = -1;
+ goto _OVER;
}
len += snprintf(content + len, maxLen - len, "{\n");
len += snprintf(content + len, maxLen - len, " \"vnodes\": [\n");
for (int32_t i = 0; i < numOfVnodes; ++i) {
SVnodeObj *pVnode = pVnodes[i];
+ if (pVnode == NULL) continue;
+
len += snprintf(content + len, maxLen - len, " {\n");
len += snprintf(content + len, maxLen - len, " \"vgId\": %d,\n", pVnode->vgId);
len += snprintf(content + len, maxLen - len, " \"dropped\": %d,\n", pVnode->dropped);
@@ -180,12 +185,13 @@ int32_t vmWriteVnodeListToFile(SVnodeMgmt *pMgmt) {
}
len += snprintf(content + len, maxLen - len, " ]\n");
len += snprintf(content + len, maxLen - len, "}\n");
+ terrno = 0;
+_OVER:
taosWriteFile(pFile, content, len);
taosFsyncFile(pFile);
taosCloseFile(&pFile);
taosMemoryFree(content);
- terrno = 0;
for (int32_t i = 0; i < numOfVnodes; ++i) {
SVnodeObj *pVnode = pVnodes[i];
@@ -196,6 +202,8 @@ int32_t vmWriteVnodeListToFile(SVnodeMgmt *pMgmt) {
taosMemoryFree(pVnodes);
}
+ if (ret != 0) return -1;
+
dDebug("successed to write %s, numOfVnodes:%d", realfile, numOfVnodes);
return taosRenameFile(file, realfile);
}
\ No newline at end of file
diff --git a/source/dnode/mgmt/mgmt_vnode/src/vmHandle.c b/source/dnode/mgmt/mgmt_vnode/src/vmHandle.c
index e3ad1b9389..4047bc2340 100644
--- a/source/dnode/mgmt/mgmt_vnode/src/vmHandle.c
+++ b/source/dnode/mgmt/mgmt_vnode/src/vmHandle.c
@@ -175,7 +175,7 @@ static void vmGenerateVnodeCfg(SCreateVnodeReq *pCreate, SVnodeCfg *pCfg) {
pCfg->hashSuffix = pCreate->hashSuffix;
pCfg->tsdbPageSize = pCreate->tsdbPageSize * 1024;
- pCfg->standby = pCfg->standby;
+ pCfg->standby = 0;
pCfg->syncCfg.myIndex = pCreate->selfIndex;
pCfg->syncCfg.replicaNum = pCreate->replica;
memset(&pCfg->syncCfg.nodeInfo, 0, sizeof(pCfg->syncCfg.nodeInfo));
diff --git a/source/dnode/mgmt/mgmt_vnode/src/vmInt.c b/source/dnode/mgmt/mgmt_vnode/src/vmInt.c
index f0c43d8b36..19ed2cbc88 100644
--- a/source/dnode/mgmt/mgmt_vnode/src/vmInt.c
+++ b/source/dnode/mgmt/mgmt_vnode/src/vmInt.c
@@ -58,11 +58,14 @@ int32_t vmOpenVnode(SVnodeMgmt *pMgmt, SWrapperCfg *pCfg, SVnode *pImpl) {
if (pVnode->path == NULL) {
terrno = TSDB_CODE_OUT_OF_MEMORY;
+ taosMemoryFree(pVnode);
return -1;
}
if (vmAllocQueue(pMgmt, pVnode) != 0) {
terrno = TSDB_CODE_OUT_OF_MEMORY;
+ taosMemoryFree(pVnode->path);
+ taosMemoryFree(pVnode);
return -1;
}
@@ -221,6 +224,7 @@ static void vmCloseVnodes(SVnodeMgmt *pMgmt) {
SVnodeObj **ppVnodes = vmGetVnodeListFromHash(pMgmt, &numOfVnodes);
for (int32_t i = 0; i < numOfVnodes; ++i) {
+ if (ppVnodes == NULL || ppVnodes[i] == NULL) continue;
vmCloseVnode(pMgmt, ppVnodes[i]);
}
@@ -380,7 +384,9 @@ static int32_t vmStartVnodes(SVnodeMgmt *pMgmt) {
for (int32_t v = 0; v < numOfVnodes; ++v) {
int32_t t = v % threadNum;
SVnodeThread *pThread = &threads[t];
- pThread->ppVnodes[pThread->vnodeNum++] = ppVnodes[v];
+ if (pThread->ppVnodes != NULL) {
+ pThread->ppVnodes[pThread->vnodeNum++] = ppVnodes[v];
+ }
}
pMgmt->state.openVnodes = 0;
@@ -411,8 +417,8 @@ static int32_t vmStartVnodes(SVnodeMgmt *pMgmt) {
taosMemoryFree(threads);
for (int32_t i = 0; i < numOfVnodes; ++i) {
- SVnodeObj *pVnode = ppVnodes[i];
- vmReleaseVnode(pMgmt, pVnode);
+ if (ppVnodes == NULL || ppVnodes[i] == NULL) continue;
+ vmReleaseVnode(pMgmt, ppVnodes[i]);
}
if (ppVnodes != NULL) {
diff --git a/source/dnode/mnode/sdb/src/sdbFile.c b/source/dnode/mnode/sdb/src/sdbFile.c
index ff0c4b26ef..b5cfa7b0f6 100644
--- a/source/dnode/mnode/sdb/src/sdbFile.c
+++ b/source/dnode/mnode/sdb/src/sdbFile.c
@@ -514,7 +514,7 @@ static void sdbCloseIter(SSdbIter *pIter) {
}
if (pIter->name != NULL) {
- taosRemoveFile(pIter->name);
+ (void)taosRemoveFile(pIter->name);
taosMemoryFree(pIter->name);
pIter->name = NULL;
}
@@ -606,6 +606,7 @@ int32_t sdbStartWrite(SSdb *pSdb, SSdbIter **ppIter) {
if (pIter->file == NULL) {
terrno = TAOS_SYSTEM_ERROR(errno);
mError("failed to open %s since %s", pIter->name, terrstr());
+ sdbCloseIter(pIter);
return -1;
}
@@ -636,9 +637,9 @@ int32_t sdbStopWrite(SSdb *pSdb, SSdbIter *pIter, bool isApply, int64_t index, i
return -1;
}
- sdbCloseIter(pIter);
if (sdbReadFile(pSdb) != 0) {
mError("sdbiter:%p, failed to read from %s since %s", pIter, datafile, terrstr());
+ sdbCloseIter(pIter);
return -1;
}
@@ -656,6 +657,7 @@ int32_t sdbStopWrite(SSdb *pSdb, SSdbIter *pIter, bool isApply, int64_t index, i
}
mInfo("sdbiter:%p, success applyed to sdb", pIter);
+ sdbCloseIter(pIter);
return 0;
}
diff --git a/source/dnode/vnode/src/inc/tsdb.h b/source/dnode/vnode/src/inc/tsdb.h
index c2f0d58279..75b2f74096 100644
--- a/source/dnode/vnode/src/inc/tsdb.h
+++ b/source/dnode/vnode/src/inc/tsdb.h
@@ -32,6 +32,12 @@ extern "C" {
#define tsdbTrace(...) do { if (tsdbDebugFlag & DEBUG_TRACE) { taosPrintLog("TSD ", DEBUG_TRACE, tsdbDebugFlag, __VA_ARGS__); }} while(0)
// clang-format on
+#define TSDB_CHECK_CODE(CODE, LINO, LABEL) \
+ if (CODE) { \
+ LINO = __LINE__; \
+ goto LABEL; \
+ }
+
typedef struct TSDBROW TSDBROW;
typedef struct TABLEID TABLEID;
typedef struct TSDBKEY TSDBKEY;
@@ -150,7 +156,7 @@ int32_t tCmprBlockL(void const *lhs, void const *rhs);
int32_t tBlockDataCreate(SBlockData *pBlockData);
void tBlockDataDestroy(SBlockData *pBlockData, int8_t deepClear);
-int32_t tBlockDataInit(SBlockData *pBlockData, int64_t suid, int64_t uid, STSchema *pTSchema);
+int32_t tBlockDataInit(SBlockData *pBlockData, TABLEID *pId, STSchema *pTSchema, int16_t *aCid, int32_t nCid);
int32_t tBlockDataInitEx(SBlockData *pBlockData, SBlockData *pBlockDataFrom);
void tBlockDataReset(SBlockData *pBlockData);
int32_t tBlockDataAppendRow(SBlockData *pBlockData, TSDBROW *pRow, STSchema *pTSchema, int64_t uid);
@@ -272,6 +278,7 @@ int32_t tsdbReadSttBlk(SDataFReader *pReader, int32_t iStt, SArray *aSttBlk);
int32_t tsdbReadBlockSma(SDataFReader *pReader, SDataBlk *pBlock, SArray *aColumnDataAgg);
int32_t tsdbReadDataBlock(SDataFReader *pReader, SDataBlk *pBlock, SBlockData *pBlockData);
int32_t tsdbReadSttBlock(SDataFReader *pReader, int32_t iStt, SSttBlk *pSttBlk, SBlockData *pBlockData);
+int32_t tsdbReadSttBlockEx(SDataFReader *pReader, int32_t iStt, SSttBlk *pSttBlk, SBlockData *pBlockData);
// SDelFWriter
int32_t tsdbDelFWriterOpen(SDelFWriter **ppWriter, SDelFile *pFile, STsdb *pTsdb);
int32_t tsdbDelFWriterClose(SDelFWriter **ppWriter, int8_t sync);
@@ -633,6 +640,9 @@ typedef struct SSttBlockLoadInfo {
int32_t currentLoadBlockIndex;
int32_t loadBlocks;
double elapsedTime;
+ STSchema *pSchema;
+ int16_t *colIds;
+ int32_t numOfCols;
} SSttBlockLoadInfo;
typedef struct SMergeTree {
@@ -652,13 +662,14 @@ typedef struct {
} SSkmInfo;
int32_t tMergeTreeOpen(SMergeTree *pMTree, int8_t backward, SDataFReader *pFReader, uint64_t suid, uint64_t uid,
- STimeWindow *pTimeWindow, SVersionRange *pVerRange, void *pLoadInfo, const char *idStr);
+ STimeWindow *pTimeWindow, SVersionRange *pVerRange, SSttBlockLoadInfo *pBlockLoadInfo,
+ bool destroyLoadInfo, const char *idStr);
void tMergeTreeAddIter(SMergeTree *pMTree, SLDataIter *pIter);
bool tMergeTreeNext(SMergeTree *pMTree);
TSDBROW tMergeTreeGetRow(SMergeTree *pMTree);
void tMergeTreeClose(SMergeTree *pMTree);
-SSttBlockLoadInfo *tCreateLastBlockLoadInfo();
+SSttBlockLoadInfo *tCreateLastBlockLoadInfo(STSchema *pSchema, int16_t *colList, int32_t numOfCols);
void resetLastBlockLoadInfo(SSttBlockLoadInfo *pLoadInfo);
void getLastBlockLoadInfo(SSttBlockLoadInfo *pLoadInfo, int64_t *blocks, double *el);
void *destroyLastBlockLoadInfo(SSttBlockLoadInfo *pLoadInfo);
diff --git a/source/dnode/vnode/src/meta/metaQuery.c b/source/dnode/vnode/src/meta/metaQuery.c
index f549ef84f8..2ef4e7510e 100644
--- a/source/dnode/vnode/src/meta/metaQuery.c
+++ b/source/dnode/vnode/src/meta/metaQuery.c
@@ -872,7 +872,7 @@ SArray *metaGetSmaIdsByTable(SMeta *pMeta, tb_uid_t uid) {
pSmaIdxKey = (SSmaIdxKey *)pCur->pKey;
- if (taosArrayPush(pUids, &pSmaIdxKey->smaUid) < 0) {
+ if (!taosArrayPush(pUids, &pSmaIdxKey->smaUid)) {
terrno = TSDB_CODE_OUT_OF_MEMORY;
metaCloseSmaCursor(pCur);
taosArrayDestroy(pUids);
@@ -915,7 +915,7 @@ SArray *metaGetSmaTbUids(SMeta *pMeta) {
}
}
- if (taosArrayPush(pUids, &uid) < 0) {
+ if (!taosArrayPush(pUids, &uid)) {
terrno = TSDB_CODE_OUT_OF_MEMORY;
metaCloseSmaCursor(pCur);
taosArrayDestroy(pUids);
diff --git a/source/dnode/vnode/src/sma/smaCommit.c b/source/dnode/vnode/src/sma/smaCommit.c
index 2b44cdcef1..fb5caad269 100644
--- a/source/dnode/vnode/src/sma/smaCommit.c
+++ b/source/dnode/vnode/src/sma/smaCommit.c
@@ -213,7 +213,7 @@ static int32_t tdUpdateQTaskInfoFiles(SSma *pSma, SRSmaStat *pStat) {
tdRSmaQTaskInfoGetFullName(TD_VID(pVnode), committed, tfsGetPrimaryPath(pVnode->pTfs), qTaskInfoFullName);
if (taosCheckExistFile(qTaskInfoFullName)) {
SQTaskFile qFile = {.nRef = 1, .padding = 0, .version = committed, .size = 0};
- if (taosArrayPush(pFS->aQTaskInf, &qFile) < 0) {
+ if (!taosArrayPush(pFS->aQTaskInf, &qFile)) {
taosWUnLockLatch(RSMA_FS_LOCK(pStat));
terrno = TSDB_CODE_OUT_OF_MEMORY;
return TSDB_CODE_FAILED;
diff --git a/source/dnode/vnode/src/sma/smaEnv.c b/source/dnode/vnode/src/sma/smaEnv.c
index ccf4ebb39f..64e5e49d0b 100644
--- a/source/dnode/vnode/src/sma/smaEnv.c
+++ b/source/dnode/vnode/src/sma/smaEnv.c
@@ -386,7 +386,7 @@ int32_t tdCheckAndInitSmaEnv(SSma *pSma, int8_t smaType) {
}
break;
default:
- smaError("vgId:%d, undefined smaType:%", SMA_VID(pSma), smaType);
+ smaError("vgId:%d, undefined smaType:%" PRIi8, SMA_VID(pSma), smaType);
return TSDB_CODE_FAILED;
}
diff --git a/source/dnode/vnode/src/sma/smaFS.c b/source/dnode/vnode/src/sma/smaFS.c
index a5f4e8d2e8..55378751eb 100644
--- a/source/dnode/vnode/src/sma/smaFS.c
+++ b/source/dnode/vnode/src/sma/smaFS.c
@@ -54,7 +54,7 @@ int32_t tdRSmaFSOpen(SSma *pSma, int64_t version) {
if ((terrno = tdRSmaFSUpsertQTaskFile(RSMA_FS(pStat), &qTaskFile)) < 0) {
goto _end;
}
- smaInfo("vgId:%d, open fs, version:%" PRIi64 ", ref:%" PRIi64, TD_VID(pVnode), qTaskFile.version, qTaskFile.nRef);
+ smaInfo("vgId:%d, open fs, version:%" PRIi64 ", ref:%d", TD_VID(pVnode), qTaskFile.version, qTaskFile.nRef);
}
_end:
diff --git a/source/dnode/vnode/src/sma/smaRollup.c b/source/dnode/vnode/src/sma/smaRollup.c
index 8d1525e081..27da9da02c 100644
--- a/source/dnode/vnode/src/sma/smaRollup.c
+++ b/source/dnode/vnode/src/sma/smaRollup.c
@@ -196,7 +196,8 @@ static int32_t tdUpdateTbUidListImpl(SSma *pSma, tb_uid_t *suid, SArray *tbUids,
if (!suid || !tbUids) {
terrno = TSDB_CODE_INVALID_PTR;
- smaError("vgId:%d, failed to get rsma info for uid:%" PRIi64 " since %s", SMA_VID(pSma), *suid, terrstr());
+ smaError("vgId:%d, failed to get rsma info for uid:%" PRIi64 " since %s", SMA_VID(pSma), suid ? *suid : -1,
+ terrstr());
return TSDB_CODE_FAILED;
}
@@ -566,6 +567,7 @@ static int32_t tdUidStorePut(STbUidStore *pStore, tb_uid_t suid, tb_uid_t *uid)
}
if (!taosArrayPush(pUidArray, uid)) {
terrno = TSDB_CODE_OUT_OF_MEMORY;
+ taosArrayDestroy(pUidArray);
return TSDB_CODE_FAILED;
}
if (taosHashPut(pStore->uidHash, &suid, sizeof(suid), &pUidArray, sizeof(pUidArray)) < 0) {
@@ -690,7 +692,8 @@ static int32_t tdRSmaExecAndSubmitResult(SSma *pSma, qTaskInfo_t taskInfo, SRSma
while (1) {
uint64_t ts;
- int32_t code = qExecTaskOpt(taskInfo, pResList, &ts, NULL);
+ bool hasMore = false;
+ int32_t code = qExecTaskOpt(taskInfo, pResList, &ts, &hasMore, NULL);
if (code < 0) {
if (code == TSDB_CODE_QRY_IN_EXEC) {
break;
@@ -1677,13 +1680,13 @@ static void tdRSmaFetchTrigger(void *param, void *tmrId) {
SRSmaInfoItem *pItem = NULL;
if (!(pRSmaRef = taosHashGet(smaMgmt.refHash, ¶m, POINTER_BYTES))) {
- smaDebug("rsma fetch task not start since rsma info item:%p not exist in refHash:%p, rsetId:%" PRIi64, param,
- *(int64_t *)¶m, smaMgmt.refHash, smaMgmt.rsetId);
+ smaDebug("rsma fetch task not start since rsma info item:%p not exist in refHash:%p, rsetId:%d", param,
+ smaMgmt.refHash, smaMgmt.rsetId);
return;
}
if (!(pStat = (SRSmaStat *)tdAcquireSmaRef(smaMgmt.rsetId, pRSmaRef->refId))) {
- smaDebug("rsma fetch task not start since rsma stat already destroyed, rsetId:%" PRIi64 " refId:%d)",
+ smaDebug("rsma fetch task not start since rsma stat already destroyed, rsetId:%d refId:%" PRIi64 ")",
smaMgmt.rsetId, pRSmaRef->refId); // pRSmaRef freed in taosHashRemove
taosHashRemove(smaMgmt.refHash, ¶m, POINTER_BYTES);
return;
@@ -1692,7 +1695,7 @@ static void tdRSmaFetchTrigger(void *param, void *tmrId) {
pSma = pStat->pSma;
if (!(pRSmaInfo = tdAcquireRSmaInfoBySuid(pSma, pRSmaRef->suid))) {
- smaDebug("rsma fetch task not start since rsma info not exist, rsetId:%" PRIi64 " refId:%d)", smaMgmt.rsetId,
+ smaDebug("rsma fetch task not start since rsma info not exist, rsetId:%d refId:%" PRIi64 ")", smaMgmt.rsetId,
pRSmaRef->refId); // pRSmaRef freed in taosHashRemove
tdReleaseSmaRef(smaMgmt.rsetId, pRSmaRef->refId);
taosHashRemove(smaMgmt.refHash, ¶m, POINTER_BYTES);
@@ -1700,7 +1703,7 @@ static void tdRSmaFetchTrigger(void *param, void *tmrId) {
}
if (RSMA_INFO_IS_DEL(pRSmaInfo)) {
- smaDebug("rsma fetch task not start since rsma info already deleted, rsetId:%" PRIi64 " refId:%d)", smaMgmt.rsetId,
+ smaDebug("rsma fetch task not start since rsma info already deleted, rsetId:%d refId:%" PRIi64 ")", smaMgmt.rsetId,
pRSmaRef->refId); // pRSmaRef freed in taosHashRemove
tdReleaseRSmaInfo(pSma, pRSmaInfo);
tdReleaseSmaRef(smaMgmt.rsetId, pRSmaRef->refId);
@@ -1716,7 +1719,7 @@ static void tdRSmaFetchTrigger(void *param, void *tmrId) {
case TASK_TRIGGER_STAT_PAUSED:
case TASK_TRIGGER_STAT_CANCELLED: {
smaDebug("vgId:%d, rsma fetch task not start for level %" PRIi8 " since stat is %" PRIi8
- ", rsetId rsetId:%" PRIi64 " refId:%d",
+ ", rsetId:%d refId:%" PRIi64,
SMA_VID(pSma), pItem->level, rsmaTriggerStat, smaMgmt.rsetId, pRSmaRef->refId);
if (rsmaTriggerStat == TASK_TRIGGER_STAT_PAUSED) {
taosTmrReset(tdRSmaFetchTrigger, RSMA_FETCH_INTERVAL, pItem, smaMgmt.tmrHandle, &pItem->tmrId);
@@ -1844,7 +1847,7 @@ static int32_t tdRSmaBatchExec(SSma *pSma, SRSmaInfo *pInfo, STaosQall *qall, SA
void *msg = NULL;
taosGetQitem(qall, (void **)&msg);
if (msg) {
- if (taosArrayPush(pSubmitArr, &msg) < 0) {
+ if (!taosArrayPush(pSubmitArr, &msg)) {
tdFreeRSmaSubmitItems(pSubmitArr);
goto _err;
}
diff --git a/source/dnode/vnode/src/sma/smaSnapshot.c b/source/dnode/vnode/src/sma/smaSnapshot.c
index 5a0167a75f..4939fce20c 100644
--- a/source/dnode/vnode/src/sma/smaSnapshot.c
+++ b/source/dnode/vnode/src/sma/smaSnapshot.c
@@ -70,6 +70,8 @@ int32_t rsmaSnapReaderOpen(SSma* pSma, int64_t sver, int64_t ever, SRSmaSnapRead
return TSDB_CODE_SUCCESS;
_err:
+ if (pReader) rsmaSnapReaderClose(&pReader);
+ *ppReader = NULL;
smaError("vgId:%d, vnode snapshot rsma reader open failed since %s", TD_VID(pVnode), tstrerror(code));
return TSDB_CODE_FAILED;
}
@@ -101,8 +103,8 @@ static int32_t rsmaQTaskInfSnapReaderOpen(SRSmaSnapReader* pReader, int64_t vers
if (!taosCheckExistFile(qTaskInfoFullName)) {
tdRSmaFSUnRef(pSma, pStat, version);
- smaInfo("vgId:%d, vnode snapshot rsma reader for qtaskinfo version %" PRIi64 " not need as %s not exists",
- TD_VID(pVnode), qTaskInfoFullName);
+ smaInfo("vgId:%d, vnode snapshot rsma reader for qtaskinfo version %" PRIi64 " not need as %s not exist",
+ TD_VID(pVnode), version, qTaskInfoFullName);
return TSDB_CODE_SUCCESS;
}
@@ -336,6 +338,7 @@ int32_t rsmaSnapWriterOpen(SSma* pSma, int64_t sver, int64_t ever, SRSmaSnapWrit
tdRSmaQTaskInfoGetFullName(TD_VID(pVnode), 0, tfsGetPrimaryPath(pVnode->pTfs), qTaskInfoFullName);
TdFilePtr qTaskF = taosCreateFile(qTaskInfoFullName, TD_FILE_CREATE | TD_FILE_WRITE | TD_FILE_TRUNC);
if (!qTaskF) {
+ taosMemoryFree(qWriter);
code = TAOS_SYSTEM_ERROR(errno);
smaError("vgId:%d, rsma snapshot writer open %s failed since %s", TD_VID(pSma->pVnode), qTaskInfoFullName,
tstrerror(code));
@@ -356,6 +359,7 @@ int32_t rsmaSnapWriterOpen(SSma* pSma, int64_t sver, int64_t ever, SRSmaSnapWrit
_err:
smaError("vgId:%d, rsma snapshot writer open failed since %s", TD_VID(pSma->pVnode), tstrerror(code));
+ if (pWriter) rsmaSnapWriterClose(&pWriter, 0);
*ppWriter = NULL;
return code;
}
@@ -449,11 +453,11 @@ static int32_t rsmaSnapWriteQTaskInfo(SRSmaSnapWriter* pWriter, uint8_t* pData,
code = TAOS_SYSTEM_ERROR(errno);
goto _err;
}
+ smaInfo("vgId:%d, vnode snapshot rsma write qtaskinfo %s succeed", SMA_VID(pWriter->pSma), qWriter->fname);
} else {
smaInfo("vgId:%d, vnode snapshot rsma write qtaskinfo is not needed", SMA_VID(pWriter->pSma));
}
- smaInfo("vgId:%d, vnode snapshot rsma write qtaskinfo %s succeed", SMA_VID(pWriter->pSma), qWriter->fname);
_exit:
return code;
diff --git a/source/dnode/vnode/src/sma/smaUtil.c b/source/dnode/vnode/src/sma/smaUtil.c
index a4ba0a61a5..6d7b7df1ee 100644
--- a/source/dnode/vnode/src/sma/smaUtil.c
+++ b/source/dnode/vnode/src/sma/smaUtil.c
@@ -290,19 +290,19 @@ int32_t tdRemoveTFile(STFile *pTFile) {
void *tdAcquireSmaRef(int32_t rsetId, int64_t refId) {
void *pResult = taosAcquireRef(rsetId, refId);
if (!pResult) {
- smaWarn("rsma acquire ref for rsetId:%" PRIi64 " refId:%d failed since %s", rsetId, refId, terrstr());
+ smaWarn("rsma acquire ref for rsetId:%d refId:%" PRIi64 " failed since %s", rsetId, refId, terrstr());
} else {
- smaDebug("rsma acquire ref for rsetId:%" PRIi64 " refId:%d success", rsetId, refId);
+ smaDebug("rsma acquire ref for rsetId:%d refId:%" PRIi64 " success", rsetId, refId);
}
return pResult;
}
int32_t tdReleaseSmaRef(int32_t rsetId, int64_t refId) {
if (taosReleaseRef(rsetId, refId) < 0) {
- smaWarn("rsma release ref for rsetId:%" PRIi64 " refId:%d failed since %s", rsetId, refId, terrstr());
+ smaWarn("rsma release ref for rsetId:%d refId:%" PRIi64 " failed since %s", rsetId, refId, terrstr());
return TSDB_CODE_FAILED;
}
- smaDebug("rsma release ref for rsetId:%" PRIi64 " refId:%d success", rsetId, refId);
+ smaDebug("rsma release ref for rsetId:%d refId:%" PRIi64 " success", rsetId, refId);
return TSDB_CODE_SUCCESS;
}
\ No newline at end of file
diff --git a/source/dnode/vnode/src/tsdb/tsdbCache.c b/source/dnode/vnode/src/tsdb/tsdbCache.c
index 32272b541c..3a921349e6 100644
--- a/source/dnode/vnode/src/tsdb/tsdbCache.c
+++ b/source/dnode/vnode/src/tsdb/tsdbCache.c
@@ -420,6 +420,7 @@ typedef enum {
typedef struct {
SFSLASTNEXTROWSTATES state; // [input]
STsdb *pTsdb; // [input]
+ STSchema *pTSchema;// [input]
tb_uid_t suid;
tb_uid_t uid;
int32_t nFileSet;
@@ -455,9 +456,10 @@ static int32_t getNextRowFromFSLast(void *iter, TSDBROW **ppRow) {
code = tsdbDataFReaderOpen(&state->pDataFReader, state->pTsdb, pFileSet);
if (code) goto _err;
+ SSttBlockLoadInfo* pLoadInfo = tCreateLastBlockLoadInfo(state->pTSchema, NULL, 0);
tMergeTreeOpen(&state->mergeTree, 1, state->pDataFReader, state->suid, state->uid,
&(STimeWindow){.skey = TSKEY_MIN, .ekey = TSKEY_MAX},
- &(SVersionRange){.minVer = 0, .maxVer = UINT64_MAX}, NULL, NULL);
+ &(SVersionRange){.minVer = 0, .maxVer = UINT64_MAX}, pLoadInfo,true, NULL);
bool hasVal = tMergeTreeNext(&state->mergeTree);
if (!hasVal) {
state->state = SFSLASTNEXTROW_FILESET;
@@ -612,7 +614,8 @@ static int32_t getNextRowFromFS(void *iter, TSDBROW **ppRow) {
tMapDataGetItemByIdx(&state->blockMap, state->iBlock, &block, tGetDataBlk);
/* code = tsdbReadBlockData(state->pDataFReader, &state->blockIdx, &block, &state->blockData, NULL, NULL); */
tBlockDataReset(state->pBlockData);
- code = tBlockDataInit(state->pBlockData, state->suid, state->uid, state->pTSchema);
+ TABLEID tid = {.suid = state->suid, .uid = state->uid};
+ code = tBlockDataInit(state->pBlockData, &tid, state->pTSchema, NULL, 0);
if (code) goto _err;
code = tsdbReadDataBlock(state->pDataFReader, &block, state->pBlockData);
@@ -891,6 +894,7 @@ static int32_t nextRowIterOpen(CacheNextRowIter *pIter, tb_uid_t uid, STsdb *pTs
pIter->fsLastState.state = (SFSLASTNEXTROWSTATES)SFSNEXTROW_FS;
pIter->fsLastState.pTsdb = pTsdb;
pIter->fsLastState.aDFileSet = pIter->pReadSnap->fs.aDFileSet;
+ pIter->fsLastState.pTSchema = pTSchema;
pIter->fsLastState.suid = suid;
pIter->fsLastState.uid = uid;
diff --git a/source/dnode/vnode/src/tsdb/tsdbCommit.c b/source/dnode/vnode/src/tsdb/tsdbCommit.c
index a619b9f2e4..5403395623 100644
--- a/source/dnode/vnode/src/tsdb/tsdbCommit.c
+++ b/source/dnode/vnode/src/tsdb/tsdbCommit.c
@@ -437,7 +437,7 @@ static int32_t tsdbOpenCommitIter(SCommitter *pCommitter) {
pIter->iSttBlk = 0;
SSttBlk *pSttBlk = (SSttBlk *)taosArrayGet(pIter->aSttBlk, 0);
- code = tsdbReadSttBlock(pCommitter->dReader.pReader, iStt, pSttBlk, &pIter->bData);
+ code = tsdbReadSttBlockEx(pCommitter->dReader.pReader, iStt, pSttBlk, &pIter->bData);
if (code) goto _err;
pIter->iRow = 0;
@@ -1049,7 +1049,7 @@ static int32_t tsdbNextCommitRow(SCommitter *pCommitter) {
if (pIter->iSttBlk < taosArrayGetSize(pIter->aSttBlk)) {
SSttBlk *pSttBlk = (SSttBlk *)taosArrayGet(pIter->aSttBlk, pIter->iSttBlk);
- code = tsdbReadSttBlock(pCommitter->dReader.pReader, pIter->iStt, pSttBlk, &pIter->bData);
+ code = tsdbReadSttBlockEx(pCommitter->dReader.pReader, pIter->iStt, pSttBlk, &pIter->bData);
if (code) goto _exit;
pIter->iRow = 0;
@@ -1305,7 +1305,8 @@ static int32_t tsdbInitLastBlockIfNeed(SCommitter *pCommitter, TABLEID id) {
if (!pBDatal->suid && !pBDatal->uid) {
ASSERT(pCommitter->skmTable.suid == id.suid);
ASSERT(pCommitter->skmTable.uid == id.uid);
- code = tBlockDataInit(pBDatal, id.suid, id.suid ? 0 : id.uid, pCommitter->skmTable.pTSchema);
+ TABLEID tid = {.suid = id.suid, .uid = id.suid ? 0 : id.uid};
+ code = tBlockDataInit(pBDatal, &tid, pCommitter->skmTable.pTSchema, NULL, 0);
if (code) goto _exit;
}
@@ -1428,9 +1429,9 @@ static int32_t tsdbCommitFileDataImpl(SCommitter *pCommitter) {
// impl
code = tsdbUpdateTableSchema(pCommitter->pTsdb->pVnode->pMeta, id.suid, id.uid, &pCommitter->skmTable);
if (code) goto _err;
- code = tBlockDataInit(&pCommitter->dReader.bData, id.suid, id.uid, pCommitter->skmTable.pTSchema);
+ code = tBlockDataInit(&pCommitter->dReader.bData, &id, pCommitter->skmTable.pTSchema, NULL, 0);
if (code) goto _err;
- code = tBlockDataInit(&pCommitter->dWriter.bData, id.suid, id.uid, pCommitter->skmTable.pTSchema);
+ code = tBlockDataInit(&pCommitter->dWriter.bData, &id, pCommitter->skmTable.pTSchema, NULL, 0);
if (code) goto _err;
/* merge with data in .data file */
diff --git a/source/dnode/vnode/src/tsdb/tsdbMergeTree.c b/source/dnode/vnode/src/tsdb/tsdbMergeTree.c
index 5f03a82bc0..7e6a0d04ff 100644
--- a/source/dnode/vnode/src/tsdb/tsdbMergeTree.c
+++ b/source/dnode/vnode/src/tsdb/tsdbMergeTree.c
@@ -28,11 +28,10 @@ struct SLDataIter {
uint64_t uid;
STimeWindow timeWindow;
SVersionRange verRange;
-
SSttBlockLoadInfo* pBlockLoadInfo;
};
-SSttBlockLoadInfo* tCreateLastBlockLoadInfo() {
+SSttBlockLoadInfo* tCreateLastBlockLoadInfo(STSchema* pSchema, int16_t* colList, int32_t numOfCols) {
SSttBlockLoadInfo* pLoadInfo = taosMemoryCalloc(TSDB_DEFAULT_STT_FILE, sizeof(SSttBlockLoadInfo));
if (pLoadInfo == NULL) {
terrno = TSDB_CODE_OUT_OF_MEMORY;
@@ -55,6 +54,9 @@ SSttBlockLoadInfo* tCreateLastBlockLoadInfo() {
}
pLoadInfo[i].aSttBlk = taosArrayInit(4, sizeof(SSttBlk));
+ pLoadInfo[i].pSchema = pSchema;
+ pLoadInfo[i].colIds = colList;
+ pLoadInfo[i].numOfCols = numOfCols;
}
return pLoadInfo;
@@ -111,7 +113,19 @@ static SBlockData* loadLastBlock(SLDataIter *pIter, const char* idStr) {
pInfo->currentLoadBlockIndex ^= 1;
if (pIter->pSttBlk != NULL) { // current block not loaded yet
int64_t st = taosGetTimestampUs();
- code = tsdbReadSttBlock(pIter->pReader, pIter->iStt, pIter->pSttBlk, &pInfo->blockData[pInfo->currentLoadBlockIndex]);
+
+ SBlockData* pBlock = &pInfo->blockData[pInfo->currentLoadBlockIndex];
+
+ TABLEID id = {0};
+ if (pIter->pSttBlk->suid != 0) {
+ id.suid = pIter->pSttBlk->suid;
+ } else {
+ id.uid = pIter->uid;
+ }
+
+ tBlockDataInit(pBlock, &id, pInfo->pSchema, pInfo->colIds, pInfo->numOfCols);
+ code = tsdbReadSttBlock(pIter->pReader, pIter->iStt, pIter->pSttBlk, pBlock);
+
double el = (taosGetTimestampUs() - st)/ 1000.0;
pInfo->elapsedTime += el;
pInfo->loadBlocks += 1;
@@ -460,7 +474,8 @@ static FORCE_INLINE int32_t tLDataIterCmprFn(const void *p1, const void *p2) {
}
int32_t tMergeTreeOpen(SMergeTree *pMTree, int8_t backward, SDataFReader *pFReader, uint64_t suid, uint64_t uid,
- STimeWindow *pTimeWindow, SVersionRange *pVerRange, void* pBlockLoadInfo, const char* idStr) {
+ STimeWindow *pTimeWindow, SVersionRange *pVerRange, SSttBlockLoadInfo *pBlockLoadInfo,
+ bool destroyLoadInfo, const char *idStr) {
pMTree->backward = backward;
pMTree->pIter = NULL;
pMTree->pIterList = taosArrayInit(4, POINTER_BYTES);
@@ -473,21 +488,12 @@ int32_t tMergeTreeOpen(SMergeTree *pMTree, int8_t backward, SDataFReader *pFRead
tRBTreeCreate(&pMTree->rbt, tLDataIterCmprFn);
int32_t code = TSDB_CODE_SUCCESS;
- SSttBlockLoadInfo* pLoadInfo = NULL;
- if (pBlockLoadInfo == NULL) {
- if (pMTree->pLoadInfo == NULL) {
- pMTree->destroyLoadInfo = true;
- pMTree->pLoadInfo = tCreateLastBlockLoadInfo();
- }
-
- pLoadInfo = pMTree->pLoadInfo;
- } else {
- pLoadInfo = pBlockLoadInfo;
- }
+ pMTree->pLoadInfo = pBlockLoadInfo;
+ pMTree->destroyLoadInfo = destroyLoadInfo;
for (int32_t i = 0; i < pFReader->pSet->nSttF; ++i) { // open all last file
struct SLDataIter* pIter = NULL;
- code = tLDataIterOpen(&pIter, pFReader, i, pMTree->backward, suid, uid, pTimeWindow, pVerRange, &pLoadInfo[i]);
+ code = tLDataIterOpen(&pIter, pFReader, i, pMTree->backward, suid, uid, pTimeWindow, pVerRange, &pMTree->pLoadInfo[i]);
if (code != TSDB_CODE_SUCCESS) {
goto _end;
}
diff --git a/source/dnode/vnode/src/tsdb/tsdbOpen.c b/source/dnode/vnode/src/tsdb/tsdbOpen.c
index ec760e3c57..fcbcff9248 100644
--- a/source/dnode/vnode/src/tsdb/tsdbOpen.c
+++ b/source/dnode/vnode/src/tsdb/tsdbOpen.c
@@ -85,6 +85,8 @@ _err:
int tsdbClose(STsdb **pTsdb) {
if (*pTsdb) {
taosThreadRwlockDestroy(&(*pTsdb)->rwLock);
+ tsdbMemTableDestroy((*pTsdb)->mem);
+ (*pTsdb)->mem = NULL;
tsdbFSClose(*pTsdb);
tsdbCloseCache(*pTsdb);
taosMemoryFreeClear(*pTsdb);
diff --git a/source/dnode/vnode/src/tsdb/tsdbRead.c b/source/dnode/vnode/src/tsdb/tsdbRead.c
index 3d2c89ba02..c3cb5f9eb8 100644
--- a/source/dnode/vnode/src/tsdb/tsdbRead.c
+++ b/source/dnode/vnode/src/tsdb/tsdbRead.c
@@ -79,6 +79,7 @@ typedef struct SBlockLoadSuppInfo {
SColumnDataAgg tsColAgg;
SColumnDataAgg** plist;
int16_t* colIds; // column ids for loading file block data
+ int32_t numOfCols;
char** buildBuf; // build string tmp buffer, todo remove it later after all string format being updated.
} SBlockLoadSuppInfo;
@@ -203,6 +204,7 @@ static int32_t setColumnIdSlotList(STsdbReader* pReader, SSDataBlock* pBlock) {
size_t numOfCols = blockDataGetNumOfCols(pBlock);
+ pSupInfo->numOfCols = numOfCols;
pSupInfo->colIds = taosMemoryMalloc(numOfCols * sizeof(int16_t));
pSupInfo->buildBuf = taosMemoryCalloc(numOfCols, POINTER_BYTES);
if (pSupInfo->buildBuf == NULL || pSupInfo->colIds == NULL) {
@@ -352,7 +354,8 @@ static int32_t initFilesetIterator(SFilesetIter* pIter, SArray* aDFileSet, STsdb
tMergeTreeClose(&pLReader->mergeTree);
if (pLReader->pInfo == NULL) {
- pLReader->pInfo = tCreateLastBlockLoadInfo();
+ // here we ignore the first column, which is always be the primary timestamp column
+ pLReader->pInfo = tCreateLastBlockLoadInfo(pReader->pSchema, &pReader->suppInfo.colIds[1], pReader->suppInfo.numOfCols - 1);
if (pLReader->pInfo == NULL) {
tsdbDebug("init fileset iterator failed, code:%s %s", tstrerror(terrno), pReader->idStr);
return terrno;
@@ -483,7 +486,7 @@ static int32_t tsdbReaderCreate(SVnode* pVnode, SQueryTableDataCond* pCond, STsd
pReader->pTsdb = getTsdbByRetentions(pVnode, pCond->twindows.skey, pVnode->config.tsdbCfg.retentions, idstr, &level);
pReader->suid = pCond->suid;
pReader->order = pCond->order;
- pReader->capacity = 4096;
+ pReader->capacity = capacity;
pReader->idStr = (idstr != NULL) ? strdup(idstr) : NULL;
pReader->verRange = getQueryVerRange(pVnode, pCond, level);
pReader->type = pCond->type;
@@ -838,14 +841,18 @@ static int32_t copyBlockDataToSDataBlock(STsdbReader* pReader, STableBlockScanIn
bool asc = ASCENDING_TRAVERSE(pReader->order);
int32_t step = asc ? 1 : -1;
- if (asc && pReader->window.skey <= pBlock->minKey.ts) {
- pDumpInfo->rowIndex = 0;
- } else if (!asc && pReader->window.ekey >= pBlock->maxKey.ts) {
- pDumpInfo->rowIndex = pBlock->nRow - 1;
- } else {
- int32_t pos = asc ? pBlock->nRow - 1 : 0;
- int32_t order = (pReader->order == TSDB_ORDER_ASC) ? TSDB_ORDER_DESC : TSDB_ORDER_ASC;
- pDumpInfo->rowIndex = doBinarySearchKey(pBlockData->aTSKEY, pBlock->nRow, pos, pReader->window.skey, order);
+
+ if ((pDumpInfo->rowIndex == 0 && asc) || (pDumpInfo->rowIndex == pBlock->nRow - 1 && (!asc))) {
+ if (asc && pReader->window.skey <= pBlock->minKey.ts) {
+ //pDumpInfo->rowIndex = 0;
+ } else
+ if (!asc && pReader->window.ekey >= pBlock->maxKey.ts) {
+ //pDumpInfo->rowIndex = pBlock->nRow - 1;
+ } else {
+ int32_t pos = asc ? pBlock->nRow - 1 : 0;
+ int32_t order = (pReader->order == TSDB_ORDER_ASC) ? TSDB_ORDER_DESC : TSDB_ORDER_ASC;
+ pDumpInfo->rowIndex = doBinarySearchKey(pBlockData->aTSKEY, pBlock->nRow, pos, pReader->window.skey, order);
+ }
}
// time window check
@@ -929,8 +936,8 @@ static int32_t copyBlockDataToSDataBlock(STsdbReader* pReader, STableBlockScanIn
pDumpInfo->rowIndex += step * remain;
if (pDumpInfo->rowIndex >= 0 && pDumpInfo->rowIndex < pBlock->nRow) {
- int64_t ts = pBlockData->aTSKEY[pDumpInfo->rowIndex];
- setBlockAllDumped(pDumpInfo, ts, pReader->order);
+// int64_t ts = pBlockData->aTSKEY[pDumpInfo->rowIndex];
+// setBlockAllDumped(pDumpInfo, ts, pReader->order);
} else {
int64_t k = asc ? pBlock->maxKey.ts : pBlock->minKey.ts;
setBlockAllDumped(pDumpInfo, k, pReader->order);
@@ -948,15 +955,22 @@ static int32_t copyBlockDataToSDataBlock(STsdbReader* pReader, STableBlockScanIn
return TSDB_CODE_SUCCESS;
}
-static int32_t doLoadFileBlockData(STsdbReader* pReader, SDataBlockIter* pBlockIter, SBlockData* pBlockData) {
+static int32_t doLoadFileBlockData(STsdbReader* pReader, SDataBlockIter* pBlockIter, SBlockData* pBlockData, uint64_t uid) {
int64_t st = taosGetTimestampUs();
+ tBlockDataReset(pBlockData);
+ TABLEID tid = {.suid = pReader->suid, .uid = uid};
+ int32_t code = tBlockDataInit(pBlockData, &tid, pReader->pSchema, &pReader->suppInfo.colIds[1], pReader->suppInfo.numOfCols-1);
+ if (code != TSDB_CODE_SUCCESS) {
+ return code;
+ }
+
SFileDataBlockInfo* pBlockInfo = getCurrentBlockInfo(pBlockIter);
SFileBlockDumpInfo* pDumpInfo = &pReader->status.fBlockDumpInfo;
ASSERT(pBlockInfo != NULL);
SDataBlk* pBlock = getCurrentBlock(pBlockIter);
- int32_t code = tsdbReadDataBlock(pReader->pFileReader, pBlock, pBlockData);
+ code = tsdbReadDataBlock(pReader->pFileReader, pBlock, pBlockData);
if (code != TSDB_CODE_SUCCESS) {
tsdbError("%p error occurs in loading file block, global index:%d, table index:%d, brange:%" PRId64 "-%" PRId64
", rows:%d, code:%s %s",
@@ -1741,7 +1755,7 @@ static int32_t doMergeMultiLevelRows(STsdbReader* pReader, STableBlockScanInfo*
tsLast = getCurrentKeyInLastBlock(pLastBlockReader);
}
- int64_t key = hasDataInFileBlock(pBlockData, pDumpInfo)? pBlockData->aTSKEY[pDumpInfo->rowIndex]:INT64_MIN;
+ int64_t key = hasDataInFileBlock(pBlockData, pDumpInfo) ? pBlockData->aTSKEY[pDumpInfo->rowIndex] : INT64_MIN;
TSDBKEY k = TSDBROW_KEY(pRow);
TSDBKEY ik = TSDBROW_KEY(piRow);
@@ -1995,7 +2009,7 @@ static bool initLastBlockReader(SLastBlockReader* pLBlockReader, STableBlockScan
int32_t code =
tMergeTreeOpen(&pLBlockReader->mergeTree, (pLBlockReader->order == TSDB_ORDER_DESC), pReader->pFileReader,
- pReader->suid, pScanInfo->uid, &w, &pLBlockReader->verRange, pLBlockReader->pInfo, pReader->idStr);
+ pReader->suid, pScanInfo->uid, &w, &pLBlockReader->verRange, pLBlockReader->pInfo, false, pReader->idStr);
if (code != TSDB_CODE_SUCCESS) {
return false;
}
@@ -2009,12 +2023,12 @@ static int64_t getCurrentKeyInLastBlock(SLastBlockReader* pLastBlockReader) {
}
static bool hasDataInLastBlock(SLastBlockReader* pLastBlockReader) { return pLastBlockReader->mergeTree.pIter != NULL; }
-bool hasDataInFileBlock(const SBlockData* pBlockData, const SFileBlockDumpInfo* pDumpInfo) {
- if (pBlockData->nRow > 0) {
- ASSERT(pBlockData->nRow == pDumpInfo->totalRows);
+bool hasDataInFileBlock(const SBlockData* pBlockData, const SFileBlockDumpInfo* pDumpInfo) {
+ if (pBlockData->nRow > 0) {
+ ASSERT(pBlockData->nRow == pDumpInfo->totalRows);
}
- return pBlockData->nRow > 0 && (!pDumpInfo->allDumped);
+ return pBlockData->nRow > 0 && (!pDumpInfo->allDumped);
}
int32_t mergeRowsInFileBlocks(SBlockData* pBlockData, STableBlockScanInfo* pBlockScanInfo, int64_t key,
@@ -2451,13 +2465,7 @@ static int32_t doBuildDataBlock(STsdbReader* pReader) {
ASSERT(pBlockIter->numOfBlocks == 0);
code = buildComposedDataBlock(pReader);
} else if (fileBlockShouldLoad(pReader, pBlockInfo, pBlock, pScanInfo, keyInBuf, pLastBlockReader)) {
- tBlockDataReset(&pStatus->fileBlockData);
- code = tBlockDataInit(&pStatus->fileBlockData, pReader->suid, pScanInfo->uid, pReader->pSchema);
- if (code != TSDB_CODE_SUCCESS) {
- return code;
- }
-
- code = doLoadFileBlockData(pReader, pBlockIter, &pStatus->fileBlockData);
+ code = doLoadFileBlockData(pReader, pBlockIter, &pStatus->fileBlockData, pScanInfo->uid);
if (code != TSDB_CODE_SUCCESS) {
return code;
}
@@ -2931,13 +2939,7 @@ static int32_t checkForNeighborFileBlock(STsdbReader* pReader, STableBlockScanIn
setFileBlockActiveInBlockIter(pBlockIter, neighborIndex, step);
// 3. load the neighbor block, and set it to be the currently accessed file data block
- tBlockDataReset(&pStatus->fileBlockData);
- int32_t code = tBlockDataInit(&pStatus->fileBlockData, pReader->suid, pFBlock->uid, pReader->pSchema);
- if (code != TSDB_CODE_SUCCESS) {
- return code;
- }
-
- code = doLoadFileBlockData(pReader, pBlockIter, &pStatus->fileBlockData);
+ int32_t code = doLoadFileBlockData(pReader, pBlockIter, &pStatus->fileBlockData, pFBlock->uid);
if (code != TSDB_CODE_SUCCESS) {
return code;
}
@@ -3404,10 +3406,14 @@ int32_t tsdbReaderOpen(SVnode* pVnode, SQueryTableDataCond* pCond, SArray* pTabl
// we need only one row
pPrevReader->capacity = 1;
pPrevReader->status.pTableMap = pReader->status.pTableMap;
+ pPrevReader->pSchema = pReader->pSchema;
+ pPrevReader->pMemSchema = pReader->pMemSchema;
pPrevReader->pReadSnap = pReader->pReadSnap;
pNextReader->capacity = 1;
pNextReader->status.pTableMap = pReader->status.pTableMap;
+ pNextReader->pSchema = pReader->pSchema;
+ pNextReader->pMemSchema = pReader->pMemSchema;
pNextReader->pReadSnap = pReader->pReadSnap;
code = doOpenReaderImpl(pPrevReader);
@@ -3441,11 +3447,19 @@ void tsdbReaderClose(STsdbReader* pReader) {
{
if (pReader->innerReader[0] != NULL) {
- pReader->innerReader[0]->status.pTableMap = NULL;
- pReader->innerReader[0]->pReadSnap = NULL;
+ STsdbReader* p = pReader->innerReader[0];
- pReader->innerReader[1]->status.pTableMap = NULL;
- pReader->innerReader[1]->pReadSnap = NULL;
+ p->status.pTableMap = NULL;
+ p->pReadSnap = NULL;
+ p->pSchema = NULL;
+ p->pMemSchema = NULL;
+
+ p = pReader->innerReader[1];
+
+ p->status.pTableMap = NULL;
+ p->pReadSnap = NULL;
+ p->pSchema = NULL;
+ p->pMemSchema = NULL;
tsdbReaderClose(pReader->innerReader[0]);
tsdbReaderClose(pReader->innerReader[1]);
@@ -3683,14 +3697,7 @@ static SArray* doRetrieveDataBlock(STsdbReader* pReader) {
SFileDataBlockInfo* pFBlock = getCurrentBlockInfo(&pStatus->blockIter);
STableBlockScanInfo* pBlockScanInfo = taosHashGet(pStatus->pTableMap, &pFBlock->uid, sizeof(pFBlock->uid));
- tBlockDataReset(&pStatus->fileBlockData);
- int32_t code = tBlockDataInit(&pStatus->fileBlockData, pReader->suid, pBlockScanInfo->uid, pReader->pSchema);
- if (code != TSDB_CODE_SUCCESS) {
- terrno = code;
- return NULL;
- }
-
- code = doLoadFileBlockData(pReader, &pStatus->blockIter, &pStatus->fileBlockData);
+ int32_t code = doLoadFileBlockData(pReader, &pStatus->blockIter, &pStatus->fileBlockData, pBlockScanInfo->uid);
if (code != TSDB_CODE_SUCCESS) {
tBlockDataDestroy(&pStatus->fileBlockData, 1);
terrno = code;
diff --git a/source/dnode/vnode/src/tsdb/tsdbReaderWriter.c b/source/dnode/vnode/src/tsdb/tsdbReaderWriter.c
index 5fe0b408b1..fc577e3962 100644
--- a/source/dnode/vnode/src/tsdb/tsdbReaderWriter.c
+++ b/source/dnode/vnode/src/tsdb/tsdbReaderWriter.c
@@ -926,12 +926,13 @@ _err:
return code;
}
-static int32_t tsdbReadBlockDataImpl(SDataFReader *pReader, SBlockInfo *pBlkInfo, SBlockData *pBlockData) {
+static int32_t tsdbReadBlockDataImpl(SDataFReader *pReader, SBlockInfo *pBlkInfo, SBlockData *pBlockData,
+ int32_t iStt) {
int32_t code = 0;
tBlockDataClear(pBlockData);
- STsdbFD *pFD = pReader->pDataFD;
+ STsdbFD *pFD = (iStt < 0) ? pReader->pDataFD : pReader->aSttFD[iStt];
// uid + version + tskey
code = tRealloc(&pReader->aBuf[0], pBlkInfo->szKey);
@@ -1070,9 +1071,12 @@ _err:
int32_t tsdbReadDataBlock(SDataFReader *pReader, SDataBlk *pDataBlk, SBlockData *pBlockData) {
int32_t code = 0;
- code = tsdbReadBlockDataImpl(pReader, &pDataBlk->aSubBlock[0], pBlockData);
+ code = tsdbReadBlockDataImpl(pReader, &pDataBlk->aSubBlock[0], pBlockData, -1);
if (code) goto _err;
+ ASSERT(pDataBlk->nSubBlock == 1);
+
+#if 0
if (pDataBlk->nSubBlock > 1) {
SBlockData bData1;
SBlockData bData2;
@@ -1113,6 +1117,7 @@ int32_t tsdbReadDataBlock(SDataFReader *pReader, SDataBlk *pDataBlk, SBlockData
tBlockDataDestroy(&bData1, 1);
tBlockDataDestroy(&bData2, 1);
}
+#endif
return code;
@@ -1123,23 +1128,38 @@ _err:
int32_t tsdbReadSttBlock(SDataFReader *pReader, int32_t iStt, SSttBlk *pSttBlk, SBlockData *pBlockData) {
int32_t code = 0;
+ int32_t lino = 0;
+
+ code = tsdbReadBlockDataImpl(pReader, &pSttBlk->bInfo, pBlockData, iStt);
+ TSDB_CHECK_CODE(code, lino, _exit);
+
+_exit:
+ if (code) {
+ tsdbError("vgId:%d %s failed at %d since %s", TD_VID(pReader->pTsdb->pVnode), __func__, lino, tstrerror(code));
+ }
+ return code;
+}
+
+int32_t tsdbReadSttBlockEx(SDataFReader *pReader, int32_t iStt, SSttBlk *pSttBlk, SBlockData *pBlockData) {
+ int32_t code = 0;
+ int32_t lino = 0;
// alloc
code = tRealloc(&pReader->aBuf[0], pSttBlk->bInfo.szBlock);
- if (code) goto _err;
+ TSDB_CHECK_CODE(code, lino, _exit);
// read
code = tsdbReadFile(pReader->aSttFD[iStt], pSttBlk->bInfo.offset, pReader->aBuf[0], pSttBlk->bInfo.szBlock);
- if (code) goto _err;
+ TSDB_CHECK_CODE(code, lino, _exit);
// decmpr
code = tDecmprBlockData(pReader->aBuf[0], pSttBlk->bInfo.szBlock, pBlockData, &pReader->aBuf[1]);
- if (code) goto _err;
+ TSDB_CHECK_CODE(code, lino, _exit);
- return code;
-
-_err:
- tsdbError("vgId:%d tsdb read stt block failed since %s", TD_VID(pReader->pTsdb->pVnode), tstrerror(code));
+_exit:
+ if (code) {
+ tsdbError("vgId:%d %s failed at %d since %s", TD_VID(pReader->pTsdb->pVnode), __func__, lino, tstrerror(code));
+ }
return code;
}
diff --git a/source/dnode/vnode/src/tsdb/tsdbSnapshot.c b/source/dnode/vnode/src/tsdb/tsdbSnapshot.c
index 99e88a442c..a928dc3484 100644
--- a/source/dnode/vnode/src/tsdb/tsdbSnapshot.c
+++ b/source/dnode/vnode/src/tsdb/tsdbSnapshot.c
@@ -140,7 +140,7 @@ static int32_t tsdbSnapReadOpenFile(STsdbSnapReader* pReader) {
if (pSttBlk->minVer > pReader->ever) continue;
if (pSttBlk->maxVer < pReader->sver) continue;
- code = tsdbReadSttBlock(pReader->pDataFReader, iStt, pSttBlk, &pIter->bData);
+ code = tsdbReadSttBlockEx(pReader->pDataFReader, iStt, pSttBlk, &pIter->bData);
if (code) goto _err;
for (pIter->iRow = 0; pIter->iRow < pIter->bData.nRow; pIter->iRow++) {
@@ -223,7 +223,7 @@ static int32_t tsdbSnapNextRow(STsdbSnapReader* pReader) {
if (pSttBlk->minVer > pReader->ever || pSttBlk->maxVer < pReader->sver) continue;
- code = tsdbReadSttBlock(pReader->pDataFReader, pIter->iStt, pSttBlk, &pIter->bData);
+ code = tsdbReadSttBlockEx(pReader->pDataFReader, pIter->iStt, pSttBlk, &pIter->bData);
if (code) goto _err;
pIter->iRow = -1;
@@ -319,7 +319,7 @@ static int32_t tsdbSnapReadData(STsdbSnapReader* pReader, uint8_t** ppData) {
code = tsdbUpdateTableSchema(pTsdb->pVnode->pMeta, id.suid, id.uid, &pReader->skmTable);
if (code) goto _err;
- code = tBlockDataInit(pBlockData, id.suid, id.uid, pReader->skmTable.pTSchema);
+ code = tBlockDataInit(pBlockData, &id, pReader->skmTable.pTSchema, NULL, 0);
if (code) goto _err;
while (pRowInfo->suid == id.suid && pRowInfo->uid == id.uid) {
@@ -715,7 +715,7 @@ static int32_t tsdbSnapWriteTableDataStart(STsdbSnapWriter* pWriter, TABLEID* pI
if (code) goto _err;
tMapDataReset(&pWriter->dWriter.mDataBlk);
- code = tBlockDataInit(&pWriter->dWriter.bData, pId->suid, pId->uid, pWriter->skmTable.pTSchema);
+ code = tBlockDataInit(&pWriter->dWriter.bData, pId, pWriter->skmTable.pTSchema, NULL, 0);
if (code) goto _err;
return code;
@@ -1000,7 +1000,8 @@ static int32_t tsdbSnapWriteToSttFile(STsdbSnapWriter* pWriter, int32_t iRow) {
code = tsdbUpdateTableSchema(pWriter->pTsdb->pVnode->pMeta, pWriter->id.suid, pWriter->id.uid, &pWriter->skmTable);
if (code) goto _err;
- code = tBlockDataInit(pBData, pWriter->id.suid, pWriter->id.suid ? 0 : pWriter->id.uid, pWriter->skmTable.pTSchema);
+ TABLEID tid = {.suid = pWriter->id.suid, .uid = pWriter->id.suid ? 0 : pWriter->id.uid};
+ code = tBlockDataInit(pBData, &tid, pWriter->skmTable.pTSchema, NULL, 0);
if (code) goto _err;
}
diff --git a/source/dnode/vnode/src/tsdb/tsdbUtil.c b/source/dnode/vnode/src/tsdb/tsdbUtil.c
index 8026441cbc..4999e7a49a 100644
--- a/source/dnode/vnode/src/tsdb/tsdbUtil.c
+++ b/source/dnode/vnode/src/tsdb/tsdbUtil.c
@@ -948,24 +948,47 @@ void tBlockDataDestroy(SBlockData *pBlockData, int8_t deepClear) {
pBlockData->aColData = NULL;
}
-int32_t tBlockDataInit(SBlockData *pBlockData, int64_t suid, int64_t uid, STSchema *pTSchema) {
+int32_t tBlockDataInit(SBlockData *pBlockData, TABLEID *pId, STSchema *pTSchema, int16_t *aCid, int32_t nCid) {
int32_t code = 0;
- ASSERT(suid || uid);
+ ASSERT(pId->suid || pId->uid);
- pBlockData->suid = suid;
- pBlockData->uid = uid;
+ pBlockData->suid = pId->suid;
+ pBlockData->uid = pId->uid;
pBlockData->nRow = 0;
taosArrayClear(pBlockData->aIdx);
- for (int32_t iColumn = 1; iColumn < pTSchema->numOfCols; iColumn++) {
+ if (aCid) {
+ int32_t iColumn = 1;
STColumn *pTColumn = &pTSchema->columns[iColumn];
+ for (int32_t iCid = 0; iCid < nCid; iCid++) {
+ while (pTColumn && pTColumn->colId < aCid[iCid]) {
+ iColumn++;
+ pTColumn = (iColumn < pTSchema->numOfCols) ? &pTSchema->columns[iColumn] : NULL;
+ }
- SColData *pColData;
- code = tBlockDataAddColData(pBlockData, iColumn - 1, &pColData);
- if (code) goto _exit;
+ if (pTColumn == NULL) {
+ break;
+ } else if (pTColumn->colId == aCid[iCid]) {
+ SColData *pColData;
+ code = tBlockDataAddColData(pBlockData, taosArrayGetSize(pBlockData->aIdx), &pColData);
+ if (code) goto _exit;
+ tColDataInit(pColData, pTColumn->colId, pTColumn->type, (pTColumn->flags & COL_SMA_ON) ? 1 : 0);
- tColDataInit(pColData, pTColumn->colId, pTColumn->type, (pTColumn->flags & COL_SMA_ON) ? 1 : 0);
+ iColumn++;
+ pTColumn = (iColumn < pTSchema->numOfCols) ? &pTSchema->columns[iColumn] : NULL;
+ }
+ }
+ } else {
+ for (int32_t iColumn = 1; iColumn < pTSchema->numOfCols; iColumn++) {
+ STColumn *pTColumn = &pTSchema->columns[iColumn];
+
+ SColData *pColData;
+ code = tBlockDataAddColData(pBlockData, iColumn - 1, &pColData);
+ if (code) goto _exit;
+
+ tColDataInit(pColData, pTColumn->colId, pTColumn->type, (pTColumn->flags & COL_SMA_ON) ? 1 : 0);
+ }
}
_exit:
diff --git a/source/dnode/vnode/src/vnd/vnodeBufPool.c b/source/dnode/vnode/src/vnd/vnodeBufPool.c
index 5a22114ab4..6e02425b55 100644
--- a/source/dnode/vnode/src/vnd/vnodeBufPool.c
+++ b/source/dnode/vnode/src/vnd/vnodeBufPool.c
@@ -53,6 +53,10 @@ int vnodeCloseBufPool(SVnode *pVnode) {
vnodeBufPoolDestroy(pPool);
}
+ if (pVnode->inUse) {
+ vnodeBufPoolDestroy(pVnode->inUse);
+ pVnode->inUse = NULL;
+ }
vDebug("vgId:%d, vnode buffer pool is closed", TD_VID(pVnode));
return 0;
@@ -177,4 +181,4 @@ void vnodeBufPoolUnRef(SVBufPool *pPool) {
taosThreadMutexUnlock(&pVnode->mutex);
}
-}
\ No newline at end of file
+}
diff --git a/source/dnode/vnode/src/vnd/vnodeOpen.c b/source/dnode/vnode/src/vnd/vnodeOpen.c
index 4ccfea4051..b5307cecf2 100644
--- a/source/dnode/vnode/src/vnd/vnodeOpen.c
+++ b/source/dnode/vnode/src/vnd/vnodeOpen.c
@@ -161,7 +161,6 @@ SVnode *vnodeOpen(const char *path, STfs *pTfs, SMsgCb msgCb) {
// open sync
if (vnodeSyncOpen(pVnode, dir)) {
vError("vgId:%d, failed to open sync since %s", TD_VID(pVnode), tstrerror(terrno));
- terrno = TSDB_CODE_OUT_OF_MEMORY;
goto _err;
}
@@ -174,6 +173,7 @@ _err:
if (pVnode->pTsdb) tsdbClose(&pVnode->pTsdb);
if (pVnode->pSma) smaClose(pVnode->pSma);
if (pVnode->pMeta) metaClose(pVnode->pMeta);
+ if (pVnode->pPool) vnodeCloseBufPool(pVnode);
tsem_destroy(&(pVnode->canCommit));
taosMemoryFree(pVnode);
diff --git a/source/libs/executor/inc/executorimpl.h b/source/libs/executor/inc/executorimpl.h
index 12e00a0a06..a9a0267fbf 100644
--- a/source/libs/executor/inc/executorimpl.h
+++ b/source/libs/executor/inc/executorimpl.h
@@ -34,6 +34,7 @@ extern "C" {
#include "scalar.h"
#include "taosdef.h"
#include "tarray.h"
+#include "tfill.h"
#include "thash.h"
#include "tlockfree.h"
#include "tmsg.h"
@@ -798,6 +799,22 @@ typedef struct SStreamPartitionOperatorInfo {
SSDataBlock* pDelRes;
} SStreamPartitionOperatorInfo;
+typedef struct SStreamFillOperatorInfo {
+ SStreamFillSupporter* pFillSup;
+ SSDataBlock* pRes;
+ SSDataBlock* pSrcBlock;
+ int32_t srcRowIndex;
+ SSDataBlock* pPrevSrcBlock;
+ SSDataBlock* pSrcDelBlock;
+ int32_t srcDelRowIndex;
+ SSDataBlock* pDelRes;
+ SNode* pCondition;
+ SArray* pColMatchColInfo;
+ int32_t primaryTsCol;
+ int32_t primarySrcSlotId;
+ SStreamFillInfo* pFillInfo;
+} SStreamFillOperatorInfo;
+
typedef struct STimeSliceOperatorInfo {
SSDataBlock* pRes;
STimeWindow win;
@@ -1006,6 +1023,8 @@ SOperatorInfo* createStreamIntervalOperatorInfo(SOperatorInfo* downstream,
SOperatorInfo* createStreamStateAggOperatorInfo(SOperatorInfo* downstream, SPhysiNode* pPhyNode,
SExecTaskInfo* pTaskInfo);
+SOperatorInfo* createStreamFillOperatorInfo(SOperatorInfo* downstream, SStreamFillPhysiNode* pPhyFillNode,
+ SExecTaskInfo* pTaskInfo);
int32_t projectApplyFunctions(SExprInfo* pExpr, SSDataBlock* pResult, SSDataBlock* pSrcBlock, SqlFunctionCtx* pCtx,
int32_t numOfOutput, SArray* pPseudoList);
@@ -1094,6 +1113,7 @@ int32_t setOutputBuf(STimeWindow* win, SResultRow** pResult, int64_t tableGroupI
SExecTaskInfo* pTaskInfo);
int32_t releaseOutputBuf(SExecTaskInfo* pTaskInfo, SWinKey* pKey, SResultRow* pResult);
int32_t saveOutputBuf(SExecTaskInfo* pTaskInfo, SWinKey* pKey, SResultRow* pResult, int32_t resSize);
+void getNextIntervalWindow(SInterval* pInterval, STimeWindow* tw, int32_t order);
#ifdef __cplusplus
}
diff --git a/source/libs/executor/inc/tfill.h b/source/libs/executor/inc/tfill.h
index 63abfc019d..ed019be767 100644
--- a/source/libs/executor/inc/tfill.h
+++ b/source/libs/executor/inc/tfill.h
@@ -23,12 +23,13 @@ extern "C" {
#include "os.h"
#include "taosdef.h"
#include "tcommon.h"
+#include "tsimplehash.h"
struct SSDataBlock;
typedef struct SFillColInfo {
- SExprInfo *pExpr;
- bool notFillCol; // denote if this column needs fill operation
+ SExprInfo* pExpr;
+ bool notFillCol; // denote if this column needs fill operation
SVariant fillVal;
} SFillColInfo;
@@ -51,46 +52,96 @@ typedef struct {
} SRowVal;
typedef struct SFillInfo {
- TSKEY start; // start timestamp
- TSKEY end; // endKey for fill
- TSKEY currentKey; // current active timestamp, the value may be changed during the fill procedure.
- int32_t tsSlotId; // primary time stamp slot id
- int32_t srcTsSlotId; // timestamp column id in the source data block.
- int32_t order; // order [TSDB_ORDER_ASC|TSDB_ORDER_DESC]
- int32_t type; // fill type
- int32_t numOfRows; // number of rows in the input data block
- int32_t index; // active row index
- int32_t numOfTotal; // number of filled rows in one round
- int32_t numOfCurrent; // number of filled rows in current results
- int32_t numOfCols; // number of columns, including the tags columns
- SInterval interval;
- SRowVal prev;
- SRowVal next;
- SSDataBlock *pSrcBlock;
- int32_t alloc; // data buffer size in rows
+ TSKEY start; // start timestamp
+ TSKEY end; // endKey for fill
+ TSKEY currentKey; // current active timestamp, the value may be changed during the fill procedure.
+ int32_t tsSlotId; // primary time stamp slot id
+ int32_t srcTsSlotId; // timestamp column id in the source data block.
+ int32_t order; // order [TSDB_ORDER_ASC|TSDB_ORDER_DESC]
+ int32_t type; // fill type
+ int32_t numOfRows; // number of rows in the input data block
+ int32_t index; // active row index
+ int32_t numOfTotal; // number of filled rows in one round
+ int32_t numOfCurrent; // number of filled rows in current results
+ int32_t numOfCols; // number of columns, including the tags columns
+ SInterval interval;
+ SRowVal prev;
+ SRowVal next;
+ SSDataBlock* pSrcBlock;
+ int32_t alloc; // data buffer size in rows
- SFillColInfo* pFillCol; // column info for fill operations
- SFillTagColInfo* pTags; // tags value for filling gap
- const char* id;
+ SFillColInfo* pFillCol; // column info for fill operations
+ SFillTagColInfo* pTags; // tags value for filling gap
+ const char* id;
} SFillInfo;
+typedef struct SResultCellData {
+ bool isNull;
+ int8_t type;
+ int32_t bytes;
+ char pData[];
+} SResultCellData;
+
+typedef struct SResultRowData {
+ TSKEY key;
+ SResultCellData* pRowVal;
+} SResultRowData;
+
+typedef struct SStreamFillLinearInfo {
+ TSKEY nextEnd;
+ SArray* pDeltaVal; // double. value for Fill(linear).
+ SArray* pNextDeltaVal; // double. value for Fill(linear).
+ int64_t winIndex;
+ bool hasNext;
+} SStreamFillLinearInfo;
+
+typedef struct SStreamFillInfo {
+ TSKEY start; // startKey for fill
+ TSKEY end; // endKey for fill
+ TSKEY current; // current Key for fill
+ TSKEY preRowKey;
+ TSKEY nextRowKey;
+ SResultRowData* pResRow;
+ SStreamFillLinearInfo* pLinearInfo;
+ bool needFill;
+ int32_t type; // fill type
+ int32_t pos;
+ SArray* delRanges;
+ int32_t delIndex;
+} SStreamFillInfo;
+
+typedef struct SStreamFillSupporter {
+ int32_t type; // fill type
+ SInterval interval;
+ SResultRowData prev;
+ SResultRowData cur;
+ SResultRowData next;
+ SResultRowData nextNext;
+ SFillColInfo* pAllColInfo; // fill exprs and not fill exprs
+ int32_t numOfAllCols; // number of all exprs, including the tags columns
+ int32_t numOfFillCols;
+ int32_t numOfNotFillCols;
+ int32_t rowSize;
+ SSHashObj* pResMap;
+ bool hasDelete;
+} SStreamFillSupporter;
+
int64_t getNumOfResultsAfterFillGap(SFillInfo* pFillInfo, int64_t ekey, int32_t maxNumOfRows);
-
-void taosFillSetStartInfo(struct SFillInfo* pFillInfo, int32_t numOfRows, TSKEY endKey);
-void taosResetFillInfo(struct SFillInfo* pFillInfo, TSKEY startTimestamp);
-void taosFillSetInputDataBlock(struct SFillInfo* pFillInfo, const struct SSDataBlock* pInput);
-struct SFillColInfo* createFillColInfo(SExprInfo* pExpr, int32_t numOfFillExpr, SExprInfo* pNotFillExpr, int32_t numOfNotFillCols, const struct SNodeListNode* val);
-bool taosFillHasMoreResults(struct SFillInfo* pFillInfo);
+void taosFillSetStartInfo(struct SFillInfo* pFillInfo, int32_t numOfRows, TSKEY endKey);
+void taosResetFillInfo(struct SFillInfo* pFillInfo, TSKEY startTimestamp);
+void taosFillSetInputDataBlock(struct SFillInfo* pFillInfo, const struct SSDataBlock* pInput);
+struct SFillColInfo* createFillColInfo(SExprInfo* pExpr, int32_t numOfFillExpr, SExprInfo* pNotFillExpr,
+ int32_t numOfNotFillCols, const struct SNodeListNode* val);
+bool taosFillHasMoreResults(struct SFillInfo* pFillInfo);
SFillInfo* taosCreateFillInfo(TSKEY skey, int32_t numOfFillCols, int32_t numOfNotFillCols, int32_t capacity,
SInterval* pInterval, int32_t fillType, struct SFillColInfo* pCol, int32_t slotId,
int32_t order, const char* id);
-void* taosDestroyFillInfo(struct SFillInfo *pFillInfo);
+void* taosDestroyFillInfo(struct SFillInfo* pFillInfo);
int64_t taosFillResultDataBlock(struct SFillInfo* pFillInfo, SSDataBlock* p, int32_t capacity);
-int64_t getFillInfoStart(struct SFillInfo *pFillInfo);
-
+int64_t getFillInfoStart(struct SFillInfo* pFillInfo);
#ifdef __cplusplus
}
diff --git a/source/libs/executor/src/executor.c b/source/libs/executor/src/executor.c
index 373cb451f4..0fbbc25873 100644
--- a/source/libs/executor/src/executor.c
+++ b/source/libs/executor/src/executor.c
@@ -479,7 +479,7 @@ static void freeBlock(void* param) {
blockDataDestroy(pBlock);
}
-int32_t qExecTaskOpt(qTaskInfo_t tinfo, SArray* pResList, uint64_t* useconds, SLocalFetch* pLocal) {
+int32_t qExecTaskOpt(qTaskInfo_t tinfo, SArray* pResList, uint64_t* useconds, bool* hasMore, SLocalFetch* pLocal) {
SExecTaskInfo* pTaskInfo = (SExecTaskInfo*)tinfo;
int64_t threadId = taosGetSelfPthreadId();
@@ -536,6 +536,7 @@ int32_t qExecTaskOpt(qTaskInfo_t tinfo, SArray* pResList, uint64_t* useconds, SL
}
}
+ *hasMore = (pRes != NULL);
uint64_t el = (taosGetTimestampUs() - st);
pTaskInfo->cost.elapsedTime += el;
diff --git a/source/libs/executor/src/executorimpl.c b/source/libs/executor/src/executorimpl.c
index a0729bdf3b..9917791312 100644
--- a/source/libs/executor/src/executorimpl.c
+++ b/source/libs/executor/src/executorimpl.c
@@ -3742,6 +3742,8 @@ SOperatorInfo* createOperatorTree(SPhysiNode* pPhyNode, SExecTaskInfo* pTaskInfo
pOptr = createMergeJoinOperatorInfo(ops, size, (SSortMergeJoinPhysiNode*)pPhyNode, pTaskInfo);
} else if (QUERY_NODE_PHYSICAL_PLAN_FILL == type) {
pOptr = createFillOperatorInfo(ops[0], (SFillPhysiNode*)pPhyNode, pTaskInfo);
+ } else if (QUERY_NODE_PHYSICAL_PLAN_STREAM_FILL == type) {
+ pOptr = createStreamFillOperatorInfo(ops[0], (SStreamFillPhysiNode*)pPhyNode, pTaskInfo);
} else if (QUERY_NODE_PHYSICAL_PLAN_INDEF_ROWS_FUNC == type) {
pOptr = createIndefinitOutputOperatorInfo(ops[0], pPhyNode, pTaskInfo);
} else if (QUERY_NODE_PHYSICAL_PLAN_INTERP_FUNC == type) {
diff --git a/source/libs/executor/src/scanoperator.c b/source/libs/executor/src/scanoperator.c
index 6c5c33ae29..5e1ec29a75 100644
--- a/source/libs/executor/src/scanoperator.c
+++ b/source/libs/executor/src/scanoperator.c
@@ -1022,11 +1022,7 @@ static uint64_t getGroupIdByCol(SStreamScanInfo* pInfo, uint64_t uid, TSKEY ts,
return calGroupIdByData(&pInfo->partitionSup, pInfo->pPartScalarSup, pPreRes, 0);
}
-static uint64_t getGroupIdByData(SStreamScanInfo* pInfo, uint64_t uid, TSKEY ts, int64_t maxVersion) {
- if (pInfo->partitionSup.needCalc) {
- return getGroupIdByCol(pInfo, uid, ts, maxVersion);
- }
-
+static uint64_t getGroupIdByUid(SStreamScanInfo* pInfo, uint64_t uid) {
SHashObj* map = pInfo->pTableScanOp->pTaskInfo->tableqinfoList.map;
uint64_t* groupId = taosHashGet(map, &uid, sizeof(int64_t));
if (groupId) {
@@ -1035,6 +1031,14 @@ static uint64_t getGroupIdByData(SStreamScanInfo* pInfo, uint64_t uid, TSKEY ts,
return 0;
}
+static uint64_t getGroupIdByData(SStreamScanInfo* pInfo, uint64_t uid, TSKEY ts, int64_t maxVersion) {
+ if (pInfo->partitionSup.needCalc) {
+ return getGroupIdByCol(pInfo, uid, ts, maxVersion);
+ }
+
+ return getGroupIdByUid(pInfo, uid);
+}
+
static bool prepareRangeScan(SStreamScanInfo* pInfo, SSDataBlock* pBlock, int32_t* pRowIndex) {
if ((*pRowIndex) == pBlock->info.rows) {
return false;
@@ -1081,26 +1085,32 @@ static bool prepareRangeScan(SStreamScanInfo* pInfo, SSDataBlock* pBlock, int32_
return true;
}
-static STimeWindow getSlidingWindow(TSKEY* startTsCol, TSKEY* endTsCol, SInterval* pInterval,
+static STimeWindow getSlidingWindow(TSKEY* startTsCol, TSKEY* endTsCol, uint64_t* gpIdCol, SInterval* pInterval,
SDataBlockInfo* pDataBlockInfo, int32_t* pRowIndex, bool hasGroup) {
SResultRowInfo dumyInfo;
dumyInfo.cur.pageId = -1;
STimeWindow win = getActiveTimeWindow(NULL, &dumyInfo, startTsCol[*pRowIndex], pInterval, TSDB_ORDER_ASC);
STimeWindow endWin = win;
STimeWindow preWin = win;
+ uint64_t groupId = gpIdCol[*pRowIndex];
while (1) {
if (hasGroup) {
(*pRowIndex) += 1;
} else {
- (*pRowIndex) += getNumOfRowsInTimeWindow(pDataBlockInfo, startTsCol, *pRowIndex, endWin.ekey, binarySearchForKey,
- NULL, TSDB_ORDER_ASC);
+ while ((groupId == gpIdCol[(*pRowIndex)] && startTsCol[*pRowIndex] < endWin.ekey)) {
+ (*pRowIndex) += 1;
+ if ((*pRowIndex) == pDataBlockInfo->rows) {
+ break;
+ }
+ }
}
+
do {
preWin = endWin;
getNextTimeWindow(pInterval, &endWin, TSDB_ORDER_ASC);
} while (endTsCol[(*pRowIndex) - 1] >= endWin.skey);
endWin = preWin;
- if (win.ekey == endWin.ekey || (*pRowIndex) == pDataBlockInfo->rows) {
+ if (win.ekey == endWin.ekey || (*pRowIndex) == pDataBlockInfo->rows || groupId != gpIdCol[*pRowIndex]) {
win.ekey = endWin.ekey;
return win;
}
@@ -1235,11 +1245,13 @@ static int32_t generateIntervalScanRange(SStreamScanInfo* pInfo, SSDataBlock* pS
int64_t version = pSrcBlock->info.version - 1;
for (int32_t i = 0; i < rows;) {
uint64_t srcUid = srcUidData[i];
- uint64_t groupId = getGroupIdByData(pInfo, srcUid, srcStartTsCol[i], version);
- uint64_t srcGpId = srcGp[i];
- TSKEY calStartTs = srcStartTsCol[i];
+ uint64_t groupId = srcGp[i];
+ if (groupId == 0) {
+ groupId = getGroupIdByData(pInfo, srcUid, srcStartTsCol[i], version);
+ }
+ TSKEY calStartTs = srcStartTsCol[i];
colDataAppend(pCalStartTsCol, pDestBlock->info.rows, (const char*)(&calStartTs), false);
- STimeWindow win = getSlidingWindow(srcStartTsCol, srcEndTsCol, &pInfo->interval, &pSrcBlock->info, &i,
+ STimeWindow win = getSlidingWindow(srcStartTsCol, srcEndTsCol, srcGp, &pInfo->interval, &pSrcBlock->info, &i,
pInfo->partitionSup.needCalc);
TSKEY calEndTs = srcStartTsCol[i - 1];
colDataAppend(pCalEndTsCol, pDestBlock->info.rows, (const char*)(&calEndTs), false);
@@ -1248,15 +1260,6 @@ static int32_t generateIntervalScanRange(SStreamScanInfo* pInfo, SSDataBlock* pS
colDataAppend(pEndTsCol, pDestBlock->info.rows, (const char*)(&win.ekey), false);
colDataAppend(pGpCol, pDestBlock->info.rows, (const char*)(&groupId), false);
pDestBlock->info.rows++;
- if (pInfo->partitionSup.needCalc && srcGpId != 0 && groupId != srcGpId) {
- colDataAppend(pCalStartTsCol, pDestBlock->info.rows, (const char*)(&calStartTs), false);
- colDataAppend(pCalEndTsCol, pDestBlock->info.rows, (const char*)(&calEndTs), false);
- colDataAppend(pDeUidCol, pDestBlock->info.rows, (const char*)(&srcUid), false);
- colDataAppend(pStartTsCol, pDestBlock->info.rows, (const char*)(&win.skey), false);
- colDataAppend(pEndTsCol, pDestBlock->info.rows, (const char*)(&win.ekey), false);
- colDataAppend(pGpCol, pDestBlock->info.rows, (const char*)(&srcGpId), false);
- pDestBlock->info.rows++;
- }
}
return TSDB_CODE_SUCCESS;
}
@@ -1331,7 +1334,7 @@ void appendOneRow(SSDataBlock* pBlock, TSKEY* pStartTs, TSKEY* pEndTs, uint64_t*
static void checkUpdateData(SStreamScanInfo* pInfo, bool invertible, SSDataBlock* pBlock, bool out) {
if (out) {
blockDataCleanup(pInfo->pUpdateDataRes);
- blockDataEnsureCapacity(pInfo->pUpdateDataRes, pBlock->info.rows);
+ blockDataEnsureCapacity(pInfo->pUpdateDataRes, pBlock->info.rows * 2);
}
SColumnInfoData* pColDataInfo = taosArrayGet(pBlock->pDataBlock, pInfo->primaryTsIndex);
ASSERT(pColDataInfo->info.type == TSDB_DATA_TYPE_TIMESTAMP);
@@ -1352,10 +1355,12 @@ static void checkUpdateData(SStreamScanInfo* pInfo, bool invertible, SSDataBlock
isDeletedStreamWindow(&win, pBlock->info.groupId, pInfo->pTableScanOp, &pInfo->twAggSup);
if ((update || closedWin) && out) {
qDebug("stream update check not pass, update %d, closedWin %d", update, closedWin);
- uint64_t gpId = closedWin && pInfo->partitionSup.needCalc
- ? calGroupIdByData(&pInfo->partitionSup, pInfo->pPartScalarSup, pBlock, rowId)
- : 0;
+ uint64_t gpId = 0;
appendOneRow(pInfo->pUpdateDataRes, tsCol + rowId, tsCol + rowId, &pBlock->info.uid, &gpId);
+ if (closedWin && pInfo->partitionSup.needCalc) {
+ gpId = calGroupIdByData(&pInfo->partitionSup, pInfo->pPartScalarSup, pBlock, rowId);
+ appendOneRow(pInfo->pUpdateDataRes, tsCol + rowId, tsCol + rowId, &pBlock->info.uid, &gpId);
+ }
}
}
if (out && pInfo->pUpdateDataRes->info.rows > 0) {
@@ -1532,6 +1537,30 @@ static int32_t filterDelBlockByUid(SSDataBlock* pDst, const SSDataBlock* pSrc, S
return 0;
}
+// for partition by tag
+static void setBlockGroupIdByUid(SStreamScanInfo* pInfo, SSDataBlock* pBlock) {
+ SColumnInfoData* pStartTsCol = taosArrayGet(pBlock->pDataBlock, START_TS_COLUMN_INDEX);
+ TSKEY* startTsCol = (TSKEY*)pStartTsCol->pData;
+ SColumnInfoData* pGpCol = taosArrayGet(pBlock->pDataBlock, GROUPID_COLUMN_INDEX);
+ uint64_t* gpCol = (uint64_t*)pGpCol->pData;
+ SColumnInfoData* pUidCol = taosArrayGet(pBlock->pDataBlock, UID_COLUMN_INDEX);
+ uint64_t* uidCol = (uint64_t*)pUidCol->pData;
+ int32_t rows = pBlock->info.rows;
+ if (!pInfo->partitionSup.needCalc) {
+ for (int32_t i = 0; i < rows; i++) {
+ uint64_t groupId = getGroupIdByUid(pInfo, uidCol[i]);
+ colDataAppend(pGpCol, i, (const char*)&groupId, false);
+ }
+ } else {
+ // SSDataBlock* pPreRes = readPreVersionData(pInfo->pTableScanOp, uidCol[i], startTsCol, ts, maxVersion);
+ // if (!pPreRes || pPreRes->info.rows == 0) {
+ // return 0;
+ // }
+ // ASSERT(pPreRes->info.rows == 1);
+ // return calGroupIdByData(&pInfo->partitionSup, pInfo->pPartScalarSup, pPreRes, 0);
+ }
+}
+
static SSDataBlock* doStreamScan(SOperatorInfo* pOperator) {
// NOTE: this operator does never check if current status is done or not
SExecTaskInfo* pTaskInfo = pOperator->pTaskInfo;
@@ -1628,7 +1657,8 @@ FETCH_NEXT_BLOCK:
} else {
pDelBlock = pBlock;
}
- printDataBlock(pBlock, "stream scan delete recv filtered");
+ setBlockGroupIdByUid(pInfo, pDelBlock);
+ printDataBlock(pDelBlock, "stream scan delete recv filtered");
if (!isIntervalWindow(pInfo) && !isSessionWindow(pInfo) && !isStateWindow(pInfo)) {
generateDeleteResultBlock(pInfo, pDelBlock, pInfo->pDeleteDataRes);
pInfo->pDeleteDataRes->info.type = STREAM_DELETE_RESULT;
diff --git a/source/libs/executor/src/tfill.c b/source/libs/executor/src/tfill.c
index f23552c5a7..ea0d26f4de 100644
--- a/source/libs/executor/src/tfill.c
+++ b/source/libs/executor/src/tfill.c
@@ -19,6 +19,7 @@
#include "tmsg.h"
#include "ttypes.h"
+#include "executorimpl.h"
#include "tcommon.h"
#include "thash.h"
#include "ttime.h"
@@ -35,18 +36,30 @@
#define GET_DEST_SLOT_ID(_p) ((_p)->pExpr->base.resSchema.slotId)
+#define FILL_POS_INVALID 0
+#define FILL_POS_START 1
+#define FILL_POS_MID 2
+#define FILL_POS_END 3
+
+typedef struct STimeRange {
+ TSKEY skey;
+ TSKEY ekey;
+ uint64_t groupId;
+} STimeRange;
+
static void doSetVal(SColumnInfoData* pDstColInfoData, int32_t rowIndex, const SGroupKeys* pKey);
-static bool fillIfWindowPseudoColumn(SFillInfo* pFillInfo, SFillColInfo* pCol, SColumnInfoData* pDstColInfoData, int32_t rowIndex);
+static bool fillIfWindowPseudoColumn(SFillInfo* pFillInfo, SFillColInfo* pCol, SColumnInfoData* pDstColInfoData,
+ int32_t rowIndex);
static void setNullRow(SSDataBlock* pBlock, SFillInfo* pFillInfo, int32_t rowIndex) {
- for(int32_t i = 0; i < pFillInfo->numOfCols; ++i) {
- SFillColInfo* pCol = &pFillInfo->pFillCol[i];
- int32_t dstSlotId = GET_DEST_SLOT_ID(pCol);
+ for (int32_t i = 0; i < pFillInfo->numOfCols; ++i) {
+ SFillColInfo* pCol = &pFillInfo->pFillCol[i];
+ int32_t dstSlotId = GET_DEST_SLOT_ID(pCol);
SColumnInfoData* pDstColInfo = taosArrayGet(pBlock->pDataBlock, dstSlotId);
if (pCol->notFillCol) {
bool filled = fillIfWindowPseudoColumn(pFillInfo, pCol, pDstColInfo, rowIndex);
if (!filled) {
- SArray* p = FILL_IS_ASC_FILL(pFillInfo) ? pFillInfo->prev.pRowVal : pFillInfo->next.pRowVal;
+ SArray* p = FILL_IS_ASC_FILL(pFillInfo) ? pFillInfo->prev.pRowVal : pFillInfo->next.pRowVal;
SGroupKeys* pKey = taosArrayGet(p, i);
doSetVal(pDstColInfo, rowIndex, pKey);
}
@@ -76,8 +89,9 @@ static void doSetUserSpecifiedValue(SColumnInfoData* pDst, SVariant* pVar, int32
}
}
-//fill windows pseudo column, _wstart, _wend, _wduration and return true, otherwise return false
-static bool fillIfWindowPseudoColumn(SFillInfo* pFillInfo, SFillColInfo* pCol, SColumnInfoData* pDstColInfoData, int32_t rowIndex) {
+// fill windows pseudo column, _wstart, _wend, _wduration and return true, otherwise return false
+static bool fillIfWindowPseudoColumn(SFillInfo* pFillInfo, SFillColInfo* pCol, SColumnInfoData* pDstColInfoData,
+ int32_t rowIndex) {
if (!pCol->notFillCol) {
return false;
}
@@ -89,15 +103,15 @@ static bool fillIfWindowPseudoColumn(SFillInfo* pFillInfo, SFillColInfo* pCol, S
colDataAppend(pDstColInfoData, rowIndex, (const char*)&pFillInfo->currentKey, false);
return true;
} else if (pCol->pExpr->base.pParam[0].pCol->colType == COLUMN_TYPE_WINDOW_END) {
- //TODO: include endpoint
+ // TODO: include endpoint
SInterval* pInterval = &pFillInfo->interval;
- int32_t step = (pFillInfo->order == TSDB_ORDER_ASC) ? 1 : -1;
- int64_t windowEnd =
+ int32_t step = (pFillInfo->order == TSDB_ORDER_ASC) ? 1 : -1;
+ int64_t windowEnd =
taosTimeAdd(pFillInfo->currentKey, pInterval->sliding * step, pInterval->slidingUnit, pInterval->precision);
colDataAppend(pDstColInfoData, rowIndex, (const char*)&windowEnd, false);
return true;
} else if (pCol->pExpr->base.pParam[0].pCol->colType == COLUMN_TYPE_WINDOW_DURATION) {
- //TODO: include endpoint
+ // TODO: include endpoint
colDataAppend(pDstColInfoData, rowIndex, (const char*)&pFillInfo->interval.sliding, false);
return true;
}
@@ -115,13 +129,13 @@ static void doFillOneRow(SFillInfo* pFillInfo, SSDataBlock* pBlock, SSDataBlock*
// set the other values
if (pFillInfo->type == TSDB_FILL_PREV) {
- SArray* p = FILL_IS_ASC_FILL(pFillInfo)? pFillInfo->prev.pRowVal : pFillInfo->next.pRowVal;
+ SArray* p = FILL_IS_ASC_FILL(pFillInfo) ? pFillInfo->prev.pRowVal : pFillInfo->next.pRowVal;
for (int32_t i = 0; i < pFillInfo->numOfCols; ++i) {
SFillColInfo* pCol = &pFillInfo->pFillCol[i];
SColumnInfoData* pDstColInfoData = taosArrayGet(pBlock->pDataBlock, GET_DEST_SLOT_ID(pCol));
- bool filled = fillIfWindowPseudoColumn(pFillInfo, pCol, pDstColInfoData, index);
+ bool filled = fillIfWindowPseudoColumn(pFillInfo, pCol, pDstColInfoData, index);
if (!filled) {
SGroupKeys* pKey = taosArrayGet(p, i);
doSetVal(pDstColInfoData, index, pKey);
@@ -131,9 +145,9 @@ static void doFillOneRow(SFillInfo* pFillInfo, SSDataBlock* pBlock, SSDataBlock*
SArray* p = FILL_IS_ASC_FILL(pFillInfo) ? pFillInfo->next.pRowVal : pFillInfo->prev.pRowVal;
// todo refactor: start from 0 not 1
for (int32_t i = 0; i < pFillInfo->numOfCols; ++i) {
- SFillColInfo* pCol = &pFillInfo->pFillCol[i];
+ SFillColInfo* pCol = &pFillInfo->pFillCol[i];
SColumnInfoData* pDstColInfoData = taosArrayGet(pBlock->pDataBlock, GET_DEST_SLOT_ID(pCol));
- bool filled = fillIfWindowPseudoColumn(pFillInfo, pCol, pDstColInfoData, index);
+ bool filled = fillIfWindowPseudoColumn(pFillInfo, pCol, pDstColInfoData, index);
if (!filled) {
SGroupKeys* pKey = taosArrayGet(p, i);
doSetVal(pDstColInfoData, index, pKey);
@@ -154,7 +168,7 @@ static void doFillOneRow(SFillInfo* pFillInfo, SSDataBlock* pBlock, SSDataBlock*
if (pCol->notFillCol) {
bool filled = fillIfWindowPseudoColumn(pFillInfo, pCol, pDstCol, index);
if (!filled) {
- SArray* p = FILL_IS_ASC_FILL(pFillInfo) ? pFillInfo->prev.pRowVal : pFillInfo->next.pRowVal;
+ SArray* p = FILL_IS_ASC_FILL(pFillInfo) ? pFillInfo->prev.pRowVal : pFillInfo->next.pRowVal;
SGroupKeys* pKey = taosArrayGet(p, i);
doSetVal(pDstCol, index, pKey);
}
@@ -190,13 +204,13 @@ static void doFillOneRow(SFillInfo* pFillInfo, SSDataBlock* pBlock, SSDataBlock*
for (int32_t i = 0; i < pFillInfo->numOfCols; ++i) {
SFillColInfo* pCol = &pFillInfo->pFillCol[i];
- int32_t slotId = GET_DEST_SLOT_ID(pCol);
+ int32_t slotId = GET_DEST_SLOT_ID(pCol);
SColumnInfoData* pDst = taosArrayGet(pBlock->pDataBlock, slotId);
if (pCol->notFillCol) {
bool filled = fillIfWindowPseudoColumn(pFillInfo, pCol, pDst, index);
if (!filled) {
- SArray* p = FILL_IS_ASC_FILL(pFillInfo) ? pFillInfo->prev.pRowVal : pFillInfo->next.pRowVal;
+ SArray* p = FILL_IS_ASC_FILL(pFillInfo) ? pFillInfo->prev.pRowVal : pFillInfo->next.pRowVal;
SGroupKeys* pKey = taosArrayGet(p, i);
doSetVal(pDst, index, pKey);
}
@@ -261,8 +275,8 @@ static void copyCurrentRowIntoBuf(SFillInfo* pFillInfo, int32_t rowIndex, SArray
} else if (type == QUERY_NODE_OPERATOR) {
SColumnInfoData* pSrcCol = taosArrayGet(pFillInfo->pSrcBlock->pDataBlock, i);
- bool isNull = colDataIsNull_s(pSrcCol, rowIndex);
- char* p = colDataGetData(pSrcCol, rowIndex);
+ bool isNull = colDataIsNull_s(pSrcCol, rowIndex);
+ char* p = colDataGetData(pSrcCol, rowIndex);
saveColData(pRow, i, p, isNull);
} else {
ASSERT(0);
@@ -425,9 +439,9 @@ struct SFillInfo* taosCreateFillInfo(TSKEY skey, int32_t numOfFillCols, int32_t
pFillInfo->order = order;
pFillInfo->srcTsSlotId = primaryTsSlotId;
- for(int32_t i = 0; i < numOfNotFillCols; ++i) {
+ for (int32_t i = 0; i < numOfNotFillCols; ++i) {
SFillColInfo* p = &pCol[i + numOfFillCols];
- int32_t srcSlotId = GET_DEST_SLOT_ID(p);
+ int32_t srcSlotId = GET_DEST_SLOT_ID(p);
if (srcSlotId == primaryTsSlotId) {
pFillInfo->tsSlotId = i + numOfFillCols;
break;
@@ -499,9 +513,9 @@ void* taosDestroyFillInfo(SFillInfo* pFillInfo) {
}
taosArrayDestroy(pFillInfo->next.pRowVal);
-// for (int32_t i = 0; i < pFillInfo->numOfTags; ++i) {
-// taosMemoryFreeClear(pFillInfo->pTags[i].tagVal);
-// }
+ // for (int32_t i = 0; i < pFillInfo->numOfTags; ++i) {
+ // taosMemoryFreeClear(pFillInfo->pTags[i].tagVal);
+ // }
taosMemoryFreeClear(pFillInfo->pTags);
taosMemoryFreeClear(pFillInfo->pFillCol);
@@ -640,7 +654,7 @@ SFillColInfo* createFillColInfo(SExprInfo* pExpr, int32_t numOfFillExpr, SExprIn
}
}
- for(int32_t i = 0; i < numOfNotFillExpr; ++i) {
+ for (int32_t i = 0; i < numOfNotFillExpr; ++i) {
SExprInfo* pExprInfo = &pNotFillExpr[i];
pFillCol[i + numOfFillExpr].pExpr = pExprInfo;
pFillCol[i + numOfFillExpr].notFillCol = true;
@@ -648,3 +662,1050 @@ SFillColInfo* createFillColInfo(SExprInfo* pExpr, int32_t numOfFillExpr, SExprIn
return pFillCol;
}
+
+TSKEY getNextWindowTs(TSKEY ts, SInterval* pInterval) {
+ STimeWindow win = {.skey = ts, .ekey = ts};
+ getNextIntervalWindow(pInterval, &win, TSDB_ORDER_ASC);
+ return win.skey;
+}
+
+TSKEY getPrevWindowTs(TSKEY ts, SInterval* pInterval) {
+ STimeWindow win = {.skey = ts, .ekey = ts};
+ getNextIntervalWindow(pInterval, &win, TSDB_ORDER_DESC);
+ return win.skey;
+}
+
+void setRowCell(SColumnInfoData* pCol, int32_t rowId, const SResultCellData* pCell) {
+ colDataAppend(pCol, rowId, pCell->pData, pCell->isNull);
+}
+
+SResultCellData* getResultCell(SResultRowData* pRaw, int32_t index) {
+ if (!pRaw || !pRaw->pRowVal) {
+ return NULL;
+ }
+ char* pData = (char*)pRaw->pRowVal;
+ SResultCellData* pCell = pRaw->pRowVal;
+ for (int32_t i = 0; i < index; i++) {
+ pData += (pCell->bytes + sizeof(SResultCellData));
+ pCell = (SResultCellData*)pData;
+ }
+ return pCell;
+}
+
+void* destroyFillColumnInfo(SFillColInfo* pFillCol, int32_t start, int32_t end) {
+ for (int32_t i = start; i < end; i++) {
+ destroyExprInfo(pFillCol[i].pExpr, 1);
+ taosMemoryFreeClear(pFillCol[i].pExpr);
+ taosVariantDestroy(&pFillCol[i].fillVal);
+ }
+ taosMemoryFree(pFillCol);
+ return NULL;
+}
+
+void* destroyStreamFillSupporter(SStreamFillSupporter* pFillSup) {
+ pFillSup->pAllColInfo = destroyFillColumnInfo(pFillSup->pAllColInfo, pFillSup->numOfFillCols, pFillSup->numOfAllCols);
+ tSimpleHashCleanup(pFillSup->pResMap);
+ pFillSup->pResMap = NULL;
+ taosMemoryFree(pFillSup);
+ return NULL;
+}
+
+void* destroyStreamFillLinearInfo(SStreamFillLinearInfo* pFillLinear) {
+ taosArrayDestroy(pFillLinear->pDeltaVal);
+ taosArrayDestroy(pFillLinear->pNextDeltaVal);
+ taosMemoryFree(pFillLinear);
+ return NULL;
+}
+void* destroyStreamFillInfo(SStreamFillInfo* pFillInfo) {
+ if (pFillInfo->type == TSDB_FILL_SET_VALUE || pFillInfo->type == TSDB_FILL_NULL) {
+ taosMemoryFreeClear(pFillInfo->pResRow->pRowVal);
+ taosMemoryFreeClear(pFillInfo->pResRow);
+ }
+ pFillInfo->pLinearInfo = destroyStreamFillLinearInfo(pFillInfo->pLinearInfo);
+ taosMemoryFree(pFillInfo);
+ return NULL;
+}
+
+void destroyStreamFillOperatorInfo(void* param) {
+ SStreamFillOperatorInfo* pInfo = (SStreamFillOperatorInfo*)param;
+ pInfo->pFillInfo = destroyStreamFillInfo(pInfo->pFillInfo);
+ pInfo->pFillSup = destroyStreamFillSupporter(pInfo->pFillSup);
+ pInfo->pRes = blockDataDestroy(pInfo->pRes);
+ pInfo->pSrcBlock = blockDataDestroy(pInfo->pSrcBlock);
+ pInfo->pColMatchColInfo = taosArrayDestroy(pInfo->pColMatchColInfo);
+ taosMemoryFree(pInfo);
+}
+
+static void resetFillWindow(SResultRowData* pRowData) {
+ pRowData->key = INT64_MIN;
+ pRowData->pRowVal = NULL;
+}
+
+void resetPrevAndNextWindow(SStreamFillSupporter* pFillSup, SStreamState* pState) {
+ resetFillWindow(&pFillSup->prev);
+ resetFillWindow(&pFillSup->cur);
+ resetFillWindow(&pFillSup->next);
+ resetFillWindow(&pFillSup->nextNext);
+}
+
+void getCurWindowFromDiscBuf(SOperatorInfo* pOperator, TSKEY ts, uint64_t groupId, SStreamFillSupporter* pFillSup) {
+ SStreamState* pState = pOperator->pTaskInfo->streamInfo.pState;
+ resetPrevAndNextWindow(pFillSup, pState);
+
+ SWinKey key = {.ts = ts, .groupId = groupId};
+ void* curVal = NULL;
+ int32_t curVLen = 0;
+ int32_t code = streamStateFillGet(pState, &key, (void**)&curVal, &curVLen);
+ ASSERT(code == TSDB_CODE_SUCCESS);
+ pFillSup->cur.key = key.ts;
+ pFillSup->cur.pRowVal = curVal;
+}
+
+void getWindowFromDiscBuf(SOperatorInfo* pOperator, TSKEY ts, uint64_t groupId, SStreamFillSupporter* pFillSup) {
+ SStreamState* pState = pOperator->pTaskInfo->streamInfo.pState;
+ resetPrevAndNextWindow(pFillSup, pState);
+
+ SWinKey key = {.ts = ts, .groupId = groupId};
+ void* curVal = NULL;
+ int32_t curVLen = 0;
+ int32_t code = streamStateFillGet(pState, &key, (void**)&curVal, &curVLen);
+ ASSERT(code == TSDB_CODE_SUCCESS);
+ pFillSup->cur.key = key.ts;
+ pFillSup->cur.pRowVal = curVal;
+
+ SStreamStateCur* pCur = streamStateFillSeekKeyPrev(pState, &key);
+ SWinKey preKey = {.groupId = groupId};
+ void* preVal = NULL;
+ int32_t preVLen = 0;
+ if (pCur) {
+ code = streamStateGetGroupKVByCur(pCur, &preKey, (const void**)&preVal, &preVLen);
+ }
+
+ if (pCur && code == TSDB_CODE_SUCCESS) {
+ pFillSup->prev.key = preKey.ts;
+ pFillSup->prev.pRowVal = preVal;
+
+ code = streamStateCurNext(pState, pCur);
+ ASSERT(code == TSDB_CODE_SUCCESS);
+
+ code = streamStateCurNext(pState, pCur);
+ if (code != TSDB_CODE_SUCCESS) {
+ pCur = NULL;
+ }
+ } else {
+ pCur = streamStateFillSeekKeyNext(pState, &key);
+ }
+
+ if (pCur) {
+ SWinKey nextKey = {.groupId = groupId};
+ void* nextVal = NULL;
+ int32_t nextVLen = 0;
+ code = streamStateGetGroupKVByCur(pCur, &nextKey, (const void**)&nextVal, &nextVLen);
+ if (code == TSDB_CODE_SUCCESS) {
+ pFillSup->next.key = nextKey.ts;
+ pFillSup->next.pRowVal = nextVal;
+ if (pFillSup->type == TSDB_FILL_PREV || pFillSup->type == TSDB_FILL_NEXT) {
+ code = streamStateCurNext(pState, pCur);
+ if (code == TSDB_CODE_SUCCESS) {
+ SWinKey nextNextKey = {.groupId = groupId};
+ void* nextNextVal = NULL;
+ int32_t nextNextVLen = 0;
+ code = streamStateGetGroupKVByCur(pCur, &nextNextKey, (const void**)&nextNextVal, &nextNextVLen);
+ if (code == TSDB_CODE_SUCCESS) {
+ pFillSup->nextNext.key = nextNextKey.ts;
+ pFillSup->nextNext.pRowVal = nextNextVal;
+ }
+ }
+ }
+ }
+ }
+}
+
+static bool hasPrevWindow(SStreamFillSupporter* pFillSup) { return pFillSup->prev.key != INT64_MIN; }
+static bool hasNextWindow(SStreamFillSupporter* pFillSup) { return pFillSup->next.key != INT64_MIN; }
+static bool hasNextNextWindow(SStreamFillSupporter* pFillSup) {
+ return pFillSup->nextNext.key != INT64_MIN;
+ return false;
+}
+
+static void transBlockToResultRow(const SSDataBlock* pBlock, int32_t rowId, TSKEY ts, SResultRowData* pRowVal) {
+ int32_t numOfCols = taosArrayGetSize(pBlock->pDataBlock);
+ for (int32_t i = 0; i < numOfCols; ++i) {
+ SColumnInfoData* pColData = taosArrayGet(pBlock->pDataBlock, i);
+ SResultCellData* pCell = getResultCell(pRowVal, i);
+ if (!colDataIsNull_s(pColData, rowId)) {
+ pCell->isNull = false;
+ pCell->type = pColData->info.type;
+ pCell->bytes = pColData->info.bytes;
+ char* val = colDataGetData(pColData, rowId);
+ if (IS_VAR_DATA_TYPE(pCell->type)) {
+ memcpy(pCell->pData, val, varDataTLen(val));
+ } else {
+ memcpy(pCell->pData, val, pCell->bytes);
+ }
+ } else {
+ pCell->isNull = true;
+ }
+ }
+ pRowVal->key = ts;
+}
+
+static void calcDeltaData(SSDataBlock* pBlock, int32_t rowId, SResultRowData* pRowVal, SArray* pDelta,
+ SFillColInfo* pFillCol, int32_t numOfCol, int32_t winCount, int32_t order) {
+ for (int32_t i = 0; i < numOfCol; i++) {
+ if (!pFillCol[i].notFillCol) {
+ int32_t slotId = GET_DEST_SLOT_ID(pFillCol + i);
+ SColumnInfoData* pCol = taosArrayGet(pBlock->pDataBlock, slotId);
+ char* var = colDataGetData(pCol, rowId);
+ double start = 0;
+ GET_TYPED_DATA(start, double, pCol->info.type, var);
+ SResultCellData* pCell = getResultCell(pRowVal, slotId);
+ double end = 0;
+ GET_TYPED_DATA(end, double, pCell->type, pCell->pData);
+ double delta = 0;
+ if (order == TSDB_ORDER_ASC) {
+ delta = (end - start) / winCount;
+ } else {
+ delta = (start - end) / winCount;
+ }
+ taosArraySet(pDelta, slotId, &delta);
+ }
+ }
+}
+
+static void calcRowDeltaData(SResultRowData* pStartRow, SResultRowData* pEndRow, SArray* pDelta, SFillColInfo* pFillCol,
+ int32_t numOfCol, int32_t winCount) {
+ for (int32_t i = 0; i < numOfCol; i++) {
+ if (!pFillCol[i].notFillCol) {
+ int32_t slotId = GET_DEST_SLOT_ID(pFillCol + i);
+ SResultCellData* pSCell = getResultCell(pStartRow, slotId);
+ double start = 0.0;
+ GET_TYPED_DATA(start, double, pSCell->type, pSCell->pData);
+ SResultCellData* pECell = getResultCell(pEndRow, slotId);
+ double end = 0.0;
+ GET_TYPED_DATA(end, double, pECell->type, pECell->pData);
+ double delta = (end - start) / winCount;
+ taosArraySet(pDelta, slotId, &delta);
+ }
+ }
+}
+
+static void setFillInfoStart(TSKEY ts, SInterval* pInterval, SStreamFillInfo* pFillInfo) {
+ ts = taosTimeAdd(ts, pInterval->sliding, pInterval->slidingUnit, pInterval->precision);
+ pFillInfo->start = ts;
+}
+
+static void setFillInfoEnd(TSKEY ts, SInterval* pInterval, SStreamFillInfo* pFillInfo) {
+ ts = taosTimeAdd(ts, pInterval->sliding * -1, pInterval->slidingUnit, pInterval->precision);
+ pFillInfo->end = ts;
+}
+
+static void setFillKeyInfo(TSKEY start, TSKEY end, SInterval* pInterval, SStreamFillInfo* pFillInfo) {
+ setFillInfoStart(start, pInterval, pFillInfo);
+ pFillInfo->current = pFillInfo->start;
+ setFillInfoEnd(end, pInterval, pFillInfo);
+}
+
+void setDeleteFillValueInfo(TSKEY start, TSKEY end, SStreamFillSupporter* pFillSup, SStreamFillInfo* pFillInfo) {
+ if (!hasPrevWindow(pFillSup) || !hasNextWindow(pFillSup)) {
+ pFillInfo->needFill = false;
+ return;
+ }
+
+ pFillInfo->needFill = true;
+ pFillInfo->start = start;
+ pFillInfo->current = pFillInfo->start;
+ pFillInfo->end = end;
+ pFillInfo->pos = FILL_POS_INVALID;
+ switch (pFillInfo->type) {
+ case TSDB_FILL_NULL:
+ case TSDB_FILL_SET_VALUE:
+ break;
+ case TSDB_FILL_PREV:
+ pFillInfo->pResRow = &pFillSup->prev;
+ break;
+ case TSDB_FILL_NEXT:
+ pFillInfo->pResRow = &pFillSup->next;
+ break;
+ case TSDB_FILL_LINEAR: {
+ setFillKeyInfo(pFillSup->prev.key, pFillSup->next.key, &pFillSup->interval, pFillInfo);
+ pFillInfo->pLinearInfo->hasNext = false;
+ pFillInfo->pLinearInfo->nextEnd = INT64_MIN;
+ int32_t numOfWins = taosTimeCountInterval(pFillSup->prev.key, pFillSup->next.key, pFillSup->interval.sliding,
+ pFillSup->interval.slidingUnit, pFillSup->interval.precision);
+ calcRowDeltaData(&pFillSup->prev, &pFillSup->next, pFillInfo->pLinearInfo->pDeltaVal, pFillSup->pAllColInfo,
+ pFillSup->numOfAllCols, numOfWins);
+ pFillInfo->pResRow = &pFillSup->prev;
+ pFillInfo->pLinearInfo->winIndex = 0;
+ } break;
+ default:
+ ASSERT(0);
+ break;
+ }
+}
+
+void setFillValueInfo(SSDataBlock* pBlock, TSKEY ts, int32_t rowId, SStreamFillSupporter* pFillSup,
+ SStreamFillInfo* pFillInfo) {
+ pFillInfo->preRowKey = pFillSup->cur.key;
+ if (!hasPrevWindow(pFillSup) && !hasNextWindow(pFillSup)) {
+ pFillInfo->needFill = false;
+ pFillInfo->pos = FILL_POS_START;
+ return;
+ }
+ TSKEY prevWKey = INT64_MIN;
+ TSKEY nextWKey = INT64_MIN;
+ if (hasPrevWindow(pFillSup)) {
+ prevWKey = pFillSup->prev.key;
+ }
+ if (hasNextWindow(pFillSup)) {
+ nextWKey = pFillSup->next.key;
+ }
+
+ pFillInfo->needFill = true;
+ pFillInfo->pos = FILL_POS_INVALID;
+ switch (pFillInfo->type) {
+ case TSDB_FILL_NULL:
+ case TSDB_FILL_SET_VALUE: {
+ if (pFillSup->prev.key == pFillInfo->preRowKey) {
+ resetFillWindow(&pFillSup->prev);
+ }
+ if (hasPrevWindow(pFillSup) && hasNextWindow(pFillSup)) {
+ if (pFillSup->next.key == pFillInfo->nextRowKey) {
+ pFillInfo->preRowKey = INT64_MIN;
+ setFillKeyInfo(prevWKey, ts, &pFillSup->interval, pFillInfo);
+ pFillInfo->pos = FILL_POS_END;
+ } else {
+ pFillInfo->needFill = false;
+ pFillInfo->pos = FILL_POS_START;
+ }
+ } else if (hasPrevWindow(pFillSup)) {
+ setFillKeyInfo(prevWKey, ts, &pFillSup->interval, pFillInfo);
+ pFillInfo->pos = FILL_POS_END;
+ } else {
+ setFillKeyInfo(ts, nextWKey, &pFillSup->interval, pFillInfo);
+ pFillInfo->pos = FILL_POS_START;
+ }
+ } break;
+ case TSDB_FILL_PREV: {
+ if (hasNextWindow(pFillSup) && ((pFillSup->next.key != pFillInfo->nextRowKey) ||
+ (pFillSup->next.key == pFillInfo->nextRowKey && hasNextNextWindow(pFillSup)) ||
+ (pFillSup->next.key == pFillInfo->nextRowKey && !hasPrevWindow(pFillSup)))) {
+ setFillKeyInfo(ts, nextWKey, &pFillSup->interval, pFillInfo);
+ pFillInfo->pos = FILL_POS_START;
+ pFillSup->prev.key = pFillSup->cur.key;
+ pFillSup->prev.pRowVal = pFillSup->cur.pRowVal;
+ } else if (hasPrevWindow(pFillSup)) {
+ setFillKeyInfo(prevWKey, ts, &pFillSup->interval, pFillInfo);
+ pFillInfo->pos = FILL_POS_END;
+ pFillInfo->preRowKey = INT64_MIN;
+ }
+ pFillInfo->pResRow = &pFillSup->prev;
+ } break;
+ case TSDB_FILL_NEXT: {
+ if (hasPrevWindow(pFillSup)) {
+ setFillKeyInfo(prevWKey, ts, &pFillSup->interval, pFillInfo);
+ pFillInfo->pos = FILL_POS_END;
+ pFillSup->next.key = pFillSup->cur.key;
+ pFillSup->next.pRowVal = pFillSup->cur.pRowVal;
+ pFillInfo->preRowKey = INT64_MIN;
+ } else {
+ ASSERT(hasNextWindow(pFillSup));
+ setFillKeyInfo(ts, nextWKey, &pFillSup->interval, pFillInfo);
+ pFillInfo->pos = FILL_POS_START;
+ }
+ pFillInfo->pResRow = &pFillSup->next;
+ } break;
+ case TSDB_FILL_LINEAR: {
+ pFillInfo->pLinearInfo->winIndex = 0;
+ if (hasPrevWindow(pFillSup) && hasNextWindow(pFillSup)) {
+ setFillKeyInfo(prevWKey, ts, &pFillSup->interval, pFillInfo);
+ pFillInfo->pos = FILL_POS_MID;
+ pFillInfo->pLinearInfo->nextEnd = nextWKey;
+ int32_t numOfWins = taosTimeCountInterval(prevWKey, ts, pFillSup->interval.sliding,
+ pFillSup->interval.slidingUnit, pFillSup->interval.precision);
+ calcRowDeltaData(&pFillSup->prev, &pFillSup->cur, pFillInfo->pLinearInfo->pDeltaVal, pFillSup->pAllColInfo,
+ pFillSup->numOfAllCols, numOfWins);
+ pFillInfo->pResRow = &pFillSup->prev;
+
+ numOfWins = taosTimeCountInterval(ts, nextWKey, pFillSup->interval.sliding, pFillSup->interval.slidingUnit,
+ pFillSup->interval.precision);
+ calcRowDeltaData(&pFillSup->cur, &pFillSup->next, pFillInfo->pLinearInfo->pNextDeltaVal, pFillSup->pAllColInfo,
+ pFillSup->numOfAllCols, numOfWins);
+ pFillInfo->pLinearInfo->hasNext = true;
+ } else if (hasPrevWindow(pFillSup)) {
+ setFillKeyInfo(prevWKey, ts, &pFillSup->interval, pFillInfo);
+ pFillInfo->pos = FILL_POS_END;
+ pFillInfo->pLinearInfo->nextEnd = INT64_MIN;
+ int32_t numOfWins = taosTimeCountInterval(prevWKey, ts, pFillSup->interval.sliding,
+ pFillSup->interval.slidingUnit, pFillSup->interval.precision);
+ calcRowDeltaData(&pFillSup->prev, &pFillSup->cur, pFillInfo->pLinearInfo->pDeltaVal, pFillSup->pAllColInfo,
+ pFillSup->numOfAllCols, numOfWins);
+ pFillInfo->pResRow = &pFillSup->prev;
+ pFillInfo->pLinearInfo->hasNext = false;
+ } else {
+ ASSERT(hasNextWindow(pFillSup));
+ setFillKeyInfo(ts, nextWKey, &pFillSup->interval, pFillInfo);
+ pFillInfo->pos = FILL_POS_START;
+ pFillInfo->pLinearInfo->nextEnd = INT64_MIN;
+ int32_t numOfWins = taosTimeCountInterval(ts, nextWKey, pFillSup->interval.sliding,
+ pFillSup->interval.slidingUnit, pFillSup->interval.precision);
+ calcRowDeltaData(&pFillSup->cur, &pFillSup->next, pFillInfo->pLinearInfo->pDeltaVal, pFillSup->pAllColInfo,
+ pFillSup->numOfAllCols, numOfWins);
+ pFillInfo->pResRow = &pFillSup->cur;
+ pFillInfo->pLinearInfo->hasNext = false;
+ }
+ } break;
+ default:
+ ASSERT(0);
+ break;
+ }
+ ASSERT(pFillInfo->pos != FILL_POS_INVALID);
+}
+
+static bool checkResult(SStreamFillSupporter* pFillSup, TSKEY ts, uint64_t groupId) {
+ SWinKey key = {.groupId = groupId, .ts = ts};
+ if (tSimpleHashGet(pFillSup->pResMap, &key, sizeof(SWinKey)) != NULL) {
+ return false;
+ }
+ tSimpleHashPut(pFillSup->pResMap, &key, sizeof(SWinKey), NULL, 0);
+ return true;
+}
+
+static void buildFillResult(SResultRowData* pResRow, SStreamFillSupporter* pFillSup, TSKEY ts, SSDataBlock* pBlock) {
+ uint64_t groupId = pBlock->info.groupId;
+ if (pFillSup->hasDelete && !checkResult(pFillSup, ts, groupId)) {
+ return;
+ }
+ for (int32_t i = 0; i < pFillSup->numOfAllCols; ++i) {
+ SFillColInfo* pFillCol = pFillSup->pAllColInfo + i;
+ int32_t slotId = GET_DEST_SLOT_ID(pFillCol);
+ SColumnInfoData* pColData = taosArrayGet(pBlock->pDataBlock, slotId);
+ SFillInfo tmpInfo = {
+ .currentKey = ts,
+ .order = TSDB_ORDER_ASC,
+ .interval = pFillSup->interval,
+ };
+ bool filled = fillIfWindowPseudoColumn(&tmpInfo, pFillCol, pColData, pBlock->info.rows);
+ if (!filled) {
+ SResultCellData* pCell = getResultCell(pResRow, slotId);
+ setRowCell(pColData, pBlock->info.rows, pCell);
+ }
+ }
+ pBlock->info.rows++;
+}
+
+static bool hasRemainCalc(SStreamFillInfo* pFillInfo) {
+ if (pFillInfo->current != INT64_MIN && pFillInfo->current <= pFillInfo->end) {
+ return true;
+ }
+ return false;
+}
+
+static void doStreamFillNormal(SStreamFillSupporter* pFillSup, SStreamFillInfo* pFillInfo, SSDataBlock* pBlock) {
+ while (hasRemainCalc(pFillInfo) && pBlock->info.rows < pBlock->info.capacity) {
+ buildFillResult(pFillInfo->pResRow, pFillSup, pFillInfo->current, pBlock);
+ pFillInfo->current = taosTimeAdd(pFillInfo->current, pFillSup->interval.sliding, pFillSup->interval.slidingUnit,
+ pFillSup->interval.precision);
+ }
+}
+
+static void doStreamFillLinear(SStreamFillSupporter* pFillSup, SStreamFillInfo* pFillInfo, SSDataBlock* pBlock) {
+ while (hasRemainCalc(pFillInfo) && pBlock->info.rows < pBlock->info.capacity) {
+ uint64_t groupId = pBlock->info.groupId;
+ SWinKey key = {.groupId = groupId, .ts = pFillInfo->current};
+ if (pFillSup->hasDelete && !checkResult(pFillSup, pFillInfo->current, groupId)) {
+ pFillInfo->current = taosTimeAdd(pFillInfo->current, pFillSup->interval.sliding, pFillSup->interval.slidingUnit,
+ pFillSup->interval.precision);
+ pFillInfo->pLinearInfo->winIndex++;
+ continue;
+ }
+ pFillInfo->pLinearInfo->winIndex++;
+ for (int32_t i = 0; i < pFillSup->numOfAllCols; ++i) {
+ SFillColInfo* pFillCol = pFillSup->pAllColInfo + i;
+ SFillInfo tmp = {
+ .currentKey = pFillInfo->current,
+ .order = TSDB_ORDER_ASC,
+ .interval = pFillSup->interval,
+ };
+
+ int32_t slotId = GET_DEST_SLOT_ID(pFillCol);
+ SColumnInfoData* pColData = taosArrayGet(pBlock->pDataBlock, slotId);
+ int16_t type = pColData->info.type;
+ SResultCellData* pCell = getResultCell(pFillInfo->pResRow, slotId);
+ int32_t index = pBlock->info.rows;
+ if (pFillCol->notFillCol) {
+ bool filled = fillIfWindowPseudoColumn(&tmp, pFillCol, pColData, index);
+ if (!filled) {
+ setRowCell(pColData, index, pCell);
+ }
+ } else {
+ if (IS_VAR_DATA_TYPE(type) || type == TSDB_DATA_TYPE_BOOL || pCell->isNull) {
+ colDataAppendNULL(pColData, index);
+ continue;
+ }
+ double* pDelta = taosArrayGet(pFillInfo->pLinearInfo->pDeltaVal, slotId);
+ double vCell = 0;
+ GET_TYPED_DATA(vCell, double, pCell->type, pCell->pData);
+ vCell += (*pDelta) * pFillInfo->pLinearInfo->winIndex;
+ int64_t result = 0;
+ SET_TYPED_DATA(&result, pCell->type, vCell);
+ colDataAppend(pColData, index, (const char*)&result, false);
+ }
+ }
+ pFillInfo->current = taosTimeAdd(pFillInfo->current, pFillSup->interval.sliding, pFillSup->interval.slidingUnit,
+ pFillSup->interval.precision);
+ pBlock->info.rows++;
+ }
+}
+
+static void keepResultInDiscBuf(SOperatorInfo* pOperator, uint64_t groupId, SResultRowData* pRow, int32_t len) {
+ SWinKey key = {.groupId = groupId, .ts = pRow->key};
+ int32_t code = streamStateFillPut(pOperator->pTaskInfo->streamInfo.pState, &key, pRow->pRowVal, len);
+ ASSERT(code == TSDB_CODE_SUCCESS);
+}
+
+static void doStreamFillRange(SStreamFillInfo* pFillInfo, SStreamFillSupporter* pFillSup, SSDataBlock* pRes) {
+ if (pFillInfo->needFill == false) {
+ buildFillResult(&pFillSup->cur, pFillSup, pFillSup->cur.key, pRes);
+ return;
+ }
+
+ if (pFillInfo->pos == FILL_POS_START) {
+ buildFillResult(&pFillSup->cur, pFillSup, pFillSup->cur.key, pRes);
+ }
+ if (pFillInfo->type != TSDB_FILL_LINEAR) {
+ doStreamFillNormal(pFillSup, pFillInfo, pRes);
+ } else {
+ doStreamFillLinear(pFillSup, pFillInfo, pRes);
+
+ if (pFillInfo->pos == FILL_POS_MID) {
+ buildFillResult(&pFillSup->cur, pFillSup, pFillSup->cur.key, pRes);
+ }
+
+ if (pFillInfo->current > pFillInfo->end && pFillInfo->pLinearInfo->hasNext) {
+ pFillInfo->pLinearInfo->hasNext = false;
+ pFillInfo->pLinearInfo->winIndex = 0;
+ taosArrayClear(pFillInfo->pLinearInfo->pDeltaVal);
+ taosArrayAddAll(pFillInfo->pLinearInfo->pDeltaVal, pFillInfo->pLinearInfo->pNextDeltaVal);
+ pFillInfo->pResRow = &pFillSup->cur;
+ setFillKeyInfo(pFillSup->cur.key, pFillInfo->pLinearInfo->nextEnd, &pFillSup->interval, pFillInfo);
+ doStreamFillLinear(pFillSup, pFillInfo, pRes);
+ }
+ }
+ if (pFillInfo->pos == FILL_POS_END) {
+ buildFillResult(&pFillSup->cur, pFillSup, pFillSup->cur.key, pRes);
+ }
+}
+
+void keepBlockRowInDiscBuf(SOperatorInfo* pOperator, SStreamFillInfo* pFillInfo, SSDataBlock* pBlock, TSKEY* tsCol,
+ int32_t rowId, uint64_t groupId, int32_t rowSize) {
+ TSKEY ts = tsCol[rowId];
+ pFillInfo->nextRowKey = ts;
+ SResultRowData tmpNextRow = {.key = ts};
+ tmpNextRow.pRowVal = taosMemoryCalloc(1, rowSize);
+ transBlockToResultRow(pBlock, rowId, ts, &tmpNextRow);
+ keepResultInDiscBuf(pOperator, groupId, &tmpNextRow, rowSize);
+ taosMemoryFreeClear(tmpNextRow.pRowVal);
+}
+
+static void doFillResults(SOperatorInfo* pOperator, SStreamFillSupporter* pFillSup, SStreamFillInfo* pFillInfo,
+ SSDataBlock* pBlock, TSKEY* tsCol, int32_t rowId, SSDataBlock* pRes) {
+ uint64_t groupId = pBlock->info.groupId;
+ getWindowFromDiscBuf(pOperator, tsCol[rowId], groupId, pFillSup);
+ if (pFillSup->prev.key == pFillInfo->preRowKey) {
+ resetFillWindow(&pFillSup->prev);
+ }
+ setFillValueInfo(pBlock, tsCol[rowId], rowId, pFillSup, pFillInfo);
+ doStreamFillRange(pFillInfo, pFillSup, pRes);
+}
+
+static void doStreamFillImpl(SOperatorInfo* pOperator) {
+ SStreamFillOperatorInfo* pInfo = pOperator->info;
+ SExecTaskInfo* pTaskInfo = pOperator->pTaskInfo;
+ SStreamFillSupporter* pFillSup = pInfo->pFillSup;
+ SStreamFillInfo* pFillInfo = pInfo->pFillInfo;
+ SSDataBlock* pBlock = pInfo->pSrcBlock;
+ uint64_t groupId = pBlock->info.groupId;
+ SSDataBlock* pRes = pInfo->pRes;
+ pRes->info.groupId = groupId;
+ if (hasRemainCalc(pFillInfo)) {
+ doStreamFillRange(pFillInfo, pFillSup, pRes);
+ }
+
+ SColumnInfoData* pTsCol = taosArrayGet(pInfo->pSrcBlock->pDataBlock, pInfo->primaryTsCol);
+ TSKEY* tsCol = (TSKEY*)pTsCol->pData;
+
+ if (pInfo->srcRowIndex == 0) {
+ keepBlockRowInDiscBuf(pOperator, pFillInfo, pBlock, tsCol, pInfo->srcRowIndex, groupId, pFillSup->rowSize);
+ SSDataBlock* preBlock = pInfo->pPrevSrcBlock;
+ if (preBlock->info.rows > 0) {
+ int preRowId = preBlock->info.rows - 1;
+ SColumnInfoData* pPreTsCol = taosArrayGet(preBlock->pDataBlock, pInfo->primaryTsCol);
+ doFillResults(pOperator, pFillSup, pFillInfo, preBlock, (TSKEY*)pPreTsCol->pData, preRowId, pRes);
+ }
+ pInfo->srcRowIndex++;
+ }
+
+ while (pInfo->srcRowIndex < pBlock->info.rows) {
+ TSKEY ts = tsCol[pInfo->srcRowIndex];
+ keepBlockRowInDiscBuf(pOperator, pFillInfo, pBlock, tsCol, pInfo->srcRowIndex, groupId, pFillSup->rowSize);
+ doFillResults(pOperator, pFillSup, pFillInfo, pBlock, tsCol, pInfo->srcRowIndex - 1, pRes);
+ if (pInfo->pRes->info.rows == pInfo->pRes->info.capacity) {
+ blockDataUpdateTsWindow(pRes, pInfo->primaryTsCol);
+ return;
+ }
+ pInfo->srcRowIndex++;
+ }
+ blockDataUpdateTsWindow(pRes, pInfo->primaryTsCol);
+ blockDataCleanup(pInfo->pPrevSrcBlock);
+ copyDataBlock(pInfo->pPrevSrcBlock, pInfo->pSrcBlock);
+ blockDataCleanup(pInfo->pSrcBlock);
+}
+
+static void buildDeleteRange(TSKEY start, TSKEY end, uint64_t groupId, SSDataBlock* delRes) {
+ SSDataBlock* pBlock = delRes;
+ SColumnInfoData* pStartCol = taosArrayGet(pBlock->pDataBlock, START_TS_COLUMN_INDEX);
+ SColumnInfoData* pEndCol = taosArrayGet(pBlock->pDataBlock, END_TS_COLUMN_INDEX);
+ SColumnInfoData* pUidCol = taosArrayGet(pBlock->pDataBlock, UID_COLUMN_INDEX);
+ SColumnInfoData* pGroupCol = taosArrayGet(pBlock->pDataBlock, GROUPID_COLUMN_INDEX);
+ SColumnInfoData* pCalStartCol = taosArrayGet(pBlock->pDataBlock, CALCULATE_START_TS_COLUMN_INDEX);
+ SColumnInfoData* pCalEndCol = taosArrayGet(pBlock->pDataBlock, CALCULATE_END_TS_COLUMN_INDEX);
+ colDataAppend(pStartCol, pBlock->info.rows, (const char*)&start, false);
+ colDataAppend(pEndCol, pBlock->info.rows, (const char*)&end, false);
+ colDataAppendNULL(pUidCol, pBlock->info.rows);
+ colDataAppend(pGroupCol, pBlock->info.rows, (const char*)&groupId, false);
+ colDataAppendNULL(pCalStartCol, pBlock->info.rows);
+ colDataAppendNULL(pCalEndCol, pBlock->info.rows);
+ pBlock->info.rows++;
+}
+
+static void buildDeleteResult(SStreamFillSupporter* pFillSup, TSKEY startTs, TSKEY endTs, uint64_t groupId,
+ SSDataBlock* delRes) {
+ if (hasPrevWindow(pFillSup)) {
+ TSKEY start = getNextWindowTs(pFillSup->prev.key, &pFillSup->interval);
+ buildDeleteRange(start, endTs, groupId, delRes);
+ } else if (hasNextWindow(pFillSup)) {
+ TSKEY end = getPrevWindowTs(pFillSup->next.key, &pFillSup->interval);
+ buildDeleteRange(startTs, end, groupId, delRes);
+ } else {
+ buildDeleteRange(startTs, endTs, groupId, delRes);
+ }
+}
+
+static void doDeleteFillResultImpl(SOperatorInfo* pOperator, TSKEY startTs, TSKEY endTs, uint64_t groupId) {
+ SStreamFillOperatorInfo* pInfo = pOperator->info;
+ getWindowFromDiscBuf(pOperator, startTs, groupId, pInfo->pFillSup);
+ setDeleteFillValueInfo(startTs, endTs, pInfo->pFillSup, pInfo->pFillInfo);
+ SWinKey key = {.ts = startTs, .groupId = groupId};
+ if (!pInfo->pFillInfo->needFill) {
+ streamStateFillDel(pOperator->pTaskInfo->streamInfo.pState, &key);
+ buildDeleteResult(pInfo->pFillSup, startTs, endTs, groupId, pInfo->pDelRes);
+ } else {
+ STimeRange tw = {
+ .skey = startTs,
+ .ekey = endTs,
+ .groupId = groupId,
+ };
+ taosArrayPush(pInfo->pFillInfo->delRanges, &tw);
+ while (key.ts <= endTs) {
+ key.ts = taosTimeAdd(key.ts, pInfo->pFillSup->interval.sliding, pInfo->pFillSup->interval.slidingUnit,
+ pInfo->pFillSup->interval.precision);
+ tSimpleHashPut(pInfo->pFillSup->pResMap, &key, sizeof(SWinKey), NULL, 0);
+ }
+ }
+}
+
+static void doDeleteFillFinalize(SOperatorInfo* pOperator) {
+ SStreamFillOperatorInfo* pInfo = pOperator->info;
+ SStreamFillInfo* pFillInfo = pInfo->pFillInfo;
+ int32_t size = taosArrayGetSize(pFillInfo->delRanges);
+ tSimpleHashClear(pInfo->pFillSup->pResMap);
+ for (; pFillInfo->delIndex < size; pFillInfo->delIndex++) {
+ STimeRange* range = taosArrayGet(pFillInfo->delRanges, pFillInfo->delIndex);
+ if (pInfo->pRes->info.groupId != 0 && pInfo->pRes->info.groupId != range->groupId) {
+ return;
+ }
+ getWindowFromDiscBuf(pOperator, range->skey, range->groupId, pInfo->pFillSup);
+ setDeleteFillValueInfo(range->skey, range->ekey, pInfo->pFillSup, pInfo->pFillInfo);
+ if (pInfo->pFillInfo->needFill) {
+ doStreamFillRange(pInfo->pFillInfo, pInfo->pFillSup, pInfo->pRes);
+ pInfo->pRes->info.groupId = range->groupId;
+ }
+ SWinKey key = {.ts = range->skey, .groupId = range->groupId};
+ streamStateFillDel(pOperator->pTaskInfo->streamInfo.pState, &key);
+ }
+}
+
+static void doDeleteFillResult(SOperatorInfo* pOperator) {
+ SStreamFillOperatorInfo* pInfo = pOperator->info;
+ SStreamFillSupporter* pFillSup = pInfo->pFillSup;
+ SStreamFillInfo* pFillInfo = pInfo->pFillInfo;
+ SSDataBlock* pBlock = pInfo->pSrcDelBlock;
+ SSDataBlock* pRes = pInfo->pRes;
+ SSDataBlock* pDelRes = pInfo->pDelRes;
+
+ SColumnInfoData* pStartCol = taosArrayGet(pBlock->pDataBlock, START_TS_COLUMN_INDEX);
+ TSKEY* tsStarts = (TSKEY*)pStartCol->pData;
+ SColumnInfoData* pGroupCol = taosArrayGet(pBlock->pDataBlock, GROUPID_COLUMN_INDEX);
+ uint64_t* groupIds = (uint64_t*)pGroupCol->pData;
+ while (pInfo->srcDelRowIndex < pBlock->info.rows) {
+ TSKEY ts = tsStarts[pInfo->srcDelRowIndex];
+ TSKEY endTs = ts;
+ uint64_t groupId = groupIds[pInfo->srcDelRowIndex];
+ SWinKey key = {.ts = ts, .groupId = groupId};
+ SStreamStateCur* pCur = streamStateGetAndCheckCur(pOperator->pTaskInfo->streamInfo.pState, &key);
+ if (!pCur) {
+ pInfo->srcDelRowIndex++;
+ continue;
+ }
+
+ SWinKey nextKey = {.groupId = groupId, .ts = ts};
+ while (pInfo->srcDelRowIndex < pBlock->info.rows) {
+ void* nextVal = NULL;
+ int32_t nextLen = 0;
+ TSKEY delTs = tsStarts[pInfo->srcDelRowIndex];
+ uint64_t delGroupId = groupIds[pInfo->srcDelRowIndex];
+ int32_t code = TSDB_CODE_SUCCESS;
+ if (groupId != delGroupId) {
+ break;
+ }
+ if (delTs > nextKey.ts) {
+ break;
+ }
+ endTs = delTs;
+ SWinKey delKey = {.groupId = delGroupId, .ts = delTs};
+ if (delTs == nextKey.ts) {
+ code = streamStateCurNext(pOperator->pTaskInfo->streamInfo.pState, pCur);
+ if (code == TSDB_CODE_SUCCESS) {
+ code = streamStateGetGroupKVByCur(pCur, &nextKey, (const void**)&nextVal, &nextLen);
+ }
+ if (delTs != ts) {
+ streamStateFillDel(pOperator->pTaskInfo->streamInfo.pState, &delKey);
+ }
+ if (code != TSDB_CODE_SUCCESS) {
+ break;
+ }
+ }
+ pInfo->srcDelRowIndex++;
+ }
+ doDeleteFillResultImpl(pOperator, ts, endTs, groupId);
+ }
+ pFillInfo->current = pFillInfo->end + 1;
+}
+
+static void resetStreamFillInfo(SStreamFillOperatorInfo* pInfo) {
+ blockDataCleanup(pInfo->pPrevSrcBlock);
+ tSimpleHashClear(pInfo->pFillSup->pResMap);
+ pInfo->pFillSup->hasDelete = false;
+ taosArrayClear(pInfo->pFillInfo->delRanges);
+ pInfo->pFillInfo->delIndex = 0;
+}
+
+static void doApplyStreamScalarCalculation(SOperatorInfo* pOperator, SSDataBlock* pSrcBlock, SSDataBlock* pDstBlock) {
+ SStreamFillOperatorInfo* pInfo = pOperator->info;
+ SExprSupp* pSup = &pOperator->exprSupp;
+
+ blockDataCleanup(pDstBlock);
+ blockDataEnsureCapacity(pDstBlock, pSrcBlock->info.rows);
+ setInputDataBlock(pOperator, pSup->pCtx, pSrcBlock, TSDB_ORDER_ASC, MAIN_SCAN, false);
+ projectApplyFunctions(pSup->pExprInfo, pDstBlock, pSrcBlock, pSup->pCtx, pSup->numOfExprs, NULL);
+ pDstBlock->info.groupId = pSrcBlock->info.groupId;
+
+ SColumnInfoData* pDst = taosArrayGet(pDstBlock->pDataBlock, pInfo->primaryTsCol);
+ SColumnInfoData* pSrc = taosArrayGet(pSrcBlock->pDataBlock, pInfo->primarySrcSlotId);
+ colDataAssign(pDst, pSrc, pDstBlock->info.rows, &pDstBlock->info);
+
+ int32_t numOfNotFill = pInfo->pFillSup->numOfAllCols - pInfo->pFillSup->numOfFillCols;
+ for (int32_t i = 0; i < numOfNotFill; ++i) {
+ SFillColInfo* pCol = &pInfo->pFillSup->pAllColInfo[i + pInfo->pFillSup->numOfFillCols];
+ ASSERT(pCol->notFillCol);
+
+ SExprInfo* pExpr = pCol->pExpr;
+ int32_t srcSlotId = pExpr->base.pParam[0].pCol->slotId;
+ int32_t dstSlotId = pExpr->base.resSchema.slotId;
+
+ SColumnInfoData* pDst1 = taosArrayGet(pDstBlock->pDataBlock, dstSlotId);
+ SColumnInfoData* pSrc1 = taosArrayGet(pSrcBlock->pDataBlock, srcSlotId);
+ colDataAssign(pDst1, pSrc1, pDstBlock->info.rows, &pDstBlock->info);
+ }
+ blockDataUpdateTsWindow(pDstBlock, pInfo->primaryTsCol);
+}
+
+static SSDataBlock* doStreamFill(SOperatorInfo* pOperator) {
+ SStreamFillOperatorInfo* pInfo = pOperator->info;
+ SExecTaskInfo* pTaskInfo = pOperator->pTaskInfo;
+
+ if (pOperator->status == OP_EXEC_DONE) {
+ return NULL;
+ }
+ blockDataCleanup(pInfo->pRes);
+ if (pOperator->status == OP_RES_TO_RETURN) {
+ if (hasRemainCalc(pInfo->pFillInfo)) {
+ doStreamFillRange(pInfo->pFillInfo, pInfo->pFillSup, pInfo->pRes);
+ if (pInfo->pRes->info.rows > 0) {
+ return pInfo->pRes;
+ }
+ }
+ doDeleteFillFinalize(pOperator);
+ if (pInfo->pRes->info.rows > 0) {
+ printDataBlock(pInfo->pRes, "stream fill");
+ return pInfo->pRes;
+ }
+ doSetOperatorCompleted(pOperator);
+ resetStreamFillInfo(pInfo);
+ return NULL;
+ }
+
+ SSDataBlock* fillResult = NULL;
+ SOperatorInfo* downstream = pOperator->pDownstream[0];
+ while (1) {
+ if (pInfo->srcRowIndex >= pInfo->pSrcBlock->info.rows) {
+ // If there are delete datablocks, we receive them first.
+ SSDataBlock* pBlock = downstream->fpSet.getNextFn(downstream);
+ if (pBlock == NULL) {
+ pOperator->status = OP_RES_TO_RETURN;
+ SSDataBlock* preBlock = pInfo->pPrevSrcBlock;
+ if (preBlock->info.rows > 0) {
+ int preRowId = preBlock->info.rows - 1;
+ SColumnInfoData* pPreTsCol = taosArrayGet(preBlock->pDataBlock, pInfo->primaryTsCol);
+ doFillResults(pOperator, pInfo->pFillSup, pInfo->pFillInfo, preBlock, (TSKEY*)pPreTsCol->pData, preRowId,
+ pInfo->pRes);
+ }
+ pInfo->pFillInfo->preRowKey = INT64_MIN;
+ if (pInfo->pRes->info.rows > 0) {
+ printDataBlock(pInfo->pRes, "stream fill");
+ return pInfo->pRes;
+ }
+ break;
+ }
+ printDataBlock(pBlock, "stream fill recv");
+
+ switch (pBlock->info.type) {
+ case STREAM_RETRIEVE:
+ return pBlock;
+ case STREAM_DELETE_RESULT: {
+ pInfo->pSrcDelBlock = pBlock;
+ pInfo->srcDelRowIndex = 0;
+ blockDataCleanup(pInfo->pDelRes);
+ pInfo->pFillSup->hasDelete = true;
+ doDeleteFillResult(pOperator);
+ if (pInfo->pDelRes->info.rows > 0) {
+ printDataBlock(pInfo->pDelRes, "stream fill delete");
+ return pInfo->pDelRes;
+ }
+ continue;
+ } break;
+ case STREAM_NORMAL:
+ case STREAM_INVALID: {
+ doApplyStreamScalarCalculation(pOperator, pBlock, pInfo->pSrcBlock);
+ pInfo->srcRowIndex = 0;
+ } break;
+ default:
+ ASSERT(0);
+ break;
+ }
+ }
+
+ doStreamFillImpl(pOperator);
+ doFilter(pInfo->pCondition, pInfo->pRes, pInfo->pColMatchColInfo);
+ pOperator->resultInfo.totalRows += pInfo->pRes->info.rows;
+ if (pInfo->pRes->info.rows > 0) {
+ break;
+ }
+ }
+ if (pOperator->status == OP_RES_TO_RETURN) {
+ doDeleteFillFinalize(pOperator);
+ }
+
+ if (pInfo->pRes->info.rows == 0) {
+ doSetOperatorCompleted(pOperator);
+ resetStreamFillInfo(pInfo);
+ return NULL;
+ }
+
+ pOperator->resultInfo.totalRows += pInfo->pRes->info.rows;
+ printDataBlock(pInfo->pRes, "stream fill");
+ return pInfo->pRes;
+}
+
+static int32_t initResultBuf(SStreamFillSupporter* pFillSup) {
+ pFillSup->rowSize = sizeof(SResultCellData) * pFillSup->numOfAllCols;
+ for (int i = 0; i < pFillSup->numOfAllCols; i++) {
+ SFillColInfo* pCol = &pFillSup->pAllColInfo[i];
+ SResSchema* pSchema = &pCol->pExpr->base.resSchema;
+ pFillSup->rowSize += pSchema->bytes;
+ }
+ pFillSup->next.key = INT64_MIN;
+ pFillSup->nextNext.key = INT64_MIN;
+ pFillSup->prev.key = INT64_MIN;
+ pFillSup->next.pRowVal = NULL;
+ pFillSup->nextNext.pRowVal = NULL;
+ pFillSup->prev.pRowVal = NULL;
+ return TSDB_CODE_SUCCESS;
+}
+
+static SStreamFillSupporter* initStreamFillSup(SStreamFillPhysiNode* pPhyFillNode, SInterval* pInterval,
+ SExprInfo* pFillExprInfo, int32_t numOfFillCols) {
+ SStreamFillSupporter* pFillSup = taosMemoryCalloc(1, sizeof(SStreamFillSupporter));
+ if (!pFillSup) {
+ return NULL;
+ }
+ pFillSup->numOfFillCols = numOfFillCols;
+ int32_t numOfNotFillCols = 0;
+ SExprInfo* pNotFillExprInfo = createExprInfo(pPhyFillNode->pNotFillExprs, NULL, &numOfNotFillCols);
+ pFillSup->pAllColInfo = createFillColInfo(pFillExprInfo, pFillSup->numOfFillCols, pNotFillExprInfo, numOfNotFillCols,
+ (const SNodeListNode*)(pPhyFillNode->pValues));
+ pFillSup->type = convertFillType(pPhyFillNode->mode);
+ pFillSup->numOfAllCols = pFillSup->numOfFillCols + numOfNotFillCols;
+ pFillSup->interval = *pInterval;
+
+ int32_t code = initResultBuf(pFillSup);
+ if (code != TSDB_CODE_SUCCESS) {
+ destroyStreamFillSupporter(pFillSup);
+ return NULL;
+ }
+ _hash_fn_t hashFn = taosGetDefaultHashFunction(TSDB_DATA_TYPE_BINARY);
+ pFillSup->pResMap = tSimpleHashInit(16, hashFn);
+ pFillSup->hasDelete = false;
+ return pFillSup;
+}
+
+SStreamFillInfo* initStreamFillInfo(SStreamFillSupporter* pFillSup, SSDataBlock* pRes) {
+ SStreamFillInfo* pFillInfo = taosMemoryCalloc(1, sizeof(SStreamFillInfo));
+ pFillInfo->start = INT64_MIN;
+ pFillInfo->current = INT64_MIN;
+ pFillInfo->end = INT64_MIN;
+ pFillInfo->preRowKey = INT64_MIN;
+ pFillInfo->needFill = false;
+ pFillInfo->pLinearInfo = taosMemoryCalloc(1, sizeof(SStreamFillLinearInfo));
+ pFillInfo->pLinearInfo->hasNext = false;
+ pFillInfo->pLinearInfo->nextEnd = INT64_MIN;
+ pFillInfo->pLinearInfo->pDeltaVal = NULL;
+ pFillInfo->pLinearInfo->pNextDeltaVal = NULL;
+ if (pFillSup->type == TSDB_FILL_LINEAR) {
+ pFillInfo->pLinearInfo->pDeltaVal = taosArrayInit(pFillSup->numOfAllCols, sizeof(double));
+ pFillInfo->pLinearInfo->pNextDeltaVal = taosArrayInit(pFillSup->numOfAllCols, sizeof(double));
+ for (int32_t i = 0; i < pFillSup->numOfAllCols; i++) {
+ double value = 0.0;
+ taosArrayPush(pFillInfo->pLinearInfo->pDeltaVal, &value);
+ taosArrayPush(pFillInfo->pLinearInfo->pNextDeltaVal, &value);
+ }
+ }
+ pFillInfo->pLinearInfo->winIndex = 0;
+
+ pFillInfo->pResRow = NULL;
+ if (pFillSup->type == TSDB_FILL_SET_VALUE || pFillSup->type == TSDB_FILL_NULL) {
+ pFillInfo->pResRow = taosMemoryCalloc(1, sizeof(SResultRowData));
+ pFillInfo->pResRow->key = INT64_MIN;
+ pFillInfo->pResRow->pRowVal = taosMemoryCalloc(1, pFillSup->rowSize);
+ for (int32_t i = 0; i < pFillSup->numOfAllCols; ++i) {
+ SColumnInfoData* pColData = taosArrayGet(pRes->pDataBlock, i);
+ SResultCellData* pCell = getResultCell(pFillInfo->pResRow, i);
+ pCell->bytes = pColData->info.bytes;
+ pCell->type = pColData->info.type;
+ }
+ }
+
+ pFillInfo->type = pFillSup->type;
+ pFillInfo->delRanges = taosArrayInit(16, sizeof(STimeRange));
+ pFillInfo->delIndex = 0;
+ return pFillInfo;
+}
+
+SOperatorInfo* createStreamFillOperatorInfo(SOperatorInfo* downstream, SStreamFillPhysiNode* pPhyFillNode,
+ SExecTaskInfo* pTaskInfo) {
+ SStreamFillOperatorInfo* pInfo = taosMemoryCalloc(1, sizeof(SStreamFillOperatorInfo));
+ SOperatorInfo* pOperator = taosMemoryCalloc(1, sizeof(SOperatorInfo));
+ if (pInfo == NULL || pOperator == NULL) {
+ goto _error;
+ }
+
+ SInterval* pInterval = QUERY_NODE_PHYSICAL_PLAN_STREAM_FINAL_INTERVAL == downstream->operatorType
+ ? &((SStreamFinalIntervalOperatorInfo*)downstream->info)->interval
+ : &((SStreamIntervalOperatorInfo*)downstream->info)->interval;
+ int32_t numOfFillCols = 0;
+ SExprInfo* pFillExprInfo = createExprInfo(pPhyFillNode->pFillExprs, NULL, &numOfFillCols);
+ pInfo->pFillSup = initStreamFillSup(pPhyFillNode, pInterval, pFillExprInfo, numOfFillCols);
+ if (!pInfo->pFillSup) {
+ goto _error;
+ }
+
+ SResultInfo* pResultInfo = &pOperator->resultInfo;
+ initResultSizeInfo(&pOperator->resultInfo, 4096);
+ pInfo->pRes = createResDataBlock(pPhyFillNode->node.pOutputDataBlockDesc);
+ pInfo->pSrcBlock = createResDataBlock(pPhyFillNode->node.pOutputDataBlockDesc);
+ pInfo->pPrevSrcBlock = createResDataBlock(pPhyFillNode->node.pOutputDataBlockDesc);
+ blockDataEnsureCapacity(pInfo->pRes, pOperator->resultInfo.capacity);
+ blockDataEnsureCapacity(pInfo->pSrcBlock, pOperator->resultInfo.capacity);
+ blockDataEnsureCapacity(pInfo->pPrevSrcBlock, pOperator->resultInfo.capacity);
+
+ pInfo->pFillInfo = initStreamFillInfo(pInfo->pFillSup, pInfo->pRes);
+ if (!pInfo->pFillInfo) {
+ goto _error;
+ }
+
+ if (pInfo->pFillInfo->type == TSDB_FILL_SET_VALUE) {
+ for (int32_t i = 0; i < pInfo->pFillSup->numOfAllCols; ++i) {
+ SFillColInfo* pFillCol = pInfo->pFillSup->pAllColInfo + i;
+ int32_t slotId = GET_DEST_SLOT_ID(pFillCol);
+ SResultCellData* pCell = getResultCell(pInfo->pFillInfo->pResRow, slotId);
+ SVariant* pVar = &(pFillCol->fillVal);
+ if (pCell->type == TSDB_DATA_TYPE_FLOAT) {
+ float v = 0;
+ GET_TYPED_DATA(v, float, pVar->nType, &pVar->i);
+ SET_TYPED_DATA(pCell->pData, pCell->type, v);
+ } else if (pCell->type == TSDB_DATA_TYPE_DOUBLE) {
+ double v = 0;
+ GET_TYPED_DATA(v, double, pVar->nType, &pVar->i);
+ SET_TYPED_DATA(pCell->pData, pCell->type, v);
+ } else if (IS_SIGNED_NUMERIC_TYPE(pCell->type)) {
+ int64_t v = 0;
+ GET_TYPED_DATA(v, int64_t, pVar->nType, &pVar->i);
+ SET_TYPED_DATA(pCell->pData, pCell->type, v);
+ } else {
+ pCell->isNull = true;
+ }
+ }
+ } else if (pInfo->pFillInfo->type == TSDB_FILL_NULL) {
+ for (int32_t i = 0; i < pInfo->pFillSup->numOfAllCols; ++i) {
+ SFillColInfo* pFillCol = pInfo->pFillSup->pAllColInfo + i;
+ int32_t slotId = GET_DEST_SLOT_ID(pFillCol);
+ SResultCellData* pCell = getResultCell(pInfo->pFillInfo->pResRow, slotId);
+ pCell->isNull = true;
+ }
+ }
+
+ pInfo->pDelRes = createSpecialDataBlock(STREAM_DELETE_RESULT);
+ blockDataEnsureCapacity(pInfo->pDelRes, pOperator->resultInfo.capacity);
+
+ pInfo->primaryTsCol = ((STargetNode*)pPhyFillNode->pWStartTs)->slotId;
+ pInfo->primarySrcSlotId = ((SColumnNode*)((STargetNode*)pPhyFillNode->pWStartTs)->pExpr)->slotId;
+
+ int32_t numOfOutputCols = 0;
+ SArray* pColMatchColInfo = extractColMatchInfo(pPhyFillNode->pFillExprs, pPhyFillNode->node.pOutputDataBlockDesc,
+ &numOfOutputCols, COL_MATCH_FROM_SLOT_ID);
+ pInfo->pCondition = pPhyFillNode->node.pConditions;
+ pInfo->pColMatchColInfo = pColMatchColInfo;
+ initExprSupp(&pOperator->exprSupp, pFillExprInfo, numOfFillCols);
+ pInfo->srcRowIndex = 0;
+
+ pOperator->name = "FillOperator";
+ pOperator->blocking = false;
+ pOperator->status = OP_NOT_OPENED;
+ pOperator->operatorType = QUERY_NODE_PHYSICAL_PLAN_STREAM_FILL;
+ pOperator->info = pInfo;
+ pOperator->pTaskInfo = pTaskInfo;
+ pOperator->fpSet = createOperatorFpSet(operatorDummyOpenFn, doStreamFill, NULL, NULL, destroyStreamFillOperatorInfo,
+ NULL, NULL, NULL);
+
+ int32_t code = appendDownstream(pOperator, &downstream, 1);
+ if (code != TSDB_CODE_SUCCESS) {
+ goto _error;
+ }
+ return pOperator;
+
+_error:
+ destroyStreamFillOperatorInfo(pInfo);
+ taosMemoryFreeClear(pOperator);
+ return NULL;
+}
diff --git a/source/libs/executor/src/timewindowoperator.c b/source/libs/executor/src/timewindowoperator.c
index 4671570802..b4e2b73889 100644
--- a/source/libs/executor/src/timewindowoperator.c
+++ b/source/libs/executor/src/timewindowoperator.c
@@ -271,6 +271,10 @@ static void getNextTimeWindow(SInterval* pInterval, int32_t precision, int32_t o
tw->ekey -= 1;
}
+void getNextIntervalWindow(SInterval* pInterval, STimeWindow* tw, int32_t order) {
+ getNextTimeWindow(pInterval, pInterval->precision, order, tw);
+}
+
void doTimeWindowInterpolation(SArray* pPrevValues, SArray* pDataBlock, TSKEY prevTs, int32_t prevRowIndex, TSKEY curTs,
int32_t curRowIndex, TSKEY windowKey, int32_t type, SExprSupp* pSup) {
SqlFunctionCtx* pCtx = pSup->pCtx;
@@ -2095,12 +2099,17 @@ static void genInterpolationResult(STimeSliceOperatorInfo* pSliceInfo, SExprSupp
bool hasInterp = true;
for (int32_t j = 0; j < pExprSup->numOfExprs; ++j) {
SExprInfo* pExprInfo = &pExprSup->pExprInfo[j];
- int32_t srcSlot = pExprInfo->base.pParam[0].pCol->slotId;
- int32_t dstSlot = pExprInfo->base.resSchema.slotId;
- // SColumnInfoData* pSrc = taosArrayGet(pBlock->pDataBlock, srcSlot);
+ int32_t dstSlot = pExprInfo->base.resSchema.slotId;
SColumnInfoData* pDst = taosArrayGet(pResBlock->pDataBlock, dstSlot);
+ if (IS_TIMESTAMP_TYPE(pExprInfo->base.resSchema.type)) {
+ colDataAppend(pDst, rows, (char*)&pSliceInfo->current, false);
+ continue;
+ }
+
+ int32_t srcSlot = pExprInfo->base.pParam[0].pCol->slotId;
+ // SColumnInfoData* pSrc = taosArrayGet(pBlock->pDataBlock, srcSlot);
switch (pSliceInfo->fillType) {
case TSDB_FILL_NULL: {
colDataAppendNULL(pDst, rows);
@@ -2346,19 +2355,24 @@ static SSDataBlock* doTimeslice(SOperatorInfo* pOperator) {
if (ts == pSliceInfo->current) {
for (int32_t j = 0; j < pOperator->exprSupp.numOfExprs; ++j) {
SExprInfo* pExprInfo = &pOperator->exprSupp.pExprInfo[j];
- int32_t dstSlot = pExprInfo->base.resSchema.slotId;
- int32_t srcSlot = pExprInfo->base.pParam[0].pCol->slotId;
- SColumnInfoData* pSrc = taosArrayGet(pBlock->pDataBlock, srcSlot);
+ int32_t dstSlot = pExprInfo->base.resSchema.slotId;
SColumnInfoData* pDst = taosArrayGet(pResBlock->pDataBlock, dstSlot);
- if (colDataIsNull_s(pSrc, i)) {
- colDataAppendNULL(pDst, pResBlock->info.rows);
- continue;
- }
+ if (IS_TIMESTAMP_TYPE(pExprInfo->base.resSchema.type)) {
+ colDataAppend(pDst, pResBlock->info.rows, (char *)&pSliceInfo->current, false);
+ } else {
+ int32_t srcSlot = pExprInfo->base.pParam[0].pCol->slotId;
+ SColumnInfoData* pSrc = taosArrayGet(pBlock->pDataBlock, srcSlot);
- char* v = colDataGetData(pSrc, i);
- colDataAppend(pDst, pResBlock->info.rows, v, false);
+ if (colDataIsNull_s(pSrc, i)) {
+ colDataAppendNULL(pDst, pResBlock->info.rows);
+ continue;
+ }
+
+ char* v = colDataGetData(pSrc, i);
+ colDataAppend(pDst, pResBlock->info.rows, v, false);
+ }
}
pResBlock->info.rows += 1;
@@ -2478,14 +2492,24 @@ static SSDataBlock* doTimeslice(SOperatorInfo* pOperator) {
if (ts == pSliceInfo->current && pSliceInfo->current <= pSliceInfo->win.ekey) {
for (int32_t j = 0; j < pOperator->exprSupp.numOfExprs; ++j) {
SExprInfo* pExprInfo = &pOperator->exprSupp.pExprInfo[j];
- int32_t dstSlot = pExprInfo->base.resSchema.slotId;
- int32_t srcSlot = pExprInfo->base.pParam[0].pCol->slotId;
- SColumnInfoData* pSrc = taosArrayGet(pBlock->pDataBlock, srcSlot);
+ int32_t dstSlot = pExprInfo->base.resSchema.slotId;
SColumnInfoData* pDst = taosArrayGet(pResBlock->pDataBlock, dstSlot);
- char* v = colDataGetData(pSrc, i);
- colDataAppend(pDst, pResBlock->info.rows, v, false);
+ if (IS_TIMESTAMP_TYPE(pExprInfo->base.resSchema.type)) {
+ colDataAppend(pDst, pResBlock->info.rows, (char *)&pSliceInfo->current, false);
+ } else {
+ int32_t srcSlot = pExprInfo->base.pParam[0].pCol->slotId;
+ SColumnInfoData* pSrc = taosArrayGet(pBlock->pDataBlock, srcSlot);
+
+ if (colDataIsNull_s(pSrc, i)) {
+ colDataAppendNULL(pDst, pResBlock->info.rows);
+ continue;
+ }
+
+ char* v = colDataGetData(pSrc, i);
+ colDataAppend(pDst, pResBlock->info.rows, v, false);
+ }
}
pResBlock->info.rows += 1;
@@ -3146,20 +3170,21 @@ static SSDataBlock* doStreamFinalIntervalAgg(SOperatorInfo* pOperator) {
}
doBuildResultDatablock(pOperator, &pInfo->binfo, &pInfo->groupResInfo, pInfo->aggSup.pResultBuf);
- if (pInfo->binfo.pRes->info.rows == 0) {
- pOperator->status = OP_EXEC_DONE;
- if (!IS_FINAL_OP(pInfo)) {
- clearFunctionContext(&pOperator->exprSupp);
- // semi interval operator clear disk buffer
- clearStreamIntervalOperator(pInfo);
- qDebug("===stream===clear semi operator");
- } else {
- freeAllPages(pInfo->pRecycledPages, pInfo->aggSup.pResultBuf);
- }
- return NULL;
+ if (pInfo->binfo.pRes->info.rows != 0) {
+ printDataBlock(pInfo->binfo.pRes, IS_FINAL_OP(pInfo) ? "interval final" : "interval semi");
+ return pInfo->binfo.pRes;
}
- printDataBlock(pInfo->binfo.pRes, IS_FINAL_OP(pInfo) ? "interval final" : "interval semi");
- return pInfo->binfo.pRes;
+
+ doSetOperatorCompleted(pOperator);
+ if (!IS_FINAL_OP(pInfo)) {
+ clearFunctionContext(&pOperator->exprSupp);
+ // semi interval operator clear disk buffer
+ clearStreamIntervalOperator(pInfo);
+ qDebug("===stream===clear semi operator");
+ } else {
+ freeAllPages(pInfo->pRecycledPages, pInfo->aggSup.pResultBuf);
+ }
+ return NULL;
} else {
if (!IS_FINAL_OP(pInfo)) {
doBuildResultDatablock(pOperator, &pInfo->binfo, &pInfo->groupResInfo, pInfo->aggSup.pResultBuf);
@@ -3316,7 +3341,13 @@ static SSDataBlock* doStreamFinalIntervalAgg(SOperatorInfo* pOperator) {
return pInfo->pPullDataRes;
}
- // we should send result first.
+ doBuildDeleteResult(pInfo->pDelWins, &pInfo->delIndex, pInfo->pDelRes);
+ if (pInfo->pDelRes->info.rows != 0) {
+ // process the rest of the data
+ printDataBlock(pInfo->pDelRes, IS_FINAL_OP(pInfo) ? "interval final" : "interval semi");
+ return pInfo->pDelRes;
+ }
+
doBuildResultDatablock(pOperator, &pInfo->binfo, &pInfo->groupResInfo, pInfo->aggSup.pResultBuf);
if (pInfo->binfo.pRes->info.rows != 0) {
printDataBlock(pInfo->binfo.pRes, IS_FINAL_OP(pInfo) ? "interval final" : "interval semi");
@@ -3330,13 +3361,6 @@ static SSDataBlock* doStreamFinalIntervalAgg(SOperatorInfo* pOperator) {
// process the rest of the data
return pInfo->pUpdateRes;
}
-
- doBuildDeleteResult(pInfo->pDelWins, &pInfo->delIndex, pInfo->pDelRes);
- if (pInfo->pDelRes->info.rows != 0) {
- // process the rest of the data
- printDataBlock(pInfo->pDelRes, IS_FINAL_OP(pInfo) ? "interval final" : "interval semi");
- return pInfo->pDelRes;
- }
return NULL;
}
@@ -5744,19 +5768,18 @@ static SSDataBlock* doStreamIntervalAgg(SOperatorInfo* pOperator) {
if (pOperator->status == OP_RES_TO_RETURN) {
doBuildDeleteResult(pInfo->pDelWins, &pInfo->delIndex, pInfo->pDelRes);
if (pInfo->pDelRes->info.rows > 0) {
- printDataBlock(pInfo->pDelRes, "single interval");
+ printDataBlock(pInfo->pDelRes, "single interval delete");
return pInfo->pDelRes;
}
doBuildResult(pOperator, pInfo->binfo.pRes, &pInfo->groupResInfo);
- // doBuildResultDatablock(pOperator, &pInfo->binfo, &pInfo->groupResInfo, pInfo->aggSup.pResultBuf);
- if (pInfo->binfo.pRes->info.rows == 0 || !hasRemainResults(&pInfo->groupResInfo)) {
- pOperator->status = OP_EXEC_DONE;
- qDebug("===stream===single interval is done");
- freeAllPages(pInfo->pRecycledPages, pInfo->aggSup.pResultBuf);
+ if (pInfo->binfo.pRes->info.rows > 0) {
+ printDataBlock(pInfo->binfo.pRes, "single interval");
+ return pInfo->binfo.pRes;
}
- printDataBlock(pInfo->binfo.pRes, "single interval");
- return pInfo->binfo.pRes->info.rows == 0 ? NULL : pInfo->binfo.pRes;
+
+ doSetOperatorCompleted(pOperator);
+ return NULL;
}
SOperatorInfo* downstream = pOperator->pDownstream[0];
@@ -5823,24 +5846,24 @@ static SSDataBlock* doStreamIntervalAgg(SOperatorInfo* pOperator) {
}
taosArraySort(pUpdated, resultrowComparAsc);
- // new disc buf
- // finalizeUpdatedResult(pOperator->exprSupp.numOfExprs, pInfo->aggSup.pResultBuf, pUpdated,
- // pSup->rowEntryInfoOffset);
initMultiResInfoFromArrayList(&pInfo->groupResInfo, pUpdated);
blockDataEnsureCapacity(pInfo->binfo.pRes, pOperator->resultInfo.capacity);
removeDeleteResults(pUpdatedMap, pInfo->pDelWins);
taosHashCleanup(pUpdatedMap);
+
doBuildDeleteResult(pInfo->pDelWins, &pInfo->delIndex, pInfo->pDelRes);
if (pInfo->pDelRes->info.rows > 0) {
- printDataBlock(pInfo->pDelRes, "single interval");
+ printDataBlock(pInfo->pDelRes, "single interval delete");
return pInfo->pDelRes;
}
- // doBuildResultDatablock(pOperator, &pInfo->binfo, &pInfo->groupResInfo, pInfo->aggSup.pResultBuf);
- // new disc buf
doBuildResult(pOperator, pInfo->binfo.pRes, &pInfo->groupResInfo);
- printDataBlock(pInfo->binfo.pRes, "single interval");
- return pInfo->binfo.pRes->info.rows == 0 ? NULL : pInfo->binfo.pRes;
+ if (pInfo->binfo.pRes->info.rows > 0) {
+ printDataBlock(pInfo->binfo.pRes, "single interval");
+ return pInfo->binfo.pRes;
+ }
+
+ return NULL;
}
void destroyStreamIntervalOperatorInfo(void* param) {
diff --git a/source/libs/function/inc/functionMgtInt.h b/source/libs/function/inc/functionMgtInt.h
index 37208c4723..9bff812c3a 100644
--- a/source/libs/function/inc/functionMgtInt.h
+++ b/source/libs/function/inc/functionMgtInt.h
@@ -50,6 +50,7 @@ extern "C" {
#define FUNC_MGT_KEEP_ORDER_FUNC FUNC_MGT_FUNC_CLASSIFICATION_MASK(21)
#define FUNC_MGT_CUMULATIVE_FUNC FUNC_MGT_FUNC_CLASSIFICATION_MASK(22)
#define FUNC_MGT_FORBID_STABLE_FUNC FUNC_MGT_FUNC_CLASSIFICATION_MASK(23)
+#define FUNC_MGT_INTERP_PC_FUNC FUNC_MGT_FUNC_CLASSIFICATION_MASK(24)
#define FUNC_MGT_TEST_MASK(val, mask) (((val) & (mask)) != 0)
diff --git a/source/libs/function/src/builtins.c b/source/libs/function/src/builtins.c
index 0677bd7d63..54455415b8 100644
--- a/source/libs/function/src/builtins.c
+++ b/source/libs/function/src/builtins.c
@@ -3146,6 +3146,16 @@ const SBuiltinFuncDefinition funcMgtBuiltins[] = {
.classification = FUNC_MGT_SYSTEM_INFO_FUNC | FUNC_MGT_SCALAR_FUNC,
.translateFunc = translateUserFunc,
},
+ {
+ .name = "_irowts",
+ .type = FUNCTION_TYPE_IROWTS,
+ .classification = FUNC_MGT_PSEUDO_COLUMN_FUNC | FUNC_MGT_INTERP_PC_FUNC,
+ .translateFunc = translateTimePseudoColumn,
+ .getEnvFunc = getTimePseudoFuncEnv,
+ .initFunc = NULL,
+ .sprocessFunc = NULL,
+ .finalizeFunc = NULL
+ },
};
// clang-format on
diff --git a/source/libs/function/src/functionMgt.c b/source/libs/function/src/functionMgt.c
index bc10ce71ae..ca8ddbc60a 100644
--- a/source/libs/function/src/functionMgt.c
+++ b/source/libs/function/src/functionMgt.c
@@ -224,6 +224,8 @@ bool fmIsInterpFunc(int32_t funcId) {
return FUNCTION_TYPE_INTERP == funcMgtBuiltins[funcId].type;
}
+bool fmIsInterpPseudoColumnFunc(int32_t funcId) { return isSpecificClassifyFunc(funcId, FUNC_MGT_INTERP_PC_FUNC); }
+
bool fmIsLastRowFunc(int32_t funcId) {
if (funcId < 0 || funcId >= funcMgtBuiltinsNum) {
return false;
diff --git a/source/libs/index/src/indexCache.c b/source/libs/index/src/indexCache.c
index 7e867db755..39bba4e269 100644
--- a/source/libs/index/src/indexCache.c
+++ b/source/libs/index/src/indexCache.c
@@ -302,6 +302,7 @@ static int32_t cacheSearchCompareFunc_JSON(void* cache, SIndexTerm* term, SIdxTR
char* p = taosMemoryCalloc(1, strlen(c->colVal) + 1);
memcpy(p, c->colVal, strlen(c->colVal));
cond = cmpFn(p + skip, term->colVal, dType);
+ taosMemoryFree(p);
}
}
if (cond == MATCH) {
diff --git a/source/libs/index/src/indexFstFile.c b/source/libs/index/src/indexFstFile.c
index 2a33ddd477..7021fdfae3 100644
--- a/source/libs/index/src/indexFstFile.c
+++ b/source/libs/index/src/indexFstFile.c
@@ -69,6 +69,8 @@ static int idxFileCtxDoReadFrom(IFileCtx* ctx, uint8_t* buf, int len, int32_t of
int32_t blkOffset = offset % kBlockSize;
int32_t blkLeft = kBlockSize - blkOffset;
+ if (offset >= ctx->file.size) return 0;
+
do {
char key[128] = {0};
idxGenLRUKey(key, ctx->file.buf, blkId);
@@ -80,24 +82,34 @@ static int idxFileCtxDoReadFrom(IFileCtx* ctx, uint8_t* buf, int len, int32_t of
memcpy(buf + total, blk->buf + blkOffset, nread);
taosLRUCacheRelease(ctx->lru, h, false);
} else {
- int32_t cacheMemSize = sizeof(SDataBlock) + kBlockSize;
+ int32_t left = ctx->file.size - offset;
+ if (left < kBlockSize) {
+ nread = TMIN(left, len);
+ int32_t bytes = taosPReadFile(ctx->file.pFile, buf + total, nread, offset);
+ assert(bytes == nread);
- SDataBlock* blk = taosMemoryCalloc(1, cacheMemSize);
- blk->blockId = blkId;
- blk->nread = taosPReadFile(ctx->file.pFile, blk->buf, kBlockSize, blkId * kBlockSize);
- assert(blk->nread <= kBlockSize);
+ total += bytes;
+ return total;
+ } else {
+ int32_t cacheMemSize = sizeof(SDataBlock) + kBlockSize;
- if (blk->nread < kBlockSize && blk->nread < len) {
- break;
- }
+ SDataBlock* blk = taosMemoryCalloc(1, cacheMemSize);
+ blk->blockId = blkId;
+ blk->nread = taosPReadFile(ctx->file.pFile, blk->buf, kBlockSize, blkId * kBlockSize);
+ assert(blk->nread <= kBlockSize);
- nread = TMIN(blkLeft, len);
- memcpy(buf + total, blk->buf + blkOffset, nread);
+ if (blk->nread < kBlockSize && blk->nread < len) {
+ break;
+ }
- LRUStatus s = taosLRUCacheInsert(ctx->lru, key, strlen(key), blk, cacheMemSize, deleteDataBlockFromLRU, NULL,
- TAOS_LRU_PRIORITY_LOW);
- if (s != TAOS_LRU_STATUS_OK) {
- return -1;
+ nread = TMIN(blkLeft, len);
+ memcpy(buf + total, blk->buf + blkOffset, nread);
+
+ LRUStatus s = taosLRUCacheInsert(ctx->lru, key, strlen(key), blk, cacheMemSize, deleteDataBlockFromLRU, NULL,
+ TAOS_LRU_PRIORITY_LOW);
+ if (s != TAOS_LRU_STATUS_OK) {
+ return -1;
+ }
}
}
total += nread;
@@ -146,9 +158,7 @@ IFileCtx* idxFileCtxCreate(WriterType type, const char* path, bool readOnly, int
} else {
ctx->file.pFile = taosOpenFile(path, TD_FILE_READ);
- int64_t size = 0;
taosFStatFile(ctx->file.pFile, &ctx->file.size, NULL);
- ctx->file.size = (int)size;
#ifdef USE_MMAP
ctx->file.ptr = (char*)tfMmapReadOnly(ctx->file.pFile, ctx->file.size);
#endif
diff --git a/source/libs/index/test/jsonUT.cc b/source/libs/index/test/jsonUT.cc
index 1911514d97..8ae3fd4135 100644
--- a/source/libs/index/test/jsonUT.cc
+++ b/source/libs/index/test/jsonUT.cc
@@ -172,9 +172,9 @@ TEST_F(JsonEnv, testWriteMillonData) {
{
std::string colName("voltagefdadfa");
std::string colVal("abxxxxxxxxxxxx");
- for (int i = 0; i < 10; i++) {
+ for (int i = 0; i < 10000; i++) {
colVal[i % colVal.size()] = '0' + i % 128;
- for (size_t i = 0; i < 100; i++) {
+ for (size_t i = 0; i < 10; i++) {
SIndexTerm* term = indexTermCreateT(1, ADD_VALUE, TSDB_DATA_TYPE_BINARY, colName.c_str(), colName.size(),
colVal.c_str(), colVal.size());
diff --git a/source/libs/nodes/src/nodesCodeFuncs.c b/source/libs/nodes/src/nodesCodeFuncs.c
index 78afadb75c..e401a3da7f 100644
--- a/source/libs/nodes/src/nodesCodeFuncs.c
+++ b/source/libs/nodes/src/nodesCodeFuncs.c
@@ -254,6 +254,7 @@ const char* nodesNodeName(ENodeType type) {
case QUERY_NODE_PHYSICAL_PLAN_STREAM_SEMI_INTERVAL:
return "PhysiStreamSemiInterval";
case QUERY_NODE_PHYSICAL_PLAN_FILL:
+ case QUERY_NODE_PHYSICAL_PLAN_STREAM_FILL:
return "PhysiFill";
case QUERY_NODE_PHYSICAL_PLAN_MERGE_SESSION:
return "PhysiSessionWindow";
@@ -4635,6 +4636,7 @@ static int32_t specificNodeToJson(const void* pObj, SJson* pJson) {
case QUERY_NODE_PHYSICAL_PLAN_STREAM_SEMI_INTERVAL:
return physiIntervalNodeToJson(pObj, pJson);
case QUERY_NODE_PHYSICAL_PLAN_FILL:
+ case QUERY_NODE_PHYSICAL_PLAN_STREAM_FILL:
return physiFillNodeToJson(pObj, pJson);
case QUERY_NODE_PHYSICAL_PLAN_MERGE_SESSION:
case QUERY_NODE_PHYSICAL_PLAN_STREAM_SESSION:
@@ -4788,6 +4790,7 @@ static int32_t jsonToSpecificNode(const SJson* pJson, void* pObj) {
case QUERY_NODE_PHYSICAL_PLAN_STREAM_SEMI_INTERVAL:
return jsonToPhysiIntervalNode(pJson, pObj);
case QUERY_NODE_PHYSICAL_PLAN_FILL:
+ case QUERY_NODE_PHYSICAL_PLAN_STREAM_FILL:
return jsonToPhysiFillNode(pJson, pObj);
case QUERY_NODE_PHYSICAL_PLAN_MERGE_SESSION:
case QUERY_NODE_PHYSICAL_PLAN_STREAM_SESSION:
diff --git a/source/libs/nodes/src/nodesMsgFuncs.c b/source/libs/nodes/src/nodesMsgFuncs.c
index 989a4f5925..8d1d332ac7 100644
--- a/source/libs/nodes/src/nodesMsgFuncs.c
+++ b/source/libs/nodes/src/nodesMsgFuncs.c
@@ -3633,6 +3633,7 @@ static int32_t specificNodeToMsg(const void* pObj, STlvEncoder* pEncoder) {
code = physiIntervalNodeToMsg(pObj, pEncoder);
break;
case QUERY_NODE_PHYSICAL_PLAN_FILL:
+ case QUERY_NODE_PHYSICAL_PLAN_STREAM_FILL:
code = physiFillNodeToMsg(pObj, pEncoder);
break;
case QUERY_NODE_PHYSICAL_PLAN_MERGE_SESSION:
@@ -3770,6 +3771,7 @@ static int32_t msgToSpecificNode(STlvDecoder* pDecoder, void* pObj) {
code = msgToPhysiIntervalNode(pDecoder, pObj);
break;
case QUERY_NODE_PHYSICAL_PLAN_FILL:
+ case QUERY_NODE_PHYSICAL_PLAN_STREAM_FILL:
code = msgToPhysiFillNode(pDecoder, pObj);
break;
case QUERY_NODE_PHYSICAL_PLAN_MERGE_SESSION:
diff --git a/source/libs/nodes/src/nodesUtilFuncs.c b/source/libs/nodes/src/nodesUtilFuncs.c
index 71e53bd9be..f8dda501e9 100644
--- a/source/libs/nodes/src/nodesUtilFuncs.c
+++ b/source/libs/nodes/src/nodesUtilFuncs.c
@@ -511,6 +511,7 @@ SNode* nodesMakeNode(ENodeType type) {
case QUERY_NODE_PHYSICAL_PLAN_STREAM_SEMI_INTERVAL:
return makeNode(type, sizeof(SStreamSemiIntervalPhysiNode));
case QUERY_NODE_PHYSICAL_PLAN_FILL:
+ case QUERY_NODE_PHYSICAL_PLAN_STREAM_FILL:
return makeNode(type, sizeof(SFillPhysiNode));
case QUERY_NODE_PHYSICAL_PLAN_MERGE_SESSION:
return makeNode(type, sizeof(SSessionWinodwPhysiNode));
@@ -1156,7 +1157,8 @@ void nodesDestroyNode(SNode* pNode) {
case QUERY_NODE_PHYSICAL_PLAN_STREAM_SEMI_INTERVAL:
destroyWinodwPhysiNode((SWinodwPhysiNode*)pNode);
break;
- case QUERY_NODE_PHYSICAL_PLAN_FILL: {
+ case QUERY_NODE_PHYSICAL_PLAN_FILL:
+ case QUERY_NODE_PHYSICAL_PLAN_STREAM_FILL: {
SFillPhysiNode* pPhyNode = (SFillPhysiNode*)pNode;
destroyPhysiNode((SPhysiNode*)pPhyNode);
nodesDestroyList(pPhyNode->pFillExprs);
diff --git a/source/libs/parser/inc/sql.y b/source/libs/parser/inc/sql.y
index cf465d6d76..225f169289 100644
--- a/source/libs/parser/inc/sql.y
+++ b/source/libs/parser/inc/sql.y
@@ -707,6 +707,7 @@ pseudo_column(A) ::= QDURATION(B).
pseudo_column(A) ::= WSTART(B). { A = createRawExprNode(pCxt, &B, createFunctionNode(pCxt, &B, NULL)); }
pseudo_column(A) ::= WEND(B). { A = createRawExprNode(pCxt, &B, createFunctionNode(pCxt, &B, NULL)); }
pseudo_column(A) ::= WDURATION(B). { A = createRawExprNode(pCxt, &B, createFunctionNode(pCxt, &B, NULL)); }
+pseudo_column(A) ::= IROWTS(B). { A = createRawExprNode(pCxt, &B, createFunctionNode(pCxt, &B, NULL)); }
function_expression(A) ::= function_name(B) NK_LP expression_list(C) NK_RP(D). { A = createRawExprNodeExt(pCxt, &B, &D, createFunctionNode(pCxt, &B, C)); }
function_expression(A) ::= star_func(B) NK_LP star_func_para_list(C) NK_RP(D). { A = createRawExprNodeExt(pCxt, &B, &D, createFunctionNode(pCxt, &B, C)); }
diff --git a/source/libs/parser/src/parAstParser.c b/source/libs/parser/src/parAstParser.c
index ec5f6c4e57..968e03f97e 100644
--- a/source/libs/parser/src/parAstParser.c
+++ b/source/libs/parser/src/parAstParser.c
@@ -407,6 +407,10 @@ static int32_t collectMetaKeyFromShowTags(SCollectMetaKeyCxt* pCxt, SShowStmt* p
if (TSDB_CODE_SUCCESS == code) {
code = reserveDbVgInfoInCache(pCxt->pParseCxt->acctId, ((SValueNode*)pStmt->pDbName)->literal, pCxt->pMetaCache);
}
+ if (TSDB_CODE_SUCCESS == code && NULL != pStmt->pTbName) {
+ code = reserveTableVgroupInCache(pCxt->pParseCxt->acctId, ((SValueNode*)pStmt->pDbName)->literal,
+ ((SValueNode*)pStmt->pTbName)->literal, pCxt->pMetaCache);
+ }
return code;
}
diff --git a/source/libs/parser/src/parTokenizer.c b/source/libs/parser/src/parTokenizer.c
index 26127be0d6..64510773a2 100644
--- a/source/libs/parser/src/parTokenizer.c
+++ b/source/libs/parser/src/parTokenizer.c
@@ -252,6 +252,7 @@ static SKeyword keywordTable[] = {
{"WITH", TK_WITH},
{"WRITE", TK_WRITE},
{"_C0", TK_ROWTS},
+ {"_IROWTS", TK_IROWTS},
{"_QDURATION", TK_QDURATION},
{"_QEND", TK_QEND},
{"_QSTART", TK_QSTART},
diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c
index c386ddf6d6..eb63630dbf 100644
--- a/source/libs/parser/src/parTranslater.c
+++ b/source/libs/parser/src/parTranslater.c
@@ -1556,6 +1556,9 @@ static int32_t translateMultiResFunc(STranslateContext* pCxt, SFunctionNode* pFu
"%s(*) is only supported in SELECTed list", pFunc->functionName);
}
}
+ if (tsKeepColumnName) {
+ strcpy(pFunc->node.userAlias, ((SExprNode*)nodesListGetNode(pFunc->pParameterList, 0))->userAlias);
+ }
return TSDB_CODE_SUCCESS;
}
@@ -2138,10 +2141,114 @@ static bool sysTableFromVnode(const char* pTable) {
static bool sysTableFromDnode(const char* pTable) { return 0 == strcmp(pTable, TSDB_INS_TABLE_DNODE_VARIABLES); }
+static int32_t getTagsTableVgroupListImpl(STranslateContext* pCxt, SName* pTargetName, SName* pName,
+ SArray** pVgroupList) {
+ if (0 == pTargetName->type) {
+ return getDBVgInfoImpl(pCxt, pName, pVgroupList);
+ }
+
+ if (TSDB_DB_NAME_T == pTargetName->type) {
+ return getDBVgInfoImpl(pCxt, pTargetName, pVgroupList);
+ }
+
+ SVgroupInfo vgInfo = {0};
+ int32_t code = getTableHashVgroupImpl(pCxt, pTargetName, &vgInfo);
+ if (TSDB_CODE_SUCCESS == code) {
+ *pVgroupList = taosArrayInit(1, sizeof(SVgroupInfo));
+ if (NULL == *pVgroupList) {
+ code = TSDB_CODE_OUT_OF_MEMORY;
+ }
+ }
+ if (TSDB_CODE_SUCCESS == code) {
+ taosArrayPush(*pVgroupList, &vgInfo);
+ }
+ return code;
+}
+
+static int32_t getTagsTableTargetNameFromOp(STranslateContext* pCxt, SOperatorNode* pOper, SName* pName) {
+ if (OP_TYPE_EQUAL != pOper->opType) {
+ return TSDB_CODE_SUCCESS;
+ }
+
+ SColumnNode* pCol = NULL;
+ SValueNode* pVal = NULL;
+ if (QUERY_NODE_COLUMN == nodeType(pOper->pLeft)) {
+ pCol = (SColumnNode*)pOper->pLeft;
+ } else if (QUERY_NODE_VALUE == nodeType(pOper->pLeft)) {
+ pVal = (SValueNode*)pOper->pLeft;
+ }
+ if (QUERY_NODE_COLUMN == nodeType(pOper->pRight)) {
+ pCol = (SColumnNode*)pOper->pRight;
+ } else if (QUERY_NODE_VALUE == nodeType(pOper->pRight)) {
+ pVal = (SValueNode*)pOper->pRight;
+ }
+ if (NULL == pCol || NULL == pVal) {
+ return TSDB_CODE_SUCCESS;
+ }
+
+ if (0 == strcmp(pCol->colName, "db_name")) {
+ return tNameSetDbName(pName, pCxt->pParseCxt->acctId, pVal->literal, strlen(pVal->literal));
+ } else if (0 == strcmp(pCol->colName, "table_name")) {
+ return tNameAddTbName(pName, pVal->literal, strlen(pVal->literal));
+ }
+
+ return TSDB_CODE_SUCCESS;
+}
+
+static void getTagsTableTargetObjName(STranslateContext* pCxt, SNode* pNode, SName* pName) {
+ if (QUERY_NODE_OPERATOR == nodeType(pNode)) {
+ getTagsTableTargetNameFromOp(pCxt, (SOperatorNode*)pNode, pName);
+ }
+}
+
+static int32_t getTagsTableTargetNameFromCond(STranslateContext* pCxt, SLogicConditionNode* pCond, SName* pName) {
+ if (LOGIC_COND_TYPE_AND != pCond->condType) {
+ return TSDB_CODE_SUCCESS;
+ }
+
+ SNode* pNode = NULL;
+ FOREACH(pNode, pCond->pParameterList) { getTagsTableTargetObjName(pCxt, pNode, pName); }
+ if ('\0' == pName->dbname[0]) {
+ pName->type = 0;
+ }
+ return TSDB_CODE_SUCCESS;
+}
+
+static int32_t getTagsTableTargetName(STranslateContext* pCxt, SNode* pWhere, SName* pName) {
+ if (NULL == pWhere) {
+ return TSDB_CODE_SUCCESS;
+ }
+
+ if (QUERY_NODE_OPERATOR == nodeType(pWhere)) {
+ return getTagsTableTargetNameFromOp(pCxt, (SOperatorNode*)pWhere, pName);
+ }
+
+ if (QUERY_NODE_LOGIC_CONDITION == nodeType(pWhere)) {
+ return getTagsTableTargetNameFromCond(pCxt, (SLogicConditionNode*)pWhere, pName);
+ }
+
+ return TSDB_CODE_SUCCESS;
+}
+
+static int32_t getTagsTableVgroupList(STranslateContext* pCxt, SName* pName, SArray** pVgroupList) {
+ if (!isSelectStmt(pCxt->pCurrStmt)) {
+ return TSDB_CODE_SUCCESS;
+ }
+ SSelectStmt* pSelect = (SSelectStmt*)pCxt->pCurrStmt;
+ SName targetName = {0};
+ int32_t code = getTagsTableTargetName(pCxt, pSelect->pWhere, &targetName);
+ if (TSDB_CODE_SUCCESS == code) {
+ code = getTagsTableVgroupListImpl(pCxt, &targetName, pName, pVgroupList);
+ }
+ return code;
+}
+
static int32_t setVnodeSysTableVgroupList(STranslateContext* pCxt, SName* pName, SRealTableNode* pRealTable) {
int32_t code = TSDB_CODE_SUCCESS;
SArray* vgroupList = NULL;
- if ('\0' != pRealTable->qualDbName[0]) {
+ if (0 == strcmp(pRealTable->table.tableName, TSDB_INS_TABLE_TAGS)) {
+ code = getTagsTableVgroupList(pCxt, pName, &vgroupList);
+ } else if ('\0' != pRealTable->qualDbName[0]) {
if (0 != strcmp(pRealTable->qualDbName, TSDB_INFORMATION_SCHEMA_DB)) {
code = getDBVgInfo(pCxt, pRealTable->qualDbName, &vgroupList);
}
@@ -2149,14 +2256,12 @@ static int32_t setVnodeSysTableVgroupList(STranslateContext* pCxt, SName* pName,
code = getDBVgInfoImpl(pCxt, pName, &vgroupList);
}
- if (TSDB_CODE_SUCCESS == code && 0 == strcmp(pRealTable->table.dbName, TSDB_INFORMATION_SCHEMA_DB) &&
- 0 == strcmp(pRealTable->table.tableName, TSDB_INS_TABLE_TAGS) && isSelectStmt(pCxt->pCurrStmt) &&
- 0 == taosArrayGetSize(vgroupList)) {
+ if (TSDB_CODE_SUCCESS == code && 0 == strcmp(pRealTable->table.tableName, TSDB_INS_TABLE_TAGS) &&
+ isSelectStmt(pCxt->pCurrStmt) && 0 == taosArrayGetSize(vgroupList)) {
((SSelectStmt*)pCxt->pCurrStmt)->isEmptyResult = true;
}
- if (TSDB_CODE_SUCCESS == code && 0 == strcmp(pRealTable->table.dbName, TSDB_INFORMATION_SCHEMA_DB) &&
- 0 == strcmp(pRealTable->table.tableName, TSDB_INS_TABLE_TABLES)) {
+ if (TSDB_CODE_SUCCESS == code && 0 == strcmp(pRealTable->table.tableName, TSDB_INS_TABLE_TABLES)) {
code = addMnodeToVgroupList(&pCxt->pParseCxt->mgmtEpSet, &vgroupList);
}
@@ -2388,8 +2493,12 @@ static SNode* createMultiResFunc(SFunctionNode* pSrcFunc, SExprNode* pExpr) {
SColumnNode* pCol = (SColumnNode*)pExpr;
len = snprintf(buf, sizeof(buf), "%s(%s.%s)", pSrcFunc->functionName, pCol->tableAlias, pCol->colName);
strncpy(pFunc->node.aliasName, buf, TMIN(len, sizeof(pFunc->node.aliasName) - 1));
- len = snprintf(buf, sizeof(buf), "%s(%s)", pSrcFunc->functionName, pCol->colName);
- strncpy(pFunc->node.userAlias, buf, TMIN(len, sizeof(pFunc->node.userAlias) - 1));
+ if (tsKeepColumnName) {
+ strcpy(pFunc->node.userAlias, pCol->colName);
+ } else {
+ len = snprintf(buf, sizeof(buf), "%s(%s)", pSrcFunc->functionName, pCol->colName);
+ strncpy(pFunc->node.userAlias, buf, TMIN(len, sizeof(pFunc->node.userAlias) - 1));
+ }
} else {
len = snprintf(buf, sizeof(buf), "%s(%s)", pSrcFunc->functionName, pExpr->aliasName);
strncpy(pFunc->node.aliasName, buf, TMIN(len, sizeof(pFunc->node.aliasName) - 1));
diff --git a/source/libs/parser/src/sql.c b/source/libs/parser/src/sql.c
index 2ccdd2cdf2..9acf6ffcdd 100644
--- a/source/libs/parser/src/sql.c
+++ b/source/libs/parser/src/sql.c
@@ -104,26 +104,26 @@
#endif
/************* Begin control #defines *****************************************/
#define YYCODETYPE unsigned short int
-#define YYNOCODE 447
+#define YYNOCODE 448
#define YYACTIONTYPE unsigned short int
#define ParseTOKENTYPE SToken
typedef union {
int yyinit;
ParseTOKENTYPE yy0;
- int64_t yy57;
- EJoinType yy114;
- SNodeList* yy148;
- int8_t yy167;
- int32_t yy172;
- bool yy287;
- SAlterOption yy323;
- EOrder yy362;
- SNode* yy392;
- SToken yy677;
- EFillMode yy708;
- EOperatorType yy758;
- ENullOrder yy781;
- SDataType yy838;
+ bool yy89;
+ EFillMode yy102;
+ SNodeList* yy152;
+ int64_t yy221;
+ EOperatorType yy380;
+ EOrder yy386;
+ int8_t yy439;
+ int32_t yy452;
+ ENullOrder yy585;
+ EJoinType yy596;
+ SNode* yy616;
+ SAlterOption yy669;
+ SToken yy673;
+ SDataType yy784;
} YYMINORTYPE;
#ifndef YYSTACKDEPTH
#define YYSTACKDEPTH 100
@@ -140,16 +140,16 @@ typedef union {
#define ParseCTX_STORE
#define YYFALLBACK 1
#define YYNSTATE 689
-#define YYNRULE 518
-#define YYNTOKEN 315
+#define YYNRULE 519
+#define YYNTOKEN 316
#define YY_MAX_SHIFT 688
-#define YY_MIN_SHIFTREDUCE 1016
-#define YY_MAX_SHIFTREDUCE 1533
-#define YY_ERROR_ACTION 1534
-#define YY_ACCEPT_ACTION 1535
-#define YY_NO_ACTION 1536
-#define YY_MIN_REDUCE 1537
-#define YY_MAX_REDUCE 2054
+#define YY_MIN_SHIFTREDUCE 1017
+#define YY_MAX_SHIFTREDUCE 1535
+#define YY_ERROR_ACTION 1536
+#define YY_ACCEPT_ACTION 1537
+#define YY_NO_ACTION 1538
+#define YY_MIN_REDUCE 1539
+#define YY_MAX_REDUCE 2057
/************* End control #defines *******************************************/
#define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0])))
@@ -216,752 +216,798 @@ typedef union {
** yy_default[] Default action for each state.
**
*********** Begin parsing tables **********************************************/
-#define YY_ACTTAB_COUNT (2818)
+#define YY_ACTTAB_COUNT (3046)
static const YYACTIONTYPE yy_action[] = {
- /* 0 */ 1858, 1560, 443, 1858, 444, 1572, 451, 1872, 444, 1572,
- /* 10 */ 1675, 1854, 44, 42, 1854, 351, 13, 12, 1729, 1731,
- /* 20 */ 346, 1854, 1316, 43, 41, 40, 39, 38, 1342, 2030,
- /* 30 */ 155, 77, 1549, 1394, 1049, 1314, 1890, 1850, 1856, 334,
- /* 40 */ 1850, 1856, 340, 1840, 582, 125, 1343, 1850, 1856, 1840,
- /* 50 */ 588, 594, 30, 588, 1679, 542, 1389, 1929, 37, 36,
- /* 60 */ 588, 17, 43, 41, 40, 39, 38, 1872, 1322, 44,
- /* 70 */ 42, 1464, 1870, 581, 1053, 1054, 1904, 346, 566, 1316,
- /* 80 */ 97, 1871, 1873, 598, 1875, 1876, 593, 1066, 588, 1065,
- /* 90 */ 1394, 62, 1314, 167, 1, 1957, 1890, 34, 265, 339,
- /* 100 */ 1953, 166, 479, 581, 595, 578, 1341, 2025, 1736, 1840,
- /* 110 */ 1437, 594, 172, 1389, 1723, 333, 685, 1067, 17, 527,
- /* 120 */ 1983, 1523, 565, 170, 1734, 1322, 331, 2026, 567, 1784,
- /* 130 */ 1396, 1397, 596, 460, 132, 179, 1904, 1538, 1211, 1212,
- /* 140 */ 98, 345, 1873, 598, 1875, 1876, 593, 46, 588, 1890,
- /* 150 */ 442, 1, 1066, 446, 1065, 1957, 58, 560, 109, 312,
- /* 160 */ 1953, 108, 107, 106, 105, 104, 103, 102, 101, 100,
- /* 170 */ 2025, 130, 74, 685, 1972, 73, 1317, 46, 1315, 47,
- /* 180 */ 58, 58, 1067, 7, 1559, 565, 170, 1396, 1397, 264,
- /* 190 */ 2026, 567, 580, 168, 1965, 1966, 559, 1970, 1730, 1731,
- /* 200 */ 1320, 1321, 1969, 1371, 1372, 1374, 1375, 1376, 1377, 1378,
- /* 210 */ 1379, 590, 586, 1387, 1388, 1390, 1391, 1392, 1393, 1395,
- /* 220 */ 1398, 3, 203, 1537, 37, 36, 1840, 581, 43, 41,
- /* 230 */ 40, 39, 38, 1317, 1342, 1315, 160, 231, 232, 173,
- /* 240 */ 1468, 477, 473, 469, 465, 202, 1341, 118, 117, 116,
- /* 250 */ 115, 114, 113, 112, 111, 110, 391, 1320, 1321, 26,
- /* 260 */ 1371, 1372, 1374, 1375, 1376, 1377, 1378, 1379, 590, 586,
- /* 270 */ 1387, 1388, 1390, 1391, 1392, 1393, 1395, 1398, 3, 44,
- /* 280 */ 42, 485, 78, 77, 1859, 200, 58, 346, 1558, 1316,
- /* 290 */ 450, 1490, 173, 446, 308, 1854, 310, 629, 578, 530,
- /* 300 */ 1394, 173, 1314, 484, 109, 217, 1680, 108, 107, 106,
- /* 310 */ 105, 104, 103, 102, 101, 100, 144, 143, 626, 625,
- /* 320 */ 624, 1850, 1856, 1389, 173, 173, 173, 132, 17, 2030,
- /* 330 */ 1840, 1872, 225, 1341, 588, 1322, 44, 42, 1736, 553,
- /* 340 */ 1488, 1489, 1491, 1492, 346, 350, 1316, 578, 199, 193,
- /* 350 */ 448, 198, 561, 1557, 1734, 456, 1339, 1394, 2025, 1314,
- /* 360 */ 1890, 1, 79, 310, 130, 540, 530, 384, 582, 383,
- /* 370 */ 58, 191, 81, 1840, 2029, 594, 132, 119, 2026, 2028,
- /* 380 */ 1389, 380, 1457, 685, 481, 17, 169, 1965, 1966, 142,
- /* 390 */ 1970, 1662, 1322, 1404, 1684, 1840, 1870, 1396, 1397, 1341,
- /* 400 */ 1904, 382, 378, 1316, 97, 1871, 1873, 598, 1875, 1876,
- /* 410 */ 593, 1556, 588, 121, 631, 556, 1314, 167, 1, 1957,
- /* 420 */ 623, 37, 36, 339, 1953, 43, 41, 40, 39, 38,
- /* 430 */ 1373, 173, 11, 1344, 9, 262, 1965, 577, 428, 576,
- /* 440 */ 685, 51, 2025, 1317, 1984, 1315, 1661, 218, 349, 1322,
- /* 450 */ 1714, 460, 332, 1840, 1396, 1397, 153, 565, 170, 1659,
- /* 460 */ 153, 1555, 2026, 567, 544, 1686, 1929, 1320, 1321, 1686,
- /* 470 */ 1371, 1372, 1374, 1375, 1376, 1377, 1378, 1379, 590, 586,
- /* 480 */ 1387, 1388, 1390, 1391, 1392, 1393, 1395, 1398, 3, 230,
- /* 490 */ 11, 40, 39, 38, 183, 182, 1340, 685, 562, 557,
- /* 500 */ 1317, 322, 1315, 1840, 1169, 620, 619, 618, 1173, 617,
- /* 510 */ 1175, 1176, 616, 1178, 613, 173, 1184, 610, 1186, 1187,
- /* 520 */ 607, 604, 1129, 1787, 1320, 1321, 1554, 1371, 1372, 1374,
- /* 530 */ 1375, 1376, 1377, 1378, 1379, 590, 586, 1387, 1388, 1390,
- /* 540 */ 1391, 1392, 1393, 1395, 1398, 3, 44, 42, 540, 1294,
- /* 550 */ 1295, 2030, 629, 11, 346, 1131, 1316, 1317, 1322, 1315,
- /* 560 */ 52, 323, 1343, 321, 320, 629, 483, 1394, 1840, 1314,
- /* 570 */ 485, 144, 143, 626, 625, 624, 241, 1684, 507, 1872,
- /* 580 */ 2025, 1320, 1321, 1373, 144, 143, 626, 625, 624, 352,
- /* 590 */ 1389, 505, 484, 503, 158, 1341, 2029, 153, 1872, 1641,
- /* 600 */ 2026, 2027, 1322, 44, 42, 1399, 1686, 540, 1890, 1660,
- /* 610 */ 1783, 346, 305, 1316, 643, 94, 595, 490, 489, 175,
- /* 620 */ 1553, 1840, 540, 594, 1394, 1736, 1314, 1890, 8, 127,
- /* 630 */ 656, 654, 317, 1425, 389, 595, 1684, 1676, 1552, 1551,
- /* 640 */ 1840, 1734, 594, 128, 596, 1548, 1928, 1389, 1904, 540,
- /* 650 */ 685, 1684, 292, 345, 1873, 598, 1875, 1876, 593, 1322,
- /* 660 */ 588, 119, 1840, 1870, 1396, 1397, 1547, 1904, 486, 631,
- /* 670 */ 566, 97, 1871, 1873, 598, 1875, 1876, 593, 1684, 588,
- /* 680 */ 1840, 1840, 2025, 1546, 2045, 8, 1957, 1840, 37, 36,
- /* 690 */ 339, 1953, 43, 41, 40, 39, 38, 565, 170, 2025,
- /* 700 */ 1991, 31, 2026, 567, 540, 264, 1344, 685, 1840, 153,
- /* 710 */ 1317, 1430, 1315, 570, 565, 170, 390, 32, 1687, 2026,
- /* 720 */ 567, 1396, 1397, 37, 36, 1840, 1461, 43, 41, 40,
- /* 730 */ 39, 38, 1545, 1684, 1320, 1321, 1544, 1371, 1372, 1374,
- /* 740 */ 1375, 1376, 1377, 1378, 1379, 590, 586, 1387, 1388, 1390,
- /* 750 */ 1391, 1392, 1393, 1395, 1398, 3, 540, 37, 36, 1972,
- /* 760 */ 1535, 43, 41, 40, 39, 38, 518, 1317, 398, 1315,
- /* 770 */ 1782, 87, 305, 173, 1840, 1500, 37, 36, 1840, 1373,
- /* 780 */ 43, 41, 40, 39, 38, 1684, 1543, 1968, 1542, 1972,
- /* 790 */ 1541, 1320, 1321, 1677, 1371, 1372, 1374, 1375, 1376, 1377,
- /* 800 */ 1378, 1379, 590, 586, 1387, 1388, 1390, 1391, 1392, 1393,
- /* 810 */ 1395, 1398, 3, 44, 42, 1777, 498, 1967, 1053, 1054,
- /* 820 */ 361, 346, 1777, 1316, 1977, 1457, 178, 540, 1840, 540,
- /* 830 */ 1840, 508, 1840, 181, 1394, 540, 1314, 523, 540, 413,
- /* 840 */ 2029, 414, 527, 540, 1480, 216, 1872, 458, 540, 240,
- /* 850 */ 459, 627, 1785, 1325, 1727, 1681, 1684, 1389, 1684, 501,
- /* 860 */ 136, 1540, 1673, 495, 1684, 1872, 2025, 1684, 215, 1322,
- /* 870 */ 44, 42, 1684, 1736, 1550, 1890, 628, 1684, 346, 1727,
- /* 880 */ 1316, 2031, 170, 595, 540, 45, 2026, 567, 1840, 1735,
- /* 890 */ 594, 1394, 2030, 1314, 1890, 8, 519, 644, 1827, 1654,
- /* 900 */ 540, 1669, 595, 1840, 540, 64, 540, 1840, 63, 594,
- /* 910 */ 573, 1870, 524, 1684, 1389, 1904, 235, 685, 536, 156,
- /* 920 */ 1871, 1873, 598, 1875, 1876, 593, 1322, 588, 571, 1684,
- /* 930 */ 1870, 1396, 1397, 1684, 1904, 1684, 1530, 1265, 97, 1871,
- /* 940 */ 1873, 598, 1875, 1876, 593, 368, 588, 493, 492, 48,
- /* 950 */ 4, 2045, 1, 1957, 126, 392, 277, 339, 1953, 1714,
- /* 960 */ 545, 1994, 1460, 1589, 1642, 488, 491, 2019, 393, 540,
- /* 970 */ 208, 487, 210, 206, 685, 209, 585, 1317, 385, 1315,
- /* 980 */ 526, 538, 50, 522, 1523, 494, 37, 36, 1396, 1397,
- /* 990 */ 43, 41, 40, 39, 38, 523, 1328, 523, 1684, 1532,
- /* 1000 */ 1533, 1320, 1321, 1671, 1371, 1372, 1374, 1375, 1376, 1377,
- /* 1010 */ 1378, 1379, 590, 586, 1387, 1388, 1390, 1391, 1392, 1393,
- /* 1020 */ 1395, 1398, 3, 307, 2025, 1339, 2025, 1584, 1582, 1529,
- /* 1030 */ 212, 540, 421, 211, 1317, 433, 1315, 13, 12, 2031,
- /* 1040 */ 170, 2031, 170, 539, 2026, 567, 2026, 567, 214, 496,
- /* 1050 */ 499, 213, 406, 229, 434, 224, 408, 1667, 1320, 1321,
- /* 1060 */ 1684, 1371, 1372, 1374, 1375, 1376, 1377, 1378, 1379, 590,
- /* 1070 */ 586, 1387, 1388, 1390, 1391, 1392, 1393, 1395, 1398, 3,
- /* 1080 */ 37, 36, 60, 137, 43, 41, 40, 39, 38, 154,
- /* 1090 */ 540, 540, 637, 569, 283, 80, 93, 1997, 399, 221,
- /* 1100 */ 638, 589, 266, 353, 1324, 233, 90, 141, 281, 66,
- /* 1110 */ 395, 1599, 65, 259, 1113, 1415, 142, 622, 60, 1684,
- /* 1120 */ 1684, 245, 1111, 1861, 554, 478, 253, 574, 187, 439,
- /* 1130 */ 437, 1891, 357, 1573, 1431, 533, 1724, 1987, 432, 1093,
- /* 1140 */ 578, 427, 426, 425, 424, 423, 420, 419, 418, 417,
- /* 1150 */ 416, 412, 411, 410, 409, 403, 402, 401, 400, 237,
- /* 1160 */ 397, 396, 319, 45, 45, 58, 261, 602, 1162, 132,
- /* 1170 */ 1487, 1863, 1094, 248, 662, 661, 660, 659, 356, 141,
- /* 1180 */ 658, 657, 133, 652, 651, 650, 649, 648, 647, 646,
- /* 1190 */ 645, 146, 641, 640, 639, 355, 354, 636, 635, 634,
- /* 1200 */ 633, 632, 142, 96, 37, 36, 130, 1578, 43, 41,
- /* 1210 */ 40, 39, 38, 122, 1872, 1380, 276, 2, 579, 1190,
- /* 1220 */ 141, 258, 5, 362, 318, 367, 1281, 273, 171, 1965,
- /* 1230 */ 1966, 1194, 1970, 180, 1339, 152, 415, 394, 1779, 71,
- /* 1240 */ 70, 388, 422, 1890, 177, 429, 430, 1327, 435, 436,
- /* 1250 */ 431, 595, 184, 438, 1201, 680, 1840, 313, 594, 359,
- /* 1260 */ 440, 306, 1345, 441, 376, 1199, 374, 370, 366, 363,
- /* 1270 */ 360, 449, 145, 1347, 452, 190, 523, 192, 453, 1870,
- /* 1280 */ 1346, 1348, 454, 1904, 195, 455, 1872, 97, 1871, 1873,
- /* 1290 */ 598, 1875, 1876, 593, 457, 588, 197, 75, 129, 1423,
- /* 1300 */ 140, 1928, 1957, 76, 201, 2025, 339, 1953, 1872, 461,
- /* 1310 */ 173, 480, 482, 120, 309, 1890, 1674, 205, 1670, 207,
- /* 1320 */ 2031, 170, 147, 595, 148, 2026, 567, 1602, 1840, 1672,
- /* 1330 */ 594, 1668, 149, 150, 510, 512, 1818, 1890, 274, 219,
- /* 1340 */ 514, 513, 517, 222, 520, 595, 525, 226, 552, 528,
- /* 1350 */ 1840, 1870, 594, 328, 1424, 1904, 1817, 1789, 138, 97,
- /* 1360 */ 1871, 1873, 598, 1875, 1876, 593, 531, 588, 139, 330,
- /* 1370 */ 534, 535, 2045, 1870, 1957, 1872, 84, 1904, 339, 1953,
- /* 1380 */ 275, 97, 1871, 1873, 598, 1875, 1876, 593, 1976, 588,
- /* 1390 */ 86, 493, 492, 1685, 1932, 1344, 1957, 1988, 126, 555,
- /* 1400 */ 339, 1953, 1998, 548, 1890, 243, 550, 551, 6, 488,
- /* 1410 */ 491, 335, 595, 558, 247, 487, 358, 1840, 564, 594,
- /* 1420 */ 2003, 252, 33, 343, 1418, 1419, 1420, 1421, 1422, 1426,
- /* 1430 */ 1427, 1428, 1429, 523, 1979, 2002, 549, 547, 336, 254,
- /* 1440 */ 1870, 161, 255, 546, 1904, 256, 257, 1872, 97, 1871,
- /* 1450 */ 1873, 598, 1875, 1876, 593, 260, 588, 575, 1457, 572,
- /* 1460 */ 131, 1930, 2025, 1957, 2024, 1343, 57, 339, 1953, 2048,
- /* 1470 */ 1973, 688, 1938, 88, 600, 1728, 1890, 2031, 170, 1655,
- /* 1480 */ 278, 269, 2026, 567, 595, 272, 681, 682, 684, 1840,
- /* 1490 */ 49, 594, 304, 280, 1834, 282, 1833, 68, 290, 164,
- /* 1500 */ 1832, 1831, 301, 300, 678, 674, 670, 666, 270, 69,
- /* 1510 */ 1828, 364, 1870, 365, 1308, 1309, 1904, 176, 369, 1826,
- /* 1520 */ 97, 1871, 1873, 598, 1875, 1876, 593, 371, 588, 1872,
- /* 1530 */ 372, 373, 1825, 543, 375, 1957, 342, 341, 377, 339,
- /* 1540 */ 1953, 1824, 1823, 1822, 379, 95, 1330, 381, 238, 1284,
- /* 1550 */ 1283, 1800, 1799, 386, 387, 1798, 1797, 1394, 1890, 1323,
- /* 1560 */ 1253, 1772, 1771, 1770, 1769, 134, 595, 1768, 1767, 511,
- /* 1570 */ 72, 1840, 1766, 594, 1765, 1764, 1763, 1762, 404, 405,
- /* 1580 */ 1389, 537, 1761, 1872, 407, 1760, 523, 1759, 1758, 1757,
- /* 1590 */ 1756, 1755, 1322, 1255, 1870, 1754, 1753, 1752, 1904, 1751,
- /* 1600 */ 1750, 1749, 98, 1871, 1873, 598, 1875, 1876, 593, 1872,
- /* 1610 */ 588, 1748, 1890, 1747, 227, 2025, 1746, 1957, 1745, 1744,
- /* 1620 */ 595, 1956, 1953, 135, 1743, 1840, 1742, 594, 1741, 1740,
- /* 1630 */ 2031, 170, 1288, 1739, 220, 2026, 567, 1738, 1890, 1737,
- /* 1640 */ 584, 1137, 1604, 1603, 1601, 1569, 592, 188, 1870, 1056,
- /* 1650 */ 185, 1840, 1904, 594, 186, 165, 98, 1871, 1873, 598,
- /* 1660 */ 1875, 1876, 593, 445, 588, 1055, 123, 447, 1568, 1813,
- /* 1670 */ 189, 1957, 1807, 124, 1870, 583, 1953, 1796, 1904, 1872,
- /* 1680 */ 194, 1795, 298, 1871, 1873, 598, 1875, 1876, 593, 591,
- /* 1690 */ 588, 541, 1922, 196, 1781, 1663, 1600, 1598, 1086, 462,
- /* 1700 */ 1331, 463, 1326, 1596, 464, 466, 467, 1594, 1890, 470,
- /* 1710 */ 468, 1592, 472, 471, 474, 476, 595, 1581, 1580, 1565,
- /* 1720 */ 1665, 1840, 475, 594, 1334, 1336, 59, 1205, 1204, 1664,
- /* 1730 */ 653, 655, 204, 1128, 1127, 1124, 586, 1387, 1388, 1390,
- /* 1740 */ 1391, 1392, 1393, 1872, 1870, 1123, 1122, 1590, 1904, 324,
- /* 1750 */ 1585, 497, 157, 1871, 1873, 598, 1875, 1876, 593, 325,
- /* 1760 */ 588, 1583, 326, 500, 1564, 502, 1563, 504, 1562, 1872,
- /* 1770 */ 506, 99, 1890, 1300, 1812, 1806, 25, 53, 1290, 515,
- /* 1780 */ 595, 151, 223, 516, 1794, 1840, 1872, 594, 1792, 2030,
- /* 1790 */ 521, 1793, 1791, 1790, 1298, 327, 228, 529, 1890, 18,
- /* 1800 */ 1788, 532, 234, 329, 568, 2046, 595, 82, 1870, 1780,
- /* 1810 */ 83, 1840, 1904, 594, 236, 1890, 98, 1871, 1873, 598,
- /* 1820 */ 1875, 1876, 593, 592, 588, 85, 90, 239, 1840, 1406,
- /* 1830 */ 594, 1957, 19, 20, 1870, 15, 1954, 1405, 1904, 1872,
- /* 1840 */ 27, 56, 299, 1871, 1873, 598, 1875, 1876, 593, 1502,
- /* 1850 */ 588, 1870, 242, 250, 246, 1904, 1872, 244, 1484, 298,
- /* 1860 */ 1871, 1873, 598, 1875, 1876, 593, 159, 588, 1890, 1923,
- /* 1870 */ 10, 1486, 249, 28, 251, 1479, 595, 1861, 29, 89,
- /* 1880 */ 61, 1840, 1522, 594, 22, 1890, 1517, 1516, 337, 1523,
- /* 1890 */ 21, 16, 1521, 595, 1520, 338, 1454, 1453, 1840, 54,
- /* 1900 */ 594, 263, 1860, 1332, 1870, 55, 1907, 162, 1904, 1416,
- /* 1910 */ 12, 1872, 156, 1871, 1873, 598, 1875, 1876, 593, 1384,
- /* 1920 */ 588, 1870, 1382, 587, 35, 1904, 163, 1381, 1872, 294,
- /* 1930 */ 1871, 1873, 598, 1875, 1876, 593, 14, 588, 23, 174,
- /* 1940 */ 1890, 1356, 1364, 24, 597, 599, 601, 348, 595, 1191,
- /* 1950 */ 605, 608, 603, 1840, 1995, 594, 611, 1890, 1188, 606,
- /* 1960 */ 614, 1185, 344, 609, 612, 595, 1179, 1177, 615, 1168,
- /* 1970 */ 1840, 1200, 594, 563, 621, 267, 1870, 91, 92, 1872,
- /* 1980 */ 1904, 67, 1183, 1196, 157, 1871, 1873, 598, 1875, 1876,
- /* 1990 */ 593, 1182, 588, 1870, 1181, 1084, 1180, 1904, 1872, 630,
- /* 2000 */ 1119, 299, 1871, 1873, 598, 1875, 1876, 593, 1890, 588,
- /* 2010 */ 1118, 1117, 1116, 347, 1115, 1114, 595, 1112, 1110, 1109,
- /* 2020 */ 1108, 1840, 642, 594, 1135, 1106, 1105, 1890, 1104, 268,
- /* 2030 */ 1103, 1102, 1101, 1100, 1099, 595, 1132, 2047, 1130, 1096,
- /* 2040 */ 1840, 1090, 594, 1095, 1870, 1092, 1091, 1089, 1904, 1597,
- /* 2050 */ 663, 1595, 299, 1871, 1873, 598, 1875, 1876, 593, 1872,
- /* 2060 */ 588, 665, 667, 509, 664, 668, 1593, 1904, 669, 671,
- /* 2070 */ 672, 292, 1871, 1873, 598, 1875, 1876, 593, 673, 588,
- /* 2080 */ 1591, 675, 676, 677, 1579, 679, 1561, 1046, 1890, 271,
- /* 2090 */ 683, 1536, 1318, 279, 686, 687, 595, 1536, 1536, 1536,
- /* 2100 */ 1536, 1840, 1536, 594, 1536, 1536, 1536, 1536, 1536, 1536,
- /* 2110 */ 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1872, 1536, 1536,
- /* 2120 */ 1536, 1536, 1536, 1536, 1870, 1536, 1536, 1536, 1904, 1536,
- /* 2130 */ 1536, 1536, 284, 1871, 1873, 598, 1875, 1876, 593, 1872,
- /* 2140 */ 588, 1536, 1536, 1536, 1536, 1536, 1890, 1536, 1536, 1536,
- /* 2150 */ 1536, 1536, 1536, 1536, 595, 1536, 1536, 1536, 1536, 1840,
- /* 2160 */ 1536, 594, 1536, 1536, 1536, 1536, 1536, 1536, 1890, 1536,
- /* 2170 */ 1536, 1536, 1536, 1536, 1536, 1536, 595, 1536, 1536, 1536,
- /* 2180 */ 1536, 1840, 1870, 594, 1536, 1536, 1904, 1536, 1536, 1536,
- /* 2190 */ 285, 1871, 1873, 598, 1875, 1876, 593, 1536, 588, 1536,
- /* 2200 */ 1872, 1536, 1536, 1536, 1870, 1536, 1536, 1536, 1904, 1536,
- /* 2210 */ 1536, 1536, 286, 1871, 1873, 598, 1875, 1876, 593, 1872,
- /* 2220 */ 588, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1890,
- /* 2230 */ 1536, 1536, 1536, 1536, 1536, 1536, 1536, 595, 1536, 1536,
- /* 2240 */ 1536, 1536, 1840, 1536, 594, 1536, 1536, 1536, 1890, 1536,
- /* 2250 */ 1536, 1536, 1536, 1536, 1536, 1536, 595, 1536, 1536, 1536,
- /* 2260 */ 1536, 1840, 1536, 594, 1536, 1870, 1536, 1536, 1536, 1904,
- /* 2270 */ 1536, 1536, 1872, 293, 1871, 1873, 598, 1875, 1876, 593,
- /* 2280 */ 1536, 588, 1536, 1536, 1870, 1536, 1536, 1536, 1904, 1872,
- /* 2290 */ 1536, 1536, 295, 1871, 1873, 598, 1875, 1876, 593, 1536,
- /* 2300 */ 588, 1890, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 595,
- /* 2310 */ 1536, 1536, 1536, 1536, 1840, 1536, 594, 1536, 1890, 1536,
- /* 2320 */ 1536, 1536, 1536, 1536, 1536, 1536, 595, 1536, 1536, 1536,
- /* 2330 */ 1536, 1840, 1872, 594, 1536, 1536, 1536, 1870, 1536, 1536,
- /* 2340 */ 1536, 1904, 1536, 1536, 1536, 287, 1871, 1873, 598, 1875,
- /* 2350 */ 1876, 593, 1536, 588, 1870, 1536, 1872, 1536, 1904, 1536,
- /* 2360 */ 1536, 1890, 296, 1871, 1873, 598, 1875, 1876, 593, 595,
- /* 2370 */ 588, 1536, 1536, 1536, 1840, 1872, 594, 1536, 1536, 1536,
- /* 2380 */ 1536, 1536, 1536, 1536, 1536, 1890, 1536, 1536, 1536, 1536,
- /* 2390 */ 1536, 1536, 1536, 595, 1536, 1536, 1536, 1870, 1840, 1536,
- /* 2400 */ 594, 1904, 1536, 1536, 1890, 288, 1871, 1873, 598, 1875,
- /* 2410 */ 1876, 593, 595, 588, 1536, 1536, 1536, 1840, 1536, 594,
- /* 2420 */ 1536, 1870, 1536, 1536, 1536, 1904, 1536, 1536, 1536, 297,
- /* 2430 */ 1871, 1873, 598, 1875, 1876, 593, 1872, 588, 1536, 1536,
- /* 2440 */ 1870, 1536, 1536, 1536, 1904, 1536, 1536, 1536, 289, 1871,
- /* 2450 */ 1873, 598, 1875, 1876, 593, 1872, 588, 1536, 1536, 1536,
- /* 2460 */ 1536, 1536, 1536, 1536, 1536, 1890, 1536, 1536, 1536, 1536,
- /* 2470 */ 1536, 1536, 1536, 595, 1536, 1536, 1536, 1536, 1840, 1536,
- /* 2480 */ 594, 1536, 1536, 1536, 1890, 1536, 1536, 1536, 1536, 1536,
- /* 2490 */ 1536, 1536, 595, 1536, 1536, 1536, 1536, 1840, 1536, 594,
- /* 2500 */ 1536, 1870, 1536, 1536, 1536, 1904, 1536, 1536, 1536, 302,
- /* 2510 */ 1871, 1873, 598, 1875, 1876, 593, 1536, 588, 1536, 1872,
- /* 2520 */ 1870, 1536, 1536, 1536, 1904, 1536, 1536, 1536, 303, 1871,
- /* 2530 */ 1873, 598, 1875, 1876, 593, 1536, 588, 1872, 1536, 1536,
- /* 2540 */ 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1890, 1536,
- /* 2550 */ 1536, 1536, 1536, 1536, 1536, 1536, 595, 1536, 1536, 1536,
- /* 2560 */ 1536, 1840, 1536, 594, 1536, 1536, 1890, 1536, 1536, 1536,
- /* 2570 */ 1536, 1536, 1536, 1536, 595, 1536, 1536, 1536, 1536, 1840,
- /* 2580 */ 1872, 594, 1536, 1536, 1870, 1536, 1536, 1536, 1904, 1536,
- /* 2590 */ 1536, 1536, 1884, 1871, 1873, 598, 1875, 1876, 593, 1536,
- /* 2600 */ 588, 1536, 1870, 1536, 1536, 1536, 1904, 1536, 1536, 1890,
- /* 2610 */ 1883, 1871, 1873, 598, 1875, 1876, 593, 595, 588, 1536,
- /* 2620 */ 1536, 1536, 1840, 1536, 594, 1536, 1536, 1536, 1536, 1536,
- /* 2630 */ 1536, 1536, 1536, 1872, 1536, 1536, 1536, 1536, 1536, 1536,
- /* 2640 */ 1536, 1536, 1536, 1536, 1536, 1870, 1536, 1536, 1536, 1904,
- /* 2650 */ 1872, 1536, 1536, 1882, 1871, 1873, 598, 1875, 1876, 593,
- /* 2660 */ 1536, 588, 1890, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
- /* 2670 */ 595, 1536, 1536, 1536, 1536, 1840, 1536, 594, 1536, 1890,
- /* 2680 */ 1536, 1536, 1536, 1536, 1536, 1536, 1536, 595, 1536, 1536,
- /* 2690 */ 1536, 1536, 1840, 1872, 594, 1536, 1536, 1536, 1870, 1536,
- /* 2700 */ 1536, 1536, 1904, 1536, 1536, 1536, 314, 1871, 1873, 598,
- /* 2710 */ 1875, 1876, 593, 1536, 588, 1870, 1536, 1872, 1536, 1904,
- /* 2720 */ 1536, 1536, 1890, 315, 1871, 1873, 598, 1875, 1876, 593,
- /* 2730 */ 595, 588, 1536, 1536, 1536, 1840, 1872, 594, 1536, 1536,
- /* 2740 */ 1536, 1536, 1536, 1536, 1536, 1536, 1890, 1536, 1536, 1536,
- /* 2750 */ 1536, 1536, 1536, 1536, 595, 1536, 1536, 1536, 1870, 1840,
- /* 2760 */ 1536, 594, 1904, 1536, 1536, 1890, 311, 1871, 1873, 598,
- /* 2770 */ 1875, 1876, 593, 595, 588, 1536, 1536, 1536, 1840, 1536,
- /* 2780 */ 594, 1536, 1870, 1536, 1536, 1536, 1904, 1536, 1536, 1536,
- /* 2790 */ 316, 1871, 1873, 598, 1875, 1876, 593, 1536, 588, 1536,
- /* 2800 */ 1536, 1870, 1536, 1536, 1536, 1904, 1536, 1536, 1536, 291,
- /* 2810 */ 1871, 1873, 598, 1875, 1876, 593, 1536, 588,
+ /* 0 */ 1860, 1789, 443, 1860, 444, 1574, 451, 1874, 444, 1574,
+ /* 10 */ 1677, 1856, 44, 42, 1856, 351, 540, 1675, 1731, 1733,
+ /* 20 */ 346, 1856, 1317, 43, 41, 40, 39, 38, 52, 2033,
+ /* 30 */ 40, 39, 38, 1396, 1050, 1315, 1892, 1852, 1858, 334,
+ /* 40 */ 1852, 1858, 340, 1343, 582, 1686, 1344, 1852, 1858, 1842,
+ /* 50 */ 588, 594, 30, 588, 442, 581, 1391, 446, 37, 36,
+ /* 60 */ 588, 17, 43, 41, 40, 39, 38, 1874, 1323, 44,
+ /* 70 */ 42, 1466, 1872, 1130, 1054, 1055, 1907, 346, 566, 1317,
+ /* 80 */ 97, 1873, 1875, 598, 1877, 1878, 593, 1067, 588, 1066,
+ /* 90 */ 1396, 1562, 1315, 167, 1, 1960, 1892, 1732, 1733, 339,
+ /* 100 */ 1956, 77, 479, 1738, 595, 578, 1132, 2028, 1470, 1842,
+ /* 110 */ 333, 594, 172, 1391, 1342, 125, 685, 1068, 17, 1736,
+ /* 120 */ 1986, 1525, 565, 170, 1681, 1323, 1663, 2029, 567, 46,
+ /* 130 */ 1398, 1399, 596, 1842, 132, 62, 1907, 1540, 1561, 225,
+ /* 140 */ 98, 345, 1875, 598, 1877, 1878, 593, 1975, 588, 1892,
+ /* 150 */ 87, 1, 581, 1212, 1213, 1960, 58, 560, 109, 312,
+ /* 160 */ 1956, 108, 107, 106, 105, 104, 103, 102, 101, 100,
+ /* 170 */ 2028, 130, 1679, 685, 527, 1972, 1318, 58, 1316, 81,
+ /* 180 */ 1842, 331, 34, 265, 1786, 565, 170, 1398, 1399, 264,
+ /* 190 */ 2029, 567, 580, 168, 1968, 1969, 559, 1973, 556, 450,
+ /* 200 */ 1321, 1322, 446, 1372, 1373, 1375, 1376, 1377, 1378, 1379,
+ /* 210 */ 1380, 1381, 590, 586, 1389, 1390, 1392, 1393, 1394, 1395,
+ /* 220 */ 1397, 1400, 3, 581, 203, 58, 46, 94, 1427, 155,
+ /* 230 */ 578, 1551, 629, 1318, 1342, 1316, 58, 384, 160, 383,
+ /* 240 */ 173, 127, 1492, 477, 473, 469, 465, 202, 428, 1678,
+ /* 250 */ 448, 144, 143, 626, 625, 624, 1340, 1321, 1322, 132,
+ /* 260 */ 1372, 1373, 1375, 1376, 1377, 1378, 1379, 1380, 1381, 590,
+ /* 270 */ 586, 1389, 1390, 1392, 1393, 1394, 1395, 1397, 1400, 3,
+ /* 280 */ 44, 42, 562, 557, 78, 490, 489, 200, 346, 1861,
+ /* 290 */ 1317, 553, 1490, 1491, 1493, 1494, 130, 31, 1374, 578,
+ /* 300 */ 1856, 1396, 173, 1315, 183, 182, 109, 1432, 58, 108,
+ /* 310 */ 107, 106, 105, 104, 103, 102, 101, 100, 169, 1968,
+ /* 320 */ 1969, 629, 1973, 173, 1391, 460, 1852, 1858, 132, 17,
+ /* 330 */ 2033, 11, 1874, 9, 540, 380, 1323, 44, 42, 588,
+ /* 340 */ 144, 143, 626, 625, 624, 346, 175, 1317, 578, 158,
+ /* 350 */ 199, 193, 47, 198, 1643, 382, 378, 456, 1396, 2028,
+ /* 360 */ 1315, 1892, 1, 1686, 1343, 130, 540, 2033, 542, 582,
+ /* 370 */ 1932, 173, 173, 191, 1842, 2032, 594, 132, 119, 2029,
+ /* 380 */ 2031, 1391, 173, 391, 685, 481, 17, 171, 1968, 1969,
+ /* 390 */ 217, 1973, 1067, 1323, 1066, 1686, 2028, 1872, 1398, 1399,
+ /* 400 */ 1342, 1907, 1539, 231, 232, 97, 1873, 1875, 598, 1877,
+ /* 410 */ 1878, 593, 2032, 588, 121, 561, 2029, 2030, 167, 1,
+ /* 420 */ 1960, 308, 1068, 540, 339, 1956, 118, 117, 116, 115,
+ /* 430 */ 114, 113, 112, 111, 110, 119, 262, 1968, 577, 1975,
+ /* 440 */ 576, 685, 486, 2028, 1318, 1987, 1316, 79, 310, 631,
+ /* 450 */ 1738, 530, 1686, 1341, 173, 1398, 1399, 350, 565, 170,
+ /* 460 */ 13, 12, 310, 2029, 567, 530, 1736, 1971, 1321, 1322,
+ /* 470 */ 1661, 1372, 1373, 1375, 1376, 1377, 1378, 1379, 1380, 1381,
+ /* 480 */ 590, 586, 1389, 1390, 1392, 1393, 1394, 1395, 1397, 1400,
+ /* 490 */ 3, 230, 11, 1406, 544, 1537, 1932, 322, 173, 1342,
+ /* 500 */ 77, 1318, 1785, 1316, 305, 1170, 620, 619, 618, 1174,
+ /* 510 */ 617, 1176, 1177, 616, 1179, 613, 142, 1185, 610, 1187,
+ /* 520 */ 1188, 607, 604, 1682, 623, 1321, 1322, 179, 1372, 1373,
+ /* 530 */ 1375, 1376, 1377, 1378, 1379, 1380, 1381, 590, 586, 1389,
+ /* 540 */ 1390, 1392, 1393, 1394, 1395, 1397, 1400, 3, 44, 42,
+ /* 550 */ 392, 1295, 1296, 332, 1439, 361, 346, 323, 1317, 321,
+ /* 560 */ 320, 153, 483, 393, 74, 540, 485, 73, 51, 1396,
+ /* 570 */ 1688, 1315, 523, 1664, 385, 1975, 629, 389, 37, 36,
+ /* 580 */ 166, 1874, 43, 41, 40, 39, 38, 1344, 484, 11,
+ /* 590 */ 1345, 523, 1391, 1725, 1686, 144, 143, 626, 625, 624,
+ /* 600 */ 1874, 2028, 540, 1970, 1323, 44, 42, 1401, 656, 654,
+ /* 610 */ 1892, 1560, 1323, 346, 390, 1317, 2034, 170, 595, 643,
+ /* 620 */ 2028, 2029, 567, 1842, 224, 594, 1396, 1738, 1315, 1892,
+ /* 630 */ 8, 1686, 507, 460, 317, 2034, 170, 595, 2032, 540,
+ /* 640 */ 2029, 567, 1842, 1736, 594, 505, 596, 503, 1662, 1391,
+ /* 650 */ 1907, 398, 685, 1842, 292, 345, 1875, 598, 1877, 1878,
+ /* 660 */ 593, 1323, 588, 349, 80, 1872, 1398, 1399, 1686, 1907,
+ /* 670 */ 1671, 153, 566, 97, 1873, 1875, 598, 1877, 1878, 593,
+ /* 680 */ 1688, 588, 218, 1374, 2028, 1716, 2048, 8, 1960, 1559,
+ /* 690 */ 37, 36, 339, 1956, 43, 41, 40, 39, 38, 565,
+ /* 700 */ 170, 2028, 1994, 540, 2029, 567, 540, 45, 631, 685,
+ /* 710 */ 527, 1784, 1318, 305, 1316, 413, 565, 170, 414, 1552,
+ /* 720 */ 1787, 2029, 567, 1398, 1399, 153, 627, 1779, 1558, 1729,
+ /* 730 */ 264, 1842, 1686, 241, 1689, 1686, 1321, 1322, 178, 1372,
+ /* 740 */ 1373, 1375, 1376, 1377, 1378, 1379, 1380, 1381, 590, 586,
+ /* 750 */ 1389, 1390, 1392, 1393, 1394, 1395, 1397, 1400, 3, 1266,
+ /* 760 */ 37, 36, 540, 540, 43, 41, 40, 39, 38, 1318,
+ /* 770 */ 1842, 1316, 352, 1673, 458, 459, 173, 1502, 37, 36,
+ /* 780 */ 153, 1557, 43, 41, 40, 39, 38, 128, 1556, 1688,
+ /* 790 */ 1931, 1686, 1686, 1321, 1322, 26, 1372, 1373, 1375, 1376,
+ /* 800 */ 1377, 1378, 1379, 1380, 1381, 590, 586, 1389, 1390, 1392,
+ /* 810 */ 1393, 1394, 1395, 1397, 1400, 3, 44, 42, 526, 1317,
+ /* 820 */ 1779, 1555, 1738, 1842, 346, 628, 1317, 1554, 1729, 2033,
+ /* 830 */ 1842, 181, 1315, 540, 1553, 523, 1669, 1396, 1737, 1315,
+ /* 840 */ 32, 359, 1054, 1055, 485, 1683, 37, 36, 1550, 1874,
+ /* 850 */ 43, 41, 40, 39, 38, 644, 7, 1656, 523, 540,
+ /* 860 */ 1391, 1463, 1686, 1842, 2028, 1323, 484, 1549, 1874, 1842,
+ /* 870 */ 540, 136, 1323, 44, 42, 570, 1842, 540, 1892, 2034,
+ /* 880 */ 170, 346, 519, 1317, 2029, 567, 595, 2028, 1686, 524,
+ /* 890 */ 1842, 1842, 569, 594, 1396, 1345, 1315, 1892, 8, 1686,
+ /* 900 */ 518, 277, 2034, 170, 1716, 595, 1686, 2029, 567, 1842,
+ /* 910 */ 1842, 1342, 594, 685, 1872, 1829, 1548, 1391, 1907, 540,
+ /* 920 */ 685, 1525, 156, 1873, 1875, 598, 1877, 1878, 593, 1323,
+ /* 930 */ 588, 235, 221, 1872, 1398, 1399, 1547, 1907, 1532, 48,
+ /* 940 */ 4, 97, 1873, 1875, 598, 1877, 1878, 593, 1686, 588,
+ /* 950 */ 493, 492, 1546, 585, 2048, 1, 1960, 126, 1842, 1591,
+ /* 960 */ 339, 1956, 368, 545, 1997, 1980, 1459, 540, 488, 491,
+ /* 970 */ 2022, 1604, 540, 1318, 487, 1316, 1326, 685, 1842, 536,
+ /* 980 */ 1318, 494, 1316, 358, 538, 1545, 208, 210, 1544, 206,
+ /* 990 */ 209, 1398, 1399, 589, 1842, 229, 1686, 1321, 1322, 1543,
+ /* 1000 */ 523, 1686, 50, 522, 1321, 1322, 1542, 1372, 1373, 1375,
+ /* 1010 */ 1376, 1377, 1378, 1379, 1380, 1381, 590, 586, 1389, 1390,
+ /* 1020 */ 1392, 1393, 1394, 1395, 1397, 1400, 3, 1842, 540, 2028,
+ /* 1030 */ 1842, 540, 1531, 1534, 1535, 493, 492, 1318, 240, 1316,
+ /* 1040 */ 539, 1842, 126, 266, 2034, 170, 573, 233, 1842, 2029,
+ /* 1050 */ 567, 622, 137, 488, 491, 212, 1459, 1686, 211, 487,
+ /* 1060 */ 1686, 1321, 1322, 1601, 1372, 1373, 1375, 1376, 1377, 1378,
+ /* 1070 */ 1379, 1380, 1381, 590, 586, 1389, 1390, 1392, 1393, 1394,
+ /* 1080 */ 1395, 1397, 1400, 3, 307, 540, 1340, 214, 13, 12,
+ /* 1090 */ 213, 571, 1417, 421, 1325, 1374, 433, 353, 1462, 1586,
+ /* 1100 */ 1584, 93, 37, 36, 533, 2000, 43, 41, 40, 39,
+ /* 1110 */ 38, 90, 1644, 406, 1686, 434, 141, 408, 142, 1329,
+ /* 1120 */ 60, 496, 499, 259, 245, 60, 662, 661, 660, 659,
+ /* 1130 */ 356, 45, 658, 657, 133, 652, 651, 650, 649, 648,
+ /* 1140 */ 647, 646, 645, 146, 641, 640, 639, 355, 354, 636,
+ /* 1150 */ 635, 634, 633, 632, 554, 154, 478, 37, 36, 399,
+ /* 1160 */ 283, 43, 41, 40, 39, 38, 253, 1094, 237, 637,
+ /* 1170 */ 1163, 395, 1489, 45, 281, 66, 248, 1433, 65, 1863,
+ /* 1180 */ 37, 36, 1893, 1382, 43, 41, 40, 39, 38, 1482,
+ /* 1190 */ 602, 1114, 357, 1575, 187, 439, 437, 141, 1990, 432,
+ /* 1200 */ 1095, 1874, 427, 426, 425, 424, 423, 420, 419, 418,
+ /* 1210 */ 417, 416, 412, 411, 410, 409, 403, 402, 401, 400,
+ /* 1220 */ 142, 397, 396, 319, 638, 276, 1726, 1865, 37, 36,
+ /* 1230 */ 1892, 58, 43, 41, 40, 39, 38, 1328, 595, 122,
+ /* 1240 */ 141, 579, 1191, 1842, 261, 594, 1112, 1580, 258, 1195,
+ /* 1250 */ 2, 362, 5, 367, 318, 273, 180, 1282, 394, 1340,
+ /* 1260 */ 415, 1781, 422, 430, 574, 429, 1872, 431, 435, 96,
+ /* 1270 */ 1907, 436, 1202, 184, 97, 1873, 1875, 598, 1877, 1878,
+ /* 1280 */ 593, 313, 588, 438, 1346, 129, 441, 140, 1931, 1960,
+ /* 1290 */ 440, 1200, 145, 339, 1956, 680, 449, 1348, 452, 190,
+ /* 1300 */ 511, 192, 453, 1347, 454, 71, 70, 388, 1349, 455,
+ /* 1310 */ 177, 1874, 152, 195, 197, 457, 498, 523, 75, 76,
+ /* 1320 */ 461, 201, 480, 1425, 482, 1676, 205, 306, 1672, 207,
+ /* 1330 */ 376, 508, 374, 370, 366, 363, 360, 309, 120, 147,
+ /* 1340 */ 1892, 510, 148, 1674, 1670, 216, 2028, 149, 595, 512,
+ /* 1350 */ 150, 274, 219, 1842, 513, 594, 222, 520, 1820, 501,
+ /* 1360 */ 514, 2034, 170, 495, 525, 226, 2029, 567, 215, 517,
+ /* 1370 */ 552, 138, 534, 328, 528, 1819, 1872, 173, 1426, 1791,
+ /* 1380 */ 1907, 531, 330, 139, 97, 1873, 1875, 598, 1877, 1878,
+ /* 1390 */ 593, 535, 588, 1874, 84, 275, 86, 2048, 1687, 1960,
+ /* 1400 */ 1345, 548, 2006, 339, 1956, 64, 1991, 555, 63, 243,
+ /* 1410 */ 2001, 550, 2005, 1979, 551, 247, 335, 558, 6, 564,
+ /* 1420 */ 336, 549, 1892, 547, 546, 257, 575, 2027, 572, 1459,
+ /* 1430 */ 595, 1344, 2051, 256, 252, 1842, 1982, 594, 1976, 57,
+ /* 1440 */ 131, 1941, 88, 600, 1657, 161, 1874, 33, 343, 1420,
+ /* 1450 */ 1421, 1422, 1423, 1424, 1428, 1429, 1430, 1431, 1872, 254,
+ /* 1460 */ 255, 278, 1907, 1730, 260, 269, 97, 1873, 1875, 598,
+ /* 1470 */ 1877, 1878, 593, 681, 588, 1892, 49, 682, 304, 1935,
+ /* 1480 */ 290, 1960, 684, 595, 301, 339, 1956, 300, 1842, 1836,
+ /* 1490 */ 594, 282, 280, 1835, 68, 1834, 1833, 69, 1830, 364,
+ /* 1500 */ 365, 1309, 1310, 176, 369, 1828, 371, 372, 373, 1827,
+ /* 1510 */ 375, 1872, 1826, 377, 1874, 1907, 1825, 1824, 381, 97,
+ /* 1520 */ 1873, 1875, 598, 1877, 1878, 593, 379, 588, 1285, 1284,
+ /* 1530 */ 1802, 1801, 1933, 386, 1960, 387, 1874, 1800, 339, 1956,
+ /* 1540 */ 342, 341, 1799, 1892, 134, 1254, 1774, 1773, 1772, 1771,
+ /* 1550 */ 1331, 595, 1770, 1769, 72, 1768, 1842, 1767, 594, 1766,
+ /* 1560 */ 1765, 1396, 1764, 1324, 404, 1892, 1763, 405, 407, 1762,
+ /* 1570 */ 1761, 1760, 1759, 595, 1758, 1757, 1756, 1755, 1842, 1872,
+ /* 1580 */ 594, 1754, 1753, 1907, 1391, 1752, 1751, 97, 1873, 1875,
+ /* 1590 */ 598, 1877, 1878, 593, 1874, 588, 1323, 1750, 1749, 1748,
+ /* 1600 */ 543, 1872, 1960, 135, 1747, 1907, 339, 1956, 1746, 98,
+ /* 1610 */ 1873, 1875, 598, 1877, 1878, 593, 1745, 588, 1744, 1743,
+ /* 1620 */ 688, 1742, 1256, 1892, 1960, 1741, 1740, 1739, 1959, 1956,
+ /* 1630 */ 1606, 595, 1605, 1603, 272, 185, 1842, 1138, 594, 186,
+ /* 1640 */ 1571, 1570, 1057, 1056, 584, 188, 123, 1815, 164, 165,
+ /* 1650 */ 189, 445, 124, 678, 674, 670, 666, 270, 1809, 1872,
+ /* 1660 */ 447, 1798, 194, 1907, 196, 1797, 1783, 98, 1873, 1875,
+ /* 1670 */ 598, 1877, 1878, 593, 1665, 588, 1602, 1087, 1600, 462,
+ /* 1680 */ 1598, 463, 1960, 466, 464, 467, 583, 1956, 468, 1596,
+ /* 1690 */ 470, 472, 1594, 471, 95, 474, 1874, 238, 475, 1583,
+ /* 1700 */ 1582, 476, 1567, 1667, 1332, 1206, 1327, 1205, 1666, 1123,
+ /* 1710 */ 1129, 653, 59, 1592, 1128, 655, 1125, 1124, 204, 1587,
+ /* 1720 */ 324, 1585, 497, 325, 1566, 1892, 326, 1565, 1335, 1337,
+ /* 1730 */ 537, 500, 1564, 592, 506, 1814, 99, 1301, 1842, 1808,
+ /* 1740 */ 594, 586, 1389, 1390, 1392, 1393, 1394, 1395, 25, 502,
+ /* 1750 */ 504, 53, 1291, 515, 516, 1874, 223, 151, 1796, 1794,
+ /* 1760 */ 2033, 1872, 1795, 227, 1793, 1907, 1792, 1790, 1299, 298,
+ /* 1770 */ 1873, 1875, 598, 1877, 1878, 593, 591, 588, 541, 1925,
+ /* 1780 */ 18, 1289, 529, 220, 1892, 327, 228, 234, 82, 521,
+ /* 1790 */ 1782, 83, 595, 239, 90, 236, 532, 1842, 19, 594,
+ /* 1800 */ 85, 27, 15, 1408, 20, 1504, 244, 21, 56, 10,
+ /* 1810 */ 1874, 250, 1407, 1486, 242, 251, 246, 1863, 1488, 159,
+ /* 1820 */ 1872, 1481, 249, 28, 1907, 29, 61, 22, 157, 1873,
+ /* 1830 */ 1875, 598, 1877, 1878, 593, 89, 588, 1524, 1525, 1892,
+ /* 1840 */ 1519, 1518, 337, 1523, 1522, 338, 1456, 595, 1455, 263,
+ /* 1850 */ 1862, 12, 1842, 1418, 594, 16, 55, 1333, 54, 1365,
+ /* 1860 */ 162, 163, 174, 1874, 1910, 597, 1169, 1386, 587, 601,
+ /* 1870 */ 1384, 35, 1184, 1383, 14, 1872, 1357, 23, 599, 1907,
+ /* 1880 */ 568, 2049, 24, 98, 1873, 1875, 598, 1877, 1878, 593,
+ /* 1890 */ 1192, 588, 1892, 348, 603, 605, 1189, 329, 1960, 608,
+ /* 1900 */ 595, 611, 621, 1957, 614, 1842, 606, 594, 1201, 1183,
+ /* 1910 */ 1182, 1181, 1186, 609, 1874, 1180, 612, 267, 1197, 1178,
+ /* 1920 */ 615, 91, 92, 67, 1085, 1120, 630, 1119, 1872, 1118,
+ /* 1930 */ 1117, 1874, 1907, 1116, 642, 1115, 299, 1873, 1875, 598,
+ /* 1940 */ 1877, 1878, 593, 1892, 588, 1113, 1111, 1110, 1109, 1136,
+ /* 1950 */ 268, 592, 1107, 1106, 1105, 1104, 1842, 1103, 594, 1102,
+ /* 1960 */ 1892, 1101, 1100, 1131, 1097, 1133, 1096, 1091, 595, 1093,
+ /* 1970 */ 1599, 1092, 1090, 1842, 663, 594, 1597, 664, 667, 1872,
+ /* 1980 */ 665, 1595, 1593, 1907, 671, 668, 669, 298, 1873, 1875,
+ /* 1990 */ 598, 1877, 1878, 593, 673, 588, 1872, 1926, 672, 675,
+ /* 2000 */ 1907, 676, 677, 1581, 156, 1873, 1875, 598, 1877, 1878,
+ /* 2010 */ 593, 1563, 588, 679, 1047, 683, 1874, 271, 1319, 279,
+ /* 2020 */ 686, 687, 1538, 1538, 1538, 1538, 1538, 1538, 1538, 1538,
+ /* 2030 */ 1538, 1538, 1538, 1538, 1538, 1538, 1538, 1538, 1538, 1538,
+ /* 2040 */ 1538, 1538, 1538, 1538, 1538, 1892, 1998, 1538, 1538, 1538,
+ /* 2050 */ 1538, 1538, 1538, 595, 1538, 1538, 1538, 1538, 1842, 1538,
+ /* 2060 */ 594, 1538, 1538, 1538, 1538, 1538, 1538, 1874, 1538, 1538,
+ /* 2070 */ 1538, 1538, 1538, 1538, 1538, 1538, 1538, 1538, 1538, 1538,
+ /* 2080 */ 1538, 1872, 1538, 1538, 1538, 1907, 1538, 1538, 1538, 294,
+ /* 2090 */ 1873, 1875, 598, 1877, 1878, 593, 1892, 588, 1538, 1538,
+ /* 2100 */ 1538, 1538, 1538, 1538, 595, 1538, 1538, 1538, 1538, 1842,
+ /* 2110 */ 1538, 594, 1538, 1538, 1538, 1538, 1538, 1538, 1538, 1538,
+ /* 2120 */ 1538, 1538, 1538, 1538, 1538, 1538, 1538, 1538, 1538, 1538,
+ /* 2130 */ 1874, 1538, 1872, 563, 1538, 1538, 1907, 1538, 1538, 1538,
+ /* 2140 */ 157, 1873, 1875, 598, 1877, 1878, 593, 1538, 588, 1538,
+ /* 2150 */ 1874, 1538, 1538, 1538, 1538, 1538, 1538, 1538, 1538, 1892,
+ /* 2160 */ 1538, 1538, 1538, 1538, 344, 1538, 1538, 595, 1538, 1538,
+ /* 2170 */ 1538, 1538, 1842, 1538, 594, 1538, 1538, 1538, 1538, 1892,
+ /* 2180 */ 1538, 1538, 1538, 1538, 347, 1538, 1538, 595, 1538, 1538,
+ /* 2190 */ 1538, 1538, 1842, 2050, 594, 1872, 1538, 1538, 1538, 1907,
+ /* 2200 */ 1538, 1874, 1538, 299, 1873, 1875, 598, 1877, 1878, 593,
+ /* 2210 */ 1538, 588, 1538, 1538, 1538, 1872, 1538, 1538, 1874, 1907,
+ /* 2220 */ 1538, 1538, 1538, 299, 1873, 1875, 598, 1877, 1878, 593,
+ /* 2230 */ 1892, 588, 1538, 1538, 1538, 1538, 1538, 1538, 595, 1538,
+ /* 2240 */ 1538, 1538, 1538, 1842, 1538, 594, 1538, 1892, 1538, 1538,
+ /* 2250 */ 1538, 1538, 1538, 1538, 1538, 595, 1538, 1538, 1538, 1538,
+ /* 2260 */ 1842, 1874, 594, 1538, 1538, 1538, 509, 1538, 1538, 1538,
+ /* 2270 */ 1907, 1538, 1538, 1538, 292, 1873, 1875, 598, 1877, 1878,
+ /* 2280 */ 593, 1538, 588, 1872, 1538, 1538, 1538, 1907, 1538, 1538,
+ /* 2290 */ 1892, 284, 1873, 1875, 598, 1877, 1878, 593, 595, 588,
+ /* 2300 */ 1538, 1538, 1538, 1842, 1538, 594, 1538, 1538, 1538, 1538,
+ /* 2310 */ 1538, 1538, 1874, 1538, 1538, 1538, 1538, 1538, 1538, 1538,
+ /* 2320 */ 1538, 1538, 1538, 1538, 1538, 1538, 1872, 1538, 1538, 1874,
+ /* 2330 */ 1907, 1538, 1538, 1538, 285, 1873, 1875, 598, 1877, 1878,
+ /* 2340 */ 593, 1892, 588, 1538, 1538, 1538, 1538, 1538, 1538, 595,
+ /* 2350 */ 1538, 1538, 1538, 1538, 1842, 1538, 594, 1538, 1892, 1538,
+ /* 2360 */ 1538, 1538, 1538, 1538, 1538, 1538, 595, 1538, 1538, 1538,
+ /* 2370 */ 1538, 1842, 1538, 594, 1538, 1538, 1538, 1872, 1538, 1538,
+ /* 2380 */ 1874, 1907, 1538, 1538, 1538, 286, 1873, 1875, 598, 1877,
+ /* 2390 */ 1878, 593, 1538, 588, 1872, 1538, 1538, 1538, 1907, 1538,
+ /* 2400 */ 1538, 1538, 293, 1873, 1875, 598, 1877, 1878, 593, 1892,
+ /* 2410 */ 588, 1538, 1538, 1538, 1538, 1538, 1538, 595, 1538, 1538,
+ /* 2420 */ 1538, 1538, 1842, 1538, 594, 1538, 1538, 1538, 1538, 1538,
+ /* 2430 */ 1538, 1874, 1538, 1538, 1538, 1538, 1538, 1538, 1538, 1538,
+ /* 2440 */ 1538, 1538, 1538, 1538, 1538, 1872, 1538, 1538, 1538, 1907,
+ /* 2450 */ 1874, 1538, 1538, 295, 1873, 1875, 598, 1877, 1878, 593,
+ /* 2460 */ 1892, 588, 1538, 1538, 1538, 1538, 1538, 1538, 595, 1538,
+ /* 2470 */ 1538, 1538, 1538, 1842, 1538, 594, 1538, 1538, 1538, 1892,
+ /* 2480 */ 1538, 1538, 1538, 1538, 1538, 1538, 1538, 595, 1538, 1538,
+ /* 2490 */ 1538, 1538, 1842, 1538, 594, 1538, 1872, 1538, 1538, 1538,
+ /* 2500 */ 1907, 1538, 1538, 1538, 287, 1873, 1875, 598, 1877, 1878,
+ /* 2510 */ 593, 1538, 588, 1874, 1538, 1872, 1538, 1538, 1538, 1907,
+ /* 2520 */ 1538, 1538, 1538, 296, 1873, 1875, 598, 1877, 1878, 593,
+ /* 2530 */ 1538, 588, 1538, 1538, 1538, 1874, 1538, 1538, 1538, 1538,
+ /* 2540 */ 1538, 1538, 1892, 1538, 1538, 1538, 1538, 1538, 1538, 1538,
+ /* 2550 */ 595, 1538, 1538, 1538, 1538, 1842, 1538, 594, 1538, 1538,
+ /* 2560 */ 1538, 1538, 1538, 1538, 1892, 1538, 1538, 1538, 1538, 1538,
+ /* 2570 */ 1538, 1538, 595, 1538, 1538, 1538, 1538, 1842, 1872, 594,
+ /* 2580 */ 1538, 1538, 1907, 1538, 1538, 1538, 288, 1873, 1875, 598,
+ /* 2590 */ 1877, 1878, 593, 1538, 588, 1874, 1538, 1538, 1538, 1538,
+ /* 2600 */ 1872, 1538, 1538, 1538, 1907, 1538, 1538, 1538, 297, 1873,
+ /* 2610 */ 1875, 598, 1877, 1878, 593, 1874, 588, 1538, 1538, 1538,
+ /* 2620 */ 1538, 1538, 1538, 1538, 1892, 1538, 1538, 1538, 1538, 1538,
+ /* 2630 */ 1538, 1538, 595, 1538, 1538, 1538, 1538, 1842, 1538, 594,
+ /* 2640 */ 1538, 1538, 1538, 1538, 1892, 1538, 1538, 1538, 1538, 1538,
+ /* 2650 */ 1538, 1538, 595, 1538, 1538, 1538, 1538, 1842, 1874, 594,
+ /* 2660 */ 1872, 1538, 1538, 1538, 1907, 1538, 1538, 1538, 289, 1873,
+ /* 2670 */ 1875, 598, 1877, 1878, 593, 1538, 588, 1538, 1874, 1538,
+ /* 2680 */ 1872, 1538, 1538, 1538, 1907, 1538, 1538, 1892, 302, 1873,
+ /* 2690 */ 1875, 598, 1877, 1878, 593, 595, 588, 1538, 1538, 1538,
+ /* 2700 */ 1842, 1538, 594, 1538, 1538, 1538, 1538, 1892, 1538, 1538,
+ /* 2710 */ 1538, 1538, 1538, 1538, 1538, 595, 1538, 1538, 1538, 1538,
+ /* 2720 */ 1842, 1538, 594, 1872, 1538, 1538, 1538, 1907, 1538, 1874,
+ /* 2730 */ 1538, 303, 1873, 1875, 598, 1877, 1878, 593, 1538, 588,
+ /* 2740 */ 1538, 1538, 1538, 1872, 1538, 1538, 1538, 1907, 1538, 1538,
+ /* 2750 */ 1538, 1886, 1873, 1875, 598, 1877, 1878, 593, 1892, 588,
+ /* 2760 */ 1538, 1538, 1538, 1538, 1538, 1538, 595, 1538, 1538, 1538,
+ /* 2770 */ 1538, 1842, 1538, 594, 1538, 1538, 1538, 1538, 1538, 1538,
+ /* 2780 */ 1874, 1538, 1538, 1538, 1538, 1538, 1538, 1538, 1538, 1538,
+ /* 2790 */ 1538, 1538, 1538, 1538, 1872, 1538, 1538, 1538, 1907, 1874,
+ /* 2800 */ 1538, 1538, 1885, 1873, 1875, 598, 1877, 1878, 593, 1892,
+ /* 2810 */ 588, 1538, 1538, 1538, 1538, 1538, 1538, 595, 1538, 1538,
+ /* 2820 */ 1538, 1538, 1842, 1538, 594, 1538, 1538, 1538, 1892, 1538,
+ /* 2830 */ 1538, 1538, 1538, 1538, 1538, 1538, 595, 1538, 1538, 1538,
+ /* 2840 */ 1538, 1842, 1538, 594, 1538, 1872, 1538, 1538, 1538, 1907,
+ /* 2850 */ 1538, 1538, 1538, 1884, 1873, 1875, 598, 1877, 1878, 593,
+ /* 2860 */ 1538, 588, 1874, 1538, 1872, 1538, 1538, 1538, 1907, 1538,
+ /* 2870 */ 1538, 1538, 314, 1873, 1875, 598, 1877, 1878, 593, 1538,
+ /* 2880 */ 588, 1538, 1538, 1538, 1874, 1538, 1538, 1538, 1538, 1538,
+ /* 2890 */ 1538, 1892, 1538, 1538, 1538, 1538, 1538, 1538, 1538, 595,
+ /* 2900 */ 1538, 1538, 1538, 1538, 1842, 1538, 594, 1538, 1538, 1538,
+ /* 2910 */ 1538, 1538, 1538, 1892, 1538, 1538, 1538, 1538, 1538, 1538,
+ /* 2920 */ 1538, 595, 1538, 1538, 1538, 1538, 1842, 1872, 594, 1538,
+ /* 2930 */ 1538, 1907, 1538, 1538, 1538, 315, 1873, 1875, 598, 1877,
+ /* 2940 */ 1878, 593, 1538, 588, 1874, 1538, 1538, 1538, 1538, 1872,
+ /* 2950 */ 1538, 1538, 1538, 1907, 1538, 1538, 1538, 311, 1873, 1875,
+ /* 2960 */ 598, 1877, 1878, 593, 1874, 588, 1538, 1538, 1538, 1538,
+ /* 2970 */ 1538, 1538, 1538, 1892, 1538, 1538, 1538, 1538, 1538, 1538,
+ /* 2980 */ 1538, 595, 1538, 1538, 1538, 1538, 1842, 1538, 594, 1538,
+ /* 2990 */ 1538, 1538, 1538, 1892, 1538, 1538, 1538, 1538, 1538, 1538,
+ /* 3000 */ 1538, 595, 1538, 1538, 1538, 1538, 1842, 1538, 594, 1872,
+ /* 3010 */ 1538, 1538, 1538, 1907, 1538, 1538, 1538, 316, 1873, 1875,
+ /* 3020 */ 598, 1877, 1878, 593, 1538, 588, 1538, 1538, 1538, 1872,
+ /* 3030 */ 1538, 1538, 1538, 1907, 1538, 1538, 1538, 291, 1873, 1875,
+ /* 3040 */ 598, 1877, 1878, 593, 1538, 588,
};
static const YYCODETYPE yy_lookahead[] = {
- /* 0 */ 349, 318, 322, 349, 324, 325, 322, 318, 324, 325,
- /* 10 */ 349, 360, 12, 13, 360, 358, 1, 2, 361, 362,
- /* 20 */ 20, 360, 22, 12, 13, 14, 15, 16, 20, 3,
- /* 30 */ 317, 330, 319, 33, 4, 35, 347, 386, 387, 388,
- /* 40 */ 386, 387, 388, 360, 355, 344, 20, 386, 387, 360,
- /* 50 */ 399, 362, 2, 399, 353, 403, 56, 405, 8, 9,
- /* 60 */ 399, 61, 12, 13, 14, 15, 16, 318, 68, 12,
- /* 70 */ 13, 14, 383, 20, 44, 45, 387, 20, 392, 22,
- /* 80 */ 391, 392, 393, 394, 395, 396, 397, 20, 399, 22,
- /* 90 */ 33, 4, 35, 404, 94, 406, 347, 407, 408, 410,
- /* 100 */ 411, 346, 35, 20, 355, 326, 20, 421, 347, 360,
- /* 110 */ 95, 362, 423, 56, 359, 354, 116, 50, 61, 362,
- /* 120 */ 431, 95, 436, 437, 363, 68, 369, 441, 442, 372,
- /* 130 */ 130, 131, 383, 60, 355, 56, 387, 0, 130, 131,
- /* 140 */ 391, 392, 393, 394, 395, 396, 397, 94, 399, 347,
- /* 150 */ 323, 94, 20, 326, 22, 406, 94, 355, 21, 410,
- /* 160 */ 411, 24, 25, 26, 27, 28, 29, 30, 31, 32,
- /* 170 */ 421, 392, 93, 116, 389, 96, 176, 94, 178, 94,
- /* 180 */ 94, 94, 50, 39, 318, 436, 437, 130, 131, 163,
- /* 190 */ 441, 442, 413, 414, 415, 416, 394, 418, 361, 362,
- /* 200 */ 200, 201, 417, 203, 204, 205, 206, 207, 208, 209,
+ /* 0 */ 350, 0, 323, 350, 325, 326, 323, 319, 325, 326,
+ /* 10 */ 350, 361, 12, 13, 361, 359, 327, 349, 362, 363,
+ /* 20 */ 20, 361, 22, 12, 13, 14, 15, 16, 339, 3,
+ /* 30 */ 14, 15, 16, 33, 4, 35, 348, 387, 388, 389,
+ /* 40 */ 387, 388, 389, 20, 356, 356, 20, 387, 388, 361,
+ /* 50 */ 400, 363, 2, 400, 324, 20, 56, 327, 8, 9,
+ /* 60 */ 400, 61, 12, 13, 14, 15, 16, 319, 68, 12,
+ /* 70 */ 13, 14, 384, 35, 44, 45, 388, 20, 393, 22,
+ /* 80 */ 392, 393, 394, 395, 396, 397, 398, 20, 400, 22,
+ /* 90 */ 33, 319, 35, 405, 94, 407, 348, 362, 363, 411,
+ /* 100 */ 412, 331, 35, 348, 356, 327, 68, 422, 14, 361,
+ /* 110 */ 355, 363, 424, 56, 20, 345, 116, 50, 61, 364,
+ /* 120 */ 432, 95, 437, 438, 354, 68, 0, 442, 443, 94,
+ /* 130 */ 130, 131, 384, 361, 356, 4, 388, 0, 319, 56,
+ /* 140 */ 392, 393, 394, 395, 396, 397, 398, 390, 400, 348,
+ /* 150 */ 329, 94, 20, 130, 131, 407, 94, 356, 21, 411,
+ /* 160 */ 412, 24, 25, 26, 27, 28, 29, 30, 31, 32,
+ /* 170 */ 422, 393, 351, 116, 363, 418, 176, 94, 178, 96,
+ /* 180 */ 361, 370, 408, 409, 373, 437, 438, 130, 131, 163,
+ /* 190 */ 442, 443, 414, 415, 416, 417, 395, 419, 161, 324,
+ /* 200 */ 200, 201, 327, 203, 204, 205, 206, 207, 208, 209,
/* 210 */ 210, 211, 212, 213, 214, 215, 216, 217, 218, 219,
- /* 220 */ 220, 221, 33, 0, 8, 9, 360, 20, 12, 13,
- /* 230 */ 14, 15, 16, 176, 20, 178, 47, 125, 126, 239,
- /* 240 */ 14, 52, 53, 54, 55, 56, 20, 24, 25, 26,
- /* 250 */ 27, 28, 29, 30, 31, 32, 326, 200, 201, 43,
+ /* 220 */ 220, 221, 222, 20, 33, 94, 94, 329, 158, 318,
+ /* 230 */ 327, 320, 106, 176, 20, 178, 94, 175, 47, 177,
+ /* 240 */ 240, 343, 200, 52, 53, 54, 55, 56, 78, 351,
+ /* 250 */ 14, 125, 126, 127, 128, 129, 20, 200, 201, 356,
/* 260 */ 203, 204, 205, 206, 207, 208, 209, 210, 211, 212,
- /* 270 */ 213, 214, 215, 216, 217, 218, 219, 220, 221, 12,
- /* 280 */ 13, 106, 93, 330, 349, 96, 94, 20, 318, 22,
- /* 290 */ 323, 200, 239, 326, 364, 360, 184, 106, 326, 187,
- /* 300 */ 33, 239, 35, 128, 21, 126, 353, 24, 25, 26,
- /* 310 */ 27, 28, 29, 30, 31, 32, 125, 126, 127, 128,
- /* 320 */ 129, 386, 387, 56, 239, 239, 239, 355, 61, 392,
- /* 330 */ 360, 318, 56, 20, 399, 68, 12, 13, 347, 248,
- /* 340 */ 249, 250, 251, 252, 20, 354, 22, 326, 159, 160,
- /* 350 */ 14, 162, 20, 318, 363, 166, 20, 33, 421, 35,
- /* 360 */ 347, 94, 183, 184, 392, 326, 187, 175, 355, 177,
- /* 370 */ 94, 182, 96, 360, 437, 362, 355, 338, 441, 442,
- /* 380 */ 56, 171, 238, 116, 345, 61, 414, 415, 416, 43,
- /* 390 */ 418, 0, 68, 14, 355, 360, 383, 130, 131, 20,
- /* 400 */ 387, 191, 192, 22, 391, 392, 393, 394, 395, 396,
- /* 410 */ 397, 318, 399, 392, 60, 161, 35, 404, 94, 406,
- /* 420 */ 105, 8, 9, 410, 411, 12, 13, 14, 15, 16,
- /* 430 */ 204, 239, 223, 20, 225, 414, 415, 416, 78, 418,
- /* 440 */ 116, 95, 421, 176, 431, 178, 0, 340, 339, 68,
- /* 450 */ 343, 60, 339, 360, 130, 131, 347, 436, 437, 0,
- /* 460 */ 347, 318, 441, 442, 403, 356, 405, 200, 201, 356,
- /* 470 */ 203, 204, 205, 206, 207, 208, 209, 210, 211, 212,
- /* 480 */ 213, 214, 215, 216, 217, 218, 219, 220, 221, 125,
- /* 490 */ 223, 14, 15, 16, 134, 135, 20, 116, 244, 245,
- /* 500 */ 176, 37, 178, 360, 107, 108, 109, 110, 111, 112,
- /* 510 */ 113, 114, 115, 116, 117, 239, 119, 120, 121, 122,
- /* 520 */ 123, 124, 35, 0, 200, 201, 318, 203, 204, 205,
- /* 530 */ 206, 207, 208, 209, 210, 211, 212, 213, 214, 215,
- /* 540 */ 216, 217, 218, 219, 220, 221, 12, 13, 326, 185,
- /* 550 */ 186, 392, 106, 223, 20, 68, 22, 176, 68, 178,
- /* 560 */ 338, 97, 20, 99, 100, 106, 102, 33, 360, 35,
- /* 570 */ 106, 125, 126, 127, 128, 129, 163, 355, 21, 318,
- /* 580 */ 421, 200, 201, 204, 125, 126, 127, 128, 129, 339,
- /* 590 */ 56, 34, 128, 36, 331, 20, 437, 347, 318, 336,
- /* 600 */ 441, 442, 68, 12, 13, 14, 356, 326, 347, 0,
- /* 610 */ 371, 20, 373, 22, 68, 328, 355, 333, 334, 338,
- /* 620 */ 318, 360, 326, 362, 33, 347, 35, 347, 94, 342,
- /* 630 */ 333, 334, 354, 158, 338, 355, 355, 350, 318, 318,
- /* 640 */ 360, 363, 362, 402, 383, 318, 405, 56, 387, 326,
- /* 650 */ 116, 355, 391, 392, 393, 394, 395, 396, 397, 68,
- /* 660 */ 399, 338, 360, 383, 130, 131, 318, 387, 345, 60,
- /* 670 */ 392, 391, 392, 393, 394, 395, 396, 397, 355, 399,
- /* 680 */ 360, 360, 421, 318, 404, 94, 406, 360, 8, 9,
- /* 690 */ 410, 411, 12, 13, 14, 15, 16, 436, 437, 421,
- /* 700 */ 420, 226, 441, 442, 326, 163, 20, 116, 360, 347,
- /* 710 */ 176, 236, 178, 43, 436, 437, 338, 2, 356, 441,
- /* 720 */ 442, 130, 131, 8, 9, 360, 4, 12, 13, 14,
- /* 730 */ 15, 16, 318, 355, 200, 201, 318, 203, 204, 205,
- /* 740 */ 206, 207, 208, 209, 210, 211, 212, 213, 214, 215,
- /* 750 */ 216, 217, 218, 219, 220, 221, 326, 8, 9, 389,
- /* 760 */ 315, 12, 13, 14, 15, 16, 379, 176, 338, 178,
- /* 770 */ 371, 328, 373, 239, 360, 95, 8, 9, 360, 204,
- /* 780 */ 12, 13, 14, 15, 16, 355, 318, 417, 318, 389,
- /* 790 */ 318, 200, 201, 350, 203, 204, 205, 206, 207, 208,
- /* 800 */ 209, 210, 211, 212, 213, 214, 215, 216, 217, 218,
- /* 810 */ 219, 220, 221, 12, 13, 355, 4, 417, 44, 45,
- /* 820 */ 375, 20, 355, 22, 237, 238, 366, 326, 360, 326,
- /* 830 */ 360, 19, 360, 366, 33, 326, 35, 392, 326, 338,
- /* 840 */ 3, 338, 362, 326, 95, 33, 318, 338, 326, 163,
- /* 850 */ 338, 357, 372, 35, 360, 338, 355, 56, 355, 47,
- /* 860 */ 338, 318, 348, 51, 355, 318, 421, 355, 56, 68,
- /* 870 */ 12, 13, 355, 347, 319, 347, 357, 355, 20, 360,
- /* 880 */ 22, 436, 437, 355, 326, 43, 441, 442, 360, 363,
- /* 890 */ 362, 33, 3, 35, 347, 94, 338, 335, 0, 337,
- /* 900 */ 326, 348, 355, 360, 326, 93, 326, 360, 96, 362,
- /* 910 */ 43, 383, 338, 355, 56, 387, 338, 116, 338, 391,
- /* 920 */ 392, 393, 394, 395, 396, 397, 68, 399, 258, 355,
- /* 930 */ 383, 130, 131, 355, 387, 355, 168, 95, 391, 392,
- /* 940 */ 393, 394, 395, 396, 397, 47, 399, 64, 65, 42,
- /* 950 */ 43, 404, 94, 406, 71, 22, 340, 410, 411, 343,
- /* 960 */ 432, 433, 240, 0, 336, 82, 83, 420, 35, 326,
- /* 970 */ 98, 88, 98, 101, 116, 101, 61, 176, 375, 178,
- /* 980 */ 375, 338, 163, 164, 95, 22, 8, 9, 130, 131,
- /* 990 */ 12, 13, 14, 15, 16, 392, 178, 392, 355, 130,
- /* 1000 */ 131, 200, 201, 348, 203, 204, 205, 206, 207, 208,
- /* 1010 */ 209, 210, 211, 212, 213, 214, 215, 216, 217, 218,
- /* 1020 */ 219, 220, 221, 18, 421, 20, 421, 0, 0, 261,
- /* 1030 */ 98, 326, 27, 101, 176, 30, 178, 1, 2, 436,
- /* 1040 */ 437, 436, 437, 338, 441, 442, 441, 442, 98, 22,
- /* 1050 */ 22, 101, 47, 43, 49, 56, 51, 348, 200, 201,
- /* 1060 */ 355, 203, 204, 205, 206, 207, 208, 209, 210, 211,
- /* 1070 */ 212, 213, 214, 215, 216, 217, 218, 219, 220, 221,
- /* 1080 */ 8, 9, 43, 43, 12, 13, 14, 15, 16, 18,
- /* 1090 */ 326, 326, 13, 256, 23, 96, 94, 390, 93, 348,
- /* 1100 */ 13, 348, 338, 338, 35, 95, 104, 43, 37, 38,
- /* 1110 */ 105, 0, 41, 445, 35, 200, 43, 348, 43, 355,
- /* 1120 */ 355, 43, 35, 46, 434, 327, 428, 260, 57, 58,
- /* 1130 */ 59, 347, 327, 325, 95, 95, 359, 390, 133, 35,
- /* 1140 */ 326, 136, 137, 138, 139, 140, 141, 142, 143, 144,
- /* 1150 */ 145, 146, 147, 148, 149, 150, 151, 152, 153, 95,
- /* 1160 */ 155, 156, 157, 43, 43, 94, 438, 43, 95, 355,
- /* 1170 */ 95, 94, 68, 95, 63, 64, 65, 66, 67, 43,
- /* 1180 */ 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,
- /* 1190 */ 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
- /* 1200 */ 89, 90, 43, 132, 8, 9, 392, 0, 12, 13,
- /* 1210 */ 14, 15, 16, 43, 318, 95, 95, 422, 419, 95,
- /* 1220 */ 43, 412, 241, 385, 384, 47, 174, 377, 414, 415,
- /* 1230 */ 416, 95, 418, 42, 20, 163, 326, 367, 326, 168,
- /* 1240 */ 169, 170, 367, 347, 173, 365, 158, 178, 92, 332,
- /* 1250 */ 365, 355, 326, 326, 95, 48, 360, 61, 362, 375,
- /* 1260 */ 326, 190, 20, 320, 193, 95, 195, 196, 197, 198,
- /* 1270 */ 199, 320, 95, 20, 381, 330, 392, 330, 362, 383,
- /* 1280 */ 20, 20, 374, 387, 330, 376, 318, 391, 392, 393,
- /* 1290 */ 394, 395, 396, 397, 374, 399, 330, 330, 402, 103,
- /* 1300 */ 404, 405, 406, 330, 330, 421, 410, 411, 318, 326,
- /* 1310 */ 239, 320, 347, 326, 320, 347, 347, 347, 347, 347,
- /* 1320 */ 436, 437, 347, 355, 347, 441, 442, 0, 360, 347,
- /* 1330 */ 362, 347, 347, 347, 189, 382, 360, 347, 381, 328,
- /* 1340 */ 380, 181, 362, 328, 326, 355, 326, 328, 246, 360,
- /* 1350 */ 360, 383, 362, 374, 158, 387, 360, 360, 370, 391,
- /* 1360 */ 392, 393, 394, 395, 396, 397, 360, 399, 370, 360,
- /* 1370 */ 160, 368, 404, 383, 406, 318, 328, 387, 410, 411,
- /* 1380 */ 343, 391, 392, 393, 394, 395, 396, 397, 420, 399,
- /* 1390 */ 328, 64, 65, 355, 404, 20, 406, 390, 71, 247,
- /* 1400 */ 410, 411, 390, 360, 347, 370, 360, 360, 253, 82,
- /* 1410 */ 83, 360, 355, 360, 370, 88, 375, 360, 167, 362,
- /* 1420 */ 427, 429, 226, 227, 228, 229, 230, 231, 232, 233,
- /* 1430 */ 234, 235, 236, 392, 430, 427, 255, 254, 262, 426,
- /* 1440 */ 383, 427, 425, 242, 387, 424, 385, 318, 391, 392,
- /* 1450 */ 393, 394, 395, 396, 397, 439, 399, 259, 238, 257,
- /* 1460 */ 355, 404, 421, 406, 440, 20, 94, 410, 411, 446,
- /* 1470 */ 389, 19, 409, 94, 351, 360, 347, 436, 437, 337,
- /* 1480 */ 326, 328, 441, 442, 355, 33, 36, 321, 320, 360,
- /* 1490 */ 378, 362, 373, 329, 0, 316, 0, 183, 341, 47,
- /* 1500 */ 0, 0, 341, 341, 52, 53, 54, 55, 56, 42,
- /* 1510 */ 0, 35, 383, 194, 35, 35, 387, 35, 194, 0,
- /* 1520 */ 391, 392, 393, 394, 395, 396, 397, 35, 399, 318,
- /* 1530 */ 35, 194, 0, 404, 194, 406, 12, 13, 35, 410,
- /* 1540 */ 411, 0, 0, 0, 22, 93, 22, 35, 96, 178,
- /* 1550 */ 176, 0, 0, 172, 171, 0, 0, 33, 347, 35,
- /* 1560 */ 46, 0, 0, 0, 0, 42, 355, 0, 0, 375,
- /* 1570 */ 154, 360, 0, 362, 0, 0, 0, 0, 149, 35,
- /* 1580 */ 56, 129, 0, 318, 149, 0, 392, 0, 0, 0,
- /* 1590 */ 0, 0, 68, 22, 383, 0, 0, 0, 387, 0,
- /* 1600 */ 0, 0, 391, 392, 393, 394, 395, 396, 397, 318,
- /* 1610 */ 399, 0, 347, 0, 162, 421, 0, 406, 0, 0,
- /* 1620 */ 355, 410, 411, 42, 0, 360, 0, 362, 0, 0,
- /* 1630 */ 436, 437, 180, 0, 182, 441, 442, 0, 347, 0,
- /* 1640 */ 116, 35, 0, 0, 0, 0, 355, 42, 383, 14,
- /* 1650 */ 56, 360, 387, 362, 56, 43, 391, 392, 393, 394,
- /* 1660 */ 395, 396, 397, 46, 399, 14, 39, 46, 0, 0,
- /* 1670 */ 40, 406, 0, 39, 383, 410, 411, 0, 387, 318,
- /* 1680 */ 39, 0, 391, 392, 393, 394, 395, 396, 397, 398,
- /* 1690 */ 399, 400, 401, 167, 0, 0, 0, 0, 62, 35,
- /* 1700 */ 176, 47, 178, 0, 39, 35, 47, 0, 347, 35,
- /* 1710 */ 39, 0, 39, 47, 35, 39, 355, 0, 0, 0,
- /* 1720 */ 0, 360, 47, 362, 200, 201, 103, 35, 22, 0,
- /* 1730 */ 43, 43, 101, 35, 35, 35, 212, 213, 214, 215,
- /* 1740 */ 216, 217, 218, 318, 383, 35, 22, 0, 387, 22,
- /* 1750 */ 0, 49, 391, 392, 393, 394, 395, 396, 397, 22,
- /* 1760 */ 399, 0, 22, 35, 0, 35, 0, 35, 0, 318,
- /* 1770 */ 22, 20, 347, 95, 0, 0, 94, 163, 35, 22,
- /* 1780 */ 355, 179, 160, 163, 0, 360, 318, 362, 0, 3,
- /* 1790 */ 165, 0, 0, 0, 35, 163, 95, 188, 347, 94,
- /* 1800 */ 0, 161, 94, 352, 443, 444, 355, 94, 383, 0,
- /* 1810 */ 39, 360, 387, 362, 159, 347, 391, 392, 393, 394,
- /* 1820 */ 395, 396, 397, 355, 399, 94, 104, 46, 360, 222,
- /* 1830 */ 362, 406, 43, 43, 383, 243, 411, 222, 387, 318,
- /* 1840 */ 94, 43, 391, 392, 393, 394, 395, 396, 397, 95,
- /* 1850 */ 399, 383, 94, 43, 94, 387, 318, 95, 95, 391,
- /* 1860 */ 392, 393, 394, 395, 396, 397, 94, 399, 347, 401,
- /* 1870 */ 224, 95, 94, 94, 46, 95, 355, 46, 43, 94,
- /* 1880 */ 3, 360, 95, 362, 43, 347, 35, 35, 35, 95,
- /* 1890 */ 243, 243, 35, 355, 35, 35, 95, 95, 360, 237,
- /* 1900 */ 362, 46, 46, 22, 383, 43, 94, 46, 387, 200,
- /* 1910 */ 2, 318, 391, 392, 393, 394, 395, 396, 397, 95,
- /* 1920 */ 399, 383, 95, 94, 94, 387, 46, 95, 318, 391,
- /* 1930 */ 392, 393, 394, 395, 396, 397, 94, 399, 94, 46,
- /* 1940 */ 347, 95, 22, 94, 202, 105, 35, 35, 355, 95,
- /* 1950 */ 35, 35, 94, 360, 433, 362, 35, 347, 95, 94,
- /* 1960 */ 35, 95, 352, 94, 94, 355, 95, 95, 94, 22,
- /* 1970 */ 360, 35, 362, 435, 106, 43, 383, 94, 94, 318,
- /* 1980 */ 387, 94, 118, 22, 391, 392, 393, 394, 395, 396,
- /* 1990 */ 397, 118, 399, 383, 118, 62, 118, 387, 318, 61,
- /* 2000 */ 35, 391, 392, 393, 394, 395, 396, 397, 347, 399,
- /* 2010 */ 35, 35, 35, 352, 35, 35, 355, 35, 35, 35,
- /* 2020 */ 35, 360, 91, 362, 68, 35, 35, 347, 22, 43,
- /* 2030 */ 35, 22, 35, 35, 35, 355, 68, 444, 35, 35,
- /* 2040 */ 360, 22, 362, 35, 383, 35, 35, 35, 387, 0,
- /* 2050 */ 35, 0, 391, 392, 393, 394, 395, 396, 397, 318,
- /* 2060 */ 399, 39, 35, 383, 47, 47, 0, 387, 39, 35,
- /* 2070 */ 47, 391, 392, 393, 394, 395, 396, 397, 39, 399,
- /* 2080 */ 0, 35, 47, 39, 0, 35, 0, 35, 347, 22,
- /* 2090 */ 21, 447, 22, 22, 21, 20, 355, 447, 447, 447,
- /* 2100 */ 447, 360, 447, 362, 447, 447, 447, 447, 447, 447,
- /* 2110 */ 447, 447, 447, 447, 447, 447, 447, 318, 447, 447,
- /* 2120 */ 447, 447, 447, 447, 383, 447, 447, 447, 387, 447,
- /* 2130 */ 447, 447, 391, 392, 393, 394, 395, 396, 397, 318,
- /* 2140 */ 399, 447, 447, 447, 447, 447, 347, 447, 447, 447,
- /* 2150 */ 447, 447, 447, 447, 355, 447, 447, 447, 447, 360,
- /* 2160 */ 447, 362, 447, 447, 447, 447, 447, 447, 347, 447,
- /* 2170 */ 447, 447, 447, 447, 447, 447, 355, 447, 447, 447,
- /* 2180 */ 447, 360, 383, 362, 447, 447, 387, 447, 447, 447,
- /* 2190 */ 391, 392, 393, 394, 395, 396, 397, 447, 399, 447,
- /* 2200 */ 318, 447, 447, 447, 383, 447, 447, 447, 387, 447,
- /* 2210 */ 447, 447, 391, 392, 393, 394, 395, 396, 397, 318,
- /* 2220 */ 399, 447, 447, 447, 447, 447, 447, 447, 447, 347,
- /* 2230 */ 447, 447, 447, 447, 447, 447, 447, 355, 447, 447,
- /* 2240 */ 447, 447, 360, 447, 362, 447, 447, 447, 347, 447,
- /* 2250 */ 447, 447, 447, 447, 447, 447, 355, 447, 447, 447,
- /* 2260 */ 447, 360, 447, 362, 447, 383, 447, 447, 447, 387,
- /* 2270 */ 447, 447, 318, 391, 392, 393, 394, 395, 396, 397,
- /* 2280 */ 447, 399, 447, 447, 383, 447, 447, 447, 387, 318,
- /* 2290 */ 447, 447, 391, 392, 393, 394, 395, 396, 397, 447,
- /* 2300 */ 399, 347, 447, 447, 447, 447, 447, 447, 447, 355,
- /* 2310 */ 447, 447, 447, 447, 360, 447, 362, 447, 347, 447,
- /* 2320 */ 447, 447, 447, 447, 447, 447, 355, 447, 447, 447,
- /* 2330 */ 447, 360, 318, 362, 447, 447, 447, 383, 447, 447,
- /* 2340 */ 447, 387, 447, 447, 447, 391, 392, 393, 394, 395,
- /* 2350 */ 396, 397, 447, 399, 383, 447, 318, 447, 387, 447,
- /* 2360 */ 447, 347, 391, 392, 393, 394, 395, 396, 397, 355,
- /* 2370 */ 399, 447, 447, 447, 360, 318, 362, 447, 447, 447,
- /* 2380 */ 447, 447, 447, 447, 447, 347, 447, 447, 447, 447,
- /* 2390 */ 447, 447, 447, 355, 447, 447, 447, 383, 360, 447,
- /* 2400 */ 362, 387, 447, 447, 347, 391, 392, 393, 394, 395,
- /* 2410 */ 396, 397, 355, 399, 447, 447, 447, 360, 447, 362,
- /* 2420 */ 447, 383, 447, 447, 447, 387, 447, 447, 447, 391,
- /* 2430 */ 392, 393, 394, 395, 396, 397, 318, 399, 447, 447,
- /* 2440 */ 383, 447, 447, 447, 387, 447, 447, 447, 391, 392,
- /* 2450 */ 393, 394, 395, 396, 397, 318, 399, 447, 447, 447,
- /* 2460 */ 447, 447, 447, 447, 447, 347, 447, 447, 447, 447,
- /* 2470 */ 447, 447, 447, 355, 447, 447, 447, 447, 360, 447,
- /* 2480 */ 362, 447, 447, 447, 347, 447, 447, 447, 447, 447,
- /* 2490 */ 447, 447, 355, 447, 447, 447, 447, 360, 447, 362,
- /* 2500 */ 447, 383, 447, 447, 447, 387, 447, 447, 447, 391,
- /* 2510 */ 392, 393, 394, 395, 396, 397, 447, 399, 447, 318,
- /* 2520 */ 383, 447, 447, 447, 387, 447, 447, 447, 391, 392,
- /* 2530 */ 393, 394, 395, 396, 397, 447, 399, 318, 447, 447,
- /* 2540 */ 447, 447, 447, 447, 447, 447, 447, 447, 347, 447,
- /* 2550 */ 447, 447, 447, 447, 447, 447, 355, 447, 447, 447,
- /* 2560 */ 447, 360, 447, 362, 447, 447, 347, 447, 447, 447,
- /* 2570 */ 447, 447, 447, 447, 355, 447, 447, 447, 447, 360,
- /* 2580 */ 318, 362, 447, 447, 383, 447, 447, 447, 387, 447,
- /* 2590 */ 447, 447, 391, 392, 393, 394, 395, 396, 397, 447,
- /* 2600 */ 399, 447, 383, 447, 447, 447, 387, 447, 447, 347,
- /* 2610 */ 391, 392, 393, 394, 395, 396, 397, 355, 399, 447,
- /* 2620 */ 447, 447, 360, 447, 362, 447, 447, 447, 447, 447,
- /* 2630 */ 447, 447, 447, 318, 447, 447, 447, 447, 447, 447,
- /* 2640 */ 447, 447, 447, 447, 447, 383, 447, 447, 447, 387,
- /* 2650 */ 318, 447, 447, 391, 392, 393, 394, 395, 396, 397,
- /* 2660 */ 447, 399, 347, 447, 447, 447, 447, 447, 447, 447,
- /* 2670 */ 355, 447, 447, 447, 447, 360, 447, 362, 447, 347,
- /* 2680 */ 447, 447, 447, 447, 447, 447, 447, 355, 447, 447,
- /* 2690 */ 447, 447, 360, 318, 362, 447, 447, 447, 383, 447,
- /* 2700 */ 447, 447, 387, 447, 447, 447, 391, 392, 393, 394,
- /* 2710 */ 395, 396, 397, 447, 399, 383, 447, 318, 447, 387,
- /* 2720 */ 447, 447, 347, 391, 392, 393, 394, 395, 396, 397,
- /* 2730 */ 355, 399, 447, 447, 447, 360, 318, 362, 447, 447,
- /* 2740 */ 447, 447, 447, 447, 447, 447, 347, 447, 447, 447,
- /* 2750 */ 447, 447, 447, 447, 355, 447, 447, 447, 383, 360,
- /* 2760 */ 447, 362, 387, 447, 447, 347, 391, 392, 393, 394,
- /* 2770 */ 395, 396, 397, 355, 399, 447, 447, 447, 360, 447,
- /* 2780 */ 362, 447, 383, 447, 447, 447, 387, 447, 447, 447,
- /* 2790 */ 391, 392, 393, 394, 395, 396, 397, 447, 399, 447,
- /* 2800 */ 447, 383, 447, 447, 447, 387, 447, 447, 447, 391,
- /* 2810 */ 392, 393, 394, 395, 396, 397, 447, 399,
+ /* 270 */ 213, 214, 215, 216, 217, 218, 219, 220, 221, 222,
+ /* 280 */ 12, 13, 245, 246, 93, 334, 335, 96, 20, 350,
+ /* 290 */ 22, 249, 250, 251, 252, 253, 393, 227, 204, 327,
+ /* 300 */ 361, 33, 240, 35, 134, 135, 21, 237, 94, 24,
+ /* 310 */ 25, 26, 27, 28, 29, 30, 31, 32, 415, 416,
+ /* 320 */ 417, 106, 419, 240, 56, 60, 387, 388, 356, 61,
+ /* 330 */ 393, 224, 319, 226, 327, 171, 68, 12, 13, 400,
+ /* 340 */ 125, 126, 127, 128, 129, 20, 339, 22, 327, 332,
+ /* 350 */ 159, 160, 94, 162, 337, 191, 192, 166, 33, 422,
+ /* 360 */ 35, 348, 94, 356, 20, 393, 327, 393, 404, 356,
+ /* 370 */ 406, 240, 240, 182, 361, 438, 363, 356, 339, 442,
+ /* 380 */ 443, 56, 240, 327, 116, 346, 61, 415, 416, 417,
+ /* 390 */ 126, 419, 20, 68, 22, 356, 422, 384, 130, 131,
+ /* 400 */ 20, 388, 0, 125, 126, 392, 393, 394, 395, 396,
+ /* 410 */ 397, 398, 438, 400, 393, 20, 442, 443, 405, 94,
+ /* 420 */ 407, 365, 50, 327, 411, 412, 24, 25, 26, 27,
+ /* 430 */ 28, 29, 30, 31, 32, 339, 415, 416, 417, 390,
+ /* 440 */ 419, 116, 346, 422, 176, 432, 178, 183, 184, 60,
+ /* 450 */ 348, 187, 356, 20, 240, 130, 131, 355, 437, 438,
+ /* 460 */ 1, 2, 184, 442, 443, 187, 364, 418, 200, 201,
+ /* 470 */ 0, 203, 204, 205, 206, 207, 208, 209, 210, 211,
+ /* 480 */ 212, 213, 214, 215, 216, 217, 218, 219, 220, 221,
+ /* 490 */ 222, 125, 224, 14, 404, 316, 406, 37, 240, 20,
+ /* 500 */ 331, 176, 372, 178, 374, 107, 108, 109, 110, 111,
+ /* 510 */ 112, 113, 114, 115, 116, 117, 43, 119, 120, 121,
+ /* 520 */ 122, 123, 124, 354, 105, 200, 201, 56, 203, 204,
+ /* 530 */ 205, 206, 207, 208, 209, 210, 211, 212, 213, 214,
+ /* 540 */ 215, 216, 217, 218, 219, 220, 221, 222, 12, 13,
+ /* 550 */ 22, 185, 186, 340, 95, 376, 20, 97, 22, 99,
+ /* 560 */ 100, 348, 102, 35, 93, 327, 106, 96, 95, 33,
+ /* 570 */ 357, 35, 393, 0, 376, 390, 106, 339, 8, 9,
+ /* 580 */ 347, 319, 12, 13, 14, 15, 16, 20, 128, 224,
+ /* 590 */ 20, 393, 56, 360, 356, 125, 126, 127, 128, 129,
+ /* 600 */ 319, 422, 327, 418, 68, 12, 13, 14, 334, 335,
+ /* 610 */ 348, 319, 68, 20, 339, 22, 437, 438, 356, 68,
+ /* 620 */ 422, 442, 443, 361, 56, 363, 33, 348, 35, 348,
+ /* 630 */ 94, 356, 21, 60, 355, 437, 438, 356, 3, 327,
+ /* 640 */ 442, 443, 361, 364, 363, 34, 384, 36, 0, 56,
+ /* 650 */ 388, 339, 116, 361, 392, 393, 394, 395, 396, 397,
+ /* 660 */ 398, 68, 400, 340, 96, 384, 130, 131, 356, 388,
+ /* 670 */ 349, 348, 393, 392, 393, 394, 395, 396, 397, 398,
+ /* 680 */ 357, 400, 341, 204, 422, 344, 405, 94, 407, 319,
+ /* 690 */ 8, 9, 411, 412, 12, 13, 14, 15, 16, 437,
+ /* 700 */ 438, 422, 421, 327, 442, 443, 327, 43, 60, 116,
+ /* 710 */ 363, 372, 176, 374, 178, 339, 437, 438, 339, 320,
+ /* 720 */ 373, 442, 443, 130, 131, 348, 358, 356, 319, 361,
+ /* 730 */ 163, 361, 356, 163, 357, 356, 200, 201, 367, 203,
+ /* 740 */ 204, 205, 206, 207, 208, 209, 210, 211, 212, 213,
+ /* 750 */ 214, 215, 216, 217, 218, 219, 220, 221, 222, 95,
+ /* 760 */ 8, 9, 327, 327, 12, 13, 14, 15, 16, 176,
+ /* 770 */ 361, 178, 340, 349, 339, 339, 240, 95, 8, 9,
+ /* 780 */ 348, 319, 12, 13, 14, 15, 16, 403, 319, 357,
+ /* 790 */ 406, 356, 356, 200, 201, 43, 203, 204, 205, 206,
+ /* 800 */ 207, 208, 209, 210, 211, 212, 213, 214, 215, 216,
+ /* 810 */ 217, 218, 219, 220, 221, 222, 12, 13, 376, 22,
+ /* 820 */ 356, 319, 348, 361, 20, 358, 22, 319, 361, 3,
+ /* 830 */ 361, 367, 35, 327, 319, 393, 349, 33, 364, 35,
+ /* 840 */ 2, 376, 44, 45, 106, 339, 8, 9, 319, 319,
+ /* 850 */ 12, 13, 14, 15, 16, 336, 39, 338, 393, 327,
+ /* 860 */ 56, 4, 356, 361, 422, 68, 128, 319, 319, 361,
+ /* 870 */ 327, 339, 68, 12, 13, 43, 361, 327, 348, 437,
+ /* 880 */ 438, 20, 339, 22, 442, 443, 356, 422, 356, 339,
+ /* 890 */ 361, 361, 257, 363, 33, 20, 35, 348, 94, 356,
+ /* 900 */ 380, 341, 437, 438, 344, 356, 356, 442, 443, 361,
+ /* 910 */ 361, 20, 363, 116, 384, 0, 319, 56, 388, 327,
+ /* 920 */ 116, 95, 392, 393, 394, 395, 396, 397, 398, 68,
+ /* 930 */ 400, 339, 349, 384, 130, 131, 319, 388, 168, 42,
+ /* 940 */ 43, 392, 393, 394, 395, 396, 397, 398, 356, 400,
+ /* 950 */ 64, 65, 319, 61, 405, 94, 407, 71, 361, 0,
+ /* 960 */ 411, 412, 47, 433, 434, 238, 239, 327, 82, 83,
+ /* 970 */ 421, 0, 327, 176, 88, 178, 35, 116, 361, 339,
+ /* 980 */ 176, 22, 178, 376, 339, 319, 98, 98, 319, 101,
+ /* 990 */ 101, 130, 131, 349, 361, 43, 356, 200, 201, 319,
+ /* 1000 */ 393, 356, 163, 164, 200, 201, 319, 203, 204, 205,
+ /* 1010 */ 206, 207, 208, 209, 210, 211, 212, 213, 214, 215,
+ /* 1020 */ 216, 217, 218, 219, 220, 221, 222, 361, 327, 422,
+ /* 1030 */ 361, 327, 262, 130, 131, 64, 65, 176, 163, 178,
+ /* 1040 */ 339, 361, 71, 339, 437, 438, 43, 95, 361, 442,
+ /* 1050 */ 443, 349, 43, 82, 83, 98, 239, 356, 101, 88,
+ /* 1060 */ 356, 200, 201, 0, 203, 204, 205, 206, 207, 208,
+ /* 1070 */ 209, 210, 211, 212, 213, 214, 215, 216, 217, 218,
+ /* 1080 */ 219, 220, 221, 222, 18, 327, 20, 98, 1, 2,
+ /* 1090 */ 101, 259, 200, 27, 35, 204, 30, 339, 241, 0,
+ /* 1100 */ 0, 94, 8, 9, 95, 391, 12, 13, 14, 15,
+ /* 1110 */ 16, 104, 337, 47, 356, 49, 43, 51, 43, 178,
+ /* 1120 */ 43, 22, 22, 446, 43, 43, 63, 64, 65, 66,
+ /* 1130 */ 67, 43, 69, 70, 71, 72, 73, 74, 75, 76,
+ /* 1140 */ 77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
+ /* 1150 */ 87, 88, 89, 90, 435, 18, 328, 8, 9, 93,
+ /* 1160 */ 23, 12, 13, 14, 15, 16, 429, 35, 95, 13,
+ /* 1170 */ 95, 105, 95, 43, 37, 38, 95, 95, 41, 46,
+ /* 1180 */ 8, 9, 348, 95, 12, 13, 14, 15, 16, 95,
+ /* 1190 */ 43, 35, 328, 326, 57, 58, 59, 43, 391, 133,
+ /* 1200 */ 68, 319, 136, 137, 138, 139, 140, 141, 142, 143,
+ /* 1210 */ 144, 145, 146, 147, 148, 149, 150, 151, 152, 153,
+ /* 1220 */ 43, 155, 156, 157, 13, 95, 360, 94, 8, 9,
+ /* 1230 */ 348, 94, 12, 13, 14, 15, 16, 178, 356, 43,
+ /* 1240 */ 43, 420, 95, 361, 439, 363, 35, 0, 413, 95,
+ /* 1250 */ 423, 386, 242, 47, 385, 378, 42, 174, 368, 20,
+ /* 1260 */ 327, 327, 368, 158, 261, 366, 384, 366, 92, 132,
+ /* 1270 */ 388, 333, 95, 327, 392, 393, 394, 395, 396, 397,
+ /* 1280 */ 398, 61, 400, 327, 20, 403, 321, 405, 406, 407,
+ /* 1290 */ 327, 95, 95, 411, 412, 48, 321, 20, 382, 331,
+ /* 1300 */ 376, 331, 363, 20, 375, 168, 169, 170, 20, 377,
+ /* 1310 */ 173, 319, 163, 331, 331, 375, 4, 393, 331, 331,
+ /* 1320 */ 327, 331, 321, 103, 348, 348, 348, 190, 348, 348,
+ /* 1330 */ 193, 19, 195, 196, 197, 198, 199, 321, 327, 348,
+ /* 1340 */ 348, 189, 348, 348, 348, 33, 422, 348, 356, 383,
+ /* 1350 */ 348, 382, 329, 361, 181, 363, 329, 327, 361, 47,
+ /* 1360 */ 381, 437, 438, 51, 327, 329, 442, 443, 56, 363,
+ /* 1370 */ 247, 371, 160, 375, 361, 361, 384, 240, 158, 361,
+ /* 1380 */ 388, 361, 361, 371, 392, 393, 394, 395, 396, 397,
+ /* 1390 */ 398, 369, 400, 319, 329, 344, 329, 405, 356, 407,
+ /* 1400 */ 20, 361, 428, 411, 412, 93, 391, 248, 96, 371,
+ /* 1410 */ 391, 361, 428, 421, 361, 371, 361, 361, 254, 167,
+ /* 1420 */ 263, 256, 348, 255, 243, 386, 260, 441, 258, 239,
+ /* 1430 */ 356, 20, 447, 425, 430, 361, 431, 363, 390, 94,
+ /* 1440 */ 356, 410, 94, 352, 338, 428, 319, 227, 228, 229,
+ /* 1450 */ 230, 231, 232, 233, 234, 235, 236, 237, 384, 427,
+ /* 1460 */ 426, 327, 388, 361, 440, 329, 392, 393, 394, 395,
+ /* 1470 */ 396, 397, 398, 36, 400, 348, 379, 322, 374, 405,
+ /* 1480 */ 342, 407, 321, 356, 342, 411, 412, 342, 361, 0,
+ /* 1490 */ 363, 317, 330, 0, 183, 0, 0, 42, 0, 35,
+ /* 1500 */ 194, 35, 35, 35, 194, 0, 35, 35, 194, 0,
+ /* 1510 */ 194, 384, 0, 35, 319, 388, 0, 0, 35, 392,
+ /* 1520 */ 393, 394, 395, 396, 397, 398, 22, 400, 178, 176,
+ /* 1530 */ 0, 0, 405, 172, 407, 171, 319, 0, 411, 412,
+ /* 1540 */ 12, 13, 0, 348, 42, 46, 0, 0, 0, 0,
+ /* 1550 */ 22, 356, 0, 0, 154, 0, 361, 0, 363, 0,
+ /* 1560 */ 0, 33, 0, 35, 149, 348, 0, 35, 149, 0,
+ /* 1570 */ 0, 0, 0, 356, 0, 0, 0, 0, 361, 384,
+ /* 1580 */ 363, 0, 0, 388, 56, 0, 0, 392, 393, 394,
+ /* 1590 */ 395, 396, 397, 398, 319, 400, 68, 0, 0, 0,
+ /* 1600 */ 405, 384, 407, 42, 0, 388, 411, 412, 0, 392,
+ /* 1610 */ 393, 394, 395, 396, 397, 398, 0, 400, 0, 0,
+ /* 1620 */ 19, 0, 22, 348, 407, 0, 0, 0, 411, 412,
+ /* 1630 */ 0, 356, 0, 0, 33, 56, 361, 35, 363, 56,
+ /* 1640 */ 0, 0, 14, 14, 116, 42, 39, 0, 47, 43,
+ /* 1650 */ 40, 46, 39, 52, 53, 54, 55, 56, 0, 384,
+ /* 1660 */ 46, 0, 39, 388, 167, 0, 0, 392, 393, 394,
+ /* 1670 */ 395, 396, 397, 398, 0, 400, 0, 62, 0, 35,
+ /* 1680 */ 0, 47, 407, 35, 39, 47, 411, 412, 39, 0,
+ /* 1690 */ 35, 39, 0, 47, 93, 35, 319, 96, 47, 0,
+ /* 1700 */ 0, 39, 0, 0, 176, 35, 178, 22, 0, 22,
+ /* 1710 */ 35, 43, 103, 0, 35, 43, 35, 35, 101, 0,
+ /* 1720 */ 22, 0, 49, 22, 0, 348, 22, 0, 200, 201,
+ /* 1730 */ 129, 35, 0, 356, 22, 0, 20, 95, 361, 0,
+ /* 1740 */ 363, 213, 214, 215, 216, 217, 218, 219, 94, 35,
+ /* 1750 */ 35, 163, 35, 22, 163, 319, 160, 179, 0, 0,
+ /* 1760 */ 3, 384, 0, 162, 0, 388, 0, 0, 35, 392,
+ /* 1770 */ 393, 394, 395, 396, 397, 398, 399, 400, 401, 402,
+ /* 1780 */ 94, 180, 188, 182, 348, 163, 95, 94, 94, 165,
+ /* 1790 */ 0, 39, 356, 46, 104, 159, 161, 361, 43, 363,
+ /* 1800 */ 94, 94, 244, 223, 43, 95, 95, 244, 43, 225,
+ /* 1810 */ 319, 43, 223, 95, 94, 46, 94, 46, 95, 94,
+ /* 1820 */ 384, 95, 94, 94, 388, 43, 3, 43, 392, 393,
+ /* 1830 */ 394, 395, 396, 397, 398, 94, 400, 95, 95, 348,
+ /* 1840 */ 35, 35, 35, 35, 35, 35, 95, 356, 95, 46,
+ /* 1850 */ 46, 2, 361, 200, 363, 244, 43, 22, 238, 22,
+ /* 1860 */ 46, 46, 46, 319, 94, 202, 22, 95, 94, 35,
+ /* 1870 */ 95, 94, 118, 95, 94, 384, 95, 94, 105, 388,
+ /* 1880 */ 444, 445, 94, 392, 393, 394, 395, 396, 397, 398,
+ /* 1890 */ 95, 400, 348, 35, 94, 35, 95, 353, 407, 35,
+ /* 1900 */ 356, 35, 106, 412, 35, 361, 94, 363, 35, 118,
+ /* 1910 */ 118, 118, 95, 94, 319, 95, 94, 43, 22, 95,
+ /* 1920 */ 94, 94, 94, 94, 62, 35, 61, 35, 384, 35,
+ /* 1930 */ 35, 319, 388, 35, 91, 35, 392, 393, 394, 395,
+ /* 1940 */ 396, 397, 398, 348, 400, 35, 35, 35, 35, 68,
+ /* 1950 */ 43, 356, 35, 35, 22, 35, 361, 22, 363, 35,
+ /* 1960 */ 348, 35, 35, 35, 35, 68, 35, 22, 356, 35,
+ /* 1970 */ 0, 35, 35, 361, 35, 363, 0, 47, 35, 384,
+ /* 1980 */ 39, 0, 0, 388, 35, 47, 39, 392, 393, 394,
+ /* 1990 */ 395, 396, 397, 398, 39, 400, 384, 402, 47, 35,
+ /* 2000 */ 388, 47, 39, 0, 392, 393, 394, 395, 396, 397,
+ /* 2010 */ 398, 0, 400, 35, 35, 21, 319, 22, 22, 22,
+ /* 2020 */ 21, 20, 448, 448, 448, 448, 448, 448, 448, 448,
+ /* 2030 */ 448, 448, 448, 448, 448, 448, 448, 448, 448, 448,
+ /* 2040 */ 448, 448, 448, 448, 448, 348, 434, 448, 448, 448,
+ /* 2050 */ 448, 448, 448, 356, 448, 448, 448, 448, 361, 448,
+ /* 2060 */ 363, 448, 448, 448, 448, 448, 448, 319, 448, 448,
+ /* 2070 */ 448, 448, 448, 448, 448, 448, 448, 448, 448, 448,
+ /* 2080 */ 448, 384, 448, 448, 448, 388, 448, 448, 448, 392,
+ /* 2090 */ 393, 394, 395, 396, 397, 398, 348, 400, 448, 448,
+ /* 2100 */ 448, 448, 448, 448, 356, 448, 448, 448, 448, 361,
+ /* 2110 */ 448, 363, 448, 448, 448, 448, 448, 448, 448, 448,
+ /* 2120 */ 448, 448, 448, 448, 448, 448, 448, 448, 448, 448,
+ /* 2130 */ 319, 448, 384, 436, 448, 448, 388, 448, 448, 448,
+ /* 2140 */ 392, 393, 394, 395, 396, 397, 398, 448, 400, 448,
+ /* 2150 */ 319, 448, 448, 448, 448, 448, 448, 448, 448, 348,
+ /* 2160 */ 448, 448, 448, 448, 353, 448, 448, 356, 448, 448,
+ /* 2170 */ 448, 448, 361, 448, 363, 448, 448, 448, 448, 348,
+ /* 2180 */ 448, 448, 448, 448, 353, 448, 448, 356, 448, 448,
+ /* 2190 */ 448, 448, 361, 445, 363, 384, 448, 448, 448, 388,
+ /* 2200 */ 448, 319, 448, 392, 393, 394, 395, 396, 397, 398,
+ /* 2210 */ 448, 400, 448, 448, 448, 384, 448, 448, 319, 388,
+ /* 2220 */ 448, 448, 448, 392, 393, 394, 395, 396, 397, 398,
+ /* 2230 */ 348, 400, 448, 448, 448, 448, 448, 448, 356, 448,
+ /* 2240 */ 448, 448, 448, 361, 448, 363, 448, 348, 448, 448,
+ /* 2250 */ 448, 448, 448, 448, 448, 356, 448, 448, 448, 448,
+ /* 2260 */ 361, 319, 363, 448, 448, 448, 384, 448, 448, 448,
+ /* 2270 */ 388, 448, 448, 448, 392, 393, 394, 395, 396, 397,
+ /* 2280 */ 398, 448, 400, 384, 448, 448, 448, 388, 448, 448,
+ /* 2290 */ 348, 392, 393, 394, 395, 396, 397, 398, 356, 400,
+ /* 2300 */ 448, 448, 448, 361, 448, 363, 448, 448, 448, 448,
+ /* 2310 */ 448, 448, 319, 448, 448, 448, 448, 448, 448, 448,
+ /* 2320 */ 448, 448, 448, 448, 448, 448, 384, 448, 448, 319,
+ /* 2330 */ 388, 448, 448, 448, 392, 393, 394, 395, 396, 397,
+ /* 2340 */ 398, 348, 400, 448, 448, 448, 448, 448, 448, 356,
+ /* 2350 */ 448, 448, 448, 448, 361, 448, 363, 448, 348, 448,
+ /* 2360 */ 448, 448, 448, 448, 448, 448, 356, 448, 448, 448,
+ /* 2370 */ 448, 361, 448, 363, 448, 448, 448, 384, 448, 448,
+ /* 2380 */ 319, 388, 448, 448, 448, 392, 393, 394, 395, 396,
+ /* 2390 */ 397, 398, 448, 400, 384, 448, 448, 448, 388, 448,
+ /* 2400 */ 448, 448, 392, 393, 394, 395, 396, 397, 398, 348,
+ /* 2410 */ 400, 448, 448, 448, 448, 448, 448, 356, 448, 448,
+ /* 2420 */ 448, 448, 361, 448, 363, 448, 448, 448, 448, 448,
+ /* 2430 */ 448, 319, 448, 448, 448, 448, 448, 448, 448, 448,
+ /* 2440 */ 448, 448, 448, 448, 448, 384, 448, 448, 448, 388,
+ /* 2450 */ 319, 448, 448, 392, 393, 394, 395, 396, 397, 398,
+ /* 2460 */ 348, 400, 448, 448, 448, 448, 448, 448, 356, 448,
+ /* 2470 */ 448, 448, 448, 361, 448, 363, 448, 448, 448, 348,
+ /* 2480 */ 448, 448, 448, 448, 448, 448, 448, 356, 448, 448,
+ /* 2490 */ 448, 448, 361, 448, 363, 448, 384, 448, 448, 448,
+ /* 2500 */ 388, 448, 448, 448, 392, 393, 394, 395, 396, 397,
+ /* 2510 */ 398, 448, 400, 319, 448, 384, 448, 448, 448, 388,
+ /* 2520 */ 448, 448, 448, 392, 393, 394, 395, 396, 397, 398,
+ /* 2530 */ 448, 400, 448, 448, 448, 319, 448, 448, 448, 448,
+ /* 2540 */ 448, 448, 348, 448, 448, 448, 448, 448, 448, 448,
+ /* 2550 */ 356, 448, 448, 448, 448, 361, 448, 363, 448, 448,
+ /* 2560 */ 448, 448, 448, 448, 348, 448, 448, 448, 448, 448,
+ /* 2570 */ 448, 448, 356, 448, 448, 448, 448, 361, 384, 363,
+ /* 2580 */ 448, 448, 388, 448, 448, 448, 392, 393, 394, 395,
+ /* 2590 */ 396, 397, 398, 448, 400, 319, 448, 448, 448, 448,
+ /* 2600 */ 384, 448, 448, 448, 388, 448, 448, 448, 392, 393,
+ /* 2610 */ 394, 395, 396, 397, 398, 319, 400, 448, 448, 448,
+ /* 2620 */ 448, 448, 448, 448, 348, 448, 448, 448, 448, 448,
+ /* 2630 */ 448, 448, 356, 448, 448, 448, 448, 361, 448, 363,
+ /* 2640 */ 448, 448, 448, 448, 348, 448, 448, 448, 448, 448,
+ /* 2650 */ 448, 448, 356, 448, 448, 448, 448, 361, 319, 363,
+ /* 2660 */ 384, 448, 448, 448, 388, 448, 448, 448, 392, 393,
+ /* 2670 */ 394, 395, 396, 397, 398, 448, 400, 448, 319, 448,
+ /* 2680 */ 384, 448, 448, 448, 388, 448, 448, 348, 392, 393,
+ /* 2690 */ 394, 395, 396, 397, 398, 356, 400, 448, 448, 448,
+ /* 2700 */ 361, 448, 363, 448, 448, 448, 448, 348, 448, 448,
+ /* 2710 */ 448, 448, 448, 448, 448, 356, 448, 448, 448, 448,
+ /* 2720 */ 361, 448, 363, 384, 448, 448, 448, 388, 448, 319,
+ /* 2730 */ 448, 392, 393, 394, 395, 396, 397, 398, 448, 400,
+ /* 2740 */ 448, 448, 448, 384, 448, 448, 448, 388, 448, 448,
+ /* 2750 */ 448, 392, 393, 394, 395, 396, 397, 398, 348, 400,
+ /* 2760 */ 448, 448, 448, 448, 448, 448, 356, 448, 448, 448,
+ /* 2770 */ 448, 361, 448, 363, 448, 448, 448, 448, 448, 448,
+ /* 2780 */ 319, 448, 448, 448, 448, 448, 448, 448, 448, 448,
+ /* 2790 */ 448, 448, 448, 448, 384, 448, 448, 448, 388, 319,
+ /* 2800 */ 448, 448, 392, 393, 394, 395, 396, 397, 398, 348,
+ /* 2810 */ 400, 448, 448, 448, 448, 448, 448, 356, 448, 448,
+ /* 2820 */ 448, 448, 361, 448, 363, 448, 448, 448, 348, 448,
+ /* 2830 */ 448, 448, 448, 448, 448, 448, 356, 448, 448, 448,
+ /* 2840 */ 448, 361, 448, 363, 448, 384, 448, 448, 448, 388,
+ /* 2850 */ 448, 448, 448, 392, 393, 394, 395, 396, 397, 398,
+ /* 2860 */ 448, 400, 319, 448, 384, 448, 448, 448, 388, 448,
+ /* 2870 */ 448, 448, 392, 393, 394, 395, 396, 397, 398, 448,
+ /* 2880 */ 400, 448, 448, 448, 319, 448, 448, 448, 448, 448,
+ /* 2890 */ 448, 348, 448, 448, 448, 448, 448, 448, 448, 356,
+ /* 2900 */ 448, 448, 448, 448, 361, 448, 363, 448, 448, 448,
+ /* 2910 */ 448, 448, 448, 348, 448, 448, 448, 448, 448, 448,
+ /* 2920 */ 448, 356, 448, 448, 448, 448, 361, 384, 363, 448,
+ /* 2930 */ 448, 388, 448, 448, 448, 392, 393, 394, 395, 396,
+ /* 2940 */ 397, 398, 448, 400, 319, 448, 448, 448, 448, 384,
+ /* 2950 */ 448, 448, 448, 388, 448, 448, 448, 392, 393, 394,
+ /* 2960 */ 395, 396, 397, 398, 319, 400, 448, 448, 448, 448,
+ /* 2970 */ 448, 448, 448, 348, 448, 448, 448, 448, 448, 448,
+ /* 2980 */ 448, 356, 448, 448, 448, 448, 361, 448, 363, 448,
+ /* 2990 */ 448, 448, 448, 348, 448, 448, 448, 448, 448, 448,
+ /* 3000 */ 448, 356, 448, 448, 448, 448, 361, 448, 363, 384,
+ /* 3010 */ 448, 448, 448, 388, 448, 448, 448, 392, 393, 394,
+ /* 3020 */ 395, 396, 397, 398, 448, 400, 448, 448, 448, 384,
+ /* 3030 */ 448, 448, 448, 388, 448, 448, 448, 392, 393, 394,
+ /* 3040 */ 395, 396, 397, 398, 448, 400,
};
#define YY_SHIFT_COUNT (688)
#define YY_SHIFT_MIN (0)
-#define YY_SHIFT_MAX (2086)
+#define YY_SHIFT_MAX (2011)
static const unsigned short int yy_shift_ofst[] = {
- /* 0 */ 1071, 0, 57, 267, 57, 324, 324, 324, 534, 324,
- /* 10 */ 324, 324, 324, 324, 591, 801, 801, 858, 801, 801,
- /* 20 */ 801, 801, 801, 801, 801, 801, 801, 801, 801, 801,
- /* 30 */ 801, 801, 801, 801, 801, 801, 801, 801, 801, 801,
- /* 40 */ 801, 801, 801, 801, 801, 801, 53, 86, 83, 192,
- /* 50 */ 276, 62, 85, 62, 83, 83, 1524, 1524, 62, 1524,
- /* 60 */ 1524, 87, 62, 207, 207, 30, 30, 8, 207, 207,
- /* 70 */ 207, 207, 207, 207, 207, 207, 207, 207, 73, 207,
- /* 80 */ 207, 207, 214, 207, 207, 313, 207, 207, 313, 332,
- /* 90 */ 207, 313, 313, 313, 207, 354, 1005, 1196, 1196, 283,
- /* 100 */ 381, 381, 381, 381, 381, 381, 381, 381, 381, 381,
- /* 110 */ 381, 381, 381, 381, 381, 381, 381, 381, 381, 464,
- /* 120 */ 883, 26, 8, 336, 336, 391, 487, 609, 209, 209,
- /* 130 */ 542, 542, 542, 487, 476, 476, 315, 214, 523, 523,
- /* 140 */ 330, 313, 313, 490, 490, 315, 546, 397, 397, 397,
- /* 150 */ 397, 397, 397, 397, 1452, 137, 413, 768, 1327, 91,
- /* 160 */ 67, 254, 226, 379, 132, 774, 175, 686, 587, 144,
- /* 170 */ 837, 587, 907, 722, 575, 981, 1178, 1052, 1191, 1214,
- /* 180 */ 1214, 1191, 1088, 1088, 1156, 1214, 1214, 1214, 1242, 1242,
- /* 190 */ 1253, 73, 214, 73, 1260, 1261, 73, 1260, 73, 73,
- /* 200 */ 73, 1214, 73, 1242, 313, 313, 313, 313, 313, 313,
- /* 210 */ 313, 313, 313, 313, 313, 1214, 1242, 490, 1145, 1253,
- /* 220 */ 354, 1160, 214, 354, 1214, 1214, 1260, 354, 1102, 490,
- /* 230 */ 490, 490, 490, 1102, 490, 1210, 354, 315, 354, 476,
- /* 240 */ 1375, 1375, 490, 1152, 1102, 490, 490, 1152, 1102, 490,
- /* 250 */ 490, 313, 1155, 1251, 1152, 1181, 1183, 1201, 981, 1176,
- /* 260 */ 1198, 1202, 1220, 476, 1445, 1372, 1379, 490, 546, 1214,
- /* 270 */ 354, 1450, 1242, 2818, 2818, 2818, 2818, 2818, 2818, 2818,
- /* 280 */ 1111, 189, 223, 812, 680, 216, 749, 50, 715, 1072,
- /* 290 */ 446, 978, 978, 978, 978, 978, 978, 978, 978, 978,
- /* 300 */ 459, 191, 11, 11, 179, 112, 210, 79, 360, 557,
- /* 310 */ 364, 477, 15, 475, 477, 477, 477, 346, 898, 933,
- /* 320 */ 872, 874, 932, 950, 963, 1027, 1028, 999, 819, 842,
- /* 330 */ 1010, 1040, 1064, 1073, 1075, 1078, 869, 670, 867, 1036,
- /* 340 */ 1039, 818, 1069, 915, 1120, 889, 1077, 1121, 1124, 1136,
- /* 350 */ 1159, 1170, 1177, 1002, 1079, 1087, 1104, 1207, 1494, 1496,
- /* 360 */ 1314, 1500, 1501, 1467, 1510, 1476, 1319, 1479, 1480, 1482,
- /* 370 */ 1324, 1519, 1492, 1495, 1337, 1532, 1340, 1541, 1503, 1542,
- /* 380 */ 1522, 1543, 1512, 1371, 1374, 1551, 1552, 1381, 1383, 1555,
- /* 390 */ 1556, 1514, 1561, 1562, 1563, 1523, 1564, 1567, 1568, 1416,
- /* 400 */ 1572, 1574, 1575, 1576, 1577, 1429, 1544, 1582, 1435, 1585,
- /* 410 */ 1587, 1588, 1589, 1590, 1591, 1595, 1596, 1597, 1599, 1600,
- /* 420 */ 1601, 1611, 1613, 1581, 1616, 1618, 1619, 1624, 1626, 1628,
- /* 430 */ 1571, 1629, 1633, 1637, 1639, 1606, 1642, 1594, 1643, 1598,
- /* 440 */ 1644, 1645, 1605, 1627, 1612, 1635, 1617, 1651, 1621, 1668,
- /* 450 */ 1630, 1634, 1669, 1672, 1677, 1641, 1526, 1681, 1694, 1695,
- /* 460 */ 1636, 1696, 1697, 1664, 1654, 1665, 1703, 1670, 1659, 1671,
- /* 470 */ 1707, 1674, 1666, 1673, 1711, 1679, 1675, 1676, 1717, 1718,
- /* 480 */ 1719, 1720, 1623, 1631, 1692, 1706, 1729, 1698, 1699, 1687,
- /* 490 */ 1688, 1700, 1710, 1724, 1747, 1727, 1750, 1737, 1702, 1761,
- /* 500 */ 1740, 1728, 1764, 1730, 1766, 1732, 1768, 1748, 1751, 1678,
- /* 510 */ 1682, 1774, 1614, 1743, 1775, 1602, 1757, 1620, 1622, 1784,
- /* 520 */ 1788, 1632, 1625, 1786, 1791, 1792, 1793, 1705, 1701, 1759,
- /* 530 */ 1609, 1800, 1708, 1640, 1713, 1809, 1771, 1655, 1731, 1722,
- /* 540 */ 1781, 1789, 1607, 1646, 1615, 1790, 1592, 1746, 1754, 1758,
- /* 550 */ 1762, 1763, 1760, 1798, 1776, 1772, 1778, 1779, 1780, 1810,
- /* 560 */ 1828, 1831, 1785, 1835, 1647, 1787, 1794, 1877, 1841, 1648,
- /* 570 */ 1851, 1852, 1853, 1857, 1859, 1860, 1801, 1802, 1855, 1662,
- /* 580 */ 1862, 1856, 1861, 1908, 1881, 1709, 1812, 1824, 1829, 1827,
- /* 590 */ 1830, 1832, 1880, 1842, 1844, 1893, 1846, 1920, 1742, 1849,
- /* 600 */ 1840, 1854, 1911, 1912, 1858, 1863, 1915, 1865, 1866, 1916,
- /* 610 */ 1869, 1871, 1921, 1870, 1872, 1925, 1874, 1864, 1873, 1876,
- /* 620 */ 1878, 1947, 1868, 1883, 1884, 1936, 1887, 1932, 1932, 1961,
- /* 630 */ 1933, 1938, 1965, 1975, 1976, 1977, 1979, 1980, 1982, 1983,
- /* 640 */ 1984, 1985, 1956, 1931, 1986, 1990, 1991, 2006, 1995, 2009,
- /* 650 */ 1997, 1998, 1999, 1968, 1687, 2003, 1688, 2004, 2008, 2010,
- /* 660 */ 2011, 2019, 2012, 2049, 2015, 2017, 2022, 2051, 2027, 2018,
- /* 670 */ 2029, 2066, 2034, 2023, 2039, 2080, 2046, 2035, 2044, 2084,
- /* 680 */ 2050, 2052, 2086, 2067, 2069, 2070, 2071, 2073, 2075,
+ /* 0 */ 1137, 0, 57, 268, 57, 325, 325, 325, 536, 325,
+ /* 10 */ 325, 325, 325, 325, 593, 804, 804, 861, 804, 804,
+ /* 20 */ 804, 804, 804, 804, 804, 804, 804, 804, 804, 804,
+ /* 30 */ 804, 804, 804, 804, 804, 804, 804, 804, 804, 804,
+ /* 40 */ 804, 804, 804, 804, 804, 804, 132, 214, 35, 62,
+ /* 50 */ 83, 142, 258, 142, 35, 35, 1528, 1528, 142, 1528,
+ /* 60 */ 1528, 131, 142, 203, 203, 30, 30, 23, 203, 203,
+ /* 70 */ 203, 203, 203, 203, 203, 203, 203, 203, 265, 203,
+ /* 80 */ 203, 203, 344, 203, 203, 380, 203, 203, 380, 395,
+ /* 90 */ 203, 380, 380, 380, 203, 389, 1066, 1220, 1220, 285,
+ /* 100 */ 797, 797, 797, 797, 797, 797, 797, 797, 797, 797,
+ /* 110 */ 797, 797, 797, 797, 797, 797, 797, 797, 797, 460,
+ /* 120 */ 886, 26, 23, 236, 236, 573, 38, 648, 107, 107,
+ /* 130 */ 567, 567, 567, 38, 433, 433, 419, 344, 1, 1,
+ /* 140 */ 365, 380, 380, 544, 544, 419, 551, 398, 398, 398,
+ /* 150 */ 398, 398, 398, 398, 1601, 137, 570, 770, 971, 42,
+ /* 160 */ 67, 37, 94, 479, 372, 798, 738, 875, 727, 817,
+ /* 170 */ 635, 727, 897, 857, 891, 1010, 1206, 1083, 1214, 1239,
+ /* 180 */ 1239, 1214, 1105, 1105, 1176, 1239, 1239, 1239, 1264, 1264,
+ /* 190 */ 1277, 265, 344, 265, 1283, 1288, 265, 1283, 265, 265,
+ /* 200 */ 265, 1239, 265, 1264, 380, 380, 380, 380, 380, 380,
+ /* 210 */ 380, 380, 380, 380, 380, 1239, 1264, 544, 1152, 1277,
+ /* 220 */ 389, 1173, 344, 389, 1239, 1239, 1283, 389, 1123, 544,
+ /* 230 */ 544, 544, 544, 1123, 544, 1212, 389, 419, 389, 433,
+ /* 240 */ 1380, 1380, 544, 1159, 1123, 544, 544, 1159, 1123, 544,
+ /* 250 */ 544, 380, 1164, 1252, 1159, 1165, 1168, 1181, 1010, 1157,
+ /* 260 */ 1166, 1170, 1190, 433, 1411, 1345, 1348, 544, 551, 1239,
+ /* 270 */ 389, 1437, 1264, 3046, 3046, 3046, 3046, 3046, 3046, 3046,
+ /* 280 */ 1063, 191, 402, 1312, 682, 752, 1094, 50, 838, 1149,
+ /* 290 */ 126, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172,
+ /* 300 */ 470, 215, 11, 11, 264, 278, 164, 471, 170, 611,
+ /* 310 */ 366, 16, 459, 70, 16, 16, 16, 473, 915, 528,
+ /* 320 */ 888, 889, 957, 989, 959, 1099, 1100, 568, 839, 664,
+ /* 330 */ 952, 1009, 1073, 1075, 1077, 1081, 903, 832, 1003, 1087,
+ /* 340 */ 1082, 941, 1059, 892, 1088, 826, 1133, 1130, 1147, 1154,
+ /* 350 */ 1177, 1196, 1197, 1007, 1156, 1211, 1132, 1247, 1489, 1493,
+ /* 360 */ 1311, 1495, 1496, 1455, 1498, 1464, 1306, 1466, 1467, 1468,
+ /* 370 */ 1310, 1505, 1471, 1472, 1314, 1509, 1316, 1512, 1478, 1516,
+ /* 380 */ 1504, 1517, 1483, 1350, 1353, 1530, 1531, 1361, 1364, 1537,
+ /* 390 */ 1542, 1499, 1546, 1547, 1548, 1502, 1549, 1552, 1553, 1400,
+ /* 400 */ 1555, 1557, 1559, 1560, 1562, 1415, 1532, 1566, 1419, 1569,
+ /* 410 */ 1570, 1571, 1572, 1574, 1575, 1576, 1577, 1581, 1582, 1585,
+ /* 420 */ 1586, 1597, 1598, 1561, 1599, 1604, 1608, 1616, 1618, 1619,
+ /* 430 */ 1600, 1621, 1625, 1626, 1627, 1602, 1630, 1579, 1632, 1583,
+ /* 440 */ 1633, 1640, 1603, 1607, 1606, 1628, 1605, 1629, 1614, 1641,
+ /* 450 */ 1610, 1613, 1647, 1658, 1661, 1623, 1497, 1665, 1666, 1674,
+ /* 460 */ 1615, 1676, 1678, 1644, 1634, 1645, 1680, 1648, 1638, 1649,
+ /* 470 */ 1689, 1655, 1646, 1652, 1692, 1660, 1651, 1662, 1699, 1700,
+ /* 480 */ 1702, 1703, 1609, 1617, 1670, 1685, 1708, 1675, 1679, 1668,
+ /* 490 */ 1672, 1681, 1682, 1687, 1713, 1698, 1719, 1701, 1673, 1721,
+ /* 500 */ 1704, 1696, 1724, 1714, 1727, 1715, 1732, 1712, 1716, 1642,
+ /* 510 */ 1654, 1735, 1588, 1717, 1739, 1578, 1731, 1591, 1596, 1758,
+ /* 520 */ 1759, 1622, 1624, 1757, 1762, 1764, 1766, 1686, 1691, 1733,
+ /* 530 */ 1594, 1767, 1693, 1635, 1694, 1790, 1752, 1636, 1706, 1690,
+ /* 540 */ 1747, 1755, 1580, 1584, 1589, 1761, 1558, 1707, 1710, 1720,
+ /* 550 */ 1711, 1718, 1722, 1765, 1723, 1725, 1728, 1729, 1726, 1768,
+ /* 560 */ 1769, 1771, 1741, 1782, 1563, 1742, 1743, 1823, 1784, 1611,
+ /* 570 */ 1805, 1806, 1807, 1808, 1809, 1810, 1751, 1753, 1803, 1620,
+ /* 580 */ 1813, 1804, 1814, 1849, 1835, 1653, 1770, 1772, 1774, 1775,
+ /* 590 */ 1777, 1778, 1815, 1780, 1783, 1816, 1781, 1837, 1663, 1788,
+ /* 600 */ 1773, 1795, 1834, 1858, 1800, 1801, 1860, 1812, 1817, 1864,
+ /* 610 */ 1819, 1820, 1866, 1822, 1824, 1869, 1826, 1754, 1791, 1792,
+ /* 620 */ 1793, 1844, 1796, 1827, 1828, 1873, 1829, 1874, 1874, 1896,
+ /* 630 */ 1862, 1865, 1890, 1892, 1894, 1895, 1898, 1900, 1910, 1911,
+ /* 640 */ 1912, 1913, 1881, 1843, 1907, 1917, 1918, 1932, 1920, 1935,
+ /* 650 */ 1924, 1926, 1927, 1897, 1668, 1928, 1672, 1929, 1931, 1934,
+ /* 660 */ 1936, 1945, 1937, 1970, 1939, 1930, 1941, 1976, 1943, 1938,
+ /* 670 */ 1947, 1981, 1949, 1951, 1955, 1982, 1964, 1954, 1963, 2003,
+ /* 680 */ 1978, 1979, 2011, 1995, 1994, 1996, 1997, 1999, 2001,
};
#define YY_REDUCE_COUNT (279)
-#define YY_REDUCE_MIN (-349)
-#define YY_REDUCE_MAX (2418)
+#define YY_REDUCE_MIN (-350)
+#define YY_REDUCE_MAX (2645)
static const short yy_reduce_ofst[] = {
- /* 0 */ 445, -251, -311, 896, 13, 280, 547, 968, 261, 990,
- /* 10 */ 1057, 1129, 1211, 1265, 1291, 528, 1361, 1425, 1451, 1468,
- /* 20 */ 1521, 1538, 1593, 1610, 1661, 1680, 1741, 1799, 1821, 1882,
- /* 30 */ 1901, 1954, 1971, 2014, 2038, 2057, 2118, 2137, 2201, 2219,
- /* 40 */ 2262, 2315, 2332, 2375, 2399, 2418, 21, 278, -221, 603,
- /* 50 */ 605, 884, 1041, 1194, -28, 814, -349, -346, -314, -339,
- /* 60 */ -65, -63, 159, 39, 323, -320, -316, -343, 222, 281,
- /* 70 */ 296, 378, 430, 501, 503, 509, 512, 517, -299, 522,
- /* 80 */ 558, 574, -243, 578, 580, 113, 643, 705, -239, -198,
- /* 90 */ 764, 109, -9, 250, 765, 287, -70, -310, -310, -287,
- /* 100 */ -317, -134, -30, 35, 93, 143, 208, 302, 320, 321,
- /* 110 */ 327, 348, 365, 414, 418, 468, 470, 472, 543, -245,
- /* 120 */ 263, -215, -163, -173, -33, -47, 284, 443, -348, 61,
- /* 130 */ -215, 370, 400, 297, 460, 467, 107, 480, 239, 399,
- /* 140 */ 241, 362, 526, 494, 519, 616, 562, 514, 553, 655,
- /* 150 */ 709, 751, 753, 769, 387, 555, 707, 668, 628, 690,
- /* 160 */ 798, 698, 784, 784, 805, 808, 777, 747, 799, 799,
- /* 170 */ 728, 799, 809, 795, 784, 838, 840, 850, 870, 910,
- /* 180 */ 912, 875, 880, 885, 917, 926, 927, 934, 943, 951,
- /* 190 */ 893, 945, 916, 947, 908, 909, 954, 920, 966, 967,
- /* 200 */ 973, 983, 974, 991, 965, 969, 970, 971, 972, 975,
- /* 210 */ 977, 982, 984, 985, 986, 987, 994, 976, 953, 957,
- /* 220 */ 1011, 960, 980, 1015, 1018, 1020, 979, 1019, 988, 989,
- /* 230 */ 996, 997, 1006, 998, 1009, 1003, 1048, 1037, 1062, 1038,
- /* 240 */ 1007, 1012, 1043, 993, 1035, 1046, 1047, 1008, 1044, 1051,
- /* 250 */ 1053, 784, 1004, 992, 1014, 1013, 1017, 1021, 1061, 1023,
- /* 260 */ 1024, 1016, 799, 1105, 1081, 1063, 1123, 1115, 1142, 1154,
- /* 270 */ 1153, 1166, 1168, 1112, 1119, 1157, 1161, 1162, 1164, 1179,
+ /* 0 */ 179, -252, -312, 882, 13, 281, 549, 992, 262, 1074,
+ /* 10 */ 1127, 1195, 1217, 1275, 1377, 530, 1436, 1491, 1544, 1595,
+ /* 20 */ 1612, 1697, 1748, 1811, 1831, 1882, 1899, 1942, 1993, 2010,
+ /* 30 */ 2061, 2112, 2131, 2194, 2216, 2276, 2296, 2339, 2359, 2410,
+ /* 40 */ 2461, 2480, 2543, 2565, 2625, 2645, 21, 279, -222, 198,
+ /* 50 */ 442, 465, 607, 924, -97, -28, -350, -347, -315, -340,
+ /* 60 */ -61, -63, -26, 39, 96, -321, -317, -344, -311, 7,
+ /* 70 */ 238, 275, 312, 376, 379, 435, 436, 506, -230, 532,
+ /* 80 */ 543, 550, -189, 592, 640, 213, 645, 701, -245, -199,
+ /* 90 */ 704, 323, 102, 432, 758, -102, 56, -226, -226, -89,
+ /* 100 */ -228, -181, 292, 370, 409, 462, 469, 502, 508, 515,
+ /* 110 */ 529, 548, 597, 617, 633, 666, 669, 680, 687, 233,
+ /* 120 */ 17, -243, -265, -270, -125, 169, -49, -179, -36, 90,
+ /* 130 */ -243, 49, 185, 274, 371, 464, 341, 347, 130, 339,
+ /* 140 */ 384, 377, 474, 368, 467, 560, 519, -332, 321, 424,
+ /* 150 */ 487, 583, 644, 702, 520, 399, 714, 677, 775, 719,
+ /* 160 */ 828, 737, 834, 834, 864, 867, 866, 807, 821, 821,
+ /* 170 */ 805, 821, 835, 827, 834, 865, 869, 877, 890, 933,
+ /* 180 */ 934, 894, 899, 901, 938, 946, 956, 963, 965, 975,
+ /* 190 */ 916, 968, 939, 970, 929, 932, 982, 940, 983, 987,
+ /* 200 */ 988, 993, 990, 1001, 976, 977, 978, 980, 981, 991,
+ /* 210 */ 994, 995, 996, 999, 1002, 1011, 1016, 997, 966, 969,
+ /* 220 */ 1023, 979, 1006, 1027, 1030, 1037, 998, 1036, 1000, 1013,
+ /* 230 */ 1014, 1018, 1020, 1012, 1021, 1022, 1065, 1051, 1067, 1042,
+ /* 240 */ 1015, 1019, 1040, 974, 1038, 1050, 1053, 984, 1044, 1055,
+ /* 250 */ 1056, 834, 1005, 1004, 1017, 1032, 1034, 1008, 1039, 985,
+ /* 260 */ 986, 1024, 821, 1084, 1048, 1031, 1091, 1102, 1106, 1134,
+ /* 270 */ 1136, 1155, 1161, 1097, 1104, 1138, 1142, 1145, 1162, 1174,
};
static const YYACTIONTYPE yy_default[] = {
- /* 0 */ 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534,
- /* 10 */ 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534,
- /* 20 */ 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534,
- /* 30 */ 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534,
- /* 40 */ 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534,
- /* 50 */ 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534,
- /* 60 */ 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534,
- /* 70 */ 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1608, 1534,
- /* 80 */ 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534,
- /* 90 */ 1534, 1534, 1534, 1534, 1534, 1606, 1773, 1959, 1534, 1534,
- /* 100 */ 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534,
- /* 110 */ 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534,
- /* 120 */ 1534, 1971, 1534, 1534, 1534, 1608, 1534, 1606, 1931, 1931,
- /* 130 */ 1971, 1971, 1971, 1534, 1534, 1534, 1713, 1534, 1814, 1814,
- /* 140 */ 1534, 1534, 1534, 1534, 1534, 1713, 1534, 1534, 1534, 1534,
- /* 150 */ 1534, 1534, 1534, 1534, 1808, 1534, 1996, 2049, 1534, 1534,
- /* 160 */ 1534, 1999, 1534, 1534, 1534, 1534, 1666, 1986, 1963, 1977,
- /* 170 */ 2033, 1964, 1961, 1980, 1534, 1990, 1534, 1801, 1778, 1534,
- /* 180 */ 1534, 1778, 1775, 1775, 1657, 1534, 1534, 1534, 1534, 1534,
- /* 190 */ 1534, 1608, 1534, 1608, 1534, 1534, 1608, 1534, 1608, 1608,
- /* 200 */ 1608, 1534, 1608, 1534, 1534, 1534, 1534, 1534, 1534, 1534,
- /* 210 */ 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1820, 1534,
- /* 220 */ 1606, 1810, 1534, 1606, 1534, 1534, 1534, 1606, 2004, 1534,
- /* 230 */ 1534, 1534, 1534, 2004, 1534, 1534, 1606, 1534, 1606, 1534,
- /* 240 */ 1534, 1534, 1534, 2006, 2004, 1534, 1534, 2006, 2004, 1534,
- /* 250 */ 1534, 1534, 2018, 2014, 2006, 2022, 2020, 1992, 1990, 2052,
- /* 260 */ 2039, 2035, 1977, 1534, 1534, 1534, 1682, 1534, 1534, 1534,
- /* 270 */ 1606, 1566, 1534, 1803, 1814, 1716, 1716, 1716, 1609, 1539,
- /* 280 */ 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534,
- /* 290 */ 1534, 1889, 1534, 2017, 2016, 1935, 1934, 1933, 1924, 1888,
- /* 300 */ 1534, 1678, 1887, 1886, 1534, 1534, 1534, 1534, 1534, 1534,
- /* 310 */ 1534, 1880, 1534, 1534, 1881, 1879, 1878, 1534, 1534, 1534,
- /* 320 */ 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534,
- /* 330 */ 1534, 1534, 1534, 1534, 1534, 1534, 1534, 2036, 2040, 1960,
- /* 340 */ 1534, 1534, 1534, 1534, 1534, 1871, 1862, 1534, 1534, 1534,
- /* 350 */ 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534,
- /* 360 */ 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534,
- /* 370 */ 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534,
- /* 380 */ 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534,
- /* 390 */ 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534,
- /* 400 */ 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534,
- /* 410 */ 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534,
- /* 420 */ 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534,
- /* 430 */ 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534,
- /* 440 */ 1534, 1534, 1534, 1534, 1571, 1534, 1534, 1534, 1534, 1534,
- /* 450 */ 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534,
- /* 460 */ 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534,
- /* 470 */ 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534,
- /* 480 */ 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1647,
- /* 490 */ 1646, 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534,
- /* 500 */ 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1870,
- /* 510 */ 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534,
- /* 520 */ 1534, 1534, 1534, 2032, 1534, 1534, 1534, 1534, 1534, 1534,
- /* 530 */ 1534, 1818, 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534,
- /* 540 */ 1534, 1921, 1534, 1534, 1534, 1993, 1534, 1534, 1534, 1534,
- /* 550 */ 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534,
- /* 560 */ 1534, 1862, 1534, 2015, 1534, 1534, 2030, 1534, 2034, 1534,
- /* 570 */ 1534, 1534, 1534, 1534, 1534, 1534, 1970, 1966, 1534, 1534,
- /* 580 */ 1962, 1861, 1534, 1955, 1534, 1534, 1906, 1534, 1534, 1534,
- /* 590 */ 1534, 1534, 1534, 1534, 1534, 1534, 1870, 1534, 1874, 1534,
- /* 600 */ 1534, 1534, 1534, 1534, 1710, 1534, 1534, 1534, 1534, 1534,
- /* 610 */ 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1695, 1693, 1692,
- /* 620 */ 1691, 1534, 1688, 1534, 1534, 1534, 1534, 1719, 1718, 1534,
- /* 630 */ 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534,
- /* 640 */ 1534, 1534, 1534, 1534, 1628, 1534, 1534, 1534, 1534, 1534,
- /* 650 */ 1534, 1534, 1534, 1534, 1619, 1534, 1618, 1534, 1534, 1534,
- /* 660 */ 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534,
- /* 670 */ 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534,
- /* 680 */ 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534, 1534,
+ /* 0 */ 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
+ /* 10 */ 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
+ /* 20 */ 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
+ /* 30 */ 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
+ /* 40 */ 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
+ /* 50 */ 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
+ /* 60 */ 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
+ /* 70 */ 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1610, 1536,
+ /* 80 */ 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
+ /* 90 */ 1536, 1536, 1536, 1536, 1536, 1608, 1775, 1962, 1536, 1536,
+ /* 100 */ 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
+ /* 110 */ 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
+ /* 120 */ 1536, 1974, 1536, 1536, 1536, 1610, 1536, 1608, 1934, 1934,
+ /* 130 */ 1974, 1974, 1974, 1536, 1536, 1536, 1715, 1536, 1816, 1816,
+ /* 140 */ 1536, 1536, 1536, 1536, 1536, 1715, 1536, 1536, 1536, 1536,
+ /* 150 */ 1536, 1536, 1536, 1536, 1810, 1536, 1999, 2052, 1536, 1536,
+ /* 160 */ 1536, 2002, 1536, 1536, 1536, 1536, 1668, 1989, 1966, 1980,
+ /* 170 */ 2036, 1967, 1964, 1983, 1536, 1993, 1536, 1803, 1780, 1536,
+ /* 180 */ 1536, 1780, 1777, 1777, 1659, 1536, 1536, 1536, 1536, 1536,
+ /* 190 */ 1536, 1610, 1536, 1610, 1536, 1536, 1610, 1536, 1610, 1610,
+ /* 200 */ 1610, 1536, 1610, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
+ /* 210 */ 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1822, 1536,
+ /* 220 */ 1608, 1812, 1536, 1608, 1536, 1536, 1536, 1608, 2007, 1536,
+ /* 230 */ 1536, 1536, 1536, 2007, 1536, 1536, 1608, 1536, 1608, 1536,
+ /* 240 */ 1536, 1536, 1536, 2009, 2007, 1536, 1536, 2009, 2007, 1536,
+ /* 250 */ 1536, 1536, 2021, 2017, 2009, 2025, 2023, 1995, 1993, 2055,
+ /* 260 */ 2042, 2038, 1980, 1536, 1536, 1536, 1684, 1536, 1536, 1536,
+ /* 270 */ 1608, 1568, 1536, 1805, 1816, 1718, 1718, 1718, 1611, 1541,
+ /* 280 */ 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
+ /* 290 */ 1536, 1891, 1536, 2020, 2019, 1938, 1937, 1936, 1927, 1890,
+ /* 300 */ 1536, 1680, 1889, 1888, 1536, 1536, 1536, 1536, 1536, 1536,
+ /* 310 */ 1536, 1882, 1536, 1536, 1883, 1881, 1880, 1536, 1536, 1536,
+ /* 320 */ 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
+ /* 330 */ 1536, 1536, 1536, 1536, 1536, 1536, 1536, 2039, 2043, 1963,
+ /* 340 */ 1536, 1536, 1536, 1536, 1536, 1873, 1864, 1536, 1536, 1536,
+ /* 350 */ 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
+ /* 360 */ 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
+ /* 370 */ 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
+ /* 380 */ 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
+ /* 390 */ 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
+ /* 400 */ 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
+ /* 410 */ 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
+ /* 420 */ 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
+ /* 430 */ 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
+ /* 440 */ 1536, 1536, 1536, 1536, 1573, 1536, 1536, 1536, 1536, 1536,
+ /* 450 */ 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
+ /* 460 */ 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
+ /* 470 */ 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
+ /* 480 */ 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1649,
+ /* 490 */ 1648, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
+ /* 500 */ 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1872,
+ /* 510 */ 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
+ /* 520 */ 1536, 1536, 1536, 2035, 1536, 1536, 1536, 1536, 1536, 1536,
+ /* 530 */ 1536, 1820, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
+ /* 540 */ 1536, 1924, 1536, 1536, 1536, 1996, 1536, 1536, 1536, 1536,
+ /* 550 */ 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
+ /* 560 */ 1536, 1864, 1536, 2018, 1536, 1536, 2033, 1536, 2037, 1536,
+ /* 570 */ 1536, 1536, 1536, 1536, 1536, 1536, 1973, 1969, 1536, 1536,
+ /* 580 */ 1965, 1863, 1536, 1958, 1536, 1536, 1909, 1536, 1536, 1536,
+ /* 590 */ 1536, 1536, 1536, 1536, 1536, 1536, 1872, 1536, 1876, 1536,
+ /* 600 */ 1536, 1536, 1536, 1536, 1712, 1536, 1536, 1536, 1536, 1536,
+ /* 610 */ 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1697, 1695, 1694,
+ /* 620 */ 1693, 1536, 1690, 1536, 1536, 1536, 1536, 1721, 1720, 1536,
+ /* 630 */ 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
+ /* 640 */ 1536, 1536, 1536, 1536, 1630, 1536, 1536, 1536, 1536, 1536,
+ /* 650 */ 1536, 1536, 1536, 1536, 1621, 1536, 1620, 1536, 1536, 1536,
+ /* 660 */ 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
+ /* 670 */ 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
+ /* 680 */ 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536,
};
/********** End of lemon-generated parsing tables *****************************/
@@ -1192,6 +1238,7 @@ static const YYCODETYPE yyFallback[] = {
0, /* WSTART => nothing */
0, /* WEND => nothing */
0, /* WDURATION => nothing */
+ 0, /* IROWTS => nothing */
0, /* CAST => nothing */
0, /* NOW => nothing */
0, /* TODAY => nothing */
@@ -1203,7 +1250,7 @@ static const YYCODETYPE yyFallback[] = {
0, /* COUNT => nothing */
0, /* LAST_ROW => nothing */
0, /* CASE => nothing */
- 263, /* END => ABORT */
+ 264, /* END => ABORT */
0, /* WHEN => nothing */
0, /* THEN => nothing */
0, /* ELSE => nothing */
@@ -1245,57 +1292,57 @@ static const YYCODETYPE yyFallback[] = {
0, /* ASC => nothing */
0, /* NULLS => nothing */
0, /* ABORT => nothing */
- 263, /* AFTER => ABORT */
- 263, /* ATTACH => ABORT */
- 263, /* BEFORE => ABORT */
- 263, /* BEGIN => ABORT */
- 263, /* BITAND => ABORT */
- 263, /* BITNOT => ABORT */
- 263, /* BITOR => ABORT */
- 263, /* BLOCKS => ABORT */
- 263, /* CHANGE => ABORT */
- 263, /* COMMA => ABORT */
- 263, /* COMPACT => ABORT */
- 263, /* CONCAT => ABORT */
- 263, /* CONFLICT => ABORT */
- 263, /* COPY => ABORT */
- 263, /* DEFERRED => ABORT */
- 263, /* DELIMITERS => ABORT */
- 263, /* DETACH => ABORT */
- 263, /* DIVIDE => ABORT */
- 263, /* DOT => ABORT */
- 263, /* EACH => ABORT */
- 263, /* FAIL => ABORT */
- 263, /* FILE => ABORT */
- 263, /* FOR => ABORT */
- 263, /* GLOB => ABORT */
- 263, /* ID => ABORT */
- 263, /* IMMEDIATE => ABORT */
- 263, /* IMPORT => ABORT */
- 263, /* INITIALLY => ABORT */
- 263, /* INSTEAD => ABORT */
- 263, /* ISNULL => ABORT */
- 263, /* KEY => ABORT */
- 263, /* NK_BITNOT => ABORT */
- 263, /* NK_SEMI => ABORT */
- 263, /* NOTNULL => ABORT */
- 263, /* OF => ABORT */
- 263, /* PLUS => ABORT */
- 263, /* PRIVILEGE => ABORT */
- 263, /* RAISE => ABORT */
- 263, /* REPLACE => ABORT */
- 263, /* RESTRICT => ABORT */
- 263, /* ROW => ABORT */
- 263, /* SEMI => ABORT */
- 263, /* STAR => ABORT */
- 263, /* STATEMENT => ABORT */
- 263, /* STRING => ABORT */
- 263, /* TIMES => ABORT */
- 263, /* UPDATE => ABORT */
- 263, /* VALUES => ABORT */
- 263, /* VARIABLE => ABORT */
- 263, /* VIEW => ABORT */
- 263, /* WAL => ABORT */
+ 264, /* AFTER => ABORT */
+ 264, /* ATTACH => ABORT */
+ 264, /* BEFORE => ABORT */
+ 264, /* BEGIN => ABORT */
+ 264, /* BITAND => ABORT */
+ 264, /* BITNOT => ABORT */
+ 264, /* BITOR => ABORT */
+ 264, /* BLOCKS => ABORT */
+ 264, /* CHANGE => ABORT */
+ 264, /* COMMA => ABORT */
+ 264, /* COMPACT => ABORT */
+ 264, /* CONCAT => ABORT */
+ 264, /* CONFLICT => ABORT */
+ 264, /* COPY => ABORT */
+ 264, /* DEFERRED => ABORT */
+ 264, /* DELIMITERS => ABORT */
+ 264, /* DETACH => ABORT */
+ 264, /* DIVIDE => ABORT */
+ 264, /* DOT => ABORT */
+ 264, /* EACH => ABORT */
+ 264, /* FAIL => ABORT */
+ 264, /* FILE => ABORT */
+ 264, /* FOR => ABORT */
+ 264, /* GLOB => ABORT */
+ 264, /* ID => ABORT */
+ 264, /* IMMEDIATE => ABORT */
+ 264, /* IMPORT => ABORT */
+ 264, /* INITIALLY => ABORT */
+ 264, /* INSTEAD => ABORT */
+ 264, /* ISNULL => ABORT */
+ 264, /* KEY => ABORT */
+ 264, /* NK_BITNOT => ABORT */
+ 264, /* NK_SEMI => ABORT */
+ 264, /* NOTNULL => ABORT */
+ 264, /* OF => ABORT */
+ 264, /* PLUS => ABORT */
+ 264, /* PRIVILEGE => ABORT */
+ 264, /* RAISE => ABORT */
+ 264, /* REPLACE => ABORT */
+ 264, /* RESTRICT => ABORT */
+ 264, /* ROW => ABORT */
+ 264, /* SEMI => ABORT */
+ 264, /* STAR => ABORT */
+ 264, /* STATEMENT => ABORT */
+ 264, /* STRING => ABORT */
+ 264, /* TIMES => ABORT */
+ 264, /* UPDATE => ABORT */
+ 264, /* VALUES => ABORT */
+ 264, /* VARIABLE => ABORT */
+ 264, /* VIEW => ABORT */
+ 264, /* WAL => ABORT */
};
#endif /* YYFALLBACK */
@@ -1594,242 +1641,243 @@ static const char *const yyTokenName[] = {
/* 208 */ "WSTART",
/* 209 */ "WEND",
/* 210 */ "WDURATION",
- /* 211 */ "CAST",
- /* 212 */ "NOW",
- /* 213 */ "TODAY",
- /* 214 */ "TIMEZONE",
- /* 215 */ "CLIENT_VERSION",
- /* 216 */ "SERVER_VERSION",
- /* 217 */ "SERVER_STATUS",
- /* 218 */ "CURRENT_USER",
- /* 219 */ "COUNT",
- /* 220 */ "LAST_ROW",
- /* 221 */ "CASE",
- /* 222 */ "END",
- /* 223 */ "WHEN",
- /* 224 */ "THEN",
- /* 225 */ "ELSE",
- /* 226 */ "BETWEEN",
- /* 227 */ "IS",
- /* 228 */ "NK_LT",
- /* 229 */ "NK_GT",
- /* 230 */ "NK_LE",
- /* 231 */ "NK_GE",
- /* 232 */ "NK_NE",
- /* 233 */ "MATCH",
- /* 234 */ "NMATCH",
- /* 235 */ "CONTAINS",
- /* 236 */ "IN",
- /* 237 */ "JOIN",
- /* 238 */ "INNER",
- /* 239 */ "SELECT",
- /* 240 */ "DISTINCT",
- /* 241 */ "WHERE",
- /* 242 */ "PARTITION",
- /* 243 */ "BY",
- /* 244 */ "SESSION",
- /* 245 */ "STATE_WINDOW",
- /* 246 */ "SLIDING",
- /* 247 */ "FILL",
- /* 248 */ "VALUE",
- /* 249 */ "NONE",
- /* 250 */ "PREV",
- /* 251 */ "LINEAR",
- /* 252 */ "NEXT",
- /* 253 */ "HAVING",
- /* 254 */ "RANGE",
- /* 255 */ "EVERY",
- /* 256 */ "ORDER",
- /* 257 */ "SLIMIT",
- /* 258 */ "SOFFSET",
- /* 259 */ "LIMIT",
- /* 260 */ "OFFSET",
- /* 261 */ "ASC",
- /* 262 */ "NULLS",
- /* 263 */ "ABORT",
- /* 264 */ "AFTER",
- /* 265 */ "ATTACH",
- /* 266 */ "BEFORE",
- /* 267 */ "BEGIN",
- /* 268 */ "BITAND",
- /* 269 */ "BITNOT",
- /* 270 */ "BITOR",
- /* 271 */ "BLOCKS",
- /* 272 */ "CHANGE",
- /* 273 */ "COMMA",
- /* 274 */ "COMPACT",
- /* 275 */ "CONCAT",
- /* 276 */ "CONFLICT",
- /* 277 */ "COPY",
- /* 278 */ "DEFERRED",
- /* 279 */ "DELIMITERS",
- /* 280 */ "DETACH",
- /* 281 */ "DIVIDE",
- /* 282 */ "DOT",
- /* 283 */ "EACH",
- /* 284 */ "FAIL",
- /* 285 */ "FILE",
- /* 286 */ "FOR",
- /* 287 */ "GLOB",
- /* 288 */ "ID",
- /* 289 */ "IMMEDIATE",
- /* 290 */ "IMPORT",
- /* 291 */ "INITIALLY",
- /* 292 */ "INSTEAD",
- /* 293 */ "ISNULL",
- /* 294 */ "KEY",
- /* 295 */ "NK_BITNOT",
- /* 296 */ "NK_SEMI",
- /* 297 */ "NOTNULL",
- /* 298 */ "OF",
- /* 299 */ "PLUS",
- /* 300 */ "PRIVILEGE",
- /* 301 */ "RAISE",
- /* 302 */ "REPLACE",
- /* 303 */ "RESTRICT",
- /* 304 */ "ROW",
- /* 305 */ "SEMI",
- /* 306 */ "STAR",
- /* 307 */ "STATEMENT",
- /* 308 */ "STRING",
- /* 309 */ "TIMES",
- /* 310 */ "UPDATE",
- /* 311 */ "VALUES",
- /* 312 */ "VARIABLE",
- /* 313 */ "VIEW",
- /* 314 */ "WAL",
- /* 315 */ "cmd",
- /* 316 */ "account_options",
- /* 317 */ "alter_account_options",
- /* 318 */ "literal",
- /* 319 */ "alter_account_option",
- /* 320 */ "user_name",
- /* 321 */ "sysinfo_opt",
- /* 322 */ "privileges",
- /* 323 */ "priv_level",
- /* 324 */ "priv_type_list",
- /* 325 */ "priv_type",
- /* 326 */ "db_name",
- /* 327 */ "dnode_endpoint",
- /* 328 */ "not_exists_opt",
- /* 329 */ "db_options",
- /* 330 */ "exists_opt",
- /* 331 */ "alter_db_options",
- /* 332 */ "speed_opt",
- /* 333 */ "integer_list",
- /* 334 */ "variable_list",
- /* 335 */ "retention_list",
- /* 336 */ "alter_db_option",
- /* 337 */ "retention",
- /* 338 */ "full_table_name",
- /* 339 */ "column_def_list",
- /* 340 */ "tags_def_opt",
- /* 341 */ "table_options",
- /* 342 */ "multi_create_clause",
- /* 343 */ "tags_def",
- /* 344 */ "multi_drop_clause",
- /* 345 */ "alter_table_clause",
- /* 346 */ "alter_table_options",
- /* 347 */ "column_name",
- /* 348 */ "type_name",
- /* 349 */ "signed_literal",
- /* 350 */ "create_subtable_clause",
- /* 351 */ "specific_cols_opt",
- /* 352 */ "expression_list",
- /* 353 */ "drop_table_clause",
- /* 354 */ "col_name_list",
- /* 355 */ "table_name",
- /* 356 */ "column_def",
- /* 357 */ "duration_list",
- /* 358 */ "rollup_func_list",
- /* 359 */ "alter_table_option",
- /* 360 */ "duration_literal",
- /* 361 */ "rollup_func_name",
- /* 362 */ "function_name",
- /* 363 */ "col_name",
- /* 364 */ "db_name_cond_opt",
- /* 365 */ "like_pattern_opt",
- /* 366 */ "table_name_cond",
- /* 367 */ "from_db_opt",
- /* 368 */ "index_options",
- /* 369 */ "func_list",
- /* 370 */ "sliding_opt",
- /* 371 */ "sma_stream_opt",
- /* 372 */ "func",
- /* 373 */ "stream_options",
- /* 374 */ "topic_name",
- /* 375 */ "query_or_subquery",
- /* 376 */ "cgroup_name",
- /* 377 */ "analyze_opt",
- /* 378 */ "explain_options",
- /* 379 */ "agg_func_opt",
- /* 380 */ "bufsize_opt",
- /* 381 */ "stream_name",
- /* 382 */ "subtable_opt",
- /* 383 */ "expression",
- /* 384 */ "dnode_list",
- /* 385 */ "where_clause_opt",
- /* 386 */ "signed",
- /* 387 */ "literal_func",
- /* 388 */ "literal_list",
- /* 389 */ "table_alias",
- /* 390 */ "column_alias",
- /* 391 */ "expr_or_subquery",
- /* 392 */ "subquery",
- /* 393 */ "pseudo_column",
- /* 394 */ "column_reference",
- /* 395 */ "function_expression",
- /* 396 */ "case_when_expression",
- /* 397 */ "star_func",
- /* 398 */ "star_func_para_list",
- /* 399 */ "noarg_func",
- /* 400 */ "other_para_list",
- /* 401 */ "star_func_para",
- /* 402 */ "when_then_list",
- /* 403 */ "case_when_else_opt",
- /* 404 */ "common_expression",
- /* 405 */ "when_then_expr",
- /* 406 */ "predicate",
- /* 407 */ "compare_op",
- /* 408 */ "in_op",
- /* 409 */ "in_predicate_value",
- /* 410 */ "boolean_value_expression",
- /* 411 */ "boolean_primary",
- /* 412 */ "from_clause_opt",
- /* 413 */ "table_reference_list",
- /* 414 */ "table_reference",
- /* 415 */ "table_primary",
- /* 416 */ "joined_table",
- /* 417 */ "alias_opt",
- /* 418 */ "parenthesized_joined_table",
- /* 419 */ "join_type",
- /* 420 */ "search_condition",
- /* 421 */ "query_specification",
- /* 422 */ "set_quantifier_opt",
- /* 423 */ "select_list",
- /* 424 */ "partition_by_clause_opt",
- /* 425 */ "range_opt",
- /* 426 */ "every_opt",
- /* 427 */ "fill_opt",
- /* 428 */ "twindow_clause_opt",
- /* 429 */ "group_by_clause_opt",
- /* 430 */ "having_clause_opt",
- /* 431 */ "select_item",
- /* 432 */ "partition_list",
- /* 433 */ "partition_item",
- /* 434 */ "fill_mode",
- /* 435 */ "group_by_list",
- /* 436 */ "query_expression",
- /* 437 */ "query_simple",
- /* 438 */ "order_by_clause_opt",
- /* 439 */ "slimit_clause_opt",
- /* 440 */ "limit_clause_opt",
- /* 441 */ "union_query_expression",
- /* 442 */ "query_simple_or_subquery",
- /* 443 */ "sort_specification_list",
- /* 444 */ "sort_specification",
- /* 445 */ "ordering_specification_opt",
- /* 446 */ "null_ordering_opt",
+ /* 211 */ "IROWTS",
+ /* 212 */ "CAST",
+ /* 213 */ "NOW",
+ /* 214 */ "TODAY",
+ /* 215 */ "TIMEZONE",
+ /* 216 */ "CLIENT_VERSION",
+ /* 217 */ "SERVER_VERSION",
+ /* 218 */ "SERVER_STATUS",
+ /* 219 */ "CURRENT_USER",
+ /* 220 */ "COUNT",
+ /* 221 */ "LAST_ROW",
+ /* 222 */ "CASE",
+ /* 223 */ "END",
+ /* 224 */ "WHEN",
+ /* 225 */ "THEN",
+ /* 226 */ "ELSE",
+ /* 227 */ "BETWEEN",
+ /* 228 */ "IS",
+ /* 229 */ "NK_LT",
+ /* 230 */ "NK_GT",
+ /* 231 */ "NK_LE",
+ /* 232 */ "NK_GE",
+ /* 233 */ "NK_NE",
+ /* 234 */ "MATCH",
+ /* 235 */ "NMATCH",
+ /* 236 */ "CONTAINS",
+ /* 237 */ "IN",
+ /* 238 */ "JOIN",
+ /* 239 */ "INNER",
+ /* 240 */ "SELECT",
+ /* 241 */ "DISTINCT",
+ /* 242 */ "WHERE",
+ /* 243 */ "PARTITION",
+ /* 244 */ "BY",
+ /* 245 */ "SESSION",
+ /* 246 */ "STATE_WINDOW",
+ /* 247 */ "SLIDING",
+ /* 248 */ "FILL",
+ /* 249 */ "VALUE",
+ /* 250 */ "NONE",
+ /* 251 */ "PREV",
+ /* 252 */ "LINEAR",
+ /* 253 */ "NEXT",
+ /* 254 */ "HAVING",
+ /* 255 */ "RANGE",
+ /* 256 */ "EVERY",
+ /* 257 */ "ORDER",
+ /* 258 */ "SLIMIT",
+ /* 259 */ "SOFFSET",
+ /* 260 */ "LIMIT",
+ /* 261 */ "OFFSET",
+ /* 262 */ "ASC",
+ /* 263 */ "NULLS",
+ /* 264 */ "ABORT",
+ /* 265 */ "AFTER",
+ /* 266 */ "ATTACH",
+ /* 267 */ "BEFORE",
+ /* 268 */ "BEGIN",
+ /* 269 */ "BITAND",
+ /* 270 */ "BITNOT",
+ /* 271 */ "BITOR",
+ /* 272 */ "BLOCKS",
+ /* 273 */ "CHANGE",
+ /* 274 */ "COMMA",
+ /* 275 */ "COMPACT",
+ /* 276 */ "CONCAT",
+ /* 277 */ "CONFLICT",
+ /* 278 */ "COPY",
+ /* 279 */ "DEFERRED",
+ /* 280 */ "DELIMITERS",
+ /* 281 */ "DETACH",
+ /* 282 */ "DIVIDE",
+ /* 283 */ "DOT",
+ /* 284 */ "EACH",
+ /* 285 */ "FAIL",
+ /* 286 */ "FILE",
+ /* 287 */ "FOR",
+ /* 288 */ "GLOB",
+ /* 289 */ "ID",
+ /* 290 */ "IMMEDIATE",
+ /* 291 */ "IMPORT",
+ /* 292 */ "INITIALLY",
+ /* 293 */ "INSTEAD",
+ /* 294 */ "ISNULL",
+ /* 295 */ "KEY",
+ /* 296 */ "NK_BITNOT",
+ /* 297 */ "NK_SEMI",
+ /* 298 */ "NOTNULL",
+ /* 299 */ "OF",
+ /* 300 */ "PLUS",
+ /* 301 */ "PRIVILEGE",
+ /* 302 */ "RAISE",
+ /* 303 */ "REPLACE",
+ /* 304 */ "RESTRICT",
+ /* 305 */ "ROW",
+ /* 306 */ "SEMI",
+ /* 307 */ "STAR",
+ /* 308 */ "STATEMENT",
+ /* 309 */ "STRING",
+ /* 310 */ "TIMES",
+ /* 311 */ "UPDATE",
+ /* 312 */ "VALUES",
+ /* 313 */ "VARIABLE",
+ /* 314 */ "VIEW",
+ /* 315 */ "WAL",
+ /* 316 */ "cmd",
+ /* 317 */ "account_options",
+ /* 318 */ "alter_account_options",
+ /* 319 */ "literal",
+ /* 320 */ "alter_account_option",
+ /* 321 */ "user_name",
+ /* 322 */ "sysinfo_opt",
+ /* 323 */ "privileges",
+ /* 324 */ "priv_level",
+ /* 325 */ "priv_type_list",
+ /* 326 */ "priv_type",
+ /* 327 */ "db_name",
+ /* 328 */ "dnode_endpoint",
+ /* 329 */ "not_exists_opt",
+ /* 330 */ "db_options",
+ /* 331 */ "exists_opt",
+ /* 332 */ "alter_db_options",
+ /* 333 */ "speed_opt",
+ /* 334 */ "integer_list",
+ /* 335 */ "variable_list",
+ /* 336 */ "retention_list",
+ /* 337 */ "alter_db_option",
+ /* 338 */ "retention",
+ /* 339 */ "full_table_name",
+ /* 340 */ "column_def_list",
+ /* 341 */ "tags_def_opt",
+ /* 342 */ "table_options",
+ /* 343 */ "multi_create_clause",
+ /* 344 */ "tags_def",
+ /* 345 */ "multi_drop_clause",
+ /* 346 */ "alter_table_clause",
+ /* 347 */ "alter_table_options",
+ /* 348 */ "column_name",
+ /* 349 */ "type_name",
+ /* 350 */ "signed_literal",
+ /* 351 */ "create_subtable_clause",
+ /* 352 */ "specific_cols_opt",
+ /* 353 */ "expression_list",
+ /* 354 */ "drop_table_clause",
+ /* 355 */ "col_name_list",
+ /* 356 */ "table_name",
+ /* 357 */ "column_def",
+ /* 358 */ "duration_list",
+ /* 359 */ "rollup_func_list",
+ /* 360 */ "alter_table_option",
+ /* 361 */ "duration_literal",
+ /* 362 */ "rollup_func_name",
+ /* 363 */ "function_name",
+ /* 364 */ "col_name",
+ /* 365 */ "db_name_cond_opt",
+ /* 366 */ "like_pattern_opt",
+ /* 367 */ "table_name_cond",
+ /* 368 */ "from_db_opt",
+ /* 369 */ "index_options",
+ /* 370 */ "func_list",
+ /* 371 */ "sliding_opt",
+ /* 372 */ "sma_stream_opt",
+ /* 373 */ "func",
+ /* 374 */ "stream_options",
+ /* 375 */ "topic_name",
+ /* 376 */ "query_or_subquery",
+ /* 377 */ "cgroup_name",
+ /* 378 */ "analyze_opt",
+ /* 379 */ "explain_options",
+ /* 380 */ "agg_func_opt",
+ /* 381 */ "bufsize_opt",
+ /* 382 */ "stream_name",
+ /* 383 */ "subtable_opt",
+ /* 384 */ "expression",
+ /* 385 */ "dnode_list",
+ /* 386 */ "where_clause_opt",
+ /* 387 */ "signed",
+ /* 388 */ "literal_func",
+ /* 389 */ "literal_list",
+ /* 390 */ "table_alias",
+ /* 391 */ "column_alias",
+ /* 392 */ "expr_or_subquery",
+ /* 393 */ "subquery",
+ /* 394 */ "pseudo_column",
+ /* 395 */ "column_reference",
+ /* 396 */ "function_expression",
+ /* 397 */ "case_when_expression",
+ /* 398 */ "star_func",
+ /* 399 */ "star_func_para_list",
+ /* 400 */ "noarg_func",
+ /* 401 */ "other_para_list",
+ /* 402 */ "star_func_para",
+ /* 403 */ "when_then_list",
+ /* 404 */ "case_when_else_opt",
+ /* 405 */ "common_expression",
+ /* 406 */ "when_then_expr",
+ /* 407 */ "predicate",
+ /* 408 */ "compare_op",
+ /* 409 */ "in_op",
+ /* 410 */ "in_predicate_value",
+ /* 411 */ "boolean_value_expression",
+ /* 412 */ "boolean_primary",
+ /* 413 */ "from_clause_opt",
+ /* 414 */ "table_reference_list",
+ /* 415 */ "table_reference",
+ /* 416 */ "table_primary",
+ /* 417 */ "joined_table",
+ /* 418 */ "alias_opt",
+ /* 419 */ "parenthesized_joined_table",
+ /* 420 */ "join_type",
+ /* 421 */ "search_condition",
+ /* 422 */ "query_specification",
+ /* 423 */ "set_quantifier_opt",
+ /* 424 */ "select_list",
+ /* 425 */ "partition_by_clause_opt",
+ /* 426 */ "range_opt",
+ /* 427 */ "every_opt",
+ /* 428 */ "fill_opt",
+ /* 429 */ "twindow_clause_opt",
+ /* 430 */ "group_by_clause_opt",
+ /* 431 */ "having_clause_opt",
+ /* 432 */ "select_item",
+ /* 433 */ "partition_list",
+ /* 434 */ "partition_item",
+ /* 435 */ "fill_mode",
+ /* 436 */ "group_by_list",
+ /* 437 */ "query_expression",
+ /* 438 */ "query_simple",
+ /* 439 */ "order_by_clause_opt",
+ /* 440 */ "slimit_clause_opt",
+ /* 441 */ "limit_clause_opt",
+ /* 442 */ "union_query_expression",
+ /* 443 */ "query_simple_or_subquery",
+ /* 444 */ "sort_specification_list",
+ /* 445 */ "sort_specification",
+ /* 446 */ "ordering_specification_opt",
+ /* 447 */ "null_ordering_opt",
};
#endif /* defined(YYCOVERAGE) || !defined(NDEBUG) */
@@ -2201,160 +2249,161 @@ static const char *const yyRuleName[] = {
/* 361 */ "pseudo_column ::= WSTART",
/* 362 */ "pseudo_column ::= WEND",
/* 363 */ "pseudo_column ::= WDURATION",
- /* 364 */ "function_expression ::= function_name NK_LP expression_list NK_RP",
- /* 365 */ "function_expression ::= star_func NK_LP star_func_para_list NK_RP",
- /* 366 */ "function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP",
- /* 367 */ "function_expression ::= literal_func",
- /* 368 */ "literal_func ::= noarg_func NK_LP NK_RP",
- /* 369 */ "literal_func ::= NOW",
- /* 370 */ "noarg_func ::= NOW",
- /* 371 */ "noarg_func ::= TODAY",
- /* 372 */ "noarg_func ::= TIMEZONE",
- /* 373 */ "noarg_func ::= DATABASE",
- /* 374 */ "noarg_func ::= CLIENT_VERSION",
- /* 375 */ "noarg_func ::= SERVER_VERSION",
- /* 376 */ "noarg_func ::= SERVER_STATUS",
- /* 377 */ "noarg_func ::= CURRENT_USER",
- /* 378 */ "noarg_func ::= USER",
- /* 379 */ "star_func ::= COUNT",
- /* 380 */ "star_func ::= FIRST",
- /* 381 */ "star_func ::= LAST",
- /* 382 */ "star_func ::= LAST_ROW",
- /* 383 */ "star_func_para_list ::= NK_STAR",
- /* 384 */ "star_func_para_list ::= other_para_list",
- /* 385 */ "other_para_list ::= star_func_para",
- /* 386 */ "other_para_list ::= other_para_list NK_COMMA star_func_para",
- /* 387 */ "star_func_para ::= expr_or_subquery",
- /* 388 */ "star_func_para ::= table_name NK_DOT NK_STAR",
- /* 389 */ "case_when_expression ::= CASE when_then_list case_when_else_opt END",
- /* 390 */ "case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END",
- /* 391 */ "when_then_list ::= when_then_expr",
- /* 392 */ "when_then_list ::= when_then_list when_then_expr",
- /* 393 */ "when_then_expr ::= WHEN common_expression THEN common_expression",
- /* 394 */ "case_when_else_opt ::=",
- /* 395 */ "case_when_else_opt ::= ELSE common_expression",
- /* 396 */ "predicate ::= expr_or_subquery compare_op expr_or_subquery",
- /* 397 */ "predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery",
- /* 398 */ "predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery",
- /* 399 */ "predicate ::= expr_or_subquery IS NULL",
- /* 400 */ "predicate ::= expr_or_subquery IS NOT NULL",
- /* 401 */ "predicate ::= expr_or_subquery in_op in_predicate_value",
- /* 402 */ "compare_op ::= NK_LT",
- /* 403 */ "compare_op ::= NK_GT",
- /* 404 */ "compare_op ::= NK_LE",
- /* 405 */ "compare_op ::= NK_GE",
- /* 406 */ "compare_op ::= NK_NE",
- /* 407 */ "compare_op ::= NK_EQ",
- /* 408 */ "compare_op ::= LIKE",
- /* 409 */ "compare_op ::= NOT LIKE",
- /* 410 */ "compare_op ::= MATCH",
- /* 411 */ "compare_op ::= NMATCH",
- /* 412 */ "compare_op ::= CONTAINS",
- /* 413 */ "in_op ::= IN",
- /* 414 */ "in_op ::= NOT IN",
- /* 415 */ "in_predicate_value ::= NK_LP literal_list NK_RP",
- /* 416 */ "boolean_value_expression ::= boolean_primary",
- /* 417 */ "boolean_value_expression ::= NOT boolean_primary",
- /* 418 */ "boolean_value_expression ::= boolean_value_expression OR boolean_value_expression",
- /* 419 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression",
- /* 420 */ "boolean_primary ::= predicate",
- /* 421 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP",
- /* 422 */ "common_expression ::= expr_or_subquery",
- /* 423 */ "common_expression ::= boolean_value_expression",
- /* 424 */ "from_clause_opt ::=",
- /* 425 */ "from_clause_opt ::= FROM table_reference_list",
- /* 426 */ "table_reference_list ::= table_reference",
- /* 427 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference",
- /* 428 */ "table_reference ::= table_primary",
- /* 429 */ "table_reference ::= joined_table",
- /* 430 */ "table_primary ::= table_name alias_opt",
- /* 431 */ "table_primary ::= db_name NK_DOT table_name alias_opt",
- /* 432 */ "table_primary ::= subquery alias_opt",
- /* 433 */ "table_primary ::= parenthesized_joined_table",
- /* 434 */ "alias_opt ::=",
- /* 435 */ "alias_opt ::= table_alias",
- /* 436 */ "alias_opt ::= AS table_alias",
- /* 437 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP",
- /* 438 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP",
- /* 439 */ "joined_table ::= table_reference join_type JOIN table_reference ON search_condition",
- /* 440 */ "join_type ::=",
- /* 441 */ "join_type ::= INNER",
- /* 442 */ "query_specification ::= SELECT set_quantifier_opt select_list from_clause_opt where_clause_opt partition_by_clause_opt range_opt every_opt fill_opt twindow_clause_opt group_by_clause_opt having_clause_opt",
- /* 443 */ "set_quantifier_opt ::=",
- /* 444 */ "set_quantifier_opt ::= DISTINCT",
- /* 445 */ "set_quantifier_opt ::= ALL",
- /* 446 */ "select_list ::= select_item",
- /* 447 */ "select_list ::= select_list NK_COMMA select_item",
- /* 448 */ "select_item ::= NK_STAR",
- /* 449 */ "select_item ::= common_expression",
- /* 450 */ "select_item ::= common_expression column_alias",
- /* 451 */ "select_item ::= common_expression AS column_alias",
- /* 452 */ "select_item ::= table_name NK_DOT NK_STAR",
- /* 453 */ "where_clause_opt ::=",
- /* 454 */ "where_clause_opt ::= WHERE search_condition",
- /* 455 */ "partition_by_clause_opt ::=",
- /* 456 */ "partition_by_clause_opt ::= PARTITION BY partition_list",
- /* 457 */ "partition_list ::= partition_item",
- /* 458 */ "partition_list ::= partition_list NK_COMMA partition_item",
- /* 459 */ "partition_item ::= expr_or_subquery",
- /* 460 */ "partition_item ::= expr_or_subquery column_alias",
- /* 461 */ "partition_item ::= expr_or_subquery AS column_alias",
- /* 462 */ "twindow_clause_opt ::=",
- /* 463 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP",
- /* 464 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP",
- /* 465 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt",
- /* 466 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt",
- /* 467 */ "sliding_opt ::=",
- /* 468 */ "sliding_opt ::= SLIDING NK_LP duration_literal NK_RP",
- /* 469 */ "fill_opt ::=",
- /* 470 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP",
- /* 471 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP",
- /* 472 */ "fill_mode ::= NONE",
- /* 473 */ "fill_mode ::= PREV",
- /* 474 */ "fill_mode ::= NULL",
- /* 475 */ "fill_mode ::= LINEAR",
- /* 476 */ "fill_mode ::= NEXT",
- /* 477 */ "group_by_clause_opt ::=",
- /* 478 */ "group_by_clause_opt ::= GROUP BY group_by_list",
- /* 479 */ "group_by_list ::= expr_or_subquery",
- /* 480 */ "group_by_list ::= group_by_list NK_COMMA expr_or_subquery",
- /* 481 */ "having_clause_opt ::=",
- /* 482 */ "having_clause_opt ::= HAVING search_condition",
- /* 483 */ "range_opt ::=",
- /* 484 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP",
- /* 485 */ "every_opt ::=",
- /* 486 */ "every_opt ::= EVERY NK_LP duration_literal NK_RP",
- /* 487 */ "query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt",
- /* 488 */ "query_simple ::= query_specification",
- /* 489 */ "query_simple ::= union_query_expression",
- /* 490 */ "union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery",
- /* 491 */ "union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery",
- /* 492 */ "query_simple_or_subquery ::= query_simple",
- /* 493 */ "query_simple_or_subquery ::= subquery",
- /* 494 */ "query_or_subquery ::= query_expression",
- /* 495 */ "query_or_subquery ::= subquery",
- /* 496 */ "order_by_clause_opt ::=",
- /* 497 */ "order_by_clause_opt ::= ORDER BY sort_specification_list",
- /* 498 */ "slimit_clause_opt ::=",
- /* 499 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER",
- /* 500 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER",
- /* 501 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER",
- /* 502 */ "limit_clause_opt ::=",
- /* 503 */ "limit_clause_opt ::= LIMIT NK_INTEGER",
- /* 504 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER",
- /* 505 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER",
- /* 506 */ "subquery ::= NK_LP query_expression NK_RP",
- /* 507 */ "subquery ::= NK_LP subquery NK_RP",
- /* 508 */ "search_condition ::= common_expression",
- /* 509 */ "sort_specification_list ::= sort_specification",
- /* 510 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification",
- /* 511 */ "sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt",
- /* 512 */ "ordering_specification_opt ::=",
- /* 513 */ "ordering_specification_opt ::= ASC",
- /* 514 */ "ordering_specification_opt ::= DESC",
- /* 515 */ "null_ordering_opt ::=",
- /* 516 */ "null_ordering_opt ::= NULLS FIRST",
- /* 517 */ "null_ordering_opt ::= NULLS LAST",
+ /* 364 */ "pseudo_column ::= IROWTS",
+ /* 365 */ "function_expression ::= function_name NK_LP expression_list NK_RP",
+ /* 366 */ "function_expression ::= star_func NK_LP star_func_para_list NK_RP",
+ /* 367 */ "function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP",
+ /* 368 */ "function_expression ::= literal_func",
+ /* 369 */ "literal_func ::= noarg_func NK_LP NK_RP",
+ /* 370 */ "literal_func ::= NOW",
+ /* 371 */ "noarg_func ::= NOW",
+ /* 372 */ "noarg_func ::= TODAY",
+ /* 373 */ "noarg_func ::= TIMEZONE",
+ /* 374 */ "noarg_func ::= DATABASE",
+ /* 375 */ "noarg_func ::= CLIENT_VERSION",
+ /* 376 */ "noarg_func ::= SERVER_VERSION",
+ /* 377 */ "noarg_func ::= SERVER_STATUS",
+ /* 378 */ "noarg_func ::= CURRENT_USER",
+ /* 379 */ "noarg_func ::= USER",
+ /* 380 */ "star_func ::= COUNT",
+ /* 381 */ "star_func ::= FIRST",
+ /* 382 */ "star_func ::= LAST",
+ /* 383 */ "star_func ::= LAST_ROW",
+ /* 384 */ "star_func_para_list ::= NK_STAR",
+ /* 385 */ "star_func_para_list ::= other_para_list",
+ /* 386 */ "other_para_list ::= star_func_para",
+ /* 387 */ "other_para_list ::= other_para_list NK_COMMA star_func_para",
+ /* 388 */ "star_func_para ::= expr_or_subquery",
+ /* 389 */ "star_func_para ::= table_name NK_DOT NK_STAR",
+ /* 390 */ "case_when_expression ::= CASE when_then_list case_when_else_opt END",
+ /* 391 */ "case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END",
+ /* 392 */ "when_then_list ::= when_then_expr",
+ /* 393 */ "when_then_list ::= when_then_list when_then_expr",
+ /* 394 */ "when_then_expr ::= WHEN common_expression THEN common_expression",
+ /* 395 */ "case_when_else_opt ::=",
+ /* 396 */ "case_when_else_opt ::= ELSE common_expression",
+ /* 397 */ "predicate ::= expr_or_subquery compare_op expr_or_subquery",
+ /* 398 */ "predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery",
+ /* 399 */ "predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery",
+ /* 400 */ "predicate ::= expr_or_subquery IS NULL",
+ /* 401 */ "predicate ::= expr_or_subquery IS NOT NULL",
+ /* 402 */ "predicate ::= expr_or_subquery in_op in_predicate_value",
+ /* 403 */ "compare_op ::= NK_LT",
+ /* 404 */ "compare_op ::= NK_GT",
+ /* 405 */ "compare_op ::= NK_LE",
+ /* 406 */ "compare_op ::= NK_GE",
+ /* 407 */ "compare_op ::= NK_NE",
+ /* 408 */ "compare_op ::= NK_EQ",
+ /* 409 */ "compare_op ::= LIKE",
+ /* 410 */ "compare_op ::= NOT LIKE",
+ /* 411 */ "compare_op ::= MATCH",
+ /* 412 */ "compare_op ::= NMATCH",
+ /* 413 */ "compare_op ::= CONTAINS",
+ /* 414 */ "in_op ::= IN",
+ /* 415 */ "in_op ::= NOT IN",
+ /* 416 */ "in_predicate_value ::= NK_LP literal_list NK_RP",
+ /* 417 */ "boolean_value_expression ::= boolean_primary",
+ /* 418 */ "boolean_value_expression ::= NOT boolean_primary",
+ /* 419 */ "boolean_value_expression ::= boolean_value_expression OR boolean_value_expression",
+ /* 420 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression",
+ /* 421 */ "boolean_primary ::= predicate",
+ /* 422 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP",
+ /* 423 */ "common_expression ::= expr_or_subquery",
+ /* 424 */ "common_expression ::= boolean_value_expression",
+ /* 425 */ "from_clause_opt ::=",
+ /* 426 */ "from_clause_opt ::= FROM table_reference_list",
+ /* 427 */ "table_reference_list ::= table_reference",
+ /* 428 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference",
+ /* 429 */ "table_reference ::= table_primary",
+ /* 430 */ "table_reference ::= joined_table",
+ /* 431 */ "table_primary ::= table_name alias_opt",
+ /* 432 */ "table_primary ::= db_name NK_DOT table_name alias_opt",
+ /* 433 */ "table_primary ::= subquery alias_opt",
+ /* 434 */ "table_primary ::= parenthesized_joined_table",
+ /* 435 */ "alias_opt ::=",
+ /* 436 */ "alias_opt ::= table_alias",
+ /* 437 */ "alias_opt ::= AS table_alias",
+ /* 438 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP",
+ /* 439 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP",
+ /* 440 */ "joined_table ::= table_reference join_type JOIN table_reference ON search_condition",
+ /* 441 */ "join_type ::=",
+ /* 442 */ "join_type ::= INNER",
+ /* 443 */ "query_specification ::= SELECT set_quantifier_opt select_list from_clause_opt where_clause_opt partition_by_clause_opt range_opt every_opt fill_opt twindow_clause_opt group_by_clause_opt having_clause_opt",
+ /* 444 */ "set_quantifier_opt ::=",
+ /* 445 */ "set_quantifier_opt ::= DISTINCT",
+ /* 446 */ "set_quantifier_opt ::= ALL",
+ /* 447 */ "select_list ::= select_item",
+ /* 448 */ "select_list ::= select_list NK_COMMA select_item",
+ /* 449 */ "select_item ::= NK_STAR",
+ /* 450 */ "select_item ::= common_expression",
+ /* 451 */ "select_item ::= common_expression column_alias",
+ /* 452 */ "select_item ::= common_expression AS column_alias",
+ /* 453 */ "select_item ::= table_name NK_DOT NK_STAR",
+ /* 454 */ "where_clause_opt ::=",
+ /* 455 */ "where_clause_opt ::= WHERE search_condition",
+ /* 456 */ "partition_by_clause_opt ::=",
+ /* 457 */ "partition_by_clause_opt ::= PARTITION BY partition_list",
+ /* 458 */ "partition_list ::= partition_item",
+ /* 459 */ "partition_list ::= partition_list NK_COMMA partition_item",
+ /* 460 */ "partition_item ::= expr_or_subquery",
+ /* 461 */ "partition_item ::= expr_or_subquery column_alias",
+ /* 462 */ "partition_item ::= expr_or_subquery AS column_alias",
+ /* 463 */ "twindow_clause_opt ::=",
+ /* 464 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP",
+ /* 465 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP",
+ /* 466 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt",
+ /* 467 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt",
+ /* 468 */ "sliding_opt ::=",
+ /* 469 */ "sliding_opt ::= SLIDING NK_LP duration_literal NK_RP",
+ /* 470 */ "fill_opt ::=",
+ /* 471 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP",
+ /* 472 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP",
+ /* 473 */ "fill_mode ::= NONE",
+ /* 474 */ "fill_mode ::= PREV",
+ /* 475 */ "fill_mode ::= NULL",
+ /* 476 */ "fill_mode ::= LINEAR",
+ /* 477 */ "fill_mode ::= NEXT",
+ /* 478 */ "group_by_clause_opt ::=",
+ /* 479 */ "group_by_clause_opt ::= GROUP BY group_by_list",
+ /* 480 */ "group_by_list ::= expr_or_subquery",
+ /* 481 */ "group_by_list ::= group_by_list NK_COMMA expr_or_subquery",
+ /* 482 */ "having_clause_opt ::=",
+ /* 483 */ "having_clause_opt ::= HAVING search_condition",
+ /* 484 */ "range_opt ::=",
+ /* 485 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP",
+ /* 486 */ "every_opt ::=",
+ /* 487 */ "every_opt ::= EVERY NK_LP duration_literal NK_RP",
+ /* 488 */ "query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt",
+ /* 489 */ "query_simple ::= query_specification",
+ /* 490 */ "query_simple ::= union_query_expression",
+ /* 491 */ "union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery",
+ /* 492 */ "union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery",
+ /* 493 */ "query_simple_or_subquery ::= query_simple",
+ /* 494 */ "query_simple_or_subquery ::= subquery",
+ /* 495 */ "query_or_subquery ::= query_expression",
+ /* 496 */ "query_or_subquery ::= subquery",
+ /* 497 */ "order_by_clause_opt ::=",
+ /* 498 */ "order_by_clause_opt ::= ORDER BY sort_specification_list",
+ /* 499 */ "slimit_clause_opt ::=",
+ /* 500 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER",
+ /* 501 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER",
+ /* 502 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER",
+ /* 503 */ "limit_clause_opt ::=",
+ /* 504 */ "limit_clause_opt ::= LIMIT NK_INTEGER",
+ /* 505 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER",
+ /* 506 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER",
+ /* 507 */ "subquery ::= NK_LP query_expression NK_RP",
+ /* 508 */ "subquery ::= NK_LP subquery NK_RP",
+ /* 509 */ "search_condition ::= common_expression",
+ /* 510 */ "sort_specification_list ::= sort_specification",
+ /* 511 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification",
+ /* 512 */ "sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt",
+ /* 513 */ "ordering_specification_opt ::=",
+ /* 514 */ "ordering_specification_opt ::= ASC",
+ /* 515 */ "ordering_specification_opt ::= DESC",
+ /* 516 */ "null_ordering_opt ::=",
+ /* 517 */ "null_ordering_opt ::= NULLS FIRST",
+ /* 518 */ "null_ordering_opt ::= NULLS LAST",
};
#endif /* NDEBUG */
@@ -2481,190 +2530,190 @@ static void yy_destructor(
*/
/********* Begin destructor definitions ***************************************/
/* Default NON-TERMINAL Destructor */
- case 315: /* cmd */
- case 318: /* literal */
- case 329: /* db_options */
- case 331: /* alter_db_options */
- case 337: /* retention */
- case 338: /* full_table_name */
- case 341: /* table_options */
- case 345: /* alter_table_clause */
- case 346: /* alter_table_options */
- case 349: /* signed_literal */
- case 350: /* create_subtable_clause */
- case 353: /* drop_table_clause */
- case 356: /* column_def */
- case 360: /* duration_literal */
- case 361: /* rollup_func_name */
- case 363: /* col_name */
- case 364: /* db_name_cond_opt */
- case 365: /* like_pattern_opt */
- case 366: /* table_name_cond */
- case 367: /* from_db_opt */
- case 368: /* index_options */
- case 370: /* sliding_opt */
- case 371: /* sma_stream_opt */
- case 372: /* func */
- case 373: /* stream_options */
- case 375: /* query_or_subquery */
- case 378: /* explain_options */
- case 382: /* subtable_opt */
- case 383: /* expression */
- case 385: /* where_clause_opt */
- case 386: /* signed */
- case 387: /* literal_func */
- case 391: /* expr_or_subquery */
- case 392: /* subquery */
- case 393: /* pseudo_column */
- case 394: /* column_reference */
- case 395: /* function_expression */
- case 396: /* case_when_expression */
- case 401: /* star_func_para */
- case 403: /* case_when_else_opt */
- case 404: /* common_expression */
- case 405: /* when_then_expr */
- case 406: /* predicate */
- case 409: /* in_predicate_value */
- case 410: /* boolean_value_expression */
- case 411: /* boolean_primary */
- case 412: /* from_clause_opt */
- case 413: /* table_reference_list */
- case 414: /* table_reference */
- case 415: /* table_primary */
- case 416: /* joined_table */
- case 418: /* parenthesized_joined_table */
- case 420: /* search_condition */
- case 421: /* query_specification */
- case 425: /* range_opt */
- case 426: /* every_opt */
- case 427: /* fill_opt */
- case 428: /* twindow_clause_opt */
- case 430: /* having_clause_opt */
- case 431: /* select_item */
- case 433: /* partition_item */
- case 436: /* query_expression */
- case 437: /* query_simple */
- case 439: /* slimit_clause_opt */
- case 440: /* limit_clause_opt */
- case 441: /* union_query_expression */
- case 442: /* query_simple_or_subquery */
- case 444: /* sort_specification */
+ case 316: /* cmd */
+ case 319: /* literal */
+ case 330: /* db_options */
+ case 332: /* alter_db_options */
+ case 338: /* retention */
+ case 339: /* full_table_name */
+ case 342: /* table_options */
+ case 346: /* alter_table_clause */
+ case 347: /* alter_table_options */
+ case 350: /* signed_literal */
+ case 351: /* create_subtable_clause */
+ case 354: /* drop_table_clause */
+ case 357: /* column_def */
+ case 361: /* duration_literal */
+ case 362: /* rollup_func_name */
+ case 364: /* col_name */
+ case 365: /* db_name_cond_opt */
+ case 366: /* like_pattern_opt */
+ case 367: /* table_name_cond */
+ case 368: /* from_db_opt */
+ case 369: /* index_options */
+ case 371: /* sliding_opt */
+ case 372: /* sma_stream_opt */
+ case 373: /* func */
+ case 374: /* stream_options */
+ case 376: /* query_or_subquery */
+ case 379: /* explain_options */
+ case 383: /* subtable_opt */
+ case 384: /* expression */
+ case 386: /* where_clause_opt */
+ case 387: /* signed */
+ case 388: /* literal_func */
+ case 392: /* expr_or_subquery */
+ case 393: /* subquery */
+ case 394: /* pseudo_column */
+ case 395: /* column_reference */
+ case 396: /* function_expression */
+ case 397: /* case_when_expression */
+ case 402: /* star_func_para */
+ case 404: /* case_when_else_opt */
+ case 405: /* common_expression */
+ case 406: /* when_then_expr */
+ case 407: /* predicate */
+ case 410: /* in_predicate_value */
+ case 411: /* boolean_value_expression */
+ case 412: /* boolean_primary */
+ case 413: /* from_clause_opt */
+ case 414: /* table_reference_list */
+ case 415: /* table_reference */
+ case 416: /* table_primary */
+ case 417: /* joined_table */
+ case 419: /* parenthesized_joined_table */
+ case 421: /* search_condition */
+ case 422: /* query_specification */
+ case 426: /* range_opt */
+ case 427: /* every_opt */
+ case 428: /* fill_opt */
+ case 429: /* twindow_clause_opt */
+ case 431: /* having_clause_opt */
+ case 432: /* select_item */
+ case 434: /* partition_item */
+ case 437: /* query_expression */
+ case 438: /* query_simple */
+ case 440: /* slimit_clause_opt */
+ case 441: /* limit_clause_opt */
+ case 442: /* union_query_expression */
+ case 443: /* query_simple_or_subquery */
+ case 445: /* sort_specification */
{
- nodesDestroyNode((yypminor->yy392));
+ nodesDestroyNode((yypminor->yy616));
}
break;
- case 316: /* account_options */
- case 317: /* alter_account_options */
- case 319: /* alter_account_option */
- case 332: /* speed_opt */
- case 380: /* bufsize_opt */
+ case 317: /* account_options */
+ case 318: /* alter_account_options */
+ case 320: /* alter_account_option */
+ case 333: /* speed_opt */
+ case 381: /* bufsize_opt */
{
}
break;
- case 320: /* user_name */
- case 323: /* priv_level */
- case 326: /* db_name */
- case 327: /* dnode_endpoint */
- case 347: /* column_name */
- case 355: /* table_name */
- case 362: /* function_name */
- case 374: /* topic_name */
- case 376: /* cgroup_name */
- case 381: /* stream_name */
- case 389: /* table_alias */
- case 390: /* column_alias */
- case 397: /* star_func */
- case 399: /* noarg_func */
- case 417: /* alias_opt */
+ case 321: /* user_name */
+ case 324: /* priv_level */
+ case 327: /* db_name */
+ case 328: /* dnode_endpoint */
+ case 348: /* column_name */
+ case 356: /* table_name */
+ case 363: /* function_name */
+ case 375: /* topic_name */
+ case 377: /* cgroup_name */
+ case 382: /* stream_name */
+ case 390: /* table_alias */
+ case 391: /* column_alias */
+ case 398: /* star_func */
+ case 400: /* noarg_func */
+ case 418: /* alias_opt */
{
}
break;
- case 321: /* sysinfo_opt */
+ case 322: /* sysinfo_opt */
{
}
break;
- case 322: /* privileges */
- case 324: /* priv_type_list */
- case 325: /* priv_type */
+ case 323: /* privileges */
+ case 325: /* priv_type_list */
+ case 326: /* priv_type */
{
}
break;
- case 328: /* not_exists_opt */
- case 330: /* exists_opt */
- case 377: /* analyze_opt */
- case 379: /* agg_func_opt */
- case 422: /* set_quantifier_opt */
+ case 329: /* not_exists_opt */
+ case 331: /* exists_opt */
+ case 378: /* analyze_opt */
+ case 380: /* agg_func_opt */
+ case 423: /* set_quantifier_opt */
{
}
break;
- case 333: /* integer_list */
- case 334: /* variable_list */
- case 335: /* retention_list */
- case 339: /* column_def_list */
- case 340: /* tags_def_opt */
- case 342: /* multi_create_clause */
- case 343: /* tags_def */
- case 344: /* multi_drop_clause */
- case 351: /* specific_cols_opt */
- case 352: /* expression_list */
- case 354: /* col_name_list */
- case 357: /* duration_list */
- case 358: /* rollup_func_list */
- case 369: /* func_list */
- case 384: /* dnode_list */
- case 388: /* literal_list */
- case 398: /* star_func_para_list */
- case 400: /* other_para_list */
- case 402: /* when_then_list */
- case 423: /* select_list */
- case 424: /* partition_by_clause_opt */
- case 429: /* group_by_clause_opt */
- case 432: /* partition_list */
- case 435: /* group_by_list */
- case 438: /* order_by_clause_opt */
- case 443: /* sort_specification_list */
+ case 334: /* integer_list */
+ case 335: /* variable_list */
+ case 336: /* retention_list */
+ case 340: /* column_def_list */
+ case 341: /* tags_def_opt */
+ case 343: /* multi_create_clause */
+ case 344: /* tags_def */
+ case 345: /* multi_drop_clause */
+ case 352: /* specific_cols_opt */
+ case 353: /* expression_list */
+ case 355: /* col_name_list */
+ case 358: /* duration_list */
+ case 359: /* rollup_func_list */
+ case 370: /* func_list */
+ case 385: /* dnode_list */
+ case 389: /* literal_list */
+ case 399: /* star_func_para_list */
+ case 401: /* other_para_list */
+ case 403: /* when_then_list */
+ case 424: /* select_list */
+ case 425: /* partition_by_clause_opt */
+ case 430: /* group_by_clause_opt */
+ case 433: /* partition_list */
+ case 436: /* group_by_list */
+ case 439: /* order_by_clause_opt */
+ case 444: /* sort_specification_list */
{
- nodesDestroyList((yypminor->yy148));
+ nodesDestroyList((yypminor->yy152));
}
break;
- case 336: /* alter_db_option */
- case 359: /* alter_table_option */
+ case 337: /* alter_db_option */
+ case 360: /* alter_table_option */
{
}
break;
- case 348: /* type_name */
+ case 349: /* type_name */
{
}
break;
- case 407: /* compare_op */
- case 408: /* in_op */
+ case 408: /* compare_op */
+ case 409: /* in_op */
{
}
break;
- case 419: /* join_type */
+ case 420: /* join_type */
{
}
break;
- case 434: /* fill_mode */
+ case 435: /* fill_mode */
{
}
break;
- case 445: /* ordering_specification_opt */
+ case 446: /* ordering_specification_opt */
{
}
break;
- case 446: /* null_ordering_opt */
+ case 447: /* null_ordering_opt */
{
}
@@ -2963,524 +3012,525 @@ 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[] = {
- { 315, -6 }, /* (0) cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */
- { 315, -4 }, /* (1) cmd ::= ALTER ACCOUNT NK_ID alter_account_options */
- { 316, 0 }, /* (2) account_options ::= */
- { 316, -3 }, /* (3) account_options ::= account_options PPS literal */
- { 316, -3 }, /* (4) account_options ::= account_options TSERIES literal */
- { 316, -3 }, /* (5) account_options ::= account_options STORAGE literal */
- { 316, -3 }, /* (6) account_options ::= account_options STREAMS literal */
- { 316, -3 }, /* (7) account_options ::= account_options QTIME literal */
- { 316, -3 }, /* (8) account_options ::= account_options DBS literal */
- { 316, -3 }, /* (9) account_options ::= account_options USERS literal */
- { 316, -3 }, /* (10) account_options ::= account_options CONNS literal */
- { 316, -3 }, /* (11) account_options ::= account_options STATE literal */
- { 317, -1 }, /* (12) alter_account_options ::= alter_account_option */
- { 317, -2 }, /* (13) alter_account_options ::= alter_account_options alter_account_option */
- { 319, -2 }, /* (14) alter_account_option ::= PASS literal */
- { 319, -2 }, /* (15) alter_account_option ::= PPS literal */
- { 319, -2 }, /* (16) alter_account_option ::= TSERIES literal */
- { 319, -2 }, /* (17) alter_account_option ::= STORAGE literal */
- { 319, -2 }, /* (18) alter_account_option ::= STREAMS literal */
- { 319, -2 }, /* (19) alter_account_option ::= QTIME literal */
- { 319, -2 }, /* (20) alter_account_option ::= DBS literal */
- { 319, -2 }, /* (21) alter_account_option ::= USERS literal */
- { 319, -2 }, /* (22) alter_account_option ::= CONNS literal */
- { 319, -2 }, /* (23) alter_account_option ::= STATE literal */
- { 315, -6 }, /* (24) cmd ::= CREATE USER user_name PASS NK_STRING sysinfo_opt */
- { 315, -5 }, /* (25) cmd ::= ALTER USER user_name PASS NK_STRING */
- { 315, -5 }, /* (26) cmd ::= ALTER USER user_name ENABLE NK_INTEGER */
- { 315, -5 }, /* (27) cmd ::= ALTER USER user_name SYSINFO NK_INTEGER */
- { 315, -3 }, /* (28) cmd ::= DROP USER user_name */
- { 321, 0 }, /* (29) sysinfo_opt ::= */
- { 321, -2 }, /* (30) sysinfo_opt ::= SYSINFO NK_INTEGER */
- { 315, -6 }, /* (31) cmd ::= GRANT privileges ON priv_level TO user_name */
- { 315, -6 }, /* (32) cmd ::= REVOKE privileges ON priv_level FROM user_name */
- { 322, -1 }, /* (33) privileges ::= ALL */
- { 322, -1 }, /* (34) privileges ::= priv_type_list */
- { 324, -1 }, /* (35) priv_type_list ::= priv_type */
- { 324, -3 }, /* (36) priv_type_list ::= priv_type_list NK_COMMA priv_type */
- { 325, -1 }, /* (37) priv_type ::= READ */
- { 325, -1 }, /* (38) priv_type ::= WRITE */
- { 323, -3 }, /* (39) priv_level ::= NK_STAR NK_DOT NK_STAR */
- { 323, -3 }, /* (40) priv_level ::= db_name NK_DOT NK_STAR */
- { 315, -3 }, /* (41) cmd ::= CREATE DNODE dnode_endpoint */
- { 315, -5 }, /* (42) cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */
- { 315, -3 }, /* (43) cmd ::= DROP DNODE NK_INTEGER */
- { 315, -3 }, /* (44) cmd ::= DROP DNODE dnode_endpoint */
- { 315, -4 }, /* (45) cmd ::= ALTER DNODE NK_INTEGER NK_STRING */
- { 315, -5 }, /* (46) cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */
- { 315, -4 }, /* (47) cmd ::= ALTER ALL DNODES NK_STRING */
- { 315, -5 }, /* (48) cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */
- { 327, -1 }, /* (49) dnode_endpoint ::= NK_STRING */
- { 327, -1 }, /* (50) dnode_endpoint ::= NK_ID */
- { 327, -1 }, /* (51) dnode_endpoint ::= NK_IPTOKEN */
- { 315, -3 }, /* (52) cmd ::= ALTER LOCAL NK_STRING */
- { 315, -4 }, /* (53) cmd ::= ALTER LOCAL NK_STRING NK_STRING */
- { 315, -5 }, /* (54) cmd ::= CREATE QNODE ON DNODE NK_INTEGER */
- { 315, -5 }, /* (55) cmd ::= DROP QNODE ON DNODE NK_INTEGER */
- { 315, -5 }, /* (56) cmd ::= CREATE BNODE ON DNODE NK_INTEGER */
- { 315, -5 }, /* (57) cmd ::= DROP BNODE ON DNODE NK_INTEGER */
- { 315, -5 }, /* (58) cmd ::= CREATE SNODE ON DNODE NK_INTEGER */
- { 315, -5 }, /* (59) cmd ::= DROP SNODE ON DNODE NK_INTEGER */
- { 315, -5 }, /* (60) cmd ::= CREATE MNODE ON DNODE NK_INTEGER */
- { 315, -5 }, /* (61) cmd ::= DROP MNODE ON DNODE NK_INTEGER */
- { 315, -5 }, /* (62) cmd ::= CREATE DATABASE not_exists_opt db_name db_options */
- { 315, -4 }, /* (63) cmd ::= DROP DATABASE exists_opt db_name */
- { 315, -2 }, /* (64) cmd ::= USE db_name */
- { 315, -4 }, /* (65) cmd ::= ALTER DATABASE db_name alter_db_options */
- { 315, -3 }, /* (66) cmd ::= FLUSH DATABASE db_name */
- { 315, -4 }, /* (67) cmd ::= TRIM DATABASE db_name speed_opt */
- { 328, -3 }, /* (68) not_exists_opt ::= IF NOT EXISTS */
- { 328, 0 }, /* (69) not_exists_opt ::= */
- { 330, -2 }, /* (70) exists_opt ::= IF EXISTS */
- { 330, 0 }, /* (71) exists_opt ::= */
- { 329, 0 }, /* (72) db_options ::= */
- { 329, -3 }, /* (73) db_options ::= db_options BUFFER NK_INTEGER */
- { 329, -3 }, /* (74) db_options ::= db_options CACHEMODEL NK_STRING */
- { 329, -3 }, /* (75) db_options ::= db_options CACHESIZE NK_INTEGER */
- { 329, -3 }, /* (76) db_options ::= db_options COMP NK_INTEGER */
- { 329, -3 }, /* (77) db_options ::= db_options DURATION NK_INTEGER */
- { 329, -3 }, /* (78) db_options ::= db_options DURATION NK_VARIABLE */
- { 329, -3 }, /* (79) db_options ::= db_options MAXROWS NK_INTEGER */
- { 329, -3 }, /* (80) db_options ::= db_options MINROWS NK_INTEGER */
- { 329, -3 }, /* (81) db_options ::= db_options KEEP integer_list */
- { 329, -3 }, /* (82) db_options ::= db_options KEEP variable_list */
- { 329, -3 }, /* (83) db_options ::= db_options PAGES NK_INTEGER */
- { 329, -3 }, /* (84) db_options ::= db_options PAGESIZE NK_INTEGER */
- { 329, -3 }, /* (85) db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */
- { 329, -3 }, /* (86) db_options ::= db_options PRECISION NK_STRING */
- { 329, -3 }, /* (87) db_options ::= db_options REPLICA NK_INTEGER */
- { 329, -3 }, /* (88) db_options ::= db_options STRICT NK_STRING */
- { 329, -3 }, /* (89) db_options ::= db_options VGROUPS NK_INTEGER */
- { 329, -3 }, /* (90) db_options ::= db_options SINGLE_STABLE NK_INTEGER */
- { 329, -3 }, /* (91) db_options ::= db_options RETENTIONS retention_list */
- { 329, -3 }, /* (92) db_options ::= db_options SCHEMALESS NK_INTEGER */
- { 329, -3 }, /* (93) db_options ::= db_options WAL_LEVEL NK_INTEGER */
- { 329, -3 }, /* (94) db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */
- { 329, -3 }, /* (95) db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */
- { 329, -4 }, /* (96) db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */
- { 329, -3 }, /* (97) db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */
- { 329, -4 }, /* (98) db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */
- { 329, -3 }, /* (99) db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */
- { 329, -3 }, /* (100) db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */
- { 329, -3 }, /* (101) db_options ::= db_options STT_TRIGGER NK_INTEGER */
- { 329, -3 }, /* (102) db_options ::= db_options TABLE_PREFIX NK_INTEGER */
- { 329, -3 }, /* (103) db_options ::= db_options TABLE_SUFFIX NK_INTEGER */
- { 331, -1 }, /* (104) alter_db_options ::= alter_db_option */
- { 331, -2 }, /* (105) alter_db_options ::= alter_db_options alter_db_option */
- { 336, -2 }, /* (106) alter_db_option ::= CACHEMODEL NK_STRING */
- { 336, -2 }, /* (107) alter_db_option ::= CACHESIZE NK_INTEGER */
- { 336, -2 }, /* (108) alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */
- { 336, -2 }, /* (109) alter_db_option ::= KEEP integer_list */
- { 336, -2 }, /* (110) alter_db_option ::= KEEP variable_list */
- { 336, -2 }, /* (111) alter_db_option ::= WAL_LEVEL NK_INTEGER */
- { 336, -2 }, /* (112) alter_db_option ::= STT_TRIGGER NK_INTEGER */
- { 333, -1 }, /* (113) integer_list ::= NK_INTEGER */
- { 333, -3 }, /* (114) integer_list ::= integer_list NK_COMMA NK_INTEGER */
- { 334, -1 }, /* (115) variable_list ::= NK_VARIABLE */
- { 334, -3 }, /* (116) variable_list ::= variable_list NK_COMMA NK_VARIABLE */
- { 335, -1 }, /* (117) retention_list ::= retention */
- { 335, -3 }, /* (118) retention_list ::= retention_list NK_COMMA retention */
- { 337, -3 }, /* (119) retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */
- { 332, 0 }, /* (120) speed_opt ::= */
- { 332, -2 }, /* (121) speed_opt ::= MAX_SPEED NK_INTEGER */
- { 315, -9 }, /* (122) cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */
- { 315, -3 }, /* (123) cmd ::= CREATE TABLE multi_create_clause */
- { 315, -9 }, /* (124) cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */
- { 315, -3 }, /* (125) cmd ::= DROP TABLE multi_drop_clause */
- { 315, -4 }, /* (126) cmd ::= DROP STABLE exists_opt full_table_name */
- { 315, -3 }, /* (127) cmd ::= ALTER TABLE alter_table_clause */
- { 315, -3 }, /* (128) cmd ::= ALTER STABLE alter_table_clause */
- { 345, -2 }, /* (129) alter_table_clause ::= full_table_name alter_table_options */
- { 345, -5 }, /* (130) alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */
- { 345, -4 }, /* (131) alter_table_clause ::= full_table_name DROP COLUMN column_name */
- { 345, -5 }, /* (132) alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */
- { 345, -5 }, /* (133) alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */
- { 345, -5 }, /* (134) alter_table_clause ::= full_table_name ADD TAG column_name type_name */
- { 345, -4 }, /* (135) alter_table_clause ::= full_table_name DROP TAG column_name */
- { 345, -5 }, /* (136) alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */
- { 345, -5 }, /* (137) alter_table_clause ::= full_table_name RENAME TAG column_name column_name */
- { 345, -6 }, /* (138) alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */
- { 342, -1 }, /* (139) multi_create_clause ::= create_subtable_clause */
- { 342, -2 }, /* (140) multi_create_clause ::= multi_create_clause create_subtable_clause */
- { 350, -10 }, /* (141) create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_cols_opt TAGS NK_LP expression_list NK_RP table_options */
- { 344, -1 }, /* (142) multi_drop_clause ::= drop_table_clause */
- { 344, -2 }, /* (143) multi_drop_clause ::= multi_drop_clause drop_table_clause */
- { 353, -2 }, /* (144) drop_table_clause ::= exists_opt full_table_name */
- { 351, 0 }, /* (145) specific_cols_opt ::= */
- { 351, -3 }, /* (146) specific_cols_opt ::= NK_LP col_name_list NK_RP */
- { 338, -1 }, /* (147) full_table_name ::= table_name */
- { 338, -3 }, /* (148) full_table_name ::= db_name NK_DOT table_name */
- { 339, -1 }, /* (149) column_def_list ::= column_def */
- { 339, -3 }, /* (150) column_def_list ::= column_def_list NK_COMMA column_def */
- { 356, -2 }, /* (151) column_def ::= column_name type_name */
- { 356, -4 }, /* (152) column_def ::= column_name type_name COMMENT NK_STRING */
- { 348, -1 }, /* (153) type_name ::= BOOL */
- { 348, -1 }, /* (154) type_name ::= TINYINT */
- { 348, -1 }, /* (155) type_name ::= SMALLINT */
- { 348, -1 }, /* (156) type_name ::= INT */
- { 348, -1 }, /* (157) type_name ::= INTEGER */
- { 348, -1 }, /* (158) type_name ::= BIGINT */
- { 348, -1 }, /* (159) type_name ::= FLOAT */
- { 348, -1 }, /* (160) type_name ::= DOUBLE */
- { 348, -4 }, /* (161) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */
- { 348, -1 }, /* (162) type_name ::= TIMESTAMP */
- { 348, -4 }, /* (163) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */
- { 348, -2 }, /* (164) type_name ::= TINYINT UNSIGNED */
- { 348, -2 }, /* (165) type_name ::= SMALLINT UNSIGNED */
- { 348, -2 }, /* (166) type_name ::= INT UNSIGNED */
- { 348, -2 }, /* (167) type_name ::= BIGINT UNSIGNED */
- { 348, -1 }, /* (168) type_name ::= JSON */
- { 348, -4 }, /* (169) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */
- { 348, -1 }, /* (170) type_name ::= MEDIUMBLOB */
- { 348, -1 }, /* (171) type_name ::= BLOB */
- { 348, -4 }, /* (172) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */
- { 348, -1 }, /* (173) type_name ::= DECIMAL */
- { 348, -4 }, /* (174) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */
- { 348, -6 }, /* (175) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */
- { 340, 0 }, /* (176) tags_def_opt ::= */
- { 340, -1 }, /* (177) tags_def_opt ::= tags_def */
- { 343, -4 }, /* (178) tags_def ::= TAGS NK_LP column_def_list NK_RP */
- { 341, 0 }, /* (179) table_options ::= */
- { 341, -3 }, /* (180) table_options ::= table_options COMMENT NK_STRING */
- { 341, -3 }, /* (181) table_options ::= table_options MAX_DELAY duration_list */
- { 341, -3 }, /* (182) table_options ::= table_options WATERMARK duration_list */
- { 341, -5 }, /* (183) table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */
- { 341, -3 }, /* (184) table_options ::= table_options TTL NK_INTEGER */
- { 341, -5 }, /* (185) table_options ::= table_options SMA NK_LP col_name_list NK_RP */
- { 346, -1 }, /* (186) alter_table_options ::= alter_table_option */
- { 346, -2 }, /* (187) alter_table_options ::= alter_table_options alter_table_option */
- { 359, -2 }, /* (188) alter_table_option ::= COMMENT NK_STRING */
- { 359, -2 }, /* (189) alter_table_option ::= TTL NK_INTEGER */
- { 357, -1 }, /* (190) duration_list ::= duration_literal */
- { 357, -3 }, /* (191) duration_list ::= duration_list NK_COMMA duration_literal */
- { 358, -1 }, /* (192) rollup_func_list ::= rollup_func_name */
- { 358, -3 }, /* (193) rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */
- { 361, -1 }, /* (194) rollup_func_name ::= function_name */
- { 361, -1 }, /* (195) rollup_func_name ::= FIRST */
- { 361, -1 }, /* (196) rollup_func_name ::= LAST */
- { 354, -1 }, /* (197) col_name_list ::= col_name */
- { 354, -3 }, /* (198) col_name_list ::= col_name_list NK_COMMA col_name */
- { 363, -1 }, /* (199) col_name ::= column_name */
- { 315, -2 }, /* (200) cmd ::= SHOW DNODES */
- { 315, -2 }, /* (201) cmd ::= SHOW USERS */
- { 315, -2 }, /* (202) cmd ::= SHOW DATABASES */
- { 315, -4 }, /* (203) cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */
- { 315, -4 }, /* (204) cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */
- { 315, -3 }, /* (205) cmd ::= SHOW db_name_cond_opt VGROUPS */
- { 315, -2 }, /* (206) cmd ::= SHOW MNODES */
- { 315, -2 }, /* (207) cmd ::= SHOW MODULES */
- { 315, -2 }, /* (208) cmd ::= SHOW QNODES */
- { 315, -2 }, /* (209) cmd ::= SHOW FUNCTIONS */
- { 315, -5 }, /* (210) cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */
- { 315, -2 }, /* (211) cmd ::= SHOW STREAMS */
- { 315, -2 }, /* (212) cmd ::= SHOW ACCOUNTS */
- { 315, -2 }, /* (213) cmd ::= SHOW APPS */
- { 315, -2 }, /* (214) cmd ::= SHOW CONNECTIONS */
- { 315, -2 }, /* (215) cmd ::= SHOW LICENCES */
- { 315, -2 }, /* (216) cmd ::= SHOW GRANTS */
- { 315, -4 }, /* (217) cmd ::= SHOW CREATE DATABASE db_name */
- { 315, -4 }, /* (218) cmd ::= SHOW CREATE TABLE full_table_name */
- { 315, -4 }, /* (219) cmd ::= SHOW CREATE STABLE full_table_name */
- { 315, -2 }, /* (220) cmd ::= SHOW QUERIES */
- { 315, -2 }, /* (221) cmd ::= SHOW SCORES */
- { 315, -2 }, /* (222) cmd ::= SHOW TOPICS */
- { 315, -2 }, /* (223) cmd ::= SHOW VARIABLES */
- { 315, -3 }, /* (224) cmd ::= SHOW LOCAL VARIABLES */
- { 315, -4 }, /* (225) cmd ::= SHOW DNODE NK_INTEGER VARIABLES */
- { 315, -2 }, /* (226) cmd ::= SHOW BNODES */
- { 315, -2 }, /* (227) cmd ::= SHOW SNODES */
- { 315, -2 }, /* (228) cmd ::= SHOW CLUSTER */
- { 315, -2 }, /* (229) cmd ::= SHOW TRANSACTIONS */
- { 315, -4 }, /* (230) cmd ::= SHOW TABLE DISTRIBUTED full_table_name */
- { 315, -2 }, /* (231) cmd ::= SHOW CONSUMERS */
- { 315, -2 }, /* (232) cmd ::= SHOW SUBSCRIPTIONS */
- { 315, -5 }, /* (233) cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */
- { 315, -3 }, /* (234) cmd ::= SHOW VNODES NK_INTEGER */
- { 315, -3 }, /* (235) cmd ::= SHOW VNODES NK_STRING */
- { 364, 0 }, /* (236) db_name_cond_opt ::= */
- { 364, -2 }, /* (237) db_name_cond_opt ::= db_name NK_DOT */
- { 365, 0 }, /* (238) like_pattern_opt ::= */
- { 365, -2 }, /* (239) like_pattern_opt ::= LIKE NK_STRING */
- { 366, -1 }, /* (240) table_name_cond ::= table_name */
- { 367, 0 }, /* (241) from_db_opt ::= */
- { 367, -2 }, /* (242) from_db_opt ::= FROM db_name */
- { 315, -8 }, /* (243) cmd ::= CREATE SMA INDEX not_exists_opt full_table_name ON full_table_name index_options */
- { 315, -4 }, /* (244) cmd ::= DROP INDEX exists_opt full_table_name */
- { 368, -10 }, /* (245) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */
- { 368, -12 }, /* (246) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt sma_stream_opt */
- { 369, -1 }, /* (247) func_list ::= func */
- { 369, -3 }, /* (248) func_list ::= func_list NK_COMMA func */
- { 372, -4 }, /* (249) func ::= function_name NK_LP expression_list NK_RP */
- { 371, 0 }, /* (250) sma_stream_opt ::= */
- { 371, -3 }, /* (251) sma_stream_opt ::= stream_options WATERMARK duration_literal */
- { 371, -3 }, /* (252) sma_stream_opt ::= stream_options MAX_DELAY duration_literal */
- { 315, -6 }, /* (253) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */
- { 315, -7 }, /* (254) cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name */
- { 315, -9 }, /* (255) cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS DATABASE db_name */
- { 315, -7 }, /* (256) cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name */
- { 315, -9 }, /* (257) cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS STABLE full_table_name */
- { 315, -4 }, /* (258) cmd ::= DROP TOPIC exists_opt topic_name */
- { 315, -7 }, /* (259) cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */
- { 315, -2 }, /* (260) cmd ::= DESC full_table_name */
- { 315, -2 }, /* (261) cmd ::= DESCRIBE full_table_name */
- { 315, -3 }, /* (262) cmd ::= RESET QUERY CACHE */
- { 315, -4 }, /* (263) cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */
- { 377, 0 }, /* (264) analyze_opt ::= */
- { 377, -1 }, /* (265) analyze_opt ::= ANALYZE */
- { 378, 0 }, /* (266) explain_options ::= */
- { 378, -3 }, /* (267) explain_options ::= explain_options VERBOSE NK_BOOL */
- { 378, -3 }, /* (268) explain_options ::= explain_options RATIO NK_FLOAT */
- { 315, -10 }, /* (269) cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt */
- { 315, -4 }, /* (270) cmd ::= DROP FUNCTION exists_opt function_name */
- { 379, 0 }, /* (271) agg_func_opt ::= */
- { 379, -1 }, /* (272) agg_func_opt ::= AGGREGATE */
- { 380, 0 }, /* (273) bufsize_opt ::= */
- { 380, -2 }, /* (274) bufsize_opt ::= BUFSIZE NK_INTEGER */
- { 315, -11 }, /* (275) cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name tags_def_opt subtable_opt AS query_or_subquery */
- { 315, -4 }, /* (276) cmd ::= DROP STREAM exists_opt stream_name */
- { 373, 0 }, /* (277) stream_options ::= */
- { 373, -3 }, /* (278) stream_options ::= stream_options TRIGGER AT_ONCE */
- { 373, -3 }, /* (279) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */
- { 373, -4 }, /* (280) stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */
- { 373, -3 }, /* (281) stream_options ::= stream_options WATERMARK duration_literal */
- { 373, -4 }, /* (282) stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */
- { 382, 0 }, /* (283) subtable_opt ::= */
- { 382, -4 }, /* (284) subtable_opt ::= SUBTABLE NK_LP expression NK_RP */
- { 315, -3 }, /* (285) cmd ::= KILL CONNECTION NK_INTEGER */
- { 315, -3 }, /* (286) cmd ::= KILL QUERY NK_STRING */
- { 315, -3 }, /* (287) cmd ::= KILL TRANSACTION NK_INTEGER */
- { 315, -2 }, /* (288) cmd ::= BALANCE VGROUP */
- { 315, -4 }, /* (289) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */
- { 315, -4 }, /* (290) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */
- { 315, -3 }, /* (291) cmd ::= SPLIT VGROUP NK_INTEGER */
- { 384, -2 }, /* (292) dnode_list ::= DNODE NK_INTEGER */
- { 384, -3 }, /* (293) dnode_list ::= dnode_list DNODE NK_INTEGER */
- { 315, -4 }, /* (294) cmd ::= DELETE FROM full_table_name where_clause_opt */
- { 315, -1 }, /* (295) cmd ::= query_or_subquery */
- { 315, -7 }, /* (296) cmd ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */
- { 315, -4 }, /* (297) cmd ::= INSERT INTO full_table_name query_or_subquery */
- { 318, -1 }, /* (298) literal ::= NK_INTEGER */
- { 318, -1 }, /* (299) literal ::= NK_FLOAT */
- { 318, -1 }, /* (300) literal ::= NK_STRING */
- { 318, -1 }, /* (301) literal ::= NK_BOOL */
- { 318, -2 }, /* (302) literal ::= TIMESTAMP NK_STRING */
- { 318, -1 }, /* (303) literal ::= duration_literal */
- { 318, -1 }, /* (304) literal ::= NULL */
- { 318, -1 }, /* (305) literal ::= NK_QUESTION */
- { 360, -1 }, /* (306) duration_literal ::= NK_VARIABLE */
- { 386, -1 }, /* (307) signed ::= NK_INTEGER */
- { 386, -2 }, /* (308) signed ::= NK_PLUS NK_INTEGER */
- { 386, -2 }, /* (309) signed ::= NK_MINUS NK_INTEGER */
- { 386, -1 }, /* (310) signed ::= NK_FLOAT */
- { 386, -2 }, /* (311) signed ::= NK_PLUS NK_FLOAT */
- { 386, -2 }, /* (312) signed ::= NK_MINUS NK_FLOAT */
- { 349, -1 }, /* (313) signed_literal ::= signed */
- { 349, -1 }, /* (314) signed_literal ::= NK_STRING */
- { 349, -1 }, /* (315) signed_literal ::= NK_BOOL */
- { 349, -2 }, /* (316) signed_literal ::= TIMESTAMP NK_STRING */
- { 349, -1 }, /* (317) signed_literal ::= duration_literal */
- { 349, -1 }, /* (318) signed_literal ::= NULL */
- { 349, -1 }, /* (319) signed_literal ::= literal_func */
- { 349, -1 }, /* (320) signed_literal ::= NK_QUESTION */
- { 388, -1 }, /* (321) literal_list ::= signed_literal */
- { 388, -3 }, /* (322) literal_list ::= literal_list NK_COMMA signed_literal */
- { 326, -1 }, /* (323) db_name ::= NK_ID */
- { 355, -1 }, /* (324) table_name ::= NK_ID */
- { 347, -1 }, /* (325) column_name ::= NK_ID */
- { 362, -1 }, /* (326) function_name ::= NK_ID */
- { 389, -1 }, /* (327) table_alias ::= NK_ID */
- { 390, -1 }, /* (328) column_alias ::= NK_ID */
- { 320, -1 }, /* (329) user_name ::= NK_ID */
- { 374, -1 }, /* (330) topic_name ::= NK_ID */
- { 381, -1 }, /* (331) stream_name ::= NK_ID */
- { 376, -1 }, /* (332) cgroup_name ::= NK_ID */
- { 391, -1 }, /* (333) expr_or_subquery ::= expression */
- { 391, -1 }, /* (334) expr_or_subquery ::= subquery */
- { 383, -1 }, /* (335) expression ::= literal */
- { 383, -1 }, /* (336) expression ::= pseudo_column */
- { 383, -1 }, /* (337) expression ::= column_reference */
- { 383, -1 }, /* (338) expression ::= function_expression */
- { 383, -1 }, /* (339) expression ::= case_when_expression */
- { 383, -3 }, /* (340) expression ::= NK_LP expression NK_RP */
- { 383, -2 }, /* (341) expression ::= NK_PLUS expr_or_subquery */
- { 383, -2 }, /* (342) expression ::= NK_MINUS expr_or_subquery */
- { 383, -3 }, /* (343) expression ::= expr_or_subquery NK_PLUS expr_or_subquery */
- { 383, -3 }, /* (344) expression ::= expr_or_subquery NK_MINUS expr_or_subquery */
- { 383, -3 }, /* (345) expression ::= expr_or_subquery NK_STAR expr_or_subquery */
- { 383, -3 }, /* (346) expression ::= expr_or_subquery NK_SLASH expr_or_subquery */
- { 383, -3 }, /* (347) expression ::= expr_or_subquery NK_REM expr_or_subquery */
- { 383, -3 }, /* (348) expression ::= column_reference NK_ARROW NK_STRING */
- { 383, -3 }, /* (349) expression ::= expr_or_subquery NK_BITAND expr_or_subquery */
- { 383, -3 }, /* (350) expression ::= expr_or_subquery NK_BITOR expr_or_subquery */
- { 352, -1 }, /* (351) expression_list ::= expr_or_subquery */
- { 352, -3 }, /* (352) expression_list ::= expression_list NK_COMMA expr_or_subquery */
- { 394, -1 }, /* (353) column_reference ::= column_name */
- { 394, -3 }, /* (354) column_reference ::= table_name NK_DOT column_name */
- { 393, -1 }, /* (355) pseudo_column ::= ROWTS */
- { 393, -1 }, /* (356) pseudo_column ::= TBNAME */
- { 393, -3 }, /* (357) pseudo_column ::= table_name NK_DOT TBNAME */
- { 393, -1 }, /* (358) pseudo_column ::= QSTART */
- { 393, -1 }, /* (359) pseudo_column ::= QEND */
- { 393, -1 }, /* (360) pseudo_column ::= QDURATION */
- { 393, -1 }, /* (361) pseudo_column ::= WSTART */
- { 393, -1 }, /* (362) pseudo_column ::= WEND */
- { 393, -1 }, /* (363) pseudo_column ::= WDURATION */
- { 395, -4 }, /* (364) function_expression ::= function_name NK_LP expression_list NK_RP */
- { 395, -4 }, /* (365) function_expression ::= star_func NK_LP star_func_para_list NK_RP */
- { 395, -6 }, /* (366) function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */
- { 395, -1 }, /* (367) function_expression ::= literal_func */
- { 387, -3 }, /* (368) literal_func ::= noarg_func NK_LP NK_RP */
- { 387, -1 }, /* (369) literal_func ::= NOW */
- { 399, -1 }, /* (370) noarg_func ::= NOW */
- { 399, -1 }, /* (371) noarg_func ::= TODAY */
- { 399, -1 }, /* (372) noarg_func ::= TIMEZONE */
- { 399, -1 }, /* (373) noarg_func ::= DATABASE */
- { 399, -1 }, /* (374) noarg_func ::= CLIENT_VERSION */
- { 399, -1 }, /* (375) noarg_func ::= SERVER_VERSION */
- { 399, -1 }, /* (376) noarg_func ::= SERVER_STATUS */
- { 399, -1 }, /* (377) noarg_func ::= CURRENT_USER */
- { 399, -1 }, /* (378) noarg_func ::= USER */
- { 397, -1 }, /* (379) star_func ::= COUNT */
- { 397, -1 }, /* (380) star_func ::= FIRST */
- { 397, -1 }, /* (381) star_func ::= LAST */
- { 397, -1 }, /* (382) star_func ::= LAST_ROW */
- { 398, -1 }, /* (383) star_func_para_list ::= NK_STAR */
- { 398, -1 }, /* (384) star_func_para_list ::= other_para_list */
- { 400, -1 }, /* (385) other_para_list ::= star_func_para */
- { 400, -3 }, /* (386) other_para_list ::= other_para_list NK_COMMA star_func_para */
- { 401, -1 }, /* (387) star_func_para ::= expr_or_subquery */
- { 401, -3 }, /* (388) star_func_para ::= table_name NK_DOT NK_STAR */
- { 396, -4 }, /* (389) case_when_expression ::= CASE when_then_list case_when_else_opt END */
- { 396, -5 }, /* (390) case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */
- { 402, -1 }, /* (391) when_then_list ::= when_then_expr */
- { 402, -2 }, /* (392) when_then_list ::= when_then_list when_then_expr */
- { 405, -4 }, /* (393) when_then_expr ::= WHEN common_expression THEN common_expression */
- { 403, 0 }, /* (394) case_when_else_opt ::= */
- { 403, -2 }, /* (395) case_when_else_opt ::= ELSE common_expression */
- { 406, -3 }, /* (396) predicate ::= expr_or_subquery compare_op expr_or_subquery */
- { 406, -5 }, /* (397) predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */
- { 406, -6 }, /* (398) predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */
- { 406, -3 }, /* (399) predicate ::= expr_or_subquery IS NULL */
- { 406, -4 }, /* (400) predicate ::= expr_or_subquery IS NOT NULL */
- { 406, -3 }, /* (401) predicate ::= expr_or_subquery in_op in_predicate_value */
- { 407, -1 }, /* (402) compare_op ::= NK_LT */
- { 407, -1 }, /* (403) compare_op ::= NK_GT */
- { 407, -1 }, /* (404) compare_op ::= NK_LE */
- { 407, -1 }, /* (405) compare_op ::= NK_GE */
- { 407, -1 }, /* (406) compare_op ::= NK_NE */
- { 407, -1 }, /* (407) compare_op ::= NK_EQ */
- { 407, -1 }, /* (408) compare_op ::= LIKE */
- { 407, -2 }, /* (409) compare_op ::= NOT LIKE */
- { 407, -1 }, /* (410) compare_op ::= MATCH */
- { 407, -1 }, /* (411) compare_op ::= NMATCH */
- { 407, -1 }, /* (412) compare_op ::= CONTAINS */
- { 408, -1 }, /* (413) in_op ::= IN */
- { 408, -2 }, /* (414) in_op ::= NOT IN */
- { 409, -3 }, /* (415) in_predicate_value ::= NK_LP literal_list NK_RP */
- { 410, -1 }, /* (416) boolean_value_expression ::= boolean_primary */
- { 410, -2 }, /* (417) boolean_value_expression ::= NOT boolean_primary */
- { 410, -3 }, /* (418) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */
- { 410, -3 }, /* (419) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */
- { 411, -1 }, /* (420) boolean_primary ::= predicate */
- { 411, -3 }, /* (421) boolean_primary ::= NK_LP boolean_value_expression NK_RP */
- { 404, -1 }, /* (422) common_expression ::= expr_or_subquery */
- { 404, -1 }, /* (423) common_expression ::= boolean_value_expression */
- { 412, 0 }, /* (424) from_clause_opt ::= */
- { 412, -2 }, /* (425) from_clause_opt ::= FROM table_reference_list */
- { 413, -1 }, /* (426) table_reference_list ::= table_reference */
- { 413, -3 }, /* (427) table_reference_list ::= table_reference_list NK_COMMA table_reference */
- { 414, -1 }, /* (428) table_reference ::= table_primary */
- { 414, -1 }, /* (429) table_reference ::= joined_table */
- { 415, -2 }, /* (430) table_primary ::= table_name alias_opt */
- { 415, -4 }, /* (431) table_primary ::= db_name NK_DOT table_name alias_opt */
- { 415, -2 }, /* (432) table_primary ::= subquery alias_opt */
- { 415, -1 }, /* (433) table_primary ::= parenthesized_joined_table */
- { 417, 0 }, /* (434) alias_opt ::= */
- { 417, -1 }, /* (435) alias_opt ::= table_alias */
- { 417, -2 }, /* (436) alias_opt ::= AS table_alias */
- { 418, -3 }, /* (437) parenthesized_joined_table ::= NK_LP joined_table NK_RP */
- { 418, -3 }, /* (438) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */
- { 416, -6 }, /* (439) joined_table ::= table_reference join_type JOIN table_reference ON search_condition */
- { 419, 0 }, /* (440) join_type ::= */
- { 419, -1 }, /* (441) join_type ::= INNER */
- { 421, -12 }, /* (442) query_specification ::= SELECT set_quantifier_opt select_list from_clause_opt where_clause_opt partition_by_clause_opt range_opt every_opt fill_opt twindow_clause_opt group_by_clause_opt having_clause_opt */
- { 422, 0 }, /* (443) set_quantifier_opt ::= */
- { 422, -1 }, /* (444) set_quantifier_opt ::= DISTINCT */
- { 422, -1 }, /* (445) set_quantifier_opt ::= ALL */
- { 423, -1 }, /* (446) select_list ::= select_item */
- { 423, -3 }, /* (447) select_list ::= select_list NK_COMMA select_item */
- { 431, -1 }, /* (448) select_item ::= NK_STAR */
- { 431, -1 }, /* (449) select_item ::= common_expression */
- { 431, -2 }, /* (450) select_item ::= common_expression column_alias */
- { 431, -3 }, /* (451) select_item ::= common_expression AS column_alias */
- { 431, -3 }, /* (452) select_item ::= table_name NK_DOT NK_STAR */
- { 385, 0 }, /* (453) where_clause_opt ::= */
- { 385, -2 }, /* (454) where_clause_opt ::= WHERE search_condition */
- { 424, 0 }, /* (455) partition_by_clause_opt ::= */
- { 424, -3 }, /* (456) partition_by_clause_opt ::= PARTITION BY partition_list */
- { 432, -1 }, /* (457) partition_list ::= partition_item */
- { 432, -3 }, /* (458) partition_list ::= partition_list NK_COMMA partition_item */
- { 433, -1 }, /* (459) partition_item ::= expr_or_subquery */
- { 433, -2 }, /* (460) partition_item ::= expr_or_subquery column_alias */
- { 433, -3 }, /* (461) partition_item ::= expr_or_subquery AS column_alias */
- { 428, 0 }, /* (462) twindow_clause_opt ::= */
- { 428, -6 }, /* (463) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */
- { 428, -4 }, /* (464) twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */
- { 428, -6 }, /* (465) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */
- { 428, -8 }, /* (466) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */
- { 370, 0 }, /* (467) sliding_opt ::= */
- { 370, -4 }, /* (468) sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */
- { 427, 0 }, /* (469) fill_opt ::= */
- { 427, -4 }, /* (470) fill_opt ::= FILL NK_LP fill_mode NK_RP */
- { 427, -6 }, /* (471) fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */
- { 434, -1 }, /* (472) fill_mode ::= NONE */
- { 434, -1 }, /* (473) fill_mode ::= PREV */
- { 434, -1 }, /* (474) fill_mode ::= NULL */
- { 434, -1 }, /* (475) fill_mode ::= LINEAR */
- { 434, -1 }, /* (476) fill_mode ::= NEXT */
- { 429, 0 }, /* (477) group_by_clause_opt ::= */
- { 429, -3 }, /* (478) group_by_clause_opt ::= GROUP BY group_by_list */
- { 435, -1 }, /* (479) group_by_list ::= expr_or_subquery */
- { 435, -3 }, /* (480) group_by_list ::= group_by_list NK_COMMA expr_or_subquery */
- { 430, 0 }, /* (481) having_clause_opt ::= */
- { 430, -2 }, /* (482) having_clause_opt ::= HAVING search_condition */
- { 425, 0 }, /* (483) range_opt ::= */
- { 425, -6 }, /* (484) range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */
- { 426, 0 }, /* (485) every_opt ::= */
- { 426, -4 }, /* (486) every_opt ::= EVERY NK_LP duration_literal NK_RP */
- { 436, -4 }, /* (487) query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */
- { 437, -1 }, /* (488) query_simple ::= query_specification */
- { 437, -1 }, /* (489) query_simple ::= union_query_expression */
- { 441, -4 }, /* (490) union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */
- { 441, -3 }, /* (491) union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */
- { 442, -1 }, /* (492) query_simple_or_subquery ::= query_simple */
- { 442, -1 }, /* (493) query_simple_or_subquery ::= subquery */
- { 375, -1 }, /* (494) query_or_subquery ::= query_expression */
- { 375, -1 }, /* (495) query_or_subquery ::= subquery */
- { 438, 0 }, /* (496) order_by_clause_opt ::= */
- { 438, -3 }, /* (497) order_by_clause_opt ::= ORDER BY sort_specification_list */
- { 439, 0 }, /* (498) slimit_clause_opt ::= */
- { 439, -2 }, /* (499) slimit_clause_opt ::= SLIMIT NK_INTEGER */
- { 439, -4 }, /* (500) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */
- { 439, -4 }, /* (501) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */
- { 440, 0 }, /* (502) limit_clause_opt ::= */
- { 440, -2 }, /* (503) limit_clause_opt ::= LIMIT NK_INTEGER */
- { 440, -4 }, /* (504) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */
- { 440, -4 }, /* (505) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */
- { 392, -3 }, /* (506) subquery ::= NK_LP query_expression NK_RP */
- { 392, -3 }, /* (507) subquery ::= NK_LP subquery NK_RP */
- { 420, -1 }, /* (508) search_condition ::= common_expression */
- { 443, -1 }, /* (509) sort_specification_list ::= sort_specification */
- { 443, -3 }, /* (510) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */
- { 444, -3 }, /* (511) sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */
- { 445, 0 }, /* (512) ordering_specification_opt ::= */
- { 445, -1 }, /* (513) ordering_specification_opt ::= ASC */
- { 445, -1 }, /* (514) ordering_specification_opt ::= DESC */
- { 446, 0 }, /* (515) null_ordering_opt ::= */
- { 446, -2 }, /* (516) null_ordering_opt ::= NULLS FIRST */
- { 446, -2 }, /* (517) null_ordering_opt ::= NULLS LAST */
+ { 316, -6 }, /* (0) cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */
+ { 316, -4 }, /* (1) cmd ::= ALTER ACCOUNT NK_ID alter_account_options */
+ { 317, 0 }, /* (2) account_options ::= */
+ { 317, -3 }, /* (3) account_options ::= account_options PPS literal */
+ { 317, -3 }, /* (4) account_options ::= account_options TSERIES literal */
+ { 317, -3 }, /* (5) account_options ::= account_options STORAGE literal */
+ { 317, -3 }, /* (6) account_options ::= account_options STREAMS literal */
+ { 317, -3 }, /* (7) account_options ::= account_options QTIME literal */
+ { 317, -3 }, /* (8) account_options ::= account_options DBS literal */
+ { 317, -3 }, /* (9) account_options ::= account_options USERS literal */
+ { 317, -3 }, /* (10) account_options ::= account_options CONNS literal */
+ { 317, -3 }, /* (11) account_options ::= account_options STATE literal */
+ { 318, -1 }, /* (12) alter_account_options ::= alter_account_option */
+ { 318, -2 }, /* (13) alter_account_options ::= alter_account_options alter_account_option */
+ { 320, -2 }, /* (14) alter_account_option ::= PASS literal */
+ { 320, -2 }, /* (15) alter_account_option ::= PPS literal */
+ { 320, -2 }, /* (16) alter_account_option ::= TSERIES literal */
+ { 320, -2 }, /* (17) alter_account_option ::= STORAGE literal */
+ { 320, -2 }, /* (18) alter_account_option ::= STREAMS literal */
+ { 320, -2 }, /* (19) alter_account_option ::= QTIME literal */
+ { 320, -2 }, /* (20) alter_account_option ::= DBS literal */
+ { 320, -2 }, /* (21) alter_account_option ::= USERS literal */
+ { 320, -2 }, /* (22) alter_account_option ::= CONNS literal */
+ { 320, -2 }, /* (23) alter_account_option ::= STATE literal */
+ { 316, -6 }, /* (24) cmd ::= CREATE USER user_name PASS NK_STRING sysinfo_opt */
+ { 316, -5 }, /* (25) cmd ::= ALTER USER user_name PASS NK_STRING */
+ { 316, -5 }, /* (26) cmd ::= ALTER USER user_name ENABLE NK_INTEGER */
+ { 316, -5 }, /* (27) cmd ::= ALTER USER user_name SYSINFO NK_INTEGER */
+ { 316, -3 }, /* (28) cmd ::= DROP USER user_name */
+ { 322, 0 }, /* (29) sysinfo_opt ::= */
+ { 322, -2 }, /* (30) sysinfo_opt ::= SYSINFO NK_INTEGER */
+ { 316, -6 }, /* (31) cmd ::= GRANT privileges ON priv_level TO user_name */
+ { 316, -6 }, /* (32) cmd ::= REVOKE privileges ON priv_level FROM user_name */
+ { 323, -1 }, /* (33) privileges ::= ALL */
+ { 323, -1 }, /* (34) privileges ::= priv_type_list */
+ { 325, -1 }, /* (35) priv_type_list ::= priv_type */
+ { 325, -3 }, /* (36) priv_type_list ::= priv_type_list NK_COMMA priv_type */
+ { 326, -1 }, /* (37) priv_type ::= READ */
+ { 326, -1 }, /* (38) priv_type ::= WRITE */
+ { 324, -3 }, /* (39) priv_level ::= NK_STAR NK_DOT NK_STAR */
+ { 324, -3 }, /* (40) priv_level ::= db_name NK_DOT NK_STAR */
+ { 316, -3 }, /* (41) cmd ::= CREATE DNODE dnode_endpoint */
+ { 316, -5 }, /* (42) cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */
+ { 316, -3 }, /* (43) cmd ::= DROP DNODE NK_INTEGER */
+ { 316, -3 }, /* (44) cmd ::= DROP DNODE dnode_endpoint */
+ { 316, -4 }, /* (45) cmd ::= ALTER DNODE NK_INTEGER NK_STRING */
+ { 316, -5 }, /* (46) cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */
+ { 316, -4 }, /* (47) cmd ::= ALTER ALL DNODES NK_STRING */
+ { 316, -5 }, /* (48) cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */
+ { 328, -1 }, /* (49) dnode_endpoint ::= NK_STRING */
+ { 328, -1 }, /* (50) dnode_endpoint ::= NK_ID */
+ { 328, -1 }, /* (51) dnode_endpoint ::= NK_IPTOKEN */
+ { 316, -3 }, /* (52) cmd ::= ALTER LOCAL NK_STRING */
+ { 316, -4 }, /* (53) cmd ::= ALTER LOCAL NK_STRING NK_STRING */
+ { 316, -5 }, /* (54) cmd ::= CREATE QNODE ON DNODE NK_INTEGER */
+ { 316, -5 }, /* (55) cmd ::= DROP QNODE ON DNODE NK_INTEGER */
+ { 316, -5 }, /* (56) cmd ::= CREATE BNODE ON DNODE NK_INTEGER */
+ { 316, -5 }, /* (57) cmd ::= DROP BNODE ON DNODE NK_INTEGER */
+ { 316, -5 }, /* (58) cmd ::= CREATE SNODE ON DNODE NK_INTEGER */
+ { 316, -5 }, /* (59) cmd ::= DROP SNODE ON DNODE NK_INTEGER */
+ { 316, -5 }, /* (60) cmd ::= CREATE MNODE ON DNODE NK_INTEGER */
+ { 316, -5 }, /* (61) cmd ::= DROP MNODE ON DNODE NK_INTEGER */
+ { 316, -5 }, /* (62) cmd ::= CREATE DATABASE not_exists_opt db_name db_options */
+ { 316, -4 }, /* (63) cmd ::= DROP DATABASE exists_opt db_name */
+ { 316, -2 }, /* (64) cmd ::= USE db_name */
+ { 316, -4 }, /* (65) cmd ::= ALTER DATABASE db_name alter_db_options */
+ { 316, -3 }, /* (66) cmd ::= FLUSH DATABASE db_name */
+ { 316, -4 }, /* (67) cmd ::= TRIM DATABASE db_name speed_opt */
+ { 329, -3 }, /* (68) not_exists_opt ::= IF NOT EXISTS */
+ { 329, 0 }, /* (69) not_exists_opt ::= */
+ { 331, -2 }, /* (70) exists_opt ::= IF EXISTS */
+ { 331, 0 }, /* (71) exists_opt ::= */
+ { 330, 0 }, /* (72) db_options ::= */
+ { 330, -3 }, /* (73) db_options ::= db_options BUFFER NK_INTEGER */
+ { 330, -3 }, /* (74) db_options ::= db_options CACHEMODEL NK_STRING */
+ { 330, -3 }, /* (75) db_options ::= db_options CACHESIZE NK_INTEGER */
+ { 330, -3 }, /* (76) db_options ::= db_options COMP NK_INTEGER */
+ { 330, -3 }, /* (77) db_options ::= db_options DURATION NK_INTEGER */
+ { 330, -3 }, /* (78) db_options ::= db_options DURATION NK_VARIABLE */
+ { 330, -3 }, /* (79) db_options ::= db_options MAXROWS NK_INTEGER */
+ { 330, -3 }, /* (80) db_options ::= db_options MINROWS NK_INTEGER */
+ { 330, -3 }, /* (81) db_options ::= db_options KEEP integer_list */
+ { 330, -3 }, /* (82) db_options ::= db_options KEEP variable_list */
+ { 330, -3 }, /* (83) db_options ::= db_options PAGES NK_INTEGER */
+ { 330, -3 }, /* (84) db_options ::= db_options PAGESIZE NK_INTEGER */
+ { 330, -3 }, /* (85) db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */
+ { 330, -3 }, /* (86) db_options ::= db_options PRECISION NK_STRING */
+ { 330, -3 }, /* (87) db_options ::= db_options REPLICA NK_INTEGER */
+ { 330, -3 }, /* (88) db_options ::= db_options STRICT NK_STRING */
+ { 330, -3 }, /* (89) db_options ::= db_options VGROUPS NK_INTEGER */
+ { 330, -3 }, /* (90) db_options ::= db_options SINGLE_STABLE NK_INTEGER */
+ { 330, -3 }, /* (91) db_options ::= db_options RETENTIONS retention_list */
+ { 330, -3 }, /* (92) db_options ::= db_options SCHEMALESS NK_INTEGER */
+ { 330, -3 }, /* (93) db_options ::= db_options WAL_LEVEL NK_INTEGER */
+ { 330, -3 }, /* (94) db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */
+ { 330, -3 }, /* (95) db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */
+ { 330, -4 }, /* (96) db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */
+ { 330, -3 }, /* (97) db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */
+ { 330, -4 }, /* (98) db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */
+ { 330, -3 }, /* (99) db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */
+ { 330, -3 }, /* (100) db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */
+ { 330, -3 }, /* (101) db_options ::= db_options STT_TRIGGER NK_INTEGER */
+ { 330, -3 }, /* (102) db_options ::= db_options TABLE_PREFIX NK_INTEGER */
+ { 330, -3 }, /* (103) db_options ::= db_options TABLE_SUFFIX NK_INTEGER */
+ { 332, -1 }, /* (104) alter_db_options ::= alter_db_option */
+ { 332, -2 }, /* (105) alter_db_options ::= alter_db_options alter_db_option */
+ { 337, -2 }, /* (106) alter_db_option ::= CACHEMODEL NK_STRING */
+ { 337, -2 }, /* (107) alter_db_option ::= CACHESIZE NK_INTEGER */
+ { 337, -2 }, /* (108) alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */
+ { 337, -2 }, /* (109) alter_db_option ::= KEEP integer_list */
+ { 337, -2 }, /* (110) alter_db_option ::= KEEP variable_list */
+ { 337, -2 }, /* (111) alter_db_option ::= WAL_LEVEL NK_INTEGER */
+ { 337, -2 }, /* (112) alter_db_option ::= STT_TRIGGER NK_INTEGER */
+ { 334, -1 }, /* (113) integer_list ::= NK_INTEGER */
+ { 334, -3 }, /* (114) integer_list ::= integer_list NK_COMMA NK_INTEGER */
+ { 335, -1 }, /* (115) variable_list ::= NK_VARIABLE */
+ { 335, -3 }, /* (116) variable_list ::= variable_list NK_COMMA NK_VARIABLE */
+ { 336, -1 }, /* (117) retention_list ::= retention */
+ { 336, -3 }, /* (118) retention_list ::= retention_list NK_COMMA retention */
+ { 338, -3 }, /* (119) retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */
+ { 333, 0 }, /* (120) speed_opt ::= */
+ { 333, -2 }, /* (121) speed_opt ::= MAX_SPEED NK_INTEGER */
+ { 316, -9 }, /* (122) cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */
+ { 316, -3 }, /* (123) cmd ::= CREATE TABLE multi_create_clause */
+ { 316, -9 }, /* (124) cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */
+ { 316, -3 }, /* (125) cmd ::= DROP TABLE multi_drop_clause */
+ { 316, -4 }, /* (126) cmd ::= DROP STABLE exists_opt full_table_name */
+ { 316, -3 }, /* (127) cmd ::= ALTER TABLE alter_table_clause */
+ { 316, -3 }, /* (128) cmd ::= ALTER STABLE alter_table_clause */
+ { 346, -2 }, /* (129) alter_table_clause ::= full_table_name alter_table_options */
+ { 346, -5 }, /* (130) alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */
+ { 346, -4 }, /* (131) alter_table_clause ::= full_table_name DROP COLUMN column_name */
+ { 346, -5 }, /* (132) alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */
+ { 346, -5 }, /* (133) alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */
+ { 346, -5 }, /* (134) alter_table_clause ::= full_table_name ADD TAG column_name type_name */
+ { 346, -4 }, /* (135) alter_table_clause ::= full_table_name DROP TAG column_name */
+ { 346, -5 }, /* (136) alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */
+ { 346, -5 }, /* (137) alter_table_clause ::= full_table_name RENAME TAG column_name column_name */
+ { 346, -6 }, /* (138) alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */
+ { 343, -1 }, /* (139) multi_create_clause ::= create_subtable_clause */
+ { 343, -2 }, /* (140) multi_create_clause ::= multi_create_clause create_subtable_clause */
+ { 351, -10 }, /* (141) create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_cols_opt TAGS NK_LP expression_list NK_RP table_options */
+ { 345, -1 }, /* (142) multi_drop_clause ::= drop_table_clause */
+ { 345, -2 }, /* (143) multi_drop_clause ::= multi_drop_clause drop_table_clause */
+ { 354, -2 }, /* (144) drop_table_clause ::= exists_opt full_table_name */
+ { 352, 0 }, /* (145) specific_cols_opt ::= */
+ { 352, -3 }, /* (146) specific_cols_opt ::= NK_LP col_name_list NK_RP */
+ { 339, -1 }, /* (147) full_table_name ::= table_name */
+ { 339, -3 }, /* (148) full_table_name ::= db_name NK_DOT table_name */
+ { 340, -1 }, /* (149) column_def_list ::= column_def */
+ { 340, -3 }, /* (150) column_def_list ::= column_def_list NK_COMMA column_def */
+ { 357, -2 }, /* (151) column_def ::= column_name type_name */
+ { 357, -4 }, /* (152) column_def ::= column_name type_name COMMENT NK_STRING */
+ { 349, -1 }, /* (153) type_name ::= BOOL */
+ { 349, -1 }, /* (154) type_name ::= TINYINT */
+ { 349, -1 }, /* (155) type_name ::= SMALLINT */
+ { 349, -1 }, /* (156) type_name ::= INT */
+ { 349, -1 }, /* (157) type_name ::= INTEGER */
+ { 349, -1 }, /* (158) type_name ::= BIGINT */
+ { 349, -1 }, /* (159) type_name ::= FLOAT */
+ { 349, -1 }, /* (160) type_name ::= DOUBLE */
+ { 349, -4 }, /* (161) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */
+ { 349, -1 }, /* (162) type_name ::= TIMESTAMP */
+ { 349, -4 }, /* (163) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */
+ { 349, -2 }, /* (164) type_name ::= TINYINT UNSIGNED */
+ { 349, -2 }, /* (165) type_name ::= SMALLINT UNSIGNED */
+ { 349, -2 }, /* (166) type_name ::= INT UNSIGNED */
+ { 349, -2 }, /* (167) type_name ::= BIGINT UNSIGNED */
+ { 349, -1 }, /* (168) type_name ::= JSON */
+ { 349, -4 }, /* (169) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */
+ { 349, -1 }, /* (170) type_name ::= MEDIUMBLOB */
+ { 349, -1 }, /* (171) type_name ::= BLOB */
+ { 349, -4 }, /* (172) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */
+ { 349, -1 }, /* (173) type_name ::= DECIMAL */
+ { 349, -4 }, /* (174) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */
+ { 349, -6 }, /* (175) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */
+ { 341, 0 }, /* (176) tags_def_opt ::= */
+ { 341, -1 }, /* (177) tags_def_opt ::= tags_def */
+ { 344, -4 }, /* (178) tags_def ::= TAGS NK_LP column_def_list NK_RP */
+ { 342, 0 }, /* (179) table_options ::= */
+ { 342, -3 }, /* (180) table_options ::= table_options COMMENT NK_STRING */
+ { 342, -3 }, /* (181) table_options ::= table_options MAX_DELAY duration_list */
+ { 342, -3 }, /* (182) table_options ::= table_options WATERMARK duration_list */
+ { 342, -5 }, /* (183) table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */
+ { 342, -3 }, /* (184) table_options ::= table_options TTL NK_INTEGER */
+ { 342, -5 }, /* (185) table_options ::= table_options SMA NK_LP col_name_list NK_RP */
+ { 347, -1 }, /* (186) alter_table_options ::= alter_table_option */
+ { 347, -2 }, /* (187) alter_table_options ::= alter_table_options alter_table_option */
+ { 360, -2 }, /* (188) alter_table_option ::= COMMENT NK_STRING */
+ { 360, -2 }, /* (189) alter_table_option ::= TTL NK_INTEGER */
+ { 358, -1 }, /* (190) duration_list ::= duration_literal */
+ { 358, -3 }, /* (191) duration_list ::= duration_list NK_COMMA duration_literal */
+ { 359, -1 }, /* (192) rollup_func_list ::= rollup_func_name */
+ { 359, -3 }, /* (193) rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */
+ { 362, -1 }, /* (194) rollup_func_name ::= function_name */
+ { 362, -1 }, /* (195) rollup_func_name ::= FIRST */
+ { 362, -1 }, /* (196) rollup_func_name ::= LAST */
+ { 355, -1 }, /* (197) col_name_list ::= col_name */
+ { 355, -3 }, /* (198) col_name_list ::= col_name_list NK_COMMA col_name */
+ { 364, -1 }, /* (199) col_name ::= column_name */
+ { 316, -2 }, /* (200) cmd ::= SHOW DNODES */
+ { 316, -2 }, /* (201) cmd ::= SHOW USERS */
+ { 316, -2 }, /* (202) cmd ::= SHOW DATABASES */
+ { 316, -4 }, /* (203) cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */
+ { 316, -4 }, /* (204) cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */
+ { 316, -3 }, /* (205) cmd ::= SHOW db_name_cond_opt VGROUPS */
+ { 316, -2 }, /* (206) cmd ::= SHOW MNODES */
+ { 316, -2 }, /* (207) cmd ::= SHOW MODULES */
+ { 316, -2 }, /* (208) cmd ::= SHOW QNODES */
+ { 316, -2 }, /* (209) cmd ::= SHOW FUNCTIONS */
+ { 316, -5 }, /* (210) cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */
+ { 316, -2 }, /* (211) cmd ::= SHOW STREAMS */
+ { 316, -2 }, /* (212) cmd ::= SHOW ACCOUNTS */
+ { 316, -2 }, /* (213) cmd ::= SHOW APPS */
+ { 316, -2 }, /* (214) cmd ::= SHOW CONNECTIONS */
+ { 316, -2 }, /* (215) cmd ::= SHOW LICENCES */
+ { 316, -2 }, /* (216) cmd ::= SHOW GRANTS */
+ { 316, -4 }, /* (217) cmd ::= SHOW CREATE DATABASE db_name */
+ { 316, -4 }, /* (218) cmd ::= SHOW CREATE TABLE full_table_name */
+ { 316, -4 }, /* (219) cmd ::= SHOW CREATE STABLE full_table_name */
+ { 316, -2 }, /* (220) cmd ::= SHOW QUERIES */
+ { 316, -2 }, /* (221) cmd ::= SHOW SCORES */
+ { 316, -2 }, /* (222) cmd ::= SHOW TOPICS */
+ { 316, -2 }, /* (223) cmd ::= SHOW VARIABLES */
+ { 316, -3 }, /* (224) cmd ::= SHOW LOCAL VARIABLES */
+ { 316, -4 }, /* (225) cmd ::= SHOW DNODE NK_INTEGER VARIABLES */
+ { 316, -2 }, /* (226) cmd ::= SHOW BNODES */
+ { 316, -2 }, /* (227) cmd ::= SHOW SNODES */
+ { 316, -2 }, /* (228) cmd ::= SHOW CLUSTER */
+ { 316, -2 }, /* (229) cmd ::= SHOW TRANSACTIONS */
+ { 316, -4 }, /* (230) cmd ::= SHOW TABLE DISTRIBUTED full_table_name */
+ { 316, -2 }, /* (231) cmd ::= SHOW CONSUMERS */
+ { 316, -2 }, /* (232) cmd ::= SHOW SUBSCRIPTIONS */
+ { 316, -5 }, /* (233) cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */
+ { 316, -3 }, /* (234) cmd ::= SHOW VNODES NK_INTEGER */
+ { 316, -3 }, /* (235) cmd ::= SHOW VNODES NK_STRING */
+ { 365, 0 }, /* (236) db_name_cond_opt ::= */
+ { 365, -2 }, /* (237) db_name_cond_opt ::= db_name NK_DOT */
+ { 366, 0 }, /* (238) like_pattern_opt ::= */
+ { 366, -2 }, /* (239) like_pattern_opt ::= LIKE NK_STRING */
+ { 367, -1 }, /* (240) table_name_cond ::= table_name */
+ { 368, 0 }, /* (241) from_db_opt ::= */
+ { 368, -2 }, /* (242) from_db_opt ::= FROM db_name */
+ { 316, -8 }, /* (243) cmd ::= CREATE SMA INDEX not_exists_opt full_table_name ON full_table_name index_options */
+ { 316, -4 }, /* (244) cmd ::= DROP INDEX exists_opt full_table_name */
+ { 369, -10 }, /* (245) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */
+ { 369, -12 }, /* (246) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt sma_stream_opt */
+ { 370, -1 }, /* (247) func_list ::= func */
+ { 370, -3 }, /* (248) func_list ::= func_list NK_COMMA func */
+ { 373, -4 }, /* (249) func ::= function_name NK_LP expression_list NK_RP */
+ { 372, 0 }, /* (250) sma_stream_opt ::= */
+ { 372, -3 }, /* (251) sma_stream_opt ::= stream_options WATERMARK duration_literal */
+ { 372, -3 }, /* (252) sma_stream_opt ::= stream_options MAX_DELAY duration_literal */
+ { 316, -6 }, /* (253) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */
+ { 316, -7 }, /* (254) cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name */
+ { 316, -9 }, /* (255) cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS DATABASE db_name */
+ { 316, -7 }, /* (256) cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name */
+ { 316, -9 }, /* (257) cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS STABLE full_table_name */
+ { 316, -4 }, /* (258) cmd ::= DROP TOPIC exists_opt topic_name */
+ { 316, -7 }, /* (259) cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */
+ { 316, -2 }, /* (260) cmd ::= DESC full_table_name */
+ { 316, -2 }, /* (261) cmd ::= DESCRIBE full_table_name */
+ { 316, -3 }, /* (262) cmd ::= RESET QUERY CACHE */
+ { 316, -4 }, /* (263) cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */
+ { 378, 0 }, /* (264) analyze_opt ::= */
+ { 378, -1 }, /* (265) analyze_opt ::= ANALYZE */
+ { 379, 0 }, /* (266) explain_options ::= */
+ { 379, -3 }, /* (267) explain_options ::= explain_options VERBOSE NK_BOOL */
+ { 379, -3 }, /* (268) explain_options ::= explain_options RATIO NK_FLOAT */
+ { 316, -10 }, /* (269) cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt */
+ { 316, -4 }, /* (270) cmd ::= DROP FUNCTION exists_opt function_name */
+ { 380, 0 }, /* (271) agg_func_opt ::= */
+ { 380, -1 }, /* (272) agg_func_opt ::= AGGREGATE */
+ { 381, 0 }, /* (273) bufsize_opt ::= */
+ { 381, -2 }, /* (274) bufsize_opt ::= BUFSIZE NK_INTEGER */
+ { 316, -11 }, /* (275) cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name tags_def_opt subtable_opt AS query_or_subquery */
+ { 316, -4 }, /* (276) cmd ::= DROP STREAM exists_opt stream_name */
+ { 374, 0 }, /* (277) stream_options ::= */
+ { 374, -3 }, /* (278) stream_options ::= stream_options TRIGGER AT_ONCE */
+ { 374, -3 }, /* (279) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */
+ { 374, -4 }, /* (280) stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */
+ { 374, -3 }, /* (281) stream_options ::= stream_options WATERMARK duration_literal */
+ { 374, -4 }, /* (282) stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */
+ { 383, 0 }, /* (283) subtable_opt ::= */
+ { 383, -4 }, /* (284) subtable_opt ::= SUBTABLE NK_LP expression NK_RP */
+ { 316, -3 }, /* (285) cmd ::= KILL CONNECTION NK_INTEGER */
+ { 316, -3 }, /* (286) cmd ::= KILL QUERY NK_STRING */
+ { 316, -3 }, /* (287) cmd ::= KILL TRANSACTION NK_INTEGER */
+ { 316, -2 }, /* (288) cmd ::= BALANCE VGROUP */
+ { 316, -4 }, /* (289) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */
+ { 316, -4 }, /* (290) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */
+ { 316, -3 }, /* (291) cmd ::= SPLIT VGROUP NK_INTEGER */
+ { 385, -2 }, /* (292) dnode_list ::= DNODE NK_INTEGER */
+ { 385, -3 }, /* (293) dnode_list ::= dnode_list DNODE NK_INTEGER */
+ { 316, -4 }, /* (294) cmd ::= DELETE FROM full_table_name where_clause_opt */
+ { 316, -1 }, /* (295) cmd ::= query_or_subquery */
+ { 316, -7 }, /* (296) cmd ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */
+ { 316, -4 }, /* (297) cmd ::= INSERT INTO full_table_name query_or_subquery */
+ { 319, -1 }, /* (298) literal ::= NK_INTEGER */
+ { 319, -1 }, /* (299) literal ::= NK_FLOAT */
+ { 319, -1 }, /* (300) literal ::= NK_STRING */
+ { 319, -1 }, /* (301) literal ::= NK_BOOL */
+ { 319, -2 }, /* (302) literal ::= TIMESTAMP NK_STRING */
+ { 319, -1 }, /* (303) literal ::= duration_literal */
+ { 319, -1 }, /* (304) literal ::= NULL */
+ { 319, -1 }, /* (305) literal ::= NK_QUESTION */
+ { 361, -1 }, /* (306) duration_literal ::= NK_VARIABLE */
+ { 387, -1 }, /* (307) signed ::= NK_INTEGER */
+ { 387, -2 }, /* (308) signed ::= NK_PLUS NK_INTEGER */
+ { 387, -2 }, /* (309) signed ::= NK_MINUS NK_INTEGER */
+ { 387, -1 }, /* (310) signed ::= NK_FLOAT */
+ { 387, -2 }, /* (311) signed ::= NK_PLUS NK_FLOAT */
+ { 387, -2 }, /* (312) signed ::= NK_MINUS NK_FLOAT */
+ { 350, -1 }, /* (313) signed_literal ::= signed */
+ { 350, -1 }, /* (314) signed_literal ::= NK_STRING */
+ { 350, -1 }, /* (315) signed_literal ::= NK_BOOL */
+ { 350, -2 }, /* (316) signed_literal ::= TIMESTAMP NK_STRING */
+ { 350, -1 }, /* (317) signed_literal ::= duration_literal */
+ { 350, -1 }, /* (318) signed_literal ::= NULL */
+ { 350, -1 }, /* (319) signed_literal ::= literal_func */
+ { 350, -1 }, /* (320) signed_literal ::= NK_QUESTION */
+ { 389, -1 }, /* (321) literal_list ::= signed_literal */
+ { 389, -3 }, /* (322) literal_list ::= literal_list NK_COMMA signed_literal */
+ { 327, -1 }, /* (323) db_name ::= NK_ID */
+ { 356, -1 }, /* (324) table_name ::= NK_ID */
+ { 348, -1 }, /* (325) column_name ::= NK_ID */
+ { 363, -1 }, /* (326) function_name ::= NK_ID */
+ { 390, -1 }, /* (327) table_alias ::= NK_ID */
+ { 391, -1 }, /* (328) column_alias ::= NK_ID */
+ { 321, -1 }, /* (329) user_name ::= NK_ID */
+ { 375, -1 }, /* (330) topic_name ::= NK_ID */
+ { 382, -1 }, /* (331) stream_name ::= NK_ID */
+ { 377, -1 }, /* (332) cgroup_name ::= NK_ID */
+ { 392, -1 }, /* (333) expr_or_subquery ::= expression */
+ { 392, -1 }, /* (334) expr_or_subquery ::= subquery */
+ { 384, -1 }, /* (335) expression ::= literal */
+ { 384, -1 }, /* (336) expression ::= pseudo_column */
+ { 384, -1 }, /* (337) expression ::= column_reference */
+ { 384, -1 }, /* (338) expression ::= function_expression */
+ { 384, -1 }, /* (339) expression ::= case_when_expression */
+ { 384, -3 }, /* (340) expression ::= NK_LP expression NK_RP */
+ { 384, -2 }, /* (341) expression ::= NK_PLUS expr_or_subquery */
+ { 384, -2 }, /* (342) expression ::= NK_MINUS expr_or_subquery */
+ { 384, -3 }, /* (343) expression ::= expr_or_subquery NK_PLUS expr_or_subquery */
+ { 384, -3 }, /* (344) expression ::= expr_or_subquery NK_MINUS expr_or_subquery */
+ { 384, -3 }, /* (345) expression ::= expr_or_subquery NK_STAR expr_or_subquery */
+ { 384, -3 }, /* (346) expression ::= expr_or_subquery NK_SLASH expr_or_subquery */
+ { 384, -3 }, /* (347) expression ::= expr_or_subquery NK_REM expr_or_subquery */
+ { 384, -3 }, /* (348) expression ::= column_reference NK_ARROW NK_STRING */
+ { 384, -3 }, /* (349) expression ::= expr_or_subquery NK_BITAND expr_or_subquery */
+ { 384, -3 }, /* (350) expression ::= expr_or_subquery NK_BITOR expr_or_subquery */
+ { 353, -1 }, /* (351) expression_list ::= expr_or_subquery */
+ { 353, -3 }, /* (352) expression_list ::= expression_list NK_COMMA expr_or_subquery */
+ { 395, -1 }, /* (353) column_reference ::= column_name */
+ { 395, -3 }, /* (354) column_reference ::= table_name NK_DOT column_name */
+ { 394, -1 }, /* (355) pseudo_column ::= ROWTS */
+ { 394, -1 }, /* (356) pseudo_column ::= TBNAME */
+ { 394, -3 }, /* (357) pseudo_column ::= table_name NK_DOT TBNAME */
+ { 394, -1 }, /* (358) pseudo_column ::= QSTART */
+ { 394, -1 }, /* (359) pseudo_column ::= QEND */
+ { 394, -1 }, /* (360) pseudo_column ::= QDURATION */
+ { 394, -1 }, /* (361) pseudo_column ::= WSTART */
+ { 394, -1 }, /* (362) pseudo_column ::= WEND */
+ { 394, -1 }, /* (363) pseudo_column ::= WDURATION */
+ { 394, -1 }, /* (364) pseudo_column ::= IROWTS */
+ { 396, -4 }, /* (365) function_expression ::= function_name NK_LP expression_list NK_RP */
+ { 396, -4 }, /* (366) function_expression ::= star_func NK_LP star_func_para_list NK_RP */
+ { 396, -6 }, /* (367) function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */
+ { 396, -1 }, /* (368) function_expression ::= literal_func */
+ { 388, -3 }, /* (369) literal_func ::= noarg_func NK_LP NK_RP */
+ { 388, -1 }, /* (370) literal_func ::= NOW */
+ { 400, -1 }, /* (371) noarg_func ::= NOW */
+ { 400, -1 }, /* (372) noarg_func ::= TODAY */
+ { 400, -1 }, /* (373) noarg_func ::= TIMEZONE */
+ { 400, -1 }, /* (374) noarg_func ::= DATABASE */
+ { 400, -1 }, /* (375) noarg_func ::= CLIENT_VERSION */
+ { 400, -1 }, /* (376) noarg_func ::= SERVER_VERSION */
+ { 400, -1 }, /* (377) noarg_func ::= SERVER_STATUS */
+ { 400, -1 }, /* (378) noarg_func ::= CURRENT_USER */
+ { 400, -1 }, /* (379) noarg_func ::= USER */
+ { 398, -1 }, /* (380) star_func ::= COUNT */
+ { 398, -1 }, /* (381) star_func ::= FIRST */
+ { 398, -1 }, /* (382) star_func ::= LAST */
+ { 398, -1 }, /* (383) star_func ::= LAST_ROW */
+ { 399, -1 }, /* (384) star_func_para_list ::= NK_STAR */
+ { 399, -1 }, /* (385) star_func_para_list ::= other_para_list */
+ { 401, -1 }, /* (386) other_para_list ::= star_func_para */
+ { 401, -3 }, /* (387) other_para_list ::= other_para_list NK_COMMA star_func_para */
+ { 402, -1 }, /* (388) star_func_para ::= expr_or_subquery */
+ { 402, -3 }, /* (389) star_func_para ::= table_name NK_DOT NK_STAR */
+ { 397, -4 }, /* (390) case_when_expression ::= CASE when_then_list case_when_else_opt END */
+ { 397, -5 }, /* (391) case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */
+ { 403, -1 }, /* (392) when_then_list ::= when_then_expr */
+ { 403, -2 }, /* (393) when_then_list ::= when_then_list when_then_expr */
+ { 406, -4 }, /* (394) when_then_expr ::= WHEN common_expression THEN common_expression */
+ { 404, 0 }, /* (395) case_when_else_opt ::= */
+ { 404, -2 }, /* (396) case_when_else_opt ::= ELSE common_expression */
+ { 407, -3 }, /* (397) predicate ::= expr_or_subquery compare_op expr_or_subquery */
+ { 407, -5 }, /* (398) predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */
+ { 407, -6 }, /* (399) predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */
+ { 407, -3 }, /* (400) predicate ::= expr_or_subquery IS NULL */
+ { 407, -4 }, /* (401) predicate ::= expr_or_subquery IS NOT NULL */
+ { 407, -3 }, /* (402) predicate ::= expr_or_subquery in_op in_predicate_value */
+ { 408, -1 }, /* (403) compare_op ::= NK_LT */
+ { 408, -1 }, /* (404) compare_op ::= NK_GT */
+ { 408, -1 }, /* (405) compare_op ::= NK_LE */
+ { 408, -1 }, /* (406) compare_op ::= NK_GE */
+ { 408, -1 }, /* (407) compare_op ::= NK_NE */
+ { 408, -1 }, /* (408) compare_op ::= NK_EQ */
+ { 408, -1 }, /* (409) compare_op ::= LIKE */
+ { 408, -2 }, /* (410) compare_op ::= NOT LIKE */
+ { 408, -1 }, /* (411) compare_op ::= MATCH */
+ { 408, -1 }, /* (412) compare_op ::= NMATCH */
+ { 408, -1 }, /* (413) compare_op ::= CONTAINS */
+ { 409, -1 }, /* (414) in_op ::= IN */
+ { 409, -2 }, /* (415) in_op ::= NOT IN */
+ { 410, -3 }, /* (416) in_predicate_value ::= NK_LP literal_list NK_RP */
+ { 411, -1 }, /* (417) boolean_value_expression ::= boolean_primary */
+ { 411, -2 }, /* (418) boolean_value_expression ::= NOT boolean_primary */
+ { 411, -3 }, /* (419) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */
+ { 411, -3 }, /* (420) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */
+ { 412, -1 }, /* (421) boolean_primary ::= predicate */
+ { 412, -3 }, /* (422) boolean_primary ::= NK_LP boolean_value_expression NK_RP */
+ { 405, -1 }, /* (423) common_expression ::= expr_or_subquery */
+ { 405, -1 }, /* (424) common_expression ::= boolean_value_expression */
+ { 413, 0 }, /* (425) from_clause_opt ::= */
+ { 413, -2 }, /* (426) from_clause_opt ::= FROM table_reference_list */
+ { 414, -1 }, /* (427) table_reference_list ::= table_reference */
+ { 414, -3 }, /* (428) table_reference_list ::= table_reference_list NK_COMMA table_reference */
+ { 415, -1 }, /* (429) table_reference ::= table_primary */
+ { 415, -1 }, /* (430) table_reference ::= joined_table */
+ { 416, -2 }, /* (431) table_primary ::= table_name alias_opt */
+ { 416, -4 }, /* (432) table_primary ::= db_name NK_DOT table_name alias_opt */
+ { 416, -2 }, /* (433) table_primary ::= subquery alias_opt */
+ { 416, -1 }, /* (434) table_primary ::= parenthesized_joined_table */
+ { 418, 0 }, /* (435) alias_opt ::= */
+ { 418, -1 }, /* (436) alias_opt ::= table_alias */
+ { 418, -2 }, /* (437) alias_opt ::= AS table_alias */
+ { 419, -3 }, /* (438) parenthesized_joined_table ::= NK_LP joined_table NK_RP */
+ { 419, -3 }, /* (439) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */
+ { 417, -6 }, /* (440) joined_table ::= table_reference join_type JOIN table_reference ON search_condition */
+ { 420, 0 }, /* (441) join_type ::= */
+ { 420, -1 }, /* (442) join_type ::= INNER */
+ { 422, -12 }, /* (443) query_specification ::= SELECT set_quantifier_opt select_list from_clause_opt where_clause_opt partition_by_clause_opt range_opt every_opt fill_opt twindow_clause_opt group_by_clause_opt having_clause_opt */
+ { 423, 0 }, /* (444) set_quantifier_opt ::= */
+ { 423, -1 }, /* (445) set_quantifier_opt ::= DISTINCT */
+ { 423, -1 }, /* (446) set_quantifier_opt ::= ALL */
+ { 424, -1 }, /* (447) select_list ::= select_item */
+ { 424, -3 }, /* (448) select_list ::= select_list NK_COMMA select_item */
+ { 432, -1 }, /* (449) select_item ::= NK_STAR */
+ { 432, -1 }, /* (450) select_item ::= common_expression */
+ { 432, -2 }, /* (451) select_item ::= common_expression column_alias */
+ { 432, -3 }, /* (452) select_item ::= common_expression AS column_alias */
+ { 432, -3 }, /* (453) select_item ::= table_name NK_DOT NK_STAR */
+ { 386, 0 }, /* (454) where_clause_opt ::= */
+ { 386, -2 }, /* (455) where_clause_opt ::= WHERE search_condition */
+ { 425, 0 }, /* (456) partition_by_clause_opt ::= */
+ { 425, -3 }, /* (457) partition_by_clause_opt ::= PARTITION BY partition_list */
+ { 433, -1 }, /* (458) partition_list ::= partition_item */
+ { 433, -3 }, /* (459) partition_list ::= partition_list NK_COMMA partition_item */
+ { 434, -1 }, /* (460) partition_item ::= expr_or_subquery */
+ { 434, -2 }, /* (461) partition_item ::= expr_or_subquery column_alias */
+ { 434, -3 }, /* (462) partition_item ::= expr_or_subquery AS column_alias */
+ { 429, 0 }, /* (463) twindow_clause_opt ::= */
+ { 429, -6 }, /* (464) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */
+ { 429, -4 }, /* (465) twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */
+ { 429, -6 }, /* (466) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */
+ { 429, -8 }, /* (467) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */
+ { 371, 0 }, /* (468) sliding_opt ::= */
+ { 371, -4 }, /* (469) sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */
+ { 428, 0 }, /* (470) fill_opt ::= */
+ { 428, -4 }, /* (471) fill_opt ::= FILL NK_LP fill_mode NK_RP */
+ { 428, -6 }, /* (472) fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */
+ { 435, -1 }, /* (473) fill_mode ::= NONE */
+ { 435, -1 }, /* (474) fill_mode ::= PREV */
+ { 435, -1 }, /* (475) fill_mode ::= NULL */
+ { 435, -1 }, /* (476) fill_mode ::= LINEAR */
+ { 435, -1 }, /* (477) fill_mode ::= NEXT */
+ { 430, 0 }, /* (478) group_by_clause_opt ::= */
+ { 430, -3 }, /* (479) group_by_clause_opt ::= GROUP BY group_by_list */
+ { 436, -1 }, /* (480) group_by_list ::= expr_or_subquery */
+ { 436, -3 }, /* (481) group_by_list ::= group_by_list NK_COMMA expr_or_subquery */
+ { 431, 0 }, /* (482) having_clause_opt ::= */
+ { 431, -2 }, /* (483) having_clause_opt ::= HAVING search_condition */
+ { 426, 0 }, /* (484) range_opt ::= */
+ { 426, -6 }, /* (485) range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */
+ { 427, 0 }, /* (486) every_opt ::= */
+ { 427, -4 }, /* (487) every_opt ::= EVERY NK_LP duration_literal NK_RP */
+ { 437, -4 }, /* (488) query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */
+ { 438, -1 }, /* (489) query_simple ::= query_specification */
+ { 438, -1 }, /* (490) query_simple ::= union_query_expression */
+ { 442, -4 }, /* (491) union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */
+ { 442, -3 }, /* (492) union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */
+ { 443, -1 }, /* (493) query_simple_or_subquery ::= query_simple */
+ { 443, -1 }, /* (494) query_simple_or_subquery ::= subquery */
+ { 376, -1 }, /* (495) query_or_subquery ::= query_expression */
+ { 376, -1 }, /* (496) query_or_subquery ::= subquery */
+ { 439, 0 }, /* (497) order_by_clause_opt ::= */
+ { 439, -3 }, /* (498) order_by_clause_opt ::= ORDER BY sort_specification_list */
+ { 440, 0 }, /* (499) slimit_clause_opt ::= */
+ { 440, -2 }, /* (500) slimit_clause_opt ::= SLIMIT NK_INTEGER */
+ { 440, -4 }, /* (501) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */
+ { 440, -4 }, /* (502) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */
+ { 441, 0 }, /* (503) limit_clause_opt ::= */
+ { 441, -2 }, /* (504) limit_clause_opt ::= LIMIT NK_INTEGER */
+ { 441, -4 }, /* (505) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */
+ { 441, -4 }, /* (506) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */
+ { 393, -3 }, /* (507) subquery ::= NK_LP query_expression NK_RP */
+ { 393, -3 }, /* (508) subquery ::= NK_LP subquery NK_RP */
+ { 421, -1 }, /* (509) search_condition ::= common_expression */
+ { 444, -1 }, /* (510) sort_specification_list ::= sort_specification */
+ { 444, -3 }, /* (511) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */
+ { 445, -3 }, /* (512) sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */
+ { 446, 0 }, /* (513) ordering_specification_opt ::= */
+ { 446, -1 }, /* (514) ordering_specification_opt ::= ASC */
+ { 446, -1 }, /* (515) ordering_specification_opt ::= DESC */
+ { 447, 0 }, /* (516) null_ordering_opt ::= */
+ { 447, -2 }, /* (517) null_ordering_opt ::= NULLS FIRST */
+ { 447, -2 }, /* (518) null_ordering_opt ::= NULLS LAST */
};
static void yy_accept(yyParser*); /* Forward Declaration */
@@ -3569,11 +3619,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,316,&yymsp[0].minor);
+ yy_destructor(yypParser,317,&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,317,&yymsp[0].minor);
+ yy_destructor(yypParser,318,&yymsp[0].minor);
break;
case 2: /* account_options ::= */
{ }
@@ -3587,20 +3637,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,316,&yymsp[-2].minor);
+{ yy_destructor(yypParser,317,&yymsp[-2].minor);
{ }
- yy_destructor(yypParser,318,&yymsp[0].minor);
+ yy_destructor(yypParser,319,&yymsp[0].minor);
}
break;
case 12: /* alter_account_options ::= alter_account_option */
-{ yy_destructor(yypParser,319,&yymsp[0].minor);
+{ yy_destructor(yypParser,320,&yymsp[0].minor);
{ }
}
break;
case 13: /* alter_account_options ::= alter_account_options alter_account_option */
-{ yy_destructor(yypParser,317,&yymsp[-1].minor);
+{ yy_destructor(yypParser,318,&yymsp[-1].minor);
{ }
- yy_destructor(yypParser,319,&yymsp[0].minor);
+ yy_destructor(yypParser,320,&yymsp[0].minor);
}
break;
case 14: /* alter_account_option ::= PASS literal */
@@ -3614,72 +3664,72 @@ 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,318,&yymsp[0].minor);
+ yy_destructor(yypParser,319,&yymsp[0].minor);
break;
case 24: /* cmd ::= CREATE USER user_name PASS NK_STRING sysinfo_opt */
-{ pCxt->pRootNode = createCreateUserStmt(pCxt, &yymsp[-3].minor.yy677, &yymsp[-1].minor.yy0, yymsp[0].minor.yy167); }
+{ pCxt->pRootNode = createCreateUserStmt(pCxt, &yymsp[-3].minor.yy673, &yymsp[-1].minor.yy0, yymsp[0].minor.yy439); }
break;
case 25: /* cmd ::= ALTER USER user_name PASS NK_STRING */
-{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy677, TSDB_ALTER_USER_PASSWD, &yymsp[0].minor.yy0); }
+{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy673, TSDB_ALTER_USER_PASSWD, &yymsp[0].minor.yy0); }
break;
case 26: /* cmd ::= ALTER USER user_name ENABLE NK_INTEGER */
-{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy677, TSDB_ALTER_USER_ENABLE, &yymsp[0].minor.yy0); }
+{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy673, TSDB_ALTER_USER_ENABLE, &yymsp[0].minor.yy0); }
break;
case 27: /* cmd ::= ALTER USER user_name SYSINFO NK_INTEGER */
-{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy677, TSDB_ALTER_USER_SYSINFO, &yymsp[0].minor.yy0); }
+{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy673, TSDB_ALTER_USER_SYSINFO, &yymsp[0].minor.yy0); }
break;
case 28: /* cmd ::= DROP USER user_name */
-{ pCxt->pRootNode = createDropUserStmt(pCxt, &yymsp[0].minor.yy677); }
+{ pCxt->pRootNode = createDropUserStmt(pCxt, &yymsp[0].minor.yy673); }
break;
case 29: /* sysinfo_opt ::= */
-{ yymsp[1].minor.yy167 = 1; }
+{ yymsp[1].minor.yy439 = 1; }
break;
case 30: /* sysinfo_opt ::= SYSINFO NK_INTEGER */
-{ yymsp[-1].minor.yy167 = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); }
+{ yymsp[-1].minor.yy439 = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); }
break;
case 31: /* cmd ::= GRANT privileges ON priv_level TO user_name */
-{ pCxt->pRootNode = createGrantStmt(pCxt, yymsp[-4].minor.yy57, &yymsp[-2].minor.yy677, &yymsp[0].minor.yy677); }
+{ pCxt->pRootNode = createGrantStmt(pCxt, yymsp[-4].minor.yy221, &yymsp[-2].minor.yy673, &yymsp[0].minor.yy673); }
break;
case 32: /* cmd ::= REVOKE privileges ON priv_level FROM user_name */
-{ pCxt->pRootNode = createRevokeStmt(pCxt, yymsp[-4].minor.yy57, &yymsp[-2].minor.yy677, &yymsp[0].minor.yy677); }
+{ pCxt->pRootNode = createRevokeStmt(pCxt, yymsp[-4].minor.yy221, &yymsp[-2].minor.yy673, &yymsp[0].minor.yy673); }
break;
case 33: /* privileges ::= ALL */
-{ yymsp[0].minor.yy57 = PRIVILEGE_TYPE_ALL; }
+{ yymsp[0].minor.yy221 = PRIVILEGE_TYPE_ALL; }
break;
case 34: /* privileges ::= priv_type_list */
case 35: /* priv_type_list ::= priv_type */ yytestcase(yyruleno==35);
-{ yylhsminor.yy57 = yymsp[0].minor.yy57; }
- yymsp[0].minor.yy57 = yylhsminor.yy57;
+{ yylhsminor.yy221 = yymsp[0].minor.yy221; }
+ yymsp[0].minor.yy221 = yylhsminor.yy221;
break;
case 36: /* priv_type_list ::= priv_type_list NK_COMMA priv_type */
-{ yylhsminor.yy57 = yymsp[-2].minor.yy57 | yymsp[0].minor.yy57; }
- yymsp[-2].minor.yy57 = yylhsminor.yy57;
+{ yylhsminor.yy221 = yymsp[-2].minor.yy221 | yymsp[0].minor.yy221; }
+ yymsp[-2].minor.yy221 = yylhsminor.yy221;
break;
case 37: /* priv_type ::= READ */
-{ yymsp[0].minor.yy57 = PRIVILEGE_TYPE_READ; }
+{ yymsp[0].minor.yy221 = PRIVILEGE_TYPE_READ; }
break;
case 38: /* priv_type ::= WRITE */
-{ yymsp[0].minor.yy57 = PRIVILEGE_TYPE_WRITE; }
+{ yymsp[0].minor.yy221 = PRIVILEGE_TYPE_WRITE; }
break;
case 39: /* priv_level ::= NK_STAR NK_DOT NK_STAR */
-{ yylhsminor.yy677 = yymsp[-2].minor.yy0; }
- yymsp[-2].minor.yy677 = yylhsminor.yy677;
+{ yylhsminor.yy673 = yymsp[-2].minor.yy0; }
+ yymsp[-2].minor.yy673 = yylhsminor.yy673;
break;
case 40: /* priv_level ::= db_name NK_DOT NK_STAR */
-{ yylhsminor.yy677 = yymsp[-2].minor.yy677; }
- yymsp[-2].minor.yy677 = yylhsminor.yy677;
+{ yylhsminor.yy673 = yymsp[-2].minor.yy673; }
+ yymsp[-2].minor.yy673 = yylhsminor.yy673;
break;
case 41: /* cmd ::= CREATE DNODE dnode_endpoint */
-{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[0].minor.yy677, NULL); }
+{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[0].minor.yy673, NULL); }
break;
case 42: /* cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */
-{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[-2].minor.yy677, &yymsp[0].minor.yy0); }
+{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[-2].minor.yy673, &yymsp[0].minor.yy0); }
break;
case 43: /* cmd ::= DROP DNODE NK_INTEGER */
{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[0].minor.yy0); }
break;
case 44: /* cmd ::= DROP DNODE dnode_endpoint */
-{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[0].minor.yy677); }
+{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[0].minor.yy673); }
break;
case 45: /* cmd ::= ALTER DNODE NK_INTEGER NK_STRING */
{ pCxt->pRootNode = createAlterDnodeStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, NULL); }
@@ -3706,21 +3756,21 @@ static YYACTIONTYPE yy_reduce(
case 330: /* topic_name ::= NK_ID */ yytestcase(yyruleno==330);
case 331: /* stream_name ::= NK_ID */ yytestcase(yyruleno==331);
case 332: /* cgroup_name ::= NK_ID */ yytestcase(yyruleno==332);
- case 370: /* noarg_func ::= NOW */ yytestcase(yyruleno==370);
- case 371: /* noarg_func ::= TODAY */ yytestcase(yyruleno==371);
- case 372: /* noarg_func ::= TIMEZONE */ yytestcase(yyruleno==372);
- case 373: /* noarg_func ::= DATABASE */ yytestcase(yyruleno==373);
- case 374: /* noarg_func ::= CLIENT_VERSION */ yytestcase(yyruleno==374);
- case 375: /* noarg_func ::= SERVER_VERSION */ yytestcase(yyruleno==375);
- case 376: /* noarg_func ::= SERVER_STATUS */ yytestcase(yyruleno==376);
- case 377: /* noarg_func ::= CURRENT_USER */ yytestcase(yyruleno==377);
- case 378: /* noarg_func ::= USER */ yytestcase(yyruleno==378);
- case 379: /* star_func ::= COUNT */ yytestcase(yyruleno==379);
- case 380: /* star_func ::= FIRST */ yytestcase(yyruleno==380);
- case 381: /* star_func ::= LAST */ yytestcase(yyruleno==381);
- case 382: /* star_func ::= LAST_ROW */ yytestcase(yyruleno==382);
-{ yylhsminor.yy677 = yymsp[0].minor.yy0; }
- yymsp[0].minor.yy677 = yylhsminor.yy677;
+ case 371: /* noarg_func ::= NOW */ yytestcase(yyruleno==371);
+ case 372: /* noarg_func ::= TODAY */ yytestcase(yyruleno==372);
+ case 373: /* noarg_func ::= TIMEZONE */ yytestcase(yyruleno==373);
+ case 374: /* noarg_func ::= DATABASE */ yytestcase(yyruleno==374);
+ case 375: /* noarg_func ::= CLIENT_VERSION */ yytestcase(yyruleno==375);
+ case 376: /* noarg_func ::= SERVER_VERSION */ yytestcase(yyruleno==376);
+ case 377: /* noarg_func ::= SERVER_STATUS */ yytestcase(yyruleno==377);
+ case 378: /* noarg_func ::= CURRENT_USER */ yytestcase(yyruleno==378);
+ case 379: /* noarg_func ::= USER */ yytestcase(yyruleno==379);
+ case 380: /* star_func ::= COUNT */ yytestcase(yyruleno==380);
+ case 381: /* star_func ::= FIRST */ yytestcase(yyruleno==381);
+ case 382: /* star_func ::= LAST */ yytestcase(yyruleno==382);
+ case 383: /* star_func ::= LAST_ROW */ yytestcase(yyruleno==383);
+{ yylhsminor.yy673 = yymsp[0].minor.yy0; }
+ yymsp[0].minor.yy673 = yylhsminor.yy673;
break;
case 52: /* cmd ::= ALTER LOCAL NK_STRING */
{ pCxt->pRootNode = createAlterLocalStmt(pCxt, &yymsp[0].minor.yy0, NULL); }
@@ -3753,208 +3803,208 @@ static YYACTIONTYPE yy_reduce(
{ pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_MNODE_STMT, &yymsp[0].minor.yy0); }
break;
case 62: /* cmd ::= CREATE DATABASE not_exists_opt db_name db_options */
-{ pCxt->pRootNode = createCreateDatabaseStmt(pCxt, yymsp[-2].minor.yy287, &yymsp[-1].minor.yy677, yymsp[0].minor.yy392); }
+{ pCxt->pRootNode = createCreateDatabaseStmt(pCxt, yymsp[-2].minor.yy89, &yymsp[-1].minor.yy673, yymsp[0].minor.yy616); }
break;
case 63: /* cmd ::= DROP DATABASE exists_opt db_name */
-{ pCxt->pRootNode = createDropDatabaseStmt(pCxt, yymsp[-1].minor.yy287, &yymsp[0].minor.yy677); }
+{ pCxt->pRootNode = createDropDatabaseStmt(pCxt, yymsp[-1].minor.yy89, &yymsp[0].minor.yy673); }
break;
case 64: /* cmd ::= USE db_name */
-{ pCxt->pRootNode = createUseDatabaseStmt(pCxt, &yymsp[0].minor.yy677); }
+{ pCxt->pRootNode = createUseDatabaseStmt(pCxt, &yymsp[0].minor.yy673); }
break;
case 65: /* cmd ::= ALTER DATABASE db_name alter_db_options */
-{ pCxt->pRootNode = createAlterDatabaseStmt(pCxt, &yymsp[-1].minor.yy677, yymsp[0].minor.yy392); }
+{ pCxt->pRootNode = createAlterDatabaseStmt(pCxt, &yymsp[-1].minor.yy673, yymsp[0].minor.yy616); }
break;
case 66: /* cmd ::= FLUSH DATABASE db_name */
-{ pCxt->pRootNode = createFlushDatabaseStmt(pCxt, &yymsp[0].minor.yy677); }
+{ pCxt->pRootNode = createFlushDatabaseStmt(pCxt, &yymsp[0].minor.yy673); }
break;
case 67: /* cmd ::= TRIM DATABASE db_name speed_opt */
-{ pCxt->pRootNode = createTrimDatabaseStmt(pCxt, &yymsp[-1].minor.yy677, yymsp[0].minor.yy172); }
+{ pCxt->pRootNode = createTrimDatabaseStmt(pCxt, &yymsp[-1].minor.yy673, yymsp[0].minor.yy452); }
break;
case 68: /* not_exists_opt ::= IF NOT EXISTS */
-{ yymsp[-2].minor.yy287 = true; }
+{ yymsp[-2].minor.yy89 = true; }
break;
case 69: /* not_exists_opt ::= */
case 71: /* exists_opt ::= */ yytestcase(yyruleno==71);
case 264: /* analyze_opt ::= */ yytestcase(yyruleno==264);
case 271: /* agg_func_opt ::= */ yytestcase(yyruleno==271);
- case 443: /* set_quantifier_opt ::= */ yytestcase(yyruleno==443);
-{ yymsp[1].minor.yy287 = false; }
+ case 444: /* set_quantifier_opt ::= */ yytestcase(yyruleno==444);
+{ yymsp[1].minor.yy89 = false; }
break;
case 70: /* exists_opt ::= IF EXISTS */
-{ yymsp[-1].minor.yy287 = true; }
+{ yymsp[-1].minor.yy89 = true; }
break;
case 72: /* db_options ::= */
-{ yymsp[1].minor.yy392 = createDefaultDatabaseOptions(pCxt); }
+{ yymsp[1].minor.yy616 = createDefaultDatabaseOptions(pCxt); }
break;
case 73: /* db_options ::= db_options BUFFER NK_INTEGER */
-{ yylhsminor.yy392 = setDatabaseOption(pCxt, yymsp[-2].minor.yy392, DB_OPTION_BUFFER, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy392 = yylhsminor.yy392;
+{ yylhsminor.yy616 = setDatabaseOption(pCxt, yymsp[-2].minor.yy616, DB_OPTION_BUFFER, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy616 = yylhsminor.yy616;
break;
case 74: /* db_options ::= db_options CACHEMODEL NK_STRING */
-{ yylhsminor.yy392 = setDatabaseOption(pCxt, yymsp[-2].minor.yy392, DB_OPTION_CACHEMODEL, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy392 = yylhsminor.yy392;
+{ yylhsminor.yy616 = setDatabaseOption(pCxt, yymsp[-2].minor.yy616, DB_OPTION_CACHEMODEL, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy616 = yylhsminor.yy616;
break;
case 75: /* db_options ::= db_options CACHESIZE NK_INTEGER */
-{ yylhsminor.yy392 = setDatabaseOption(pCxt, yymsp[-2].minor.yy392, DB_OPTION_CACHESIZE, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy392 = yylhsminor.yy392;
+{ yylhsminor.yy616 = setDatabaseOption(pCxt, yymsp[-2].minor.yy616, DB_OPTION_CACHESIZE, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy616 = yylhsminor.yy616;
break;
case 76: /* db_options ::= db_options COMP NK_INTEGER */
-{ yylhsminor.yy392 = setDatabaseOption(pCxt, yymsp[-2].minor.yy392, DB_OPTION_COMP, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy392 = yylhsminor.yy392;
+{ yylhsminor.yy616 = setDatabaseOption(pCxt, yymsp[-2].minor.yy616, DB_OPTION_COMP, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy616 = yylhsminor.yy616;
break;
case 77: /* db_options ::= db_options DURATION NK_INTEGER */
case 78: /* db_options ::= db_options DURATION NK_VARIABLE */ yytestcase(yyruleno==78);
-{ yylhsminor.yy392 = setDatabaseOption(pCxt, yymsp[-2].minor.yy392, DB_OPTION_DAYS, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy392 = yylhsminor.yy392;
+{ yylhsminor.yy616 = setDatabaseOption(pCxt, yymsp[-2].minor.yy616, DB_OPTION_DAYS, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy616 = yylhsminor.yy616;
break;
case 79: /* db_options ::= db_options MAXROWS NK_INTEGER */
-{ yylhsminor.yy392 = setDatabaseOption(pCxt, yymsp[-2].minor.yy392, DB_OPTION_MAXROWS, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy392 = yylhsminor.yy392;
+{ yylhsminor.yy616 = setDatabaseOption(pCxt, yymsp[-2].minor.yy616, DB_OPTION_MAXROWS, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy616 = yylhsminor.yy616;
break;
case 80: /* db_options ::= db_options MINROWS NK_INTEGER */
-{ yylhsminor.yy392 = setDatabaseOption(pCxt, yymsp[-2].minor.yy392, DB_OPTION_MINROWS, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy392 = yylhsminor.yy392;
+{ yylhsminor.yy616 = setDatabaseOption(pCxt, yymsp[-2].minor.yy616, DB_OPTION_MINROWS, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy616 = yylhsminor.yy616;
break;
case 81: /* db_options ::= db_options KEEP integer_list */
case 82: /* db_options ::= db_options KEEP variable_list */ yytestcase(yyruleno==82);
-{ yylhsminor.yy392 = setDatabaseOption(pCxt, yymsp[-2].minor.yy392, DB_OPTION_KEEP, yymsp[0].minor.yy148); }
- yymsp[-2].minor.yy392 = yylhsminor.yy392;
+{ yylhsminor.yy616 = setDatabaseOption(pCxt, yymsp[-2].minor.yy616, DB_OPTION_KEEP, yymsp[0].minor.yy152); }
+ yymsp[-2].minor.yy616 = yylhsminor.yy616;
break;
case 83: /* db_options ::= db_options PAGES NK_INTEGER */
-{ yylhsminor.yy392 = setDatabaseOption(pCxt, yymsp[-2].minor.yy392, DB_OPTION_PAGES, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy392 = yylhsminor.yy392;
+{ yylhsminor.yy616 = setDatabaseOption(pCxt, yymsp[-2].minor.yy616, DB_OPTION_PAGES, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy616 = yylhsminor.yy616;
break;
case 84: /* db_options ::= db_options PAGESIZE NK_INTEGER */
-{ yylhsminor.yy392 = setDatabaseOption(pCxt, yymsp[-2].minor.yy392, DB_OPTION_PAGESIZE, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy392 = yylhsminor.yy392;
+{ yylhsminor.yy616 = setDatabaseOption(pCxt, yymsp[-2].minor.yy616, DB_OPTION_PAGESIZE, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy616 = yylhsminor.yy616;
break;
case 85: /* db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */
-{ yylhsminor.yy392 = setDatabaseOption(pCxt, yymsp[-2].minor.yy392, DB_OPTION_TSDB_PAGESIZE, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy392 = yylhsminor.yy392;
+{ yylhsminor.yy616 = setDatabaseOption(pCxt, yymsp[-2].minor.yy616, DB_OPTION_TSDB_PAGESIZE, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy616 = yylhsminor.yy616;
break;
case 86: /* db_options ::= db_options PRECISION NK_STRING */
-{ yylhsminor.yy392 = setDatabaseOption(pCxt, yymsp[-2].minor.yy392, DB_OPTION_PRECISION, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy392 = yylhsminor.yy392;
+{ yylhsminor.yy616 = setDatabaseOption(pCxt, yymsp[-2].minor.yy616, DB_OPTION_PRECISION, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy616 = yylhsminor.yy616;
break;
case 87: /* db_options ::= db_options REPLICA NK_INTEGER */
-{ yylhsminor.yy392 = setDatabaseOption(pCxt, yymsp[-2].minor.yy392, DB_OPTION_REPLICA, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy392 = yylhsminor.yy392;
+{ yylhsminor.yy616 = setDatabaseOption(pCxt, yymsp[-2].minor.yy616, DB_OPTION_REPLICA, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy616 = yylhsminor.yy616;
break;
case 88: /* db_options ::= db_options STRICT NK_STRING */
-{ yylhsminor.yy392 = setDatabaseOption(pCxt, yymsp[-2].minor.yy392, DB_OPTION_STRICT, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy392 = yylhsminor.yy392;
+{ yylhsminor.yy616 = setDatabaseOption(pCxt, yymsp[-2].minor.yy616, DB_OPTION_STRICT, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy616 = yylhsminor.yy616;
break;
case 89: /* db_options ::= db_options VGROUPS NK_INTEGER */
-{ yylhsminor.yy392 = setDatabaseOption(pCxt, yymsp[-2].minor.yy392, DB_OPTION_VGROUPS, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy392 = yylhsminor.yy392;
+{ yylhsminor.yy616 = setDatabaseOption(pCxt, yymsp[-2].minor.yy616, DB_OPTION_VGROUPS, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy616 = yylhsminor.yy616;
break;
case 90: /* db_options ::= db_options SINGLE_STABLE NK_INTEGER */
-{ yylhsminor.yy392 = setDatabaseOption(pCxt, yymsp[-2].minor.yy392, DB_OPTION_SINGLE_STABLE, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy392 = yylhsminor.yy392;
+{ yylhsminor.yy616 = setDatabaseOption(pCxt, yymsp[-2].minor.yy616, DB_OPTION_SINGLE_STABLE, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy616 = yylhsminor.yy616;
break;
case 91: /* db_options ::= db_options RETENTIONS retention_list */
-{ yylhsminor.yy392 = setDatabaseOption(pCxt, yymsp[-2].minor.yy392, DB_OPTION_RETENTIONS, yymsp[0].minor.yy148); }
- yymsp[-2].minor.yy392 = yylhsminor.yy392;
+{ yylhsminor.yy616 = setDatabaseOption(pCxt, yymsp[-2].minor.yy616, DB_OPTION_RETENTIONS, yymsp[0].minor.yy152); }
+ yymsp[-2].minor.yy616 = yylhsminor.yy616;
break;
case 92: /* db_options ::= db_options SCHEMALESS NK_INTEGER */
-{ yylhsminor.yy392 = setDatabaseOption(pCxt, yymsp[-2].minor.yy392, DB_OPTION_SCHEMALESS, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy392 = yylhsminor.yy392;
+{ yylhsminor.yy616 = setDatabaseOption(pCxt, yymsp[-2].minor.yy616, DB_OPTION_SCHEMALESS, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy616 = yylhsminor.yy616;
break;
case 93: /* db_options ::= db_options WAL_LEVEL NK_INTEGER */
-{ yylhsminor.yy392 = setDatabaseOption(pCxt, yymsp[-2].minor.yy392, DB_OPTION_WAL, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy392 = yylhsminor.yy392;
+{ yylhsminor.yy616 = setDatabaseOption(pCxt, yymsp[-2].minor.yy616, DB_OPTION_WAL, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy616 = yylhsminor.yy616;
break;
case 94: /* db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */
-{ yylhsminor.yy392 = setDatabaseOption(pCxt, yymsp[-2].minor.yy392, DB_OPTION_FSYNC, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy392 = yylhsminor.yy392;
+{ yylhsminor.yy616 = setDatabaseOption(pCxt, yymsp[-2].minor.yy616, DB_OPTION_FSYNC, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy616 = yylhsminor.yy616;
break;
case 95: /* db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */
-{ yylhsminor.yy392 = setDatabaseOption(pCxt, yymsp[-2].minor.yy392, DB_OPTION_WAL_RETENTION_PERIOD, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy392 = yylhsminor.yy392;
+{ yylhsminor.yy616 = setDatabaseOption(pCxt, yymsp[-2].minor.yy616, DB_OPTION_WAL_RETENTION_PERIOD, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy616 = yylhsminor.yy616;
break;
case 96: /* db_options ::= db_options WAL_RETENTION_PERIOD 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.yy392 = setDatabaseOption(pCxt, yymsp[-3].minor.yy392, DB_OPTION_WAL_RETENTION_PERIOD, &t);
+ yylhsminor.yy616 = setDatabaseOption(pCxt, yymsp[-3].minor.yy616, DB_OPTION_WAL_RETENTION_PERIOD, &t);
}
- yymsp[-3].minor.yy392 = yylhsminor.yy392;
+ yymsp[-3].minor.yy616 = yylhsminor.yy616;
break;
case 97: /* db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */
-{ yylhsminor.yy392 = setDatabaseOption(pCxt, yymsp[-2].minor.yy392, DB_OPTION_WAL_RETENTION_SIZE, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy392 = yylhsminor.yy392;
+{ yylhsminor.yy616 = setDatabaseOption(pCxt, yymsp[-2].minor.yy616, DB_OPTION_WAL_RETENTION_SIZE, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy616 = yylhsminor.yy616;
break;
case 98: /* db_options ::= db_options WAL_RETENTION_SIZE 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.yy392 = setDatabaseOption(pCxt, yymsp[-3].minor.yy392, DB_OPTION_WAL_RETENTION_SIZE, &t);
+ yylhsminor.yy616 = setDatabaseOption(pCxt, yymsp[-3].minor.yy616, DB_OPTION_WAL_RETENTION_SIZE, &t);
}
- yymsp[-3].minor.yy392 = yylhsminor.yy392;
+ yymsp[-3].minor.yy616 = yylhsminor.yy616;
break;
case 99: /* db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */
-{ yylhsminor.yy392 = setDatabaseOption(pCxt, yymsp[-2].minor.yy392, DB_OPTION_WAL_ROLL_PERIOD, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy392 = yylhsminor.yy392;
+{ yylhsminor.yy616 = setDatabaseOption(pCxt, yymsp[-2].minor.yy616, DB_OPTION_WAL_ROLL_PERIOD, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy616 = yylhsminor.yy616;
break;
case 100: /* db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */
-{ yylhsminor.yy392 = setDatabaseOption(pCxt, yymsp[-2].minor.yy392, DB_OPTION_WAL_SEGMENT_SIZE, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy392 = yylhsminor.yy392;
+{ yylhsminor.yy616 = setDatabaseOption(pCxt, yymsp[-2].minor.yy616, DB_OPTION_WAL_SEGMENT_SIZE, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy616 = yylhsminor.yy616;
break;
case 101: /* db_options ::= db_options STT_TRIGGER NK_INTEGER */
-{ yylhsminor.yy392 = setDatabaseOption(pCxt, yymsp[-2].minor.yy392, DB_OPTION_STT_TRIGGER, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy392 = yylhsminor.yy392;
+{ yylhsminor.yy616 = setDatabaseOption(pCxt, yymsp[-2].minor.yy616, DB_OPTION_STT_TRIGGER, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy616 = yylhsminor.yy616;
break;
case 102: /* db_options ::= db_options TABLE_PREFIX NK_INTEGER */
-{ yylhsminor.yy392 = setDatabaseOption(pCxt, yymsp[-2].minor.yy392, DB_OPTION_TABLE_PREFIX, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy392 = yylhsminor.yy392;
+{ yylhsminor.yy616 = setDatabaseOption(pCxt, yymsp[-2].minor.yy616, DB_OPTION_TABLE_PREFIX, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy616 = yylhsminor.yy616;
break;
case 103: /* db_options ::= db_options TABLE_SUFFIX NK_INTEGER */
-{ yylhsminor.yy392 = setDatabaseOption(pCxt, yymsp[-2].minor.yy392, DB_OPTION_TABLE_SUFFIX, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy392 = yylhsminor.yy392;
+{ yylhsminor.yy616 = setDatabaseOption(pCxt, yymsp[-2].minor.yy616, DB_OPTION_TABLE_SUFFIX, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy616 = yylhsminor.yy616;
break;
case 104: /* alter_db_options ::= alter_db_option */
-{ yylhsminor.yy392 = createAlterDatabaseOptions(pCxt); yylhsminor.yy392 = setAlterDatabaseOption(pCxt, yylhsminor.yy392, &yymsp[0].minor.yy323); }
- yymsp[0].minor.yy392 = yylhsminor.yy392;
+{ yylhsminor.yy616 = createAlterDatabaseOptions(pCxt); yylhsminor.yy616 = setAlterDatabaseOption(pCxt, yylhsminor.yy616, &yymsp[0].minor.yy669); }
+ yymsp[0].minor.yy616 = yylhsminor.yy616;
break;
case 105: /* alter_db_options ::= alter_db_options alter_db_option */
-{ yylhsminor.yy392 = setAlterDatabaseOption(pCxt, yymsp[-1].minor.yy392, &yymsp[0].minor.yy323); }
- yymsp[-1].minor.yy392 = yylhsminor.yy392;
+{ yylhsminor.yy616 = setAlterDatabaseOption(pCxt, yymsp[-1].minor.yy616, &yymsp[0].minor.yy669); }
+ yymsp[-1].minor.yy616 = yylhsminor.yy616;
break;
case 106: /* alter_db_option ::= CACHEMODEL NK_STRING */
-{ yymsp[-1].minor.yy323.type = DB_OPTION_CACHEMODEL; yymsp[-1].minor.yy323.val = yymsp[0].minor.yy0; }
+{ yymsp[-1].minor.yy669.type = DB_OPTION_CACHEMODEL; yymsp[-1].minor.yy669.val = yymsp[0].minor.yy0; }
break;
case 107: /* alter_db_option ::= CACHESIZE NK_INTEGER */
-{ yymsp[-1].minor.yy323.type = DB_OPTION_CACHESIZE; yymsp[-1].minor.yy323.val = yymsp[0].minor.yy0; }
+{ yymsp[-1].minor.yy669.type = DB_OPTION_CACHESIZE; yymsp[-1].minor.yy669.val = yymsp[0].minor.yy0; }
break;
case 108: /* alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */
-{ yymsp[-1].minor.yy323.type = DB_OPTION_FSYNC; yymsp[-1].minor.yy323.val = yymsp[0].minor.yy0; }
+{ yymsp[-1].minor.yy669.type = DB_OPTION_FSYNC; yymsp[-1].minor.yy669.val = yymsp[0].minor.yy0; }
break;
case 109: /* alter_db_option ::= KEEP integer_list */
case 110: /* alter_db_option ::= KEEP variable_list */ yytestcase(yyruleno==110);
-{ yymsp[-1].minor.yy323.type = DB_OPTION_KEEP; yymsp[-1].minor.yy323.pList = yymsp[0].minor.yy148; }
+{ yymsp[-1].minor.yy669.type = DB_OPTION_KEEP; yymsp[-1].minor.yy669.pList = yymsp[0].minor.yy152; }
break;
case 111: /* alter_db_option ::= WAL_LEVEL NK_INTEGER */
-{ yymsp[-1].minor.yy323.type = DB_OPTION_WAL; yymsp[-1].minor.yy323.val = yymsp[0].minor.yy0; }
+{ yymsp[-1].minor.yy669.type = DB_OPTION_WAL; yymsp[-1].minor.yy669.val = yymsp[0].minor.yy0; }
break;
case 112: /* alter_db_option ::= STT_TRIGGER NK_INTEGER */
-{ yymsp[-1].minor.yy323.type = DB_OPTION_STT_TRIGGER; yymsp[-1].minor.yy323.val = yymsp[0].minor.yy0; }
+{ yymsp[-1].minor.yy669.type = DB_OPTION_STT_TRIGGER; yymsp[-1].minor.yy669.val = yymsp[0].minor.yy0; }
break;
case 113: /* integer_list ::= NK_INTEGER */
-{ yylhsminor.yy148 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); }
- yymsp[0].minor.yy148 = yylhsminor.yy148;
+{ yylhsminor.yy152 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); }
+ yymsp[0].minor.yy152 = yylhsminor.yy152;
break;
case 114: /* integer_list ::= integer_list NK_COMMA NK_INTEGER */
case 293: /* dnode_list ::= dnode_list DNODE NK_INTEGER */ yytestcase(yyruleno==293);
-{ yylhsminor.yy148 = addNodeToList(pCxt, yymsp[-2].minor.yy148, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); }
- yymsp[-2].minor.yy148 = yylhsminor.yy148;
+{ yylhsminor.yy152 = addNodeToList(pCxt, yymsp[-2].minor.yy152, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); }
+ yymsp[-2].minor.yy152 = yylhsminor.yy152;
break;
case 115: /* variable_list ::= NK_VARIABLE */
-{ yylhsminor.yy148 = createNodeList(pCxt, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); }
- yymsp[0].minor.yy148 = yylhsminor.yy148;
+{ yylhsminor.yy152 = createNodeList(pCxt, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); }
+ yymsp[0].minor.yy152 = yylhsminor.yy152;
break;
case 116: /* variable_list ::= variable_list NK_COMMA NK_VARIABLE */
-{ yylhsminor.yy148 = addNodeToList(pCxt, yymsp[-2].minor.yy148, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); }
- yymsp[-2].minor.yy148 = yylhsminor.yy148;
+{ yylhsminor.yy152 = addNodeToList(pCxt, yymsp[-2].minor.yy152, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); }
+ yymsp[-2].minor.yy152 = yylhsminor.yy152;
break;
case 117: /* retention_list ::= retention */
case 139: /* multi_create_clause ::= create_subtable_clause */ yytestcase(yyruleno==139);
@@ -3964,13 +4014,13 @@ static YYACTIONTYPE yy_reduce(
case 197: /* col_name_list ::= col_name */ yytestcase(yyruleno==197);
case 247: /* func_list ::= func */ yytestcase(yyruleno==247);
case 321: /* literal_list ::= signed_literal */ yytestcase(yyruleno==321);
- case 385: /* other_para_list ::= star_func_para */ yytestcase(yyruleno==385);
- case 391: /* when_then_list ::= when_then_expr */ yytestcase(yyruleno==391);
- case 446: /* select_list ::= select_item */ yytestcase(yyruleno==446);
- case 457: /* partition_list ::= partition_item */ yytestcase(yyruleno==457);
- case 509: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==509);
-{ yylhsminor.yy148 = createNodeList(pCxt, yymsp[0].minor.yy392); }
- yymsp[0].minor.yy148 = yylhsminor.yy148;
+ case 386: /* other_para_list ::= star_func_para */ yytestcase(yyruleno==386);
+ case 392: /* when_then_list ::= when_then_expr */ yytestcase(yyruleno==392);
+ case 447: /* select_list ::= select_item */ yytestcase(yyruleno==447);
+ case 458: /* partition_list ::= partition_item */ yytestcase(yyruleno==458);
+ case 510: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==510);
+{ yylhsminor.yy152 = createNodeList(pCxt, yymsp[0].minor.yy616); }
+ yymsp[0].minor.yy152 = yylhsminor.yy152;
break;
case 118: /* retention_list ::= retention_list NK_COMMA retention */
case 150: /* column_def_list ::= column_def_list NK_COMMA column_def */ yytestcase(yyruleno==150);
@@ -3978,263 +4028,263 @@ static YYACTIONTYPE yy_reduce(
case 198: /* col_name_list ::= col_name_list NK_COMMA col_name */ yytestcase(yyruleno==198);
case 248: /* func_list ::= func_list NK_COMMA func */ yytestcase(yyruleno==248);
case 322: /* literal_list ::= literal_list NK_COMMA signed_literal */ yytestcase(yyruleno==322);
- case 386: /* other_para_list ::= other_para_list NK_COMMA star_func_para */ yytestcase(yyruleno==386);
- case 447: /* select_list ::= select_list NK_COMMA select_item */ yytestcase(yyruleno==447);
- case 458: /* partition_list ::= partition_list NK_COMMA partition_item */ yytestcase(yyruleno==458);
- case 510: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==510);
-{ yylhsminor.yy148 = addNodeToList(pCxt, yymsp[-2].minor.yy148, yymsp[0].minor.yy392); }
- yymsp[-2].minor.yy148 = yylhsminor.yy148;
+ case 387: /* other_para_list ::= other_para_list NK_COMMA star_func_para */ yytestcase(yyruleno==387);
+ case 448: /* select_list ::= select_list NK_COMMA select_item */ yytestcase(yyruleno==448);
+ case 459: /* partition_list ::= partition_list NK_COMMA partition_item */ yytestcase(yyruleno==459);
+ case 511: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==511);
+{ yylhsminor.yy152 = addNodeToList(pCxt, yymsp[-2].minor.yy152, yymsp[0].minor.yy616); }
+ yymsp[-2].minor.yy152 = yylhsminor.yy152;
break;
case 119: /* retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */
-{ yylhsminor.yy392 = createNodeListNodeEx(pCxt, createDurationValueNode(pCxt, &yymsp[-2].minor.yy0), createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); }
- yymsp[-2].minor.yy392 = yylhsminor.yy392;
+{ yylhsminor.yy616 = createNodeListNodeEx(pCxt, createDurationValueNode(pCxt, &yymsp[-2].minor.yy0), createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); }
+ yymsp[-2].minor.yy616 = yylhsminor.yy616;
break;
case 120: /* speed_opt ::= */
case 273: /* bufsize_opt ::= */ yytestcase(yyruleno==273);
-{ yymsp[1].minor.yy172 = 0; }
+{ yymsp[1].minor.yy452 = 0; }
break;
case 121: /* speed_opt ::= MAX_SPEED NK_INTEGER */
case 274: /* bufsize_opt ::= BUFSIZE NK_INTEGER */ yytestcase(yyruleno==274);
-{ yymsp[-1].minor.yy172 = taosStr2Int32(yymsp[0].minor.yy0.z, NULL, 10); }
+{ yymsp[-1].minor.yy452 = taosStr2Int32(yymsp[0].minor.yy0.z, NULL, 10); }
break;
case 122: /* cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */
case 124: /* cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ yytestcase(yyruleno==124);
-{ pCxt->pRootNode = createCreateTableStmt(pCxt, yymsp[-6].minor.yy287, yymsp[-5].minor.yy392, yymsp[-3].minor.yy148, yymsp[-1].minor.yy148, yymsp[0].minor.yy392); }
+{ pCxt->pRootNode = createCreateTableStmt(pCxt, yymsp[-6].minor.yy89, yymsp[-5].minor.yy616, yymsp[-3].minor.yy152, yymsp[-1].minor.yy152, yymsp[0].minor.yy616); }
break;
case 123: /* cmd ::= CREATE TABLE multi_create_clause */
-{ pCxt->pRootNode = createCreateMultiTableStmt(pCxt, yymsp[0].minor.yy148); }
+{ pCxt->pRootNode = createCreateMultiTableStmt(pCxt, yymsp[0].minor.yy152); }
break;
case 125: /* cmd ::= DROP TABLE multi_drop_clause */
-{ pCxt->pRootNode = createDropTableStmt(pCxt, yymsp[0].minor.yy148); }
+{ pCxt->pRootNode = createDropTableStmt(pCxt, yymsp[0].minor.yy152); }
break;
case 126: /* cmd ::= DROP STABLE exists_opt full_table_name */
-{ pCxt->pRootNode = createDropSuperTableStmt(pCxt, yymsp[-1].minor.yy287, yymsp[0].minor.yy392); }
+{ pCxt->pRootNode = createDropSuperTableStmt(pCxt, yymsp[-1].minor.yy89, yymsp[0].minor.yy616); }
break;
case 127: /* cmd ::= ALTER TABLE alter_table_clause */
case 295: /* cmd ::= query_or_subquery */ yytestcase(yyruleno==295);
-{ pCxt->pRootNode = yymsp[0].minor.yy392; }
+{ pCxt->pRootNode = yymsp[0].minor.yy616; }
break;
case 128: /* cmd ::= ALTER STABLE alter_table_clause */
-{ pCxt->pRootNode = setAlterSuperTableType(yymsp[0].minor.yy392); }
+{ pCxt->pRootNode = setAlterSuperTableType(yymsp[0].minor.yy616); }
break;
case 129: /* alter_table_clause ::= full_table_name alter_table_options */
-{ yylhsminor.yy392 = createAlterTableModifyOptions(pCxt, yymsp[-1].minor.yy392, yymsp[0].minor.yy392); }
- yymsp[-1].minor.yy392 = yylhsminor.yy392;
+{ yylhsminor.yy616 = createAlterTableModifyOptions(pCxt, yymsp[-1].minor.yy616, yymsp[0].minor.yy616); }
+ yymsp[-1].minor.yy616 = yylhsminor.yy616;
break;
case 130: /* alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */
-{ yylhsminor.yy392 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy392, TSDB_ALTER_TABLE_ADD_COLUMN, &yymsp[-1].minor.yy677, yymsp[0].minor.yy838); }
- yymsp[-4].minor.yy392 = yylhsminor.yy392;
+{ yylhsminor.yy616 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy616, TSDB_ALTER_TABLE_ADD_COLUMN, &yymsp[-1].minor.yy673, yymsp[0].minor.yy784); }
+ yymsp[-4].minor.yy616 = yylhsminor.yy616;
break;
case 131: /* alter_table_clause ::= full_table_name DROP COLUMN column_name */
-{ yylhsminor.yy392 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy392, TSDB_ALTER_TABLE_DROP_COLUMN, &yymsp[0].minor.yy677); }
- yymsp[-3].minor.yy392 = yylhsminor.yy392;
+{ yylhsminor.yy616 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy616, TSDB_ALTER_TABLE_DROP_COLUMN, &yymsp[0].minor.yy673); }
+ yymsp[-3].minor.yy616 = yylhsminor.yy616;
break;
case 132: /* alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */
-{ yylhsminor.yy392 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy392, TSDB_ALTER_TABLE_UPDATE_COLUMN_BYTES, &yymsp[-1].minor.yy677, yymsp[0].minor.yy838); }
- yymsp[-4].minor.yy392 = yylhsminor.yy392;
+{ yylhsminor.yy616 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy616, TSDB_ALTER_TABLE_UPDATE_COLUMN_BYTES, &yymsp[-1].minor.yy673, yymsp[0].minor.yy784); }
+ yymsp[-4].minor.yy616 = yylhsminor.yy616;
break;
case 133: /* alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */
-{ yylhsminor.yy392 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy392, TSDB_ALTER_TABLE_UPDATE_COLUMN_NAME, &yymsp[-1].minor.yy677, &yymsp[0].minor.yy677); }
- yymsp[-4].minor.yy392 = yylhsminor.yy392;
+{ yylhsminor.yy616 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy616, TSDB_ALTER_TABLE_UPDATE_COLUMN_NAME, &yymsp[-1].minor.yy673, &yymsp[0].minor.yy673); }
+ yymsp[-4].minor.yy616 = yylhsminor.yy616;
break;
case 134: /* alter_table_clause ::= full_table_name ADD TAG column_name type_name */
-{ yylhsminor.yy392 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy392, TSDB_ALTER_TABLE_ADD_TAG, &yymsp[-1].minor.yy677, yymsp[0].minor.yy838); }
- yymsp[-4].minor.yy392 = yylhsminor.yy392;
+{ yylhsminor.yy616 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy616, TSDB_ALTER_TABLE_ADD_TAG, &yymsp[-1].minor.yy673, yymsp[0].minor.yy784); }
+ yymsp[-4].minor.yy616 = yylhsminor.yy616;
break;
case 135: /* alter_table_clause ::= full_table_name DROP TAG column_name */
-{ yylhsminor.yy392 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy392, TSDB_ALTER_TABLE_DROP_TAG, &yymsp[0].minor.yy677); }
- yymsp[-3].minor.yy392 = yylhsminor.yy392;
+{ yylhsminor.yy616 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy616, TSDB_ALTER_TABLE_DROP_TAG, &yymsp[0].minor.yy673); }
+ yymsp[-3].minor.yy616 = yylhsminor.yy616;
break;
case 136: /* alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */
-{ yylhsminor.yy392 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy392, TSDB_ALTER_TABLE_UPDATE_TAG_BYTES, &yymsp[-1].minor.yy677, yymsp[0].minor.yy838); }
- yymsp[-4].minor.yy392 = yylhsminor.yy392;
+{ yylhsminor.yy616 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy616, TSDB_ALTER_TABLE_UPDATE_TAG_BYTES, &yymsp[-1].minor.yy673, yymsp[0].minor.yy784); }
+ yymsp[-4].minor.yy616 = yylhsminor.yy616;
break;
case 137: /* alter_table_clause ::= full_table_name RENAME TAG column_name column_name */
-{ yylhsminor.yy392 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy392, TSDB_ALTER_TABLE_UPDATE_TAG_NAME, &yymsp[-1].minor.yy677, &yymsp[0].minor.yy677); }
- yymsp[-4].minor.yy392 = yylhsminor.yy392;
+{ yylhsminor.yy616 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy616, TSDB_ALTER_TABLE_UPDATE_TAG_NAME, &yymsp[-1].minor.yy673, &yymsp[0].minor.yy673); }
+ yymsp[-4].minor.yy616 = yylhsminor.yy616;
break;
case 138: /* alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */
-{ yylhsminor.yy392 = createAlterTableSetTag(pCxt, yymsp[-5].minor.yy392, &yymsp[-2].minor.yy677, yymsp[0].minor.yy392); }
- yymsp[-5].minor.yy392 = yylhsminor.yy392;
+{ yylhsminor.yy616 = createAlterTableSetTag(pCxt, yymsp[-5].minor.yy616, &yymsp[-2].minor.yy673, yymsp[0].minor.yy616); }
+ yymsp[-5].minor.yy616 = yylhsminor.yy616;
break;
case 140: /* multi_create_clause ::= multi_create_clause create_subtable_clause */
case 143: /* multi_drop_clause ::= multi_drop_clause drop_table_clause */ yytestcase(yyruleno==143);
- case 392: /* when_then_list ::= when_then_list when_then_expr */ yytestcase(yyruleno==392);
-{ yylhsminor.yy148 = addNodeToList(pCxt, yymsp[-1].minor.yy148, yymsp[0].minor.yy392); }
- yymsp[-1].minor.yy148 = yylhsminor.yy148;
+ case 393: /* when_then_list ::= when_then_list when_then_expr */ yytestcase(yyruleno==393);
+{ yylhsminor.yy152 = addNodeToList(pCxt, yymsp[-1].minor.yy152, yymsp[0].minor.yy616); }
+ yymsp[-1].minor.yy152 = yylhsminor.yy152;
break;
case 141: /* create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_cols_opt TAGS NK_LP expression_list NK_RP table_options */
-{ yylhsminor.yy392 = createCreateSubTableClause(pCxt, yymsp[-9].minor.yy287, yymsp[-8].minor.yy392, yymsp[-6].minor.yy392, yymsp[-5].minor.yy148, yymsp[-2].minor.yy148, yymsp[0].minor.yy392); }
- yymsp[-9].minor.yy392 = yylhsminor.yy392;
+{ yylhsminor.yy616 = createCreateSubTableClause(pCxt, yymsp[-9].minor.yy89, yymsp[-8].minor.yy616, yymsp[-6].minor.yy616, yymsp[-5].minor.yy152, yymsp[-2].minor.yy152, yymsp[0].minor.yy616); }
+ yymsp[-9].minor.yy616 = yylhsminor.yy616;
break;
case 144: /* drop_table_clause ::= exists_opt full_table_name */
-{ yylhsminor.yy392 = createDropTableClause(pCxt, yymsp[-1].minor.yy287, yymsp[0].minor.yy392); }
- yymsp[-1].minor.yy392 = yylhsminor.yy392;
+{ yylhsminor.yy616 = createDropTableClause(pCxt, yymsp[-1].minor.yy89, yymsp[0].minor.yy616); }
+ yymsp[-1].minor.yy616 = yylhsminor.yy616;
break;
case 145: /* specific_cols_opt ::= */
case 176: /* tags_def_opt ::= */ yytestcase(yyruleno==176);
- case 455: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==455);
- case 477: /* group_by_clause_opt ::= */ yytestcase(yyruleno==477);
- case 496: /* order_by_clause_opt ::= */ yytestcase(yyruleno==496);
-{ yymsp[1].minor.yy148 = NULL; }
+ case 456: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==456);
+ case 478: /* group_by_clause_opt ::= */ yytestcase(yyruleno==478);
+ case 497: /* order_by_clause_opt ::= */ yytestcase(yyruleno==497);
+{ yymsp[1].minor.yy152 = NULL; }
break;
case 146: /* specific_cols_opt ::= NK_LP col_name_list NK_RP */
-{ yymsp[-2].minor.yy148 = yymsp[-1].minor.yy148; }
+{ yymsp[-2].minor.yy152 = yymsp[-1].minor.yy152; }
break;
case 147: /* full_table_name ::= table_name */
-{ yylhsminor.yy392 = createRealTableNode(pCxt, NULL, &yymsp[0].minor.yy677, NULL); }
- yymsp[0].minor.yy392 = yylhsminor.yy392;
+{ yylhsminor.yy616 = createRealTableNode(pCxt, NULL, &yymsp[0].minor.yy673, NULL); }
+ yymsp[0].minor.yy616 = yylhsminor.yy616;
break;
case 148: /* full_table_name ::= db_name NK_DOT table_name */
-{ yylhsminor.yy392 = createRealTableNode(pCxt, &yymsp[-2].minor.yy677, &yymsp[0].minor.yy677, NULL); }
- yymsp[-2].minor.yy392 = yylhsminor.yy392;
+{ yylhsminor.yy616 = createRealTableNode(pCxt, &yymsp[-2].minor.yy673, &yymsp[0].minor.yy673, NULL); }
+ yymsp[-2].minor.yy616 = yylhsminor.yy616;
break;
case 151: /* column_def ::= column_name type_name */
-{ yylhsminor.yy392 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy677, yymsp[0].minor.yy838, NULL); }
- yymsp[-1].minor.yy392 = yylhsminor.yy392;
+{ yylhsminor.yy616 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy673, yymsp[0].minor.yy784, NULL); }
+ yymsp[-1].minor.yy616 = yylhsminor.yy616;
break;
case 152: /* column_def ::= column_name type_name COMMENT NK_STRING */
-{ yylhsminor.yy392 = createColumnDefNode(pCxt, &yymsp[-3].minor.yy677, yymsp[-2].minor.yy838, &yymsp[0].minor.yy0); }
- yymsp[-3].minor.yy392 = yylhsminor.yy392;
+{ yylhsminor.yy616 = createColumnDefNode(pCxt, &yymsp[-3].minor.yy673, yymsp[-2].minor.yy784, &yymsp[0].minor.yy0); }
+ yymsp[-3].minor.yy616 = yylhsminor.yy616;
break;
case 153: /* type_name ::= BOOL */
-{ yymsp[0].minor.yy838 = createDataType(TSDB_DATA_TYPE_BOOL); }
+{ yymsp[0].minor.yy784 = createDataType(TSDB_DATA_TYPE_BOOL); }
break;
case 154: /* type_name ::= TINYINT */
-{ yymsp[0].minor.yy838 = createDataType(TSDB_DATA_TYPE_TINYINT); }
+{ yymsp[0].minor.yy784 = createDataType(TSDB_DATA_TYPE_TINYINT); }
break;
case 155: /* type_name ::= SMALLINT */
-{ yymsp[0].minor.yy838 = createDataType(TSDB_DATA_TYPE_SMALLINT); }
+{ yymsp[0].minor.yy784 = createDataType(TSDB_DATA_TYPE_SMALLINT); }
break;
case 156: /* type_name ::= INT */
case 157: /* type_name ::= INTEGER */ yytestcase(yyruleno==157);
-{ yymsp[0].minor.yy838 = createDataType(TSDB_DATA_TYPE_INT); }
+{ yymsp[0].minor.yy784 = createDataType(TSDB_DATA_TYPE_INT); }
break;
case 158: /* type_name ::= BIGINT */
-{ yymsp[0].minor.yy838 = createDataType(TSDB_DATA_TYPE_BIGINT); }
+{ yymsp[0].minor.yy784 = createDataType(TSDB_DATA_TYPE_BIGINT); }
break;
case 159: /* type_name ::= FLOAT */
-{ yymsp[0].minor.yy838 = createDataType(TSDB_DATA_TYPE_FLOAT); }
+{ yymsp[0].minor.yy784 = createDataType(TSDB_DATA_TYPE_FLOAT); }
break;
case 160: /* type_name ::= DOUBLE */
-{ yymsp[0].minor.yy838 = createDataType(TSDB_DATA_TYPE_DOUBLE); }
+{ yymsp[0].minor.yy784 = createDataType(TSDB_DATA_TYPE_DOUBLE); }
break;
case 161: /* type_name ::= BINARY NK_LP NK_INTEGER NK_RP */
-{ yymsp[-3].minor.yy838 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy0); }
+{ yymsp[-3].minor.yy784 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy0); }
break;
case 162: /* type_name ::= TIMESTAMP */
-{ yymsp[0].minor.yy838 = createDataType(TSDB_DATA_TYPE_TIMESTAMP); }
+{ yymsp[0].minor.yy784 = createDataType(TSDB_DATA_TYPE_TIMESTAMP); }
break;
case 163: /* type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */
-{ yymsp[-3].minor.yy838 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, &yymsp[-1].minor.yy0); }
+{ yymsp[-3].minor.yy784 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, &yymsp[-1].minor.yy0); }
break;
case 164: /* type_name ::= TINYINT UNSIGNED */
-{ yymsp[-1].minor.yy838 = createDataType(TSDB_DATA_TYPE_UTINYINT); }
+{ yymsp[-1].minor.yy784 = createDataType(TSDB_DATA_TYPE_UTINYINT); }
break;
case 165: /* type_name ::= SMALLINT UNSIGNED */
-{ yymsp[-1].minor.yy838 = createDataType(TSDB_DATA_TYPE_USMALLINT); }
+{ yymsp[-1].minor.yy784 = createDataType(TSDB_DATA_TYPE_USMALLINT); }
break;
case 166: /* type_name ::= INT UNSIGNED */
-{ yymsp[-1].minor.yy838 = createDataType(TSDB_DATA_TYPE_UINT); }
+{ yymsp[-1].minor.yy784 = createDataType(TSDB_DATA_TYPE_UINT); }
break;
case 167: /* type_name ::= BIGINT UNSIGNED */
-{ yymsp[-1].minor.yy838 = createDataType(TSDB_DATA_TYPE_UBIGINT); }
+{ yymsp[-1].minor.yy784 = createDataType(TSDB_DATA_TYPE_UBIGINT); }
break;
case 168: /* type_name ::= JSON */
-{ yymsp[0].minor.yy838 = createDataType(TSDB_DATA_TYPE_JSON); }
+{ yymsp[0].minor.yy784 = createDataType(TSDB_DATA_TYPE_JSON); }
break;
case 169: /* type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */
-{ yymsp[-3].minor.yy838 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, &yymsp[-1].minor.yy0); }
+{ yymsp[-3].minor.yy784 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, &yymsp[-1].minor.yy0); }
break;
case 170: /* type_name ::= MEDIUMBLOB */
-{ yymsp[0].minor.yy838 = createDataType(TSDB_DATA_TYPE_MEDIUMBLOB); }
+{ yymsp[0].minor.yy784 = createDataType(TSDB_DATA_TYPE_MEDIUMBLOB); }
break;
case 171: /* type_name ::= BLOB */
-{ yymsp[0].minor.yy838 = createDataType(TSDB_DATA_TYPE_BLOB); }
+{ yymsp[0].minor.yy784 = createDataType(TSDB_DATA_TYPE_BLOB); }
break;
case 172: /* type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */
-{ yymsp[-3].minor.yy838 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, &yymsp[-1].minor.yy0); }
+{ yymsp[-3].minor.yy784 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, &yymsp[-1].minor.yy0); }
break;
case 173: /* type_name ::= DECIMAL */
-{ yymsp[0].minor.yy838 = createDataType(TSDB_DATA_TYPE_DECIMAL); }
+{ yymsp[0].minor.yy784 = createDataType(TSDB_DATA_TYPE_DECIMAL); }
break;
case 174: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */
-{ yymsp[-3].minor.yy838 = createDataType(TSDB_DATA_TYPE_DECIMAL); }
+{ yymsp[-3].minor.yy784 = createDataType(TSDB_DATA_TYPE_DECIMAL); }
break;
case 175: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */
-{ yymsp[-5].minor.yy838 = createDataType(TSDB_DATA_TYPE_DECIMAL); }
+{ yymsp[-5].minor.yy784 = createDataType(TSDB_DATA_TYPE_DECIMAL); }
break;
case 177: /* tags_def_opt ::= tags_def */
- case 384: /* star_func_para_list ::= other_para_list */ yytestcase(yyruleno==384);
-{ yylhsminor.yy148 = yymsp[0].minor.yy148; }
- yymsp[0].minor.yy148 = yylhsminor.yy148;
+ case 385: /* star_func_para_list ::= other_para_list */ yytestcase(yyruleno==385);
+{ yylhsminor.yy152 = yymsp[0].minor.yy152; }
+ yymsp[0].minor.yy152 = yylhsminor.yy152;
break;
case 178: /* tags_def ::= TAGS NK_LP column_def_list NK_RP */
-{ yymsp[-3].minor.yy148 = yymsp[-1].minor.yy148; }
+{ yymsp[-3].minor.yy152 = yymsp[-1].minor.yy152; }
break;
case 179: /* table_options ::= */
-{ yymsp[1].minor.yy392 = createDefaultTableOptions(pCxt); }
+{ yymsp[1].minor.yy616 = createDefaultTableOptions(pCxt); }
break;
case 180: /* table_options ::= table_options COMMENT NK_STRING */
-{ yylhsminor.yy392 = setTableOption(pCxt, yymsp[-2].minor.yy392, TABLE_OPTION_COMMENT, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy392 = yylhsminor.yy392;
+{ yylhsminor.yy616 = setTableOption(pCxt, yymsp[-2].minor.yy616, TABLE_OPTION_COMMENT, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy616 = yylhsminor.yy616;
break;
case 181: /* table_options ::= table_options MAX_DELAY duration_list */
-{ yylhsminor.yy392 = setTableOption(pCxt, yymsp[-2].minor.yy392, TABLE_OPTION_MAXDELAY, yymsp[0].minor.yy148); }
- yymsp[-2].minor.yy392 = yylhsminor.yy392;
+{ yylhsminor.yy616 = setTableOption(pCxt, yymsp[-2].minor.yy616, TABLE_OPTION_MAXDELAY, yymsp[0].minor.yy152); }
+ yymsp[-2].minor.yy616 = yylhsminor.yy616;
break;
case 182: /* table_options ::= table_options WATERMARK duration_list */
-{ yylhsminor.yy392 = setTableOption(pCxt, yymsp[-2].minor.yy392, TABLE_OPTION_WATERMARK, yymsp[0].minor.yy148); }
- yymsp[-2].minor.yy392 = yylhsminor.yy392;
+{ yylhsminor.yy616 = setTableOption(pCxt, yymsp[-2].minor.yy616, TABLE_OPTION_WATERMARK, yymsp[0].minor.yy152); }
+ yymsp[-2].minor.yy616 = yylhsminor.yy616;
break;
case 183: /* table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */
-{ yylhsminor.yy392 = setTableOption(pCxt, yymsp[-4].minor.yy392, TABLE_OPTION_ROLLUP, yymsp[-1].minor.yy148); }
- yymsp[-4].minor.yy392 = yylhsminor.yy392;
+{ yylhsminor.yy616 = setTableOption(pCxt, yymsp[-4].minor.yy616, TABLE_OPTION_ROLLUP, yymsp[-1].minor.yy152); }
+ yymsp[-4].minor.yy616 = yylhsminor.yy616;
break;
case 184: /* table_options ::= table_options TTL NK_INTEGER */
-{ yylhsminor.yy392 = setTableOption(pCxt, yymsp[-2].minor.yy392, TABLE_OPTION_TTL, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy392 = yylhsminor.yy392;
+{ yylhsminor.yy616 = setTableOption(pCxt, yymsp[-2].minor.yy616, TABLE_OPTION_TTL, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy616 = yylhsminor.yy616;
break;
case 185: /* table_options ::= table_options SMA NK_LP col_name_list NK_RP */
-{ yylhsminor.yy392 = setTableOption(pCxt, yymsp[-4].minor.yy392, TABLE_OPTION_SMA, yymsp[-1].minor.yy148); }
- yymsp[-4].minor.yy392 = yylhsminor.yy392;
+{ yylhsminor.yy616 = setTableOption(pCxt, yymsp[-4].minor.yy616, TABLE_OPTION_SMA, yymsp[-1].minor.yy152); }
+ yymsp[-4].minor.yy616 = yylhsminor.yy616;
break;
case 186: /* alter_table_options ::= alter_table_option */
-{ yylhsminor.yy392 = createAlterTableOptions(pCxt); yylhsminor.yy392 = setTableOption(pCxt, yylhsminor.yy392, yymsp[0].minor.yy323.type, &yymsp[0].minor.yy323.val); }
- yymsp[0].minor.yy392 = yylhsminor.yy392;
+{ yylhsminor.yy616 = createAlterTableOptions(pCxt); yylhsminor.yy616 = setTableOption(pCxt, yylhsminor.yy616, yymsp[0].minor.yy669.type, &yymsp[0].minor.yy669.val); }
+ yymsp[0].minor.yy616 = yylhsminor.yy616;
break;
case 187: /* alter_table_options ::= alter_table_options alter_table_option */
-{ yylhsminor.yy392 = setTableOption(pCxt, yymsp[-1].minor.yy392, yymsp[0].minor.yy323.type, &yymsp[0].minor.yy323.val); }
- yymsp[-1].minor.yy392 = yylhsminor.yy392;
+{ yylhsminor.yy616 = setTableOption(pCxt, yymsp[-1].minor.yy616, yymsp[0].minor.yy669.type, &yymsp[0].minor.yy669.val); }
+ yymsp[-1].minor.yy616 = yylhsminor.yy616;
break;
case 188: /* alter_table_option ::= COMMENT NK_STRING */
-{ yymsp[-1].minor.yy323.type = TABLE_OPTION_COMMENT; yymsp[-1].minor.yy323.val = yymsp[0].minor.yy0; }
+{ yymsp[-1].minor.yy669.type = TABLE_OPTION_COMMENT; yymsp[-1].minor.yy669.val = yymsp[0].minor.yy0; }
break;
case 189: /* alter_table_option ::= TTL NK_INTEGER */
-{ yymsp[-1].minor.yy323.type = TABLE_OPTION_TTL; yymsp[-1].minor.yy323.val = yymsp[0].minor.yy0; }
+{ yymsp[-1].minor.yy669.type = TABLE_OPTION_TTL; yymsp[-1].minor.yy669.val = yymsp[0].minor.yy0; }
break;
case 190: /* duration_list ::= duration_literal */
case 351: /* expression_list ::= expr_or_subquery */ yytestcase(yyruleno==351);
-{ yylhsminor.yy148 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy392)); }
- yymsp[0].minor.yy148 = yylhsminor.yy148;
+{ yylhsminor.yy152 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy616)); }
+ yymsp[0].minor.yy152 = yylhsminor.yy152;
break;
case 191: /* duration_list ::= duration_list NK_COMMA duration_literal */
case 352: /* expression_list ::= expression_list NK_COMMA expr_or_subquery */ yytestcase(yyruleno==352);
-{ yylhsminor.yy148 = addNodeToList(pCxt, yymsp[-2].minor.yy148, releaseRawExprNode(pCxt, yymsp[0].minor.yy392)); }
- yymsp[-2].minor.yy148 = yylhsminor.yy148;
+{ yylhsminor.yy152 = addNodeToList(pCxt, yymsp[-2].minor.yy152, releaseRawExprNode(pCxt, yymsp[0].minor.yy616)); }
+ yymsp[-2].minor.yy152 = yylhsminor.yy152;
break;
case 194: /* rollup_func_name ::= function_name */
-{ yylhsminor.yy392 = createFunctionNode(pCxt, &yymsp[0].minor.yy677, NULL); }
- yymsp[0].minor.yy392 = yylhsminor.yy392;
+{ yylhsminor.yy616 = createFunctionNode(pCxt, &yymsp[0].minor.yy673, NULL); }
+ yymsp[0].minor.yy616 = yylhsminor.yy616;
break;
case 195: /* rollup_func_name ::= FIRST */
case 196: /* rollup_func_name ::= LAST */ yytestcase(yyruleno==196);
-{ yylhsminor.yy392 = createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL); }
- yymsp[0].minor.yy392 = yylhsminor.yy392;
+{ yylhsminor.yy616 = createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL); }
+ yymsp[0].minor.yy616 = yylhsminor.yy616;
break;
case 199: /* col_name ::= column_name */
-{ yylhsminor.yy392 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy677); }
- yymsp[0].minor.yy392 = yylhsminor.yy392;
+{ yylhsminor.yy616 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy673); }
+ yymsp[0].minor.yy616 = yylhsminor.yy616;
break;
case 200: /* cmd ::= SHOW DNODES */
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DNODES_STMT); }
@@ -4246,13 +4296,13 @@ static YYACTIONTYPE yy_reduce(
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DATABASES_STMT); }
break;
case 203: /* cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */
-{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TABLES_STMT, yymsp[-2].minor.yy392, yymsp[0].minor.yy392, OP_TYPE_LIKE); }
+{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TABLES_STMT, yymsp[-2].minor.yy616, yymsp[0].minor.yy616, OP_TYPE_LIKE); }
break;
case 204: /* cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */
-{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_STABLES_STMT, yymsp[-2].minor.yy392, yymsp[0].minor.yy392, OP_TYPE_LIKE); }
+{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_STABLES_STMT, yymsp[-2].minor.yy616, yymsp[0].minor.yy616, OP_TYPE_LIKE); }
break;
case 205: /* cmd ::= SHOW db_name_cond_opt VGROUPS */
-{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, yymsp[-1].minor.yy392, NULL, OP_TYPE_LIKE); }
+{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, yymsp[-1].minor.yy616, NULL, OP_TYPE_LIKE); }
break;
case 206: /* cmd ::= SHOW MNODES */
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_MNODES_STMT); }
@@ -4267,7 +4317,7 @@ static YYACTIONTYPE yy_reduce(
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_FUNCTIONS_STMT); }
break;
case 210: /* cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */
-{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, yymsp[0].minor.yy392, yymsp[-1].minor.yy392, OP_TYPE_EQUAL); }
+{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, yymsp[0].minor.yy616, yymsp[-1].minor.yy616, OP_TYPE_EQUAL); }
break;
case 211: /* cmd ::= SHOW STREAMS */
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_STREAMS_STMT); }
@@ -4286,13 +4336,13 @@ static YYACTIONTYPE yy_reduce(
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LICENCES_STMT); }
break;
case 217: /* cmd ::= SHOW CREATE DATABASE db_name */
-{ pCxt->pRootNode = createShowCreateDatabaseStmt(pCxt, &yymsp[0].minor.yy677); }
+{ pCxt->pRootNode = createShowCreateDatabaseStmt(pCxt, &yymsp[0].minor.yy673); }
break;
case 218: /* cmd ::= SHOW CREATE TABLE full_table_name */
-{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_TABLE_STMT, yymsp[0].minor.yy392); }
+{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_TABLE_STMT, yymsp[0].minor.yy616); }
break;
case 219: /* cmd ::= SHOW CREATE STABLE full_table_name */
-{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_STABLE_STMT, yymsp[0].minor.yy392); }
+{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_STABLE_STMT, yymsp[0].minor.yy616); }
break;
case 220: /* cmd ::= SHOW QUERIES */
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QUERIES_STMT); }
@@ -4325,7 +4375,7 @@ static YYACTIONTYPE yy_reduce(
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TRANSACTIONS_STMT); }
break;
case 230: /* cmd ::= SHOW TABLE DISTRIBUTED full_table_name */
-{ pCxt->pRootNode = createShowTableDistributedStmt(pCxt, yymsp[0].minor.yy392); }
+{ pCxt->pRootNode = createShowTableDistributedStmt(pCxt, yymsp[0].minor.yy616); }
break;
case 231: /* cmd ::= SHOW CONSUMERS */
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CONSUMERS_STMT); }
@@ -4334,7 +4384,7 @@ static YYACTIONTYPE yy_reduce(
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SUBSCRIPTIONS_STMT); }
break;
case 233: /* cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */
-{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TAGS_STMT, yymsp[0].minor.yy392, yymsp[-1].minor.yy392, OP_TYPE_EQUAL); }
+{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TAGS_STMT, yymsp[0].minor.yy616, yymsp[-1].minor.yy616, OP_TYPE_EQUAL); }
break;
case 234: /* cmd ::= SHOW VNODES NK_INTEGER */
{ pCxt->pRootNode = createShowVnodesStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0), NULL); }
@@ -4344,145 +4394,145 @@ static YYACTIONTYPE yy_reduce(
break;
case 236: /* db_name_cond_opt ::= */
case 241: /* from_db_opt ::= */ yytestcase(yyruleno==241);
-{ yymsp[1].minor.yy392 = createDefaultDatabaseCondValue(pCxt); }
+{ yymsp[1].minor.yy616 = createDefaultDatabaseCondValue(pCxt); }
break;
case 237: /* db_name_cond_opt ::= db_name NK_DOT */
-{ yylhsminor.yy392 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy677); }
- yymsp[-1].minor.yy392 = yylhsminor.yy392;
+{ yylhsminor.yy616 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy673); }
+ yymsp[-1].minor.yy616 = yylhsminor.yy616;
break;
case 238: /* like_pattern_opt ::= */
case 283: /* subtable_opt ::= */ yytestcase(yyruleno==283);
- case 394: /* case_when_else_opt ::= */ yytestcase(yyruleno==394);
- case 424: /* from_clause_opt ::= */ yytestcase(yyruleno==424);
- case 453: /* where_clause_opt ::= */ yytestcase(yyruleno==453);
- case 462: /* twindow_clause_opt ::= */ yytestcase(yyruleno==462);
- case 467: /* sliding_opt ::= */ yytestcase(yyruleno==467);
- case 469: /* fill_opt ::= */ yytestcase(yyruleno==469);
- case 481: /* having_clause_opt ::= */ yytestcase(yyruleno==481);
- case 483: /* range_opt ::= */ yytestcase(yyruleno==483);
- case 485: /* every_opt ::= */ yytestcase(yyruleno==485);
- case 498: /* slimit_clause_opt ::= */ yytestcase(yyruleno==498);
- case 502: /* limit_clause_opt ::= */ yytestcase(yyruleno==502);
-{ yymsp[1].minor.yy392 = NULL; }
+ case 395: /* case_when_else_opt ::= */ yytestcase(yyruleno==395);
+ case 425: /* from_clause_opt ::= */ yytestcase(yyruleno==425);
+ case 454: /* where_clause_opt ::= */ yytestcase(yyruleno==454);
+ case 463: /* twindow_clause_opt ::= */ yytestcase(yyruleno==463);
+ case 468: /* sliding_opt ::= */ yytestcase(yyruleno==468);
+ case 470: /* fill_opt ::= */ yytestcase(yyruleno==470);
+ case 482: /* having_clause_opt ::= */ yytestcase(yyruleno==482);
+ case 484: /* range_opt ::= */ yytestcase(yyruleno==484);
+ case 486: /* every_opt ::= */ yytestcase(yyruleno==486);
+ case 499: /* slimit_clause_opt ::= */ yytestcase(yyruleno==499);
+ case 503: /* limit_clause_opt ::= */ yytestcase(yyruleno==503);
+{ yymsp[1].minor.yy616 = NULL; }
break;
case 239: /* like_pattern_opt ::= LIKE NK_STRING */
-{ yymsp[-1].minor.yy392 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); }
+{ yymsp[-1].minor.yy616 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); }
break;
case 240: /* table_name_cond ::= table_name */
-{ yylhsminor.yy392 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy677); }
- yymsp[0].minor.yy392 = yylhsminor.yy392;
+{ yylhsminor.yy616 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy673); }
+ yymsp[0].minor.yy616 = yylhsminor.yy616;
break;
case 242: /* from_db_opt ::= FROM db_name */
-{ yymsp[-1].minor.yy392 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy677); }
+{ yymsp[-1].minor.yy616 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy673); }
break;
case 243: /* cmd ::= CREATE SMA INDEX not_exists_opt full_table_name ON full_table_name index_options */
-{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_SMA, yymsp[-4].minor.yy287, yymsp[-3].minor.yy392, yymsp[-1].minor.yy392, NULL, yymsp[0].minor.yy392); }
+{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_SMA, yymsp[-4].minor.yy89, yymsp[-3].minor.yy616, yymsp[-1].minor.yy616, NULL, yymsp[0].minor.yy616); }
break;
case 244: /* cmd ::= DROP INDEX exists_opt full_table_name */
-{ pCxt->pRootNode = createDropIndexStmt(pCxt, yymsp[-1].minor.yy287, yymsp[0].minor.yy392); }
+{ pCxt->pRootNode = createDropIndexStmt(pCxt, yymsp[-1].minor.yy89, yymsp[0].minor.yy616); }
break;
case 245: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */
-{ yymsp[-9].minor.yy392 = createIndexOption(pCxt, yymsp[-7].minor.yy148, releaseRawExprNode(pCxt, yymsp[-3].minor.yy392), NULL, yymsp[-1].minor.yy392, yymsp[0].minor.yy392); }
+{ yymsp[-9].minor.yy616 = createIndexOption(pCxt, yymsp[-7].minor.yy152, releaseRawExprNode(pCxt, yymsp[-3].minor.yy616), NULL, yymsp[-1].minor.yy616, yymsp[0].minor.yy616); }
break;
case 246: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt sma_stream_opt */
-{ yymsp[-11].minor.yy392 = createIndexOption(pCxt, yymsp[-9].minor.yy148, releaseRawExprNode(pCxt, yymsp[-5].minor.yy392), releaseRawExprNode(pCxt, yymsp[-3].minor.yy392), yymsp[-1].minor.yy392, yymsp[0].minor.yy392); }
+{ yymsp[-11].minor.yy616 = createIndexOption(pCxt, yymsp[-9].minor.yy152, releaseRawExprNode(pCxt, yymsp[-5].minor.yy616), releaseRawExprNode(pCxt, yymsp[-3].minor.yy616), yymsp[-1].minor.yy616, yymsp[0].minor.yy616); }
break;
case 249: /* func ::= function_name NK_LP expression_list NK_RP */
-{ yylhsminor.yy392 = createFunctionNode(pCxt, &yymsp[-3].minor.yy677, yymsp[-1].minor.yy148); }
- yymsp[-3].minor.yy392 = yylhsminor.yy392;
+{ yylhsminor.yy616 = createFunctionNode(pCxt, &yymsp[-3].minor.yy673, yymsp[-1].minor.yy152); }
+ yymsp[-3].minor.yy616 = yylhsminor.yy616;
break;
case 250: /* sma_stream_opt ::= */
case 277: /* stream_options ::= */ yytestcase(yyruleno==277);
-{ yymsp[1].minor.yy392 = createStreamOptions(pCxt); }
+{ yymsp[1].minor.yy616 = createStreamOptions(pCxt); }
break;
case 251: /* sma_stream_opt ::= stream_options WATERMARK duration_literal */
case 281: /* stream_options ::= stream_options WATERMARK duration_literal */ yytestcase(yyruleno==281);
-{ ((SStreamOptions*)yymsp[-2].minor.yy392)->pWatermark = releaseRawExprNode(pCxt, yymsp[0].minor.yy392); yylhsminor.yy392 = yymsp[-2].minor.yy392; }
- yymsp[-2].minor.yy392 = yylhsminor.yy392;
+{ ((SStreamOptions*)yymsp[-2].minor.yy616)->pWatermark = releaseRawExprNode(pCxt, yymsp[0].minor.yy616); yylhsminor.yy616 = yymsp[-2].minor.yy616; }
+ yymsp[-2].minor.yy616 = yylhsminor.yy616;
break;
case 252: /* sma_stream_opt ::= stream_options MAX_DELAY duration_literal */
-{ ((SStreamOptions*)yymsp[-2].minor.yy392)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy392); yylhsminor.yy392 = yymsp[-2].minor.yy392; }
- yymsp[-2].minor.yy392 = yylhsminor.yy392;
+{ ((SStreamOptions*)yymsp[-2].minor.yy616)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy616); yylhsminor.yy616 = yymsp[-2].minor.yy616; }
+ yymsp[-2].minor.yy616 = yylhsminor.yy616;
break;
case 253: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */
-{ pCxt->pRootNode = createCreateTopicStmtUseQuery(pCxt, yymsp[-3].minor.yy287, &yymsp[-2].minor.yy677, yymsp[0].minor.yy392); }
+{ pCxt->pRootNode = createCreateTopicStmtUseQuery(pCxt, yymsp[-3].minor.yy89, &yymsp[-2].minor.yy673, yymsp[0].minor.yy616); }
break;
case 254: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name */
-{ pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-4].minor.yy287, &yymsp[-3].minor.yy677, &yymsp[0].minor.yy677, false); }
+{ pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-4].minor.yy89, &yymsp[-3].minor.yy673, &yymsp[0].minor.yy673, false); }
break;
case 255: /* cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS DATABASE db_name */
-{ pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-6].minor.yy287, &yymsp[-5].minor.yy677, &yymsp[0].minor.yy677, true); }
+{ pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-6].minor.yy89, &yymsp[-5].minor.yy673, &yymsp[0].minor.yy673, true); }
break;
case 256: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name */
-{ pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-4].minor.yy287, &yymsp[-3].minor.yy677, yymsp[0].minor.yy392, false); }
+{ pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-4].minor.yy89, &yymsp[-3].minor.yy673, yymsp[0].minor.yy616, false); }
break;
case 257: /* cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS STABLE full_table_name */
-{ pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-6].minor.yy287, &yymsp[-5].minor.yy677, yymsp[0].minor.yy392, true); }
+{ pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-6].minor.yy89, &yymsp[-5].minor.yy673, yymsp[0].minor.yy616, true); }
break;
case 258: /* cmd ::= DROP TOPIC exists_opt topic_name */
-{ pCxt->pRootNode = createDropTopicStmt(pCxt, yymsp[-1].minor.yy287, &yymsp[0].minor.yy677); }
+{ pCxt->pRootNode = createDropTopicStmt(pCxt, yymsp[-1].minor.yy89, &yymsp[0].minor.yy673); }
break;
case 259: /* cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */
-{ pCxt->pRootNode = createDropCGroupStmt(pCxt, yymsp[-3].minor.yy287, &yymsp[-2].minor.yy677, &yymsp[0].minor.yy677); }
+{ pCxt->pRootNode = createDropCGroupStmt(pCxt, yymsp[-3].minor.yy89, &yymsp[-2].minor.yy673, &yymsp[0].minor.yy673); }
break;
case 260: /* cmd ::= DESC full_table_name */
case 261: /* cmd ::= DESCRIBE full_table_name */ yytestcase(yyruleno==261);
-{ pCxt->pRootNode = createDescribeStmt(pCxt, yymsp[0].minor.yy392); }
+{ pCxt->pRootNode = createDescribeStmt(pCxt, yymsp[0].minor.yy616); }
break;
case 262: /* cmd ::= RESET QUERY CACHE */
{ pCxt->pRootNode = createResetQueryCacheStmt(pCxt); }
break;
case 263: /* cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */
-{ pCxt->pRootNode = createExplainStmt(pCxt, yymsp[-2].minor.yy287, yymsp[-1].minor.yy392, yymsp[0].minor.yy392); }
+{ pCxt->pRootNode = createExplainStmt(pCxt, yymsp[-2].minor.yy89, yymsp[-1].minor.yy616, yymsp[0].minor.yy616); }
break;
case 265: /* analyze_opt ::= ANALYZE */
case 272: /* agg_func_opt ::= AGGREGATE */ yytestcase(yyruleno==272);
- case 444: /* set_quantifier_opt ::= DISTINCT */ yytestcase(yyruleno==444);
-{ yymsp[0].minor.yy287 = true; }
+ case 445: /* set_quantifier_opt ::= DISTINCT */ yytestcase(yyruleno==445);
+{ yymsp[0].minor.yy89 = true; }
break;
case 266: /* explain_options ::= */
-{ yymsp[1].minor.yy392 = createDefaultExplainOptions(pCxt); }
+{ yymsp[1].minor.yy616 = createDefaultExplainOptions(pCxt); }
break;
case 267: /* explain_options ::= explain_options VERBOSE NK_BOOL */
-{ yylhsminor.yy392 = setExplainVerbose(pCxt, yymsp[-2].minor.yy392, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy392 = yylhsminor.yy392;
+{ yylhsminor.yy616 = setExplainVerbose(pCxt, yymsp[-2].minor.yy616, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy616 = yylhsminor.yy616;
break;
case 268: /* explain_options ::= explain_options RATIO NK_FLOAT */
-{ yylhsminor.yy392 = setExplainRatio(pCxt, yymsp[-2].minor.yy392, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy392 = yylhsminor.yy392;
+{ yylhsminor.yy616 = setExplainRatio(pCxt, yymsp[-2].minor.yy616, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy616 = yylhsminor.yy616;
break;
case 269: /* 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.yy287, yymsp[-8].minor.yy287, &yymsp[-5].minor.yy677, &yymsp[-3].minor.yy0, yymsp[-1].minor.yy838, yymsp[0].minor.yy172); }
+{ pCxt->pRootNode = createCreateFunctionStmt(pCxt, yymsp[-6].minor.yy89, yymsp[-8].minor.yy89, &yymsp[-5].minor.yy673, &yymsp[-3].minor.yy0, yymsp[-1].minor.yy784, yymsp[0].minor.yy452); }
break;
case 270: /* cmd ::= DROP FUNCTION exists_opt function_name */
-{ pCxt->pRootNode = createDropFunctionStmt(pCxt, yymsp[-1].minor.yy287, &yymsp[0].minor.yy677); }
+{ pCxt->pRootNode = createDropFunctionStmt(pCxt, yymsp[-1].minor.yy89, &yymsp[0].minor.yy673); }
break;
case 275: /* cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name tags_def_opt subtable_opt AS query_or_subquery */
-{ pCxt->pRootNode = createCreateStreamStmt(pCxt, yymsp[-8].minor.yy287, &yymsp[-7].minor.yy677, yymsp[-4].minor.yy392, yymsp[-6].minor.yy392, yymsp[-3].minor.yy148, yymsp[-2].minor.yy392, yymsp[0].minor.yy392); }
+{ pCxt->pRootNode = createCreateStreamStmt(pCxt, yymsp[-8].minor.yy89, &yymsp[-7].minor.yy673, yymsp[-4].minor.yy616, yymsp[-6].minor.yy616, yymsp[-3].minor.yy152, yymsp[-2].minor.yy616, yymsp[0].minor.yy616); }
break;
case 276: /* cmd ::= DROP STREAM exists_opt stream_name */
-{ pCxt->pRootNode = createDropStreamStmt(pCxt, yymsp[-1].minor.yy287, &yymsp[0].minor.yy677); }
+{ pCxt->pRootNode = createDropStreamStmt(pCxt, yymsp[-1].minor.yy89, &yymsp[0].minor.yy673); }
break;
case 278: /* stream_options ::= stream_options TRIGGER AT_ONCE */
-{ ((SStreamOptions*)yymsp[-2].minor.yy392)->triggerType = STREAM_TRIGGER_AT_ONCE; yylhsminor.yy392 = yymsp[-2].minor.yy392; }
- yymsp[-2].minor.yy392 = yylhsminor.yy392;
+{ ((SStreamOptions*)yymsp[-2].minor.yy616)->triggerType = STREAM_TRIGGER_AT_ONCE; yylhsminor.yy616 = yymsp[-2].minor.yy616; }
+ yymsp[-2].minor.yy616 = yylhsminor.yy616;
break;
case 279: /* stream_options ::= stream_options TRIGGER WINDOW_CLOSE */
-{ ((SStreamOptions*)yymsp[-2].minor.yy392)->triggerType = STREAM_TRIGGER_WINDOW_CLOSE; yylhsminor.yy392 = yymsp[-2].minor.yy392; }
- yymsp[-2].minor.yy392 = yylhsminor.yy392;
+{ ((SStreamOptions*)yymsp[-2].minor.yy616)->triggerType = STREAM_TRIGGER_WINDOW_CLOSE; yylhsminor.yy616 = yymsp[-2].minor.yy616; }
+ yymsp[-2].minor.yy616 = yylhsminor.yy616;
break;
case 280: /* stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */
-{ ((SStreamOptions*)yymsp[-3].minor.yy392)->triggerType = STREAM_TRIGGER_MAX_DELAY; ((SStreamOptions*)yymsp[-3].minor.yy392)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy392); yylhsminor.yy392 = yymsp[-3].minor.yy392; }
- yymsp[-3].minor.yy392 = yylhsminor.yy392;
+{ ((SStreamOptions*)yymsp[-3].minor.yy616)->triggerType = STREAM_TRIGGER_MAX_DELAY; ((SStreamOptions*)yymsp[-3].minor.yy616)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy616); yylhsminor.yy616 = yymsp[-3].minor.yy616; }
+ yymsp[-3].minor.yy616 = yylhsminor.yy616;
break;
case 282: /* stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */
-{ ((SStreamOptions*)yymsp[-3].minor.yy392)->ignoreExpired = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); yylhsminor.yy392 = yymsp[-3].minor.yy392; }
- yymsp[-3].minor.yy392 = yylhsminor.yy392;
+{ ((SStreamOptions*)yymsp[-3].minor.yy616)->ignoreExpired = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); yylhsminor.yy616 = yymsp[-3].minor.yy616; }
+ yymsp[-3].minor.yy616 = yylhsminor.yy616;
break;
case 284: /* subtable_opt ::= SUBTABLE NK_LP expression NK_RP */
- case 468: /* sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ yytestcase(yyruleno==468);
- case 486: /* every_opt ::= EVERY NK_LP duration_literal NK_RP */ yytestcase(yyruleno==486);
-{ yymsp[-3].minor.yy392 = releaseRawExprNode(pCxt, yymsp[-1].minor.yy392); }
+ case 469: /* sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ yytestcase(yyruleno==469);
+ case 487: /* every_opt ::= EVERY NK_LP duration_literal NK_RP */ yytestcase(yyruleno==487);
+{ yymsp[-3].minor.yy616 = releaseRawExprNode(pCxt, yymsp[-1].minor.yy616); }
break;
case 285: /* cmd ::= KILL CONNECTION NK_INTEGER */
{ pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_CONNECTION_STMT, &yymsp[0].minor.yy0); }
@@ -4500,42 +4550,42 @@ static YYACTIONTYPE yy_reduce(
{ pCxt->pRootNode = createMergeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); }
break;
case 290: /* cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */
-{ pCxt->pRootNode = createRedistributeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy148); }
+{ pCxt->pRootNode = createRedistributeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy152); }
break;
case 291: /* cmd ::= SPLIT VGROUP NK_INTEGER */
{ pCxt->pRootNode = createSplitVgroupStmt(pCxt, &yymsp[0].minor.yy0); }
break;
case 292: /* dnode_list ::= DNODE NK_INTEGER */
-{ yymsp[-1].minor.yy148 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); }
+{ yymsp[-1].minor.yy152 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); }
break;
case 294: /* cmd ::= DELETE FROM full_table_name where_clause_opt */
-{ pCxt->pRootNode = createDeleteStmt(pCxt, yymsp[-1].minor.yy392, yymsp[0].minor.yy392); }
+{ pCxt->pRootNode = createDeleteStmt(pCxt, yymsp[-1].minor.yy616, yymsp[0].minor.yy616); }
break;
case 296: /* cmd ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */
-{ pCxt->pRootNode = createInsertStmt(pCxt, yymsp[-4].minor.yy392, yymsp[-2].minor.yy148, yymsp[0].minor.yy392); }
+{ pCxt->pRootNode = createInsertStmt(pCxt, yymsp[-4].minor.yy616, yymsp[-2].minor.yy152, yymsp[0].minor.yy616); }
break;
case 297: /* cmd ::= INSERT INTO full_table_name query_or_subquery */
-{ pCxt->pRootNode = createInsertStmt(pCxt, yymsp[-1].minor.yy392, NULL, yymsp[0].minor.yy392); }
+{ pCxt->pRootNode = createInsertStmt(pCxt, yymsp[-1].minor.yy616, NULL, yymsp[0].minor.yy616); }
break;
case 298: /* literal ::= NK_INTEGER */
-{ yylhsminor.yy392 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0)); }
- yymsp[0].minor.yy392 = yylhsminor.yy392;
+{ yylhsminor.yy616 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0)); }
+ yymsp[0].minor.yy616 = yylhsminor.yy616;
break;
case 299: /* literal ::= NK_FLOAT */
-{ yylhsminor.yy392 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0)); }
- yymsp[0].minor.yy392 = yylhsminor.yy392;
+{ yylhsminor.yy616 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0)); }
+ yymsp[0].minor.yy616 = yylhsminor.yy616;
break;
case 300: /* literal ::= NK_STRING */
-{ yylhsminor.yy392 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); }
- yymsp[0].minor.yy392 = yylhsminor.yy392;
+{ yylhsminor.yy616 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); }
+ yymsp[0].minor.yy616 = yylhsminor.yy616;
break;
case 301: /* literal ::= NK_BOOL */
-{ yylhsminor.yy392 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0)); }
- yymsp[0].minor.yy392 = yylhsminor.yy392;
+{ yylhsminor.yy616 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0)); }
+ yymsp[0].minor.yy616 = yylhsminor.yy616;
break;
case 302: /* literal ::= TIMESTAMP NK_STRING */
-{ yylhsminor.yy392 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0)); }
- yymsp[-1].minor.yy392 = yylhsminor.yy392;
+{ yylhsminor.yy616 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0)); }
+ yymsp[-1].minor.yy616 = yylhsminor.yy616;
break;
case 303: /* literal ::= duration_literal */
case 313: /* signed_literal ::= signed */ yytestcase(yyruleno==313);
@@ -4546,184 +4596,184 @@ static YYACTIONTYPE yy_reduce(
case 337: /* expression ::= column_reference */ yytestcase(yyruleno==337);
case 338: /* expression ::= function_expression */ yytestcase(yyruleno==338);
case 339: /* expression ::= case_when_expression */ yytestcase(yyruleno==339);
- case 367: /* function_expression ::= literal_func */ yytestcase(yyruleno==367);
- case 416: /* boolean_value_expression ::= boolean_primary */ yytestcase(yyruleno==416);
- case 420: /* boolean_primary ::= predicate */ yytestcase(yyruleno==420);
- case 422: /* common_expression ::= expr_or_subquery */ yytestcase(yyruleno==422);
- case 423: /* common_expression ::= boolean_value_expression */ yytestcase(yyruleno==423);
- case 426: /* table_reference_list ::= table_reference */ yytestcase(yyruleno==426);
- case 428: /* table_reference ::= table_primary */ yytestcase(yyruleno==428);
- case 429: /* table_reference ::= joined_table */ yytestcase(yyruleno==429);
- case 433: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==433);
- case 488: /* query_simple ::= query_specification */ yytestcase(yyruleno==488);
- case 489: /* query_simple ::= union_query_expression */ yytestcase(yyruleno==489);
- case 492: /* query_simple_or_subquery ::= query_simple */ yytestcase(yyruleno==492);
- case 494: /* query_or_subquery ::= query_expression */ yytestcase(yyruleno==494);
-{ yylhsminor.yy392 = yymsp[0].minor.yy392; }
- yymsp[0].minor.yy392 = yylhsminor.yy392;
+ case 368: /* function_expression ::= literal_func */ yytestcase(yyruleno==368);
+ case 417: /* boolean_value_expression ::= boolean_primary */ yytestcase(yyruleno==417);
+ case 421: /* boolean_primary ::= predicate */ yytestcase(yyruleno==421);
+ case 423: /* common_expression ::= expr_or_subquery */ yytestcase(yyruleno==423);
+ case 424: /* common_expression ::= boolean_value_expression */ yytestcase(yyruleno==424);
+ case 427: /* table_reference_list ::= table_reference */ yytestcase(yyruleno==427);
+ case 429: /* table_reference ::= table_primary */ yytestcase(yyruleno==429);
+ case 430: /* table_reference ::= joined_table */ yytestcase(yyruleno==430);
+ case 434: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==434);
+ case 489: /* query_simple ::= query_specification */ yytestcase(yyruleno==489);
+ case 490: /* query_simple ::= union_query_expression */ yytestcase(yyruleno==490);
+ case 493: /* query_simple_or_subquery ::= query_simple */ yytestcase(yyruleno==493);
+ case 495: /* query_or_subquery ::= query_expression */ yytestcase(yyruleno==495);
+{ yylhsminor.yy616 = yymsp[0].minor.yy616; }
+ yymsp[0].minor.yy616 = yylhsminor.yy616;
break;
case 304: /* literal ::= NULL */
-{ yylhsminor.yy392 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0)); }
- yymsp[0].minor.yy392 = yylhsminor.yy392;
+{ yylhsminor.yy616 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0)); }
+ yymsp[0].minor.yy616 = yylhsminor.yy616;
break;
case 305: /* literal ::= NK_QUESTION */
-{ yylhsminor.yy392 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0)); }
- yymsp[0].minor.yy392 = yylhsminor.yy392;
+{ yylhsminor.yy616 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0)); }
+ yymsp[0].minor.yy616 = yylhsminor.yy616;
break;
case 306: /* duration_literal ::= NK_VARIABLE */
-{ yylhsminor.yy392 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); }
- yymsp[0].minor.yy392 = yylhsminor.yy392;
+{ yylhsminor.yy616 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); }
+ yymsp[0].minor.yy616 = yylhsminor.yy616;
break;
case 307: /* signed ::= NK_INTEGER */
-{ yylhsminor.yy392 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); }
- yymsp[0].minor.yy392 = yylhsminor.yy392;
+{ yylhsminor.yy616 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); }
+ yymsp[0].minor.yy616 = yylhsminor.yy616;
break;
case 308: /* signed ::= NK_PLUS NK_INTEGER */
-{ yymsp[-1].minor.yy392 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); }
+{ yymsp[-1].minor.yy616 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); }
break;
case 309: /* 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.yy392 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &t);
+ yylhsminor.yy616 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &t);
}
- yymsp[-1].minor.yy392 = yylhsminor.yy392;
+ yymsp[-1].minor.yy616 = yylhsminor.yy616;
break;
case 310: /* signed ::= NK_FLOAT */
-{ yylhsminor.yy392 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); }
- yymsp[0].minor.yy392 = yylhsminor.yy392;
+{ yylhsminor.yy616 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); }
+ yymsp[0].minor.yy616 = yylhsminor.yy616;
break;
case 311: /* signed ::= NK_PLUS NK_FLOAT */
-{ yymsp[-1].minor.yy392 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); }
+{ yymsp[-1].minor.yy616 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); }
break;
case 312: /* 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.yy392 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &t);
+ yylhsminor.yy616 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &t);
}
- yymsp[-1].minor.yy392 = yylhsminor.yy392;
+ yymsp[-1].minor.yy616 = yylhsminor.yy616;
break;
case 314: /* signed_literal ::= NK_STRING */
-{ yylhsminor.yy392 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); }
- yymsp[0].minor.yy392 = yylhsminor.yy392;
+{ yylhsminor.yy616 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); }
+ yymsp[0].minor.yy616 = yylhsminor.yy616;
break;
case 315: /* signed_literal ::= NK_BOOL */
-{ yylhsminor.yy392 = createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0); }
- yymsp[0].minor.yy392 = yylhsminor.yy392;
+{ yylhsminor.yy616 = createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0); }
+ yymsp[0].minor.yy616 = yylhsminor.yy616;
break;
case 316: /* signed_literal ::= TIMESTAMP NK_STRING */
-{ yymsp[-1].minor.yy392 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); }
+{ yymsp[-1].minor.yy616 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); }
break;
case 317: /* signed_literal ::= duration_literal */
case 319: /* signed_literal ::= literal_func */ yytestcase(yyruleno==319);
- case 387: /* star_func_para ::= expr_or_subquery */ yytestcase(yyruleno==387);
- case 449: /* select_item ::= common_expression */ yytestcase(yyruleno==449);
- case 459: /* partition_item ::= expr_or_subquery */ yytestcase(yyruleno==459);
- case 493: /* query_simple_or_subquery ::= subquery */ yytestcase(yyruleno==493);
- case 495: /* query_or_subquery ::= subquery */ yytestcase(yyruleno==495);
- case 508: /* search_condition ::= common_expression */ yytestcase(yyruleno==508);
-{ yylhsminor.yy392 = releaseRawExprNode(pCxt, yymsp[0].minor.yy392); }
- yymsp[0].minor.yy392 = yylhsminor.yy392;
+ case 388: /* star_func_para ::= expr_or_subquery */ yytestcase(yyruleno==388);
+ case 450: /* select_item ::= common_expression */ yytestcase(yyruleno==450);
+ case 460: /* partition_item ::= expr_or_subquery */ yytestcase(yyruleno==460);
+ case 494: /* query_simple_or_subquery ::= subquery */ yytestcase(yyruleno==494);
+ case 496: /* query_or_subquery ::= subquery */ yytestcase(yyruleno==496);
+ case 509: /* search_condition ::= common_expression */ yytestcase(yyruleno==509);
+{ yylhsminor.yy616 = releaseRawExprNode(pCxt, yymsp[0].minor.yy616); }
+ yymsp[0].minor.yy616 = yylhsminor.yy616;
break;
case 318: /* signed_literal ::= NULL */
-{ yylhsminor.yy392 = createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0); }
- yymsp[0].minor.yy392 = yylhsminor.yy392;
+{ yylhsminor.yy616 = createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0); }
+ yymsp[0].minor.yy616 = yylhsminor.yy616;
break;
case 320: /* signed_literal ::= NK_QUESTION */
-{ yylhsminor.yy392 = createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0); }
- yymsp[0].minor.yy392 = yylhsminor.yy392;
+{ yylhsminor.yy616 = createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0); }
+ yymsp[0].minor.yy616 = yylhsminor.yy616;
break;
case 340: /* expression ::= NK_LP expression NK_RP */
- case 421: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==421);
- case 507: /* subquery ::= NK_LP subquery NK_RP */ yytestcase(yyruleno==507);
-{ yylhsminor.yy392 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy392)); }
- yymsp[-2].minor.yy392 = yylhsminor.yy392;
+ case 422: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==422);
+ case 508: /* subquery ::= NK_LP subquery NK_RP */ yytestcase(yyruleno==508);
+{ yylhsminor.yy616 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy616)); }
+ yymsp[-2].minor.yy616 = yylhsminor.yy616;
break;
case 341: /* expression ::= NK_PLUS expr_or_subquery */
{
- SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy392);
- yylhsminor.yy392 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, releaseRawExprNode(pCxt, yymsp[0].minor.yy392));
+ SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy616);
+ yylhsminor.yy616 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, releaseRawExprNode(pCxt, yymsp[0].minor.yy616));
}
- yymsp[-1].minor.yy392 = yylhsminor.yy392;
+ yymsp[-1].minor.yy616 = yylhsminor.yy616;
break;
case 342: /* expression ::= NK_MINUS expr_or_subquery */
{
- SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy392);
- yylhsminor.yy392 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, createOperatorNode(pCxt, OP_TYPE_MINUS, releaseRawExprNode(pCxt, yymsp[0].minor.yy392), NULL));
+ SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy616);
+ yylhsminor.yy616 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, createOperatorNode(pCxt, OP_TYPE_MINUS, releaseRawExprNode(pCxt, yymsp[0].minor.yy616), NULL));
}
- yymsp[-1].minor.yy392 = yylhsminor.yy392;
+ yymsp[-1].minor.yy616 = yylhsminor.yy616;
break;
case 343: /* expression ::= expr_or_subquery NK_PLUS expr_or_subquery */
{
- SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy392);
- SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy392);
- yylhsminor.yy392 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_ADD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy392), releaseRawExprNode(pCxt, yymsp[0].minor.yy392)));
+ SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy616);
+ SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy616);
+ yylhsminor.yy616 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_ADD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy616), releaseRawExprNode(pCxt, yymsp[0].minor.yy616)));
}
- yymsp[-2].minor.yy392 = yylhsminor.yy392;
+ yymsp[-2].minor.yy616 = yylhsminor.yy616;
break;
case 344: /* expression ::= expr_or_subquery NK_MINUS expr_or_subquery */
{
- SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy392);
- SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy392);
- yylhsminor.yy392 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[-2].minor.yy392), releaseRawExprNode(pCxt, yymsp[0].minor.yy392)));
+ SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy616);
+ SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy616);
+ yylhsminor.yy616 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[-2].minor.yy616), releaseRawExprNode(pCxt, yymsp[0].minor.yy616)));
}
- yymsp[-2].minor.yy392 = yylhsminor.yy392;
+ yymsp[-2].minor.yy616 = yylhsminor.yy616;
break;
case 345: /* expression ::= expr_or_subquery NK_STAR expr_or_subquery */
{
- SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy392);
- SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy392);
- yylhsminor.yy392 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MULTI, releaseRawExprNode(pCxt, yymsp[-2].minor.yy392), releaseRawExprNode(pCxt, yymsp[0].minor.yy392)));
+ SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy616);
+ SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy616);
+ yylhsminor.yy616 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MULTI, releaseRawExprNode(pCxt, yymsp[-2].minor.yy616), releaseRawExprNode(pCxt, yymsp[0].minor.yy616)));
}
- yymsp[-2].minor.yy392 = yylhsminor.yy392;
+ yymsp[-2].minor.yy616 = yylhsminor.yy616;
break;
case 346: /* expression ::= expr_or_subquery NK_SLASH expr_or_subquery */
{
- SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy392);
- SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy392);
- yylhsminor.yy392 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_DIV, releaseRawExprNode(pCxt, yymsp[-2].minor.yy392), releaseRawExprNode(pCxt, yymsp[0].minor.yy392)));
+ SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy616);
+ SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy616);
+ yylhsminor.yy616 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_DIV, releaseRawExprNode(pCxt, yymsp[-2].minor.yy616), releaseRawExprNode(pCxt, yymsp[0].minor.yy616)));
}
- yymsp[-2].minor.yy392 = yylhsminor.yy392;
+ yymsp[-2].minor.yy616 = yylhsminor.yy616;
break;
case 347: /* expression ::= expr_or_subquery NK_REM expr_or_subquery */
{
- SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy392);
- SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy392);
- yylhsminor.yy392 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_REM, releaseRawExprNode(pCxt, yymsp[-2].minor.yy392), releaseRawExprNode(pCxt, yymsp[0].minor.yy392)));
+ SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy616);
+ SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy616);
+ yylhsminor.yy616 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_REM, releaseRawExprNode(pCxt, yymsp[-2].minor.yy616), releaseRawExprNode(pCxt, yymsp[0].minor.yy616)));
}
- yymsp[-2].minor.yy392 = yylhsminor.yy392;
+ yymsp[-2].minor.yy616 = yylhsminor.yy616;
break;
case 348: /* expression ::= column_reference NK_ARROW NK_STRING */
{
- SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy392);
- yylhsminor.yy392 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_JSON_GET_VALUE, releaseRawExprNode(pCxt, yymsp[-2].minor.yy392), createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)));
+ SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy616);
+ yylhsminor.yy616 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_JSON_GET_VALUE, releaseRawExprNode(pCxt, yymsp[-2].minor.yy616), createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)));
}
- yymsp[-2].minor.yy392 = yylhsminor.yy392;
+ yymsp[-2].minor.yy616 = yylhsminor.yy616;
break;
case 349: /* expression ::= expr_or_subquery NK_BITAND expr_or_subquery */
{
- SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy392);
- SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy392);
- yylhsminor.yy392 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy392), releaseRawExprNode(pCxt, yymsp[0].minor.yy392)));
+ SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy616);
+ SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy616);
+ yylhsminor.yy616 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy616), releaseRawExprNode(pCxt, yymsp[0].minor.yy616)));
}
- yymsp[-2].minor.yy392 = yylhsminor.yy392;
+ yymsp[-2].minor.yy616 = yylhsminor.yy616;
break;
case 350: /* expression ::= expr_or_subquery NK_BITOR expr_or_subquery */
{
- SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy392);
- SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy392);
- yylhsminor.yy392 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy392), releaseRawExprNode(pCxt, yymsp[0].minor.yy392)));
+ SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy616);
+ SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy616);
+ yylhsminor.yy616 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy616), releaseRawExprNode(pCxt, yymsp[0].minor.yy616)));
}
- yymsp[-2].minor.yy392 = yylhsminor.yy392;
+ yymsp[-2].minor.yy616 = yylhsminor.yy616;
break;
case 353: /* column_reference ::= column_name */
-{ yylhsminor.yy392 = createRawExprNode(pCxt, &yymsp[0].minor.yy677, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy677)); }
- yymsp[0].minor.yy392 = yylhsminor.yy392;
+{ yylhsminor.yy616 = createRawExprNode(pCxt, &yymsp[0].minor.yy673, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy673)); }
+ yymsp[0].minor.yy616 = yylhsminor.yy616;
break;
case 354: /* column_reference ::= table_name NK_DOT column_name */
-{ yylhsminor.yy392 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy677, &yymsp[0].minor.yy677, createColumnNode(pCxt, &yymsp[-2].minor.yy677, &yymsp[0].minor.yy677)); }
- yymsp[-2].minor.yy392 = yylhsminor.yy392;
+{ yylhsminor.yy616 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy673, &yymsp[0].minor.yy673, createColumnNode(pCxt, &yymsp[-2].minor.yy673, &yymsp[0].minor.yy673)); }
+ yymsp[-2].minor.yy616 = yylhsminor.yy616;
break;
case 355: /* pseudo_column ::= ROWTS */
case 356: /* pseudo_column ::= TBNAME */ yytestcase(yyruleno==356);
@@ -4733,332 +4783,333 @@ static YYACTIONTYPE yy_reduce(
case 361: /* pseudo_column ::= WSTART */ yytestcase(yyruleno==361);
case 362: /* pseudo_column ::= WEND */ yytestcase(yyruleno==362);
case 363: /* pseudo_column ::= WDURATION */ yytestcase(yyruleno==363);
- case 369: /* literal_func ::= NOW */ yytestcase(yyruleno==369);
-{ yylhsminor.yy392 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL)); }
- yymsp[0].minor.yy392 = yylhsminor.yy392;
+ case 364: /* pseudo_column ::= IROWTS */ yytestcase(yyruleno==364);
+ case 370: /* literal_func ::= NOW */ yytestcase(yyruleno==370);
+{ yylhsminor.yy616 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL)); }
+ yymsp[0].minor.yy616 = yylhsminor.yy616;
break;
case 357: /* pseudo_column ::= table_name NK_DOT TBNAME */
-{ yylhsminor.yy392 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy677, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-2].minor.yy677)))); }
- yymsp[-2].minor.yy392 = yylhsminor.yy392;
+{ yylhsminor.yy616 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy673, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-2].minor.yy673)))); }
+ yymsp[-2].minor.yy616 = yylhsminor.yy616;
break;
- case 364: /* function_expression ::= function_name NK_LP expression_list NK_RP */
- case 365: /* function_expression ::= star_func NK_LP star_func_para_list NK_RP */ yytestcase(yyruleno==365);
-{ yylhsminor.yy392 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy677, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy677, yymsp[-1].minor.yy148)); }
- yymsp[-3].minor.yy392 = yylhsminor.yy392;
+ case 365: /* function_expression ::= function_name NK_LP expression_list NK_RP */
+ case 366: /* function_expression ::= star_func NK_LP star_func_para_list NK_RP */ yytestcase(yyruleno==366);
+{ yylhsminor.yy616 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy673, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy673, yymsp[-1].minor.yy152)); }
+ yymsp[-3].minor.yy616 = yylhsminor.yy616;
break;
- case 366: /* function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */
-{ yylhsminor.yy392 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createCastFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy392), yymsp[-1].minor.yy838)); }
- yymsp[-5].minor.yy392 = yylhsminor.yy392;
+ case 367: /* function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */
+{ yylhsminor.yy616 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createCastFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy616), yymsp[-1].minor.yy784)); }
+ yymsp[-5].minor.yy616 = yylhsminor.yy616;
break;
- case 368: /* literal_func ::= noarg_func NK_LP NK_RP */
-{ yylhsminor.yy392 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy677, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-2].minor.yy677, NULL)); }
- yymsp[-2].minor.yy392 = yylhsminor.yy392;
+ case 369: /* literal_func ::= noarg_func NK_LP NK_RP */
+{ yylhsminor.yy616 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy673, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-2].minor.yy673, NULL)); }
+ yymsp[-2].minor.yy616 = yylhsminor.yy616;
break;
- case 383: /* star_func_para_list ::= NK_STAR */
-{ yylhsminor.yy148 = createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); }
- yymsp[0].minor.yy148 = yylhsminor.yy148;
+ case 384: /* star_func_para_list ::= NK_STAR */
+{ yylhsminor.yy152 = createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); }
+ yymsp[0].minor.yy152 = yylhsminor.yy152;
break;
- case 388: /* star_func_para ::= table_name NK_DOT NK_STAR */
- case 452: /* select_item ::= table_name NK_DOT NK_STAR */ yytestcase(yyruleno==452);
-{ yylhsminor.yy392 = createColumnNode(pCxt, &yymsp[-2].minor.yy677, &yymsp[0].minor.yy0); }
- yymsp[-2].minor.yy392 = yylhsminor.yy392;
+ case 389: /* star_func_para ::= table_name NK_DOT NK_STAR */
+ case 453: /* select_item ::= table_name NK_DOT NK_STAR */ yytestcase(yyruleno==453);
+{ yylhsminor.yy616 = createColumnNode(pCxt, &yymsp[-2].minor.yy673, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy616 = yylhsminor.yy616;
break;
- case 389: /* case_when_expression ::= CASE when_then_list case_when_else_opt END */
-{ yylhsminor.yy392 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, NULL, yymsp[-2].minor.yy148, yymsp[-1].minor.yy392)); }
- yymsp[-3].minor.yy392 = yylhsminor.yy392;
+ case 390: /* case_when_expression ::= CASE when_then_list case_when_else_opt END */
+{ yylhsminor.yy616 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, NULL, yymsp[-2].minor.yy152, yymsp[-1].minor.yy616)); }
+ yymsp[-3].minor.yy616 = yylhsminor.yy616;
break;
- case 390: /* case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */
-{ yylhsminor.yy392 = createRawExprNodeExt(pCxt, &yymsp[-4].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy392), yymsp[-2].minor.yy148, yymsp[-1].minor.yy392)); }
- yymsp[-4].minor.yy392 = yylhsminor.yy392;
+ case 391: /* case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */
+{ yylhsminor.yy616 = createRawExprNodeExt(pCxt, &yymsp[-4].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy616), yymsp[-2].minor.yy152, yymsp[-1].minor.yy616)); }
+ yymsp[-4].minor.yy616 = yylhsminor.yy616;
break;
- case 393: /* when_then_expr ::= WHEN common_expression THEN common_expression */
-{ yymsp[-3].minor.yy392 = createWhenThenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy392), releaseRawExprNode(pCxt, yymsp[0].minor.yy392)); }
+ case 394: /* when_then_expr ::= WHEN common_expression THEN common_expression */
+{ yymsp[-3].minor.yy616 = createWhenThenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy616), releaseRawExprNode(pCxt, yymsp[0].minor.yy616)); }
break;
- case 395: /* case_when_else_opt ::= ELSE common_expression */
-{ yymsp[-1].minor.yy392 = releaseRawExprNode(pCxt, yymsp[0].minor.yy392); }
+ case 396: /* case_when_else_opt ::= ELSE common_expression */
+{ yymsp[-1].minor.yy616 = releaseRawExprNode(pCxt, yymsp[0].minor.yy616); }
break;
- case 396: /* predicate ::= expr_or_subquery compare_op expr_or_subquery */
- case 401: /* predicate ::= expr_or_subquery in_op in_predicate_value */ yytestcase(yyruleno==401);
+ case 397: /* predicate ::= expr_or_subquery compare_op expr_or_subquery */
+ case 402: /* predicate ::= expr_or_subquery in_op in_predicate_value */ yytestcase(yyruleno==402);
{
- SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy392);
- SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy392);
- yylhsminor.yy392 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, yymsp[-1].minor.yy758, releaseRawExprNode(pCxt, yymsp[-2].minor.yy392), releaseRawExprNode(pCxt, yymsp[0].minor.yy392)));
+ SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy616);
+ SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy616);
+ yylhsminor.yy616 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, yymsp[-1].minor.yy380, releaseRawExprNode(pCxt, yymsp[-2].minor.yy616), releaseRawExprNode(pCxt, yymsp[0].minor.yy616)));
}
- yymsp[-2].minor.yy392 = yylhsminor.yy392;
+ yymsp[-2].minor.yy616 = yylhsminor.yy616;
break;
- case 397: /* predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */
+ case 398: /* predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */
{
- SToken s = getTokenFromRawExprNode(pCxt, yymsp[-4].minor.yy392);
- SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy392);
- yylhsminor.yy392 = createRawExprNodeExt(pCxt, &s, &e, createBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-4].minor.yy392), releaseRawExprNode(pCxt, yymsp[-2].minor.yy392), releaseRawExprNode(pCxt, yymsp[0].minor.yy392)));
+ SToken s = getTokenFromRawExprNode(pCxt, yymsp[-4].minor.yy616);
+ SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy616);
+ yylhsminor.yy616 = createRawExprNodeExt(pCxt, &s, &e, createBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-4].minor.yy616), releaseRawExprNode(pCxt, yymsp[-2].minor.yy616), releaseRawExprNode(pCxt, yymsp[0].minor.yy616)));
}
- yymsp[-4].minor.yy392 = yylhsminor.yy392;
+ yymsp[-4].minor.yy616 = yylhsminor.yy616;
break;
- case 398: /* predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */
+ case 399: /* predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */
{
- SToken s = getTokenFromRawExprNode(pCxt, yymsp[-5].minor.yy392);
- SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy392);
- yylhsminor.yy392 = createRawExprNodeExt(pCxt, &s, &e, createNotBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy392), releaseRawExprNode(pCxt, yymsp[-2].minor.yy392), releaseRawExprNode(pCxt, yymsp[0].minor.yy392)));
+ SToken s = getTokenFromRawExprNode(pCxt, yymsp[-5].minor.yy616);
+ SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy616);
+ yylhsminor.yy616 = createRawExprNodeExt(pCxt, &s, &e, createNotBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy616), releaseRawExprNode(pCxt, yymsp[-2].minor.yy616), releaseRawExprNode(pCxt, yymsp[0].minor.yy616)));
}
- yymsp[-5].minor.yy392 = yylhsminor.yy392;
+ yymsp[-5].minor.yy616 = yylhsminor.yy616;
break;
- case 399: /* predicate ::= expr_or_subquery IS NULL */
+ case 400: /* predicate ::= expr_or_subquery IS NULL */
{
- SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy392);
- yylhsminor.yy392 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NULL, releaseRawExprNode(pCxt, yymsp[-2].minor.yy392), NULL));
+ SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy616);
+ yylhsminor.yy616 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NULL, releaseRawExprNode(pCxt, yymsp[-2].minor.yy616), NULL));
}
- yymsp[-2].minor.yy392 = yylhsminor.yy392;
+ yymsp[-2].minor.yy616 = yylhsminor.yy616;
break;
- case 400: /* predicate ::= expr_or_subquery IS NOT NULL */
+ case 401: /* predicate ::= expr_or_subquery IS NOT NULL */
{
- SToken s = getTokenFromRawExprNode(pCxt, yymsp[-3].minor.yy392);
- yylhsminor.yy392 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NOT_NULL, releaseRawExprNode(pCxt, yymsp[-3].minor.yy392), NULL));
+ SToken s = getTokenFromRawExprNode(pCxt, yymsp[-3].minor.yy616);
+ yylhsminor.yy616 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NOT_NULL, releaseRawExprNode(pCxt, yymsp[-3].minor.yy616), NULL));
}
- yymsp[-3].minor.yy392 = yylhsminor.yy392;
+ yymsp[-3].minor.yy616 = yylhsminor.yy616;
break;
- case 402: /* compare_op ::= NK_LT */
-{ yymsp[0].minor.yy758 = OP_TYPE_LOWER_THAN; }
+ case 403: /* compare_op ::= NK_LT */
+{ yymsp[0].minor.yy380 = OP_TYPE_LOWER_THAN; }
break;
- case 403: /* compare_op ::= NK_GT */
-{ yymsp[0].minor.yy758 = OP_TYPE_GREATER_THAN; }
+ case 404: /* compare_op ::= NK_GT */
+{ yymsp[0].minor.yy380 = OP_TYPE_GREATER_THAN; }
break;
- case 404: /* compare_op ::= NK_LE */
-{ yymsp[0].minor.yy758 = OP_TYPE_LOWER_EQUAL; }
+ case 405: /* compare_op ::= NK_LE */
+{ yymsp[0].minor.yy380 = OP_TYPE_LOWER_EQUAL; }
break;
- case 405: /* compare_op ::= NK_GE */
-{ yymsp[0].minor.yy758 = OP_TYPE_GREATER_EQUAL; }
+ case 406: /* compare_op ::= NK_GE */
+{ yymsp[0].minor.yy380 = OP_TYPE_GREATER_EQUAL; }
break;
- case 406: /* compare_op ::= NK_NE */
-{ yymsp[0].minor.yy758 = OP_TYPE_NOT_EQUAL; }
+ case 407: /* compare_op ::= NK_NE */
+{ yymsp[0].minor.yy380 = OP_TYPE_NOT_EQUAL; }
break;
- case 407: /* compare_op ::= NK_EQ */
-{ yymsp[0].minor.yy758 = OP_TYPE_EQUAL; }
+ case 408: /* compare_op ::= NK_EQ */
+{ yymsp[0].minor.yy380 = OP_TYPE_EQUAL; }
break;
- case 408: /* compare_op ::= LIKE */
-{ yymsp[0].minor.yy758 = OP_TYPE_LIKE; }
+ case 409: /* compare_op ::= LIKE */
+{ yymsp[0].minor.yy380 = OP_TYPE_LIKE; }
break;
- case 409: /* compare_op ::= NOT LIKE */
-{ yymsp[-1].minor.yy758 = OP_TYPE_NOT_LIKE; }
+ case 410: /* compare_op ::= NOT LIKE */
+{ yymsp[-1].minor.yy380 = OP_TYPE_NOT_LIKE; }
break;
- case 410: /* compare_op ::= MATCH */
-{ yymsp[0].minor.yy758 = OP_TYPE_MATCH; }
+ case 411: /* compare_op ::= MATCH */
+{ yymsp[0].minor.yy380 = OP_TYPE_MATCH; }
break;
- case 411: /* compare_op ::= NMATCH */
-{ yymsp[0].minor.yy758 = OP_TYPE_NMATCH; }
+ case 412: /* compare_op ::= NMATCH */
+{ yymsp[0].minor.yy380 = OP_TYPE_NMATCH; }
break;
- case 412: /* compare_op ::= CONTAINS */
-{ yymsp[0].minor.yy758 = OP_TYPE_JSON_CONTAINS; }
+ case 413: /* compare_op ::= CONTAINS */
+{ yymsp[0].minor.yy380 = OP_TYPE_JSON_CONTAINS; }
break;
- case 413: /* in_op ::= IN */
-{ yymsp[0].minor.yy758 = OP_TYPE_IN; }
+ case 414: /* in_op ::= IN */
+{ yymsp[0].minor.yy380 = OP_TYPE_IN; }
break;
- case 414: /* in_op ::= NOT IN */
-{ yymsp[-1].minor.yy758 = OP_TYPE_NOT_IN; }
+ case 415: /* in_op ::= NOT IN */
+{ yymsp[-1].minor.yy380 = OP_TYPE_NOT_IN; }
break;
- case 415: /* in_predicate_value ::= NK_LP literal_list NK_RP */
-{ yylhsminor.yy392 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createNodeListNode(pCxt, yymsp[-1].minor.yy148)); }
- yymsp[-2].minor.yy392 = yylhsminor.yy392;
+ case 416: /* in_predicate_value ::= NK_LP literal_list NK_RP */
+{ yylhsminor.yy616 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createNodeListNode(pCxt, yymsp[-1].minor.yy152)); }
+ yymsp[-2].minor.yy616 = yylhsminor.yy616;
break;
- case 417: /* boolean_value_expression ::= NOT boolean_primary */
+ case 418: /* boolean_value_expression ::= NOT boolean_primary */
{
- SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy392);
- yylhsminor.yy392 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_NOT, releaseRawExprNode(pCxt, yymsp[0].minor.yy392), NULL));
+ SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy616);
+ yylhsminor.yy616 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_NOT, releaseRawExprNode(pCxt, yymsp[0].minor.yy616), NULL));
}
- yymsp[-1].minor.yy392 = yylhsminor.yy392;
+ yymsp[-1].minor.yy616 = yylhsminor.yy616;
break;
- case 418: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */
+ case 419: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */
{
- SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy392);
- SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy392);
- yylhsminor.yy392 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy392), releaseRawExprNode(pCxt, yymsp[0].minor.yy392)));
+ SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy616);
+ SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy616);
+ yylhsminor.yy616 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy616), releaseRawExprNode(pCxt, yymsp[0].minor.yy616)));
}
- yymsp[-2].minor.yy392 = yylhsminor.yy392;
+ yymsp[-2].minor.yy616 = yylhsminor.yy616;
break;
- case 419: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */
+ case 420: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */
{
- SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy392);
- SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy392);
- yylhsminor.yy392 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy392), releaseRawExprNode(pCxt, yymsp[0].minor.yy392)));
+ SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy616);
+ SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy616);
+ yylhsminor.yy616 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy616), releaseRawExprNode(pCxt, yymsp[0].minor.yy616)));
}
- yymsp[-2].minor.yy392 = yylhsminor.yy392;
+ yymsp[-2].minor.yy616 = yylhsminor.yy616;
break;
- case 425: /* from_clause_opt ::= FROM table_reference_list */
- case 454: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==454);
- case 482: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==482);
-{ yymsp[-1].minor.yy392 = yymsp[0].minor.yy392; }
+ case 426: /* from_clause_opt ::= FROM table_reference_list */
+ case 455: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==455);
+ case 483: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==483);
+{ yymsp[-1].minor.yy616 = yymsp[0].minor.yy616; }
break;
- case 427: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */
-{ yylhsminor.yy392 = createJoinTableNode(pCxt, JOIN_TYPE_INNER, yymsp[-2].minor.yy392, yymsp[0].minor.yy392, NULL); }
- yymsp[-2].minor.yy392 = yylhsminor.yy392;
+ case 428: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */
+{ yylhsminor.yy616 = createJoinTableNode(pCxt, JOIN_TYPE_INNER, yymsp[-2].minor.yy616, yymsp[0].minor.yy616, NULL); }
+ yymsp[-2].minor.yy616 = yylhsminor.yy616;
break;
- case 430: /* table_primary ::= table_name alias_opt */
-{ yylhsminor.yy392 = createRealTableNode(pCxt, NULL, &yymsp[-1].minor.yy677, &yymsp[0].minor.yy677); }
- yymsp[-1].minor.yy392 = yylhsminor.yy392;
+ case 431: /* table_primary ::= table_name alias_opt */
+{ yylhsminor.yy616 = createRealTableNode(pCxt, NULL, &yymsp[-1].minor.yy673, &yymsp[0].minor.yy673); }
+ yymsp[-1].minor.yy616 = yylhsminor.yy616;
break;
- case 431: /* table_primary ::= db_name NK_DOT table_name alias_opt */
-{ yylhsminor.yy392 = createRealTableNode(pCxt, &yymsp[-3].minor.yy677, &yymsp[-1].minor.yy677, &yymsp[0].minor.yy677); }
- yymsp[-3].minor.yy392 = yylhsminor.yy392;
+ case 432: /* table_primary ::= db_name NK_DOT table_name alias_opt */
+{ yylhsminor.yy616 = createRealTableNode(pCxt, &yymsp[-3].minor.yy673, &yymsp[-1].minor.yy673, &yymsp[0].minor.yy673); }
+ yymsp[-3].minor.yy616 = yylhsminor.yy616;
break;
- case 432: /* table_primary ::= subquery alias_opt */
-{ yylhsminor.yy392 = createTempTableNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy392), &yymsp[0].minor.yy677); }
- yymsp[-1].minor.yy392 = yylhsminor.yy392;
+ case 433: /* table_primary ::= subquery alias_opt */
+{ yylhsminor.yy616 = createTempTableNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy616), &yymsp[0].minor.yy673); }
+ yymsp[-1].minor.yy616 = yylhsminor.yy616;
break;
- case 434: /* alias_opt ::= */
-{ yymsp[1].minor.yy677 = nil_token; }
+ case 435: /* alias_opt ::= */
+{ yymsp[1].minor.yy673 = nil_token; }
break;
- case 435: /* alias_opt ::= table_alias */
-{ yylhsminor.yy677 = yymsp[0].minor.yy677; }
- yymsp[0].minor.yy677 = yylhsminor.yy677;
+ case 436: /* alias_opt ::= table_alias */
+{ yylhsminor.yy673 = yymsp[0].minor.yy673; }
+ yymsp[0].minor.yy673 = yylhsminor.yy673;
break;
- case 436: /* alias_opt ::= AS table_alias */
-{ yymsp[-1].minor.yy677 = yymsp[0].minor.yy677; }
+ case 437: /* alias_opt ::= AS table_alias */
+{ yymsp[-1].minor.yy673 = yymsp[0].minor.yy673; }
break;
- case 437: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */
- case 438: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==438);
-{ yymsp[-2].minor.yy392 = yymsp[-1].minor.yy392; }
+ case 438: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */
+ case 439: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==439);
+{ yymsp[-2].minor.yy616 = yymsp[-1].minor.yy616; }
break;
- case 439: /* joined_table ::= table_reference join_type JOIN table_reference ON search_condition */
-{ yylhsminor.yy392 = createJoinTableNode(pCxt, yymsp[-4].minor.yy114, yymsp[-5].minor.yy392, yymsp[-2].minor.yy392, yymsp[0].minor.yy392); }
- yymsp[-5].minor.yy392 = yylhsminor.yy392;
+ case 440: /* joined_table ::= table_reference join_type JOIN table_reference ON search_condition */
+{ yylhsminor.yy616 = createJoinTableNode(pCxt, yymsp[-4].minor.yy596, yymsp[-5].minor.yy616, yymsp[-2].minor.yy616, yymsp[0].minor.yy616); }
+ yymsp[-5].minor.yy616 = yylhsminor.yy616;
break;
- case 440: /* join_type ::= */
-{ yymsp[1].minor.yy114 = JOIN_TYPE_INNER; }
+ case 441: /* join_type ::= */
+{ yymsp[1].minor.yy596 = JOIN_TYPE_INNER; }
break;
- case 441: /* join_type ::= INNER */
-{ yymsp[0].minor.yy114 = JOIN_TYPE_INNER; }
+ case 442: /* join_type ::= INNER */
+{ yymsp[0].minor.yy596 = JOIN_TYPE_INNER; }
break;
- case 442: /* query_specification ::= SELECT set_quantifier_opt select_list from_clause_opt where_clause_opt partition_by_clause_opt range_opt every_opt fill_opt twindow_clause_opt group_by_clause_opt having_clause_opt */
+ case 443: /* query_specification ::= SELECT set_quantifier_opt select_list from_clause_opt where_clause_opt partition_by_clause_opt range_opt every_opt fill_opt twindow_clause_opt group_by_clause_opt having_clause_opt */
{
- yymsp[-11].minor.yy392 = createSelectStmt(pCxt, yymsp[-10].minor.yy287, yymsp[-9].minor.yy148, yymsp[-8].minor.yy392);
- yymsp[-11].minor.yy392 = addWhereClause(pCxt, yymsp[-11].minor.yy392, yymsp[-7].minor.yy392);
- yymsp[-11].minor.yy392 = addPartitionByClause(pCxt, yymsp[-11].minor.yy392, yymsp[-6].minor.yy148);
- yymsp[-11].minor.yy392 = addWindowClauseClause(pCxt, yymsp[-11].minor.yy392, yymsp[-2].minor.yy392);
- yymsp[-11].minor.yy392 = addGroupByClause(pCxt, yymsp[-11].minor.yy392, yymsp[-1].minor.yy148);
- yymsp[-11].minor.yy392 = addHavingClause(pCxt, yymsp[-11].minor.yy392, yymsp[0].minor.yy392);
- yymsp[-11].minor.yy392 = addRangeClause(pCxt, yymsp[-11].minor.yy392, yymsp[-5].minor.yy392);
- yymsp[-11].minor.yy392 = addEveryClause(pCxt, yymsp[-11].minor.yy392, yymsp[-4].minor.yy392);
- yymsp[-11].minor.yy392 = addFillClause(pCxt, yymsp[-11].minor.yy392, yymsp[-3].minor.yy392);
+ yymsp[-11].minor.yy616 = createSelectStmt(pCxt, yymsp[-10].minor.yy89, yymsp[-9].minor.yy152, yymsp[-8].minor.yy616);
+ yymsp[-11].minor.yy616 = addWhereClause(pCxt, yymsp[-11].minor.yy616, yymsp[-7].minor.yy616);
+ yymsp[-11].minor.yy616 = addPartitionByClause(pCxt, yymsp[-11].minor.yy616, yymsp[-6].minor.yy152);
+ yymsp[-11].minor.yy616 = addWindowClauseClause(pCxt, yymsp[-11].minor.yy616, yymsp[-2].minor.yy616);
+ yymsp[-11].minor.yy616 = addGroupByClause(pCxt, yymsp[-11].minor.yy616, yymsp[-1].minor.yy152);
+ yymsp[-11].minor.yy616 = addHavingClause(pCxt, yymsp[-11].minor.yy616, yymsp[0].minor.yy616);
+ yymsp[-11].minor.yy616 = addRangeClause(pCxt, yymsp[-11].minor.yy616, yymsp[-5].minor.yy616);
+ yymsp[-11].minor.yy616 = addEveryClause(pCxt, yymsp[-11].minor.yy616, yymsp[-4].minor.yy616);
+ yymsp[-11].minor.yy616 = addFillClause(pCxt, yymsp[-11].minor.yy616, yymsp[-3].minor.yy616);
}
break;
- case 445: /* set_quantifier_opt ::= ALL */
-{ yymsp[0].minor.yy287 = false; }
+ case 446: /* set_quantifier_opt ::= ALL */
+{ yymsp[0].minor.yy89 = false; }
break;
- case 448: /* select_item ::= NK_STAR */
-{ yylhsminor.yy392 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0); }
- yymsp[0].minor.yy392 = yylhsminor.yy392;
+ case 449: /* select_item ::= NK_STAR */
+{ yylhsminor.yy616 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0); }
+ yymsp[0].minor.yy616 = yylhsminor.yy616;
break;
- case 450: /* select_item ::= common_expression column_alias */
- case 460: /* partition_item ::= expr_or_subquery column_alias */ yytestcase(yyruleno==460);
-{ yylhsminor.yy392 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy392), &yymsp[0].minor.yy677); }
- yymsp[-1].minor.yy392 = yylhsminor.yy392;
+ case 451: /* select_item ::= common_expression column_alias */
+ case 461: /* partition_item ::= expr_or_subquery column_alias */ yytestcase(yyruleno==461);
+{ yylhsminor.yy616 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy616), &yymsp[0].minor.yy673); }
+ yymsp[-1].minor.yy616 = yylhsminor.yy616;
break;
- case 451: /* select_item ::= common_expression AS column_alias */
- case 461: /* partition_item ::= expr_or_subquery AS column_alias */ yytestcase(yyruleno==461);
-{ yylhsminor.yy392 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy392), &yymsp[0].minor.yy677); }
- yymsp[-2].minor.yy392 = yylhsminor.yy392;
+ case 452: /* select_item ::= common_expression AS column_alias */
+ case 462: /* partition_item ::= expr_or_subquery AS column_alias */ yytestcase(yyruleno==462);
+{ yylhsminor.yy616 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy616), &yymsp[0].minor.yy673); }
+ yymsp[-2].minor.yy616 = yylhsminor.yy616;
break;
- case 456: /* partition_by_clause_opt ::= PARTITION BY partition_list */
- case 478: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==478);
- case 497: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==497);
-{ yymsp[-2].minor.yy148 = yymsp[0].minor.yy148; }
+ case 457: /* partition_by_clause_opt ::= PARTITION BY partition_list */
+ case 479: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==479);
+ case 498: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==498);
+{ yymsp[-2].minor.yy152 = yymsp[0].minor.yy152; }
break;
- case 463: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */
-{ yymsp[-5].minor.yy392 = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy392), releaseRawExprNode(pCxt, yymsp[-1].minor.yy392)); }
+ case 464: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */
+{ yymsp[-5].minor.yy616 = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy616), releaseRawExprNode(pCxt, yymsp[-1].minor.yy616)); }
break;
- case 464: /* twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */
-{ yymsp[-3].minor.yy392 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy392)); }
+ case 465: /* twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */
+{ yymsp[-3].minor.yy616 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy616)); }
break;
- case 465: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */
-{ yymsp[-5].minor.yy392 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy392), NULL, yymsp[-1].minor.yy392, yymsp[0].minor.yy392); }
+ case 466: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */
+{ yymsp[-5].minor.yy616 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy616), NULL, yymsp[-1].minor.yy616, yymsp[0].minor.yy616); }
break;
- case 466: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */
-{ yymsp[-7].minor.yy392 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy392), releaseRawExprNode(pCxt, yymsp[-3].minor.yy392), yymsp[-1].minor.yy392, yymsp[0].minor.yy392); }
+ case 467: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */
+{ yymsp[-7].minor.yy616 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy616), releaseRawExprNode(pCxt, yymsp[-3].minor.yy616), yymsp[-1].minor.yy616, yymsp[0].minor.yy616); }
break;
- case 470: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */
-{ yymsp[-3].minor.yy392 = createFillNode(pCxt, yymsp[-1].minor.yy708, NULL); }
+ case 471: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */
+{ yymsp[-3].minor.yy616 = createFillNode(pCxt, yymsp[-1].minor.yy102, NULL); }
break;
- case 471: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */
-{ yymsp[-5].minor.yy392 = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, yymsp[-1].minor.yy148)); }
+ case 472: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */
+{ yymsp[-5].minor.yy616 = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, yymsp[-1].minor.yy152)); }
break;
- case 472: /* fill_mode ::= NONE */
-{ yymsp[0].minor.yy708 = FILL_MODE_NONE; }
+ case 473: /* fill_mode ::= NONE */
+{ yymsp[0].minor.yy102 = FILL_MODE_NONE; }
break;
- case 473: /* fill_mode ::= PREV */
-{ yymsp[0].minor.yy708 = FILL_MODE_PREV; }
+ case 474: /* fill_mode ::= PREV */
+{ yymsp[0].minor.yy102 = FILL_MODE_PREV; }
break;
- case 474: /* fill_mode ::= NULL */
-{ yymsp[0].minor.yy708 = FILL_MODE_NULL; }
+ case 475: /* fill_mode ::= NULL */
+{ yymsp[0].minor.yy102 = FILL_MODE_NULL; }
break;
- case 475: /* fill_mode ::= LINEAR */
-{ yymsp[0].minor.yy708 = FILL_MODE_LINEAR; }
+ case 476: /* fill_mode ::= LINEAR */
+{ yymsp[0].minor.yy102 = FILL_MODE_LINEAR; }
break;
- case 476: /* fill_mode ::= NEXT */
-{ yymsp[0].minor.yy708 = FILL_MODE_NEXT; }
+ case 477: /* fill_mode ::= NEXT */
+{ yymsp[0].minor.yy102 = FILL_MODE_NEXT; }
break;
- case 479: /* group_by_list ::= expr_or_subquery */
-{ yylhsminor.yy148 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy392))); }
- yymsp[0].minor.yy148 = yylhsminor.yy148;
+ case 480: /* group_by_list ::= expr_or_subquery */
+{ yylhsminor.yy152 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy616))); }
+ yymsp[0].minor.yy152 = yylhsminor.yy152;
break;
- case 480: /* group_by_list ::= group_by_list NK_COMMA expr_or_subquery */
-{ yylhsminor.yy148 = addNodeToList(pCxt, yymsp[-2].minor.yy148, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy392))); }
- yymsp[-2].minor.yy148 = yylhsminor.yy148;
+ case 481: /* group_by_list ::= group_by_list NK_COMMA expr_or_subquery */
+{ yylhsminor.yy152 = addNodeToList(pCxt, yymsp[-2].minor.yy152, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy616))); }
+ yymsp[-2].minor.yy152 = yylhsminor.yy152;
break;
- case 484: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */
-{ yymsp[-5].minor.yy392 = createInterpTimeRange(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy392), releaseRawExprNode(pCxt, yymsp[-1].minor.yy392)); }
+ case 485: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */
+{ yymsp[-5].minor.yy616 = createInterpTimeRange(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy616), releaseRawExprNode(pCxt, yymsp[-1].minor.yy616)); }
break;
- case 487: /* query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */
+ case 488: /* query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */
{
- yylhsminor.yy392 = addOrderByClause(pCxt, yymsp[-3].minor.yy392, yymsp[-2].minor.yy148);
- yylhsminor.yy392 = addSlimitClause(pCxt, yylhsminor.yy392, yymsp[-1].minor.yy392);
- yylhsminor.yy392 = addLimitClause(pCxt, yylhsminor.yy392, yymsp[0].minor.yy392);
+ yylhsminor.yy616 = addOrderByClause(pCxt, yymsp[-3].minor.yy616, yymsp[-2].minor.yy152);
+ yylhsminor.yy616 = addSlimitClause(pCxt, yylhsminor.yy616, yymsp[-1].minor.yy616);
+ yylhsminor.yy616 = addLimitClause(pCxt, yylhsminor.yy616, yymsp[0].minor.yy616);
}
- yymsp[-3].minor.yy392 = yylhsminor.yy392;
+ yymsp[-3].minor.yy616 = yylhsminor.yy616;
break;
- case 490: /* union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */
-{ yylhsminor.yy392 = createSetOperator(pCxt, SET_OP_TYPE_UNION_ALL, yymsp[-3].minor.yy392, yymsp[0].minor.yy392); }
- yymsp[-3].minor.yy392 = yylhsminor.yy392;
+ case 491: /* union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */
+{ yylhsminor.yy616 = createSetOperator(pCxt, SET_OP_TYPE_UNION_ALL, yymsp[-3].minor.yy616, yymsp[0].minor.yy616); }
+ yymsp[-3].minor.yy616 = yylhsminor.yy616;
break;
- case 491: /* union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */
-{ yylhsminor.yy392 = createSetOperator(pCxt, SET_OP_TYPE_UNION, yymsp[-2].minor.yy392, yymsp[0].minor.yy392); }
- yymsp[-2].minor.yy392 = yylhsminor.yy392;
+ case 492: /* union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */
+{ yylhsminor.yy616 = createSetOperator(pCxt, SET_OP_TYPE_UNION, yymsp[-2].minor.yy616, yymsp[0].minor.yy616); }
+ yymsp[-2].minor.yy616 = yylhsminor.yy616;
break;
- case 499: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */
- case 503: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==503);
-{ yymsp[-1].minor.yy392 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); }
+ case 500: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */
+ case 504: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==504);
+{ yymsp[-1].minor.yy616 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); }
break;
- case 500: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */
- case 504: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==504);
-{ yymsp[-3].minor.yy392 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); }
+ case 501: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */
+ case 505: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==505);
+{ yymsp[-3].minor.yy616 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); }
break;
- case 501: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */
- case 505: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==505);
-{ yymsp[-3].minor.yy392 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); }
+ case 502: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */
+ case 506: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==506);
+{ yymsp[-3].minor.yy616 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); }
break;
- case 506: /* subquery ::= NK_LP query_expression NK_RP */
-{ yylhsminor.yy392 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy392); }
- yymsp[-2].minor.yy392 = yylhsminor.yy392;
+ case 507: /* subquery ::= NK_LP query_expression NK_RP */
+{ yylhsminor.yy616 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy616); }
+ yymsp[-2].minor.yy616 = yylhsminor.yy616;
break;
- case 511: /* sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */
-{ yylhsminor.yy392 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy392), yymsp[-1].minor.yy362, yymsp[0].minor.yy781); }
- yymsp[-2].minor.yy392 = yylhsminor.yy392;
+ case 512: /* sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */
+{ yylhsminor.yy616 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy616), yymsp[-1].minor.yy386, yymsp[0].minor.yy585); }
+ yymsp[-2].minor.yy616 = yylhsminor.yy616;
break;
- case 512: /* ordering_specification_opt ::= */
-{ yymsp[1].minor.yy362 = ORDER_ASC; }
+ case 513: /* ordering_specification_opt ::= */
+{ yymsp[1].minor.yy386 = ORDER_ASC; }
break;
- case 513: /* ordering_specification_opt ::= ASC */
-{ yymsp[0].minor.yy362 = ORDER_ASC; }
+ case 514: /* ordering_specification_opt ::= ASC */
+{ yymsp[0].minor.yy386 = ORDER_ASC; }
break;
- case 514: /* ordering_specification_opt ::= DESC */
-{ yymsp[0].minor.yy362 = ORDER_DESC; }
+ case 515: /* ordering_specification_opt ::= DESC */
+{ yymsp[0].minor.yy386 = ORDER_DESC; }
break;
- case 515: /* null_ordering_opt ::= */
-{ yymsp[1].minor.yy781 = NULL_ORDER_DEFAULT; }
+ case 516: /* null_ordering_opt ::= */
+{ yymsp[1].minor.yy585 = NULL_ORDER_DEFAULT; }
break;
- case 516: /* null_ordering_opt ::= NULLS FIRST */
-{ yymsp[-1].minor.yy781 = NULL_ORDER_FIRST; }
+ case 517: /* null_ordering_opt ::= NULLS FIRST */
+{ yymsp[-1].minor.yy585 = NULL_ORDER_FIRST; }
break;
- case 517: /* null_ordering_opt ::= NULLS LAST */
-{ yymsp[-1].minor.yy781 = NULL_ORDER_LAST; }
+ case 518: /* null_ordering_opt ::= NULLS LAST */
+{ yymsp[-1].minor.yy585 = NULL_ORDER_LAST; }
break;
default:
break;
diff --git a/source/libs/parser/test/mockCatalog.cpp b/source/libs/parser/test/mockCatalog.cpp
index 7725674200..fcaa5af05c 100644
--- a/source/libs/parser/test/mockCatalog.cpp
+++ b/source/libs/parser/test/mockCatalog.cpp
@@ -85,6 +85,10 @@ void generateInformationSchema(MockCatalogService* mcs) {
.addColumn("dnode_id", TSDB_DATA_TYPE_INT)
.addColumn("dnode_ep", TSDB_DATA_TYPE_BINARY, TSDB_EP_LEN)
.done();
+ mcs->createTableBuilder(TSDB_INFORMATION_SCHEMA_DB, TSDB_INS_TABLE_TAGS, TSDB_SYSTEM_TABLE, 2)
+ .addColumn("table_name", TSDB_DATA_TYPE_BINARY, TSDB_TABLE_NAME_LEN)
+ .addColumn("db_name", TSDB_DATA_TYPE_BINARY, TSDB_DB_NAME_LEN)
+ .done();
}
void generatePerformanceSchema(MockCatalogService* mcs) {
diff --git a/source/libs/parser/test/parShowToUse.cpp b/source/libs/parser/test/parShowToUse.cpp
index f38859c832..36e70dd015 100644
--- a/source/libs/parser/test/parShowToUse.cpp
+++ b/source/libs/parser/test/parShowToUse.cpp
@@ -196,6 +196,12 @@ TEST_F(ParserShowToUseTest, showTableDistributed) {
run("SHOW TABLE DISTRIBUTED st1");
}
+TEST_F(ParserShowToUseTest, showTags) {
+ useDb("root", "test");
+
+ run("SHOW TAGS FROM st1s1");
+}
+
// todo SHOW topics
TEST_F(ParserShowToUseTest, showUsers) {
@@ -213,9 +219,9 @@ TEST_F(ParserShowToUseTest, showVariables) {
TEST_F(ParserShowToUseTest, showVgroups) {
useDb("root", "test");
- run("SHOW vgroups");
+ run("SHOW VGROUPS");
- run("SHOW test.vgroups");
+ run("SHOW test.VGROUPS");
}
TEST_F(ParserShowToUseTest, showVnodes) {
diff --git a/source/libs/parser/test/parTestMain.cpp b/source/libs/parser/test/parTestMain.cpp
index bcaccbab07..9e67249238 100644
--- a/source/libs/parser/test/parTestMain.cpp
+++ b/source/libs/parser/test/parTestMain.cpp
@@ -86,6 +86,7 @@ static void parseArg(int argc, char* argv[]) {
{"dump", no_argument, NULL, 'd'},
{"async", required_argument, NULL, 'a'},
{"skipSql", required_argument, NULL, 's'},
+ {"log", required_argument, NULL, 'l'},
{0, 0, 0, 0}
};
// clang-format on
@@ -100,6 +101,9 @@ static void parseArg(int argc, char* argv[]) {
case 's':
setSkipSqlNum(optarg);
break;
+ case 'l':
+ setLogLevel(optarg);
+ break;
default:
break;
}
diff --git a/source/libs/planner/src/planLogicCreater.c b/source/libs/planner/src/planLogicCreater.c
index 52f9ddaa6f..8c87f60b9f 100644
--- a/source/libs/planner/src/planLogicCreater.c
+++ b/source/libs/planner/src/planLogicCreater.c
@@ -611,6 +611,8 @@ static int32_t createIndefRowsFuncLogicNode(SLogicPlanContext* pCxt, SSelectStmt
return code;
}
+static bool isInterpFunc(int32_t funcId) { return fmIsInterpFunc(funcId) || fmIsInterpPseudoColumnFunc(funcId); }
+
static int32_t createInterpFuncLogicNode(SLogicPlanContext* pCxt, SSelectStmt* pSelect, SLogicNode** pLogicNode) {
if (!pSelect->hasInterpFunc) {
return TSDB_CODE_SUCCESS;
@@ -625,7 +627,7 @@ static int32_t createInterpFuncLogicNode(SLogicPlanContext* pCxt, SSelectStmt* p
pInterpFunc->node.requireDataOrder = getRequireDataOrder(true, pSelect);
pInterpFunc->node.resultDataOrder = pInterpFunc->node.requireDataOrder;
- int32_t code = nodesCollectFuncs(pSelect, SQL_CLAUSE_SELECT, fmIsInterpFunc, &pInterpFunc->pFuncs);
+ int32_t code = nodesCollectFuncs(pSelect, SQL_CLAUSE_SELECT, isInterpFunc, &pInterpFunc->pFuncs);
if (TSDB_CODE_SUCCESS == code) {
code = rewriteExprsForSelect(pInterpFunc->pFuncs, pSelect, SQL_CLAUSE_SELECT);
}
diff --git a/source/libs/planner/src/planPhysiCreater.c b/source/libs/planner/src/planPhysiCreater.c
index 421da8f110..810b82b9fc 100644
--- a/source/libs/planner/src/planPhysiCreater.c
+++ b/source/libs/planner/src/planPhysiCreater.c
@@ -1409,7 +1409,9 @@ static int32_t createPartitionPhysiNode(SPhysiPlanContext* pCxt, SNodeList* pChi
static int32_t createFillPhysiNode(SPhysiPlanContext* pCxt, SNodeList* pChildren, SFillLogicNode* pFillNode,
SPhysiNode** pPhyNode) {
- SFillPhysiNode* pFill = (SFillPhysiNode*)makePhysiNode(pCxt, (SLogicNode*)pFillNode, QUERY_NODE_PHYSICAL_PLAN_FILL);
+ SFillPhysiNode* pFill = (SFillPhysiNode*)makePhysiNode(
+ pCxt, (SLogicNode*)pFillNode,
+ pCxt->pPlanCxt->streamQuery ? QUERY_NODE_PHYSICAL_PLAN_STREAM_FILL : QUERY_NODE_PHYSICAL_PLAN_FILL);
if (NULL == pFill) {
return TSDB_CODE_OUT_OF_MEMORY;
}
diff --git a/source/libs/planner/test/planBasicTest.cpp b/source/libs/planner/test/planBasicTest.cpp
index c7769b15b1..aeb78f4030 100644
--- a/source/libs/planner/test/planBasicTest.cpp
+++ b/source/libs/planner/test/planBasicTest.cpp
@@ -101,6 +101,8 @@ TEST_F(PlanBasicTest, interpFunc) {
useDb("root", "test");
run("SELECT INTERP(c1) FROM t1 RANGE('2017-7-14 18:00:00', '2017-7-14 19:00:00') EVERY(5s) FILL(LINEAR)");
+
+ run("SELECT _IROWTS, INTERP(c1) FROM t1 RANGE('2017-7-14 18:00:00', '2017-7-14 19:00:00') EVERY(5s) FILL(LINEAR)");
}
TEST_F(PlanBasicTest, lastRowFunc) {
diff --git a/source/libs/planner/test/planOtherTest.cpp b/source/libs/planner/test/planOtherTest.cpp
index f6416b3cb1..2ad997bb46 100644
--- a/source/libs/planner/test/planOtherTest.cpp
+++ b/source/libs/planner/test/planOtherTest.cpp
@@ -84,6 +84,8 @@ TEST_F(PlanOtherTest, show) {
run("SHOW TABLE DISTRIBUTED st1");
run("SHOW DNODE 1 VARIABLES");
+
+ run("SHOW TAGS FROM st1s1");
}
TEST_F(PlanOtherTest, delete) {
diff --git a/source/libs/qworker/src/qworker.c b/source/libs/qworker/src/qworker.c
index 3c102938d0..ae9dd82a58 100644
--- a/source/libs/qworker/src/qworker.c
+++ b/source/libs/qworker/src/qworker.c
@@ -107,9 +107,12 @@ int32_t qwExecTask(QW_FPARAMS_DEF, SQWTaskCtx *ctx, bool *queryStop) {
QW_TASK_DLOG("start to execTask, loopIdx:%d", i++);
// if *taskHandle is NULL, it's killed right now
+ bool hasMore = false;
+
if (taskHandle) {
qwDbgSimulateSleep();
- code = qExecTaskOpt(taskHandle, pResList, &useconds, &localFetch);
+
+ code = qExecTaskOpt(taskHandle, pResList, &useconds, &hasMore, &localFetch);
if (code) {
if (code != TSDB_CODE_OPS_NOT_SUPPORT) {
QW_TASK_ELOG("qExecTask failed, code:%x - %s", code, tstrerror(code));
@@ -122,20 +125,8 @@ int32_t qwExecTask(QW_FPARAMS_DEF, SQWTaskCtx *ctx, bool *queryStop) {
++execNum;
- if (taosArrayGetSize(pResList) == 0) {
- QW_TASK_DLOG("qExecTask end with empty res, useconds:%" PRIu64, useconds);
- dsEndPut(sinkHandle, useconds);
-
- QW_ERR_JRET(qwHandleTaskComplete(QW_FPARAMS(), ctx));
-
- if (queryStop) {
- *queryStop = true;
- }
-
- break;
- }
-
- for (int32_t j = 0; j < taosArrayGetSize(pResList); ++j) {
+ size_t numOfResBlock = taosArrayGetSize(pResList);
+ for (int32_t j = 0; j < numOfResBlock; ++j) {
SSDataBlock *pRes = taosArrayGetP(pResList, j);
ASSERT(pRes->info.rows > 0);
@@ -149,6 +140,23 @@ int32_t qwExecTask(QW_FPARAMS_DEF, SQWTaskCtx *ctx, bool *queryStop) {
QW_TASK_DLOG("data put into sink, rows:%d, continueExecTask:%d", pRes->info.rows, qcontinue);
}
+ if (numOfResBlock == 0 || (hasMore == false)) {
+ if (numOfResBlock == 0) {
+ QW_TASK_DLOG("qExecTask end with empty res, useconds:%" PRIu64, useconds);
+ } else {
+ QW_TASK_DLOG("qExecTask done", "");
+ }
+
+ dsEndPut(sinkHandle, useconds);
+ QW_ERR_JRET(qwHandleTaskComplete(QW_FPARAMS(), ctx));
+
+ if (queryStop) {
+ *queryStop = true;
+ }
+
+ break;
+ }
+
if (!qcontinue) {
if (queryStop) {
*queryStop = true;
diff --git a/source/libs/scheduler/src/schJob.c b/source/libs/scheduler/src/schJob.c
index 5e47c0a0ed..69495c8b7a 100644
--- a/source/libs/scheduler/src/schJob.c
+++ b/source/libs/scheduler/src/schJob.c
@@ -47,8 +47,7 @@ void schUpdateJobErrCode(SSchJob *pJob, int32_t errCode) {
return;
_return:
-
- SCH_JOB_DLOG("job errCode updated to %x - %s", errCode, tstrerror(errCode));
+ SCH_JOB_DLOG("job errCode updated to %s", tstrerror(errCode));
}
bool schJobDone(SSchJob *pJob) {
@@ -491,7 +490,7 @@ int32_t schProcessOnJobFailure(SSchJob *pJob, int32_t errCode) {
int32_t code = atomic_load_32(&pJob->errCode);
if (code) {
- SCH_JOB_DLOG("job failed with error: %s", tstrerror(code));
+ SCH_JOB_DLOG("job failed with error %s", tstrerror(code));
}
schPostJobRes(pJob, 0);
diff --git a/source/libs/stream/src/streamState.c b/source/libs/stream/src/streamState.c
index fde8bca77b..3428a85823 100644
--- a/source/libs/stream/src/streamState.c
+++ b/source/libs/stream/src/streamState.c
@@ -29,7 +29,7 @@ SStreamState* streamStateOpen(char* path, SStreamTask* pTask, bool specPath) {
if (!specPath) {
sprintf(statePath, "%s/%d", path, pTask->taskId);
} else {
- memcpy(statePath, path, 300);
+ strncpy(statePath, path, 300);
}
if (tdbOpen(statePath, 4096, 256, &pState->db) < 0) {
goto _err;
@@ -40,6 +40,11 @@ SStreamState* streamStateOpen(char* path, SStreamTask* pTask, bool specPath) {
goto _err;
}
+ // todo refactor
+ if (tdbTbOpen("func.state.db", sizeof(SWinKey), -1, SWinKeyCmpr, pState->db, &pState->pFillStateDb) < 0) {
+ goto _err;
+ }
+
if (tdbTbOpen("func.state.db", sizeof(STupleKey), -1, STupleKeyCmpr, pState->db, &pState->pFuncStateDb) < 0) {
goto _err;
}
@@ -55,6 +60,7 @@ SStreamState* streamStateOpen(char* path, SStreamTask* pTask, bool specPath) {
_err:
tdbTbClose(pState->pStateDb);
tdbTbClose(pState->pFuncStateDb);
+ tdbTbClose(pState->pFillStateDb);
tdbClose(pState->db);
taosMemoryFree(pState);
return NULL;
@@ -64,6 +70,7 @@ void streamStateClose(SStreamState* pState) {
tdbCommit(pState->db, &pState->txn);
tdbTbClose(pState->pStateDb);
tdbTbClose(pState->pFuncStateDb);
+ tdbTbClose(pState->pFillStateDb);
tdbClose(pState->db);
taosMemoryFree(pState);
@@ -126,14 +133,30 @@ int32_t streamStateFuncDel(SStreamState* pState, const STupleKey* key) {
int32_t streamStatePut(SStreamState* pState, const SWinKey* key, const void* value, int32_t vLen) {
return tdbTbUpsert(pState->pStateDb, key, sizeof(SWinKey), value, vLen, &pState->txn);
}
+
+// todo refactor
+int32_t streamStateFillPut(SStreamState* pState, const SWinKey* key, const void* value, int32_t vLen) {
+ return tdbTbUpsert(pState->pFillStateDb, key, sizeof(SWinKey), value, vLen, &pState->txn);
+}
+
int32_t streamStateGet(SStreamState* pState, const SWinKey* key, void** pVal, int32_t* pVLen) {
return tdbTbGet(pState->pStateDb, key, sizeof(SWinKey), pVal, pVLen);
}
+// todo refactor
+int32_t streamStateFillGet(SStreamState* pState, const SWinKey* key, void** pVal, int32_t* pVLen) {
+ return tdbTbGet(pState->pFillStateDb, key, sizeof(SWinKey), pVal, pVLen);
+}
+
int32_t streamStateDel(SStreamState* pState, const SWinKey* key) {
return tdbTbDelete(pState->pStateDb, key, sizeof(SWinKey), &pState->txn);
}
+// todo refactor
+int32_t streamStateFillDel(SStreamState* pState, const SWinKey* key) {
+ return tdbTbDelete(pState->pFillStateDb, key, sizeof(SWinKey), &pState->txn);
+}
+
int32_t streamStateAddIfNotExist(SStreamState* pState, const SWinKey* key, void** pVal, int32_t* pVLen) {
// todo refactor
int32_t size = *pVLen;
@@ -165,6 +188,31 @@ SStreamStateCur* streamStateGetCur(SStreamState* pState, const SWinKey* key) {
return pCur;
}
+SStreamStateCur* streamStateFillGetCur(SStreamState* pState, const SWinKey* key) {
+ SStreamStateCur* pCur = taosMemoryCalloc(1, sizeof(SStreamStateCur));
+ if (pCur == NULL) return NULL;
+ tdbTbcOpen(pState->pFillStateDb, &pCur->pCur, NULL);
+
+ int32_t c;
+ tdbTbcMoveTo(pCur->pCur, key, sizeof(SWinKey), &c);
+ if (c != 0) {
+ taosMemoryFree(pCur);
+ return NULL;
+ }
+ return pCur;
+}
+
+SStreamStateCur* streamStateGetAndCheckCur(SStreamState* pState, SWinKey* key) {
+ SStreamStateCur* pCur = streamStateFillGetCur(pState, key);
+ if (pCur) {
+ int32_t code = streamStateGetGroupKVByCur(pCur, key, NULL, 0);
+ if (code == 0) {
+ return pCur;
+ }
+ }
+ return NULL;
+}
+
int32_t streamStateGetKVByCur(SStreamStateCur* pCur, SWinKey* pKey, const void** pVal, int32_t* pVLen) {
const SWinKey* pKTmp = NULL;
int32_t kLen;
@@ -175,6 +223,17 @@ int32_t streamStateGetKVByCur(SStreamStateCur* pCur, SWinKey* pKey, const void**
return 0;
}
+int32_t streamStateGetGroupKVByCur(SStreamStateCur* pCur, SWinKey* pKey, const void** pVal, int32_t* pVLen) {
+ uint64_t groupId = pKey->groupId;
+ int32_t code = streamStateGetKVByCur(pCur, pKey, pVal, pVLen);
+ if (code == 0) {
+ if (pKey->groupId == groupId) {
+ return 0;
+ }
+ }
+ return -1;
+}
+
int32_t streamStateSeekFirst(SStreamState* pState, SStreamStateCur* pCur) {
//
return tdbTbcMoveToFirst(pCur->pCur);
@@ -185,12 +244,12 @@ int32_t streamStateSeekLast(SStreamState* pState, SStreamStateCur* pCur) {
return tdbTbcMoveToLast(pCur->pCur);
}
-SStreamStateCur* streamStateSeekKeyNext(SStreamState* pState, const SWinKey* key) {
+SStreamStateCur* streamStateFillSeekKeyNext(SStreamState* pState, const SWinKey* key) {
SStreamStateCur* pCur = taosMemoryCalloc(1, sizeof(SStreamStateCur));
if (pCur == NULL) {
return NULL;
}
- if (tdbTbcOpen(pState->pStateDb, &pCur->pCur, NULL) < 0) {
+ if (tdbTbcOpen(pState->pFillStateDb, &pCur->pCur, NULL) < 0) {
taosMemoryFree(pCur);
return NULL;
}
@@ -211,12 +270,12 @@ SStreamStateCur* streamStateSeekKeyNext(SStreamState* pState, const SWinKey* key
return pCur;
}
-SStreamStateCur* streamStateSeekKeyPrev(SStreamState* pState, const SWinKey* key) {
+SStreamStateCur* streamStateFillSeekKeyPrev(SStreamState* pState, const SWinKey* key) {
SStreamStateCur* pCur = taosMemoryCalloc(1, sizeof(SStreamStateCur));
if (pCur == NULL) {
return NULL;
}
- if (tdbTbcOpen(pState->pStateDb, &pCur->pCur, NULL) < 0) {
+ if (tdbTbcOpen(pState->pFillStateDb, &pCur->pCur, NULL) < 0) {
taosMemoryFree(pCur);
return NULL;
}
diff --git a/source/libs/sync/inc/syncUtil.h b/source/libs/sync/inc/syncUtil.h
index 7ecff7ae97..96e22720e8 100644
--- a/source/libs/sync/inc/syncUtil.h
+++ b/source/libs/sync/inc/syncUtil.h
@@ -32,7 +32,7 @@ uint64_t syncUtilAddr2U64(const char* host, uint16_t port);
void syncUtilU642Addr(uint64_t u64, char* host, size_t len, uint16_t* port);
void syncUtilnodeInfo2EpSet(const SNodeInfo* pNodeInfo, SEpSet* pEpSet);
void syncUtilraftId2EpSet(const SRaftId* raftId, SEpSet* pEpSet);
-void syncUtilnodeInfo2raftId(const SNodeInfo* pNodeInfo, SyncGroupId vgId, SRaftId* raftId);
+bool syncUtilnodeInfo2raftId(const SNodeInfo* pNodeInfo, SyncGroupId vgId, SRaftId* raftId);
bool syncUtilSameId(const SRaftId* pId1, const SRaftId* pId2);
bool syncUtilEmptyId(const SRaftId* pId);
diff --git a/source/libs/sync/src/syncIndexMgr.c b/source/libs/sync/src/syncIndexMgr.c
index 3bda9bcd51..28b5313ac5 100644
--- a/source/libs/sync/src/syncIndexMgr.c
+++ b/source/libs/sync/src/syncIndexMgr.c
@@ -20,7 +20,10 @@
SSyncIndexMgr *syncIndexMgrCreate(SSyncNode *pSyncNode) {
SSyncIndexMgr *pSyncIndexMgr = taosMemoryMalloc(sizeof(SSyncIndexMgr));
- ASSERT(pSyncIndexMgr != NULL);
+ if (pSyncIndexMgr == NULL) {
+ terrno = TSDB_CODE_OUT_OF_MEMORY;
+ return NULL;
+ }
memset(pSyncIndexMgr, 0, sizeof(SSyncIndexMgr));
pSyncIndexMgr->replicas = &(pSyncNode->replicasId);
@@ -248,4 +251,4 @@ SyncTerm syncIndexMgrGetTerm(SSyncIndexMgr *pSyncIndexMgr, const SRaftId *pRaftI
}
ASSERT(0);
return -1;
-}
\ No newline at end of file
+}
diff --git a/source/libs/sync/src/syncMain.c b/source/libs/sync/src/syncMain.c
index 17157fbd23..3d79c6c464 100644
--- a/source/libs/sync/src/syncMain.c
+++ b/source/libs/sync/src/syncMain.c
@@ -51,15 +51,17 @@ static int32_t syncNodeAppendNoop(SSyncNode* ths);
int32_t syncNodeOnPingCb(SSyncNode* ths, SyncPing* pMsg);
int32_t syncNodeOnPingReplyCb(SSyncNode* ths, SyncPingReply* pMsg);
-// life cycle
-static void syncFreeNode(void* param);
// ---------------------------------
+static void syncNodeFreeCb(void *param) {
+ syncNodeClose(param);
+ param = NULL;
+}
int32_t syncInit() {
int32_t ret = 0;
if (!syncEnvIsStart()) {
- tsNodeRefId = taosOpenRef(200, syncFreeNode);
+ tsNodeRefId = taosOpenRef(200, syncNodeFreeCb);
if (tsNodeRefId < 0) {
sError("failed to init node ref");
syncCleanUp();
@@ -86,11 +88,15 @@ void syncCleanUp() {
int64_t syncOpen(const SSyncInfo* pSyncInfo) {
SSyncNode* pSyncNode = syncNodeOpen(pSyncInfo);
- ASSERT(pSyncNode != NULL);
+ if (pSyncNode == NULL) {
+ sError("failed to open sync node. vgId:%d", pSyncInfo->vgId);
+ return -1;
+ }
pSyncNode->rid = taosAddRef(tsNodeRefId, pSyncNode);
if (pSyncNode->rid < 0) {
- syncFreeNode(pSyncNode);
+ syncNodeClose(pSyncNode);
+ pSyncNode = NULL;
return -1;
}
@@ -136,11 +142,9 @@ void syncStartStandBy(int64_t rid) {
void syncStop(int64_t rid) {
SSyncNode* pSyncNode = (SSyncNode*)taosAcquireRef(tsNodeRefId, rid);
if (pSyncNode == NULL) return;
-
int32_t vgId = pSyncNode->vgId;
- syncNodeClose(pSyncNode);
-
taosReleaseRef(tsNodeRefId, pSyncNode->rid);
+
taosRemoveRef(tsNodeRefId, rid);
sDebug("vgId:%d, sync rid:%" PRId64 " is removed from rsetId:%" PRId64, vgId, rid, tsNodeRefId);
}
@@ -210,7 +214,7 @@ int32_t syncReconfigBuild(int64_t rid, const SSyncCfg* pNewCfg, SRpcMsg* pRpcMsg
if (!syncNodeCheckNewConfig(pSyncNode, pNewCfg)) {
taosReleaseRef(tsNodeRefId, pSyncNode->rid);
terrno = TSDB_CODE_SYN_NEW_CONFIG_ERROR;
- sError("syncNodeCheckNewConfig error");
+ sError("invalid new config. vgId:%d", pSyncNode->vgId);
return -1;
}
@@ -237,7 +241,7 @@ int32_t syncReconfig(int64_t rid, const SSyncCfg* pNewCfg) {
if (!syncNodeCheckNewConfig(pSyncNode, pNewCfg)) {
taosReleaseRef(tsNodeRefId, pSyncNode->rid);
terrno = TSDB_CODE_SYN_NEW_CONFIG_ERROR;
- sError("syncNodeCheckNewConfig error");
+ sError("invalid new config. vgId:%d", pSyncNode->vgId);
return -1;
}
@@ -941,16 +945,18 @@ _END:
SSyncNode* syncNodeOpen(const SSyncInfo* pOldSyncInfo) {
SSyncInfo* pSyncInfo = (SSyncInfo*)pOldSyncInfo;
- SSyncNode* pSyncNode = (SSyncNode*)taosMemoryMalloc(sizeof(SSyncNode));
- ASSERT(pSyncNode != NULL);
- memset(pSyncNode, 0, sizeof(SSyncNode));
+ SSyncNode* pSyncNode = (SSyncNode*)taosMemoryCalloc(1, sizeof(SSyncNode));
+ if (pSyncNode == NULL) {
+ terrno = TSDB_CODE_OUT_OF_MEMORY;
+ goto _error;
+ }
int32_t ret = 0;
if (!taosDirExist((char*)(pSyncInfo->path))) {
if (taosMkDir(pSyncInfo->path) != 0) {
terrno = TAOS_SYSTEM_ERROR(errno);
sError("failed to create dir:%s since %s", pSyncInfo->path, terrstr());
- return NULL;
+ goto _error;
}
}
@@ -963,15 +969,21 @@ SSyncNode* syncNodeOpen(const SSyncInfo* pOldSyncInfo) {
meta.lastConfigIndex = SYNC_INDEX_INVALID;
meta.batchSize = pSyncInfo->batchSize;
ret = raftCfgCreateFile((SSyncCfg*)&(pSyncInfo->syncCfg), meta, pSyncNode->configPath);
- ASSERT(ret == 0);
-
+ if (ret != 0) {
+ sError("failed to create raft cfg file. configPath: %s", pSyncNode->configPath);
+ goto _error;
+ }
} else {
// update syncCfg by raft_config.json
pSyncNode->pRaftCfg = raftCfgOpen(pSyncNode->configPath);
- ASSERT(pSyncNode->pRaftCfg != NULL);
+ if (pSyncNode->pRaftCfg == NULL) {
+ sError("failed to open raft cfg file. path:%s", pSyncNode->configPath);
+ goto _error;
+ }
pSyncInfo->syncCfg = pSyncNode->pRaftCfg->cfg;
raftCfgClose(pSyncNode->pRaftCfg);
+ pSyncNode->pRaftCfg = NULL;
}
// init by SSyncInfo
@@ -988,11 +1000,17 @@ SSyncNode* syncNodeOpen(const SSyncInfo* pOldSyncInfo) {
// init raft config
pSyncNode->pRaftCfg = raftCfgOpen(pSyncNode->configPath);
- ASSERT(pSyncNode->pRaftCfg != NULL);
+ if (pSyncNode->pRaftCfg == NULL) {
+ sError("failed to open raft cfg file. path:%s", pSyncNode->configPath);
+ goto _error;
+ }
// init internal
pSyncNode->myNodeInfo = pSyncNode->pRaftCfg->cfg.nodeInfo[pSyncNode->pRaftCfg->cfg.myIndex];
- syncUtilnodeInfo2raftId(&pSyncNode->myNodeInfo, pSyncNode->vgId, &pSyncNode->myRaftId);
+ if (!syncUtilnodeInfo2raftId(&pSyncNode->myNodeInfo, pSyncNode->vgId, &pSyncNode->myRaftId)) {
+ sError("failed to determine my raft member id. vgId:%d", pSyncNode->vgId);
+ goto _error;
+ }
// init peersNum, peers, peersId
pSyncNode->peersNum = pSyncNode->pRaftCfg->cfg.replicaNum - 1;
@@ -1004,17 +1022,24 @@ SSyncNode* syncNodeOpen(const SSyncInfo* pOldSyncInfo) {
}
}
for (int i = 0; i < pSyncNode->peersNum; ++i) {
- syncUtilnodeInfo2raftId(&pSyncNode->peersNodeInfo[i], pSyncNode->vgId, &pSyncNode->peersId[i]);
+ if (!syncUtilnodeInfo2raftId(&pSyncNode->peersNodeInfo[i], pSyncNode->vgId, &pSyncNode->peersId[i])) {
+ sError("failed to determine raft member id. vgId:%d, peer:%d", pSyncNode->vgId, i);
+ goto _error;
+ }
}
// init replicaNum, replicasId
pSyncNode->replicaNum = pSyncNode->pRaftCfg->cfg.replicaNum;
for (int i = 0; i < pSyncNode->pRaftCfg->cfg.replicaNum; ++i) {
- syncUtilnodeInfo2raftId(&pSyncNode->pRaftCfg->cfg.nodeInfo[i], pSyncNode->vgId, &pSyncNode->replicasId[i]);
+ if(!syncUtilnodeInfo2raftId(&pSyncNode->pRaftCfg->cfg.nodeInfo[i], pSyncNode->vgId, &pSyncNode->replicasId[i])) {
+ sError("failed to determine raft member id. vgId:%d, replica:%d", pSyncNode->vgId, i);
+ goto _error;
+ }
}
// init raft algorithm
pSyncNode->pFsm = pSyncInfo->pFsm;
+ pSyncInfo->pFsm = NULL;
pSyncNode->quorum = syncUtilQuorum(pSyncNode->pRaftCfg->cfg.replicaNum);
pSyncNode->leaderCache = EMPTY_RAFT_ID;
@@ -1047,29 +1072,50 @@ SSyncNode* syncNodeOpen(const SSyncInfo* pOldSyncInfo) {
// init TLA+ server vars
pSyncNode->state = TAOS_SYNC_STATE_FOLLOWER;
pSyncNode->pRaftStore = raftStoreOpen(pSyncNode->raftStorePath);
- ASSERT(pSyncNode->pRaftStore != NULL);
+ if (pSyncNode->pRaftStore == NULL) {
+ sError("failed to open raft store. path: %s", pSyncNode->raftStorePath);
+ goto _error;
+ }
// init TLA+ candidate vars
pSyncNode->pVotesGranted = voteGrantedCreate(pSyncNode);
- ASSERT(pSyncNode->pVotesGranted != NULL);
+ if (pSyncNode->pVotesGranted == NULL) {
+ sError("failed to create VotesGranted. vgId:%d", pSyncNode->vgId);
+ goto _error;
+ }
pSyncNode->pVotesRespond = votesRespondCreate(pSyncNode);
- ASSERT(pSyncNode->pVotesRespond != NULL);
+ if (pSyncNode->pVotesRespond == NULL) {
+ sError("failed to create VotesRespond. vgId:%d", pSyncNode->vgId);
+ goto _error;
+ }
// init TLA+ leader vars
pSyncNode->pNextIndex = syncIndexMgrCreate(pSyncNode);
- ASSERT(pSyncNode->pNextIndex != NULL);
+ if (pSyncNode->pNextIndex == NULL) {
+ sError("failed to create SyncIndexMgr. vgId:%d", pSyncNode->vgId);
+ goto _error;
+ }
pSyncNode->pMatchIndex = syncIndexMgrCreate(pSyncNode);
- ASSERT(pSyncNode->pMatchIndex != NULL);
+ if (pSyncNode->pMatchIndex == NULL) {
+ sError("failed to create SyncIndexMgr. vgId:%d", pSyncNode->vgId);
+ goto _error;
+ }
// init TLA+ log vars
pSyncNode->pLogStore = logStoreCreate(pSyncNode);
- ASSERT(pSyncNode->pLogStore != NULL);
+ if (pSyncNode->pLogStore == NULL) {
+ sError("failed to create SyncLogStore. vgId:%d", pSyncNode->vgId);
+ goto _error;
+ }
SyncIndex commitIndex = SYNC_INDEX_INVALID;
if (pSyncNode->pFsm != NULL && pSyncNode->pFsm->FpGetSnapshotInfo != NULL) {
SSnapshot snapshot = {0};
int32_t code = pSyncNode->pFsm->FpGetSnapshotInfo(pSyncNode->pFsm, &snapshot);
- ASSERT(code == 0);
+ if (code != 0) {
+ sError("failed to get snapshot info. vgId:%d, code:%d", pSyncNode->vgId, code);
+ goto _error;
+ }
if (snapshot.lastApplyIndex > commitIndex) {
commitIndex = snapshot.lastApplyIndex;
syncNodeEventLog(pSyncNode, "reset commit index by snapshot");
@@ -1132,7 +1178,10 @@ SSyncNode* syncNodeOpen(const SSyncInfo* pOldSyncInfo) {
// tools
pSyncNode->pSyncRespMgr = syncRespMgrCreate(pSyncNode, SYNC_RESP_TTL_MS);
- ASSERT(pSyncNode->pSyncRespMgr != NULL);
+ if (pSyncNode->pSyncRespMgr == NULL) {
+ sError("failed to create SyncRespMgr. vgId:%d", pSyncNode->vgId);
+ goto _error;
+ }
// restore state
pSyncNode->restoreFinish = false;
@@ -1162,6 +1211,15 @@ SSyncNode* syncNodeOpen(const SSyncInfo* pOldSyncInfo) {
syncNodeEventLog(pSyncNode, "sync open");
return pSyncNode;
+
+_error:
+ if (pSyncInfo->pFsm) {
+ taosMemoryFree(pSyncInfo->pFsm);
+ pSyncInfo->pFsm = NULL;
+ }
+ syncNodeClose(pSyncNode);
+ pSyncNode = NULL;
+ return NULL;
}
void syncNodeMaybeUpdateCommitBySnapshot(SSyncNode* pSyncNode) {
@@ -1214,20 +1272,28 @@ void syncNodeStartStandBy(SSyncNode* pSyncNode) {
void syncNodeClose(SSyncNode* pSyncNode) {
syncNodeEventLog(pSyncNode, "sync close");
-
+ if (pSyncNode == NULL) {
+ return;
+ }
int32_t ret;
- ASSERT(pSyncNode != NULL);
ret = raftStoreClose(pSyncNode->pRaftStore);
ASSERT(ret == 0);
syncRespMgrDestroy(pSyncNode->pSyncRespMgr);
+ pSyncNode->pSyncRespMgr = NULL;
voteGrantedDestroy(pSyncNode->pVotesGranted);
+ pSyncNode->pVotesGranted = NULL;
votesRespondDestory(pSyncNode->pVotesRespond);
+ pSyncNode->pVotesRespond = NULL;
syncIndexMgrDestroy(pSyncNode->pNextIndex);
+ pSyncNode->pNextIndex = NULL;
syncIndexMgrDestroy(pSyncNode->pMatchIndex);
+ pSyncNode->pMatchIndex = NULL;
logStoreDestory(pSyncNode->pLogStore);
+ pSyncNode->pLogStore = NULL;
raftCfgClose(pSyncNode->pRaftCfg);
+ pSyncNode->pRaftCfg = NULL;
syncNodeStopPingTimer(pSyncNode);
syncNodeStopElectTimer(pSyncNode);
@@ -1249,8 +1315,7 @@ void syncNodeClose(SSyncNode* pSyncNode) {
pSyncNode->pNewNodeReceiver = NULL;
}
- // free memory in syncFreeNode
- // taosMemoryFree(pSyncNode);
+ taosMemoryFree(pSyncNode);
}
// option
@@ -2534,7 +2599,7 @@ static void syncNodeEqHeartbeatTimer(void* param, void* tmrId) {
return;
}
} else {
- sError("syncNodeEqHeartbeatTimer FpEqMsg is NULL");
+ sError("vgId:%d, enqueue msg cb ptr (i.e. FpEqMsg) not set.", pSyncNode->vgId);
}
syncTimeoutDestroy(pSyncMsg);
@@ -2774,14 +2839,6 @@ int32_t syncNodeOnClientRequestBatchCb(SSyncNode* ths, SyncClientRequestBatch* p
return 0;
}
-static void syncFreeNode(void* param) {
- SSyncNode* pNode = param;
- // inner object already free
- // syncNodePrint2((char*)"==syncFreeNode==", pNode);
-
- taosMemoryFree(pNode);
-}
-
const char* syncStr(ESyncState state) {
switch (state) {
case TAOS_SYNC_STATE_FOLLOWER:
diff --git a/source/libs/sync/src/syncRaftCfg.c b/source/libs/sync/src/syncRaftCfg.c
index ab404d1b9a..57126d0871 100644
--- a/source/libs/sync/src/syncRaftCfg.c
+++ b/source/libs/sync/src/syncRaftCfg.c
@@ -364,8 +364,6 @@ int32_t raftCfgCreateFile(SSyncCfg *pCfg, SRaftCfgMeta meta, const char *path) {
int32_t sysErr = errno;
const char *sysErrStr = strerror(errno);
sError("create raft cfg file error, err:%d %X, msg:%s, syserr:%d, sysmsg:%s", err, err, errStr, sysErr, sysErrStr);
- ASSERT(0);
-
return -1;
}
diff --git a/source/libs/sync/src/syncRaftStore.c b/source/libs/sync/src/syncRaftStore.c
index 29f78b582f..22b47a2c45 100644
--- a/source/libs/sync/src/syncRaftStore.c
+++ b/source/libs/sync/src/syncRaftStore.c
@@ -28,7 +28,7 @@ SRaftStore *raftStoreOpen(const char *path) {
SRaftStore *pRaftStore = taosMemoryMalloc(sizeof(SRaftStore));
if (pRaftStore == NULL) {
- sError("raftStoreOpen malloc error");
+ terrno = TSDB_CODE_OUT_OF_MEMORY;
return NULL;
}
memset(pRaftStore, 0, sizeof(*pRaftStore));
@@ -72,7 +72,9 @@ static int32_t raftStoreInit(SRaftStore *pRaftStore) {
}
int32_t raftStoreClose(SRaftStore *pRaftStore) {
- ASSERT(pRaftStore != NULL);
+ if (pRaftStore == NULL) {
+ return 0;
+ }
taosCloseFile(&pRaftStore->pFile);
taosMemoryFree(pRaftStore);
diff --git a/source/libs/sync/src/syncRespMgr.c b/source/libs/sync/src/syncRespMgr.c
index d7ed864180..103c225476 100644
--- a/source/libs/sync/src/syncRespMgr.c
+++ b/source/libs/sync/src/syncRespMgr.c
@@ -19,6 +19,10 @@
SSyncRespMgr *syncRespMgrCreate(void *data, int64_t ttl) {
SSyncRespMgr *pObj = (SSyncRespMgr *)taosMemoryMalloc(sizeof(SSyncRespMgr));
+ if (pObj == NULL) {
+ terrno = TSDB_CODE_OUT_OF_MEMORY;
+ return NULL;
+ }
memset(pObj, 0, sizeof(SSyncRespMgr));
pObj->pRespHash =
diff --git a/source/libs/sync/src/syncSnapshot.c b/source/libs/sync/src/syncSnapshot.c
index 0be3392a9a..68d81813ac 100644
--- a/source/libs/sync/src/syncSnapshot.c
+++ b/source/libs/sync/src/syncSnapshot.c
@@ -35,7 +35,10 @@ SSyncSnapshotSender *snapshotSenderCreate(SSyncNode *pSyncNode, int32_t replicaI
SSyncSnapshotSender *pSender = NULL;
if (condition) {
pSender = taosMemoryMalloc(sizeof(SSyncSnapshotSender));
- ASSERT(pSender != NULL);
+ if (pSender == NULL) {
+ terrno = TSDB_CODE_OUT_OF_MEMORY;
+ return NULL;
+ }
memset(pSender, 0, sizeof(*pSender));
pSender->start = false;
diff --git a/source/libs/sync/src/syncUtil.c b/source/libs/sync/src/syncUtil.c
index 325073f366..6f234631da 100644
--- a/source/libs/sync/src/syncUtil.c
+++ b/source/libs/sync/src/syncUtil.c
@@ -26,7 +26,8 @@ uint64_t syncUtilAddr2U64(const char* host, uint16_t port) {
uint32_t hostU32 = taosGetIpv4FromFqdn(host);
if (hostU32 == (uint32_t)-1) {
- sError("Get IP address error");
+ sError("failed to resolve ipv4 addr. host:%s", host);
+ terrno = TSDB_CODE_TSC_INVALID_FQDN;
return -1;
}
@@ -84,13 +85,18 @@ void syncUtilraftId2EpSet(const SRaftId* raftId, SEpSet* pEpSet) {
addEpIntoEpSet(pEpSet, host, port);
}
-void syncUtilnodeInfo2raftId(const SNodeInfo* pNodeInfo, SyncGroupId vgId, SRaftId* raftId) {
+bool syncUtilnodeInfo2raftId(const SNodeInfo* pNodeInfo, SyncGroupId vgId, SRaftId* raftId) {
uint32_t ipv4 = taosGetIpv4FromFqdn(pNodeInfo->nodeFqdn);
- ASSERT(ipv4 != 0xFFFFFFFF);
+ if (ipv4 == 0xFFFFFFFF || ipv4 == 1) {
+ sError("failed to resolve ipv4 addr. fqdn: %s", pNodeInfo->nodeFqdn);
+ terrno = TSDB_CODE_TSC_INVALID_FQDN;
+ return false;
+ }
char ipbuf[128] = {0};
tinet_ntoa(ipbuf, ipv4);
raftId->addr = syncUtilAddr2U64(ipbuf, pNodeInfo->nodePort);
raftId->vgId = vgId;
+ return true;
}
bool syncUtilSameId(const SRaftId* pId1, const SRaftId* pId2) {
@@ -310,4 +316,4 @@ void syncUtilJson2Line(char* jsonStr) {
q++;
}
}
-}
\ No newline at end of file
+}
diff --git a/source/libs/sync/src/syncVoteMgr.c b/source/libs/sync/src/syncVoteMgr.c
index 1d46d71a05..641bb32d2d 100644
--- a/source/libs/sync/src/syncVoteMgr.c
+++ b/source/libs/sync/src/syncVoteMgr.c
@@ -24,7 +24,10 @@ static void voteGrantedClearVotes(SVotesGranted *pVotesGranted) {
SVotesGranted *voteGrantedCreate(SSyncNode *pSyncNode) {
SVotesGranted *pVotesGranted = taosMemoryMalloc(sizeof(SVotesGranted));
- ASSERT(pVotesGranted != NULL);
+ if (pVotesGranted == NULL) {
+ terrno = TSDB_CODE_OUT_OF_MEMORY;
+ return NULL;
+ }
memset(pVotesGranted, 0, sizeof(SVotesGranted));
pVotesGranted->replicas = &(pSyncNode->replicasId);
diff --git a/source/util/src/tqueue.c b/source/util/src/tqueue.c
index eb70002680..eb62e12a19 100644
--- a/source/util/src/tqueue.c
+++ b/source/util/src/tqueue.c
@@ -151,15 +151,15 @@ int64_t taosQueueMemorySize(STaosQueue *queue) {
void *taosAllocateQitem(int32_t size, EQItype itype) {
STaosQnode *pNode = taosMemoryCalloc(1, sizeof(STaosQnode) + size);
- pNode->size = size;
- pNode->itype = itype;
- pNode->timestamp = taosGetTimestampUs();
-
if (pNode == NULL) {
terrno = TSDB_CODE_OUT_OF_MEMORY;
return NULL;
}
+ pNode->size = size;
+ pNode->itype = itype;
+ pNode->timestamp = taosGetTimestampUs();
+
if (itype == RPC_QITEM) {
int64_t alloced = atomic_add_fetch_64(&tsRpcQueueMemoryUsed, size);
if (alloced > tsRpcQueueMemoryAllowed) {
diff --git a/source/util/src/tuuid.c b/source/util/src/tuuid.c
index 7460ccbc82..d192b1229d 100644
--- a/source/util/src/tuuid.c
+++ b/source/util/src/tuuid.c
@@ -20,8 +20,8 @@ static int32_t tUUIDSerialNo = 0;
int32_t tGenIdPI32(void) {
if (tUUIDHashId == 0) {
- char uid[64];
- int32_t code = taosGetSystemUUID(uid, tListLen(uid));
+ char uid[65] = {0};
+ int32_t code = taosGetSystemUUID(uid, sizeof(uid));
if (code != TSDB_CODE_SUCCESS) {
terrno = TAOS_SYSTEM_ERROR(errno);
} else {
diff --git a/source/util/src/tworker.c b/source/util/src/tworker.c
index 1f0731812c..d9ded20070 100644
--- a/source/util/src/tworker.c
+++ b/source/util/src/tworker.c
@@ -46,7 +46,7 @@ int32_t tQWorkerInit(SQWorkerPool *pool) {
void tQWorkerCleanup(SQWorkerPool *pool) {
for (int32_t i = 0; i < pool->max; ++i) {
SQWorker *worker = pool->workers + i;
- if (worker == NULL) continue;
+ // if (worker == NULL) continue;
if (taosCheckPthreadValid(worker->thread)) {
taosQsetThreadResume(pool->qset);
}
@@ -54,7 +54,7 @@ void tQWorkerCleanup(SQWorkerPool *pool) {
for (int32_t i = 0; i < pool->max; ++i) {
SQWorker *worker = pool->workers + i;
- if (worker == NULL) continue;
+ // if (worker == NULL) continue;
if (taosCheckPthreadValid(worker->thread)) {
taosThreadJoin(worker->thread, NULL);
taosThreadClear(&worker->thread);
@@ -138,8 +138,8 @@ STaosQueue *tQWorkerAllocQueue(SQWorkerPool *pool, void *ahandle, FItem fp) {
}
void tQWorkerFreeQueue(SQWorkerPool *pool, STaosQueue *queue) {
- taosCloseQueue(queue);
uDebug("worker:%s, queue:%p is freed", pool->name, queue);
+ taosCloseQueue(queue);
}
int32_t tWWorkerInit(SWWorkerPool *pool) {
@@ -283,8 +283,8 @@ STaosQueue *tWWorkerAllocQueue(SWWorkerPool *pool, void *ahandle, FItems fp) {
}
void tWWorkerFreeQueue(SWWorkerPool *pool, STaosQueue *queue) {
- taosCloseQueue(queue);
uDebug("worker:%s, queue:%p is freed", pool->name, queue);
+ taosCloseQueue(queue);
}
int32_t tSingleWorkerInit(SSingleWorker *pWorker, const SSingleWorkerCfg *pCfg) {
diff --git a/tests/script/tsim/stream/deleteInterval.sim b/tests/script/tsim/stream/deleteInterval.sim
index 00d10afad9..7532b2d5de 100644
--- a/tests/script/tsim/stream/deleteInterval.sim
+++ b/tests/script/tsim/stream/deleteInterval.sim
@@ -413,13 +413,8 @@ if $data12 != 3 then
goto loop14
endi
-return 1
-sql drop stream if exists streams3;
-sql drop database if exists test3;
-sql drop database if exists test;
sql create database test3 vgroups 4;
-sql create database test vgroups 1;
sql use test3;
sql create stable st(ts timestamp, a int, b int, c int, d double) tags(ta int,tb int,tc int);
sql create table t1 using st tags(1,1,1);
@@ -435,7 +430,7 @@ sql delete from t1;
loop15:
sleep 200
-sql select * from test.streamt2 order by c1, c2, c3;
+sql select * from test.streamt3 order by c1, c2, c3;
$loop_count = $loop_count + 1
if $loop_count == 10 then
@@ -453,7 +448,7 @@ sql delete from t1 where ts > 100;
loop16:
sleep 200
-sql select * from test.streamt2 order by c1, c2, c3;
+sql select * from test.streamt3 order by c1, c2, c3;
$loop_count = $loop_count + 1
if $loop_count == 10 then
@@ -471,7 +466,7 @@ sql delete from st;
loop17:
sleep 200
-sql select * from test.streamt2 order by c1, c2, c3;
+sql select * from test.streamt3 order by c1, c2, c3;
$loop_count = $loop_count + 1
if $loop_count == 10 then
diff --git a/tests/script/tsim/stream/fillIntervalDelete0.sim b/tests/script/tsim/stream/fillIntervalDelete0.sim
new file mode 100644
index 0000000000..77d09d5ae8
--- /dev/null
+++ b/tests/script/tsim/stream/fillIntervalDelete0.sim
@@ -0,0 +1,375 @@
+$loop_all = 0
+looptest:
+
+system sh/stop_dnodes.sh
+system sh/deploy.sh -n dnode1 -i 1
+system sh/exec.sh -n dnode1 -s start
+sleep 200
+sql connect
+
+sql drop stream if exists streams1;
+sql drop stream if exists streams2;
+sql drop stream if exists streams3;
+sql drop stream if exists streams4;
+sql drop stream if exists streams5;
+sql drop database if exists test1;
+sql create database test1 vgroups 1;
+sql use test1;
+sql create table t1(ts timestamp, a int, b int , c int, d double, s varchar(20));
+sql create stream streams1 trigger at_once into streamt1 as select _wstart as ts, max(a), sum(b), count(*) from t1 where ts >= 1648791210000 and ts < 1648791261000 interval(1s) fill(NULL);
+sql create stream streams2 trigger at_once into streamt2 as select _wstart as ts, max(a), sum(b), count(*) from t1 where ts >= 1648791210000 and ts < 1648791261000 interval(1s) fill(value,100,200,300);
+sql create stream streams3 trigger at_once into streamt3 as select _wstart as ts, max(a), sum(b), count(*) from t1 where ts >= 1648791210000 and ts < 1648791261000 interval(1s) fill(next);
+sql create stream streams4 trigger at_once into streamt4 as select _wstart as ts, max(a), sum(b), count(*) from t1 where ts >= 1648791210000 and ts < 1648791261000 interval(1s) fill(prev);
+sql create stream streams5 trigger at_once into streamt5 as select _wstart as ts, max(a), sum(b), count(*) from t1 where ts >= 1648791210000 and ts < 1648791261000 interval(1s) fill(linear);
+sql insert into t1 values(1648791213000,1,1,1,1.0,'aaa');
+sleep 200
+
+$loop_count = 0
+
+loop0:
+sleep 200
+
+$loop_count = $loop_count + 1
+if $loop_count == 10 then
+ return -1
+endi
+
+sql select * from streamt1 order by ts;
+
+if $rows != 1 then
+ print =====rows=$rows
+ goto loop0
+endi
+
+sql delete from t1;
+
+$loop_count = 0
+
+loop1:
+sleep 200
+
+$loop_count = $loop_count + 1
+if $loop_count == 10 then
+ return -1
+endi
+
+sql select * from streamt1 order by ts;
+
+if $rows != 0 then
+ print =====rows1=$rows
+ goto loop1
+endi
+
+sql select * from streamt2 order by ts;
+
+if $rows != 0 then
+ print =====rows2=$rows
+ goto loop1
+endi
+
+sql select * from streamt3 order by ts;
+
+if $rows != 0 then
+ print =====rows3=$rows
+ goto loop1
+endi
+
+sql select * from streamt4 order by ts;
+
+if $rows != 0 then
+ print =====rows4=$rows
+ goto loop1
+endi
+
+sql select * from streamt5 order by ts;
+
+if $rows != 0 then
+ print =====rows5=$rows
+ goto loop1
+endi
+
+sql insert into t1 values(1648791210000,4,4,4,4.0,'ddd');
+sql insert into t1 values(1648791215000,2,2,2,2.0,'bbb');
+sql insert into t1 values(1648791217000,3,3,3,3.0,'ccc');
+sql insert into t1 values(1648791219000,5,5,5,5.0,'eee');
+
+$loop_count = 0
+
+loop2:
+sleep 200
+
+$loop_count = $loop_count + 1
+if $loop_count == 10 then
+ return -1
+endi
+
+sql select * from streamt1 order by ts;
+
+if $rows != 10 then
+ print =====rows=$rows
+ goto loop2
+endi
+
+#temp
+system sh/stop_dnodes.sh
+return 1
+
+sql delete from t1 where ts >= 1648791214000;
+
+$loop_count = 0
+
+loop3:
+sleep 200
+
+$loop_count = $loop_count + 1
+if $loop_count == 10 then
+ return -1
+endi
+
+sql select * from streamt1 order by ts;
+
+if $rows != 1 then
+ print =====rows1=$rows
+ goto loop3
+endi
+
+sql select * from streamt2 order by ts;
+
+if $rows != 1 then
+ print =====rows2=$rows
+ goto loop3
+endi
+
+sql select * from streamt3 order by ts;
+
+if $rows != 1 then
+ print =====rows3=$rows
+ goto loop3
+endi
+
+sql select * from streamt4 order by ts;
+
+if $rows != 1 then
+ print =====rows4=$rows
+ goto loop3
+endi
+
+sql select * from streamt5 order by ts;
+
+if $rows != 1 then
+ print =====rows5=$rows
+ goto loop3
+endi
+
+if $data01 != 4 then
+ print =====data01=$data01
+ return -1
+endi
+
+
+
+sql insert into t1 values(1648791213000,5,5,5,5.0,'eee');
+sql insert into t1 values(1648791215000,5,5,5,5.0,'eee');
+sql insert into t1 values(1648791219000,6,6,6,6.0,'fff');
+
+$loop_count = 0
+
+loop4:
+sleep 200
+
+$loop_count = $loop_count + 1
+if $loop_count == 10 then
+ return -1
+endi
+
+sql select * from streamt1 order by ts;
+
+if $rows != 4 then
+ print =====rows=$rows
+ goto loop4
+endi
+
+
+sql delete from t1 where ts <= 1648791216000;
+
+$loop_count = 0
+
+loop5:
+sleep 200
+
+$loop_count = $loop_count + 1
+if $loop_count == 10 then
+ return -1
+endi
+
+sql select * from streamt1 order by ts;
+
+if $rows != 1 then
+ print =====rows1=$rows
+ goto loop5
+endi
+
+sql select * from streamt2 order by ts;
+
+if $rows != 1 then
+ print =====rows2=$rows
+ goto loop5
+endi
+
+sql select * from streamt3 order by ts;
+
+if $rows != 1 then
+ print =====rows3=$rows
+ goto loop5
+endi
+
+sql select * from streamt4 order by ts;
+
+if $rows != 1 then
+ print =====rows4=$rows
+ goto loop5
+endi
+
+sql select * from streamt5 order by ts;
+
+if $rows != 1 then
+ print =====rows5=$rows
+ goto loop5
+endi
+
+if $data01 != 6 then
+ print =====data01=$data01
+ return -1
+endi
+
+
+
+
+sql drop stream if exists streams6;
+sql drop stream if exists streams7;
+sql drop stream if exists streams8;
+sql drop stream if exists streams9;
+sql drop stream if exists streams10;
+sql drop database if exists test6;
+sql create database test6 vgroups 1;
+sql use test6;
+sql create stable st(ts timestamp, a int, b int , c int, d double, s varchar(20)) tags(ta int,tb int,tc int);
+sql create table t1 using st tags(1,1,1);
+sql create table t2 using st tags(1,1,1);
+sql create stream streams6 trigger at_once into streamt6 as select _wstart as ts, max(a), sum(b), count(*) from st where ts >= 1648791210000 and ts < 1648791261000 interval(1s) fill(NULL);
+sql create stream streams7 trigger at_once into streamt7 as select _wstart as ts, max(a), sum(b), count(*) from st where ts >= 1648791210000 and ts < 1648791261000 interval(1s) fill(value,100,200,300);
+sql create stream streams8 trigger at_once into streamt8 as select _wstart as ts, max(a), sum(b), count(*) from st where ts >= 1648791210000 and ts < 1648791261000 interval(1s) fill(next);
+sql create stream streams9 trigger at_once into streamt9 as select _wstart as ts, max(a), sum(b), count(*) from st where ts >= 1648791210000 and ts < 1648791261000 interval(1s) fill(prev);
+sql create stream streams10 trigger at_once into streamt10 as select _wstart as ts, max(a), sum(b), count(*) from st where ts >= 1648791210000 and ts < 1648791261000 interval(1s) fill(linear);
+
+sql insert into t1 values(1648791210000,1,1,1,1.0,'aaa');
+sql insert into t1 values(1648791217000,1,1,1,1.0,'aaa');
+
+sql insert into t2 values(1648791215000,1,1,1,1.0,'aaa');
+
+sleep 200
+
+$loop_count = 0
+
+loop7:
+sleep 200
+
+$loop_count = $loop_count + 1
+if $loop_count == 10 then
+ return -1
+endi
+
+sql select * from streamt6 order by ts;
+
+if $rows != 8 then
+ print =====rows=$rows
+ goto loop7
+endi
+
+sql delete from t1;
+
+$loop_count = 0
+
+loop8:
+sleep 200
+
+$loop_count = $loop_count + 1
+if $loop_count == 10 then
+ return -1
+endi
+
+sql select * from streamt6 order by ts;
+
+if $rows != 0 then
+ print =====rows6=$rows
+ goto loop8
+endi
+
+sql select * from streamt7 order by ts;
+
+if $rows != 0 then
+ print =====rows7=$rows
+ goto loop8
+endi
+
+sql select * from streamt8 order by ts;
+
+if $rows != 0 then
+ print =====rows8=$rows
+ goto loop8
+endi
+
+sql select * from streamt9 order by ts;
+
+if $rows != 0 then
+ print =====rows9=$rows
+ goto loop8
+endi
+
+sql select * from streamt10 order by ts;
+
+if $rows != 0 then
+ print =====rows10=$rows
+ goto loop8
+endi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+sql drop stream if exists streams0;
+sql drop stream if exists streams1;
+sql drop stream if exists streams2;
+sql drop stream if exists streams3;
+sql drop stream if exists streams4;
+sql drop stream if exists streams5;
+sql drop stream if exists streams6;
+sql drop stream if exists streams7;
+sql drop stream if exists streams8;
+
+sql use test1;
+sql select * from t1;
+print $data00
+
+$loop_all = $loop_all + 1
+print ============loop_all=$loop_all
+
+system sh/stop_dnodes.sh
+
+#goto looptest
\ No newline at end of file
diff --git a/tests/script/tsim/stream/fillIntervalDelete1.sim b/tests/script/tsim/stream/fillIntervalDelete1.sim
new file mode 100644
index 0000000000..8e6972975e
--- /dev/null
+++ b/tests/script/tsim/stream/fillIntervalDelete1.sim
@@ -0,0 +1,379 @@
+$loop_all = 0
+looptest:
+
+system sh/stop_dnodes.sh
+system sh/deploy.sh -n dnode1 -i 1
+system sh/exec.sh -n dnode1 -s start
+sleep 200
+sql connect
+
+sql drop stream if exists streams1;
+sql drop stream if exists streams2;
+sql drop stream if exists streams3;
+sql drop stream if exists streams4;
+sql drop stream if exists streams5;
+sql drop database if exists test1;
+sql create database test1 vgroups 1;
+sql use test1;
+sql create table t1(ts timestamp, a int, b int , c int, d double, s varchar(20));
+sql create stream streams1 trigger at_once into streamt1 as select _wstart as ts, max(a), sum(b), count(*) from t1 where ts >= 1648791210000 and ts < 1648791261000 interval(1s) fill(NULL);
+sql create stream streams2 trigger at_once into streamt2 as select _wstart as ts, max(a), sum(b), count(*) from t1 where ts >= 1648791210000 and ts < 1648791261000 interval(1s) fill(value,100,200,300);
+sql create stream streams3 trigger at_once into streamt3 as select _wstart as ts, max(a), sum(b), count(*) from t1 where ts >= 1648791210000 and ts < 1648791261000 interval(1s) fill(next);
+sql create stream streams4 trigger at_once into streamt4 as select _wstart as ts, max(a), sum(b), count(*) from t1 where ts >= 1648791210000 and ts < 1648791261000 interval(1s) fill(prev);
+sql create stream streams5 trigger at_once into streamt5 as select _wstart as ts, max(a), sum(b), count(*) from t1 where ts >= 1648791210000 and ts < 1648791261000 interval(1s) fill(linear);
+
+sql insert into t1 values(1648791210000,0,0,0,0.0,'aaa');
+sql insert into t1 values(1648791213000,1,1,1,1.0,'bbb');
+sql insert into t1 values(1648791215000,5,5,5,5.0,'ccc');
+sql insert into t1 values(1648791217000,6,6,6,6.0,'ddd');
+
+$loop_count = 0
+
+loop0:
+sleep 200
+
+$loop_count = $loop_count + 1
+if $loop_count == 10 then
+ return -1
+endi
+
+sql select * from streamt1 order by ts;
+
+if $rows != 8 then
+ print =====rows=$rows
+ goto loop0
+endi
+
+
+sql delete from t1 where ts = 1648791213000;
+
+$loop_count = 0
+
+loop2:
+sleep 200
+
+$loop_count = $loop_count + 1
+if $loop_count == 10 then
+ return -1
+endi
+
+
+sql select * from streamt1 order by ts;
+
+if $rows != 8 then
+ print ====streamt1=rows1=$rows
+ goto loop2
+endi
+if $data31 != NULL then
+ print ====streamt1=data31=$data31
+ goto loop2
+endi
+
+sql select * from streamt2 order by ts;
+
+if $rows != 8 then
+ print ====streamt2=rows2=$rows
+ goto loop2
+endi
+if $data31 != 100 then
+ print ====streamt2=data31=$data31
+ goto loop2
+endi
+
+sql select * from streamt3 order by ts;
+
+if $rows != 8 then
+ print ====streamt3=rows3=$rows
+ goto loop2
+endi
+if $data31 != 5 then
+ print ====streamt3=data31=$data31
+ goto loop2
+endi
+
+sql select * from streamt4 order by ts;
+
+if $rows != 8 then
+ print ====streamt4=rows4=$rows
+ goto loop2
+endi
+if $data31 != 0 then
+ print ====streamt4=data31=$data31
+ goto loop2
+endi
+
+sql select * from streamt5 order by ts;
+
+if $rows != 8 then
+ print ====streamt5=rows5=$rows
+ goto loop2
+endi
+if $data31 != 3 then
+ print ====streamt5=data31=$data31
+ goto loop2
+endi
+
+
+sql insert into t1 values(1648791212000,5,5,5,5.0,'eee');
+sql insert into t1 values(1648791213000,6,6,6,6.0,'fff');
+
+$loop_count = 0
+
+loop3:
+sleep 200
+
+$loop_count = $loop_count + 1
+if $loop_count == 10 then
+ return -1
+endi
+
+sql select * from streamt1 order by ts;
+
+if $data21 != 5 then
+ print ====133=rows=$rows
+ goto loop3
+endi
+if $data31 != 6 then
+ print ====137=rows=$rows
+ goto loop3
+endi
+
+
+sql delete from t1 where ts >= 1648791211000 and ts <= 1648791214000;
+
+$loop_count = 0
+
+loop4:
+sleep 200
+
+$loop_count = $loop_count + 1
+if $loop_count == 10 then
+ return -1
+endi
+
+sql select * from streamt1 order by ts;
+
+if $rows != 8 then
+ print ====streamt1=rows1=$rows
+ goto loop4
+endi
+if $data31 != NULL then
+ print ====streamt1=data31=$data31
+ goto loop4
+endi
+
+sql select * from streamt2 order by ts;
+
+if $rows != 8 then
+ print ====streamt2=rows2=$rows
+ goto loop4
+endi
+if $data31 != 100 then
+ print ====streamt2=data31=$data31
+ goto loop4
+endi
+
+sql select * from streamt3 order by ts;
+
+if $rows != 8 then
+ print ====streamt3=rows3=$rows
+ goto loop4
+endi
+if $data31 != 5 then
+ print ====streamt3=data31=$data31
+ goto loop4
+endi
+
+sql select * from streamt4 order by ts;
+
+if $rows != 8 then
+ print ====streamt4=rows4=$rows
+ goto loop4
+endi
+if $data31 != 0 then
+ print ====streamt4=data31=$data31
+ goto loop4
+endi
+
+sql select * from streamt5 order by ts;
+
+if $rows != 8 then
+ print ====streamt5=rows5=$rows
+ goto loop4
+endi
+if $data31 != 3 then
+ print ====streamt5=data31=$data31
+ goto loop4
+endi
+
+
+
+sql drop stream if exists streams6;
+sql drop stream if exists streams7;
+sql drop stream if exists streams8;
+sql drop stream if exists streams9;
+sql drop stream if exists streams10;
+sql drop database if exists test6;
+sql create database test6 vgroups 1;
+sql use test6;
+sql create stable st(ts timestamp, a int, b int , c int, d double, s varchar(20)) tags(ta int,tb int,tc int);
+sql create table t1 using st tags(1,1,1);
+sql create table t2 using st tags(1,1,1);
+sql create stream streams6 trigger at_once into streamt6 as select _wstart as ts, max(a), sum(b), count(*) from st where ts >= 1648791210000 and ts < 1648791261000 interval(1s) fill(NULL);
+sql create stream streams7 trigger at_once into streamt7 as select _wstart as ts, max(a), sum(b), count(*) from st where ts >= 1648791210000 and ts < 1648791261000 interval(1s) fill(value,100,200,300);
+sql create stream streams8 trigger at_once into streamt8 as select _wstart as ts, max(a), sum(b), count(*) from st where ts >= 1648791210000 and ts < 1648791261000 interval(1s) fill(next);
+sql create stream streams9 trigger at_once into streamt9 as select _wstart as ts, max(a), sum(b), count(*) from st where ts >= 1648791210000 and ts < 1648791261000 interval(1s) fill(prev);
+sql create stream streams10 trigger at_once into streamt10 as select _wstart as ts, max(a), sum(b), count(*) from st where ts >= 1648791210000 and ts < 1648791261000 interval(1s) fill(linear);
+
+sql insert into t1 values(1648791210000,1,1,1,1.0,'aaa');
+sql insert into t1 values(1648791215000,6,8,8,8.0,'bbb');
+sql insert into t1 values(1648791220000,11,10,10,10.0,'ccc');
+sql insert into t1 values(1648791221000,6,6,6,6.0,'fff');
+
+sql insert into t2 values(1648791212000,4,4,4,4.0,'ddd');
+sql insert into t2 values(1648791214000,5,5,5,5.0,'eee');
+sql insert into t2 values(1648791216000,2,2,2,2.0,'bbb');
+sql insert into t2 values(1648791222000,6,6,6,6.0,'fff');
+
+$loop_count = 0
+
+loop5:
+sleep 200
+
+$loop_count = $loop_count + 1
+if $loop_count == 10 then
+ return -1
+endi
+
+sql select * from streamt6 order by ts;
+
+if $rows != 13 then
+ print ====streamt6=rows1=$rows
+ goto loop5
+endi
+if $data21 != 4 then
+ print ====streamt6=data21=$data21
+ goto loop5
+endi
+
+sql delete from t2;
+print delete from t2;
+
+$loop_count = 0
+
+loop6:
+
+sleep 200
+
+$loop_count = $loop_count + 1
+if $loop_count == 10 then
+ return -1
+endi
+
+sql select * from streamt6 order by ts;
+
+if $rows != 12 then
+ print ====streamt6=rows2=$rows
+ goto loop6
+endi
+if $data31 != NULL then
+ print ====streamt6=data31=$data31
+ goto loop6
+endi
+
+
+sql select * from streamt7 order by ts;
+
+if $rows != 12 then
+ print ====streamt7=rows2=$rows
+ goto loop6
+endi
+if $data31 != 100 then
+ print ====streamt7=data31=$data31
+ goto loop6
+endi
+
+sql select * from streamt8 order by ts;
+
+if $rows != 12 then
+ print ====streamt8=rows3=$rows
+ goto loop6
+endi
+if $data31 != 6 then
+ print ====streamt8=data31=$data31
+ goto loop6
+endi
+
+sql select * from streamt9 order by ts;
+
+if $rows != 12 then
+ print ====streamt9=rows4=$rows
+ goto loop6
+endi
+if $data31 != 1 then
+ print ====streamt9=data31=$data31
+ goto loop6
+endi
+
+sql select * from streamt10 order by ts;
+
+if $rows != 12 then
+ print ====streamt10=rows5=$rows
+ goto loop6
+endi
+if $data21 != 3 then
+ print ====streamt10=data21=$data21
+ return -1
+endi
+if $data31 != 4 then
+ print ====streamt10=data31=$data31
+ return -1
+endi
+if $data71 != 8 then
+ print ====streamt10=data71=$data71
+ return -1
+endi
+if $data91 != 10 then
+ print ====streamt10=data91=$data91
+ return -1
+endi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+sql drop stream if exists streams0;
+sql drop stream if exists streams1;
+sql drop stream if exists streams2;
+sql drop stream if exists streams3;
+sql drop stream if exists streams4;
+sql drop stream if exists streams5;
+sql drop stream if exists streams6;
+sql drop stream if exists streams7;
+sql drop stream if exists streams8;
+sql drop stream if exists streams9;
+sql drop stream if exists streams10;
+
+sql use test1;
+sql select * from t1;
+print $data00
+
+$loop_all = $loop_all + 1
+print ============loop_all=$loop_all
+
+system sh/stop_dnodes.sh
+
+#goto looptest
\ No newline at end of file
diff --git a/tests/script/tsim/stream/fillIntervalLinear.sim b/tests/script/tsim/stream/fillIntervalLinear.sim
new file mode 100644
index 0000000000..46ff785fd3
--- /dev/null
+++ b/tests/script/tsim/stream/fillIntervalLinear.sim
@@ -0,0 +1,695 @@
+$loop_all = 0
+looptest:
+
+system sh/stop_dnodes.sh
+system sh/deploy.sh -n dnode1 -i 1
+system sh/exec.sh -n dnode1 -s start
+sleep 200
+sql connect
+
+sql drop stream if exists streams1;
+sql drop database if exists test1;
+sql create database test1 vgroups 1;
+sql use test1;
+sql create table t1(ts timestamp, a int, b int , c int, d double, s varchar(20));
+sql create stream streams1 trigger at_once into streamt1 as select _wstart as ts, max(a)+sum(c), avg(b), first(s), count(*) from t1 where ts >= 1648791210000 and ts < 1648791261000 interval(1s) fill(linear);
+sql insert into t1 values(1648791213000,4,4,4,4.0,'aaa') (1648791216000,5,5,5,5.0,'bbb');
+sql insert into t1 values(1648791210000,1,1,1,1.0,'ccc') (1648791219000,2,2,2,2.0,'ddd') (1648791222000,3,3,3,3.0,'eee');
+
+
+$loop_count = 0
+
+loop1:
+sleep 200
+sql use test1;
+sql select * from streamt1 order by ts;
+
+$loop_count = $loop_count + 1
+if $loop_count == 10 then
+ return -1
+endi
+
+if $rows != 13 then
+ print =====rows=$rows
+ goto loop1
+endi
+
+if $data01 != 2.000000000 then
+ print =====data01=$data01
+ return -1
+endi
+if $data02 != 1.000000000 then
+ print =====data02=$data02
+ return -1
+endi
+if $data03 != ccc then
+ print =====data03=$data03
+ return -1
+endi
+if $data04 != 1 then
+ print =====data04=$data04
+ return -1
+endi
+
+
+if $data11 != 4.000000000 then
+ print =====data11=$data11
+ return -1
+endi
+if $data12 != 2.000000000 then
+ print =====data12=$data12
+ return -1
+endi
+if $data13 != NULL then
+ print =====data13=$data13
+ return -1
+endi
+
+
+if $data21 != 6.000000000 then
+ print =====data21=$data21
+ return -1
+endi
+if $data22 != 3.000000000 then
+ print =====data22=$data22
+ return -1
+endi
+if $data23 != NULL then
+ print =====data23=$data23
+ return -1
+endi
+
+
+if $data31 != 8.000000000 then
+ print =====data31=$data31
+ return -1
+endi
+if $data32 != 4.000000000 then
+ print =====data32=$data32
+ return -1
+endi
+if $data33 != aaa then
+ print =====data33=$data33
+ return -1
+endi
+
+
+if $data41 != 8.666666667 then
+ print =====data41=$data41
+ return -1
+endi
+if $data42 != 4.333333333 then
+ print =====data42=$data42
+ return -1
+endi
+if $data43 != NULL then
+ print =====data43=$data43
+ return -1
+endi
+
+
+if $data51 != 9.333333333 then
+ print =====data01=$data01
+ return -1
+endi
+if $data52 != 4.666666667 then
+ print =====data52=$data52
+ return -1
+endi
+if $data53 != NULL then
+ print =====data53=$data53
+ return -1
+endi
+
+
+if $data61 != 10.000000000 then
+ print =====data61=$data61
+ return -1
+endi
+if $data62 != 5.000000000 then
+ print =====data62=$data62
+ return -1
+endi
+
+
+if $data71 != 8.000000000 then
+ print =====data71=$data71
+ return -1
+endi
+if $data72 != 4.000000000 then
+ print =====data72=$data72
+ return -1
+endi
+
+
+if $data81 != 6.000000000 then
+ print =====data81=$data81
+ return -1
+endi
+if $data82 != 3.000000000 then
+ print =====data82=$data82
+ return -1
+endi
+
+
+if $data91 != 4.000000000 then
+ print =====data91=$data91
+ return -1
+endi
+if $data92 != 2.000000000 then
+ print =====data92=$data92
+ return -1
+endi
+
+if $data[10][1] != 4.666666667 then
+ print =====data[10][1]=$data[10][1]
+ return -1
+endi
+if $data[10][2] != 2.333333333 then
+ print =====data[10][2]=$data[10][2]
+ return -1
+endi
+
+
+if $data[11][1] != 5.333333333 then
+ print =====data[11][1]=$data[11][1]
+ return -1
+endi
+if $data[11][2] != 2.666666667 then
+ print =====data[11][2]=$data[11][2]
+ return -1
+endi
+
+
+if $data[12][1] != 6.000000000 then
+ print =====data[12][1]=$data[12][1]
+ return -1
+endi
+if $data[12][2] != 3.000000000 then
+ print =====data[12][2]=$data[12][2]
+ return -1
+endi
+
+
+
+sql drop stream if exists streams2;
+sql drop database if exists test2;
+sql create database test2 vgroups 1;
+sql use test2;
+sql create table t1(ts timestamp, a int, b int , c int, d double, s varchar(20));
+sql create stream streams2 trigger at_once into streamt2 as select _wstart as ts, max(a)+sum(c), avg(b), first(s), count(*) from t1 where ts >= 1648791210000 and ts < 1648791261000 interval(1s) fill(linear);
+sql insert into t1 values(1648791210000,1,1,1,1.0,'ccc') (1648791219000,2,2,2,2.0,'ddd') (1648791222000,3,3,3,3.0,'eee');
+sql insert into t1 values(1648791213000,4,4,4,4.0,'aaa') (1648791216000,5,5,5,5.0,'bbb');
+
+
+$loop_count = 0
+
+loop2:
+
+sleep 200
+
+sql select * from streamt2 order by ts;
+
+$loop_count = $loop_count + 1
+if $loop_count == 10 then
+ return -1
+endi
+
+if $rows != 13 then
+ print =====rows=$rows
+ goto loop2
+endi
+
+if $data01 != 2.000000000 then
+ print =====data01=$data01
+ return -1
+endi
+if $data02 != 1.000000000 then
+ print =====data02=$data02
+ return -1
+endi
+if $data03 != ccc then
+ print =====data03=$data03
+ return -1
+endi
+if $data04 != 1 then
+ print =====data04=$data04
+ return -1
+endi
+
+
+if $data11 != 4.000000000 then
+ print =====data11=$data11
+ return -1
+endi
+if $data12 != 2.000000000 then
+ print =====data12=$data12
+ return -1
+endi
+if $data13 != NULL then
+ print =====data13=$data13
+ return -1
+endi
+
+
+if $data21 != 6.000000000 then
+ print =====data21=$data21
+ return -1
+endi
+if $data22 != 3.000000000 then
+ print =====data22=$data22
+ return -1
+endi
+if $data23 != NULL then
+ print =====data23=$data23
+ return -1
+endi
+
+
+if $data31 != 8.000000000 then
+ print =====data31=$data31
+ return -1
+endi
+if $data32 != 4.000000000 then
+ print =====data32=$data32
+ return -1
+endi
+if $data33 != aaa then
+ print =====data33=$data33
+ return -1
+endi
+
+
+if $data41 != 8.666666667 then
+ print =====data41=$data41
+ return -1
+endi
+if $data42 != 4.333333333 then
+ print =====data42=$data42
+ return -1
+endi
+if $data43 != NULL then
+ print =====data43=$data43
+ return -1
+endi
+
+
+if $data51 != 9.333333333 then
+ print =====data01=$data01
+ return -1
+endi
+if $data52 != 4.666666667 then
+ print =====data52=$data52
+ return -1
+endi
+if $data53 != NULL then
+ print =====data53=$data53
+ return -1
+endi
+
+
+if $data61 != 10.000000000 then
+ print =====data61=$data61
+ return -1
+endi
+if $data62 != 5.000000000 then
+ print =====data62=$data62
+ return -1
+endi
+
+
+if $data71 != 8.000000000 then
+ print =====data71=$data71
+ return -1
+endi
+if $data72 != 4.000000000 then
+ print =====data72=$data72
+ return -1
+endi
+
+
+if $data81 != 6.000000000 then
+ print =====data81=$data81
+ return -1
+endi
+if $data82 != 3.000000000 then
+ print =====data82=$data82
+ return -1
+endi
+
+
+if $data91 != 4.000000000 then
+ print =====data91=$data91
+ return -1
+endi
+if $data92 != 2.000000000 then
+ print =====data92=$data92
+ return -1
+endi
+
+if $data[10][1] != 4.666666667 then
+ print =====data[10][1]=$data[10][1]
+ return -1
+endi
+if $data[10][2] != 2.333333333 then
+ print =====data[10][2]=$data[10][2]
+ return -1
+endi
+
+
+if $data[11][1] != 5.333333333 then
+ print =====data[11][1]=$data[11][1]
+ return -1
+endi
+if $data[11][2] != 2.666666667 then
+ print =====data[11][2]=$data[11][2]
+ return -1
+endi
+
+
+if $data[12][1] != 6.000000000 then
+ print =====data[12][1]=$data[12][1]
+ return -1
+endi
+if $data[12][2] != 3.000000000 then
+ print =====data[12][2]=$data[12][2]
+ return -1
+endi
+
+
+
+sql drop stream if exists streams3;
+sql drop database if exists test3;
+sql create database test3 vgroups 1;
+sql use test3;
+sql create table t1(ts timestamp, a int, b int , c int, d double, s varchar(20));
+sql create stream streams3 trigger at_once into streamt3 as select _wstart as ts, max(a), b+c, s, b+1, 1 from t1 where ts >= 1648791150000 and ts < 1648791261000 interval(1s) fill(linear);
+sql insert into t1 values(1648791215000,1,1,1,1.0,'aaa');
+sql insert into t1 values(1648791217000,2,2,2,2.0,'bbb');
+sql insert into t1 values(1648791211000,3,3,3,3.0,'ccc');
+sql insert into t1 values(1648791213000,4,4,4,4.0,'ddd');
+
+
+$loop_count = 0
+
+loop3:
+sleep 300
+sql select * from streamt3 order by ts;
+
+$loop_count = $loop_count + 1
+if $loop_count == 10 then
+ return -1
+endi
+
+
+if $rows != 7 then
+ print =====rows=$rows
+ goto loop3
+endi
+
+
+if $data01 != 3 then
+ print =====data01=$data01
+ return -1
+endi
+if $data02 != 6.000000000 then
+ print =====data02=$data02
+ return -1
+endi
+if $data03 != ccc then
+ print =====data03=$data03
+ return -1
+endi
+
+if $data11 != 3 then
+ print =====data11=$data11
+ return -1
+endi
+if $data12 != 7.000000000 then
+ print =====data12=$data12
+ return -1
+endi
+if $data13 != NULL then
+ print =====data13=$data13
+ return -1
+endi
+
+
+if $data21 != 4 then
+ print =====data21=$data21
+ return -1
+endi
+if $data22 != 8.000000000 then
+ print =====data22=$data22
+ return -1
+endi
+if $data23 != ddd then
+ print =====data23=$data23
+ return -1
+endi
+
+
+if $data31 != 2 then
+ print =====data31=$data31
+ return -1
+endi
+if $data32 != 5.000000000 then
+ print =====data32=$data32
+ return -1
+endi
+if $data33 != NULL then
+ print =====data33=$data33
+ return -1
+endi
+
+
+if $data41 != 1 then
+ print =====data41=$data41
+ return -1
+endi
+if $data42 != 2.000000000 then
+ print =====data42=$data42
+ return -1
+endi
+if $data43 != aaa then
+ print =====data43=$data43
+ return -1
+endi
+
+
+if $data51 != 1 then
+ print =====data51=$data51
+ return -1
+endi
+if $data52 != 3.000000000 then
+ print =====data52=$data52
+ return -1
+endi
+if $data53 != NULL then
+ print =====data53=$data53
+ return -1
+endi
+
+
+if $data61 != 2 then
+ print =====data61=$data61
+ return -1
+endi
+if $data62 != 4.000000000 then
+ print =====data62=$data62
+ return -1
+endi
+if $data63 != bbb then
+ print =====data63=$data63
+ return -1
+endi
+
+
+sql insert into t1 values(1648791212000,5,5,5,5.0,'eee');
+sql insert into t1 values(1648791207000,6,6,6,6.0,'fff') (1648791209000,7,7,7,7.0,'ggg') (1648791219000,8,8,8,8.0,'hhh') (1648791221000,9,9,9,9.0,'iii');
+
+
+
+$loop_count = 0
+
+loop4:
+
+sleep 200
+
+sql select * from test3.streamt3 order by ts;
+
+$loop_count = $loop_count + 1
+if $loop_count == 10 then
+ return -1
+endi
+
+
+if $rows != 15 then
+ print =====rows=$rows
+ goto loop4
+endi
+
+
+if $data01 != 6 then
+ print =====data01=$data01
+ return -1
+endi
+if $data02 != 12.000000000 then
+ print =====data02=$data02
+ return -1
+endi
+if $data03 != fff then
+ print =====data03=$data03
+ return -1
+endi
+
+if $data11 != 6 then
+ print =====data11=$data11
+ return -1
+endi
+if $data12 != 13.000000000 then
+ print =====data12=$data12
+ return -1
+endi
+if $data13 != NULL then
+ print =====data13=$data13
+ return -1
+endi
+
+
+if $data21 != 7 then
+ print =====data21=$data21
+ return -1
+endi
+if $data22 != 14.000000000 then
+ print =====data22=$data22
+ return -1
+endi
+if $data23 != ggg then
+ print =====data23=$data23
+ return -1
+endi
+
+
+if $data31 != 5 then
+ print =====data31=$data31
+ return -1
+endi
+if $data32 != 10.000000000 then
+ print =====data32=$data32
+ return -1
+endi
+if $data33 != NULL then
+ print =====data33=$data33
+ return -1
+endi
+
+if $data51 != 5 then
+ print =====data51=$data51
+ return -1
+endi
+if $data52 != 10.000000000 then
+ print =====data52=$data52
+ return -1
+endi
+if $data53 != eee then
+ print =====data53=$data53
+ return -1
+endi
+
+
+if $data[11][1] != 5 then
+ print =====data[11][1]=$data[11][1]
+ return -1
+endi
+if $data[11][2] != 10.000000000 then
+ print =====data[11][2]=$data[11][2]
+ return -1
+endi
+if $data[11][3] != NULL then
+ print =====data[11][3]=$data[11][3]
+ return -1
+endi
+
+if $data[12][1] != 8 then
+ print =====data[12][1]=$data[12][1]
+ return -1
+endi
+if $data[12][2] != 16.000000000 then
+ print =====data[12][2]=$data[12][2]
+ return -1
+endi
+if $data[12][3] != hhh then
+ print =====data[12][3]=$data[12][3]
+ return -1
+endi
+
+if $data[13][1] != 8 then
+ print =====data[13][1]=$data[13][1]
+ return -1
+endi
+if $data[13][2] != 17.000000000 then
+ print =====data[13][2]=$data[13][2]
+ return -1
+endi
+if $data[13][3] != NULL then
+ print =====data[13][3]=$data[13][3]
+ return -1
+endi
+
+if $data[14][1] != 9 then
+ print =====data[14][1]=$data[14][1]
+ return -1
+endi
+if $data[14][2] != 18.000000000 then
+ print =====data[14][2]=$data[14][2]
+ return -1
+endi
+if $data[14][3] != iii then
+ print =====data[14][3]=$data[14][3]
+ return -1
+endi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+sql drop stream if exists streams0;
+sql drop stream if exists streams1;
+sql drop stream if exists streams2;
+sql drop stream if exists streams3;
+sql drop stream if exists streams4;
+sql drop stream if exists streams5;
+sql drop stream if exists streams6;
+sql drop stream if exists streams7;
+sql drop stream if exists streams8;
+
+sql use test1;
+sql select * from t1;
+print $data00
+
+$loop_all = $loop_all + 1
+print ============loop_all=$loop_all
+
+system sh/stop_dnodes.sh
+
+#goto looptest
\ No newline at end of file
diff --git a/tests/script/tsim/stream/fillIntervalPartitionBy.sim b/tests/script/tsim/stream/fillIntervalPartitionBy.sim
new file mode 100644
index 0000000000..384aa2c8e4
--- /dev/null
+++ b/tests/script/tsim/stream/fillIntervalPartitionBy.sim
@@ -0,0 +1,171 @@
+$loop_all = 0
+looptest:
+
+system sh/stop_dnodes.sh
+system sh/deploy.sh -n dnode1 -i 1
+system sh/exec.sh -n dnode1 -s start
+sleep 200
+sql connect
+
+sql drop stream if exists streams1;
+sql drop stream if exists streams2;
+sql drop stream if exists streams3;
+sql drop stream if exists streams4;
+sql drop stream if exists streams5;
+sql drop database if exists test1;
+sql create database test1 vgroups 1;
+sql use test1;
+sql create stable st(ts timestamp, a int, b int , c int, d double, s varchar(20)) tags(ta int,tb int,tc int);
+sql create table t1 using st tags(1,1,1);
+sql create table t2 using st tags(2,2,2);
+sql create stream streams1 trigger at_once into streamt1 as select _wstart as ts, max(a) c1, sum(b), count(*) from st where ts >= 1648791210000 and ts < 1648791261000 partition by ta interval(1s) fill(NULL);
+sql create stream streams2 trigger at_once into streamt2 as select _wstart as ts, max(a) c1, sum(b), count(*) from st where ts >= 1648791210000 and ts < 1648791261000 partition by ta interval(1s) fill(value,100,200,300);
+sql create stream streams3 trigger at_once into streamt3 as select _wstart as ts, max(a) c1, sum(b), count(*) from st where ts >= 1648791210000 and ts < 1648791261000 partition by ta interval(1s) fill(next);
+sql create stream streams4 trigger at_once into streamt4 as select _wstart as ts, max(a) c1, sum(b), count(*) from st where ts >= 1648791210000 and ts < 1648791261000 partition by ta interval(1s) fill(prev);
+sql create stream streams5 trigger at_once into streamt5 as select _wstart as ts, max(a) c1, sum(b), count(*) from st where ts >= 1648791210000 and ts < 1648791261000 partition by ta interval(1s) fill(linear);
+
+sql insert into t1 values(1648791210000,0,0,0,0.0,'aaa');
+sql insert into t1 values(1648791213000,1,1,1,1.0,'bbb');
+sql insert into t1 values(1648791215000,5,5,5,5.0,'ccc');
+sql insert into t1 values(1648791216000,6,6,6,6.0,'ddd');
+sql insert into t2 values(1648791210000,7,0,0,0.0,'aaa');
+sql insert into t2 values(1648791213000,8,1,1,1.0,'bbb');
+sql insert into t2 values(1648791215000,9,5,5,5.0,'ccc');
+sql insert into t2 values(1648791216000,10,6,6,6.0,'ddd');
+
+$loop_count = 0
+
+loop2:
+sleep 200
+
+$loop_count = $loop_count + 1
+if $loop_count == 10 then
+ return -1
+endi
+
+
+sql select * from streamt1 order by group_id, ts;
+
+if $rows != 14 then
+ print ====streamt1=rows1=$rows
+ goto loop2
+endi
+
+sql select * from streamt2 order by group_id, ts;
+
+if $rows != 14 then
+ print ====streamt2=rows2=$rows
+ goto loop2
+endi
+
+sql select * from streamt3 order by group_id, ts;
+
+if $rows != 14 then
+ print ====streamt3=rows3=$rows
+ goto loop2
+endi
+
+sql select * from streamt4 order by group_id, ts;
+
+if $rows != 14 then
+ print ====streamt4=rows4=$rows
+ goto loop2
+endi
+
+sql select * from streamt5 order by group_id, ts;
+
+if $rows != 14 then
+ print ====streamt5=rows5=$rows
+ goto loop2
+endi
+
+sql delete from t1 where ts = 1648791216000;
+print ======delete from t1 where ts = 1648791216000;
+
+$loop_count = 0
+
+loop3:
+sleep 200
+
+$loop_count = $loop_count + 1
+if $loop_count == 10 then
+ return -1
+endi
+
+sql select * from streamt1 order by group_id, ts;
+
+if $rows != 13 then
+ print ====streamt1=rows1=$rows
+ goto loop3
+endi
+
+sql select * from streamt2 order by group_id, ts;
+
+if $rows != 13 then
+ print ====streamt2=rows2=$rows
+ goto loop3
+endi
+
+sql select * from streamt3 order by group_id, ts;
+
+if $rows != 13 then
+ print ====streamt3=rows3=$rows
+ goto loop3
+endi
+
+sql select * from streamt4 order by group_id, ts;
+
+if $rows != 13 then
+ print ====streamt4=rows4=$rows
+ goto loop3
+endi
+
+sql select * from streamt5 order by group_id, ts;
+
+if $rows != 13 then
+ print ====streamt5=rows5=$rows
+ goto loop3
+endi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+sql drop stream if exists streams0;
+sql drop stream if exists streams1;
+sql drop stream if exists streams2;
+sql drop stream if exists streams3;
+sql drop stream if exists streams4;
+sql drop stream if exists streams5;
+sql drop stream if exists streams6;
+sql drop stream if exists streams7;
+sql drop stream if exists streams8;
+sql drop stream if exists streams9;
+sql drop stream if exists streams10;
+
+sql use test1;
+sql select * from t1;
+print $data00
+
+$loop_all = $loop_all + 1
+print ============loop_all=$loop_all
+
+system sh/stop_dnodes.sh
+
+#goto looptest
\ No newline at end of file
diff --git a/tests/script/tsim/stream/fillIntervalPrevNext.sim b/tests/script/tsim/stream/fillIntervalPrevNext.sim
new file mode 100644
index 0000000000..5eab5fdac1
--- /dev/null
+++ b/tests/script/tsim/stream/fillIntervalPrevNext.sim
@@ -0,0 +1,1036 @@
+$loop_all = 0
+looptest:
+
+system sh/stop_dnodes.sh
+system sh/deploy.sh -n dnode1 -i 1
+system sh/exec.sh -n dnode1 -s start
+sleep 200
+sql connect
+
+sql drop stream if exists streams1;
+sql drop stream if exists streams2;
+sql drop database if exists test1;
+sql create database test1 vgroups 1;
+sql use test1;
+sql create table t1(ts timestamp, a int, b int , c int, d double, s varchar(20));
+sql create stream streams1 trigger at_once into streamt1 as select _wstart as ts, count(*) c1, max(b)+sum(a) from t1 where ts >= 1648791210000 and ts < 1648791261000 interval(1s) fill(prev);
+sql create stream streams2 trigger at_once into streamt2 as select _wstart as ts, count(*) c1, max(a)+min(c), avg(b) from t1 where ts >= 1648791210000 and ts < 1648791261000 interval(1s) fill(next);
+sql insert into t1 values(1648791213000,4,4,4,4.0,'aaa') (1648791215000,5,5,5,5.0,'aaa');
+sql insert into t1 values(1648791211000,1,1,1,1.0,'aaa') (1648791217000,2,2,2,2.0,'aaa') (1648791220000,3,3,3,3.0,'aaa');
+
+
+$loop_count = 0
+
+loop1:
+sleep 200
+sql use test1;
+sql select * from streamt1 order by ts;
+
+$loop_count = $loop_count + 1
+if $loop_count == 10 then
+ return -1
+endi
+
+if $rows != 10 then
+ print =====rows=$rows
+ goto loop1
+endi
+
+if $data01 != 1 then
+ print =====data01=$data01
+ goto loop1
+endi
+
+if $data02 != 2.000000000 then
+ print =====data02=$data02
+ goto loop1
+endi
+
+
+if $data11 != 1 then
+ print =====data11=$data11
+ goto loop1
+endi
+
+if $data12 != 2.000000000 then
+ print =====data12=$data12
+ goto loop1
+endi
+
+
+if $data21 != 1 then
+ print =====data21=$data21
+ goto loop1
+endi
+
+if $data22 != 8.000000000 then
+ print =====data22=$data22
+ goto loop1
+endi
+
+
+if $data31 != 1 then
+ print =====data31=$data31
+ goto loop1
+endi
+
+if $data32 != 8.000000000 then
+ print =====data32=$data32
+ goto loop1
+endi
+
+
+if $data41 != 1 then
+ print =====data41=$data41
+ goto loop1
+endi
+
+if $data42 != 10.000000000 then
+ print =====data42=$data42
+ goto loop1
+endi
+
+
+if $data51 != 1 then
+ print =====data01=$data01
+ goto loop1
+endi
+
+if $data52 != 10.000000000 then
+ print =====data52=$data52
+ goto loop1
+endi
+
+
+if $data61 != 1 then
+ print =====data61=$data61
+ goto loop1
+endi
+
+if $data62 != 4.000000000 then
+ print =====data62=$data62
+ goto loop1
+endi
+
+
+if $data71 != 1 then
+ print =====data71=$data71
+ goto loop1
+endi
+
+if $data72 != 4.000000000 then
+ print =====data72=$data72
+ goto loop1
+endi
+
+
+if $data81 != 1 then
+ print =====data81=$data81
+ goto loop1
+endi
+
+if $data82 != 4.000000000 then
+ print =====data82=$data82
+ goto loop1
+endi
+
+
+if $data91 != 1 then
+ print =====data91=$data91
+ goto loop1
+endi
+
+if $data92 != 6.000000000 then
+ print =====data92=$data92
+ goto loop1
+endi
+
+sql use test1;
+sql select * from streamt2 order by ts;
+
+print next----------------------151
+
+if $rows != 10 then
+ print =====rows=$rows
+ goto loop1
+endi
+
+if $data02 != 2.000000000 then
+ print =====data02=$data02
+ goto loop1
+endi
+if $data03 != 1.000000000 then
+ print =====data03=$data03
+ goto loop1
+endi
+
+if $data12 != 8.000000000 then
+ print =====data12=$data12
+ goto loop1
+endi
+if $data13 != 4.000000000 then
+ print =====data13=$data13
+ goto loop1
+endi
+
+
+if $data22 != 8.000000000 then
+ print =====data22=$data22
+ goto loop1
+endi
+if $data23 != 4.000000000 then
+ print =====data23=$data23
+ goto loop1
+endi
+
+
+if $data32 != 10.000000000 then
+ print =====data32=$data32
+ goto loop1
+endi
+if $data33 != 5.000000000 then
+ print =====data33=$data33
+ goto loop1
+endi
+
+
+if $data42 != 10.000000000 then
+ print =====data42=$data42
+ goto loop1
+endi
+if $data43 != 5.000000000 then
+ print =====data43=$data43
+ goto loop1
+endi
+
+
+if $data52 != 4.000000000 then
+ print =====data52=$data52
+ goto loop1
+endi
+if $data53 != 2.000000000 then
+ print =====data53=$data53
+ goto loop1
+endi
+
+
+if $data62 != 4.000000000 then
+ print =====data62=$data62
+ goto loop1
+endi
+if $data63 != 2.000000000 then
+ print =====data63=$data63
+ goto loop1
+endi
+
+
+if $data72 != 6.000000000 then
+ print =====data72=$data72
+ return -1
+endi
+if $data73 != 3.000000000 then
+ print =====data73=$data73
+ return -1
+endi
+
+
+if $data82 != 6.000000000 then
+ print =====data82=$data82
+ return -1
+endi
+if $data83 != 3.000000000 then
+ print =====data83=$data83
+ return -1
+endi
+
+
+if $data92 != 6.000000000 then
+ print =====data92=$data92
+ return -1
+endi
+if $data93 != 3.000000000 then
+ print =====data93=$data93
+ return -1
+endi
+
+
+
+sql drop stream if exists streams5;
+sql drop stream if exists streams6;
+sql drop database if exists test5;
+sql create database test5 vgroups 1;
+sql use test5;
+sql create table t1(ts timestamp, a int, b int , c int, d double, s varchar(20));
+sql create stream streams5 trigger at_once into streamt5 as select _wstart as ts, count(*) c1, max(b)+sum(a) from t1 where ts >= 1648791210000 and ts < 1648791261000 interval(1s) fill(prev);
+sql create stream streams6 trigger at_once into streamt6 as select _wstart as ts, count(*) c1, max(a)+min(c), avg(b) from t1 where ts >= 1648791210000 and ts < 1648791261000 interval(1s) fill(next);
+sql insert into t1 values(1648791211000,1,1,1,1.0,'aaa') (1648791217000,2,2,2,2.0,'aaa') (1648791220000,3,3,3,3.0,'aaa');
+sql insert into t1 values(1648791213000,4,4,4,4.0,'aaa') (1648791215000,5,5,5,5.0,'aaa');
+
+$loop_count = 0
+
+loop5:
+sleep 200
+sql select * from streamt5 order by ts;
+
+$loop_count = $loop_count + 1
+if $loop_count == 10 then
+ return -1
+endi
+
+if $rows != 10 then
+ print =====rows=$rows
+ goto loop5
+endi
+
+if $data01 != 1 then
+ print =====data01=$data01
+ goto loop5
+endi
+
+if $data02 != 2.000000000 then
+ print =====data02=$data02
+ goto loop5
+endi
+
+
+if $data11 != 1 then
+ print =====data11=$data11
+ goto loop5
+endi
+
+if $data12 != 2.000000000 then
+ print =====data12=$data12
+ goto loop5
+endi
+
+
+if $data21 != 1 then
+ print =====data21=$data21
+ goto loop5
+endi
+
+if $data22 != 8.000000000 then
+ print =====data22=$data22
+ goto loop5
+endi
+
+
+if $data31 != 1 then
+ print =====data31=$data31
+ goto loop5
+endi
+
+if $data32 != 8.000000000 then
+ print =====data32=$data32
+ goto loop5
+endi
+
+
+if $data41 != 1 then
+ print =====data41=$data41
+ goto loop5
+endi
+
+if $data42 != 10.000000000 then
+ print =====data42=$data42
+ goto loop5
+endi
+
+
+if $data51 != 1 then
+ print =====data01=$data01
+ goto loop5
+endi
+
+if $data52 != 10.000000000 then
+ print =====data52=$data52
+ goto loop5
+endi
+
+
+if $data61 != 1 then
+ print =====data61=$data61
+ goto loop5
+endi
+
+if $data62 != 4.000000000 then
+ print =====data62=$data62
+ goto loop5
+endi
+
+
+if $data71 != 1 then
+ print =====data71=$data71
+ goto loop5
+endi
+
+if $data72 != 4.000000000 then
+ print =====data72=$data72
+ goto loop5
+endi
+
+
+if $data81 != 1 then
+ print =====data81=$data81
+ goto loop5
+endi
+
+if $data82 != 4.000000000 then
+ print =====data82=$data82
+ goto loop5
+endi
+
+
+if $data91 != 1 then
+ print =====data91=$data91
+ goto loop5
+endi
+
+if $data92 != 6.000000000 then
+ print =====data92=$data92
+ goto loop5
+endi
+
+
+$loop_count = 0
+
+loop6:
+
+$loop_count = $loop_count + 1
+if $loop_count == 10 then
+ return -1
+endi
+
+sleep 200
+
+sql select * from streamt6 order by ts;
+
+if $rows != 10 then
+ print =====rows=$rows
+ goto loop6
+endi
+
+if $data02 != 2.000000000 then
+ print =====data02=$data02
+ goto loop6
+endi
+if $data03 != 1.000000000 then
+ print =====data03=$data03
+ goto loop6
+endi
+
+if $data12 != 8.000000000 then
+ print =====data12=$data12
+ goto loop6
+endi
+if $data13 != 4.000000000 then
+ print =====data13=$data13
+ goto loop6
+endi
+
+
+if $data22 != 8.000000000 then
+ print =====data22=$data22
+ goto loop6
+endi
+if $data23 != 4.000000000 then
+ print =====data23=$data23
+ goto loop6
+endi
+
+
+if $data32 != 10.000000000 then
+ print =====data32=$data32
+ goto loop6
+endi
+if $data33 != 5.000000000 then
+ print =====data33=$data33
+ goto loop6
+endi
+
+
+if $data42 != 10.000000000 then
+ print =====data42=$data42
+ goto loop6
+endi
+if $data43 != 5.000000000 then
+ print =====data43=$data43
+ goto loop6
+endi
+
+
+if $data52 != 4.000000000 then
+ print =====data52=$data52
+ goto loop6
+endi
+if $data53 != 2.000000000 then
+ print =====data53=$data53
+ goto loop6
+endi
+
+
+if $data62 != 4.000000000 then
+ print =====data62=$data62
+ goto loop6
+endi
+if $data63 != 2.000000000 then
+ print =====data63=$data63
+ goto loop6
+endi
+
+
+if $data72 != 6.000000000 then
+ print =====data72=$data72
+ return -1
+endi
+if $data73 != 3.000000000 then
+ print =====data73=$data73
+ return -1
+endi
+
+
+if $data82 != 6.000000000 then
+ print =====data82=$data82
+ return -1
+endi
+if $data83 != 3.000000000 then
+ print =====data83=$data83
+ return -1
+endi
+
+
+if $data92 != 6.000000000 then
+ print =====data92=$data92
+ return -1
+endi
+if $data93 != 3.000000000 then
+ print =====data93=$data93
+ return -1
+endi
+
+
+
+sql drop stream if exists streams7;
+sql drop stream if exists streams8;
+sql drop database if exists test7;
+sql create database test7 vgroups 1;
+sql use test7;
+sql create table t1(ts timestamp, a int, b int , c int, d double, s varchar(20));
+sql create stream streams7 trigger at_once into streamt7 as select _wstart as ts, max(a), b+c, s from t1 where ts >= 1648791150000 and ts < 1648791261000 interval(1s) fill(prev);
+sql create stream streams8 trigger at_once into streamt8 as select _wstart as ts, max(a), 1, b+1 from t1 where ts >= 1648791150000 and ts < 1648791261000 interval(1s) fill(next);
+sql insert into t1 values(1648791215000,1,1,1,1.0,'aaa');
+sql insert into t1 values(1648791217000,2,2,2,2.0,'bbb');
+sql insert into t1 values(1648791211000,3,3,3,3.0,'ccc');
+sql insert into t1 values(1648791213000,4,4,4,4.0,'ddd');
+
+
+$loop_count = 0
+
+loop7:
+sleep 300
+sql select * from streamt7 order by ts;
+
+$loop_count = $loop_count + 1
+if $loop_count == 10 then
+ return -1
+endi
+
+
+if $rows != 7 then
+ print =====rows=$rows
+ goto loop7
+endi
+
+
+if $data01 != 3 then
+ print =====data01=$data01
+ return -1
+endi
+if $data02 != 6.000000000 then
+ print =====data02=$data02
+ return -1
+endi
+if $data03 != ccc then
+ print =====data03=$data03
+ return -1
+endi
+
+if $data11 != 3 then
+ print =====data11=$data11
+ return -1
+endi
+if $data12 != 6.000000000 then
+ print =====data12=$data12
+ return -1
+endi
+if $data13 != ccc then
+ print =====data13=$data13
+ return -1
+endi
+
+
+if $data21 != 4 then
+ print =====data21=$data21
+ return -1
+endi
+if $data22 != 8.000000000 then
+ print =====data22=$data22
+ return -1
+endi
+if $data23 != ddd then
+ print =====data23=$data23
+ return -1
+endi
+
+
+if $data31 != 4 then
+ print =====data31=$data31
+ return -1
+endi
+if $data32 != 8.000000000 then
+ print =====data32=$data32
+ return -1
+endi
+if $data33 != ddd then
+ print =====data33=$data33
+ return -1
+endi
+
+
+if $data41 != 1 then
+ print =====data41=$data41
+ return -1
+endi
+if $data42 != 2.000000000 then
+ print =====data42=$data42
+ return -1
+endi
+if $data43 != aaa then
+ print =====data43=$data43
+ return -1
+endi
+
+
+if $data51 != 1 then
+ print =====data51=$data51
+ return -1
+endi
+if $data52 != 2.000000000 then
+ print =====data52=$data52
+ return -1
+endi
+if $data53 != aaa then
+ print =====data53=$data53
+ return -1
+endi
+
+
+if $data61 != 2 then
+ print =====data61=$data61
+ return -1
+endi
+if $data62 != 4.000000000 then
+ print =====data62=$data62
+ return -1
+endi
+if $data63 != bbb then
+ print =====data63=$data63
+ return -1
+endi
+
+#--------------
+
+sleep 200
+sql select * from streamt8 order by ts;
+
+
+if $rows != 7 then
+ print =====rows=$rows
+ return -1
+endi
+
+
+if $data01 != 3 then
+ print =====data01=$data01
+ return -1
+endi
+if $data02 != 1 then
+ print =====data02=$data02
+ return -1
+endi
+if $data03 != 4.000000000 then
+ print =====data03=$data03
+ return -1
+endi
+
+if $data11 != 4 then
+ print =====data11=$data11
+ return -1
+endi
+if $data12 != 1 then
+ print =====data12=$data12
+ return -1
+endi
+if $data13 != 5.000000000 then
+ print =====data13=$data13
+ return -1
+endi
+
+
+if $data21 != 4 then
+ print =====data21=$data21
+ return -1
+endi
+if $data22 != 1 then
+ print =====data22=$data22
+ return -1
+endi
+if $data23 != 5.000000000 then
+ print =====data23=$data23
+ return -1
+endi
+
+
+if $data31 != 1 then
+ print =====data31=$data31
+ return -1
+endi
+if $data32 != 1 then
+ print =====data32=$data32
+ return -1
+endi
+if $data33 != 2.000000000 then
+ print =====data33=$data33
+ return -1
+endi
+
+
+if $data41 != 1 then
+ print =====data41=$data41
+ return -1
+endi
+if $data42 != 1 then
+ print =====data42=$data42
+ return -1
+endi
+if $data43 != 2.000000000 then
+ print =====data43=$data43
+ return -1
+endi
+
+
+if $data51 != 2 then
+ print =====data51=$data51
+ return -1
+endi
+if $data52 != 1 then
+ print =====data52=$data52
+ return -1
+endi
+if $data53 != 3.000000000 then
+ print =====data53=$data53
+ return -1
+endi
+
+
+if $data61 != 2 then
+ print =====data61=$data61
+ return -1
+endi
+if $data62 != 1 then
+ print =====data62=$data62
+ return -1
+endi
+if $data63 != 3.000000000 then
+ print =====data63=$data63
+ return -1
+endi
+
+sql insert into t1 values(1648791212000,5,5,5,5.0,'eee');
+sql insert into t1 values(1648791207000,6,6,6,6.0,'fff') (1648791209000,7,7,7,7.0,'ggg') (1648791219000,8,8,8,8.0,'hhh') (1648791221000,9,9,9,9.0,'iii');
+
+
+
+$loop_count = 0
+
+loop8:
+sleep 200
+sql select * from streamt7 order by ts;
+
+$loop_count = $loop_count + 1
+if $loop_count == 10 then
+ return -1
+endi
+
+
+if $rows != 15 then
+ print =====rows=$rows
+ goto loop8
+endi
+
+
+if $data01 != 6 then
+ print =====data01=$data01
+ return -1
+endi
+if $data02 != 12.000000000 then
+ print =====data02=$data02
+ return -1
+endi
+if $data03 != fff then
+ print =====data03=$data03
+ return -1
+endi
+
+if $data11 != 6 then
+ print =====data11=$data11
+ return -1
+endi
+if $data12 != 12.000000000 then
+ print =====data12=$data12
+ return -1
+endi
+if $data13 != fff then
+ print =====data13=$data13
+ return -1
+endi
+
+
+if $data21 != 7 then
+ print =====data21=$data21
+ return -1
+endi
+if $data22 != 14.000000000 then
+ print =====data22=$data22
+ return -1
+endi
+if $data23 != ggg then
+ print =====data23=$data23
+ return -1
+endi
+
+
+if $data31 != 7 then
+ print =====data31=$data31
+ return -1
+endi
+if $data32 != 14.000000000 then
+ print =====data32=$data32
+ return -1
+endi
+if $data33 != ggg then
+ print =====data33=$data33
+ return -1
+endi
+
+if $data51 != 5 then
+ print =====data51=$data51
+ return -1
+endi
+if $data52 != 10.000000000 then
+ print =====data52=$data52
+ return -1
+endi
+if $data53 != eee then
+ print =====data53=$data53
+ return -1
+endi
+
+
+if $data[11][1] != 2 then
+ print =====data[11][1]=$data[11][1]
+ return -1
+endi
+if $data[11][2] != 4.000000000 then
+ print =====data[11][2]=$data[11][2]
+ return -1
+endi
+if $data[11][3] != bbb then
+ print =====data[11][3]=$data[11][3]
+ return -1
+endi
+
+if $data[12][1] != 8 then
+ print =====data[12][1]=$data[12][1]
+ return -1
+endi
+if $data[12][2] != 16.000000000 then
+ print =====data[12][2]=$data[12][2]
+ return -1
+endi
+if $data[12][3] != hhh then
+ print =====data[12][3]=$data[12][3]
+ return -1
+endi
+
+if $data[13][1] != 8 then
+ print =====data[13][1]=$data[13][1]
+ return -1
+endi
+if $data[13][2] != 16.000000000 then
+ print =====data[13][2]=$data[13][2]
+ return -1
+endi
+if $data[13][3] != hhh then
+ print =====data[13][3]=$data[13][3]
+ return -1
+endi
+
+if $data[14][1] != 9 then
+ print =====data[14][1]=$data[14][1]
+ return -1
+endi
+if $data[14][2] != 18.000000000 then
+ print =====data[14][2]=$data[14][2]
+ return -1
+endi
+if $data[14][3] != iii then
+ print =====data[14][3]=$data[14][3]
+ return -1
+endi
+
+print fill next-----------------890
+sql use test7;
+sql select * from streamt8 order by ts;
+
+if $rows != 15 then
+ print =====rows=$rows
+ goto loop8
+endi
+
+
+if $data01 != 6 then
+ print =====data01=$data01
+ return -1
+endi
+if $data02 != 1 then
+ print =====data02=$data02
+ return -1
+endi
+if $data03 != 7.000000000 then
+ print =====data03=$data03
+ return -1
+endi
+
+if $data11 != 7 then
+ print =====data11=$data11
+ return -1
+endi
+if $data13 != 8.000000000 then
+ print =====data13=$data13
+ return -1
+endi
+
+
+if $data21 != 7 then
+ print =====data21=$data21
+ return -1
+endi
+if $data23 != 8.000000000 then
+ print =====data23=$data23
+ return -1
+endi
+
+
+if $data31 != 3 then
+ print =====data31=$data31
+ return -1
+endi
+if $data33 != 4.000000000 then
+ print =====data33=$data33
+ return -1
+endi
+
+if $data51 != 5 then
+ print =====data51=$data51
+ return -1
+endi
+if $data53 != 6.000000000 then
+ print =====data53=$data53
+ return -1
+endi
+
+
+if $data[11][1] != 8 then
+ print =====data[11][1]=$data[11][1]
+ return -1
+endi
+if $data[11][2] != 1 then
+ print =====data[11][2]=$data[11][2]
+ return -1
+endi
+if $data[11][3] != 9.000000000 then
+ print =====data[11][3]=$data[11][3]
+ return -1
+endi
+
+if $data[12][1] != 8 then
+ print =====data[12][1]=$data[12][1]
+ return -1
+endi
+if $data[12][3] != 9.000000000 then
+ print =====data[12][3]=$data[12][3]
+ return -1
+endi
+
+if $data[13][1] != 9 then
+ print =====data[13][1]=$data[13][1]
+ return -1
+endi
+if $data[13][3] != 10.000000000 then
+ print =====data[13][3]=$data[13][3]
+ return -1
+endi
+
+if $data[14][1] != 9 then
+ print =====data[14][1]=$data[14][1]
+ return -1
+endi
+if $data[14][3] != 10.000000000 then
+ print =====data[14][3]=$data[14][3]
+ return -1
+endi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+sql drop stream if exists streams0;
+sql drop stream if exists streams1;
+sql drop stream if exists streams2;
+sql drop stream if exists streams3;
+sql drop stream if exists streams4;
+sql drop stream if exists streams5;
+sql drop stream if exists streams6;
+sql drop stream if exists streams7;
+sql drop stream if exists streams8;
+
+sql use test1;
+sql select * from t1;
+print $data00
+
+$loop_all = $loop_all + 1
+print ============loop_all=$loop_all
+
+system sh/stop_dnodes.sh
+
+#goto looptest
\ No newline at end of file
diff --git a/tests/script/tsim/stream/fillIntervalValue.sim b/tests/script/tsim/stream/fillIntervalValue.sim
new file mode 100644
index 0000000000..113eae9270
--- /dev/null
+++ b/tests/script/tsim/stream/fillIntervalValue.sim
@@ -0,0 +1,488 @@
+$loop_all = 0
+looptest:
+
+system sh/stop_dnodes.sh
+system sh/deploy.sh -n dnode1 -i 1
+system sh/exec.sh -n dnode1 -s start
+sleep 200
+sql connect
+
+sql drop database if exists test;
+sql create database test vgroups 1;
+sql use test;
+
+sql create table t1(ts timestamp, a int, b int , c int, d double, s varchar(20));;
+sql create stream streams1 trigger at_once into streamt as select _wstart ts, count(*) c1 from t1 where ts > 1648791210000 and ts < 1648791413000 interval(10s) fill(value, 100);
+sql insert into t1 values(1648791213000,1,2,3,1.0,'aaa');
+sleep 100
+sql insert into t1 values(1648791233000,1,2,3,1.0,'aaa');
+sql insert into t1 values(1648791223000,1,2,3,1.0,'aaa');
+sql insert into t1 values(1648791283000,1,2,3,1.0,'aaa');
+sql insert into t1 values(1648791253000,1,2,3,1.0,'aaa');
+
+$loop_count = 0
+
+loop0:
+sleep 200
+sql select * from streamt order by ts;
+
+$loop_count = $loop_count + 1
+if $loop_count == 10 then
+ return -1
+endi
+
+if $rows != 8 then
+ print =====rows=$rows
+ goto loop0
+endi
+
+if $data01 != 1 then
+ print =====data01=$data01
+ goto loop0
+endi
+
+if $data11 != 1 then
+ print =====data11=$data11
+ goto loop0
+endi
+
+if $data21 != 1 then
+ print =====data21=$data21
+ goto loop0
+endi
+
+if $data31 != 100 then
+ print =====data31=$data31
+ goto loop0
+endi
+
+if $data41 != 1 then
+ print =====data41=$data41
+ goto loop0
+endi
+
+if $data51 != 100 then
+ print =====data01=$data01
+ goto loop0
+endi
+
+if $data61 != 100 then
+ print =====data61=$data61
+ goto loop0
+endi
+
+if $data71 != 1 then
+ print =====data71=$data71
+ goto loop0
+endi
+
+sql drop stream if exists streams2;
+sql drop database if exists test2;
+sql create database test2 vgroups 1;
+sql use test2;
+sql create table t1(ts timestamp, a int, b int , c int, d double, s varchar(20));
+sql create stream streams2 trigger at_once into streamt2 as select _wstart as ts, count(*) c1, max(b)+sum(a) from t1 where ts >= 1648791210000 and ts < 1648791261000 interval(1s) fill(value, 100,200);
+sql insert into t1 values(1648791211000,1,1,1,1.0,'aaa') (1648791217000,2,2,2,2.0,'aaa') (1648791220000,3,3,3,3.0,'aaa');
+sql insert into t1 values(1648791213000,4,4,4,4.0,'aaa') (1648791215000,5,5,5,5.0,'aaa');
+
+$loop_count = 0
+
+loop1:
+sleep 200
+sql select * from streamt2 order by ts;
+
+$loop_count = $loop_count + 1
+if $loop_count == 10 then
+ return -1
+endi
+
+if $rows != 10 then
+ print =====rows=$rows
+ goto loop1
+endi
+
+if $data01 != 1 then
+ print =====data01=$data01
+ goto loop1
+endi
+
+if $data02 != 2.000000000 then
+ print =====data02=$data02
+ goto loop1
+endi
+
+
+if $data11 != 100 then
+ print =====data11=$data11
+ goto loop1
+endi
+
+if $data12 != 200.000000000 then
+ print =====data12=$data12
+ goto loop1
+endi
+
+
+if $data21 != 1 then
+ print =====data21=$data21
+ goto loop1
+endi
+
+if $data22 != 8.000000000 then
+ print =====data22=$data22
+ goto loop1
+endi
+
+
+if $data31 != 100 then
+ print =====data31=$data31
+ goto loop1
+endi
+
+if $data32 != 200.000000000 then
+ print =====data32=$data32
+ goto loop1
+endi
+
+
+if $data41 != 1 then
+ print =====data41=$data41
+ goto loop1
+endi
+
+if $data42 != 10.000000000 then
+ print =====data42=$data42
+ goto loop1
+endi
+
+
+if $data51 != 100 then
+ print =====data01=$data01
+ goto loop1
+endi
+
+if $data52 != 200.000000000 then
+ print =====data52=$data52
+ goto loop1
+endi
+
+
+if $data61 != 1 then
+ print =====data61=$data61
+ goto loop1
+endi
+
+if $data62 != 4.000000000 then
+ print =====data62=$data62
+ goto loop1
+endi
+
+
+if $data71 != 100 then
+ print =====data71=$data71
+ goto loop1
+endi
+
+if $data72 != 200.000000000 then
+ print =====data72=$data72
+ goto loop1
+endi
+
+
+if $data81 != 100 then
+ print =====data81=$data81
+ goto loop1
+endi
+
+if $data82 != 200.000000000 then
+ print =====data82=$data82
+ goto loop1
+endi
+
+
+if $data91 != 1 then
+ print =====data91=$data91
+ goto loop1
+endi
+
+if $data92 != 6.000000000 then
+ print =====data92=$data92
+ goto loop1
+endi
+
+sql drop stream if exists streams3;
+sql drop database if exists test3;
+sql create database test3 vgroups 1;
+sql use test3;
+sql create table t1(ts timestamp, a int, b int , c int, d double, s varchar(20));
+sql create stream streams3 trigger at_once into streamt3 as select _wstart as ts, max(b), a+b, c from t1 where ts >= 1648791200000 and ts < 1648791261000 interval(10s) sliding(3s) fill(value, 100,200,300);
+
+sql insert into t1 values(1648791220000,1,1,1,1.0,'aaa');
+sleep 100
+sql insert into t1 values(1648791260000,1,1,1,1.0,'aaa');
+sleep 100
+sql insert into t1 values(1648791200000,1,1,1,1.0,'aaa');
+
+$loop_count = 0
+
+loop3:
+sleep 200
+sql select * from streamt3 order by ts;
+
+$loop_count = $loop_count + 1
+if $loop_count == 10 then
+ return -1
+endi
+
+if $rows != 23 then
+ print =====rows=$rows
+ goto loop3
+endi
+
+if $data01 != 1 then
+ print =====data01=$data01
+ goto loop3
+endi
+
+if $data02 != 2.000000000 then
+ print =====data02=$data02
+ goto loop3
+endi
+
+if $data03 != 1 then
+ print =====data03=$data03
+ goto loop3
+endi
+
+
+if $data21 != 1 then
+ print =====data21=$data21
+ goto loop3
+endi
+
+if $data22 != 2.000000000 then
+ print =====data22=$data22
+ goto loop3
+endi
+
+if $data23 != 1 then
+ print =====data23=$data23
+ goto loop3
+endi
+
+
+if $data31 != 100 then
+ print =====data31=$data31
+ goto loop3
+endi
+
+if $data32 != 200.000000000 then
+ print =====data32=$data32
+ goto loop3
+endi
+
+if $data33 != 300 then
+ print =====data33=$data33
+ goto loop3
+endi
+
+if $data61 != 100 then
+ print =====data61=$data61
+ goto loop3
+endi
+
+if $data62 != 200.000000000 then
+ print =====data62=$data62
+ goto loop3
+endi
+
+if $data63 != 300 then
+ print =====data63=$data63
+ goto loop3
+endi
+
+
+if $data71 != 1 then
+ print =====data71=$data71
+ goto loop3
+endi
+
+if $data72 != 2.000000000 then
+ print =====data72=$data72
+ goto loop3
+endi
+
+if $data73 != 1 then
+ print =====data73=$data73
+ goto loop3
+endi
+
+
+if $data91 != 1 then
+ print =====data91=$data91
+ goto loop3
+endi
+
+if $data92 != 2.000000000 then
+ print =====data92=$data92
+ goto loop3
+endi
+
+if $data93 != 1 then
+ print =====data93=$data93
+ goto loop3
+endi
+
+
+if $data[10][1] != 100 then
+ print =====data[10][1]=$data[10][1]
+ goto loop3
+endi
+
+if $data[10][2] != 200.000000000 then
+ print =====data[10][2]=$data[10][2]
+ goto loop3
+endi
+
+if $data[10][3] != 300 then
+ print =====data[10][3]=$data[10][3]
+ goto loop3
+endi
+
+if $data[19][1] != 100 then
+ print =====data[19][1]=$data[19][1]
+ goto loop3
+endi
+
+if $data[19][2] != 200.000000000 then
+ print =====data[19][2]=$data[19][2]
+ goto loop3
+endi
+
+if $data[19][3] != 300 then
+ print =====data[19][3]=$data[19][3]
+ goto loop3
+endi
+
+
+if $data[20][1] != 1 then
+ print =====data[20][1]=$data[20][1]
+ goto loop3
+endi
+
+if $data[20][2] != 2.000000000 then
+ print =====data[20][2]=$data[20][2]
+ goto loop3
+endi
+
+if $data[20][3] != 1 then
+ print =====data[20][3]=$data[20][3]
+ goto loop3
+endi
+
+
+if $data[22][1] != 1 then
+ print =====data[22][1]=$data[22][1]
+ goto loop3
+endi
+
+if $data[22][2] != 2.000000000 then
+ print =====data[22][2]=$data[22][2]
+ goto loop3
+endi
+
+if $data[22][3] != 1 then
+ print =====data[22][3]=$data[22][3]
+ goto loop3
+endi
+
+
+sql drop stream if exists streams4;
+sql drop database if exists test4;
+sql create database test4 vgroups 1;
+sql use test4;
+
+sql create table t1(ts timestamp, a int, b int , c int, d double, s varchar(20));;
+sql create stream streams4 trigger at_once into streamt4 as select _wstart ts, count(*) c1 from t1 where ts > 1648791210000 and ts < 1648791413000 interval(10s) fill(NULL);
+sql insert into t1 values(1648791213000,1,2,3,1.0,'aaa');
+sql insert into t1 values(1648791233000,1,2,3,1.0,'aaa');
+
+$loop_count = 0
+
+loop4:
+sleep 200
+sql select * from streamt4 order by ts;
+
+$loop_count = $loop_count + 1
+if $loop_count == 10 then
+ return -1
+endi
+
+if $rows != 3 then
+ print =====rows=$rows
+ goto loop4
+endi
+
+if $data11 != NULL then
+ print =====data11=$data11
+ goto loop4
+endi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+sql drop stream if exists streams0;
+sql drop stream if exists streams1;
+sql drop stream if exists streams2;
+sql drop stream if exists streams3;
+sql drop stream if exists streams4;
+sql drop stream if exists streams5;
+sql drop stream if exists streams6;
+sql drop stream if exists streams7;
+sql drop stream if exists streams8;
+
+sql use test;
+sql select * from t1;
+print $data00
+
+$loop_all = $loop_all + 1
+print ============loop_all=$loop_all
+
+system sh/stop_dnodes.sh
+
+#goto looptest
\ No newline at end of file
diff --git a/tests/script/tsim/stream/partitionby.sim b/tests/script/tsim/stream/partitionby.sim
index e5e02c3873..bc2c07b951 100644
--- a/tests/script/tsim/stream/partitionby.sim
+++ b/tests/script/tsim/stream/partitionby.sim
@@ -5,13 +5,14 @@ sleep 50
sql connect
sql create database test vgroups 4;
+sql create database test0 vgroups 1;
sql use test;
sql create stable st(ts timestamp, a int, b int , c int, d double) tags(ta int,tb int,tc int);
sql create table ts1 using st tags(1,1,1);
sql create table ts2 using st tags(2,2,2);
sql create table ts3 using st tags(3,2,2);
sql create table ts4 using st tags(4,2,2);
-sql create stream stream_t1 trigger at_once into streamtST1 as select _wstart, count(*) c1, count(d) c2 , sum(a) c3 , max(b) c4, min(c) c5 from st partition by ta,tb,tc interval(10s);
+sql create stream stream_t1 trigger at_once into test0.streamtST1 as select _wstart, count(*) c1, count(d) c2 , sum(a) c3 , max(b) c4, min(c) c5 from st partition by ta,tb,tc interval(10s);
sql insert into ts1 values(1648791213001,1,12,3,1.0);
sql insert into ts2 values(1648791213001,1,12,3,1.0);
@@ -22,7 +23,7 @@ $loop_count = 0
loop0:
sleep 300
-sql select * from streamtST1;
+sql select * from test0.streamtST1;
$loop_count = $loop_count + 1
if $loop_count == 10 then
@@ -34,6 +35,29 @@ print =====rows=$rows
goto loop0
endi
+sql insert into ts1 values(1648791223001,1,12,3,1.0);
+sql insert into ts2 values(1648791223001,1,12,3,1.0);
+
+sql insert into ts3 values(1648791223001,1,12,3,1.0);
+sql insert into ts4 values(1648791223001,1,12,3,1.0);
+sleep 300
+sql delete from st where ts = 1648791223001;
+
+loop00:
+sleep 300
+sql select * from test0.streamtST1;
+
+$loop_count = $loop_count + 1
+if $loop_count == 10 then
+ return -1
+endi
+
+if $rows != 4 then
+ print =====rows=$rows
+ goto loop00
+endi
+
+
print =====loop0
sql create database test1 vgroups 1;
diff --git a/tests/script/tsim/stream/partitionbyColumnInterval.sim b/tests/script/tsim/stream/partitionbyColumnInterval.sim
index 24fdb9c994..fd1d796fdb 100644
--- a/tests/script/tsim/stream/partitionbyColumnInterval.sim
+++ b/tests/script/tsim/stream/partitionbyColumnInterval.sim
@@ -562,6 +562,53 @@ if $data21 != 1 then
goto loop14
endi
+sql drop stream if exists streams5;
+sql drop database if exists test5;
+sql create database test5 vgroups 4;
+sql use test5;
+sql create stable st(ts timestamp, a int, b int, c int, d double) tags(ta int,tb int,tc int);
+sql create table t1 using st tags(1,1,1);
+sql create table t2 using st tags(2,2,2);
+sql create table t3 using st tags(2,2,2);
+sql create table t4 using st tags(2,2,2);
+sql create stream streams5 trigger at_once into test.streamt5 as select _wstart c1, count(*) c2, max(a) c3 from st partition by a interval(10s);
+
+sql insert into t1 values(1648791213000,1,2,3,1.0);
+sql insert into t2 values(1648791213000,2,2,3,1.0);
+sql insert into t3 values(1648791213000,3,2,3,1.0);
+sql insert into t4 values(1648791213000,4,2,3,1.0);
+
+sql insert into t1 values(1648791223000,1,2,3,1.0);
+sql insert into t2 values(1648791223000,2,2,3,1.0);
+sql insert into t3 values(1648791223000,3,2,3,1.0);
+sql insert into t4 values(1648791223000,4,2,3,1.0);
+
+sleep 300
+
+sql delete from st where ts = 1648791223000;
+
+sql select * from test.streamt5;
+
+$loop_count = 0
+
+loop15:
+sleep 50
+sql select * from test.streamt5 order by c1, c2, c3;
+
+$loop_count = $loop_count + 1
+if $loop_count == 20 then
+ return -1
+endi
+
+if $rows != 4 then
+ print =====rows=$rows
+ print =====rows=$rows
+ print =====rows=$rows
+# goto loop15
+endi
+
+
+
$loop_all = $loop_all + 1
print ============loop_all=$loop_all
diff --git a/tests/system-test/2-query/interp.py b/tests/system-test/2-query/interp.py
index 7bf0191ec1..bee20710b5 100644
--- a/tests/system-test/2-query/interp.py
+++ b/tests/system-test/2-query/interp.py
@@ -356,8 +356,261 @@ class TDTestCase:
tdSql.query(f"select interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:16', '2020-02-01 00:00:19') every(1s) fill(linear)")
tdSql.checkRows(0)
+ tdLog.printNoPrefix("==========step8:test _irowts with interp")
- tdLog.printNoPrefix("==========step8:test intra block interpolation")
+ # fill null
+ tdSql.query(f"select _irowts,interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:08', '2020-02-01 00:00:12') every(500a) fill(null)")
+ tdSql.checkRows(9)
+ tdSql.checkCols(2)
+
+ tdSql.checkData(0, 0, '2020-02-01 00:00:08.000')
+ tdSql.checkData(1, 0, '2020-02-01 00:00:08.500')
+ tdSql.checkData(2, 0, '2020-02-01 00:00:09.000')
+ tdSql.checkData(3, 0, '2020-02-01 00:00:09.500')
+ tdSql.checkData(4, 0, '2020-02-01 00:00:10.000')
+ tdSql.checkData(5, 0, '2020-02-01 00:00:10.500')
+ tdSql.checkData(6, 0, '2020-02-01 00:00:11.000')
+ tdSql.checkData(7, 0, '2020-02-01 00:00:11.500')
+ tdSql.checkData(8, 0, '2020-02-01 00:00:12.000')
+
+ tdSql.query(f"select _irowts,interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill(null)")
+ tdSql.checkRows(13)
+ tdSql.checkCols(2)
+
+ tdSql.checkData(0, 0, '2020-02-01 00:00:04.000')
+ tdSql.checkData(1, 0, '2020-02-01 00:00:05.000')
+ tdSql.checkData(2, 0, '2020-02-01 00:00:06.000')
+ tdSql.checkData(3, 0, '2020-02-01 00:00:07.000')
+ tdSql.checkData(4, 0, '2020-02-01 00:00:08.000')
+ tdSql.checkData(5, 0, '2020-02-01 00:00:09.000')
+ tdSql.checkData(6, 0, '2020-02-01 00:00:10.000')
+ tdSql.checkData(7, 0, '2020-02-01 00:00:11.000')
+ tdSql.checkData(8, 0, '2020-02-01 00:00:12.000')
+ tdSql.checkData(9, 0, '2020-02-01 00:00:13.000')
+ tdSql.checkData(10, 0, '2020-02-01 00:00:14.000')
+ tdSql.checkData(11, 0, '2020-02-01 00:00:15.000')
+ tdSql.checkData(12, 0, '2020-02-01 00:00:16.000')
+
+ tdSql.query(f"select _irowts,interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:05', '2020-02-01 00:00:15') every(2s) fill(null)")
+ tdSql.checkRows(6)
+ tdSql.checkCols(2)
+
+ tdSql.checkData(0, 0, '2020-02-01 00:00:05.000')
+ tdSql.checkData(1, 0, '2020-02-01 00:00:07.000')
+ tdSql.checkData(2, 0, '2020-02-01 00:00:09.000')
+ tdSql.checkData(3, 0, '2020-02-01 00:00:11.000')
+ tdSql.checkData(4, 0, '2020-02-01 00:00:13.000')
+ tdSql.checkData(5, 0, '2020-02-01 00:00:15.000')
+
+ # fill value
+ tdSql.query(f"select _irowts,interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:08', '2020-02-01 00:00:12') every(500a) fill(value, 1)")
+ tdSql.checkRows(9)
+ tdSql.checkCols(2)
+
+ tdSql.checkData(0, 0, '2020-02-01 00:00:08.000')
+ tdSql.checkData(1, 0, '2020-02-01 00:00:08.500')
+ tdSql.checkData(2, 0, '2020-02-01 00:00:09.000')
+ tdSql.checkData(3, 0, '2020-02-01 00:00:09.500')
+ tdSql.checkData(4, 0, '2020-02-01 00:00:10.000')
+ tdSql.checkData(5, 0, '2020-02-01 00:00:10.500')
+ tdSql.checkData(6, 0, '2020-02-01 00:00:11.000')
+ tdSql.checkData(7, 0, '2020-02-01 00:00:11.500')
+ tdSql.checkData(8, 0, '2020-02-01 00:00:12.000')
+
+ tdSql.query(f"select _irowts,interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill(value, 1)")
+ tdSql.checkRows(13)
+ tdSql.checkCols(2)
+
+ tdSql.checkData(0, 0, '2020-02-01 00:00:04.000')
+ tdSql.checkData(1, 0, '2020-02-01 00:00:05.000')
+ tdSql.checkData(2, 0, '2020-02-01 00:00:06.000')
+ tdSql.checkData(3, 0, '2020-02-01 00:00:07.000')
+ tdSql.checkData(4, 0, '2020-02-01 00:00:08.000')
+ tdSql.checkData(5, 0, '2020-02-01 00:00:09.000')
+ tdSql.checkData(6, 0, '2020-02-01 00:00:10.000')
+ tdSql.checkData(7, 0, '2020-02-01 00:00:11.000')
+ tdSql.checkData(8, 0, '2020-02-01 00:00:12.000')
+ tdSql.checkData(9, 0, '2020-02-01 00:00:13.000')
+ tdSql.checkData(10, 0, '2020-02-01 00:00:14.000')
+ tdSql.checkData(11, 0, '2020-02-01 00:00:15.000')
+ tdSql.checkData(12, 0, '2020-02-01 00:00:16.000')
+
+ tdSql.query(f"select _irowts,interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:05', '2020-02-01 00:00:15') every(2s) fill(value, 1)")
+ tdSql.checkRows(6)
+ tdSql.checkCols(2)
+
+ tdSql.checkData(0, 0, '2020-02-01 00:00:05.000')
+ tdSql.checkData(1, 0, '2020-02-01 00:00:07.000')
+ tdSql.checkData(2, 0, '2020-02-01 00:00:09.000')
+ tdSql.checkData(3, 0, '2020-02-01 00:00:11.000')
+ tdSql.checkData(4, 0, '2020-02-01 00:00:13.000')
+ tdSql.checkData(5, 0, '2020-02-01 00:00:15.000')
+
+ # fill prev
+ tdSql.query(f"select _irowts,interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:08', '2020-02-01 00:00:12') every(500a) fill(prev)")
+ tdSql.checkRows(9)
+ tdSql.checkCols(2)
+
+ tdSql.checkData(0, 0, '2020-02-01 00:00:08.000')
+ tdSql.checkData(1, 0, '2020-02-01 00:00:08.500')
+ tdSql.checkData(2, 0, '2020-02-01 00:00:09.000')
+ tdSql.checkData(3, 0, '2020-02-01 00:00:09.500')
+ tdSql.checkData(4, 0, '2020-02-01 00:00:10.000')
+ tdSql.checkData(5, 0, '2020-02-01 00:00:10.500')
+ tdSql.checkData(6, 0, '2020-02-01 00:00:11.000')
+ tdSql.checkData(7, 0, '2020-02-01 00:00:11.500')
+ tdSql.checkData(8, 0, '2020-02-01 00:00:12.000')
+
+ tdSql.query(f"select _irowts,interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill(prev)")
+ tdSql.checkRows(12)
+ tdSql.checkCols(2)
+
+ tdSql.checkData(0, 0, '2020-02-01 00:00:05.000')
+ tdSql.checkData(1, 0, '2020-02-01 00:00:06.000')
+ tdSql.checkData(2, 0, '2020-02-01 00:00:07.000')
+ tdSql.checkData(3, 0, '2020-02-01 00:00:08.000')
+ tdSql.checkData(4, 0, '2020-02-01 00:00:09.000')
+ tdSql.checkData(5, 0, '2020-02-01 00:00:10.000')
+ tdSql.checkData(6, 0, '2020-02-01 00:00:11.000')
+ tdSql.checkData(7, 0, '2020-02-01 00:00:12.000')
+ tdSql.checkData(8, 0, '2020-02-01 00:00:13.000')
+ tdSql.checkData(9, 0, '2020-02-01 00:00:14.000')
+ tdSql.checkData(10, 0, '2020-02-01 00:00:15.000')
+ tdSql.checkData(11, 0, '2020-02-01 00:00:16.000')
+
+ tdSql.query(f"select _irowts,interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:05', '2020-02-01 00:00:15') every(2s) fill(prev)")
+ tdSql.checkRows(6)
+ tdSql.checkCols(2)
+
+ tdSql.checkData(0, 0, '2020-02-01 00:00:05.000')
+ tdSql.checkData(1, 0, '2020-02-01 00:00:07.000')
+ tdSql.checkData(2, 0, '2020-02-01 00:00:09.000')
+ tdSql.checkData(3, 0, '2020-02-01 00:00:11.000')
+ tdSql.checkData(4, 0, '2020-02-01 00:00:13.000')
+ tdSql.checkData(5, 0, '2020-02-01 00:00:15.000')
+
+ # fill next
+ tdSql.query(f"select _irowts,interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:08', '2020-02-01 00:00:12') every(500a) fill(next)")
+ tdSql.checkRows(9)
+ tdSql.checkCols(2)
+
+ tdSql.checkData(0, 0, '2020-02-01 00:00:08.000')
+ tdSql.checkData(1, 0, '2020-02-01 00:00:08.500')
+ tdSql.checkData(2, 0, '2020-02-01 00:00:09.000')
+ tdSql.checkData(3, 0, '2020-02-01 00:00:09.500')
+ tdSql.checkData(4, 0, '2020-02-01 00:00:10.000')
+ tdSql.checkData(5, 0, '2020-02-01 00:00:10.500')
+ tdSql.checkData(6, 0, '2020-02-01 00:00:11.000')
+ tdSql.checkData(7, 0, '2020-02-01 00:00:11.500')
+ tdSql.checkData(8, 0, '2020-02-01 00:00:12.000')
+
+ tdSql.query(f"select _irowts,interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill(next)")
+ tdSql.checkRows(12)
+ tdSql.checkCols(2)
+
+ tdSql.checkData(0, 0, '2020-02-01 00:00:04.000')
+ tdSql.checkData(1, 0, '2020-02-01 00:00:05.000')
+ tdSql.checkData(2, 0, '2020-02-01 00:00:06.000')
+ tdSql.checkData(3, 0, '2020-02-01 00:00:07.000')
+ tdSql.checkData(4, 0, '2020-02-01 00:00:08.000')
+ tdSql.checkData(5, 0, '2020-02-01 00:00:09.000')
+ tdSql.checkData(6, 0, '2020-02-01 00:00:10.000')
+ tdSql.checkData(7, 0, '2020-02-01 00:00:11.000')
+ tdSql.checkData(8, 0, '2020-02-01 00:00:12.000')
+ tdSql.checkData(9, 0, '2020-02-01 00:00:13.000')
+ tdSql.checkData(10, 0, '2020-02-01 00:00:14.000')
+ tdSql.checkData(11, 0, '2020-02-01 00:00:15.000')
+
+ tdSql.query(f"select _irowts,interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:05', '2020-02-01 00:00:15') every(2s) fill(next)")
+ tdSql.checkRows(6)
+ tdSql.checkCols(2)
+
+ tdSql.checkData(0, 0, '2020-02-01 00:00:05.000')
+ tdSql.checkData(1, 0, '2020-02-01 00:00:07.000')
+ tdSql.checkData(2, 0, '2020-02-01 00:00:09.000')
+ tdSql.checkData(3, 0, '2020-02-01 00:00:11.000')
+ tdSql.checkData(4, 0, '2020-02-01 00:00:13.000')
+ tdSql.checkData(5, 0, '2020-02-01 00:00:15.000')
+
+ # fill linear
+ tdSql.query(f"select _irowts,interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:08', '2020-02-01 00:00:12') every(500a) fill(linear)")
+ tdSql.checkRows(9)
+ tdSql.checkCols(2)
+
+ tdSql.checkData(0, 0, '2020-02-01 00:00:08.000')
+ tdSql.checkData(1, 0, '2020-02-01 00:00:08.500')
+ tdSql.checkData(2, 0, '2020-02-01 00:00:09.000')
+ tdSql.checkData(3, 0, '2020-02-01 00:00:09.500')
+ tdSql.checkData(4, 0, '2020-02-01 00:00:10.000')
+ tdSql.checkData(5, 0, '2020-02-01 00:00:10.500')
+ tdSql.checkData(6, 0, '2020-02-01 00:00:11.000')
+ tdSql.checkData(7, 0, '2020-02-01 00:00:11.500')
+ tdSql.checkData(8, 0, '2020-02-01 00:00:12.000')
+
+ tdSql.query(f"select _irowts,interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill(linear)")
+ tdSql.checkRows(11)
+ tdSql.checkCols(2)
+
+ tdSql.checkData(0, 0, '2020-02-01 00:00:05.000')
+ tdSql.checkData(1, 0, '2020-02-01 00:00:06.000')
+ tdSql.checkData(2, 0, '2020-02-01 00:00:07.000')
+ tdSql.checkData(3, 0, '2020-02-01 00:00:08.000')
+ tdSql.checkData(4, 0, '2020-02-01 00:00:09.000')
+ tdSql.checkData(5, 0, '2020-02-01 00:00:10.000')
+ tdSql.checkData(6, 0, '2020-02-01 00:00:11.000')
+ tdSql.checkData(7, 0, '2020-02-01 00:00:12.000')
+ tdSql.checkData(8, 0, '2020-02-01 00:00:13.000')
+ tdSql.checkData(9, 0, '2020-02-01 00:00:14.000')
+ tdSql.checkData(10, 0, '2020-02-01 00:00:15.000')
+
+ tdSql.query(f"select _irowts,interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:05', '2020-02-01 00:00:15') every(2s) fill(linear)")
+ tdSql.checkRows(6)
+ tdSql.checkCols(2)
+
+ tdSql.checkData(0, 0, '2020-02-01 00:00:05.000')
+ tdSql.checkData(1, 0, '2020-02-01 00:00:07.000')
+ tdSql.checkData(2, 0, '2020-02-01 00:00:09.000')
+ tdSql.checkData(3, 0, '2020-02-01 00:00:11.000')
+ tdSql.checkData(4, 0, '2020-02-01 00:00:13.000')
+ tdSql.checkData(5, 0, '2020-02-01 00:00:15.000')
+
+ # multiple _irowts
+ tdSql.query(f"select interp(c0),_irowts from {dbname}.{tbname} range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill(linear)")
+ tdSql.checkRows(11)
+ tdSql.checkCols(2)
+
+ tdSql.checkData(0, 1, '2020-02-01 00:00:05.000')
+ tdSql.checkData(1, 1, '2020-02-01 00:00:06.000')
+ tdSql.checkData(2, 1, '2020-02-01 00:00:07.000')
+ tdSql.checkData(3, 1, '2020-02-01 00:00:08.000')
+ tdSql.checkData(4, 1, '2020-02-01 00:00:09.000')
+ tdSql.checkData(5, 1, '2020-02-01 00:00:10.000')
+ tdSql.checkData(6, 1, '2020-02-01 00:00:11.000')
+ tdSql.checkData(7, 1, '2020-02-01 00:00:12.000')
+ tdSql.checkData(8, 1, '2020-02-01 00:00:13.000')
+ tdSql.checkData(9, 1, '2020-02-01 00:00:14.000')
+ tdSql.checkData(10, 1, '2020-02-01 00:00:15.000')
+
+ tdSql.query(f"select _irowts, interp(c0), interp(c0), _irowts from {dbname}.{tbname} range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill(linear)")
+ tdSql.checkRows(11)
+ tdSql.checkCols(4)
+
+ cols = (0, 3)
+ for i in cols:
+ tdSql.checkData(0, i, '2020-02-01 00:00:05.000')
+ tdSql.checkData(1, i, '2020-02-01 00:00:06.000')
+ tdSql.checkData(2, i, '2020-02-01 00:00:07.000')
+ tdSql.checkData(3, i, '2020-02-01 00:00:08.000')
+ tdSql.checkData(4, i, '2020-02-01 00:00:09.000')
+ tdSql.checkData(5, i, '2020-02-01 00:00:10.000')
+ tdSql.checkData(6, i, '2020-02-01 00:00:11.000')
+ tdSql.checkData(7, i, '2020-02-01 00:00:12.000')
+ tdSql.checkData(8, i, '2020-02-01 00:00:13.000')
+ tdSql.checkData(9, i, '2020-02-01 00:00:14.000')
+ tdSql.checkData(10, i, '2020-02-01 00:00:15.000')
+
+
+ tdLog.printNoPrefix("==========step9:test intra block interpolation")
tdSql.execute(f"drop database {dbname}");
tdSql.prepare()
@@ -551,7 +804,7 @@ class TDTestCase:
tdSql.checkData(0, 0, 15)
tdSql.checkData(1, 0, 15)
- tdLog.printNoPrefix("==========step9:test multi-interp cases")
+ tdLog.printNoPrefix("==========step10:test multi-interp cases")
tdSql.query(f"select interp(c0),interp(c1),interp(c2),interp(c3) from {dbname}.{tbname} range('2020-02-09 00:00:05', '2020-02-13 00:00:05') every(1d) fill(null)")
tdSql.checkRows(5)
tdSql.checkCols(4)
@@ -601,7 +854,7 @@ class TDTestCase:
for i in range (tdSql.queryCols):
tdSql.checkData(0, i, 13)
- tdLog.printNoPrefix("==========step10:test error cases")
+ tdLog.printNoPrefix("==========step11:test error cases")
tdSql.error(f"select interp(c0) from {dbname}.{tbname}")
tdSql.error(f"select interp(c0) from {dbname}.{tbname} range('2020-02-10 00:00:05', '2020-02-15 00:00:05')")
diff --git a/tests/system-test/7-tmq/subscribeDb3.py b/tests/system-test/7-tmq/subscribeDb3.py
index e8e475456c..0ff609ab6b 100644
--- a/tests/system-test/7-tmq/subscribeDb3.py
+++ b/tests/system-test/7-tmq/subscribeDb3.py
@@ -295,7 +295,7 @@ class TDTestCase:
ifManualCommit = 1
keyList = 'group.id:cgrp1,\
enable.auto.commit:true,\
- auto.commit.interval.ms:1000,\
+ auto.commit.interval.ms:200,\
auto.offset.reset:earliest'
self.insertConsumerInfo(consumerId, expectrowcnt,topicList,keyList,ifcheckdata,ifManualCommit)
diff --git a/tools/shell/src/shellArguments.c b/tools/shell/src/shellArguments.c
index 93f8b8a23b..eedb6d7295 100644
--- a/tools/shell/src/shellArguments.c
+++ b/tools/shell/src/shellArguments.c
@@ -358,7 +358,7 @@ static int32_t shellCheckArgs() {
return -1;
}
- if (pArgs->password != NULL && (strlen(pArgs->password) <= 0)) {
+ if (/*pArgs->password != NULL && */ (strlen(pArgs->password) <= 0)) {
printf("Invalid password\r\n");
return -1;
}
diff --git a/utils/test/c/sml_test.c b/utils/test/c/sml_test.c
index ca3d464da7..56ba622a9c 100644
--- a/utils/test/c/sml_test.c
+++ b/utils/test/c/sml_test.c
@@ -879,7 +879,7 @@ int sml_16960_Test() {
"{"
"\"timestamp\":"
""
- "{ \"value\": 1349020800000, \"type\": \"ms\" }"
+ "{ \"value\": 1664418955000, \"type\": \"ms\" }"
","
"\"value\":"
""
@@ -916,7 +916,7 @@ int sml_16960_Test() {
"{"
"\"timestamp\":"
""
- "{ \"value\": 1349020800001, \"type\": \"ms\" }"
+ "{ \"value\": 1664418955001, \"type\": \"ms\" }"
","
"\"value\":"
""
@@ -953,7 +953,7 @@ int sml_16960_Test() {
"{"
"\"timestamp\":"
""
- "{ \"value\": 1349020800002, \"type\": \"ms\" }"
+ "{ \"value\": 1664418955002, \"type\": \"ms\" }"
","
"\"value\":"
""
@@ -990,7 +990,7 @@ int sml_16960_Test() {
"{"
"\"timestamp\":"
""
- "{ \"value\": 1349020800003, \"type\": \"ms\" }"
+ "{ \"value\": 1664418955003, \"type\": \"ms\" }"
","
"\"value\":"
""
@@ -1027,7 +1027,7 @@ int sml_16960_Test() {
"{"
"\"timestamp\":"
""
- "{ \"value\": 1349020800004, \"type\": \"ms\" }"
+ "{ \"value\": 1664418955004, \"type\": \"ms\" }"
","
"\"value\":"
""
diff --git a/utils/tsim/src/simExe.c b/utils/tsim/src/simExe.c
index 16732ff9a1..5bb53287db 100644
--- a/utils/tsim/src/simExe.c
+++ b/utils/tsim/src/simExe.c
@@ -224,10 +224,24 @@ char *simGetVariable(SScript *script, char *varName, int32_t varLen) {
}
int32_t simExecuteExpression(SScript *script, char *exp) {
- char *op1, *op2, *var1, *var2, *var3, *rest;
- int32_t op1Len, op2Len, var1Len, var2Len, var3Len, val0, val1;
- char t0[1024], t1[1024], t2[1024], t3[2048];
- int32_t result;
+ char *op1 = NULL;
+ char *op2 = NULL;
+ char *var1 = NULL;
+ char *var2 = NULL;
+ char *var3 = NULL;
+ char *rest = NULL;
+ int32_t op1Len = 0;
+ int32_t op2Len = 0;
+ int32_t var1Len = 0;
+ int32_t var2Len = 0;
+ int32_t var3Len = 0;
+ int32_t val0 = 0;
+ int32_t val1 = 0;
+ char t0[1024] = {0};
+ char t1[1024] = {0};
+ char t2[1024] = {0};
+ char t3[2048] = {0};
+ int32_t result = 0;
rest = paGetToken(exp, &var1, &var1Len);
rest = paGetToken(rest, &op1, &op1Len);
@@ -241,9 +255,9 @@ int32_t simExecuteExpression(SScript *script, char *exp) {
t0[var1Len] = 0;
}
- if (var2[0] == '$')
- strcpy(t1, simGetVariable(script, var2 + 1, var2Len - 1));
- else {
+ if (var2[0] == '$') {
+ tstrncpy(t1, simGetVariable(script, var2 + 1, var2Len - 1), 1024);
+ } else {
memcpy(t1, var2, var2Len);
t1[var2Len] = 0;
}
@@ -258,14 +272,21 @@ int32_t simExecuteExpression(SScript *script, char *exp) {
t2[var3Len] = 0;
}
+ int64_t t1l = atoll(t1);
+ int64_t t2l = atoll(t2);
+
if (op2[0] == '+') {
- sprintf(t3, "%lld", atoll(t1) + atoll(t2));
+ sprintf(t3, "%" PRId64, t1l + t2l);
} else if (op2[0] == '-') {
- sprintf(t3, "%lld", atoll(t1) - atoll(t2));
+ sprintf(t3, "%" PRId64, t1l - t2l);
} else if (op2[0] == '*') {
- sprintf(t3, "%lld", atoll(t1) * atoll(t2));
+ sprintf(t3, "%" PRId64, t1l * t2l);
} else if (op2[0] == '/') {
- sprintf(t3, "%lld", atoll(t1) / atoll(t2));
+ if (t2l == 0) {
+ sprintf(t3, "%" PRId64, INT64_MAX);
+ } else {
+ sprintf(t3, "%" PRId64, t1l / t2l);
+ }
} else if (op2[0] == '.') {
sprintf(t3, "%s%s", t1, t2);
}
@@ -636,7 +657,7 @@ bool simCreateTaosdConnect(SScript *script, char *rest) {
}
bool simExecuteNativeSqlCommand(SScript *script, char *rest, bool isSlow) {
- char timeStr[30] = {0};
+ char timeStr[80] = {0};
time_t tt;
struct tm tp;
SCmdLine *line = &script->lines[script->linePos];
@@ -943,7 +964,7 @@ bool simExecuteSqlErrorCmd(SScript *script, char *rest) {
return true;
}
- TAOS_RES *pSql = pSql = taos_query(script->taos, rest);
+ TAOS_RES *pSql = taos_query(script->taos, rest);
int32_t ret = taos_errno(pSql);
taos_free_result(pSql);
@@ -961,7 +982,7 @@ bool simExecuteSqlErrorCmd(SScript *script, char *rest) {
}
bool simExecuteLineInsertCmd(SScript *script, char *rest) {
- char buf[TSDB_MAX_BINARY_LEN];
+ char buf[TSDB_MAX_BINARY_LEN] = {0};
simVisuallizeOption(script, rest, buf);
rest = buf;
@@ -973,10 +994,7 @@ bool simExecuteLineInsertCmd(SScript *script, char *rest) {
char *lines[] = {rest};
#if 0
int32_t ret = taos_insert_lines(script->taos, lines, 1);
-#else
- int32_t ret = 0;
-#endif
- if (ret == TSDB_CODE_SUCCESS) {
+ if (ret == TSDB_CODE_SUCCESS) {
simDebug("script:%s, taos:%p, %s executed. success.", script->fileName, script->taos, rest);
script->linePos++;
return true;
@@ -985,6 +1003,11 @@ bool simExecuteLineInsertCmd(SScript *script, char *rest) {
tstrerror(ret));
return false;
}
+#else
+ simDebug("script:%s, taos:%p, %s executed. success.", script->fileName, script->taos, rest);
+ script->linePos++;
+ return true;
+#endif
}
bool simExecuteLineInsertErrorCmd(SScript *script, char *rest) {
diff --git a/utils/tsim/src/simMain.c b/utils/tsim/src/simMain.c
index 713e46df58..e58a22cf68 100644
--- a/utils/tsim/src/simMain.c
+++ b/utils/tsim/src/simMain.c
@@ -33,7 +33,7 @@ int32_t main(int32_t argc, char *argv[]) {
if (strcmp(argv[i], "-c") == 0 && i < argc - 1) {
tstrncpy(configDir, argv[++i], 128);
} else if (strcmp(argv[i], "-f") == 0 && i < argc - 1) {
- strcpy(scriptFile, argv[++i]);
+ tstrncpy(scriptFile, argv[++i], MAX_FILE_NAME_LEN);
} else if (strcmp(argv[i], "-m") == 0) {
useMultiProcess = true;
} else if (strcmp(argv[i], "-v") == 0) {
diff --git a/utils/tsim/src/simParse.c b/utils/tsim/src/simParse.c
index b9f7610be8..14be10bc8a 100644
--- a/utils/tsim/src/simParse.c
+++ b/utils/tsim/src/simParse.c
@@ -175,14 +175,17 @@ SScript *simBuildScriptObj(char *fileName) {
SScript *simParseScript(char *fileName) {
TdFilePtr pFile;
int32_t tokenLen, lineNum = 0;
- char buffer[10*1024], name[128], *token, *rest;
- SCommand *pCmd;
- SScript *script;
+ char buffer[10 * 1024] = {0};
+ char name[PATH_MAX] = {9};
+ char *token = NULL;
+ char *rest = NULL;
+ SCommand *pCmd = NULL;
+ SScript *script = NULL;
if ((fileName[0] == '.') || (fileName[0] == '/')) {
- strcpy(name, fileName);
+ tstrncpy(name, fileName, PATH_MAX);
} else {
- sprintf(name, "%s" TD_DIRSEP "%s", simScriptDir, fileName);
+ snprintf(name, PATH_MAX, "%s" TD_DIRSEP "%s", simScriptDir, fileName);
taosRealPath(name, NULL, sizeof(name));
}