diff --git a/cmake/cmake.version b/cmake/cmake.version index 0e4785f643..fa6ec4df17 100644 --- a/cmake/cmake.version +++ b/cmake/cmake.version @@ -2,7 +2,7 @@ IF (DEFINED VERNUMBER) SET(TD_VER_NUMBER ${VERNUMBER}) ELSE () - SET(TD_VER_NUMBER "3.2.0.0.alpha") + SET(TD_VER_NUMBER "3.2.1.0.alpha") ENDIF () IF (DEFINED VERCOMPATIBLE) diff --git a/docs/en/07-develop/03-insert-data/30-influxdb-line.mdx b/docs/en/07-develop/03-insert-data/30-influxdb-line.mdx index c85363c9db..bd430d5973 100644 --- a/docs/en/07-develop/03-insert-data/30-influxdb-line.mdx +++ b/docs/en/07-develop/03-insert-data/30-influxdb-line.mdx @@ -38,7 +38,10 @@ 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) -- The child table name is created automatically in a rule to guarantee its uniqueness. But you can configure `smlChildTableName` in taos.cfg to specify a tag value as the table names if the tag value is unique globally. For example, if a tag is called `tname` and you set `smlChildTableName=tname` in taos.cfg, when you insert `st,tname=cpu1,t1=4 c1=3 1626006833639000000`, the child table `cpu1` will be created automatically. 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 +- The rule of table name + - The child table name is created automatically in a rule to guarantee its uniqueness. + - You can configure `smlAutoChildTableNameDelimiter` in taos.cfg to specify a delimiter between tag values as the table names. For example, you set `smlAutoChildTableNameDelimiter=-` in taos.cfg, when you insert `st,t0=cpu1,t1=4 c1=3 1626006833639000000`, the child table will be `cpu1-4` + - You can configure `smlChildTableName` in taos.cfg to specify a tag value as the table names if the tag value is unique globally. For example, if a tag is called `tname` and you set `smlChildTableName=tname` in taos.cfg, when you insert `st,tname=cpu1,t1=4 c1=3 1626006833639000000`, the child table `cpu1` will be created automatically. 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, smlDataFormat is discarded since 3.0.3.0) ::: diff --git a/docs/en/07-develop/03-insert-data/40-opentsdb-telnet.mdx b/docs/en/07-develop/03-insert-data/40-opentsdb-telnet.mdx index 1147ce01b0..ed2659042f 100644 --- a/docs/en/07-develop/03-insert-data/40-opentsdb-telnet.mdx +++ b/docs/en/07-develop/03-insert-data/40-opentsdb-telnet.mdx @@ -33,7 +33,10 @@ For example: meters.current 1648432611250 11.3 location=California.LosAngeles groupid=3 ``` -- The child table name is created automatically in a rule to guarantee its uniqueness. But you can configure `smlChildTableName` in taos.cfg to specify a tag value as the table names if the tag value is unique globally. For example, if a tag is called `tname` and you set `smlChildTableName=tname` in taos.cfg, when you insert `st,tname=cpu1,t1=4 c1=3 1626006833639000000`, the child table `cpu1` 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. +- The rule of table name + - The child table name is created automatically in a rule to guarantee its uniqueness. + - You can configure `smlAutoChildTableNameDelimiter` in taos.cfg to specify a delimiter between tag values as the table names. For example, you set `smlAutoChildTableNameDelimiter=-` in taos.cfg, when you insert `st,t0=cpu1,t1=4 c1=3 1626006833639000000`, the child table will be `cpu1-4` + - You can configure `smlChildTableName` in taos.cfg to specify a tag value as the table names if the tag value is unique globally. For example, if a tag is called `tname` and you set `smlChildTableName=tname` in taos.cfg, when you insert `st,tname=cpu1,t1=4 c1=3 1626006833639000000`, the child table `cpu1` will be created automatically. 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. diff --git a/docs/en/07-develop/03-insert-data/50-opentsdb-json.mdx b/docs/en/07-develop/03-insert-data/50-opentsdb-json.mdx index 3dd6c6b756..a40b5f264d 100644 --- a/docs/en/07-develop/03-insert-data/50-opentsdb-json.mdx +++ b/docs/en/07-develop/03-insert-data/50-opentsdb-json.mdx @@ -48,7 +48,10 @@ Please refer to [OpenTSDB HTTP API](http://opentsdb.net/docs/build/html/api_http :::note - In JSON protocol, strings will be converted to NCHAR type and numeric values will be converted to double type. -- The child table name is created automatically in a rule to guarantee its uniqueness. But you can configure `smlChildTableName` in taos.cfg to specify a tag value as the table names if the tag value is unique globally. For example, if a tag is called `tname` and you set `smlChildTableName=tname` in taos.cfg, when you insert `st,tname=cpu1,t1=4 c1=3 1626006833639000000`, the child table `cpu1` 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. +- The rule of table name + - The child table name is created automatically in a rule to guarantee its uniqueness. + - You can configure `smlAutoChildTableNameDelimiter` in taos.cfg to specify a delimiter between tag values as the table names. For example, you set `smlAutoChildTableNameDelimiter=-` in taos.cfg, when you insert `st,t0=cpu1,t1=4 c1=3 1626006833639000000`, the child table will be `cpu1-4` + - You can configure `smlChildTableName` in taos.cfg to specify a tag value as the table names if the tag value is unique globally. For example, if a tag is called `tname` and you set `smlChildTableName=tname` in taos.cfg, when you insert `st,tname=cpu1,t1=4 c1=3 1626006833639000000`, the child table `cpu1` will be created automatically. 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 ::: diff --git a/docs/en/07-develop/07-tmq.mdx b/docs/en/07-develop/07-tmq.mdx index ecadb5a499..7dd06c9ca2 100644 --- a/docs/en/07-develop/07-tmq.mdx +++ b/docs/en/07-develop/07-tmq.mdx @@ -356,6 +356,7 @@ You configure the following parameters when creating a consumer: | `enable.auto.commit` | boolean | Commit automatically; true: user application doesn't need to explicitly commit; false: user application need to handle commit by itself | Default value is true | | `auto.commit.interval.ms` | integer | Interval for automatic commits, in milliseconds | | `msg.with.table.name` | boolean | Specify whether to deserialize table names from messages. Not applicable if subscribe to a column (tbname can be written as a column in the subquery statement during column subscriptions) (This parameter has been deprecated since version 3.2.0.0 and remains true) | default value: false +| `enable.replay` | boolean | Specify whether data replay function enabled or not |default value: false | The method of specifying these parameters depends on the language used: @@ -421,7 +422,7 @@ public class MetersDeserializer extends ReferenceDeserializer { ```go conf := &tmq.ConfigMap{ "group.id": "test", - "auto.offset.reset": "earliest", + "auto.offset.reset": "latest", "td.connect.ip": "127.0.0.1", "td.connect.user": "root", "td.connect.pass": "taosdata", @@ -510,7 +511,7 @@ var cfg = new ConsumerConfig GourpId = "TDengine-TMQ-C#", TDConnectUser = "root", TDConnectPasswd = "taosdata", - AutoOffsetReset = "earliest" + AutoOffsetReset = "latest" MsgWithTableName = "true", TDConnectIp = "127.0.0.1", TDConnectPort = "6030" @@ -526,6 +527,24 @@ var consumer = new ConsumerBuilder(cfg).Build(); A consumer group is automatically created when multiple consumers are configured with the same consumer group ID. +Data replay function description: +- Subscription adds replay function, which replays according to the time of data writing. + For example, writing three pieces of data at the following time. + ```sql + 2023/09/22 00:00:00.000 + 2023/09/22 00:00:05.000 + 2023/09/22 00:00:08.000 + ``` + After subscribing to the first data for 5 seconds, the second data is returned, and after obtaining the second data for 3 seconds, the third data is returned. +- Only column subscriptions support data replay. + - Replay needs to ensure an independent timeline + - If it is a sub table subscription or a normal table subscription, only one vnode has data, ensuring a timeline. + - If subscribing to a super table, it is necessary to ensure that the DB has only one vnode, otherwise an error will be reported (because the data subscribed to on multiple vnodes is not on the same timeline). +- Super table and database subscriptions do not support replay +- Add the enable.replay parameter. True indicates that the subscription replay function is enabled, while false indicates that the subscription replay function is not enabled by default. +- Replay does not support progress saving, so when the replay parameter enable, auto commit will automatically close. +- Due to the processing time required for data replay, there is an error of tens of milliseconds in the accuracy of replay. + ## Subscribe to a Topic A single consumer can subscribe to multiple topics. diff --git a/docs/en/14-reference/03-connector/05-go.mdx b/docs/en/14-reference/03-connector/05-go.mdx index b3d4857d75..a0be7a4a02 100644 --- a/docs/en/14-reference/03-connector/05-go.mdx +++ b/docs/en/14-reference/03-connector/05-go.mdx @@ -794,7 +794,7 @@ The TDengine Go Connector supports subscription functionality with the following ```go consumer, err := tmq.NewConsumer(&tmqcommon.ConfigMap{ "group.id": "test", - "auto.offset.reset": "earliest", + "auto.offset.reset": "latest", "td.connect.ip": "127.0.0.1", "td.connect.user": "root", "td.connect.pass": "taosdata", @@ -870,6 +870,7 @@ package main import ( "fmt" "os" + "time" "github.com/taosdata/driver-go/v3/af" "github.com/taosdata/driver-go/v3/af/tmq" @@ -890,19 +891,16 @@ func main() { if err != nil { panic(err) } - if err != nil { - panic(err) - } consumer, err := tmq.NewConsumer(&tmqcommon.ConfigMap{ - "group.id": "test", - "auto.offset.reset": "earliest", - "td.connect.ip": "127.0.0.1", - "td.connect.user": "root", - "td.connect.pass": "taosdata", - "td.connect.port": "6030", - "client.id": "test_tmq_client", - "enable.auto.commit": "false", - "msg.with.table.name": "true", + "group.id": "test", + "auto.offset.reset": "latest", + "td.connect.ip": "127.0.0.1", + "td.connect.user": "root", + "td.connect.pass": "taosdata", + "td.connect.port": "6030", + "client.id": "test_tmq_client", + "enable.auto.commit": "false", + "msg.with.table.name": "true", }) if err != nil { panic(err) @@ -915,10 +913,16 @@ func main() { if err != nil { panic(err) } - _, err = db.Exec("insert into example_tmq.t1 values(now,1)") - if err != nil { - panic(err) - } + go func() { + for { + _, err = db.Exec("insert into example_tmq.t1 values(now,1)") + if err != nil { + panic(err) + } + time.Sleep(time.Millisecond * 100) + } + }() + for i := 0; i < 5; i++ { ev := consumer.Poll(500) if ev != nil { @@ -972,6 +976,7 @@ package main import ( "database/sql" "fmt" + "time" "github.com/taosdata/driver-go/v3/common" tmqcommon "github.com/taosdata/driver-go/v3/common/tmq" @@ -995,7 +1000,7 @@ func main() { "td.connect.pass": "taosdata", "group.id": "example", "client.id": "example_consumer", - "auto.offset.reset": "earliest", + "auto.offset.reset": "latest", }) if err != nil { panic(err) @@ -1004,29 +1009,34 @@ func main() { if err != nil { panic(err) } + + _, err = db.Exec("create table example_ws_tmq.t_all(ts timestamp," + + "c1 bool," + + "c2 tinyint," + + "c3 smallint," + + "c4 int," + + "c5 bigint," + + "c6 tinyint unsigned," + + "c7 smallint unsigned," + + "c8 int unsigned," + + "c9 bigint unsigned," + + "c10 float," + + "c11 double," + + "c12 binary(20)," + + "c13 nchar(20)" + + ")") + if err != nil { + panic(err) + } go func() { - _, err := db.Exec("create table example_ws_tmq.t_all(ts timestamp," + - "c1 bool," + - "c2 tinyint," + - "c3 smallint," + - "c4 int," + - "c5 bigint," + - "c6 tinyint unsigned," + - "c7 smallint unsigned," + - "c8 int unsigned," + - "c9 bigint unsigned," + - "c10 float," + - "c11 double," + - "c12 binary(20)," + - "c13 nchar(20)" + - ")") - if err != nil { - panic(err) - } - _, err = db.Exec("insert into example_ws_tmq.t_all values(now,true,2,3,4,5,6,7,8,9,10.123,11.123,'binary','nchar')") - if err != nil { - panic(err) + for { + _, err = db.Exec("insert into example_ws_tmq.t_all values(now,true,2,3,4,5,6,7,8,9,10.123,11.123,'binary','nchar')") + if err != nil { + panic(err) + } + time.Sleep(time.Millisecond * 100) } + }() for i := 0; i < 5; i++ { ev := consumer.Poll(500) diff --git a/docs/en/14-reference/03-connector/06-rust.mdx b/docs/en/14-reference/03-connector/06-rust.mdx index a98683d43c..5a44b161cb 100644 --- a/docs/en/14-reference/03-connector/06-rust.mdx +++ b/docs/en/14-reference/03-connector/06-rust.mdx @@ -442,7 +442,7 @@ The following parameters can be configured for the TMQ DSN. Only `group.id` is m - `group.id`: Within a consumer group, load balancing is implemented by consuming messages on an at-least-once basis. - `client.id`: Subscriber client ID. -- `auto.offset.reset`: Initial point of subscription. *earliest* subscribes from the beginning, and *latest* subscribes from the newest message. The default is earliest. Note: This parameter is set per consumer group. +- `auto.offset.reset`: Initial point of subscription. *earliest* subscribes from the beginning, and *latest* subscribes from the newest message. The default value varies depending on the TDengine version. For details, see [Data Subscription](https://docs.tdengine.com/develop/tmq/). Note: This parameter is set per consumer group. - `enable.auto.commit`: Automatically commits. This can be enabled when data consistency is not essential. - `auto.commit.interval.ms`: Interval for automatic commits. diff --git a/docs/en/14-reference/12-config/index.md b/docs/en/14-reference/12-config/index.md index 011db81b92..ac2364a65d 100755 --- a/docs/en/14-reference/12-config/index.md +++ b/docs/en/14-reference/12-config/index.md @@ -652,6 +652,15 @@ The charset that takes effect is UTF-8. | Type | String | | Default Value | None | +### smlAutoChildTableNameDelimiter + +| Attribute | Description | +| ------------- | ------------------------------------------ | +| Applicable | Client only | +| Meaning | Delimiter between tags as table name| +| Type | String | +| Default Value | None | + ### smlTagName | Attribute | Description | diff --git a/docs/en/14-reference/13-schemaless/13-schemaless.md b/docs/en/14-reference/13-schemaless/13-schemaless.md index d4b6606ac5..11d3c0d0ab 100644 --- a/docs/en/14-reference/13-schemaless/13-schemaless.md +++ b/docs/en/14-reference/13-schemaless/13-schemaless.md @@ -93,6 +93,8 @@ Note that tag_key1, tag_key2 are not the original order of the tags entered by t 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. ::: +If you do not want to use an automatically generated table name, there are two ways to specify sub table names, the first one has a higher priority. +You can configure smlAutoChildTableNameDelimiter in taos.cfg, for example, `smlAutoChildTableNameDelimiter=tname`. You can insert `st,t0=cpul,t1=4 c1=3 1626006833639000000` and the table name will be cpu1-4. 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. diff --git a/docs/en/28-releases/01-tdengine.md b/docs/en/28-releases/01-tdengine.md index 6f863d8c25..e43cd638f6 100644 --- a/docs/en/28-releases/01-tdengine.md +++ b/docs/en/28-releases/01-tdengine.md @@ -10,6 +10,10 @@ For TDengine 2.x installation packages by version, please visit [here](https://t import Release from "/components/ReleaseV3"; +## 3.2.0.0 + + + ## 3.1.1.0 diff --git a/docs/examples/go/sub/main.go b/docs/examples/go/sub/main.go index ed335cfdea..41cb33e94d 100644 --- a/docs/examples/go/sub/main.go +++ b/docs/examples/go/sub/main.go @@ -3,6 +3,7 @@ package main import ( "fmt" "os" + "time" "github.com/taosdata/driver-go/v3/af" "github.com/taosdata/driver-go/v3/af/tmq" @@ -27,15 +28,15 @@ func main() { panic(err) } consumer, err := tmq.NewConsumer(&tmqcommon.ConfigMap{ - "group.id": "test", - "auto.offset.reset": "earliest", - "td.connect.ip": "127.0.0.1", - "td.connect.user": "root", - "td.connect.pass": "taosdata", - "td.connect.port": "6030", - "client.id": "test_tmq_client", - "enable.auto.commit": "false", - "msg.with.table.name": "true", + "group.id": "test", + "auto.offset.reset": "latest", + "td.connect.ip": "127.0.0.1", + "td.connect.user": "root", + "td.connect.pass": "taosdata", + "td.connect.port": "6030", + "client.id": "test_tmq_client", + "enable.auto.commit": "false", + "msg.with.table.name": "true", }) if err != nil { panic(err) @@ -48,12 +49,17 @@ func main() { if err != nil { panic(err) } - _, err = db.Exec("insert into example_tmq.t1 values(now,1)") - if err != nil { - panic(err) - } + go func() { + for { + _, err = db.Exec("insert into example_tmq.t1 values(now,1)") + if err != nil { + panic(err) + } + time.Sleep(time.Microsecond * 100) + } + }() for i := 0; i < 5; i++ { - ev := consumer.Poll(0) + ev := consumer.Poll(500) if ev != nil { switch e := ev.(type) { case *tmqcommon.DataMessage: diff --git a/docs/zh/07-develop/03-insert-data/30-influxdb-line.mdx b/docs/zh/07-develop/03-insert-data/30-influxdb-line.mdx index eb17386fd0..ed84f05fef 100644 --- a/docs/zh/07-develop/03-insert-data/30-influxdb-line.mdx +++ b/docs/zh/07-develop/03-insert-data/30-influxdb-line.mdx @@ -38,7 +38,10 @@ meters,location=California.LosAngeles,groupid=2 current=13.4,voltage=223,phase=0 - field_set 中的每个数据项都需要对自身的数据类型进行描述, 比如 1.2f32 代表 FLOAT 类型的数值 1.2, 如果不带类型后缀会被当作 DOUBLE 处理 - timestamp 支持多种时间精度。写入数据的时候需要用参数指定时间精度,支持从小时到纳秒的 6 种时间精度 - 为了提高写入的效率,默认假设同一个超级表中 field_set 的顺序是一样的(第一条数据包含所有的 field,后面的数据按照这个顺序),如果顺序不一样,需要配置参数 smlDataFormat 为 false,否则,数据写入按照相同顺序写入,库中数据会异常。(3.0.1.3 之后的版本 smlDataFormat 默认为 false,从3.0.3.0开始,该配置废弃) [TDengine 无模式写入参考指南](/reference/schemaless/#无模式写入行协议) -- 默认产生的子表名是根据规则生成的唯一 ID 值。用户也可以通过在client端的 taos.cfg 里配置 smlChildTableName 参数来指定某个标签值作为子表名。该标签值应该具有全局唯一性。举例如下:假设有个标签名为tname, 配置 smlChildTableName=tname, 插入数据为 st,tname=cpu1,t1=4 c1=3 1626006833639000000 则创建的子表名为 cpu1。注意如果多行数据 tname 相同,但是后面的 tag_set 不同,则使用第一行自动建表时指定的 tag_set,其他的行会忽略)。[TDengine 无模式写入参考指南](/reference/schemaless/#无模式写入行协议) +- 子表名生成规则 + - 默认产生的子表名是根据规则生成的唯一 ID 值。 + - 用户也可以通过在client端的 taos.cfg 里配置 smlAutoChildTableNameDelimiter 参数来指定连接标签之间的分隔符,连接起来后作为子表名。举例如下:配置 smlAutoChildTableNameDelimiter=-, 插入数据为 st,t0=cpu1,t1=4 c1=3 1626006833639000000 则创建的子表名为 cpu1-4。 + - 用户也可以通过在client端的 taos.cfg 里配置 smlChildTableName 参数来指定某个标签值作为子表名。该标签值应该具有全局唯一性。举例如下:假设有个标签名为tname, 配置 smlChildTableName=tname, 插入数据为 st,tname=cpu1,t1=4 c1=3 1626006833639000000 则创建的子表名为 cpu1。注意如果多行数据 tname 相同,但是后面的 tag_set 不同,则使用第一行自动建表时指定的 tag_set,其他的行会忽略)。[TDengine 无模式写入参考指南](/reference/schemaless/#无模式写入行协议) ::: diff --git a/docs/zh/07-develop/03-insert-data/40-opentsdb-telnet.mdx b/docs/zh/07-develop/03-insert-data/40-opentsdb-telnet.mdx index 97cb0d4a11..195f3a31f4 100644 --- a/docs/zh/07-develop/03-insert-data/40-opentsdb-telnet.mdx +++ b/docs/zh/07-develop/03-insert-data/40-opentsdb-telnet.mdx @@ -31,8 +31,11 @@ OpenTSDB 行协议同样采用一行字符串来表示一行数据。OpenTSDB ```txt meters.current 1648432611250 11.3 location=California.LosAngeles groupid=3 ``` +- 子表名生成规则 + - 默认产生的子表名是根据规则生成的唯一 ID 值。 + - 用户也可以通过在client端的 taos.cfg 里配置 smlAutoChildTableNameDelimiter 参数来指定连接标签之间的分隔符,连接起来后作为子表名。举例如下:配置 smlAutoChildTableNameDelimiter=-, 插入数据为 st,t0=cpu1,t1=4 c1=3 1626006833639000000 则创建的子表名为 cpu1-4。 + - 用户也可以通过在client端的 taos.cfg 里配置 smlChildTableName 参数来指定某个标签值作为子表名。该标签值应该具有全局唯一性。举例如下:假设有个标签名为tname, 配置 smlChildTableName=tname, 插入数据为 st,tname=cpu1,t1=4 c1=3 1626006833639000000 则创建的子表名为 cpu1。注意如果多行数据 tname 相同,但是后面的 tag_set 不同,则使用第一行自动建表时指定的 tag_set,其他的行会忽略)。[TDengine 无模式写入参考指南](/reference/schemaless/#无模式写入行协议) -- 默认生产的子表名是根据规则生成的唯一 ID 值。用户也可以通过在client端的 taos.cfg 里配置 smlChildTableName 参数来指定某个标签值作为子表名。该标签值应该具有全局唯一性。举例如下:假设有个标签名为tname, 配置 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)。 ## 示例代码 diff --git a/docs/zh/07-develop/03-insert-data/50-opentsdb-json.mdx b/docs/zh/07-develop/03-insert-data/50-opentsdb-json.mdx index a63579bb2c..ce8d5b0caa 100644 --- a/docs/zh/07-develop/03-insert-data/50-opentsdb-json.mdx +++ b/docs/zh/07-develop/03-insert-data/50-opentsdb-json.mdx @@ -47,7 +47,10 @@ OpenTSDB JSON 格式协议采用一个 JSON 字符串表示一行或多行数据 :::note - 对于 JSON 格式协议,TDengine 并不会自动把所有标签转成 NCHAR 类型, 字符串将将转为 NCHAR 类型, 数值将同样转换为 DOUBLE 类型。 -- 默认生成的子表名是根据规则生成的唯一 ID 值。用户也可以通过在client端的 taos.cfg 里配置 smlChildTableName 参数来指定某个标签值作为子表名。该标签值应该具有全局唯一性。举例如下:假设有个标签名为tname, 配置 smlChildTableName=tname, 插入数据为 `"tags": { "host": "web02","dc": "lga","tname":"cpu1"}` 则创建的子表名为 cpu1。注意如果多行数据 tname 相同,但是后面的 tag_set 不同,则使用第一行自动建表时指定的 tag_set,其他的行会忽略)。 +- 子表名生成规则 + - 默认产生的子表名是根据规则生成的唯一 ID 值。 + - 用户也可以通过在client端的 taos.cfg 里配置 smlAutoChildTableNameDelimiter 参数来指定连接标签之间的分隔符,连接起来后作为子表名。举例如下:配置 smlAutoChildTableNameDelimiter=-, 插入数据为 st,t0=cpu1,t1=4 c1=3 1626006833639000000 则创建的子表名为 cpu1-4。 + - 用户也可以通过在client端的 taos.cfg 里配置 smlChildTableName 参数来指定某个标签值作为子表名。该标签值应该具有全局唯一性。举例如下:假设有个标签名为tname, 配置 smlChildTableName=tname, 插入数据为 st,tname=cpu1,t1=4 c1=3 1626006833639000000 则创建的子表名为 cpu1。注意如果多行数据 tname 相同,但是后面的 tag_set 不同,则使用第一行自动建表时指定的 tag_set,其他的行会忽略)。[TDengine 无模式写入参考指南](/reference/schemaless/#无模式写入行协议) ::: diff --git a/docs/zh/07-develop/07-tmq.md b/docs/zh/07-develop/07-tmq.md index 8e43631c9a..a542c844fe 100644 --- a/docs/zh/07-develop/07-tmq.md +++ b/docs/zh/07-develop/07-tmq.md @@ -355,6 +355,7 @@ CREATE TOPIC topic_name [with meta] AS DATABASE db_name; | `enable.auto.commit` | boolean | 是否启用消费位点自动提交,true: 自动提交,客户端应用无需commit;false:客户端应用需要自行commit | 默认值为 true | | `auto.commit.interval.ms` | integer | 消费记录自动提交消费位点时间间隔,单位为毫秒 | 默认值为 5000 | | `msg.with.table.name` | boolean | 是否允许从消息中解析表名, 不适用于列订阅(列订阅时可将 tbname 作为列写入 subquery 语句)(从3.2.0.0版本该参数废弃,恒为true) |默认关闭 | +| `enable.replay` | boolean | 是否开启数据回放功能 |默认关闭 | 对于不同编程语言,其设置方式如下: @@ -420,7 +421,7 @@ public class MetersDeserializer extends ReferenceDeserializer { ```go conf := &tmq.ConfigMap{ "group.id": "test", - "auto.offset.reset": "earliest", + "auto.offset.reset": "latest", "td.connect.ip": "127.0.0.1", "td.connect.user": "root", "td.connect.pass": "taosdata", @@ -511,7 +512,7 @@ var cfg = new ConsumerConfig GourpId = "TDengine-TMQ-C#", TDConnectUser = "root", TDConnectPasswd = "taosdata", - AutoOffsetReset = "earliest" + AutoOffsetReset = "latest" MsgWithTableName = "true", TDConnectIp = "127.0.0.1", TDConnectPort = "6030" @@ -527,6 +528,24 @@ var consumer = new ConsumerBuilder(cfg).Build(); 上述配置中包括 consumer group ID,如果多个 consumer 指定的 consumer group ID 一样,则自动形成一个 consumer group,共享消费进度。 +数据回放功能说明: +- 订阅增加 replay 功能,按照数据写入的时间回放。 + 比如,如下时间写入三条数据 + ```sql + 2023/09/22 00:00:00.000 + 2023/09/22 00:00:05.000 + 2023/09/22 00:00:08.000 + ``` + 则订阅出第一条数据 5s 后返回第二条数据,获取第二条数据 3s 后返回第三条数据。 +- 仅列订阅支持数据回放 + - 回放需要保证独立时间线 + - 如果是子表订阅或者普通表订阅,只有一个vnode上有数据,保证是一个时间线 + - 如果超级表订阅,则需保证该 DB 只有一个vnode,否则报错(因为多个vnode上订阅出的数据不在一个时间线上) +- 超级表和库订阅不支持回放 +- 增加 enable.replay 参数,true表示开启订阅回放功能,false表示不开启订阅回放功能,默认不开启。 +- 回放不支持进度保存,所以回放参数 enable.replay = true 时,auto commit 自动关闭 +- 因为数据回放本身需要处理时间,所以回放的精度存在几十ms的误差 + ## 订阅 *topics* 一个 consumer 支持同时订阅多个 topic。 diff --git a/docs/zh/08-connector/20-go.mdx b/docs/zh/08-connector/20-go.mdx index 90ef4d83ca..3994278eef 100644 --- a/docs/zh/08-connector/20-go.mdx +++ b/docs/zh/08-connector/20-go.mdx @@ -797,7 +797,7 @@ TDengine Go 连接器支持订阅功能,应用 API 如下: ```go consumer, err := tmq.NewConsumer(&tmqcommon.ConfigMap{ "group.id": "test", - "auto.offset.reset": "earliest", + "auto.offset.reset": "latest", "td.connect.ip": "127.0.0.1", "td.connect.user": "root", "td.connect.pass": "taosdata", @@ -873,6 +873,7 @@ package main import ( "fmt" "os" + "time" "github.com/taosdata/driver-go/v3/af" "github.com/taosdata/driver-go/v3/af/tmq" @@ -893,19 +894,16 @@ func main() { if err != nil { panic(err) } - if err != nil { - panic(err) - } consumer, err := tmq.NewConsumer(&tmqcommon.ConfigMap{ - "group.id": "test", - "auto.offset.reset": "earliest", - "td.connect.ip": "127.0.0.1", - "td.connect.user": "root", - "td.connect.pass": "taosdata", - "td.connect.port": "6030", - "client.id": "test_tmq_client", - "enable.auto.commit": "false", - "msg.with.table.name": "true", + "group.id": "test", + "auto.offset.reset": "latest", + "td.connect.ip": "127.0.0.1", + "td.connect.user": "root", + "td.connect.pass": "taosdata", + "td.connect.port": "6030", + "client.id": "test_tmq_client", + "enable.auto.commit": "false", + "msg.with.table.name": "true", }) if err != nil { panic(err) @@ -918,10 +916,16 @@ func main() { if err != nil { panic(err) } - _, err = db.Exec("insert into example_tmq.t1 values(now,1)") - if err != nil { - panic(err) - } + go func() { + for { + _, err = db.Exec("insert into example_tmq.t1 values(now,1)") + if err != nil { + panic(err) + } + time.Sleep(time.Millisecond * 100) + } + }() + for i := 0; i < 5; i++ { ev := consumer.Poll(500) if ev != nil { @@ -975,6 +979,7 @@ package main import ( "database/sql" "fmt" + "time" "github.com/taosdata/driver-go/v3/common" tmqcommon "github.com/taosdata/driver-go/v3/common/tmq" @@ -998,7 +1003,7 @@ func main() { "td.connect.pass": "taosdata", "group.id": "example", "client.id": "example_consumer", - "auto.offset.reset": "earliest", + "auto.offset.reset": "latest", }) if err != nil { panic(err) @@ -1007,29 +1012,34 @@ func main() { if err != nil { panic(err) } + + _, err = db.Exec("create table example_ws_tmq.t_all(ts timestamp," + + "c1 bool," + + "c2 tinyint," + + "c3 smallint," + + "c4 int," + + "c5 bigint," + + "c6 tinyint unsigned," + + "c7 smallint unsigned," + + "c8 int unsigned," + + "c9 bigint unsigned," + + "c10 float," + + "c11 double," + + "c12 binary(20)," + + "c13 nchar(20)" + + ")") + if err != nil { + panic(err) + } go func() { - _, err := db.Exec("create table example_ws_tmq.t_all(ts timestamp," + - "c1 bool," + - "c2 tinyint," + - "c3 smallint," + - "c4 int," + - "c5 bigint," + - "c6 tinyint unsigned," + - "c7 smallint unsigned," + - "c8 int unsigned," + - "c9 bigint unsigned," + - "c10 float," + - "c11 double," + - "c12 binary(20)," + - "c13 nchar(20)" + - ")") - if err != nil { - panic(err) - } - _, err = db.Exec("insert into example_ws_tmq.t_all values(now,true,2,3,4,5,6,7,8,9,10.123,11.123,'binary','nchar')") - if err != nil { - panic(err) + for { + _, err = db.Exec("insert into example_ws_tmq.t_all values(now,true,2,3,4,5,6,7,8,9,10.123,11.123,'binary','nchar')") + if err != nil { + panic(err) + } + time.Sleep(time.Millisecond * 100) } + }() for i := 0; i < 5; i++ { ev := consumer.Poll(500) diff --git a/docs/zh/08-connector/26-rust.mdx b/docs/zh/08-connector/26-rust.mdx index 018552117e..37b1787707 100644 --- a/docs/zh/08-connector/26-rust.mdx +++ b/docs/zh/08-connector/26-rust.mdx @@ -447,7 +447,7 @@ consumer.unsubscribe().await; - `group.id`: 同一个消费者组,将以至少消费一次的方式进行消息负载均衡。 - `client.id`: 可选的订阅客户端识别项。 -- `auto.offset.reset`: 可选初始化订阅起点, *earliest* 为从头开始订阅, *latest* 为仅从最新数据开始订阅,默认为从头订阅。注意,此选项在同一个 `group.id` 中仅生效一次。 +- `auto.offset.reset`: 可选初始化订阅起点, *earliest* 为从头开始订阅, *latest* 为仅从最新数据开始订阅,默认值根据 TDengine 版本有所不同,详细参见 [数据订阅](https://docs.taosdata.com/develop/tmq/)。注意,此选项在同一个 `group.id` 中仅生效一次。 - `enable.auto.commit`: 当设置为 `true` 时,将启用自动标记模式,当对数据一致性不敏感时,可以启用此方式。 - `auto.commit.interval.ms`: 自动标记的时间间隔。 diff --git a/docs/zh/14-reference/12-config/index.md b/docs/zh/14-reference/12-config/index.md index c7323da271..27a9618107 100755 --- a/docs/zh/14-reference/12-config/index.md +++ b/docs/zh/14-reference/12-config/index.md @@ -648,7 +648,16 @@ charset 的有效值是 UTF-8。 | 适用范围 | 仅客户端适用 | | 含义 | schemaless 自定义的子表名的 key | | 类型 | 字符串 | -| 缺省值 | 无 | +| 缺省值 | 无 + +### smlAutoChildTableNameDelimiter + +| 属性 | 说明 | +| -------- | ------------------------------- | +| 适用范围 | 仅客户端适用 | +| 含义 | schemaless tag之间的连接符,连起来作为子表名 | +| 类型 | 字符串 | +| 缺省值 | 无 | ### smlTagName diff --git a/docs/zh/14-reference/13-schemaless/13-schemaless.md b/docs/zh/14-reference/13-schemaless/13-schemaless.md index 969bc8c2ae..084e31d810 100644 --- a/docs/zh/14-reference/13-schemaless/13-schemaless.md +++ b/docs/zh/14-reference/13-schemaless/13-schemaless.md @@ -94,8 +94,11 @@ st,t1=3,t2=4,t3=t3 c1=3i64,c3="passit",c2=false,c4=4f64 1626006833639000000 :::tip 需要注意的是,这里的 tag_key1, tag_key2 并不是用户输入的标签的原始顺序,而是使用了标签名称按照字符串升序排列后的结果。所以,tag_key1 并不是在行协议中输入的第一个标签。 排列完成以后计算该字符串的 MD5 散列值 "md5_val"。然后将计算的结果与字符串组合生成表名:“t_md5_val”。其中的 “t_” 是固定的前缀,每个通过该映射关系自动生成的表都具有该前缀。 -:::tip -为了让用户可以指定生成的表名,可以通过在taos.cfg里配置 smlChildTableName 参数来指定。 +:::tip +如果不想用自动生成的表名,有两种指定子表名的方式,第一种优先级更高: +通过在taos.cfg里配置 smlAutoChildTableNameDelimiter 参数来指定。 +举例如下:配置 smlAutoChildTableNameDelimiter=- 插入数据为 st,t0=cpu1,t1=4 c1=3 1626006833639000000 则创建的表名为 cpu1-4。 +通过在taos.cfg里配置 smlChildTableName 参数来指定。 举例如下:配置 smlChildTableName=tname 插入数据为 st,tname=cpu1,t1=4 c1=3 1626006833639000000 则创建的表名为 cpu1,注意如果多行数据 tname 相同,但是后面的 tag_set 不同,则使用第一行自动建表时指定的 tag_set,其他的行会忽略)。 2. 如果解析行协议获得的超级表不存在,则会创建这个超级表(不建议手动创建超级表,不然插入数据可能异常)。 diff --git a/docs/zh/28-releases/01-tdengine.md b/docs/zh/28-releases/01-tdengine.md index 89bb8aaf8f..5ebf3af1eb 100644 --- a/docs/zh/28-releases/01-tdengine.md +++ b/docs/zh/28-releases/01-tdengine.md @@ -10,6 +10,10 @@ TDengine 2.x 各版本安装包请访问[这里](https://www.taosdata.com/all-do import Release from "/components/ReleaseV3"; +## 3.2.0.0 + + + ## 3.1.1.0 diff --git a/include/common/tglobal.h b/include/common/tglobal.h index 4644c38ec4..c4037ed2ea 100644 --- a/include/common/tglobal.h +++ b/include/common/tglobal.h @@ -179,6 +179,7 @@ extern char tsUdfdLdLibPath[]; // schemaless extern char tsSmlChildTableName[]; +extern char tsSmlAutoChildTableNameDelimiter[]; extern char tsSmlTagName[]; extern bool tsSmlDot2Underline; extern char tsSmlTsDefaultName[]; diff --git a/include/common/tmsg.h b/include/common/tmsg.h index e5545b9ed8..bcf0e40cae 100644 --- a/include/common/tmsg.h +++ b/include/common/tmsg.h @@ -2374,17 +2374,6 @@ int32_t tSerializeSCMCreateStreamReq(void* buf, int32_t bufLen, const SCMCreateS int32_t tDeserializeSCMCreateStreamReq(void* buf, int32_t bufLen, SCMCreateStreamReq* pReq); void tFreeSCMCreateStreamReq(SCMCreateStreamReq* pReq); -typedef struct { - char name[TSDB_STREAM_FNAME_LEN]; - int64_t streamId; - char* sql; - char* executorMsg; -} SMVCreateStreamReq, SMSCreateStreamReq; - -typedef struct { - int64_t streamId; -} SMVCreateStreamRsp, SMSCreateStreamRsp; - enum { TOPIC_SUB_TYPE__DB = 1, TOPIC_SUB_TYPE__TABLE, @@ -2406,16 +2395,9 @@ int32_t tSerializeSCMCreateTopicReq(void* buf, int32_t bufLen, const SCMCreateTo int32_t tDeserializeSCMCreateTopicReq(void* buf, int32_t bufLen, SCMCreateTopicReq* pReq); void tFreeSCMCreateTopicReq(SCMCreateTopicReq* pReq); -typedef struct { - int64_t topicId; -} SCMCreateTopicRsp; - -int32_t tSerializeSCMCreateTopicRsp(void* buf, int32_t bufLen, const SCMCreateTopicRsp* pRsp); -int32_t tDeserializeSCMCreateTopicRsp(void* buf, int32_t bufLen, SCMCreateTopicRsp* pRsp); - typedef struct { int64_t consumerId; -} SMqConsumerLostMsg, SMqConsumerRecoverMsg, SMqConsumerClearMsg; +} SMqConsumerRecoverMsg, SMqConsumerClearMsg; typedef struct { int64_t consumerId; @@ -2427,6 +2409,7 @@ typedef struct { int8_t autoCommit; int32_t autoCommitInterval; int8_t resetOffsetCfg; + int8_t enableReplay; } SCMSubscribeReq; static FORCE_INLINE int32_t tSerializeSCMSubscribeReq(void** buf, const SCMSubscribeReq* pReq) { @@ -2446,6 +2429,7 @@ static FORCE_INLINE int32_t tSerializeSCMSubscribeReq(void** buf, const SCMSubsc tlen += taosEncodeFixedI8(buf, pReq->autoCommit); tlen += taosEncodeFixedI32(buf, pReq->autoCommitInterval); tlen += taosEncodeFixedI8(buf, pReq->resetOffsetCfg); + tlen += taosEncodeFixedI8(buf, pReq->enableReplay); return tlen; } @@ -2469,71 +2453,7 @@ static FORCE_INLINE void* tDeserializeSCMSubscribeReq(void* buf, SCMSubscribeReq buf = taosDecodeFixedI8(buf, &pReq->autoCommit); buf = taosDecodeFixedI32(buf, &pReq->autoCommitInterval); buf = taosDecodeFixedI8(buf, &pReq->resetOffsetCfg); - return buf; -} - -typedef struct SMqSubTopic { - int32_t vgId; - int64_t topicId; - SEpSet epSet; -} SMqSubTopic; - -typedef struct { - int32_t topicNum; - SMqSubTopic topics[]; -} SCMSubscribeRsp; - -static FORCE_INLINE int32_t tSerializeSCMSubscribeRsp(void** buf, const SCMSubscribeRsp* pRsp) { - int32_t tlen = 0; - tlen += taosEncodeFixedI32(buf, pRsp->topicNum); - for (int32_t i = 0; i < pRsp->topicNum; i++) { - tlen += taosEncodeFixedI32(buf, pRsp->topics[i].vgId); - tlen += taosEncodeFixedI64(buf, pRsp->topics[i].topicId); - tlen += taosEncodeSEpSet(buf, &pRsp->topics[i].epSet); - } - return tlen; -} - -static FORCE_INLINE void* tDeserializeSCMSubscribeRsp(void* buf, SCMSubscribeRsp* pRsp) { - buf = taosDecodeFixedI32(buf, &pRsp->topicNum); - for (int32_t i = 0; i < pRsp->topicNum; i++) { - buf = taosDecodeFixedI32(buf, &pRsp->topics[i].vgId); - buf = taosDecodeFixedI64(buf, &pRsp->topics[i].topicId); - buf = taosDecodeSEpSet(buf, &pRsp->topics[i].epSet); - } - return buf; -} - -typedef struct { - int64_t topicId; - int64_t consumerId; - int64_t consumerGroupId; - int64_t offset; - char* sql; - char* logicalPlan; - char* physicalPlan; -} SMVSubscribeReq; - -static FORCE_INLINE int32_t tSerializeSMVSubscribeReq(void** buf, SMVSubscribeReq* pReq) { - int32_t tlen = 0; - tlen += taosEncodeFixedI64(buf, pReq->topicId); - tlen += taosEncodeFixedI64(buf, pReq->consumerId); - tlen += taosEncodeFixedI64(buf, pReq->consumerGroupId); - tlen += taosEncodeFixedI64(buf, pReq->offset); - tlen += taosEncodeString(buf, pReq->sql); - tlen += taosEncodeString(buf, pReq->logicalPlan); - tlen += taosEncodeString(buf, pReq->physicalPlan); - return tlen; -} - -static FORCE_INLINE void* tDeserializeSMVSubscribeReq(void* buf, SMVSubscribeReq* pReq) { - buf = taosDecodeFixedI64(buf, &pReq->topicId); - buf = taosDecodeFixedI64(buf, &pReq->consumerId); - buf = taosDecodeFixedI64(buf, &pReq->consumerGroupId); - buf = taosDecodeFixedI64(buf, &pReq->offset); - buf = taosDecodeString(buf, &pReq->sql); - buf = taosDecodeString(buf, &pReq->logicalPlan); - buf = taosDecodeString(buf, &pReq->physicalPlan); + buf = taosDecodeFixedI8(buf, &pReq->enableReplay); return buf; } @@ -3629,6 +3549,7 @@ typedef struct { int64_t consumerId; int64_t timeout; STqOffsetVal reqOffset; + int8_t enableReplay; } SMqPollReq; int32_t tSerializeSMqPollReq(void* buf, int32_t bufLen, SMqPollReq* pReq); @@ -3688,6 +3609,7 @@ typedef struct { SArray* blockData; SArray* blockTbName; SArray* blockSchema; + int64_t sleepTime; } SMqDataRsp; int32_t tEncodeMqDataRsp(SEncoder* pEncoder, const SMqDataRsp* pRsp); diff --git a/include/common/ttokendef.h b/include/common/ttokendef.h index 262d051ab5..d4fc377375 100644 --- a/include/common/ttokendef.h +++ b/include/common/ttokendef.h @@ -368,6 +368,7 @@ + #define TK_NK_SPACE 600 #define TK_NK_COMMENT 601 #define TK_NK_ILLEGAL 602 diff --git a/include/libs/executor/storageapi.h b/include/libs/executor/storageapi.h index dbcd682dab..f5392f02b1 100644 --- a/include/libs/executor/storageapi.h +++ b/include/libs/executor/storageapi.h @@ -227,6 +227,7 @@ typedef struct SStoreTqReader { bool (*tqReaderNextBlockInWal)(); bool (*tqNextBlockImpl)(); // todo remove it SSDataBlock* (*tqGetResultBlock)(); + int64_t (*tqGetResultBlockTime)(); void (*tqReaderSetColIdList)(); int32_t (*tqReaderSetQueryTableList)(); diff --git a/include/libs/nodes/querynodes.h b/include/libs/nodes/querynodes.h index a0601895af..77e6e2e792 100644 --- a/include/libs/nodes/querynodes.h +++ b/include/libs/nodes/querynodes.h @@ -35,6 +35,7 @@ typedef struct SRawExprNode { char* p; uint32_t n; SNode* pNode; + bool isPseudoColumn; } SRawExprNode; typedef struct SDataType { diff --git a/include/libs/stream/tstreamFileState.h b/include/libs/stream/tstreamFileState.h index 2b567a7370..c1974df7de 100644 --- a/include/libs/stream/tstreamFileState.h +++ b/include/libs/stream/tstreamFileState.h @@ -79,6 +79,9 @@ int32_t getSessionFlushedBuff(SStreamFileState* pFileState, SSessionKey* pKey, v int32_t deleteSessionWinStateBuffFn(void* pBuff, const void *key, size_t keyLen); int32_t deleteSessionWinStateBuffByPosFn(SStreamFileState* pFileState, SRowBuffPos* pPos); +SRowBuffPos* createSessionWinBuff(SStreamFileState* pFileState, SSessionKey* pKey, void* p, int32_t* pVLen); +int32_t recoverSesssion(SStreamFileState* pFileState, int64_t ckId); + void sessionWinStateClear(SStreamFileState* pFileState); void sessionWinStateCleanup(void* pBuff); diff --git a/include/util/taoserror.h b/include/util/taoserror.h index 07809eb311..0885802ee8 100644 --- a/include/util/taoserror.h +++ b/include/util/taoserror.h @@ -810,6 +810,8 @@ int32_t* taosGetErrno(); #define TSDB_CODE_TMQ_NEED_INITIALIZED TAOS_DEF_ERROR_CODE(0, 0x4010) #define TSDB_CODE_TMQ_NO_COMMITTED TAOS_DEF_ERROR_CODE(0, 0x4011) #define TSDB_CODE_TMQ_SAME_COMMITTED_VALUE TAOS_DEF_ERROR_CODE(0, 0x4012) +#define TSDB_CODE_TMQ_REPLAY_NEED_ONE_VGROUP TAOS_DEF_ERROR_CODE(0, 0x4013) +#define TSDB_CODE_TMQ_REPLAY_NOT_SUPPORT TAOS_DEF_ERROR_CODE(0, 0x4014) // stream #define TSDB_CODE_STREAM_TASK_NOT_EXIST TAOS_DEF_ERROR_CODE(0, 0x4100) diff --git a/include/util/tbloomfilter.h b/include/util/tbloomfilter.h index 16f7ff7958..23bf5aaafb 100644 --- a/include/util/tbloomfilter.h +++ b/include/util/tbloomfilter.h @@ -24,6 +24,9 @@ extern "C" { #endif +#define HASH_FUNCTION_1 taosFastHash +#define HASH_FUNCTION_2 taosDJB2Hash + typedef struct SBloomFilter { uint32_t hashFunctions; uint64_t expectedEntries; @@ -37,8 +40,9 @@ typedef struct SBloomFilter { } SBloomFilter; SBloomFilter *tBloomFilterInit(uint64_t expectedEntries, double errorRate); +int32_t tBloomFilterPutHash(SBloomFilter *pBF, uint64_t hash1, uint64_t hash2); int32_t tBloomFilterPut(SBloomFilter *pBF, const void *keyBuf, uint32_t len); -int32_t tBloomFilterNoContain(const SBloomFilter *pBF, const void *keyBuf, uint32_t len); +int32_t tBloomFilterNoContain(const SBloomFilter *pBF, uint64_t h1, uint64_t h2); void tBloomFilterDestroy(SBloomFilter *pBF); void tBloomFilterDump(const SBloomFilter *pBF); bool tBloomFilterIsFull(const SBloomFilter *pBF); diff --git a/include/util/tscalablebf.h b/include/util/tscalablebf.h index 9977c1436d..2cf170cf04 100644 --- a/include/util/tscalablebf.h +++ b/include/util/tscalablebf.h @@ -26,9 +26,12 @@ typedef struct SScalableBf { SArray *bfArray; // array of bloom filters uint32_t growth; uint64_t numBits; + _hash_fn_t hashFn1; + _hash_fn_t hashFn2; } SScalableBf; SScalableBf *tScalableBfInit(uint64_t expectedEntries, double errorRate); +int32_t tScalableBfPutNoCheck(SScalableBf *pSBf, const void *keyBuf, uint32_t len); int32_t tScalableBfPut(SScalableBf *pSBf, const void *keyBuf, uint32_t len); int32_t tScalableBfNoContain(const SScalableBf *pSBf, const void *keyBuf, uint32_t len); void tScalableBfDestroy(SScalableBf *pSBf); diff --git a/source/client/src/clientEnv.c b/source/client/src/clientEnv.c index dbddf9cac6..98782f74aa 100644 --- a/source/client/src/clientEnv.c +++ b/source/client/src/clientEnv.c @@ -719,6 +719,21 @@ int taos_init() { int taos_options_imp(TSDB_OPTION option, const char *str) { if (option == TSDB_OPTION_CONFIGDIR) { +#ifndef WINDOWS + char newstr[PATH_MAX]; + int len = strlen(str); + if (len > 1 && str[0] != '"' && str[0] != '\'') { + if (len + 2 >= PATH_MAX) { + tscError("Too long path %s", str); + return -1; + } + newstr[0] = '"'; + strncpy(newstr+1, str, len); + newstr[len + 1] = '"'; + newstr[len + 2] = '\0'; + str = newstr; + } +#endif tstrncpy(configDir, str, PATH_MAX); tscInfo("set cfg:%s to %s", configDir, str); return 0; diff --git a/source/client/src/clientSml.c b/source/client/src/clientSml.c index 71561419d7..6ab0bfc563 100644 --- a/source/client/src/clientSml.c +++ b/source/client/src/clientSml.c @@ -193,20 +193,46 @@ cleanup: } static int32_t smlParseTableName(SArray *tags, char *childTableName) { - size_t childTableNameLen = strlen(tsSmlChildTableName); - if (childTableNameLen <= 0) return TSDB_CODE_SUCCESS; - - for (int i = 0; i < taosArrayGetSize(tags); i++) { - SSmlKv *tag = (SSmlKv *)taosArrayGet(tags, i); - // handle child table name - if (childTableNameLen == tag->keyLen && strncmp(tag->key, tsSmlChildTableName, tag->keyLen) == 0) { - memset(childTableName, 0, TSDB_TABLE_NAME_LEN); - strncpy(childTableName, tag->value, (tag->length < TSDB_TABLE_NAME_LEN ? tag->length : TSDB_TABLE_NAME_LEN)); - if(tsSmlDot2Underline){ - smlStrReplace(childTableName, strlen(childTableName)); + bool autoChildName = false; + size_t delimiter = strlen(tsSmlAutoChildTableNameDelimiter); + if(delimiter > 0){ + size_t totalNameLen = delimiter * (taosArrayGetSize(tags) - 1); + for (int i = 0; i < taosArrayGetSize(tags); i++) { + SSmlKv *tag = (SSmlKv *)taosArrayGet(tags, i); + totalNameLen += tag->length; + } + if(totalNameLen < TSDB_TABLE_NAME_LEN){ + autoChildName = true; + } + } + if(autoChildName){ + memset(childTableName, 0, TSDB_TABLE_NAME_LEN); + for (int i = 0; i < taosArrayGetSize(tags); i++) { + SSmlKv *tag = (SSmlKv *)taosArrayGet(tags, i); + strncat(childTableName, tag->value, tag->length); + if(i != taosArrayGetSize(tags) - 1){ + strcat(childTableName, tsSmlAutoChildTableNameDelimiter); + } + } + if(tsSmlDot2Underline){ + smlStrReplace(childTableName, strlen(childTableName)); + } + }else{ + size_t childTableNameLen = strlen(tsSmlChildTableName); + if (childTableNameLen <= 0) return TSDB_CODE_SUCCESS; + + for (int i = 0; i < taosArrayGetSize(tags); i++) { + SSmlKv *tag = (SSmlKv *)taosArrayGet(tags, i); + // handle child table name + if (childTableNameLen == tag->keyLen && strncmp(tag->key, tsSmlChildTableName, tag->keyLen) == 0) { + memset(childTableName, 0, TSDB_TABLE_NAME_LEN); + strncpy(childTableName, tag->value, (tag->length < TSDB_TABLE_NAME_LEN ? tag->length : TSDB_TABLE_NAME_LEN)); + if(tsSmlDot2Underline){ + smlStrReplace(childTableName, strlen(childTableName)); + } + taosArrayRemove(tags, i); + break; } - taosArrayRemove(tags, i); - break; } } diff --git a/source/client/src/clientSmlJson.c b/source/client/src/clientSmlJson.c index 167638ab69..5e656c71a7 100644 --- a/source/client/src/clientSmlJson.c +++ b/source/client/src/clientSmlJson.c @@ -853,7 +853,6 @@ static int64_t smlParseTSFromJSONObj(SSmlHandle *info, cJSON *root, int32_t toPr size_t typeLen = strlen(type->valuestring); if (typeLen == 1 && (type->valuestring[0] == 's' || type->valuestring[0] == 'S')) { // seconds -// int8_t fromPrecision = TSDB_TIME_PRECISION_SECONDS; if (smlFactorS[toPrecision] < INT64_MAX / tsInt64) { return tsInt64 * smlFactorS[toPrecision]; } diff --git a/source/client/src/clientTmq.c b/source/client/src/clientTmq.c index e998db989c..23b89286f6 100644 --- a/source/client/src/clientTmq.c +++ b/source/client/src/clientTmq.c @@ -62,7 +62,7 @@ struct tmq_conf_t { int8_t resetOffset; int8_t withTbName; int8_t snapEnable; -// int32_t snapBatchSize; + int8_t replayEnable; uint16_t port; int32_t autoCommitInterval; char* ip; @@ -81,6 +81,7 @@ struct tmq_t { int8_t autoCommit; int32_t autoCommitInterval; int8_t resetOffsetCfg; + int8_t replayEnable; uint64_t consumerId; tmq_commit_cb* commitCb; void* commitCbUserParam; @@ -89,19 +90,13 @@ struct tmq_t { SRWLatch lock; int8_t status; int32_t epoch; -#if 0 - int8_t epStatus; - int32_t epSkipCnt; -#endif // poll info int64_t pollCnt; int64_t totalRows; -// bool needReportOffsetRows; // timer tmr_h hbLiveTimer; tmr_h epTimer; - tmr_h reportTimer; tmr_h commitTimer; STscObj* pTscObj; // connection SArray* clientTopics; // SArray @@ -149,6 +144,8 @@ typedef struct { int32_t vgStatus; int32_t vgSkipCnt; // here used to mark the slow vgroups int64_t emptyBlockReceiveTs; // once empty block is received, idle for ignoreCnt then start to poll data + int64_t blockReceiveTs; // once empty block is received, idle for ignoreCnt then start to poll data + int64_t blockSleepForReplay; // once empty block is received, idle for ignoreCnt then start to poll data bool seekUpdated; // offset is updated by seek operator, therefore, not update by vnode rsp. SEpSet epSet; } SMqClientVg; @@ -356,24 +353,6 @@ tmq_conf_res_t tmq_conf_set(tmq_conf_t* conf, const char* key, const char* value } } -// if (strcasecmp(key, "experimental.snapshot.batch.size") == 0) { -// conf->snapBatchSize = taosStr2int64(value); -// return TMQ_CONF_OK; -// } - -// if (strcasecmp(key, "enable.heartbeat.background") == 0) { - // if (strcasecmp(value, "true") == 0) { - // conf->hbBgEnable = true; - // return TMQ_CONF_OK; - // } else if (strcasecmp(value, "false") == 0) { - // conf->hbBgEnable = false; - // return TMQ_CONF_OK; - // } else { -// tscError("the default value of enable.heartbeat.background is true, can not be seted"); -// return TMQ_CONF_INVALID; - // } -// } - if (strcasecmp(key, "td.connect.ip") == 0) { conf->ip = taosStrdup(value); return TMQ_CONF_OK; @@ -394,6 +373,18 @@ tmq_conf_res_t tmq_conf_set(tmq_conf_t* conf, const char* key, const char* value return TMQ_CONF_OK; } + if (strcasecmp(key, "enable.replay") == 0) { + if (strcasecmp(value, "true") == 0) { + conf->replayEnable = true; + return TMQ_CONF_OK; + } else if (strcasecmp(value, "false") == 0) { + conf->replayEnable = false; + return TMQ_CONF_OK; + } else { + return TMQ_CONF_INVALID; + } + } + if (strcasecmp(key, "td.connect.db") == 0) { return TMQ_CONF_OK; } @@ -729,6 +720,17 @@ void tmqAssignAskEpTask(void* param, void* tmrId) { taosMemoryFree(param); } +void tmqReplayTask(void* param, void* tmrId) { + int64_t refId = *(int64_t*)param; + tmq_t* tmq = taosAcquireRef(tmqMgmt.rsetId, refId); + if(tmq == NULL) goto END; + + tsem_post(&tmq->rspSem); + taosReleaseRef(tmqMgmt.rsetId, refId); +END: + taosMemoryFree(param); +} + void tmqAssignDelayedCommitTask(void* param, void* tmrId) { int64_t refId = *(int64_t*)param; generateTimedTask(refId, TMQ_DELAYED_TASK__COMMIT); @@ -1071,6 +1073,10 @@ tmq_t* tmq_consumer_new(tmq_conf_t* conf, char* errstr, int32_t errstrLen) { pTmq->commitCb = conf->commitCb; pTmq->commitCbUserParam = conf->commitCbUserParam; pTmq->resetOffsetCfg = conf->resetOffset; + pTmq->replayEnable = conf->replayEnable; + if(conf->replayEnable){ + pTmq->autoCommit = false; + } taosInitRWLatch(&pTmq->lock); // assign consumerId @@ -1140,6 +1146,7 @@ int32_t tmq_subscribe(tmq_t* tmq, const tmq_list_t* topic_list) { req.autoCommit = tmq->autoCommit; req.autoCommitInterval = tmq->autoCommitInterval; req.resetOffsetCfg = tmq->resetOffsetCfg; + req.enableReplay = tmq->replayEnable; for (int32_t i = 0; i < sz; i++) { char* topic = taosArrayGetP(container, i); @@ -1415,6 +1422,8 @@ static void initClientTopicFromRsp(SMqClientTopic* pTopic, SMqSubTopicEp* pTopic .vgStatus = pInfo ? pInfo->vgStatus : TMQ_VG_STATUS__IDLE, .vgSkipCnt = 0, .emptyBlockReceiveTs = 0, + .blockReceiveTs = 0, + .blockSleepForReplay = 0, .numOfRows = pInfo ? pInfo->numOfRows : 0, }; @@ -1526,6 +1535,7 @@ void tmqBuildConsumeReqImpl(SMqPollReq* pReq, tmq_t* tmq, int64_t timeout, SMqCl pReq->head.vgId = pVg->vgId; pReq->useSnapshot = tmq->useSnapshot; pReq->reqId = generateRequestId(); + pReq->enableReplay = tmq->replayEnable; } SMqMetaRspObj* tmqBuildMetaRspFromWrapper(SMqPollRspWrapper* pWrapper) { @@ -1686,6 +1696,12 @@ static int32_t tmqPollImpl(tmq_t* tmq, int64_t timeout) { continue; } + if (tmq->replayEnable && taosGetTimestampMs() - pVg->blockReceiveTs < pVg->blockSleepForReplay) { // less than 10ms + tscTrace("consumer:0x%" PRIx64 " epoch %d, vgId:%d idle for %" PRId64 "ms before start next poll when replay", tmq->consumerId, + tmq->epoch, pVg->vgId, pVg->blockSleepForReplay); + continue; + } + int32_t vgStatus = atomic_val_compare_exchange_32(&pVg->vgStatus, TMQ_VG_STATUS__IDLE, TMQ_VG_STATUS__WAIT); if (vgStatus == TMQ_VG_STATUS__WAIT) { int32_t vgSkipCnt = atomic_add_fetch_32(&pVg->vgSkipCnt, 1); @@ -1807,6 +1823,15 @@ static void* tmqHandleAllRsp(tmq_t* tmq, int64_t timeout) { SMqRspObj* pRsp = tmqBuildRspFromWrapper(pollRspWrapper, pVg, &numOfRows); tmq->totalRows += numOfRows; pVg->emptyBlockReceiveTs = 0; + if(tmq->replayEnable){ + pVg->blockReceiveTs = taosGetTimestampMs(); + pVg->blockSleepForReplay = pRsp->rsp.sleepTime; + if(pVg->blockSleepForReplay > 0){ + int64_t* pRefId1 = taosMemoryMalloc(sizeof(int64_t)); + *pRefId1 = tmq->refId; + taosTmrStart(tmqReplayTask, pVg->blockSleepForReplay, pRefId1, tmqMgmt.timer); + } + } tscDebug("consumer:0x%" PRIx64 " process poll rsp, vgId:%d, offset:%s, blocks:%d, rows:%" PRId64 ", vg total:%" PRId64 ", total:%" PRId64 ", reqId:0x%" PRIx64, tmq->consumerId, pVg->vgId, buf, pDataRsp->blockNum, numOfRows, pVg->numOfRows, tmq->totalRows, diff --git a/source/common/src/tglobal.c b/source/common/src/tglobal.c index 3d7b38161a..ed1776dc45 100644 --- a/source/common/src/tglobal.c +++ b/source/common/src/tglobal.c @@ -118,7 +118,8 @@ bool tsSmlDot2Underline = true; char tsSmlTsDefaultName[TSDB_COL_NAME_LEN] = "_ts"; 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. +char tsSmlAutoChildTableNameDelimiter[TSDB_TABLE_NAME_LEN] = ""; + // If set to empty system will generate table name using MD5 hash. // true means that the name and order of cols in each line are the same(only for influx protocol) // bool tsSmlDataFormat = false; // int32_t tsSmlBatchSize = 10000; @@ -439,7 +440,8 @@ static int32_t taosAddClientCfg(SConfig *pCfg) { if (cfgAddInt32(pCfg, "queryNodeChunkSize", tsQueryNodeChunkSize, 1024, 128 * 1024, CFG_SCOPE_CLIENT) != 0) return -1; if (cfgAddBool(pCfg, "queryUseNodeAllocator", tsQueryUseNodeAllocator, CFG_SCOPE_CLIENT) != 0) return -1; if (cfgAddBool(pCfg, "keepColumnName", tsKeepColumnName, CFG_SCOPE_CLIENT) != 0) return -1; - if (cfgAddString(pCfg, "smlChildTableName", "", CFG_SCOPE_CLIENT) != 0) return -1; + if (cfgAddString(pCfg, "smlChildTableName", tsSmlChildTableName, CFG_SCOPE_CLIENT) != 0) return -1; + if (cfgAddString(pCfg, "smlAutoChildTableNameDelimiter", tsSmlAutoChildTableNameDelimiter, CFG_SCOPE_CLIENT) != 0) return -1; if (cfgAddString(pCfg, "smlTagName", tsSmlTagName, CFG_SCOPE_CLIENT) != 0) return -1; if (cfgAddString(pCfg, "smlTsDefaultName", tsSmlTsDefaultName, CFG_SCOPE_CLIENT) != 0) return -1; if (cfgAddBool(pCfg, "smlDot2Underline", tsSmlDot2Underline, CFG_SCOPE_CLIENT) != 0) return -1; @@ -931,6 +933,7 @@ static int32_t taosSetClientCfg(SConfig *pCfg) { return -1; } + tstrncpy(tsSmlAutoChildTableNameDelimiter, cfgGetItem(pCfg, "smlAutoChildTableNameDelimiter")->str, TSDB_TABLE_NAME_LEN); tstrncpy(tsSmlChildTableName, cfgGetItem(pCfg, "smlChildTableName")->str, TSDB_TABLE_NAME_LEN); tstrncpy(tsSmlTagName, cfgGetItem(pCfg, "smlTagName")->str, TSDB_COL_NAME_LEN); tstrncpy(tsSmlTsDefaultName, cfgGetItem(pCfg, "smlTsDefaultName")->str, TSDB_COL_NAME_LEN); @@ -1396,6 +1399,8 @@ int32_t taosApplyLocalCfg(SConfig *pCfg, char *name) { cfgSetItem(pCfg, "secondEp", tsSecond, pSecondpItem->stype); } else if (strcasecmp("smlChildTableName", name) == 0) { tstrncpy(tsSmlChildTableName, cfgGetItem(pCfg, "smlChildTableName")->str, TSDB_TABLE_NAME_LEN); + } else if (strcasecmp("smlAutoChildTableNameDelimiter", name) == 0) { + tstrncpy(tsSmlAutoChildTableNameDelimiter, cfgGetItem(pCfg, "smlAutoChildTableNameDelimiter")->str, TSDB_TABLE_NAME_LEN); } else if (strcasecmp("smlTagName", name) == 0) { tstrncpy(tsSmlTagName, cfgGetItem(pCfg, "smlTagName")->str, TSDB_COL_NAME_LEN); // } else if (strcasecmp("smlDataFormat", name) == 0) { diff --git a/source/common/src/tmsg.c b/source/common/src/tmsg.c index 80f9cfe9b7..603e7e7021 100644 --- a/source/common/src/tmsg.c +++ b/source/common/src/tmsg.c @@ -4721,31 +4721,6 @@ void tFreeSCMCreateTopicReq(SCMCreateTopicReq *pReq) { } } -int32_t tSerializeSCMCreateTopicRsp(void *buf, int32_t bufLen, const SCMCreateTopicRsp *pRsp) { - SEncoder encoder = {0}; - tEncoderInit(&encoder, buf, bufLen); - - if (tStartEncode(&encoder) < 0) return -1; - if (tEncodeI64(&encoder, pRsp->topicId) < 0) return -1; - tEndEncode(&encoder); - - int32_t tlen = encoder.pos; - tEncoderClear(&encoder); - return tlen; -} - -int32_t tDeserializeSCMCreateTopicRsp(void *buf, int32_t bufLen, SCMCreateTopicRsp *pRsp) { - SDecoder decoder = {0}; - tDecoderInit(&decoder, buf, bufLen); - - if (tStartDecode(&decoder) < 0) return -1; - if (tDecodeI64(&decoder, &pRsp->topicId) < 0) return -1; - tEndDecode(&decoder); - - tDecoderClear(&decoder); - return 0; -} - int32_t tSerializeSConnectReq(void *buf, int32_t bufLen, SConnectReq *pReq) { SEncoder encoder = {0}; tEncoderInit(&encoder, buf, bufLen); @@ -6388,6 +6363,7 @@ int32_t tSerializeSMqPollReq(void *buf, int32_t bufLen, SMqPollReq *pReq) { if (tEncodeI64(&encoder, pReq->consumerId) < 0) return -1; if (tEncodeI64(&encoder, pReq->timeout) < 0) return -1; if (tSerializeSTqOffsetVal(&encoder, &pReq->reqOffset) < 0) return -1; + if (tEncodeI8(&encoder, pReq->enableReplay) < 0) return -1; tEndEncode(&encoder); @@ -6424,6 +6400,10 @@ int32_t tDeserializeSMqPollReq(void *buf, int32_t bufLen, SMqPollReq *pReq) { if (tDecodeI64(&decoder, &pReq->timeout) < 0) return -1; if (tDerializeSTqOffsetVal(&decoder, &pReq->reqOffset) < 0) return -1; + if (!tDecodeIsEnd(&decoder)) { + if (tDecodeI8(&decoder, &pReq->enableReplay) < 0) return -1; + } + tEndDecode(&decoder); tDecoderClear(&decoder); @@ -8226,6 +8206,7 @@ int32_t tEncodeMqDataRsp(SEncoder *pEncoder, const SMqDataRsp *pRsp) { } } } + if (tEncodeI64(pEncoder, pRsp->sleepTime) < 0) return -1; return 0; } @@ -8271,6 +8252,8 @@ int32_t tDecodeMqDataRsp(SDecoder *pDecoder, SMqDataRsp *pRsp) { } } } + if (tDecodeI64(pDecoder, &pRsp->sleepTime) < 0) return -1; + return 0; } diff --git a/source/dnode/mgmt/mgmt_mnode/src/mmInt.c b/source/dnode/mgmt/mgmt_mnode/src/mmInt.c index 7840528db9..d25c6438e8 100644 --- a/source/dnode/mgmt/mgmt_mnode/src/mmInt.c +++ b/source/dnode/mgmt/mgmt_mnode/src/mmInt.c @@ -32,8 +32,13 @@ static int32_t mmRequire(const SMgmtInputOpt *pInput, bool *required) { if (!option.deploy) { *required = mmDeployRequired(pInput); + if (*required) { + dInfo("deploy mnode required. dnodeId:%d<=0, clusterId:%" PRId64 "<=0, localEp:%s==firstEp", + pInput->pData->dnodeId, pInput->pData->clusterId, tsLocalEp); + } } else { *required = true; + dInfo("deploy mnode required. option deploy:%d", option.deploy); } return 0; diff --git a/source/dnode/mnode/impl/inc/mndDef.h b/source/dnode/mnode/impl/inc/mndDef.h index a3fdc3a757..1f7c92ca75 100644 --- a/source/dnode/mnode/impl/inc/mndDef.h +++ b/source/dnode/mnode/impl/inc/mndDef.h @@ -495,32 +495,6 @@ typedef struct { char filterTb[TSDB_TABLE_NAME_LEN]; } SShowObj; -typedef struct { - int64_t id; - int8_t type; - int8_t replica; - int16_t numOfColumns; - int32_t rowSize; - int32_t numOfRows; - int32_t numOfReads; - int32_t payloadLen; - void* pIter; - SMnode* pMnode; - char db[TSDB_DB_FNAME_LEN]; - int16_t offset[TSDB_MAX_COLUMNS]; - int32_t bytes[TSDB_MAX_COLUMNS]; - char payload[]; -} SSysTableRetrieveObj; - -typedef struct { - char key[TSDB_PARTITION_KEY_LEN]; - int64_t dbUid; - int64_t offset; -} SMqOffsetObj; - -int32_t tEncodeSMqOffsetObj(void** buf, const SMqOffsetObj* pOffset); -void* tDecodeSMqOffsetObj(void* buf, SMqOffsetObj* pOffset); - typedef struct { char name[TSDB_TOPIC_FNAME_LEN]; char db[TSDB_DB_FNAME_LEN]; diff --git a/source/dnode/mnode/impl/src/mndConsumer.c b/source/dnode/mnode/impl/src/mndConsumer.c index 7273e13317..c9ee66d3a0 100644 --- a/source/dnode/mnode/impl/src/mndConsumer.c +++ b/source/dnode/mnode/impl/src/mndConsumer.c @@ -18,6 +18,7 @@ #include "mndPrivilege.h" #include "mndVgroup.h" #include "mndShow.h" +#include "mndDb.h" #include "mndSubscribe.h" #include "mndTopic.h" #include "mndTrans.h" @@ -124,30 +125,55 @@ void mndRebCntDec() { } } -static int32_t validateTopics(STrans *pTrans, const SArray *pTopicList, SMnode *pMnode, const char *pUser) { - int32_t numOfTopics = taosArrayGetSize(pTopicList); +static int32_t validateTopics(STrans *pTrans, const SArray *pTopicList, SMnode *pMnode, const char *pUser, bool enableReplay) { + SMqTopicObj *pTopic = NULL; + int32_t code = 0; + int32_t numOfTopics = taosArrayGetSize(pTopicList); for (int32_t i = 0; i < numOfTopics; i++) { char *pOneTopic = taosArrayGetP(pTopicList, i); - SMqTopicObj *pTopic = mndAcquireTopic(pMnode, pOneTopic); + pTopic = mndAcquireTopic(pMnode, pOneTopic); if (pTopic == NULL) { // terrno has been set by callee function - return -1; + code = -1; + goto FAILED; } if (mndCheckTopicPrivilege(pMnode, pUser, MND_OPER_SUBSCRIBE, pTopic) != 0) { - mndReleaseTopic(pMnode, pTopic); - return -1; + code = -1; + goto FAILED; + } + + if(enableReplay){ + if(pTopic->subType != TOPIC_SUB_TYPE__COLUMN){ + code = TSDB_CODE_TMQ_REPLAY_NOT_SUPPORT; + goto FAILED; + }else if(pTopic->ntbUid == 0 && pTopic->ctbStbUid == 0) { + SDbObj *pDb = mndAcquireDb(pMnode, pTopic->db); + if (pDb == NULL) { + code = -1; + goto FAILED; + } + if (pDb->cfg.numOfVgroups != 1) { + mndReleaseDb(pMnode, pDb); + code = TSDB_CODE_TMQ_REPLAY_NEED_ONE_VGROUP; + goto FAILED; + } + mndReleaseDb(pMnode, pDb); + } } mndTransSetDbName(pTrans, pOneTopic, NULL); if(mndTransCheckConflict(pMnode, pTrans) != 0){ - mndReleaseTopic(pMnode, pTopic); - return -1; + code = -1; + goto FAILED; } mndReleaseTopic(pMnode, pTopic); } return 0; +FAILED: + mndReleaseTopic(pMnode, pTopic); + return code; } static int32_t mndProcessConsumerRecoverMsg(SRpcMsg *pMsg) { @@ -177,7 +203,7 @@ static int32_t mndProcessConsumerRecoverMsg(SRpcMsg *pMsg) { if (pTrans == NULL) { goto FAIL; } - if(validateTopics(pTrans, pConsumer->assignedTopics, pMnode, pMsg->info.conn.user) != 0){ + if(validateTopics(pTrans, pConsumer->assignedTopics, pMnode, pMsg->info.conn.user, false) != 0){ goto FAIL; } @@ -697,7 +723,7 @@ int32_t mndProcessSubscribeReq(SRpcMsg *pMsg) { goto _over; } - code = validateTopics(pTrans, pTopicList, pMnode, pMsg->info.conn.user); + code = validateTopics(pTrans, pTopicList, pMnode, pMsg->info.conn.user, subscribe.enableReplay); if (code != TSDB_CODE_SUCCESS) { goto _over; } diff --git a/source/dnode/mnode/impl/src/mndDump.c b/source/dnode/mnode/impl/src/mndDump.c index 62b5cb00e6..481495cbe5 100644 --- a/source/dnode/mnode/impl/src/mndDump.c +++ b/source/dnode/mnode/impl/src/mndDump.c @@ -330,24 +330,6 @@ void dumpSubscribe(SSdb *pSdb, SJson *json) { } } -void dumpOffset(SSdb *pSdb, SJson *json) { - void *pIter = NULL; - SJson *items = tjsonAddArrayToObject(json, "offsets"); - - while (1) { - SMqOffsetObj *pObj = NULL; - pIter = sdbFetch(pSdb, SDB_OFFSET, pIter, (void **)&pObj); - if (pIter == NULL) break; - - SJson *item = tjsonCreateObject(); - tjsonAddItemToArray(items, item); - tjsonAddStringToObject(item, "key", pObj->key); - tjsonAddStringToObject(item, "dbUid", i642str(pObj->dbUid)); - tjsonAddStringToObject(item, "offset", i642str(pObj->offset)); - sdbRelease(pSdb, pObj); - } -} - void dumpStream(SSdb *pSdb, SJson *json) { void *pIter = NULL; SJson *items = tjsonAddArrayToObject(json, "streams"); @@ -608,7 +590,7 @@ void mndDumpSdb() { dumpTopic(pSdb, json); dumpConsumer(pSdb, json); dumpSubscribe(pSdb, json); - dumpOffset(pSdb, json); +// dumpOffset(pSdb, json); dumpStream(pSdb, json); dumpAcct(pSdb, json); dumpAuth(pSdb, json); diff --git a/source/dnode/mnode/impl/src/mndTopic.c b/source/dnode/mnode/impl/src/mndTopic.c index e96acfef86..1e91fe4919 100644 --- a/source/dnode/mnode/impl/src/mndTopic.c +++ b/source/dnode/mnode/impl/src/mndTopic.c @@ -298,11 +298,6 @@ static int32_t mndTopicActionUpdate(SSdb *pSdb, SMqTopicObj *pOldTopic, SMqTopic atomic_exchange_64(&pOldTopic->updateTime, pNewTopic->updateTime); atomic_exchange_32(&pOldTopic->version, pNewTopic->version); - /*taosWLockLatch(&pOldTopic->lock);*/ - - // TODO handle update - - /*taosWUnLockLatch(&pOldTopic->lock);*/ return 0; } @@ -320,23 +315,6 @@ void mndReleaseTopic(SMnode *pMnode, SMqTopicObj *pTopic) { sdbRelease(pSdb, pTopic); } -static SDDropTopicReq *mndBuildDropTopicMsg(SMnode *pMnode, SVgObj *pVgroup, SMqTopicObj *pTopic) { - int32_t contLen = sizeof(SDDropTopicReq); - - SDDropTopicReq *pDrop = taosMemoryCalloc(1, contLen); - if (pDrop == NULL) { - terrno = TSDB_CODE_OUT_OF_MEMORY; - return NULL; - } - - pDrop->head.contLen = htonl(contLen); - pDrop->head.vgId = htonl(pVgroup->vgId); - memcpy(pDrop->name, pTopic->name, TSDB_TOPIC_FNAME_LEN); - pDrop->tuid = htobe64(pTopic->uid); - - return pDrop; -} - static int32_t mndCheckCreateTopicReq(SCMCreateTopicReq *pCreate) { terrno = TSDB_CODE_MND_INVALID_TOPIC; diff --git a/source/dnode/vnode/inc/vnode.h b/source/dnode/vnode/inc/vnode.h index 773591e6ad..c40e2657f9 100644 --- a/source/dnode/vnode/inc/vnode.h +++ b/source/dnode/vnode/inc/vnode.h @@ -226,6 +226,7 @@ typedef struct STqReader { int64_t cachedSchemaUid; SSchemaWrapper *pSchemaWrapper; SSDataBlock *pResBlock; + int64_t lastTs; } STqReader; STqReader *tqReaderOpen(SVnode *pVnode); @@ -244,6 +245,7 @@ bool tqNextBlockInWal(STqReader *pReader, const char *idstr); bool tqNextBlockImpl(STqReader *pReader, const char *idstr); SWalReader *tqGetWalReader(STqReader *pReader); SSDataBlock *tqGetResultBlock(STqReader *pReader); +int64_t tqGetResultBlockTime(STqReader *pReader); int32_t extractMsgFromWal(SWalReader *pReader, void **pItem, int64_t maxVer, const char *id); int32_t tqReaderSetSubmitMsg(STqReader *pReader, void *msgStr, int32_t msgLen, int64_t ver); diff --git a/source/dnode/vnode/src/inc/tq.h b/source/dnode/vnode/src/inc/tq.h index 96274ec102..6ab2bc75c7 100644 --- a/source/dnode/vnode/src/inc/tq.h +++ b/source/dnode/vnode/src/inc/tq.h @@ -46,6 +46,7 @@ typedef struct STqOffsetStore STqOffsetStore; // tqPush #define STREAM_EXEC_EXTRACT_DATA_IN_WAL_ID (-1) #define STREAM_EXEC_TASK_STATUS_CHECK_ID (-2) +#define IS_OFFSET_RESET_TYPE(_t) ((_t) < 0) // tqExec typedef struct { @@ -90,6 +91,10 @@ typedef struct { STqExecHandle execHandle; // exec SRpcMsg* msg; tq_handle_status status; + + // for replay + SSDataBlock* block; + int64_t blockTime; } STqHandle; struct STQ { @@ -107,17 +112,13 @@ struct STQ { SStreamMeta* pStreamMeta; }; -typedef struct { - int32_t size; -} STqOffsetHead; - int32_t tEncodeSTqHandle(SEncoder* pEncoder, const STqHandle* pHandle); int32_t tDecodeSTqHandle(SDecoder* pDecoder, STqHandle* pHandle); void tqDestroyTqHandle(void* data); // tqRead int32_t tqScanTaosx(STQ* pTq, const STqHandle* pHandle, STaosxRsp* pRsp, SMqMetaRsp* pMetaRsp, STqOffsetVal* offset); -int32_t tqScanData(STQ* pTq, const STqHandle* pHandle, SMqDataRsp* pRsp, STqOffsetVal* pOffset); +int32_t tqScanData(STQ* pTq, STqHandle* pHandle, SMqDataRsp* pRsp, STqOffsetVal* pOffset, const SMqPollReq* pRequest); int32_t tqFetchLog(STQ* pTq, STqHandle* pHandle, int64_t* fetchOffset, uint64_t reqId); // tqExec diff --git a/source/dnode/vnode/src/tq/tq.c b/source/dnode/vnode/src/tq/tq.c index 8f3661dffa..98464d082c 100644 --- a/source/dnode/vnode/src/tq/tq.c +++ b/source/dnode/vnode/src/tq/tq.c @@ -82,6 +82,9 @@ void tqDestroyTqHandle(void* data) { taosMemoryFree(pData->msg); pData->msg = NULL; } + if (pData->block != NULL){ + blockDataDestroy(pData->block); + } } static bool tqOffsetEqual(const STqOffset* pLeft, const STqOffset* pRight) { diff --git a/source/dnode/vnode/src/tq/tqOffset.c b/source/dnode/vnode/src/tq/tqOffset.c index 11bb737225..5e67f3c3ac 100644 --- a/source/dnode/vnode/src/tq/tqOffset.c +++ b/source/dnode/vnode/src/tq/tqOffset.c @@ -37,11 +37,9 @@ int32_t tqOffsetRestoreFromFile(STqOffsetStore* pStore, const char* fname) { int32_t vgId = TD_VID(pStore->pTq->pVnode); int64_t code = 0; - - STqOffsetHead head = {0}; - + int32_t size = 0; while (1) { - if ((code = taosReadFile(pFile, &head, sizeof(STqOffsetHead))) != sizeof(STqOffsetHead)) { + if ((code = taosReadFile(pFile, &size, INT_BYTES)) != INT_BYTES) { if (code == 0) { break; } else { @@ -49,7 +47,6 @@ int32_t tqOffsetRestoreFromFile(STqOffsetStore* pStore, const char* fname) { } } - int32_t size = htonl(head.size); void* pMemBuf = taosMemoryCalloc(1, size); if (pMemBuf == NULL) { tqError("vgId:%d failed to restore offset from file, since out of memory, malloc size:%d", vgId, size); @@ -175,11 +172,11 @@ int32_t tqOffsetCommitFile(STqOffsetStore* pStore) { return -1; } - int32_t totLen = sizeof(STqOffsetHead) + bodyLen; + int32_t totLen = INT_BYTES + bodyLen; void* buf = taosMemoryCalloc(1, totLen); - void* abuf = POINTER_SHIFT(buf, sizeof(STqOffsetHead)); + void* abuf = POINTER_SHIFT(buf, INT_BYTES); - ((STqOffsetHead*)buf)->size = htonl(bodyLen); + *(int32_t*)buf = bodyLen; SEncoder encoder; tEncoderInit(&encoder, abuf, bodyLen); tEncodeSTqOffset(&encoder, pOffset); diff --git a/source/dnode/vnode/src/tq/tqRead.c b/source/dnode/vnode/src/tq/tqRead.c index 2a56cd3847..dadbd30808 100644 --- a/source/dnode/vnode/src/tq/tqRead.c +++ b/source/dnode/vnode/src/tq/tqRead.c @@ -369,82 +369,56 @@ int32_t extractMsgFromWal(SWalReader* pReader, void** pItem, int64_t maxVer, con // todo ignore the error in wal? bool tqNextBlockInWal(STqReader* pReader, const char* id) { SWalReader* pWalReader = pReader->pWalReader; + SSDataBlock* pDataBlock = NULL; uint64_t st = taosGetTimestampMs(); while (1) { - SArray* pBlockList = pReader->submit.aSubmitTbData; - if (pBlockList == NULL || pReader->nextBlk >= taosArrayGetSize(pBlockList)) { - // try next message in wal file - // todo always retry to avoid read failure caused by wal file deletion - if (walNextValidMsg(pWalReader) < 0) { - return false; - } - - void* pBody = POINTER_SHIFT(pWalReader->pHead->head.body, sizeof(SSubmitReq2Msg)); - int32_t bodyLen = pWalReader->pHead->head.bodyLen - sizeof(SSubmitReq2Msg); - int64_t ver = pWalReader->pHead->head.version; - - SDecoder decoder = {0}; - tDecoderInit(&decoder, pBody, bodyLen); - - { - int32_t nSubmitTbData = taosArrayGetSize(pReader->submit.aSubmitTbData); - for (int32_t i = 0; i < nSubmitTbData; i++) { - SSubmitTbData* pData = taosArrayGet(pReader->submit.aSubmitTbData, i); - if (pData->pCreateTbReq != NULL) { - taosArrayDestroy(pData->pCreateTbReq->ctb.tagName); - taosMemoryFreeClear(pData->pCreateTbReq); - } - pData->aRowP = taosArrayDestroy(pData->aRowP); - } - pReader->submit.aSubmitTbData = taosArrayDestroy(pReader->submit.aSubmitTbData); - } - - if (tDecodeSubmitReq(&decoder, &pReader->submit) < 0) { - tDecoderClear(&decoder); - tqError("decode wal file error, msgLen:%d, ver:%" PRId64, bodyLen, ver); - return false; - } - - tDecoderClear(&decoder); - pReader->nextBlk = 0; + // try next message in wal file + if (walNextValidMsg(pWalReader) < 0) { + return false; } + void* pBody = POINTER_SHIFT(pWalReader->pHead->head.body, sizeof(SSubmitReq2Msg)); + int32_t bodyLen = pWalReader->pHead->head.bodyLen - sizeof(SSubmitReq2Msg); + int64_t ver = pWalReader->pHead->head.version; + + tqReaderSetSubmitMsg(pReader, pBody, bodyLen, ver); + pReader->nextBlk = 0; int32_t numOfBlocks = taosArrayGetSize(pReader->submit.aSubmitTbData); while (pReader->nextBlk < numOfBlocks) { - tqTrace("tq reader next data block %d/%d, len:%d %" PRId64 " %d", pReader->nextBlk, - numOfBlocks, pReader->msg.msgLen, pReader->msg.ver, pReader->nextBlk); + tqTrace("tq reader next data block %d/%d, len:%d %" PRId64, pReader->nextBlk, + numOfBlocks, pReader->msg.msgLen, pReader->msg.ver); SSubmitTbData* pSubmitTbData = taosArrayGet(pReader->submit.aSubmitTbData, pReader->nextBlk); - if (pReader->tbIdHash == NULL) { - SSDataBlock* pRes = NULL; - int32_t code = tqRetrieveDataBlock(pReader, &pRes, NULL); - if (code == TSDB_CODE_SUCCESS && pRes->info.rows > 0) { - return true; - } - } - - void* ret = taosHashGet(pReader->tbIdHash, &pSubmitTbData->uid, sizeof(int64_t)); - if (ret != NULL) { - tqTrace("tq reader return submit block, uid:%" PRId64 ", ver:%" PRId64, pSubmitTbData->uid, pReader->msg.ver); - + if (pReader->tbIdHash == NULL || taosHashGet(pReader->tbIdHash, &pSubmitTbData->uid, sizeof(int64_t)) != NULL) { + tqTrace("tq reader return submit block, uid:%" PRId64, pSubmitTbData->uid); SSDataBlock* pRes = NULL; int32_t code = tqRetrieveDataBlock(pReader, &pRes, NULL); if (code == TSDB_CODE_SUCCESS && pRes->info.rows > 0) { - return true; + if(pDataBlock == NULL){ + pDataBlock = createOneDataBlock(pRes, true); + }else{ + blockDataMerge(pDataBlock, pRes); + } } } else { pReader->nextBlk += 1; tqTrace("tq reader discard submit block, uid:%" PRId64 ", continue", pSubmitTbData->uid); } } - - qTrace("stream scan return empty, all %d submit blocks consumed, %s", numOfBlocks, id); tDestroySubmitReq(&pReader->submit, TSDB_MSG_FLG_DECODE); - pReader->msg.msgStr = NULL; + if(pDataBlock != NULL){ + blockDataCleanup(pReader->pResBlock); + copyDataBlock(pReader->pResBlock, pDataBlock); + blockDataDestroy(pDataBlock); + return true; + }else{ + qTrace("stream scan return empty, all %d submit blocks consumed, %s", numOfBlocks, id); + } + if(taosGetTimestampMs() - st > 1000){ return false; } @@ -478,6 +452,10 @@ SSDataBlock* tqGetResultBlock (STqReader* pReader) { return pReader->pResBlock; } +int64_t tqGetResultBlockTime(STqReader *pReader){ + return pReader->lastTs; +} + bool tqNextBlockImpl(STqReader* pReader, const char* idstr) { if (pReader->msg.msgStr == NULL) { return false; @@ -644,7 +622,7 @@ int32_t tqRetrieveDataBlock(STqReader* pReader, SSDataBlock** pRes, const char* int32_t sversion = pSubmitTbData->sver; int64_t suid = pSubmitTbData->suid; int64_t uid = pSubmitTbData->uid; - pReader->lastBlkUid = uid; + pReader->lastTs = pSubmitTbData->ctimeMs; pBlock->info.id.uid = uid; pBlock->info.version = pReader->msg.ver; @@ -786,7 +764,6 @@ int32_t tqRetrieveTaosxBlock(STqReader* pReader, SArray* blocks, SArray* schemas } int32_t sversion = pSubmitTbData->sver; - int64_t suid = pSubmitTbData->suid; int64_t uid = pSubmitTbData->uid; pReader->lastBlkUid = uid; diff --git a/source/dnode/vnode/src/tq/tqScan.c b/source/dnode/vnode/src/tq/tqScan.c index cbe3ffee9e..01866ef893 100644 --- a/source/dnode/vnode/src/tq/tqScan.c +++ b/source/dnode/vnode/src/tq/tqScan.c @@ -64,7 +64,23 @@ static int32_t tqAddTbNameToRsp(const STQ* pTq, int64_t uid, STaosxRsp* pRsp, in return 0; } -int32_t tqScanData(STQ* pTq, const STqHandle* pHandle, SMqDataRsp* pRsp, STqOffsetVal* pOffset) { +int32_t getDataBlock(qTaskInfo_t task, const STqHandle* pHandle, int32_t vgId, SSDataBlock** res){ + uint64_t ts = 0; + qStreamSetOpen(task); + + tqDebug("consumer:0x%" PRIx64 " vgId:%d, tmq one task start execute", pHandle->consumerId, vgId); + int32_t code = qExecTask(task, res, &ts); + if (code != TSDB_CODE_SUCCESS) { + tqError("consumer:0x%" PRIx64 " vgId:%d, task exec error since %s", pHandle->consumerId, vgId, tstrerror(code)); + terrno = code; + return -1; + } + + tqDebug("consumer:0x%" PRIx64 " vgId:%d tmq one task end executed, pDataBlock:%p", pHandle->consumerId, vgId, *res); + return 0; +} + +int32_t tqScanData(STQ* pTq, STqHandle* pHandle, SMqDataRsp* pRsp, STqOffsetVal* pOffset, const SMqPollReq* pRequest) { const int32_t MAX_ROWS_TO_RETURN = 4096; int32_t vgId = TD_VID(pTq->pVnode); @@ -80,34 +96,66 @@ int32_t tqScanData(STQ* pTq, const STqHandle* pHandle, SMqDataRsp* pRsp, STqOffs while (1) { SSDataBlock* pDataBlock = NULL; - uint64_t ts = 0; - qStreamSetOpen(task); - - tqDebug("consumer:0x%" PRIx64 " vgId:%d, tmq one task start execute", pHandle->consumerId, vgId); - code = qExecTask(task, &pDataBlock, &ts); - if (code != TSDB_CODE_SUCCESS) { - tqError("consumer:0x%" PRIx64 " vgId:%d, task exec error since %s", pHandle->consumerId, vgId, tstrerror(code)); - terrno = code; - return -1; - } - - tqDebug("consumer:0x%" PRIx64 " vgId:%d tmq one task end executed, pDataBlock:%p", pHandle->consumerId, vgId, - pDataBlock); - // current scan should be stopped asap, since the rebalance occurs. - if (pDataBlock == NULL) { - break; - } - - code = tqAddBlockDataToRsp(pDataBlock, pRsp, pExec->numOfCols, pTq->pVnode->config.tsdbCfg.precision); - if (code != TSDB_CODE_SUCCESS) { - tqError("vgId:%d, failed to add block to rsp msg", vgId); + code = getDataBlock(task, pHandle, vgId, &pDataBlock); + if (code != 0){ return code; } - pRsp->blockNum++; - totalRows += pDataBlock->info.rows; - if (totalRows >= MAX_ROWS_TO_RETURN) { + if(pRequest->enableReplay){ + if(IS_OFFSET_RESET_TYPE(pRequest->reqOffset.type) && pHandle->block != NULL){ + blockDataDestroy(pHandle->block); + pHandle->block = NULL; + } + if(pHandle->block == NULL){ + if (pDataBlock == NULL) { + break; + } + STqOffsetVal offset = {0}; + qStreamExtractOffset(task, &offset); + pHandle->block = createOneDataBlock(pDataBlock, true); +// pHandle->block = createDataBlock(); +// copyDataBlock(pHandle->block, pDataBlock); + pHandle->blockTime = offset.ts; + code = getDataBlock(task, pHandle, vgId, &pDataBlock); + if (code != 0){ + return code; + } + } + + code = tqAddBlockDataToRsp(pHandle->block, pRsp, pExec->numOfCols, pTq->pVnode->config.tsdbCfg.precision); + if (code != TSDB_CODE_SUCCESS) { + tqError("vgId:%d, failed to add block to rsp msg", vgId); + return code; + } + + pRsp->blockNum++; + if (pDataBlock == NULL) { + blockDataDestroy(pHandle->block); + pHandle->block = NULL; + }else{ + copyDataBlock(pHandle->block, pDataBlock); + + STqOffsetVal offset = {0}; + qStreamExtractOffset(task, &offset); + pRsp->sleepTime = offset.ts - pHandle->blockTime; + pHandle->blockTime = offset.ts; + } break; + }else{ + if (pDataBlock == NULL) { + break; + } + code = tqAddBlockDataToRsp(pDataBlock, pRsp, pExec->numOfCols, pTq->pVnode->config.tsdbCfg.precision); + if (code != TSDB_CODE_SUCCESS) { + tqError("vgId:%d, failed to add block to rsp msg", vgId); + return code; + } + + pRsp->blockNum++; + totalRows += pDataBlock->info.rows; + if (totalRows >= MAX_ROWS_TO_RETURN) { + break; + } } } diff --git a/source/dnode/vnode/src/tq/tqStreamTaskSnap.c b/source/dnode/vnode/src/tq/tqStreamTaskSnap.c index 09fffa1f74..e122cf19d3 100644 --- a/source/dnode/vnode/src/tq/tqStreamTaskSnap.c +++ b/source/dnode/vnode/src/tq/tqStreamTaskSnap.c @@ -198,8 +198,6 @@ int32_t streamTaskSnapWriterClose(SStreamTaskWriter* pWriter, int8_t rollback) { taosWLockLatch(&pTq->pStreamMeta->lock); tqDebug("vgId:%d, vnode stream-task snapshot writer closed", TD_VID(pTq->pVnode)); - - taosWLockLatch(&pTq->pStreamMeta->lock); if (rollback) { tdbAbort(pTq->pStreamMeta->db, pTq->pStreamMeta->txn); } else { @@ -208,12 +206,6 @@ int32_t streamTaskSnapWriterClose(SStreamTaskWriter* pWriter, int8_t rollback) { code = tdbPostCommit(pTq->pStreamMeta->db, pTq->pStreamMeta->txn); if (code) goto _err; } - if (tdbBegin(pTq->pStreamMeta->db, &pTq->pStreamMeta->txn, tdbDefaultMalloc, tdbDefaultFree, NULL, 0) < 0) { - code = -1; - goto _err; - } - - taosWUnLockLatch(&pTq->pStreamMeta->lock); if (tdbBegin(pTq->pStreamMeta->db, &pTq->pStreamMeta->txn, tdbDefaultMalloc, tdbDefaultFree, NULL, 0) < 0) { code = -1; diff --git a/source/dnode/vnode/src/tq/tqUtil.c b/source/dnode/vnode/src/tq/tqUtil.c index 897e3f1e2e..d8fe899bf6 100644 --- a/source/dnode/vnode/src/tq/tqUtil.c +++ b/source/dnode/vnode/src/tq/tqUtil.c @@ -15,8 +15,6 @@ #include "tq.h" -#define IS_OFFSET_RESET_TYPE(_t) ((_t) < 0) - static int32_t tqSendMetaPollRsp(STqHandle* pHandle, const SRpcMsg* pMsg, const SMqPollReq* pReq, const SMqMetaRsp* pRsp, int32_t vgId); @@ -152,7 +150,7 @@ static int32_t extractDataAndRspForNormalSubscribe(STQ* pTq, STqHandle* pHandle, tqInitDataRsp(&dataRsp, *pOffset); qSetTaskId(pHandle->execHandle.task, consumerId, pRequest->reqId); - int code = tqScanData(pTq, pHandle, &dataRsp, pOffset); + int code = tqScanData(pTq, pHandle, &dataRsp, pOffset, pRequest); if (code != 0 && terrno != TSDB_CODE_WAL_LOG_NOT_EXIST) { goto end; } diff --git a/source/dnode/vnode/src/vnd/vnodeInitApi.c b/source/dnode/vnode/src/vnd/vnodeInitApi.c index 72e5e9ca88..a6dae429c3 100644 --- a/source/dnode/vnode/src/vnd/vnodeInitApi.c +++ b/source/dnode/vnode/src/vnd/vnodeInitApi.c @@ -131,6 +131,7 @@ void initTqAPI(SStoreTqReader* pTq) { pTq->tqGetResultBlock = tqGetResultBlock; pTq->tqReaderNextBlockFilterOut = tqNextDataBlockFilterOut; + pTq->tqGetResultBlockTime = tqGetResultBlockTime; } void initStateStoreAPI(SStateStore* pStore) { diff --git a/source/libs/executor/inc/executorInt.h b/source/libs/executor/inc/executorInt.h index d5d144ee65..288919d709 100644 --- a/source/libs/executor/inc/executorInt.h +++ b/source/libs/executor/inc/executorInt.h @@ -307,7 +307,6 @@ typedef struct STagScanInfo { SSDataBlock* pRes; SColMatchInfo matchInfo; int32_t curPos; - SLimitNode* pSlimit; SReadHandle readHandle; STableListInfo* pTableListInfo; uint64_t suid; @@ -318,6 +317,7 @@ typedef struct STagScanInfo { SArray* aUidTags; // SArray SArray* aFilterIdxs; // SArray SStorageAPI* pStorageAPI; + SLimitInfo limitInfo; } STagScanInfo; typedef enum EStreamScanMode { @@ -636,6 +636,7 @@ typedef struct SStreamFillSupporter { SSHashObj* pResMap; bool hasDelete; SStorageAPI* pAPI; + STimeWindow winRange; } SStreamFillSupporter; typedef struct SStreamFillOperatorInfo { @@ -770,6 +771,7 @@ SSDataBlock* getNextBlockFromDownstreamImpl(struct SOperatorInfo* pOperator, int bool inSlidingWindow(SInterval* pInterval, STimeWindow* pWin, SDataBlockInfo* pBlockInfo); bool inCalSlidingWindow(SInterval* pInterval, STimeWindow* pWin, TSKEY calStart, TSKEY calEnd, EStreamType blockType); bool compareVal(const char* v, const SStateKeys* pKey); +bool inWinRange(STimeWindow* range, STimeWindow* cur); int32_t getNextQualifiedWindow(SInterval* pInterval, STimeWindow* pNext, SDataBlockInfo* pDataBlockInfo, TSKEY* primaryKeys, int32_t prevPosition, int32_t order); diff --git a/source/libs/executor/src/filloperator.c b/source/libs/executor/src/filloperator.c index 9fce058c4c..ecc2526dd9 100644 --- a/source/libs/executor/src/filloperator.c +++ b/source/libs/executor/src/filloperator.c @@ -950,7 +950,10 @@ static bool hasRemainCalc(SStreamFillInfo* pFillInfo) { 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); + STimeWindow st = {.skey = pFillInfo->current, .ekey = pFillInfo->current}; + if (inWinRange(&pFillSup->winRange, &st)) { + buildFillResult(pFillInfo->pResRow, pFillSup, pFillInfo->current, pBlock); + } pFillInfo->current = taosTimeAdd(pFillInfo->current, pFillSup->interval.sliding, pFillSup->interval.slidingUnit, pFillSup->interval.precision); } @@ -960,7 +963,8 @@ static void doStreamFillLinear(SStreamFillSupporter* pFillSup, SStreamFillInfo* while (hasRemainCalc(pFillInfo) && pBlock->info.rows < pBlock->info.capacity) { uint64_t groupId = pBlock->info.id.groupId; SWinKey key = {.groupId = groupId, .ts = pFillInfo->current}; - if (pFillSup->hasDelete && !checkResult(pFillSup, pFillInfo->current, groupId)) { + STimeWindow st = {.skey = pFillInfo->current, .ekey = pFillInfo->current}; + if ( ( pFillSup->hasDelete && !checkResult(pFillSup, pFillInfo->current, groupId) ) || !inWinRange(&pFillSup->winRange, &st) ) { pFillInfo->current = taosTimeAdd(pFillInfo->current, pFillSup->interval.sliding, pFillSup->interval.slidingUnit, pFillSup->interval.precision); pFillInfo->pLinearInfo->winIndex++; @@ -1345,6 +1349,11 @@ static SSDataBlock* doStreamFill(SOperatorInfo* pOperator) { pInfo->pFillInfo->preRowKey = INT64_MIN; } + pInfo->pFillSup->winRange = pTaskInfo->streamInfo.fillHistoryWindow; + if (pInfo->pFillSup->winRange.ekey <= 0) { + pInfo->pFillSup->winRange.ekey = INT64_MAX; + } + switch (pBlock->info.type) { case STREAM_RETRIEVE: return pBlock; diff --git a/source/libs/executor/src/projectoperator.c b/source/libs/executor/src/projectoperator.c index ab7a15eacd..a4fa4192c8 100644 --- a/source/libs/executor/src/projectoperator.c +++ b/source/libs/executor/src/projectoperator.c @@ -110,7 +110,7 @@ SOperatorInfo* createProjectOperatorInfo(SOperatorInfo* downstream, SProjectPhys pInfo->binfo.inputTsOrder = pProjPhyNode->node.inputTsOrder; pInfo->binfo.outputTsOrder = pProjPhyNode->node.outputTsOrder; - if (pTaskInfo->execModel == OPTR_EXEC_MODEL_STREAM) { + if (pTaskInfo->execModel == OPTR_EXEC_MODEL_STREAM || pTaskInfo->execModel == OPTR_EXEC_MODEL_QUEUE) { pInfo->mergeDataBlocks = false; } else { if (!pProjPhyNode->ignoreGroupId) { diff --git a/source/libs/executor/src/scanoperator.c b/source/libs/executor/src/scanoperator.c index 8dbb8a979e..efbc978323 100644 --- a/source/libs/executor/src/scanoperator.c +++ b/source/libs/executor/src/scanoperator.c @@ -1863,6 +1863,9 @@ static SSDataBlock* doQueueScan(SOperatorInfo* pOperator) { // curVersion move to next tqOffsetResetToLog(&pTaskInfo->streamInfo.currentOffset, pWalReader->curVersion); + // use ts to pass time when replay, because ts not used if type is log + pTaskInfo->streamInfo.currentOffset.ts = pAPI->tqReaderFn.tqGetResultBlockTime(pInfo->tqReader); + if (hasResult) { qDebug("doQueueScan get data from log %" PRId64 " rows, version:%" PRId64, pRes->info.rows, pTaskInfo->streamInfo.currentOffset.version); @@ -3060,7 +3063,12 @@ static SSDataBlock* doTagScanFromCtbIdx(SOperatorInfo* pOperator) { setOperatorCompleted(pOperator); } pRes->info.rows = count; - pOperator->resultInfo.totalRows += count; + + bool bLimitReached = applyLimitOffset(&pInfo->limitInfo, pRes, pTaskInfo); + if (bLimitReached) { + setOperatorCompleted(pOperator); + } + pOperator->resultInfo.totalRows += pRes->info.rows; return (pRes->info.rows == 0) ? NULL : pInfo->pRes; } @@ -3094,28 +3102,20 @@ static SSDataBlock* doTagScanFromMetaEntry(SOperatorInfo* pOperator) { if (++pInfo->curPos >= size) { setOperatorCompleted(pOperator); } - // each table with tbname is a group, hence its own block, but only group when slimit exists for performance reason. - if (pInfo->pSlimit != NULL) { - if (pInfo->curPos < pInfo->pSlimit->offset) { - continue; - } - pInfo->pRes->info.id.groupId = calcGroupId(mr.me.name, strlen(mr.me.name)); - if (pInfo->curPos >= (pInfo->pSlimit->offset + pInfo->pSlimit->limit) - 1) { - setOperatorCompleted(pOperator); - } - break; - } } + pRes->info.rows = count; pAPI->metaReaderFn.clearReader(&mr); - + bool bLimitReached = applyLimitOffset(&pInfo->limitInfo, pRes, pTaskInfo); + if (bLimitReached) { + setOperatorCompleted(pOperator); + } // qDebug("QInfo:0x%"PRIx64" create tag values results completed, rows:%d", GET_TASKID(pRuntimeEnv), count); if (pOperator->status == OP_EXEC_DONE) { setTaskStatus(pTaskInfo, TASK_COMPLETED); } - pRes->info.rows = count; - pOperator->resultInfo.totalRows += count; + pOperator->resultInfo.totalRows += pRes->info.rows; return (pRes->info.rows == 0) ? NULL : pInfo->pRes; } @@ -3169,8 +3169,8 @@ SOperatorInfo* createTagScanOperatorInfo(SReadHandle* pReadHandle, STagScanPhysi pInfo->pRes = createDataBlockFromDescNode(pDescNode); pInfo->readHandle = *pReadHandle; pInfo->curPos = 0; - pInfo->pSlimit = (SLimitNode*)pPhyNode->node.pSlimit; //TODO: slimit now only indicate group + initLimitInfo(pPhyNode->node.pLimit, pPhyNode->node.pSlimit, &pInfo->limitInfo); setOperatorInfo(pOperator, "TagScanOperator", QUERY_NODE_PHYSICAL_PLAN_TAG_SCAN, false, OP_NOT_OPENED, pInfo, pTaskInfo); initResultSizeInfo(&pOperator->resultInfo, 4096); diff --git a/source/libs/executor/src/streamtimewindowoperator.c b/source/libs/executor/src/streamtimewindowoperator.c index 2eb6fb2d64..8bfa8e1a5d 100644 --- a/source/libs/executor/src/streamtimewindowoperator.c +++ b/source/libs/executor/src/streamtimewindowoperator.c @@ -3605,7 +3605,6 @@ void streamStateReloadState(SOperatorInfo* pOperator) { for (int32_t i = 0; i < num; i++) { SStateWindowInfo curInfo = {0}; SStateWindowInfo nextInfo = {0}; - SStateWindowInfo dummy = {0}; qDebug("===stream=== reload state. try process result %" PRId64 ", %" PRIu64 ", index:%d", pSeKeyBuf[i].win.skey, pSeKeyBuf[i].groupId, i); getStateWindowInfoByKey(pAggSup, pSeKeyBuf + i, &curInfo, &nextInfo); diff --git a/source/libs/nodes/src/nodesUtilFuncs.c b/source/libs/nodes/src/nodesUtilFuncs.c index 4f9ec954a8..3520db66b6 100644 --- a/source/libs/nodes/src/nodesUtilFuncs.c +++ b/source/libs/nodes/src/nodesUtilFuncs.c @@ -2059,7 +2059,6 @@ typedef struct SCollectFuncsCxt { char* tableAlias; FFuncClassifier classifier; SNodeList* pFuncs; - SHashObj* pFuncsSet; } SCollectFuncsCxt; static EDealRes collectFuncs(SNode* pNode, void* pContext) { @@ -2074,9 +2073,15 @@ static EDealRes collectFuncs(SNode* pNode, void* pContext) { } } SExprNode* pExpr = (SExprNode*)pNode; - if (NULL == taosHashGet(pCxt->pFuncsSet, &pExpr, sizeof(SExprNode*))) { + bool bFound = false; + SNode* pn = NULL; + FOREACH(pn, pCxt->pFuncs) { + if (nodesEqualNode(pn, pNode)) { + bFound = true; + } + } + if (!bFound) { pCxt->errCode = nodesListStrictAppend(pCxt->pFuncs, nodesCloneNode(pNode)); - taosHashPut(pCxt->pFuncsSet, &pExpr, POINTER_BYTES, &pExpr, POINTER_BYTES); } return (TSDB_CODE_SUCCESS == pCxt->errCode ? DEAL_RES_IGNORE_CHILD : DEAL_RES_ERROR); } @@ -2103,12 +2108,10 @@ int32_t nodesCollectFuncs(SSelectStmt* pSelect, ESqlClause clause, char* tableAl SCollectFuncsCxt cxt = {.errCode = TSDB_CODE_SUCCESS, .classifier = classifier, .tableAlias = tableAlias, - .pFuncs = (NULL == *pFuncs ? nodesMakeList() : *pFuncs), - .pFuncsSet = taosHashInit(4, funcNodeHash, false, false)}; - if (NULL == cxt.pFuncs || NULL == cxt.pFuncsSet) { + .pFuncs = (NULL == *pFuncs ? nodesMakeList() : *pFuncs)}; + if (NULL == cxt.pFuncs) { return TSDB_CODE_OUT_OF_MEMORY; } - taosHashSetEqualFp(cxt.pFuncsSet, funcNodeEqual); *pFuncs = NULL; nodesWalkSelectStmt(pSelect, clause, collectFuncs, &cxt); if (TSDB_CODE_SUCCESS == cxt.errCode) { @@ -2120,7 +2123,6 @@ int32_t nodesCollectFuncs(SSelectStmt* pSelect, ESqlClause clause, char* tableAl } else { nodesDestroyList(cxt.pFuncs); } - taosHashCleanup(cxt.pFuncsSet); return cxt.errCode; } diff --git a/source/libs/parser/inc/parAst.h b/source/libs/parser/inc/parAst.h index 4192246a9a..c863c1e0ee 100644 --- a/source/libs/parser/inc/parAst.h +++ b/source/libs/parser/inc/parAst.h @@ -99,6 +99,7 @@ void initAstCreateContext(SParseContext* pParseCxt, SAstCreateContext* pCxt); SNode* createRawExprNode(SAstCreateContext* pCxt, const SToken* pToken, SNode* pNode); SNode* createRawExprNodeExt(SAstCreateContext* pCxt, const SToken* pStart, const SToken* pEnd, SNode* pNode); +SNode* setRawExprNodeIsPseudoColumn(SAstCreateContext* pCxt, SNode* pNode, bool isPseudoColumn); SNode* releaseRawExprNode(SAstCreateContext* pCxt, SNode* pNode); SToken getTokenFromRawExprNode(SAstCreateContext* pCxt, SNode* pNode); diff --git a/source/libs/parser/inc/sql.y b/source/libs/parser/inc/sql.y index 7d88ce0c5e..c6b6648376 100755 --- a/source/libs/parser/inc/sql.y +++ b/source/libs/parser/inc/sql.y @@ -828,7 +828,7 @@ expr_or_subquery(A) ::= expression(B). //expr_or_subquery(A) ::= subquery(B). { A = createTempTableNode(pCxt, releaseRawExprNode(pCxt, B), NULL); } expression(A) ::= literal(B). { A = B; } -expression(A) ::= pseudo_column(B). { A = B; } +expression(A) ::= pseudo_column(B). { A = B; setRawExprNodeIsPseudoColumn(pCxt, A, true); } expression(A) ::= column_reference(B). { A = B; } expression(A) ::= function_expression(B). { A = B; } expression(A) ::= case_when_expression(B). { A = B; } diff --git a/source/libs/parser/src/parAstCreater.c b/source/libs/parser/src/parAstCreater.c index 9cf168f529..715a28082a 100644 --- a/source/libs/parser/src/parAstCreater.c +++ b/source/libs/parser/src/parAstCreater.c @@ -267,6 +267,15 @@ SNode* createRawExprNodeExt(SAstCreateContext* pCxt, const SToken* pStart, const return (SNode*)target; } +SNode* setRawExprNodeIsPseudoColumn(SAstCreateContext* pCxt, SNode* pNode, bool isPseudoColumn) { + CHECK_PARSER_STATUS(pCxt); + if (NULL == pNode || QUERY_NODE_RAW_EXPR != nodeType(pNode)) { + return pNode; + } + ((SRawExprNode*)pNode)->isPseudoColumn = isPseudoColumn; + return pNode; +} + SNode* releaseRawExprNode(SAstCreateContext* pCxt, SNode* pNode) { CHECK_PARSER_STATUS(pCxt); SRawExprNode* pRawExpr = (SRawExprNode*)pNode; @@ -276,6 +285,10 @@ SNode* releaseRawExprNode(SAstCreateContext* pCxt, SNode* pNode) { if (QUERY_NODE_COLUMN == nodeType(pExpr)) { strcpy(pExpr->aliasName, ((SColumnNode*)pExpr)->colName); strcpy(pExpr->userAlias, ((SColumnNode*)pExpr)->colName); + } else if (pRawExpr->isPseudoColumn) { + // all pseudo column are translate to function with same name + strcpy(pExpr->userAlias, ((SFunctionNode*)pExpr)->functionName); + strcpy(pExpr->aliasName, ((SFunctionNode*)pExpr)->functionName); } else { int32_t len = TMIN(sizeof(pExpr->aliasName) - 1, pRawExpr->n); diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c index 92f793cde1..97c172f70d 100644 --- a/source/libs/parser/src/parTranslater.c +++ b/source/libs/parser/src/parTranslater.c @@ -269,6 +269,8 @@ static int32_t createLastTsSelectStmt(char* pDb, char* pTable, STableMeta* pMet static int32_t setQuery(STranslateContext* pCxt, SQuery* pQuery); static int32_t setRefreshMate(STranslateContext* pCxt, SQuery* pQuery); +static int32_t replacePsedudoColumnFuncWithColumn(STranslateContext* pCxt, SNode** ppNode); + static bool afterGroupBy(ESqlClause clause) { return clause > SQL_CLAUSE_GROUP_BY; } static bool beforeHaving(ESqlClause clause) { return clause < SQL_CLAUSE_HAVING; } @@ -1610,26 +1612,6 @@ static int32_t translateAggFunc(STranslateContext* pCxt, SFunctionNode* pFunc) { return TSDB_CODE_SUCCESS; } -static int32_t translateScanPseudoColumnFunc(STranslateContext* pCxt, SFunctionNode* pFunc) { - if (!fmIsScanPseudoColumnFunc(pFunc->funcId)) { - return TSDB_CODE_SUCCESS; - } - if (0 == LIST_LENGTH(pFunc->pParameterList)) { - if (!isSelectStmt(pCxt->pCurrStmt) || NULL == ((SSelectStmt*)pCxt->pCurrStmt)->pFromTable || - QUERY_NODE_REAL_TABLE != nodeType(((SSelectStmt*)pCxt->pCurrStmt)->pFromTable)) { - return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_TBNAME); - } - } else { - SValueNode* pVal = (SValueNode*)nodesListGetNode(pFunc->pParameterList, 0); - STableNode* pTable = NULL; - pCxt->errCode = findTable(pCxt, pVal->literal, &pTable); - if (TSDB_CODE_SUCCESS == pCxt->errCode && (NULL == pTable || QUERY_NODE_REAL_TABLE != nodeType(pTable))) { - return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_TBNAME); - } - } - return TSDB_CODE_SUCCESS; -} - static int32_t translateIndefiniteRowsFunc(STranslateContext* pCxt, SFunctionNode* pFunc) { if (!fmIsIndefiniteRowsFunc(pFunc->funcId)) { return TSDB_CODE_SUCCESS; @@ -1699,7 +1681,8 @@ static int32_t translateInterpFunc(STranslateContext* pCxt, SFunctionNode* pFunc return TSDB_CODE_SUCCESS; } -static int32_t translateInterpPseudoColumnFunc(STranslateContext* pCxt, SFunctionNode* pFunc) { +static int32_t translateInterpPseudoColumnFunc(STranslateContext* pCxt, SNode** ppNode, bool* pRewriteToColumn) { + SFunctionNode* pFunc = (SFunctionNode*)(*ppNode); if (!fmIsInterpPseudoColumnFunc(pFunc->funcId)) { return TSDB_CODE_SUCCESS; } @@ -1711,6 +1694,25 @@ static int32_t translateInterpPseudoColumnFunc(STranslateContext* pCxt, SFunctio return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_INTERP_CLAUSE, "%s is not allowed in where clause", pFunc->functionName); } + + SSelectStmt* pSelect = (SSelectStmt*)pCxt->pCurrStmt; + SNode* pNode = NULL; + bool bFound = false; + FOREACH(pNode, pSelect->pProjectionList) { + if (nodeType(pNode) == QUERY_NODE_FUNCTION && strcasecmp(((SFunctionNode*)pNode)->functionName, "interp") == 0) { + bFound = true; + break; + } + } + if (!bFound) { + *pRewriteToColumn = true; + int32_t code = replacePsedudoColumnFuncWithColumn(pCxt, ppNode); + if (code != TSDB_CODE_SUCCESS) { + return code; + } + translateColumn(pCxt, (SColumnNode**)ppNode); + return pCxt->errCode; + } return TSDB_CODE_SUCCESS; } @@ -1766,20 +1768,6 @@ static int32_t translateForbidFillFunc(STranslateContext* pCxt, SFunctionNode* p return TSDB_CODE_SUCCESS; } -static int32_t translateWindowPseudoColumnFunc(STranslateContext* pCxt, SFunctionNode* pFunc) { - if (!fmIsWindowPseudoColumnFunc(pFunc->funcId)) { - return TSDB_CODE_SUCCESS; - } - if (!isSelectStmt(pCxt->pCurrStmt) || NULL == ((SSelectStmt*)pCxt->pCurrStmt)->pWindow) { - return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_WINDOW_PC); - } - if (beforeWindow(pCxt->currClause)) { - return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_WINDOW_PC, "There mustn't be %s", - pFunc->functionName); - } - return TSDB_CODE_SUCCESS; -} - static int32_t translateForbidStreamFunc(STranslateContext* pCxt, SFunctionNode* pFunc) { if (!fmIsForbidStreamFunc(pFunc->funcId)) { return TSDB_CODE_SUCCESS; @@ -2008,10 +1996,108 @@ static int32_t rewriteSystemInfoFunc(STranslateContext* pCxt, SNode** pNode) { return TSDB_CODE_PAR_INTERNAL_ERROR; } -static int32_t translateNormalFunction(STranslateContext* pCxt, SFunctionNode* pFunc) { +static int32_t replacePsedudoColumnFuncWithColumn(STranslateContext* pCxt, SNode** ppNode) { + SColumnNode* pCol = (SColumnNode*)nodesMakeNode(QUERY_NODE_COLUMN); + if (pCol == NULL) { + return TSDB_CODE_OUT_OF_MEMORY; + } + SExprNode* pOldExpr = (SExprNode*)(*ppNode); + //rewrite a.tbname == tbname(a) + if (nodeType(*ppNode) == QUERY_NODE_FUNCTION && ((SFunctionNode*)(*ppNode))->funcType == FUNCTION_TYPE_TBNAME) { + SFunctionNode* pFunc = (SFunctionNode*)(*ppNode); + if (0 != LIST_LENGTH(pFunc->pParameterList)) { + SValueNode* pVal = (SValueNode*)nodesListGetNode(pFunc->pParameterList, 0); + pCol->node.resType = pOldExpr->resType; + strcpy(pCol->tableAlias, pVal->literal); + strcpy(pCol->colName, pFunc->functionName); + strcpy(pCol->node.aliasName, pCol->colName); + strcpy(pCol->node.userAlias, pCol->colName); + nodesDestroyNode(*ppNode); + *ppNode = (SNode*)pCol; + + return TSDB_CODE_SUCCESS; + } + } + pCol->node.resType = pOldExpr->resType; + strcpy(pCol->node.aliasName, pOldExpr->aliasName); + strcpy(pCol->node.userAlias, pOldExpr->userAlias); + strcpy(pCol->colName, pOldExpr->aliasName); + + nodesDestroyNode(*ppNode); + *ppNode = (SNode*)pCol; + + return TSDB_CODE_SUCCESS; +} + +static int32_t rewriteToColumnAndRetranslate(STranslateContext* pCxt, SNode** ppNode, int32_t errCode) { + int32_t code = replacePsedudoColumnFuncWithColumn(pCxt, ppNode); + if (code != TSDB_CODE_SUCCESS) { + return code; + } + translateColumn(pCxt, (SColumnNode**)ppNode); + if (pCxt->errCode != TSDB_CODE_SUCCESS) { + return generateSyntaxErrMsg(&pCxt->msgBuf, errCode); + } else { + return TSDB_CODE_SUCCESS; + } +} + +static int32_t translateWindowPseudoColumnFunc(STranslateContext* pCxt, SNode** ppNode, bool* pRewriteToColumn) { + SFunctionNode* pFunc = (SFunctionNode*)(*ppNode); + if (!fmIsWindowPseudoColumnFunc(pFunc->funcId)) { + return TSDB_CODE_SUCCESS; + } + if (!isSelectStmt(pCxt->pCurrStmt)) { + return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_WINDOW_PC); + } + if (((SSelectStmt*)pCxt->pCurrStmt)->pWindow && beforeWindow(pCxt->currClause)) { + return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_WINDOW_PC, "There mustn't be %s", + pFunc->functionName); + } + if (NULL == ((SSelectStmt*)pCxt->pCurrStmt)->pWindow) { + *pRewriteToColumn = true; + return rewriteToColumnAndRetranslate(pCxt, ppNode, TSDB_CODE_PAR_INVALID_WINDOW_PC); + } + return TSDB_CODE_SUCCESS; +} + +static int32_t translateScanPseudoColumnFunc(STranslateContext* pCxt, SNode** ppNode, bool* pRewriteToColumn) { + SFunctionNode* pFunc = (SFunctionNode*)(*ppNode); + if (!fmIsScanPseudoColumnFunc(pFunc->funcId)) { + return TSDB_CODE_SUCCESS; + } + if (0 == LIST_LENGTH(pFunc->pParameterList)) { + if (!isSelectStmt(pCxt->pCurrStmt) || NULL == ((SSelectStmt*)pCxt->pCurrStmt)->pFromTable) { + return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_TBNAME); + } + if (QUERY_NODE_REAL_TABLE != nodeType(((SSelectStmt*)pCxt->pCurrStmt)->pFromTable)) { + *pRewriteToColumn = true; + return rewriteToColumnAndRetranslate(pCxt, ppNode, TSDB_CODE_PAR_INVALID_TBNAME); + } + } else { + SValueNode* pVal = (SValueNode*)nodesListGetNode(pFunc->pParameterList, 0); + STableNode* pTable = NULL; + pCxt->errCode = findTable(pCxt, pVal->literal, &pTable); + if (TSDB_CODE_SUCCESS != pCxt->errCode || (NULL == pTable)) { + return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_TBNAME); + } + if (nodeType(pTable) != QUERY_NODE_REAL_TABLE) { + *pRewriteToColumn = true; + return rewriteToColumnAndRetranslate(pCxt, ppNode, TSDB_CODE_PAR_INVALID_TBNAME); + } + } + return TSDB_CODE_SUCCESS; +} + +static int32_t translateNormalFunction(STranslateContext* pCxt, SNode** ppNode) { + SFunctionNode* pFunc = (SFunctionNode*)(*ppNode); int32_t code = translateAggFunc(pCxt, pFunc); if (TSDB_CODE_SUCCESS == code) { - code = translateScanPseudoColumnFunc(pCxt, pFunc); + bool bRewriteToColumn = false; + code = translateScanPseudoColumnFunc(pCxt, ppNode, &bRewriteToColumn); + if (bRewriteToColumn) { + return code; + } } if (TSDB_CODE_SUCCESS == code) { code = translateIndefiniteRowsFunc(pCxt, pFunc); @@ -2020,7 +2106,11 @@ static int32_t translateNormalFunction(STranslateContext* pCxt, SFunctionNode* p code = translateForbidFillFunc(pCxt, pFunc); } if (TSDB_CODE_SUCCESS == code) { - code = translateWindowPseudoColumnFunc(pCxt, pFunc); + bool bRewriteToColumn = false; + code = translateWindowPseudoColumnFunc(pCxt, ppNode, &bRewriteToColumn); + if (bRewriteToColumn) { + return code; + } } if (TSDB_CODE_SUCCESS == code) { code = translateForbidStreamFunc(pCxt, pFunc); @@ -2041,7 +2131,11 @@ static int32_t translateNormalFunction(STranslateContext* pCxt, SFunctionNode* p code = translateInterpFunc(pCxt, pFunc); } if (TSDB_CODE_SUCCESS == code) { - code = translateInterpPseudoColumnFunc(pCxt, pFunc); + bool bRewriteToColumn = false; + code = translateInterpPseudoColumnFunc(pCxt, ppNode, &bRewriteToColumn); + if (bRewriteToColumn) { + return code; + } } if (TSDB_CODE_SUCCESS == code) { code = translateTimelineFunc(pCxt, pFunc); @@ -2112,7 +2206,7 @@ static int32_t translateFunctionImpl(STranslateContext* pCxt, SFunctionNode** pF if (fmIsClientPseudoColumnFunc((*pFunc)->funcId)) { return rewriteClientPseudoColumnFunc(pCxt, (SNode**)pFunc); } - return translateNormalFunction(pCxt, *pFunc); + return translateNormalFunction(pCxt, (SNode**)pFunc); } static EDealRes translateFunction(STranslateContext* pCxt, SFunctionNode** pFunc) { diff --git a/source/libs/parser/src/sql.c b/source/libs/parser/src/sql.c index 5216add830..512aa06351 100644 --- a/source/libs/parser/src/sql.c +++ b/source/libs/parser/src/sql.c @@ -143,17 +143,17 @@ typedef union { #define ParseCTX_STORE #define YYFALLBACK 1 #define YYNSTATE 833 -#define YYNRULE 631 -#define YYNRULE_WITH_ACTION 631 +#define YYNRULE 632 +#define YYNRULE_WITH_ACTION 632 #define YYNTOKEN 345 #define YY_MAX_SHIFT 832 -#define YY_MIN_SHIFTREDUCE 1227 -#define YY_MAX_SHIFTREDUCE 1857 -#define YY_ERROR_ACTION 1858 -#define YY_ACCEPT_ACTION 1859 -#define YY_NO_ACTION 1860 -#define YY_MIN_REDUCE 1861 -#define YY_MAX_REDUCE 2491 +#define YY_MIN_SHIFTREDUCE 1228 +#define YY_MAX_SHIFTREDUCE 1859 +#define YY_ERROR_ACTION 1860 +#define YY_ACCEPT_ACTION 1861 +#define YY_NO_ACTION 1862 +#define YY_MIN_REDUCE 1863 +#define YY_MAX_REDUCE 2494 /************* End control #defines *******************************************/ #define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0]))) @@ -222,547 +222,547 @@ typedef union { *********** Begin parsing tables **********************************************/ #define YY_ACTTAB_COUNT (2986) static const YYACTIONTYPE yy_action[] = { - /* 0 */ 38, 319, 418, 469, 2100, 556, 720, 2047, 557, 1904, - /* 10 */ 168, 396, 48, 46, 1784, 424, 423, 397, 2049, 2098, - /* 20 */ 415, 1653, 1628, 41, 40, 2098, 137, 47, 45, 44, - /* 30 */ 43, 42, 34, 599, 1884, 1710, 1944, 1626, 41, 40, - /* 40 */ 1635, 1267, 47, 45, 44, 43, 42, 2298, 523, 521, - /* 50 */ 148, 364, 2100, 2357, 634, 208, 9, 699, 146, 381, - /* 60 */ 702, 2100, 68, 767, 1705, 1862, 2091, 2098, 405, 632, - /* 70 */ 19, 630, 261, 260, 41, 40, 2098, 1634, 47, 45, - /* 80 */ 44, 43, 42, 1269, 1272, 1273, 127, 2265, 2316, 126, - /* 90 */ 125, 124, 123, 122, 121, 120, 119, 118, 719, 30, - /* 100 */ 2265, 564, 736, 829, 557, 1904, 15, 561, 804, 803, + /* 0 */ 38, 319, 418, 469, 2103, 556, 720, 2050, 557, 1906, + /* 10 */ 168, 396, 48, 46, 1786, 424, 423, 397, 2052, 2101, + /* 20 */ 415, 1655, 1630, 41, 40, 2101, 137, 47, 45, 44, + /* 30 */ 43, 42, 34, 599, 719, 1712, 1947, 1628, 41, 40, + /* 40 */ 1637, 2103, 47, 45, 44, 43, 42, 2301, 523, 521, + /* 50 */ 2404, 364, 2103, 173, 634, 208, 706, 699, 146, 381, + /* 60 */ 702, 1990, 68, 187, 1707, 1864, 1294, 2101, 1293, 632, + /* 70 */ 19, 630, 261, 260, 41, 40, 2401, 1636, 47, 45, + /* 80 */ 44, 43, 42, 142, 719, 383, 127, 2163, 2319, 126, + /* 90 */ 125, 124, 123, 122, 121, 120, 119, 118, 645, 30, + /* 100 */ 2268, 1295, 736, 829, 475, 2159, 15, 561, 804, 803, /* 110 */ 802, 801, 427, 558, 800, 799, 150, 794, 793, 792, /* 120 */ 791, 790, 789, 788, 162, 784, 783, 782, 426, 425, - /* 130 */ 779, 778, 777, 181, 180, 776, 645, 687, 475, 2156, - /* 140 */ 2462, 2297, 1712, 1713, 2333, 573, 719, 114, 2299, 740, - /* 150 */ 2301, 2302, 735, 1883, 730, 481, 2156, 686, 194, 191, - /* 160 */ 2180, 2386, 2463, 688, 63, 411, 2382, 298, 2394, 698, - /* 170 */ 1371, 138, 697, 1824, 2462, 408, 1685, 1695, 2177, 707, - /* 180 */ 196, 173, 553, 1711, 1714, 2275, 719, 210, 2416, 1987, - /* 190 */ 551, 686, 194, 547, 543, 186, 2463, 688, 1629, 2283, - /* 200 */ 1627, 574, 2173, 1638, 213, 1854, 2265, 41, 40, 2279, - /* 210 */ 1373, 47, 45, 44, 43, 42, 572, 383, 127, 2160, - /* 220 */ 1653, 126, 125, 124, 123, 122, 121, 120, 119, 118, - /* 230 */ 1632, 1633, 51, 1684, 1687, 1688, 1689, 1690, 1691, 1692, - /* 240 */ 1693, 1694, 732, 728, 1703, 1704, 1706, 1707, 1708, 1709, - /* 250 */ 2, 48, 46, 2281, 412, 677, 363, 576, 1651, 415, - /* 260 */ 1292, 1628, 1291, 730, 186, 507, 2298, 420, 526, 375, - /* 270 */ 2093, 2095, 51, 525, 1710, 682, 1626, 41, 40, 737, - /* 280 */ 1773, 47, 45, 44, 43, 42, 264, 36, 2161, 489, - /* 290 */ 263, 527, 2180, 41, 40, 1293, 491, 47, 45, 44, - /* 300 */ 43, 42, 1382, 1705, 14, 13, 63, 2316, 1853, 19, - /* 310 */ 2178, 707, 606, 1739, 720, 2047, 1634, 1381, 1292, 2265, - /* 320 */ 1291, 736, 41, 40, 2298, 302, 47, 45, 44, 43, - /* 330 */ 42, 618, 617, 616, 137, 142, 1368, 702, 608, 143, - /* 340 */ 612, 604, 829, 384, 611, 15, 683, 678, 671, 610, - /* 350 */ 615, 391, 390, 1293, 477, 609, 97, 775, 605, 370, - /* 360 */ 2297, 112, 395, 2333, 636, 2316, 175, 2299, 740, 2301, - /* 370 */ 2302, 735, 1654, 730, 1740, 12, 1823, 2265, 147, 736, - /* 380 */ 643, 1712, 1713, 528, 2167, 2146, 2039, 514, 513, 512, + /* 130 */ 779, 778, 777, 181, 180, 776, 1886, 687, 481, 2159, + /* 140 */ 2465, 2300, 1714, 1715, 2336, 573, 572, 114, 2302, 740, + /* 150 */ 2304, 2305, 735, 210, 730, 509, 2159, 686, 194, 191, + /* 160 */ 2183, 2389, 2466, 688, 63, 411, 2385, 298, 2397, 698, + /* 170 */ 51, 138, 697, 1826, 2465, 408, 1687, 1697, 2180, 707, + /* 180 */ 196, 576, 553, 1713, 1716, 2278, 719, 213, 2419, 2268, + /* 190 */ 551, 686, 194, 547, 543, 2026, 2466, 688, 1631, 2286, + /* 200 */ 1629, 574, 2176, 1640, 218, 1856, 2404, 41, 40, 2282, + /* 210 */ 682, 47, 45, 44, 43, 42, 2097, 2098, 127, 63, + /* 220 */ 1655, 126, 125, 124, 123, 122, 121, 120, 119, 118, + /* 230 */ 1634, 1635, 2400, 1686, 1689, 1690, 1691, 1692, 1693, 1694, + /* 240 */ 1695, 1696, 732, 728, 1705, 1706, 1708, 1709, 1710, 1711, + /* 250 */ 2, 48, 46, 2284, 412, 677, 363, 2469, 1653, 415, + /* 260 */ 174, 1630, 1875, 730, 775, 507, 2301, 564, 526, 375, + /* 270 */ 557, 1906, 51, 525, 1712, 98, 1628, 41, 40, 737, + /* 280 */ 775, 47, 45, 44, 43, 42, 264, 36, 1885, 489, + /* 290 */ 263, 527, 1268, 41, 40, 2103, 491, 47, 45, 44, + /* 300 */ 43, 42, 405, 1707, 409, 1578, 63, 2319, 1855, 19, + /* 310 */ 2101, 1275, 171, 1741, 420, 325, 1636, 2096, 2098, 2268, + /* 320 */ 2052, 736, 41, 40, 2301, 302, 47, 45, 44, 43, + /* 330 */ 42, 618, 617, 616, 1270, 1273, 1274, 702, 608, 143, + /* 340 */ 612, 2268, 829, 384, 611, 15, 683, 678, 671, 610, + /* 350 */ 615, 391, 390, 643, 477, 609, 97, 1884, 605, 370, + /* 360 */ 2300, 112, 395, 2336, 636, 2319, 175, 2302, 740, 2304, + /* 370 */ 2305, 735, 1656, 730, 1742, 171, 1825, 2268, 147, 736, + /* 380 */ 302, 1714, 1715, 2053, 2170, 2149, 2042, 514, 513, 512, /* 390 */ 511, 506, 505, 504, 503, 502, 497, 496, 495, 494, - /* 400 */ 367, 486, 485, 484, 2401, 479, 478, 382, 663, 2427, - /* 410 */ 1753, 1516, 1517, 699, 146, 1685, 1695, 1535, 2297, 509, - /* 420 */ 2156, 2333, 1711, 1714, 114, 2299, 740, 2301, 2302, 735, - /* 430 */ 2398, 730, 1654, 302, 1859, 517, 191, 1629, 2386, 1627, - /* 440 */ 41, 40, 411, 2382, 47, 45, 44, 43, 42, 2467, - /* 450 */ 699, 146, 1657, 37, 413, 1734, 1735, 1736, 1737, 1738, - /* 460 */ 1742, 1743, 1744, 1745, 1634, 2417, 1656, 302, 218, 1632, - /* 470 */ 1633, 2246, 1684, 1687, 1688, 1689, 1690, 1691, 1692, 1693, - /* 480 */ 1694, 732, 728, 1703, 1704, 1706, 1707, 1708, 1709, 2, - /* 490 */ 12, 48, 46, 2298, 1548, 1549, 106, 219, 174, 415, - /* 500 */ 1873, 1628, 450, 699, 146, 63, 737, 47, 45, 44, - /* 510 */ 43, 42, 687, 430, 1710, 2462, 1626, 646, 429, 516, - /* 520 */ 515, 2040, 701, 192, 2394, 2395, 2298, 144, 2399, 452, - /* 530 */ 448, 2401, 686, 194, 2316, 1547, 1550, 2463, 688, 737, - /* 540 */ 189, 1913, 771, 1705, 1861, 2091, 2265, 1653, 736, 19, - /* 550 */ 63, 2401, 2087, 1847, 1462, 1463, 1634, 2397, 720, 2047, - /* 560 */ 193, 2394, 2395, 662, 144, 2399, 2462, 2316, 136, 135, - /* 570 */ 134, 133, 132, 131, 130, 129, 128, 2396, 199, 2265, - /* 580 */ 1931, 736, 829, 2468, 194, 15, 52, 2297, 2463, 688, - /* 590 */ 2333, 566, 2219, 114, 2299, 740, 2301, 2302, 735, 462, - /* 600 */ 730, 2100, 619, 149, 461, 155, 2357, 2386, 410, 766, - /* 610 */ 278, 411, 2382, 195, 2394, 2395, 2098, 144, 2399, 1788, - /* 620 */ 2297, 1712, 1713, 2333, 300, 1653, 114, 2299, 740, 2301, - /* 630 */ 2302, 735, 2024, 730, 310, 311, 691, 215, 2482, 309, - /* 640 */ 2386, 460, 229, 459, 411, 2382, 559, 786, 1911, 662, - /* 650 */ 2094, 2095, 2462, 41, 40, 1685, 1695, 47, 45, 44, - /* 660 */ 43, 42, 1711, 1714, 720, 2047, 302, 646, 2100, 2468, - /* 670 */ 194, 1427, 2036, 458, 2463, 688, 231, 1629, 89, 1627, - /* 680 */ 559, 88, 1911, 706, 56, 1418, 765, 764, 763, 1422, - /* 690 */ 762, 1424, 1425, 761, 758, 201, 1433, 755, 1435, 1436, - /* 700 */ 752, 749, 746, 1528, 1529, 44, 43, 42, 1812, 1632, - /* 710 */ 1633, 302, 1684, 1687, 1688, 1689, 1690, 1691, 1692, 1693, - /* 720 */ 1694, 732, 728, 1703, 1704, 1706, 1707, 1708, 1709, 2, - /* 730 */ 48, 46, 1715, 2298, 720, 2047, 1628, 1882, 415, 325, - /* 740 */ 1628, 648, 2219, 720, 2047, 87, 737, 302, 2424, 94, - /* 750 */ 2023, 1626, 1800, 1710, 466, 1626, 674, 673, 1810, 1811, - /* 760 */ 1813, 1814, 1815, 467, 681, 2298, 385, 773, 160, 159, - /* 770 */ 770, 769, 768, 157, 2316, 2042, 2131, 2228, 737, 2258, - /* 780 */ 2437, 1686, 1705, 1295, 1296, 1922, 2265, 12, 736, 10, - /* 790 */ 2265, 1634, 2316, 720, 2047, 1634, 773, 160, 159, 770, - /* 800 */ 769, 768, 157, 2298, 41, 40, 2316, 621, 47, 45, - /* 810 */ 44, 43, 42, 483, 595, 594, 737, 829, 2265, 775, - /* 820 */ 736, 829, 720, 2047, 49, 1656, 623, 2297, 2100, 662, - /* 830 */ 2333, 266, 2462, 114, 2299, 740, 2301, 2302, 735, 1881, - /* 840 */ 730, 635, 498, 715, 2316, 2482, 98, 2386, 265, 2468, - /* 850 */ 194, 411, 2382, 680, 2463, 688, 2265, 262, 736, 2297, - /* 860 */ 1712, 1713, 2333, 171, 2275, 114, 2299, 740, 2301, 2302, - /* 870 */ 735, 2050, 730, 626, 597, 596, 1576, 2482, 2038, 2386, - /* 880 */ 620, 1720, 1880, 411, 2382, 1275, 259, 1653, 2279, 720, - /* 890 */ 2047, 1652, 2265, 692, 1685, 1695, 1741, 2297, 614, 613, - /* 900 */ 2333, 1711, 1714, 114, 2299, 740, 2301, 2302, 735, 499, - /* 910 */ 730, 2022, 1629, 2032, 1627, 2361, 1629, 2386, 1627, 2275, - /* 920 */ 409, 411, 2382, 1597, 1598, 1386, 2100, 72, 171, 1657, - /* 930 */ 71, 418, 2281, 2284, 661, 2265, 2049, 493, 2259, 171, - /* 940 */ 1385, 2099, 730, 2279, 1632, 1633, 492, 2049, 1632, 1633, - /* 950 */ 1879, 1684, 1687, 1688, 1689, 1690, 1691, 1692, 1693, 1694, - /* 960 */ 732, 728, 1703, 1704, 1706, 1707, 1708, 1709, 2, 48, - /* 970 */ 46, 2298, 1878, 772, 170, 35, 2091, 415, 1877, 1628, - /* 980 */ 1657, 720, 2047, 300, 737, 1746, 669, 2281, 662, 2466, - /* 990 */ 2467, 2462, 1710, 2462, 1626, 389, 388, 730, 720, 2047, - /* 1000 */ 2034, 500, 2467, 2265, 2298, 2462, 530, 334, 2468, 194, - /* 1010 */ 2077, 2466, 2316, 2463, 688, 2463, 2465, 737, 575, 2455, - /* 1020 */ 1781, 1705, 2100, 2466, 2265, 2265, 736, 2463, 2464, 419, - /* 1030 */ 722, 2265, 2358, 1876, 1634, 720, 2047, 2098, 720, 2047, - /* 1040 */ 603, 720, 2047, 1686, 602, 2316, 773, 160, 159, 770, - /* 1050 */ 769, 768, 157, 607, 724, 2044, 2358, 2265, 267, 736, - /* 1060 */ 829, 275, 61, 49, 1875, 2297, 387, 386, 2333, 601, - /* 1070 */ 659, 114, 2299, 740, 2301, 2302, 735, 1366, 730, 1947, - /* 1080 */ 421, 2249, 1872, 2482, 1871, 2386, 2265, 211, 171, 411, - /* 1090 */ 2382, 603, 720, 2047, 1870, 602, 2049, 727, 2297, 1712, - /* 1100 */ 1713, 2333, 3, 1869, 114, 2299, 740, 2301, 2302, 735, - /* 1110 */ 1868, 730, 705, 1867, 54, 1866, 2482, 2265, 2386, 720, - /* 1120 */ 2047, 1865, 411, 2382, 720, 2047, 720, 2047, 720, 2047, - /* 1130 */ 720, 2047, 437, 1685, 1695, 2265, 1653, 2265, 277, 314, - /* 1140 */ 1711, 1714, 1889, 824, 717, 158, 718, 2265, 320, 2025, - /* 1150 */ 422, 618, 617, 616, 158, 1629, 2265, 1627, 608, 143, - /* 1160 */ 612, 1864, 2030, 2265, 611, 76, 2265, 2051, 2265, 610, - /* 1170 */ 615, 391, 390, 787, 2265, 609, 2009, 641, 605, 2141, - /* 1180 */ 798, 796, 151, 1272, 1273, 94, 252, 1632, 1633, 250, - /* 1190 */ 1684, 1687, 1688, 1689, 1690, 1691, 1692, 1693, 1694, 732, - /* 1200 */ 728, 1703, 1704, 1706, 1707, 1708, 1709, 2, 48, 46, - /* 1210 */ 2298, 2043, 2406, 1773, 2265, 86, 415, 139, 1628, 55, - /* 1220 */ 158, 473, 1920, 737, 638, 2405, 637, 662, 1592, 85, - /* 1230 */ 2462, 1710, 254, 1626, 276, 253, 424, 423, 256, 258, - /* 1240 */ 694, 255, 257, 2286, 624, 111, 1642, 2468, 194, 50, - /* 1250 */ 1637, 2316, 2463, 688, 108, 1856, 1857, 1731, 50, 1710, - /* 1260 */ 1705, 1635, 272, 2265, 731, 736, 647, 14, 13, 190, - /* 1270 */ 1988, 282, 158, 1634, 690, 50, 1874, 2430, 99, 1914, - /* 1280 */ 703, 780, 781, 295, 675, 1780, 307, 73, 1705, 156, - /* 1290 */ 158, 50, 1686, 66, 1595, 141, 1636, 289, 1985, 829, - /* 1300 */ 2288, 1634, 15, 1984, 2297, 1345, 1343, 2333, 50, 744, - /* 1310 */ 114, 2299, 740, 2301, 2302, 735, 662, 730, 1326, 2462, - /* 1320 */ 398, 172, 2482, 1809, 2386, 156, 341, 726, 411, 2382, - /* 1330 */ 662, 822, 1808, 2462, 158, 2317, 2468, 194, 1712, 1713, - /* 1340 */ 428, 2463, 688, 338, 75, 284, 704, 74, 2165, 1545, - /* 1350 */ 2468, 194, 1905, 1910, 2088, 2463, 688, 365, 1327, 655, - /* 1360 */ 312, 712, 2420, 316, 1412, 1696, 700, 1747, 227, 538, - /* 1370 */ 536, 533, 1685, 1695, 297, 140, 156, 301, 294, 1711, - /* 1380 */ 1714, 5, 333, 1440, 431, 436, 379, 444, 445, 1660, - /* 1390 */ 453, 454, 202, 203, 1629, 205, 1627, 456, 1569, 1444, - /* 1400 */ 328, 1651, 470, 1652, 474, 217, 476, 1657, 1451, 63, - /* 1410 */ 482, 2166, 480, 1640, 487, 519, 501, 531, 508, 2158, - /* 1420 */ 518, 510, 1643, 532, 1638, 520, 1632, 1633, 529, 1684, - /* 1430 */ 1687, 1688, 1689, 1690, 1691, 1692, 1693, 1694, 732, 728, - /* 1440 */ 1703, 1704, 1706, 1707, 1708, 1709, 2, 64, 2298, 1449, - /* 1450 */ 161, 222, 221, 534, 1646, 1648, 535, 224, 537, 1639, - /* 1460 */ 1658, 737, 539, 554, 4, 555, 563, 728, 1703, 1704, - /* 1470 */ 1706, 1707, 1708, 1709, 565, 562, 232, 1654, 567, 1659, - /* 1480 */ 568, 1661, 571, 2298, 91, 1662, 235, 569, 238, 2316, - /* 1490 */ 2174, 627, 577, 83, 82, 465, 737, 240, 207, 695, - /* 1500 */ 92, 2265, 93, 736, 598, 628, 2298, 245, 360, 96, - /* 1510 */ 640, 457, 455, 600, 2037, 249, 2033, 116, 642, 737, - /* 1520 */ 152, 1655, 366, 251, 2316, 446, 164, 268, 443, 439, - /* 1530 */ 435, 432, 458, 165, 2035, 2031, 2265, 166, 736, 167, - /* 1540 */ 329, 2298, 2297, 2237, 2234, 2333, 271, 2316, 114, 2299, - /* 1550 */ 740, 2301, 2302, 735, 737, 730, 649, 2233, 650, 2265, - /* 1560 */ 2359, 736, 2386, 657, 654, 273, 411, 2382, 666, 2436, - /* 1570 */ 302, 676, 656, 710, 672, 2435, 2220, 2297, 2421, 2431, - /* 1580 */ 2333, 280, 2316, 114, 2299, 740, 2301, 2302, 735, 401, - /* 1590 */ 730, 283, 651, 679, 2265, 723, 736, 2386, 685, 8, - /* 1600 */ 2297, 411, 2382, 2333, 667, 665, 115, 2299, 740, 2301, - /* 1610 */ 2302, 735, 664, 730, 293, 402, 696, 693, 1656, 1778, - /* 1620 */ 2386, 1773, 145, 2402, 2385, 2382, 183, 1776, 330, 303, - /* 1630 */ 153, 708, 709, 2188, 2187, 2297, 291, 2298, 2333, 644, - /* 1640 */ 2408, 115, 2299, 740, 2301, 2302, 735, 290, 730, 2186, - /* 1650 */ 737, 407, 713, 288, 179, 2386, 292, 832, 197, 725, - /* 1660 */ 2382, 1, 331, 2298, 714, 154, 105, 332, 2048, 2461, - /* 1670 */ 62, 2367, 2485, 327, 107, 296, 734, 742, 2316, 2092, - /* 1680 */ 335, 2010, 1251, 323, 823, 826, 163, 371, 359, 185, - /* 1690 */ 2265, 828, 736, 53, 372, 344, 339, 820, 816, 812, - /* 1700 */ 808, 358, 324, 2257, 2316, 348, 2298, 337, 2256, 2255, - /* 1710 */ 80, 2250, 433, 1619, 434, 1620, 2265, 200, 736, 737, - /* 1720 */ 438, 2248, 440, 441, 1618, 442, 2247, 380, 2245, 447, - /* 1730 */ 2244, 738, 449, 2243, 2333, 451, 1608, 115, 2299, 740, - /* 1740 */ 2301, 2302, 735, 113, 730, 2224, 317, 2316, 204, 2223, - /* 1750 */ 206, 2386, 81, 1572, 1571, 374, 2382, 2297, 2201, 2265, - /* 1760 */ 2333, 736, 2200, 356, 2299, 740, 2301, 2302, 735, 733, - /* 1770 */ 730, 721, 2351, 2298, 2199, 463, 464, 2198, 716, 2197, - /* 1780 */ 2148, 468, 2140, 1515, 471, 2137, 737, 472, 209, 2136, - /* 1790 */ 2135, 84, 2134, 2139, 2138, 2133, 2132, 212, 2130, 2129, - /* 1800 */ 2297, 2128, 214, 2333, 488, 2127, 176, 2299, 740, 2301, - /* 1810 */ 2302, 735, 490, 730, 2316, 2143, 2298, 2126, 305, 2125, - /* 1820 */ 2124, 2123, 2122, 2145, 2121, 304, 2265, 2120, 736, 737, - /* 1830 */ 216, 2111, 2110, 90, 2109, 2108, 2144, 2142, 2298, 2119, - /* 1840 */ 2118, 2117, 2116, 2115, 269, 2114, 2113, 2112, 2107, 2106, - /* 1850 */ 1521, 737, 2105, 220, 2104, 2103, 2102, 2316, 522, 689, - /* 1860 */ 2483, 524, 2101, 368, 369, 1950, 1383, 2297, 223, 2265, - /* 1870 */ 2333, 736, 1387, 115, 2299, 740, 2301, 2302, 735, 2316, - /* 1880 */ 730, 2298, 1949, 1948, 399, 1946, 1943, 2386, 1379, 225, - /* 1890 */ 226, 2265, 2383, 736, 737, 540, 2298, 1942, 544, 542, - /* 1900 */ 1935, 546, 550, 548, 541, 1924, 552, 1900, 187, 737, - /* 1910 */ 2297, 2298, 228, 2333, 545, 549, 175, 2299, 740, 2301, - /* 1920 */ 2302, 735, 2316, 730, 737, 2285, 78, 400, 188, 1274, - /* 1930 */ 560, 1899, 2297, 230, 2265, 2333, 736, 2316, 357, 2299, - /* 1940 */ 740, 2301, 2302, 735, 79, 730, 2222, 2218, 2208, 2265, - /* 1950 */ 2196, 736, 2316, 237, 239, 2195, 2172, 242, 2026, 2428, - /* 1960 */ 1319, 1945, 1941, 578, 2265, 579, 736, 1939, 583, 580, - /* 1970 */ 582, 584, 1937, 586, 587, 2297, 588, 1934, 2333, 590, - /* 1980 */ 1919, 357, 2299, 740, 2301, 2302, 735, 592, 730, 591, - /* 1990 */ 2297, 2298, 1917, 2333, 65, 1455, 350, 2299, 740, 2301, - /* 2000 */ 2302, 735, 1918, 730, 737, 2297, 1916, 1896, 2333, 2298, - /* 2010 */ 2028, 176, 2299, 740, 2301, 2302, 735, 2027, 730, 1456, - /* 2020 */ 1370, 248, 734, 1369, 1367, 2298, 1365, 1364, 1363, 247, - /* 2030 */ 1362, 795, 2316, 1361, 797, 1356, 1358, 406, 737, 1932, - /* 2040 */ 1357, 684, 392, 1923, 2265, 178, 736, 393, 1355, 1921, - /* 2050 */ 2316, 394, 625, 593, 589, 585, 581, 622, 246, 1895, - /* 2060 */ 1894, 1893, 2265, 629, 736, 2484, 2316, 1892, 631, 1891, - /* 2070 */ 633, 414, 117, 1602, 1604, 1606, 29, 1601, 2265, 2221, - /* 2080 */ 736, 57, 69, 1582, 270, 2297, 2217, 1578, 2333, 2207, - /* 2090 */ 58, 357, 2299, 740, 2301, 2302, 735, 1580, 730, 95, - /* 2100 */ 169, 274, 244, 2297, 2298, 652, 2333, 2194, 653, 356, - /* 2110 */ 2299, 740, 2301, 2302, 735, 2193, 730, 737, 2352, 2297, - /* 2120 */ 658, 1557, 2333, 2467, 660, 357, 2299, 740, 2301, 2302, - /* 2130 */ 735, 1556, 730, 20, 31, 2298, 670, 1826, 279, 21, - /* 2140 */ 17, 6, 7, 22, 286, 2316, 668, 177, 737, 33, - /* 2150 */ 416, 281, 1807, 285, 287, 67, 24, 2265, 1799, 736, - /* 2160 */ 32, 2286, 100, 23, 1846, 1847, 234, 1841, 18, 1840, - /* 2170 */ 403, 1845, 1844, 404, 243, 236, 2316, 1770, 2298, 1769, - /* 2180 */ 299, 241, 570, 59, 60, 2192, 182, 2171, 2265, 102, - /* 2190 */ 736, 737, 306, 101, 25, 2170, 711, 1805, 2297, 308, - /* 2200 */ 233, 2333, 313, 70, 357, 2299, 740, 2301, 2302, 735, - /* 2210 */ 103, 730, 318, 315, 104, 26, 108, 1722, 11, 2316, - /* 2220 */ 13, 1721, 1644, 184, 198, 1732, 1700, 2336, 729, 639, - /* 2230 */ 39, 2265, 2333, 736, 1698, 352, 2299, 740, 2301, 2302, - /* 2240 */ 735, 1677, 730, 2298, 739, 1697, 16, 27, 743, 1669, - /* 2250 */ 28, 417, 1441, 1438, 745, 741, 737, 747, 2298, 748, - /* 2260 */ 750, 1437, 751, 753, 1434, 754, 756, 1428, 757, 759, - /* 2270 */ 760, 737, 2297, 2298, 1426, 2333, 1432, 1431, 342, 2299, - /* 2280 */ 740, 2301, 2302, 735, 2316, 730, 737, 109, 1430, 321, - /* 2290 */ 110, 1450, 1429, 1446, 77, 1317, 2265, 774, 736, 2316, - /* 2300 */ 1352, 1349, 1348, 1347, 1346, 1344, 1342, 1341, 1377, 1340, - /* 2310 */ 785, 2265, 322, 736, 2316, 1338, 1335, 1337, 1336, 1334, - /* 2320 */ 1333, 1332, 1374, 1372, 1329, 1328, 2265, 1325, 736, 1324, - /* 2330 */ 1323, 1940, 1322, 805, 1938, 807, 806, 2297, 809, 811, - /* 2340 */ 2333, 1936, 810, 340, 2299, 740, 2301, 2302, 735, 813, - /* 2350 */ 730, 814, 2297, 2298, 1933, 2333, 815, 817, 343, 2299, - /* 2360 */ 740, 2301, 2302, 735, 818, 730, 737, 2297, 819, 1915, - /* 2370 */ 2333, 2298, 821, 349, 2299, 740, 2301, 2302, 735, 1264, - /* 2380 */ 730, 1890, 1252, 825, 737, 326, 2298, 827, 1860, 1860, - /* 2390 */ 1630, 831, 336, 830, 2316, 1860, 1860, 1860, 1860, 737, - /* 2400 */ 1860, 1860, 1860, 1860, 1860, 1860, 2265, 1860, 736, 1860, - /* 2410 */ 1860, 1860, 2316, 1860, 1860, 1860, 1860, 1860, 1860, 1860, - /* 2420 */ 1860, 1860, 1860, 1860, 2265, 1860, 736, 2316, 1860, 2298, - /* 2430 */ 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 2265, - /* 2440 */ 1860, 736, 737, 1860, 1860, 1860, 1860, 2297, 1860, 1860, - /* 2450 */ 2333, 2298, 1860, 353, 2299, 740, 2301, 2302, 735, 1860, - /* 2460 */ 730, 1860, 1860, 1860, 737, 2297, 2298, 1860, 2333, 1860, - /* 2470 */ 2316, 345, 2299, 740, 2301, 2302, 735, 1860, 730, 737, - /* 2480 */ 2297, 1860, 2265, 2333, 736, 1860, 354, 2299, 740, 2301, - /* 2490 */ 2302, 735, 2316, 730, 1860, 1860, 1860, 1860, 1860, 1860, - /* 2500 */ 1860, 1860, 1860, 1860, 2265, 1860, 736, 2316, 1860, 1860, - /* 2510 */ 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 2265, - /* 2520 */ 1860, 736, 1860, 2297, 2298, 1860, 2333, 1860, 1860, 346, - /* 2530 */ 2299, 740, 2301, 2302, 735, 1860, 730, 737, 1860, 1860, - /* 2540 */ 1860, 1860, 1860, 1860, 1860, 2297, 1860, 1860, 2333, 2298, - /* 2550 */ 1860, 355, 2299, 740, 2301, 2302, 735, 1860, 730, 1860, - /* 2560 */ 2297, 1860, 737, 2333, 1860, 2316, 347, 2299, 740, 2301, - /* 2570 */ 2302, 735, 1860, 730, 1860, 1860, 1860, 2265, 1860, 736, - /* 2580 */ 1860, 2298, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, - /* 2590 */ 2316, 1860, 1860, 1860, 737, 1860, 1860, 1860, 1860, 1860, - /* 2600 */ 1860, 1860, 2265, 1860, 736, 1860, 1860, 2298, 1860, 1860, - /* 2610 */ 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 2297, 1860, - /* 2620 */ 737, 2333, 2316, 1860, 361, 2299, 740, 2301, 2302, 735, - /* 2630 */ 1860, 730, 1860, 1860, 2265, 1860, 736, 1860, 1860, 1860, - /* 2640 */ 1860, 1860, 1860, 2297, 1860, 1860, 2333, 1860, 2316, 362, - /* 2650 */ 2299, 740, 2301, 2302, 735, 1860, 730, 1860, 1860, 1860, - /* 2660 */ 2265, 1860, 736, 1860, 1860, 1860, 1860, 1860, 1860, 1860, - /* 2670 */ 1860, 1860, 1860, 1860, 1860, 2297, 1860, 2298, 2333, 1860, - /* 2680 */ 1860, 2310, 2299, 740, 2301, 2302, 735, 1860, 730, 1860, - /* 2690 */ 737, 1860, 2298, 1860, 1860, 1860, 1860, 1860, 1860, 1860, - /* 2700 */ 1860, 2297, 1860, 1860, 2333, 737, 1860, 2309, 2299, 740, - /* 2710 */ 2301, 2302, 735, 1860, 730, 2298, 1860, 1860, 2316, 1860, - /* 2720 */ 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 737, 1860, - /* 2730 */ 2265, 1860, 736, 2316, 1860, 2298, 1860, 1860, 1860, 1860, - /* 2740 */ 1860, 1860, 1860, 1860, 1860, 2265, 1860, 736, 737, 1860, - /* 2750 */ 1860, 1860, 1860, 1860, 1860, 1860, 2316, 1860, 1860, 1860, - /* 2760 */ 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 2265, 1860, - /* 2770 */ 736, 2297, 1860, 1860, 2333, 1860, 2316, 2308, 2299, 740, - /* 2780 */ 2301, 2302, 735, 1860, 730, 1860, 2297, 1860, 2265, 2333, - /* 2790 */ 736, 1860, 376, 2299, 740, 2301, 2302, 735, 1860, 730, - /* 2800 */ 2298, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 2297, - /* 2810 */ 1860, 1860, 2333, 737, 1860, 377, 2299, 740, 2301, 2302, - /* 2820 */ 735, 2298, 730, 1860, 1860, 1860, 1860, 1860, 1860, 2297, - /* 2830 */ 1860, 1860, 2333, 1860, 737, 373, 2299, 740, 2301, 2302, - /* 2840 */ 735, 2316, 730, 1860, 1860, 1860, 1860, 1860, 1860, 1860, - /* 2850 */ 1860, 1860, 1860, 2265, 1860, 736, 1860, 1860, 1860, 1860, - /* 2860 */ 1860, 1860, 2316, 1860, 1860, 1860, 1860, 1860, 1860, 1860, - /* 2870 */ 1860, 1860, 1860, 1860, 2265, 1860, 736, 1860, 2298, 1860, - /* 2880 */ 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, - /* 2890 */ 1860, 737, 1860, 1860, 2297, 1860, 1860, 2333, 1860, 1860, - /* 2900 */ 378, 2299, 740, 2301, 2302, 735, 1860, 730, 1860, 1860, - /* 2910 */ 1860, 1860, 1860, 1860, 1860, 738, 1860, 1860, 2333, 2316, - /* 2920 */ 1860, 352, 2299, 740, 2301, 2302, 735, 1860, 730, 1860, - /* 2930 */ 1860, 2265, 1860, 736, 1860, 1860, 1860, 1860, 1860, 1860, - /* 2940 */ 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, - /* 2950 */ 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, - /* 2960 */ 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, - /* 2970 */ 1860, 1860, 2297, 1860, 1860, 2333, 1860, 1860, 351, 2299, - /* 2980 */ 740, 2301, 2302, 735, 1860, 730, + /* 400 */ 367, 486, 485, 484, 2404, 479, 478, 382, 663, 2430, + /* 410 */ 2268, 1518, 1519, 699, 146, 1687, 1697, 1537, 2300, 1297, + /* 420 */ 1298, 2336, 1713, 1716, 114, 2302, 740, 2304, 2305, 735, + /* 430 */ 2399, 730, 1656, 302, 1861, 1655, 191, 1631, 2389, 1629, + /* 440 */ 41, 40, 411, 2385, 47, 45, 44, 43, 42, 2470, + /* 450 */ 699, 146, 1659, 37, 413, 1736, 1737, 1738, 1739, 1740, + /* 460 */ 1744, 1745, 1746, 1747, 1636, 2420, 1658, 302, 681, 1634, + /* 470 */ 1635, 9, 1686, 1689, 1690, 1691, 1692, 1693, 1694, 1695, + /* 480 */ 1696, 732, 728, 1705, 1706, 1708, 1709, 1710, 1711, 2, + /* 490 */ 12, 48, 46, 2301, 1550, 1551, 2319, 310, 311, 415, + /* 500 */ 12, 1630, 309, 699, 146, 1275, 737, 47, 45, 44, + /* 510 */ 43, 42, 687, 430, 1712, 2465, 1628, 1294, 429, 1293, + /* 520 */ 720, 2050, 701, 192, 2397, 2398, 2301, 144, 2402, 1273, + /* 530 */ 1274, 786, 686, 194, 2319, 1549, 1552, 2466, 688, 737, + /* 540 */ 137, 1916, 690, 1707, 1863, 1790, 2268, 604, 736, 19, + /* 550 */ 63, 1655, 1295, 1849, 1464, 1465, 1636, 680, 720, 2050, + /* 560 */ 193, 2397, 2398, 662, 144, 2402, 2465, 2319, 136, 135, + /* 570 */ 134, 133, 132, 131, 130, 129, 128, 187, 199, 2268, + /* 580 */ 517, 736, 829, 2471, 194, 15, 52, 2300, 2466, 688, + /* 590 */ 2336, 1530, 1531, 114, 2302, 740, 2304, 2305, 735, 462, + /* 600 */ 730, 2164, 1722, 149, 461, 155, 2360, 2389, 1655, 766, + /* 610 */ 278, 411, 2385, 195, 2397, 2398, 2183, 144, 2402, 1883, + /* 620 */ 2300, 1714, 1715, 2336, 300, 1658, 114, 2302, 740, 2304, + /* 630 */ 2305, 735, 2027, 730, 2181, 707, 189, 215, 2485, 190, + /* 640 */ 2389, 460, 219, 459, 411, 2385, 720, 2050, 2090, 662, + /* 650 */ 1891, 824, 2465, 41, 40, 1687, 1697, 47, 45, 44, + /* 660 */ 43, 42, 1713, 1716, 516, 515, 56, 646, 2039, 2471, + /* 670 */ 194, 1429, 2268, 458, 2466, 688, 229, 1631, 89, 1629, + /* 680 */ 559, 88, 1914, 720, 2050, 1420, 765, 764, 763, 1424, + /* 690 */ 762, 1426, 1427, 761, 758, 1775, 1435, 755, 1437, 1438, + /* 700 */ 752, 749, 746, 466, 44, 43, 42, 1688, 1814, 1634, + /* 710 */ 1635, 302, 1686, 1689, 1690, 1691, 1692, 1693, 1694, 1695, + /* 720 */ 1696, 732, 728, 1705, 1706, 1708, 1709, 1710, 1711, 2, + /* 730 */ 48, 46, 1717, 2301, 720, 2050, 1630, 1882, 415, 265, + /* 740 */ 1630, 566, 2222, 720, 2050, 87, 737, 302, 2427, 94, + /* 750 */ 2035, 1628, 1802, 1712, 467, 1628, 674, 673, 1812, 1813, + /* 760 */ 1815, 1816, 1817, 483, 1688, 2301, 385, 773, 160, 159, + /* 770 */ 770, 769, 768, 157, 2319, 2045, 2134, 2103, 737, 2261, + /* 780 */ 2440, 231, 1707, 300, 410, 559, 2268, 1914, 736, 2231, + /* 790 */ 2268, 1636, 2101, 720, 2050, 1636, 773, 160, 159, 770, + /* 800 */ 769, 768, 157, 2301, 41, 40, 2319, 646, 47, 45, + /* 810 */ 44, 43, 42, 498, 1599, 1600, 737, 829, 2268, 1277, + /* 820 */ 736, 829, 720, 2050, 49, 1654, 623, 2300, 106, 662, + /* 830 */ 2336, 1373, 2465, 114, 2302, 740, 2304, 2305, 735, 1881, + /* 840 */ 730, 635, 499, 266, 2319, 2485, 1880, 2389, 450, 2471, + /* 850 */ 194, 411, 2385, 2043, 2466, 688, 2268, 262, 736, 2300, + /* 860 */ 1714, 1715, 2336, 2037, 2278, 114, 2302, 740, 2304, 2305, + /* 870 */ 735, 1375, 730, 626, 1659, 452, 448, 2485, 2041, 2389, + /* 880 */ 620, 648, 2222, 411, 2385, 12, 259, 10, 2282, 720, + /* 890 */ 2050, 2249, 2268, 2033, 1687, 1697, 1743, 2300, 2103, 2268, + /* 900 */ 2336, 1713, 1716, 114, 2302, 740, 2304, 2305, 735, 500, + /* 910 */ 730, 2025, 1631, 715, 1629, 2364, 1631, 2389, 1629, 2278, + /* 920 */ 418, 411, 2385, 1879, 2103, 1384, 1388, 72, 171, 1659, + /* 930 */ 71, 419, 2284, 2287, 661, 2103, 2052, 493, 2262, 2101, + /* 940 */ 1383, 1387, 730, 2282, 1634, 1635, 492, 1878, 1634, 1635, + /* 950 */ 2102, 1686, 1689, 1690, 1691, 1692, 1693, 1694, 1695, 1696, + /* 960 */ 732, 728, 1705, 1706, 1708, 1709, 1710, 1711, 2, 48, + /* 970 */ 46, 2301, 1877, 1783, 170, 35, 2268, 415, 1874, 1630, + /* 980 */ 148, 720, 2050, 2360, 737, 1748, 669, 2284, 662, 1991, + /* 990 */ 2470, 2465, 1712, 2465, 1628, 389, 388, 730, 720, 2050, + /* 1000 */ 2268, 575, 2470, 694, 2301, 2465, 528, 530, 2471, 194, + /* 1010 */ 691, 2469, 2319, 2466, 688, 2466, 2468, 737, 2047, 2458, + /* 1020 */ 722, 1707, 2361, 2469, 2268, 2268, 736, 2466, 2467, 14, + /* 1030 */ 13, 2268, 211, 1873, 1636, 720, 2050, 767, 720, 2050, + /* 1040 */ 2094, 720, 2050, 2409, 1775, 2319, 773, 160, 159, 770, + /* 1050 */ 769, 768, 157, 595, 594, 267, 1655, 2268, 275, 736, + /* 1060 */ 829, 705, 61, 49, 1872, 2300, 387, 386, 2336, 601, + /* 1070 */ 659, 114, 2302, 740, 2304, 2305, 735, 1871, 730, 1950, + /* 1080 */ 421, 614, 613, 2485, 1870, 2389, 2268, 277, 171, 411, + /* 1090 */ 2385, 603, 720, 2050, 1869, 602, 2052, 1868, 2300, 1714, + /* 1100 */ 1715, 2336, 2054, 1867, 114, 2302, 740, 2304, 2305, 735, + /* 1110 */ 1866, 730, 314, 597, 596, 201, 2485, 2268, 2389, 720, + /* 1120 */ 2050, 727, 411, 2385, 720, 2050, 720, 2050, 720, 2050, + /* 1130 */ 2268, 798, 796, 1687, 1697, 1755, 724, 2268, 2361, 717, + /* 1140 */ 1713, 1716, 94, 158, 718, 603, 320, 2268, 422, 602, + /* 1150 */ 2268, 618, 617, 616, 3, 1631, 2268, 1629, 608, 143, + /* 1160 */ 612, 76, 334, 2268, 611, 2080, 54, 1917, 2046, 610, + /* 1170 */ 615, 391, 390, 771, 139, 609, 2094, 641, 605, 772, + /* 1180 */ 787, 2252, 2094, 2012, 2144, 1639, 85, 1634, 1635, 2028, + /* 1190 */ 1686, 1689, 1690, 1691, 1692, 1693, 1694, 1695, 1696, 732, + /* 1200 */ 728, 1705, 1706, 1708, 1709, 1710, 1711, 2, 48, 46, + /* 1210 */ 2301, 86, 1688, 1934, 276, 158, 415, 55, 1630, 822, + /* 1220 */ 158, 252, 151, 737, 250, 2408, 473, 662, 1858, 1859, + /* 1230 */ 2465, 1712, 437, 1628, 1925, 619, 424, 423, 1782, 254, + /* 1240 */ 256, 258, 253, 255, 257, 606, 1644, 2471, 194, 1923, + /* 1250 */ 607, 2319, 2466, 688, 1638, 638, 621, 637, 99, 1712, + /* 1260 */ 1707, 1637, 695, 2268, 272, 736, 647, 692, 2289, 1370, + /* 1270 */ 731, 624, 50, 1636, 1368, 50, 14, 13, 282, 158, + /* 1280 */ 703, 1733, 780, 1876, 50, 307, 75, 156, 1707, 1594, + /* 1290 */ 158, 66, 50, 50, 1597, 2433, 111, 141, 295, 829, + /* 1300 */ 744, 1636, 15, 156, 2300, 108, 1347, 2336, 781, 158, + /* 1310 */ 114, 2302, 740, 2304, 2305, 735, 662, 730, 140, 2465, + /* 1320 */ 675, 172, 2485, 156, 2389, 2291, 341, 726, 411, 2385, + /* 1330 */ 662, 289, 1345, 2465, 1907, 1988, 2471, 194, 1714, 1715, + /* 1340 */ 1987, 2466, 688, 338, 74, 1328, 1811, 73, 1642, 1810, + /* 1350 */ 2471, 194, 284, 704, 2320, 2466, 688, 365, 1547, 312, + /* 1360 */ 712, 316, 398, 428, 1414, 1749, 1698, 333, 227, 538, + /* 1370 */ 536, 533, 1687, 1697, 1442, 2168, 1913, 1446, 2091, 1713, + /* 1380 */ 1716, 655, 2423, 1453, 700, 1329, 297, 294, 5, 301, + /* 1390 */ 436, 431, 1451, 379, 1631, 444, 1629, 161, 445, 1662, + /* 1400 */ 454, 453, 203, 202, 205, 1571, 328, 456, 1653, 63, + /* 1410 */ 470, 1654, 217, 474, 476, 1659, 2169, 1641, 480, 482, + /* 1420 */ 487, 501, 1645, 519, 1640, 508, 1634, 1635, 2161, 1686, + /* 1430 */ 1689, 1690, 1691, 1692, 1693, 1694, 1695, 1696, 732, 728, + /* 1440 */ 1705, 1706, 1708, 1709, 1710, 1711, 2, 64, 2301, 510, + /* 1450 */ 518, 520, 531, 532, 1648, 1650, 529, 221, 222, 535, + /* 1460 */ 534, 737, 224, 537, 539, 1660, 554, 728, 1705, 1706, + /* 1470 */ 1708, 1709, 1710, 1711, 4, 562, 555, 563, 565, 1656, + /* 1480 */ 232, 567, 1661, 2301, 91, 235, 568, 1663, 569, 2319, + /* 1490 */ 571, 1664, 238, 83, 82, 465, 737, 577, 207, 2177, + /* 1500 */ 598, 2268, 240, 736, 627, 92, 2301, 93, 245, 116, + /* 1510 */ 628, 457, 455, 360, 600, 2040, 249, 640, 2036, 737, + /* 1520 */ 96, 642, 366, 251, 2319, 446, 329, 152, 443, 439, + /* 1530 */ 435, 432, 458, 164, 165, 2038, 2268, 268, 736, 1657, + /* 1540 */ 2034, 2301, 2300, 166, 167, 2336, 650, 2319, 114, 2302, + /* 1550 */ 740, 2304, 2305, 735, 737, 730, 676, 2240, 2237, 2268, + /* 1560 */ 2362, 736, 2389, 2236, 649, 273, 411, 2385, 654, 666, + /* 1570 */ 302, 657, 2439, 710, 271, 2223, 651, 2300, 2438, 8, + /* 1580 */ 2336, 672, 2319, 114, 2302, 740, 2304, 2305, 735, 656, + /* 1590 */ 730, 2424, 2434, 280, 2268, 723, 736, 2389, 283, 685, + /* 1600 */ 2300, 411, 2385, 2336, 401, 679, 115, 2302, 740, 2304, + /* 1610 */ 2305, 735, 667, 730, 665, 664, 293, 402, 2488, 1658, + /* 1620 */ 2389, 696, 693, 1775, 2388, 2385, 145, 1780, 1778, 303, + /* 1630 */ 2405, 153, 708, 184, 330, 2300, 709, 2301, 2336, 644, + /* 1640 */ 2411, 115, 2302, 740, 2304, 2305, 735, 290, 730, 331, + /* 1650 */ 737, 2191, 1, 288, 179, 2389, 291, 832, 292, 725, + /* 1660 */ 2385, 713, 2190, 2301, 197, 154, 332, 2189, 105, 2464, + /* 1670 */ 714, 2051, 296, 327, 407, 62, 734, 2370, 2319, 107, + /* 1680 */ 742, 2095, 335, 2013, 323, 1252, 826, 823, 163, 186, + /* 1690 */ 2268, 828, 736, 359, 371, 344, 53, 820, 816, 812, + /* 1700 */ 808, 358, 324, 372, 2319, 337, 2301, 348, 339, 2260, + /* 1710 */ 2259, 2258, 80, 2253, 434, 433, 2268, 1621, 736, 737, + /* 1720 */ 1622, 200, 438, 2251, 440, 441, 442, 1620, 2250, 380, + /* 1730 */ 2248, 738, 447, 2247, 2336, 2246, 449, 115, 2302, 740, + /* 1740 */ 2304, 2305, 735, 113, 730, 451, 317, 2319, 1610, 2227, + /* 1750 */ 204, 2389, 2226, 206, 1574, 374, 2385, 2300, 81, 2268, + /* 1760 */ 2336, 736, 1573, 356, 2302, 740, 2304, 2305, 735, 733, + /* 1770 */ 730, 721, 2354, 2301, 2204, 2203, 2202, 463, 716, 464, + /* 1780 */ 2201, 2200, 2151, 468, 2143, 1517, 737, 471, 472, 2140, + /* 1790 */ 209, 2139, 84, 2138, 2137, 2142, 2141, 212, 2136, 2135, + /* 1800 */ 2300, 2133, 2132, 2336, 2131, 214, 176, 2302, 740, 2304, + /* 1810 */ 2305, 735, 2130, 730, 2319, 488, 2301, 490, 305, 2146, + /* 1820 */ 2129, 2128, 2127, 2126, 2125, 304, 2268, 2148, 736, 737, + /* 1830 */ 90, 216, 2114, 2113, 2112, 2111, 2147, 2145, 2301, 2124, + /* 1840 */ 2123, 2122, 2121, 2120, 269, 2119, 2118, 2117, 2116, 2115, + /* 1850 */ 2110, 737, 2109, 1523, 2108, 2107, 2106, 2319, 522, 689, + /* 1860 */ 2486, 524, 220, 2105, 2104, 368, 1385, 2300, 369, 2268, + /* 1870 */ 2336, 736, 1953, 115, 2302, 740, 2304, 2305, 735, 2319, + /* 1880 */ 730, 2301, 1389, 1952, 399, 1951, 1949, 2389, 1381, 223, + /* 1890 */ 225, 2268, 2386, 736, 737, 540, 2301, 1946, 1945, 542, + /* 1900 */ 1938, 546, 226, 544, 541, 548, 1927, 550, 552, 737, + /* 1910 */ 2300, 2301, 545, 2336, 1902, 228, 175, 2302, 740, 2304, + /* 1920 */ 2305, 735, 2319, 730, 737, 549, 78, 400, 2288, 182, + /* 1930 */ 188, 1276, 2300, 1901, 2268, 2336, 736, 2319, 357, 2302, + /* 1940 */ 740, 2304, 2305, 735, 230, 730, 79, 2225, 560, 2268, + /* 1950 */ 2221, 736, 2319, 2211, 2199, 237, 239, 2198, 242, 2431, + /* 1960 */ 2175, 2029, 1321, 1948, 2268, 1944, 736, 578, 580, 579, + /* 1970 */ 1942, 582, 583, 584, 1940, 2300, 586, 588, 2336, 587, + /* 1980 */ 1937, 357, 2302, 740, 2304, 2305, 735, 591, 730, 590, + /* 1990 */ 2300, 2301, 1922, 2336, 65, 1458, 350, 2302, 740, 2304, + /* 2000 */ 2305, 735, 1920, 730, 737, 2300, 592, 1921, 2336, 2301, + /* 2010 */ 1919, 176, 2302, 740, 2304, 2305, 735, 1898, 730, 2031, + /* 2020 */ 248, 1457, 734, 1372, 1371, 2301, 2030, 1369, 1367, 247, + /* 2030 */ 1366, 1358, 2319, 1365, 1364, 1363, 795, 406, 737, 797, + /* 2040 */ 1935, 684, 392, 1926, 2268, 178, 736, 393, 1360, 1359, + /* 2050 */ 2319, 1357, 1924, 593, 589, 585, 581, 622, 246, 394, + /* 2060 */ 1897, 625, 2268, 1896, 736, 2487, 2319, 1895, 629, 1894, + /* 2070 */ 631, 414, 1893, 633, 117, 1608, 1604, 29, 2268, 1606, + /* 2080 */ 736, 1603, 2224, 57, 69, 2300, 2220, 1584, 2336, 58, + /* 2090 */ 270, 357, 2302, 740, 2304, 2305, 735, 1582, 730, 95, + /* 2100 */ 2210, 1580, 244, 2300, 2301, 652, 2336, 653, 169, 356, + /* 2110 */ 2302, 740, 2304, 2305, 735, 2197, 730, 737, 2355, 2300, + /* 2120 */ 2196, 274, 2336, 1559, 2470, 357, 2302, 740, 2304, 2305, + /* 2130 */ 735, 658, 730, 1558, 660, 2301, 31, 20, 279, 17, + /* 2140 */ 6, 1828, 7, 281, 21, 2319, 22, 286, 737, 668, + /* 2150 */ 416, 670, 33, 1809, 177, 287, 285, 2268, 2289, 736, + /* 2160 */ 1801, 32, 100, 67, 23, 1848, 234, 24, 1849, 1843, + /* 2170 */ 1842, 299, 403, 1847, 243, 236, 2319, 1846, 2301, 404, + /* 2180 */ 1772, 241, 570, 1771, 18, 59, 60, 183, 2268, 2195, + /* 2190 */ 736, 737, 2174, 101, 102, 25, 2173, 308, 2300, 313, + /* 2200 */ 233, 2336, 306, 1807, 357, 2302, 740, 2304, 2305, 735, + /* 2210 */ 711, 730, 103, 70, 104, 315, 108, 318, 26, 2319, + /* 2220 */ 1724, 11, 13, 2339, 1646, 1734, 185, 1723, 198, 639, + /* 2230 */ 729, 2268, 2336, 736, 1702, 352, 2302, 740, 2304, 2305, + /* 2240 */ 735, 1679, 730, 2301, 1700, 39, 741, 739, 1699, 16, + /* 2250 */ 27, 743, 1671, 28, 417, 1443, 737, 745, 2301, 747, + /* 2260 */ 750, 1440, 748, 753, 1439, 751, 756, 759, 1436, 754, + /* 2270 */ 757, 737, 2300, 2301, 1430, 2336, 1428, 760, 342, 2302, + /* 2280 */ 740, 2304, 2305, 735, 2319, 730, 737, 109, 321, 1434, + /* 2290 */ 110, 1452, 1433, 1432, 77, 1448, 2268, 774, 736, 2319, + /* 2300 */ 1431, 1354, 1319, 1351, 1350, 1349, 1348, 1346, 1344, 1343, + /* 2310 */ 785, 2268, 1342, 736, 2319, 1379, 322, 1340, 1339, 1338, + /* 2320 */ 1337, 1336, 1335, 1334, 1376, 1374, 2268, 1331, 736, 1330, + /* 2330 */ 1327, 1326, 1325, 1324, 1943, 1941, 805, 2300, 806, 807, + /* 2340 */ 2336, 809, 810, 340, 2302, 740, 2304, 2305, 735, 811, + /* 2350 */ 730, 1939, 2300, 2301, 813, 2336, 814, 815, 343, 2302, + /* 2360 */ 740, 2304, 2305, 735, 1936, 730, 737, 2300, 817, 818, + /* 2370 */ 2336, 2301, 819, 349, 2302, 740, 2304, 2305, 735, 1918, + /* 2380 */ 730, 1892, 821, 1265, 737, 1253, 2301, 825, 326, 827, + /* 2390 */ 1862, 1632, 336, 830, 2319, 831, 1862, 1862, 1862, 737, + /* 2400 */ 1862, 1862, 1862, 1862, 1862, 1862, 2268, 1862, 736, 1862, + /* 2410 */ 1862, 1862, 2319, 1862, 1862, 1862, 1862, 1862, 1862, 1862, + /* 2420 */ 1862, 1862, 1862, 1862, 2268, 1862, 736, 2319, 1862, 2301, + /* 2430 */ 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 2268, + /* 2440 */ 1862, 736, 737, 1862, 1862, 1862, 1862, 2300, 1862, 1862, + /* 2450 */ 2336, 2301, 1862, 353, 2302, 740, 2304, 2305, 735, 1862, + /* 2460 */ 730, 1862, 1862, 1862, 737, 2300, 2301, 1862, 2336, 1862, + /* 2470 */ 2319, 345, 2302, 740, 2304, 2305, 735, 1862, 730, 737, + /* 2480 */ 2300, 1862, 2268, 2336, 736, 1862, 354, 2302, 740, 2304, + /* 2490 */ 2305, 735, 2319, 730, 1862, 1862, 1862, 1862, 1862, 1862, + /* 2500 */ 1862, 1862, 1862, 1862, 2268, 1862, 736, 2319, 1862, 1862, + /* 2510 */ 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 2268, + /* 2520 */ 1862, 736, 1862, 2300, 2301, 1862, 2336, 1862, 1862, 346, + /* 2530 */ 2302, 740, 2304, 2305, 735, 1862, 730, 737, 1862, 1862, + /* 2540 */ 1862, 1862, 1862, 1862, 1862, 2300, 1862, 1862, 2336, 2301, + /* 2550 */ 1862, 355, 2302, 740, 2304, 2305, 735, 1862, 730, 1862, + /* 2560 */ 2300, 1862, 737, 2336, 1862, 2319, 347, 2302, 740, 2304, + /* 2570 */ 2305, 735, 1862, 730, 1862, 1862, 1862, 2268, 1862, 736, + /* 2580 */ 1862, 2301, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, + /* 2590 */ 2319, 1862, 1862, 1862, 737, 1862, 1862, 1862, 1862, 1862, + /* 2600 */ 1862, 1862, 2268, 1862, 736, 1862, 1862, 2301, 1862, 1862, + /* 2610 */ 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 2300, 1862, + /* 2620 */ 737, 2336, 2319, 1862, 361, 2302, 740, 2304, 2305, 735, + /* 2630 */ 1862, 730, 1862, 1862, 2268, 1862, 736, 1862, 1862, 1862, + /* 2640 */ 1862, 1862, 1862, 2300, 1862, 1862, 2336, 1862, 2319, 362, + /* 2650 */ 2302, 740, 2304, 2305, 735, 1862, 730, 1862, 1862, 1862, + /* 2660 */ 2268, 1862, 736, 1862, 1862, 1862, 1862, 1862, 1862, 1862, + /* 2670 */ 1862, 1862, 1862, 1862, 1862, 2300, 1862, 2301, 2336, 1862, + /* 2680 */ 1862, 2313, 2302, 740, 2304, 2305, 735, 1862, 730, 1862, + /* 2690 */ 737, 1862, 2301, 1862, 1862, 1862, 1862, 1862, 1862, 1862, + /* 2700 */ 1862, 2300, 1862, 1862, 2336, 737, 1862, 2312, 2302, 740, + /* 2710 */ 2304, 2305, 735, 1862, 730, 2301, 1862, 1862, 2319, 1862, + /* 2720 */ 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 737, 1862, + /* 2730 */ 2268, 1862, 736, 2319, 1862, 2301, 1862, 1862, 1862, 1862, + /* 2740 */ 1862, 1862, 1862, 1862, 1862, 2268, 1862, 736, 737, 1862, + /* 2750 */ 1862, 1862, 1862, 1862, 1862, 1862, 2319, 1862, 1862, 1862, + /* 2760 */ 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 2268, 1862, + /* 2770 */ 736, 2300, 1862, 1862, 2336, 1862, 2319, 2311, 2302, 740, + /* 2780 */ 2304, 2305, 735, 1862, 730, 1862, 2300, 1862, 2268, 2336, + /* 2790 */ 736, 1862, 376, 2302, 740, 2304, 2305, 735, 1862, 730, + /* 2800 */ 2301, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 2300, + /* 2810 */ 1862, 1862, 2336, 737, 1862, 377, 2302, 740, 2304, 2305, + /* 2820 */ 735, 2301, 730, 1862, 1862, 1862, 1862, 1862, 1862, 2300, + /* 2830 */ 1862, 1862, 2336, 1862, 737, 373, 2302, 740, 2304, 2305, + /* 2840 */ 735, 2319, 730, 1862, 1862, 1862, 1862, 1862, 1862, 1862, + /* 2850 */ 1862, 1862, 1862, 2268, 1862, 736, 1862, 1862, 1862, 1862, + /* 2860 */ 1862, 1862, 2319, 1862, 1862, 1862, 1862, 1862, 1862, 1862, + /* 2870 */ 1862, 1862, 1862, 1862, 2268, 1862, 736, 1862, 2301, 1862, + /* 2880 */ 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, + /* 2890 */ 1862, 737, 1862, 1862, 2300, 1862, 1862, 2336, 1862, 1862, + /* 2900 */ 378, 2302, 740, 2304, 2305, 735, 1862, 730, 1862, 1862, + /* 2910 */ 1862, 1862, 1862, 1862, 1862, 738, 1862, 1862, 2336, 2319, + /* 2920 */ 1862, 352, 2302, 740, 2304, 2305, 735, 1862, 730, 1862, + /* 2930 */ 1862, 2268, 1862, 736, 1862, 1862, 1862, 1862, 1862, 1862, + /* 2940 */ 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, + /* 2950 */ 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, + /* 2960 */ 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, + /* 2970 */ 1862, 1862, 2300, 1862, 1862, 2336, 1862, 1862, 351, 2302, + /* 2980 */ 740, 2304, 2305, 735, 1862, 730, }; static const YYCODETYPE yy_lookahead[] = { /* 0 */ 463, 464, 381, 360, 389, 355, 360, 361, 358, 359, /* 10 */ 389, 396, 12, 13, 14, 12, 13, 396, 397, 404, /* 20 */ 20, 20, 22, 8, 9, 404, 380, 12, 13, 14, - /* 30 */ 15, 16, 2, 387, 348, 35, 0, 37, 8, 9, - /* 40 */ 37, 4, 12, 13, 14, 15, 16, 348, 405, 406, - /* 50 */ 458, 408, 389, 461, 21, 412, 42, 360, 361, 396, - /* 60 */ 361, 389, 4, 398, 64, 0, 401, 404, 396, 36, - /* 70 */ 70, 38, 39, 40, 8, 9, 404, 77, 12, 13, - /* 80 */ 14, 15, 16, 46, 47, 48, 21, 401, 389, 24, + /* 30 */ 15, 16, 2, 387, 20, 35, 0, 37, 8, 9, + /* 40 */ 37, 389, 12, 13, 14, 15, 16, 348, 405, 406, + /* 50 */ 447, 408, 389, 370, 21, 412, 404, 360, 361, 396, + /* 60 */ 361, 378, 4, 389, 64, 0, 20, 404, 22, 36, + /* 70 */ 70, 38, 39, 40, 8, 9, 473, 77, 12, 13, + /* 80 */ 14, 15, 16, 37, 20, 411, 21, 413, 389, 24, /* 90 */ 25, 26, 27, 28, 29, 30, 31, 32, 20, 33, - /* 100 */ 401, 355, 403, 103, 358, 359, 106, 14, 72, 73, + /* 100 */ 401, 55, 403, 103, 360, 361, 106, 14, 72, 73, /* 110 */ 74, 75, 76, 20, 78, 79, 80, 81, 82, 83, /* 120 */ 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, - /* 130 */ 94, 95, 96, 97, 98, 99, 20, 474, 360, 361, + /* 130 */ 94, 95, 96, 97, 98, 99, 348, 474, 360, 361, /* 140 */ 477, 442, 142, 143, 445, 360, 20, 448, 449, 450, - /* 150 */ 451, 452, 453, 348, 455, 360, 361, 494, 495, 460, + /* 150 */ 451, 452, 453, 409, 455, 360, 361, 494, 495, 460, /* 160 */ 403, 462, 499, 500, 106, 466, 467, 470, 471, 472, - /* 170 */ 37, 474, 475, 107, 477, 418, 176, 177, 421, 422, - /* 180 */ 481, 370, 51, 183, 184, 377, 20, 409, 489, 378, - /* 190 */ 59, 494, 495, 62, 63, 389, 499, 500, 198, 391, - /* 200 */ 200, 416, 417, 200, 409, 190, 401, 8, 9, 401, - /* 210 */ 77, 12, 13, 14, 15, 16, 20, 411, 21, 413, + /* 170 */ 106, 474, 475, 107, 477, 418, 176, 177, 421, 422, + /* 180 */ 481, 69, 51, 183, 184, 377, 20, 409, 489, 401, + /* 190 */ 59, 494, 495, 62, 63, 0, 499, 500, 198, 391, + /* 200 */ 200, 416, 417, 200, 409, 190, 447, 8, 9, 401, + /* 210 */ 20, 12, 13, 14, 15, 16, 402, 403, 21, 106, /* 220 */ 20, 24, 25, 26, 27, 28, 29, 30, 31, 32, - /* 230 */ 230, 231, 106, 233, 234, 235, 236, 237, 238, 239, + /* 230 */ 230, 231, 473, 233, 234, 235, 236, 237, 238, 239, /* 240 */ 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, - /* 250 */ 250, 12, 13, 445, 446, 182, 18, 69, 20, 20, - /* 260 */ 20, 22, 22, 455, 389, 27, 348, 399, 30, 70, - /* 270 */ 402, 403, 106, 35, 35, 20, 37, 8, 9, 361, - /* 280 */ 266, 12, 13, 14, 15, 16, 137, 2, 413, 51, - /* 290 */ 141, 53, 403, 8, 9, 55, 58, 12, 13, 14, - /* 300 */ 15, 16, 22, 64, 1, 2, 106, 389, 293, 70, - /* 310 */ 421, 422, 13, 114, 360, 361, 77, 37, 20, 401, - /* 320 */ 22, 403, 8, 9, 348, 267, 12, 13, 14, 15, - /* 330 */ 16, 72, 73, 74, 380, 37, 37, 361, 79, 80, - /* 340 */ 81, 387, 103, 105, 85, 106, 273, 274, 275, 90, - /* 350 */ 91, 92, 93, 55, 116, 96, 207, 69, 99, 210, + /* 250 */ 250, 12, 13, 445, 446, 182, 18, 3, 20, 20, + /* 260 */ 347, 22, 349, 455, 69, 27, 348, 355, 30, 70, + /* 270 */ 358, 359, 106, 35, 35, 172, 37, 8, 9, 361, + /* 280 */ 69, 12, 13, 14, 15, 16, 137, 2, 348, 51, + /* 290 */ 141, 53, 4, 8, 9, 389, 58, 12, 13, 14, + /* 300 */ 15, 16, 396, 64, 381, 202, 106, 389, 293, 70, + /* 310 */ 404, 23, 389, 114, 399, 34, 77, 402, 403, 401, + /* 320 */ 397, 403, 8, 9, 348, 267, 12, 13, 14, 15, + /* 330 */ 16, 72, 73, 74, 46, 47, 48, 361, 79, 80, + /* 340 */ 81, 401, 103, 105, 85, 106, 273, 274, 275, 90, + /* 350 */ 91, 92, 93, 116, 116, 96, 207, 348, 99, 210, /* 360 */ 442, 367, 213, 445, 215, 389, 448, 449, 450, 451, - /* 370 */ 452, 453, 20, 455, 175, 251, 107, 401, 384, 403, - /* 380 */ 116, 142, 143, 103, 146, 147, 392, 149, 150, 151, + /* 370 */ 452, 453, 20, 455, 175, 389, 107, 401, 384, 403, + /* 380 */ 267, 142, 143, 397, 146, 147, 392, 149, 150, 151, /* 390 */ 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, /* 400 */ 162, 163, 164, 165, 447, 167, 168, 169, 490, 491, - /* 410 */ 107, 173, 174, 360, 361, 176, 177, 179, 442, 360, - /* 420 */ 361, 445, 183, 184, 448, 449, 450, 451, 452, 453, - /* 430 */ 473, 455, 20, 267, 345, 86, 460, 198, 462, 200, + /* 410 */ 401, 173, 174, 360, 361, 176, 177, 179, 442, 56, + /* 420 */ 57, 445, 183, 184, 448, 449, 450, 451, 452, 453, + /* 430 */ 473, 455, 20, 267, 345, 20, 460, 198, 462, 200, /* 440 */ 8, 9, 466, 467, 12, 13, 14, 15, 16, 3, /* 450 */ 360, 361, 20, 254, 255, 256, 257, 258, 259, 260, - /* 460 */ 261, 262, 263, 264, 77, 489, 20, 267, 409, 230, - /* 470 */ 231, 0, 233, 234, 235, 236, 237, 238, 239, 240, + /* 460 */ 261, 262, 263, 264, 77, 489, 20, 267, 361, 230, + /* 470 */ 231, 42, 233, 234, 235, 236, 237, 238, 239, 240, /* 480 */ 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, - /* 490 */ 251, 12, 13, 348, 142, 143, 367, 148, 347, 20, - /* 500 */ 349, 22, 193, 360, 361, 106, 361, 12, 13, 14, - /* 510 */ 15, 16, 474, 424, 35, 477, 37, 360, 429, 170, - /* 520 */ 171, 392, 469, 470, 471, 472, 348, 474, 475, 220, - /* 530 */ 221, 447, 494, 495, 389, 183, 184, 499, 500, 361, - /* 540 */ 388, 363, 398, 64, 0, 401, 401, 20, 403, 70, - /* 550 */ 106, 447, 400, 107, 142, 143, 77, 473, 360, 361, + /* 490 */ 251, 12, 13, 348, 142, 143, 389, 136, 137, 20, + /* 500 */ 251, 22, 141, 360, 361, 23, 361, 12, 13, 14, + /* 510 */ 15, 16, 474, 424, 35, 477, 37, 20, 429, 22, + /* 520 */ 360, 361, 469, 470, 471, 472, 348, 474, 475, 47, + /* 530 */ 48, 77, 494, 495, 389, 183, 184, 499, 500, 361, + /* 540 */ 380, 363, 288, 64, 0, 14, 401, 387, 403, 70, + /* 550 */ 106, 20, 55, 107, 142, 143, 77, 450, 360, 361, /* 560 */ 470, 471, 472, 474, 474, 475, 477, 389, 24, 25, - /* 570 */ 26, 27, 28, 29, 30, 31, 32, 473, 380, 401, - /* 580 */ 0, 403, 103, 494, 495, 106, 106, 442, 499, 500, - /* 590 */ 445, 434, 435, 448, 449, 450, 451, 452, 453, 424, - /* 600 */ 455, 389, 22, 458, 429, 460, 461, 462, 396, 116, - /* 610 */ 178, 466, 467, 470, 471, 472, 404, 474, 475, 14, + /* 570 */ 26, 27, 28, 29, 30, 31, 32, 389, 380, 401, + /* 580 */ 86, 403, 103, 494, 495, 106, 106, 442, 499, 500, + /* 590 */ 445, 176, 177, 448, 449, 450, 451, 452, 453, 424, + /* 600 */ 455, 413, 14, 458, 429, 460, 461, 462, 20, 116, + /* 610 */ 178, 466, 467, 470, 471, 472, 403, 474, 475, 348, /* 620 */ 442, 142, 143, 445, 178, 20, 448, 449, 450, 451, - /* 630 */ 452, 453, 0, 455, 136, 137, 33, 64, 460, 141, - /* 640 */ 462, 197, 356, 199, 466, 467, 360, 77, 362, 474, - /* 650 */ 402, 403, 477, 8, 9, 176, 177, 12, 13, 14, - /* 660 */ 15, 16, 183, 184, 360, 361, 267, 360, 389, 494, - /* 670 */ 495, 103, 390, 229, 499, 500, 356, 198, 105, 200, - /* 680 */ 360, 108, 362, 404, 380, 117, 118, 119, 120, 121, - /* 690 */ 122, 123, 124, 125, 126, 224, 128, 129, 130, 131, - /* 700 */ 132, 133, 134, 176, 177, 14, 15, 16, 230, 230, + /* 630 */ 452, 453, 0, 455, 421, 422, 388, 64, 460, 430, + /* 640 */ 462, 197, 148, 199, 466, 467, 360, 361, 400, 474, + /* 650 */ 351, 352, 477, 8, 9, 176, 177, 12, 13, 14, + /* 660 */ 15, 16, 183, 184, 170, 171, 380, 360, 390, 494, + /* 670 */ 495, 103, 401, 229, 499, 500, 356, 198, 105, 200, + /* 680 */ 360, 108, 362, 360, 361, 117, 118, 119, 120, 121, + /* 690 */ 122, 123, 124, 125, 126, 266, 128, 129, 130, 131, + /* 700 */ 132, 133, 134, 380, 14, 15, 16, 176, 230, 230, /* 710 */ 231, 267, 233, 234, 235, 236, 237, 238, 239, 240, /* 720 */ 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, - /* 730 */ 12, 13, 14, 348, 360, 361, 22, 348, 20, 34, + /* 730 */ 12, 13, 14, 348, 360, 361, 22, 348, 20, 136, /* 740 */ 22, 434, 435, 360, 361, 172, 361, 267, 363, 369, - /* 750 */ 0, 37, 107, 35, 380, 37, 278, 279, 280, 281, - /* 760 */ 282, 283, 284, 380, 361, 348, 386, 135, 136, 137, - /* 770 */ 138, 139, 140, 141, 389, 395, 0, 385, 361, 424, - /* 780 */ 363, 176, 64, 56, 57, 0, 401, 251, 403, 253, - /* 790 */ 401, 77, 389, 360, 361, 77, 135, 136, 137, 138, - /* 800 */ 139, 140, 141, 348, 8, 9, 389, 22, 12, 13, - /* 810 */ 14, 15, 16, 380, 365, 366, 361, 103, 401, 69, - /* 820 */ 403, 103, 360, 361, 106, 20, 4, 442, 389, 474, - /* 830 */ 445, 439, 477, 448, 449, 450, 451, 452, 453, 348, - /* 840 */ 455, 19, 380, 404, 389, 460, 172, 462, 136, 494, - /* 850 */ 495, 466, 467, 450, 499, 500, 401, 35, 403, 442, - /* 860 */ 142, 143, 445, 389, 377, 448, 449, 450, 451, 452, - /* 870 */ 453, 397, 455, 51, 365, 366, 202, 460, 391, 462, - /* 880 */ 58, 14, 348, 466, 467, 14, 64, 20, 401, 360, - /* 890 */ 361, 20, 401, 290, 176, 177, 175, 442, 374, 375, + /* 750 */ 390, 37, 107, 35, 380, 37, 278, 279, 280, 281, + /* 760 */ 282, 283, 284, 380, 176, 348, 386, 135, 136, 137, + /* 770 */ 138, 139, 140, 141, 389, 395, 0, 389, 361, 424, + /* 780 */ 363, 356, 64, 178, 396, 360, 401, 362, 403, 385, + /* 790 */ 401, 77, 404, 360, 361, 77, 135, 136, 137, 138, + /* 800 */ 139, 140, 141, 348, 8, 9, 389, 360, 12, 13, + /* 810 */ 14, 15, 16, 380, 211, 212, 361, 103, 401, 14, + /* 820 */ 403, 103, 360, 361, 106, 20, 4, 442, 367, 474, + /* 830 */ 445, 37, 477, 448, 449, 450, 451, 452, 453, 348, + /* 840 */ 455, 19, 380, 439, 389, 460, 348, 462, 193, 494, + /* 850 */ 495, 466, 467, 392, 499, 500, 401, 35, 403, 442, + /* 860 */ 142, 143, 445, 390, 377, 448, 449, 450, 451, 452, + /* 870 */ 453, 77, 455, 51, 20, 220, 221, 460, 391, 462, + /* 880 */ 58, 434, 435, 466, 467, 251, 64, 253, 401, 360, + /* 890 */ 361, 0, 401, 390, 176, 177, 175, 442, 389, 401, /* 900 */ 445, 183, 184, 448, 449, 450, 451, 452, 453, 380, - /* 910 */ 455, 0, 198, 390, 200, 460, 198, 462, 200, 377, - /* 920 */ 381, 466, 467, 211, 212, 22, 389, 105, 389, 20, - /* 930 */ 108, 381, 445, 391, 50, 401, 397, 161, 424, 389, - /* 940 */ 37, 404, 455, 401, 230, 231, 170, 397, 230, 231, - /* 950 */ 348, 233, 234, 235, 236, 237, 238, 239, 240, 241, + /* 910 */ 455, 0, 198, 404, 200, 460, 198, 462, 200, 377, + /* 920 */ 381, 466, 467, 348, 389, 22, 22, 105, 389, 20, + /* 930 */ 108, 396, 445, 391, 50, 389, 397, 161, 424, 404, + /* 940 */ 37, 37, 455, 401, 230, 231, 170, 348, 230, 231, + /* 950 */ 404, 233, 234, 235, 236, 237, 238, 239, 240, 241, /* 960 */ 242, 243, 244, 245, 246, 247, 248, 249, 250, 12, - /* 970 */ 13, 348, 348, 398, 178, 254, 401, 20, 348, 22, - /* 980 */ 20, 360, 361, 178, 361, 264, 363, 445, 474, 3, + /* 970 */ 13, 348, 348, 4, 178, 254, 401, 20, 348, 22, + /* 980 */ 458, 360, 361, 461, 361, 264, 363, 445, 474, 378, /* 990 */ 474, 477, 35, 477, 37, 39, 40, 455, 360, 361, - /* 1000 */ 390, 380, 474, 401, 348, 477, 103, 382, 494, 495, - /* 1010 */ 385, 495, 389, 499, 500, 499, 500, 361, 380, 363, - /* 1020 */ 4, 64, 389, 495, 401, 401, 403, 499, 500, 396, - /* 1030 */ 459, 401, 461, 348, 77, 360, 361, 404, 360, 361, - /* 1040 */ 135, 360, 361, 176, 139, 389, 135, 136, 137, 138, - /* 1050 */ 139, 140, 141, 13, 459, 380, 461, 401, 380, 403, + /* 1000 */ 401, 380, 474, 33, 348, 477, 103, 103, 494, 495, + /* 1010 */ 33, 495, 389, 499, 500, 499, 500, 361, 380, 363, + /* 1020 */ 459, 64, 461, 495, 401, 401, 403, 499, 500, 1, + /* 1030 */ 2, 401, 178, 348, 77, 360, 361, 398, 360, 361, + /* 1040 */ 401, 360, 361, 265, 266, 389, 135, 136, 137, 138, + /* 1050 */ 139, 140, 141, 365, 366, 380, 20, 401, 380, 403, /* 1060 */ 103, 380, 178, 106, 348, 442, 110, 111, 445, 113, - /* 1070 */ 186, 448, 449, 450, 451, 452, 453, 37, 455, 0, - /* 1080 */ 381, 0, 348, 460, 348, 462, 401, 178, 389, 466, - /* 1090 */ 467, 135, 360, 361, 348, 139, 397, 70, 442, 142, - /* 1100 */ 143, 445, 33, 348, 448, 449, 450, 451, 452, 453, - /* 1110 */ 348, 455, 380, 348, 45, 348, 460, 401, 462, 360, - /* 1120 */ 361, 348, 466, 467, 360, 361, 360, 361, 360, 361, - /* 1130 */ 360, 361, 51, 176, 177, 401, 20, 401, 178, 380, - /* 1140 */ 183, 184, 351, 352, 380, 33, 380, 401, 380, 0, - /* 1150 */ 380, 72, 73, 74, 33, 198, 401, 200, 79, 80, - /* 1160 */ 81, 348, 390, 401, 85, 116, 401, 390, 401, 90, - /* 1170 */ 91, 92, 93, 376, 401, 96, 379, 424, 99, 0, - /* 1180 */ 374, 375, 33, 47, 48, 369, 109, 230, 231, 112, + /* 1070 */ 186, 448, 449, 450, 451, 452, 453, 348, 455, 0, + /* 1080 */ 381, 374, 375, 460, 348, 462, 401, 178, 389, 466, + /* 1090 */ 467, 135, 360, 361, 348, 139, 397, 348, 442, 142, + /* 1100 */ 143, 445, 390, 348, 448, 449, 450, 451, 452, 453, + /* 1110 */ 348, 455, 380, 365, 366, 224, 460, 401, 462, 360, + /* 1120 */ 361, 70, 466, 467, 360, 361, 360, 361, 360, 361, + /* 1130 */ 401, 374, 375, 176, 177, 107, 459, 401, 461, 380, + /* 1140 */ 183, 184, 369, 33, 380, 135, 380, 401, 380, 139, + /* 1150 */ 401, 72, 73, 74, 33, 198, 401, 200, 79, 80, + /* 1160 */ 81, 116, 382, 401, 85, 385, 45, 0, 395, 90, + /* 1170 */ 91, 92, 93, 398, 33, 96, 401, 424, 99, 398, + /* 1180 */ 376, 0, 401, 379, 0, 37, 45, 230, 231, 0, /* 1190 */ 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, /* 1200 */ 243, 244, 245, 246, 247, 248, 249, 250, 12, 13, - /* 1210 */ 348, 395, 265, 266, 401, 166, 20, 33, 22, 107, - /* 1220 */ 33, 42, 0, 361, 214, 363, 216, 474, 107, 45, - /* 1230 */ 477, 35, 109, 37, 64, 112, 12, 13, 109, 109, - /* 1240 */ 33, 112, 112, 49, 22, 106, 22, 494, 495, 33, - /* 1250 */ 37, 389, 499, 500, 115, 142, 143, 230, 33, 35, - /* 1260 */ 64, 37, 390, 401, 390, 403, 424, 1, 2, 430, - /* 1270 */ 378, 33, 33, 77, 288, 33, 349, 414, 108, 0, - /* 1280 */ 424, 13, 13, 503, 492, 269, 33, 33, 64, 33, - /* 1290 */ 33, 33, 176, 33, 107, 364, 37, 486, 377, 103, - /* 1300 */ 106, 77, 106, 377, 442, 37, 37, 445, 33, 33, - /* 1310 */ 448, 449, 450, 451, 452, 453, 474, 455, 37, 477, - /* 1320 */ 423, 18, 460, 107, 462, 33, 23, 103, 466, 467, - /* 1330 */ 474, 52, 107, 477, 33, 389, 494, 495, 142, 143, - /* 1340 */ 364, 499, 500, 40, 41, 107, 107, 44, 414, 107, - /* 1350 */ 494, 495, 359, 361, 400, 499, 500, 54, 77, 431, - /* 1360 */ 107, 107, 414, 107, 107, 107, 476, 107, 65, 66, - /* 1370 */ 67, 68, 176, 177, 496, 33, 33, 479, 468, 183, - /* 1380 */ 184, 270, 107, 107, 425, 51, 444, 42, 443, 20, - /* 1390 */ 213, 436, 441, 369, 198, 369, 200, 436, 196, 107, - /* 1400 */ 427, 20, 360, 20, 361, 45, 410, 20, 107, 106, - /* 1410 */ 410, 414, 361, 200, 407, 175, 360, 104, 361, 360, - /* 1420 */ 407, 410, 198, 373, 200, 407, 230, 231, 102, 233, + /* 1210 */ 348, 166, 176, 0, 64, 33, 20, 107, 22, 52, + /* 1220 */ 33, 109, 33, 361, 112, 363, 42, 474, 142, 143, + /* 1230 */ 477, 35, 51, 37, 0, 22, 12, 13, 269, 109, + /* 1240 */ 109, 109, 112, 112, 112, 13, 22, 494, 495, 0, + /* 1250 */ 13, 389, 499, 500, 37, 214, 22, 216, 108, 35, + /* 1260 */ 64, 37, 292, 401, 390, 403, 424, 290, 49, 37, + /* 1270 */ 390, 22, 33, 77, 37, 33, 1, 2, 33, 33, + /* 1280 */ 424, 230, 13, 349, 33, 33, 33, 33, 64, 107, + /* 1290 */ 33, 33, 33, 33, 107, 414, 106, 364, 503, 103, + /* 1300 */ 33, 77, 106, 33, 442, 115, 37, 445, 13, 33, + /* 1310 */ 448, 449, 450, 451, 452, 453, 474, 455, 33, 477, + /* 1320 */ 492, 18, 460, 33, 462, 106, 23, 103, 466, 467, + /* 1330 */ 474, 486, 37, 477, 359, 377, 494, 495, 142, 143, + /* 1340 */ 377, 499, 500, 40, 41, 37, 107, 44, 200, 107, + /* 1350 */ 494, 495, 107, 107, 389, 499, 500, 54, 107, 107, + /* 1360 */ 107, 107, 423, 364, 107, 107, 107, 107, 65, 66, + /* 1370 */ 67, 68, 176, 177, 107, 414, 361, 107, 400, 183, + /* 1380 */ 184, 431, 414, 107, 476, 77, 496, 468, 270, 479, + /* 1390 */ 51, 425, 107, 444, 198, 42, 200, 107, 443, 20, + /* 1400 */ 436, 213, 369, 441, 369, 196, 427, 436, 20, 106, + /* 1410 */ 360, 20, 45, 361, 410, 20, 414, 200, 361, 410, + /* 1420 */ 407, 360, 198, 175, 200, 361, 230, 231, 360, 233, /* 1430 */ 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, - /* 1440 */ 244, 245, 246, 247, 248, 249, 250, 144, 348, 107, - /* 1450 */ 107, 360, 372, 101, 230, 231, 371, 360, 360, 200, - /* 1460 */ 20, 361, 360, 353, 50, 357, 357, 243, 244, 245, - /* 1470 */ 246, 247, 248, 249, 436, 353, 369, 20, 403, 20, - /* 1480 */ 362, 20, 362, 348, 369, 20, 369, 426, 369, 389, - /* 1490 */ 417, 351, 360, 190, 191, 192, 361, 369, 195, 292, - /* 1500 */ 369, 401, 369, 403, 353, 351, 348, 369, 353, 106, - /* 1510 */ 217, 208, 209, 389, 389, 389, 389, 360, 440, 361, - /* 1520 */ 438, 20, 219, 389, 389, 222, 389, 367, 225, 226, - /* 1530 */ 227, 228, 229, 389, 389, 389, 401, 389, 403, 389, - /* 1540 */ 436, 348, 442, 401, 401, 445, 432, 389, 448, 449, - /* 1550 */ 450, 451, 452, 453, 361, 455, 203, 401, 204, 401, - /* 1560 */ 460, 403, 462, 360, 403, 367, 466, 467, 401, 485, - /* 1570 */ 267, 277, 425, 276, 401, 485, 435, 442, 414, 414, - /* 1580 */ 445, 419, 389, 448, 449, 450, 451, 452, 453, 401, - /* 1590 */ 455, 419, 433, 401, 401, 460, 403, 462, 189, 285, - /* 1600 */ 442, 466, 467, 445, 287, 286, 448, 449, 450, 451, - /* 1610 */ 452, 453, 271, 455, 425, 294, 291, 289, 20, 116, - /* 1620 */ 462, 266, 361, 447, 466, 467, 362, 268, 419, 367, - /* 1630 */ 367, 401, 401, 401, 401, 442, 483, 348, 445, 1, - /* 1640 */ 488, 448, 449, 450, 451, 452, 453, 484, 455, 401, - /* 1650 */ 361, 401, 181, 487, 485, 462, 482, 19, 478, 466, - /* 1660 */ 467, 480, 419, 348, 415, 367, 367, 385, 361, 498, - /* 1670 */ 106, 465, 504, 35, 106, 497, 361, 393, 389, 401, - /* 1680 */ 360, 379, 22, 367, 38, 350, 354, 420, 437, 51, - /* 1690 */ 401, 353, 403, 428, 420, 383, 346, 59, 60, 61, - /* 1700 */ 62, 383, 64, 0, 389, 383, 348, 368, 0, 0, - /* 1710 */ 45, 0, 37, 37, 223, 37, 401, 37, 403, 361, - /* 1720 */ 223, 0, 37, 37, 37, 223, 0, 223, 0, 37, - /* 1730 */ 0, 442, 22, 0, 445, 37, 218, 448, 449, 450, - /* 1740 */ 451, 452, 453, 105, 455, 0, 108, 389, 206, 0, - /* 1750 */ 206, 462, 207, 200, 198, 466, 467, 442, 0, 401, - /* 1760 */ 445, 403, 0, 448, 449, 450, 451, 452, 453, 454, - /* 1770 */ 455, 456, 457, 348, 0, 194, 193, 0, 140, 0, - /* 1780 */ 147, 49, 0, 49, 37, 0, 361, 51, 49, 0, - /* 1790 */ 0, 45, 0, 0, 0, 0, 0, 49, 0, 0, - /* 1800 */ 442, 0, 161, 445, 37, 0, 448, 449, 450, 451, - /* 1810 */ 452, 453, 161, 455, 389, 0, 348, 0, 180, 0, + /* 1440 */ 244, 245, 246, 247, 248, 249, 250, 144, 348, 410, + /* 1450 */ 407, 407, 104, 373, 230, 231, 102, 372, 360, 371, + /* 1460 */ 101, 361, 360, 360, 360, 20, 353, 243, 244, 245, + /* 1470 */ 246, 247, 248, 249, 50, 353, 357, 357, 436, 20, + /* 1480 */ 369, 403, 20, 348, 369, 369, 362, 20, 426, 389, + /* 1490 */ 362, 20, 369, 190, 191, 192, 361, 360, 195, 417, + /* 1500 */ 353, 401, 369, 403, 351, 369, 348, 369, 369, 360, + /* 1510 */ 351, 208, 209, 353, 389, 389, 389, 217, 389, 361, + /* 1520 */ 106, 440, 219, 389, 389, 222, 436, 438, 225, 226, + /* 1530 */ 227, 228, 229, 389, 389, 389, 401, 367, 403, 20, + /* 1540 */ 389, 348, 442, 389, 389, 445, 204, 389, 448, 449, + /* 1550 */ 450, 451, 452, 453, 361, 455, 277, 401, 401, 401, + /* 1560 */ 460, 403, 462, 401, 203, 367, 466, 467, 403, 401, + /* 1570 */ 267, 360, 485, 276, 432, 435, 433, 442, 485, 285, + /* 1580 */ 445, 401, 389, 448, 449, 450, 451, 452, 453, 425, + /* 1590 */ 455, 414, 414, 419, 401, 460, 403, 462, 419, 189, + /* 1600 */ 442, 466, 467, 445, 401, 401, 448, 449, 450, 451, + /* 1610 */ 452, 453, 287, 455, 286, 271, 425, 294, 504, 20, + /* 1620 */ 462, 291, 289, 266, 466, 467, 361, 116, 268, 367, + /* 1630 */ 447, 367, 401, 362, 419, 442, 401, 348, 445, 1, + /* 1640 */ 488, 448, 449, 450, 451, 452, 453, 484, 455, 419, + /* 1650 */ 361, 401, 480, 487, 485, 462, 483, 19, 482, 466, + /* 1660 */ 467, 181, 401, 348, 478, 367, 385, 401, 367, 498, + /* 1670 */ 415, 361, 497, 35, 401, 106, 361, 465, 389, 106, + /* 1680 */ 393, 401, 360, 379, 367, 22, 350, 38, 354, 51, + /* 1690 */ 401, 353, 403, 437, 420, 383, 428, 59, 60, 61, + /* 1700 */ 62, 383, 64, 420, 389, 368, 348, 383, 346, 0, + /* 1710 */ 0, 0, 45, 0, 223, 37, 401, 37, 403, 361, + /* 1720 */ 37, 37, 223, 0, 37, 37, 223, 37, 0, 223, + /* 1730 */ 0, 442, 37, 0, 445, 0, 22, 448, 449, 450, + /* 1740 */ 451, 452, 453, 105, 455, 37, 108, 389, 218, 0, + /* 1750 */ 206, 462, 0, 206, 200, 466, 467, 442, 207, 401, + /* 1760 */ 445, 403, 198, 448, 449, 450, 451, 452, 453, 454, + /* 1770 */ 455, 456, 457, 348, 0, 0, 0, 194, 140, 193, + /* 1780 */ 0, 0, 147, 49, 0, 49, 361, 37, 51, 0, + /* 1790 */ 49, 0, 45, 0, 0, 0, 0, 49, 0, 0, + /* 1800 */ 442, 0, 0, 445, 0, 161, 448, 449, 450, 451, + /* 1810 */ 452, 453, 0, 455, 389, 37, 348, 161, 180, 0, /* 1820 */ 0, 0, 0, 0, 0, 187, 401, 0, 403, 361, - /* 1830 */ 49, 0, 0, 45, 0, 0, 0, 0, 348, 0, + /* 1830 */ 45, 49, 0, 0, 0, 0, 0, 0, 348, 0, /* 1840 */ 0, 0, 0, 0, 206, 0, 0, 0, 0, 0, - /* 1850 */ 22, 361, 0, 147, 0, 0, 0, 389, 146, 501, - /* 1860 */ 502, 145, 0, 50, 50, 0, 22, 442, 64, 401, - /* 1870 */ 445, 403, 22, 448, 449, 450, 451, 452, 453, 389, - /* 1880 */ 455, 348, 0, 0, 394, 0, 0, 462, 37, 64, - /* 1890 */ 64, 401, 467, 403, 361, 37, 348, 0, 37, 42, - /* 1900 */ 0, 42, 42, 37, 51, 0, 37, 0, 33, 361, - /* 1910 */ 442, 348, 45, 445, 51, 51, 448, 449, 450, 451, - /* 1920 */ 452, 453, 389, 455, 361, 49, 42, 394, 49, 14, - /* 1930 */ 49, 0, 442, 43, 401, 445, 403, 389, 448, 449, - /* 1940 */ 450, 451, 452, 453, 42, 455, 0, 0, 0, 401, - /* 1950 */ 0, 403, 389, 42, 189, 0, 0, 49, 0, 491, - /* 1960 */ 71, 0, 0, 37, 401, 51, 403, 0, 51, 42, - /* 1970 */ 37, 42, 0, 37, 51, 442, 42, 0, 445, 37, - /* 1980 */ 0, 448, 449, 450, 451, 452, 453, 42, 455, 51, - /* 1990 */ 442, 348, 0, 445, 114, 22, 448, 449, 450, 451, - /* 2000 */ 452, 453, 0, 455, 361, 442, 0, 0, 445, 348, - /* 2010 */ 0, 448, 449, 450, 451, 452, 453, 0, 455, 37, - /* 2020 */ 37, 112, 361, 37, 37, 348, 37, 37, 37, 35, - /* 2030 */ 37, 33, 389, 37, 33, 22, 37, 394, 361, 0, - /* 2040 */ 37, 493, 22, 0, 401, 51, 403, 22, 37, 0, - /* 2050 */ 389, 22, 37, 59, 60, 61, 62, 53, 64, 0, - /* 2060 */ 0, 0, 401, 37, 403, 502, 389, 0, 37, 0, - /* 2070 */ 22, 394, 20, 37, 37, 107, 106, 37, 401, 0, - /* 2080 */ 403, 178, 106, 205, 49, 442, 0, 37, 445, 0, - /* 2090 */ 178, 448, 449, 450, 451, 452, 453, 22, 455, 105, - /* 2100 */ 201, 181, 108, 442, 348, 22, 445, 0, 178, 448, + /* 1850 */ 0, 361, 0, 22, 0, 0, 0, 389, 146, 501, + /* 1860 */ 502, 145, 147, 0, 0, 50, 22, 442, 50, 401, + /* 1870 */ 445, 403, 0, 448, 449, 450, 451, 452, 453, 389, + /* 1880 */ 455, 348, 22, 0, 394, 0, 0, 462, 37, 64, + /* 1890 */ 64, 401, 467, 403, 361, 37, 348, 0, 0, 42, + /* 1900 */ 0, 42, 64, 37, 51, 37, 0, 42, 37, 361, + /* 1910 */ 442, 348, 51, 445, 0, 45, 448, 449, 450, 451, + /* 1920 */ 452, 453, 389, 455, 361, 51, 42, 394, 49, 33, + /* 1930 */ 49, 14, 442, 0, 401, 445, 403, 389, 448, 449, + /* 1940 */ 450, 451, 452, 453, 43, 455, 42, 0, 49, 401, + /* 1950 */ 0, 403, 389, 0, 0, 42, 189, 0, 49, 491, + /* 1960 */ 0, 0, 71, 0, 401, 0, 403, 37, 42, 51, + /* 1970 */ 0, 37, 51, 42, 0, 442, 37, 42, 445, 51, + /* 1980 */ 0, 448, 449, 450, 451, 452, 453, 51, 455, 37, + /* 1990 */ 442, 348, 0, 445, 114, 37, 448, 449, 450, 451, + /* 2000 */ 452, 453, 0, 455, 361, 442, 42, 0, 445, 348, + /* 2010 */ 0, 448, 449, 450, 451, 452, 453, 0, 455, 0, + /* 2020 */ 112, 22, 361, 37, 37, 348, 0, 37, 37, 35, + /* 2030 */ 37, 22, 389, 37, 37, 37, 33, 394, 361, 33, + /* 2040 */ 0, 493, 22, 0, 401, 51, 403, 22, 37, 37, + /* 2050 */ 389, 37, 0, 59, 60, 61, 62, 53, 64, 22, + /* 2060 */ 0, 37, 401, 0, 403, 502, 389, 0, 37, 0, + /* 2070 */ 37, 394, 0, 22, 20, 107, 37, 106, 401, 37, + /* 2080 */ 403, 37, 0, 178, 106, 442, 0, 205, 445, 178, + /* 2090 */ 49, 448, 449, 450, 451, 452, 453, 22, 455, 105, + /* 2100 */ 0, 37, 108, 442, 348, 22, 445, 178, 201, 448, /* 2110 */ 449, 450, 451, 452, 453, 0, 455, 361, 457, 442, - /* 2120 */ 185, 178, 445, 3, 185, 448, 449, 450, 451, 452, - /* 2130 */ 453, 178, 455, 33, 106, 348, 102, 107, 106, 33, - /* 2140 */ 272, 50, 50, 33, 33, 389, 104, 106, 361, 33, - /* 2150 */ 394, 107, 107, 106, 49, 3, 33, 401, 107, 403, - /* 2160 */ 106, 49, 106, 272, 107, 107, 172, 37, 272, 37, - /* 2170 */ 37, 37, 37, 37, 180, 181, 389, 107, 348, 107, - /* 2180 */ 49, 187, 188, 265, 33, 0, 49, 0, 401, 42, - /* 2190 */ 403, 361, 107, 106, 106, 0, 182, 107, 442, 106, - /* 2200 */ 206, 445, 106, 106, 448, 449, 450, 451, 452, 453, - /* 2210 */ 42, 455, 49, 180, 106, 33, 115, 104, 252, 389, - /* 2220 */ 2, 104, 22, 49, 49, 230, 107, 106, 106, 442, + /* 2120 */ 0, 181, 445, 178, 3, 448, 449, 450, 451, 452, + /* 2130 */ 453, 185, 455, 178, 185, 348, 106, 33, 106, 272, + /* 2140 */ 50, 107, 50, 107, 33, 389, 33, 33, 361, 104, + /* 2150 */ 394, 102, 33, 107, 106, 49, 106, 401, 49, 403, + /* 2160 */ 107, 106, 106, 3, 272, 107, 172, 33, 107, 37, + /* 2170 */ 37, 49, 37, 37, 180, 181, 389, 37, 348, 37, + /* 2180 */ 107, 187, 188, 107, 272, 265, 33, 49, 401, 0, + /* 2190 */ 403, 361, 0, 106, 42, 106, 0, 106, 442, 106, + /* 2200 */ 206, 445, 107, 107, 448, 449, 450, 451, 452, 453, + /* 2210 */ 182, 455, 42, 106, 106, 180, 115, 49, 33, 389, + /* 2220 */ 104, 252, 2, 106, 22, 230, 49, 104, 49, 442, /* 2230 */ 106, 401, 445, 403, 107, 448, 449, 450, 451, 452, - /* 2240 */ 453, 22, 455, 348, 232, 107, 106, 106, 37, 107, - /* 2250 */ 106, 37, 107, 107, 106, 116, 361, 37, 348, 106, - /* 2260 */ 37, 107, 106, 37, 107, 106, 37, 107, 106, 37, - /* 2270 */ 106, 361, 442, 348, 107, 445, 127, 127, 448, 449, - /* 2280 */ 450, 451, 452, 453, 389, 455, 361, 106, 127, 33, - /* 2290 */ 106, 37, 127, 22, 106, 71, 401, 70, 403, 389, - /* 2300 */ 37, 37, 37, 37, 37, 37, 37, 37, 77, 37, - /* 2310 */ 100, 401, 33, 403, 389, 37, 22, 37, 37, 37, - /* 2320 */ 37, 37, 77, 37, 37, 37, 401, 37, 403, 37, - /* 2330 */ 22, 0, 37, 37, 0, 42, 51, 442, 37, 42, - /* 2340 */ 445, 0, 51, 448, 449, 450, 451, 452, 453, 37, - /* 2350 */ 455, 51, 442, 348, 0, 445, 42, 37, 448, 449, - /* 2360 */ 450, 451, 452, 453, 51, 455, 361, 442, 42, 0, - /* 2370 */ 445, 348, 37, 448, 449, 450, 451, 452, 453, 37, - /* 2380 */ 455, 0, 22, 33, 361, 22, 348, 21, 505, 505, - /* 2390 */ 22, 20, 22, 21, 389, 505, 505, 505, 505, 361, + /* 2240 */ 453, 22, 455, 348, 107, 106, 116, 232, 107, 106, + /* 2250 */ 106, 37, 107, 106, 37, 107, 361, 106, 348, 37, + /* 2260 */ 37, 107, 106, 37, 107, 106, 37, 37, 107, 106, + /* 2270 */ 106, 361, 442, 348, 107, 445, 107, 106, 448, 449, + /* 2280 */ 450, 451, 452, 453, 389, 455, 361, 106, 33, 127, + /* 2290 */ 106, 37, 127, 127, 106, 22, 401, 70, 403, 389, + /* 2300 */ 127, 37, 71, 37, 37, 37, 37, 37, 37, 37, + /* 2310 */ 100, 401, 37, 403, 389, 77, 33, 37, 37, 37, + /* 2320 */ 22, 37, 37, 37, 77, 37, 401, 37, 403, 37, + /* 2330 */ 37, 37, 22, 37, 0, 0, 37, 442, 51, 42, + /* 2340 */ 445, 37, 51, 448, 449, 450, 451, 452, 453, 42, + /* 2350 */ 455, 0, 442, 348, 37, 445, 51, 42, 448, 449, + /* 2360 */ 450, 451, 452, 453, 0, 455, 361, 442, 37, 51, + /* 2370 */ 445, 348, 42, 448, 449, 450, 451, 452, 453, 0, + /* 2380 */ 455, 0, 37, 37, 361, 22, 348, 33, 22, 21, + /* 2390 */ 505, 22, 22, 21, 389, 20, 505, 505, 505, 361, /* 2400 */ 505, 505, 505, 505, 505, 505, 401, 505, 403, 505, /* 2410 */ 505, 505, 389, 505, 505, 505, 505, 505, 505, 505, /* 2420 */ 505, 505, 505, 505, 401, 505, 403, 389, 505, 348, @@ -867,85 +867,85 @@ static const unsigned short int yy_shift_ofst[] = { /* 20 */ 957, 957, 957, 957, 957, 957, 957, 957, 957, 957, /* 30 */ 957, 957, 957, 957, 957, 957, 957, 957, 957, 957, /* 40 */ 957, 957, 957, 957, 957, 957, 957, 957, 957, 957, - /* 50 */ 957, 166, 200, 444, 126, 399, 480, 399, 399, 126, - /* 60 */ 126, 399, 1224, 399, 238, 1224, 1224, 58, 399, 1, - /* 70 */ 352, 78, 78, 352, 37, 37, 527, 412, 93, 93, - /* 80 */ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, - /* 90 */ 78, 116, 196, 78, 78, 188, 1, 78, 116, 78, - /* 100 */ 255, 1, 78, 78, 1, 78, 78, 1, 78, 1, - /* 110 */ 1, 1, 78, 288, 199, 199, 259, 197, 714, 714, + /* 50 */ 957, 166, 200, 444, 64, 113, 480, 113, 113, 64, + /* 60 */ 64, 113, 1224, 113, 238, 1224, 1224, 58, 113, 1, + /* 70 */ 352, 14, 14, 288, 288, 352, 415, 412, 93, 93, + /* 80 */ 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + /* 90 */ 14, 78, 126, 14, 14, 112, 1, 14, 78, 14, + /* 100 */ 190, 1, 14, 14, 1, 14, 14, 1, 14, 1, + /* 110 */ 1, 1, 14, 211, 199, 199, 259, 197, 714, 714, /* 120 */ 714, 714, 714, 714, 714, 714, 714, 714, 714, 714, - /* 130 */ 714, 714, 714, 714, 714, 714, 714, 956, 446, 527, - /* 140 */ 412, 727, 727, 133, 805, 805, 805, 750, 536, 536, - /* 150 */ 133, 188, 264, 1, 1, 124, 1, 387, 1, 387, - /* 160 */ 387, 493, 570, 705, 568, 568, 568, 568, 568, 568, - /* 170 */ 568, 568, 1638, 1079, 65, 432, 15, 478, 298, 73, - /* 180 */ 3, 3, 605, 884, 867, 240, 909, 1136, 871, 905, - /* 190 */ 674, 960, 947, 14, 986, 947, 1069, 1016, 1116, 1111, - /* 200 */ 1334, 1345, 1369, 1177, 188, 1369, 188, 1202, 1381, 1383, - /* 210 */ 1360, 1387, 1383, 1360, 1240, 1381, 1383, 1381, 1360, 1240, - /* 220 */ 1240, 1313, 1326, 1381, 1352, 1381, 1381, 1381, 1440, 1414, - /* 230 */ 1440, 1414, 1369, 188, 188, 1457, 188, 1459, 1461, 188, - /* 240 */ 1459, 188, 1465, 188, 188, 1381, 188, 1440, 1, 1, - /* 250 */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1381, - /* 260 */ 705, 705, 1440, 387, 387, 387, 1293, 1403, 1369, 288, - /* 270 */ 1501, 1354, 1353, 1457, 288, 1111, 1381, 1387, 1387, 387, - /* 280 */ 1294, 1297, 387, 1294, 1297, 387, 387, 1, 1314, 1409, - /* 290 */ 1294, 1317, 1319, 1341, 1111, 1321, 1325, 1328, 1355, 1383, - /* 300 */ 1598, 1503, 1359, 1459, 288, 288, 1297, 387, 387, 387, - /* 310 */ 387, 387, 1297, 387, 1471, 288, 493, 288, 1383, 1564, - /* 320 */ 1568, 387, 570, 1381, 288, 1660, 1646, 1440, 2986, 2986, + /* 130 */ 714, 714, 714, 714, 714, 714, 714, 956, 446, 415, + /* 140 */ 412, 363, 363, 794, 605, 605, 605, 195, 634, 634, + /* 150 */ 794, 112, 237, 1, 1, 249, 1, 387, 1, 387, + /* 160 */ 387, 493, 454, 281, 568, 568, 568, 568, 568, 568, + /* 170 */ 568, 568, 1638, 1079, 65, 432, 15, 478, 46, 73, + /* 180 */ 3, 3, 482, 531, 884, 588, 497, 854, 805, 1010, + /* 190 */ 103, 909, 778, 429, 254, 778, 1121, 969, 1036, 1118, + /* 200 */ 1339, 1353, 1379, 1188, 112, 1379, 112, 1209, 1388, 1391, + /* 210 */ 1367, 1395, 1391, 1367, 1248, 1388, 1391, 1388, 1367, 1248, + /* 220 */ 1248, 1348, 1354, 1388, 1359, 1388, 1388, 1388, 1445, 1424, + /* 230 */ 1445, 1424, 1379, 112, 112, 1459, 112, 1462, 1467, 112, + /* 240 */ 1462, 112, 1471, 112, 112, 1388, 112, 1445, 1, 1, + /* 250 */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1388, + /* 260 */ 281, 281, 1445, 387, 387, 387, 1300, 1414, 1379, 211, + /* 270 */ 1519, 1342, 1361, 1459, 211, 1118, 1388, 1395, 1395, 387, + /* 280 */ 1279, 1297, 387, 1279, 1297, 387, 387, 1, 1294, 1410, + /* 290 */ 1279, 1325, 1328, 1344, 1118, 1323, 1330, 1333, 1357, 1391, + /* 300 */ 1599, 1511, 1360, 1462, 211, 211, 1297, 387, 387, 387, + /* 310 */ 387, 387, 1297, 387, 1480, 211, 493, 211, 1391, 1569, + /* 320 */ 1573, 387, 454, 1388, 211, 1663, 1649, 1445, 2986, 2986, /* 330 */ 2986, 2986, 2986, 2986, 2986, 2986, 2986, 36, 1994, 544, /* 340 */ 66, 822, 269, 645, 632, 30, 285, 796, 911, 314, /* 350 */ 314, 314, 314, 314, 314, 314, 314, 314, 661, 149, - /* 360 */ 33, 495, 495, 573, 349, 131, 309, 776, 280, 903, - /* 370 */ 712, 498, 498, 691, 303, 721, 691, 691, 691, 1081, - /* 380 */ 471, 1112, 1179, 1184, 1049, 1149, 1077, 1123, 1129, 1130, - /* 390 */ 299, 1040, 580, 785, 1222, 1010, 1121, 1187, 1170, 1216, - /* 400 */ 1225, 1238, 1113, 603, 1207, 1239, 1242, 1253, 1254, 1256, - /* 410 */ 1257, 1266, 1260, 1027, 1258, 1194, 1275, 1276, 1292, 1301, - /* 420 */ 1342, 1343, 1139, 1213, 1259, 1268, 1269, 1281, 1279, 1703, - /* 430 */ 1708, 1709, 1665, 1711, 1675, 1491, 1676, 1678, 1680, 1497, - /* 440 */ 1721, 1685, 1686, 1502, 1687, 1726, 1504, 1728, 1692, 1730, - /* 450 */ 1710, 1733, 1698, 1518, 1745, 1542, 1749, 1544, 1545, 1553, - /* 460 */ 1556, 1758, 1762, 1774, 1581, 1583, 1777, 1779, 1633, 1732, - /* 470 */ 1734, 1782, 1747, 1736, 1785, 1739, 1789, 1746, 1790, 1792, - /* 480 */ 1793, 1748, 1794, 1795, 1796, 1798, 1799, 1801, 1641, 1767, - /* 490 */ 1805, 1651, 1815, 1817, 1819, 1820, 1821, 1822, 1823, 1824, - /* 500 */ 1827, 1839, 1840, 1841, 1842, 1843, 1845, 1846, 1847, 1781, - /* 510 */ 1831, 1788, 1832, 1834, 1835, 1836, 1837, 1848, 1849, 1828, - /* 520 */ 1852, 1706, 1854, 1712, 1855, 1716, 1856, 1862, 1844, 1813, - /* 530 */ 1850, 1814, 1865, 1804, 1851, 1882, 1825, 1883, 1826, 1885, - /* 540 */ 1886, 1858, 1853, 1857, 1897, 1861, 1863, 1859, 1900, 1866, - /* 550 */ 1864, 1860, 1905, 1869, 1907, 1867, 1884, 1875, 1876, 1879, - /* 560 */ 1915, 1881, 1931, 1890, 1902, 1946, 1947, 1948, 1950, 1911, - /* 570 */ 1765, 1955, 1876, 1908, 1956, 1958, 1889, 1961, 1962, 1926, - /* 580 */ 1914, 1927, 1967, 1933, 1917, 1929, 1972, 1936, 1923, 1934, - /* 590 */ 1977, 1942, 1938, 1945, 1980, 1992, 2002, 2006, 2007, 2010, - /* 600 */ 1880, 1909, 1982, 1973, 2017, 1983, 1986, 1987, 1989, 1990, - /* 610 */ 1991, 1993, 1996, 1998, 2001, 1999, 2003, 2013, 2011, 2039, - /* 620 */ 2020, 2043, 2025, 2004, 2049, 2029, 2015, 2059, 2060, 2061, - /* 630 */ 2026, 2067, 2031, 2069, 2048, 2052, 2036, 2037, 2040, 1968, - /* 640 */ 1970, 2079, 1903, 1976, 1878, 1876, 2035, 2086, 1912, 2050, - /* 650 */ 2075, 2089, 1899, 2083, 1930, 1920, 2107, 2115, 1943, 1935, - /* 660 */ 1953, 1939, 2120, 2100, 1868, 2028, 2030, 2032, 2091, 2042, - /* 670 */ 2092, 2034, 2044, 2106, 2110, 2045, 2041, 2047, 2054, 2051, - /* 680 */ 2111, 2105, 2112, 2056, 2116, 1891, 2057, 2058, 2152, 2123, - /* 690 */ 1896, 2130, 2132, 2133, 2134, 2135, 2136, 2070, 2072, 2131, - /* 700 */ 1918, 2151, 2137, 2185, 2187, 2087, 2147, 2088, 2085, 2090, - /* 710 */ 2093, 2096, 2014, 2097, 2195, 2168, 2033, 2108, 2101, 1876, - /* 720 */ 2163, 2182, 2113, 1966, 2117, 2218, 2200, 1995, 2121, 2119, - /* 730 */ 2122, 2127, 2124, 2138, 2174, 2140, 2141, 2175, 2142, 2219, - /* 740 */ 2012, 2144, 2139, 2145, 2211, 2214, 2148, 2146, 2220, 2153, - /* 750 */ 2154, 2223, 2156, 2157, 2226, 2159, 2160, 2229, 2162, 2167, - /* 760 */ 2232, 2164, 2149, 2150, 2161, 2165, 2181, 2256, 2184, 2254, - /* 770 */ 2188, 2256, 2256, 2271, 2224, 2227, 2263, 2264, 2265, 2266, - /* 780 */ 2267, 2268, 2269, 2270, 2272, 2231, 2210, 2279, 2278, 2280, - /* 790 */ 2281, 2294, 2282, 2283, 2284, 2245, 1998, 2286, 2001, 2287, - /* 800 */ 2288, 2290, 2292, 2308, 2295, 2331, 2296, 2285, 2293, 2334, - /* 810 */ 2301, 2291, 2297, 2341, 2312, 2300, 2314, 2354, 2320, 2313, - /* 820 */ 2326, 2369, 2335, 2342, 2381, 2360, 2350, 2363, 2366, 2368, - /* 830 */ 2370, 2372, 2371, + /* 360 */ 33, 495, 495, 573, 494, 131, 655, 776, 903, 904, + /* 370 */ 603, 361, 361, 690, 1028, 721, 690, 690, 690, 1181, + /* 380 */ 891, 1110, 1184, 1141, 1045, 1189, 1112, 1130, 1131, 1132, + /* 390 */ 1232, 1237, 1213, 1234, 1249, 1041, 1182, 1187, 1150, 1239, + /* 400 */ 1242, 1245, 1086, 977, 970, 1246, 1251, 1252, 1253, 1254, + /* 410 */ 1257, 1275, 1258, 1051, 1259, 1219, 1260, 1267, 1270, 1276, + /* 420 */ 1285, 1290, 1190, 1148, 1217, 1269, 1295, 1308, 1167, 1709, + /* 430 */ 1710, 1711, 1667, 1713, 1678, 1491, 1680, 1683, 1684, 1499, + /* 440 */ 1723, 1687, 1688, 1503, 1690, 1728, 1506, 1730, 1695, 1733, + /* 450 */ 1714, 1735, 1708, 1530, 1749, 1544, 1752, 1547, 1551, 1554, + /* 460 */ 1564, 1774, 1775, 1776, 1583, 1586, 1780, 1781, 1635, 1734, + /* 470 */ 1736, 1784, 1750, 1737, 1789, 1741, 1791, 1747, 1793, 1794, + /* 480 */ 1795, 1748, 1796, 1798, 1799, 1801, 1802, 1804, 1644, 1778, + /* 490 */ 1812, 1656, 1819, 1820, 1821, 1822, 1823, 1824, 1827, 1839, + /* 500 */ 1840, 1841, 1842, 1843, 1845, 1846, 1847, 1848, 1849, 1782, + /* 510 */ 1832, 1785, 1833, 1834, 1835, 1836, 1837, 1850, 1852, 1831, + /* 520 */ 1854, 1715, 1855, 1712, 1856, 1716, 1863, 1864, 1844, 1815, + /* 530 */ 1860, 1818, 1872, 1825, 1851, 1883, 1826, 1885, 1838, 1886, + /* 540 */ 1897, 1858, 1853, 1857, 1898, 1866, 1861, 1859, 1900, 1868, + /* 550 */ 1874, 1865, 1906, 1871, 1914, 1870, 1884, 1896, 1879, 1881, + /* 560 */ 1917, 1899, 1933, 1901, 1904, 1947, 1950, 1953, 1954, 1913, + /* 570 */ 1767, 1957, 1879, 1909, 1960, 1961, 1891, 1963, 1965, 1930, + /* 580 */ 1918, 1926, 1970, 1934, 1921, 1931, 1974, 1939, 1928, 1935, + /* 590 */ 1980, 1952, 1936, 1964, 1992, 2002, 2007, 2010, 2017, 2019, + /* 600 */ 1880, 1908, 1958, 1999, 2026, 1986, 1987, 1990, 1991, 1993, + /* 610 */ 1996, 1997, 1998, 2003, 2006, 2011, 2012, 2009, 2014, 2040, + /* 620 */ 2020, 2043, 2025, 2004, 2052, 2037, 2024, 2060, 2063, 2067, + /* 630 */ 2031, 2069, 2033, 2072, 2051, 2054, 2039, 2042, 2044, 1968, + /* 640 */ 1971, 2082, 1905, 1978, 1882, 1879, 2041, 2086, 1911, 2064, + /* 650 */ 2075, 2100, 1907, 2083, 1929, 1940, 2115, 2120, 1945, 1946, + /* 660 */ 1955, 1949, 2121, 2104, 1867, 2030, 2034, 2032, 2090, 2045, + /* 670 */ 2092, 2049, 2036, 2111, 2113, 2046, 2048, 2050, 2055, 2053, + /* 680 */ 2114, 2106, 2109, 2056, 2119, 1892, 2058, 2061, 2160, 2134, + /* 690 */ 1912, 2132, 2133, 2135, 2136, 2140, 2142, 2073, 2076, 2122, + /* 700 */ 1920, 2153, 2138, 2189, 2192, 2087, 2152, 2089, 2095, 2096, + /* 710 */ 2091, 2093, 2028, 2107, 2196, 2170, 2035, 2108, 2101, 1879, + /* 720 */ 2168, 2185, 2116, 1969, 2123, 2220, 2202, 1995, 2117, 2127, + /* 730 */ 2124, 2137, 2139, 2141, 2177, 2143, 2144, 2179, 2145, 2219, + /* 740 */ 2015, 2147, 2130, 2148, 2214, 2217, 2151, 2154, 2222, 2156, + /* 750 */ 2157, 2223, 2159, 2161, 2226, 2163, 2167, 2229, 2164, 2169, + /* 760 */ 2230, 2171, 2162, 2165, 2166, 2173, 2181, 2255, 2184, 2254, + /* 770 */ 2188, 2255, 2255, 2273, 2231, 2227, 2264, 2266, 2267, 2268, + /* 780 */ 2269, 2270, 2271, 2272, 2275, 2238, 2210, 2283, 2280, 2281, + /* 790 */ 2282, 2298, 2284, 2285, 2286, 2247, 2003, 2288, 2006, 2290, + /* 800 */ 2292, 2293, 2294, 2310, 2296, 2334, 2299, 2287, 2297, 2335, + /* 810 */ 2304, 2291, 2307, 2351, 2317, 2305, 2315, 2364, 2331, 2318, + /* 820 */ 2330, 2379, 2345, 2346, 2381, 2363, 2354, 2366, 2368, 2369, + /* 830 */ 2370, 2372, 2375, }; #define YY_REDUCE_COUNT (336) #define YY_REDUCE_MIN (-463) @@ -958,119 +958,119 @@ static const short yy_reduce_ofst[] = { /* 40 */ 2176, 2201, 2233, 2259, 2329, 2344, 2367, 2387, 2452, 2473, /* 50 */ 2530, -303, -337, 175, 53, 355, 514, 753, 842, 90, /* 60 */ 143, 856, -192, 38, -357, 487, 542, 516, 528, -379, - /* 70 */ -243, -354, -46, -111, -350, -254, -194, -132, 286, 320, - /* 80 */ 198, 304, 374, 383, -222, -205, 433, 462, 529, 621, - /* 90 */ 59, 157, -215, 638, 675, 380, -385, 678, 307, 681, - /* 100 */ 403, -328, 732, 759, 539, 764, 766, 212, 768, 550, - /* 110 */ 633, 699, 770, -6, -463, -463, -189, 151, -314, -195, - /* 120 */ 389, 491, 534, 602, 624, 630, 685, 716, 734, 736, - /* 130 */ 746, 755, 762, 765, 767, 773, 813, 152, -43, -125, - /* 140 */ 248, 449, 509, 524, -43, 84, 104, 129, 571, 595, - /* 150 */ 806, 816, 392, 279, 439, -408, 474, -335, 537, 144, - /* 160 */ 575, 625, 797, 791, 282, 523, 610, 772, 777, 872, - /* 170 */ 874, 777, 839, 892, 927, 863, 780, 792, 931, 811, - /* 180 */ 921, 926, 946, 897, 946, 976, 934, 993, 992, 954, - /* 190 */ 928, 948, 890, 890, 878, 890, 910, 898, 946, 959, - /* 200 */ 942, 945, 955, 951, 1024, 961, 1026, 973, 1042, 1043, - /* 210 */ 996, 997, 1051, 1000, 1007, 1056, 1057, 1059, 1011, 1013, - /* 220 */ 1018, 1050, 1080, 1091, 1085, 1097, 1098, 1102, 1110, 1108, - /* 230 */ 1122, 1109, 1038, 1107, 1115, 1075, 1117, 1118, 1061, 1119, - /* 240 */ 1120, 1128, 1073, 1131, 1133, 1132, 1138, 1151, 1124, 1125, - /* 250 */ 1126, 1127, 1134, 1137, 1144, 1145, 1146, 1148, 1150, 1157, - /* 260 */ 1140, 1154, 1155, 1142, 1143, 1156, 1078, 1082, 1104, 1160, - /* 270 */ 1141, 1159, 1114, 1161, 1198, 1147, 1203, 1164, 1165, 1167, - /* 280 */ 1084, 1162, 1173, 1090, 1172, 1188, 1192, 946, 1152, 1166, - /* 290 */ 1169, 1163, 1153, 1174, 1189, 1168, 1171, 1178, 890, 1261, - /* 300 */ 1176, 1181, 1180, 1264, 1262, 1263, 1209, 1230, 1231, 1232, - /* 310 */ 1233, 1248, 1243, 1250, 1249, 1298, 1282, 1299, 1307, 1206, - /* 320 */ 1284, 1278, 1302, 1320, 1316, 1335, 1332, 1338, 1265, 1251, - /* 330 */ 1267, 1274, 1312, 1318, 1322, 1339, 1350, + /* 70 */ -243, -354, 160, -350, -88, 213, -326, -85, 320, 425, + /* 80 */ 198, 286, 323, 374, -256, -222, 383, 433, 462, 529, + /* 90 */ -205, 307, -215, 621, 638, 380, -385, 675, 447, 678, + /* 100 */ 107, -94, 681, 732, -77, 759, 764, 388, 766, 539, + /* 110 */ 535, 699, 768, -6, -463, -463, -317, -87, -212, -60, + /* 120 */ 9, 271, 389, 491, 498, 575, 599, 624, 630, 685, + /* 130 */ 716, 729, 736, 746, 749, 755, 762, 248, -397, 188, + /* 140 */ -186, 688, 748, 707, -397, -241, -43, 461, 561, 677, + /* 150 */ 757, 773, 404, -348, 509, 522, -14, 639, 546, 775, + /* 160 */ 781, 780, 804, 299, 278, 360, 473, 503, 712, 874, + /* 170 */ 880, 712, 209, 611, 934, 881, 795, 828, 933, 845, + /* 180 */ 958, 963, 975, 965, 939, 965, 999, 961, 1015, 978, + /* 190 */ 950, 968, 908, 908, 890, 908, 919, 910, 965, 966, + /* 200 */ 949, 955, 964, 962, 1033, 971, 1035, 979, 1050, 1052, + /* 210 */ 1004, 1002, 1057, 1009, 1013, 1061, 1064, 1068, 1039, 1043, + /* 220 */ 1044, 1080, 1085, 1098, 1088, 1102, 1103, 1104, 1113, 1119, + /* 230 */ 1122, 1120, 1042, 1111, 1115, 1078, 1116, 1124, 1062, 1123, + /* 240 */ 1128, 1133, 1082, 1136, 1138, 1137, 1139, 1147, 1125, 1126, + /* 250 */ 1127, 1129, 1134, 1144, 1145, 1146, 1151, 1154, 1155, 1149, + /* 260 */ 1153, 1159, 1160, 1156, 1157, 1162, 1081, 1089, 1090, 1170, + /* 270 */ 1140, 1143, 1142, 1165, 1198, 1164, 1211, 1177, 1178, 1168, + /* 280 */ 1087, 1174, 1180, 1093, 1179, 1203, 1204, 965, 1152, 1166, + /* 290 */ 1169, 1163, 1173, 1176, 1191, 1114, 1171, 1175, 908, 1265, + /* 300 */ 1183, 1172, 1186, 1271, 1262, 1264, 1215, 1231, 1235, 1250, + /* 310 */ 1261, 1266, 1230, 1273, 1255, 1298, 1281, 1301, 1310, 1212, + /* 320 */ 1287, 1280, 1304, 1322, 1317, 1336, 1334, 1338, 1268, 1256, + /* 330 */ 1274, 1283, 1312, 1318, 1324, 1337, 1362, }; static const YYACTIONTYPE yy_default[] = { - /* 0 */ 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, - /* 10 */ 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, - /* 20 */ 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, - /* 30 */ 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, - /* 40 */ 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, - /* 50 */ 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, - /* 60 */ 1858, 2189, 1858, 1858, 2152, 1858, 1858, 1858, 1858, 1858, - /* 70 */ 1858, 1858, 1858, 1858, 1858, 1858, 2159, 1858, 1858, 1858, - /* 80 */ 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, - /* 90 */ 1858, 1858, 1858, 1858, 1858, 1954, 1858, 1858, 1858, 1858, - /* 100 */ 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, - /* 110 */ 1858, 1858, 1858, 1952, 2388, 1858, 1858, 1858, 1858, 1858, - /* 120 */ 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, - /* 130 */ 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, 2400, 1858, - /* 140 */ 1858, 1928, 1928, 1858, 2400, 2400, 2400, 1952, 2360, 2360, - /* 150 */ 1858, 1954, 2227, 1858, 1858, 1858, 1858, 1858, 1858, 1858, - /* 160 */ 1858, 2076, 1858, 1888, 1858, 1858, 1858, 1858, 2100, 1858, - /* 170 */ 1858, 1858, 2215, 1858, 1858, 2429, 2486, 1858, 1858, 2432, - /* 180 */ 1858, 1858, 1858, 1858, 1858, 1858, 2164, 1858, 1858, 2029, - /* 190 */ 2209, 2419, 2392, 2406, 2470, 2393, 2390, 2413, 1858, 2423, - /* 200 */ 1858, 2251, 1858, 2241, 1954, 1858, 1954, 2202, 2147, 1858, - /* 210 */ 2157, 1858, 1858, 2157, 2154, 1858, 1858, 1858, 2157, 2154, - /* 220 */ 2154, 2018, 2014, 1858, 2012, 1858, 1858, 1858, 1858, 1912, - /* 230 */ 1858, 1912, 1858, 1954, 1954, 1858, 1954, 1858, 1858, 1954, - /* 240 */ 1858, 1954, 1858, 1954, 1954, 1858, 1954, 1858, 1858, 1858, - /* 250 */ 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, - /* 260 */ 1858, 1858, 1858, 1858, 1858, 1858, 2239, 2225, 1858, 1952, - /* 270 */ 1858, 2213, 2211, 1858, 1952, 2423, 1858, 1858, 1858, 1858, - /* 280 */ 2440, 2438, 1858, 2440, 2438, 1858, 1858, 1858, 2454, 2450, - /* 290 */ 2440, 2459, 2456, 2425, 2423, 2489, 2476, 2472, 2406, 1858, - /* 300 */ 1858, 2411, 2409, 1858, 1952, 1952, 2438, 1858, 1858, 1858, - /* 310 */ 1858, 1858, 2438, 1858, 1858, 1952, 1858, 1952, 1858, 1858, - /* 320 */ 2045, 1858, 1858, 1858, 1952, 1858, 1897, 1858, 2204, 2230, - /* 330 */ 2185, 2185, 2079, 2079, 2079, 1955, 1863, 1858, 1858, 1858, - /* 340 */ 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, 2453, - /* 350 */ 2452, 2315, 1858, 2364, 2363, 2362, 2353, 2314, 2041, 1858, - /* 360 */ 1858, 2313, 2312, 1858, 1858, 1858, 1858, 1858, 1858, 1858, - /* 370 */ 1858, 2176, 2175, 2306, 1858, 1858, 2307, 2305, 2304, 1858, - /* 380 */ 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, - /* 390 */ 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, - /* 400 */ 1858, 1858, 1858, 2473, 2477, 1858, 1858, 1858, 1858, 1858, - /* 410 */ 1858, 2389, 1858, 1858, 1858, 2287, 1858, 1858, 1858, 1858, - /* 420 */ 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, - /* 430 */ 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, - /* 440 */ 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, - /* 450 */ 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, - /* 460 */ 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, 2153, 1858, - /* 470 */ 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, - /* 480 */ 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, - /* 490 */ 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, - /* 500 */ 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, - /* 510 */ 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, - /* 520 */ 1858, 1858, 1858, 1858, 1858, 2168, 1858, 1858, 1858, 1858, - /* 530 */ 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, - /* 540 */ 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, - /* 550 */ 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1902, 2293, 1858, - /* 560 */ 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, - /* 570 */ 1858, 1858, 2296, 1858, 1858, 1858, 1858, 1858, 1858, 1858, - /* 580 */ 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, - /* 590 */ 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, - /* 600 */ 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, - /* 610 */ 1858, 1858, 1858, 1994, 1993, 1858, 1858, 1858, 1858, 1858, - /* 620 */ 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, - /* 630 */ 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, 2297, - /* 640 */ 1858, 1858, 1858, 1858, 1858, 2289, 1858, 1858, 1858, 1858, - /* 650 */ 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, - /* 660 */ 1858, 1858, 2469, 2426, 1858, 1858, 1858, 1858, 1858, 1858, - /* 670 */ 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, - /* 680 */ 1858, 1858, 2287, 1858, 2451, 1858, 1858, 2467, 1858, 2471, - /* 690 */ 1858, 1858, 1858, 1858, 1858, 1858, 1858, 2399, 2395, 1858, - /* 700 */ 1858, 2391, 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, - /* 710 */ 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, 2286, - /* 720 */ 1858, 2350, 1858, 1858, 1858, 2384, 1858, 1858, 2335, 1858, - /* 730 */ 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, 2297, 1858, - /* 740 */ 2300, 1858, 1858, 1858, 1858, 1858, 2073, 1858, 1858, 1858, - /* 750 */ 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, - /* 760 */ 1858, 1858, 2057, 2055, 2054, 2053, 1858, 2086, 1858, 1858, - /* 770 */ 1858, 2082, 2081, 1858, 1858, 1858, 1858, 1858, 1858, 1858, - /* 780 */ 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1973, 1858, 1858, - /* 790 */ 1858, 1858, 1858, 1858, 1858, 1858, 1965, 1858, 1964, 1858, - /* 800 */ 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, - /* 810 */ 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, 1858, - /* 820 */ 1858, 1858, 1858, 1858, 1858, 1858, 1887, 1858, 1858, 1858, - /* 830 */ 1858, 1858, 1858, + /* 0 */ 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, + /* 10 */ 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, + /* 20 */ 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, + /* 30 */ 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, + /* 40 */ 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, + /* 50 */ 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, + /* 60 */ 1860, 2192, 1860, 1860, 2155, 1860, 1860, 1860, 1860, 1860, + /* 70 */ 1860, 1860, 1860, 1860, 1860, 1860, 2162, 1860, 1860, 1860, + /* 80 */ 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, + /* 90 */ 1860, 1860, 1860, 1860, 1860, 1957, 1860, 1860, 1860, 1860, + /* 100 */ 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, + /* 110 */ 1860, 1860, 1860, 1955, 2391, 1860, 1860, 1860, 1860, 1860, + /* 120 */ 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, + /* 130 */ 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 2403, 1860, + /* 140 */ 1860, 1931, 1931, 1860, 2403, 2403, 2403, 1955, 2363, 2363, + /* 150 */ 1860, 1957, 2230, 1860, 1860, 1860, 1860, 1860, 1860, 1860, + /* 160 */ 1860, 2079, 1860, 1890, 1860, 1860, 1860, 1860, 2103, 1860, + /* 170 */ 1860, 1860, 2218, 1860, 1860, 2432, 2489, 1860, 1860, 2435, + /* 180 */ 1860, 1860, 1860, 1860, 1860, 1860, 1860, 2167, 1860, 2032, + /* 190 */ 2212, 2422, 2395, 2409, 2473, 2396, 2393, 2416, 1860, 2426, + /* 200 */ 1860, 2254, 1860, 2244, 1957, 1860, 1957, 2205, 2150, 1860, + /* 210 */ 2160, 1860, 1860, 2160, 2157, 1860, 1860, 1860, 2160, 2157, + /* 220 */ 2157, 2021, 2017, 1860, 2015, 1860, 1860, 1860, 1860, 1915, + /* 230 */ 1860, 1915, 1860, 1957, 1957, 1860, 1957, 1860, 1860, 1957, + /* 240 */ 1860, 1957, 1860, 1957, 1957, 1860, 1957, 1860, 1860, 1860, + /* 250 */ 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, + /* 260 */ 1860, 1860, 1860, 1860, 1860, 1860, 2242, 2228, 1860, 1955, + /* 270 */ 1860, 2216, 2214, 1860, 1955, 2426, 1860, 1860, 1860, 1860, + /* 280 */ 2443, 2441, 1860, 2443, 2441, 1860, 1860, 1860, 2457, 2453, + /* 290 */ 2443, 2462, 2459, 2428, 2426, 2492, 2479, 2475, 2409, 1860, + /* 300 */ 1860, 2414, 2412, 1860, 1955, 1955, 2441, 1860, 1860, 1860, + /* 310 */ 1860, 1860, 2441, 1860, 1860, 1955, 1860, 1955, 1860, 1860, + /* 320 */ 2048, 1860, 1860, 1860, 1955, 1860, 1899, 1860, 2207, 2233, + /* 330 */ 2188, 2188, 2082, 2082, 2082, 1958, 1865, 1860, 1860, 1860, + /* 340 */ 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 2456, + /* 350 */ 2455, 2318, 1860, 2367, 2366, 2365, 2356, 2317, 2044, 1860, + /* 360 */ 1860, 2316, 2315, 1860, 1860, 1860, 1860, 1860, 1860, 1860, + /* 370 */ 1860, 2179, 2178, 2309, 1860, 1860, 2310, 2308, 2307, 1860, + /* 380 */ 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, + /* 390 */ 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, + /* 400 */ 1860, 1860, 1860, 2476, 2480, 1860, 1860, 1860, 1860, 1860, + /* 410 */ 1860, 2392, 1860, 1860, 1860, 2290, 1860, 1860, 1860, 1860, + /* 420 */ 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, + /* 430 */ 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, + /* 440 */ 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, + /* 450 */ 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, + /* 460 */ 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 2156, 1860, + /* 470 */ 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, + /* 480 */ 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, + /* 490 */ 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, + /* 500 */ 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, + /* 510 */ 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, + /* 520 */ 1860, 1860, 1860, 1860, 1860, 2171, 1860, 1860, 1860, 1860, + /* 530 */ 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, + /* 540 */ 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, + /* 550 */ 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1904, 2296, 1860, + /* 560 */ 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, + /* 570 */ 1860, 1860, 2299, 1860, 1860, 1860, 1860, 1860, 1860, 1860, + /* 580 */ 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, + /* 590 */ 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, + /* 600 */ 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, + /* 610 */ 1860, 1860, 1860, 1997, 1996, 1860, 1860, 1860, 1860, 1860, + /* 620 */ 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, + /* 630 */ 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 2300, + /* 640 */ 1860, 1860, 1860, 1860, 1860, 2292, 1860, 1860, 1860, 1860, + /* 650 */ 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, + /* 660 */ 1860, 1860, 2472, 2429, 1860, 1860, 1860, 1860, 1860, 1860, + /* 670 */ 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, + /* 680 */ 1860, 1860, 2290, 1860, 2454, 1860, 1860, 2470, 1860, 2474, + /* 690 */ 1860, 1860, 1860, 1860, 1860, 1860, 1860, 2402, 2398, 1860, + /* 700 */ 1860, 2394, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, + /* 710 */ 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 2289, + /* 720 */ 1860, 2353, 1860, 1860, 1860, 2387, 1860, 1860, 2338, 1860, + /* 730 */ 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 2300, 1860, + /* 740 */ 2303, 1860, 1860, 1860, 1860, 1860, 2076, 1860, 1860, 1860, + /* 750 */ 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, + /* 760 */ 1860, 1860, 2060, 2058, 2057, 2056, 1860, 2089, 1860, 1860, + /* 770 */ 1860, 2085, 2084, 1860, 1860, 1860, 1860, 1860, 1860, 1860, + /* 780 */ 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1976, 1860, 1860, + /* 790 */ 1860, 1860, 1860, 1860, 1860, 1860, 1968, 1860, 1967, 1860, + /* 800 */ 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, + /* 810 */ 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, + /* 820 */ 1860, 1860, 1860, 1860, 1860, 1860, 1889, 1860, 1860, 1860, + /* 830 */ 1860, 1860, 1860, }; /********** End of lemon-generated parsing tables *****************************/ @@ -2081,590 +2081,591 @@ static const char *const yyRuleName[] = { /* 44 */ "priv_type_list ::= priv_type_list NK_COMMA priv_type", /* 45 */ "priv_type ::= READ", /* 46 */ "priv_type ::= WRITE", - /* 47 */ "priv_level ::= NK_STAR NK_DOT NK_STAR", - /* 48 */ "priv_level ::= db_name NK_DOT NK_STAR", - /* 49 */ "priv_level ::= db_name NK_DOT table_name", - /* 50 */ "priv_level ::= topic_name", - /* 51 */ "with_opt ::=", - /* 52 */ "with_opt ::= WITH search_condition", - /* 53 */ "cmd ::= CREATE DNODE dnode_endpoint", - /* 54 */ "cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER", - /* 55 */ "cmd ::= DROP DNODE NK_INTEGER force_opt", - /* 56 */ "cmd ::= DROP DNODE dnode_endpoint force_opt", - /* 57 */ "cmd ::= DROP DNODE NK_INTEGER unsafe_opt", - /* 58 */ "cmd ::= DROP DNODE dnode_endpoint unsafe_opt", - /* 59 */ "cmd ::= ALTER DNODE NK_INTEGER NK_STRING", - /* 60 */ "cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING", - /* 61 */ "cmd ::= ALTER ALL DNODES NK_STRING", - /* 62 */ "cmd ::= ALTER ALL DNODES NK_STRING NK_STRING", - /* 63 */ "cmd ::= RESTORE DNODE NK_INTEGER", - /* 64 */ "dnode_endpoint ::= NK_STRING", - /* 65 */ "dnode_endpoint ::= NK_ID", - /* 66 */ "dnode_endpoint ::= NK_IPTOKEN", - /* 67 */ "force_opt ::=", - /* 68 */ "force_opt ::= FORCE", - /* 69 */ "unsafe_opt ::= UNSAFE", - /* 70 */ "cmd ::= ALTER LOCAL NK_STRING", - /* 71 */ "cmd ::= ALTER LOCAL NK_STRING NK_STRING", - /* 72 */ "cmd ::= CREATE QNODE ON DNODE NK_INTEGER", - /* 73 */ "cmd ::= DROP QNODE ON DNODE NK_INTEGER", - /* 74 */ "cmd ::= RESTORE QNODE ON DNODE NK_INTEGER", - /* 75 */ "cmd ::= CREATE BNODE ON DNODE NK_INTEGER", - /* 76 */ "cmd ::= DROP BNODE ON DNODE NK_INTEGER", - /* 77 */ "cmd ::= CREATE SNODE ON DNODE NK_INTEGER", - /* 78 */ "cmd ::= DROP SNODE ON DNODE NK_INTEGER", - /* 79 */ "cmd ::= CREATE MNODE ON DNODE NK_INTEGER", - /* 80 */ "cmd ::= DROP MNODE ON DNODE NK_INTEGER", - /* 81 */ "cmd ::= RESTORE MNODE ON DNODE NK_INTEGER", - /* 82 */ "cmd ::= RESTORE VNODE ON DNODE NK_INTEGER", - /* 83 */ "cmd ::= CREATE DATABASE not_exists_opt db_name db_options", - /* 84 */ "cmd ::= DROP DATABASE exists_opt db_name", - /* 85 */ "cmd ::= USE db_name", - /* 86 */ "cmd ::= ALTER DATABASE db_name alter_db_options", - /* 87 */ "cmd ::= FLUSH DATABASE db_name", - /* 88 */ "cmd ::= TRIM DATABASE db_name speed_opt", - /* 89 */ "cmd ::= COMPACT DATABASE db_name start_opt end_opt", - /* 90 */ "not_exists_opt ::= IF NOT EXISTS", - /* 91 */ "not_exists_opt ::=", - /* 92 */ "exists_opt ::= IF EXISTS", - /* 93 */ "exists_opt ::=", - /* 94 */ "db_options ::=", - /* 95 */ "db_options ::= db_options BUFFER NK_INTEGER", - /* 96 */ "db_options ::= db_options CACHEMODEL NK_STRING", - /* 97 */ "db_options ::= db_options CACHESIZE NK_INTEGER", - /* 98 */ "db_options ::= db_options COMP NK_INTEGER", - /* 99 */ "db_options ::= db_options DURATION NK_INTEGER", - /* 100 */ "db_options ::= db_options DURATION NK_VARIABLE", - /* 101 */ "db_options ::= db_options MAXROWS NK_INTEGER", - /* 102 */ "db_options ::= db_options MINROWS NK_INTEGER", - /* 103 */ "db_options ::= db_options KEEP integer_list", - /* 104 */ "db_options ::= db_options KEEP variable_list", - /* 105 */ "db_options ::= db_options PAGES NK_INTEGER", - /* 106 */ "db_options ::= db_options PAGESIZE NK_INTEGER", - /* 107 */ "db_options ::= db_options TSDB_PAGESIZE NK_INTEGER", - /* 108 */ "db_options ::= db_options PRECISION NK_STRING", - /* 109 */ "db_options ::= db_options REPLICA NK_INTEGER", - /* 110 */ "db_options ::= db_options VGROUPS NK_INTEGER", - /* 111 */ "db_options ::= db_options SINGLE_STABLE NK_INTEGER", - /* 112 */ "db_options ::= db_options RETENTIONS retention_list", - /* 113 */ "db_options ::= db_options SCHEMALESS NK_INTEGER", - /* 114 */ "db_options ::= db_options WAL_LEVEL NK_INTEGER", - /* 115 */ "db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER", - /* 116 */ "db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER", - /* 117 */ "db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER", - /* 118 */ "db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER", - /* 119 */ "db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER", - /* 120 */ "db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER", - /* 121 */ "db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER", - /* 122 */ "db_options ::= db_options STT_TRIGGER NK_INTEGER", - /* 123 */ "db_options ::= db_options TABLE_PREFIX signed", - /* 124 */ "db_options ::= db_options TABLE_SUFFIX signed", - /* 125 */ "db_options ::= db_options KEEP_TIME_OFFSET NK_INTEGER", - /* 126 */ "alter_db_options ::= alter_db_option", - /* 127 */ "alter_db_options ::= alter_db_options alter_db_option", - /* 128 */ "alter_db_option ::= BUFFER NK_INTEGER", - /* 129 */ "alter_db_option ::= CACHEMODEL NK_STRING", - /* 130 */ "alter_db_option ::= CACHESIZE NK_INTEGER", - /* 131 */ "alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER", - /* 132 */ "alter_db_option ::= KEEP integer_list", - /* 133 */ "alter_db_option ::= KEEP variable_list", - /* 134 */ "alter_db_option ::= PAGES NK_INTEGER", - /* 135 */ "alter_db_option ::= REPLICA NK_INTEGER", - /* 136 */ "alter_db_option ::= WAL_LEVEL NK_INTEGER", - /* 137 */ "alter_db_option ::= STT_TRIGGER NK_INTEGER", - /* 138 */ "alter_db_option ::= MINROWS NK_INTEGER", - /* 139 */ "alter_db_option ::= WAL_RETENTION_PERIOD NK_INTEGER", - /* 140 */ "alter_db_option ::= WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER", - /* 141 */ "alter_db_option ::= WAL_RETENTION_SIZE NK_INTEGER", - /* 142 */ "alter_db_option ::= WAL_RETENTION_SIZE NK_MINUS NK_INTEGER", - /* 143 */ "alter_db_option ::= KEEP_TIME_OFFSET NK_INTEGER", - /* 144 */ "integer_list ::= NK_INTEGER", - /* 145 */ "integer_list ::= integer_list NK_COMMA NK_INTEGER", - /* 146 */ "variable_list ::= NK_VARIABLE", - /* 147 */ "variable_list ::= variable_list NK_COMMA NK_VARIABLE", - /* 148 */ "retention_list ::= retention", - /* 149 */ "retention_list ::= retention_list NK_COMMA retention", - /* 150 */ "retention ::= NK_VARIABLE NK_COLON NK_VARIABLE", - /* 151 */ "speed_opt ::=", - /* 152 */ "speed_opt ::= BWLIMIT NK_INTEGER", - /* 153 */ "start_opt ::=", - /* 154 */ "start_opt ::= START WITH NK_INTEGER", - /* 155 */ "start_opt ::= START WITH NK_STRING", - /* 156 */ "start_opt ::= START WITH TIMESTAMP NK_STRING", - /* 157 */ "end_opt ::=", - /* 158 */ "end_opt ::= END WITH NK_INTEGER", - /* 159 */ "end_opt ::= END WITH NK_STRING", - /* 160 */ "end_opt ::= END WITH TIMESTAMP NK_STRING", - /* 161 */ "cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options", - /* 162 */ "cmd ::= CREATE TABLE multi_create_clause", - /* 163 */ "cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options", - /* 164 */ "cmd ::= DROP TABLE multi_drop_clause", - /* 165 */ "cmd ::= DROP STABLE exists_opt full_table_name", - /* 166 */ "cmd ::= ALTER TABLE alter_table_clause", - /* 167 */ "cmd ::= ALTER STABLE alter_table_clause", - /* 168 */ "alter_table_clause ::= full_table_name alter_table_options", - /* 169 */ "alter_table_clause ::= full_table_name ADD COLUMN column_name type_name", - /* 170 */ "alter_table_clause ::= full_table_name DROP COLUMN column_name", - /* 171 */ "alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name", - /* 172 */ "alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name", - /* 173 */ "alter_table_clause ::= full_table_name ADD TAG column_name type_name", - /* 174 */ "alter_table_clause ::= full_table_name DROP TAG column_name", - /* 175 */ "alter_table_clause ::= full_table_name MODIFY TAG column_name type_name", - /* 176 */ "alter_table_clause ::= full_table_name RENAME TAG column_name column_name", - /* 177 */ "alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal", - /* 178 */ "multi_create_clause ::= create_subtable_clause", - /* 179 */ "multi_create_clause ::= multi_create_clause create_subtable_clause", - /* 180 */ "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", - /* 181 */ "multi_drop_clause ::= drop_table_clause", - /* 182 */ "multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause", - /* 183 */ "drop_table_clause ::= exists_opt full_table_name", - /* 184 */ "specific_cols_opt ::=", - /* 185 */ "specific_cols_opt ::= NK_LP col_name_list NK_RP", - /* 186 */ "full_table_name ::= table_name", - /* 187 */ "full_table_name ::= db_name NK_DOT table_name", - /* 188 */ "column_def_list ::= column_def", - /* 189 */ "column_def_list ::= column_def_list NK_COMMA column_def", - /* 190 */ "column_def ::= column_name type_name", - /* 191 */ "type_name ::= BOOL", - /* 192 */ "type_name ::= TINYINT", - /* 193 */ "type_name ::= SMALLINT", - /* 194 */ "type_name ::= INT", - /* 195 */ "type_name ::= INTEGER", - /* 196 */ "type_name ::= BIGINT", - /* 197 */ "type_name ::= FLOAT", - /* 198 */ "type_name ::= DOUBLE", - /* 199 */ "type_name ::= BINARY NK_LP NK_INTEGER NK_RP", - /* 200 */ "type_name ::= TIMESTAMP", - /* 201 */ "type_name ::= NCHAR NK_LP NK_INTEGER NK_RP", - /* 202 */ "type_name ::= TINYINT UNSIGNED", - /* 203 */ "type_name ::= SMALLINT UNSIGNED", - /* 204 */ "type_name ::= INT UNSIGNED", - /* 205 */ "type_name ::= BIGINT UNSIGNED", - /* 206 */ "type_name ::= JSON", - /* 207 */ "type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP", - /* 208 */ "type_name ::= MEDIUMBLOB", - /* 209 */ "type_name ::= BLOB", - /* 210 */ "type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP", - /* 211 */ "type_name ::= GEOMETRY NK_LP NK_INTEGER NK_RP", - /* 212 */ "type_name ::= DECIMAL", - /* 213 */ "type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP", - /* 214 */ "type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP", - /* 215 */ "tags_def_opt ::=", - /* 216 */ "tags_def_opt ::= tags_def", - /* 217 */ "tags_def ::= TAGS NK_LP column_def_list NK_RP", - /* 218 */ "table_options ::=", - /* 219 */ "table_options ::= table_options COMMENT NK_STRING", - /* 220 */ "table_options ::= table_options MAX_DELAY duration_list", - /* 221 */ "table_options ::= table_options WATERMARK duration_list", - /* 222 */ "table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP", - /* 223 */ "table_options ::= table_options TTL NK_INTEGER", - /* 224 */ "table_options ::= table_options SMA NK_LP col_name_list NK_RP", - /* 225 */ "table_options ::= table_options DELETE_MARK duration_list", - /* 226 */ "alter_table_options ::= alter_table_option", - /* 227 */ "alter_table_options ::= alter_table_options alter_table_option", - /* 228 */ "alter_table_option ::= COMMENT NK_STRING", - /* 229 */ "alter_table_option ::= TTL NK_INTEGER", - /* 230 */ "duration_list ::= duration_literal", - /* 231 */ "duration_list ::= duration_list NK_COMMA duration_literal", - /* 232 */ "rollup_func_list ::= rollup_func_name", - /* 233 */ "rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name", - /* 234 */ "rollup_func_name ::= function_name", - /* 235 */ "rollup_func_name ::= FIRST", - /* 236 */ "rollup_func_name ::= LAST", - /* 237 */ "col_name_list ::= col_name", - /* 238 */ "col_name_list ::= col_name_list NK_COMMA col_name", - /* 239 */ "col_name ::= column_name", - /* 240 */ "cmd ::= SHOW DNODES", - /* 241 */ "cmd ::= SHOW USERS", - /* 242 */ "cmd ::= SHOW USER PRIVILEGES", - /* 243 */ "cmd ::= SHOW db_kind_opt DATABASES", - /* 244 */ "cmd ::= SHOW table_kind_db_name_cond_opt TABLES like_pattern_opt", - /* 245 */ "cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt", - /* 246 */ "cmd ::= SHOW db_name_cond_opt VGROUPS", - /* 247 */ "cmd ::= SHOW MNODES", - /* 248 */ "cmd ::= SHOW QNODES", - /* 249 */ "cmd ::= SHOW FUNCTIONS", - /* 250 */ "cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt", - /* 251 */ "cmd ::= SHOW INDEXES FROM db_name NK_DOT table_name", - /* 252 */ "cmd ::= SHOW STREAMS", - /* 253 */ "cmd ::= SHOW ACCOUNTS", - /* 254 */ "cmd ::= SHOW APPS", - /* 255 */ "cmd ::= SHOW CONNECTIONS", - /* 256 */ "cmd ::= SHOW LICENCES", - /* 257 */ "cmd ::= SHOW GRANTS", - /* 258 */ "cmd ::= SHOW CREATE DATABASE db_name", - /* 259 */ "cmd ::= SHOW CREATE TABLE full_table_name", - /* 260 */ "cmd ::= SHOW CREATE STABLE full_table_name", - /* 261 */ "cmd ::= SHOW QUERIES", - /* 262 */ "cmd ::= SHOW SCORES", - /* 263 */ "cmd ::= SHOW TOPICS", - /* 264 */ "cmd ::= SHOW VARIABLES", - /* 265 */ "cmd ::= SHOW CLUSTER VARIABLES", - /* 266 */ "cmd ::= SHOW LOCAL VARIABLES", - /* 267 */ "cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt", - /* 268 */ "cmd ::= SHOW BNODES", - /* 269 */ "cmd ::= SHOW SNODES", - /* 270 */ "cmd ::= SHOW CLUSTER", - /* 271 */ "cmd ::= SHOW TRANSACTIONS", - /* 272 */ "cmd ::= SHOW TABLE DISTRIBUTED full_table_name", - /* 273 */ "cmd ::= SHOW CONSUMERS", - /* 274 */ "cmd ::= SHOW SUBSCRIPTIONS", - /* 275 */ "cmd ::= SHOW TAGS FROM table_name_cond from_db_opt", - /* 276 */ "cmd ::= SHOW TAGS FROM db_name NK_DOT table_name", - /* 277 */ "cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt", - /* 278 */ "cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name", - /* 279 */ "cmd ::= SHOW VNODES ON DNODE NK_INTEGER", - /* 280 */ "cmd ::= SHOW VNODES", - /* 281 */ "cmd ::= SHOW db_name_cond_opt ALIVE", - /* 282 */ "cmd ::= SHOW CLUSTER ALIVE", - /* 283 */ "cmd ::= SHOW db_name_cond_opt VIEWS", - /* 284 */ "cmd ::= SHOW CREATE VIEW full_table_name", - /* 285 */ "table_kind_db_name_cond_opt ::=", - /* 286 */ "table_kind_db_name_cond_opt ::= table_kind", - /* 287 */ "table_kind_db_name_cond_opt ::= db_name NK_DOT", - /* 288 */ "table_kind_db_name_cond_opt ::= table_kind db_name NK_DOT", - /* 289 */ "table_kind ::= NORMAL", - /* 290 */ "table_kind ::= CHILD", - /* 291 */ "db_name_cond_opt ::=", - /* 292 */ "db_name_cond_opt ::= db_name NK_DOT", - /* 293 */ "like_pattern_opt ::=", - /* 294 */ "like_pattern_opt ::= LIKE NK_STRING", - /* 295 */ "table_name_cond ::= table_name", - /* 296 */ "from_db_opt ::=", - /* 297 */ "from_db_opt ::= FROM db_name", - /* 298 */ "tag_list_opt ::=", - /* 299 */ "tag_list_opt ::= tag_item", - /* 300 */ "tag_list_opt ::= tag_list_opt NK_COMMA tag_item", - /* 301 */ "tag_item ::= TBNAME", - /* 302 */ "tag_item ::= QTAGS", - /* 303 */ "tag_item ::= column_name", - /* 304 */ "tag_item ::= column_name column_alias", - /* 305 */ "tag_item ::= column_name AS column_alias", - /* 306 */ "db_kind_opt ::=", - /* 307 */ "db_kind_opt ::= USER", - /* 308 */ "db_kind_opt ::= SYSTEM", - /* 309 */ "cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options", - /* 310 */ "cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP", - /* 311 */ "cmd ::= DROP INDEX exists_opt full_index_name", - /* 312 */ "full_index_name ::= index_name", - /* 313 */ "full_index_name ::= db_name NK_DOT index_name", - /* 314 */ "index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt", - /* 315 */ "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", - /* 316 */ "func_list ::= func", - /* 317 */ "func_list ::= func_list NK_COMMA func", - /* 318 */ "func ::= sma_func_name NK_LP expression_list NK_RP", - /* 319 */ "sma_func_name ::= function_name", - /* 320 */ "sma_func_name ::= COUNT", - /* 321 */ "sma_func_name ::= FIRST", - /* 322 */ "sma_func_name ::= LAST", - /* 323 */ "sma_func_name ::= LAST_ROW", - /* 324 */ "sma_stream_opt ::=", - /* 325 */ "sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal", - /* 326 */ "sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal", - /* 327 */ "sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal", - /* 328 */ "with_meta ::= AS", - /* 329 */ "with_meta ::= WITH META AS", - /* 330 */ "with_meta ::= ONLY META AS", - /* 331 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery", - /* 332 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name", - /* 333 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt", - /* 334 */ "cmd ::= DROP TOPIC exists_opt topic_name", - /* 335 */ "cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name", - /* 336 */ "cmd ::= DESC full_table_name", - /* 337 */ "cmd ::= DESCRIBE full_table_name", - /* 338 */ "cmd ::= RESET QUERY CACHE", - /* 339 */ "cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery", - /* 340 */ "cmd ::= EXPLAIN analyze_opt explain_options insert_query", - /* 341 */ "analyze_opt ::=", - /* 342 */ "analyze_opt ::= ANALYZE", - /* 343 */ "explain_options ::=", - /* 344 */ "explain_options ::= explain_options VERBOSE NK_BOOL", - /* 345 */ "explain_options ::= explain_options RATIO NK_FLOAT", - /* 346 */ "cmd ::= CREATE or_replace_opt agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt language_opt", - /* 347 */ "cmd ::= DROP FUNCTION exists_opt function_name", - /* 348 */ "agg_func_opt ::=", - /* 349 */ "agg_func_opt ::= AGGREGATE", - /* 350 */ "bufsize_opt ::=", - /* 351 */ "bufsize_opt ::= BUFSIZE NK_INTEGER", - /* 352 */ "language_opt ::=", - /* 353 */ "language_opt ::= LANGUAGE NK_STRING", - /* 354 */ "or_replace_opt ::=", - /* 355 */ "or_replace_opt ::= OR REPLACE", - /* 356 */ "cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery", - /* 357 */ "cmd ::= DROP VIEW exists_opt full_view_name", - /* 358 */ "full_view_name ::= view_name", - /* 359 */ "full_view_name ::= db_name NK_DOT view_name", - /* 360 */ "cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name col_list_opt tag_def_or_ref_opt subtable_opt AS query_or_subquery", - /* 361 */ "cmd ::= DROP STREAM exists_opt stream_name", - /* 362 */ "cmd ::= PAUSE STREAM exists_opt stream_name", - /* 363 */ "cmd ::= RESUME STREAM exists_opt ignore_opt stream_name", - /* 364 */ "col_list_opt ::=", - /* 365 */ "col_list_opt ::= NK_LP col_name_list NK_RP", - /* 366 */ "tag_def_or_ref_opt ::=", - /* 367 */ "tag_def_or_ref_opt ::= tags_def", - /* 368 */ "tag_def_or_ref_opt ::= TAGS NK_LP col_name_list NK_RP", - /* 369 */ "stream_options ::=", - /* 370 */ "stream_options ::= stream_options TRIGGER AT_ONCE", - /* 371 */ "stream_options ::= stream_options TRIGGER WINDOW_CLOSE", - /* 372 */ "stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal", - /* 373 */ "stream_options ::= stream_options WATERMARK duration_literal", - /* 374 */ "stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER", - /* 375 */ "stream_options ::= stream_options FILL_HISTORY NK_INTEGER", - /* 376 */ "stream_options ::= stream_options DELETE_MARK duration_literal", - /* 377 */ "stream_options ::= stream_options IGNORE UPDATE NK_INTEGER", - /* 378 */ "subtable_opt ::=", - /* 379 */ "subtable_opt ::= SUBTABLE NK_LP expression NK_RP", - /* 380 */ "ignore_opt ::=", - /* 381 */ "ignore_opt ::= IGNORE UNTREATED", - /* 382 */ "cmd ::= KILL CONNECTION NK_INTEGER", - /* 383 */ "cmd ::= KILL QUERY NK_STRING", - /* 384 */ "cmd ::= KILL TRANSACTION NK_INTEGER", - /* 385 */ "cmd ::= BALANCE VGROUP", - /* 386 */ "cmd ::= BALANCE VGROUP LEADER on_vgroup_id", - /* 387 */ "cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER", - /* 388 */ "cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list", - /* 389 */ "cmd ::= SPLIT VGROUP NK_INTEGER", - /* 390 */ "on_vgroup_id ::=", - /* 391 */ "on_vgroup_id ::= ON NK_INTEGER", - /* 392 */ "dnode_list ::= DNODE NK_INTEGER", - /* 393 */ "dnode_list ::= dnode_list DNODE NK_INTEGER", - /* 394 */ "cmd ::= DELETE FROM full_table_name where_clause_opt", - /* 395 */ "cmd ::= query_or_subquery", - /* 396 */ "cmd ::= insert_query", - /* 397 */ "insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery", - /* 398 */ "insert_query ::= INSERT INTO full_table_name query_or_subquery", - /* 399 */ "literal ::= NK_INTEGER", - /* 400 */ "literal ::= NK_FLOAT", - /* 401 */ "literal ::= NK_STRING", - /* 402 */ "literal ::= NK_BOOL", - /* 403 */ "literal ::= TIMESTAMP NK_STRING", - /* 404 */ "literal ::= duration_literal", - /* 405 */ "literal ::= NULL", - /* 406 */ "literal ::= NK_QUESTION", - /* 407 */ "duration_literal ::= NK_VARIABLE", - /* 408 */ "signed ::= NK_INTEGER", - /* 409 */ "signed ::= NK_PLUS NK_INTEGER", - /* 410 */ "signed ::= NK_MINUS NK_INTEGER", - /* 411 */ "signed ::= NK_FLOAT", - /* 412 */ "signed ::= NK_PLUS NK_FLOAT", - /* 413 */ "signed ::= NK_MINUS NK_FLOAT", - /* 414 */ "signed_literal ::= signed", - /* 415 */ "signed_literal ::= NK_STRING", - /* 416 */ "signed_literal ::= NK_BOOL", - /* 417 */ "signed_literal ::= TIMESTAMP NK_STRING", - /* 418 */ "signed_literal ::= duration_literal", - /* 419 */ "signed_literal ::= NULL", - /* 420 */ "signed_literal ::= literal_func", - /* 421 */ "signed_literal ::= NK_QUESTION", - /* 422 */ "literal_list ::= signed_literal", - /* 423 */ "literal_list ::= literal_list NK_COMMA signed_literal", - /* 424 */ "db_name ::= NK_ID", - /* 425 */ "table_name ::= NK_ID", - /* 426 */ "column_name ::= NK_ID", - /* 427 */ "function_name ::= NK_ID", - /* 428 */ "view_name ::= NK_ID", - /* 429 */ "table_alias ::= NK_ID", - /* 430 */ "column_alias ::= NK_ID", - /* 431 */ "user_name ::= NK_ID", - /* 432 */ "topic_name ::= NK_ID", - /* 433 */ "stream_name ::= NK_ID", - /* 434 */ "cgroup_name ::= NK_ID", - /* 435 */ "index_name ::= NK_ID", - /* 436 */ "expr_or_subquery ::= expression", - /* 437 */ "expression ::= literal", - /* 438 */ "expression ::= pseudo_column", - /* 439 */ "expression ::= column_reference", - /* 440 */ "expression ::= function_expression", - /* 441 */ "expression ::= case_when_expression", - /* 442 */ "expression ::= NK_LP expression NK_RP", - /* 443 */ "expression ::= NK_PLUS expr_or_subquery", - /* 444 */ "expression ::= NK_MINUS expr_or_subquery", - /* 445 */ "expression ::= expr_or_subquery NK_PLUS expr_or_subquery", - /* 446 */ "expression ::= expr_or_subquery NK_MINUS expr_or_subquery", - /* 447 */ "expression ::= expr_or_subquery NK_STAR expr_or_subquery", - /* 448 */ "expression ::= expr_or_subquery NK_SLASH expr_or_subquery", - /* 449 */ "expression ::= expr_or_subquery NK_REM expr_or_subquery", - /* 450 */ "expression ::= column_reference NK_ARROW NK_STRING", - /* 451 */ "expression ::= expr_or_subquery NK_BITAND expr_or_subquery", - /* 452 */ "expression ::= expr_or_subquery NK_BITOR expr_or_subquery", - /* 453 */ "expression_list ::= expr_or_subquery", - /* 454 */ "expression_list ::= expression_list NK_COMMA expr_or_subquery", - /* 455 */ "column_reference ::= column_name", - /* 456 */ "column_reference ::= table_name NK_DOT column_name", - /* 457 */ "pseudo_column ::= ROWTS", - /* 458 */ "pseudo_column ::= TBNAME", - /* 459 */ "pseudo_column ::= table_name NK_DOT TBNAME", - /* 460 */ "pseudo_column ::= QSTART", - /* 461 */ "pseudo_column ::= QEND", - /* 462 */ "pseudo_column ::= QDURATION", - /* 463 */ "pseudo_column ::= WSTART", - /* 464 */ "pseudo_column ::= WEND", - /* 465 */ "pseudo_column ::= WDURATION", - /* 466 */ "pseudo_column ::= IROWTS", - /* 467 */ "pseudo_column ::= ISFILLED", - /* 468 */ "pseudo_column ::= QTAGS", - /* 469 */ "function_expression ::= function_name NK_LP expression_list NK_RP", - /* 470 */ "function_expression ::= star_func NK_LP star_func_para_list NK_RP", - /* 471 */ "function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP", - /* 472 */ "function_expression ::= literal_func", - /* 473 */ "literal_func ::= noarg_func NK_LP NK_RP", - /* 474 */ "literal_func ::= NOW", - /* 475 */ "noarg_func ::= NOW", - /* 476 */ "noarg_func ::= TODAY", - /* 477 */ "noarg_func ::= TIMEZONE", - /* 478 */ "noarg_func ::= DATABASE", - /* 479 */ "noarg_func ::= CLIENT_VERSION", - /* 480 */ "noarg_func ::= SERVER_VERSION", - /* 481 */ "noarg_func ::= SERVER_STATUS", - /* 482 */ "noarg_func ::= CURRENT_USER", - /* 483 */ "noarg_func ::= USER", - /* 484 */ "star_func ::= COUNT", - /* 485 */ "star_func ::= FIRST", - /* 486 */ "star_func ::= LAST", - /* 487 */ "star_func ::= LAST_ROW", - /* 488 */ "star_func_para_list ::= NK_STAR", - /* 489 */ "star_func_para_list ::= other_para_list", - /* 490 */ "other_para_list ::= star_func_para", - /* 491 */ "other_para_list ::= other_para_list NK_COMMA star_func_para", - /* 492 */ "star_func_para ::= expr_or_subquery", - /* 493 */ "star_func_para ::= table_name NK_DOT NK_STAR", - /* 494 */ "case_when_expression ::= CASE when_then_list case_when_else_opt END", - /* 495 */ "case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END", - /* 496 */ "when_then_list ::= when_then_expr", - /* 497 */ "when_then_list ::= when_then_list when_then_expr", - /* 498 */ "when_then_expr ::= WHEN common_expression THEN common_expression", - /* 499 */ "case_when_else_opt ::=", - /* 500 */ "case_when_else_opt ::= ELSE common_expression", - /* 501 */ "predicate ::= expr_or_subquery compare_op expr_or_subquery", - /* 502 */ "predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery", - /* 503 */ "predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery", - /* 504 */ "predicate ::= expr_or_subquery IS NULL", - /* 505 */ "predicate ::= expr_or_subquery IS NOT NULL", - /* 506 */ "predicate ::= expr_or_subquery in_op in_predicate_value", - /* 507 */ "compare_op ::= NK_LT", - /* 508 */ "compare_op ::= NK_GT", - /* 509 */ "compare_op ::= NK_LE", - /* 510 */ "compare_op ::= NK_GE", - /* 511 */ "compare_op ::= NK_NE", - /* 512 */ "compare_op ::= NK_EQ", - /* 513 */ "compare_op ::= LIKE", - /* 514 */ "compare_op ::= NOT LIKE", - /* 515 */ "compare_op ::= MATCH", - /* 516 */ "compare_op ::= NMATCH", - /* 517 */ "compare_op ::= CONTAINS", - /* 518 */ "in_op ::= IN", - /* 519 */ "in_op ::= NOT IN", - /* 520 */ "in_predicate_value ::= NK_LP literal_list NK_RP", - /* 521 */ "boolean_value_expression ::= boolean_primary", - /* 522 */ "boolean_value_expression ::= NOT boolean_primary", - /* 523 */ "boolean_value_expression ::= boolean_value_expression OR boolean_value_expression", - /* 524 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression", - /* 525 */ "boolean_primary ::= predicate", - /* 526 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP", - /* 527 */ "common_expression ::= expr_or_subquery", - /* 528 */ "common_expression ::= boolean_value_expression", - /* 529 */ "from_clause_opt ::=", - /* 530 */ "from_clause_opt ::= FROM table_reference_list", - /* 531 */ "table_reference_list ::= table_reference", - /* 532 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference", - /* 533 */ "table_reference ::= table_primary", - /* 534 */ "table_reference ::= joined_table", - /* 535 */ "table_primary ::= table_name alias_opt", - /* 536 */ "table_primary ::= db_name NK_DOT table_name alias_opt", - /* 537 */ "table_primary ::= subquery alias_opt", - /* 538 */ "table_primary ::= parenthesized_joined_table", - /* 539 */ "alias_opt ::=", - /* 540 */ "alias_opt ::= table_alias", - /* 541 */ "alias_opt ::= AS table_alias", - /* 542 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP", - /* 543 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP", - /* 544 */ "joined_table ::= table_reference join_type JOIN table_reference ON search_condition", - /* 545 */ "join_type ::=", - /* 546 */ "join_type ::= INNER", - /* 547 */ "query_specification ::= SELECT hint_list set_quantifier_opt tag_mode_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", - /* 548 */ "hint_list ::=", - /* 549 */ "hint_list ::= NK_HINT", - /* 550 */ "tag_mode_opt ::=", - /* 551 */ "tag_mode_opt ::= TAGS", - /* 552 */ "set_quantifier_opt ::=", - /* 553 */ "set_quantifier_opt ::= DISTINCT", - /* 554 */ "set_quantifier_opt ::= ALL", - /* 555 */ "select_list ::= select_item", - /* 556 */ "select_list ::= select_list NK_COMMA select_item", - /* 557 */ "select_item ::= NK_STAR", - /* 558 */ "select_item ::= common_expression", - /* 559 */ "select_item ::= common_expression column_alias", - /* 560 */ "select_item ::= common_expression AS column_alias", - /* 561 */ "select_item ::= table_name NK_DOT NK_STAR", - /* 562 */ "where_clause_opt ::=", - /* 563 */ "where_clause_opt ::= WHERE search_condition", - /* 564 */ "partition_by_clause_opt ::=", - /* 565 */ "partition_by_clause_opt ::= PARTITION BY partition_list", - /* 566 */ "partition_list ::= partition_item", - /* 567 */ "partition_list ::= partition_list NK_COMMA partition_item", - /* 568 */ "partition_item ::= expr_or_subquery", - /* 569 */ "partition_item ::= expr_or_subquery column_alias", - /* 570 */ "partition_item ::= expr_or_subquery AS column_alias", - /* 571 */ "twindow_clause_opt ::=", - /* 572 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP", - /* 573 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP", - /* 574 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt", - /* 575 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt", - /* 576 */ "twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition", - /* 577 */ "sliding_opt ::=", - /* 578 */ "sliding_opt ::= SLIDING NK_LP duration_literal NK_RP", - /* 579 */ "fill_opt ::=", - /* 580 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP", - /* 581 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP", - /* 582 */ "fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP", - /* 583 */ "fill_mode ::= NONE", - /* 584 */ "fill_mode ::= PREV", - /* 585 */ "fill_mode ::= NULL", - /* 586 */ "fill_mode ::= NULL_F", - /* 587 */ "fill_mode ::= LINEAR", - /* 588 */ "fill_mode ::= NEXT", - /* 589 */ "group_by_clause_opt ::=", - /* 590 */ "group_by_clause_opt ::= GROUP BY group_by_list", - /* 591 */ "group_by_list ::= expr_or_subquery", - /* 592 */ "group_by_list ::= group_by_list NK_COMMA expr_or_subquery", - /* 593 */ "having_clause_opt ::=", - /* 594 */ "having_clause_opt ::= HAVING search_condition", - /* 595 */ "range_opt ::=", - /* 596 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP", - /* 597 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_RP", - /* 598 */ "every_opt ::=", - /* 599 */ "every_opt ::= EVERY NK_LP duration_literal NK_RP", - /* 600 */ "query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt", - /* 601 */ "query_simple ::= query_specification", - /* 602 */ "query_simple ::= union_query_expression", - /* 603 */ "union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery", - /* 604 */ "union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery", - /* 605 */ "query_simple_or_subquery ::= query_simple", - /* 606 */ "query_simple_or_subquery ::= subquery", - /* 607 */ "query_or_subquery ::= query_expression", - /* 608 */ "query_or_subquery ::= subquery", - /* 609 */ "order_by_clause_opt ::=", - /* 610 */ "order_by_clause_opt ::= ORDER BY sort_specification_list", - /* 611 */ "slimit_clause_opt ::=", - /* 612 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER", - /* 613 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER", - /* 614 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER", - /* 615 */ "limit_clause_opt ::=", - /* 616 */ "limit_clause_opt ::= LIMIT NK_INTEGER", - /* 617 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER", - /* 618 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER", - /* 619 */ "subquery ::= NK_LP query_expression NK_RP", - /* 620 */ "subquery ::= NK_LP subquery NK_RP", - /* 621 */ "search_condition ::= common_expression", - /* 622 */ "sort_specification_list ::= sort_specification", - /* 623 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification", - /* 624 */ "sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt", - /* 625 */ "ordering_specification_opt ::=", - /* 626 */ "ordering_specification_opt ::= ASC", - /* 627 */ "ordering_specification_opt ::= DESC", - /* 628 */ "null_ordering_opt ::=", - /* 629 */ "null_ordering_opt ::= NULLS FIRST", - /* 630 */ "null_ordering_opt ::= NULLS LAST", + /* 47 */ "priv_type ::= ALTER", + /* 48 */ "priv_level ::= NK_STAR NK_DOT NK_STAR", + /* 49 */ "priv_level ::= db_name NK_DOT NK_STAR", + /* 50 */ "priv_level ::= db_name NK_DOT table_name", + /* 51 */ "priv_level ::= topic_name", + /* 52 */ "with_opt ::=", + /* 53 */ "with_opt ::= WITH search_condition", + /* 54 */ "cmd ::= CREATE DNODE dnode_endpoint", + /* 55 */ "cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER", + /* 56 */ "cmd ::= DROP DNODE NK_INTEGER force_opt", + /* 57 */ "cmd ::= DROP DNODE dnode_endpoint force_opt", + /* 58 */ "cmd ::= DROP DNODE NK_INTEGER unsafe_opt", + /* 59 */ "cmd ::= DROP DNODE dnode_endpoint unsafe_opt", + /* 60 */ "cmd ::= ALTER DNODE NK_INTEGER NK_STRING", + /* 61 */ "cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING", + /* 62 */ "cmd ::= ALTER ALL DNODES NK_STRING", + /* 63 */ "cmd ::= ALTER ALL DNODES NK_STRING NK_STRING", + /* 64 */ "cmd ::= RESTORE DNODE NK_INTEGER", + /* 65 */ "dnode_endpoint ::= NK_STRING", + /* 66 */ "dnode_endpoint ::= NK_ID", + /* 67 */ "dnode_endpoint ::= NK_IPTOKEN", + /* 68 */ "force_opt ::=", + /* 69 */ "force_opt ::= FORCE", + /* 70 */ "unsafe_opt ::= UNSAFE", + /* 71 */ "cmd ::= ALTER LOCAL NK_STRING", + /* 72 */ "cmd ::= ALTER LOCAL NK_STRING NK_STRING", + /* 73 */ "cmd ::= CREATE QNODE ON DNODE NK_INTEGER", + /* 74 */ "cmd ::= DROP QNODE ON DNODE NK_INTEGER", + /* 75 */ "cmd ::= RESTORE QNODE ON DNODE NK_INTEGER", + /* 76 */ "cmd ::= CREATE BNODE ON DNODE NK_INTEGER", + /* 77 */ "cmd ::= DROP BNODE ON DNODE NK_INTEGER", + /* 78 */ "cmd ::= CREATE SNODE ON DNODE NK_INTEGER", + /* 79 */ "cmd ::= DROP SNODE ON DNODE NK_INTEGER", + /* 80 */ "cmd ::= CREATE MNODE ON DNODE NK_INTEGER", + /* 81 */ "cmd ::= DROP MNODE ON DNODE NK_INTEGER", + /* 82 */ "cmd ::= RESTORE MNODE ON DNODE NK_INTEGER", + /* 83 */ "cmd ::= RESTORE VNODE ON DNODE NK_INTEGER", + /* 84 */ "cmd ::= CREATE DATABASE not_exists_opt db_name db_options", + /* 85 */ "cmd ::= DROP DATABASE exists_opt db_name", + /* 86 */ "cmd ::= USE db_name", + /* 87 */ "cmd ::= ALTER DATABASE db_name alter_db_options", + /* 88 */ "cmd ::= FLUSH DATABASE db_name", + /* 89 */ "cmd ::= TRIM DATABASE db_name speed_opt", + /* 90 */ "cmd ::= COMPACT DATABASE db_name start_opt end_opt", + /* 91 */ "not_exists_opt ::= IF NOT EXISTS", + /* 92 */ "not_exists_opt ::=", + /* 93 */ "exists_opt ::= IF EXISTS", + /* 94 */ "exists_opt ::=", + /* 95 */ "db_options ::=", + /* 96 */ "db_options ::= db_options BUFFER NK_INTEGER", + /* 97 */ "db_options ::= db_options CACHEMODEL NK_STRING", + /* 98 */ "db_options ::= db_options CACHESIZE NK_INTEGER", + /* 99 */ "db_options ::= db_options COMP NK_INTEGER", + /* 100 */ "db_options ::= db_options DURATION NK_INTEGER", + /* 101 */ "db_options ::= db_options DURATION NK_VARIABLE", + /* 102 */ "db_options ::= db_options MAXROWS NK_INTEGER", + /* 103 */ "db_options ::= db_options MINROWS NK_INTEGER", + /* 104 */ "db_options ::= db_options KEEP integer_list", + /* 105 */ "db_options ::= db_options KEEP variable_list", + /* 106 */ "db_options ::= db_options PAGES NK_INTEGER", + /* 107 */ "db_options ::= db_options PAGESIZE NK_INTEGER", + /* 108 */ "db_options ::= db_options TSDB_PAGESIZE NK_INTEGER", + /* 109 */ "db_options ::= db_options PRECISION NK_STRING", + /* 110 */ "db_options ::= db_options REPLICA NK_INTEGER", + /* 111 */ "db_options ::= db_options VGROUPS NK_INTEGER", + /* 112 */ "db_options ::= db_options SINGLE_STABLE NK_INTEGER", + /* 113 */ "db_options ::= db_options RETENTIONS retention_list", + /* 114 */ "db_options ::= db_options SCHEMALESS NK_INTEGER", + /* 115 */ "db_options ::= db_options WAL_LEVEL NK_INTEGER", + /* 116 */ "db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER", + /* 117 */ "db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER", + /* 118 */ "db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER", + /* 119 */ "db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER", + /* 120 */ "db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER", + /* 121 */ "db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER", + /* 122 */ "db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER", + /* 123 */ "db_options ::= db_options STT_TRIGGER NK_INTEGER", + /* 124 */ "db_options ::= db_options TABLE_PREFIX signed", + /* 125 */ "db_options ::= db_options TABLE_SUFFIX signed", + /* 126 */ "db_options ::= db_options KEEP_TIME_OFFSET NK_INTEGER", + /* 127 */ "alter_db_options ::= alter_db_option", + /* 128 */ "alter_db_options ::= alter_db_options alter_db_option", + /* 129 */ "alter_db_option ::= BUFFER NK_INTEGER", + /* 130 */ "alter_db_option ::= CACHEMODEL NK_STRING", + /* 131 */ "alter_db_option ::= CACHESIZE NK_INTEGER", + /* 132 */ "alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER", + /* 133 */ "alter_db_option ::= KEEP integer_list", + /* 134 */ "alter_db_option ::= KEEP variable_list", + /* 135 */ "alter_db_option ::= PAGES NK_INTEGER", + /* 136 */ "alter_db_option ::= REPLICA NK_INTEGER", + /* 137 */ "alter_db_option ::= WAL_LEVEL NK_INTEGER", + /* 138 */ "alter_db_option ::= STT_TRIGGER NK_INTEGER", + /* 139 */ "alter_db_option ::= MINROWS NK_INTEGER", + /* 140 */ "alter_db_option ::= WAL_RETENTION_PERIOD NK_INTEGER", + /* 141 */ "alter_db_option ::= WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER", + /* 142 */ "alter_db_option ::= WAL_RETENTION_SIZE NK_INTEGER", + /* 143 */ "alter_db_option ::= WAL_RETENTION_SIZE NK_MINUS NK_INTEGER", + /* 144 */ "alter_db_option ::= KEEP_TIME_OFFSET NK_INTEGER", + /* 145 */ "integer_list ::= NK_INTEGER", + /* 146 */ "integer_list ::= integer_list NK_COMMA NK_INTEGER", + /* 147 */ "variable_list ::= NK_VARIABLE", + /* 148 */ "variable_list ::= variable_list NK_COMMA NK_VARIABLE", + /* 149 */ "retention_list ::= retention", + /* 150 */ "retention_list ::= retention_list NK_COMMA retention", + /* 151 */ "retention ::= NK_VARIABLE NK_COLON NK_VARIABLE", + /* 152 */ "speed_opt ::=", + /* 153 */ "speed_opt ::= BWLIMIT NK_INTEGER", + /* 154 */ "start_opt ::=", + /* 155 */ "start_opt ::= START WITH NK_INTEGER", + /* 156 */ "start_opt ::= START WITH NK_STRING", + /* 157 */ "start_opt ::= START WITH TIMESTAMP NK_STRING", + /* 158 */ "end_opt ::=", + /* 159 */ "end_opt ::= END WITH NK_INTEGER", + /* 160 */ "end_opt ::= END WITH NK_STRING", + /* 161 */ "end_opt ::= END WITH TIMESTAMP NK_STRING", + /* 162 */ "cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options", + /* 163 */ "cmd ::= CREATE TABLE multi_create_clause", + /* 164 */ "cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options", + /* 165 */ "cmd ::= DROP TABLE multi_drop_clause", + /* 166 */ "cmd ::= DROP STABLE exists_opt full_table_name", + /* 167 */ "cmd ::= ALTER TABLE alter_table_clause", + /* 168 */ "cmd ::= ALTER STABLE alter_table_clause", + /* 169 */ "alter_table_clause ::= full_table_name alter_table_options", + /* 170 */ "alter_table_clause ::= full_table_name ADD COLUMN column_name type_name", + /* 171 */ "alter_table_clause ::= full_table_name DROP COLUMN column_name", + /* 172 */ "alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name", + /* 173 */ "alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name", + /* 174 */ "alter_table_clause ::= full_table_name ADD TAG column_name type_name", + /* 175 */ "alter_table_clause ::= full_table_name DROP TAG column_name", + /* 176 */ "alter_table_clause ::= full_table_name MODIFY TAG column_name type_name", + /* 177 */ "alter_table_clause ::= full_table_name RENAME TAG column_name column_name", + /* 178 */ "alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal", + /* 179 */ "multi_create_clause ::= create_subtable_clause", + /* 180 */ "multi_create_clause ::= multi_create_clause create_subtable_clause", + /* 181 */ "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", + /* 182 */ "multi_drop_clause ::= drop_table_clause", + /* 183 */ "multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause", + /* 184 */ "drop_table_clause ::= exists_opt full_table_name", + /* 185 */ "specific_cols_opt ::=", + /* 186 */ "specific_cols_opt ::= NK_LP col_name_list NK_RP", + /* 187 */ "full_table_name ::= table_name", + /* 188 */ "full_table_name ::= db_name NK_DOT table_name", + /* 189 */ "column_def_list ::= column_def", + /* 190 */ "column_def_list ::= column_def_list NK_COMMA column_def", + /* 191 */ "column_def ::= column_name type_name", + /* 192 */ "type_name ::= BOOL", + /* 193 */ "type_name ::= TINYINT", + /* 194 */ "type_name ::= SMALLINT", + /* 195 */ "type_name ::= INT", + /* 196 */ "type_name ::= INTEGER", + /* 197 */ "type_name ::= BIGINT", + /* 198 */ "type_name ::= FLOAT", + /* 199 */ "type_name ::= DOUBLE", + /* 200 */ "type_name ::= BINARY NK_LP NK_INTEGER NK_RP", + /* 201 */ "type_name ::= TIMESTAMP", + /* 202 */ "type_name ::= NCHAR NK_LP NK_INTEGER NK_RP", + /* 203 */ "type_name ::= TINYINT UNSIGNED", + /* 204 */ "type_name ::= SMALLINT UNSIGNED", + /* 205 */ "type_name ::= INT UNSIGNED", + /* 206 */ "type_name ::= BIGINT UNSIGNED", + /* 207 */ "type_name ::= JSON", + /* 208 */ "type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP", + /* 209 */ "type_name ::= MEDIUMBLOB", + /* 210 */ "type_name ::= BLOB", + /* 211 */ "type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP", + /* 212 */ "type_name ::= GEOMETRY NK_LP NK_INTEGER NK_RP", + /* 213 */ "type_name ::= DECIMAL", + /* 214 */ "type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP", + /* 215 */ "type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP", + /* 216 */ "tags_def_opt ::=", + /* 217 */ "tags_def_opt ::= tags_def", + /* 218 */ "tags_def ::= TAGS NK_LP column_def_list NK_RP", + /* 219 */ "table_options ::=", + /* 220 */ "table_options ::= table_options COMMENT NK_STRING", + /* 221 */ "table_options ::= table_options MAX_DELAY duration_list", + /* 222 */ "table_options ::= table_options WATERMARK duration_list", + /* 223 */ "table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP", + /* 224 */ "table_options ::= table_options TTL NK_INTEGER", + /* 225 */ "table_options ::= table_options SMA NK_LP col_name_list NK_RP", + /* 226 */ "table_options ::= table_options DELETE_MARK duration_list", + /* 227 */ "alter_table_options ::= alter_table_option", + /* 228 */ "alter_table_options ::= alter_table_options alter_table_option", + /* 229 */ "alter_table_option ::= COMMENT NK_STRING", + /* 230 */ "alter_table_option ::= TTL NK_INTEGER", + /* 231 */ "duration_list ::= duration_literal", + /* 232 */ "duration_list ::= duration_list NK_COMMA duration_literal", + /* 233 */ "rollup_func_list ::= rollup_func_name", + /* 234 */ "rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name", + /* 235 */ "rollup_func_name ::= function_name", + /* 236 */ "rollup_func_name ::= FIRST", + /* 237 */ "rollup_func_name ::= LAST", + /* 238 */ "col_name_list ::= col_name", + /* 239 */ "col_name_list ::= col_name_list NK_COMMA col_name", + /* 240 */ "col_name ::= column_name", + /* 241 */ "cmd ::= SHOW DNODES", + /* 242 */ "cmd ::= SHOW USERS", + /* 243 */ "cmd ::= SHOW USER PRIVILEGES", + /* 244 */ "cmd ::= SHOW db_kind_opt DATABASES", + /* 245 */ "cmd ::= SHOW table_kind_db_name_cond_opt TABLES like_pattern_opt", + /* 246 */ "cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt", + /* 247 */ "cmd ::= SHOW db_name_cond_opt VGROUPS", + /* 248 */ "cmd ::= SHOW MNODES", + /* 249 */ "cmd ::= SHOW QNODES", + /* 250 */ "cmd ::= SHOW FUNCTIONS", + /* 251 */ "cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt", + /* 252 */ "cmd ::= SHOW INDEXES FROM db_name NK_DOT table_name", + /* 253 */ "cmd ::= SHOW STREAMS", + /* 254 */ "cmd ::= SHOW ACCOUNTS", + /* 255 */ "cmd ::= SHOW APPS", + /* 256 */ "cmd ::= SHOW CONNECTIONS", + /* 257 */ "cmd ::= SHOW LICENCES", + /* 258 */ "cmd ::= SHOW GRANTS", + /* 259 */ "cmd ::= SHOW CREATE DATABASE db_name", + /* 260 */ "cmd ::= SHOW CREATE TABLE full_table_name", + /* 261 */ "cmd ::= SHOW CREATE STABLE full_table_name", + /* 262 */ "cmd ::= SHOW QUERIES", + /* 263 */ "cmd ::= SHOW SCORES", + /* 264 */ "cmd ::= SHOW TOPICS", + /* 265 */ "cmd ::= SHOW VARIABLES", + /* 266 */ "cmd ::= SHOW CLUSTER VARIABLES", + /* 267 */ "cmd ::= SHOW LOCAL VARIABLES", + /* 268 */ "cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt", + /* 269 */ "cmd ::= SHOW BNODES", + /* 270 */ "cmd ::= SHOW SNODES", + /* 271 */ "cmd ::= SHOW CLUSTER", + /* 272 */ "cmd ::= SHOW TRANSACTIONS", + /* 273 */ "cmd ::= SHOW TABLE DISTRIBUTED full_table_name", + /* 274 */ "cmd ::= SHOW CONSUMERS", + /* 275 */ "cmd ::= SHOW SUBSCRIPTIONS", + /* 276 */ "cmd ::= SHOW TAGS FROM table_name_cond from_db_opt", + /* 277 */ "cmd ::= SHOW TAGS FROM db_name NK_DOT table_name", + /* 278 */ "cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt", + /* 279 */ "cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name", + /* 280 */ "cmd ::= SHOW VNODES ON DNODE NK_INTEGER", + /* 281 */ "cmd ::= SHOW VNODES", + /* 282 */ "cmd ::= SHOW db_name_cond_opt ALIVE", + /* 283 */ "cmd ::= SHOW CLUSTER ALIVE", + /* 284 */ "cmd ::= SHOW db_name_cond_opt VIEWS", + /* 285 */ "cmd ::= SHOW CREATE VIEW full_table_name", + /* 286 */ "table_kind_db_name_cond_opt ::=", + /* 287 */ "table_kind_db_name_cond_opt ::= table_kind", + /* 288 */ "table_kind_db_name_cond_opt ::= db_name NK_DOT", + /* 289 */ "table_kind_db_name_cond_opt ::= table_kind db_name NK_DOT", + /* 290 */ "table_kind ::= NORMAL", + /* 291 */ "table_kind ::= CHILD", + /* 292 */ "db_name_cond_opt ::=", + /* 293 */ "db_name_cond_opt ::= db_name NK_DOT", + /* 294 */ "like_pattern_opt ::=", + /* 295 */ "like_pattern_opt ::= LIKE NK_STRING", + /* 296 */ "table_name_cond ::= table_name", + /* 297 */ "from_db_opt ::=", + /* 298 */ "from_db_opt ::= FROM db_name", + /* 299 */ "tag_list_opt ::=", + /* 300 */ "tag_list_opt ::= tag_item", + /* 301 */ "tag_list_opt ::= tag_list_opt NK_COMMA tag_item", + /* 302 */ "tag_item ::= TBNAME", + /* 303 */ "tag_item ::= QTAGS", + /* 304 */ "tag_item ::= column_name", + /* 305 */ "tag_item ::= column_name column_alias", + /* 306 */ "tag_item ::= column_name AS column_alias", + /* 307 */ "db_kind_opt ::=", + /* 308 */ "db_kind_opt ::= USER", + /* 309 */ "db_kind_opt ::= SYSTEM", + /* 310 */ "cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options", + /* 311 */ "cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP", + /* 312 */ "cmd ::= DROP INDEX exists_opt full_index_name", + /* 313 */ "full_index_name ::= index_name", + /* 314 */ "full_index_name ::= db_name NK_DOT index_name", + /* 315 */ "index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt", + /* 316 */ "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", + /* 317 */ "func_list ::= func", + /* 318 */ "func_list ::= func_list NK_COMMA func", + /* 319 */ "func ::= sma_func_name NK_LP expression_list NK_RP", + /* 320 */ "sma_func_name ::= function_name", + /* 321 */ "sma_func_name ::= COUNT", + /* 322 */ "sma_func_name ::= FIRST", + /* 323 */ "sma_func_name ::= LAST", + /* 324 */ "sma_func_name ::= LAST_ROW", + /* 325 */ "sma_stream_opt ::=", + /* 326 */ "sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal", + /* 327 */ "sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal", + /* 328 */ "sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal", + /* 329 */ "with_meta ::= AS", + /* 330 */ "with_meta ::= WITH META AS", + /* 331 */ "with_meta ::= ONLY META AS", + /* 332 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery", + /* 333 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name", + /* 334 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt", + /* 335 */ "cmd ::= DROP TOPIC exists_opt topic_name", + /* 336 */ "cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name", + /* 337 */ "cmd ::= DESC full_table_name", + /* 338 */ "cmd ::= DESCRIBE full_table_name", + /* 339 */ "cmd ::= RESET QUERY CACHE", + /* 340 */ "cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery", + /* 341 */ "cmd ::= EXPLAIN analyze_opt explain_options insert_query", + /* 342 */ "analyze_opt ::=", + /* 343 */ "analyze_opt ::= ANALYZE", + /* 344 */ "explain_options ::=", + /* 345 */ "explain_options ::= explain_options VERBOSE NK_BOOL", + /* 346 */ "explain_options ::= explain_options RATIO NK_FLOAT", + /* 347 */ "cmd ::= CREATE or_replace_opt agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt language_opt", + /* 348 */ "cmd ::= DROP FUNCTION exists_opt function_name", + /* 349 */ "agg_func_opt ::=", + /* 350 */ "agg_func_opt ::= AGGREGATE", + /* 351 */ "bufsize_opt ::=", + /* 352 */ "bufsize_opt ::= BUFSIZE NK_INTEGER", + /* 353 */ "language_opt ::=", + /* 354 */ "language_opt ::= LANGUAGE NK_STRING", + /* 355 */ "or_replace_opt ::=", + /* 356 */ "or_replace_opt ::= OR REPLACE", + /* 357 */ "cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery", + /* 358 */ "cmd ::= DROP VIEW exists_opt full_view_name", + /* 359 */ "full_view_name ::= view_name", + /* 360 */ "full_view_name ::= db_name NK_DOT view_name", + /* 361 */ "cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name col_list_opt tag_def_or_ref_opt subtable_opt AS query_or_subquery", + /* 362 */ "cmd ::= DROP STREAM exists_opt stream_name", + /* 363 */ "cmd ::= PAUSE STREAM exists_opt stream_name", + /* 364 */ "cmd ::= RESUME STREAM exists_opt ignore_opt stream_name", + /* 365 */ "col_list_opt ::=", + /* 366 */ "col_list_opt ::= NK_LP col_name_list NK_RP", + /* 367 */ "tag_def_or_ref_opt ::=", + /* 368 */ "tag_def_or_ref_opt ::= tags_def", + /* 369 */ "tag_def_or_ref_opt ::= TAGS NK_LP col_name_list NK_RP", + /* 370 */ "stream_options ::=", + /* 371 */ "stream_options ::= stream_options TRIGGER AT_ONCE", + /* 372 */ "stream_options ::= stream_options TRIGGER WINDOW_CLOSE", + /* 373 */ "stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal", + /* 374 */ "stream_options ::= stream_options WATERMARK duration_literal", + /* 375 */ "stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER", + /* 376 */ "stream_options ::= stream_options FILL_HISTORY NK_INTEGER", + /* 377 */ "stream_options ::= stream_options DELETE_MARK duration_literal", + /* 378 */ "stream_options ::= stream_options IGNORE UPDATE NK_INTEGER", + /* 379 */ "subtable_opt ::=", + /* 380 */ "subtable_opt ::= SUBTABLE NK_LP expression NK_RP", + /* 381 */ "ignore_opt ::=", + /* 382 */ "ignore_opt ::= IGNORE UNTREATED", + /* 383 */ "cmd ::= KILL CONNECTION NK_INTEGER", + /* 384 */ "cmd ::= KILL QUERY NK_STRING", + /* 385 */ "cmd ::= KILL TRANSACTION NK_INTEGER", + /* 386 */ "cmd ::= BALANCE VGROUP", + /* 387 */ "cmd ::= BALANCE VGROUP LEADER on_vgroup_id", + /* 388 */ "cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER", + /* 389 */ "cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list", + /* 390 */ "cmd ::= SPLIT VGROUP NK_INTEGER", + /* 391 */ "on_vgroup_id ::=", + /* 392 */ "on_vgroup_id ::= ON NK_INTEGER", + /* 393 */ "dnode_list ::= DNODE NK_INTEGER", + /* 394 */ "dnode_list ::= dnode_list DNODE NK_INTEGER", + /* 395 */ "cmd ::= DELETE FROM full_table_name where_clause_opt", + /* 396 */ "cmd ::= query_or_subquery", + /* 397 */ "cmd ::= insert_query", + /* 398 */ "insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery", + /* 399 */ "insert_query ::= INSERT INTO full_table_name query_or_subquery", + /* 400 */ "literal ::= NK_INTEGER", + /* 401 */ "literal ::= NK_FLOAT", + /* 402 */ "literal ::= NK_STRING", + /* 403 */ "literal ::= NK_BOOL", + /* 404 */ "literal ::= TIMESTAMP NK_STRING", + /* 405 */ "literal ::= duration_literal", + /* 406 */ "literal ::= NULL", + /* 407 */ "literal ::= NK_QUESTION", + /* 408 */ "duration_literal ::= NK_VARIABLE", + /* 409 */ "signed ::= NK_INTEGER", + /* 410 */ "signed ::= NK_PLUS NK_INTEGER", + /* 411 */ "signed ::= NK_MINUS NK_INTEGER", + /* 412 */ "signed ::= NK_FLOAT", + /* 413 */ "signed ::= NK_PLUS NK_FLOAT", + /* 414 */ "signed ::= NK_MINUS NK_FLOAT", + /* 415 */ "signed_literal ::= signed", + /* 416 */ "signed_literal ::= NK_STRING", + /* 417 */ "signed_literal ::= NK_BOOL", + /* 418 */ "signed_literal ::= TIMESTAMP NK_STRING", + /* 419 */ "signed_literal ::= duration_literal", + /* 420 */ "signed_literal ::= NULL", + /* 421 */ "signed_literal ::= literal_func", + /* 422 */ "signed_literal ::= NK_QUESTION", + /* 423 */ "literal_list ::= signed_literal", + /* 424 */ "literal_list ::= literal_list NK_COMMA signed_literal", + /* 425 */ "db_name ::= NK_ID", + /* 426 */ "table_name ::= NK_ID", + /* 427 */ "column_name ::= NK_ID", + /* 428 */ "function_name ::= NK_ID", + /* 429 */ "view_name ::= NK_ID", + /* 430 */ "table_alias ::= NK_ID", + /* 431 */ "column_alias ::= NK_ID", + /* 432 */ "user_name ::= NK_ID", + /* 433 */ "topic_name ::= NK_ID", + /* 434 */ "stream_name ::= NK_ID", + /* 435 */ "cgroup_name ::= NK_ID", + /* 436 */ "index_name ::= NK_ID", + /* 437 */ "expr_or_subquery ::= expression", + /* 438 */ "expression ::= literal", + /* 439 */ "expression ::= pseudo_column", + /* 440 */ "expression ::= column_reference", + /* 441 */ "expression ::= function_expression", + /* 442 */ "expression ::= case_when_expression", + /* 443 */ "expression ::= NK_LP expression NK_RP", + /* 444 */ "expression ::= NK_PLUS expr_or_subquery", + /* 445 */ "expression ::= NK_MINUS expr_or_subquery", + /* 446 */ "expression ::= expr_or_subquery NK_PLUS expr_or_subquery", + /* 447 */ "expression ::= expr_or_subquery NK_MINUS expr_or_subquery", + /* 448 */ "expression ::= expr_or_subquery NK_STAR expr_or_subquery", + /* 449 */ "expression ::= expr_or_subquery NK_SLASH expr_or_subquery", + /* 450 */ "expression ::= expr_or_subquery NK_REM expr_or_subquery", + /* 451 */ "expression ::= column_reference NK_ARROW NK_STRING", + /* 452 */ "expression ::= expr_or_subquery NK_BITAND expr_or_subquery", + /* 453 */ "expression ::= expr_or_subquery NK_BITOR expr_or_subquery", + /* 454 */ "expression_list ::= expr_or_subquery", + /* 455 */ "expression_list ::= expression_list NK_COMMA expr_or_subquery", + /* 456 */ "column_reference ::= column_name", + /* 457 */ "column_reference ::= table_name NK_DOT column_name", + /* 458 */ "pseudo_column ::= ROWTS", + /* 459 */ "pseudo_column ::= TBNAME", + /* 460 */ "pseudo_column ::= table_name NK_DOT TBNAME", + /* 461 */ "pseudo_column ::= QSTART", + /* 462 */ "pseudo_column ::= QEND", + /* 463 */ "pseudo_column ::= QDURATION", + /* 464 */ "pseudo_column ::= WSTART", + /* 465 */ "pseudo_column ::= WEND", + /* 466 */ "pseudo_column ::= WDURATION", + /* 467 */ "pseudo_column ::= IROWTS", + /* 468 */ "pseudo_column ::= ISFILLED", + /* 469 */ "pseudo_column ::= QTAGS", + /* 470 */ "function_expression ::= function_name NK_LP expression_list NK_RP", + /* 471 */ "function_expression ::= star_func NK_LP star_func_para_list NK_RP", + /* 472 */ "function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP", + /* 473 */ "function_expression ::= literal_func", + /* 474 */ "literal_func ::= noarg_func NK_LP NK_RP", + /* 475 */ "literal_func ::= NOW", + /* 476 */ "noarg_func ::= NOW", + /* 477 */ "noarg_func ::= TODAY", + /* 478 */ "noarg_func ::= TIMEZONE", + /* 479 */ "noarg_func ::= DATABASE", + /* 480 */ "noarg_func ::= CLIENT_VERSION", + /* 481 */ "noarg_func ::= SERVER_VERSION", + /* 482 */ "noarg_func ::= SERVER_STATUS", + /* 483 */ "noarg_func ::= CURRENT_USER", + /* 484 */ "noarg_func ::= USER", + /* 485 */ "star_func ::= COUNT", + /* 486 */ "star_func ::= FIRST", + /* 487 */ "star_func ::= LAST", + /* 488 */ "star_func ::= LAST_ROW", + /* 489 */ "star_func_para_list ::= NK_STAR", + /* 490 */ "star_func_para_list ::= other_para_list", + /* 491 */ "other_para_list ::= star_func_para", + /* 492 */ "other_para_list ::= other_para_list NK_COMMA star_func_para", + /* 493 */ "star_func_para ::= expr_or_subquery", + /* 494 */ "star_func_para ::= table_name NK_DOT NK_STAR", + /* 495 */ "case_when_expression ::= CASE when_then_list case_when_else_opt END", + /* 496 */ "case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END", + /* 497 */ "when_then_list ::= when_then_expr", + /* 498 */ "when_then_list ::= when_then_list when_then_expr", + /* 499 */ "when_then_expr ::= WHEN common_expression THEN common_expression", + /* 500 */ "case_when_else_opt ::=", + /* 501 */ "case_when_else_opt ::= ELSE common_expression", + /* 502 */ "predicate ::= expr_or_subquery compare_op expr_or_subquery", + /* 503 */ "predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery", + /* 504 */ "predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery", + /* 505 */ "predicate ::= expr_or_subquery IS NULL", + /* 506 */ "predicate ::= expr_or_subquery IS NOT NULL", + /* 507 */ "predicate ::= expr_or_subquery in_op in_predicate_value", + /* 508 */ "compare_op ::= NK_LT", + /* 509 */ "compare_op ::= NK_GT", + /* 510 */ "compare_op ::= NK_LE", + /* 511 */ "compare_op ::= NK_GE", + /* 512 */ "compare_op ::= NK_NE", + /* 513 */ "compare_op ::= NK_EQ", + /* 514 */ "compare_op ::= LIKE", + /* 515 */ "compare_op ::= NOT LIKE", + /* 516 */ "compare_op ::= MATCH", + /* 517 */ "compare_op ::= NMATCH", + /* 518 */ "compare_op ::= CONTAINS", + /* 519 */ "in_op ::= IN", + /* 520 */ "in_op ::= NOT IN", + /* 521 */ "in_predicate_value ::= NK_LP literal_list NK_RP", + /* 522 */ "boolean_value_expression ::= boolean_primary", + /* 523 */ "boolean_value_expression ::= NOT boolean_primary", + /* 524 */ "boolean_value_expression ::= boolean_value_expression OR boolean_value_expression", + /* 525 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression", + /* 526 */ "boolean_primary ::= predicate", + /* 527 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP", + /* 528 */ "common_expression ::= expr_or_subquery", + /* 529 */ "common_expression ::= boolean_value_expression", + /* 530 */ "from_clause_opt ::=", + /* 531 */ "from_clause_opt ::= FROM table_reference_list", + /* 532 */ "table_reference_list ::= table_reference", + /* 533 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference", + /* 534 */ "table_reference ::= table_primary", + /* 535 */ "table_reference ::= joined_table", + /* 536 */ "table_primary ::= table_name alias_opt", + /* 537 */ "table_primary ::= db_name NK_DOT table_name alias_opt", + /* 538 */ "table_primary ::= subquery alias_opt", + /* 539 */ "table_primary ::= parenthesized_joined_table", + /* 540 */ "alias_opt ::=", + /* 541 */ "alias_opt ::= table_alias", + /* 542 */ "alias_opt ::= AS table_alias", + /* 543 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP", + /* 544 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP", + /* 545 */ "joined_table ::= table_reference join_type JOIN table_reference ON search_condition", + /* 546 */ "join_type ::=", + /* 547 */ "join_type ::= INNER", + /* 548 */ "query_specification ::= SELECT hint_list set_quantifier_opt tag_mode_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", + /* 549 */ "hint_list ::=", + /* 550 */ "hint_list ::= NK_HINT", + /* 551 */ "tag_mode_opt ::=", + /* 552 */ "tag_mode_opt ::= TAGS", + /* 553 */ "set_quantifier_opt ::=", + /* 554 */ "set_quantifier_opt ::= DISTINCT", + /* 555 */ "set_quantifier_opt ::= ALL", + /* 556 */ "select_list ::= select_item", + /* 557 */ "select_list ::= select_list NK_COMMA select_item", + /* 558 */ "select_item ::= NK_STAR", + /* 559 */ "select_item ::= common_expression", + /* 560 */ "select_item ::= common_expression column_alias", + /* 561 */ "select_item ::= common_expression AS column_alias", + /* 562 */ "select_item ::= table_name NK_DOT NK_STAR", + /* 563 */ "where_clause_opt ::=", + /* 564 */ "where_clause_opt ::= WHERE search_condition", + /* 565 */ "partition_by_clause_opt ::=", + /* 566 */ "partition_by_clause_opt ::= PARTITION BY partition_list", + /* 567 */ "partition_list ::= partition_item", + /* 568 */ "partition_list ::= partition_list NK_COMMA partition_item", + /* 569 */ "partition_item ::= expr_or_subquery", + /* 570 */ "partition_item ::= expr_or_subquery column_alias", + /* 571 */ "partition_item ::= expr_or_subquery AS column_alias", + /* 572 */ "twindow_clause_opt ::=", + /* 573 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP", + /* 574 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP", + /* 575 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt", + /* 576 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt", + /* 577 */ "twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition", + /* 578 */ "sliding_opt ::=", + /* 579 */ "sliding_opt ::= SLIDING NK_LP duration_literal NK_RP", + /* 580 */ "fill_opt ::=", + /* 581 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP", + /* 582 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP", + /* 583 */ "fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP", + /* 584 */ "fill_mode ::= NONE", + /* 585 */ "fill_mode ::= PREV", + /* 586 */ "fill_mode ::= NULL", + /* 587 */ "fill_mode ::= NULL_F", + /* 588 */ "fill_mode ::= LINEAR", + /* 589 */ "fill_mode ::= NEXT", + /* 590 */ "group_by_clause_opt ::=", + /* 591 */ "group_by_clause_opt ::= GROUP BY group_by_list", + /* 592 */ "group_by_list ::= expr_or_subquery", + /* 593 */ "group_by_list ::= group_by_list NK_COMMA expr_or_subquery", + /* 594 */ "having_clause_opt ::=", + /* 595 */ "having_clause_opt ::= HAVING search_condition", + /* 596 */ "range_opt ::=", + /* 597 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP", + /* 598 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_RP", + /* 599 */ "every_opt ::=", + /* 600 */ "every_opt ::= EVERY NK_LP duration_literal NK_RP", + /* 601 */ "query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt", + /* 602 */ "query_simple ::= query_specification", + /* 603 */ "query_simple ::= union_query_expression", + /* 604 */ "union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery", + /* 605 */ "union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery", + /* 606 */ "query_simple_or_subquery ::= query_simple", + /* 607 */ "query_simple_or_subquery ::= subquery", + /* 608 */ "query_or_subquery ::= query_expression", + /* 609 */ "query_or_subquery ::= subquery", + /* 610 */ "order_by_clause_opt ::=", + /* 611 */ "order_by_clause_opt ::= ORDER BY sort_specification_list", + /* 612 */ "slimit_clause_opt ::=", + /* 613 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER", + /* 614 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER", + /* 615 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER", + /* 616 */ "limit_clause_opt ::=", + /* 617 */ "limit_clause_opt ::= LIMIT NK_INTEGER", + /* 618 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER", + /* 619 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER", + /* 620 */ "subquery ::= NK_LP query_expression NK_RP", + /* 621 */ "subquery ::= NK_LP subquery NK_RP", + /* 622 */ "search_condition ::= common_expression", + /* 623 */ "sort_specification_list ::= sort_specification", + /* 624 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification", + /* 625 */ "sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt", + /* 626 */ "ordering_specification_opt ::=", + /* 627 */ "ordering_specification_opt ::= ASC", + /* 628 */ "ordering_specification_opt ::= DESC", + /* 629 */ "null_ordering_opt ::=", + /* 630 */ "null_ordering_opt ::= NULLS FIRST", + /* 631 */ "null_ordering_opt ::= NULLS LAST", }; #endif /* NDEBUG */ @@ -3352,590 +3353,591 @@ static const YYCODETYPE yyRuleInfoLhs[] = { 358, /* (44) priv_type_list ::= priv_type_list NK_COMMA priv_type */ 359, /* (45) priv_type ::= READ */ 359, /* (46) priv_type ::= WRITE */ - 356, /* (47) priv_level ::= NK_STAR NK_DOT NK_STAR */ - 356, /* (48) priv_level ::= db_name NK_DOT NK_STAR */ - 356, /* (49) priv_level ::= db_name NK_DOT table_name */ - 356, /* (50) priv_level ::= topic_name */ - 357, /* (51) with_opt ::= */ - 357, /* (52) with_opt ::= WITH search_condition */ - 345, /* (53) cmd ::= CREATE DNODE dnode_endpoint */ - 345, /* (54) cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */ - 345, /* (55) cmd ::= DROP DNODE NK_INTEGER force_opt */ - 345, /* (56) cmd ::= DROP DNODE dnode_endpoint force_opt */ - 345, /* (57) cmd ::= DROP DNODE NK_INTEGER unsafe_opt */ - 345, /* (58) cmd ::= DROP DNODE dnode_endpoint unsafe_opt */ - 345, /* (59) cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ - 345, /* (60) cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */ - 345, /* (61) cmd ::= ALTER ALL DNODES NK_STRING */ - 345, /* (62) cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */ - 345, /* (63) cmd ::= RESTORE DNODE NK_INTEGER */ - 364, /* (64) dnode_endpoint ::= NK_STRING */ - 364, /* (65) dnode_endpoint ::= NK_ID */ - 364, /* (66) dnode_endpoint ::= NK_IPTOKEN */ - 365, /* (67) force_opt ::= */ - 365, /* (68) force_opt ::= FORCE */ - 366, /* (69) unsafe_opt ::= UNSAFE */ - 345, /* (70) cmd ::= ALTER LOCAL NK_STRING */ - 345, /* (71) cmd ::= ALTER LOCAL NK_STRING NK_STRING */ - 345, /* (72) cmd ::= CREATE QNODE ON DNODE NK_INTEGER */ - 345, /* (73) cmd ::= DROP QNODE ON DNODE NK_INTEGER */ - 345, /* (74) cmd ::= RESTORE QNODE ON DNODE NK_INTEGER */ - 345, /* (75) cmd ::= CREATE BNODE ON DNODE NK_INTEGER */ - 345, /* (76) cmd ::= DROP BNODE ON DNODE NK_INTEGER */ - 345, /* (77) cmd ::= CREATE SNODE ON DNODE NK_INTEGER */ - 345, /* (78) cmd ::= DROP SNODE ON DNODE NK_INTEGER */ - 345, /* (79) cmd ::= CREATE MNODE ON DNODE NK_INTEGER */ - 345, /* (80) cmd ::= DROP MNODE ON DNODE NK_INTEGER */ - 345, /* (81) cmd ::= RESTORE MNODE ON DNODE NK_INTEGER */ - 345, /* (82) cmd ::= RESTORE VNODE ON DNODE NK_INTEGER */ - 345, /* (83) cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ - 345, /* (84) cmd ::= DROP DATABASE exists_opt db_name */ - 345, /* (85) cmd ::= USE db_name */ - 345, /* (86) cmd ::= ALTER DATABASE db_name alter_db_options */ - 345, /* (87) cmd ::= FLUSH DATABASE db_name */ - 345, /* (88) cmd ::= TRIM DATABASE db_name speed_opt */ - 345, /* (89) cmd ::= COMPACT DATABASE db_name start_opt end_opt */ - 367, /* (90) not_exists_opt ::= IF NOT EXISTS */ - 367, /* (91) not_exists_opt ::= */ - 369, /* (92) exists_opt ::= IF EXISTS */ - 369, /* (93) exists_opt ::= */ - 368, /* (94) db_options ::= */ - 368, /* (95) db_options ::= db_options BUFFER NK_INTEGER */ - 368, /* (96) db_options ::= db_options CACHEMODEL NK_STRING */ - 368, /* (97) db_options ::= db_options CACHESIZE NK_INTEGER */ - 368, /* (98) db_options ::= db_options COMP NK_INTEGER */ - 368, /* (99) db_options ::= db_options DURATION NK_INTEGER */ - 368, /* (100) db_options ::= db_options DURATION NK_VARIABLE */ - 368, /* (101) db_options ::= db_options MAXROWS NK_INTEGER */ - 368, /* (102) db_options ::= db_options MINROWS NK_INTEGER */ - 368, /* (103) db_options ::= db_options KEEP integer_list */ - 368, /* (104) db_options ::= db_options KEEP variable_list */ - 368, /* (105) db_options ::= db_options PAGES NK_INTEGER */ - 368, /* (106) db_options ::= db_options PAGESIZE NK_INTEGER */ - 368, /* (107) db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */ - 368, /* (108) db_options ::= db_options PRECISION NK_STRING */ - 368, /* (109) db_options ::= db_options REPLICA NK_INTEGER */ - 368, /* (110) db_options ::= db_options VGROUPS NK_INTEGER */ - 368, /* (111) db_options ::= db_options SINGLE_STABLE NK_INTEGER */ - 368, /* (112) db_options ::= db_options RETENTIONS retention_list */ - 368, /* (113) db_options ::= db_options SCHEMALESS NK_INTEGER */ - 368, /* (114) db_options ::= db_options WAL_LEVEL NK_INTEGER */ - 368, /* (115) db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */ - 368, /* (116) db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */ - 368, /* (117) db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ - 368, /* (118) db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */ - 368, /* (119) db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ - 368, /* (120) db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */ - 368, /* (121) db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */ - 368, /* (122) db_options ::= db_options STT_TRIGGER NK_INTEGER */ - 368, /* (123) db_options ::= db_options TABLE_PREFIX signed */ - 368, /* (124) db_options ::= db_options TABLE_SUFFIX signed */ - 368, /* (125) db_options ::= db_options KEEP_TIME_OFFSET NK_INTEGER */ - 370, /* (126) alter_db_options ::= alter_db_option */ - 370, /* (127) alter_db_options ::= alter_db_options alter_db_option */ - 378, /* (128) alter_db_option ::= BUFFER NK_INTEGER */ - 378, /* (129) alter_db_option ::= CACHEMODEL NK_STRING */ - 378, /* (130) alter_db_option ::= CACHESIZE NK_INTEGER */ - 378, /* (131) alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */ - 378, /* (132) alter_db_option ::= KEEP integer_list */ - 378, /* (133) alter_db_option ::= KEEP variable_list */ - 378, /* (134) alter_db_option ::= PAGES NK_INTEGER */ - 378, /* (135) alter_db_option ::= REPLICA NK_INTEGER */ - 378, /* (136) alter_db_option ::= WAL_LEVEL NK_INTEGER */ - 378, /* (137) alter_db_option ::= STT_TRIGGER NK_INTEGER */ - 378, /* (138) alter_db_option ::= MINROWS NK_INTEGER */ - 378, /* (139) alter_db_option ::= WAL_RETENTION_PERIOD NK_INTEGER */ - 378, /* (140) alter_db_option ::= WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ - 378, /* (141) alter_db_option ::= WAL_RETENTION_SIZE NK_INTEGER */ - 378, /* (142) alter_db_option ::= WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ - 378, /* (143) alter_db_option ::= KEEP_TIME_OFFSET NK_INTEGER */ - 374, /* (144) integer_list ::= NK_INTEGER */ - 374, /* (145) integer_list ::= integer_list NK_COMMA NK_INTEGER */ - 375, /* (146) variable_list ::= NK_VARIABLE */ - 375, /* (147) variable_list ::= variable_list NK_COMMA NK_VARIABLE */ - 376, /* (148) retention_list ::= retention */ - 376, /* (149) retention_list ::= retention_list NK_COMMA retention */ - 379, /* (150) retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ - 371, /* (151) speed_opt ::= */ - 371, /* (152) speed_opt ::= BWLIMIT NK_INTEGER */ - 372, /* (153) start_opt ::= */ - 372, /* (154) start_opt ::= START WITH NK_INTEGER */ - 372, /* (155) start_opt ::= START WITH NK_STRING */ - 372, /* (156) start_opt ::= START WITH TIMESTAMP NK_STRING */ - 373, /* (157) end_opt ::= */ - 373, /* (158) end_opt ::= END WITH NK_INTEGER */ - 373, /* (159) end_opt ::= END WITH NK_STRING */ - 373, /* (160) end_opt ::= END WITH TIMESTAMP NK_STRING */ - 345, /* (161) cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ - 345, /* (162) cmd ::= CREATE TABLE multi_create_clause */ - 345, /* (163) cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ - 345, /* (164) cmd ::= DROP TABLE multi_drop_clause */ - 345, /* (165) cmd ::= DROP STABLE exists_opt full_table_name */ - 345, /* (166) cmd ::= ALTER TABLE alter_table_clause */ - 345, /* (167) cmd ::= ALTER STABLE alter_table_clause */ - 387, /* (168) alter_table_clause ::= full_table_name alter_table_options */ - 387, /* (169) alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ - 387, /* (170) alter_table_clause ::= full_table_name DROP COLUMN column_name */ - 387, /* (171) alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ - 387, /* (172) alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ - 387, /* (173) alter_table_clause ::= full_table_name ADD TAG column_name type_name */ - 387, /* (174) alter_table_clause ::= full_table_name DROP TAG column_name */ - 387, /* (175) alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ - 387, /* (176) alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ - 387, /* (177) alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */ - 384, /* (178) multi_create_clause ::= create_subtable_clause */ - 384, /* (179) multi_create_clause ::= multi_create_clause create_subtable_clause */ - 392, /* (180) 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 */ - 386, /* (181) multi_drop_clause ::= drop_table_clause */ - 386, /* (182) multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause */ - 395, /* (183) drop_table_clause ::= exists_opt full_table_name */ - 393, /* (184) specific_cols_opt ::= */ - 393, /* (185) specific_cols_opt ::= NK_LP col_name_list NK_RP */ - 380, /* (186) full_table_name ::= table_name */ - 380, /* (187) full_table_name ::= db_name NK_DOT table_name */ - 381, /* (188) column_def_list ::= column_def */ - 381, /* (189) column_def_list ::= column_def_list NK_COMMA column_def */ - 397, /* (190) column_def ::= column_name type_name */ - 390, /* (191) type_name ::= BOOL */ - 390, /* (192) type_name ::= TINYINT */ - 390, /* (193) type_name ::= SMALLINT */ - 390, /* (194) type_name ::= INT */ - 390, /* (195) type_name ::= INTEGER */ - 390, /* (196) type_name ::= BIGINT */ - 390, /* (197) type_name ::= FLOAT */ - 390, /* (198) type_name ::= DOUBLE */ - 390, /* (199) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ - 390, /* (200) type_name ::= TIMESTAMP */ - 390, /* (201) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ - 390, /* (202) type_name ::= TINYINT UNSIGNED */ - 390, /* (203) type_name ::= SMALLINT UNSIGNED */ - 390, /* (204) type_name ::= INT UNSIGNED */ - 390, /* (205) type_name ::= BIGINT UNSIGNED */ - 390, /* (206) type_name ::= JSON */ - 390, /* (207) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ - 390, /* (208) type_name ::= MEDIUMBLOB */ - 390, /* (209) type_name ::= BLOB */ - 390, /* (210) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ - 390, /* (211) type_name ::= GEOMETRY NK_LP NK_INTEGER NK_RP */ - 390, /* (212) type_name ::= DECIMAL */ - 390, /* (213) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ - 390, /* (214) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ - 382, /* (215) tags_def_opt ::= */ - 382, /* (216) tags_def_opt ::= tags_def */ - 385, /* (217) tags_def ::= TAGS NK_LP column_def_list NK_RP */ - 383, /* (218) table_options ::= */ - 383, /* (219) table_options ::= table_options COMMENT NK_STRING */ - 383, /* (220) table_options ::= table_options MAX_DELAY duration_list */ - 383, /* (221) table_options ::= table_options WATERMARK duration_list */ - 383, /* (222) table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ - 383, /* (223) table_options ::= table_options TTL NK_INTEGER */ - 383, /* (224) table_options ::= table_options SMA NK_LP col_name_list NK_RP */ - 383, /* (225) table_options ::= table_options DELETE_MARK duration_list */ - 388, /* (226) alter_table_options ::= alter_table_option */ - 388, /* (227) alter_table_options ::= alter_table_options alter_table_option */ - 400, /* (228) alter_table_option ::= COMMENT NK_STRING */ - 400, /* (229) alter_table_option ::= TTL NK_INTEGER */ - 398, /* (230) duration_list ::= duration_literal */ - 398, /* (231) duration_list ::= duration_list NK_COMMA duration_literal */ - 399, /* (232) rollup_func_list ::= rollup_func_name */ - 399, /* (233) rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ - 402, /* (234) rollup_func_name ::= function_name */ - 402, /* (235) rollup_func_name ::= FIRST */ - 402, /* (236) rollup_func_name ::= LAST */ - 396, /* (237) col_name_list ::= col_name */ - 396, /* (238) col_name_list ::= col_name_list NK_COMMA col_name */ - 404, /* (239) col_name ::= column_name */ - 345, /* (240) cmd ::= SHOW DNODES */ - 345, /* (241) cmd ::= SHOW USERS */ - 345, /* (242) cmd ::= SHOW USER PRIVILEGES */ - 345, /* (243) cmd ::= SHOW db_kind_opt DATABASES */ - 345, /* (244) cmd ::= SHOW table_kind_db_name_cond_opt TABLES like_pattern_opt */ - 345, /* (245) cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ - 345, /* (246) cmd ::= SHOW db_name_cond_opt VGROUPS */ - 345, /* (247) cmd ::= SHOW MNODES */ - 345, /* (248) cmd ::= SHOW QNODES */ - 345, /* (249) cmd ::= SHOW FUNCTIONS */ - 345, /* (250) cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ - 345, /* (251) cmd ::= SHOW INDEXES FROM db_name NK_DOT table_name */ - 345, /* (252) cmd ::= SHOW STREAMS */ - 345, /* (253) cmd ::= SHOW ACCOUNTS */ - 345, /* (254) cmd ::= SHOW APPS */ - 345, /* (255) cmd ::= SHOW CONNECTIONS */ - 345, /* (256) cmd ::= SHOW LICENCES */ - 345, /* (257) cmd ::= SHOW GRANTS */ - 345, /* (258) cmd ::= SHOW CREATE DATABASE db_name */ - 345, /* (259) cmd ::= SHOW CREATE TABLE full_table_name */ - 345, /* (260) cmd ::= SHOW CREATE STABLE full_table_name */ - 345, /* (261) cmd ::= SHOW QUERIES */ - 345, /* (262) cmd ::= SHOW SCORES */ - 345, /* (263) cmd ::= SHOW TOPICS */ - 345, /* (264) cmd ::= SHOW VARIABLES */ - 345, /* (265) cmd ::= SHOW CLUSTER VARIABLES */ - 345, /* (266) cmd ::= SHOW LOCAL VARIABLES */ - 345, /* (267) cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */ - 345, /* (268) cmd ::= SHOW BNODES */ - 345, /* (269) cmd ::= SHOW SNODES */ - 345, /* (270) cmd ::= SHOW CLUSTER */ - 345, /* (271) cmd ::= SHOW TRANSACTIONS */ - 345, /* (272) cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ - 345, /* (273) cmd ::= SHOW CONSUMERS */ - 345, /* (274) cmd ::= SHOW SUBSCRIPTIONS */ - 345, /* (275) cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ - 345, /* (276) cmd ::= SHOW TAGS FROM db_name NK_DOT table_name */ - 345, /* (277) cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ - 345, /* (278) cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name */ - 345, /* (279) cmd ::= SHOW VNODES ON DNODE NK_INTEGER */ - 345, /* (280) cmd ::= SHOW VNODES */ - 345, /* (281) cmd ::= SHOW db_name_cond_opt ALIVE */ - 345, /* (282) cmd ::= SHOW CLUSTER ALIVE */ - 345, /* (283) cmd ::= SHOW db_name_cond_opt VIEWS */ - 345, /* (284) cmd ::= SHOW CREATE VIEW full_table_name */ - 406, /* (285) table_kind_db_name_cond_opt ::= */ - 406, /* (286) table_kind_db_name_cond_opt ::= table_kind */ - 406, /* (287) table_kind_db_name_cond_opt ::= db_name NK_DOT */ - 406, /* (288) table_kind_db_name_cond_opt ::= table_kind db_name NK_DOT */ - 412, /* (289) table_kind ::= NORMAL */ - 412, /* (290) table_kind ::= CHILD */ - 408, /* (291) db_name_cond_opt ::= */ - 408, /* (292) db_name_cond_opt ::= db_name NK_DOT */ - 407, /* (293) like_pattern_opt ::= */ - 407, /* (294) like_pattern_opt ::= LIKE NK_STRING */ - 409, /* (295) table_name_cond ::= table_name */ - 410, /* (296) from_db_opt ::= */ - 410, /* (297) from_db_opt ::= FROM db_name */ - 411, /* (298) tag_list_opt ::= */ - 411, /* (299) tag_list_opt ::= tag_item */ - 411, /* (300) tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ - 413, /* (301) tag_item ::= TBNAME */ - 413, /* (302) tag_item ::= QTAGS */ - 413, /* (303) tag_item ::= column_name */ - 413, /* (304) tag_item ::= column_name column_alias */ - 413, /* (305) tag_item ::= column_name AS column_alias */ - 405, /* (306) db_kind_opt ::= */ - 405, /* (307) db_kind_opt ::= USER */ - 405, /* (308) db_kind_opt ::= SYSTEM */ - 345, /* (309) cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options */ - 345, /* (310) cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP */ - 345, /* (311) cmd ::= DROP INDEX exists_opt full_index_name */ - 416, /* (312) full_index_name ::= index_name */ - 416, /* (313) full_index_name ::= db_name NK_DOT index_name */ - 415, /* (314) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ - 415, /* (315) 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 */ - 418, /* (316) func_list ::= func */ - 418, /* (317) func_list ::= func_list NK_COMMA func */ - 421, /* (318) func ::= sma_func_name NK_LP expression_list NK_RP */ - 422, /* (319) sma_func_name ::= function_name */ - 422, /* (320) sma_func_name ::= COUNT */ - 422, /* (321) sma_func_name ::= FIRST */ - 422, /* (322) sma_func_name ::= LAST */ - 422, /* (323) sma_func_name ::= LAST_ROW */ - 420, /* (324) sma_stream_opt ::= */ - 420, /* (325) sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ - 420, /* (326) sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ - 420, /* (327) sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ - 423, /* (328) with_meta ::= AS */ - 423, /* (329) with_meta ::= WITH META AS */ - 423, /* (330) with_meta ::= ONLY META AS */ - 345, /* (331) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ - 345, /* (332) cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name */ - 345, /* (333) cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt */ - 345, /* (334) cmd ::= DROP TOPIC exists_opt topic_name */ - 345, /* (335) cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ - 345, /* (336) cmd ::= DESC full_table_name */ - 345, /* (337) cmd ::= DESCRIBE full_table_name */ - 345, /* (338) cmd ::= RESET QUERY CACHE */ - 345, /* (339) cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ - 345, /* (340) cmd ::= EXPLAIN analyze_opt explain_options insert_query */ - 427, /* (341) analyze_opt ::= */ - 427, /* (342) analyze_opt ::= ANALYZE */ - 428, /* (343) explain_options ::= */ - 428, /* (344) explain_options ::= explain_options VERBOSE NK_BOOL */ - 428, /* (345) explain_options ::= explain_options RATIO NK_FLOAT */ - 345, /* (346) cmd ::= CREATE or_replace_opt agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt language_opt */ - 345, /* (347) cmd ::= DROP FUNCTION exists_opt function_name */ - 431, /* (348) agg_func_opt ::= */ - 431, /* (349) agg_func_opt ::= AGGREGATE */ - 432, /* (350) bufsize_opt ::= */ - 432, /* (351) bufsize_opt ::= BUFSIZE NK_INTEGER */ - 433, /* (352) language_opt ::= */ - 433, /* (353) language_opt ::= LANGUAGE NK_STRING */ - 430, /* (354) or_replace_opt ::= */ - 430, /* (355) or_replace_opt ::= OR REPLACE */ - 345, /* (356) cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery */ - 345, /* (357) cmd ::= DROP VIEW exists_opt full_view_name */ - 434, /* (358) full_view_name ::= view_name */ - 434, /* (359) full_view_name ::= db_name NK_DOT view_name */ - 345, /* (360) cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name col_list_opt tag_def_or_ref_opt subtable_opt AS query_or_subquery */ - 345, /* (361) cmd ::= DROP STREAM exists_opt stream_name */ - 345, /* (362) cmd ::= PAUSE STREAM exists_opt stream_name */ - 345, /* (363) cmd ::= RESUME STREAM exists_opt ignore_opt stream_name */ - 438, /* (364) col_list_opt ::= */ - 438, /* (365) col_list_opt ::= NK_LP col_name_list NK_RP */ - 439, /* (366) tag_def_or_ref_opt ::= */ - 439, /* (367) tag_def_or_ref_opt ::= tags_def */ - 439, /* (368) tag_def_or_ref_opt ::= TAGS NK_LP col_name_list NK_RP */ - 437, /* (369) stream_options ::= */ - 437, /* (370) stream_options ::= stream_options TRIGGER AT_ONCE */ - 437, /* (371) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ - 437, /* (372) stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ - 437, /* (373) stream_options ::= stream_options WATERMARK duration_literal */ - 437, /* (374) stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ - 437, /* (375) stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ - 437, /* (376) stream_options ::= stream_options DELETE_MARK duration_literal */ - 437, /* (377) stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */ - 440, /* (378) subtable_opt ::= */ - 440, /* (379) subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ - 441, /* (380) ignore_opt ::= */ - 441, /* (381) ignore_opt ::= IGNORE UNTREATED */ - 345, /* (382) cmd ::= KILL CONNECTION NK_INTEGER */ - 345, /* (383) cmd ::= KILL QUERY NK_STRING */ - 345, /* (384) cmd ::= KILL TRANSACTION NK_INTEGER */ - 345, /* (385) cmd ::= BALANCE VGROUP */ - 345, /* (386) cmd ::= BALANCE VGROUP LEADER on_vgroup_id */ - 345, /* (387) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ - 345, /* (388) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ - 345, /* (389) cmd ::= SPLIT VGROUP NK_INTEGER */ - 443, /* (390) on_vgroup_id ::= */ - 443, /* (391) on_vgroup_id ::= ON NK_INTEGER */ - 444, /* (392) dnode_list ::= DNODE NK_INTEGER */ - 444, /* (393) dnode_list ::= dnode_list DNODE NK_INTEGER */ - 345, /* (394) cmd ::= DELETE FROM full_table_name where_clause_opt */ - 345, /* (395) cmd ::= query_or_subquery */ - 345, /* (396) cmd ::= insert_query */ - 429, /* (397) insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ - 429, /* (398) insert_query ::= INSERT INTO full_table_name query_or_subquery */ - 348, /* (399) literal ::= NK_INTEGER */ - 348, /* (400) literal ::= NK_FLOAT */ - 348, /* (401) literal ::= NK_STRING */ - 348, /* (402) literal ::= NK_BOOL */ - 348, /* (403) literal ::= TIMESTAMP NK_STRING */ - 348, /* (404) literal ::= duration_literal */ - 348, /* (405) literal ::= NULL */ - 348, /* (406) literal ::= NK_QUESTION */ - 401, /* (407) duration_literal ::= NK_VARIABLE */ - 377, /* (408) signed ::= NK_INTEGER */ - 377, /* (409) signed ::= NK_PLUS NK_INTEGER */ - 377, /* (410) signed ::= NK_MINUS NK_INTEGER */ - 377, /* (411) signed ::= NK_FLOAT */ - 377, /* (412) signed ::= NK_PLUS NK_FLOAT */ - 377, /* (413) signed ::= NK_MINUS NK_FLOAT */ - 391, /* (414) signed_literal ::= signed */ - 391, /* (415) signed_literal ::= NK_STRING */ - 391, /* (416) signed_literal ::= NK_BOOL */ - 391, /* (417) signed_literal ::= TIMESTAMP NK_STRING */ - 391, /* (418) signed_literal ::= duration_literal */ - 391, /* (419) signed_literal ::= NULL */ - 391, /* (420) signed_literal ::= literal_func */ - 391, /* (421) signed_literal ::= NK_QUESTION */ - 446, /* (422) literal_list ::= signed_literal */ - 446, /* (423) literal_list ::= literal_list NK_COMMA signed_literal */ - 360, /* (424) db_name ::= NK_ID */ - 361, /* (425) table_name ::= NK_ID */ - 389, /* (426) column_name ::= NK_ID */ - 403, /* (427) function_name ::= NK_ID */ - 435, /* (428) view_name ::= NK_ID */ - 447, /* (429) table_alias ::= NK_ID */ - 414, /* (430) column_alias ::= NK_ID */ - 353, /* (431) user_name ::= NK_ID */ - 362, /* (432) topic_name ::= NK_ID */ - 436, /* (433) stream_name ::= NK_ID */ - 426, /* (434) cgroup_name ::= NK_ID */ - 417, /* (435) index_name ::= NK_ID */ - 448, /* (436) expr_or_subquery ::= expression */ - 442, /* (437) expression ::= literal */ - 442, /* (438) expression ::= pseudo_column */ - 442, /* (439) expression ::= column_reference */ - 442, /* (440) expression ::= function_expression */ - 442, /* (441) expression ::= case_when_expression */ - 442, /* (442) expression ::= NK_LP expression NK_RP */ - 442, /* (443) expression ::= NK_PLUS expr_or_subquery */ - 442, /* (444) expression ::= NK_MINUS expr_or_subquery */ - 442, /* (445) expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ - 442, /* (446) expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ - 442, /* (447) expression ::= expr_or_subquery NK_STAR expr_or_subquery */ - 442, /* (448) expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ - 442, /* (449) expression ::= expr_or_subquery NK_REM expr_or_subquery */ - 442, /* (450) expression ::= column_reference NK_ARROW NK_STRING */ - 442, /* (451) expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ - 442, /* (452) expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ - 394, /* (453) expression_list ::= expr_or_subquery */ - 394, /* (454) expression_list ::= expression_list NK_COMMA expr_or_subquery */ - 450, /* (455) column_reference ::= column_name */ - 450, /* (456) column_reference ::= table_name NK_DOT column_name */ - 449, /* (457) pseudo_column ::= ROWTS */ - 449, /* (458) pseudo_column ::= TBNAME */ - 449, /* (459) pseudo_column ::= table_name NK_DOT TBNAME */ - 449, /* (460) pseudo_column ::= QSTART */ - 449, /* (461) pseudo_column ::= QEND */ - 449, /* (462) pseudo_column ::= QDURATION */ - 449, /* (463) pseudo_column ::= WSTART */ - 449, /* (464) pseudo_column ::= WEND */ - 449, /* (465) pseudo_column ::= WDURATION */ - 449, /* (466) pseudo_column ::= IROWTS */ - 449, /* (467) pseudo_column ::= ISFILLED */ - 449, /* (468) pseudo_column ::= QTAGS */ - 451, /* (469) function_expression ::= function_name NK_LP expression_list NK_RP */ - 451, /* (470) function_expression ::= star_func NK_LP star_func_para_list NK_RP */ - 451, /* (471) function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ - 451, /* (472) function_expression ::= literal_func */ - 445, /* (473) literal_func ::= noarg_func NK_LP NK_RP */ - 445, /* (474) literal_func ::= NOW */ - 455, /* (475) noarg_func ::= NOW */ - 455, /* (476) noarg_func ::= TODAY */ - 455, /* (477) noarg_func ::= TIMEZONE */ - 455, /* (478) noarg_func ::= DATABASE */ - 455, /* (479) noarg_func ::= CLIENT_VERSION */ - 455, /* (480) noarg_func ::= SERVER_VERSION */ - 455, /* (481) noarg_func ::= SERVER_STATUS */ - 455, /* (482) noarg_func ::= CURRENT_USER */ - 455, /* (483) noarg_func ::= USER */ - 453, /* (484) star_func ::= COUNT */ - 453, /* (485) star_func ::= FIRST */ - 453, /* (486) star_func ::= LAST */ - 453, /* (487) star_func ::= LAST_ROW */ - 454, /* (488) star_func_para_list ::= NK_STAR */ - 454, /* (489) star_func_para_list ::= other_para_list */ - 456, /* (490) other_para_list ::= star_func_para */ - 456, /* (491) other_para_list ::= other_para_list NK_COMMA star_func_para */ - 457, /* (492) star_func_para ::= expr_or_subquery */ - 457, /* (493) star_func_para ::= table_name NK_DOT NK_STAR */ - 452, /* (494) case_when_expression ::= CASE when_then_list case_when_else_opt END */ - 452, /* (495) case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ - 458, /* (496) when_then_list ::= when_then_expr */ - 458, /* (497) when_then_list ::= when_then_list when_then_expr */ - 461, /* (498) when_then_expr ::= WHEN common_expression THEN common_expression */ - 459, /* (499) case_when_else_opt ::= */ - 459, /* (500) case_when_else_opt ::= ELSE common_expression */ - 462, /* (501) predicate ::= expr_or_subquery compare_op expr_or_subquery */ - 462, /* (502) predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ - 462, /* (503) predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ - 462, /* (504) predicate ::= expr_or_subquery IS NULL */ - 462, /* (505) predicate ::= expr_or_subquery IS NOT NULL */ - 462, /* (506) predicate ::= expr_or_subquery in_op in_predicate_value */ - 463, /* (507) compare_op ::= NK_LT */ - 463, /* (508) compare_op ::= NK_GT */ - 463, /* (509) compare_op ::= NK_LE */ - 463, /* (510) compare_op ::= NK_GE */ - 463, /* (511) compare_op ::= NK_NE */ - 463, /* (512) compare_op ::= NK_EQ */ - 463, /* (513) compare_op ::= LIKE */ - 463, /* (514) compare_op ::= NOT LIKE */ - 463, /* (515) compare_op ::= MATCH */ - 463, /* (516) compare_op ::= NMATCH */ - 463, /* (517) compare_op ::= CONTAINS */ - 464, /* (518) in_op ::= IN */ - 464, /* (519) in_op ::= NOT IN */ - 465, /* (520) in_predicate_value ::= NK_LP literal_list NK_RP */ - 466, /* (521) boolean_value_expression ::= boolean_primary */ - 466, /* (522) boolean_value_expression ::= NOT boolean_primary */ - 466, /* (523) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ - 466, /* (524) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ - 467, /* (525) boolean_primary ::= predicate */ - 467, /* (526) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ - 460, /* (527) common_expression ::= expr_or_subquery */ - 460, /* (528) common_expression ::= boolean_value_expression */ - 468, /* (529) from_clause_opt ::= */ - 468, /* (530) from_clause_opt ::= FROM table_reference_list */ - 469, /* (531) table_reference_list ::= table_reference */ - 469, /* (532) table_reference_list ::= table_reference_list NK_COMMA table_reference */ - 470, /* (533) table_reference ::= table_primary */ - 470, /* (534) table_reference ::= joined_table */ - 471, /* (535) table_primary ::= table_name alias_opt */ - 471, /* (536) table_primary ::= db_name NK_DOT table_name alias_opt */ - 471, /* (537) table_primary ::= subquery alias_opt */ - 471, /* (538) table_primary ::= parenthesized_joined_table */ - 473, /* (539) alias_opt ::= */ - 473, /* (540) alias_opt ::= table_alias */ - 473, /* (541) alias_opt ::= AS table_alias */ - 475, /* (542) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ - 475, /* (543) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ - 472, /* (544) joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ - 476, /* (545) join_type ::= */ - 476, /* (546) join_type ::= INNER */ - 477, /* (547) query_specification ::= SELECT hint_list set_quantifier_opt tag_mode_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 */ - 478, /* (548) hint_list ::= */ - 478, /* (549) hint_list ::= NK_HINT */ - 480, /* (550) tag_mode_opt ::= */ - 480, /* (551) tag_mode_opt ::= TAGS */ - 479, /* (552) set_quantifier_opt ::= */ - 479, /* (553) set_quantifier_opt ::= DISTINCT */ - 479, /* (554) set_quantifier_opt ::= ALL */ - 481, /* (555) select_list ::= select_item */ - 481, /* (556) select_list ::= select_list NK_COMMA select_item */ - 489, /* (557) select_item ::= NK_STAR */ - 489, /* (558) select_item ::= common_expression */ - 489, /* (559) select_item ::= common_expression column_alias */ - 489, /* (560) select_item ::= common_expression AS column_alias */ - 489, /* (561) select_item ::= table_name NK_DOT NK_STAR */ - 425, /* (562) where_clause_opt ::= */ - 425, /* (563) where_clause_opt ::= WHERE search_condition */ - 482, /* (564) partition_by_clause_opt ::= */ - 482, /* (565) partition_by_clause_opt ::= PARTITION BY partition_list */ - 490, /* (566) partition_list ::= partition_item */ - 490, /* (567) partition_list ::= partition_list NK_COMMA partition_item */ - 491, /* (568) partition_item ::= expr_or_subquery */ - 491, /* (569) partition_item ::= expr_or_subquery column_alias */ - 491, /* (570) partition_item ::= expr_or_subquery AS column_alias */ - 486, /* (571) twindow_clause_opt ::= */ - 486, /* (572) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ - 486, /* (573) twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ - 486, /* (574) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ - 486, /* (575) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ - 486, /* (576) twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ - 419, /* (577) sliding_opt ::= */ - 419, /* (578) sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ - 485, /* (579) fill_opt ::= */ - 485, /* (580) fill_opt ::= FILL NK_LP fill_mode NK_RP */ - 485, /* (581) fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP */ - 485, /* (582) fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP */ - 492, /* (583) fill_mode ::= NONE */ - 492, /* (584) fill_mode ::= PREV */ - 492, /* (585) fill_mode ::= NULL */ - 492, /* (586) fill_mode ::= NULL_F */ - 492, /* (587) fill_mode ::= LINEAR */ - 492, /* (588) fill_mode ::= NEXT */ - 487, /* (589) group_by_clause_opt ::= */ - 487, /* (590) group_by_clause_opt ::= GROUP BY group_by_list */ - 493, /* (591) group_by_list ::= expr_or_subquery */ - 493, /* (592) group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ - 488, /* (593) having_clause_opt ::= */ - 488, /* (594) having_clause_opt ::= HAVING search_condition */ - 483, /* (595) range_opt ::= */ - 483, /* (596) range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ - 483, /* (597) range_opt ::= RANGE NK_LP expr_or_subquery NK_RP */ - 484, /* (598) every_opt ::= */ - 484, /* (599) every_opt ::= EVERY NK_LP duration_literal NK_RP */ - 494, /* (600) query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ - 495, /* (601) query_simple ::= query_specification */ - 495, /* (602) query_simple ::= union_query_expression */ - 499, /* (603) union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ - 499, /* (604) union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ - 500, /* (605) query_simple_or_subquery ::= query_simple */ - 500, /* (606) query_simple_or_subquery ::= subquery */ - 424, /* (607) query_or_subquery ::= query_expression */ - 424, /* (608) query_or_subquery ::= subquery */ - 496, /* (609) order_by_clause_opt ::= */ - 496, /* (610) order_by_clause_opt ::= ORDER BY sort_specification_list */ - 497, /* (611) slimit_clause_opt ::= */ - 497, /* (612) slimit_clause_opt ::= SLIMIT NK_INTEGER */ - 497, /* (613) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ - 497, /* (614) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - 498, /* (615) limit_clause_opt ::= */ - 498, /* (616) limit_clause_opt ::= LIMIT NK_INTEGER */ - 498, /* (617) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ - 498, /* (618) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - 474, /* (619) subquery ::= NK_LP query_expression NK_RP */ - 474, /* (620) subquery ::= NK_LP subquery NK_RP */ - 363, /* (621) search_condition ::= common_expression */ - 501, /* (622) sort_specification_list ::= sort_specification */ - 501, /* (623) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ - 502, /* (624) sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ - 503, /* (625) ordering_specification_opt ::= */ - 503, /* (626) ordering_specification_opt ::= ASC */ - 503, /* (627) ordering_specification_opt ::= DESC */ - 504, /* (628) null_ordering_opt ::= */ - 504, /* (629) null_ordering_opt ::= NULLS FIRST */ - 504, /* (630) null_ordering_opt ::= NULLS LAST */ + 359, /* (47) priv_type ::= ALTER */ + 356, /* (48) priv_level ::= NK_STAR NK_DOT NK_STAR */ + 356, /* (49) priv_level ::= db_name NK_DOT NK_STAR */ + 356, /* (50) priv_level ::= db_name NK_DOT table_name */ + 356, /* (51) priv_level ::= topic_name */ + 357, /* (52) with_opt ::= */ + 357, /* (53) with_opt ::= WITH search_condition */ + 345, /* (54) cmd ::= CREATE DNODE dnode_endpoint */ + 345, /* (55) cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */ + 345, /* (56) cmd ::= DROP DNODE NK_INTEGER force_opt */ + 345, /* (57) cmd ::= DROP DNODE dnode_endpoint force_opt */ + 345, /* (58) cmd ::= DROP DNODE NK_INTEGER unsafe_opt */ + 345, /* (59) cmd ::= DROP DNODE dnode_endpoint unsafe_opt */ + 345, /* (60) cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ + 345, /* (61) cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */ + 345, /* (62) cmd ::= ALTER ALL DNODES NK_STRING */ + 345, /* (63) cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */ + 345, /* (64) cmd ::= RESTORE DNODE NK_INTEGER */ + 364, /* (65) dnode_endpoint ::= NK_STRING */ + 364, /* (66) dnode_endpoint ::= NK_ID */ + 364, /* (67) dnode_endpoint ::= NK_IPTOKEN */ + 365, /* (68) force_opt ::= */ + 365, /* (69) force_opt ::= FORCE */ + 366, /* (70) unsafe_opt ::= UNSAFE */ + 345, /* (71) cmd ::= ALTER LOCAL NK_STRING */ + 345, /* (72) cmd ::= ALTER LOCAL NK_STRING NK_STRING */ + 345, /* (73) cmd ::= CREATE QNODE ON DNODE NK_INTEGER */ + 345, /* (74) cmd ::= DROP QNODE ON DNODE NK_INTEGER */ + 345, /* (75) cmd ::= RESTORE QNODE ON DNODE NK_INTEGER */ + 345, /* (76) cmd ::= CREATE BNODE ON DNODE NK_INTEGER */ + 345, /* (77) cmd ::= DROP BNODE ON DNODE NK_INTEGER */ + 345, /* (78) cmd ::= CREATE SNODE ON DNODE NK_INTEGER */ + 345, /* (79) cmd ::= DROP SNODE ON DNODE NK_INTEGER */ + 345, /* (80) cmd ::= CREATE MNODE ON DNODE NK_INTEGER */ + 345, /* (81) cmd ::= DROP MNODE ON DNODE NK_INTEGER */ + 345, /* (82) cmd ::= RESTORE MNODE ON DNODE NK_INTEGER */ + 345, /* (83) cmd ::= RESTORE VNODE ON DNODE NK_INTEGER */ + 345, /* (84) cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ + 345, /* (85) cmd ::= DROP DATABASE exists_opt db_name */ + 345, /* (86) cmd ::= USE db_name */ + 345, /* (87) cmd ::= ALTER DATABASE db_name alter_db_options */ + 345, /* (88) cmd ::= FLUSH DATABASE db_name */ + 345, /* (89) cmd ::= TRIM DATABASE db_name speed_opt */ + 345, /* (90) cmd ::= COMPACT DATABASE db_name start_opt end_opt */ + 367, /* (91) not_exists_opt ::= IF NOT EXISTS */ + 367, /* (92) not_exists_opt ::= */ + 369, /* (93) exists_opt ::= IF EXISTS */ + 369, /* (94) exists_opt ::= */ + 368, /* (95) db_options ::= */ + 368, /* (96) db_options ::= db_options BUFFER NK_INTEGER */ + 368, /* (97) db_options ::= db_options CACHEMODEL NK_STRING */ + 368, /* (98) db_options ::= db_options CACHESIZE NK_INTEGER */ + 368, /* (99) db_options ::= db_options COMP NK_INTEGER */ + 368, /* (100) db_options ::= db_options DURATION NK_INTEGER */ + 368, /* (101) db_options ::= db_options DURATION NK_VARIABLE */ + 368, /* (102) db_options ::= db_options MAXROWS NK_INTEGER */ + 368, /* (103) db_options ::= db_options MINROWS NK_INTEGER */ + 368, /* (104) db_options ::= db_options KEEP integer_list */ + 368, /* (105) db_options ::= db_options KEEP variable_list */ + 368, /* (106) db_options ::= db_options PAGES NK_INTEGER */ + 368, /* (107) db_options ::= db_options PAGESIZE NK_INTEGER */ + 368, /* (108) db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */ + 368, /* (109) db_options ::= db_options PRECISION NK_STRING */ + 368, /* (110) db_options ::= db_options REPLICA NK_INTEGER */ + 368, /* (111) db_options ::= db_options VGROUPS NK_INTEGER */ + 368, /* (112) db_options ::= db_options SINGLE_STABLE NK_INTEGER */ + 368, /* (113) db_options ::= db_options RETENTIONS retention_list */ + 368, /* (114) db_options ::= db_options SCHEMALESS NK_INTEGER */ + 368, /* (115) db_options ::= db_options WAL_LEVEL NK_INTEGER */ + 368, /* (116) db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */ + 368, /* (117) db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */ + 368, /* (118) db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ + 368, /* (119) db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */ + 368, /* (120) db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ + 368, /* (121) db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */ + 368, /* (122) db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */ + 368, /* (123) db_options ::= db_options STT_TRIGGER NK_INTEGER */ + 368, /* (124) db_options ::= db_options TABLE_PREFIX signed */ + 368, /* (125) db_options ::= db_options TABLE_SUFFIX signed */ + 368, /* (126) db_options ::= db_options KEEP_TIME_OFFSET NK_INTEGER */ + 370, /* (127) alter_db_options ::= alter_db_option */ + 370, /* (128) alter_db_options ::= alter_db_options alter_db_option */ + 378, /* (129) alter_db_option ::= BUFFER NK_INTEGER */ + 378, /* (130) alter_db_option ::= CACHEMODEL NK_STRING */ + 378, /* (131) alter_db_option ::= CACHESIZE NK_INTEGER */ + 378, /* (132) alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */ + 378, /* (133) alter_db_option ::= KEEP integer_list */ + 378, /* (134) alter_db_option ::= KEEP variable_list */ + 378, /* (135) alter_db_option ::= PAGES NK_INTEGER */ + 378, /* (136) alter_db_option ::= REPLICA NK_INTEGER */ + 378, /* (137) alter_db_option ::= WAL_LEVEL NK_INTEGER */ + 378, /* (138) alter_db_option ::= STT_TRIGGER NK_INTEGER */ + 378, /* (139) alter_db_option ::= MINROWS NK_INTEGER */ + 378, /* (140) alter_db_option ::= WAL_RETENTION_PERIOD NK_INTEGER */ + 378, /* (141) alter_db_option ::= WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ + 378, /* (142) alter_db_option ::= WAL_RETENTION_SIZE NK_INTEGER */ + 378, /* (143) alter_db_option ::= WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ + 378, /* (144) alter_db_option ::= KEEP_TIME_OFFSET NK_INTEGER */ + 374, /* (145) integer_list ::= NK_INTEGER */ + 374, /* (146) integer_list ::= integer_list NK_COMMA NK_INTEGER */ + 375, /* (147) variable_list ::= NK_VARIABLE */ + 375, /* (148) variable_list ::= variable_list NK_COMMA NK_VARIABLE */ + 376, /* (149) retention_list ::= retention */ + 376, /* (150) retention_list ::= retention_list NK_COMMA retention */ + 379, /* (151) retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ + 371, /* (152) speed_opt ::= */ + 371, /* (153) speed_opt ::= BWLIMIT NK_INTEGER */ + 372, /* (154) start_opt ::= */ + 372, /* (155) start_opt ::= START WITH NK_INTEGER */ + 372, /* (156) start_opt ::= START WITH NK_STRING */ + 372, /* (157) start_opt ::= START WITH TIMESTAMP NK_STRING */ + 373, /* (158) end_opt ::= */ + 373, /* (159) end_opt ::= END WITH NK_INTEGER */ + 373, /* (160) end_opt ::= END WITH NK_STRING */ + 373, /* (161) end_opt ::= END WITH TIMESTAMP NK_STRING */ + 345, /* (162) cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ + 345, /* (163) cmd ::= CREATE TABLE multi_create_clause */ + 345, /* (164) cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ + 345, /* (165) cmd ::= DROP TABLE multi_drop_clause */ + 345, /* (166) cmd ::= DROP STABLE exists_opt full_table_name */ + 345, /* (167) cmd ::= ALTER TABLE alter_table_clause */ + 345, /* (168) cmd ::= ALTER STABLE alter_table_clause */ + 387, /* (169) alter_table_clause ::= full_table_name alter_table_options */ + 387, /* (170) alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ + 387, /* (171) alter_table_clause ::= full_table_name DROP COLUMN column_name */ + 387, /* (172) alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ + 387, /* (173) alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ + 387, /* (174) alter_table_clause ::= full_table_name ADD TAG column_name type_name */ + 387, /* (175) alter_table_clause ::= full_table_name DROP TAG column_name */ + 387, /* (176) alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ + 387, /* (177) alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ + 387, /* (178) alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */ + 384, /* (179) multi_create_clause ::= create_subtable_clause */ + 384, /* (180) multi_create_clause ::= multi_create_clause create_subtable_clause */ + 392, /* (181) 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 */ + 386, /* (182) multi_drop_clause ::= drop_table_clause */ + 386, /* (183) multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause */ + 395, /* (184) drop_table_clause ::= exists_opt full_table_name */ + 393, /* (185) specific_cols_opt ::= */ + 393, /* (186) specific_cols_opt ::= NK_LP col_name_list NK_RP */ + 380, /* (187) full_table_name ::= table_name */ + 380, /* (188) full_table_name ::= db_name NK_DOT table_name */ + 381, /* (189) column_def_list ::= column_def */ + 381, /* (190) column_def_list ::= column_def_list NK_COMMA column_def */ + 397, /* (191) column_def ::= column_name type_name */ + 390, /* (192) type_name ::= BOOL */ + 390, /* (193) type_name ::= TINYINT */ + 390, /* (194) type_name ::= SMALLINT */ + 390, /* (195) type_name ::= INT */ + 390, /* (196) type_name ::= INTEGER */ + 390, /* (197) type_name ::= BIGINT */ + 390, /* (198) type_name ::= FLOAT */ + 390, /* (199) type_name ::= DOUBLE */ + 390, /* (200) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ + 390, /* (201) type_name ::= TIMESTAMP */ + 390, /* (202) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ + 390, /* (203) type_name ::= TINYINT UNSIGNED */ + 390, /* (204) type_name ::= SMALLINT UNSIGNED */ + 390, /* (205) type_name ::= INT UNSIGNED */ + 390, /* (206) type_name ::= BIGINT UNSIGNED */ + 390, /* (207) type_name ::= JSON */ + 390, /* (208) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ + 390, /* (209) type_name ::= MEDIUMBLOB */ + 390, /* (210) type_name ::= BLOB */ + 390, /* (211) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ + 390, /* (212) type_name ::= GEOMETRY NK_LP NK_INTEGER NK_RP */ + 390, /* (213) type_name ::= DECIMAL */ + 390, /* (214) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ + 390, /* (215) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ + 382, /* (216) tags_def_opt ::= */ + 382, /* (217) tags_def_opt ::= tags_def */ + 385, /* (218) tags_def ::= TAGS NK_LP column_def_list NK_RP */ + 383, /* (219) table_options ::= */ + 383, /* (220) table_options ::= table_options COMMENT NK_STRING */ + 383, /* (221) table_options ::= table_options MAX_DELAY duration_list */ + 383, /* (222) table_options ::= table_options WATERMARK duration_list */ + 383, /* (223) table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ + 383, /* (224) table_options ::= table_options TTL NK_INTEGER */ + 383, /* (225) table_options ::= table_options SMA NK_LP col_name_list NK_RP */ + 383, /* (226) table_options ::= table_options DELETE_MARK duration_list */ + 388, /* (227) alter_table_options ::= alter_table_option */ + 388, /* (228) alter_table_options ::= alter_table_options alter_table_option */ + 400, /* (229) alter_table_option ::= COMMENT NK_STRING */ + 400, /* (230) alter_table_option ::= TTL NK_INTEGER */ + 398, /* (231) duration_list ::= duration_literal */ + 398, /* (232) duration_list ::= duration_list NK_COMMA duration_literal */ + 399, /* (233) rollup_func_list ::= rollup_func_name */ + 399, /* (234) rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ + 402, /* (235) rollup_func_name ::= function_name */ + 402, /* (236) rollup_func_name ::= FIRST */ + 402, /* (237) rollup_func_name ::= LAST */ + 396, /* (238) col_name_list ::= col_name */ + 396, /* (239) col_name_list ::= col_name_list NK_COMMA col_name */ + 404, /* (240) col_name ::= column_name */ + 345, /* (241) cmd ::= SHOW DNODES */ + 345, /* (242) cmd ::= SHOW USERS */ + 345, /* (243) cmd ::= SHOW USER PRIVILEGES */ + 345, /* (244) cmd ::= SHOW db_kind_opt DATABASES */ + 345, /* (245) cmd ::= SHOW table_kind_db_name_cond_opt TABLES like_pattern_opt */ + 345, /* (246) cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ + 345, /* (247) cmd ::= SHOW db_name_cond_opt VGROUPS */ + 345, /* (248) cmd ::= SHOW MNODES */ + 345, /* (249) cmd ::= SHOW QNODES */ + 345, /* (250) cmd ::= SHOW FUNCTIONS */ + 345, /* (251) cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ + 345, /* (252) cmd ::= SHOW INDEXES FROM db_name NK_DOT table_name */ + 345, /* (253) cmd ::= SHOW STREAMS */ + 345, /* (254) cmd ::= SHOW ACCOUNTS */ + 345, /* (255) cmd ::= SHOW APPS */ + 345, /* (256) cmd ::= SHOW CONNECTIONS */ + 345, /* (257) cmd ::= SHOW LICENCES */ + 345, /* (258) cmd ::= SHOW GRANTS */ + 345, /* (259) cmd ::= SHOW CREATE DATABASE db_name */ + 345, /* (260) cmd ::= SHOW CREATE TABLE full_table_name */ + 345, /* (261) cmd ::= SHOW CREATE STABLE full_table_name */ + 345, /* (262) cmd ::= SHOW QUERIES */ + 345, /* (263) cmd ::= SHOW SCORES */ + 345, /* (264) cmd ::= SHOW TOPICS */ + 345, /* (265) cmd ::= SHOW VARIABLES */ + 345, /* (266) cmd ::= SHOW CLUSTER VARIABLES */ + 345, /* (267) cmd ::= SHOW LOCAL VARIABLES */ + 345, /* (268) cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */ + 345, /* (269) cmd ::= SHOW BNODES */ + 345, /* (270) cmd ::= SHOW SNODES */ + 345, /* (271) cmd ::= SHOW CLUSTER */ + 345, /* (272) cmd ::= SHOW TRANSACTIONS */ + 345, /* (273) cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ + 345, /* (274) cmd ::= SHOW CONSUMERS */ + 345, /* (275) cmd ::= SHOW SUBSCRIPTIONS */ + 345, /* (276) cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ + 345, /* (277) cmd ::= SHOW TAGS FROM db_name NK_DOT table_name */ + 345, /* (278) cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ + 345, /* (279) cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name */ + 345, /* (280) cmd ::= SHOW VNODES ON DNODE NK_INTEGER */ + 345, /* (281) cmd ::= SHOW VNODES */ + 345, /* (282) cmd ::= SHOW db_name_cond_opt ALIVE */ + 345, /* (283) cmd ::= SHOW CLUSTER ALIVE */ + 345, /* (284) cmd ::= SHOW db_name_cond_opt VIEWS */ + 345, /* (285) cmd ::= SHOW CREATE VIEW full_table_name */ + 406, /* (286) table_kind_db_name_cond_opt ::= */ + 406, /* (287) table_kind_db_name_cond_opt ::= table_kind */ + 406, /* (288) table_kind_db_name_cond_opt ::= db_name NK_DOT */ + 406, /* (289) table_kind_db_name_cond_opt ::= table_kind db_name NK_DOT */ + 412, /* (290) table_kind ::= NORMAL */ + 412, /* (291) table_kind ::= CHILD */ + 408, /* (292) db_name_cond_opt ::= */ + 408, /* (293) db_name_cond_opt ::= db_name NK_DOT */ + 407, /* (294) like_pattern_opt ::= */ + 407, /* (295) like_pattern_opt ::= LIKE NK_STRING */ + 409, /* (296) table_name_cond ::= table_name */ + 410, /* (297) from_db_opt ::= */ + 410, /* (298) from_db_opt ::= FROM db_name */ + 411, /* (299) tag_list_opt ::= */ + 411, /* (300) tag_list_opt ::= tag_item */ + 411, /* (301) tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ + 413, /* (302) tag_item ::= TBNAME */ + 413, /* (303) tag_item ::= QTAGS */ + 413, /* (304) tag_item ::= column_name */ + 413, /* (305) tag_item ::= column_name column_alias */ + 413, /* (306) tag_item ::= column_name AS column_alias */ + 405, /* (307) db_kind_opt ::= */ + 405, /* (308) db_kind_opt ::= USER */ + 405, /* (309) db_kind_opt ::= SYSTEM */ + 345, /* (310) cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options */ + 345, /* (311) cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP */ + 345, /* (312) cmd ::= DROP INDEX exists_opt full_index_name */ + 416, /* (313) full_index_name ::= index_name */ + 416, /* (314) full_index_name ::= db_name NK_DOT index_name */ + 415, /* (315) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ + 415, /* (316) 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 */ + 418, /* (317) func_list ::= func */ + 418, /* (318) func_list ::= func_list NK_COMMA func */ + 421, /* (319) func ::= sma_func_name NK_LP expression_list NK_RP */ + 422, /* (320) sma_func_name ::= function_name */ + 422, /* (321) sma_func_name ::= COUNT */ + 422, /* (322) sma_func_name ::= FIRST */ + 422, /* (323) sma_func_name ::= LAST */ + 422, /* (324) sma_func_name ::= LAST_ROW */ + 420, /* (325) sma_stream_opt ::= */ + 420, /* (326) sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ + 420, /* (327) sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ + 420, /* (328) sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ + 423, /* (329) with_meta ::= AS */ + 423, /* (330) with_meta ::= WITH META AS */ + 423, /* (331) with_meta ::= ONLY META AS */ + 345, /* (332) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ + 345, /* (333) cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name */ + 345, /* (334) cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt */ + 345, /* (335) cmd ::= DROP TOPIC exists_opt topic_name */ + 345, /* (336) cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ + 345, /* (337) cmd ::= DESC full_table_name */ + 345, /* (338) cmd ::= DESCRIBE full_table_name */ + 345, /* (339) cmd ::= RESET QUERY CACHE */ + 345, /* (340) cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ + 345, /* (341) cmd ::= EXPLAIN analyze_opt explain_options insert_query */ + 427, /* (342) analyze_opt ::= */ + 427, /* (343) analyze_opt ::= ANALYZE */ + 428, /* (344) explain_options ::= */ + 428, /* (345) explain_options ::= explain_options VERBOSE NK_BOOL */ + 428, /* (346) explain_options ::= explain_options RATIO NK_FLOAT */ + 345, /* (347) cmd ::= CREATE or_replace_opt agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt language_opt */ + 345, /* (348) cmd ::= DROP FUNCTION exists_opt function_name */ + 431, /* (349) agg_func_opt ::= */ + 431, /* (350) agg_func_opt ::= AGGREGATE */ + 432, /* (351) bufsize_opt ::= */ + 432, /* (352) bufsize_opt ::= BUFSIZE NK_INTEGER */ + 433, /* (353) language_opt ::= */ + 433, /* (354) language_opt ::= LANGUAGE NK_STRING */ + 430, /* (355) or_replace_opt ::= */ + 430, /* (356) or_replace_opt ::= OR REPLACE */ + 345, /* (357) cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery */ + 345, /* (358) cmd ::= DROP VIEW exists_opt full_view_name */ + 434, /* (359) full_view_name ::= view_name */ + 434, /* (360) full_view_name ::= db_name NK_DOT view_name */ + 345, /* (361) cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name col_list_opt tag_def_or_ref_opt subtable_opt AS query_or_subquery */ + 345, /* (362) cmd ::= DROP STREAM exists_opt stream_name */ + 345, /* (363) cmd ::= PAUSE STREAM exists_opt stream_name */ + 345, /* (364) cmd ::= RESUME STREAM exists_opt ignore_opt stream_name */ + 438, /* (365) col_list_opt ::= */ + 438, /* (366) col_list_opt ::= NK_LP col_name_list NK_RP */ + 439, /* (367) tag_def_or_ref_opt ::= */ + 439, /* (368) tag_def_or_ref_opt ::= tags_def */ + 439, /* (369) tag_def_or_ref_opt ::= TAGS NK_LP col_name_list NK_RP */ + 437, /* (370) stream_options ::= */ + 437, /* (371) stream_options ::= stream_options TRIGGER AT_ONCE */ + 437, /* (372) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ + 437, /* (373) stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ + 437, /* (374) stream_options ::= stream_options WATERMARK duration_literal */ + 437, /* (375) stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ + 437, /* (376) stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ + 437, /* (377) stream_options ::= stream_options DELETE_MARK duration_literal */ + 437, /* (378) stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */ + 440, /* (379) subtable_opt ::= */ + 440, /* (380) subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ + 441, /* (381) ignore_opt ::= */ + 441, /* (382) ignore_opt ::= IGNORE UNTREATED */ + 345, /* (383) cmd ::= KILL CONNECTION NK_INTEGER */ + 345, /* (384) cmd ::= KILL QUERY NK_STRING */ + 345, /* (385) cmd ::= KILL TRANSACTION NK_INTEGER */ + 345, /* (386) cmd ::= BALANCE VGROUP */ + 345, /* (387) cmd ::= BALANCE VGROUP LEADER on_vgroup_id */ + 345, /* (388) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ + 345, /* (389) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ + 345, /* (390) cmd ::= SPLIT VGROUP NK_INTEGER */ + 443, /* (391) on_vgroup_id ::= */ + 443, /* (392) on_vgroup_id ::= ON NK_INTEGER */ + 444, /* (393) dnode_list ::= DNODE NK_INTEGER */ + 444, /* (394) dnode_list ::= dnode_list DNODE NK_INTEGER */ + 345, /* (395) cmd ::= DELETE FROM full_table_name where_clause_opt */ + 345, /* (396) cmd ::= query_or_subquery */ + 345, /* (397) cmd ::= insert_query */ + 429, /* (398) insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ + 429, /* (399) insert_query ::= INSERT INTO full_table_name query_or_subquery */ + 348, /* (400) literal ::= NK_INTEGER */ + 348, /* (401) literal ::= NK_FLOAT */ + 348, /* (402) literal ::= NK_STRING */ + 348, /* (403) literal ::= NK_BOOL */ + 348, /* (404) literal ::= TIMESTAMP NK_STRING */ + 348, /* (405) literal ::= duration_literal */ + 348, /* (406) literal ::= NULL */ + 348, /* (407) literal ::= NK_QUESTION */ + 401, /* (408) duration_literal ::= NK_VARIABLE */ + 377, /* (409) signed ::= NK_INTEGER */ + 377, /* (410) signed ::= NK_PLUS NK_INTEGER */ + 377, /* (411) signed ::= NK_MINUS NK_INTEGER */ + 377, /* (412) signed ::= NK_FLOAT */ + 377, /* (413) signed ::= NK_PLUS NK_FLOAT */ + 377, /* (414) signed ::= NK_MINUS NK_FLOAT */ + 391, /* (415) signed_literal ::= signed */ + 391, /* (416) signed_literal ::= NK_STRING */ + 391, /* (417) signed_literal ::= NK_BOOL */ + 391, /* (418) signed_literal ::= TIMESTAMP NK_STRING */ + 391, /* (419) signed_literal ::= duration_literal */ + 391, /* (420) signed_literal ::= NULL */ + 391, /* (421) signed_literal ::= literal_func */ + 391, /* (422) signed_literal ::= NK_QUESTION */ + 446, /* (423) literal_list ::= signed_literal */ + 446, /* (424) literal_list ::= literal_list NK_COMMA signed_literal */ + 360, /* (425) db_name ::= NK_ID */ + 361, /* (426) table_name ::= NK_ID */ + 389, /* (427) column_name ::= NK_ID */ + 403, /* (428) function_name ::= NK_ID */ + 435, /* (429) view_name ::= NK_ID */ + 447, /* (430) table_alias ::= NK_ID */ + 414, /* (431) column_alias ::= NK_ID */ + 353, /* (432) user_name ::= NK_ID */ + 362, /* (433) topic_name ::= NK_ID */ + 436, /* (434) stream_name ::= NK_ID */ + 426, /* (435) cgroup_name ::= NK_ID */ + 417, /* (436) index_name ::= NK_ID */ + 448, /* (437) expr_or_subquery ::= expression */ + 442, /* (438) expression ::= literal */ + 442, /* (439) expression ::= pseudo_column */ + 442, /* (440) expression ::= column_reference */ + 442, /* (441) expression ::= function_expression */ + 442, /* (442) expression ::= case_when_expression */ + 442, /* (443) expression ::= NK_LP expression NK_RP */ + 442, /* (444) expression ::= NK_PLUS expr_or_subquery */ + 442, /* (445) expression ::= NK_MINUS expr_or_subquery */ + 442, /* (446) expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ + 442, /* (447) expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ + 442, /* (448) expression ::= expr_or_subquery NK_STAR expr_or_subquery */ + 442, /* (449) expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ + 442, /* (450) expression ::= expr_or_subquery NK_REM expr_or_subquery */ + 442, /* (451) expression ::= column_reference NK_ARROW NK_STRING */ + 442, /* (452) expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ + 442, /* (453) expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ + 394, /* (454) expression_list ::= expr_or_subquery */ + 394, /* (455) expression_list ::= expression_list NK_COMMA expr_or_subquery */ + 450, /* (456) column_reference ::= column_name */ + 450, /* (457) column_reference ::= table_name NK_DOT column_name */ + 449, /* (458) pseudo_column ::= ROWTS */ + 449, /* (459) pseudo_column ::= TBNAME */ + 449, /* (460) pseudo_column ::= table_name NK_DOT TBNAME */ + 449, /* (461) pseudo_column ::= QSTART */ + 449, /* (462) pseudo_column ::= QEND */ + 449, /* (463) pseudo_column ::= QDURATION */ + 449, /* (464) pseudo_column ::= WSTART */ + 449, /* (465) pseudo_column ::= WEND */ + 449, /* (466) pseudo_column ::= WDURATION */ + 449, /* (467) pseudo_column ::= IROWTS */ + 449, /* (468) pseudo_column ::= ISFILLED */ + 449, /* (469) pseudo_column ::= QTAGS */ + 451, /* (470) function_expression ::= function_name NK_LP expression_list NK_RP */ + 451, /* (471) function_expression ::= star_func NK_LP star_func_para_list NK_RP */ + 451, /* (472) function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ + 451, /* (473) function_expression ::= literal_func */ + 445, /* (474) literal_func ::= noarg_func NK_LP NK_RP */ + 445, /* (475) literal_func ::= NOW */ + 455, /* (476) noarg_func ::= NOW */ + 455, /* (477) noarg_func ::= TODAY */ + 455, /* (478) noarg_func ::= TIMEZONE */ + 455, /* (479) noarg_func ::= DATABASE */ + 455, /* (480) noarg_func ::= CLIENT_VERSION */ + 455, /* (481) noarg_func ::= SERVER_VERSION */ + 455, /* (482) noarg_func ::= SERVER_STATUS */ + 455, /* (483) noarg_func ::= CURRENT_USER */ + 455, /* (484) noarg_func ::= USER */ + 453, /* (485) star_func ::= COUNT */ + 453, /* (486) star_func ::= FIRST */ + 453, /* (487) star_func ::= LAST */ + 453, /* (488) star_func ::= LAST_ROW */ + 454, /* (489) star_func_para_list ::= NK_STAR */ + 454, /* (490) star_func_para_list ::= other_para_list */ + 456, /* (491) other_para_list ::= star_func_para */ + 456, /* (492) other_para_list ::= other_para_list NK_COMMA star_func_para */ + 457, /* (493) star_func_para ::= expr_or_subquery */ + 457, /* (494) star_func_para ::= table_name NK_DOT NK_STAR */ + 452, /* (495) case_when_expression ::= CASE when_then_list case_when_else_opt END */ + 452, /* (496) case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ + 458, /* (497) when_then_list ::= when_then_expr */ + 458, /* (498) when_then_list ::= when_then_list when_then_expr */ + 461, /* (499) when_then_expr ::= WHEN common_expression THEN common_expression */ + 459, /* (500) case_when_else_opt ::= */ + 459, /* (501) case_when_else_opt ::= ELSE common_expression */ + 462, /* (502) predicate ::= expr_or_subquery compare_op expr_or_subquery */ + 462, /* (503) predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ + 462, /* (504) predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ + 462, /* (505) predicate ::= expr_or_subquery IS NULL */ + 462, /* (506) predicate ::= expr_or_subquery IS NOT NULL */ + 462, /* (507) predicate ::= expr_or_subquery in_op in_predicate_value */ + 463, /* (508) compare_op ::= NK_LT */ + 463, /* (509) compare_op ::= NK_GT */ + 463, /* (510) compare_op ::= NK_LE */ + 463, /* (511) compare_op ::= NK_GE */ + 463, /* (512) compare_op ::= NK_NE */ + 463, /* (513) compare_op ::= NK_EQ */ + 463, /* (514) compare_op ::= LIKE */ + 463, /* (515) compare_op ::= NOT LIKE */ + 463, /* (516) compare_op ::= MATCH */ + 463, /* (517) compare_op ::= NMATCH */ + 463, /* (518) compare_op ::= CONTAINS */ + 464, /* (519) in_op ::= IN */ + 464, /* (520) in_op ::= NOT IN */ + 465, /* (521) in_predicate_value ::= NK_LP literal_list NK_RP */ + 466, /* (522) boolean_value_expression ::= boolean_primary */ + 466, /* (523) boolean_value_expression ::= NOT boolean_primary */ + 466, /* (524) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ + 466, /* (525) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ + 467, /* (526) boolean_primary ::= predicate */ + 467, /* (527) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ + 460, /* (528) common_expression ::= expr_or_subquery */ + 460, /* (529) common_expression ::= boolean_value_expression */ + 468, /* (530) from_clause_opt ::= */ + 468, /* (531) from_clause_opt ::= FROM table_reference_list */ + 469, /* (532) table_reference_list ::= table_reference */ + 469, /* (533) table_reference_list ::= table_reference_list NK_COMMA table_reference */ + 470, /* (534) table_reference ::= table_primary */ + 470, /* (535) table_reference ::= joined_table */ + 471, /* (536) table_primary ::= table_name alias_opt */ + 471, /* (537) table_primary ::= db_name NK_DOT table_name alias_opt */ + 471, /* (538) table_primary ::= subquery alias_opt */ + 471, /* (539) table_primary ::= parenthesized_joined_table */ + 473, /* (540) alias_opt ::= */ + 473, /* (541) alias_opt ::= table_alias */ + 473, /* (542) alias_opt ::= AS table_alias */ + 475, /* (543) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ + 475, /* (544) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ + 472, /* (545) joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ + 476, /* (546) join_type ::= */ + 476, /* (547) join_type ::= INNER */ + 477, /* (548) query_specification ::= SELECT hint_list set_quantifier_opt tag_mode_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 */ + 478, /* (549) hint_list ::= */ + 478, /* (550) hint_list ::= NK_HINT */ + 480, /* (551) tag_mode_opt ::= */ + 480, /* (552) tag_mode_opt ::= TAGS */ + 479, /* (553) set_quantifier_opt ::= */ + 479, /* (554) set_quantifier_opt ::= DISTINCT */ + 479, /* (555) set_quantifier_opt ::= ALL */ + 481, /* (556) select_list ::= select_item */ + 481, /* (557) select_list ::= select_list NK_COMMA select_item */ + 489, /* (558) select_item ::= NK_STAR */ + 489, /* (559) select_item ::= common_expression */ + 489, /* (560) select_item ::= common_expression column_alias */ + 489, /* (561) select_item ::= common_expression AS column_alias */ + 489, /* (562) select_item ::= table_name NK_DOT NK_STAR */ + 425, /* (563) where_clause_opt ::= */ + 425, /* (564) where_clause_opt ::= WHERE search_condition */ + 482, /* (565) partition_by_clause_opt ::= */ + 482, /* (566) partition_by_clause_opt ::= PARTITION BY partition_list */ + 490, /* (567) partition_list ::= partition_item */ + 490, /* (568) partition_list ::= partition_list NK_COMMA partition_item */ + 491, /* (569) partition_item ::= expr_or_subquery */ + 491, /* (570) partition_item ::= expr_or_subquery column_alias */ + 491, /* (571) partition_item ::= expr_or_subquery AS column_alias */ + 486, /* (572) twindow_clause_opt ::= */ + 486, /* (573) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ + 486, /* (574) twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ + 486, /* (575) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ + 486, /* (576) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ + 486, /* (577) twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ + 419, /* (578) sliding_opt ::= */ + 419, /* (579) sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ + 485, /* (580) fill_opt ::= */ + 485, /* (581) fill_opt ::= FILL NK_LP fill_mode NK_RP */ + 485, /* (582) fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP */ + 485, /* (583) fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP */ + 492, /* (584) fill_mode ::= NONE */ + 492, /* (585) fill_mode ::= PREV */ + 492, /* (586) fill_mode ::= NULL */ + 492, /* (587) fill_mode ::= NULL_F */ + 492, /* (588) fill_mode ::= LINEAR */ + 492, /* (589) fill_mode ::= NEXT */ + 487, /* (590) group_by_clause_opt ::= */ + 487, /* (591) group_by_clause_opt ::= GROUP BY group_by_list */ + 493, /* (592) group_by_list ::= expr_or_subquery */ + 493, /* (593) group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ + 488, /* (594) having_clause_opt ::= */ + 488, /* (595) having_clause_opt ::= HAVING search_condition */ + 483, /* (596) range_opt ::= */ + 483, /* (597) range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ + 483, /* (598) range_opt ::= RANGE NK_LP expr_or_subquery NK_RP */ + 484, /* (599) every_opt ::= */ + 484, /* (600) every_opt ::= EVERY NK_LP duration_literal NK_RP */ + 494, /* (601) query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ + 495, /* (602) query_simple ::= query_specification */ + 495, /* (603) query_simple ::= union_query_expression */ + 499, /* (604) union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ + 499, /* (605) union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ + 500, /* (606) query_simple_or_subquery ::= query_simple */ + 500, /* (607) query_simple_or_subquery ::= subquery */ + 424, /* (608) query_or_subquery ::= query_expression */ + 424, /* (609) query_or_subquery ::= subquery */ + 496, /* (610) order_by_clause_opt ::= */ + 496, /* (611) order_by_clause_opt ::= ORDER BY sort_specification_list */ + 497, /* (612) slimit_clause_opt ::= */ + 497, /* (613) slimit_clause_opt ::= SLIMIT NK_INTEGER */ + 497, /* (614) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ + 497, /* (615) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + 498, /* (616) limit_clause_opt ::= */ + 498, /* (617) limit_clause_opt ::= LIMIT NK_INTEGER */ + 498, /* (618) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ + 498, /* (619) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + 474, /* (620) subquery ::= NK_LP query_expression NK_RP */ + 474, /* (621) subquery ::= NK_LP subquery NK_RP */ + 363, /* (622) search_condition ::= common_expression */ + 501, /* (623) sort_specification_list ::= sort_specification */ + 501, /* (624) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ + 502, /* (625) sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ + 503, /* (626) ordering_specification_opt ::= */ + 503, /* (627) ordering_specification_opt ::= ASC */ + 503, /* (628) ordering_specification_opt ::= DESC */ + 504, /* (629) null_ordering_opt ::= */ + 504, /* (630) null_ordering_opt ::= NULLS FIRST */ + 504, /* (631) null_ordering_opt ::= NULLS LAST */ }; /* For rule J, yyRuleInfoNRhs[J] contains the negative of the number @@ -3988,590 +3990,591 @@ static const signed char yyRuleInfoNRhs[] = { -3, /* (44) priv_type_list ::= priv_type_list NK_COMMA priv_type */ -1, /* (45) priv_type ::= READ */ -1, /* (46) priv_type ::= WRITE */ - -3, /* (47) priv_level ::= NK_STAR NK_DOT NK_STAR */ - -3, /* (48) priv_level ::= db_name NK_DOT NK_STAR */ - -3, /* (49) priv_level ::= db_name NK_DOT table_name */ - -1, /* (50) priv_level ::= topic_name */ - 0, /* (51) with_opt ::= */ - -2, /* (52) with_opt ::= WITH search_condition */ - -3, /* (53) cmd ::= CREATE DNODE dnode_endpoint */ - -5, /* (54) cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */ - -4, /* (55) cmd ::= DROP DNODE NK_INTEGER force_opt */ - -4, /* (56) cmd ::= DROP DNODE dnode_endpoint force_opt */ - -4, /* (57) cmd ::= DROP DNODE NK_INTEGER unsafe_opt */ - -4, /* (58) cmd ::= DROP DNODE dnode_endpoint unsafe_opt */ - -4, /* (59) cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ - -5, /* (60) cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */ - -4, /* (61) cmd ::= ALTER ALL DNODES NK_STRING */ - -5, /* (62) cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */ - -3, /* (63) cmd ::= RESTORE DNODE NK_INTEGER */ - -1, /* (64) dnode_endpoint ::= NK_STRING */ - -1, /* (65) dnode_endpoint ::= NK_ID */ - -1, /* (66) dnode_endpoint ::= NK_IPTOKEN */ - 0, /* (67) force_opt ::= */ - -1, /* (68) force_opt ::= FORCE */ - -1, /* (69) unsafe_opt ::= UNSAFE */ - -3, /* (70) cmd ::= ALTER LOCAL NK_STRING */ - -4, /* (71) cmd ::= ALTER LOCAL NK_STRING NK_STRING */ - -5, /* (72) cmd ::= CREATE QNODE ON DNODE NK_INTEGER */ - -5, /* (73) cmd ::= DROP QNODE ON DNODE NK_INTEGER */ - -5, /* (74) cmd ::= RESTORE QNODE ON DNODE NK_INTEGER */ - -5, /* (75) cmd ::= CREATE BNODE ON DNODE NK_INTEGER */ - -5, /* (76) cmd ::= DROP BNODE ON DNODE NK_INTEGER */ - -5, /* (77) cmd ::= CREATE SNODE ON DNODE NK_INTEGER */ - -5, /* (78) cmd ::= DROP SNODE ON DNODE NK_INTEGER */ - -5, /* (79) cmd ::= CREATE MNODE ON DNODE NK_INTEGER */ - -5, /* (80) cmd ::= DROP MNODE ON DNODE NK_INTEGER */ - -5, /* (81) cmd ::= RESTORE MNODE ON DNODE NK_INTEGER */ - -5, /* (82) cmd ::= RESTORE VNODE ON DNODE NK_INTEGER */ - -5, /* (83) cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ - -4, /* (84) cmd ::= DROP DATABASE exists_opt db_name */ - -2, /* (85) cmd ::= USE db_name */ - -4, /* (86) cmd ::= ALTER DATABASE db_name alter_db_options */ - -3, /* (87) cmd ::= FLUSH DATABASE db_name */ - -4, /* (88) cmd ::= TRIM DATABASE db_name speed_opt */ - -5, /* (89) cmd ::= COMPACT DATABASE db_name start_opt end_opt */ - -3, /* (90) not_exists_opt ::= IF NOT EXISTS */ - 0, /* (91) not_exists_opt ::= */ - -2, /* (92) exists_opt ::= IF EXISTS */ - 0, /* (93) exists_opt ::= */ - 0, /* (94) db_options ::= */ - -3, /* (95) db_options ::= db_options BUFFER NK_INTEGER */ - -3, /* (96) db_options ::= db_options CACHEMODEL NK_STRING */ - -3, /* (97) db_options ::= db_options CACHESIZE NK_INTEGER */ - -3, /* (98) db_options ::= db_options COMP NK_INTEGER */ - -3, /* (99) db_options ::= db_options DURATION NK_INTEGER */ - -3, /* (100) db_options ::= db_options DURATION NK_VARIABLE */ - -3, /* (101) db_options ::= db_options MAXROWS NK_INTEGER */ - -3, /* (102) db_options ::= db_options MINROWS NK_INTEGER */ - -3, /* (103) db_options ::= db_options KEEP integer_list */ - -3, /* (104) db_options ::= db_options KEEP variable_list */ - -3, /* (105) db_options ::= db_options PAGES NK_INTEGER */ - -3, /* (106) db_options ::= db_options PAGESIZE NK_INTEGER */ - -3, /* (107) db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */ - -3, /* (108) db_options ::= db_options PRECISION NK_STRING */ - -3, /* (109) db_options ::= db_options REPLICA NK_INTEGER */ - -3, /* (110) db_options ::= db_options VGROUPS NK_INTEGER */ - -3, /* (111) db_options ::= db_options SINGLE_STABLE NK_INTEGER */ - -3, /* (112) db_options ::= db_options RETENTIONS retention_list */ - -3, /* (113) db_options ::= db_options SCHEMALESS NK_INTEGER */ - -3, /* (114) db_options ::= db_options WAL_LEVEL NK_INTEGER */ - -3, /* (115) db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */ - -3, /* (116) db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */ - -4, /* (117) db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ - -3, /* (118) db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */ - -4, /* (119) db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ - -3, /* (120) db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */ - -3, /* (121) db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */ - -3, /* (122) db_options ::= db_options STT_TRIGGER NK_INTEGER */ - -3, /* (123) db_options ::= db_options TABLE_PREFIX signed */ - -3, /* (124) db_options ::= db_options TABLE_SUFFIX signed */ - -3, /* (125) db_options ::= db_options KEEP_TIME_OFFSET NK_INTEGER */ - -1, /* (126) alter_db_options ::= alter_db_option */ - -2, /* (127) alter_db_options ::= alter_db_options alter_db_option */ - -2, /* (128) alter_db_option ::= BUFFER NK_INTEGER */ - -2, /* (129) alter_db_option ::= CACHEMODEL NK_STRING */ - -2, /* (130) alter_db_option ::= CACHESIZE NK_INTEGER */ - -2, /* (131) alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */ - -2, /* (132) alter_db_option ::= KEEP integer_list */ - -2, /* (133) alter_db_option ::= KEEP variable_list */ - -2, /* (134) alter_db_option ::= PAGES NK_INTEGER */ - -2, /* (135) alter_db_option ::= REPLICA NK_INTEGER */ - -2, /* (136) alter_db_option ::= WAL_LEVEL NK_INTEGER */ - -2, /* (137) alter_db_option ::= STT_TRIGGER NK_INTEGER */ - -2, /* (138) alter_db_option ::= MINROWS NK_INTEGER */ - -2, /* (139) alter_db_option ::= WAL_RETENTION_PERIOD NK_INTEGER */ - -3, /* (140) alter_db_option ::= WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ - -2, /* (141) alter_db_option ::= WAL_RETENTION_SIZE NK_INTEGER */ - -3, /* (142) alter_db_option ::= WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ - -2, /* (143) alter_db_option ::= KEEP_TIME_OFFSET NK_INTEGER */ - -1, /* (144) integer_list ::= NK_INTEGER */ - -3, /* (145) integer_list ::= integer_list NK_COMMA NK_INTEGER */ - -1, /* (146) variable_list ::= NK_VARIABLE */ - -3, /* (147) variable_list ::= variable_list NK_COMMA NK_VARIABLE */ - -1, /* (148) retention_list ::= retention */ - -3, /* (149) retention_list ::= retention_list NK_COMMA retention */ - -3, /* (150) retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ - 0, /* (151) speed_opt ::= */ - -2, /* (152) speed_opt ::= BWLIMIT NK_INTEGER */ - 0, /* (153) start_opt ::= */ - -3, /* (154) start_opt ::= START WITH NK_INTEGER */ - -3, /* (155) start_opt ::= START WITH NK_STRING */ - -4, /* (156) start_opt ::= START WITH TIMESTAMP NK_STRING */ - 0, /* (157) end_opt ::= */ - -3, /* (158) end_opt ::= END WITH NK_INTEGER */ - -3, /* (159) end_opt ::= END WITH NK_STRING */ - -4, /* (160) end_opt ::= END WITH TIMESTAMP NK_STRING */ - -9, /* (161) cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ - -3, /* (162) cmd ::= CREATE TABLE multi_create_clause */ - -9, /* (163) cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ - -3, /* (164) cmd ::= DROP TABLE multi_drop_clause */ - -4, /* (165) cmd ::= DROP STABLE exists_opt full_table_name */ - -3, /* (166) cmd ::= ALTER TABLE alter_table_clause */ - -3, /* (167) cmd ::= ALTER STABLE alter_table_clause */ - -2, /* (168) alter_table_clause ::= full_table_name alter_table_options */ - -5, /* (169) alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ - -4, /* (170) alter_table_clause ::= full_table_name DROP COLUMN column_name */ - -5, /* (171) alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ - -5, /* (172) alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ - -5, /* (173) alter_table_clause ::= full_table_name ADD TAG column_name type_name */ - -4, /* (174) alter_table_clause ::= full_table_name DROP TAG column_name */ - -5, /* (175) alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ - -5, /* (176) alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ - -6, /* (177) alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */ - -1, /* (178) multi_create_clause ::= create_subtable_clause */ - -2, /* (179) multi_create_clause ::= multi_create_clause create_subtable_clause */ - -10, /* (180) 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 */ - -1, /* (181) multi_drop_clause ::= drop_table_clause */ - -3, /* (182) multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause */ - -2, /* (183) drop_table_clause ::= exists_opt full_table_name */ - 0, /* (184) specific_cols_opt ::= */ - -3, /* (185) specific_cols_opt ::= NK_LP col_name_list NK_RP */ - -1, /* (186) full_table_name ::= table_name */ - -3, /* (187) full_table_name ::= db_name NK_DOT table_name */ - -1, /* (188) column_def_list ::= column_def */ - -3, /* (189) column_def_list ::= column_def_list NK_COMMA column_def */ - -2, /* (190) column_def ::= column_name type_name */ - -1, /* (191) type_name ::= BOOL */ - -1, /* (192) type_name ::= TINYINT */ - -1, /* (193) type_name ::= SMALLINT */ - -1, /* (194) type_name ::= INT */ - -1, /* (195) type_name ::= INTEGER */ - -1, /* (196) type_name ::= BIGINT */ - -1, /* (197) type_name ::= FLOAT */ - -1, /* (198) type_name ::= DOUBLE */ - -4, /* (199) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ - -1, /* (200) type_name ::= TIMESTAMP */ - -4, /* (201) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ - -2, /* (202) type_name ::= TINYINT UNSIGNED */ - -2, /* (203) type_name ::= SMALLINT UNSIGNED */ - -2, /* (204) type_name ::= INT UNSIGNED */ - -2, /* (205) type_name ::= BIGINT UNSIGNED */ - -1, /* (206) type_name ::= JSON */ - -4, /* (207) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ - -1, /* (208) type_name ::= MEDIUMBLOB */ - -1, /* (209) type_name ::= BLOB */ - -4, /* (210) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ - -4, /* (211) type_name ::= GEOMETRY NK_LP NK_INTEGER NK_RP */ - -1, /* (212) type_name ::= DECIMAL */ - -4, /* (213) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ - -6, /* (214) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ - 0, /* (215) tags_def_opt ::= */ - -1, /* (216) tags_def_opt ::= tags_def */ - -4, /* (217) tags_def ::= TAGS NK_LP column_def_list NK_RP */ - 0, /* (218) table_options ::= */ - -3, /* (219) table_options ::= table_options COMMENT NK_STRING */ - -3, /* (220) table_options ::= table_options MAX_DELAY duration_list */ - -3, /* (221) table_options ::= table_options WATERMARK duration_list */ - -5, /* (222) table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ - -3, /* (223) table_options ::= table_options TTL NK_INTEGER */ - -5, /* (224) table_options ::= table_options SMA NK_LP col_name_list NK_RP */ - -3, /* (225) table_options ::= table_options DELETE_MARK duration_list */ - -1, /* (226) alter_table_options ::= alter_table_option */ - -2, /* (227) alter_table_options ::= alter_table_options alter_table_option */ - -2, /* (228) alter_table_option ::= COMMENT NK_STRING */ - -2, /* (229) alter_table_option ::= TTL NK_INTEGER */ - -1, /* (230) duration_list ::= duration_literal */ - -3, /* (231) duration_list ::= duration_list NK_COMMA duration_literal */ - -1, /* (232) rollup_func_list ::= rollup_func_name */ - -3, /* (233) rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ - -1, /* (234) rollup_func_name ::= function_name */ - -1, /* (235) rollup_func_name ::= FIRST */ - -1, /* (236) rollup_func_name ::= LAST */ - -1, /* (237) col_name_list ::= col_name */ - -3, /* (238) col_name_list ::= col_name_list NK_COMMA col_name */ - -1, /* (239) col_name ::= column_name */ - -2, /* (240) cmd ::= SHOW DNODES */ - -2, /* (241) cmd ::= SHOW USERS */ - -3, /* (242) cmd ::= SHOW USER PRIVILEGES */ - -3, /* (243) cmd ::= SHOW db_kind_opt DATABASES */ - -4, /* (244) cmd ::= SHOW table_kind_db_name_cond_opt TABLES like_pattern_opt */ - -4, /* (245) cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ - -3, /* (246) cmd ::= SHOW db_name_cond_opt VGROUPS */ - -2, /* (247) cmd ::= SHOW MNODES */ - -2, /* (248) cmd ::= SHOW QNODES */ - -2, /* (249) cmd ::= SHOW FUNCTIONS */ - -5, /* (250) cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ - -6, /* (251) cmd ::= SHOW INDEXES FROM db_name NK_DOT table_name */ - -2, /* (252) cmd ::= SHOW STREAMS */ - -2, /* (253) cmd ::= SHOW ACCOUNTS */ - -2, /* (254) cmd ::= SHOW APPS */ - -2, /* (255) cmd ::= SHOW CONNECTIONS */ - -2, /* (256) cmd ::= SHOW LICENCES */ - -2, /* (257) cmd ::= SHOW GRANTS */ - -4, /* (258) cmd ::= SHOW CREATE DATABASE db_name */ - -4, /* (259) cmd ::= SHOW CREATE TABLE full_table_name */ - -4, /* (260) cmd ::= SHOW CREATE STABLE full_table_name */ - -2, /* (261) cmd ::= SHOW QUERIES */ - -2, /* (262) cmd ::= SHOW SCORES */ - -2, /* (263) cmd ::= SHOW TOPICS */ - -2, /* (264) cmd ::= SHOW VARIABLES */ - -3, /* (265) cmd ::= SHOW CLUSTER VARIABLES */ - -3, /* (266) cmd ::= SHOW LOCAL VARIABLES */ - -5, /* (267) cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */ - -2, /* (268) cmd ::= SHOW BNODES */ - -2, /* (269) cmd ::= SHOW SNODES */ - -2, /* (270) cmd ::= SHOW CLUSTER */ - -2, /* (271) cmd ::= SHOW TRANSACTIONS */ - -4, /* (272) cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ - -2, /* (273) cmd ::= SHOW CONSUMERS */ - -2, /* (274) cmd ::= SHOW SUBSCRIPTIONS */ - -5, /* (275) cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ - -6, /* (276) cmd ::= SHOW TAGS FROM db_name NK_DOT table_name */ - -7, /* (277) cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ - -8, /* (278) cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name */ - -5, /* (279) cmd ::= SHOW VNODES ON DNODE NK_INTEGER */ - -2, /* (280) cmd ::= SHOW VNODES */ - -3, /* (281) cmd ::= SHOW db_name_cond_opt ALIVE */ - -3, /* (282) cmd ::= SHOW CLUSTER ALIVE */ - -3, /* (283) cmd ::= SHOW db_name_cond_opt VIEWS */ - -4, /* (284) cmd ::= SHOW CREATE VIEW full_table_name */ - 0, /* (285) table_kind_db_name_cond_opt ::= */ - -1, /* (286) table_kind_db_name_cond_opt ::= table_kind */ - -2, /* (287) table_kind_db_name_cond_opt ::= db_name NK_DOT */ - -3, /* (288) table_kind_db_name_cond_opt ::= table_kind db_name NK_DOT */ - -1, /* (289) table_kind ::= NORMAL */ - -1, /* (290) table_kind ::= CHILD */ - 0, /* (291) db_name_cond_opt ::= */ - -2, /* (292) db_name_cond_opt ::= db_name NK_DOT */ - 0, /* (293) like_pattern_opt ::= */ - -2, /* (294) like_pattern_opt ::= LIKE NK_STRING */ - -1, /* (295) table_name_cond ::= table_name */ - 0, /* (296) from_db_opt ::= */ - -2, /* (297) from_db_opt ::= FROM db_name */ - 0, /* (298) tag_list_opt ::= */ - -1, /* (299) tag_list_opt ::= tag_item */ - -3, /* (300) tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ - -1, /* (301) tag_item ::= TBNAME */ - -1, /* (302) tag_item ::= QTAGS */ - -1, /* (303) tag_item ::= column_name */ - -2, /* (304) tag_item ::= column_name column_alias */ - -3, /* (305) tag_item ::= column_name AS column_alias */ - 0, /* (306) db_kind_opt ::= */ - -1, /* (307) db_kind_opt ::= USER */ - -1, /* (308) db_kind_opt ::= SYSTEM */ - -8, /* (309) cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options */ - -9, /* (310) cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP */ - -4, /* (311) cmd ::= DROP INDEX exists_opt full_index_name */ - -1, /* (312) full_index_name ::= index_name */ - -3, /* (313) full_index_name ::= db_name NK_DOT index_name */ - -10, /* (314) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ - -12, /* (315) 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 */ - -1, /* (316) func_list ::= func */ - -3, /* (317) func_list ::= func_list NK_COMMA func */ - -4, /* (318) func ::= sma_func_name NK_LP expression_list NK_RP */ - -1, /* (319) sma_func_name ::= function_name */ - -1, /* (320) sma_func_name ::= COUNT */ - -1, /* (321) sma_func_name ::= FIRST */ - -1, /* (322) sma_func_name ::= LAST */ - -1, /* (323) sma_func_name ::= LAST_ROW */ - 0, /* (324) sma_stream_opt ::= */ - -3, /* (325) sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ - -3, /* (326) sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ - -3, /* (327) sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ - -1, /* (328) with_meta ::= AS */ - -3, /* (329) with_meta ::= WITH META AS */ - -3, /* (330) with_meta ::= ONLY META AS */ - -6, /* (331) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ - -7, /* (332) cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name */ - -8, /* (333) cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt */ - -4, /* (334) cmd ::= DROP TOPIC exists_opt topic_name */ - -7, /* (335) cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ - -2, /* (336) cmd ::= DESC full_table_name */ - -2, /* (337) cmd ::= DESCRIBE full_table_name */ - -3, /* (338) cmd ::= RESET QUERY CACHE */ - -4, /* (339) cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ - -4, /* (340) cmd ::= EXPLAIN analyze_opt explain_options insert_query */ - 0, /* (341) analyze_opt ::= */ - -1, /* (342) analyze_opt ::= ANALYZE */ - 0, /* (343) explain_options ::= */ - -3, /* (344) explain_options ::= explain_options VERBOSE NK_BOOL */ - -3, /* (345) explain_options ::= explain_options RATIO NK_FLOAT */ - -12, /* (346) cmd ::= CREATE or_replace_opt agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt language_opt */ - -4, /* (347) cmd ::= DROP FUNCTION exists_opt function_name */ - 0, /* (348) agg_func_opt ::= */ - -1, /* (349) agg_func_opt ::= AGGREGATE */ - 0, /* (350) bufsize_opt ::= */ - -2, /* (351) bufsize_opt ::= BUFSIZE NK_INTEGER */ - 0, /* (352) language_opt ::= */ - -2, /* (353) language_opt ::= LANGUAGE NK_STRING */ - 0, /* (354) or_replace_opt ::= */ - -2, /* (355) or_replace_opt ::= OR REPLACE */ - -6, /* (356) cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery */ - -4, /* (357) cmd ::= DROP VIEW exists_opt full_view_name */ - -1, /* (358) full_view_name ::= view_name */ - -3, /* (359) full_view_name ::= db_name NK_DOT view_name */ - -12, /* (360) cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name col_list_opt tag_def_or_ref_opt subtable_opt AS query_or_subquery */ - -4, /* (361) cmd ::= DROP STREAM exists_opt stream_name */ - -4, /* (362) cmd ::= PAUSE STREAM exists_opt stream_name */ - -5, /* (363) cmd ::= RESUME STREAM exists_opt ignore_opt stream_name */ - 0, /* (364) col_list_opt ::= */ - -3, /* (365) col_list_opt ::= NK_LP col_name_list NK_RP */ - 0, /* (366) tag_def_or_ref_opt ::= */ - -1, /* (367) tag_def_or_ref_opt ::= tags_def */ - -4, /* (368) tag_def_or_ref_opt ::= TAGS NK_LP col_name_list NK_RP */ - 0, /* (369) stream_options ::= */ - -3, /* (370) stream_options ::= stream_options TRIGGER AT_ONCE */ - -3, /* (371) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ - -4, /* (372) stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ - -3, /* (373) stream_options ::= stream_options WATERMARK duration_literal */ - -4, /* (374) stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ - -3, /* (375) stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ - -3, /* (376) stream_options ::= stream_options DELETE_MARK duration_literal */ - -4, /* (377) stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */ - 0, /* (378) subtable_opt ::= */ - -4, /* (379) subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ - 0, /* (380) ignore_opt ::= */ - -2, /* (381) ignore_opt ::= IGNORE UNTREATED */ - -3, /* (382) cmd ::= KILL CONNECTION NK_INTEGER */ - -3, /* (383) cmd ::= KILL QUERY NK_STRING */ - -3, /* (384) cmd ::= KILL TRANSACTION NK_INTEGER */ - -2, /* (385) cmd ::= BALANCE VGROUP */ - -4, /* (386) cmd ::= BALANCE VGROUP LEADER on_vgroup_id */ - -4, /* (387) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ - -4, /* (388) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ - -3, /* (389) cmd ::= SPLIT VGROUP NK_INTEGER */ - 0, /* (390) on_vgroup_id ::= */ - -2, /* (391) on_vgroup_id ::= ON NK_INTEGER */ - -2, /* (392) dnode_list ::= DNODE NK_INTEGER */ - -3, /* (393) dnode_list ::= dnode_list DNODE NK_INTEGER */ - -4, /* (394) cmd ::= DELETE FROM full_table_name where_clause_opt */ - -1, /* (395) cmd ::= query_or_subquery */ - -1, /* (396) cmd ::= insert_query */ - -7, /* (397) insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ - -4, /* (398) insert_query ::= INSERT INTO full_table_name query_or_subquery */ - -1, /* (399) literal ::= NK_INTEGER */ - -1, /* (400) literal ::= NK_FLOAT */ - -1, /* (401) literal ::= NK_STRING */ - -1, /* (402) literal ::= NK_BOOL */ - -2, /* (403) literal ::= TIMESTAMP NK_STRING */ - -1, /* (404) literal ::= duration_literal */ - -1, /* (405) literal ::= NULL */ - -1, /* (406) literal ::= NK_QUESTION */ - -1, /* (407) duration_literal ::= NK_VARIABLE */ - -1, /* (408) signed ::= NK_INTEGER */ - -2, /* (409) signed ::= NK_PLUS NK_INTEGER */ - -2, /* (410) signed ::= NK_MINUS NK_INTEGER */ - -1, /* (411) signed ::= NK_FLOAT */ - -2, /* (412) signed ::= NK_PLUS NK_FLOAT */ - -2, /* (413) signed ::= NK_MINUS NK_FLOAT */ - -1, /* (414) signed_literal ::= signed */ - -1, /* (415) signed_literal ::= NK_STRING */ - -1, /* (416) signed_literal ::= NK_BOOL */ - -2, /* (417) signed_literal ::= TIMESTAMP NK_STRING */ - -1, /* (418) signed_literal ::= duration_literal */ - -1, /* (419) signed_literal ::= NULL */ - -1, /* (420) signed_literal ::= literal_func */ - -1, /* (421) signed_literal ::= NK_QUESTION */ - -1, /* (422) literal_list ::= signed_literal */ - -3, /* (423) literal_list ::= literal_list NK_COMMA signed_literal */ - -1, /* (424) db_name ::= NK_ID */ - -1, /* (425) table_name ::= NK_ID */ - -1, /* (426) column_name ::= NK_ID */ - -1, /* (427) function_name ::= NK_ID */ - -1, /* (428) view_name ::= NK_ID */ - -1, /* (429) table_alias ::= NK_ID */ - -1, /* (430) column_alias ::= NK_ID */ - -1, /* (431) user_name ::= NK_ID */ - -1, /* (432) topic_name ::= NK_ID */ - -1, /* (433) stream_name ::= NK_ID */ - -1, /* (434) cgroup_name ::= NK_ID */ - -1, /* (435) index_name ::= NK_ID */ - -1, /* (436) expr_or_subquery ::= expression */ - -1, /* (437) expression ::= literal */ - -1, /* (438) expression ::= pseudo_column */ - -1, /* (439) expression ::= column_reference */ - -1, /* (440) expression ::= function_expression */ - -1, /* (441) expression ::= case_when_expression */ - -3, /* (442) expression ::= NK_LP expression NK_RP */ - -2, /* (443) expression ::= NK_PLUS expr_or_subquery */ - -2, /* (444) expression ::= NK_MINUS expr_or_subquery */ - -3, /* (445) expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ - -3, /* (446) expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ - -3, /* (447) expression ::= expr_or_subquery NK_STAR expr_or_subquery */ - -3, /* (448) expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ - -3, /* (449) expression ::= expr_or_subquery NK_REM expr_or_subquery */ - -3, /* (450) expression ::= column_reference NK_ARROW NK_STRING */ - -3, /* (451) expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ - -3, /* (452) expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ - -1, /* (453) expression_list ::= expr_or_subquery */ - -3, /* (454) expression_list ::= expression_list NK_COMMA expr_or_subquery */ - -1, /* (455) column_reference ::= column_name */ - -3, /* (456) column_reference ::= table_name NK_DOT column_name */ - -1, /* (457) pseudo_column ::= ROWTS */ - -1, /* (458) pseudo_column ::= TBNAME */ - -3, /* (459) pseudo_column ::= table_name NK_DOT TBNAME */ - -1, /* (460) pseudo_column ::= QSTART */ - -1, /* (461) pseudo_column ::= QEND */ - -1, /* (462) pseudo_column ::= QDURATION */ - -1, /* (463) pseudo_column ::= WSTART */ - -1, /* (464) pseudo_column ::= WEND */ - -1, /* (465) pseudo_column ::= WDURATION */ - -1, /* (466) pseudo_column ::= IROWTS */ - -1, /* (467) pseudo_column ::= ISFILLED */ - -1, /* (468) pseudo_column ::= QTAGS */ - -4, /* (469) function_expression ::= function_name NK_LP expression_list NK_RP */ - -4, /* (470) function_expression ::= star_func NK_LP star_func_para_list NK_RP */ - -6, /* (471) function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ - -1, /* (472) function_expression ::= literal_func */ - -3, /* (473) literal_func ::= noarg_func NK_LP NK_RP */ - -1, /* (474) literal_func ::= NOW */ - -1, /* (475) noarg_func ::= NOW */ - -1, /* (476) noarg_func ::= TODAY */ - -1, /* (477) noarg_func ::= TIMEZONE */ - -1, /* (478) noarg_func ::= DATABASE */ - -1, /* (479) noarg_func ::= CLIENT_VERSION */ - -1, /* (480) noarg_func ::= SERVER_VERSION */ - -1, /* (481) noarg_func ::= SERVER_STATUS */ - -1, /* (482) noarg_func ::= CURRENT_USER */ - -1, /* (483) noarg_func ::= USER */ - -1, /* (484) star_func ::= COUNT */ - -1, /* (485) star_func ::= FIRST */ - -1, /* (486) star_func ::= LAST */ - -1, /* (487) star_func ::= LAST_ROW */ - -1, /* (488) star_func_para_list ::= NK_STAR */ - -1, /* (489) star_func_para_list ::= other_para_list */ - -1, /* (490) other_para_list ::= star_func_para */ - -3, /* (491) other_para_list ::= other_para_list NK_COMMA star_func_para */ - -1, /* (492) star_func_para ::= expr_or_subquery */ - -3, /* (493) star_func_para ::= table_name NK_DOT NK_STAR */ - -4, /* (494) case_when_expression ::= CASE when_then_list case_when_else_opt END */ - -5, /* (495) case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ - -1, /* (496) when_then_list ::= when_then_expr */ - -2, /* (497) when_then_list ::= when_then_list when_then_expr */ - -4, /* (498) when_then_expr ::= WHEN common_expression THEN common_expression */ - 0, /* (499) case_when_else_opt ::= */ - -2, /* (500) case_when_else_opt ::= ELSE common_expression */ - -3, /* (501) predicate ::= expr_or_subquery compare_op expr_or_subquery */ - -5, /* (502) predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ - -6, /* (503) predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ - -3, /* (504) predicate ::= expr_or_subquery IS NULL */ - -4, /* (505) predicate ::= expr_or_subquery IS NOT NULL */ - -3, /* (506) predicate ::= expr_or_subquery in_op in_predicate_value */ - -1, /* (507) compare_op ::= NK_LT */ - -1, /* (508) compare_op ::= NK_GT */ - -1, /* (509) compare_op ::= NK_LE */ - -1, /* (510) compare_op ::= NK_GE */ - -1, /* (511) compare_op ::= NK_NE */ - -1, /* (512) compare_op ::= NK_EQ */ - -1, /* (513) compare_op ::= LIKE */ - -2, /* (514) compare_op ::= NOT LIKE */ - -1, /* (515) compare_op ::= MATCH */ - -1, /* (516) compare_op ::= NMATCH */ - -1, /* (517) compare_op ::= CONTAINS */ - -1, /* (518) in_op ::= IN */ - -2, /* (519) in_op ::= NOT IN */ - -3, /* (520) in_predicate_value ::= NK_LP literal_list NK_RP */ - -1, /* (521) boolean_value_expression ::= boolean_primary */ - -2, /* (522) boolean_value_expression ::= NOT boolean_primary */ - -3, /* (523) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ - -3, /* (524) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ - -1, /* (525) boolean_primary ::= predicate */ - -3, /* (526) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ - -1, /* (527) common_expression ::= expr_or_subquery */ - -1, /* (528) common_expression ::= boolean_value_expression */ - 0, /* (529) from_clause_opt ::= */ - -2, /* (530) from_clause_opt ::= FROM table_reference_list */ - -1, /* (531) table_reference_list ::= table_reference */ - -3, /* (532) table_reference_list ::= table_reference_list NK_COMMA table_reference */ - -1, /* (533) table_reference ::= table_primary */ - -1, /* (534) table_reference ::= joined_table */ - -2, /* (535) table_primary ::= table_name alias_opt */ - -4, /* (536) table_primary ::= db_name NK_DOT table_name alias_opt */ - -2, /* (537) table_primary ::= subquery alias_opt */ - -1, /* (538) table_primary ::= parenthesized_joined_table */ - 0, /* (539) alias_opt ::= */ - -1, /* (540) alias_opt ::= table_alias */ - -2, /* (541) alias_opt ::= AS table_alias */ - -3, /* (542) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ - -3, /* (543) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ - -6, /* (544) joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ - 0, /* (545) join_type ::= */ - -1, /* (546) join_type ::= INNER */ - -14, /* (547) query_specification ::= SELECT hint_list set_quantifier_opt tag_mode_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 */ - 0, /* (548) hint_list ::= */ - -1, /* (549) hint_list ::= NK_HINT */ - 0, /* (550) tag_mode_opt ::= */ - -1, /* (551) tag_mode_opt ::= TAGS */ - 0, /* (552) set_quantifier_opt ::= */ - -1, /* (553) set_quantifier_opt ::= DISTINCT */ - -1, /* (554) set_quantifier_opt ::= ALL */ - -1, /* (555) select_list ::= select_item */ - -3, /* (556) select_list ::= select_list NK_COMMA select_item */ - -1, /* (557) select_item ::= NK_STAR */ - -1, /* (558) select_item ::= common_expression */ - -2, /* (559) select_item ::= common_expression column_alias */ - -3, /* (560) select_item ::= common_expression AS column_alias */ - -3, /* (561) select_item ::= table_name NK_DOT NK_STAR */ - 0, /* (562) where_clause_opt ::= */ - -2, /* (563) where_clause_opt ::= WHERE search_condition */ - 0, /* (564) partition_by_clause_opt ::= */ - -3, /* (565) partition_by_clause_opt ::= PARTITION BY partition_list */ - -1, /* (566) partition_list ::= partition_item */ - -3, /* (567) partition_list ::= partition_list NK_COMMA partition_item */ - -1, /* (568) partition_item ::= expr_or_subquery */ - -2, /* (569) partition_item ::= expr_or_subquery column_alias */ - -3, /* (570) partition_item ::= expr_or_subquery AS column_alias */ - 0, /* (571) twindow_clause_opt ::= */ - -6, /* (572) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ - -4, /* (573) twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ - -6, /* (574) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ - -8, /* (575) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ - -7, /* (576) twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ - 0, /* (577) sliding_opt ::= */ - -4, /* (578) sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ - 0, /* (579) fill_opt ::= */ - -4, /* (580) fill_opt ::= FILL NK_LP fill_mode NK_RP */ - -6, /* (581) fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP */ - -6, /* (582) fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP */ - -1, /* (583) fill_mode ::= NONE */ - -1, /* (584) fill_mode ::= PREV */ - -1, /* (585) fill_mode ::= NULL */ - -1, /* (586) fill_mode ::= NULL_F */ - -1, /* (587) fill_mode ::= LINEAR */ - -1, /* (588) fill_mode ::= NEXT */ - 0, /* (589) group_by_clause_opt ::= */ - -3, /* (590) group_by_clause_opt ::= GROUP BY group_by_list */ - -1, /* (591) group_by_list ::= expr_or_subquery */ - -3, /* (592) group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ - 0, /* (593) having_clause_opt ::= */ - -2, /* (594) having_clause_opt ::= HAVING search_condition */ - 0, /* (595) range_opt ::= */ - -6, /* (596) range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ - -4, /* (597) range_opt ::= RANGE NK_LP expr_or_subquery NK_RP */ - 0, /* (598) every_opt ::= */ - -4, /* (599) every_opt ::= EVERY NK_LP duration_literal NK_RP */ - -4, /* (600) query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ - -1, /* (601) query_simple ::= query_specification */ - -1, /* (602) query_simple ::= union_query_expression */ - -4, /* (603) union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ - -3, /* (604) union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ - -1, /* (605) query_simple_or_subquery ::= query_simple */ - -1, /* (606) query_simple_or_subquery ::= subquery */ - -1, /* (607) query_or_subquery ::= query_expression */ - -1, /* (608) query_or_subquery ::= subquery */ - 0, /* (609) order_by_clause_opt ::= */ - -3, /* (610) order_by_clause_opt ::= ORDER BY sort_specification_list */ - 0, /* (611) slimit_clause_opt ::= */ - -2, /* (612) slimit_clause_opt ::= SLIMIT NK_INTEGER */ - -4, /* (613) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ - -4, /* (614) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - 0, /* (615) limit_clause_opt ::= */ - -2, /* (616) limit_clause_opt ::= LIMIT NK_INTEGER */ - -4, /* (617) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ - -4, /* (618) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - -3, /* (619) subquery ::= NK_LP query_expression NK_RP */ - -3, /* (620) subquery ::= NK_LP subquery NK_RP */ - -1, /* (621) search_condition ::= common_expression */ - -1, /* (622) sort_specification_list ::= sort_specification */ - -3, /* (623) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ - -3, /* (624) sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ - 0, /* (625) ordering_specification_opt ::= */ - -1, /* (626) ordering_specification_opt ::= ASC */ - -1, /* (627) ordering_specification_opt ::= DESC */ - 0, /* (628) null_ordering_opt ::= */ - -2, /* (629) null_ordering_opt ::= NULLS FIRST */ - -2, /* (630) null_ordering_opt ::= NULLS LAST */ + -1, /* (47) priv_type ::= ALTER */ + -3, /* (48) priv_level ::= NK_STAR NK_DOT NK_STAR */ + -3, /* (49) priv_level ::= db_name NK_DOT NK_STAR */ + -3, /* (50) priv_level ::= db_name NK_DOT table_name */ + -1, /* (51) priv_level ::= topic_name */ + 0, /* (52) with_opt ::= */ + -2, /* (53) with_opt ::= WITH search_condition */ + -3, /* (54) cmd ::= CREATE DNODE dnode_endpoint */ + -5, /* (55) cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */ + -4, /* (56) cmd ::= DROP DNODE NK_INTEGER force_opt */ + -4, /* (57) cmd ::= DROP DNODE dnode_endpoint force_opt */ + -4, /* (58) cmd ::= DROP DNODE NK_INTEGER unsafe_opt */ + -4, /* (59) cmd ::= DROP DNODE dnode_endpoint unsafe_opt */ + -4, /* (60) cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ + -5, /* (61) cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */ + -4, /* (62) cmd ::= ALTER ALL DNODES NK_STRING */ + -5, /* (63) cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */ + -3, /* (64) cmd ::= RESTORE DNODE NK_INTEGER */ + -1, /* (65) dnode_endpoint ::= NK_STRING */ + -1, /* (66) dnode_endpoint ::= NK_ID */ + -1, /* (67) dnode_endpoint ::= NK_IPTOKEN */ + 0, /* (68) force_opt ::= */ + -1, /* (69) force_opt ::= FORCE */ + -1, /* (70) unsafe_opt ::= UNSAFE */ + -3, /* (71) cmd ::= ALTER LOCAL NK_STRING */ + -4, /* (72) cmd ::= ALTER LOCAL NK_STRING NK_STRING */ + -5, /* (73) cmd ::= CREATE QNODE ON DNODE NK_INTEGER */ + -5, /* (74) cmd ::= DROP QNODE ON DNODE NK_INTEGER */ + -5, /* (75) cmd ::= RESTORE QNODE ON DNODE NK_INTEGER */ + -5, /* (76) cmd ::= CREATE BNODE ON DNODE NK_INTEGER */ + -5, /* (77) cmd ::= DROP BNODE ON DNODE NK_INTEGER */ + -5, /* (78) cmd ::= CREATE SNODE ON DNODE NK_INTEGER */ + -5, /* (79) cmd ::= DROP SNODE ON DNODE NK_INTEGER */ + -5, /* (80) cmd ::= CREATE MNODE ON DNODE NK_INTEGER */ + -5, /* (81) cmd ::= DROP MNODE ON DNODE NK_INTEGER */ + -5, /* (82) cmd ::= RESTORE MNODE ON DNODE NK_INTEGER */ + -5, /* (83) cmd ::= RESTORE VNODE ON DNODE NK_INTEGER */ + -5, /* (84) cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ + -4, /* (85) cmd ::= DROP DATABASE exists_opt db_name */ + -2, /* (86) cmd ::= USE db_name */ + -4, /* (87) cmd ::= ALTER DATABASE db_name alter_db_options */ + -3, /* (88) cmd ::= FLUSH DATABASE db_name */ + -4, /* (89) cmd ::= TRIM DATABASE db_name speed_opt */ + -5, /* (90) cmd ::= COMPACT DATABASE db_name start_opt end_opt */ + -3, /* (91) not_exists_opt ::= IF NOT EXISTS */ + 0, /* (92) not_exists_opt ::= */ + -2, /* (93) exists_opt ::= IF EXISTS */ + 0, /* (94) exists_opt ::= */ + 0, /* (95) db_options ::= */ + -3, /* (96) db_options ::= db_options BUFFER NK_INTEGER */ + -3, /* (97) db_options ::= db_options CACHEMODEL NK_STRING */ + -3, /* (98) db_options ::= db_options CACHESIZE NK_INTEGER */ + -3, /* (99) db_options ::= db_options COMP NK_INTEGER */ + -3, /* (100) db_options ::= db_options DURATION NK_INTEGER */ + -3, /* (101) db_options ::= db_options DURATION NK_VARIABLE */ + -3, /* (102) db_options ::= db_options MAXROWS NK_INTEGER */ + -3, /* (103) db_options ::= db_options MINROWS NK_INTEGER */ + -3, /* (104) db_options ::= db_options KEEP integer_list */ + -3, /* (105) db_options ::= db_options KEEP variable_list */ + -3, /* (106) db_options ::= db_options PAGES NK_INTEGER */ + -3, /* (107) db_options ::= db_options PAGESIZE NK_INTEGER */ + -3, /* (108) db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */ + -3, /* (109) db_options ::= db_options PRECISION NK_STRING */ + -3, /* (110) db_options ::= db_options REPLICA NK_INTEGER */ + -3, /* (111) db_options ::= db_options VGROUPS NK_INTEGER */ + -3, /* (112) db_options ::= db_options SINGLE_STABLE NK_INTEGER */ + -3, /* (113) db_options ::= db_options RETENTIONS retention_list */ + -3, /* (114) db_options ::= db_options SCHEMALESS NK_INTEGER */ + -3, /* (115) db_options ::= db_options WAL_LEVEL NK_INTEGER */ + -3, /* (116) db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */ + -3, /* (117) db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */ + -4, /* (118) db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ + -3, /* (119) db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */ + -4, /* (120) db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ + -3, /* (121) db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */ + -3, /* (122) db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */ + -3, /* (123) db_options ::= db_options STT_TRIGGER NK_INTEGER */ + -3, /* (124) db_options ::= db_options TABLE_PREFIX signed */ + -3, /* (125) db_options ::= db_options TABLE_SUFFIX signed */ + -3, /* (126) db_options ::= db_options KEEP_TIME_OFFSET NK_INTEGER */ + -1, /* (127) alter_db_options ::= alter_db_option */ + -2, /* (128) alter_db_options ::= alter_db_options alter_db_option */ + -2, /* (129) alter_db_option ::= BUFFER NK_INTEGER */ + -2, /* (130) alter_db_option ::= CACHEMODEL NK_STRING */ + -2, /* (131) alter_db_option ::= CACHESIZE NK_INTEGER */ + -2, /* (132) alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */ + -2, /* (133) alter_db_option ::= KEEP integer_list */ + -2, /* (134) alter_db_option ::= KEEP variable_list */ + -2, /* (135) alter_db_option ::= PAGES NK_INTEGER */ + -2, /* (136) alter_db_option ::= REPLICA NK_INTEGER */ + -2, /* (137) alter_db_option ::= WAL_LEVEL NK_INTEGER */ + -2, /* (138) alter_db_option ::= STT_TRIGGER NK_INTEGER */ + -2, /* (139) alter_db_option ::= MINROWS NK_INTEGER */ + -2, /* (140) alter_db_option ::= WAL_RETENTION_PERIOD NK_INTEGER */ + -3, /* (141) alter_db_option ::= WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ + -2, /* (142) alter_db_option ::= WAL_RETENTION_SIZE NK_INTEGER */ + -3, /* (143) alter_db_option ::= WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ + -2, /* (144) alter_db_option ::= KEEP_TIME_OFFSET NK_INTEGER */ + -1, /* (145) integer_list ::= NK_INTEGER */ + -3, /* (146) integer_list ::= integer_list NK_COMMA NK_INTEGER */ + -1, /* (147) variable_list ::= NK_VARIABLE */ + -3, /* (148) variable_list ::= variable_list NK_COMMA NK_VARIABLE */ + -1, /* (149) retention_list ::= retention */ + -3, /* (150) retention_list ::= retention_list NK_COMMA retention */ + -3, /* (151) retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ + 0, /* (152) speed_opt ::= */ + -2, /* (153) speed_opt ::= BWLIMIT NK_INTEGER */ + 0, /* (154) start_opt ::= */ + -3, /* (155) start_opt ::= START WITH NK_INTEGER */ + -3, /* (156) start_opt ::= START WITH NK_STRING */ + -4, /* (157) start_opt ::= START WITH TIMESTAMP NK_STRING */ + 0, /* (158) end_opt ::= */ + -3, /* (159) end_opt ::= END WITH NK_INTEGER */ + -3, /* (160) end_opt ::= END WITH NK_STRING */ + -4, /* (161) end_opt ::= END WITH TIMESTAMP NK_STRING */ + -9, /* (162) cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ + -3, /* (163) cmd ::= CREATE TABLE multi_create_clause */ + -9, /* (164) cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ + -3, /* (165) cmd ::= DROP TABLE multi_drop_clause */ + -4, /* (166) cmd ::= DROP STABLE exists_opt full_table_name */ + -3, /* (167) cmd ::= ALTER TABLE alter_table_clause */ + -3, /* (168) cmd ::= ALTER STABLE alter_table_clause */ + -2, /* (169) alter_table_clause ::= full_table_name alter_table_options */ + -5, /* (170) alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ + -4, /* (171) alter_table_clause ::= full_table_name DROP COLUMN column_name */ + -5, /* (172) alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ + -5, /* (173) alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ + -5, /* (174) alter_table_clause ::= full_table_name ADD TAG column_name type_name */ + -4, /* (175) alter_table_clause ::= full_table_name DROP TAG column_name */ + -5, /* (176) alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ + -5, /* (177) alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ + -6, /* (178) alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */ + -1, /* (179) multi_create_clause ::= create_subtable_clause */ + -2, /* (180) multi_create_clause ::= multi_create_clause create_subtable_clause */ + -10, /* (181) 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 */ + -1, /* (182) multi_drop_clause ::= drop_table_clause */ + -3, /* (183) multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause */ + -2, /* (184) drop_table_clause ::= exists_opt full_table_name */ + 0, /* (185) specific_cols_opt ::= */ + -3, /* (186) specific_cols_opt ::= NK_LP col_name_list NK_RP */ + -1, /* (187) full_table_name ::= table_name */ + -3, /* (188) full_table_name ::= db_name NK_DOT table_name */ + -1, /* (189) column_def_list ::= column_def */ + -3, /* (190) column_def_list ::= column_def_list NK_COMMA column_def */ + -2, /* (191) column_def ::= column_name type_name */ + -1, /* (192) type_name ::= BOOL */ + -1, /* (193) type_name ::= TINYINT */ + -1, /* (194) type_name ::= SMALLINT */ + -1, /* (195) type_name ::= INT */ + -1, /* (196) type_name ::= INTEGER */ + -1, /* (197) type_name ::= BIGINT */ + -1, /* (198) type_name ::= FLOAT */ + -1, /* (199) type_name ::= DOUBLE */ + -4, /* (200) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ + -1, /* (201) type_name ::= TIMESTAMP */ + -4, /* (202) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ + -2, /* (203) type_name ::= TINYINT UNSIGNED */ + -2, /* (204) type_name ::= SMALLINT UNSIGNED */ + -2, /* (205) type_name ::= INT UNSIGNED */ + -2, /* (206) type_name ::= BIGINT UNSIGNED */ + -1, /* (207) type_name ::= JSON */ + -4, /* (208) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ + -1, /* (209) type_name ::= MEDIUMBLOB */ + -1, /* (210) type_name ::= BLOB */ + -4, /* (211) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ + -4, /* (212) type_name ::= GEOMETRY NK_LP NK_INTEGER NK_RP */ + -1, /* (213) type_name ::= DECIMAL */ + -4, /* (214) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ + -6, /* (215) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ + 0, /* (216) tags_def_opt ::= */ + -1, /* (217) tags_def_opt ::= tags_def */ + -4, /* (218) tags_def ::= TAGS NK_LP column_def_list NK_RP */ + 0, /* (219) table_options ::= */ + -3, /* (220) table_options ::= table_options COMMENT NK_STRING */ + -3, /* (221) table_options ::= table_options MAX_DELAY duration_list */ + -3, /* (222) table_options ::= table_options WATERMARK duration_list */ + -5, /* (223) table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ + -3, /* (224) table_options ::= table_options TTL NK_INTEGER */ + -5, /* (225) table_options ::= table_options SMA NK_LP col_name_list NK_RP */ + -3, /* (226) table_options ::= table_options DELETE_MARK duration_list */ + -1, /* (227) alter_table_options ::= alter_table_option */ + -2, /* (228) alter_table_options ::= alter_table_options alter_table_option */ + -2, /* (229) alter_table_option ::= COMMENT NK_STRING */ + -2, /* (230) alter_table_option ::= TTL NK_INTEGER */ + -1, /* (231) duration_list ::= duration_literal */ + -3, /* (232) duration_list ::= duration_list NK_COMMA duration_literal */ + -1, /* (233) rollup_func_list ::= rollup_func_name */ + -3, /* (234) rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ + -1, /* (235) rollup_func_name ::= function_name */ + -1, /* (236) rollup_func_name ::= FIRST */ + -1, /* (237) rollup_func_name ::= LAST */ + -1, /* (238) col_name_list ::= col_name */ + -3, /* (239) col_name_list ::= col_name_list NK_COMMA col_name */ + -1, /* (240) col_name ::= column_name */ + -2, /* (241) cmd ::= SHOW DNODES */ + -2, /* (242) cmd ::= SHOW USERS */ + -3, /* (243) cmd ::= SHOW USER PRIVILEGES */ + -3, /* (244) cmd ::= SHOW db_kind_opt DATABASES */ + -4, /* (245) cmd ::= SHOW table_kind_db_name_cond_opt TABLES like_pattern_opt */ + -4, /* (246) cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ + -3, /* (247) cmd ::= SHOW db_name_cond_opt VGROUPS */ + -2, /* (248) cmd ::= SHOW MNODES */ + -2, /* (249) cmd ::= SHOW QNODES */ + -2, /* (250) cmd ::= SHOW FUNCTIONS */ + -5, /* (251) cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ + -6, /* (252) cmd ::= SHOW INDEXES FROM db_name NK_DOT table_name */ + -2, /* (253) cmd ::= SHOW STREAMS */ + -2, /* (254) cmd ::= SHOW ACCOUNTS */ + -2, /* (255) cmd ::= SHOW APPS */ + -2, /* (256) cmd ::= SHOW CONNECTIONS */ + -2, /* (257) cmd ::= SHOW LICENCES */ + -2, /* (258) cmd ::= SHOW GRANTS */ + -4, /* (259) cmd ::= SHOW CREATE DATABASE db_name */ + -4, /* (260) cmd ::= SHOW CREATE TABLE full_table_name */ + -4, /* (261) cmd ::= SHOW CREATE STABLE full_table_name */ + -2, /* (262) cmd ::= SHOW QUERIES */ + -2, /* (263) cmd ::= SHOW SCORES */ + -2, /* (264) cmd ::= SHOW TOPICS */ + -2, /* (265) cmd ::= SHOW VARIABLES */ + -3, /* (266) cmd ::= SHOW CLUSTER VARIABLES */ + -3, /* (267) cmd ::= SHOW LOCAL VARIABLES */ + -5, /* (268) cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */ + -2, /* (269) cmd ::= SHOW BNODES */ + -2, /* (270) cmd ::= SHOW SNODES */ + -2, /* (271) cmd ::= SHOW CLUSTER */ + -2, /* (272) cmd ::= SHOW TRANSACTIONS */ + -4, /* (273) cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ + -2, /* (274) cmd ::= SHOW CONSUMERS */ + -2, /* (275) cmd ::= SHOW SUBSCRIPTIONS */ + -5, /* (276) cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ + -6, /* (277) cmd ::= SHOW TAGS FROM db_name NK_DOT table_name */ + -7, /* (278) cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ + -8, /* (279) cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name */ + -5, /* (280) cmd ::= SHOW VNODES ON DNODE NK_INTEGER */ + -2, /* (281) cmd ::= SHOW VNODES */ + -3, /* (282) cmd ::= SHOW db_name_cond_opt ALIVE */ + -3, /* (283) cmd ::= SHOW CLUSTER ALIVE */ + -3, /* (284) cmd ::= SHOW db_name_cond_opt VIEWS */ + -4, /* (285) cmd ::= SHOW CREATE VIEW full_table_name */ + 0, /* (286) table_kind_db_name_cond_opt ::= */ + -1, /* (287) table_kind_db_name_cond_opt ::= table_kind */ + -2, /* (288) table_kind_db_name_cond_opt ::= db_name NK_DOT */ + -3, /* (289) table_kind_db_name_cond_opt ::= table_kind db_name NK_DOT */ + -1, /* (290) table_kind ::= NORMAL */ + -1, /* (291) table_kind ::= CHILD */ + 0, /* (292) db_name_cond_opt ::= */ + -2, /* (293) db_name_cond_opt ::= db_name NK_DOT */ + 0, /* (294) like_pattern_opt ::= */ + -2, /* (295) like_pattern_opt ::= LIKE NK_STRING */ + -1, /* (296) table_name_cond ::= table_name */ + 0, /* (297) from_db_opt ::= */ + -2, /* (298) from_db_opt ::= FROM db_name */ + 0, /* (299) tag_list_opt ::= */ + -1, /* (300) tag_list_opt ::= tag_item */ + -3, /* (301) tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ + -1, /* (302) tag_item ::= TBNAME */ + -1, /* (303) tag_item ::= QTAGS */ + -1, /* (304) tag_item ::= column_name */ + -2, /* (305) tag_item ::= column_name column_alias */ + -3, /* (306) tag_item ::= column_name AS column_alias */ + 0, /* (307) db_kind_opt ::= */ + -1, /* (308) db_kind_opt ::= USER */ + -1, /* (309) db_kind_opt ::= SYSTEM */ + -8, /* (310) cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options */ + -9, /* (311) cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP */ + -4, /* (312) cmd ::= DROP INDEX exists_opt full_index_name */ + -1, /* (313) full_index_name ::= index_name */ + -3, /* (314) full_index_name ::= db_name NK_DOT index_name */ + -10, /* (315) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ + -12, /* (316) 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 */ + -1, /* (317) func_list ::= func */ + -3, /* (318) func_list ::= func_list NK_COMMA func */ + -4, /* (319) func ::= sma_func_name NK_LP expression_list NK_RP */ + -1, /* (320) sma_func_name ::= function_name */ + -1, /* (321) sma_func_name ::= COUNT */ + -1, /* (322) sma_func_name ::= FIRST */ + -1, /* (323) sma_func_name ::= LAST */ + -1, /* (324) sma_func_name ::= LAST_ROW */ + 0, /* (325) sma_stream_opt ::= */ + -3, /* (326) sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ + -3, /* (327) sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ + -3, /* (328) sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ + -1, /* (329) with_meta ::= AS */ + -3, /* (330) with_meta ::= WITH META AS */ + -3, /* (331) with_meta ::= ONLY META AS */ + -6, /* (332) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ + -7, /* (333) cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name */ + -8, /* (334) cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt */ + -4, /* (335) cmd ::= DROP TOPIC exists_opt topic_name */ + -7, /* (336) cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ + -2, /* (337) cmd ::= DESC full_table_name */ + -2, /* (338) cmd ::= DESCRIBE full_table_name */ + -3, /* (339) cmd ::= RESET QUERY CACHE */ + -4, /* (340) cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ + -4, /* (341) cmd ::= EXPLAIN analyze_opt explain_options insert_query */ + 0, /* (342) analyze_opt ::= */ + -1, /* (343) analyze_opt ::= ANALYZE */ + 0, /* (344) explain_options ::= */ + -3, /* (345) explain_options ::= explain_options VERBOSE NK_BOOL */ + -3, /* (346) explain_options ::= explain_options RATIO NK_FLOAT */ + -12, /* (347) cmd ::= CREATE or_replace_opt agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt language_opt */ + -4, /* (348) cmd ::= DROP FUNCTION exists_opt function_name */ + 0, /* (349) agg_func_opt ::= */ + -1, /* (350) agg_func_opt ::= AGGREGATE */ + 0, /* (351) bufsize_opt ::= */ + -2, /* (352) bufsize_opt ::= BUFSIZE NK_INTEGER */ + 0, /* (353) language_opt ::= */ + -2, /* (354) language_opt ::= LANGUAGE NK_STRING */ + 0, /* (355) or_replace_opt ::= */ + -2, /* (356) or_replace_opt ::= OR REPLACE */ + -6, /* (357) cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery */ + -4, /* (358) cmd ::= DROP VIEW exists_opt full_view_name */ + -1, /* (359) full_view_name ::= view_name */ + -3, /* (360) full_view_name ::= db_name NK_DOT view_name */ + -12, /* (361) cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name col_list_opt tag_def_or_ref_opt subtable_opt AS query_or_subquery */ + -4, /* (362) cmd ::= DROP STREAM exists_opt stream_name */ + -4, /* (363) cmd ::= PAUSE STREAM exists_opt stream_name */ + -5, /* (364) cmd ::= RESUME STREAM exists_opt ignore_opt stream_name */ + 0, /* (365) col_list_opt ::= */ + -3, /* (366) col_list_opt ::= NK_LP col_name_list NK_RP */ + 0, /* (367) tag_def_or_ref_opt ::= */ + -1, /* (368) tag_def_or_ref_opt ::= tags_def */ + -4, /* (369) tag_def_or_ref_opt ::= TAGS NK_LP col_name_list NK_RP */ + 0, /* (370) stream_options ::= */ + -3, /* (371) stream_options ::= stream_options TRIGGER AT_ONCE */ + -3, /* (372) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ + -4, /* (373) stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ + -3, /* (374) stream_options ::= stream_options WATERMARK duration_literal */ + -4, /* (375) stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ + -3, /* (376) stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ + -3, /* (377) stream_options ::= stream_options DELETE_MARK duration_literal */ + -4, /* (378) stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */ + 0, /* (379) subtable_opt ::= */ + -4, /* (380) subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ + 0, /* (381) ignore_opt ::= */ + -2, /* (382) ignore_opt ::= IGNORE UNTREATED */ + -3, /* (383) cmd ::= KILL CONNECTION NK_INTEGER */ + -3, /* (384) cmd ::= KILL QUERY NK_STRING */ + -3, /* (385) cmd ::= KILL TRANSACTION NK_INTEGER */ + -2, /* (386) cmd ::= BALANCE VGROUP */ + -4, /* (387) cmd ::= BALANCE VGROUP LEADER on_vgroup_id */ + -4, /* (388) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ + -4, /* (389) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ + -3, /* (390) cmd ::= SPLIT VGROUP NK_INTEGER */ + 0, /* (391) on_vgroup_id ::= */ + -2, /* (392) on_vgroup_id ::= ON NK_INTEGER */ + -2, /* (393) dnode_list ::= DNODE NK_INTEGER */ + -3, /* (394) dnode_list ::= dnode_list DNODE NK_INTEGER */ + -4, /* (395) cmd ::= DELETE FROM full_table_name where_clause_opt */ + -1, /* (396) cmd ::= query_or_subquery */ + -1, /* (397) cmd ::= insert_query */ + -7, /* (398) insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ + -4, /* (399) insert_query ::= INSERT INTO full_table_name query_or_subquery */ + -1, /* (400) literal ::= NK_INTEGER */ + -1, /* (401) literal ::= NK_FLOAT */ + -1, /* (402) literal ::= NK_STRING */ + -1, /* (403) literal ::= NK_BOOL */ + -2, /* (404) literal ::= TIMESTAMP NK_STRING */ + -1, /* (405) literal ::= duration_literal */ + -1, /* (406) literal ::= NULL */ + -1, /* (407) literal ::= NK_QUESTION */ + -1, /* (408) duration_literal ::= NK_VARIABLE */ + -1, /* (409) signed ::= NK_INTEGER */ + -2, /* (410) signed ::= NK_PLUS NK_INTEGER */ + -2, /* (411) signed ::= NK_MINUS NK_INTEGER */ + -1, /* (412) signed ::= NK_FLOAT */ + -2, /* (413) signed ::= NK_PLUS NK_FLOAT */ + -2, /* (414) signed ::= NK_MINUS NK_FLOAT */ + -1, /* (415) signed_literal ::= signed */ + -1, /* (416) signed_literal ::= NK_STRING */ + -1, /* (417) signed_literal ::= NK_BOOL */ + -2, /* (418) signed_literal ::= TIMESTAMP NK_STRING */ + -1, /* (419) signed_literal ::= duration_literal */ + -1, /* (420) signed_literal ::= NULL */ + -1, /* (421) signed_literal ::= literal_func */ + -1, /* (422) signed_literal ::= NK_QUESTION */ + -1, /* (423) literal_list ::= signed_literal */ + -3, /* (424) literal_list ::= literal_list NK_COMMA signed_literal */ + -1, /* (425) db_name ::= NK_ID */ + -1, /* (426) table_name ::= NK_ID */ + -1, /* (427) column_name ::= NK_ID */ + -1, /* (428) function_name ::= NK_ID */ + -1, /* (429) view_name ::= NK_ID */ + -1, /* (430) table_alias ::= NK_ID */ + -1, /* (431) column_alias ::= NK_ID */ + -1, /* (432) user_name ::= NK_ID */ + -1, /* (433) topic_name ::= NK_ID */ + -1, /* (434) stream_name ::= NK_ID */ + -1, /* (435) cgroup_name ::= NK_ID */ + -1, /* (436) index_name ::= NK_ID */ + -1, /* (437) expr_or_subquery ::= expression */ + -1, /* (438) expression ::= literal */ + -1, /* (439) expression ::= pseudo_column */ + -1, /* (440) expression ::= column_reference */ + -1, /* (441) expression ::= function_expression */ + -1, /* (442) expression ::= case_when_expression */ + -3, /* (443) expression ::= NK_LP expression NK_RP */ + -2, /* (444) expression ::= NK_PLUS expr_or_subquery */ + -2, /* (445) expression ::= NK_MINUS expr_or_subquery */ + -3, /* (446) expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ + -3, /* (447) expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ + -3, /* (448) expression ::= expr_or_subquery NK_STAR expr_or_subquery */ + -3, /* (449) expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ + -3, /* (450) expression ::= expr_or_subquery NK_REM expr_or_subquery */ + -3, /* (451) expression ::= column_reference NK_ARROW NK_STRING */ + -3, /* (452) expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ + -3, /* (453) expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ + -1, /* (454) expression_list ::= expr_or_subquery */ + -3, /* (455) expression_list ::= expression_list NK_COMMA expr_or_subquery */ + -1, /* (456) column_reference ::= column_name */ + -3, /* (457) column_reference ::= table_name NK_DOT column_name */ + -1, /* (458) pseudo_column ::= ROWTS */ + -1, /* (459) pseudo_column ::= TBNAME */ + -3, /* (460) pseudo_column ::= table_name NK_DOT TBNAME */ + -1, /* (461) pseudo_column ::= QSTART */ + -1, /* (462) pseudo_column ::= QEND */ + -1, /* (463) pseudo_column ::= QDURATION */ + -1, /* (464) pseudo_column ::= WSTART */ + -1, /* (465) pseudo_column ::= WEND */ + -1, /* (466) pseudo_column ::= WDURATION */ + -1, /* (467) pseudo_column ::= IROWTS */ + -1, /* (468) pseudo_column ::= ISFILLED */ + -1, /* (469) pseudo_column ::= QTAGS */ + -4, /* (470) function_expression ::= function_name NK_LP expression_list NK_RP */ + -4, /* (471) function_expression ::= star_func NK_LP star_func_para_list NK_RP */ + -6, /* (472) function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ + -1, /* (473) function_expression ::= literal_func */ + -3, /* (474) literal_func ::= noarg_func NK_LP NK_RP */ + -1, /* (475) literal_func ::= NOW */ + -1, /* (476) noarg_func ::= NOW */ + -1, /* (477) noarg_func ::= TODAY */ + -1, /* (478) noarg_func ::= TIMEZONE */ + -1, /* (479) noarg_func ::= DATABASE */ + -1, /* (480) noarg_func ::= CLIENT_VERSION */ + -1, /* (481) noarg_func ::= SERVER_VERSION */ + -1, /* (482) noarg_func ::= SERVER_STATUS */ + -1, /* (483) noarg_func ::= CURRENT_USER */ + -1, /* (484) noarg_func ::= USER */ + -1, /* (485) star_func ::= COUNT */ + -1, /* (486) star_func ::= FIRST */ + -1, /* (487) star_func ::= LAST */ + -1, /* (488) star_func ::= LAST_ROW */ + -1, /* (489) star_func_para_list ::= NK_STAR */ + -1, /* (490) star_func_para_list ::= other_para_list */ + -1, /* (491) other_para_list ::= star_func_para */ + -3, /* (492) other_para_list ::= other_para_list NK_COMMA star_func_para */ + -1, /* (493) star_func_para ::= expr_or_subquery */ + -3, /* (494) star_func_para ::= table_name NK_DOT NK_STAR */ + -4, /* (495) case_when_expression ::= CASE when_then_list case_when_else_opt END */ + -5, /* (496) case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ + -1, /* (497) when_then_list ::= when_then_expr */ + -2, /* (498) when_then_list ::= when_then_list when_then_expr */ + -4, /* (499) when_then_expr ::= WHEN common_expression THEN common_expression */ + 0, /* (500) case_when_else_opt ::= */ + -2, /* (501) case_when_else_opt ::= ELSE common_expression */ + -3, /* (502) predicate ::= expr_or_subquery compare_op expr_or_subquery */ + -5, /* (503) predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ + -6, /* (504) predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ + -3, /* (505) predicate ::= expr_or_subquery IS NULL */ + -4, /* (506) predicate ::= expr_or_subquery IS NOT NULL */ + -3, /* (507) predicate ::= expr_or_subquery in_op in_predicate_value */ + -1, /* (508) compare_op ::= NK_LT */ + -1, /* (509) compare_op ::= NK_GT */ + -1, /* (510) compare_op ::= NK_LE */ + -1, /* (511) compare_op ::= NK_GE */ + -1, /* (512) compare_op ::= NK_NE */ + -1, /* (513) compare_op ::= NK_EQ */ + -1, /* (514) compare_op ::= LIKE */ + -2, /* (515) compare_op ::= NOT LIKE */ + -1, /* (516) compare_op ::= MATCH */ + -1, /* (517) compare_op ::= NMATCH */ + -1, /* (518) compare_op ::= CONTAINS */ + -1, /* (519) in_op ::= IN */ + -2, /* (520) in_op ::= NOT IN */ + -3, /* (521) in_predicate_value ::= NK_LP literal_list NK_RP */ + -1, /* (522) boolean_value_expression ::= boolean_primary */ + -2, /* (523) boolean_value_expression ::= NOT boolean_primary */ + -3, /* (524) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ + -3, /* (525) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ + -1, /* (526) boolean_primary ::= predicate */ + -3, /* (527) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ + -1, /* (528) common_expression ::= expr_or_subquery */ + -1, /* (529) common_expression ::= boolean_value_expression */ + 0, /* (530) from_clause_opt ::= */ + -2, /* (531) from_clause_opt ::= FROM table_reference_list */ + -1, /* (532) table_reference_list ::= table_reference */ + -3, /* (533) table_reference_list ::= table_reference_list NK_COMMA table_reference */ + -1, /* (534) table_reference ::= table_primary */ + -1, /* (535) table_reference ::= joined_table */ + -2, /* (536) table_primary ::= table_name alias_opt */ + -4, /* (537) table_primary ::= db_name NK_DOT table_name alias_opt */ + -2, /* (538) table_primary ::= subquery alias_opt */ + -1, /* (539) table_primary ::= parenthesized_joined_table */ + 0, /* (540) alias_opt ::= */ + -1, /* (541) alias_opt ::= table_alias */ + -2, /* (542) alias_opt ::= AS table_alias */ + -3, /* (543) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ + -3, /* (544) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ + -6, /* (545) joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ + 0, /* (546) join_type ::= */ + -1, /* (547) join_type ::= INNER */ + -14, /* (548) query_specification ::= SELECT hint_list set_quantifier_opt tag_mode_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 */ + 0, /* (549) hint_list ::= */ + -1, /* (550) hint_list ::= NK_HINT */ + 0, /* (551) tag_mode_opt ::= */ + -1, /* (552) tag_mode_opt ::= TAGS */ + 0, /* (553) set_quantifier_opt ::= */ + -1, /* (554) set_quantifier_opt ::= DISTINCT */ + -1, /* (555) set_quantifier_opt ::= ALL */ + -1, /* (556) select_list ::= select_item */ + -3, /* (557) select_list ::= select_list NK_COMMA select_item */ + -1, /* (558) select_item ::= NK_STAR */ + -1, /* (559) select_item ::= common_expression */ + -2, /* (560) select_item ::= common_expression column_alias */ + -3, /* (561) select_item ::= common_expression AS column_alias */ + -3, /* (562) select_item ::= table_name NK_DOT NK_STAR */ + 0, /* (563) where_clause_opt ::= */ + -2, /* (564) where_clause_opt ::= WHERE search_condition */ + 0, /* (565) partition_by_clause_opt ::= */ + -3, /* (566) partition_by_clause_opt ::= PARTITION BY partition_list */ + -1, /* (567) partition_list ::= partition_item */ + -3, /* (568) partition_list ::= partition_list NK_COMMA partition_item */ + -1, /* (569) partition_item ::= expr_or_subquery */ + -2, /* (570) partition_item ::= expr_or_subquery column_alias */ + -3, /* (571) partition_item ::= expr_or_subquery AS column_alias */ + 0, /* (572) twindow_clause_opt ::= */ + -6, /* (573) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ + -4, /* (574) twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ + -6, /* (575) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ + -8, /* (576) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ + -7, /* (577) twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ + 0, /* (578) sliding_opt ::= */ + -4, /* (579) sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ + 0, /* (580) fill_opt ::= */ + -4, /* (581) fill_opt ::= FILL NK_LP fill_mode NK_RP */ + -6, /* (582) fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP */ + -6, /* (583) fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP */ + -1, /* (584) fill_mode ::= NONE */ + -1, /* (585) fill_mode ::= PREV */ + -1, /* (586) fill_mode ::= NULL */ + -1, /* (587) fill_mode ::= NULL_F */ + -1, /* (588) fill_mode ::= LINEAR */ + -1, /* (589) fill_mode ::= NEXT */ + 0, /* (590) group_by_clause_opt ::= */ + -3, /* (591) group_by_clause_opt ::= GROUP BY group_by_list */ + -1, /* (592) group_by_list ::= expr_or_subquery */ + -3, /* (593) group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ + 0, /* (594) having_clause_opt ::= */ + -2, /* (595) having_clause_opt ::= HAVING search_condition */ + 0, /* (596) range_opt ::= */ + -6, /* (597) range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ + -4, /* (598) range_opt ::= RANGE NK_LP expr_or_subquery NK_RP */ + 0, /* (599) every_opt ::= */ + -4, /* (600) every_opt ::= EVERY NK_LP duration_literal NK_RP */ + -4, /* (601) query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ + -1, /* (602) query_simple ::= query_specification */ + -1, /* (603) query_simple ::= union_query_expression */ + -4, /* (604) union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ + -3, /* (605) union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ + -1, /* (606) query_simple_or_subquery ::= query_simple */ + -1, /* (607) query_simple_or_subquery ::= subquery */ + -1, /* (608) query_or_subquery ::= query_expression */ + -1, /* (609) query_or_subquery ::= subquery */ + 0, /* (610) order_by_clause_opt ::= */ + -3, /* (611) order_by_clause_opt ::= ORDER BY sort_specification_list */ + 0, /* (612) slimit_clause_opt ::= */ + -2, /* (613) slimit_clause_opt ::= SLIMIT NK_INTEGER */ + -4, /* (614) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ + -4, /* (615) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + 0, /* (616) limit_clause_opt ::= */ + -2, /* (617) limit_clause_opt ::= LIMIT NK_INTEGER */ + -4, /* (618) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ + -4, /* (619) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + -3, /* (620) subquery ::= NK_LP query_expression NK_RP */ + -3, /* (621) subquery ::= NK_LP subquery NK_RP */ + -1, /* (622) search_condition ::= common_expression */ + -1, /* (623) sort_specification_list ::= sort_specification */ + -3, /* (624) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ + -3, /* (625) sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ + 0, /* (626) ordering_specification_opt ::= */ + -1, /* (627) ordering_specification_opt ::= ASC */ + -1, /* (628) ordering_specification_opt ::= DESC */ + 0, /* (629) null_ordering_opt ::= */ + -2, /* (630) null_ordering_opt ::= NULLS FIRST */ + -2, /* (631) null_ordering_opt ::= NULLS LAST */ }; static void yy_accept(yyParser*); /* Forward Declaration */ @@ -4722,20 +4725,20 @@ static YYACTIONTYPE yy_reduce( { yymsp[-1].minor.yy844 = yymsp[0].minor.yy844; } break; case 27: /* white_list_opt ::= */ - case 184: /* specific_cols_opt ::= */ yytestcase(yyruleno==184); - case 215: /* tags_def_opt ::= */ yytestcase(yyruleno==215); - case 298: /* tag_list_opt ::= */ yytestcase(yyruleno==298); - case 364: /* col_list_opt ::= */ yytestcase(yyruleno==364); - case 366: /* tag_def_or_ref_opt ::= */ yytestcase(yyruleno==366); - case 564: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==564); - case 589: /* group_by_clause_opt ::= */ yytestcase(yyruleno==589); - case 609: /* order_by_clause_opt ::= */ yytestcase(yyruleno==609); + case 185: /* specific_cols_opt ::= */ yytestcase(yyruleno==185); + case 216: /* tags_def_opt ::= */ yytestcase(yyruleno==216); + case 299: /* tag_list_opt ::= */ yytestcase(yyruleno==299); + case 365: /* col_list_opt ::= */ yytestcase(yyruleno==365); + case 367: /* tag_def_or_ref_opt ::= */ yytestcase(yyruleno==367); + case 565: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==565); + case 590: /* group_by_clause_opt ::= */ yytestcase(yyruleno==590); + case 610: /* order_by_clause_opt ::= */ yytestcase(yyruleno==610); { yymsp[1].minor.yy844 = NULL; } break; case 28: /* white_list_opt ::= white_list */ - case 216: /* tags_def_opt ::= tags_def */ yytestcase(yyruleno==216); - case 367: /* tag_def_or_ref_opt ::= tags_def */ yytestcase(yyruleno==367); - case 489: /* star_func_para_list ::= other_para_list */ yytestcase(yyruleno==489); + case 217: /* tags_def_opt ::= tags_def */ yytestcase(yyruleno==217); + case 368: /* tag_def_or_ref_opt ::= tags_def */ yytestcase(yyruleno==368); + case 490: /* star_func_para_list ::= other_para_list */ yytestcase(yyruleno==490); { yylhsminor.yy844 = yymsp[0].minor.yy844; } yymsp[0].minor.yy844 = yylhsminor.yy844; break; @@ -4796,287 +4799,290 @@ static YYACTIONTYPE yy_reduce( case 46: /* priv_type ::= WRITE */ { yymsp[0].minor.yy479 = PRIVILEGE_TYPE_WRITE; } break; - case 47: /* priv_level ::= NK_STAR NK_DOT NK_STAR */ + case 47: /* priv_type ::= ALTER */ +{ yymsp[0].minor.yy479 = PRIVILEGE_TYPE_ALTER; } + break; + case 48: /* priv_level ::= NK_STAR NK_DOT NK_STAR */ { yylhsminor.yy767.first = yymsp[-2].minor.yy0; yylhsminor.yy767.second = yymsp[0].minor.yy0; } yymsp[-2].minor.yy767 = yylhsminor.yy767; break; - case 48: /* priv_level ::= db_name NK_DOT NK_STAR */ + case 49: /* priv_level ::= db_name NK_DOT NK_STAR */ { yylhsminor.yy767.first = yymsp[-2].minor.yy129; yylhsminor.yy767.second = yymsp[0].minor.yy0; } yymsp[-2].minor.yy767 = yylhsminor.yy767; break; - case 49: /* priv_level ::= db_name NK_DOT table_name */ + case 50: /* priv_level ::= db_name NK_DOT table_name */ { yylhsminor.yy767.first = yymsp[-2].minor.yy129; yylhsminor.yy767.second = yymsp[0].minor.yy129; } yymsp[-2].minor.yy767 = yylhsminor.yy767; break; - case 50: /* priv_level ::= topic_name */ + case 51: /* priv_level ::= topic_name */ { yylhsminor.yy767.first = yymsp[0].minor.yy129; yylhsminor.yy767.second = nil_token; } yymsp[0].minor.yy767 = yylhsminor.yy767; break; - case 51: /* with_opt ::= */ - case 153: /* start_opt ::= */ yytestcase(yyruleno==153); - case 157: /* end_opt ::= */ yytestcase(yyruleno==157); - case 293: /* like_pattern_opt ::= */ yytestcase(yyruleno==293); - case 378: /* subtable_opt ::= */ yytestcase(yyruleno==378); - case 499: /* case_when_else_opt ::= */ yytestcase(yyruleno==499); - case 529: /* from_clause_opt ::= */ yytestcase(yyruleno==529); - case 562: /* where_clause_opt ::= */ yytestcase(yyruleno==562); - case 571: /* twindow_clause_opt ::= */ yytestcase(yyruleno==571); - case 577: /* sliding_opt ::= */ yytestcase(yyruleno==577); - case 579: /* fill_opt ::= */ yytestcase(yyruleno==579); - case 593: /* having_clause_opt ::= */ yytestcase(yyruleno==593); - case 595: /* range_opt ::= */ yytestcase(yyruleno==595); - case 598: /* every_opt ::= */ yytestcase(yyruleno==598); - case 611: /* slimit_clause_opt ::= */ yytestcase(yyruleno==611); - case 615: /* limit_clause_opt ::= */ yytestcase(yyruleno==615); + case 52: /* with_opt ::= */ + case 154: /* start_opt ::= */ yytestcase(yyruleno==154); + case 158: /* end_opt ::= */ yytestcase(yyruleno==158); + case 294: /* like_pattern_opt ::= */ yytestcase(yyruleno==294); + case 379: /* subtable_opt ::= */ yytestcase(yyruleno==379); + case 500: /* case_when_else_opt ::= */ yytestcase(yyruleno==500); + case 530: /* from_clause_opt ::= */ yytestcase(yyruleno==530); + case 563: /* where_clause_opt ::= */ yytestcase(yyruleno==563); + case 572: /* twindow_clause_opt ::= */ yytestcase(yyruleno==572); + case 578: /* sliding_opt ::= */ yytestcase(yyruleno==578); + case 580: /* fill_opt ::= */ yytestcase(yyruleno==580); + case 594: /* having_clause_opt ::= */ yytestcase(yyruleno==594); + case 596: /* range_opt ::= */ yytestcase(yyruleno==596); + case 599: /* every_opt ::= */ yytestcase(yyruleno==599); + case 612: /* slimit_clause_opt ::= */ yytestcase(yyruleno==612); + case 616: /* limit_clause_opt ::= */ yytestcase(yyruleno==616); { yymsp[1].minor.yy452 = NULL; } break; - case 52: /* with_opt ::= WITH search_condition */ - case 530: /* from_clause_opt ::= FROM table_reference_list */ yytestcase(yyruleno==530); - case 563: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==563); - case 594: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==594); + case 53: /* with_opt ::= WITH search_condition */ + case 531: /* from_clause_opt ::= FROM table_reference_list */ yytestcase(yyruleno==531); + case 564: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==564); + case 595: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==595); { yymsp[-1].minor.yy452 = yymsp[0].minor.yy452; } break; - case 53: /* cmd ::= CREATE DNODE dnode_endpoint */ + case 54: /* cmd ::= CREATE DNODE dnode_endpoint */ { pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[0].minor.yy129, NULL); } break; - case 54: /* cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */ + case 55: /* cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */ { pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[-2].minor.yy129, &yymsp[0].minor.yy0); } break; - case 55: /* cmd ::= DROP DNODE NK_INTEGER force_opt */ + case 56: /* cmd ::= DROP DNODE NK_INTEGER force_opt */ { pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy137, false); } break; - case 56: /* cmd ::= DROP DNODE dnode_endpoint force_opt */ + case 57: /* cmd ::= DROP DNODE dnode_endpoint force_opt */ { pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy129, yymsp[0].minor.yy137, false); } break; - case 57: /* cmd ::= DROP DNODE NK_INTEGER unsafe_opt */ + case 58: /* cmd ::= DROP DNODE NK_INTEGER unsafe_opt */ { pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy0, false, yymsp[0].minor.yy137); } break; - case 58: /* cmd ::= DROP DNODE dnode_endpoint unsafe_opt */ + case 59: /* cmd ::= DROP DNODE dnode_endpoint unsafe_opt */ { pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy129, false, yymsp[0].minor.yy137); } break; - case 59: /* cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ + case 60: /* cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ { pCxt->pRootNode = createAlterDnodeStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, NULL); } break; - case 60: /* cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */ + case 61: /* cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */ { pCxt->pRootNode = createAlterDnodeStmt(pCxt, &yymsp[-2].minor.yy0, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } break; - case 61: /* cmd ::= ALTER ALL DNODES NK_STRING */ + case 62: /* cmd ::= ALTER ALL DNODES NK_STRING */ { pCxt->pRootNode = createAlterDnodeStmt(pCxt, NULL, &yymsp[0].minor.yy0, NULL); } break; - case 62: /* cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */ + case 63: /* cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */ { pCxt->pRootNode = createAlterDnodeStmt(pCxt, NULL, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } break; - case 63: /* cmd ::= RESTORE DNODE NK_INTEGER */ + case 64: /* cmd ::= RESTORE DNODE NK_INTEGER */ { pCxt->pRootNode = createRestoreComponentNodeStmt(pCxt, QUERY_NODE_RESTORE_DNODE_STMT, &yymsp[0].minor.yy0); } break; - case 64: /* dnode_endpoint ::= NK_STRING */ - case 65: /* dnode_endpoint ::= NK_ID */ yytestcase(yyruleno==65); - case 66: /* dnode_endpoint ::= NK_IPTOKEN */ yytestcase(yyruleno==66); - case 320: /* sma_func_name ::= COUNT */ yytestcase(yyruleno==320); - case 321: /* sma_func_name ::= FIRST */ yytestcase(yyruleno==321); - case 322: /* sma_func_name ::= LAST */ yytestcase(yyruleno==322); - case 323: /* sma_func_name ::= LAST_ROW */ yytestcase(yyruleno==323); - case 424: /* db_name ::= NK_ID */ yytestcase(yyruleno==424); - case 425: /* table_name ::= NK_ID */ yytestcase(yyruleno==425); - case 426: /* column_name ::= NK_ID */ yytestcase(yyruleno==426); - case 427: /* function_name ::= NK_ID */ yytestcase(yyruleno==427); - case 428: /* view_name ::= NK_ID */ yytestcase(yyruleno==428); - case 429: /* table_alias ::= NK_ID */ yytestcase(yyruleno==429); - case 430: /* column_alias ::= NK_ID */ yytestcase(yyruleno==430); - case 431: /* user_name ::= NK_ID */ yytestcase(yyruleno==431); - case 432: /* topic_name ::= NK_ID */ yytestcase(yyruleno==432); - case 433: /* stream_name ::= NK_ID */ yytestcase(yyruleno==433); - case 434: /* cgroup_name ::= NK_ID */ yytestcase(yyruleno==434); - case 435: /* index_name ::= NK_ID */ yytestcase(yyruleno==435); - case 475: /* noarg_func ::= NOW */ yytestcase(yyruleno==475); - case 476: /* noarg_func ::= TODAY */ yytestcase(yyruleno==476); - case 477: /* noarg_func ::= TIMEZONE */ yytestcase(yyruleno==477); - case 478: /* noarg_func ::= DATABASE */ yytestcase(yyruleno==478); - case 479: /* noarg_func ::= CLIENT_VERSION */ yytestcase(yyruleno==479); - case 480: /* noarg_func ::= SERVER_VERSION */ yytestcase(yyruleno==480); - case 481: /* noarg_func ::= SERVER_STATUS */ yytestcase(yyruleno==481); - case 482: /* noarg_func ::= CURRENT_USER */ yytestcase(yyruleno==482); - case 483: /* noarg_func ::= USER */ yytestcase(yyruleno==483); - case 484: /* star_func ::= COUNT */ yytestcase(yyruleno==484); - case 485: /* star_func ::= FIRST */ yytestcase(yyruleno==485); - case 486: /* star_func ::= LAST */ yytestcase(yyruleno==486); - case 487: /* star_func ::= LAST_ROW */ yytestcase(yyruleno==487); + case 65: /* dnode_endpoint ::= NK_STRING */ + case 66: /* dnode_endpoint ::= NK_ID */ yytestcase(yyruleno==66); + case 67: /* dnode_endpoint ::= NK_IPTOKEN */ yytestcase(yyruleno==67); + case 321: /* sma_func_name ::= COUNT */ yytestcase(yyruleno==321); + case 322: /* sma_func_name ::= FIRST */ yytestcase(yyruleno==322); + case 323: /* sma_func_name ::= LAST */ yytestcase(yyruleno==323); + case 324: /* sma_func_name ::= LAST_ROW */ yytestcase(yyruleno==324); + case 425: /* db_name ::= NK_ID */ yytestcase(yyruleno==425); + case 426: /* table_name ::= NK_ID */ yytestcase(yyruleno==426); + case 427: /* column_name ::= NK_ID */ yytestcase(yyruleno==427); + case 428: /* function_name ::= NK_ID */ yytestcase(yyruleno==428); + case 429: /* view_name ::= NK_ID */ yytestcase(yyruleno==429); + case 430: /* table_alias ::= NK_ID */ yytestcase(yyruleno==430); + case 431: /* column_alias ::= NK_ID */ yytestcase(yyruleno==431); + case 432: /* user_name ::= NK_ID */ yytestcase(yyruleno==432); + case 433: /* topic_name ::= NK_ID */ yytestcase(yyruleno==433); + case 434: /* stream_name ::= NK_ID */ yytestcase(yyruleno==434); + case 435: /* cgroup_name ::= NK_ID */ yytestcase(yyruleno==435); + case 436: /* index_name ::= NK_ID */ yytestcase(yyruleno==436); + case 476: /* noarg_func ::= NOW */ yytestcase(yyruleno==476); + case 477: /* noarg_func ::= TODAY */ yytestcase(yyruleno==477); + case 478: /* noarg_func ::= TIMEZONE */ yytestcase(yyruleno==478); + case 479: /* noarg_func ::= DATABASE */ yytestcase(yyruleno==479); + case 480: /* noarg_func ::= CLIENT_VERSION */ yytestcase(yyruleno==480); + case 481: /* noarg_func ::= SERVER_VERSION */ yytestcase(yyruleno==481); + case 482: /* noarg_func ::= SERVER_STATUS */ yytestcase(yyruleno==482); + case 483: /* noarg_func ::= CURRENT_USER */ yytestcase(yyruleno==483); + case 484: /* noarg_func ::= USER */ yytestcase(yyruleno==484); + case 485: /* star_func ::= COUNT */ yytestcase(yyruleno==485); + case 486: /* star_func ::= FIRST */ yytestcase(yyruleno==486); + case 487: /* star_func ::= LAST */ yytestcase(yyruleno==487); + case 488: /* star_func ::= LAST_ROW */ yytestcase(yyruleno==488); { yylhsminor.yy129 = yymsp[0].minor.yy0; } yymsp[0].minor.yy129 = yylhsminor.yy129; break; - case 67: /* force_opt ::= */ - case 91: /* not_exists_opt ::= */ yytestcase(yyruleno==91); - case 93: /* exists_opt ::= */ yytestcase(yyruleno==93); - case 341: /* analyze_opt ::= */ yytestcase(yyruleno==341); - case 348: /* agg_func_opt ::= */ yytestcase(yyruleno==348); - case 354: /* or_replace_opt ::= */ yytestcase(yyruleno==354); - case 380: /* ignore_opt ::= */ yytestcase(yyruleno==380); - case 550: /* tag_mode_opt ::= */ yytestcase(yyruleno==550); - case 552: /* set_quantifier_opt ::= */ yytestcase(yyruleno==552); + case 68: /* force_opt ::= */ + case 92: /* not_exists_opt ::= */ yytestcase(yyruleno==92); + case 94: /* exists_opt ::= */ yytestcase(yyruleno==94); + case 342: /* analyze_opt ::= */ yytestcase(yyruleno==342); + case 349: /* agg_func_opt ::= */ yytestcase(yyruleno==349); + case 355: /* or_replace_opt ::= */ yytestcase(yyruleno==355); + case 381: /* ignore_opt ::= */ yytestcase(yyruleno==381); + case 551: /* tag_mode_opt ::= */ yytestcase(yyruleno==551); + case 553: /* set_quantifier_opt ::= */ yytestcase(yyruleno==553); { yymsp[1].minor.yy137 = false; } break; - case 68: /* force_opt ::= FORCE */ - case 69: /* unsafe_opt ::= UNSAFE */ yytestcase(yyruleno==69); - case 342: /* analyze_opt ::= ANALYZE */ yytestcase(yyruleno==342); - case 349: /* agg_func_opt ::= AGGREGATE */ yytestcase(yyruleno==349); - case 551: /* tag_mode_opt ::= TAGS */ yytestcase(yyruleno==551); - case 553: /* set_quantifier_opt ::= DISTINCT */ yytestcase(yyruleno==553); + case 69: /* force_opt ::= FORCE */ + case 70: /* unsafe_opt ::= UNSAFE */ yytestcase(yyruleno==70); + case 343: /* analyze_opt ::= ANALYZE */ yytestcase(yyruleno==343); + case 350: /* agg_func_opt ::= AGGREGATE */ yytestcase(yyruleno==350); + case 552: /* tag_mode_opt ::= TAGS */ yytestcase(yyruleno==552); + case 554: /* set_quantifier_opt ::= DISTINCT */ yytestcase(yyruleno==554); { yymsp[0].minor.yy137 = true; } break; - case 70: /* cmd ::= ALTER LOCAL NK_STRING */ + case 71: /* cmd ::= ALTER LOCAL NK_STRING */ { pCxt->pRootNode = createAlterLocalStmt(pCxt, &yymsp[0].minor.yy0, NULL); } break; - case 71: /* cmd ::= ALTER LOCAL NK_STRING NK_STRING */ + case 72: /* cmd ::= ALTER LOCAL NK_STRING NK_STRING */ { pCxt->pRootNode = createAlterLocalStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } break; - case 72: /* cmd ::= CREATE QNODE ON DNODE NK_INTEGER */ + case 73: /* cmd ::= CREATE QNODE ON DNODE NK_INTEGER */ { pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_QNODE_STMT, &yymsp[0].minor.yy0); } break; - case 73: /* cmd ::= DROP QNODE ON DNODE NK_INTEGER */ + case 74: /* cmd ::= DROP QNODE ON DNODE NK_INTEGER */ { pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_QNODE_STMT, &yymsp[0].minor.yy0); } break; - case 74: /* cmd ::= RESTORE QNODE ON DNODE NK_INTEGER */ + case 75: /* cmd ::= RESTORE QNODE ON DNODE NK_INTEGER */ { pCxt->pRootNode = createRestoreComponentNodeStmt(pCxt, QUERY_NODE_RESTORE_QNODE_STMT, &yymsp[0].minor.yy0); } break; - case 75: /* cmd ::= CREATE BNODE ON DNODE NK_INTEGER */ + case 76: /* cmd ::= CREATE BNODE ON DNODE NK_INTEGER */ { pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_BNODE_STMT, &yymsp[0].minor.yy0); } break; - case 76: /* cmd ::= DROP BNODE ON DNODE NK_INTEGER */ + case 77: /* cmd ::= DROP BNODE ON DNODE NK_INTEGER */ { pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_BNODE_STMT, &yymsp[0].minor.yy0); } break; - case 77: /* cmd ::= CREATE SNODE ON DNODE NK_INTEGER */ + case 78: /* cmd ::= CREATE SNODE ON DNODE NK_INTEGER */ { pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_SNODE_STMT, &yymsp[0].minor.yy0); } break; - case 78: /* cmd ::= DROP SNODE ON DNODE NK_INTEGER */ + case 79: /* cmd ::= DROP SNODE ON DNODE NK_INTEGER */ { pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_SNODE_STMT, &yymsp[0].minor.yy0); } break; - case 79: /* cmd ::= CREATE MNODE ON DNODE NK_INTEGER */ + case 80: /* cmd ::= CREATE MNODE ON DNODE NK_INTEGER */ { pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_MNODE_STMT, &yymsp[0].minor.yy0); } break; - case 80: /* cmd ::= DROP MNODE ON DNODE NK_INTEGER */ + case 81: /* cmd ::= DROP MNODE ON DNODE NK_INTEGER */ { pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_MNODE_STMT, &yymsp[0].minor.yy0); } break; - case 81: /* cmd ::= RESTORE MNODE ON DNODE NK_INTEGER */ + case 82: /* cmd ::= RESTORE MNODE ON DNODE NK_INTEGER */ { pCxt->pRootNode = createRestoreComponentNodeStmt(pCxt, QUERY_NODE_RESTORE_MNODE_STMT, &yymsp[0].minor.yy0); } break; - case 82: /* cmd ::= RESTORE VNODE ON DNODE NK_INTEGER */ + case 83: /* cmd ::= RESTORE VNODE ON DNODE NK_INTEGER */ { pCxt->pRootNode = createRestoreComponentNodeStmt(pCxt, QUERY_NODE_RESTORE_VNODE_STMT, &yymsp[0].minor.yy0); } break; - case 83: /* cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ + case 84: /* cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ { pCxt->pRootNode = createCreateDatabaseStmt(pCxt, yymsp[-2].minor.yy137, &yymsp[-1].minor.yy129, yymsp[0].minor.yy452); } break; - case 84: /* cmd ::= DROP DATABASE exists_opt db_name */ + case 85: /* cmd ::= DROP DATABASE exists_opt db_name */ { pCxt->pRootNode = createDropDatabaseStmt(pCxt, yymsp[-1].minor.yy137, &yymsp[0].minor.yy129); } break; - case 85: /* cmd ::= USE db_name */ + case 86: /* cmd ::= USE db_name */ { pCxt->pRootNode = createUseDatabaseStmt(pCxt, &yymsp[0].minor.yy129); } break; - case 86: /* cmd ::= ALTER DATABASE db_name alter_db_options */ + case 87: /* cmd ::= ALTER DATABASE db_name alter_db_options */ { pCxt->pRootNode = createAlterDatabaseStmt(pCxt, &yymsp[-1].minor.yy129, yymsp[0].minor.yy452); } break; - case 87: /* cmd ::= FLUSH DATABASE db_name */ + case 88: /* cmd ::= FLUSH DATABASE db_name */ { pCxt->pRootNode = createFlushDatabaseStmt(pCxt, &yymsp[0].minor.yy129); } break; - case 88: /* cmd ::= TRIM DATABASE db_name speed_opt */ + case 89: /* cmd ::= TRIM DATABASE db_name speed_opt */ { pCxt->pRootNode = createTrimDatabaseStmt(pCxt, &yymsp[-1].minor.yy129, yymsp[0].minor.yy710); } break; - case 89: /* cmd ::= COMPACT DATABASE db_name start_opt end_opt */ + case 90: /* cmd ::= COMPACT DATABASE db_name start_opt end_opt */ { pCxt->pRootNode = createCompactStmt(pCxt, &yymsp[-2].minor.yy129, yymsp[-1].minor.yy452, yymsp[0].minor.yy452); } break; - case 90: /* not_exists_opt ::= IF NOT EXISTS */ + case 91: /* not_exists_opt ::= IF NOT EXISTS */ { yymsp[-2].minor.yy137 = true; } break; - case 92: /* exists_opt ::= IF EXISTS */ - case 355: /* or_replace_opt ::= OR REPLACE */ yytestcase(yyruleno==355); - case 381: /* ignore_opt ::= IGNORE UNTREATED */ yytestcase(yyruleno==381); + case 93: /* exists_opt ::= IF EXISTS */ + case 356: /* or_replace_opt ::= OR REPLACE */ yytestcase(yyruleno==356); + case 382: /* ignore_opt ::= IGNORE UNTREATED */ yytestcase(yyruleno==382); { yymsp[-1].minor.yy137 = true; } break; - case 94: /* db_options ::= */ + case 95: /* db_options ::= */ { yymsp[1].minor.yy452 = createDefaultDatabaseOptions(pCxt); } break; - case 95: /* db_options ::= db_options BUFFER NK_INTEGER */ + case 96: /* db_options ::= db_options BUFFER NK_INTEGER */ { yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_BUFFER, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy452 = yylhsminor.yy452; break; - case 96: /* db_options ::= db_options CACHEMODEL NK_STRING */ + case 97: /* db_options ::= db_options CACHEMODEL NK_STRING */ { yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_CACHEMODEL, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy452 = yylhsminor.yy452; break; - case 97: /* db_options ::= db_options CACHESIZE NK_INTEGER */ + case 98: /* db_options ::= db_options CACHESIZE NK_INTEGER */ { yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_CACHESIZE, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy452 = yylhsminor.yy452; break; - case 98: /* db_options ::= db_options COMP NK_INTEGER */ + case 99: /* db_options ::= db_options COMP NK_INTEGER */ { yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_COMP, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy452 = yylhsminor.yy452; break; - case 99: /* db_options ::= db_options DURATION NK_INTEGER */ - case 100: /* db_options ::= db_options DURATION NK_VARIABLE */ yytestcase(yyruleno==100); + case 100: /* db_options ::= db_options DURATION NK_INTEGER */ + case 101: /* db_options ::= db_options DURATION NK_VARIABLE */ yytestcase(yyruleno==101); { yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_DAYS, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy452 = yylhsminor.yy452; break; - case 101: /* db_options ::= db_options MAXROWS NK_INTEGER */ + case 102: /* db_options ::= db_options MAXROWS NK_INTEGER */ { yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_MAXROWS, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy452 = yylhsminor.yy452; break; - case 102: /* db_options ::= db_options MINROWS NK_INTEGER */ + case 103: /* db_options ::= db_options MINROWS NK_INTEGER */ { yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_MINROWS, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy452 = yylhsminor.yy452; break; - case 103: /* db_options ::= db_options KEEP integer_list */ - case 104: /* db_options ::= db_options KEEP variable_list */ yytestcase(yyruleno==104); + case 104: /* db_options ::= db_options KEEP integer_list */ + case 105: /* db_options ::= db_options KEEP variable_list */ yytestcase(yyruleno==105); { yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_KEEP, yymsp[0].minor.yy844); } yymsp[-2].minor.yy452 = yylhsminor.yy452; break; - case 105: /* db_options ::= db_options PAGES NK_INTEGER */ + case 106: /* db_options ::= db_options PAGES NK_INTEGER */ { yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_PAGES, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy452 = yylhsminor.yy452; break; - case 106: /* db_options ::= db_options PAGESIZE NK_INTEGER */ + case 107: /* db_options ::= db_options PAGESIZE NK_INTEGER */ { yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_PAGESIZE, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy452 = yylhsminor.yy452; break; - case 107: /* db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */ + case 108: /* db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */ { yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_TSDB_PAGESIZE, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy452 = yylhsminor.yy452; break; - case 108: /* db_options ::= db_options PRECISION NK_STRING */ + case 109: /* db_options ::= db_options PRECISION NK_STRING */ { yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_PRECISION, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy452 = yylhsminor.yy452; break; - case 109: /* db_options ::= db_options REPLICA NK_INTEGER */ + case 110: /* db_options ::= db_options REPLICA NK_INTEGER */ { yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_REPLICA, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy452 = yylhsminor.yy452; break; - case 110: /* db_options ::= db_options VGROUPS NK_INTEGER */ + case 111: /* db_options ::= db_options VGROUPS NK_INTEGER */ { yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_VGROUPS, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy452 = yylhsminor.yy452; break; - case 111: /* db_options ::= db_options SINGLE_STABLE NK_INTEGER */ + case 112: /* db_options ::= db_options SINGLE_STABLE NK_INTEGER */ { yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_SINGLE_STABLE, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy452 = yylhsminor.yy452; break; - case 112: /* db_options ::= db_options RETENTIONS retention_list */ + case 113: /* db_options ::= db_options RETENTIONS retention_list */ { yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_RETENTIONS, yymsp[0].minor.yy844); } yymsp[-2].minor.yy452 = yylhsminor.yy452; break; - case 113: /* db_options ::= db_options SCHEMALESS NK_INTEGER */ + case 114: /* db_options ::= db_options SCHEMALESS NK_INTEGER */ { yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_SCHEMALESS, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy452 = yylhsminor.yy452; break; - case 114: /* db_options ::= db_options WAL_LEVEL NK_INTEGER */ + case 115: /* db_options ::= db_options WAL_LEVEL NK_INTEGER */ { yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_WAL, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy452 = yylhsminor.yy452; break; - case 115: /* db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */ + case 116: /* db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */ { yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_FSYNC, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy452 = yylhsminor.yy452; break; - case 116: /* db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */ + case 117: /* db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */ { yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_WAL_RETENTION_PERIOD, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy452 = yylhsminor.yy452; break; - case 117: /* db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ + case 118: /* 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; @@ -5084,11 +5090,11 @@ static YYACTIONTYPE yy_reduce( } yymsp[-3].minor.yy452 = yylhsminor.yy452; break; - case 118: /* db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */ + case 119: /* db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */ { yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_WAL_RETENTION_SIZE, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy452 = yylhsminor.yy452; break; - case 119: /* db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ + case 120: /* 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; @@ -5096,863 +5102,862 @@ static YYACTIONTYPE yy_reduce( } yymsp[-3].minor.yy452 = yylhsminor.yy452; break; - case 120: /* db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */ + case 121: /* db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */ { yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_WAL_ROLL_PERIOD, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy452 = yylhsminor.yy452; break; - case 121: /* db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */ + case 122: /* db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */ { yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_WAL_SEGMENT_SIZE, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy452 = yylhsminor.yy452; break; - case 122: /* db_options ::= db_options STT_TRIGGER NK_INTEGER */ + case 123: /* db_options ::= db_options STT_TRIGGER NK_INTEGER */ { yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_STT_TRIGGER, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy452 = yylhsminor.yy452; break; - case 123: /* db_options ::= db_options TABLE_PREFIX signed */ + case 124: /* db_options ::= db_options TABLE_PREFIX signed */ { yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_TABLE_PREFIX, yymsp[0].minor.yy452); } yymsp[-2].minor.yy452 = yylhsminor.yy452; break; - case 124: /* db_options ::= db_options TABLE_SUFFIX signed */ + case 125: /* db_options ::= db_options TABLE_SUFFIX signed */ { yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_TABLE_SUFFIX, yymsp[0].minor.yy452); } yymsp[-2].minor.yy452 = yylhsminor.yy452; break; - case 125: /* db_options ::= db_options KEEP_TIME_OFFSET NK_INTEGER */ + case 126: /* db_options ::= db_options KEEP_TIME_OFFSET NK_INTEGER */ { yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_KEEP_TIME_OFFSET, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy452 = yylhsminor.yy452; break; - case 126: /* alter_db_options ::= alter_db_option */ + case 127: /* alter_db_options ::= alter_db_option */ { yylhsminor.yy452 = createAlterDatabaseOptions(pCxt); yylhsminor.yy452 = setAlterDatabaseOption(pCxt, yylhsminor.yy452, &yymsp[0].minor.yy335); } yymsp[0].minor.yy452 = yylhsminor.yy452; break; - case 127: /* alter_db_options ::= alter_db_options alter_db_option */ + case 128: /* alter_db_options ::= alter_db_options alter_db_option */ { yylhsminor.yy452 = setAlterDatabaseOption(pCxt, yymsp[-1].minor.yy452, &yymsp[0].minor.yy335); } yymsp[-1].minor.yy452 = yylhsminor.yy452; break; - case 128: /* alter_db_option ::= BUFFER NK_INTEGER */ + case 129: /* alter_db_option ::= BUFFER NK_INTEGER */ { yymsp[-1].minor.yy335.type = DB_OPTION_BUFFER; yymsp[-1].minor.yy335.val = yymsp[0].minor.yy0; } break; - case 129: /* alter_db_option ::= CACHEMODEL NK_STRING */ + case 130: /* alter_db_option ::= CACHEMODEL NK_STRING */ { yymsp[-1].minor.yy335.type = DB_OPTION_CACHEMODEL; yymsp[-1].minor.yy335.val = yymsp[0].minor.yy0; } break; - case 130: /* alter_db_option ::= CACHESIZE NK_INTEGER */ + case 131: /* alter_db_option ::= CACHESIZE NK_INTEGER */ { yymsp[-1].minor.yy335.type = DB_OPTION_CACHESIZE; yymsp[-1].minor.yy335.val = yymsp[0].minor.yy0; } break; - case 131: /* alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */ + case 132: /* alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */ { yymsp[-1].minor.yy335.type = DB_OPTION_FSYNC; yymsp[-1].minor.yy335.val = yymsp[0].minor.yy0; } break; - case 132: /* alter_db_option ::= KEEP integer_list */ - case 133: /* alter_db_option ::= KEEP variable_list */ yytestcase(yyruleno==133); + case 133: /* alter_db_option ::= KEEP integer_list */ + case 134: /* alter_db_option ::= KEEP variable_list */ yytestcase(yyruleno==134); { yymsp[-1].minor.yy335.type = DB_OPTION_KEEP; yymsp[-1].minor.yy335.pList = yymsp[0].minor.yy844; } break; - case 134: /* alter_db_option ::= PAGES NK_INTEGER */ + case 135: /* alter_db_option ::= PAGES NK_INTEGER */ { yymsp[-1].minor.yy335.type = DB_OPTION_PAGES; yymsp[-1].minor.yy335.val = yymsp[0].minor.yy0; } break; - case 135: /* alter_db_option ::= REPLICA NK_INTEGER */ + case 136: /* alter_db_option ::= REPLICA NK_INTEGER */ { yymsp[-1].minor.yy335.type = DB_OPTION_REPLICA; yymsp[-1].minor.yy335.val = yymsp[0].minor.yy0; } break; - case 136: /* alter_db_option ::= WAL_LEVEL NK_INTEGER */ + case 137: /* alter_db_option ::= WAL_LEVEL NK_INTEGER */ { yymsp[-1].minor.yy335.type = DB_OPTION_WAL; yymsp[-1].minor.yy335.val = yymsp[0].minor.yy0; } break; - case 137: /* alter_db_option ::= STT_TRIGGER NK_INTEGER */ + case 138: /* alter_db_option ::= STT_TRIGGER NK_INTEGER */ { yymsp[-1].minor.yy335.type = DB_OPTION_STT_TRIGGER; yymsp[-1].minor.yy335.val = yymsp[0].minor.yy0; } break; - case 138: /* alter_db_option ::= MINROWS NK_INTEGER */ + case 139: /* alter_db_option ::= MINROWS NK_INTEGER */ { yymsp[-1].minor.yy335.type = DB_OPTION_MINROWS; yymsp[-1].minor.yy335.val = yymsp[0].minor.yy0; } break; - case 139: /* alter_db_option ::= WAL_RETENTION_PERIOD NK_INTEGER */ + case 140: /* alter_db_option ::= WAL_RETENTION_PERIOD NK_INTEGER */ { yymsp[-1].minor.yy335.type = DB_OPTION_WAL_RETENTION_PERIOD; yymsp[-1].minor.yy335.val = yymsp[0].minor.yy0; } break; - case 140: /* alter_db_option ::= WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ + case 141: /* alter_db_option ::= 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; yymsp[-2].minor.yy335.type = DB_OPTION_WAL_RETENTION_PERIOD; yymsp[-2].minor.yy335.val = t; } break; - case 141: /* alter_db_option ::= WAL_RETENTION_SIZE NK_INTEGER */ + case 142: /* alter_db_option ::= WAL_RETENTION_SIZE NK_INTEGER */ { yymsp[-1].minor.yy335.type = DB_OPTION_WAL_RETENTION_SIZE; yymsp[-1].minor.yy335.val = yymsp[0].minor.yy0; } break; - case 142: /* alter_db_option ::= WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ + case 143: /* alter_db_option ::= 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; yymsp[-2].minor.yy335.type = DB_OPTION_WAL_RETENTION_SIZE; yymsp[-2].minor.yy335.val = t; } break; - case 143: /* alter_db_option ::= KEEP_TIME_OFFSET NK_INTEGER */ + case 144: /* alter_db_option ::= KEEP_TIME_OFFSET NK_INTEGER */ { yymsp[-1].minor.yy335.type = DB_OPTION_KEEP_TIME_OFFSET; yymsp[-1].minor.yy335.val = yymsp[0].minor.yy0; } break; - case 144: /* integer_list ::= NK_INTEGER */ + case 145: /* integer_list ::= NK_INTEGER */ { yylhsminor.yy844 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy844 = yylhsminor.yy844; break; - case 145: /* integer_list ::= integer_list NK_COMMA NK_INTEGER */ - case 393: /* dnode_list ::= dnode_list DNODE NK_INTEGER */ yytestcase(yyruleno==393); + case 146: /* integer_list ::= integer_list NK_COMMA NK_INTEGER */ + case 394: /* dnode_list ::= dnode_list DNODE NK_INTEGER */ yytestcase(yyruleno==394); { yylhsminor.yy844 = addNodeToList(pCxt, yymsp[-2].minor.yy844, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } yymsp[-2].minor.yy844 = yylhsminor.yy844; break; - case 146: /* variable_list ::= NK_VARIABLE */ + case 147: /* variable_list ::= NK_VARIABLE */ { yylhsminor.yy844 = createNodeList(pCxt, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy844 = yylhsminor.yy844; break; - case 147: /* variable_list ::= variable_list NK_COMMA NK_VARIABLE */ + case 148: /* variable_list ::= variable_list NK_COMMA NK_VARIABLE */ { yylhsminor.yy844 = addNodeToList(pCxt, yymsp[-2].minor.yy844, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } yymsp[-2].minor.yy844 = yylhsminor.yy844; break; - case 148: /* retention_list ::= retention */ - case 178: /* multi_create_clause ::= create_subtable_clause */ yytestcase(yyruleno==178); - case 181: /* multi_drop_clause ::= drop_table_clause */ yytestcase(yyruleno==181); - case 188: /* column_def_list ::= column_def */ yytestcase(yyruleno==188); - case 232: /* rollup_func_list ::= rollup_func_name */ yytestcase(yyruleno==232); - case 237: /* col_name_list ::= col_name */ yytestcase(yyruleno==237); - case 299: /* tag_list_opt ::= tag_item */ yytestcase(yyruleno==299); - case 316: /* func_list ::= func */ yytestcase(yyruleno==316); - case 422: /* literal_list ::= signed_literal */ yytestcase(yyruleno==422); - case 490: /* other_para_list ::= star_func_para */ yytestcase(yyruleno==490); - case 496: /* when_then_list ::= when_then_expr */ yytestcase(yyruleno==496); - case 555: /* select_list ::= select_item */ yytestcase(yyruleno==555); - case 566: /* partition_list ::= partition_item */ yytestcase(yyruleno==566); - case 622: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==622); + case 149: /* retention_list ::= retention */ + case 179: /* multi_create_clause ::= create_subtable_clause */ yytestcase(yyruleno==179); + case 182: /* multi_drop_clause ::= drop_table_clause */ yytestcase(yyruleno==182); + case 189: /* column_def_list ::= column_def */ yytestcase(yyruleno==189); + case 233: /* rollup_func_list ::= rollup_func_name */ yytestcase(yyruleno==233); + case 238: /* col_name_list ::= col_name */ yytestcase(yyruleno==238); + case 300: /* tag_list_opt ::= tag_item */ yytestcase(yyruleno==300); + case 317: /* func_list ::= func */ yytestcase(yyruleno==317); + case 423: /* literal_list ::= signed_literal */ yytestcase(yyruleno==423); + case 491: /* other_para_list ::= star_func_para */ yytestcase(yyruleno==491); + case 497: /* when_then_list ::= when_then_expr */ yytestcase(yyruleno==497); + case 556: /* select_list ::= select_item */ yytestcase(yyruleno==556); + case 567: /* partition_list ::= partition_item */ yytestcase(yyruleno==567); + case 623: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==623); { yylhsminor.yy844 = createNodeList(pCxt, yymsp[0].minor.yy452); } yymsp[0].minor.yy844 = yylhsminor.yy844; break; - case 149: /* retention_list ::= retention_list NK_COMMA retention */ - case 182: /* multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause */ yytestcase(yyruleno==182); - case 189: /* column_def_list ::= column_def_list NK_COMMA column_def */ yytestcase(yyruleno==189); - case 233: /* rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ yytestcase(yyruleno==233); - case 238: /* col_name_list ::= col_name_list NK_COMMA col_name */ yytestcase(yyruleno==238); - case 300: /* tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ yytestcase(yyruleno==300); - case 317: /* func_list ::= func_list NK_COMMA func */ yytestcase(yyruleno==317); - case 423: /* literal_list ::= literal_list NK_COMMA signed_literal */ yytestcase(yyruleno==423); - case 491: /* other_para_list ::= other_para_list NK_COMMA star_func_para */ yytestcase(yyruleno==491); - case 556: /* select_list ::= select_list NK_COMMA select_item */ yytestcase(yyruleno==556); - case 567: /* partition_list ::= partition_list NK_COMMA partition_item */ yytestcase(yyruleno==567); - case 623: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==623); + case 150: /* retention_list ::= retention_list NK_COMMA retention */ + case 183: /* multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause */ yytestcase(yyruleno==183); + case 190: /* column_def_list ::= column_def_list NK_COMMA column_def */ yytestcase(yyruleno==190); + case 234: /* rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ yytestcase(yyruleno==234); + case 239: /* col_name_list ::= col_name_list NK_COMMA col_name */ yytestcase(yyruleno==239); + case 301: /* tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ yytestcase(yyruleno==301); + case 318: /* func_list ::= func_list NK_COMMA func */ yytestcase(yyruleno==318); + case 424: /* literal_list ::= literal_list NK_COMMA signed_literal */ yytestcase(yyruleno==424); + case 492: /* other_para_list ::= other_para_list NK_COMMA star_func_para */ yytestcase(yyruleno==492); + case 557: /* select_list ::= select_list NK_COMMA select_item */ yytestcase(yyruleno==557); + case 568: /* partition_list ::= partition_list NK_COMMA partition_item */ yytestcase(yyruleno==568); + case 624: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==624); { yylhsminor.yy844 = addNodeToList(pCxt, yymsp[-2].minor.yy844, yymsp[0].minor.yy452); } yymsp[-2].minor.yy844 = yylhsminor.yy844; break; - case 150: /* retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ + case 151: /* retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ { yylhsminor.yy452 = createNodeListNodeEx(pCxt, createDurationValueNode(pCxt, &yymsp[-2].minor.yy0), createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } yymsp[-2].minor.yy452 = yylhsminor.yy452; break; - case 151: /* speed_opt ::= */ - case 350: /* bufsize_opt ::= */ yytestcase(yyruleno==350); + case 152: /* speed_opt ::= */ + case 351: /* bufsize_opt ::= */ yytestcase(yyruleno==351); { yymsp[1].minor.yy710 = 0; } break; - case 152: /* speed_opt ::= BWLIMIT NK_INTEGER */ - case 351: /* bufsize_opt ::= BUFSIZE NK_INTEGER */ yytestcase(yyruleno==351); + case 153: /* speed_opt ::= BWLIMIT NK_INTEGER */ + case 352: /* bufsize_opt ::= BUFSIZE NK_INTEGER */ yytestcase(yyruleno==352); { yymsp[-1].minor.yy710 = taosStr2Int32(yymsp[0].minor.yy0.z, NULL, 10); } break; - case 154: /* start_opt ::= START WITH NK_INTEGER */ - case 158: /* end_opt ::= END WITH NK_INTEGER */ yytestcase(yyruleno==158); + case 155: /* start_opt ::= START WITH NK_INTEGER */ + case 159: /* end_opt ::= END WITH NK_INTEGER */ yytestcase(yyruleno==159); { yymsp[-2].minor.yy452 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } break; - case 155: /* start_opt ::= START WITH NK_STRING */ - case 159: /* end_opt ::= END WITH NK_STRING */ yytestcase(yyruleno==159); + case 156: /* start_opt ::= START WITH NK_STRING */ + case 160: /* end_opt ::= END WITH NK_STRING */ yytestcase(yyruleno==160); { yymsp[-2].minor.yy452 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } break; - case 156: /* start_opt ::= START WITH TIMESTAMP NK_STRING */ - case 160: /* end_opt ::= END WITH TIMESTAMP NK_STRING */ yytestcase(yyruleno==160); + case 157: /* start_opt ::= START WITH TIMESTAMP NK_STRING */ + case 161: /* end_opt ::= END WITH TIMESTAMP NK_STRING */ yytestcase(yyruleno==161); { yymsp[-3].minor.yy452 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } break; - case 161: /* cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ - case 163: /* cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ yytestcase(yyruleno==163); + case 162: /* cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ + case 164: /* cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ yytestcase(yyruleno==164); { pCxt->pRootNode = createCreateTableStmt(pCxt, yymsp[-6].minor.yy137, yymsp[-5].minor.yy452, yymsp[-3].minor.yy844, yymsp[-1].minor.yy844, yymsp[0].minor.yy452); } break; - case 162: /* cmd ::= CREATE TABLE multi_create_clause */ + case 163: /* cmd ::= CREATE TABLE multi_create_clause */ { pCxt->pRootNode = createCreateMultiTableStmt(pCxt, yymsp[0].minor.yy844); } break; - case 164: /* cmd ::= DROP TABLE multi_drop_clause */ + case 165: /* cmd ::= DROP TABLE multi_drop_clause */ { pCxt->pRootNode = createDropTableStmt(pCxt, yymsp[0].minor.yy844); } break; - case 165: /* cmd ::= DROP STABLE exists_opt full_table_name */ + case 166: /* cmd ::= DROP STABLE exists_opt full_table_name */ { pCxt->pRootNode = createDropSuperTableStmt(pCxt, yymsp[-1].minor.yy137, yymsp[0].minor.yy452); } break; - case 166: /* cmd ::= ALTER TABLE alter_table_clause */ - case 395: /* cmd ::= query_or_subquery */ yytestcase(yyruleno==395); - case 396: /* cmd ::= insert_query */ yytestcase(yyruleno==396); + case 167: /* cmd ::= ALTER TABLE alter_table_clause */ + case 396: /* cmd ::= query_or_subquery */ yytestcase(yyruleno==396); + case 397: /* cmd ::= insert_query */ yytestcase(yyruleno==397); { pCxt->pRootNode = yymsp[0].minor.yy452; } break; - case 167: /* cmd ::= ALTER STABLE alter_table_clause */ + case 168: /* cmd ::= ALTER STABLE alter_table_clause */ { pCxt->pRootNode = setAlterSuperTableType(yymsp[0].minor.yy452); } break; - case 168: /* alter_table_clause ::= full_table_name alter_table_options */ + case 169: /* alter_table_clause ::= full_table_name alter_table_options */ { yylhsminor.yy452 = createAlterTableModifyOptions(pCxt, yymsp[-1].minor.yy452, yymsp[0].minor.yy452); } yymsp[-1].minor.yy452 = yylhsminor.yy452; break; - case 169: /* alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ + case 170: /* alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ { yylhsminor.yy452 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy452, TSDB_ALTER_TABLE_ADD_COLUMN, &yymsp[-1].minor.yy129, yymsp[0].minor.yy794); } yymsp[-4].minor.yy452 = yylhsminor.yy452; break; - case 170: /* alter_table_clause ::= full_table_name DROP COLUMN column_name */ + case 171: /* alter_table_clause ::= full_table_name DROP COLUMN column_name */ { yylhsminor.yy452 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy452, TSDB_ALTER_TABLE_DROP_COLUMN, &yymsp[0].minor.yy129); } yymsp[-3].minor.yy452 = yylhsminor.yy452; break; - case 171: /* alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ + case 172: /* alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ { yylhsminor.yy452 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy452, TSDB_ALTER_TABLE_UPDATE_COLUMN_BYTES, &yymsp[-1].minor.yy129, yymsp[0].minor.yy794); } yymsp[-4].minor.yy452 = yylhsminor.yy452; break; - case 172: /* alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ + case 173: /* alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ { yylhsminor.yy452 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy452, TSDB_ALTER_TABLE_UPDATE_COLUMN_NAME, &yymsp[-1].minor.yy129, &yymsp[0].minor.yy129); } yymsp[-4].minor.yy452 = yylhsminor.yy452; break; - case 173: /* alter_table_clause ::= full_table_name ADD TAG column_name type_name */ + case 174: /* alter_table_clause ::= full_table_name ADD TAG column_name type_name */ { yylhsminor.yy452 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy452, TSDB_ALTER_TABLE_ADD_TAG, &yymsp[-1].minor.yy129, yymsp[0].minor.yy794); } yymsp[-4].minor.yy452 = yylhsminor.yy452; break; - case 174: /* alter_table_clause ::= full_table_name DROP TAG column_name */ + case 175: /* alter_table_clause ::= full_table_name DROP TAG column_name */ { yylhsminor.yy452 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy452, TSDB_ALTER_TABLE_DROP_TAG, &yymsp[0].minor.yy129); } yymsp[-3].minor.yy452 = yylhsminor.yy452; break; - case 175: /* alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ + case 176: /* alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ { yylhsminor.yy452 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy452, TSDB_ALTER_TABLE_UPDATE_TAG_BYTES, &yymsp[-1].minor.yy129, yymsp[0].minor.yy794); } yymsp[-4].minor.yy452 = yylhsminor.yy452; break; - case 176: /* alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ + case 177: /* alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ { yylhsminor.yy452 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy452, TSDB_ALTER_TABLE_UPDATE_TAG_NAME, &yymsp[-1].minor.yy129, &yymsp[0].minor.yy129); } yymsp[-4].minor.yy452 = yylhsminor.yy452; break; - case 177: /* alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */ + case 178: /* alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */ { yylhsminor.yy452 = createAlterTableSetTag(pCxt, yymsp[-5].minor.yy452, &yymsp[-2].minor.yy129, yymsp[0].minor.yy452); } yymsp[-5].minor.yy452 = yylhsminor.yy452; break; - case 179: /* multi_create_clause ::= multi_create_clause create_subtable_clause */ - case 497: /* when_then_list ::= when_then_list when_then_expr */ yytestcase(yyruleno==497); + case 180: /* multi_create_clause ::= multi_create_clause create_subtable_clause */ + case 498: /* when_then_list ::= when_then_list when_then_expr */ yytestcase(yyruleno==498); { yylhsminor.yy844 = addNodeToList(pCxt, yymsp[-1].minor.yy844, yymsp[0].minor.yy452); } yymsp[-1].minor.yy844 = yylhsminor.yy844; break; - case 180: /* 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 */ + case 181: /* 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.yy452 = createCreateSubTableClause(pCxt, yymsp[-9].minor.yy137, yymsp[-8].minor.yy452, yymsp[-6].minor.yy452, yymsp[-5].minor.yy844, yymsp[-2].minor.yy844, yymsp[0].minor.yy452); } yymsp[-9].minor.yy452 = yylhsminor.yy452; break; - case 183: /* drop_table_clause ::= exists_opt full_table_name */ + case 184: /* drop_table_clause ::= exists_opt full_table_name */ { yylhsminor.yy452 = createDropTableClause(pCxt, yymsp[-1].minor.yy137, yymsp[0].minor.yy452); } yymsp[-1].minor.yy452 = yylhsminor.yy452; break; - case 185: /* specific_cols_opt ::= NK_LP col_name_list NK_RP */ - case 365: /* col_list_opt ::= NK_LP col_name_list NK_RP */ yytestcase(yyruleno==365); + case 186: /* specific_cols_opt ::= NK_LP col_name_list NK_RP */ + case 366: /* col_list_opt ::= NK_LP col_name_list NK_RP */ yytestcase(yyruleno==366); { yymsp[-2].minor.yy844 = yymsp[-1].minor.yy844; } break; - case 186: /* full_table_name ::= table_name */ + case 187: /* full_table_name ::= table_name */ { yylhsminor.yy452 = createRealTableNode(pCxt, NULL, &yymsp[0].minor.yy129, NULL); } yymsp[0].minor.yy452 = yylhsminor.yy452; break; - case 187: /* full_table_name ::= db_name NK_DOT table_name */ + case 188: /* full_table_name ::= db_name NK_DOT table_name */ { yylhsminor.yy452 = createRealTableNode(pCxt, &yymsp[-2].minor.yy129, &yymsp[0].minor.yy129, NULL); } yymsp[-2].minor.yy452 = yylhsminor.yy452; break; - case 190: /* column_def ::= column_name type_name */ + case 191: /* column_def ::= column_name type_name */ { yylhsminor.yy452 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy129, yymsp[0].minor.yy794, NULL); } yymsp[-1].minor.yy452 = yylhsminor.yy452; break; - case 191: /* type_name ::= BOOL */ + case 192: /* type_name ::= BOOL */ { yymsp[0].minor.yy794 = createDataType(TSDB_DATA_TYPE_BOOL); } break; - case 192: /* type_name ::= TINYINT */ + case 193: /* type_name ::= TINYINT */ { yymsp[0].minor.yy794 = createDataType(TSDB_DATA_TYPE_TINYINT); } break; - case 193: /* type_name ::= SMALLINT */ + case 194: /* type_name ::= SMALLINT */ { yymsp[0].minor.yy794 = createDataType(TSDB_DATA_TYPE_SMALLINT); } break; - case 194: /* type_name ::= INT */ - case 195: /* type_name ::= INTEGER */ yytestcase(yyruleno==195); + case 195: /* type_name ::= INT */ + case 196: /* type_name ::= INTEGER */ yytestcase(yyruleno==196); { yymsp[0].minor.yy794 = createDataType(TSDB_DATA_TYPE_INT); } break; - case 196: /* type_name ::= BIGINT */ + case 197: /* type_name ::= BIGINT */ { yymsp[0].minor.yy794 = createDataType(TSDB_DATA_TYPE_BIGINT); } break; - case 197: /* type_name ::= FLOAT */ + case 198: /* type_name ::= FLOAT */ { yymsp[0].minor.yy794 = createDataType(TSDB_DATA_TYPE_FLOAT); } break; - case 198: /* type_name ::= DOUBLE */ + case 199: /* type_name ::= DOUBLE */ { yymsp[0].minor.yy794 = createDataType(TSDB_DATA_TYPE_DOUBLE); } break; - case 199: /* type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ + case 200: /* type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ { yymsp[-3].minor.yy794 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy0); } break; - case 200: /* type_name ::= TIMESTAMP */ + case 201: /* type_name ::= TIMESTAMP */ { yymsp[0].minor.yy794 = createDataType(TSDB_DATA_TYPE_TIMESTAMP); } break; - case 201: /* type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ + case 202: /* type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ { yymsp[-3].minor.yy794 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, &yymsp[-1].minor.yy0); } break; - case 202: /* type_name ::= TINYINT UNSIGNED */ + case 203: /* type_name ::= TINYINT UNSIGNED */ { yymsp[-1].minor.yy794 = createDataType(TSDB_DATA_TYPE_UTINYINT); } break; - case 203: /* type_name ::= SMALLINT UNSIGNED */ + case 204: /* type_name ::= SMALLINT UNSIGNED */ { yymsp[-1].minor.yy794 = createDataType(TSDB_DATA_TYPE_USMALLINT); } break; - case 204: /* type_name ::= INT UNSIGNED */ + case 205: /* type_name ::= INT UNSIGNED */ { yymsp[-1].minor.yy794 = createDataType(TSDB_DATA_TYPE_UINT); } break; - case 205: /* type_name ::= BIGINT UNSIGNED */ + case 206: /* type_name ::= BIGINT UNSIGNED */ { yymsp[-1].minor.yy794 = createDataType(TSDB_DATA_TYPE_UBIGINT); } break; - case 206: /* type_name ::= JSON */ + case 207: /* type_name ::= JSON */ { yymsp[0].minor.yy794 = createDataType(TSDB_DATA_TYPE_JSON); } break; - case 207: /* type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ + case 208: /* type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ { yymsp[-3].minor.yy794 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, &yymsp[-1].minor.yy0); } break; - case 208: /* type_name ::= MEDIUMBLOB */ + case 209: /* type_name ::= MEDIUMBLOB */ { yymsp[0].minor.yy794 = createDataType(TSDB_DATA_TYPE_MEDIUMBLOB); } break; - case 209: /* type_name ::= BLOB */ + case 210: /* type_name ::= BLOB */ { yymsp[0].minor.yy794 = createDataType(TSDB_DATA_TYPE_BLOB); } break; - case 210: /* type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ + case 211: /* type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ { yymsp[-3].minor.yy794 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, &yymsp[-1].minor.yy0); } break; - case 211: /* type_name ::= GEOMETRY NK_LP NK_INTEGER NK_RP */ + case 212: /* type_name ::= GEOMETRY NK_LP NK_INTEGER NK_RP */ { yymsp[-3].minor.yy794 = createVarLenDataType(TSDB_DATA_TYPE_GEOMETRY, &yymsp[-1].minor.yy0); } break; - case 212: /* type_name ::= DECIMAL */ + case 213: /* type_name ::= DECIMAL */ { yymsp[0].minor.yy794 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; - case 213: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ + case 214: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ { yymsp[-3].minor.yy794 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; - case 214: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ + case 215: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ { yymsp[-5].minor.yy794 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; - case 217: /* tags_def ::= TAGS NK_LP column_def_list NK_RP */ - case 368: /* tag_def_or_ref_opt ::= TAGS NK_LP col_name_list NK_RP */ yytestcase(yyruleno==368); + case 218: /* tags_def ::= TAGS NK_LP column_def_list NK_RP */ + case 369: /* tag_def_or_ref_opt ::= TAGS NK_LP col_name_list NK_RP */ yytestcase(yyruleno==369); { yymsp[-3].minor.yy844 = yymsp[-1].minor.yy844; } break; - case 218: /* table_options ::= */ + case 219: /* table_options ::= */ { yymsp[1].minor.yy452 = createDefaultTableOptions(pCxt); } break; - case 219: /* table_options ::= table_options COMMENT NK_STRING */ + case 220: /* table_options ::= table_options COMMENT NK_STRING */ { yylhsminor.yy452 = setTableOption(pCxt, yymsp[-2].minor.yy452, TABLE_OPTION_COMMENT, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy452 = yylhsminor.yy452; break; - case 220: /* table_options ::= table_options MAX_DELAY duration_list */ + case 221: /* table_options ::= table_options MAX_DELAY duration_list */ { yylhsminor.yy452 = setTableOption(pCxt, yymsp[-2].minor.yy452, TABLE_OPTION_MAXDELAY, yymsp[0].minor.yy844); } yymsp[-2].minor.yy452 = yylhsminor.yy452; break; - case 221: /* table_options ::= table_options WATERMARK duration_list */ + case 222: /* table_options ::= table_options WATERMARK duration_list */ { yylhsminor.yy452 = setTableOption(pCxt, yymsp[-2].minor.yy452, TABLE_OPTION_WATERMARK, yymsp[0].minor.yy844); } yymsp[-2].minor.yy452 = yylhsminor.yy452; break; - case 222: /* table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ + case 223: /* table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ { yylhsminor.yy452 = setTableOption(pCxt, yymsp[-4].minor.yy452, TABLE_OPTION_ROLLUP, yymsp[-1].minor.yy844); } yymsp[-4].minor.yy452 = yylhsminor.yy452; break; - case 223: /* table_options ::= table_options TTL NK_INTEGER */ + case 224: /* table_options ::= table_options TTL NK_INTEGER */ { yylhsminor.yy452 = setTableOption(pCxt, yymsp[-2].minor.yy452, TABLE_OPTION_TTL, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy452 = yylhsminor.yy452; break; - case 224: /* table_options ::= table_options SMA NK_LP col_name_list NK_RP */ + case 225: /* table_options ::= table_options SMA NK_LP col_name_list NK_RP */ { yylhsminor.yy452 = setTableOption(pCxt, yymsp[-4].minor.yy452, TABLE_OPTION_SMA, yymsp[-1].minor.yy844); } yymsp[-4].minor.yy452 = yylhsminor.yy452; break; - case 225: /* table_options ::= table_options DELETE_MARK duration_list */ + case 226: /* table_options ::= table_options DELETE_MARK duration_list */ { yylhsminor.yy452 = setTableOption(pCxt, yymsp[-2].minor.yy452, TABLE_OPTION_DELETE_MARK, yymsp[0].minor.yy844); } yymsp[-2].minor.yy452 = yylhsminor.yy452; break; - case 226: /* alter_table_options ::= alter_table_option */ + case 227: /* alter_table_options ::= alter_table_option */ { yylhsminor.yy452 = createAlterTableOptions(pCxt); yylhsminor.yy452 = setTableOption(pCxt, yylhsminor.yy452, yymsp[0].minor.yy335.type, &yymsp[0].minor.yy335.val); } yymsp[0].minor.yy452 = yylhsminor.yy452; break; - case 227: /* alter_table_options ::= alter_table_options alter_table_option */ + case 228: /* alter_table_options ::= alter_table_options alter_table_option */ { yylhsminor.yy452 = setTableOption(pCxt, yymsp[-1].minor.yy452, yymsp[0].minor.yy335.type, &yymsp[0].minor.yy335.val); } yymsp[-1].minor.yy452 = yylhsminor.yy452; break; - case 228: /* alter_table_option ::= COMMENT NK_STRING */ + case 229: /* alter_table_option ::= COMMENT NK_STRING */ { yymsp[-1].minor.yy335.type = TABLE_OPTION_COMMENT; yymsp[-1].minor.yy335.val = yymsp[0].minor.yy0; } break; - case 229: /* alter_table_option ::= TTL NK_INTEGER */ + case 230: /* alter_table_option ::= TTL NK_INTEGER */ { yymsp[-1].minor.yy335.type = TABLE_OPTION_TTL; yymsp[-1].minor.yy335.val = yymsp[0].minor.yy0; } break; - case 230: /* duration_list ::= duration_literal */ - case 453: /* expression_list ::= expr_or_subquery */ yytestcase(yyruleno==453); + case 231: /* duration_list ::= duration_literal */ + case 454: /* expression_list ::= expr_or_subquery */ yytestcase(yyruleno==454); { yylhsminor.yy844 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy452)); } yymsp[0].minor.yy844 = yylhsminor.yy844; break; - case 231: /* duration_list ::= duration_list NK_COMMA duration_literal */ - case 454: /* expression_list ::= expression_list NK_COMMA expr_or_subquery */ yytestcase(yyruleno==454); + case 232: /* duration_list ::= duration_list NK_COMMA duration_literal */ + case 455: /* expression_list ::= expression_list NK_COMMA expr_or_subquery */ yytestcase(yyruleno==455); { yylhsminor.yy844 = addNodeToList(pCxt, yymsp[-2].minor.yy844, releaseRawExprNode(pCxt, yymsp[0].minor.yy452)); } yymsp[-2].minor.yy844 = yylhsminor.yy844; break; - case 234: /* rollup_func_name ::= function_name */ + case 235: /* rollup_func_name ::= function_name */ { yylhsminor.yy452 = createFunctionNode(pCxt, &yymsp[0].minor.yy129, NULL); } yymsp[0].minor.yy452 = yylhsminor.yy452; break; - case 235: /* rollup_func_name ::= FIRST */ - case 236: /* rollup_func_name ::= LAST */ yytestcase(yyruleno==236); - case 302: /* tag_item ::= QTAGS */ yytestcase(yyruleno==302); + case 236: /* rollup_func_name ::= FIRST */ + case 237: /* rollup_func_name ::= LAST */ yytestcase(yyruleno==237); + case 303: /* tag_item ::= QTAGS */ yytestcase(yyruleno==303); { yylhsminor.yy452 = createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL); } yymsp[0].minor.yy452 = yylhsminor.yy452; break; - case 239: /* col_name ::= column_name */ - case 303: /* tag_item ::= column_name */ yytestcase(yyruleno==303); + case 240: /* col_name ::= column_name */ + case 304: /* tag_item ::= column_name */ yytestcase(yyruleno==304); { yylhsminor.yy452 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy129); } yymsp[0].minor.yy452 = yylhsminor.yy452; break; - case 240: /* cmd ::= SHOW DNODES */ + case 241: /* cmd ::= SHOW DNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DNODES_STMT); } break; - case 241: /* cmd ::= SHOW USERS */ + case 242: /* cmd ::= SHOW USERS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_USERS_STMT); } break; - case 242: /* cmd ::= SHOW USER PRIVILEGES */ + case 243: /* cmd ::= SHOW USER PRIVILEGES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_USER_PRIVILEGES_STMT); } break; - case 243: /* cmd ::= SHOW db_kind_opt DATABASES */ + case 244: /* cmd ::= SHOW db_kind_opt DATABASES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DATABASES_STMT); setShowKind(pCxt, pCxt->pRootNode, yymsp[-1].minor.yy749); } break; - case 244: /* cmd ::= SHOW table_kind_db_name_cond_opt TABLES like_pattern_opt */ + case 245: /* cmd ::= SHOW table_kind_db_name_cond_opt TABLES like_pattern_opt */ { pCxt->pRootNode = createShowTablesStmt(pCxt, yymsp[-2].minor.yy217, yymsp[0].minor.yy452, OP_TYPE_LIKE); } break; - case 245: /* cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ + case 246: /* cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ { pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_STABLES_STMT, yymsp[-2].minor.yy452, yymsp[0].minor.yy452, OP_TYPE_LIKE); } break; - case 246: /* cmd ::= SHOW db_name_cond_opt VGROUPS */ + case 247: /* cmd ::= SHOW db_name_cond_opt VGROUPS */ { pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, yymsp[-1].minor.yy452, NULL, OP_TYPE_LIKE); } break; - case 247: /* cmd ::= SHOW MNODES */ + case 248: /* cmd ::= SHOW MNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_MNODES_STMT); } break; - case 248: /* cmd ::= SHOW QNODES */ + case 249: /* cmd ::= SHOW QNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QNODES_STMT); } break; - case 249: /* cmd ::= SHOW FUNCTIONS */ + case 250: /* cmd ::= SHOW FUNCTIONS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_FUNCTIONS_STMT); } break; - case 250: /* cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ + case 251: /* cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ { pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, yymsp[0].minor.yy452, yymsp[-1].minor.yy452, OP_TYPE_EQUAL); } break; - case 251: /* cmd ::= SHOW INDEXES FROM db_name NK_DOT table_name */ + case 252: /* cmd ::= SHOW INDEXES FROM db_name NK_DOT table_name */ { pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, createIdentifierValueNode(pCxt, &yymsp[-2].minor.yy129), createIdentifierValueNode(pCxt, &yymsp[0].minor.yy129), OP_TYPE_EQUAL); } break; - case 252: /* cmd ::= SHOW STREAMS */ + case 253: /* cmd ::= SHOW STREAMS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_STREAMS_STMT); } break; - case 253: /* cmd ::= SHOW ACCOUNTS */ + case 254: /* cmd ::= SHOW ACCOUNTS */ { pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); } break; - case 254: /* cmd ::= SHOW APPS */ + case 255: /* cmd ::= SHOW APPS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_APPS_STMT); } break; - case 255: /* cmd ::= SHOW CONNECTIONS */ + case 256: /* cmd ::= SHOW CONNECTIONS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CONNECTIONS_STMT); } break; - case 256: /* cmd ::= SHOW LICENCES */ - case 257: /* cmd ::= SHOW GRANTS */ yytestcase(yyruleno==257); + case 257: /* cmd ::= SHOW LICENCES */ + case 258: /* cmd ::= SHOW GRANTS */ yytestcase(yyruleno==258); { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LICENCES_STMT); } break; - case 258: /* cmd ::= SHOW CREATE DATABASE db_name */ + case 259: /* cmd ::= SHOW CREATE DATABASE db_name */ { pCxt->pRootNode = createShowCreateDatabaseStmt(pCxt, &yymsp[0].minor.yy129); } break; - case 259: /* cmd ::= SHOW CREATE TABLE full_table_name */ + case 260: /* cmd ::= SHOW CREATE TABLE full_table_name */ { pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_TABLE_STMT, yymsp[0].minor.yy452); } break; - case 260: /* cmd ::= SHOW CREATE STABLE full_table_name */ + case 261: /* cmd ::= SHOW CREATE STABLE full_table_name */ { pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_STABLE_STMT, yymsp[0].minor.yy452); } break; - case 261: /* cmd ::= SHOW QUERIES */ + case 262: /* cmd ::= SHOW QUERIES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QUERIES_STMT); } break; - case 262: /* cmd ::= SHOW SCORES */ + case 263: /* cmd ::= SHOW SCORES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SCORES_STMT); } break; - case 263: /* cmd ::= SHOW TOPICS */ + case 264: /* cmd ::= SHOW TOPICS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TOPICS_STMT); } break; - case 264: /* cmd ::= SHOW VARIABLES */ - case 265: /* cmd ::= SHOW CLUSTER VARIABLES */ yytestcase(yyruleno==265); + case 265: /* cmd ::= SHOW VARIABLES */ + case 266: /* cmd ::= SHOW CLUSTER VARIABLES */ yytestcase(yyruleno==266); { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_VARIABLES_STMT); } break; - case 266: /* cmd ::= SHOW LOCAL VARIABLES */ + case 267: /* cmd ::= SHOW LOCAL VARIABLES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LOCAL_VARIABLES_STMT); } break; - case 267: /* cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */ + case 268: /* cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */ { pCxt->pRootNode = createShowDnodeVariablesStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[-2].minor.yy0), yymsp[0].minor.yy452); } break; - case 268: /* cmd ::= SHOW BNODES */ + case 269: /* cmd ::= SHOW BNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_BNODES_STMT); } break; - case 269: /* cmd ::= SHOW SNODES */ + case 270: /* cmd ::= SHOW SNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SNODES_STMT); } break; - case 270: /* cmd ::= SHOW CLUSTER */ + case 271: /* cmd ::= SHOW CLUSTER */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CLUSTER_STMT); } break; - case 271: /* cmd ::= SHOW TRANSACTIONS */ + case 272: /* cmd ::= SHOW TRANSACTIONS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TRANSACTIONS_STMT); } break; - case 272: /* cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ + case 273: /* cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ { pCxt->pRootNode = createShowTableDistributedStmt(pCxt, yymsp[0].minor.yy452); } break; - case 273: /* cmd ::= SHOW CONSUMERS */ + case 274: /* cmd ::= SHOW CONSUMERS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CONSUMERS_STMT); } break; - case 274: /* cmd ::= SHOW SUBSCRIPTIONS */ + case 275: /* cmd ::= SHOW SUBSCRIPTIONS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SUBSCRIPTIONS_STMT); } break; - case 275: /* cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ + case 276: /* cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ { pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TAGS_STMT, yymsp[0].minor.yy452, yymsp[-1].minor.yy452, OP_TYPE_EQUAL); } break; - case 276: /* cmd ::= SHOW TAGS FROM db_name NK_DOT table_name */ + case 277: /* cmd ::= SHOW TAGS FROM db_name NK_DOT table_name */ { pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TAGS_STMT, createIdentifierValueNode(pCxt, &yymsp[-2].minor.yy129), createIdentifierValueNode(pCxt, &yymsp[0].minor.yy129), OP_TYPE_EQUAL); } break; - case 277: /* cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ + case 278: /* cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ { pCxt->pRootNode = createShowTableTagsStmt(pCxt, yymsp[-1].minor.yy452, yymsp[0].minor.yy452, yymsp[-3].minor.yy844); } break; - case 278: /* cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name */ + case 279: /* cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name */ { pCxt->pRootNode = createShowTableTagsStmt(pCxt, createIdentifierValueNode(pCxt, &yymsp[0].minor.yy129), createIdentifierValueNode(pCxt, &yymsp[-2].minor.yy129), yymsp[-4].minor.yy844); } break; - case 279: /* cmd ::= SHOW VNODES ON DNODE NK_INTEGER */ + case 280: /* cmd ::= SHOW VNODES ON DNODE NK_INTEGER */ { pCxt->pRootNode = createShowVnodesStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0), NULL); } break; - case 280: /* cmd ::= SHOW VNODES */ + case 281: /* cmd ::= SHOW VNODES */ { pCxt->pRootNode = createShowVnodesStmt(pCxt, NULL, NULL); } break; - case 281: /* cmd ::= SHOW db_name_cond_opt ALIVE */ + case 282: /* cmd ::= SHOW db_name_cond_opt ALIVE */ { pCxt->pRootNode = createShowAliveStmt(pCxt, yymsp[-1].minor.yy452, QUERY_NODE_SHOW_DB_ALIVE_STMT); } break; - case 282: /* cmd ::= SHOW CLUSTER ALIVE */ + case 283: /* cmd ::= SHOW CLUSTER ALIVE */ { pCxt->pRootNode = createShowAliveStmt(pCxt, NULL, QUERY_NODE_SHOW_CLUSTER_ALIVE_STMT); } break; - case 283: /* cmd ::= SHOW db_name_cond_opt VIEWS */ + case 284: /* cmd ::= SHOW db_name_cond_opt VIEWS */ { pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VIEWS_STMT, yymsp[-1].minor.yy452, NULL, OP_TYPE_LIKE); } break; - case 284: /* cmd ::= SHOW CREATE VIEW full_table_name */ + case 285: /* cmd ::= SHOW CREATE VIEW full_table_name */ { pCxt->pRootNode = createShowCreateViewStmt(pCxt, QUERY_NODE_SHOW_CREATE_VIEW_STMT, yymsp[0].minor.yy452); } break; - case 285: /* table_kind_db_name_cond_opt ::= */ + case 286: /* table_kind_db_name_cond_opt ::= */ { yymsp[1].minor.yy217.kind = SHOW_KIND_ALL; yymsp[1].minor.yy217.dbName = nil_token; } break; - case 286: /* table_kind_db_name_cond_opt ::= table_kind */ + case 287: /* table_kind_db_name_cond_opt ::= table_kind */ { yylhsminor.yy217.kind = yymsp[0].minor.yy749; yylhsminor.yy217.dbName = nil_token; } yymsp[0].minor.yy217 = yylhsminor.yy217; break; - case 287: /* table_kind_db_name_cond_opt ::= db_name NK_DOT */ + case 288: /* table_kind_db_name_cond_opt ::= db_name NK_DOT */ { yylhsminor.yy217.kind = SHOW_KIND_ALL; yylhsminor.yy217.dbName = yymsp[-1].minor.yy129; } yymsp[-1].minor.yy217 = yylhsminor.yy217; break; - case 288: /* table_kind_db_name_cond_opt ::= table_kind db_name NK_DOT */ + case 289: /* table_kind_db_name_cond_opt ::= table_kind db_name NK_DOT */ { yylhsminor.yy217.kind = yymsp[-2].minor.yy749; yylhsminor.yy217.dbName = yymsp[-1].minor.yy129; } yymsp[-2].minor.yy217 = yylhsminor.yy217; break; - case 289: /* table_kind ::= NORMAL */ + case 290: /* table_kind ::= NORMAL */ { yymsp[0].minor.yy749 = SHOW_KIND_TABLES_NORMAL; } break; - case 290: /* table_kind ::= CHILD */ + case 291: /* table_kind ::= CHILD */ { yymsp[0].minor.yy749 = SHOW_KIND_TABLES_CHILD; } break; - case 291: /* db_name_cond_opt ::= */ - case 296: /* from_db_opt ::= */ yytestcase(yyruleno==296); + case 292: /* db_name_cond_opt ::= */ + case 297: /* from_db_opt ::= */ yytestcase(yyruleno==297); { yymsp[1].minor.yy452 = createDefaultDatabaseCondValue(pCxt); } break; - case 292: /* db_name_cond_opt ::= db_name NK_DOT */ + case 293: /* db_name_cond_opt ::= db_name NK_DOT */ { yylhsminor.yy452 = createIdentifierValueNode(pCxt, &yymsp[-1].minor.yy129); } yymsp[-1].minor.yy452 = yylhsminor.yy452; break; - case 294: /* like_pattern_opt ::= LIKE NK_STRING */ + case 295: /* like_pattern_opt ::= LIKE NK_STRING */ { yymsp[-1].minor.yy452 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } break; - case 295: /* table_name_cond ::= table_name */ + case 296: /* table_name_cond ::= table_name */ { yylhsminor.yy452 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy129); } yymsp[0].minor.yy452 = yylhsminor.yy452; break; - case 297: /* from_db_opt ::= FROM db_name */ + case 298: /* from_db_opt ::= FROM db_name */ { yymsp[-1].minor.yy452 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy129); } break; - case 301: /* tag_item ::= TBNAME */ + case 302: /* tag_item ::= TBNAME */ { yylhsminor.yy452 = setProjectionAlias(pCxt, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL), &yymsp[0].minor.yy0); } yymsp[0].minor.yy452 = yylhsminor.yy452; break; - case 304: /* tag_item ::= column_name column_alias */ + case 305: /* tag_item ::= column_name column_alias */ { yylhsminor.yy452 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-1].minor.yy129), &yymsp[0].minor.yy129); } yymsp[-1].minor.yy452 = yylhsminor.yy452; break; - case 305: /* tag_item ::= column_name AS column_alias */ + case 306: /* tag_item ::= column_name AS column_alias */ { yylhsminor.yy452 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-2].minor.yy129), &yymsp[0].minor.yy129); } yymsp[-2].minor.yy452 = yylhsminor.yy452; break; - case 306: /* db_kind_opt ::= */ + case 307: /* db_kind_opt ::= */ { yymsp[1].minor.yy749 = SHOW_KIND_ALL; } break; - case 307: /* db_kind_opt ::= USER */ + case 308: /* db_kind_opt ::= USER */ { yymsp[0].minor.yy749 = SHOW_KIND_DATABASES_USER; } break; - case 308: /* db_kind_opt ::= SYSTEM */ + case 309: /* db_kind_opt ::= SYSTEM */ { yymsp[0].minor.yy749 = SHOW_KIND_DATABASES_SYSTEM; } break; - case 309: /* cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options */ + case 310: /* cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options */ { pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_SMA, yymsp[-4].minor.yy137, yymsp[-3].minor.yy452, yymsp[-1].minor.yy452, NULL, yymsp[0].minor.yy452); } break; - case 310: /* cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP */ + case 311: /* cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP */ { pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_NORMAL, yymsp[-6].minor.yy137, yymsp[-5].minor.yy452, yymsp[-3].minor.yy452, yymsp[-1].minor.yy844, NULL); } break; - case 311: /* cmd ::= DROP INDEX exists_opt full_index_name */ + case 312: /* cmd ::= DROP INDEX exists_opt full_index_name */ { pCxt->pRootNode = createDropIndexStmt(pCxt, yymsp[-1].minor.yy137, yymsp[0].minor.yy452); } break; - case 312: /* full_index_name ::= index_name */ + case 313: /* full_index_name ::= index_name */ { yylhsminor.yy452 = createRealTableNodeForIndexName(pCxt, NULL, &yymsp[0].minor.yy129); } yymsp[0].minor.yy452 = yylhsminor.yy452; break; - case 313: /* full_index_name ::= db_name NK_DOT index_name */ + case 314: /* full_index_name ::= db_name NK_DOT index_name */ { yylhsminor.yy452 = createRealTableNodeForIndexName(pCxt, &yymsp[-2].minor.yy129, &yymsp[0].minor.yy129); } yymsp[-2].minor.yy452 = yylhsminor.yy452; break; - case 314: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ + case 315: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ { yymsp[-9].minor.yy452 = createIndexOption(pCxt, yymsp[-7].minor.yy844, releaseRawExprNode(pCxt, yymsp[-3].minor.yy452), NULL, yymsp[-1].minor.yy452, yymsp[0].minor.yy452); } break; - case 315: /* 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 */ + case 316: /* 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.yy452 = createIndexOption(pCxt, yymsp[-9].minor.yy844, releaseRawExprNode(pCxt, yymsp[-5].minor.yy452), releaseRawExprNode(pCxt, yymsp[-3].minor.yy452), yymsp[-1].minor.yy452, yymsp[0].minor.yy452); } break; - case 318: /* func ::= sma_func_name NK_LP expression_list NK_RP */ + case 319: /* func ::= sma_func_name NK_LP expression_list NK_RP */ { yylhsminor.yy452 = createFunctionNode(pCxt, &yymsp[-3].minor.yy129, yymsp[-1].minor.yy844); } yymsp[-3].minor.yy452 = yylhsminor.yy452; break; - case 319: /* sma_func_name ::= function_name */ - case 540: /* alias_opt ::= table_alias */ yytestcase(yyruleno==540); + case 320: /* sma_func_name ::= function_name */ + case 541: /* alias_opt ::= table_alias */ yytestcase(yyruleno==541); { yylhsminor.yy129 = yymsp[0].minor.yy129; } yymsp[0].minor.yy129 = yylhsminor.yy129; break; - case 324: /* sma_stream_opt ::= */ - case 369: /* stream_options ::= */ yytestcase(yyruleno==369); + case 325: /* sma_stream_opt ::= */ + case 370: /* stream_options ::= */ yytestcase(yyruleno==370); { yymsp[1].minor.yy452 = createStreamOptions(pCxt); } break; - case 325: /* sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ + case 326: /* sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ { ((SStreamOptions*)yymsp[-2].minor.yy452)->pWatermark = releaseRawExprNode(pCxt, yymsp[0].minor.yy452); yylhsminor.yy452 = yymsp[-2].minor.yy452; } yymsp[-2].minor.yy452 = yylhsminor.yy452; break; - case 326: /* sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ + case 327: /* sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ { ((SStreamOptions*)yymsp[-2].minor.yy452)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy452); yylhsminor.yy452 = yymsp[-2].minor.yy452; } yymsp[-2].minor.yy452 = yylhsminor.yy452; break; - case 327: /* sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ + case 328: /* sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ { ((SStreamOptions*)yymsp[-2].minor.yy452)->pDeleteMark = releaseRawExprNode(pCxt, yymsp[0].minor.yy452); yylhsminor.yy452 = yymsp[-2].minor.yy452; } yymsp[-2].minor.yy452 = yylhsminor.yy452; break; - case 328: /* with_meta ::= AS */ + case 329: /* with_meta ::= AS */ { yymsp[0].minor.yy710 = 0; } break; - case 329: /* with_meta ::= WITH META AS */ + case 330: /* with_meta ::= WITH META AS */ { yymsp[-2].minor.yy710 = 1; } break; - case 330: /* with_meta ::= ONLY META AS */ + case 331: /* with_meta ::= ONLY META AS */ { yymsp[-2].minor.yy710 = 2; } break; - case 331: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ + case 332: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ { pCxt->pRootNode = createCreateTopicStmtUseQuery(pCxt, yymsp[-3].minor.yy137, &yymsp[-2].minor.yy129, yymsp[0].minor.yy452); } break; - case 332: /* cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name */ + case 333: /* cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name */ { pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-4].minor.yy137, &yymsp[-3].minor.yy129, &yymsp[0].minor.yy129, yymsp[-2].minor.yy710); } break; - case 333: /* cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt */ + case 334: /* cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt */ { pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-5].minor.yy137, &yymsp[-4].minor.yy129, yymsp[-1].minor.yy452, yymsp[-3].minor.yy710, yymsp[0].minor.yy452); } break; - case 334: /* cmd ::= DROP TOPIC exists_opt topic_name */ + case 335: /* cmd ::= DROP TOPIC exists_opt topic_name */ { pCxt->pRootNode = createDropTopicStmt(pCxt, yymsp[-1].minor.yy137, &yymsp[0].minor.yy129); } break; - case 335: /* cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ + case 336: /* cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ { pCxt->pRootNode = createDropCGroupStmt(pCxt, yymsp[-3].minor.yy137, &yymsp[-2].minor.yy129, &yymsp[0].minor.yy129); } break; - case 336: /* cmd ::= DESC full_table_name */ - case 337: /* cmd ::= DESCRIBE full_table_name */ yytestcase(yyruleno==337); + case 337: /* cmd ::= DESC full_table_name */ + case 338: /* cmd ::= DESCRIBE full_table_name */ yytestcase(yyruleno==338); { pCxt->pRootNode = createDescribeStmt(pCxt, yymsp[0].minor.yy452); } break; - case 338: /* cmd ::= RESET QUERY CACHE */ + case 339: /* cmd ::= RESET QUERY CACHE */ { pCxt->pRootNode = createResetQueryCacheStmt(pCxt); } break; - case 339: /* cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ - case 340: /* cmd ::= EXPLAIN analyze_opt explain_options insert_query */ yytestcase(yyruleno==340); + case 340: /* cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ + case 341: /* cmd ::= EXPLAIN analyze_opt explain_options insert_query */ yytestcase(yyruleno==341); { pCxt->pRootNode = createExplainStmt(pCxt, yymsp[-2].minor.yy137, yymsp[-1].minor.yy452, yymsp[0].minor.yy452); } break; - case 343: /* explain_options ::= */ + case 344: /* explain_options ::= */ { yymsp[1].minor.yy452 = createDefaultExplainOptions(pCxt); } break; - case 344: /* explain_options ::= explain_options VERBOSE NK_BOOL */ + case 345: /* explain_options ::= explain_options VERBOSE NK_BOOL */ { yylhsminor.yy452 = setExplainVerbose(pCxt, yymsp[-2].minor.yy452, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy452 = yylhsminor.yy452; break; - case 345: /* explain_options ::= explain_options RATIO NK_FLOAT */ + case 346: /* explain_options ::= explain_options RATIO NK_FLOAT */ { yylhsminor.yy452 = setExplainRatio(pCxt, yymsp[-2].minor.yy452, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy452 = yylhsminor.yy452; break; - case 346: /* cmd ::= CREATE or_replace_opt agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt language_opt */ + case 347: /* cmd ::= CREATE or_replace_opt agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt language_opt */ { pCxt->pRootNode = createCreateFunctionStmt(pCxt, yymsp[-7].minor.yy137, yymsp[-9].minor.yy137, &yymsp[-6].minor.yy129, &yymsp[-4].minor.yy0, yymsp[-2].minor.yy794, yymsp[-1].minor.yy710, &yymsp[0].minor.yy129, yymsp[-10].minor.yy137); } break; - case 347: /* cmd ::= DROP FUNCTION exists_opt function_name */ + case 348: /* cmd ::= DROP FUNCTION exists_opt function_name */ { pCxt->pRootNode = createDropFunctionStmt(pCxt, yymsp[-1].minor.yy137, &yymsp[0].minor.yy129); } break; - case 352: /* language_opt ::= */ - case 390: /* on_vgroup_id ::= */ yytestcase(yyruleno==390); + case 353: /* language_opt ::= */ + case 391: /* on_vgroup_id ::= */ yytestcase(yyruleno==391); { yymsp[1].minor.yy129 = nil_token; } break; - case 353: /* language_opt ::= LANGUAGE NK_STRING */ - case 391: /* on_vgroup_id ::= ON NK_INTEGER */ yytestcase(yyruleno==391); + case 354: /* language_opt ::= LANGUAGE NK_STRING */ + case 392: /* on_vgroup_id ::= ON NK_INTEGER */ yytestcase(yyruleno==392); { yymsp[-1].minor.yy129 = yymsp[0].minor.yy0; } break; - case 356: /* cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery */ + case 357: /* cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery */ { pCxt->pRootNode = createCreateViewStmt(pCxt, yymsp[-4].minor.yy137, yymsp[-2].minor.yy452, &yymsp[-1].minor.yy0, yymsp[0].minor.yy452); } break; - case 357: /* cmd ::= DROP VIEW exists_opt full_view_name */ + case 358: /* cmd ::= DROP VIEW exists_opt full_view_name */ { pCxt->pRootNode = createDropViewStmt(pCxt, yymsp[-1].minor.yy137, yymsp[0].minor.yy452); } break; - case 358: /* full_view_name ::= view_name */ + case 359: /* full_view_name ::= view_name */ { yylhsminor.yy452 = createViewNode(pCxt, NULL, &yymsp[0].minor.yy129); } yymsp[0].minor.yy452 = yylhsminor.yy452; break; - case 359: /* full_view_name ::= db_name NK_DOT view_name */ + case 360: /* full_view_name ::= db_name NK_DOT view_name */ { yylhsminor.yy452 = createViewNode(pCxt, &yymsp[-2].minor.yy129, &yymsp[0].minor.yy129); } yymsp[-2].minor.yy452 = yylhsminor.yy452; break; - case 360: /* cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name col_list_opt tag_def_or_ref_opt subtable_opt AS query_or_subquery */ + case 361: /* cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name col_list_opt tag_def_or_ref_opt subtable_opt AS query_or_subquery */ { pCxt->pRootNode = createCreateStreamStmt(pCxt, yymsp[-9].minor.yy137, &yymsp[-8].minor.yy129, yymsp[-5].minor.yy452, yymsp[-7].minor.yy452, yymsp[-3].minor.yy844, yymsp[-2].minor.yy452, yymsp[0].minor.yy452, yymsp[-4].minor.yy844); } break; - case 361: /* cmd ::= DROP STREAM exists_opt stream_name */ + case 362: /* cmd ::= DROP STREAM exists_opt stream_name */ { pCxt->pRootNode = createDropStreamStmt(pCxt, yymsp[-1].minor.yy137, &yymsp[0].minor.yy129); } break; - case 362: /* cmd ::= PAUSE STREAM exists_opt stream_name */ + case 363: /* cmd ::= PAUSE STREAM exists_opt stream_name */ { pCxt->pRootNode = createPauseStreamStmt(pCxt, yymsp[-1].minor.yy137, &yymsp[0].minor.yy129); } break; - case 363: /* cmd ::= RESUME STREAM exists_opt ignore_opt stream_name */ + case 364: /* cmd ::= RESUME STREAM exists_opt ignore_opt stream_name */ { pCxt->pRootNode = createResumeStreamStmt(pCxt, yymsp[-2].minor.yy137, yymsp[-1].minor.yy137, &yymsp[0].minor.yy129); } break; - case 370: /* stream_options ::= stream_options TRIGGER AT_ONCE */ - case 371: /* stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ yytestcase(yyruleno==371); + case 371: /* stream_options ::= stream_options TRIGGER AT_ONCE */ + case 372: /* stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ yytestcase(yyruleno==372); { yylhsminor.yy452 = setStreamOptions(pCxt, yymsp[-2].minor.yy452, SOPT_TRIGGER_TYPE_SET, &yymsp[0].minor.yy0, NULL); } yymsp[-2].minor.yy452 = yylhsminor.yy452; break; - case 372: /* stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ + case 373: /* stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ { yylhsminor.yy452 = setStreamOptions(pCxt, yymsp[-3].minor.yy452, SOPT_TRIGGER_TYPE_SET, &yymsp[-1].minor.yy0, releaseRawExprNode(pCxt, yymsp[0].minor.yy452)); } yymsp[-3].minor.yy452 = yylhsminor.yy452; break; - case 373: /* stream_options ::= stream_options WATERMARK duration_literal */ + case 374: /* stream_options ::= stream_options WATERMARK duration_literal */ { yylhsminor.yy452 = setStreamOptions(pCxt, yymsp[-2].minor.yy452, SOPT_WATERMARK_SET, NULL, releaseRawExprNode(pCxt, yymsp[0].minor.yy452)); } yymsp[-2].minor.yy452 = yylhsminor.yy452; break; - case 374: /* stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ + case 375: /* stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ { yylhsminor.yy452 = setStreamOptions(pCxt, yymsp[-3].minor.yy452, SOPT_IGNORE_EXPIRED_SET, &yymsp[0].minor.yy0, NULL); } yymsp[-3].minor.yy452 = yylhsminor.yy452; break; - case 375: /* stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ + case 376: /* stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ { yylhsminor.yy452 = setStreamOptions(pCxt, yymsp[-2].minor.yy452, SOPT_FILL_HISTORY_SET, &yymsp[0].minor.yy0, NULL); } yymsp[-2].minor.yy452 = yylhsminor.yy452; break; - case 376: /* stream_options ::= stream_options DELETE_MARK duration_literal */ + case 377: /* stream_options ::= stream_options DELETE_MARK duration_literal */ { yylhsminor.yy452 = setStreamOptions(pCxt, yymsp[-2].minor.yy452, SOPT_DELETE_MARK_SET, NULL, releaseRawExprNode(pCxt, yymsp[0].minor.yy452)); } yymsp[-2].minor.yy452 = yylhsminor.yy452; break; - case 377: /* stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */ + case 378: /* stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */ { yylhsminor.yy452 = setStreamOptions(pCxt, yymsp[-3].minor.yy452, SOPT_IGNORE_UPDATE_SET, &yymsp[0].minor.yy0, NULL); } yymsp[-3].minor.yy452 = yylhsminor.yy452; break; - case 379: /* subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ - case 578: /* sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ yytestcase(yyruleno==578); - case 599: /* every_opt ::= EVERY NK_LP duration_literal NK_RP */ yytestcase(yyruleno==599); + case 380: /* subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ + case 579: /* sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ yytestcase(yyruleno==579); + case 600: /* every_opt ::= EVERY NK_LP duration_literal NK_RP */ yytestcase(yyruleno==600); { yymsp[-3].minor.yy452 = releaseRawExprNode(pCxt, yymsp[-1].minor.yy452); } break; - case 382: /* cmd ::= KILL CONNECTION NK_INTEGER */ + case 383: /* cmd ::= KILL CONNECTION NK_INTEGER */ { pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_CONNECTION_STMT, &yymsp[0].minor.yy0); } break; - case 383: /* cmd ::= KILL QUERY NK_STRING */ + case 384: /* cmd ::= KILL QUERY NK_STRING */ { pCxt->pRootNode = createKillQueryStmt(pCxt, &yymsp[0].minor.yy0); } break; - case 384: /* cmd ::= KILL TRANSACTION NK_INTEGER */ + case 385: /* cmd ::= KILL TRANSACTION NK_INTEGER */ { pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_TRANSACTION_STMT, &yymsp[0].minor.yy0); } break; - case 385: /* cmd ::= BALANCE VGROUP */ + case 386: /* cmd ::= BALANCE VGROUP */ { pCxt->pRootNode = createBalanceVgroupStmt(pCxt); } break; - case 386: /* cmd ::= BALANCE VGROUP LEADER on_vgroup_id */ + case 387: /* cmd ::= BALANCE VGROUP LEADER on_vgroup_id */ { pCxt->pRootNode = createBalanceVgroupLeaderStmt(pCxt, &yymsp[0].minor.yy129); } break; - case 387: /* cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ + case 388: /* cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ { pCxt->pRootNode = createMergeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } break; - case 388: /* cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ + case 389: /* cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ { pCxt->pRootNode = createRedistributeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy844); } break; - case 389: /* cmd ::= SPLIT VGROUP NK_INTEGER */ + case 390: /* cmd ::= SPLIT VGROUP NK_INTEGER */ { pCxt->pRootNode = createSplitVgroupStmt(pCxt, &yymsp[0].minor.yy0); } break; - case 392: /* dnode_list ::= DNODE NK_INTEGER */ + case 393: /* dnode_list ::= DNODE NK_INTEGER */ { yymsp[-1].minor.yy844 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } break; - case 394: /* cmd ::= DELETE FROM full_table_name where_clause_opt */ + case 395: /* cmd ::= DELETE FROM full_table_name where_clause_opt */ { pCxt->pRootNode = createDeleteStmt(pCxt, yymsp[-1].minor.yy452, yymsp[0].minor.yy452); } break; - case 397: /* insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ + case 398: /* insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ { yymsp[-6].minor.yy452 = createInsertStmt(pCxt, yymsp[-4].minor.yy452, yymsp[-2].minor.yy844, yymsp[0].minor.yy452); } break; - case 398: /* insert_query ::= INSERT INTO full_table_name query_or_subquery */ + case 399: /* insert_query ::= INSERT INTO full_table_name query_or_subquery */ { yymsp[-3].minor.yy452 = createInsertStmt(pCxt, yymsp[-1].minor.yy452, NULL, yymsp[0].minor.yy452); } break; - case 399: /* literal ::= NK_INTEGER */ + case 400: /* literal ::= NK_INTEGER */ { yylhsminor.yy452 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy452 = yylhsminor.yy452; break; - case 400: /* literal ::= NK_FLOAT */ + case 401: /* literal ::= NK_FLOAT */ { yylhsminor.yy452 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy452 = yylhsminor.yy452; break; - case 401: /* literal ::= NK_STRING */ + case 402: /* literal ::= NK_STRING */ { yylhsminor.yy452 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy452 = yylhsminor.yy452; break; - case 402: /* literal ::= NK_BOOL */ + case 403: /* literal ::= NK_BOOL */ { yylhsminor.yy452 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy452 = yylhsminor.yy452; break; - case 403: /* literal ::= TIMESTAMP NK_STRING */ + case 404: /* literal ::= TIMESTAMP NK_STRING */ { yylhsminor.yy452 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0)); } yymsp[-1].minor.yy452 = yylhsminor.yy452; break; - case 404: /* literal ::= duration_literal */ - case 414: /* signed_literal ::= signed */ yytestcase(yyruleno==414); - case 436: /* expr_or_subquery ::= expression */ yytestcase(yyruleno==436); - case 437: /* expression ::= literal */ yytestcase(yyruleno==437); - case 438: /* expression ::= pseudo_column */ yytestcase(yyruleno==438); - case 439: /* expression ::= column_reference */ yytestcase(yyruleno==439); - case 440: /* expression ::= function_expression */ yytestcase(yyruleno==440); - case 441: /* expression ::= case_when_expression */ yytestcase(yyruleno==441); - case 472: /* function_expression ::= literal_func */ yytestcase(yyruleno==472); - case 521: /* boolean_value_expression ::= boolean_primary */ yytestcase(yyruleno==521); - case 525: /* boolean_primary ::= predicate */ yytestcase(yyruleno==525); - case 527: /* common_expression ::= expr_or_subquery */ yytestcase(yyruleno==527); - case 528: /* common_expression ::= boolean_value_expression */ yytestcase(yyruleno==528); - case 531: /* table_reference_list ::= table_reference */ yytestcase(yyruleno==531); - case 533: /* table_reference ::= table_primary */ yytestcase(yyruleno==533); - case 534: /* table_reference ::= joined_table */ yytestcase(yyruleno==534); - case 538: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==538); - case 601: /* query_simple ::= query_specification */ yytestcase(yyruleno==601); - case 602: /* query_simple ::= union_query_expression */ yytestcase(yyruleno==602); - case 605: /* query_simple_or_subquery ::= query_simple */ yytestcase(yyruleno==605); - case 607: /* query_or_subquery ::= query_expression */ yytestcase(yyruleno==607); + case 405: /* literal ::= duration_literal */ + case 415: /* signed_literal ::= signed */ yytestcase(yyruleno==415); + case 437: /* expr_or_subquery ::= expression */ yytestcase(yyruleno==437); + case 438: /* expression ::= literal */ yytestcase(yyruleno==438); + case 440: /* expression ::= column_reference */ yytestcase(yyruleno==440); + case 441: /* expression ::= function_expression */ yytestcase(yyruleno==441); + case 442: /* expression ::= case_when_expression */ yytestcase(yyruleno==442); + case 473: /* function_expression ::= literal_func */ yytestcase(yyruleno==473); + case 522: /* boolean_value_expression ::= boolean_primary */ yytestcase(yyruleno==522); + case 526: /* boolean_primary ::= predicate */ yytestcase(yyruleno==526); + case 528: /* common_expression ::= expr_or_subquery */ yytestcase(yyruleno==528); + case 529: /* common_expression ::= boolean_value_expression */ yytestcase(yyruleno==529); + case 532: /* table_reference_list ::= table_reference */ yytestcase(yyruleno==532); + case 534: /* table_reference ::= table_primary */ yytestcase(yyruleno==534); + case 535: /* table_reference ::= joined_table */ yytestcase(yyruleno==535); + case 539: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==539); + case 602: /* query_simple ::= query_specification */ yytestcase(yyruleno==602); + case 603: /* query_simple ::= union_query_expression */ yytestcase(yyruleno==603); + case 606: /* query_simple_or_subquery ::= query_simple */ yytestcase(yyruleno==606); + case 608: /* query_or_subquery ::= query_expression */ yytestcase(yyruleno==608); { yylhsminor.yy452 = yymsp[0].minor.yy452; } yymsp[0].minor.yy452 = yylhsminor.yy452; break; - case 405: /* literal ::= NULL */ + case 406: /* literal ::= NULL */ { yylhsminor.yy452 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy452 = yylhsminor.yy452; break; - case 406: /* literal ::= NK_QUESTION */ + case 407: /* literal ::= NK_QUESTION */ { yylhsminor.yy452 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy452 = yylhsminor.yy452; break; - case 407: /* duration_literal ::= NK_VARIABLE */ + case 408: /* duration_literal ::= NK_VARIABLE */ { yylhsminor.yy452 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy452 = yylhsminor.yy452; break; - case 408: /* signed ::= NK_INTEGER */ + case 409: /* signed ::= NK_INTEGER */ { yylhsminor.yy452 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } yymsp[0].minor.yy452 = yylhsminor.yy452; break; - case 409: /* signed ::= NK_PLUS NK_INTEGER */ + case 410: /* signed ::= NK_PLUS NK_INTEGER */ { yymsp[-1].minor.yy452 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } break; - case 410: /* signed ::= NK_MINUS NK_INTEGER */ + case 411: /* 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; @@ -5960,14 +5965,14 @@ static YYACTIONTYPE yy_reduce( } yymsp[-1].minor.yy452 = yylhsminor.yy452; break; - case 411: /* signed ::= NK_FLOAT */ + case 412: /* signed ::= NK_FLOAT */ { yylhsminor.yy452 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } yymsp[0].minor.yy452 = yylhsminor.yy452; break; - case 412: /* signed ::= NK_PLUS NK_FLOAT */ + case 413: /* signed ::= NK_PLUS NK_FLOAT */ { yymsp[-1].minor.yy452 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } break; - case 413: /* signed ::= NK_MINUS NK_FLOAT */ + case 414: /* 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; @@ -5975,57 +5980,61 @@ static YYACTIONTYPE yy_reduce( } yymsp[-1].minor.yy452 = yylhsminor.yy452; break; - case 415: /* signed_literal ::= NK_STRING */ + case 416: /* signed_literal ::= NK_STRING */ { yylhsminor.yy452 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } yymsp[0].minor.yy452 = yylhsminor.yy452; break; - case 416: /* signed_literal ::= NK_BOOL */ + case 417: /* signed_literal ::= NK_BOOL */ { yylhsminor.yy452 = createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0); } yymsp[0].minor.yy452 = yylhsminor.yy452; break; - case 417: /* signed_literal ::= TIMESTAMP NK_STRING */ + case 418: /* signed_literal ::= TIMESTAMP NK_STRING */ { yymsp[-1].minor.yy452 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } break; - case 418: /* signed_literal ::= duration_literal */ - case 420: /* signed_literal ::= literal_func */ yytestcase(yyruleno==420); - case 492: /* star_func_para ::= expr_or_subquery */ yytestcase(yyruleno==492); - case 558: /* select_item ::= common_expression */ yytestcase(yyruleno==558); - case 568: /* partition_item ::= expr_or_subquery */ yytestcase(yyruleno==568); - case 606: /* query_simple_or_subquery ::= subquery */ yytestcase(yyruleno==606); - case 608: /* query_or_subquery ::= subquery */ yytestcase(yyruleno==608); - case 621: /* search_condition ::= common_expression */ yytestcase(yyruleno==621); + case 419: /* signed_literal ::= duration_literal */ + case 421: /* signed_literal ::= literal_func */ yytestcase(yyruleno==421); + case 493: /* star_func_para ::= expr_or_subquery */ yytestcase(yyruleno==493); + case 559: /* select_item ::= common_expression */ yytestcase(yyruleno==559); + case 569: /* partition_item ::= expr_or_subquery */ yytestcase(yyruleno==569); + case 607: /* query_simple_or_subquery ::= subquery */ yytestcase(yyruleno==607); + case 609: /* query_or_subquery ::= subquery */ yytestcase(yyruleno==609); + case 622: /* search_condition ::= common_expression */ yytestcase(yyruleno==622); { yylhsminor.yy452 = releaseRawExprNode(pCxt, yymsp[0].minor.yy452); } yymsp[0].minor.yy452 = yylhsminor.yy452; break; - case 419: /* signed_literal ::= NULL */ + case 420: /* signed_literal ::= NULL */ { yylhsminor.yy452 = createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0); } yymsp[0].minor.yy452 = yylhsminor.yy452; break; - case 421: /* signed_literal ::= NK_QUESTION */ + case 422: /* signed_literal ::= NK_QUESTION */ { yylhsminor.yy452 = createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0); } yymsp[0].minor.yy452 = yylhsminor.yy452; break; - case 442: /* expression ::= NK_LP expression NK_RP */ - case 526: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==526); - case 620: /* subquery ::= NK_LP subquery NK_RP */ yytestcase(yyruleno==620); + case 439: /* expression ::= pseudo_column */ +{ yylhsminor.yy452 = yymsp[0].minor.yy452; setRawExprNodeIsPseudoColumn(pCxt, yylhsminor.yy452, true); } + yymsp[0].minor.yy452 = yylhsminor.yy452; + break; + case 443: /* expression ::= NK_LP expression NK_RP */ + case 527: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==527); + case 621: /* subquery ::= NK_LP subquery NK_RP */ yytestcase(yyruleno==621); { yylhsminor.yy452 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy452)); } yymsp[-2].minor.yy452 = yylhsminor.yy452; break; - case 443: /* expression ::= NK_PLUS expr_or_subquery */ + case 444: /* expression ::= NK_PLUS expr_or_subquery */ { SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy452); yylhsminor.yy452 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, releaseRawExprNode(pCxt, yymsp[0].minor.yy452)); } yymsp[-1].minor.yy452 = yylhsminor.yy452; break; - case 444: /* expression ::= NK_MINUS expr_or_subquery */ + case 445: /* expression ::= NK_MINUS expr_or_subquery */ { SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy452); yylhsminor.yy452 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, createOperatorNode(pCxt, OP_TYPE_MINUS, releaseRawExprNode(pCxt, yymsp[0].minor.yy452), NULL)); } yymsp[-1].minor.yy452 = yylhsminor.yy452; break; - case 445: /* expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ + case 446: /* expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy452); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy452); @@ -6033,7 +6042,7 @@ static YYACTIONTYPE yy_reduce( } yymsp[-2].minor.yy452 = yylhsminor.yy452; break; - case 446: /* expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ + case 447: /* expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy452); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy452); @@ -6041,7 +6050,7 @@ static YYACTIONTYPE yy_reduce( } yymsp[-2].minor.yy452 = yylhsminor.yy452; break; - case 447: /* expression ::= expr_or_subquery NK_STAR expr_or_subquery */ + case 448: /* expression ::= expr_or_subquery NK_STAR expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy452); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy452); @@ -6049,7 +6058,7 @@ static YYACTIONTYPE yy_reduce( } yymsp[-2].minor.yy452 = yylhsminor.yy452; break; - case 448: /* expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ + case 449: /* expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy452); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy452); @@ -6057,7 +6066,7 @@ static YYACTIONTYPE yy_reduce( } yymsp[-2].minor.yy452 = yylhsminor.yy452; break; - case 449: /* expression ::= expr_or_subquery NK_REM expr_or_subquery */ + case 450: /* expression ::= expr_or_subquery NK_REM expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy452); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy452); @@ -6065,14 +6074,14 @@ static YYACTIONTYPE yy_reduce( } yymsp[-2].minor.yy452 = yylhsminor.yy452; break; - case 450: /* expression ::= column_reference NK_ARROW NK_STRING */ + case 451: /* expression ::= column_reference NK_ARROW NK_STRING */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy452); yylhsminor.yy452 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_JSON_GET_VALUE, releaseRawExprNode(pCxt, yymsp[-2].minor.yy452), createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0))); } yymsp[-2].minor.yy452 = yylhsminor.yy452; break; - case 451: /* expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ + case 452: /* expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy452); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy452); @@ -6080,7 +6089,7 @@ static YYACTIONTYPE yy_reduce( } yymsp[-2].minor.yy452 = yylhsminor.yy452; break; - case 452: /* expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ + case 453: /* expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy452); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy452); @@ -6088,71 +6097,71 @@ static YYACTIONTYPE yy_reduce( } yymsp[-2].minor.yy452 = yylhsminor.yy452; break; - case 455: /* column_reference ::= column_name */ + case 456: /* column_reference ::= column_name */ { yylhsminor.yy452 = createRawExprNode(pCxt, &yymsp[0].minor.yy129, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy129)); } yymsp[0].minor.yy452 = yylhsminor.yy452; break; - case 456: /* column_reference ::= table_name NK_DOT column_name */ + case 457: /* column_reference ::= table_name NK_DOT column_name */ { yylhsminor.yy452 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy129, &yymsp[0].minor.yy129, createColumnNode(pCxt, &yymsp[-2].minor.yy129, &yymsp[0].minor.yy129)); } yymsp[-2].minor.yy452 = yylhsminor.yy452; break; - case 457: /* pseudo_column ::= ROWTS */ - case 458: /* pseudo_column ::= TBNAME */ yytestcase(yyruleno==458); - case 460: /* pseudo_column ::= QSTART */ yytestcase(yyruleno==460); - case 461: /* pseudo_column ::= QEND */ yytestcase(yyruleno==461); - case 462: /* pseudo_column ::= QDURATION */ yytestcase(yyruleno==462); - case 463: /* pseudo_column ::= WSTART */ yytestcase(yyruleno==463); - case 464: /* pseudo_column ::= WEND */ yytestcase(yyruleno==464); - case 465: /* pseudo_column ::= WDURATION */ yytestcase(yyruleno==465); - case 466: /* pseudo_column ::= IROWTS */ yytestcase(yyruleno==466); - case 467: /* pseudo_column ::= ISFILLED */ yytestcase(yyruleno==467); - case 468: /* pseudo_column ::= QTAGS */ yytestcase(yyruleno==468); - case 474: /* literal_func ::= NOW */ yytestcase(yyruleno==474); + case 458: /* pseudo_column ::= ROWTS */ + case 459: /* pseudo_column ::= TBNAME */ yytestcase(yyruleno==459); + case 461: /* pseudo_column ::= QSTART */ yytestcase(yyruleno==461); + case 462: /* pseudo_column ::= QEND */ yytestcase(yyruleno==462); + case 463: /* pseudo_column ::= QDURATION */ yytestcase(yyruleno==463); + case 464: /* pseudo_column ::= WSTART */ yytestcase(yyruleno==464); + case 465: /* pseudo_column ::= WEND */ yytestcase(yyruleno==465); + case 466: /* pseudo_column ::= WDURATION */ yytestcase(yyruleno==466); + case 467: /* pseudo_column ::= IROWTS */ yytestcase(yyruleno==467); + case 468: /* pseudo_column ::= ISFILLED */ yytestcase(yyruleno==468); + case 469: /* pseudo_column ::= QTAGS */ yytestcase(yyruleno==469); + case 475: /* literal_func ::= NOW */ yytestcase(yyruleno==475); { yylhsminor.yy452 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL)); } yymsp[0].minor.yy452 = yylhsminor.yy452; break; - case 459: /* pseudo_column ::= table_name NK_DOT TBNAME */ + case 460: /* pseudo_column ::= table_name NK_DOT TBNAME */ { yylhsminor.yy452 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy129, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-2].minor.yy129)))); } yymsp[-2].minor.yy452 = yylhsminor.yy452; break; - case 469: /* function_expression ::= function_name NK_LP expression_list NK_RP */ - case 470: /* function_expression ::= star_func NK_LP star_func_para_list NK_RP */ yytestcase(yyruleno==470); + case 470: /* function_expression ::= function_name NK_LP expression_list NK_RP */ + case 471: /* function_expression ::= star_func NK_LP star_func_para_list NK_RP */ yytestcase(yyruleno==471); { yylhsminor.yy452 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy129, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy129, yymsp[-1].minor.yy844)); } yymsp[-3].minor.yy452 = yylhsminor.yy452; break; - case 471: /* function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ + case 472: /* function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ { yylhsminor.yy452 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createCastFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy452), yymsp[-1].minor.yy794)); } yymsp[-5].minor.yy452 = yylhsminor.yy452; break; - case 473: /* literal_func ::= noarg_func NK_LP NK_RP */ + case 474: /* literal_func ::= noarg_func NK_LP NK_RP */ { yylhsminor.yy452 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy129, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-2].minor.yy129, NULL)); } yymsp[-2].minor.yy452 = yylhsminor.yy452; break; - case 488: /* star_func_para_list ::= NK_STAR */ + case 489: /* star_func_para_list ::= NK_STAR */ { yylhsminor.yy844 = createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy844 = yylhsminor.yy844; break; - case 493: /* star_func_para ::= table_name NK_DOT NK_STAR */ - case 561: /* select_item ::= table_name NK_DOT NK_STAR */ yytestcase(yyruleno==561); + case 494: /* star_func_para ::= table_name NK_DOT NK_STAR */ + case 562: /* select_item ::= table_name NK_DOT NK_STAR */ yytestcase(yyruleno==562); { yylhsminor.yy452 = createColumnNode(pCxt, &yymsp[-2].minor.yy129, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy452 = yylhsminor.yy452; break; - case 494: /* case_when_expression ::= CASE when_then_list case_when_else_opt END */ + case 495: /* case_when_expression ::= CASE when_then_list case_when_else_opt END */ { yylhsminor.yy452 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, NULL, yymsp[-2].minor.yy844, yymsp[-1].minor.yy452)); } yymsp[-3].minor.yy452 = yylhsminor.yy452; break; - case 495: /* case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ + case 496: /* case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ { yylhsminor.yy452 = createRawExprNodeExt(pCxt, &yymsp[-4].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy452), yymsp[-2].minor.yy844, yymsp[-1].minor.yy452)); } yymsp[-4].minor.yy452 = yylhsminor.yy452; break; - case 498: /* when_then_expr ::= WHEN common_expression THEN common_expression */ + case 499: /* when_then_expr ::= WHEN common_expression THEN common_expression */ { yymsp[-3].minor.yy452 = createWhenThenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy452), releaseRawExprNode(pCxt, yymsp[0].minor.yy452)); } break; - case 500: /* case_when_else_opt ::= ELSE common_expression */ + case 501: /* case_when_else_opt ::= ELSE common_expression */ { yymsp[-1].minor.yy452 = releaseRawExprNode(pCxt, yymsp[0].minor.yy452); } break; - case 501: /* predicate ::= expr_or_subquery compare_op expr_or_subquery */ - case 506: /* predicate ::= expr_or_subquery in_op in_predicate_value */ yytestcase(yyruleno==506); + case 502: /* predicate ::= expr_or_subquery compare_op expr_or_subquery */ + case 507: /* predicate ::= expr_or_subquery in_op in_predicate_value */ yytestcase(yyruleno==507); { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy452); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy452); @@ -6160,7 +6169,7 @@ static YYACTIONTYPE yy_reduce( } yymsp[-2].minor.yy452 = yylhsminor.yy452; break; - case 502: /* predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ + case 503: /* predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-4].minor.yy452); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy452); @@ -6168,7 +6177,7 @@ static YYACTIONTYPE yy_reduce( } yymsp[-4].minor.yy452 = yylhsminor.yy452; break; - case 503: /* predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ + case 504: /* predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-5].minor.yy452); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy452); @@ -6176,71 +6185,71 @@ static YYACTIONTYPE yy_reduce( } yymsp[-5].minor.yy452 = yylhsminor.yy452; break; - case 504: /* predicate ::= expr_or_subquery IS NULL */ + case 505: /* predicate ::= expr_or_subquery IS NULL */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy452); yylhsminor.yy452 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NULL, releaseRawExprNode(pCxt, yymsp[-2].minor.yy452), NULL)); } yymsp[-2].minor.yy452 = yylhsminor.yy452; break; - case 505: /* predicate ::= expr_or_subquery IS NOT NULL */ + case 506: /* predicate ::= expr_or_subquery IS NOT NULL */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-3].minor.yy452); yylhsminor.yy452 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NOT_NULL, releaseRawExprNode(pCxt, yymsp[-3].minor.yy452), NULL)); } yymsp[-3].minor.yy452 = yylhsminor.yy452; break; - case 507: /* compare_op ::= NK_LT */ + case 508: /* compare_op ::= NK_LT */ { yymsp[0].minor.yy750 = OP_TYPE_LOWER_THAN; } break; - case 508: /* compare_op ::= NK_GT */ + case 509: /* compare_op ::= NK_GT */ { yymsp[0].minor.yy750 = OP_TYPE_GREATER_THAN; } break; - case 509: /* compare_op ::= NK_LE */ + case 510: /* compare_op ::= NK_LE */ { yymsp[0].minor.yy750 = OP_TYPE_LOWER_EQUAL; } break; - case 510: /* compare_op ::= NK_GE */ + case 511: /* compare_op ::= NK_GE */ { yymsp[0].minor.yy750 = OP_TYPE_GREATER_EQUAL; } break; - case 511: /* compare_op ::= NK_NE */ + case 512: /* compare_op ::= NK_NE */ { yymsp[0].minor.yy750 = OP_TYPE_NOT_EQUAL; } break; - case 512: /* compare_op ::= NK_EQ */ + case 513: /* compare_op ::= NK_EQ */ { yymsp[0].minor.yy750 = OP_TYPE_EQUAL; } break; - case 513: /* compare_op ::= LIKE */ + case 514: /* compare_op ::= LIKE */ { yymsp[0].minor.yy750 = OP_TYPE_LIKE; } break; - case 514: /* compare_op ::= NOT LIKE */ + case 515: /* compare_op ::= NOT LIKE */ { yymsp[-1].minor.yy750 = OP_TYPE_NOT_LIKE; } break; - case 515: /* compare_op ::= MATCH */ + case 516: /* compare_op ::= MATCH */ { yymsp[0].minor.yy750 = OP_TYPE_MATCH; } break; - case 516: /* compare_op ::= NMATCH */ + case 517: /* compare_op ::= NMATCH */ { yymsp[0].minor.yy750 = OP_TYPE_NMATCH; } break; - case 517: /* compare_op ::= CONTAINS */ + case 518: /* compare_op ::= CONTAINS */ { yymsp[0].minor.yy750 = OP_TYPE_JSON_CONTAINS; } break; - case 518: /* in_op ::= IN */ + case 519: /* in_op ::= IN */ { yymsp[0].minor.yy750 = OP_TYPE_IN; } break; - case 519: /* in_op ::= NOT IN */ + case 520: /* in_op ::= NOT IN */ { yymsp[-1].minor.yy750 = OP_TYPE_NOT_IN; } break; - case 520: /* in_predicate_value ::= NK_LP literal_list NK_RP */ + case 521: /* in_predicate_value ::= NK_LP literal_list NK_RP */ { yylhsminor.yy452 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createNodeListNode(pCxt, yymsp[-1].minor.yy844)); } yymsp[-2].minor.yy452 = yylhsminor.yy452; break; - case 522: /* boolean_value_expression ::= NOT boolean_primary */ + case 523: /* boolean_value_expression ::= NOT boolean_primary */ { SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy452); yylhsminor.yy452 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_NOT, releaseRawExprNode(pCxt, yymsp[0].minor.yy452), NULL)); } yymsp[-1].minor.yy452 = yylhsminor.yy452; break; - case 523: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ + case 524: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy452); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy452); @@ -6248,7 +6257,7 @@ static YYACTIONTYPE yy_reduce( } yymsp[-2].minor.yy452 = yylhsminor.yy452; break; - case 524: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ + case 525: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy452); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy452); @@ -6256,43 +6265,43 @@ static YYACTIONTYPE yy_reduce( } yymsp[-2].minor.yy452 = yylhsminor.yy452; break; - case 532: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */ + case 533: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */ { yylhsminor.yy452 = createJoinTableNode(pCxt, JOIN_TYPE_INNER, yymsp[-2].minor.yy452, yymsp[0].minor.yy452, NULL); } yymsp[-2].minor.yy452 = yylhsminor.yy452; break; - case 535: /* table_primary ::= table_name alias_opt */ + case 536: /* table_primary ::= table_name alias_opt */ { yylhsminor.yy452 = createRealTableNode(pCxt, NULL, &yymsp[-1].minor.yy129, &yymsp[0].minor.yy129); } yymsp[-1].minor.yy452 = yylhsminor.yy452; break; - case 536: /* table_primary ::= db_name NK_DOT table_name alias_opt */ + case 537: /* table_primary ::= db_name NK_DOT table_name alias_opt */ { yylhsminor.yy452 = createRealTableNode(pCxt, &yymsp[-3].minor.yy129, &yymsp[-1].minor.yy129, &yymsp[0].minor.yy129); } yymsp[-3].minor.yy452 = yylhsminor.yy452; break; - case 537: /* table_primary ::= subquery alias_opt */ + case 538: /* table_primary ::= subquery alias_opt */ { yylhsminor.yy452 = createTempTableNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy452), &yymsp[0].minor.yy129); } yymsp[-1].minor.yy452 = yylhsminor.yy452; break; - case 539: /* alias_opt ::= */ + case 540: /* alias_opt ::= */ { yymsp[1].minor.yy129 = nil_token; } break; - case 541: /* alias_opt ::= AS table_alias */ + case 542: /* alias_opt ::= AS table_alias */ { yymsp[-1].minor.yy129 = yymsp[0].minor.yy129; } break; - case 542: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */ - case 543: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==543); + case 543: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */ + case 544: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==544); { yymsp[-2].minor.yy452 = yymsp[-1].minor.yy452; } break; - case 544: /* joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ + case 545: /* joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ { yylhsminor.yy452 = createJoinTableNode(pCxt, yymsp[-4].minor.yy42, yymsp[-5].minor.yy452, yymsp[-2].minor.yy452, yymsp[0].minor.yy452); } yymsp[-5].minor.yy452 = yylhsminor.yy452; break; - case 545: /* join_type ::= */ + case 546: /* join_type ::= */ { yymsp[1].minor.yy42 = JOIN_TYPE_INNER; } break; - case 546: /* join_type ::= INNER */ + case 547: /* join_type ::= INNER */ { yymsp[0].minor.yy42 = JOIN_TYPE_INNER; } break; - case 547: /* query_specification ::= SELECT hint_list set_quantifier_opt tag_mode_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 548: /* query_specification ::= SELECT hint_list set_quantifier_opt tag_mode_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[-13].minor.yy452 = createSelectStmt(pCxt, yymsp[-11].minor.yy137, yymsp[-9].minor.yy844, yymsp[-8].minor.yy452, yymsp[-12].minor.yy844); yymsp[-13].minor.yy452 = setSelectStmtTagMode(pCxt, yymsp[-13].minor.yy452, yymsp[-10].minor.yy137); @@ -6306,92 +6315,92 @@ static YYACTIONTYPE yy_reduce( yymsp[-13].minor.yy452 = addFillClause(pCxt, yymsp[-13].minor.yy452, yymsp[-3].minor.yy452); } break; - case 548: /* hint_list ::= */ + case 549: /* hint_list ::= */ { yymsp[1].minor.yy844 = createHintNodeList(pCxt, NULL); } break; - case 549: /* hint_list ::= NK_HINT */ + case 550: /* hint_list ::= NK_HINT */ { yylhsminor.yy844 = createHintNodeList(pCxt, &yymsp[0].minor.yy0); } yymsp[0].minor.yy844 = yylhsminor.yy844; break; - case 554: /* set_quantifier_opt ::= ALL */ + case 555: /* set_quantifier_opt ::= ALL */ { yymsp[0].minor.yy137 = false; } break; - case 557: /* select_item ::= NK_STAR */ + case 558: /* select_item ::= NK_STAR */ { yylhsminor.yy452 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0); } yymsp[0].minor.yy452 = yylhsminor.yy452; break; - case 559: /* select_item ::= common_expression column_alias */ - case 569: /* partition_item ::= expr_or_subquery column_alias */ yytestcase(yyruleno==569); + case 560: /* select_item ::= common_expression column_alias */ + case 570: /* partition_item ::= expr_or_subquery column_alias */ yytestcase(yyruleno==570); { yylhsminor.yy452 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy452), &yymsp[0].minor.yy129); } yymsp[-1].minor.yy452 = yylhsminor.yy452; break; - case 560: /* select_item ::= common_expression AS column_alias */ - case 570: /* partition_item ::= expr_or_subquery AS column_alias */ yytestcase(yyruleno==570); + case 561: /* select_item ::= common_expression AS column_alias */ + case 571: /* partition_item ::= expr_or_subquery AS column_alias */ yytestcase(yyruleno==571); { yylhsminor.yy452 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy452), &yymsp[0].minor.yy129); } yymsp[-2].minor.yy452 = yylhsminor.yy452; break; - case 565: /* partition_by_clause_opt ::= PARTITION BY partition_list */ - case 590: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==590); - case 610: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==610); + case 566: /* partition_by_clause_opt ::= PARTITION BY partition_list */ + case 591: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==591); + case 611: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==611); { yymsp[-2].minor.yy844 = yymsp[0].minor.yy844; } break; - case 572: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ + case 573: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ { yymsp[-5].minor.yy452 = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy452), releaseRawExprNode(pCxt, yymsp[-1].minor.yy452)); } break; - case 573: /* twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ + case 574: /* twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ { yymsp[-3].minor.yy452 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy452)); } break; - case 574: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ + case 575: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ { yymsp[-5].minor.yy452 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy452), NULL, yymsp[-1].minor.yy452, yymsp[0].minor.yy452); } break; - case 575: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ + case 576: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ { yymsp[-7].minor.yy452 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy452), releaseRawExprNode(pCxt, yymsp[-3].minor.yy452), yymsp[-1].minor.yy452, yymsp[0].minor.yy452); } break; - case 576: /* twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ + case 577: /* twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ { yymsp[-6].minor.yy452 = createEventWindowNode(pCxt, yymsp[-3].minor.yy452, yymsp[0].minor.yy452); } break; - case 580: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */ + case 581: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */ { yymsp[-3].minor.yy452 = createFillNode(pCxt, yymsp[-1].minor.yy264, NULL); } break; - case 581: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP */ + case 582: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP */ { yymsp[-5].minor.yy452 = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, yymsp[-1].minor.yy844)); } break; - case 582: /* fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP */ + case 583: /* fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP */ { yymsp[-5].minor.yy452 = createFillNode(pCxt, FILL_MODE_VALUE_F, createNodeListNode(pCxt, yymsp[-1].minor.yy844)); } break; - case 583: /* fill_mode ::= NONE */ + case 584: /* fill_mode ::= NONE */ { yymsp[0].minor.yy264 = FILL_MODE_NONE; } break; - case 584: /* fill_mode ::= PREV */ + case 585: /* fill_mode ::= PREV */ { yymsp[0].minor.yy264 = FILL_MODE_PREV; } break; - case 585: /* fill_mode ::= NULL */ + case 586: /* fill_mode ::= NULL */ { yymsp[0].minor.yy264 = FILL_MODE_NULL; } break; - case 586: /* fill_mode ::= NULL_F */ + case 587: /* fill_mode ::= NULL_F */ { yymsp[0].minor.yy264 = FILL_MODE_NULL_F; } break; - case 587: /* fill_mode ::= LINEAR */ + case 588: /* fill_mode ::= LINEAR */ { yymsp[0].minor.yy264 = FILL_MODE_LINEAR; } break; - case 588: /* fill_mode ::= NEXT */ + case 589: /* fill_mode ::= NEXT */ { yymsp[0].minor.yy264 = FILL_MODE_NEXT; } break; - case 591: /* group_by_list ::= expr_or_subquery */ + case 592: /* group_by_list ::= expr_or_subquery */ { yylhsminor.yy844 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy452))); } yymsp[0].minor.yy844 = yylhsminor.yy844; break; - case 592: /* group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ + case 593: /* group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ { yylhsminor.yy844 = addNodeToList(pCxt, yymsp[-2].minor.yy844, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy452))); } yymsp[-2].minor.yy844 = yylhsminor.yy844; break; - case 596: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ + case 597: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ { yymsp[-5].minor.yy452 = createInterpTimeRange(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy452), releaseRawExprNode(pCxt, yymsp[-1].minor.yy452)); } break; - case 597: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_RP */ + case 598: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_RP */ { yymsp[-3].minor.yy452 = createInterpTimePoint(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy452)); } break; - case 600: /* query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ + case 601: /* query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ { yylhsminor.yy452 = addOrderByClause(pCxt, yymsp[-3].minor.yy452, yymsp[-2].minor.yy844); yylhsminor.yy452 = addSlimitClause(pCxt, yylhsminor.yy452, yymsp[-1].minor.yy452); @@ -6399,50 +6408,50 @@ static YYACTIONTYPE yy_reduce( } yymsp[-3].minor.yy452 = yylhsminor.yy452; break; - case 603: /* union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ + case 604: /* union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ { yylhsminor.yy452 = createSetOperator(pCxt, SET_OP_TYPE_UNION_ALL, yymsp[-3].minor.yy452, yymsp[0].minor.yy452); } yymsp[-3].minor.yy452 = yylhsminor.yy452; break; - case 604: /* union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ + case 605: /* union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ { yylhsminor.yy452 = createSetOperator(pCxt, SET_OP_TYPE_UNION, yymsp[-2].minor.yy452, yymsp[0].minor.yy452); } yymsp[-2].minor.yy452 = yylhsminor.yy452; break; - case 612: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */ - case 616: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==616); + case 613: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */ + case 617: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==617); { yymsp[-1].minor.yy452 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); } break; - case 613: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ - case 617: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==617); + case 614: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ + case 618: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==618); { yymsp[-3].minor.yy452 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); } break; - case 614: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - case 618: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==618); + case 615: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + case 619: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==619); { yymsp[-3].minor.yy452 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); } break; - case 619: /* subquery ::= NK_LP query_expression NK_RP */ + case 620: /* subquery ::= NK_LP query_expression NK_RP */ { yylhsminor.yy452 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy452); } yymsp[-2].minor.yy452 = yylhsminor.yy452; break; - case 624: /* sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ + case 625: /* sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ { yylhsminor.yy452 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy452), yymsp[-1].minor.yy178, yymsp[0].minor.yy807); } yymsp[-2].minor.yy452 = yylhsminor.yy452; break; - case 625: /* ordering_specification_opt ::= */ + case 626: /* ordering_specification_opt ::= */ { yymsp[1].minor.yy178 = ORDER_ASC; } break; - case 626: /* ordering_specification_opt ::= ASC */ + case 627: /* ordering_specification_opt ::= ASC */ { yymsp[0].minor.yy178 = ORDER_ASC; } break; - case 627: /* ordering_specification_opt ::= DESC */ + case 628: /* ordering_specification_opt ::= DESC */ { yymsp[0].minor.yy178 = ORDER_DESC; } break; - case 628: /* null_ordering_opt ::= */ + case 629: /* null_ordering_opt ::= */ { yymsp[1].minor.yy807 = NULL_ORDER_DEFAULT; } break; - case 629: /* null_ordering_opt ::= NULLS FIRST */ + case 630: /* null_ordering_opt ::= NULLS FIRST */ { yymsp[-1].minor.yy807 = NULL_ORDER_FIRST; } break; - case 630: /* null_ordering_opt ::= NULLS LAST */ + case 631: /* null_ordering_opt ::= NULLS LAST */ { yymsp[-1].minor.yy807 = NULL_ORDER_LAST; } break; default: diff --git a/source/libs/planner/src/planOptimizer.c b/source/libs/planner/src/planOptimizer.c index 430e69f46f..8d4c042960 100644 --- a/source/libs/planner/src/planOptimizer.c +++ b/source/libs/planner/src/planOptimizer.c @@ -2730,36 +2730,6 @@ static bool tagScanOptShouldBeOptimized(SLogicNode* pNode) { return true; } -static SLogicNode* tagScanOptFindAncestorWithSlimit(SLogicNode* pTableScanNode) { - SLogicNode* pNode = pTableScanNode->pParent; - while (NULL != pNode) { - if (QUERY_NODE_LOGIC_PLAN_PARTITION == nodeType(pNode) || QUERY_NODE_LOGIC_PLAN_AGG == nodeType(pNode) || - QUERY_NODE_LOGIC_PLAN_WINDOW == nodeType(pNode) || QUERY_NODE_LOGIC_PLAN_SORT == nodeType(pNode)) { - return NULL; - } - if (NULL != pNode->pSlimit) { - return pNode; - } - pNode = pNode->pParent; - } - return NULL; -} - -static void tagScanOptCloneAncestorSlimit(SLogicNode* pTableScanNode) { - if (NULL != pTableScanNode->pSlimit) { - return; - } - - SLogicNode* pNode = tagScanOptFindAncestorWithSlimit(pTableScanNode); - if (NULL != pNode) { - // TODO: only set the slimit now. push down slimit later - pTableScanNode->pSlimit = nodesCloneNode(pNode->pSlimit); - ((SLimitNode*)pTableScanNode->pSlimit)->limit += ((SLimitNode*)pTableScanNode->pSlimit)->offset; - ((SLimitNode*)pTableScanNode->pSlimit)->offset = 0; - } - return; -} - static int32_t tagScanOptimize(SOptimizeContext* pCxt, SLogicSubplan* pLogicSubplan) { SScanLogicNode* pScanNode = (SScanLogicNode*)optFindPossibleNode(pLogicSubplan->pNode, tagScanOptShouldBeOptimized); if (NULL == pScanNode) { @@ -2795,13 +2765,6 @@ static int32_t tagScanOptimize(SOptimizeContext* pCxt, SLogicSubplan* pLogicSubp pScanNode->node.pTargets = pScanTargets; } - int32_t code = replaceLogicNode(pLogicSubplan, pAgg, (SLogicNode*)pScanNode); - if (TSDB_CODE_SUCCESS == code) { - NODES_CLEAR_LIST(pAgg->pChildren); - } - nodesDestroyNode((SNode*)pAgg); - tagScanOptCloneAncestorSlimit((SLogicNode*)pScanNode); - pScanNode->onlyMetaCtbIdx = false; pCxt->optimized = true; diff --git a/source/libs/stream/src/streamUpdate.c b/source/libs/stream/src/streamUpdate.c index 59471e8d8e..858667b563 100644 --- a/source/libs/stream/src/streamUpdate.c +++ b/source/libs/stream/src/streamUpdate.c @@ -219,17 +219,22 @@ bool updateInfoIsUpdated(SUpdateInfo *pInfo, uint64_t tableId, TSKEY ts) { } SScalableBf *pSBf = getSBf(pInfo, ts); - // pSBf may be a null pointer - if (pSBf) { - res = tScalableBfPut(pSBf, &updateKey, sizeof(SUpdateKey)); - } int32_t size = taosHashGetSize(pInfo->pMap); if ((!pMapMaxTs && size < DEFAULT_MAP_SIZE) || (pMapMaxTs && *pMapMaxTs < ts)) { taosHashPut(pInfo->pMap, &tableId, sizeof(uint64_t), &ts, sizeof(TSKEY)); + // pSBf may be a null pointer + if (pSBf) { + res = tScalableBfPutNoCheck(pSBf, &updateKey, sizeof(SUpdateKey)); + } return false; } + // pSBf may be a null pointer + if (pSBf) { + res = tScalableBfPut(pSBf, &updateKey, sizeof(SUpdateKey)); + } + if (!pMapMaxTs && maxTs < ts) { taosArraySet(pInfo->pTsBuckets, index, &ts); return false; diff --git a/source/libs/stream/src/tstreamFileState.c b/source/libs/stream/src/tstreamFileState.c index ac404893f0..584e81fafc 100644 --- a/source/libs/stream/src/tstreamFileState.c +++ b/source/libs/stream/src/tstreamFileState.c @@ -177,7 +177,10 @@ SStreamFileState* streamFileStateInit(int64_t memSize, uint32_t keySize, uint32_ // todo(liuyao) optimize if (type == STREAM_STATE_BUFF_HASH) { recoverSnapshot(pFileState, checkpointId); + } else { + recoverSesssion(pFileState, checkpointId); } + return pFileState; _error: @@ -642,12 +645,24 @@ int32_t deleteExpiredCheckPoint(SStreamFileState* pFileState, TSKEY mark) { } int32_t recoverSesssion(SStreamFileState* pFileState, int64_t ckId) { - int code = TSDB_CODE_SUCCESS; + int code = TSDB_CODE_SUCCESS; + if (pFileState->maxTs != INT64_MIN) { + int64_t mark = (INT64_MIN + pFileState->deleteMark >= pFileState->maxTs) + ? INT64_MIN + : pFileState->maxTs - pFileState->deleteMark; + deleteExpiredCheckPoint(pFileState, mark); + } + SStreamStateCur* pCur = streamStateSessionSeekToLast_rocksdb(pFileState->pFileStore); if (pCur == NULL) { return -1; } + int32_t recoverNum = TMIN(MIN_NUM_OF_ROW_BUFF, pFileState->maxRowCount); while (code == TSDB_CODE_SUCCESS) { + if (pFileState->curRowCount >= recoverNum) { + break; + } + void* pVal = NULL; int32_t vlen = 0; SSessionKey key = {0}; @@ -655,12 +670,14 @@ int32_t recoverSesssion(SStreamFileState* pFileState, int64_t ckId) { if (code != 0) { break; } - taosMemoryFree(pVal); + SRowBuffPos* pPos = createSessionWinBuff(pFileState, &key, pVal, &vlen); + putSessionWinResultBuff(pFileState, pPos); code = streamStateSessionCurPrev_rocksdb(pCur); } streamStateFreeCur(pCur); return code; } + int32_t recoverSnapshot(SStreamFileState* pFileState, int64_t ckId) { int32_t code = TSDB_CODE_SUCCESS; if (pFileState->maxTs != INT64_MIN) { @@ -674,11 +691,12 @@ int32_t recoverSnapshot(SStreamFileState* pFileState, int64_t ckId) { if (pCur == NULL) { return -1; } - + int32_t recoverNum = TMIN(MIN_NUM_OF_ROW_BUFF, pFileState->maxRowCount); while (code == TSDB_CODE_SUCCESS) { - if (pFileState->curRowCount == pFileState->maxRowCount) { + if (pFileState->curRowCount >= recoverNum) { break; } + void* pVal = NULL; int32_t vlen = 0; SRowBuffPos* pNewPos = getNewRowPosForWrite(pFileState); diff --git a/source/libs/sync/src/syncMain.c b/source/libs/sync/src/syncMain.c index edecfcb2bc..eca499cf28 100644 --- a/source/libs/sync/src/syncMain.c +++ b/source/libs/sync/src/syncMain.c @@ -2860,11 +2860,12 @@ int32_t syncNodeChangeConfig(SSyncNode* ths, SSyncRaftEntry* pEntry, char* str){ } int32_t syncNodeAppend(SSyncNode* ths, SSyncRaftEntry* pEntry) { + int32_t code = -1; if (pEntry->dataLen < sizeof(SMsgHead)) { sError("vgId:%d, cannot append an invalid client request with no msg head. type:%s, dataLen:%d", ths->vgId, TMSG_INFO(pEntry->originalRpcType), pEntry->dataLen); syncEntryDestroy(pEntry); - return -1; + goto _out; } // append to log buffer @@ -2873,9 +2874,11 @@ int32_t syncNodeAppend(SSyncNode* ths, SSyncRaftEntry* pEntry) { ASSERT(terrno != 0); (void)syncFsmExecute(ths, ths->pFsm, ths->state, raftStoreGetTerm(ths), pEntry, terrno, false); syncEntryDestroy(pEntry); - return -1; + goto _out; } - + + code = 0; +_out:; // proceed match index, with replicating on needed SyncIndex matchIndex = syncLogBufferProceed(ths->pLogBuf, ths, NULL, "Append"); @@ -2886,7 +2889,7 @@ int32_t syncNodeAppend(SSyncNode* ths, SSyncRaftEntry* pEntry) { // multi replica if (ths->replicaNum > 1) { - return 0; + return code; } // single replica @@ -2894,10 +2897,10 @@ int32_t syncNodeAppend(SSyncNode* ths, SSyncRaftEntry* pEntry) { if (syncLogBufferCommit(ths->pLogBuf, ths, ths->commitIndex) < 0) { sError("vgId:%d, failed to commit until commitIndex:%" PRId64 "", ths->vgId, ths->commitIndex); - return -1; + code = -1; } - return 0; + return code; } bool syncNodeHeartbeatReplyTimeout(SSyncNode* pSyncNode) { diff --git a/source/util/src/tbloomfilter.c b/source/util/src/tbloomfilter.c index 84a78f3477..150faab571 100644 --- a/source/util/src/tbloomfilter.c +++ b/source/util/src/tbloomfilter.c @@ -24,9 +24,8 @@ static FORCE_INLINE bool setBit(uint64_t *buf, uint64_t index) { uint64_t unitIndex = index >> UNIT_ADDR_NUM_BITS; - uint64_t mask = 1ULL << (index % UNIT_NUM_BITS); uint64_t old = buf[unitIndex]; - buf[unitIndex] |= mask; + buf[unitIndex] |= (1ULL << (index % UNIT_NUM_BITS)); return buf[unitIndex] != old; } @@ -57,10 +56,8 @@ SBloomFilter *tBloomFilterInit(uint64_t expectedEntries, double errorRate) { // ln(2) = 0.693147180559945 pBF->hashFunctions = (uint32_t)ceil(lnRate / 0.693147180559945); - /*pBF->hashFn1 = taosGetDefaultHashFunction(TSDB_DATA_TYPE_TIMESTAMP);*/ - /*pBF->hashFn2 = taosGetDefaultHashFunction(TSDB_DATA_TYPE_NCHAR);*/ - pBF->hashFn1 = taosFastHash; - pBF->hashFn2 = taosDJB2Hash; + pBF->hashFn1 = HASH_FUNCTION_1; + pBF->hashFn2 = HASH_FUNCTION_2; pBF->buffer = taosMemoryCalloc(pBF->numUnits, sizeof(uint64_t)); if (pBF->buffer == NULL) { tBloomFilterDestroy(pBF); @@ -69,14 +66,29 @@ SBloomFilter *tBloomFilterInit(uint64_t expectedEntries, double errorRate) { return pBF; } -int32_t tBloomFilterPut(SBloomFilter *pBF, const void *keyBuf, uint32_t len) { +int32_t tBloomFilterPutHash(SBloomFilter *pBF, uint64_t hash1, uint64_t hash2) { ASSERT(!tBloomFilterIsFull(pBF)); + bool hasChange = false; + const register uint64_t size = pBF->numBits; + uint64_t cbHash = hash1; + for (uint32_t i = 0; i < pBF->hashFunctions; ++i) { + hasChange |= setBit(pBF->buffer, cbHash % size); + cbHash += hash2; + } + if (hasChange) { + pBF->size++; + return TSDB_CODE_SUCCESS; + } + return TSDB_CODE_FAILED; +} + +int32_t tBloomFilterPut(SBloomFilter *pBF, const void *keyBuf, uint32_t len) { uint64_t h1 = (uint64_t)pBF->hashFn1(keyBuf, len); uint64_t h2 = (uint64_t)pBF->hashFn2(keyBuf, len); bool hasChange = false; const register uint64_t size = pBF->numBits; uint64_t cbHash = h1; - for (uint64_t i = 0; i < pBF->hashFunctions; ++i) { + for (uint32_t i = 0; i < pBF->hashFunctions; ++i) { hasChange |= setBit(pBF->buffer, cbHash % size); cbHash += h2; } @@ -87,16 +99,14 @@ int32_t tBloomFilterPut(SBloomFilter *pBF, const void *keyBuf, uint32_t len) { return TSDB_CODE_FAILED; } -int32_t tBloomFilterNoContain(const SBloomFilter *pBF, const void *keyBuf, uint32_t len) { - uint64_t h1 = (uint64_t)pBF->hashFn1(keyBuf, len); - uint64_t h2 = (uint64_t)pBF->hashFn2(keyBuf, len); +int32_t tBloomFilterNoContain(const SBloomFilter *pBF, uint64_t hash1, uint64_t hash2) { const register uint64_t size = pBF->numBits; - uint64_t cbHash = h1; - for (uint64_t i = 0; i < pBF->hashFunctions; ++i) { + uint64_t cbHash = hash1; + for (uint32_t i = 0; i < pBF->hashFunctions; ++i) { if (!getBit(pBF->buffer, cbHash % size)) { return TSDB_CODE_SUCCESS; } - cbHash += h2; + cbHash += hash2; } return TSDB_CODE_FAILED; } @@ -137,10 +147,8 @@ SBloomFilter *tBloomFilterDecode(SDecoder *pDecoder) { if (tDecodeU64(pDecoder, pUnits + i) < 0) goto _error; } if (tDecodeDouble(pDecoder, &pBF->errorRate) < 0) goto _error; - /*pBF->hashFn1 = taosGetDefaultHashFunction(TSDB_DATA_TYPE_TIMESTAMP);*/ - /*pBF->hashFn2 = taosGetDefaultHashFunction(TSDB_DATA_TYPE_NCHAR);*/ - pBF->hashFn1 = taosFastHash; - pBF->hashFn2 = taosDJB2Hash; + pBF->hashFn1 = HASH_FUNCTION_1; + pBF->hashFn2 = HASH_FUNCTION_2; return pBF; _error: diff --git a/source/util/src/terror.c b/source/util/src/terror.c index e549b72a42..71c29a0b0c 100644 --- a/source/util/src/terror.c +++ b/source/util/src/terror.c @@ -670,6 +670,8 @@ TAOS_DEFINE_ERROR(TSDB_CODE_TMQ_CONSUMER_ERROR, "Consumer error, to TAOS_DEFINE_ERROR(TSDB_CODE_TMQ_TOPIC_OUT_OF_RANGE, "Topic num out of range") TAOS_DEFINE_ERROR(TSDB_CODE_TMQ_GROUP_OUT_OF_RANGE, "Group num out of range 100") TAOS_DEFINE_ERROR(TSDB_CODE_TMQ_SAME_COMMITTED_VALUE, "Same committed value") +TAOS_DEFINE_ERROR(TSDB_CODE_TMQ_REPLAY_NEED_ONE_VGROUP, "Replay need only one vgroup if subscribe super table") +TAOS_DEFINE_ERROR(TSDB_CODE_TMQ_REPLAY_NOT_SUPPORT, "Replay is disabled if subscribe db or stable") // stream TAOS_DEFINE_ERROR(TSDB_CODE_STREAM_TASK_NOT_EXIST, "Stream task not exist") diff --git a/source/util/src/tscalablebf.c b/source/util/src/tscalablebf.c index 797f3a924d..3b4975b701 100644 --- a/source/util/src/tscalablebf.c +++ b/source/util/src/tscalablebf.c @@ -39,13 +39,31 @@ SScalableBf *tScalableBfInit(uint64_t expectedEntries, double errorRate) { return NULL; } pSBf->growth = DEFAULT_GROWTH; + pSBf->hashFn1 = HASH_FUNCTION_1; + pSBf->hashFn2 = HASH_FUNCTION_2; return pSBf; } +int32_t tScalableBfPutNoCheck(SScalableBf *pSBf, const void *keyBuf, uint32_t len) { + int32_t size = taosArrayGetSize(pSBf->bfArray); + SBloomFilter *pNormalBf = taosArrayGetP(pSBf->bfArray, size - 1); + ASSERT(pNormalBf); + if (tBloomFilterIsFull(pNormalBf)) { + pNormalBf = tScalableBfAddFilter(pSBf, pNormalBf->expectedEntries * pSBf->growth, + pNormalBf->errorRate * DEFAULT_TIGHTENING_RATIO); + if (pNormalBf == NULL) { + return TSDB_CODE_OUT_OF_MEMORY; + } + } + return tBloomFilterPut(pNormalBf, keyBuf, len); +} + int32_t tScalableBfPut(SScalableBf *pSBf, const void *keyBuf, uint32_t len) { + uint64_t h1 = (uint64_t)pSBf->hashFn1(keyBuf, len); + uint64_t h2 = (uint64_t)pSBf->hashFn2(keyBuf, len); int32_t size = taosArrayGetSize(pSBf->bfArray); for (int32_t i = size - 2; i >= 0; --i) { - if (tBloomFilterNoContain(taosArrayGetP(pSBf->bfArray, i), keyBuf, len) != TSDB_CODE_SUCCESS) { + if (tBloomFilterNoContain(taosArrayGetP(pSBf->bfArray, i), h1, h2) != TSDB_CODE_SUCCESS) { return TSDB_CODE_FAILED; } } @@ -59,13 +77,15 @@ int32_t tScalableBfPut(SScalableBf *pSBf, const void *keyBuf, uint32_t len) { return TSDB_CODE_OUT_OF_MEMORY; } } - return tBloomFilterPut(pNormalBf, keyBuf, len); + return tBloomFilterPutHash(pNormalBf, h1, h2); } int32_t tScalableBfNoContain(const SScalableBf *pSBf, const void *keyBuf, uint32_t len) { + uint64_t h1 = (uint64_t)pSBf->hashFn1(keyBuf, len); + uint64_t h2 = (uint64_t)pSBf->hashFn2(keyBuf, len); int32_t size = taosArrayGetSize(pSBf->bfArray); for (int32_t i = size - 1; i >= 0; --i) { - if (tBloomFilterNoContain(taosArrayGetP(pSBf->bfArray, i), keyBuf, len) != TSDB_CODE_SUCCESS) { + if (tBloomFilterNoContain(taosArrayGetP(pSBf->bfArray, i), h1, h2) != TSDB_CODE_SUCCESS) { return TSDB_CODE_FAILED; } } @@ -113,6 +133,8 @@ int32_t tScalableBfEncode(const SScalableBf *pSBf, SEncoder *pEncoder) { SScalableBf *tScalableBfDecode(SDecoder *pDecoder) { SScalableBf *pSBf = taosMemoryCalloc(1, sizeof(SScalableBf)); + pSBf->hashFn1 = HASH_FUNCTION_1; + pSBf->hashFn2 = HASH_FUNCTION_2; pSBf->bfArray = NULL; int32_t size = 0; if (tDecodeI32(pDecoder, &size) < 0) goto _error; diff --git a/source/util/test/bloomFilterTest.cpp b/source/util/test/bloomFilterTest.cpp index 2e02129164..c51de3c8a4 100644 --- a/source/util/test/bloomFilterTest.cpp +++ b/source/util/test/bloomFilterTest.cpp @@ -43,12 +43,16 @@ TEST(TD_UTIL_BLOOMFILTER_TEST, normal_bloomFilter) { for (int64_t i = 0; i < 1000; i++) { int64_t ts = i + ts1; - GTEST_ASSERT_EQ(tBloomFilterNoContain(pBF4, &ts, sizeof(int64_t)), TSDB_CODE_FAILED); + uint64_t h1 = (uint64_t) pBF4->hashFn1((const char*)&ts, sizeof(int64_t)); + uint64_t h2 = (uint64_t) pBF4->hashFn2((const char*)&ts, sizeof(int64_t)); + GTEST_ASSERT_EQ(tBloomFilterNoContain(pBF4, h1, h2), TSDB_CODE_FAILED); } for (int64_t i = 2000; i < 3000; i++) { int64_t ts = i + ts1; - GTEST_ASSERT_EQ(tBloomFilterNoContain(pBF4, &ts, sizeof(int64_t)), TSDB_CODE_SUCCESS); + uint64_t h1 = (uint64_t) pBF4->hashFn1((const char*)&ts, sizeof(int64_t)); + uint64_t h2 = (uint64_t) pBF4->hashFn2((const char*)&ts, sizeof(int64_t)); + GTEST_ASSERT_EQ(tBloomFilterNoContain(pBF4, h1, h2), TSDB_CODE_SUCCESS); } tBloomFilterDestroy(pBF1); diff --git a/tests/develop-test/2-query/pseudo_column.py b/tests/develop-test/2-query/pseudo_column.py new file mode 100644 index 0000000000..1d94df4cff --- /dev/null +++ b/tests/develop-test/2-query/pseudo_column.py @@ -0,0 +1,97 @@ +import sys +from util.log import * +from util.cases import * +from util.sql import * +from util.dnodes import tdDnodes +from math import inf + +class TDTestCase: + def caseDescription(self): + ''' + case1: [TS-3904/TS-3005] pseudo column test case + ''' + return + + def init(self, conn, logSql, replicaVer=1): + tdLog.debug("start to execute %s" % __file__) + tdSql.init(conn.cursor(), True) + self._conn = conn + + def restartTaosd(self, index=1, dbname="db"): + tdDnodes.stop(index) + tdDnodes.startWithoutSleep(index) + tdSql.execute(f"use pseudo_col") + + def run(self): + print("running {}".format(__file__)) + tdSql.execute("drop database if exists pseudo_col") + tdSql.execute("create database if not exists pseudo_col") + tdSql.execute('use pseudo_col') + tdSql.execute('create table st(ts timestamp, f int) tags (t int)') + tdSql.execute("insert into ct1 using st tags(1) values('2023-10-10 14:10:00', 1)('2023-10-10 14:10:01', 11)") + tdSql.execute("insert into ct2 using st tags(2) values('2023-10-10 14:10:02', 2)('2023-10-10 14:10:03', 22)") + + tdSql.query('select tbname from (select tbname from st) order by tbname') + tdSql.checkCols(1) + tdSql.checkRows(4) + tdSql.checkData(0, 0, 'ct1') + tdSql.checkData(1, 0, 'ct1') + tdSql.checkData(2, 0, 'ct2') + tdSql.checkData(2, 0, 'ct2') + + tdSql.query('select `tbname` from (select tbname from st) order by tbname') + tdSql.checkCols(1) + tdSql.checkRows(4) + tdSql.checkData(0, 0, 'ct1') + tdSql.checkData(1, 0, 'ct1') + tdSql.checkData(2, 0, 'ct2') + tdSql.checkData(2, 0, 'ct2') + + tdSql.query('select `tbname` from (select tbname from st) order by tbname') + tdSql.checkCols(1) + tdSql.checkRows(4) + tdSql.checkData(0, 0, 'ct1') + tdSql.checkData(1, 0, 'ct1') + tdSql.checkData(2, 0, 'ct2') + tdSql.checkData(2, 0, 'ct2') + + tdSql.query('select tbname from (select st.tbname from st) order by tbname') + tdSql.checkCols(1) + tdSql.checkRows(4) + tdSql.checkData(0, 0, 'ct1') + tdSql.checkData(1, 0, 'ct1') + tdSql.checkData(2, 0, 'ct2') + tdSql.checkData(2, 0, 'ct2') + + tdSql.query('select * from (select tbname, avg(f) from st partition by tbname) a partition by a.tbname order by a.tbname'); + tdSql.checkRows(2) + tdSql.checkCols(2) + tdSql.checkData(0, 0, 'ct1'); + tdSql.checkData(0, 1, 6.0); + tdSql.checkData(1, 0, 'ct2'); + tdSql.checkData(1, 1, 12.0); + + tdSql.error('select tbname from (select * from st)') + tdSql.error('select st.tbname from (select st.tbname from st)') + tdSql.error('select `st.tbname` from (select st.tbname from st) order by tbname') + + tdSql.query('select _wstart, _wend, _wduration, c from (select _wstart, _wend, _wduration, count(*) as c from st interval(1s)) order by _wstart') + tdSql.checkCols(4) + tdSql.checkRows(4) + tdSql.checkData(0, 1, '2023-10-10 14:10:01') + tdSql.checkData(0, 3, 1) + + tdSql.error('select _wstart, _wend, _wduration, c from (select count(*) as c from st) order by _wstart') + + tdSql.query("select _irowts, if2 from (select _irowts, interp(f) as if2 from st range('2023-10-10 14:10:00', '2023-10-10 14:10:10') every(1s) fill(value, 8))") + tdSql.checkRows(11) + tdSql.checkData(9, 1, 8); + tdSql.execute('drop database pseudo_col') + + tdSql.error("select _irowts, if2 from (select interp(f) as if2 from st range('2023-10-10 14:10:00', '2023-10-10 14:10:10') every(1s) fill(value, 8))") + def stop(self): + tdSql.close() + tdLog.success("%s successfully executed" % __file__) + +tdCases.addWindows(__file__, TDTestCase()) +tdCases.addLinux(__file__, TDTestCase()) diff --git a/tests/develop-test/2-query/tag_scan.py b/tests/develop-test/2-query/tag_scan.py new file mode 100644 index 0000000000..a853e497dd --- /dev/null +++ b/tests/develop-test/2-query/tag_scan.py @@ -0,0 +1,206 @@ +import sys +from util.log import * +from util.cases import * +from util.sql import * +from util.dnodes import tdDnodes +from math import inf + +class TDTestCase: + def caseDescription(self): + ''' + case1: [TD-11204]Difference improvement that can ignore negative + ''' + return + + def init(self, conn, logSql, replicaVer=1): + tdLog.debug("start to execute %s" % __file__) + tdSql.init(conn.cursor(), True) + self._conn = conn + + def restartTaosd(self, index=1, dbname="db"): + tdDnodes.stop(index) + tdDnodes.startWithoutSleep(index) + tdSql.execute(f"use tagscan") + + + def runSingleVgroup(self): + print("running {}".format(__file__)) + tdSql.execute("drop database if exists tagscan2") + tdSql.execute("create database if not exists tagscan2 vgroups 1") + tdSql.execute('use tagscan2') + tdSql.execute('create table stb1 (ts timestamp, c1 bool, c2 tinyint, c3 smallint, c4 int, c5 bigint, c6 float, c7 double, c8 binary(10), c9 nchar(10), c10 tinyint unsigned, c11 smallint unsigned, c12 int unsigned, c13 bigint unsigned) TAGS(t1 int, t2 binary(10), t3 double);') + + tdSql.execute("create table tb1 using stb1 tags(1,'1',1.0);") + + tdSql.execute("create table tb2 using stb1 tags(2,'2',2.0);") + + tdSql.execute("create table tb3 using stb1 tags(3,'3',3.0);") + + tdSql.execute("create table tb4 using stb1 tags(4,'4',4.0);") + + tdSql.execute("create table tb5 using stb1 tags(5,'5',5.0);") + + tdSql.execute("create table tb6 using stb1 tags(5,'5',5.0);") + + tdSql.execute('insert into tb1 values (\'2021-11-11 09:00:00\',true,1,1,1,1,1,1,"123","1234",1,1,1,1);') + + tdSql.execute('insert into tb2 values (\'2021-11-11 09:00:00\',true,1,1,1,1,1,1,"123","1234",1,1,1,1);') + + tdSql.execute('insert into tb3 values (\'2021-11-11 09:00:00\',true,1,1,1,1,1,1,"123","1234",1,1,1,1);') + + tdSql.execute('insert into tb4 values (\'2021-11-11 09:00:00\',true,1,1,1,1,1,1,"123","1234",1,1,1,1);') + + tdSql.execute('insert into tb5 values (\'2021-11-11 09:00:00\',true,1,1,1,1,1,1,"123","1234",1,1,1,1);') + + tdSql.execute('insert into tb6 values (\'2021-11-11 09:00:00\',true,1,1,1,1,1,1,"123","1234",1,1,1,1);') + + tdSql.query('select tags t1,t2 from stb1 order by t1,t2;') + tdSql.checkRows(6) + tdSql.checkData(0, 0, 1) + tdSql.checkData(0, 1, '1') + tdSql.checkData(1, 0, 2) + tdSql.checkData(1, 1, '2') + tdSql.checkData(2, 0, 3) + tdSql.checkData(2, 1, '3') + tdSql.checkData(3, 0, 4) + tdSql.checkData(3, 1, '4') + tdSql.checkData(4, 0, 5) + tdSql.checkData(4, 1, '5') + tdSql.checkData(5, 0, 5) + tdSql.checkData(5, 1, '5') + + tdSql.query('select * from (select tags t1,t2 from stb1 group by t1,t2 slimit 2,3) order by t1,t2;') + tdSql.checkRows(3) + + tdSql.query('select * from (select tags tbname tn from stb1 group by tbname slimit 2,3) order by tn;') + tdSql.checkRows(3) + + tdSql.query('select * from (select tbname tn from stb1 group by tbname slimit 2,3) order by tn;') + tdSql.checkRows(3) + + tdSql.query('select * from (select tbname tn from stb1 group by tbname order by tbname limit 2,3) order by tn;') + tdSql.checkRows(3) + tdSql.checkData(0, 0, 'tb3') + + tdSql.query('select * from (select distinct tbname tn from stb1 limit 2,3) order by tn;') + tdSql.checkRows(3) + + tdSql.query('select * from (select distinct tbname tn, t1,t2 from stb1 limit 2,3) order by tn;') + tdSql.checkRows(3) + + tdSql.query('select * from (select tags t1,t2 from stb1 order by t1, t2 limit 2,3) order by t1, t2;') + tdSql.checkRows(3) + tdSql.checkData(0, 0, 3) + tdSql.checkData(0, 1, '3') + tdSql.checkData(1, 0, 4) + tdSql.checkData(1, 1, '4') + tdSql.checkData(2, 0, 5) + tdSql.checkData(2, 1, '5') + + tdSql.query('select * from (select tbname tn, t1,t2 from stb1 partition by tbname slimit 2,3) order by tn;') + tdSql.checkRows(3) + + tdSql.query('select * from (select tbname tn, t1,t2 from stb1 group by tbname, t1,t2 slimit 2,3) order by tn;') + tdSql.checkRows(3) + + tdSql.query('select * from (select tags tbname tn, t1,t2 from stb1 group by tbname, t1,t2 slimit 2,3) order by tn;') + tdSql.checkRows(3) + + + tdSql.execute('drop database tagscan2') + def runMultiVgroups(self): + print("running {}".format(__file__)) + tdSql.execute("drop database if exists tagscan") + tdSql.execute("create database if not exists tagscan") + tdSql.execute('use tagscan') + tdSql.execute('create table stb1 (ts timestamp, c1 bool, c2 tinyint, c3 smallint, c4 int, c5 bigint, c6 float, c7 double, c8 binary(10), c9 nchar(10), c10 tinyint unsigned, c11 smallint unsigned, c12 int unsigned, c13 bigint unsigned) TAGS(t1 int, t2 binary(10), t3 double);') + + tdSql.execute("create table tb1 using stb1 tags(1,'1',1.0);") + + tdSql.execute("create table tb2 using stb1 tags(2,'2',2.0);") + + tdSql.execute("create table tb3 using stb1 tags(3,'3',3.0);") + + tdSql.execute("create table tb4 using stb1 tags(4,'4',4.0);") + + tdSql.execute("create table tb5 using stb1 tags(5,'5',5.0);") + + tdSql.execute("create table tb6 using stb1 tags(5,'5',5.0);") + + tdSql.execute('insert into tb1 values (\'2021-11-11 09:00:00\',true,1,1,1,1,1,1,"123","1234",1,1,1,1);') + + tdSql.execute('insert into tb2 values (\'2021-11-11 09:00:00\',true,1,1,1,1,1,1,"123","1234",1,1,1,1);') + + tdSql.execute('insert into tb3 values (\'2021-11-11 09:00:00\',true,1,1,1,1,1,1,"123","1234",1,1,1,1);') + + tdSql.execute('insert into tb4 values (\'2021-11-11 09:00:00\',true,1,1,1,1,1,1,"123","1234",1,1,1,1);') + + tdSql.execute('insert into tb5 values (\'2021-11-11 09:00:00\',true,1,1,1,1,1,1,"123","1234",1,1,1,1);') + + tdSql.execute('insert into tb6 values (\'2021-11-11 09:00:00\',true,1,1,1,1,1,1,"123","1234",1,1,1,1);') + + tdSql.query('select tags t1,t2 from stb1 order by t1,t2;') + tdSql.checkRows(6) + tdSql.checkData(0, 0, 1) + tdSql.checkData(0, 1, '1') + tdSql.checkData(1, 0, 2) + tdSql.checkData(1, 1, '2') + tdSql.checkData(2, 0, 3) + tdSql.checkData(2, 1, '3') + tdSql.checkData(3, 0, 4) + tdSql.checkData(3, 1, '4') + tdSql.checkData(4, 0, 5) + tdSql.checkData(4, 1, '5') + tdSql.checkData(5, 0, 5) + tdSql.checkData(5, 1, '5') + + tdSql.query('select * from (select tags t1,t2 from stb1 group by t1,t2 slimit 2,3) order by t1,t2;') + tdSql.checkRows(3) + + tdSql.query('select * from (select tags tbname tn from stb1 group by tbname slimit 2,3) order by tn;') + tdSql.checkRows(3) + + tdSql.query('select * from (select tbname tn from stb1 group by tbname slimit 2,3) order by tn;') + tdSql.checkRows(3) + + tdSql.query('select * from (select tbname tn from stb1 group by tbname order by tbname limit 2,3) order by tn;') + tdSql.checkRows(3) + tdSql.checkData(0, 0, 'tb3') + + tdSql.query('select * from (select distinct tbname tn from stb1 limit 2,3) order by tn;') + tdSql.checkRows(3) + + tdSql.query('select * from (select distinct tbname tn, t1,t2 from stb1 limit 2,3) order by tn;') + tdSql.checkRows(3) + + tdSql.query('select * from (select tags t1,t2 from stb1 order by t1, t2 limit 2,3) order by t1, t2;') + tdSql.checkRows(3) + tdSql.checkData(0, 0, 3) + tdSql.checkData(0, 1, '3') + tdSql.checkData(1, 0, 4) + tdSql.checkData(1, 1, '4') + tdSql.checkData(2, 0, 5) + tdSql.checkData(2, 1, '5') + + tdSql.query('select * from (select tbname tn, t1,t2 from stb1 partition by tbname slimit 2,3) order by tn;') + tdSql.checkRows(3) + + tdSql.query('select * from (select tbname tn, t1,t2 from stb1 group by tbname, t1,t2 slimit 2,3) order by tn;') + tdSql.checkRows(3) + + tdSql.query('select * from (select tags tbname tn, t1,t2 from stb1 group by tbname, t1,t2 slimit 2,3) order by tn;') + tdSql.checkRows(3) + + + tdSql.execute('drop database tagscan') + + def run(self): + self.runMultiVgroups() + self.runSingleVgroup() + + def stop(self): + tdSql.close() + tdLog.success("%s successfully executed" % __file__) + +tdCases.addWindows(__file__, TDTestCase()) +tdCases.addLinux(__file__, TDTestCase()) diff --git a/tests/parallel_test/cases.task b/tests/parallel_test/cases.task index e83586ca09..8b0451604c 100644 --- a/tests/parallel_test/cases.task +++ b/tests/parallel_test/cases.task @@ -163,6 +163,7 @@ ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/dataFromTsdbNWal.py ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/dataFromTsdbNWal-multiCtb.py ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmq_taosx.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmq_replay.py ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqSeekAndCommit.py ,,n,system-test,python3 ./test.py -f 7-tmq/tmq_offset.py ,,n,system-test,python3 ./test.py -f 7-tmq/tmqDataPrecisionUnit.py @@ -399,6 +400,7 @@ ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/smaTest.py -R ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/sma_index.py ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sml_TS-3724.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sml-TD19291.py ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/varbinary.py ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sml.py ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sml.py -R @@ -1270,7 +1272,9 @@ #develop test ,,n,develop-test,python3 ./test.py -f 2-query/table_count_scan.py +,,n,develop-test,python3 ./test.py -f 2-query/pseudo_column.py ,,n,develop-test,python3 ./test.py -f 2-query/ts-range.py +,,n,develop-test,python3 ./test.py -f 2-query/tag_scan.py ,,n,develop-test,python3 ./test.py -f 2-query/show_create_db.py ,,n,develop-test,python3 ./test.py -f 5-taos-tools/taosbenchmark/auto_create_table_json.py ,,n,develop-test,python3 ./test.py -f 5-taos-tools/taosbenchmark/custom_col_tag.py diff --git a/tests/pytest/util/common.py b/tests/pytest/util/common.py index ea042829d6..9c45c09715 100644 --- a/tests/pytest/util/common.py +++ b/tests/pytest/util/common.py @@ -140,6 +140,7 @@ class TDCom: self.range_count = 5 self.default_interval = 5 self.stream_timeout = 12 + self.create_stream_sleep = 0.5 self.record_history_ts = str() self.precision = "ms" self.date_time = self.genTs(precision=self.precision)[0] @@ -881,6 +882,7 @@ class TDCom: stream_options += f" ignore update 0" if not use_except: tdSql.execute(f'create stream if not exists {stream_name} trigger at_once {stream_options} {fill_history} into {des_table} {subtable} as {source_sql} {fill};') + time.sleep(self.create_stream_sleep) return None else: return f'create stream if not exists {stream_name} {stream_options} {fill_history} into {des_table} {subtable} as {source_sql} {fill};' @@ -906,6 +908,7 @@ class TDCom: stream_options += f" ignore update 0" if not use_except: tdSql.execute(f'create stream if not exists {stream_name} {stream_options} {fill_history} into {des_table}{stb_field_name} {tags} {subtable} as {source_sql} {fill};') + time.sleep(self.create_stream_sleep) return None else: return f'create stream if not exists {stream_name} {stream_options} {fill_history} into {des_table}{stb_field_name} {tags} {subtable} as {source_sql} {fill};' @@ -1566,8 +1569,8 @@ class TDCom: res1 = tdSql.queryResult tdSql.query(sql2) res2 = self.cast_query_data(tdSql.queryResult) if tag_value_list or use_exist_stb else tdSql.queryResult + tdSql.sql = sql1 new_list = list() - if tag_value_list: res1 = self.float_handle(res1) res2 = self.float_handle(res2) @@ -1602,6 +1605,7 @@ class TDCom: tdSql.query(sql2) # res2 = tdSql.queryResult res2 = self.cast_query_data(tdSql.queryResult) if tag_value_list or use_exist_stb else tdSql.queryResult + tdSql.sql = sql1 if tag_value_list: res1 = self.float_handle(res1) @@ -1643,6 +1647,7 @@ class TDCom: tdSql.query(sql2) # res2 = tdSql.queryResult res2 = self.cast_query_data(tdSql.queryResult) if tag_value_list or use_exist_stb else tdSql.queryResult + tdSql.sql = sql1 if tag_value_list: res1 = self.float_handle(res1) diff --git a/tests/script/tsim/stream/checkpointSession1.sim b/tests/script/tsim/stream/checkpointSession1.sim index 5c9625aabb..ea93e1525a 100644 --- a/tests/script/tsim/stream/checkpointSession1.sim +++ b/tests/script/tsim/stream/checkpointSession1.sim @@ -57,6 +57,8 @@ system sh/stop_dnodes.sh system sh/exec.sh -n dnode1 -s start +sleep 2000 + sql insert into t1 values(1648791213002,3,2,3,1.1); sql insert into t2 values(1648791233003,4,2,3,1.1); diff --git a/tests/script/tsim/stream/ignoreCheckUpdate.sim b/tests/script/tsim/stream/ignoreCheckUpdate.sim index 725251b081..108c845e4d 100644 --- a/tests/script/tsim/stream/ignoreCheckUpdate.sim +++ b/tests/script/tsim/stream/ignoreCheckUpdate.sim @@ -206,6 +206,8 @@ print create stream streams3 trigger at_once ignore update 1 into streamt3 as se sql create stream streams3 trigger at_once ignore update 1 into streamt3 as select _wstart c1, count(*) c2, max(b) c3 from st interval(10s); +sleep 2000 + sql insert into t1 values(1648791213000,1,1,1); sql insert into t1 values(1648791213000,2,2,2); diff --git a/tests/system-test/2-query/sml-TD19291.py b/tests/system-test/2-query/sml-TD19291.py new file mode 100644 index 0000000000..7d13cecb0f --- /dev/null +++ b/tests/system-test/2-query/sml-TD19291.py @@ -0,0 +1,60 @@ + +import taos + +from util.log import * +from util.sql import * +from util.cases import * +from util.dnodes import * +from util.common import * + +class TDTestCase: + updatecfgDict = {'clientCfg': {'smlChildTableName': 'dataModelName', 'smlAutoChildTableNameDelimiter': '-', 'fqdn': 'localhost', 'smlDot2Underline': 1}, 'fqdn': 'localhost'} + print("===================: ", updatecfgDict) + def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) + tdLog.debug(f"start to excute {__file__}") + tdSql.init(conn.cursor(), True) + + def check(self): + conn = taos.connect() + dbname = "td19291" + conn.execute("drop database if exists %s" % dbname) + conn.execute("create database if not exists %s precision 'us'" % dbname) + conn.select_db(dbname) + + lines = [ + 'st,t1=3i64,t2=4f64,t3="t3" c1=3i64,c3=L"pass",c2=false,c4=4f64 1626006833639000000', + 'st,t1=3i64,t2=4f64,dataModelName=ttt c1=3i64,c3=L"pass",c2=false,c4=4f64 1626006833639000000', + 'st,t1=3i64,t2=4f.64 c1=3i64,c3=L"pass",c2=false,c4=4f64 1626006833639000000', + 'st,t1=ioiooo3i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i64uuuuuuuuuuuuuuuuuuuuuuuuuu4 c1=3i64,c3=L"pass",c2=false,c4=4f64 1626006833639000000', + 'st,t2=q,t1=iooo3i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i64uuuuuuuuuuuuuuuuuuuuuuuuuu4 c1=3i64,c3=L"pass",c2=false,c4=4f64 1626006833639000000', + 'st,t2=a,t1=ooo3i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i64uuuuuuuuuuuuuuuuuuuuuuuuuu4 c1=3i64,c3=L"pass",c2=false,c4=4f64 1626006833639000000', + ] + conn.schemaless_insert(lines, taos.SmlProtocol.LINE_PROTOCOL, taos.SmlPrecision.NOT_CONFIGURED) + print("inserted") + + tdSql.query("select table_name from information_schema.ins_tables where type = 'CHILD_TABLE' order by table_name") + tdSql.checkRows(6) + tdSql.checkData(0, 0, "3i64-4f64-\"t3\"") + tdSql.checkData(1, 0, "3i64-4f64-ttt") + tdSql.checkData(2, 0, "3i64-4f_64") + tdSql.checkData(3, 0, "a-ooo3i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i643i64uuuuuuuuuuuuuuuuuuuuuuuuuu4") + tdSql.checkData(4, 0, "t_418c134a0f00c7f536886e132d5fbfff") + tdSql.checkData(5, 0, "t_cb0dbf4ee9c9052815c17fc6483b0139") + # tdSql.query(f"select * from td24559.stb order by _ts") + # tdSql.checkRows(4) + # tdSql.checkData(0, 2, "POINT (4.343000 89.342000)") + # tdSql.checkData(3, 2, "GEOMETRYCOLLECTION (MULTIPOINT ((0.000000 0.000000), (1.000000 1.000000)), POINT (3.000000 4.000000), LINESTRING (2.000000 3.000000, 3.000000 4.000000))") + return + + def run(self): + tdSql.prepare() + self.check() + + def stop(self): + tdSql.close() + tdLog.success(f"{__file__} successfully executed") + + +tdCases.addLinux(__file__, TDTestCase()) +tdCases.addWindows(__file__, TDTestCase()) diff --git a/tests/system-test/2-query/sml.py b/tests/system-test/2-query/sml.py index 53ac85bd8e..0369f45723 100644 --- a/tests/system-test/2-query/sml.py +++ b/tests/system-test/2-query/sml.py @@ -9,7 +9,7 @@ from util.dnodes import * from util.common import * class TDTestCase: - updatecfgDict = {'clientCfg': {'smlChildTableName': 'dataModelName', 'fqdn': 'localhost', 'smlDot2Underline': 0}, 'fqdn': 'localhost'} + updatecfgDict = {'clientCfg': {'smlChildTableName': 'dataModelName', 'smlAutoChildTableNameDelimiter': '', 'fqdn': 'localhost', 'smlDot2Underline': 0}, 'fqdn': 'localhost'} print("===================: ", updatecfgDict) def init(self, conn, logSql, replicaVar=1): diff --git a/tests/system-test/7-tmq/replay.py b/tests/system-test/7-tmq/replay.py new file mode 100644 index 0000000000..bbda8600fb --- /dev/null +++ b/tests/system-test/7-tmq/replay.py @@ -0,0 +1,311 @@ + +import taos +import sys +import time +import socket +import os +import threading +from enum import Enum + +from util.log import * +from util.sql import * +from util.cases import * +from util.dnodes import * + +class actionType(Enum): + CREATE_DATABASE = 0 + CREATE_STABLE = 1 + CREATE_CTABLE = 2 + INSERT_DATA = 3 + +class TDTestCase: + hostname = socket.gethostname() + #rpcDebugFlagVal = '143' + #clientCfgDict = {'serverPort': '', 'firstEp': '', 'secondEp':'', 'rpcDebugFlag':'135', 'fqdn':''} + #clientCfgDict["rpcDebugFlag"] = rpcDebugFlagVal + #updatecfgDict = {'clientCfg': {}, 'serverPort': '', 'firstEp': '', 'secondEp':'', 'rpcDebugFlag':'135', 'fqdn':''} + #updatecfgDict["rpcDebugFlag"] = rpcDebugFlagVal + #print ("===================: ", updatecfgDict) + + def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) + tdLog.debug(f"start to excute {__file__}") + tdSql.init(conn.cursor()) + #tdSql.init(conn.cursor(), logSql) # output sql.txt file + + def getBuildPath(self): + selfPath = os.path.dirname(os.path.realpath(__file__)) + + if ("community" in selfPath): + projPath = selfPath[:selfPath.find("community")] + else: + projPath = selfPath[:selfPath.find("tests")] + + for root, dirs, files in os.walk(projPath): + if ("taosd" in files or "taosd.exe" in files): + rootRealPath = os.path.dirname(os.path.realpath(root)) + if ("packaging" not in rootRealPath): + buildPath = root[:len(root) - len("/build/bin")] + break + return buildPath + + def newcur(self,cfg,host,port): + user = "root" + password = "taosdata" + con=taos.connect(host=host, user=user, password=password, config=cfg ,port=port) + cur=con.cursor() + print(cur) + return cur + + def initConsumerTable(self,cdbName='cdb'): + tdLog.info("create consume database, and consume info table, and consume result table") + tdSql.query("create database if not exists %s vgroups 1 wal_retention_period 3600"%(cdbName)) + tdSql.query("drop table if exists %s.consumeinfo "%(cdbName)) + tdSql.query("drop table if exists %s.consumeresult "%(cdbName)) + + tdSql.query("create table %s.consumeinfo (ts timestamp, consumerid int, topiclist binary(1024), keylist binary(1024), expectmsgcnt bigint, ifcheckdata int, ifmanualcommit int)"%cdbName) + tdSql.query("create table %s.consumeresult (ts timestamp, consumerid int, consummsgcnt bigint, consumrowcnt bigint, checkresult int)"%cdbName) + + def initConsumerInfoTable(self,cdbName='cdb'): + tdLog.info("drop consumeinfo table") + tdSql.query("drop table if exists %s.consumeinfo "%(cdbName)) + tdSql.query("create table %s.consumeinfo (ts timestamp, consumerid int, topiclist binary(1024), keylist binary(1024), expectmsgcnt bigint, ifcheckdata int, ifmanualcommit int)"%cdbName) + + def insertConsumerInfo(self,consumerId, expectrowcnt,topicList,keyList,ifcheckdata,ifmanualcommit,cdbName='cdb'): + sql = "insert into %s.consumeinfo values "%cdbName + sql += "(now, %d, '%s', '%s', %d, %d, %d)"%(consumerId, topicList, keyList, expectrowcnt, ifcheckdata, ifmanualcommit) + tdLog.info("consume info sql: %s"%sql) + tdSql.query(sql) + + def selectConsumeResult(self,expectRows,cdbName='cdb'): + resultList=[] + while 1: + tdSql.query("select * from %s.consumeresult"%cdbName) + #tdLog.info("row: %d, %l64d, %l64d"%(tdSql.getData(0, 1),tdSql.getData(0, 2),tdSql.getData(0, 3)) + if tdSql.getRows() == expectRows: + break + else: + time.sleep(5) + + for i in range(expectRows): + tdLog.info ("consume id: %d, consume msgs: %d, consume rows: %d"%(tdSql.getData(i , 1), tdSql.getData(i , 2), tdSql.getData(i , 3))) + resultList.append(tdSql.getData(i , 3)) + + return resultList + + def startTmqSimProcess(self,buildPath,cfgPath,pollDelay,dbName,showMsg=1,showRow=1,cdbName='cdb',valgrind=0): + if valgrind == 1: + logFile = cfgPath + '/../log/valgrind-tmq.log' + shellCmd = 'nohup valgrind --log-file=' + logFile + shellCmd += '--tool=memcheck --leak-check=full --show-reachable=no --track-origins=yes --show-leak-kinds=all --num-callers=20 -v --workaround-gcc296-bugs=yes ' + + if (platform.system().lower() == 'windows'): + shellCmd = 'mintty -h never -w hide ' + buildPath + '\\build\\bin\\tmq_sim.exe -c ' + cfgPath + shellCmd += " -y %d -d %s -g %d -r %d -w %s "%(pollDelay, dbName, showMsg, showRow, cdbName) + shellCmd += "> nul 2>&1 &" + else: + shellCmd = 'nohup ' + buildPath + '/build/bin/tmq_sim -c ' + cfgPath + shellCmd += " -y %d -d %s -g %d -r %d -w %s "%(pollDelay, dbName, showMsg, showRow, cdbName) + shellCmd += "> /dev/null 2>&1 &" + tdLog.info(shellCmd) + os.system(shellCmd) + + def create_database(self,tsql, dbName,dropFlag=1,vgroups=1,replica=1): + if dropFlag == 1: + tsql.execute("drop database if exists %s"%(dbName)) + + tsql.execute("create database if not exists %s vgroups %d replica %d wal_retention_period 3600"%(dbName, vgroups, replica)) + tdLog.debug("complete to create database %s"%(dbName)) + return + + def create_stable(self,tsql, dbName,stbName): + tsql.execute("create table if not exists %s.%s (ts timestamp, c1 bigint, c2 binary(16)) tags(t1 int)"%(dbName, stbName)) + tdLog.debug("complete to create %s.%s" %(dbName, stbName)) + return + + def create_ctables(self,tsql, dbName,stbName,ctbNum): + tsql.execute("use %s" %dbName) + pre_create = "create table" + sql = pre_create + #tdLog.debug("doing create one stable %s and %d child table in %s ..." %(stbname, count ,dbname)) + for i in range(ctbNum): + sql += " %s_%d using %s tags(%d)"%(stbName,i,stbName,i+1) + if (i > 0) and (i%100 == 0): + tsql.execute(sql) + sql = pre_create + if sql != pre_create: + tsql.execute(sql) + + tdLog.debug("complete to create %d child tables in %s.%s" %(ctbNum, dbName, stbName)) + return + + def insert_data(self,tsql,dbName,stbName,ctbNum,rowsPerTbl,batchNum,startTs=0): + tdLog.debug("start to insert data ............") + tsql.execute("use %s" %dbName) + pre_insert = "insert into " + sql = pre_insert + + if startTs == 0: + t = time.time() + startTs = int(round(t * 1000)) + + for j in range(rowsPerTbl): + for i in range(ctbNum): + sql += " %s_%d values (%d, %d, 'tmqrow_%d') "%(stbName, i, startTs + j + i, j+i, j+i) + tsql.execute(sql) + time.sleep(1) + sql = "insert into " + #end sql + if sql != pre_insert: + #print("insert sql:%s"%sql) + tsql.execute(sql) + tdLog.debug("insert data ............ [OK]") + return + + def prepareEnv(self, **parameterDict): + # create new connector for my thread + tsql=self.newcur(parameterDict['cfg'], 'localhost', 6030) + + if parameterDict["actionType"] == actionType.CREATE_DATABASE: + self.create_database(tsql, parameterDict["dbName"]) + elif parameterDict["actionType"] == actionType.CREATE_STABLE: + self.create_stable(tsql, parameterDict["dbName"], parameterDict["stbName"]) + elif parameterDict["actionType"] == actionType.CREATE_CTABLE: + self.create_ctables(tsql, parameterDict["dbName"], parameterDict["stbName"], parameterDict["ctbNum"]) + elif parameterDict["actionType"] == actionType.INSERT_DATA: + self.insert_data(tsql, parameterDict["dbName"], parameterDict["stbName"], parameterDict["ctbNum"], \ + parameterDict["rowsPerTbl"],parameterDict["batchNum"]) + else: + tdLog.exit("not support's action: ", parameterDict["actionType"]) + + return + + def tmqCase8(self, cfgPath, buildPath): + tdLog.printNoPrefix("======== test case 8: ") + + self.initConsumerTable() + + # create and start thread + parameterDict = {'cfg': '', \ + 'actionType': 0, \ + 'dbName': 'db8', \ + 'dropFlag': 1, \ + 'vgroups': 1, \ + 'replica': 1, \ + 'stbName': 'stb1', \ + 'ctbNum': 2, \ + 'rowsPerTbl': 10, \ + 'batchNum': 1, \ + 'startTs': 1640966400000} # 2022-01-01 00:00:00.000 + parameterDict['cfg'] = cfgPath + + self.create_database(tdSql, parameterDict["dbName"]) + self.create_stable(tdSql, parameterDict["dbName"], parameterDict["stbName"]) + self.create_ctables(tdSql, parameterDict["dbName"], parameterDict["stbName"], parameterDict["ctbNum"]) + self.insert_data(tdSql,\ + parameterDict["dbName"],\ + parameterDict["stbName"],\ + parameterDict["ctbNum"],\ + parameterDict["rowsPerTbl"],\ + parameterDict["batchNum"]) + + tdLog.info("create topics from stb1") + topicFromStb1 = 'topic_stb1' + + tdSql.execute("create topic %s as select ts, c1, c2 from %s.%s" %(topicFromStb1, parameterDict['dbName'], parameterDict['stbName'])) + consumerId = 0 + expectrowcnt = parameterDict["rowsPerTbl"] * parameterDict["ctbNum"] * 2 + topicList = topicFromStb1 + ifcheckdata = 0 + ifManualCommit = 1 + keyList = 'group.id:cgrp1,\ + enable.auto.commit:false,\ + auto.commit.interval.ms:6000,\ + auto.offset.reset:earliest,\ + enable.replay:true' + self.insertConsumerInfo(consumerId, expectrowcnt,topicList,keyList,ifcheckdata,ifManualCommit) + + tdLog.info("start consume 0 processor") + pollDelay = 100 + showMsg = 1 + showRow = 1 + self.startTmqSimProcess(buildPath,cfgPath,pollDelay,parameterDict["dbName"],showMsg, showRow) + + tdLog.info("start to check consume 0 result") + expectRows = 1 + resultList = self.selectConsumeResult(expectRows) + totalConsumeRows = 0 + for i in range(expectRows): + totalConsumeRows += resultList[i] + + if totalConsumeRows != expectrowcnt: + tdLog.info("act consume rows: %d, expect consume rows: %d"%(totalConsumeRows, expectrowcnt)) + tdLog.exit("tmq consume rows error!") + + # tdLog.info("start consume 1 processor") + # self.startTmqSimProcess(buildPath,cfgPath,pollDelay,parameterDict["dbName"],showMsg, showRow) + # tdLog.sleep(2) + # + # tdLog.info("start one new thread to insert data") + # parameterDict['actionType'] = actionType.INSERT_DATA + # prepareEnvThread = threading.Thread(target=self.prepareEnv, kwargs=parameterDict) + # prepareEnvThread.start() + # prepareEnvThread.join() + # + # tdLog.info("start to check consume 0 and 1 result") + # expectRows = 2 + # resultList = self.selectConsumeResult(expectRows) + # totalConsumeRows = 0 + # for i in range(expectRows): + # totalConsumeRows += resultList[i] + # + # if totalConsumeRows != expectrowcnt: + # tdLog.info("act consume rows: %d, expect consume rows: %d"%(totalConsumeRows, expectrowcnt)) + # tdLog.exit("tmq consume rows error!") + # + # tdLog.info("start consume 2 processor") + # self.startTmqSimProcess(buildPath,cfgPath,pollDelay,parameterDict["dbName"],showMsg, showRow) + # tdLog.sleep(2) + # + # tdLog.info("start one new thread to insert data") + # parameterDict['actionType'] = actionType.INSERT_DATA + # prepareEnvThread = threading.Thread(target=self.prepareEnv, kwargs=parameterDict) + # prepareEnvThread.start() + # prepareEnvThread.join() + # + # tdLog.info("start to check consume 0 and 1 and 2 result") + # expectRows = 3 + # resultList = self.selectConsumeResult(expectRows) + # totalConsumeRows = 0 + # for i in range(expectRows): + # totalConsumeRows += resultList[i] + # + # if totalConsumeRows != expectrowcnt*2: + # tdLog.info("act consume rows: %d, expect consume rows: %d"%(totalConsumeRows, expectrowcnt*2)) + # tdLog.exit("tmq consume rows error!") + # + # tdSql.query("drop topic %s"%topicFromStb1) + + tdLog.printNoPrefix("======== test case 8 end ...... ") + + def run(self): + tdSql.prepare() + + buildPath = self.getBuildPath() + if (buildPath == ""): + tdLog.exit("taosd not found!") + else: + tdLog.info("taosd found in %s" % buildPath) + cfgPath = buildPath + "/../sim/psim/cfg" + tdLog.info("cfgPath: %s" % cfgPath) + + self.tmqCase8(cfgPath, buildPath) + + def stop(self): + tdSql.close() + tdLog.success(f"{__file__} successfully executed") + +event = threading.Event() + +tdCases.addLinux(__file__, TDTestCase()) +tdCases.addWindows(__file__, TDTestCase()) diff --git a/tests/system-test/7-tmq/tmq_replay.py b/tests/system-test/7-tmq/tmq_replay.py new file mode 100644 index 0000000000..1e19d58516 --- /dev/null +++ b/tests/system-test/7-tmq/tmq_replay.py @@ -0,0 +1,39 @@ + +import taos +import sys +import time +import socket +import os +import threading + +from util.log import * +from util.sql import * +from util.cases import * +from util.dnodes import * +from util.common import * +sys.path.append("./7-tmq") +from tmqCommon import * + +class TDTestCase: + def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) + tdLog.debug(f"start to excute {__file__}") + tdSql.init(conn.cursor()) + + def run(self): + tdSql.prepare() + buildPath = tdCom.getBuildPath() + + cmdStr1 = '%s/build/bin/replay_test'%(buildPath) + tdLog.info(cmdStr1) + result = os.system(cmdStr1) + + if result != 0: + tdLog.exit("tmq_replay error!") + + def stop(self): + tdSql.close() + tdLog.success(f"{__file__} successfully executed") + +tdCases.addLinux(__file__, TDTestCase()) +tdCases.addWindows(__file__, TDTestCase()) diff --git a/utils/test/c/CMakeLists.txt b/utils/test/c/CMakeLists.txt index 343e3d8454..db5eb21ad8 100644 --- a/utils/test/c/CMakeLists.txt +++ b/utils/test/c/CMakeLists.txt @@ -9,6 +9,7 @@ add_executable(get_db_name_test get_db_name_test.c) add_executable(tmq_offset tmqOffset.c) add_executable(tmq_offset_test tmq_offset_test.c) add_executable(varbinary_test varbinary_test.c) +add_executable(replay_test replay_test.c) if(${TD_LINUX}) add_executable(tsz_test tsz_test.c) @@ -57,6 +58,14 @@ target_link_libraries( PUBLIC os ) +target_link_libraries( + replay_test + PUBLIC taos + PUBLIC util + PUBLIC common + PUBLIC os +) + target_link_libraries( write_raw_block_test PUBLIC taos diff --git a/utils/test/c/replay_test.c b/utils/test/c/replay_test.c new file mode 100644 index 0000000000..92f3fe5102 --- /dev/null +++ b/utils/test/c/replay_test.c @@ -0,0 +1,410 @@ +/* + * Copyright (c) 2019 TAOS Data, Inc. + * + * This program is free software: you can use, redistribute, and/or modify + * it under the terms of the GNU Affero General Public License, version 3 + * or later ("AGPL"), as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +#include +#include +#include "taos.h" +#include "types.h" + +tmq_t* build_consumer() { + tmq_conf_t* conf = tmq_conf_new(); + tmq_conf_set(conf, "group.id", "g1"); + tmq_conf_set(conf, "client.id", "c1"); + tmq_conf_set(conf, "td.connect.user", "root"); + tmq_conf_set(conf, "td.connect.pass", "taosdata"); + tmq_conf_set(conf, "msg.with.table.name", "true"); + tmq_conf_set(conf, "enable.auto.commit", "true"); + tmq_conf_set(conf, "enable.replay", "true"); + tmq_conf_set(conf, "auto.offset.reset", "earliest"); + + tmq_t* tmq = tmq_consumer_new(conf, NULL, 0); + assert(tmq); + tmq_conf_destroy(conf); + return tmq; +} + +void test_vgroup_error(TAOS* pConn){ + TAOS_RES* pRes = taos_query(pConn, "drop topic if exists t1"); + ASSERT(taos_errno(pRes) == 0); + taos_free_result(pRes); + + pRes = taos_query(pConn, "drop database if exists d1"); + ASSERT(taos_errno(pRes) == 0); + taos_free_result(pRes); + + pRes = taos_query(pConn, "create database if not exists d1 vgroups 2 wal_retention_period 3600"); + ASSERT(taos_errno(pRes) == 0); + taos_free_result(pRes); + + pRes = taos_query(pConn, "CREATE STABLE d1.s1 (ts TIMESTAMP, c1 INT) TAGS (t1 INT)"); + ASSERT(taos_errno(pRes) == 0); + taos_free_result(pRes); + + pRes = taos_query(pConn, "create topic t1 as select * from d1.s1"); + ASSERT(taos_errno(pRes) == 0); + taos_free_result(pRes); + + tmq_list_t* topic_list = tmq_list_new(); + + tmq_list_append(topic_list, "t1"); + tmq_t* tmq = build_consumer(); + ASSERT(tmq_subscribe(tmq, topic_list) != 0); + tmq_list_destroy(topic_list); + tmq_consumer_close(tmq); +} + +void test_stable_db_error(TAOS* pConn){ + TAOS_RES* pRes = taos_query(pConn, "drop topic if exists t1"); + ASSERT(taos_errno(pRes) == 0); + taos_free_result(pRes); + + pRes = taos_query(pConn, "drop database if exists d1"); + ASSERT(taos_errno(pRes) == 0); + taos_free_result(pRes); + + pRes = taos_query(pConn, "create database if not exists d1 vgroups 1 wal_retention_period 3600"); + ASSERT(taos_errno(pRes) == 0); + taos_free_result(pRes); + + pRes = taos_query(pConn, "CREATE STABLE d1.s1 (ts TIMESTAMP, c1 INT) TAGS (t1 INT)"); + ASSERT(taos_errno(pRes) == 0); + taos_free_result(pRes); + + pRes = taos_query(pConn, "create topic t1 as stable d1.s1"); + ASSERT(taos_errno(pRes) == 0); + taos_free_result(pRes); + + tmq_list_t* topic_list = tmq_list_new(); + + tmq_list_append(topic_list, "t1"); + tmq_t* tmq = build_consumer(); + ASSERT(tmq_subscribe(tmq, topic_list) != 0); + tmq_list_destroy(topic_list); + tmq_consumer_close(tmq); + + pRes = taos_query(pConn, "drop topic if exists t1"); + ASSERT(taos_errno(pRes) == 0); + taos_free_result(pRes); + + pRes = taos_query(pConn, "create topic t1 as database d1"); + ASSERT(taos_errno(pRes) == 0); + taos_free_result(pRes); + + topic_list = tmq_list_new(); + tmq_list_append(topic_list, "t1"); + tmq = build_consumer(); + ASSERT(tmq_subscribe(tmq, topic_list) != 0); + tmq_list_destroy(topic_list); + tmq_consumer_close(tmq); +} + +void insert_with_sleep(TAOS* pConn, int32_t* interval, int32_t len){ + for(int i = 0; i < len; i++){ + TAOS_RES* pRes = taos_query(pConn, "insert into d1.table1 (ts, c1) values (now, 1)"); + ASSERT(taos_errno(pRes) == 0); + taos_free_result(pRes); + + taosMsleep(interval[i]); + } +} + +void insert_with_sleep_multi(TAOS* pConn, int32_t* interval, int32_t len){ + for(int i = 0; i < len; i++){ + TAOS_RES* pRes = taos_query(pConn, "insert into d1.table1 (ts, c1) values (now, 1) (now+1s, 2) d1.table2 (ts, c1) values (now, 1) (now+1s, 2)"); + ASSERT(taos_errno(pRes) == 0); + taos_free_result(pRes); + + taosMsleep(interval[i]); + } +} + +void test_case1(TAOS* pConn, int32_t* interval, int32_t len){ + TAOS_RES* pRes = taos_query(pConn, "drop topic if exists t1"); + ASSERT(taos_errno(pRes) == 0); + taos_free_result(pRes); + + pRes = taos_query(pConn, "drop database if exists d1"); + ASSERT(taos_errno(pRes) == 0); + taos_free_result(pRes); + + pRes = taos_query(pConn, "create database if not exists d1 vgroups 2 wal_retention_period 3600"); + ASSERT(taos_errno(pRes) == 0); + taos_free_result(pRes); + + pRes = taos_query(pConn, "CREATE STABLE d1.s1 (ts TIMESTAMP, c1 INT) TAGS (t1 INT)"); + ASSERT(taos_errno(pRes) == 0); + taos_free_result(pRes); + + pRes = taos_query(pConn, "create table d1.table1 using d1.s1 tags(1)"); + ASSERT(taos_errno(pRes) == 0); + taos_free_result(pRes); + + insert_with_sleep(pConn, interval, len); + + pRes = taos_query(pConn, "create topic t1 as select * from d1.table1"); + ASSERT(taos_errno(pRes) == 0); + taos_free_result(pRes); + + tmq_list_t* topic_list = tmq_list_new(); + + tmq_list_append(topic_list, "t1"); + tmq_t* tmq = build_consumer(); + // 启动订阅 + tmq_subscribe(tmq, topic_list); + tmq_list_destroy(topic_list); + + int32_t timeout = 5000; + + int64_t t = 0; + int32_t totalRows = 0; + char buf[1024] = {0}; + while (1) { + TAOS_RES* tmqmessage = tmq_consumer_poll(tmq, timeout); + if (tmqmessage) { + if(t != 0){ + ASSERT(taosGetTimestampMs() - t >= interval[totalRows - 1]); + } + t = taosGetTimestampMs(); + + TAOS_ROW row = taos_fetch_row(tmqmessage); + if (row == NULL) { + break; + } + + TAOS_FIELD* fields = taos_fetch_fields(tmqmessage); + int32_t numOfFields = taos_field_count(tmqmessage); + taos_print_row(buf, row, fields, numOfFields); + + printf("time:%" PRId64 " rows[%d]: %s\n", t, totalRows, buf); + totalRows++; + taos_free_result(tmqmessage); + } else { + break; + } + } + + ASSERT(totalRows == len); + tmq_consumer_close(tmq); +} + +void test_case2(TAOS* pConn, int32_t* interval, int32_t len, tsem_t* sem){ + TAOS_RES* pRes = taos_query(pConn, "drop topic if exists t1"); + ASSERT(taos_errno(pRes) == 0); + taos_free_result(pRes); + + pRes = taos_query(pConn, "drop database if exists d1"); + ASSERT(taos_errno(pRes) == 0); + taos_free_result(pRes); + + pRes = taos_query(pConn, "create database if not exists d1 vgroups 1 wal_retention_period 3600"); + ASSERT(taos_errno(pRes) == 0); + taos_free_result(pRes); + + pRes = taos_query(pConn, "CREATE STABLE d1.s1 (ts TIMESTAMP, c1 INT) TAGS (t1 INT)"); + ASSERT(taos_errno(pRes) == 0); + taos_free_result(pRes); + + pRes = taos_query(pConn, "create table d1.table1 using d1.s1 tags(1)"); + ASSERT(taos_errno(pRes) == 0); + taos_free_result(pRes); + + pRes = taos_query(pConn, "create table d1.table2 using d1.s1 tags(2)"); + ASSERT(taos_errno(pRes) == 0); + taos_free_result(pRes); + + insert_with_sleep_multi(pConn, interval, len); + + pRes = taos_query(pConn, "create topic t1 as select * from d1.s1"); + ASSERT(taos_errno(pRes) == 0); + taos_free_result(pRes); + + tmq_list_t* topic_list = tmq_list_new(); + + tmq_list_append(topic_list, "t1"); + tmq_t* tmq = build_consumer(); + // 启动订阅 + tmq_subscribe(tmq, topic_list); + tmq_list_destroy(topic_list); + + int32_t timeout = 5000; + + int64_t t = 0; + int32_t totalRows = 0; + char buf[1024] = {0}; + while (1) { + TAOS_RES* tmqmessage = tmq_consumer_poll(tmq, timeout); + if (tmqmessage) { + if(t != 0 && totalRows % 4 == 0){ + ASSERT(taosGetTimestampMs() - t >= interval[totalRows/4 - 1]); + } + t = taosGetTimestampMs(); + + while(1){ + TAOS_ROW row = taos_fetch_row(tmqmessage); + if (row == NULL) { + break; + } + + TAOS_FIELD* fields = taos_fetch_fields(tmqmessage); + int32_t numOfFields = taos_field_count(tmqmessage); + taos_print_row(buf, row, fields, numOfFields); + + printf("time:%" PRId64 " rows[%d]: %s\n", t, totalRows, buf); + totalRows++; + } + + taos_free_result(tmqmessage); + + if(totalRows == len * 4){ + taosSsleep(1); + tsem_post(sem); + } + } else { + break; + } + } + + ASSERT(totalRows == len * 4 + 1); + tmq_consumer_close(tmq); +} + +void test_case3(TAOS* pConn, int32_t* interval, int32_t len){ + TAOS_RES* pRes = taos_query(pConn, "drop topic if exists t1"); + ASSERT(taos_errno(pRes) == 0); + taos_free_result(pRes); + + pRes = taos_query(pConn, "drop database if exists d1"); + ASSERT(taos_errno(pRes) == 0); + taos_free_result(pRes); + + pRes = taos_query(pConn, "create database if not exists d1 vgroups 1 wal_retention_period 3600"); + ASSERT(taos_errno(pRes) == 0); + taos_free_result(pRes); + + pRes = taos_query(pConn, "CREATE STABLE d1.s1 (ts TIMESTAMP, c1 INT) TAGS (t1 INT)"); + ASSERT(taos_errno(pRes) == 0); + taos_free_result(pRes); + + pRes = taos_query(pConn, "create table d1.table1 using d1.s1 tags(1)"); + ASSERT(taos_errno(pRes) == 0); + taos_free_result(pRes); + + pRes = taos_query(pConn, "create table d1.table2 using d1.s1 tags(2)"); + ASSERT(taos_errno(pRes) == 0); + taos_free_result(pRes); + + insert_with_sleep_multi(pConn, interval, len); + + pRes = taos_query(pConn, "create topic t1 as select * from d1.s1"); + ASSERT(taos_errno(pRes) == 0); + taos_free_result(pRes); + + tmq_list_t* topic_list = tmq_list_new(); + + tmq_list_append(topic_list, "t1"); + tmq_t* tmq = build_consumer(); + // 启动订阅 + tmq_subscribe(tmq, topic_list); + + int32_t timeout = 5000; + + TAOS_RES* tmqmessage = tmq_consumer_poll(tmq, timeout); + taos_free_result(tmqmessage); + + tmq_consumer_close(tmq); + + tmq = build_consumer(); + // 启动订阅 + tmq_subscribe(tmq, topic_list); + + int64_t t = 0; + int32_t totalRows = 0; + char buf[1024] = {0}; + while (1) { + tmqmessage = tmq_consumer_poll(tmq, timeout); + if (tmqmessage) { + if(t != 0 && totalRows % 4 == 0){ + ASSERT(taosGetTimestampMs() - t >= interval[totalRows/4 - 1]); + } + t = taosGetTimestampMs(); + + while(1){ + TAOS_ROW row = taos_fetch_row(tmqmessage); + if (row == NULL) { + break; + } + + TAOS_FIELD* fields = taos_fetch_fields(tmqmessage); + int32_t numOfFields = taos_field_count(tmqmessage); + taos_print_row(buf, row, fields, numOfFields); + + printf("time:%" PRId64 " rows[%d]: %s\n", t, totalRows, buf); + totalRows++; + } + + taos_free_result(tmqmessage); + } else { + break; + } + } + + ASSERT(totalRows == len * 4); + + tmq_consumer_close(tmq); + tmq_list_destroy(topic_list); +} + +void* insertThreadFunc(void* param) { + tsem_t* sem = (tsem_t*)param; + TAOS* pConn = taos_connect("localhost", "root", "taosdata", NULL, 0); + + tsem_wait(sem); + + TAOS_RES* pRes = taos_query(pConn, "insert into d1.table1 (ts, c1) values (now, 11)"); + ASSERT(taos_errno(pRes) == 0); + printf("insert data again\n"); + taos_free_result(pRes); + taos_close(pConn); + return NULL; +} + +int main(int argc, char* argv[]) { + TAOS* pConn = taos_connect("localhost", "root", "taosdata", NULL, 0); + test_vgroup_error(pConn); + test_stable_db_error(pConn); + + tsem_t sem; + tsem_init(&sem, 0, 0); + TdThread thread; + TdThreadAttr thattr; + taosThreadAttrInit(&thattr); + taosThreadAttrSetDetachState(&thattr, PTHREAD_CREATE_JOINABLE); + + // pthread_create one thread to consume + taosThreadCreate(&thread, &thattr, insertThreadFunc, (void*)(&sem)); + + int32_t interval[5] = {1000, 200, 3000, 40, 500}; + test_case1(pConn, interval, sizeof(interval)/sizeof(int32_t)); + printf("test_case1 success\n"); + test_case2(pConn, interval, sizeof(interval)/sizeof(int32_t), &sem); + printf("test_case2 success\n"); + test_case3(pConn, interval, sizeof(interval)/sizeof(int32_t)); + taos_close(pConn); + + taosThreadJoin(thread, NULL); + taosThreadClear(&thread); + tsem_destroy(&sem); + return 0; +} diff --git a/utils/test/c/sml_test.c b/utils/test/c/sml_test.c index 9153706d23..64da4f83e3 100644 --- a/utils/test/c/sml_test.c +++ b/utils/test/c/sml_test.c @@ -1678,8 +1678,8 @@ int main(int argc, char *argv[]) { ASSERT(!ret); ret = sml_td18789_Test(); ASSERT(!ret); - ret = sml_td24070_Test(); - ASSERT(!ret); +// ret = sml_td24070_Test(); +// ASSERT(!ret); ret = sml_td23881_Test(); ASSERT(ret); ret = sml_escape_Test(); diff --git a/utils/test/c/tmqOffset.c b/utils/test/c/tmqOffset.c index 7225cb87bd..9699e71f24 100644 --- a/utils/test/c/tmqOffset.c +++ b/utils/test/c/tmqOffset.c @@ -7,18 +7,14 @@ #include "tlog.h" #include "tmsg.h" -typedef struct { - int32_t size; -} STqOffsetHead; - int32_t tqOffsetRestoreFromFile(const char* fname) { TdFilePtr pFile = taosOpenFile(fname, TD_FILE_READ); if (pFile != NULL) { - STqOffsetHead head = {0}; int32_t code; while (1) { - if ((code = taosReadFile(pFile, &head, sizeof(STqOffsetHead))) != sizeof(STqOffsetHead)) { + int32_t size = 0; + if ((code = taosReadFile(pFile, &size, INT_BYTES)) != INT_BYTES) { if (code == 0) { break; } else { @@ -26,7 +22,6 @@ int32_t tqOffsetRestoreFromFile(const char* fname) { return -1; } } - int32_t size = htonl(head.size); void* memBuf = taosMemoryCalloc(1, size); if (memBuf == NULL) { printf("memBuf == NULL\n"); diff --git a/utils/test/c/tmqSim.c b/utils/test/c/tmqSim.c index 6b774b3eff..14e30008fe 100644 --- a/utils/test/c/tmqSim.c +++ b/utils/test/c/tmqSim.c @@ -621,10 +621,11 @@ static int32_t data_msg_process(TAOS_RES* msg, SThreadInfo* pInfo, int32_t msgIn taos_print_row(buf, row, fields, numOfFields); if (0 != g_stConfInfo.showRowFlag) { - taosFprintfFile(g_fp, "tbname:%s, rows[%d]: %s\n", (tbName != NULL ? tbName : "null table"), totalRows, buf); + taosFprintfFile(g_fp, "time:%" PRId64 " tbname:%s, rows[%d]: %s\n", taosGetTimestampMs(), (tbName != NULL ? tbName : "null table"), totalRows, buf); // if (0 != g_stConfInfo.saveRowFlag) { // saveConsumeContentToTbl(pInfo, buf); // } +// taosFsyncFile(g_fp); } totalRows++;