diff --git a/docs/zh/07-develop/07-tmq.mdx b/docs/zh/07-develop/07-tmq.mdx
index df651eab96..a852e71ff4 100644
--- a/docs/zh/07-develop/07-tmq.mdx
+++ b/docs/zh/07-develop/07-tmq.mdx
@@ -91,6 +91,7 @@ TDengine 会为 WAL 文件自动创建索引以支持快速随机访问,并提
不同语言下, TMQ 订阅相关的 API 及数据结构如下(详细的接口说明可以参考连接器章节,注意consumer结构不是线程安全的,在一个线程使用consumer时,不要在另一个线程close这个consumer):
+
```c
@@ -101,17 +102,17 @@ TDengine 会为 WAL 文件自动创建索引以支持快速随机访问,并提
typedef void(tmq_commit_cb(tmq_t *tmq, int32_t code, void *param));
typedef enum tmq_conf_res_t {
- TMQ_CONF_UNKNOWN = -2,
- TMQ_CONF_INVALID = -1,
- TMQ_CONF_OK = 0,
- } tmq_conf_res_t;
+ TMQ_CONF_UNKNOWN = -2,
+ TMQ_CONF_INVALID = -1,
+ TMQ_CONF_OK = 0,
+ } tmq_conf_res_t;
typedef struct tmq_topic_assignment {
- int32_t vgId;
- int64_t currentOffset;
- int64_t begin;
- int64_t end;
- } tmq_topic_assignment;
+ int32_t vgId;
+ int64_t currentOffset;
+ int64_t begin;
+ int64_t end;
+ } tmq_topic_assignment;
DLL_EXPORT tmq_conf_t *tmq_conf_new();
DLL_EXPORT tmq_conf_res_t tmq_conf_set(tmq_conf_t *conf, const char *key, const char *value);
@@ -146,7 +147,6 @@ TDengine 会为 WAL 文件自动创建索引以支持快速随机访问,并提
DLL_EXPORT int64_t tmq_get_vgroup_offset(TAOS_RES* res);
DLL_EXPORT const char *tmq_err2str(int32_t code);
```
-
@@ -250,281 +250,280 @@ TDengine 会为 WAL 文件自动创建索引以支持快速随机访问,并提
+ futures::Stream<
Item = Result<(Self::Offset, MessageSet), Self::Error>,
>,
- >,
- >;
- async fn commit(&self, offset: Self::Offset) -> Result<(), Self::Error>;
+ >,
+ >;
+ async fn commit(&self, offset: Self::Offset) -> Result<(), Self::Error>;
- async fn unsubscribe(self);
- ```
+ async fn unsubscribe(self);
+ ```
- 可在 上查看详细 API 说明。
+ 可在 上查看详细 API 说明。
-
+
-
+
- ```js
- function TMQConsumer(config)
+ ```js
+ function TMQConsumer(config)
+
+ function subscribe(topic)
+
+ function consume(timeout)
+
+ function subscription()
+
+ function unsubscribe()
+
+ function commit(msg)
+
+ function close()
+ ```
- function subscribe(topic)
+
- function consume(timeout)
+
- function subscription()
+ ```csharp
+ class ConsumerBuilder
+
+ ConsumerBuilder(IEnumerable> config)
+
+ public IConsumer Build()
+
+ void Subscribe(IEnumerable topics)
+
+ void Subscribe(string topic)
+
+ ConsumeResult Consume(int millisecondsTimeout)
+
+ List Subscription()
+
+ void Unsubscribe()
+
+ List Commit()
+
+ void Close()
+ ```
+
+
- function unsubscribe()
+# 数据订阅示例
+## 写入数据
- function commit(msg)
+首先完成建库、建一张超级表和多张子表操作,然后就可以写入数据了,比如:
- function close()
- ```
-
-
-
-
-
- ```csharp
- class ConsumerBuilder
-
- ConsumerBuilder(IEnumerable> config)
-
- public IConsumer Build()
-
- void Subscribe(IEnumerable topics)
-
- void Subscribe(string topic)
-
- ConsumeResult Consume(int millisecondsTimeout)
-
- List Subscription()
-
- void Unsubscribe()
-
- List Commit()
-
- void Close()
- ```
-
-
-
-
- # 数据订阅示例
- ## 写入数据
-
- 首先完成建库、建一张超级表和多张子表操作,然后就可以写入数据了,比如:
-
- ```sql
- DROP DATABASE IF EXISTS tmqdb;
- CREATE DATABASE tmqdb WAL_RETENTION_PERIOD 3600;
- CREATE TABLE tmqdb.stb (ts TIMESTAMP, c1 INT, c2 FLOAT, c3 VARCHAR(16)) TAGS(t1 INT, t3 VARCHAR(16));
- CREATE TABLE tmqdb.ctb0 USING tmqdb.stb TAGS(0, "subtable0");
- CREATE TABLE tmqdb.ctb1 USING tmqdb.stb TAGS(1, "subtable1");
- INSERT INTO tmqdb.ctb0 VALUES(now, 0, 0, 'a0')(now+1s, 0, 0, 'a00');
+```sql
+DROP DATABASE IF EXISTS tmqdb;
+CREATE DATABASE tmqdb WAL_RETENTION_PERIOD 3600;
+CREATE TABLE tmqdb.stb (ts TIMESTAMP, c1 INT, c2 FLOAT, c3 VARCHAR(16)) TAGS(t1 INT, t3 VARCHAR(16));
+CREATE TABLE tmqdb.ctb0 USING tmqdb.stb TAGS(0, "subtable0");
+CREATE TABLE tmqdb.ctb1 USING tmqdb.stb TAGS(1, "subtable1");
+INSERT INTO tmqdb.ctb0 VALUES(now, 0, 0, 'a0')(now+1s, 0, 0, 'a00');
INSERT INTO tmqdb.ctb1 VALUES(now, 1, 1, 'a1')(now+1s, 11, 11, 'a11');
```
## 创建 topic
- 使用 SQL 创建一个 topic:
+使用 SQL 创建一个 topic:
- ```sql
- CREATE TOPIC topic_name AS SELECT ts, c1, c2, c3 FROM tmqdb.stb WHERE c1 > 1;
- ```
+```sql
+CREATE TOPIC topic_name AS SELECT ts, c1, c2, c3 FROM tmqdb.stb WHERE c1 > 1;
+```
- ## 创建消费者 *consumer*
+## 创建消费者 *consumer*
- 对于不同编程语言,其设置方式如下:
+对于不同编程语言,其设置方式如下:
-
-
+
- ```c
- /* 根据需要,设置消费组 (group.id)、自动提交 (enable.auto.commit)、
- 自动提交时间间隔 (auto.commit.interval.ms)、用户名 (td.connect.user)、密码 (td.connect.pass) 等参数 */
- tmq_conf_t* conf = tmq_conf_new();
- tmq_conf_set(conf, "enable.auto.commit", "true");
- tmq_conf_set(conf, "auto.commit.interval.ms", "1000");
- tmq_conf_set(conf, "group.id", "cgrpName");
- tmq_conf_set(conf, "td.connect.user", "root");
- tmq_conf_set(conf, "td.connect.pass", "taosdata");
- tmq_conf_set(conf, "auto.offset.reset", "latest");
- tmq_conf_set(conf, "msg.with.table.name", "true");
- tmq_conf_set_auto_commit_cb(conf, tmq_commit_cb_print, NULL);
+
+ ```c
+ /* 根据需要,设置消费组 (group.id)、自动提交 (enable.auto.commit)、
+ 自动提交时间间隔 (auto.commit.interval.ms)、用户名 (td.connect.user)、密码 (td.connect.pass) 等参数 */
+ tmq_conf_t* conf = tmq_conf_new();
+ tmq_conf_set(conf, "enable.auto.commit", "true");
+ tmq_conf_set(conf, "auto.commit.interval.ms", "1000");
+ tmq_conf_set(conf, "group.id", "cgrpName");
+ tmq_conf_set(conf, "td.connect.user", "root");
+ tmq_conf_set(conf, "td.connect.pass", "taosdata");
+ tmq_conf_set(conf, "auto.offset.reset", "latest");
+ tmq_conf_set(conf, "msg.with.table.name", "true");
+ tmq_conf_set_auto_commit_cb(conf, tmq_commit_cb_print, NULL);
- tmq_t* tmq = tmq_consumer_new(conf, NULL, 0);
- tmq_conf_destroy(conf);
- ```
-
-
-
-
- 对于 Java 程序,还可以使用如下配置项:
-
- | 参数名称 | 类型 | 参数说明 |
- | ----------------------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------- |
- | `td.connect.type` | string | 连接类型,"jni" 指原生连接,"ws" 指 websocket 连接,默认值为 "jni" |
- | `bootstrap.servers` | string | 连接地址,如 `localhost:6030` |
- | `value.deserializer` | string | 值解析方法,使用此方法应实现 `com.taosdata.jdbc.tmq.Deserializer` 接口或继承 `com.taosdata.jdbc.tmq.ReferenceDeserializer` 类 |
- | `value.deserializer.encoding` | string | 指定字符串解析的字符集 | |
-
- 需要注意:此处使用 `bootstrap.servers` 替代 `td.connect.ip` 和 `td.connect.port`,以提供与 Kafka 一致的接口。
-
- ```java
- Properties properties = new Properties();
- properties.setProperty("enable.auto.commit", "true");
- properties.setProperty("auto.commit.interval.ms", "1000");
- properties.setProperty("group.id", "cgrpName");
- properties.setProperty("bootstrap.servers", "127.0.0.1:6030");
- properties.setProperty("td.connect.user", "root");
- properties.setProperty("td.connect.pass", "taosdata");
- properties.setProperty("auto.offset.reset", "latest");
- properties.setProperty("msg.with.table.name", "true");
- properties.setProperty("value.deserializer", "com.taos.example.MetersDeserializer");
-
- TaosConsumer consumer = new TaosConsumer<>(properties);
-
- /* value deserializer definition. */
- import com.taosdata.jdbc.tmq.ReferenceDeserializer;
-
- public class MetersDeserializer extends ReferenceDeserializer {
- }
- ```
-
-
-
-
-
- ```go
- conf := &tmq.ConfigMap{
- "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_c",
- "enable.auto.commit": "false",
- "msg.with.table.name": "true",
- }
- consumer, err := NewConsumer(conf)
- ```
-
-
-
-
-
- ```rust
- let mut dsn: Dsn = "taos://".parse()?;
- dsn.set("group.id", "group1");
- dsn.set("client.id", "test");
- dsn.set("auto.offset.reset", "latest");
-
- let tmq = TmqBuilder::from_dsn(dsn)?;
-
- let mut consumer = tmq.build()?;
- ```
-
-
-
-
-
- Python 语言下引入 `taos` 库的 `Consumer` 类,创建一个 Consumer 示例:
-
- ```python
- from taos.tmq import Consumer
-
- # Syntax: `consumer = Consumer(configs)`
- #
- # Example:
- consumer = Consumer(
- {
- "group.id": "local",
- "client.id": "1",
- "enable.auto.commit": "true",
- "auto.commit.interval.ms": "1000",
- "td.connect.ip": "127.0.0.1",
- "td.connect.user": "root",
- "td.connect.pass": "taosdata",
- "auto.offset.reset": "latest",
- "msg.with.table.name": "true",
- }
- )
- ```
-
-
-
-
-
- ```js
- // 根据需要,设置消费组 (group.id)、自动提交 (enable.auto.commit)、
- // 自动提交时间间隔 (auto.commit.interval.ms)、用户名 (td.connect.user)、密码 (td.connect.pass) 等参数
-
- let consumer = taos.consumer({
-'enable.auto.commit': 'true',
- 'auto.commit.interval.ms','1000',
- 'group.id': 'tg2',
- 'td.connect.user': 'root',
- 'td.connect.pass': 'taosdata',
- 'auto.offset.reset','latest',
- 'msg.with.table.name': 'true',
- 'td.connect.ip','127.0.0.1',
- 'td.connect.port','6030'
- });
+ tmq_t* tmq = tmq_consumer_new(conf, NULL, 0);
+ tmq_conf_destroy(conf);
```
+
-
+
-
-
- ```csharp
- var cfg = new Dictionary()
- {
- { "group.id", "group1" },
- { "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", "tmq_example" },
- { "enable.auto.commit", "true" },
- { "msg.with.table.name", "false" },
- };
- var consumer = new ConsumerBuilder>(cfg).Build();
+ 对于 Java 程序,还可以使用如下配置项:
+
+ | 参数名称 | 类型 | 参数说明 |
+ | ----------------------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------- |
+ | `td.connect.type` | string | 连接类型,"jni" 指原生连接,"ws" 指 websocket 连接,默认值为 "jni" |
+ | `bootstrap.servers` | string | 连接地址,如 `localhost:6030` |
+ | `value.deserializer` | string | 值解析方法,使用此方法应实现 `com.taosdata.jdbc.tmq.Deserializer` 接口或继承 `com.taosdata.jdbc.tmq.ReferenceDeserializer` 类 |
+ | `value.deserializer.encoding` | string | 指定字符串解析的字符集 | |
+
+ 需要注意:此处使用 `bootstrap.servers` 替代 `td.connect.ip` 和 `td.connect.port`,以提供与 Kafka 一致的接口。
+
+ ```java
+ Properties properties = new Properties();
+ properties.setProperty("enable.auto.commit", "true");
+ properties.setProperty("auto.commit.interval.ms", "1000");
+ properties.setProperty("group.id", "cgrpName");
+ properties.setProperty("bootstrap.servers", "127.0.0.1:6030");
+ properties.setProperty("td.connect.user", "root");
+ properties.setProperty("td.connect.pass", "taosdata");
+ properties.setProperty("auto.offset.reset", "latest");
+ properties.setProperty("msg.with.table.name", "true");
+ properties.setProperty("value.deserializer", "com.taos.example.MetersDeserializer");
+
+ TaosConsumer consumer = new TaosConsumer<>(properties);
+
+ /* value deserializer definition. */
+ import com.taosdata.jdbc.tmq.ReferenceDeserializer;
+
+ public class MetersDeserializer extends ReferenceDeserializer {
+ }
```
+
-
+
+
+ ```go
+ conf := &tmq.ConfigMap{
+ "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_c",
+ "enable.auto.commit": "false",
+ "msg.with.table.name": "true",
+ }
+ consumer, err := NewConsumer(conf)
+ ```
+
+
-
+
+
+ ```rust
+ let mut dsn: Dsn = "taos://".parse()?;
+ dsn.set("group.id", "group1");
+ dsn.set("client.id", "test");
+ dsn.set("auto.offset.reset", "latest");
+
+ let tmq = TmqBuilder::from_dsn(dsn)?;
+
+ let mut consumer = tmq.build()?;
+ ```
+
+
- 上述配置中包括 consumer group ID,如果多个 consumer 指定的 consumer group ID 一样,则自动形成一个 consumer group,共享消费进度。
+
+
+ Python 语言下引入 `taos` 库的 `Consumer` 类,创建一个 Consumer 示例:
+
+ ```python
+ from taos.tmq import Consumer
+
+ # Syntax: `consumer = Consumer(configs)`
+ #
+ # Example:
+ consumer = Consumer(
+ {
+ "group.id": "local",
+ "client.id": "1",
+ "enable.auto.commit": "true",
+ "auto.commit.interval.ms": "1000",
+ "td.connect.ip": "127.0.0.1",
+ "td.connect.user": "root",
+ "td.connect.pass": "taosdata",
+ "auto.offset.reset": "latest",
+ "msg.with.table.name": "true",
+ }
+ )
+ ```
+
+
- ## 订阅 *topics*
+
+
+ ```js
+ // 根据需要,设置消费组 (group.id)、自动提交 (enable.auto.commit)、
+ // 自动提交时间间隔 (auto.commit.interval.ms)、用户名 (td.connect.user)、密码 (td.connect.pass) 等参数
+
+ let consumer = taos.consumer({
+ 'enable.auto.commit': 'true',
+ 'auto.commit.interval.ms','1000',
+ 'group.id': 'tg2',
+ 'td.connect.user': 'root',
+ 'td.connect.pass': 'taosdata',
+ 'auto.offset.reset','latest',
+ 'msg.with.table.name': 'true',
+ 'td.connect.ip','127.0.0.1',
+ 'td.connect.port','6030'
+ });
+ ```
+
+
- 一个 consumer 支持同时订阅多个 topic。
+
+
+ ```csharp
+ var cfg = new Dictionary()
+ {
+ { "group.id", "group1" },
+ { "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", "tmq_example" },
+ { "enable.auto.commit", "true" },
+ { "msg.with.table.name", "false" },
+ };
+ var consumer = new ConsumerBuilder>(cfg).Build();
+ ```
+
+
+
+
+
+上述配置中包括 consumer group ID,如果多个 consumer 指定的 consumer group ID 一样,则自动形成一个 consumer group,共享消费进度。
+
+## 订阅 *topics*
-
-
+一个 consumer 支持同时订阅多个 topic。
+
+
-```c
+
+
+ ```c
// 创建订阅 topics 列表
tmq_list_t* topicList = tmq_list_new();
tmq_list_append(topicList, "topicName");
// 启动订阅
tmq_subscribe(tmq, topicList);
tmq_list_destroy(topicList);
-
+
```
-
-
-
-
+
+
+
+
```java
List topics = new ArrayList<>();
topics.add("tmq_topic");
consumer.subscribe(topics);
```
-
-
-
+
+
+
```go
err = consumer.Subscribe("example_tmq_topic", nil)
@@ -533,26 +532,26 @@ INSERT INTO tmqdb.ctb1 VALUES(now, 1, 1, 'a1')(now+1s, 11, 11, 'a11');
}
```
-
-
+
+
-```rust
+ ```rust
consumer.subscribe(["tmq_meters"]).await?;
```
-
+
-
+
-```python
+ ```python
consumer.subscribe(['topic1', 'topic2'])
```
-
+
-
+
-```js
+ ```js
// 创建订阅 topics 列表
let topics = ['topic_test']
@@ -560,11 +559,11 @@ INSERT INTO tmqdb.ctb1 VALUES(now, 1, 1, 'a1')(now+1s, 11, 11, 'a11');
consumer.subscribe(topics);
```
-
+
-
+
-```csharp
+ ```csharp
// 创建订阅 topics 列表
List topics = new List();
topics.add("tmq_topic");
@@ -572,18 +571,19 @@ INSERT INTO tmqdb.ctb1 VALUES(now, 1, 1, 'a1')(now+1s, 11, 11, 'a11');
consumer.Subscribe(topics);
```
-
+
-
+
- ## 消费
+## 消费
- 以下代码展示了不同语言下如何对 TMQ 消息进行消费。
+以下代码展示了不同语言下如何对 TMQ 消息进行消费。
-
-
+
-```c
+
+
+ ```c
// 消费数据
while (running) {
TAOS_RES* msg = tmq_consumer_poll(tmq, timeOut);
@@ -591,11 +591,11 @@ INSERT INTO tmqdb.ctb1 VALUES(now, 1, 1, 'a1')(now+1s, 11, 11, 'a11');
}
```
-这里是一个 **while** 循环,每调用一次 tmq_consumer_poll(),获取一个消息,该消息与普通查询返回的结果集完全相同,可以使用相同的解析 API 完成消息内容的解析。
-
-
-
+ 这里是一个 **while** 循环,每调用一次 tmq_consumer_poll(),获取一个消息,该消息与普通查询返回的结果集完全相同,可以使用相同的解析 API 完成消息内容的解析。
+
+
+
```java
while(running){
ConsumerRecords meters = consumer.poll(Duration.ofMillis(100));
@@ -604,10 +604,10 @@ INSERT INTO tmqdb.ctb1 VALUES(now, 1, 1, 'a1')(now+1s, 11, 11, 'a11');
}
}
```
+
+
-
-
-
+
```go
for {
@@ -625,9 +625,9 @@ INSERT INTO tmqdb.ctb1 VALUES(now, 1, 1, 'a1')(now+1s, 11, 11, 'a11');
}
```
-
+
-
+
```rust
{
@@ -660,8 +660,8 @@ INSERT INTO tmqdb.ctb1 VALUES(now, 1, 1, 'a1')(now+1s, 11, 11, 'a11');
}
```
-
-
+
+
```python
while True:
@@ -677,9 +677,9 @@ INSERT INTO tmqdb.ctb1 VALUES(now, 1, 1, 'a1')(now+1s, 11, 11, 'a11');
print(block.fetchall())
```
-
+
-
+
```js
while(true){
@@ -691,11 +691,11 @@ INSERT INTO tmqdb.ctb1 VALUES(now, 1, 1, 'a1')(now+1s, 11, 11, 'a11');
}
```
-
+
-
+
-```csharp
+ ```csharp
// 消费数据
while (true)
{
@@ -708,18 +708,19 @@ INSERT INTO tmqdb.ctb1 VALUES(now, 1, 1, 'a1')(now+1s, 11, 11, 'a11');
}
```
-
+
-
+
- ## 结束消费
+## 结束消费
- 消费结束后,应当取消订阅。
+消费结束后,应当取消订阅。
-
-
+
+
+
-```c
+ ```c
/* 取消订阅 */
tmq_unsubscribe(tmq);
@@ -727,10 +728,10 @@ INSERT INTO tmqdb.ctb1 VALUES(now, 1, 1, 'a1')(now+1s, 11, 11, 'a11');
tmq_consumer_close(tmq);
```
-
-
+
+
-```java
+ ```java
/* 取消订阅 */
consumer.unsubscribe();
@@ -738,11 +739,11 @@ INSERT INTO tmqdb.ctb1 VALUES(now, 1, 1, 'a1')(now+1s, 11, 11, 'a11');
consumer.close();
```
-
+
+
+
-
-
-```go
+ ```go
/* Unsubscribe */
_ = consumer.Unsubscribe()
@@ -750,38 +751,38 @@ INSERT INTO tmqdb.ctb1 VALUES(now, 1, 1, 'a1')(now+1s, 11, 11, 'a11');
_ = consumer.Close()
```
-
+
+
+
-
-
-```rust
+ ```rust
consumer.unsubscribe().await;
```
-
+
-
+
-```py
+ ```py
# 取消订阅
consumer.unsubscribe()
# 关闭消费
consumer.close()
```
-
-
+
+
-```js
+ ```js
consumer.unsubscribe();
consumer.close();
```
-
+
-
+
-```csharp
+ ```csharp
// 取消订阅
consumer.Unsubscribe();
@@ -789,7 +790,7 @@ INSERT INTO tmqdb.ctb1 VALUES(now, 1, 1, 'a1')(now+1s, 11, 11, 'a11');
consumer.Close();
```
-
+
@@ -799,41 +800,41 @@ INSERT INTO tmqdb.ctb1 VALUES(now, 1, 1, 'a1')(now+1s, 11, 11, 'a11');
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
#订阅高级功能
diff --git a/include/common/tmsg.h b/include/common/tmsg.h
index e24d4a71b0..88205581fe 100644
--- a/include/common/tmsg.h
+++ b/include/common/tmsg.h
@@ -1400,7 +1400,7 @@ void tFreeSCompactDbReq(SCompactDbReq* pReq);
typedef struct {
int32_t compactId;
- int8_t bAccepted;
+ int8_t bAccepted;
} SCompactDbRsp;
int32_t tSerializeSCompactDbRsp(void* buf, int32_t bufLen, SCompactDbRsp* pRsp);
@@ -1414,7 +1414,7 @@ typedef struct {
int32_t tSerializeSKillCompactReq(void* buf, int32_t bufLen, SKillCompactReq* pReq);
int32_t tDeserializeSKillCompactReq(void* buf, int32_t bufLen, SKillCompactReq* pReq);
-void tFreeSKillCompactReq(SKillCompactReq *pReq);
+void tFreeSKillCompactReq(SKillCompactReq* pReq);
typedef struct {
char name[TSDB_FUNC_NAME_LEN];
@@ -1751,9 +1751,9 @@ int32_t tSerializeSCompactVnodeReq(void* buf, int32_t bufLen, SCompactVnodeReq*
int32_t tDeserializeSCompactVnodeReq(void* buf, int32_t bufLen, SCompactVnodeReq* pReq);
typedef struct {
- int32_t compactId;
- int32_t vgId;
- int32_t dnodeId;
+ int32_t compactId;
+ int32_t vgId;
+ int32_t dnodeId;
} SVKillCompactReq;
int32_t tSerializeSVKillCompactReq(void* buf, int32_t bufLen, SVKillCompactReq* pReq);
@@ -1954,9 +1954,9 @@ typedef struct {
char db[TSDB_DB_FNAME_LEN];
char tb[TSDB_TABLE_NAME_LEN];
char user[TSDB_USER_LEN];
- char filterTb[TSDB_TABLE_NAME_LEN]; // for ins_columns
+ char filterTb[TSDB_TABLE_NAME_LEN]; // for ins_columns
int64_t showId;
- int64_t compactId; // for compact
+ int64_t compactId; // for compact
} SRetrieveTableReq;
typedef struct SSysTableSchema {
@@ -3784,12 +3784,12 @@ typedef struct {
} SMqHbReq;
typedef struct {
- char topic[TSDB_TOPIC_FNAME_LEN];
- int8_t noPrivilege;
+ char topic[TSDB_TOPIC_FNAME_LEN];
+ int8_t noPrivilege;
} STopicPrivilege;
typedef struct {
- SArray* topicPrivileges; // SArray
+ SArray* topicPrivileges; // SArray
} SMqHbRsp;
typedef struct {
@@ -3927,8 +3927,8 @@ int32_t tDeserializeSMqSeekReq(void* buf, int32_t bufLen, SMqSeekReq* pReq);
#define SUBMIT_REQ_COLUMN_DATA_FORMAT 0x2
#define SUBMIT_REQ_FROM_FILE 0x4
-#define SOURCE_NULL 0
-#define SOURCE_TAOSX 1
+#define SOURCE_NULL 0
+#define SOURCE_TAOSX 1
typedef struct {
int32_t flags;
@@ -3940,8 +3940,8 @@ typedef struct {
SArray* aRowP;
SArray* aCol;
};
- int64_t ctimeMs;
- int8_t source;
+ int64_t ctimeMs;
+ int8_t source;
} SSubmitTbData;
typedef struct {
diff --git a/include/libs/stream/tstream.h b/include/libs/stream/tstream.h
index 1ae14cf5c4..e3ab42dd00 100644
--- a/include/libs/stream/tstream.h
+++ b/include/libs/stream/tstream.h
@@ -50,21 +50,21 @@ extern "C" {
(_t)->hTaskInfo.id.streamId = 0; \
} while (0)
-#define STREAM_EXEC_T_EXTRACT_WAL_DATA (-1)
-#define STREAM_EXEC_T_START_ALL_TASKS (-2)
-#define STREAM_EXEC_T_START_ONE_TASK (-3)
-#define STREAM_EXEC_T_RESTART_ALL_TASKS (-4)
-#define STREAM_EXEC_T_STOP_ALL_TASKS (-5)
-#define STREAM_EXEC_T_RESUME_TASK (-6)
-#define STREAM_EXEC_T_UPDATE_TASK_EPSET (-7)
+#define STREAM_EXEC_T_EXTRACT_WAL_DATA (-1)
+#define STREAM_EXEC_T_START_ALL_TASKS (-2)
+#define STREAM_EXEC_T_START_ONE_TASK (-3)
+#define STREAM_EXEC_T_RESTART_ALL_TASKS (-4)
+#define STREAM_EXEC_T_STOP_ALL_TASKS (-5)
+#define STREAM_EXEC_T_RESUME_TASK (-6)
+#define STREAM_EXEC_T_UPDATE_TASK_EPSET (-7)
typedef struct SStreamTask SStreamTask;
typedef struct SStreamQueue SStreamQueue;
typedef struct SStreamTaskSM SStreamTaskSM;
-#define SSTREAM_TASK_VER 3
-#define SSTREAM_TASK_INCOMPATIBLE_VER 1
-#define SSTREAM_TASK_NEED_CONVERT_VER 2
+#define SSTREAM_TASK_VER 3
+#define SSTREAM_TASK_INCOMPATIBLE_VER 1
+#define SSTREAM_TASK_NEED_CONVERT_VER 2
#define SSTREAM_TASK_SUBTABLE_CHANGED_VER 3
enum {
@@ -405,8 +405,8 @@ typedef struct SHistoryTaskInfo {
int32_t tickCount;
int32_t retryTimes;
int32_t waitInterval;
- int64_t haltVer; // offset in wal when halt the stream task
- bool operatorOpen; // false by default
+ int64_t haltVer; // offset in wal when halt the stream task
+ bool operatorOpen; // false by default
} SHistoryTaskInfo;
typedef struct STaskOutputInfo {
@@ -463,21 +463,22 @@ struct SStreamTask {
struct SStreamMeta* pMeta;
SSHashObj* pNameMap;
void* pBackend;
- char reserve[256];
+ int8_t subtableWithoutMd5;
+ char reserve[255];
};
typedef int32_t (*startComplete_fn_t)(struct SStreamMeta*);
typedef struct STaskStartInfo {
- int64_t startTs;
- int64_t readyTs;
- int32_t tasksWillRestart;
- int32_t taskStarting; // restart flag, sentinel to guard the restart procedure.
- SHashObj* pReadyTaskSet; // tasks that are all ready for running stream processing
- SHashObj* pFailedTaskSet; // tasks that are done the check downstream process, may be successful or failed
- int64_t elapsedTime;
- int32_t restartCount; // restart task counter
- startComplete_fn_t completeFn; // complete callback function
+ int64_t startTs;
+ int64_t readyTs;
+ int32_t tasksWillRestart;
+ int32_t taskStarting; // restart flag, sentinel to guard the restart procedure.
+ SHashObj* pReadyTaskSet; // tasks that are all ready for running stream processing
+ SHashObj* pFailedTaskSet; // tasks that are done the check downstream process, may be successful or failed
+ int64_t elapsedTime;
+ int32_t restartCount; // restart task counter
+ startComplete_fn_t completeFn; // complete callback function
} STaskStartInfo;
typedef struct STaskUpdateInfo {
@@ -504,7 +505,7 @@ typedef struct SStreamMeta {
int32_t vgId;
int64_t stage;
int32_t role;
- bool sendMsgBeforeClosing; // send hb to mnode before close all tasks when switch to follower.
+ bool sendMsgBeforeClosing; // send hb to mnode before close all tasks when switch to follower.
STaskStartInfo startInfo;
TdThreadRwlock lock;
SScanWalInfo scanInfo;
@@ -532,7 +533,7 @@ int32_t tEncodeStreamEpInfo(SEncoder* pEncoder, const SStreamChildEpInfo* pInfo)
int32_t tDecodeStreamEpInfo(SDecoder* pDecoder, SStreamChildEpInfo* pInfo);
SStreamTask* tNewStreamTask(int64_t streamId, int8_t taskLevel, SEpSet* pEpset, bool fillHistory, int64_t triggerParam,
- SArray* pTaskList, bool hasFillhistory);
+ SArray* pTaskList, bool hasFillhistory, int8_t subtableWithoutMd5);
int32_t tEncodeStreamTask(SEncoder* pEncoder, const SStreamTask* pTask);
int32_t tDecodeStreamTask(SDecoder* pDecoder, SStreamTask* pTask);
void tFreeStreamTask(SStreamTask* pTask);
@@ -678,18 +679,18 @@ typedef struct STaskStatusEntry {
int32_t statusLastDuration; // to record the last duration of current status
int64_t stage;
int32_t nodeId;
- int64_t verStart; // start version in WAL, only valid for source task
- int64_t verEnd; // end version in WAL, only valid for source task
- int64_t processedVer; // only valid for source task
- int64_t checkpointId; // current active checkpoint id
- int32_t chkpointTransId; // checkpoint trans id
- int8_t checkpointFailed; // denote if the checkpoint is failed or not
- bool inputQChanging; // inputQ is changing or not
+ int64_t verStart; // start version in WAL, only valid for source task
+ int64_t verEnd; // end version in WAL, only valid for source task
+ int64_t processedVer; // only valid for source task
+ int64_t checkpointId; // current active checkpoint id
+ int32_t chkpointTransId; // checkpoint trans id
+ int8_t checkpointFailed; // denote if the checkpoint is failed or not
+ bool inputQChanging; // inputQ is changing or not
int64_t inputQUnchangeCounter;
- double inputQUsed; // in MiB
+ double inputQUsed; // in MiB
double inputRate;
- double sinkQuota; // existed quota size for sink task
- double sinkDataSize; // sink to dst data size
+ double sinkQuota; // existed quota size for sink task
+ double sinkDataSize; // sink to dst data size
} STaskStatusEntry;
typedef struct SStreamHbMsg {
@@ -720,8 +721,8 @@ int32_t tEncodeStreamTaskUpdateMsg(SEncoder* pEncoder, const SStreamTaskNodeUpda
int32_t tDecodeStreamTaskUpdateMsg(SDecoder* pDecoder, SStreamTaskNodeUpdateMsg* pMsg);
typedef struct SStreamTaskState {
- ETaskStatus state;
- char* name;
+ ETaskStatus state;
+ char* name;
} SStreamTaskState;
int32_t tEncodeStreamTaskCheckReq(SEncoder* pEncoder, const SStreamTaskCheckReq* pReq);
@@ -826,7 +827,8 @@ SScanhistoryDataInfo streamScanHistoryData(SStreamTask* pTask, int64_t st);
// stream task meta
void streamMetaInit();
void streamMetaCleanup();
-SStreamMeta* streamMetaOpen(const char* path, void* ahandle, FTaskExpand expandFunc, int32_t vgId, int64_t stage, startComplete_fn_t fn);
+SStreamMeta* streamMetaOpen(const char* path, void* ahandle, FTaskExpand expandFunc, int32_t vgId, int64_t stage,
+ startComplete_fn_t fn);
void streamMetaClose(SStreamMeta* streamMeta);
int32_t streamMetaSaveTask(SStreamMeta* pMeta, SStreamTask* pTask); // save to stream meta store
int32_t streamMetaRemoveTask(SStreamMeta* pMeta, STaskId* pKey);
@@ -845,22 +847,22 @@ void streamMetaNotifyClose(SStreamMeta* pMeta);
void streamMetaStartHb(SStreamMeta* pMeta);
bool streamMetaTaskInTimer(SStreamMeta* pMeta);
int32_t streamMetaAddTaskLaunchResult(SStreamMeta* pMeta, int64_t streamId, int32_t taskId, int64_t startTs,
- int64_t endTs, bool ready);
+ int64_t endTs, bool ready);
int32_t streamMetaResetTaskStatus(SStreamMeta* pMeta);
-void streamMetaRLock(SStreamMeta* pMeta);
-void streamMetaRUnLock(SStreamMeta* pMeta);
-void streamMetaWLock(SStreamMeta* pMeta);
-void streamMetaWUnLock(SStreamMeta* pMeta);
-void streamMetaResetStartInfo(STaskStartInfo* pMeta);
-SArray* streamMetaSendMsgBeforeCloseTasks(SStreamMeta* pMeta);
-void streamMetaUpdateStageRole(SStreamMeta* pMeta, int64_t stage, bool isLeader);
-int32_t streamMetaLoadAllTasks(SStreamMeta* pMeta);
-int32_t streamMetaStartAllTasks(SStreamMeta* pMeta);
-int32_t streamMetaStopAllTasks(SStreamMeta* pMeta);
-int32_t streamMetaStartOneTask(SStreamMeta* pMeta, int64_t streamId, int32_t taskId);
-bool streamMetaAllTasksReady(const SStreamMeta* pMeta);
-tmr_h streamTimerGetInstance();
+void streamMetaRLock(SStreamMeta* pMeta);
+void streamMetaRUnLock(SStreamMeta* pMeta);
+void streamMetaWLock(SStreamMeta* pMeta);
+void streamMetaWUnLock(SStreamMeta* pMeta);
+void streamMetaResetStartInfo(STaskStartInfo* pMeta);
+SArray* streamMetaSendMsgBeforeCloseTasks(SStreamMeta* pMeta);
+void streamMetaUpdateStageRole(SStreamMeta* pMeta, int64_t stage, bool isLeader);
+int32_t streamMetaLoadAllTasks(SStreamMeta* pMeta);
+int32_t streamMetaStartAllTasks(SStreamMeta* pMeta);
+int32_t streamMetaStopAllTasks(SStreamMeta* pMeta);
+int32_t streamMetaStartOneTask(SStreamMeta* pMeta, int64_t streamId, int32_t taskId);
+bool streamMetaAllTasksReady(const SStreamMeta* pMeta);
+tmr_h streamTimerGetInstance();
// checkpoint
int32_t streamProcessCheckpointSourceReq(SStreamTask* pTask, SStreamCheckpointSourceReq* pReq);
diff --git a/source/client/src/clientEnv.c b/source/client/src/clientEnv.c
index f1e9e36433..87f8c6be67 100644
--- a/source/client/src/clientEnv.c
+++ b/source/client/src/clientEnv.c
@@ -681,8 +681,9 @@ void taos_init_imp(void) {
snprintf(logDirName, 64, "taoslog");
#endif
if (taosCreateLog(logDirName, 10, configDir, NULL, NULL, NULL, NULL, 1) != 0) {
- // ignore create log failed, only print
printf(" WARING: Create %s failed:%s. configDir=%s\n", logDirName, strerror(errno), configDir);
+ tscInitRes = -1;
+ return;
}
if (taosInitCfg(configDir, NULL, NULL, NULL, NULL, 1) != 0) {
@@ -750,8 +751,11 @@ int taos_options_imp(TSDB_OPTION option, const char *str) {
tstrncpy(configDir, str, PATH_MAX);
tscInfo("set cfg:%s to %s", configDir, str);
return 0;
- } else {
- taos_init(); // initialize global config
+ }
+
+ // initialize global config
+ if (taos_init() != 0) {
+ return -1;
}
SConfig *pCfg = taosGetCfg();
diff --git a/source/dnode/mnode/impl/inc/mndDef.h b/source/dnode/mnode/impl/inc/mndDef.h
index 19de4561d6..fc58fabad5 100644
--- a/source/dnode/mnode/impl/inc/mndDef.h
+++ b/source/dnode/mnode/impl/inc/mndDef.h
@@ -699,6 +699,7 @@ typedef struct {
int64_t checkpointId;
int32_t indexForMultiAggBalance;
+ int8_t subTableWithoutMd5;
char reserve[256];
} SStreamObj;
@@ -776,8 +777,8 @@ typedef enum {
GRANT_STATE_REASON_MAX,
} EGrantStateReason;
-#define GRANT_STATE_NUM 30
-#define GRANT_ACTIVE_NUM 10
+#define GRANT_STATE_NUM 30
+#define GRANT_ACTIVE_NUM 10
#define GRANT_ACTIVE_HEAD_LEN 30
typedef struct {
@@ -812,7 +813,7 @@ typedef struct {
int64_t id : 24;
};
};
- char machine[TSDB_MACHINE_ID_LEN + 1];
+ char machine[TSDB_MACHINE_ID_LEN + 1];
} SGrantMachine;
typedef struct {
diff --git a/source/dnode/mnode/impl/inc/mndStream.h b/source/dnode/mnode/impl/inc/mndStream.h
index 4d1125a340..1084340dc2 100644
--- a/source/dnode/mnode/impl/inc/mndStream.h
+++ b/source/dnode/mnode/impl/inc/mndStream.h
@@ -24,7 +24,7 @@ extern "C" {
#endif
#define MND_STREAM_RESERVE_SIZE 64
-#define MND_STREAM_VER_NUMBER 4
+#define MND_STREAM_VER_NUMBER 5
#define MND_STREAM_CREATE_NAME "stream-create"
#define MND_STREAM_CHECKPOINT_NAME "stream-checkpoint"
diff --git a/source/dnode/mnode/impl/src/mndDef.c b/source/dnode/mnode/impl/src/mndDef.c
index d59354286d..5be641d1c2 100644
--- a/source/dnode/mnode/impl/src/mndDef.c
+++ b/source/dnode/mnode/impl/src/mndDef.c
@@ -85,6 +85,7 @@ int32_t tEncodeSStreamObj(SEncoder *pEncoder, const SStreamObj *pObj) {
// 3.0.50 ver = 3
if (tEncodeI64(pEncoder, pObj->checkpointId) < 0) return -1;
+ if (tEncodeI8(pEncoder, pObj->subTableWithoutMd5) < 0) return -1;
if (tEncodeCStrWithLen(pEncoder, pObj->reserve, sizeof(pObj->reserve) - 1) < 0) return -1;
@@ -168,6 +169,10 @@ int32_t tDecodeSStreamObj(SDecoder *pDecoder, SStreamObj *pObj, int32_t sver) {
if (sver >= 3) {
if (tDecodeI64(pDecoder, &pObj->checkpointId) < 0) return -1;
}
+
+ if (sver >= 5) {
+ if (tDecodeI8(pDecoder, &pObj->subTableWithoutMd5) < 0) return -1;
+ }
if (tDecodeCStrTo(pDecoder, pObj->reserve) < 0) return -1;
tEndDecode(pDecoder);
diff --git a/source/dnode/mnode/impl/src/mndScheduler.c b/source/dnode/mnode/impl/src/mndScheduler.c
index 88d326a5c4..a8eaf7c711 100644
--- a/source/dnode/mnode/impl/src/mndScheduler.c
+++ b/source/dnode/mnode/impl/src/mndScheduler.c
@@ -14,13 +14,13 @@
*/
#include "mndScheduler.h"
-#include "tmisce.h"
-#include "mndMnode.h"
#include "mndDb.h"
+#include "mndMnode.h"
#include "mndSnode.h"
#include "mndVgroup.h"
#include "parser.h"
#include "tcompare.h"
+#include "tmisce.h"
#include "tname.h"
#include "tuuid.h"
@@ -189,7 +189,7 @@ SVgObj* mndSchedFetchOneVg(SMnode* pMnode, SStreamObj* pStream) {
return NULL;
}
- if(pStream->indexForMultiAggBalance == -1){
+ if (pStream->indexForMultiAggBalance == -1) {
taosSeedRand(taosSafeRand());
pStream->indexForMultiAggBalance = taosRand() % pDbObj->cfg.numOfVgroups;
}
@@ -204,7 +204,7 @@ SVgObj* mndSchedFetchOneVg(SMnode* pMnode, SStreamObj* pStream) {
sdbRelease(pMnode->pSdb, pVgroup);
continue;
}
- if (index++ == pStream->indexForMultiAggBalance){
+ if (index++ == pStream->indexForMultiAggBalance) {
pStream->indexForMultiAggBalance++;
pStream->indexForMultiAggBalance %= pDbObj->cfg.numOfVgroups;
sdbCancelFetch(pMnode->pSdb, pIter);
@@ -217,12 +217,12 @@ SVgObj* mndSchedFetchOneVg(SMnode* pMnode, SStreamObj* pStream) {
return pVgroup;
}
-static int32_t doAddSinkTask(SStreamObj* pStream, SMnode* pMnode, SVgObj* pVgroup,
- SEpSet* pEpset, bool isFillhistory) {
- int64_t uid = (isFillhistory) ? pStream->hTaskUid : pStream->uid;
+static int32_t doAddSinkTask(SStreamObj* pStream, SMnode* pMnode, SVgObj* pVgroup, SEpSet* pEpset, bool isFillhistory) {
+ int64_t uid = (isFillhistory) ? pStream->hTaskUid : pStream->uid;
SArray** pTaskList = (isFillhistory) ? taosArrayGetLast(pStream->pHTasksList) : taosArrayGetLast(pStream->tasks);
- SStreamTask* pTask = tNewStreamTask(uid, TASK_LEVEL__SINK, pEpset, isFillhistory, 0, *pTaskList, pStream->conf.fillHistory);
+ SStreamTask* pTask = tNewStreamTask(uid, TASK_LEVEL__SINK, pEpset, isFillhistory, 0, *pTaskList,
+ pStream->conf.fillHistory, pStream->subTableWithoutMd5);
if (pTask == NULL) {
terrno = TSDB_CODE_OUT_OF_MEMORY;
return terrno;
@@ -235,12 +235,12 @@ static int32_t doAddSinkTask(SStreamObj* pStream, SMnode* pMnode, SVgObj* pVgrou
return mndSetSinkTaskInfo(pStream, pTask);
}
-static int32_t doAddSinkTaskToVg(SMnode* pMnode, SStreamObj* pStream, SEpSet* pEpset, SVgObj* vgObj){
+static int32_t doAddSinkTaskToVg(SMnode* pMnode, SStreamObj* pStream, SEpSet* pEpset, SVgObj* vgObj) {
int32_t code = doAddSinkTask(pStream, pMnode, vgObj, pEpset, false);
if (code != 0) {
return code;
}
- if(pStream->conf.fillHistory){
+ if (pStream->conf.fillHistory) {
code = doAddSinkTask(pStream, pMnode, vgObj, pEpset, true);
if (code != 0) {
return code;
@@ -267,7 +267,7 @@ static int32_t doAddShuffleSinkTask(SMnode* pMnode, SStreamObj* pStream, SEpSet*
}
int32_t code = doAddSinkTaskToVg(pMnode, pStream, pEpset, pVgroup);
- if(code != 0){
+ if (code != 0) {
sdbRelease(pSdb, pVgroup);
return code;
}
@@ -279,7 +279,7 @@ static int32_t doAddShuffleSinkTask(SMnode* pMnode, SStreamObj* pStream, SEpSet*
}
static int64_t getVgroupLastVer(const SArray* pList, int32_t vgId) {
- for(int32_t i = 0; i < taosArrayGetSize(pList); ++i) {
+ for (int32_t i = 0; i < taosArrayGetSize(pList); ++i) {
SVgroupVer* pVer = taosArrayGet(pList, i);
if (pVer->vgId == vgId) {
return pVer->ver;
@@ -315,19 +315,18 @@ static void streamTaskSetDataRange(SStreamTask* pTask, int64_t skey, SArray* pVe
pRange->range.minVer = latestVer + 1;
pRange->range.maxVer = INT64_MAX;
- mDebug("add source task 0x%x timeWindow:%" PRId64 "-%" PRId64 " verRange:%" PRId64 "-%" PRId64,
- pTask->id.taskId, pWindow->skey, pWindow->ekey, pRange->range.minVer, pRange->range.maxVer);
+ mDebug("add source task 0x%x timeWindow:%" PRId64 "-%" PRId64 " verRange:%" PRId64 "-%" PRId64, pTask->id.taskId,
+ pWindow->skey, pWindow->ekey, pRange->range.minVer, pRange->range.maxVer);
}
}
-static SStreamTask* buildSourceTask(SStreamObj* pStream, SEpSet* pEpset,
- bool isFillhistory, bool useTriggerParam) {
+static SStreamTask* buildSourceTask(SStreamObj* pStream, SEpSet* pEpset, bool isFillhistory, bool useTriggerParam) {
uint64_t uid = (isFillhistory) ? pStream->hTaskUid : pStream->uid;
SArray** pTaskList = (isFillhistory) ? taosArrayGetLast(pStream->pHTasksList) : taosArrayGetLast(pStream->tasks);
- SStreamTask* pTask = tNewStreamTask(uid, TASK_LEVEL__SOURCE, pEpset,
- isFillhistory, useTriggerParam ? pStream->conf.triggerParam : 0,
- *pTaskList, pStream->conf.fillHistory);
+ SStreamTask* pTask =
+ tNewStreamTask(uid, TASK_LEVEL__SOURCE, pEpset, isFillhistory, useTriggerParam ? pStream->conf.triggerParam : 0,
+ *pTaskList, pStream->conf.fillHistory, pStream->subTableWithoutMd5);
if (pTask == NULL) {
return NULL;
}
@@ -335,7 +334,7 @@ static SStreamTask* buildSourceTask(SStreamObj* pStream, SEpSet* pEpset,
return pTask;
}
-static void addNewTaskList(SStreamObj* pStream){
+static void addNewTaskList(SStreamObj* pStream) {
SArray* pTaskList = taosArrayInit(0, POINTER_BYTES);
taosArrayPush(pStream->tasks, &pTaskList);
if (pStream->conf.fillHistory) {
@@ -364,11 +363,11 @@ static void setHTasksId(SStreamObj* pStream) {
}
}
-static int32_t doAddSourceTask(SMnode* pMnode, SSubplan* plan, SStreamObj* pStream, SEpSet* pEpset,
- int64_t skey, SArray* pVerList, SVgObj* pVgroup, bool isFillhistory, bool useTriggerParam ){
+static int32_t doAddSourceTask(SMnode* pMnode, SSubplan* plan, SStreamObj* pStream, SEpSet* pEpset, int64_t skey,
+ SArray* pVerList, SVgObj* pVgroup, bool isFillhistory, bool useTriggerParam) {
// new stream task
SStreamTask* pTask = buildSourceTask(pStream, pEpset, isFillhistory, useTriggerParam);
- if(pTask == NULL){
+ if (pTask == NULL) {
terrno = TSDB_CODE_OUT_OF_MEMORY;
return terrno;
}
@@ -377,15 +376,15 @@ static int32_t doAddSourceTask(SMnode* pMnode, SSubplan* plan, SStreamObj* pStre
streamTaskSetDataRange(pTask, skey, pVerList, pVgroup->vgId);
int32_t code = mndAssignStreamTaskToVgroup(pMnode, pTask, plan, pVgroup);
- if(code != 0){
+ if (code != 0) {
terrno = code;
return terrno;
}
return TDB_CODE_SUCCESS;
}
-static SSubplan* getScanSubPlan(const SQueryPlan* pPlan){
- int32_t numOfPlanLevel = LIST_LENGTH(pPlan->pSubplans);
+static SSubplan* getScanSubPlan(const SQueryPlan* pPlan) {
+ int32_t numOfPlanLevel = LIST_LENGTH(pPlan->pSubplans);
SNodeListNode* inner = (SNodeListNode*)nodesListGetNode(pPlan->pSubplans, numOfPlanLevel - 1);
if (LIST_LENGTH(inner->pNodeList) != 1) {
terrno = TSDB_CODE_QRY_INVALID_INPUT;
@@ -400,7 +399,7 @@ static SSubplan* getScanSubPlan(const SQueryPlan* pPlan){
return plan;
}
-static SSubplan* getAggSubPlan(const SQueryPlan* pPlan, int index){
+static SSubplan* getAggSubPlan(const SQueryPlan* pPlan, int index) {
SNodeListNode* inner = (SNodeListNode*)nodesListGetNode(pPlan->pSubplans, index);
if (LIST_LENGTH(inner->pNodeList) != 1) {
terrno = TSDB_CODE_QRY_INVALID_INPUT;
@@ -415,8 +414,8 @@ static SSubplan* getAggSubPlan(const SQueryPlan* pPlan, int index){
return plan;
}
-static int32_t addSourceTask(SMnode* pMnode, SSubplan* plan, SStreamObj* pStream,
- SEpSet* pEpset, int64_t nextWindowSkey, SArray* pVerList, bool useTriggerParam) {
+static int32_t addSourceTask(SMnode* pMnode, SSubplan* plan, SStreamObj* pStream, SEpSet* pEpset,
+ int64_t nextWindowSkey, SArray* pVerList, bool useTriggerParam) {
addNewTaskList(pStream);
void* pIter = NULL;
@@ -433,15 +432,16 @@ static int32_t addSourceTask(SMnode* pMnode, SSubplan* plan, SStreamObj* pStream
continue;
}
- int code = doAddSourceTask(pMnode, plan, pStream, pEpset, nextWindowSkey, pVerList, pVgroup, false, useTriggerParam);
- if(code != 0){
+ int code =
+ doAddSourceTask(pMnode, plan, pStream, pEpset, nextWindowSkey, pVerList, pVgroup, false, useTriggerParam);
+ if (code != 0) {
sdbRelease(pSdb, pVgroup);
return code;
}
if (pStream->conf.fillHistory) {
code = doAddSourceTask(pMnode, plan, pStream, pEpset, nextWindowSkey, pVerList, pVgroup, true, useTriggerParam);
- if(code != 0){
+ if (code != 0) {
sdbRelease(pSdb, pVgroup);
return code;
}
@@ -461,9 +461,9 @@ static SStreamTask* buildAggTask(SStreamObj* pStream, SEpSet* pEpset, bool isFil
uint64_t uid = (isFillhistory) ? pStream->hTaskUid : pStream->uid;
SArray** pTaskList = (isFillhistory) ? taosArrayGetLast(pStream->pHTasksList) : taosArrayGetLast(pStream->tasks);
- SStreamTask* pAggTask = tNewStreamTask(uid, TASK_LEVEL__AGG, pEpset, isFillhistory,
- useTriggerParam ? pStream->conf.triggerParam : 0,
- *pTaskList, pStream->conf.fillHistory);
+ SStreamTask* pAggTask =
+ tNewStreamTask(uid, TASK_LEVEL__AGG, pEpset, isFillhistory, useTriggerParam ? pStream->conf.triggerParam : 0,
+ *pTaskList, pStream->conf.fillHistory, pStream->subTableWithoutMd5);
if (pAggTask == NULL) {
terrno = TSDB_CODE_OUT_OF_MEMORY;
return NULL;
@@ -472,8 +472,8 @@ static SStreamTask* buildAggTask(SStreamObj* pStream, SEpSet* pEpset, bool isFil
return pAggTask;
}
-static int32_t doAddAggTask(SStreamObj* pStream, SMnode* pMnode, SSubplan* plan, SEpSet* pEpset,
- SVgObj* pVgroup, SSnodeObj* pSnode, bool isFillhistory, bool useTriggerParam){
+static int32_t doAddAggTask(SStreamObj* pStream, SMnode* pMnode, SSubplan* plan, SEpSet* pEpset, SVgObj* pVgroup,
+ SSnodeObj* pSnode, bool isFillhistory, bool useTriggerParam) {
int32_t code = 0;
SStreamTask* pTask = buildAggTask(pStream, pEpset, isFillhistory, useTriggerParam);
if (pTask == NULL) {
@@ -490,7 +490,7 @@ static int32_t doAddAggTask(SStreamObj* pStream, SMnode* pMnode, SSubplan* plan,
return code;
}
-static int32_t addAggTask(SStreamObj* pStream, SMnode* pMnode, SSubplan* plan, SEpSet* pEpset, bool useTriggerParam){
+static int32_t addAggTask(SStreamObj* pStream, SMnode* pMnode, SSubplan* plan, SEpSet* pEpset, bool useTriggerParam) {
SVgObj* pVgroup = NULL;
SSnodeObj* pSnode = NULL;
int32_t code = 0;
@@ -504,20 +504,20 @@ static int32_t addAggTask(SStreamObj* pStream, SMnode* pMnode, SSubplan* plan, S
}
code = doAddAggTask(pStream, pMnode, plan, pEpset, pVgroup, pSnode, false, useTriggerParam);
- if(code != 0){
+ if (code != 0) {
goto END;
}
if (pStream->conf.fillHistory) {
code = doAddAggTask(pStream, pMnode, plan, pEpset, pVgroup, pSnode, true, useTriggerParam);
- if(code != 0){
+ if (code != 0) {
goto END;
}
setHTasksId(pStream);
}
- END:
+END:
if (pSnode != NULL) {
sdbRelease(pMnode->pSdb, pSnode);
} else {
@@ -526,7 +526,7 @@ static int32_t addAggTask(SStreamObj* pStream, SMnode* pMnode, SSubplan* plan, S
return code;
}
-static int32_t addSinkTask(SMnode* pMnode, SStreamObj* pStream, SEpSet* pEpset){
+static int32_t addSinkTask(SMnode* pMnode, SStreamObj* pStream, SEpSet* pEpset) {
int32_t code = 0;
addNewTaskList(pStream);
@@ -548,9 +548,9 @@ static int32_t addSinkTask(SMnode* pMnode, SStreamObj* pStream, SEpSet* pEpset){
return TDB_CODE_SUCCESS;
}
-static void bindTaskToSinkTask(SStreamObj* pStream, SMnode* pMnode, SArray* pSinkTaskList, SStreamTask* task){
+static void bindTaskToSinkTask(SStreamObj* pStream, SMnode* pMnode, SArray* pSinkTaskList, SStreamTask* task) {
mndAddDispatcherForInternalTask(pMnode, pStream, pSinkTaskList, task);
- for(int32_t k = 0; k < taosArrayGetSize(pSinkTaskList); k++) {
+ for (int32_t k = 0; k < taosArrayGetSize(pSinkTaskList); k++) {
SStreamTask* pSinkTask = taosArrayGetP(pSinkTaskList, k);
streamTaskSetUpstreamInfo(pSinkTask, task);
}
@@ -558,10 +558,10 @@ static void bindTaskToSinkTask(SStreamObj* pStream, SMnode* pMnode, SArray* pSin
}
static void bindAggSink(SStreamObj* pStream, SMnode* pMnode, SArray* tasks) {
- SArray* pSinkTaskList = taosArrayGetP(tasks, SINK_NODE_LEVEL);
+ SArray* pSinkTaskList = taosArrayGetP(tasks, SINK_NODE_LEVEL);
SArray** pAggTaskList = taosArrayGetLast(tasks);
- for(int i = 0; i < taosArrayGetSize(*pAggTaskList); i++){
+ for (int i = 0; i < taosArrayGetSize(*pAggTaskList); i++) {
SStreamTask* pAggTask = taosArrayGetP(*pAggTaskList, i);
bindTaskToSinkTask(pStream, pMnode, pSinkTaskList, pAggTask);
mDebug("bindAggSink taskId:%s to sink task list", pAggTask->id.idStr);
@@ -572,7 +572,7 @@ static void bindSourceSink(SStreamObj* pStream, SMnode* pMnode, SArray* tasks, b
SArray* pSinkTaskList = taosArrayGetP(tasks, SINK_NODE_LEVEL);
SArray* pSourceTaskList = taosArrayGetP(tasks, hasExtraSink ? SINK_NODE_LEVEL + 1 : SINK_NODE_LEVEL);
- for(int i = 0; i < taosArrayGetSize(pSourceTaskList); i++){
+ for (int i = 0; i < taosArrayGetSize(pSourceTaskList); i++) {
SStreamTask* pSourceTask = taosArrayGetP(pSourceTaskList, i);
mDebug("bindSourceSink taskId:%s to sink task list", pSourceTask->id.idStr);
@@ -591,8 +591,8 @@ static void bindTwoLevel(SArray* tasks, int32_t begin, int32_t end) {
SArray* pUpTaskList = taosArrayGetP(tasks, size - 2);
SStreamTask** pDownTask = taosArrayGetLast(pDownTaskList);
- end = end > taosArrayGetSize(pUpTaskList) ? taosArrayGetSize(pUpTaskList): end;
- for(int i = begin; i < end; i++){
+ end = end > taosArrayGetSize(pUpTaskList) ? taosArrayGetSize(pUpTaskList) : end;
+ for (int i = begin; i < end; i++) {
SStreamTask* pUpTask = taosArrayGetP(pUpTaskList, i);
pUpTask->info.selfChildId = i - begin;
streamTaskSetFixedDownstreamInfo(pUpTask, *pDownTask);
@@ -616,8 +616,8 @@ static int32_t doScheduleStream(SStreamObj* pStream, SMnode* pMnode, SQueryPlan*
bool multiTarget = (pDbObj->cfg.numOfVgroups > 1);
sdbRelease(pSdb, pDbObj);
- mDebug("doScheduleStream numOfPlanLevel:%d, exDb:%d, multiTarget:%d, fix vgId:%d, physicalPlan:%s",
- numOfPlanLevel, externalTargetDB, multiTarget, pStream->fixedSinkVgId, pStream->physicalPlan);
+ mDebug("doScheduleStream numOfPlanLevel:%d, exDb:%d, multiTarget:%d, fix vgId:%d, physicalPlan:%s", numOfPlanLevel,
+ externalTargetDB, multiTarget, pStream->fixedSinkVgId, pStream->physicalPlan);
pStream->tasks = taosArrayInit(numOfPlanLevel + 1, POINTER_BYTES);
pStream->pHTasksList = taosArrayInit(numOfPlanLevel + 1, POINTER_BYTES);
@@ -632,7 +632,7 @@ static int32_t doScheduleStream(SStreamObj* pStream, SMnode* pMnode, SQueryPlan*
pStream->totalLevel = numOfPlanLevel + hasExtraSink;
- SSubplan* plan = getScanSubPlan(pPlan); // source plan
+ SSubplan* plan = getScanSubPlan(pPlan); // source plan
if (plan == NULL) {
return terrno;
}
@@ -649,32 +649,32 @@ static int32_t doScheduleStream(SStreamObj* pStream, SMnode* pMnode, SQueryPlan*
return TDB_CODE_SUCCESS;
}
- if(numOfPlanLevel == 3){
+ if (numOfPlanLevel == 3) {
plan = getAggSubPlan(pPlan, 1); // middle agg plan
if (plan == NULL) {
return terrno;
}
- do{
+ do {
SArray** list = taosArrayGetLast(pStream->tasks);
- float size = (float)taosArrayGetSize(*list);
- size_t cnt = (size_t)ceil(size/tsStreamAggCnt);
- if(cnt <= 1) break;
+ float size = (float)taosArrayGetSize(*list);
+ size_t cnt = (size_t)ceil(size / tsStreamAggCnt);
+ if (cnt <= 1) break;
mDebug("doScheduleStream add middle agg, size:%d, cnt:%d", (int)size, (int)cnt);
addNewTaskList(pStream);
- for(int j = 0; j < cnt; j++){
+ for (int j = 0; j < cnt; j++) {
code = addAggTask(pStream, pMnode, plan, pEpset, false);
if (code != TSDB_CODE_SUCCESS) {
return code;
}
- bindTwoLevel(pStream->tasks, j*tsStreamAggCnt, (j+1)*tsStreamAggCnt);
+ bindTwoLevel(pStream->tasks, j * tsStreamAggCnt, (j + 1) * tsStreamAggCnt);
if (pStream->conf.fillHistory) {
- bindTwoLevel(pStream->pHTasksList, j*tsStreamAggCnt, (j+1)*tsStreamAggCnt);
+ bindTwoLevel(pStream->pHTasksList, j * tsStreamAggCnt, (j + 1) * tsStreamAggCnt);
}
}
- }while(1);
+ } while (1);
}
plan = getAggSubPlan(pPlan, 0);
@@ -684,7 +684,7 @@ static int32_t doScheduleStream(SStreamObj* pStream, SMnode* pMnode, SQueryPlan*
mDebug("doScheduleStream add final agg");
SArray** list = taosArrayGetLast(pStream->tasks);
- size_t size = taosArrayGetSize(*list);
+ size_t size = taosArrayGetSize(*list);
addNewTaskList(pStream);
code = addAggTask(pStream, pMnode, plan, pEpset, true);
if (code != TSDB_CODE_SUCCESS) {
diff --git a/source/dnode/mnode/impl/src/mndSma.c b/source/dnode/mnode/impl/src/mndSma.c
index 1e92b1a181..05189d5a53 100644
--- a/source/dnode/mnode/impl/src/mndSma.c
+++ b/source/dnode/mnode/impl/src/mndSma.c
@@ -567,6 +567,7 @@ static int32_t mndCreateSma(SMnode *pMnode, SRpcMsg *pReq, SMCreateSmaReq *pCrea
streamObj.conf.triggerParam = pCreate->maxDelay;
streamObj.ast = taosStrdup(smaObj.ast);
streamObj.indexForMultiAggBalance = -1;
+ streamObj.subTableWithoutMd5 = 1;
// check the maxDelay
if (streamObj.conf.triggerParam < TSDB_MIN_ROLLUP_MAX_DELAY) {
@@ -898,11 +899,11 @@ _OVER:
}
int32_t mndDropSmasByStb(SMnode *pMnode, STrans *pTrans, SDbObj *pDb, SStbObj *pStb) {
- SSdb *pSdb = pMnode->pSdb;
- SSmaObj *pSma = NULL;
- void *pIter = NULL;
- SVgObj *pVgroup = NULL;
- int32_t code = -1;
+ SSdb *pSdb = pMnode->pSdb;
+ SSmaObj *pSma = NULL;
+ void *pIter = NULL;
+ SVgObj *pVgroup = NULL;
+ int32_t code = -1;
while (1) {
pIter = sdbFetch(pSdb, SDB_SMA, pIter, (void **)&pSma);
diff --git a/source/dnode/mnode/impl/src/mndStream.c b/source/dnode/mnode/impl/src/mndStream.c
index 190b4f28ce..e4767d72d7 100644
--- a/source/dnode/mnode/impl/src/mndStream.c
+++ b/source/dnode/mnode/impl/src/mndStream.c
@@ -27,7 +27,7 @@
#include "tmisce.h"
#include "tname.h"
-#define MND_STREAM_MAX_NUM 60
+#define MND_STREAM_MAX_NUM 60
typedef struct SMStreamNodeCheckMsg {
int8_t placeHolder; // // to fix windows compile error, define place holder
@@ -192,7 +192,7 @@ SSdbRow *mndStreamActionDecode(SSdbRaw *pRaw) {
STREAM_DECODE_OVER:
taosMemoryFreeClear(buf);
if (terrno != TSDB_CODE_SUCCESS) {
- char* p = (pStream == NULL) ? "null" : pStream->name;
+ char *p = (pStream == NULL) ? "null" : pStream->name;
mError("stream:%s, failed to decode from raw:%p since %s", p, pRaw, terrstr());
taosMemoryFreeClear(pRow);
return NULL;
@@ -802,8 +802,7 @@ static int32_t mndProcessStreamCheckpointTmr(SRpcMsg *pReq) {
}
static int32_t mndBuildStreamCheckpointSourceReq(void **pBuf, int32_t *pLen, int32_t nodeId, int64_t checkpointId,
- int64_t streamId, int32_t taskId, int32_t transId,
- int8_t mndTrigger) {
+ int64_t streamId, int32_t taskId, int32_t transId, int8_t mndTrigger) {
SStreamCheckpointSourceReq req = {0};
req.checkpointId = checkpointId;
req.nodeId = nodeId;
@@ -878,11 +877,10 @@ static int32_t mndProcessStreamCheckpointTrans(SMnode *pMnode, SStreamObj *pStre
int32_t code = -1;
int64_t ts = taosGetTimestampMs();
if (mndTrigger == 1 && (ts - pStream->checkpointFreq < tsStreamCheckpointInterval * 1000)) {
-// mWarn("checkpoint interval less than the threshold, ignore it");
+ // mWarn("checkpoint interval less than the threshold, ignore it");
return -1;
}
-
bool conflict = mndStreamTransConflictCheck(pMnode, pStream->uid, MND_STREAM_CHECKPOINT_NAME, lock);
if (conflict) {
mndAddtoCheckpointWaitingList(pStream, checkpointId);
@@ -1144,7 +1142,7 @@ static int32_t mndProcessDropStreamReq(SRpcMsg *pReq) {
return -1;
}
- STrans* pTrans = doCreateTrans(pMnode, pStream, pReq, MND_STREAM_DROP_NAME, "drop stream");
+ STrans *pTrans = doCreateTrans(pMnode, pStream, pReq, MND_STREAM_DROP_NAME, "drop stream");
if (pTrans == NULL) {
mError("stream:%s, failed to drop since %s", dropReq.name, terrstr());
sdbRelease(pMnode->pSdb, pStream);
@@ -1570,7 +1568,7 @@ static int32_t mndProcessPauseStreamReq(SRpcMsg *pReq) {
return -1;
}
- STrans* pTrans = doCreateTrans(pMnode, pStream, pReq, MND_STREAM_PAUSE_NAME, "pause the stream");
+ STrans *pTrans = doCreateTrans(pMnode, pStream, pReq, MND_STREAM_PAUSE_NAME, "pause the stream");
if (pTrans == NULL) {
mError("stream:%s failed to pause stream since %s", pauseReq.name, terrstr());
sdbRelease(pMnode->pSdb, pStream);
@@ -1590,7 +1588,7 @@ static int32_t mndProcessPauseStreamReq(SRpcMsg *pReq) {
// pause stream
taosWLockLatch(&pStream->lock);
pStream->status = STREAM_STATUS__PAUSE;
- if (mndPersistTransLog(pStream, pTrans,SDB_STATUS_READY) < 0) {
+ if (mndPersistTransLog(pStream, pTrans, SDB_STATUS_READY) < 0) {
taosWUnLockLatch(&pStream->lock);
sdbRelease(pMnode->pSdb, pStream);
@@ -1617,7 +1615,7 @@ static int32_t mndProcessResumeStreamReq(SRpcMsg *pReq) {
SMnode *pMnode = pReq->info.node;
SStreamObj *pStream = NULL;
- if(grantCheckExpire(TSDB_GRANT_STREAMS) < 0){
+ if (grantCheckExpire(TSDB_GRANT_STREAMS) < 0) {
terrno = TSDB_CODE_GRANT_EXPIRED;
return -1;
}
@@ -1659,7 +1657,7 @@ static int32_t mndProcessResumeStreamReq(SRpcMsg *pReq) {
return -1;
}
- STrans* pTrans = doCreateTrans(pMnode, pStream, pReq, MND_STREAM_RESUME_NAME, "resume the stream");
+ STrans *pTrans = doCreateTrans(pMnode, pStream, pReq, MND_STREAM_RESUME_NAME, "resume the stream");
if (pTrans == NULL) {
mError("stream:%s, failed to resume stream since %s", resumeReq.name, terrstr());
sdbRelease(pMnode->pSdb, pStream);
@@ -2106,10 +2104,10 @@ void removeStreamTasksInBuf(SStreamObj *pStream, SStreamExecInfo *pExecNode) {
ASSERT(taosHashGetSize(pExecNode->pTaskMap) == taosArrayGetSize(pExecNode->pTaskList));
}
-static void doAddTaskId(SArray* pList, int32_t taskId, int64_t uid, int32_t numOfTotal) {
+static void doAddTaskId(SArray *pList, int32_t taskId, int64_t uid, int32_t numOfTotal) {
int32_t num = taosArrayGetSize(pList);
- for(int32_t i = 0; i < num; ++i) {
- int32_t* pId = taosArrayGet(pList, i);
+ for (int32_t i = 0; i < num; ++i) {
+ int32_t *pId = taosArrayGet(pList, i);
if (taskId == *pId) {
return;
}
@@ -2122,7 +2120,7 @@ static void doAddTaskId(SArray* pList, int32_t taskId, int64_t uid, int32_t numO
}
int32_t mndProcessStreamReqCheckpoint(SRpcMsg *pReq) {
- SMnode *pMnode = pReq->info.node;
+ SMnode *pMnode = pReq->info.node;
SStreamTaskCheckpointReq req = {0};
SDecoder decoder = {0};
@@ -2143,7 +2141,7 @@ int32_t mndProcessStreamReqCheckpoint(SRpcMsg *pReq) {
SStreamObj *pStream = mndGetStreamObj(pMnode, req.streamId);
if (pStream == NULL) {
- mError("failed to find the stream:0x%"PRIx64" not handle the checkpoint req", req.streamId);
+ mError("failed to find the stream:0x%" PRIx64 " not handle the checkpoint req", req.streamId);
terrno = TSDB_CODE_MND_STREAM_NOT_EXIST;
taosThreadMutexUnlock(&execInfo.lock);
@@ -2151,13 +2149,13 @@ int32_t mndProcessStreamReqCheckpoint(SRpcMsg *pReq) {
}
int32_t numOfTasks = mndGetNumOfStreamTasks(pStream);
- SArray **pReqTaskList = (SArray**)taosHashGet(execInfo.pTransferStateStreams, &req.streamId, sizeof(req.streamId));
+ SArray **pReqTaskList = (SArray **)taosHashGet(execInfo.pTransferStateStreams, &req.streamId, sizeof(req.streamId));
if (pReqTaskList == NULL) {
SArray *pList = taosArrayInit(4, sizeof(int32_t));
doAddTaskId(pList, req.taskId, pStream->uid, numOfTasks);
taosHashPut(execInfo.pTransferStateStreams, &req.streamId, sizeof(int64_t), &pList, sizeof(void *));
- pReqTaskList = (SArray**)taosHashGet(execInfo.pTransferStateStreams, &req.streamId, sizeof(req.streamId));
+ pReqTaskList = (SArray **)taosHashGet(execInfo.pTransferStateStreams, &req.streamId, sizeof(req.streamId));
} else {
doAddTaskId(*pReqTaskList, req.taskId, pStream->uid, numOfTasks);
}
diff --git a/source/dnode/vnode/src/tq/tqSink.c b/source/dnode/vnode/src/tq/tqSink.c
index b438b2dc0a..b56bf3e0fe 100644
--- a/source/dnode/vnode/src/tq/tqSink.c
+++ b/source/dnode/vnode/src/tq/tqSink.c
@@ -33,15 +33,18 @@ static int32_t doBuildAndSendDeleteMsg(SVnode* pVnode, char* stbFullName, SSData
int64_t suid);
static int32_t doBuildAndSendSubmitMsg(SVnode* pVnode, SStreamTask* pTask, SSubmitReq2* pReq, int32_t numOfBlocks);
static int32_t buildSubmitMsgImpl(SSubmitReq2* pSubmitReq, int32_t vgId, void** pMsg, int32_t* msgLen);
-static int32_t doConvertRows(SSubmitTbData* pTableData, const STSchema* pTSchema, SSDataBlock* pDataBlock, const char* id);
+static int32_t doConvertRows(SSubmitTbData* pTableData, const STSchema* pTSchema, SSDataBlock* pDataBlock,
+ const char* id);
static int32_t doWaitForDstTableCreated(SVnode* pVnode, SStreamTask* pTask, STableSinkInfo* pTableSinkInfo,
const char* dstTableName, int64_t* uid);
-static int32_t doPutIntoCache(SSHashObj* pSinkTableMap, STableSinkInfo* pTableSinkInfo, uint64_t groupId, const char* id);
+static int32_t doPutIntoCache(SSHashObj* pSinkTableMap, STableSinkInfo* pTableSinkInfo, uint64_t groupId,
+ const char* id);
static bool isValidDstChildTable(SMetaReader* pReader, int32_t vgId, const char* ctbName, int64_t suid);
-static int32_t initCreateTableMsg(SVCreateTbReq* pCreateTableReq, uint64_t suid, const char* stbFullName, int32_t numOfTags);
+static int32_t initCreateTableMsg(SVCreateTbReq* pCreateTableReq, uint64_t suid, const char* stbFullName,
+ int32_t numOfTags);
static SArray* createDefaultTagColName();
-static void setCreateTableMsgTableName(SVCreateTbReq* pCreateTableReq, SSDataBlock* pDataBlock, const char* stbFullName,
- int64_t gid, bool newSubTableRule);
+static void setCreateTableMsgTableName(SVCreateTbReq* pCreateTableReq, SSDataBlock* pDataBlock, const char* stbFullName,
+ int64_t gid, bool newSubTableRule);
int32_t tqBuildDeleteReq(STQ* pTq, const char* stbFullName, const SSDataBlock* pDataBlock, SBatchDeleteReq* deleteReq,
const char* pIdStr, bool newSubTableRule) {
@@ -68,10 +71,7 @@ int32_t tqBuildDeleteReq(STQ* pTq, const char* stbFullName, const SSDataBlock* p
if (varTbName != NULL && varTbName != (void*)-1) {
name = taosMemoryCalloc(1, TSDB_TABLE_NAME_LEN);
memcpy(name, varDataVal(varTbName), varDataLen(varTbName));
- if(newSubTableRule &&
- !isAutoTableName(name) &&
- !alreadyAddGroupId(name) &&
- groupId != 0) {
+ if (newSubTableRule && !isAutoTableName(name) && !alreadyAddGroupId(name) && groupId != 0) {
buildCtbNameAddGruopId(name, groupId);
}
} else if (stbFullName) {
@@ -134,7 +134,7 @@ end:
return ret;
}
-static bool tqGetTableInfo(SSHashObj* pTableInfoMap,uint64_t groupId, STableSinkInfo** pInfo) {
+static bool tqGetTableInfo(SSHashObj* pTableInfoMap, uint64_t groupId, STableSinkInfo** pInfo) {
void* pVal = tSimpleHashGet(pTableInfoMap, &groupId, sizeof(uint64_t));
if (pVal) {
*pInfo = *(STableSinkInfo**)pVal;
@@ -149,7 +149,7 @@ static int32_t tqPutReqToQueue(SVnode* pVnode, SVCreateTbBatchReq* pReqs) {
int32_t tlen = 0;
encodeCreateChildTableForRPC(pReqs, TD_VID(pVnode), &buf, &tlen);
- SRpcMsg msg = { .msgType = TDMT_VND_CREATE_TABLE, .pCont = buf, .contLen = tlen };
+ SRpcMsg msg = {.msgType = TDMT_VND_CREATE_TABLE, .pCont = buf, .contLen = tlen};
if (tmsgPutToQueue(&pVnode->msgCb, WRITE_QUEUE, &msg) != 0) {
tqError("failed to put into write-queue since %s", terrstr());
}
@@ -181,14 +181,12 @@ SArray* createDefaultTagColName() {
void setCreateTableMsgTableName(SVCreateTbReq* pCreateTableReq, SSDataBlock* pDataBlock, const char* stbFullName,
int64_t gid, bool newSubTableRule) {
if (pDataBlock->info.parTbName[0]) {
- if(newSubTableRule &&
- !isAutoTableName(pDataBlock->info.parTbName) &&
- !alreadyAddGroupId(pDataBlock->info.parTbName) &&
- gid != 0) {
+ if (newSubTableRule && !isAutoTableName(pDataBlock->info.parTbName) &&
+ !alreadyAddGroupId(pDataBlock->info.parTbName) && gid != 0) {
pCreateTableReq->name = taosMemoryCalloc(1, TSDB_TABLE_NAME_LEN);
strcpy(pCreateTableReq->name, pDataBlock->info.parTbName);
buildCtbNameAddGruopId(pCreateTableReq->name, gid);
- }else{
+ } else {
pCreateTableReq->name = taosStrdup(pDataBlock->info.parTbName);
}
} else {
@@ -196,17 +194,18 @@ void setCreateTableMsgTableName(SVCreateTbReq* pCreateTableReq, SSDataBlock* pDa
}
}
-static int32_t doBuildAndSendCreateTableMsg(SVnode* pVnode, char* stbFullName, SSDataBlock* pDataBlock, SStreamTask* pTask,
- int64_t suid) {
+static int32_t doBuildAndSendCreateTableMsg(SVnode* pVnode, char* stbFullName, SSDataBlock* pDataBlock,
+ SStreamTask* pTask, int64_t suid) {
tqDebug("s-task:%s build create table msg", pTask->id.idStr);
STSchema* pTSchema = pTask->outputInfo.tbSink.pTSchema;
int32_t rows = pDataBlock->info.rows;
- SArray* tagArray = taosArrayInit(4, sizeof(STagVal));;
- int32_t code = 0;
+ SArray* tagArray = taosArrayInit(4, sizeof(STagVal));
+ ;
+ int32_t code = 0;
SVCreateTbBatchReq reqs = {0};
- SArray* crTblArray = reqs.pArray = taosArrayInit(1, sizeof(SVCreateTbReq));
+ SArray* crTblArray = reqs.pArray = taosArrayInit(1, sizeof(SVCreateTbReq));
if (NULL == reqs.pArray) {
tqError("s-task:%s failed to init create table msg, code:%s", pTask->id.idStr, tstrerror(terrno));
goto _end;
@@ -262,7 +261,8 @@ static int32_t doBuildAndSendCreateTableMsg(SVnode* pVnode, char* stbFullName, S
ASSERT(gid == *(int64_t*)pGpIdData);
}
- setCreateTableMsgTableName(pCreateTbReq, pDataBlock, stbFullName, gid, pTask->ver >= SSTREAM_TASK_SUBTABLE_CHANGED_VER);
+ setCreateTableMsgTableName(pCreateTbReq, pDataBlock, stbFullName, gid,
+ pTask->ver >= SSTREAM_TASK_SUBTABLE_CHANGED_VER && pTask->subtableWithoutMd5 != 1);
taosArrayPush(reqs.pArray, pCreateTbReq);
tqDebug("s-task:%s build create table:%s msg complete", pTask->id.idStr, pCreateTbReq->name);
@@ -274,7 +274,7 @@ static int32_t doBuildAndSendCreateTableMsg(SVnode* pVnode, char* stbFullName, S
tqError("s-task:%s failed to send create table msg", pTask->id.idStr);
}
- _end:
+_end:
taosArrayDestroy(tagArray);
taosArrayDestroyEx(crTblArray, (FDelete)tdDestroySVCreateTbReq);
return code;
@@ -361,7 +361,8 @@ int32_t doMergeExistedRows(SSubmitTbData* pExisted, const SSubmitTbData* pNew, c
pExisted->aRowP = pFinal;
tqTrace("s-task:%s rows merged, final rows:%d, uid:%" PRId64 ", existed auto-create table:%d, new-block:%d", id,
- (int32_t)taosArrayGetSize(pFinal), pExisted->uid, (pExisted->pCreateTbReq != NULL), (pNew->pCreateTbReq != NULL));
+ (int32_t)taosArrayGetSize(pFinal), pExisted->uid, (pExisted->pCreateTbReq != NULL),
+ (pNew->pCreateTbReq != NULL));
tdDestroySVCreateTbReq(pNew->pCreateTbReq);
taosMemoryFree(pNew->pCreateTbReq);
@@ -373,7 +374,7 @@ int32_t doBuildAndSendDeleteMsg(SVnode* pVnode, char* stbFullName, SSDataBlock*
SBatchDeleteReq deleteReq = {.suid = suid, .deleteReqs = taosArrayInit(0, sizeof(SSingleDeleteReq))};
int32_t code = tqBuildDeleteReq(pVnode->pTq, stbFullName, pDataBlock, &deleteReq, pTask->id.idStr,
- pTask->ver >= SSTREAM_TASK_SUBTABLE_CHANGED_VER);
+ pTask->ver >= SSTREAM_TASK_SUBTABLE_CHANGED_VER && pTask->subtableWithoutMd5 != 1);
if (code != TSDB_CODE_SUCCESS) {
return code;
}
@@ -416,8 +417,8 @@ bool isValidDstChildTable(SMetaReader* pReader, int32_t vgId, const char* ctbNam
}
if (pReader->me.ctbEntry.suid != suid) {
- tqError("vgId:%d, failed to write into %s, since suid mismatch, expect suid:%" PRId64 ", actual:%" PRId64,
- vgId, ctbName, suid, pReader->me.ctbEntry.suid);
+ tqError("vgId:%d, failed to write into %s, since suid mismatch, expect suid:%" PRId64 ", actual:%" PRId64, vgId,
+ ctbName, suid, pReader->me.ctbEntry.suid);
terrno = TSDB_CODE_TDB_TABLE_IN_OTHER_STABLE;
return false;
}
@@ -437,10 +438,10 @@ SVCreateTbReq* buildAutoCreateTableReq(const char* stbFullName, int64_t suid, in
taosArrayClear(pTagArray);
initCreateTableMsg(pCreateTbReq, suid, stbFullName, 1);
- STagVal tagVal = { .cid = numOfCols, .type = TSDB_DATA_TYPE_UBIGINT, .i64 = pDataBlock->info.id.groupId};
+ STagVal tagVal = {.cid = numOfCols, .type = TSDB_DATA_TYPE_UBIGINT, .i64 = pDataBlock->info.id.groupId};
taosArrayPush(pTagArray, &tagVal);
- tTagNew(pTagArray, 1, false, (STag**) &pCreateTbReq->ctb.pTag);
+ tTagNew(pTagArray, 1, false, (STag**)&pCreateTbReq->ctb.pTag);
if (pCreateTbReq->ctb.pTag == NULL) {
tdDestroySVCreateTbReq(pCreateTbReq);
@@ -513,13 +514,13 @@ int32_t buildSubmitMsgImpl(SSubmitReq2* pSubmitReq, int32_t vgId, void** pMsg, i
}
int32_t tsAscendingSortFn(const void* p1, const void* p2) {
- SRow* pRow1 = *(SRow**) p1;
- SRow* pRow2 = *(SRow**) p2;
+ SRow* pRow1 = *(SRow**)p1;
+ SRow* pRow2 = *(SRow**)p2;
if (pRow1->ts == pRow2->ts) {
return 0;
} else {
- return pRow1->ts > pRow2->ts? 1:-1;
+ return pRow1->ts > pRow2->ts ? 1 : -1;
}
}
@@ -563,7 +564,7 @@ int32_t doConvertRows(SSubmitTbData* pTableData, const STSchema* pTSchema, SSDat
void* colData = colDataGetData(pColData, j);
if (IS_STR_DATA_TYPE(pCol->type)) {
// address copy, no value
- SValue sv = (SValue){.nData = varDataLen(colData), .pData = (uint8_t*) varDataVal(colData)};
+ SValue sv = (SValue){.nData = varDataLen(colData), .pData = (uint8_t*)varDataVal(colData)};
SColVal cv = COL_VAL_VALUE(pCol->colId, pCol->type, sv);
taosArrayPush(pVals, &cv);
} else {
@@ -666,11 +667,9 @@ int32_t setDstTableDataUid(SVnode* pVnode, SStreamTask* pTask, SSDataBlock* pDat
if (dstTableName[0] == 0) {
memset(dstTableName, 0, TSDB_TABLE_NAME_LEN);
buildCtbNameByGroupIdImpl(stbFullName, groupId, dstTableName);
- }else{
- if(pTask->ver >= SSTREAM_TASK_SUBTABLE_CHANGED_VER &&
- !isAutoTableName(dstTableName) &&
- !alreadyAddGroupId(dstTableName) &&
- groupId != 0) {
+ } else {
+ if (pTask->ver >= SSTREAM_TASK_SUBTABLE_CHANGED_VER && pTask->subtableWithoutMd5 != 1 &&
+ !isAutoTableName(dstTableName) && !alreadyAddGroupId(dstTableName) && groupId != 0) {
buildCtbNameAddGruopId(dstTableName, groupId);
}
}
@@ -693,7 +692,7 @@ int32_t setDstTableDataUid(SVnode* pVnode, SStreamTask* pTask, SSDataBlock* pDat
tqTrace("s-task:%s cached tableInfo uid is invalid, acquire it from meta", id);
return doWaitForDstTableCreated(pVnode, pTask, pTableSinkInfo, dstTableName, &pTableData->uid);
} else {
- tqTrace("s-task:%s set the dstTable uid from cache:%"PRId64, id, pTableData->uid);
+ tqTrace("s-task:%s set the dstTable uid from cache:%" PRId64, id, pTableData->uid);
}
} else {
// The auto-create option will always set to be open for those submit messages, which arrive during the period
@@ -714,7 +713,8 @@ int32_t setDstTableDataUid(SVnode* pVnode, SStreamTask* pTask, SSDataBlock* pDat
pTableData->flags = SUBMIT_REQ_AUTO_CREATE_TABLE;
pTableData->pCreateTbReq =
- buildAutoCreateTableReq(stbFullName, suid, pTSchema->numOfCols + 1, pDataBlock, pTagArray, pTask->ver >= SSTREAM_TASK_SUBTABLE_CHANGED_VER);
+ buildAutoCreateTableReq(stbFullName, suid, pTSchema->numOfCols + 1, pDataBlock, pTagArray,
+ pTask->ver >= SSTREAM_TASK_SUBTABLE_CHANGED_VER && pTask->subtableWithoutMd5 != 1);
taosArrayDestroy(pTagArray);
if (pTableData->pCreateTbReq == NULL) {
@@ -746,12 +746,12 @@ int32_t setDstTableDataUid(SVnode* pVnode, SStreamTask* pTask, SSDataBlock* pDat
return TDB_CODE_SUCCESS;
}
-int32_t tqSetDstTableDataPayload(uint64_t suid, const STSchema *pTSchema, int32_t blockIndex, SSDataBlock* pDataBlock,
- SSubmitTbData* pTableData, const char* id) {
+int32_t tqSetDstTableDataPayload(uint64_t suid, const STSchema* pTSchema, int32_t blockIndex, SSDataBlock* pDataBlock,
+ SSubmitTbData* pTableData, const char* id) {
int32_t numOfRows = pDataBlock->info.rows;
- tqDebug("s-task:%s sink data pipeline, build submit msg from %dth resBlock, including %d rows, dst suid:%" PRId64,
- id, blockIndex + 1, numOfRows, suid);
+ tqDebug("s-task:%s sink data pipeline, build submit msg from %dth resBlock, including %d rows, dst suid:%" PRId64, id,
+ blockIndex + 1, numOfRows, suid);
char* dstTableName = pDataBlock->info.parTbName;
// convert all rows
@@ -767,14 +767,14 @@ int32_t tqSetDstTableDataPayload(uint64_t suid, const STSchema *pTSchema, int32_
}
bool hasOnlySubmitData(const SArray* pBlocks, int32_t numOfBlocks) {
- for(int32_t i = 0; i < numOfBlocks; ++i) {
+ for (int32_t i = 0; i < numOfBlocks; ++i) {
SSDataBlock* p = taosArrayGet(pBlocks, i);
if (p->info.type == STREAM_DELETE_RESULT || p->info.type == STREAM_CREATE_CHILD_TABLE) {
return false;
}
}
- return true;
+ return true;
}
void tqSinkDataIntoDstTable(SStreamTask* pTask, void* vnode, void* data) {
@@ -793,7 +793,7 @@ void tqSinkDataIntoDstTable(SStreamTask* pTask, void* vnode, void* data) {
tqDebug("vgId:%d, s-task:%s write %d stream resBlock(s) into table, has delete block, submit one-by-one", vgId, id,
numOfBlocks);
- for(int32_t i = 0; i < numOfBlocks; ++i) {
+ for (int32_t i = 0; i < numOfBlocks; ++i) {
if (streamTaskShouldStop(pTask)) {
return;
}
@@ -832,7 +832,8 @@ void tqSinkDataIntoDstTable(SStreamTask* pTask, void* vnode, void* data) {
}
} else {
tqDebug("vgId:%d, s-task:%s write %d stream resBlock(s) into table, merge submit msg", vgId, id, numOfBlocks);
- SHashObj* pTableIndexMap = taosHashInit(numOfBlocks, taosGetDefaultHashFunction(TSDB_DATA_TYPE_BIGINT), false, HASH_NO_LOCK);
+ SHashObj* pTableIndexMap =
+ taosHashInit(numOfBlocks, taosGetDefaultHashFunction(TSDB_DATA_TYPE_BIGINT), false, HASH_NO_LOCK);
SSubmitReq2 submitReq = {.aSubmitTbData = taosArrayInit(1, sizeof(SSubmitTbData))};
if (submitReq.aSubmitTbData == NULL) {
diff --git a/source/libs/parser/inc/sql.y b/source/libs/parser/inc/sql.y
index d2d120fa93..d607287af3 100755
--- a/source/libs/parser/inc/sql.y
+++ b/source/libs/parser/inc/sql.y
@@ -516,7 +516,7 @@ cmd ::= SHOW VNODES.
// show alive
cmd ::= SHOW db_name_cond_opt(A) ALIVE. { pCxt->pRootNode = createShowAliveStmt(pCxt, A, QUERY_NODE_SHOW_DB_ALIVE_STMT); }
cmd ::= SHOW CLUSTER ALIVE. { pCxt->pRootNode = createShowAliveStmt(pCxt, NULL, QUERY_NODE_SHOW_CLUSTER_ALIVE_STMT); }
-cmd ::= SHOW db_name_cond_opt(A) VIEWS. { pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VIEWS_STMT, A, NULL, OP_TYPE_LIKE); }
+cmd ::= SHOW db_name_cond_opt(A) VIEWS like_pattern_opt(B). { pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VIEWS_STMT, A, B, OP_TYPE_LIKE); }
cmd ::= SHOW CREATE VIEW full_table_name(A). { pCxt->pRootNode = createShowCreateViewStmt(pCxt, QUERY_NODE_SHOW_CREATE_VIEW_STMT, A); }
cmd ::= SHOW COMPACTS. { pCxt->pRootNode = createShowCompactsStmt(pCxt, QUERY_NODE_SHOW_COMPACTS_STMT); }
cmd ::= SHOW COMPACT NK_INTEGER(A). { pCxt->pRootNode = createShowCompactDetailsStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &A)); }
diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c
index 960796d345..c4c4b0824a 100644
--- a/source/libs/parser/src/parTranslater.c
+++ b/source/libs/parser/src/parTranslater.c
@@ -9399,7 +9399,20 @@ static int32_t createOperatorNode(EOperatorType opType, const char* pColName, SN
}
static const char* getTbNameColName(ENodeType type) {
- return (QUERY_NODE_SHOW_STABLES_STMT == type ? "stable_name" : "table_name");
+ const char* colName;
+ switch (type)
+ {
+ case QUERY_NODE_SHOW_VIEWS_STMT:
+ colName = "view_name";
+ break;
+ case QUERY_NODE_SHOW_STABLES_STMT:
+ colName = "stable_name";
+ break;
+ default:
+ colName = "table_name";
+ break;
+ }
+ return colName;
}
static int32_t createLogicCondNode(SNode* pCond1, SNode* pCond2, SNode** pCond, ELogicConditionType logicCondType) {
diff --git a/source/libs/parser/src/sql.c b/source/libs/parser/src/sql.c
index 25862bb079..63159a10ae 100644
--- a/source/libs/parser/src/sql.c
+++ b/source/libs/parser/src/sql.c
@@ -1,3 +1,5 @@
+/* This file is automatically generated by Lemon from input grammar
+** source file "sql.y". */
/*
** 2000-05-29
**
@@ -22,9 +24,8 @@
** The following is the concatenation of all %include directives from the
** input grammar file:
*/
-#include
-#include
/************ Begin %include sections from the grammar ************************/
+#line 11 "sql.y"
#include
#include
@@ -41,12 +42,362 @@
#include "parAst.h"
#define YYSTACKDEPTH 0
+#line 46 "sql.c"
/**************** End of %include directives **********************************/
-/* These constants specify the various numeric values for terminal symbols
-** in a format understandable to "makeheaders". This section is blank unless
-** "lemon" is run with the "-m" command-line option.
-***************** Begin makeheaders token definitions *************************/
-/**************** End makeheaders token definitions ***************************/
+/* These constants specify the various numeric values for terminal symbols.
+***************** Begin token definitions *************************************/
+#ifndef TK_OR
+#define TK_OR 1
+#define TK_AND 2
+#define TK_UNION 3
+#define TK_ALL 4
+#define TK_MINUS 5
+#define TK_EXCEPT 6
+#define TK_INTERSECT 7
+#define TK_NK_BITAND 8
+#define TK_NK_BITOR 9
+#define TK_NK_LSHIFT 10
+#define TK_NK_RSHIFT 11
+#define TK_NK_PLUS 12
+#define TK_NK_MINUS 13
+#define TK_NK_STAR 14
+#define TK_NK_SLASH 15
+#define TK_NK_REM 16
+#define TK_NK_CONCAT 17
+#define TK_CREATE 18
+#define TK_ACCOUNT 19
+#define TK_NK_ID 20
+#define TK_PASS 21
+#define TK_NK_STRING 22
+#define TK_ALTER 23
+#define TK_PPS 24
+#define TK_TSERIES 25
+#define TK_STORAGE 26
+#define TK_STREAMS 27
+#define TK_QTIME 28
+#define TK_DBS 29
+#define TK_USERS 30
+#define TK_CONNS 31
+#define TK_STATE 32
+#define TK_NK_COMMA 33
+#define TK_HOST 34
+#define TK_USER 35
+#define TK_ENABLE 36
+#define TK_NK_INTEGER 37
+#define TK_SYSINFO 38
+#define TK_ADD 39
+#define TK_DROP 40
+#define TK_GRANT 41
+#define TK_ON 42
+#define TK_TO 43
+#define TK_REVOKE 44
+#define TK_FROM 45
+#define TK_SUBSCRIBE 46
+#define TK_READ 47
+#define TK_WRITE 48
+#define TK_NK_DOT 49
+#define TK_WITH 50
+#define TK_DNODE 51
+#define TK_PORT 52
+#define TK_DNODES 53
+#define TK_RESTORE 54
+#define TK_NK_IPTOKEN 55
+#define TK_FORCE 56
+#define TK_UNSAFE 57
+#define TK_CLUSTER 58
+#define TK_LOCAL 59
+#define TK_QNODE 60
+#define TK_BNODE 61
+#define TK_SNODE 62
+#define TK_MNODE 63
+#define TK_VNODE 64
+#define TK_DATABASE 65
+#define TK_USE 66
+#define TK_FLUSH 67
+#define TK_TRIM 68
+#define TK_COMPACT 69
+#define TK_IF 70
+#define TK_NOT 71
+#define TK_EXISTS 72
+#define TK_BUFFER 73
+#define TK_CACHEMODEL 74
+#define TK_CACHESIZE 75
+#define TK_COMP 76
+#define TK_DURATION 77
+#define TK_NK_VARIABLE 78
+#define TK_MAXROWS 79
+#define TK_MINROWS 80
+#define TK_KEEP 81
+#define TK_PAGES 82
+#define TK_PAGESIZE 83
+#define TK_TSDB_PAGESIZE 84
+#define TK_PRECISION 85
+#define TK_REPLICA 86
+#define TK_VGROUPS 87
+#define TK_SINGLE_STABLE 88
+#define TK_RETENTIONS 89
+#define TK_SCHEMALESS 90
+#define TK_WAL_LEVEL 91
+#define TK_WAL_FSYNC_PERIOD 92
+#define TK_WAL_RETENTION_PERIOD 93
+#define TK_WAL_RETENTION_SIZE 94
+#define TK_WAL_ROLL_PERIOD 95
+#define TK_WAL_SEGMENT_SIZE 96
+#define TK_STT_TRIGGER 97
+#define TK_TABLE_PREFIX 98
+#define TK_TABLE_SUFFIX 99
+#define TK_KEEP_TIME_OFFSET 100
+#define TK_NK_COLON 101
+#define TK_BWLIMIT 102
+#define TK_START 103
+#define TK_TIMESTAMP 104
+#define TK_END 105
+#define TK_TABLE 106
+#define TK_NK_LP 107
+#define TK_NK_RP 108
+#define TK_STABLE 109
+#define TK_COLUMN 110
+#define TK_MODIFY 111
+#define TK_RENAME 112
+#define TK_TAG 113
+#define TK_SET 114
+#define TK_NK_EQ 115
+#define TK_USING 116
+#define TK_TAGS 117
+#define TK_BOOL 118
+#define TK_TINYINT 119
+#define TK_SMALLINT 120
+#define TK_INT 121
+#define TK_INTEGER 122
+#define TK_BIGINT 123
+#define TK_FLOAT 124
+#define TK_DOUBLE 125
+#define TK_BINARY 126
+#define TK_NCHAR 127
+#define TK_UNSIGNED 128
+#define TK_JSON 129
+#define TK_VARCHAR 130
+#define TK_MEDIUMBLOB 131
+#define TK_BLOB 132
+#define TK_VARBINARY 133
+#define TK_GEOMETRY 134
+#define TK_DECIMAL 135
+#define TK_COMMENT 136
+#define TK_MAX_DELAY 137
+#define TK_WATERMARK 138
+#define TK_ROLLUP 139
+#define TK_TTL 140
+#define TK_SMA 141
+#define TK_DELETE_MARK 142
+#define TK_FIRST 143
+#define TK_LAST 144
+#define TK_SHOW 145
+#define TK_PRIVILEGES 146
+#define TK_DATABASES 147
+#define TK_TABLES 148
+#define TK_STABLES 149
+#define TK_MNODES 150
+#define TK_QNODES 151
+#define TK_FUNCTIONS 152
+#define TK_INDEXES 153
+#define TK_ACCOUNTS 154
+#define TK_APPS 155
+#define TK_CONNECTIONS 156
+#define TK_LICENCES 157
+#define TK_GRANTS 158
+#define TK_FULL 159
+#define TK_LOGS 160
+#define TK_MACHINES 161
+#define TK_QUERIES 162
+#define TK_SCORES 163
+#define TK_TOPICS 164
+#define TK_VARIABLES 165
+#define TK_BNODES 166
+#define TK_SNODES 167
+#define TK_TRANSACTIONS 168
+#define TK_DISTRIBUTED 169
+#define TK_CONSUMERS 170
+#define TK_SUBSCRIPTIONS 171
+#define TK_VNODES 172
+#define TK_ALIVE 173
+#define TK_VIEWS 174
+#define TK_VIEW 175
+#define TK_COMPACTS 176
+#define TK_NORMAL 177
+#define TK_CHILD 178
+#define TK_LIKE 179
+#define TK_TBNAME 180
+#define TK_QTAGS 181
+#define TK_AS 182
+#define TK_SYSTEM 183
+#define TK_INDEX 184
+#define TK_FUNCTION 185
+#define TK_INTERVAL 186
+#define TK_COUNT 187
+#define TK_LAST_ROW 188
+#define TK_META 189
+#define TK_ONLY 190
+#define TK_TOPIC 191
+#define TK_CONSUMER 192
+#define TK_GROUP 193
+#define TK_DESC 194
+#define TK_DESCRIBE 195
+#define TK_RESET 196
+#define TK_QUERY 197
+#define TK_CACHE 198
+#define TK_EXPLAIN 199
+#define TK_ANALYZE 200
+#define TK_VERBOSE 201
+#define TK_NK_BOOL 202
+#define TK_RATIO 203
+#define TK_NK_FLOAT 204
+#define TK_OUTPUTTYPE 205
+#define TK_AGGREGATE 206
+#define TK_BUFSIZE 207
+#define TK_LANGUAGE 208
+#define TK_REPLACE 209
+#define TK_STREAM 210
+#define TK_INTO 211
+#define TK_PAUSE 212
+#define TK_RESUME 213
+#define TK_TRIGGER 214
+#define TK_AT_ONCE 215
+#define TK_WINDOW_CLOSE 216
+#define TK_IGNORE 217
+#define TK_EXPIRED 218
+#define TK_FILL_HISTORY 219
+#define TK_UPDATE 220
+#define TK_SUBTABLE 221
+#define TK_UNTREATED 222
+#define TK_KILL 223
+#define TK_CONNECTION 224
+#define TK_TRANSACTION 225
+#define TK_BALANCE 226
+#define TK_VGROUP 227
+#define TK_LEADER 228
+#define TK_MERGE 229
+#define TK_REDISTRIBUTE 230
+#define TK_SPLIT 231
+#define TK_DELETE 232
+#define TK_INSERT 233
+#define TK_NULL 234
+#define TK_NK_QUESTION 235
+#define TK_NK_ALIAS 236
+#define TK_NK_ARROW 237
+#define TK_ROWTS 238
+#define TK_QSTART 239
+#define TK_QEND 240
+#define TK_QDURATION 241
+#define TK_WSTART 242
+#define TK_WEND 243
+#define TK_WDURATION 244
+#define TK_IROWTS 245
+#define TK_ISFILLED 246
+#define TK_CAST 247
+#define TK_NOW 248
+#define TK_TODAY 249
+#define TK_TIMEZONE 250
+#define TK_CLIENT_VERSION 251
+#define TK_SERVER_VERSION 252
+#define TK_SERVER_STATUS 253
+#define TK_CURRENT_USER 254
+#define TK_CASE 255
+#define TK_WHEN 256
+#define TK_THEN 257
+#define TK_ELSE 258
+#define TK_BETWEEN 259
+#define TK_IS 260
+#define TK_NK_LT 261
+#define TK_NK_GT 262
+#define TK_NK_LE 263
+#define TK_NK_GE 264
+#define TK_NK_NE 265
+#define TK_MATCH 266
+#define TK_NMATCH 267
+#define TK_CONTAINS 268
+#define TK_IN 269
+#define TK_JOIN 270
+#define TK_INNER 271
+#define TK_SELECT 272
+#define TK_NK_HINT 273
+#define TK_DISTINCT 274
+#define TK_WHERE 275
+#define TK_PARTITION 276
+#define TK_BY 277
+#define TK_SESSION 278
+#define TK_STATE_WINDOW 279
+#define TK_EVENT_WINDOW 280
+#define TK_SLIDING 281
+#define TK_FILL 282
+#define TK_VALUE 283
+#define TK_VALUE_F 284
+#define TK_NONE 285
+#define TK_PREV 286
+#define TK_NULL_F 287
+#define TK_LINEAR 288
+#define TK_NEXT 289
+#define TK_HAVING 290
+#define TK_RANGE 291
+#define TK_EVERY 292
+#define TK_ORDER 293
+#define TK_SLIMIT 294
+#define TK_SOFFSET 295
+#define TK_LIMIT 296
+#define TK_OFFSET 297
+#define TK_ASC 298
+#define TK_NULLS 299
+#define TK_ABORT 300
+#define TK_AFTER 301
+#define TK_ATTACH 302
+#define TK_BEFORE 303
+#define TK_BEGIN 304
+#define TK_BITAND 305
+#define TK_BITNOT 306
+#define TK_BITOR 307
+#define TK_BLOCKS 308
+#define TK_CHANGE 309
+#define TK_COMMA 310
+#define TK_CONCAT 311
+#define TK_CONFLICT 312
+#define TK_COPY 313
+#define TK_DEFERRED 314
+#define TK_DELIMITERS 315
+#define TK_DETACH 316
+#define TK_DIVIDE 317
+#define TK_DOT 318
+#define TK_EACH 319
+#define TK_FAIL 320
+#define TK_FILE 321
+#define TK_FOR 322
+#define TK_GLOB 323
+#define TK_ID 324
+#define TK_IMMEDIATE 325
+#define TK_IMPORT 326
+#define TK_INITIALLY 327
+#define TK_INSTEAD 328
+#define TK_ISNULL 329
+#define TK_KEY 330
+#define TK_MODULES 331
+#define TK_NK_BITNOT 332
+#define TK_NK_SEMI 333
+#define TK_NOTNULL 334
+#define TK_OF 335
+#define TK_PLUS 336
+#define TK_PRIVILEGE 337
+#define TK_RAISE 338
+#define TK_RESTRICT 339
+#define TK_ROW 340
+#define TK_SEMI 341
+#define TK_STAR 342
+#define TK_STATEMENT 343
+#define TK_STRICT 344
+#define TK_STRING 345
+#define TK_TIMES 346
+#define TK_VALUES 347
+#define TK_VARIABLE 348
+#define TK_WAL 349
+#endif
+/**************** End token definitions ***************************************/
/* The next sections is a series of control #defines.
** various aspects of the generated parser.
@@ -142,18 +493,18 @@ typedef union {
#define ParseCTX_FETCH
#define ParseCTX_STORE
#define YYFALLBACK 1
-#define YYNSTATE 846
+#define YYNSTATE 847
#define YYNRULE 647
#define YYNRULE_WITH_ACTION 647
#define YYNTOKEN 350
-#define YY_MAX_SHIFT 845
-#define YY_MIN_SHIFTREDUCE 1248
-#define YY_MAX_SHIFTREDUCE 1894
-#define YY_ERROR_ACTION 1895
-#define YY_ACCEPT_ACTION 1896
-#define YY_NO_ACTION 1897
-#define YY_MIN_REDUCE 1898
-#define YY_MAX_REDUCE 2544
+#define YY_MAX_SHIFT 846
+#define YY_MIN_SHIFTREDUCE 1249
+#define YY_MAX_SHIFTREDUCE 1895
+#define YY_ERROR_ACTION 1896
+#define YY_ACCEPT_ACTION 1897
+#define YY_NO_ACTION 1898
+#define YY_MIN_REDUCE 1899
+#define YY_MAX_REDUCE 2545
/************* End control #defines *******************************************/
#define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0])))
@@ -222,315 +573,315 @@ typedef union {
*********** Begin parsing tables **********************************************/
#define YY_ACTTAB_COUNT (3083)
static const YYACTIONTYPE yy_action[] = {
- /* 0 */ 1921, 2322, 565, 2077, 466, 566, 1941, 14, 13, 465,
- /* 10 */ 2175, 2305, 48, 46, 1818, 2330, 2520, 34, 411, 2515,
- /* 20 */ 417, 1684, 1659, 41, 40, 2326, 171, 47, 45, 44,
- /* 30 */ 43, 42, 2073, 645, 2090, 1744, 1984, 1657, 2519, 731,
- /* 40 */ 2088, 698, 2516, 2518, 2515, 2346, 38, 320, 643, 582,
- /* 50 */ 641, 269, 268, 2312, 673, 710, 146, 2515, 713, 137,
- /* 60 */ 112, 673, 697, 203, 2515, 1739, 608, 2516, 699, 2328,
- /* 70 */ 414, 19, 174, 2226, 1910, 2521, 203, 147, 1665, 741,
- /* 80 */ 2516, 699, 2521, 203, 2226, 2080, 2364, 2516, 699, 41,
- /* 90 */ 40, 2224, 718, 47, 45, 44, 43, 42, 2312, 410,
- /* 100 */ 747, 585, 2223, 718, 842, 583, 2219, 15, 473, 817,
- /* 110 */ 816, 815, 814, 429, 1787, 813, 812, 151, 807, 806,
- /* 120 */ 805, 804, 803, 802, 801, 150, 795, 794, 793, 428,
- /* 130 */ 427, 790, 789, 788, 183, 182, 787, 2064, 1314, 2345,
- /* 140 */ 1313, 63, 2383, 1746, 1747, 114, 2347, 751, 2349, 2350,
- /* 150 */ 746, 730, 741, 532, 530, 142, 366, 186, 573, 2436,
- /* 160 */ 217, 566, 1941, 413, 2432, 300, 2444, 709, 570, 138,
- /* 170 */ 708, 509, 2515, 1315, 567, 508, 184, 2141, 205, 2520,
- /* 180 */ 1719, 1729, 2515, 507, 382, 656, 2466, 1745, 1748, 1860,
- /* 190 */ 697, 203, 2139, 710, 146, 2516, 699, 1898, 384, 688,
- /* 200 */ 2206, 2519, 1660, 63, 1658, 2516, 2517, 786, 196, 710,
- /* 210 */ 146, 41, 40, 731, 2088, 47, 45, 44, 43, 42,
- /* 220 */ 2128, 136, 135, 134, 133, 132, 131, 130, 129, 128,
- /* 230 */ 730, 482, 2202, 208, 1663, 1664, 1716, 52, 1718, 1721,
- /* 240 */ 1722, 1723, 1724, 1725, 1726, 1727, 1728, 743, 739, 1737,
- /* 250 */ 1738, 1740, 1741, 1742, 1743, 2, 48, 46, 581, 2520,
- /* 260 */ 1685, 364, 698, 1682, 417, 2515, 1659, 731, 2088, 99,
- /* 270 */ 516, 237, 2346, 535, 376, 568, 1687, 1949, 534, 1744,
- /* 280 */ 219, 1657, 692, 697, 203, 745, 272, 56, 2516, 699,
- /* 290 */ 271, 694, 689, 682, 496, 450, 536, 464, 1687, 463,
- /* 300 */ 1606, 365, 498, 202, 2444, 2445, 304, 144, 2449, 1739,
- /* 310 */ 2364, 657, 476, 2364, 1684, 19, 1452, 51, 1773, 204,
- /* 320 */ 2444, 2445, 1665, 144, 2449, 2312, 68, 747, 3, 462,
- /* 330 */ 1443, 776, 775, 774, 1447, 773, 1449, 1450, 772, 769,
- /* 340 */ 54, 1458, 766, 1460, 1461, 763, 760, 757, 842, 385,
- /* 350 */ 1684, 15, 784, 161, 160, 781, 780, 779, 158, 98,
- /* 360 */ 484, 1987, 371, 2451, 1884, 397, 2345, 647, 304, 2383,
- /* 370 */ 2185, 691, 356, 2347, 751, 2349, 2350, 746, 744, 741,
- /* 380 */ 732, 2401, 1774, 1578, 1579, 575, 2265, 1746, 1747, 2448,
- /* 390 */ 2213, 2192, 1920, 523, 522, 521, 520, 515, 514, 513,
- /* 400 */ 512, 368, 304, 710, 146, 502, 501, 500, 499, 493,
- /* 410 */ 492, 491, 480, 486, 485, 383, 797, 731, 2088, 477,
- /* 420 */ 1546, 1547, 173, 454, 1719, 1729, 1565, 1577, 1580, 63,
- /* 430 */ 2027, 1745, 1748, 1297, 627, 626, 625, 137, 302, 1683,
- /* 440 */ 730, 617, 143, 621, 613, 2312, 1660, 620, 1658, 184,
- /* 450 */ 456, 452, 619, 624, 392, 391, 488, 2202, 618, 1684,
- /* 460 */ 302, 614, 37, 415, 1768, 1769, 1770, 1771, 1772, 1776,
- /* 470 */ 1777, 1778, 1779, 2207, 1558, 1559, 390, 389, 1663, 1664,
- /* 480 */ 1716, 799, 1718, 1721, 1722, 1723, 1724, 1725, 1726, 1727,
- /* 490 */ 1728, 743, 739, 1737, 1738, 1740, 1741, 1742, 1743, 2,
- /* 500 */ 12, 48, 46, 2346, 738, 221, 2135, 2136, 2322, 417,
- /* 510 */ 1720, 1659, 712, 201, 2444, 2445, 748, 144, 2449, 239,
- /* 520 */ 159, 1685, 2079, 568, 1744, 1949, 1657, 51, 12, 36,
- /* 530 */ 10, 2322, 2326, 95, 2346, 41, 40, 731, 2088, 47,
- /* 540 */ 45, 44, 43, 42, 2364, 2331, 63, 713, 388, 387,
- /* 550 */ 386, 610, 731, 2088, 1739, 2326, 2312, 470, 747, 2083,
- /* 560 */ 19, 627, 626, 625, 731, 2088, 1717, 1665, 617, 143,
- /* 570 */ 621, 693, 471, 612, 620, 2364, 2328, 611, 2519, 619,
- /* 580 */ 624, 392, 391, 2141, 490, 618, 741, 2312, 614, 747,
- /* 590 */ 398, 604, 603, 842, 304, 55, 15, 2345, 2139, 2328,
- /* 600 */ 2383, 2346, 786, 114, 2347, 751, 2349, 2350, 746, 741,
- /* 610 */ 741, 1317, 1318, 149, 748, 156, 2407, 2436, 9, 41,
- /* 620 */ 40, 413, 2432, 47, 45, 44, 43, 42, 2345, 654,
- /* 630 */ 1896, 2383, 1746, 1747, 114, 2347, 751, 2349, 2350, 746,
- /* 640 */ 2274, 741, 2364, 1822, 1487, 1488, 186, 657, 2436, 1684,
- /* 650 */ 518, 2202, 413, 2432, 2312, 127, 747, 1899, 126, 125,
- /* 660 */ 124, 123, 122, 121, 120, 119, 118, 1765, 422, 1719,
- /* 670 */ 1729, 2134, 2136, 1754, 2451, 2467, 1745, 1748, 127, 1684,
+ /* 0 */ 1922, 2323, 566, 2078, 467, 567, 1942, 14, 13, 466,
+ /* 10 */ 2176, 2306, 48, 46, 1819, 2331, 2521, 34, 412, 2516,
+ /* 20 */ 418, 1685, 1660, 41, 40, 2327, 171, 47, 45, 44,
+ /* 30 */ 43, 42, 2074, 646, 2091, 1745, 1985, 1658, 2520, 732,
+ /* 40 */ 2089, 699, 2517, 2519, 2516, 2347, 38, 321, 644, 583,
+ /* 50 */ 642, 270, 269, 2313, 674, 711, 146, 2516, 714, 137,
+ /* 60 */ 112, 674, 698, 203, 2516, 1740, 609, 2517, 700, 2329,
+ /* 70 */ 415, 19, 174, 2227, 1911, 2522, 203, 147, 1666, 742,
+ /* 80 */ 2517, 700, 2522, 203, 2227, 2081, 2365, 2517, 700, 41,
+ /* 90 */ 40, 2225, 719, 47, 45, 44, 43, 42, 2313, 411,
+ /* 100 */ 748, 586, 2224, 719, 843, 584, 2220, 15, 474, 818,
+ /* 110 */ 817, 816, 815, 430, 1788, 814, 813, 151, 808, 807,
+ /* 120 */ 806, 805, 804, 803, 802, 150, 796, 795, 794, 429,
+ /* 130 */ 428, 791, 790, 789, 183, 182, 788, 2065, 1315, 2346,
+ /* 140 */ 1314, 63, 2384, 1747, 1748, 114, 2348, 752, 2350, 2351,
+ /* 150 */ 747, 731, 742, 533, 531, 142, 367, 186, 574, 2437,
+ /* 160 */ 217, 567, 1942, 414, 2433, 301, 2445, 710, 571, 138,
+ /* 170 */ 709, 510, 2516, 1316, 568, 509, 184, 2142, 205, 2521,
+ /* 180 */ 1720, 1730, 2516, 508, 383, 657, 2467, 1746, 1749, 1861,
+ /* 190 */ 698, 203, 2140, 711, 146, 2517, 700, 1899, 385, 689,
+ /* 200 */ 2207, 2520, 1661, 63, 1659, 2517, 2518, 787, 196, 711,
+ /* 210 */ 146, 41, 40, 732, 2089, 47, 45, 44, 43, 42,
+ /* 220 */ 2129, 136, 135, 134, 133, 132, 131, 130, 129, 128,
+ /* 230 */ 731, 483, 2203, 208, 1664, 1665, 1717, 52, 1719, 1722,
+ /* 240 */ 1723, 1724, 1725, 1726, 1727, 1728, 1729, 744, 740, 1738,
+ /* 250 */ 1739, 1741, 1742, 1743, 1744, 2, 48, 46, 582, 2521,
+ /* 260 */ 1686, 365, 699, 1683, 418, 2516, 1660, 732, 2089, 99,
+ /* 270 */ 517, 238, 2347, 536, 377, 569, 1688, 1950, 535, 1745,
+ /* 280 */ 219, 1658, 693, 698, 203, 746, 273, 56, 2517, 700,
+ /* 290 */ 272, 695, 690, 683, 497, 451, 537, 465, 1688, 464,
+ /* 300 */ 1607, 366, 499, 202, 2445, 2446, 305, 144, 2450, 1740,
+ /* 310 */ 2365, 658, 477, 2365, 1685, 19, 1453, 51, 1774, 204,
+ /* 320 */ 2445, 2446, 1666, 144, 2450, 2313, 68, 748, 3, 463,
+ /* 330 */ 1444, 777, 776, 775, 1448, 774, 1450, 1451, 773, 770,
+ /* 340 */ 54, 1459, 767, 1461, 1462, 764, 761, 758, 843, 386,
+ /* 350 */ 1685, 15, 785, 161, 160, 782, 781, 780, 158, 98,
+ /* 360 */ 485, 1988, 372, 2452, 1885, 398, 2346, 648, 305, 2384,
+ /* 370 */ 2186, 692, 357, 2348, 752, 2350, 2351, 747, 745, 742,
+ /* 380 */ 733, 2402, 1775, 1579, 1580, 576, 2266, 1747, 1748, 2449,
+ /* 390 */ 2214, 2193, 1921, 524, 523, 522, 521, 516, 515, 514,
+ /* 400 */ 513, 369, 305, 711, 146, 503, 502, 501, 500, 494,
+ /* 410 */ 493, 492, 481, 487, 486, 384, 798, 732, 2089, 478,
+ /* 420 */ 1547, 1548, 173, 455, 1720, 1730, 1566, 1578, 1581, 63,
+ /* 430 */ 2028, 1746, 1749, 1298, 628, 627, 626, 137, 303, 1684,
+ /* 440 */ 731, 618, 143, 622, 614, 2313, 1661, 621, 1659, 184,
+ /* 450 */ 457, 453, 620, 625, 393, 392, 489, 2203, 619, 1685,
+ /* 460 */ 303, 615, 37, 416, 1769, 1770, 1771, 1772, 1773, 1777,
+ /* 470 */ 1778, 1779, 1780, 2208, 1559, 1560, 391, 390, 1664, 1665,
+ /* 480 */ 1717, 800, 1719, 1722, 1723, 1724, 1725, 1726, 1727, 1728,
+ /* 490 */ 1729, 744, 740, 1738, 1739, 1741, 1742, 1743, 1744, 2,
+ /* 500 */ 12, 48, 46, 2347, 739, 221, 2136, 2137, 2323, 418,
+ /* 510 */ 1721, 1660, 713, 201, 2445, 2446, 749, 144, 2450, 240,
+ /* 520 */ 159, 1686, 2080, 569, 1745, 1950, 1658, 51, 12, 36,
+ /* 530 */ 10, 2323, 2327, 95, 2347, 41, 40, 732, 2089, 47,
+ /* 540 */ 45, 44, 43, 42, 2365, 2332, 63, 714, 389, 388,
+ /* 550 */ 387, 611, 732, 2089, 1740, 2327, 2313, 471, 748, 2084,
+ /* 560 */ 19, 628, 627, 626, 732, 2089, 1718, 1666, 618, 143,
+ /* 570 */ 622, 694, 472, 613, 621, 2365, 2329, 612, 2520, 620,
+ /* 580 */ 625, 393, 392, 2142, 491, 619, 742, 2313, 615, 748,
+ /* 590 */ 399, 605, 604, 843, 305, 55, 15, 2346, 2140, 2329,
+ /* 600 */ 2384, 2347, 787, 114, 2348, 752, 2350, 2351, 747, 742,
+ /* 610 */ 742, 1318, 1319, 149, 749, 156, 2408, 2437, 9, 41,
+ /* 620 */ 40, 414, 2433, 47, 45, 44, 43, 42, 2346, 655,
+ /* 630 */ 1897, 2384, 1747, 1748, 114, 2348, 752, 2350, 2351, 747,
+ /* 640 */ 2275, 742, 2365, 1823, 1488, 1489, 186, 658, 2437, 1685,
+ /* 650 */ 519, 2203, 414, 2433, 2313, 127, 748, 1900, 126, 125,
+ /* 660 */ 124, 123, 122, 121, 120, 119, 118, 1766, 423, 1720,
+ /* 670 */ 1730, 2135, 2137, 1755, 2452, 2468, 1746, 1749, 127, 1685,
/* 680 */ 12, 126, 125, 124, 123, 122, 121, 120, 119, 118,
- /* 690 */ 672, 1660, 304, 1658, 274, 2345, 731, 2088, 2383, 226,
- /* 700 */ 2447, 114, 2347, 751, 2349, 2350, 746, 1919, 741, 432,
- /* 710 */ 420, 304, 777, 2411, 431, 2436, 503, 159, 171, 413,
- /* 720 */ 2432, 659, 2265, 1663, 1664, 1716, 2090, 1718, 1721, 1722,
- /* 730 */ 1723, 1724, 1725, 1726, 1727, 1728, 743, 739, 1737, 1738,
- /* 740 */ 1740, 1741, 1742, 1743, 2, 48, 46, 1749, 2346, 420,
- /* 750 */ 426, 425, 634, 417, 1407, 1659, 1841, 168, 423, 673,
- /* 760 */ 2312, 748, 2515, 1951, 399, 2090, 171, 646, 1744, 1406,
- /* 770 */ 1657, 1842, 2139, 2159, 2090, 1666, 731, 2088, 2346, 106,
- /* 780 */ 2521, 203, 95, 270, 1775, 2516, 699, 1716, 1314, 2364,
- /* 790 */ 1313, 748, 1622, 2474, 223, 2141, 504, 1688, 1739, 637,
- /* 800 */ 1395, 2312, 407, 747, 2081, 1891, 631, 629, 2084, 1720,
- /* 810 */ 2139, 1665, 1840, 267, 47, 45, 44, 43, 42, 2364,
- /* 820 */ 41, 40, 61, 1315, 47, 45, 44, 43, 42, 526,
- /* 830 */ 670, 2312, 1688, 747, 1688, 90, 537, 842, 89, 1720,
- /* 840 */ 49, 1397, 2345, 731, 2088, 2383, 2346, 1807, 114, 2347,
- /* 850 */ 751, 2349, 2350, 746, 72, 741, 1659, 71, 1665, 748,
- /* 860 */ 2535, 2487, 2436, 505, 35, 1717, 413, 2432, 701, 731,
- /* 870 */ 2088, 1657, 2345, 1849, 1780, 2383, 1746, 1747, 114, 2347,
- /* 880 */ 751, 2349, 2350, 746, 273, 741, 1918, 2364, 2065, 584,
- /* 890 */ 2535, 227, 2436, 2141, 562, 1717, 413, 2432, 1815, 2312,
- /* 900 */ 412, 747, 334, 560, 88, 2118, 556, 552, 2139, 1890,
- /* 910 */ 731, 2088, 1665, 1719, 1729, 525, 524, 1917, 325, 1411,
- /* 920 */ 1745, 1748, 685, 684, 1847, 1848, 1850, 1851, 1852, 2141,
- /* 930 */ 2085, 1295, 511, 510, 1410, 1660, 421, 1658, 842, 2312,
- /* 940 */ 2345, 612, 1669, 2383, 2139, 611, 114, 2347, 751, 2349,
- /* 950 */ 2350, 746, 1916, 741, 1915, 1293, 1294, 1914, 2535, 194,
- /* 960 */ 2436, 2075, 1627, 1628, 413, 2432, 2071, 1663, 1664, 1716,
- /* 970 */ 2312, 1718, 1721, 1722, 1723, 1724, 1725, 1726, 1727, 1728,
- /* 980 */ 743, 739, 1737, 1738, 1740, 1741, 1742, 1743, 2, 48,
- /* 990 */ 46, 2346, 606, 605, 199, 2063, 198, 417, 733, 1659,
- /* 1000 */ 2408, 539, 623, 622, 748, 2312, 680, 2312, 800, 2092,
- /* 1010 */ 2312, 2049, 1744, 1689, 1657, 41, 40, 731, 2088, 47,
- /* 1020 */ 45, 44, 43, 42, 784, 161, 160, 781, 780, 779,
- /* 1030 */ 158, 171, 2364, 44, 43, 42, 1660, 275, 1658, 2091,
- /* 1040 */ 30, 2451, 1739, 280, 2312, 1688, 747, 1913, 1689, 1684,
- /* 1050 */ 1689, 311, 312, 41, 40, 1665, 310, 47, 45, 44,
- /* 1060 */ 43, 42, 731, 2088, 1288, 1912, 2293, 2446, 1663, 1664,
- /* 1070 */ 41, 40, 1909, 2346, 47, 45, 44, 43, 42, 731,
- /* 1080 */ 2088, 842, 283, 1295, 49, 2345, 748, 148, 2383, 2346,
- /* 1090 */ 2407, 114, 2347, 751, 2349, 2350, 746, 2141, 741, 716,
- /* 1100 */ 2312, 702, 748, 2535, 2508, 2436, 1290, 1293, 1294, 413,
- /* 1110 */ 2432, 735, 717, 2408, 2364, 1861, 811, 809, 2312, 401,
- /* 1120 */ 1746, 1747, 2066, 731, 2088, 2312, 2312, 197, 747, 1908,
- /* 1130 */ 2364, 784, 161, 160, 781, 780, 779, 158, 742, 2141,
- /* 1140 */ 731, 2088, 2312, 315, 747, 76, 731, 2088, 2141, 731,
- /* 1150 */ 2088, 731, 2088, 1834, 726, 152, 1907, 1719, 1729, 778,
- /* 1160 */ 424, 1906, 2132, 2140, 1745, 1748, 728, 2345, 1814, 729,
- /* 1170 */ 2383, 321, 2028, 357, 2347, 751, 2349, 2350, 746, 1660,
- /* 1180 */ 741, 1658, 2312, 2345, 1905, 1904, 2383, 2456, 1807, 114,
- /* 1190 */ 2347, 751, 2349, 2350, 746, 1911, 741, 87, 2306, 1903,
- /* 1200 */ 652, 2535, 782, 2436, 1902, 2132, 1901, 413, 2432, 2312,
- /* 1210 */ 284, 1663, 1664, 1716, 2312, 1718, 1721, 1722, 1723, 1724,
- /* 1220 */ 1725, 1726, 1727, 1728, 743, 739, 1737, 1738, 1740, 1741,
- /* 1230 */ 1742, 1743, 2, 48, 46, 139, 783, 2312, 2312, 2132,
- /* 1240 */ 1971, 417, 615, 1659, 170, 1926, 837, 86, 673, 2296,
- /* 1250 */ 673, 2515, 2312, 2515, 100, 2346, 1744, 2312, 1657, 2312,
- /* 1260 */ 616, 1689, 628, 255, 260, 1717, 1392, 258, 748, 2521,
- /* 1270 */ 203, 2521, 203, 1969, 2516, 699, 2516, 699, 262, 178,
- /* 1280 */ 264, 261, 266, 263, 1390, 265, 1739, 1960, 602, 598,
- /* 1290 */ 594, 590, 1958, 254, 210, 630, 2364, 41, 40, 1665,
- /* 1300 */ 439, 47, 45, 44, 43, 42, 2480, 159, 2312, 632,
- /* 1310 */ 747, 649, 705, 648, 635, 50, 50, 2333, 172, 187,
- /* 1320 */ 1893, 1894, 1668, 340, 159, 842, 14, 13, 15, 50,
- /* 1330 */ 309, 75, 2346, 297, 96, 686, 1667, 252, 1350, 658,
- /* 1340 */ 338, 74, 157, 159, 73, 748, 66, 2455, 791, 2345,
- /* 1350 */ 792, 141, 2383, 50, 367, 175, 2347, 751, 2349, 2350,
- /* 1360 */ 746, 111, 741, 703, 1746, 1747, 235, 547, 545, 542,
- /* 1370 */ 108, 291, 1369, 2364, 1367, 2335, 2025, 714, 2365, 1351,
- /* 1380 */ 2024, 2211, 1625, 50, 1942, 2312, 2470, 747, 683, 673,
- /* 1390 */ 1846, 1845, 2515, 403, 289, 690, 400, 674, 2477, 715,
- /* 1400 */ 720, 1719, 1729, 242, 1575, 313, 723, 63, 1745, 1748,
- /* 1410 */ 2521, 203, 251, 244, 1948, 2516, 699, 317, 1437, 249,
- /* 1420 */ 579, 1781, 430, 1660, 2212, 1658, 2345, 673, 1730, 2383,
- /* 1430 */ 2515, 1952, 114, 2347, 751, 2349, 2350, 746, 241, 741,
- /* 1440 */ 755, 157, 2129, 159, 2535, 64, 2436, 140, 2521, 203,
- /* 1450 */ 413, 2432, 157, 2516, 699, 1663, 1664, 1716, 333, 1718,
- /* 1460 */ 1721, 1722, 1723, 1724, 1725, 1726, 1727, 1728, 743, 739,
- /* 1470 */ 1737, 1738, 1740, 1741, 1742, 1743, 2, 666, 2471, 296,
- /* 1480 */ 2481, 426, 425, 835, 2346, 711, 303, 299, 2050, 1671,
- /* 1490 */ 5, 1673, 438, 433, 84, 83, 469, 748, 380, 216,
- /* 1500 */ 446, 1692, 447, 1670, 1744, 458, 1666, 457, 212, 214,
- /* 1510 */ 460, 2346, 461, 459, 1599, 1465, 1469, 211, 1476, 328,
- /* 1520 */ 1682, 474, 1474, 363, 748, 2364, 448, 162, 1683, 445,
- /* 1530 */ 441, 437, 434, 462, 1739, 481, 225, 2312, 483, 747,
- /* 1540 */ 487, 489, 528, 506, 494, 517, 2204, 1665, 519, 527,
- /* 1550 */ 529, 540, 2364, 541, 538, 230, 543, 229, 544, 232,
- /* 1560 */ 546, 548, 1690, 563, 2312, 4, 747, 571, 564, 572,
- /* 1570 */ 574, 240, 304, 737, 92, 1685, 706, 243, 2345, 576,
- /* 1580 */ 2346, 2383, 1691, 577, 114, 2347, 751, 2349, 2350, 746,
- /* 1590 */ 1693, 741, 578, 748, 246, 1694, 2409, 580, 2436, 248,
- /* 1600 */ 93, 586, 413, 2432, 607, 2345, 2220, 94, 2383, 253,
- /* 1610 */ 360, 114, 2347, 751, 2349, 2350, 746, 609, 741, 638,
- /* 1620 */ 116, 2364, 639, 734, 2283, 2436, 2078, 651, 257, 413,
- /* 1630 */ 2432, 2074, 259, 2312, 653, 747, 164, 165, 2076, 2072,
- /* 1640 */ 97, 153, 166, 276, 167, 2280, 1686, 2279, 661, 329,
- /* 1650 */ 2266, 662, 660, 281, 279, 687, 2486, 721, 668, 665,
- /* 1660 */ 8, 667, 677, 2485, 696, 675, 404, 678, 676, 2458,
- /* 1670 */ 2538, 1674, 294, 1669, 2345, 290, 179, 2383, 707, 293,
- /* 1680 */ 115, 2347, 751, 2349, 2350, 746, 286, 741, 288, 295,
- /* 1690 */ 292, 2514, 704, 1807, 2436, 2346, 655, 145, 2435, 2432,
- /* 1700 */ 1687, 1812, 298, 1677, 1679, 2452, 1810, 1, 748, 719,
- /* 1710 */ 190, 305, 154, 2234, 845, 724, 155, 739, 1737, 1738,
- /* 1720 */ 1740, 1741, 1742, 1743, 2233, 2232, 330, 2346, 331, 409,
- /* 1730 */ 327, 725, 105, 2133, 2089, 332, 2364, 62, 107, 2417,
- /* 1740 */ 748, 206, 1272, 335, 753, 839, 193, 836, 2312, 841,
- /* 1750 */ 747, 323, 163, 372, 53, 833, 829, 825, 821, 359,
- /* 1760 */ 324, 373, 2346, 339, 2304, 337, 2303, 2302, 2364, 344,
- /* 1770 */ 81, 358, 348, 2297, 435, 748, 436, 1650, 1651, 209,
- /* 1780 */ 2312, 440, 747, 2295, 442, 443, 444, 1649, 2294, 2345,
- /* 1790 */ 381, 2292, 2383, 449, 2291, 115, 2347, 751, 2349, 2350,
- /* 1800 */ 746, 113, 741, 2364, 318, 451, 2290, 453, 2289, 2436,
- /* 1810 */ 1638, 455, 2270, 736, 2432, 2312, 213, 747, 2269, 215,
- /* 1820 */ 1602, 749, 82, 1601, 2383, 2247, 2246, 115, 2347, 751,
- /* 1830 */ 2349, 2350, 746, 2245, 741, 2346, 727, 467, 468, 2244,
- /* 1840 */ 2243, 2436, 2194, 2191, 472, 375, 2432, 1545, 748, 2190,
- /* 1850 */ 475, 2184, 479, 478, 2181, 2180, 2345, 2179, 2346, 2383,
- /* 1860 */ 218, 2178, 176, 2347, 751, 2349, 2350, 746, 85, 741,
- /* 1870 */ 2183, 748, 2182, 220, 2177, 2176, 2364, 2174, 2346, 307,
- /* 1880 */ 222, 495, 2171, 497, 2169, 2168, 306, 2173, 2312, 2172,
- /* 1890 */ 747, 748, 2167, 2346, 2166, 2189, 2165, 2164, 2163, 2364,
- /* 1900 */ 2187, 2170, 2162, 2161, 2160, 277, 748, 2158, 2157, 2156,
- /* 1910 */ 2155, 2312, 2154, 747, 224, 2152, 700, 2536, 2153, 2364,
- /* 1920 */ 2151, 91, 2150, 2149, 402, 2188, 2186, 2148, 2147, 2345,
- /* 1930 */ 2146, 2312, 2383, 747, 2364, 115, 2347, 751, 2349, 2350,
- /* 1940 */ 746, 1551, 741, 2145, 228, 2144, 2312, 531, 747, 2436,
- /* 1950 */ 533, 2143, 2345, 2142, 2433, 2383, 1408, 1412, 175, 2347,
- /* 1960 */ 751, 2349, 2350, 746, 1990, 741, 369, 370, 1404, 1989,
- /* 1970 */ 231, 233, 2345, 1988, 1986, 2383, 234, 1983, 357, 2347,
- /* 1980 */ 751, 2349, 2350, 746, 549, 741, 551, 2345, 1982, 2346,
- /* 1990 */ 2383, 550, 553, 350, 2347, 751, 2349, 2350, 746, 554,
- /* 2000 */ 741, 2478, 748, 555, 1975, 557, 1962, 558, 559, 561,
- /* 2010 */ 1937, 185, 236, 78, 2332, 1296, 1936, 2268, 79, 195,
- /* 2020 */ 2264, 2254, 238, 2242, 569, 2346, 245, 247, 2241, 250,
- /* 2030 */ 2364, 2218, 2067, 1985, 1343, 1981, 587, 588, 748, 695,
- /* 2040 */ 589, 1979, 2312, 592, 747, 591, 1977, 593, 595, 597,
- /* 2050 */ 1974, 596, 599, 600, 601, 1957, 1955, 2346, 1956, 1954,
- /* 2060 */ 1933, 2069, 1481, 256, 65, 1480, 2364, 1394, 1972, 1380,
- /* 2070 */ 745, 408, 2068, 1393, 1391, 1389, 1388, 1387, 2312, 1386,
- /* 2080 */ 747, 1385, 808, 2345, 810, 1382, 2383, 393, 1970, 176,
- /* 2090 */ 2347, 751, 2349, 2350, 746, 394, 741, 1961, 2364, 1381,
- /* 2100 */ 1379, 395, 1959, 396, 1932, 633, 636, 1931, 1930, 1929,
- /* 2110 */ 2312, 640, 747, 642, 1928, 644, 117, 1632, 2267, 2345,
- /* 2120 */ 1634, 1631, 2383, 57, 278, 357, 2347, 751, 2349, 2350,
- /* 2130 */ 746, 29, 741, 69, 2346, 1636, 2263, 1608, 1612, 58,
- /* 2140 */ 2253, 1610, 663, 169, 2537, 664, 2240, 748, 2239, 669,
- /* 2150 */ 2346, 2345, 2520, 1863, 2383, 20, 17, 356, 2347, 751,
- /* 2160 */ 2349, 2350, 746, 748, 741, 1587, 2402, 282, 2346, 1586,
- /* 2170 */ 671, 31, 21, 285, 6, 2364, 679, 7, 287, 200,
- /* 2180 */ 416, 748, 2333, 22, 177, 681, 1844, 2312, 189, 747,
- /* 2190 */ 33, 2364, 188, 32, 67, 24, 418, 1833, 80, 2238,
- /* 2200 */ 1883, 23, 1884, 2312, 1878, 747, 1877, 405, 1882, 2364,
- /* 2210 */ 18, 1881, 406, 1804, 1803, 301, 59, 60, 2217, 101,
- /* 2220 */ 102, 2312, 180, 747, 25, 2216, 108, 103, 2345, 308,
- /* 2230 */ 191, 2383, 314, 2346, 357, 2347, 751, 2349, 2350, 746,
- /* 2240 */ 1839, 741, 70, 722, 2345, 104, 748, 2383, 26, 319,
- /* 2250 */ 357, 2347, 751, 2349, 2350, 746, 1756, 741, 1755, 13,
- /* 2260 */ 11, 1675, 650, 1766, 1734, 2383, 2386, 2346, 352, 2347,
- /* 2270 */ 751, 2349, 2350, 746, 2364, 741, 1732, 181, 192, 316,
- /* 2280 */ 748, 1709, 752, 740, 39, 754, 2312, 1731, 747, 1701,
- /* 2290 */ 2346, 750, 1457, 16, 27, 28, 1341, 1466, 419, 756,
- /* 2300 */ 758, 1463, 759, 748, 1462, 761, 1459, 764, 2364, 762,
- /* 2310 */ 765, 767, 1453, 768, 770, 1451, 771, 109, 1456, 322,
- /* 2320 */ 2312, 110, 747, 77, 1475, 1455, 1471, 2345, 1376, 1454,
- /* 2330 */ 2383, 2364, 1373, 342, 2347, 751, 2349, 2350, 746, 1372,
- /* 2340 */ 741, 207, 785, 2312, 1371, 747, 1370, 2346, 1368, 1366,
- /* 2350 */ 1365, 1364, 796, 798, 1402, 1362, 1401, 1361, 1360, 1359,
- /* 2360 */ 748, 2345, 1358, 1357, 2383, 1356, 1398, 341, 2347, 751,
- /* 2370 */ 2349, 2350, 746, 1396, 741, 1353, 1352, 1349, 1348, 1347,
- /* 2380 */ 1346, 1980, 818, 819, 2345, 823, 820, 2383, 2364, 1978,
- /* 2390 */ 343, 2347, 751, 2349, 2350, 746, 822, 741, 824, 1976,
- /* 2400 */ 2312, 826, 747, 827, 828, 1973, 830, 832, 1953, 831,
- /* 2410 */ 834, 1285, 1927, 1273, 326, 838, 840, 1897, 1661, 336,
- /* 2420 */ 2346, 843, 844, 1897, 1897, 1897, 1897, 1897, 1897, 1897,
- /* 2430 */ 1897, 1897, 1897, 748, 1897, 1897, 1897, 1897, 1897, 1897,
- /* 2440 */ 2346, 2345, 1897, 1897, 2383, 1897, 1897, 349, 2347, 751,
- /* 2450 */ 2349, 2350, 746, 748, 741, 1897, 1897, 1897, 1897, 1897,
- /* 2460 */ 1897, 2364, 1897, 1897, 1897, 1897, 1897, 1897, 1897, 1897,
- /* 2470 */ 1897, 1897, 1897, 2312, 1897, 747, 1897, 1897, 1897, 1897,
- /* 2480 */ 1897, 2364, 1897, 1897, 1897, 1897, 1897, 1897, 1897, 1897,
- /* 2490 */ 1897, 1897, 1897, 2312, 1897, 747, 1897, 1897, 2346, 1897,
- /* 2500 */ 1897, 1897, 1897, 1897, 1897, 1897, 1897, 1897, 1897, 1897,
- /* 2510 */ 1897, 748, 1897, 2346, 2345, 1897, 1897, 2383, 1897, 1897,
- /* 2520 */ 353, 2347, 751, 2349, 2350, 746, 748, 741, 1897, 1897,
- /* 2530 */ 1897, 1897, 1897, 1897, 2345, 2346, 1897, 2383, 1897, 2364,
- /* 2540 */ 345, 2347, 751, 2349, 2350, 746, 1897, 741, 748, 1897,
- /* 2550 */ 1897, 2312, 1897, 747, 2364, 1897, 1897, 1897, 1897, 1897,
- /* 2560 */ 1897, 1897, 1897, 1897, 1897, 1897, 2312, 1897, 747, 1897,
- /* 2570 */ 1897, 1897, 1897, 1897, 1897, 1897, 2364, 1897, 1897, 1897,
- /* 2580 */ 1897, 1897, 1897, 1897, 1897, 1897, 1897, 1897, 2312, 1897,
- /* 2590 */ 747, 1897, 2345, 2346, 1897, 2383, 1897, 1897, 354, 2347,
- /* 2600 */ 751, 2349, 2350, 746, 1897, 741, 748, 2345, 2346, 1897,
- /* 2610 */ 2383, 1897, 1897, 346, 2347, 751, 2349, 2350, 746, 1897,
- /* 2620 */ 741, 748, 1897, 1897, 1897, 1897, 1897, 1897, 2346, 2345,
- /* 2630 */ 1897, 1897, 2383, 1897, 2364, 355, 2347, 751, 2349, 2350,
- /* 2640 */ 746, 748, 741, 1897, 1897, 1897, 2312, 1897, 747, 2364,
- /* 2650 */ 1897, 1897, 1897, 1897, 1897, 1897, 1897, 1897, 1897, 1897,
- /* 2660 */ 1897, 2312, 1897, 747, 1897, 1897, 1897, 1897, 1897, 2364,
- /* 2670 */ 1897, 1897, 1897, 1897, 1897, 1897, 1897, 1897, 1897, 1897,
- /* 2680 */ 1897, 2312, 1897, 747, 1897, 1897, 1897, 2345, 1897, 1897,
- /* 2690 */ 2383, 1897, 1897, 347, 2347, 751, 2349, 2350, 746, 1897,
- /* 2700 */ 741, 2346, 2345, 1897, 1897, 2383, 1897, 1897, 361, 2347,
- /* 2710 */ 751, 2349, 2350, 746, 748, 741, 1897, 1897, 1897, 1897,
- /* 2720 */ 1897, 2346, 2345, 1897, 1897, 2383, 1897, 1897, 362, 2347,
- /* 2730 */ 751, 2349, 2350, 746, 748, 741, 1897, 1897, 2346, 1897,
- /* 2740 */ 1897, 1897, 2364, 1897, 1897, 1897, 1897, 1897, 1897, 1897,
- /* 2750 */ 1897, 748, 1897, 1897, 2312, 1897, 747, 1897, 1897, 1897,
- /* 2760 */ 1897, 1897, 2364, 1897, 1897, 1897, 1897, 1897, 1897, 1897,
- /* 2770 */ 1897, 1897, 1897, 1897, 2312, 1897, 747, 1897, 1897, 2364,
- /* 2780 */ 1897, 1897, 1897, 1897, 1897, 1897, 1897, 1897, 1897, 1897,
- /* 2790 */ 1897, 2312, 1897, 747, 1897, 2345, 1897, 1897, 2383, 1897,
- /* 2800 */ 1897, 2358, 2347, 751, 2349, 2350, 746, 2346, 741, 1897,
- /* 2810 */ 1897, 1897, 1897, 1897, 1897, 2345, 1897, 1897, 2383, 1897,
- /* 2820 */ 748, 2357, 2347, 751, 2349, 2350, 746, 1897, 741, 1897,
- /* 2830 */ 1897, 1897, 2345, 1897, 1897, 2383, 1897, 1897, 2356, 2347,
- /* 2840 */ 751, 2349, 2350, 746, 1897, 741, 1897, 1897, 2364, 1897,
- /* 2850 */ 1897, 1897, 1897, 1897, 1897, 1897, 1897, 1897, 1897, 1897,
- /* 2860 */ 2312, 1897, 747, 1897, 1897, 2346, 1897, 1897, 1897, 1897,
- /* 2870 */ 1897, 1897, 1897, 1897, 1897, 1897, 1897, 1897, 748, 1897,
- /* 2880 */ 2346, 1897, 1897, 1897, 1897, 1897, 1897, 1897, 1897, 1897,
- /* 2890 */ 1897, 1897, 1897, 748, 1897, 1897, 1897, 1897, 1897, 1897,
- /* 2900 */ 1897, 2345, 2346, 1897, 2383, 1897, 2364, 377, 2347, 751,
- /* 2910 */ 2349, 2350, 746, 1897, 741, 748, 1897, 1897, 2312, 1897,
- /* 2920 */ 747, 2364, 1897, 1897, 1897, 1897, 1897, 1897, 1897, 1897,
- /* 2930 */ 1897, 1897, 1897, 2312, 1897, 747, 1897, 1897, 1897, 1897,
- /* 2940 */ 1897, 1897, 1897, 2364, 1897, 1897, 1897, 1897, 1897, 1897,
- /* 2950 */ 1897, 1897, 1897, 1897, 1897, 2312, 1897, 747, 1897, 2345,
- /* 2960 */ 2346, 1897, 2383, 1897, 1897, 378, 2347, 751, 2349, 2350,
- /* 2970 */ 746, 1897, 741, 748, 2345, 2346, 1897, 2383, 1897, 1897,
- /* 2980 */ 374, 2347, 751, 2349, 2350, 746, 1897, 741, 748, 1897,
- /* 2990 */ 1897, 1897, 1897, 1897, 1897, 1897, 2345, 1897, 1897, 2383,
- /* 3000 */ 1897, 2364, 379, 2347, 751, 2349, 2350, 746, 1897, 741,
- /* 3010 */ 1897, 1897, 1897, 2312, 1897, 747, 2364, 1897, 1897, 1897,
- /* 3020 */ 1897, 1897, 1897, 1897, 1897, 1897, 1897, 1897, 2312, 1897,
- /* 3030 */ 747, 1897, 1897, 1897, 1897, 1897, 1897, 1897, 1897, 1897,
- /* 3040 */ 1897, 1897, 1897, 1897, 1897, 1897, 1897, 1897, 1897, 1897,
- /* 3050 */ 1897, 1897, 1897, 1897, 749, 1897, 1897, 2383, 1897, 1897,
- /* 3060 */ 352, 2347, 751, 2349, 2350, 746, 1897, 741, 1897, 2345,
- /* 3070 */ 1897, 1897, 2383, 1897, 1897, 351, 2347, 751, 2349, 2350,
- /* 3080 */ 746, 1897, 741,
+ /* 690 */ 673, 1661, 305, 1659, 275, 2346, 732, 2089, 2384, 226,
+ /* 700 */ 2448, 114, 2348, 752, 2350, 2351, 747, 1920, 742, 433,
+ /* 710 */ 421, 305, 778, 2412, 432, 2437, 504, 159, 171, 414,
+ /* 720 */ 2433, 660, 2266, 1664, 1665, 1717, 2091, 1719, 1722, 1723,
+ /* 730 */ 1724, 1725, 1726, 1727, 1728, 1729, 744, 740, 1738, 1739,
+ /* 740 */ 1741, 1742, 1743, 1744, 2, 48, 46, 1750, 2347, 421,
+ /* 750 */ 427, 426, 635, 418, 1408, 1660, 1842, 168, 424, 674,
+ /* 760 */ 2313, 749, 2516, 1952, 400, 2091, 171, 647, 1745, 1407,
+ /* 770 */ 1658, 1843, 2140, 2160, 2091, 1667, 732, 2089, 2347, 106,
+ /* 780 */ 2522, 203, 95, 271, 1776, 2517, 700, 1717, 1315, 2365,
+ /* 790 */ 1314, 749, 1623, 2475, 223, 2142, 505, 1689, 1740, 638,
+ /* 800 */ 1396, 2313, 408, 748, 2082, 1892, 632, 630, 2085, 1721,
+ /* 810 */ 2140, 1666, 1841, 268, 47, 45, 44, 43, 42, 2365,
+ /* 820 */ 41, 40, 61, 1316, 47, 45, 44, 43, 42, 527,
+ /* 830 */ 671, 2313, 1689, 748, 1689, 90, 538, 843, 89, 1721,
+ /* 840 */ 49, 1398, 2346, 732, 2089, 2384, 2347, 1808, 114, 2348,
+ /* 850 */ 752, 2350, 2351, 747, 72, 742, 1660, 71, 1666, 749,
+ /* 860 */ 2536, 2488, 2437, 506, 35, 1718, 414, 2433, 702, 732,
+ /* 870 */ 2089, 1658, 2346, 1850, 1781, 2384, 1747, 1748, 114, 2348,
+ /* 880 */ 752, 2350, 2351, 747, 274, 742, 1919, 2365, 2066, 585,
+ /* 890 */ 2536, 228, 2437, 2142, 563, 1718, 414, 2433, 1816, 2313,
+ /* 900 */ 413, 748, 335, 561, 88, 2119, 557, 553, 2140, 1891,
+ /* 910 */ 732, 2089, 1666, 1720, 1730, 526, 227, 1918, 326, 1412,
+ /* 920 */ 1746, 1749, 686, 685, 1848, 1849, 1851, 1852, 1853, 2142,
+ /* 930 */ 2086, 1296, 512, 511, 1411, 1661, 422, 1659, 843, 2313,
+ /* 940 */ 2346, 613, 1670, 2384, 2140, 612, 114, 2348, 752, 2350,
+ /* 950 */ 2351, 747, 1917, 742, 1916, 1294, 1295, 1915, 2536, 194,
+ /* 960 */ 2437, 2076, 1628, 1629, 414, 2433, 2072, 1664, 1665, 1717,
+ /* 970 */ 2313, 1719, 1722, 1723, 1724, 1725, 1726, 1727, 1728, 1729,
+ /* 980 */ 744, 740, 1738, 1739, 1741, 1742, 1743, 1744, 2, 48,
+ /* 990 */ 46, 2347, 607, 606, 199, 2064, 198, 418, 734, 1660,
+ /* 1000 */ 2409, 540, 624, 623, 749, 2313, 681, 2313, 801, 2093,
+ /* 1010 */ 2313, 2050, 1745, 1690, 1658, 41, 40, 732, 2089, 47,
+ /* 1020 */ 45, 44, 43, 42, 785, 161, 160, 782, 781, 780,
+ /* 1030 */ 158, 171, 2365, 44, 43, 42, 1661, 276, 1659, 2092,
+ /* 1040 */ 30, 2452, 1740, 281, 2313, 1689, 748, 1914, 1690, 1685,
+ /* 1050 */ 1690, 312, 313, 41, 40, 1666, 311, 47, 45, 44,
+ /* 1060 */ 43, 42, 732, 2089, 1289, 1913, 2294, 2447, 1664, 1665,
+ /* 1070 */ 41, 40, 1910, 2347, 47, 45, 44, 43, 42, 732,
+ /* 1080 */ 2089, 843, 284, 1296, 49, 2346, 749, 148, 2384, 2347,
+ /* 1090 */ 2408, 114, 2348, 752, 2350, 2351, 747, 2142, 742, 717,
+ /* 1100 */ 2313, 703, 749, 2536, 2509, 2437, 1291, 1294, 1295, 414,
+ /* 1110 */ 2433, 736, 718, 2409, 2365, 1862, 812, 810, 2313, 402,
+ /* 1120 */ 1747, 1748, 2067, 732, 2089, 2313, 2313, 197, 748, 1909,
+ /* 1130 */ 2365, 785, 161, 160, 782, 781, 780, 158, 743, 2142,
+ /* 1140 */ 732, 2089, 2313, 316, 748, 76, 732, 2089, 2142, 732,
+ /* 1150 */ 2089, 732, 2089, 1835, 727, 152, 1908, 1720, 1730, 779,
+ /* 1160 */ 425, 1907, 2133, 2141, 1746, 1749, 729, 2346, 1815, 730,
+ /* 1170 */ 2384, 322, 2029, 358, 2348, 752, 2350, 2351, 747, 1661,
+ /* 1180 */ 742, 1659, 2313, 2346, 1906, 1905, 2384, 2457, 1808, 114,
+ /* 1190 */ 2348, 752, 2350, 2351, 747, 1912, 742, 87, 2307, 1904,
+ /* 1200 */ 653, 2536, 783, 2437, 1903, 2133, 1902, 414, 2433, 2313,
+ /* 1210 */ 285, 1664, 1665, 1717, 2313, 1719, 1722, 1723, 1724, 1725,
+ /* 1220 */ 1726, 1727, 1728, 1729, 744, 740, 1738, 1739, 1741, 1742,
+ /* 1230 */ 1743, 1744, 2, 48, 46, 139, 784, 2313, 2313, 2133,
+ /* 1240 */ 1972, 418, 616, 1660, 170, 1927, 838, 86, 674, 2297,
+ /* 1250 */ 674, 2516, 2313, 2516, 100, 2347, 1745, 2313, 1658, 2313,
+ /* 1260 */ 617, 1690, 629, 256, 261, 1718, 1393, 259, 749, 2522,
+ /* 1270 */ 203, 2522, 203, 1970, 2517, 700, 2517, 700, 263, 178,
+ /* 1280 */ 265, 262, 267, 264, 1391, 266, 1740, 1961, 603, 599,
+ /* 1290 */ 595, 591, 1959, 255, 210, 631, 2365, 41, 40, 1666,
+ /* 1300 */ 440, 47, 45, 44, 43, 42, 2481, 159, 2313, 633,
+ /* 1310 */ 748, 650, 706, 649, 636, 50, 50, 2334, 172, 187,
+ /* 1320 */ 1894, 1895, 1669, 341, 159, 843, 14, 13, 15, 50,
+ /* 1330 */ 310, 75, 2347, 298, 96, 687, 1668, 253, 1351, 659,
+ /* 1340 */ 339, 74, 157, 159, 73, 749, 66, 2456, 792, 2346,
+ /* 1350 */ 793, 141, 2384, 50, 368, 175, 2348, 752, 2350, 2351,
+ /* 1360 */ 747, 111, 742, 704, 1747, 1748, 236, 548, 546, 543,
+ /* 1370 */ 108, 292, 1370, 2365, 1368, 2336, 2026, 715, 2366, 1352,
+ /* 1380 */ 2025, 2212, 1626, 50, 1943, 2313, 2471, 748, 684, 674,
+ /* 1390 */ 1847, 1846, 2516, 404, 290, 691, 401, 675, 2478, 716,
+ /* 1400 */ 721, 1720, 1730, 243, 1576, 314, 724, 63, 1746, 1749,
+ /* 1410 */ 2522, 203, 252, 245, 1949, 2517, 700, 318, 1438, 250,
+ /* 1420 */ 580, 1782, 431, 1661, 2213, 1659, 2346, 674, 1731, 2384,
+ /* 1430 */ 2516, 1953, 114, 2348, 752, 2350, 2351, 747, 242, 742,
+ /* 1440 */ 756, 157, 2130, 159, 2536, 64, 2437, 140, 2522, 203,
+ /* 1450 */ 414, 2433, 157, 2517, 700, 1664, 1665, 1717, 334, 1719,
+ /* 1460 */ 1722, 1723, 1724, 1725, 1726, 1727, 1728, 1729, 744, 740,
+ /* 1470 */ 1738, 1739, 1741, 1742, 1743, 1744, 2, 667, 2472, 297,
+ /* 1480 */ 2482, 427, 426, 836, 2347, 712, 304, 300, 2051, 1672,
+ /* 1490 */ 5, 1674, 439, 434, 84, 83, 470, 749, 381, 216,
+ /* 1500 */ 447, 1693, 448, 1671, 1745, 459, 1667, 458, 212, 214,
+ /* 1510 */ 461, 2347, 462, 460, 1600, 1466, 1470, 211, 1477, 329,
+ /* 1520 */ 1683, 475, 1475, 364, 749, 2365, 449, 162, 1684, 446,
+ /* 1530 */ 442, 438, 435, 463, 1740, 482, 225, 2313, 484, 748,
+ /* 1540 */ 488, 490, 529, 507, 495, 518, 2205, 1666, 520, 525,
+ /* 1550 */ 528, 530, 2365, 541, 542, 539, 231, 230, 544, 545,
+ /* 1560 */ 233, 547, 549, 1691, 2313, 564, 748, 4, 565, 572,
+ /* 1570 */ 573, 575, 305, 738, 241, 92, 707, 1686, 2346, 577,
+ /* 1580 */ 2347, 2384, 1692, 244, 114, 2348, 752, 2350, 2351, 747,
+ /* 1590 */ 578, 742, 1694, 749, 579, 1695, 2410, 581, 2437, 247,
+ /* 1600 */ 249, 587, 414, 2433, 2221, 2346, 93, 94, 2384, 254,
+ /* 1610 */ 608, 114, 2348, 752, 2350, 2351, 747, 639, 742, 640,
+ /* 1620 */ 116, 2365, 361, 735, 2284, 2437, 2281, 652, 610, 414,
+ /* 1630 */ 2433, 2079, 258, 2313, 654, 748, 2075, 260, 164, 165,
+ /* 1640 */ 2077, 97, 2073, 277, 166, 167, 153, 2280, 1687, 282,
+ /* 1650 */ 662, 330, 2267, 661, 663, 688, 280, 2487, 669, 722,
+ /* 1660 */ 8, 666, 678, 2486, 697, 676, 405, 679, 2459, 668,
+ /* 1670 */ 677, 1675, 2539, 1670, 2346, 179, 291, 2384, 708, 293,
+ /* 1680 */ 115, 2348, 752, 2350, 2351, 747, 287, 742, 296, 289,
+ /* 1690 */ 2515, 705, 294, 1808, 2437, 2347, 656, 299, 2436, 2433,
+ /* 1700 */ 295, 1688, 145, 1678, 1680, 1813, 1811, 1, 749, 2453,
+ /* 1710 */ 190, 306, 154, 720, 846, 725, 155, 740, 1738, 1739,
+ /* 1720 */ 1741, 1742, 1743, 1744, 2235, 2234, 331, 2347, 2233, 332,
+ /* 1730 */ 328, 726, 410, 105, 2090, 333, 2365, 62, 107, 2418,
+ /* 1740 */ 749, 336, 206, 324, 754, 1273, 193, 2134, 2313, 840,
+ /* 1750 */ 748, 837, 163, 842, 53, 834, 830, 826, 822, 360,
+ /* 1760 */ 325, 338, 2347, 373, 340, 345, 2305, 2304, 2365, 359,
+ /* 1770 */ 2303, 349, 374, 81, 2298, 749, 436, 437, 1651, 1652,
+ /* 1780 */ 2313, 209, 748, 441, 2296, 443, 444, 445, 1650, 2346,
+ /* 1790 */ 2295, 382, 2384, 2293, 450, 115, 2348, 752, 2350, 2351,
+ /* 1800 */ 747, 113, 742, 2365, 319, 2292, 452, 2291, 454, 2437,
+ /* 1810 */ 2290, 1639, 456, 737, 2433, 2313, 2271, 748, 213, 2270,
+ /* 1820 */ 215, 750, 82, 1603, 2384, 1602, 2248, 115, 2348, 752,
+ /* 1830 */ 2350, 2351, 747, 2247, 742, 2347, 728, 2246, 468, 469,
+ /* 1840 */ 2245, 2437, 2244, 473, 2195, 376, 2433, 1546, 749, 2192,
+ /* 1850 */ 476, 2191, 2185, 480, 479, 2182, 2346, 218, 2347, 2384,
+ /* 1860 */ 2181, 2180, 176, 2348, 752, 2350, 2351, 747, 85, 742,
+ /* 1870 */ 2179, 749, 2184, 220, 2183, 2178, 2365, 2177, 2347, 308,
+ /* 1880 */ 222, 496, 2172, 498, 2170, 2169, 307, 2175, 2313, 2174,
+ /* 1890 */ 748, 749, 2173, 2347, 2168, 2167, 2190, 2166, 2165, 2365,
+ /* 1900 */ 2164, 2188, 2171, 2163, 2162, 278, 749, 2161, 2159, 2158,
+ /* 1910 */ 2157, 2313, 2156, 748, 224, 2153, 701, 2537, 2155, 2365,
+ /* 1920 */ 2154, 91, 2152, 2151, 403, 2150, 2189, 2187, 2149, 2346,
+ /* 1930 */ 2148, 2313, 2384, 748, 2365, 115, 2348, 752, 2350, 2351,
+ /* 1940 */ 747, 1552, 742, 2147, 229, 2146, 2313, 532, 748, 2437,
+ /* 1950 */ 2145, 2144, 2346, 2143, 2434, 2384, 1409, 534, 175, 2348,
+ /* 1960 */ 752, 2350, 2351, 747, 1413, 742, 370, 371, 1991, 1405,
+ /* 1970 */ 232, 1990, 2346, 1989, 1987, 2384, 234, 1984, 358, 2348,
+ /* 1980 */ 752, 2350, 2351, 747, 550, 742, 235, 2346, 552, 2347,
+ /* 1990 */ 2384, 551, 1983, 351, 2348, 752, 2350, 2351, 747, 554,
+ /* 2000 */ 742, 2479, 749, 555, 1976, 556, 558, 559, 560, 1963,
+ /* 2010 */ 1938, 185, 562, 2333, 78, 237, 195, 1297, 1937, 239,
+ /* 2020 */ 2269, 2265, 79, 2255, 2243, 2347, 246, 248, 570, 2242,
+ /* 2030 */ 2365, 251, 2219, 2068, 1986, 1982, 588, 1344, 749, 696,
+ /* 2040 */ 589, 1980, 2313, 590, 748, 592, 593, 594, 1978, 596,
+ /* 2050 */ 1975, 597, 600, 598, 1958, 602, 1956, 2347, 601, 1957,
+ /* 2060 */ 1955, 1934, 2070, 65, 1482, 1481, 2365, 257, 2069, 1381,
+ /* 2070 */ 746, 409, 1973, 1395, 1394, 1392, 1390, 1389, 2313, 1388,
+ /* 2080 */ 748, 1387, 1386, 2346, 809, 811, 2384, 394, 1971, 176,
+ /* 2090 */ 2348, 752, 2350, 2351, 747, 1383, 742, 395, 2365, 1962,
+ /* 2100 */ 1382, 1380, 396, 1960, 397, 1933, 634, 637, 1932, 1931,
+ /* 2110 */ 2313, 641, 748, 1930, 643, 1929, 645, 117, 1633, 2346,
+ /* 2120 */ 1635, 1632, 2384, 2268, 1637, 358, 2348, 752, 2350, 2351,
+ /* 2130 */ 747, 57, 742, 29, 2347, 69, 2264, 58, 1613, 279,
+ /* 2140 */ 1611, 1609, 2254, 169, 2538, 283, 664, 749, 2241, 2240,
+ /* 2150 */ 2347, 2346, 20, 2521, 2384, 17, 31, 357, 2348, 752,
+ /* 2160 */ 2350, 2351, 747, 749, 742, 665, 2403, 1588, 2347, 1587,
+ /* 2170 */ 670, 6, 7, 21, 1864, 2365, 286, 672, 680, 682,
+ /* 2180 */ 417, 749, 200, 2334, 22, 189, 288, 2313, 33, 748,
+ /* 2190 */ 23, 2365, 67, 1845, 1834, 24, 419, 1884, 177, 188,
+ /* 2200 */ 32, 18, 80, 2313, 1885, 748, 1879, 1878, 406, 2365,
+ /* 2210 */ 1883, 1882, 407, 302, 1805, 1804, 60, 180, 2239, 2218,
+ /* 2220 */ 102, 2313, 309, 748, 101, 2217, 103, 59, 2346, 320,
+ /* 2230 */ 317, 2384, 25, 2347, 358, 2348, 752, 2350, 2351, 747,
+ /* 2240 */ 1840, 742, 191, 723, 2346, 315, 749, 2384, 70, 26,
+ /* 2250 */ 358, 2348, 752, 2350, 2351, 747, 13, 742, 1676, 108,
+ /* 2260 */ 104, 1757, 651, 11, 1756, 2384, 1735, 2347, 353, 2348,
+ /* 2270 */ 752, 2350, 2351, 747, 2365, 742, 181, 192, 1710, 2387,
+ /* 2280 */ 749, 755, 753, 741, 420, 1733, 2313, 1732, 748, 1767,
+ /* 2290 */ 2347, 1458, 39, 16, 27, 759, 1702, 28, 762, 1467,
+ /* 2300 */ 757, 765, 1464, 749, 760, 768, 1463, 763, 2365, 1460,
+ /* 2310 */ 766, 771, 1454, 769, 323, 1452, 751, 772, 1472, 109,
+ /* 2320 */ 2313, 110, 748, 1457, 1456, 1476, 1377, 2346, 77, 1342,
+ /* 2330 */ 2384, 2365, 1374, 343, 2348, 752, 2350, 2351, 747, 1455,
+ /* 2340 */ 742, 786, 1373, 2313, 1372, 748, 1371, 2347, 1369, 1367,
+ /* 2350 */ 1366, 1365, 797, 799, 1403, 1402, 207, 1363, 1362, 1361,
+ /* 2360 */ 749, 2346, 1360, 1359, 2384, 1358, 1357, 342, 2348, 752,
+ /* 2370 */ 2350, 2351, 747, 1397, 742, 1399, 1354, 1348, 1353, 1350,
+ /* 2380 */ 1349, 1347, 1981, 819, 2346, 820, 1979, 2384, 2365, 821,
+ /* 2390 */ 344, 2348, 752, 2350, 2351, 747, 823, 742, 825, 1977,
+ /* 2400 */ 2313, 824, 748, 827, 828, 829, 1974, 831, 832, 833,
+ /* 2410 */ 1954, 835, 1286, 1928, 1274, 327, 839, 841, 845, 1662,
+ /* 2420 */ 2347, 1898, 337, 844, 1898, 1898, 1898, 1898, 1898, 1898,
+ /* 2430 */ 1898, 1898, 1898, 749, 1898, 1898, 1898, 1898, 1898, 1898,
+ /* 2440 */ 2347, 2346, 1898, 1898, 2384, 1898, 1898, 350, 2348, 752,
+ /* 2450 */ 2350, 2351, 747, 749, 742, 1898, 1898, 1898, 1898, 1898,
+ /* 2460 */ 1898, 2365, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898,
+ /* 2470 */ 1898, 1898, 1898, 2313, 1898, 748, 1898, 1898, 1898, 1898,
+ /* 2480 */ 1898, 2365, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898,
+ /* 2490 */ 1898, 1898, 1898, 2313, 1898, 748, 1898, 1898, 2347, 1898,
+ /* 2500 */ 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898,
+ /* 2510 */ 1898, 749, 1898, 2347, 2346, 1898, 1898, 2384, 1898, 1898,
+ /* 2520 */ 354, 2348, 752, 2350, 2351, 747, 749, 742, 1898, 1898,
+ /* 2530 */ 1898, 1898, 1898, 1898, 2346, 2347, 1898, 2384, 1898, 2365,
+ /* 2540 */ 346, 2348, 752, 2350, 2351, 747, 1898, 742, 749, 1898,
+ /* 2550 */ 1898, 2313, 1898, 748, 2365, 1898, 1898, 1898, 1898, 1898,
+ /* 2560 */ 1898, 1898, 1898, 1898, 1898, 1898, 2313, 1898, 748, 1898,
+ /* 2570 */ 1898, 1898, 1898, 1898, 1898, 1898, 2365, 1898, 1898, 1898,
+ /* 2580 */ 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 2313, 1898,
+ /* 2590 */ 748, 1898, 2346, 2347, 1898, 2384, 1898, 1898, 355, 2348,
+ /* 2600 */ 752, 2350, 2351, 747, 1898, 742, 749, 2346, 2347, 1898,
+ /* 2610 */ 2384, 1898, 1898, 347, 2348, 752, 2350, 2351, 747, 1898,
+ /* 2620 */ 742, 749, 1898, 1898, 1898, 1898, 1898, 1898, 2347, 2346,
+ /* 2630 */ 1898, 1898, 2384, 1898, 2365, 356, 2348, 752, 2350, 2351,
+ /* 2640 */ 747, 749, 742, 1898, 1898, 1898, 2313, 1898, 748, 2365,
+ /* 2650 */ 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898,
+ /* 2660 */ 1898, 2313, 1898, 748, 1898, 1898, 1898, 1898, 1898, 2365,
+ /* 2670 */ 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898,
+ /* 2680 */ 1898, 2313, 1898, 748, 1898, 1898, 1898, 2346, 1898, 1898,
+ /* 2690 */ 2384, 1898, 1898, 348, 2348, 752, 2350, 2351, 747, 1898,
+ /* 2700 */ 742, 2347, 2346, 1898, 1898, 2384, 1898, 1898, 362, 2348,
+ /* 2710 */ 752, 2350, 2351, 747, 749, 742, 1898, 1898, 1898, 1898,
+ /* 2720 */ 1898, 2347, 2346, 1898, 1898, 2384, 1898, 1898, 363, 2348,
+ /* 2730 */ 752, 2350, 2351, 747, 749, 742, 1898, 1898, 2347, 1898,
+ /* 2740 */ 1898, 1898, 2365, 1898, 1898, 1898, 1898, 1898, 1898, 1898,
+ /* 2750 */ 1898, 749, 1898, 1898, 2313, 1898, 748, 1898, 1898, 1898,
+ /* 2760 */ 1898, 1898, 2365, 1898, 1898, 1898, 1898, 1898, 1898, 1898,
+ /* 2770 */ 1898, 1898, 1898, 1898, 2313, 1898, 748, 1898, 1898, 2365,
+ /* 2780 */ 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898,
+ /* 2790 */ 1898, 2313, 1898, 748, 1898, 2346, 1898, 1898, 2384, 1898,
+ /* 2800 */ 1898, 2359, 2348, 752, 2350, 2351, 747, 2347, 742, 1898,
+ /* 2810 */ 1898, 1898, 1898, 1898, 1898, 2346, 1898, 1898, 2384, 1898,
+ /* 2820 */ 749, 2358, 2348, 752, 2350, 2351, 747, 1898, 742, 1898,
+ /* 2830 */ 1898, 1898, 2346, 1898, 1898, 2384, 1898, 1898, 2357, 2348,
+ /* 2840 */ 752, 2350, 2351, 747, 1898, 742, 1898, 1898, 2365, 1898,
+ /* 2850 */ 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898,
+ /* 2860 */ 2313, 1898, 748, 1898, 1898, 2347, 1898, 1898, 1898, 1898,
+ /* 2870 */ 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 749, 1898,
+ /* 2880 */ 2347, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898,
+ /* 2890 */ 1898, 1898, 1898, 749, 1898, 1898, 1898, 1898, 1898, 1898,
+ /* 2900 */ 1898, 2346, 2347, 1898, 2384, 1898, 2365, 378, 2348, 752,
+ /* 2910 */ 2350, 2351, 747, 1898, 742, 749, 1898, 1898, 2313, 1898,
+ /* 2920 */ 748, 2365, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898,
+ /* 2930 */ 1898, 1898, 1898, 2313, 1898, 748, 1898, 1898, 1898, 1898,
+ /* 2940 */ 1898, 1898, 1898, 2365, 1898, 1898, 1898, 1898, 1898, 1898,
+ /* 2950 */ 1898, 1898, 1898, 1898, 1898, 2313, 1898, 748, 1898, 2346,
+ /* 2960 */ 2347, 1898, 2384, 1898, 1898, 379, 2348, 752, 2350, 2351,
+ /* 2970 */ 747, 1898, 742, 749, 2346, 2347, 1898, 2384, 1898, 1898,
+ /* 2980 */ 375, 2348, 752, 2350, 2351, 747, 1898, 742, 749, 1898,
+ /* 2990 */ 1898, 1898, 1898, 1898, 1898, 1898, 2346, 1898, 1898, 2384,
+ /* 3000 */ 1898, 2365, 380, 2348, 752, 2350, 2351, 747, 1898, 742,
+ /* 3010 */ 1898, 1898, 1898, 2313, 1898, 748, 2365, 1898, 1898, 1898,
+ /* 3020 */ 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 2313, 1898,
+ /* 3030 */ 748, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898,
+ /* 3040 */ 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898,
+ /* 3050 */ 1898, 1898, 1898, 1898, 750, 1898, 1898, 2384, 1898, 1898,
+ /* 3060 */ 353, 2348, 752, 2350, 2351, 747, 1898, 742, 1898, 2346,
+ /* 3070 */ 1898, 1898, 2384, 1898, 1898, 352, 2348, 752, 2350, 2351,
+ /* 3080 */ 747, 1898, 742,
};
static const YYCODETYPE yy_lookahead[] = {
/* 0 */ 353, 382, 360, 395, 429, 363, 364, 1, 2, 434,
@@ -688,38 +1039,38 @@ static const YYCODETYPE yy_lookahead[] = {
/* 1520 */ 20, 365, 108, 223, 366, 394, 226, 108, 20, 229,
/* 1530 */ 230, 231, 232, 233, 65, 366, 45, 406, 415, 408,
/* 1540 */ 366, 415, 179, 365, 412, 366, 365, 78, 415, 412,
- /* 1550 */ 412, 105, 394, 378, 103, 365, 102, 377, 376, 365,
- /* 1560 */ 365, 365, 20, 358, 406, 50, 408, 358, 362, 362,
- /* 1570 */ 441, 374, 272, 104, 374, 20, 297, 374, 447, 408,
- /* 1580 */ 353, 450, 20, 367, 453, 454, 455, 456, 457, 458,
- /* 1590 */ 20, 460, 431, 366, 374, 20, 465, 367, 467, 374,
- /* 1600 */ 374, 365, 471, 472, 358, 447, 422, 374, 450, 374,
- /* 1610 */ 358, 453, 454, 455, 456, 457, 458, 394, 460, 356,
- /* 1620 */ 365, 394, 356, 465, 406, 467, 394, 221, 394, 471,
+ /* 1550 */ 412, 412, 394, 105, 378, 103, 365, 377, 102, 376,
+ /* 1560 */ 365, 365, 365, 20, 406, 358, 408, 50, 362, 358,
+ /* 1570 */ 362, 441, 272, 104, 374, 374, 297, 20, 447, 408,
+ /* 1580 */ 353, 450, 20, 374, 453, 454, 455, 456, 457, 458,
+ /* 1590 */ 367, 460, 20, 366, 431, 20, 465, 367, 467, 374,
+ /* 1600 */ 374, 365, 471, 472, 422, 447, 374, 374, 450, 374,
+ /* 1610 */ 358, 453, 454, 455, 456, 457, 458, 356, 460, 356,
+ /* 1620 */ 365, 394, 358, 465, 406, 467, 406, 221, 394, 471,
/* 1630 */ 472, 394, 394, 406, 445, 408, 394, 394, 394, 394,
- /* 1640 */ 107, 443, 394, 372, 394, 406, 20, 406, 208, 441,
- /* 1650 */ 440, 438, 207, 372, 437, 282, 490, 281, 365, 408,
- /* 1660 */ 290, 430, 406, 490, 193, 276, 299, 292, 291, 493,
- /* 1670 */ 510, 202, 487, 204, 447, 492, 490, 450, 296, 488,
- /* 1680 */ 453, 454, 455, 456, 457, 458, 424, 460, 424, 430,
- /* 1690 */ 489, 504, 294, 271, 467, 353, 1, 366, 471, 472,
- /* 1700 */ 20, 117, 503, 234, 235, 452, 273, 485, 366, 406,
+ /* 1640 */ 394, 107, 394, 372, 394, 394, 443, 406, 20, 372,
+ /* 1650 */ 208, 441, 440, 207, 438, 282, 437, 490, 365, 281,
+ /* 1660 */ 290, 408, 406, 490, 193, 276, 299, 292, 493, 430,
+ /* 1670 */ 291, 202, 510, 204, 447, 490, 492, 450, 296, 489,
+ /* 1680 */ 453, 454, 455, 456, 457, 458, 424, 460, 430, 424,
+ /* 1690 */ 504, 294, 488, 271, 467, 353, 1, 503, 471, 472,
+ /* 1700 */ 487, 20, 366, 234, 235, 117, 273, 485, 366, 452,
/* 1710 */ 367, 372, 372, 406, 19, 185, 372, 248, 249, 250,
- /* 1720 */ 251, 252, 253, 254, 406, 406, 424, 353, 424, 406,
- /* 1730 */ 35, 420, 372, 406, 366, 390, 394, 107, 107, 470,
- /* 1740 */ 366, 483, 22, 365, 398, 355, 51, 38, 406, 358,
- /* 1750 */ 408, 372, 359, 425, 433, 60, 61, 62, 63, 442,
- /* 1760 */ 65, 425, 353, 351, 0, 373, 0, 0, 394, 388,
- /* 1770 */ 45, 388, 388, 0, 37, 366, 227, 37, 37, 37,
- /* 1780 */ 406, 227, 408, 0, 37, 37, 227, 37, 0, 447,
- /* 1790 */ 227, 0, 450, 37, 0, 453, 454, 455, 456, 457,
- /* 1800 */ 458, 106, 460, 394, 109, 37, 0, 22, 0, 467,
- /* 1810 */ 222, 37, 0, 471, 472, 406, 210, 408, 0, 210,
- /* 1820 */ 204, 447, 211, 202, 450, 0, 0, 453, 454, 455,
- /* 1830 */ 456, 457, 458, 0, 460, 353, 141, 198, 197, 0,
- /* 1840 */ 0, 467, 148, 0, 49, 471, 472, 49, 366, 0,
- /* 1850 */ 37, 0, 51, 37, 0, 0, 447, 0, 353, 450,
- /* 1860 */ 49, 0, 453, 454, 455, 456, 457, 458, 45, 460,
+ /* 1720 */ 251, 252, 253, 254, 406, 406, 424, 353, 406, 424,
+ /* 1730 */ 35, 420, 406, 372, 366, 390, 394, 107, 107, 470,
+ /* 1740 */ 366, 365, 483, 372, 398, 22, 51, 406, 406, 355,
+ /* 1750 */ 408, 38, 359, 358, 433, 60, 61, 62, 63, 442,
+ /* 1760 */ 65, 373, 353, 425, 351, 388, 0, 0, 394, 388,
+ /* 1770 */ 0, 388, 425, 45, 0, 366, 37, 227, 37, 37,
+ /* 1780 */ 406, 37, 408, 227, 0, 37, 37, 227, 37, 447,
+ /* 1790 */ 0, 227, 450, 0, 37, 453, 454, 455, 456, 457,
+ /* 1800 */ 458, 106, 460, 394, 109, 0, 37, 0, 22, 467,
+ /* 1810 */ 0, 222, 37, 471, 472, 406, 0, 408, 210, 0,
+ /* 1820 */ 210, 447, 211, 204, 450, 202, 0, 453, 454, 455,
+ /* 1830 */ 456, 457, 458, 0, 460, 353, 141, 0, 198, 197,
+ /* 1840 */ 0, 467, 0, 49, 148, 471, 472, 49, 366, 0,
+ /* 1850 */ 37, 0, 0, 51, 37, 0, 447, 49, 353, 450,
+ /* 1860 */ 0, 0, 453, 454, 455, 456, 457, 458, 45, 460,
/* 1870 */ 0, 366, 0, 49, 0, 0, 394, 0, 353, 184,
/* 1880 */ 165, 37, 0, 165, 0, 0, 191, 0, 406, 0,
/* 1890 */ 408, 366, 0, 353, 0, 0, 0, 0, 0, 394,
@@ -728,54 +1079,54 @@ static const YYCODETYPE yy_lookahead[] = {
/* 1920 */ 0, 45, 0, 0, 399, 0, 0, 0, 0, 447,
/* 1930 */ 0, 406, 450, 408, 394, 453, 454, 455, 456, 457,
/* 1940 */ 458, 22, 460, 0, 148, 0, 406, 147, 408, 467,
- /* 1950 */ 146, 0, 447, 0, 472, 450, 22, 22, 453, 454,
- /* 1960 */ 455, 456, 457, 458, 0, 460, 50, 50, 37, 0,
- /* 1970 */ 65, 65, 447, 0, 0, 450, 65, 0, 453, 454,
- /* 1980 */ 455, 456, 457, 458, 37, 460, 42, 447, 0, 353,
- /* 1990 */ 450, 51, 37, 453, 454, 455, 456, 457, 458, 51,
- /* 2000 */ 460, 496, 366, 42, 0, 37, 0, 51, 42, 37,
- /* 2010 */ 0, 33, 45, 42, 49, 14, 0, 0, 42, 49,
- /* 2020 */ 0, 0, 43, 0, 49, 353, 42, 193, 0, 49,
- /* 2030 */ 394, 0, 0, 0, 72, 0, 37, 51, 366, 499,
- /* 2040 */ 42, 0, 406, 51, 408, 37, 0, 42, 37, 42,
- /* 2050 */ 0, 51, 37, 51, 42, 0, 0, 353, 0, 0,
- /* 2060 */ 0, 0, 37, 113, 115, 22, 394, 37, 0, 22,
+ /* 1950 */ 0, 0, 447, 0, 472, 450, 22, 146, 453, 454,
+ /* 1960 */ 455, 456, 457, 458, 22, 460, 50, 50, 0, 37,
+ /* 1970 */ 65, 0, 447, 0, 0, 450, 65, 0, 453, 454,
+ /* 1980 */ 455, 456, 457, 458, 37, 460, 65, 447, 42, 353,
+ /* 1990 */ 450, 51, 0, 453, 454, 455, 456, 457, 458, 37,
+ /* 2000 */ 460, 496, 366, 51, 0, 42, 37, 51, 42, 0,
+ /* 2010 */ 0, 33, 37, 49, 42, 45, 49, 14, 0, 43,
+ /* 2020 */ 0, 0, 42, 0, 0, 353, 42, 193, 49, 0,
+ /* 2030 */ 394, 49, 0, 0, 0, 0, 37, 72, 366, 499,
+ /* 2040 */ 51, 0, 406, 42, 408, 37, 51, 42, 0, 37,
+ /* 2050 */ 0, 51, 37, 42, 0, 42, 0, 353, 51, 0,
+ /* 2060 */ 0, 0, 0, 115, 37, 22, 394, 113, 0, 22,
/* 2070 */ 366, 399, 0, 37, 37, 37, 37, 37, 406, 37,
- /* 2080 */ 408, 37, 33, 447, 33, 37, 450, 22, 0, 453,
- /* 2090 */ 454, 455, 456, 457, 458, 22, 460, 0, 394, 37,
- /* 2100 */ 37, 22, 0, 22, 0, 53, 37, 0, 0, 0,
- /* 2110 */ 406, 37, 408, 37, 0, 22, 20, 37, 0, 447,
- /* 2120 */ 37, 37, 450, 182, 49, 453, 454, 455, 456, 457,
- /* 2130 */ 458, 107, 460, 107, 353, 108, 0, 37, 209, 182,
- /* 2140 */ 0, 22, 22, 205, 508, 182, 0, 366, 0, 189,
- /* 2150 */ 353, 447, 3, 108, 450, 33, 277, 453, 454, 455,
- /* 2160 */ 456, 457, 458, 366, 460, 182, 462, 185, 353, 182,
- /* 2170 */ 189, 107, 33, 107, 50, 394, 105, 50, 108, 49,
- /* 2180 */ 399, 366, 49, 33, 107, 103, 108, 406, 33, 408,
- /* 2190 */ 33, 394, 107, 107, 3, 33, 399, 108, 107, 0,
- /* 2200 */ 108, 277, 108, 406, 37, 408, 37, 37, 37, 394,
- /* 2210 */ 277, 37, 37, 108, 108, 49, 270, 33, 0, 107,
- /* 2220 */ 42, 406, 49, 408, 107, 0, 116, 42, 447, 108,
- /* 2230 */ 107, 450, 107, 353, 453, 454, 455, 456, 457, 458,
- /* 2240 */ 108, 460, 107, 186, 447, 107, 366, 450, 33, 49,
- /* 2250 */ 453, 454, 455, 456, 457, 458, 105, 460, 105, 2,
- /* 2260 */ 257, 22, 447, 234, 108, 450, 107, 353, 453, 454,
- /* 2270 */ 455, 456, 457, 458, 394, 460, 108, 49, 49, 184,
- /* 2280 */ 366, 22, 117, 107, 107, 37, 406, 108, 408, 108,
- /* 2290 */ 353, 237, 128, 107, 107, 107, 72, 108, 37, 107,
- /* 2300 */ 37, 108, 107, 366, 108, 37, 108, 37, 394, 107,
- /* 2310 */ 107, 37, 108, 107, 37, 108, 107, 107, 128, 33,
- /* 2320 */ 406, 107, 408, 107, 37, 128, 22, 447, 37, 128,
- /* 2330 */ 450, 394, 37, 453, 454, 455, 456, 457, 458, 37,
- /* 2340 */ 460, 33, 71, 406, 37, 408, 37, 353, 37, 37,
- /* 2350 */ 37, 37, 101, 101, 78, 37, 78, 37, 37, 22,
- /* 2360 */ 366, 447, 37, 37, 450, 37, 78, 453, 454, 455,
- /* 2370 */ 456, 457, 458, 37, 460, 37, 37, 37, 37, 22,
- /* 2380 */ 37, 0, 37, 51, 447, 51, 42, 450, 394, 0,
+ /* 2080 */ 408, 37, 37, 447, 33, 33, 450, 22, 0, 453,
+ /* 2090 */ 454, 455, 456, 457, 458, 37, 460, 22, 394, 0,
+ /* 2100 */ 37, 37, 22, 0, 22, 0, 53, 37, 0, 0,
+ /* 2110 */ 406, 37, 408, 0, 37, 0, 22, 20, 37, 447,
+ /* 2120 */ 37, 37, 450, 0, 108, 453, 454, 455, 456, 457,
+ /* 2130 */ 458, 182, 460, 107, 353, 107, 0, 182, 209, 49,
+ /* 2140 */ 22, 37, 0, 205, 508, 185, 22, 366, 0, 0,
+ /* 2150 */ 353, 447, 33, 3, 450, 277, 107, 453, 454, 455,
+ /* 2160 */ 456, 457, 458, 366, 460, 182, 462, 182, 353, 182,
+ /* 2170 */ 189, 50, 50, 33, 108, 394, 107, 189, 105, 103,
+ /* 2180 */ 399, 366, 49, 49, 33, 33, 108, 406, 33, 408,
+ /* 2190 */ 277, 394, 3, 108, 108, 33, 399, 108, 107, 107,
+ /* 2200 */ 107, 277, 107, 406, 108, 408, 37, 37, 37, 394,
+ /* 2210 */ 37, 37, 37, 49, 108, 108, 33, 49, 0, 0,
+ /* 2220 */ 42, 406, 108, 408, 107, 0, 42, 270, 447, 49,
+ /* 2230 */ 184, 450, 107, 353, 453, 454, 455, 456, 457, 458,
+ /* 2240 */ 108, 460, 107, 186, 447, 107, 366, 450, 107, 33,
+ /* 2250 */ 453, 454, 455, 456, 457, 458, 2, 460, 22, 116,
+ /* 2260 */ 107, 105, 447, 257, 105, 450, 108, 353, 453, 454,
+ /* 2270 */ 455, 456, 457, 458, 394, 460, 49, 49, 22, 107,
+ /* 2280 */ 366, 37, 117, 107, 37, 108, 406, 108, 408, 234,
+ /* 2290 */ 353, 128, 107, 107, 107, 37, 108, 107, 37, 108,
+ /* 2300 */ 107, 37, 108, 366, 107, 37, 108, 107, 394, 108,
+ /* 2310 */ 107, 37, 108, 107, 33, 108, 237, 107, 22, 107,
+ /* 2320 */ 406, 107, 408, 128, 128, 37, 37, 447, 107, 72,
+ /* 2330 */ 450, 394, 37, 453, 454, 455, 456, 457, 458, 128,
+ /* 2340 */ 460, 71, 37, 406, 37, 408, 37, 353, 37, 37,
+ /* 2350 */ 37, 37, 101, 101, 78, 78, 33, 37, 37, 37,
+ /* 2360 */ 366, 447, 22, 37, 450, 37, 37, 453, 454, 455,
+ /* 2370 */ 456, 457, 458, 37, 460, 78, 37, 22, 37, 37,
+ /* 2380 */ 37, 37, 0, 37, 447, 51, 0, 450, 394, 42,
/* 2390 */ 453, 454, 455, 456, 457, 458, 37, 460, 42, 0,
- /* 2400 */ 406, 37, 408, 51, 42, 0, 37, 42, 0, 51,
- /* 2410 */ 37, 37, 0, 22, 22, 33, 21, 511, 22, 22,
- /* 2420 */ 353, 21, 20, 511, 511, 511, 511, 511, 511, 511,
+ /* 2400 */ 406, 51, 408, 37, 51, 42, 0, 37, 51, 42,
+ /* 2410 */ 0, 37, 37, 0, 22, 22, 33, 21, 20, 22,
+ /* 2420 */ 353, 511, 22, 21, 511, 511, 511, 511, 511, 511,
/* 2430 */ 511, 511, 511, 366, 511, 511, 511, 511, 511, 511,
/* 2440 */ 353, 447, 511, 511, 450, 511, 511, 453, 454, 455,
/* 2450 */ 456, 457, 458, 366, 460, 511, 511, 511, 511, 511,
@@ -878,9 +1229,9 @@ static const YYCODETYPE yy_lookahead[] = {
/* 3420 */ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350,
/* 3430 */ 350, 350, 350,
};
-#define YY_SHIFT_COUNT (845)
+#define YY_SHIFT_COUNT (846)
#define YY_SHIFT_MIN (0)
-#define YY_SHIFT_MAX (2412)
+#define YY_SHIFT_MAX (2413)
static const unsigned short int yy_shift_ofst[] = {
/* 0 */ 1300, 0, 244, 0, 489, 489, 489, 489, 489, 489,
/* 10 */ 489, 489, 489, 489, 489, 489, 733, 977, 977, 1221,
@@ -904,71 +1255,71 @@ static const unsigned short int yy_shift_ofst[] = {
/* 190 */ 640, 734, 330, 768, 1025, 419, 805, 94, 1025, 1025,
/* 200 */ 1029, 917, 576, 575, 917, 295, 894, 403, 1215, 1441,
/* 210 */ 1458, 1481, 1290, 31, 1481, 31, 1314, 1500, 1508, 1491,
- /* 220 */ 1508, 1491, 1363, 1500, 1508, 1500, 1491, 1363, 1363, 1446,
- /* 230 */ 1451, 1500, 1454, 1500, 1500, 1500, 1542, 1515, 1542, 1515,
- /* 240 */ 1481, 31, 31, 1555, 31, 1562, 1570, 31, 1562, 31,
- /* 250 */ 1575, 31, 31, 1500, 31, 1542, 1, 1, 1, 1,
- /* 260 */ 1, 1, 1, 1, 1, 1, 1, 1500, 884, 884,
- /* 270 */ 1542, 780, 780, 780, 1406, 1533, 1481, 532, 1626, 1440,
- /* 280 */ 1445, 1555, 532, 1215, 1500, 780, 1373, 1376, 1373, 1376,
- /* 290 */ 1370, 1471, 1373, 1375, 1377, 1389, 1215, 1367, 1382, 1398,
- /* 300 */ 1422, 1508, 1680, 1584, 1433, 1562, 532, 532, 1376, 780,
- /* 310 */ 780, 780, 780, 1376, 780, 1530, 532, 595, 532, 1508,
- /* 320 */ 1630, 1631, 780, 1500, 532, 1720, 1709, 1542, 3083, 3083,
- /* 330 */ 3083, 3083, 3083, 3083, 3083, 3083, 3083, 36, 1228, 197,
- /* 340 */ 748, 1007, 81, 1045, 888, 15, 527, 1062, 995, 1289,
- /* 350 */ 1289, 1289, 1289, 1289, 1289, 1289, 1289, 1289, 216, 148,
- /* 360 */ 12, 802, 802, 226, 729, 10, 742, 843, 773, 732,
- /* 370 */ 897, 747, 914, 914, 1019, 6, 605, 1019, 1019, 1019,
- /* 380 */ 1249, 1066, 487, 370, 1202, 1028, 1122, 1154, 1168, 1170,
- /* 390 */ 1172, 1229, 1247, 1240, 1273, 1287, 1292, 1093, 684, 1274,
- /* 400 */ 1145, 1282, 1283, 1286, 1177, 1068, 1279, 1291, 1296, 1297,
- /* 410 */ 1298, 1309, 1310, 1325, 1313, 433, 1320, 1268, 1350, 1407,
- /* 420 */ 1408, 1410, 1414, 1419, 1254, 1285, 1299, 1335, 1337, 1301,
- /* 430 */ 1431, 1764, 1766, 1767, 1725, 1773, 1737, 1549, 1740, 1741,
- /* 440 */ 1742, 1554, 1783, 1747, 1748, 1559, 1750, 1788, 1563, 1791,
- /* 450 */ 1756, 1794, 1768, 1806, 1785, 1808, 1774, 1588, 1812, 1606,
- /* 460 */ 1818, 1609, 1611, 1616, 1621, 1825, 1826, 1833, 1639, 1641,
- /* 470 */ 1839, 1840, 1694, 1795, 1798, 1843, 1813, 1849, 1851, 1816,
- /* 480 */ 1801, 1854, 1811, 1855, 1823, 1857, 1861, 1870, 1824, 1872,
- /* 490 */ 1874, 1875, 1877, 1887, 1889, 1715, 1844, 1882, 1718, 1884,
- /* 500 */ 1885, 1892, 1894, 1895, 1896, 1897, 1898, 1900, 1901, 1902,
- /* 510 */ 1903, 1904, 1907, 1908, 1909, 1910, 1912, 1918, 1865, 1915,
- /* 520 */ 1876, 1920, 1922, 1923, 1925, 1926, 1927, 1928, 1919, 1930,
- /* 530 */ 1796, 1943, 1800, 1945, 1804, 1951, 1953, 1934, 1916, 1935,
- /* 540 */ 1917, 1964, 1905, 1931, 1969, 1906, 1973, 1911, 1974, 1977,
- /* 550 */ 1947, 1940, 1944, 1988, 1955, 1948, 1961, 2004, 1968, 1956,
- /* 560 */ 1966, 2006, 1972, 2010, 1967, 1971, 1978, 1965, 1970, 2001,
- /* 570 */ 1975, 2016, 1979, 1976, 2017, 2020, 2021, 2023, 1984, 1834,
- /* 580 */ 2028, 1965, 1980, 2031, 2032, 1962, 2033, 2035, 1999, 1986,
- /* 590 */ 1998, 2041, 2008, 1992, 2005, 2046, 2011, 2000, 2007, 2050,
- /* 600 */ 2015, 2002, 2012, 2055, 2056, 2058, 2059, 2060, 2061, 1949,
- /* 610 */ 1950, 2025, 2043, 2072, 2030, 2036, 2037, 2038, 2039, 2040,
- /* 620 */ 2042, 2044, 2049, 2051, 2048, 2062, 2047, 2063, 2068, 2065,
- /* 630 */ 2088, 2073, 2097, 2079, 2052, 2102, 2081, 2069, 2104, 2107,
- /* 640 */ 2108, 2074, 2109, 2076, 2114, 2093, 2096, 2080, 2083, 2084,
- /* 650 */ 2027, 2024, 2118, 1941, 2026, 1929, 1965, 2075, 2136, 1957,
- /* 660 */ 2100, 2119, 2140, 1938, 2120, 1963, 1982, 2146, 2148, 1983,
- /* 670 */ 1960, 1987, 1981, 2149, 2122, 1879, 2064, 2045, 2066, 2124,
- /* 680 */ 2071, 2127, 2082, 2070, 2139, 2150, 2078, 2077, 2085, 2086,
- /* 690 */ 2089, 2155, 2130, 2133, 2091, 2157, 1924, 2092, 2094, 2191,
- /* 700 */ 2162, 1933, 2167, 2169, 2170, 2171, 2174, 2175, 2105, 2106,
- /* 710 */ 2166, 1946, 2184, 2173, 2199, 2218, 2112, 2178, 2117, 2121,
- /* 720 */ 2132, 2123, 2125, 2057, 2135, 2225, 2185, 2095, 2138, 2110,
- /* 730 */ 1965, 2200, 2215, 2151, 2003, 2153, 2257, 2239, 2029, 2159,
- /* 740 */ 2156, 2176, 2168, 2177, 2179, 2228, 2186, 2187, 2229, 2181,
- /* 750 */ 2259, 2054, 2188, 2165, 2189, 2248, 2261, 2192, 2193, 2263,
- /* 760 */ 2195, 2196, 2268, 2202, 2198, 2270, 2203, 2204, 2274, 2206,
- /* 770 */ 2207, 2277, 2209, 2164, 2190, 2197, 2201, 2210, 2286, 2214,
- /* 780 */ 2287, 2216, 2286, 2286, 2304, 2224, 2271, 2291, 2295, 2302,
- /* 790 */ 2307, 2309, 2311, 2312, 2313, 2314, 2276, 2251, 2278, 2252,
- /* 800 */ 2308, 2318, 2320, 2321, 2337, 2325, 2326, 2328, 2288, 2049,
- /* 810 */ 2336, 2051, 2338, 2339, 2340, 2341, 2357, 2343, 2381, 2345,
- /* 820 */ 2332, 2344, 2389, 2359, 2334, 2356, 2399, 2364, 2352, 2362,
- /* 830 */ 2405, 2369, 2358, 2365, 2408, 2373, 2374, 2412, 2391, 2382,
- /* 840 */ 2392, 2395, 2396, 2397, 2400, 2402,
+ /* 220 */ 1508, 1491, 1363, 1500, 1508, 1500, 1491, 1363, 1363, 1363,
+ /* 230 */ 1448, 1452, 1500, 1456, 1500, 1500, 1500, 1543, 1517, 1543,
+ /* 240 */ 1517, 1481, 31, 31, 1557, 31, 1562, 1572, 31, 1562,
+ /* 250 */ 31, 1575, 31, 31, 1500, 31, 1543, 1, 1, 1,
+ /* 260 */ 1, 1, 1, 1, 1, 1, 1, 1, 1500, 884,
+ /* 270 */ 884, 1543, 780, 780, 780, 1406, 1534, 1481, 532, 1628,
+ /* 280 */ 1442, 1446, 1557, 532, 1215, 1500, 780, 1373, 1378, 1373,
+ /* 290 */ 1378, 1370, 1471, 1373, 1375, 1379, 1389, 1215, 1367, 1382,
+ /* 300 */ 1397, 1422, 1508, 1681, 1588, 1433, 1562, 532, 532, 1378,
+ /* 310 */ 780, 780, 780, 780, 1378, 780, 1530, 532, 595, 532,
+ /* 320 */ 1508, 1630, 1631, 780, 1500, 532, 1723, 1713, 1543, 3083,
+ /* 330 */ 3083, 3083, 3083, 3083, 3083, 3083, 3083, 3083, 36, 1228,
+ /* 340 */ 197, 748, 1007, 81, 1045, 888, 15, 527, 1062, 995,
+ /* 350 */ 1289, 1289, 1289, 1289, 1289, 1289, 1289, 1289, 1289, 216,
+ /* 360 */ 148, 12, 802, 802, 226, 729, 10, 742, 843, 773,
+ /* 370 */ 732, 897, 747, 914, 914, 1019, 6, 605, 1019, 1019,
+ /* 380 */ 1019, 1249, 1066, 487, 370, 1202, 1028, 1122, 1154, 1168,
+ /* 390 */ 1170, 1172, 1229, 1247, 1240, 1273, 1287, 1292, 1093, 684,
+ /* 400 */ 1274, 1145, 1282, 1283, 1286, 1177, 1068, 1279, 1291, 1296,
+ /* 410 */ 1297, 1298, 1309, 1310, 1325, 1313, 433, 1320, 1268, 1350,
+ /* 420 */ 1407, 1408, 1410, 1414, 1419, 1254, 1285, 1299, 1335, 1337,
+ /* 430 */ 1301, 1431, 1766, 1767, 1770, 1728, 1774, 1739, 1550, 1741,
+ /* 440 */ 1742, 1744, 1556, 1784, 1748, 1749, 1560, 1751, 1790, 1564,
+ /* 450 */ 1793, 1757, 1805, 1769, 1807, 1786, 1810, 1775, 1589, 1816,
+ /* 460 */ 1608, 1819, 1610, 1611, 1619, 1623, 1826, 1833, 1837, 1640,
+ /* 470 */ 1642, 1840, 1842, 1696, 1794, 1798, 1849, 1813, 1851, 1852,
+ /* 480 */ 1817, 1802, 1855, 1808, 1860, 1823, 1861, 1870, 1872, 1824,
+ /* 490 */ 1874, 1875, 1877, 1887, 1889, 1892, 1715, 1844, 1882, 1718,
+ /* 500 */ 1884, 1885, 1894, 1895, 1896, 1897, 1898, 1900, 1901, 1902,
+ /* 510 */ 1903, 1904, 1907, 1908, 1909, 1910, 1912, 1918, 1920, 1865,
+ /* 520 */ 1915, 1876, 1922, 1923, 1925, 1926, 1927, 1928, 1930, 1919,
+ /* 530 */ 1943, 1796, 1945, 1800, 1950, 1811, 1951, 1953, 1934, 1916,
+ /* 540 */ 1942, 1917, 1968, 1905, 1932, 1971, 1911, 1973, 1921, 1974,
+ /* 550 */ 1977, 1947, 1940, 1946, 1992, 1962, 1952, 1963, 2004, 1969,
+ /* 560 */ 1956, 1966, 2009, 1975, 2010, 1970, 1972, 1978, 1964, 1967,
+ /* 570 */ 2003, 1979, 2018, 1976, 1980, 2020, 2021, 2023, 2024, 1984,
+ /* 580 */ 1834, 2029, 1964, 1982, 2032, 2033, 1965, 2034, 2035, 1999,
+ /* 590 */ 1989, 2001, 2041, 2008, 1995, 2005, 2048, 2012, 2000, 2011,
+ /* 600 */ 2050, 2015, 2007, 2013, 2054, 2056, 2059, 2060, 2061, 2062,
+ /* 610 */ 1948, 1954, 2027, 2043, 2068, 2036, 2037, 2038, 2039, 2040,
+ /* 620 */ 2042, 2044, 2045, 2051, 2052, 2058, 2063, 2047, 2064, 2072,
+ /* 630 */ 2065, 2088, 2075, 2099, 2080, 2053, 2103, 2082, 2070, 2105,
+ /* 640 */ 2108, 2109, 2074, 2113, 2077, 2115, 2094, 2097, 2081, 2083,
+ /* 650 */ 2084, 2016, 2026, 2123, 1949, 2028, 1929, 1964, 2090, 2136,
+ /* 660 */ 1955, 2104, 2118, 2142, 1938, 2124, 1983, 1960, 2148, 2149,
+ /* 670 */ 1985, 1981, 1987, 1988, 2150, 2119, 1878, 2049, 2066, 2069,
+ /* 680 */ 2121, 2073, 2122, 2076, 2078, 2140, 2151, 2085, 2091, 2092,
+ /* 690 */ 2093, 2086, 2152, 2133, 2134, 2095, 2155, 1913, 2089, 2096,
+ /* 700 */ 2189, 2162, 1924, 2169, 2170, 2171, 2173, 2174, 2175, 2106,
+ /* 710 */ 2107, 2164, 1957, 2183, 2168, 2218, 2219, 2117, 2178, 2125,
+ /* 720 */ 2114, 2132, 2135, 2138, 2057, 2141, 2225, 2184, 2046, 2153,
+ /* 730 */ 2143, 1964, 2180, 2216, 2156, 2006, 2159, 2254, 2236, 2055,
+ /* 740 */ 2172, 2158, 2176, 2177, 2185, 2179, 2227, 2186, 2187, 2228,
+ /* 750 */ 2188, 2256, 2079, 2190, 2165, 2191, 2244, 2247, 2193, 2194,
+ /* 760 */ 2258, 2197, 2198, 2261, 2200, 2201, 2264, 2203, 2204, 2268,
+ /* 770 */ 2206, 2207, 2274, 2210, 2163, 2195, 2196, 2211, 2212, 2281,
+ /* 780 */ 2214, 2288, 2221, 2281, 2281, 2296, 2257, 2270, 2289, 2295,
+ /* 790 */ 2305, 2307, 2309, 2311, 2312, 2313, 2314, 2276, 2251, 2277,
+ /* 800 */ 2252, 2323, 2320, 2321, 2322, 2340, 2326, 2328, 2329, 2297,
+ /* 810 */ 2051, 2336, 2052, 2339, 2341, 2342, 2343, 2355, 2344, 2382,
+ /* 820 */ 2346, 2334, 2347, 2386, 2359, 2350, 2356, 2399, 2366, 2353,
+ /* 830 */ 2363, 2406, 2370, 2357, 2367, 2410, 2374, 2375, 2413, 2392,
+ /* 840 */ 2383, 2393, 2396, 2397, 2400, 2402, 2398,
};
-#define YY_REDUCE_COUNT (336)
+#define YY_REDUCE_COUNT (337)
#define YY_REDUCE_MIN (-463)
#define YY_REDUCE_MAX (2622)
static const short yy_reduce_ofst[] = {
@@ -994,105 +1345,105 @@ static const short yy_reduce_ofst[] = {
/* 190 */ 968, 903, 984, 1053, 1005, 1048, 1037, 1041, 1059, 1061,
/* 200 */ 984, 1004, 1004, 985, 1004, 1006, 1002, 1104, 1063, 1049,
/* 210 */ 1054, 1064, 1071, 1134, 1069, 1135, 1087, 1156, 1169, 1123,
- /* 220 */ 1174, 1126, 1132, 1178, 1179, 1181, 1133, 1137, 1138, 1175,
- /* 230 */ 1180, 1190, 1182, 1194, 1195, 1196, 1205, 1206, 1209, 1207,
- /* 240 */ 1129, 1197, 1200, 1171, 1203, 1216, 1161, 1220, 1230, 1225,
- /* 250 */ 1184, 1226, 1233, 1236, 1235, 1246, 1223, 1232, 1234, 1237,
- /* 260 */ 1238, 1242, 1243, 1244, 1245, 1248, 1250, 1255, 1263, 1266,
- /* 270 */ 1252, 1218, 1239, 1241, 1189, 1198, 1208, 1271, 1210, 1213,
- /* 280 */ 1217, 1251, 1281, 1231, 1293, 1256, 1166, 1262, 1173, 1264,
- /* 290 */ 1176, 1183, 1186, 1201, 1191, 1185, 1259, 1160, 1187, 1199,
- /* 300 */ 1004, 1331, 1253, 1222, 1258, 1343, 1339, 1340, 1302, 1303,
- /* 310 */ 1307, 1318, 1319, 1304, 1323, 1311, 1344, 1345, 1360, 1368,
- /* 320 */ 1269, 1346, 1327, 1378, 1379, 1390, 1393, 1391, 1321, 1317,
- /* 330 */ 1328, 1336, 1381, 1383, 1384, 1392, 1412,
+ /* 220 */ 1174, 1126, 1132, 1178, 1179, 1181, 1133, 1137, 1138, 1139,
+ /* 230 */ 1176, 1180, 1191, 1183, 1195, 1196, 1197, 1207, 1206, 1211,
+ /* 240 */ 1208, 1130, 1200, 1201, 1171, 1209, 1223, 1163, 1225, 1230,
+ /* 250 */ 1226, 1182, 1232, 1233, 1236, 1235, 1252, 1234, 1237, 1238,
+ /* 260 */ 1242, 1243, 1244, 1245, 1246, 1248, 1250, 1251, 1255, 1261,
+ /* 270 */ 1263, 1264, 1218, 1220, 1241, 1189, 1203, 1210, 1271, 1212,
+ /* 280 */ 1216, 1219, 1253, 1277, 1239, 1293, 1256, 1167, 1262, 1173,
+ /* 290 */ 1265, 1175, 1184, 1185, 1190, 1204, 1213, 1258, 1162, 1186,
+ /* 300 */ 1194, 1004, 1336, 1257, 1222, 1259, 1343, 1339, 1340, 1302,
+ /* 310 */ 1307, 1318, 1319, 1322, 1305, 1326, 1311, 1344, 1345, 1361,
+ /* 320 */ 1368, 1269, 1346, 1341, 1376, 1371, 1394, 1393, 1395, 1321,
+ /* 330 */ 1317, 1338, 1347, 1377, 1381, 1383, 1388, 1413,
};
static const YYACTIONTYPE yy_default[] = {
- /* 0 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895,
- /* 10 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895,
- /* 20 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895,
- /* 30 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895,
- /* 40 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895,
- /* 50 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895,
- /* 60 */ 1895, 2235, 1895, 1895, 2198, 1895, 1895, 1895, 1895, 1895,
- /* 70 */ 1895, 1895, 1895, 1895, 1895, 1895, 2205, 1895, 1895, 1895,
- /* 80 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895,
- /* 90 */ 1895, 1895, 1895, 1895, 1895, 1895, 1994, 1895, 1895, 1895,
- /* 100 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895,
- /* 110 */ 1895, 1895, 1895, 1992, 2438, 1895, 1895, 1895, 1895, 1895,
- /* 120 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895,
- /* 130 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 2450, 1895,
- /* 140 */ 1895, 1966, 1966, 1895, 2450, 2450, 2450, 1992, 2410, 2410,
- /* 150 */ 1895, 1895, 1994, 2273, 1895, 1895, 1895, 1895, 1895, 1895,
- /* 160 */ 1895, 1895, 2117, 1925, 1895, 1895, 1895, 1895, 2141, 1895,
- /* 170 */ 1895, 1895, 2261, 1895, 1895, 2479, 2539, 1895, 1895, 2482,
- /* 180 */ 1895, 1895, 1895, 1895, 2210, 1895, 2469, 1895, 1895, 1895,
- /* 190 */ 1895, 1895, 1895, 1895, 1895, 1895, 2070, 2255, 1895, 1895,
- /* 200 */ 1895, 2442, 2456, 2523, 2443, 2440, 2463, 1895, 2473, 1895,
- /* 210 */ 2298, 1895, 2287, 1994, 1895, 1994, 2248, 2193, 1895, 2203,
- /* 220 */ 1895, 2203, 2200, 1895, 1895, 1895, 2203, 2200, 2200, 2059,
- /* 230 */ 2055, 1895, 2053, 1895, 1895, 1895, 1895, 1950, 1895, 1950,
- /* 240 */ 1895, 1994, 1994, 1895, 1994, 1895, 1895, 1994, 1895, 1994,
- /* 250 */ 1895, 1994, 1994, 1895, 1994, 1895, 1895, 1895, 1895, 1895,
- /* 260 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895,
- /* 270 */ 1895, 1895, 1895, 1895, 2285, 2271, 1895, 1992, 1895, 2259,
- /* 280 */ 2257, 1895, 1992, 2473, 1895, 1895, 2493, 2488, 2493, 2488,
- /* 290 */ 2507, 2503, 2493, 2512, 2509, 2475, 2473, 2542, 2529, 2525,
- /* 300 */ 2456, 1895, 1895, 2461, 2459, 1895, 1992, 1992, 2488, 1895,
- /* 310 */ 1895, 1895, 1895, 2488, 1895, 1895, 1992, 1895, 1992, 1895,
- /* 320 */ 1895, 2086, 1895, 1895, 1992, 1895, 1934, 1895, 2250, 2276,
- /* 330 */ 2231, 2231, 2120, 2120, 2120, 1995, 1900, 1895, 1895, 1895,
- /* 340 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 2506,
- /* 350 */ 2505, 2363, 1895, 2414, 2413, 2412, 2403, 2362, 2082, 1895,
- /* 360 */ 1895, 2361, 2360, 1895, 1895, 1895, 1895, 1895, 1895, 1895,
- /* 370 */ 1895, 1895, 2222, 2221, 2354, 1895, 1895, 2355, 2353, 2352,
- /* 380 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895,
- /* 390 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895,
- /* 400 */ 1895, 1895, 1895, 1895, 1895, 2526, 2530, 1895, 1895, 1895,
- /* 410 */ 1895, 1895, 1895, 2439, 1895, 1895, 1895, 2334, 1895, 1895,
- /* 420 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895,
- /* 430 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895,
- /* 440 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895,
- /* 450 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895,
- /* 460 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895,
- /* 470 */ 1895, 1895, 2199, 1895, 1895, 1895, 1895, 1895, 1895, 1895,
- /* 480 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895,
- /* 490 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895,
- /* 500 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895,
- /* 510 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895,
- /* 520 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895,
- /* 530 */ 1895, 1895, 1895, 1895, 2214, 1895, 1895, 1895, 1895, 1895,
- /* 540 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895,
- /* 550 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895,
- /* 560 */ 1895, 1895, 1895, 1895, 1895, 1895, 1939, 2341, 1895, 1895,
- /* 570 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895,
- /* 580 */ 1895, 2344, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895,
- /* 590 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895,
- /* 600 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895,
- /* 610 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895,
- /* 620 */ 1895, 1895, 2034, 2033, 1895, 1895, 1895, 1895, 1895, 1895,
- /* 630 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895,
- /* 640 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895,
- /* 650 */ 2345, 1895, 1895, 1895, 1895, 1895, 2336, 1895, 1895, 1895,
- /* 660 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895,
- /* 670 */ 1895, 1895, 1895, 2522, 2476, 1895, 1895, 1895, 1895, 1895,
- /* 680 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895,
- /* 690 */ 1895, 1895, 1895, 2334, 1895, 2504, 1895, 1895, 2520, 1895,
- /* 700 */ 2524, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 2449, 2445,
- /* 710 */ 1895, 1895, 2441, 1895, 1895, 1895, 1895, 1895, 1895, 1895,
- /* 720 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895,
- /* 730 */ 2333, 1895, 2400, 1895, 1895, 1895, 2434, 1895, 1895, 2385,
- /* 740 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 2345,
- /* 750 */ 1895, 2348, 1895, 1895, 1895, 1895, 1895, 2114, 1895, 1895,
- /* 760 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895,
- /* 770 */ 1895, 1895, 1895, 2098, 2096, 2095, 2094, 1895, 2127, 1895,
- /* 780 */ 1895, 1895, 2123, 2122, 1895, 1895, 1895, 1895, 1895, 1895,
- /* 790 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895,
- /* 800 */ 2013, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 2005,
- /* 810 */ 1895, 2004, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895,
- /* 820 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895,
- /* 830 */ 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1924,
- /* 840 */ 1895, 1895, 1895, 1895, 1895, 1895,
+ /* 0 */ 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896,
+ /* 10 */ 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896,
+ /* 20 */ 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896,
+ /* 30 */ 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896,
+ /* 40 */ 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896,
+ /* 50 */ 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896,
+ /* 60 */ 1896, 2236, 1896, 1896, 2199, 1896, 1896, 1896, 1896, 1896,
+ /* 70 */ 1896, 1896, 1896, 1896, 1896, 1896, 2206, 1896, 1896, 1896,
+ /* 80 */ 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896,
+ /* 90 */ 1896, 1896, 1896, 1896, 1896, 1896, 1995, 1896, 1896, 1896,
+ /* 100 */ 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896,
+ /* 110 */ 1896, 1896, 1896, 1993, 2439, 1896, 1896, 1896, 1896, 1896,
+ /* 120 */ 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896,
+ /* 130 */ 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 2451, 1896,
+ /* 140 */ 1896, 1967, 1967, 1896, 2451, 2451, 2451, 1993, 2411, 2411,
+ /* 150 */ 1896, 1896, 1995, 2274, 1896, 1896, 1896, 1896, 1896, 1896,
+ /* 160 */ 1896, 1896, 2118, 1926, 1896, 1896, 1896, 1896, 2142, 1896,
+ /* 170 */ 1896, 1896, 2262, 1896, 1896, 2480, 2540, 1896, 1896, 2483,
+ /* 180 */ 1896, 1896, 1896, 1896, 2211, 1896, 2470, 1896, 1896, 1896,
+ /* 190 */ 1896, 1896, 1896, 1896, 1896, 1896, 2071, 2256, 1896, 1896,
+ /* 200 */ 1896, 2443, 2457, 2524, 2444, 2441, 2464, 1896, 2474, 1896,
+ /* 210 */ 2299, 1896, 2288, 1995, 1896, 1995, 2249, 2194, 1896, 2204,
+ /* 220 */ 1896, 2204, 2201, 1896, 1896, 1896, 2204, 2201, 2201, 2201,
+ /* 230 */ 2060, 2056, 1896, 2054, 1896, 1896, 1896, 1896, 1951, 1896,
+ /* 240 */ 1951, 1896, 1995, 1995, 1896, 1995, 1896, 1896, 1995, 1896,
+ /* 250 */ 1995, 1896, 1995, 1995, 1896, 1995, 1896, 1896, 1896, 1896,
+ /* 260 */ 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896,
+ /* 270 */ 1896, 1896, 1896, 1896, 1896, 2286, 2272, 1896, 1993, 1896,
+ /* 280 */ 2260, 2258, 1896, 1993, 2474, 1896, 1896, 2494, 2489, 2494,
+ /* 290 */ 2489, 2508, 2504, 2494, 2513, 2510, 2476, 2474, 2543, 2530,
+ /* 300 */ 2526, 2457, 1896, 1896, 2462, 2460, 1896, 1993, 1993, 2489,
+ /* 310 */ 1896, 1896, 1896, 1896, 2489, 1896, 1896, 1993, 1896, 1993,
+ /* 320 */ 1896, 1896, 2087, 1896, 1896, 1993, 1896, 1935, 1896, 2251,
+ /* 330 */ 2277, 2232, 2232, 2121, 2121, 2121, 1996, 1901, 1896, 1896,
+ /* 340 */ 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896,
+ /* 350 */ 2507, 2506, 2364, 1896, 2415, 2414, 2413, 2404, 2363, 2083,
+ /* 360 */ 1896, 1896, 2362, 2361, 1896, 1896, 1896, 1896, 1896, 1896,
+ /* 370 */ 1896, 1896, 1896, 2223, 2222, 2355, 1896, 1896, 2356, 2354,
+ /* 380 */ 2353, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896,
+ /* 390 */ 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896,
+ /* 400 */ 1896, 1896, 1896, 1896, 1896, 1896, 2527, 2531, 1896, 1896,
+ /* 410 */ 1896, 1896, 1896, 1896, 2440, 1896, 1896, 1896, 2335, 1896,
+ /* 420 */ 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896,
+ /* 430 */ 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896,
+ /* 440 */ 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896,
+ /* 450 */ 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896,
+ /* 460 */ 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896,
+ /* 470 */ 1896, 1896, 1896, 2200, 1896, 1896, 1896, 1896, 1896, 1896,
+ /* 480 */ 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896,
+ /* 490 */ 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896,
+ /* 500 */ 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896,
+ /* 510 */ 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896,
+ /* 520 */ 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896,
+ /* 530 */ 1896, 1896, 1896, 1896, 1896, 2215, 1896, 1896, 1896, 1896,
+ /* 540 */ 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896,
+ /* 550 */ 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896,
+ /* 560 */ 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1940, 2342, 1896,
+ /* 570 */ 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896,
+ /* 580 */ 1896, 1896, 2345, 1896, 1896, 1896, 1896, 1896, 1896, 1896,
+ /* 590 */ 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896,
+ /* 600 */ 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896,
+ /* 610 */ 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896,
+ /* 620 */ 1896, 1896, 1896, 2035, 2034, 1896, 1896, 1896, 1896, 1896,
+ /* 630 */ 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896,
+ /* 640 */ 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896,
+ /* 650 */ 1896, 2346, 1896, 1896, 1896, 1896, 1896, 2337, 1896, 1896,
+ /* 660 */ 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896,
+ /* 670 */ 1896, 1896, 1896, 1896, 2523, 2477, 1896, 1896, 1896, 1896,
+ /* 680 */ 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896,
+ /* 690 */ 1896, 1896, 1896, 1896, 2335, 1896, 2505, 1896, 1896, 2521,
+ /* 700 */ 1896, 2525, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 2450,
+ /* 710 */ 2446, 1896, 1896, 2442, 1896, 1896, 1896, 1896, 1896, 1896,
+ /* 720 */ 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896,
+ /* 730 */ 1896, 2334, 1896, 2401, 1896, 1896, 1896, 2435, 1896, 1896,
+ /* 740 */ 2386, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896,
+ /* 750 */ 2346, 1896, 2349, 1896, 1896, 1896, 1896, 1896, 2115, 1896,
+ /* 760 */ 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896,
+ /* 770 */ 1896, 1896, 1896, 1896, 2099, 2097, 2096, 2095, 1896, 2128,
+ /* 780 */ 1896, 1896, 1896, 2124, 2123, 1896, 1896, 1896, 1896, 1896,
+ /* 790 */ 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896,
+ /* 800 */ 1896, 2014, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896,
+ /* 810 */ 2006, 1896, 2005, 1896, 1896, 1896, 1896, 1896, 1896, 1896,
+ /* 820 */ 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896,
+ /* 830 */ 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896,
+ /* 840 */ 1925, 1896, 1896, 1896, 1896, 1896, 1896,
};
/********** End of lemon-generated parsing tables *****************************/
@@ -1513,6 +1864,7 @@ struct yyParser {
};
typedef struct yyParser yyParser;
+#include
#ifndef NDEBUG
#include
static FILE *yyTraceFILE = 0;
@@ -2357,7 +2709,7 @@ static const char *const yyRuleName[] = {
/* 287 */ "cmd ::= SHOW VNODES",
/* 288 */ "cmd ::= SHOW db_name_cond_opt ALIVE",
/* 289 */ "cmd ::= SHOW CLUSTER ALIVE",
- /* 290 */ "cmd ::= SHOW db_name_cond_opt VIEWS",
+ /* 290 */ "cmd ::= SHOW db_name_cond_opt VIEWS like_pattern_opt",
/* 291 */ "cmd ::= SHOW CREATE VIEW full_table_name",
/* 292 */ "cmd ::= SHOW COMPACTS",
/* 293 */ "cmd ::= SHOW COMPACT NK_INTEGER",
@@ -2917,7 +3269,9 @@ static void yy_destructor(
case 506: /* query_simple_or_subquery */
case 508: /* sort_specification */
{
+#line 7 "sql.y"
nodesDestroyNode((yypminor->yy490));
+#line 3274 "sql.c"
}
break;
case 351: /* account_options */
@@ -2927,7 +3281,9 @@ static void yy_destructor(
case 428: /* with_meta */
case 437: /* bufsize_opt */
{
+#line 54 "sql.y"
+#line 3286 "sql.c"
}
break;
case 355: /* ip_range_list */
@@ -2964,7 +3320,9 @@ static void yy_destructor(
case 502: /* order_by_clause_opt */
case 507: /* sort_specification_list */
{
+#line 85 "sql.y"
nodesDestroyList((yypminor->yy502));
+#line 3325 "sql.c"
}
break;
case 358: /* user_name */
@@ -2987,24 +3345,32 @@ static void yy_destructor(
case 460: /* noarg_func */
case 478: /* alias_opt */
{
+#line 819 "sql.y"
+#line 3350 "sql.c"
}
break;
case 359: /* sysinfo_opt */
{
+#line 112 "sql.y"
+#line 3357 "sql.c"
}
break;
case 360: /* privileges */
case 363: /* priv_type_list */
case 364: /* priv_type */
{
+#line 121 "sql.y"
+#line 3366 "sql.c"
}
break;
case 361: /* priv_level */
{
+#line 138 "sql.y"
+#line 3373 "sql.c"
}
break;
case 370: /* force_opt */
@@ -3018,55 +3384,75 @@ static void yy_destructor(
case 484: /* set_quantifier_opt */
case 485: /* tag_mode_opt */
{
+#line 167 "sql.y"
+#line 3389 "sql.c"
}
break;
case 383: /* alter_db_option */
case 405: /* alter_table_option */
{
+#line 269 "sql.y"
+#line 3397 "sql.c"
}
break;
case 395: /* type_name */
{
+#line 392 "sql.y"
+#line 3404 "sql.c"
}
break;
case 410: /* db_kind_opt */
case 417: /* table_kind */
{
+#line 560 "sql.y"
+#line 3412 "sql.c"
}
break;
case 411: /* table_kind_db_name_cond_opt */
{
+#line 525 "sql.y"
+#line 3419 "sql.c"
}
break;
case 468: /* compare_op */
case 469: /* in_op */
{
+#line 1009 "sql.y"
+#line 3427 "sql.c"
}
break;
case 481: /* join_type */
{
+#line 1085 "sql.y"
+#line 3434 "sql.c"
}
break;
case 498: /* fill_mode */
{
+#line 1176 "sql.y"
+#line 3441 "sql.c"
}
break;
case 509: /* ordering_specification_opt */
{
+#line 1261 "sql.y"
+#line 3448 "sql.c"
}
break;
case 510: /* null_ordering_opt */
{
+#line 1267 "sql.y"
+#line 3455 "sql.c"
}
break;
/********* End destructor definitions *****************************************/
@@ -3233,7 +3619,7 @@ static YYACTIONTYPE yy_find_shift_action(
#endif /* YYWILDCARD */
return yy_default[stateno];
}else{
- assert( i>=0 && i=0 && i<(int)(sizeof(yy_action)/sizeof(yy_action[0])) );
return yy_action[i];
}
}while(1);
@@ -3645,7 +4031,7 @@ static const YYCODETYPE yyRuleInfoLhs[] = {
350, /* (287) cmd ::= SHOW VNODES */
350, /* (288) cmd ::= SHOW db_name_cond_opt ALIVE */
350, /* (289) cmd ::= SHOW CLUSTER ALIVE */
- 350, /* (290) cmd ::= SHOW db_name_cond_opt VIEWS */
+ 350, /* (290) cmd ::= SHOW db_name_cond_opt VIEWS like_pattern_opt */
350, /* (291) cmd ::= SHOW CREATE VIEW full_table_name */
350, /* (292) cmd ::= SHOW COMPACTS */
350, /* (293) cmd ::= SHOW COMPACT NK_INTEGER */
@@ -4297,7 +4683,7 @@ static const signed char yyRuleInfoNRhs[] = {
-2, /* (287) cmd ::= SHOW VNODES */
-3, /* (288) cmd ::= SHOW db_name_cond_opt ALIVE */
-3, /* (289) cmd ::= SHOW CLUSTER ALIVE */
- -3, /* (290) cmd ::= SHOW db_name_cond_opt VIEWS */
+ -4, /* (290) cmd ::= SHOW db_name_cond_opt VIEWS like_pattern_opt */
-4, /* (291) cmd ::= SHOW CREATE VIEW full_table_name */
-2, /* (292) cmd ::= SHOW COMPACTS */
-3, /* (293) cmd ::= SHOW COMPACT NK_INTEGER */
@@ -4683,54 +5069,6 @@ static YYACTIONTYPE yy_reduce(
(void)yyLookahead;
(void)yyLookaheadToken;
yymsp = yypParser->yytos;
-#ifndef NDEBUG
- if( yyTraceFILE && yyruleno<(int)(sizeof(yyRuleName)/sizeof(yyRuleName[0])) ){
- yysize = yyRuleInfoNRhs[yyruleno];
- if( yysize ){
- fprintf(yyTraceFILE, "%sReduce %d [%s]%s, pop back to state %d.\n",
- yyTracePrompt,
- yyruleno, yyRuleName[yyruleno],
- yyrulenoyytos - yypParser->yystack)>yypParser->yyhwm ){
- yypParser->yyhwm++;
- assert( yypParser->yyhwm == (int)(yypParser->yytos - yypParser->yystack));
- }
-#endif
-#if YYSTACKDEPTH>0
- if( yypParser->yytos>=yypParser->yystackEnd ){
- yyStackOverflow(yypParser);
- /* The call to yyStackOverflow() above pops the stack until it is
- ** empty, causing the main parser loop to exit. So the return value
- ** is never used and does not matter. */
- return 0;
- }
-#else
- if( yypParser->yytos>=&yypParser->yystack[yypParser->yystksz-1] ){
- if( yyGrowStack(yypParser) ){
- yyStackOverflow(yypParser);
- /* The call to yyStackOverflow() above pops the stack until it is
- ** empty, causing the main parser loop to exit. So the return value
- ** is never used and does not matter. */
- return 0;
- }
- yymsp = yypParser->yytos;
- }
-#endif
- }
switch( yyruleno ){
/* Beginning here are the reduction cases. A typical example
@@ -4744,15 +5082,21 @@ static YYACTIONTYPE yy_reduce(
/********** Begin reduce actions **********************************************/
YYMINORTYPE yylhsminor;
case 0: /* cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */
+#line 50 "sql.y"
{ pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); }
+#line 5087 "sql.c"
yy_destructor(yypParser,351,&yymsp[0].minor);
break;
case 1: /* cmd ::= ALTER ACCOUNT NK_ID alter_account_options */
+#line 51 "sql.y"
{ pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); }
+#line 5093 "sql.c"
yy_destructor(yypParser,352,&yymsp[0].minor);
break;
case 2: /* account_options ::= */
+#line 55 "sql.y"
{ }
+#line 5099 "sql.c"
break;
case 3: /* account_options ::= account_options PPS literal */
case 4: /* account_options ::= account_options TSERIES literal */ yytestcase(yyruleno==4);
@@ -4764,18 +5108,24 @@ static YYACTIONTYPE yy_reduce(
case 10: /* account_options ::= account_options CONNS literal */ yytestcase(yyruleno==10);
case 11: /* account_options ::= account_options STATE literal */ yytestcase(yyruleno==11);
{ yy_destructor(yypParser,351,&yymsp[-2].minor);
+#line 56 "sql.y"
{ }
+#line 5113 "sql.c"
yy_destructor(yypParser,353,&yymsp[0].minor);
}
break;
case 12: /* alter_account_options ::= alter_account_option */
{ yy_destructor(yypParser,354,&yymsp[0].minor);
+#line 68 "sql.y"
{ }
+#line 5121 "sql.c"
}
break;
case 13: /* alter_account_options ::= alter_account_options alter_account_option */
{ yy_destructor(yypParser,352,&yymsp[-1].minor);
+#line 69 "sql.y"
{ }
+#line 5128 "sql.c"
yy_destructor(yypParser,354,&yymsp[0].minor);
}
break;
@@ -4789,19 +5139,27 @@ static YYACTIONTYPE yy_reduce(
case 21: /* alter_account_option ::= USERS literal */ yytestcase(yyruleno==21);
case 22: /* alter_account_option ::= CONNS literal */ yytestcase(yyruleno==22);
case 23: /* alter_account_option ::= STATE literal */ yytestcase(yyruleno==23);
+#line 73 "sql.y"
{ }
+#line 5144 "sql.c"
yy_destructor(yypParser,353,&yymsp[0].minor);
break;
case 24: /* ip_range_list ::= NK_STRING */
+#line 86 "sql.y"
{ yylhsminor.yy502 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); }
+#line 5150 "sql.c"
yymsp[0].minor.yy502 = yylhsminor.yy502;
break;
case 25: /* ip_range_list ::= ip_range_list NK_COMMA NK_STRING */
+#line 87 "sql.y"
{ yylhsminor.yy502 = addNodeToList(pCxt, yymsp[-2].minor.yy502, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); }
+#line 5156 "sql.c"
yymsp[-2].minor.yy502 = yylhsminor.yy502;
break;
case 26: /* white_list ::= HOST ip_range_list */
+#line 91 "sql.y"
{ yymsp[-1].minor.yy502 = yymsp[0].minor.yy502; }
+#line 5162 "sql.c"
break;
case 27: /* white_list_opt ::= */
case 188: /* specific_cols_opt ::= */ yytestcase(yyruleno==188);
@@ -4812,89 +5170,137 @@ static YYACTIONTYPE yy_reduce(
case 577: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==577);
case 605: /* group_by_clause_opt ::= */ yytestcase(yyruleno==605);
case 625: /* order_by_clause_opt ::= */ yytestcase(yyruleno==625);
+#line 95 "sql.y"
{ yymsp[1].minor.yy502 = NULL; }
+#line 5175 "sql.c"
break;
case 28: /* white_list_opt ::= white_list */
case 220: /* tags_def_opt ::= tags_def */ yytestcase(yyruleno==220);
case 376: /* tag_def_or_ref_opt ::= tags_def */ yytestcase(yyruleno==376);
case 502: /* star_func_para_list ::= other_para_list */ yytestcase(yyruleno==502);
+#line 96 "sql.y"
{ yylhsminor.yy502 = yymsp[0].minor.yy502; }
+#line 5183 "sql.c"
yymsp[0].minor.yy502 = yylhsminor.yy502;
break;
case 29: /* cmd ::= CREATE USER user_name PASS NK_STRING sysinfo_opt white_list_opt */
+#line 100 "sql.y"
{
pCxt->pRootNode = createCreateUserStmt(pCxt, &yymsp[-4].minor.yy561, &yymsp[-2].minor.yy0, yymsp[-1].minor.yy1013);
pCxt->pRootNode = addCreateUserStmtWhiteList(pCxt, pCxt->pRootNode, yymsp[0].minor.yy502);
}
+#line 5192 "sql.c"
break;
case 30: /* cmd ::= ALTER USER user_name PASS NK_STRING */
+#line 104 "sql.y"
{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy561, TSDB_ALTER_USER_PASSWD, &yymsp[0].minor.yy0); }
+#line 5197 "sql.c"
break;
case 31: /* cmd ::= ALTER USER user_name ENABLE NK_INTEGER */
+#line 105 "sql.y"
{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy561, TSDB_ALTER_USER_ENABLE, &yymsp[0].minor.yy0); }
+#line 5202 "sql.c"
break;
case 32: /* cmd ::= ALTER USER user_name SYSINFO NK_INTEGER */
+#line 106 "sql.y"
{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy561, TSDB_ALTER_USER_SYSINFO, &yymsp[0].minor.yy0); }
+#line 5207 "sql.c"
break;
case 33: /* cmd ::= ALTER USER user_name ADD white_list */
+#line 107 "sql.y"
{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy561, TSDB_ALTER_USER_ADD_WHITE_LIST, yymsp[0].minor.yy502); }
+#line 5212 "sql.c"
break;
case 34: /* cmd ::= ALTER USER user_name DROP white_list */
+#line 108 "sql.y"
{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy561, TSDB_ALTER_USER_DROP_WHITE_LIST, yymsp[0].minor.yy502); }
+#line 5217 "sql.c"
break;
case 35: /* cmd ::= DROP USER user_name */
+#line 109 "sql.y"
{ pCxt->pRootNode = createDropUserStmt(pCxt, &yymsp[0].minor.yy561); }
+#line 5222 "sql.c"
break;
case 36: /* sysinfo_opt ::= */
+#line 113 "sql.y"
{ yymsp[1].minor.yy1013 = 1; }
+#line 5227 "sql.c"
break;
case 37: /* sysinfo_opt ::= SYSINFO NK_INTEGER */
+#line 114 "sql.y"
{ yymsp[-1].minor.yy1013 = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); }
+#line 5232 "sql.c"
break;
case 38: /* cmd ::= GRANT privileges ON priv_level with_opt TO user_name */
+#line 117 "sql.y"
{ pCxt->pRootNode = createGrantStmt(pCxt, yymsp[-5].minor.yy277, &yymsp[-3].minor.yy483, &yymsp[0].minor.yy561, yymsp[-2].minor.yy490); }
+#line 5237 "sql.c"
break;
case 39: /* cmd ::= REVOKE privileges ON priv_level with_opt FROM user_name */
+#line 118 "sql.y"
{ pCxt->pRootNode = createRevokeStmt(pCxt, yymsp[-5].minor.yy277, &yymsp[-3].minor.yy483, &yymsp[0].minor.yy561, yymsp[-2].minor.yy490); }
+#line 5242 "sql.c"
break;
case 40: /* privileges ::= ALL */
+#line 122 "sql.y"
{ yymsp[0].minor.yy277 = PRIVILEGE_TYPE_ALL; }
+#line 5247 "sql.c"
break;
case 41: /* privileges ::= priv_type_list */
case 43: /* priv_type_list ::= priv_type */ yytestcase(yyruleno==43);
+#line 123 "sql.y"
{ yylhsminor.yy277 = yymsp[0].minor.yy277; }
+#line 5253 "sql.c"
yymsp[0].minor.yy277 = yylhsminor.yy277;
break;
case 42: /* privileges ::= SUBSCRIBE */
+#line 124 "sql.y"
{ yymsp[0].minor.yy277 = PRIVILEGE_TYPE_SUBSCRIBE; }
+#line 5259 "sql.c"
break;
case 44: /* priv_type_list ::= priv_type_list NK_COMMA priv_type */
+#line 129 "sql.y"
{ yylhsminor.yy277 = yymsp[-2].minor.yy277 | yymsp[0].minor.yy277; }
+#line 5264 "sql.c"
yymsp[-2].minor.yy277 = yylhsminor.yy277;
break;
case 45: /* priv_type ::= READ */
+#line 133 "sql.y"
{ yymsp[0].minor.yy277 = PRIVILEGE_TYPE_READ; }
+#line 5270 "sql.c"
break;
case 46: /* priv_type ::= WRITE */
+#line 134 "sql.y"
{ yymsp[0].minor.yy277 = PRIVILEGE_TYPE_WRITE; }
+#line 5275 "sql.c"
break;
case 47: /* priv_type ::= ALTER */
+#line 135 "sql.y"
{ yymsp[0].minor.yy277 = PRIVILEGE_TYPE_ALTER; }
+#line 5280 "sql.c"
break;
case 48: /* priv_level ::= NK_STAR NK_DOT NK_STAR */
+#line 139 "sql.y"
{ yylhsminor.yy483.first = yymsp[-2].minor.yy0; yylhsminor.yy483.second = yymsp[0].minor.yy0; }
+#line 5285 "sql.c"
yymsp[-2].minor.yy483 = yylhsminor.yy483;
break;
case 49: /* priv_level ::= db_name NK_DOT NK_STAR */
+#line 140 "sql.y"
{ yylhsminor.yy483.first = yymsp[-2].minor.yy561; yylhsminor.yy483.second = yymsp[0].minor.yy0; }
+#line 5291 "sql.c"
yymsp[-2].minor.yy483 = yylhsminor.yy483;
break;
case 50: /* priv_level ::= db_name NK_DOT table_name */
+#line 141 "sql.y"
{ yylhsminor.yy483.first = yymsp[-2].minor.yy561; yylhsminor.yy483.second = yymsp[0].minor.yy561; }
+#line 5297 "sql.c"
yymsp[-2].minor.yy483 = yylhsminor.yy483;
break;
case 51: /* priv_level ::= topic_name */
+#line 142 "sql.y"
{ yylhsminor.yy483.first = yymsp[0].minor.yy561; yylhsminor.yy483.second = nil_token; }
+#line 5303 "sql.c"
yymsp[0].minor.yy483 = yylhsminor.yy483;
break;
case 52: /* with_opt ::= */
@@ -4913,46 +5319,72 @@ static YYACTIONTYPE yy_reduce(
case 614: /* every_opt ::= */ yytestcase(yyruleno==614);
case 627: /* slimit_clause_opt ::= */ yytestcase(yyruleno==627);
case 631: /* limit_clause_opt ::= */ yytestcase(yyruleno==631);
+#line 144 "sql.y"
{ yymsp[1].minor.yy490 = NULL; }
+#line 5324 "sql.c"
break;
case 53: /* with_opt ::= WITH search_condition */
case 543: /* from_clause_opt ::= FROM table_reference_list */ yytestcase(yyruleno==543);
case 576: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==576);
case 610: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==610);
+#line 145 "sql.y"
{ yymsp[-1].minor.yy490 = yymsp[0].minor.yy490; }
+#line 5332 "sql.c"
break;
case 54: /* cmd ::= CREATE DNODE dnode_endpoint */
+#line 148 "sql.y"
{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[0].minor.yy561, NULL); }
+#line 5337 "sql.c"
break;
case 55: /* cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */
+#line 149 "sql.y"
{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[-2].minor.yy561, &yymsp[0].minor.yy0); }
+#line 5342 "sql.c"
break;
case 56: /* cmd ::= DROP DNODE NK_INTEGER force_opt */
+#line 150 "sql.y"
{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy845, false); }
+#line 5347 "sql.c"
break;
case 57: /* cmd ::= DROP DNODE dnode_endpoint force_opt */
+#line 151 "sql.y"
{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy561, yymsp[0].minor.yy845, false); }
+#line 5352 "sql.c"
break;
case 58: /* cmd ::= DROP DNODE NK_INTEGER unsafe_opt */
+#line 152 "sql.y"
{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy0, false, yymsp[0].minor.yy845); }
+#line 5357 "sql.c"
break;
case 59: /* cmd ::= DROP DNODE dnode_endpoint unsafe_opt */
+#line 153 "sql.y"
{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy561, false, yymsp[0].minor.yy845); }
+#line 5362 "sql.c"
break;
case 60: /* cmd ::= ALTER DNODE NK_INTEGER NK_STRING */
+#line 154 "sql.y"
{ pCxt->pRootNode = createAlterDnodeStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, NULL); }
+#line 5367 "sql.c"
break;
case 61: /* cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */
+#line 155 "sql.y"
{ pCxt->pRootNode = createAlterDnodeStmt(pCxt, &yymsp[-2].minor.yy0, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); }
+#line 5372 "sql.c"
break;
case 62: /* cmd ::= ALTER ALL DNODES NK_STRING */
+#line 156 "sql.y"
{ pCxt->pRootNode = createAlterDnodeStmt(pCxt, NULL, &yymsp[0].minor.yy0, NULL); }
+#line 5377 "sql.c"
break;
case 63: /* cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */
+#line 157 "sql.y"
{ pCxt->pRootNode = createAlterDnodeStmt(pCxt, NULL, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); }
+#line 5382 "sql.c"
break;
case 64: /* cmd ::= RESTORE DNODE NK_INTEGER */
+#line 158 "sql.y"
{ pCxt->pRootNode = createRestoreComponentNodeStmt(pCxt, QUERY_NODE_RESTORE_DNODE_STMT, &yymsp[0].minor.yy0); }
+#line 5387 "sql.c"
break;
case 65: /* dnode_endpoint ::= NK_STRING */
case 66: /* dnode_endpoint ::= NK_ID */ yytestcase(yyruleno==66);
@@ -4987,7 +5419,9 @@ static YYACTIONTYPE yy_reduce(
case 498: /* star_func ::= FIRST */ yytestcase(yyruleno==498);
case 499: /* star_func ::= LAST */ yytestcase(yyruleno==499);
case 500: /* star_func ::= LAST_ROW */ yytestcase(yyruleno==500);
+#line 162 "sql.y"
{ yylhsminor.yy561 = yymsp[0].minor.yy0; }
+#line 5424 "sql.c"
yymsp[0].minor.yy561 = yylhsminor.yy561;
break;
case 68: /* force_opt ::= */
@@ -4999,7 +5433,9 @@ static YYACTIONTYPE yy_reduce(
case 389: /* ignore_opt ::= */ yytestcase(yyruleno==389);
case 563: /* tag_mode_opt ::= */ yytestcase(yyruleno==563);
case 565: /* set_quantifier_opt ::= */ yytestcase(yyruleno==565);
+#line 168 "sql.y"
{ yymsp[1].minor.yy845 = false; }
+#line 5438 "sql.c"
break;
case 69: /* force_opt ::= FORCE */
case 70: /* unsafe_opt ::= UNSAFE */ yytestcase(yyruleno==70);
@@ -5007,288 +5443,440 @@ static YYACTIONTYPE yy_reduce(
case 358: /* agg_func_opt ::= AGGREGATE */ yytestcase(yyruleno==358);
case 564: /* tag_mode_opt ::= TAGS */ yytestcase(yyruleno==564);
case 566: /* set_quantifier_opt ::= DISTINCT */ yytestcase(yyruleno==566);
+#line 169 "sql.y"
{ yymsp[0].minor.yy845 = true; }
+#line 5448 "sql.c"
break;
case 71: /* cmd ::= ALTER CLUSTER NK_STRING */
+#line 176 "sql.y"
{ pCxt->pRootNode = createAlterClusterStmt(pCxt, &yymsp[0].minor.yy0, NULL); }
+#line 5453 "sql.c"
break;
case 72: /* cmd ::= ALTER CLUSTER NK_STRING NK_STRING */
+#line 177 "sql.y"
{ pCxt->pRootNode = createAlterClusterStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); }
+#line 5458 "sql.c"
break;
case 73: /* cmd ::= ALTER LOCAL NK_STRING */
+#line 180 "sql.y"
{ pCxt->pRootNode = createAlterLocalStmt(pCxt, &yymsp[0].minor.yy0, NULL); }
+#line 5463 "sql.c"
break;
case 74: /* cmd ::= ALTER LOCAL NK_STRING NK_STRING */
+#line 181 "sql.y"
{ pCxt->pRootNode = createAlterLocalStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); }
+#line 5468 "sql.c"
break;
case 75: /* cmd ::= CREATE QNODE ON DNODE NK_INTEGER */
+#line 184 "sql.y"
{ pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_QNODE_STMT, &yymsp[0].minor.yy0); }
+#line 5473 "sql.c"
break;
case 76: /* cmd ::= DROP QNODE ON DNODE NK_INTEGER */
+#line 185 "sql.y"
{ pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_QNODE_STMT, &yymsp[0].minor.yy0); }
+#line 5478 "sql.c"
break;
case 77: /* cmd ::= RESTORE QNODE ON DNODE NK_INTEGER */
+#line 186 "sql.y"
{ pCxt->pRootNode = createRestoreComponentNodeStmt(pCxt, QUERY_NODE_RESTORE_QNODE_STMT, &yymsp[0].minor.yy0); }
+#line 5483 "sql.c"
break;
case 78: /* cmd ::= CREATE BNODE ON DNODE NK_INTEGER */
+#line 189 "sql.y"
{ pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_BNODE_STMT, &yymsp[0].minor.yy0); }
+#line 5488 "sql.c"
break;
case 79: /* cmd ::= DROP BNODE ON DNODE NK_INTEGER */
+#line 190 "sql.y"
{ pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_BNODE_STMT, &yymsp[0].minor.yy0); }
+#line 5493 "sql.c"
break;
case 80: /* cmd ::= CREATE SNODE ON DNODE NK_INTEGER */
+#line 193 "sql.y"
{ pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_SNODE_STMT, &yymsp[0].minor.yy0); }
+#line 5498 "sql.c"
break;
case 81: /* cmd ::= DROP SNODE ON DNODE NK_INTEGER */
+#line 194 "sql.y"
{ pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_SNODE_STMT, &yymsp[0].minor.yy0); }
+#line 5503 "sql.c"
break;
case 82: /* cmd ::= CREATE MNODE ON DNODE NK_INTEGER */
+#line 197 "sql.y"
{ pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_MNODE_STMT, &yymsp[0].minor.yy0); }
+#line 5508 "sql.c"
break;
case 83: /* cmd ::= DROP MNODE ON DNODE NK_INTEGER */
+#line 198 "sql.y"
{ pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_MNODE_STMT, &yymsp[0].minor.yy0); }
+#line 5513 "sql.c"
break;
case 84: /* cmd ::= RESTORE MNODE ON DNODE NK_INTEGER */
+#line 199 "sql.y"
{ pCxt->pRootNode = createRestoreComponentNodeStmt(pCxt, QUERY_NODE_RESTORE_MNODE_STMT, &yymsp[0].minor.yy0); }
+#line 5518 "sql.c"
break;
case 85: /* cmd ::= RESTORE VNODE ON DNODE NK_INTEGER */
+#line 202 "sql.y"
{ pCxt->pRootNode = createRestoreComponentNodeStmt(pCxt, QUERY_NODE_RESTORE_VNODE_STMT, &yymsp[0].minor.yy0); }
+#line 5523 "sql.c"
break;
case 86: /* cmd ::= CREATE DATABASE not_exists_opt db_name db_options */
+#line 205 "sql.y"
{ pCxt->pRootNode = createCreateDatabaseStmt(pCxt, yymsp[-2].minor.yy845, &yymsp[-1].minor.yy561, yymsp[0].minor.yy490); }
+#line 5528 "sql.c"
break;
case 87: /* cmd ::= DROP DATABASE exists_opt db_name */
+#line 206 "sql.y"
{ pCxt->pRootNode = createDropDatabaseStmt(pCxt, yymsp[-1].minor.yy845, &yymsp[0].minor.yy561); }
+#line 5533 "sql.c"
break;
case 88: /* cmd ::= USE db_name */
+#line 207 "sql.y"
{ pCxt->pRootNode = createUseDatabaseStmt(pCxt, &yymsp[0].minor.yy561); }
+#line 5538 "sql.c"
break;
case 89: /* cmd ::= ALTER DATABASE db_name alter_db_options */
+#line 208 "sql.y"
{ pCxt->pRootNode = createAlterDatabaseStmt(pCxt, &yymsp[-1].minor.yy561, yymsp[0].minor.yy490); }
+#line 5543 "sql.c"
break;
case 90: /* cmd ::= FLUSH DATABASE db_name */
+#line 209 "sql.y"
{ pCxt->pRootNode = createFlushDatabaseStmt(pCxt, &yymsp[0].minor.yy561); }
+#line 5548 "sql.c"
break;
case 91: /* cmd ::= TRIM DATABASE db_name speed_opt */
+#line 210 "sql.y"
{ pCxt->pRootNode = createTrimDatabaseStmt(pCxt, &yymsp[-1].minor.yy561, yymsp[0].minor.yy774); }
+#line 5553 "sql.c"
break;
case 92: /* cmd ::= COMPACT DATABASE db_name start_opt end_opt */
+#line 211 "sql.y"
{ pCxt->pRootNode = createCompactStmt(pCxt, &yymsp[-2].minor.yy561, yymsp[-1].minor.yy490, yymsp[0].minor.yy490); }
+#line 5558 "sql.c"
break;
case 93: /* not_exists_opt ::= IF NOT EXISTS */
+#line 215 "sql.y"
{ yymsp[-2].minor.yy845 = true; }
+#line 5563 "sql.c"
break;
case 95: /* exists_opt ::= IF EXISTS */
case 364: /* or_replace_opt ::= OR REPLACE */ yytestcase(yyruleno==364);
case 390: /* ignore_opt ::= IGNORE UNTREATED */ yytestcase(yyruleno==390);
+#line 220 "sql.y"
{ yymsp[-1].minor.yy845 = true; }
+#line 5570 "sql.c"
break;
case 97: /* db_options ::= */
+#line 223 "sql.y"
{ yymsp[1].minor.yy490 = createDefaultDatabaseOptions(pCxt); }
+#line 5575 "sql.c"
break;
case 98: /* db_options ::= db_options BUFFER NK_INTEGER */
+#line 224 "sql.y"
{ yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-2].minor.yy490, DB_OPTION_BUFFER, &yymsp[0].minor.yy0); }
+#line 5580 "sql.c"
yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
case 99: /* db_options ::= db_options CACHEMODEL NK_STRING */
+#line 225 "sql.y"
{ yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-2].minor.yy490, DB_OPTION_CACHEMODEL, &yymsp[0].minor.yy0); }
+#line 5586 "sql.c"
yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
case 100: /* db_options ::= db_options CACHESIZE NK_INTEGER */
+#line 226 "sql.y"
{ yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-2].minor.yy490, DB_OPTION_CACHESIZE, &yymsp[0].minor.yy0); }
+#line 5592 "sql.c"
yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
case 101: /* db_options ::= db_options COMP NK_INTEGER */
+#line 227 "sql.y"
{ yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-2].minor.yy490, DB_OPTION_COMP, &yymsp[0].minor.yy0); }
+#line 5598 "sql.c"
yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
case 102: /* db_options ::= db_options DURATION NK_INTEGER */
case 103: /* db_options ::= db_options DURATION NK_VARIABLE */ yytestcase(yyruleno==103);
+#line 228 "sql.y"
{ yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-2].minor.yy490, DB_OPTION_DAYS, &yymsp[0].minor.yy0); }
+#line 5605 "sql.c"
yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
case 104: /* db_options ::= db_options MAXROWS NK_INTEGER */
+#line 230 "sql.y"
{ yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-2].minor.yy490, DB_OPTION_MAXROWS, &yymsp[0].minor.yy0); }
+#line 5611 "sql.c"
yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
case 105: /* db_options ::= db_options MINROWS NK_INTEGER */
+#line 231 "sql.y"
{ yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-2].minor.yy490, DB_OPTION_MINROWS, &yymsp[0].minor.yy0); }
+#line 5617 "sql.c"
yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
case 106: /* db_options ::= db_options KEEP integer_list */
case 107: /* db_options ::= db_options KEEP variable_list */ yytestcase(yyruleno==107);
+#line 232 "sql.y"
{ yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-2].minor.yy490, DB_OPTION_KEEP, yymsp[0].minor.yy502); }
+#line 5624 "sql.c"
yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
case 108: /* db_options ::= db_options PAGES NK_INTEGER */
+#line 234 "sql.y"
{ yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-2].minor.yy490, DB_OPTION_PAGES, &yymsp[0].minor.yy0); }
+#line 5630 "sql.c"
yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
case 109: /* db_options ::= db_options PAGESIZE NK_INTEGER */
+#line 235 "sql.y"
{ yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-2].minor.yy490, DB_OPTION_PAGESIZE, &yymsp[0].minor.yy0); }
+#line 5636 "sql.c"
yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
case 110: /* db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */
+#line 236 "sql.y"
{ yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-2].minor.yy490, DB_OPTION_TSDB_PAGESIZE, &yymsp[0].minor.yy0); }
+#line 5642 "sql.c"
yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
case 111: /* db_options ::= db_options PRECISION NK_STRING */
+#line 237 "sql.y"
{ yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-2].minor.yy490, DB_OPTION_PRECISION, &yymsp[0].minor.yy0); }
+#line 5648 "sql.c"
yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
case 112: /* db_options ::= db_options REPLICA NK_INTEGER */
+#line 238 "sql.y"
{ yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-2].minor.yy490, DB_OPTION_REPLICA, &yymsp[0].minor.yy0); }
+#line 5654 "sql.c"
yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
case 113: /* db_options ::= db_options VGROUPS NK_INTEGER */
+#line 240 "sql.y"
{ yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-2].minor.yy490, DB_OPTION_VGROUPS, &yymsp[0].minor.yy0); }
+#line 5660 "sql.c"
yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
case 114: /* db_options ::= db_options SINGLE_STABLE NK_INTEGER */
+#line 241 "sql.y"
{ yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-2].minor.yy490, DB_OPTION_SINGLE_STABLE, &yymsp[0].minor.yy0); }
+#line 5666 "sql.c"
yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
case 115: /* db_options ::= db_options RETENTIONS retention_list */
+#line 242 "sql.y"
{ yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-2].minor.yy490, DB_OPTION_RETENTIONS, yymsp[0].minor.yy502); }
+#line 5672 "sql.c"
yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
case 116: /* db_options ::= db_options SCHEMALESS NK_INTEGER */
+#line 243 "sql.y"
{ yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-2].minor.yy490, DB_OPTION_SCHEMALESS, &yymsp[0].minor.yy0); }
+#line 5678 "sql.c"
yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
case 117: /* db_options ::= db_options WAL_LEVEL NK_INTEGER */
+#line 244 "sql.y"
{ yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-2].minor.yy490, DB_OPTION_WAL, &yymsp[0].minor.yy0); }
+#line 5684 "sql.c"
yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
case 118: /* db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */
+#line 245 "sql.y"
{ yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-2].minor.yy490, DB_OPTION_FSYNC, &yymsp[0].minor.yy0); }
+#line 5690 "sql.c"
yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
case 119: /* db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */
+#line 246 "sql.y"
{ yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-2].minor.yy490, DB_OPTION_WAL_RETENTION_PERIOD, &yymsp[0].minor.yy0); }
+#line 5696 "sql.c"
yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
case 120: /* db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */
+#line 247 "sql.y"
{
SToken t = yymsp[-1].minor.yy0;
t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z;
yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-3].minor.yy490, DB_OPTION_WAL_RETENTION_PERIOD, &t);
}
+#line 5706 "sql.c"
yymsp[-3].minor.yy490 = yylhsminor.yy490;
break;
case 121: /* db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */
+#line 252 "sql.y"
{ yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-2].minor.yy490, DB_OPTION_WAL_RETENTION_SIZE, &yymsp[0].minor.yy0); }
+#line 5712 "sql.c"
yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
case 122: /* db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */
+#line 253 "sql.y"
{
SToken t = yymsp[-1].minor.yy0;
t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z;
yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-3].minor.yy490, DB_OPTION_WAL_RETENTION_SIZE, &t);
}
+#line 5722 "sql.c"
yymsp[-3].minor.yy490 = yylhsminor.yy490;
break;
case 123: /* db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */
+#line 258 "sql.y"
{ yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-2].minor.yy490, DB_OPTION_WAL_ROLL_PERIOD, &yymsp[0].minor.yy0); }
+#line 5728 "sql.c"
yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
case 124: /* db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */
+#line 259 "sql.y"
{ yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-2].minor.yy490, DB_OPTION_WAL_SEGMENT_SIZE, &yymsp[0].minor.yy0); }
+#line 5734 "sql.c"
yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
case 125: /* db_options ::= db_options STT_TRIGGER NK_INTEGER */
+#line 260 "sql.y"
{ yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-2].minor.yy490, DB_OPTION_STT_TRIGGER, &yymsp[0].minor.yy0); }
+#line 5740 "sql.c"
yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
case 126: /* db_options ::= db_options TABLE_PREFIX signed */
+#line 261 "sql.y"
{ yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-2].minor.yy490, DB_OPTION_TABLE_PREFIX, yymsp[0].minor.yy490); }
+#line 5746 "sql.c"
yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
case 127: /* db_options ::= db_options TABLE_SUFFIX signed */
+#line 262 "sql.y"
{ yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-2].minor.yy490, DB_OPTION_TABLE_SUFFIX, yymsp[0].minor.yy490); }
+#line 5752 "sql.c"
yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
case 128: /* db_options ::= db_options KEEP_TIME_OFFSET NK_INTEGER */
+#line 263 "sql.y"
{ yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-2].minor.yy490, DB_OPTION_KEEP_TIME_OFFSET, &yymsp[0].minor.yy0); }
+#line 5758 "sql.c"
yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
case 129: /* alter_db_options ::= alter_db_option */
+#line 265 "sql.y"
{ yylhsminor.yy490 = createAlterDatabaseOptions(pCxt); yylhsminor.yy490 = setAlterDatabaseOption(pCxt, yylhsminor.yy490, &yymsp[0].minor.yy529); }
+#line 5764 "sql.c"
yymsp[0].minor.yy490 = yylhsminor.yy490;
break;
case 130: /* alter_db_options ::= alter_db_options alter_db_option */
+#line 266 "sql.y"
{ yylhsminor.yy490 = setAlterDatabaseOption(pCxt, yymsp[-1].minor.yy490, &yymsp[0].minor.yy529); }
+#line 5770 "sql.c"
yymsp[-1].minor.yy490 = yylhsminor.yy490;
break;
case 131: /* alter_db_option ::= BUFFER NK_INTEGER */
+#line 270 "sql.y"
{ yymsp[-1].minor.yy529.type = DB_OPTION_BUFFER; yymsp[-1].minor.yy529.val = yymsp[0].minor.yy0; }
+#line 5776 "sql.c"
break;
case 132: /* alter_db_option ::= CACHEMODEL NK_STRING */
+#line 271 "sql.y"
{ yymsp[-1].minor.yy529.type = DB_OPTION_CACHEMODEL; yymsp[-1].minor.yy529.val = yymsp[0].minor.yy0; }
+#line 5781 "sql.c"
break;
case 133: /* alter_db_option ::= CACHESIZE NK_INTEGER */
+#line 272 "sql.y"
{ yymsp[-1].minor.yy529.type = DB_OPTION_CACHESIZE; yymsp[-1].minor.yy529.val = yymsp[0].minor.yy0; }
+#line 5786 "sql.c"
break;
case 134: /* alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */
+#line 273 "sql.y"
{ yymsp[-1].minor.yy529.type = DB_OPTION_FSYNC; yymsp[-1].minor.yy529.val = yymsp[0].minor.yy0; }
+#line 5791 "sql.c"
break;
case 135: /* alter_db_option ::= KEEP integer_list */
case 136: /* alter_db_option ::= KEEP variable_list */ yytestcase(yyruleno==136);
+#line 274 "sql.y"
{ yymsp[-1].minor.yy529.type = DB_OPTION_KEEP; yymsp[-1].minor.yy529.pList = yymsp[0].minor.yy502; }
+#line 5797 "sql.c"
break;
case 137: /* alter_db_option ::= PAGES NK_INTEGER */
+#line 276 "sql.y"
{ yymsp[-1].minor.yy529.type = DB_OPTION_PAGES; yymsp[-1].minor.yy529.val = yymsp[0].minor.yy0; }
+#line 5802 "sql.c"
break;
case 138: /* alter_db_option ::= REPLICA NK_INTEGER */
+#line 277 "sql.y"
{ yymsp[-1].minor.yy529.type = DB_OPTION_REPLICA; yymsp[-1].minor.yy529.val = yymsp[0].minor.yy0; }
+#line 5807 "sql.c"
break;
case 139: /* alter_db_option ::= WAL_LEVEL NK_INTEGER */
+#line 279 "sql.y"
{ yymsp[-1].minor.yy529.type = DB_OPTION_WAL; yymsp[-1].minor.yy529.val = yymsp[0].minor.yy0; }
+#line 5812 "sql.c"
break;
case 140: /* alter_db_option ::= STT_TRIGGER NK_INTEGER */
+#line 280 "sql.y"
{ yymsp[-1].minor.yy529.type = DB_OPTION_STT_TRIGGER; yymsp[-1].minor.yy529.val = yymsp[0].minor.yy0; }
+#line 5817 "sql.c"
break;
case 141: /* alter_db_option ::= MINROWS NK_INTEGER */
+#line 281 "sql.y"
{ yymsp[-1].minor.yy529.type = DB_OPTION_MINROWS; yymsp[-1].minor.yy529.val = yymsp[0].minor.yy0; }
+#line 5822 "sql.c"
break;
case 142: /* alter_db_option ::= WAL_RETENTION_PERIOD NK_INTEGER */
+#line 282 "sql.y"
{ yymsp[-1].minor.yy529.type = DB_OPTION_WAL_RETENTION_PERIOD; yymsp[-1].minor.yy529.val = yymsp[0].minor.yy0; }
+#line 5827 "sql.c"
break;
case 143: /* alter_db_option ::= WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */
+#line 283 "sql.y"
{
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.yy529.type = DB_OPTION_WAL_RETENTION_PERIOD; yymsp[-2].minor.yy529.val = t;
}
+#line 5836 "sql.c"
break;
case 144: /* alter_db_option ::= WAL_RETENTION_SIZE NK_INTEGER */
+#line 288 "sql.y"
{ yymsp[-1].minor.yy529.type = DB_OPTION_WAL_RETENTION_SIZE; yymsp[-1].minor.yy529.val = yymsp[0].minor.yy0; }
+#line 5841 "sql.c"
break;
case 145: /* alter_db_option ::= WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */
+#line 289 "sql.y"
{
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.yy529.type = DB_OPTION_WAL_RETENTION_SIZE; yymsp[-2].minor.yy529.val = t;
}
+#line 5850 "sql.c"
break;
case 146: /* alter_db_option ::= KEEP_TIME_OFFSET NK_INTEGER */
+#line 294 "sql.y"
{ yymsp[-1].minor.yy529.type = DB_OPTION_KEEP_TIME_OFFSET; yymsp[-1].minor.yy529.val = yymsp[0].minor.yy0; }
+#line 5855 "sql.c"
break;
case 147: /* integer_list ::= NK_INTEGER */
+#line 298 "sql.y"
{ yylhsminor.yy502 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); }
+#line 5860 "sql.c"
yymsp[0].minor.yy502 = yylhsminor.yy502;
break;
case 148: /* integer_list ::= integer_list NK_COMMA NK_INTEGER */
case 403: /* dnode_list ::= dnode_list DNODE NK_INTEGER */ yytestcase(yyruleno==403);
+#line 299 "sql.y"
{ yylhsminor.yy502 = addNodeToList(pCxt, yymsp[-2].minor.yy502, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); }
+#line 5867 "sql.c"
yymsp[-2].minor.yy502 = yylhsminor.yy502;
break;
case 149: /* variable_list ::= NK_VARIABLE */
+#line 303 "sql.y"
{ yylhsminor.yy502 = createNodeList(pCxt, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); }
+#line 5873 "sql.c"
yymsp[0].minor.yy502 = yylhsminor.yy502;
break;
case 150: /* variable_list ::= variable_list NK_COMMA NK_VARIABLE */
+#line 304 "sql.y"
{ yylhsminor.yy502 = addNodeToList(pCxt, yymsp[-2].minor.yy502, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); }
+#line 5879 "sql.c"
yymsp[-2].minor.yy502 = yylhsminor.yy502;
break;
case 151: /* retention_list ::= retention */
@@ -5305,7 +5893,9 @@ static YYACTIONTYPE yy_reduce(
case 568: /* select_list ::= select_item */ yytestcase(yyruleno==568);
case 579: /* partition_list ::= partition_item */ yytestcase(yyruleno==579);
case 638: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==638);
+#line 308 "sql.y"
{ yylhsminor.yy502 = createNodeList(pCxt, yymsp[0].minor.yy490); }
+#line 5898 "sql.c"
yymsp[0].minor.yy502 = yylhsminor.yy502;
break;
case 152: /* retention_list ::= retention_list NK_COMMA retention */
@@ -5320,704 +5910,1106 @@ static YYACTIONTYPE yy_reduce(
case 569: /* select_list ::= select_list NK_COMMA select_item */ yytestcase(yyruleno==569);
case 580: /* partition_list ::= partition_list NK_COMMA partition_item */ yytestcase(yyruleno==580);
case 639: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==639);
+#line 309 "sql.y"
{ yylhsminor.yy502 = addNodeToList(pCxt, yymsp[-2].minor.yy502, yymsp[0].minor.yy490); }
+#line 5915 "sql.c"
yymsp[-2].minor.yy502 = yylhsminor.yy502;
break;
case 153: /* retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */
case 154: /* retention ::= NK_MINUS NK_COLON NK_VARIABLE */ yytestcase(yyruleno==154);
+#line 311 "sql.y"
{ yylhsminor.yy490 = createNodeListNodeEx(pCxt, createDurationValueNode(pCxt, &yymsp[-2].minor.yy0), createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); }
+#line 5922 "sql.c"
yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
case 155: /* speed_opt ::= */
case 359: /* bufsize_opt ::= */ yytestcase(yyruleno==359);
+#line 316 "sql.y"
{ yymsp[1].minor.yy774 = 0; }
+#line 5929 "sql.c"
break;
case 156: /* speed_opt ::= BWLIMIT NK_INTEGER */
case 360: /* bufsize_opt ::= BUFSIZE NK_INTEGER */ yytestcase(yyruleno==360);
+#line 317 "sql.y"
{ yymsp[-1].minor.yy774 = taosStr2Int32(yymsp[0].minor.yy0.z, NULL, 10); }
+#line 5935 "sql.c"
break;
case 158: /* start_opt ::= START WITH NK_INTEGER */
case 162: /* end_opt ::= END WITH NK_INTEGER */ yytestcase(yyruleno==162);
+#line 320 "sql.y"
{ yymsp[-2].minor.yy490 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); }
+#line 5941 "sql.c"
break;
case 159: /* start_opt ::= START WITH NK_STRING */
case 163: /* end_opt ::= END WITH NK_STRING */ yytestcase(yyruleno==163);
+#line 321 "sql.y"
{ yymsp[-2].minor.yy490 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); }
+#line 5947 "sql.c"
break;
case 160: /* start_opt ::= START WITH TIMESTAMP NK_STRING */
case 164: /* end_opt ::= END WITH TIMESTAMP NK_STRING */ yytestcase(yyruleno==164);
+#line 322 "sql.y"
{ yymsp[-3].minor.yy490 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); }
+#line 5953 "sql.c"
break;
case 165: /* cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */
case 167: /* cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ yytestcase(yyruleno==167);
+#line 331 "sql.y"
{ pCxt->pRootNode = createCreateTableStmt(pCxt, yymsp[-6].minor.yy845, yymsp[-5].minor.yy490, yymsp[-3].minor.yy502, yymsp[-1].minor.yy502, yymsp[0].minor.yy490); }
+#line 5959 "sql.c"
break;
case 166: /* cmd ::= CREATE TABLE multi_create_clause */
+#line 332 "sql.y"
{ pCxt->pRootNode = createCreateMultiTableStmt(pCxt, yymsp[0].minor.yy502); }
+#line 5964 "sql.c"
break;
case 168: /* cmd ::= DROP TABLE multi_drop_clause */
+#line 335 "sql.y"
{ pCxt->pRootNode = createDropTableStmt(pCxt, yymsp[0].minor.yy502); }
+#line 5969 "sql.c"
break;
case 169: /* cmd ::= DROP STABLE exists_opt full_table_name */
+#line 336 "sql.y"
{ pCxt->pRootNode = createDropSuperTableStmt(pCxt, yymsp[-1].minor.yy845, yymsp[0].minor.yy490); }
+#line 5974 "sql.c"
break;
case 170: /* cmd ::= ALTER TABLE alter_table_clause */
case 405: /* cmd ::= query_or_subquery */ yytestcase(yyruleno==405);
case 406: /* cmd ::= insert_query */ yytestcase(yyruleno==406);
+#line 338 "sql.y"
{ pCxt->pRootNode = yymsp[0].minor.yy490; }
+#line 5981 "sql.c"
break;
case 171: /* cmd ::= ALTER STABLE alter_table_clause */
+#line 339 "sql.y"
{ pCxt->pRootNode = setAlterSuperTableType(yymsp[0].minor.yy490); }
+#line 5986 "sql.c"
break;
case 172: /* alter_table_clause ::= full_table_name alter_table_options */
+#line 341 "sql.y"
{ yylhsminor.yy490 = createAlterTableModifyOptions(pCxt, yymsp[-1].minor.yy490, yymsp[0].minor.yy490); }
+#line 5991 "sql.c"
yymsp[-1].minor.yy490 = yylhsminor.yy490;
break;
case 173: /* alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */
+#line 343 "sql.y"
{ yylhsminor.yy490 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy490, TSDB_ALTER_TABLE_ADD_COLUMN, &yymsp[-1].minor.yy561, yymsp[0].minor.yy826); }
+#line 5997 "sql.c"
yymsp[-4].minor.yy490 = yylhsminor.yy490;
break;
case 174: /* alter_table_clause ::= full_table_name DROP COLUMN column_name */
+#line 344 "sql.y"
{ yylhsminor.yy490 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy490, TSDB_ALTER_TABLE_DROP_COLUMN, &yymsp[0].minor.yy561); }
+#line 6003 "sql.c"
yymsp[-3].minor.yy490 = yylhsminor.yy490;
break;
case 175: /* alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */
+#line 346 "sql.y"
{ yylhsminor.yy490 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy490, TSDB_ALTER_TABLE_UPDATE_COLUMN_BYTES, &yymsp[-1].minor.yy561, yymsp[0].minor.yy826); }
+#line 6009 "sql.c"
yymsp[-4].minor.yy490 = yylhsminor.yy490;
break;
case 176: /* alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */
+#line 348 "sql.y"
{ yylhsminor.yy490 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy490, TSDB_ALTER_TABLE_UPDATE_COLUMN_NAME, &yymsp[-1].minor.yy561, &yymsp[0].minor.yy561); }
+#line 6015 "sql.c"
yymsp[-4].minor.yy490 = yylhsminor.yy490;
break;
case 177: /* alter_table_clause ::= full_table_name ADD TAG column_name type_name */
+#line 350 "sql.y"
{ yylhsminor.yy490 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy490, TSDB_ALTER_TABLE_ADD_TAG, &yymsp[-1].minor.yy561, yymsp[0].minor.yy826); }
+#line 6021 "sql.c"
yymsp[-4].minor.yy490 = yylhsminor.yy490;
break;
case 178: /* alter_table_clause ::= full_table_name DROP TAG column_name */
+#line 351 "sql.y"
{ yylhsminor.yy490 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy490, TSDB_ALTER_TABLE_DROP_TAG, &yymsp[0].minor.yy561); }
+#line 6027 "sql.c"
yymsp[-3].minor.yy490 = yylhsminor.yy490;
break;
case 179: /* alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */
+#line 353 "sql.y"
{ yylhsminor.yy490 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy490, TSDB_ALTER_TABLE_UPDATE_TAG_BYTES, &yymsp[-1].minor.yy561, yymsp[0].minor.yy826); }
+#line 6033 "sql.c"
yymsp[-4].minor.yy490 = yylhsminor.yy490;
break;
case 180: /* alter_table_clause ::= full_table_name RENAME TAG column_name column_name */
+#line 355 "sql.y"
{ yylhsminor.yy490 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy490, TSDB_ALTER_TABLE_UPDATE_TAG_NAME, &yymsp[-1].minor.yy561, &yymsp[0].minor.yy561); }
+#line 6039 "sql.c"
yymsp[-4].minor.yy490 = yylhsminor.yy490;
break;
case 181: /* alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */
+#line 357 "sql.y"
{ yylhsminor.yy490 = createAlterTableSetTag(pCxt, yymsp[-5].minor.yy490, &yymsp[-2].minor.yy561, yymsp[0].minor.yy490); }
+#line 6045 "sql.c"
yymsp[-5].minor.yy490 = yylhsminor.yy490;
break;
case 183: /* multi_create_clause ::= multi_create_clause create_subtable_clause */
case 510: /* when_then_list ::= when_then_list when_then_expr */ yytestcase(yyruleno==510);
+#line 362 "sql.y"
{ yylhsminor.yy502 = addNodeToList(pCxt, yymsp[-1].minor.yy502, yymsp[0].minor.yy490); }
+#line 6052 "sql.c"
yymsp[-1].minor.yy502 = yylhsminor.yy502;
break;
case 184: /* 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 */
+#line 366 "sql.y"
{ yylhsminor.yy490 = createCreateSubTableClause(pCxt, yymsp[-9].minor.yy845, yymsp[-8].minor.yy490, yymsp[-6].minor.yy490, yymsp[-5].minor.yy502, yymsp[-2].minor.yy502, yymsp[0].minor.yy490); }
+#line 6058 "sql.c"
yymsp[-9].minor.yy490 = yylhsminor.yy490;
break;
case 187: /* drop_table_clause ::= exists_opt full_table_name */
+#line 373 "sql.y"
{ yylhsminor.yy490 = createDropTableClause(pCxt, yymsp[-1].minor.yy845, yymsp[0].minor.yy490); }
+#line 6064 "sql.c"
yymsp[-1].minor.yy490 = yylhsminor.yy490;
break;
case 189: /* specific_cols_opt ::= NK_LP col_name_list NK_RP */
case 374: /* col_list_opt ::= NK_LP col_name_list NK_RP */ yytestcase(yyruleno==374);
+#line 378 "sql.y"
{ yymsp[-2].minor.yy502 = yymsp[-1].minor.yy502; }
+#line 6071 "sql.c"
break;
case 190: /* full_table_name ::= table_name */
+#line 380 "sql.y"
{ yylhsminor.yy490 = createRealTableNode(pCxt, NULL, &yymsp[0].minor.yy561, NULL); }
+#line 6076 "sql.c"
yymsp[0].minor.yy490 = yylhsminor.yy490;
break;
case 191: /* full_table_name ::= db_name NK_DOT table_name */
+#line 381 "sql.y"
{ yylhsminor.yy490 = createRealTableNode(pCxt, &yymsp[-2].minor.yy561, &yymsp[0].minor.yy561, NULL); }
+#line 6082 "sql.c"
yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
case 194: /* column_def ::= column_name type_name */
+#line 388 "sql.y"
{ yylhsminor.yy490 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy561, yymsp[0].minor.yy826, NULL); }
+#line 6088 "sql.c"
yymsp[-1].minor.yy490 = yylhsminor.yy490;
break;
case 195: /* type_name ::= BOOL */
+#line 393 "sql.y"
{ yymsp[0].minor.yy826 = createDataType(TSDB_DATA_TYPE_BOOL); }
+#line 6094 "sql.c"
break;
case 196: /* type_name ::= TINYINT */
+#line 394 "sql.y"
{ yymsp[0].minor.yy826 = createDataType(TSDB_DATA_TYPE_TINYINT); }
+#line 6099 "sql.c"
break;
case 197: /* type_name ::= SMALLINT */
+#line 395 "sql.y"
{ yymsp[0].minor.yy826 = createDataType(TSDB_DATA_TYPE_SMALLINT); }
+#line 6104 "sql.c"
break;
case 198: /* type_name ::= INT */
case 199: /* type_name ::= INTEGER */ yytestcase(yyruleno==199);
+#line 396 "sql.y"
{ yymsp[0].minor.yy826 = createDataType(TSDB_DATA_TYPE_INT); }
+#line 6110 "sql.c"
break;
case 200: /* type_name ::= BIGINT */
+#line 398 "sql.y"
{ yymsp[0].minor.yy826 = createDataType(TSDB_DATA_TYPE_BIGINT); }
+#line 6115 "sql.c"
break;
case 201: /* type_name ::= FLOAT */
+#line 399 "sql.y"
{ yymsp[0].minor.yy826 = createDataType(TSDB_DATA_TYPE_FLOAT); }
+#line 6120 "sql.c"
break;
case 202: /* type_name ::= DOUBLE */
+#line 400 "sql.y"
{ yymsp[0].minor.yy826 = createDataType(TSDB_DATA_TYPE_DOUBLE); }
+#line 6125 "sql.c"
break;
case 203: /* type_name ::= BINARY NK_LP NK_INTEGER NK_RP */
+#line 401 "sql.y"
{ yymsp[-3].minor.yy826 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy0); }
+#line 6130 "sql.c"
break;
case 204: /* type_name ::= TIMESTAMP */
+#line 402 "sql.y"
{ yymsp[0].minor.yy826 = createDataType(TSDB_DATA_TYPE_TIMESTAMP); }
+#line 6135 "sql.c"
break;
case 205: /* type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */
+#line 403 "sql.y"
{ yymsp[-3].minor.yy826 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, &yymsp[-1].minor.yy0); }
+#line 6140 "sql.c"
break;
case 206: /* type_name ::= TINYINT UNSIGNED */
+#line 404 "sql.y"
{ yymsp[-1].minor.yy826 = createDataType(TSDB_DATA_TYPE_UTINYINT); }
+#line 6145 "sql.c"
break;
case 207: /* type_name ::= SMALLINT UNSIGNED */
+#line 405 "sql.y"
{ yymsp[-1].minor.yy826 = createDataType(TSDB_DATA_TYPE_USMALLINT); }
+#line 6150 "sql.c"
break;
case 208: /* type_name ::= INT UNSIGNED */
+#line 406 "sql.y"
{ yymsp[-1].minor.yy826 = createDataType(TSDB_DATA_TYPE_UINT); }
+#line 6155 "sql.c"
break;
case 209: /* type_name ::= BIGINT UNSIGNED */
+#line 407 "sql.y"
{ yymsp[-1].minor.yy826 = createDataType(TSDB_DATA_TYPE_UBIGINT); }
+#line 6160 "sql.c"
break;
case 210: /* type_name ::= JSON */
+#line 408 "sql.y"
{ yymsp[0].minor.yy826 = createDataType(TSDB_DATA_TYPE_JSON); }
+#line 6165 "sql.c"
break;
case 211: /* type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */
+#line 409 "sql.y"
{ yymsp[-3].minor.yy826 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, &yymsp[-1].minor.yy0); }
+#line 6170 "sql.c"
break;
case 212: /* type_name ::= MEDIUMBLOB */
+#line 410 "sql.y"
{ yymsp[0].minor.yy826 = createDataType(TSDB_DATA_TYPE_MEDIUMBLOB); }
+#line 6175 "sql.c"
break;
case 213: /* type_name ::= BLOB */
+#line 411 "sql.y"
{ yymsp[0].minor.yy826 = createDataType(TSDB_DATA_TYPE_BLOB); }
+#line 6180 "sql.c"
break;
case 214: /* type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */
+#line 412 "sql.y"
{ yymsp[-3].minor.yy826 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, &yymsp[-1].minor.yy0); }
+#line 6185 "sql.c"
break;
case 215: /* type_name ::= GEOMETRY NK_LP NK_INTEGER NK_RP */
+#line 413 "sql.y"
{ yymsp[-3].minor.yy826 = createVarLenDataType(TSDB_DATA_TYPE_GEOMETRY, &yymsp[-1].minor.yy0); }
+#line 6190 "sql.c"
break;
case 216: /* type_name ::= DECIMAL */
+#line 414 "sql.y"
{ yymsp[0].minor.yy826 = createDataType(TSDB_DATA_TYPE_DECIMAL); }
+#line 6195 "sql.c"
break;
case 217: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */
+#line 415 "sql.y"
{ yymsp[-3].minor.yy826 = createDataType(TSDB_DATA_TYPE_DECIMAL); }
+#line 6200 "sql.c"
break;
case 218: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */
+#line 416 "sql.y"
{ yymsp[-5].minor.yy826 = createDataType(TSDB_DATA_TYPE_DECIMAL); }
+#line 6205 "sql.c"
break;
case 221: /* tags_def ::= TAGS NK_LP column_def_list NK_RP */
case 377: /* tag_def_or_ref_opt ::= TAGS NK_LP col_name_list NK_RP */ yytestcase(yyruleno==377);
+#line 425 "sql.y"
{ yymsp[-3].minor.yy502 = yymsp[-1].minor.yy502; }
+#line 6211 "sql.c"
break;
case 222: /* table_options ::= */
+#line 427 "sql.y"
{ yymsp[1].minor.yy490 = createDefaultTableOptions(pCxt); }
+#line 6216 "sql.c"
break;
case 223: /* table_options ::= table_options COMMENT NK_STRING */
+#line 428 "sql.y"
{ yylhsminor.yy490 = setTableOption(pCxt, yymsp[-2].minor.yy490, TABLE_OPTION_COMMENT, &yymsp[0].minor.yy0); }
+#line 6221 "sql.c"
yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
case 224: /* table_options ::= table_options MAX_DELAY duration_list */
+#line 429 "sql.y"
{ yylhsminor.yy490 = setTableOption(pCxt, yymsp[-2].minor.yy490, TABLE_OPTION_MAXDELAY, yymsp[0].minor.yy502); }
+#line 6227 "sql.c"
yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
case 225: /* table_options ::= table_options WATERMARK duration_list */
+#line 430 "sql.y"
{ yylhsminor.yy490 = setTableOption(pCxt, yymsp[-2].minor.yy490, TABLE_OPTION_WATERMARK, yymsp[0].minor.yy502); }
+#line 6233 "sql.c"
yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
case 226: /* table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */
+#line 431 "sql.y"
{ yylhsminor.yy490 = setTableOption(pCxt, yymsp[-4].minor.yy490, TABLE_OPTION_ROLLUP, yymsp[-1].minor.yy502); }
+#line 6239 "sql.c"
yymsp[-4].minor.yy490 = yylhsminor.yy490;
break;
case 227: /* table_options ::= table_options TTL NK_INTEGER */
+#line 432 "sql.y"
{ yylhsminor.yy490 = setTableOption(pCxt, yymsp[-2].minor.yy490, TABLE_OPTION_TTL, &yymsp[0].minor.yy0); }
+#line 6245 "sql.c"
yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
case 228: /* table_options ::= table_options SMA NK_LP col_name_list NK_RP */
+#line 433 "sql.y"
{ yylhsminor.yy490 = setTableOption(pCxt, yymsp[-4].minor.yy490, TABLE_OPTION_SMA, yymsp[-1].minor.yy502); }
+#line 6251 "sql.c"
yymsp[-4].minor.yy490 = yylhsminor.yy490;
break;
case 229: /* table_options ::= table_options DELETE_MARK duration_list */
+#line 434 "sql.y"
{ yylhsminor.yy490 = setTableOption(pCxt, yymsp[-2].minor.yy490, TABLE_OPTION_DELETE_MARK, yymsp[0].minor.yy502); }
+#line 6257 "sql.c"
yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
case 230: /* alter_table_options ::= alter_table_option */
+#line 436 "sql.y"
{ yylhsminor.yy490 = createAlterTableOptions(pCxt); yylhsminor.yy490 = setTableOption(pCxt, yylhsminor.yy490, yymsp[0].minor.yy529.type, &yymsp[0].minor.yy529.val); }
+#line 6263 "sql.c"
yymsp[0].minor.yy490 = yylhsminor.yy490;
break;
case 231: /* alter_table_options ::= alter_table_options alter_table_option */
+#line 437 "sql.y"
{ yylhsminor.yy490 = setTableOption(pCxt, yymsp[-1].minor.yy490, yymsp[0].minor.yy529.type, &yymsp[0].minor.yy529.val); }
+#line 6269 "sql.c"
yymsp[-1].minor.yy490 = yylhsminor.yy490;
break;
case 232: /* alter_table_option ::= COMMENT NK_STRING */
+#line 441 "sql.y"
{ yymsp[-1].minor.yy529.type = TABLE_OPTION_COMMENT; yymsp[-1].minor.yy529.val = yymsp[0].minor.yy0; }
+#line 6275 "sql.c"
break;
case 233: /* alter_table_option ::= TTL NK_INTEGER */
+#line 442 "sql.y"
{ yymsp[-1].minor.yy529.type = TABLE_OPTION_TTL; yymsp[-1].minor.yy529.val = yymsp[0].minor.yy0; }
+#line 6280 "sql.c"
break;
case 234: /* duration_list ::= duration_literal */
case 464: /* expression_list ::= expr_or_subquery */ yytestcase(yyruleno==464);
+#line 446 "sql.y"
{ yylhsminor.yy502 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy490)); }
+#line 6286 "sql.c"
yymsp[0].minor.yy502 = yylhsminor.yy502;
break;
case 235: /* duration_list ::= duration_list NK_COMMA duration_literal */
case 465: /* expression_list ::= expression_list NK_COMMA expr_or_subquery */ yytestcase(yyruleno==465);
+#line 447 "sql.y"
{ yylhsminor.yy502 = addNodeToList(pCxt, yymsp[-2].minor.yy502, releaseRawExprNode(pCxt, yymsp[0].minor.yy490)); }
+#line 6293 "sql.c"
yymsp[-2].minor.yy502 = yylhsminor.yy502;
break;
case 238: /* rollup_func_name ::= function_name */
+#line 454 "sql.y"
{ yylhsminor.yy490 = createFunctionNode(pCxt, &yymsp[0].minor.yy561, NULL); }
+#line 6299 "sql.c"
yymsp[0].minor.yy490 = yylhsminor.yy490;
break;
case 239: /* rollup_func_name ::= FIRST */
case 240: /* rollup_func_name ::= LAST */ yytestcase(yyruleno==240);
case 311: /* tag_item ::= QTAGS */ yytestcase(yyruleno==311);
+#line 455 "sql.y"
{ yylhsminor.yy490 = createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL); }
+#line 6307 "sql.c"
yymsp[0].minor.yy490 = yylhsminor.yy490;
break;
case 243: /* col_name ::= column_name */
case 312: /* tag_item ::= column_name */ yytestcase(yyruleno==312);
+#line 463 "sql.y"
{ yylhsminor.yy490 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy561); }
+#line 6314 "sql.c"
yymsp[0].minor.yy490 = yylhsminor.yy490;
break;
case 244: /* cmd ::= SHOW DNODES */
+#line 466 "sql.y"
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DNODES_STMT); }
+#line 6320 "sql.c"
break;
case 245: /* cmd ::= SHOW USERS */
+#line 467 "sql.y"
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_USERS_STMT); }
+#line 6325 "sql.c"
break;
case 246: /* cmd ::= SHOW USER PRIVILEGES */
+#line 468 "sql.y"
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_USER_PRIVILEGES_STMT); }
+#line 6330 "sql.c"
break;
case 247: /* cmd ::= SHOW db_kind_opt DATABASES */
+#line 469 "sql.y"
{
pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DATABASES_STMT);
setShowKind(pCxt, pCxt->pRootNode, yymsp[-1].minor.yy579);
}
+#line 6338 "sql.c"
break;
case 248: /* cmd ::= SHOW table_kind_db_name_cond_opt TABLES like_pattern_opt */
+#line 473 "sql.y"
{
pCxt->pRootNode = createShowTablesStmt(pCxt, yymsp[-2].minor.yy961, yymsp[0].minor.yy490, OP_TYPE_LIKE);
}
+#line 6345 "sql.c"
break;
case 249: /* cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */
+#line 476 "sql.y"
{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_STABLES_STMT, yymsp[-2].minor.yy490, yymsp[0].minor.yy490, OP_TYPE_LIKE); }
+#line 6350 "sql.c"
break;
case 250: /* cmd ::= SHOW db_name_cond_opt VGROUPS */
+#line 477 "sql.y"
{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, yymsp[-1].minor.yy490, NULL, OP_TYPE_LIKE); }
+#line 6355 "sql.c"
break;
case 251: /* cmd ::= SHOW MNODES */
+#line 478 "sql.y"
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_MNODES_STMT); }
+#line 6360 "sql.c"
break;
case 252: /* cmd ::= SHOW QNODES */
+#line 480 "sql.y"
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QNODES_STMT); }
+#line 6365 "sql.c"
break;
case 253: /* cmd ::= SHOW FUNCTIONS */
+#line 481 "sql.y"
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_FUNCTIONS_STMT); }
+#line 6370 "sql.c"
break;
case 254: /* cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */
+#line 482 "sql.y"
{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, yymsp[0].minor.yy490, yymsp[-1].minor.yy490, OP_TYPE_EQUAL); }
+#line 6375 "sql.c"
break;
case 255: /* cmd ::= SHOW INDEXES FROM db_name NK_DOT table_name */
+#line 483 "sql.y"
{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, createIdentifierValueNode(pCxt, &yymsp[-2].minor.yy561), createIdentifierValueNode(pCxt, &yymsp[0].minor.yy561), OP_TYPE_EQUAL); }
+#line 6380 "sql.c"
break;
case 256: /* cmd ::= SHOW STREAMS */
+#line 484 "sql.y"
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_STREAMS_STMT); }
+#line 6385 "sql.c"
break;
case 257: /* cmd ::= SHOW ACCOUNTS */
+#line 485 "sql.y"
{ pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); }
+#line 6390 "sql.c"
break;
case 258: /* cmd ::= SHOW APPS */
+#line 486 "sql.y"
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_APPS_STMT); }
+#line 6395 "sql.c"
break;
case 259: /* cmd ::= SHOW CONNECTIONS */
+#line 487 "sql.y"
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CONNECTIONS_STMT); }
+#line 6400 "sql.c"
break;
case 260: /* cmd ::= SHOW LICENCES */
case 261: /* cmd ::= SHOW GRANTS */ yytestcase(yyruleno==261);
+#line 488 "sql.y"
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LICENCES_STMT); }
+#line 6406 "sql.c"
break;
case 262: /* cmd ::= SHOW GRANTS FULL */
+#line 490 "sql.y"
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_GRANTS_FULL_STMT); }
+#line 6411 "sql.c"
break;
case 263: /* cmd ::= SHOW GRANTS LOGS */
+#line 491 "sql.y"
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_GRANTS_LOGS_STMT); }
+#line 6416 "sql.c"
break;
case 264: /* cmd ::= SHOW CLUSTER MACHINES */
+#line 492 "sql.y"
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CLUSTER_MACHINES_STMT); }
+#line 6421 "sql.c"
break;
case 265: /* cmd ::= SHOW CREATE DATABASE db_name */
+#line 493 "sql.y"
{ pCxt->pRootNode = createShowCreateDatabaseStmt(pCxt, &yymsp[0].minor.yy561); }
+#line 6426 "sql.c"
break;
case 266: /* cmd ::= SHOW CREATE TABLE full_table_name */
+#line 494 "sql.y"
{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_TABLE_STMT, yymsp[0].minor.yy490); }
+#line 6431 "sql.c"
break;
case 267: /* cmd ::= SHOW CREATE STABLE full_table_name */
+#line 495 "sql.y"
{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_STABLE_STMT, yymsp[0].minor.yy490); }
+#line 6436 "sql.c"
break;
case 268: /* cmd ::= SHOW QUERIES */
+#line 496 "sql.y"
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QUERIES_STMT); }
+#line 6441 "sql.c"
break;
case 269: /* cmd ::= SHOW SCORES */
+#line 497 "sql.y"
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SCORES_STMT); }
+#line 6446 "sql.c"
break;
case 270: /* cmd ::= SHOW TOPICS */
+#line 498 "sql.y"
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TOPICS_STMT); }
+#line 6451 "sql.c"
break;
case 271: /* cmd ::= SHOW VARIABLES */
case 272: /* cmd ::= SHOW CLUSTER VARIABLES */ yytestcase(yyruleno==272);
+#line 499 "sql.y"
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_VARIABLES_STMT); }
+#line 6457 "sql.c"
break;
case 273: /* cmd ::= SHOW LOCAL VARIABLES */
+#line 501 "sql.y"
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LOCAL_VARIABLES_STMT); }
+#line 6462 "sql.c"
break;
case 274: /* cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */
+#line 502 "sql.y"
{ pCxt->pRootNode = createShowDnodeVariablesStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[-2].minor.yy0), yymsp[0].minor.yy490); }
+#line 6467 "sql.c"
break;
case 275: /* cmd ::= SHOW BNODES */
+#line 503 "sql.y"
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_BNODES_STMT); }
+#line 6472 "sql.c"
break;
case 276: /* cmd ::= SHOW SNODES */
+#line 504 "sql.y"
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SNODES_STMT); }
+#line 6477 "sql.c"
break;
case 277: /* cmd ::= SHOW CLUSTER */
+#line 505 "sql.y"
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CLUSTER_STMT); }
+#line 6482 "sql.c"
break;
case 278: /* cmd ::= SHOW TRANSACTIONS */
+#line 506 "sql.y"
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TRANSACTIONS_STMT); }
+#line 6487 "sql.c"
break;
case 279: /* cmd ::= SHOW TABLE DISTRIBUTED full_table_name */
+#line 507 "sql.y"
{ pCxt->pRootNode = createShowTableDistributedStmt(pCxt, yymsp[0].minor.yy490); }
+#line 6492 "sql.c"
break;
case 280: /* cmd ::= SHOW CONSUMERS */
+#line 508 "sql.y"
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CONSUMERS_STMT); }
+#line 6497 "sql.c"
break;
case 281: /* cmd ::= SHOW SUBSCRIPTIONS */
+#line 509 "sql.y"
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SUBSCRIPTIONS_STMT); }
+#line 6502 "sql.c"
break;
case 282: /* cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */
+#line 510 "sql.y"
{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TAGS_STMT, yymsp[0].minor.yy490, yymsp[-1].minor.yy490, OP_TYPE_EQUAL); }
+#line 6507 "sql.c"
break;
case 283: /* cmd ::= SHOW TAGS FROM db_name NK_DOT table_name */
+#line 511 "sql.y"
{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TAGS_STMT, createIdentifierValueNode(pCxt, &yymsp[-2].minor.yy561), createIdentifierValueNode(pCxt, &yymsp[0].minor.yy561), OP_TYPE_EQUAL); }
+#line 6512 "sql.c"
break;
case 284: /* cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */
+#line 512 "sql.y"
{ pCxt->pRootNode = createShowTableTagsStmt(pCxt, yymsp[-1].minor.yy490, yymsp[0].minor.yy490, yymsp[-3].minor.yy502); }
+#line 6517 "sql.c"
break;
case 285: /* cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name */
+#line 513 "sql.y"
{ pCxt->pRootNode = createShowTableTagsStmt(pCxt, createIdentifierValueNode(pCxt, &yymsp[0].minor.yy561), createIdentifierValueNode(pCxt, &yymsp[-2].minor.yy561), yymsp[-4].minor.yy502); }
+#line 6522 "sql.c"
break;
case 286: /* cmd ::= SHOW VNODES ON DNODE NK_INTEGER */
+#line 514 "sql.y"
{ pCxt->pRootNode = createShowVnodesStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0), NULL); }
+#line 6527 "sql.c"
break;
case 287: /* cmd ::= SHOW VNODES */
+#line 515 "sql.y"
{ pCxt->pRootNode = createShowVnodesStmt(pCxt, NULL, NULL); }
+#line 6532 "sql.c"
break;
case 288: /* cmd ::= SHOW db_name_cond_opt ALIVE */
+#line 517 "sql.y"
{ pCxt->pRootNode = createShowAliveStmt(pCxt, yymsp[-1].minor.yy490, QUERY_NODE_SHOW_DB_ALIVE_STMT); }
+#line 6537 "sql.c"
break;
case 289: /* cmd ::= SHOW CLUSTER ALIVE */
+#line 518 "sql.y"
{ pCxt->pRootNode = createShowAliveStmt(pCxt, NULL, QUERY_NODE_SHOW_CLUSTER_ALIVE_STMT); }
+#line 6542 "sql.c"
break;
- case 290: /* cmd ::= SHOW db_name_cond_opt VIEWS */
-{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VIEWS_STMT, yymsp[-1].minor.yy490, NULL, OP_TYPE_LIKE); }
+ case 290: /* cmd ::= SHOW db_name_cond_opt VIEWS like_pattern_opt */
+#line 519 "sql.y"
+{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VIEWS_STMT, yymsp[-2].minor.yy490, yymsp[0].minor.yy490, OP_TYPE_LIKE); }
+#line 6547 "sql.c"
break;
case 291: /* cmd ::= SHOW CREATE VIEW full_table_name */
+#line 520 "sql.y"
{ pCxt->pRootNode = createShowCreateViewStmt(pCxt, QUERY_NODE_SHOW_CREATE_VIEW_STMT, yymsp[0].minor.yy490); }
+#line 6552 "sql.c"
break;
case 292: /* cmd ::= SHOW COMPACTS */
+#line 521 "sql.y"
{ pCxt->pRootNode = createShowCompactsStmt(pCxt, QUERY_NODE_SHOW_COMPACTS_STMT); }
+#line 6557 "sql.c"
break;
case 293: /* cmd ::= SHOW COMPACT NK_INTEGER */
+#line 522 "sql.y"
{ pCxt->pRootNode = createShowCompactDetailsStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); }
+#line 6562 "sql.c"
break;
case 294: /* table_kind_db_name_cond_opt ::= */
+#line 526 "sql.y"
{ yymsp[1].minor.yy961.kind = SHOW_KIND_ALL; yymsp[1].minor.yy961.dbName = nil_token; }
+#line 6567 "sql.c"
break;
case 295: /* table_kind_db_name_cond_opt ::= table_kind */
+#line 527 "sql.y"
{ yylhsminor.yy961.kind = yymsp[0].minor.yy579; yylhsminor.yy961.dbName = nil_token; }
+#line 6572 "sql.c"
yymsp[0].minor.yy961 = yylhsminor.yy961;
break;
case 296: /* table_kind_db_name_cond_opt ::= db_name NK_DOT */
+#line 528 "sql.y"
{ yylhsminor.yy961.kind = SHOW_KIND_ALL; yylhsminor.yy961.dbName = yymsp[-1].minor.yy561; }
+#line 6578 "sql.c"
yymsp[-1].minor.yy961 = yylhsminor.yy961;
break;
case 297: /* table_kind_db_name_cond_opt ::= table_kind db_name NK_DOT */
+#line 529 "sql.y"
{ yylhsminor.yy961.kind = yymsp[-2].minor.yy579; yylhsminor.yy961.dbName = yymsp[-1].minor.yy561; }
+#line 6584 "sql.c"
yymsp[-2].minor.yy961 = yylhsminor.yy961;
break;
case 298: /* table_kind ::= NORMAL */
+#line 533 "sql.y"
{ yymsp[0].minor.yy579 = SHOW_KIND_TABLES_NORMAL; }
+#line 6590 "sql.c"
break;
case 299: /* table_kind ::= CHILD */
+#line 534 "sql.y"
{ yymsp[0].minor.yy579 = SHOW_KIND_TABLES_CHILD; }
+#line 6595 "sql.c"
break;
case 300: /* db_name_cond_opt ::= */
case 305: /* from_db_opt ::= */ yytestcase(yyruleno==305);
+#line 536 "sql.y"
{ yymsp[1].minor.yy490 = createDefaultDatabaseCondValue(pCxt); }
+#line 6601 "sql.c"
break;
case 301: /* db_name_cond_opt ::= db_name NK_DOT */
+#line 537 "sql.y"
{ yylhsminor.yy490 = createIdentifierValueNode(pCxt, &yymsp[-1].minor.yy561); }
+#line 6606 "sql.c"
yymsp[-1].minor.yy490 = yylhsminor.yy490;
break;
case 303: /* like_pattern_opt ::= LIKE NK_STRING */
+#line 540 "sql.y"
{ yymsp[-1].minor.yy490 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); }
+#line 6612 "sql.c"
break;
case 304: /* table_name_cond ::= table_name */
+#line 542 "sql.y"
{ yylhsminor.yy490 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy561); }
+#line 6617 "sql.c"
yymsp[0].minor.yy490 = yylhsminor.yy490;
break;
case 306: /* from_db_opt ::= FROM db_name */
+#line 545 "sql.y"
{ yymsp[-1].minor.yy490 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy561); }
+#line 6623 "sql.c"
break;
case 310: /* tag_item ::= TBNAME */
+#line 553 "sql.y"
{ yylhsminor.yy490 = setProjectionAlias(pCxt, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL), &yymsp[0].minor.yy0); }
+#line 6628 "sql.c"
yymsp[0].minor.yy490 = yylhsminor.yy490;
break;
case 313: /* tag_item ::= column_name column_alias */
+#line 556 "sql.y"
{ yylhsminor.yy490 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-1].minor.yy561), &yymsp[0].minor.yy561); }
+#line 6634 "sql.c"
yymsp[-1].minor.yy490 = yylhsminor.yy490;
break;
case 314: /* tag_item ::= column_name AS column_alias */
+#line 557 "sql.y"
{ yylhsminor.yy490 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-2].minor.yy561), &yymsp[0].minor.yy561); }
+#line 6640 "sql.c"
yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
case 315: /* db_kind_opt ::= */
+#line 561 "sql.y"
{ yymsp[1].minor.yy579 = SHOW_KIND_ALL; }
+#line 6646 "sql.c"
break;
case 316: /* db_kind_opt ::= USER */
+#line 562 "sql.y"
{ yymsp[0].minor.yy579 = SHOW_KIND_DATABASES_USER; }
+#line 6651 "sql.c"
break;
case 317: /* db_kind_opt ::= SYSTEM */
+#line 563 "sql.y"
{ yymsp[0].minor.yy579 = SHOW_KIND_DATABASES_SYSTEM; }
+#line 6656 "sql.c"
break;
case 318: /* cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options */
+#line 567 "sql.y"
{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_SMA, yymsp[-4].minor.yy845, yymsp[-3].minor.yy490, yymsp[-1].minor.yy490, NULL, yymsp[0].minor.yy490); }
+#line 6661 "sql.c"
break;
case 319: /* cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP */
+#line 569 "sql.y"
{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_NORMAL, yymsp[-6].minor.yy845, yymsp[-5].minor.yy490, yymsp[-3].minor.yy490, yymsp[-1].minor.yy502, NULL); }
+#line 6666 "sql.c"
break;
case 320: /* cmd ::= DROP INDEX exists_opt full_index_name */
+#line 570 "sql.y"
{ pCxt->pRootNode = createDropIndexStmt(pCxt, yymsp[-1].minor.yy845, yymsp[0].minor.yy490); }
+#line 6671 "sql.c"
break;
case 321: /* full_index_name ::= index_name */
+#line 572 "sql.y"
{ yylhsminor.yy490 = createRealTableNodeForIndexName(pCxt, NULL, &yymsp[0].minor.yy561); }
+#line 6676 "sql.c"
yymsp[0].minor.yy490 = yylhsminor.yy490;
break;
case 322: /* full_index_name ::= db_name NK_DOT index_name */
+#line 573 "sql.y"
{ yylhsminor.yy490 = createRealTableNodeForIndexName(pCxt, &yymsp[-2].minor.yy561, &yymsp[0].minor.yy561); }
+#line 6682 "sql.c"
yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
case 323: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */
+#line 576 "sql.y"
{ yymsp[-9].minor.yy490 = createIndexOption(pCxt, yymsp[-7].minor.yy502, releaseRawExprNode(pCxt, yymsp[-3].minor.yy490), NULL, yymsp[-1].minor.yy490, yymsp[0].minor.yy490); }
+#line 6688 "sql.c"
break;
case 324: /* 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 */
+#line 579 "sql.y"
{ yymsp[-11].minor.yy490 = createIndexOption(pCxt, yymsp[-9].minor.yy502, releaseRawExprNode(pCxt, yymsp[-5].minor.yy490), releaseRawExprNode(pCxt, yymsp[-3].minor.yy490), yymsp[-1].minor.yy490, yymsp[0].minor.yy490); }
+#line 6693 "sql.c"
break;
case 327: /* func ::= sma_func_name NK_LP expression_list NK_RP */
+#line 586 "sql.y"
{ yylhsminor.yy490 = createFunctionNode(pCxt, &yymsp[-3].minor.yy561, yymsp[-1].minor.yy502); }
+#line 6698 "sql.c"
yymsp[-3].minor.yy490 = yylhsminor.yy490;
break;
case 328: /* sma_func_name ::= function_name */
case 553: /* alias_opt ::= table_alias */ yytestcase(yyruleno==553);
+#line 590 "sql.y"
{ yylhsminor.yy561 = yymsp[0].minor.yy561; }
+#line 6705 "sql.c"
yymsp[0].minor.yy561 = yylhsminor.yy561;
break;
case 333: /* sma_stream_opt ::= */
case 378: /* stream_options ::= */ yytestcase(yyruleno==378);
+#line 596 "sql.y"
{ yymsp[1].minor.yy490 = createStreamOptions(pCxt); }
+#line 6712 "sql.c"
break;
case 334: /* sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */
+#line 597 "sql.y"
{ ((SStreamOptions*)yymsp[-2].minor.yy490)->pWatermark = releaseRawExprNode(pCxt, yymsp[0].minor.yy490); yylhsminor.yy490 = yymsp[-2].minor.yy490; }
+#line 6717 "sql.c"
yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
case 335: /* sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */
+#line 598 "sql.y"
{ ((SStreamOptions*)yymsp[-2].minor.yy490)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy490); yylhsminor.yy490 = yymsp[-2].minor.yy490; }
+#line 6723 "sql.c"
yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
case 336: /* sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */
+#line 599 "sql.y"
{ ((SStreamOptions*)yymsp[-2].minor.yy490)->pDeleteMark = releaseRawExprNode(pCxt, yymsp[0].minor.yy490); yylhsminor.yy490 = yymsp[-2].minor.yy490; }
+#line 6729 "sql.c"
yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
case 337: /* with_meta ::= AS */
+#line 604 "sql.y"
{ yymsp[0].minor.yy774 = 0; }
+#line 6735 "sql.c"
break;
case 338: /* with_meta ::= WITH META AS */
+#line 605 "sql.y"
{ yymsp[-2].minor.yy774 = 1; }
+#line 6740 "sql.c"
break;
case 339: /* with_meta ::= ONLY META AS */
+#line 606 "sql.y"
{ yymsp[-2].minor.yy774 = 2; }
+#line 6745 "sql.c"
break;
case 340: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */
+#line 608 "sql.y"
{ pCxt->pRootNode = createCreateTopicStmtUseQuery(pCxt, yymsp[-3].minor.yy845, &yymsp[-2].minor.yy561, yymsp[0].minor.yy490); }
+#line 6750 "sql.c"
break;
case 341: /* cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name */
+#line 610 "sql.y"
{ pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-4].minor.yy845, &yymsp[-3].minor.yy561, &yymsp[0].minor.yy561, yymsp[-2].minor.yy774); }
+#line 6755 "sql.c"
break;
case 342: /* cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt */
+#line 612 "sql.y"
{ pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-5].minor.yy845, &yymsp[-4].minor.yy561, yymsp[-1].minor.yy490, yymsp[-3].minor.yy774, yymsp[0].minor.yy490); }
+#line 6760 "sql.c"
break;
case 343: /* cmd ::= DROP TOPIC exists_opt topic_name */
+#line 614 "sql.y"
{ pCxt->pRootNode = createDropTopicStmt(pCxt, yymsp[-1].minor.yy845, &yymsp[0].minor.yy561); }
+#line 6765 "sql.c"
break;
case 344: /* cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */
+#line 615 "sql.y"
{ pCxt->pRootNode = createDropCGroupStmt(pCxt, yymsp[-3].minor.yy845, &yymsp[-2].minor.yy561, &yymsp[0].minor.yy561); }
+#line 6770 "sql.c"
break;
case 345: /* cmd ::= DESC full_table_name */
case 346: /* cmd ::= DESCRIBE full_table_name */ yytestcase(yyruleno==346);
+#line 618 "sql.y"
{ pCxt->pRootNode = createDescribeStmt(pCxt, yymsp[0].minor.yy490); }
+#line 6776 "sql.c"
break;
case 347: /* cmd ::= RESET QUERY CACHE */
+#line 622 "sql.y"
{ pCxt->pRootNode = createResetQueryCacheStmt(pCxt); }
+#line 6781 "sql.c"
break;
case 348: /* cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */
case 349: /* cmd ::= EXPLAIN analyze_opt explain_options insert_query */ yytestcase(yyruleno==349);
+#line 625 "sql.y"
{ pCxt->pRootNode = createExplainStmt(pCxt, yymsp[-2].minor.yy845, yymsp[-1].minor.yy490, yymsp[0].minor.yy490); }
+#line 6787 "sql.c"
break;
case 352: /* explain_options ::= */
+#line 633 "sql.y"
{ yymsp[1].minor.yy490 = createDefaultExplainOptions(pCxt); }
+#line 6792 "sql.c"
break;
case 353: /* explain_options ::= explain_options VERBOSE NK_BOOL */
+#line 634 "sql.y"
{ yylhsminor.yy490 = setExplainVerbose(pCxt, yymsp[-2].minor.yy490, &yymsp[0].minor.yy0); }
+#line 6797 "sql.c"
yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
case 354: /* explain_options ::= explain_options RATIO NK_FLOAT */
+#line 635 "sql.y"
{ yylhsminor.yy490 = setExplainRatio(pCxt, yymsp[-2].minor.yy490, &yymsp[0].minor.yy0); }
+#line 6803 "sql.c"
yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
case 355: /* cmd ::= CREATE or_replace_opt agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt language_opt */
+#line 640 "sql.y"
{ pCxt->pRootNode = createCreateFunctionStmt(pCxt, yymsp[-7].minor.yy845, yymsp[-9].minor.yy845, &yymsp[-6].minor.yy561, &yymsp[-4].minor.yy0, yymsp[-2].minor.yy826, yymsp[-1].minor.yy774, &yymsp[0].minor.yy561, yymsp[-10].minor.yy845); }
+#line 6809 "sql.c"
break;
case 356: /* cmd ::= DROP FUNCTION exists_opt function_name */
+#line 641 "sql.y"
{ pCxt->pRootNode = createDropFunctionStmt(pCxt, yymsp[-1].minor.yy845, &yymsp[0].minor.yy561); }
+#line 6814 "sql.c"
break;
case 361: /* language_opt ::= */
case 400: /* on_vgroup_id ::= */ yytestcase(yyruleno==400);
+#line 655 "sql.y"
{ yymsp[1].minor.yy561 = nil_token; }
+#line 6820 "sql.c"
break;
case 362: /* language_opt ::= LANGUAGE NK_STRING */
case 401: /* on_vgroup_id ::= ON NK_INTEGER */ yytestcase(yyruleno==401);
+#line 656 "sql.y"
{ yymsp[-1].minor.yy561 = yymsp[0].minor.yy0; }
+#line 6826 "sql.c"
break;
case 365: /* cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery */
+#line 665 "sql.y"
{ pCxt->pRootNode = createCreateViewStmt(pCxt, yymsp[-4].minor.yy845, yymsp[-2].minor.yy490, &yymsp[-1].minor.yy0, yymsp[0].minor.yy490); }
+#line 6831 "sql.c"
break;
case 366: /* cmd ::= DROP VIEW exists_opt full_view_name */
+#line 666 "sql.y"
{ pCxt->pRootNode = createDropViewStmt(pCxt, yymsp[-1].minor.yy845, yymsp[0].minor.yy490); }
+#line 6836 "sql.c"
break;
case 367: /* full_view_name ::= view_name */
+#line 668 "sql.y"
{ yylhsminor.yy490 = createViewNode(pCxt, NULL, &yymsp[0].minor.yy561); }
+#line 6841 "sql.c"
yymsp[0].minor.yy490 = yylhsminor.yy490;
break;
case 368: /* full_view_name ::= db_name NK_DOT view_name */
+#line 669 "sql.y"
{ yylhsminor.yy490 = createViewNode(pCxt, &yymsp[-2].minor.yy561, &yymsp[0].minor.yy561); }
+#line 6847 "sql.c"
yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
case 369: /* 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 */
+#line 674 "sql.y"
{ pCxt->pRootNode = createCreateStreamStmt(pCxt, yymsp[-9].minor.yy845, &yymsp[-8].minor.yy561, yymsp[-5].minor.yy490, yymsp[-7].minor.yy490, yymsp[-3].minor.yy502, yymsp[-2].minor.yy490, yymsp[0].minor.yy490, yymsp[-4].minor.yy502); }
+#line 6853 "sql.c"
break;
case 370: /* cmd ::= DROP STREAM exists_opt stream_name */
+#line 675 "sql.y"
{ pCxt->pRootNode = createDropStreamStmt(pCxt, yymsp[-1].minor.yy845, &yymsp[0].minor.yy561); }
+#line 6858 "sql.c"
break;
case 371: /* cmd ::= PAUSE STREAM exists_opt stream_name */
+#line 676 "sql.y"
{ pCxt->pRootNode = createPauseStreamStmt(pCxt, yymsp[-1].minor.yy845, &yymsp[0].minor.yy561); }
+#line 6863 "sql.c"
break;
case 372: /* cmd ::= RESUME STREAM exists_opt ignore_opt stream_name */
+#line 677 "sql.y"
{ pCxt->pRootNode = createResumeStreamStmt(pCxt, yymsp[-2].minor.yy845, yymsp[-1].minor.yy845, &yymsp[0].minor.yy561); }
+#line 6868 "sql.c"
break;
case 379: /* stream_options ::= stream_options TRIGGER AT_ONCE */
case 380: /* stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ yytestcase(yyruleno==380);
+#line 691 "sql.y"
{ yylhsminor.yy490 = setStreamOptions(pCxt, yymsp[-2].minor.yy490, SOPT_TRIGGER_TYPE_SET, &yymsp[0].minor.yy0, NULL); }
+#line 6874 "sql.c"
yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
case 381: /* stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */
+#line 693 "sql.y"
{ yylhsminor.yy490 = setStreamOptions(pCxt, yymsp[-3].minor.yy490, SOPT_TRIGGER_TYPE_SET, &yymsp[-1].minor.yy0, releaseRawExprNode(pCxt, yymsp[0].minor.yy490)); }
+#line 6880 "sql.c"
yymsp[-3].minor.yy490 = yylhsminor.yy490;
break;
case 382: /* stream_options ::= stream_options WATERMARK duration_literal */
+#line 694 "sql.y"
{ yylhsminor.yy490 = setStreamOptions(pCxt, yymsp[-2].minor.yy490, SOPT_WATERMARK_SET, NULL, releaseRawExprNode(pCxt, yymsp[0].minor.yy490)); }
+#line 6886 "sql.c"
yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
case 383: /* stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */
+#line 695 "sql.y"
{ yylhsminor.yy490 = setStreamOptions(pCxt, yymsp[-3].minor.yy490, SOPT_IGNORE_EXPIRED_SET, &yymsp[0].minor.yy0, NULL); }
+#line 6892 "sql.c"
yymsp[-3].minor.yy490 = yylhsminor.yy490;
break;
case 384: /* stream_options ::= stream_options FILL_HISTORY NK_INTEGER */
+#line 696 "sql.y"
{ yylhsminor.yy490 = setStreamOptions(pCxt, yymsp[-2].minor.yy490, SOPT_FILL_HISTORY_SET, &yymsp[0].minor.yy0, NULL); }
+#line 6898 "sql.c"
yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
case 385: /* stream_options ::= stream_options DELETE_MARK duration_literal */
+#line 697 "sql.y"
{ yylhsminor.yy490 = setStreamOptions(pCxt, yymsp[-2].minor.yy490, SOPT_DELETE_MARK_SET, NULL, releaseRawExprNode(pCxt, yymsp[0].minor.yy490)); }
+#line 6904 "sql.c"
yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
case 386: /* stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */
+#line 698 "sql.y"
{ yylhsminor.yy490 = setStreamOptions(pCxt, yymsp[-3].minor.yy490, SOPT_IGNORE_UPDATE_SET, &yymsp[0].minor.yy0, NULL); }
+#line 6910 "sql.c"
yymsp[-3].minor.yy490 = yylhsminor.yy490;
break;
case 388: /* subtable_opt ::= SUBTABLE NK_LP expression NK_RP */
case 591: /* sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP */ yytestcase(yyruleno==591);
case 615: /* every_opt ::= EVERY NK_LP duration_literal NK_RP */ yytestcase(yyruleno==615);
+#line 701 "sql.y"
{ yymsp[-3].minor.yy490 = releaseRawExprNode(pCxt, yymsp[-1].minor.yy490); }
+#line 6918 "sql.c"
break;
case 391: /* cmd ::= KILL CONNECTION NK_INTEGER */
+#line 709 "sql.y"
{ pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_CONNECTION_STMT, &yymsp[0].minor.yy0); }
+#line 6923 "sql.c"
break;
case 392: /* cmd ::= KILL QUERY NK_STRING */
+#line 710 "sql.y"
{ pCxt->pRootNode = createKillQueryStmt(pCxt, &yymsp[0].minor.yy0); }
+#line 6928 "sql.c"
break;
case 393: /* cmd ::= KILL TRANSACTION NK_INTEGER */
+#line 711 "sql.y"
{ pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_TRANSACTION_STMT, &yymsp[0].minor.yy0); }
+#line 6933 "sql.c"
break;
case 394: /* cmd ::= KILL COMPACT NK_INTEGER */
+#line 712 "sql.y"
{ pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_COMPACT_STMT, &yymsp[0].minor.yy0); }
+#line 6938 "sql.c"
break;
case 395: /* cmd ::= BALANCE VGROUP */
+#line 715 "sql.y"
{ pCxt->pRootNode = createBalanceVgroupStmt(pCxt); }
+#line 6943 "sql.c"
break;
case 396: /* cmd ::= BALANCE VGROUP LEADER on_vgroup_id */
+#line 716 "sql.y"
{ pCxt->pRootNode = createBalanceVgroupLeaderStmt(pCxt, &yymsp[0].minor.yy561); }
+#line 6948 "sql.c"
break;
case 397: /* cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */
+#line 717 "sql.y"
{ pCxt->pRootNode = createMergeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); }
+#line 6953 "sql.c"
break;
case 398: /* cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */
+#line 718 "sql.y"
{ pCxt->pRootNode = createRedistributeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy502); }
+#line 6958 "sql.c"
break;
case 399: /* cmd ::= SPLIT VGROUP NK_INTEGER */
+#line 719 "sql.y"
{ pCxt->pRootNode = createSplitVgroupStmt(pCxt, &yymsp[0].minor.yy0); }
+#line 6963 "sql.c"
break;
case 402: /* dnode_list ::= DNODE NK_INTEGER */
+#line 728 "sql.y"
{ yymsp[-1].minor.yy502 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); }
+#line 6968 "sql.c"
break;
case 404: /* cmd ::= DELETE FROM full_table_name where_clause_opt */
+#line 735 "sql.y"
{ pCxt->pRootNode = createDeleteStmt(pCxt, yymsp[-1].minor.yy490, yymsp[0].minor.yy490); }
+#line 6973 "sql.c"
break;
case 407: /* insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */
+#line 744 "sql.y"
{ yymsp[-6].minor.yy490 = createInsertStmt(pCxt, yymsp[-4].minor.yy490, yymsp[-2].minor.yy502, yymsp[0].minor.yy490); }
+#line 6978 "sql.c"
break;
case 408: /* insert_query ::= INSERT INTO full_table_name query_or_subquery */
+#line 745 "sql.y"
{ yymsp[-3].minor.yy490 = createInsertStmt(pCxt, yymsp[-1].minor.yy490, NULL, yymsp[0].minor.yy490); }
+#line 6983 "sql.c"
break;
case 409: /* literal ::= NK_INTEGER */
+#line 748 "sql.y"
{ yylhsminor.yy490 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0)); }
+#line 6988 "sql.c"
yymsp[0].minor.yy490 = yylhsminor.yy490;
break;
case 410: /* literal ::= NK_FLOAT */
+#line 749 "sql.y"
{ yylhsminor.yy490 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0)); }
+#line 6994 "sql.c"
yymsp[0].minor.yy490 = yylhsminor.yy490;
break;
case 411: /* literal ::= NK_STRING */
+#line 750 "sql.y"
{ yylhsminor.yy490 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); }
+#line 7000 "sql.c"
yymsp[0].minor.yy490 = yylhsminor.yy490;
break;
case 412: /* literal ::= NK_BOOL */
+#line 751 "sql.y"
{ yylhsminor.yy490 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0)); }
+#line 7006 "sql.c"
yymsp[0].minor.yy490 = yylhsminor.yy490;
break;
case 413: /* literal ::= TIMESTAMP NK_STRING */
+#line 752 "sql.y"
{ yylhsminor.yy490 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0)); }
+#line 7012 "sql.c"
yymsp[-1].minor.yy490 = yylhsminor.yy490;
break;
case 414: /* literal ::= duration_literal */
@@ -6040,64 +7032,90 @@ static YYACTIONTYPE yy_reduce(
case 618: /* query_simple ::= union_query_expression */ yytestcase(yyruleno==618);
case 621: /* query_simple_or_subquery ::= query_simple */ yytestcase(yyruleno==621);
case 623: /* query_or_subquery ::= query_expression */ yytestcase(yyruleno==623);
+#line 753 "sql.y"
{ yylhsminor.yy490 = yymsp[0].minor.yy490; }
+#line 7037 "sql.c"
yymsp[0].minor.yy490 = yylhsminor.yy490;
break;
case 415: /* literal ::= NULL */
+#line 754 "sql.y"
{ yylhsminor.yy490 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0)); }
+#line 7043 "sql.c"
yymsp[0].minor.yy490 = yylhsminor.yy490;
break;
case 416: /* literal ::= NK_QUESTION */
+#line 755 "sql.y"
{ yylhsminor.yy490 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0)); }
+#line 7049 "sql.c"
yymsp[0].minor.yy490 = yylhsminor.yy490;
break;
case 417: /* duration_literal ::= NK_VARIABLE */
case 592: /* interval_sliding_duration_literal ::= NK_VARIABLE */ yytestcase(yyruleno==592);
case 593: /* interval_sliding_duration_literal ::= NK_STRING */ yytestcase(yyruleno==593);
case 594: /* interval_sliding_duration_literal ::= NK_INTEGER */ yytestcase(yyruleno==594);
+#line 757 "sql.y"
{ yylhsminor.yy490 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); }
+#line 7058 "sql.c"
yymsp[0].minor.yy490 = yylhsminor.yy490;
break;
case 418: /* signed ::= NK_INTEGER */
+#line 759 "sql.y"
{ yylhsminor.yy490 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); }
+#line 7064 "sql.c"
yymsp[0].minor.yy490 = yylhsminor.yy490;
break;
case 419: /* signed ::= NK_PLUS NK_INTEGER */
+#line 760 "sql.y"
{ yymsp[-1].minor.yy490 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); }
+#line 7070 "sql.c"
break;
case 420: /* signed ::= NK_MINUS NK_INTEGER */
+#line 761 "sql.y"
{
SToken t = yymsp[-1].minor.yy0;
t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z;
yylhsminor.yy490 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &t);
}
+#line 7079 "sql.c"
yymsp[-1].minor.yy490 = yylhsminor.yy490;
break;
case 421: /* signed ::= NK_FLOAT */
+#line 766 "sql.y"
{ yylhsminor.yy490 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); }
+#line 7085 "sql.c"
yymsp[0].minor.yy490 = yylhsminor.yy490;
break;
case 422: /* signed ::= NK_PLUS NK_FLOAT */
+#line 767 "sql.y"
{ yymsp[-1].minor.yy490 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); }
+#line 7091 "sql.c"
break;
case 423: /* signed ::= NK_MINUS NK_FLOAT */
+#line 768 "sql.y"
{
SToken t = yymsp[-1].minor.yy0;
t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z;
yylhsminor.yy490 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &t);
}
+#line 7100 "sql.c"
yymsp[-1].minor.yy490 = yylhsminor.yy490;
break;
case 425: /* signed_literal ::= NK_STRING */
+#line 775 "sql.y"
{ yylhsminor.yy490 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); }
+#line 7106 "sql.c"
yymsp[0].minor.yy490 = yylhsminor.yy490;
break;
case 426: /* signed_literal ::= NK_BOOL */
+#line 776 "sql.y"
{ yylhsminor.yy490 = createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0); }
+#line 7112 "sql.c"
yymsp[0].minor.yy490 = yylhsminor.yy490;
break;
case 427: /* signed_literal ::= TIMESTAMP NK_STRING */
+#line 777 "sql.y"
{ yymsp[-1].minor.yy490 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); }
+#line 7118 "sql.c"
break;
case 428: /* signed_literal ::= duration_literal */
case 430: /* signed_literal ::= literal_func */ yytestcase(yyruleno==430);
@@ -6107,118 +7125,156 @@ static YYACTIONTYPE yy_reduce(
case 622: /* query_simple_or_subquery ::= subquery */ yytestcase(yyruleno==622);
case 624: /* query_or_subquery ::= subquery */ yytestcase(yyruleno==624);
case 637: /* search_condition ::= common_expression */ yytestcase(yyruleno==637);
+#line 778 "sql.y"
{ yylhsminor.yy490 = releaseRawExprNode(pCxt, yymsp[0].minor.yy490); }
+#line 7130 "sql.c"
yymsp[0].minor.yy490 = yylhsminor.yy490;
break;
case 429: /* signed_literal ::= NULL */
+#line 779 "sql.y"
{ yylhsminor.yy490 = createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0); }
+#line 7136 "sql.c"
yymsp[0].minor.yy490 = yylhsminor.yy490;
break;
case 431: /* signed_literal ::= NK_QUESTION */
+#line 781 "sql.y"
{ yylhsminor.yy490 = createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0); }
+#line 7142 "sql.c"
yymsp[0].minor.yy490 = yylhsminor.yy490;
break;
case 449: /* expression ::= pseudo_column */
+#line 843 "sql.y"
{ yylhsminor.yy490 = yymsp[0].minor.yy490; setRawExprNodeIsPseudoColumn(pCxt, yylhsminor.yy490, true); }
+#line 7148 "sql.c"
yymsp[0].minor.yy490 = yylhsminor.yy490;
break;
case 453: /* expression ::= NK_LP expression NK_RP */
case 539: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==539);
case 636: /* subquery ::= NK_LP subquery NK_RP */ yytestcase(yyruleno==636);
+#line 847 "sql.y"
{ yylhsminor.yy490 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy490)); }
+#line 7156 "sql.c"
yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
case 454: /* expression ::= NK_PLUS expr_or_subquery */
+#line 848 "sql.y"
{
SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy490);
yylhsminor.yy490 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, releaseRawExprNode(pCxt, yymsp[0].minor.yy490));
}
+#line 7165 "sql.c"
yymsp[-1].minor.yy490 = yylhsminor.yy490;
break;
case 455: /* expression ::= NK_MINUS expr_or_subquery */
+#line 852 "sql.y"
{
SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy490);
yylhsminor.yy490 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, createOperatorNode(pCxt, OP_TYPE_MINUS, releaseRawExprNode(pCxt, yymsp[0].minor.yy490), NULL));
}
+#line 7174 "sql.c"
yymsp[-1].minor.yy490 = yylhsminor.yy490;
break;
case 456: /* expression ::= expr_or_subquery NK_PLUS expr_or_subquery */
+#line 856 "sql.y"
{
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy490);
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy490);
yylhsminor.yy490 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_ADD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy490), releaseRawExprNode(pCxt, yymsp[0].minor.yy490)));
}
+#line 7184 "sql.c"
yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
case 457: /* expression ::= expr_or_subquery NK_MINUS expr_or_subquery */
+#line 861 "sql.y"
{
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy490);
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy490);
yylhsminor.yy490 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[-2].minor.yy490), releaseRawExprNode(pCxt, yymsp[0].minor.yy490)));
}
+#line 7194 "sql.c"
yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
case 458: /* expression ::= expr_or_subquery NK_STAR expr_or_subquery */
+#line 866 "sql.y"
{
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy490);
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy490);
yylhsminor.yy490 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MULTI, releaseRawExprNode(pCxt, yymsp[-2].minor.yy490), releaseRawExprNode(pCxt, yymsp[0].minor.yy490)));
}
+#line 7204 "sql.c"
yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
case 459: /* expression ::= expr_or_subquery NK_SLASH expr_or_subquery */
+#line 871 "sql.y"
{
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy490);
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy490);
yylhsminor.yy490 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_DIV, releaseRawExprNode(pCxt, yymsp[-2].minor.yy490), releaseRawExprNode(pCxt, yymsp[0].minor.yy490)));
}
+#line 7214 "sql.c"
yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
case 460: /* expression ::= expr_or_subquery NK_REM expr_or_subquery */
+#line 876 "sql.y"
{
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy490);
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy490);
yylhsminor.yy490 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_REM, releaseRawExprNode(pCxt, yymsp[-2].minor.yy490), releaseRawExprNode(pCxt, yymsp[0].minor.yy490)));
}
+#line 7224 "sql.c"
yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
case 461: /* expression ::= column_reference NK_ARROW NK_STRING */
+#line 881 "sql.y"
{
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy490);
yylhsminor.yy490 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_JSON_GET_VALUE, releaseRawExprNode(pCxt, yymsp[-2].minor.yy490), createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)));
}
+#line 7233 "sql.c"
yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
case 462: /* expression ::= expr_or_subquery NK_BITAND expr_or_subquery */
+#line 885 "sql.y"
{
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy490);
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy490);
yylhsminor.yy490 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy490), releaseRawExprNode(pCxt, yymsp[0].minor.yy490)));
}
+#line 7243 "sql.c"
yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
case 463: /* expression ::= expr_or_subquery NK_BITOR expr_or_subquery */
+#line 890 "sql.y"
{
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy490);
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy490);
yylhsminor.yy490 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy490), releaseRawExprNode(pCxt, yymsp[0].minor.yy490)));
}
+#line 7253 "sql.c"
yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
case 466: /* column_reference ::= column_name */
+#line 901 "sql.y"
{ yylhsminor.yy490 = createRawExprNode(pCxt, &yymsp[0].minor.yy561, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy561)); }
+#line 7259 "sql.c"
yymsp[0].minor.yy490 = yylhsminor.yy490;
break;
case 467: /* column_reference ::= table_name NK_DOT column_name */
+#line 902 "sql.y"
{ yylhsminor.yy490 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy561, &yymsp[0].minor.yy561, createColumnNode(pCxt, &yymsp[-2].minor.yy561, &yymsp[0].minor.yy561)); }
+#line 7265 "sql.c"
yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
case 468: /* column_reference ::= NK_ALIAS */
+#line 903 "sql.y"
{ yylhsminor.yy490 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); }
+#line 7271 "sql.c"
yymsp[0].minor.yy490 = yylhsminor.yy490;
break;
case 469: /* column_reference ::= table_name NK_DOT NK_ALIAS */
+#line 904 "sql.y"
{ yylhsminor.yy490 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy561, &yymsp[0].minor.yy0, createColumnNode(pCxt, &yymsp[-2].minor.yy561, &yymsp[0].minor.yy0)); }
+#line 7277 "sql.c"
yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
case 470: /* pseudo_column ::= ROWTS */
@@ -6233,191 +7289,278 @@ static YYACTIONTYPE yy_reduce(
case 480: /* pseudo_column ::= ISFILLED */ yytestcase(yyruleno==480);
case 481: /* pseudo_column ::= QTAGS */ yytestcase(yyruleno==481);
case 487: /* literal_func ::= NOW */ yytestcase(yyruleno==487);
+#line 906 "sql.y"
{ yylhsminor.yy490 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL)); }
+#line 7294 "sql.c"
yymsp[0].minor.yy490 = yylhsminor.yy490;
break;
case 472: /* pseudo_column ::= table_name NK_DOT TBNAME */
+#line 908 "sql.y"
{ yylhsminor.yy490 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy561, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-2].minor.yy561)))); }
+#line 7300 "sql.c"
yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
case 482: /* function_expression ::= function_name NK_LP expression_list NK_RP */
case 483: /* function_expression ::= star_func NK_LP star_func_para_list NK_RP */ yytestcase(yyruleno==483);
+#line 919 "sql.y"
{ yylhsminor.yy490 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy561, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy561, yymsp[-1].minor.yy502)); }
+#line 7307 "sql.c"
yymsp[-3].minor.yy490 = yylhsminor.yy490;
break;
case 484: /* function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */
+#line 922 "sql.y"
{ yylhsminor.yy490 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createCastFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy490), yymsp[-1].minor.yy826)); }
+#line 7313 "sql.c"
yymsp[-5].minor.yy490 = yylhsminor.yy490;
break;
case 486: /* literal_func ::= noarg_func NK_LP NK_RP */
+#line 925 "sql.y"
{ yylhsminor.yy490 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy561, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-2].minor.yy561, NULL)); }
+#line 7319 "sql.c"
yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
case 501: /* star_func_para_list ::= NK_STAR */
+#line 949 "sql.y"
{ yylhsminor.yy502 = createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); }
+#line 7325 "sql.c"
yymsp[0].minor.yy502 = yylhsminor.yy502;
break;
case 506: /* star_func_para ::= table_name NK_DOT NK_STAR */
case 574: /* select_item ::= table_name NK_DOT NK_STAR */ yytestcase(yyruleno==574);
+#line 958 "sql.y"
{ yylhsminor.yy490 = createColumnNode(pCxt, &yymsp[-2].minor.yy561, &yymsp[0].minor.yy0); }
+#line 7332 "sql.c"
yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
case 507: /* case_when_expression ::= CASE when_then_list case_when_else_opt END */
+#line 961 "sql.y"
{ yylhsminor.yy490 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, NULL, yymsp[-2].minor.yy502, yymsp[-1].minor.yy490)); }
+#line 7338 "sql.c"
yymsp[-3].minor.yy490 = yylhsminor.yy490;
break;
case 508: /* case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */
+#line 963 "sql.y"
{ yylhsminor.yy490 = createRawExprNodeExt(pCxt, &yymsp[-4].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy490), yymsp[-2].minor.yy502, yymsp[-1].minor.yy490)); }
+#line 7344 "sql.c"
yymsp[-4].minor.yy490 = yylhsminor.yy490;
break;
case 511: /* when_then_expr ::= WHEN common_expression THEN common_expression */
+#line 970 "sql.y"
{ yymsp[-3].minor.yy490 = createWhenThenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy490), releaseRawExprNode(pCxt, yymsp[0].minor.yy490)); }
+#line 7350 "sql.c"
break;
case 513: /* case_when_else_opt ::= ELSE common_expression */
+#line 973 "sql.y"
{ yymsp[-1].minor.yy490 = releaseRawExprNode(pCxt, yymsp[0].minor.yy490); }
+#line 7355 "sql.c"
break;
case 514: /* predicate ::= expr_or_subquery compare_op expr_or_subquery */
case 519: /* predicate ::= expr_or_subquery in_op in_predicate_value */ yytestcase(yyruleno==519);
+#line 976 "sql.y"
{
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy490);
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy490);
yylhsminor.yy490 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, yymsp[-1].minor.yy30, releaseRawExprNode(pCxt, yymsp[-2].minor.yy490), releaseRawExprNode(pCxt, yymsp[0].minor.yy490)));
}
+#line 7365 "sql.c"
yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
case 515: /* predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */
+#line 983 "sql.y"
{
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-4].minor.yy490);
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy490);
yylhsminor.yy490 = createRawExprNodeExt(pCxt, &s, &e, createBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-4].minor.yy490), releaseRawExprNode(pCxt, yymsp[-2].minor.yy490), releaseRawExprNode(pCxt, yymsp[0].minor.yy490)));
}
+#line 7375 "sql.c"
yymsp[-4].minor.yy490 = yylhsminor.yy490;
break;
case 516: /* predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */
+#line 989 "sql.y"
{
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-5].minor.yy490);
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy490);
yylhsminor.yy490 = createRawExprNodeExt(pCxt, &s, &e, createNotBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy490), releaseRawExprNode(pCxt, yymsp[-2].minor.yy490), releaseRawExprNode(pCxt, yymsp[0].minor.yy490)));
}
+#line 7385 "sql.c"
yymsp[-5].minor.yy490 = yylhsminor.yy490;
break;
case 517: /* predicate ::= expr_or_subquery IS NULL */
+#line 994 "sql.y"
{
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy490);
yylhsminor.yy490 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NULL, releaseRawExprNode(pCxt, yymsp[-2].minor.yy490), NULL));
}
+#line 7394 "sql.c"
yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
case 518: /* predicate ::= expr_or_subquery IS NOT NULL */
+#line 998 "sql.y"
{
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-3].minor.yy490);
yylhsminor.yy490 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NOT_NULL, releaseRawExprNode(pCxt, yymsp[-3].minor.yy490), NULL));
}
+#line 7403 "sql.c"
yymsp[-3].minor.yy490 = yylhsminor.yy490;
break;
case 520: /* compare_op ::= NK_LT */
+#line 1010 "sql.y"
{ yymsp[0].minor.yy30 = OP_TYPE_LOWER_THAN; }
+#line 7409 "sql.c"
break;
case 521: /* compare_op ::= NK_GT */
+#line 1011 "sql.y"
{ yymsp[0].minor.yy30 = OP_TYPE_GREATER_THAN; }
+#line 7414 "sql.c"
break;
case 522: /* compare_op ::= NK_LE */
+#line 1012 "sql.y"
{ yymsp[0].minor.yy30 = OP_TYPE_LOWER_EQUAL; }
+#line 7419 "sql.c"
break;
case 523: /* compare_op ::= NK_GE */
+#line 1013 "sql.y"
{ yymsp[0].minor.yy30 = OP_TYPE_GREATER_EQUAL; }
+#line 7424 "sql.c"
break;
case 524: /* compare_op ::= NK_NE */
+#line 1014 "sql.y"
{ yymsp[0].minor.yy30 = OP_TYPE_NOT_EQUAL; }
+#line 7429 "sql.c"
break;
case 525: /* compare_op ::= NK_EQ */
+#line 1015 "sql.y"
{ yymsp[0].minor.yy30 = OP_TYPE_EQUAL; }
+#line 7434 "sql.c"
break;
case 526: /* compare_op ::= LIKE */
+#line 1016 "sql.y"
{ yymsp[0].minor.yy30 = OP_TYPE_LIKE; }
+#line 7439 "sql.c"
break;
case 527: /* compare_op ::= NOT LIKE */
+#line 1017 "sql.y"
{ yymsp[-1].minor.yy30 = OP_TYPE_NOT_LIKE; }
+#line 7444 "sql.c"
break;
case 528: /* compare_op ::= MATCH */
+#line 1018 "sql.y"
{ yymsp[0].minor.yy30 = OP_TYPE_MATCH; }
+#line 7449 "sql.c"
break;
case 529: /* compare_op ::= NMATCH */
+#line 1019 "sql.y"
{ yymsp[0].minor.yy30 = OP_TYPE_NMATCH; }
+#line 7454 "sql.c"
break;
case 530: /* compare_op ::= CONTAINS */
+#line 1020 "sql.y"
{ yymsp[0].minor.yy30 = OP_TYPE_JSON_CONTAINS; }
+#line 7459 "sql.c"
break;
case 531: /* in_op ::= IN */
+#line 1024 "sql.y"
{ yymsp[0].minor.yy30 = OP_TYPE_IN; }
+#line 7464 "sql.c"
break;
case 532: /* in_op ::= NOT IN */
+#line 1025 "sql.y"
{ yymsp[-1].minor.yy30 = OP_TYPE_NOT_IN; }
+#line 7469 "sql.c"
break;
case 533: /* in_predicate_value ::= NK_LP literal_list NK_RP */
+#line 1027 "sql.y"
{ yylhsminor.yy490 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createNodeListNode(pCxt, yymsp[-1].minor.yy502)); }
+#line 7474 "sql.c"
yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
case 535: /* boolean_value_expression ::= NOT boolean_primary */
+#line 1031 "sql.y"
{
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy490);
yylhsminor.yy490 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_NOT, releaseRawExprNode(pCxt, yymsp[0].minor.yy490), NULL));
}
+#line 7483 "sql.c"
yymsp[-1].minor.yy490 = yylhsminor.yy490;
break;
case 536: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */
+#line 1036 "sql.y"
{
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy490);
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy490);
yylhsminor.yy490 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy490), releaseRawExprNode(pCxt, yymsp[0].minor.yy490)));
}
+#line 7493 "sql.c"
yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
case 537: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */
+#line 1042 "sql.y"
{
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy490);
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy490);
yylhsminor.yy490 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy490), releaseRawExprNode(pCxt, yymsp[0].minor.yy490)));
}
+#line 7503 "sql.c"
yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
case 545: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */
+#line 1060 "sql.y"
{ yylhsminor.yy490 = createJoinTableNode(pCxt, JOIN_TYPE_INNER, yymsp[-2].minor.yy490, yymsp[0].minor.yy490, NULL); }
+#line 7509 "sql.c"
yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
case 548: /* table_primary ::= table_name alias_opt */
+#line 1066 "sql.y"
{ yylhsminor.yy490 = createRealTableNode(pCxt, NULL, &yymsp[-1].minor.yy561, &yymsp[0].minor.yy561); }
+#line 7515 "sql.c"
yymsp[-1].minor.yy490 = yylhsminor.yy490;
break;
case 549: /* table_primary ::= db_name NK_DOT table_name alias_opt */
+#line 1067 "sql.y"
{ yylhsminor.yy490 = createRealTableNode(pCxt, &yymsp[-3].minor.yy561, &yymsp[-1].minor.yy561, &yymsp[0].minor.yy561); }
+#line 7521 "sql.c"
yymsp[-3].minor.yy490 = yylhsminor.yy490;
break;
case 550: /* table_primary ::= subquery alias_opt */
+#line 1068 "sql.y"
{ yylhsminor.yy490 = createTempTableNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy490), &yymsp[0].minor.yy561); }
+#line 7527 "sql.c"
yymsp[-1].minor.yy490 = yylhsminor.yy490;
break;
case 552: /* alias_opt ::= */
+#line 1073 "sql.y"
{ yymsp[1].minor.yy561 = nil_token; }
+#line 7533 "sql.c"
break;
case 554: /* alias_opt ::= AS table_alias */
+#line 1075 "sql.y"
{ yymsp[-1].minor.yy561 = yymsp[0].minor.yy561; }
+#line 7538 "sql.c"
break;
case 555: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */
case 556: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==556);
+#line 1077 "sql.y"
{ yymsp[-2].minor.yy490 = yymsp[-1].minor.yy490; }
+#line 7544 "sql.c"
break;
case 557: /* joined_table ::= table_reference join_type JOIN table_reference ON search_condition */
+#line 1082 "sql.y"
{ yylhsminor.yy490 = createJoinTableNode(pCxt, yymsp[-4].minor.yy246, yymsp[-5].minor.yy490, yymsp[-2].minor.yy490, yymsp[0].minor.yy490); }
+#line 7549 "sql.c"
yymsp[-5].minor.yy490 = yylhsminor.yy490;
break;
case 558: /* join_type ::= */
+#line 1086 "sql.y"
{ yymsp[1].minor.yy246 = JOIN_TYPE_INNER; }
+#line 7555 "sql.c"
break;
case 559: /* join_type ::= INNER */
+#line 1087 "sql.y"
{ yymsp[0].minor.yy246 = JOIN_TYPE_INNER; }
+#line 7560 "sql.c"
break;
case 560: /* 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 */
+#line 1093 "sql.y"
{
yymsp[-13].minor.yy490 = createSelectStmt(pCxt, yymsp[-11].minor.yy845, yymsp[-9].minor.yy502, yymsp[-8].minor.yy490, yymsp[-12].minor.yy502);
yymsp[-13].minor.yy490 = setSelectStmtTagMode(pCxt, yymsp[-13].minor.yy490, yymsp[-10].minor.yy845);
@@ -6430,145 +7573,224 @@ static YYACTIONTYPE yy_reduce(
yymsp[-13].minor.yy490 = addEveryClause(pCxt, yymsp[-13].minor.yy490, yymsp[-4].minor.yy490);
yymsp[-13].minor.yy490 = addFillClause(pCxt, yymsp[-13].minor.yy490, yymsp[-3].minor.yy490);
}
+#line 7576 "sql.c"
break;
case 561: /* hint_list ::= */
+#line 1108 "sql.y"
{ yymsp[1].minor.yy502 = createHintNodeList(pCxt, NULL); }
+#line 7581 "sql.c"
break;
case 562: /* hint_list ::= NK_HINT */
+#line 1109 "sql.y"
{ yylhsminor.yy502 = createHintNodeList(pCxt, &yymsp[0].minor.yy0); }
+#line 7586 "sql.c"
yymsp[0].minor.yy502 = yylhsminor.yy502;
break;
case 567: /* set_quantifier_opt ::= ALL */
+#line 1120 "sql.y"
{ yymsp[0].minor.yy845 = false; }
+#line 7592 "sql.c"
break;
case 570: /* select_item ::= NK_STAR */
+#line 1127 "sql.y"
{ yylhsminor.yy490 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0); }
+#line 7597 "sql.c"
yymsp[0].minor.yy490 = yylhsminor.yy490;
break;
case 572: /* select_item ::= common_expression column_alias */
case 582: /* partition_item ::= expr_or_subquery column_alias */ yytestcase(yyruleno==582);
+#line 1129 "sql.y"
{ yylhsminor.yy490 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy490), &yymsp[0].minor.yy561); }
+#line 7604 "sql.c"
yymsp[-1].minor.yy490 = yylhsminor.yy490;
break;
case 573: /* select_item ::= common_expression AS column_alias */
case 583: /* partition_item ::= expr_or_subquery AS column_alias */ yytestcase(yyruleno==583);
+#line 1130 "sql.y"
{ yylhsminor.yy490 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy490), &yymsp[0].minor.yy561); }
+#line 7611 "sql.c"
yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
case 578: /* partition_by_clause_opt ::= PARTITION BY partition_list */
case 606: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==606);
case 626: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==626);
+#line 1139 "sql.y"
{ yymsp[-2].minor.yy502 = yymsp[0].minor.yy502; }
+#line 7619 "sql.c"
break;
case 585: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP */
+#line 1152 "sql.y"
{ yymsp[-5].minor.yy490 = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy490), releaseRawExprNode(pCxt, yymsp[-1].minor.yy490)); }
+#line 7624 "sql.c"
break;
case 586: /* twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */
+#line 1153 "sql.y"
{ yymsp[-3].minor.yy490 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy490)); }
+#line 7629 "sql.c"
break;
case 587: /* twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt */
+#line 1155 "sql.y"
{ yymsp[-5].minor.yy490 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy490), NULL, yymsp[-1].minor.yy490, yymsp[0].minor.yy490); }
+#line 7634 "sql.c"
break;
case 588: /* twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_COMMA interval_sliding_duration_literal NK_RP sliding_opt fill_opt */
+#line 1159 "sql.y"
{ yymsp[-7].minor.yy490 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy490), releaseRawExprNode(pCxt, yymsp[-3].minor.yy490), yymsp[-1].minor.yy490, yymsp[0].minor.yy490); }
+#line 7639 "sql.c"
break;
case 589: /* twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */
+#line 1161 "sql.y"
{ yymsp[-6].minor.yy490 = createEventWindowNode(pCxt, yymsp[-3].minor.yy490, yymsp[0].minor.yy490); }
+#line 7644 "sql.c"
break;
case 596: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */
+#line 1171 "sql.y"
{ yymsp[-3].minor.yy490 = createFillNode(pCxt, yymsp[-1].minor.yy718, NULL); }
+#line 7649 "sql.c"
break;
case 597: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP */
+#line 1172 "sql.y"
{ yymsp[-5].minor.yy490 = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, yymsp[-1].minor.yy502)); }
+#line 7654 "sql.c"
break;
case 598: /* fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP */
+#line 1173 "sql.y"
{ yymsp[-5].minor.yy490 = createFillNode(pCxt, FILL_MODE_VALUE_F, createNodeListNode(pCxt, yymsp[-1].minor.yy502)); }
+#line 7659 "sql.c"
break;
case 599: /* fill_mode ::= NONE */
+#line 1177 "sql.y"
{ yymsp[0].minor.yy718 = FILL_MODE_NONE; }
+#line 7664 "sql.c"
break;
case 600: /* fill_mode ::= PREV */
+#line 1178 "sql.y"
{ yymsp[0].minor.yy718 = FILL_MODE_PREV; }
+#line 7669 "sql.c"
break;
case 601: /* fill_mode ::= NULL */
+#line 1179 "sql.y"
{ yymsp[0].minor.yy718 = FILL_MODE_NULL; }
+#line 7674 "sql.c"
break;
case 602: /* fill_mode ::= NULL_F */
+#line 1180 "sql.y"
{ yymsp[0].minor.yy718 = FILL_MODE_NULL_F; }
+#line 7679 "sql.c"
break;
case 603: /* fill_mode ::= LINEAR */
+#line 1181 "sql.y"
{ yymsp[0].minor.yy718 = FILL_MODE_LINEAR; }
+#line 7684 "sql.c"
break;
case 604: /* fill_mode ::= NEXT */
+#line 1182 "sql.y"
{ yymsp[0].minor.yy718 = FILL_MODE_NEXT; }
+#line 7689 "sql.c"
break;
case 607: /* group_by_list ::= expr_or_subquery */
+#line 1191 "sql.y"
{ yylhsminor.yy502 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy490))); }
+#line 7694 "sql.c"
yymsp[0].minor.yy502 = yylhsminor.yy502;
break;
case 608: /* group_by_list ::= group_by_list NK_COMMA expr_or_subquery */
+#line 1192 "sql.y"
{ yylhsminor.yy502 = addNodeToList(pCxt, yymsp[-2].minor.yy502, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy490))); }
+#line 7700 "sql.c"
yymsp[-2].minor.yy502 = yylhsminor.yy502;
break;
case 612: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */
+#line 1199 "sql.y"
{ yymsp[-5].minor.yy490 = createInterpTimeRange(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy490), releaseRawExprNode(pCxt, yymsp[-1].minor.yy490)); }
+#line 7706 "sql.c"
break;
case 613: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_RP */
+#line 1201 "sql.y"
{ yymsp[-3].minor.yy490 = createInterpTimePoint(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy490)); }
+#line 7711 "sql.c"
break;
case 616: /* query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */
+#line 1208 "sql.y"
{
yylhsminor.yy490 = addOrderByClause(pCxt, yymsp[-3].minor.yy490, yymsp[-2].minor.yy502);
yylhsminor.yy490 = addSlimitClause(pCxt, yylhsminor.yy490, yymsp[-1].minor.yy490);
yylhsminor.yy490 = addLimitClause(pCxt, yylhsminor.yy490, yymsp[0].minor.yy490);
}
+#line 7720 "sql.c"
yymsp[-3].minor.yy490 = yylhsminor.yy490;
break;
case 619: /* union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */
+#line 1218 "sql.y"
{ yylhsminor.yy490 = createSetOperator(pCxt, SET_OP_TYPE_UNION_ALL, yymsp[-3].minor.yy490, yymsp[0].minor.yy490); }
+#line 7726 "sql.c"
yymsp[-3].minor.yy490 = yylhsminor.yy490;
break;
case 620: /* union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */
+#line 1220 "sql.y"
{ yylhsminor.yy490 = createSetOperator(pCxt, SET_OP_TYPE_UNION, yymsp[-2].minor.yy490, yymsp[0].minor.yy490); }
+#line 7732 "sql.c"
yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
case 628: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */
case 632: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==632);
+#line 1234 "sql.y"
{ yymsp[-1].minor.yy490 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); }
+#line 7739 "sql.c"
break;
case 629: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */
case 633: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==633);
+#line 1235 "sql.y"
{ yymsp[-3].minor.yy490 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); }
+#line 7745 "sql.c"
break;
case 630: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */
case 634: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==634);
+#line 1236 "sql.y"
{ yymsp[-3].minor.yy490 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); }
+#line 7751 "sql.c"
break;
case 635: /* subquery ::= NK_LP query_expression NK_RP */
+#line 1244 "sql.y"
{ yylhsminor.yy490 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy490); }
+#line 7756 "sql.c"
yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
case 640: /* sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */
+#line 1258 "sql.y"
{ yylhsminor.yy490 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy490), yymsp[-1].minor.yy876, yymsp[0].minor.yy361); }
+#line 7762 "sql.c"
yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
case 641: /* ordering_specification_opt ::= */
+#line 1262 "sql.y"
{ yymsp[1].minor.yy876 = ORDER_ASC; }
+#line 7768 "sql.c"
break;
case 642: /* ordering_specification_opt ::= ASC */
+#line 1263 "sql.y"
{ yymsp[0].minor.yy876 = ORDER_ASC; }
+#line 7773 "sql.c"
break;
case 643: /* ordering_specification_opt ::= DESC */
+#line 1264 "sql.y"
{ yymsp[0].minor.yy876 = ORDER_DESC; }
+#line 7778 "sql.c"
break;
case 644: /* null_ordering_opt ::= */
+#line 1268 "sql.y"
{ yymsp[1].minor.yy361 = NULL_ORDER_DEFAULT; }
+#line 7783 "sql.c"
break;
case 645: /* null_ordering_opt ::= NULLS FIRST */
+#line 1269 "sql.y"
{ yymsp[-1].minor.yy361 = NULL_ORDER_FIRST; }
+#line 7788 "sql.c"
break;
case 646: /* null_ordering_opt ::= NULLS LAST */
+#line 1270 "sql.y"
{ yymsp[-1].minor.yy361 = NULL_ORDER_LAST; }
+#line 7793 "sql.c"
break;
default:
break;
@@ -6630,6 +7852,7 @@ static void yy_syntax_error(
ParseCTX_FETCH
#define TOKEN yyminor
/************ Begin %syntax_error code ****************************************/
+#line 29 "sql.y"
if (TSDB_CODE_SUCCESS == pCxt->errCode) {
if(TOKEN.z) {
@@ -6640,6 +7863,7 @@ static void yy_syntax_error(
} else if (TSDB_CODE_PAR_DB_NOT_SPECIFIED == pCxt->errCode && TK_NK_FLOAT == TOKEN.type) {
pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_SYNTAX_ERROR, TOKEN.z);
}
+#line 7866 "sql.c"
/************ End %syntax_error code ******************************************/
ParseARG_STORE /* Suppress warning about unused %extra_argument variable */
ParseCTX_STORE
@@ -6725,12 +7949,56 @@ void Parse(
}
#endif
- do{
+ while(1){ /* Exit by "break" */
+ assert( yypParser->yytos>=yypParser->yystack );
assert( yyact==yypParser->yytos->stateno );
yyact = yy_find_shift_action((YYCODETYPE)yymajor,yyact);
if( yyact >= YY_MIN_REDUCE ){
- yyact = yy_reduce(yypParser,yyact-YY_MIN_REDUCE,yymajor,
- yyminor ParseCTX_PARAM);
+ unsigned int yyruleno = yyact - YY_MIN_REDUCE; /* Reduce by this rule */
+#ifndef NDEBUG
+ assert( yyruleno<(int)(sizeof(yyRuleName)/sizeof(yyRuleName[0])) );
+ if( yyTraceFILE ){
+ int yysize = yyRuleInfoNRhs[yyruleno];
+ if( yysize ){
+ fprintf(yyTraceFILE, "%sReduce %d [%s]%s, pop back to state %d.\n",
+ yyTracePrompt,
+ yyruleno, yyRuleName[yyruleno],
+ yyrulenoyytos[yysize].stateno);
+ }else{
+ fprintf(yyTraceFILE, "%sReduce %d [%s]%s.\n",
+ yyTracePrompt, yyruleno, yyRuleName[yyruleno],
+ yyrulenoyytos - yypParser->yystack)>yypParser->yyhwm ){
+ yypParser->yyhwm++;
+ assert( yypParser->yyhwm ==
+ (int)(yypParser->yytos - yypParser->yystack));
+ }
+#endif
+#if YYSTACKDEPTH>0
+ if( yypParser->yytos>=yypParser->yystackEnd ){
+ yyStackOverflow(yypParser);
+ break;
+ }
+#else
+ if( yypParser->yytos>=&yypParser->yystack[yypParser->yystksz-1] ){
+ if( yyGrowStack(yypParser) ){
+ yyStackOverflow(yypParser);
+ break;
+ }
+ }
+#endif
+ }
+ yyact = yy_reduce(yypParser,yyruleno,yymajor,yyminor ParseCTX_PARAM);
}else if( yyact <= YY_MAX_SHIFTREDUCE ){
yy_shift(yypParser,yyact,(YYCODETYPE)yymajor,yyminor);
#ifndef YYNOERRORRECOVERY
@@ -6786,14 +8054,13 @@ void Parse(
yy_destructor(yypParser, (YYCODETYPE)yymajor, &yyminorunion);
yymajor = YYNOCODE;
}else{
- while( yypParser->yytos >= yypParser->yystack
- && (yyact = yy_find_reduce_action(
- yypParser->yytos->stateno,
- YYERRORSYMBOL)) > YY_MAX_SHIFTREDUCE
- ){
+ while( yypParser->yytos > yypParser->yystack ){
+ yyact = yy_find_reduce_action(yypParser->yytos->stateno,
+ YYERRORSYMBOL);
+ if( yyact<=YY_MAX_SHIFTREDUCE ) break;
yy_pop_parser_stack(yypParser);
}
- if( yypParser->yytos < yypParser->yystack || yymajor==0 ){
+ if( yypParser->yytos <= yypParser->yystack || yymajor==0 ){
yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion);
yy_parse_failed(yypParser);
#ifndef YYNOERRORRECOVERY
@@ -6843,7 +8110,7 @@ void Parse(
break;
#endif
}
- }while( yypParser->yytos>yypParser->yystack );
+ }
#ifndef NDEBUG
if( yyTraceFILE ){
yyStackEntry *i;
diff --git a/source/libs/scheduler/src/schJob.c b/source/libs/scheduler/src/schJob.c
index 6e312f0e6f..e50ec64d54 100644
--- a/source/libs/scheduler/src/schJob.c
+++ b/source/libs/scheduler/src/schJob.c
@@ -66,7 +66,7 @@ FORCE_INLINE bool schJobNeedToStop(SSchJob *pJob, int8_t *pStatus) {
return true;
}
- if ((*pJob->chkKillFp)(pJob->chkKillParam)) {
+ if (pJob->chkKillFp && (*pJob->chkKillFp)(pJob->chkKillParam)) {
schUpdateJobErrCode(pJob, TSDB_CODE_TSC_QUERY_KILLED);
return true;
}
diff --git a/source/libs/scheduler/test/schedulerTests.cpp b/source/libs/scheduler/test/schedulerTests.cpp
index 5605a4b842..fbb1f657b0 100644
--- a/source/libs/scheduler/test/schedulerTests.cpp
+++ b/source/libs/scheduler/test/schedulerTests.cpp
@@ -54,9 +54,8 @@
namespace {
-extern "C" int32_t schHandleResponseMsg(SSchJob *job, SSchTask *task, int32_t msgType, char *msg, int32_t msgSize,
- int32_t rspCode);
-extern "C" int32_t schHandleCallback(void *param, const SDataBuf *pMsg, int32_t msgType, int32_t rspCode);
+extern "C" int32_t schHandleResponseMsg(SSchJob *pJob, SSchTask *pTask, int32_t execId, SDataBuf *pMsg, int32_t rspCode);
+extern "C" int32_t schHandleCallback(void *param, const SDataBuf *pMsg, int32_t rspCode);
int64_t insertJobRefId = 0;
int64_t queryJobRefId = 0;
@@ -67,7 +66,7 @@ uint64_t schtQueryId = 1;
bool schtTestStop = false;
bool schtTestDeadLoop = false;
-int32_t schtTestMTRunSec = 10;
+int32_t schtTestMTRunSec = 1;
int32_t schtTestPrintNum = 1000;
int32_t schtStartFetch = 0;
@@ -85,10 +84,69 @@ void schtInitLogFile() {
}
void schtQueryCb(SExecResult *pResult, void *param, int32_t code) {
- assert(TSDB_CODE_SUCCESS == code);
*(int32_t *)param = 1;
}
+int32_t schtBuildQueryRspMsg(uint32_t *msize, void** rspMsg) {
+ SQueryTableRsp rsp = {0};
+ rsp.code = 0;
+ rsp.affectedRows = 0;
+ rsp.tbVerInfo = NULL;
+
+ int32_t msgSize = tSerializeSQueryTableRsp(NULL, 0, &rsp);
+ if (msgSize < 0) {
+ qError("tSerializeSQueryTableRsp failed");
+ return TSDB_CODE_OUT_OF_MEMORY;
+ }
+
+ void *pRsp = taosMemoryCalloc(msgSize, 1);
+ if (NULL == pRsp) {
+ qError("rpcMallocCont %d failed", msgSize);
+ return TSDB_CODE_OUT_OF_MEMORY;
+ }
+
+ if (tSerializeSQueryTableRsp(pRsp, msgSize, &rsp) < 0) {
+ qError("tSerializeSQueryTableRsp %d failed", msgSize);
+ return TSDB_CODE_OUT_OF_MEMORY;
+ }
+
+ *rspMsg = pRsp;
+ *msize = msgSize;
+
+ return TSDB_CODE_SUCCESS;
+}
+
+
+int32_t schtBuildFetchRspMsg(uint32_t *msize, void** rspMsg) {
+ SRetrieveTableRsp* rsp = (SRetrieveTableRsp*)taosMemoryCalloc(sizeof(SRetrieveTableRsp), 1);
+ rsp->completed = 1;
+ rsp->numOfRows = 10;
+ rsp->compLen = 0;
+
+ *rspMsg = rsp;
+ *msize = sizeof(SRetrieveTableRsp);
+
+ return TSDB_CODE_SUCCESS;
+}
+
+int32_t schtBuildSubmitRspMsg(uint32_t *msize, void** rspMsg) {
+ SSubmitRsp2 submitRsp = {0};
+ int32_t msgSize = 0, ret = 0;
+ SEncoder ec = {0};
+
+ tEncodeSize(tEncodeSSubmitRsp2, &submitRsp, msgSize, ret);
+ void* msg = taosMemoryCalloc(1, msgSize);
+ tEncoderInit(&ec, (uint8_t*)msg, msgSize);
+ tEncodeSSubmitRsp2(&ec, &submitRsp);
+ tEncoderClear(&ec);
+
+ *rspMsg = msg;
+ *msize = msgSize;
+
+ return TSDB_CODE_SUCCESS;
+}
+
+
void schtBuildQueryDag(SQueryPlan *dag) {
uint64_t qId = schtQueryId;
@@ -98,8 +156,8 @@ void schtBuildQueryDag(SQueryPlan *dag) {
SNodeListNode *scan = (SNodeListNode *)nodesMakeNode(QUERY_NODE_NODE_LIST);
SNodeListNode *merge = (SNodeListNode *)nodesMakeNode(QUERY_NODE_NODE_LIST);
- SSubplan *scanPlan = (SSubplan *)taosMemoryCalloc(1, sizeof(SSubplan));
- SSubplan *mergePlan = (SSubplan *)taosMemoryCalloc(1, sizeof(SSubplan));
+ SSubplan *scanPlan = (SSubplan*)nodesMakeNode(QUERY_NODE_PHYSICAL_SUBPLAN);
+ SSubplan *mergePlan = (SSubplan*)nodesMakeNode(QUERY_NODE_PHYSICAL_SUBPLAN);
scanPlan->id.queryId = qId;
scanPlan->id.groupId = 0x0000000000000002;
@@ -113,7 +171,7 @@ void schtBuildQueryDag(SQueryPlan *dag) {
scanPlan->pChildren = NULL;
scanPlan->level = 1;
scanPlan->pParents = nodesMakeList();
- scanPlan->pNode = (SPhysiNode *)taosMemoryCalloc(1, sizeof(SPhysiNode));
+ scanPlan->pNode = (SPhysiNode *)nodesMakeNode(QUERY_NODE_PHYSICAL_PLAN_TABLE_SCAN);
scanPlan->msgType = TDMT_SCH_QUERY;
mergePlan->id.queryId = qId;
@@ -125,7 +183,7 @@ void schtBuildQueryDag(SQueryPlan *dag) {
mergePlan->pChildren = nodesMakeList();
mergePlan->pParents = NULL;
- mergePlan->pNode = (SPhysiNode *)taosMemoryCalloc(1, sizeof(SPhysiNode));
+ mergePlan->pNode = (SPhysiNode *)nodesMakeNode(QUERY_NODE_PHYSICAL_PLAN_MERGE);
mergePlan->msgType = TDMT_SCH_QUERY;
merge->pNodeList = nodesMakeList();
@@ -151,8 +209,7 @@ void schtBuildQueryFlowCtrlDag(SQueryPlan *dag) {
SNodeListNode *scan = (SNodeListNode *)nodesMakeNode(QUERY_NODE_NODE_LIST);
SNodeListNode *merge = (SNodeListNode *)nodesMakeNode(QUERY_NODE_NODE_LIST);
- SSubplan *scanPlan = (SSubplan *)taosMemoryCalloc(scanPlanNum, sizeof(SSubplan));
- SSubplan *mergePlan = (SSubplan *)taosMemoryCalloc(1, sizeof(SSubplan));
+ SSubplan *mergePlan = (SSubplan*)nodesMakeNode(QUERY_NODE_PHYSICAL_SUBPLAN);
merge->pNodeList = nodesMakeList();
scan->pNodeList = nodesMakeList();
@@ -160,29 +217,30 @@ void schtBuildQueryFlowCtrlDag(SQueryPlan *dag) {
mergePlan->pChildren = nodesMakeList();
for (int32_t i = 0; i < scanPlanNum; ++i) {
- scanPlan[i].id.queryId = qId;
- scanPlan[i].id.groupId = 0x0000000000000002;
- scanPlan[i].id.subplanId = 0x0000000000000003 + i;
- scanPlan[i].subplanType = SUBPLAN_TYPE_SCAN;
+ SSubplan *scanPlan = (SSubplan*)nodesMakeNode(QUERY_NODE_PHYSICAL_SUBPLAN);
+ scanPlan->id.queryId = qId;
+ scanPlan->id.groupId = 0x0000000000000002;
+ scanPlan->id.subplanId = 0x0000000000000003 + i;
+ scanPlan->subplanType = SUBPLAN_TYPE_SCAN;
- scanPlan[i].execNode.nodeId = 1 + i;
- scanPlan[i].execNode.epSet.inUse = 0;
- scanPlan[i].execNodeStat.tableNum = taosRand() % 30;
- addEpIntoEpSet(&scanPlan[i].execNode.epSet, "ep0", 6030);
- addEpIntoEpSet(&scanPlan[i].execNode.epSet, "ep1", 6030);
- addEpIntoEpSet(&scanPlan[i].execNode.epSet, "ep2", 6030);
- scanPlan[i].execNode.epSet.inUse = taosRand() % 3;
+ scanPlan->execNode.nodeId = 1 + i;
+ scanPlan->execNode.epSet.inUse = 0;
+ scanPlan->execNodeStat.tableNum = taosRand() % 30;
+ addEpIntoEpSet(&scanPlan->execNode.epSet, "ep0", 6030);
+ addEpIntoEpSet(&scanPlan->execNode.epSet, "ep1", 6030);
+ addEpIntoEpSet(&scanPlan->execNode.epSet, "ep2", 6030);
+ scanPlan->execNode.epSet.inUse = taosRand() % 3;
- scanPlan[i].pChildren = NULL;
- scanPlan[i].level = 1;
- scanPlan[i].pParents = nodesMakeList();
- scanPlan[i].pNode = (SPhysiNode *)taosMemoryCalloc(1, sizeof(SPhysiNode));
- scanPlan[i].msgType = TDMT_SCH_QUERY;
+ scanPlan->pChildren = NULL;
+ scanPlan->level = 1;
+ scanPlan->pParents = nodesMakeList();
+ scanPlan->pNode = (SPhysiNode *)nodesMakeNode(QUERY_NODE_PHYSICAL_PLAN_TABLE_SCAN);
+ scanPlan->msgType = TDMT_SCH_QUERY;
- nodesListAppend(scanPlan[i].pParents, (SNode *)mergePlan);
- nodesListAppend(mergePlan->pChildren, (SNode *)(scanPlan + i));
+ nodesListAppend(scanPlan->pParents, (SNode *)mergePlan);
+ nodesListAppend(mergePlan->pChildren, (SNode *)scanPlan);
- nodesListAppend(scan->pNodeList, (SNode *)(scanPlan + i));
+ nodesListAppend(scan->pNodeList, (SNode *)scanPlan);
}
mergePlan->id.queryId = qId;
@@ -193,7 +251,7 @@ void schtBuildQueryFlowCtrlDag(SQueryPlan *dag) {
mergePlan->execNode.epSet.numOfEps = 0;
mergePlan->pParents = NULL;
- mergePlan->pNode = (SPhysiNode *)taosMemoryCalloc(1, sizeof(SPhysiNode));
+ mergePlan->pNode = (SPhysiNode *)nodesMakeNode(QUERY_NODE_PHYSICAL_PLAN_MERGE);
mergePlan->msgType = TDMT_SCH_QUERY;
nodesListAppend(merge->pNodeList, (SNode *)mergePlan);
@@ -211,45 +269,50 @@ void schtBuildInsertDag(SQueryPlan *dag) {
dag->numOfSubplans = 2;
dag->pSubplans = nodesMakeList();
SNodeListNode *inserta = (SNodeListNode *)nodesMakeNode(QUERY_NODE_NODE_LIST);
-
- SSubplan *insertPlan = (SSubplan *)taosMemoryCalloc(2, sizeof(SSubplan));
-
- insertPlan[0].id.queryId = qId;
- insertPlan[0].id.groupId = 0x0000000000000003;
- insertPlan[0].id.subplanId = 0x0000000000000004;
- insertPlan[0].subplanType = SUBPLAN_TYPE_MODIFY;
- insertPlan[0].level = 0;
-
- insertPlan[0].execNode.nodeId = 1;
- insertPlan[0].execNode.epSet.inUse = 0;
- addEpIntoEpSet(&insertPlan[0].execNode.epSet, "ep0", 6030);
-
- insertPlan[0].pChildren = NULL;
- insertPlan[0].pParents = NULL;
- insertPlan[0].pNode = NULL;
- insertPlan[0].pDataSink = (SDataSinkNode *)taosMemoryCalloc(1, sizeof(SDataSinkNode));
- insertPlan[0].msgType = TDMT_VND_SUBMIT;
-
- insertPlan[1].id.queryId = qId;
- insertPlan[1].id.groupId = 0x0000000000000003;
- insertPlan[1].id.subplanId = 0x0000000000000005;
- insertPlan[1].subplanType = SUBPLAN_TYPE_MODIFY;
- insertPlan[1].level = 0;
-
- insertPlan[1].execNode.nodeId = 1;
- insertPlan[1].execNode.epSet.inUse = 0;
- addEpIntoEpSet(&insertPlan[1].execNode.epSet, "ep0", 6030);
-
- insertPlan[1].pChildren = NULL;
- insertPlan[1].pParents = NULL;
- insertPlan[1].pNode = NULL;
- insertPlan[1].pDataSink = (SDataSinkNode *)taosMemoryCalloc(1, sizeof(SDataSinkNode));
- insertPlan[1].msgType = TDMT_VND_SUBMIT;
-
inserta->pNodeList = nodesMakeList();
+ SSubplan *insertPlan = (SSubplan*)nodesMakeNode(QUERY_NODE_PHYSICAL_SUBPLAN);
+
+ insertPlan->id.queryId = qId;
+ insertPlan->id.groupId = 0x0000000000000003;
+ insertPlan->id.subplanId = 0x0000000000000004;
+ insertPlan->subplanType = SUBPLAN_TYPE_MODIFY;
+ insertPlan->level = 0;
+
+ insertPlan->execNode.nodeId = 1;
+ insertPlan->execNode.epSet.inUse = 0;
+ addEpIntoEpSet(&insertPlan->execNode.epSet, "ep0", 6030);
+
+ insertPlan->pChildren = NULL;
+ insertPlan->pParents = NULL;
+ insertPlan->pNode = NULL;
+ insertPlan->pDataSink = (SDataSinkNode*)nodesMakeNode(QUERY_NODE_PHYSICAL_PLAN_INSERT);
+ ((SDataInserterNode*)insertPlan->pDataSink)->size = 1;
+ ((SDataInserterNode*)insertPlan->pDataSink)->pData = taosMemoryCalloc(1, 1);
+ insertPlan->msgType = TDMT_VND_SUBMIT;
+
nodesListAppend(inserta->pNodeList, (SNode *)insertPlan);
- insertPlan += 1;
+
+ insertPlan = (SSubplan*)nodesMakeNode(QUERY_NODE_PHYSICAL_SUBPLAN);
+
+ insertPlan->id.queryId = qId;
+ insertPlan->id.groupId = 0x0000000000000003;
+ insertPlan->id.subplanId = 0x0000000000000005;
+ insertPlan->subplanType = SUBPLAN_TYPE_MODIFY;
+ insertPlan->level = 0;
+
+ insertPlan->execNode.nodeId = 1;
+ insertPlan->execNode.epSet.inUse = 0;
+ addEpIntoEpSet(&insertPlan->execNode.epSet, "ep0", 6030);
+
+ insertPlan->pChildren = NULL;
+ insertPlan->pParents = NULL;
+ insertPlan->pNode = NULL;
+ insertPlan->pDataSink = (SDataSinkNode*)nodesMakeNode(QUERY_NODE_PHYSICAL_PLAN_INSERT);
+ ((SDataInserterNode*)insertPlan->pDataSink)->size = 1;
+ ((SDataInserterNode*)insertPlan->pDataSink)->pData = taosMemoryCalloc(1, 1);
+ insertPlan->msgType = TDMT_VND_SUBMIT;
+
nodesListAppend(inserta->pNodeList, (SNode *)insertPlan);
nodesListAppend(dag->pSubplans, (SNode *)inserta);
@@ -325,7 +388,7 @@ void schtSetRpcSendRequest() {
}
}
-int32_t schtAsyncSendMsgToServer(void *pTransporter, SEpSet *epSet, int64_t *pTransporterId, SMsgSendInfo *pInfo) {
+int32_t schtAsyncSendMsgToServer(void *pTransporter, SEpSet *epSet, int64_t *pTransporterId, SMsgSendInfo *pInfo, bool persistHandle, void* rpcCtx) {
if (pInfo) {
taosMemoryFreeClear(pInfo->param);
taosMemoryFreeClear(pInfo->msgInfo.pData);
@@ -336,17 +399,17 @@ int32_t schtAsyncSendMsgToServer(void *pTransporter, SEpSet *epSet, int64_t *pTr
void schtSetAsyncSendMsgToServer() {
static Stub stub;
- stub.set(asyncSendMsgToServer, schtAsyncSendMsgToServer);
+ stub.set(asyncSendMsgToServerExt, schtAsyncSendMsgToServer);
{
#ifdef WINDOWS
AddrAny any;
std::map result;
- any.get_func_addr("asyncSendMsgToServer", result);
+ any.get_func_addr("asyncSendMsgToServerExt", result);
#endif
#ifdef LINUX
AddrAny any("libtransport.so");
std::map result;
- any.get_global_func_addr_dynsym("^asyncSendMsgToServer$", result);
+ any.get_global_func_addr_dynsym("^asyncSendMsgToServerExt$", result);
#endif
for (const auto &f : result) {
stub.set(f.second, schtAsyncSendMsgToServer);
@@ -374,9 +437,13 @@ void *schtSendRsp(void *param) {
while (pIter) {
SSchTask *task = *(SSchTask **)pIter;
- SSubmitRsp rsp = {0};
- rsp.affectedRows = 10;
- schHandleResponseMsg(pJob, task, TDMT_VND_SUBMIT_RSP, (char *)&rsp, sizeof(rsp), 0);
+ SDataBuf msg = {0};
+ void* rmsg = NULL;
+ schtBuildSubmitRspMsg(&msg.len, &rmsg);
+ msg.msgType = TDMT_VND_SUBMIT_RSP;
+ msg.pData = rmsg;
+
+ schHandleResponseMsg(pJob, task, task->execId, &msg, 0);
pIter = taosHashIterate(pJob->execTasks, pIter);
}
@@ -393,11 +460,13 @@ void *schtCreateFetchRspThread(void *param) {
taosSsleep(1);
int32_t code = 0;
- SRetrieveTableRsp *rsp = (SRetrieveTableRsp *)taosMemoryCalloc(1, sizeof(SRetrieveTableRsp));
- rsp->completed = 1;
- rsp->numOfRows = 10;
-
- code = schHandleResponseMsg(pJob, pJob->fetchTask, TDMT_SCH_FETCH_RSP, (char *)rsp, sizeof(*rsp), 0);
+ SDataBuf msg = {0};
+ void* rmsg = NULL;
+ schtBuildFetchRspMsg(&msg.len, &rmsg);
+ msg.msgType = TDMT_SCH_MERGE_FETCH_RSP;
+ msg.pData = rmsg;
+
+ code = schHandleResponseMsg(pJob, pJob->fetchTask, pJob->fetchTask->execId, &msg, 0);
schReleaseJob(job);
@@ -414,7 +483,7 @@ void *schtFetchRspThread(void *aa) {
continue;
}
- taosUsleep(1);
+ taosUsleep(100);
param = (SSchTaskCallbackParam *)taosMemoryCalloc(1, sizeof(*param));
@@ -426,10 +495,11 @@ void *schtFetchRspThread(void *aa) {
rsp->completed = 1;
rsp->numOfRows = 10;
+ dataBuf.msgType = TDMT_SCH_FETCH_RSP;
dataBuf.pData = rsp;
dataBuf.len = sizeof(*rsp);
- code = schHandleCallback(param, &dataBuf, TDMT_SCH_FETCH_RSP, 0);
+ code = schHandleCallback(param, &dataBuf, 0);
assert(code == 0 || code);
}
@@ -456,7 +526,7 @@ void *schtRunJobThread(void *aa) {
char *dbname = "1.db1";
char *tablename = "table1";
SVgroupInfo vgInfo = {0};
- SQueryPlan dag;
+ SQueryPlan* dag = (SQueryPlan*)nodesMakeNode(QUERY_NODE_PHYSICAL_PLAN);
schtInitLogFile();
@@ -470,19 +540,19 @@ void *schtRunJobThread(void *aa) {
SSchJob *pJob = NULL;
SSchTaskCallbackParam *param = NULL;
SHashObj *execTasks = NULL;
- SDataBuf dataBuf = {0};
uint32_t jobFinished = 0;
int32_t queryDone = 0;
while (!schtTestStop) {
- schtBuildQueryDag(&dag);
+ schtBuildQueryDag(dag);
- SArray *qnodeList = taosArrayInit(1, sizeof(SEp));
+ SArray *qnodeList = taosArrayInit(1, sizeof(SQueryNodeLoad));
- SEp qnodeAddr = {0};
- strcpy(qnodeAddr.fqdn, "qnode0.ep");
- qnodeAddr.port = 6031;
- taosArrayPush(qnodeList, &qnodeAddr);
+ SQueryNodeLoad load = {0};
+ load.addr.epSet.numOfEps = 1;
+ strcpy(load.addr.epSet.eps[0].fqdn, "qnode0.ep");
+ load.addr.epSet.eps[0].port = 6031;
+ taosArrayPush(qnodeList, &load);
queryDone = 0;
@@ -492,7 +562,7 @@ void *schtRunJobThread(void *aa) {
req.syncReq = false;
req.pConn = &conn;
req.pNodeList = qnodeList;
- req.pDag = &dag;
+ req.pDag = dag;
req.sql = "select * from tb";
req.execFp = schtQueryCb;
req.cbParam = &queryDone;
@@ -503,7 +573,7 @@ void *schtRunJobThread(void *aa) {
pJob = schAcquireJob(queryJobRefId);
if (NULL == pJob) {
taosArrayDestroy(qnodeList);
- schtFreeQueryDag(&dag);
+ schtFreeQueryDag(dag);
continue;
}
@@ -526,11 +596,14 @@ void *schtRunJobThread(void *aa) {
SSchTask *task = (SSchTask *)pIter;
param->taskId = task->taskId;
- SQueryTableRsp rsp = {0};
- dataBuf.pData = &rsp;
- dataBuf.len = sizeof(rsp);
- code = schHandleCallback(param, &dataBuf, TDMT_SCH_QUERY_RSP, 0);
+ SDataBuf msg = {0};
+ void* rmsg = NULL;
+ schtBuildQueryRspMsg(&msg.len, &rmsg);
+ msg.msgType = TDMT_SCH_QUERY_RSP;
+ msg.pData = rmsg;
+
+ code = schHandleCallback(param, &msg, 0);
assert(code == 0 || code);
pIter = taosHashIterate(execTasks, pIter);
@@ -545,11 +618,13 @@ void *schtRunJobThread(void *aa) {
SSchTask *task = (SSchTask *)pIter;
param->taskId = task->taskId - 1;
- SQueryTableRsp rsp = {0};
- dataBuf.pData = &rsp;
- dataBuf.len = sizeof(rsp);
+ SDataBuf msg = {0};
+ void* rmsg = NULL;
+ schtBuildQueryRspMsg(&msg.len, &rmsg);
+ msg.msgType = TDMT_SCH_QUERY_RSP;
+ msg.pData = rmsg;
- code = schHandleCallback(param, &dataBuf, TDMT_SCH_QUERY_RSP, 0);
+ code = schHandleCallback(param, &msg, 0);
assert(code == 0 || code);
pIter = taosHashIterate(execTasks, pIter);
@@ -575,7 +650,6 @@ void *schtRunJobThread(void *aa) {
if (0 == code) {
SRetrieveTableRsp *pRsp = (SRetrieveTableRsp *)data;
assert(pRsp->completed == 1);
- assert(pRsp->numOfRows == 10);
}
data = NULL;
@@ -587,7 +661,7 @@ void *schtRunJobThread(void *aa) {
taosHashCleanup(execTasks);
taosArrayDestroy(qnodeList);
- schtFreeQueryDag(&dag);
+ schtFreeQueryDag(dag);
if (++jobFinished % schtTestPrintNum == 0) {
printf("jobFinished:%d\n", jobFinished);
@@ -609,6 +683,7 @@ void *schtFreeJobThread(void *aa) {
return NULL;
}
+
} // namespace
TEST(queryTest, normalCase) {
@@ -618,21 +693,20 @@ TEST(queryTest, normalCase) {
char *tablename = "table1";
SVgroupInfo vgInfo = {0};
int64_t job = 0;
- SQueryPlan dag;
+ SQueryPlan* dag = (SQueryPlan*)nodesMakeNode(QUERY_NODE_PHYSICAL_PLAN);
- memset(&dag, 0, sizeof(dag));
+ SArray *qnodeList = taosArrayInit(1, sizeof(SQueryNodeLoad));
- SArray *qnodeList = taosArrayInit(1, sizeof(SEp));
-
- SEp qnodeAddr = {0};
- strcpy(qnodeAddr.fqdn, "qnode0.ep");
- qnodeAddr.port = 6031;
- taosArrayPush(qnodeList, &qnodeAddr);
+ SQueryNodeLoad load = {0};
+ load.addr.epSet.numOfEps = 1;
+ strcpy(load.addr.epSet.eps[0].fqdn, "qnode0.ep");
+ load.addr.epSet.eps[0].port = 6031;
+ taosArrayPush(qnodeList, &load);
int32_t code = schedulerInit();
ASSERT_EQ(code, 0);
- schtBuildQueryDag(&dag);
+ schtBuildQueryDag(dag);
schtSetPlanToString();
schtSetExecNode();
@@ -645,7 +719,7 @@ TEST(queryTest, normalCase) {
SSchedulerReq req = {0};
req.pConn = &conn;
req.pNodeList = qnodeList;
- req.pDag = &dag;
+ req.pDag = dag;
req.sql = "select * from tb";
req.execFp = schtQueryCb;
req.cbParam = &queryDone;
@@ -659,9 +733,14 @@ TEST(queryTest, normalCase) {
while (pIter) {
SSchTask *task = *(SSchTask **)pIter;
- SQueryTableRsp rsp = {0};
- code = schHandleResponseMsg(pJob, task, TDMT_SCH_QUERY_RSP, (char *)&rsp, sizeof(rsp), 0);
-
+ SDataBuf msg = {0};
+ void* rmsg = NULL;
+ schtBuildQueryRspMsg(&msg.len, &rmsg);
+ msg.msgType = TDMT_SCH_QUERY_RSP;
+ msg.pData = rmsg;
+
+ code = schHandleResponseMsg(pJob, task, task->execId, &msg, 0);
+
ASSERT_EQ(code, 0);
pIter = taosHashIterate(pJob->execTasks, pIter);
}
@@ -669,11 +748,18 @@ TEST(queryTest, normalCase) {
pIter = taosHashIterate(pJob->execTasks, NULL);
while (pIter) {
SSchTask *task = *(SSchTask **)pIter;
+ if (JOB_TASK_STATUS_EXEC == task->status) {
+ SDataBuf msg = {0};
+ void* rmsg = NULL;
+ schtBuildQueryRspMsg(&msg.len, &rmsg);
+ msg.msgType = TDMT_SCH_QUERY_RSP;
+ msg.pData = rmsg;
+
+ code = schHandleResponseMsg(pJob, task, task->execId, &msg, 0);
+
+ ASSERT_EQ(code, 0);
+ }
- SQueryTableRsp rsp = {0};
- code = schHandleResponseMsg(pJob, task, TDMT_SCH_QUERY_RSP, (char *)&rsp, sizeof(rsp), 0);
-
- ASSERT_EQ(code, 0);
pIter = taosHashIterate(pJob->execTasks, pIter);
}
@@ -703,18 +789,12 @@ TEST(queryTest, normalCase) {
ASSERT_EQ(pRsp->numOfRows, 10);
taosMemoryFreeClear(data);
- data = NULL;
- code = schedulerFetchRows(job, &req);
- ASSERT_EQ(code, 0);
- ASSERT_TRUE(data == NULL);
-
schReleaseJob(job);
+
+ schedulerDestroy();
schedulerFreeJob(&job, 0);
- schtFreeQueryDag(&dag);
-
- schedulerDestroy();
}
TEST(queryTest, readyFirstCase) {
@@ -724,21 +804,20 @@ TEST(queryTest, readyFirstCase) {
char *tablename = "table1";
SVgroupInfo vgInfo = {0};
int64_t job = 0;
- SQueryPlan dag;
+ SQueryPlan* dag = (SQueryPlan*)nodesMakeNode(QUERY_NODE_PHYSICAL_PLAN);
- memset(&dag, 0, sizeof(dag));
+ SArray *qnodeList = taosArrayInit(1, sizeof(SQueryNodeLoad));
- SArray *qnodeList = taosArrayInit(1, sizeof(SEp));
-
- SEp qnodeAddr = {0};
- strcpy(qnodeAddr.fqdn, "qnode0.ep");
- qnodeAddr.port = 6031;
- taosArrayPush(qnodeList, &qnodeAddr);
+ SQueryNodeLoad load = {0};
+ load.addr.epSet.numOfEps = 1;
+ strcpy(load.addr.epSet.eps[0].fqdn, "qnode0.ep");
+ load.addr.epSet.eps[0].port = 6031;
+ taosArrayPush(qnodeList, &load);
int32_t code = schedulerInit();
ASSERT_EQ(code, 0);
- schtBuildQueryDag(&dag);
+ schtBuildQueryDag(dag);
schtSetPlanToString();
schtSetExecNode();
@@ -751,7 +830,7 @@ TEST(queryTest, readyFirstCase) {
SSchedulerReq req = {0};
req.pConn = &conn;
req.pNodeList = qnodeList;
- req.pDag = &dag;
+ req.pDag = dag;
req.sql = "select * from tb";
req.execFp = schtQueryCb;
req.cbParam = &queryDone;
@@ -764,8 +843,13 @@ TEST(queryTest, readyFirstCase) {
while (pIter) {
SSchTask *task = *(SSchTask **)pIter;
- SQueryTableRsp rsp = {0};
- code = schHandleResponseMsg(pJob, task, TDMT_SCH_QUERY_RSP, (char *)&rsp, sizeof(rsp), 0);
+ SDataBuf msg = {0};
+ void* rmsg = NULL;
+ schtBuildQueryRspMsg(&msg.len, &rmsg);
+ msg.msgType = TDMT_SCH_QUERY_RSP;
+ msg.pData = rmsg;
+
+ code = schHandleResponseMsg(pJob, task, task->execId, &msg, 0);
ASSERT_EQ(code, 0);
pIter = taosHashIterate(pJob->execTasks, pIter);
@@ -775,10 +859,18 @@ TEST(queryTest, readyFirstCase) {
while (pIter) {
SSchTask *task = *(SSchTask **)pIter;
- SQueryTableRsp rsp = {0};
- code = schHandleResponseMsg(pJob, task, TDMT_SCH_QUERY_RSP, (char *)&rsp, sizeof(rsp), 0);
+ if (JOB_TASK_STATUS_EXEC == task->status) {
+ SDataBuf msg = {0};
+ void* rmsg = NULL;
+ schtBuildQueryRspMsg(&msg.len, &rmsg);
+ msg.msgType = TDMT_SCH_QUERY_RSP;
+ msg.pData = rmsg;
+
+ code = schHandleResponseMsg(pJob, task, task->execId, &msg, 0);
+
+ ASSERT_EQ(code, 0);
+ }
- ASSERT_EQ(code, 0);
pIter = taosHashIterate(pJob->execTasks, pIter);
}
@@ -807,18 +899,11 @@ TEST(queryTest, readyFirstCase) {
ASSERT_EQ(pRsp->numOfRows, 10);
taosMemoryFreeClear(data);
- data = NULL;
- code = schedulerFetchRows(job, &req);
- ASSERT_EQ(code, 0);
- ASSERT_TRUE(data == NULL);
-
schReleaseJob(job);
- schedulerFreeJob(&job, 0);
-
- schtFreeQueryDag(&dag);
-
schedulerDestroy();
+
+ schedulerFreeJob(&job, 0);
}
TEST(queryTest, flowCtrlCase) {
@@ -828,35 +913,39 @@ TEST(queryTest, flowCtrlCase) {
char *tablename = "table1";
SVgroupInfo vgInfo = {0};
int64_t job = 0;
- SQueryPlan dag;
+ SQueryPlan* dag = (SQueryPlan*)nodesMakeNode(QUERY_NODE_PHYSICAL_PLAN);
schtInitLogFile();
taosSeedRand(taosGetTimestampSec());
- SArray *qnodeList = taosArrayInit(1, sizeof(SEp));
+ SArray *qnodeList = taosArrayInit(1, sizeof(SQueryNodeLoad));
+
+ SQueryNodeLoad load = {0};
+ load.addr.epSet.numOfEps = 1;
+ strcpy(load.addr.epSet.eps[0].fqdn, "qnode0.ep");
+ load.addr.epSet.eps[0].port = 6031;
+ taosArrayPush(qnodeList, &load);
- SEp qnodeAddr = {0};
- strcpy(qnodeAddr.fqdn, "qnode0.ep");
- qnodeAddr.port = 6031;
- taosArrayPush(qnodeList, &qnodeAddr);
int32_t code = schedulerInit();
ASSERT_EQ(code, 0);
- schtBuildQueryFlowCtrlDag(&dag);
+ schtBuildQueryFlowCtrlDag(dag);
schtSetPlanToString();
schtSetExecNode();
schtSetAsyncSendMsgToServer();
+ initTaskQueue();
+
int32_t queryDone = 0;
SRequestConnInfo conn = {0};
conn.pTrans = mockPointer;
SSchedulerReq req = {0};
req.pConn = &conn;
req.pNodeList = qnodeList;
- req.pDag = &dag;
+ req.pDag = dag;
req.sql = "select * from tb";
req.execFp = schtQueryCb;
req.cbParam = &queryDone;
@@ -866,41 +955,27 @@ TEST(queryTest, flowCtrlCase) {
SSchJob *pJob = schAcquireJob(job);
- bool qDone = false;
-
- while (!qDone) {
+ while (!queryDone) {
void *pIter = taosHashIterate(pJob->execTasks, NULL);
- if (NULL == pIter) {
- break;
- }
-
while (pIter) {
SSchTask *task = *(SSchTask **)pIter;
- taosHashCancelIterate(pJob->execTasks, pIter);
-
- if (task->lastMsgType == TDMT_SCH_QUERY) {
- SQueryTableRsp rsp = {0};
- code = schHandleResponseMsg(pJob, task, TDMT_SCH_QUERY_RSP, (char *)&rsp, sizeof(rsp), 0);
-
+ if (JOB_TASK_STATUS_EXEC == task->status && 0 != task->lastMsgType) {
+ SDataBuf msg = {0};
+ void* rmsg = NULL;
+ schtBuildQueryRspMsg(&msg.len, &rmsg);
+ msg.msgType = TDMT_SCH_QUERY_RSP;
+ msg.pData = rmsg;
+
+ code = schHandleResponseMsg(pJob, task, task->execId, &msg, 0);
+
ASSERT_EQ(code, 0);
- } else {
- qDone = true;
- break;
}
- pIter = NULL;
+ pIter = taosHashIterate(pJob->execTasks, pIter);
}
}
- while (true) {
- if (queryDone) {
- break;
- }
-
- taosUsleep(10000);
- }
-
TdThreadAttr thattr;
taosThreadAttrInit(&thattr);
@@ -918,18 +993,11 @@ TEST(queryTest, flowCtrlCase) {
ASSERT_EQ(pRsp->numOfRows, 10);
taosMemoryFreeClear(data);
- data = NULL;
- code = schedulerFetchRows(job, &req);
- ASSERT_EQ(code, 0);
- ASSERT_TRUE(data == NULL);
-
schReleaseJob(job);
- schedulerFreeJob(&job, 0);
-
- schtFreeQueryDag(&dag);
-
schedulerDestroy();
+
+ schedulerFreeJob(&job, 0);
}
TEST(insertTest, normalCase) {
@@ -938,20 +1006,21 @@ TEST(insertTest, normalCase) {
char *dbname = "1.db1";
char *tablename = "table1";
SVgroupInfo vgInfo = {0};
- SQueryPlan dag;
+ SQueryPlan* dag = (SQueryPlan*)nodesMakeNode(QUERY_NODE_PHYSICAL_PLAN);
uint64_t numOfRows = 0;
- SArray *qnodeList = taosArrayInit(1, sizeof(SEp));
+ SArray *qnodeList = taosArrayInit(1, sizeof(SQueryNodeLoad));
- SEp qnodeAddr = {0};
- strcpy(qnodeAddr.fqdn, "qnode0.ep");
- qnodeAddr.port = 6031;
- taosArrayPush(qnodeList, &qnodeAddr);
+ SQueryNodeLoad load = {0};
+ load.addr.epSet.numOfEps = 1;
+ strcpy(load.addr.epSet.eps[0].fqdn, "qnode0.ep");
+ load.addr.epSet.eps[0].port = 6031;
+ taosArrayPush(qnodeList, &load);
int32_t code = schedulerInit();
ASSERT_EQ(code, 0);
- schtBuildInsertDag(&dag);
+ schtBuildInsertDag(dag);
schtSetPlanToString();
schtSetAsyncSendMsgToServer();
@@ -962,21 +1031,19 @@ TEST(insertTest, normalCase) {
TdThread thread1;
taosThreadCreate(&(thread1), &thattr, schtSendRsp, &insertJobRefId);
- SExecResult res = {0};
-
+ int32_t queryDone = 0;
SRequestConnInfo conn = {0};
conn.pTrans = mockPointer;
SSchedulerReq req = {0};
req.pConn = &conn;
req.pNodeList = qnodeList;
- req.pDag = &dag;
+ req.pDag = dag;
req.sql = "insert into tb values(now,1)";
req.execFp = schtQueryCb;
- req.cbParam = NULL;
+ req.cbParam = &queryDone;
code = schedulerExecJob(&req, &insertJobRefId);
ASSERT_EQ(code, 0);
- ASSERT_EQ(res.numOfRows, 20);
schedulerFreeJob(&insertJobRefId, 0);
@@ -989,7 +1056,7 @@ TEST(multiThread, forceFree) {
TdThread thread1, thread2, thread3;
taosThreadCreate(&(thread1), &thattr, schtRunJobThread, NULL);
- taosThreadCreate(&(thread2), &thattr, schtFreeJobThread, NULL);
+// taosThreadCreate(&(thread2), &thattr, schtFreeJobThread, NULL);
taosThreadCreate(&(thread3), &thattr, schtFetchRspThread, NULL);
while (true) {
@@ -1002,7 +1069,7 @@ TEST(multiThread, forceFree) {
}
schtTestStop = true;
- taosSsleep(3);
+ //taosSsleep(3);
}
int main(int argc, char **argv) {
diff --git a/source/libs/stream/src/streamDispatch.c b/source/libs/stream/src/streamDispatch.c
index 59f110769c..9383383dc0 100644
--- a/source/libs/stream/src/streamDispatch.c
+++ b/source/libs/stream/src/streamDispatch.c
@@ -571,6 +571,7 @@ int32_t streamSearchAndAddBlock(SStreamTask* pTask, SStreamDispatchReq* pReqs, S
char ctbName[TSDB_TABLE_FNAME_LEN] = {0};
if (pDataBlock->info.parTbName[0]) {
if(pTask->ver >= SSTREAM_TASK_SUBTABLE_CHANGED_VER &&
+ pTask->subtableWithoutMd5 != 1 &&
!isAutoTableName(pDataBlock->info.parTbName) &&
!alreadyAddGroupId(pDataBlock->info.parTbName) &&
groupId != 0){
diff --git a/source/libs/stream/src/streamTask.c b/source/libs/stream/src/streamTask.c
index 9f08a55b21..db3d2729af 100644
--- a/source/libs/stream/src/streamTask.c
+++ b/source/libs/stream/src/streamTask.c
@@ -80,7 +80,7 @@ static SStreamChildEpInfo* createStreamTaskEpInfo(const SStreamTask* pTask) {
}
SStreamTask* tNewStreamTask(int64_t streamId, int8_t taskLevel, SEpSet* pEpset, bool fillHistory, int64_t triggerParam,
- SArray* pTaskList, bool hasFillhistory) {
+ SArray* pTaskList, bool hasFillhistory, int8_t subtableWithoutMd5) {
SStreamTask* pTask = (SStreamTask*)taosMemoryCalloc(1, sizeof(SStreamTask));
if (pTask == NULL) {
terrno = TSDB_CODE_OUT_OF_MEMORY;
@@ -96,6 +96,7 @@ SStreamTask* tNewStreamTask(int64_t streamId, int8_t taskLevel, SEpSet* pEpset,
pTask->info.taskLevel = taskLevel;
pTask->info.fillHistory = fillHistory;
pTask->info.triggerParam = triggerParam;
+ pTask->subtableWithoutMd5 = subtableWithoutMd5;
pTask->status.pSM = streamCreateStateMachine(pTask);
if (pTask->status.pSM == NULL) {
@@ -205,6 +206,7 @@ int32_t tEncodeStreamTask(SEncoder* pEncoder, const SStreamTask* pTask) {
if (tEncodeCStr(pEncoder, pTask->outputInfo.shuffleDispatcher.stbFullName) < 0) return -1;
}
if (tEncodeI64(pEncoder, pTask->info.triggerParam) < 0) return -1;
+ if (tEncodeI8(pEncoder, pTask->subtableWithoutMd5) < 0) return -1;
if (tEncodeCStrWithLen(pEncoder, pTask->reserve, sizeof(pTask->reserve) - 1) < 0) return -1;
tEndEncode(pEncoder);
@@ -287,6 +289,7 @@ int32_t tDecodeStreamTask(SDecoder* pDecoder, SStreamTask* pTask) {
if (tDecodeCStrTo(pDecoder, pTask->outputInfo.shuffleDispatcher.stbFullName) < 0) return -1;
}
if (tDecodeI64(pDecoder, &pTask->info.triggerParam) < 0) return -1;
+ if (tDecodeI8(pDecoder, &pTask->subtableWithoutMd5) < 0) return -1;
if (tDecodeCStrTo(pDecoder, pTask->reserve) < 0) return -1;
tEndDecode(pDecoder);
@@ -482,7 +485,7 @@ int32_t streamTaskInit(SStreamTask* pTask, SStreamMeta* pMeta, SMsgCb* pMsgCb, i
pTask->execInfo.created = taosGetTimestampMs();
SCheckpointInfo* pChkInfo = &pTask->chkInfo;
- SDataRange* pRange = &pTask->dataRange;
+ SDataRange* pRange = &pTask->dataRange;
// only set the version info for stream tasks without fill-history task
if (pTask->info.taskLevel == TASK_LEVEL__SOURCE) {
@@ -756,8 +759,8 @@ int8_t streamTaskSetSchedStatusInactive(SStreamTask* pTask) {
}
int32_t streamTaskClearHTaskAttr(SStreamTask* pTask, bool metaLock) {
- SStreamMeta* pMeta = pTask->pMeta;
- STaskId sTaskId = {.streamId = pTask->streamTaskId.streamId, .taskId = pTask->streamTaskId.taskId};
+ SStreamMeta* pMeta = pTask->pMeta;
+ STaskId sTaskId = {.streamId = pTask->streamTaskId.streamId, .taskId = pTask->streamTaskId.taskId};
if (pTask->info.fillHistory == 0) {
return 0;
}
@@ -864,7 +867,7 @@ void streamTaskPause(SStreamMeta* pMeta, SStreamTask* pTask) {
void streamTaskResume(SStreamTask* pTask) {
SStreamTaskState prevState = *streamTaskGetStatus(pTask);
- SStreamMeta* pMeta = pTask->pMeta;
+ SStreamMeta* pMeta = pTask->pMeta;
if (prevState.state == TASK_STATUS__PAUSE || prevState.state == TASK_STATUS__HALT) {
streamTaskRestoreStatus(pTask);
@@ -881,9 +884,7 @@ void streamTaskResume(SStreamTask* pTask) {
}
}
-bool streamTaskIsSinkTask(const SStreamTask* pTask) {
- return pTask->info.taskLevel == TASK_LEVEL__SINK;
-}
+bool streamTaskIsSinkTask(const SStreamTask* pTask) { return pTask->info.taskLevel == TASK_LEVEL__SINK; }
int32_t streamTaskSendCheckpointReq(SStreamTask* pTask) {
int32_t code;
diff --git a/source/libs/stream/src/streamUpdate.c b/source/libs/stream/src/streamUpdate.c
index d607f26de3..454ed4297c 100644
--- a/source/libs/stream/src/streamUpdate.c
+++ b/source/libs/stream/src/streamUpdate.c
@@ -261,6 +261,7 @@ void updateInfoDestroy(SUpdateInfo *pInfo) {
taosArrayDestroy(pInfo->pTsSBFs);
taosHashCleanup(pInfo->pMap);
+ updateInfoDestoryColseWinSBF(pInfo);
taosMemoryFree(pInfo);
}
diff --git a/source/libs/transport/src/trans.c b/source/libs/transport/src/trans.c
index 64302a78fc..f658947144 100644
--- a/source/libs/transport/src/trans.c
+++ b/source/libs/transport/src/trans.c
@@ -140,11 +140,7 @@ void* rpcMallocCont(int64_t contLen) {
return start + sizeof(STransMsgHead);
}
-void rpcFreeCont(void* cont) {
- if (cont == NULL) return;
- taosMemoryFree((char*)cont - TRANS_MSG_OVERHEAD);
- tTrace("rpc free cont:%p", (char*)cont - TRANS_MSG_OVERHEAD);
-}
+void rpcFreeCont(void* cont) { transFreeMsg(cont); }
void* rpcReallocCont(void* ptr, int64_t contLen) {
if (ptr == NULL) return rpcMallocCont(contLen);
diff --git a/source/libs/transport/src/transCli.c b/source/libs/transport/src/transCli.c
index b6942655a9..798a5bf54f 100644
--- a/source/libs/transport/src/transCli.c
+++ b/source/libs/transport/src/transCli.c
@@ -218,7 +218,6 @@ static void (*cliAsyncHandle[])(SCliMsg* pMsg, SCliThrd* pThrd) = {cliHandleReq,
/// static void (*cliAsyncHandle[])(SCliMsg* pMsg, SCliThrd* pThrd) = {cliHandleReq, cliHandleQuit, cliHandleRelease,
/// NULL,cliHandleUpdate};
-static FORCE_INLINE void destroyUserdata(STransMsg* userdata);
static FORCE_INLINE void destroyCmsg(void* cmsg);
static FORCE_INLINE void destroyCmsgAndAhandle(void* cmsg);
static FORCE_INLINE int cliRBChoseIdx(STrans* pTransInst);
@@ -1950,14 +1949,6 @@ _err:
return NULL;
}
-static FORCE_INLINE void destroyUserdata(STransMsg* userdata) {
- if (userdata->pCont == NULL) {
- return;
- }
- transFreeMsg(userdata->pCont);
- userdata->pCont = NULL;
-}
-
static FORCE_INLINE void destroyCmsg(void* arg) {
SCliMsg* pMsg = arg;
if (pMsg == NULL) {
@@ -1965,7 +1956,7 @@ static FORCE_INLINE void destroyCmsg(void* arg) {
}
transDestroyConnCtx(pMsg->ctx);
- destroyUserdata(&pMsg->msg);
+ transFreeMsg(pMsg->msg.pCont);
taosMemoryFree(pMsg);
}
@@ -1984,7 +1975,7 @@ static FORCE_INLINE void destroyCmsgAndAhandle(void* param) {
tDebug("destroy Ahandle C");
transDestroyConnCtx(pMsg->ctx);
- destroyUserdata(&pMsg->msg);
+ transFreeMsg(pMsg->msg.pCont);
taosMemoryFree(pMsg);
}
diff --git a/source/libs/transport/src/transComm.c b/source/libs/transport/src/transComm.c
index b1fb9a2450..4619722743 100644
--- a/source/libs/transport/src/transComm.c
+++ b/source/libs/transport/src/transComm.c
@@ -87,6 +87,7 @@ void transFreeMsg(void* msg) {
if (msg == NULL) {
return;
}
+ tTrace("rpc free cont:%p", (char*)msg - TRANS_MSG_OVERHEAD);
taosMemoryFree((char*)msg - sizeof(STransMsgHead));
}
int transSockInfo2Str(struct sockaddr* sockname, char* dst) {
diff --git a/tests/parallel_test/cases.task b/tests/parallel_test/cases.task
index d43a9a7ee6..19d08580a3 100644
--- a/tests/parallel_test/cases.task
+++ b/tests/parallel_test/cases.task
@@ -575,6 +575,7 @@
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ts_3405_3398_3423.py -N 3 -n 3
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ts-4348-td-27939.py
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/backslash_g.py
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/test_ts4467.py
,,n,system-test,python3 ./test.py -f 2-query/queryQnode.py
,,y,system-test,./pytest.sh python3 ./test.py -f 6-cluster/5dnode1mnode.py
diff --git a/tests/script/tsim/parser/like.sim b/tests/script/tsim/parser/like.sim
index 5cac026b57..298dbce0e5 100644
--- a/tests/script/tsim/parser/like.sim
+++ b/tests/script/tsim/parser/like.sim
@@ -51,6 +51,22 @@ if $rows != 1 then
return -1
endi
+$view1 = view1_name
+$view2 = view2_name
+
+sql CREATE VIEW $view1 as select * from $table1
+sql CREATE VIEW $view2 AS select * from $table2
+
+sql show views like 'view%'
+if $rows != 2 then
+ return -1
+endi
+
+sql show views like 'view1%'
+if $rows != 1 then
+ return -1
+endi
+
system sh/exec.sh -n dnode1 -s stop -x SIGINT
diff --git a/tests/system-test/2-query/test_ts4467.py b/tests/system-test/2-query/test_ts4467.py
new file mode 100644
index 0000000000..4e09a9fbbe
--- /dev/null
+++ b/tests/system-test/2-query/test_ts4467.py
@@ -0,0 +1,63 @@
+import random
+import itertools
+from util.log import *
+from util.cases import *
+from util.sql import *
+from util.sqlset import *
+from util import constant
+from util.common import *
+
+
+class TDTestCase:
+ """Verify the jira TS-4467
+ """
+ def init(self, conn, logSql, replicaVar=1):
+ self.replicaVar = int(replicaVar)
+ tdLog.debug("start to execute %s" % __file__)
+ tdSql.init(conn.cursor())
+
+ def prepareData(self):
+ # db
+ tdSql.execute("create database if not exists db")
+ tdSql.execute("use db")
+
+ # table
+ tdSql.execute("create table t (ts timestamp, c1 varchar(16));")
+
+ # insert data
+ sql = "insert into t values"
+ for i in range(6):
+ sql += f"(now+{str(i+1)}s, '{'name' + str(i+1)}')"
+ sql += ";"
+ tdSql.execute(sql)
+ tdLog.debug("insert data successfully")
+
+ def run(self):
+ self.prepareData()
+
+ # join query with order by
+ sql = "select * from t t1, (select * from t order by ts limit 5) t2 where t1.ts = t2.ts;"
+ tdSql.query(sql)
+ tdSql.checkRows(5)
+
+ sql = "select * from t t1, (select * from t order by ts desc limit 5) t2 where t1.ts = t2.ts;"
+ tdSql.query(sql)
+ tdSql.checkRows(5)
+
+ sql = "select * from t t1, (select * from t order by ts limit 5) t2 where t1.ts = t2.ts order by t1.ts;"
+ tdSql.query(sql)
+ res1 = tdSql.queryResult
+ tdLog.debug("res1: %s" % str(res1))
+
+ sql = "select * from t t1, (select * from t order by ts limit 5) t2 where t1.ts = t2.ts order by t1.ts desc;"
+ tdSql.query(sql)
+ res2 = tdSql.queryResult
+ tdLog.debug("res2: %s" % str(res2))
+ assert(len(res1) == len(res2) and res1[0][0] == res2[4][0])
+
+ def stop(self):
+ tdSql.close()
+ tdLog.success("%s successfully executed" % __file__)
+
+tdCases.addWindows(__file__, TDTestCase())
+tdCases.addLinux(__file__, TDTestCase())
diff --git a/tools/shell/src/shellMain.c b/tools/shell/src/shellMain.c
index 18f4ca21d1..d3ca60ab87 100644
--- a/tools/shell/src/shellMain.c
+++ b/tools/shell/src/shellMain.c
@@ -28,7 +28,7 @@ void shellCrashHandler(int signum, void *sigInfo, void *context) {
#if !defined(WINDOWS)
taosIgnSignal(SIGBUS);
-#endif
+#endif
taosIgnSignal(SIGABRT);
taosIgnSignal(SIGFPE);
taosIgnSignal(SIGSEGV);
@@ -82,7 +82,9 @@ int main(int argc, char *argv[]) {
#ifdef WEBSOCKET
shellCheckConnectMode();
#endif
- taos_init();
+ if (taos_init() != 0) {
+ return -1;
+ }
// kill heart-beat thread when quit
taos_set_hb_quit(1);
@@ -105,7 +107,7 @@ int main(int argc, char *argv[]) {
return 0;
}
- // support port feature
+ // support port feature
shellAutoInit();
int32_t ret = shellExecute();
shellAutoExit();