diff --git a/README-CN.md b/README-CN.md
index 4931c0177e..06ac087859 100644
--- a/README-CN.md
+++ b/README-CN.md
@@ -12,7 +12,7 @@
[](https://travis-ci.org/taosdata/TDengine)
[](https://ci.appveyor.com/project/sangshuduo/tdengine-2n8ge/branch/master)
-[](https://coveralls.io/github/taosdata/TDengine?branch=develop)
+[](https://coveralls.io/github/taosdata/TDengine?branch=3.0)
[](https://bestpractices.coreinfrastructure.org/projects/4201)
简体中文 | [English](README.md) | [TDengine 云服务](https://cloud.taosdata.com/?utm_medium=cn&utm_source=github) | 很多职位正在热招中,请看[这里](https://www.taosdata.com/cn/careers/)
diff --git a/README.md b/README.md
index 31d3a8bf67..e390b5e764 100644
--- a/README.md
+++ b/README.md
@@ -12,7 +12,7 @@
[](https://cloud.drone.io/taosdata/TDengine)
[](https://ci.appveyor.com/project/sangshuduo/tdengine-2n8ge/branch/master)
-[](https://coveralls.io/github/taosdata/TDengine?branch=develop)
+[](https://coveralls.io/github/taosdata/TDengine?branch=3.0)
[](https://bestpractices.coreinfrastructure.org/projects/4201)
[](https://twitter.com/tdenginedb)
diff --git a/docs/en/12-taos-sql/10-function.md b/docs/en/12-taos-sql/10-function.md
index fbdae3445b..b4f1cf65da 100644
--- a/docs/en/12-taos-sql/10-function.md
+++ b/docs/en/12-taos-sql/10-function.md
@@ -491,6 +491,8 @@ TO_CHAR(ts, format_str_literal)
**Description**: Convert a ts column to string as the format specified
+**Version**: Since ver-3.2.2.0
+
**Return value type**: VARCHAR
**Applicable column types**: TIMESTAMP
@@ -550,6 +552,8 @@ TO_TIMESTAMP(ts_str_literal, format_str_literal)
**Description**: Convert a formated timestamp string to a timestamp
+**Version**: Since ver-3.2.2.0
+
**Return value type**: TIMESTAMP
**Applicable column types**: VARCHAR
diff --git a/docs/en/12-taos-sql/18-escape.md b/docs/en/12-taos-sql/18-escape.md
index a44b21db43..2d067b2ad9 100644
--- a/docs/en/12-taos-sql/18-escape.md
+++ b/docs/en/12-taos-sql/18-escape.md
@@ -7,14 +7,14 @@ description: This document describes the usage of escape characters in TDengine.
| Escape Character | **Actual Meaning** |
| :--------------: | ------------------------ |
-| `\'` | Single quote ' |
-| `\"` | Double quote " |
-| \n | Line Break |
-| \r | Carriage Return |
-| \t | tab |
-| `\\` | Back Slash \ |
-| `\%` | % see below for details |
-| `\_` | \_ see below for details |
+| `\'` | Single quote `'` |
+| `\"` | Double quote `"` |
+| `\n` | Line Break |
+| `\r` | Carriage Return |
+| `\t` | tab |
+| `\\` | Back Slash `\ ` |
+| `\%` | `%` see below for details |
+| `\_` | `_` see below for details |
## Restrictions
@@ -22,5 +22,5 @@ description: This document describes the usage of escape characters in TDengine.
- Identifier without ``: Error will be returned because identifier must be constituted of digits, ASCII characters or underscore and can't be started with digits
- Identifier quoted with ``: Original content is kept, no escaping
2. If there are escape characters in values
- - The escape characters will be escaped as the above table. If the escape character doesn't match any supported one, the escape character "\" will be ignored.
- - "%" and "\_" are used as wildcards in `like`. `\%` and `\_` should be used to represent literal "%" and "\_" in `like`,. If `\%` and `\_` are used out of `like` context, the evaluation result is "`\%`"and "`\_`", instead of "%" and "\_".
+ - The escape characters will be escaped as the above table. If the escape character doesn't match any supported one, the escape character `\ ` will be ignored(`\x` remaining).
+ - `%` and `_` are used as wildcards in `like`. `\%` and `\_` should be used to represent literal `%` and `_` in `like`. If `\%` and `\_` are used out of `like` context, the evaluation result is `\%` and `\_`, instead of `%` and `_`.
diff --git a/docs/zh/12-taos-sql/10-function.md b/docs/zh/12-taos-sql/10-function.md
index 66322d55f1..0482022d95 100644
--- a/docs/zh/12-taos-sql/10-function.md
+++ b/docs/zh/12-taos-sql/10-function.md
@@ -491,6 +491,8 @@ TO_CHAR(ts, format_str_literal)
**功能说明**: 将timestamp类型按照指定格式转换为字符串
+**版本**: ver-3.2.2.0
+
**返回结果数据类型**: VARCHAR
**应用字段**: TIMESTAMP
@@ -550,6 +552,8 @@ TO_TIMESTAMP(ts_str_literal, format_str_literal)
**功能说明**: 将字符串按照指定格式转化为时间戳.
+**版本**: ver-3.2.2.0
+
**返回结果数据类型**: TIMESTAMP
**应用字段**: VARCHAR
diff --git a/docs/zh/12-taos-sql/18-escape.md b/docs/zh/12-taos-sql/18-escape.md
index 5e0d292d39..81e4179042 100644
--- a/docs/zh/12-taos-sql/18-escape.md
+++ b/docs/zh/12-taos-sql/18-escape.md
@@ -8,16 +8,15 @@ description: TDengine 中使用转义字符的详细规则
| 字符序列 | **代表的字符** |
| :------: | -------------- |
-| `\'` | 单引号' |
-| `\"` | 双引号" |
-| \n | 换行符 |
-| \r | 回车符 |
-| \t | tab 符 |
-| `\\` | 斜杠\ |
-| `\%` | % 规则见下 |
-| `\_` | \_ 规则见下 |
+| `\'` | 单引号`'` |
+| `\"` | 双引号`"` |
+| `\n` | 换行符 |
+| `\r` | 回车符 |
+| `\t` | tab 符 |
+| `\\` | 斜杠 `\ ` |
+| `\%` | `%` 规则见下 |
+| `\_` | `_` 规则见下 |
-:::
## 转义字符使用规则
@@ -25,5 +24,5 @@ description: TDengine 中使用转义字符的详细规则
1. 普通标识符: 直接提示错误的标识符,因为标识符规定必须是数字、字母和下划线,并且不能以数字开头。
2. 反引号``标识符: 保持原样,不转义
2. 数据里有转义字符
- 1. 遇到上面定义的转义字符会转义(%和\_见下面说明),如果没有匹配的转义字符会忽略掉转义符\。
- 2. 对于%和\_,因为在 like 里这两个字符是通配符,所以在模式匹配 like 里用`\%`%和`\_`表示字符里本身的%和\_,如果在 like 模式匹配上下文之外使用`\%`或`\_`,则它们的计算结果为字符串`\%`和`\_`,而不是%和\_。
+ 1. 遇到上面定义的转义字符会转义(`%`和`_`见下面说明),如果没有匹配的转义字符会忽略掉转义符`\ `(`\x`保持原样)。
+ 2. 对于`%`和`_`,因为在`like`里这两个字符是通配符,所以在模式匹配`like`里用`\%`和`\_`表示字符里本身的`%`和`_`,如果在`like`模式匹配上下文之外使用`\%`或`\_`,则它们的计算结果为字符串`\%`和`\_`,而不是`%`和`_`。
diff --git a/include/common/systable.h b/include/common/systable.h
index 92e7915424..37593144d8 100644
--- a/include/common/systable.h
+++ b/include/common/systable.h
@@ -52,6 +52,9 @@ extern "C" {
#define TSDB_INS_TABLE_VIEWS "ins_views"
#define TSDB_INS_TABLE_COMPACTS "ins_compacts"
#define TSDB_INS_TABLE_COMPACT_DETAILS "ins_compact_details"
+#define TSDB_INS_TABLE_GRANTS_FULL "ins_grants_full"
+#define TSDB_INS_TABLE_GRANTS_LOGS "ins_grants_logs"
+#define TSDB_INS_TABLE_MACHINES "ins_machines"
#define TSDB_PERFORMANCE_SCHEMA_DB "performance_schema"
#define TSDB_PERFS_TABLE_SMAS "perf_smas"
diff --git a/include/common/tcommon.h b/include/common/tcommon.h
index 24e5d186b9..d4537ddc89 100644
--- a/include/common/tcommon.h
+++ b/include/common/tcommon.h
@@ -206,6 +206,7 @@ typedef struct SDataBlockInfo {
int16_t hasVarCol;
int16_t dataLoad; // denote if the data is loaded or not
uint8_t scanFlag;
+ bool blankFill;
// TODO: optimize and remove following
int64_t version; // used for stream, and need serialization
diff --git a/include/common/tgrant.h b/include/common/tgrant.h
index f06fca8014..dbca2ac90c 100644
--- a/include/common/tgrant.h
+++ b/include/common/tgrant.h
@@ -22,15 +22,14 @@ extern "C" {
#include "os.h"
#include "taoserror.h"
-#ifdef GRANTS_CFG
-#include "tgrantCfg.h"
-#endif
+#include "tdef.h"
#ifndef GRANTS_COL_MAX_LEN
#define GRANTS_COL_MAX_LEN 196
#endif
#define GRANT_HEART_BEAT_MIN 2
+#define GRANT_ACTIVE_CODE "activeCode"
typedef enum {
TSDB_GRANT_ALL,
@@ -48,13 +47,34 @@ typedef enum {
TSDB_GRANT_CPU_CORES,
TSDB_GRANT_STABLE,
TSDB_GRANT_TABLE,
+ TSDB_GRANT_SUBSCRIPTION,
+ TSDB_GRANT_AUDIT,
+ TSDB_GRANT_CSV,
+ TSDB_GRANT_MULTI_TIER,
+ TSDB_GRANT_BACKUP_RESTORE,
} EGrantType;
int32_t grantCheck(EGrantType grant);
+char* tGetMachineId();
+#ifndef TD_UNIQ_GRANT
int32_t grantAlterActiveCode(int32_t did, const char* old, const char* newer, char* out, int8_t type);
+#endif
-#ifndef GRANTS_CFG
+// #ifndef GRANTS_CFG
#ifdef TD_ENTERPRISE
+#ifdef TD_UNIQ_GRANT
+#define GRANTS_SCHEMA \
+ static const SSysDbTableSchema grantsSchema[] = { \
+ {.name = "version", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \
+ {.name = "expire_time", .bytes = 19 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \
+ {.name = "service_time", .bytes = 19 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \
+ {.name = "expired", .bytes = 5 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \
+ {.name = "state", .bytes = 21 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \
+ {.name = "timeseries", .bytes = 21 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \
+ {.name = "dnodes", .bytes = 10 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \
+ {.name = "cpu_cores", .bytes = 10 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \
+ }
+#else
#define GRANTS_SCHEMA \
static const SSysDbTableSchema grantsSchema[] = { \
{.name = "version", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \
@@ -78,33 +98,28 @@ int32_t grantAlterActiveCode(int32_t did, const char* old, const char* newer, ch
{.name = "influxdb", .bytes = GRANTS_COL_MAX_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \
{.name = "mqtt", .bytes = GRANTS_COL_MAX_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \
}
+#endif
#else
-#define GRANTS_SCHEMA \
- static const SSysDbTableSchema grantsSchema[] = { \
- {.name = "version", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \
- {.name = "expire_time", .bytes = 19 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \
- {.name = "expired", .bytes = 5 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \
- {.name = "storage", .bytes = 21 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \
- {.name = "timeseries", .bytes = 21 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \
- {.name = "databases", .bytes = 10 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \
- {.name = "users", .bytes = 10 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \
- {.name = "accounts", .bytes = 10 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \
- {.name = "dnodes", .bytes = 10 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \
- {.name = "connections", .bytes = 11 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \
- {.name = "streams", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \
- {.name = "cpu_cores", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \
- {.name = "speed", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \
- {.name = "querytime", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \
+#define GRANTS_SCHEMA \
+ static const SSysDbTableSchema grantsSchema[] = { \
+ {.name = "version", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \
+ {.name = "expire_time", .bytes = 19 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \
+ {.name = "service_time", .bytes = 19 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \
+ {.name = "expired", .bytes = 5 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \
+ {.name = "state", .bytes = 21 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \
+ {.name = "timeseries", .bytes = 21 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \
+ {.name = "dnodes", .bytes = 10 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \
+ {.name = "cpu_cores", .bytes = 10 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, \
}
#endif
-#define GRANT_CFG_ADD
-#define GRANT_CFG_SET
-#define GRANT_CFG_GET
-#define GRANT_CFG_CHECK
-#define GRANT_CFG_SKIP
-#define GRANT_CFG_DECLARE
-#define GRANT_CFG_EXTERN
-#endif
+// #define GRANT_CFG_ADD
+// #define GRANT_CFG_SET
+// #define GRANT_CFG_GET
+// #define GRANT_CFG_CHECK
+// #define GRANT_CFG_SKIP
+// #define GRANT_CFG_DECLARE
+// #define GRANT_CFG_EXTERN
+// #endif
#ifdef __cplusplus
}
diff --git a/include/common/tmsg.h b/include/common/tmsg.h
index 34272abd43..3843805c16 100644
--- a/include/common/tmsg.h
+++ b/include/common/tmsg.h
@@ -147,6 +147,9 @@ typedef enum _mgmt_table {
TSDB_MGMT_TABLE_VIEWS,
TSDB_MGMT_TABLE_COMPACT,
TSDB_MGMT_TABLE_COMPACT_DETAIL,
+ TSDB_MGMT_TABLE_GRANTS_FULL,
+ TSDB_MGMT_TABLE_GRANTS_LOGS,
+ TSDB_MGMT_TABLE_MACHINES,
TSDB_MGMT_TABLE_MAX,
} EShowType;
@@ -298,7 +301,8 @@ typedef enum ENodeType {
QUERY_NODE_SYNCDB_STMT,
QUERY_NODE_GRANT_STMT,
QUERY_NODE_REVOKE_STMT,
- // placeholder for [152, 180]
+ QUERY_NODE_ALTER_CLUSTER_STMT,
+ // placeholder for [153, 180]
QUERY_NODE_SHOW_CREATE_VIEW_STMT = 181,
QUERY_NODE_SHOW_CREATE_DATABASE_STMT,
QUERY_NODE_SHOW_CREATE_TABLE_STMT,
@@ -359,6 +363,9 @@ typedef enum ENodeType {
QUERY_NODE_SHOW_VIEWS_STMT,
QUERY_NODE_SHOW_COMPACTS_STMT,
QUERY_NODE_SHOW_COMPACT_DETAILS_STMT,
+ QUERY_NODE_SHOW_GRANTS_FULL_STMT,
+ QUERY_NODE_SHOW_GRANTS_LOGS_STMT,
+ QUERY_NODE_SHOW_CLUSTER_MACHINES_STMT,
// logic plan node
QUERY_NODE_LOGIC_PLAN_SCAN = 1000,
@@ -1557,9 +1564,11 @@ typedef struct {
int64_t updateTime;
float numOfCores;
int32_t numOfSupportVnodes;
+ int32_t numOfDiskCfg;
int64_t memTotal;
int64_t memAvail;
char dnodeEp[TSDB_EP_LEN];
+ char machineId[TSDB_MACHINE_ID_LEN + 1];
SMnodeLoad mload;
SQnodeLoad qload;
SClusterCfg clusterCfg;
@@ -1600,6 +1609,7 @@ typedef struct {
SEp ep;
char active[TSDB_ACTIVE_KEY_LEN];
char connActive[TSDB_CONN_ACTIVE_KEY_LEN];
+ char machineId[TSDB_MACHINE_ID_LEN + 1];
} SDnodeInfo;
typedef struct {
@@ -2031,6 +2041,17 @@ int32_t tSerializeSExplainRsp(void* buf, int32_t bufLen, SExplainRsp* pRsp);
int32_t tDeserializeSExplainRsp(void* buf, int32_t bufLen, SExplainRsp* pRsp);
void tFreeSExplainRsp(SExplainRsp* pRsp);
+typedef struct {
+ char config[TSDB_DNODE_CONFIG_LEN];
+ char value[TSDB_CLUSTER_VALUE_LEN];
+ int32_t sqlLen;
+ char* sql;
+} SMCfgClusterReq;
+
+int32_t tSerializeSMCfgClusterReq(void* buf, int32_t bufLen, SMCfgClusterReq* pReq);
+int32_t tDeserializeSMCfgClusterReq(void* buf, int32_t bufLen, SMCfgClusterReq* pReq);
+void tFreeSMCfgClusterReq(SMCfgClusterReq* pReq);
+
typedef struct {
char fqdn[TSDB_FQDN_LEN]; // end point, hostname:port
int32_t port;
@@ -2408,6 +2429,11 @@ typedef struct SColLocation {
int8_t type;
} SColLocation;
+typedef struct SVgroupVer {
+ int32_t vgId;
+ int64_t ver;
+} SVgroupVer;
+
typedef struct {
char name[TSDB_STREAM_FNAME_LEN];
char sourceDB[TSDB_DB_FNAME_LEN];
@@ -2431,6 +2457,7 @@ typedef struct {
int64_t deleteMark;
int8_t igUpdate;
int64_t lastTs;
+ SArray* pVgroupVerList;
} SCMCreateStreamReq;
typedef struct {
@@ -3754,7 +3781,12 @@ typedef struct {
} SMqHbReq;
typedef struct {
- int8_t reserved;
+ char topic[TSDB_TOPIC_FNAME_LEN];
+ int8_t noPrivilege;
+} STopicPrivilege;
+
+typedef struct {
+ SArray* topicPrivileges; // SArray
} SMqHbRsp;
typedef struct {
@@ -3773,18 +3805,6 @@ typedef struct {
SVCreateTbReq cTbReq;
} SVSubmitBlk;
-typedef struct {
- int32_t flags;
- int32_t nBlocks;
- union {
- SArray* pArray;
- SVSubmitBlk* pBlocks;
- };
-} SVSubmitReq;
-
-int32_t tEncodeSVSubmitReq(SEncoder* pCoder, const SVSubmitReq* pReq);
-int32_t tDecodeSVSubmitReq(SDecoder* pCoder, SVSubmitReq* pReq);
-
typedef struct {
SMsgHead header;
uint64_t sId;
@@ -3893,6 +3913,10 @@ int32_t tSerializeSMqHbReq(void* buf, int32_t bufLen, SMqHbReq* pReq);
int32_t tDeserializeSMqHbReq(void* buf, int32_t bufLen, SMqHbReq* pReq);
int32_t tDeatroySMqHbReq(SMqHbReq* pReq);
+int32_t tSerializeSMqHbRsp(void* buf, int32_t bufLen, SMqHbRsp* pRsp);
+int32_t tDeserializeSMqHbRsp(void* buf, int32_t bufLen, SMqHbRsp* pRsp);
+int32_t tDeatroySMqHbRsp(SMqHbRsp* pRsp);
+
int32_t tSerializeSMqSeekReq(void* buf, int32_t bufLen, SMqSeekReq* pReq);
int32_t tDeserializeSMqSeekReq(void* buf, int32_t bufLen, SMqSeekReq* pReq);
diff --git a/include/common/tmsgdef.h b/include/common/tmsgdef.h
index 3bf22ec339..dc5cb24564 100644
--- a/include/common/tmsgdef.h
+++ b/include/common/tmsgdef.h
@@ -218,6 +218,7 @@
TD_DEF_MSG_TYPE(TDMT_MND_KILL_COMPACT, "kill-compact", SKillCompactReq, NULL)
TD_DEF_MSG_TYPE(TDMT_MND_COMPACT_TIMER, "compact-tmr", NULL, NULL)
TD_DEF_MSG_TYPE(TDMT_MND_STREAM_REQ_CHKPT, "stream-req-checkpoint", NULL, NULL)
+ TD_DEF_MSG_TYPE(TDMT_MND_CONFIG_CLUSTER, "config-cluster", NULL, NULL)
TD_DEF_MSG_TYPE(TDMT_MND_MAX_MSG, "mnd-max", NULL, NULL)
TD_CLOSE_MSG_SEG(TDMT_END_MND_MSG)
@@ -337,8 +338,9 @@
TD_DEF_MSG_TYPE(TDMT_SYNC_LOCAL_CMD, "sync-local-cmd", NULL, NULL)
TD_DEF_MSG_TYPE(TDMT_SYNC_PREP_SNAPSHOT, "sync-prep-snapshot", NULL, NULL)
TD_DEF_MSG_TYPE(TDMT_SYNC_PREP_SNAPSHOT_REPLY, "sync-prep-snapshot-reply", NULL, NULL)
- TD_DEF_MSG_TYPE(TDMT_SYNC_MAX_MSG, "sync-max", NULL, NULL)
+ TD_DEF_MSG_TYPE(TDMT_SYNC_UNUSED_CODE, "sync-unused", NULL, NULL)
TD_DEF_MSG_TYPE(TDMT_SYNC_FORCE_FOLLOWER, "sync-force-become-follower", NULL, NULL)
+ TD_DEF_MSG_TYPE(TDMT_SYNC_MAX_MSG, "sync-max", NULL, NULL)
TD_CLOSE_MSG_SEG(TDMT_END_SYNC_MSG)
TD_NEW_MSG_SEG(TDMT_VND_STREAM_MSG) //7 << 8
diff --git a/include/common/ttokendef.h b/include/common/ttokendef.h
index 445fe0737b..5f0538ce17 100644
--- a/include/common/ttokendef.h
+++ b/include/common/ttokendef.h
@@ -74,295 +74,298 @@
#define TK_NK_IPTOKEN 55
#define TK_FORCE 56
#define TK_UNSAFE 57
-#define TK_LOCAL 58
-#define TK_QNODE 59
-#define TK_BNODE 60
-#define TK_SNODE 61
-#define TK_MNODE 62
-#define TK_VNODE 63
-#define TK_DATABASE 64
-#define TK_USE 65
-#define TK_FLUSH 66
-#define TK_TRIM 67
-#define TK_COMPACT 68
-#define TK_IF 69
-#define TK_NOT 70
-#define TK_EXISTS 71
-#define TK_BUFFER 72
-#define TK_CACHEMODEL 73
-#define TK_CACHESIZE 74
-#define TK_COMP 75
-#define TK_DURATION 76
-#define TK_NK_VARIABLE 77
-#define TK_MAXROWS 78
-#define TK_MINROWS 79
-#define TK_KEEP 80
-#define TK_PAGES 81
-#define TK_PAGESIZE 82
-#define TK_TSDB_PAGESIZE 83
-#define TK_PRECISION 84
-#define TK_REPLICA 85
-#define TK_VGROUPS 86
-#define TK_SINGLE_STABLE 87
-#define TK_RETENTIONS 88
-#define TK_SCHEMALESS 89
-#define TK_WAL_LEVEL 90
-#define TK_WAL_FSYNC_PERIOD 91
-#define TK_WAL_RETENTION_PERIOD 92
-#define TK_WAL_RETENTION_SIZE 93
-#define TK_WAL_ROLL_PERIOD 94
-#define TK_WAL_SEGMENT_SIZE 95
-#define TK_STT_TRIGGER 96
-#define TK_TABLE_PREFIX 97
-#define TK_TABLE_SUFFIX 98
-#define TK_KEEP_TIME_OFFSET 99
-#define TK_NK_COLON 100
-#define TK_BWLIMIT 101
-#define TK_START 102
-#define TK_TIMESTAMP 103
-#define TK_END 104
-#define TK_TABLE 105
-#define TK_NK_LP 106
-#define TK_NK_RP 107
-#define TK_STABLE 108
-#define TK_COLUMN 109
-#define TK_MODIFY 110
-#define TK_RENAME 111
-#define TK_TAG 112
-#define TK_SET 113
-#define TK_NK_EQ 114
-#define TK_USING 115
-#define TK_TAGS 116
-#define TK_BOOL 117
-#define TK_TINYINT 118
-#define TK_SMALLINT 119
-#define TK_INT 120
-#define TK_INTEGER 121
-#define TK_BIGINT 122
-#define TK_FLOAT 123
-#define TK_DOUBLE 124
-#define TK_BINARY 125
-#define TK_NCHAR 126
-#define TK_UNSIGNED 127
-#define TK_JSON 128
-#define TK_VARCHAR 129
-#define TK_MEDIUMBLOB 130
-#define TK_BLOB 131
-#define TK_VARBINARY 132
-#define TK_GEOMETRY 133
-#define TK_DECIMAL 134
-#define TK_COMMENT 135
-#define TK_MAX_DELAY 136
-#define TK_WATERMARK 137
-#define TK_ROLLUP 138
-#define TK_TTL 139
-#define TK_SMA 140
-#define TK_DELETE_MARK 141
-#define TK_FIRST 142
-#define TK_LAST 143
-#define TK_SHOW 144
-#define TK_PRIVILEGES 145
-#define TK_DATABASES 146
-#define TK_TABLES 147
-#define TK_STABLES 148
-#define TK_MNODES 149
-#define TK_QNODES 150
-#define TK_FUNCTIONS 151
-#define TK_INDEXES 152
-#define TK_ACCOUNTS 153
-#define TK_APPS 154
-#define TK_CONNECTIONS 155
-#define TK_LICENCES 156
-#define TK_GRANTS 157
-#define TK_QUERIES 158
-#define TK_SCORES 159
-#define TK_TOPICS 160
-#define TK_VARIABLES 161
-#define TK_CLUSTER 162
-#define TK_BNODES 163
-#define TK_SNODES 164
-#define TK_TRANSACTIONS 165
-#define TK_DISTRIBUTED 166
-#define TK_CONSUMERS 167
-#define TK_SUBSCRIPTIONS 168
-#define TK_VNODES 169
-#define TK_ALIVE 170
-#define TK_VIEWS 171
-#define TK_VIEW 172
-#define TK_COMPACTS 173
-#define TK_NORMAL 174
-#define TK_CHILD 175
-#define TK_LIKE 176
-#define TK_TBNAME 177
-#define TK_QTAGS 178
-#define TK_AS 179
-#define TK_SYSTEM 180
-#define TK_INDEX 181
-#define TK_FUNCTION 182
-#define TK_INTERVAL 183
-#define TK_COUNT 184
-#define TK_LAST_ROW 185
-#define TK_META 186
-#define TK_ONLY 187
-#define TK_TOPIC 188
-#define TK_CONSUMER 189
-#define TK_GROUP 190
-#define TK_DESC 191
-#define TK_DESCRIBE 192
-#define TK_RESET 193
-#define TK_QUERY 194
-#define TK_CACHE 195
-#define TK_EXPLAIN 196
-#define TK_ANALYZE 197
-#define TK_VERBOSE 198
-#define TK_NK_BOOL 199
-#define TK_RATIO 200
-#define TK_NK_FLOAT 201
-#define TK_OUTPUTTYPE 202
-#define TK_AGGREGATE 203
-#define TK_BUFSIZE 204
-#define TK_LANGUAGE 205
-#define TK_REPLACE 206
-#define TK_STREAM 207
-#define TK_INTO 208
-#define TK_PAUSE 209
-#define TK_RESUME 210
-#define TK_TRIGGER 211
-#define TK_AT_ONCE 212
-#define TK_WINDOW_CLOSE 213
-#define TK_IGNORE 214
-#define TK_EXPIRED 215
-#define TK_FILL_HISTORY 216
-#define TK_UPDATE 217
-#define TK_SUBTABLE 218
-#define TK_UNTREATED 219
-#define TK_KILL 220
-#define TK_CONNECTION 221
-#define TK_TRANSACTION 222
-#define TK_BALANCE 223
-#define TK_VGROUP 224
-#define TK_LEADER 225
-#define TK_MERGE 226
-#define TK_REDISTRIBUTE 227
-#define TK_SPLIT 228
-#define TK_DELETE 229
-#define TK_INSERT 230
-#define TK_NULL 231
-#define TK_NK_QUESTION 232
-#define TK_NK_ALIAS 233
-#define TK_NK_ARROW 234
-#define TK_ROWTS 235
-#define TK_QSTART 236
-#define TK_QEND 237
-#define TK_QDURATION 238
-#define TK_WSTART 239
-#define TK_WEND 240
-#define TK_WDURATION 241
-#define TK_IROWTS 242
-#define TK_ISFILLED 243
-#define TK_CAST 244
-#define TK_NOW 245
-#define TK_TODAY 246
-#define TK_TIMEZONE 247
-#define TK_CLIENT_VERSION 248
-#define TK_SERVER_VERSION 249
-#define TK_SERVER_STATUS 250
-#define TK_CURRENT_USER 251
-#define TK_CASE 252
-#define TK_WHEN 253
-#define TK_THEN 254
-#define TK_ELSE 255
-#define TK_BETWEEN 256
-#define TK_IS 257
-#define TK_NK_LT 258
-#define TK_NK_GT 259
-#define TK_NK_LE 260
-#define TK_NK_GE 261
-#define TK_NK_NE 262
-#define TK_MATCH 263
-#define TK_NMATCH 264
-#define TK_CONTAINS 265
-#define TK_IN 266
-#define TK_JOIN 267
-#define TK_INNER 268
-#define TK_SELECT 269
-#define TK_NK_HINT 270
-#define TK_DISTINCT 271
-#define TK_WHERE 272
-#define TK_PARTITION 273
-#define TK_BY 274
-#define TK_SESSION 275
-#define TK_STATE_WINDOW 276
-#define TK_EVENT_WINDOW 277
-#define TK_SLIDING 278
-#define TK_FILL 279
-#define TK_VALUE 280
-#define TK_VALUE_F 281
-#define TK_NONE 282
-#define TK_PREV 283
-#define TK_NULL_F 284
-#define TK_LINEAR 285
-#define TK_NEXT 286
-#define TK_HAVING 287
-#define TK_RANGE 288
-#define TK_EVERY 289
-#define TK_ORDER 290
-#define TK_SLIMIT 291
-#define TK_SOFFSET 292
-#define TK_LIMIT 293
-#define TK_OFFSET 294
-#define TK_ASC 295
-#define TK_NULLS 296
-#define TK_ABORT 297
-#define TK_AFTER 298
-#define TK_ATTACH 299
-#define TK_BEFORE 300
-#define TK_BEGIN 301
-#define TK_BITAND 302
-#define TK_BITNOT 303
-#define TK_BITOR 304
-#define TK_BLOCKS 305
-#define TK_CHANGE 306
-#define TK_COMMA 307
-#define TK_CONCAT 308
-#define TK_CONFLICT 309
-#define TK_COPY 310
-#define TK_DEFERRED 311
-#define TK_DELIMITERS 312
-#define TK_DETACH 313
-#define TK_DIVIDE 314
-#define TK_DOT 315
-#define TK_EACH 316
-#define TK_FAIL 317
-#define TK_FILE 318
-#define TK_FOR 319
-#define TK_GLOB 320
-#define TK_ID 321
-#define TK_IMMEDIATE 322
-#define TK_IMPORT 323
-#define TK_INITIALLY 324
-#define TK_INSTEAD 325
-#define TK_ISNULL 326
-#define TK_KEY 327
-#define TK_MODULES 328
-#define TK_NK_BITNOT 329
-#define TK_NK_SEMI 330
-#define TK_NOTNULL 331
-#define TK_OF 332
-#define TK_PLUS 333
-#define TK_PRIVILEGE 334
-#define TK_RAISE 335
-#define TK_RESTRICT 336
-#define TK_ROW 337
-#define TK_SEMI 338
-#define TK_STAR 339
-#define TK_STATEMENT 340
-#define TK_STRICT 341
-#define TK_STRING 342
-#define TK_TIMES 343
-#define TK_VALUES 344
-#define TK_VARIABLE 345
-#define TK_WAL 346
+#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
#define TK_NK_SPACE 600
#define TK_NK_COMMENT 601
diff --git a/include/dnode/vnode/tqCommon.h b/include/dnode/vnode/tqCommon.h
index dc145819ca..fc9b88340f 100644
--- a/include/dnode/vnode/tqCommon.h
+++ b/include/dnode/vnode/tqCommon.h
@@ -18,7 +18,7 @@
// message process
int32_t tqStreamTaskStartAsync(SStreamMeta* pMeta, SMsgCb* cb, bool restart);
-int32_t tqStreamOneTaskStartAsync(SStreamMeta* pMeta, SMsgCb* cb, int64_t streamId, int32_t taskId);
+int32_t tqStreamStartOneTaskAsync(SStreamMeta* pMeta, SMsgCb* cb, int64_t streamId, int32_t taskId);
int32_t tqStreamTaskProcessUpdateReq(SStreamMeta* pMeta, SMsgCb* cb, SRpcMsg* pMsg, bool restored);
int32_t tqStreamTaskProcessDispatchReq(SStreamMeta* pMeta, SRpcMsg* pMsg);
int32_t tqStreamTaskProcessDispatchRsp(SStreamMeta* pMeta, SRpcMsg* pMsg);
diff --git a/include/libs/function/function.h b/include/libs/function/function.h
index 8863201094..0fa84c99c6 100644
--- a/include/libs/function/function.h
+++ b/include/libs/function/function.h
@@ -114,6 +114,7 @@ typedef struct SInputColumnInfoData {
int32_t totalRows; // total rows in current columnar data
int32_t startRowIndex; // handle started row index
int64_t numOfRows; // the number of rows needs to be handled
+ bool blankFill; // fill blank data to block for empty table
int32_t numOfInputCols; // PTS is not included
bool colDataSMAIsSet; // if agg is set or not
SColumnInfoData *pPTS; // primary timestamp column
diff --git a/include/libs/function/functionMgt.h b/include/libs/function/functionMgt.h
index a0b5d938e3..3c5f23af6b 100644
--- a/include/libs/function/functionMgt.h
+++ b/include/libs/function/functionMgt.h
@@ -126,6 +126,7 @@ typedef enum EFunctionType {
FUNCTION_TYPE_TAGS,
FUNCTION_TYPE_TBUID,
FUNCTION_TYPE_VGID,
+ FUNCTION_TYPE_VGVER,
// internal function
FUNCTION_TYPE_SELECT_VALUE = 3750,
diff --git a/include/libs/nodes/cmdnodes.h b/include/libs/nodes/cmdnodes.h
index 6aa1796963..9a12d7b98f 100644
--- a/include/libs/nodes/cmdnodes.h
+++ b/include/libs/nodes/cmdnodes.h
@@ -420,6 +420,12 @@ typedef struct SDropCGroupStmt {
bool ignoreNotExists;
} SDropCGroupStmt;
+typedef struct SAlterClusterStmt {
+ ENodeType type;
+ char config[TSDB_DNODE_CONFIG_LEN];
+ char value[TSDB_CLUSTER_VALUE_LEN];
+} SAlterClusterStmt;
+
typedef struct SAlterLocalStmt {
ENodeType type;
char config[TSDB_DNODE_CONFIG_LEN];
diff --git a/include/libs/parser/parser.h b/include/libs/parser/parser.h
index bb206b5a02..6a41f4607b 100644
--- a/include/libs/parser/parser.h
+++ b/include/libs/parser/parser.h
@@ -106,7 +106,7 @@ int32_t qAnalyseSqlSemantic(SParseContext* pCxt, const struct SCatalogReq* pCata
const struct SMetaData* pMetaData, SQuery* pQuery);
int32_t qContinueParseSql(SParseContext* pCxt, struct SCatalogReq* pCatalogReq, const struct SMetaData* pMetaData,
SQuery* pQuery);
-int32_t qContinueParsePostQuery(SParseContext* pCxt, SQuery* pQuery, void** pResRow);
+int32_t qContinueParsePostQuery(SParseContext* pCxt, SQuery* pQuery, SSDataBlock* pBlock);
void qDestroyParseContext(SParseContext* pCxt);
diff --git a/include/libs/scalar/scalar.h b/include/libs/scalar/scalar.h
index 789ba554e2..5e946357db 100644
--- a/include/libs/scalar/scalar.h
+++ b/include/libs/scalar/scalar.h
@@ -96,9 +96,7 @@ int32_t winDurFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOu
int32_t qStartTsFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput);
int32_t qEndTsFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput);
-int32_t qTbnameFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput);
-int32_t qTbUidFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput);
-int32_t qVgIdFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput);
+int32_t qPseudoTagFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput);
/* Aggregation functions */
int32_t countScalarFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput);
diff --git a/include/libs/stream/tstream.h b/include/libs/stream/tstream.h
index 9b3ce36bdd..9738be839d 100644
--- a/include/libs/stream/tstream.h
+++ b/include/libs/stream/tstream.h
@@ -324,12 +324,13 @@ typedef struct SStreamStatus {
int8_t taskStatus;
int8_t downstreamReady; // downstream tasks are all ready now, if this flag is set
int8_t schedStatus;
- int32_t schedIdleTime; // idle time before invoke again
- int64_t lastExecTs; // last exec time stamp
int8_t statusBackup;
- bool appendTranstateBlock; // has append the transfer state data block already
- int32_t timerActive; // timer is active
+ int32_t schedIdleTime; // idle time before invoke again
+ int32_t timerActive; // timer is active
+ int64_t lastExecTs; // last exec time stamp
int32_t inScanHistorySentinel;
+ bool appendTranstateBlock; // has append the transfer state data block already
+ bool supplementaryWalscan; // complete the supplementary wal scan or not
} SStreamStatus;
typedef struct SDataRange {
@@ -530,7 +531,7 @@ typedef struct SStreamMeta {
int32_t tEncodeStreamEpInfo(SEncoder* pEncoder, const SStreamChildEpInfo* pInfo);
int32_t tDecodeStreamEpInfo(SDecoder* pDecoder, SStreamChildEpInfo* pInfo);
-SStreamTask* tNewStreamTask(int64_t streamId, int8_t taskLevel, bool fillHistory, int64_t triggerParam,
+SStreamTask* tNewStreamTask(int64_t streamId, int8_t taskLevel, SEpSet* pEpset, bool fillHistory, int64_t triggerParam,
SArray* pTaskList, bool hasFillhistory);
int32_t tEncodeStreamTask(SEncoder* pEncoder, const SStreamTask* pTask);
int32_t tDecodeStreamTask(SDecoder* pDecoder, SStreamTask* pTask);
diff --git a/include/os/osDef.h b/include/os/osDef.h
index 1a831f2e86..335b151cac 100644
--- a/include/os/osDef.h
+++ b/include/os/osDef.h
@@ -222,6 +222,10 @@ void syslog(int unused, const char *format, ...);
do { \
prctl(PR_SET_NAME, (name)); \
} while (0)
+#define getThreadName(name) \
+ do { \
+ prctl(PR_GET_NAME, (name)); \
+ } while (0)
#endif
#else
// Windows
diff --git a/include/util/taoserror.h b/include/util/taoserror.h
index 4a8b1a41a5..94fe80b901 100644
--- a/include/util/taoserror.h
+++ b/include/util/taoserror.h
@@ -414,6 +414,7 @@ int32_t* taosGetErrno();
#define TSDB_CODE_MNODE_ONLY_TWO_MNODE TAOS_DEF_ERROR_CODE(0, 0x0414) // internal
#define TSDB_CODE_MNODE_NO_NEED_RESTORE TAOS_DEF_ERROR_CODE(0, 0x0415) // internal
#define TSDB_CODE_DNODE_ONLY_USE_WHEN_OFFLINE TAOS_DEF_ERROR_CODE(0, 0x0416)
+#define TSDB_CODE_DNODE_NO_MACHINE_CODE TAOS_DEF_ERROR_CODE(0, 0x0417)
// mnode-sma
#define TSDB_CODE_MND_SMA_ALREADY_EXIST TAOS_DEF_ERROR_CODE(0, 0x0480)
@@ -531,7 +532,7 @@ int32_t* taosGetErrno();
#define TSDB_CODE_QRY_TASK_DROPPED TAOS_DEF_ERROR_CODE(0, 0x0725)
#define TSDB_CODE_QRY_TASK_CANCELLING TAOS_DEF_ERROR_CODE(0, 0x0726)
#define TSDB_CODE_QRY_TASK_DROPPING TAOS_DEF_ERROR_CODE(0, 0x0727)
-#define TSDB_CODE_QRY_DUPLICATTED_OPERATION TAOS_DEF_ERROR_CODE(0, 0x0728)
+#define TSDB_CODE_QRY_DUPLICATED_OPERATION TAOS_DEF_ERROR_CODE(0, 0x0728)
#define TSDB_CODE_QRY_TASK_MSG_ERROR TAOS_DEF_ERROR_CODE(0, 0x0729)
#define TSDB_CODE_QRY_JOB_FREED TAOS_DEF_ERROR_CODE(0, 0x072A)
#define TSDB_CODE_QRY_TASK_STATUS_ERROR TAOS_DEF_ERROR_CODE(0, 0x072B)
@@ -554,7 +555,7 @@ int32_t* taosGetErrno();
#define TSDB_CODE_GRANT_STREAM_LIMITED TAOS_DEF_ERROR_CODE(0, 0x0807)
#define TSDB_CODE_GRANT_SPEED_LIMITED TAOS_DEF_ERROR_CODE(0, 0x0808)
#define TSDB_CODE_GRANT_STORAGE_LIMITED TAOS_DEF_ERROR_CODE(0, 0x0809)
-#define TSDB_CODE_GRANT_QUERYTIME_LIMITED TAOS_DEF_ERROR_CODE(0, 0x080A)
+#define TSDB_CODE_GRANT_SUBSCRIPTION_LIMITED TAOS_DEF_ERROR_CODE(0, 0x080A)
#define TSDB_CODE_GRANT_CPU_LIMITED TAOS_DEF_ERROR_CODE(0, 0x080B)
#define TSDB_CODE_GRANT_STABLE_LIMITED TAOS_DEF_ERROR_CODE(0, 0x080C)
#define TSDB_CODE_GRANT_TABLE_LIMITED TAOS_DEF_ERROR_CODE(0, 0x080D)
@@ -563,8 +564,19 @@ int32_t* taosGetErrno();
#define TSDB_CODE_GRANT_PAR_DEC_IVLD_KEY TAOS_DEF_ERROR_CODE(0, 0x0810)
#define TSDB_CODE_GRANT_PAR_DEC_IVLD_KLEN TAOS_DEF_ERROR_CODE(0, 0x0811)
#define TSDB_CODE_GRANT_GEN_IVLD_KEY TAOS_DEF_ERROR_CODE(0, 0x0812)
-#define TSDB_CODE_GRANT_GEN_APP_LIMIT TAOS_DEF_ERROR_CODE(0, 0x0813)
+#define TSDB_CODE_GRANT_GEN_ACTIVE_LEN TAOS_DEF_ERROR_CODE(0, 0x0813)
#define TSDB_CODE_GRANT_GEN_ENC_IVLD_KLEN TAOS_DEF_ERROR_CODE(0, 0x0814)
+#define TSDB_CODE_GRANT_PAR_IVLD_DIST TAOS_DEF_ERROR_CODE(0, 0x0815)
+#define TSDB_CODE_GRANT_UNLICENSED_CLUSTER TAOS_DEF_ERROR_CODE(0, 0x0816)
+#define TSDB_CODE_GRANT_LACK_OF_BASIC TAOS_DEF_ERROR_CODE(0, 0x0817)
+#define TSDB_CODE_GRANT_OBJ_NOT_EXIST TAOS_DEF_ERROR_CODE(0, 0x0818)
+#define TSDB_CODE_GRANT_LAST_ACTIVE_NOT_FOUND TAOS_DEF_ERROR_CODE(0, 0x0819)
+#define TSDB_CODE_GRANT_MACHINES_MISMATCH TAOS_DEF_ERROR_CODE(0, 0x0820)
+#define TSDB_CODE_GRANT_OPT_EXPIRE_TOO_LARGE TAOS_DEF_ERROR_CODE(0, 0x0821)
+#define TSDB_CODE_GRANT_DUPLICATED_ACTIVE TAOS_DEF_ERROR_CODE(0, 0x0822)
+#define TSDB_CODE_GRANT_VIEW_LIMITED TAOS_DEF_ERROR_CODE(0, 0x0823)
+#define TSDB_CODE_GRANT_CSV_LIMITED TAOS_DEF_ERROR_CODE(0, 0x0824)
+#define TSDB_CODE_GRANT_AUDIT_LIMITED TAOS_DEF_ERROR_CODE(0, 0x0825)
// sync
// #define TSDB_CODE_SYN_INVALID_CONFIG TAOS_DEF_ERROR_CODE(0, 0x0900) // 2.x
diff --git a/include/util/tbase58.h b/include/util/tbase58.h
new file mode 100644
index 0000000000..e1b03f8a8f
--- /dev/null
+++ b/include/util/tbase58.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2019 TAOS Data, Inc.
+ *
+ * This program is free software: you can use, redistribute, and/or modify
+ * it under the terms of the GNU Affero General Public License, version 3
+ * or later ("AGPL"), as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+#ifndef _TD_UTIL_BASE58_H_
+#define _TD_UTIL_BASE58_H_
+
+#include "os.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+uint8_t *base58_decode(const char *value, size_t inlen, int32_t *outlen);
+char *base58_encode(const uint8_t *value, int32_t vlen);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /*_TD_UTIL_BASE58_H_*/
\ No newline at end of file
diff --git a/include/util/tdef.h b/include/util/tdef.h
index aee20514ad..4698d50e67 100644
--- a/include/util/tdef.h
+++ b/include/util/tdef.h
@@ -264,6 +264,7 @@ typedef enum ELogicConditionType {
#define TSDB_JOB_STATUS_LEN 32
#define TSDB_CLUSTER_ID_LEN 40
+#define TSDB_MACHINE_ID_LEN 24
#define TSDB_FQDN_LEN 128
#define TSDB_EP_LEN (TSDB_FQDN_LEN + 6)
#define TSDB_IPv4ADDR_LEN 16
@@ -285,6 +286,8 @@ typedef enum ELogicConditionType {
#define TSDB_DNODE_CONFIG_LEN 128
#define TSDB_DNODE_VALUE_LEN 256
+#define TSDB_CLUSTER_VALUE_LEN 1000
+
#define TSDB_ACTIVE_KEY_LEN 109
#define TSDB_CONN_ACTIVE_KEY_LEN 255
diff --git a/source/client/src/clientImpl.c b/source/client/src/clientImpl.c
index 9800d233e9..c1e1da617d 100644
--- a/source/client/src/clientImpl.c
+++ b/source/client/src/clientImpl.c
@@ -880,19 +880,21 @@ static bool incompletaFileParsing(SNode* pStmt) {
return QUERY_NODE_VNODE_MODIFY_STMT != nodeType(pStmt) ? false : ((SVnodeModifyOpStmt*)pStmt)->fileProcessing;
}
-void continuePostSubQuery(SRequestObj* pRequest, TAOS_ROW row) {
+void continuePostSubQuery(SRequestObj* pRequest, SSDataBlock* pBlock) {
SSqlCallbackWrapper* pWrapper = pRequest->pWrapper;
- int32_t code = nodesAcquireAllocator(pWrapper->pParseCtx->allocatorId);
+
+ int32_t code = nodesAcquireAllocator(pWrapper->pParseCtx->allocatorId);
if (TSDB_CODE_SUCCESS == code) {
int64_t analyseStart = taosGetTimestampUs();
- code = qContinueParsePostQuery(pWrapper->pParseCtx, pRequest->pQuery, (void**)row);
+ code = qContinueParsePostQuery(pWrapper->pParseCtx, pRequest->pQuery, pBlock);
pRequest->metric.analyseCostUs += taosGetTimestampUs() - analyseStart;
}
+
if (TSDB_CODE_SUCCESS == code) {
code = qContinuePlanPostQuery(pRequest->pPostPlan);
}
- nodesReleaseAllocator(pWrapper->pParseCtx->allocatorId);
+ nodesReleaseAllocator(pWrapper->pParseCtx->allocatorId);
handleQueryAnslyseRes(pWrapper, NULL, code);
}
@@ -916,6 +918,43 @@ void returnToUser(SRequestObj* pRequest) {
}
}
+static SSDataBlock* createResultBlock(TAOS_RES* pRes, int32_t numOfRows) {
+ int64_t lastTs = 0;
+
+ TAOS_FIELD* pResFields = taos_fetch_fields(pRes);
+ int32_t numOfFields = taos_num_fields(pRes);
+
+ SSDataBlock* pBlock = createDataBlock();
+
+ for(int32_t i = 0; i < numOfFields; ++i) {
+ SColumnInfoData colInfoData = createColumnInfoData(pResFields[i].type, pResFields[i].bytes, i + 1);
+ blockDataAppendColInfo(pBlock, &colInfoData);
+ }
+
+ blockDataEnsureCapacity(pBlock, numOfRows);
+
+ for (int32_t i = 0; i < numOfRows; ++i) {
+ TAOS_ROW pRow = taos_fetch_row(pRes);
+ int64_t ts = *(int64_t*)pRow[0];
+ if (lastTs < ts) {
+ lastTs = ts;
+ }
+
+ for(int32_t j = 0; j < numOfFields; ++j) {
+ SColumnInfoData* pColInfoData = taosArrayGet(pBlock->pDataBlock, j);
+ colDataSetVal(pColInfoData, i, pRow[j], false);
+ }
+
+ tscDebug("lastKey:%" PRId64 " vgId:%d, vgVer:%" PRId64, ts, *(int32_t*)pRow[1], *(int64_t*)pRow[2]);
+ }
+
+ pBlock->info.window.ekey = lastTs;
+ pBlock->info.rows = numOfRows;
+
+ tscDebug("lastKey:%"PRId64" numOfRows:%d from all vgroups", lastTs, numOfRows);
+ return pBlock;
+}
+
void postSubQueryFetchCb(void* param, TAOS_RES* res, int32_t rowNum) {
SRequestObj* pRequest = (SRequestObj*)res;
if (pRequest->code) {
@@ -923,19 +962,17 @@ void postSubQueryFetchCb(void* param, TAOS_RES* res, int32_t rowNum) {
return;
}
- TAOS_ROW row = NULL;
- if (rowNum > 0) {
- row = taos_fetch_row(res); // for single row only now
- }
-
+ SSDataBlock* pBlock = createResultBlock(res, rowNum);
SRequestObj* pNextReq = acquireRequest(pRequest->relation.nextRefId);
if (pNextReq) {
- continuePostSubQuery(pNextReq, row);
+ continuePostSubQuery(pNextReq, pBlock);
releaseRequest(pRequest->relation.nextRefId);
} else {
tscError("0x%" PRIx64 ", next req ref 0x%" PRIx64 " is not there, reqId:0x%" PRIx64, pRequest->self,
pRequest->relation.nextRefId, pRequest->requestId);
}
+
+ blockDataDestroy(pBlock);
}
void handlePostSubQuery(SSqlCallbackWrapper* pWrapper) {
diff --git a/source/client/src/clientTmq.c b/source/client/src/clientTmq.c
index 69681b9ae0..c29dcda781 100644
--- a/source/client/src/clientTmq.c
+++ b/source/client/src/clientTmq.c
@@ -155,6 +155,7 @@ typedef struct {
char db[TSDB_DB_FNAME_LEN];
SArray* vgs; // SArray
SSchemaWrapper schema;
+ int8_t noPrivilege;
} SMqClientTopic;
typedef struct {
@@ -739,6 +740,30 @@ void tmqAssignDelayedCommitTask(void* param, void* tmrId) {
int32_t tmqHbCb(void* param, SDataBuf* pMsg, int32_t code) {
if (pMsg) {
+ SMqHbRsp rsp = {0};
+ tDeserializeSMqHbRsp(pMsg->pData, pMsg->len, &rsp);
+
+ int64_t refId = *(int64_t*)param;
+ tmq_t* tmq = taosAcquireRef(tmqMgmt.rsetId, refId);
+ if (tmq != NULL) {
+ taosWLockLatch(&tmq->lock);
+ for(int32_t i = 0; i < taosArrayGetSize(rsp.topicPrivileges); i++){
+ STopicPrivilege* privilege = taosArrayGet(rsp.topicPrivileges, i);
+ if(privilege->noPrivilege == 1){
+ int32_t topicNumCur = taosArrayGetSize(tmq->clientTopics);
+ for (int32_t j = 0; j < topicNumCur; j++) {
+ SMqClientTopic* pTopicCur = taosArrayGet(tmq->clientTopics, j);
+ if(strcmp(pTopicCur->topicName, privilege->topic) == 0){
+ tscInfo("consumer:0x%" PRIx64 ", has no privilege, topic:%s", tmq->consumerId, privilege->topic);
+ pTopicCur->noPrivilege = 1;
+ }
+ }
+ }
+ }
+ taosWUnLockLatch(&tmq->lock);
+ taosReleaseRef(tmqMgmt.rsetId, refId);
+ }
+ tDeatroySMqHbRsp(&rsp);
taosMemoryFree(pMsg->pData);
taosMemoryFree(pMsg->pEpSet);
}
@@ -809,7 +834,9 @@ void tmqSendHbReq(void* param, void* tmrId) {
sendInfo->requestId = generateRequestId();
sendInfo->requestObjRefId = 0;
- sendInfo->param = NULL;
+ sendInfo->paramFreeFp = taosMemoryFree;
+ sendInfo->param = taosMemoryMalloc(sizeof(int64_t));
+ *(int64_t *)sendInfo->param = refId;
sendInfo->fp = tmqHbCb;
sendInfo->msgType = TDMT_MND_TMQ_HB;
@@ -1705,7 +1732,10 @@ static int32_t tmqPollImpl(tmq_t* tmq, int64_t timeout) {
for (int i = 0; i < numOfTopics; i++) {
SMqClientTopic* pTopic = taosArrayGet(tmq->clientTopics, i);
int32_t numOfVg = taosArrayGetSize(pTopic->vgs);
-
+ if(pTopic->noPrivilege){
+ tscDebug("consumer:0x%" PRIx64 " has no privilegr for topic:%s", tmq->consumerId, pTopic->topicName);
+ continue;
+ }
for (int j = 0; j < numOfVg; j++) {
SMqClientVg* pVg = taosArrayGet(pTopic->vgs, j);
if (taosGetTimestampMs() - pVg->emptyBlockReceiveTs < EMPTY_BLOCK_POLL_IDLE_DURATION) { // less than 10ms
diff --git a/source/client/test/clientTests.cpp b/source/client/test/clientTests.cpp
index e6519a436e..c1adc49d48 100644
--- a/source/client/test/clientTests.cpp
+++ b/source/client/test/clientTests.cpp
@@ -829,7 +829,10 @@ TEST(clientCase, projection_query_tables) {
TAOS_RES* pRes = taos_query(pConn, "use abc1");
taos_free_result(pRes);
- pRes = taos_query(pConn, "create stable st2 (ts timestamp, k int, f varchar(4096)) tags(a int)");
+// TAOS_RES* pRes = taos_query(pConn, "select tbname, last(ts) from abc1.stable_1 group by tbname");
+// taos_free_result(pRes);
+
+ pRes = taos_query(pConn, "create stream stream_1 trigger at_once fill_history 1 ignore expired 0 into str_res1 as select _wstart as ts, count(*) from stable_1 interval(10s);");
if (taos_errno(pRes) != 0) {
printf("failed to create table tu, reason:%s\n", taos_errstr(pRes));
}
diff --git a/source/common/src/systable.c b/source/common/src/systable.c
index 75a54a0cd5..77083d0425 100644
--- a/source/common/src/systable.c
+++ b/source/common/src/systable.c
@@ -37,8 +37,7 @@ static const SSysDbTableSchema dnodesSchema[] = {
{.name = "reboot_time", .bytes = 8, .type = TSDB_DATA_TYPE_TIMESTAMP, .sysInfo = true},
{.name = "note", .bytes = 256 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true},
#ifdef TD_ENTERPRISE
- {.name = "active_code", .bytes = TSDB_ACTIVE_KEY_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true},
- {.name = "c_active_code", .bytes = TSDB_CONN_ACTIVE_KEY_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true},
+ {.name = "machine_id", .bytes = TSDB_MACHINE_ID_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true},
#endif
};
@@ -349,6 +348,24 @@ static const SSysDbTableSchema userCompactsDetailSchema[] = {
{.name = "start_time", .bytes = 8, .type = TSDB_DATA_TYPE_TIMESTAMP, .sysInfo = false},
};
+static const SSysDbTableSchema useGrantsFullSchema[] = {
+ {.name = "grant_name", .bytes = 32 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true},
+ {.name = "display_name", .bytes = 256 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true},
+ {.name = "expire", .bytes = 32 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true},
+ {.name = "limits", .bytes = 512 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true},
+};
+
+static const SSysDbTableSchema useGrantsLogsSchema[] = {
+ {.name = "state", .bytes = 1536 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true},
+ {.name = "active", .bytes = 512 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true},
+ {.name = "machine", .bytes = 9088 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true},
+};
+
+static const SSysDbTableSchema useMachinesSchema[] = {
+ {.name = "id", .bytes = TSDB_CLUSTER_ID_LEN + 1 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = false},
+ {.name = "machine", .bytes = 6016 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = false},
+};
+
static const SSysTableMeta infosMeta[] = {
{TSDB_INS_TABLE_DNODES, dnodesSchema, tListLen(dnodesSchema), true},
{TSDB_INS_TABLE_MNODES, mnodesSchema, tListLen(mnodesSchema), true},
@@ -378,6 +395,9 @@ static const SSysTableMeta infosMeta[] = {
{TSDB_INS_TABLE_VIEWS, userViewsSchema, tListLen(userViewsSchema), false},
{TSDB_INS_TABLE_COMPACTS, userCompactsSchema, tListLen(userCompactsSchema), false},
{TSDB_INS_TABLE_COMPACT_DETAILS, userCompactsDetailSchema, tListLen(userCompactsDetailSchema), false},
+ {TSDB_INS_TABLE_GRANTS_FULL, useGrantsFullSchema, tListLen(useGrantsFullSchema), false},
+ {TSDB_INS_TABLE_GRANTS_LOGS, useGrantsLogsSchema, tListLen(useGrantsLogsSchema), false},
+ {TSDB_INS_TABLE_MACHINES, useMachinesSchema, tListLen(useMachinesSchema), false},
};
static const SSysDbTableSchema connectionsSchema[] = {
diff --git a/source/common/src/tglobal.c b/source/common/src/tglobal.c
index a7d80fe5db..46c4d613fb 100644
--- a/source/common/src/tglobal.c
+++ b/source/common/src/tglobal.c
@@ -27,7 +27,7 @@
#include "cus_name.h"
#endif
-GRANT_CFG_DECLARE;
+// GRANT_CFG_DECLARE;
SConfig *tsCfg = NULL;
@@ -58,7 +58,7 @@ int32_t tsNumOfMnodeQueryThreads = 4;
int32_t tsNumOfMnodeFetchThreads = 1;
int32_t tsNumOfMnodeReadThreads = 1;
int32_t tsNumOfVnodeQueryThreads = 4;
-float tsRatioOfVnodeStreamThreads = 1.0;
+float tsRatioOfVnodeStreamThreads = 0.5F;
int32_t tsNumOfVnodeFetchThreads = 4;
int32_t tsNumOfVnodeRsmaThreads = 2;
int32_t tsNumOfQnodeQueryThreads = 4;
@@ -622,7 +622,7 @@ static int32_t taosAddServerCfg(SConfig *pCfg) {
0)
return -1;
- if (cfgAddFloat(pCfg, "ratioOfVnodeStreamThreads", tsRatioOfVnodeStreamThreads, 0.01, 10, CFG_SCOPE_SERVER,
+ if (cfgAddFloat(pCfg, "ratioOfVnodeStreamThreads", tsRatioOfVnodeStreamThreads, 0.01, 4, CFG_SCOPE_SERVER,
CFG_DYN_NONE) != 0)
return -1;
@@ -804,7 +804,7 @@ static int32_t taosAddServerCfg(SConfig *pCfg) {
if (cfgAddBool(pCfg, "experimental", tsExperimental, CFG_SCOPE_BOTH, CFG_DYN_BOTH) != 0) return -1;
- GRANT_CFG_ADD;
+ // GRANT_CFG_ADD;
return 0;
}
@@ -1229,7 +1229,7 @@ static int32_t taosSetServerCfg(SConfig *pCfg) {
tsExperimental = cfgGetItem(pCfg, "experimental")->bval;
- GRANT_CFG_GET;
+ // GRANT_CFG_GET;
return 0;
}
diff --git a/source/common/src/tgrant.c b/source/common/src/tgrant.c
index 74a59fd580..f212d71362 100644
--- a/source/common/src/tgrant.c
+++ b/source/common/src/tgrant.c
@@ -18,6 +18,6 @@
#ifndef _GRANT
-int32_t grantCheck(EGrantType grant) { return TSDB_CODE_SUCCESS; }
+int32_t grantCheck(EGrantType grant) {return TSDB_CODE_SUCCESS;}
#endif
\ No newline at end of file
diff --git a/source/common/src/tmsg.c b/source/common/src/tmsg.c
index c9e2908e8a..af1c1c4923 100644
--- a/source/common/src/tmsg.c
+++ b/source/common/src/tmsg.c
@@ -1163,9 +1163,11 @@ int32_t tSerializeSStatusReq(void *buf, int32_t bufLen, SStatusReq *pReq) {
if (tEncodeI64(&encoder, pReq->updateTime) < 0) return -1;
if (tEncodeFloat(&encoder, pReq->numOfCores) < 0) return -1;
if (tEncodeI32(&encoder, pReq->numOfSupportVnodes) < 0) return -1;
+ if (tEncodeI32v(&encoder, pReq->numOfDiskCfg) < 0) return -1;
if (tEncodeI64(&encoder, pReq->memTotal) < 0) return -1;
if (tEncodeI64(&encoder, pReq->memAvail) < 0) return -1;
if (tEncodeCStr(&encoder, pReq->dnodeEp) < 0) return -1;
+ if (tEncodeCStr(&encoder, pReq->machineId) < 0) return -1;
// cluster cfg
if (tEncodeI32(&encoder, pReq->clusterCfg.statusInterval) < 0) return -1;
@@ -1253,9 +1255,11 @@ int32_t tDeserializeSStatusReq(void *buf, int32_t bufLen, SStatusReq *pReq) {
if (tDecodeI64(&decoder, &pReq->updateTime) < 0) return -1;
if (tDecodeFloat(&decoder, &pReq->numOfCores) < 0) return -1;
if (tDecodeI32(&decoder, &pReq->numOfSupportVnodes) < 0) return -1;
+ if (tDecodeI32v(&decoder, &pReq->numOfDiskCfg) < 0) return -1;
if (tDecodeI64(&decoder, &pReq->memTotal) < 0) return -1;
if (tDecodeI64(&decoder, &pReq->memAvail) < 0) return -1;
if (tDecodeCStrTo(&decoder, pReq->dnodeEp) < 0) return -1;
+ if (tDecodeCStrTo(&decoder, pReq->machineId) < 0) return -1;
// cluster cfg
if (tDecodeI32(&decoder, &pReq->clusterCfg.statusInterval) < 0) return -1;
@@ -2266,6 +2270,37 @@ int32_t tDeserializeSGetUserWhiteListRsp(void *buf, int32_t bufLen, SGetUserWhit
void tFreeSGetUserWhiteListRsp(SGetUserWhiteListRsp *pRsp) { taosMemoryFree(pRsp->pWhiteLists); }
+int32_t tSerializeSMCfgClusterReq(void *buf, int32_t bufLen, SMCfgClusterReq *pReq) {
+ SEncoder encoder = {0};
+ tEncoderInit(&encoder, buf, bufLen);
+
+ if (tStartEncode(&encoder) < 0) return -1;
+ if (tEncodeCStr(&encoder, pReq->config) < 0) return -1;
+ if (tEncodeCStr(&encoder, pReq->value) < 0) return -1;
+ ENCODESQL();
+ tEndEncode(&encoder);
+
+ int32_t tlen = encoder.pos;
+ tEncoderClear(&encoder);
+ return tlen;
+}
+
+int32_t tDeserializeSMCfgClusterReq(void *buf, int32_t bufLen, SMCfgClusterReq *pReq) {
+ SDecoder decoder = {0};
+ tDecoderInit(&decoder, buf, bufLen);
+
+ if (tStartDecode(&decoder) < 0) return -1;
+ if (tDecodeCStrTo(&decoder, pReq->config) < 0) return -1;
+ if (tDecodeCStrTo(&decoder, pReq->value) < 0) return -1;
+ DECODESQL();
+ tEndDecode(&decoder);
+
+ tDecoderClear(&decoder);
+ return 0;
+}
+
+void tFreeSMCfgClusterReq(SMCfgClusterReq *pReq) { FREESQL(); }
+
int32_t tSerializeSCreateDropMQSNodeReq(void *buf, int32_t bufLen, SMCreateQnodeReq *pReq) {
SEncoder encoder = {0};
tEncoderInit(&encoder, buf, bufLen);
@@ -6139,6 +6174,55 @@ int32_t tDeserializeSMqAskEpReq(void *buf, int32_t bufLen, SMqAskEpReq *pReq) {
return 0;
}
+int32_t tDeatroySMqHbRsp(SMqHbRsp *pRsp) {
+ taosArrayDestroy(pRsp->topicPrivileges);
+ return 0;
+}
+
+int32_t tSerializeSMqHbRsp(void *buf, int32_t bufLen, SMqHbRsp *pRsp) {
+ SEncoder encoder = {0};
+ tEncoderInit(&encoder, buf, bufLen);
+ if (tStartEncode(&encoder) < 0) return -1;
+
+ int32_t sz = taosArrayGetSize(pRsp->topicPrivileges);
+ if (tEncodeI32(&encoder, sz) < 0) return -1;
+ for (int32_t i = 0; i < sz; ++i) {
+ STopicPrivilege *privilege = (STopicPrivilege *)taosArrayGet(pRsp->topicPrivileges, i);
+ if (tEncodeCStr(&encoder, privilege->topic) < 0) return -1;
+ if (tEncodeI8(&encoder, privilege->noPrivilege) < 0) return -1;
+ }
+
+ tEndEncode(&encoder);
+
+ int32_t tlen = encoder.pos;
+ tEncoderClear(&encoder);
+
+ return tlen;
+}
+
+int32_t tDeserializeSMqHbRsp(void *buf, int32_t bufLen, SMqHbRsp *pRsp) {
+ SDecoder decoder = {0};
+ tDecoderInit(&decoder, (char *)buf, bufLen);
+
+ if (tStartDecode(&decoder) < 0) return -1;
+
+ int32_t sz = 0;
+ if (tDecodeI32(&decoder, &sz) < 0) return -1;
+ if (sz > 0) {
+ pRsp->topicPrivileges = taosArrayInit(sz, sizeof(STopicPrivilege));
+ if (NULL == pRsp->topicPrivileges) return -1;
+ for (int32_t i = 0; i < sz; ++i) {
+ STopicPrivilege *data = taosArrayReserve(pRsp->topicPrivileges, 1);
+ if (tDecodeCStrTo(&decoder, data->topic) < 0) return -1;
+ if (tDecodeI8(&decoder, &data->noPrivilege) < 0) return -1;
+ }
+ }
+ tEndDecode(&decoder);
+
+ tDecoderClear(&decoder);
+ return 0;
+}
+
int32_t tDeatroySMqHbReq(SMqHbReq *pReq) {
for (int i = 0; i < taosArrayGetSize(pReq->topics); i++) {
TopicOffsetRows *vgs = taosArrayGet(pReq->topics, i);
@@ -6194,7 +6278,7 @@ int32_t tDeserializeSMqHbReq(void *buf, int32_t bufLen, SMqHbReq *pReq) {
if (NULL == pReq->topics) return -1;
for (int32_t i = 0; i < sz; ++i) {
TopicOffsetRows *data = taosArrayReserve(pReq->topics, 1);
- tDecodeCStrTo(&decoder, data->topicName);
+ if (tDecodeCStrTo(&decoder, data->topicName) < 0) return -1;
int32_t szVgs = 0;
if (tDecodeI32(&decoder, &szVgs) < 0) return -1;
if (szVgs > 0) {
@@ -7168,6 +7252,7 @@ int32_t tSerializeSCMCreateStreamReq(void *buf, int32_t bufLen, const SCMCreateS
if (tEncodeI8(&encoder, pReq->createStb) < 0) return -1;
if (tEncodeU64(&encoder, pReq->targetStbUid) < 0) return -1;
+
if (tEncodeI32(&encoder, taosArrayGetSize(pReq->fillNullCols)) < 0) return -1;
for (int32_t i = 0; i < taosArrayGetSize(pReq->fillNullCols); ++i) {
SColLocation *pCol = taosArrayGet(pReq->fillNullCols, i);
@@ -7175,10 +7260,19 @@ int32_t tSerializeSCMCreateStreamReq(void *buf, int32_t bufLen, const SCMCreateS
if (tEncodeI16(&encoder, pCol->colId) < 0) return -1;
if (tEncodeI8(&encoder, pCol->type) < 0) return -1;
}
+
if (tEncodeI64(&encoder, pReq->deleteMark) < 0) return -1;
if (tEncodeI8(&encoder, pReq->igUpdate) < 0) return -1;
if (tEncodeI64(&encoder, pReq->lastTs) < 0) return -1;
+ if (tEncodeI32(&encoder, taosArrayGetSize(pReq->pVgroupVerList)) < 0) return -1;
+
+ for(int32_t i = 0; i < taosArrayGetSize(pReq->pVgroupVerList); ++i) {
+ SVgroupVer* p = taosArrayGet(pReq->pVgroupVerList, i);
+ if (tEncodeI32(&encoder, p->vgId) < 0) return -1;
+ if (tEncodeI64(&encoder, p->ver) < 0) return -1;
+ }
+
tEndEncode(&encoder);
int32_t tlen = encoder.pos;
@@ -7189,6 +7283,8 @@ int32_t tSerializeSCMCreateStreamReq(void *buf, int32_t bufLen, const SCMCreateS
int32_t tDeserializeSCMCreateStreamReq(void *buf, int32_t bufLen, SCMCreateStreamReq *pReq) {
int32_t sqlLen = 0;
int32_t astLen = 0;
+ int32_t numOfFillNullCols = 0;
+ int32_t numOfVgVer = 0;
SDecoder decoder = {0};
tDecoderInit(&decoder, buf, bufLen);
@@ -7240,7 +7336,6 @@ int32_t tDeserializeSCMCreateStreamReq(void *buf, int32_t bufLen, SCMCreateStrea
}
if (tDecodeI8(&decoder, &pReq->createStb) < 0) return -1;
if (tDecodeU64(&decoder, &pReq->targetStbUid) < 0) return -1;
- int32_t numOfFillNullCols = 0;
if (tDecodeI32(&decoder, &numOfFillNullCols) < 0) return -1;
if (numOfFillNullCols > 0) {
pReq->fillNullCols = taosArrayInit(numOfFillNullCols, sizeof(SColLocation));
@@ -7265,9 +7360,28 @@ int32_t tDeserializeSCMCreateStreamReq(void *buf, int32_t bufLen, SCMCreateStrea
if (tDecodeI8(&decoder, &pReq->igUpdate) < 0) return -1;
if (tDecodeI64(&decoder, &pReq->lastTs) < 0) return -1;
- tEndDecode(&decoder);
+ if (tDecodeI32(&decoder, &numOfVgVer) < 0) return -1;
+ if (numOfVgVer > 0) {
+ pReq->pVgroupVerList = taosArrayInit(numOfVgVer, sizeof(SVgroupVer));
+ if (pReq->pVgroupVerList == NULL) {
+ terrno = TSDB_CODE_OUT_OF_MEMORY;
+ return -1;
+ }
+ for (int32_t i = 0; i < numOfVgVer; ++i) {
+ SVgroupVer v = {0};
+ if (tDecodeI32(&decoder, &v.vgId) < 0) return -1;
+ if (tDecodeI64(&decoder, &v.ver) < 0) return -1;
+ if (taosArrayPush(pReq->pVgroupVerList, &v) == NULL) {
+ terrno = TSDB_CODE_OUT_OF_MEMORY;
+ return -1;
+ }
+ }
+ }
+
+ tEndDecode(&decoder);
tDecoderClear(&decoder);
+
return 0;
}
@@ -7339,10 +7453,11 @@ void tFreeSCMCreateStreamReq(SCMCreateStreamReq *pReq) {
if (NULL == pReq) {
return;
}
- taosArrayDestroy(pReq->pTags);
taosMemoryFreeClear(pReq->sql);
taosMemoryFreeClear(pReq->ast);
+ taosArrayDestroy(pReq->pTags);
taosArrayDestroy(pReq->fillNullCols);
+ taosArrayDestroy(pReq->pVgroupVerList);
}
int32_t tEncodeSRSmaParam(SEncoder *pCoder, const SRSmaParam *pRSmaParam) {
@@ -7753,36 +7868,6 @@ static int32_t tDecodeSVSubmitBlk(SDecoder *pCoder, SVSubmitBlk *pBlock, int32_t
return 0;
}
-int32_t tEncodeSVSubmitReq(SEncoder *pCoder, const SVSubmitReq *pReq) {
- int32_t nBlocks = taosArrayGetSize(pReq->pArray);
-
- if (tStartEncode(pCoder) < 0) return -1;
-
- if (tEncodeI32v(pCoder, pReq->flags) < 0) return -1;
- if (tEncodeI32v(pCoder, nBlocks) < 0) return -1;
- for (int32_t iBlock = 0; iBlock < nBlocks; iBlock++) {
- if (tEncodeSVSubmitBlk(pCoder, (SVSubmitBlk *)taosArrayGet(pReq->pArray, iBlock), pReq->flags) < 0) return -1;
- }
-
- tEndEncode(pCoder);
- return 0;
-}
-
-int32_t tDecodeSVSubmitReq(SDecoder *pCoder, SVSubmitReq *pReq) {
- if (tStartDecode(pCoder) < 0) return -1;
-
- if (tDecodeI32v(pCoder, &pReq->flags) < 0) return -1;
- if (tDecodeI32v(pCoder, &pReq->nBlocks) < 0) return -1;
- pReq->pBlocks = tDecoderMalloc(pCoder, sizeof(SVSubmitBlk) * pReq->nBlocks);
- if (pReq->pBlocks == NULL) return -1;
- for (int32_t iBlock = 0; iBlock < pReq->nBlocks; iBlock++) {
- if (tDecodeSVSubmitBlk(pCoder, pReq->pBlocks + iBlock, pReq->flags) < 0) return -1;
- }
-
- tEndDecode(pCoder);
- return 0;
-}
-
static int32_t tEncodeSSubmitBlkRsp(SEncoder *pEncoder, const SSubmitBlkRsp *pBlock) {
if (tStartEncode(pEncoder) < 0) return -1;
diff --git a/source/dnode/mgmt/mgmt_dnode/src/dmHandle.c b/source/dnode/mgmt/mgmt_dnode/src/dmHandle.c
index 14853009e0..a3a29f6f77 100644
--- a/source/dnode/mgmt/mgmt_dnode/src/dmHandle.c
+++ b/source/dnode/mgmt/mgmt_dnode/src/dmHandle.c
@@ -114,9 +114,15 @@ void dmSendStatusReq(SDnodeMgmt *pMgmt) {
req.updateTime = pMgmt->pData->updateTime;
req.numOfCores = tsNumOfCores;
req.numOfSupportVnodes = tsNumOfSupportVnodes;
+ req.numOfDiskCfg = tsDiskCfgNum;
req.memTotal = tsTotalMemoryKB * 1024;
req.memAvail = req.memTotal - tsRpcQueueMemoryAllowed - 16 * 1024 * 1024;
tstrncpy(req.dnodeEp, tsLocalEp, TSDB_EP_LEN);
+ char *machine = tGetMachineId();
+ if (machine) {
+ tstrncpy(req.machineId, machine, TSDB_MACHINE_ID_LEN + 1);
+ taosMemoryFreeClear(machine);
+ }
req.clusterCfg.statusInterval = tsStatusInterval;
req.clusterCfg.checkTime = 0;
@@ -319,7 +325,7 @@ int32_t dmAppendVariablesToBlock(SSDataBlock *pBlock, int32_t dnodeId) {
for (int32_t i = 0, c = 0; i < numOfCfg; ++i, c = 0) {
SConfigItem *pItem = taosArrayGet(tsCfg->array, i);
- GRANT_CFG_SKIP;
+ // GRANT_CFG_SKIP;
SColumnInfoData *pColInfo = taosArrayGet(pBlock->pDataBlock, c++);
colDataSetVal(pColInfo, i, (const char *)&dnodeId, false);
@@ -429,7 +435,7 @@ SArray *dmGetMsgHandles() {
if (dmSetMgmtHandle(pArray, TDMT_DND_CONFIG_DNODE, dmPutNodeMsgToMgmtQueue, 0) == NULL) goto _OVER;
if (dmSetMgmtHandle(pArray, TDMT_DND_SERVER_STATUS, dmPutNodeMsgToMgmtQueue, 0) == NULL) goto _OVER;
if (dmSetMgmtHandle(pArray, TDMT_DND_SYSTABLE_RETRIEVE, dmPutNodeMsgToMgmtQueue, 0) == NULL) goto _OVER;
- if (dmSetMgmtHandle(pArray, TDMT_DND_ALTER_MNODE_TYPE, dmPutNodeMsgToMgmtQueue, 0) == NULL) goto _OVER;
+ if (dmSetMgmtHandle(pArray, TDMT_DND_ALTER_MNODE_TYPE, dmPutNodeMsgToMgmtQueue, 0) == NULL) goto _OVER;
// Requests handled by MNODE
if (dmSetMgmtHandle(pArray, TDMT_MND_GRANT, dmPutNodeMsgToMgmtQueue, 0) == NULL) goto _OVER;
diff --git a/source/dnode/mgmt/mgmt_mnode/src/mmHandle.c b/source/dnode/mgmt/mgmt_mnode/src/mmHandle.c
index ec79e1f6c4..531e6f4b3d 100644
--- a/source/dnode/mgmt/mgmt_mnode/src/mmHandle.c
+++ b/source/dnode/mgmt/mgmt_mnode/src/mmHandle.c
@@ -163,7 +163,6 @@ SArray *mmGetMsgHandles() {
if (dmSetMgmtHandle(pArray, TDMT_MND_DROP_STREAM, mmPutMsgToWriteQueue, 0) == NULL) goto _OVER;
if (dmSetMgmtHandle(pArray, TDMT_MND_PAUSE_STREAM, mmPutMsgToWriteQueue, 0) == NULL) goto _OVER;
if (dmSetMgmtHandle(pArray, TDMT_MND_RESUME_STREAM, mmPutMsgToWriteQueue, 0) == NULL) goto _OVER;
- if (dmSetMgmtHandle(pArray, TDMT_MND_GRANT_RSP, mmPutMsgToReadQueue, 0) == NULL) goto _OVER;
if (dmSetMgmtHandle(pArray, TDMT_MND_RETRIEVE_IP_WHITE, mmPutMsgToReadQueue, 0) == NULL) goto _OVER;
if (dmSetMgmtHandle(pArray, TDMT_MND_GET_USER_WHITELIST, mmPutMsgToReadQueue, 0) == NULL) goto _OVER;
@@ -193,6 +192,7 @@ SArray *mmGetMsgHandles() {
if (dmSetMgmtHandle(pArray, TDMT_MND_DROP_VIEW, mmPutMsgToWriteQueue, 0) == NULL) goto _OVER;
if (dmSetMgmtHandle(pArray, TDMT_MND_VIEW_META, mmPutMsgToReadQueue, 0) == NULL) goto _OVER;
if (dmSetMgmtHandle(pArray, TDMT_MND_KILL_COMPACT, mmPutMsgToReadQueue, 0) == NULL) goto _OVER;
+ if (dmSetMgmtHandle(pArray, TDMT_MND_CONFIG_CLUSTER, mmPutMsgToWriteQueue, 0) == NULL) goto _OVER;
if (dmSetMgmtHandle(pArray, TDMT_VND_QUERY_COMPACT_PROGRESS_RSP, mmPutMsgToReadQueue, 0) == NULL) goto _OVER;
if (dmSetMgmtHandle(pArray, TDMT_SCH_QUERY, mmPutMsgToQueryQueue, 1) == NULL) goto _OVER;
diff --git a/source/dnode/mgmt/node_mgmt/inc/dmMgmt.h b/source/dnode/mgmt/node_mgmt/inc/dmMgmt.h
index cb3395dcc2..bc6a4652e7 100644
--- a/source/dnode/mgmt/node_mgmt/inc/dmMgmt.h
+++ b/source/dnode/mgmt/node_mgmt/inc/dmMgmt.h
@@ -72,7 +72,6 @@ typedef struct SUdfdData {
int32_t dnodeId;
} SUdfdData;
-#ifndef TD_MODULE_OPTIMIZE
typedef struct SDnode {
int8_t once;
bool stop;
@@ -86,21 +85,6 @@ typedef struct SDnode {
SMgmtWrapper wrappers[NODE_END];
SDnodeTrans trans;
} SDnode;
-#else
-typedef struct SDnode {
- int8_t once;
- bool stop;
- EDndRunStatus status;
- SStartupInfo startup;
- SDnodeTrans trans;
- SUdfdData udfdData;
- TdThreadMutex mutex;
- TdFilePtr lockfile;
- SDnodeData data;
- STfs *pTfs;
- SMgmtWrapper wrappers[NODE_END];
-} SDnode;
-#endif
// dmEnv.c
SDnode *dmInstance();
@@ -115,12 +99,7 @@ int32_t dmMarkWrapper(SMgmtWrapper *pWrapper);
void dmReleaseWrapper(SMgmtWrapper *pWrapper);
int32_t dmInitVars(SDnode *pDnode);
void dmClearVars(SDnode *pDnode);
-#ifdef TD_MODULE_OPTIMIZE
-int32_t dmInitModule(SDnode *pDnode, SMgmtWrapper *wrappers);
-bool dmRequireNode(SDnode *pDnode, SMgmtWrapper *pWrapper);
-#else
-int32_t dmInitModule(SDnode *pDnode);
-#endif
+int32_t dmInitModule(SDnode *pDnode);
SMgmtInputOpt dmBuildMgmtInputOpt(SMgmtWrapper *pWrapper);
void dmSetStatus(SDnode *pDnode, EDndRunStatus stype);
void dmProcessServerStartupStatus(SDnode *pDnode, SRpcMsg *pMsg);
@@ -143,11 +122,7 @@ void dmCleanupClient(SDnode *pDnode);
void dmCleanupStatusClient(SDnode *pDnode);
void dmCleanupSyncClient(SDnode *pDnode);
SMsgCb dmGetMsgcb(SDnode *pDnode);
-#ifdef TD_MODULE_OPTIMIZE
-int32_t dmInitMsgHandle(SDnode *pDnode, SMgmtWrapper *wrappers);
-#else
int32_t dmInitMsgHandle(SDnode *pDnode);
-#endif
int32_t dmProcessNodeMsg(SMgmtWrapper *pWrapper, SRpcMsg *pMsg);
// dmMonitor.c
diff --git a/source/dnode/mgmt/node_mgmt/src/dmMgmt.c b/source/dnode/mgmt/node_mgmt/src/dmMgmt.c
index 1a222a3fd4..6cbf31b15f 100644
--- a/source/dnode/mgmt/node_mgmt/src/dmMgmt.c
+++ b/source/dnode/mgmt/node_mgmt/src/dmMgmt.c
@@ -24,7 +24,6 @@
#include "tglobal.h"
#endif
-#ifndef TD_MODULE_OPTIMIZE
static bool dmRequireNode(SDnode *pDnode, SMgmtWrapper *pWrapper) {
SMgmtInputOpt input = dmBuildMgmtInputOpt(pWrapper);
@@ -38,7 +37,6 @@ static bool dmRequireNode(SDnode *pDnode, SMgmtWrapper *pWrapper) {
return required;
}
-#endif
int32_t dmInitDnode(SDnode *pDnode) {
dDebug("start to create dnode");
@@ -81,15 +79,9 @@ int32_t dmInitDnode(SDnode *pDnode) {
if (pDnode->lockfile == NULL) {
goto _OVER;
}
-#ifdef TD_MODULE_OPTIMIZE
- if (dmInitModule(pDnode, pDnode->wrappers) != 0) {
- goto _OVER;
- }
-#else
if (dmInitModule(pDnode) != 0) {
goto _OVER;
}
-#endif
indexInit(tsNumOfCommitThreads);
streamMetaInit();
diff --git a/source/dnode/mgmt/node_mgmt/src/dmTransport.c b/source/dnode/mgmt/node_mgmt/src/dmTransport.c
index 479b3b6aa3..1a31f08801 100644
--- a/source/dnode/mgmt/node_mgmt/src/dmTransport.c
+++ b/source/dnode/mgmt/node_mgmt/src/dmTransport.c
@@ -251,33 +251,6 @@ _OVER:
dmReleaseWrapper(pWrapper);
}
-#ifdef TD_MODULE_OPTIMIZE
-int32_t dmInitMsgHandle(SDnode *pDnode, SMgmtWrapper *wrappers) {
- SDnodeTrans *pTrans = &pDnode->trans;
-
- for (EDndNodeType ntype = DNODE; ntype < NODE_END; ++ntype) {
- SMgmtWrapper *pWrapper = wrappers + ntype;
- SArray *pArray = (*pWrapper->func.getHandlesFp)();
- if (pArray == NULL) return -1;
-
- for (int32_t i = 0; i < taosArrayGetSize(pArray); ++i) {
- SMgmtHandle *pMgmt = taosArrayGet(pArray, i);
- SDnodeHandle *pHandle = &pTrans->msgHandles[TMSG_INDEX(pMgmt->msgType)];
- if (pMgmt->needCheckVgId) {
- pHandle->needCheckVgId = pMgmt->needCheckVgId;
- }
- if (!pMgmt->needCheckVgId) {
- pHandle->defaultNtype = ntype;
- }
- pWrapper->msgFps[TMSG_INDEX(pMgmt->msgType)] = pMgmt->msgFp;
- }
-
- taosArrayDestroy(pArray);
- }
-
- return 0;
-}
-#else
int32_t dmInitMsgHandle(SDnode *pDnode) {
SDnodeTrans *pTrans = &pDnode->trans;
@@ -303,7 +276,6 @@ int32_t dmInitMsgHandle(SDnode *pDnode) {
return 0;
}
-#endif
static inline int32_t dmSendReq(const SEpSet *pEpSet, SRpcMsg *pMsg) {
SDnode *pDnode = dmInstance();
diff --git a/source/dnode/mnode/impl/inc/mndDef.h b/source/dnode/mnode/impl/inc/mndDef.h
index b056d561c7..bedd72759d 100644
--- a/source/dnode/mnode/impl/inc/mndDef.h
+++ b/source/dnode/mnode/impl/inc/mndDef.h
@@ -76,6 +76,7 @@ typedef enum {
MND_OPER_DROP_TOPIC,
MND_OPER_CREATE_VIEW,
MND_OPER_DROP_VIEW,
+ MND_OPER_CONFIG_CLUSTER,
} EOperType;
typedef enum {
@@ -204,6 +205,7 @@ typedef struct {
int32_t numOfVnodes;
int32_t numOfOtherNodes;
int32_t numOfSupportVnodes;
+ int32_t numOfDiskCfg;
float numOfCores;
int64_t memTotal;
int64_t memAvail;
@@ -214,6 +216,7 @@ typedef struct {
char ep[TSDB_EP_LEN];
char active[TSDB_ACTIVE_KEY_LEN];
char connActive[TSDB_CONN_ACTIVE_KEY_LEN];
+ char machineId[TSDB_MACHINE_ID_LEN + 1];
} SDnodeObj;
typedef struct {
@@ -753,6 +756,77 @@ typedef struct {
SArray* compactDetail;
} SCompactObj;
+// SGrantLogObj
+typedef enum {
+ GRANT_STATE_INIT = 0,
+ GRANT_STATE_UNGRANTED = 1,
+ GRANT_STATE_GRANTED = 2,
+ GRANT_STATE_EXPIRED = 3,
+ GRANT_STATE_REVOKED = 4,
+ GRANT_STATE_MAX,
+} EGrantState;
+
+typedef enum {
+ GRANT_STATE_REASON_INIT = 0,
+ GRANT_STATE_REASON_ALTER = 1, // alter activeCode 'revoked' or 'xxx'
+ GRANT_STATE_REASON_MISMATCH = 2, // dnode machine mismatch
+ GRANT_STATE_REASON_EXPIRE = 3, // expire
+ GRANT_STATE_REASON_MAX,
+} EGrantStateReason;
+
+#define GRANT_STATE_NUM 30
+#define GRANT_ACTIVE_NUM 10
+#define GRANT_ACTIVE_HEAD_LEN 30
+
+typedef struct {
+ union {
+ int64_t u0;
+ struct {
+ int64_t ts : 40;
+ int64_t lastState : 4;
+ int64_t state : 4;
+ int64_t reason : 8;
+ int64_t reserve : 8;
+ };
+ };
+} SGrantState;
+
+typedef struct {
+ union {
+ int64_t u0;
+ struct {
+ int64_t ts : 40;
+ int64_t reserve : 24;
+ };
+ };
+ char active[GRANT_ACTIVE_HEAD_LEN + 1];
+} SGrantActive;
+
+typedef struct {
+ union {
+ int64_t u0;
+ struct {
+ int64_t ts : 40;
+ int64_t id : 24;
+ };
+ };
+ char machine[TSDB_MACHINE_ID_LEN + 1];
+} SGrantMachine;
+
+typedef struct {
+ int32_t id;
+ int8_t nStates;
+ int8_t nActives;
+ int64_t createTime;
+ int64_t updateTime;
+ int64_t upgradeTime;
+ SGrantState states[GRANT_STATE_NUM];
+ SGrantActive actives[GRANT_ACTIVE_NUM];
+ char* active;
+ SArray* pMachines; // SGrantMachine
+ SRWLatch lock;
+} SGrantLogObj;
+
#ifdef __cplusplus
}
#endif
diff --git a/source/dnode/mnode/impl/inc/mndGrant.h b/source/dnode/mnode/impl/inc/mndGrant.h
index 88f118cb8f..82b3260860 100644
--- a/source/dnode/mnode/impl/inc/mndGrant.h
+++ b/source/dnode/mnode/impl/inc/mndGrant.h
@@ -13,8 +13,8 @@
* along with this program. If not, see .
*/
-#ifndef TDENGINE_GTANT_H
-#define TDENGINE_GTANT_H
+#ifndef _TD_MND_GRANT_H_
+#define _TD_MND_GRANT_H_
#ifdef __cplusplus
"C" {
@@ -29,6 +29,26 @@
void grantAdd(EGrantType grant, uint64_t value);
void grantRestore(EGrantType grant, uint64_t value);
+#ifdef TD_ENTERPRISE
+ SSdbRaw *mndGrantActionEncode(SGrantLogObj * pGrant);
+ SSdbRow *mndGrantActionDecode(SSdbRaw * pRaw);
+ int32_t mndGrantActionInsert(SSdb * pSdb, SGrantLogObj * pGrant);
+ int32_t mndGrantActionDelete(SSdb * pSdb, SGrantLogObj * pGrant);
+ int32_t mndGrantActionUpdate(SSdb * pSdb, SGrantLogObj * pOldGrant, SGrantLogObj * pNewGrant);
+
+#ifdef TD_UNIQ_GRANT
+ int32_t grantAlterActiveCode(SMnode * pMnode, SGrantLogObj * pObj, const char *oldActive, const char *newActive,
+ char **mergeActive);
+#endif
+
+ int32_t mndProcessConfigGrantReq(SMnode * pMnode, SRpcMsg * pReq, SMCfgClusterReq * pCfg);
+ int32_t mndProcessUpdGrantLog(SMnode * pMnode, SRpcMsg * pReq, SArray * pMachines, SGrantState * pState);
+
+ int32_t mndGrantGetLastState(SMnode * pMnode, SGrantState * pState);
+ SGrantLogObj *mndAcquireGrant(SMnode * pMnode, void **ppIter);
+ void mndReleaseGrant(SMnode * pMnode, SGrantLogObj * pGrant, void *pIter);
+#endif
+
#ifdef __cplusplus
}
#endif
diff --git a/source/dnode/mnode/impl/inc/mndPrivilege.h b/source/dnode/mnode/impl/inc/mndPrivilege.h
index 4a8fb20715..6f74ea3b36 100644
--- a/source/dnode/mnode/impl/inc/mndPrivilege.h
+++ b/source/dnode/mnode/impl/inc/mndPrivilege.h
@@ -30,7 +30,6 @@ int32_t mndCheckDbPrivilege(SMnode *pMnode, const char *user, EOperType operType
int32_t mndCheckDbPrivilegeByName(SMnode *pMnode, const char *user, EOperType operType, const char *dbname);
int32_t mndCheckViewPrivilege(SMnode *pMnode, const char *user, EOperType operType, const char *pViewFName);
int32_t mndCheckTopicPrivilege(SMnode *pMnode, const char *user, EOperType operType, SMqTopicObj *pTopic);
-int32_t mndCheckTopicPrivilegeByName(SMnode *pMnode, const char *user, EOperType operType, const char *topicName);
int32_t mndCheckShowPrivilege(SMnode *pMnode, const char *user, EShowType showType, const char *dbname);
int32_t mndCheckAlterUserPrivilege(SUserObj *pOperUser, SUserObj *pUser, SAlterUserReq *pAlter);
int32_t mndSetUserAuthRsp(SMnode *pMnode, SUserObj *pUser, SGetUserAuthRsp *pRsp);
diff --git a/source/dnode/mnode/impl/inc/mndScheduler.h b/source/dnode/mnode/impl/inc/mndScheduler.h
index cba52c6b45..3c51f34fee 100644
--- a/source/dnode/mnode/impl/inc/mndScheduler.h
+++ b/source/dnode/mnode/impl/inc/mndScheduler.h
@@ -27,7 +27,7 @@ int32_t mndSchedInitSubEp(SMnode* pMnode, const SMqTopicObj* pTopic, SMqSubscrib
int32_t mndConvertRsmaTask(char** pDst, int32_t* pDstLen, const char* ast, int64_t uid, int8_t triggerType,
int64_t watermark, int64_t deleteMark);
-int32_t mndScheduleStream(SMnode* pMnode, SStreamObj* pStream, int64_t nextWindowSkey);
+int32_t mndScheduleStream(SMnode* pMnode, SStreamObj* pStream, int64_t skey, SArray* pVerList);
#ifdef __cplusplus
}
diff --git a/source/dnode/mnode/impl/inc/mndStream.h b/source/dnode/mnode/impl/inc/mndStream.h
index d884227249..372612274f 100644
--- a/source/dnode/mnode/impl/inc/mndStream.h
+++ b/source/dnode/mnode/impl/inc/mndStream.h
@@ -26,9 +26,17 @@ extern "C" {
#define MND_STREAM_RESERVE_SIZE 64
#define MND_STREAM_VER_NUMBER 4
+#define MND_STREAM_CREATE_NAME "stream-create"
+#define MND_STREAM_CHECKPOINT_NAME "stream-checkpoint"
+#define MND_STREAM_PAUSE_NAME "stream-pause"
+#define MND_STREAM_RESUME_NAME "stream-resume"
+#define MND_STREAM_DROP_NAME "stream-drop"
+#define MND_STREAM_TASK_RESET_NAME "stream-task-reset"
+#define MND_STREAM_TASK_UPDATE_NAME "stream-task-update"
+
typedef struct SStreamTransInfo {
int64_t startTime;
- int64_t streamUid;
+ int64_t streamId;
const char *name;
int32_t transId;
} SStreamTransInfo;
@@ -41,7 +49,7 @@ typedef struct SVgroupChangeInfo {
// time to generated the checkpoint, if now() - checkpointTs >= tsCheckpointInterval, this checkpoint will be discard
// to avoid too many checkpoints for a taskk in the waiting list
typedef struct SCheckpointCandEntry {
- char * pName;
+ char *pName;
int64_t streamId;
int64_t checkpointTs;
int64_t checkpointId;
@@ -62,6 +70,9 @@ typedef struct SStreamExecInfo {
SHashObj *pTransferStateStreams;
} SStreamExecInfo;
+extern SStreamExecInfo execInfo;
+typedef struct SStreamTaskIter SStreamTaskIter;
+
typedef struct SNodeEntry {
int32_t nodeId;
bool stageUpdated; // the stage has been updated due to the leader/follower change or node reboot.
@@ -69,15 +80,11 @@ typedef struct SNodeEntry {
int64_t hbTimestamp; // second
} SNodeEntry;
-#define MND_STREAM_CREATE_NAME "stream-create"
-#define MND_STREAM_CHECKPOINT_NAME "stream-checkpoint"
-#define MND_STREAM_PAUSE_NAME "stream-pause"
-#define MND_STREAM_RESUME_NAME "stream-resume"
-#define MND_STREAM_DROP_NAME "stream-drop"
-#define MND_STREAM_TASK_RESET_NAME "stream-task-reset"
-#define MND_STREAM_TASK_UPDATE_NAME "stream-task-update"
-
-extern SStreamExecInfo execInfo;
+typedef struct SOrphanTask {
+ int64_t streamId;
+ int32_t taskId;
+ int32_t nodeId;
+} SOrphanTask;
int32_t mndInitStream(SMnode *pMnode);
void mndCleanupStream(SMnode *pMnode);
@@ -85,41 +92,38 @@ SStreamObj *mndAcquireStream(SMnode *pMnode, char *streamName);
void mndReleaseStream(SMnode *pMnode, SStreamObj *pStream);
int32_t mndDropStreamByDb(SMnode *pMnode, STrans *pTrans, SDbObj *pDb);
int32_t mndPersistStream(STrans *pTrans, SStreamObj *pStream);
+int32_t mndStreamRegisterTrans(STrans *pTrans, const char *pTransName, int64_t streamId);
+int32_t mndAddtoCheckpointWaitingList(SStreamObj *pStream, int64_t checkpointId);
+bool mndStreamTransConflictCheck(SMnode *pMnode, int64_t streamId, const char *pTransName, bool lock);
+int32_t mndStreamGetRelTrans(SMnode *pMnode, int64_t streamId);
-int32_t mndStreamRegisterTrans(STrans* pTrans, const char* pTransName, int64_t streamUid);
-int32_t mndAddtoCheckpointWaitingList(SStreamObj *pStream, int64_t checkpointId);
-bool mndStreamTransConflictCheck(SMnode *pMnode, int64_t streamUid, const char *pTransName, bool lock);
-int32_t mndStreamGetRelTrans(SMnode *pMnode, int64_t streamUid);
-
-typedef struct SOrphanTask {
- int64_t streamId;
- int32_t taskId;
- int32_t nodeId;
-} SOrphanTask;
-
-// for sma
-// TODO refactor
-int32_t mndGetNumOfStreams(SMnode *pMnode, char *dbName, int32_t *pNumOfStreams);
-int32_t mndGetNumOfStreamTasks(const SStreamObj *pStream);
-SArray *mndTakeVgroupSnapshot(SMnode *pMnode, bool *allReady);
-void mndKillTransImpl(SMnode *pMnode, int32_t transId, const char *pDbName);
-int32_t setTransAction(STrans *pTrans, void *pCont, int32_t contLen, int32_t msgType, const SEpSet *pEpset,
- int32_t retryCode);
-STrans *doCreateTrans(SMnode *pMnode, SStreamObj *pStream, SRpcMsg *pReq, const char *name, const char *pMsg);
-int32_t mndPersistTransLog(SStreamObj *pStream, STrans *pTrans, int32_t status);
-SSdbRaw *mndStreamActionEncode(SStreamObj *pStream);
-void killAllCheckpointTrans(SMnode *pMnode, SVgroupChangeInfo *pChangeInfo);
-int32_t mndStreamSetUpdateEpsetAction(SStreamObj *pStream, SVgroupChangeInfo *pInfo, STrans *pTrans);
+int32_t mndGetNumOfStreams(SMnode *pMnode, char *dbName, int32_t *pNumOfStreams);
+int32_t mndGetNumOfStreamTasks(const SStreamObj *pStream);
+SArray *mndTakeVgroupSnapshot(SMnode *pMnode, bool *allReady);
+void mndKillTransImpl(SMnode *pMnode, int32_t transId, const char *pDbName);
+int32_t setTransAction(STrans *pTrans, void *pCont, int32_t contLen, int32_t msgType, const SEpSet *pEpset,
+ int32_t retryCode);
+STrans *doCreateTrans(SMnode *pMnode, SStreamObj *pStream, SRpcMsg *pReq, const char *name, const char *pMsg);
+int32_t mndPersistTransLog(SStreamObj *pStream, STrans *pTrans, int32_t status);
+SSdbRaw *mndStreamActionEncode(SStreamObj *pStream);
+void killAllCheckpointTrans(SMnode *pMnode, SVgroupChangeInfo *pChangeInfo);
+int32_t mndStreamSetUpdateEpsetAction(SStreamObj *pStream, SVgroupChangeInfo *pInfo, STrans *pTrans);
SStreamObj *mndGetStreamObj(SMnode *pMnode, int64_t streamId);
int32_t extractNodeEpset(SMnode *pMnode, SEpSet *pEpSet, bool *hasEpset, int32_t taskId, int32_t nodeId);
int32_t mndProcessStreamHb(SRpcMsg *pReq);
void saveStreamTasksInfo(SStreamObj *pStream, SStreamExecInfo *pExecNode);
int32_t initStreamNodeList(SMnode *pMnode);
-int32_t mndStreamSetResumeAction(STrans *pTrans, SMnode *pMnode, SStreamObj* pStream, int8_t igUntreated);
+int32_t mndStreamSetResumeAction(STrans *pTrans, SMnode *pMnode, SStreamObj *pStream, int8_t igUntreated);
int32_t mndStreamSetPauseAction(SMnode *pMnode, STrans *pTrans, SStreamObj *pStream);
int32_t mndStreamSetDropAction(SMnode *pMnode, STrans *pTrans, SStreamObj *pStream);
int32_t mndStreamSetDropActionFromList(SMnode *pMnode, STrans *pTrans, SArray *pList);
+int32_t mndStreamSetResetTaskAction(SMnode *pMnode, STrans *pTrans, SStreamObj *pStream);
+
+SStreamTaskIter *createStreamTaskIter(SStreamObj *pStream);
+void destroyStreamTaskIter(SStreamTaskIter *pIter);
+bool streamTaskIterNextTask(SStreamTaskIter *pIter);
+SStreamTask *streamTaskIterGetCurrent(SStreamTaskIter *pIter);
#ifdef __cplusplus
}
diff --git a/source/dnode/mnode/impl/src/mndCluster.c b/source/dnode/mnode/impl/src/mndCluster.c
index 4c799e1e1e..1a55a161bf 100644
--- a/source/dnode/mnode/impl/src/mndCluster.c
+++ b/source/dnode/mnode/impl/src/mndCluster.c
@@ -14,7 +14,10 @@
*/
#define _DEFAULT_SOURCE
+#include "audit.h"
#include "mndCluster.h"
+#include "mndGrant.h"
+#include "mndPrivilege.h"
#include "mndShow.h"
#include "mndTrans.h"
@@ -31,6 +34,8 @@ static int32_t mndCreateDefaultCluster(SMnode *pMnode);
static int32_t mndRetrieveClusters(SRpcMsg *pMsg, SShowObj *pShow, SSDataBlock *pBlock, int32_t rows);
static void mndCancelGetNextCluster(SMnode *pMnode, void *pIter);
static int32_t mndProcessUptimeTimer(SRpcMsg *pReq);
+static int32_t mndProcessConfigClusterReq(SRpcMsg *pReq);
+static int32_t mndProcessConfigClusterRsp(SRpcMsg *pReq);
int32_t mndInitCluster(SMnode *pMnode) {
SSdbTable table = {
@@ -45,6 +50,8 @@ int32_t mndInitCluster(SMnode *pMnode) {
};
mndSetMsgHandle(pMnode, TDMT_MND_UPTIME_TIMER, mndProcessUptimeTimer);
+ mndSetMsgHandle(pMnode, TDMT_MND_CONFIG_CLUSTER, mndProcessConfigClusterReq);
+ mndSetMsgHandle(pMnode, TDMT_MND_CONFIG_CLUSTER_RSP, mndProcessConfigClusterRsp);
mndAddShowRetrieveHandle(pMnode, TSDB_MGMT_TABLE_CLUSTER, mndRetrieveClusters);
mndAddShowFreeIterHandle(pMnode, TSDB_MGMT_TABLE_CLUSTER, mndCancelGetNextCluster);
@@ -147,6 +154,7 @@ static SSdbRaw *mndClusterActionEncode(SClusterObj *pCluster) {
SDB_SET_BINARY(pRaw, dataPos, pCluster->name, TSDB_CLUSTER_ID_LEN, _OVER)
SDB_SET_INT32(pRaw, dataPos, pCluster->upTime, _OVER)
SDB_SET_RESERVE(pRaw, dataPos, CLUSTER_RESERVE_SIZE, _OVER)
+ SDB_SET_DATALEN(pRaw, dataPos, _OVER);
terrno = 0;
@@ -164,7 +172,7 @@ _OVER:
static SSdbRow *mndClusterActionDecode(SSdbRaw *pRaw) {
terrno = TSDB_CODE_OUT_OF_MEMORY;
SClusterObj *pCluster = NULL;
- SSdbRow *pRow = NULL;
+ SSdbRow *pRow = NULL;
int8_t sver = 0;
if (sdbGetRawSoftVer(pRaw, &sver) != 0) goto _OVER;
@@ -359,3 +367,62 @@ static int32_t mndProcessUptimeTimer(SRpcMsg *pReq) {
mndTransDrop(pTrans);
return 0;
}
+
+int32_t mndProcessConfigClusterReq(SRpcMsg *pReq) {
+ int32_t code = 0;
+ SMnode *pMnode = pReq->info.node;
+ SMCfgClusterReq cfgReq = {0};
+ if (tDeserializeSMCfgClusterReq(pReq->pCont, pReq->contLen, &cfgReq) != 0) {
+ terrno = TSDB_CODE_INVALID_MSG;
+ return -1;
+ }
+
+ mInfo("cluster: start to config, option:%s, value:%s", cfgReq.config, cfgReq.value);
+ if (mndCheckOperPrivilege(pMnode, pReq->info.conn.user, MND_OPER_CONFIG_CLUSTER) != 0) {
+ code = terrno != 0 ? terrno : TSDB_CODE_MND_NO_RIGHTS;
+ goto _exit;
+ }
+
+ SClusterObj clusterObj = {0};
+ void *pIter = NULL;
+ SClusterObj *pCluster = mndAcquireCluster(pMnode, &pIter);
+ if (!pCluster || pCluster->id <= 0) {
+ code = TSDB_CODE_APP_IS_STARTING;
+ if (pCluster) mndReleaseCluster(pMnode, pCluster, pIter);
+ goto _exit;
+ }
+ memcpy(&clusterObj, pCluster, sizeof(SClusterObj));
+ mndReleaseCluster(pMnode, pCluster, pIter);
+
+ if (strncmp(cfgReq.config, GRANT_ACTIVE_CODE, TSDB_DNODE_CONFIG_LEN) == 0) {
+#ifdef TD_ENTERPRISE
+ if (0 != (code = mndProcessConfigGrantReq(pMnode, pReq, &cfgReq))) {
+ goto _exit;
+ }
+#else
+ code = TSDB_CODE_OPS_NOT_SUPPORT;
+ goto _exit;
+#endif
+ } else {
+ code = TSDB_CODE_OPS_NOT_SUPPORT;
+ goto _exit;
+ }
+
+ { // audit
+ auditRecord(pReq, pMnode->clusterId, "alterCluster", "", "", cfgReq.sql, cfgReq.sqlLen);
+ }
+_exit:
+ tFreeSMCfgClusterReq(&cfgReq);
+ if (code != 0) {
+ terrno = code;
+ mError("cluster: failed to config:%s %s since %s", cfgReq.config, cfgReq.value, terrstr());
+ } else {
+ mInfo("cluster: success to config:%s %s", cfgReq.config, cfgReq.value);
+ }
+ return code;
+}
+
+int32_t mndProcessConfigClusterRsp(SRpcMsg *pRsp) {
+ mInfo("config rsp from cluster");
+ return 0;
+}
\ No newline at end of file
diff --git a/source/dnode/mnode/impl/src/mndCompact.c b/source/dnode/mnode/impl/src/mndCompact.c
index 101022a44f..4e71684372 100644
--- a/source/dnode/mnode/impl/src/mndCompact.c
+++ b/source/dnode/mnode/impl/src/mndCompact.c
@@ -599,7 +599,8 @@ static int32_t mndSaveCompactProgress(SMnode *pMnode, int32_t compactId) {
pDetail->compactId, pDetail->vgId, pDetail->dnodeId, pDetail->numberFileset, pDetail->finished,
pDetail->newNumberFileset, pDetail->newFinished);
- if(pDetail->numberFileset < pDetail->newNumberFileset || pDetail->finished < pDetail->newFinished)
+ //these 2 number will jump back after dnode restart, so < is not used here
+ if(pDetail->numberFileset != pDetail->newNumberFileset || pDetail->finished != pDetail->newFinished)
needSave = true;
}
diff --git a/source/dnode/mnode/impl/src/mndConsumer.c b/source/dnode/mnode/impl/src/mndConsumer.c
index 4db000287c..3ce548a4f6 100644
--- a/source/dnode/mnode/impl/src/mndConsumer.c
+++ b/source/dnode/mnode/impl/src/mndConsumer.c
@@ -102,7 +102,13 @@ static int32_t validateTopics(STrans *pTrans, const SArray *pTopicList, SMnode *
}
if (mndCheckTopicPrivilege(pMnode, pUser, MND_OPER_SUBSCRIBE, pTopic) != 0) {
- code = -1;
+ code = TSDB_CODE_MND_NO_RIGHTS;
+ terrno = TSDB_CODE_MND_NO_RIGHTS;
+ goto FAILED;
+ }
+
+ if ((terrno = grantCheck(TSDB_GRANT_SUBSCRIPTION)) < 0) {
+ code = terrno;
goto FAILED;
}
@@ -220,22 +226,53 @@ FAIL:
return -1;
}
+static int32_t checkPrivilege(SMnode *pMnode, SMqConsumerObj *pConsumer, SMqHbRsp *rsp, char* user){
+ rsp->topicPrivileges = taosArrayInit(taosArrayGetSize(pConsumer->currentTopics), sizeof(STopicPrivilege));
+ if(rsp->topicPrivileges == NULL){
+ terrno = TSDB_CODE_OUT_OF_MEMORY;
+ return terrno;
+ }
+ for(int32_t i = 0; i < taosArrayGetSize(pConsumer->currentTopics); i++){
+ char *topic = taosArrayGetP(pConsumer->currentTopics, i);
+ SMqTopicObj* pTopic = mndAcquireTopic(pMnode, topic);
+ if (pTopic == NULL) { // terrno has been set by callee function
+ continue;
+ }
+ STopicPrivilege *data = taosArrayReserve(rsp->topicPrivileges, 1);
+ strcpy(data->topic, topic);
+ if (mndCheckTopicPrivilege(pMnode, user, MND_OPER_SUBSCRIBE, pTopic) != 0 || grantCheck(TSDB_GRANT_SUBSCRIPTION) < 0) {
+ data->noPrivilege = 1;
+ } else{
+ data->noPrivilege = 0;
+ }
+ mndReleaseTopic(pMnode, pTopic);
+ }
+ return 0;
+}
+
static int32_t mndProcessMqHbReq(SRpcMsg *pMsg) {
int32_t code = 0;
SMnode *pMnode = pMsg->info.node;
SMqHbReq req = {0};
+ SMqHbRsp rsp = {0};
+ SMqConsumerObj *pConsumer = NULL;
- if ((code = tDeserializeSMqHbReq(pMsg->pCont, pMsg->contLen, &req)) < 0) {
+ if (tDeserializeSMqHbReq(pMsg->pCont, pMsg->contLen, &req) < 0) {
terrno = TSDB_CODE_OUT_OF_MEMORY;
+ code = TSDB_CODE_OUT_OF_MEMORY;
goto end;
}
int64_t consumerId = req.consumerId;
- SMqConsumerObj *pConsumer = mndAcquireConsumer(pMnode, consumerId);
+ pConsumer = mndAcquireConsumer(pMnode, consumerId);
if (pConsumer == NULL) {
mError("consumer:0x%" PRIx64 " not exist", consumerId);
terrno = TSDB_CODE_MND_CONSUMER_NOT_EXIST;
- code = -1;
+ code = TSDB_CODE_MND_CONSUMER_NOT_EXIST;
+ goto end;
+ }
+ code = checkPrivilege(pMnode, pConsumer, &rsp, pMsg->info.conn.user);
+ if(code != 0){
goto end;
}
@@ -280,9 +317,22 @@ static int32_t mndProcessMqHbReq(SRpcMsg *pMsg) {
mndReleaseSubscribe(pMnode, pSub);
}
- mndReleaseConsumer(pMnode, pConsumer);
+ // encode rsp
+ int32_t tlen = tSerializeSMqHbRsp(NULL, 0, &rsp);
+ void *buf = rpcMallocCont(tlen);
+ if (buf == NULL) {
+ terrno = TSDB_CODE_OUT_OF_MEMORY;
+ code = TSDB_CODE_OUT_OF_MEMORY;
+ goto end;
+ }
+
+ tSerializeSMqHbRsp(buf, tlen, &rsp);
+ pMsg->info.rsp = buf;
+ pMsg->info.rspLen = tlen;
end:
+ tDeatroySMqHbRsp(&rsp);
+ mndReleaseConsumer(pMnode, pConsumer);
tDeatroySMqHbReq(&req);
return code;
}
@@ -499,6 +549,12 @@ static void freeItem(void *param) {
int32_t mndProcessSubscribeReq(SRpcMsg *pMsg) {
SMnode *pMnode = pMsg->info.node;
char *msgStr = pMsg->pCont;
+ int32_t code = -1;
+
+ if ((terrno = grantCheck(TSDB_GRANT_SUBSCRIPTION)) < 0) {
+ code = terrno;
+ return code;
+ }
SCMSubscribeReq subscribe = {0};
tDeserializeSCMSubscribeReq(msgStr, &subscribe);
@@ -509,7 +565,7 @@ int32_t mndProcessSubscribeReq(SRpcMsg *pMsg) {
SMqConsumerObj *pConsumerNew = NULL;
STrans *pTrans = NULL;
- int32_t code = -1;
+
SArray *pTopicList = subscribe.topicNames;
taosArraySort(pTopicList, taosArrayCompareString);
taosArrayRemoveDuplicate(pTopicList, taosArrayCompareString, freeItem);
@@ -525,7 +581,7 @@ int32_t mndProcessSubscribeReq(SRpcMsg *pMsg) {
}
// check topic existence
- pTrans = mndTransCreate(pMnode, TRN_POLICY_RETRY, TRN_CONFLICT_NOTHING, pMsg, "subscribe");
+ pTrans = mndTransCreate(pMnode, TRN_POLICY_RETRY, TRN_CONFLICT_TOPIC_INSIDE, pMsg, "subscribe");
if (pTrans == NULL) {
goto _over;
}
diff --git a/source/dnode/mnode/impl/src/mndDnode.c b/source/dnode/mnode/impl/src/mndDnode.c
index 6585e70533..f4a712e85f 100644
--- a/source/dnode/mnode/impl/src/mndDnode.c
+++ b/source/dnode/mnode/impl/src/mndDnode.c
@@ -136,6 +136,16 @@ static int32_t mndCreateDefaultDnode(SMnode *pMnode) {
tstrncpy(dnodeObj.fqdn, tsLocalFqdn, TSDB_FQDN_LEN);
dnodeObj.fqdn[TSDB_FQDN_LEN - 1] = 0;
snprintf(dnodeObj.ep, TSDB_EP_LEN - 1, "%s:%u", tsLocalFqdn, tsServerPort);
+ char *machineId = tGetMachineId();
+ if (machineId) {
+ memcpy(dnodeObj.machineId, machineId, TSDB_MACHINE_ID_LEN);
+ taosMemoryFreeClear(machineId);
+ } else {
+#ifdef TD_UNIQ_GRANT
+ terrno = TSDB_CODE_DNODE_NO_MACHINE_CODE;
+ goto _OVER;
+#endif
+ }
pTrans = mndTransCreate(pMnode, TRN_POLICY_RETRY, TRN_CONFLICT_GLOBAL, NULL, "create-dnode");
if (pTrans == NULL) goto _OVER;
@@ -402,6 +412,7 @@ void mndGetDnodeData(SMnode *pMnode, SArray *pDnodeInfo) {
tstrncpy(dInfo.ep.fqdn, pDnode->fqdn, TSDB_FQDN_LEN);
tstrncpy(dInfo.active, pDnode->active, TSDB_ACTIVE_KEY_LEN);
tstrncpy(dInfo.connActive, pDnode->connActive, TSDB_CONN_ACTIVE_KEY_LEN);
+ tstrncpy(dInfo.machineId, pDnode->machineId, TSDB_MACHINE_ID_LEN + 1);
sdbRelease(pSdb, pDnode);
if (mndIsMnode(pMnode, pDnode->id)) {
dInfo.isMnode = 1;
@@ -657,8 +668,12 @@ static int32_t mndProcessStatusReq(SRpcMsg *pReq) {
pDnode->rebootTime = statusReq.rebootTime;
pDnode->numOfCores = statusReq.numOfCores;
pDnode->numOfSupportVnodes = statusReq.numOfSupportVnodes;
+ pDnode->numOfDiskCfg = statusReq.numOfDiskCfg;
pDnode->memAvail = statusReq.memAvail;
pDnode->memTotal = statusReq.memTotal;
+ if (pDnode->machineId[0] == 0 && statusReq.machineId[0] != 0) {
+ tstrncpy(pDnode->machineId, statusReq.machineId, TSDB_MACHINE_ID_LEN + 1);
+ }
SStatusRsp statusRsp = {0};
statusRsp.statusSeq++;
@@ -761,109 +776,6 @@ _OVER:
return code;
}
-static int32_t mndConfigDnode(SMnode *pMnode, SRpcMsg *pReq, SMCfgDnodeReq *pCfgReq, int8_t action) {
- SSdbRaw *pRaw = NULL;
- STrans *pTrans = NULL;
- SDnodeObj *pDnode = NULL;
- SArray *failRecord = NULL;
- bool cfgAll = pCfgReq->dnodeId == -1;
- int32_t cfgAllErr = 0;
- int32_t iter = 0;
-
- SSdb *pSdb = pMnode->pSdb;
- void *pIter = NULL;
- while (1) {
- if (cfgAll) {
- pIter = sdbFetch(pSdb, SDB_DNODE, pIter, (void **)&pDnode);
- if (pIter == NULL) break;
- ++iter;
- } else if (!(pDnode = mndAcquireDnode(pMnode, pCfgReq->dnodeId))) {
- goto _OVER;
- }
-
- SDnodeObj tmpDnode = *pDnode;
- if (action == DND_ACTIVE_CODE) {
- if (grantAlterActiveCode(pDnode->id, pDnode->active, pCfgReq->value, tmpDnode.active, 0) != 0) {
- if (TSDB_CODE_DUP_KEY != terrno) {
- mError("dnode:%d, config dnode:%d, app:%p config:%s value:%s failed since %s", pDnode->id, pCfgReq->dnodeId,
- pReq->info.ahandle, pCfgReq->config, pCfgReq->value, terrstr());
- if (cfgAll) { // alter all dnodes:
- if (!failRecord) failRecord = taosArrayInit(1, sizeof(int32_t));
- if (failRecord) taosArrayPush(failRecord, &pDnode->id);
- if (0 == cfgAllErr) cfgAllErr = terrno; // output 1st terrno.
- }
- } else {
- terrno = 0; // no action for dup active code
- }
- if (cfgAll) continue;
- goto _OVER;
- }
- } else if (action == DND_CONN_ACTIVE_CODE) {
- if (grantAlterActiveCode(pDnode->id, pDnode->connActive, pCfgReq->value, tmpDnode.connActive, 1) != 0) {
- if (TSDB_CODE_DUP_KEY != terrno) {
- mError("dnode:%d, config dnode:%d, app:%p config:%s value:%s failed since %s", pDnode->id, pCfgReq->dnodeId,
- pReq->info.ahandle, pCfgReq->config, pCfgReq->value, terrstr());
- if (cfgAll) {
- if (!failRecord) failRecord = taosArrayInit(1, sizeof(int32_t));
- if (failRecord) taosArrayPush(failRecord, &pDnode->id);
- if (0 == cfgAllErr) cfgAllErr = terrno;
- }
- } else {
- terrno = 0;
- }
- if (cfgAll) continue;
- goto _OVER;
- }
- } else {
- terrno = TSDB_CODE_INVALID_CFG;
- goto _OVER;
- }
-
- if (!pTrans) {
- pTrans = mndTransCreate(pMnode, TRN_POLICY_RETRY, TRN_CONFLICT_GLOBAL, pReq, "config-dnode");
- if (!pTrans) goto _OVER;
- if (mndTrancCheckConflict(pMnode, pTrans) != 0) goto _OVER;
- }
-
- pRaw = mndDnodeActionEncode(&tmpDnode);
- if (pRaw == NULL || mndTransAppendCommitlog(pTrans, pRaw) != 0) goto _OVER;
- (void)sdbSetRawStatus(pRaw, SDB_STATUS_READY);
- pRaw = NULL;
-
- mInfo("dnode:%d, config dnode:%d, app:%p config:%s value:%s", pDnode->id, pCfgReq->dnodeId, pReq->info.ahandle,
- pCfgReq->config, pCfgReq->value);
-
- if (cfgAll) {
- sdbRelease(pSdb, pDnode);
- pDnode = NULL;
- } else {
- break;
- }
- }
-
- if (pTrans && mndTransPrepare(pMnode, pTrans) != 0) goto _OVER;
- tsGrantHBInterval = TMIN(TMAX(5, iter / 2), 30);
- terrno = 0;
-
-_OVER:
- if (cfgAll) {
- sdbRelease(pSdb, pDnode);
- if (cfgAllErr != 0) terrno = cfgAllErr;
- int32_t nFail = taosArrayGetSize(failRecord);
- if (nFail > 0) {
- mError("config dnode, cfg:%d, app:%p config:%s value:%s. total:%d, fail:%d", pCfgReq->dnodeId, pReq->info.ahandle,
- pCfgReq->config, pCfgReq->value, iter, nFail);
- }
- } else {
- mndReleaseDnode(pMnode, pDnode);
- }
- sdbCancelFetch(pSdb, pIter);
- mndTransDrop(pTrans);
- sdbFreeRaw(pRaw);
- taosArrayDestroy(failRecord);
- return terrno;
-}
-
static int32_t mndProcessDnodeListReq(SRpcMsg *pReq) {
SMnode *pMnode = pReq->info.node;
SSdb *pSdb = pMnode->pSdb;
@@ -1013,8 +925,10 @@ static int32_t mndProcessCreateDnodeReq(SRpcMsg *pReq) {
}
code = mndCreateDnode(pMnode, pReq, &createReq);
- if (code == 0) code = TSDB_CODE_ACTION_IN_PROGRESS;
- tsGrantHBInterval = 5;
+ if (code == 0) {
+ code = TSDB_CODE_ACTION_IN_PROGRESS;
+ tsGrantHBInterval = 5;
+ }
char obj[200] = {0};
sprintf(obj, "%s:%d", createReq.fqdn, createReq.port);
@@ -1310,34 +1224,6 @@ static int32_t mndProcessConfigDnodeReq(SRpcMsg *pReq) {
strcpy(dcfgReq.config, "supportvnodes");
snprintf(dcfgReq.value, TSDB_DNODE_VALUE_LEN, "%d", flag);
- } else if (strncasecmp(cfgReq.config, "activeCode", 10) == 0 || strncasecmp(cfgReq.config, "cActiveCode", 11) == 0) {
- int8_t opt = strncasecmp(cfgReq.config, "a", 1) == 0 ? DND_ACTIVE_CODE : DND_CONN_ACTIVE_CODE;
- int8_t index = opt == DND_ACTIVE_CODE ? 10 : 11;
- if (' ' != cfgReq.config[index] && 0 != cfgReq.config[index]) {
- mError("dnode:%d, failed to config activeCode since invalid conf:%s", cfgReq.dnodeId, cfgReq.config);
- terrno = TSDB_CODE_INVALID_CFG;
- goto _err_out;
- }
- int32_t vlen = strlen(cfgReq.value);
- if (vlen > 0 && ((opt == DND_ACTIVE_CODE && vlen != (TSDB_ACTIVE_KEY_LEN - 1)) ||
- (opt == DND_CONN_ACTIVE_CODE &&
- (vlen > (TSDB_CONN_ACTIVE_KEY_LEN - 1) || vlen < (TSDB_ACTIVE_KEY_LEN - 1))))) {
- mError("dnode:%d, failed to config activeCode since invalid vlen:%d. conf:%s, val:%s", cfgReq.dnodeId, vlen,
- cfgReq.config, cfgReq.value);
- terrno = TSDB_CODE_INVALID_CFG;
- goto _err_out;
- }
-
- strcpy(dcfgReq.config, opt == DND_ACTIVE_CODE ? "activeCode" : "cActiveCode");
- snprintf(dcfgReq.value, TSDB_DNODE_VALUE_LEN, "%s", cfgReq.value);
-
- if (mndConfigDnode(pMnode, pReq, &cfgReq, opt) != 0) {
- mError("dnode:%d, failed to config activeCode since %s", cfgReq.dnodeId, terrstr());
- terrno = TSDB_CODE_INVALID_CFG;
- goto _err_out;
- }
- tFreeSMCfgDnodeReq(&cfgReq);
- return 0;
} else if (strncasecmp(cfgReq.config, "s3blocksize", 11) == 0) {
int32_t optLen = strlen("s3blocksize");
int32_t flag = -1;
@@ -1497,11 +1383,7 @@ static int32_t mndRetrieveDnodes(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pB
taosMemoryFreeClear(b);
#ifdef TD_ENTERPRISE
- STR_TO_VARSTR(buf, pDnode->active);
- pColInfo = taosArrayGet(pBlock->pDataBlock, cols++);
- colDataSetVal(pColInfo, numOfRows, buf, false);
-
- STR_TO_VARSTR(buf, pDnode->connActive);
+ STR_TO_VARSTR(buf, pDnode->machineId);
pColInfo = taosArrayGet(pBlock->pDataBlock, cols++);
colDataSetVal(pColInfo, numOfRows, buf, false);
#endif
diff --git a/source/dnode/mnode/impl/src/mndGrant.c b/source/dnode/mnode/impl/src/mndGrant.c
index c4e1894263..0b85f8fd5a 100644
--- a/source/dnode/mnode/impl/src/mndGrant.c
+++ b/source/dnode/mnode/impl/src/mndGrant.c
@@ -19,6 +19,15 @@
#ifndef _GRANT
+#define GRANT_ITEM_SHOW(display) \
+ do { \
+ cols++; \
+ pColInfo = taosArrayGet(pBlock->pDataBlock, cols); \
+ src = (display); \
+ STR_WITH_MAXSIZE_TO_VARSTR(tmp, src, 32); \
+ colDataSetVal(pColInfo, numOfRows, tmp, false); \
+ } while (0)
+
static int32_t mndRetrieveGrant(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pBlock, int32_t rows) {
int32_t numOfRows = 0;
int32_t cols = 0;
@@ -31,95 +40,32 @@ static int32_t mndRetrieveGrant(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pBl
STR_WITH_MAXSIZE_TO_VARSTR(tmp, src, 32);
colDataSetVal(pColInfo, numOfRows, tmp, false);
- cols++;
- pColInfo = taosArrayGet(pBlock->pDataBlock, cols);
- src = "unlimited";
- STR_WITH_MAXSIZE_TO_VARSTR(tmp, src, 32);
- colDataSetVal(pColInfo, numOfRows, tmp, false);
+ GRANT_ITEM_SHOW("unlimited");
+ GRANT_ITEM_SHOW("limited");
+ GRANT_ITEM_SHOW("false");
+ GRANT_ITEM_SHOW("ungranted");
+ GRANT_ITEM_SHOW("unlimited");
+ GRANT_ITEM_SHOW("unlimited");
+ GRANT_ITEM_SHOW("unlimited");
- cols++;
- pColInfo = taosArrayGet(pBlock->pDataBlock, cols);
- src = "false";
- STR_WITH_MAXSIZE_TO_VARSTR(tmp, src, 32);
- colDataSetVal(pColInfo, numOfRows, tmp, false);
-
- cols++;
- pColInfo = taosArrayGet(pBlock->pDataBlock, cols);
- src = "unlimited";
- STR_WITH_MAXSIZE_TO_VARSTR(tmp, src, 32);
- colDataSetVal(pColInfo, numOfRows, tmp, false);
-
- cols++;
- pColInfo = taosArrayGet(pBlock->pDataBlock, cols);
- src = "unlimited";
- STR_WITH_MAXSIZE_TO_VARSTR(tmp, src, 32);
- colDataSetVal(pColInfo, numOfRows, tmp, false);
-
- cols++;
- pColInfo = taosArrayGet(pBlock->pDataBlock, cols);
- src = "unlimited";
- STR_WITH_MAXSIZE_TO_VARSTR(tmp, src, 32);
- colDataSetVal(pColInfo, numOfRows, tmp, false);
-
- cols++;
- pColInfo = taosArrayGet(pBlock->pDataBlock, cols);
- src = "unlimited";
- STR_WITH_MAXSIZE_TO_VARSTR(tmp, src, 32);
- colDataSetVal(pColInfo, numOfRows, tmp, false);
-
- cols++;
- pColInfo = taosArrayGet(pBlock->pDataBlock, cols);
- src = "unlimited";
- STR_WITH_MAXSIZE_TO_VARSTR(tmp, src, 32);
- colDataSetVal(pColInfo, numOfRows, tmp, false);
-
- cols++;
- pColInfo = taosArrayGet(pBlock->pDataBlock, cols);
- src = "unlimited";
- STR_WITH_MAXSIZE_TO_VARSTR(tmp, src, 32);
- colDataSetVal(pColInfo, numOfRows, tmp, false);
-
- cols++;
- pColInfo = taosArrayGet(pBlock->pDataBlock, cols);
- src = "unlimited";
- STR_WITH_MAXSIZE_TO_VARSTR(tmp, src, 32);
- colDataSetVal(pColInfo, numOfRows, tmp, false);
-
- cols++;
- pColInfo = taosArrayGet(pBlock->pDataBlock, cols);
- src = "unlimited";
- STR_WITH_MAXSIZE_TO_VARSTR(tmp, src, 32);
- colDataSetVal(pColInfo, numOfRows, tmp, false);
-
- cols++;
- pColInfo = taosArrayGet(pBlock->pDataBlock, cols);
- src = "unlimited";
- STR_WITH_MAXSIZE_TO_VARSTR(tmp, src, 32);
- colDataSetVal(pColInfo, numOfRows, tmp, false);
-
- cols++;
- pColInfo = taosArrayGet(pBlock->pDataBlock, cols);
- src = "unlimited";
- STR_WITH_MAXSIZE_TO_VARSTR(tmp, src, 32);
- colDataSetVal(pColInfo, numOfRows, tmp, false);
-
- cols++;
- pColInfo = taosArrayGet(pBlock->pDataBlock, cols);
- src = "unlimited";
- STR_WITH_MAXSIZE_TO_VARSTR(tmp, src, 32);
- colDataSetVal(pColInfo, numOfRows, tmp, false);
-
- numOfRows++;
+ ++numOfRows;
}
pShow->numOfRows += numOfRows;
return numOfRows;
}
+static int32_t mndRetrieveGrantFull(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pBlock, int32_t rows) { return 0; }
+static int32_t mndRetrieveGrantLogs(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pBlock, int32_t rows) { return 0; }
+static int32_t mndRetrieveMachines(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pBlock, int32_t rows) { return 0; }
+
static int32_t mndProcessGrantHB(SRpcMsg *pReq) { return TSDB_CODE_SUCCESS; }
int32_t mndInitGrant(SMnode *pMnode) {
mndAddShowRetrieveHandle(pMnode, TSDB_MGMT_TABLE_GRANTS, mndRetrieveGrant);
+ mndAddShowRetrieveHandle(pMnode, TSDB_MGMT_TABLE_GRANTS_FULL, mndRetrieveGrantFull);
+ mndAddShowRetrieveHandle(pMnode, TSDB_MGMT_TABLE_GRANTS_LOGS, mndRetrieveGrantLogs);
+ mndAddShowRetrieveHandle(pMnode, TSDB_MGMT_TABLE_MACHINES, mndRetrieveMachines);
mndSetMsgHandle(pMnode, TDMT_MND_GRANT_HB_TIMER, mndProcessGrantHB);
return 0;
}
@@ -129,12 +75,15 @@ void grantParseParameter() { mError("can't parsed parameter k"); }
void grantReset(SMnode *pMnode, EGrantType grant, uint64_t value) {}
void grantAdd(EGrantType grant, uint64_t value) {}
void grantRestore(EGrantType grant, uint64_t value) {}
+char *tGetMachineId() { return NULL; };
int32_t dmProcessGrantReq(void *pInfo, SRpcMsg *pMsg) { return TSDB_CODE_SUCCESS; }
int32_t dmProcessGrantNotify(void *pInfo, SRpcMsg *pMsg) { return TSDB_CODE_SUCCESS; }
-int32_t grantAlterActiveCode(int32_t did, const char *old, const char *new, char *out, int8_t type) {
- return TSDB_CODE_SUCCESS;
-}
-
+int32_t mndProcessConfigGrantReq(SMnode *pMnode, SRpcMsg *pReq, SMCfgClusterReq *pCfg) { return 0; }
+#else
+#ifndef TD_UNIQ_GRANT
+char *tGetMachineId() { return NULL; };
+int32_t mndProcessConfigGrantReq(SMnode *pMnode, SRpcMsg *pReq, SMCfgClusterReq *pCfg) { return 0; }
+#endif
#endif
-void mndGenerateMachineCode() { grantParseParameter(); }
+void mndGenerateMachineCode() { grantParseParameter(); }
\ No newline at end of file
diff --git a/source/dnode/mnode/impl/src/mndMain.c b/source/dnode/mnode/impl/src/mndMain.c
index 30a9118274..a39e9e93c6 100644
--- a/source/dnode/mnode/impl/src/mndMain.c
+++ b/source/dnode/mnode/impl/src/mndMain.c
@@ -193,7 +193,7 @@ static void mndPullupGrant(SMnode *pMnode) {
if (pReq != NULL) {
SRpcMsg rpcMsg = {
.msgType = TDMT_MND_GRANT_HB_TIMER, .pCont = pReq, .contLen = contLen, .info.ahandle = (void *)0x9527};
- tmsgPutToQueue(&pMnode->msgCb, READ_QUEUE, &rpcMsg);
+ tmsgPutToQueue(&pMnode->msgCb, WRITE_QUEUE, &rpcMsg);
}
}
diff --git a/source/dnode/mnode/impl/src/mndPrivilege.c b/source/dnode/mnode/impl/src/mndPrivilege.c
index d4c0a6b36b..13a80cb1a6 100644
--- a/source/dnode/mnode/impl/src/mndPrivilege.c
+++ b/source/dnode/mnode/impl/src/mndPrivilege.c
@@ -30,9 +30,6 @@ int32_t mndCheckDbPrivilegeByName(SMnode *pMnode, const char *user, EOperType op
}
int32_t mndCheckTopicPrivilege(SMnode *pMnode, const char *user, EOperType operType, SMqTopicObj *pTopic) { return 0; }
-int32_t mndCheckTopicPrivilegeByName(SMnode *pMnode, const char *user, EOperType operType, const char *topicName) {
- return 0;
-}
int32_t mndSetUserWhiteListRsp(SMnode *pMnode, SUserObj *pUser, SGetUserWhiteListRsp *pWhiteListRsp) {
diff --git a/source/dnode/mnode/impl/src/mndScheduler.c b/source/dnode/mnode/impl/src/mndScheduler.c
index 39121cecd9..1d8b2cf5d3 100644
--- a/source/dnode/mnode/impl/src/mndScheduler.c
+++ b/source/dnode/mnode/impl/src/mndScheduler.c
@@ -234,36 +234,72 @@ int32_t doAddShuffleSinkTask(SMnode* pMnode, SArray* pTaskList, SStreamObj* pStr
int32_t doAddSinkTask(SStreamObj* pStream, SArray* pTaskList, SMnode* pMnode, int32_t vgId, SVgObj* pVgroup,
SEpSet* pEpset, bool isFillhistory) {
- int64_t uid = (isFillhistory)? pStream->hTaskUid:pStream->uid;
- SStreamTask* pTask = tNewStreamTask(uid, TASK_LEVEL__SINK, isFillhistory, 0, pTaskList, pStream->conf.fillHistory);
+ int64_t uid = (isFillhistory) ? pStream->hTaskUid : pStream->uid;
+ SStreamTask* pTask =
+ tNewStreamTask(uid, TASK_LEVEL__SINK, pEpset, isFillhistory, 0, pTaskList, pStream->conf.fillHistory);
if (pTask == NULL) {
terrno = TSDB_CODE_OUT_OF_MEMORY;
return -1;
}
- epsetAssign(&(pTask)->info.mnodeEpset, pEpset);
-
pTask->info.nodeId = vgId;
pTask->info.epSet = mndGetVgroupEpset(pMnode, pVgroup);
mndSetSinkTaskInfo(pStream, pTask);
return 0;
}
+static int64_t getVgroupLastVer(const SArray* pList, int32_t vgId) {
+ for(int32_t i = 0; i < taosArrayGetSize(pList); ++i) {
+ SVgroupVer* pVer = taosArrayGet(pList, i);
+ if (pVer->vgId == vgId) {
+ return pVer->ver;
+ }
+ }
+
+ mError("failed to find the vgId:%d for extract last version", vgId);
+ return -1;
+}
+
+static void streamTaskSetDataRange(SStreamTask* pTask, int64_t skey, SArray* pVerList, int32_t vgId) {
+ int64_t latestVer = getVgroupLastVer(pVerList, vgId);
+ if (latestVer < 0) {
+ latestVer = 0;
+ }
+
+ // set the correct ts, which is the last key of queried table.
+ SDataRange* pRange = &pTask->dataRange;
+ STimeWindow* pWindow = &pRange->window;
+
+ if (pTask->info.fillHistory) {
+ pWindow->skey = INT64_MIN;
+ pWindow->ekey = skey - 1;
+
+ pRange->range.minVer = 0;
+ pRange->range.maxVer = latestVer;
+ mDebug("add fill-history source task 0x%x timeWindow:%" PRId64 "-%" PRId64 " verRange:%" PRId64 "-%" PRId64,
+ pTask->id.taskId, pWindow->skey, pWindow->ekey, pRange->range.minVer, pRange->range.maxVer);
+ } else {
+ pWindow->skey = skey;
+ pWindow->ekey = INT64_MAX;
+
+ 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);
+ }
+}
+
static int32_t addSourceTask(SMnode* pMnode, SVgObj* pVgroup, SArray* pTaskList, SArray* pSinkTaskList,
- SStreamObj* pStream, SSubplan* plan, uint64_t uid, SEpSet* pEpset, bool fillHistory,
- bool hasExtraSink, int64_t nextWindowSkey, bool hasFillHistory) {
- SStreamTask* pTask =
- tNewStreamTask(uid, TASK_LEVEL__SOURCE, fillHistory, pStream->conf.triggerParam, pTaskList, hasFillHistory);
+ SStreamObj* pStream, SSubplan* plan, uint64_t uid, SEpSet* pEpset, int64_t skey,
+ SArray* pVerList, bool fillHistory, bool hasExtraSink, bool hasFillHistory) {
+ int64_t t = pStream->conf.triggerParam;
+ SStreamTask* pTask = tNewStreamTask(uid, TASK_LEVEL__SOURCE, pEpset, fillHistory, t, pTaskList, hasFillHistory);
if (pTask == NULL) {
return terrno;
}
- epsetAssign(&pTask->info.mnodeEpset, pEpset);
- STimeWindow* pWindow = &pTask->dataRange.window;
-
- pWindow->skey = INT64_MIN;
- pWindow->ekey = nextWindowSkey - 1;
- mDebug("add source task 0x%x window:%" PRId64 " - %" PRId64, pTask->id.taskId, pWindow->skey, pWindow->ekey);
+ streamTaskSetDataRange(pTask, skey, pVerList, pVgroup->vgId);
// sink or dispatch
if (hasExtraSink) {
@@ -308,7 +344,7 @@ static void setHTasksId(SArray* pTaskList, const SArray* pHTaskList) {
}
static int32_t addSourceTasksForOneLevelStream(SMnode* pMnode, const SQueryPlan* pPlan, SStreamObj* pStream,
- SEpSet* pEpset, bool hasExtraSink, int64_t nextWindowSkey) {
+ SEpSet* pEpset, bool hasExtraSink, int64_t skey, SArray* pVerList) {
// create exec stream task, since only one level, the exec task is also the source task
SArray* pTaskList = addNewTaskList(pStream->tasks);
SSdb* pSdb = pMnode->pSdb;
@@ -345,8 +381,8 @@ static int32_t addSourceTasksForOneLevelStream(SMnode* pMnode, const SQueryPlan*
// new stream task
SArray** pSinkTaskList = taosArrayGet(pStream->tasks, SINK_NODE_LEVEL);
- int32_t code = addSourceTask(pMnode, pVgroup, pTaskList, *pSinkTaskList, pStream, plan, pStream->uid, pEpset,
- false, hasExtraSink, nextWindowSkey, pStream->conf.fillHistory);
+ int32_t code = addSourceTask(pMnode, pVgroup, pTaskList, *pSinkTaskList, pStream, plan, pStream->uid, pEpset, skey,
+ pVerList, false, hasExtraSink, pStream->conf.fillHistory);
if (code != TSDB_CODE_SUCCESS) {
sdbRelease(pSdb, pVgroup);
return -1;
@@ -354,8 +390,8 @@ static int32_t addSourceTasksForOneLevelStream(SMnode* pMnode, const SQueryPlan*
if (pStream->conf.fillHistory) {
SArray** pHSinkTaskList = taosArrayGet(pStream->pHTasksList, SINK_NODE_LEVEL);
- code = addSourceTask(pMnode, pVgroup, pHTaskList, *pHSinkTaskList, pStream, plan, pStream->hTaskUid,
- pEpset, true, hasExtraSink, nextWindowSkey, true);
+ code = addSourceTask(pMnode, pVgroup, pHTaskList, *pHSinkTaskList, pStream, plan, pStream->hTaskUid, pEpset, skey,
+ pVerList, true, hasExtraSink, true);
}
sdbRelease(pSdb, pVgroup);
@@ -371,24 +407,17 @@ static int32_t addSourceTasksForOneLevelStream(SMnode* pMnode, const SQueryPlan*
return TSDB_CODE_SUCCESS;
}
-static int32_t doAddSourceTask(SArray* pTaskList, bool isFillhistory, int64_t uid, SStreamTask* pDownstreamTask,
- SMnode* pMnode, SSubplan* pPlan, SVgObj* pVgroup, SEpSet* pEpset,
- int64_t nextWindowSkey, bool hasFillHistory) {
- SStreamTask* pTask = tNewStreamTask(uid, TASK_LEVEL__SOURCE, isFillhistory, 0, pTaskList, hasFillHistory);
+static int32_t addSourceTaskForMultiLevelStream(SArray* pTaskList, bool isFillhistory, int64_t uid,
+ SStreamTask* pDownstreamTask, SMnode* pMnode, SSubplan* pPlan,
+ SVgObj* pVgroup, SEpSet* pEpset, int64_t skey, SArray* pVerList,
+ bool hasFillHistory) {
+ SStreamTask* pTask = tNewStreamTask(uid, TASK_LEVEL__SOURCE, pEpset, isFillhistory, 0, pTaskList, hasFillHistory);
if (pTask == NULL) {
terrno = TSDB_CODE_OUT_OF_MEMORY;
return -1;
}
- epsetAssign(&(pTask)->info.mnodeEpset, pEpset);
-
- // set the correct ts, which is the last key of queried table.
- STimeWindow* pWindow = &pTask->dataRange.window;
- pWindow->skey = INT64_MIN;
- pWindow->ekey = nextWindowSkey - 1;
-
- mDebug("s-task:0x%x level:%d set time window:%" PRId64 " - %" PRId64, pTask->id.taskId, pTask->info.taskLevel,
- pWindow->skey, pWindow->ekey);
+ streamTaskSetDataRange(pTask, skey, pVerList, pVgroup->vgId);
// all the source tasks dispatch result to a single agg node.
streamTaskSetFixedDownstreamInfo(pTask, pDownstreamTask);
@@ -401,14 +430,12 @@ static int32_t doAddSourceTask(SArray* pTaskList, bool isFillhistory, int64_t ui
static int32_t doAddAggTask(uint64_t uid, SArray* pTaskList, SArray* pSinkNodeList, SMnode* pMnode, SStreamObj* pStream,
SEpSet* pEpset, bool fillHistory, SStreamTask** pAggTask, bool hasFillhistory) {
- *pAggTask = tNewStreamTask(uid, TASK_LEVEL__AGG, fillHistory, pStream->conf.triggerParam, pTaskList, hasFillhistory);
+ *pAggTask = tNewStreamTask(uid, TASK_LEVEL__AGG, pEpset, fillHistory, pStream->conf.triggerParam, pTaskList, hasFillhistory);
if (*pAggTask == NULL) {
terrno = TSDB_CODE_OUT_OF_MEMORY;
return -1;
}
- epsetAssign(&(*pAggTask)->info.mnodeEpset, pEpset);
-
// dispatch
if (mndAddDispatcherForInternalTask(pMnode, pStream, pSinkNodeList, *pAggTask) < 0) {
return -1;
@@ -492,7 +519,7 @@ static int32_t addAggTask(SStreamObj* pStream, SMnode* pMnode, SQueryPlan* pPlan
static int32_t addSourceTasksForMultiLevelStream(SMnode* pMnode, SQueryPlan* pPlan, SStreamObj* pStream,
SStreamTask* pDownstreamTask, SStreamTask* pHDownstreamTask,
- SEpSet* pEpset, int64_t nextWindowSkey) {
+ SEpSet* pEpset, int64_t skey, SArray* pVerList) {
SArray* pSourceTaskList = addNewTaskList(pStream->tasks);
SArray* pHSourceTaskList = NULL;
@@ -521,8 +548,8 @@ static int32_t addSourceTasksForMultiLevelStream(SMnode* pMnode, SQueryPlan* pPl
continue;
}
- int32_t code = doAddSourceTask(pSourceTaskList, false, pStream->uid, pDownstreamTask, pMnode, plan, pVgroup, pEpset,
- nextWindowSkey, pStream->conf.fillHistory);
+ int32_t code = addSourceTaskForMultiLevelStream(pSourceTaskList, false, pStream->uid, pDownstreamTask, pMnode, plan, pVgroup, pEpset,
+ skey, pVerList, pStream->conf.fillHistory);
if (code != TSDB_CODE_SUCCESS) {
sdbRelease(pSdb, pVgroup);
terrno = code;
@@ -530,8 +557,8 @@ static int32_t addSourceTasksForMultiLevelStream(SMnode* pMnode, SQueryPlan* pPl
}
if (pStream->conf.fillHistory) {
- code = doAddSourceTask(pHSourceTaskList, true, pStream->hTaskUid, pHDownstreamTask, pMnode, plan, pVgroup, pEpset,
- nextWindowSkey, pStream->conf.fillHistory);
+ code = addSourceTaskForMultiLevelStream(pHSourceTaskList, true, pStream->hTaskUid, pHDownstreamTask, pMnode, plan, pVgroup, pEpset,
+ skey, pVerList, pStream->conf.fillHistory);
if (code != TSDB_CODE_SUCCESS) {
sdbRelease(pSdb, pVgroup);
return code;
@@ -580,7 +607,8 @@ static void setSinkTaskUpstreamInfo(SArray* pTasksList, const SStreamTask* pUpst
}
}
-static int32_t doScheduleStream(SStreamObj* pStream, SMnode* pMnode, SQueryPlan* pPlan, int64_t nextWindowSkey, SEpSet* pEpset) {
+static int32_t doScheduleStream(SStreamObj* pStream, SMnode* pMnode, SQueryPlan* pPlan, SEpSet* pEpset, int64_t skey,
+ SArray* pVerList) {
SSdb* pSdb = pMnode->pSdb;
int32_t numOfPlanLevel = LIST_LENGTH(pPlan->pSubplans);
@@ -637,15 +665,15 @@ static int32_t doScheduleStream(SStreamObj* pStream, SMnode* pMnode, SQueryPlan*
}
// source level
- return addSourceTasksForMultiLevelStream(pMnode, pPlan, pStream, pAggTask, pHAggTask, pEpset, nextWindowSkey);
+ return addSourceTasksForMultiLevelStream(pMnode, pPlan, pStream, pAggTask, pHAggTask, pEpset, skey, pVerList);
} else if (numOfPlanLevel == 1) {
- return addSourceTasksForOneLevelStream(pMnode, pPlan, pStream, pEpset, hasExtraSink, nextWindowSkey);
+ return addSourceTasksForOneLevelStream(pMnode, pPlan, pStream, pEpset, hasExtraSink, skey, pVerList);
}
return 0;
}
-int32_t mndScheduleStream(SMnode* pMnode, SStreamObj* pStream, int64_t nextWindowSkey) {
+int32_t mndScheduleStream(SMnode* pMnode, SStreamObj* pStream, int64_t skey, SArray* pVgVerList) {
SQueryPlan* pPlan = qStringToQueryPlan(pStream->physicalPlan);
if (pPlan == NULL) {
terrno = TSDB_CODE_QRY_INVALID_INPUT;
@@ -655,7 +683,7 @@ int32_t mndScheduleStream(SMnode* pMnode, SStreamObj* pStream, int64_t nextWindo
SEpSet mnodeEpset = {0};
mndGetMnodeEpSet(pMnode, &mnodeEpset);
- int32_t code = doScheduleStream(pStream, pMnode, pPlan, nextWindowSkey, &mnodeEpset);
+ int32_t code = doScheduleStream(pStream, pMnode, pPlan, &mnodeEpset, skey, pVgVerList);
qDestroyQueryPlan(pPlan);
return code;
diff --git a/source/dnode/mnode/impl/src/mndShow.c b/source/dnode/mnode/impl/src/mndShow.c
index 8e7e72aa0e..f887d05d37 100644
--- a/source/dnode/mnode/impl/src/mndShow.c
+++ b/source/dnode/mnode/impl/src/mndShow.c
@@ -123,6 +123,12 @@ static int32_t convertToRetrieveType(char *name, int32_t len) {
type = TSDB_MGMT_TABLE_COMPACT;
} else if (strncasecmp(name, TSDB_INS_TABLE_COMPACT_DETAILS, len) == 0) {
type = TSDB_MGMT_TABLE_COMPACT_DETAIL;
+ } else if (strncasecmp(name, TSDB_INS_TABLE_GRANTS_FULL, len) == 0) {
+ type = TSDB_MGMT_TABLE_GRANTS_FULL;
+ } else if (strncasecmp(name, TSDB_INS_TABLE_GRANTS_LOGS, len) == 0) {
+ type = TSDB_MGMT_TABLE_GRANTS_LOGS;
+ } else if (strncasecmp(name, TSDB_INS_TABLE_MACHINES, len) == 0) {
+ type = TSDB_MGMT_TABLE_MACHINES;
} else {
mError("invalid show name:%s len:%d", name, len);
}
diff --git a/source/dnode/mnode/impl/src/mndSma.c b/source/dnode/mnode/impl/src/mndSma.c
index e6027a0332..cfd7ecf054 100644
--- a/source/dnode/mnode/impl/src/mndSma.c
+++ b/source/dnode/mnode/impl/src/mndSma.c
@@ -638,7 +638,7 @@ static int32_t mndCreateSma(SMnode *pMnode, SRpcMsg *pReq, SMCreateSmaReq *pCrea
if (mndSetCreateSmaVgroupCommitLogs(pMnode, pTrans, &streamObj.fixedSinkVg) != 0) goto _OVER;
if (mndSetUpdateSmaStbCommitLogs(pMnode, pTrans, pStb) != 0) goto _OVER;
if (mndSetCreateSmaVgroupRedoActions(pMnode, pTrans, pDb, &streamObj.fixedSinkVg, &smaObj) != 0) goto _OVER;
- if (mndScheduleStream(pMnode, &streamObj, 1685959190000) != 0) goto _OVER;
+ if (mndScheduleStream(pMnode, &streamObj, 1685959190000, NULL) != 0) goto _OVER;
if (mndPersistStream(pTrans, &streamObj) != 0) goto _OVER;
if (mndTransPrepare(pMnode, pTrans) != 0) goto _OVER;
diff --git a/source/dnode/mnode/impl/src/mndStream.c b/source/dnode/mnode/impl/src/mndStream.c
index 46c7a06079..fc460ac67c 100644
--- a/source/dnode/mnode/impl/src/mndStream.c
+++ b/source/dnode/mnode/impl/src/mndStream.c
@@ -476,22 +476,20 @@ int32_t mndPersistTaskDeployReq(STrans *pTrans, SStreamTask *pTask) {
}
int32_t mndPersistStreamTasks(STrans *pTrans, SStreamObj *pStream) {
- int32_t level = taosArrayGetSize(pStream->tasks);
- for (int32_t i = 0; i < level; i++) {
- SArray *pLevel = taosArrayGetP(pStream->tasks, i);
-
- int32_t numOfTasks = taosArrayGetSize(pLevel);
- for (int32_t j = 0; j < numOfTasks; j++) {
- SStreamTask *pTask = taosArrayGetP(pLevel, j);
- if (mndPersistTaskDeployReq(pTrans, pTask) < 0) {
- return -1;
- }
+ SStreamTaskIter *pIter = createStreamTaskIter(pStream);
+ while (streamTaskIterNextTask(pIter)) {
+ SStreamTask *pTask = streamTaskIterGetCurrent(pIter);
+ if (mndPersistTaskDeployReq(pTrans, pTask) < 0) {
+ destroyStreamTaskIter(pIter);
+ return -1;
}
}
+ destroyStreamTaskIter(pIter);
+
// persistent stream task for already stored ts data
if (pStream->conf.fillHistory) {
- level = taosArrayGetSize(pStream->pHTasksList);
+ int32_t level = taosArrayGetSize(pStream->pHTasksList);
for (int32_t i = 0; i < level; i++) {
SArray *pLevel = taosArrayGetP(pStream->pHTasksList, i);
@@ -646,8 +644,12 @@ static int32_t mndProcessCreateStreamReq(SRpcMsg *pReq) {
int32_t sqlLen = 0;
terrno = TSDB_CODE_SUCCESS;
- SCMCreateStreamReq createStreamReq = {0};
- if (tDeserializeSCMCreateStreamReq(pReq->pCont, pReq->contLen, &createStreamReq) != 0) {
+ if ((terrno = grantCheck(TSDB_GRANT_STREAMS)) < 0) {
+ goto _OVER;
+ }
+
+ SCMCreateStreamReq createReq = {0};
+ if (tDeserializeSCMCreateStreamReq(pReq->pCont, pReq->contLen, &createReq) != 0) {
terrno = TSDB_CODE_INVALID_MSG;
goto _OVER;
}
@@ -656,17 +658,17 @@ static int32_t mndProcessCreateStreamReq(SRpcMsg *pReq) {
terrno = TSDB_CODE_MND_INVALID_PLATFORM;
goto _OVER;
#endif
- mInfo("stream:%s, start to create, sql:%s", createStreamReq.name, createStreamReq.sql);
+ mInfo("stream:%s, start to create, sql:%s", createReq.name, createReq.sql);
- if (mndCheckCreateStreamReq(&createStreamReq) != 0) {
- mError("stream:%s, failed to create since %s", createStreamReq.name, terrstr());
+ if (mndCheckCreateStreamReq(&createReq) != 0) {
+ mError("stream:%s, failed to create since %s", createReq.name, terrstr());
goto _OVER;
}
- pStream = mndAcquireStream(pMnode, createStreamReq.name);
+ pStream = mndAcquireStream(pMnode, createReq.name);
if (pStream != NULL) {
- if (createStreamReq.igExists) {
- mInfo("stream:%s, already exist, ignore exist is set", createStreamReq.name);
+ if (createReq.igExists) {
+ mInfo("stream:%s, already exist, ignore exist is set", createReq.name);
goto _OVER;
} else {
terrno = TSDB_CODE_MND_STREAM_ALREADY_EXIST;
@@ -676,16 +678,16 @@ static int32_t mndProcessCreateStreamReq(SRpcMsg *pReq) {
goto _OVER;
}
- if (createStreamReq.sql != NULL) {
- sqlLen = strlen(createStreamReq.sql);
+ if (createReq.sql != NULL) {
+ sqlLen = strlen(createReq.sql);
sql = taosMemoryMalloc(sqlLen + 1);
memset(sql, 0, sqlLen + 1);
- memcpy(sql, createStreamReq.sql, sqlLen);
+ memcpy(sql, createReq.sql, sqlLen);
}
// build stream obj from request
- if (mndBuildStreamObjFromCreateReq(pMnode, &streamObj, &createStreamReq) < 0) {
- mError("stream:%s, failed to create since %s", createStreamReq.name, terrstr());
+ if (mndBuildStreamObjFromCreateReq(pMnode, &streamObj, &createReq) < 0) {
+ mError("stream:%s, failed to create since %s", createReq.name, terrstr());
goto _OVER;
}
@@ -699,23 +701,23 @@ static int32_t mndProcessCreateStreamReq(SRpcMsg *pReq) {
}
// create stb for stream
- if (createStreamReq.createStb == STREAM_CREATE_STABLE_TRUE &&
+ if (createReq.createStb == STREAM_CREATE_STABLE_TRUE &&
mndCreateStbForStream(pMnode, pTrans, &streamObj, pReq->info.conn.user) < 0) {
- mError("trans:%d, failed to create stb for stream %s since %s", pTrans->id, createStreamReq.name, terrstr());
+ mError("trans:%d, failed to create stb for stream %s since %s", pTrans->id, createReq.name, terrstr());
mndTransDrop(pTrans);
goto _OVER;
}
// schedule stream task for stream obj
- if (mndScheduleStream(pMnode, &streamObj, createStreamReq.lastTs) < 0) {
- mError("stream:%s, failed to schedule since %s", createStreamReq.name, terrstr());
+ if (mndScheduleStream(pMnode, &streamObj, createReq.lastTs, createReq.pVgroupVerList) < 0) {
+ mError("stream:%s, failed to schedule since %s", createReq.name, terrstr());
mndTransDrop(pTrans);
goto _OVER;
}
// add stream to trans
if (mndPersistStream(pTrans, &streamObj) < 0) {
- mError("stream:%s, failed to schedule since %s", createStreamReq.name, terrstr());
+ mError("stream:%s, failed to schedule since %s", createReq.name, terrstr());
mndTransDrop(pTrans);
goto _OVER;
}
@@ -746,10 +748,10 @@ static int32_t mndProcessCreateStreamReq(SRpcMsg *pReq) {
taosThreadMutexUnlock(&execInfo.lock);
SName dbname = {0};
- tNameFromString(&dbname, createStreamReq.sourceDB, T_NAME_ACCT | T_NAME_DB | T_NAME_TABLE);
+ tNameFromString(&dbname, createReq.sourceDB, T_NAME_ACCT | T_NAME_DB | T_NAME_TABLE);
SName name = {0};
- tNameFromString(&name, createStreamReq.name, T_NAME_ACCT | T_NAME_DB | T_NAME_TABLE);
+ tNameFromString(&name, createReq.name, T_NAME_ACCT | T_NAME_DB | T_NAME_TABLE);
// reuse this function for stream
if (sql != NULL && sqlLen > 0) {
@@ -762,11 +764,11 @@ static int32_t mndProcessCreateStreamReq(SRpcMsg *pReq) {
_OVER:
if (terrno != TSDB_CODE_SUCCESS && terrno != TSDB_CODE_ACTION_IN_PROGRESS) {
- mError("stream:%s, failed to create since %s", createStreamReq.name, terrstr());
+ mError("stream:%s, failed to create since %s", createReq.name, terrstr());
}
mndReleaseStream(pMnode, pStream);
- tFreeSCMCreateStreamReq(&createStreamReq);
+ tFreeSCMCreateStreamReq(&createReq);
tFreeStreamObj(&streamObj);
if (sql != NULL) {
taosMemoryFreeClear(sql);
@@ -856,6 +858,32 @@ static int32_t mndBuildStreamCheckpointSourceReq(void **pBuf, int32_t *pLen, int
return 0;
}
+static int32_t doSetCheckpointAction(SMnode *pMnode, STrans *pTrans, SStreamTask *pTask, int64_t checkpointId,
+ int8_t mndTrigger) {
+ void *buf;
+ int32_t tlen;
+ if (mndBuildStreamCheckpointSourceReq(&buf, &tlen, pTask->info.nodeId, checkpointId, pTask->id.streamId,
+ pTask->id.taskId, pTrans->id, mndTrigger) < 0) {
+ taosMemoryFree(buf);
+ return -1;
+ }
+
+ SEpSet epset = {0};
+ bool hasEpset = false;
+ int32_t code = extractNodeEpset(pMnode, &epset, &hasEpset, pTask->id.taskId, pTask->info.nodeId);
+ if (code != TSDB_CODE_SUCCESS || !hasEpset) {
+ taosMemoryFree(buf);
+ return -1;
+ }
+
+ code = setTransAction(pTrans, buf, tlen, TDMT_VND_STREAM_CHECK_POINT_SOURCE, &epset, TSDB_CODE_SYN_PROPOSE_NOT_READY);
+ if (code != 0) {
+ taosMemoryFree(buf);
+ }
+
+ return code;
+}
+
static int32_t mndProcessStreamCheckpointTrans(SMnode *pMnode, SStreamObj *pStream, int64_t checkpointId,
int8_t mndTrigger, bool lock) {
int32_t code = -1;
@@ -865,6 +893,7 @@ static int32_t mndProcessStreamCheckpointTrans(SMnode *pMnode, SStreamObj *pStre
return -1;
}
+
bool conflict = mndStreamTransConflictCheck(pMnode, pStream->uid, MND_STREAM_CHECKPOINT_NAME, lock);
if (conflict) {
mndAddtoCheckpointWaitingList(pStream, checkpointId);
@@ -887,8 +916,8 @@ static int32_t mndProcessStreamCheckpointTrans(SMnode *pMnode, SStreamObj *pStre
pStream->currentTick = 1;
// 1. redo action: broadcast checkpoint source msg for all source vg
- int32_t totLevel = taosArrayGetSize(pStream->tasks);
- for (int32_t i = 0; i < totLevel; i++) {
+ int32_t totalLevel = taosArrayGetSize(pStream->tasks);
+ for (int32_t i = 0; i < totalLevel; i++) {
SArray *pLevel = taosArrayGetP(pStream->tasks, i);
SStreamTask *p = taosArrayGetP(pLevel, 0);
@@ -896,28 +925,9 @@ static int32_t mndProcessStreamCheckpointTrans(SMnode *pMnode, SStreamObj *pStre
int32_t sz = taosArrayGetSize(pLevel);
for (int32_t j = 0; j < sz; j++) {
SStreamTask *pTask = taosArrayGetP(pLevel, j);
+ code = doSetCheckpointAction(pMnode, pTrans, pTask, checkpointId, mndTrigger);
- void *buf;
- int32_t tlen;
- if (mndBuildStreamCheckpointSourceReq(&buf, &tlen, pTask->info.nodeId, checkpointId, pTask->id.streamId,
- pTask->id.taskId, pTrans->id, mndTrigger) < 0) {
- taosWUnLockLatch(&pStream->lock);
- goto _ERR;
- }
-
- SEpSet epset = {0};
- bool hasEpset = false;
- code = extractNodeEpset(pMnode, &epset, &hasEpset, pTask->id.taskId, pTask->info.nodeId);
- if (code != TSDB_CODE_SUCCESS || !hasEpset) {
- taosMemoryFree(buf);
- taosWUnLockLatch(&pStream->lock);
- goto _ERR;
- }
-
- code = setTransAction(pTrans, buf, tlen, TDMT_VND_STREAM_CHECK_POINT_SOURCE, &epset,
- TSDB_CODE_SYN_PROPOSE_NOT_READY);
- if (code != 0) {
- taosMemoryFree(buf);
+ if (code != TSDB_CODE_SUCCESS) {
taosWUnLockLatch(&pStream->lock);
goto _ERR;
}
@@ -1500,21 +1510,19 @@ static int32_t mndRetrieveStreamTask(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock
}
// add row for each task
- for (int32_t i = 0; i < taosArrayGetSize(pStream->tasks); i++) {
- SArray *pLevel = taosArrayGetP(pStream->tasks, i);
+ SStreamTaskIter *pIter = createStreamTaskIter(pStream);
+ while (streamTaskIterNextTask(pIter)) {
+ SStreamTask *pTask = streamTaskIterGetCurrent(pIter);
- int32_t numOfLevels = taosArrayGetSize(pLevel);
- for (int32_t j = 0; j < numOfLevels; j++) {
- SStreamTask *pTask = taosArrayGetP(pLevel, j);
- int32_t code = setTaskAttrInResBlock(pStream, pTask, pBlock, numOfRows);
- if (code == TSDB_CODE_SUCCESS) {
- numOfRows++;
- }
+ int32_t code = setTaskAttrInResBlock(pStream, pTask, pBlock, numOfRows);
+ if (code == TSDB_CODE_SUCCESS) {
+ numOfRows++;
}
}
- // unlock
+ destroyStreamTaskIter(pIter);
taosRUnLockLatch(&pStream->lock);
+
sdbRelease(pSdb, pStream);
}
@@ -1620,21 +1628,26 @@ static int32_t mndProcessResumeStreamReq(SRpcMsg *pReq) {
SMnode *pMnode = pReq->info.node;
SStreamObj *pStream = NULL;
- SMResumeStreamReq pauseReq = {0};
- if (tDeserializeSMResumeStreamReq(pReq->pCont, pReq->contLen, &pauseReq) < 0) {
+ if(grantCheck(TSDB_GRANT_STREAMS) < 0){
+ terrno = TSDB_CODE_GRANT_EXPIRED;
+ return -1;
+ }
+
+ SMResumeStreamReq resumeReq = {0};
+ if (tDeserializeSMResumeStreamReq(pReq->pCont, pReq->contLen, &resumeReq) < 0) {
terrno = TSDB_CODE_INVALID_MSG;
return -1;
}
- pStream = mndAcquireStream(pMnode, pauseReq.name);
+ pStream = mndAcquireStream(pMnode, resumeReq.name);
if (pStream == NULL) {
- if (pauseReq.igNotExists) {
- mInfo("stream:%s not exist, not resume stream", pauseReq.name);
+ if (resumeReq.igNotExists) {
+ mInfo("stream:%s not exist, not resume stream", resumeReq.name);
sdbRelease(pMnode->pSdb, pStream);
return 0;
} else {
- mError("stream:%s not exist, failed to resume stream", pauseReq.name);
+ mError("stream:%s not exist, failed to resume stream", resumeReq.name);
terrno = TSDB_CODE_MND_STREAM_NOT_EXIST;
return -1;
}
@@ -1659,7 +1672,7 @@ static int32_t mndProcessResumeStreamReq(SRpcMsg *pReq) {
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", pauseReq.name, terrstr());
+ mError("stream:%s, failed to resume stream since %s", resumeReq.name, terrstr());
sdbRelease(pMnode->pSdb, pStream);
return -1;
}
@@ -1667,8 +1680,8 @@ static int32_t mndProcessResumeStreamReq(SRpcMsg *pReq) {
int32_t code = mndStreamRegisterTrans(pTrans, MND_STREAM_RESUME_NAME, pStream->uid);
// set the resume action
- if (mndStreamSetResumeAction(pTrans, pMnode, pStream, pauseReq.igUntreated) < 0) {
- mError("stream:%s, failed to drop task since %s", pauseReq.name, terrstr());
+ if (mndStreamSetResumeAction(pTrans, pMnode, pStream, resumeReq.igUntreated) < 0) {
+ mError("stream:%s, failed to drop task since %s", resumeReq.name, terrstr());
sdbRelease(pMnode->pSdb, pStream);
mndTransDrop(pTrans);
return -1;
@@ -1829,6 +1842,11 @@ static int32_t mndProcessVgroupChange(SMnode *pMnode, SVgroupChangeInfo *pChange
}
}
+ // no need to build the trans to handle the vgroup upddate
+ if (pTrans == NULL) {
+ return 0;
+ }
+
if (mndTransPrepare(pMnode, pTrans) != 0) {
mError("trans:%d, failed to prepare update stream trans since %s", pTrans->id, terrstr());
sdbRelease(pMnode->pSdb, pStream);
@@ -1854,22 +1872,19 @@ static SArray *extractNodeListFromStream(SMnode *pMnode) {
}
taosWLockLatch(&pStream->lock);
- int32_t numOfLevels = taosArrayGetSize(pStream->tasks);
- for (int32_t j = 0; j < numOfLevels; ++j) {
- SArray *pLevel = taosArrayGetP(pStream->tasks, j);
+ SStreamTaskIter *pTaskIter = createStreamTaskIter(pStream);
+ while (streamTaskIterNextTask(pTaskIter)) {
+ SStreamTask *pTask = streamTaskIterGetCurrent(pTaskIter);
- int32_t numOfTasks = taosArrayGetSize(pLevel);
- for (int32_t k = 0; k < numOfTasks; ++k) {
- SStreamTask *pTask = taosArrayGetP(pLevel, k);
-
- SNodeEntry entry = {.hbTimestamp = -1, .nodeId = pTask->info.nodeId};
- epsetAssign(&entry.epset, &pTask->info.epSet);
- taosHashPut(pHash, &entry.nodeId, sizeof(entry.nodeId), &entry, sizeof(entry));
- }
+ SNodeEntry entry = {.hbTimestamp = -1, .nodeId = pTask->info.nodeId};
+ epsetAssign(&entry.epset, &pTask->info.epSet);
+ taosHashPut(pHash, &entry.nodeId, sizeof(entry.nodeId), &entry, sizeof(entry));
}
+ destroyStreamTaskIter(pTaskIter);
taosWUnLockLatch(&pStream->lock);
+
sdbRelease(pSdb, pStream);
}
@@ -2055,58 +2070,50 @@ static int32_t mndProcessNodeCheck(SRpcMsg *pReq) {
}
void saveStreamTasksInfo(SStreamObj *pStream, SStreamExecInfo *pExecNode) {
- int32_t level = taosArrayGetSize(pStream->tasks);
+ SStreamTaskIter *pIter = createStreamTaskIter(pStream);
+ while (streamTaskIterNextTask(pIter)) {
+ SStreamTask *pTask = streamTaskIterGetCurrent(pIter);
- for (int32_t i = 0; i < level; i++) {
- SArray *pLevel = taosArrayGetP(pStream->tasks, i);
+ STaskId id = {.streamId = pTask->id.streamId, .taskId = pTask->id.taskId};
+ void *p = taosHashGet(pExecNode->pTaskMap, &id, sizeof(id));
+ if (p == NULL) {
+ STaskStatusEntry entry = {0};
+ streamTaskStatusInit(&entry, pTask);
- int32_t numOfTasks = taosArrayGetSize(pLevel);
- for (int32_t j = 0; j < numOfTasks; j++) {
- SStreamTask *pTask = taosArrayGetP(pLevel, j);
-
- STaskId id = {.streamId = pTask->id.streamId, .taskId = pTask->id.taskId};
- void *p = taosHashGet(pExecNode->pTaskMap, &id, sizeof(id));
- if (p == NULL) {
- STaskStatusEntry entry = {0};
- streamTaskStatusInit(&entry, pTask);
-
- taosHashPut(pExecNode->pTaskMap, &id, sizeof(id), &entry, sizeof(entry));
- taosArrayPush(pExecNode->pTaskList, &id);
- mInfo("s-task:0x%x add into task buffer, total:%d", (int32_t)entry.id.taskId,
- (int32_t)taosArrayGetSize(pExecNode->pTaskList));
- }
+ taosHashPut(pExecNode->pTaskMap, &id, sizeof(id), &entry, sizeof(entry));
+ taosArrayPush(pExecNode->pTaskList, &id);
+ mInfo("s-task:0x%x add into task buffer, total:%d", (int32_t)entry.id.taskId,
+ (int32_t)taosArrayGetSize(pExecNode->pTaskList));
}
}
+
+ destroyStreamTaskIter(pIter);
}
void removeStreamTasksInBuf(SStreamObj *pStream, SStreamExecInfo *pExecNode) {
- int32_t level = taosArrayGetSize(pStream->tasks);
- for (int32_t i = 0; i < level; i++) {
- SArray *pLevel = taosArrayGetP(pStream->tasks, i);
+ SStreamTaskIter *pIter = createStreamTaskIter(pStream);
+ while (streamTaskIterNextTask(pIter)) {
+ SStreamTask *pTask = streamTaskIterGetCurrent(pIter);
- int32_t numOfTasks = taosArrayGetSize(pLevel);
- for (int32_t j = 0; j < numOfTasks; j++) {
- SStreamTask *pTask = taosArrayGetP(pLevel, j);
+ STaskId id = {.streamId = pTask->id.streamId, .taskId = pTask->id.taskId};
+ void *p = taosHashGet(pExecNode->pTaskMap, &id, sizeof(id));
+ if (p != NULL) {
+ taosHashRemove(pExecNode->pTaskMap, &id, sizeof(id));
- STaskId id = {.streamId = pTask->id.streamId, .taskId = pTask->id.taskId};
- void *p = taosHashGet(pExecNode->pTaskMap, &id, sizeof(id));
- if (p != NULL) {
- taosHashRemove(pExecNode->pTaskMap, &id, sizeof(id));
+ for (int32_t k = 0; k < taosArrayGetSize(pExecNode->pTaskList); ++k) {
+ STaskId *pId = taosArrayGet(pExecNode->pTaskList, k);
+ if (pId->taskId == id.taskId && pId->streamId == id.streamId) {
+ taosArrayRemove(pExecNode->pTaskList, k);
- for (int32_t k = 0; k < taosArrayGetSize(pExecNode->pTaskList); ++k) {
- STaskId *pId = taosArrayGet(pExecNode->pTaskList, k);
- if (pId->taskId == id.taskId && pId->streamId == id.streamId) {
- taosArrayRemove(pExecNode->pTaskList, k);
-
- int32_t num = taosArrayGetSize(pExecNode->pTaskList);
- mInfo("s-task:0x%x removed from buffer, remain:%d", (int32_t)id.taskId, num);
- break;
- }
+ int32_t num = taosArrayGetSize(pExecNode->pTaskList);
+ mInfo("s-task:0x%x removed from buffer, remain:%d", (int32_t)id.taskId, num);
+ break;
}
}
}
}
+ destroyStreamTaskIter(pIter);
ASSERT(taosHashGetSize(pExecNode->pTaskMap) == taosArrayGetSize(pExecNode->pTaskList));
}
@@ -2137,7 +2144,6 @@ static void doAddTaskId(SArray* pList, int32_t taskId, int64_t uid, int32_t numO
int32_t mndProcessStreamReqCheckpoint(SRpcMsg *pReq) {
SMnode *pMnode = pReq->info.node;
-
SStreamTaskCheckpointReq req = {0};
SDecoder decoder = {0};
diff --git a/source/dnode/mnode/impl/src/mndStreamHb.c b/source/dnode/mnode/impl/src/mndStreamHb.c
index 5a6faadebb..4426ab0672 100644
--- a/source/dnode/mnode/impl/src/mndStreamHb.c
+++ b/source/dnode/mnode/impl/src/mndStreamHb.c
@@ -65,61 +65,24 @@ static void addIntoCheckpointList(SArray* pList, const SFailedCheckpointInfo* pI
taosArrayPush(pList, pInfo);
}
-static int32_t createStreamResetStatusTrans(SMnode *pMnode, SStreamObj *pStream) {
+int32_t createStreamResetStatusTrans(SMnode *pMnode, SStreamObj *pStream) {
STrans *pTrans = doCreateTrans(pMnode, pStream, NULL, MND_STREAM_TASK_RESET_NAME, " reset from failed checkpoint");
if (pTrans == NULL) {
return terrno;
}
/*int32_t code = */mndStreamRegisterTrans(pTrans, MND_STREAM_TASK_RESET_NAME, pStream->uid);
-
- taosWLockLatch(&pStream->lock);
- int32_t numOfLevels = taosArrayGetSize(pStream->tasks);
-
- for (int32_t j = 0; j < numOfLevels; ++j) {
- SArray *pLevel = taosArrayGetP(pStream->tasks, j);
-
- int32_t numOfTasks = taosArrayGetSize(pLevel);
- for (int32_t k = 0; k < numOfTasks; ++k) {
- SStreamTask *pTask = taosArrayGetP(pLevel, k);
-
- // todo extract method, with pause stream task
- SVResetStreamTaskReq *pReq = taosMemoryCalloc(1, sizeof(SVResetStreamTaskReq));
- if (pReq == NULL) {
- terrno = TSDB_CODE_OUT_OF_MEMORY;
- mError("failed to malloc in reset stream, size:%" PRIzu ", code:%s", sizeof(SVResetStreamTaskReq),
- tstrerror(TSDB_CODE_OUT_OF_MEMORY));
- taosWUnLockLatch(&pStream->lock);
- return terrno;
- }
-
- pReq->head.vgId = htonl(pTask->info.nodeId);
- pReq->taskId = pTask->id.taskId;
- pReq->streamId = pTask->id.streamId;
-
- SEpSet epset = {0};
- bool hasEpset = false;
- int32_t code = extractNodeEpset(pMnode, &epset, &hasEpset, pTask->id.taskId, pTask->info.nodeId);
- if (code != TSDB_CODE_SUCCESS || !hasEpset) {
- taosMemoryFree(pReq);
- continue;
- }
-
- code = setTransAction(pTrans, pReq, sizeof(SVResetStreamTaskReq), TDMT_VND_STREAM_TASK_RESET, &epset, 0);
- if (code != 0) {
- taosMemoryFree(pReq);
- taosWUnLockLatch(&pStream->lock);
- mndTransDrop(pTrans);
- return terrno;
- }
- }
+ int32_t code = mndStreamSetResetTaskAction(pMnode, pTrans, pStream);
+ if (code != 0) {
+ sdbRelease(pMnode->pSdb, pStream);
+ mndTransDrop(pTrans);
+ return code;
}
- taosWUnLockLatch(&pStream->lock);
-
- int32_t code = mndPersistTransLog(pStream, pTrans, SDB_STATUS_READY);
+ code = mndPersistTransLog(pStream, pTrans, SDB_STATUS_READY);
if (code != TSDB_CODE_SUCCESS) {
sdbRelease(pMnode->pSdb, pStream);
+ mndTransDrop(pTrans);
return -1;
}
@@ -219,7 +182,40 @@ static int32_t mndDropOrphanTasks(SMnode* pMnode, SArray* pList) {
mndTransDrop(pTrans);
return -1;
}
+ mndTransDrop(pTrans);
+ return 0;
+}
+int32_t suspendAllStreams(SMnode *pMnode, SRpcHandleInfo* info){
+ SSdb *pSdb = pMnode->pSdb;
+ SStreamObj *pStream = NULL;
+ void* pIter = NULL;
+ while(1) {
+ pIter = sdbFetch(pSdb, SDB_STREAM, pIter, (void **)&pStream);
+ if (pIter == NULL) break;
+
+ if(pStream->status != STREAM_STATUS__PAUSE){
+ SMPauseStreamReq reqPause = {0};
+ strcpy(reqPause.name, pStream->name);
+ reqPause.igNotExists = 1;
+
+ int32_t contLen = tSerializeSMPauseStreamReq(NULL, 0, &reqPause);
+ void * pHead = rpcMallocCont(contLen);
+ tSerializeSMPauseStreamReq(pHead, contLen, &reqPause);
+
+ SRpcMsg rpcMsg = {
+ .msgType = TDMT_MND_PAUSE_STREAM,
+ .pCont = pHead,
+ .contLen = contLen,
+ .info = *info,
+ };
+
+ tmsgPutToQueue(&pMnode->msgCb, WRITE_QUEUE, &rpcMsg);
+ mInfo("receive pause stream:%s, %s, %p, because grant expired", pStream->name, reqPause.name, reqPause.name);
+ }
+
+ sdbRelease(pSdb, pStream);
+ }
return 0;
}
@@ -229,6 +225,12 @@ int32_t mndProcessStreamHb(SRpcMsg *pReq) {
SArray *pFailedTasks = taosArrayInit(4, sizeof(SFailedCheckpointInfo));
SArray *pOrphanTasks = taosArrayInit(3, sizeof(SOrphanTask));
+ if(grantCheck(TSDB_GRANT_STREAMS) < 0){
+ if(suspendAllStreams(pMnode, &pReq->info) < 0){
+ return -1;
+ }
+ }
+
SDecoder decoder = {0};
tDecoderInit(&decoder, pReq->pCont, pReq->contLen);
diff --git a/source/dnode/mnode/impl/src/mndStreamTrans.c b/source/dnode/mnode/impl/src/mndStreamTrans.c
index 0a7397827e..5bfd3933b5 100644
--- a/source/dnode/mnode/impl/src/mndStreamTrans.c
+++ b/source/dnode/mnode/impl/src/mndStreamTrans.c
@@ -23,10 +23,10 @@ typedef struct SKeyInfo {
static int32_t clearFinishedTrans(SMnode* pMnode);
-int32_t mndStreamRegisterTrans(STrans* pTrans, const char* pTransName, int64_t streamUid) {
+int32_t mndStreamRegisterTrans(STrans* pTrans, const char* pTransName, int64_t streamId) {
SStreamTransInfo info = {
- .transId = pTrans->id, .startTime = taosGetTimestampMs(), .name = pTransName, .streamUid = streamUid};
- taosHashPut(execInfo.transMgmt.pDBTrans, &streamUid, sizeof(streamUid), &info, sizeof(SStreamTransInfo));
+ .transId = pTrans->id, .startTime = taosGetTimestampMs(), .name = pTransName, .streamId = streamId};
+ taosHashPut(execInfo.transMgmt.pDBTrans, &streamId, sizeof(streamId), &info, sizeof(SStreamTransInfo));
return 0;
}
@@ -65,7 +65,7 @@ int32_t clearFinishedTrans(SMnode* pMnode) {
return 0;
}
-bool mndStreamTransConflictCheck(SMnode* pMnode, int64_t streamUid, const char* pTransName, bool lock) {
+bool mndStreamTransConflictCheck(SMnode* pMnode, int64_t streamId, const char* pTransName, bool lock) {
if (lock) {
taosThreadMutexLock(&execInfo.lock);
}
@@ -80,7 +80,7 @@ bool mndStreamTransConflictCheck(SMnode* pMnode, int64_t streamUid, const char*
clearFinishedTrans(pMnode);
- SStreamTransInfo *pEntry = taosHashGet(execInfo.transMgmt.pDBTrans, &streamUid, sizeof(streamUid));
+ SStreamTransInfo *pEntry = taosHashGet(execInfo.transMgmt.pDBTrans, &streamId, sizeof(streamId));
if (pEntry != NULL) {
SStreamTransInfo tInfo = *pEntry;
@@ -90,7 +90,7 @@ bool mndStreamTransConflictCheck(SMnode* pMnode, int64_t streamUid, const char*
if (strcmp(tInfo.name, MND_STREAM_CHECKPOINT_NAME) == 0) {
if ((strcmp(pTransName, MND_STREAM_DROP_NAME) != 0) && (strcmp(pTransName, MND_STREAM_TASK_RESET_NAME) != 0)) {
- mWarn("conflict with other transId:%d streamUid:0x%" PRIx64 ", trans:%s", tInfo.transId, tInfo.streamUid,
+ mWarn("conflict with other transId:%d streamUid:0x%" PRIx64 ", trans:%s", tInfo.transId, tInfo.streamId,
tInfo.name);
terrno = TSDB_CODE_MND_TRANS_CONFLICT;
return true;
@@ -99,13 +99,13 @@ bool mndStreamTransConflictCheck(SMnode* pMnode, int64_t streamUid, const char*
}
} else if ((strcmp(tInfo.name, MND_STREAM_CREATE_NAME) == 0) || (strcmp(tInfo.name, MND_STREAM_DROP_NAME) == 0) ||
(strcmp(tInfo.name, MND_STREAM_TASK_RESET_NAME) == 0)) {
- mWarn("conflict with other transId:%d streamUid:0x%" PRIx64 ", trans:%s", tInfo.transId, tInfo.streamUid,
+ mWarn("conflict with other transId:%d streamUid:0x%" PRIx64 ", trans:%s", tInfo.transId, tInfo.streamId,
tInfo.name);
terrno = TSDB_CODE_MND_TRANS_CONFLICT;
return true;
}
} else {
- mDebug("stream:0x%"PRIx64" no conflict trans existed, continue create trans", streamUid);
+ mDebug("stream:0x%"PRIx64" no conflict trans existed, continue create trans", streamId);
}
if (lock) {
@@ -301,86 +301,4 @@ void killAllCheckpointTrans(SMnode *pMnode, SVgroupChangeInfo *pChangeInfo) {
mDebug("complete clear checkpoints in Dbs");
}
-static void initNodeUpdateMsg(SStreamTaskNodeUpdateMsg *pMsg, const SVgroupChangeInfo *pInfo, SStreamTaskId *pId,
- int32_t transId) {
- pMsg->streamId = pId->streamId;
- pMsg->taskId = pId->taskId;
- pMsg->transId = transId;
- pMsg->pNodeList = taosArrayInit(taosArrayGetSize(pInfo->pUpdateNodeList), sizeof(SNodeUpdateInfo));
- taosArrayAddAll(pMsg->pNodeList, pInfo->pUpdateNodeList);
-}
-static int32_t doBuildStreamTaskUpdateMsg(void **pBuf, int32_t *pLen, SVgroupChangeInfo *pInfo, int32_t nodeId,
- SStreamTaskId *pId, int32_t transId) {
- SStreamTaskNodeUpdateMsg req = {0};
- initNodeUpdateMsg(&req, pInfo, pId, transId);
-
- int32_t code = 0;
- int32_t blen;
-
- tEncodeSize(tEncodeStreamTaskUpdateMsg, &req, blen, code);
- if (code < 0) {
- terrno = TSDB_CODE_OUT_OF_MEMORY;
- taosArrayDestroy(req.pNodeList);
- return -1;
- }
-
- int32_t tlen = sizeof(SMsgHead) + blen;
-
- void *buf = taosMemoryMalloc(tlen);
- if (buf == NULL) {
- terrno = TSDB_CODE_OUT_OF_MEMORY;
- taosArrayDestroy(req.pNodeList);
- return -1;
- }
-
- void *abuf = POINTER_SHIFT(buf, sizeof(SMsgHead));
- SEncoder encoder;
- tEncoderInit(&encoder, abuf, tlen);
- tEncodeStreamTaskUpdateMsg(&encoder, &req);
-
- SMsgHead *pMsgHead = (SMsgHead *)buf;
- pMsgHead->contLen = htonl(tlen);
- pMsgHead->vgId = htonl(nodeId);
-
- tEncoderClear(&encoder);
-
- *pBuf = buf;
- *pLen = tlen;
-
- taosArrayDestroy(req.pNodeList);
- return TSDB_CODE_SUCCESS;
-}
-
-// todo extract method: traverse stream tasks
-// build trans to update the epset
-int32_t mndStreamSetUpdateEpsetAction(SStreamObj *pStream, SVgroupChangeInfo *pInfo, STrans *pTrans) {
- mDebug("stream:0x%" PRIx64 " set tasks epset update action", pStream->uid);
-
- taosWLockLatch(&pStream->lock);
- int32_t numOfLevels = taosArrayGetSize(pStream->tasks);
-
- for (int32_t j = 0; j < numOfLevels; ++j) {
- SArray *pLevel = taosArrayGetP(pStream->tasks, j);
-
- int32_t numOfTasks = taosArrayGetSize(pLevel);
- for (int32_t k = 0; k < numOfTasks; ++k) {
- SStreamTask *pTask = taosArrayGetP(pLevel, k);
-
- void *pBuf = NULL;
- int32_t len = 0;
- streamTaskUpdateEpsetInfo(pTask, pInfo->pUpdateNodeList);
- doBuildStreamTaskUpdateMsg(&pBuf, &len, pInfo, pTask->info.nodeId, &pTask->id, pTrans->id);
-
- int32_t code = setTransAction(pTrans, pBuf, len, TDMT_VND_STREAM_TASK_UPDATE, &pTask->info.epSet, 0);
- if (code != TSDB_CODE_SUCCESS) {
- taosMemoryFree(pBuf);
- taosWUnLockLatch(&pStream->lock);
- return -1;
- }
- }
- }
-
- taosWUnLockLatch(&pStream->lock);
- return 0;
-}
\ No newline at end of file
diff --git a/source/dnode/mnode/impl/src/mndStreamUtil.c b/source/dnode/mnode/impl/src/mndStreamUtil.c
index 5d6e34856b..235c604b27 100644
--- a/source/dnode/mnode/impl/src/mndStreamUtil.c
+++ b/source/dnode/mnode/impl/src/mndStreamUtil.c
@@ -18,15 +18,15 @@
#include "tmisce.h"
#include "mndVgroup.h"
-typedef struct SStreamTaskIter {
+struct SStreamTaskIter {
SStreamObj *pStream;
int32_t level;
int32_t ordinalIndex;
int32_t totalLevel;
SStreamTask *pTask;
-} SStreamTaskIter;
+};
-SStreamTaskIter* createTaskIter(SStreamObj* pStream) {
+SStreamTaskIter* createStreamTaskIter(SStreamObj* pStream) {
SStreamTaskIter* pIter = taosMemoryCalloc(1, sizeof(SStreamTaskIter));
if (pIter == NULL) {
terrno = TSDB_CODE_OUT_OF_MEMORY;
@@ -42,7 +42,7 @@ SStreamTaskIter* createTaskIter(SStreamObj* pStream) {
return pIter;
}
-bool taskIterNextTask(SStreamTaskIter* pIter) {
+bool streamTaskIterNextTask(SStreamTaskIter* pIter) {
if (pIter->level >= pIter->totalLevel) {
pIter->pTask = NULL;
return false;
@@ -70,11 +70,11 @@ bool taskIterNextTask(SStreamTaskIter* pIter) {
return false;
}
-SStreamTask* taskIterGetCurrent(SStreamTaskIter* pIter) {
+SStreamTask* streamTaskIterGetCurrent(SStreamTaskIter* pIter) {
return pIter->pTask;
}
-void destroyTaskIter(SStreamTaskIter* pIter) {
+void destroyStreamTaskIter(SStreamTaskIter* pIter) {
taosMemoryFree(pIter);
}
@@ -235,18 +235,16 @@ static int32_t doSetResumeAction(STrans *pTrans, SMnode *pMnode, SStreamTask *pT
}
SStreamTask *mndGetStreamTask(STaskId *pId, SStreamObj *pStream) {
- for (int32_t i = 0; i < taosArrayGetSize(pStream->tasks); i++) {
- SArray *pLevel = taosArrayGetP(pStream->tasks, i);
-
- int32_t numOfLevels = taosArrayGetSize(pLevel);
- for (int32_t j = 0; j < numOfLevels; j++) {
- SStreamTask *pTask = taosArrayGetP(pLevel, j);
- if (pTask->id.taskId == pId->taskId) {
- return pTask;
- }
+ SStreamTaskIter *pIter = createStreamTaskIter(pStream);
+ while (streamTaskIterNextTask(pIter)) {
+ SStreamTask *pTask = streamTaskIterGetCurrent(pIter);
+ if (pTask->id.taskId == pId->taskId) {
+ destroyStreamTaskIter(pIter);
+ return pTask;
}
}
+ destroyStreamTaskIter(pIter);
return NULL;
}
@@ -261,21 +259,20 @@ int32_t mndGetNumOfStreamTasks(const SStreamObj *pStream) {
}
int32_t mndStreamSetResumeAction(STrans *pTrans, SMnode *pMnode, SStreamObj *pStream, int8_t igUntreated) {
- int32_t size = taosArrayGetSize(pStream->tasks);
- for (int32_t i = 0; i < size; i++) {
- SArray *pTasks = taosArrayGetP(pStream->tasks, i);
- int32_t sz = taosArrayGetSize(pTasks);
- for (int32_t j = 0; j < sz; j++) {
- SStreamTask *pTask = taosArrayGetP(pTasks, j);
- if (doSetResumeAction(pTrans, pMnode, pTask, igUntreated) < 0) {
- return -1;
- }
+ SStreamTaskIter *pIter = createStreamTaskIter(pStream);
- if (atomic_load_8(&pTask->status.taskStatus) == TASK_STATUS__PAUSE) {
- atomic_store_8(&pTask->status.taskStatus, pTask->status.statusBackup);
- }
+ while (streamTaskIterNextTask(pIter)) {
+ SStreamTask *pTask = streamTaskIterGetCurrent(pIter);
+ if (doSetResumeAction(pTrans, pMnode, pTask, igUntreated) < 0) {
+ destroyStreamTaskIter(pIter);
+ return -1;
+ }
+
+ if (atomic_load_8(&pTask->status.taskStatus) == TASK_STATUS__PAUSE) {
+ atomic_store_8(&pTask->status.taskStatus, pTask->status.statusBackup);
}
}
+ destroyStreamTaskIter(pIter);
return 0;
}
@@ -311,12 +308,12 @@ static int32_t doSetPauseAction(SMnode *pMnode, STrans *pTrans, SStreamTask *pTa
}
int32_t mndStreamSetPauseAction(SMnode *pMnode, STrans *pTrans, SStreamObj *pStream) {
- SStreamTaskIter *pIter = createTaskIter(pStream);
+ SStreamTaskIter *pIter = createStreamTaskIter(pStream);
- while (taskIterNextTask(pIter)) {
- SStreamTask *pTask = taskIterGetCurrent(pIter);
+ while (streamTaskIterNextTask(pIter)) {
+ SStreamTask *pTask = streamTaskIterGetCurrent(pIter);
if (doSetPauseAction(pMnode, pTrans, pTask) < 0) {
- destroyTaskIter(pIter);
+ destroyStreamTaskIter(pIter);
return -1;
}
@@ -326,7 +323,7 @@ int32_t mndStreamSetPauseAction(SMnode *pMnode, STrans *pTrans, SStreamObj *pStr
}
}
- destroyTaskIter(pIter);
+ destroyStreamTaskIter(pIter);
return 0;
}
@@ -360,16 +357,16 @@ static int32_t doSetDropAction(SMnode *pMnode, STrans *pTrans, SStreamTask *pTas
}
int32_t mndStreamSetDropAction(SMnode *pMnode, STrans *pTrans, SStreamObj *pStream) {
- SStreamTaskIter *pIter = createTaskIter(pStream);
+ SStreamTaskIter *pIter = createStreamTaskIter(pStream);
- while(taskIterNextTask(pIter)) {
- SStreamTask *pTask = taskIterGetCurrent(pIter);
+ while(streamTaskIterNextTask(pIter)) {
+ SStreamTask *pTask = streamTaskIterGetCurrent(pIter);
if (doSetDropAction(pMnode, pTrans, pTask) < 0) {
- destroyTaskIter(pIter);
+ destroyStreamTaskIter(pIter);
return -1;
}
}
- destroyTaskIter(pIter);
+ destroyStreamTaskIter(pIter);
return 0;
}
@@ -410,4 +407,139 @@ int32_t mndStreamSetDropActionFromList(SMnode *pMnode, STrans *pTrans, SArray* p
doSetDropActionFromId(pMnode, pTrans, pTask);
}
return 0;
-}
\ No newline at end of file
+}
+
+static void initNodeUpdateMsg(SStreamTaskNodeUpdateMsg *pMsg, const SVgroupChangeInfo *pInfo, SStreamTaskId *pId,
+ int32_t transId) {
+ pMsg->streamId = pId->streamId;
+ pMsg->taskId = pId->taskId;
+ pMsg->transId = transId;
+ pMsg->pNodeList = taosArrayInit(taosArrayGetSize(pInfo->pUpdateNodeList), sizeof(SNodeUpdateInfo));
+ taosArrayAddAll(pMsg->pNodeList, pInfo->pUpdateNodeList);
+}
+
+static int32_t doBuildStreamTaskUpdateMsg(void **pBuf, int32_t *pLen, SVgroupChangeInfo *pInfo, int32_t nodeId,
+ SStreamTaskId *pId, int32_t transId) {
+ SStreamTaskNodeUpdateMsg req = {0};
+ initNodeUpdateMsg(&req, pInfo, pId, transId);
+
+ int32_t code = 0;
+ int32_t blen;
+
+ tEncodeSize(tEncodeStreamTaskUpdateMsg, &req, blen, code);
+ if (code < 0) {
+ terrno = TSDB_CODE_OUT_OF_MEMORY;
+ taosArrayDestroy(req.pNodeList);
+ return -1;
+ }
+
+ int32_t tlen = sizeof(SMsgHead) + blen;
+
+ void *buf = taosMemoryMalloc(tlen);
+ if (buf == NULL) {
+ terrno = TSDB_CODE_OUT_OF_MEMORY;
+ taosArrayDestroy(req.pNodeList);
+ return -1;
+ }
+
+ void *abuf = POINTER_SHIFT(buf, sizeof(SMsgHead));
+ SEncoder encoder;
+ tEncoderInit(&encoder, abuf, tlen);
+ tEncodeStreamTaskUpdateMsg(&encoder, &req);
+
+ SMsgHead *pMsgHead = (SMsgHead *)buf;
+ pMsgHead->contLen = htonl(tlen);
+ pMsgHead->vgId = htonl(nodeId);
+
+ tEncoderClear(&encoder);
+
+ *pBuf = buf;
+ *pLen = tlen;
+
+ taosArrayDestroy(req.pNodeList);
+ return TSDB_CODE_SUCCESS;
+}
+
+static int32_t doSetUpdateTaskAction(STrans *pTrans, SStreamTask *pTask, SVgroupChangeInfo *pInfo) {
+ void *pBuf = NULL;
+ int32_t len = 0;
+ streamTaskUpdateEpsetInfo(pTask, pInfo->pUpdateNodeList);
+
+ doBuildStreamTaskUpdateMsg(&pBuf, &len, pInfo, pTask->info.nodeId, &pTask->id, pTrans->id);
+
+ int32_t code = setTransAction(pTrans, pBuf, len, TDMT_VND_STREAM_TASK_UPDATE, &pTask->info.epSet, 0);
+ if (code != TSDB_CODE_SUCCESS) {
+ taosMemoryFree(pBuf);
+ }
+
+ return code;
+}
+
+// build trans to update the epset
+int32_t mndStreamSetUpdateEpsetAction(SStreamObj *pStream, SVgroupChangeInfo *pInfo, STrans *pTrans) {
+ mDebug("stream:0x%" PRIx64 " set tasks epset update action", pStream->uid);
+ taosWLockLatch(&pStream->lock);
+
+ SStreamTaskIter *pIter = createStreamTaskIter(pStream);
+ while (streamTaskIterNextTask(pIter)) {
+ SStreamTask *pTask = streamTaskIterGetCurrent(pIter);
+ int32_t code = doSetUpdateTaskAction(pTrans, pTask, pInfo);
+ if (code != TSDB_CODE_SUCCESS) {
+ destroyStreamTaskIter(pIter);
+ taosWUnLockLatch(&pStream->lock);
+ return -1;
+ }
+ }
+
+ destroyStreamTaskIter(pIter);
+ taosWUnLockLatch(&pStream->lock);
+ return 0;
+}
+
+static int32_t doSetResetAction(SMnode *pMnode, STrans *pTrans, SStreamTask *pTask) {
+ SVResetStreamTaskReq *pReq = taosMemoryCalloc(1, sizeof(SVResetStreamTaskReq));
+ if (pReq == NULL) {
+ terrno = TSDB_CODE_OUT_OF_MEMORY;
+ mError("failed to malloc in reset stream, size:%" PRIzu ", code:%s", sizeof(SVResetStreamTaskReq),
+ tstrerror(TSDB_CODE_OUT_OF_MEMORY));
+ return terrno;
+ }
+
+ pReq->head.vgId = htonl(pTask->info.nodeId);
+ pReq->taskId = pTask->id.taskId;
+ pReq->streamId = pTask->id.streamId;
+
+ SEpSet epset = {0};
+ bool hasEpset = false;
+ int32_t code = extractNodeEpset(pMnode, &epset, &hasEpset, pTask->id.taskId, pTask->info.nodeId);
+ if (code != TSDB_CODE_SUCCESS || !hasEpset) {
+ taosMemoryFree(pReq);
+ return code;
+ }
+
+ code = setTransAction(pTrans, pReq, sizeof(SVResetStreamTaskReq), TDMT_VND_STREAM_TASK_RESET, &epset, 0);
+ if (code != TSDB_CODE_SUCCESS) {
+ taosMemoryFree(pReq);
+ }
+
+ return code;
+}
+
+int32_t mndStreamSetResetTaskAction(SMnode *pMnode, STrans *pTrans, SStreamObj *pStream) {
+ taosWLockLatch(&pStream->lock);
+
+ SStreamTaskIter *pIter = createStreamTaskIter(pStream);
+ while (streamTaskIterNextTask(pIter)) {
+ SStreamTask *pTask = streamTaskIterGetCurrent(pIter);
+ int32_t code = doSetResetAction(pMnode, pTrans, pTask);
+ if (code != TSDB_CODE_SUCCESS) {
+ destroyStreamTaskIter(pIter);
+ taosWUnLockLatch(&pStream->lock);
+ return -1;
+ }
+ }
+
+ destroyStreamTaskIter(pIter);
+ taosWUnLockLatch(&pStream->lock);
+ return 0;
+}
diff --git a/source/dnode/mnode/impl/src/mndTrans.c b/source/dnode/mnode/impl/src/mndTrans.c
index 9075f0145c..1adc4ed4bf 100644
--- a/source/dnode/mnode/impl/src/mndTrans.c
+++ b/source/dnode/mnode/impl/src/mndTrans.c
@@ -599,6 +599,8 @@ STrans *mndTransCreate(SMnode *pMnode, ETrnPolicy policy, ETrnConflct conflict,
pTrans->originRpcType = pReq->msgType;
}
+ mInfo("trans:%d, create transaction:%s, origin:%s", pTrans->id, pTrans->opername, opername);
+
mTrace("trans:%d, local object is created, data:%p", pTrans->id, pTrans);
return pTrans;
}
@@ -845,6 +847,8 @@ int32_t mndTransCheckConflict(SMnode *pMnode, STrans *pTrans) {
}
int32_t mndTransPrepare(SMnode *pMnode, STrans *pTrans) {
+ if(pTrans == NULL) return -1;
+
if (mndTransCheckConflict(pMnode, pTrans) != 0) {
return -1;
}
diff --git a/source/dnode/mnode/impl/src/mndUser.c b/source/dnode/mnode/impl/src/mndUser.c
index 0e3b544508..5e5a3626a4 100644
--- a/source/dnode/mnode/impl/src/mndUser.c
+++ b/source/dnode/mnode/impl/src/mndUser.c
@@ -1925,6 +1925,7 @@ static int32_t mndProcessAlterUserPrivilegesReq(SAlterUserReq *pAlterReq, SMnode
return -1;
}
taosHashPut(pNewUser->topics, pTopic->name, len, pTopic->name, TSDB_TOPIC_FNAME_LEN);
+ mndReleaseTopic(pMnode, pTopic);
}
if (ALTER_USER_DEL_SUBSCRIBE_TOPIC_PRIV(pAlterReq->alterType, pAlterReq->privileges)) {
@@ -1935,6 +1936,7 @@ static int32_t mndProcessAlterUserPrivilegesReq(SAlterUserReq *pAlterReq, SMnode
return -1;
}
taosHashRemove(pNewUser->topics, pAlterReq->objname, len);
+ mndReleaseTopic(pMnode, pTopic);
}
return TSDB_CODE_SUCCESS;
diff --git a/source/dnode/mnode/sdb/inc/sdb.h b/source/dnode/mnode/sdb/inc/sdb.h
index e1beaaa910..9d1125dad2 100644
--- a/source/dnode/mnode/sdb/inc/sdb.h
+++ b/source/dnode/mnode/sdb/inc/sdb.h
@@ -152,7 +152,8 @@ typedef enum {
SDB_STREAM_SEQ = 23,
SDB_COMPACT = 24,
SDB_COMPACT_DETAIL = 25,
- SDB_MAX = 26
+ SDB_GRANT = 26, // grant log
+ SDB_MAX = 27
} ESdbType;
typedef struct SSdbRaw {
diff --git a/source/dnode/vnode/src/meta/metaIdx.c b/source/dnode/vnode/src/meta/metaIdx.c
index efa06d2d1f..dc62ab2b9f 100644
--- a/source/dnode/vnode/src/meta/metaIdx.c
+++ b/source/dnode/vnode/src/meta/metaIdx.c
@@ -62,6 +62,7 @@ int metaOpenIdx(SMeta *pMeta) {
return 0;
}
+#ifdef BUILD_NO_CALL
void metaCloseIdx(SMeta *pMeta) { /* TODO */
#if 0
if (pMeta->pIdx) {
@@ -114,3 +115,4 @@ int metaRemoveTableFromIdx(SMeta *pMeta, tb_uid_t uid) {
// TODO
return 0;
}
+#endif
\ No newline at end of file
diff --git a/source/dnode/vnode/src/meta/metaOpen.c b/source/dnode/vnode/src/meta/metaOpen.c
index 8cab17c417..c09253dd6a 100644
--- a/source/dnode/vnode/src/meta/metaOpen.c
+++ b/source/dnode/vnode/src/meta/metaOpen.c
@@ -273,7 +273,9 @@ static void metaCleanup(SMeta **ppMeta) {
if (pMeta) {
if (pMeta->pEnv) metaAbort(pMeta);
if (pMeta->pCache) metaCacheClose(pMeta);
+#ifdef BUILD_NO_CALL
if (pMeta->pIdx) metaCloseIdx(pMeta);
+#endif
if (pMeta->pStreamDb) tdbTbClose(pMeta->pStreamDb);
if (pMeta->pNcolIdx) tdbTbClose(pMeta->pNcolIdx);
if (pMeta->pBtimeIdx) tdbTbClose(pMeta->pBtimeIdx);
diff --git a/source/dnode/vnode/src/tq/tq.c b/source/dnode/vnode/src/tq/tq.c
index a689932754..8689c30a55 100644
--- a/source/dnode/vnode/src/tq/tq.c
+++ b/source/dnode/vnode/src/tq/tq.c
@@ -738,10 +738,9 @@ int32_t tqExpandTask(STQ* pTq, SStreamTask* pTask, int64_t nextProcessVer) {
if (pTask->pState == NULL) {
tqError("s-task:%s (vgId:%d) failed to open state for task", pTask->id.idStr, vgId);
return -1;
- } else {
- tqDebug("s-task:%s state:%p", pTask->id.idStr, pTask->pState);
}
+ tqDebug("s-task:%s state:%p", pTask->id.idStr, pTask->pState);
if (pTask->info.fillHistory) {
restoreStreamTaskId(pTask, &taskId);
}
@@ -835,8 +834,8 @@ int32_t tqExpandTask(STQ* pTq, SStreamTask* pTask, int64_t nextProcessVer) {
SCheckpointInfo* pChkInfo = &pTask->chkInfo;
// checkpoint ver is the kept version, handled data should be the next version.
- if (pTask->chkInfo.checkpointId != 0) {
- pTask->chkInfo.nextProcessVer = pTask->chkInfo.checkpointVer + 1;
+ if (pChkInfo->checkpointId != 0) {
+ pChkInfo->nextProcessVer = pChkInfo->checkpointVer + 1;
tqInfo("s-task:%s restore from the checkpointId:%" PRId64 " ver:%" PRId64 " currentVer:%" PRId64, pTask->id.idStr,
pChkInfo->checkpointId, pChkInfo->checkpointVer, pChkInfo->nextProcessVer);
}
@@ -846,17 +845,19 @@ int32_t tqExpandTask(STQ* pTq, SStreamTask* pTask, int64_t nextProcessVer) {
if (pTask->info.fillHistory) {
tqInfo("vgId:%d expand stream task, s-task:%s, checkpointId:%" PRId64 " checkpointVer:%" PRId64
" nextProcessVer:%" PRId64
- " child id:%d, level:%d, status:%s fill-history:%d, related stream task:0x%x trigger:%" PRId64 " ms",
+ " child id:%d, level:%d, status:%s fill-history:%d, related stream task:0x%x trigger:%" PRId64
+ " ms, inputVer:%" PRId64,
vgId, pTask->id.idStr, pChkInfo->checkpointId, pChkInfo->checkpointVer, pChkInfo->nextProcessVer,
pTask->info.selfChildId, pTask->info.taskLevel, p, pTask->info.fillHistory,
- (int32_t)pTask->streamTaskId.taskId, pTask->info.triggerParam);
+ (int32_t)pTask->streamTaskId.taskId, pTask->info.triggerParam, nextProcessVer);
} else {
tqInfo("vgId:%d expand stream task, s-task:%s, checkpointId:%" PRId64 " checkpointVer:%" PRId64
" nextProcessVer:%" PRId64
- " child id:%d, level:%d, status:%s fill-history:%d, related fill-task:0x%x trigger:%" PRId64 " ms",
+ " child id:%d, level:%d, status:%s fill-history:%d, related fill-task:0x%x trigger:%" PRId64
+ " ms, inputVer:%" PRId64,
vgId, pTask->id.idStr, pChkInfo->checkpointId, pChkInfo->checkpointVer, pChkInfo->nextProcessVer,
pTask->info.selfChildId, pTask->info.taskLevel, p, pTask->info.fillHistory,
- (int32_t)pTask->hTaskInfo.id.taskId, pTask->info.triggerParam);
+ (int32_t)pTask->hTaskInfo.id.taskId, pTask->info.triggerParam, nextProcessVer);
}
return 0;
@@ -876,12 +877,11 @@ int32_t tqProcessTaskDeployReq(STQ* pTq, int64_t sversion, char* msg, int32_t ms
}
static void doStartFillhistoryStep2(SStreamTask* pTask, SStreamTask* pStreamTask, STQ* pTq) {
- const char* id = pTask->id.idStr;
- int64_t nextProcessedVer = pStreamTask->hTaskInfo.haltVer;
-
- // if it's an source task, extract the last version in wal.
+ const char* id = pTask->id.idStr;
+ int64_t nextProcessedVer = pStreamTask->hTaskInfo.haltVer;
SVersionRange* pRange = &pTask->dataRange.range;
+ // if it's an source task, extract the last version in wal.
bool done = streamHistoryTaskSetVerRangeStep2(pTask, nextProcessedVer);
pTask->execInfo.step2Start = taosGetTimestampMs();
diff --git a/source/dnode/vnode/src/tqCommon/tqCommon.c b/source/dnode/vnode/src/tqCommon/tqCommon.c
index 21bc09eba0..c4973b7c1e 100644
--- a/source/dnode/vnode/src/tqCommon/tqCommon.c
+++ b/source/dnode/vnode/src/tqCommon/tqCommon.c
@@ -49,7 +49,7 @@ int32_t tqStreamTaskStartAsync(SStreamMeta* pMeta, SMsgCb* cb, bool restart) {
return 0;
}
-int32_t tqStreamOneTaskStartAsync(SStreamMeta* pMeta, SMsgCb* cb, int64_t streamId, int32_t taskId) {
+int32_t tqStreamStartOneTaskAsync(SStreamMeta* pMeta, SMsgCb* cb, int64_t streamId, int32_t taskId) {
int32_t vgId = pMeta->vgId;
int32_t numOfTasks = taosArrayGetSize(pMeta->pTaskList);
@@ -547,7 +547,7 @@ int32_t tqStreamTaskProcessDeployReq(SStreamMeta* pMeta, SMsgCb* cb, int64_t sve
streamMetaWUnLock(pMeta);
if (code < 0) {
- tqError("failed to add s-task:0x%x into vgId:%d meta, total:%d, code:%s", vgId, taskId, numOfTasks,
+ tqError("failed to add s-task:0x%x into vgId:%d meta, existed:%d, code:%s", vgId, taskId, numOfTasks,
tstrerror(code));
tFreeStreamTask(pTask);
return code;
@@ -562,9 +562,10 @@ int32_t tqStreamTaskProcessDeployReq(SStreamMeta* pMeta, SMsgCb* cb, int64_t sve
if (restored) {
SStreamTask* p = streamMetaAcquireTask(pMeta, streamId, taskId);
- if (p != NULL && (p->info.fillHistory == 0)) {
- tqStreamOneTaskStartAsync(pMeta, cb, streamId, taskId);
+ if ((p != NULL) && (p->info.fillHistory == 0)) {
+ tqStreamStartOneTaskAsync(pMeta, cb, streamId, taskId);
}
+
if (p != NULL) {
streamMetaReleaseTask(pMeta, p);
}
diff --git a/source/dnode/vnode/src/tsdb/tsdbRead2.c b/source/dnode/vnode/src/tsdb/tsdbRead2.c
index 609f38cead..9d158668d2 100644
--- a/source/dnode/vnode/src/tsdb/tsdbRead2.c
+++ b/source/dnode/vnode/src/tsdb/tsdbRead2.c
@@ -2294,6 +2294,7 @@ void updateComposedBlockInfo(STsdbReader* pReader, double el, STableBlockScanInf
pResBlock->info.id.uid = (pBlockScanInfo != NULL) ? pBlockScanInfo->uid : 0;
pResBlock->info.dataLoad = 1;
+ pResBlock->info.version = pReader->info.verRange.maxVer;
blockDataUpdateTsWindow(pResBlock, pReader->suppInfo.slotId[0]);
setComposedBlockFlag(pReader, true);
@@ -2799,6 +2800,7 @@ static int32_t doBuildDataBlock(STsdbReader* pReader) {
pInfo->rows = pBlockInfo->numRow;
pInfo->id.uid = pScanInfo->uid;
pInfo->dataLoad = 0;
+ pInfo->version = pReader->info.verRange.maxVer;
pInfo->window = (STimeWindow){.skey = pBlockInfo->firstKey, .ekey = pBlockInfo->lastKey};
setComposedBlockFlag(pReader, false);
setBlockAllDumped(&pStatus->fBlockDumpInfo, pBlockInfo->lastKey, pReader->info.order);
diff --git a/source/libs/command/src/command.c b/source/libs/command/src/command.c
index 6bae0e1022..c45a8931d2 100644
--- a/source/libs/command/src/command.c
+++ b/source/libs/command/src/command.c
@@ -886,7 +886,7 @@ int32_t setLocalVariablesResultIntoDataBlock(SSDataBlock* pBlock) {
for (int32_t i = 0, c = 0; i < numOfCfg; ++i, c = 0) {
SConfigItem* pItem = taosArrayGet(tsCfg->array, i);
- GRANT_CFG_SKIP;
+ // GRANT_CFG_SKIP;
char name[TSDB_CONFIG_OPTION_LEN + VARSTR_HEADER_SIZE] = {0};
STR_WITH_MAXSIZE_TO_VARSTR(name, pItem->name, TSDB_CONFIG_OPTION_LEN + VARSTR_HEADER_SIZE);
diff --git a/source/libs/executor/inc/executorInt.h b/source/libs/executor/inc/executorInt.h
index b19c7408b0..ca651b4968 100644
--- a/source/libs/executor/inc/executorInt.h
+++ b/source/libs/executor/inc/executorInt.h
@@ -279,7 +279,6 @@ typedef struct STableScanInfo {
int8_t assignBlockUid;
uint8_t countState; // empty table count state
bool hasGroupByTag;
- bool countOnly;
bool filesetDelimited;
bool needCountEmptyTable;
} STableScanInfo;
@@ -758,10 +757,12 @@ extern void doDestroyExchangeOperatorInfo(void* param);
int32_t doFilter(SSDataBlock* pBlock, SFilterInfo* pFilterInfo, SColMatchInfo* pColMatchInfo);
int32_t addTagPseudoColumnData(SReadHandle* pHandle, const SExprInfo* pExpr, int32_t numOfExpr, SSDataBlock* pBlock,
- int32_t rows, const char* idStr, STableMetaCacheInfo* pCache);
+ int32_t rows, SExecTaskInfo* pTask, STableMetaCacheInfo* pCache);
void appendOneRowToDataBlock(SSDataBlock* pBlock, STupleHandle* pTupleHandle);
void setTbNameColData(const SSDataBlock* pBlock, SColumnInfoData* pColInfoData, int32_t functionId, const char* name);
+void setVgIdColData(const SSDataBlock* pBlock, SColumnInfoData* pColInfoData, int32_t functionId, int32_t vgId);
+void setVgVerColData(const SSDataBlock* pBlock, SColumnInfoData* pColInfoData, int32_t functionId, int64_t vgVer);
void setResultRowInitCtx(SResultRow* pResult, SqlFunctionCtx* pCtx, int32_t numOfOutput, int32_t* rowEntryInfoOffset);
void clearResultRowInitFlag(SqlFunctionCtx* pCtx, int32_t numOfOutput);
diff --git a/source/libs/executor/src/cachescanoperator.c b/source/libs/executor/src/cachescanoperator.c
index 63fcfba7c1..e4fa9f7580 100644
--- a/source/libs/executor/src/cachescanoperator.c
+++ b/source/libs/executor/src/cachescanoperator.c
@@ -250,7 +250,7 @@ SSDataBlock* doScanCache(SOperatorInfo* pOperator) {
SExprSupp* pSup = &pInfo->pseudoExprSup;
int32_t code = addTagPseudoColumnData(&pInfo->readHandle, pSup->pExprInfo, pSup->numOfExprs, pRes,
- pRes->info.rows, GET_TASKID(pTaskInfo), NULL);
+ pRes->info.rows, pTaskInfo, NULL);
if (code != TSDB_CODE_SUCCESS) {
pTaskInfo->code = code;
return NULL;
@@ -313,7 +313,7 @@ SSDataBlock* doScanCache(SOperatorInfo* pOperator) {
if (taosArrayGetSize(pInfo->pUidList) > 0) {
pInfo->pRes->info.id.uid = *(tb_uid_t*)taosArrayGet(pInfo->pUidList, 0);
code = addTagPseudoColumnData(&pInfo->readHandle, pSup->pExprInfo, pSup->numOfExprs, pInfo->pRes,
- pInfo->pRes->info.rows, GET_TASKID(pTaskInfo), NULL);
+ pInfo->pRes->info.rows, pTaskInfo, NULL);
if (code != TSDB_CODE_SUCCESS) {
pTaskInfo->code = code;
return NULL;
diff --git a/source/libs/executor/src/executor.c b/source/libs/executor/src/executor.c
index 3472f4e14d..fc0589031a 100644
--- a/source/libs/executor/src/executor.c
+++ b/source/libs/executor/src/executor.c
@@ -1080,7 +1080,7 @@ bool qStreamScanhistoryFinished(qTaskInfo_t tinfo) {
int32_t qStreamInfoResetTimewindowFilter(qTaskInfo_t tinfo) {
SExecTaskInfo* pTaskInfo = (SExecTaskInfo*)tinfo;
- STimeWindow* pWindow = &pTaskInfo->streamInfo.fillHistoryWindow;
+ STimeWindow* pWindow = &pTaskInfo->streamInfo.fillHistoryWindow;
qDebug("%s remove timeWindow filter:%" PRId64 "-%" PRId64 ", set new window:%" PRId64 "-%" PRId64,
GET_TASKID(pTaskInfo), pWindow->skey, pWindow->ekey, INT64_MIN, INT64_MAX);
diff --git a/source/libs/executor/src/executorInt.c b/source/libs/executor/src/executorInt.c
index ff4d3d0d27..76dc622cfd 100644
--- a/source/libs/executor/src/executorInt.c
+++ b/source/libs/executor/src/executorInt.c
@@ -311,6 +311,7 @@ static int32_t doSetInputDataBlock(SExprSupp* pExprSup, SSDataBlock* pBlock, int
pInput->totalRows = pBlock->info.rows;
pInput->numOfRows = pBlock->info.rows;
pInput->startRowIndex = 0;
+ pInput->blankFill = pBlock->info.blankFill;
// NOTE: the last parameter is the primary timestamp column
// todo: refactor this
@@ -325,6 +326,7 @@ static int32_t doSetInputDataBlock(SExprSupp* pExprSup, SSDataBlock* pBlock, int
pInput->totalRows = pBlock->info.rows;
pInput->numOfRows = pBlock->info.rows;
pInput->startRowIndex = 0;
+ pInput->blankFill = pBlock->info.blankFill;
code = doCreateConstantValColumnInfo(pInput, pFuncParam, j, pBlock->info.rows);
if (code != TSDB_CODE_SUCCESS) {
diff --git a/source/libs/executor/src/groupoperator.c b/source/libs/executor/src/groupoperator.c
index 1e9771edd6..87b8cd366c 100644
--- a/source/libs/executor/src/groupoperator.c
+++ b/source/libs/executor/src/groupoperator.c
@@ -287,7 +287,6 @@ static void doHashGroupbyAgg(SOperatorInfo* pOperator, SSDataBlock* pBlock) {
terrno = TSDB_CODE_SUCCESS;
int32_t num = 0;
- uint64_t groupId = 0;
for (int32_t j = 0; j < pBlock->info.rows; ++j) {
// Compare with the previous row of this column, and do not set the output buffer again if they are identical.
if (!pInfo->isInit) {
@@ -478,20 +477,6 @@ static SSDataBlock* hashGroupbyAggregate(SOperatorInfo* pOperator) {
pOperator->status = OP_RES_TO_RETURN;
-#if 0
- if(pOperator->fpSet.encodeResultRow){
- char *result = NULL;
- int32_t length = 0;
- pOperator->fpSet.encodeResultRow(pOperator, &result, &length);
- SAggSupporter* pSup = &pInfo->aggSup;
- taosHashClear(pSup->pResultRowHashTable);
- pInfo->binfo.resultRowInfo.size = 0;
- pOperator->fpSet.decodeResultRow(pOperator, result);
- if(result){
- taosMemoryFree(result);
- }
- }
-#endif
// initGroupedResultInfo(&pInfo->groupResInfo, pInfo->aggSup.pResultRowHashTable, 0);
if (pGroupResInfo->pRows != NULL) {
taosArrayDestroy(pGroupResInfo->pRows);
diff --git a/source/libs/executor/src/scanoperator.c b/source/libs/executor/src/scanoperator.c
index 3659ef7fb2..bfd68fbbc4 100644
--- a/source/libs/executor/src/scanoperator.c
+++ b/source/libs/executor/src/scanoperator.c
@@ -21,7 +21,6 @@
#include "querynodes.h"
#include "systable.h"
#include "tname.h"
-#include "ttime.h"
#include "tdatablock.h"
#include "tmsg.h"
@@ -252,7 +251,7 @@ static void doSetTagColumnData(STableScanBase* pTableScanInfo, SSDataBlock* pBlo
SExprSupp* pSup = &pTableScanInfo->pseudoSup;
int32_t code = addTagPseudoColumnData(&pTableScanInfo->readHandle, pSup->pExprInfo, pSup->numOfExprs, pBlock, rows,
- GET_TASKID(pTaskInfo), &pTableScanInfo->metaCache);
+ pTaskInfo, &pTableScanInfo->metaCache);
// ignore the table not exists error, since this table may have been dropped during the scan procedure.
if (code != TSDB_CODE_SUCCESS && code != TSDB_CODE_PAR_TABLE_NOT_EXIST) {
T_LONG_JMP(pTaskInfo->env, code);
@@ -295,8 +294,8 @@ bool applyLimitOffset(SLimitInfo* pLimitInfo, SSDataBlock* pBlock, SExecTaskInfo
static int32_t loadDataBlock(SOperatorInfo* pOperator, STableScanBase* pTableScanInfo, SSDataBlock* pBlock,
uint32_t* status) {
- SExecTaskInfo* pTaskInfo = pOperator->pTaskInfo;
- SStorageAPI* pAPI = &pTaskInfo->storageAPI;
+ SExecTaskInfo* pTaskInfo = pOperator->pTaskInfo;
+ SStorageAPI* pAPI = &pTaskInfo->storageAPI;
SFileBlockLoadRecorder* pCost = &pTableScanInfo->readRecorder;
@@ -482,24 +481,25 @@ static void doSetNullValue(SSDataBlock* pBlock, const SExprInfo* pExpr, int32_t
}
int32_t addTagPseudoColumnData(SReadHandle* pHandle, const SExprInfo* pExpr, int32_t numOfExpr, SSDataBlock* pBlock,
- int32_t rows, const char* idStr, STableMetaCacheInfo* pCache) {
+ int32_t rows, SExecTaskInfo* pTask, STableMetaCacheInfo* pCache) {
+ int32_t code = 0;
+ bool freeReader = false;
+ LRUHandle* h = NULL;
+ STableCachedVal val = {0};
+ SMetaReader mr = {0};
+ const char* idStr = pTask->id.str;
+
// currently only the tbname pseudo column
if (numOfExpr <= 0) {
return TSDB_CODE_SUCCESS;
}
- int32_t code = 0;
- bool freeReader = false;
+ // todo: opt if only require the vgId and the vgVer;
// backup the rows
int32_t backupRows = pBlock->info.rows;
pBlock->info.rows = rows;
- STableCachedVal val = {0};
-
- SMetaReader mr = {0};
- LRUHandle* h = NULL;
-
// todo refactor: extract method
// the handling of the null data should be packed in the extracted method
@@ -586,7 +586,14 @@ int32_t addTagPseudoColumnData(SReadHandle* pHandle, const SExprInfo* pExpr, int
// this is to handle the tbname
if (fmIsScanPseudoColumnFunc(functionId)) {
- setTbNameColData(pBlock, pColInfoData, functionId, val.pName);
+ int32_t fType = pExpr1->pExpr->_function.functionType;
+ if (fType == FUNCTION_TYPE_TBNAME) {
+ setTbNameColData(pBlock, pColInfoData, functionId, val.pName);
+ } else if (fType == FUNCTION_TYPE_VGID) {
+ setVgIdColData(pBlock, pColInfoData, functionId, pTask->id.vgId);
+ } else if (fType == FUNCTION_TYPE_VGVER) {
+ setVgVerColData(pBlock, pColInfoData, functionId, pBlock->info.version);
+ }
} else { // these are tags
STagVal tagVal = {0};
tagVal.cid = pExpr1->base.pParam[0].pCol->colId;
@@ -655,6 +662,47 @@ void setTbNameColData(const SSDataBlock* pBlock, SColumnInfoData* pColInfoData,
colDataDestroy(&infoData);
}
+void setVgIdColData(const SSDataBlock* pBlock, SColumnInfoData* pColInfoData, int32_t functionId, int32_t vgId) {
+ struct SScalarFuncExecFuncs fpSet = {0};
+ fmGetScalarFuncExecFuncs(functionId, &fpSet);
+
+ SColumnInfoData infoData = createColumnInfoData(pColInfoData->info.type, pColInfoData->info.bytes, 1);
+
+ colInfoDataEnsureCapacity(&infoData, 1, false);
+ colDataSetVal(&infoData, 0, (const char*)&vgId, false);
+
+ SScalarParam srcParam = {.numOfRows = pBlock->info.rows, .columnData = &infoData};
+ SScalarParam param = {.columnData = pColInfoData};
+
+ if (fpSet.process != NULL) {
+ fpSet.process(&srcParam, 1, ¶m);
+ } else {
+ qError("failed to get the corresponding callback function, functionId:%d", functionId);
+ }
+
+ colDataDestroy(&infoData);
+}
+
+void setVgVerColData(const SSDataBlock* pBlock, SColumnInfoData* pColInfoData, int32_t functionId, int64_t vgVer) {
+ struct SScalarFuncExecFuncs fpSet = {0};
+ fmGetScalarFuncExecFuncs(functionId, &fpSet);
+
+ SColumnInfoData infoData = createColumnInfoData(pColInfoData->info.type, pColInfoData->info.bytes, 1);
+
+ colInfoDataEnsureCapacity(&infoData, 1, false);
+ colDataSetVal(&infoData, 0, (const char*)&vgVer, false);
+
+ SScalarParam srcParam = {.numOfRows = pBlock->info.rows, .columnData = &infoData};
+ SScalarParam param = {.columnData = pColInfoData};
+
+ if (fpSet.process != NULL) {
+ fpSet.process(&srcParam, 1, ¶m);
+ } else {
+ qError("failed to get the corresponding callback function, functionId:%d", functionId);
+ }
+
+ colDataDestroy(&infoData);
+}
static void initNextGroupScan(STableScanInfo* pInfo, STableKeyInfo** pKeyInfo, int32_t* size) {
tableListGetGroupList(pInfo->base.pTableListInfo, pInfo->currentGroupId, pKeyInfo, size);
@@ -663,6 +711,8 @@ static void initNextGroupScan(STableScanInfo* pInfo, STableKeyInfo** pKeyInfo, i
pInfo->tableEndIndex = (pInfo->tableStartIndex + (*size) - 1);
+ pInfo->pResBlock->info.blankFill = false;
+
if (!pInfo->needCountEmptyTable) {
pInfo->countState = TABLE_COUNT_STATE_END;
} else {
@@ -687,6 +737,7 @@ static SSDataBlock* getOneRowResultBlock(SExecTaskInfo* pTaskInfo, STableScanBas
pBlock->info.rows = 1;
pBlock->info.id.uid = tbInfo->uid;
pBlock->info.id.groupId = tbInfo->groupId;
+ pBlock->info.blankFill = true;
// only one row: set all col data to null & hasNull
int32_t col_num = blockDataGetNumOfCols(pBlock);
@@ -696,7 +747,7 @@ static SSDataBlock* getOneRowResultBlock(SExecTaskInfo* pTaskInfo, STableScanBas
}
// set tag/tbname
- doSetTagColumnData(pBase, pBlock, pTaskInfo, pBlock->info.rows);
+ doSetTagColumnData(pBase, pBlock, pTaskInfo, 1);
return pBlock;
}
@@ -963,13 +1014,11 @@ static SSDataBlock* groupSeqTableScan(SOperatorInfo* pOperator) {
STableKeyInfo* pList = NULL;
if (pInfo->currentGroupId == -1) {
- int32_t numOfTables = tableListGetSize(pInfo->base.pTableListInfo);
if ((++pInfo->currentGroupId) >= tableListGetOutputGroups(pInfo->base.pTableListInfo)) {
setOperatorCompleted(pOperator);
return NULL;
}
-
initNextGroupScan(pInfo, &pList, &num);
ASSERT(pInfo->base.dataReader == NULL);
@@ -1172,10 +1221,6 @@ SOperatorInfo* createTableScanOperatorInfo(STableScanPhysiNode* pTableScanNode,
goto _error;
}
- if (scanDebug) {
- pInfo->countOnly = true;
- }
-
pInfo->filesetDelimited = pTableScanNode->filesetDelimited;
taosLRUCacheSetStrictCapacity(pInfo->base.metaCache.pTableMetaEntryCache, false);
@@ -1901,7 +1946,7 @@ static int32_t setBlockIntoRes(SStreamScanInfo* pInfo, const SSDataBlock* pBlock
// currently only the tbname pseudo column
if (pInfo->numOfPseudoExpr > 0) {
int32_t code = addTagPseudoColumnData(&pInfo->readHandle, pInfo->pPseudoExpr, pInfo->numOfPseudoExpr, pInfo->pRes,
- pBlockInfo->rows, id, &pTableScanInfo->base.metaCache);
+ pBlockInfo->rows, pTaskInfo, &pTableScanInfo->base.metaCache);
// ignore the table not exists error, since this table may have been dropped during the scan procedure.
if (code != TSDB_CODE_SUCCESS && code != TSDB_CODE_PAR_TABLE_NOT_EXIST) {
blockDataFreeRes((SSDataBlock*)pBlock);
@@ -2134,7 +2179,7 @@ static SSDataBlock* doStreamScan(SOperatorInfo* pOperator) {
pTSInfo->base.cond.endVersion = pStreamInfo->fillHistoryVer.maxVer;
pTSInfo->base.cond.twindows = pStreamInfo->fillHistoryWindow;
- qDebug("stream recover step1, verRange:%" PRId64 "-%" PRId64 " window:%"PRId64"-%"PRId64", %s", pTSInfo->base.cond.startVersion,
+ qDebug("stream scan step1, verRange:%" PRId64 "-%" PRId64 " window:%"PRId64"-%"PRId64", %s", pTSInfo->base.cond.startVersion,
pTSInfo->base.cond.endVersion, pTSInfo->base.cond.twindows.skey, pTSInfo->base.cond.twindows.ekey, id);
pStreamInfo->recoverStep = STREAM_RECOVER_STEP__SCAN1;
pStreamInfo->recoverScanFinished = false;
diff --git a/source/libs/executor/src/tsort.c b/source/libs/executor/src/tsort.c
index 25c69c35c9..8146ec0d75 100644
--- a/source/libs/executor/src/tsort.c
+++ b/source/libs/executor/src/tsort.c
@@ -1730,7 +1730,6 @@ static bool tsortOpenForBufMergeSort(SSortHandle* pHandle) {
int32_t tsortClose(SSortHandle* pHandle) {
atomic_val_compare_exchange_8(&pHandle->closed, 0, 1);
- taosMsleep(10);
return TSDB_CODE_SUCCESS;
}
diff --git a/source/libs/function/src/builtins.c b/source/libs/function/src/builtins.c
index 4d00b6bb77..ac26f6fe26 100644
--- a/source/libs/function/src/builtins.c
+++ b/source/libs/function/src/builtins.c
@@ -707,18 +707,20 @@ static int32_t translateTbnameColumn(SFunctionNode* pFunc, char* pErrBuf, int32_
static int32_t translateTbUidColumn(SFunctionNode* pFunc, char* pErrBuf, int32_t len) {
// pseudo column do not need to check parameters
- pFunc->node.resType =
- (SDataType){.bytes = tDataTypes[TSDB_DATA_TYPE_BIGINT].bytes, .type = TSDB_DATA_TYPE_BIGINT};
+ pFunc->node.resType = (SDataType){.bytes = tDataTypes[TSDB_DATA_TYPE_BIGINT].bytes, .type = TSDB_DATA_TYPE_BIGINT};
return TSDB_CODE_SUCCESS;
}
static int32_t translateVgIdColumn(SFunctionNode* pFunc, char* pErrBuf, int32_t len) {
// pseudo column do not need to check parameters
- pFunc->node.resType =
- (SDataType){.bytes = tDataTypes[TSDB_DATA_TYPE_INT].bytes, .type = TSDB_DATA_TYPE_INT};
+ pFunc->node.resType = (SDataType){.bytes = tDataTypes[TSDB_DATA_TYPE_INT].bytes, .type = TSDB_DATA_TYPE_INT};
return TSDB_CODE_SUCCESS;
}
+static int32_t translateVgVerColumn(SFunctionNode* pFunc, char* pErrBuf, int32_t len) {
+ pFunc->node.resType = (SDataType){.bytes = tDataTypes[TSDB_DATA_TYPE_BIGINT].bytes, .type = TSDB_DATA_TYPE_BIGINT};
+ return TSDB_CODE_SUCCESS;
+}
static int32_t translateTopBot(SFunctionNode* pFunc, char* pErrBuf, int32_t len) {
int32_t numOfParams = LIST_LENGTH(pFunc->pParameterList);
@@ -3453,7 +3455,7 @@ const SBuiltinFuncDefinition funcMgtBuiltins[] = {
.translateFunc = translateTbnameColumn,
.getEnvFunc = NULL,
.initFunc = NULL,
- .sprocessFunc = qTbnameFunction,
+ .sprocessFunc = qPseudoTagFunction,
.finalizeFunc = NULL
},
{
@@ -3740,11 +3742,7 @@ const SBuiltinFuncDefinition funcMgtBuiltins[] = {
.translateFunc = translateTbUidColumn,
.getEnvFunc = NULL,
.initFunc = NULL,
-#ifdef BUILD_NO_CALL
- .sprocessFunc = qTbUidFunction,
-#else
- .sprocessFunc = NULL,
-#endif
+ .sprocessFunc = qPseudoTagFunction,
.finalizeFunc = NULL
},
{
@@ -3754,11 +3752,7 @@ const SBuiltinFuncDefinition funcMgtBuiltins[] = {
.translateFunc = translateVgIdColumn,
.getEnvFunc = NULL,
.initFunc = NULL,
-#ifdef BUILD_NO_CALL
- .sprocessFunc = qVgIdFunction,
-#else
- .sprocessFunc = NULL,
-#endif
+ .sprocessFunc = qPseudoTagFunction,
.finalizeFunc = NULL
},
{
@@ -3781,6 +3775,16 @@ const SBuiltinFuncDefinition funcMgtBuiltins[] = {
.sprocessFunc = toCharFunction,
.finalizeFunc = NULL
},
+ {
+ .name = "_vgver",
+ .type = FUNCTION_TYPE_VGVER,
+ .classification = FUNC_MGT_PSEUDO_COLUMN_FUNC | FUNC_MGT_SCAN_PC_FUNC | FUNC_MGT_KEEP_ORDER_FUNC,
+ .translateFunc = translateVgVerColumn,
+ .getEnvFunc = NULL,
+ .initFunc = NULL,
+ .sprocessFunc = qPseudoTagFunction,
+ .finalizeFunc = NULL
+ }
};
// clang-format on
diff --git a/source/libs/function/src/builtinsimpl.c b/source/libs/function/src/builtinsimpl.c
index 000f634fe5..5ab6d5e075 100644
--- a/source/libs/function/src/builtinsimpl.c
+++ b/source/libs/function/src/builtinsimpl.c
@@ -499,6 +499,9 @@ static int64_t getNumOfElems(SqlFunctionCtx* pCtx) {
*/
SInputColumnInfoData* pInput = &pCtx->input;
SColumnInfoData* pInputCol = pInput->pData[0];
+ if(1 == pInput->numOfRows && pInput->blankFill) {
+ return 0;
+ }
if (pInput->colDataSMAIsSet && pInput->totalRows == pInput->numOfRows) {
numOfElem = pInput->numOfRows - pInput->pColumnDataAgg[0]->numOfNull;
} else {
@@ -6022,7 +6025,7 @@ int32_t groupKeyFunction(SqlFunctionCtx* pCtx) {
goto _group_key_over;
}
- if (colDataIsNull_s(pInputCol, startIndex)) {
+ if (pInputCol->pData == NULL || colDataIsNull_s(pInputCol, startIndex)) {
pInfo->isNull = true;
pInfo->hasResult = true;
goto _group_key_over;
diff --git a/source/libs/nodes/src/nodesCodeFuncs.c b/source/libs/nodes/src/nodesCodeFuncs.c
index d36a1bd6b9..cae6ffa5fa 100644
--- a/source/libs/nodes/src/nodesCodeFuncs.c
+++ b/source/libs/nodes/src/nodesCodeFuncs.c
@@ -193,6 +193,8 @@ const char* nodesNodeName(ENodeType type) {
return "GrantStmt";
case QUERY_NODE_REVOKE_STMT:
return "RevokeStmt";
+ case QUERY_NODE_ALTER_CLUSTER_STMT:
+ return "AlterClusterStmt";
case QUERY_NODE_SHOW_DNODES_STMT:
return "ShowDnodesStmt";
case QUERY_NODE_SHOW_MNODES_STMT:
@@ -262,7 +264,13 @@ const char* nodesNodeName(ENodeType type) {
case QUERY_NODE_SHOW_COMPACTS_STMT:
return "ShowCompactsStmt";
case QUERY_NODE_SHOW_COMPACT_DETAILS_STMT:
- return "ShowCompactDetailsStmt";
+ return "ShowCompactDetailsStmt";
+ case QUERY_NODE_SHOW_GRANTS_FULL_STMT:
+ return "ShowGrantsFullStmt";
+ case QUERY_NODE_SHOW_GRANTS_LOGS_STMT:
+ return "ShowGrantsLogsStmt";
+ case QUERY_NODE_SHOW_CLUSTER_MACHINES_STMT:
+ return "ShowClusterMachinesStmt";
case QUERY_NODE_DELETE_STMT:
return "DeleteStmt";
case QUERY_NODE_INSERT_STMT:
@@ -6162,6 +6170,31 @@ static int32_t jsonToDropConsumerGroupStmt(const SJson* pJson, void* pObj) {
return code;
}
+static const char* jkAlterClusterStmtConfig = "Config";
+static const char* jkAlterClusterStmtValue = "Value";
+
+static int32_t alterClusterStmtToJson(const void* pObj, SJson* pJson) {
+ const SAlterClusterStmt* pNode = (const SAlterClusterStmt*)pObj;
+
+ int32_t code = tjsonAddStringToObject(pJson, jkAlterClusterStmtConfig, pNode->config);
+ if (TSDB_CODE_SUCCESS == code) {
+ code = tjsonAddStringToObject(pJson, jkAlterClusterStmtValue, pNode->value);
+ }
+
+ return code;
+}
+
+static int32_t jsonToAlterClusterStmt(const SJson* pJson, void* pObj) {
+ SAlterClusterStmt* pNode = (SAlterClusterStmt*)pObj;
+
+ int32_t code = tjsonGetStringValue(pJson, jkAlterClusterStmtConfig, pNode->config);
+ if (TSDB_CODE_SUCCESS == code) {
+ code = tjsonGetStringValue(pJson, jkAlterClusterStmtValue, pNode->value);
+ }
+
+ return code;
+}
+
static const char* jkAlterLocalStmtConfig = "Config";
static const char* jkAlterLocalStmtValue = "Value";
@@ -6559,6 +6592,18 @@ static int32_t showVariablesStmtToJson(const void* pObj, SJson* pJson) { return
static int32_t jsonToShowVariablesStmt(const SJson* pJson, void* pObj) { return jsonToShowStmt(pJson, pObj); }
+static int32_t showGrantsFullStmtToJson(const void* pObj, SJson* pJson) { return showStmtToJson(pObj, pJson); }
+
+static int32_t jsonToShowGrantsFullStmt(const SJson* pJson, void* pObj) { return jsonToShowStmt(pJson, pObj); }
+
+static int32_t showGrantsLogsStmtToJson(const void* pObj, SJson* pJson) { return showStmtToJson(pObj, pJson); }
+
+static int32_t showClusterMachinesStmtToJson(const void* pObj, SJson* pJson) { return showStmtToJson(pObj, pJson); }
+
+static int32_t jsonToShowGrantsLogsStmt(const SJson* pJson, void* pObj) { return jsonToShowStmt(pJson, pObj); }
+
+static int32_t jsonToShowClusterMachinesStmt(const SJson* pJson, void* pObj) { return jsonToShowStmt(pJson, pObj); }
+
static const char* jkShowDnodeVariablesStmtDnodeId = "DnodeId";
static const char* jkShowDnodeVariablesStmtLikePattern = "LikePattern";
@@ -7014,6 +7059,8 @@ static int32_t specificNodeToJson(const void* pObj, SJson* pJson) {
return grantStmtToJson(pObj, pJson);
case QUERY_NODE_REVOKE_STMT:
return revokeStmtToJson(pObj, pJson);
+ case QUERY_NODE_ALTER_CLUSTER_STMT:
+ return alterClusterStmtToJson(pObj, pJson);
case QUERY_NODE_SHOW_DNODES_STMT:
return showDnodesStmtToJson(pObj, pJson);
case QUERY_NODE_SHOW_MNODES_STMT:
@@ -7044,6 +7091,12 @@ static int32_t specificNodeToJson(const void* pObj, SJson* pJson) {
return showConsumersStmtToJson(pObj, pJson);
case QUERY_NODE_SHOW_VARIABLES_STMT:
return showVariablesStmtToJson(pObj, pJson);
+ case QUERY_NODE_SHOW_GRANTS_FULL_STMT:
+ return showGrantsFullStmtToJson(pObj, pJson);
+ case QUERY_NODE_SHOW_GRANTS_LOGS_STMT:
+ return showGrantsLogsStmtToJson(pObj, pJson);
+ case QUERY_NODE_SHOW_CLUSTER_MACHINES_STMT:
+ return showClusterMachinesStmtToJson(pObj, pJson);
case QUERY_NODE_SHOW_DNODE_VARIABLES_STMT:
return showDnodeVariablesStmtToJson(pObj, pJson);
case QUERY_NODE_SHOW_TRANSACTIONS_STMT:
@@ -7337,6 +7390,8 @@ static int32_t jsonToSpecificNode(const SJson* pJson, void* pObj) {
return jsonToGrantStmt(pJson, pObj);
case QUERY_NODE_REVOKE_STMT:
return jsonToRevokeStmt(pJson, pObj);
+ case QUERY_NODE_ALTER_CLUSTER_STMT:
+ return jsonToAlterClusterStmt(pJson, pObj);
case QUERY_NODE_SHOW_DNODES_STMT:
return jsonToShowDnodesStmt(pJson, pObj);
case QUERY_NODE_SHOW_MNODES_STMT:
@@ -7367,6 +7422,12 @@ static int32_t jsonToSpecificNode(const SJson* pJson, void* pObj) {
return jsonToShowConsumersStmt(pJson, pObj);
case QUERY_NODE_SHOW_VARIABLES_STMT:
return jsonToShowVariablesStmt(pJson, pObj);
+ case QUERY_NODE_SHOW_GRANTS_FULL_STMT:
+ return jsonToShowGrantsFullStmt(pJson, pObj);
+ case QUERY_NODE_SHOW_GRANTS_LOGS_STMT:
+ return jsonToShowGrantsLogsStmt(pJson, pObj);
+ case QUERY_NODE_SHOW_CLUSTER_MACHINES_STMT:
+ return jsonToShowClusterMachinesStmt(pJson, pObj);
case QUERY_NODE_SHOW_DNODE_VARIABLES_STMT:
return jsonToShowDnodeVariablesStmt(pJson, pObj);
case QUERY_NODE_SHOW_TRANSACTIONS_STMT:
diff --git a/source/libs/nodes/src/nodesUtilFuncs.c b/source/libs/nodes/src/nodesUtilFuncs.c
index 8496feb4d6..14973da9e5 100644
--- a/source/libs/nodes/src/nodesUtilFuncs.c
+++ b/source/libs/nodes/src/nodesUtilFuncs.c
@@ -31,7 +31,7 @@ typedef struct SNodeMemChunk {
struct SNodeMemChunk* pNext;
} SNodeMemChunk;
-typedef struct SNodeAllocator {
+struct SNodeAllocator {
int64_t self;
int64_t queryId;
int32_t chunkSize;
@@ -39,7 +39,7 @@ typedef struct SNodeAllocator {
SNodeMemChunk* pCurrChunk;
SNodeMemChunk* pChunks;
TdThreadMutex mutex;
-} SNodeAllocator;
+};
static threadlocal SNodeAllocator* g_pNodeAllocator;
static int32_t g_allocatorReqRefPool = -1;
@@ -409,6 +409,8 @@ SNode* nodesMakeNode(ENodeType type) {
return makeNode(type, sizeof(SGrantStmt));
case QUERY_NODE_REVOKE_STMT:
return makeNode(type, sizeof(SRevokeStmt));
+ case QUERY_NODE_ALTER_CLUSTER_STMT:
+ return makeNode(type, sizeof(SAlterClusterStmt));
case QUERY_NODE_SHOW_DNODES_STMT:
case QUERY_NODE_SHOW_MNODES_STMT:
case QUERY_NODE_SHOW_MODULES_STMT:
@@ -439,6 +441,9 @@ SNode* nodesMakeNode(ENodeType type) {
case QUERY_NODE_SHOW_TAGS_STMT:
case QUERY_NODE_SHOW_USER_PRIVILEGES_STMT:
case QUERY_NODE_SHOW_VIEWS_STMT:
+ case QUERY_NODE_SHOW_GRANTS_FULL_STMT:
+ case QUERY_NODE_SHOW_GRANTS_LOGS_STMT:
+ case QUERY_NODE_SHOW_CLUSTER_MACHINES_STMT:
return makeNode(type, sizeof(SShowStmt));
case QUERY_NODE_SHOW_TABLE_TAGS_STMT:
return makeNode(type, sizeof(SShowTableTagsStmt));
@@ -1046,6 +1051,8 @@ void nodesDestroyNode(SNode* pNode) {
case QUERY_NODE_REVOKE_STMT:
nodesDestroyNode(((SRevokeStmt*)pNode)->pTagCond);
break;
+ case QUERY_NODE_ALTER_CLUSTER_STMT: // no pointer field
+ break;
case QUERY_NODE_SHOW_DNODES_STMT:
case QUERY_NODE_SHOW_MNODES_STMT:
case QUERY_NODE_SHOW_MODULES_STMT:
@@ -1075,7 +1082,10 @@ void nodesDestroyNode(SNode* pNode) {
case QUERY_NODE_SHOW_SUBSCRIPTIONS_STMT:
case QUERY_NODE_SHOW_TAGS_STMT:
case QUERY_NODE_SHOW_USER_PRIVILEGES_STMT:
- case QUERY_NODE_SHOW_VIEWS_STMT: {
+ case QUERY_NODE_SHOW_VIEWS_STMT:
+ case QUERY_NODE_SHOW_GRANTS_FULL_STMT:
+ case QUERY_NODE_SHOW_GRANTS_LOGS_STMT:
+ case QUERY_NODE_SHOW_CLUSTER_MACHINES_STMT: {
SShowStmt* pStmt = (SShowStmt*)pNode;
nodesDestroyNode(pStmt->pDbName);
nodesDestroyNode(pStmt->pTbName);
diff --git a/source/libs/parser/inc/parAst.h b/source/libs/parser/inc/parAst.h
index c3f2a53f7b..8b45ed6f66 100644
--- a/source/libs/parser/inc/parAst.h
+++ b/source/libs/parser/inc/parAst.h
@@ -225,6 +225,7 @@ SNode* createCreateTopicStmtUseTable(SAstCreateContext* pCxt, bool ignoreExists,
int8_t withMeta, SNode* pWhere);
SNode* createDropTopicStmt(SAstCreateContext* pCxt, bool ignoreNotExists, SToken* pTopicName);
SNode* createDropCGroupStmt(SAstCreateContext* pCxt, bool ignoreNotExists, SToken* pCGroupId, SToken* pTopicName);
+SNode* createAlterClusterStmt(SAstCreateContext* pCxt, const SToken* pConfig, const SToken* pValue);
SNode* createAlterLocalStmt(SAstCreateContext* pCxt, const SToken* pConfig, const SToken* pValue);
SNode* createDefaultExplainOptions(SAstCreateContext* pCxt);
SNode* setExplainVerbose(SAstCreateContext* pCxt, SNode* pOptions, const SToken* pVal);
diff --git a/source/libs/parser/inc/parInt.h b/source/libs/parser/inc/parInt.h
index a4a7812474..f1c549e154 100644
--- a/source/libs/parser/inc/parInt.h
+++ b/source/libs/parser/inc/parInt.h
@@ -35,8 +35,8 @@ int32_t authenticate(SParseContext* pParseCxt, SQuery* pQuery, SParseMetaCache*
int32_t translate(SParseContext* pParseCxt, SQuery* pQuery, SParseMetaCache* pMetaCache);
int32_t extractResultSchema(const SNode* pRoot, int32_t* numOfCols, SSchema** pSchema);
int32_t calculateConstant(SParseContext* pParseCxt, SQuery* pQuery);
-int32_t translatePostCreateStream(SParseContext* pParseCxt, SQuery* pQuery, void** pResRow);
-int32_t translatePostCreateSmaIndex(SParseContext* pParseCxt, SQuery* pQuery, void** pResRow);
+int32_t translatePostCreateStream(SParseContext* pParseCxt, SQuery* pQuery, SSDataBlock* pBlock);
+int32_t translatePostCreateSmaIndex(SParseContext* pParseCxt, SQuery* pQuery, SSDataBlock* pBlock);
int32_t buildQueryAfterParse(SQuery** pQuery, SNode* pRootNode, int16_t placeholderNo, SArray** pPlaceholderValues);
int32_t translateTable(STranslateContext* pCxt, SNode** pTable);
int32_t getMetaDataFromHash(const char* pKey, int32_t len, SHashObj* pHash, void** pOutput);
diff --git a/source/libs/parser/inc/sql.y b/source/libs/parser/inc/sql.y
index 0479fce255..d2d120fa93 100755
--- a/source/libs/parser/inc/sql.y
+++ b/source/libs/parser/inc/sql.y
@@ -172,6 +172,10 @@ force_opt(A) ::= FORCE.
%destructor unsafe_opt { }
unsafe_opt(A) ::= UNSAFE. { A = true; }
+/************************************************ alter cluster *********************************************************/
+cmd ::= ALTER CLUSTER NK_STRING(A). { pCxt->pRootNode = createAlterClusterStmt(pCxt, &A, NULL); }
+cmd ::= ALTER CLUSTER NK_STRING(A) NK_STRING(B). { pCxt->pRootNode = createAlterClusterStmt(pCxt, &A, &B); }
+
/************************************************ alter local *********************************************************/
cmd ::= ALTER LOCAL NK_STRING(A). { pCxt->pRootNode = createAlterLocalStmt(pCxt, &A, NULL); }
cmd ::= ALTER LOCAL NK_STRING(A) NK_STRING(B). { pCxt->pRootNode = createAlterLocalStmt(pCxt, &A, &B); }
@@ -483,6 +487,9 @@ cmd ::= SHOW APPS.
cmd ::= SHOW CONNECTIONS. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CONNECTIONS_STMT); }
cmd ::= SHOW LICENCES. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LICENCES_STMT); }
cmd ::= SHOW GRANTS. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LICENCES_STMT); }
+cmd ::= SHOW GRANTS FULL. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_GRANTS_FULL_STMT); }
+cmd ::= SHOW GRANTS LOGS. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_GRANTS_LOGS_STMT); }
+cmd ::= SHOW CLUSTER MACHINES. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CLUSTER_MACHINES_STMT); }
cmd ::= SHOW CREATE DATABASE db_name(A). { pCxt->pRootNode = createShowCreateDatabaseStmt(pCxt, &A); }
cmd ::= SHOW CREATE TABLE full_table_name(A). { pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_TABLE_STMT, A); }
cmd ::= SHOW CREATE STABLE full_table_name(A). { pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_STABLE_STMT, A); }
diff --git a/source/libs/parser/src/parAstCreater.c b/source/libs/parser/src/parAstCreater.c
index 8e89ae1f53..689153010a 100644
--- a/source/libs/parser/src/parAstCreater.c
+++ b/source/libs/parser/src/parAstCreater.c
@@ -2187,6 +2187,17 @@ SNode* createDropCGroupStmt(SAstCreateContext* pCxt, bool ignoreNotExists, SToke
return (SNode*)pStmt;
}
+SNode* createAlterClusterStmt(SAstCreateContext* pCxt, const SToken* pConfig, const SToken* pValue) {
+ CHECK_PARSER_STATUS(pCxt);
+ SAlterClusterStmt* pStmt = (SAlterClusterStmt*)nodesMakeNode(QUERY_NODE_ALTER_CLUSTER_STMT);
+ CHECK_OUT_OF_MEM(pStmt);
+ trimString(pConfig->z, pConfig->n, pStmt->config, sizeof(pStmt->config));
+ if (NULL != pValue) {
+ trimString(pValue->z, pValue->n, pStmt->value, sizeof(pStmt->value));
+ }
+ return (SNode*)pStmt;
+}
+
SNode* createAlterLocalStmt(SAstCreateContext* pCxt, const SToken* pConfig, const SToken* pValue) {
CHECK_PARSER_STATUS(pCxt);
SAlterLocalStmt* pStmt = (SAlterLocalStmt*)nodesMakeNode(QUERY_NODE_ALTER_LOCAL_STMT);
diff --git a/source/libs/parser/src/parAstParser.c b/source/libs/parser/src/parAstParser.c
index be272228fe..9b34672418 100644
--- a/source/libs/parser/src/parAstParser.c
+++ b/source/libs/parser/src/parAstParser.c
@@ -619,6 +619,21 @@ static int32_t collectMetaKeyFromShowCompactDetails(SCollectMetaKeyCxt* pCxt, SS
return code;
}
+static int32_t collectMetaKeyFromShowGrantsFull(SCollectMetaKeyCxt* pCxt, SShowStmt* pStmt) {
+ return reserveTableMetaInCache(pCxt->pParseCxt->acctId, TSDB_INFORMATION_SCHEMA_DB, TSDB_INS_TABLE_GRANTS_FULL,
+ pCxt->pMetaCache);
+}
+
+static int32_t collectMetaKeyFromShowGrantsLogs(SCollectMetaKeyCxt* pCxt, SShowStmt* pStmt) {
+ return reserveTableMetaInCache(pCxt->pParseCxt->acctId, TSDB_INFORMATION_SCHEMA_DB, TSDB_INS_TABLE_GRANTS_LOGS,
+ pCxt->pMetaCache);
+}
+
+static int32_t collectMetaKeyFromShowClusterMachines(SCollectMetaKeyCxt* pCxt, SShowStmt* pStmt) {
+ return reserveTableMetaInCache(pCxt->pParseCxt->acctId, TSDB_INFORMATION_SCHEMA_DB, TSDB_INS_TABLE_MACHINES,
+ pCxt->pMetaCache);
+}
+
static int32_t collectMetaKeyFromShowCreateDatabase(SCollectMetaKeyCxt* pCxt, SShowCreateDatabaseStmt* pStmt) {
return reserveDbCfgInCache(pCxt->pParseCxt->acctId, pStmt->dbName, pCxt->pMetaCache);
}
@@ -839,6 +854,12 @@ static int32_t collectMetaKeyFromQuery(SCollectMetaKeyCxt* pCxt, SNode* pStmt) {
return collectMetaKeyFromShowCompacts(pCxt, (SShowStmt*)pStmt);
case QUERY_NODE_SHOW_COMPACT_DETAILS_STMT:
return collectMetaKeyFromShowCompactDetails(pCxt, (SShowStmt*)pStmt);
+ case QUERY_NODE_SHOW_GRANTS_FULL_STMT:
+ return collectMetaKeyFromShowGrantsFull(pCxt, (SShowStmt*)pStmt);
+ case QUERY_NODE_SHOW_GRANTS_LOGS_STMT:
+ return collectMetaKeyFromShowGrantsLogs(pCxt, (SShowStmt*)pStmt);
+ case QUERY_NODE_SHOW_CLUSTER_MACHINES_STMT:
+ return collectMetaKeyFromShowClusterMachines(pCxt, (SShowStmt*)pStmt);
case QUERY_NODE_SHOW_CREATE_DATABASE_STMT:
return collectMetaKeyFromShowCreateDatabase(pCxt, (SShowCreateDatabaseStmt*)pStmt);
case QUERY_NODE_SHOW_CREATE_TABLE_STMT:
diff --git a/source/libs/parser/src/parAuthenticator.c b/source/libs/parser/src/parAuthenticator.c
index 033991f351..c2cd4786db 100644
--- a/source/libs/parser/src/parAuthenticator.c
+++ b/source/libs/parser/src/parAuthenticator.c
@@ -349,6 +349,9 @@ static int32_t authQuery(SAuthCxt* pCxt, SNode* pStmt) {
case QUERY_NODE_SHOW_TABLE_DISTRIBUTED_STMT:
case QUERY_NODE_SHOW_VNODES_STMT:
case QUERY_NODE_SHOW_SCORES_STMT:
+ case QUERY_NODE_SHOW_GRANTS_FULL_STMT:
+ case QUERY_NODE_SHOW_GRANTS_LOGS_STMT:
+ case QUERY_NODE_SHOW_CLUSTER_MACHINES_STMT:
return !pCxt->pParseCxt->enableSysInfo ? TSDB_CODE_PAR_PERMISSION_DENIED : TSDB_CODE_SUCCESS;
case QUERY_NODE_SHOW_TABLES_STMT:
case QUERY_NODE_SHOW_STABLES_STMT:
diff --git a/source/libs/parser/src/parInsertSql.c b/source/libs/parser/src/parInsertSql.c
index 1994ddb437..512dfdaef2 100644
--- a/source/libs/parser/src/parInsertSql.c
+++ b/source/libs/parser/src/parInsertSql.c
@@ -440,14 +440,14 @@ static int32_t parseVarbinary(SToken* pToken, uint8_t **pData, uint32_t *nData,
return TSDB_CODE_PAR_INVALID_VARBINARY;
}
- if(isHex(pToken->z, pToken->n)){
- if(!isValidateHex(pToken->z, pToken->n)){
+ if(isHex(pToken->z + 1, pToken->n - 2)){
+ if(!isValidateHex(pToken->z + 1, pToken->n - 2)){
return TSDB_CODE_PAR_INVALID_VARBINARY;
}
void* data = NULL;
uint32_t size = 0;
- if(taosHex2Ascii(pToken->z, pToken->n, &data, &size) < 0){
+ if(taosHex2Ascii(pToken->z + 1, pToken->n - 2, &data, &size) < 0){
return TSDB_CODE_OUT_OF_MEMORY;
}
@@ -458,11 +458,13 @@ static int32_t parseVarbinary(SToken* pToken, uint8_t **pData, uint32_t *nData,
*pData = data;
*nData = size;
}else{
- if (pToken->n + VARSTR_HEADER_SIZE > bytes) {
+ *pData = taosMemoryCalloc(1, pToken->n);
+ int32_t len = trimString(pToken->z, pToken->n, *pData, pToken->n);
+ *nData = len;
+
+ if (*nData + VARSTR_HEADER_SIZE > bytes) {
return TSDB_CODE_PAR_VALUE_TOO_LONG;
}
- *pData = taosStrdup(pToken->z);
- *nData = pToken->n;
}
return TSDB_CODE_SUCCESS;
}
@@ -753,7 +755,7 @@ static int32_t buildCreateTbReq(SVnodeModifyOpStmt* pStmt, STag* pTag, SArray* p
return TSDB_CODE_SUCCESS;
}
-static int32_t checkAndTrimValue(SToken* pToken, char* tmpTokenBuf, SMsgBuf* pMsgBuf) {
+static int32_t checkAndTrimValue(SToken* pToken, char* tmpTokenBuf, SMsgBuf* pMsgBuf, int8_t type) {
if ((pToken->type != TK_NOW && pToken->type != TK_TODAY && pToken->type != TK_NK_INTEGER &&
pToken->type != TK_NK_STRING && pToken->type != TK_NK_FLOAT && pToken->type != TK_NK_BOOL &&
pToken->type != TK_NULL && pToken->type != TK_NK_HEX && pToken->type != TK_NK_OCT &&
@@ -763,7 +765,7 @@ static int32_t checkAndTrimValue(SToken* pToken, char* tmpTokenBuf, SMsgBuf* pMs
}
// Remove quotation marks
- if (TK_NK_STRING == pToken->type) {
+ if (TK_NK_STRING == pToken->type && type != TSDB_DATA_TYPE_VARBINARY) {
if (pToken->n >= TSDB_MAX_BYTES_PER_ROW) {
return buildSyntaxErrMsg(pMsgBuf, "too long string", pToken->z);
}
@@ -935,7 +937,7 @@ static int32_t parseTagsClauseImpl(SInsertParseContext* pCxt, SVnodeModifyOpStmt
SSchema* pTagSchema = &pSchema[pCxt->tags.pColIndex[i]];
isJson = pTagSchema->type == TSDB_DATA_TYPE_JSON;
- code = checkAndTrimValue(&token, pCxt->tmpTokenBuf, &pCxt->msg);
+ code = checkAndTrimValue(&token, pCxt->tmpTokenBuf, &pCxt->msg, pTagSchema->type);
if (TK_NK_VARIABLE == token.type) {
code = buildSyntaxErrMsg(&pCxt->msg, "not expected tags values ", token.z);
}
@@ -1631,7 +1633,7 @@ static int32_t parseValueTokenImpl(SInsertParseContext* pCxt, const char** pSql,
static int32_t parseValueToken(SInsertParseContext* pCxt, const char** pSql, SToken* pToken, SSchema* pSchema,
int16_t timePrec, SColVal* pVal) {
- int32_t code = checkAndTrimValue(pToken, pCxt->tmpTokenBuf, &pCxt->msg);
+ int32_t code = checkAndTrimValue(pToken, pCxt->tmpTokenBuf, &pCxt->msg, pSchema->type);
if (TSDB_CODE_SUCCESS == code && isNullValue(pSchema->type, pToken)) {
if (TSDB_DATA_TYPE_TIMESTAMP == pSchema->type && PRIMARYKEY_TIMESTAMP_COL_ID == pSchema->colId) {
return buildSyntaxErrMsg(&pCxt->msg, "primary timestamp should not be null", pToken->z);
@@ -1691,7 +1693,7 @@ typedef union SRowsDataContext{
static int32_t parseTbnameToken(SInsertParseContext* pCxt, SStbRowsDataContext* pStbRowsCxt, SToken* pToken, bool* pFoundCtbName) {
*pFoundCtbName = false;
- int32_t code = checkAndTrimValue(pToken, pCxt->tmpTokenBuf, &pCxt->msg);
+ int32_t code = checkAndTrimValue(pToken, pCxt->tmpTokenBuf, &pCxt->msg, TSDB_DATA_TYPE_BINARY);
if (TK_NK_VARIABLE == pToken->type) {
code = buildInvalidOperationMsg(&pCxt->msg, "not expected tbname");
}
@@ -1731,7 +1733,7 @@ static int32_t processCtbTagsAfterCtbName(SInsertParseContext* pCxt, SVnodeModif
for (int32_t i = 0; code == TSDB_CODE_SUCCESS && i < numOfTagTokens; ++i) {
SToken* pTagToken = (SToken*)(tagTokens + i);
SSchema* pTagSchema = tagSchemas[i];
- code = checkAndTrimValue(pTagToken, pCxt->tmpTokenBuf, &pCxt->msg);
+ code = checkAndTrimValue(pTagToken, pCxt->tmpTokenBuf, &pCxt->msg, pTagSchema->type);
if (TK_NK_VARIABLE == pTagToken->type) {
code = buildInvalidOperationMsg(&pCxt->msg, "not expected tag");
}
@@ -1790,7 +1792,7 @@ static int32_t doGetStbRowValues(SInsertParseContext* pCxt, SVnodeModifyOpStmt*
tagSchemas[(*pNumOfTagTokens)] = (SSchema*)pTagSchema;
++(*pNumOfTagTokens);
} else {
- code = checkAndTrimValue(pToken, pCxt->tmpTokenBuf, &pCxt->msg);
+ code = checkAndTrimValue(pToken, pCxt->tmpTokenBuf, &pCxt->msg, pTagSchema->type);
if (TK_NK_VARIABLE == pToken->type) {
code = buildInvalidOperationMsg(&pCxt->msg, "not expected row value");
}
diff --git a/source/libs/parser/src/parTokenizer.c b/source/libs/parser/src/parTokenizer.c
index 072892fe7f..0777835def 100644
--- a/source/libs/parser/src/parTokenizer.c
+++ b/source/libs/parser/src/parTokenizer.c
@@ -109,6 +109,9 @@ static SKeyword keywordTable[] = {
{"GEOMETRY", TK_GEOMETRY},
{"GRANT", TK_GRANT},
{"GRANTS", TK_GRANTS},
+ {"FULL", TK_FULL},
+ {"LOGS", TK_LOGS},
+ {"MACHINES", TK_MACHINES},
{"GROUP", TK_GROUP},
{"HAVING", TK_HAVING},
{"HOST", TK_HOST},
diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c
index d246641576..7dabae0c3a 100644
--- a/source/libs/parser/src/parTranslater.c
+++ b/source/libs/parser/src/parTranslater.c
@@ -14,6 +14,7 @@
*/
#include "parTranslater.h"
+#include "tdatablock.h"
#include "parInt.h"
#include "catalog.h"
@@ -268,7 +269,25 @@ static const SSysTableShowAdapter sysTableShowAdapter[] = {
.pTableName = TSDB_INS_TABLE_COMPACT_DETAILS,
.numOfShowCols = 1,
.pShowCols = {"*"}
- },
+ },
+ { .showType = QUERY_NODE_SHOW_GRANTS_FULL_STMT,
+ .pDbName = TSDB_INFORMATION_SCHEMA_DB,
+ .pTableName = TSDB_INS_TABLE_GRANTS_FULL,
+ .numOfShowCols = 1,
+ .pShowCols = {"*"}
+ },
+ { .showType = QUERY_NODE_SHOW_GRANTS_LOGS_STMT,
+ .pDbName = TSDB_INFORMATION_SCHEMA_DB,
+ .pTableName = TSDB_INS_TABLE_GRANTS_LOGS,
+ .numOfShowCols = 1,
+ .pShowCols = {"*"}
+ },
+ { .showType = QUERY_NODE_SHOW_CLUSTER_MACHINES_STMT,
+ .pDbName = TSDB_INFORMATION_SCHEMA_DB,
+ .pTableName = TSDB_INS_TABLE_MACHINES,
+ .numOfShowCols = 1,
+ .pShowCols = {"*"}
+ },
};
// clang-format on
@@ -5589,6 +5608,11 @@ static int32_t fillCmdSql(STranslateContext* pCxt, int16_t msgType, void* pReq)
FILL_CMD_SQL(sql, sqlLen, pCmdReq, SMDropStreamReq, pReq);
break;
}
+
+ case TDMT_MND_CONFIG_CLUSTER: {
+ FILL_CMD_SQL(sql, sqlLen, pCmdReq, SMCfgClusterReq, pReq);
+ break;
+ }
default: {
break;
}
@@ -6808,6 +6832,16 @@ static int32_t translateRestoreDnode(STranslateContext* pCxt, SRestoreComponentN
return code;
}
+static int32_t translateAlterCluster(STranslateContext* pCxt, SAlterClusterStmt* pStmt) {
+ SMCfgClusterReq cfgReq = {0};
+ strcpy(cfgReq.config, pStmt->config);
+ strcpy(cfgReq.value, pStmt->value);
+
+ int32_t code = buildCmdMsg(pCxt, TDMT_MND_CONFIG_CLUSTER, (FSerializeFunc)tSerializeSMCfgClusterReq, &cfgReq);
+ tFreeSMCfgClusterReq(&cfgReq);
+ return code;
+}
+
static int32_t getSmaIndexDstVgId(STranslateContext* pCxt, const char* pDbName, const char* pTableName,
int32_t* pVgId) {
SVgroupInfo vg = {0};
@@ -6957,7 +6991,7 @@ int32_t createIntervalFromCreateSmaIndexStmt(SCreateIndexStmt* pStmt, SInterval*
return TSDB_CODE_SUCCESS;
}
-int32_t translatePostCreateSmaIndex(SParseContext* pParseCxt, SQuery* pQuery, void** pResRow) {
+int32_t translatePostCreateSmaIndex(SParseContext* pParseCxt, SQuery* pQuery, SSDataBlock* pBlock) {
int32_t code = TSDB_CODE_SUCCESS;
SCreateIndexStmt* pStmt = (SCreateIndexStmt*)pQuery->pRoot;
int64_t lastTs = 0;
@@ -6967,11 +7001,13 @@ int32_t translatePostCreateSmaIndex(SParseContext* pParseCxt, SQuery* pQuery, vo
if (TSDB_CODE_SUCCESS == code) {
code = createIntervalFromCreateSmaIndexStmt(pStmt, &interval);
}
+
if (TSDB_CODE_SUCCESS == code) {
- if (pResRow && pResRow[0]) {
- lastTs = *(int64_t*)pResRow[0];
+ if (pBlock != NULL && pBlock->info.rows >= 1) {
+ SColumnInfoData* pColInfo = taosArrayGet(pBlock->pDataBlock, 0);
+ lastTs = *(int64_t*)colDataGetData(pColInfo, 0);
} else if (interval.interval > 0) {
- lastTs = convertTimePrecision(taosGetTimestampMs(), TSDB_TIME_PRECISION_MILLI, interval.precision);
+ lastTs = taosGetTimestamp(interval.precision);
} else {
lastTs = taosGetTimestampMs();
}
@@ -8110,18 +8146,63 @@ static int32_t createLastTsSelectStmt(char* pDb, char* pTable, STableMeta* pMeta
nodesDestroyList(pParamterList);
return TSDB_CODE_OUT_OF_MEMORY;
}
+
code = nodesListStrictAppend(pProjectionList, pFunc);
if (code) {
nodesDestroyList(pProjectionList);
return code;
}
+ SFunctionNode* pFunc1 = createFunction("_vgid", NULL);
+ if (NULL == pFunc1) {
+ nodesDestroyList(pParamterList);
+ return TSDB_CODE_OUT_OF_MEMORY;
+ }
+
+ snprintf(pFunc1->node.aliasName, sizeof(pFunc1->node.aliasName), "%s.%p", pFunc1->functionName, pFunc1);
+ code = nodesListStrictAppend(pProjectionList, (SNode*) pFunc1);
+ if (code) {
+ nodesDestroyList(pProjectionList);
+ return code;
+ }
+
+ SFunctionNode* pFunc2 = createFunction("_vgver", NULL);
+ if (NULL == pFunc2) {
+ nodesDestroyList(pParamterList);
+ return TSDB_CODE_OUT_OF_MEMORY;
+ }
+
+ snprintf(pFunc2->node.aliasName, sizeof(pFunc2->node.aliasName), "%s.%p", pFunc2->functionName, pFunc2);
+ code = nodesListStrictAppend(pProjectionList, (SNode*) pFunc2);
+ if (code) {
+ nodesDestroyList(pProjectionList);
+ return code;
+ }
+
code = createSimpleSelectStmtFromProjList(pDb, pTable, pProjectionList, (SSelectStmt**)pQuery);
if (code) {
nodesDestroyList(pProjectionList);
return code;
}
+ // todo add the group by statement
+ SSelectStmt** pSelect1 = (SSelectStmt**)pQuery;
+ (*pSelect1)->pGroupByList = nodesMakeList();
+
+ SGroupingSetNode* pNode1 = (SGroupingSetNode*)nodesMakeNode(QUERY_NODE_GROUPING_SET);
+ pNode1->groupingSetType = GP_TYPE_NORMAL;
+ pNode1->pParameterList = nodesMakeList();
+ nodesListAppend(pNode1->pParameterList, (SNode*)pFunc1);
+
+ nodesListAppend((*pSelect1)->pGroupByList, (SNode*)pNode1);
+
+ SGroupingSetNode* pNode2 = (SGroupingSetNode*)nodesMakeNode(QUERY_NODE_GROUPING_SET);
+ pNode2->groupingSetType = GP_TYPE_NORMAL;
+ pNode2->pParameterList = nodesMakeList();
+ nodesListAppend(pNode2->pParameterList, (SNode*)pFunc2);
+
+ nodesListAppend((*pSelect1)->pGroupByList, (SNode*)pNode2);
+
return code;
}
@@ -8269,7 +8350,31 @@ static int32_t buildIntervalForCreateStream(SCreateStreamStmt* pStmt, SInterval*
return code;
}
-int32_t translatePostCreateStream(SParseContext* pParseCxt, SQuery* pQuery, void** pResRow) {
+// ts, vgroup_id, vgroup_version
+static int32_t createStreamReqVersionInfo(SSDataBlock* pBlock, SArray** pArray, int64_t* lastTs, SInterval* pInterval) {
+ *pArray = taosArrayInit(pBlock->info.rows, sizeof(SVgroupVer));
+ if (*pArray == NULL) {
+ return TSDB_CODE_OUT_OF_MEMORY;
+ }
+
+ if (pBlock->info.rows > 0) {
+ *lastTs = pBlock->info.window.ekey;
+ SColumnInfoData* pCol1 = taosArrayGet(pBlock->pDataBlock, 1);
+ SColumnInfoData* pCol2 = taosArrayGet(pBlock->pDataBlock, 2);
+
+ for (int32_t i = 0; i < pBlock->info.rows; ++i) {
+ SVgroupVer v = {.vgId = *(int32_t*)colDataGetData(pCol1, i), .ver = *(int64_t*)colDataGetData(pCol2, i)};
+ taosArrayPush(*pArray, &v);
+ }
+ } else {
+ int32_t precision = (pInterval->interval > 0)? pInterval->precision:TSDB_TIME_PRECISION_MILLI;
+ *lastTs = taosGetTimestamp(precision);
+ }
+
+ return TSDB_CODE_SUCCESS;
+}
+
+int32_t translatePostCreateStream(SParseContext* pParseCxt, SQuery* pQuery, SSDataBlock* pBlock) {
SCreateStreamStmt* pStmt = (SCreateStreamStmt*)pQuery->pRoot;
STranslateContext cxt = {0};
SInterval interval = {0};
@@ -8279,15 +8384,11 @@ int32_t translatePostCreateStream(SParseContext* pParseCxt, SQuery* pQuery, void
if (TSDB_CODE_SUCCESS == code) {
code = buildIntervalForCreateStream(pStmt, &interval);
}
+
if (TSDB_CODE_SUCCESS == code) {
- if (pResRow && pResRow[0]) {
- lastTs = *(int64_t*)pResRow[0];
- } else if (interval.interval > 0) {
- lastTs = convertTimePrecision(taosGetTimestampMs(), TSDB_TIME_PRECISION_MILLI, interval.precision);
- } else {
- lastTs = taosGetTimestampMs();
- }
+ code = createStreamReqVersionInfo(pBlock, &pStmt->pReq->pVgroupVerList, &lastTs, &interval);
}
+
if (TSDB_CODE_SUCCESS == code) {
if (interval.interval > 0) {
pStmt->pReq->lastTs = taosTimeAdd(taosTimeTruncate(lastTs, &interval), interval.interval, interval.intervalUnit, interval.precision);
@@ -8296,9 +8397,11 @@ int32_t translatePostCreateStream(SParseContext* pParseCxt, SQuery* pQuery, void
}
code = buildCmdMsg(&cxt, TDMT_MND_CREATE_STREAM, (FSerializeFunc)tSerializeSCMCreateStreamReq, pStmt->pReq);
}
+
if (TSDB_CODE_SUCCESS == code) {
code = setQuery(&cxt, pQuery);
}
+
setRefreshMeta(&cxt, pQuery);
destroyTranslateContext(&cxt);
@@ -8827,6 +8930,9 @@ static int32_t translateQuery(STranslateContext* pCxt, SNode* pNode) {
case QUERY_NODE_COMPACT_DATABASE_STMT:
code = translateCompact(pCxt, (SCompactDatabaseStmt*)pNode);
break;
+ case QUERY_NODE_ALTER_CLUSTER_STMT:
+ code = translateAlterCluster(pCxt, (SAlterClusterStmt*)pNode);
+ break;
case QUERY_NODE_KILL_CONNECTION_STMT:
code = translateKillConnection(pCxt, (SKillStmt*)pNode);
break;
@@ -10673,6 +10779,9 @@ static int32_t rewriteQuery(STranslateContext* pCxt, SQuery* pQuery) {
case QUERY_NODE_SHOW_TAGS_STMT:
case QUERY_NODE_SHOW_USER_PRIVILEGES_STMT:
case QUERY_NODE_SHOW_VIEWS_STMT:
+ case QUERY_NODE_SHOW_GRANTS_FULL_STMT:
+ case QUERY_NODE_SHOW_GRANTS_LOGS_STMT:
+ case QUERY_NODE_SHOW_CLUSTER_MACHINES_STMT:
code = rewriteShow(pCxt, pQuery);
break;
case QUERY_NODE_SHOW_VGROUPS_STMT:
diff --git a/source/libs/parser/src/parser.c b/source/libs/parser/src/parser.c
index 1fa4c624a7..92e25f3ee6 100644
--- a/source/libs/parser/src/parser.c
+++ b/source/libs/parser/src/parser.c
@@ -233,14 +233,17 @@ int32_t qContinueParseSql(SParseContext* pCxt, struct SCatalogReq* pCatalogReq,
return parseInsertSql(pCxt, &pQuery, pCatalogReq, pMetaData);
}
-int32_t qContinueParsePostQuery(SParseContext* pCxt, SQuery* pQuery, void** pResRow) {
+int32_t qContinueParsePostQuery(SParseContext* pCxt, SQuery* pQuery, SSDataBlock* pBlock) {
int32_t code = TSDB_CODE_SUCCESS;
switch (nodeType(pQuery->pRoot)) {
- case QUERY_NODE_CREATE_STREAM_STMT:
- code = translatePostCreateStream(pCxt, pQuery, pResRow);
+ case QUERY_NODE_CREATE_STREAM_STMT: {
+ code = translatePostCreateStream(pCxt, pQuery, pBlock);
break;
- case QUERY_NODE_CREATE_INDEX_STMT:
- code = translatePostCreateSmaIndex(pCxt, pQuery, pResRow);
+ }
+ case QUERY_NODE_CREATE_INDEX_STMT: {
+ code = translatePostCreateSmaIndex(pCxt, pQuery, pBlock);
+ break;
+ }
default:
break;
}
diff --git a/source/libs/parser/src/sql.c b/source/libs/parser/src/sql.c
index 66258ba3a9..25862bb079 100644
--- a/source/libs/parser/src/sql.c
+++ b/source/libs/parser/src/sql.c
@@ -1,5 +1,3 @@
-/* This file is automatically generated by Lemon from input grammar
-** source file "sql.y". */
/*
** 2000-05-29
**
@@ -24,8 +22,9 @@
** 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
@@ -42,359 +41,12 @@
#include "parAst.h"
#define YYSTACKDEPTH 0
-#line 46 "sql.c"
/**************** End of %include directives **********************************/
-/* 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_LOCAL 58
-#define TK_QNODE 59
-#define TK_BNODE 60
-#define TK_SNODE 61
-#define TK_MNODE 62
-#define TK_VNODE 63
-#define TK_DATABASE 64
-#define TK_USE 65
-#define TK_FLUSH 66
-#define TK_TRIM 67
-#define TK_COMPACT 68
-#define TK_IF 69
-#define TK_NOT 70
-#define TK_EXISTS 71
-#define TK_BUFFER 72
-#define TK_CACHEMODEL 73
-#define TK_CACHESIZE 74
-#define TK_COMP 75
-#define TK_DURATION 76
-#define TK_NK_VARIABLE 77
-#define TK_MAXROWS 78
-#define TK_MINROWS 79
-#define TK_KEEP 80
-#define TK_PAGES 81
-#define TK_PAGESIZE 82
-#define TK_TSDB_PAGESIZE 83
-#define TK_PRECISION 84
-#define TK_REPLICA 85
-#define TK_VGROUPS 86
-#define TK_SINGLE_STABLE 87
-#define TK_RETENTIONS 88
-#define TK_SCHEMALESS 89
-#define TK_WAL_LEVEL 90
-#define TK_WAL_FSYNC_PERIOD 91
-#define TK_WAL_RETENTION_PERIOD 92
-#define TK_WAL_RETENTION_SIZE 93
-#define TK_WAL_ROLL_PERIOD 94
-#define TK_WAL_SEGMENT_SIZE 95
-#define TK_STT_TRIGGER 96
-#define TK_TABLE_PREFIX 97
-#define TK_TABLE_SUFFIX 98
-#define TK_KEEP_TIME_OFFSET 99
-#define TK_NK_COLON 100
-#define TK_BWLIMIT 101
-#define TK_START 102
-#define TK_TIMESTAMP 103
-#define TK_END 104
-#define TK_TABLE 105
-#define TK_NK_LP 106
-#define TK_NK_RP 107
-#define TK_STABLE 108
-#define TK_COLUMN 109
-#define TK_MODIFY 110
-#define TK_RENAME 111
-#define TK_TAG 112
-#define TK_SET 113
-#define TK_NK_EQ 114
-#define TK_USING 115
-#define TK_TAGS 116
-#define TK_BOOL 117
-#define TK_TINYINT 118
-#define TK_SMALLINT 119
-#define TK_INT 120
-#define TK_INTEGER 121
-#define TK_BIGINT 122
-#define TK_FLOAT 123
-#define TK_DOUBLE 124
-#define TK_BINARY 125
-#define TK_NCHAR 126
-#define TK_UNSIGNED 127
-#define TK_JSON 128
-#define TK_VARCHAR 129
-#define TK_MEDIUMBLOB 130
-#define TK_BLOB 131
-#define TK_VARBINARY 132
-#define TK_GEOMETRY 133
-#define TK_DECIMAL 134
-#define TK_COMMENT 135
-#define TK_MAX_DELAY 136
-#define TK_WATERMARK 137
-#define TK_ROLLUP 138
-#define TK_TTL 139
-#define TK_SMA 140
-#define TK_DELETE_MARK 141
-#define TK_FIRST 142
-#define TK_LAST 143
-#define TK_SHOW 144
-#define TK_PRIVILEGES 145
-#define TK_DATABASES 146
-#define TK_TABLES 147
-#define TK_STABLES 148
-#define TK_MNODES 149
-#define TK_QNODES 150
-#define TK_FUNCTIONS 151
-#define TK_INDEXES 152
-#define TK_ACCOUNTS 153
-#define TK_APPS 154
-#define TK_CONNECTIONS 155
-#define TK_LICENCES 156
-#define TK_GRANTS 157
-#define TK_QUERIES 158
-#define TK_SCORES 159
-#define TK_TOPICS 160
-#define TK_VARIABLES 161
-#define TK_CLUSTER 162
-#define TK_BNODES 163
-#define TK_SNODES 164
-#define TK_TRANSACTIONS 165
-#define TK_DISTRIBUTED 166
-#define TK_CONSUMERS 167
-#define TK_SUBSCRIPTIONS 168
-#define TK_VNODES 169
-#define TK_ALIVE 170
-#define TK_VIEWS 171
-#define TK_VIEW 172
-#define TK_COMPACTS 173
-#define TK_NORMAL 174
-#define TK_CHILD 175
-#define TK_LIKE 176
-#define TK_TBNAME 177
-#define TK_QTAGS 178
-#define TK_AS 179
-#define TK_SYSTEM 180
-#define TK_INDEX 181
-#define TK_FUNCTION 182
-#define TK_INTERVAL 183
-#define TK_COUNT 184
-#define TK_LAST_ROW 185
-#define TK_META 186
-#define TK_ONLY 187
-#define TK_TOPIC 188
-#define TK_CONSUMER 189
-#define TK_GROUP 190
-#define TK_DESC 191
-#define TK_DESCRIBE 192
-#define TK_RESET 193
-#define TK_QUERY 194
-#define TK_CACHE 195
-#define TK_EXPLAIN 196
-#define TK_ANALYZE 197
-#define TK_VERBOSE 198
-#define TK_NK_BOOL 199
-#define TK_RATIO 200
-#define TK_NK_FLOAT 201
-#define TK_OUTPUTTYPE 202
-#define TK_AGGREGATE 203
-#define TK_BUFSIZE 204
-#define TK_LANGUAGE 205
-#define TK_REPLACE 206
-#define TK_STREAM 207
-#define TK_INTO 208
-#define TK_PAUSE 209
-#define TK_RESUME 210
-#define TK_TRIGGER 211
-#define TK_AT_ONCE 212
-#define TK_WINDOW_CLOSE 213
-#define TK_IGNORE 214
-#define TK_EXPIRED 215
-#define TK_FILL_HISTORY 216
-#define TK_UPDATE 217
-#define TK_SUBTABLE 218
-#define TK_UNTREATED 219
-#define TK_KILL 220
-#define TK_CONNECTION 221
-#define TK_TRANSACTION 222
-#define TK_BALANCE 223
-#define TK_VGROUP 224
-#define TK_LEADER 225
-#define TK_MERGE 226
-#define TK_REDISTRIBUTE 227
-#define TK_SPLIT 228
-#define TK_DELETE 229
-#define TK_INSERT 230
-#define TK_NULL 231
-#define TK_NK_QUESTION 232
-#define TK_NK_ALIAS 233
-#define TK_NK_ARROW 234
-#define TK_ROWTS 235
-#define TK_QSTART 236
-#define TK_QEND 237
-#define TK_QDURATION 238
-#define TK_WSTART 239
-#define TK_WEND 240
-#define TK_WDURATION 241
-#define TK_IROWTS 242
-#define TK_ISFILLED 243
-#define TK_CAST 244
-#define TK_NOW 245
-#define TK_TODAY 246
-#define TK_TIMEZONE 247
-#define TK_CLIENT_VERSION 248
-#define TK_SERVER_VERSION 249
-#define TK_SERVER_STATUS 250
-#define TK_CURRENT_USER 251
-#define TK_CASE 252
-#define TK_WHEN 253
-#define TK_THEN 254
-#define TK_ELSE 255
-#define TK_BETWEEN 256
-#define TK_IS 257
-#define TK_NK_LT 258
-#define TK_NK_GT 259
-#define TK_NK_LE 260
-#define TK_NK_GE 261
-#define TK_NK_NE 262
-#define TK_MATCH 263
-#define TK_NMATCH 264
-#define TK_CONTAINS 265
-#define TK_IN 266
-#define TK_JOIN 267
-#define TK_INNER 268
-#define TK_SELECT 269
-#define TK_NK_HINT 270
-#define TK_DISTINCT 271
-#define TK_WHERE 272
-#define TK_PARTITION 273
-#define TK_BY 274
-#define TK_SESSION 275
-#define TK_STATE_WINDOW 276
-#define TK_EVENT_WINDOW 277
-#define TK_SLIDING 278
-#define TK_FILL 279
-#define TK_VALUE 280
-#define TK_VALUE_F 281
-#define TK_NONE 282
-#define TK_PREV 283
-#define TK_NULL_F 284
-#define TK_LINEAR 285
-#define TK_NEXT 286
-#define TK_HAVING 287
-#define TK_RANGE 288
-#define TK_EVERY 289
-#define TK_ORDER 290
-#define TK_SLIMIT 291
-#define TK_SOFFSET 292
-#define TK_LIMIT 293
-#define TK_OFFSET 294
-#define TK_ASC 295
-#define TK_NULLS 296
-#define TK_ABORT 297
-#define TK_AFTER 298
-#define TK_ATTACH 299
-#define TK_BEFORE 300
-#define TK_BEGIN 301
-#define TK_BITAND 302
-#define TK_BITNOT 303
-#define TK_BITOR 304
-#define TK_BLOCKS 305
-#define TK_CHANGE 306
-#define TK_COMMA 307
-#define TK_CONCAT 308
-#define TK_CONFLICT 309
-#define TK_COPY 310
-#define TK_DEFERRED 311
-#define TK_DELIMITERS 312
-#define TK_DETACH 313
-#define TK_DIVIDE 314
-#define TK_DOT 315
-#define TK_EACH 316
-#define TK_FAIL 317
-#define TK_FILE 318
-#define TK_FOR 319
-#define TK_GLOB 320
-#define TK_ID 321
-#define TK_IMMEDIATE 322
-#define TK_IMPORT 323
-#define TK_INITIALLY 324
-#define TK_INSTEAD 325
-#define TK_ISNULL 326
-#define TK_KEY 327
-#define TK_MODULES 328
-#define TK_NK_BITNOT 329
-#define TK_NK_SEMI 330
-#define TK_NOTNULL 331
-#define TK_OF 332
-#define TK_PLUS 333
-#define TK_PRIVILEGE 334
-#define TK_RAISE 335
-#define TK_RESTRICT 336
-#define TK_ROW 337
-#define TK_SEMI 338
-#define TK_STAR 339
-#define TK_STATEMENT 340
-#define TK_STRICT 341
-#define TK_STRING 342
-#define TK_TIMES 343
-#define TK_VALUES 344
-#define TK_VARIABLE 345
-#define TK_WAL 346
-#endif
-/**************** End token definitions ***************************************/
+/* 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 ***************************/
/* The next sections is a series of control #defines.
** various aspects of the generated parser.
@@ -452,29 +104,29 @@
#endif
/************* Begin control #defines *****************************************/
#define YYCODETYPE unsigned short int
-#define YYNOCODE 508
+#define YYNOCODE 511
#define YYACTIONTYPE unsigned short int
#define ParseTOKENTYPE SToken
typedef union {
int yyinit;
ParseTOKENTYPE yy0;
- SNodeList* yy88;
- int32_t yy92;
- SAlterOption yy117;
- SShowTablesOption yy133;
- ENullOrder yy153;
- int64_t yy221;
- SNode* yy232;
- STokenPair yy241;
- EFillMode yy246;
- int8_t yy279;
- EShowKind yy281;
- SDataType yy400;
- EJoinType yy436;
- EOperatorType yy708;
- EOrder yy834;
- bool yy985;
- SToken yy993;
+ EOperatorType yy30;
+ EJoinType yy246;
+ int64_t yy277;
+ ENullOrder yy361;
+ STokenPair yy483;
+ SNode* yy490;
+ SNodeList* yy502;
+ SAlterOption yy529;
+ SToken yy561;
+ EShowKind yy579;
+ EFillMode yy718;
+ int32_t yy774;
+ SDataType yy826;
+ bool yy845;
+ EOrder yy876;
+ SShowTablesOption yy961;
+ int8_t yy1013;
} YYMINORTYPE;
#ifndef YYSTACKDEPTH
#define YYSTACKDEPTH 100
@@ -490,18 +142,18 @@ typedef union {
#define ParseCTX_FETCH
#define ParseCTX_STORE
#define YYFALLBACK 1
-#define YYNSTATE 840
-#define YYNRULE 642
-#define YYNRULE_WITH_ACTION 642
-#define YYNTOKEN 347
-#define YY_MAX_SHIFT 839
-#define YY_MIN_SHIFTREDUCE 1242
-#define YY_MAX_SHIFTREDUCE 1883
-#define YY_ERROR_ACTION 1884
-#define YY_ACCEPT_ACTION 1885
-#define YY_NO_ACTION 1886
-#define YY_MIN_REDUCE 1887
-#define YY_MAX_REDUCE 2528
+#define YYNSTATE 846
+#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
/************* End control #defines *******************************************/
#define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0])))
@@ -568,874 +220,879 @@ typedef union {
** yy_default[] Default action for each state.
**
*********** Begin parsing tables **********************************************/
-#define YY_ACTTAB_COUNT (3071)
+#define YY_ACTTAB_COUNT (3083)
static const YYACTIONTYPE yy_action[] = {
- /* 0 */ 409, 561, 197, 418, 562, 1930, 569, 2064, 171, 562,
- /* 10 */ 1930, 168, 48, 46, 1807, 2210, 2077, 34, 397, 2077,
- /* 20 */ 415, 471, 1648, 41, 40, 1673, 2126, 47, 45, 44,
- /* 30 */ 43, 42, 36, 2208, 712, 1733, 1971, 1646, 41, 40,
- /* 40 */ 38, 320, 47, 45, 44, 43, 42, 2330, 41, 40,
- /* 50 */ 480, 2186, 47, 45, 44, 43, 42, 704, 146, 1674,
- /* 60 */ 707, 184, 2122, 2123, 1728, 1888, 528, 526, 420, 365,
- /* 70 */ 19, 2121, 2123, 217, 41, 40, 173, 1654, 47, 45,
- /* 80 */ 44, 43, 42, 383, 2014, 2190, 127, 95, 2348, 126,
- /* 90 */ 125, 124, 123, 122, 121, 120, 119, 118, 1673, 219,
- /* 100 */ 2296, 237, 741, 836, 385, 564, 15, 1938, 811, 810,
- /* 110 */ 809, 808, 427, 2070, 807, 806, 151, 801, 800, 799,
- /* 120 */ 798, 797, 796, 795, 150, 789, 788, 787, 426, 425,
- /* 130 */ 784, 783, 782, 183, 182, 781, 692, 486, 2186, 2499,
- /* 140 */ 1648, 2329, 1735, 1736, 2367, 686, 184, 114, 2331, 745,
- /* 150 */ 2333, 2334, 740, 148, 735, 1646, 2391, 691, 203, 186,
- /* 160 */ 581, 2420, 2500, 693, 1282, 411, 2416, 300, 2428, 703,
- /* 170 */ 2191, 138, 702, 2348, 2499, 704, 146, 1708, 1718, 2435,
- /* 180 */ 205, 1479, 1480, 1289, 1734, 1737, 221, 724, 2450, 2128,
- /* 190 */ 1674, 724, 691, 203, 2210, 1654, 381, 2500, 693, 1649,
- /* 200 */ 174, 1647, 1899, 2504, 2126, 2432, 1284, 1287, 1288, 408,
- /* 210 */ 41, 40, 2207, 712, 47, 45, 44, 43, 42, 127,
- /* 220 */ 1676, 836, 126, 125, 124, 123, 122, 121, 120, 119,
- /* 230 */ 118, 1652, 1653, 1705, 685, 1707, 1710, 1711, 1712, 1713,
- /* 240 */ 1714, 1715, 1716, 1717, 737, 733, 1726, 1727, 1729, 1730,
- /* 250 */ 1731, 1732, 2, 48, 46, 1547, 1548, 1880, 364, 682,
- /* 260 */ 1671, 415, 1308, 1648, 1307, 514, 2186, 512, 1830, 2330,
- /* 270 */ 531, 724, 375, 51, 692, 530, 1733, 2499, 1646, 142,
- /* 280 */ 2306, 650, 742, 1831, 706, 201, 2428, 2429, 272, 144,
- /* 290 */ 2433, 494, 271, 532, 2066, 691, 203, 1309, 496, 2504,
- /* 300 */ 2500, 693, 2499, 112, 2310, 1728, 1887, 1873, 474, 566,
- /* 310 */ 2348, 19, 1567, 1568, 226, 563, 1762, 1649, 1654, 1647,
- /* 320 */ 147, 2503, 2296, 1829, 741, 2500, 2502, 2330, 2067, 196,
- /* 330 */ 136, 135, 134, 133, 132, 131, 130, 129, 128, 608,
- /* 340 */ 742, 2115, 1940, 607, 836, 384, 687, 15, 2312, 1652,
- /* 350 */ 1653, 688, 683, 676, 1566, 1569, 482, 51, 735, 98,
- /* 360 */ 578, 1879, 370, 2329, 2051, 395, 2367, 641, 2348, 175,
- /* 370 */ 2331, 745, 2333, 2334, 740, 577, 735, 666, 1763, 302,
- /* 380 */ 2296, 106, 741, 1735, 1736, 1910, 2197, 2176, 1958, 519,
- /* 390 */ 518, 517, 516, 511, 510, 509, 508, 507, 502, 501,
- /* 400 */ 500, 499, 367, 491, 490, 489, 2068, 484, 483, 382,
- /* 410 */ 624, 668, 2461, 475, 1535, 1536, 579, 2203, 1708, 1718,
- /* 420 */ 1554, 2329, 1673, 648, 2367, 1734, 1737, 114, 2331, 745,
- /* 430 */ 2333, 2334, 740, 780, 735, 1676, 304, 639, 2296, 2519,
- /* 440 */ 1649, 2420, 1647, 41, 40, 411, 2416, 47, 45, 44,
- /* 450 */ 43, 42, 637, 1654, 635, 269, 268, 2289, 37, 413,
- /* 460 */ 1757, 1758, 1759, 1760, 1761, 1765, 1766, 1767, 1768, 780,
- /* 470 */ 311, 312, 1652, 1653, 1705, 310, 1707, 1710, 1711, 1712,
- /* 480 */ 1713, 1714, 1715, 1716, 1717, 737, 733, 1726, 1727, 1729,
- /* 490 */ 1730, 1731, 1732, 2, 12, 48, 46, 255, 239, 2330,
- /* 500 */ 1673, 1399, 564, 415, 1938, 1648, 61, 667, 63, 1909,
- /* 510 */ 2499, 63, 742, 178, 664, 12, 1398, 68, 1733, 558,
- /* 520 */ 1646, 598, 594, 590, 586, 223, 254, 556, 2505, 203,
- /* 530 */ 552, 548, 1908, 2500, 693, 2330, 159, 623, 622, 621,
- /* 540 */ 2348, 651, 1849, 522, 613, 143, 617, 1728, 707, 651,
- /* 550 */ 616, 2052, 2296, 19, 741, 615, 620, 391, 390, 1705,
- /* 560 */ 1654, 614, 2296, 3, 610, 2504, 90, 96, 2499, 89,
- /* 570 */ 252, 1311, 1312, 41, 40, 54, 2348, 47, 45, 44,
- /* 580 */ 43, 42, 533, 424, 423, 2296, 836, 2503, 2296, 15,
- /* 590 */ 741, 2500, 2501, 2329, 302, 1308, 2367, 1307, 30, 114,
- /* 600 */ 2331, 745, 2333, 2334, 740, 227, 735, 2306, 1655, 149,
- /* 610 */ 55, 156, 2391, 2420, 1811, 571, 2249, 411, 2416, 63,
- /* 620 */ 1673, 2315, 771, 653, 2249, 1735, 1736, 521, 520, 2329,
- /* 630 */ 1309, 2310, 2367, 88, 242, 114, 2331, 745, 2333, 2334,
- /* 640 */ 740, 2128, 735, 251, 244, 600, 599, 186, 396, 2420,
- /* 650 */ 249, 575, 325, 411, 2416, 2435, 2126, 1709, 41, 40,
- /* 660 */ 1708, 1718, 47, 45, 44, 43, 42, 1734, 1737, 241,
- /* 670 */ 699, 304, 1850, 1743, 304, 2312, 2451, 1974, 2159, 1673,
- /* 680 */ 1444, 2431, 1649, 2060, 1647, 735, 778, 161, 160, 775,
- /* 690 */ 774, 773, 158, 52, 1435, 770, 769, 768, 1439, 767,
- /* 700 */ 1441, 1442, 766, 763, 171, 1450, 760, 1452, 1453, 757,
- /* 710 */ 754, 751, 2078, 1706, 1652, 1653, 1705, 99, 1707, 1710,
- /* 720 */ 1711, 1712, 1713, 1714, 1715, 1716, 1717, 737, 733, 1726,
- /* 730 */ 1727, 1729, 1730, 1731, 1732, 2, 48, 46, 1738, 2062,
- /* 740 */ 2330, 44, 43, 42, 415, 2128, 1648, 1907, 1595, 623,
- /* 750 */ 622, 621, 405, 742, 1838, 2458, 613, 143, 617, 1733,
- /* 760 */ 2126, 1646, 616, 725, 2075, 725, 2075, 615, 620, 391,
- /* 770 */ 390, 2330, 1658, 614, 725, 2075, 610, 1709, 1885, 2050,
- /* 780 */ 9, 2348, 304, 137, 742, 137, 2471, 2058, 1728, 12,
- /* 790 */ 604, 10, 609, 2296, 208, 741, 602, 601, 448, 2435,
- /* 800 */ 2296, 1654, 1906, 679, 678, 1836, 1837, 1839, 1840, 1841,
- /* 810 */ 464, 2079, 2348, 41, 40, 463, 2128, 47, 45, 44,
- /* 820 */ 43, 42, 1291, 410, 2296, 2430, 741, 836, 1672, 170,
- /* 830 */ 49, 2126, 280, 1706, 2329, 1905, 1709, 2367, 2330, 498,
- /* 840 */ 114, 2331, 745, 2333, 2334, 740, 2128, 735, 497, 725,
- /* 850 */ 2075, 739, 2519, 419, 2420, 2296, 304, 430, 411, 2416,
- /* 860 */ 667, 2126, 429, 2499, 2503, 2329, 1735, 1736, 2367, 56,
- /* 870 */ 736, 114, 2331, 745, 2333, 2334, 740, 2290, 735, 2348,
- /* 880 */ 95, 2505, 203, 2519, 1904, 2420, 2500, 693, 2296, 411,
- /* 890 */ 2416, 2296, 1706, 741, 778, 161, 160, 775, 774, 773,
- /* 900 */ 158, 1708, 1718, 704, 146, 418, 2071, 667, 1734, 1737,
- /* 910 */ 2499, 2128, 1823, 171, 778, 161, 160, 775, 774, 773,
- /* 920 */ 158, 2077, 2317, 1649, 452, 1647, 711, 667, 2505, 203,
- /* 930 */ 2499, 700, 2329, 2500, 693, 2367, 1949, 2296, 356, 2331,
- /* 940 */ 745, 2333, 2334, 740, 738, 735, 726, 2385, 2505, 203,
- /* 950 */ 1764, 454, 450, 2500, 693, 1652, 1653, 1705, 626, 1707,
- /* 960 */ 1710, 1711, 1712, 1713, 1714, 1715, 1716, 1717, 737, 733,
- /* 970 */ 1726, 1727, 1729, 1730, 1731, 1732, 2, 48, 46, 2319,
- /* 980 */ 2330, 725, 2075, 1403, 646, 415, 1387, 1648, 1903, 649,
- /* 990 */ 725, 2075, 727, 742, 2392, 674, 725, 2075, 1402, 273,
- /* 1000 */ 1733, 468, 1646, 421, 725, 2075, 1796, 839, 619, 618,
- /* 1010 */ 469, 171, 2330, 202, 2428, 2429, 488, 144, 2433, 2077,
- /* 1020 */ 2169, 2348, 2306, 327, 275, 742, 1389, 2492, 1657, 1728,
- /* 1030 */ 35, 725, 2075, 2296, 667, 741, 2314, 2499, 1804, 193,
- /* 1040 */ 1769, 2296, 1654, 725, 2075, 284, 2310, 827, 823, 819,
- /* 1050 */ 815, 503, 324, 2348, 791, 2505, 203, 2258, 725, 2075,
- /* 1060 */ 2500, 693, 478, 504, 535, 2296, 2015, 741, 836, 704,
- /* 1070 */ 146, 49, 1902, 628, 2329, 1616, 1617, 2367, 505, 1677,
- /* 1080 */ 114, 2331, 745, 2333, 2334, 740, 652, 735, 640, 100,
- /* 1090 */ 2312, 412, 2519, 113, 2420, 1677, 318, 1673, 411, 2416,
- /* 1100 */ 735, 725, 2075, 2277, 270, 1900, 2329, 1735, 1736, 2367,
- /* 1110 */ 1289, 274, 114, 2331, 745, 2333, 2334, 740, 793, 735,
- /* 1120 */ 631, 580, 1677, 696, 2519, 2296, 2420, 625, 721, 794,
- /* 1130 */ 411, 2416, 2036, 267, 1287, 1288, 667, 805, 803, 2499,
- /* 1140 */ 41, 40, 1708, 1718, 47, 45, 44, 43, 42, 1734,
- /* 1150 */ 1737, 695, 1677, 389, 388, 725, 2075, 2505, 203, 729,
- /* 1160 */ 159, 2392, 2500, 693, 1649, 772, 1647, 2128, 2119, 307,
- /* 1170 */ 1901, 725, 2075, 2128, 72, 2072, 306, 71, 111, 204,
- /* 1180 */ 2428, 2429, 720, 144, 2433, 14, 13, 108, 2127, 708,
- /* 1190 */ 63, 283, 1660, 1898, 1897, 277, 1652, 1653, 1705, 1896,
- /* 1200 */ 1707, 1710, 1711, 1712, 1713, 1714, 1715, 1716, 1717, 737,
- /* 1210 */ 733, 1726, 1727, 1729, 1730, 1731, 1732, 2, 48, 46,
- /* 1220 */ 725, 2075, 2330, 2296, 387, 386, 415, 606, 1648, 47,
- /* 1230 */ 45, 44, 43, 42, 1611, 742, 1895, 2439, 194, 667,
- /* 1240 */ 710, 1733, 2499, 1646, 725, 2075, 2296, 2296, 1894, 608,
- /* 1250 */ 1893, 1892, 2296, 607, 725, 2075, 725, 2075, 725, 2075,
- /* 1260 */ 2505, 203, 2280, 2348, 315, 2500, 693, 725, 2075, 776,
- /* 1270 */ 1728, 76, 2119, 732, 722, 2296, 723, 741, 321, 1891,
- /* 1280 */ 1890, 198, 462, 1654, 461, 777, 2464, 422, 2119, 2296,
- /* 1290 */ 334, 1776, 1678, 2105, 1915, 831, 260, 2440, 1796, 258,
- /* 1300 */ 643, 2296, 642, 2296, 2296, 1803, 139, 50, 1678, 836,
- /* 1310 */ 1706, 199, 15, 437, 460, 1656, 2329, 2330, 86, 2367,
- /* 1320 */ 611, 87, 114, 2331, 745, 2333, 2334, 740, 210, 735,
- /* 1330 */ 742, 2053, 2296, 2296, 2519, 1678, 2420, 424, 423, 262,
- /* 1340 */ 411, 2416, 261, 264, 1384, 612, 263, 1662, 1735, 1736,
- /* 1350 */ 680, 266, 1947, 304, 265, 785, 159, 1342, 2348, 50,
- /* 1360 */ 1733, 786, 1655, 297, 152, 1678, 50, 1882, 1883, 1382,
- /* 1370 */ 2296, 141, 741, 2349, 629, 291, 14, 13, 2012, 1361,
- /* 1380 */ 1941, 1719, 697, 1708, 1718, 1359, 2011, 187, 159, 1728,
- /* 1390 */ 1734, 1737, 50, 309, 75, 2195, 157, 1343, 159, 66,
- /* 1400 */ 50, 749, 1654, 157, 159, 1649, 140, 1647, 1931, 2454,
- /* 1410 */ 157, 2329, 677, 401, 2367, 684, 714, 114, 2331, 745,
- /* 1420 */ 2333, 2334, 740, 398, 735, 2196, 428, 1937, 731, 2395,
- /* 1430 */ 1614, 2420, 829, 1835, 1754, 411, 2416, 1652, 1653, 1705,
- /* 1440 */ 1834, 1707, 1710, 1711, 1712, 1713, 1714, 1715, 1716, 1717,
- /* 1450 */ 737, 733, 1726, 1727, 1729, 1730, 1731, 1732, 2, 2116,
- /* 1460 */ 172, 289, 709, 705, 660, 341, 1564, 313, 717, 2455,
- /* 1470 */ 317, 2465, 1429, 1770, 333, 1457, 299, 1461, 1468, 1659,
- /* 1480 */ 1466, 296, 338, 74, 162, 303, 73, 2037, 5, 431,
- /* 1490 */ 436, 379, 444, 445, 1681, 455, 366, 211, 1588, 456,
- /* 1500 */ 2330, 212, 214, 458, 1671, 328, 472, 235, 543, 541,
- /* 1510 */ 538, 1672, 479, 742, 225, 485, 481, 487, 492, 524,
- /* 1520 */ 506, 523, 513, 2188, 1663, 515, 1658, 525, 536, 537,
- /* 1530 */ 534, 229, 230, 539, 232, 540, 542, 544, 1679, 4,
- /* 1540 */ 559, 2348, 560, 567, 240, 568, 570, 92, 63, 1674,
- /* 1550 */ 572, 243, 1680, 2296, 573, 741, 1666, 1668, 1682, 576,
- /* 1560 */ 246, 574, 248, 1683, 93, 2204, 582, 94, 253, 603,
- /* 1570 */ 733, 1726, 1727, 1729, 1730, 1731, 1732, 632, 360, 633,
- /* 1580 */ 116, 2267, 2264, 605, 2263, 2065, 64, 645, 97, 257,
- /* 1590 */ 2061, 259, 164, 165, 2329, 647, 2063, 2367, 2059, 166,
- /* 1600 */ 114, 2331, 745, 2333, 2334, 740, 167, 735, 153, 329,
- /* 1610 */ 276, 1675, 2393, 655, 2420, 654, 659, 656, 411, 2416,
- /* 1620 */ 281, 662, 671, 681, 2470, 715, 2330, 2469, 8, 2442,
- /* 1630 */ 690, 290, 293, 84, 83, 467, 402, 292, 216, 742,
- /* 1640 */ 661, 286, 288, 179, 279, 672, 2250, 669, 294, 295,
- /* 1650 */ 670, 459, 457, 1796, 145, 2522, 1676, 701, 1801, 1,
- /* 1660 */ 2330, 2498, 363, 698, 1799, 446, 298, 2348, 443, 439,
- /* 1670 */ 435, 432, 460, 742, 305, 190, 2436, 154, 330, 2296,
- /* 1680 */ 713, 741, 2218, 2217, 331, 2216, 407, 718, 719, 332,
- /* 1690 */ 155, 105, 206, 2076, 62, 2401, 107, 2120, 747, 335,
- /* 1700 */ 1266, 2348, 833, 323, 830, 163, 835, 359, 371, 372,
- /* 1710 */ 2288, 304, 344, 2296, 53, 741, 337, 2287, 2286, 81,
- /* 1720 */ 2329, 358, 2281, 2367, 348, 433, 114, 2331, 745, 2333,
- /* 1730 */ 2334, 740, 434, 735, 2330, 339, 1639, 1640, 728, 209,
- /* 1740 */ 2420, 438, 2279, 440, 411, 2416, 441, 742, 442, 1638,
- /* 1750 */ 2278, 2276, 380, 447, 2329, 2275, 449, 2367, 2274, 451,
- /* 1760 */ 115, 2331, 745, 2333, 2334, 740, 2273, 735, 2330, 453,
- /* 1770 */ 1627, 2254, 213, 2253, 2420, 2348, 215, 1591, 2419, 2416,
- /* 1780 */ 82, 742, 1590, 2231, 2230, 2229, 466, 2296, 465, 741,
- /* 1790 */ 2228, 2227, 2178, 470, 1534, 2175, 473, 2174, 2168, 476,
- /* 1800 */ 477, 2330, 2165, 218, 2164, 85, 2163, 2162, 2167, 2348,
- /* 1810 */ 220, 2166, 2161, 2160, 742, 2158, 2157, 2156, 222, 493,
- /* 1820 */ 2155, 2296, 495, 741, 2171, 2154, 2153, 2152, 2329, 224,
- /* 1830 */ 2139, 2367, 2151, 2150, 115, 2331, 745, 2333, 2334, 740,
- /* 1840 */ 2173, 735, 2348, 2149, 2148, 2147, 2146, 2145, 2420, 527,
- /* 1850 */ 91, 2138, 730, 2416, 2296, 2144, 741, 2143, 2142, 2141,
- /* 1860 */ 2140, 2137, 743, 2136, 2172, 2367, 2170, 2135, 115, 2331,
- /* 1870 */ 745, 2333, 2334, 740, 2134, 735, 1540, 2330, 2133, 2132,
- /* 1880 */ 228, 2131, 2420, 529, 2130, 2129, 374, 2416, 368, 369,
- /* 1890 */ 742, 1400, 1404, 1977, 1976, 2329, 1975, 1973, 2367, 231,
- /* 1900 */ 233, 176, 2331, 745, 2333, 2334, 740, 2330, 735, 1970,
- /* 1910 */ 1396, 1969, 234, 545, 549, 1962, 546, 547, 2348, 550,
- /* 1920 */ 742, 1951, 551, 553, 1926, 555, 557, 1290, 185, 1925,
- /* 1930 */ 2296, 2252, 741, 554, 78, 236, 2248, 2316, 2238, 2226,
- /* 1940 */ 195, 2225, 238, 79, 245, 2202, 247, 565, 2348, 250,
- /* 1950 */ 2054, 1972, 1968, 583, 584, 694, 2520, 1966, 588, 585,
- /* 1960 */ 2296, 589, 741, 587, 1964, 591, 1961, 593, 1946, 592,
- /* 1970 */ 595, 2329, 597, 596, 2367, 1335, 1944, 115, 2331, 745,
- /* 1980 */ 2333, 2334, 740, 1945, 735, 2330, 1943, 1922, 2056, 1472,
- /* 1990 */ 1473, 2420, 2055, 1386, 802, 1385, 2417, 1383, 742, 1381,
- /* 2000 */ 1380, 2329, 2330, 804, 2367, 1959, 1379, 175, 2331, 745,
- /* 2010 */ 2333, 2334, 740, 1372, 735, 742, 1378, 256, 1377, 2330,
- /* 2020 */ 392, 1374, 65, 1950, 393, 627, 2348, 1373, 1948, 394,
- /* 2030 */ 1371, 399, 742, 630, 1921, 1920, 1919, 634, 2296, 1918,
- /* 2040 */ 741, 636, 1917, 2348, 638, 117, 1621, 1623, 400, 1620,
- /* 2050 */ 2462, 1625, 29, 2251, 69, 2296, 1601, 741, 2247, 1599,
- /* 2060 */ 2348, 1597, 278, 2237, 169, 657, 2224, 2223, 2504, 6,
- /* 2070 */ 17, 20, 2296, 21, 741, 23, 7, 31, 673, 2329,
- /* 2080 */ 1852, 285, 2367, 22, 2330, 357, 2331, 745, 2333, 2334,
- /* 2090 */ 740, 57, 735, 58, 189, 177, 2329, 742, 200, 2367,
- /* 2100 */ 2317, 287, 357, 2331, 745, 2333, 2334, 740, 675, 735,
- /* 2110 */ 1833, 658, 33, 2329, 2330, 1822, 2367, 282, 1872, 350,
- /* 2120 */ 2331, 745, 2333, 2334, 740, 2348, 735, 742, 1576, 663,
- /* 2130 */ 67, 24, 1867, 1575, 1873, 188, 32, 2296, 80, 741,
- /* 2140 */ 1866, 665, 403, 1871, 1870, 18, 404, 60, 1793, 301,
- /* 2150 */ 180, 1792, 2222, 2201, 101, 2348, 2200, 102, 25, 103,
- /* 2160 */ 406, 308, 1828, 191, 26, 689, 314, 2296, 716, 741,
- /* 2170 */ 70, 108, 319, 1745, 104, 1744, 316, 59, 2329, 2330,
- /* 2180 */ 13, 2367, 1664, 2370, 176, 2331, 745, 2333, 2334, 740,
- /* 2190 */ 1755, 735, 739, 1723, 11, 734, 181, 1721, 39, 2330,
- /* 2200 */ 1720, 1690, 16, 192, 1698, 27, 748, 746, 2329, 1458,
- /* 2210 */ 28, 2367, 742, 417, 357, 2331, 745, 2333, 2334, 740,
- /* 2220 */ 2348, 735, 2330, 1455, 750, 752, 753, 755, 1454, 1451,
- /* 2230 */ 756, 744, 2296, 758, 741, 742, 759, 2330, 761, 2521,
- /* 2240 */ 2348, 1445, 762, 764, 1443, 414, 1449, 765, 109, 322,
- /* 2250 */ 742, 110, 2296, 1448, 741, 1447, 2330, 1467, 1463, 1446,
- /* 2260 */ 1333, 77, 779, 2348, 1368, 1365, 1364, 1363, 416, 742,
- /* 2270 */ 1394, 1362, 1360, 2329, 1358, 2296, 2367, 741, 2348, 356,
- /* 2280 */ 2331, 745, 2333, 2334, 740, 1357, 735, 1356, 2386, 1393,
- /* 2290 */ 2296, 790, 741, 2329, 792, 207, 2367, 2348, 1354, 357,
- /* 2300 */ 2331, 745, 2333, 2334, 740, 1353, 735, 1352, 1351, 2296,
- /* 2310 */ 1350, 741, 1349, 1967, 1348, 1390, 2329, 1388, 1345, 2367,
- /* 2320 */ 1344, 1341, 357, 2331, 745, 2333, 2334, 740, 1339, 735,
- /* 2330 */ 2330, 644, 1340, 1338, 2367, 812, 813, 352, 2331, 745,
- /* 2340 */ 2333, 2334, 740, 742, 735, 814, 1965, 816, 817, 2330,
- /* 2350 */ 2329, 818, 1963, 2367, 820, 821, 342, 2331, 745, 2333,
- /* 2360 */ 2334, 740, 742, 735, 822, 2330, 1960, 824, 826, 825,
- /* 2370 */ 1942, 2348, 828, 1279, 1916, 1267, 832, 326, 742, 834,
- /* 2380 */ 1886, 1650, 336, 2296, 837, 741, 1886, 838, 1886, 1886,
- /* 2390 */ 2348, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886,
- /* 2400 */ 1886, 1886, 2296, 1886, 741, 1886, 2348, 1886, 1886, 1886,
- /* 2410 */ 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 2296, 1886,
- /* 2420 */ 741, 1886, 1886, 2330, 2329, 1886, 1886, 2367, 1886, 1886,
- /* 2430 */ 340, 2331, 745, 2333, 2334, 740, 742, 735, 1886, 1886,
- /* 2440 */ 1886, 1886, 1886, 2329, 1886, 1886, 2367, 2330, 1886, 343,
- /* 2450 */ 2331, 745, 2333, 2334, 740, 1886, 735, 1886, 1886, 2329,
- /* 2460 */ 742, 1886, 2367, 1886, 2348, 349, 2331, 745, 2333, 2334,
- /* 2470 */ 740, 1886, 735, 1886, 1886, 1886, 2296, 1886, 741, 1886,
- /* 2480 */ 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 2348, 1886,
- /* 2490 */ 2330, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886,
- /* 2500 */ 2296, 1886, 741, 742, 1886, 1886, 1886, 1886, 1886, 1886,
- /* 2510 */ 1886, 1886, 1886, 1886, 1886, 1886, 2330, 2329, 1886, 1886,
- /* 2520 */ 2367, 1886, 1886, 353, 2331, 745, 2333, 2334, 740, 742,
- /* 2530 */ 735, 2348, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886,
- /* 2540 */ 1886, 2329, 1886, 2296, 2367, 741, 1886, 345, 2331, 745,
- /* 2550 */ 2333, 2334, 740, 1886, 735, 1886, 1886, 2348, 1886, 2330,
- /* 2560 */ 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 2296,
- /* 2570 */ 1886, 741, 742, 1886, 1886, 1886, 1886, 1886, 1886, 1886,
- /* 2580 */ 1886, 1886, 1886, 2330, 2329, 1886, 1886, 2367, 1886, 1886,
- /* 2590 */ 354, 2331, 745, 2333, 2334, 740, 742, 735, 1886, 1886,
- /* 2600 */ 2348, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886,
- /* 2610 */ 2329, 1886, 2296, 2367, 741, 1886, 346, 2331, 745, 2333,
- /* 2620 */ 2334, 740, 1886, 735, 2348, 1886, 2330, 1886, 1886, 1886,
- /* 2630 */ 1886, 1886, 1886, 1886, 1886, 1886, 2296, 1886, 741, 742,
- /* 2640 */ 1886, 2330, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886,
- /* 2650 */ 1886, 1886, 1886, 2329, 742, 1886, 2367, 2330, 1886, 355,
- /* 2660 */ 2331, 745, 2333, 2334, 740, 1886, 735, 2348, 1886, 1886,
- /* 2670 */ 742, 1886, 1886, 1886, 1886, 1886, 1886, 2329, 1886, 2296,
- /* 2680 */ 2367, 741, 2348, 347, 2331, 745, 2333, 2334, 740, 1886,
- /* 2690 */ 735, 1886, 1886, 1886, 2296, 1886, 741, 1886, 2348, 1886,
- /* 2700 */ 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886,
- /* 2710 */ 2296, 1886, 741, 1886, 1886, 1886, 1886, 1886, 1886, 1886,
- /* 2720 */ 2329, 1886, 1886, 2367, 1886, 1886, 361, 2331, 745, 2333,
- /* 2730 */ 2334, 740, 1886, 735, 2330, 2329, 1886, 1886, 2367, 1886,
- /* 2740 */ 1886, 362, 2331, 745, 2333, 2334, 740, 742, 735, 1886,
- /* 2750 */ 1886, 2329, 1886, 2330, 2367, 1886, 1886, 2342, 2331, 745,
- /* 2760 */ 2333, 2334, 740, 1886, 735, 1886, 742, 1886, 1886, 2330,
- /* 2770 */ 1886, 1886, 1886, 1886, 1886, 2348, 1886, 1886, 1886, 1886,
- /* 2780 */ 1886, 1886, 742, 1886, 1886, 1886, 1886, 2296, 1886, 741,
- /* 2790 */ 1886, 1886, 1886, 1886, 2348, 1886, 1886, 1886, 1886, 1886,
- /* 2800 */ 1886, 1886, 1886, 1886, 1886, 1886, 2296, 1886, 741, 1886,
- /* 2810 */ 2348, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886,
- /* 2820 */ 1886, 1886, 2296, 1886, 741, 1886, 1886, 2330, 2329, 1886,
- /* 2830 */ 1886, 2367, 1886, 1886, 2341, 2331, 745, 2333, 2334, 740,
- /* 2840 */ 742, 735, 1886, 1886, 1886, 1886, 1886, 2329, 1886, 1886,
- /* 2850 */ 2367, 2330, 1886, 2340, 2331, 745, 2333, 2334, 740, 1886,
- /* 2860 */ 735, 1886, 1886, 2329, 742, 1886, 2367, 1886, 2348, 376,
- /* 2870 */ 2331, 745, 2333, 2334, 740, 1886, 735, 1886, 1886, 1886,
- /* 2880 */ 2296, 1886, 741, 1886, 1886, 1886, 1886, 1886, 1886, 1886,
- /* 2890 */ 1886, 1886, 2348, 1886, 2330, 1886, 1886, 1886, 1886, 1886,
- /* 2900 */ 1886, 1886, 1886, 1886, 2296, 1886, 741, 742, 1886, 1886,
- /* 2910 */ 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886,
- /* 2920 */ 2330, 2329, 1886, 1886, 2367, 1886, 1886, 377, 2331, 745,
- /* 2930 */ 2333, 2334, 740, 742, 735, 2348, 1886, 1886, 1886, 1886,
- /* 2940 */ 1886, 1886, 1886, 1886, 1886, 2329, 1886, 2296, 2367, 741,
- /* 2950 */ 1886, 373, 2331, 745, 2333, 2334, 740, 1886, 735, 1886,
- /* 2960 */ 1886, 2348, 1886, 2330, 1886, 1886, 1886, 1886, 1886, 1886,
- /* 2970 */ 1886, 1886, 1886, 2296, 1886, 741, 742, 1886, 1886, 1886,
- /* 2980 */ 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 2329, 1886,
- /* 2990 */ 1886, 2367, 1886, 1886, 378, 2331, 745, 2333, 2334, 740,
- /* 3000 */ 1886, 735, 1886, 1886, 2348, 1886, 1886, 1886, 1886, 1886,
- /* 3010 */ 1886, 1886, 1886, 1886, 743, 1886, 2296, 2367, 741, 1886,
- /* 3020 */ 352, 2331, 745, 2333, 2334, 740, 1886, 735, 1886, 1886,
- /* 3030 */ 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886,
- /* 3040 */ 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886,
- /* 3050 */ 1886, 1886, 1886, 1886, 1886, 1886, 1886, 2329, 1886, 1886,
- /* 3060 */ 2367, 1886, 1886, 351, 2331, 745, 2333, 2334, 740, 1886,
- /* 3070 */ 735,
+ /* 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,
+ /* 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,
};
static const YYCODETYPE yy_lookahead[] = {
- /* 0 */ 383, 357, 432, 383, 360, 361, 357, 392, 391, 360,
- /* 10 */ 361, 391, 12, 13, 14, 405, 399, 2, 398, 399,
- /* 20 */ 20, 362, 22, 8, 9, 20, 406, 12, 13, 14,
- /* 30 */ 15, 16, 2, 423, 424, 35, 0, 37, 8, 9,
- /* 40 */ 465, 466, 12, 13, 14, 15, 16, 350, 8, 9,
- /* 50 */ 362, 363, 12, 13, 14, 15, 16, 362, 363, 20,
- /* 60 */ 363, 391, 404, 405, 64, 0, 407, 408, 401, 410,
- /* 70 */ 70, 404, 405, 414, 8, 9, 372, 77, 12, 13,
- /* 80 */ 14, 15, 16, 413, 380, 415, 21, 371, 391, 24,
- /* 90 */ 25, 26, 27, 28, 29, 30, 31, 32, 20, 411,
- /* 100 */ 403, 358, 405, 103, 388, 362, 106, 364, 72, 73,
- /* 110 */ 74, 75, 76, 397, 78, 79, 80, 81, 82, 83,
+ /* 0 */ 353, 382, 360, 395, 429, 363, 364, 1, 2, 434,
+ /* 10 */ 0, 429, 12, 13, 14, 396, 479, 2, 386, 482,
+ /* 20 */ 20, 20, 22, 8, 9, 406, 394, 12, 13, 14,
+ /* 30 */ 15, 16, 395, 21, 402, 35, 0, 37, 501, 365,
+ /* 40 */ 366, 479, 505, 506, 482, 353, 468, 469, 36, 365,
+ /* 50 */ 38, 39, 40, 406, 479, 365, 366, 482, 366, 385,
+ /* 60 */ 372, 479, 500, 501, 482, 65, 392, 505, 506, 450,
+ /* 70 */ 451, 71, 352, 408, 354, 500, 501, 389, 78, 460,
+ /* 80 */ 505, 506, 500, 501, 408, 397, 394, 505, 506, 8,
+ /* 90 */ 9, 426, 427, 12, 13, 14, 15, 16, 406, 423,
+ /* 100 */ 408, 70, 426, 427, 104, 421, 422, 107, 365, 73,
+ /* 110 */ 74, 75, 76, 77, 108, 79, 80, 81, 82, 83,
/* 120 */ 84, 85, 86, 87, 88, 89, 90, 91, 92, 93,
- /* 130 */ 94, 95, 96, 97, 98, 99, 476, 362, 363, 479,
- /* 140 */ 22, 444, 142, 143, 447, 363, 391, 450, 451, 452,
- /* 150 */ 453, 454, 455, 460, 457, 37, 463, 497, 498, 462,
- /* 160 */ 69, 464, 502, 503, 4, 468, 469, 472, 473, 474,
- /* 170 */ 415, 476, 477, 391, 479, 362, 363, 177, 178, 449,
- /* 180 */ 483, 142, 143, 23, 184, 185, 411, 20, 491, 391,
- /* 190 */ 20, 20, 497, 498, 405, 77, 398, 502, 503, 199,
- /* 200 */ 349, 201, 351, 3, 406, 475, 46, 47, 48, 420,
- /* 210 */ 8, 9, 423, 424, 12, 13, 14, 15, 16, 21,
- /* 220 */ 20, 103, 24, 25, 26, 27, 28, 29, 30, 31,
- /* 230 */ 32, 231, 232, 233, 452, 235, 236, 237, 238, 239,
+ /* 130 */ 94, 95, 96, 97, 98, 99, 100, 0, 20, 447,
+ /* 140 */ 22, 107, 450, 143, 144, 453, 454, 455, 456, 457,
+ /* 150 */ 458, 20, 460, 410, 411, 37, 413, 465, 360, 467,
+ /* 160 */ 417, 363, 364, 471, 472, 475, 476, 477, 14, 479,
+ /* 170 */ 480, 161, 482, 55, 20, 165, 394, 394, 486, 479,
+ /* 180 */ 180, 181, 482, 173, 401, 20, 494, 187, 188, 108,
+ /* 190 */ 500, 501, 409, 365, 366, 505, 506, 0, 416, 186,
+ /* 200 */ 418, 501, 202, 107, 204, 505, 506, 70, 393, 365,
+ /* 210 */ 366, 8, 9, 365, 366, 12, 13, 14, 15, 16,
+ /* 220 */ 405, 24, 25, 26, 27, 28, 29, 30, 31, 32,
+ /* 230 */ 20, 365, 366, 385, 234, 235, 236, 107, 238, 239,
/* 240 */ 240, 241, 242, 243, 244, 245, 246, 247, 248, 249,
- /* 250 */ 250, 251, 252, 12, 13, 177, 178, 191, 18, 183,
- /* 260 */ 20, 20, 20, 22, 22, 362, 363, 27, 22, 350,
- /* 270 */ 30, 20, 70, 106, 476, 35, 35, 479, 37, 37,
- /* 280 */ 379, 20, 363, 37, 471, 472, 473, 474, 137, 476,
- /* 290 */ 477, 51, 141, 53, 393, 497, 498, 55, 58, 476,
- /* 300 */ 502, 503, 479, 369, 403, 64, 0, 107, 68, 14,
- /* 310 */ 391, 70, 142, 143, 411, 20, 114, 199, 77, 201,
- /* 320 */ 386, 498, 403, 77, 405, 502, 503, 350, 394, 390,
- /* 330 */ 24, 25, 26, 27, 28, 29, 30, 31, 32, 135,
- /* 340 */ 363, 402, 365, 139, 103, 105, 20, 106, 447, 231,
- /* 350 */ 232, 275, 276, 277, 184, 185, 116, 106, 457, 208,
- /* 360 */ 362, 295, 211, 444, 0, 214, 447, 216, 391, 450,
- /* 370 */ 451, 452, 453, 454, 455, 20, 457, 50, 176, 179,
- /* 380 */ 403, 369, 405, 142, 143, 350, 146, 147, 0, 149,
- /* 390 */ 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
- /* 400 */ 160, 161, 162, 163, 164, 165, 394, 167, 168, 169,
- /* 410 */ 22, 492, 493, 173, 174, 175, 418, 419, 177, 178,
- /* 420 */ 180, 444, 20, 116, 447, 184, 185, 450, 451, 452,
- /* 430 */ 453, 454, 455, 69, 457, 20, 269, 21, 403, 462,
- /* 440 */ 199, 464, 201, 8, 9, 468, 469, 12, 13, 14,
- /* 450 */ 15, 16, 36, 77, 38, 39, 40, 426, 256, 257,
- /* 460 */ 258, 259, 260, 261, 262, 263, 264, 265, 266, 69,
- /* 470 */ 136, 137, 231, 232, 233, 141, 235, 236, 237, 238,
- /* 480 */ 239, 240, 241, 242, 243, 244, 245, 246, 247, 248,
- /* 490 */ 249, 250, 251, 252, 253, 12, 13, 35, 358, 350,
- /* 500 */ 20, 22, 362, 20, 364, 22, 179, 476, 106, 350,
- /* 510 */ 479, 106, 363, 51, 187, 253, 37, 4, 35, 51,
- /* 520 */ 37, 59, 60, 61, 62, 64, 64, 59, 497, 498,
- /* 530 */ 62, 63, 350, 502, 503, 350, 33, 72, 73, 74,
- /* 540 */ 391, 362, 107, 86, 79, 80, 81, 64, 363, 362,
- /* 550 */ 85, 0, 403, 70, 405, 90, 91, 92, 93, 233,
- /* 560 */ 77, 96, 403, 33, 99, 476, 105, 105, 479, 108,
- /* 570 */ 108, 56, 57, 8, 9, 45, 391, 12, 13, 14,
- /* 580 */ 15, 16, 103, 12, 13, 403, 103, 498, 403, 106,
- /* 590 */ 405, 502, 503, 444, 179, 20, 447, 22, 33, 450,
- /* 600 */ 451, 452, 453, 454, 455, 148, 457, 379, 37, 460,
- /* 610 */ 107, 462, 463, 464, 14, 436, 437, 468, 469, 106,
- /* 620 */ 20, 393, 116, 436, 437, 142, 143, 170, 171, 444,
- /* 630 */ 55, 403, 447, 172, 172, 450, 451, 452, 453, 454,
- /* 640 */ 455, 391, 457, 181, 182, 367, 368, 462, 398, 464,
- /* 650 */ 188, 189, 34, 468, 469, 449, 406, 177, 8, 9,
- /* 660 */ 177, 178, 12, 13, 14, 15, 16, 184, 185, 207,
- /* 670 */ 33, 269, 107, 14, 269, 447, 491, 0, 0, 20,
- /* 680 */ 103, 475, 199, 392, 201, 457, 135, 136, 137, 138,
- /* 690 */ 139, 140, 141, 106, 117, 118, 119, 120, 121, 122,
- /* 700 */ 123, 124, 125, 126, 391, 128, 129, 130, 131, 132,
- /* 710 */ 133, 134, 399, 233, 231, 232, 233, 172, 235, 236,
- /* 720 */ 237, 238, 239, 240, 241, 242, 243, 244, 245, 246,
- /* 730 */ 247, 248, 249, 250, 251, 252, 12, 13, 14, 392,
- /* 740 */ 350, 14, 15, 16, 20, 391, 22, 350, 203, 72,
- /* 750 */ 73, 74, 398, 363, 231, 365, 79, 80, 81, 35,
- /* 760 */ 406, 37, 85, 362, 363, 362, 363, 90, 91, 92,
- /* 770 */ 93, 350, 201, 96, 362, 363, 99, 177, 347, 0,
- /* 780 */ 42, 391, 269, 382, 363, 382, 365, 392, 64, 253,
- /* 790 */ 389, 255, 389, 403, 382, 405, 367, 368, 68, 449,
- /* 800 */ 403, 77, 350, 280, 281, 282, 283, 284, 285, 286,
- /* 810 */ 426, 392, 391, 8, 9, 431, 391, 12, 13, 14,
- /* 820 */ 15, 16, 14, 398, 403, 475, 405, 103, 20, 179,
- /* 830 */ 106, 406, 392, 233, 444, 350, 177, 447, 350, 161,
- /* 840 */ 450, 451, 452, 453, 454, 455, 391, 457, 170, 362,
- /* 850 */ 363, 363, 462, 398, 464, 403, 269, 426, 468, 469,
- /* 860 */ 476, 406, 431, 479, 3, 444, 142, 143, 447, 382,
- /* 870 */ 392, 450, 451, 452, 453, 454, 455, 426, 457, 391,
- /* 880 */ 371, 497, 498, 462, 350, 464, 502, 503, 403, 468,
- /* 890 */ 469, 403, 233, 405, 135, 136, 137, 138, 139, 140,
- /* 900 */ 141, 177, 178, 362, 363, 383, 397, 476, 184, 185,
- /* 910 */ 479, 391, 107, 391, 135, 136, 137, 138, 139, 140,
- /* 920 */ 141, 399, 49, 199, 194, 201, 406, 476, 497, 498,
- /* 930 */ 479, 294, 444, 502, 503, 447, 0, 403, 450, 451,
- /* 940 */ 452, 453, 454, 455, 456, 457, 458, 459, 497, 498,
- /* 950 */ 176, 221, 222, 502, 503, 231, 232, 233, 22, 235,
- /* 960 */ 236, 237, 238, 239, 240, 241, 242, 243, 244, 245,
- /* 970 */ 246, 247, 248, 249, 250, 251, 252, 12, 13, 106,
- /* 980 */ 350, 362, 363, 22, 426, 20, 37, 22, 350, 1,
- /* 990 */ 362, 363, 461, 363, 463, 365, 362, 363, 37, 136,
- /* 1000 */ 35, 382, 37, 383, 362, 363, 268, 19, 376, 377,
- /* 1010 */ 382, 391, 350, 472, 473, 474, 382, 476, 477, 399,
- /* 1020 */ 0, 391, 379, 35, 382, 363, 77, 365, 37, 64,
- /* 1030 */ 256, 362, 363, 403, 476, 405, 393, 479, 4, 51,
- /* 1040 */ 266, 403, 77, 362, 363, 64, 403, 59, 60, 61,
- /* 1050 */ 62, 382, 64, 391, 13, 497, 498, 387, 362, 363,
- /* 1060 */ 502, 503, 42, 382, 103, 403, 380, 405, 103, 362,
- /* 1070 */ 363, 106, 350, 4, 444, 212, 213, 447, 382, 20,
- /* 1080 */ 450, 451, 452, 453, 454, 455, 426, 457, 19, 108,
- /* 1090 */ 447, 448, 462, 105, 464, 20, 108, 20, 468, 469,
- /* 1100 */ 457, 362, 363, 0, 35, 351, 444, 142, 143, 447,
- /* 1110 */ 23, 441, 450, 451, 452, 453, 454, 455, 77, 457,
- /* 1120 */ 51, 382, 20, 33, 462, 403, 464, 58, 140, 378,
- /* 1130 */ 468, 469, 381, 64, 47, 48, 476, 376, 377, 479,
- /* 1140 */ 8, 9, 177, 178, 12, 13, 14, 15, 16, 184,
- /* 1150 */ 185, 290, 20, 39, 40, 362, 363, 497, 498, 461,
- /* 1160 */ 33, 463, 502, 503, 199, 400, 201, 391, 403, 181,
- /* 1170 */ 350, 362, 363, 391, 105, 382, 188, 108, 106, 472,
- /* 1180 */ 473, 474, 406, 476, 477, 1, 2, 115, 406, 426,
- /* 1190 */ 106, 382, 201, 350, 350, 207, 231, 232, 233, 350,
- /* 1200 */ 235, 236, 237, 238, 239, 240, 241, 242, 243, 244,
- /* 1210 */ 245, 246, 247, 248, 249, 250, 251, 252, 12, 13,
- /* 1220 */ 362, 363, 350, 403, 110, 111, 20, 113, 22, 12,
- /* 1230 */ 13, 14, 15, 16, 107, 363, 350, 365, 179, 476,
- /* 1240 */ 382, 35, 479, 37, 362, 363, 403, 403, 350, 135,
- /* 1250 */ 350, 350, 403, 139, 362, 363, 362, 363, 362, 363,
- /* 1260 */ 497, 498, 0, 391, 382, 502, 503, 362, 363, 400,
- /* 1270 */ 64, 116, 403, 70, 382, 403, 382, 405, 382, 350,
- /* 1280 */ 350, 179, 198, 77, 200, 400, 416, 382, 403, 403,
- /* 1290 */ 384, 107, 233, 387, 353, 354, 109, 267, 268, 112,
- /* 1300 */ 215, 403, 217, 403, 403, 271, 33, 33, 233, 103,
- /* 1310 */ 233, 179, 106, 51, 230, 37, 444, 350, 45, 447,
- /* 1320 */ 13, 166, 450, 451, 452, 453, 454, 455, 225, 457,
- /* 1330 */ 363, 0, 403, 403, 462, 233, 464, 12, 13, 109,
- /* 1340 */ 468, 469, 112, 109, 37, 13, 112, 22, 142, 143,
- /* 1350 */ 495, 109, 0, 269, 112, 13, 33, 37, 391, 33,
- /* 1360 */ 35, 13, 37, 506, 33, 233, 33, 142, 143, 37,
- /* 1370 */ 403, 366, 405, 391, 22, 488, 1, 2, 379, 37,
- /* 1380 */ 0, 107, 292, 177, 178, 37, 379, 33, 33, 64,
- /* 1390 */ 184, 185, 33, 33, 33, 416, 33, 77, 33, 33,
- /* 1400 */ 33, 33, 77, 33, 33, 199, 33, 201, 361, 416,
- /* 1410 */ 33, 444, 494, 494, 447, 494, 494, 450, 451, 452,
- /* 1420 */ 453, 454, 455, 425, 457, 416, 366, 363, 103, 462,
- /* 1430 */ 107, 464, 52, 107, 231, 468, 469, 231, 232, 233,
- /* 1440 */ 107, 235, 236, 237, 238, 239, 240, 241, 242, 243,
- /* 1450 */ 244, 245, 246, 247, 248, 249, 250, 251, 252, 402,
- /* 1460 */ 18, 107, 107, 478, 433, 23, 107, 107, 107, 416,
- /* 1470 */ 107, 416, 107, 107, 107, 107, 499, 107, 107, 201,
- /* 1480 */ 107, 470, 40, 41, 107, 481, 44, 381, 272, 427,
- /* 1490 */ 51, 446, 42, 445, 20, 214, 54, 443, 197, 438,
- /* 1500 */ 350, 371, 371, 438, 20, 429, 362, 65, 66, 67,
- /* 1510 */ 68, 20, 363, 363, 45, 363, 412, 412, 409, 176,
- /* 1520 */ 362, 409, 363, 362, 199, 412, 201, 409, 104, 375,
- /* 1530 */ 102, 374, 362, 101, 362, 373, 362, 362, 20, 50,
- /* 1540 */ 355, 391, 359, 355, 371, 359, 438, 371, 106, 20,
- /* 1550 */ 405, 371, 20, 403, 364, 405, 231, 232, 20, 364,
- /* 1560 */ 371, 428, 371, 20, 371, 419, 362, 371, 371, 355,
- /* 1570 */ 245, 246, 247, 248, 249, 250, 251, 353, 355, 353,
- /* 1580 */ 362, 403, 403, 391, 403, 391, 144, 218, 106, 391,
- /* 1590 */ 391, 391, 391, 391, 444, 442, 391, 447, 391, 391,
- /* 1600 */ 450, 451, 452, 453, 454, 455, 391, 457, 440, 438,
- /* 1610 */ 369, 20, 462, 205, 464, 204, 405, 435, 468, 469,
- /* 1620 */ 369, 362, 403, 279, 487, 278, 350, 487, 287, 490,
- /* 1630 */ 190, 489, 485, 191, 192, 193, 296, 486, 196, 363,
- /* 1640 */ 427, 421, 421, 487, 434, 289, 437, 273, 484, 427,
- /* 1650 */ 288, 209, 210, 268, 363, 507, 20, 293, 116, 482,
- /* 1660 */ 350, 501, 220, 291, 270, 223, 500, 391, 226, 227,
- /* 1670 */ 228, 229, 230, 363, 369, 364, 449, 369, 421, 403,
- /* 1680 */ 403, 405, 403, 403, 421, 403, 403, 182, 417, 387,
- /* 1690 */ 369, 369, 480, 363, 106, 467, 106, 403, 395, 362,
- /* 1700 */ 22, 391, 352, 369, 38, 356, 355, 439, 422, 422,
- /* 1710 */ 0, 269, 385, 403, 430, 405, 370, 0, 0, 45,
- /* 1720 */ 444, 385, 0, 447, 385, 37, 450, 451, 452, 453,
- /* 1730 */ 454, 455, 224, 457, 350, 348, 37, 37, 462, 37,
- /* 1740 */ 464, 224, 0, 37, 468, 469, 37, 363, 224, 37,
- /* 1750 */ 0, 0, 224, 37, 444, 0, 37, 447, 0, 22,
- /* 1760 */ 450, 451, 452, 453, 454, 455, 0, 457, 350, 37,
- /* 1770 */ 219, 0, 207, 0, 464, 391, 207, 201, 468, 469,
- /* 1780 */ 208, 363, 199, 0, 0, 0, 194, 403, 195, 405,
- /* 1790 */ 0, 0, 147, 49, 49, 0, 37, 0, 0, 37,
- /* 1800 */ 51, 350, 0, 49, 0, 45, 0, 0, 0, 391,
- /* 1810 */ 49, 0, 0, 0, 363, 0, 0, 0, 161, 37,
- /* 1820 */ 0, 403, 161, 405, 0, 0, 0, 0, 444, 49,
- /* 1830 */ 0, 447, 0, 0, 450, 451, 452, 453, 454, 455,
- /* 1840 */ 0, 457, 391, 0, 0, 0, 0, 0, 464, 146,
- /* 1850 */ 45, 0, 468, 469, 403, 0, 405, 0, 0, 0,
- /* 1860 */ 0, 0, 444, 0, 0, 447, 0, 0, 450, 451,
- /* 1870 */ 452, 453, 454, 455, 0, 457, 22, 350, 0, 0,
- /* 1880 */ 147, 0, 464, 145, 0, 0, 468, 469, 50, 50,
- /* 1890 */ 363, 22, 22, 0, 0, 444, 0, 0, 447, 64,
- /* 1900 */ 64, 450, 451, 452, 453, 454, 455, 350, 457, 0,
- /* 1910 */ 37, 0, 64, 37, 37, 0, 51, 42, 391, 51,
- /* 1920 */ 363, 0, 42, 37, 0, 42, 37, 14, 33, 0,
- /* 1930 */ 403, 0, 405, 51, 42, 45, 0, 49, 0, 0,
- /* 1940 */ 49, 0, 43, 42, 42, 0, 190, 49, 391, 49,
- /* 1950 */ 0, 0, 0, 37, 51, 504, 505, 0, 51, 42,
- /* 1960 */ 403, 42, 405, 37, 0, 37, 0, 42, 0, 51,
- /* 1970 */ 37, 444, 42, 51, 447, 71, 0, 450, 451, 452,
- /* 1980 */ 453, 454, 455, 0, 457, 350, 0, 0, 0, 22,
- /* 1990 */ 37, 464, 0, 37, 33, 37, 469, 37, 363, 37,
- /* 2000 */ 37, 444, 350, 33, 447, 0, 37, 450, 451, 452,
- /* 2010 */ 453, 454, 455, 22, 457, 363, 37, 112, 37, 350,
- /* 2020 */ 22, 37, 114, 0, 22, 53, 391, 37, 0, 22,
- /* 2030 */ 37, 396, 363, 37, 0, 0, 0, 37, 403, 0,
- /* 2040 */ 405, 37, 0, 391, 22, 20, 37, 37, 396, 37,
- /* 2050 */ 493, 107, 106, 0, 106, 403, 206, 405, 0, 22,
- /* 2060 */ 391, 37, 49, 0, 202, 22, 0, 0, 3, 50,
- /* 2070 */ 274, 33, 403, 33, 405, 274, 50, 106, 104, 444,
- /* 2080 */ 107, 106, 447, 33, 350, 450, 451, 452, 453, 454,
- /* 2090 */ 455, 179, 457, 179, 33, 106, 444, 363, 49, 447,
- /* 2100 */ 49, 107, 450, 451, 452, 453, 454, 455, 102, 457,
- /* 2110 */ 107, 179, 33, 444, 350, 107, 447, 182, 107, 450,
- /* 2120 */ 451, 452, 453, 454, 455, 391, 457, 363, 179, 186,
- /* 2130 */ 3, 33, 37, 179, 107, 106, 106, 403, 106, 405,
- /* 2140 */ 37, 186, 37, 37, 37, 274, 37, 33, 107, 49,
- /* 2150 */ 49, 107, 0, 0, 106, 391, 0, 42, 106, 42,
- /* 2160 */ 396, 107, 107, 106, 33, 496, 106, 403, 183, 405,
- /* 2170 */ 106, 115, 49, 104, 106, 104, 181, 267, 444, 350,
- /* 2180 */ 2, 447, 22, 106, 450, 451, 452, 453, 454, 455,
- /* 2190 */ 231, 457, 363, 107, 254, 106, 49, 107, 106, 350,
- /* 2200 */ 107, 107, 106, 49, 22, 106, 37, 116, 444, 107,
- /* 2210 */ 106, 447, 363, 37, 450, 451, 452, 453, 454, 455,
- /* 2220 */ 391, 457, 350, 107, 106, 37, 106, 37, 107, 107,
- /* 2230 */ 106, 234, 403, 37, 405, 363, 106, 350, 37, 505,
- /* 2240 */ 391, 107, 106, 37, 107, 396, 127, 106, 106, 33,
- /* 2250 */ 363, 106, 403, 127, 405, 127, 350, 37, 22, 127,
- /* 2260 */ 71, 106, 70, 391, 37, 37, 37, 37, 396, 363,
- /* 2270 */ 77, 37, 37, 444, 37, 403, 447, 405, 391, 450,
- /* 2280 */ 451, 452, 453, 454, 455, 37, 457, 37, 459, 77,
- /* 2290 */ 403, 100, 405, 444, 100, 33, 447, 391, 37, 450,
- /* 2300 */ 451, 452, 453, 454, 455, 37, 457, 37, 22, 403,
- /* 2310 */ 37, 405, 37, 0, 37, 77, 444, 37, 37, 447,
- /* 2320 */ 37, 37, 450, 451, 452, 453, 454, 455, 22, 457,
- /* 2330 */ 350, 444, 37, 37, 447, 37, 51, 450, 451, 452,
- /* 2340 */ 453, 454, 455, 363, 457, 42, 0, 37, 51, 350,
- /* 2350 */ 444, 42, 0, 447, 37, 51, 450, 451, 452, 453,
- /* 2360 */ 454, 455, 363, 457, 42, 350, 0, 37, 42, 51,
- /* 2370 */ 0, 391, 37, 37, 0, 22, 33, 22, 363, 21,
- /* 2380 */ 508, 22, 22, 403, 21, 405, 508, 20, 508, 508,
- /* 2390 */ 391, 508, 508, 508, 508, 508, 508, 508, 508, 508,
- /* 2400 */ 508, 508, 403, 508, 405, 508, 391, 508, 508, 508,
- /* 2410 */ 508, 508, 508, 508, 508, 508, 508, 508, 403, 508,
- /* 2420 */ 405, 508, 508, 350, 444, 508, 508, 447, 508, 508,
- /* 2430 */ 450, 451, 452, 453, 454, 455, 363, 457, 508, 508,
- /* 2440 */ 508, 508, 508, 444, 508, 508, 447, 350, 508, 450,
- /* 2450 */ 451, 452, 453, 454, 455, 508, 457, 508, 508, 444,
- /* 2460 */ 363, 508, 447, 508, 391, 450, 451, 452, 453, 454,
- /* 2470 */ 455, 508, 457, 508, 508, 508, 403, 508, 405, 508,
- /* 2480 */ 508, 508, 508, 508, 508, 508, 508, 508, 391, 508,
- /* 2490 */ 350, 508, 508, 508, 508, 508, 508, 508, 508, 508,
- /* 2500 */ 403, 508, 405, 363, 508, 508, 508, 508, 508, 508,
- /* 2510 */ 508, 508, 508, 508, 508, 508, 350, 444, 508, 508,
- /* 2520 */ 447, 508, 508, 450, 451, 452, 453, 454, 455, 363,
- /* 2530 */ 457, 391, 508, 508, 508, 508, 508, 508, 508, 508,
- /* 2540 */ 508, 444, 508, 403, 447, 405, 508, 450, 451, 452,
- /* 2550 */ 453, 454, 455, 508, 457, 508, 508, 391, 508, 350,
- /* 2560 */ 508, 508, 508, 508, 508, 508, 508, 508, 508, 403,
- /* 2570 */ 508, 405, 363, 508, 508, 508, 508, 508, 508, 508,
- /* 2580 */ 508, 508, 508, 350, 444, 508, 508, 447, 508, 508,
- /* 2590 */ 450, 451, 452, 453, 454, 455, 363, 457, 508, 508,
- /* 2600 */ 391, 508, 508, 508, 508, 508, 508, 508, 508, 508,
- /* 2610 */ 444, 508, 403, 447, 405, 508, 450, 451, 452, 453,
- /* 2620 */ 454, 455, 508, 457, 391, 508, 350, 508, 508, 508,
- /* 2630 */ 508, 508, 508, 508, 508, 508, 403, 508, 405, 363,
- /* 2640 */ 508, 350, 508, 508, 508, 508, 508, 508, 508, 508,
- /* 2650 */ 508, 508, 508, 444, 363, 508, 447, 350, 508, 450,
- /* 2660 */ 451, 452, 453, 454, 455, 508, 457, 391, 508, 508,
- /* 2670 */ 363, 508, 508, 508, 508, 508, 508, 444, 508, 403,
- /* 2680 */ 447, 405, 391, 450, 451, 452, 453, 454, 455, 508,
- /* 2690 */ 457, 508, 508, 508, 403, 508, 405, 508, 391, 508,
- /* 2700 */ 508, 508, 508, 508, 508, 508, 508, 508, 508, 508,
- /* 2710 */ 403, 508, 405, 508, 508, 508, 508, 508, 508, 508,
- /* 2720 */ 444, 508, 508, 447, 508, 508, 450, 451, 452, 453,
- /* 2730 */ 454, 455, 508, 457, 350, 444, 508, 508, 447, 508,
- /* 2740 */ 508, 450, 451, 452, 453, 454, 455, 363, 457, 508,
- /* 2750 */ 508, 444, 508, 350, 447, 508, 508, 450, 451, 452,
- /* 2760 */ 453, 454, 455, 508, 457, 508, 363, 508, 508, 350,
- /* 2770 */ 508, 508, 508, 508, 508, 391, 508, 508, 508, 508,
- /* 2780 */ 508, 508, 363, 508, 508, 508, 508, 403, 508, 405,
- /* 2790 */ 508, 508, 508, 508, 391, 508, 508, 508, 508, 508,
- /* 2800 */ 508, 508, 508, 508, 508, 508, 403, 508, 405, 508,
- /* 2810 */ 391, 508, 508, 508, 508, 508, 508, 508, 508, 508,
- /* 2820 */ 508, 508, 403, 508, 405, 508, 508, 350, 444, 508,
- /* 2830 */ 508, 447, 508, 508, 450, 451, 452, 453, 454, 455,
- /* 2840 */ 363, 457, 508, 508, 508, 508, 508, 444, 508, 508,
- /* 2850 */ 447, 350, 508, 450, 451, 452, 453, 454, 455, 508,
- /* 2860 */ 457, 508, 508, 444, 363, 508, 447, 508, 391, 450,
- /* 2870 */ 451, 452, 453, 454, 455, 508, 457, 508, 508, 508,
- /* 2880 */ 403, 508, 405, 508, 508, 508, 508, 508, 508, 508,
- /* 2890 */ 508, 508, 391, 508, 350, 508, 508, 508, 508, 508,
- /* 2900 */ 508, 508, 508, 508, 403, 508, 405, 363, 508, 508,
- /* 2910 */ 508, 508, 508, 508, 508, 508, 508, 508, 508, 508,
- /* 2920 */ 350, 444, 508, 508, 447, 508, 508, 450, 451, 452,
- /* 2930 */ 453, 454, 455, 363, 457, 391, 508, 508, 508, 508,
- /* 2940 */ 508, 508, 508, 508, 508, 444, 508, 403, 447, 405,
- /* 2950 */ 508, 450, 451, 452, 453, 454, 455, 508, 457, 508,
- /* 2960 */ 508, 391, 508, 350, 508, 508, 508, 508, 508, 508,
- /* 2970 */ 508, 508, 508, 403, 508, 405, 363, 508, 508, 508,
- /* 2980 */ 508, 508, 508, 508, 508, 508, 508, 508, 444, 508,
- /* 2990 */ 508, 447, 508, 508, 450, 451, 452, 453, 454, 455,
- /* 3000 */ 508, 457, 508, 508, 391, 508, 508, 508, 508, 508,
- /* 3010 */ 508, 508, 508, 508, 444, 508, 403, 447, 405, 508,
- /* 3020 */ 450, 451, 452, 453, 454, 455, 508, 457, 508, 508,
- /* 3030 */ 508, 508, 508, 508, 508, 508, 508, 508, 508, 508,
- /* 3040 */ 508, 508, 508, 508, 508, 508, 508, 508, 508, 508,
- /* 3050 */ 508, 508, 508, 508, 508, 508, 508, 444, 508, 508,
- /* 3060 */ 447, 508, 508, 450, 451, 452, 453, 454, 455, 508,
- /* 3070 */ 457, 347, 347, 347, 347, 347, 347, 347, 347, 347,
- /* 3080 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347,
- /* 3090 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347,
- /* 3100 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347,
- /* 3110 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347,
- /* 3120 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347,
- /* 3130 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347,
- /* 3140 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347,
- /* 3150 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347,
- /* 3160 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347,
- /* 3170 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347,
- /* 3180 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347,
- /* 3190 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347,
- /* 3200 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347,
- /* 3210 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347,
- /* 3220 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347,
- /* 3230 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347,
- /* 3240 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347,
- /* 3250 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347,
- /* 3260 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347,
- /* 3270 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347,
- /* 3280 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347,
- /* 3290 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347,
- /* 3300 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347,
- /* 3310 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347,
- /* 3320 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347,
- /* 3330 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347,
- /* 3340 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347,
- /* 3350 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347,
- /* 3360 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347,
- /* 3370 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347,
- /* 3380 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347,
- /* 3390 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347,
- /* 3400 */ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347,
- /* 3410 */ 347, 347, 347, 347, 347, 347, 347, 347,
+ /* 250 */ 250, 251, 252, 253, 254, 255, 12, 13, 20, 3,
+ /* 260 */ 20, 18, 479, 20, 20, 482, 22, 365, 366, 175,
+ /* 270 */ 27, 361, 353, 30, 71, 365, 20, 367, 35, 35,
+ /* 280 */ 414, 37, 366, 500, 501, 366, 138, 385, 505, 506,
+ /* 290 */ 142, 278, 279, 280, 51, 69, 53, 201, 20, 203,
+ /* 300 */ 206, 58, 59, 475, 476, 477, 272, 479, 480, 65,
+ /* 310 */ 394, 365, 69, 394, 20, 71, 104, 107, 115, 475,
+ /* 320 */ 476, 477, 78, 479, 480, 406, 4, 408, 33, 233,
+ /* 330 */ 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
+ /* 340 */ 45, 129, 130, 131, 132, 133, 134, 135, 104, 106,
+ /* 350 */ 20, 107, 136, 137, 138, 139, 140, 141, 142, 211,
+ /* 360 */ 117, 0, 214, 452, 108, 217, 447, 219, 272, 450,
+ /* 370 */ 0, 455, 453, 454, 455, 456, 457, 458, 459, 460,
+ /* 380 */ 461, 462, 179, 143, 144, 439, 440, 143, 144, 478,
+ /* 390 */ 147, 148, 353, 150, 151, 152, 153, 154, 155, 156,
+ /* 400 */ 157, 158, 272, 365, 366, 162, 163, 164, 165, 166,
+ /* 410 */ 167, 168, 42, 170, 171, 172, 13, 365, 366, 176,
+ /* 420 */ 177, 178, 375, 197, 180, 181, 183, 187, 188, 107,
+ /* 430 */ 383, 187, 188, 14, 73, 74, 75, 385, 182, 20,
+ /* 440 */ 20, 80, 81, 82, 392, 406, 202, 86, 204, 394,
+ /* 450 */ 224, 225, 91, 92, 93, 94, 365, 366, 97, 20,
+ /* 460 */ 182, 100, 259, 260, 261, 262, 263, 264, 265, 266,
+ /* 470 */ 267, 268, 269, 418, 180, 181, 39, 40, 234, 235,
+ /* 480 */ 236, 78, 238, 239, 240, 241, 242, 243, 244, 245,
+ /* 490 */ 246, 247, 248, 249, 250, 251, 252, 253, 254, 255,
+ /* 500 */ 256, 12, 13, 353, 71, 414, 407, 408, 382, 20,
+ /* 510 */ 180, 22, 474, 475, 476, 477, 366, 479, 480, 361,
+ /* 520 */ 33, 20, 396, 365, 35, 367, 37, 107, 256, 2,
+ /* 530 */ 258, 382, 406, 374, 353, 8, 9, 365, 366, 12,
+ /* 540 */ 13, 14, 15, 16, 394, 396, 107, 366, 111, 112,
+ /* 550 */ 391, 114, 365, 366, 65, 406, 406, 385, 408, 400,
+ /* 560 */ 71, 73, 74, 75, 365, 366, 236, 78, 80, 81,
+ /* 570 */ 82, 20, 385, 136, 86, 394, 450, 140, 3, 91,
+ /* 580 */ 92, 93, 94, 394, 385, 97, 460, 406, 100, 408,
+ /* 590 */ 401, 370, 371, 104, 272, 108, 107, 447, 409, 450,
+ /* 600 */ 450, 353, 70, 453, 454, 455, 456, 457, 458, 460,
+ /* 610 */ 460, 56, 57, 463, 366, 465, 466, 467, 42, 8,
+ /* 620 */ 9, 471, 472, 12, 13, 14, 15, 16, 447, 117,
+ /* 630 */ 350, 450, 143, 144, 453, 454, 455, 456, 457, 458,
+ /* 640 */ 390, 460, 394, 14, 143, 144, 465, 365, 467, 20,
+ /* 650 */ 365, 366, 471, 472, 406, 21, 408, 0, 24, 25,
+ /* 660 */ 26, 27, 28, 29, 30, 31, 32, 234, 404, 180,
+ /* 670 */ 181, 407, 408, 14, 452, 494, 187, 188, 21, 20,
+ /* 680 */ 256, 24, 25, 26, 27, 28, 29, 30, 31, 32,
+ /* 690 */ 50, 202, 272, 204, 444, 447, 365, 366, 450, 414,
+ /* 700 */ 478, 453, 454, 455, 456, 457, 458, 353, 460, 429,
+ /* 710 */ 386, 272, 117, 465, 434, 467, 385, 33, 394, 471,
+ /* 720 */ 472, 439, 440, 234, 235, 236, 402, 238, 239, 240,
+ /* 730 */ 241, 242, 243, 244, 245, 246, 247, 248, 249, 250,
+ /* 740 */ 251, 252, 253, 254, 255, 12, 13, 14, 353, 386,
+ /* 750 */ 12, 13, 4, 20, 22, 22, 22, 394, 386, 479,
+ /* 760 */ 406, 366, 482, 368, 401, 402, 394, 19, 35, 37,
+ /* 770 */ 37, 37, 409, 0, 402, 37, 365, 366, 353, 372,
+ /* 780 */ 500, 501, 374, 35, 179, 505, 506, 236, 20, 394,
+ /* 790 */ 22, 366, 108, 368, 65, 394, 385, 20, 65, 51,
+ /* 800 */ 37, 406, 401, 408, 397, 194, 58, 59, 400, 180,
+ /* 810 */ 409, 78, 78, 65, 12, 13, 14, 15, 16, 394,
+ /* 820 */ 8, 9, 182, 55, 12, 13, 14, 15, 16, 87,
+ /* 830 */ 190, 406, 20, 408, 20, 106, 104, 104, 109, 180,
+ /* 840 */ 107, 78, 447, 365, 366, 450, 353, 271, 453, 454,
+ /* 850 */ 455, 456, 457, 458, 106, 460, 22, 109, 78, 366,
+ /* 860 */ 465, 368, 467, 385, 259, 236, 471, 472, 293, 365,
+ /* 870 */ 366, 37, 447, 234, 269, 450, 143, 144, 453, 454,
+ /* 880 */ 455, 456, 457, 458, 137, 460, 353, 394, 0, 385,
+ /* 890 */ 465, 149, 467, 394, 51, 236, 471, 472, 4, 406,
+ /* 900 */ 401, 408, 387, 60, 175, 390, 63, 64, 409, 298,
+ /* 910 */ 365, 366, 78, 180, 181, 173, 174, 353, 34, 22,
+ /* 920 */ 187, 188, 283, 284, 285, 286, 287, 288, 289, 394,
+ /* 930 */ 385, 23, 159, 160, 37, 202, 401, 204, 104, 406,
+ /* 940 */ 447, 136, 204, 450, 409, 140, 453, 454, 455, 456,
+ /* 950 */ 457, 458, 353, 460, 353, 47, 48, 353, 465, 182,
+ /* 960 */ 467, 395, 215, 216, 471, 472, 395, 234, 235, 236,
+ /* 970 */ 406, 238, 239, 240, 241, 242, 243, 244, 245, 246,
+ /* 980 */ 247, 248, 249, 250, 251, 252, 253, 254, 255, 12,
+ /* 990 */ 13, 353, 370, 371, 182, 0, 182, 20, 464, 22,
+ /* 1000 */ 466, 104, 379, 380, 366, 406, 368, 406, 381, 395,
+ /* 1010 */ 406, 384, 35, 236, 37, 8, 9, 365, 366, 12,
+ /* 1020 */ 13, 14, 15, 16, 136, 137, 138, 139, 140, 141,
+ /* 1030 */ 142, 394, 394, 14, 15, 16, 202, 385, 204, 402,
+ /* 1040 */ 33, 452, 65, 395, 406, 20, 408, 353, 236, 20,
+ /* 1050 */ 236, 137, 138, 8, 9, 78, 142, 12, 13, 14,
+ /* 1060 */ 15, 16, 365, 366, 4, 353, 0, 478, 234, 235,
+ /* 1070 */ 8, 9, 353, 353, 12, 13, 14, 15, 16, 365,
+ /* 1080 */ 366, 104, 385, 23, 107, 447, 366, 463, 450, 353,
+ /* 1090 */ 466, 453, 454, 455, 456, 457, 458, 394, 460, 385,
+ /* 1100 */ 406, 33, 366, 465, 368, 467, 46, 47, 48, 471,
+ /* 1110 */ 472, 464, 409, 466, 394, 108, 379, 380, 406, 399,
+ /* 1120 */ 143, 144, 0, 365, 366, 406, 406, 435, 408, 353,
+ /* 1130 */ 394, 136, 137, 138, 139, 140, 141, 142, 395, 394,
+ /* 1140 */ 365, 366, 406, 385, 408, 117, 365, 366, 394, 365,
+ /* 1150 */ 366, 365, 366, 108, 409, 33, 353, 180, 181, 403,
+ /* 1160 */ 385, 353, 406, 409, 187, 188, 385, 447, 274, 385,
+ /* 1170 */ 450, 385, 383, 453, 454, 455, 456, 457, 458, 202,
+ /* 1180 */ 460, 204, 406, 447, 353, 353, 450, 270, 271, 453,
+ /* 1190 */ 454, 455, 456, 457, 458, 354, 460, 169, 429, 353,
+ /* 1200 */ 429, 465, 403, 467, 353, 406, 353, 471, 472, 406,
+ /* 1210 */ 65, 234, 235, 236, 406, 238, 239, 240, 241, 242,
+ /* 1220 */ 243, 244, 245, 246, 247, 248, 249, 250, 251, 252,
+ /* 1230 */ 253, 254, 255, 12, 13, 33, 403, 406, 406, 406,
+ /* 1240 */ 0, 20, 13, 22, 182, 356, 357, 45, 479, 0,
+ /* 1250 */ 479, 482, 406, 482, 109, 353, 35, 406, 37, 406,
+ /* 1260 */ 13, 236, 22, 35, 110, 236, 37, 113, 366, 500,
+ /* 1270 */ 501, 500, 501, 0, 505, 506, 505, 506, 110, 51,
+ /* 1280 */ 110, 113, 110, 113, 37, 113, 65, 0, 60, 61,
+ /* 1290 */ 62, 63, 0, 65, 228, 22, 394, 8, 9, 78,
+ /* 1300 */ 51, 12, 13, 14, 15, 16, 419, 33, 406, 22,
+ /* 1310 */ 408, 218, 33, 220, 22, 33, 33, 49, 18, 33,
+ /* 1320 */ 143, 144, 37, 23, 33, 104, 1, 2, 107, 33,
+ /* 1330 */ 33, 33, 353, 509, 106, 498, 37, 109, 37, 429,
+ /* 1340 */ 40, 41, 33, 33, 44, 366, 33, 368, 13, 447,
+ /* 1350 */ 13, 369, 450, 33, 54, 453, 454, 455, 456, 457,
+ /* 1360 */ 458, 107, 460, 295, 143, 144, 66, 67, 68, 69,
+ /* 1370 */ 116, 491, 37, 394, 37, 107, 382, 429, 394, 78,
+ /* 1380 */ 382, 419, 108, 33, 364, 406, 419, 408, 497, 479,
+ /* 1390 */ 108, 108, 482, 497, 108, 497, 428, 495, 496, 108,
+ /* 1400 */ 497, 180, 181, 175, 108, 108, 108, 107, 187, 188,
+ /* 1410 */ 500, 501, 184, 185, 366, 505, 506, 108, 108, 191,
+ /* 1420 */ 192, 108, 369, 202, 419, 204, 447, 479, 108, 450,
+ /* 1430 */ 482, 0, 453, 454, 455, 456, 457, 458, 210, 460,
+ /* 1440 */ 33, 33, 405, 33, 465, 145, 467, 33, 500, 501,
+ /* 1450 */ 471, 472, 33, 505, 506, 234, 235, 236, 108, 238,
+ /* 1460 */ 239, 240, 241, 242, 243, 244, 245, 246, 247, 248,
+ /* 1470 */ 249, 250, 251, 252, 253, 254, 255, 436, 419, 473,
+ /* 1480 */ 419, 12, 13, 52, 353, 481, 484, 502, 384, 204,
+ /* 1490 */ 275, 22, 51, 430, 194, 195, 196, 366, 449, 199,
+ /* 1500 */ 42, 20, 448, 204, 35, 441, 37, 217, 374, 374,
+ /* 1510 */ 441, 353, 212, 213, 200, 108, 108, 446, 108, 432,
+ /* 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,
+ /* 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,
+ /* 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,
+ /* 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,
+ /* 1900 */ 0, 0, 0, 0, 0, 210, 366, 0, 0, 0,
+ /* 1910 */ 0, 406, 0, 408, 49, 0, 507, 508, 0, 394,
+ /* 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,
+ /* 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,
+ /* 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,
+ /* 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,
+ /* 2460 */ 511, 394, 511, 511, 511, 511, 511, 511, 511, 511,
+ /* 2470 */ 511, 511, 511, 406, 511, 408, 511, 511, 511, 511,
+ /* 2480 */ 511, 394, 511, 511, 511, 511, 511, 511, 511, 511,
+ /* 2490 */ 511, 511, 511, 406, 511, 408, 511, 511, 353, 511,
+ /* 2500 */ 511, 511, 511, 511, 511, 511, 511, 511, 511, 511,
+ /* 2510 */ 511, 366, 511, 353, 447, 511, 511, 450, 511, 511,
+ /* 2520 */ 453, 454, 455, 456, 457, 458, 366, 460, 511, 511,
+ /* 2530 */ 511, 511, 511, 511, 447, 353, 511, 450, 511, 394,
+ /* 2540 */ 453, 454, 455, 456, 457, 458, 511, 460, 366, 511,
+ /* 2550 */ 511, 406, 511, 408, 394, 511, 511, 511, 511, 511,
+ /* 2560 */ 511, 511, 511, 511, 511, 511, 406, 511, 408, 511,
+ /* 2570 */ 511, 511, 511, 511, 511, 511, 394, 511, 511, 511,
+ /* 2580 */ 511, 511, 511, 511, 511, 511, 511, 511, 406, 511,
+ /* 2590 */ 408, 511, 447, 353, 511, 450, 511, 511, 453, 454,
+ /* 2600 */ 455, 456, 457, 458, 511, 460, 366, 447, 353, 511,
+ /* 2610 */ 450, 511, 511, 453, 454, 455, 456, 457, 458, 511,
+ /* 2620 */ 460, 366, 511, 511, 511, 511, 511, 511, 353, 447,
+ /* 2630 */ 511, 511, 450, 511, 394, 453, 454, 455, 456, 457,
+ /* 2640 */ 458, 366, 460, 511, 511, 511, 406, 511, 408, 394,
+ /* 2650 */ 511, 511, 511, 511, 511, 511, 511, 511, 511, 511,
+ /* 2660 */ 511, 406, 511, 408, 511, 511, 511, 511, 511, 394,
+ /* 2670 */ 511, 511, 511, 511, 511, 511, 511, 511, 511, 511,
+ /* 2680 */ 511, 406, 511, 408, 511, 511, 511, 447, 511, 511,
+ /* 2690 */ 450, 511, 511, 453, 454, 455, 456, 457, 458, 511,
+ /* 2700 */ 460, 353, 447, 511, 511, 450, 511, 511, 453, 454,
+ /* 2710 */ 455, 456, 457, 458, 366, 460, 511, 511, 511, 511,
+ /* 2720 */ 511, 353, 447, 511, 511, 450, 511, 511, 453, 454,
+ /* 2730 */ 455, 456, 457, 458, 366, 460, 511, 511, 353, 511,
+ /* 2740 */ 511, 511, 394, 511, 511, 511, 511, 511, 511, 511,
+ /* 2750 */ 511, 366, 511, 511, 406, 511, 408, 511, 511, 511,
+ /* 2760 */ 511, 511, 394, 511, 511, 511, 511, 511, 511, 511,
+ /* 2770 */ 511, 511, 511, 511, 406, 511, 408, 511, 511, 394,
+ /* 2780 */ 511, 511, 511, 511, 511, 511, 511, 511, 511, 511,
+ /* 2790 */ 511, 406, 511, 408, 511, 447, 511, 511, 450, 511,
+ /* 2800 */ 511, 453, 454, 455, 456, 457, 458, 353, 460, 511,
+ /* 2810 */ 511, 511, 511, 511, 511, 447, 511, 511, 450, 511,
+ /* 2820 */ 366, 453, 454, 455, 456, 457, 458, 511, 460, 511,
+ /* 2830 */ 511, 511, 447, 511, 511, 450, 511, 511, 453, 454,
+ /* 2840 */ 455, 456, 457, 458, 511, 460, 511, 511, 394, 511,
+ /* 2850 */ 511, 511, 511, 511, 511, 511, 511, 511, 511, 511,
+ /* 2860 */ 406, 511, 408, 511, 511, 353, 511, 511, 511, 511,
+ /* 2870 */ 511, 511, 511, 511, 511, 511, 511, 511, 366, 511,
+ /* 2880 */ 353, 511, 511, 511, 511, 511, 511, 511, 511, 511,
+ /* 2890 */ 511, 511, 511, 366, 511, 511, 511, 511, 511, 511,
+ /* 2900 */ 511, 447, 353, 511, 450, 511, 394, 453, 454, 455,
+ /* 2910 */ 456, 457, 458, 511, 460, 366, 511, 511, 406, 511,
+ /* 2920 */ 408, 394, 511, 511, 511, 511, 511, 511, 511, 511,
+ /* 2930 */ 511, 511, 511, 406, 511, 408, 511, 511, 511, 511,
+ /* 2940 */ 511, 511, 511, 394, 511, 511, 511, 511, 511, 511,
+ /* 2950 */ 511, 511, 511, 511, 511, 406, 511, 408, 511, 447,
+ /* 2960 */ 353, 511, 450, 511, 511, 453, 454, 455, 456, 457,
+ /* 2970 */ 458, 511, 460, 366, 447, 353, 511, 450, 511, 511,
+ /* 2980 */ 453, 454, 455, 456, 457, 458, 511, 460, 366, 511,
+ /* 2990 */ 511, 511, 511, 511, 511, 511, 447, 511, 511, 450,
+ /* 3000 */ 511, 394, 453, 454, 455, 456, 457, 458, 511, 460,
+ /* 3010 */ 511, 511, 511, 406, 511, 408, 394, 511, 511, 511,
+ /* 3020 */ 511, 511, 511, 511, 511, 511, 511, 511, 406, 511,
+ /* 3030 */ 408, 511, 511, 511, 511, 511, 511, 511, 511, 511,
+ /* 3040 */ 511, 511, 511, 511, 511, 511, 511, 511, 511, 511,
+ /* 3050 */ 511, 511, 511, 511, 447, 511, 511, 450, 511, 511,
+ /* 3060 */ 453, 454, 455, 456, 457, 458, 511, 460, 511, 447,
+ /* 3070 */ 511, 511, 450, 511, 511, 453, 454, 455, 456, 457,
+ /* 3080 */ 458, 511, 460, 350, 350, 350, 350, 350, 350, 350,
+ /* 3090 */ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350,
+ /* 3100 */ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350,
+ /* 3110 */ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350,
+ /* 3120 */ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350,
+ /* 3130 */ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350,
+ /* 3140 */ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350,
+ /* 3150 */ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350,
+ /* 3160 */ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350,
+ /* 3170 */ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350,
+ /* 3180 */ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350,
+ /* 3190 */ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350,
+ /* 3200 */ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350,
+ /* 3210 */ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350,
+ /* 3220 */ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350,
+ /* 3230 */ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350,
+ /* 3240 */ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350,
+ /* 3250 */ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350,
+ /* 3260 */ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350,
+ /* 3270 */ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350,
+ /* 3280 */ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350,
+ /* 3290 */ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350,
+ /* 3300 */ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350,
+ /* 3310 */ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350,
+ /* 3320 */ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350,
+ /* 3330 */ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350,
+ /* 3340 */ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350,
+ /* 3350 */ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350,
+ /* 3360 */ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350,
+ /* 3370 */ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350,
+ /* 3380 */ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350,
+ /* 3390 */ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350,
+ /* 3400 */ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350,
+ /* 3410 */ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350,
+ /* 3420 */ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350,
+ /* 3430 */ 350, 350, 350,
};
-#define YY_SHIFT_COUNT (839)
+#define YY_SHIFT_COUNT (845)
#define YY_SHIFT_MIN (0)
-#define YY_SHIFT_MAX (2374)
+#define YY_SHIFT_MAX (2412)
static const unsigned short int yy_shift_ofst[] = {
- /* 0 */ 1442, 0, 241, 0, 483, 483, 483, 483, 483, 483,
- /* 10 */ 483, 483, 483, 483, 483, 483, 724, 965, 965, 1206,
- /* 20 */ 965, 965, 965, 965, 965, 965, 965, 965, 965, 965,
- /* 30 */ 965, 965, 965, 965, 965, 965, 965, 965, 965, 965,
- /* 40 */ 965, 965, 965, 965, 965, 965, 965, 965, 965, 965,
- /* 50 */ 965, 167, 402, 1084, 251, 405, 587, 405, 405, 251,
- /* 60 */ 251, 405, 1325, 405, 240, 1325, 1325, 513, 405, 5,
- /* 70 */ 170, 171, 171, 160, 160, 170, 78, 39, 295, 295,
- /* 80 */ 326, 171, 171, 171, 171, 171, 171, 171, 171, 171,
- /* 90 */ 171, 171, 261, 355, 171, 171, 91, 5, 171, 261,
- /* 100 */ 171, 5, 171, 171, 5, 171, 171, 5, 171, 5,
- /* 110 */ 5, 5, 171, 400, 202, 202, 465, 198, 118, 118,
- /* 120 */ 118, 118, 118, 118, 118, 118, 118, 118, 118, 118,
- /* 130 */ 118, 118, 118, 118, 118, 118, 118, 1114, 200, 78,
- /* 140 */ 39, 515, 515, 949, 415, 415, 415, 364, 536, 536,
- /* 150 */ 1041, 949, 91, 307, 5, 5, 262, 5, 376, 5,
- /* 160 */ 376, 376, 506, 618, 577, 577, 577, 577, 577, 577,
- /* 170 */ 577, 577, 988, 677, 65, 1132, 66, 523, 242, 76,
- /* 180 */ 600, 659, 571, 571, 1059, 1087, 1102, 246, 246, 246,
- /* 190 */ 327, 246, 480, 575, 1075, 808, 204, 545, 1075, 1075,
- /* 200 */ 1077, 1030, 738, 861, 1030, 530, 1034, 1041, 1216, 1439,
- /* 210 */ 1450, 1474, 1281, 91, 1474, 91, 1301, 1484, 1491, 1469,
- /* 220 */ 1491, 1469, 1343, 1484, 1491, 1484, 1469, 1343, 1343, 1424,
- /* 230 */ 1428, 1484, 1432, 1484, 1484, 1484, 1518, 1489, 1518, 1489,
- /* 240 */ 1474, 91, 91, 1529, 91, 1532, 1538, 91, 1532, 91,
- /* 250 */ 1543, 91, 91, 1484, 91, 1518, 5, 5, 5, 5,
- /* 260 */ 5, 5, 5, 5, 5, 5, 5, 1484, 618, 618,
- /* 270 */ 1518, 376, 376, 376, 1369, 1482, 1474, 400, 1591, 1408,
- /* 280 */ 1411, 1529, 400, 1216, 1484, 376, 1344, 1347, 1344, 1347,
- /* 290 */ 1341, 1440, 1344, 1356, 1362, 1374, 1216, 1340, 1364, 1372,
- /* 300 */ 1385, 1491, 1636, 1542, 1394, 1532, 400, 400, 1347, 376,
- /* 310 */ 376, 376, 376, 1347, 376, 1505, 400, 506, 400, 1491,
- /* 320 */ 1588, 1590, 376, 1484, 400, 1678, 1666, 1518, 3071, 3071,
- /* 330 */ 3071, 3071, 3071, 3071, 3071, 3071, 3071, 36, 462, 306,
- /* 340 */ 565, 1069, 435, 805, 551, 15, 30, 650, 779, 40,
- /* 350 */ 40, 40, 40, 40, 40, 40, 40, 40, 759, 151,
- /* 360 */ 416, 1217, 1217, 730, 461, 457, 468, 678, 479, 961,
- /* 370 */ 863, 334, 334, 727, 1184, 774, 727, 727, 727, 1262,
- /* 380 */ 1103, 503, 1020, 1273, 1155, 1331, 1187, 1230, 1234, 1242,
- /* 390 */ 1307, 1332, 388, 936, 1352, 1085, 1127, 1323, 981, 1326,
- /* 400 */ 1333, 1354, 1225, 1090, 637, 1355, 1359, 1360, 1361, 1363,
- /* 410 */ 1365, 1375, 1366, 1203, 1274, 873, 1367, 1368, 1370, 1371,
- /* 420 */ 1373, 1377, 1072, 991, 1278, 1342, 1348, 1320, 1380, 1710,
- /* 430 */ 1717, 1718, 1674, 1722, 1688, 1508, 1699, 1700, 1702, 1517,
- /* 440 */ 1742, 1706, 1709, 1524, 1712, 1750, 1528, 1751, 1716, 1755,
- /* 450 */ 1719, 1758, 1737, 1766, 1732, 1551, 1771, 1565, 1773, 1569,
- /* 460 */ 1572, 1576, 1583, 1783, 1784, 1785, 1593, 1592, 1790, 1791,
- /* 470 */ 1645, 1744, 1745, 1795, 1759, 1797, 1798, 1762, 1749, 1802,
- /* 480 */ 1754, 1804, 1760, 1806, 1807, 1808, 1761, 1811, 1812, 1813,
- /* 490 */ 1815, 1816, 1817, 1657, 1782, 1820, 1661, 1824, 1825, 1826,
- /* 500 */ 1827, 1832, 1833, 1840, 1843, 1844, 1845, 1846, 1847, 1855,
- /* 510 */ 1857, 1858, 1859, 1860, 1780, 1830, 1805, 1851, 1861, 1863,
- /* 520 */ 1864, 1866, 1867, 1874, 1854, 1878, 1733, 1879, 1703, 1881,
- /* 530 */ 1738, 1884, 1885, 1869, 1838, 1870, 1839, 1893, 1835, 1873,
- /* 540 */ 1894, 1836, 1896, 1848, 1897, 1909, 1876, 1865, 1875, 1911,
- /* 550 */ 1877, 1868, 1880, 1915, 1886, 1882, 1883, 1921, 1889, 1924,
- /* 560 */ 1890, 1892, 1895, 1888, 1891, 1913, 1898, 1929, 1899, 1901,
- /* 570 */ 1931, 1936, 1938, 1939, 1902, 1756, 1941, 1888, 1900, 1945,
- /* 580 */ 1950, 1904, 1951, 1952, 1916, 1903, 1917, 1957, 1926, 1907,
- /* 590 */ 1919, 1964, 1928, 1918, 1925, 1966, 1933, 1922, 1930, 1968,
- /* 600 */ 1976, 1983, 1986, 1987, 1988, 1908, 1905, 1953, 1967, 1992,
- /* 610 */ 1956, 1958, 1960, 1962, 1963, 1969, 1979, 1981, 1961, 1970,
- /* 620 */ 1984, 1990, 1991, 1993, 2005, 1998, 2023, 2002, 1972, 2028,
- /* 630 */ 2007, 1996, 2034, 2035, 2036, 2000, 2039, 2004, 2042, 2022,
- /* 640 */ 2025, 2009, 2010, 2012, 1944, 1946, 2053, 1912, 1948, 1850,
- /* 650 */ 1888, 2013, 2058, 1914, 2024, 2037, 2063, 1862, 2043, 1932,
- /* 660 */ 1935, 2066, 2067, 1949, 1943, 1954, 1955, 2065, 2038, 1796,
- /* 670 */ 1971, 1973, 1975, 2019, 1974, 2026, 2006, 1994, 2040, 2050,
- /* 680 */ 2003, 1989, 2029, 2030, 2008, 2061, 2049, 2051, 2032, 2079,
- /* 690 */ 1801, 2011, 2027, 2127, 2098, 1871, 2095, 2103, 2105, 2106,
- /* 700 */ 2107, 2109, 2041, 2044, 2100, 1910, 2114, 2101, 2152, 2153,
- /* 710 */ 2048, 2115, 2052, 2054, 2055, 2057, 2060, 1985, 2064, 2156,
- /* 720 */ 2117, 1995, 2068, 2056, 1888, 2123, 2131, 2069, 1940, 2071,
- /* 730 */ 2178, 2160, 1959, 2077, 2086, 2089, 2090, 2092, 2093, 2147,
- /* 740 */ 2096, 2099, 2154, 2094, 2182, 1997, 2104, 2091, 2102, 2169,
- /* 750 */ 2176, 2118, 2116, 2188, 2120, 2121, 2190, 2124, 2122, 2196,
- /* 760 */ 2130, 2134, 2201, 2136, 2137, 2206, 2141, 2119, 2126, 2128,
- /* 770 */ 2132, 2142, 2216, 2145, 2220, 2155, 2216, 2216, 2236, 2189,
- /* 780 */ 2192, 2227, 2228, 2229, 2230, 2234, 2235, 2237, 2248, 2250,
- /* 790 */ 2193, 2191, 2212, 2194, 2262, 2261, 2268, 2270, 2286, 2273,
- /* 800 */ 2275, 2277, 2238, 1961, 2280, 1970, 2281, 2283, 2284, 2295,
- /* 810 */ 2306, 2296, 2313, 2298, 2285, 2303, 2346, 2310, 2297, 2309,
- /* 820 */ 2352, 2317, 2304, 2322, 2366, 2330, 2318, 2326, 2370, 2335,
- /* 830 */ 2336, 2374, 2353, 2343, 2355, 2358, 2359, 2360, 2363, 2367,
+ /* 0 */ 1300, 0, 244, 0, 489, 489, 489, 489, 489, 489,
+ /* 10 */ 489, 489, 489, 489, 489, 489, 733, 977, 977, 1221,
+ /* 20 */ 977, 977, 977, 977, 977, 977, 977, 977, 977, 977,
+ /* 30 */ 977, 977, 977, 977, 977, 977, 977, 977, 977, 977,
+ /* 40 */ 977, 977, 977, 977, 977, 977, 977, 977, 977, 977,
+ /* 50 */ 977, 420, 439, 96, 210, 34, 130, 34, 34, 210,
+ /* 60 */ 210, 34, 1469, 34, 243, 1469, 1469, 322, 34, 1,
+ /* 70 */ 240, 131, 131, 1060, 1060, 240, 294, 501, 154, 154,
+ /* 80 */ 551, 131, 131, 131, 131, 131, 131, 131, 131, 131,
+ /* 90 */ 131, 131, 165, 238, 131, 131, 31, 1, 131, 165,
+ /* 100 */ 131, 1, 131, 131, 1, 131, 131, 1, 131, 1,
+ /* 110 */ 1, 1, 131, 532, 203, 203, 488, 634, 834, 834,
+ /* 120 */ 834, 834, 834, 834, 834, 834, 834, 834, 834, 834,
+ /* 130 */ 834, 834, 834, 834, 834, 834, 834, 437, 256, 294,
+ /* 140 */ 501, 555, 555, 763, 278, 278, 278, 137, 272, 272,
+ /* 150 */ 403, 763, 31, 512, 1, 1, 424, 1, 780, 1,
+ /* 160 */ 780, 780, 595, 884, 212, 212, 212, 212, 212, 212,
+ /* 170 */ 212, 212, 1695, 361, 657, 812, 611, 639, 118, 13,
+ /* 180 */ 629, 659, 738, 738, 777, 908, 814, 734, 734, 734,
+ /* 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,
};
#define YY_REDUCE_COUNT (336)
-#define YY_REDUCE_MIN (-430)
-#define YY_REDUCE_MAX (2613)
+#define YY_REDUCE_MIN (-463)
+#define YY_REDUCE_MAX (2622)
static const short yy_reduce_ofst[] = {
- /* 0 */ 431, -303, 149, 185, -23, 390, 421, 630, 662, 872,
- /* 10 */ 967, 1150, 1276, 1310, 1384, 1418, 488, -81, 1451, 1527,
- /* 20 */ 1557, 1635, 1652, 1669, 1734, 1764, 1829, 1849, 1872, 1887,
- /* 30 */ 1906, 1980, 1999, 2015, 2073, 2097, 2140, 2166, 2209, 2233,
- /* 40 */ 2276, 2291, 2307, 2384, 2403, 2419, 2477, 2501, 2544, 2570,
- /* 50 */ 2613, -305, -202, 384, -187, 31, 451, 558, 660, 541,
- /* 60 */ 707, 763, 643, -340, -341, -99, 228, -177, 89, -380,
- /* 70 */ -211, 401, 403, -356, -351, -390, -330, -333, -257, 140,
- /* 80 */ -218, 412, 487, 619, 628, -312, -225, 634, 669, 681,
- /* 90 */ 696, -97, 179, -2, 739, 793, -284, 250, 642, 187,
- /* 100 */ 809, 354, 858, 882, -383, 892, 894, 425, 896, 522,
- /* 110 */ 455, 620, 905, -66, -425, -425, -296, -149, 35, 159,
- /* 120 */ 182, 397, 452, 485, 534, 638, 722, 820, 843, 844,
- /* 130 */ 849, 886, 898, 900, 901, 929, 930, -61, -270, -245,
- /* 140 */ -342, 278, 429, 632, -270, 206, 350, 12, 531, 698,
- /* 150 */ 751, 761, 509, 670, 520, 776, -307, 313, 765, 782,
- /* 160 */ 869, 885, 906, 941, -385, 291, 347, 395, 419, 440,
- /* 170 */ 478, 419, -430, 686, 754, 870, 857, 855, 1005, 887,
- /* 180 */ 982, 982, 999, 1007, 979, 1047, 993, 918, 919, 921,
- /* 190 */ 998, 922, 982, 1060, 1009, 1064, 1057, 1031, 1053, 1055,
- /* 200 */ 982, 985, 985, 977, 985, 1011, 1004, 1106, 1062, 1045,
- /* 210 */ 1048, 1061, 1054, 1130, 1065, 1131, 1076, 1144, 1149, 1104,
- /* 220 */ 1152, 1105, 1109, 1158, 1159, 1161, 1113, 1112, 1118, 1154,
- /* 230 */ 1157, 1170, 1162, 1172, 1174, 1175, 1185, 1183, 1188, 1186,
- /* 240 */ 1108, 1173, 1176, 1145, 1180, 1190, 1133, 1189, 1195, 1191,
- /* 250 */ 1146, 1193, 1196, 1204, 1197, 1214, 1192, 1194, 1198, 1199,
- /* 260 */ 1200, 1201, 1202, 1205, 1207, 1208, 1215, 1218, 1224, 1226,
- /* 270 */ 1223, 1178, 1179, 1181, 1153, 1168, 1171, 1241, 1209, 1182,
- /* 280 */ 1210, 1211, 1251, 1213, 1259, 1219, 1137, 1220, 1140, 1221,
- /* 290 */ 1139, 1142, 1156, 1151, 1147, 1164, 1222, 1148, 1160, 1166,
- /* 300 */ 985, 1291, 1227, 1177, 1212, 1311, 1305, 1308, 1257, 1277,
- /* 310 */ 1279, 1280, 1282, 1263, 1283, 1271, 1321, 1302, 1322, 1330,
- /* 320 */ 1228, 1303, 1294, 1337, 1334, 1350, 1349, 1351, 1284, 1268,
- /* 330 */ 1286, 1287, 1327, 1336, 1339, 1346, 1387,
+ /* 0 */ 280, -308, 150, 181, 395, 425, 493, 638, 736, 979,
+ /* 10 */ 248, 1131, 1158, 1227, 1342, 1374, -81, 902, 1409, 1482,
+ /* 20 */ 1505, 720, 1525, 1540, 1636, 1672, 1704, 1781, 1797, 1815,
+ /* 30 */ 1880, 1914, 1937, 1994, 2067, 2087, 2145, 2160, 2182, 2240,
+ /* 40 */ 2255, 2275, 2348, 2368, 2385, 2454, 2512, 2527, 2549, 2607,
+ /* 50 */ 2622, -310, -217, -425, 38, -418, 769, 771, 910, -172,
+ /* 60 */ -156, 948, -381, -438, -257, 126, 149, -463, -300, 363,
+ /* 70 */ -324, -326, 52, -358, -202, -335, -218, 264, -90, 158,
+ /* 80 */ -84, -152, -98, 172, 187, -134, 91, 199, 331, 411,
+ /* 90 */ 478, 285, -54, -316, 504, 545, 159, 189, 652, 282,
+ /* 100 */ 697, 401, 714, 758, -368, 781, 784, 499, 786, 324,
+ /* 110 */ 535, 372, 775, -312, -422, -422, 47, -280, -353, 39,
+ /* 120 */ 354, 533, 564, 599, 601, 604, 694, 712, 719, 776,
+ /* 130 */ 803, 808, 831, 832, 846, 851, 853, -185, -89, 55,
+ /* 140 */ 99, 221, 622, 623, -89, 222, 589, 407, 534, 647,
+ /* 150 */ 627, 737, 408, 250, 703, 745, 624, 637, 756, 754,
+ /* 160 */ 799, 833, 515, 889, -392, -363, 566, 571, 614, 648,
+ /* 170 */ 743, 614, 692, 789, 841, 887, 824, 837, 982, 880,
+ /* 180 */ 984, 984, 994, 998, 962, 1020, 967, 891, 896, 898,
+ /* 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,
};
static const YYACTIONTYPE yy_default[] = {
- /* 0 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884,
- /* 10 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884,
- /* 20 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884,
- /* 30 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884,
- /* 40 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884,
- /* 50 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884,
- /* 60 */ 1884, 2219, 1884, 1884, 2182, 1884, 1884, 1884, 1884, 1884,
- /* 70 */ 1884, 1884, 1884, 1884, 1884, 1884, 2189, 1884, 1884, 1884,
- /* 80 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884,
- /* 90 */ 1884, 1884, 1884, 1884, 1884, 1884, 1981, 1884, 1884, 1884,
- /* 100 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884,
- /* 110 */ 1884, 1884, 1884, 1979, 2422, 1884, 1884, 1884, 1884, 1884,
- /* 120 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884,
- /* 130 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 2434, 1884,
- /* 140 */ 1884, 1955, 1955, 1884, 2434, 2434, 2434, 1979, 2394, 2394,
- /* 150 */ 1884, 1884, 1981, 2257, 1884, 1884, 1884, 1884, 1884, 1884,
- /* 160 */ 1884, 1884, 2104, 1914, 1884, 1884, 1884, 1884, 2128, 1884,
- /* 170 */ 1884, 1884, 2245, 1884, 1884, 2463, 2523, 1884, 1884, 2466,
- /* 180 */ 1884, 1884, 1884, 1884, 2194, 1884, 2453, 1884, 1884, 1884,
- /* 190 */ 1884, 1884, 1884, 1884, 1884, 1884, 2057, 2239, 1884, 1884,
- /* 200 */ 1884, 2426, 2440, 2507, 2427, 2424, 2447, 1884, 2457, 1884,
- /* 210 */ 2282, 1884, 2271, 1981, 1884, 1981, 2232, 2177, 1884, 2187,
- /* 220 */ 1884, 2187, 2184, 1884, 1884, 1884, 2187, 2184, 2184, 2046,
- /* 230 */ 2042, 1884, 2040, 1884, 1884, 1884, 1884, 1939, 1884, 1939,
- /* 240 */ 1884, 1981, 1981, 1884, 1981, 1884, 1884, 1981, 1884, 1981,
- /* 250 */ 1884, 1981, 1981, 1884, 1981, 1884, 1884, 1884, 1884, 1884,
- /* 260 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884,
- /* 270 */ 1884, 1884, 1884, 1884, 2269, 2255, 1884, 1979, 1884, 2243,
- /* 280 */ 2241, 1884, 1979, 2457, 1884, 1884, 2477, 2472, 2477, 2472,
- /* 290 */ 2491, 2487, 2477, 2496, 2493, 2459, 2457, 2526, 2513, 2509,
- /* 300 */ 2440, 1884, 1884, 2445, 2443, 1884, 1979, 1979, 2472, 1884,
- /* 310 */ 1884, 1884, 1884, 2472, 1884, 1884, 1979, 1884, 1979, 1884,
- /* 320 */ 1884, 2073, 1884, 1884, 1979, 1884, 1923, 1884, 2234, 2260,
- /* 330 */ 2215, 2215, 2107, 2107, 2107, 1982, 1889, 1884, 1884, 1884,
- /* 340 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 2490,
- /* 350 */ 2489, 2347, 1884, 2398, 2397, 2396, 2387, 2346, 2069, 1884,
- /* 360 */ 1884, 2345, 2344, 1884, 1884, 1884, 1884, 1884, 1884, 1884,
- /* 370 */ 1884, 2206, 2205, 2338, 1884, 1884, 2339, 2337, 2336, 1884,
- /* 380 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884,
- /* 390 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884,
- /* 400 */ 1884, 1884, 1884, 2510, 2514, 1884, 1884, 1884, 1884, 1884,
- /* 410 */ 1884, 2423, 1884, 1884, 1884, 2318, 1884, 1884, 1884, 1884,
- /* 420 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884,
- /* 430 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884,
- /* 440 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884,
- /* 450 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884,
- /* 460 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884,
- /* 470 */ 2183, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884,
- /* 480 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884,
- /* 490 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884,
- /* 500 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884,
- /* 510 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884,
- /* 520 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884,
- /* 530 */ 2198, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884,
- /* 540 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884,
- /* 550 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884,
- /* 560 */ 1884, 1884, 1928, 2325, 1884, 1884, 1884, 1884, 1884, 1884,
- /* 570 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 2328, 1884, 1884,
- /* 580 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884,
- /* 590 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884,
- /* 600 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884,
- /* 610 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 2021, 2020,
- /* 620 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884,
- /* 630 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884,
- /* 640 */ 1884, 1884, 1884, 1884, 2329, 1884, 1884, 1884, 1884, 1884,
- /* 650 */ 2320, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884,
- /* 660 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 2506, 2460, 1884,
- /* 670 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884,
- /* 680 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 2318, 1884, 2488,
- /* 690 */ 1884, 1884, 2504, 1884, 2508, 1884, 1884, 1884, 1884, 1884,
- /* 700 */ 1884, 1884, 2433, 2429, 1884, 1884, 2425, 1884, 1884, 1884,
- /* 710 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884,
- /* 720 */ 1884, 1884, 1884, 1884, 2317, 1884, 2384, 1884, 1884, 1884,
- /* 730 */ 2418, 1884, 1884, 2369, 1884, 1884, 1884, 1884, 1884, 1884,
- /* 740 */ 1884, 1884, 1884, 2329, 1884, 2332, 1884, 1884, 1884, 1884,
- /* 750 */ 1884, 2101, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884,
- /* 760 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 2085, 2083, 2082,
- /* 770 */ 2081, 1884, 2114, 1884, 1884, 1884, 2110, 2109, 1884, 1884,
- /* 780 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884,
- /* 790 */ 1884, 1884, 1884, 1884, 2000, 1884, 1884, 1884, 1884, 1884,
- /* 800 */ 1884, 1884, 1884, 1992, 1884, 1991, 1884, 1884, 1884, 1884,
- /* 810 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884,
- /* 820 */ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884,
- /* 830 */ 1884, 1884, 1884, 1913, 1884, 1884, 1884, 1884, 1884, 1884,
+ /* 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,
};
/********** End of lemon-generated parsing tables *****************************/
@@ -1513,6 +1170,7 @@ static const YYCODETYPE yyFallback[] = {
0, /* NK_IPTOKEN => nothing */
0, /* FORCE => nothing */
0, /* UNSAFE => nothing */
+ 0, /* CLUSTER => nothing */
0, /* LOCAL => nothing */
0, /* QNODE => nothing */
0, /* BNODE => nothing */
@@ -1559,7 +1217,7 @@ static const YYCODETYPE yyFallback[] = {
0, /* BWLIMIT => nothing */
0, /* START => nothing */
0, /* TIMESTAMP => nothing */
- 297, /* END => ABORT */
+ 300, /* END => ABORT */
0, /* TABLE => nothing */
0, /* NK_LP => nothing */
0, /* NK_RP => nothing */
@@ -1613,11 +1271,13 @@ static const YYCODETYPE yyFallback[] = {
0, /* CONNECTIONS => nothing */
0, /* LICENCES => nothing */
0, /* GRANTS => nothing */
+ 0, /* FULL => nothing */
+ 0, /* LOGS => nothing */
+ 0, /* MACHINES => nothing */
0, /* QUERIES => nothing */
0, /* SCORES => nothing */
0, /* TOPICS => nothing */
0, /* VARIABLES => nothing */
- 0, /* CLUSTER => nothing */
0, /* BNODES => nothing */
0, /* SNODES => nothing */
0, /* TRANSACTIONS => nothing */
@@ -1627,7 +1287,7 @@ static const YYCODETYPE yyFallback[] = {
0, /* VNODES => nothing */
0, /* ALIVE => nothing */
0, /* VIEWS => nothing */
- 297, /* VIEW => ABORT */
+ 300, /* VIEW => ABORT */
0, /* COMPACTS => nothing */
0, /* NORMAL => nothing */
0, /* CHILD => nothing */
@@ -1753,55 +1413,55 @@ static const YYCODETYPE yyFallback[] = {
0, /* ASC => nothing */
0, /* NULLS => nothing */
0, /* ABORT => nothing */
- 297, /* AFTER => ABORT */
- 297, /* ATTACH => ABORT */
- 297, /* BEFORE => ABORT */
- 297, /* BEGIN => ABORT */
- 297, /* BITAND => ABORT */
- 297, /* BITNOT => ABORT */
- 297, /* BITOR => ABORT */
- 297, /* BLOCKS => ABORT */
- 297, /* CHANGE => ABORT */
- 297, /* COMMA => ABORT */
- 297, /* CONCAT => ABORT */
- 297, /* CONFLICT => ABORT */
- 297, /* COPY => ABORT */
- 297, /* DEFERRED => ABORT */
- 297, /* DELIMITERS => ABORT */
- 297, /* DETACH => ABORT */
- 297, /* DIVIDE => ABORT */
- 297, /* DOT => ABORT */
- 297, /* EACH => ABORT */
- 297, /* FAIL => ABORT */
- 297, /* FILE => ABORT */
- 297, /* FOR => ABORT */
- 297, /* GLOB => ABORT */
- 297, /* ID => ABORT */
- 297, /* IMMEDIATE => ABORT */
- 297, /* IMPORT => ABORT */
- 297, /* INITIALLY => ABORT */
- 297, /* INSTEAD => ABORT */
- 297, /* ISNULL => ABORT */
- 297, /* KEY => ABORT */
- 297, /* MODULES => ABORT */
- 297, /* NK_BITNOT => ABORT */
- 297, /* NK_SEMI => ABORT */
- 297, /* NOTNULL => ABORT */
- 297, /* OF => ABORT */
- 297, /* PLUS => ABORT */
- 297, /* PRIVILEGE => ABORT */
- 297, /* RAISE => ABORT */
- 297, /* RESTRICT => ABORT */
- 297, /* ROW => ABORT */
- 297, /* SEMI => ABORT */
- 297, /* STAR => ABORT */
- 297, /* STATEMENT => ABORT */
- 297, /* STRICT => ABORT */
- 297, /* STRING => ABORT */
- 297, /* TIMES => ABORT */
- 297, /* VALUES => ABORT */
- 297, /* VARIABLE => ABORT */
- 297, /* WAL => ABORT */
+ 300, /* AFTER => ABORT */
+ 300, /* ATTACH => ABORT */
+ 300, /* BEFORE => ABORT */
+ 300, /* BEGIN => ABORT */
+ 300, /* BITAND => ABORT */
+ 300, /* BITNOT => ABORT */
+ 300, /* BITOR => ABORT */
+ 300, /* BLOCKS => ABORT */
+ 300, /* CHANGE => ABORT */
+ 300, /* COMMA => ABORT */
+ 300, /* CONCAT => ABORT */
+ 300, /* CONFLICT => ABORT */
+ 300, /* COPY => ABORT */
+ 300, /* DEFERRED => ABORT */
+ 300, /* DELIMITERS => ABORT */
+ 300, /* DETACH => ABORT */
+ 300, /* DIVIDE => ABORT */
+ 300, /* DOT => ABORT */
+ 300, /* EACH => ABORT */
+ 300, /* FAIL => ABORT */
+ 300, /* FILE => ABORT */
+ 300, /* FOR => ABORT */
+ 300, /* GLOB => ABORT */
+ 300, /* ID => ABORT */
+ 300, /* IMMEDIATE => ABORT */
+ 300, /* IMPORT => ABORT */
+ 300, /* INITIALLY => ABORT */
+ 300, /* INSTEAD => ABORT */
+ 300, /* ISNULL => ABORT */
+ 300, /* KEY => ABORT */
+ 300, /* MODULES => ABORT */
+ 300, /* NK_BITNOT => ABORT */
+ 300, /* NK_SEMI => ABORT */
+ 300, /* NOTNULL => ABORT */
+ 300, /* OF => ABORT */
+ 300, /* PLUS => ABORT */
+ 300, /* PRIVILEGE => ABORT */
+ 300, /* RAISE => ABORT */
+ 300, /* RESTRICT => ABORT */
+ 300, /* ROW => ABORT */
+ 300, /* SEMI => ABORT */
+ 300, /* STAR => ABORT */
+ 300, /* STATEMENT => ABORT */
+ 300, /* STRICT => ABORT */
+ 300, /* STRING => ABORT */
+ 300, /* TIMES => ABORT */
+ 300, /* VALUES => ABORT */
+ 300, /* VARIABLE => ABORT */
+ 300, /* WAL => ABORT */
};
#endif /* YYFALLBACK */
@@ -1853,7 +1513,6 @@ struct yyParser {
};
typedef struct yyParser yyParser;
-#include
#ifndef NDEBUG
#include
static FILE *yyTraceFILE = 0;
@@ -1948,456 +1607,459 @@ static const char *const yyTokenName[] = {
/* 55 */ "NK_IPTOKEN",
/* 56 */ "FORCE",
/* 57 */ "UNSAFE",
- /* 58 */ "LOCAL",
- /* 59 */ "QNODE",
- /* 60 */ "BNODE",
- /* 61 */ "SNODE",
- /* 62 */ "MNODE",
- /* 63 */ "VNODE",
- /* 64 */ "DATABASE",
- /* 65 */ "USE",
- /* 66 */ "FLUSH",
- /* 67 */ "TRIM",
- /* 68 */ "COMPACT",
- /* 69 */ "IF",
- /* 70 */ "NOT",
- /* 71 */ "EXISTS",
- /* 72 */ "BUFFER",
- /* 73 */ "CACHEMODEL",
- /* 74 */ "CACHESIZE",
- /* 75 */ "COMP",
- /* 76 */ "DURATION",
- /* 77 */ "NK_VARIABLE",
- /* 78 */ "MAXROWS",
- /* 79 */ "MINROWS",
- /* 80 */ "KEEP",
- /* 81 */ "PAGES",
- /* 82 */ "PAGESIZE",
- /* 83 */ "TSDB_PAGESIZE",
- /* 84 */ "PRECISION",
- /* 85 */ "REPLICA",
- /* 86 */ "VGROUPS",
- /* 87 */ "SINGLE_STABLE",
- /* 88 */ "RETENTIONS",
- /* 89 */ "SCHEMALESS",
- /* 90 */ "WAL_LEVEL",
- /* 91 */ "WAL_FSYNC_PERIOD",
- /* 92 */ "WAL_RETENTION_PERIOD",
- /* 93 */ "WAL_RETENTION_SIZE",
- /* 94 */ "WAL_ROLL_PERIOD",
- /* 95 */ "WAL_SEGMENT_SIZE",
- /* 96 */ "STT_TRIGGER",
- /* 97 */ "TABLE_PREFIX",
- /* 98 */ "TABLE_SUFFIX",
- /* 99 */ "KEEP_TIME_OFFSET",
- /* 100 */ "NK_COLON",
- /* 101 */ "BWLIMIT",
- /* 102 */ "START",
- /* 103 */ "TIMESTAMP",
- /* 104 */ "END",
- /* 105 */ "TABLE",
- /* 106 */ "NK_LP",
- /* 107 */ "NK_RP",
- /* 108 */ "STABLE",
- /* 109 */ "COLUMN",
- /* 110 */ "MODIFY",
- /* 111 */ "RENAME",
- /* 112 */ "TAG",
- /* 113 */ "SET",
- /* 114 */ "NK_EQ",
- /* 115 */ "USING",
- /* 116 */ "TAGS",
- /* 117 */ "BOOL",
- /* 118 */ "TINYINT",
- /* 119 */ "SMALLINT",
- /* 120 */ "INT",
- /* 121 */ "INTEGER",
- /* 122 */ "BIGINT",
- /* 123 */ "FLOAT",
- /* 124 */ "DOUBLE",
- /* 125 */ "BINARY",
- /* 126 */ "NCHAR",
- /* 127 */ "UNSIGNED",
- /* 128 */ "JSON",
- /* 129 */ "VARCHAR",
- /* 130 */ "MEDIUMBLOB",
- /* 131 */ "BLOB",
- /* 132 */ "VARBINARY",
- /* 133 */ "GEOMETRY",
- /* 134 */ "DECIMAL",
- /* 135 */ "COMMENT",
- /* 136 */ "MAX_DELAY",
- /* 137 */ "WATERMARK",
- /* 138 */ "ROLLUP",
- /* 139 */ "TTL",
- /* 140 */ "SMA",
- /* 141 */ "DELETE_MARK",
- /* 142 */ "FIRST",
- /* 143 */ "LAST",
- /* 144 */ "SHOW",
- /* 145 */ "PRIVILEGES",
- /* 146 */ "DATABASES",
- /* 147 */ "TABLES",
- /* 148 */ "STABLES",
- /* 149 */ "MNODES",
- /* 150 */ "QNODES",
- /* 151 */ "FUNCTIONS",
- /* 152 */ "INDEXES",
- /* 153 */ "ACCOUNTS",
- /* 154 */ "APPS",
- /* 155 */ "CONNECTIONS",
- /* 156 */ "LICENCES",
- /* 157 */ "GRANTS",
- /* 158 */ "QUERIES",
- /* 159 */ "SCORES",
- /* 160 */ "TOPICS",
- /* 161 */ "VARIABLES",
- /* 162 */ "CLUSTER",
- /* 163 */ "BNODES",
- /* 164 */ "SNODES",
- /* 165 */ "TRANSACTIONS",
- /* 166 */ "DISTRIBUTED",
- /* 167 */ "CONSUMERS",
- /* 168 */ "SUBSCRIPTIONS",
- /* 169 */ "VNODES",
- /* 170 */ "ALIVE",
- /* 171 */ "VIEWS",
- /* 172 */ "VIEW",
- /* 173 */ "COMPACTS",
- /* 174 */ "NORMAL",
- /* 175 */ "CHILD",
- /* 176 */ "LIKE",
- /* 177 */ "TBNAME",
- /* 178 */ "QTAGS",
- /* 179 */ "AS",
- /* 180 */ "SYSTEM",
- /* 181 */ "INDEX",
- /* 182 */ "FUNCTION",
- /* 183 */ "INTERVAL",
- /* 184 */ "COUNT",
- /* 185 */ "LAST_ROW",
- /* 186 */ "META",
- /* 187 */ "ONLY",
- /* 188 */ "TOPIC",
- /* 189 */ "CONSUMER",
- /* 190 */ "GROUP",
- /* 191 */ "DESC",
- /* 192 */ "DESCRIBE",
- /* 193 */ "RESET",
- /* 194 */ "QUERY",
- /* 195 */ "CACHE",
- /* 196 */ "EXPLAIN",
- /* 197 */ "ANALYZE",
- /* 198 */ "VERBOSE",
- /* 199 */ "NK_BOOL",
- /* 200 */ "RATIO",
- /* 201 */ "NK_FLOAT",
- /* 202 */ "OUTPUTTYPE",
- /* 203 */ "AGGREGATE",
- /* 204 */ "BUFSIZE",
- /* 205 */ "LANGUAGE",
- /* 206 */ "REPLACE",
- /* 207 */ "STREAM",
- /* 208 */ "INTO",
- /* 209 */ "PAUSE",
- /* 210 */ "RESUME",
- /* 211 */ "TRIGGER",
- /* 212 */ "AT_ONCE",
- /* 213 */ "WINDOW_CLOSE",
- /* 214 */ "IGNORE",
- /* 215 */ "EXPIRED",
- /* 216 */ "FILL_HISTORY",
- /* 217 */ "UPDATE",
- /* 218 */ "SUBTABLE",
- /* 219 */ "UNTREATED",
- /* 220 */ "KILL",
- /* 221 */ "CONNECTION",
- /* 222 */ "TRANSACTION",
- /* 223 */ "BALANCE",
- /* 224 */ "VGROUP",
- /* 225 */ "LEADER",
- /* 226 */ "MERGE",
- /* 227 */ "REDISTRIBUTE",
- /* 228 */ "SPLIT",
- /* 229 */ "DELETE",
- /* 230 */ "INSERT",
- /* 231 */ "NULL",
- /* 232 */ "NK_QUESTION",
- /* 233 */ "NK_ALIAS",
- /* 234 */ "NK_ARROW",
- /* 235 */ "ROWTS",
- /* 236 */ "QSTART",
- /* 237 */ "QEND",
- /* 238 */ "QDURATION",
- /* 239 */ "WSTART",
- /* 240 */ "WEND",
- /* 241 */ "WDURATION",
- /* 242 */ "IROWTS",
- /* 243 */ "ISFILLED",
- /* 244 */ "CAST",
- /* 245 */ "NOW",
- /* 246 */ "TODAY",
- /* 247 */ "TIMEZONE",
- /* 248 */ "CLIENT_VERSION",
- /* 249 */ "SERVER_VERSION",
- /* 250 */ "SERVER_STATUS",
- /* 251 */ "CURRENT_USER",
- /* 252 */ "CASE",
- /* 253 */ "WHEN",
- /* 254 */ "THEN",
- /* 255 */ "ELSE",
- /* 256 */ "BETWEEN",
- /* 257 */ "IS",
- /* 258 */ "NK_LT",
- /* 259 */ "NK_GT",
- /* 260 */ "NK_LE",
- /* 261 */ "NK_GE",
- /* 262 */ "NK_NE",
- /* 263 */ "MATCH",
- /* 264 */ "NMATCH",
- /* 265 */ "CONTAINS",
- /* 266 */ "IN",
- /* 267 */ "JOIN",
- /* 268 */ "INNER",
- /* 269 */ "SELECT",
- /* 270 */ "NK_HINT",
- /* 271 */ "DISTINCT",
- /* 272 */ "WHERE",
- /* 273 */ "PARTITION",
- /* 274 */ "BY",
- /* 275 */ "SESSION",
- /* 276 */ "STATE_WINDOW",
- /* 277 */ "EVENT_WINDOW",
- /* 278 */ "SLIDING",
- /* 279 */ "FILL",
- /* 280 */ "VALUE",
- /* 281 */ "VALUE_F",
- /* 282 */ "NONE",
- /* 283 */ "PREV",
- /* 284 */ "NULL_F",
- /* 285 */ "LINEAR",
- /* 286 */ "NEXT",
- /* 287 */ "HAVING",
- /* 288 */ "RANGE",
- /* 289 */ "EVERY",
- /* 290 */ "ORDER",
- /* 291 */ "SLIMIT",
- /* 292 */ "SOFFSET",
- /* 293 */ "LIMIT",
- /* 294 */ "OFFSET",
- /* 295 */ "ASC",
- /* 296 */ "NULLS",
- /* 297 */ "ABORT",
- /* 298 */ "AFTER",
- /* 299 */ "ATTACH",
- /* 300 */ "BEFORE",
- /* 301 */ "BEGIN",
- /* 302 */ "BITAND",
- /* 303 */ "BITNOT",
- /* 304 */ "BITOR",
- /* 305 */ "BLOCKS",
- /* 306 */ "CHANGE",
- /* 307 */ "COMMA",
- /* 308 */ "CONCAT",
- /* 309 */ "CONFLICT",
- /* 310 */ "COPY",
- /* 311 */ "DEFERRED",
- /* 312 */ "DELIMITERS",
- /* 313 */ "DETACH",
- /* 314 */ "DIVIDE",
- /* 315 */ "DOT",
- /* 316 */ "EACH",
- /* 317 */ "FAIL",
- /* 318 */ "FILE",
- /* 319 */ "FOR",
- /* 320 */ "GLOB",
- /* 321 */ "ID",
- /* 322 */ "IMMEDIATE",
- /* 323 */ "IMPORT",
- /* 324 */ "INITIALLY",
- /* 325 */ "INSTEAD",
- /* 326 */ "ISNULL",
- /* 327 */ "KEY",
- /* 328 */ "MODULES",
- /* 329 */ "NK_BITNOT",
- /* 330 */ "NK_SEMI",
- /* 331 */ "NOTNULL",
- /* 332 */ "OF",
- /* 333 */ "PLUS",
- /* 334 */ "PRIVILEGE",
- /* 335 */ "RAISE",
- /* 336 */ "RESTRICT",
- /* 337 */ "ROW",
- /* 338 */ "SEMI",
- /* 339 */ "STAR",
- /* 340 */ "STATEMENT",
- /* 341 */ "STRICT",
- /* 342 */ "STRING",
- /* 343 */ "TIMES",
- /* 344 */ "VALUES",
- /* 345 */ "VARIABLE",
- /* 346 */ "WAL",
- /* 347 */ "cmd",
- /* 348 */ "account_options",
- /* 349 */ "alter_account_options",
- /* 350 */ "literal",
- /* 351 */ "alter_account_option",
- /* 352 */ "ip_range_list",
- /* 353 */ "white_list",
- /* 354 */ "white_list_opt",
- /* 355 */ "user_name",
- /* 356 */ "sysinfo_opt",
- /* 357 */ "privileges",
- /* 358 */ "priv_level",
- /* 359 */ "with_opt",
- /* 360 */ "priv_type_list",
- /* 361 */ "priv_type",
- /* 362 */ "db_name",
- /* 363 */ "table_name",
- /* 364 */ "topic_name",
- /* 365 */ "search_condition",
- /* 366 */ "dnode_endpoint",
- /* 367 */ "force_opt",
- /* 368 */ "unsafe_opt",
- /* 369 */ "not_exists_opt",
- /* 370 */ "db_options",
- /* 371 */ "exists_opt",
- /* 372 */ "alter_db_options",
- /* 373 */ "speed_opt",
- /* 374 */ "start_opt",
- /* 375 */ "end_opt",
- /* 376 */ "integer_list",
- /* 377 */ "variable_list",
- /* 378 */ "retention_list",
- /* 379 */ "signed",
- /* 380 */ "alter_db_option",
- /* 381 */ "retention",
- /* 382 */ "full_table_name",
- /* 383 */ "column_def_list",
- /* 384 */ "tags_def_opt",
- /* 385 */ "table_options",
- /* 386 */ "multi_create_clause",
- /* 387 */ "tags_def",
- /* 388 */ "multi_drop_clause",
- /* 389 */ "alter_table_clause",
- /* 390 */ "alter_table_options",
- /* 391 */ "column_name",
- /* 392 */ "type_name",
- /* 393 */ "signed_literal",
- /* 394 */ "create_subtable_clause",
- /* 395 */ "specific_cols_opt",
- /* 396 */ "expression_list",
- /* 397 */ "drop_table_clause",
- /* 398 */ "col_name_list",
- /* 399 */ "column_def",
- /* 400 */ "duration_list",
- /* 401 */ "rollup_func_list",
- /* 402 */ "alter_table_option",
- /* 403 */ "duration_literal",
- /* 404 */ "rollup_func_name",
- /* 405 */ "function_name",
- /* 406 */ "col_name",
- /* 407 */ "db_kind_opt",
- /* 408 */ "table_kind_db_name_cond_opt",
- /* 409 */ "like_pattern_opt",
- /* 410 */ "db_name_cond_opt",
- /* 411 */ "table_name_cond",
- /* 412 */ "from_db_opt",
- /* 413 */ "tag_list_opt",
- /* 414 */ "table_kind",
- /* 415 */ "tag_item",
- /* 416 */ "column_alias",
- /* 417 */ "index_options",
- /* 418 */ "full_index_name",
- /* 419 */ "index_name",
- /* 420 */ "func_list",
- /* 421 */ "sliding_opt",
- /* 422 */ "sma_stream_opt",
- /* 423 */ "func",
- /* 424 */ "sma_func_name",
- /* 425 */ "with_meta",
- /* 426 */ "query_or_subquery",
- /* 427 */ "where_clause_opt",
- /* 428 */ "cgroup_name",
- /* 429 */ "analyze_opt",
- /* 430 */ "explain_options",
- /* 431 */ "insert_query",
- /* 432 */ "or_replace_opt",
- /* 433 */ "agg_func_opt",
- /* 434 */ "bufsize_opt",
- /* 435 */ "language_opt",
- /* 436 */ "full_view_name",
- /* 437 */ "view_name",
- /* 438 */ "stream_name",
- /* 439 */ "stream_options",
- /* 440 */ "col_list_opt",
- /* 441 */ "tag_def_or_ref_opt",
- /* 442 */ "subtable_opt",
- /* 443 */ "ignore_opt",
- /* 444 */ "expression",
- /* 445 */ "on_vgroup_id",
- /* 446 */ "dnode_list",
- /* 447 */ "literal_func",
- /* 448 */ "literal_list",
- /* 449 */ "table_alias",
- /* 450 */ "expr_or_subquery",
- /* 451 */ "pseudo_column",
- /* 452 */ "column_reference",
- /* 453 */ "function_expression",
- /* 454 */ "case_when_expression",
- /* 455 */ "star_func",
- /* 456 */ "star_func_para_list",
- /* 457 */ "noarg_func",
- /* 458 */ "other_para_list",
- /* 459 */ "star_func_para",
- /* 460 */ "when_then_list",
- /* 461 */ "case_when_else_opt",
- /* 462 */ "common_expression",
- /* 463 */ "when_then_expr",
- /* 464 */ "predicate",
- /* 465 */ "compare_op",
- /* 466 */ "in_op",
- /* 467 */ "in_predicate_value",
- /* 468 */ "boolean_value_expression",
- /* 469 */ "boolean_primary",
- /* 470 */ "from_clause_opt",
- /* 471 */ "table_reference_list",
- /* 472 */ "table_reference",
- /* 473 */ "table_primary",
- /* 474 */ "joined_table",
- /* 475 */ "alias_opt",
- /* 476 */ "subquery",
- /* 477 */ "parenthesized_joined_table",
- /* 478 */ "join_type",
- /* 479 */ "query_specification",
- /* 480 */ "hint_list",
- /* 481 */ "set_quantifier_opt",
- /* 482 */ "tag_mode_opt",
- /* 483 */ "select_list",
- /* 484 */ "partition_by_clause_opt",
- /* 485 */ "range_opt",
- /* 486 */ "every_opt",
- /* 487 */ "fill_opt",
- /* 488 */ "twindow_clause_opt",
- /* 489 */ "group_by_clause_opt",
- /* 490 */ "having_clause_opt",
- /* 491 */ "select_item",
- /* 492 */ "partition_list",
- /* 493 */ "partition_item",
- /* 494 */ "interval_sliding_duration_literal",
- /* 495 */ "fill_mode",
- /* 496 */ "group_by_list",
- /* 497 */ "query_expression",
- /* 498 */ "query_simple",
- /* 499 */ "order_by_clause_opt",
- /* 500 */ "slimit_clause_opt",
- /* 501 */ "limit_clause_opt",
- /* 502 */ "union_query_expression",
- /* 503 */ "query_simple_or_subquery",
- /* 504 */ "sort_specification_list",
- /* 505 */ "sort_specification",
- /* 506 */ "ordering_specification_opt",
- /* 507 */ "null_ordering_opt",
+ /* 58 */ "CLUSTER",
+ /* 59 */ "LOCAL",
+ /* 60 */ "QNODE",
+ /* 61 */ "BNODE",
+ /* 62 */ "SNODE",
+ /* 63 */ "MNODE",
+ /* 64 */ "VNODE",
+ /* 65 */ "DATABASE",
+ /* 66 */ "USE",
+ /* 67 */ "FLUSH",
+ /* 68 */ "TRIM",
+ /* 69 */ "COMPACT",
+ /* 70 */ "IF",
+ /* 71 */ "NOT",
+ /* 72 */ "EXISTS",
+ /* 73 */ "BUFFER",
+ /* 74 */ "CACHEMODEL",
+ /* 75 */ "CACHESIZE",
+ /* 76 */ "COMP",
+ /* 77 */ "DURATION",
+ /* 78 */ "NK_VARIABLE",
+ /* 79 */ "MAXROWS",
+ /* 80 */ "MINROWS",
+ /* 81 */ "KEEP",
+ /* 82 */ "PAGES",
+ /* 83 */ "PAGESIZE",
+ /* 84 */ "TSDB_PAGESIZE",
+ /* 85 */ "PRECISION",
+ /* 86 */ "REPLICA",
+ /* 87 */ "VGROUPS",
+ /* 88 */ "SINGLE_STABLE",
+ /* 89 */ "RETENTIONS",
+ /* 90 */ "SCHEMALESS",
+ /* 91 */ "WAL_LEVEL",
+ /* 92 */ "WAL_FSYNC_PERIOD",
+ /* 93 */ "WAL_RETENTION_PERIOD",
+ /* 94 */ "WAL_RETENTION_SIZE",
+ /* 95 */ "WAL_ROLL_PERIOD",
+ /* 96 */ "WAL_SEGMENT_SIZE",
+ /* 97 */ "STT_TRIGGER",
+ /* 98 */ "TABLE_PREFIX",
+ /* 99 */ "TABLE_SUFFIX",
+ /* 100 */ "KEEP_TIME_OFFSET",
+ /* 101 */ "NK_COLON",
+ /* 102 */ "BWLIMIT",
+ /* 103 */ "START",
+ /* 104 */ "TIMESTAMP",
+ /* 105 */ "END",
+ /* 106 */ "TABLE",
+ /* 107 */ "NK_LP",
+ /* 108 */ "NK_RP",
+ /* 109 */ "STABLE",
+ /* 110 */ "COLUMN",
+ /* 111 */ "MODIFY",
+ /* 112 */ "RENAME",
+ /* 113 */ "TAG",
+ /* 114 */ "SET",
+ /* 115 */ "NK_EQ",
+ /* 116 */ "USING",
+ /* 117 */ "TAGS",
+ /* 118 */ "BOOL",
+ /* 119 */ "TINYINT",
+ /* 120 */ "SMALLINT",
+ /* 121 */ "INT",
+ /* 122 */ "INTEGER",
+ /* 123 */ "BIGINT",
+ /* 124 */ "FLOAT",
+ /* 125 */ "DOUBLE",
+ /* 126 */ "BINARY",
+ /* 127 */ "NCHAR",
+ /* 128 */ "UNSIGNED",
+ /* 129 */ "JSON",
+ /* 130 */ "VARCHAR",
+ /* 131 */ "MEDIUMBLOB",
+ /* 132 */ "BLOB",
+ /* 133 */ "VARBINARY",
+ /* 134 */ "GEOMETRY",
+ /* 135 */ "DECIMAL",
+ /* 136 */ "COMMENT",
+ /* 137 */ "MAX_DELAY",
+ /* 138 */ "WATERMARK",
+ /* 139 */ "ROLLUP",
+ /* 140 */ "TTL",
+ /* 141 */ "SMA",
+ /* 142 */ "DELETE_MARK",
+ /* 143 */ "FIRST",
+ /* 144 */ "LAST",
+ /* 145 */ "SHOW",
+ /* 146 */ "PRIVILEGES",
+ /* 147 */ "DATABASES",
+ /* 148 */ "TABLES",
+ /* 149 */ "STABLES",
+ /* 150 */ "MNODES",
+ /* 151 */ "QNODES",
+ /* 152 */ "FUNCTIONS",
+ /* 153 */ "INDEXES",
+ /* 154 */ "ACCOUNTS",
+ /* 155 */ "APPS",
+ /* 156 */ "CONNECTIONS",
+ /* 157 */ "LICENCES",
+ /* 158 */ "GRANTS",
+ /* 159 */ "FULL",
+ /* 160 */ "LOGS",
+ /* 161 */ "MACHINES",
+ /* 162 */ "QUERIES",
+ /* 163 */ "SCORES",
+ /* 164 */ "TOPICS",
+ /* 165 */ "VARIABLES",
+ /* 166 */ "BNODES",
+ /* 167 */ "SNODES",
+ /* 168 */ "TRANSACTIONS",
+ /* 169 */ "DISTRIBUTED",
+ /* 170 */ "CONSUMERS",
+ /* 171 */ "SUBSCRIPTIONS",
+ /* 172 */ "VNODES",
+ /* 173 */ "ALIVE",
+ /* 174 */ "VIEWS",
+ /* 175 */ "VIEW",
+ /* 176 */ "COMPACTS",
+ /* 177 */ "NORMAL",
+ /* 178 */ "CHILD",
+ /* 179 */ "LIKE",
+ /* 180 */ "TBNAME",
+ /* 181 */ "QTAGS",
+ /* 182 */ "AS",
+ /* 183 */ "SYSTEM",
+ /* 184 */ "INDEX",
+ /* 185 */ "FUNCTION",
+ /* 186 */ "INTERVAL",
+ /* 187 */ "COUNT",
+ /* 188 */ "LAST_ROW",
+ /* 189 */ "META",
+ /* 190 */ "ONLY",
+ /* 191 */ "TOPIC",
+ /* 192 */ "CONSUMER",
+ /* 193 */ "GROUP",
+ /* 194 */ "DESC",
+ /* 195 */ "DESCRIBE",
+ /* 196 */ "RESET",
+ /* 197 */ "QUERY",
+ /* 198 */ "CACHE",
+ /* 199 */ "EXPLAIN",
+ /* 200 */ "ANALYZE",
+ /* 201 */ "VERBOSE",
+ /* 202 */ "NK_BOOL",
+ /* 203 */ "RATIO",
+ /* 204 */ "NK_FLOAT",
+ /* 205 */ "OUTPUTTYPE",
+ /* 206 */ "AGGREGATE",
+ /* 207 */ "BUFSIZE",
+ /* 208 */ "LANGUAGE",
+ /* 209 */ "REPLACE",
+ /* 210 */ "STREAM",
+ /* 211 */ "INTO",
+ /* 212 */ "PAUSE",
+ /* 213 */ "RESUME",
+ /* 214 */ "TRIGGER",
+ /* 215 */ "AT_ONCE",
+ /* 216 */ "WINDOW_CLOSE",
+ /* 217 */ "IGNORE",
+ /* 218 */ "EXPIRED",
+ /* 219 */ "FILL_HISTORY",
+ /* 220 */ "UPDATE",
+ /* 221 */ "SUBTABLE",
+ /* 222 */ "UNTREATED",
+ /* 223 */ "KILL",
+ /* 224 */ "CONNECTION",
+ /* 225 */ "TRANSACTION",
+ /* 226 */ "BALANCE",
+ /* 227 */ "VGROUP",
+ /* 228 */ "LEADER",
+ /* 229 */ "MERGE",
+ /* 230 */ "REDISTRIBUTE",
+ /* 231 */ "SPLIT",
+ /* 232 */ "DELETE",
+ /* 233 */ "INSERT",
+ /* 234 */ "NULL",
+ /* 235 */ "NK_QUESTION",
+ /* 236 */ "NK_ALIAS",
+ /* 237 */ "NK_ARROW",
+ /* 238 */ "ROWTS",
+ /* 239 */ "QSTART",
+ /* 240 */ "QEND",
+ /* 241 */ "QDURATION",
+ /* 242 */ "WSTART",
+ /* 243 */ "WEND",
+ /* 244 */ "WDURATION",
+ /* 245 */ "IROWTS",
+ /* 246 */ "ISFILLED",
+ /* 247 */ "CAST",
+ /* 248 */ "NOW",
+ /* 249 */ "TODAY",
+ /* 250 */ "TIMEZONE",
+ /* 251 */ "CLIENT_VERSION",
+ /* 252 */ "SERVER_VERSION",
+ /* 253 */ "SERVER_STATUS",
+ /* 254 */ "CURRENT_USER",
+ /* 255 */ "CASE",
+ /* 256 */ "WHEN",
+ /* 257 */ "THEN",
+ /* 258 */ "ELSE",
+ /* 259 */ "BETWEEN",
+ /* 260 */ "IS",
+ /* 261 */ "NK_LT",
+ /* 262 */ "NK_GT",
+ /* 263 */ "NK_LE",
+ /* 264 */ "NK_GE",
+ /* 265 */ "NK_NE",
+ /* 266 */ "MATCH",
+ /* 267 */ "NMATCH",
+ /* 268 */ "CONTAINS",
+ /* 269 */ "IN",
+ /* 270 */ "JOIN",
+ /* 271 */ "INNER",
+ /* 272 */ "SELECT",
+ /* 273 */ "NK_HINT",
+ /* 274 */ "DISTINCT",
+ /* 275 */ "WHERE",
+ /* 276 */ "PARTITION",
+ /* 277 */ "BY",
+ /* 278 */ "SESSION",
+ /* 279 */ "STATE_WINDOW",
+ /* 280 */ "EVENT_WINDOW",
+ /* 281 */ "SLIDING",
+ /* 282 */ "FILL",
+ /* 283 */ "VALUE",
+ /* 284 */ "VALUE_F",
+ /* 285 */ "NONE",
+ /* 286 */ "PREV",
+ /* 287 */ "NULL_F",
+ /* 288 */ "LINEAR",
+ /* 289 */ "NEXT",
+ /* 290 */ "HAVING",
+ /* 291 */ "RANGE",
+ /* 292 */ "EVERY",
+ /* 293 */ "ORDER",
+ /* 294 */ "SLIMIT",
+ /* 295 */ "SOFFSET",
+ /* 296 */ "LIMIT",
+ /* 297 */ "OFFSET",
+ /* 298 */ "ASC",
+ /* 299 */ "NULLS",
+ /* 300 */ "ABORT",
+ /* 301 */ "AFTER",
+ /* 302 */ "ATTACH",
+ /* 303 */ "BEFORE",
+ /* 304 */ "BEGIN",
+ /* 305 */ "BITAND",
+ /* 306 */ "BITNOT",
+ /* 307 */ "BITOR",
+ /* 308 */ "BLOCKS",
+ /* 309 */ "CHANGE",
+ /* 310 */ "COMMA",
+ /* 311 */ "CONCAT",
+ /* 312 */ "CONFLICT",
+ /* 313 */ "COPY",
+ /* 314 */ "DEFERRED",
+ /* 315 */ "DELIMITERS",
+ /* 316 */ "DETACH",
+ /* 317 */ "DIVIDE",
+ /* 318 */ "DOT",
+ /* 319 */ "EACH",
+ /* 320 */ "FAIL",
+ /* 321 */ "FILE",
+ /* 322 */ "FOR",
+ /* 323 */ "GLOB",
+ /* 324 */ "ID",
+ /* 325 */ "IMMEDIATE",
+ /* 326 */ "IMPORT",
+ /* 327 */ "INITIALLY",
+ /* 328 */ "INSTEAD",
+ /* 329 */ "ISNULL",
+ /* 330 */ "KEY",
+ /* 331 */ "MODULES",
+ /* 332 */ "NK_BITNOT",
+ /* 333 */ "NK_SEMI",
+ /* 334 */ "NOTNULL",
+ /* 335 */ "OF",
+ /* 336 */ "PLUS",
+ /* 337 */ "PRIVILEGE",
+ /* 338 */ "RAISE",
+ /* 339 */ "RESTRICT",
+ /* 340 */ "ROW",
+ /* 341 */ "SEMI",
+ /* 342 */ "STAR",
+ /* 343 */ "STATEMENT",
+ /* 344 */ "STRICT",
+ /* 345 */ "STRING",
+ /* 346 */ "TIMES",
+ /* 347 */ "VALUES",
+ /* 348 */ "VARIABLE",
+ /* 349 */ "WAL",
+ /* 350 */ "cmd",
+ /* 351 */ "account_options",
+ /* 352 */ "alter_account_options",
+ /* 353 */ "literal",
+ /* 354 */ "alter_account_option",
+ /* 355 */ "ip_range_list",
+ /* 356 */ "white_list",
+ /* 357 */ "white_list_opt",
+ /* 358 */ "user_name",
+ /* 359 */ "sysinfo_opt",
+ /* 360 */ "privileges",
+ /* 361 */ "priv_level",
+ /* 362 */ "with_opt",
+ /* 363 */ "priv_type_list",
+ /* 364 */ "priv_type",
+ /* 365 */ "db_name",
+ /* 366 */ "table_name",
+ /* 367 */ "topic_name",
+ /* 368 */ "search_condition",
+ /* 369 */ "dnode_endpoint",
+ /* 370 */ "force_opt",
+ /* 371 */ "unsafe_opt",
+ /* 372 */ "not_exists_opt",
+ /* 373 */ "db_options",
+ /* 374 */ "exists_opt",
+ /* 375 */ "alter_db_options",
+ /* 376 */ "speed_opt",
+ /* 377 */ "start_opt",
+ /* 378 */ "end_opt",
+ /* 379 */ "integer_list",
+ /* 380 */ "variable_list",
+ /* 381 */ "retention_list",
+ /* 382 */ "signed",
+ /* 383 */ "alter_db_option",
+ /* 384 */ "retention",
+ /* 385 */ "full_table_name",
+ /* 386 */ "column_def_list",
+ /* 387 */ "tags_def_opt",
+ /* 388 */ "table_options",
+ /* 389 */ "multi_create_clause",
+ /* 390 */ "tags_def",
+ /* 391 */ "multi_drop_clause",
+ /* 392 */ "alter_table_clause",
+ /* 393 */ "alter_table_options",
+ /* 394 */ "column_name",
+ /* 395 */ "type_name",
+ /* 396 */ "signed_literal",
+ /* 397 */ "create_subtable_clause",
+ /* 398 */ "specific_cols_opt",
+ /* 399 */ "expression_list",
+ /* 400 */ "drop_table_clause",
+ /* 401 */ "col_name_list",
+ /* 402 */ "column_def",
+ /* 403 */ "duration_list",
+ /* 404 */ "rollup_func_list",
+ /* 405 */ "alter_table_option",
+ /* 406 */ "duration_literal",
+ /* 407 */ "rollup_func_name",
+ /* 408 */ "function_name",
+ /* 409 */ "col_name",
+ /* 410 */ "db_kind_opt",
+ /* 411 */ "table_kind_db_name_cond_opt",
+ /* 412 */ "like_pattern_opt",
+ /* 413 */ "db_name_cond_opt",
+ /* 414 */ "table_name_cond",
+ /* 415 */ "from_db_opt",
+ /* 416 */ "tag_list_opt",
+ /* 417 */ "table_kind",
+ /* 418 */ "tag_item",
+ /* 419 */ "column_alias",
+ /* 420 */ "index_options",
+ /* 421 */ "full_index_name",
+ /* 422 */ "index_name",
+ /* 423 */ "func_list",
+ /* 424 */ "sliding_opt",
+ /* 425 */ "sma_stream_opt",
+ /* 426 */ "func",
+ /* 427 */ "sma_func_name",
+ /* 428 */ "with_meta",
+ /* 429 */ "query_or_subquery",
+ /* 430 */ "where_clause_opt",
+ /* 431 */ "cgroup_name",
+ /* 432 */ "analyze_opt",
+ /* 433 */ "explain_options",
+ /* 434 */ "insert_query",
+ /* 435 */ "or_replace_opt",
+ /* 436 */ "agg_func_opt",
+ /* 437 */ "bufsize_opt",
+ /* 438 */ "language_opt",
+ /* 439 */ "full_view_name",
+ /* 440 */ "view_name",
+ /* 441 */ "stream_name",
+ /* 442 */ "stream_options",
+ /* 443 */ "col_list_opt",
+ /* 444 */ "tag_def_or_ref_opt",
+ /* 445 */ "subtable_opt",
+ /* 446 */ "ignore_opt",
+ /* 447 */ "expression",
+ /* 448 */ "on_vgroup_id",
+ /* 449 */ "dnode_list",
+ /* 450 */ "literal_func",
+ /* 451 */ "literal_list",
+ /* 452 */ "table_alias",
+ /* 453 */ "expr_or_subquery",
+ /* 454 */ "pseudo_column",
+ /* 455 */ "column_reference",
+ /* 456 */ "function_expression",
+ /* 457 */ "case_when_expression",
+ /* 458 */ "star_func",
+ /* 459 */ "star_func_para_list",
+ /* 460 */ "noarg_func",
+ /* 461 */ "other_para_list",
+ /* 462 */ "star_func_para",
+ /* 463 */ "when_then_list",
+ /* 464 */ "case_when_else_opt",
+ /* 465 */ "common_expression",
+ /* 466 */ "when_then_expr",
+ /* 467 */ "predicate",
+ /* 468 */ "compare_op",
+ /* 469 */ "in_op",
+ /* 470 */ "in_predicate_value",
+ /* 471 */ "boolean_value_expression",
+ /* 472 */ "boolean_primary",
+ /* 473 */ "from_clause_opt",
+ /* 474 */ "table_reference_list",
+ /* 475 */ "table_reference",
+ /* 476 */ "table_primary",
+ /* 477 */ "joined_table",
+ /* 478 */ "alias_opt",
+ /* 479 */ "subquery",
+ /* 480 */ "parenthesized_joined_table",
+ /* 481 */ "join_type",
+ /* 482 */ "query_specification",
+ /* 483 */ "hint_list",
+ /* 484 */ "set_quantifier_opt",
+ /* 485 */ "tag_mode_opt",
+ /* 486 */ "select_list",
+ /* 487 */ "partition_by_clause_opt",
+ /* 488 */ "range_opt",
+ /* 489 */ "every_opt",
+ /* 490 */ "fill_opt",
+ /* 491 */ "twindow_clause_opt",
+ /* 492 */ "group_by_clause_opt",
+ /* 493 */ "having_clause_opt",
+ /* 494 */ "select_item",
+ /* 495 */ "partition_list",
+ /* 496 */ "partition_item",
+ /* 497 */ "interval_sliding_duration_literal",
+ /* 498 */ "fill_mode",
+ /* 499 */ "group_by_list",
+ /* 500 */ "query_expression",
+ /* 501 */ "query_simple",
+ /* 502 */ "order_by_clause_opt",
+ /* 503 */ "slimit_clause_opt",
+ /* 504 */ "limit_clause_opt",
+ /* 505 */ "union_query_expression",
+ /* 506 */ "query_simple_or_subquery",
+ /* 507 */ "sort_specification_list",
+ /* 508 */ "sort_specification",
+ /* 509 */ "ordering_specification_opt",
+ /* 510 */ "null_ordering_opt",
};
#endif /* defined(YYCOVERAGE) || !defined(NDEBUG) */
@@ -2476,577 +2138,582 @@ static const char *const yyRuleName[] = {
/* 68 */ "force_opt ::=",
/* 69 */ "force_opt ::= FORCE",
/* 70 */ "unsafe_opt ::= UNSAFE",
- /* 71 */ "cmd ::= ALTER LOCAL NK_STRING",
- /* 72 */ "cmd ::= ALTER LOCAL NK_STRING NK_STRING",
- /* 73 */ "cmd ::= CREATE QNODE ON DNODE NK_INTEGER",
- /* 74 */ "cmd ::= DROP QNODE ON DNODE NK_INTEGER",
- /* 75 */ "cmd ::= RESTORE QNODE ON DNODE NK_INTEGER",
- /* 76 */ "cmd ::= CREATE BNODE ON DNODE NK_INTEGER",
- /* 77 */ "cmd ::= DROP BNODE ON DNODE NK_INTEGER",
- /* 78 */ "cmd ::= CREATE SNODE ON DNODE NK_INTEGER",
- /* 79 */ "cmd ::= DROP SNODE ON DNODE NK_INTEGER",
- /* 80 */ "cmd ::= CREATE MNODE ON DNODE NK_INTEGER",
- /* 81 */ "cmd ::= DROP MNODE ON DNODE NK_INTEGER",
- /* 82 */ "cmd ::= RESTORE MNODE ON DNODE NK_INTEGER",
- /* 83 */ "cmd ::= RESTORE VNODE ON DNODE NK_INTEGER",
- /* 84 */ "cmd ::= CREATE DATABASE not_exists_opt db_name db_options",
- /* 85 */ "cmd ::= DROP DATABASE exists_opt db_name",
- /* 86 */ "cmd ::= USE db_name",
- /* 87 */ "cmd ::= ALTER DATABASE db_name alter_db_options",
- /* 88 */ "cmd ::= FLUSH DATABASE db_name",
- /* 89 */ "cmd ::= TRIM DATABASE db_name speed_opt",
- /* 90 */ "cmd ::= COMPACT DATABASE db_name start_opt end_opt",
- /* 91 */ "not_exists_opt ::= IF NOT EXISTS",
- /* 92 */ "not_exists_opt ::=",
- /* 93 */ "exists_opt ::= IF EXISTS",
- /* 94 */ "exists_opt ::=",
- /* 95 */ "db_options ::=",
- /* 96 */ "db_options ::= db_options BUFFER NK_INTEGER",
- /* 97 */ "db_options ::= db_options CACHEMODEL NK_STRING",
- /* 98 */ "db_options ::= db_options CACHESIZE NK_INTEGER",
- /* 99 */ "db_options ::= db_options COMP NK_INTEGER",
- /* 100 */ "db_options ::= db_options DURATION NK_INTEGER",
- /* 101 */ "db_options ::= db_options DURATION NK_VARIABLE",
- /* 102 */ "db_options ::= db_options MAXROWS NK_INTEGER",
- /* 103 */ "db_options ::= db_options MINROWS NK_INTEGER",
- /* 104 */ "db_options ::= db_options KEEP integer_list",
- /* 105 */ "db_options ::= db_options KEEP variable_list",
- /* 106 */ "db_options ::= db_options PAGES NK_INTEGER",
- /* 107 */ "db_options ::= db_options PAGESIZE NK_INTEGER",
- /* 108 */ "db_options ::= db_options TSDB_PAGESIZE NK_INTEGER",
- /* 109 */ "db_options ::= db_options PRECISION NK_STRING",
- /* 110 */ "db_options ::= db_options REPLICA NK_INTEGER",
- /* 111 */ "db_options ::= db_options VGROUPS NK_INTEGER",
- /* 112 */ "db_options ::= db_options SINGLE_STABLE NK_INTEGER",
- /* 113 */ "db_options ::= db_options RETENTIONS retention_list",
- /* 114 */ "db_options ::= db_options SCHEMALESS NK_INTEGER",
- /* 115 */ "db_options ::= db_options WAL_LEVEL NK_INTEGER",
- /* 116 */ "db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER",
- /* 117 */ "db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER",
- /* 118 */ "db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER",
- /* 119 */ "db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER",
- /* 120 */ "db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER",
- /* 121 */ "db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER",
- /* 122 */ "db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER",
- /* 123 */ "db_options ::= db_options STT_TRIGGER NK_INTEGER",
- /* 124 */ "db_options ::= db_options TABLE_PREFIX signed",
- /* 125 */ "db_options ::= db_options TABLE_SUFFIX signed",
- /* 126 */ "db_options ::= db_options KEEP_TIME_OFFSET NK_INTEGER",
- /* 127 */ "alter_db_options ::= alter_db_option",
- /* 128 */ "alter_db_options ::= alter_db_options alter_db_option",
- /* 129 */ "alter_db_option ::= BUFFER NK_INTEGER",
- /* 130 */ "alter_db_option ::= CACHEMODEL NK_STRING",
- /* 131 */ "alter_db_option ::= CACHESIZE NK_INTEGER",
- /* 132 */ "alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER",
- /* 133 */ "alter_db_option ::= KEEP integer_list",
- /* 134 */ "alter_db_option ::= KEEP variable_list",
- /* 135 */ "alter_db_option ::= PAGES NK_INTEGER",
- /* 136 */ "alter_db_option ::= REPLICA NK_INTEGER",
- /* 137 */ "alter_db_option ::= WAL_LEVEL NK_INTEGER",
- /* 138 */ "alter_db_option ::= STT_TRIGGER NK_INTEGER",
- /* 139 */ "alter_db_option ::= MINROWS NK_INTEGER",
- /* 140 */ "alter_db_option ::= WAL_RETENTION_PERIOD NK_INTEGER",
- /* 141 */ "alter_db_option ::= WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER",
- /* 142 */ "alter_db_option ::= WAL_RETENTION_SIZE NK_INTEGER",
- /* 143 */ "alter_db_option ::= WAL_RETENTION_SIZE NK_MINUS NK_INTEGER",
- /* 144 */ "alter_db_option ::= KEEP_TIME_OFFSET NK_INTEGER",
- /* 145 */ "integer_list ::= NK_INTEGER",
- /* 146 */ "integer_list ::= integer_list NK_COMMA NK_INTEGER",
- /* 147 */ "variable_list ::= NK_VARIABLE",
- /* 148 */ "variable_list ::= variable_list NK_COMMA NK_VARIABLE",
- /* 149 */ "retention_list ::= retention",
- /* 150 */ "retention_list ::= retention_list NK_COMMA retention",
- /* 151 */ "retention ::= NK_VARIABLE NK_COLON NK_VARIABLE",
- /* 152 */ "retention ::= NK_MINUS NK_COLON NK_VARIABLE",
- /* 153 */ "speed_opt ::=",
- /* 154 */ "speed_opt ::= BWLIMIT NK_INTEGER",
- /* 155 */ "start_opt ::=",
- /* 156 */ "start_opt ::= START WITH NK_INTEGER",
- /* 157 */ "start_opt ::= START WITH NK_STRING",
- /* 158 */ "start_opt ::= START WITH TIMESTAMP NK_STRING",
- /* 159 */ "end_opt ::=",
- /* 160 */ "end_opt ::= END WITH NK_INTEGER",
- /* 161 */ "end_opt ::= END WITH NK_STRING",
- /* 162 */ "end_opt ::= END WITH TIMESTAMP NK_STRING",
- /* 163 */ "cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options",
- /* 164 */ "cmd ::= CREATE TABLE multi_create_clause",
- /* 165 */ "cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options",
- /* 166 */ "cmd ::= DROP TABLE multi_drop_clause",
- /* 167 */ "cmd ::= DROP STABLE exists_opt full_table_name",
- /* 168 */ "cmd ::= ALTER TABLE alter_table_clause",
- /* 169 */ "cmd ::= ALTER STABLE alter_table_clause",
- /* 170 */ "alter_table_clause ::= full_table_name alter_table_options",
- /* 171 */ "alter_table_clause ::= full_table_name ADD COLUMN column_name type_name",
- /* 172 */ "alter_table_clause ::= full_table_name DROP COLUMN column_name",
- /* 173 */ "alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name",
- /* 174 */ "alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name",
- /* 175 */ "alter_table_clause ::= full_table_name ADD TAG column_name type_name",
- /* 176 */ "alter_table_clause ::= full_table_name DROP TAG column_name",
- /* 177 */ "alter_table_clause ::= full_table_name MODIFY TAG column_name type_name",
- /* 178 */ "alter_table_clause ::= full_table_name RENAME TAG column_name column_name",
- /* 179 */ "alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal",
- /* 180 */ "multi_create_clause ::= create_subtable_clause",
- /* 181 */ "multi_create_clause ::= multi_create_clause create_subtable_clause",
- /* 182 */ "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",
- /* 183 */ "multi_drop_clause ::= drop_table_clause",
- /* 184 */ "multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause",
- /* 185 */ "drop_table_clause ::= exists_opt full_table_name",
- /* 186 */ "specific_cols_opt ::=",
- /* 187 */ "specific_cols_opt ::= NK_LP col_name_list NK_RP",
- /* 188 */ "full_table_name ::= table_name",
- /* 189 */ "full_table_name ::= db_name NK_DOT table_name",
- /* 190 */ "column_def_list ::= column_def",
- /* 191 */ "column_def_list ::= column_def_list NK_COMMA column_def",
- /* 192 */ "column_def ::= column_name type_name",
- /* 193 */ "type_name ::= BOOL",
- /* 194 */ "type_name ::= TINYINT",
- /* 195 */ "type_name ::= SMALLINT",
- /* 196 */ "type_name ::= INT",
- /* 197 */ "type_name ::= INTEGER",
- /* 198 */ "type_name ::= BIGINT",
- /* 199 */ "type_name ::= FLOAT",
- /* 200 */ "type_name ::= DOUBLE",
- /* 201 */ "type_name ::= BINARY NK_LP NK_INTEGER NK_RP",
- /* 202 */ "type_name ::= TIMESTAMP",
- /* 203 */ "type_name ::= NCHAR NK_LP NK_INTEGER NK_RP",
- /* 204 */ "type_name ::= TINYINT UNSIGNED",
- /* 205 */ "type_name ::= SMALLINT UNSIGNED",
- /* 206 */ "type_name ::= INT UNSIGNED",
- /* 207 */ "type_name ::= BIGINT UNSIGNED",
- /* 208 */ "type_name ::= JSON",
- /* 209 */ "type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP",
- /* 210 */ "type_name ::= MEDIUMBLOB",
- /* 211 */ "type_name ::= BLOB",
- /* 212 */ "type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP",
- /* 213 */ "type_name ::= GEOMETRY NK_LP NK_INTEGER NK_RP",
- /* 214 */ "type_name ::= DECIMAL",
- /* 215 */ "type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP",
- /* 216 */ "type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP",
- /* 217 */ "tags_def_opt ::=",
- /* 218 */ "tags_def_opt ::= tags_def",
- /* 219 */ "tags_def ::= TAGS NK_LP column_def_list NK_RP",
- /* 220 */ "table_options ::=",
- /* 221 */ "table_options ::= table_options COMMENT NK_STRING",
- /* 222 */ "table_options ::= table_options MAX_DELAY duration_list",
- /* 223 */ "table_options ::= table_options WATERMARK duration_list",
- /* 224 */ "table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP",
- /* 225 */ "table_options ::= table_options TTL NK_INTEGER",
- /* 226 */ "table_options ::= table_options SMA NK_LP col_name_list NK_RP",
- /* 227 */ "table_options ::= table_options DELETE_MARK duration_list",
- /* 228 */ "alter_table_options ::= alter_table_option",
- /* 229 */ "alter_table_options ::= alter_table_options alter_table_option",
- /* 230 */ "alter_table_option ::= COMMENT NK_STRING",
- /* 231 */ "alter_table_option ::= TTL NK_INTEGER",
- /* 232 */ "duration_list ::= duration_literal",
- /* 233 */ "duration_list ::= duration_list NK_COMMA duration_literal",
- /* 234 */ "rollup_func_list ::= rollup_func_name",
- /* 235 */ "rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name",
- /* 236 */ "rollup_func_name ::= function_name",
- /* 237 */ "rollup_func_name ::= FIRST",
- /* 238 */ "rollup_func_name ::= LAST",
- /* 239 */ "col_name_list ::= col_name",
- /* 240 */ "col_name_list ::= col_name_list NK_COMMA col_name",
- /* 241 */ "col_name ::= column_name",
- /* 242 */ "cmd ::= SHOW DNODES",
- /* 243 */ "cmd ::= SHOW USERS",
- /* 244 */ "cmd ::= SHOW USER PRIVILEGES",
- /* 245 */ "cmd ::= SHOW db_kind_opt DATABASES",
- /* 246 */ "cmd ::= SHOW table_kind_db_name_cond_opt TABLES like_pattern_opt",
- /* 247 */ "cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt",
- /* 248 */ "cmd ::= SHOW db_name_cond_opt VGROUPS",
- /* 249 */ "cmd ::= SHOW MNODES",
- /* 250 */ "cmd ::= SHOW QNODES",
- /* 251 */ "cmd ::= SHOW FUNCTIONS",
- /* 252 */ "cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt",
- /* 253 */ "cmd ::= SHOW INDEXES FROM db_name NK_DOT table_name",
- /* 254 */ "cmd ::= SHOW STREAMS",
- /* 255 */ "cmd ::= SHOW ACCOUNTS",
- /* 256 */ "cmd ::= SHOW APPS",
- /* 257 */ "cmd ::= SHOW CONNECTIONS",
- /* 258 */ "cmd ::= SHOW LICENCES",
- /* 259 */ "cmd ::= SHOW GRANTS",
- /* 260 */ "cmd ::= SHOW CREATE DATABASE db_name",
- /* 261 */ "cmd ::= SHOW CREATE TABLE full_table_name",
- /* 262 */ "cmd ::= SHOW CREATE STABLE full_table_name",
- /* 263 */ "cmd ::= SHOW QUERIES",
- /* 264 */ "cmd ::= SHOW SCORES",
- /* 265 */ "cmd ::= SHOW TOPICS",
- /* 266 */ "cmd ::= SHOW VARIABLES",
- /* 267 */ "cmd ::= SHOW CLUSTER VARIABLES",
- /* 268 */ "cmd ::= SHOW LOCAL VARIABLES",
- /* 269 */ "cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt",
- /* 270 */ "cmd ::= SHOW BNODES",
- /* 271 */ "cmd ::= SHOW SNODES",
- /* 272 */ "cmd ::= SHOW CLUSTER",
- /* 273 */ "cmd ::= SHOW TRANSACTIONS",
- /* 274 */ "cmd ::= SHOW TABLE DISTRIBUTED full_table_name",
- /* 275 */ "cmd ::= SHOW CONSUMERS",
- /* 276 */ "cmd ::= SHOW SUBSCRIPTIONS",
- /* 277 */ "cmd ::= SHOW TAGS FROM table_name_cond from_db_opt",
- /* 278 */ "cmd ::= SHOW TAGS FROM db_name NK_DOT table_name",
- /* 279 */ "cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt",
- /* 280 */ "cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name",
- /* 281 */ "cmd ::= SHOW VNODES ON DNODE NK_INTEGER",
- /* 282 */ "cmd ::= SHOW VNODES",
- /* 283 */ "cmd ::= SHOW db_name_cond_opt ALIVE",
- /* 284 */ "cmd ::= SHOW CLUSTER ALIVE",
- /* 285 */ "cmd ::= SHOW db_name_cond_opt VIEWS",
- /* 286 */ "cmd ::= SHOW CREATE VIEW full_table_name",
- /* 287 */ "cmd ::= SHOW COMPACTS",
- /* 288 */ "cmd ::= SHOW COMPACT NK_INTEGER",
- /* 289 */ "table_kind_db_name_cond_opt ::=",
- /* 290 */ "table_kind_db_name_cond_opt ::= table_kind",
- /* 291 */ "table_kind_db_name_cond_opt ::= db_name NK_DOT",
- /* 292 */ "table_kind_db_name_cond_opt ::= table_kind db_name NK_DOT",
- /* 293 */ "table_kind ::= NORMAL",
- /* 294 */ "table_kind ::= CHILD",
- /* 295 */ "db_name_cond_opt ::=",
- /* 296 */ "db_name_cond_opt ::= db_name NK_DOT",
- /* 297 */ "like_pattern_opt ::=",
- /* 298 */ "like_pattern_opt ::= LIKE NK_STRING",
- /* 299 */ "table_name_cond ::= table_name",
- /* 300 */ "from_db_opt ::=",
- /* 301 */ "from_db_opt ::= FROM db_name",
- /* 302 */ "tag_list_opt ::=",
- /* 303 */ "tag_list_opt ::= tag_item",
- /* 304 */ "tag_list_opt ::= tag_list_opt NK_COMMA tag_item",
- /* 305 */ "tag_item ::= TBNAME",
- /* 306 */ "tag_item ::= QTAGS",
- /* 307 */ "tag_item ::= column_name",
- /* 308 */ "tag_item ::= column_name column_alias",
- /* 309 */ "tag_item ::= column_name AS column_alias",
- /* 310 */ "db_kind_opt ::=",
- /* 311 */ "db_kind_opt ::= USER",
- /* 312 */ "db_kind_opt ::= SYSTEM",
- /* 313 */ "cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options",
- /* 314 */ "cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP",
- /* 315 */ "cmd ::= DROP INDEX exists_opt full_index_name",
- /* 316 */ "full_index_name ::= index_name",
- /* 317 */ "full_index_name ::= db_name NK_DOT index_name",
- /* 318 */ "index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt",
- /* 319 */ "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",
- /* 320 */ "func_list ::= func",
- /* 321 */ "func_list ::= func_list NK_COMMA func",
- /* 322 */ "func ::= sma_func_name NK_LP expression_list NK_RP",
- /* 323 */ "sma_func_name ::= function_name",
- /* 324 */ "sma_func_name ::= COUNT",
- /* 325 */ "sma_func_name ::= FIRST",
- /* 326 */ "sma_func_name ::= LAST",
- /* 327 */ "sma_func_name ::= LAST_ROW",
- /* 328 */ "sma_stream_opt ::=",
- /* 329 */ "sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal",
- /* 330 */ "sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal",
- /* 331 */ "sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal",
- /* 332 */ "with_meta ::= AS",
- /* 333 */ "with_meta ::= WITH META AS",
- /* 334 */ "with_meta ::= ONLY META AS",
- /* 335 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery",
- /* 336 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name",
- /* 337 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt",
- /* 338 */ "cmd ::= DROP TOPIC exists_opt topic_name",
- /* 339 */ "cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name",
- /* 340 */ "cmd ::= DESC full_table_name",
- /* 341 */ "cmd ::= DESCRIBE full_table_name",
- /* 342 */ "cmd ::= RESET QUERY CACHE",
- /* 343 */ "cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery",
- /* 344 */ "cmd ::= EXPLAIN analyze_opt explain_options insert_query",
- /* 345 */ "analyze_opt ::=",
- /* 346 */ "analyze_opt ::= ANALYZE",
- /* 347 */ "explain_options ::=",
- /* 348 */ "explain_options ::= explain_options VERBOSE NK_BOOL",
- /* 349 */ "explain_options ::= explain_options RATIO NK_FLOAT",
- /* 350 */ "cmd ::= CREATE or_replace_opt agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt language_opt",
- /* 351 */ "cmd ::= DROP FUNCTION exists_opt function_name",
- /* 352 */ "agg_func_opt ::=",
- /* 353 */ "agg_func_opt ::= AGGREGATE",
- /* 354 */ "bufsize_opt ::=",
- /* 355 */ "bufsize_opt ::= BUFSIZE NK_INTEGER",
- /* 356 */ "language_opt ::=",
- /* 357 */ "language_opt ::= LANGUAGE NK_STRING",
- /* 358 */ "or_replace_opt ::=",
- /* 359 */ "or_replace_opt ::= OR REPLACE",
- /* 360 */ "cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery",
- /* 361 */ "cmd ::= DROP VIEW exists_opt full_view_name",
- /* 362 */ "full_view_name ::= view_name",
- /* 363 */ "full_view_name ::= db_name NK_DOT view_name",
- /* 364 */ "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",
- /* 365 */ "cmd ::= DROP STREAM exists_opt stream_name",
- /* 366 */ "cmd ::= PAUSE STREAM exists_opt stream_name",
- /* 367 */ "cmd ::= RESUME STREAM exists_opt ignore_opt stream_name",
- /* 368 */ "col_list_opt ::=",
- /* 369 */ "col_list_opt ::= NK_LP col_name_list NK_RP",
- /* 370 */ "tag_def_or_ref_opt ::=",
- /* 371 */ "tag_def_or_ref_opt ::= tags_def",
- /* 372 */ "tag_def_or_ref_opt ::= TAGS NK_LP col_name_list NK_RP",
- /* 373 */ "stream_options ::=",
- /* 374 */ "stream_options ::= stream_options TRIGGER AT_ONCE",
- /* 375 */ "stream_options ::= stream_options TRIGGER WINDOW_CLOSE",
- /* 376 */ "stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal",
- /* 377 */ "stream_options ::= stream_options WATERMARK duration_literal",
- /* 378 */ "stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER",
- /* 379 */ "stream_options ::= stream_options FILL_HISTORY NK_INTEGER",
- /* 380 */ "stream_options ::= stream_options DELETE_MARK duration_literal",
- /* 381 */ "stream_options ::= stream_options IGNORE UPDATE NK_INTEGER",
- /* 382 */ "subtable_opt ::=",
- /* 383 */ "subtable_opt ::= SUBTABLE NK_LP expression NK_RP",
- /* 384 */ "ignore_opt ::=",
- /* 385 */ "ignore_opt ::= IGNORE UNTREATED",
- /* 386 */ "cmd ::= KILL CONNECTION NK_INTEGER",
- /* 387 */ "cmd ::= KILL QUERY NK_STRING",
- /* 388 */ "cmd ::= KILL TRANSACTION NK_INTEGER",
- /* 389 */ "cmd ::= KILL COMPACT NK_INTEGER",
- /* 390 */ "cmd ::= BALANCE VGROUP",
- /* 391 */ "cmd ::= BALANCE VGROUP LEADER on_vgroup_id",
- /* 392 */ "cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER",
- /* 393 */ "cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list",
- /* 394 */ "cmd ::= SPLIT VGROUP NK_INTEGER",
- /* 395 */ "on_vgroup_id ::=",
- /* 396 */ "on_vgroup_id ::= ON NK_INTEGER",
- /* 397 */ "dnode_list ::= DNODE NK_INTEGER",
- /* 398 */ "dnode_list ::= dnode_list DNODE NK_INTEGER",
- /* 399 */ "cmd ::= DELETE FROM full_table_name where_clause_opt",
- /* 400 */ "cmd ::= query_or_subquery",
- /* 401 */ "cmd ::= insert_query",
- /* 402 */ "insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery",
- /* 403 */ "insert_query ::= INSERT INTO full_table_name query_or_subquery",
- /* 404 */ "literal ::= NK_INTEGER",
- /* 405 */ "literal ::= NK_FLOAT",
- /* 406 */ "literal ::= NK_STRING",
- /* 407 */ "literal ::= NK_BOOL",
- /* 408 */ "literal ::= TIMESTAMP NK_STRING",
- /* 409 */ "literal ::= duration_literal",
- /* 410 */ "literal ::= NULL",
- /* 411 */ "literal ::= NK_QUESTION",
- /* 412 */ "duration_literal ::= NK_VARIABLE",
- /* 413 */ "signed ::= NK_INTEGER",
- /* 414 */ "signed ::= NK_PLUS NK_INTEGER",
- /* 415 */ "signed ::= NK_MINUS NK_INTEGER",
- /* 416 */ "signed ::= NK_FLOAT",
- /* 417 */ "signed ::= NK_PLUS NK_FLOAT",
- /* 418 */ "signed ::= NK_MINUS NK_FLOAT",
- /* 419 */ "signed_literal ::= signed",
- /* 420 */ "signed_literal ::= NK_STRING",
- /* 421 */ "signed_literal ::= NK_BOOL",
- /* 422 */ "signed_literal ::= TIMESTAMP NK_STRING",
- /* 423 */ "signed_literal ::= duration_literal",
- /* 424 */ "signed_literal ::= NULL",
- /* 425 */ "signed_literal ::= literal_func",
- /* 426 */ "signed_literal ::= NK_QUESTION",
- /* 427 */ "literal_list ::= signed_literal",
- /* 428 */ "literal_list ::= literal_list NK_COMMA signed_literal",
- /* 429 */ "db_name ::= NK_ID",
- /* 430 */ "table_name ::= NK_ID",
- /* 431 */ "column_name ::= NK_ID",
- /* 432 */ "function_name ::= NK_ID",
- /* 433 */ "view_name ::= NK_ID",
- /* 434 */ "table_alias ::= NK_ID",
- /* 435 */ "column_alias ::= NK_ID",
- /* 436 */ "column_alias ::= NK_ALIAS",
- /* 437 */ "user_name ::= NK_ID",
- /* 438 */ "topic_name ::= NK_ID",
- /* 439 */ "stream_name ::= NK_ID",
- /* 440 */ "cgroup_name ::= NK_ID",
- /* 441 */ "index_name ::= NK_ID",
- /* 442 */ "expr_or_subquery ::= expression",
- /* 443 */ "expression ::= literal",
- /* 444 */ "expression ::= pseudo_column",
- /* 445 */ "expression ::= column_reference",
- /* 446 */ "expression ::= function_expression",
- /* 447 */ "expression ::= case_when_expression",
- /* 448 */ "expression ::= NK_LP expression NK_RP",
- /* 449 */ "expression ::= NK_PLUS expr_or_subquery",
- /* 450 */ "expression ::= NK_MINUS expr_or_subquery",
- /* 451 */ "expression ::= expr_or_subquery NK_PLUS expr_or_subquery",
- /* 452 */ "expression ::= expr_or_subquery NK_MINUS expr_or_subquery",
- /* 453 */ "expression ::= expr_or_subquery NK_STAR expr_or_subquery",
- /* 454 */ "expression ::= expr_or_subquery NK_SLASH expr_or_subquery",
- /* 455 */ "expression ::= expr_or_subquery NK_REM expr_or_subquery",
- /* 456 */ "expression ::= column_reference NK_ARROW NK_STRING",
- /* 457 */ "expression ::= expr_or_subquery NK_BITAND expr_or_subquery",
- /* 458 */ "expression ::= expr_or_subquery NK_BITOR expr_or_subquery",
- /* 459 */ "expression_list ::= expr_or_subquery",
- /* 460 */ "expression_list ::= expression_list NK_COMMA expr_or_subquery",
- /* 461 */ "column_reference ::= column_name",
- /* 462 */ "column_reference ::= table_name NK_DOT column_name",
- /* 463 */ "column_reference ::= NK_ALIAS",
- /* 464 */ "column_reference ::= table_name NK_DOT NK_ALIAS",
- /* 465 */ "pseudo_column ::= ROWTS",
- /* 466 */ "pseudo_column ::= TBNAME",
- /* 467 */ "pseudo_column ::= table_name NK_DOT TBNAME",
- /* 468 */ "pseudo_column ::= QSTART",
- /* 469 */ "pseudo_column ::= QEND",
- /* 470 */ "pseudo_column ::= QDURATION",
- /* 471 */ "pseudo_column ::= WSTART",
- /* 472 */ "pseudo_column ::= WEND",
- /* 473 */ "pseudo_column ::= WDURATION",
- /* 474 */ "pseudo_column ::= IROWTS",
- /* 475 */ "pseudo_column ::= ISFILLED",
- /* 476 */ "pseudo_column ::= QTAGS",
- /* 477 */ "function_expression ::= function_name NK_LP expression_list NK_RP",
- /* 478 */ "function_expression ::= star_func NK_LP star_func_para_list NK_RP",
- /* 479 */ "function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP",
- /* 480 */ "function_expression ::= literal_func",
- /* 481 */ "literal_func ::= noarg_func NK_LP NK_RP",
- /* 482 */ "literal_func ::= NOW",
- /* 483 */ "noarg_func ::= NOW",
- /* 484 */ "noarg_func ::= TODAY",
- /* 485 */ "noarg_func ::= TIMEZONE",
- /* 486 */ "noarg_func ::= DATABASE",
- /* 487 */ "noarg_func ::= CLIENT_VERSION",
- /* 488 */ "noarg_func ::= SERVER_VERSION",
- /* 489 */ "noarg_func ::= SERVER_STATUS",
- /* 490 */ "noarg_func ::= CURRENT_USER",
- /* 491 */ "noarg_func ::= USER",
- /* 492 */ "star_func ::= COUNT",
- /* 493 */ "star_func ::= FIRST",
- /* 494 */ "star_func ::= LAST",
- /* 495 */ "star_func ::= LAST_ROW",
- /* 496 */ "star_func_para_list ::= NK_STAR",
- /* 497 */ "star_func_para_list ::= other_para_list",
- /* 498 */ "other_para_list ::= star_func_para",
- /* 499 */ "other_para_list ::= other_para_list NK_COMMA star_func_para",
- /* 500 */ "star_func_para ::= expr_or_subquery",
- /* 501 */ "star_func_para ::= table_name NK_DOT NK_STAR",
- /* 502 */ "case_when_expression ::= CASE when_then_list case_when_else_opt END",
- /* 503 */ "case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END",
- /* 504 */ "when_then_list ::= when_then_expr",
- /* 505 */ "when_then_list ::= when_then_list when_then_expr",
- /* 506 */ "when_then_expr ::= WHEN common_expression THEN common_expression",
- /* 507 */ "case_when_else_opt ::=",
- /* 508 */ "case_when_else_opt ::= ELSE common_expression",
- /* 509 */ "predicate ::= expr_or_subquery compare_op expr_or_subquery",
- /* 510 */ "predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery",
- /* 511 */ "predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery",
- /* 512 */ "predicate ::= expr_or_subquery IS NULL",
- /* 513 */ "predicate ::= expr_or_subquery IS NOT NULL",
- /* 514 */ "predicate ::= expr_or_subquery in_op in_predicate_value",
- /* 515 */ "compare_op ::= NK_LT",
- /* 516 */ "compare_op ::= NK_GT",
- /* 517 */ "compare_op ::= NK_LE",
- /* 518 */ "compare_op ::= NK_GE",
- /* 519 */ "compare_op ::= NK_NE",
- /* 520 */ "compare_op ::= NK_EQ",
- /* 521 */ "compare_op ::= LIKE",
- /* 522 */ "compare_op ::= NOT LIKE",
- /* 523 */ "compare_op ::= MATCH",
- /* 524 */ "compare_op ::= NMATCH",
- /* 525 */ "compare_op ::= CONTAINS",
- /* 526 */ "in_op ::= IN",
- /* 527 */ "in_op ::= NOT IN",
- /* 528 */ "in_predicate_value ::= NK_LP literal_list NK_RP",
- /* 529 */ "boolean_value_expression ::= boolean_primary",
- /* 530 */ "boolean_value_expression ::= NOT boolean_primary",
- /* 531 */ "boolean_value_expression ::= boolean_value_expression OR boolean_value_expression",
- /* 532 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression",
- /* 533 */ "boolean_primary ::= predicate",
- /* 534 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP",
- /* 535 */ "common_expression ::= expr_or_subquery",
- /* 536 */ "common_expression ::= boolean_value_expression",
- /* 537 */ "from_clause_opt ::=",
- /* 538 */ "from_clause_opt ::= FROM table_reference_list",
- /* 539 */ "table_reference_list ::= table_reference",
- /* 540 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference",
- /* 541 */ "table_reference ::= table_primary",
- /* 542 */ "table_reference ::= joined_table",
- /* 543 */ "table_primary ::= table_name alias_opt",
- /* 544 */ "table_primary ::= db_name NK_DOT table_name alias_opt",
- /* 545 */ "table_primary ::= subquery alias_opt",
- /* 546 */ "table_primary ::= parenthesized_joined_table",
- /* 547 */ "alias_opt ::=",
- /* 548 */ "alias_opt ::= table_alias",
- /* 549 */ "alias_opt ::= AS table_alias",
- /* 550 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP",
- /* 551 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP",
- /* 552 */ "joined_table ::= table_reference join_type JOIN table_reference ON search_condition",
- /* 553 */ "join_type ::=",
- /* 554 */ "join_type ::= INNER",
- /* 555 */ "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",
- /* 556 */ "hint_list ::=",
- /* 557 */ "hint_list ::= NK_HINT",
- /* 558 */ "tag_mode_opt ::=",
- /* 559 */ "tag_mode_opt ::= TAGS",
- /* 560 */ "set_quantifier_opt ::=",
- /* 561 */ "set_quantifier_opt ::= DISTINCT",
- /* 562 */ "set_quantifier_opt ::= ALL",
- /* 563 */ "select_list ::= select_item",
- /* 564 */ "select_list ::= select_list NK_COMMA select_item",
- /* 565 */ "select_item ::= NK_STAR",
- /* 566 */ "select_item ::= common_expression",
- /* 567 */ "select_item ::= common_expression column_alias",
- /* 568 */ "select_item ::= common_expression AS column_alias",
- /* 569 */ "select_item ::= table_name NK_DOT NK_STAR",
- /* 570 */ "where_clause_opt ::=",
- /* 571 */ "where_clause_opt ::= WHERE search_condition",
- /* 572 */ "partition_by_clause_opt ::=",
- /* 573 */ "partition_by_clause_opt ::= PARTITION BY partition_list",
- /* 574 */ "partition_list ::= partition_item",
- /* 575 */ "partition_list ::= partition_list NK_COMMA partition_item",
- /* 576 */ "partition_item ::= expr_or_subquery",
- /* 577 */ "partition_item ::= expr_or_subquery column_alias",
- /* 578 */ "partition_item ::= expr_or_subquery AS column_alias",
- /* 579 */ "twindow_clause_opt ::=",
- /* 580 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP",
- /* 581 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP",
- /* 582 */ "twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt",
- /* 583 */ "twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_COMMA interval_sliding_duration_literal NK_RP sliding_opt fill_opt",
- /* 584 */ "twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition",
- /* 585 */ "sliding_opt ::=",
- /* 586 */ "sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP",
- /* 587 */ "interval_sliding_duration_literal ::= NK_VARIABLE",
- /* 588 */ "interval_sliding_duration_literal ::= NK_STRING",
- /* 589 */ "interval_sliding_duration_literal ::= NK_INTEGER",
- /* 590 */ "fill_opt ::=",
- /* 591 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP",
- /* 592 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP",
- /* 593 */ "fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP",
- /* 594 */ "fill_mode ::= NONE",
- /* 595 */ "fill_mode ::= PREV",
- /* 596 */ "fill_mode ::= NULL",
- /* 597 */ "fill_mode ::= NULL_F",
- /* 598 */ "fill_mode ::= LINEAR",
- /* 599 */ "fill_mode ::= NEXT",
- /* 600 */ "group_by_clause_opt ::=",
- /* 601 */ "group_by_clause_opt ::= GROUP BY group_by_list",
- /* 602 */ "group_by_list ::= expr_or_subquery",
- /* 603 */ "group_by_list ::= group_by_list NK_COMMA expr_or_subquery",
- /* 604 */ "having_clause_opt ::=",
- /* 605 */ "having_clause_opt ::= HAVING search_condition",
- /* 606 */ "range_opt ::=",
- /* 607 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP",
- /* 608 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_RP",
- /* 609 */ "every_opt ::=",
- /* 610 */ "every_opt ::= EVERY NK_LP duration_literal NK_RP",
- /* 611 */ "query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt",
- /* 612 */ "query_simple ::= query_specification",
- /* 613 */ "query_simple ::= union_query_expression",
- /* 614 */ "union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery",
- /* 615 */ "union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery",
- /* 616 */ "query_simple_or_subquery ::= query_simple",
- /* 617 */ "query_simple_or_subquery ::= subquery",
- /* 618 */ "query_or_subquery ::= query_expression",
- /* 619 */ "query_or_subquery ::= subquery",
- /* 620 */ "order_by_clause_opt ::=",
- /* 621 */ "order_by_clause_opt ::= ORDER BY sort_specification_list",
- /* 622 */ "slimit_clause_opt ::=",
- /* 623 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER",
- /* 624 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER",
- /* 625 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER",
- /* 626 */ "limit_clause_opt ::=",
- /* 627 */ "limit_clause_opt ::= LIMIT NK_INTEGER",
- /* 628 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER",
- /* 629 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER",
- /* 630 */ "subquery ::= NK_LP query_expression NK_RP",
- /* 631 */ "subquery ::= NK_LP subquery NK_RP",
- /* 632 */ "search_condition ::= common_expression",
- /* 633 */ "sort_specification_list ::= sort_specification",
- /* 634 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification",
- /* 635 */ "sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt",
- /* 636 */ "ordering_specification_opt ::=",
- /* 637 */ "ordering_specification_opt ::= ASC",
- /* 638 */ "ordering_specification_opt ::= DESC",
- /* 639 */ "null_ordering_opt ::=",
- /* 640 */ "null_ordering_opt ::= NULLS FIRST",
- /* 641 */ "null_ordering_opt ::= NULLS LAST",
+ /* 71 */ "cmd ::= ALTER CLUSTER NK_STRING",
+ /* 72 */ "cmd ::= ALTER CLUSTER NK_STRING NK_STRING",
+ /* 73 */ "cmd ::= ALTER LOCAL NK_STRING",
+ /* 74 */ "cmd ::= ALTER LOCAL NK_STRING NK_STRING",
+ /* 75 */ "cmd ::= CREATE QNODE ON DNODE NK_INTEGER",
+ /* 76 */ "cmd ::= DROP QNODE ON DNODE NK_INTEGER",
+ /* 77 */ "cmd ::= RESTORE QNODE ON DNODE NK_INTEGER",
+ /* 78 */ "cmd ::= CREATE BNODE ON DNODE NK_INTEGER",
+ /* 79 */ "cmd ::= DROP BNODE ON DNODE NK_INTEGER",
+ /* 80 */ "cmd ::= CREATE SNODE ON DNODE NK_INTEGER",
+ /* 81 */ "cmd ::= DROP SNODE ON DNODE NK_INTEGER",
+ /* 82 */ "cmd ::= CREATE MNODE ON DNODE NK_INTEGER",
+ /* 83 */ "cmd ::= DROP MNODE ON DNODE NK_INTEGER",
+ /* 84 */ "cmd ::= RESTORE MNODE ON DNODE NK_INTEGER",
+ /* 85 */ "cmd ::= RESTORE VNODE ON DNODE NK_INTEGER",
+ /* 86 */ "cmd ::= CREATE DATABASE not_exists_opt db_name db_options",
+ /* 87 */ "cmd ::= DROP DATABASE exists_opt db_name",
+ /* 88 */ "cmd ::= USE db_name",
+ /* 89 */ "cmd ::= ALTER DATABASE db_name alter_db_options",
+ /* 90 */ "cmd ::= FLUSH DATABASE db_name",
+ /* 91 */ "cmd ::= TRIM DATABASE db_name speed_opt",
+ /* 92 */ "cmd ::= COMPACT DATABASE db_name start_opt end_opt",
+ /* 93 */ "not_exists_opt ::= IF NOT EXISTS",
+ /* 94 */ "not_exists_opt ::=",
+ /* 95 */ "exists_opt ::= IF EXISTS",
+ /* 96 */ "exists_opt ::=",
+ /* 97 */ "db_options ::=",
+ /* 98 */ "db_options ::= db_options BUFFER NK_INTEGER",
+ /* 99 */ "db_options ::= db_options CACHEMODEL NK_STRING",
+ /* 100 */ "db_options ::= db_options CACHESIZE NK_INTEGER",
+ /* 101 */ "db_options ::= db_options COMP NK_INTEGER",
+ /* 102 */ "db_options ::= db_options DURATION NK_INTEGER",
+ /* 103 */ "db_options ::= db_options DURATION NK_VARIABLE",
+ /* 104 */ "db_options ::= db_options MAXROWS NK_INTEGER",
+ /* 105 */ "db_options ::= db_options MINROWS NK_INTEGER",
+ /* 106 */ "db_options ::= db_options KEEP integer_list",
+ /* 107 */ "db_options ::= db_options KEEP variable_list",
+ /* 108 */ "db_options ::= db_options PAGES NK_INTEGER",
+ /* 109 */ "db_options ::= db_options PAGESIZE NK_INTEGER",
+ /* 110 */ "db_options ::= db_options TSDB_PAGESIZE NK_INTEGER",
+ /* 111 */ "db_options ::= db_options PRECISION NK_STRING",
+ /* 112 */ "db_options ::= db_options REPLICA NK_INTEGER",
+ /* 113 */ "db_options ::= db_options VGROUPS NK_INTEGER",
+ /* 114 */ "db_options ::= db_options SINGLE_STABLE NK_INTEGER",
+ /* 115 */ "db_options ::= db_options RETENTIONS retention_list",
+ /* 116 */ "db_options ::= db_options SCHEMALESS NK_INTEGER",
+ /* 117 */ "db_options ::= db_options WAL_LEVEL NK_INTEGER",
+ /* 118 */ "db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER",
+ /* 119 */ "db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER",
+ /* 120 */ "db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER",
+ /* 121 */ "db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER",
+ /* 122 */ "db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER",
+ /* 123 */ "db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER",
+ /* 124 */ "db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER",
+ /* 125 */ "db_options ::= db_options STT_TRIGGER NK_INTEGER",
+ /* 126 */ "db_options ::= db_options TABLE_PREFIX signed",
+ /* 127 */ "db_options ::= db_options TABLE_SUFFIX signed",
+ /* 128 */ "db_options ::= db_options KEEP_TIME_OFFSET NK_INTEGER",
+ /* 129 */ "alter_db_options ::= alter_db_option",
+ /* 130 */ "alter_db_options ::= alter_db_options alter_db_option",
+ /* 131 */ "alter_db_option ::= BUFFER NK_INTEGER",
+ /* 132 */ "alter_db_option ::= CACHEMODEL NK_STRING",
+ /* 133 */ "alter_db_option ::= CACHESIZE NK_INTEGER",
+ /* 134 */ "alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER",
+ /* 135 */ "alter_db_option ::= KEEP integer_list",
+ /* 136 */ "alter_db_option ::= KEEP variable_list",
+ /* 137 */ "alter_db_option ::= PAGES NK_INTEGER",
+ /* 138 */ "alter_db_option ::= REPLICA NK_INTEGER",
+ /* 139 */ "alter_db_option ::= WAL_LEVEL NK_INTEGER",
+ /* 140 */ "alter_db_option ::= STT_TRIGGER NK_INTEGER",
+ /* 141 */ "alter_db_option ::= MINROWS NK_INTEGER",
+ /* 142 */ "alter_db_option ::= WAL_RETENTION_PERIOD NK_INTEGER",
+ /* 143 */ "alter_db_option ::= WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER",
+ /* 144 */ "alter_db_option ::= WAL_RETENTION_SIZE NK_INTEGER",
+ /* 145 */ "alter_db_option ::= WAL_RETENTION_SIZE NK_MINUS NK_INTEGER",
+ /* 146 */ "alter_db_option ::= KEEP_TIME_OFFSET NK_INTEGER",
+ /* 147 */ "integer_list ::= NK_INTEGER",
+ /* 148 */ "integer_list ::= integer_list NK_COMMA NK_INTEGER",
+ /* 149 */ "variable_list ::= NK_VARIABLE",
+ /* 150 */ "variable_list ::= variable_list NK_COMMA NK_VARIABLE",
+ /* 151 */ "retention_list ::= retention",
+ /* 152 */ "retention_list ::= retention_list NK_COMMA retention",
+ /* 153 */ "retention ::= NK_VARIABLE NK_COLON NK_VARIABLE",
+ /* 154 */ "retention ::= NK_MINUS NK_COLON NK_VARIABLE",
+ /* 155 */ "speed_opt ::=",
+ /* 156 */ "speed_opt ::= BWLIMIT NK_INTEGER",
+ /* 157 */ "start_opt ::=",
+ /* 158 */ "start_opt ::= START WITH NK_INTEGER",
+ /* 159 */ "start_opt ::= START WITH NK_STRING",
+ /* 160 */ "start_opt ::= START WITH TIMESTAMP NK_STRING",
+ /* 161 */ "end_opt ::=",
+ /* 162 */ "end_opt ::= END WITH NK_INTEGER",
+ /* 163 */ "end_opt ::= END WITH NK_STRING",
+ /* 164 */ "end_opt ::= END WITH TIMESTAMP NK_STRING",
+ /* 165 */ "cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options",
+ /* 166 */ "cmd ::= CREATE TABLE multi_create_clause",
+ /* 167 */ "cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options",
+ /* 168 */ "cmd ::= DROP TABLE multi_drop_clause",
+ /* 169 */ "cmd ::= DROP STABLE exists_opt full_table_name",
+ /* 170 */ "cmd ::= ALTER TABLE alter_table_clause",
+ /* 171 */ "cmd ::= ALTER STABLE alter_table_clause",
+ /* 172 */ "alter_table_clause ::= full_table_name alter_table_options",
+ /* 173 */ "alter_table_clause ::= full_table_name ADD COLUMN column_name type_name",
+ /* 174 */ "alter_table_clause ::= full_table_name DROP COLUMN column_name",
+ /* 175 */ "alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name",
+ /* 176 */ "alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name",
+ /* 177 */ "alter_table_clause ::= full_table_name ADD TAG column_name type_name",
+ /* 178 */ "alter_table_clause ::= full_table_name DROP TAG column_name",
+ /* 179 */ "alter_table_clause ::= full_table_name MODIFY TAG column_name type_name",
+ /* 180 */ "alter_table_clause ::= full_table_name RENAME TAG column_name column_name",
+ /* 181 */ "alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal",
+ /* 182 */ "multi_create_clause ::= create_subtable_clause",
+ /* 183 */ "multi_create_clause ::= multi_create_clause create_subtable_clause",
+ /* 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",
+ /* 185 */ "multi_drop_clause ::= drop_table_clause",
+ /* 186 */ "multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause",
+ /* 187 */ "drop_table_clause ::= exists_opt full_table_name",
+ /* 188 */ "specific_cols_opt ::=",
+ /* 189 */ "specific_cols_opt ::= NK_LP col_name_list NK_RP",
+ /* 190 */ "full_table_name ::= table_name",
+ /* 191 */ "full_table_name ::= db_name NK_DOT table_name",
+ /* 192 */ "column_def_list ::= column_def",
+ /* 193 */ "column_def_list ::= column_def_list NK_COMMA column_def",
+ /* 194 */ "column_def ::= column_name type_name",
+ /* 195 */ "type_name ::= BOOL",
+ /* 196 */ "type_name ::= TINYINT",
+ /* 197 */ "type_name ::= SMALLINT",
+ /* 198 */ "type_name ::= INT",
+ /* 199 */ "type_name ::= INTEGER",
+ /* 200 */ "type_name ::= BIGINT",
+ /* 201 */ "type_name ::= FLOAT",
+ /* 202 */ "type_name ::= DOUBLE",
+ /* 203 */ "type_name ::= BINARY NK_LP NK_INTEGER NK_RP",
+ /* 204 */ "type_name ::= TIMESTAMP",
+ /* 205 */ "type_name ::= NCHAR NK_LP NK_INTEGER NK_RP",
+ /* 206 */ "type_name ::= TINYINT UNSIGNED",
+ /* 207 */ "type_name ::= SMALLINT UNSIGNED",
+ /* 208 */ "type_name ::= INT UNSIGNED",
+ /* 209 */ "type_name ::= BIGINT UNSIGNED",
+ /* 210 */ "type_name ::= JSON",
+ /* 211 */ "type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP",
+ /* 212 */ "type_name ::= MEDIUMBLOB",
+ /* 213 */ "type_name ::= BLOB",
+ /* 214 */ "type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP",
+ /* 215 */ "type_name ::= GEOMETRY NK_LP NK_INTEGER NK_RP",
+ /* 216 */ "type_name ::= DECIMAL",
+ /* 217 */ "type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP",
+ /* 218 */ "type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP",
+ /* 219 */ "tags_def_opt ::=",
+ /* 220 */ "tags_def_opt ::= tags_def",
+ /* 221 */ "tags_def ::= TAGS NK_LP column_def_list NK_RP",
+ /* 222 */ "table_options ::=",
+ /* 223 */ "table_options ::= table_options COMMENT NK_STRING",
+ /* 224 */ "table_options ::= table_options MAX_DELAY duration_list",
+ /* 225 */ "table_options ::= table_options WATERMARK duration_list",
+ /* 226 */ "table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP",
+ /* 227 */ "table_options ::= table_options TTL NK_INTEGER",
+ /* 228 */ "table_options ::= table_options SMA NK_LP col_name_list NK_RP",
+ /* 229 */ "table_options ::= table_options DELETE_MARK duration_list",
+ /* 230 */ "alter_table_options ::= alter_table_option",
+ /* 231 */ "alter_table_options ::= alter_table_options alter_table_option",
+ /* 232 */ "alter_table_option ::= COMMENT NK_STRING",
+ /* 233 */ "alter_table_option ::= TTL NK_INTEGER",
+ /* 234 */ "duration_list ::= duration_literal",
+ /* 235 */ "duration_list ::= duration_list NK_COMMA duration_literal",
+ /* 236 */ "rollup_func_list ::= rollup_func_name",
+ /* 237 */ "rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name",
+ /* 238 */ "rollup_func_name ::= function_name",
+ /* 239 */ "rollup_func_name ::= FIRST",
+ /* 240 */ "rollup_func_name ::= LAST",
+ /* 241 */ "col_name_list ::= col_name",
+ /* 242 */ "col_name_list ::= col_name_list NK_COMMA col_name",
+ /* 243 */ "col_name ::= column_name",
+ /* 244 */ "cmd ::= SHOW DNODES",
+ /* 245 */ "cmd ::= SHOW USERS",
+ /* 246 */ "cmd ::= SHOW USER PRIVILEGES",
+ /* 247 */ "cmd ::= SHOW db_kind_opt DATABASES",
+ /* 248 */ "cmd ::= SHOW table_kind_db_name_cond_opt TABLES like_pattern_opt",
+ /* 249 */ "cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt",
+ /* 250 */ "cmd ::= SHOW db_name_cond_opt VGROUPS",
+ /* 251 */ "cmd ::= SHOW MNODES",
+ /* 252 */ "cmd ::= SHOW QNODES",
+ /* 253 */ "cmd ::= SHOW FUNCTIONS",
+ /* 254 */ "cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt",
+ /* 255 */ "cmd ::= SHOW INDEXES FROM db_name NK_DOT table_name",
+ /* 256 */ "cmd ::= SHOW STREAMS",
+ /* 257 */ "cmd ::= SHOW ACCOUNTS",
+ /* 258 */ "cmd ::= SHOW APPS",
+ /* 259 */ "cmd ::= SHOW CONNECTIONS",
+ /* 260 */ "cmd ::= SHOW LICENCES",
+ /* 261 */ "cmd ::= SHOW GRANTS",
+ /* 262 */ "cmd ::= SHOW GRANTS FULL",
+ /* 263 */ "cmd ::= SHOW GRANTS LOGS",
+ /* 264 */ "cmd ::= SHOW CLUSTER MACHINES",
+ /* 265 */ "cmd ::= SHOW CREATE DATABASE db_name",
+ /* 266 */ "cmd ::= SHOW CREATE TABLE full_table_name",
+ /* 267 */ "cmd ::= SHOW CREATE STABLE full_table_name",
+ /* 268 */ "cmd ::= SHOW QUERIES",
+ /* 269 */ "cmd ::= SHOW SCORES",
+ /* 270 */ "cmd ::= SHOW TOPICS",
+ /* 271 */ "cmd ::= SHOW VARIABLES",
+ /* 272 */ "cmd ::= SHOW CLUSTER VARIABLES",
+ /* 273 */ "cmd ::= SHOW LOCAL VARIABLES",
+ /* 274 */ "cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt",
+ /* 275 */ "cmd ::= SHOW BNODES",
+ /* 276 */ "cmd ::= SHOW SNODES",
+ /* 277 */ "cmd ::= SHOW CLUSTER",
+ /* 278 */ "cmd ::= SHOW TRANSACTIONS",
+ /* 279 */ "cmd ::= SHOW TABLE DISTRIBUTED full_table_name",
+ /* 280 */ "cmd ::= SHOW CONSUMERS",
+ /* 281 */ "cmd ::= SHOW SUBSCRIPTIONS",
+ /* 282 */ "cmd ::= SHOW TAGS FROM table_name_cond from_db_opt",
+ /* 283 */ "cmd ::= SHOW TAGS FROM db_name NK_DOT table_name",
+ /* 284 */ "cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt",
+ /* 285 */ "cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name",
+ /* 286 */ "cmd ::= SHOW VNODES ON DNODE NK_INTEGER",
+ /* 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",
+ /* 291 */ "cmd ::= SHOW CREATE VIEW full_table_name",
+ /* 292 */ "cmd ::= SHOW COMPACTS",
+ /* 293 */ "cmd ::= SHOW COMPACT NK_INTEGER",
+ /* 294 */ "table_kind_db_name_cond_opt ::=",
+ /* 295 */ "table_kind_db_name_cond_opt ::= table_kind",
+ /* 296 */ "table_kind_db_name_cond_opt ::= db_name NK_DOT",
+ /* 297 */ "table_kind_db_name_cond_opt ::= table_kind db_name NK_DOT",
+ /* 298 */ "table_kind ::= NORMAL",
+ /* 299 */ "table_kind ::= CHILD",
+ /* 300 */ "db_name_cond_opt ::=",
+ /* 301 */ "db_name_cond_opt ::= db_name NK_DOT",
+ /* 302 */ "like_pattern_opt ::=",
+ /* 303 */ "like_pattern_opt ::= LIKE NK_STRING",
+ /* 304 */ "table_name_cond ::= table_name",
+ /* 305 */ "from_db_opt ::=",
+ /* 306 */ "from_db_opt ::= FROM db_name",
+ /* 307 */ "tag_list_opt ::=",
+ /* 308 */ "tag_list_opt ::= tag_item",
+ /* 309 */ "tag_list_opt ::= tag_list_opt NK_COMMA tag_item",
+ /* 310 */ "tag_item ::= TBNAME",
+ /* 311 */ "tag_item ::= QTAGS",
+ /* 312 */ "tag_item ::= column_name",
+ /* 313 */ "tag_item ::= column_name column_alias",
+ /* 314 */ "tag_item ::= column_name AS column_alias",
+ /* 315 */ "db_kind_opt ::=",
+ /* 316 */ "db_kind_opt ::= USER",
+ /* 317 */ "db_kind_opt ::= SYSTEM",
+ /* 318 */ "cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options",
+ /* 319 */ "cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP",
+ /* 320 */ "cmd ::= DROP INDEX exists_opt full_index_name",
+ /* 321 */ "full_index_name ::= index_name",
+ /* 322 */ "full_index_name ::= db_name NK_DOT index_name",
+ /* 323 */ "index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt",
+ /* 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",
+ /* 325 */ "func_list ::= func",
+ /* 326 */ "func_list ::= func_list NK_COMMA func",
+ /* 327 */ "func ::= sma_func_name NK_LP expression_list NK_RP",
+ /* 328 */ "sma_func_name ::= function_name",
+ /* 329 */ "sma_func_name ::= COUNT",
+ /* 330 */ "sma_func_name ::= FIRST",
+ /* 331 */ "sma_func_name ::= LAST",
+ /* 332 */ "sma_func_name ::= LAST_ROW",
+ /* 333 */ "sma_stream_opt ::=",
+ /* 334 */ "sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal",
+ /* 335 */ "sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal",
+ /* 336 */ "sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal",
+ /* 337 */ "with_meta ::= AS",
+ /* 338 */ "with_meta ::= WITH META AS",
+ /* 339 */ "with_meta ::= ONLY META AS",
+ /* 340 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery",
+ /* 341 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name",
+ /* 342 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt",
+ /* 343 */ "cmd ::= DROP TOPIC exists_opt topic_name",
+ /* 344 */ "cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name",
+ /* 345 */ "cmd ::= DESC full_table_name",
+ /* 346 */ "cmd ::= DESCRIBE full_table_name",
+ /* 347 */ "cmd ::= RESET QUERY CACHE",
+ /* 348 */ "cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery",
+ /* 349 */ "cmd ::= EXPLAIN analyze_opt explain_options insert_query",
+ /* 350 */ "analyze_opt ::=",
+ /* 351 */ "analyze_opt ::= ANALYZE",
+ /* 352 */ "explain_options ::=",
+ /* 353 */ "explain_options ::= explain_options VERBOSE NK_BOOL",
+ /* 354 */ "explain_options ::= explain_options RATIO NK_FLOAT",
+ /* 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",
+ /* 356 */ "cmd ::= DROP FUNCTION exists_opt function_name",
+ /* 357 */ "agg_func_opt ::=",
+ /* 358 */ "agg_func_opt ::= AGGREGATE",
+ /* 359 */ "bufsize_opt ::=",
+ /* 360 */ "bufsize_opt ::= BUFSIZE NK_INTEGER",
+ /* 361 */ "language_opt ::=",
+ /* 362 */ "language_opt ::= LANGUAGE NK_STRING",
+ /* 363 */ "or_replace_opt ::=",
+ /* 364 */ "or_replace_opt ::= OR REPLACE",
+ /* 365 */ "cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery",
+ /* 366 */ "cmd ::= DROP VIEW exists_opt full_view_name",
+ /* 367 */ "full_view_name ::= view_name",
+ /* 368 */ "full_view_name ::= db_name NK_DOT view_name",
+ /* 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",
+ /* 370 */ "cmd ::= DROP STREAM exists_opt stream_name",
+ /* 371 */ "cmd ::= PAUSE STREAM exists_opt stream_name",
+ /* 372 */ "cmd ::= RESUME STREAM exists_opt ignore_opt stream_name",
+ /* 373 */ "col_list_opt ::=",
+ /* 374 */ "col_list_opt ::= NK_LP col_name_list NK_RP",
+ /* 375 */ "tag_def_or_ref_opt ::=",
+ /* 376 */ "tag_def_or_ref_opt ::= tags_def",
+ /* 377 */ "tag_def_or_ref_opt ::= TAGS NK_LP col_name_list NK_RP",
+ /* 378 */ "stream_options ::=",
+ /* 379 */ "stream_options ::= stream_options TRIGGER AT_ONCE",
+ /* 380 */ "stream_options ::= stream_options TRIGGER WINDOW_CLOSE",
+ /* 381 */ "stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal",
+ /* 382 */ "stream_options ::= stream_options WATERMARK duration_literal",
+ /* 383 */ "stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER",
+ /* 384 */ "stream_options ::= stream_options FILL_HISTORY NK_INTEGER",
+ /* 385 */ "stream_options ::= stream_options DELETE_MARK duration_literal",
+ /* 386 */ "stream_options ::= stream_options IGNORE UPDATE NK_INTEGER",
+ /* 387 */ "subtable_opt ::=",
+ /* 388 */ "subtable_opt ::= SUBTABLE NK_LP expression NK_RP",
+ /* 389 */ "ignore_opt ::=",
+ /* 390 */ "ignore_opt ::= IGNORE UNTREATED",
+ /* 391 */ "cmd ::= KILL CONNECTION NK_INTEGER",
+ /* 392 */ "cmd ::= KILL QUERY NK_STRING",
+ /* 393 */ "cmd ::= KILL TRANSACTION NK_INTEGER",
+ /* 394 */ "cmd ::= KILL COMPACT NK_INTEGER",
+ /* 395 */ "cmd ::= BALANCE VGROUP",
+ /* 396 */ "cmd ::= BALANCE VGROUP LEADER on_vgroup_id",
+ /* 397 */ "cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER",
+ /* 398 */ "cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list",
+ /* 399 */ "cmd ::= SPLIT VGROUP NK_INTEGER",
+ /* 400 */ "on_vgroup_id ::=",
+ /* 401 */ "on_vgroup_id ::= ON NK_INTEGER",
+ /* 402 */ "dnode_list ::= DNODE NK_INTEGER",
+ /* 403 */ "dnode_list ::= dnode_list DNODE NK_INTEGER",
+ /* 404 */ "cmd ::= DELETE FROM full_table_name where_clause_opt",
+ /* 405 */ "cmd ::= query_or_subquery",
+ /* 406 */ "cmd ::= insert_query",
+ /* 407 */ "insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery",
+ /* 408 */ "insert_query ::= INSERT INTO full_table_name query_or_subquery",
+ /* 409 */ "literal ::= NK_INTEGER",
+ /* 410 */ "literal ::= NK_FLOAT",
+ /* 411 */ "literal ::= NK_STRING",
+ /* 412 */ "literal ::= NK_BOOL",
+ /* 413 */ "literal ::= TIMESTAMP NK_STRING",
+ /* 414 */ "literal ::= duration_literal",
+ /* 415 */ "literal ::= NULL",
+ /* 416 */ "literal ::= NK_QUESTION",
+ /* 417 */ "duration_literal ::= NK_VARIABLE",
+ /* 418 */ "signed ::= NK_INTEGER",
+ /* 419 */ "signed ::= NK_PLUS NK_INTEGER",
+ /* 420 */ "signed ::= NK_MINUS NK_INTEGER",
+ /* 421 */ "signed ::= NK_FLOAT",
+ /* 422 */ "signed ::= NK_PLUS NK_FLOAT",
+ /* 423 */ "signed ::= NK_MINUS NK_FLOAT",
+ /* 424 */ "signed_literal ::= signed",
+ /* 425 */ "signed_literal ::= NK_STRING",
+ /* 426 */ "signed_literal ::= NK_BOOL",
+ /* 427 */ "signed_literal ::= TIMESTAMP NK_STRING",
+ /* 428 */ "signed_literal ::= duration_literal",
+ /* 429 */ "signed_literal ::= NULL",
+ /* 430 */ "signed_literal ::= literal_func",
+ /* 431 */ "signed_literal ::= NK_QUESTION",
+ /* 432 */ "literal_list ::= signed_literal",
+ /* 433 */ "literal_list ::= literal_list NK_COMMA signed_literal",
+ /* 434 */ "db_name ::= NK_ID",
+ /* 435 */ "table_name ::= NK_ID",
+ /* 436 */ "column_name ::= NK_ID",
+ /* 437 */ "function_name ::= NK_ID",
+ /* 438 */ "view_name ::= NK_ID",
+ /* 439 */ "table_alias ::= NK_ID",
+ /* 440 */ "column_alias ::= NK_ID",
+ /* 441 */ "column_alias ::= NK_ALIAS",
+ /* 442 */ "user_name ::= NK_ID",
+ /* 443 */ "topic_name ::= NK_ID",
+ /* 444 */ "stream_name ::= NK_ID",
+ /* 445 */ "cgroup_name ::= NK_ID",
+ /* 446 */ "index_name ::= NK_ID",
+ /* 447 */ "expr_or_subquery ::= expression",
+ /* 448 */ "expression ::= literal",
+ /* 449 */ "expression ::= pseudo_column",
+ /* 450 */ "expression ::= column_reference",
+ /* 451 */ "expression ::= function_expression",
+ /* 452 */ "expression ::= case_when_expression",
+ /* 453 */ "expression ::= NK_LP expression NK_RP",
+ /* 454 */ "expression ::= NK_PLUS expr_or_subquery",
+ /* 455 */ "expression ::= NK_MINUS expr_or_subquery",
+ /* 456 */ "expression ::= expr_or_subquery NK_PLUS expr_or_subquery",
+ /* 457 */ "expression ::= expr_or_subquery NK_MINUS expr_or_subquery",
+ /* 458 */ "expression ::= expr_or_subquery NK_STAR expr_or_subquery",
+ /* 459 */ "expression ::= expr_or_subquery NK_SLASH expr_or_subquery",
+ /* 460 */ "expression ::= expr_or_subquery NK_REM expr_or_subquery",
+ /* 461 */ "expression ::= column_reference NK_ARROW NK_STRING",
+ /* 462 */ "expression ::= expr_or_subquery NK_BITAND expr_or_subquery",
+ /* 463 */ "expression ::= expr_or_subquery NK_BITOR expr_or_subquery",
+ /* 464 */ "expression_list ::= expr_or_subquery",
+ /* 465 */ "expression_list ::= expression_list NK_COMMA expr_or_subquery",
+ /* 466 */ "column_reference ::= column_name",
+ /* 467 */ "column_reference ::= table_name NK_DOT column_name",
+ /* 468 */ "column_reference ::= NK_ALIAS",
+ /* 469 */ "column_reference ::= table_name NK_DOT NK_ALIAS",
+ /* 470 */ "pseudo_column ::= ROWTS",
+ /* 471 */ "pseudo_column ::= TBNAME",
+ /* 472 */ "pseudo_column ::= table_name NK_DOT TBNAME",
+ /* 473 */ "pseudo_column ::= QSTART",
+ /* 474 */ "pseudo_column ::= QEND",
+ /* 475 */ "pseudo_column ::= QDURATION",
+ /* 476 */ "pseudo_column ::= WSTART",
+ /* 477 */ "pseudo_column ::= WEND",
+ /* 478 */ "pseudo_column ::= WDURATION",
+ /* 479 */ "pseudo_column ::= IROWTS",
+ /* 480 */ "pseudo_column ::= ISFILLED",
+ /* 481 */ "pseudo_column ::= QTAGS",
+ /* 482 */ "function_expression ::= function_name NK_LP expression_list NK_RP",
+ /* 483 */ "function_expression ::= star_func NK_LP star_func_para_list NK_RP",
+ /* 484 */ "function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP",
+ /* 485 */ "function_expression ::= literal_func",
+ /* 486 */ "literal_func ::= noarg_func NK_LP NK_RP",
+ /* 487 */ "literal_func ::= NOW",
+ /* 488 */ "noarg_func ::= NOW",
+ /* 489 */ "noarg_func ::= TODAY",
+ /* 490 */ "noarg_func ::= TIMEZONE",
+ /* 491 */ "noarg_func ::= DATABASE",
+ /* 492 */ "noarg_func ::= CLIENT_VERSION",
+ /* 493 */ "noarg_func ::= SERVER_VERSION",
+ /* 494 */ "noarg_func ::= SERVER_STATUS",
+ /* 495 */ "noarg_func ::= CURRENT_USER",
+ /* 496 */ "noarg_func ::= USER",
+ /* 497 */ "star_func ::= COUNT",
+ /* 498 */ "star_func ::= FIRST",
+ /* 499 */ "star_func ::= LAST",
+ /* 500 */ "star_func ::= LAST_ROW",
+ /* 501 */ "star_func_para_list ::= NK_STAR",
+ /* 502 */ "star_func_para_list ::= other_para_list",
+ /* 503 */ "other_para_list ::= star_func_para",
+ /* 504 */ "other_para_list ::= other_para_list NK_COMMA star_func_para",
+ /* 505 */ "star_func_para ::= expr_or_subquery",
+ /* 506 */ "star_func_para ::= table_name NK_DOT NK_STAR",
+ /* 507 */ "case_when_expression ::= CASE when_then_list case_when_else_opt END",
+ /* 508 */ "case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END",
+ /* 509 */ "when_then_list ::= when_then_expr",
+ /* 510 */ "when_then_list ::= when_then_list when_then_expr",
+ /* 511 */ "when_then_expr ::= WHEN common_expression THEN common_expression",
+ /* 512 */ "case_when_else_opt ::=",
+ /* 513 */ "case_when_else_opt ::= ELSE common_expression",
+ /* 514 */ "predicate ::= expr_or_subquery compare_op expr_or_subquery",
+ /* 515 */ "predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery",
+ /* 516 */ "predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery",
+ /* 517 */ "predicate ::= expr_or_subquery IS NULL",
+ /* 518 */ "predicate ::= expr_or_subquery IS NOT NULL",
+ /* 519 */ "predicate ::= expr_or_subquery in_op in_predicate_value",
+ /* 520 */ "compare_op ::= NK_LT",
+ /* 521 */ "compare_op ::= NK_GT",
+ /* 522 */ "compare_op ::= NK_LE",
+ /* 523 */ "compare_op ::= NK_GE",
+ /* 524 */ "compare_op ::= NK_NE",
+ /* 525 */ "compare_op ::= NK_EQ",
+ /* 526 */ "compare_op ::= LIKE",
+ /* 527 */ "compare_op ::= NOT LIKE",
+ /* 528 */ "compare_op ::= MATCH",
+ /* 529 */ "compare_op ::= NMATCH",
+ /* 530 */ "compare_op ::= CONTAINS",
+ /* 531 */ "in_op ::= IN",
+ /* 532 */ "in_op ::= NOT IN",
+ /* 533 */ "in_predicate_value ::= NK_LP literal_list NK_RP",
+ /* 534 */ "boolean_value_expression ::= boolean_primary",
+ /* 535 */ "boolean_value_expression ::= NOT boolean_primary",
+ /* 536 */ "boolean_value_expression ::= boolean_value_expression OR boolean_value_expression",
+ /* 537 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression",
+ /* 538 */ "boolean_primary ::= predicate",
+ /* 539 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP",
+ /* 540 */ "common_expression ::= expr_or_subquery",
+ /* 541 */ "common_expression ::= boolean_value_expression",
+ /* 542 */ "from_clause_opt ::=",
+ /* 543 */ "from_clause_opt ::= FROM table_reference_list",
+ /* 544 */ "table_reference_list ::= table_reference",
+ /* 545 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference",
+ /* 546 */ "table_reference ::= table_primary",
+ /* 547 */ "table_reference ::= joined_table",
+ /* 548 */ "table_primary ::= table_name alias_opt",
+ /* 549 */ "table_primary ::= db_name NK_DOT table_name alias_opt",
+ /* 550 */ "table_primary ::= subquery alias_opt",
+ /* 551 */ "table_primary ::= parenthesized_joined_table",
+ /* 552 */ "alias_opt ::=",
+ /* 553 */ "alias_opt ::= table_alias",
+ /* 554 */ "alias_opt ::= AS table_alias",
+ /* 555 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP",
+ /* 556 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP",
+ /* 557 */ "joined_table ::= table_reference join_type JOIN table_reference ON search_condition",
+ /* 558 */ "join_type ::=",
+ /* 559 */ "join_type ::= INNER",
+ /* 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",
+ /* 561 */ "hint_list ::=",
+ /* 562 */ "hint_list ::= NK_HINT",
+ /* 563 */ "tag_mode_opt ::=",
+ /* 564 */ "tag_mode_opt ::= TAGS",
+ /* 565 */ "set_quantifier_opt ::=",
+ /* 566 */ "set_quantifier_opt ::= DISTINCT",
+ /* 567 */ "set_quantifier_opt ::= ALL",
+ /* 568 */ "select_list ::= select_item",
+ /* 569 */ "select_list ::= select_list NK_COMMA select_item",
+ /* 570 */ "select_item ::= NK_STAR",
+ /* 571 */ "select_item ::= common_expression",
+ /* 572 */ "select_item ::= common_expression column_alias",
+ /* 573 */ "select_item ::= common_expression AS column_alias",
+ /* 574 */ "select_item ::= table_name NK_DOT NK_STAR",
+ /* 575 */ "where_clause_opt ::=",
+ /* 576 */ "where_clause_opt ::= WHERE search_condition",
+ /* 577 */ "partition_by_clause_opt ::=",
+ /* 578 */ "partition_by_clause_opt ::= PARTITION BY partition_list",
+ /* 579 */ "partition_list ::= partition_item",
+ /* 580 */ "partition_list ::= partition_list NK_COMMA partition_item",
+ /* 581 */ "partition_item ::= expr_or_subquery",
+ /* 582 */ "partition_item ::= expr_or_subquery column_alias",
+ /* 583 */ "partition_item ::= expr_or_subquery AS column_alias",
+ /* 584 */ "twindow_clause_opt ::=",
+ /* 585 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP",
+ /* 586 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP",
+ /* 587 */ "twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt",
+ /* 588 */ "twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_COMMA interval_sliding_duration_literal NK_RP sliding_opt fill_opt",
+ /* 589 */ "twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition",
+ /* 590 */ "sliding_opt ::=",
+ /* 591 */ "sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP",
+ /* 592 */ "interval_sliding_duration_literal ::= NK_VARIABLE",
+ /* 593 */ "interval_sliding_duration_literal ::= NK_STRING",
+ /* 594 */ "interval_sliding_duration_literal ::= NK_INTEGER",
+ /* 595 */ "fill_opt ::=",
+ /* 596 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP",
+ /* 597 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP",
+ /* 598 */ "fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP",
+ /* 599 */ "fill_mode ::= NONE",
+ /* 600 */ "fill_mode ::= PREV",
+ /* 601 */ "fill_mode ::= NULL",
+ /* 602 */ "fill_mode ::= NULL_F",
+ /* 603 */ "fill_mode ::= LINEAR",
+ /* 604 */ "fill_mode ::= NEXT",
+ /* 605 */ "group_by_clause_opt ::=",
+ /* 606 */ "group_by_clause_opt ::= GROUP BY group_by_list",
+ /* 607 */ "group_by_list ::= expr_or_subquery",
+ /* 608 */ "group_by_list ::= group_by_list NK_COMMA expr_or_subquery",
+ /* 609 */ "having_clause_opt ::=",
+ /* 610 */ "having_clause_opt ::= HAVING search_condition",
+ /* 611 */ "range_opt ::=",
+ /* 612 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP",
+ /* 613 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_RP",
+ /* 614 */ "every_opt ::=",
+ /* 615 */ "every_opt ::= EVERY NK_LP duration_literal NK_RP",
+ /* 616 */ "query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt",
+ /* 617 */ "query_simple ::= query_specification",
+ /* 618 */ "query_simple ::= union_query_expression",
+ /* 619 */ "union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery",
+ /* 620 */ "union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery",
+ /* 621 */ "query_simple_or_subquery ::= query_simple",
+ /* 622 */ "query_simple_or_subquery ::= subquery",
+ /* 623 */ "query_or_subquery ::= query_expression",
+ /* 624 */ "query_or_subquery ::= subquery",
+ /* 625 */ "order_by_clause_opt ::=",
+ /* 626 */ "order_by_clause_opt ::= ORDER BY sort_specification_list",
+ /* 627 */ "slimit_clause_opt ::=",
+ /* 628 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER",
+ /* 629 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER",
+ /* 630 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER",
+ /* 631 */ "limit_clause_opt ::=",
+ /* 632 */ "limit_clause_opt ::= LIMIT NK_INTEGER",
+ /* 633 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER",
+ /* 634 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER",
+ /* 635 */ "subquery ::= NK_LP query_expression NK_RP",
+ /* 636 */ "subquery ::= NK_LP subquery NK_RP",
+ /* 637 */ "search_condition ::= common_expression",
+ /* 638 */ "sort_specification_list ::= sort_specification",
+ /* 639 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification",
+ /* 640 */ "sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt",
+ /* 641 */ "ordering_specification_opt ::=",
+ /* 642 */ "ordering_specification_opt ::= ASC",
+ /* 643 */ "ordering_specification_opt ::= DESC",
+ /* 644 */ "null_ordering_opt ::=",
+ /* 645 */ "null_ordering_opt ::= NULLS FIRST",
+ /* 646 */ "null_ordering_opt ::= NULLS LAST",
};
#endif /* NDEBUG */
@@ -3173,267 +2840,233 @@ static void yy_destructor(
*/
/********* Begin destructor definitions ***************************************/
/* Default NON-TERMINAL Destructor */
- case 347: /* cmd */
- case 350: /* literal */
- case 359: /* with_opt */
- case 365: /* search_condition */
- case 370: /* db_options */
- case 372: /* alter_db_options */
- case 374: /* start_opt */
- case 375: /* end_opt */
- case 379: /* signed */
- case 381: /* retention */
- case 382: /* full_table_name */
- case 385: /* table_options */
- case 389: /* alter_table_clause */
- case 390: /* alter_table_options */
- case 393: /* signed_literal */
- case 394: /* create_subtable_clause */
- case 397: /* drop_table_clause */
- case 399: /* column_def */
- case 403: /* duration_literal */
- case 404: /* rollup_func_name */
- case 406: /* col_name */
- case 409: /* like_pattern_opt */
- case 410: /* db_name_cond_opt */
- case 411: /* table_name_cond */
- case 412: /* from_db_opt */
- case 415: /* tag_item */
- case 417: /* index_options */
- case 418: /* full_index_name */
- case 421: /* sliding_opt */
- case 422: /* sma_stream_opt */
- case 423: /* func */
- case 426: /* query_or_subquery */
- case 427: /* where_clause_opt */
- case 430: /* explain_options */
- case 431: /* insert_query */
- case 436: /* full_view_name */
- case 439: /* stream_options */
- case 442: /* subtable_opt */
- case 444: /* expression */
- case 447: /* literal_func */
- case 450: /* expr_or_subquery */
- case 451: /* pseudo_column */
- case 452: /* column_reference */
- case 453: /* function_expression */
- case 454: /* case_when_expression */
- case 459: /* star_func_para */
- case 461: /* case_when_else_opt */
- case 462: /* common_expression */
- case 463: /* when_then_expr */
- case 464: /* predicate */
- case 467: /* in_predicate_value */
- case 468: /* boolean_value_expression */
- case 469: /* boolean_primary */
- case 470: /* from_clause_opt */
- case 471: /* table_reference_list */
- case 472: /* table_reference */
- case 473: /* table_primary */
- case 474: /* joined_table */
- case 476: /* subquery */
- case 477: /* parenthesized_joined_table */
- case 479: /* query_specification */
- case 485: /* range_opt */
- case 486: /* every_opt */
- case 487: /* fill_opt */
- case 488: /* twindow_clause_opt */
- case 490: /* having_clause_opt */
- case 491: /* select_item */
- case 493: /* partition_item */
- case 494: /* interval_sliding_duration_literal */
- case 497: /* query_expression */
- case 498: /* query_simple */
- case 500: /* slimit_clause_opt */
- case 501: /* limit_clause_opt */
- case 502: /* union_query_expression */
- case 503: /* query_simple_or_subquery */
- case 505: /* sort_specification */
+ case 350: /* cmd */
+ case 353: /* literal */
+ case 362: /* with_opt */
+ case 368: /* search_condition */
+ case 373: /* db_options */
+ case 375: /* alter_db_options */
+ case 377: /* start_opt */
+ case 378: /* end_opt */
+ case 382: /* signed */
+ case 384: /* retention */
+ case 385: /* full_table_name */
+ case 388: /* table_options */
+ case 392: /* alter_table_clause */
+ case 393: /* alter_table_options */
+ case 396: /* signed_literal */
+ case 397: /* create_subtable_clause */
+ case 400: /* drop_table_clause */
+ case 402: /* column_def */
+ case 406: /* duration_literal */
+ case 407: /* rollup_func_name */
+ case 409: /* col_name */
+ case 412: /* like_pattern_opt */
+ case 413: /* db_name_cond_opt */
+ case 414: /* table_name_cond */
+ case 415: /* from_db_opt */
+ case 418: /* tag_item */
+ case 420: /* index_options */
+ case 421: /* full_index_name */
+ case 424: /* sliding_opt */
+ case 425: /* sma_stream_opt */
+ case 426: /* func */
+ case 429: /* query_or_subquery */
+ case 430: /* where_clause_opt */
+ case 433: /* explain_options */
+ case 434: /* insert_query */
+ case 439: /* full_view_name */
+ case 442: /* stream_options */
+ case 445: /* subtable_opt */
+ case 447: /* expression */
+ case 450: /* literal_func */
+ case 453: /* expr_or_subquery */
+ case 454: /* pseudo_column */
+ case 455: /* column_reference */
+ case 456: /* function_expression */
+ case 457: /* case_when_expression */
+ case 462: /* star_func_para */
+ case 464: /* case_when_else_opt */
+ case 465: /* common_expression */
+ case 466: /* when_then_expr */
+ case 467: /* predicate */
+ case 470: /* in_predicate_value */
+ case 471: /* boolean_value_expression */
+ case 472: /* boolean_primary */
+ case 473: /* from_clause_opt */
+ case 474: /* table_reference_list */
+ case 475: /* table_reference */
+ case 476: /* table_primary */
+ case 477: /* joined_table */
+ case 479: /* subquery */
+ case 480: /* parenthesized_joined_table */
+ case 482: /* query_specification */
+ case 488: /* range_opt */
+ case 489: /* every_opt */
+ case 490: /* fill_opt */
+ case 491: /* twindow_clause_opt */
+ case 493: /* having_clause_opt */
+ case 494: /* select_item */
+ case 496: /* partition_item */
+ case 497: /* interval_sliding_duration_literal */
+ case 500: /* query_expression */
+ case 501: /* query_simple */
+ case 503: /* slimit_clause_opt */
+ case 504: /* limit_clause_opt */
+ case 505: /* union_query_expression */
+ case 506: /* query_simple_or_subquery */
+ case 508: /* sort_specification */
{
-#line 7 "sql.y"
- nodesDestroyNode((yypminor->yy232));
-#line 3255 "sql.c"
+ nodesDestroyNode((yypminor->yy490));
}
break;
- case 348: /* account_options */
- case 349: /* alter_account_options */
- case 351: /* alter_account_option */
- case 373: /* speed_opt */
- case 425: /* with_meta */
- case 434: /* bufsize_opt */
+ case 351: /* account_options */
+ case 352: /* alter_account_options */
+ case 354: /* alter_account_option */
+ case 376: /* speed_opt */
+ case 428: /* with_meta */
+ case 437: /* bufsize_opt */
{
-#line 54 "sql.y"
-#line 3267 "sql.c"
}
break;
- case 352: /* ip_range_list */
- case 353: /* white_list */
- case 354: /* white_list_opt */
- case 376: /* integer_list */
- case 377: /* variable_list */
- case 378: /* retention_list */
- case 383: /* column_def_list */
- case 384: /* tags_def_opt */
- case 386: /* multi_create_clause */
- case 387: /* tags_def */
- case 388: /* multi_drop_clause */
- case 395: /* specific_cols_opt */
- case 396: /* expression_list */
- case 398: /* col_name_list */
- case 400: /* duration_list */
- case 401: /* rollup_func_list */
- case 413: /* tag_list_opt */
- case 420: /* func_list */
- case 440: /* col_list_opt */
- case 441: /* tag_def_or_ref_opt */
- case 446: /* dnode_list */
- case 448: /* literal_list */
- case 456: /* star_func_para_list */
- case 458: /* other_para_list */
- case 460: /* when_then_list */
- case 480: /* hint_list */
- case 483: /* select_list */
- case 484: /* partition_by_clause_opt */
- case 489: /* group_by_clause_opt */
- case 492: /* partition_list */
- case 496: /* group_by_list */
- case 499: /* order_by_clause_opt */
- case 504: /* sort_specification_list */
+ case 355: /* ip_range_list */
+ case 356: /* white_list */
+ case 357: /* white_list_opt */
+ case 379: /* integer_list */
+ case 380: /* variable_list */
+ case 381: /* retention_list */
+ case 386: /* column_def_list */
+ case 387: /* tags_def_opt */
+ case 389: /* multi_create_clause */
+ case 390: /* tags_def */
+ case 391: /* multi_drop_clause */
+ case 398: /* specific_cols_opt */
+ case 399: /* expression_list */
+ case 401: /* col_name_list */
+ case 403: /* duration_list */
+ case 404: /* rollup_func_list */
+ case 416: /* tag_list_opt */
+ case 423: /* func_list */
+ case 443: /* col_list_opt */
+ case 444: /* tag_def_or_ref_opt */
+ case 449: /* dnode_list */
+ case 451: /* literal_list */
+ case 459: /* star_func_para_list */
+ case 461: /* other_para_list */
+ case 463: /* when_then_list */
+ case 483: /* hint_list */
+ case 486: /* select_list */
+ case 487: /* partition_by_clause_opt */
+ case 492: /* group_by_clause_opt */
+ case 495: /* partition_list */
+ case 499: /* group_by_list */
+ case 502: /* order_by_clause_opt */
+ case 507: /* sort_specification_list */
{
-#line 85 "sql.y"
- nodesDestroyList((yypminor->yy88));
-#line 3306 "sql.c"
+ nodesDestroyList((yypminor->yy502));
}
break;
- case 355: /* user_name */
- case 362: /* db_name */
- case 363: /* table_name */
- case 364: /* topic_name */
- case 366: /* dnode_endpoint */
- case 391: /* column_name */
- case 405: /* function_name */
- case 416: /* column_alias */
- case 419: /* index_name */
- case 424: /* sma_func_name */
- case 428: /* cgroup_name */
- case 435: /* language_opt */
- case 437: /* view_name */
- case 438: /* stream_name */
- case 445: /* on_vgroup_id */
- case 449: /* table_alias */
- case 455: /* star_func */
- case 457: /* noarg_func */
- case 475: /* alias_opt */
+ case 358: /* user_name */
+ case 365: /* db_name */
+ case 366: /* table_name */
+ case 367: /* topic_name */
+ case 369: /* dnode_endpoint */
+ case 394: /* column_name */
+ case 408: /* function_name */
+ case 419: /* column_alias */
+ case 422: /* index_name */
+ case 427: /* sma_func_name */
+ case 431: /* cgroup_name */
+ case 438: /* language_opt */
+ case 440: /* view_name */
+ case 441: /* stream_name */
+ case 448: /* on_vgroup_id */
+ case 452: /* table_alias */
+ case 458: /* star_func */
+ case 460: /* noarg_func */
+ case 478: /* alias_opt */
{
-#line 812 "sql.y"
-#line 3331 "sql.c"
}
break;
- case 356: /* sysinfo_opt */
+ case 359: /* sysinfo_opt */
{
-#line 112 "sql.y"
-#line 3338 "sql.c"
}
break;
- case 357: /* privileges */
- case 360: /* priv_type_list */
- case 361: /* priv_type */
+ case 360: /* privileges */
+ case 363: /* priv_type_list */
+ case 364: /* priv_type */
{
-#line 121 "sql.y"
-#line 3347 "sql.c"
}
break;
- case 358: /* priv_level */
+ case 361: /* priv_level */
{
-#line 138 "sql.y"
-#line 3354 "sql.c"
}
break;
- case 367: /* force_opt */
- case 368: /* unsafe_opt */
- case 369: /* not_exists_opt */
- case 371: /* exists_opt */
- case 429: /* analyze_opt */
- case 432: /* or_replace_opt */
- case 433: /* agg_func_opt */
- case 443: /* ignore_opt */
- case 481: /* set_quantifier_opt */
- case 482: /* tag_mode_opt */
+ case 370: /* force_opt */
+ case 371: /* unsafe_opt */
+ case 372: /* not_exists_opt */
+ case 374: /* exists_opt */
+ case 432: /* analyze_opt */
+ case 435: /* or_replace_opt */
+ case 436: /* agg_func_opt */
+ case 446: /* ignore_opt */
+ case 484: /* set_quantifier_opt */
+ case 485: /* tag_mode_opt */
{
-#line 167 "sql.y"
-#line 3370 "sql.c"
}
break;
- case 380: /* alter_db_option */
- case 402: /* alter_table_option */
+ case 383: /* alter_db_option */
+ case 405: /* alter_table_option */
{
-#line 265 "sql.y"
-#line 3378 "sql.c"
}
break;
- case 392: /* type_name */
+ case 395: /* type_name */
{
-#line 388 "sql.y"
-#line 3385 "sql.c"
}
break;
- case 407: /* db_kind_opt */
- case 414: /* table_kind */
+ case 410: /* db_kind_opt */
+ case 417: /* table_kind */
{
-#line 553 "sql.y"
-#line 3393 "sql.c"
}
break;
- case 408: /* table_kind_db_name_cond_opt */
+ case 411: /* table_kind_db_name_cond_opt */
{
-#line 518 "sql.y"
-#line 3400 "sql.c"
}
break;
- case 465: /* compare_op */
- case 466: /* in_op */
+ case 468: /* compare_op */
+ case 469: /* in_op */
{
-#line 1002 "sql.y"
-#line 3408 "sql.c"
}
break;
- case 478: /* join_type */
+ case 481: /* join_type */
{
-#line 1078 "sql.y"
-#line 3415 "sql.c"
}
break;
- case 495: /* fill_mode */
+ case 498: /* fill_mode */
{
-#line 1169 "sql.y"
-#line 3422 "sql.c"
}
break;
- case 506: /* ordering_specification_opt */
+ case 509: /* ordering_specification_opt */
{
-#line 1254 "sql.y"
-#line 3429 "sql.c"
}
break;
- case 507: /* null_ordering_opt */
+ case 510: /* null_ordering_opt */
{
-#line 1260 "sql.y"
-#line 3436 "sql.c"
}
break;
/********* End destructor definitions *****************************************/
@@ -3600,7 +3233,7 @@ static YYACTIONTYPE yy_find_shift_action(
#endif /* YYWILDCARD */
return yy_default[stateno];
}else{
- assert( i>=0 && i<(int)(sizeof(yy_action)/sizeof(yy_action[0])) );
+ assert( i>=0 && iyytos;
+#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
@@ -5053,21 +4744,15 @@ 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 5058 "sql.c"
- yy_destructor(yypParser,348,&yymsp[0].minor);
+ 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 5064 "sql.c"
- yy_destructor(yypParser,349,&yymsp[0].minor);
+ yy_destructor(yypParser,352,&yymsp[0].minor);
break;
case 2: /* account_options ::= */
-#line 55 "sql.y"
{ }
-#line 5070 "sql.c"
break;
case 3: /* account_options ::= account_options PPS literal */
case 4: /* account_options ::= account_options TSERIES literal */ yytestcase(yyruleno==4);
@@ -5078,26 +4763,20 @@ static YYACTIONTYPE yy_reduce(
case 9: /* account_options ::= account_options USERS literal */ yytestcase(yyruleno==9);
case 10: /* account_options ::= account_options CONNS literal */ yytestcase(yyruleno==10);
case 11: /* account_options ::= account_options STATE literal */ yytestcase(yyruleno==11);
-{ yy_destructor(yypParser,348,&yymsp[-2].minor);
-#line 56 "sql.y"
+{ yy_destructor(yypParser,351,&yymsp[-2].minor);
{ }
-#line 5084 "sql.c"
- yy_destructor(yypParser,350,&yymsp[0].minor);
+ yy_destructor(yypParser,353,&yymsp[0].minor);
}
break;
case 12: /* alter_account_options ::= alter_account_option */
-{ yy_destructor(yypParser,351,&yymsp[0].minor);
-#line 68 "sql.y"
+{ yy_destructor(yypParser,354,&yymsp[0].minor);
{ }
-#line 5092 "sql.c"
}
break;
case 13: /* alter_account_options ::= alter_account_options alter_account_option */
-{ yy_destructor(yypParser,349,&yymsp[-1].minor);
-#line 69 "sql.y"
+{ yy_destructor(yypParser,352,&yymsp[-1].minor);
{ }
-#line 5099 "sql.c"
- yy_destructor(yypParser,351,&yymsp[0].minor);
+ yy_destructor(yypParser,354,&yymsp[0].minor);
}
break;
case 14: /* alter_account_option ::= PASS literal */
@@ -5110,2633 +4789,1786 @@ 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 5115 "sql.c"
- yy_destructor(yypParser,350,&yymsp[0].minor);
+ yy_destructor(yypParser,353,&yymsp[0].minor);
break;
case 24: /* ip_range_list ::= NK_STRING */
-#line 86 "sql.y"
-{ yylhsminor.yy88 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); }
-#line 5121 "sql.c"
- yymsp[0].minor.yy88 = yylhsminor.yy88;
+{ yylhsminor.yy502 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); }
+ yymsp[0].minor.yy502 = yylhsminor.yy502;
break;
case 25: /* ip_range_list ::= ip_range_list NK_COMMA NK_STRING */
-#line 87 "sql.y"
-{ yylhsminor.yy88 = addNodeToList(pCxt, yymsp[-2].minor.yy88, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); }
-#line 5127 "sql.c"
- yymsp[-2].minor.yy88 = yylhsminor.yy88;
+{ yylhsminor.yy502 = addNodeToList(pCxt, yymsp[-2].minor.yy502, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); }
+ yymsp[-2].minor.yy502 = yylhsminor.yy502;
break;
case 26: /* white_list ::= HOST ip_range_list */
-#line 91 "sql.y"
-{ yymsp[-1].minor.yy88 = yymsp[0].minor.yy88; }
-#line 5133 "sql.c"
+{ yymsp[-1].minor.yy502 = yymsp[0].minor.yy502; }
break;
case 27: /* white_list_opt ::= */
- case 186: /* specific_cols_opt ::= */ yytestcase(yyruleno==186);
- case 217: /* tags_def_opt ::= */ yytestcase(yyruleno==217);
- case 302: /* tag_list_opt ::= */ yytestcase(yyruleno==302);
- case 368: /* col_list_opt ::= */ yytestcase(yyruleno==368);
- case 370: /* tag_def_or_ref_opt ::= */ yytestcase(yyruleno==370);
- case 572: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==572);
- case 600: /* group_by_clause_opt ::= */ yytestcase(yyruleno==600);
- case 620: /* order_by_clause_opt ::= */ yytestcase(yyruleno==620);
-#line 95 "sql.y"
-{ yymsp[1].minor.yy88 = NULL; }
-#line 5146 "sql.c"
+ case 188: /* specific_cols_opt ::= */ yytestcase(yyruleno==188);
+ case 219: /* tags_def_opt ::= */ yytestcase(yyruleno==219);
+ case 307: /* tag_list_opt ::= */ yytestcase(yyruleno==307);
+ case 373: /* col_list_opt ::= */ yytestcase(yyruleno==373);
+ case 375: /* tag_def_or_ref_opt ::= */ yytestcase(yyruleno==375);
+ 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);
+{ yymsp[1].minor.yy502 = NULL; }
break;
case 28: /* white_list_opt ::= white_list */
- case 218: /* tags_def_opt ::= tags_def */ yytestcase(yyruleno==218);
- case 371: /* tag_def_or_ref_opt ::= tags_def */ yytestcase(yyruleno==371);
- case 497: /* star_func_para_list ::= other_para_list */ yytestcase(yyruleno==497);
-#line 96 "sql.y"
-{ yylhsminor.yy88 = yymsp[0].minor.yy88; }
-#line 5154 "sql.c"
- yymsp[0].minor.yy88 = yylhsminor.yy88;
+ 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);
+{ yylhsminor.yy502 = yymsp[0].minor.yy502; }
+ 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.yy993, &yymsp[-2].minor.yy0, yymsp[-1].minor.yy279);
- pCxt->pRootNode = addCreateUserStmtWhiteList(pCxt, pCxt->pRootNode, yymsp[0].minor.yy88);
+ 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 5163 "sql.c"
break;
case 30: /* cmd ::= ALTER USER user_name PASS NK_STRING */
-#line 104 "sql.y"
-{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy993, TSDB_ALTER_USER_PASSWD, &yymsp[0].minor.yy0); }
-#line 5168 "sql.c"
+{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy561, TSDB_ALTER_USER_PASSWD, &yymsp[0].minor.yy0); }
break;
case 31: /* cmd ::= ALTER USER user_name ENABLE NK_INTEGER */
-#line 105 "sql.y"
-{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy993, TSDB_ALTER_USER_ENABLE, &yymsp[0].minor.yy0); }
-#line 5173 "sql.c"
+{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy561, TSDB_ALTER_USER_ENABLE, &yymsp[0].minor.yy0); }
break;
case 32: /* cmd ::= ALTER USER user_name SYSINFO NK_INTEGER */
-#line 106 "sql.y"
-{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy993, TSDB_ALTER_USER_SYSINFO, &yymsp[0].minor.yy0); }
-#line 5178 "sql.c"
+{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy561, TSDB_ALTER_USER_SYSINFO, &yymsp[0].minor.yy0); }
break;
case 33: /* cmd ::= ALTER USER user_name ADD white_list */
-#line 107 "sql.y"
-{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy993, TSDB_ALTER_USER_ADD_WHITE_LIST, yymsp[0].minor.yy88); }
-#line 5183 "sql.c"
+{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy561, TSDB_ALTER_USER_ADD_WHITE_LIST, yymsp[0].minor.yy502); }
break;
case 34: /* cmd ::= ALTER USER user_name DROP white_list */
-#line 108 "sql.y"
-{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy993, TSDB_ALTER_USER_DROP_WHITE_LIST, yymsp[0].minor.yy88); }
-#line 5188 "sql.c"
+{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy561, TSDB_ALTER_USER_DROP_WHITE_LIST, yymsp[0].minor.yy502); }
break;
case 35: /* cmd ::= DROP USER user_name */
-#line 109 "sql.y"
-{ pCxt->pRootNode = createDropUserStmt(pCxt, &yymsp[0].minor.yy993); }
-#line 5193 "sql.c"
+{ pCxt->pRootNode = createDropUserStmt(pCxt, &yymsp[0].minor.yy561); }
break;
case 36: /* sysinfo_opt ::= */
-#line 113 "sql.y"
-{ yymsp[1].minor.yy279 = 1; }
-#line 5198 "sql.c"
+{ yymsp[1].minor.yy1013 = 1; }
break;
case 37: /* sysinfo_opt ::= SYSINFO NK_INTEGER */
-#line 114 "sql.y"
-{ yymsp[-1].minor.yy279 = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); }
-#line 5203 "sql.c"
+{ yymsp[-1].minor.yy1013 = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); }
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.yy221, &yymsp[-3].minor.yy241, &yymsp[0].minor.yy993, yymsp[-2].minor.yy232); }
-#line 5208 "sql.c"
+{ pCxt->pRootNode = createGrantStmt(pCxt, yymsp[-5].minor.yy277, &yymsp[-3].minor.yy483, &yymsp[0].minor.yy561, yymsp[-2].minor.yy490); }
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.yy221, &yymsp[-3].minor.yy241, &yymsp[0].minor.yy993, yymsp[-2].minor.yy232); }
-#line 5213 "sql.c"
+{ pCxt->pRootNode = createRevokeStmt(pCxt, yymsp[-5].minor.yy277, &yymsp[-3].minor.yy483, &yymsp[0].minor.yy561, yymsp[-2].minor.yy490); }
break;
case 40: /* privileges ::= ALL */
-#line 122 "sql.y"
-{ yymsp[0].minor.yy221 = PRIVILEGE_TYPE_ALL; }
-#line 5218 "sql.c"
+{ yymsp[0].minor.yy277 = PRIVILEGE_TYPE_ALL; }
break;
case 41: /* privileges ::= priv_type_list */
case 43: /* priv_type_list ::= priv_type */ yytestcase(yyruleno==43);
-#line 123 "sql.y"
-{ yylhsminor.yy221 = yymsp[0].minor.yy221; }
-#line 5224 "sql.c"
- yymsp[0].minor.yy221 = yylhsminor.yy221;
+{ yylhsminor.yy277 = yymsp[0].minor.yy277; }
+ yymsp[0].minor.yy277 = yylhsminor.yy277;
break;
case 42: /* privileges ::= SUBSCRIBE */
-#line 124 "sql.y"
-{ yymsp[0].minor.yy221 = PRIVILEGE_TYPE_SUBSCRIBE; }
-#line 5230 "sql.c"
+{ yymsp[0].minor.yy277 = PRIVILEGE_TYPE_SUBSCRIBE; }
break;
case 44: /* priv_type_list ::= priv_type_list NK_COMMA priv_type */
-#line 129 "sql.y"
-{ yylhsminor.yy221 = yymsp[-2].minor.yy221 | yymsp[0].minor.yy221; }
-#line 5235 "sql.c"
- yymsp[-2].minor.yy221 = yylhsminor.yy221;
+{ yylhsminor.yy277 = yymsp[-2].minor.yy277 | yymsp[0].minor.yy277; }
+ yymsp[-2].minor.yy277 = yylhsminor.yy277;
break;
case 45: /* priv_type ::= READ */
-#line 133 "sql.y"
-{ yymsp[0].minor.yy221 = PRIVILEGE_TYPE_READ; }
-#line 5241 "sql.c"
+{ yymsp[0].minor.yy277 = PRIVILEGE_TYPE_READ; }
break;
case 46: /* priv_type ::= WRITE */
-#line 134 "sql.y"
-{ yymsp[0].minor.yy221 = PRIVILEGE_TYPE_WRITE; }
-#line 5246 "sql.c"
+{ yymsp[0].minor.yy277 = PRIVILEGE_TYPE_WRITE; }
break;
case 47: /* priv_type ::= ALTER */
-#line 135 "sql.y"
-{ yymsp[0].minor.yy221 = PRIVILEGE_TYPE_ALTER; }
-#line 5251 "sql.c"
+{ yymsp[0].minor.yy277 = PRIVILEGE_TYPE_ALTER; }
break;
case 48: /* priv_level ::= NK_STAR NK_DOT NK_STAR */
-#line 139 "sql.y"
-{ yylhsminor.yy241.first = yymsp[-2].minor.yy0; yylhsminor.yy241.second = yymsp[0].minor.yy0; }
-#line 5256 "sql.c"
- yymsp[-2].minor.yy241 = yylhsminor.yy241;
+{ yylhsminor.yy483.first = yymsp[-2].minor.yy0; yylhsminor.yy483.second = yymsp[0].minor.yy0; }
+ yymsp[-2].minor.yy483 = yylhsminor.yy483;
break;
case 49: /* priv_level ::= db_name NK_DOT NK_STAR */
-#line 140 "sql.y"
-{ yylhsminor.yy241.first = yymsp[-2].minor.yy993; yylhsminor.yy241.second = yymsp[0].minor.yy0; }
-#line 5262 "sql.c"
- yymsp[-2].minor.yy241 = yylhsminor.yy241;
+{ yylhsminor.yy483.first = yymsp[-2].minor.yy561; yylhsminor.yy483.second = yymsp[0].minor.yy0; }
+ yymsp[-2].minor.yy483 = yylhsminor.yy483;
break;
case 50: /* priv_level ::= db_name NK_DOT table_name */
-#line 141 "sql.y"
-{ yylhsminor.yy241.first = yymsp[-2].minor.yy993; yylhsminor.yy241.second = yymsp[0].minor.yy993; }
-#line 5268 "sql.c"
- yymsp[-2].minor.yy241 = yylhsminor.yy241;
+{ yylhsminor.yy483.first = yymsp[-2].minor.yy561; yylhsminor.yy483.second = yymsp[0].minor.yy561; }
+ yymsp[-2].minor.yy483 = yylhsminor.yy483;
break;
case 51: /* priv_level ::= topic_name */
-#line 142 "sql.y"
-{ yylhsminor.yy241.first = yymsp[0].minor.yy993; yylhsminor.yy241.second = nil_token; }
-#line 5274 "sql.c"
- yymsp[0].minor.yy241 = yylhsminor.yy241;
+{ yylhsminor.yy483.first = yymsp[0].minor.yy561; yylhsminor.yy483.second = nil_token; }
+ yymsp[0].minor.yy483 = yylhsminor.yy483;
break;
case 52: /* with_opt ::= */
- case 155: /* start_opt ::= */ yytestcase(yyruleno==155);
- case 159: /* end_opt ::= */ yytestcase(yyruleno==159);
- case 297: /* like_pattern_opt ::= */ yytestcase(yyruleno==297);
- case 382: /* subtable_opt ::= */ yytestcase(yyruleno==382);
- case 507: /* case_when_else_opt ::= */ yytestcase(yyruleno==507);
- case 537: /* from_clause_opt ::= */ yytestcase(yyruleno==537);
- case 570: /* where_clause_opt ::= */ yytestcase(yyruleno==570);
- case 579: /* twindow_clause_opt ::= */ yytestcase(yyruleno==579);
- case 585: /* sliding_opt ::= */ yytestcase(yyruleno==585);
- case 590: /* fill_opt ::= */ yytestcase(yyruleno==590);
- case 604: /* having_clause_opt ::= */ yytestcase(yyruleno==604);
- case 606: /* range_opt ::= */ yytestcase(yyruleno==606);
- case 609: /* every_opt ::= */ yytestcase(yyruleno==609);
- case 622: /* slimit_clause_opt ::= */ yytestcase(yyruleno==622);
- case 626: /* limit_clause_opt ::= */ yytestcase(yyruleno==626);
-#line 144 "sql.y"
-{ yymsp[1].minor.yy232 = NULL; }
-#line 5295 "sql.c"
+ case 157: /* start_opt ::= */ yytestcase(yyruleno==157);
+ case 161: /* end_opt ::= */ yytestcase(yyruleno==161);
+ case 302: /* like_pattern_opt ::= */ yytestcase(yyruleno==302);
+ case 387: /* subtable_opt ::= */ yytestcase(yyruleno==387);
+ case 512: /* case_when_else_opt ::= */ yytestcase(yyruleno==512);
+ case 542: /* from_clause_opt ::= */ yytestcase(yyruleno==542);
+ case 575: /* where_clause_opt ::= */ yytestcase(yyruleno==575);
+ case 584: /* twindow_clause_opt ::= */ yytestcase(yyruleno==584);
+ case 590: /* sliding_opt ::= */ yytestcase(yyruleno==590);
+ case 595: /* fill_opt ::= */ yytestcase(yyruleno==595);
+ case 609: /* having_clause_opt ::= */ yytestcase(yyruleno==609);
+ case 611: /* range_opt ::= */ yytestcase(yyruleno==611);
+ case 614: /* every_opt ::= */ yytestcase(yyruleno==614);
+ case 627: /* slimit_clause_opt ::= */ yytestcase(yyruleno==627);
+ case 631: /* limit_clause_opt ::= */ yytestcase(yyruleno==631);
+{ yymsp[1].minor.yy490 = NULL; }
break;
case 53: /* with_opt ::= WITH search_condition */
- case 538: /* from_clause_opt ::= FROM table_reference_list */ yytestcase(yyruleno==538);
- case 571: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==571);
- case 605: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==605);
-#line 145 "sql.y"
-{ yymsp[-1].minor.yy232 = yymsp[0].minor.yy232; }
-#line 5303 "sql.c"
+ 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);
+{ yymsp[-1].minor.yy490 = yymsp[0].minor.yy490; }
break;
case 54: /* cmd ::= CREATE DNODE dnode_endpoint */
-#line 148 "sql.y"
-{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[0].minor.yy993, NULL); }
-#line 5308 "sql.c"
+{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[0].minor.yy561, NULL); }
break;
case 55: /* cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */
-#line 149 "sql.y"
-{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[-2].minor.yy993, &yymsp[0].minor.yy0); }
-#line 5313 "sql.c"
+{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[-2].minor.yy561, &yymsp[0].minor.yy0); }
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.yy985, false); }
-#line 5318 "sql.c"
+{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy845, false); }
break;
case 57: /* cmd ::= DROP DNODE dnode_endpoint force_opt */
-#line 151 "sql.y"
-{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy993, yymsp[0].minor.yy985, false); }
-#line 5323 "sql.c"
+{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy561, yymsp[0].minor.yy845, false); }
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.yy985); }
-#line 5328 "sql.c"
+{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy0, false, yymsp[0].minor.yy845); }
break;
case 59: /* cmd ::= DROP DNODE dnode_endpoint unsafe_opt */
-#line 153 "sql.y"
-{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy993, false, yymsp[0].minor.yy985); }
-#line 5333 "sql.c"
+{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy561, false, yymsp[0].minor.yy845); }
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 5338 "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 5343 "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 5348 "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 5353 "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 5358 "sql.c"
break;
case 65: /* dnode_endpoint ::= NK_STRING */
case 66: /* dnode_endpoint ::= NK_ID */ yytestcase(yyruleno==66);
case 67: /* dnode_endpoint ::= NK_IPTOKEN */ yytestcase(yyruleno==67);
- case 324: /* sma_func_name ::= COUNT */ yytestcase(yyruleno==324);
- case 325: /* sma_func_name ::= FIRST */ yytestcase(yyruleno==325);
- case 326: /* sma_func_name ::= LAST */ yytestcase(yyruleno==326);
- case 327: /* sma_func_name ::= LAST_ROW */ yytestcase(yyruleno==327);
- case 429: /* db_name ::= NK_ID */ yytestcase(yyruleno==429);
- case 430: /* table_name ::= NK_ID */ yytestcase(yyruleno==430);
- case 431: /* column_name ::= NK_ID */ yytestcase(yyruleno==431);
- case 432: /* function_name ::= NK_ID */ yytestcase(yyruleno==432);
- case 433: /* view_name ::= NK_ID */ yytestcase(yyruleno==433);
- case 434: /* table_alias ::= NK_ID */ yytestcase(yyruleno==434);
- case 435: /* column_alias ::= NK_ID */ yytestcase(yyruleno==435);
- case 436: /* column_alias ::= NK_ALIAS */ yytestcase(yyruleno==436);
- case 437: /* user_name ::= NK_ID */ yytestcase(yyruleno==437);
- case 438: /* topic_name ::= NK_ID */ yytestcase(yyruleno==438);
- case 439: /* stream_name ::= NK_ID */ yytestcase(yyruleno==439);
- case 440: /* cgroup_name ::= NK_ID */ yytestcase(yyruleno==440);
- case 441: /* index_name ::= NK_ID */ yytestcase(yyruleno==441);
- case 483: /* noarg_func ::= NOW */ yytestcase(yyruleno==483);
- case 484: /* noarg_func ::= TODAY */ yytestcase(yyruleno==484);
- case 485: /* noarg_func ::= TIMEZONE */ yytestcase(yyruleno==485);
- case 486: /* noarg_func ::= DATABASE */ yytestcase(yyruleno==486);
- case 487: /* noarg_func ::= CLIENT_VERSION */ yytestcase(yyruleno==487);
- case 488: /* noarg_func ::= SERVER_VERSION */ yytestcase(yyruleno==488);
- case 489: /* noarg_func ::= SERVER_STATUS */ yytestcase(yyruleno==489);
- case 490: /* noarg_func ::= CURRENT_USER */ yytestcase(yyruleno==490);
- case 491: /* noarg_func ::= USER */ yytestcase(yyruleno==491);
- case 492: /* star_func ::= COUNT */ yytestcase(yyruleno==492);
- case 493: /* star_func ::= FIRST */ yytestcase(yyruleno==493);
- case 494: /* star_func ::= LAST */ yytestcase(yyruleno==494);
- case 495: /* star_func ::= LAST_ROW */ yytestcase(yyruleno==495);
-#line 162 "sql.y"
-{ yylhsminor.yy993 = yymsp[0].minor.yy0; }
-#line 5395 "sql.c"
- yymsp[0].minor.yy993 = yylhsminor.yy993;
+ case 329: /* sma_func_name ::= COUNT */ yytestcase(yyruleno==329);
+ case 330: /* sma_func_name ::= FIRST */ yytestcase(yyruleno==330);
+ case 331: /* sma_func_name ::= LAST */ yytestcase(yyruleno==331);
+ case 332: /* sma_func_name ::= LAST_ROW */ yytestcase(yyruleno==332);
+ case 434: /* db_name ::= NK_ID */ yytestcase(yyruleno==434);
+ case 435: /* table_name ::= NK_ID */ yytestcase(yyruleno==435);
+ case 436: /* column_name ::= NK_ID */ yytestcase(yyruleno==436);
+ case 437: /* function_name ::= NK_ID */ yytestcase(yyruleno==437);
+ case 438: /* view_name ::= NK_ID */ yytestcase(yyruleno==438);
+ case 439: /* table_alias ::= NK_ID */ yytestcase(yyruleno==439);
+ case 440: /* column_alias ::= NK_ID */ yytestcase(yyruleno==440);
+ case 441: /* column_alias ::= NK_ALIAS */ yytestcase(yyruleno==441);
+ case 442: /* user_name ::= NK_ID */ yytestcase(yyruleno==442);
+ case 443: /* topic_name ::= NK_ID */ yytestcase(yyruleno==443);
+ case 444: /* stream_name ::= NK_ID */ yytestcase(yyruleno==444);
+ case 445: /* cgroup_name ::= NK_ID */ yytestcase(yyruleno==445);
+ case 446: /* index_name ::= NK_ID */ yytestcase(yyruleno==446);
+ case 488: /* noarg_func ::= NOW */ yytestcase(yyruleno==488);
+ case 489: /* noarg_func ::= TODAY */ yytestcase(yyruleno==489);
+ case 490: /* noarg_func ::= TIMEZONE */ yytestcase(yyruleno==490);
+ case 491: /* noarg_func ::= DATABASE */ yytestcase(yyruleno==491);
+ case 492: /* noarg_func ::= CLIENT_VERSION */ yytestcase(yyruleno==492);
+ case 493: /* noarg_func ::= SERVER_VERSION */ yytestcase(yyruleno==493);
+ case 494: /* noarg_func ::= SERVER_STATUS */ yytestcase(yyruleno==494);
+ case 495: /* noarg_func ::= CURRENT_USER */ yytestcase(yyruleno==495);
+ case 496: /* noarg_func ::= USER */ yytestcase(yyruleno==496);
+ case 497: /* star_func ::= COUNT */ yytestcase(yyruleno==497);
+ 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);
+{ yylhsminor.yy561 = yymsp[0].minor.yy0; }
+ yymsp[0].minor.yy561 = yylhsminor.yy561;
break;
case 68: /* force_opt ::= */
- case 92: /* not_exists_opt ::= */ yytestcase(yyruleno==92);
- case 94: /* exists_opt ::= */ yytestcase(yyruleno==94);
- case 345: /* analyze_opt ::= */ yytestcase(yyruleno==345);
- case 352: /* agg_func_opt ::= */ yytestcase(yyruleno==352);
- case 358: /* or_replace_opt ::= */ yytestcase(yyruleno==358);
- case 384: /* ignore_opt ::= */ yytestcase(yyruleno==384);
- case 558: /* tag_mode_opt ::= */ yytestcase(yyruleno==558);
- case 560: /* set_quantifier_opt ::= */ yytestcase(yyruleno==560);
-#line 168 "sql.y"
-{ yymsp[1].minor.yy985 = false; }
-#line 5409 "sql.c"
+ case 94: /* not_exists_opt ::= */ yytestcase(yyruleno==94);
+ case 96: /* exists_opt ::= */ yytestcase(yyruleno==96);
+ case 350: /* analyze_opt ::= */ yytestcase(yyruleno==350);
+ case 357: /* agg_func_opt ::= */ yytestcase(yyruleno==357);
+ case 363: /* or_replace_opt ::= */ yytestcase(yyruleno==363);
+ case 389: /* ignore_opt ::= */ yytestcase(yyruleno==389);
+ case 563: /* tag_mode_opt ::= */ yytestcase(yyruleno==563);
+ case 565: /* set_quantifier_opt ::= */ yytestcase(yyruleno==565);
+{ yymsp[1].minor.yy845 = false; }
break;
case 69: /* force_opt ::= FORCE */
case 70: /* unsafe_opt ::= UNSAFE */ yytestcase(yyruleno==70);
- case 346: /* analyze_opt ::= ANALYZE */ yytestcase(yyruleno==346);
- case 353: /* agg_func_opt ::= AGGREGATE */ yytestcase(yyruleno==353);
- case 559: /* tag_mode_opt ::= TAGS */ yytestcase(yyruleno==559);
- case 561: /* set_quantifier_opt ::= DISTINCT */ yytestcase(yyruleno==561);
-#line 169 "sql.y"
-{ yymsp[0].minor.yy985 = true; }
-#line 5419 "sql.c"
+ case 351: /* analyze_opt ::= ANALYZE */ yytestcase(yyruleno==351);
+ 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);
+{ yymsp[0].minor.yy845 = true; }
break;
- case 71: /* cmd ::= ALTER LOCAL NK_STRING */
-#line 176 "sql.y"
+ case 71: /* cmd ::= ALTER CLUSTER NK_STRING */
+{ pCxt->pRootNode = createAlterClusterStmt(pCxt, &yymsp[0].minor.yy0, NULL); }
+ break;
+ case 72: /* cmd ::= ALTER CLUSTER NK_STRING NK_STRING */
+{ pCxt->pRootNode = createAlterClusterStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); }
+ break;
+ case 73: /* cmd ::= ALTER LOCAL NK_STRING */
{ pCxt->pRootNode = createAlterLocalStmt(pCxt, &yymsp[0].minor.yy0, NULL); }
-#line 5424 "sql.c"
break;
- case 72: /* cmd ::= ALTER LOCAL NK_STRING NK_STRING */
-#line 177 "sql.y"
+ case 74: /* cmd ::= ALTER LOCAL NK_STRING NK_STRING */
{ pCxt->pRootNode = createAlterLocalStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); }
-#line 5429 "sql.c"
break;
- case 73: /* cmd ::= CREATE QNODE ON DNODE NK_INTEGER */
-#line 180 "sql.y"
+ case 75: /* cmd ::= CREATE QNODE ON DNODE NK_INTEGER */
{ pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_QNODE_STMT, &yymsp[0].minor.yy0); }
-#line 5434 "sql.c"
break;
- case 74: /* cmd ::= DROP QNODE ON DNODE NK_INTEGER */
-#line 181 "sql.y"
+ case 76: /* cmd ::= DROP QNODE ON DNODE NK_INTEGER */
{ pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_QNODE_STMT, &yymsp[0].minor.yy0); }
-#line 5439 "sql.c"
break;
- case 75: /* cmd ::= RESTORE QNODE ON DNODE NK_INTEGER */
-#line 182 "sql.y"
+ case 77: /* cmd ::= RESTORE QNODE ON DNODE NK_INTEGER */
{ pCxt->pRootNode = createRestoreComponentNodeStmt(pCxt, QUERY_NODE_RESTORE_QNODE_STMT, &yymsp[0].minor.yy0); }
-#line 5444 "sql.c"
break;
- case 76: /* cmd ::= CREATE BNODE ON DNODE NK_INTEGER */
-#line 185 "sql.y"
+ case 78: /* cmd ::= CREATE BNODE ON DNODE NK_INTEGER */
{ pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_BNODE_STMT, &yymsp[0].minor.yy0); }
-#line 5449 "sql.c"
break;
- case 77: /* cmd ::= DROP BNODE ON DNODE NK_INTEGER */
-#line 186 "sql.y"
+ case 79: /* cmd ::= DROP BNODE ON DNODE NK_INTEGER */
{ pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_BNODE_STMT, &yymsp[0].minor.yy0); }
-#line 5454 "sql.c"
break;
- case 78: /* cmd ::= CREATE SNODE ON DNODE NK_INTEGER */
-#line 189 "sql.y"
+ case 80: /* cmd ::= CREATE SNODE ON DNODE NK_INTEGER */
{ pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_SNODE_STMT, &yymsp[0].minor.yy0); }
-#line 5459 "sql.c"
break;
- case 79: /* cmd ::= DROP SNODE ON DNODE NK_INTEGER */
-#line 190 "sql.y"
+ case 81: /* cmd ::= DROP SNODE ON DNODE NK_INTEGER */
{ pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_SNODE_STMT, &yymsp[0].minor.yy0); }
-#line 5464 "sql.c"
break;
- case 80: /* cmd ::= CREATE MNODE ON DNODE NK_INTEGER */
-#line 193 "sql.y"
+ case 82: /* cmd ::= CREATE MNODE ON DNODE NK_INTEGER */
{ pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_MNODE_STMT, &yymsp[0].minor.yy0); }
-#line 5469 "sql.c"
break;
- case 81: /* cmd ::= DROP MNODE ON DNODE NK_INTEGER */
-#line 194 "sql.y"
+ case 83: /* cmd ::= DROP MNODE ON DNODE NK_INTEGER */
{ pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_MNODE_STMT, &yymsp[0].minor.yy0); }
-#line 5474 "sql.c"
break;
- case 82: /* cmd ::= RESTORE MNODE ON DNODE NK_INTEGER */
-#line 195 "sql.y"
+ case 84: /* cmd ::= RESTORE MNODE ON DNODE NK_INTEGER */
{ pCxt->pRootNode = createRestoreComponentNodeStmt(pCxt, QUERY_NODE_RESTORE_MNODE_STMT, &yymsp[0].minor.yy0); }
-#line 5479 "sql.c"
break;
- case 83: /* cmd ::= RESTORE VNODE ON DNODE NK_INTEGER */
-#line 198 "sql.y"
+ case 85: /* cmd ::= RESTORE VNODE ON DNODE NK_INTEGER */
{ pCxt->pRootNode = createRestoreComponentNodeStmt(pCxt, QUERY_NODE_RESTORE_VNODE_STMT, &yymsp[0].minor.yy0); }
-#line 5484 "sql.c"
break;
- case 84: /* cmd ::= CREATE DATABASE not_exists_opt db_name db_options */
-#line 201 "sql.y"
-{ pCxt->pRootNode = createCreateDatabaseStmt(pCxt, yymsp[-2].minor.yy985, &yymsp[-1].minor.yy993, yymsp[0].minor.yy232); }
-#line 5489 "sql.c"
+ case 86: /* cmd ::= CREATE DATABASE not_exists_opt db_name db_options */
+{ pCxt->pRootNode = createCreateDatabaseStmt(pCxt, yymsp[-2].minor.yy845, &yymsp[-1].minor.yy561, yymsp[0].minor.yy490); }
break;
- case 85: /* cmd ::= DROP DATABASE exists_opt db_name */
-#line 202 "sql.y"
-{ pCxt->pRootNode = createDropDatabaseStmt(pCxt, yymsp[-1].minor.yy985, &yymsp[0].minor.yy993); }
-#line 5494 "sql.c"
+ case 87: /* cmd ::= DROP DATABASE exists_opt db_name */
+{ pCxt->pRootNode = createDropDatabaseStmt(pCxt, yymsp[-1].minor.yy845, &yymsp[0].minor.yy561); }
break;
- case 86: /* cmd ::= USE db_name */
-#line 203 "sql.y"
-{ pCxt->pRootNode = createUseDatabaseStmt(pCxt, &yymsp[0].minor.yy993); }
-#line 5499 "sql.c"
+ case 88: /* cmd ::= USE db_name */
+{ pCxt->pRootNode = createUseDatabaseStmt(pCxt, &yymsp[0].minor.yy561); }
break;
- case 87: /* cmd ::= ALTER DATABASE db_name alter_db_options */
-#line 204 "sql.y"
-{ pCxt->pRootNode = createAlterDatabaseStmt(pCxt, &yymsp[-1].minor.yy993, yymsp[0].minor.yy232); }
-#line 5504 "sql.c"
+ case 89: /* cmd ::= ALTER DATABASE db_name alter_db_options */
+{ pCxt->pRootNode = createAlterDatabaseStmt(pCxt, &yymsp[-1].minor.yy561, yymsp[0].minor.yy490); }
break;
- case 88: /* cmd ::= FLUSH DATABASE db_name */
-#line 205 "sql.y"
-{ pCxt->pRootNode = createFlushDatabaseStmt(pCxt, &yymsp[0].minor.yy993); }
-#line 5509 "sql.c"
+ case 90: /* cmd ::= FLUSH DATABASE db_name */
+{ pCxt->pRootNode = createFlushDatabaseStmt(pCxt, &yymsp[0].minor.yy561); }
break;
- case 89: /* cmd ::= TRIM DATABASE db_name speed_opt */
-#line 206 "sql.y"
-{ pCxt->pRootNode = createTrimDatabaseStmt(pCxt, &yymsp[-1].minor.yy993, yymsp[0].minor.yy92); }
-#line 5514 "sql.c"
+ case 91: /* cmd ::= TRIM DATABASE db_name speed_opt */
+{ pCxt->pRootNode = createTrimDatabaseStmt(pCxt, &yymsp[-1].minor.yy561, yymsp[0].minor.yy774); }
break;
- case 90: /* cmd ::= COMPACT DATABASE db_name start_opt end_opt */
-#line 207 "sql.y"
-{ pCxt->pRootNode = createCompactStmt(pCxt, &yymsp[-2].minor.yy993, yymsp[-1].minor.yy232, yymsp[0].minor.yy232); }
-#line 5519 "sql.c"
+ case 92: /* cmd ::= COMPACT DATABASE db_name start_opt end_opt */
+{ pCxt->pRootNode = createCompactStmt(pCxt, &yymsp[-2].minor.yy561, yymsp[-1].minor.yy490, yymsp[0].minor.yy490); }
break;
- case 91: /* not_exists_opt ::= IF NOT EXISTS */
-#line 211 "sql.y"
-{ yymsp[-2].minor.yy985 = true; }
-#line 5524 "sql.c"
+ case 93: /* not_exists_opt ::= IF NOT EXISTS */
+{ yymsp[-2].minor.yy845 = true; }
break;
- case 93: /* exists_opt ::= IF EXISTS */
- case 359: /* or_replace_opt ::= OR REPLACE */ yytestcase(yyruleno==359);
- case 385: /* ignore_opt ::= IGNORE UNTREATED */ yytestcase(yyruleno==385);
-#line 216 "sql.y"
-{ yymsp[-1].minor.yy985 = true; }
-#line 5531 "sql.c"
+ 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);
+{ yymsp[-1].minor.yy845 = true; }
break;
- case 95: /* db_options ::= */
-#line 219 "sql.y"
-{ yymsp[1].minor.yy232 = createDefaultDatabaseOptions(pCxt); }
-#line 5536 "sql.c"
+ case 97: /* db_options ::= */
+{ yymsp[1].minor.yy490 = createDefaultDatabaseOptions(pCxt); }
break;
- case 96: /* db_options ::= db_options BUFFER NK_INTEGER */
-#line 220 "sql.y"
-{ yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_BUFFER, &yymsp[0].minor.yy0); }
-#line 5541 "sql.c"
- yymsp[-2].minor.yy232 = yylhsminor.yy232;
+ case 98: /* db_options ::= db_options BUFFER NK_INTEGER */
+{ yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-2].minor.yy490, DB_OPTION_BUFFER, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
- case 97: /* db_options ::= db_options CACHEMODEL NK_STRING */
-#line 221 "sql.y"
-{ yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_CACHEMODEL, &yymsp[0].minor.yy0); }
-#line 5547 "sql.c"
- yymsp[-2].minor.yy232 = yylhsminor.yy232;
+ case 99: /* db_options ::= db_options CACHEMODEL NK_STRING */
+{ yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-2].minor.yy490, DB_OPTION_CACHEMODEL, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
- case 98: /* db_options ::= db_options CACHESIZE NK_INTEGER */
-#line 222 "sql.y"
-{ yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_CACHESIZE, &yymsp[0].minor.yy0); }
-#line 5553 "sql.c"
- yymsp[-2].minor.yy232 = yylhsminor.yy232;
+ case 100: /* db_options ::= db_options CACHESIZE NK_INTEGER */
+{ yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-2].minor.yy490, DB_OPTION_CACHESIZE, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
- case 99: /* db_options ::= db_options COMP NK_INTEGER */
-#line 223 "sql.y"
-{ yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_COMP, &yymsp[0].minor.yy0); }
-#line 5559 "sql.c"
- yymsp[-2].minor.yy232 = yylhsminor.yy232;
+ case 101: /* db_options ::= db_options COMP NK_INTEGER */
+{ yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-2].minor.yy490, DB_OPTION_COMP, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
- case 100: /* db_options ::= db_options DURATION NK_INTEGER */
- case 101: /* db_options ::= db_options DURATION NK_VARIABLE */ yytestcase(yyruleno==101);
-#line 224 "sql.y"
-{ yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_DAYS, &yymsp[0].minor.yy0); }
-#line 5566 "sql.c"
- yymsp[-2].minor.yy232 = yylhsminor.yy232;
+ case 102: /* db_options ::= db_options DURATION NK_INTEGER */
+ case 103: /* db_options ::= db_options DURATION NK_VARIABLE */ yytestcase(yyruleno==103);
+{ yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-2].minor.yy490, DB_OPTION_DAYS, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
- case 102: /* db_options ::= db_options MAXROWS NK_INTEGER */
-#line 226 "sql.y"
-{ yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_MAXROWS, &yymsp[0].minor.yy0); }
-#line 5572 "sql.c"
- yymsp[-2].minor.yy232 = yylhsminor.yy232;
+ case 104: /* db_options ::= db_options MAXROWS NK_INTEGER */
+{ yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-2].minor.yy490, DB_OPTION_MAXROWS, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
- case 103: /* db_options ::= db_options MINROWS NK_INTEGER */
-#line 227 "sql.y"
-{ yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_MINROWS, &yymsp[0].minor.yy0); }
-#line 5578 "sql.c"
- yymsp[-2].minor.yy232 = yylhsminor.yy232;
+ case 105: /* db_options ::= db_options MINROWS NK_INTEGER */
+{ yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-2].minor.yy490, DB_OPTION_MINROWS, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
- case 104: /* db_options ::= db_options KEEP integer_list */
- case 105: /* db_options ::= db_options KEEP variable_list */ yytestcase(yyruleno==105);
-#line 228 "sql.y"
-{ yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_KEEP, yymsp[0].minor.yy88); }
-#line 5585 "sql.c"
- yymsp[-2].minor.yy232 = yylhsminor.yy232;
+ case 106: /* db_options ::= db_options KEEP integer_list */
+ case 107: /* db_options ::= db_options KEEP variable_list */ yytestcase(yyruleno==107);
+{ yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-2].minor.yy490, DB_OPTION_KEEP, yymsp[0].minor.yy502); }
+ yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
- case 106: /* db_options ::= db_options PAGES NK_INTEGER */
-#line 230 "sql.y"
-{ yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_PAGES, &yymsp[0].minor.yy0); }
-#line 5591 "sql.c"
- yymsp[-2].minor.yy232 = yylhsminor.yy232;
+ case 108: /* db_options ::= db_options PAGES NK_INTEGER */
+{ yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-2].minor.yy490, DB_OPTION_PAGES, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
- case 107: /* db_options ::= db_options PAGESIZE NK_INTEGER */
-#line 231 "sql.y"
-{ yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_PAGESIZE, &yymsp[0].minor.yy0); }
-#line 5597 "sql.c"
- yymsp[-2].minor.yy232 = yylhsminor.yy232;
+ case 109: /* db_options ::= db_options PAGESIZE NK_INTEGER */
+{ yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-2].minor.yy490, DB_OPTION_PAGESIZE, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
- case 108: /* db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */
-#line 232 "sql.y"
-{ yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_TSDB_PAGESIZE, &yymsp[0].minor.yy0); }
-#line 5603 "sql.c"
- yymsp[-2].minor.yy232 = yylhsminor.yy232;
+ case 110: /* db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */
+{ yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-2].minor.yy490, DB_OPTION_TSDB_PAGESIZE, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
- case 109: /* db_options ::= db_options PRECISION NK_STRING */
-#line 233 "sql.y"
-{ yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_PRECISION, &yymsp[0].minor.yy0); }
-#line 5609 "sql.c"
- yymsp[-2].minor.yy232 = yylhsminor.yy232;
+ case 111: /* db_options ::= db_options PRECISION NK_STRING */
+{ yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-2].minor.yy490, DB_OPTION_PRECISION, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
- case 110: /* db_options ::= db_options REPLICA NK_INTEGER */
-#line 234 "sql.y"
-{ yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_REPLICA, &yymsp[0].minor.yy0); }
-#line 5615 "sql.c"
- yymsp[-2].minor.yy232 = yylhsminor.yy232;
+ case 112: /* db_options ::= db_options REPLICA NK_INTEGER */
+{ yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-2].minor.yy490, DB_OPTION_REPLICA, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
- case 111: /* db_options ::= db_options VGROUPS NK_INTEGER */
-#line 236 "sql.y"
-{ yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_VGROUPS, &yymsp[0].minor.yy0); }
-#line 5621 "sql.c"
- yymsp[-2].minor.yy232 = yylhsminor.yy232;
+ case 113: /* db_options ::= db_options VGROUPS NK_INTEGER */
+{ yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-2].minor.yy490, DB_OPTION_VGROUPS, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
- case 112: /* db_options ::= db_options SINGLE_STABLE NK_INTEGER */
-#line 237 "sql.y"
-{ yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_SINGLE_STABLE, &yymsp[0].minor.yy0); }
-#line 5627 "sql.c"
- yymsp[-2].minor.yy232 = yylhsminor.yy232;
+ case 114: /* db_options ::= db_options SINGLE_STABLE NK_INTEGER */
+{ yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-2].minor.yy490, DB_OPTION_SINGLE_STABLE, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
- case 113: /* db_options ::= db_options RETENTIONS retention_list */
-#line 238 "sql.y"
-{ yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_RETENTIONS, yymsp[0].minor.yy88); }
-#line 5633 "sql.c"
- yymsp[-2].minor.yy232 = yylhsminor.yy232;
+ case 115: /* db_options ::= db_options RETENTIONS retention_list */
+{ yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-2].minor.yy490, DB_OPTION_RETENTIONS, yymsp[0].minor.yy502); }
+ yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
- case 114: /* db_options ::= db_options SCHEMALESS NK_INTEGER */
-#line 239 "sql.y"
-{ yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_SCHEMALESS, &yymsp[0].minor.yy0); }
-#line 5639 "sql.c"
- yymsp[-2].minor.yy232 = yylhsminor.yy232;
+ case 116: /* db_options ::= db_options SCHEMALESS NK_INTEGER */
+{ yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-2].minor.yy490, DB_OPTION_SCHEMALESS, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
- case 115: /* db_options ::= db_options WAL_LEVEL NK_INTEGER */
-#line 240 "sql.y"
-{ yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_WAL, &yymsp[0].minor.yy0); }
-#line 5645 "sql.c"
- yymsp[-2].minor.yy232 = yylhsminor.yy232;
+ case 117: /* db_options ::= db_options WAL_LEVEL NK_INTEGER */
+{ yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-2].minor.yy490, DB_OPTION_WAL, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
- case 116: /* db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */
-#line 241 "sql.y"
-{ yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_FSYNC, &yymsp[0].minor.yy0); }
-#line 5651 "sql.c"
- yymsp[-2].minor.yy232 = yylhsminor.yy232;
+ case 118: /* db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */
+{ yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-2].minor.yy490, DB_OPTION_FSYNC, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
- case 117: /* db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */
-#line 242 "sql.y"
-{ yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_WAL_RETENTION_PERIOD, &yymsp[0].minor.yy0); }
-#line 5657 "sql.c"
- yymsp[-2].minor.yy232 = yylhsminor.yy232;
+ case 119: /* db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */
+{ yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-2].minor.yy490, DB_OPTION_WAL_RETENTION_PERIOD, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
- case 118: /* db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */
-#line 243 "sql.y"
+ case 120: /* db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */
{
SToken t = yymsp[-1].minor.yy0;
t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z;
- yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-3].minor.yy232, DB_OPTION_WAL_RETENTION_PERIOD, &t);
+ yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-3].minor.yy490, DB_OPTION_WAL_RETENTION_PERIOD, &t);
}
-#line 5667 "sql.c"
- yymsp[-3].minor.yy232 = yylhsminor.yy232;
+ yymsp[-3].minor.yy490 = yylhsminor.yy490;
break;
- case 119: /* db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */
-#line 248 "sql.y"
-{ yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_WAL_RETENTION_SIZE, &yymsp[0].minor.yy0); }
-#line 5673 "sql.c"
- yymsp[-2].minor.yy232 = yylhsminor.yy232;
+ case 121: /* db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */
+{ yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-2].minor.yy490, DB_OPTION_WAL_RETENTION_SIZE, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
- case 120: /* db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */
-#line 249 "sql.y"
+ case 122: /* db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */
{
SToken t = yymsp[-1].minor.yy0;
t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z;
- yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-3].minor.yy232, DB_OPTION_WAL_RETENTION_SIZE, &t);
+ yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-3].minor.yy490, DB_OPTION_WAL_RETENTION_SIZE, &t);
}
-#line 5683 "sql.c"
- yymsp[-3].minor.yy232 = yylhsminor.yy232;
+ yymsp[-3].minor.yy490 = yylhsminor.yy490;
break;
- case 121: /* db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */
-#line 254 "sql.y"
-{ yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_WAL_ROLL_PERIOD, &yymsp[0].minor.yy0); }
-#line 5689 "sql.c"
- yymsp[-2].minor.yy232 = yylhsminor.yy232;
+ case 123: /* db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */
+{ yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-2].minor.yy490, DB_OPTION_WAL_ROLL_PERIOD, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
- case 122: /* db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */
-#line 255 "sql.y"
-{ yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_WAL_SEGMENT_SIZE, &yymsp[0].minor.yy0); }
-#line 5695 "sql.c"
- yymsp[-2].minor.yy232 = yylhsminor.yy232;
+ case 124: /* db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */
+{ yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-2].minor.yy490, DB_OPTION_WAL_SEGMENT_SIZE, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
- case 123: /* db_options ::= db_options STT_TRIGGER NK_INTEGER */
-#line 256 "sql.y"
-{ yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_STT_TRIGGER, &yymsp[0].minor.yy0); }
-#line 5701 "sql.c"
- yymsp[-2].minor.yy232 = yylhsminor.yy232;
+ case 125: /* db_options ::= db_options STT_TRIGGER NK_INTEGER */
+{ yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-2].minor.yy490, DB_OPTION_STT_TRIGGER, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
- case 124: /* db_options ::= db_options TABLE_PREFIX signed */
-#line 257 "sql.y"
-{ yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_TABLE_PREFIX, yymsp[0].minor.yy232); }
-#line 5707 "sql.c"
- yymsp[-2].minor.yy232 = yylhsminor.yy232;
+ case 126: /* db_options ::= db_options TABLE_PREFIX signed */
+{ yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-2].minor.yy490, DB_OPTION_TABLE_PREFIX, yymsp[0].minor.yy490); }
+ yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
- case 125: /* db_options ::= db_options TABLE_SUFFIX signed */
-#line 258 "sql.y"
-{ yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_TABLE_SUFFIX, yymsp[0].minor.yy232); }
-#line 5713 "sql.c"
- yymsp[-2].minor.yy232 = yylhsminor.yy232;
+ case 127: /* db_options ::= db_options TABLE_SUFFIX signed */
+{ yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-2].minor.yy490, DB_OPTION_TABLE_SUFFIX, yymsp[0].minor.yy490); }
+ yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
- case 126: /* db_options ::= db_options KEEP_TIME_OFFSET NK_INTEGER */
-#line 259 "sql.y"
-{ yylhsminor.yy232 = setDatabaseOption(pCxt, yymsp[-2].minor.yy232, DB_OPTION_KEEP_TIME_OFFSET, &yymsp[0].minor.yy0); }
-#line 5719 "sql.c"
- yymsp[-2].minor.yy232 = yylhsminor.yy232;
+ case 128: /* db_options ::= db_options KEEP_TIME_OFFSET NK_INTEGER */
+{ yylhsminor.yy490 = setDatabaseOption(pCxt, yymsp[-2].minor.yy490, DB_OPTION_KEEP_TIME_OFFSET, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
- case 127: /* alter_db_options ::= alter_db_option */
-#line 261 "sql.y"
-{ yylhsminor.yy232 = createAlterDatabaseOptions(pCxt); yylhsminor.yy232 = setAlterDatabaseOption(pCxt, yylhsminor.yy232, &yymsp[0].minor.yy117); }
-#line 5725 "sql.c"
- yymsp[0].minor.yy232 = yylhsminor.yy232;
+ case 129: /* alter_db_options ::= alter_db_option */
+{ yylhsminor.yy490 = createAlterDatabaseOptions(pCxt); yylhsminor.yy490 = setAlterDatabaseOption(pCxt, yylhsminor.yy490, &yymsp[0].minor.yy529); }
+ yymsp[0].minor.yy490 = yylhsminor.yy490;
break;
- case 128: /* alter_db_options ::= alter_db_options alter_db_option */
-#line 262 "sql.y"
-{ yylhsminor.yy232 = setAlterDatabaseOption(pCxt, yymsp[-1].minor.yy232, &yymsp[0].minor.yy117); }
-#line 5731 "sql.c"
- yymsp[-1].minor.yy232 = yylhsminor.yy232;
+ case 130: /* alter_db_options ::= alter_db_options alter_db_option */
+{ yylhsminor.yy490 = setAlterDatabaseOption(pCxt, yymsp[-1].minor.yy490, &yymsp[0].minor.yy529); }
+ yymsp[-1].minor.yy490 = yylhsminor.yy490;
break;
- case 129: /* alter_db_option ::= BUFFER NK_INTEGER */
-#line 266 "sql.y"
-{ yymsp[-1].minor.yy117.type = DB_OPTION_BUFFER; yymsp[-1].minor.yy117.val = yymsp[0].minor.yy0; }
-#line 5737 "sql.c"
+ case 131: /* alter_db_option ::= BUFFER NK_INTEGER */
+{ yymsp[-1].minor.yy529.type = DB_OPTION_BUFFER; yymsp[-1].minor.yy529.val = yymsp[0].minor.yy0; }
break;
- case 130: /* alter_db_option ::= CACHEMODEL NK_STRING */
-#line 267 "sql.y"
-{ yymsp[-1].minor.yy117.type = DB_OPTION_CACHEMODEL; yymsp[-1].minor.yy117.val = yymsp[0].minor.yy0; }
-#line 5742 "sql.c"
+ case 132: /* alter_db_option ::= CACHEMODEL NK_STRING */
+{ yymsp[-1].minor.yy529.type = DB_OPTION_CACHEMODEL; yymsp[-1].minor.yy529.val = yymsp[0].minor.yy0; }
break;
- case 131: /* alter_db_option ::= CACHESIZE NK_INTEGER */
-#line 268 "sql.y"
-{ yymsp[-1].minor.yy117.type = DB_OPTION_CACHESIZE; yymsp[-1].minor.yy117.val = yymsp[0].minor.yy0; }
-#line 5747 "sql.c"
+ case 133: /* alter_db_option ::= CACHESIZE NK_INTEGER */
+{ yymsp[-1].minor.yy529.type = DB_OPTION_CACHESIZE; yymsp[-1].minor.yy529.val = yymsp[0].minor.yy0; }
break;
- case 132: /* alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */
-#line 269 "sql.y"
-{ yymsp[-1].minor.yy117.type = DB_OPTION_FSYNC; yymsp[-1].minor.yy117.val = yymsp[0].minor.yy0; }
-#line 5752 "sql.c"
+ case 134: /* alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */
+{ yymsp[-1].minor.yy529.type = DB_OPTION_FSYNC; yymsp[-1].minor.yy529.val = yymsp[0].minor.yy0; }
break;
- case 133: /* alter_db_option ::= KEEP integer_list */
- case 134: /* alter_db_option ::= KEEP variable_list */ yytestcase(yyruleno==134);
-#line 270 "sql.y"
-{ yymsp[-1].minor.yy117.type = DB_OPTION_KEEP; yymsp[-1].minor.yy117.pList = yymsp[0].minor.yy88; }
-#line 5758 "sql.c"
+ case 135: /* alter_db_option ::= KEEP integer_list */
+ case 136: /* alter_db_option ::= KEEP variable_list */ yytestcase(yyruleno==136);
+{ yymsp[-1].minor.yy529.type = DB_OPTION_KEEP; yymsp[-1].minor.yy529.pList = yymsp[0].minor.yy502; }
break;
- case 135: /* alter_db_option ::= PAGES NK_INTEGER */
-#line 272 "sql.y"
-{ yymsp[-1].minor.yy117.type = DB_OPTION_PAGES; yymsp[-1].minor.yy117.val = yymsp[0].minor.yy0; }
-#line 5763 "sql.c"
+ case 137: /* alter_db_option ::= PAGES NK_INTEGER */
+{ yymsp[-1].minor.yy529.type = DB_OPTION_PAGES; yymsp[-1].minor.yy529.val = yymsp[0].minor.yy0; }
break;
- case 136: /* alter_db_option ::= REPLICA NK_INTEGER */
-#line 273 "sql.y"
-{ yymsp[-1].minor.yy117.type = DB_OPTION_REPLICA; yymsp[-1].minor.yy117.val = yymsp[0].minor.yy0; }
-#line 5768 "sql.c"
+ case 138: /* alter_db_option ::= REPLICA NK_INTEGER */
+{ yymsp[-1].minor.yy529.type = DB_OPTION_REPLICA; yymsp[-1].minor.yy529.val = yymsp[0].minor.yy0; }
break;
- case 137: /* alter_db_option ::= WAL_LEVEL NK_INTEGER */
-#line 275 "sql.y"
-{ yymsp[-1].minor.yy117.type = DB_OPTION_WAL; yymsp[-1].minor.yy117.val = yymsp[0].minor.yy0; }
-#line 5773 "sql.c"
+ case 139: /* alter_db_option ::= WAL_LEVEL NK_INTEGER */
+{ yymsp[-1].minor.yy529.type = DB_OPTION_WAL; yymsp[-1].minor.yy529.val = yymsp[0].minor.yy0; }
break;
- case 138: /* alter_db_option ::= STT_TRIGGER NK_INTEGER */
-#line 276 "sql.y"
-{ yymsp[-1].minor.yy117.type = DB_OPTION_STT_TRIGGER; yymsp[-1].minor.yy117.val = yymsp[0].minor.yy0; }
-#line 5778 "sql.c"
+ case 140: /* alter_db_option ::= STT_TRIGGER NK_INTEGER */
+{ yymsp[-1].minor.yy529.type = DB_OPTION_STT_TRIGGER; yymsp[-1].minor.yy529.val = yymsp[0].minor.yy0; }
break;
- case 139: /* alter_db_option ::= MINROWS NK_INTEGER */
-#line 277 "sql.y"
-{ yymsp[-1].minor.yy117.type = DB_OPTION_MINROWS; yymsp[-1].minor.yy117.val = yymsp[0].minor.yy0; }
-#line 5783 "sql.c"
+ case 141: /* alter_db_option ::= MINROWS NK_INTEGER */
+{ yymsp[-1].minor.yy529.type = DB_OPTION_MINROWS; yymsp[-1].minor.yy529.val = yymsp[0].minor.yy0; }
break;
- case 140: /* alter_db_option ::= WAL_RETENTION_PERIOD NK_INTEGER */
-#line 278 "sql.y"
-{ yymsp[-1].minor.yy117.type = DB_OPTION_WAL_RETENTION_PERIOD; yymsp[-1].minor.yy117.val = yymsp[0].minor.yy0; }
-#line 5788 "sql.c"
+ case 142: /* alter_db_option ::= WAL_RETENTION_PERIOD NK_INTEGER */
+{ yymsp[-1].minor.yy529.type = DB_OPTION_WAL_RETENTION_PERIOD; yymsp[-1].minor.yy529.val = yymsp[0].minor.yy0; }
break;
- case 141: /* alter_db_option ::= WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */
-#line 279 "sql.y"
+ case 143: /* alter_db_option ::= WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */
{
SToken t = yymsp[-1].minor.yy0;
t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z;
- yymsp[-2].minor.yy117.type = DB_OPTION_WAL_RETENTION_PERIOD; yymsp[-2].minor.yy117.val = t;
+ yymsp[-2].minor.yy529.type = DB_OPTION_WAL_RETENTION_PERIOD; yymsp[-2].minor.yy529.val = t;
}
-#line 5797 "sql.c"
break;
- case 142: /* alter_db_option ::= WAL_RETENTION_SIZE NK_INTEGER */
-#line 284 "sql.y"
-{ yymsp[-1].minor.yy117.type = DB_OPTION_WAL_RETENTION_SIZE; yymsp[-1].minor.yy117.val = yymsp[0].minor.yy0; }
-#line 5802 "sql.c"
+ case 144: /* alter_db_option ::= WAL_RETENTION_SIZE NK_INTEGER */
+{ yymsp[-1].minor.yy529.type = DB_OPTION_WAL_RETENTION_SIZE; yymsp[-1].minor.yy529.val = yymsp[0].minor.yy0; }
break;
- case 143: /* alter_db_option ::= WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */
-#line 285 "sql.y"
+ case 145: /* alter_db_option ::= WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */
{
SToken t = yymsp[-1].minor.yy0;
t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z;
- yymsp[-2].minor.yy117.type = DB_OPTION_WAL_RETENTION_SIZE; yymsp[-2].minor.yy117.val = t;
+ yymsp[-2].minor.yy529.type = DB_OPTION_WAL_RETENTION_SIZE; yymsp[-2].minor.yy529.val = t;
}
-#line 5811 "sql.c"
- break;
- case 144: /* alter_db_option ::= KEEP_TIME_OFFSET NK_INTEGER */
-#line 290 "sql.y"
-{ yymsp[-1].minor.yy117.type = DB_OPTION_KEEP_TIME_OFFSET; yymsp[-1].minor.yy117.val = yymsp[0].minor.yy0; }
-#line 5816 "sql.c"
- break;
- case 145: /* integer_list ::= NK_INTEGER */
-#line 294 "sql.y"
-{ yylhsminor.yy88 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); }
-#line 5821 "sql.c"
- yymsp[0].minor.yy88 = yylhsminor.yy88;
- break;
- case 146: /* integer_list ::= integer_list NK_COMMA NK_INTEGER */
- case 398: /* dnode_list ::= dnode_list DNODE NK_INTEGER */ yytestcase(yyruleno==398);
-#line 295 "sql.y"
-{ yylhsminor.yy88 = addNodeToList(pCxt, yymsp[-2].minor.yy88, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); }
-#line 5828 "sql.c"
- yymsp[-2].minor.yy88 = yylhsminor.yy88;
- break;
- case 147: /* variable_list ::= NK_VARIABLE */
-#line 299 "sql.y"
-{ yylhsminor.yy88 = createNodeList(pCxt, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); }
-#line 5834 "sql.c"
- yymsp[0].minor.yy88 = yylhsminor.yy88;
- break;
- case 148: /* variable_list ::= variable_list NK_COMMA NK_VARIABLE */
-#line 300 "sql.y"
-{ yylhsminor.yy88 = addNodeToList(pCxt, yymsp[-2].minor.yy88, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); }
-#line 5840 "sql.c"
- yymsp[-2].minor.yy88 = yylhsminor.yy88;
- break;
- case 149: /* retention_list ::= retention */
- case 180: /* multi_create_clause ::= create_subtable_clause */ yytestcase(yyruleno==180);
- case 183: /* multi_drop_clause ::= drop_table_clause */ yytestcase(yyruleno==183);
- case 190: /* column_def_list ::= column_def */ yytestcase(yyruleno==190);
- case 234: /* rollup_func_list ::= rollup_func_name */ yytestcase(yyruleno==234);
- case 239: /* col_name_list ::= col_name */ yytestcase(yyruleno==239);
- case 303: /* tag_list_opt ::= tag_item */ yytestcase(yyruleno==303);
- case 320: /* func_list ::= func */ yytestcase(yyruleno==320);
- case 427: /* literal_list ::= signed_literal */ yytestcase(yyruleno==427);
- case 498: /* other_para_list ::= star_func_para */ yytestcase(yyruleno==498);
- case 504: /* when_then_list ::= when_then_expr */ yytestcase(yyruleno==504);
- case 563: /* select_list ::= select_item */ yytestcase(yyruleno==563);
- case 574: /* partition_list ::= partition_item */ yytestcase(yyruleno==574);
- case 633: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==633);
-#line 304 "sql.y"
-{ yylhsminor.yy88 = createNodeList(pCxt, yymsp[0].minor.yy232); }
-#line 5859 "sql.c"
- yymsp[0].minor.yy88 = yylhsminor.yy88;
- break;
- case 150: /* retention_list ::= retention_list NK_COMMA retention */
- case 184: /* multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause */ yytestcase(yyruleno==184);
- case 191: /* column_def_list ::= column_def_list NK_COMMA column_def */ yytestcase(yyruleno==191);
- case 235: /* rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ yytestcase(yyruleno==235);
- case 240: /* col_name_list ::= col_name_list NK_COMMA col_name */ yytestcase(yyruleno==240);
- case 304: /* tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ yytestcase(yyruleno==304);
- case 321: /* func_list ::= func_list NK_COMMA func */ yytestcase(yyruleno==321);
- case 428: /* literal_list ::= literal_list NK_COMMA signed_literal */ yytestcase(yyruleno==428);
- case 499: /* other_para_list ::= other_para_list NK_COMMA star_func_para */ yytestcase(yyruleno==499);
- case 564: /* select_list ::= select_list NK_COMMA select_item */ yytestcase(yyruleno==564);
- case 575: /* partition_list ::= partition_list NK_COMMA partition_item */ yytestcase(yyruleno==575);
- case 634: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==634);
-#line 305 "sql.y"
-{ yylhsminor.yy88 = addNodeToList(pCxt, yymsp[-2].minor.yy88, yymsp[0].minor.yy232); }
-#line 5876 "sql.c"
- yymsp[-2].minor.yy88 = yylhsminor.yy88;
- break;
- case 151: /* retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */
- case 152: /* retention ::= NK_MINUS NK_COLON NK_VARIABLE */ yytestcase(yyruleno==152);
-#line 307 "sql.y"
-{ yylhsminor.yy232 = createNodeListNodeEx(pCxt, createDurationValueNode(pCxt, &yymsp[-2].minor.yy0), createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); }
-#line 5883 "sql.c"
- yymsp[-2].minor.yy232 = yylhsminor.yy232;
- break;
- case 153: /* speed_opt ::= */
- case 354: /* bufsize_opt ::= */ yytestcase(yyruleno==354);
-#line 312 "sql.y"
-{ yymsp[1].minor.yy92 = 0; }
-#line 5890 "sql.c"
- break;
- case 154: /* speed_opt ::= BWLIMIT NK_INTEGER */
- case 355: /* bufsize_opt ::= BUFSIZE NK_INTEGER */ yytestcase(yyruleno==355);
-#line 313 "sql.y"
-{ yymsp[-1].minor.yy92 = taosStr2Int32(yymsp[0].minor.yy0.z, NULL, 10); }
-#line 5896 "sql.c"
- break;
- case 156: /* start_opt ::= START WITH NK_INTEGER */
- case 160: /* end_opt ::= END WITH NK_INTEGER */ yytestcase(yyruleno==160);
-#line 316 "sql.y"
-{ yymsp[-2].minor.yy232 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); }
-#line 5902 "sql.c"
- break;
- case 157: /* start_opt ::= START WITH NK_STRING */
- case 161: /* end_opt ::= END WITH NK_STRING */ yytestcase(yyruleno==161);
-#line 317 "sql.y"
-{ yymsp[-2].minor.yy232 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); }
-#line 5908 "sql.c"
- break;
- case 158: /* start_opt ::= START WITH TIMESTAMP NK_STRING */
- case 162: /* end_opt ::= END WITH TIMESTAMP NK_STRING */ yytestcase(yyruleno==162);
-#line 318 "sql.y"
-{ yymsp[-3].minor.yy232 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); }
-#line 5914 "sql.c"
- break;
- case 163: /* cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */
- case 165: /* cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ yytestcase(yyruleno==165);
-#line 327 "sql.y"
-{ pCxt->pRootNode = createCreateTableStmt(pCxt, yymsp[-6].minor.yy985, yymsp[-5].minor.yy232, yymsp[-3].minor.yy88, yymsp[-1].minor.yy88, yymsp[0].minor.yy232); }
-#line 5920 "sql.c"
- break;
- case 164: /* cmd ::= CREATE TABLE multi_create_clause */
-#line 328 "sql.y"
-{ pCxt->pRootNode = createCreateMultiTableStmt(pCxt, yymsp[0].minor.yy88); }
-#line 5925 "sql.c"
- break;
- case 166: /* cmd ::= DROP TABLE multi_drop_clause */
-#line 331 "sql.y"
-{ pCxt->pRootNode = createDropTableStmt(pCxt, yymsp[0].minor.yy88); }
-#line 5930 "sql.c"
- break;
- case 167: /* cmd ::= DROP STABLE exists_opt full_table_name */
-#line 332 "sql.y"
-{ pCxt->pRootNode = createDropSuperTableStmt(pCxt, yymsp[-1].minor.yy985, yymsp[0].minor.yy232); }
-#line 5935 "sql.c"
- break;
- case 168: /* cmd ::= ALTER TABLE alter_table_clause */
- case 400: /* cmd ::= query_or_subquery */ yytestcase(yyruleno==400);
- case 401: /* cmd ::= insert_query */ yytestcase(yyruleno==401);
-#line 334 "sql.y"
-{ pCxt->pRootNode = yymsp[0].minor.yy232; }
-#line 5942 "sql.c"
- break;
- case 169: /* cmd ::= ALTER STABLE alter_table_clause */
-#line 335 "sql.y"
-{ pCxt->pRootNode = setAlterSuperTableType(yymsp[0].minor.yy232); }
-#line 5947 "sql.c"
- break;
- case 170: /* alter_table_clause ::= full_table_name alter_table_options */
-#line 337 "sql.y"
-{ yylhsminor.yy232 = createAlterTableModifyOptions(pCxt, yymsp[-1].minor.yy232, yymsp[0].minor.yy232); }
-#line 5952 "sql.c"
- yymsp[-1].minor.yy232 = yylhsminor.yy232;
- break;
- case 171: /* alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */
-#line 339 "sql.y"
-{ yylhsminor.yy232 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy232, TSDB_ALTER_TABLE_ADD_COLUMN, &yymsp[-1].minor.yy993, yymsp[0].minor.yy400); }
-#line 5958 "sql.c"
- yymsp[-4].minor.yy232 = yylhsminor.yy232;
- break;
- case 172: /* alter_table_clause ::= full_table_name DROP COLUMN column_name */
-#line 340 "sql.y"
-{ yylhsminor.yy232 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy232, TSDB_ALTER_TABLE_DROP_COLUMN, &yymsp[0].minor.yy993); }
-#line 5964 "sql.c"
- yymsp[-3].minor.yy232 = yylhsminor.yy232;
- break;
- case 173: /* alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */
-#line 342 "sql.y"
-{ yylhsminor.yy232 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy232, TSDB_ALTER_TABLE_UPDATE_COLUMN_BYTES, &yymsp[-1].minor.yy993, yymsp[0].minor.yy400); }
-#line 5970 "sql.c"
- yymsp[-4].minor.yy232 = yylhsminor.yy232;
- break;
- case 174: /* alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */
-#line 344 "sql.y"
-{ yylhsminor.yy232 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy232, TSDB_ALTER_TABLE_UPDATE_COLUMN_NAME, &yymsp[-1].minor.yy993, &yymsp[0].minor.yy993); }
-#line 5976 "sql.c"
- yymsp[-4].minor.yy232 = yylhsminor.yy232;
- break;
- case 175: /* alter_table_clause ::= full_table_name ADD TAG column_name type_name */
-#line 346 "sql.y"
-{ yylhsminor.yy232 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy232, TSDB_ALTER_TABLE_ADD_TAG, &yymsp[-1].minor.yy993, yymsp[0].minor.yy400); }
-#line 5982 "sql.c"
- yymsp[-4].minor.yy232 = yylhsminor.yy232;
- break;
- case 176: /* alter_table_clause ::= full_table_name DROP TAG column_name */
-#line 347 "sql.y"
-{ yylhsminor.yy232 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy232, TSDB_ALTER_TABLE_DROP_TAG, &yymsp[0].minor.yy993); }
-#line 5988 "sql.c"
- yymsp[-3].minor.yy232 = yylhsminor.yy232;
- break;
- case 177: /* alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */
-#line 349 "sql.y"
-{ yylhsminor.yy232 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy232, TSDB_ALTER_TABLE_UPDATE_TAG_BYTES, &yymsp[-1].minor.yy993, yymsp[0].minor.yy400); }
-#line 5994 "sql.c"
- yymsp[-4].minor.yy232 = yylhsminor.yy232;
- break;
- case 178: /* alter_table_clause ::= full_table_name RENAME TAG column_name column_name */
-#line 351 "sql.y"
-{ yylhsminor.yy232 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy232, TSDB_ALTER_TABLE_UPDATE_TAG_NAME, &yymsp[-1].minor.yy993, &yymsp[0].minor.yy993); }
-#line 6000 "sql.c"
- yymsp[-4].minor.yy232 = yylhsminor.yy232;
- break;
- case 179: /* alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */
-#line 353 "sql.y"
-{ yylhsminor.yy232 = createAlterTableSetTag(pCxt, yymsp[-5].minor.yy232, &yymsp[-2].minor.yy993, yymsp[0].minor.yy232); }
-#line 6006 "sql.c"
- yymsp[-5].minor.yy232 = yylhsminor.yy232;
- break;
- case 181: /* multi_create_clause ::= multi_create_clause create_subtable_clause */
- case 505: /* when_then_list ::= when_then_list when_then_expr */ yytestcase(yyruleno==505);
-#line 358 "sql.y"
-{ yylhsminor.yy88 = addNodeToList(pCxt, yymsp[-1].minor.yy88, yymsp[0].minor.yy232); }
-#line 6013 "sql.c"
- yymsp[-1].minor.yy88 = yylhsminor.yy88;
- break;
- case 182: /* 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 362 "sql.y"
-{ yylhsminor.yy232 = createCreateSubTableClause(pCxt, yymsp[-9].minor.yy985, yymsp[-8].minor.yy232, yymsp[-6].minor.yy232, yymsp[-5].minor.yy88, yymsp[-2].minor.yy88, yymsp[0].minor.yy232); }
-#line 6019 "sql.c"
- yymsp[-9].minor.yy232 = yylhsminor.yy232;
- break;
- case 185: /* drop_table_clause ::= exists_opt full_table_name */
-#line 369 "sql.y"
-{ yylhsminor.yy232 = createDropTableClause(pCxt, yymsp[-1].minor.yy985, yymsp[0].minor.yy232); }
-#line 6025 "sql.c"
- yymsp[-1].minor.yy232 = yylhsminor.yy232;
- break;
- case 187: /* specific_cols_opt ::= NK_LP col_name_list NK_RP */
- case 369: /* col_list_opt ::= NK_LP col_name_list NK_RP */ yytestcase(yyruleno==369);
-#line 374 "sql.y"
-{ yymsp[-2].minor.yy88 = yymsp[-1].minor.yy88; }
-#line 6032 "sql.c"
- break;
- case 188: /* full_table_name ::= table_name */
-#line 376 "sql.y"
-{ yylhsminor.yy232 = createRealTableNode(pCxt, NULL, &yymsp[0].minor.yy993, NULL); }
-#line 6037 "sql.c"
- yymsp[0].minor.yy232 = yylhsminor.yy232;
- break;
- case 189: /* full_table_name ::= db_name NK_DOT table_name */
-#line 377 "sql.y"
-{ yylhsminor.yy232 = createRealTableNode(pCxt, &yymsp[-2].minor.yy993, &yymsp[0].minor.yy993, NULL); }
-#line 6043 "sql.c"
- yymsp[-2].minor.yy232 = yylhsminor.yy232;
- break;
- case 192: /* column_def ::= column_name type_name */
-#line 384 "sql.y"
-{ yylhsminor.yy232 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy993, yymsp[0].minor.yy400, NULL); }
-#line 6049 "sql.c"
- yymsp[-1].minor.yy232 = yylhsminor.yy232;
- break;
- case 193: /* type_name ::= BOOL */
-#line 389 "sql.y"
-{ yymsp[0].minor.yy400 = createDataType(TSDB_DATA_TYPE_BOOL); }
-#line 6055 "sql.c"
- break;
- case 194: /* type_name ::= TINYINT */
-#line 390 "sql.y"
-{ yymsp[0].minor.yy400 = createDataType(TSDB_DATA_TYPE_TINYINT); }
-#line 6060 "sql.c"
- break;
- case 195: /* type_name ::= SMALLINT */
-#line 391 "sql.y"
-{ yymsp[0].minor.yy400 = createDataType(TSDB_DATA_TYPE_SMALLINT); }
-#line 6065 "sql.c"
- break;
- case 196: /* type_name ::= INT */
- case 197: /* type_name ::= INTEGER */ yytestcase(yyruleno==197);
-#line 392 "sql.y"
-{ yymsp[0].minor.yy400 = createDataType(TSDB_DATA_TYPE_INT); }
-#line 6071 "sql.c"
- break;
- case 198: /* type_name ::= BIGINT */
-#line 394 "sql.y"
-{ yymsp[0].minor.yy400 = createDataType(TSDB_DATA_TYPE_BIGINT); }
-#line 6076 "sql.c"
- break;
- case 199: /* type_name ::= FLOAT */
-#line 395 "sql.y"
-{ yymsp[0].minor.yy400 = createDataType(TSDB_DATA_TYPE_FLOAT); }
-#line 6081 "sql.c"
- break;
- case 200: /* type_name ::= DOUBLE */
-#line 396 "sql.y"
-{ yymsp[0].minor.yy400 = createDataType(TSDB_DATA_TYPE_DOUBLE); }
-#line 6086 "sql.c"
- break;
- case 201: /* type_name ::= BINARY NK_LP NK_INTEGER NK_RP */
-#line 397 "sql.y"
-{ yymsp[-3].minor.yy400 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy0); }
-#line 6091 "sql.c"
- break;
- case 202: /* type_name ::= TIMESTAMP */
-#line 398 "sql.y"
-{ yymsp[0].minor.yy400 = createDataType(TSDB_DATA_TYPE_TIMESTAMP); }
-#line 6096 "sql.c"
- break;
- case 203: /* type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */
-#line 399 "sql.y"
-{ yymsp[-3].minor.yy400 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, &yymsp[-1].minor.yy0); }
-#line 6101 "sql.c"
- break;
- case 204: /* type_name ::= TINYINT UNSIGNED */
-#line 400 "sql.y"
-{ yymsp[-1].minor.yy400 = createDataType(TSDB_DATA_TYPE_UTINYINT); }
-#line 6106 "sql.c"
- break;
- case 205: /* type_name ::= SMALLINT UNSIGNED */
-#line 401 "sql.y"
-{ yymsp[-1].minor.yy400 = createDataType(TSDB_DATA_TYPE_USMALLINT); }
-#line 6111 "sql.c"
- break;
- case 206: /* type_name ::= INT UNSIGNED */
-#line 402 "sql.y"
-{ yymsp[-1].minor.yy400 = createDataType(TSDB_DATA_TYPE_UINT); }
-#line 6116 "sql.c"
- break;
- case 207: /* type_name ::= BIGINT UNSIGNED */
-#line 403 "sql.y"
-{ yymsp[-1].minor.yy400 = createDataType(TSDB_DATA_TYPE_UBIGINT); }
-#line 6121 "sql.c"
- break;
- case 208: /* type_name ::= JSON */
-#line 404 "sql.y"
-{ yymsp[0].minor.yy400 = createDataType(TSDB_DATA_TYPE_JSON); }
-#line 6126 "sql.c"
- break;
- case 209: /* type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */
-#line 405 "sql.y"
-{ yymsp[-3].minor.yy400 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, &yymsp[-1].minor.yy0); }
-#line 6131 "sql.c"
- break;
- case 210: /* type_name ::= MEDIUMBLOB */
-#line 406 "sql.y"
-{ yymsp[0].minor.yy400 = createDataType(TSDB_DATA_TYPE_MEDIUMBLOB); }
-#line 6136 "sql.c"
- break;
- case 211: /* type_name ::= BLOB */
-#line 407 "sql.y"
-{ yymsp[0].minor.yy400 = createDataType(TSDB_DATA_TYPE_BLOB); }
-#line 6141 "sql.c"
- break;
- case 212: /* type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */
-#line 408 "sql.y"
-{ yymsp[-3].minor.yy400 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, &yymsp[-1].minor.yy0); }
-#line 6146 "sql.c"
- break;
- case 213: /* type_name ::= GEOMETRY NK_LP NK_INTEGER NK_RP */
-#line 409 "sql.y"
-{ yymsp[-3].minor.yy400 = createVarLenDataType(TSDB_DATA_TYPE_GEOMETRY, &yymsp[-1].minor.yy0); }
-#line 6151 "sql.c"
- break;
- case 214: /* type_name ::= DECIMAL */
-#line 410 "sql.y"
-{ yymsp[0].minor.yy400 = createDataType(TSDB_DATA_TYPE_DECIMAL); }
-#line 6156 "sql.c"
- break;
- case 215: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */
-#line 411 "sql.y"
-{ yymsp[-3].minor.yy400 = createDataType(TSDB_DATA_TYPE_DECIMAL); }
-#line 6161 "sql.c"
- break;
- case 216: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */
-#line 412 "sql.y"
-{ yymsp[-5].minor.yy400 = createDataType(TSDB_DATA_TYPE_DECIMAL); }
-#line 6166 "sql.c"
- break;
- case 219: /* tags_def ::= TAGS NK_LP column_def_list NK_RP */
- case 372: /* tag_def_or_ref_opt ::= TAGS NK_LP col_name_list NK_RP */ yytestcase(yyruleno==372);
-#line 421 "sql.y"
-{ yymsp[-3].minor.yy88 = yymsp[-1].minor.yy88; }
-#line 6172 "sql.c"
- break;
- case 220: /* table_options ::= */
-#line 423 "sql.y"
-{ yymsp[1].minor.yy232 = createDefaultTableOptions(pCxt); }
-#line 6177 "sql.c"
- break;
- case 221: /* table_options ::= table_options COMMENT NK_STRING */
-#line 424 "sql.y"
-{ yylhsminor.yy232 = setTableOption(pCxt, yymsp[-2].minor.yy232, TABLE_OPTION_COMMENT, &yymsp[0].minor.yy0); }
-#line 6182 "sql.c"
- yymsp[-2].minor.yy232 = yylhsminor.yy232;
- break;
- case 222: /* table_options ::= table_options MAX_DELAY duration_list */
-#line 425 "sql.y"
-{ yylhsminor.yy232 = setTableOption(pCxt, yymsp[-2].minor.yy232, TABLE_OPTION_MAXDELAY, yymsp[0].minor.yy88); }
-#line 6188 "sql.c"
- yymsp[-2].minor.yy232 = yylhsminor.yy232;
- break;
- case 223: /* table_options ::= table_options WATERMARK duration_list */
-#line 426 "sql.y"
-{ yylhsminor.yy232 = setTableOption(pCxt, yymsp[-2].minor.yy232, TABLE_OPTION_WATERMARK, yymsp[0].minor.yy88); }
-#line 6194 "sql.c"
- yymsp[-2].minor.yy232 = yylhsminor.yy232;
- break;
- case 224: /* table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */
-#line 427 "sql.y"
-{ yylhsminor.yy232 = setTableOption(pCxt, yymsp[-4].minor.yy232, TABLE_OPTION_ROLLUP, yymsp[-1].minor.yy88); }
-#line 6200 "sql.c"
- yymsp[-4].minor.yy232 = yylhsminor.yy232;
- break;
- case 225: /* table_options ::= table_options TTL NK_INTEGER */
-#line 428 "sql.y"
-{ yylhsminor.yy232 = setTableOption(pCxt, yymsp[-2].minor.yy232, TABLE_OPTION_TTL, &yymsp[0].minor.yy0); }
-#line 6206 "sql.c"
- yymsp[-2].minor.yy232 = yylhsminor.yy232;
- break;
- case 226: /* table_options ::= table_options SMA NK_LP col_name_list NK_RP */
-#line 429 "sql.y"
-{ yylhsminor.yy232 = setTableOption(pCxt, yymsp[-4].minor.yy232, TABLE_OPTION_SMA, yymsp[-1].minor.yy88); }
-#line 6212 "sql.c"
- yymsp[-4].minor.yy232 = yylhsminor.yy232;
- break;
- case 227: /* table_options ::= table_options DELETE_MARK duration_list */
-#line 430 "sql.y"
-{ yylhsminor.yy232 = setTableOption(pCxt, yymsp[-2].minor.yy232, TABLE_OPTION_DELETE_MARK, yymsp[0].minor.yy88); }
-#line 6218 "sql.c"
- yymsp[-2].minor.yy232 = yylhsminor.yy232;
- break;
- case 228: /* alter_table_options ::= alter_table_option */
-#line 432 "sql.y"
-{ yylhsminor.yy232 = createAlterTableOptions(pCxt); yylhsminor.yy232 = setTableOption(pCxt, yylhsminor.yy232, yymsp[0].minor.yy117.type, &yymsp[0].minor.yy117.val); }
-#line 6224 "sql.c"
- yymsp[0].minor.yy232 = yylhsminor.yy232;
- break;
- case 229: /* alter_table_options ::= alter_table_options alter_table_option */
-#line 433 "sql.y"
-{ yylhsminor.yy232 = setTableOption(pCxt, yymsp[-1].minor.yy232, yymsp[0].minor.yy117.type, &yymsp[0].minor.yy117.val); }
-#line 6230 "sql.c"
- yymsp[-1].minor.yy232 = yylhsminor.yy232;
- break;
- case 230: /* alter_table_option ::= COMMENT NK_STRING */
-#line 437 "sql.y"
-{ yymsp[-1].minor.yy117.type = TABLE_OPTION_COMMENT; yymsp[-1].minor.yy117.val = yymsp[0].minor.yy0; }
-#line 6236 "sql.c"
- break;
- case 231: /* alter_table_option ::= TTL NK_INTEGER */
-#line 438 "sql.y"
-{ yymsp[-1].minor.yy117.type = TABLE_OPTION_TTL; yymsp[-1].minor.yy117.val = yymsp[0].minor.yy0; }
-#line 6241 "sql.c"
- break;
- case 232: /* duration_list ::= duration_literal */
- case 459: /* expression_list ::= expr_or_subquery */ yytestcase(yyruleno==459);
-#line 442 "sql.y"
-{ yylhsminor.yy88 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy232)); }
-#line 6247 "sql.c"
- yymsp[0].minor.yy88 = yylhsminor.yy88;
- break;
- case 233: /* duration_list ::= duration_list NK_COMMA duration_literal */
- case 460: /* expression_list ::= expression_list NK_COMMA expr_or_subquery */ yytestcase(yyruleno==460);
-#line 443 "sql.y"
-{ yylhsminor.yy88 = addNodeToList(pCxt, yymsp[-2].minor.yy88, releaseRawExprNode(pCxt, yymsp[0].minor.yy232)); }
-#line 6254 "sql.c"
- yymsp[-2].minor.yy88 = yylhsminor.yy88;
- break;
- case 236: /* rollup_func_name ::= function_name */
-#line 450 "sql.y"
-{ yylhsminor.yy232 = createFunctionNode(pCxt, &yymsp[0].minor.yy993, NULL); }
-#line 6260 "sql.c"
- yymsp[0].minor.yy232 = yylhsminor.yy232;
- break;
- case 237: /* rollup_func_name ::= FIRST */
- case 238: /* rollup_func_name ::= LAST */ yytestcase(yyruleno==238);
- case 306: /* tag_item ::= QTAGS */ yytestcase(yyruleno==306);
-#line 451 "sql.y"
-{ yylhsminor.yy232 = createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL); }
-#line 6268 "sql.c"
- yymsp[0].minor.yy232 = yylhsminor.yy232;
- break;
- case 241: /* col_name ::= column_name */
- case 307: /* tag_item ::= column_name */ yytestcase(yyruleno==307);
-#line 459 "sql.y"
-{ yylhsminor.yy232 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy993); }
-#line 6275 "sql.c"
- yymsp[0].minor.yy232 = yylhsminor.yy232;
- break;
- case 242: /* cmd ::= SHOW DNODES */
-#line 462 "sql.y"
+ break;
+ case 146: /* alter_db_option ::= KEEP_TIME_OFFSET NK_INTEGER */
+{ yymsp[-1].minor.yy529.type = DB_OPTION_KEEP_TIME_OFFSET; yymsp[-1].minor.yy529.val = yymsp[0].minor.yy0; }
+ break;
+ case 147: /* integer_list ::= NK_INTEGER */
+{ yylhsminor.yy502 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); }
+ 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);
+{ yylhsminor.yy502 = addNodeToList(pCxt, yymsp[-2].minor.yy502, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); }
+ yymsp[-2].minor.yy502 = yylhsminor.yy502;
+ break;
+ case 149: /* variable_list ::= NK_VARIABLE */
+{ yylhsminor.yy502 = createNodeList(pCxt, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); }
+ yymsp[0].minor.yy502 = yylhsminor.yy502;
+ break;
+ case 150: /* variable_list ::= variable_list NK_COMMA NK_VARIABLE */
+{ yylhsminor.yy502 = addNodeToList(pCxt, yymsp[-2].minor.yy502, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); }
+ yymsp[-2].minor.yy502 = yylhsminor.yy502;
+ break;
+ case 151: /* retention_list ::= retention */
+ case 182: /* multi_create_clause ::= create_subtable_clause */ yytestcase(yyruleno==182);
+ case 185: /* multi_drop_clause ::= drop_table_clause */ yytestcase(yyruleno==185);
+ case 192: /* column_def_list ::= column_def */ yytestcase(yyruleno==192);
+ case 236: /* rollup_func_list ::= rollup_func_name */ yytestcase(yyruleno==236);
+ case 241: /* col_name_list ::= col_name */ yytestcase(yyruleno==241);
+ case 308: /* tag_list_opt ::= tag_item */ yytestcase(yyruleno==308);
+ case 325: /* func_list ::= func */ yytestcase(yyruleno==325);
+ case 432: /* literal_list ::= signed_literal */ yytestcase(yyruleno==432);
+ case 503: /* other_para_list ::= star_func_para */ yytestcase(yyruleno==503);
+ case 509: /* when_then_list ::= when_then_expr */ yytestcase(yyruleno==509);
+ 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);
+{ yylhsminor.yy502 = createNodeList(pCxt, yymsp[0].minor.yy490); }
+ yymsp[0].minor.yy502 = yylhsminor.yy502;
+ break;
+ case 152: /* retention_list ::= retention_list NK_COMMA retention */
+ case 186: /* multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause */ yytestcase(yyruleno==186);
+ case 193: /* column_def_list ::= column_def_list NK_COMMA column_def */ yytestcase(yyruleno==193);
+ case 237: /* rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ yytestcase(yyruleno==237);
+ case 242: /* col_name_list ::= col_name_list NK_COMMA col_name */ yytestcase(yyruleno==242);
+ case 309: /* tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ yytestcase(yyruleno==309);
+ case 326: /* func_list ::= func_list NK_COMMA func */ yytestcase(yyruleno==326);
+ case 433: /* literal_list ::= literal_list NK_COMMA signed_literal */ yytestcase(yyruleno==433);
+ case 504: /* other_para_list ::= other_para_list NK_COMMA star_func_para */ yytestcase(yyruleno==504);
+ 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);
+{ yylhsminor.yy502 = addNodeToList(pCxt, yymsp[-2].minor.yy502, yymsp[0].minor.yy490); }
+ 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);
+{ yylhsminor.yy490 = createNodeListNodeEx(pCxt, createDurationValueNode(pCxt, &yymsp[-2].minor.yy0), createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); }
+ yymsp[-2].minor.yy490 = yylhsminor.yy490;
+ break;
+ case 155: /* speed_opt ::= */
+ case 359: /* bufsize_opt ::= */ yytestcase(yyruleno==359);
+{ yymsp[1].minor.yy774 = 0; }
+ break;
+ case 156: /* speed_opt ::= BWLIMIT NK_INTEGER */
+ case 360: /* bufsize_opt ::= BUFSIZE NK_INTEGER */ yytestcase(yyruleno==360);
+{ yymsp[-1].minor.yy774 = taosStr2Int32(yymsp[0].minor.yy0.z, NULL, 10); }
+ break;
+ case 158: /* start_opt ::= START WITH NK_INTEGER */
+ case 162: /* end_opt ::= END WITH NK_INTEGER */ yytestcase(yyruleno==162);
+{ yymsp[-2].minor.yy490 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); }
+ break;
+ case 159: /* start_opt ::= START WITH NK_STRING */
+ case 163: /* end_opt ::= END WITH NK_STRING */ yytestcase(yyruleno==163);
+{ yymsp[-2].minor.yy490 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); }
+ break;
+ case 160: /* start_opt ::= START WITH TIMESTAMP NK_STRING */
+ case 164: /* end_opt ::= END WITH TIMESTAMP NK_STRING */ yytestcase(yyruleno==164);
+{ yymsp[-3].minor.yy490 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); }
+ 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);
+{ pCxt->pRootNode = createCreateTableStmt(pCxt, yymsp[-6].minor.yy845, yymsp[-5].minor.yy490, yymsp[-3].minor.yy502, yymsp[-1].minor.yy502, yymsp[0].minor.yy490); }
+ break;
+ case 166: /* cmd ::= CREATE TABLE multi_create_clause */
+{ pCxt->pRootNode = createCreateMultiTableStmt(pCxt, yymsp[0].minor.yy502); }
+ break;
+ case 168: /* cmd ::= DROP TABLE multi_drop_clause */
+{ pCxt->pRootNode = createDropTableStmt(pCxt, yymsp[0].minor.yy502); }
+ break;
+ case 169: /* cmd ::= DROP STABLE exists_opt full_table_name */
+{ pCxt->pRootNode = createDropSuperTableStmt(pCxt, yymsp[-1].minor.yy845, yymsp[0].minor.yy490); }
+ 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);
+{ pCxt->pRootNode = yymsp[0].minor.yy490; }
+ break;
+ case 171: /* cmd ::= ALTER STABLE alter_table_clause */
+{ pCxt->pRootNode = setAlterSuperTableType(yymsp[0].minor.yy490); }
+ break;
+ case 172: /* alter_table_clause ::= full_table_name alter_table_options */
+{ yylhsminor.yy490 = createAlterTableModifyOptions(pCxt, yymsp[-1].minor.yy490, yymsp[0].minor.yy490); }
+ yymsp[-1].minor.yy490 = yylhsminor.yy490;
+ break;
+ case 173: /* alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */
+{ yylhsminor.yy490 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy490, TSDB_ALTER_TABLE_ADD_COLUMN, &yymsp[-1].minor.yy561, yymsp[0].minor.yy826); }
+ yymsp[-4].minor.yy490 = yylhsminor.yy490;
+ break;
+ case 174: /* alter_table_clause ::= full_table_name DROP COLUMN column_name */
+{ yylhsminor.yy490 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy490, TSDB_ALTER_TABLE_DROP_COLUMN, &yymsp[0].minor.yy561); }
+ yymsp[-3].minor.yy490 = yylhsminor.yy490;
+ break;
+ case 175: /* alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */
+{ yylhsminor.yy490 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy490, TSDB_ALTER_TABLE_UPDATE_COLUMN_BYTES, &yymsp[-1].minor.yy561, yymsp[0].minor.yy826); }
+ yymsp[-4].minor.yy490 = yylhsminor.yy490;
+ break;
+ case 176: /* alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */
+{ yylhsminor.yy490 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy490, TSDB_ALTER_TABLE_UPDATE_COLUMN_NAME, &yymsp[-1].minor.yy561, &yymsp[0].minor.yy561); }
+ yymsp[-4].minor.yy490 = yylhsminor.yy490;
+ break;
+ case 177: /* alter_table_clause ::= full_table_name ADD TAG column_name type_name */
+{ yylhsminor.yy490 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy490, TSDB_ALTER_TABLE_ADD_TAG, &yymsp[-1].minor.yy561, yymsp[0].minor.yy826); }
+ yymsp[-4].minor.yy490 = yylhsminor.yy490;
+ break;
+ case 178: /* alter_table_clause ::= full_table_name DROP TAG column_name */
+{ yylhsminor.yy490 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy490, TSDB_ALTER_TABLE_DROP_TAG, &yymsp[0].minor.yy561); }
+ yymsp[-3].minor.yy490 = yylhsminor.yy490;
+ break;
+ case 179: /* alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */
+{ yylhsminor.yy490 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy490, TSDB_ALTER_TABLE_UPDATE_TAG_BYTES, &yymsp[-1].minor.yy561, yymsp[0].minor.yy826); }
+ yymsp[-4].minor.yy490 = yylhsminor.yy490;
+ break;
+ case 180: /* alter_table_clause ::= full_table_name RENAME TAG column_name column_name */
+{ yylhsminor.yy490 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy490, TSDB_ALTER_TABLE_UPDATE_TAG_NAME, &yymsp[-1].minor.yy561, &yymsp[0].minor.yy561); }
+ yymsp[-4].minor.yy490 = yylhsminor.yy490;
+ break;
+ case 181: /* alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */
+{ yylhsminor.yy490 = createAlterTableSetTag(pCxt, yymsp[-5].minor.yy490, &yymsp[-2].minor.yy561, yymsp[0].minor.yy490); }
+ 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);
+{ yylhsminor.yy502 = addNodeToList(pCxt, yymsp[-1].minor.yy502, yymsp[0].minor.yy490); }
+ 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 */
+{ 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); }
+ yymsp[-9].minor.yy490 = yylhsminor.yy490;
+ break;
+ case 187: /* drop_table_clause ::= exists_opt full_table_name */
+{ yylhsminor.yy490 = createDropTableClause(pCxt, yymsp[-1].minor.yy845, yymsp[0].minor.yy490); }
+ 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);
+{ yymsp[-2].minor.yy502 = yymsp[-1].minor.yy502; }
+ break;
+ case 190: /* full_table_name ::= table_name */
+{ yylhsminor.yy490 = createRealTableNode(pCxt, NULL, &yymsp[0].minor.yy561, NULL); }
+ yymsp[0].minor.yy490 = yylhsminor.yy490;
+ break;
+ case 191: /* full_table_name ::= db_name NK_DOT table_name */
+{ yylhsminor.yy490 = createRealTableNode(pCxt, &yymsp[-2].minor.yy561, &yymsp[0].minor.yy561, NULL); }
+ yymsp[-2].minor.yy490 = yylhsminor.yy490;
+ break;
+ case 194: /* column_def ::= column_name type_name */
+{ yylhsminor.yy490 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy561, yymsp[0].minor.yy826, NULL); }
+ yymsp[-1].minor.yy490 = yylhsminor.yy490;
+ break;
+ case 195: /* type_name ::= BOOL */
+{ yymsp[0].minor.yy826 = createDataType(TSDB_DATA_TYPE_BOOL); }
+ break;
+ case 196: /* type_name ::= TINYINT */
+{ yymsp[0].minor.yy826 = createDataType(TSDB_DATA_TYPE_TINYINT); }
+ break;
+ case 197: /* type_name ::= SMALLINT */
+{ yymsp[0].minor.yy826 = createDataType(TSDB_DATA_TYPE_SMALLINT); }
+ break;
+ case 198: /* type_name ::= INT */
+ case 199: /* type_name ::= INTEGER */ yytestcase(yyruleno==199);
+{ yymsp[0].minor.yy826 = createDataType(TSDB_DATA_TYPE_INT); }
+ break;
+ case 200: /* type_name ::= BIGINT */
+{ yymsp[0].minor.yy826 = createDataType(TSDB_DATA_TYPE_BIGINT); }
+ break;
+ case 201: /* type_name ::= FLOAT */
+{ yymsp[0].minor.yy826 = createDataType(TSDB_DATA_TYPE_FLOAT); }
+ break;
+ case 202: /* type_name ::= DOUBLE */
+{ yymsp[0].minor.yy826 = createDataType(TSDB_DATA_TYPE_DOUBLE); }
+ break;
+ case 203: /* type_name ::= BINARY NK_LP NK_INTEGER NK_RP */
+{ yymsp[-3].minor.yy826 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy0); }
+ break;
+ case 204: /* type_name ::= TIMESTAMP */
+{ yymsp[0].minor.yy826 = createDataType(TSDB_DATA_TYPE_TIMESTAMP); }
+ break;
+ case 205: /* type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */
+{ yymsp[-3].minor.yy826 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, &yymsp[-1].minor.yy0); }
+ break;
+ case 206: /* type_name ::= TINYINT UNSIGNED */
+{ yymsp[-1].minor.yy826 = createDataType(TSDB_DATA_TYPE_UTINYINT); }
+ break;
+ case 207: /* type_name ::= SMALLINT UNSIGNED */
+{ yymsp[-1].minor.yy826 = createDataType(TSDB_DATA_TYPE_USMALLINT); }
+ break;
+ case 208: /* type_name ::= INT UNSIGNED */
+{ yymsp[-1].minor.yy826 = createDataType(TSDB_DATA_TYPE_UINT); }
+ break;
+ case 209: /* type_name ::= BIGINT UNSIGNED */
+{ yymsp[-1].minor.yy826 = createDataType(TSDB_DATA_TYPE_UBIGINT); }
+ break;
+ case 210: /* type_name ::= JSON */
+{ yymsp[0].minor.yy826 = createDataType(TSDB_DATA_TYPE_JSON); }
+ break;
+ case 211: /* type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */
+{ yymsp[-3].minor.yy826 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, &yymsp[-1].minor.yy0); }
+ break;
+ case 212: /* type_name ::= MEDIUMBLOB */
+{ yymsp[0].minor.yy826 = createDataType(TSDB_DATA_TYPE_MEDIUMBLOB); }
+ break;
+ case 213: /* type_name ::= BLOB */
+{ yymsp[0].minor.yy826 = createDataType(TSDB_DATA_TYPE_BLOB); }
+ break;
+ case 214: /* type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */
+{ yymsp[-3].minor.yy826 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, &yymsp[-1].minor.yy0); }
+ break;
+ case 215: /* type_name ::= GEOMETRY NK_LP NK_INTEGER NK_RP */
+{ yymsp[-3].minor.yy826 = createVarLenDataType(TSDB_DATA_TYPE_GEOMETRY, &yymsp[-1].minor.yy0); }
+ break;
+ case 216: /* type_name ::= DECIMAL */
+{ yymsp[0].minor.yy826 = createDataType(TSDB_DATA_TYPE_DECIMAL); }
+ break;
+ case 217: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */
+{ yymsp[-3].minor.yy826 = createDataType(TSDB_DATA_TYPE_DECIMAL); }
+ break;
+ case 218: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */
+{ yymsp[-5].minor.yy826 = createDataType(TSDB_DATA_TYPE_DECIMAL); }
+ 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);
+{ yymsp[-3].minor.yy502 = yymsp[-1].minor.yy502; }
+ break;
+ case 222: /* table_options ::= */
+{ yymsp[1].minor.yy490 = createDefaultTableOptions(pCxt); }
+ break;
+ case 223: /* table_options ::= table_options COMMENT NK_STRING */
+{ yylhsminor.yy490 = setTableOption(pCxt, yymsp[-2].minor.yy490, TABLE_OPTION_COMMENT, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy490 = yylhsminor.yy490;
+ break;
+ case 224: /* table_options ::= table_options MAX_DELAY duration_list */
+{ yylhsminor.yy490 = setTableOption(pCxt, yymsp[-2].minor.yy490, TABLE_OPTION_MAXDELAY, yymsp[0].minor.yy502); }
+ yymsp[-2].minor.yy490 = yylhsminor.yy490;
+ break;
+ case 225: /* table_options ::= table_options WATERMARK duration_list */
+{ yylhsminor.yy490 = setTableOption(pCxt, yymsp[-2].minor.yy490, TABLE_OPTION_WATERMARK, yymsp[0].minor.yy502); }
+ yymsp[-2].minor.yy490 = yylhsminor.yy490;
+ break;
+ case 226: /* table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */
+{ yylhsminor.yy490 = setTableOption(pCxt, yymsp[-4].minor.yy490, TABLE_OPTION_ROLLUP, yymsp[-1].minor.yy502); }
+ yymsp[-4].minor.yy490 = yylhsminor.yy490;
+ break;
+ case 227: /* table_options ::= table_options TTL NK_INTEGER */
+{ yylhsminor.yy490 = setTableOption(pCxt, yymsp[-2].minor.yy490, TABLE_OPTION_TTL, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy490 = yylhsminor.yy490;
+ break;
+ case 228: /* table_options ::= table_options SMA NK_LP col_name_list NK_RP */
+{ yylhsminor.yy490 = setTableOption(pCxt, yymsp[-4].minor.yy490, TABLE_OPTION_SMA, yymsp[-1].minor.yy502); }
+ yymsp[-4].minor.yy490 = yylhsminor.yy490;
+ break;
+ case 229: /* table_options ::= table_options DELETE_MARK duration_list */
+{ yylhsminor.yy490 = setTableOption(pCxt, yymsp[-2].minor.yy490, TABLE_OPTION_DELETE_MARK, yymsp[0].minor.yy502); }
+ yymsp[-2].minor.yy490 = yylhsminor.yy490;
+ break;
+ case 230: /* alter_table_options ::= alter_table_option */
+{ yylhsminor.yy490 = createAlterTableOptions(pCxt); yylhsminor.yy490 = setTableOption(pCxt, yylhsminor.yy490, yymsp[0].minor.yy529.type, &yymsp[0].minor.yy529.val); }
+ yymsp[0].minor.yy490 = yylhsminor.yy490;
+ break;
+ case 231: /* alter_table_options ::= alter_table_options alter_table_option */
+{ yylhsminor.yy490 = setTableOption(pCxt, yymsp[-1].minor.yy490, yymsp[0].minor.yy529.type, &yymsp[0].minor.yy529.val); }
+ yymsp[-1].minor.yy490 = yylhsminor.yy490;
+ break;
+ case 232: /* alter_table_option ::= COMMENT NK_STRING */
+{ yymsp[-1].minor.yy529.type = TABLE_OPTION_COMMENT; yymsp[-1].minor.yy529.val = yymsp[0].minor.yy0; }
+ break;
+ case 233: /* alter_table_option ::= TTL NK_INTEGER */
+{ yymsp[-1].minor.yy529.type = TABLE_OPTION_TTL; yymsp[-1].minor.yy529.val = yymsp[0].minor.yy0; }
+ break;
+ case 234: /* duration_list ::= duration_literal */
+ case 464: /* expression_list ::= expr_or_subquery */ yytestcase(yyruleno==464);
+{ yylhsminor.yy502 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy490)); }
+ 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);
+{ yylhsminor.yy502 = addNodeToList(pCxt, yymsp[-2].minor.yy502, releaseRawExprNode(pCxt, yymsp[0].minor.yy490)); }
+ yymsp[-2].minor.yy502 = yylhsminor.yy502;
+ break;
+ case 238: /* rollup_func_name ::= function_name */
+{ yylhsminor.yy490 = createFunctionNode(pCxt, &yymsp[0].minor.yy561, NULL); }
+ 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);
+{ yylhsminor.yy490 = createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL); }
+ yymsp[0].minor.yy490 = yylhsminor.yy490;
+ break;
+ case 243: /* col_name ::= column_name */
+ case 312: /* tag_item ::= column_name */ yytestcase(yyruleno==312);
+{ yylhsminor.yy490 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy561); }
+ yymsp[0].minor.yy490 = yylhsminor.yy490;
+ break;
+ case 244: /* cmd ::= SHOW DNODES */
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DNODES_STMT); }
-#line 6281 "sql.c"
break;
- case 243: /* cmd ::= SHOW USERS */
-#line 463 "sql.y"
+ case 245: /* cmd ::= SHOW USERS */
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_USERS_STMT); }
-#line 6286 "sql.c"
break;
- case 244: /* cmd ::= SHOW USER PRIVILEGES */
-#line 464 "sql.y"
+ case 246: /* cmd ::= SHOW USER PRIVILEGES */
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_USER_PRIVILEGES_STMT); }
-#line 6291 "sql.c"
break;
- case 245: /* cmd ::= SHOW db_kind_opt DATABASES */
-#line 465 "sql.y"
+ case 247: /* cmd ::= SHOW db_kind_opt DATABASES */
{
pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DATABASES_STMT);
- setShowKind(pCxt, pCxt->pRootNode, yymsp[-1].minor.yy281);
+ setShowKind(pCxt, pCxt->pRootNode, yymsp[-1].minor.yy579);
}
-#line 6299 "sql.c"
break;
- case 246: /* cmd ::= SHOW table_kind_db_name_cond_opt TABLES like_pattern_opt */
-#line 469 "sql.y"
+ case 248: /* cmd ::= SHOW table_kind_db_name_cond_opt TABLES like_pattern_opt */
{
- pCxt->pRootNode = createShowTablesStmt(pCxt, yymsp[-2].minor.yy133, yymsp[0].minor.yy232, OP_TYPE_LIKE);
+ pCxt->pRootNode = createShowTablesStmt(pCxt, yymsp[-2].minor.yy961, yymsp[0].minor.yy490, OP_TYPE_LIKE);
}
-#line 6306 "sql.c"
break;
- case 247: /* cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */
-#line 472 "sql.y"
-{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_STABLES_STMT, yymsp[-2].minor.yy232, yymsp[0].minor.yy232, OP_TYPE_LIKE); }
-#line 6311 "sql.c"
+ case 249: /* cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */
+{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_STABLES_STMT, yymsp[-2].minor.yy490, yymsp[0].minor.yy490, OP_TYPE_LIKE); }
break;
- case 248: /* cmd ::= SHOW db_name_cond_opt VGROUPS */
-#line 473 "sql.y"
-{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, yymsp[-1].minor.yy232, NULL, OP_TYPE_LIKE); }
-#line 6316 "sql.c"
+ case 250: /* cmd ::= SHOW db_name_cond_opt VGROUPS */
+{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, yymsp[-1].minor.yy490, NULL, OP_TYPE_LIKE); }
break;
- case 249: /* cmd ::= SHOW MNODES */
-#line 474 "sql.y"
+ case 251: /* cmd ::= SHOW MNODES */
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_MNODES_STMT); }
-#line 6321 "sql.c"
break;
- case 250: /* cmd ::= SHOW QNODES */
-#line 476 "sql.y"
+ case 252: /* cmd ::= SHOW QNODES */
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QNODES_STMT); }
-#line 6326 "sql.c"
break;
- case 251: /* cmd ::= SHOW FUNCTIONS */
-#line 477 "sql.y"
+ case 253: /* cmd ::= SHOW FUNCTIONS */
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_FUNCTIONS_STMT); }
-#line 6331 "sql.c"
break;
- case 252: /* cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */
-#line 478 "sql.y"
-{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, yymsp[0].minor.yy232, yymsp[-1].minor.yy232, OP_TYPE_EQUAL); }
-#line 6336 "sql.c"
+ case 254: /* cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */
+{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, yymsp[0].minor.yy490, yymsp[-1].minor.yy490, OP_TYPE_EQUAL); }
break;
- case 253: /* cmd ::= SHOW INDEXES FROM db_name NK_DOT table_name */
-#line 479 "sql.y"
-{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, createIdentifierValueNode(pCxt, &yymsp[-2].minor.yy993), createIdentifierValueNode(pCxt, &yymsp[0].minor.yy993), OP_TYPE_EQUAL); }
-#line 6341 "sql.c"
+ case 255: /* cmd ::= SHOW INDEXES FROM db_name NK_DOT table_name */
+{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, createIdentifierValueNode(pCxt, &yymsp[-2].minor.yy561), createIdentifierValueNode(pCxt, &yymsp[0].minor.yy561), OP_TYPE_EQUAL); }
break;
- case 254: /* cmd ::= SHOW STREAMS */
-#line 480 "sql.y"
+ case 256: /* cmd ::= SHOW STREAMS */
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_STREAMS_STMT); }
-#line 6346 "sql.c"
break;
- case 255: /* cmd ::= SHOW ACCOUNTS */
-#line 481 "sql.y"
+ case 257: /* cmd ::= SHOW ACCOUNTS */
{ pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); }
-#line 6351 "sql.c"
break;
- case 256: /* cmd ::= SHOW APPS */
-#line 482 "sql.y"
+ case 258: /* cmd ::= SHOW APPS */
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_APPS_STMT); }
-#line 6356 "sql.c"
break;
- case 257: /* cmd ::= SHOW CONNECTIONS */
-#line 483 "sql.y"
+ case 259: /* cmd ::= SHOW CONNECTIONS */
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CONNECTIONS_STMT); }
-#line 6361 "sql.c"
break;
- case 258: /* cmd ::= SHOW LICENCES */
- case 259: /* cmd ::= SHOW GRANTS */ yytestcase(yyruleno==259);
-#line 484 "sql.y"
+ case 260: /* cmd ::= SHOW LICENCES */
+ case 261: /* cmd ::= SHOW GRANTS */ yytestcase(yyruleno==261);
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LICENCES_STMT); }
-#line 6367 "sql.c"
break;
- case 260: /* cmd ::= SHOW CREATE DATABASE db_name */
-#line 486 "sql.y"
-{ pCxt->pRootNode = createShowCreateDatabaseStmt(pCxt, &yymsp[0].minor.yy993); }
-#line 6372 "sql.c"
+ case 262: /* cmd ::= SHOW GRANTS FULL */
+{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_GRANTS_FULL_STMT); }
break;
- case 261: /* cmd ::= SHOW CREATE TABLE full_table_name */
-#line 487 "sql.y"
-{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_TABLE_STMT, yymsp[0].minor.yy232); }
-#line 6377 "sql.c"
+ case 263: /* cmd ::= SHOW GRANTS LOGS */
+{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_GRANTS_LOGS_STMT); }
break;
- case 262: /* cmd ::= SHOW CREATE STABLE full_table_name */
-#line 488 "sql.y"
-{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_STABLE_STMT, yymsp[0].minor.yy232); }
-#line 6382 "sql.c"
+ case 264: /* cmd ::= SHOW CLUSTER MACHINES */
+{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CLUSTER_MACHINES_STMT); }
break;
- case 263: /* cmd ::= SHOW QUERIES */
-#line 489 "sql.y"
+ case 265: /* cmd ::= SHOW CREATE DATABASE db_name */
+{ pCxt->pRootNode = createShowCreateDatabaseStmt(pCxt, &yymsp[0].minor.yy561); }
+ break;
+ case 266: /* cmd ::= SHOW CREATE TABLE full_table_name */
+{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_TABLE_STMT, yymsp[0].minor.yy490); }
+ break;
+ case 267: /* cmd ::= SHOW CREATE STABLE full_table_name */
+{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_STABLE_STMT, yymsp[0].minor.yy490); }
+ break;
+ case 268: /* cmd ::= SHOW QUERIES */
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QUERIES_STMT); }
-#line 6387 "sql.c"
break;
- case 264: /* cmd ::= SHOW SCORES */
-#line 490 "sql.y"
+ case 269: /* cmd ::= SHOW SCORES */
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SCORES_STMT); }
-#line 6392 "sql.c"
break;
- case 265: /* cmd ::= SHOW TOPICS */
-#line 491 "sql.y"
+ case 270: /* cmd ::= SHOW TOPICS */
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TOPICS_STMT); }
-#line 6397 "sql.c"
break;
- case 266: /* cmd ::= SHOW VARIABLES */
- case 267: /* cmd ::= SHOW CLUSTER VARIABLES */ yytestcase(yyruleno==267);
-#line 492 "sql.y"
+ case 271: /* cmd ::= SHOW VARIABLES */
+ case 272: /* cmd ::= SHOW CLUSTER VARIABLES */ yytestcase(yyruleno==272);
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_VARIABLES_STMT); }
-#line 6403 "sql.c"
break;
- case 268: /* cmd ::= SHOW LOCAL VARIABLES */
-#line 494 "sql.y"
+ case 273: /* cmd ::= SHOW LOCAL VARIABLES */
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LOCAL_VARIABLES_STMT); }
-#line 6408 "sql.c"
break;
- case 269: /* cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */
-#line 495 "sql.y"
-{ pCxt->pRootNode = createShowDnodeVariablesStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[-2].minor.yy0), yymsp[0].minor.yy232); }
-#line 6413 "sql.c"
+ case 274: /* cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */
+{ pCxt->pRootNode = createShowDnodeVariablesStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[-2].minor.yy0), yymsp[0].minor.yy490); }
break;
- case 270: /* cmd ::= SHOW BNODES */
-#line 496 "sql.y"
+ case 275: /* cmd ::= SHOW BNODES */
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_BNODES_STMT); }
-#line 6418 "sql.c"
break;
- case 271: /* cmd ::= SHOW SNODES */
-#line 497 "sql.y"
+ case 276: /* cmd ::= SHOW SNODES */
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SNODES_STMT); }
-#line 6423 "sql.c"
break;
- case 272: /* cmd ::= SHOW CLUSTER */
-#line 498 "sql.y"
+ case 277: /* cmd ::= SHOW CLUSTER */
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CLUSTER_STMT); }
-#line 6428 "sql.c"
break;
- case 273: /* cmd ::= SHOW TRANSACTIONS */
-#line 499 "sql.y"
+ case 278: /* cmd ::= SHOW TRANSACTIONS */
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TRANSACTIONS_STMT); }
-#line 6433 "sql.c"
break;
- case 274: /* cmd ::= SHOW TABLE DISTRIBUTED full_table_name */
-#line 500 "sql.y"
-{ pCxt->pRootNode = createShowTableDistributedStmt(pCxt, yymsp[0].minor.yy232); }
-#line 6438 "sql.c"
+ case 279: /* cmd ::= SHOW TABLE DISTRIBUTED full_table_name */
+{ pCxt->pRootNode = createShowTableDistributedStmt(pCxt, yymsp[0].minor.yy490); }
break;
- case 275: /* cmd ::= SHOW CONSUMERS */
-#line 501 "sql.y"
+ case 280: /* cmd ::= SHOW CONSUMERS */
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CONSUMERS_STMT); }
-#line 6443 "sql.c"
break;
- case 276: /* cmd ::= SHOW SUBSCRIPTIONS */
-#line 502 "sql.y"
+ case 281: /* cmd ::= SHOW SUBSCRIPTIONS */
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SUBSCRIPTIONS_STMT); }
-#line 6448 "sql.c"
break;
- case 277: /* cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */
-#line 503 "sql.y"
-{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TAGS_STMT, yymsp[0].minor.yy232, yymsp[-1].minor.yy232, OP_TYPE_EQUAL); }
-#line 6453 "sql.c"
+ case 282: /* cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */
+{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TAGS_STMT, yymsp[0].minor.yy490, yymsp[-1].minor.yy490, OP_TYPE_EQUAL); }
break;
- case 278: /* cmd ::= SHOW TAGS FROM db_name NK_DOT table_name */
-#line 504 "sql.y"
-{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TAGS_STMT, createIdentifierValueNode(pCxt, &yymsp[-2].minor.yy993), createIdentifierValueNode(pCxt, &yymsp[0].minor.yy993), OP_TYPE_EQUAL); }
-#line 6458 "sql.c"
+ case 283: /* cmd ::= SHOW TAGS FROM db_name NK_DOT table_name */
+{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TAGS_STMT, createIdentifierValueNode(pCxt, &yymsp[-2].minor.yy561), createIdentifierValueNode(pCxt, &yymsp[0].minor.yy561), OP_TYPE_EQUAL); }
break;
- case 279: /* cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */
-#line 505 "sql.y"
-{ pCxt->pRootNode = createShowTableTagsStmt(pCxt, yymsp[-1].minor.yy232, yymsp[0].minor.yy232, yymsp[-3].minor.yy88); }
-#line 6463 "sql.c"
+ case 284: /* cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */
+{ pCxt->pRootNode = createShowTableTagsStmt(pCxt, yymsp[-1].minor.yy490, yymsp[0].minor.yy490, yymsp[-3].minor.yy502); }
break;
- case 280: /* cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name */
-#line 506 "sql.y"
-{ pCxt->pRootNode = createShowTableTagsStmt(pCxt, createIdentifierValueNode(pCxt, &yymsp[0].minor.yy993), createIdentifierValueNode(pCxt, &yymsp[-2].minor.yy993), yymsp[-4].minor.yy88); }
-#line 6468 "sql.c"
+ case 285: /* cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name */
+{ pCxt->pRootNode = createShowTableTagsStmt(pCxt, createIdentifierValueNode(pCxt, &yymsp[0].minor.yy561), createIdentifierValueNode(pCxt, &yymsp[-2].minor.yy561), yymsp[-4].minor.yy502); }
break;
- case 281: /* cmd ::= SHOW VNODES ON DNODE NK_INTEGER */
-#line 507 "sql.y"
+ case 286: /* cmd ::= SHOW VNODES ON DNODE NK_INTEGER */
{ pCxt->pRootNode = createShowVnodesStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0), NULL); }
-#line 6473 "sql.c"
break;
- case 282: /* cmd ::= SHOW VNODES */
-#line 508 "sql.y"
+ case 287: /* cmd ::= SHOW VNODES */
{ pCxt->pRootNode = createShowVnodesStmt(pCxt, NULL, NULL); }
-#line 6478 "sql.c"
break;
- case 283: /* cmd ::= SHOW db_name_cond_opt ALIVE */
-#line 510 "sql.y"
-{ pCxt->pRootNode = createShowAliveStmt(pCxt, yymsp[-1].minor.yy232, QUERY_NODE_SHOW_DB_ALIVE_STMT); }
-#line 6483 "sql.c"
+ case 288: /* cmd ::= SHOW db_name_cond_opt ALIVE */
+{ pCxt->pRootNode = createShowAliveStmt(pCxt, yymsp[-1].minor.yy490, QUERY_NODE_SHOW_DB_ALIVE_STMT); }
break;
- case 284: /* cmd ::= SHOW CLUSTER ALIVE */
-#line 511 "sql.y"
+ case 289: /* cmd ::= SHOW CLUSTER ALIVE */
{ pCxt->pRootNode = createShowAliveStmt(pCxt, NULL, QUERY_NODE_SHOW_CLUSTER_ALIVE_STMT); }
-#line 6488 "sql.c"
break;
- case 285: /* cmd ::= SHOW db_name_cond_opt VIEWS */
-#line 512 "sql.y"
-{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VIEWS_STMT, yymsp[-1].minor.yy232, NULL, OP_TYPE_LIKE); }
-#line 6493 "sql.c"
+ 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); }
break;
- case 286: /* cmd ::= SHOW CREATE VIEW full_table_name */
-#line 513 "sql.y"
-{ pCxt->pRootNode = createShowCreateViewStmt(pCxt, QUERY_NODE_SHOW_CREATE_VIEW_STMT, yymsp[0].minor.yy232); }
-#line 6498 "sql.c"
+ case 291: /* cmd ::= SHOW CREATE VIEW full_table_name */
+{ pCxt->pRootNode = createShowCreateViewStmt(pCxt, QUERY_NODE_SHOW_CREATE_VIEW_STMT, yymsp[0].minor.yy490); }
break;
- case 287: /* cmd ::= SHOW COMPACTS */
-#line 514 "sql.y"
+ case 292: /* cmd ::= SHOW COMPACTS */
{ pCxt->pRootNode = createShowCompactsStmt(pCxt, QUERY_NODE_SHOW_COMPACTS_STMT); }
-#line 6503 "sql.c"
break;
- case 288: /* cmd ::= SHOW COMPACT NK_INTEGER */
-#line 515 "sql.y"
+ case 293: /* cmd ::= SHOW COMPACT NK_INTEGER */
{ pCxt->pRootNode = createShowCompactDetailsStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); }
-#line 6508 "sql.c"
break;
- case 289: /* table_kind_db_name_cond_opt ::= */
-#line 519 "sql.y"
-{ yymsp[1].minor.yy133.kind = SHOW_KIND_ALL; yymsp[1].minor.yy133.dbName = nil_token; }
-#line 6513 "sql.c"
+ case 294: /* table_kind_db_name_cond_opt ::= */
+{ yymsp[1].minor.yy961.kind = SHOW_KIND_ALL; yymsp[1].minor.yy961.dbName = nil_token; }
break;
- case 290: /* table_kind_db_name_cond_opt ::= table_kind */
-#line 520 "sql.y"
-{ yylhsminor.yy133.kind = yymsp[0].minor.yy281; yylhsminor.yy133.dbName = nil_token; }
-#line 6518 "sql.c"
- yymsp[0].minor.yy133 = yylhsminor.yy133;
+ case 295: /* table_kind_db_name_cond_opt ::= table_kind */
+{ yylhsminor.yy961.kind = yymsp[0].minor.yy579; yylhsminor.yy961.dbName = nil_token; }
+ yymsp[0].minor.yy961 = yylhsminor.yy961;
break;
- case 291: /* table_kind_db_name_cond_opt ::= db_name NK_DOT */
-#line 521 "sql.y"
-{ yylhsminor.yy133.kind = SHOW_KIND_ALL; yylhsminor.yy133.dbName = yymsp[-1].minor.yy993; }
-#line 6524 "sql.c"
- yymsp[-1].minor.yy133 = yylhsminor.yy133;
+ case 296: /* table_kind_db_name_cond_opt ::= db_name NK_DOT */
+{ yylhsminor.yy961.kind = SHOW_KIND_ALL; yylhsminor.yy961.dbName = yymsp[-1].minor.yy561; }
+ yymsp[-1].minor.yy961 = yylhsminor.yy961;
break;
- case 292: /* table_kind_db_name_cond_opt ::= table_kind db_name NK_DOT */
-#line 522 "sql.y"
-{ yylhsminor.yy133.kind = yymsp[-2].minor.yy281; yylhsminor.yy133.dbName = yymsp[-1].minor.yy993; }
-#line 6530 "sql.c"
- yymsp[-2].minor.yy133 = yylhsminor.yy133;
+ case 297: /* table_kind_db_name_cond_opt ::= table_kind db_name NK_DOT */
+{ yylhsminor.yy961.kind = yymsp[-2].minor.yy579; yylhsminor.yy961.dbName = yymsp[-1].minor.yy561; }
+ yymsp[-2].minor.yy961 = yylhsminor.yy961;
break;
- case 293: /* table_kind ::= NORMAL */
-#line 526 "sql.y"
-{ yymsp[0].minor.yy281 = SHOW_KIND_TABLES_NORMAL; }
-#line 6536 "sql.c"
+ case 298: /* table_kind ::= NORMAL */
+{ yymsp[0].minor.yy579 = SHOW_KIND_TABLES_NORMAL; }
break;
- case 294: /* table_kind ::= CHILD */
-#line 527 "sql.y"
-{ yymsp[0].minor.yy281 = SHOW_KIND_TABLES_CHILD; }
-#line 6541 "sql.c"
+ case 299: /* table_kind ::= CHILD */
+{ yymsp[0].minor.yy579 = SHOW_KIND_TABLES_CHILD; }
break;
- case 295: /* db_name_cond_opt ::= */
- case 300: /* from_db_opt ::= */ yytestcase(yyruleno==300);
-#line 529 "sql.y"
-{ yymsp[1].minor.yy232 = createDefaultDatabaseCondValue(pCxt); }
-#line 6547 "sql.c"
+ case 300: /* db_name_cond_opt ::= */
+ case 305: /* from_db_opt ::= */ yytestcase(yyruleno==305);
+{ yymsp[1].minor.yy490 = createDefaultDatabaseCondValue(pCxt); }
break;
- case 296: /* db_name_cond_opt ::= db_name NK_DOT */
-#line 530 "sql.y"
-{ yylhsminor.yy232 = createIdentifierValueNode(pCxt, &yymsp[-1].minor.yy993); }
-#line 6552 "sql.c"
- yymsp[-1].minor.yy232 = yylhsminor.yy232;
+ case 301: /* db_name_cond_opt ::= db_name NK_DOT */
+{ yylhsminor.yy490 = createIdentifierValueNode(pCxt, &yymsp[-1].minor.yy561); }
+ yymsp[-1].minor.yy490 = yylhsminor.yy490;
break;
- case 298: /* like_pattern_opt ::= LIKE NK_STRING */
-#line 533 "sql.y"
-{ yymsp[-1].minor.yy232 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); }
-#line 6558 "sql.c"
+ case 303: /* like_pattern_opt ::= LIKE NK_STRING */
+{ yymsp[-1].minor.yy490 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); }
break;
- case 299: /* table_name_cond ::= table_name */
-#line 535 "sql.y"
-{ yylhsminor.yy232 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy993); }
-#line 6563 "sql.c"
- yymsp[0].minor.yy232 = yylhsminor.yy232;
+ case 304: /* table_name_cond ::= table_name */
+{ yylhsminor.yy490 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy561); }
+ yymsp[0].minor.yy490 = yylhsminor.yy490;
break;
- case 301: /* from_db_opt ::= FROM db_name */
-#line 538 "sql.y"
-{ yymsp[-1].minor.yy232 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy993); }
-#line 6569 "sql.c"
+ case 306: /* from_db_opt ::= FROM db_name */
+{ yymsp[-1].minor.yy490 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy561); }
break;
- case 305: /* tag_item ::= TBNAME */
-#line 546 "sql.y"
-{ yylhsminor.yy232 = setProjectionAlias(pCxt, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL), &yymsp[0].minor.yy0); }
-#line 6574 "sql.c"
- yymsp[0].minor.yy232 = yylhsminor.yy232;
+ case 310: /* tag_item ::= TBNAME */
+{ yylhsminor.yy490 = setProjectionAlias(pCxt, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL), &yymsp[0].minor.yy0); }
+ yymsp[0].minor.yy490 = yylhsminor.yy490;
break;
- case 308: /* tag_item ::= column_name column_alias */
-#line 549 "sql.y"
-{ yylhsminor.yy232 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-1].minor.yy993), &yymsp[0].minor.yy993); }
-#line 6580 "sql.c"
- yymsp[-1].minor.yy232 = yylhsminor.yy232;
+ case 313: /* tag_item ::= column_name column_alias */
+{ yylhsminor.yy490 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-1].minor.yy561), &yymsp[0].minor.yy561); }
+ yymsp[-1].minor.yy490 = yylhsminor.yy490;
break;
- case 309: /* tag_item ::= column_name AS column_alias */
-#line 550 "sql.y"
-{ yylhsminor.yy232 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-2].minor.yy993), &yymsp[0].minor.yy993); }
-#line 6586 "sql.c"
- yymsp[-2].minor.yy232 = yylhsminor.yy232;
+ case 314: /* tag_item ::= column_name AS column_alias */
+{ yylhsminor.yy490 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-2].minor.yy561), &yymsp[0].minor.yy561); }
+ yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
- case 310: /* db_kind_opt ::= */
-#line 554 "sql.y"
-{ yymsp[1].minor.yy281 = SHOW_KIND_ALL; }
-#line 6592 "sql.c"
+ case 315: /* db_kind_opt ::= */
+{ yymsp[1].minor.yy579 = SHOW_KIND_ALL; }
break;
- case 311: /* db_kind_opt ::= USER */
-#line 555 "sql.y"
-{ yymsp[0].minor.yy281 = SHOW_KIND_DATABASES_USER; }
-#line 6597 "sql.c"
+ case 316: /* db_kind_opt ::= USER */
+{ yymsp[0].minor.yy579 = SHOW_KIND_DATABASES_USER; }
break;
- case 312: /* db_kind_opt ::= SYSTEM */
-#line 556 "sql.y"
-{ yymsp[0].minor.yy281 = SHOW_KIND_DATABASES_SYSTEM; }
-#line 6602 "sql.c"
+ case 317: /* db_kind_opt ::= SYSTEM */
+{ yymsp[0].minor.yy579 = SHOW_KIND_DATABASES_SYSTEM; }
break;
- case 313: /* cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options */
-#line 560 "sql.y"
-{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_SMA, yymsp[-4].minor.yy985, yymsp[-3].minor.yy232, yymsp[-1].minor.yy232, NULL, yymsp[0].minor.yy232); }
-#line 6607 "sql.c"
+ case 318: /* cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options */
+{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_SMA, yymsp[-4].minor.yy845, yymsp[-3].minor.yy490, yymsp[-1].minor.yy490, NULL, yymsp[0].minor.yy490); }
break;
- case 314: /* cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP */
-#line 562 "sql.y"
-{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_NORMAL, yymsp[-6].minor.yy985, yymsp[-5].minor.yy232, yymsp[-3].minor.yy232, yymsp[-1].minor.yy88, NULL); }
-#line 6612 "sql.c"
+ case 319: /* cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP */
+{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_NORMAL, yymsp[-6].minor.yy845, yymsp[-5].minor.yy490, yymsp[-3].minor.yy490, yymsp[-1].minor.yy502, NULL); }
break;
- case 315: /* cmd ::= DROP INDEX exists_opt full_index_name */
-#line 563 "sql.y"
-{ pCxt->pRootNode = createDropIndexStmt(pCxt, yymsp[-1].minor.yy985, yymsp[0].minor.yy232); }
-#line 6617 "sql.c"
+ case 320: /* cmd ::= DROP INDEX exists_opt full_index_name */
+{ pCxt->pRootNode = createDropIndexStmt(pCxt, yymsp[-1].minor.yy845, yymsp[0].minor.yy490); }
break;
- case 316: /* full_index_name ::= index_name */
-#line 565 "sql.y"
-{ yylhsminor.yy232 = createRealTableNodeForIndexName(pCxt, NULL, &yymsp[0].minor.yy993); }
-#line 6622 "sql.c"
- yymsp[0].minor.yy232 = yylhsminor.yy232;
+ case 321: /* full_index_name ::= index_name */
+{ yylhsminor.yy490 = createRealTableNodeForIndexName(pCxt, NULL, &yymsp[0].minor.yy561); }
+ yymsp[0].minor.yy490 = yylhsminor.yy490;
break;
- case 317: /* full_index_name ::= db_name NK_DOT index_name */
-#line 566 "sql.y"
-{ yylhsminor.yy232 = createRealTableNodeForIndexName(pCxt, &yymsp[-2].minor.yy993, &yymsp[0].minor.yy993); }
-#line 6628 "sql.c"
- yymsp[-2].minor.yy232 = yylhsminor.yy232;
+ case 322: /* full_index_name ::= db_name NK_DOT index_name */
+{ yylhsminor.yy490 = createRealTableNodeForIndexName(pCxt, &yymsp[-2].minor.yy561, &yymsp[0].minor.yy561); }
+ yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
- case 318: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */
-#line 569 "sql.y"
-{ yymsp[-9].minor.yy232 = createIndexOption(pCxt, yymsp[-7].minor.yy88, releaseRawExprNode(pCxt, yymsp[-3].minor.yy232), NULL, yymsp[-1].minor.yy232, yymsp[0].minor.yy232); }
-#line 6634 "sql.c"
+ case 323: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */
+{ 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); }
break;
- case 319: /* 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 572 "sql.y"
-{ yymsp[-11].minor.yy232 = createIndexOption(pCxt, yymsp[-9].minor.yy88, releaseRawExprNode(pCxt, yymsp[-5].minor.yy232), releaseRawExprNode(pCxt, yymsp[-3].minor.yy232), yymsp[-1].minor.yy232, yymsp[0].minor.yy232); }
-#line 6639 "sql.c"
+ 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 */
+{ 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); }
break;
- case 322: /* func ::= sma_func_name NK_LP expression_list NK_RP */
-#line 579 "sql.y"
-{ yylhsminor.yy232 = createFunctionNode(pCxt, &yymsp[-3].minor.yy993, yymsp[-1].minor.yy88); }
-#line 6644 "sql.c"
- yymsp[-3].minor.yy232 = yylhsminor.yy232;
+ case 327: /* func ::= sma_func_name NK_LP expression_list NK_RP */
+{ yylhsminor.yy490 = createFunctionNode(pCxt, &yymsp[-3].minor.yy561, yymsp[-1].minor.yy502); }
+ yymsp[-3].minor.yy490 = yylhsminor.yy490;
break;
- case 323: /* sma_func_name ::= function_name */
- case 548: /* alias_opt ::= table_alias */ yytestcase(yyruleno==548);
-#line 583 "sql.y"
-{ yylhsminor.yy993 = yymsp[0].minor.yy993; }
-#line 6651 "sql.c"
- yymsp[0].minor.yy993 = yylhsminor.yy993;
+ case 328: /* sma_func_name ::= function_name */
+ case 553: /* alias_opt ::= table_alias */ yytestcase(yyruleno==553);
+{ yylhsminor.yy561 = yymsp[0].minor.yy561; }
+ yymsp[0].minor.yy561 = yylhsminor.yy561;
break;
- case 328: /* sma_stream_opt ::= */
- case 373: /* stream_options ::= */ yytestcase(yyruleno==373);
-#line 589 "sql.y"
-{ yymsp[1].minor.yy232 = createStreamOptions(pCxt); }
-#line 6658 "sql.c"
+ case 333: /* sma_stream_opt ::= */
+ case 378: /* stream_options ::= */ yytestcase(yyruleno==378);
+{ yymsp[1].minor.yy490 = createStreamOptions(pCxt); }
break;
- case 329: /* sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */
-#line 590 "sql.y"
-{ ((SStreamOptions*)yymsp[-2].minor.yy232)->pWatermark = releaseRawExprNode(pCxt, yymsp[0].minor.yy232); yylhsminor.yy232 = yymsp[-2].minor.yy232; }
-#line 6663 "sql.c"
- yymsp[-2].minor.yy232 = yylhsminor.yy232;
+ case 334: /* sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */
+{ ((SStreamOptions*)yymsp[-2].minor.yy490)->pWatermark = releaseRawExprNode(pCxt, yymsp[0].minor.yy490); yylhsminor.yy490 = yymsp[-2].minor.yy490; }
+ yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
- case 330: /* sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */
-#line 591 "sql.y"
-{ ((SStreamOptions*)yymsp[-2].minor.yy232)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy232); yylhsminor.yy232 = yymsp[-2].minor.yy232; }
-#line 6669 "sql.c"
- yymsp[-2].minor.yy232 = yylhsminor.yy232;
+ case 335: /* sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */
+{ ((SStreamOptions*)yymsp[-2].minor.yy490)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy490); yylhsminor.yy490 = yymsp[-2].minor.yy490; }
+ yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
- case 331: /* sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */
-#line 592 "sql.y"
-{ ((SStreamOptions*)yymsp[-2].minor.yy232)->pDeleteMark = releaseRawExprNode(pCxt, yymsp[0].minor.yy232); yylhsminor.yy232 = yymsp[-2].minor.yy232; }
-#line 6675 "sql.c"
- yymsp[-2].minor.yy232 = yylhsminor.yy232;
+ case 336: /* sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */
+{ ((SStreamOptions*)yymsp[-2].minor.yy490)->pDeleteMark = releaseRawExprNode(pCxt, yymsp[0].minor.yy490); yylhsminor.yy490 = yymsp[-2].minor.yy490; }
+ yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
- case 332: /* with_meta ::= AS */
-#line 597 "sql.y"
-{ yymsp[0].minor.yy92 = 0; }
-#line 6681 "sql.c"
+ case 337: /* with_meta ::= AS */
+{ yymsp[0].minor.yy774 = 0; }
break;
- case 333: /* with_meta ::= WITH META AS */
-#line 598 "sql.y"
-{ yymsp[-2].minor.yy92 = 1; }
-#line 6686 "sql.c"
+ case 338: /* with_meta ::= WITH META AS */
+{ yymsp[-2].minor.yy774 = 1; }
break;
- case 334: /* with_meta ::= ONLY META AS */
-#line 599 "sql.y"
-{ yymsp[-2].minor.yy92 = 2; }
-#line 6691 "sql.c"
+ case 339: /* with_meta ::= ONLY META AS */
+{ yymsp[-2].minor.yy774 = 2; }
break;
- case 335: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */
-#line 601 "sql.y"
-{ pCxt->pRootNode = createCreateTopicStmtUseQuery(pCxt, yymsp[-3].minor.yy985, &yymsp[-2].minor.yy993, yymsp[0].minor.yy232); }
-#line 6696 "sql.c"
+ case 340: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */
+{ pCxt->pRootNode = createCreateTopicStmtUseQuery(pCxt, yymsp[-3].minor.yy845, &yymsp[-2].minor.yy561, yymsp[0].minor.yy490); }
break;
- case 336: /* cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name */
-#line 603 "sql.y"
-{ pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-4].minor.yy985, &yymsp[-3].minor.yy993, &yymsp[0].minor.yy993, yymsp[-2].minor.yy92); }
-#line 6701 "sql.c"
+ case 341: /* cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name */
+{ pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-4].minor.yy845, &yymsp[-3].minor.yy561, &yymsp[0].minor.yy561, yymsp[-2].minor.yy774); }
break;
- case 337: /* cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt */
-#line 605 "sql.y"
-{ pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-5].minor.yy985, &yymsp[-4].minor.yy993, yymsp[-1].minor.yy232, yymsp[-3].minor.yy92, yymsp[0].minor.yy232); }
-#line 6706 "sql.c"
+ case 342: /* cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt */
+{ pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-5].minor.yy845, &yymsp[-4].minor.yy561, yymsp[-1].minor.yy490, yymsp[-3].minor.yy774, yymsp[0].minor.yy490); }
break;
- case 338: /* cmd ::= DROP TOPIC exists_opt topic_name */
-#line 607 "sql.y"
-{ pCxt->pRootNode = createDropTopicStmt(pCxt, yymsp[-1].minor.yy985, &yymsp[0].minor.yy993); }
-#line 6711 "sql.c"
+ case 343: /* cmd ::= DROP TOPIC exists_opt topic_name */
+{ pCxt->pRootNode = createDropTopicStmt(pCxt, yymsp[-1].minor.yy845, &yymsp[0].minor.yy561); }
break;
- case 339: /* cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */
-#line 608 "sql.y"
-{ pCxt->pRootNode = createDropCGroupStmt(pCxt, yymsp[-3].minor.yy985, &yymsp[-2].minor.yy993, &yymsp[0].minor.yy993); }
-#line 6716 "sql.c"
+ case 344: /* cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */
+{ pCxt->pRootNode = createDropCGroupStmt(pCxt, yymsp[-3].minor.yy845, &yymsp[-2].minor.yy561, &yymsp[0].minor.yy561); }
break;
- case 340: /* cmd ::= DESC full_table_name */
- case 341: /* cmd ::= DESCRIBE full_table_name */ yytestcase(yyruleno==341);
-#line 611 "sql.y"
-{ pCxt->pRootNode = createDescribeStmt(pCxt, yymsp[0].minor.yy232); }
-#line 6722 "sql.c"
+ case 345: /* cmd ::= DESC full_table_name */
+ case 346: /* cmd ::= DESCRIBE full_table_name */ yytestcase(yyruleno==346);
+{ pCxt->pRootNode = createDescribeStmt(pCxt, yymsp[0].minor.yy490); }
break;
- case 342: /* cmd ::= RESET QUERY CACHE */
-#line 615 "sql.y"
+ case 347: /* cmd ::= RESET QUERY CACHE */
{ pCxt->pRootNode = createResetQueryCacheStmt(pCxt); }
-#line 6727 "sql.c"
break;
- case 343: /* cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */
- case 344: /* cmd ::= EXPLAIN analyze_opt explain_options insert_query */ yytestcase(yyruleno==344);
-#line 618 "sql.y"
-{ pCxt->pRootNode = createExplainStmt(pCxt, yymsp[-2].minor.yy985, yymsp[-1].minor.yy232, yymsp[0].minor.yy232); }
-#line 6733 "sql.c"
+ case 348: /* cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */
+ case 349: /* cmd ::= EXPLAIN analyze_opt explain_options insert_query */ yytestcase(yyruleno==349);
+{ pCxt->pRootNode = createExplainStmt(pCxt, yymsp[-2].minor.yy845, yymsp[-1].minor.yy490, yymsp[0].minor.yy490); }
break;
- case 347: /* explain_options ::= */
-#line 626 "sql.y"
-{ yymsp[1].minor.yy232 = createDefaultExplainOptions(pCxt); }
-#line 6738 "sql.c"
+ case 352: /* explain_options ::= */
+{ yymsp[1].minor.yy490 = createDefaultExplainOptions(pCxt); }
break;
- case 348: /* explain_options ::= explain_options VERBOSE NK_BOOL */
-#line 627 "sql.y"
-{ yylhsminor.yy232 = setExplainVerbose(pCxt, yymsp[-2].minor.yy232, &yymsp[0].minor.yy0); }
-#line 6743 "sql.c"
- yymsp[-2].minor.yy232 = yylhsminor.yy232;
+ case 353: /* explain_options ::= explain_options VERBOSE NK_BOOL */
+{ yylhsminor.yy490 = setExplainVerbose(pCxt, yymsp[-2].minor.yy490, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
- case 349: /* explain_options ::= explain_options RATIO NK_FLOAT */
-#line 628 "sql.y"
-{ yylhsminor.yy232 = setExplainRatio(pCxt, yymsp[-2].minor.yy232, &yymsp[0].minor.yy0); }
-#line 6749 "sql.c"
- yymsp[-2].minor.yy232 = yylhsminor.yy232;
+ case 354: /* explain_options ::= explain_options RATIO NK_FLOAT */
+{ yylhsminor.yy490 = setExplainRatio(pCxt, yymsp[-2].minor.yy490, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
- case 350: /* 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 633 "sql.y"
-{ pCxt->pRootNode = createCreateFunctionStmt(pCxt, yymsp[-7].minor.yy985, yymsp[-9].minor.yy985, &yymsp[-6].minor.yy993, &yymsp[-4].minor.yy0, yymsp[-2].minor.yy400, yymsp[-1].minor.yy92, &yymsp[0].minor.yy993, yymsp[-10].minor.yy985); }
-#line 6755 "sql.c"
+ 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 */
+{ 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); }
break;
- case 351: /* cmd ::= DROP FUNCTION exists_opt function_name */
-#line 634 "sql.y"
-{ pCxt->pRootNode = createDropFunctionStmt(pCxt, yymsp[-1].minor.yy985, &yymsp[0].minor.yy993); }
-#line 6760 "sql.c"
+ case 356: /* cmd ::= DROP FUNCTION exists_opt function_name */
+{ pCxt->pRootNode = createDropFunctionStmt(pCxt, yymsp[-1].minor.yy845, &yymsp[0].minor.yy561); }
break;
- case 356: /* language_opt ::= */
- case 395: /* on_vgroup_id ::= */ yytestcase(yyruleno==395);
-#line 648 "sql.y"
-{ yymsp[1].minor.yy993 = nil_token; }
-#line 6766 "sql.c"
+ case 361: /* language_opt ::= */
+ case 400: /* on_vgroup_id ::= */ yytestcase(yyruleno==400);
+{ yymsp[1].minor.yy561 = nil_token; }
break;
- case 357: /* language_opt ::= LANGUAGE NK_STRING */
- case 396: /* on_vgroup_id ::= ON NK_INTEGER */ yytestcase(yyruleno==396);
-#line 649 "sql.y"
-{ yymsp[-1].minor.yy993 = yymsp[0].minor.yy0; }
-#line 6772 "sql.c"
+ case 362: /* language_opt ::= LANGUAGE NK_STRING */
+ case 401: /* on_vgroup_id ::= ON NK_INTEGER */ yytestcase(yyruleno==401);
+{ yymsp[-1].minor.yy561 = yymsp[0].minor.yy0; }
break;
- case 360: /* cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery */
-#line 658 "sql.y"
-{ pCxt->pRootNode = createCreateViewStmt(pCxt, yymsp[-4].minor.yy985, yymsp[-2].minor.yy232, &yymsp[-1].minor.yy0, yymsp[0].minor.yy232); }
-#line 6777 "sql.c"
+ case 365: /* cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery */
+{ pCxt->pRootNode = createCreateViewStmt(pCxt, yymsp[-4].minor.yy845, yymsp[-2].minor.yy490, &yymsp[-1].minor.yy0, yymsp[0].minor.yy490); }
break;
- case 361: /* cmd ::= DROP VIEW exists_opt full_view_name */
-#line 659 "sql.y"
-{ pCxt->pRootNode = createDropViewStmt(pCxt, yymsp[-1].minor.yy985, yymsp[0].minor.yy232); }
-#line 6782 "sql.c"
+ case 366: /* cmd ::= DROP VIEW exists_opt full_view_name */
+{ pCxt->pRootNode = createDropViewStmt(pCxt, yymsp[-1].minor.yy845, yymsp[0].minor.yy490); }
break;
- case 362: /* full_view_name ::= view_name */
-#line 661 "sql.y"
-{ yylhsminor.yy232 = createViewNode(pCxt, NULL, &yymsp[0].minor.yy993); }
-#line 6787 "sql.c"
- yymsp[0].minor.yy232 = yylhsminor.yy232;
+ case 367: /* full_view_name ::= view_name */
+{ yylhsminor.yy490 = createViewNode(pCxt, NULL, &yymsp[0].minor.yy561); }
+ yymsp[0].minor.yy490 = yylhsminor.yy490;
break;
- case 363: /* full_view_name ::= db_name NK_DOT view_name */
-#line 662 "sql.y"
-{ yylhsminor.yy232 = createViewNode(pCxt, &yymsp[-2].minor.yy993, &yymsp[0].minor.yy993); }
-#line 6793 "sql.c"
- yymsp[-2].minor.yy232 = yylhsminor.yy232;
+ case 368: /* full_view_name ::= db_name NK_DOT view_name */
+{ yylhsminor.yy490 = createViewNode(pCxt, &yymsp[-2].minor.yy561, &yymsp[0].minor.yy561); }
+ yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
- case 364: /* 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 667 "sql.y"
-{ pCxt->pRootNode = createCreateStreamStmt(pCxt, yymsp[-9].minor.yy985, &yymsp[-8].minor.yy993, yymsp[-5].minor.yy232, yymsp[-7].minor.yy232, yymsp[-3].minor.yy88, yymsp[-2].minor.yy232, yymsp[0].minor.yy232, yymsp[-4].minor.yy88); }
-#line 6799 "sql.c"
+ 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 */
+{ 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); }
break;
- case 365: /* cmd ::= DROP STREAM exists_opt stream_name */
-#line 668 "sql.y"
-{ pCxt->pRootNode = createDropStreamStmt(pCxt, yymsp[-1].minor.yy985, &yymsp[0].minor.yy993); }
-#line 6804 "sql.c"
+ case 370: /* cmd ::= DROP STREAM exists_opt stream_name */
+{ pCxt->pRootNode = createDropStreamStmt(pCxt, yymsp[-1].minor.yy845, &yymsp[0].minor.yy561); }
break;
- case 366: /* cmd ::= PAUSE STREAM exists_opt stream_name */
-#line 669 "sql.y"
-{ pCxt->pRootNode = createPauseStreamStmt(pCxt, yymsp[-1].minor.yy985, &yymsp[0].minor.yy993); }
-#line 6809 "sql.c"
+ case 371: /* cmd ::= PAUSE STREAM exists_opt stream_name */
+{ pCxt->pRootNode = createPauseStreamStmt(pCxt, yymsp[-1].minor.yy845, &yymsp[0].minor.yy561); }
break;
- case 367: /* cmd ::= RESUME STREAM exists_opt ignore_opt stream_name */
-#line 670 "sql.y"
-{ pCxt->pRootNode = createResumeStreamStmt(pCxt, yymsp[-2].minor.yy985, yymsp[-1].minor.yy985, &yymsp[0].minor.yy993); }
-#line 6814 "sql.c"
+ case 372: /* cmd ::= RESUME STREAM exists_opt ignore_opt stream_name */
+{ pCxt->pRootNode = createResumeStreamStmt(pCxt, yymsp[-2].minor.yy845, yymsp[-1].minor.yy845, &yymsp[0].minor.yy561); }
break;
- case 374: /* stream_options ::= stream_options TRIGGER AT_ONCE */
- case 375: /* stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ yytestcase(yyruleno==375);
-#line 684 "sql.y"
-{ yylhsminor.yy232 = setStreamOptions(pCxt, yymsp[-2].minor.yy232, SOPT_TRIGGER_TYPE_SET, &yymsp[0].minor.yy0, NULL); }
-#line 6820 "sql.c"
- yymsp[-2].minor.yy232 = yylhsminor.yy232;
+ case 379: /* stream_options ::= stream_options TRIGGER AT_ONCE */
+ case 380: /* stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ yytestcase(yyruleno==380);
+{ yylhsminor.yy490 = setStreamOptions(pCxt, yymsp[-2].minor.yy490, SOPT_TRIGGER_TYPE_SET, &yymsp[0].minor.yy0, NULL); }
+ yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
- case 376: /* stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */
-#line 686 "sql.y"
-{ yylhsminor.yy232 = setStreamOptions(pCxt, yymsp[-3].minor.yy232, SOPT_TRIGGER_TYPE_SET, &yymsp[-1].minor.yy0, releaseRawExprNode(pCxt, yymsp[0].minor.yy232)); }
-#line 6826 "sql.c"
- yymsp[-3].minor.yy232 = yylhsminor.yy232;
+ case 381: /* stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */
+{ yylhsminor.yy490 = setStreamOptions(pCxt, yymsp[-3].minor.yy490, SOPT_TRIGGER_TYPE_SET, &yymsp[-1].minor.yy0, releaseRawExprNode(pCxt, yymsp[0].minor.yy490)); }
+ yymsp[-3].minor.yy490 = yylhsminor.yy490;
break;
- case 377: /* stream_options ::= stream_options WATERMARK duration_literal */
-#line 687 "sql.y"
-{ yylhsminor.yy232 = setStreamOptions(pCxt, yymsp[-2].minor.yy232, SOPT_WATERMARK_SET, NULL, releaseRawExprNode(pCxt, yymsp[0].minor.yy232)); }
-#line 6832 "sql.c"
- yymsp[-2].minor.yy232 = yylhsminor.yy232;
+ case 382: /* stream_options ::= stream_options WATERMARK duration_literal */
+{ yylhsminor.yy490 = setStreamOptions(pCxt, yymsp[-2].minor.yy490, SOPT_WATERMARK_SET, NULL, releaseRawExprNode(pCxt, yymsp[0].minor.yy490)); }
+ yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
- case 378: /* stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */
-#line 688 "sql.y"
-{ yylhsminor.yy232 = setStreamOptions(pCxt, yymsp[-3].minor.yy232, SOPT_IGNORE_EXPIRED_SET, &yymsp[0].minor.yy0, NULL); }
-#line 6838 "sql.c"
- yymsp[-3].minor.yy232 = yylhsminor.yy232;
+ case 383: /* stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */
+{ yylhsminor.yy490 = setStreamOptions(pCxt, yymsp[-3].minor.yy490, SOPT_IGNORE_EXPIRED_SET, &yymsp[0].minor.yy0, NULL); }
+ yymsp[-3].minor.yy490 = yylhsminor.yy490;
break;
- case 379: /* stream_options ::= stream_options FILL_HISTORY NK_INTEGER */
-#line 689 "sql.y"
-{ yylhsminor.yy232 = setStreamOptions(pCxt, yymsp[-2].minor.yy232, SOPT_FILL_HISTORY_SET, &yymsp[0].minor.yy0, NULL); }
-#line 6844 "sql.c"
- yymsp[-2].minor.yy232 = yylhsminor.yy232;
+ case 384: /* stream_options ::= stream_options FILL_HISTORY NK_INTEGER */
+{ yylhsminor.yy490 = setStreamOptions(pCxt, yymsp[-2].minor.yy490, SOPT_FILL_HISTORY_SET, &yymsp[0].minor.yy0, NULL); }
+ yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
- case 380: /* stream_options ::= stream_options DELETE_MARK duration_literal */
-#line 690 "sql.y"
-{ yylhsminor.yy232 = setStreamOptions(pCxt, yymsp[-2].minor.yy232, SOPT_DELETE_MARK_SET, NULL, releaseRawExprNode(pCxt, yymsp[0].minor.yy232)); }
-#line 6850 "sql.c"
- yymsp[-2].minor.yy232 = yylhsminor.yy232;
+ case 385: /* stream_options ::= stream_options DELETE_MARK duration_literal */
+{ yylhsminor.yy490 = setStreamOptions(pCxt, yymsp[-2].minor.yy490, SOPT_DELETE_MARK_SET, NULL, releaseRawExprNode(pCxt, yymsp[0].minor.yy490)); }
+ yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
- case 381: /* stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */
-#line 691 "sql.y"
-{ yylhsminor.yy232 = setStreamOptions(pCxt, yymsp[-3].minor.yy232, SOPT_IGNORE_UPDATE_SET, &yymsp[0].minor.yy0, NULL); }
-#line 6856 "sql.c"
- yymsp[-3].minor.yy232 = yylhsminor.yy232;
+ case 386: /* stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */
+{ yylhsminor.yy490 = setStreamOptions(pCxt, yymsp[-3].minor.yy490, SOPT_IGNORE_UPDATE_SET, &yymsp[0].minor.yy0, NULL); }
+ yymsp[-3].minor.yy490 = yylhsminor.yy490;
break;
- case 383: /* subtable_opt ::= SUBTABLE NK_LP expression NK_RP */
- case 586: /* sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP */ yytestcase(yyruleno==586);
- case 610: /* every_opt ::= EVERY NK_LP duration_literal NK_RP */ yytestcase(yyruleno==610);
-#line 694 "sql.y"
-{ yymsp[-3].minor.yy232 = releaseRawExprNode(pCxt, yymsp[-1].minor.yy232); }
-#line 6864 "sql.c"
+ 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);
+{ yymsp[-3].minor.yy490 = releaseRawExprNode(pCxt, yymsp[-1].minor.yy490); }
break;
- case 386: /* cmd ::= KILL CONNECTION NK_INTEGER */
-#line 702 "sql.y"
+ case 391: /* cmd ::= KILL CONNECTION NK_INTEGER */
{ pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_CONNECTION_STMT, &yymsp[0].minor.yy0); }
-#line 6869 "sql.c"
break;
- case 387: /* cmd ::= KILL QUERY NK_STRING */
-#line 703 "sql.y"
+ case 392: /* cmd ::= KILL QUERY NK_STRING */
{ pCxt->pRootNode = createKillQueryStmt(pCxt, &yymsp[0].minor.yy0); }
-#line 6874 "sql.c"
break;
- case 388: /* cmd ::= KILL TRANSACTION NK_INTEGER */
-#line 704 "sql.y"
+ case 393: /* cmd ::= KILL TRANSACTION NK_INTEGER */
{ pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_TRANSACTION_STMT, &yymsp[0].minor.yy0); }
-#line 6879 "sql.c"
break;
- case 389: /* cmd ::= KILL COMPACT NK_INTEGER */
-#line 705 "sql.y"
+ case 394: /* cmd ::= KILL COMPACT NK_INTEGER */
{ pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_COMPACT_STMT, &yymsp[0].minor.yy0); }
-#line 6884 "sql.c"
break;
- case 390: /* cmd ::= BALANCE VGROUP */
-#line 708 "sql.y"
+ case 395: /* cmd ::= BALANCE VGROUP */
{ pCxt->pRootNode = createBalanceVgroupStmt(pCxt); }
-#line 6889 "sql.c"
break;
- case 391: /* cmd ::= BALANCE VGROUP LEADER on_vgroup_id */
-#line 709 "sql.y"
-{ pCxt->pRootNode = createBalanceVgroupLeaderStmt(pCxt, &yymsp[0].minor.yy993); }
-#line 6894 "sql.c"
+ case 396: /* cmd ::= BALANCE VGROUP LEADER on_vgroup_id */
+{ pCxt->pRootNode = createBalanceVgroupLeaderStmt(pCxt, &yymsp[0].minor.yy561); }
break;
- case 392: /* cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */
-#line 710 "sql.y"
+ case 397: /* cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */
{ pCxt->pRootNode = createMergeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); }
-#line 6899 "sql.c"
break;
- case 393: /* cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */
-#line 711 "sql.y"
-{ pCxt->pRootNode = createRedistributeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy88); }
-#line 6904 "sql.c"
+ case 398: /* cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */
+{ pCxt->pRootNode = createRedistributeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy502); }
break;
- case 394: /* cmd ::= SPLIT VGROUP NK_INTEGER */
-#line 712 "sql.y"
+ case 399: /* cmd ::= SPLIT VGROUP NK_INTEGER */
{ pCxt->pRootNode = createSplitVgroupStmt(pCxt, &yymsp[0].minor.yy0); }
-#line 6909 "sql.c"
break;
- case 397: /* dnode_list ::= DNODE NK_INTEGER */
-#line 721 "sql.y"
-{ yymsp[-1].minor.yy88 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); }
-#line 6914 "sql.c"
+ case 402: /* dnode_list ::= DNODE NK_INTEGER */
+{ yymsp[-1].minor.yy502 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); }
break;
- case 399: /* cmd ::= DELETE FROM full_table_name where_clause_opt */
-#line 728 "sql.y"
-{ pCxt->pRootNode = createDeleteStmt(pCxt, yymsp[-1].minor.yy232, yymsp[0].minor.yy232); }
-#line 6919 "sql.c"
+ case 404: /* cmd ::= DELETE FROM full_table_name where_clause_opt */
+{ pCxt->pRootNode = createDeleteStmt(pCxt, yymsp[-1].minor.yy490, yymsp[0].minor.yy490); }
break;
- case 402: /* insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */
-#line 737 "sql.y"
-{ yymsp[-6].minor.yy232 = createInsertStmt(pCxt, yymsp[-4].minor.yy232, yymsp[-2].minor.yy88, yymsp[0].minor.yy232); }
-#line 6924 "sql.c"
+ case 407: /* insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */
+{ yymsp[-6].minor.yy490 = createInsertStmt(pCxt, yymsp[-4].minor.yy490, yymsp[-2].minor.yy502, yymsp[0].minor.yy490); }
break;
- case 403: /* insert_query ::= INSERT INTO full_table_name query_or_subquery */
-#line 738 "sql.y"
-{ yymsp[-3].minor.yy232 = createInsertStmt(pCxt, yymsp[-1].minor.yy232, NULL, yymsp[0].minor.yy232); }
-#line 6929 "sql.c"
+ case 408: /* insert_query ::= INSERT INTO full_table_name query_or_subquery */
+{ yymsp[-3].minor.yy490 = createInsertStmt(pCxt, yymsp[-1].minor.yy490, NULL, yymsp[0].minor.yy490); }
break;
- case 404: /* literal ::= NK_INTEGER */
-#line 741 "sql.y"
-{ yylhsminor.yy232 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0)); }
-#line 6934 "sql.c"
- yymsp[0].minor.yy232 = yylhsminor.yy232;
+ case 409: /* literal ::= NK_INTEGER */
+{ yylhsminor.yy490 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0)); }
+ yymsp[0].minor.yy490 = yylhsminor.yy490;
break;
- case 405: /* literal ::= NK_FLOAT */
-#line 742 "sql.y"
-{ yylhsminor.yy232 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0)); }
-#line 6940 "sql.c"
- yymsp[0].minor.yy232 = yylhsminor.yy232;
+ case 410: /* literal ::= NK_FLOAT */
+{ yylhsminor.yy490 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0)); }
+ yymsp[0].minor.yy490 = yylhsminor.yy490;
break;
- case 406: /* literal ::= NK_STRING */
-#line 743 "sql.y"
-{ yylhsminor.yy232 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); }
-#line 6946 "sql.c"
- yymsp[0].minor.yy232 = yylhsminor.yy232;
+ case 411: /* literal ::= NK_STRING */
+{ yylhsminor.yy490 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); }
+ yymsp[0].minor.yy490 = yylhsminor.yy490;
break;
- case 407: /* literal ::= NK_BOOL */
-#line 744 "sql.y"
-{ yylhsminor.yy232 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0)); }
-#line 6952 "sql.c"
- yymsp[0].minor.yy232 = yylhsminor.yy232;
+ case 412: /* literal ::= NK_BOOL */
+{ yylhsminor.yy490 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0)); }
+ yymsp[0].minor.yy490 = yylhsminor.yy490;
break;
- case 408: /* literal ::= TIMESTAMP NK_STRING */
-#line 745 "sql.y"
-{ yylhsminor.yy232 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0)); }
-#line 6958 "sql.c"
- yymsp[-1].minor.yy232 = yylhsminor.yy232;
+ case 413: /* literal ::= TIMESTAMP NK_STRING */
+{ yylhsminor.yy490 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0)); }
+ yymsp[-1].minor.yy490 = yylhsminor.yy490;
break;
- case 409: /* literal ::= duration_literal */
- case 419: /* signed_literal ::= signed */ yytestcase(yyruleno==419);
- case 442: /* expr_or_subquery ::= expression */ yytestcase(yyruleno==442);
- case 443: /* expression ::= literal */ yytestcase(yyruleno==443);
- case 445: /* expression ::= column_reference */ yytestcase(yyruleno==445);
- case 446: /* expression ::= function_expression */ yytestcase(yyruleno==446);
- case 447: /* expression ::= case_when_expression */ yytestcase(yyruleno==447);
- case 480: /* function_expression ::= literal_func */ yytestcase(yyruleno==480);
- case 529: /* boolean_value_expression ::= boolean_primary */ yytestcase(yyruleno==529);
- case 533: /* boolean_primary ::= predicate */ yytestcase(yyruleno==533);
- case 535: /* common_expression ::= expr_or_subquery */ yytestcase(yyruleno==535);
- case 536: /* common_expression ::= boolean_value_expression */ yytestcase(yyruleno==536);
- case 539: /* table_reference_list ::= table_reference */ yytestcase(yyruleno==539);
- case 541: /* table_reference ::= table_primary */ yytestcase(yyruleno==541);
- case 542: /* table_reference ::= joined_table */ yytestcase(yyruleno==542);
- case 546: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==546);
- case 612: /* query_simple ::= query_specification */ yytestcase(yyruleno==612);
- case 613: /* query_simple ::= union_query_expression */ yytestcase(yyruleno==613);
- case 616: /* query_simple_or_subquery ::= query_simple */ yytestcase(yyruleno==616);
- case 618: /* query_or_subquery ::= query_expression */ yytestcase(yyruleno==618);
-#line 746 "sql.y"
-{ yylhsminor.yy232 = yymsp[0].minor.yy232; }
-#line 6983 "sql.c"
- yymsp[0].minor.yy232 = yylhsminor.yy232;
+ case 414: /* literal ::= duration_literal */
+ case 424: /* signed_literal ::= signed */ yytestcase(yyruleno==424);
+ case 447: /* expr_or_subquery ::= expression */ yytestcase(yyruleno==447);
+ case 448: /* expression ::= literal */ yytestcase(yyruleno==448);
+ case 450: /* expression ::= column_reference */ yytestcase(yyruleno==450);
+ case 451: /* expression ::= function_expression */ yytestcase(yyruleno==451);
+ case 452: /* expression ::= case_when_expression */ yytestcase(yyruleno==452);
+ case 485: /* function_expression ::= literal_func */ yytestcase(yyruleno==485);
+ case 534: /* boolean_value_expression ::= boolean_primary */ yytestcase(yyruleno==534);
+ case 538: /* boolean_primary ::= predicate */ yytestcase(yyruleno==538);
+ case 540: /* common_expression ::= expr_or_subquery */ yytestcase(yyruleno==540);
+ case 541: /* common_expression ::= boolean_value_expression */ yytestcase(yyruleno==541);
+ case 544: /* table_reference_list ::= table_reference */ yytestcase(yyruleno==544);
+ case 546: /* table_reference ::= table_primary */ yytestcase(yyruleno==546);
+ case 547: /* table_reference ::= joined_table */ yytestcase(yyruleno==547);
+ case 551: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==551);
+ case 617: /* query_simple ::= query_specification */ yytestcase(yyruleno==617);
+ 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);
+{ yylhsminor.yy490 = yymsp[0].minor.yy490; }
+ yymsp[0].minor.yy490 = yylhsminor.yy490;
break;
- case 410: /* literal ::= NULL */
-#line 747 "sql.y"
-{ yylhsminor.yy232 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0)); }
-#line 6989 "sql.c"
- yymsp[0].minor.yy232 = yylhsminor.yy232;
+ case 415: /* literal ::= NULL */
+{ yylhsminor.yy490 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0)); }
+ yymsp[0].minor.yy490 = yylhsminor.yy490;
break;
- case 411: /* literal ::= NK_QUESTION */
-#line 748 "sql.y"
-{ yylhsminor.yy232 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0)); }
-#line 6995 "sql.c"
- yymsp[0].minor.yy232 = yylhsminor.yy232;
+ case 416: /* literal ::= NK_QUESTION */
+{ yylhsminor.yy490 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0)); }
+ yymsp[0].minor.yy490 = yylhsminor.yy490;
break;
- case 412: /* duration_literal ::= NK_VARIABLE */
- case 587: /* interval_sliding_duration_literal ::= NK_VARIABLE */ yytestcase(yyruleno==587);
- case 588: /* interval_sliding_duration_literal ::= NK_STRING */ yytestcase(yyruleno==588);
- case 589: /* interval_sliding_duration_literal ::= NK_INTEGER */ yytestcase(yyruleno==589);
-#line 750 "sql.y"
-{ yylhsminor.yy232 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); }
-#line 7004 "sql.c"
- yymsp[0].minor.yy232 = yylhsminor.yy232;
+ 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);
+{ yylhsminor.yy490 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); }
+ yymsp[0].minor.yy490 = yylhsminor.yy490;
break;
- case 413: /* signed ::= NK_INTEGER */
-#line 752 "sql.y"
-{ yylhsminor.yy232 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); }
-#line 7010 "sql.c"
- yymsp[0].minor.yy232 = yylhsminor.yy232;
+ case 418: /* signed ::= NK_INTEGER */
+{ yylhsminor.yy490 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); }
+ yymsp[0].minor.yy490 = yylhsminor.yy490;
break;
- case 414: /* signed ::= NK_PLUS NK_INTEGER */
-#line 753 "sql.y"
-{ yymsp[-1].minor.yy232 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); }
-#line 7016 "sql.c"
+ case 419: /* signed ::= NK_PLUS NK_INTEGER */
+{ yymsp[-1].minor.yy490 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); }
break;
- case 415: /* signed ::= NK_MINUS NK_INTEGER */
-#line 754 "sql.y"
+ case 420: /* signed ::= NK_MINUS NK_INTEGER */
{
SToken t = yymsp[-1].minor.yy0;
t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z;
- yylhsminor.yy232 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &t);
+ yylhsminor.yy490 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &t);
}
-#line 7025 "sql.c"
- yymsp[-1].minor.yy232 = yylhsminor.yy232;
+ yymsp[-1].minor.yy490 = yylhsminor.yy490;
break;
- case 416: /* signed ::= NK_FLOAT */
-#line 759 "sql.y"
-{ yylhsminor.yy232 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); }
-#line 7031 "sql.c"
- yymsp[0].minor.yy232 = yylhsminor.yy232;
+ case 421: /* signed ::= NK_FLOAT */
+{ yylhsminor.yy490 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); }
+ yymsp[0].minor.yy490 = yylhsminor.yy490;
break;
- case 417: /* signed ::= NK_PLUS NK_FLOAT */
-#line 760 "sql.y"
-{ yymsp[-1].minor.yy232 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); }
-#line 7037 "sql.c"
+ case 422: /* signed ::= NK_PLUS NK_FLOAT */
+{ yymsp[-1].minor.yy490 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); }
break;
- case 418: /* signed ::= NK_MINUS NK_FLOAT */
-#line 761 "sql.y"
+ case 423: /* signed ::= NK_MINUS NK_FLOAT */
{
SToken t = yymsp[-1].minor.yy0;
t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z;
- yylhsminor.yy232 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &t);
+ yylhsminor.yy490 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &t);
}
-#line 7046 "sql.c"
- yymsp[-1].minor.yy232 = yylhsminor.yy232;
+ yymsp[-1].minor.yy490 = yylhsminor.yy490;
break;
- case 420: /* signed_literal ::= NK_STRING */
-#line 768 "sql.y"
-{ yylhsminor.yy232 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); }
-#line 7052 "sql.c"
- yymsp[0].minor.yy232 = yylhsminor.yy232;
+ case 425: /* signed_literal ::= NK_STRING */
+{ yylhsminor.yy490 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); }
+ yymsp[0].minor.yy490 = yylhsminor.yy490;
break;
- case 421: /* signed_literal ::= NK_BOOL */
-#line 769 "sql.y"
-{ yylhsminor.yy232 = createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0); }
-#line 7058 "sql.c"
- yymsp[0].minor.yy232 = yylhsminor.yy232;
+ case 426: /* signed_literal ::= NK_BOOL */
+{ yylhsminor.yy490 = createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0); }
+ yymsp[0].minor.yy490 = yylhsminor.yy490;
break;
- case 422: /* signed_literal ::= TIMESTAMP NK_STRING */
-#line 770 "sql.y"
-{ yymsp[-1].minor.yy232 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); }
-#line 7064 "sql.c"
+ case 427: /* signed_literal ::= TIMESTAMP NK_STRING */
+{ yymsp[-1].minor.yy490 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); }
break;
- case 423: /* signed_literal ::= duration_literal */
- case 425: /* signed_literal ::= literal_func */ yytestcase(yyruleno==425);
- case 500: /* star_func_para ::= expr_or_subquery */ yytestcase(yyruleno==500);
- case 566: /* select_item ::= common_expression */ yytestcase(yyruleno==566);
- case 576: /* partition_item ::= expr_or_subquery */ yytestcase(yyruleno==576);
- case 617: /* query_simple_or_subquery ::= subquery */ yytestcase(yyruleno==617);
- case 619: /* query_or_subquery ::= subquery */ yytestcase(yyruleno==619);
- case 632: /* search_condition ::= common_expression */ yytestcase(yyruleno==632);
-#line 771 "sql.y"
-{ yylhsminor.yy232 = releaseRawExprNode(pCxt, yymsp[0].minor.yy232); }
-#line 7076 "sql.c"
- yymsp[0].minor.yy232 = yylhsminor.yy232;
+ case 428: /* signed_literal ::= duration_literal */
+ case 430: /* signed_literal ::= literal_func */ yytestcase(yyruleno==430);
+ case 505: /* star_func_para ::= expr_or_subquery */ yytestcase(yyruleno==505);
+ case 571: /* select_item ::= common_expression */ yytestcase(yyruleno==571);
+ case 581: /* partition_item ::= expr_or_subquery */ yytestcase(yyruleno==581);
+ 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);
+{ yylhsminor.yy490 = releaseRawExprNode(pCxt, yymsp[0].minor.yy490); }
+ yymsp[0].minor.yy490 = yylhsminor.yy490;
break;
- case 424: /* signed_literal ::= NULL */
-#line 772 "sql.y"
-{ yylhsminor.yy232 = createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0); }
-#line 7082 "sql.c"
- yymsp[0].minor.yy232 = yylhsminor.yy232;
+ case 429: /* signed_literal ::= NULL */
+{ yylhsminor.yy490 = createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0); }
+ yymsp[0].minor.yy490 = yylhsminor.yy490;
break;
- case 426: /* signed_literal ::= NK_QUESTION */
-#line 774 "sql.y"
-{ yylhsminor.yy232 = createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0); }
-#line 7088 "sql.c"
- yymsp[0].minor.yy232 = yylhsminor.yy232;
+ case 431: /* signed_literal ::= NK_QUESTION */
+{ yylhsminor.yy490 = createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0); }
+ yymsp[0].minor.yy490 = yylhsminor.yy490;
break;
- case 444: /* expression ::= pseudo_column */
-#line 836 "sql.y"
-{ yylhsminor.yy232 = yymsp[0].minor.yy232; setRawExprNodeIsPseudoColumn(pCxt, yylhsminor.yy232, true); }
-#line 7094 "sql.c"
- yymsp[0].minor.yy232 = yylhsminor.yy232;
+ case 449: /* expression ::= pseudo_column */
+{ yylhsminor.yy490 = yymsp[0].minor.yy490; setRawExprNodeIsPseudoColumn(pCxt, yylhsminor.yy490, true); }
+ yymsp[0].minor.yy490 = yylhsminor.yy490;
break;
- case 448: /* expression ::= NK_LP expression NK_RP */
- case 534: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==534);
- case 631: /* subquery ::= NK_LP subquery NK_RP */ yytestcase(yyruleno==631);
-#line 840 "sql.y"
-{ yylhsminor.yy232 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy232)); }
-#line 7102 "sql.c"
- yymsp[-2].minor.yy232 = yylhsminor.yy232;
+ 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);
+{ yylhsminor.yy490 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy490)); }
+ yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
- case 449: /* expression ::= NK_PLUS expr_or_subquery */
-#line 841 "sql.y"
+ case 454: /* expression ::= NK_PLUS expr_or_subquery */
{
- SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy232);
- yylhsminor.yy232 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, releaseRawExprNode(pCxt, yymsp[0].minor.yy232));
+ SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy490);
+ yylhsminor.yy490 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, releaseRawExprNode(pCxt, yymsp[0].minor.yy490));
}
-#line 7111 "sql.c"
- yymsp[-1].minor.yy232 = yylhsminor.yy232;
+ yymsp[-1].minor.yy490 = yylhsminor.yy490;
break;
- case 450: /* expression ::= NK_MINUS expr_or_subquery */
-#line 845 "sql.y"
+ case 455: /* expression ::= NK_MINUS expr_or_subquery */
{
- SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy232);
- yylhsminor.yy232 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, createOperatorNode(pCxt, OP_TYPE_MINUS, releaseRawExprNode(pCxt, yymsp[0].minor.yy232), NULL));
+ 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 7120 "sql.c"
- yymsp[-1].minor.yy232 = yylhsminor.yy232;
+ yymsp[-1].minor.yy490 = yylhsminor.yy490;
break;
- case 451: /* expression ::= expr_or_subquery NK_PLUS expr_or_subquery */
-#line 849 "sql.y"
+ case 456: /* expression ::= expr_or_subquery NK_PLUS expr_or_subquery */
{
- SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy232);
- SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy232);
- yylhsminor.yy232 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_ADD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy232), releaseRawExprNode(pCxt, yymsp[0].minor.yy232)));
+ 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 7130 "sql.c"
- yymsp[-2].minor.yy232 = yylhsminor.yy232;
+ yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
- case 452: /* expression ::= expr_or_subquery NK_MINUS expr_or_subquery */
-#line 854 "sql.y"
+ case 457: /* expression ::= expr_or_subquery NK_MINUS expr_or_subquery */
{
- SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy232);
- SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy232);
- yylhsminor.yy232 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[-2].minor.yy232), releaseRawExprNode(pCxt, yymsp[0].minor.yy232)));
+ 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 7140 "sql.c"
- yymsp[-2].minor.yy232 = yylhsminor.yy232;
+ yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
- case 453: /* expression ::= expr_or_subquery NK_STAR expr_or_subquery */
-#line 859 "sql.y"
+ case 458: /* expression ::= expr_or_subquery NK_STAR expr_or_subquery */
{
- SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy232);
- SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy232);
- yylhsminor.yy232 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MULTI, releaseRawExprNode(pCxt, yymsp[-2].minor.yy232), releaseRawExprNode(pCxt, yymsp[0].minor.yy232)));
+ 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 7150 "sql.c"
- yymsp[-2].minor.yy232 = yylhsminor.yy232;
+ yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
- case 454: /* expression ::= expr_or_subquery NK_SLASH expr_or_subquery */
-#line 864 "sql.y"
+ case 459: /* expression ::= expr_or_subquery NK_SLASH expr_or_subquery */
{
- SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy232);
- SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy232);
- yylhsminor.yy232 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_DIV, releaseRawExprNode(pCxt, yymsp[-2].minor.yy232), releaseRawExprNode(pCxt, yymsp[0].minor.yy232)));
+ 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 7160 "sql.c"
- yymsp[-2].minor.yy232 = yylhsminor.yy232;
+ yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
- case 455: /* expression ::= expr_or_subquery NK_REM expr_or_subquery */
-#line 869 "sql.y"
+ case 460: /* expression ::= expr_or_subquery NK_REM expr_or_subquery */
{
- SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy232);
- SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy232);
- yylhsminor.yy232 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_REM, releaseRawExprNode(pCxt, yymsp[-2].minor.yy232), releaseRawExprNode(pCxt, yymsp[0].minor.yy232)));
+ 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 7170 "sql.c"
- yymsp[-2].minor.yy232 = yylhsminor.yy232;
+ yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
- case 456: /* expression ::= column_reference NK_ARROW NK_STRING */
-#line 874 "sql.y"
+ case 461: /* expression ::= column_reference NK_ARROW NK_STRING */
{
- SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy232);
- yylhsminor.yy232 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_JSON_GET_VALUE, releaseRawExprNode(pCxt, yymsp[-2].minor.yy232), createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)));
+ 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 7179 "sql.c"
- yymsp[-2].minor.yy232 = yylhsminor.yy232;
+ yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
- case 457: /* expression ::= expr_or_subquery NK_BITAND expr_or_subquery */
-#line 878 "sql.y"
+ case 462: /* expression ::= expr_or_subquery NK_BITAND expr_or_subquery */
{
- SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy232);
- SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy232);
- yylhsminor.yy232 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy232), releaseRawExprNode(pCxt, yymsp[0].minor.yy232)));
+ 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 7189 "sql.c"
- yymsp[-2].minor.yy232 = yylhsminor.yy232;
+ yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
- case 458: /* expression ::= expr_or_subquery NK_BITOR expr_or_subquery */
-#line 883 "sql.y"
+ case 463: /* expression ::= expr_or_subquery NK_BITOR expr_or_subquery */
{
- SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy232);
- SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy232);
- yylhsminor.yy232 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy232), releaseRawExprNode(pCxt, yymsp[0].minor.yy232)));
+ 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 7199 "sql.c"
- yymsp[-2].minor.yy232 = yylhsminor.yy232;
+ yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
- case 461: /* column_reference ::= column_name */
-#line 894 "sql.y"
-{ yylhsminor.yy232 = createRawExprNode(pCxt, &yymsp[0].minor.yy993, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy993)); }
-#line 7205 "sql.c"
- yymsp[0].minor.yy232 = yylhsminor.yy232;
+ case 466: /* column_reference ::= column_name */
+{ yylhsminor.yy490 = createRawExprNode(pCxt, &yymsp[0].minor.yy561, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy561)); }
+ yymsp[0].minor.yy490 = yylhsminor.yy490;
break;
- case 462: /* column_reference ::= table_name NK_DOT column_name */
-#line 895 "sql.y"
-{ yylhsminor.yy232 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy993, &yymsp[0].minor.yy993, createColumnNode(pCxt, &yymsp[-2].minor.yy993, &yymsp[0].minor.yy993)); }
-#line 7211 "sql.c"
- yymsp[-2].minor.yy232 = yylhsminor.yy232;
+ case 467: /* column_reference ::= table_name NK_DOT column_name */
+{ yylhsminor.yy490 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy561, &yymsp[0].minor.yy561, createColumnNode(pCxt, &yymsp[-2].minor.yy561, &yymsp[0].minor.yy561)); }
+ yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
- case 463: /* column_reference ::= NK_ALIAS */
-#line 896 "sql.y"
-{ yylhsminor.yy232 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); }
-#line 7217 "sql.c"
- yymsp[0].minor.yy232 = yylhsminor.yy232;
+ case 468: /* column_reference ::= NK_ALIAS */
+{ yylhsminor.yy490 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); }
+ yymsp[0].minor.yy490 = yylhsminor.yy490;
break;
- case 464: /* column_reference ::= table_name NK_DOT NK_ALIAS */
-#line 897 "sql.y"
-{ yylhsminor.yy232 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy993, &yymsp[0].minor.yy0, createColumnNode(pCxt, &yymsp[-2].minor.yy993, &yymsp[0].minor.yy0)); }
-#line 7223 "sql.c"
- yymsp[-2].minor.yy232 = yylhsminor.yy232;
+ case 469: /* column_reference ::= table_name NK_DOT NK_ALIAS */
+{ yylhsminor.yy490 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy561, &yymsp[0].minor.yy0, createColumnNode(pCxt, &yymsp[-2].minor.yy561, &yymsp[0].minor.yy0)); }
+ yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
- case 465: /* pseudo_column ::= ROWTS */
- case 466: /* pseudo_column ::= TBNAME */ yytestcase(yyruleno==466);
- case 468: /* pseudo_column ::= QSTART */ yytestcase(yyruleno==468);
- case 469: /* pseudo_column ::= QEND */ yytestcase(yyruleno==469);
- case 470: /* pseudo_column ::= QDURATION */ yytestcase(yyruleno==470);
- case 471: /* pseudo_column ::= WSTART */ yytestcase(yyruleno==471);
- case 472: /* pseudo_column ::= WEND */ yytestcase(yyruleno==472);
- case 473: /* pseudo_column ::= WDURATION */ yytestcase(yyruleno==473);
- case 474: /* pseudo_column ::= IROWTS */ yytestcase(yyruleno==474);
- case 475: /* pseudo_column ::= ISFILLED */ yytestcase(yyruleno==475);
- case 476: /* pseudo_column ::= QTAGS */ yytestcase(yyruleno==476);
- case 482: /* literal_func ::= NOW */ yytestcase(yyruleno==482);
-#line 899 "sql.y"
-{ yylhsminor.yy232 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL)); }
-#line 7240 "sql.c"
- yymsp[0].minor.yy232 = yylhsminor.yy232;
+ case 470: /* pseudo_column ::= ROWTS */
+ case 471: /* pseudo_column ::= TBNAME */ yytestcase(yyruleno==471);
+ case 473: /* pseudo_column ::= QSTART */ yytestcase(yyruleno==473);
+ case 474: /* pseudo_column ::= QEND */ yytestcase(yyruleno==474);
+ case 475: /* pseudo_column ::= QDURATION */ yytestcase(yyruleno==475);
+ case 476: /* pseudo_column ::= WSTART */ yytestcase(yyruleno==476);
+ case 477: /* pseudo_column ::= WEND */ yytestcase(yyruleno==477);
+ case 478: /* pseudo_column ::= WDURATION */ yytestcase(yyruleno==478);
+ case 479: /* pseudo_column ::= IROWTS */ yytestcase(yyruleno==479);
+ case 480: /* pseudo_column ::= ISFILLED */ yytestcase(yyruleno==480);
+ case 481: /* pseudo_column ::= QTAGS */ yytestcase(yyruleno==481);
+ case 487: /* literal_func ::= NOW */ yytestcase(yyruleno==487);
+{ yylhsminor.yy490 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL)); }
+ yymsp[0].minor.yy490 = yylhsminor.yy490;
break;
- case 467: /* pseudo_column ::= table_name NK_DOT TBNAME */
-#line 901 "sql.y"
-{ yylhsminor.yy232 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy993, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-2].minor.yy993)))); }
-#line 7246 "sql.c"
- yymsp[-2].minor.yy232 = yylhsminor.yy232;
+ case 472: /* pseudo_column ::= table_name NK_DOT TBNAME */
+{ 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)))); }
+ yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
- case 477: /* function_expression ::= function_name NK_LP expression_list NK_RP */
- case 478: /* function_expression ::= star_func NK_LP star_func_para_list NK_RP */ yytestcase(yyruleno==478);
-#line 912 "sql.y"
-{ yylhsminor.yy232 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy993, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy993, yymsp[-1].minor.yy88)); }
-#line 7253 "sql.c"
- yymsp[-3].minor.yy232 = yylhsminor.yy232;
+ 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);
+{ yylhsminor.yy490 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy561, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy561, yymsp[-1].minor.yy502)); }
+ yymsp[-3].minor.yy490 = yylhsminor.yy490;
break;
- case 479: /* function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */
-#line 915 "sql.y"
-{ yylhsminor.yy232 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createCastFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy232), yymsp[-1].minor.yy400)); }
-#line 7259 "sql.c"
- yymsp[-5].minor.yy232 = yylhsminor.yy232;
+ case 484: /* function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */
+{ yylhsminor.yy490 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createCastFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy490), yymsp[-1].minor.yy826)); }
+ yymsp[-5].minor.yy490 = yylhsminor.yy490;
break;
- case 481: /* literal_func ::= noarg_func NK_LP NK_RP */
-#line 918 "sql.y"
-{ yylhsminor.yy232 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy993, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-2].minor.yy993, NULL)); }
-#line 7265 "sql.c"
- yymsp[-2].minor.yy232 = yylhsminor.yy232;
+ case 486: /* literal_func ::= noarg_func NK_LP NK_RP */
+{ yylhsminor.yy490 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy561, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-2].minor.yy561, NULL)); }
+ yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
- case 496: /* star_func_para_list ::= NK_STAR */
-#line 942 "sql.y"
-{ yylhsminor.yy88 = createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); }
-#line 7271 "sql.c"
- yymsp[0].minor.yy88 = yylhsminor.yy88;
+ case 501: /* star_func_para_list ::= NK_STAR */
+{ yylhsminor.yy502 = createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); }
+ yymsp[0].minor.yy502 = yylhsminor.yy502;
break;
- case 501: /* star_func_para ::= table_name NK_DOT NK_STAR */
- case 569: /* select_item ::= table_name NK_DOT NK_STAR */ yytestcase(yyruleno==569);
-#line 951 "sql.y"
-{ yylhsminor.yy232 = createColumnNode(pCxt, &yymsp[-2].minor.yy993, &yymsp[0].minor.yy0); }
-#line 7278 "sql.c"
- yymsp[-2].minor.yy232 = yylhsminor.yy232;
+ case 506: /* star_func_para ::= table_name NK_DOT NK_STAR */
+ case 574: /* select_item ::= table_name NK_DOT NK_STAR */ yytestcase(yyruleno==574);
+{ yylhsminor.yy490 = createColumnNode(pCxt, &yymsp[-2].minor.yy561, &yymsp[0].minor.yy0); }
+ yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
- case 502: /* case_when_expression ::= CASE when_then_list case_when_else_opt END */
-#line 954 "sql.y"
-{ yylhsminor.yy232 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, NULL, yymsp[-2].minor.yy88, yymsp[-1].minor.yy232)); }
-#line 7284 "sql.c"
- yymsp[-3].minor.yy232 = yylhsminor.yy232;
+ case 507: /* case_when_expression ::= CASE when_then_list case_when_else_opt END */
+{ yylhsminor.yy490 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, NULL, yymsp[-2].minor.yy502, yymsp[-1].minor.yy490)); }
+ yymsp[-3].minor.yy490 = yylhsminor.yy490;
break;
- case 503: /* case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */
-#line 956 "sql.y"
-{ yylhsminor.yy232 = createRawExprNodeExt(pCxt, &yymsp[-4].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy232), yymsp[-2].minor.yy88, yymsp[-1].minor.yy232)); }
-#line 7290 "sql.c"
- yymsp[-4].minor.yy232 = yylhsminor.yy232;
+ case 508: /* case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */
+{ 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)); }
+ yymsp[-4].minor.yy490 = yylhsminor.yy490;
break;
- case 506: /* when_then_expr ::= WHEN common_expression THEN common_expression */
-#line 963 "sql.y"
-{ yymsp[-3].minor.yy232 = createWhenThenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy232), releaseRawExprNode(pCxt, yymsp[0].minor.yy232)); }
-#line 7296 "sql.c"
+ case 511: /* when_then_expr ::= WHEN common_expression THEN common_expression */
+{ yymsp[-3].minor.yy490 = createWhenThenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy490), releaseRawExprNode(pCxt, yymsp[0].minor.yy490)); }
break;
- case 508: /* case_when_else_opt ::= ELSE common_expression */
-#line 966 "sql.y"
-{ yymsp[-1].minor.yy232 = releaseRawExprNode(pCxt, yymsp[0].minor.yy232); }
-#line 7301 "sql.c"
+ case 513: /* case_when_else_opt ::= ELSE common_expression */
+{ yymsp[-1].minor.yy490 = releaseRawExprNode(pCxt, yymsp[0].minor.yy490); }
break;
- case 509: /* predicate ::= expr_or_subquery compare_op expr_or_subquery */
- case 514: /* predicate ::= expr_or_subquery in_op in_predicate_value */ yytestcase(yyruleno==514);
-#line 969 "sql.y"
+ 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);
{
- SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy232);
- SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy232);
- yylhsminor.yy232 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, yymsp[-1].minor.yy708, releaseRawExprNode(pCxt, yymsp[-2].minor.yy232), releaseRawExprNode(pCxt, yymsp[0].minor.yy232)));
+ 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 7311 "sql.c"
- yymsp[-2].minor.yy232 = yylhsminor.yy232;
+ yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
- case 510: /* predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */
-#line 976 "sql.y"
+ case 515: /* predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */
{
- SToken s = getTokenFromRawExprNode(pCxt, yymsp[-4].minor.yy232);
- SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy232);
- yylhsminor.yy232 = createRawExprNodeExt(pCxt, &s, &e, createBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-4].minor.yy232), releaseRawExprNode(pCxt, yymsp[-2].minor.yy232), releaseRawExprNode(pCxt, yymsp[0].minor.yy232)));
+ 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 7321 "sql.c"
- yymsp[-4].minor.yy232 = yylhsminor.yy232;
+ yymsp[-4].minor.yy490 = yylhsminor.yy490;
break;
- case 511: /* predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */
-#line 982 "sql.y"
+ case 516: /* predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */
{
- SToken s = getTokenFromRawExprNode(pCxt, yymsp[-5].minor.yy232);
- SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy232);
- yylhsminor.yy232 = createRawExprNodeExt(pCxt, &s, &e, createNotBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy232), releaseRawExprNode(pCxt, yymsp[-2].minor.yy232), releaseRawExprNode(pCxt, yymsp[0].minor.yy232)));
+ 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 7331 "sql.c"
- yymsp[-5].minor.yy232 = yylhsminor.yy232;
+ yymsp[-5].minor.yy490 = yylhsminor.yy490;
break;
- case 512: /* predicate ::= expr_or_subquery IS NULL */
-#line 987 "sql.y"
+ case 517: /* predicate ::= expr_or_subquery IS NULL */
{
- SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy232);
- yylhsminor.yy232 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NULL, releaseRawExprNode(pCxt, yymsp[-2].minor.yy232), NULL));
+ 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 7340 "sql.c"
- yymsp[-2].minor.yy232 = yylhsminor.yy232;
+ yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
- case 513: /* predicate ::= expr_or_subquery IS NOT NULL */
-#line 991 "sql.y"
+ case 518: /* predicate ::= expr_or_subquery IS NOT NULL */
{
- SToken s = getTokenFromRawExprNode(pCxt, yymsp[-3].minor.yy232);
- yylhsminor.yy232 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NOT_NULL, releaseRawExprNode(pCxt, yymsp[-3].minor.yy232), NULL));
+ 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 7349 "sql.c"
- yymsp[-3].minor.yy232 = yylhsminor.yy232;
+ yymsp[-3].minor.yy490 = yylhsminor.yy490;
break;
- case 515: /* compare_op ::= NK_LT */
-#line 1003 "sql.y"
-{ yymsp[0].minor.yy708 = OP_TYPE_LOWER_THAN; }
-#line 7355 "sql.c"
+ case 520: /* compare_op ::= NK_LT */
+{ yymsp[0].minor.yy30 = OP_TYPE_LOWER_THAN; }
break;
- case 516: /* compare_op ::= NK_GT */
-#line 1004 "sql.y"
-{ yymsp[0].minor.yy708 = OP_TYPE_GREATER_THAN; }
-#line 7360 "sql.c"
+ case 521: /* compare_op ::= NK_GT */
+{ yymsp[0].minor.yy30 = OP_TYPE_GREATER_THAN; }
break;
- case 517: /* compare_op ::= NK_LE */
-#line 1005 "sql.y"
-{ yymsp[0].minor.yy708 = OP_TYPE_LOWER_EQUAL; }
-#line 7365 "sql.c"
+ case 522: /* compare_op ::= NK_LE */
+{ yymsp[0].minor.yy30 = OP_TYPE_LOWER_EQUAL; }
break;
- case 518: /* compare_op ::= NK_GE */
-#line 1006 "sql.y"
-{ yymsp[0].minor.yy708 = OP_TYPE_GREATER_EQUAL; }
-#line 7370 "sql.c"
+ case 523: /* compare_op ::= NK_GE */
+{ yymsp[0].minor.yy30 = OP_TYPE_GREATER_EQUAL; }
break;
- case 519: /* compare_op ::= NK_NE */
-#line 1007 "sql.y"
-{ yymsp[0].minor.yy708 = OP_TYPE_NOT_EQUAL; }
-#line 7375 "sql.c"
+ case 524: /* compare_op ::= NK_NE */
+{ yymsp[0].minor.yy30 = OP_TYPE_NOT_EQUAL; }
break;
- case 520: /* compare_op ::= NK_EQ */
-#line 1008 "sql.y"
-{ yymsp[0].minor.yy708 = OP_TYPE_EQUAL; }
-#line 7380 "sql.c"
+ case 525: /* compare_op ::= NK_EQ */
+{ yymsp[0].minor.yy30 = OP_TYPE_EQUAL; }
break;
- case 521: /* compare_op ::= LIKE */
-#line 1009 "sql.y"
-{ yymsp[0].minor.yy708 = OP_TYPE_LIKE; }
-#line 7385 "sql.c"
+ case 526: /* compare_op ::= LIKE */
+{ yymsp[0].minor.yy30 = OP_TYPE_LIKE; }
break;
- case 522: /* compare_op ::= NOT LIKE */
-#line 1010 "sql.y"
-{ yymsp[-1].minor.yy708 = OP_TYPE_NOT_LIKE; }
-#line 7390 "sql.c"
+ case 527: /* compare_op ::= NOT LIKE */
+{ yymsp[-1].minor.yy30 = OP_TYPE_NOT_LIKE; }
break;
- case 523: /* compare_op ::= MATCH */
-#line 1011 "sql.y"
-{ yymsp[0].minor.yy708 = OP_TYPE_MATCH; }
-#line 7395 "sql.c"
+ case 528: /* compare_op ::= MATCH */
+{ yymsp[0].minor.yy30 = OP_TYPE_MATCH; }
break;
- case 524: /* compare_op ::= NMATCH */
-#line 1012 "sql.y"
-{ yymsp[0].minor.yy708 = OP_TYPE_NMATCH; }
-#line 7400 "sql.c"
+ case 529: /* compare_op ::= NMATCH */
+{ yymsp[0].minor.yy30 = OP_TYPE_NMATCH; }
break;
- case 525: /* compare_op ::= CONTAINS */
-#line 1013 "sql.y"
-{ yymsp[0].minor.yy708 = OP_TYPE_JSON_CONTAINS; }
-#line 7405 "sql.c"
+ case 530: /* compare_op ::= CONTAINS */
+{ yymsp[0].minor.yy30 = OP_TYPE_JSON_CONTAINS; }
break;
- case 526: /* in_op ::= IN */
-#line 1017 "sql.y"
-{ yymsp[0].minor.yy708 = OP_TYPE_IN; }
-#line 7410 "sql.c"
+ case 531: /* in_op ::= IN */
+{ yymsp[0].minor.yy30 = OP_TYPE_IN; }
break;
- case 527: /* in_op ::= NOT IN */
-#line 1018 "sql.y"
-{ yymsp[-1].minor.yy708 = OP_TYPE_NOT_IN; }
-#line 7415 "sql.c"
+ case 532: /* in_op ::= NOT IN */
+{ yymsp[-1].minor.yy30 = OP_TYPE_NOT_IN; }
break;
- case 528: /* in_predicate_value ::= NK_LP literal_list NK_RP */
-#line 1020 "sql.y"
-{ yylhsminor.yy232 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createNodeListNode(pCxt, yymsp[-1].minor.yy88)); }
-#line 7420 "sql.c"
- yymsp[-2].minor.yy232 = yylhsminor.yy232;
+ case 533: /* in_predicate_value ::= NK_LP literal_list NK_RP */
+{ yylhsminor.yy490 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createNodeListNode(pCxt, yymsp[-1].minor.yy502)); }
+ yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
- case 530: /* boolean_value_expression ::= NOT boolean_primary */
-#line 1024 "sql.y"
+ case 535: /* boolean_value_expression ::= NOT boolean_primary */
{
- SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy232);
- yylhsminor.yy232 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_NOT, releaseRawExprNode(pCxt, yymsp[0].minor.yy232), NULL));
+ 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 7429 "sql.c"
- yymsp[-1].minor.yy232 = yylhsminor.yy232;
+ yymsp[-1].minor.yy490 = yylhsminor.yy490;
break;
- case 531: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */
-#line 1029 "sql.y"
+ case 536: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */
{
- SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy232);
- SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy232);
- yylhsminor.yy232 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy232), releaseRawExprNode(pCxt, yymsp[0].minor.yy232)));
+ 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 7439 "sql.c"
- yymsp[-2].minor.yy232 = yylhsminor.yy232;
+ yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
- case 532: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */
-#line 1035 "sql.y"
+ case 537: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */
{
- SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy232);
- SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy232);
- yylhsminor.yy232 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy232), releaseRawExprNode(pCxt, yymsp[0].minor.yy232)));
+ 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 7449 "sql.c"
- yymsp[-2].minor.yy232 = yylhsminor.yy232;
+ yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
- case 540: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */
-#line 1053 "sql.y"
-{ yylhsminor.yy232 = createJoinTableNode(pCxt, JOIN_TYPE_INNER, yymsp[-2].minor.yy232, yymsp[0].minor.yy232, NULL); }
-#line 7455 "sql.c"
- yymsp[-2].minor.yy232 = yylhsminor.yy232;
+ case 545: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */
+{ yylhsminor.yy490 = createJoinTableNode(pCxt, JOIN_TYPE_INNER, yymsp[-2].minor.yy490, yymsp[0].minor.yy490, NULL); }
+ yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
- case 543: /* table_primary ::= table_name alias_opt */
-#line 1059 "sql.y"
-{ yylhsminor.yy232 = createRealTableNode(pCxt, NULL, &yymsp[-1].minor.yy993, &yymsp[0].minor.yy993); }
-#line 7461 "sql.c"
- yymsp[-1].minor.yy232 = yylhsminor.yy232;
+ case 548: /* table_primary ::= table_name alias_opt */
+{ yylhsminor.yy490 = createRealTableNode(pCxt, NULL, &yymsp[-1].minor.yy561, &yymsp[0].minor.yy561); }
+ yymsp[-1].minor.yy490 = yylhsminor.yy490;
break;
- case 544: /* table_primary ::= db_name NK_DOT table_name alias_opt */
-#line 1060 "sql.y"
-{ yylhsminor.yy232 = createRealTableNode(pCxt, &yymsp[-3].minor.yy993, &yymsp[-1].minor.yy993, &yymsp[0].minor.yy993); }
-#line 7467 "sql.c"
- yymsp[-3].minor.yy232 = yylhsminor.yy232;
+ case 549: /* table_primary ::= db_name NK_DOT table_name alias_opt */
+{ yylhsminor.yy490 = createRealTableNode(pCxt, &yymsp[-3].minor.yy561, &yymsp[-1].minor.yy561, &yymsp[0].minor.yy561); }
+ yymsp[-3].minor.yy490 = yylhsminor.yy490;
break;
- case 545: /* table_primary ::= subquery alias_opt */
-#line 1061 "sql.y"
-{ yylhsminor.yy232 = createTempTableNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy232), &yymsp[0].minor.yy993); }
-#line 7473 "sql.c"
- yymsp[-1].minor.yy232 = yylhsminor.yy232;
+ case 550: /* table_primary ::= subquery alias_opt */
+{ yylhsminor.yy490 = createTempTableNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy490), &yymsp[0].minor.yy561); }
+ yymsp[-1].minor.yy490 = yylhsminor.yy490;
break;
- case 547: /* alias_opt ::= */
-#line 1066 "sql.y"
-{ yymsp[1].minor.yy993 = nil_token; }
-#line 7479 "sql.c"
+ case 552: /* alias_opt ::= */
+{ yymsp[1].minor.yy561 = nil_token; }
break;
- case 549: /* alias_opt ::= AS table_alias */
-#line 1068 "sql.y"
-{ yymsp[-1].minor.yy993 = yymsp[0].minor.yy993; }
-#line 7484 "sql.c"
+ case 554: /* alias_opt ::= AS table_alias */
+{ yymsp[-1].minor.yy561 = yymsp[0].minor.yy561; }
break;
- case 550: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */
- case 551: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==551);
-#line 1070 "sql.y"
-{ yymsp[-2].minor.yy232 = yymsp[-1].minor.yy232; }
-#line 7490 "sql.c"
+ 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);
+{ yymsp[-2].minor.yy490 = yymsp[-1].minor.yy490; }
break;
- case 552: /* joined_table ::= table_reference join_type JOIN table_reference ON search_condition */
-#line 1075 "sql.y"
-{ yylhsminor.yy232 = createJoinTableNode(pCxt, yymsp[-4].minor.yy436, yymsp[-5].minor.yy232, yymsp[-2].minor.yy232, yymsp[0].minor.yy232); }
-#line 7495 "sql.c"
- yymsp[-5].minor.yy232 = yylhsminor.yy232;
+ case 557: /* joined_table ::= table_reference join_type JOIN table_reference ON search_condition */
+{ yylhsminor.yy490 = createJoinTableNode(pCxt, yymsp[-4].minor.yy246, yymsp[-5].minor.yy490, yymsp[-2].minor.yy490, yymsp[0].minor.yy490); }
+ yymsp[-5].minor.yy490 = yylhsminor.yy490;
break;
- case 553: /* join_type ::= */
-#line 1079 "sql.y"
-{ yymsp[1].minor.yy436 = JOIN_TYPE_INNER; }
-#line 7501 "sql.c"
+ case 558: /* join_type ::= */
+{ yymsp[1].minor.yy246 = JOIN_TYPE_INNER; }
break;
- case 554: /* join_type ::= INNER */
-#line 1080 "sql.y"
-{ yymsp[0].minor.yy436 = JOIN_TYPE_INNER; }
-#line 7506 "sql.c"
+ case 559: /* join_type ::= INNER */
+{ yymsp[0].minor.yy246 = JOIN_TYPE_INNER; }
break;
- case 555: /* 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 1086 "sql.y"
+ 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 */
{
- yymsp[-13].minor.yy232 = createSelectStmt(pCxt, yymsp[-11].minor.yy985, yymsp[-9].minor.yy88, yymsp[-8].minor.yy232, yymsp[-12].minor.yy88);
- yymsp[-13].minor.yy232 = setSelectStmtTagMode(pCxt, yymsp[-13].minor.yy232, yymsp[-10].minor.yy985);
- yymsp[-13].minor.yy232 = addWhereClause(pCxt, yymsp[-13].minor.yy232, yymsp[-7].minor.yy232);
- yymsp[-13].minor.yy232 = addPartitionByClause(pCxt, yymsp[-13].minor.yy232, yymsp[-6].minor.yy88);
- yymsp[-13].minor.yy232 = addWindowClauseClause(pCxt, yymsp[-13].minor.yy232, yymsp[-2].minor.yy232);
- yymsp[-13].minor.yy232 = addGroupByClause(pCxt, yymsp[-13].minor.yy232, yymsp[-1].minor.yy88);
- yymsp[-13].minor.yy232 = addHavingClause(pCxt, yymsp[-13].minor.yy232, yymsp[0].minor.yy232);
- yymsp[-13].minor.yy232 = addRangeClause(pCxt, yymsp[-13].minor.yy232, yymsp[-5].minor.yy232);
- yymsp[-13].minor.yy232 = addEveryClause(pCxt, yymsp[-13].minor.yy232, yymsp[-4].minor.yy232);
- yymsp[-13].minor.yy232 = addFillClause(pCxt, yymsp[-13].minor.yy232, yymsp[-3].minor.yy232);
+ 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);
+ yymsp[-13].minor.yy490 = addWhereClause(pCxt, yymsp[-13].minor.yy490, yymsp[-7].minor.yy490);
+ yymsp[-13].minor.yy490 = addPartitionByClause(pCxt, yymsp[-13].minor.yy490, yymsp[-6].minor.yy502);
+ yymsp[-13].minor.yy490 = addWindowClauseClause(pCxt, yymsp[-13].minor.yy490, yymsp[-2].minor.yy490);
+ yymsp[-13].minor.yy490 = addGroupByClause(pCxt, yymsp[-13].minor.yy490, yymsp[-1].minor.yy502);
+ yymsp[-13].minor.yy490 = addHavingClause(pCxt, yymsp[-13].minor.yy490, yymsp[0].minor.yy490);
+ yymsp[-13].minor.yy490 = addRangeClause(pCxt, yymsp[-13].minor.yy490, yymsp[-5].minor.yy490);
+ 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 7522 "sql.c"
break;
- case 556: /* hint_list ::= */
-#line 1101 "sql.y"
-{ yymsp[1].minor.yy88 = createHintNodeList(pCxt, NULL); }
-#line 7527 "sql.c"
+ case 561: /* hint_list ::= */
+{ yymsp[1].minor.yy502 = createHintNodeList(pCxt, NULL); }
break;
- case 557: /* hint_list ::= NK_HINT */
-#line 1102 "sql.y"
-{ yylhsminor.yy88 = createHintNodeList(pCxt, &yymsp[0].minor.yy0); }
-#line 7532 "sql.c"
- yymsp[0].minor.yy88 = yylhsminor.yy88;
+ case 562: /* hint_list ::= NK_HINT */
+{ yylhsminor.yy502 = createHintNodeList(pCxt, &yymsp[0].minor.yy0); }
+ yymsp[0].minor.yy502 = yylhsminor.yy502;
break;
- case 562: /* set_quantifier_opt ::= ALL */
-#line 1113 "sql.y"
-{ yymsp[0].minor.yy985 = false; }
-#line 7538 "sql.c"
+ case 567: /* set_quantifier_opt ::= ALL */
+{ yymsp[0].minor.yy845 = false; }
break;
- case 565: /* select_item ::= NK_STAR */
-#line 1120 "sql.y"
-{ yylhsminor.yy232 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0); }
-#line 7543 "sql.c"
- yymsp[0].minor.yy232 = yylhsminor.yy232;
+ case 570: /* select_item ::= NK_STAR */
+{ yylhsminor.yy490 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0); }
+ yymsp[0].minor.yy490 = yylhsminor.yy490;
break;
- case 567: /* select_item ::= common_expression column_alias */
- case 577: /* partition_item ::= expr_or_subquery column_alias */ yytestcase(yyruleno==577);
-#line 1122 "sql.y"
-{ yylhsminor.yy232 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy232), &yymsp[0].minor.yy993); }
-#line 7550 "sql.c"
- yymsp[-1].minor.yy232 = yylhsminor.yy232;
+ case 572: /* select_item ::= common_expression column_alias */
+ case 582: /* partition_item ::= expr_or_subquery column_alias */ yytestcase(yyruleno==582);
+{ yylhsminor.yy490 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy490), &yymsp[0].minor.yy561); }
+ yymsp[-1].minor.yy490 = yylhsminor.yy490;
break;
- case 568: /* select_item ::= common_expression AS column_alias */
- case 578: /* partition_item ::= expr_or_subquery AS column_alias */ yytestcase(yyruleno==578);
-#line 1123 "sql.y"
-{ yylhsminor.yy232 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy232), &yymsp[0].minor.yy993); }
-#line 7557 "sql.c"
- yymsp[-2].minor.yy232 = yylhsminor.yy232;
+ case 573: /* select_item ::= common_expression AS column_alias */
+ case 583: /* partition_item ::= expr_or_subquery AS column_alias */ yytestcase(yyruleno==583);
+{ yylhsminor.yy490 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy490), &yymsp[0].minor.yy561); }
+ yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
- case 573: /* partition_by_clause_opt ::= PARTITION BY partition_list */
- case 601: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==601);
- case 621: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==621);
-#line 1132 "sql.y"
-{ yymsp[-2].minor.yy88 = yymsp[0].minor.yy88; }
-#line 7565 "sql.c"
+ 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);
+{ yymsp[-2].minor.yy502 = yymsp[0].minor.yy502; }
break;
- case 580: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP */
-#line 1145 "sql.y"
-{ yymsp[-5].minor.yy232 = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy232), releaseRawExprNode(pCxt, yymsp[-1].minor.yy232)); }
-#line 7570 "sql.c"
+ case 585: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP */
+{ yymsp[-5].minor.yy490 = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy490), releaseRawExprNode(pCxt, yymsp[-1].minor.yy490)); }
break;
- case 581: /* twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */
-#line 1146 "sql.y"
-{ yymsp[-3].minor.yy232 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy232)); }
-#line 7575 "sql.c"
+ case 586: /* twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */
+{ yymsp[-3].minor.yy490 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy490)); }
break;
- case 582: /* twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt */
-#line 1148 "sql.y"
-{ yymsp[-5].minor.yy232 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy232), NULL, yymsp[-1].minor.yy232, yymsp[0].minor.yy232); }
-#line 7580 "sql.c"
+ case 587: /* twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt */
+{ yymsp[-5].minor.yy490 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy490), NULL, yymsp[-1].minor.yy490, yymsp[0].minor.yy490); }
break;
- case 583: /* twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_COMMA interval_sliding_duration_literal NK_RP sliding_opt fill_opt */
-#line 1152 "sql.y"
-{ yymsp[-7].minor.yy232 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy232), releaseRawExprNode(pCxt, yymsp[-3].minor.yy232), yymsp[-1].minor.yy232, yymsp[0].minor.yy232); }
-#line 7585 "sql.c"
+ case 588: /* twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_COMMA interval_sliding_duration_literal NK_RP sliding_opt fill_opt */
+{ 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); }
break;
- case 584: /* twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */
-#line 1154 "sql.y"
-{ yymsp[-6].minor.yy232 = createEventWindowNode(pCxt, yymsp[-3].minor.yy232, yymsp[0].minor.yy232); }
-#line 7590 "sql.c"
+ case 589: /* twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */
+{ yymsp[-6].minor.yy490 = createEventWindowNode(pCxt, yymsp[-3].minor.yy490, yymsp[0].minor.yy490); }
break;
- case 591: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */
-#line 1164 "sql.y"
-{ yymsp[-3].minor.yy232 = createFillNode(pCxt, yymsp[-1].minor.yy246, NULL); }
-#line 7595 "sql.c"
+ case 596: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */
+{ yymsp[-3].minor.yy490 = createFillNode(pCxt, yymsp[-1].minor.yy718, NULL); }
break;
- case 592: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP */
-#line 1165 "sql.y"
-{ yymsp[-5].minor.yy232 = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, yymsp[-1].minor.yy88)); }
-#line 7600 "sql.c"
+ case 597: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP */
+{ yymsp[-5].minor.yy490 = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, yymsp[-1].minor.yy502)); }
break;
- case 593: /* fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP */
-#line 1166 "sql.y"
-{ yymsp[-5].minor.yy232 = createFillNode(pCxt, FILL_MODE_VALUE_F, createNodeListNode(pCxt, yymsp[-1].minor.yy88)); }
-#line 7605 "sql.c"
+ case 598: /* fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP */
+{ yymsp[-5].minor.yy490 = createFillNode(pCxt, FILL_MODE_VALUE_F, createNodeListNode(pCxt, yymsp[-1].minor.yy502)); }
break;
- case 594: /* fill_mode ::= NONE */
-#line 1170 "sql.y"
-{ yymsp[0].minor.yy246 = FILL_MODE_NONE; }
-#line 7610 "sql.c"
+ case 599: /* fill_mode ::= NONE */
+{ yymsp[0].minor.yy718 = FILL_MODE_NONE; }
break;
- case 595: /* fill_mode ::= PREV */
-#line 1171 "sql.y"
-{ yymsp[0].minor.yy246 = FILL_MODE_PREV; }
-#line 7615 "sql.c"
+ case 600: /* fill_mode ::= PREV */
+{ yymsp[0].minor.yy718 = FILL_MODE_PREV; }
break;
- case 596: /* fill_mode ::= NULL */
-#line 1172 "sql.y"
-{ yymsp[0].minor.yy246 = FILL_MODE_NULL; }
-#line 7620 "sql.c"
+ case 601: /* fill_mode ::= NULL */
+{ yymsp[0].minor.yy718 = FILL_MODE_NULL; }
break;
- case 597: /* fill_mode ::= NULL_F */
-#line 1173 "sql.y"
-{ yymsp[0].minor.yy246 = FILL_MODE_NULL_F; }
-#line 7625 "sql.c"
+ case 602: /* fill_mode ::= NULL_F */
+{ yymsp[0].minor.yy718 = FILL_MODE_NULL_F; }
break;
- case 598: /* fill_mode ::= LINEAR */
-#line 1174 "sql.y"
-{ yymsp[0].minor.yy246 = FILL_MODE_LINEAR; }
-#line 7630 "sql.c"
+ case 603: /* fill_mode ::= LINEAR */
+{ yymsp[0].minor.yy718 = FILL_MODE_LINEAR; }
break;
- case 599: /* fill_mode ::= NEXT */
-#line 1175 "sql.y"
-{ yymsp[0].minor.yy246 = FILL_MODE_NEXT; }
-#line 7635 "sql.c"
+ case 604: /* fill_mode ::= NEXT */
+{ yymsp[0].minor.yy718 = FILL_MODE_NEXT; }
break;
- case 602: /* group_by_list ::= expr_or_subquery */
-#line 1184 "sql.y"
-{ yylhsminor.yy88 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy232))); }
-#line 7640 "sql.c"
- yymsp[0].minor.yy88 = yylhsminor.yy88;
+ case 607: /* group_by_list ::= expr_or_subquery */
+{ yylhsminor.yy502 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy490))); }
+ yymsp[0].minor.yy502 = yylhsminor.yy502;
break;
- case 603: /* group_by_list ::= group_by_list NK_COMMA expr_or_subquery */
-#line 1185 "sql.y"
-{ yylhsminor.yy88 = addNodeToList(pCxt, yymsp[-2].minor.yy88, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy232))); }
-#line 7646 "sql.c"
- yymsp[-2].minor.yy88 = yylhsminor.yy88;
+ case 608: /* group_by_list ::= group_by_list NK_COMMA expr_or_subquery */
+{ yylhsminor.yy502 = addNodeToList(pCxt, yymsp[-2].minor.yy502, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy490))); }
+ yymsp[-2].minor.yy502 = yylhsminor.yy502;
break;
- case 607: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */
-#line 1192 "sql.y"
-{ yymsp[-5].minor.yy232 = createInterpTimeRange(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy232), releaseRawExprNode(pCxt, yymsp[-1].minor.yy232)); }
-#line 7652 "sql.c"
+ case 612: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */
+{ yymsp[-5].minor.yy490 = createInterpTimeRange(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy490), releaseRawExprNode(pCxt, yymsp[-1].minor.yy490)); }
break;
- case 608: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_RP */
-#line 1194 "sql.y"
-{ yymsp[-3].minor.yy232 = createInterpTimePoint(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy232)); }
-#line 7657 "sql.c"
+ case 613: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_RP */
+{ yymsp[-3].minor.yy490 = createInterpTimePoint(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy490)); }
break;
- case 611: /* query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */
-#line 1201 "sql.y"
+ case 616: /* query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */
{
- yylhsminor.yy232 = addOrderByClause(pCxt, yymsp[-3].minor.yy232, yymsp[-2].minor.yy88);
- yylhsminor.yy232 = addSlimitClause(pCxt, yylhsminor.yy232, yymsp[-1].minor.yy232);
- yylhsminor.yy232 = addLimitClause(pCxt, yylhsminor.yy232, yymsp[0].minor.yy232);
+ 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 7666 "sql.c"
- yymsp[-3].minor.yy232 = yylhsminor.yy232;
+ yymsp[-3].minor.yy490 = yylhsminor.yy490;
break;
- case 614: /* union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */
-#line 1211 "sql.y"
-{ yylhsminor.yy232 = createSetOperator(pCxt, SET_OP_TYPE_UNION_ALL, yymsp[-3].minor.yy232, yymsp[0].minor.yy232); }
-#line 7672 "sql.c"
- yymsp[-3].minor.yy232 = yylhsminor.yy232;
+ case 619: /* union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */
+{ yylhsminor.yy490 = createSetOperator(pCxt, SET_OP_TYPE_UNION_ALL, yymsp[-3].minor.yy490, yymsp[0].minor.yy490); }
+ yymsp[-3].minor.yy490 = yylhsminor.yy490;
break;
- case 615: /* union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */
-#line 1213 "sql.y"
-{ yylhsminor.yy232 = createSetOperator(pCxt, SET_OP_TYPE_UNION, yymsp[-2].minor.yy232, yymsp[0].minor.yy232); }
-#line 7678 "sql.c"
- yymsp[-2].minor.yy232 = yylhsminor.yy232;
+ case 620: /* union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */
+{ yylhsminor.yy490 = createSetOperator(pCxt, SET_OP_TYPE_UNION, yymsp[-2].minor.yy490, yymsp[0].minor.yy490); }
+ yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
- case 623: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */
- case 627: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==627);
-#line 1227 "sql.y"
-{ yymsp[-1].minor.yy232 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); }
-#line 7685 "sql.c"
+ case 628: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */
+ case 632: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==632);
+{ yymsp[-1].minor.yy490 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); }
break;
- case 624: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */
- case 628: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==628);
-#line 1228 "sql.y"
-{ yymsp[-3].minor.yy232 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); }
-#line 7691 "sql.c"
+ 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);
+{ yymsp[-3].minor.yy490 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); }
break;
- case 625: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */
- case 629: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==629);
-#line 1229 "sql.y"
-{ yymsp[-3].minor.yy232 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); }
-#line 7697 "sql.c"
+ 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);
+{ yymsp[-3].minor.yy490 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); }
break;
- case 630: /* subquery ::= NK_LP query_expression NK_RP */
-#line 1237 "sql.y"
-{ yylhsminor.yy232 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy232); }
-#line 7702 "sql.c"
- yymsp[-2].minor.yy232 = yylhsminor.yy232;
+ case 635: /* subquery ::= NK_LP query_expression NK_RP */
+{ yylhsminor.yy490 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy490); }
+ yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
- case 635: /* sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */
-#line 1251 "sql.y"
-{ yylhsminor.yy232 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy232), yymsp[-1].minor.yy834, yymsp[0].minor.yy153); }
-#line 7708 "sql.c"
- yymsp[-2].minor.yy232 = yylhsminor.yy232;
+ case 640: /* sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */
+{ yylhsminor.yy490 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy490), yymsp[-1].minor.yy876, yymsp[0].minor.yy361); }
+ yymsp[-2].minor.yy490 = yylhsminor.yy490;
break;
- case 636: /* ordering_specification_opt ::= */
-#line 1255 "sql.y"
-{ yymsp[1].minor.yy834 = ORDER_ASC; }
-#line 7714 "sql.c"
+ case 641: /* ordering_specification_opt ::= */
+{ yymsp[1].minor.yy876 = ORDER_ASC; }
break;
- case 637: /* ordering_specification_opt ::= ASC */
-#line 1256 "sql.y"
-{ yymsp[0].minor.yy834 = ORDER_ASC; }
-#line 7719 "sql.c"
+ case 642: /* ordering_specification_opt ::= ASC */
+{ yymsp[0].minor.yy876 = ORDER_ASC; }
break;
- case 638: /* ordering_specification_opt ::= DESC */
-#line 1257 "sql.y"
-{ yymsp[0].minor.yy834 = ORDER_DESC; }
-#line 7724 "sql.c"
+ case 643: /* ordering_specification_opt ::= DESC */
+{ yymsp[0].minor.yy876 = ORDER_DESC; }
break;
- case 639: /* null_ordering_opt ::= */
-#line 1261 "sql.y"
-{ yymsp[1].minor.yy153 = NULL_ORDER_DEFAULT; }
-#line 7729 "sql.c"
+ case 644: /* null_ordering_opt ::= */
+{ yymsp[1].minor.yy361 = NULL_ORDER_DEFAULT; }
break;
- case 640: /* null_ordering_opt ::= NULLS FIRST */
-#line 1262 "sql.y"
-{ yymsp[-1].minor.yy153 = NULL_ORDER_FIRST; }
-#line 7734 "sql.c"
+ case 645: /* null_ordering_opt ::= NULLS FIRST */
+{ yymsp[-1].minor.yy361 = NULL_ORDER_FIRST; }
break;
- case 641: /* null_ordering_opt ::= NULLS LAST */
-#line 1263 "sql.y"
-{ yymsp[-1].minor.yy153 = NULL_ORDER_LAST; }
-#line 7739 "sql.c"
+ case 646: /* null_ordering_opt ::= NULLS LAST */
+{ yymsp[-1].minor.yy361 = NULL_ORDER_LAST; }
break;
default:
break;
@@ -7798,7 +6630,6 @@ 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) {
@@ -7809,7 +6640,6 @@ 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 7812 "sql.c"
/************ End %syntax_error code ******************************************/
ParseARG_STORE /* Suppress warning about unused %extra_argument variable */
ParseCTX_STORE
@@ -7895,56 +6725,12 @@ void Parse(
}
#endif
- while(1){ /* Exit by "break" */
- assert( yypParser->yytos>=yypParser->yystack );
+ do{
assert( yyact==yypParser->yytos->stateno );
yyact = yy_find_shift_action((YYCODETYPE)yymajor,yyact);
if( yyact >= YY_MIN_REDUCE ){
- 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);
+ yyact = yy_reduce(yypParser,yyact-YY_MIN_REDUCE,yymajor,
+ yyminor ParseCTX_PARAM);
}else if( yyact <= YY_MAX_SHIFTREDUCE ){
yy_shift(yypParser,yyact,(YYCODETYPE)yymajor,yyminor);
#ifndef YYNOERRORRECOVERY
@@ -8000,13 +6786,14 @@ 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);
- if( yyact<=YY_MAX_SHIFTREDUCE ) break;
+ while( yypParser->yytos >= yypParser->yystack
+ && (yyact = yy_find_reduce_action(
+ yypParser->yytos->stateno,
+ YYERRORSYMBOL)) > YY_MAX_SHIFTREDUCE
+ ){
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
@@ -8056,7 +6843,7 @@ void Parse(
break;
#endif
}
- }
+ }while( yypParser->yytos>yypParser->yystack );
#ifndef NDEBUG
if( yyTraceFILE ){
yyStackEntry *i;
diff --git a/source/libs/planner/src/planOptimizer.c b/source/libs/planner/src/planOptimizer.c
index af9ec93f65..cda1614612 100644
--- a/source/libs/planner/src/planOptimizer.c
+++ b/source/libs/planner/src/planOptimizer.c
@@ -1455,28 +1455,25 @@ static int32_t sortForJoinOptimizeImpl(SOptimizeContext* pCxt, SLogicSubplan* pL
SLogicNode* pLeft = (SLogicNode*)nodesListGetNode(pJoin->node.pChildren, 0);
SLogicNode* pRight = (SLogicNode*)nodesListGetNode(pJoin->node.pChildren, 1);
SScanLogicNode* pScan = NULL;
+ SLogicNode* pChild = NULL;
+ SNode** pChildPos = NULL;
+ EOrder targetOrder = 0;
+ SSHashObj* pTables = NULL;
if (QUERY_NODE_LOGIC_PLAN_SCAN == nodeType(pLeft) && ((SScanLogicNode*)pLeft)->node.outputTsOrder != SCAN_ORDER_BOTH) {
pScan = (SScanLogicNode*)pLeft;
+ pChild = pRight;
+ pChildPos = &pJoin->node.pChildren->pTail->pNode;
+ targetOrder = pScan->node.outputTsOrder;
} else if (QUERY_NODE_LOGIC_PLAN_SCAN == nodeType(pRight) && ((SScanLogicNode*)pRight)->node.outputTsOrder != SCAN_ORDER_BOTH) {
pScan = (SScanLogicNode*)pRight;
- }
-
- if (NULL != pScan) {
- switch (pScan->node.outputTsOrder) {
- case SCAN_ORDER_ASC:
- pScan->scanSeq[0] = 0;
- pScan->scanSeq[1] = 1;
- pScan->node.outputTsOrder = ORDER_DESC;
- goto _return;
- case SCAN_ORDER_DESC:
- pScan->scanSeq[0] = 1;
- pScan->scanSeq[1] = 0;
- pScan->node.outputTsOrder = ORDER_ASC;
- goto _return;
- default:
- break;
- }
+ pChild = pLeft;
+ pChildPos = &pJoin->node.pChildren->pHead->pNode;
+ targetOrder = pScan->node.outputTsOrder;
+ } else {
+ pChild = pRight;
+ pChildPos = &pJoin->node.pChildren->pTail->pNode;
+ targetOrder = pLeft->outputTsOrder;
}
if (QUERY_NODE_OPERATOR != nodeType(pJoin->pPrimKeyEqCond)) {
@@ -1490,16 +1487,15 @@ static int32_t sortForJoinOptimizeImpl(SOptimizeContext* pCxt, SLogicSubplan* pL
}
SNode* pOrderByNode = NULL;
- SSHashObj* pLeftTables = NULL;
- collectTableAliasFromNodes(nodesListGetNode(pJoin->node.pChildren, 0), &pLeftTables);
-
- if (NULL != tSimpleHashGet(pLeftTables, ((SColumnNode*)pOp->pLeft)->tableAlias, strlen(((SColumnNode*)pOp->pLeft)->tableAlias))) {
+
+ collectTableAliasFromNodes((SNode*)pChild, &pTables);
+ if (NULL != tSimpleHashGet(pTables, ((SColumnNode*)pOp->pLeft)->tableAlias, strlen(((SColumnNode*)pOp->pLeft)->tableAlias))) {
pOrderByNode = pOp->pLeft;
- } else if (NULL != tSimpleHashGet(pLeftTables, ((SColumnNode*)pOp->pRight)->tableAlias, strlen(((SColumnNode*)pOp->pRight)->tableAlias))) {
+ } else if (NULL != tSimpleHashGet(pTables, ((SColumnNode*)pOp->pRight)->tableAlias, strlen(((SColumnNode*)pOp->pRight)->tableAlias))) {
pOrderByNode = pOp->pRight;
}
- tSimpleHashCleanup(pLeftTables);
+ tSimpleHashCleanup(pTables);
if (NULL == pOrderByNode) {
return TSDB_CODE_PLAN_INTERNAL_ERROR;
@@ -1510,7 +1506,13 @@ static int32_t sortForJoinOptimizeImpl(SOptimizeContext* pCxt, SLogicSubplan* pL
return TSDB_CODE_OUT_OF_MEMORY;
}
- pSort->node.outputTsOrder = (ORDER_ASC == pLeft->outputTsOrder) ? ORDER_DESC : ORDER_ASC;
+ pSort->node.outputTsOrder = targetOrder;
+ pSort->node.pTargets = nodesCloneList(pChild->pTargets);
+ if (NULL == pSort->node.pTargets) {
+ nodesDestroyNode((SNode *)pSort);
+ return TSDB_CODE_OUT_OF_MEMORY;
+ }
+
pSort->groupSort = false;
SOrderByExprNode* pOrder = (SOrderByExprNode*)nodesMakeNode(QUERY_NODE_ORDER_BY_EXPR);
if (NULL == pOrder) {
@@ -1519,7 +1521,7 @@ static int32_t sortForJoinOptimizeImpl(SOptimizeContext* pCxt, SLogicSubplan* pL
}
nodesListMakeAppend(&pSort->pSortKeys, (SNode*)pOrder);
- pOrder->order = (ORDER_ASC == pLeft->outputTsOrder) ? ORDER_DESC : ORDER_ASC;
+ pOrder->order = targetOrder;
pOrder->pExpr = nodesCloneNode(pOrderByNode);
pOrder->nullOrder = (ORDER_ASC == pOrder->order) ? NULL_ORDER_FIRST : NULL_ORDER_LAST;
if (!pOrder->pExpr) {
@@ -1527,9 +1529,9 @@ static int32_t sortForJoinOptimizeImpl(SOptimizeContext* pCxt, SLogicSubplan* pL
return TSDB_CODE_OUT_OF_MEMORY;
}
- pLeft->pParent = (SLogicNode*)pSort;
- nodesListMakeAppend(&pSort->node.pChildren, (SNode*)pLeft);
- pJoin->node.pChildren->pHead->pNode = (SNode*)pSort;
+ pChild->pParent = (SLogicNode*)pSort;
+ nodesListMakeAppend(&pSort->node.pChildren, (SNode*)pChild);
+ *pChildPos = (SNode*)pSort;
pSort->node.pParent = (SLogicNode*)pJoin;;
_return:
diff --git a/source/libs/qworker/src/qworker.c b/source/libs/qworker/src/qworker.c
index 7376aa3a9c..5246eab115 100644
--- a/source/libs/qworker/src/qworker.c
+++ b/source/libs/qworker/src/qworker.c
@@ -543,7 +543,7 @@ int32_t qwHandlePrePhaseEvents(QW_FPARAMS_DEF, int8_t phase, SQWPhaseInput *inpu
if (QW_EVENT_RECEIVED(ctx, QW_EVENT_FETCH)) {
QW_TASK_WLOG("last fetch still not processed, phase:%s", qwPhaseStr(phase));
- QW_ERR_JRET(TSDB_CODE_QRY_DUPLICATTED_OPERATION);
+ QW_ERR_JRET(TSDB_CODE_QRY_DUPLICATED_OPERATION);
}
if (ctx->rspCode) {
@@ -972,7 +972,7 @@ int32_t qwProcessDrop(QW_FPARAMS_DEF, SQWMsg *qwMsg) {
if (QW_EVENT_RECEIVED(ctx, QW_EVENT_DROP)) {
QW_TASK_WLOG_E("task already dropping");
- QW_ERR_JRET(TSDB_CODE_QRY_DUPLICATTED_OPERATION);
+ QW_ERR_JRET(TSDB_CODE_QRY_DUPLICATED_OPERATION);
}
if (QW_QUERY_RUNNING(ctx)) {
diff --git a/source/libs/scalar/src/sclfunc.c b/source/libs/scalar/src/sclfunc.c
index 26552f25b4..62fda148cd 100644
--- a/source/libs/scalar/src/sclfunc.c
+++ b/source/libs/scalar/src/sclfunc.c
@@ -1815,9 +1815,8 @@ int32_t winEndTsFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *p
return TSDB_CODE_SUCCESS;
}
-int32_t qTbnameFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput) {
- char* p = colDataGetVarData(pInput->columnData, 0);
-
+int32_t qPseudoTagFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput) {
+ char *p = colDataGetData(pInput->columnData, 0);
int32_t code = colDataSetNItems(pOutput->columnData, pOutput->numOfRows, p, pInput->numOfRows, true);
if (code) {
return code;
@@ -1826,31 +1825,6 @@ int32_t qTbnameFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pO
pOutput->numOfRows += pInput->numOfRows;
return TSDB_CODE_SUCCESS;
}
-#ifdef BUILD_NO_CALL
-int32_t qTbUidFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput) {
- char* p = colDataGetNumData(pInput->columnData, 0);
-
- int32_t code = colDataSetNItems(pOutput->columnData, pOutput->numOfRows, p, pInput->numOfRows, true);
- if (code) {
- return code;
- }
-
- pOutput->numOfRows += pInput->numOfRows;
- return TSDB_CODE_SUCCESS;
-}
-
-int32_t qVgIdFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput) {
- char* p = colDataGetNumData(pInput->columnData, 0);
-
- int32_t code = colDataSetNItems(pOutput->columnData, pOutput->numOfRows, p, pInput->numOfRows, true);
- if (code) {
- return code;
- }
-
- pOutput->numOfRows += pInput->numOfRows;
- return TSDB_CODE_SUCCESS;
-}
-#endif
/** Aggregation functions **/
int32_t countScalarFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput) {
diff --git a/source/libs/stream/inc/streamInt.h b/source/libs/stream/inc/streamInt.h
index 0534f2c30c..fd9c8b61d1 100644
--- a/source/libs/stream/inc/streamInt.h
+++ b/source/libs/stream/inc/streamInt.h
@@ -123,7 +123,7 @@ int32_t streamTaskInitTokenBucket(STokenBucket* pBucket, int32_t numCap, int32_t
STaskId streamTaskGetTaskId(const SStreamTask* pTask);
void streamTaskInitForLaunchHTask(SHistoryTaskInfo* pInfo);
void streamTaskSetRetryInfoForLaunch(SHistoryTaskInfo* pInfo);
-int32_t streamTaskFillHistoryFinished(SStreamTask* pTask);
+int32_t streamTaskResetTimewindowFilter(SStreamTask* pTask);
void streamClearChkptReadyMsg(SStreamTask* pTask);
int32_t streamTaskGetDataFromInputQ(SStreamTask* pTask, SStreamQueueItem** pInput, int32_t* numOfBlocks,
diff --git a/source/libs/stream/src/streamCheckpoint.c b/source/libs/stream/src/streamCheckpoint.c
index 50a010d779..f45904f036 100644
--- a/source/libs/stream/src/streamCheckpoint.c
+++ b/source/libs/stream/src/streamCheckpoint.c
@@ -116,7 +116,6 @@ static int32_t streamAlignCheckpoint(SStreamTask* pTask) {
return atomic_sub_fetch_32(&pTask->chkInfo.downstreamAlignNum, 1);
}
-// todo handle down the transId of checkpoint to sink/agg tasks.
static int32_t appendCheckpointIntoInputQ(SStreamTask* pTask, int32_t checkpointType) {
SStreamDataBlock* pChkpoint = taosAllocateQitem(sizeof(SStreamDataBlock), DEF_QITEM, sizeof(SSDataBlock));
if (pChkpoint == NULL) {
@@ -133,6 +132,7 @@ static int32_t appendCheckpointIntoInputQ(SStreamTask* pTask, int32_t checkpoint
pBlock->info.type = STREAM_CHECKPOINT;
pBlock->info.version = pTask->chkInfo.checkpointingId;
+ pBlock->info.window.ekey = pBlock->info.window.skey = pTask->chkInfo.transId; // NOTE: set the transId
pBlock->info.rows = 1;
pBlock->info.childId = pTask->info.selfChildId;
@@ -185,17 +185,20 @@ static int32_t continueDispatchCheckpointBlock(SStreamDataBlock* pBlock, SStream
int32_t streamProcessCheckpointBlock(SStreamTask* pTask, SStreamDataBlock* pBlock) {
SSDataBlock* pDataBlock = taosArrayGet(pBlock->blocks, 0);
int64_t checkpointId = pDataBlock->info.version;
+ int32_t transId = pDataBlock->info.window.skey;
const char* id = pTask->id.idStr;
int32_t code = TSDB_CODE_SUCCESS;
int32_t vgId = pTask->pMeta->vgId;
stDebug("s-task:%s vgId:%d start to handle the checkpoint block, checkpointId:%" PRId64 " ver:%" PRId64
- ", current checkpointingId:%" PRId64,
- id, vgId, pTask->chkInfo.checkpointId, pTask->chkInfo.checkpointVer, checkpointId);
+ ", transId:%d current checkpointingId:%" PRId64,
+ id, vgId, pTask->chkInfo.checkpointId, pTask->chkInfo.checkpointVer, transId, checkpointId);
// set task status
if (streamTaskGetStatus(pTask)->state != TASK_STATUS__CK) {
pTask->chkInfo.checkpointingId = checkpointId;
+ pTask->chkInfo.transId = transId;
+
code = streamTaskHandleEvent(pTask->status.pSM, TASK_EVENT_GEN_CHECKPOINT);
if (code != TSDB_CODE_SUCCESS) {
stError("s-task:%s handle checkpoint-trigger block failed, code:%s", id, tstrerror(code));
diff --git a/source/libs/stream/src/streamExec.c b/source/libs/stream/src/streamExec.c
index 27748c84a0..7fb8095acd 100644
--- a/source/libs/stream/src/streamExec.c
+++ b/source/libs/stream/src/streamExec.c
@@ -388,8 +388,7 @@ int32_t streamDoTransferStateToStreamTask(SStreamTask* pTask) {
pStreamTask->id.idStr, TASK_LEVEL__SOURCE, pTimeWindow->skey, pTimeWindow->ekey, INT64_MIN,
pTimeWindow->ekey, p, pStreamTask->status.schedStatus);
- pTimeWindow->skey = INT64_MIN;
- qStreamInfoResetTimewindowFilter(pStreamTask->exec.pExecutor);
+ streamTaskResetTimewindowFilter(pStreamTask);
} else {
stDebug("s-task:%s no need to update/reset filter time window for non-source tasks", pStreamTask->id.idStr);
}
@@ -400,7 +399,6 @@ int32_t streamDoTransferStateToStreamTask(SStreamTask* pTask) {
// 3. send msg to mnode to launch a checkpoint to keep the state for current stream
streamTaskSendCheckpointReq(pStreamTask);
-// streamTaskResume(pStreamTask);
// 4. assign the status to the value that will be kept in disk
pStreamTask->status.taskStatus = streamTaskGetStatus(pStreamTask)->state;
@@ -419,10 +417,6 @@ int32_t streamTransferStateToStreamTask(SStreamTask* pTask) {
ASSERT(pTask->status.appendTranstateBlock == 1);
int32_t level = pTask->info.taskLevel;
- if (level == TASK_LEVEL__SOURCE) {
- streamTaskFillHistoryFinished(pTask);
- }
-
if (level == TASK_LEVEL__AGG || level == TASK_LEVEL__SOURCE) { // do transfer task operator states.
code = streamDoTransferStateToStreamTask(pTask);
} else { // no state transfer for sink tasks, and drop fill-history task, followed by opening inputQ of sink task.
@@ -777,6 +771,8 @@ int32_t streamResumeTask(SStreamTask* pTask) {
while (1) {
/*int32_t code = */ doStreamExecTask(pTask);
+
+ // check if continue
taosThreadMutexLock(&pTask->lock);
int32_t numOfItems = streamQueueGetNumOfItems(pTask->inputq.queue);
diff --git a/source/libs/stream/src/streamMeta.c b/source/libs/stream/src/streamMeta.c
index db71b56815..db74ce9897 100644
--- a/source/libs/stream/src/streamMeta.c
+++ b/source/libs/stream/src/streamMeta.c
@@ -590,11 +590,6 @@ int32_t streamMetaRegisterTask(SStreamMeta* pMeta, int64_t ver, SStreamTask* pTa
return 0;
}
- if (pTask->info.fillHistory == 1) {
- stDebug("s-task:0x%x initial nextProcessVer is set to 1 for fill-history task", pTask->id.taskId);
- ver = 1;
- }
-
if (pMeta->expandFunc(pMeta->ahandle, pTask, ver) < 0) {
tFreeStreamTask(pTask);
return -1;
@@ -1312,28 +1307,28 @@ void streamMetaResetStartInfo(STaskStartInfo* pStartInfo) {
}
void streamMetaRLock(SStreamMeta* pMeta) {
- stTrace("vgId:%d meta-rlock", pMeta->vgId);
+// stTrace("vgId:%d meta-rlock", pMeta->vgId);
taosThreadRwlockRdlock(&pMeta->lock);
}
void streamMetaRUnLock(SStreamMeta* pMeta) {
- stTrace("vgId:%d meta-runlock", pMeta->vgId);
+// stTrace("vgId:%d meta-runlock", pMeta->vgId);
int32_t code = taosThreadRwlockUnlock(&pMeta->lock);
if (code != TSDB_CODE_SUCCESS) {
stError("vgId:%d meta-runlock failed, code:%d", pMeta->vgId, code);
} else {
- stDebug("vgId:%d meta-runlock completed", pMeta->vgId);
+// stTrace("vgId:%d meta-runlock completed", pMeta->vgId);
}
}
void streamMetaWLock(SStreamMeta* pMeta) {
- stTrace("vgId:%d meta-wlock", pMeta->vgId);
+// stTrace("vgId:%d meta-wlock", pMeta->vgId);
taosThreadRwlockWrlock(&pMeta->lock);
- stTrace("vgId:%d meta-wlock completed", pMeta->vgId);
+// stTrace("vgId:%d meta-wlock completed", pMeta->vgId);
}
void streamMetaWUnLock(SStreamMeta* pMeta) {
- stTrace("vgId:%d meta-wunlock", pMeta->vgId);
+// stTrace("vgId:%d meta-wunlock", pMeta->vgId);
taosThreadRwlockUnlock(&pMeta->lock);
}
diff --git a/source/libs/stream/src/streamStart.c b/source/libs/stream/src/streamStart.c
index 20fdcff7d9..ee98bc801b 100644
--- a/source/libs/stream/src/streamStart.c
+++ b/source/libs/stream/src/streamStart.c
@@ -385,7 +385,6 @@ int32_t streamTaskOnScanhistoryTaskReady(SStreamTask* pTask) {
void doProcessDownstreamReadyRsp(SStreamTask* pTask) {
EStreamTaskEvent event = (pTask->info.fillHistory == 0) ? TASK_EVENT_INIT : TASK_EVENT_INIT_SCANHIST;
-
streamTaskOnHandleEventSuccess(pTask->status.pSM, event);
int64_t initTs = pTask->execInfo.init;
@@ -596,8 +595,6 @@ static void checkFillhistoryTaskStatus(SStreamTask* pTask, SStreamTask* pHTask)
SDataRange* pRange = &pHTask->dataRange;
// the query version range should be limited to the already processed data
- pRange->range.minVer = 0;
- pRange->range.maxVer = pTask->chkInfo.nextProcessVer - 1;
pHTask->execInfo.init = taosGetTimestampMs();
if (pTask->info.taskLevel == TASK_LEVEL__SOURCE) {
@@ -844,7 +841,7 @@ int32_t streamLaunchFillHistoryTask(SStreamTask* pTask) {
}
}
-int32_t streamTaskFillHistoryFinished(SStreamTask* pTask) {
+int32_t streamTaskResetTimewindowFilter(SStreamTask* pTask) {
void* exec = pTask->exec.pExecutor;
return qStreamInfoResetTimewindowFilter(exec);
}
@@ -855,8 +852,6 @@ bool streamHistoryTaskSetVerRangeStep2(SStreamTask* pTask, int64_t nextProcessVe
int64_t walScanStartVer = pRange->maxVer + 1;
if (walScanStartVer > nextProcessVer - 1) {
- // no input data yet. no need to execute the secondary scan while stream task halt
- streamTaskFillHistoryFinished(pTask);
stDebug(
"s-task:%s no need to perform secondary scan-history data(step 2), since no data ingest during step1 scan, "
"related stream task currentVer:%" PRId64,
@@ -966,27 +961,13 @@ void streamTaskSetRangeStreamCalc(SStreamTask* pTask) {
return;
}
- int64_t ekey = 0;
- if (pRange->window.ekey < INT64_MAX) {
- ekey = pRange->window.ekey + 1;
- } else {
- ekey = pRange->window.ekey;
- }
-
- int64_t ver = pRange->range.minVer;
-
- pRange->window.skey = ekey;
- pRange->window.ekey = INT64_MAX;
- pRange->range.minVer = 0;
- pRange->range.maxVer = ver;
-
- stDebug("s-task:%s level:%d related fill-history task exists, set stream task timeWindow:%" PRId64 " - %" PRId64
+ stDebug("s-task:%s level:%d related fill-history task exists, stream task timeWindow:%" PRId64 " - %" PRId64
", verRang:%" PRId64 " - %" PRId64,
- pTask->id.idStr, pTask->info.taskLevel, pRange->window.skey, pRange->window.ekey, ver, INT64_MAX);
+ pTask->id.idStr, pTask->info.taskLevel, pRange->window.skey, pRange->window.ekey, pRange->range.minVer,
+ pRange->range.maxVer);
- SVersionRange verRange = {.minVer = ver, .maxVer = INT64_MAX};
+ SVersionRange verRange = pRange->range;
STimeWindow win = pRange->window;
streamSetParamForStreamScannerStep2(pTask, &verRange, &win);
}
}
-
diff --git a/source/libs/stream/src/streamState.c b/source/libs/stream/src/streamState.c
index ea20f0e2b1..e370312338 100644
--- a/source/libs/stream/src/streamState.c
+++ b/source/libs/stream/src/streamState.c
@@ -670,7 +670,6 @@ void streamStateFreeCur(SStreamStateCur* pCur) {
if (!pCur) {
return;
}
- qDebug("streamStateFreeCur");
streamStateResetCur(pCur);
taosMemoryFree(pCur);
}
diff --git a/source/libs/stream/src/streamTask.c b/source/libs/stream/src/streamTask.c
index 3018894132..fef733c9f3 100644
--- a/source/libs/stream/src/streamTask.c
+++ b/source/libs/stream/src/streamTask.c
@@ -79,7 +79,7 @@ static SStreamChildEpInfo* createStreamTaskEpInfo(const SStreamTask* pTask) {
return pEpInfo;
}
-SStreamTask* tNewStreamTask(int64_t streamId, int8_t taskLevel, bool fillHistory, int64_t triggerParam,
+SStreamTask* tNewStreamTask(int64_t streamId, int8_t taskLevel, SEpSet* pEpset, bool fillHistory, int64_t triggerParam,
SArray* pTaskList, bool hasFillhistory) {
SStreamTask* pTask = (SStreamTask*)taosMemoryCalloc(1, sizeof(SStreamTask));
if (pTask == NULL) {
@@ -92,6 +92,7 @@ SStreamTask* tNewStreamTask(int64_t streamId, int8_t taskLevel, bool fillHistory
pTask->ver = SSTREAM_TASK_VER;
pTask->id.taskId = tGenIdPI32();
pTask->id.streamId = streamId;
+
pTask->info.taskLevel = taskLevel;
pTask->info.fillHistory = fillHistory;
pTask->info.triggerParam = triggerParam;
@@ -115,6 +116,8 @@ SStreamTask* tNewStreamTask(int64_t streamId, int8_t taskLevel, bool fillHistory
ASSERT(hasFillhistory);
}
+ epsetAssign(&(pTask->info.mnodeEpset), pEpset);
+
addToTaskset(pTaskList, pTask);
return pTask;
}
@@ -458,16 +461,18 @@ void tFreeStreamTask(SStreamTask* pTask) {
int32_t streamTaskInit(SStreamTask* pTask, SStreamMeta* pMeta, SMsgCb* pMsgCb, int64_t ver) {
pTask->id.idStr = createStreamTaskIdStr(pTask->id.streamId, pTask->id.taskId);
pTask->refCnt = 1;
- pTask->status.schedStatus = TASK_SCHED_STATUS__INACTIVE;
- pTask->status.timerActive = 0;
+
+ pTask->inputq.status = TASK_INPUT_STATUS__NORMAL;
+ pTask->outputq.status = TASK_OUTPUT_STATUS__NORMAL;
pTask->inputq.queue = streamQueueOpen(512 << 10);
pTask->outputq.queue = streamQueueOpen(512 << 10);
-
if (pTask->inputq.queue == NULL || pTask->outputq.queue == NULL) {
stError("s-task:%s failed to prepare the input/output queue, initialize task failed", pTask->id.idStr);
return TSDB_CODE_OUT_OF_MEMORY;
}
+ pTask->status.schedStatus = TASK_SCHED_STATUS__INACTIVE;
+ pTask->status.timerActive = 0;
pTask->status.pSM = streamCreateStateMachine(pTask);
if (pTask->status.pSM == NULL) {
stError("s-task:%s failed create state-machine for stream task, initialization failed, code:%s", pTask->id.idStr,
@@ -476,29 +481,34 @@ int32_t streamTaskInit(SStreamTask* pTask, SStreamMeta* pMeta, SMsgCb* pMsgCb, i
}
pTask->execInfo.created = taosGetTimestampMs();
- pTask->inputq.status = TASK_INPUT_STATUS__NORMAL;
- pTask->outputq.status = TASK_OUTPUT_STATUS__NORMAL;
- pTask->pMeta = pMeta;
+ SCheckpointInfo* pChkInfo = &pTask->chkInfo;
+ SDataRange* pRange = &pTask->dataRange;
- pTask->chkInfo.checkpointVer = ver - 1; // only update when generating checkpoint
- pTask->chkInfo.processedVer = ver - 1; // already processed version
+ // only set the version info for stream tasks without fill-history task
+ if (pTask->info.taskLevel == TASK_LEVEL__SOURCE) {
+ if ((pTask->info.fillHistory == 0) && (!HAS_RELATED_FILLHISTORY_TASK(pTask))) {
+ pChkInfo->checkpointVer = ver - 1; // only update when generating checkpoint
+ pChkInfo->processedVer = ver - 1; // already processed version
+ pChkInfo->nextProcessVer = ver; // next processed version
- pTask->chkInfo.nextProcessVer = ver; // next processed version
- pTask->dataRange.range.maxVer = ver;
- pTask->dataRange.range.minVer = ver;
- pTask->pMsgCb = pMsgCb;
- pTask->msgInfo.pRetryList = taosArrayInit(4, sizeof(int32_t));
-
- pTask->outputInfo.pTokenBucket = taosMemoryCalloc(1, sizeof(STokenBucket));
- if (pTask->outputInfo.pTokenBucket == NULL) {
- stError("s-task:%s failed to prepare the tokenBucket, code:%s", pTask->id.idStr,
- tstrerror(TSDB_CODE_OUT_OF_MEMORY));
- return TSDB_CODE_OUT_OF_MEMORY;
+ pRange->range.maxVer = ver;
+ pRange->range.minVer = ver;
+ } else {
+ if (pTask->info.fillHistory == 1) {
+ pChkInfo->checkpointVer = pRange->range.maxVer;
+ pChkInfo->processedVer = pRange->range.maxVer;
+ pChkInfo->nextProcessVer = pRange->range.maxVer + 1;
+ } else {
+ pChkInfo->checkpointVer = pRange->range.minVer - 1;
+ pChkInfo->processedVer = pRange->range.minVer - 1;
+ pChkInfo->nextProcessVer = pRange->range.minVer;
+ }
+ }
}
- // 2MiB per second for sink task
- // 50 times sink operator per second
- streamTaskInitTokenBucket(pTask->outputInfo.pTokenBucket, 35, 35, tsSinkDataRate, pTask->id.idStr);
+ pTask->pMeta = pMeta;
+ pTask->pMsgCb = pMsgCb;
+ pTask->msgInfo.pRetryList = taosArrayInit(4, sizeof(int32_t));
TdThreadMutexAttr attr = {0};
int code = taosThreadMutexAttrInit(&attr);
@@ -514,10 +524,22 @@ int32_t streamTaskInit(SStreamTask* pTask, SStreamMeta* pMeta, SMsgCb* pMsgCb, i
}
taosThreadMutexInit(&pTask->lock, &attr);
+ taosThreadMutexAttrDestroy(&attr);
streamTaskOpenAllUpstreamInput(pTask);
- pTask->outputInfo.pDownstreamUpdateList = taosArrayInit(4, sizeof(SDownstreamTaskEpset));
- if (pTask->outputInfo.pDownstreamUpdateList == NULL) {
+ STaskOutputInfo* pOutputInfo = &pTask->outputInfo;
+ pOutputInfo->pTokenBucket = taosMemoryCalloc(1, sizeof(STokenBucket));
+ if (pOutputInfo->pTokenBucket == NULL) {
+ stError("s-task:%s failed to prepare the tokenBucket, code:%s", pTask->id.idStr,
+ tstrerror(TSDB_CODE_OUT_OF_MEMORY));
+ return TSDB_CODE_OUT_OF_MEMORY;
+ }
+
+ // 2MiB per second for sink task
+ // 50 times sink operator per second
+ streamTaskInitTokenBucket(pOutputInfo->pTokenBucket, 35, 35, tsSinkDataRate, pTask->id.idStr);
+ pOutputInfo->pDownstreamUpdateList = taosArrayInit(4, sizeof(SDownstreamTaskEpset));
+ if (pOutputInfo->pDownstreamUpdateList == NULL) {
return TSDB_CODE_OUT_OF_MEMORY;
}
@@ -527,16 +549,16 @@ int32_t streamTaskInit(SStreamTask* pTask, SStreamMeta* pMeta, SMsgCb* pMsgCb, i
int32_t streamTaskGetNumOfDownstream(const SStreamTask* pTask) {
if (pTask->info.taskLevel == TASK_LEVEL__SINK) {
return 0;
+ }
+
+ int32_t type = pTask->outputInfo.type;
+ if (type == TASK_OUTPUT__TABLE) {
+ return 0;
+ } else if (type == TASK_OUTPUT__FIXED_DISPATCH) {
+ return 1;
} else {
- int32_t type = pTask->outputInfo.type;
- if (type == TASK_OUTPUT__TABLE) {
- return 0;
- } else if (type == TASK_OUTPUT__FIXED_DISPATCH) {
- return 1;
- } else {
- SArray* vgInfo = pTask->outputInfo.shuffleDispatcher.dbInfo.pVgroupInfos;
- return taosArrayGetSize(vgInfo);
- }
+ SArray* vgInfo = pTask->outputInfo.shuffleDispatcher.dbInfo.pVgroupInfos;
+ return taosArrayGetSize(vgInfo);
}
}
diff --git a/source/libs/stream/src/streamTaskSm.c b/source/libs/stream/src/streamTaskSm.c
index 1671d78ed2..83e71c42bc 100644
--- a/source/libs/stream/src/streamTaskSm.c
+++ b/source/libs/stream/src/streamTaskSm.c
@@ -105,7 +105,7 @@ int32_t streamTaskKeepCurrentVerInWal(SStreamTask* pTask) {
if (pTask->info.taskLevel == TASK_LEVEL__SOURCE) {
pTask->hTaskInfo.haltVer = walReaderGetCurrentVer(pTask->exec.pWalReader);
if (pTask->hTaskInfo.haltVer == -1) {
- pTask->hTaskInfo.haltVer = pTask->dataRange.range.maxVer + 1;
+ pTask->hTaskInfo.haltVer = pTask->dataRange.range.minVer;
}
}
diff --git a/source/libs/sync/src/syncMain.c b/source/libs/sync/src/syncMain.c
index edaf59f9db..c0808a95cc 100644
--- a/source/libs/sync/src/syncMain.c
+++ b/source/libs/sync/src/syncMain.c
@@ -2141,7 +2141,7 @@ static void syncNodeEqPingTimer(void* param, void* tmrId) {
if (code != 0) {
sError("failed to build ping msg");
rpcFreeCont(rpcMsg.pCont);
- return;
+ goto _out;
}
// sTrace("enqueue ping msg");
@@ -2149,9 +2149,10 @@ static void syncNodeEqPingTimer(void* param, void* tmrId) {
if (code != 0) {
sError("failed to sync enqueue ping msg since %s", terrstr());
rpcFreeCont(rpcMsg.pCont);
- return;
+ goto _out;
}
+ _out:
taosTmrReset(syncNodeEqPingTimer, pNode->pingTimerMS, pNode, syncEnv()->pTimerManager, &pNode->pPingTimer);
}
}
@@ -2211,7 +2212,7 @@ static void syncNodeEqHeartbeatTimer(void* param, void* tmrId) {
if (code != 0) {
sError("failed to build heartbeat msg");
- return;
+ goto _out;
}
sTrace("vgId:%d, enqueue heartbeat timer", pNode->vgId);
@@ -2219,9 +2220,10 @@ static void syncNodeEqHeartbeatTimer(void* param, void* tmrId) {
if (code != 0) {
sError("failed to enqueue heartbeat msg since %s", terrstr());
rpcFreeCont(rpcMsg.pCont);
- return;
+ goto _out;
}
+ _out:
taosTmrReset(syncNodeEqHeartbeatTimer, pNode->heartbeatTimerMS, pNode, syncEnv()->pTimerManager,
&pNode->pHeartbeatTimer);
diff --git a/source/libs/transport/src/transCli.c b/source/libs/transport/src/transCli.c
index 15b35030d3..b6942655a9 100644
--- a/source/libs/transport/src/transCli.c
+++ b/source/libs/transport/src/transCli.c
@@ -2515,7 +2515,7 @@ int transReleaseCliHandle(void* handle) {
SCliThrd* pThrd = transGetWorkThrdFromHandle(NULL, (int64_t)handle);
if (pThrd == NULL) {
- return -1;
+ return TSDB_CODE_RPC_BROKEN_LINK;
}
STransMsg tmsg = {.info.handle = handle, .info.ahandle = (void*)0x9527};
@@ -2535,7 +2535,7 @@ int transReleaseCliHandle(void* handle) {
if (0 != transAsyncSend(pThrd->asyncPool, &cmsg->q)) {
destroyCmsg(cmsg);
- return -1;
+ return TSDB_CODE_RPC_BROKEN_LINK;
}
return 0;
}
@@ -2544,7 +2544,7 @@ int transSendRequest(void* shandle, const SEpSet* pEpSet, STransMsg* pReq, STran
STrans* pTransInst = (STrans*)transAcquireExHandle(transGetInstMgt(), (int64_t)shandle);
if (pTransInst == NULL) {
transFreeMsg(pReq->pCont);
- return -1;
+ return TSDB_CODE_RPC_BROKEN_LINK;
}
SCliThrd* pThrd = transGetWorkThrd(pTransInst, (int64_t)pReq->info.handle);
@@ -2577,7 +2577,7 @@ int transSendRequest(void* shandle, const SEpSet* pEpSet, STransMsg* pReq, STran
if (0 != transAsyncSend(pThrd->asyncPool, &(cliMsg->q))) {
destroyCmsg(cliMsg);
transReleaseExHandle(transGetInstMgt(), (int64_t)shandle);
- return -1;
+ return TSDB_CODE_RPC_BROKEN_LINK;
}
transReleaseExHandle(transGetInstMgt(), (int64_t)shandle);
return 0;
@@ -2589,7 +2589,7 @@ int transSendRecv(void* shandle, const SEpSet* pEpSet, STransMsg* pReq, STransMs
if (pTransInst == NULL) {
transFreeMsg(pReq->pCont);
taosMemoryFree(pTransRsp);
- return -1;
+ return TSDB_CODE_RPC_BROKEN_LINK;
}
SCliThrd* pThrd = transGetWorkThrd(pTransInst, (int64_t)pReq->info.handle);
@@ -2627,6 +2627,7 @@ int transSendRecv(void* shandle, const SEpSet* pEpSet, STransMsg* pReq, STransMs
int ret = transAsyncSend(pThrd->asyncPool, &cliMsg->q);
if (ret != 0) {
destroyCmsg(cliMsg);
+ ret = TSDB_CODE_RPC_BROKEN_LINK;
goto _RETURN;
}
tsem_wait(sem);
@@ -2661,7 +2662,7 @@ int transSendRecvWithTimeout(void* shandle, SEpSet* pEpSet, STransMsg* pReq, STr
if (pTransInst == NULL) {
transFreeMsg(pReq->pCont);
taosMemoryFree(pTransMsg);
- return -1;
+ return TSDB_CODE_RPC_BROKEN_LINK;
}
SCliThrd* pThrd = transGetWorkThrd(pTransInst, (int64_t)pReq->info.handle);
@@ -2698,6 +2699,7 @@ int transSendRecvWithTimeout(void* shandle, SEpSet* pEpSet, STransMsg* pReq, STr
int ret = transAsyncSend(pThrd->asyncPool, &cliMsg->q);
if (ret != 0) {
destroyCmsg(cliMsg);
+ ret = TSDB_CODE_RPC_BROKEN_LINK;
goto _RETURN;
}
@@ -2726,7 +2728,7 @@ _RETURN:
int transSetDefaultAddr(void* shandle, const char* ip, const char* fqdn) {
STrans* pTransInst = (STrans*)transAcquireExHandle(transGetInstMgt(), (int64_t)shandle);
if (pTransInst == NULL) {
- return -1;
+ return TSDB_CODE_RPC_BROKEN_LINK;
}
SCvtAddr cvtAddr = {0};
@@ -2750,7 +2752,6 @@ int transSetDefaultAddr(void* shandle, const char* ip, const char* fqdn) {
if (transAsyncSend(thrd->asyncPool, &(cliMsg->q)) != 0) {
destroyCmsg(cliMsg);
transReleaseExHandle(transGetInstMgt(), (int64_t)shandle);
- return -1;
}
}
transReleaseExHandle(transGetInstMgt(), (int64_t)shandle);
diff --git a/source/libs/transport/src/transSvr.c b/source/libs/transport/src/transSvr.c
index 362d38b505..b324ca5f91 100644
--- a/source/libs/transport/src/transSvr.c
+++ b/source/libs/transport/src/transSvr.c
@@ -159,7 +159,7 @@ static void uvStartSendResp(SSvrMsg* msg);
static void uvNotifyLinkBrokenToApp(SSvrConn* conn);
-static FORCE_INLINE void destroySmsg(SSvrMsg* smsg);
+static FORCE_INLINE void destroySmsg(SSvrMsg* smsg);
static FORCE_INLINE SSvrConn* createConn(void* hThrd);
static FORCE_INLINE void destroyConn(SSvrConn* conn, bool clear /*clear handle or not*/);
static FORCE_INLINE void destroyConnRegArg(SSvrConn* conn);
@@ -1382,7 +1382,7 @@ void uvHandleUpdate(SSvrMsg* msg, SWorkThrd* thrd) {
tFreeSUpdateIpWhiteReq(req);
taosMemoryFree(req);
} else {
- tInfo("ip-white-list disable on trans");
+ tDebug("ip-white-list disable on trans");
thrd->enableIpWhiteList = 0;
}
taosMemoryFree(msg);
diff --git a/source/util/src/tbase58.c b/source/util/src/tbase58.c
new file mode 100644
index 0000000000..fa3ecadd14
--- /dev/null
+++ b/source/util/src/tbase58.c
@@ -0,0 +1,144 @@
+/*
+ * Copyright (c) 2019 TAOS Data, Inc.
+ *
+ * This program is free software: you can use, redistribute, and/or modify
+ * it under the terms of the GNU Affero General Public License, version 3
+ * or later ("AGPL"), as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+#define _DEFAULT_SOURCE
+#include "tbase58.h"
+#include
+#include
+
+#define BASE_BUF_SIZE 256
+static const char *basis_58 = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";
+
+char *base58_encode(const uint8_t *value, int32_t vlen) {
+ const uint8_t *pb = value;
+ const uint8_t *pe = pb + vlen;
+ uint8_t buf[BASE_BUF_SIZE] = {0};
+ uint8_t *pbuf = &buf[0];
+ bool bfree = false;
+ int32_t nz = 0, size = 0, len = 0;
+
+ while (pb != pe && *pb == 0) {
+ ++pb;
+ ++nz;
+ }
+
+ size = (pe - pb) * 69 / 50 + 1;
+ if (size > BASE_BUF_SIZE) {
+ if (!(pbuf = taosMemoryCalloc(1, size))) {
+ terrno = TSDB_CODE_OUT_OF_MEMORY;
+ return NULL;
+ }
+ bfree = true;
+ }
+
+ while (pb != pe) {
+ int32_t num = *pb;
+ int32_t i = 0;
+ for (int32_t j = (int32_t)size - 1; (num != 0 || i < len) && j >= 0; --j, ++i) {
+ num += ((int32_t)buf[j]) << 8;
+ pbuf[j] = num % 58;
+ num /= 58;
+ }
+ len = i;
+ ++pb;
+ }
+
+ const uint8_t *pi = pbuf + (size - len);
+ while (pi != pbuf + size && *pi == 0) ++pi;
+ uint8_t *result = taosMemoryCalloc(1, size + 1);
+ if (!result) {
+ terrno = TSDB_CODE_OUT_OF_MEMORY;
+ if (bfree) taosMemoryFree(pbuf);
+ return NULL;
+ }
+ memset(result, '1', nz);
+ while (pi != pbuf + size) result[nz++] = basis_58[*pi++];
+
+ if (bfree) taosMemoryFree(pbuf);
+ return result;
+}
+
+static const signed char index_58[256] = {
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8,
+ -1, -1, -1, -1, -1, -1, -1, 9, 10, 11, 12, 13, 14, 15, 16, -1, 17, 18, 19, 20, 21, -1, 22, 23, 24, 25, 26, 27, 28,
+ 29, 30, 31, 32, -1, -1, -1, -1, -1, -1, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, -1, 44, 45, 46, 47, 48, 49, 50,
+ 51, 52, 53, 54, 55, 56, 57, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1};
+
+uint8_t *base58_decode(const char *value, size_t inlen, int32_t *outlen) {
+ const char *pe = value + inlen;
+ uint8_t buf[BASE_BUF_SIZE] = {0};
+ uint8_t *pbuf = &buf[0];
+ bool bfree = false;
+ int32_t nz = 0, size = 0, len = 0;
+
+ while (*value && isspace(*value)) ++value;
+ while (*value == '1') {
+ ++nz;
+ ++value;
+ }
+
+ size = (int32_t)(pe - value) * 733 / 1000 + 1;
+ if (size > BASE_BUF_SIZE) {
+ if (!(pbuf = taosMemoryCalloc(1, size))) {
+ terrno = TSDB_CODE_OUT_OF_MEMORY;
+ return NULL;
+ }
+ bfree = true;
+ }
+
+ while (*value && !isspace(*value)) {
+ int32_t num = index_58[(uint8_t)*value];
+ if (num == -1) {
+ if (bfree) taosMemoryFree(pbuf);
+ return NULL;
+ }
+ int32_t i = 0;
+ for (int32_t j = size - 1; (num != 0 || i < len) && (j >= 0); --j, ++i) {
+ num += (int32_t)pbuf[j] * 58;
+ pbuf[j] = num & 255;
+ num >>= 8;
+ }
+ len = i;
+ ++value;
+ }
+
+ while (isspace(*value)) ++value;
+ if (*value != 0) {
+ if (bfree) taosMemoryFree(pbuf);
+ return NULL;
+ }
+ const uint8_t *it = pbuf + (size - len);
+ while (it != pbuf + size && *it == 0) ++it;
+
+ uint8_t *result = taosMemoryCalloc(1, size + 1);
+ if (!result) {
+ if (bfree) taosMemoryFree(pbuf);
+ terrno = TSDB_CODE_OUT_OF_MEMORY;
+ return NULL;
+ }
+
+ memset(result, 0, nz);
+ while (it != pbuf + size) result[nz++] = *it++;
+
+ if (outlen) *outlen = nz;
+
+ if (bfree) taosMemoryFree(pbuf);
+ return result;
+}
\ No newline at end of file
diff --git a/source/util/src/tbase64.c b/source/util/src/tbase64.c
index a2f4ddbc51..f6f12fef97 100644
--- a/source/util/src/tbase64.c
+++ b/source/util/src/tbase64.c
@@ -15,6 +15,8 @@
#define _DEFAULT_SOURCE
#include "tbase64.h"
+#include
+#include
static char basis_64[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
diff --git a/source/util/src/tcompression.c b/source/util/src/tcompression.c
index 3cc00ddc7f..656e2706f2 100644
--- a/source/util/src/tcompression.c
+++ b/source/util/src/tcompression.c
@@ -977,6 +977,7 @@ int32_t tsDecompressDoubleLossyImp(const char *input, int32_t compressedSize, co
}
#endif
+#ifdef BUILD_NO_CALL
/*************************************************************************
* STREAM COMPRESSION
*************************************************************************/
@@ -2120,7 +2121,7 @@ int32_t tCompressEnd(SCompressor *pCmprsor, const uint8_t **ppOut, int32_t *nOut
int32_t tCompress(SCompressor *pCmprsor, const void *pData, int64_t nData) {
return DATA_TYPE_INFO[pCmprsor->type].cmprFn(pCmprsor, pData, nData);
}
-
+#endif
/*************************************************************************
* REGULAR COMPRESSION
*************************************************************************/
diff --git a/source/util/src/tconfig.c b/source/util/src/tconfig.c
index d656f0c14e..ad3c766510 100644
--- a/source/util/src/tconfig.c
+++ b/source/util/src/tconfig.c
@@ -336,7 +336,7 @@ static int32_t cfgUpdateDebugFlagItem(SConfig *pCfg, const char *name, bool rese
}
int32_t cfgSetItem(SConfig *pCfg, const char *name, const char *value, ECfgSrcType stype) {
- GRANT_CFG_SET;
+ // GRANT_CFG_SET;
SConfigItem *pItem = cfgGetItem(pCfg, name);
if (pItem == NULL) {
terrno = TSDB_CODE_CFG_NOT_FOUND;
diff --git a/source/util/src/tdes.c b/source/util/src/tdes.c
index 0e0193a123..a4da08630e 100644
--- a/source/util/src/tdes.c
+++ b/source/util/src/tdes.c
@@ -48,6 +48,10 @@ char* taosDesImp(uint8_t* key, char* src, uint32_t len, int32_t process_mode) {
key_set key_sets[17];
memset(key_sets, 0, sizeof(key_sets));
char* dest = taosMemoryCalloc(len + 1, 1);
+ if (!dest) {
+ terrno = TSDB_CODE_OUT_OF_MEMORY;
+ return NULL;
+ }
generate_sub_keys(key, key_sets);
for (uint32_t block_count = 0; block_count < number_of_blocks; block_count++) {
@@ -61,7 +65,10 @@ char* taosDesImp(uint8_t* key, char* src, uint32_t len, int32_t process_mode) {
}
char* taosDesEncode(int64_t key, char* src, int32_t len) {
- if (len % 8 != 0) return NULL;
+ if (len % 8 != 0) {
+ terrno = TSDB_CODE_INVALID_PARA;
+ return NULL;
+ }
uint8_t* keyStr = (uint8_t*)(&key);
return taosDesImp(keyStr, src, len, ENCRYPTION_MODE);
}
diff --git a/source/util/src/terror.c b/source/util/src/terror.c
index 5371dbd6d7..9fcca86744 100644
--- a/source/util/src/terror.c
+++ b/source/util/src/terror.c
@@ -346,6 +346,7 @@ TAOS_DEFINE_ERROR(TSDB_CODE_MNODE_ALREADY_IS_VOTER, "Mnode already is a le
TAOS_DEFINE_ERROR(TSDB_CODE_MNODE_ONLY_TWO_MNODE, "Only two mnodes exist")
TAOS_DEFINE_ERROR(TSDB_CODE_MNODE_NO_NEED_RESTORE, "No need to restore on this dnode")
TAOS_DEFINE_ERROR(TSDB_CODE_DNODE_ONLY_USE_WHEN_OFFLINE, "Please use this command when the dnode is offline")
+TAOS_DEFINE_ERROR(TSDB_CODE_DNODE_NO_MACHINE_CODE, "Dnode can not get machine code")
// vnode
TAOS_DEFINE_ERROR(TSDB_CODE_VND_INVALID_VGROUP_ID, "Vnode is closed or removed")
@@ -417,7 +418,7 @@ TAOS_DEFINE_ERROR(TSDB_CODE_QRY_TASK_CANCELLED, "Task cancelled")
TAOS_DEFINE_ERROR(TSDB_CODE_QRY_TASK_DROPPED, "Task dropped")
TAOS_DEFINE_ERROR(TSDB_CODE_QRY_TASK_CANCELLING, "Task cancelling")
TAOS_DEFINE_ERROR(TSDB_CODE_QRY_TASK_DROPPING, "Task dropping")
-TAOS_DEFINE_ERROR(TSDB_CODE_QRY_DUPLICATTED_OPERATION, "Duplicatted operation")
+TAOS_DEFINE_ERROR(TSDB_CODE_QRY_DUPLICATED_OPERATION, "Duplicated operation")
TAOS_DEFINE_ERROR(TSDB_CODE_QRY_TASK_MSG_ERROR, "Task message error")
TAOS_DEFINE_ERROR(TSDB_CODE_QRY_JOB_FREED, "Job already freed")
TAOS_DEFINE_ERROR(TSDB_CODE_QRY_TASK_STATUS_ERROR, "Task status error")
@@ -432,26 +433,37 @@ TAOS_DEFINE_ERROR(TSDB_CODE_QRY_EXECUTOR_INTERNAL_ERROR, "Executor internal err
// grant
TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_EXPIRED, "License expired")
-TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_DNODE_LIMITED, "DNode creation limited by license")
-TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_ACCT_LIMITED, "Account creation limited by license")
-TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_TIMESERIES_LIMITED, "Time series limited by license")
-TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_DB_LIMITED, "DB creation limited by license")
-TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_USER_LIMITED, "User creation limited by license")
-TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_CONN_LIMITED, "Conn creation limited by license")
-TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_STREAM_LIMITED, "Stream creation limited by license")
-TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_SPEED_LIMITED, "Write speed limited by license")
-TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_STORAGE_LIMITED, "Storage capacity limited by license")
-TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_QUERYTIME_LIMITED, "Query time limited by license")
-TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_CPU_LIMITED, "CPU cores limited by license")
-TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_STABLE_LIMITED, "STable creation limited by license")
-TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_TABLE_LIMITED, "Table creation limited by license")
+TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_DNODE_LIMITED, "Number of dnodes has reached the licensed upper limit")
+TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_ACCT_LIMITED, "Number of accounts has reached the licensed upper limit")
+TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_TIMESERIES_LIMITED, "Number of time series has reached the licensed upper limit")
+TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_DB_LIMITED, "Number of DBs has reached the licensed upper limit")
+TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_USER_LIMITED, "Number of users has reached the licensed upper limit")
+TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_CONN_LIMITED, "Number of connections has reached the licensed upper limit")
+TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_STREAM_LIMITED, "Number of streams has reached the licensed upper limit")
+TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_SPEED_LIMITED, "Write speed has reached the licensed upper limit")
+TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_STORAGE_LIMITED, "Storage capacity has reached the licensed upper limit")
+TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_SUBSCRIPTION_LIMITED, "Number of subscriptions has reached the licensed upper limit")
+TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_CPU_LIMITED, "Number of CPU cores has reached the licensed upper limit")
+TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_STABLE_LIMITED, "Number of stables has reached the licensed upper limit")
+TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_TABLE_LIMITED, "Number of tables has reached the licensed upper limit")
TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_PAR_IVLD_ACTIVE, "Invalid active code")
TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_PAR_IVLD_KEY, "Invalid key to parse active code")
TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_PAR_DEC_IVLD_KEY, "Invalid key to decode active code")
TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_PAR_DEC_IVLD_KLEN, "Invalid klen to decode active code")
TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_GEN_IVLD_KEY, "Invalid key to gen active code")
-TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_GEN_APP_LIMIT, "Limited app num to gen active code")
+TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_GEN_ACTIVE_LEN, "Exceeded active len to gen active code")
TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_GEN_ENC_IVLD_KLEN, "Invalid klen to encode active code")
+TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_PAR_IVLD_DIST, "Invalid dist to parse active code")
+TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_UNLICENSED_CLUSTER, "Illegal operation, the license is being used by an unlicensed cluster")
+TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_LACK_OF_BASIC, "Lack of basic functions in active code")
+TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_OBJ_NOT_EXIST, "Grant object not exist")
+TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_LAST_ACTIVE_NOT_FOUND, "The historial active code does not match")
+TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_MACHINES_MISMATCH, "Cluster machines mismatch with active code")
+TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_OPT_EXPIRE_TOO_LARGE, "Expire time of optional grant item is too large")
+TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_DUPLICATED_ACTIVE, "The active code can't be activated repeatedly")
+TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_VIEW_LIMITED, "Number of view has reached the licensed upper limit")
+TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_CSV_LIMITED, "Csv has reached the licensed upper limit")
+TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_AUDIT_LIMITED, "Audit has reached the licensed upper limit")
// sync
TAOS_DEFINE_ERROR(TSDB_CODE_SYN_TIMEOUT, "Sync timeout")
@@ -594,7 +606,7 @@ TAOS_DEFINE_ERROR(TSDB_CODE_PAR_WINDOW_NOT_ALLOWED_FUNC, "Window not allowed"
TAOS_DEFINE_ERROR(TSDB_CODE_PAR_STREAM_NOT_ALLOWED_FUNC, "Stream not allowed")
TAOS_DEFINE_ERROR(TSDB_CODE_PAR_GROUP_BY_NOT_ALLOWED_FUNC, "Group by not allowd")
TAOS_DEFINE_ERROR(TSDB_CODE_PAR_INVALID_INTERP_CLAUSE, "Invalid interp clause")
-TAOS_DEFINE_ERROR(TSDB_CODE_PAR_NO_VALID_FUNC_IN_WIN, "Not valid function ion window")
+TAOS_DEFINE_ERROR(TSDB_CODE_PAR_NO_VALID_FUNC_IN_WIN, "Not valid function in window")
TAOS_DEFINE_ERROR(TSDB_CODE_PAR_ONLY_SUPPORT_SINGLE_TABLE, "Only support single table")
TAOS_DEFINE_ERROR(TSDB_CODE_PAR_INVALID_SMA_INDEX, "Invalid sma index")
TAOS_DEFINE_ERROR(TSDB_CODE_PAR_INVALID_SELECTED_EXPR, "Invalid SELECTed expression")
diff --git a/source/util/src/tqueue.c b/source/util/src/tqueue.c
index 1dfdd637b6..2cc13be6ba 100644
--- a/source/util/src/tqueue.c
+++ b/source/util/src/tqueue.c
@@ -159,6 +159,7 @@ void taosFreeQitem(void *pItem) {
int32_t taosWriteQitem(STaosQueue *queue, void *pItem) {
int32_t code = 0;
STaosQnode *pNode = (STaosQnode *)(((char *)pItem) - sizeof(STaosQnode));
+ pNode->timestamp = taosGetTimestampUs();
pNode->next = NULL;
taosThreadMutexLock(&queue->mutex);
@@ -464,6 +465,7 @@ int32_t taosReadAllQitemsFromQset(STaosQset *qset, STaosQall *qall, SQueueInfo *
qinfo->ahandle = queue->ahandle;
qinfo->fp = queue->itemsFp;
qinfo->queue = queue;
+ qinfo->timestamp = queue->head->timestamp;
queue->head = NULL;
queue->tail = NULL;
@@ -489,8 +491,8 @@ int32_t taosReadAllQitemsFromQset(STaosQset *qset, STaosQall *qall, SQueueInfo *
int32_t taosQallItemSize(STaosQall *qall) { return qall->numOfItems; }
int64_t taosQallMemSize(STaosQall *qall) { return qall->memOfItems; }
-int64_t taosQallUnAccessedItemSize(STaosQall *qall) {return qall->unAccessedNumOfItems;}
-int64_t taosQallUnAccessedMemSize(STaosQall *qall) {return qall->unAccessMemOfItems;}
+int64_t taosQallUnAccessedItemSize(STaosQall *qall) { return qall->unAccessedNumOfItems; }
+int64_t taosQallUnAccessedMemSize(STaosQall *qall) { return qall->unAccessMemOfItems; }
void taosResetQitems(STaosQall *qall) { qall->current = qall->start; }
int32_t taosGetQueueNumber(STaosQset *qset) { return qset->numOfQueues; }
diff --git a/source/util/src/tworker.c b/source/util/src/tworker.c
index 57dc60e539..3e591c7d7f 100644
--- a/source/util/src/tworker.c
+++ b/source/util/src/tworker.c
@@ -15,10 +15,12 @@
#define _DEFAULT_SOURCE
#include "tworker.h"
-#include "tgeosctx.h"
#include "taoserror.h"
+#include "tgeosctx.h"
#include "tlog.h"
+#define QUEUE_THRESHOLD 1000 * 1000
+
typedef void *(*ThreadFp)(void *param);
int32_t tQWorkerInit(SQWorkerPool *pool) {
@@ -84,6 +86,13 @@ static void *tQWorkerThreadFp(SQueueWorker *worker) {
break;
}
+ if (qinfo.timestamp != 0) {
+ int64_t cost = taosGetTimestampUs() - qinfo.timestamp;
+ if (cost > QUEUE_THRESHOLD) {
+ uWarn("worker:%s,message has been queued for too long, cost: %" PRId64 "s", pool->name, cost / QUEUE_THRESHOLD);
+ }
+ }
+
if (qinfo.fp != NULL) {
qinfo.workerId = worker->id;
qinfo.threadNum = pool->num;
@@ -198,6 +207,13 @@ static void *tAutoQWorkerThreadFp(SQueueWorker *worker) {
break;
}
+ if (qinfo.timestamp != 0) {
+ int64_t cost = taosGetTimestampUs() - qinfo.timestamp;
+ if (cost > QUEUE_THRESHOLD) {
+ uWarn("worker:%s,message has been queued for too long, cost: %" PRId64 "s", pool->name, cost / QUEUE_THRESHOLD);
+ }
+ }
+
if (qinfo.fp != NULL) {
qinfo.workerId = worker->id;
qinfo.threadNum = taosArrayGetSize(pool->workers);
@@ -221,7 +237,7 @@ STaosQueue *tAutoQWorkerAllocQueue(SAutoQWorkerPool *pool, void *ahandle, FItem
int32_t queueNum = taosGetQueueNumber(pool->qset);
int32_t curWorkerNum = taosArrayGetSize(pool->workers);
int32_t dstWorkerNum = ceilf(queueNum * pool->ratio);
- if (dstWorkerNum < 1) dstWorkerNum = 1;
+ if (dstWorkerNum < 2) dstWorkerNum = 2;
// spawn a thread to process queue
while (curWorkerNum < dstWorkerNum) {
@@ -338,6 +354,13 @@ static void *tWWorkerThreadFp(SWWorker *worker) {
break;
}
+ if (qinfo.timestamp != 0) {
+ int64_t cost = taosGetTimestampUs() - qinfo.timestamp;
+ if (cost > QUEUE_THRESHOLD) {
+ uWarn("worker:%s,message has been queued for too long, cost: %" PRId64 "s", pool->name, cost / QUEUE_THRESHOLD);
+ }
+ }
+
if (qinfo.fp != NULL) {
qinfo.workerId = worker->id;
qinfo.threadNum = pool->num;
diff --git a/tests/army/community/cluster/snapshot.json b/tests/army/community/cluster/snapshot.json
index d4f6f00d37..4855c23260 100644
--- a/tests/army/community/cluster/snapshot.json
+++ b/tests/army/community/cluster/snapshot.json
@@ -35,8 +35,8 @@
"start_timestamp":"now-12d",
"columns": [
{ "type": "bool", "name": "bc"},
- { "type": "float", "name": "fc" },
- { "type": "double", "name": "dc"},
+ { "type": "float", "name": "fc", "min": 100, "max": 100},
+ { "type": "double", "name": "dc", "min": 200, "max": 200},
{ "type": "tinyint", "name": "ti"},
{ "type": "smallint", "name": "si" },
{ "type": "int", "name": "ic" },
diff --git a/tests/army/community/cluster/snapshot.py b/tests/army/community/cluster/snapshot.py
index 5b5457be75..b4c4d3c4c8 100644
--- a/tests/army/community/cluster/snapshot.py
+++ b/tests/army/community/cluster/snapshot.py
@@ -29,7 +29,11 @@ from frame import *
class TDTestCase(TBase):
updatecfgDict = {
- "countAlwaysReturnValue" : "0"
+ "countAlwaysReturnValue" : "0",
+ "lossyColumns" : "float,double",
+ "fPrecision" : "0.000000001",
+ "dPrecision" : "0.00000000000000001",
+ "ifAdtFse" : "1"
}
def insertData(self):
@@ -48,6 +52,18 @@ class TDTestCase(TBase):
sql = f"create table {self.db}.ta(ts timestamp, age int) tags(area int)"
tdSql.execute(sql)
+ def checkFloatDouble(self):
+ sql = f"select * from {self.db}.{self.stb} where fc!=100"
+ tdSql.query(sql)
+ tdSql.checkRows(0)
+ sql = f"select count(*) from {self.db}.{self.stb} where dc!=200"
+ tdSql.query(sql)
+ tdSql.checkRows(0)
+ sql = f"select avg(fc) from {self.db}.{self.stb}"
+ tdSql.checkFirstValue(sql, 100)
+ sql = f"select avg(dc) from {self.db}.{self.stb}"
+ tdSql.checkFirstValue(sql, 200)
+
def doAction(self):
tdLog.info(f"do action.")
self.flushDb()
@@ -85,6 +101,9 @@ class TDTestCase(TBase):
# check insert data correct
self.checkInsertCorrect()
+ # check float double value ok
+ self.checkFloatDouble()
+
# save
self.snapshotAgg()
@@ -97,6 +116,10 @@ class TDTestCase(TBase):
# check insert correct again
self.checkInsertCorrect()
+ # check float double value ok
+ self.checkFloatDouble()
+
+
tdLog.success(f"{__file__} successfully executed")
diff --git a/tests/army/community/storage/oneStageComp.json b/tests/army/community/storage/oneStageComp.json
new file mode 100644
index 0000000000..f64fda3824
--- /dev/null
+++ b/tests/army/community/storage/oneStageComp.json
@@ -0,0 +1,66 @@
+{
+ "filetype": "insert",
+ "cfgdir": "/etc/taos",
+ "host": "127.0.0.1",
+ "port": 6030,
+ "user": "root",
+ "password": "taosdata",
+ "connection_pool_size": 8,
+ "num_of_records_per_req": 3000,
+ "prepared_rand": 3000,
+ "thread_count": 2,
+ "create_table_thread_count": 1,
+ "confirm_parameter_prompt": "no",
+ "databases": [
+ {
+ "dbinfo": {
+ "name": "db",
+ "drop": "yes",
+ "vgroups": 2,
+ "replica": 3,
+ "wal_retention_period": 10,
+ "wal_retention_size": 100,
+ "keep": "60d,120d,365d",
+ "stt_trigger": 1,
+ "wal_level": 2,
+ "WAL_FSYNC_PERIOD": 3300,
+ "cachemodel": "'last_value'",
+ "TABLE_PREFIX":1,
+ "comp": 1
+ },
+ "super_tables": [
+ {
+ "name": "stb",
+ "child_table_exists": "no",
+ "childtable_count": 10,
+ "insert_rows": 100000,
+ "childtable_prefix": "d",
+ "insert_mode": "taosc",
+ "timestamp_step": 1000,
+ "start_timestamp":"now-360d",
+ "columns": [
+ { "type": "bool", "name": "bc","max": 1,"min": 1},
+ { "type": "float", "name": "fc" ,"max": 101,"min": 101},
+ { "type": "double", "name": "dc" ,"max": 102,"min": 102},
+ { "type": "tinyint", "name": "ti" ,"max": 103,"min": 103},
+ { "type": "smallint", "name": "si" ,"max": 104,"min": 104},
+ { "type": "int", "name": "ic" ,"max": 105,"min": 105},
+ { "type": "bigint", "name": "bi" ,"max": 106,"min": 106},
+ { "type": "utinyint", "name": "uti","max": 107,"min": 107},
+ { "type": "usmallint", "name": "usi","max": 108,"min": 108},
+ { "type": "uint", "name": "ui" ,"max": 109,"min": 109},
+ { "type": "ubigint", "name": "ubi","max": 110,"min": 110},
+ { "type": "binary", "name": "bin", "len": 16},
+ { "type": "nchar", "name": "nch", "len": 32}
+ ],
+ "tags": [
+ {"type": "tinyint", "name": "groupid","max": 100,"min": 100},
+ {"name": "location","type": "binary", "len": 16, "values":
+ ["San Francisco", "Los Angles", "San Diego", "San Jose", "Palo Alto", "Campbell", "Mountain View","Sunnyvale", "Santa Clara", "Cupertino"]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+}
diff --git a/tests/army/community/storage/oneStageComp.py b/tests/army/community/storage/oneStageComp.py
new file mode 100644
index 0000000000..9a2c7cfcd6
--- /dev/null
+++ b/tests/army/community/storage/oneStageComp.py
@@ -0,0 +1,140 @@
+###################################################################
+# Copyright (c) 2016 by TAOS Technologies, Inc.
+# All rights reserved.
+#
+# This file is proprietary and confidential to TAOS Technologies.
+# No part of this file may be reproduced, stored, transmitted,
+# disclosed or used in any form or by any means other than as
+# expressly provided by the written permission from Jianhui Tao
+#
+###################################################################
+
+# -*- coding: utf-8 -*-
+
+import sys
+import time
+import random
+
+import taos
+import frame
+import frame.etool
+
+
+from frame.log import *
+from frame.cases import *
+from frame.sql import *
+from frame.caseBase import *
+from frame import *
+
+
+class TDTestCase(TBase):
+ updatecfgDict = {
+ "compressMsgSize" : "100",
+ }
+
+ def insertData(self):
+ tdLog.info(f"insert data.")
+ # taosBenchmark run
+ jfile = etool.curFile(__file__, "oneStageComp.json")
+ etool.benchMark(json=jfile)
+
+ tdSql.execute(f"use {self.db}")
+ # set insert data information
+ self.childtable_count = 10
+ self.insert_rows = 100000
+ self.timestamp_step = 1000
+
+
+
+ def checkColValueCorrect(self):
+ tdLog.info(f"do action.")
+ self.flushDb()
+
+ # check all columns correct
+ cnt = self.insert_rows * self.childtable_count
+ sql = "select * from stb where bc!=1"
+ tdSql.query(sql)
+ tdSql.checkRows(0)
+ sql = "select * from stb where fc=101"
+ tdSql.query(sql)
+ tdSql.checkRows(cnt)
+ sql = "select * from stb where dc!=102"
+ tdSql.query(sql)
+ tdSql.checkRows(0)
+ sql = "select * from stb where ti!=103"
+ tdSql.query(sql)
+ tdSql.checkRows(0)
+ sql = "select * from stb where si!=104"
+ tdSql.query(sql)
+ tdSql.checkRows(0)
+ sql = "select * from stb where ic!=105"
+ tdSql.query(sql)
+ tdSql.checkRows(0)
+ sql = "select * from stb where bi!=106"
+ tdSql.query(sql)
+ tdSql.checkRows(0)
+ sql = "select * from stb where uti!=107"
+ tdSql.query(sql)
+ tdSql.checkRows(0)
+ sql = "select * from stb where usi!=108"
+ tdSql.query(sql)
+ tdSql.checkRows(0)
+ sql = "select * from stb where ui!=109"
+ tdSql.query(sql)
+ tdSql.checkRows(0)
+ sql = "select * from stb where ubi!=110"
+ tdSql.query(sql)
+ tdSql.checkRows(0)
+
+ def insertNull(self):
+ # insert 6 lines
+ sql = "insert into d0(ts) values(now) (now + 1s) (now + 2s) (now + 3s) (now + 4s) (now + 5s)"
+ tdSql.execute(sql)
+
+ self.flushDb()
+ self.trimDb()
+
+ # check all columns correct
+ cnt = self.insert_rows * self.childtable_count
+ sql = "select * from stb where bc!=1"
+ tdSql.query(sql)
+ tdSql.checkRows(0)
+ sql = "select * from stb where bc is null"
+ tdSql.query(sql)
+ tdSql.checkRows(6)
+ sql = "select * from stb where bc=1"
+ tdSql.query(sql)
+ tdSql.checkRows(cnt)
+ sql = "select * from stb where usi is null"
+ tdSql.query(sql)
+ tdSql.checkRows(6)
+
+ # run
+ def run(self):
+ tdLog.debug(f"start to excute {__file__}")
+
+ # insert data
+ self.insertData()
+
+ # check insert data correct
+ self.checkInsertCorrect()
+
+ # save
+ self.snapshotAgg()
+
+ # do action
+ self.checkColValueCorrect()
+
+ # check save agg result correct
+ self.checkAggCorrect()
+
+ # insert null
+ self.insertNull()
+
+
+ tdLog.success(f"{__file__} successfully executed")
+
+
+
+tdCases.addLinux(__file__, TDTestCase())
+tdCases.addWindows(__file__, TDTestCase())
diff --git a/tests/army/enterprise/s3/s3_basic.py b/tests/army/enterprise/s3/s3_basic.py
index a1a945a304..e7bc188ca5 100644
--- a/tests/army/enterprise/s3/s3_basic.py
+++ b/tests/army/enterprise/s3/s3_basic.py
@@ -128,7 +128,7 @@ class TDTestCase(TBase):
self.checkInsertCorrect()
# check stream correct and drop stream
- # self.checkStreamCorrect()
+ #self.checkStreamCorrect()
# drop stream
self.dropStream(self.sname)
diff --git a/tests/develop-test/2-query/table_count_scan.py b/tests/develop-test/2-query/table_count_scan.py
index 40d2e2a887..09b34a97d0 100644
--- a/tests/develop-test/2-query/table_count_scan.py
+++ b/tests/develop-test/2-query/table_count_scan.py
@@ -65,7 +65,7 @@ class TDTestCase:
tdSql.query('select count(*),db_name, stable_name from information_schema.ins_tables group by db_name, stable_name;')
tdSql.checkRows(3)
- tdSql.checkData(0, 0, 26)
+ tdSql.checkData(0, 0, 29)
tdSql.checkData(0, 1, 'information_schema')
tdSql.checkData(0, 2, None)
tdSql.checkData(1, 0, 3)
@@ -77,7 +77,7 @@ class TDTestCase:
tdSql.query('select count(1) v,db_name, stable_name from information_schema.ins_tables group by db_name, stable_name order by v desc;')
tdSql.checkRows(3)
- tdSql.checkData(0, 0, 26)
+ tdSql.checkData(0, 0, 29)
tdSql.checkData(0, 1, 'information_schema')
tdSql.checkData(0, 2, None)
tdSql.checkData(1, 0, 5)
@@ -93,7 +93,7 @@ class TDTestCase:
tdSql.checkData(1, 1, 'performance_schema')
tdSql.checkData(0, 0, 3)
tdSql.checkData(0, 1, 'tbl_count')
- tdSql.checkData(2, 0, 26)
+ tdSql.checkData(2, 0, 29)
tdSql.checkData(2, 1, 'information_schema')
tdSql.query("select count(*) from information_schema.ins_tables where db_name='tbl_count'")
@@ -106,7 +106,7 @@ class TDTestCase:
tdSql.query('select count(*) from information_schema.ins_tables')
tdSql.checkRows(1)
- tdSql.checkData(0, 0, 34)
+ tdSql.checkData(0, 0, 37)
tdSql.execute('create table stba (ts timestamp, c1 bool, c2 tinyint, c3 smallint, c4 int, c5 bigint, c6 float, c7 double, c8 binary(10), c9 nchar(10), c10 tinyint unsigned, c11 smallint unsigned, c12 int unsigned, c13 bigint unsigned) TAGS(t1 int, t2 binary(10), t3 double);')
@@ -189,7 +189,7 @@ class TDTestCase:
tdSql.checkData(2, 0, 5)
tdSql.checkData(2, 1, 'performance_schema')
tdSql.checkData(2, 2, None)
- tdSql.checkData(3, 0, 26)
+ tdSql.checkData(3, 0, 29)
tdSql.checkData(3, 1, 'information_schema')
tdSql.checkData(3, 2, None)
@@ -204,7 +204,7 @@ class TDTestCase:
tdSql.checkData(2, 0, 5)
tdSql.checkData(2, 1, 'performance_schema')
tdSql.checkData(2, 2, None)
- tdSql.checkData(3, 0, 26)
+ tdSql.checkData(3, 0, 29)
tdSql.checkData(3, 1, 'information_schema')
tdSql.checkData(3, 2, None)
@@ -215,7 +215,7 @@ class TDTestCase:
tdSql.checkData(0, 1, 'tbl_count')
tdSql.checkData(1, 0, 5)
tdSql.checkData(1, 1, 'performance_schema')
- tdSql.checkData(2, 0, 26)
+ tdSql.checkData(2, 0, 29)
tdSql.checkData(2, 1, 'information_schema')
tdSql.query("select count(*) from information_schema.ins_tables where db_name='tbl_count'")
@@ -228,7 +228,7 @@ class TDTestCase:
tdSql.query('select count(*) from information_schema.ins_tables')
tdSql.checkRows(1)
- tdSql.checkData(0, 0, 35)
+ tdSql.checkData(0, 0, 38)
tdSql.execute('drop database tbl_count')
diff --git a/tests/parallel_test/cases.task b/tests/parallel_test/cases.task
index d932529d0a..9ea03b4e6b 100644
--- a/tests/parallel_test/cases.task
+++ b/tests/parallel_test/cases.task
@@ -23,7 +23,7 @@ fi
,,y,army,./pytest.sh python3 ./test.py -f community/query/query_basic.py -N 3
,,y,army,./pytest.sh python3 ./test.py -f community/cluster/splitVgroupByLearner.py -N 3
,,n,army,python3 ./test.py -f community/cmdline/fullopt.py
-
+,,y,army,./pytest.sh python3 ./test.py -f community/storage/oneStageComp.py -N 3 -L 3 -D 1
#
@@ -230,6 +230,7 @@ fi
,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqSubscribeStb-r3.py -N 5
,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmq3mnodeSwitch.py -N 6 -M 3 -i True
,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmq3mnodeSwitch.py -N 6 -M 3 -n 3 -i True
+,,y,system-test,./pytest.sh python3 test.py -f 7-tmq/tmqVnodeTransform.py -N 2 -n 1
,,y,system-test,./pytest.sh python3 test.py -f 7-tmq/tmqVnodeTransform-stb.py -N 2 -n 1
,,y,system-test,./pytest.sh python3 test.py -f 7-tmq/tmqVnodeTransform-stb.py -N 6 -n 3
#,,y,system-test,./pytest.sh python3 test.py -f 7-tmq/tmqVnodeTransform-db.py -N 6 -n 3
@@ -292,6 +293,7 @@ fi
,,n,system-test,python3 ./test.py -f 0-others/timeRangeWise.py -N 3
,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/delete_check.py
,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/test_hot_refresh_configurations.py
+,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/subscribe_stream_privilege.py
,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/insert_double.py
,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/alter_database.py
diff --git a/tests/script/tsim/query/join_order.sim b/tests/script/tsim/query/join_order.sim
index bd772ff407..534ab5d631 100644
--- a/tests/script/tsim/query/join_order.sim
+++ b/tests/script/tsim/query/join_order.sim
@@ -47,5 +47,90 @@ sql select a.*,b.* from (select * from tba1 order by ts desc) a, (select * from
if $rows != 4 then
return -1
endi
+sql select a.*,b.* from (select * from tba1 order by ts desc) a, (select * from tba1 order by ts) b where a.ts=b.ts order by a.ts;
+if $rows != 4 then
+ return -1
+endi
+if $data00 != @23-11-17 16:29:00.000@ then
+ return -1
+endi
+sql select a.*,b.* from (select * from tba1 order by ts desc) a, (select * from tba1 order by ts) b where a.ts=b.ts order by a.ts desc;
+if $rows != 4 then
+ return -1
+endi
+if $data00 != @23-11-17 16:29:04.000@ then
+ return -1
+endi
+sql select a.*,b.* from (select * from tba1 order by ts) a, (select * from tba1 order by ts) b where a.ts=b.ts order by a.ts;
+if $rows != 4 then
+ return -1
+endi
+if $data00 != @23-11-17 16:29:00.000@ then
+ return -1
+endi
+sql select a.*,b.* from (select * from tba1 order by ts) a, (select * from tba1 order by ts) b where a.ts=b.ts order by a.ts desc;
+if $rows != 4 then
+ return -1
+endi
+if $data00 != @23-11-17 16:29:04.000@ then
+ return -1
+endi
+sql select a.*,b.* from (select * from tba1 order by ts limit 2) a, (select * from tba1 order by ts desc limit 2) b where a.ts=b.ts order by a.ts desc;
+if $rows != 0 then
+ return -1
+endi
+sql select a.*,b.* from (select * from tba1 order by ts limit 3) a, (select * from tba1 order by ts desc limit 3) b where a.ts=b.ts order by a.ts desc;
+if $rows != 2 then
+ return -1
+endi
+if $data00 != @23-11-17 16:29:03.000@ then
+ return -1
+endi
+
+sql select a.*,b.* from (select * from tba1 order by ts limit 3) a, (select * from tba1 order by ts desc limit 3) b where a.ts=b.ts order by a.ts;
+if $rows != 2 then
+ return -1
+endi
+if $data00 != @23-11-17 16:29:02.000@ then
+ return -1
+endi
+
+sql select a.*,b.* from tba1 a, (select * from tba1 order by ts desc limit 3) b where a.ts=b.ts order by a.ts;
+if $rows != 3 then
+ return -1
+endi
+if $data00 != @23-11-17 16:29:02.000@ then
+ return -1
+endi
+sql select a.*,b.* from tba1 a, (select * from tba1 order by ts limit 3) b where a.ts=b.ts order by a.ts desc limit 2;
+if $rows != 2 then
+ return -1
+endi
+if $data00 != @23-11-17 16:29:03.000@ then
+ return -1
+endi
+
+sql select a.*,b.* from (select * from tba1 order by ts limit 3) a, tba1 b where a.ts=b.ts order by a.ts desc;
+if $rows != 3 then
+ return -1
+endi
+if $data00 != @23-11-17 16:29:03.000@ then
+ return -1
+endi
+sql select a.*,b.* from (select * from tba1 order by ts desc limit 3) a, tba1 b where a.ts=b.ts order by a.ts desc;
+if $rows != 3 then
+ return -1
+endi
+if $data00 != @23-11-17 16:29:04.000@ then
+ return -1
+endi
+
+sql select a.*,b.* from (select * from tba1 order by ts desc limit 3) a, tba1 b where a.ts=b.ts order by a.ts;
+if $rows != 3 then
+ return -1
+endi
+if $data00 != @23-11-17 16:29:02.000@ then
+ return -1
+endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT
diff --git a/tests/script/tsim/query/sys_tbname.sim b/tests/script/tsim/query/sys_tbname.sim
index 8bf0fb4700..9069ad949c 100644
--- a/tests/script/tsim/query/sys_tbname.sim
+++ b/tests/script/tsim/query/sys_tbname.sim
@@ -58,7 +58,7 @@ endi
sql select tbname from information_schema.ins_tables;
print $rows $data00
-if $rows != 35 then
+if $rows != 38 then
return -1
endi
if $data00 != @ins_tables@ then
diff --git a/tests/script/tsim/query/tableCount.sim b/tests/script/tsim/query/tableCount.sim
index 315a39e56d..573e134133 100644
--- a/tests/script/tsim/query/tableCount.sim
+++ b/tests/script/tsim/query/tableCount.sim
@@ -53,7 +53,7 @@ sql select stable_name,count(table_name) from information_schema.ins_tables grou
if $rows != 3 then
return -1
endi
-if $data01 != 32 then
+if $data01 != 35 then
return -1
endi
if $data11 != 10 then
@@ -72,7 +72,7 @@ endi
if $data11 != 5 then
return -1
endi
-if $data21 != 26 then
+if $data21 != 29 then
return -1
endi
if $data31 != 5 then
@@ -97,7 +97,7 @@ endi
if $data42 != 3 then
return -1
endi
-if $data52 != 26 then
+if $data52 != 29 then
return -1
endi
if $data62 != 5 then
diff --git a/tests/system-test/0-others/information_schema.py b/tests/system-test/0-others/information_schema.py
index 20305bf4c1..79d010cd7d 100644
--- a/tests/system-test/0-others/information_schema.py
+++ b/tests/system-test/0-others/information_schema.py
@@ -58,7 +58,7 @@ class TDTestCase:
self.ins_list = ['ins_dnodes','ins_mnodes','ins_qnodes','ins_snodes','ins_cluster','ins_databases','ins_functions',\
'ins_indexes','ins_stables','ins_tables','ins_tags','ins_columns','ins_users','ins_grants','ins_vgroups','ins_configs','ins_dnode_variables',\
'ins_topics','ins_subscriptions','ins_streams','ins_stream_tasks','ins_vnodes','ins_user_privileges','ins_views',
- 'ins_compacts', 'ins_compact_details']
+ 'ins_compacts', 'ins_compact_details', 'ins_grants_full','ins_grants_logs', 'ins_machines']
self.perf_list = ['perf_connections','perf_queries','perf_consumers','perf_trans','perf_apps']
def insert_data(self,column_dict,tbname,row_num):
insert_sql = self.setsql.set_insertsql(column_dict,tbname,self.binary_str,self.nchar_str)
@@ -218,7 +218,7 @@ class TDTestCase:
tdSql.checkEqual(20470,len(tdSql.queryResult))
tdSql.query("select * from information_schema.ins_columns where db_name ='information_schema'")
- tdSql.checkEqual(219, len(tdSql.queryResult))
+ tdSql.checkEqual(True, len(tdSql.queryResult) in range(215, 230))
tdSql.query("select * from information_schema.ins_columns where db_name ='performance_schema'")
tdSql.checkEqual(54, len(tdSql.queryResult))
@@ -229,8 +229,7 @@ class TDTestCase:
tdSql.query(f'select * from information_schema.ins_dnodes')
result = tdSql.queryResult
tdSql.checkEqual(result[0][0],1)
- tdSql.checkEqual(result[0][8],"")
- tdSql.checkEqual(result[0][9],"")
+ tdSql.checkEqual(True, len(result[0][8]) in (0,24))
self.str107 = 'Hc7VCc+'
for t in range (10):
self.str107 += 'tP+2soIXpP'
@@ -247,11 +246,9 @@ class TDTestCase:
tdSql.error('alter dnode 1 "activeCode" "' + self.str109 + '"')
tdSql.error('alter all dnodes "activeCode" "' + self.str510 + '"')
tdSql.query(f'select * from information_schema.ins_dnodes')
- tdSql.checkEqual(tdSql.queryResult[0][8],"")
- tdSql.execute('alter dnode 1 "activeCode" ""')
- tdSql.query(f'select active_code,c_active_code from information_schema.ins_dnodes')
- tdSql.checkEqual(tdSql.queryResult[0][0],"")
- tdSql.checkEqual(tdSql.queryResult[0][1],'')
+ tdSql.checkEqual(True, len(result[0][8]) in (0,24))
+ tdSql.error('alter dnode 1 "activeCode" ""')
+ tdSql.error(f'select active_code,c_active_code from information_schema.ins_dnodes')
tdSql.error('alter dnode 1 "cActiveCode" "a"')
tdSql.error('alter dnode 1 "cActiveCode" "' + self.str107 + '"')
tdSql.error('alter dnode 1 "cActiveCode" "' + self.str256 + '"')
@@ -260,15 +257,11 @@ class TDTestCase:
tdSql.error('alter all dnodes "cActiveCode" "' + self.str257 + '"')
tdSql.error('alter all dnodes "cActiveCode" "' + self.str254 + '"')
tdSql.error('alter dnode 1 "cActiveCode" "' + self.str510 + '"')
- tdSql.query(f'select active_code,c_active_code from information_schema.ins_dnodes')
- tdSql.checkEqual(tdSql.queryResult[0][0],"")
- tdSql.checkEqual(tdSql.queryResult[0][1],"")
+ tdSql.error(f'select active_code,c_active_code from information_schema.ins_dnodes')
tdSql.error('alter dnode 1 "cActiveCode" "' + self.str109 + '"')
tdSql.query(f'show dnodes')
- tdSql.checkEqual(tdSql.queryResult[0][9],"")
- tdSql.execute('alter all dnodes "cActiveCode" ""')
- tdSql.query(f'select c_active_code from information_schema.ins_dnodes')
- tdSql.checkEqual(tdSql.queryResult[0][0],'')
+ tdSql.error(f'select c_active_code from information_schema.ins_dnodes')
+ tdSql.error('alter all dnodes "cActiveCode" ""')
def run(self):
self.prepare_data()
diff --git a/tests/system-test/0-others/subscribe_stream_privilege.py b/tests/system-test/0-others/subscribe_stream_privilege.py
new file mode 100644
index 0000000000..b477af9f57
--- /dev/null
+++ b/tests/system-test/0-others/subscribe_stream_privilege.py
@@ -0,0 +1,184 @@
+###################################################################
+# Copyright (c) 2016 by TAOS Technologies, Inc.
+# All rights reserved.
+#
+# This file is proprietary and confidential to TAOS Technologies.
+# No part of this file may be reproduced, stored, transmitted,
+# disclosed or used in any form or by any means other than as
+# expressly provided by the written permission from Jianhui Tao
+#
+###################################################################
+
+# -*- coding: utf-8 -*-
+import time
+
+import taos
+from taos.tmq import *
+from util.cases import *
+from util.common import *
+from util.log import *
+from util.sql import *
+from util.sqlset import *
+
+
+class TDTestCase:
+ clientCfgDict = {'debugFlag': 135}
+ updatecfgDict = {'debugFlag': 143, 'clientCfg':clientCfgDict}
+ def init(self, conn, logSql, replicaVar=1):
+ self.replicaVar = int(replicaVar)
+ tdLog.debug("start to execute %s" % __file__)
+ tdSql.init(conn.cursor())
+ self.setsql = TDSetSql()
+ self.stbname = 'stb'
+ self.user_name = 'test'
+ self.binary_length = 20 # the length of binary for column_dict
+ self.nchar_length = 20 # the length of nchar for column_dict
+ self.dbnames = ['db1']
+ self.column_dict = {
+ 'ts': 'timestamp',
+ 'col1': 'float',
+ 'col2': 'int',
+ 'col3': 'float',
+ }
+
+ self.tag_dict = {
+ 't1': 'int',
+ 't2': f'binary({self.binary_length})'
+ }
+
+ self.tag_list = [
+ f'1, "Beijing"',
+ f'2, "Shanghai"',
+ f'3, "Guangzhou"',
+ f'4, "Shenzhen"'
+ ]
+
+ self.values_list = [
+ f'now, 9.1, 200, 0.3'
+ ]
+
+ self.tbnum = 4
+ self.topic_name = 'topic1'
+
+
+ def prepare_data(self):
+ for db in self.dbnames:
+ tdSql.execute(f"create database {db} vgroups 1")
+ tdSql.execute(f"use {db}")
+ tdSql.execute(self.setsql.set_create_stable_sql(self.stbname, self.column_dict, self.tag_dict))
+ for i in range(self.tbnum):
+ tdSql.execute(f'create table {self.stbname}_{i} using {self.stbname} tags({self.tag_list[i]})')
+ for j in self.values_list:
+ tdSql.execute(f'insert into {self.stbname}_{i} values({j})')
+
+ def checkUserPrivileges(self, rowCnt):
+ tdSql.query("show user privileges")
+ tdSql.checkRows(rowCnt)
+
+ def streamTest(self):
+ tdSql.execute("create stream s1 trigger at_once fill_history 1 into so1 as select ts,abs(col2) from stb partition by tbname")
+ time.sleep(2)
+ tdSql.query("select * from so1")
+ tdSql.checkRows(4)
+ tdSql.execute("insert into stb_0(ts,col2) values(now, 332)")
+ time.sleep(2)
+ tdSql.query("select * from so1")
+ tdSql.checkRows(5)
+
+ time.sleep(2)
+ tdSql.query("select * from information_schema.ins_stream_tasks")
+ tdSql.checkData(0, 5, 'ready')
+
+ print(time.time())
+ while 1:
+ t = time.time()
+ if t > 1706254434 :
+ break
+ else:
+ print("time:%d" %(t))
+ time.sleep(1)
+
+
+ tdSql.error("create stream s11 trigger at_once fill_history 1 into so1 as select ts,abs(col2) from stb partition by tbname")
+
+ time.sleep(10)
+ tdSql.query("select * from information_schema.ins_stream_tasks")
+ tdSql.checkData(0, 5, 'paused')
+ tdSql.execute("insert into stb_0(ts,col2) values(now, 3232)")
+ tdSql.query("select * from so1")
+ tdSql.checkRows(5)
+
+ tdSql.error("resume stream s1")
+
+ def consumeTest(self):
+ consumer_dict = {
+ "group.id": "g1",
+ "td.connect.user": self.user_name,
+ "td.connect.pass": "test",
+ "auto.offset.reset": "earliest"
+ }
+ consumer = Consumer(consumer_dict)
+
+ tdLog.debug("test subscribe topic created by other user")
+ exceptOccured = False
+ try:
+ consumer.subscribe([self.topic_name])
+ except TmqError:
+ exceptOccured = True
+
+ if not exceptOccured:
+ tdLog.exit(f"has no privilege, should except")
+
+ self.checkUserPrivileges(1)
+ tdLog.debug("test subscribe topic privilege granted by other user")
+ tdSql.execute(f'grant subscribe on {self.topic_name} to {self.user_name}')
+ self.checkUserPrivileges(2)
+
+ exceptOccured = False
+ try:
+ consumer.subscribe([self.topic_name])
+ except TmqError:
+ exceptOccured = True
+
+ if exceptOccured:
+ tdLog.exit(f"has privilege, should not except")
+
+ cnt = 0
+ try:
+ while True:
+ res = consumer.poll(1)
+ cnt += 1
+ if cnt == 1:
+ if not res:
+ tdLog.exit(f"grant privilege, should get res")
+ elif cnt == 2:
+ if res:
+ tdLog.exit(f"revoke privilege, should get NULL")
+ else:
+ break
+
+ tdLog.debug("test subscribe topic privilege revoked by other user")
+ tdSql.execute(f'revoke subscribe on {self.topic_name} from {self.user_name}')
+ self.checkUserPrivileges(1)
+ time.sleep(5)
+
+ finally:
+ consumer.close()
+
+ def create_user(self):
+ tdSql.execute(f'create topic {self.topic_name} as database {self.dbnames[0]}')
+ tdSql.execute(f'create user {self.user_name} pass "test"')
+
+ def run(self):
+ self.prepare_data()
+ self.create_user()
+ self.consumeTest()
+ # self.streamTest()
+
+ def stop(self):
+ tdSql.close()
+ tdLog.success("%s successfully executed" % __file__)
+
+
+tdCases.addWindows(__file__, TDTestCase())
+tdCases.addLinux(__file__, TDTestCase())
\ No newline at end of file
diff --git a/tests/system-test/7-tmq/tmqDropConsumer.py b/tests/system-test/7-tmq/tmqDropConsumer.py
index 5208d14069..953e9314f1 100644
--- a/tests/system-test/7-tmq/tmqDropConsumer.py
+++ b/tests/system-test/7-tmq/tmqDropConsumer.py
@@ -12,7 +12,8 @@ sys.path.append("./7-tmq")
from tmqCommon import *
class TDTestCase:
- # updatecfgDict = {'debugFlag': 135}
+ clientCfgDict = {'debugFlag': 135}
+ updatecfgDict = {'debugFlag': 135, 'clientCfg':clientCfgDict}
def __init__(self):
self.vgroups = 2
diff --git a/tests/system-test/7-tmq/tmqParamsTest.py b/tests/system-test/7-tmq/tmqParamsTest.py
index 0e9e8f989f..9286b69278 100644
--- a/tests/system-test/7-tmq/tmqParamsTest.py
+++ b/tests/system-test/7-tmq/tmqParamsTest.py
@@ -11,7 +11,9 @@ sys.path.append("./7-tmq")
from tmqCommon import *
class TDTestCase:
- updatecfgDict = {'debugFlag': 135}
+ clientCfgDict = {'debugFlag': 135}
+ updatecfgDict = {'debugFlag': 135, 'clientCfg':clientCfgDict}
+
def init(self, conn, logSql, replicaVar=1):
self.replicaVar = int(replicaVar)
tdLog.debug(f"start to excute {__file__}")
diff --git a/tests/system-test/7-tmq/tmqVnodeTransform.py b/tests/system-test/7-tmq/tmqVnodeTransform.py
index 811b72c35f..c2b002ead6 100644
--- a/tests/system-test/7-tmq/tmqVnodeTransform.py
+++ b/tests/system-test/7-tmq/tmqVnodeTransform.py
@@ -186,7 +186,7 @@ class TDTestCase:
tmqCom.getStartCommitNotifyFromTmqsim()
#restart dnode & remove wal
- # self.restartAndRemoveWal()
+ self.restartAndRemoveWal()
# redistribute vgroup
self.redistributeVgroups();
@@ -235,7 +235,7 @@ class TDTestCase:
tdSql.execute(sqlString)
tdSql.query("flush database %s"%(paraDict['dbName']))
#restart dnode & remove wal
- # self.restartAndRemoveWal()
+ self.restartAndRemoveWal()
# redistribute vgroup
self.redistributeVgroups();
@@ -313,7 +313,7 @@ class TDTestCase:
time.sleep(5)
#restart dnode & remove wal
- # self.restartAndRemoveWal()
+ self.restartAndRemoveWal()
# redistribute vgroup
self.redistributeVgroups()
diff --git a/utils/TSZ/sz/src/sz_double.c b/utils/TSZ/sz/src/sz_double.c
index 1adfdf3b56..0510fc612d 100644
--- a/utils/TSZ/sz/src/sz_double.c
+++ b/utils/TSZ/sz/src/sz_double.c
@@ -385,9 +385,11 @@ unsigned int optimize_intervals_double_1D_opt(double *oriData, size_t dataLength
totalSampleSize++;
pred_value = data_pos[-1];
pred_err = fabs(pred_value - *data_pos);
- radiusIndex = (unsigned long)((pred_err/realPrecision+1)/2);
- if(radiusIndex>=confparams_cpr->maxRangeRadius)
- radiusIndex = confparams_cpr->maxRangeRadius - 1;
+ double dbri = (unsigned long)((pred_err/realPrecision+1)/2);
+ if(dbri >= (double)confparams_cpr->maxRangeRadius)
+ radiusIndex = confparams_cpr->maxRangeRadius - 1;
+ else
+ radiusIndex = dbri;
intervals[radiusIndex]++;
data_pos += confparams_cpr->sampleDistance;
diff --git a/utils/test/c/varbinary_test.c b/utils/test/c/varbinary_test.c
index 522a820fe8..47bacf629b 100644
--- a/utils/test/c/varbinary_test.c
+++ b/utils/test/c/varbinary_test.c
@@ -85,7 +85,6 @@ void varbinary_sql_test() {
// test insert
pRes = taos_query(taos, "insert into tb2 using stb tags (2, 'tb2_bin1', 093) values (now + 2s, 'nchar1', 892, 0.3)");
- printf("error:%s", taos_errstr(pRes));
ASSERT(taos_errno(pRes) != 0);
pRes = taos_query(taos, "insert into tb3 using stb tags (3, 'tb3_bin1', 0x7f829) values (now + 3s, 'nchar1', 0x7f829, 0.3)");
@@ -322,6 +321,60 @@ void varbinary_sql_test() {
printf("%s result %s\n", __FUNCTION__, taos_errstr(pRes));
taos_free_result(pRes);
+ // test insert string value '\x'
+ pRes = taos_query(taos, "insert into tb5 using stb tags (5, 'tb5_bin1', '\\\\xg') values (now + 4s, 'nchar1', '\\\\xg', 0.3)");
+ taos_free_result(pRes);
+
+ pRes = taos_query(taos, "select c2,t3 from stb where t3 = '\\x5C7867'");
+ while ((row = taos_fetch_row(pRes)) != NULL) {
+ int32_t* length = taos_fetch_lengths(pRes);
+ void* data = NULL;
+ uint32_t size = 0;
+ if(taosAscii2Hex(row[0], length[0], &data, &size) < 0){
+ ASSERT(0);
+ }
+
+ ASSERT(memcmp(data, "\\x5C7867", size) == 0);
+ taosMemoryFree(data);
+
+ if(taosAscii2Hex(row[1], length[1], &data, &size) < 0){
+ ASSERT(0);
+ }
+
+ ASSERT(memcmp(data, "\\x5C7867", size) == 0);
+ taosMemoryFree(data);
+ }
+ taos_free_result(pRes);
+
+ // test insert
+ char tmp [65517*2+3] = {0};
+ tmp[0] = '\\';
+ tmp[1] = 'x';
+ memset(tmp + 2, 48, 65517*2);
+
+ char sql[65517*2+3 + 256] = {0};
+
+ pRes = taos_query(taos, "create stable stb1 (ts timestamp, c2 varbinary(65517)) tags (t1 int, t2 binary(8), t3 varbinary(8))");
+ taos_free_result(pRes);
+
+ sprintf(sql, "insert into tb6 using stb1 tags (6, 'tb6_bin1', '\\\\xg') values (now + 4s, '%s')", tmp);
+ pRes = taos_query(taos, sql);
+ taos_free_result(pRes);
+
+ pRes = taos_query(taos, "select c2 from tb6");
+ while ((row = taos_fetch_row(pRes)) != NULL) {
+ int32_t* length = taos_fetch_lengths(pRes);
+ void* data = NULL;
+ uint32_t size = 0;
+ if(taosAscii2Hex(row[0], length[0], &data, &size) < 0){
+ ASSERT(0);
+ }
+
+ ASSERT(memcmp(data, tmp, size) == 0);
+ taosMemoryFree(data);
+ }
+ taos_free_result(pRes);
+
taos_close(taos);
}