From 05a0774b6d706833356031c498c5cef8779547a7 Mon Sep 17 00:00:00 2001 From: Liu Jicong Date: Fri, 27 May 2022 13:58:58 +0800 Subject: [PATCH 01/56] feat(tmq): add sub type --- include/common/tmsg.h | 25 +++++++++++++++---------- source/common/src/tmsg.c | 22 ++++++++++++++-------- source/dnode/mnode/impl/src/mndTopic.c | 8 ++++---- source/dnode/vnode/src/tq/tq.c | 4 ---- source/libs/parser/src/parTranslater.c | 8 ++++---- 5 files changed, 37 insertions(+), 30 deletions(-) diff --git a/include/common/tmsg.h b/include/common/tmsg.h index cc11254dcd..04c3a338b9 100644 --- a/include/common/tmsg.h +++ b/include/common/tmsg.h @@ -1473,15 +1473,25 @@ typedef struct { int64_t streamId; } SMVCreateStreamRsp, SMSCreateStreamRsp; +enum { + TOPIC_SUB_TYPE__DB = 1, + TOPIC_SUB_TYPE__TABLE, + TOPIC_SUB_TYPE__COLUMN, +}; + typedef struct { char name[TSDB_TOPIC_FNAME_LEN]; // accout.topic int8_t igExists; - int8_t withTbName; - int8_t withSchema; - int8_t withTag; + // int8_t withTbName; + // int8_t withSchema; + // int8_t withTag; + int8_t subType; char* sql; - char* ast; - char subscribeDbName[TSDB_DB_NAME_LEN]; + union { + char* ast; + char subDbName[TSDB_DB_NAME_LEN]; + char subStbName[TSDB_TABLE_FNAME_LEN]; + }; } SCMCreateTopicReq; int32_t tSerializeSCMCreateTopicReq(void* buf, int32_t bufLen, const SCMCreateTopicReq* pReq); @@ -2145,11 +2155,6 @@ static FORCE_INLINE void* taosDecodeSMqMsg(void* buf, SMqHbMsg* pMsg) { return buf; } -enum { - TOPIC_SUB_TYPE__DB = 1, - TOPIC_SUB_TYPE__TABLE, -}; - typedef struct { SMsgHead head; int64_t leftForVer; diff --git a/source/common/src/tmsg.c b/source/common/src/tmsg.c index 22ac412434..32f764022d 100644 --- a/source/common/src/tmsg.c +++ b/source/common/src/tmsg.c @@ -2677,10 +2677,12 @@ int32_t tSerializeSCMCreateTopicReq(void *buf, int32_t bufLen, const SCMCreateTo if (tStartEncode(&encoder) < 0) return -1; if (tEncodeCStr(&encoder, pReq->name) < 0) return -1; if (tEncodeI8(&encoder, pReq->igExists) < 0) return -1; - if (tEncodeI8(&encoder, pReq->withTbName) < 0) return -1; - if (tEncodeI8(&encoder, pReq->withSchema) < 0) return -1; - if (tEncodeI8(&encoder, pReq->withTag) < 0) return -1; - if (tEncodeCStr(&encoder, pReq->subscribeDbName) < 0) return -1; + /*if (tEncodeI8(&encoder, pReq->withTbName) < 0) return -1;*/ + /*if (tEncodeI8(&encoder, pReq->withSchema) < 0) return -1;*/ + /*if (tEncodeI8(&encoder, pReq->withTag) < 0) return -1;*/ + if (tEncodeI8(&encoder, pReq->subType) < 0) return -1; + if (tEncodeCStr(&encoder, pReq->subDbName) < 0) return -1; + /*if (tEncodeCStr(&encoder, pReq->subStbName) < 0) return -1;*/ if (tEncodeI32(&encoder, sqlLen) < 0) return -1; if (tEncodeI32(&encoder, astLen) < 0) return -1; if (sqlLen > 0 && tEncodeCStr(&encoder, pReq->sql) < 0) return -1; @@ -2703,10 +2705,14 @@ int32_t tDeserializeSCMCreateTopicReq(void *buf, int32_t bufLen, SCMCreateTopicR if (tStartDecode(&decoder) < 0) return -1; if (tDecodeCStrTo(&decoder, pReq->name) < 0) return -1; if (tDecodeI8(&decoder, &pReq->igExists) < 0) return -1; - if (tDecodeI8(&decoder, &pReq->withTbName) < 0) return -1; - if (tDecodeI8(&decoder, &pReq->withSchema) < 0) return -1; - if (tDecodeI8(&decoder, &pReq->withTag) < 0) return -1; - if (tDecodeCStrTo(&decoder, pReq->subscribeDbName) < 0) return -1; + /*if (tDecodeI8(&decoder, &pReq->withTbName) < 0) return -1;*/ + /*if (tDecodeI8(&decoder, &pReq->withSchema) < 0) return -1;*/ + /*if (tDecodeI8(&decoder, &pReq->withTag) < 0) return -1;*/ + if (tDecodeI8(&decoder, &pReq->subType) < 0) return -1; + if (tDecodeCStrTo(&decoder, pReq->subDbName) < 0) return -1; + /*if (pReq->subType == TOPIC_SUB_TYPE__TABLE) {*/ + /*if (tDecodeCStrTo(&decoder, pReq->subStbName) < 0) return -1;*/ + /*}*/ if (tDecodeI32(&decoder, &sqlLen) < 0) return -1; if (tDecodeI32(&decoder, &astLen) < 0) return -1; diff --git a/source/dnode/mnode/impl/src/mndTopic.c b/source/dnode/mnode/impl/src/mndTopic.c index 2048c79847..89f4bfc779 100644 --- a/source/dnode/mnode/impl/src/mndTopic.c +++ b/source/dnode/mnode/impl/src/mndTopic.c @@ -307,7 +307,7 @@ static SDDropTopicReq *mndBuildDropTopicMsg(SMnode *pMnode, SVgObj *pVgroup, SMq } static int32_t mndCheckCreateTopicReq(SCMCreateTopicReq *pCreate) { - if (pCreate->name[0] == 0 || pCreate->sql == NULL || pCreate->sql[0] == 0 || pCreate->subscribeDbName[0] == 0) { + if (pCreate->name[0] == 0 || pCreate->sql == NULL || pCreate->sql[0] == 0 || pCreate->subDbName[0] == 0) { terrno = TSDB_CODE_MND_INVALID_TOPIC; return -1; } @@ -333,8 +333,8 @@ static int32_t mndCreateTopic(SMnode *pMnode, SRpcMsg *pReq, SCMCreateTopicReq * topicObj.ast = strdup(pCreate->ast); topicObj.astLen = strlen(pCreate->ast) + 1; topicObj.subType = TOPIC_SUB_TYPE__TABLE; - topicObj.withTbName = pCreate->withTbName; - topicObj.withSchema = pCreate->withSchema; + /*topicObj.withTbName = pCreate->withTbName;*/ + /*topicObj.withSchema = pCreate->withSchema;*/ SNode *pAst = NULL; if (nodesStringToNode(pCreate->ast, &pAst) != 0) { @@ -441,7 +441,7 @@ static int32_t mndProcessCreateTopicReq(SRpcMsg *pReq) { goto CREATE_TOPIC_OVER; } - pDb = mndAcquireDb(pMnode, createTopicReq.subscribeDbName); + pDb = mndAcquireDb(pMnode, createTopicReq.subDbName); if (pDb == NULL) { terrno = TSDB_CODE_MND_DB_NOT_SELECTED; goto CREATE_TOPIC_OVER; diff --git a/source/dnode/vnode/src/tq/tq.c b/source/dnode/vnode/src/tq/tq.c index 9941b00ff7..93ff049b3e 100644 --- a/source/dnode/vnode/src/tq/tq.c +++ b/source/dnode/vnode/src/tq/tq.c @@ -122,10 +122,6 @@ STQ* tqOpen(const char* path, SVnode* pVnode, SWal* pWal) { ASSERT(0); } - /*if (tdbBegin(pTq->pMetaStore, &txn) < 0) {*/ - /*ASSERT(0);*/ - /*}*/ - TBC* pCur; if (tdbTbcOpen(pTq->pExecStore, &pCur, &txn) < 0) { ASSERT(0); diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c index 73abe6cd9d..467df44b7c 100644 --- a/source/libs/parser/src/parTranslater.c +++ b/source/libs/parser/src/parTranslater.c @@ -3239,9 +3239,9 @@ static int32_t buildCreateTopicReq(STranslateContext* pCxt, SCreateTopicStmt* pS tNameSetDbName(&name, pCxt->pParseCxt->acctId, pStmt->topicName, strlen(pStmt->topicName)); tNameGetFullDbName(&name, pReq->name); pReq->igExists = pStmt->ignoreExists; - pReq->withTbName = pStmt->pOptions->withTable; - pReq->withSchema = pStmt->pOptions->withSchema; - pReq->withTag = pStmt->pOptions->withTag; + /*pReq->withTbName = pStmt->pOptions->withTable;*/ + /*pReq->withSchema = pStmt->pOptions->withSchema;*/ + /*pReq->withTag = pStmt->pOptions->withTag;*/ pReq->sql = strdup(pCxt->pParseCxt->pSql); if (NULL == pReq->sql) { @@ -3262,7 +3262,7 @@ static int32_t buildCreateTopicReq(STranslateContext* pCxt, SCreateTopicStmt* pS dbName = pStmt->subscribeDbName; } tNameSetDbName(&name, pCxt->pParseCxt->acctId, dbName, strlen(dbName)); - tNameGetFullDbName(&name, pReq->subscribeDbName); + tNameGetFullDbName(&name, pReq->subDbName); return code; } From 9342ef3ef76c28e8c6912c3bdc35dd0d349c7469 Mon Sep 17 00:00:00 2001 From: Liu Jicong Date: Fri, 27 May 2022 15:40:31 +0800 Subject: [PATCH 02/56] feat(tmq): add sub type --- include/common/tmsg.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/common/tmsg.h b/include/common/tmsg.h index 04c3a338b9..4fa3fa003c 100644 --- a/include/common/tmsg.h +++ b/include/common/tmsg.h @@ -1483,8 +1483,8 @@ typedef struct { char name[TSDB_TOPIC_FNAME_LEN]; // accout.topic int8_t igExists; // int8_t withTbName; - // int8_t withSchema; - // int8_t withTag; + // int8_t withSchema; + // int8_t withTag; int8_t subType; char* sql; union { From fdd00a658269a6a9b2736d29d2fc57e5f01d9f3f Mon Sep 17 00:00:00 2001 From: Xiaoyu Wang Date: Mon, 30 May 2022 11:59:23 +0800 Subject: [PATCH 03/56] feat: sql command 'create topic as {database | stable| query}' --- include/common/tmsg.h | 5 +- include/common/ttokendef.h | 182 +- include/libs/nodes/cmdnodes.h | 19 +- include/libs/nodes/nodes.h | 1 - source/common/src/tmsg.c | 56 +- source/libs/nodes/src/nodesCodeFuncs.c | 10 +- source/libs/nodes/src/nodesUtilFuncs.c | 2 - source/libs/parser/inc/parAst.h | 2 +- source/libs/parser/inc/sql.y | 13 +- source/libs/parser/src/parAstCreater.c | 24 +- source/libs/parser/src/parTokenizer.c | 2 - source/libs/parser/src/parTranslater.c | 20 +- source/libs/parser/src/sql.c | 4648 +++++++++---------- source/libs/parser/test/parInitialCTest.cpp | 55 +- 14 files changed, 2521 insertions(+), 2518 deletions(-) diff --git a/include/common/tmsg.h b/include/common/tmsg.h index 4fa3fa003c..6d6cb6a101 100644 --- a/include/common/tmsg.h +++ b/include/common/tmsg.h @@ -1482,14 +1482,11 @@ enum { typedef struct { char name[TSDB_TOPIC_FNAME_LEN]; // accout.topic int8_t igExists; - // int8_t withTbName; - // int8_t withSchema; - // int8_t withTag; int8_t subType; char* sql; union { char* ast; - char subDbName[TSDB_DB_NAME_LEN]; + char subDbName[TSDB_DB_FNAME_LEN]; char subStbName[TSDB_TABLE_FNAME_LEN]; }; } SCMCreateTopicReq; diff --git a/include/common/ttokendef.h b/include/common/ttokendef.h index 2fc524eeac..41c8111eea 100644 --- a/include/common/ttokendef.h +++ b/include/common/ttokendef.h @@ -163,98 +163,96 @@ #define TK_TOPIC 145 #define TK_AS 146 #define TK_CGROUP 147 -#define TK_WITH 148 -#define TK_SCHEMA 149 -#define TK_DESC 150 -#define TK_DESCRIBE 151 -#define TK_RESET 152 -#define TK_QUERY 153 -#define TK_CACHE 154 -#define TK_EXPLAIN 155 -#define TK_ANALYZE 156 -#define TK_VERBOSE 157 -#define TK_NK_BOOL 158 -#define TK_RATIO 159 -#define TK_COMPACT 160 -#define TK_VNODES 161 -#define TK_IN 162 -#define TK_OUTPUTTYPE 163 -#define TK_AGGREGATE 164 -#define TK_BUFSIZE 165 -#define TK_STREAM 166 -#define TK_INTO 167 -#define TK_TRIGGER 168 -#define TK_AT_ONCE 169 -#define TK_WINDOW_CLOSE 170 -#define TK_WATERMARK 171 -#define TK_KILL 172 -#define TK_CONNECTION 173 -#define TK_TRANSACTION 174 -#define TK_MERGE 175 -#define TK_VGROUP 176 -#define TK_REDISTRIBUTE 177 -#define TK_SPLIT 178 -#define TK_SYNCDB 179 -#define TK_NULL 180 -#define TK_NK_QUESTION 181 -#define TK_NK_ARROW 182 -#define TK_ROWTS 183 -#define TK_TBNAME 184 -#define TK_QSTARTTS 185 -#define TK_QENDTS 186 -#define TK_WSTARTTS 187 -#define TK_WENDTS 188 -#define TK_WDURATION 189 -#define TK_CAST 190 -#define TK_NOW 191 -#define TK_TODAY 192 -#define TK_TIMEZONE 193 -#define TK_COUNT 194 -#define TK_FIRST 195 -#define TK_LAST 196 -#define TK_LAST_ROW 197 -#define TK_BETWEEN 198 -#define TK_IS 199 -#define TK_NK_LT 200 -#define TK_NK_GT 201 -#define TK_NK_LE 202 -#define TK_NK_GE 203 -#define TK_NK_NE 204 -#define TK_MATCH 205 -#define TK_NMATCH 206 -#define TK_CONTAINS 207 -#define TK_JOIN 208 -#define TK_INNER 209 -#define TK_SELECT 210 -#define TK_DISTINCT 211 -#define TK_WHERE 212 -#define TK_PARTITION 213 -#define TK_BY 214 -#define TK_SESSION 215 -#define TK_STATE_WINDOW 216 -#define TK_SLIDING 217 -#define TK_FILL 218 -#define TK_VALUE 219 -#define TK_NONE 220 -#define TK_PREV 221 -#define TK_LINEAR 222 -#define TK_NEXT 223 -#define TK_GROUP 224 -#define TK_HAVING 225 -#define TK_ORDER 226 -#define TK_SLIMIT 227 -#define TK_SOFFSET 228 -#define TK_LIMIT 229 -#define TK_OFFSET 230 -#define TK_ASC 231 -#define TK_NULLS 232 -#define TK_ID 233 -#define TK_NK_BITNOT 234 -#define TK_INSERT 235 -#define TK_VALUES 236 -#define TK_IMPORT 237 -#define TK_NK_SEMI 238 -#define TK_FILE 239 +#define TK_DESC 148 +#define TK_DESCRIBE 149 +#define TK_RESET 150 +#define TK_QUERY 151 +#define TK_CACHE 152 +#define TK_EXPLAIN 153 +#define TK_ANALYZE 154 +#define TK_VERBOSE 155 +#define TK_NK_BOOL 156 +#define TK_RATIO 157 +#define TK_COMPACT 158 +#define TK_VNODES 159 +#define TK_IN 160 +#define TK_OUTPUTTYPE 161 +#define TK_AGGREGATE 162 +#define TK_BUFSIZE 163 +#define TK_STREAM 164 +#define TK_INTO 165 +#define TK_TRIGGER 166 +#define TK_AT_ONCE 167 +#define TK_WINDOW_CLOSE 168 +#define TK_WATERMARK 169 +#define TK_KILL 170 +#define TK_CONNECTION 171 +#define TK_TRANSACTION 172 +#define TK_MERGE 173 +#define TK_VGROUP 174 +#define TK_REDISTRIBUTE 175 +#define TK_SPLIT 176 +#define TK_SYNCDB 177 +#define TK_NULL 178 +#define TK_NK_QUESTION 179 +#define TK_NK_ARROW 180 +#define TK_ROWTS 181 +#define TK_TBNAME 182 +#define TK_QSTARTTS 183 +#define TK_QENDTS 184 +#define TK_WSTARTTS 185 +#define TK_WENDTS 186 +#define TK_WDURATION 187 +#define TK_CAST 188 +#define TK_NOW 189 +#define TK_TODAY 190 +#define TK_TIMEZONE 191 +#define TK_COUNT 192 +#define TK_FIRST 193 +#define TK_LAST 194 +#define TK_LAST_ROW 195 +#define TK_BETWEEN 196 +#define TK_IS 197 +#define TK_NK_LT 198 +#define TK_NK_GT 199 +#define TK_NK_LE 200 +#define TK_NK_GE 201 +#define TK_NK_NE 202 +#define TK_MATCH 203 +#define TK_NMATCH 204 +#define TK_CONTAINS 205 +#define TK_JOIN 206 +#define TK_INNER 207 +#define TK_SELECT 208 +#define TK_DISTINCT 209 +#define TK_WHERE 210 +#define TK_PARTITION 211 +#define TK_BY 212 +#define TK_SESSION 213 +#define TK_STATE_WINDOW 214 +#define TK_SLIDING 215 +#define TK_FILL 216 +#define TK_VALUE 217 +#define TK_NONE 218 +#define TK_PREV 219 +#define TK_LINEAR 220 +#define TK_NEXT 221 +#define TK_GROUP 222 +#define TK_HAVING 223 +#define TK_ORDER 224 +#define TK_SLIMIT 225 +#define TK_SOFFSET 226 +#define TK_LIMIT 227 +#define TK_OFFSET 228 +#define TK_ASC 229 +#define TK_NULLS 230 +#define TK_ID 231 +#define TK_NK_BITNOT 232 +#define TK_INSERT 233 +#define TK_VALUES 234 +#define TK_IMPORT 235 +#define TK_NK_SEMI 236 +#define TK_FILE 237 #define TK_NK_SPACE 300 #define TK_NK_COMMENT 301 diff --git a/include/libs/nodes/cmdnodes.h b/include/libs/nodes/cmdnodes.h index 7bd3a40c71..f84eef6baf 100644 --- a/include/libs/nodes/cmdnodes.h +++ b/include/libs/nodes/cmdnodes.h @@ -239,20 +239,13 @@ typedef struct SDropComponentNodeStmt { int32_t dnodeId; } SDropComponentNodeStmt; -typedef struct STopicOptions { - ENodeType type; - bool withTable; - bool withSchema; - bool withTag; -} STopicOptions; - typedef struct SCreateTopicStmt { - ENodeType type; - char topicName[TSDB_TABLE_NAME_LEN]; - char subscribeDbName[TSDB_DB_NAME_LEN]; - bool ignoreExists; - SNode* pQuery; - STopicOptions* pOptions; + ENodeType type; + char topicName[TSDB_TABLE_NAME_LEN]; + char subDbName[TSDB_DB_NAME_LEN]; + char subSTbName[TSDB_TABLE_NAME_LEN]; + bool ignoreExists; + SNode* pQuery; } SCreateTopicStmt; typedef struct SDropTopicStmt { diff --git a/include/libs/nodes/nodes.h b/include/libs/nodes/nodes.h index 3860266725..d960ccbd65 100644 --- a/include/libs/nodes/nodes.h +++ b/include/libs/nodes/nodes.h @@ -95,7 +95,6 @@ typedef enum ENodeType { QUERY_NODE_INDEX_OPTIONS, QUERY_NODE_EXPLAIN_OPTIONS, QUERY_NODE_STREAM_OPTIONS, - QUERY_NODE_TOPIC_OPTIONS, QUERY_NODE_LEFT_VALUE, // Statement nodes are used in parser and planner module. diff --git a/source/common/src/tmsg.c b/source/common/src/tmsg.c index 32f764022d..300fb735ec 100644 --- a/source/common/src/tmsg.c +++ b/source/common/src/tmsg.c @@ -2666,27 +2666,23 @@ int32_t tDeserializeSMDropCgroupReq(void *buf, int32_t bufLen, SMDropCgroupReq * } int32_t tSerializeSCMCreateTopicReq(void *buf, int32_t bufLen, const SCMCreateTopicReq *pReq) { - int32_t sqlLen = 0; - int32_t astLen = 0; - if (pReq->sql != NULL) sqlLen = (int32_t)strlen(pReq->sql); - if (pReq->ast != NULL) astLen = (int32_t)strlen(pReq->ast); - SEncoder encoder = {0}; tEncoderInit(&encoder, buf, bufLen); if (tStartEncode(&encoder) < 0) return -1; if (tEncodeCStr(&encoder, pReq->name) < 0) return -1; if (tEncodeI8(&encoder, pReq->igExists) < 0) return -1; - /*if (tEncodeI8(&encoder, pReq->withTbName) < 0) return -1;*/ - /*if (tEncodeI8(&encoder, pReq->withSchema) < 0) return -1;*/ - /*if (tEncodeI8(&encoder, pReq->withTag) < 0) return -1;*/ if (tEncodeI8(&encoder, pReq->subType) < 0) return -1; - if (tEncodeCStr(&encoder, pReq->subDbName) < 0) return -1; - /*if (tEncodeCStr(&encoder, pReq->subStbName) < 0) return -1;*/ - if (tEncodeI32(&encoder, sqlLen) < 0) return -1; - if (tEncodeI32(&encoder, astLen) < 0) return -1; - if (sqlLen > 0 && tEncodeCStr(&encoder, pReq->sql) < 0) return -1; - if (astLen > 0 && tEncodeCStr(&encoder, pReq->ast) < 0) return -1; + if (TOPIC_SUB_TYPE__DB == pReq->subType) { + if (tEncodeCStr(&encoder, pReq->subDbName) < 0) return -1; + } else if (TOPIC_SUB_TYPE__TABLE == pReq->subType) { + if (tEncodeCStr(&encoder, pReq->subStbName) < 0) return -1; + } else { + if (tEncodeI32(&encoder, strlen(pReq->ast)) < 0) return -1; + if (tEncodeCStr(&encoder, pReq->ast) < 0) return -1; + } + if (tEncodeI32(&encoder, strlen(pReq->sql)) < 0) return -1; + if (tEncodeCStr(&encoder, pReq->sql) < 0) return -1; tEndEncode(&encoder); @@ -2705,30 +2701,26 @@ int32_t tDeserializeSCMCreateTopicReq(void *buf, int32_t bufLen, SCMCreateTopicR if (tStartDecode(&decoder) < 0) return -1; if (tDecodeCStrTo(&decoder, pReq->name) < 0) return -1; if (tDecodeI8(&decoder, &pReq->igExists) < 0) return -1; - /*if (tDecodeI8(&decoder, &pReq->withTbName) < 0) return -1;*/ - /*if (tDecodeI8(&decoder, &pReq->withSchema) < 0) return -1;*/ - /*if (tDecodeI8(&decoder, &pReq->withTag) < 0) return -1;*/ if (tDecodeI8(&decoder, &pReq->subType) < 0) return -1; - if (tDecodeCStrTo(&decoder, pReq->subDbName) < 0) return -1; - /*if (pReq->subType == TOPIC_SUB_TYPE__TABLE) {*/ - /*if (tDecodeCStrTo(&decoder, pReq->subStbName) < 0) return -1;*/ - /*}*/ + if (TOPIC_SUB_TYPE__DB == pReq->subType) { + if (tDecodeCStrTo(&decoder, pReq->subDbName) < 0) return -1; + } else if (TOPIC_SUB_TYPE__TABLE == pReq->subType) { + if (tDecodeCStrTo(&decoder, pReq->subStbName) < 0) return -1; + } else { + if (tDecodeI32(&decoder, &astLen) < 0) return -1; + if (astLen > 0) { + pReq->ast = taosMemoryCalloc(1, astLen + 1); + if (pReq->ast == NULL) return -1; + if (tDecodeCStrTo(&decoder, pReq->ast) < 0) return -1; + } + } if (tDecodeI32(&decoder, &sqlLen) < 0) return -1; - if (tDecodeI32(&decoder, &astLen) < 0) return -1; - if (sqlLen > 0) { pReq->sql = taosMemoryCalloc(1, sqlLen + 1); if (pReq->sql == NULL) return -1; if (tDecodeCStrTo(&decoder, pReq->sql) < 0) return -1; } - if (astLen > 0) { - pReq->ast = taosMemoryCalloc(1, astLen + 1); - if (pReq->ast == NULL) return -1; - if (tDecodeCStrTo(&decoder, pReq->ast) < 0) return -1; - } else { - } - tEndDecode(&decoder); tDecoderClear(&decoder); @@ -2737,7 +2729,9 @@ int32_t tDeserializeSCMCreateTopicReq(void *buf, int32_t bufLen, SCMCreateTopicR void tFreeSCMCreateTopicReq(SCMCreateTopicReq *pReq) { taosMemoryFreeClear(pReq->sql); - taosMemoryFreeClear(pReq->ast); + if (TOPIC_SUB_TYPE__COLUMN == pReq->subType) { + taosMemoryFreeClear(pReq->ast); + } } int32_t tSerializeSCMCreateTopicRsp(void *buf, int32_t bufLen, const SCMCreateTopicRsp *pRsp) { diff --git a/source/libs/nodes/src/nodesCodeFuncs.c b/source/libs/nodes/src/nodesCodeFuncs.c index 8887b9841a..b188f96126 100644 --- a/source/libs/nodes/src/nodesCodeFuncs.c +++ b/source/libs/nodes/src/nodesCodeFuncs.c @@ -2534,7 +2534,7 @@ static const char* jkSessionWindowTsPrimaryKey = "TsPrimaryKey"; static const char* jkSessionWindowGap = "Gap"; static int32_t sessionWindowNodeToJson(const void* pObj, SJson* pJson) { - const SSessionWindowNode * pNode = (const SSessionWindowNode*)pObj; + const SSessionWindowNode* pNode = (const SSessionWindowNode*)pObj; int32_t code = tjsonAddObject(pJson, jkSessionWindowTsPrimaryKey, nodeToJson, pNode->pCol); if (TSDB_CODE_SUCCESS == code) { @@ -2546,9 +2546,9 @@ static int32_t sessionWindowNodeToJson(const void* pObj, SJson* pJson) { static int32_t jsonToSessionWindowNode(const SJson* pJson, void* pObj) { SSessionWindowNode* pNode = (SSessionWindowNode*)pObj; - int32_t code = jsonToNodeObject(pJson, jkSessionWindowTsPrimaryKey, (SNode **)&pNode->pCol); + int32_t code = jsonToNodeObject(pJson, jkSessionWindowTsPrimaryKey, (SNode**)&pNode->pCol); if (TSDB_CODE_SUCCESS == code) { - code = jsonToNodeObject(pJson, jkSessionWindowGap, (SNode **)&pNode->pGap); + code = jsonToNodeObject(pJson, jkSessionWindowGap, (SNode**)&pNode->pGap); } return code; } @@ -2987,7 +2987,7 @@ static int32_t createTopicStmtToJson(const void* pObj, SJson* pJson) { int32_t code = tjsonAddStringToObject(pJson, jkCreateTopicStmtTopicName, pNode->topicName); if (TSDB_CODE_SUCCESS == code) { - code = tjsonAddStringToObject(pJson, jkCreateTopicStmtSubscribeDbName, pNode->subscribeDbName); + code = tjsonAddStringToObject(pJson, jkCreateTopicStmtSubscribeDbName, pNode->subDbName); } if (TSDB_CODE_SUCCESS == code) { code = tjsonAddBoolToObject(pJson, jkCreateTopicStmtIgnoreExists, pNode->ignoreExists); @@ -3004,7 +3004,7 @@ static int32_t jsonToCreateTopicStmt(const SJson* pJson, void* pObj) { int32_t code = tjsonGetStringValue(pJson, jkCreateTopicStmtTopicName, pNode->topicName); if (TSDB_CODE_SUCCESS == code) { - code = tjsonGetStringValue(pJson, jkCreateTopicStmtSubscribeDbName, pNode->subscribeDbName); + code = tjsonGetStringValue(pJson, jkCreateTopicStmtSubscribeDbName, pNode->subDbName); } if (TSDB_CODE_SUCCESS == code) { code = tjsonGetBoolValue(pJson, jkCreateTopicStmtIgnoreExists, &pNode->ignoreExists); diff --git a/source/libs/nodes/src/nodesUtilFuncs.c b/source/libs/nodes/src/nodesUtilFuncs.c index e28844f2e1..d29e89d266 100644 --- a/source/libs/nodes/src/nodesUtilFuncs.c +++ b/source/libs/nodes/src/nodesUtilFuncs.c @@ -86,8 +86,6 @@ SNodeptr nodesMakeNode(ENodeType type) { return makeNode(type, sizeof(SExplainOptions)); case QUERY_NODE_STREAM_OPTIONS: return makeNode(type, sizeof(SStreamOptions)); - case QUERY_NODE_TOPIC_OPTIONS: - return makeNode(type, sizeof(STopicOptions)); case QUERY_NODE_LEFT_VALUE: return makeNode(type, sizeof(SLeftValueNode)); case QUERY_NODE_SET_OPERATOR: diff --git a/source/libs/parser/inc/parAst.h b/source/libs/parser/inc/parAst.h index a1c304118b..70fb1a82ef 100644 --- a/source/libs/parser/inc/parAst.h +++ b/source/libs/parser/inc/parAst.h @@ -168,7 +168,7 @@ SNode* createCreateComponentNodeStmt(SAstCreateContext* pCxt, ENodeType type, co SNode* createDropComponentNodeStmt(SAstCreateContext* pCxt, ENodeType type, const SToken* pDnodeId); SNode* createTopicOptions(SAstCreateContext* pCxt); SNode* createCreateTopicStmt(SAstCreateContext* pCxt, bool ignoreExists, const SToken* pTopicName, SNode* pQuery, - const SToken* pSubscribeDbName, SNode* pOptions); + const SToken* pSubDbName, SNode* pRealTable); SNode* createDropTopicStmt(SAstCreateContext* pCxt, bool ignoreNotExists, const SToken* pTopicName); SNode* createDropCGroupStmt(SAstCreateContext* pCxt, bool ignoreNotExists, const SToken* pCGroupId, const SToken* pTopicName); diff --git a/source/libs/parser/inc/sql.y b/source/libs/parser/inc/sql.y index 1fb60f83a5..61c9d00ae1 100644 --- a/source/libs/parser/inc/sql.y +++ b/source/libs/parser/inc/sql.y @@ -403,18 +403,13 @@ func_list(A) ::= func_list(B) NK_COMMA func(C). func(A) ::= function_name(B) NK_LP expression_list(C) NK_RP. { A = createFunctionNode(pCxt, &B, C); } /************************************************ create/drop topic ***************************************************/ -cmd ::= CREATE TOPIC not_exists_opt(A) - topic_name(B) topic_options(D) AS query_expression(C). { pCxt->pRootNode = createCreateTopicStmt(pCxt, A, &B, C, NULL, D); } -cmd ::= CREATE TOPIC not_exists_opt(A) - topic_name(B) topic_options(D) AS db_name(C). { pCxt->pRootNode = createCreateTopicStmt(pCxt, A, &B, NULL, &C, D); } +cmd ::= CREATE TOPIC not_exists_opt(A) topic_name(B) AS query_expression(C). { pCxt->pRootNode = createCreateTopicStmt(pCxt, A, &B, C, NULL, NULL); } +cmd ::= CREATE TOPIC not_exists_opt(A) topic_name(B) AS DATABASE db_name(C). { pCxt->pRootNode = createCreateTopicStmt(pCxt, A, &B, NULL, &C, NULL); } +cmd ::= CREATE TOPIC not_exists_opt(A) topic_name(B) + AS STABLE full_table_name(C). { pCxt->pRootNode = createCreateTopicStmt(pCxt, A, &B, NULL, NULL, C); } cmd ::= DROP TOPIC exists_opt(A) topic_name(B). { pCxt->pRootNode = createDropTopicStmt(pCxt, A, &B); } cmd ::= DROP CGROUP exists_opt(A) cgroup_name(B) ON topic_name(C). { pCxt->pRootNode = createDropCGroupStmt(pCxt, A, &B, &C); } -topic_options(A) ::= . { A = createTopicOptions(pCxt); } -topic_options(A) ::= topic_options(B) WITH TABLE. { ((STopicOptions*)B)->withTable = true; A = B; } -topic_options(A) ::= topic_options(B) WITH SCHEMA. { ((STopicOptions*)B)->withSchema = true; A = B; } -topic_options(A) ::= topic_options(B) WITH TAG. { ((STopicOptions*)B)->withTag = true; A = B; } - /************************************************ desc/describe *******************************************************/ cmd ::= DESC full_table_name(A). { pCxt->pRootNode = createDescribeStmt(pCxt, A); } cmd ::= DESCRIBE full_table_name(A). { pCxt->pRootNode = createDescribeStmt(pCxt, A); } diff --git a/source/libs/parser/src/parAstCreater.c b/source/libs/parser/src/parAstCreater.c index 6b4c5f0ce5..dc8c54ac78 100644 --- a/source/libs/parser/src/parAstCreater.c +++ b/source/libs/parser/src/parAstCreater.c @@ -1265,28 +1265,22 @@ SNode* createDropComponentNodeStmt(SAstCreateContext* pCxt, ENodeType type, cons return (SNode*)pStmt; } -SNode* createTopicOptions(SAstCreateContext* pCxt) { - CHECK_PARSER_STATUS(pCxt); - STopicOptions* pOptions = nodesMakeNode(QUERY_NODE_TOPIC_OPTIONS); - CHECK_OUT_OF_MEM(pOptions); - pOptions->withTable = false; - pOptions->withSchema = false; - pOptions->withTag = false; - return (SNode*)pOptions; -} - SNode* createCreateTopicStmt(SAstCreateContext* pCxt, bool ignoreExists, const SToken* pTopicName, SNode* pQuery, - const SToken* pSubscribeDbName, SNode* pOptions) { + const SToken* pSubDbName, SNode* pRealTable) { CHECK_PARSER_STATUS(pCxt); SCreateTopicStmt* pStmt = nodesMakeNode(QUERY_NODE_CREATE_TOPIC_STMT); CHECK_OUT_OF_MEM(pStmt); strncpy(pStmt->topicName, pTopicName->z, pTopicName->n); pStmt->ignoreExists = ignoreExists; - pStmt->pQuery = pQuery; - if (NULL != pSubscribeDbName) { - strncpy(pStmt->subscribeDbName, pSubscribeDbName->z, pSubscribeDbName->n); + if (NULL != pRealTable) { + strcpy(pStmt->subDbName, ((SRealTableNode*)pRealTable)->table.dbName); + strcpy(pStmt->subSTbName, ((SRealTableNode*)pRealTable)->table.tableName); + nodesDestroyNode(pRealTable); + } else if (NULL != pSubDbName) { + strncpy(pStmt->subDbName, pSubDbName->z, pSubDbName->n); + } else { + pStmt->pQuery = pQuery; } - pStmt->pOptions = (STopicOptions*)pOptions; return (SNode*)pStmt; } diff --git a/source/libs/parser/src/parTokenizer.c b/source/libs/parser/src/parTokenizer.c index 540de2d639..b6f9ba138d 100644 --- a/source/libs/parser/src/parTokenizer.c +++ b/source/libs/parser/src/parTokenizer.c @@ -156,7 +156,6 @@ static SKeyword keywordTable[] = { {"RETENTIONS", TK_RETENTIONS}, {"REVOKE", TK_REVOKE}, {"ROLLUP", TK_ROLLUP}, - {"SCHEMA", TK_SCHEMA}, {"SCHEMALESS", TK_SCHEMALESS}, {"SCORES", TK_SCORES}, {"SELECT", TK_SELECT}, @@ -214,7 +213,6 @@ static SKeyword keywordTable[] = { {"WATERMARK", TK_WATERMARK}, {"WHERE", TK_WHERE}, {"WINDOW_CLOSE", TK_WINDOW_CLOSE}, - {"WITH", TK_WITH}, {"WRITE", TK_WRITE}, {"_C0", TK_ROWTS}, {"_QENDTS", TK_QENDTS}, diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c index 467df44b7c..bca1cfbecb 100644 --- a/source/libs/parser/src/parTranslater.c +++ b/source/libs/parser/src/parTranslater.c @@ -3239,9 +3239,6 @@ static int32_t buildCreateTopicReq(STranslateContext* pCxt, SCreateTopicStmt* pS tNameSetDbName(&name, pCxt->pParseCxt->acctId, pStmt->topicName, strlen(pStmt->topicName)); tNameGetFullDbName(&name, pReq->name); pReq->igExists = pStmt->ignoreExists; - /*pReq->withTbName = pStmt->pOptions->withTable;*/ - /*pReq->withSchema = pStmt->pOptions->withSchema;*/ - /*pReq->withTag = pStmt->pOptions->withTag;*/ pReq->sql = strdup(pCxt->pParseCxt->pSql); if (NULL == pReq->sql) { @@ -3250,19 +3247,22 @@ static int32_t buildCreateTopicReq(STranslateContext* pCxt, SCreateTopicStmt* pS int32_t code = TSDB_CODE_SUCCESS; - const char* dbName; - if (NULL != pStmt->pQuery) { - dbName = ((SRealTableNode*)(((SSelectStmt*)pStmt->pQuery)->pFromTable))->table.dbName; + if ('\0' != pStmt->subSTbName[0]) { + pReq->subType = TOPIC_SUB_TYPE__TABLE; + toName(pCxt->pParseCxt->acctId, pStmt->subDbName, pStmt->subSTbName, &name); + tNameExtractFullName(&name, pReq->subStbName); + } else if ('\0' != pStmt->subDbName[0]) { + pReq->subType = TOPIC_SUB_TYPE__DB; + tNameSetDbName(&name, pCxt->pParseCxt->acctId, pStmt->subDbName, strlen(pStmt->subDbName)); + tNameGetFullDbName(&name, pReq->subDbName); + } else { + pReq->subType = TOPIC_SUB_TYPE__COLUMN; pCxt->pParseCxt->topicQuery = true; code = translateQuery(pCxt, pStmt->pQuery); if (TSDB_CODE_SUCCESS == code) { code = nodesNodeToString(pStmt->pQuery, false, &pReq->ast, NULL); } - } else { - dbName = pStmt->subscribeDbName; } - tNameSetDbName(&name, pCxt->pParseCxt->acctId, dbName, strlen(dbName)); - tNameGetFullDbName(&name, pReq->subDbName); return code; } diff --git a/source/libs/parser/src/sql.c b/source/libs/parser/src/sql.c index 262abac54b..76e461f2b8 100644 --- a/source/libs/parser/src/sql.c +++ b/source/libs/parser/src/sql.c @@ -100,25 +100,25 @@ #endif /************* Begin control #defines *****************************************/ #define YYCODETYPE unsigned short int -#define YYNOCODE 361 +#define YYNOCODE 358 #define YYACTIONTYPE unsigned short int #define ParseTOKENTYPE SToken typedef union { int yyinit; ParseTOKENTYPE yy0; - EFillMode yy18; - SAlterOption yy25; - SToken yy53; - EOperatorType yy136; - int32_t yy158; - ENullOrder yy185; - SNodeList* yy236; - EJoinType yy342; - EOrder yy430; - int64_t yy435; - SDataType yy450; - bool yy603; - SNode* yy636; + EOrder yy14; + ENullOrder yy17; + SNodeList* yy60; + SToken yy105; + int32_t yy140; + SNode* yy172; + EFillMode yy202; + SDataType yy248; + EOperatorType yy572; + int64_t yy593; + SAlterOption yy609; + bool yy617; + EJoinType yy636; } YYMINORTYPE; #ifndef YYSTACKDEPTH #define YYSTACKDEPTH 100 @@ -134,17 +134,17 @@ typedef union { #define ParseCTX_FETCH #define ParseCTX_STORE #define YYFALLBACK 1 -#define YYNSTATE 611 -#define YYNRULE 455 -#define YYNTOKEN 240 -#define YY_MAX_SHIFT 610 -#define YY_MIN_SHIFTREDUCE 901 -#define YY_MAX_SHIFTREDUCE 1355 -#define YY_ERROR_ACTION 1356 -#define YY_ACCEPT_ACTION 1357 -#define YY_NO_ACTION 1358 -#define YY_MIN_REDUCE 1359 -#define YY_MAX_REDUCE 1813 +#define YYNSTATE 612 +#define YYNRULE 452 +#define YYNTOKEN 238 +#define YY_MAX_SHIFT 611 +#define YY_MIN_SHIFTREDUCE 899 +#define YY_MAX_SHIFTREDUCE 1350 +#define YY_ERROR_ACTION 1351 +#define YY_ACCEPT_ACTION 1352 +#define YY_NO_ACTION 1353 +#define YY_MIN_REDUCE 1354 +#define YY_MAX_REDUCE 1805 /************* End control #defines *******************************************/ #define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0]))) @@ -211,604 +211,616 @@ typedef union { ** yy_default[] Default action for each state. ** *********** Begin parsing tables **********************************************/ -#define YY_ACTTAB_COUNT (2153) +#define YY_ACTTAB_COUNT (2214) static const YYACTIONTYPE yy_action[] = { - /* 0 */ 386, 1647, 387, 1391, 295, 394, 524, 387, 1391, 28, - /* 10 */ 226, 931, 35, 33, 130, 1676, 1371, 1660, 104, 1791, - /* 20 */ 304, 1644, 1169, 477, 523, 424, 36, 34, 32, 31, - /* 30 */ 30, 385, 1790, 62, 389, 1490, 1788, 1640, 1646, 36, - /* 40 */ 34, 32, 31, 30, 1535, 1676, 108, 1167, 527, 935, - /* 50 */ 936, 294, 1000, 508, 524, 1485, 1533, 154, 14, 476, - /* 60 */ 35, 33, 1296, 507, 1175, 24, 350, 1630, 304, 1002, - /* 70 */ 1169, 1418, 277, 488, 523, 36, 34, 32, 31, 30, - /* 80 */ 56, 1, 60, 1490, 1689, 59, 524, 80, 1661, 510, - /* 90 */ 1663, 1664, 506, 1359, 527, 1167, 1207, 1729, 104, 603, - /* 100 */ 602, 276, 1725, 607, 1258, 429, 14, 36, 34, 32, - /* 110 */ 31, 30, 1175, 1791, 1168, 1490, 140, 103, 102, 101, - /* 120 */ 100, 99, 98, 97, 96, 95, 147, 376, 1529, 2, - /* 130 */ 1788, 583, 582, 581, 319, 39, 580, 579, 578, 114, - /* 140 */ 573, 572, 571, 570, 569, 568, 567, 566, 121, 562, - /* 150 */ 511, 607, 1568, 307, 1259, 55, 1580, 55, 1170, 156, - /* 160 */ 94, 1791, 1168, 93, 92, 91, 90, 89, 88, 87, - /* 170 */ 86, 85, 158, 157, 146, 352, 1264, 1352, 1788, 393, - /* 180 */ 1173, 1174, 389, 1220, 1221, 1223, 1224, 1225, 1226, 1227, - /* 190 */ 503, 525, 1235, 1236, 1237, 1238, 1239, 1240, 1468, 36, - /* 200 */ 34, 32, 31, 30, 64, 292, 1170, 131, 191, 274, - /* 210 */ 148, 1447, 27, 302, 1253, 1254, 1255, 1256, 1257, 1261, - /* 220 */ 1262, 1263, 1421, 36, 34, 32, 31, 30, 1173, 1174, - /* 230 */ 484, 1220, 1221, 1223, 1224, 1225, 1226, 1227, 503, 525, - /* 240 */ 1235, 1236, 1237, 1238, 1239, 1240, 35, 33, 1467, 948, - /* 250 */ 70, 947, 438, 437, 304, 403, 1169, 436, 1351, 112, - /* 260 */ 109, 433, 308, 1791, 432, 431, 430, 35, 33, 1310, - /* 270 */ 128, 1483, 1660, 403, 523, 304, 1789, 1169, 949, 1492, - /* 280 */ 1788, 1167, 438, 437, 148, 1193, 148, 436, 62, 972, - /* 290 */ 109, 433, 14, 1207, 432, 431, 430, 110, 1175, 1360, - /* 300 */ 1676, 1303, 1167, 1382, 1660, 524, 973, 1193, 508, 524, - /* 310 */ 1486, 486, 142, 1736, 1737, 2, 1741, 351, 507, 1175, - /* 320 */ 94, 361, 1630, 93, 92, 91, 90, 89, 88, 87, - /* 330 */ 86, 85, 1676, 1381, 1490, 38, 8, 607, 1490, 1689, - /* 340 */ 487, 559, 82, 1661, 510, 1663, 1664, 506, 1168, 527, - /* 350 */ 507, 1191, 1729, 1630, 1630, 1535, 1728, 1725, 607, 128, - /* 360 */ 558, 557, 309, 556, 555, 554, 1380, 1533, 1493, 1168, - /* 370 */ 565, 1689, 1462, 1535, 81, 1661, 510, 1663, 1664, 506, - /* 380 */ 315, 527, 524, 1630, 1729, 1533, 1743, 26, 297, 1725, - /* 390 */ 141, 478, 1170, 54, 362, 435, 434, 36, 34, 32, - /* 400 */ 31, 30, 218, 36, 34, 32, 31, 30, 466, 1756, - /* 410 */ 1740, 1490, 55, 1170, 1173, 1174, 1630, 1220, 1221, 1223, - /* 420 */ 1224, 1225, 1226, 1227, 503, 525, 1235, 1236, 1237, 1238, - /* 430 */ 1239, 1240, 460, 577, 575, 1173, 1174, 1379, 1220, 1221, - /* 440 */ 1223, 1224, 1225, 1226, 1227, 503, 525, 1235, 1236, 1237, - /* 450 */ 1238, 1239, 1240, 35, 33, 1241, 1378, 443, 1195, 610, - /* 460 */ 316, 304, 1377, 1169, 148, 148, 249, 1571, 1573, 1520, - /* 470 */ 1246, 1222, 451, 243, 35, 33, 1193, 1481, 1376, 1660, - /* 480 */ 1647, 461, 304, 312, 1169, 105, 190, 1630, 1167, 524, - /* 490 */ 473, 599, 595, 591, 587, 242, 391, 1644, 446, 1357, - /* 500 */ 1644, 402, 1191, 440, 561, 1175, 1630, 1676, 189, 1167, - /* 510 */ 337, 484, 1630, 1640, 1646, 508, 1640, 1646, 1490, 484, - /* 520 */ 78, 1791, 9, 237, 527, 507, 1175, 527, 1630, 1630, - /* 530 */ 339, 335, 564, 51, 145, 488, 50, 127, 1788, 511, - /* 540 */ 112, 148, 576, 9, 607, 1581, 1689, 1194, 112, 80, - /* 550 */ 1661, 510, 1663, 1664, 506, 1168, 527, 520, 320, 1729, - /* 560 */ 1375, 479, 474, 276, 1725, 607, 36, 34, 32, 31, - /* 570 */ 30, 1648, 1130, 314, 1479, 1791, 1168, 428, 110, 553, - /* 580 */ 1132, 128, 465, 340, 217, 198, 110, 1465, 145, 55, - /* 590 */ 1492, 1644, 1788, 143, 1736, 1737, 77, 1741, 1791, 1170, - /* 600 */ 427, 144, 1736, 1737, 1146, 1741, 193, 1640, 1646, 113, - /* 610 */ 1630, 145, 277, 1572, 1573, 1788, 490, 1482, 527, 1295, - /* 620 */ 1170, 1173, 1174, 1374, 1220, 1221, 1223, 1224, 1225, 1226, - /* 630 */ 1227, 503, 525, 1235, 1236, 1237, 1238, 1239, 1240, 286, - /* 640 */ 1222, 1131, 1173, 1174, 1258, 1220, 1221, 1223, 1224, 1225, - /* 650 */ 1226, 1227, 503, 525, 1235, 1236, 1237, 1238, 1239, 1240, - /* 660 */ 35, 33, 273, 559, 1191, 345, 1320, 344, 304, 524, - /* 670 */ 1169, 369, 524, 1630, 381, 32, 31, 30, 1748, 1291, - /* 680 */ 559, 1487, 558, 557, 1610, 556, 555, 554, 287, 7, - /* 690 */ 285, 284, 382, 426, 1259, 1167, 947, 428, 1490, 558, - /* 700 */ 557, 1490, 556, 555, 554, 470, 1318, 1319, 1321, 1322, - /* 710 */ 1535, 317, 1175, 11, 10, 1373, 1264, 1743, 148, 128, - /* 720 */ 427, 422, 1534, 935, 936, 1743, 1154, 1155, 1492, 2, - /* 730 */ 1038, 550, 549, 548, 1042, 547, 1044, 1045, 546, 1047, - /* 740 */ 543, 1739, 1053, 540, 1055, 1056, 537, 534, 346, 1738, - /* 750 */ 1370, 607, 27, 302, 1253, 1254, 1255, 1256, 1257, 1261, - /* 760 */ 1262, 1263, 1168, 380, 1466, 1630, 375, 374, 373, 372, - /* 770 */ 371, 368, 367, 366, 365, 364, 360, 359, 358, 357, - /* 780 */ 356, 355, 354, 353, 524, 524, 129, 524, 1791, 1196, - /* 790 */ 492, 255, 1192, 1193, 1272, 1260, 521, 522, 1475, 239, - /* 800 */ 1630, 145, 1369, 253, 53, 1788, 1170, 52, 1368, 1367, - /* 810 */ 1366, 452, 1365, 1490, 1490, 1364, 1490, 1265, 524, 1363, - /* 820 */ 1660, 561, 1362, 47, 159, 275, 1294, 1477, 1173, 1174, - /* 830 */ 318, 1220, 1221, 1223, 1224, 1225, 1226, 1227, 503, 525, - /* 840 */ 1235, 1236, 1237, 1238, 1239, 1240, 495, 1490, 1676, 55, - /* 850 */ 1473, 1791, 1630, 25, 1619, 194, 487, 1408, 1630, 1630, - /* 860 */ 1630, 1291, 1630, 1403, 145, 1630, 507, 1401, 1788, 1630, - /* 870 */ 1630, 182, 1630, 184, 180, 186, 183, 188, 185, 439, - /* 880 */ 187, 1660, 500, 450, 502, 441, 79, 1689, 76, 444, - /* 890 */ 81, 1661, 510, 1663, 1664, 506, 448, 527, 72, 327, - /* 900 */ 1729, 11, 10, 552, 297, 1725, 141, 1372, 459, 1676, - /* 910 */ 1354, 1355, 1650, 1448, 1660, 202, 1178, 508, 58, 57, - /* 920 */ 349, 118, 46, 153, 471, 1757, 1177, 507, 343, 205, - /* 930 */ 221, 1630, 37, 37, 37, 453, 212, 1677, 1392, 228, - /* 940 */ 272, 421, 1676, 333, 1530, 329, 325, 150, 1689, 1652, - /* 950 */ 508, 81, 1661, 510, 1663, 1664, 506, 1222, 527, 1759, - /* 960 */ 507, 1729, 462, 1317, 1630, 297, 1725, 1804, 1191, 116, - /* 970 */ 207, 117, 485, 1266, 1228, 1124, 1763, 493, 148, 1660, - /* 980 */ 230, 1689, 220, 1181, 81, 1661, 510, 1663, 1664, 506, - /* 990 */ 223, 527, 118, 1180, 1729, 1660, 46, 532, 297, 1725, - /* 1000 */ 1804, 322, 117, 225, 1250, 3, 118, 1676, 326, 1786, - /* 1010 */ 516, 282, 236, 1000, 283, 508, 119, 117, 244, 155, - /* 1020 */ 1138, 363, 370, 1676, 1570, 507, 378, 1660, 377, 1630, - /* 1030 */ 379, 508, 383, 1031, 1197, 496, 384, 248, 1059, 392, - /* 1040 */ 1200, 507, 395, 1063, 162, 1630, 1689, 1070, 396, 82, - /* 1050 */ 1661, 510, 1663, 1664, 506, 1676, 527, 1068, 120, 1729, - /* 1060 */ 1199, 164, 1689, 508, 1726, 81, 1661, 510, 1663, 1664, - /* 1070 */ 506, 1201, 527, 507, 397, 1729, 398, 1630, 1660, 297, - /* 1080 */ 1725, 1804, 167, 488, 399, 169, 1198, 400, 401, 172, - /* 1090 */ 1747, 61, 404, 1660, 1689, 175, 423, 262, 1661, 510, - /* 1100 */ 1663, 1664, 506, 425, 527, 84, 1676, 1175, 1480, 179, - /* 1110 */ 1476, 291, 181, 1614, 508, 122, 123, 1478, 1474, 124, - /* 1120 */ 125, 1676, 245, 1791, 507, 192, 455, 195, 1630, 508, - /* 1130 */ 246, 197, 454, 464, 488, 463, 147, 200, 1196, 507, - /* 1140 */ 1788, 458, 472, 1630, 1660, 1689, 1770, 203, 262, 1661, - /* 1150 */ 510, 1663, 1664, 506, 514, 527, 6, 1750, 469, 1769, - /* 1160 */ 1689, 211, 481, 82, 1661, 510, 1663, 1664, 506, 206, - /* 1170 */ 527, 1760, 1676, 1729, 1791, 296, 475, 499, 1725, 1195, - /* 1180 */ 505, 468, 5, 1291, 111, 40, 497, 145, 1744, 1807, - /* 1190 */ 507, 1788, 298, 18, 1630, 512, 1660, 513, 494, 306, - /* 1200 */ 311, 310, 1579, 135, 1578, 1660, 214, 517, 518, 519, - /* 1210 */ 1183, 1689, 213, 1787, 270, 1661, 510, 1663, 1664, 506, - /* 1220 */ 504, 527, 501, 1701, 1676, 219, 232, 71, 491, 1710, - /* 1230 */ 234, 247, 508, 1676, 69, 1176, 250, 1491, 241, 222, - /* 1240 */ 606, 508, 507, 1463, 498, 48, 1630, 530, 224, 256, - /* 1250 */ 134, 507, 1175, 1660, 263, 1630, 257, 293, 467, 252, - /* 1260 */ 254, 1624, 1623, 1689, 321, 1620, 132, 1661, 510, 1663, - /* 1270 */ 1664, 506, 1689, 527, 323, 271, 1661, 510, 1663, 1664, - /* 1280 */ 506, 1676, 527, 324, 1163, 1660, 1164, 151, 1618, 508, - /* 1290 */ 328, 528, 330, 331, 1617, 332, 334, 1616, 336, 507, - /* 1300 */ 1615, 338, 1179, 1630, 1600, 152, 341, 1141, 342, 1140, - /* 1310 */ 489, 1805, 1594, 1676, 1593, 347, 348, 1660, 1592, 1591, - /* 1320 */ 1689, 508, 1107, 266, 1661, 510, 1663, 1664, 506, 1563, - /* 1330 */ 527, 507, 1562, 1561, 1560, 1630, 1559, 1558, 1557, 1556, - /* 1340 */ 1555, 1554, 1553, 1552, 1551, 1676, 1184, 1550, 1549, 1548, - /* 1350 */ 1547, 1546, 1689, 508, 1545, 132, 1661, 510, 1663, 1664, - /* 1360 */ 506, 480, 527, 507, 115, 1660, 1544, 1630, 1187, 1543, - /* 1370 */ 301, 1542, 1541, 1540, 1109, 1539, 1538, 1537, 1660, 525, - /* 1380 */ 1235, 1236, 1536, 1420, 1689, 1388, 160, 271, 1661, 510, - /* 1390 */ 1663, 1664, 506, 1676, 527, 938, 106, 138, 937, 388, - /* 1400 */ 1806, 505, 1387, 161, 390, 107, 1676, 1608, 1602, 1586, - /* 1410 */ 1585, 507, 1576, 1469, 508, 1630, 166, 171, 1660, 1419, - /* 1420 */ 966, 1417, 1415, 407, 507, 405, 1413, 411, 1630, 415, - /* 1430 */ 1411, 303, 1689, 419, 406, 270, 1661, 510, 1663, 1664, - /* 1440 */ 506, 409, 527, 410, 1702, 1689, 1676, 413, 271, 1661, - /* 1450 */ 510, 1663, 1664, 506, 508, 527, 414, 1400, 177, 1399, - /* 1460 */ 418, 417, 1386, 1471, 507, 1074, 1660, 1470, 1630, 1073, - /* 1470 */ 139, 305, 574, 576, 999, 1169, 420, 416, 412, 408, - /* 1480 */ 176, 45, 998, 178, 997, 1689, 996, 993, 271, 1661, - /* 1490 */ 510, 1663, 1664, 506, 1676, 527, 992, 991, 1409, 288, - /* 1500 */ 1167, 1404, 508, 289, 442, 63, 1402, 290, 174, 1385, - /* 1510 */ 447, 445, 507, 1384, 449, 83, 1630, 1175, 1607, 1148, - /* 1520 */ 49, 1601, 456, 1660, 1584, 126, 1583, 1575, 199, 65, - /* 1530 */ 196, 4, 133, 1689, 201, 37, 258, 1661, 510, 1663, - /* 1540 */ 1664, 506, 204, 527, 15, 457, 43, 1316, 1309, 208, - /* 1550 */ 22, 1676, 209, 23, 210, 66, 607, 1288, 1650, 508, - /* 1560 */ 1287, 216, 1345, 42, 136, 41, 173, 1168, 165, 507, - /* 1570 */ 170, 1660, 168, 1630, 17, 1340, 1339, 16, 13, 1334, - /* 1580 */ 10, 299, 1344, 1343, 300, 1251, 19, 137, 149, 1230, - /* 1590 */ 1689, 163, 1215, 265, 1661, 510, 1663, 1664, 506, 1676, - /* 1600 */ 527, 1660, 509, 1574, 29, 515, 12, 508, 1649, 233, - /* 1610 */ 72, 1170, 1229, 20, 235, 1185, 531, 507, 238, 21, - /* 1620 */ 229, 1630, 227, 529, 1314, 964, 313, 231, 67, 1676, - /* 1630 */ 68, 1660, 1692, 1173, 1174, 1232, 526, 508, 1689, 44, - /* 1640 */ 533, 267, 1661, 510, 1663, 1664, 506, 507, 527, 1060, - /* 1650 */ 1057, 1630, 535, 538, 536, 541, 544, 1054, 539, 1676, - /* 1660 */ 1037, 1052, 1048, 542, 1069, 1046, 545, 508, 1689, 551, - /* 1670 */ 1051, 259, 1661, 510, 1663, 1664, 506, 507, 527, 1660, - /* 1680 */ 73, 1630, 74, 75, 1066, 1065, 1050, 560, 1660, 1049, - /* 1690 */ 988, 1006, 563, 240, 986, 985, 984, 983, 1689, 981, - /* 1700 */ 1067, 268, 1661, 510, 1663, 1664, 506, 1676, 527, 982, - /* 1710 */ 1003, 980, 979, 1001, 976, 508, 1676, 975, 974, 971, - /* 1720 */ 970, 969, 1416, 584, 508, 507, 585, 586, 1414, 1630, - /* 1730 */ 588, 589, 590, 1412, 507, 592, 1660, 593, 1630, 594, - /* 1740 */ 1410, 596, 597, 598, 1398, 600, 1689, 601, 1397, 260, - /* 1750 */ 1661, 510, 1663, 1664, 506, 1689, 527, 1383, 269, 1661, - /* 1760 */ 510, 1663, 1664, 506, 1676, 527, 609, 604, 605, 1358, - /* 1770 */ 1358, 1171, 508, 251, 608, 1358, 1358, 1358, 1358, 1358, - /* 1780 */ 1358, 1358, 507, 1358, 1660, 1358, 1630, 1358, 1358, 1358, - /* 1790 */ 1358, 1358, 1358, 1358, 1358, 1660, 1358, 1358, 1358, 1358, - /* 1800 */ 1358, 1358, 1358, 1689, 1358, 1358, 261, 1661, 510, 1663, - /* 1810 */ 1664, 506, 1676, 527, 1660, 1358, 1358, 1358, 1358, 1358, - /* 1820 */ 508, 1358, 1358, 1676, 1358, 1358, 1358, 1358, 1358, 1358, - /* 1830 */ 507, 508, 1358, 1358, 1630, 1358, 1358, 1358, 1358, 1358, - /* 1840 */ 1358, 507, 1676, 1358, 1358, 1630, 1358, 1358, 1358, 1358, - /* 1850 */ 508, 1689, 1358, 1358, 1672, 1661, 510, 1663, 1664, 506, - /* 1860 */ 507, 527, 1689, 1358, 1630, 1671, 1661, 510, 1663, 1664, - /* 1870 */ 506, 1358, 527, 1660, 1358, 1358, 1358, 1358, 1358, 1358, - /* 1880 */ 1358, 1689, 1660, 1358, 1670, 1661, 510, 1663, 1664, 506, - /* 1890 */ 1358, 527, 1358, 1358, 1358, 1358, 1358, 1358, 1358, 1358, - /* 1900 */ 1358, 1676, 1358, 1358, 1358, 1358, 1358, 1358, 1358, 508, - /* 1910 */ 1676, 1358, 1358, 1358, 1358, 1358, 1358, 1358, 508, 507, - /* 1920 */ 1358, 1358, 1358, 1630, 1358, 1358, 1358, 1358, 507, 1358, - /* 1930 */ 1358, 1358, 1630, 1358, 1358, 1358, 1358, 1358, 1358, 1358, - /* 1940 */ 1689, 1358, 1660, 280, 1661, 510, 1663, 1664, 506, 1689, - /* 1950 */ 527, 1660, 279, 1661, 510, 1663, 1664, 506, 1358, 527, - /* 1960 */ 1358, 1358, 1358, 1358, 1358, 1358, 1358, 1358, 1358, 1358, - /* 1970 */ 1676, 1358, 1358, 1358, 1358, 1358, 1358, 1358, 508, 1676, - /* 1980 */ 1358, 1358, 1358, 1358, 1358, 1358, 1358, 508, 507, 1358, - /* 1990 */ 1358, 1358, 1630, 1358, 1358, 1358, 1358, 507, 1358, 1660, - /* 2000 */ 1358, 1630, 1358, 1358, 1358, 1358, 1358, 1358, 1358, 1689, - /* 2010 */ 484, 1358, 281, 1661, 510, 1663, 1664, 506, 1689, 527, - /* 2020 */ 1358, 278, 1661, 510, 1663, 1664, 506, 1676, 527, 1358, - /* 2030 */ 1358, 1358, 1358, 1358, 1358, 508, 1358, 1358, 1358, 112, - /* 2040 */ 1358, 1358, 1358, 1358, 1358, 507, 484, 1358, 1358, 1630, - /* 2050 */ 1358, 1358, 1358, 1358, 1358, 1358, 1358, 1358, 1358, 488, - /* 2060 */ 1358, 1358, 1358, 1358, 1358, 1358, 1689, 1358, 1358, 264, - /* 2070 */ 1661, 510, 1663, 1664, 506, 112, 527, 110, 1358, 1358, - /* 2080 */ 1358, 1358, 1358, 1358, 1358, 1358, 1358, 1358, 1358, 1358, - /* 2090 */ 1358, 1358, 215, 1736, 483, 488, 482, 1358, 1358, 1791, - /* 2100 */ 1358, 1358, 1358, 1358, 1358, 1358, 1358, 1358, 1358, 1358, - /* 2110 */ 1358, 1358, 147, 110, 1358, 1358, 1788, 1358, 1358, 1358, - /* 2120 */ 1358, 1358, 1358, 1358, 1358, 1358, 1358, 1358, 215, 1736, - /* 2130 */ 483, 1358, 482, 1358, 1358, 1791, 1358, 1358, 1358, 1358, - /* 2140 */ 1358, 1358, 1358, 1358, 1358, 1358, 1358, 1358, 145, 1358, - /* 2150 */ 1358, 1358, 1788, + /* 0 */ 132, 1783, 345, 1639, 1442, 1639, 294, 385, 311, 386, + /* 10 */ 1386, 78, 35, 33, 1782, 1474, 24, 1652, 1780, 131, + /* 20 */ 303, 1366, 1164, 1636, 114, 1636, 36, 34, 32, 31, + /* 30 */ 30, 393, 1477, 386, 1386, 1783, 1476, 1783, 1632, 1638, + /* 40 */ 1632, 1638, 1783, 524, 62, 1668, 929, 1162, 147, 528, + /* 50 */ 1781, 528, 1780, 488, 1780, 146, 1636, 109, 14, 1780, + /* 60 */ 35, 33, 1291, 508, 1170, 485, 1480, 1622, 303, 524, + /* 70 */ 1164, 1632, 1638, 1188, 36, 34, 32, 31, 30, 28, + /* 80 */ 228, 1, 528, 1681, 933, 934, 82, 1653, 511, 1655, + /* 90 */ 1656, 507, 402, 528, 113, 1162, 1721, 479, 1530, 1668, + /* 100 */ 296, 1717, 142, 608, 39, 293, 14, 478, 35, 33, + /* 110 */ 1528, 512, 1170, 489, 1163, 1377, 303, 1576, 1164, 461, + /* 120 */ 277, 1749, 36, 34, 32, 31, 30, 55, 56, 2, + /* 130 */ 95, 111, 485, 94, 93, 92, 91, 90, 89, 88, + /* 140 */ 87, 86, 477, 1162, 1202, 525, 217, 1728, 484, 55, + /* 150 */ 483, 608, 1253, 1783, 14, 384, 1165, 105, 388, 1783, + /* 160 */ 1170, 113, 1163, 351, 423, 1622, 148, 286, 277, 390, + /* 170 */ 1780, 451, 146, 1563, 1485, 1186, 1780, 2, 1168, 1169, + /* 180 */ 157, 1215, 1216, 1218, 1219, 1220, 1221, 1222, 504, 526, + /* 190 */ 1230, 1231, 1232, 1233, 1234, 1235, 1735, 275, 111, 608, + /* 200 */ 1253, 344, 1254, 343, 1165, 55, 392, 524, 149, 388, + /* 210 */ 1163, 1783, 487, 143, 1728, 1729, 287, 1733, 285, 284, + /* 220 */ 1732, 425, 1259, 198, 146, 427, 1168, 1169, 1780, 1215, + /* 230 */ 1216, 1218, 1219, 1220, 1221, 1222, 504, 526, 1230, 1231, + /* 240 */ 1232, 1233, 1234, 1235, 946, 141, 945, 1463, 426, 55, + /* 250 */ 1254, 65, 1165, 1376, 149, 1189, 1315, 1524, 27, 301, + /* 260 */ 1248, 1249, 1250, 1251, 1252, 1256, 1257, 1258, 38, 1187, + /* 270 */ 1259, 604, 603, 947, 1168, 1169, 149, 1215, 1216, 1218, + /* 280 */ 1219, 1220, 1221, 1222, 504, 526, 1230, 1231, 1232, 1233, + /* 290 */ 1234, 1235, 35, 33, 1354, 471, 1313, 1314, 1316, 1317, + /* 300 */ 303, 1190, 1164, 1622, 402, 155, 27, 301, 1248, 1249, + /* 310 */ 1250, 1251, 1252, 1256, 1257, 1258, 178, 525, 104, 103, + /* 320 */ 102, 101, 100, 99, 98, 97, 96, 1162, 140, 349, + /* 330 */ 60, 1652, 149, 59, 419, 415, 411, 407, 177, 1462, + /* 340 */ 35, 33, 1236, 307, 1170, 525, 1485, 562, 303, 554, + /* 350 */ 1164, 129, 36, 34, 32, 31, 30, 105, 26, 1668, + /* 360 */ 1487, 8, 496, 63, 428, 313, 175, 509, 36, 34, + /* 370 */ 32, 31, 30, 129, 1485, 1162, 149, 508, 315, 525, + /* 380 */ 1352, 1622, 1487, 608, 1375, 1566, 1568, 512, 35, 33, + /* 390 */ 306, 350, 1170, 1575, 1163, 149, 303, 1681, 1164, 375, + /* 400 */ 82, 1653, 511, 1655, 1656, 507, 525, 528, 1485, 9, + /* 410 */ 1721, 474, 316, 1298, 296, 1717, 1796, 485, 360, 1188, + /* 420 */ 129, 525, 1305, 1162, 174, 1755, 166, 219, 171, 1487, + /* 430 */ 169, 608, 560, 361, 1622, 1485, 1165, 566, 319, 1457, + /* 440 */ 1170, 1611, 1163, 1241, 159, 158, 113, 164, 525, 1188, + /* 450 */ 1485, 559, 558, 1374, 557, 556, 555, 9, 1168, 1169, + /* 460 */ 401, 1215, 1216, 1218, 1219, 1220, 1221, 1222, 504, 526, + /* 470 */ 1230, 1231, 1232, 1233, 1234, 1235, 336, 1485, 1783, 608, + /* 480 */ 480, 475, 1530, 111, 1165, 1373, 326, 130, 149, 308, + /* 490 */ 1163, 146, 256, 1470, 1528, 1780, 338, 334, 144, 1728, + /* 500 */ 1729, 945, 1733, 1622, 254, 53, 1168, 1169, 52, 1215, + /* 510 */ 1216, 1218, 1219, 1220, 1221, 1222, 504, 526, 1230, 1231, + /* 520 */ 1232, 1233, 1234, 1235, 560, 160, 421, 485, 437, 436, + /* 530 */ 64, 292, 1165, 435, 192, 1622, 110, 432, 1372, 493, + /* 540 */ 431, 430, 429, 559, 558, 565, 557, 556, 555, 497, + /* 550 */ 55, 32, 31, 30, 1168, 1169, 113, 1215, 1216, 1218, + /* 560 */ 1219, 1220, 1221, 1222, 504, 526, 1230, 1231, 1232, 1233, + /* 570 */ 1234, 1235, 35, 33, 274, 489, 1186, 525, 1530, 427, + /* 580 */ 303, 1217, 1164, 368, 1472, 314, 380, 80, 1622, 1482, + /* 590 */ 1528, 525, 1468, 111, 1640, 36, 34, 32, 31, 30, + /* 600 */ 54, 1371, 426, 1602, 381, 1460, 1485, 1162, 217, 1728, + /* 610 */ 484, 1217, 483, 1735, 1636, 1783, 1255, 58, 57, 348, + /* 620 */ 1485, 525, 154, 1370, 1170, 62, 1530, 342, 146, 1632, + /* 630 */ 1638, 998, 1780, 459, 11, 10, 1260, 1731, 1529, 273, + /* 640 */ 528, 2, 332, 1367, 328, 324, 151, 1481, 1000, 1369, + /* 650 */ 1485, 1622, 1036, 551, 550, 549, 1040, 548, 1042, 1043, + /* 660 */ 547, 1045, 544, 608, 1051, 541, 1053, 1054, 538, 535, + /* 670 */ 434, 433, 25, 1622, 1163, 379, 1355, 149, 374, 373, + /* 680 */ 372, 371, 370, 367, 366, 365, 364, 363, 359, 358, + /* 690 */ 357, 356, 355, 354, 353, 352, 1290, 95, 560, 1622, + /* 700 */ 94, 93, 92, 91, 90, 89, 88, 87, 86, 1416, + /* 710 */ 36, 34, 32, 31, 30, 1267, 1165, 559, 558, 501, + /* 720 */ 557, 556, 555, 1368, 494, 1365, 578, 576, 525, 1364, + /* 730 */ 1652, 1347, 1735, 36, 34, 32, 31, 30, 1168, 1169, + /* 740 */ 522, 1215, 1216, 1218, 1219, 1220, 1221, 1222, 504, 526, + /* 750 */ 1230, 1231, 1232, 1233, 1234, 1235, 1730, 1485, 1668, 525, + /* 760 */ 1363, 1652, 1461, 71, 1567, 1568, 509, 577, 1443, 437, + /* 770 */ 436, 523, 7, 1622, 435, 1622, 508, 110, 432, 1622, + /* 780 */ 1622, 431, 430, 429, 1478, 489, 1362, 1191, 1485, 1668, + /* 790 */ 36, 34, 32, 31, 30, 1188, 1681, 509, 1361, 81, + /* 800 */ 1653, 511, 1655, 1656, 507, 1360, 528, 508, 339, 1721, + /* 810 */ 1622, 1622, 1346, 276, 1717, 1652, 489, 525, 195, 562, + /* 820 */ 1359, 491, 1164, 250, 485, 1783, 1515, 1681, 1358, 241, + /* 830 */ 81, 1653, 511, 1655, 1656, 507, 1622, 528, 148, 1245, + /* 840 */ 1721, 129, 1780, 1668, 276, 1717, 1485, 1162, 1622, 458, + /* 850 */ 1488, 488, 1357, 113, 525, 1622, 1783, 223, 310, 309, + /* 860 */ 1202, 508, 1413, 503, 1170, 1622, 317, 128, 1178, 146, + /* 870 */ 1622, 933, 934, 1780, 1740, 1286, 183, 185, 1622, 181, + /* 880 */ 184, 1681, 1403, 1485, 82, 1653, 511, 1655, 1656, 507, + /* 890 */ 111, 528, 187, 1171, 1721, 186, 1149, 1150, 296, 1717, + /* 900 */ 142, 1289, 1622, 608, 438, 145, 1728, 1729, 189, 1733, + /* 910 */ 1170, 188, 220, 204, 1163, 553, 1652, 472, 467, 1748, + /* 920 */ 119, 452, 584, 583, 582, 318, 1398, 581, 580, 579, + /* 930 */ 115, 574, 573, 572, 571, 570, 569, 568, 567, 122, + /* 940 */ 563, 1396, 1286, 46, 1668, 449, 11, 10, 440, 529, + /* 950 */ 207, 1173, 509, 1349, 1350, 37, 1165, 1217, 447, 214, + /* 960 */ 1174, 463, 508, 443, 1172, 77, 1622, 1387, 37, 1642, + /* 970 */ 37, 230, 117, 118, 119, 73, 46, 1669, 1168, 1169, + /* 980 */ 1652, 533, 1681, 420, 1312, 82, 1653, 511, 1655, 1656, + /* 990 */ 507, 209, 528, 118, 1525, 1721, 1261, 119, 1751, 296, + /* 1000 */ 1717, 1796, 1179, 120, 118, 486, 1644, 222, 1668, 1223, + /* 1010 */ 1778, 1122, 232, 517, 238, 1029, 509, 249, 1176, 225, + /* 1020 */ 227, 3, 1057, 970, 1182, 1186, 508, 321, 325, 282, + /* 1030 */ 1622, 1175, 998, 362, 1061, 526, 1230, 1231, 1068, 1652, + /* 1040 */ 971, 283, 442, 1133, 1066, 121, 1681, 246, 156, 82, + /* 1050 */ 1653, 511, 1655, 1656, 507, 369, 528, 450, 1565, 1721, + /* 1060 */ 377, 382, 1192, 296, 1717, 1796, 376, 1668, 383, 391, + /* 1070 */ 378, 191, 1195, 394, 1739, 509, 395, 163, 1194, 396, + /* 1080 */ 165, 1196, 399, 445, 168, 508, 1652, 397, 439, 1622, + /* 1090 */ 398, 170, 1193, 190, 489, 173, 400, 61, 403, 422, + /* 1100 */ 176, 424, 1475, 180, 1471, 1681, 182, 85, 263, 1653, + /* 1110 */ 511, 1655, 1656, 507, 1668, 528, 291, 123, 51, 1170, + /* 1120 */ 124, 50, 509, 1473, 1469, 193, 125, 126, 453, 454, + /* 1130 */ 1606, 196, 508, 1652, 1783, 460, 1622, 199, 247, 457, + /* 1140 */ 464, 489, 202, 1191, 462, 1762, 1742, 148, 465, 1752, + /* 1150 */ 473, 1780, 1681, 515, 213, 263, 1653, 511, 1655, 1656, + /* 1160 */ 507, 1668, 528, 205, 1652, 1761, 470, 6, 208, 509, + /* 1170 */ 482, 469, 295, 112, 476, 1286, 5, 1190, 1736, 508, + /* 1180 */ 215, 1783, 40, 1622, 498, 297, 495, 1799, 216, 18, + /* 1190 */ 1702, 1574, 1668, 136, 146, 1779, 513, 514, 1780, 1681, + /* 1200 */ 509, 305, 83, 1653, 511, 1655, 1656, 507, 1573, 528, + /* 1210 */ 508, 518, 1721, 72, 1622, 221, 1720, 1717, 492, 224, + /* 1220 */ 234, 499, 1652, 226, 236, 519, 70, 520, 1486, 248, + /* 1230 */ 1681, 531, 251, 83, 1653, 511, 1655, 1656, 507, 1458, + /* 1240 */ 528, 243, 607, 1721, 253, 47, 255, 500, 1717, 257, + /* 1250 */ 1668, 264, 135, 1616, 258, 1615, 320, 1612, 506, 322, + /* 1260 */ 323, 1158, 327, 1159, 152, 1610, 329, 330, 508, 1609, + /* 1270 */ 331, 333, 1622, 1608, 335, 1607, 337, 1592, 153, 340, + /* 1280 */ 341, 1652, 1136, 1135, 1586, 1585, 346, 347, 1681, 1584, + /* 1290 */ 1583, 271, 1653, 511, 1655, 1656, 507, 505, 528, 502, + /* 1300 */ 1693, 1558, 1105, 1557, 1556, 1555, 1554, 1553, 1552, 1668, + /* 1310 */ 1551, 1550, 1549, 1548, 1547, 1546, 1545, 509, 1544, 1543, + /* 1320 */ 1542, 1541, 116, 1540, 1539, 1538, 1537, 508, 1536, 1535, + /* 1330 */ 1534, 1622, 1533, 1532, 1531, 1415, 1652, 1383, 161, 1107, + /* 1340 */ 139, 936, 1382, 1600, 387, 935, 107, 1681, 179, 404, + /* 1350 */ 133, 1653, 511, 1655, 1656, 507, 1594, 528, 1582, 1581, + /* 1360 */ 1571, 1464, 1414, 1412, 1668, 1410, 389, 1408, 1406, 1395, + /* 1370 */ 1394, 1381, 509, 1466, 162, 108, 167, 172, 45, 1465, + /* 1380 */ 49, 406, 508, 127, 456, 197, 1622, 410, 203, 1652, + /* 1390 */ 405, 414, 409, 408, 490, 1797, 1072, 413, 412, 1071, + /* 1400 */ 964, 418, 1681, 1404, 416, 83, 1653, 511, 1655, 1656, + /* 1410 */ 507, 417, 528, 1399, 611, 1721, 288, 1668, 289, 997, + /* 1420 */ 1718, 996, 995, 994, 575, 509, 441, 991, 245, 577, + /* 1430 */ 1397, 290, 1380, 446, 1379, 508, 448, 990, 989, 1622, + /* 1440 */ 106, 84, 468, 1599, 1652, 444, 600, 596, 592, 588, + /* 1450 */ 244, 1143, 1593, 455, 1580, 1681, 1652, 1579, 272, 1653, + /* 1460 */ 511, 1655, 1656, 507, 1578, 528, 1570, 66, 4, 37, + /* 1470 */ 201, 15, 1668, 212, 206, 79, 43, 211, 239, 1311, + /* 1480 */ 509, 134, 210, 22, 1668, 1642, 16, 1304, 67, 23, + /* 1490 */ 508, 218, 509, 41, 1622, 137, 42, 1283, 13, 48, + /* 1500 */ 1282, 1340, 508, 17, 1329, 1335, 1622, 1334, 298, 19, + /* 1510 */ 1681, 10, 521, 267, 1653, 511, 1655, 1656, 507, 1339, + /* 1520 */ 528, 1338, 1681, 29, 299, 133, 1653, 511, 1655, 1656, + /* 1530 */ 507, 1225, 528, 1652, 138, 1224, 150, 466, 1210, 1569, + /* 1540 */ 200, 229, 235, 516, 12, 1641, 20, 237, 21, 1180, + /* 1550 */ 231, 481, 1309, 1227, 233, 240, 68, 1141, 1035, 194, + /* 1560 */ 1246, 1668, 69, 1684, 510, 527, 44, 532, 1058, 509, + /* 1570 */ 1798, 73, 312, 1055, 534, 530, 536, 537, 539, 508, + /* 1580 */ 1052, 540, 542, 1622, 1046, 543, 300, 545, 1044, 1652, + /* 1590 */ 552, 546, 1050, 1049, 1048, 74, 75, 1067, 76, 1681, + /* 1600 */ 1047, 1064, 272, 1653, 511, 1655, 1656, 507, 1065, 528, + /* 1610 */ 1063, 962, 986, 561, 242, 1004, 564, 1668, 984, 983, + /* 1620 */ 979, 982, 981, 980, 978, 506, 977, 1001, 1652, 999, + /* 1630 */ 974, 973, 972, 969, 1411, 508, 968, 967, 585, 1622, + /* 1640 */ 586, 587, 1409, 589, 590, 591, 1407, 593, 594, 595, + /* 1650 */ 1405, 598, 597, 599, 1393, 1681, 1668, 1652, 271, 1653, + /* 1660 */ 511, 1655, 1656, 507, 509, 528, 601, 1694, 602, 1392, + /* 1670 */ 1378, 605, 606, 609, 508, 1166, 610, 252, 1622, 1353, + /* 1680 */ 1353, 302, 1353, 1353, 1353, 1668, 1652, 1353, 1353, 1353, + /* 1690 */ 1353, 1353, 1353, 509, 1681, 1353, 1353, 272, 1653, 511, + /* 1700 */ 1655, 1656, 507, 508, 528, 1353, 1353, 1622, 1353, 1353, + /* 1710 */ 304, 1353, 1353, 1353, 1668, 1353, 1353, 1652, 1353, 1353, + /* 1720 */ 1353, 1353, 509, 1681, 1353, 1353, 272, 1653, 511, 1655, + /* 1730 */ 1656, 507, 508, 528, 1353, 1353, 1622, 1353, 1353, 1353, + /* 1740 */ 1353, 1353, 1353, 1353, 1353, 1668, 1353, 1353, 1652, 1353, + /* 1750 */ 1353, 1353, 1681, 509, 1353, 259, 1653, 511, 1655, 1656, + /* 1760 */ 507, 1353, 528, 508, 1353, 1353, 1353, 1622, 1353, 1353, + /* 1770 */ 1353, 1353, 1353, 1353, 1353, 1353, 1668, 1353, 1353, 1652, + /* 1780 */ 1353, 1353, 1353, 1681, 509, 1353, 266, 1653, 511, 1655, + /* 1790 */ 1656, 507, 1353, 528, 508, 1353, 1353, 1353, 1622, 1353, + /* 1800 */ 1353, 1353, 1353, 1353, 1353, 1353, 1353, 1668, 1353, 1353, + /* 1810 */ 1353, 1652, 1353, 1353, 1681, 509, 1353, 268, 1653, 511, + /* 1820 */ 1655, 1656, 507, 1353, 528, 508, 1353, 1353, 1652, 1622, + /* 1830 */ 1353, 1353, 1353, 1353, 1353, 1353, 1353, 1353, 1353, 1668, + /* 1840 */ 1353, 1353, 1353, 1353, 1353, 1681, 1353, 509, 260, 1653, + /* 1850 */ 511, 1655, 1656, 507, 1353, 528, 1668, 508, 1353, 1353, + /* 1860 */ 1353, 1622, 1353, 1353, 509, 1353, 1353, 1652, 1353, 1353, + /* 1870 */ 1353, 1353, 1353, 1353, 508, 1353, 1353, 1681, 1622, 1353, + /* 1880 */ 269, 1653, 511, 1655, 1656, 507, 1353, 528, 1353, 1353, + /* 1890 */ 1353, 1353, 1353, 1353, 1681, 1668, 1353, 261, 1653, 511, + /* 1900 */ 1655, 1656, 507, 509, 528, 1353, 1652, 1353, 1353, 1353, + /* 1910 */ 1353, 1353, 1353, 508, 1353, 1353, 1353, 1622, 1353, 1353, + /* 1920 */ 1353, 1353, 1353, 1652, 1353, 1353, 1353, 1353, 1353, 1353, + /* 1930 */ 1353, 1353, 1353, 1681, 1668, 1652, 270, 1653, 511, 1655, + /* 1940 */ 1656, 507, 509, 528, 1353, 1353, 1353, 1353, 1353, 1353, + /* 1950 */ 1353, 1668, 508, 1353, 1353, 1353, 1622, 1353, 1353, 509, + /* 1960 */ 1353, 1353, 1353, 1668, 1353, 1353, 1353, 1353, 1353, 508, + /* 1970 */ 1353, 509, 1681, 1622, 1652, 262, 1653, 511, 1655, 1656, + /* 1980 */ 507, 508, 528, 1353, 1353, 1622, 1353, 1652, 1353, 1681, + /* 1990 */ 1353, 1353, 1664, 1653, 511, 1655, 1656, 507, 1353, 528, + /* 2000 */ 1353, 1681, 1668, 1353, 1663, 1653, 511, 1655, 1656, 507, + /* 2010 */ 509, 528, 1353, 1353, 1353, 1668, 1353, 1353, 1353, 1353, + /* 2020 */ 508, 1353, 1353, 509, 1622, 1353, 1652, 1353, 1353, 1353, + /* 2030 */ 1353, 1353, 1353, 508, 1353, 1353, 1353, 1622, 1353, 1353, + /* 2040 */ 1681, 1353, 1353, 1662, 1653, 511, 1655, 1656, 507, 1353, + /* 2050 */ 528, 1353, 1353, 1681, 1668, 1353, 280, 1653, 511, 1655, + /* 2060 */ 1656, 507, 509, 528, 1353, 1353, 1353, 1353, 1353, 1353, + /* 2070 */ 1353, 1353, 508, 1353, 1353, 1353, 1622, 1353, 1353, 1353, + /* 2080 */ 1353, 1652, 1353, 1353, 1353, 1353, 1353, 1353, 1353, 1353, + /* 2090 */ 1652, 1353, 1681, 1353, 1353, 279, 1653, 511, 1655, 1656, + /* 2100 */ 507, 1353, 528, 1353, 1353, 1353, 1353, 1353, 1353, 1668, + /* 2110 */ 1353, 1353, 1353, 1353, 1353, 1353, 1353, 509, 1668, 1353, + /* 2120 */ 1353, 1353, 1353, 1353, 1353, 1353, 509, 508, 1353, 1353, + /* 2130 */ 1353, 1622, 1353, 1353, 1353, 1353, 508, 1652, 1353, 1353, + /* 2140 */ 1622, 1353, 1353, 1353, 1353, 1353, 1353, 1681, 1353, 1353, + /* 2150 */ 281, 1653, 511, 1655, 1656, 507, 1681, 528, 1353, 278, + /* 2160 */ 1653, 511, 1655, 1656, 507, 1668, 528, 1353, 1353, 1353, + /* 2170 */ 1353, 1353, 1353, 509, 1353, 1353, 1353, 1353, 1353, 1353, + /* 2180 */ 1353, 1353, 1353, 508, 1353, 1353, 1353, 1622, 1353, 1353, + /* 2190 */ 1353, 1353, 1353, 1353, 1353, 1353, 1353, 1353, 1353, 1353, + /* 2200 */ 1353, 1353, 1353, 1681, 1353, 1353, 265, 1653, 511, 1655, + /* 2210 */ 1656, 507, 1353, 528, }; static const YYCODETYPE yy_lookahead[] = { - /* 0 */ 246, 273, 248, 249, 276, 246, 250, 248, 249, 324, - /* 10 */ 325, 4, 12, 13, 242, 271, 244, 243, 262, 339, - /* 20 */ 20, 293, 22, 279, 20, 269, 12, 13, 14, 15, - /* 30 */ 16, 247, 352, 255, 250, 279, 356, 309, 310, 12, - /* 40 */ 13, 14, 15, 16, 271, 271, 268, 47, 320, 42, - /* 50 */ 43, 278, 47, 279, 250, 277, 283, 55, 58, 315, - /* 60 */ 12, 13, 14, 289, 64, 2, 262, 293, 20, 64, - /* 70 */ 22, 0, 58, 299, 20, 12, 13, 14, 15, 16, - /* 80 */ 4, 81, 80, 279, 310, 83, 250, 313, 314, 315, - /* 90 */ 316, 317, 318, 0, 320, 47, 82, 323, 262, 251, - /* 100 */ 252, 327, 328, 103, 90, 269, 58, 12, 13, 14, - /* 110 */ 15, 16, 64, 339, 114, 279, 270, 24, 25, 26, - /* 120 */ 27, 28, 29, 30, 31, 32, 352, 75, 282, 81, - /* 130 */ 356, 60, 61, 62, 63, 81, 65, 66, 67, 68, - /* 140 */ 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, - /* 150 */ 289, 103, 279, 292, 140, 81, 295, 81, 158, 286, - /* 160 */ 21, 339, 114, 24, 25, 26, 27, 28, 29, 30, - /* 170 */ 31, 32, 120, 121, 352, 250, 162, 150, 356, 247, - /* 180 */ 180, 181, 250, 183, 184, 185, 186, 187, 188, 189, - /* 190 */ 190, 191, 192, 193, 194, 195, 196, 197, 0, 12, - /* 200 */ 13, 14, 15, 16, 167, 168, 158, 256, 171, 284, - /* 210 */ 210, 260, 198, 199, 200, 201, 202, 203, 204, 205, - /* 220 */ 206, 207, 0, 12, 13, 14, 15, 16, 180, 181, - /* 230 */ 250, 183, 184, 185, 186, 187, 188, 189, 190, 191, - /* 240 */ 192, 193, 194, 195, 196, 197, 12, 13, 0, 20, - /* 250 */ 253, 22, 60, 61, 20, 57, 22, 65, 231, 279, - /* 260 */ 68, 69, 263, 339, 72, 73, 74, 12, 13, 82, - /* 270 */ 271, 274, 243, 57, 20, 20, 352, 22, 49, 280, - /* 280 */ 356, 47, 60, 61, 210, 20, 210, 65, 255, 47, - /* 290 */ 68, 69, 58, 82, 72, 73, 74, 317, 64, 0, - /* 300 */ 271, 14, 47, 243, 243, 250, 64, 20, 279, 250, - /* 310 */ 277, 331, 332, 333, 334, 81, 336, 262, 289, 64, - /* 320 */ 21, 262, 293, 24, 25, 26, 27, 28, 29, 30, - /* 330 */ 31, 32, 271, 243, 279, 81, 81, 103, 279, 310, - /* 340 */ 279, 93, 313, 314, 315, 316, 317, 318, 114, 320, - /* 350 */ 289, 20, 323, 293, 293, 271, 327, 328, 103, 271, - /* 360 */ 112, 113, 278, 115, 116, 117, 243, 283, 280, 114, - /* 370 */ 259, 310, 261, 271, 313, 314, 315, 316, 317, 318, - /* 380 */ 278, 320, 250, 293, 323, 283, 311, 2, 327, 328, - /* 390 */ 329, 20, 158, 3, 262, 257, 258, 12, 13, 14, - /* 400 */ 15, 16, 341, 12, 13, 14, 15, 16, 347, 348, - /* 410 */ 335, 279, 81, 158, 180, 181, 293, 183, 184, 185, - /* 420 */ 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, - /* 430 */ 196, 197, 250, 257, 258, 180, 181, 243, 183, 184, - /* 440 */ 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, - /* 450 */ 195, 196, 197, 12, 13, 14, 243, 4, 20, 19, - /* 460 */ 281, 20, 243, 22, 210, 210, 264, 288, 289, 267, - /* 470 */ 14, 184, 19, 33, 12, 13, 20, 273, 243, 243, - /* 480 */ 273, 299, 20, 276, 22, 45, 33, 293, 47, 250, - /* 490 */ 144, 51, 52, 53, 54, 55, 14, 293, 45, 240, - /* 500 */ 293, 262, 20, 50, 57, 64, 293, 271, 55, 47, - /* 510 */ 153, 250, 293, 309, 310, 279, 309, 310, 279, 250, - /* 520 */ 80, 339, 81, 83, 320, 289, 64, 320, 293, 293, - /* 530 */ 173, 174, 64, 80, 352, 299, 83, 146, 356, 289, - /* 540 */ 279, 210, 41, 81, 103, 295, 310, 20, 279, 313, - /* 550 */ 314, 315, 316, 317, 318, 114, 320, 117, 299, 323, - /* 560 */ 243, 215, 216, 327, 328, 103, 12, 13, 14, 15, - /* 570 */ 16, 273, 80, 263, 272, 339, 114, 93, 317, 92, - /* 580 */ 88, 271, 142, 82, 146, 145, 317, 0, 352, 81, - /* 590 */ 280, 293, 356, 332, 333, 334, 253, 336, 339, 158, - /* 600 */ 116, 332, 333, 334, 164, 336, 166, 309, 310, 266, - /* 610 */ 293, 352, 58, 288, 289, 356, 226, 274, 320, 4, - /* 620 */ 158, 180, 181, 243, 183, 184, 185, 186, 187, 188, - /* 630 */ 189, 190, 191, 192, 193, 194, 195, 196, 197, 35, - /* 640 */ 184, 149, 180, 181, 90, 183, 184, 185, 186, 187, - /* 650 */ 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, - /* 660 */ 12, 13, 18, 93, 20, 157, 180, 159, 20, 250, - /* 670 */ 22, 27, 250, 293, 30, 14, 15, 16, 208, 209, - /* 680 */ 93, 262, 112, 113, 262, 115, 116, 117, 84, 37, - /* 690 */ 86, 87, 48, 89, 140, 47, 22, 93, 279, 112, - /* 700 */ 113, 279, 115, 116, 117, 219, 220, 221, 222, 223, - /* 710 */ 271, 263, 64, 1, 2, 243, 162, 311, 210, 271, - /* 720 */ 116, 47, 283, 42, 43, 311, 169, 170, 280, 81, - /* 730 */ 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, - /* 740 */ 104, 335, 106, 107, 108, 109, 110, 111, 299, 335, - /* 750 */ 243, 103, 198, 199, 200, 201, 202, 203, 204, 205, - /* 760 */ 206, 207, 114, 119, 0, 293, 122, 123, 124, 125, - /* 770 */ 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, - /* 780 */ 136, 137, 138, 139, 250, 250, 18, 250, 339, 20, - /* 790 */ 41, 23, 20, 20, 82, 140, 262, 262, 272, 262, - /* 800 */ 293, 352, 243, 35, 36, 356, 158, 39, 243, 243, - /* 810 */ 243, 299, 243, 279, 279, 243, 279, 162, 250, 243, - /* 820 */ 243, 57, 243, 146, 56, 148, 211, 272, 180, 181, - /* 830 */ 262, 183, 184, 185, 186, 187, 188, 189, 190, 191, - /* 840 */ 192, 193, 194, 195, 196, 197, 41, 279, 271, 81, - /* 850 */ 272, 339, 293, 198, 0, 272, 279, 0, 293, 293, - /* 860 */ 293, 209, 293, 0, 352, 293, 289, 0, 356, 293, - /* 870 */ 293, 85, 293, 85, 88, 85, 88, 85, 88, 22, - /* 880 */ 88, 243, 58, 21, 272, 22, 118, 310, 81, 22, - /* 890 */ 313, 314, 315, 316, 317, 318, 34, 320, 91, 45, - /* 900 */ 323, 1, 2, 272, 327, 328, 329, 244, 303, 271, - /* 910 */ 195, 196, 44, 260, 243, 146, 47, 279, 150, 151, - /* 920 */ 152, 41, 41, 155, 350, 348, 47, 289, 160, 41, - /* 930 */ 359, 293, 41, 41, 41, 307, 344, 271, 249, 41, - /* 940 */ 172, 251, 271, 175, 282, 177, 178, 179, 310, 81, - /* 950 */ 279, 313, 314, 315, 316, 317, 318, 184, 320, 312, - /* 960 */ 289, 323, 82, 82, 293, 327, 328, 329, 20, 41, - /* 970 */ 82, 41, 337, 82, 82, 82, 338, 228, 210, 243, - /* 980 */ 82, 310, 353, 114, 313, 314, 315, 316, 317, 318, - /* 990 */ 353, 320, 41, 114, 323, 243, 41, 41, 327, 328, - /* 1000 */ 329, 250, 41, 353, 180, 340, 41, 271, 45, 338, - /* 1010 */ 82, 308, 82, 47, 257, 279, 41, 41, 301, 40, - /* 1020 */ 156, 250, 287, 271, 250, 289, 140, 243, 285, 293, - /* 1030 */ 285, 279, 250, 82, 20, 230, 245, 82, 82, 245, - /* 1040 */ 20, 289, 305, 82, 255, 293, 310, 82, 289, 313, - /* 1050 */ 314, 315, 316, 317, 318, 271, 320, 82, 82, 323, - /* 1060 */ 20, 255, 310, 279, 328, 313, 314, 315, 316, 317, - /* 1070 */ 318, 20, 320, 289, 297, 323, 300, 293, 243, 327, - /* 1080 */ 328, 329, 255, 299, 297, 255, 20, 279, 290, 255, - /* 1090 */ 338, 255, 250, 243, 310, 255, 245, 313, 314, 315, - /* 1100 */ 316, 317, 318, 271, 320, 250, 271, 64, 271, 271, - /* 1110 */ 271, 245, 271, 293, 279, 271, 271, 271, 271, 271, - /* 1120 */ 271, 271, 305, 339, 289, 253, 304, 253, 293, 279, - /* 1130 */ 297, 253, 165, 290, 299, 279, 352, 253, 20, 289, - /* 1140 */ 356, 289, 218, 293, 243, 310, 349, 294, 313, 314, - /* 1150 */ 315, 316, 317, 318, 217, 320, 225, 346, 293, 349, - /* 1160 */ 310, 345, 224, 313, 314, 315, 316, 317, 318, 294, - /* 1170 */ 320, 312, 271, 323, 339, 293, 293, 327, 328, 20, - /* 1180 */ 279, 213, 212, 209, 279, 40, 229, 352, 311, 360, - /* 1190 */ 289, 356, 232, 81, 293, 293, 243, 293, 227, 293, - /* 1200 */ 12, 13, 294, 343, 294, 243, 330, 143, 291, 290, - /* 1210 */ 22, 310, 342, 355, 313, 314, 315, 316, 317, 318, - /* 1220 */ 319, 320, 321, 322, 271, 354, 279, 81, 355, 326, - /* 1230 */ 253, 267, 279, 271, 253, 47, 250, 279, 253, 354, - /* 1240 */ 245, 279, 289, 261, 355, 302, 293, 275, 354, 265, - /* 1250 */ 306, 289, 64, 243, 265, 293, 265, 298, 296, 254, - /* 1260 */ 241, 0, 0, 310, 72, 0, 313, 314, 315, 316, - /* 1270 */ 317, 318, 310, 320, 47, 313, 314, 315, 316, 317, - /* 1280 */ 318, 271, 320, 176, 47, 243, 47, 47, 0, 279, - /* 1290 */ 176, 103, 47, 47, 0, 176, 47, 0, 47, 289, - /* 1300 */ 0, 47, 114, 293, 0, 81, 162, 114, 161, 158, - /* 1310 */ 357, 358, 0, 271, 0, 154, 153, 243, 0, 0, - /* 1320 */ 310, 279, 44, 313, 314, 315, 316, 317, 318, 0, - /* 1330 */ 320, 289, 0, 0, 0, 293, 0, 0, 0, 0, - /* 1340 */ 0, 0, 0, 0, 0, 271, 158, 0, 0, 0, - /* 1350 */ 0, 0, 310, 279, 0, 313, 314, 315, 316, 317, - /* 1360 */ 318, 351, 320, 289, 40, 243, 0, 293, 180, 0, - /* 1370 */ 296, 0, 0, 0, 22, 0, 0, 0, 243, 191, - /* 1380 */ 192, 193, 0, 0, 310, 0, 40, 313, 314, 315, - /* 1390 */ 316, 317, 318, 271, 320, 14, 37, 41, 14, 44, - /* 1400 */ 358, 279, 0, 38, 44, 37, 271, 0, 0, 0, - /* 1410 */ 0, 289, 0, 0, 279, 293, 37, 37, 243, 0, - /* 1420 */ 59, 0, 0, 37, 289, 47, 0, 37, 293, 37, - /* 1430 */ 0, 296, 310, 37, 45, 313, 314, 315, 316, 317, - /* 1440 */ 318, 47, 320, 45, 322, 310, 271, 47, 313, 314, - /* 1450 */ 315, 316, 317, 318, 279, 320, 45, 0, 33, 0, - /* 1460 */ 45, 47, 0, 0, 289, 47, 243, 0, 293, 22, - /* 1470 */ 45, 296, 41, 41, 47, 22, 51, 52, 53, 54, - /* 1480 */ 55, 90, 47, 88, 47, 310, 47, 47, 313, 314, - /* 1490 */ 315, 316, 317, 318, 271, 320, 47, 47, 0, 22, - /* 1500 */ 47, 0, 279, 22, 48, 80, 0, 22, 83, 0, - /* 1510 */ 22, 47, 289, 0, 22, 20, 293, 64, 0, 47, - /* 1520 */ 146, 0, 22, 243, 0, 163, 0, 0, 37, 81, - /* 1530 */ 143, 41, 81, 310, 141, 41, 313, 314, 315, 316, - /* 1540 */ 317, 318, 82, 320, 214, 146, 41, 82, 82, 81, - /* 1550 */ 81, 271, 41, 41, 44, 81, 103, 82, 44, 279, - /* 1560 */ 82, 44, 82, 41, 44, 208, 141, 114, 143, 289, - /* 1570 */ 145, 243, 147, 293, 41, 47, 47, 214, 214, 82, - /* 1580 */ 2, 47, 47, 47, 47, 180, 41, 44, 44, 82, - /* 1590 */ 310, 166, 22, 313, 314, 315, 316, 317, 318, 271, - /* 1600 */ 320, 243, 182, 0, 81, 144, 81, 279, 44, 37, - /* 1610 */ 91, 158, 82, 81, 141, 22, 47, 289, 44, 81, - /* 1620 */ 81, 293, 82, 92, 82, 59, 47, 81, 81, 271, - /* 1630 */ 81, 243, 81, 180, 181, 82, 81, 279, 310, 81, - /* 1640 */ 81, 313, 314, 315, 316, 317, 318, 289, 320, 82, - /* 1650 */ 82, 293, 47, 47, 81, 47, 47, 82, 81, 271, - /* 1660 */ 22, 105, 82, 81, 47, 82, 81, 279, 310, 93, - /* 1670 */ 105, 313, 314, 315, 316, 317, 318, 289, 320, 243, - /* 1680 */ 81, 293, 81, 81, 47, 22, 105, 58, 243, 105, - /* 1690 */ 47, 64, 79, 41, 47, 47, 47, 47, 310, 22, - /* 1700 */ 114, 313, 314, 315, 316, 317, 318, 271, 320, 47, - /* 1710 */ 64, 47, 47, 47, 47, 279, 271, 47, 47, 47, - /* 1720 */ 47, 47, 0, 47, 279, 289, 45, 37, 0, 293, - /* 1730 */ 47, 45, 37, 0, 289, 47, 243, 45, 293, 37, - /* 1740 */ 0, 47, 45, 37, 0, 47, 310, 46, 0, 313, - /* 1750 */ 314, 315, 316, 317, 318, 310, 320, 0, 313, 314, - /* 1760 */ 315, 316, 317, 318, 271, 320, 20, 22, 21, 361, - /* 1770 */ 361, 22, 279, 22, 21, 361, 361, 361, 361, 361, - /* 1780 */ 361, 361, 289, 361, 243, 361, 293, 361, 361, 361, - /* 1790 */ 361, 361, 361, 361, 361, 243, 361, 361, 361, 361, - /* 1800 */ 361, 361, 361, 310, 361, 361, 313, 314, 315, 316, - /* 1810 */ 317, 318, 271, 320, 243, 361, 361, 361, 361, 361, - /* 1820 */ 279, 361, 361, 271, 361, 361, 361, 361, 361, 361, - /* 1830 */ 289, 279, 361, 361, 293, 361, 361, 361, 361, 361, - /* 1840 */ 361, 289, 271, 361, 361, 293, 361, 361, 361, 361, - /* 1850 */ 279, 310, 361, 361, 313, 314, 315, 316, 317, 318, - /* 1860 */ 289, 320, 310, 361, 293, 313, 314, 315, 316, 317, - /* 1870 */ 318, 361, 320, 243, 361, 361, 361, 361, 361, 361, - /* 1880 */ 361, 310, 243, 361, 313, 314, 315, 316, 317, 318, - /* 1890 */ 361, 320, 361, 361, 361, 361, 361, 361, 361, 361, - /* 1900 */ 361, 271, 361, 361, 361, 361, 361, 361, 361, 279, - /* 1910 */ 271, 361, 361, 361, 361, 361, 361, 361, 279, 289, - /* 1920 */ 361, 361, 361, 293, 361, 361, 361, 361, 289, 361, - /* 1930 */ 361, 361, 293, 361, 361, 361, 361, 361, 361, 361, - /* 1940 */ 310, 361, 243, 313, 314, 315, 316, 317, 318, 310, - /* 1950 */ 320, 243, 313, 314, 315, 316, 317, 318, 361, 320, - /* 1960 */ 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, - /* 1970 */ 271, 361, 361, 361, 361, 361, 361, 361, 279, 271, - /* 1980 */ 361, 361, 361, 361, 361, 361, 361, 279, 289, 361, - /* 1990 */ 361, 361, 293, 361, 361, 361, 361, 289, 361, 243, - /* 2000 */ 361, 293, 361, 361, 361, 361, 361, 361, 361, 310, - /* 2010 */ 250, 361, 313, 314, 315, 316, 317, 318, 310, 320, - /* 2020 */ 361, 313, 314, 315, 316, 317, 318, 271, 320, 361, - /* 2030 */ 361, 361, 361, 361, 361, 279, 361, 361, 361, 279, - /* 2040 */ 361, 361, 361, 361, 361, 289, 250, 361, 361, 293, - /* 2050 */ 361, 361, 361, 361, 361, 361, 361, 361, 361, 299, - /* 2060 */ 361, 361, 361, 361, 361, 361, 310, 361, 361, 313, - /* 2070 */ 314, 315, 316, 317, 318, 279, 320, 317, 361, 361, - /* 2080 */ 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, - /* 2090 */ 361, 361, 332, 333, 334, 299, 336, 361, 361, 339, - /* 2100 */ 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, - /* 2110 */ 361, 361, 352, 317, 361, 361, 356, 361, 361, 361, - /* 2120 */ 361, 361, 361, 361, 361, 361, 361, 361, 332, 333, - /* 2130 */ 334, 361, 336, 361, 361, 339, 361, 361, 361, 361, - /* 2140 */ 361, 361, 361, 361, 361, 361, 361, 361, 352, 361, - /* 2150 */ 361, 361, 356, + /* 0 */ 254, 336, 296, 271, 258, 271, 274, 244, 274, 246, + /* 10 */ 247, 251, 12, 13, 349, 270, 2, 241, 353, 240, + /* 20 */ 20, 242, 22, 291, 264, 291, 12, 13, 14, 15, + /* 30 */ 16, 244, 272, 246, 247, 336, 271, 336, 306, 307, + /* 40 */ 306, 307, 336, 20, 253, 269, 4, 47, 349, 317, + /* 50 */ 349, 317, 353, 277, 353, 349, 291, 266, 58, 353, + /* 60 */ 12, 13, 14, 287, 64, 248, 275, 291, 20, 20, + /* 70 */ 22, 306, 307, 20, 12, 13, 14, 15, 16, 321, + /* 80 */ 322, 81, 317, 307, 42, 43, 310, 311, 312, 313, + /* 90 */ 314, 315, 57, 317, 277, 47, 320, 20, 269, 269, + /* 100 */ 324, 325, 326, 103, 81, 276, 58, 277, 12, 13, + /* 110 */ 281, 287, 64, 296, 114, 241, 20, 293, 22, 296, + /* 120 */ 58, 345, 12, 13, 14, 15, 16, 81, 4, 81, + /* 130 */ 21, 314, 248, 24, 25, 26, 27, 28, 29, 30, + /* 140 */ 31, 32, 312, 47, 82, 248, 329, 330, 331, 81, + /* 150 */ 333, 103, 90, 336, 58, 245, 156, 260, 248, 336, + /* 160 */ 64, 277, 114, 248, 267, 291, 349, 35, 58, 14, + /* 170 */ 353, 296, 349, 277, 277, 20, 353, 81, 178, 179, + /* 180 */ 284, 181, 182, 183, 184, 185, 186, 187, 188, 189, + /* 190 */ 190, 191, 192, 193, 194, 195, 308, 282, 314, 103, + /* 200 */ 90, 155, 140, 157, 156, 81, 245, 20, 208, 248, + /* 210 */ 114, 336, 328, 329, 330, 331, 84, 333, 86, 87, + /* 220 */ 332, 89, 160, 55, 349, 93, 178, 179, 353, 181, + /* 230 */ 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, + /* 240 */ 192, 193, 194, 195, 20, 268, 22, 0, 116, 81, + /* 250 */ 140, 83, 156, 241, 208, 20, 178, 280, 196, 197, + /* 260 */ 198, 199, 200, 201, 202, 203, 204, 205, 81, 20, + /* 270 */ 160, 249, 250, 49, 178, 179, 208, 181, 182, 183, + /* 280 */ 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, + /* 290 */ 194, 195, 12, 13, 0, 217, 218, 219, 220, 221, + /* 300 */ 20, 20, 22, 291, 57, 55, 196, 197, 198, 199, + /* 310 */ 200, 201, 202, 203, 204, 205, 33, 248, 24, 25, + /* 320 */ 26, 27, 28, 29, 30, 31, 32, 47, 45, 260, + /* 330 */ 80, 241, 208, 83, 51, 52, 53, 54, 55, 0, + /* 340 */ 12, 13, 14, 261, 64, 248, 277, 57, 20, 92, + /* 350 */ 22, 269, 12, 13, 14, 15, 16, 260, 2, 269, + /* 360 */ 278, 81, 41, 80, 267, 261, 83, 277, 12, 13, + /* 370 */ 14, 15, 16, 269, 277, 47, 208, 287, 279, 248, + /* 380 */ 238, 291, 278, 103, 241, 286, 287, 287, 12, 13, + /* 390 */ 290, 260, 64, 293, 114, 208, 20, 307, 22, 75, + /* 400 */ 310, 311, 312, 313, 314, 315, 248, 317, 277, 81, + /* 410 */ 320, 144, 261, 14, 324, 325, 326, 248, 260, 20, + /* 420 */ 269, 248, 82, 47, 141, 335, 143, 146, 145, 278, + /* 430 */ 147, 103, 93, 260, 291, 277, 156, 257, 296, 259, + /* 440 */ 64, 0, 114, 14, 120, 121, 277, 164, 248, 20, + /* 450 */ 277, 112, 113, 241, 115, 116, 117, 81, 178, 179, + /* 460 */ 260, 181, 182, 183, 184, 185, 186, 187, 188, 189, + /* 470 */ 190, 191, 192, 193, 194, 195, 151, 277, 336, 103, + /* 480 */ 213, 214, 269, 314, 156, 241, 45, 18, 208, 276, + /* 490 */ 114, 349, 23, 270, 281, 353, 171, 172, 329, 330, + /* 500 */ 331, 22, 333, 291, 35, 36, 178, 179, 39, 181, + /* 510 */ 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, + /* 520 */ 192, 193, 194, 195, 93, 56, 47, 248, 60, 61, + /* 530 */ 165, 166, 156, 65, 169, 291, 68, 69, 241, 41, + /* 540 */ 72, 73, 74, 112, 113, 64, 115, 116, 117, 228, + /* 550 */ 81, 14, 15, 16, 178, 179, 277, 181, 182, 183, + /* 560 */ 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, + /* 570 */ 194, 195, 12, 13, 18, 296, 20, 248, 269, 93, + /* 580 */ 20, 182, 22, 27, 270, 276, 30, 118, 291, 260, + /* 590 */ 281, 248, 270, 314, 271, 12, 13, 14, 15, 16, + /* 600 */ 3, 241, 116, 260, 48, 0, 277, 47, 329, 330, + /* 610 */ 331, 182, 333, 308, 291, 336, 140, 148, 149, 150, + /* 620 */ 277, 248, 153, 241, 64, 253, 269, 158, 349, 306, + /* 630 */ 307, 47, 353, 260, 1, 2, 160, 332, 281, 170, + /* 640 */ 317, 81, 173, 242, 175, 176, 177, 275, 64, 241, + /* 650 */ 277, 291, 94, 95, 96, 97, 98, 99, 100, 101, + /* 660 */ 102, 103, 104, 103, 106, 107, 108, 109, 110, 111, + /* 670 */ 255, 256, 196, 291, 114, 119, 0, 208, 122, 123, + /* 680 */ 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, + /* 690 */ 134, 135, 136, 137, 138, 139, 4, 21, 93, 291, + /* 700 */ 24, 25, 26, 27, 28, 29, 30, 31, 32, 0, + /* 710 */ 12, 13, 14, 15, 16, 82, 156, 112, 113, 58, + /* 720 */ 115, 116, 117, 241, 226, 241, 255, 256, 248, 241, + /* 730 */ 241, 148, 308, 12, 13, 14, 15, 16, 178, 179, + /* 740 */ 260, 181, 182, 183, 184, 185, 186, 187, 188, 189, + /* 750 */ 190, 191, 192, 193, 194, 195, 332, 277, 269, 248, + /* 760 */ 241, 241, 0, 251, 286, 287, 277, 41, 258, 60, + /* 770 */ 61, 260, 37, 291, 65, 291, 287, 68, 69, 291, + /* 780 */ 291, 72, 73, 74, 272, 296, 241, 20, 277, 269, + /* 790 */ 12, 13, 14, 15, 16, 20, 307, 277, 241, 310, + /* 800 */ 311, 312, 313, 314, 315, 241, 317, 287, 82, 320, + /* 810 */ 291, 291, 229, 324, 325, 241, 296, 248, 270, 57, + /* 820 */ 241, 224, 22, 262, 248, 336, 265, 307, 241, 260, + /* 830 */ 310, 311, 312, 313, 314, 315, 291, 317, 349, 178, + /* 840 */ 320, 269, 353, 269, 324, 325, 277, 47, 291, 300, + /* 850 */ 278, 277, 241, 277, 248, 291, 336, 356, 12, 13, + /* 860 */ 82, 287, 0, 270, 64, 291, 260, 146, 22, 349, + /* 870 */ 291, 42, 43, 353, 206, 207, 85, 85, 291, 88, + /* 880 */ 88, 307, 0, 277, 310, 311, 312, 313, 314, 315, + /* 890 */ 314, 317, 85, 47, 320, 88, 167, 168, 324, 325, + /* 900 */ 326, 209, 291, 103, 22, 329, 330, 331, 85, 333, + /* 910 */ 64, 88, 338, 146, 114, 270, 241, 347, 344, 345, + /* 920 */ 41, 304, 60, 61, 62, 63, 0, 65, 66, 67, + /* 930 */ 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, + /* 940 */ 78, 0, 207, 41, 269, 21, 1, 2, 22, 103, + /* 950 */ 41, 47, 277, 193, 194, 41, 156, 182, 34, 341, + /* 960 */ 114, 82, 287, 22, 47, 81, 291, 247, 41, 44, + /* 970 */ 41, 41, 41, 41, 41, 91, 41, 269, 178, 179, + /* 980 */ 241, 41, 307, 249, 82, 310, 311, 312, 313, 314, + /* 990 */ 315, 82, 317, 41, 280, 320, 82, 41, 309, 324, + /* 1000 */ 325, 326, 156, 41, 41, 334, 81, 350, 269, 82, + /* 1010 */ 335, 82, 82, 82, 82, 82, 277, 82, 114, 350, + /* 1020 */ 350, 337, 82, 47, 178, 20, 287, 248, 45, 305, + /* 1030 */ 291, 114, 47, 248, 82, 189, 190, 191, 82, 241, + /* 1040 */ 64, 255, 4, 154, 82, 82, 307, 298, 40, 310, + /* 1050 */ 311, 312, 313, 314, 315, 285, 317, 19, 248, 320, + /* 1060 */ 140, 248, 20, 324, 325, 326, 283, 269, 243, 243, + /* 1070 */ 283, 33, 20, 302, 335, 277, 287, 253, 20, 295, + /* 1080 */ 253, 20, 277, 45, 253, 287, 241, 297, 50, 291, + /* 1090 */ 295, 253, 20, 55, 296, 253, 288, 253, 248, 243, + /* 1100 */ 253, 269, 269, 269, 269, 307, 269, 248, 310, 311, + /* 1110 */ 312, 313, 314, 315, 269, 317, 243, 269, 80, 64, + /* 1120 */ 269, 83, 277, 269, 269, 251, 269, 269, 163, 301, + /* 1130 */ 291, 251, 287, 241, 336, 248, 291, 251, 302, 287, + /* 1140 */ 277, 296, 251, 20, 295, 346, 343, 349, 288, 309, + /* 1150 */ 216, 353, 307, 215, 342, 310, 311, 312, 313, 314, + /* 1160 */ 315, 269, 317, 292, 241, 346, 291, 223, 292, 277, + /* 1170 */ 222, 211, 291, 277, 291, 207, 210, 20, 308, 287, + /* 1180 */ 339, 336, 40, 291, 227, 230, 225, 357, 327, 81, + /* 1190 */ 323, 292, 269, 340, 349, 352, 291, 291, 353, 307, + /* 1200 */ 277, 291, 310, 311, 312, 313, 314, 315, 292, 317, + /* 1210 */ 287, 143, 320, 81, 291, 351, 324, 325, 352, 351, + /* 1220 */ 277, 352, 241, 351, 251, 289, 251, 288, 277, 265, + /* 1230 */ 307, 273, 248, 310, 311, 312, 313, 314, 315, 259, + /* 1240 */ 317, 251, 243, 320, 252, 299, 239, 324, 325, 263, + /* 1250 */ 269, 263, 303, 0, 263, 0, 72, 0, 277, 47, + /* 1260 */ 174, 47, 174, 47, 47, 0, 47, 47, 287, 0, + /* 1270 */ 174, 47, 291, 0, 47, 0, 47, 0, 81, 160, + /* 1280 */ 159, 241, 114, 156, 0, 0, 152, 151, 307, 0, + /* 1290 */ 0, 310, 311, 312, 313, 314, 315, 316, 317, 318, + /* 1300 */ 319, 0, 44, 0, 0, 0, 0, 0, 0, 269, + /* 1310 */ 0, 0, 0, 0, 0, 0, 0, 277, 0, 0, + /* 1320 */ 0, 0, 40, 0, 0, 0, 0, 287, 0, 0, + /* 1330 */ 0, 291, 0, 0, 0, 0, 241, 0, 40, 22, + /* 1340 */ 41, 14, 0, 0, 44, 14, 37, 307, 88, 47, + /* 1350 */ 310, 311, 312, 313, 314, 315, 0, 317, 0, 0, + /* 1360 */ 0, 0, 0, 0, 269, 0, 44, 0, 0, 0, + /* 1370 */ 0, 0, 277, 0, 38, 37, 37, 37, 90, 0, + /* 1380 */ 146, 37, 287, 161, 146, 143, 291, 37, 141, 241, + /* 1390 */ 45, 37, 45, 47, 354, 355, 47, 45, 47, 22, + /* 1400 */ 59, 37, 307, 0, 47, 310, 311, 312, 313, 314, + /* 1410 */ 315, 45, 317, 0, 19, 320, 22, 269, 22, 47, + /* 1420 */ 325, 47, 47, 47, 41, 277, 48, 47, 33, 41, + /* 1430 */ 0, 22, 0, 22, 0, 287, 22, 47, 47, 291, + /* 1440 */ 45, 20, 294, 0, 241, 47, 51, 52, 53, 54, + /* 1450 */ 55, 47, 0, 22, 0, 307, 241, 0, 310, 311, + /* 1460 */ 312, 313, 314, 315, 0, 317, 0, 81, 41, 41, + /* 1470 */ 37, 212, 269, 44, 82, 80, 41, 41, 83, 82, + /* 1480 */ 277, 81, 81, 81, 269, 44, 212, 82, 81, 41, + /* 1490 */ 287, 44, 277, 206, 291, 44, 41, 82, 212, 146, + /* 1500 */ 82, 82, 287, 41, 82, 47, 291, 47, 47, 41, + /* 1510 */ 307, 2, 117, 310, 311, 312, 313, 314, 315, 47, + /* 1520 */ 317, 47, 307, 81, 47, 310, 311, 312, 313, 314, + /* 1530 */ 315, 82, 317, 241, 44, 82, 44, 142, 22, 0, + /* 1540 */ 145, 82, 37, 144, 81, 44, 81, 141, 81, 22, + /* 1550 */ 81, 348, 82, 82, 81, 44, 81, 162, 22, 164, + /* 1560 */ 178, 269, 81, 81, 180, 81, 81, 47, 82, 277, + /* 1570 */ 355, 91, 47, 82, 81, 92, 47, 81, 47, 287, + /* 1580 */ 82, 81, 47, 291, 82, 81, 294, 47, 82, 241, + /* 1590 */ 93, 81, 105, 105, 105, 81, 81, 47, 81, 307, + /* 1600 */ 105, 47, 310, 311, 312, 313, 314, 315, 114, 317, + /* 1610 */ 22, 59, 47, 58, 41, 64, 79, 269, 47, 47, + /* 1620 */ 22, 47, 47, 47, 47, 277, 47, 64, 241, 47, + /* 1630 */ 47, 47, 47, 47, 0, 287, 47, 47, 47, 291, + /* 1640 */ 45, 37, 0, 47, 45, 37, 0, 47, 45, 37, + /* 1650 */ 0, 45, 47, 37, 0, 307, 269, 241, 310, 311, + /* 1660 */ 312, 313, 314, 315, 277, 317, 47, 319, 46, 0, + /* 1670 */ 0, 22, 21, 21, 287, 22, 20, 22, 291, 358, + /* 1680 */ 358, 294, 358, 358, 358, 269, 241, 358, 358, 358, + /* 1690 */ 358, 358, 358, 277, 307, 358, 358, 310, 311, 312, + /* 1700 */ 313, 314, 315, 287, 317, 358, 358, 291, 358, 358, + /* 1710 */ 294, 358, 358, 358, 269, 358, 358, 241, 358, 358, + /* 1720 */ 358, 358, 277, 307, 358, 358, 310, 311, 312, 313, + /* 1730 */ 314, 315, 287, 317, 358, 358, 291, 358, 358, 358, + /* 1740 */ 358, 358, 358, 358, 358, 269, 358, 358, 241, 358, + /* 1750 */ 358, 358, 307, 277, 358, 310, 311, 312, 313, 314, + /* 1760 */ 315, 358, 317, 287, 358, 358, 358, 291, 358, 358, + /* 1770 */ 358, 358, 358, 358, 358, 358, 269, 358, 358, 241, + /* 1780 */ 358, 358, 358, 307, 277, 358, 310, 311, 312, 313, + /* 1790 */ 314, 315, 358, 317, 287, 358, 358, 358, 291, 358, + /* 1800 */ 358, 358, 358, 358, 358, 358, 358, 269, 358, 358, + /* 1810 */ 358, 241, 358, 358, 307, 277, 358, 310, 311, 312, + /* 1820 */ 313, 314, 315, 358, 317, 287, 358, 358, 241, 291, + /* 1830 */ 358, 358, 358, 358, 358, 358, 358, 358, 358, 269, + /* 1840 */ 358, 358, 358, 358, 358, 307, 358, 277, 310, 311, + /* 1850 */ 312, 313, 314, 315, 358, 317, 269, 287, 358, 358, + /* 1860 */ 358, 291, 358, 358, 277, 358, 358, 241, 358, 358, + /* 1870 */ 358, 358, 358, 358, 287, 358, 358, 307, 291, 358, + /* 1880 */ 310, 311, 312, 313, 314, 315, 358, 317, 358, 358, + /* 1890 */ 358, 358, 358, 358, 307, 269, 358, 310, 311, 312, + /* 1900 */ 313, 314, 315, 277, 317, 358, 241, 358, 358, 358, + /* 1910 */ 358, 358, 358, 287, 358, 358, 358, 291, 358, 358, + /* 1920 */ 358, 358, 358, 241, 358, 358, 358, 358, 358, 358, + /* 1930 */ 358, 358, 358, 307, 269, 241, 310, 311, 312, 313, + /* 1940 */ 314, 315, 277, 317, 358, 358, 358, 358, 358, 358, + /* 1950 */ 358, 269, 287, 358, 358, 358, 291, 358, 358, 277, + /* 1960 */ 358, 358, 358, 269, 358, 358, 358, 358, 358, 287, + /* 1970 */ 358, 277, 307, 291, 241, 310, 311, 312, 313, 314, + /* 1980 */ 315, 287, 317, 358, 358, 291, 358, 241, 358, 307, + /* 1990 */ 358, 358, 310, 311, 312, 313, 314, 315, 358, 317, + /* 2000 */ 358, 307, 269, 358, 310, 311, 312, 313, 314, 315, + /* 2010 */ 277, 317, 358, 358, 358, 269, 358, 358, 358, 358, + /* 2020 */ 287, 358, 358, 277, 291, 358, 241, 358, 358, 358, + /* 2030 */ 358, 358, 358, 287, 358, 358, 358, 291, 358, 358, + /* 2040 */ 307, 358, 358, 310, 311, 312, 313, 314, 315, 358, + /* 2050 */ 317, 358, 358, 307, 269, 358, 310, 311, 312, 313, + /* 2060 */ 314, 315, 277, 317, 358, 358, 358, 358, 358, 358, + /* 2070 */ 358, 358, 287, 358, 358, 358, 291, 358, 358, 358, + /* 2080 */ 358, 241, 358, 358, 358, 358, 358, 358, 358, 358, + /* 2090 */ 241, 358, 307, 358, 358, 310, 311, 312, 313, 314, + /* 2100 */ 315, 358, 317, 358, 358, 358, 358, 358, 358, 269, + /* 2110 */ 358, 358, 358, 358, 358, 358, 358, 277, 269, 358, + /* 2120 */ 358, 358, 358, 358, 358, 358, 277, 287, 358, 358, + /* 2130 */ 358, 291, 358, 358, 358, 358, 287, 241, 358, 358, + /* 2140 */ 291, 358, 358, 358, 358, 358, 358, 307, 358, 358, + /* 2150 */ 310, 311, 312, 313, 314, 315, 307, 317, 358, 310, + /* 2160 */ 311, 312, 313, 314, 315, 269, 317, 358, 358, 358, + /* 2170 */ 358, 358, 358, 277, 358, 358, 358, 358, 358, 358, + /* 2180 */ 358, 358, 358, 287, 358, 358, 358, 291, 358, 358, + /* 2190 */ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, + /* 2200 */ 358, 358, 358, 307, 358, 358, 310, 311, 312, 313, + /* 2210 */ 314, 315, 358, 317, }; -#define YY_SHIFT_COUNT (610) +#define YY_SHIFT_COUNT (611) #define YY_SHIFT_MIN (0) -#define YY_SHIFT_MAX (1757) +#define YY_SHIFT_MAX (1670) static const unsigned short int yy_shift_ofst[] = { - /* 0 */ 768, 0, 0, 48, 234, 234, 234, 234, 255, 255, - /* 10 */ 234, 234, 441, 462, 648, 462, 462, 462, 462, 462, - /* 20 */ 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, - /* 30 */ 462, 462, 462, 462, 462, 462, 462, 462, 254, 254, - /* 40 */ 54, 54, 54, 1188, 1188, 1188, 1188, 331, 508, 74, - /* 50 */ 4, 4, 7, 7, 76, 74, 74, 4, 4, 4, - /* 60 */ 4, 4, 4, 216, 4, 265, 371, 527, 265, 4, - /* 70 */ 4, 265, 4, 265, 265, 527, 265, 4, 447, 644, - /* 80 */ 14, 554, 554, 139, 192, 1453, 1453, 1453, 1453, 1453, - /* 90 */ 1453, 1453, 1453, 1453, 1453, 1453, 1453, 1453, 1453, 1453, - /* 100 */ 1453, 1453, 1453, 1453, 604, 229, 482, 482, 198, 5, - /* 110 */ 438, 438, 438, 764, 5, 772, 527, 265, 265, 527, - /* 120 */ 487, 468, 636, 636, 636, 636, 636, 636, 636, 440, - /* 130 */ 299, 222, 27, 486, 37, 346, 287, 456, 681, 674, - /* 140 */ 484, 769, 470, 652, 470, 390, 390, 390, 615, 773, - /* 150 */ 948, 963, 966, 864, 948, 948, 979, 886, 886, 948, - /* 160 */ 1014, 1014, 1020, 216, 527, 216, 1040, 1051, 216, 1040, - /* 170 */ 216, 772, 1066, 216, 216, 948, 216, 1014, 265, 265, - /* 180 */ 265, 265, 265, 265, 265, 265, 265, 265, 265, 948, - /* 190 */ 1014, 1043, 1020, 447, 967, 527, 447, 1040, 447, 772, - /* 200 */ 1066, 447, 1118, 924, 937, 1043, 924, 937, 1043, 1043, - /* 210 */ 265, 931, 938, 968, 970, 974, 772, 1159, 1145, 957, - /* 220 */ 971, 960, 957, 971, 957, 971, 1112, 937, 1043, 1043, - /* 230 */ 937, 1043, 1064, 772, 1066, 447, 487, 447, 772, 1146, - /* 240 */ 468, 948, 447, 1014, 2153, 2153, 2153, 2153, 2153, 2153, - /* 250 */ 2153, 2153, 71, 1425, 93, 453, 248, 587, 187, 63, - /* 260 */ 385, 391, 211, 570, 95, 95, 95, 95, 95, 95, - /* 270 */ 95, 95, 357, 2, 52, 492, 712, 655, 661, 661, - /* 280 */ 661, 661, 854, 501, 786, 788, 790, 792, 857, 863, - /* 290 */ 867, 862, 557, 677, 880, 881, 888, 900, 715, 749, - /* 300 */ 805, 891, 824, 892, 868, 893, 898, 928, 930, 951, - /* 310 */ 869, 879, 955, 956, 961, 965, 975, 976, 807, 242, - /* 320 */ 1261, 1262, 1192, 1265, 1227, 1107, 1237, 1239, 1240, 1114, - /* 330 */ 1288, 1245, 1246, 1119, 1294, 1249, 1297, 1251, 1300, 1254, - /* 340 */ 1304, 1224, 1144, 1147, 1193, 1151, 1312, 1314, 1161, 1163, - /* 350 */ 1318, 1319, 1278, 1329, 1332, 1333, 1334, 1336, 1337, 1338, - /* 360 */ 1339, 1340, 1341, 1342, 1343, 1344, 1347, 1348, 1349, 1350, - /* 370 */ 1351, 1324, 1354, 1366, 1369, 1371, 1372, 1373, 1352, 1375, - /* 380 */ 1376, 1377, 1382, 1383, 1385, 1346, 1359, 1356, 1381, 1355, - /* 390 */ 1384, 1360, 1402, 1365, 1368, 1407, 1408, 1409, 1379, 1410, - /* 400 */ 1412, 1380, 1413, 1361, 1419, 1421, 1378, 1389, 1386, 1422, - /* 410 */ 1394, 1398, 1390, 1426, 1400, 1411, 1392, 1430, 1414, 1415, - /* 420 */ 1396, 1457, 1459, 1462, 1463, 1391, 1395, 1418, 1447, 1467, - /* 430 */ 1427, 1435, 1437, 1439, 1431, 1432, 1440, 1449, 1450, 1498, - /* 440 */ 1477, 1501, 1481, 1456, 1506, 1485, 1464, 1509, 1488, 1513, - /* 450 */ 1492, 1495, 1518, 1374, 1472, 1521, 1362, 1500, 1399, 1387, - /* 460 */ 1524, 1526, 1527, 1448, 1491, 1393, 1490, 1494, 1330, 1460, - /* 470 */ 1505, 1465, 1451, 1468, 1469, 1466, 1511, 1510, 1514, 1474, - /* 480 */ 1512, 1363, 1475, 1478, 1517, 1357, 1522, 1520, 1480, 1533, - /* 490 */ 1364, 1497, 1528, 1529, 1534, 1535, 1536, 1537, 1497, 1578, - /* 500 */ 1405, 1545, 1507, 1523, 1530, 1543, 1525, 1532, 1544, 1570, - /* 510 */ 1420, 1538, 1540, 1542, 1539, 1546, 1461, 1547, 1603, 1572, - /* 520 */ 1473, 1549, 1519, 1564, 1574, 1551, 1553, 1555, 1593, 1558, - /* 530 */ 1531, 1567, 1569, 1579, 1559, 1568, 1605, 1573, 1575, 1606, - /* 540 */ 1577, 1580, 1608, 1582, 1583, 1609, 1585, 1556, 1565, 1581, - /* 550 */ 1584, 1638, 1576, 1599, 1601, 1617, 1602, 1586, 1637, 1663, - /* 560 */ 1566, 1629, 1643, 1627, 1613, 1652, 1647, 1648, 1649, 1650, - /* 570 */ 1662, 1677, 1664, 1665, 1646, 1431, 1666, 1432, 1667, 1670, - /* 580 */ 1671, 1672, 1673, 1674, 1722, 1676, 1681, 1690, 1728, 1683, - /* 590 */ 1686, 1695, 1733, 1688, 1692, 1702, 1740, 1694, 1697, 1706, - /* 600 */ 1744, 1698, 1701, 1748, 1757, 1745, 1747, 1749, 1751, 1753, - /* 610 */ 1746, + /* 0 */ 469, 0, 0, 48, 96, 96, 96, 96, 280, 280, + /* 10 */ 96, 96, 328, 376, 560, 376, 376, 376, 376, 376, + /* 20 */ 376, 376, 376, 376, 376, 376, 376, 376, 376, 376, + /* 30 */ 376, 376, 376, 376, 376, 376, 376, 376, 187, 187, + /* 40 */ 23, 23, 23, 846, 846, 846, 846, 46, 168, 68, + /* 50 */ 49, 49, 42, 42, 124, 68, 68, 49, 49, 49, + /* 60 */ 49, 49, 49, 35, 49, 49, 53, 77, 235, 53, + /* 70 */ 49, 49, 53, 49, 53, 53, 235, 53, 49, 290, + /* 80 */ 556, 62, 110, 110, 109, 468, 800, 800, 800, 800, + /* 90 */ 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, + /* 100 */ 800, 800, 800, 800, 800, 132, 224, 155, 155, 247, + /* 110 */ 584, 281, 281, 281, 762, 584, 249, 235, 53, 53, + /* 120 */ 235, 257, 481, 558, 558, 558, 558, 558, 558, 558, + /* 130 */ 1395, 676, 709, 583, 78, 365, 267, 399, 429, 829, + /* 140 */ 479, 486, 767, 668, 735, 668, 597, 597, 597, 692, + /* 150 */ 775, 1005, 983, 985, 889, 1005, 1005, 1008, 920, 920, + /* 160 */ 1005, 1042, 1042, 1052, 35, 235, 35, 1058, 1061, 35, + /* 170 */ 1058, 35, 249, 1072, 35, 35, 1005, 35, 1042, 53, + /* 180 */ 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, + /* 190 */ 1005, 1042, 1055, 1052, 290, 965, 235, 290, 1005, 1058, + /* 200 */ 290, 249, 1072, 290, 1123, 934, 938, 1055, 934, 938, + /* 210 */ 1055, 1055, 53, 944, 948, 960, 966, 968, 249, 1157, + /* 220 */ 1142, 957, 961, 955, 957, 961, 957, 961, 1108, 938, + /* 230 */ 1055, 1055, 938, 1055, 1068, 249, 1072, 290, 257, 290, + /* 240 */ 249, 1132, 481, 1005, 290, 1042, 2214, 2214, 2214, 2214, + /* 250 */ 2214, 2214, 2214, 862, 283, 294, 1038, 339, 605, 340, + /* 260 */ 14, 356, 721, 778, 431, 698, 698, 698, 698, 698, + /* 270 */ 698, 698, 698, 325, 250, 324, 633, 476, 537, 537, + /* 280 */ 537, 537, 441, 726, 791, 792, 807, 823, 882, 926, + /* 290 */ 941, 924, 729, 879, 902, 909, 945, 760, 498, 321, + /* 300 */ 914, 661, 927, 925, 929, 930, 931, 932, 933, 904, + /* 310 */ 917, 935, 940, 952, 956, 962, 963, 884, 976, 1253, + /* 320 */ 1255, 1184, 1257, 1212, 1086, 1214, 1216, 1217, 1088, 1265, + /* 330 */ 1219, 1220, 1096, 1269, 1224, 1273, 1227, 1275, 1229, 1277, + /* 340 */ 1197, 1119, 1121, 1168, 1127, 1284, 1285, 1134, 1136, 1289, + /* 350 */ 1290, 1258, 1301, 1303, 1304, 1305, 1306, 1307, 1308, 1310, + /* 360 */ 1311, 1312, 1313, 1314, 1315, 1316, 1318, 1319, 1320, 1321, + /* 370 */ 1282, 1323, 1324, 1325, 1326, 1328, 1329, 1317, 1330, 1332, + /* 380 */ 1333, 1334, 1335, 1337, 1298, 1309, 1299, 1327, 1300, 1331, + /* 390 */ 1322, 1342, 1336, 1338, 1343, 1356, 1358, 1339, 1359, 1360, + /* 400 */ 1340, 1361, 1341, 1362, 1363, 1302, 1345, 1344, 1365, 1346, + /* 410 */ 1347, 1350, 1367, 1351, 1352, 1354, 1368, 1357, 1366, 1364, + /* 420 */ 1369, 1370, 1371, 1373, 1288, 1260, 1349, 1377, 1379, 1372, + /* 430 */ 1374, 1375, 1376, 1383, 1388, 1380, 1390, 1391, 1403, 1394, + /* 440 */ 1413, 1396, 1378, 1430, 1409, 1398, 1432, 1411, 1434, 1414, + /* 450 */ 1421, 1443, 1234, 1404, 1452, 1222, 1431, 1238, 1242, 1454, + /* 460 */ 1457, 1464, 1353, 1466, 1386, 1433, 1247, 1427, 1428, 1259, + /* 470 */ 1392, 1435, 1397, 1400, 1401, 1402, 1405, 1436, 1429, 1441, + /* 480 */ 1407, 1448, 1274, 1415, 1418, 1447, 1287, 1455, 1451, 1419, + /* 490 */ 1462, 1286, 1422, 1458, 1460, 1461, 1472, 1474, 1477, 1422, + /* 500 */ 1509, 1382, 1468, 1449, 1442, 1453, 1490, 1463, 1465, 1492, + /* 510 */ 1516, 1384, 1467, 1459, 1470, 1469, 1473, 1399, 1475, 1539, + /* 520 */ 1505, 1406, 1481, 1480, 1501, 1511, 1482, 1471, 1484, 1527, + /* 530 */ 1485, 1483, 1486, 1520, 1525, 1493, 1491, 1529, 1496, 1498, + /* 540 */ 1531, 1500, 1502, 1535, 1504, 1506, 1540, 1510, 1487, 1488, + /* 550 */ 1489, 1495, 1536, 1497, 1514, 1515, 1550, 1517, 1494, 1554, + /* 560 */ 1588, 1552, 1555, 1565, 1551, 1537, 1573, 1571, 1572, 1574, + /* 570 */ 1575, 1576, 1598, 1577, 1579, 1563, 1383, 1582, 1388, 1583, + /* 580 */ 1584, 1585, 1586, 1589, 1590, 1634, 1591, 1595, 1604, 1642, + /* 590 */ 1596, 1599, 1608, 1646, 1600, 1603, 1612, 1650, 1605, 1606, + /* 600 */ 1616, 1654, 1619, 1622, 1669, 1670, 1649, 1651, 1653, 1655, + /* 610 */ 1652, 1656, }; -#define YY_REDUCE_COUNT (251) -#define YY_REDUCE_MIN (-320) -#define YY_REDUCE_MAX (1796) +#define YY_REDUCE_COUNT (252) +#define YY_REDUCE_MIN (-335) +#define YY_REDUCE_MAX (1896) static const short yy_reduce_ofst[] = { - /* 0 */ 259, -226, 236, 61, 577, 638, 671, 752, 784, 835, - /* 10 */ 29, 850, 901, 953, 736, 962, 1010, 1042, 1074, 1122, - /* 20 */ 1135, 1175, 1223, 1280, 1328, 1358, 1388, 1436, 1445, 1493, - /* 30 */ 1541, 1552, 1571, 1630, 1639, 1699, 1708, 1756, 1760, 1796, - /* 40 */ -20, 261, 269, -272, 207, 204, 298, 182, 449, 512, - /* 50 */ -244, -164, -246, -241, -320, -178, -76, -196, 55, 59, - /* 60 */ 132, 239, 419, -222, 422, -227, -256, -139, -1, 534, - /* 70 */ 535, 84, 537, 310, 102, 179, 448, 568, 343, -75, - /* 80 */ -315, -315, -315, -228, -49, 60, 90, 123, 194, 213, - /* 90 */ 219, 235, 317, 380, 472, 507, 559, 565, 566, 567, - /* 100 */ 569, 572, 576, 579, -154, -152, -216, -68, 33, 138, - /* 110 */ 75, 406, 414, -3, 176, -127, 250, 88, 439, 325, - /* 120 */ 202, 111, 302, 526, 555, 578, 583, 612, 631, 605, - /* 130 */ 663, 653, 571, 574, 628, 592, 666, 666, 689, 690, - /* 140 */ 662, 647, 635, 635, 635, 629, 637, 650, 665, 666, - /* 150 */ 751, 703, 757, 717, 771, 774, 735, 743, 745, 782, - /* 160 */ 791, 794, 737, 789, 759, 806, 777, 776, 827, 787, - /* 170 */ 830, 808, 798, 834, 836, 842, 840, 851, 832, 837, - /* 180 */ 838, 839, 841, 844, 845, 846, 847, 848, 849, 855, - /* 190 */ 866, 820, 817, 872, 822, 852, 874, 833, 878, 856, - /* 200 */ 843, 884, 859, 797, 853, 865, 810, 875, 882, 883, - /* 210 */ 666, 811, 816, 860, 870, 635, 905, 877, 876, 858, - /* 220 */ 871, 829, 873, 885, 889, 894, 903, 908, 902, 904, - /* 230 */ 910, 906, 917, 947, 919, 977, 964, 981, 958, 972, - /* 240 */ 982, 986, 985, 995, 943, 944, 959, 984, 989, 991, - /* 250 */ 1005, 1019, + /* 0 */ 142, 489, 520, 574, -224, 90, 675, 739, 798, 845, + /* 10 */ 892, 923, 981, 1040, 1095, 1148, 1203, 1215, 1292, 1348, + /* 20 */ 1387, 1416, 1445, 1476, 1507, 1538, 1570, 1587, 1626, 1665, + /* 30 */ 1682, 1694, 1733, 1746, 1785, 1840, 1849, 1896, -183, 279, + /* 40 */ -116, 169, 576, -268, -266, -235, 323, -294, -177, -125, + /* 50 */ -103, 97, -237, -213, -335, -301, -299, 69, 131, 158, + /* 60 */ 173, 200, 329, -209, 343, 373, -171, -170, 100, 82, + /* 70 */ 480, 511, 213, 569, 104, 309, 99, 151, 606, -240, + /* 80 */ -85, -242, -242, -242, -221, -254, -126, 12, 143, 212, + /* 90 */ 244, 297, 360, 382, 408, 482, 484, 488, 519, 545, + /* 100 */ 557, 564, 579, 587, 611, -23, 22, -90, -39, 372, + /* 110 */ 415, -112, 305, 424, 512, 471, -104, -176, 572, 357, + /* 120 */ 478, 561, 180, -255, 223, 314, 322, 548, 593, 645, + /* 130 */ 549, 401, 510, 501, 570, 617, 618, 708, 708, 720, + /* 140 */ 734, 714, 689, 671, 671, 671, 657, 669, 670, 684, + /* 150 */ 708, 779, 724, 786, 749, 785, 810, 770, 783, 787, + /* 160 */ 813, 825, 826, 771, 824, 789, 827, 784, 790, 831, + /* 170 */ 795, 838, 805, 808, 842, 844, 850, 847, 856, 832, + /* 180 */ 833, 834, 835, 837, 848, 851, 854, 855, 857, 858, + /* 190 */ 859, 873, 839, 836, 874, 828, 852, 880, 887, 849, + /* 200 */ 886, 863, 860, 891, 840, 799, 871, 875, 819, 876, + /* 210 */ 881, 883, 708, 803, 812, 853, 841, 671, 896, 870, + /* 220 */ 861, 843, 864, 830, 866, 868, 869, 872, 867, 899, + /* 230 */ 905, 906, 916, 910, 936, 943, 939, 973, 964, 975, + /* 240 */ 951, 958, 980, 984, 990, 999, 946, 949, 986, 988, + /* 250 */ 991, 992, 1007, }; static const YYACTIONTYPE yy_default[] = { - /* 0 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, - /* 10 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, - /* 20 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, - /* 30 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, - /* 40 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, - /* 50 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, - /* 60 */ 1356, 1356, 1356, 1425, 1356, 1356, 1356, 1356, 1356, 1356, - /* 70 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1423, 1564, - /* 80 */ 1356, 1731, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, - /* 90 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, - /* 100 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1425, 1356, - /* 110 */ 1742, 1742, 1742, 1423, 1356, 1356, 1356, 1356, 1356, 1356, - /* 120 */ 1519, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1603, - /* 130 */ 1356, 1356, 1808, 1356, 1609, 1766, 1356, 1356, 1356, 1356, - /* 140 */ 1472, 1758, 1734, 1748, 1735, 1793, 1793, 1793, 1751, 1356, - /* 150 */ 1356, 1356, 1356, 1595, 1356, 1356, 1569, 1566, 1566, 1356, - /* 160 */ 1356, 1356, 1356, 1425, 1356, 1425, 1356, 1356, 1425, 1356, - /* 170 */ 1425, 1356, 1356, 1425, 1425, 1356, 1425, 1356, 1356, 1356, - /* 180 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, - /* 190 */ 1356, 1356, 1356, 1423, 1605, 1356, 1423, 1356, 1423, 1356, - /* 200 */ 1356, 1423, 1356, 1773, 1771, 1356, 1773, 1771, 1356, 1356, - /* 210 */ 1356, 1785, 1781, 1764, 1762, 1748, 1356, 1356, 1356, 1799, - /* 220 */ 1795, 1811, 1799, 1795, 1799, 1795, 1356, 1771, 1356, 1356, - /* 230 */ 1771, 1356, 1577, 1356, 1356, 1423, 1356, 1423, 1356, 1488, - /* 240 */ 1356, 1356, 1423, 1356, 1597, 1611, 1587, 1522, 1522, 1522, - /* 250 */ 1426, 1361, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, - /* 260 */ 1356, 1356, 1356, 1484, 1675, 1784, 1783, 1707, 1706, 1705, - /* 270 */ 1703, 1674, 1356, 1356, 1356, 1356, 1356, 1356, 1668, 1669, - /* 280 */ 1667, 1666, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, - /* 290 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1732, 1356, 1796, - /* 300 */ 1800, 1356, 1356, 1356, 1651, 1356, 1356, 1356, 1356, 1356, - /* 310 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, - /* 320 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, - /* 330 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, - /* 340 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, - /* 350 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, - /* 360 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, - /* 370 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, - /* 380 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1390, 1356, 1356, - /* 390 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, - /* 400 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, - /* 410 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, - /* 420 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, - /* 430 */ 1356, 1356, 1356, 1356, 1453, 1452, 1356, 1356, 1356, 1356, - /* 440 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, - /* 450 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, - /* 460 */ 1356, 1356, 1356, 1356, 1356, 1356, 1755, 1765, 1356, 1356, - /* 470 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1651, 1356, - /* 480 */ 1782, 1356, 1741, 1737, 1356, 1356, 1733, 1356, 1356, 1794, - /* 490 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1727, - /* 500 */ 1356, 1700, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, - /* 510 */ 1662, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, - /* 520 */ 1356, 1356, 1356, 1650, 1356, 1691, 1356, 1356, 1356, 1356, - /* 530 */ 1356, 1356, 1356, 1356, 1516, 1356, 1356, 1356, 1356, 1356, - /* 540 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1501, 1499, 1498, - /* 550 */ 1497, 1356, 1494, 1356, 1356, 1356, 1356, 1356, 1356, 1356, - /* 560 */ 1356, 1356, 1356, 1356, 1356, 1445, 1356, 1356, 1356, 1356, - /* 570 */ 1356, 1356, 1356, 1356, 1356, 1436, 1356, 1435, 1356, 1356, - /* 580 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, - /* 590 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, - /* 600 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, - /* 610 */ 1356, + /* 0 */ 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, + /* 10 */ 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, + /* 20 */ 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, + /* 30 */ 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, + /* 40 */ 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, + /* 50 */ 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, + /* 60 */ 1351, 1351, 1351, 1420, 1351, 1351, 1351, 1351, 1351, 1351, + /* 70 */ 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1418, + /* 80 */ 1559, 1351, 1723, 1351, 1351, 1351, 1351, 1351, 1351, 1351, + /* 90 */ 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, + /* 100 */ 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1420, + /* 110 */ 1351, 1734, 1734, 1734, 1418, 1351, 1351, 1351, 1351, 1351, + /* 120 */ 1351, 1514, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, + /* 130 */ 1595, 1351, 1351, 1800, 1351, 1601, 1758, 1351, 1351, 1351, + /* 140 */ 1351, 1467, 1750, 1726, 1740, 1727, 1785, 1785, 1785, 1743, + /* 150 */ 1351, 1351, 1351, 1351, 1587, 1351, 1351, 1564, 1561, 1561, + /* 160 */ 1351, 1351, 1351, 1351, 1420, 1351, 1420, 1351, 1351, 1420, + /* 170 */ 1351, 1420, 1351, 1351, 1420, 1420, 1351, 1420, 1351, 1351, + /* 180 */ 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, + /* 190 */ 1351, 1351, 1351, 1351, 1418, 1597, 1351, 1418, 1351, 1351, + /* 200 */ 1418, 1351, 1351, 1418, 1351, 1765, 1763, 1351, 1765, 1763, + /* 210 */ 1351, 1351, 1351, 1777, 1773, 1756, 1754, 1740, 1351, 1351, + /* 220 */ 1351, 1791, 1787, 1803, 1791, 1787, 1791, 1787, 1351, 1763, + /* 230 */ 1351, 1351, 1763, 1351, 1572, 1351, 1351, 1418, 1351, 1418, + /* 240 */ 1351, 1483, 1351, 1351, 1418, 1351, 1589, 1603, 1517, 1517, + /* 250 */ 1517, 1421, 1356, 1351, 1351, 1351, 1351, 1351, 1351, 1351, + /* 260 */ 1351, 1351, 1351, 1351, 1479, 1667, 1776, 1775, 1699, 1698, + /* 270 */ 1697, 1695, 1666, 1351, 1351, 1351, 1351, 1351, 1660, 1661, + /* 280 */ 1659, 1658, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, + /* 290 */ 1351, 1351, 1351, 1351, 1351, 1351, 1724, 1351, 1788, 1792, + /* 300 */ 1351, 1351, 1351, 1643, 1351, 1351, 1351, 1351, 1351, 1351, + /* 310 */ 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, + /* 320 */ 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, + /* 330 */ 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, + /* 340 */ 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, + /* 350 */ 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, + /* 360 */ 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, + /* 370 */ 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, + /* 380 */ 1351, 1351, 1351, 1351, 1351, 1351, 1385, 1351, 1351, 1351, + /* 390 */ 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, + /* 400 */ 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, + /* 410 */ 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, + /* 420 */ 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, + /* 430 */ 1351, 1351, 1351, 1448, 1447, 1351, 1351, 1351, 1351, 1351, + /* 440 */ 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, + /* 450 */ 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, + /* 460 */ 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1747, 1757, 1351, + /* 470 */ 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1643, + /* 480 */ 1351, 1774, 1351, 1733, 1729, 1351, 1351, 1725, 1351, 1351, + /* 490 */ 1786, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, + /* 500 */ 1719, 1351, 1692, 1351, 1351, 1351, 1351, 1351, 1351, 1351, + /* 510 */ 1351, 1654, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, + /* 520 */ 1351, 1351, 1351, 1351, 1642, 1351, 1683, 1351, 1351, 1351, + /* 530 */ 1351, 1351, 1351, 1351, 1351, 1511, 1351, 1351, 1351, 1351, + /* 540 */ 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1496, 1494, + /* 550 */ 1493, 1492, 1351, 1489, 1351, 1351, 1351, 1351, 1351, 1351, + /* 560 */ 1351, 1351, 1351, 1351, 1351, 1351, 1440, 1351, 1351, 1351, + /* 570 */ 1351, 1351, 1351, 1351, 1351, 1351, 1431, 1351, 1430, 1351, + /* 580 */ 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, + /* 590 */ 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, + /* 600 */ 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, + /* 610 */ 1351, 1351, }; /********** End of lemon-generated parsing tables *****************************/ @@ -976,8 +988,6 @@ static const YYCODETYPE yyFallback[] = { 0, /* TOPIC => nothing */ 0, /* AS => nothing */ 0, /* CGROUP => nothing */ - 0, /* WITH => nothing */ - 0, /* SCHEMA => nothing */ 0, /* DESC => nothing */ 0, /* DESCRIBE => nothing */ 0, /* RESET => nothing */ @@ -1062,12 +1072,12 @@ static const YYCODETYPE yyFallback[] = { 0, /* ASC => nothing */ 0, /* NULLS => nothing */ 0, /* ID => nothing */ - 233, /* NK_BITNOT => ID */ - 233, /* INSERT => ID */ - 233, /* VALUES => ID */ - 233, /* IMPORT => ID */ - 233, /* NK_SEMI => ID */ - 233, /* FILE => ID */ + 231, /* NK_BITNOT => ID */ + 231, /* INSERT => ID */ + 231, /* VALUES => ID */ + 231, /* IMPORT => ID */ + 231, /* NK_SEMI => ID */ + 231, /* FILE => ID */ }; #endif /* YYFALLBACK */ @@ -1303,219 +1313,216 @@ static const char *const yyTokenName[] = { /* 145 */ "TOPIC", /* 146 */ "AS", /* 147 */ "CGROUP", - /* 148 */ "WITH", - /* 149 */ "SCHEMA", - /* 150 */ "DESC", - /* 151 */ "DESCRIBE", - /* 152 */ "RESET", - /* 153 */ "QUERY", - /* 154 */ "CACHE", - /* 155 */ "EXPLAIN", - /* 156 */ "ANALYZE", - /* 157 */ "VERBOSE", - /* 158 */ "NK_BOOL", - /* 159 */ "RATIO", - /* 160 */ "COMPACT", - /* 161 */ "VNODES", - /* 162 */ "IN", - /* 163 */ "OUTPUTTYPE", - /* 164 */ "AGGREGATE", - /* 165 */ "BUFSIZE", - /* 166 */ "STREAM", - /* 167 */ "INTO", - /* 168 */ "TRIGGER", - /* 169 */ "AT_ONCE", - /* 170 */ "WINDOW_CLOSE", - /* 171 */ "WATERMARK", - /* 172 */ "KILL", - /* 173 */ "CONNECTION", - /* 174 */ "TRANSACTION", - /* 175 */ "MERGE", - /* 176 */ "VGROUP", - /* 177 */ "REDISTRIBUTE", - /* 178 */ "SPLIT", - /* 179 */ "SYNCDB", - /* 180 */ "NULL", - /* 181 */ "NK_QUESTION", - /* 182 */ "NK_ARROW", - /* 183 */ "ROWTS", - /* 184 */ "TBNAME", - /* 185 */ "QSTARTTS", - /* 186 */ "QENDTS", - /* 187 */ "WSTARTTS", - /* 188 */ "WENDTS", - /* 189 */ "WDURATION", - /* 190 */ "CAST", - /* 191 */ "NOW", - /* 192 */ "TODAY", - /* 193 */ "TIMEZONE", - /* 194 */ "COUNT", - /* 195 */ "FIRST", - /* 196 */ "LAST", - /* 197 */ "LAST_ROW", - /* 198 */ "BETWEEN", - /* 199 */ "IS", - /* 200 */ "NK_LT", - /* 201 */ "NK_GT", - /* 202 */ "NK_LE", - /* 203 */ "NK_GE", - /* 204 */ "NK_NE", - /* 205 */ "MATCH", - /* 206 */ "NMATCH", - /* 207 */ "CONTAINS", - /* 208 */ "JOIN", - /* 209 */ "INNER", - /* 210 */ "SELECT", - /* 211 */ "DISTINCT", - /* 212 */ "WHERE", - /* 213 */ "PARTITION", - /* 214 */ "BY", - /* 215 */ "SESSION", - /* 216 */ "STATE_WINDOW", - /* 217 */ "SLIDING", - /* 218 */ "FILL", - /* 219 */ "VALUE", - /* 220 */ "NONE", - /* 221 */ "PREV", - /* 222 */ "LINEAR", - /* 223 */ "NEXT", - /* 224 */ "GROUP", - /* 225 */ "HAVING", - /* 226 */ "ORDER", - /* 227 */ "SLIMIT", - /* 228 */ "SOFFSET", - /* 229 */ "LIMIT", - /* 230 */ "OFFSET", - /* 231 */ "ASC", - /* 232 */ "NULLS", - /* 233 */ "ID", - /* 234 */ "NK_BITNOT", - /* 235 */ "INSERT", - /* 236 */ "VALUES", - /* 237 */ "IMPORT", - /* 238 */ "NK_SEMI", - /* 239 */ "FILE", - /* 240 */ "cmd", - /* 241 */ "account_options", - /* 242 */ "alter_account_options", - /* 243 */ "literal", - /* 244 */ "alter_account_option", - /* 245 */ "user_name", - /* 246 */ "privileges", - /* 247 */ "priv_level", - /* 248 */ "priv_type_list", - /* 249 */ "priv_type", - /* 250 */ "db_name", - /* 251 */ "dnode_endpoint", - /* 252 */ "dnode_host_name", - /* 253 */ "not_exists_opt", - /* 254 */ "db_options", - /* 255 */ "exists_opt", - /* 256 */ "alter_db_options", - /* 257 */ "integer_list", - /* 258 */ "variable_list", - /* 259 */ "retention_list", - /* 260 */ "alter_db_option", - /* 261 */ "retention", - /* 262 */ "full_table_name", - /* 263 */ "column_def_list", - /* 264 */ "tags_def_opt", - /* 265 */ "table_options", - /* 266 */ "multi_create_clause", - /* 267 */ "tags_def", - /* 268 */ "multi_drop_clause", - /* 269 */ "alter_table_clause", - /* 270 */ "alter_table_options", - /* 271 */ "column_name", - /* 272 */ "type_name", - /* 273 */ "signed_literal", - /* 274 */ "create_subtable_clause", - /* 275 */ "specific_tags_opt", - /* 276 */ "literal_list", - /* 277 */ "drop_table_clause", - /* 278 */ "col_name_list", - /* 279 */ "table_name", - /* 280 */ "column_def", - /* 281 */ "func_name_list", - /* 282 */ "alter_table_option", - /* 283 */ "col_name", - /* 284 */ "db_name_cond_opt", - /* 285 */ "like_pattern_opt", - /* 286 */ "table_name_cond", - /* 287 */ "from_db_opt", - /* 288 */ "func_name", - /* 289 */ "function_name", - /* 290 */ "index_name", - /* 291 */ "index_options", - /* 292 */ "func_list", - /* 293 */ "duration_literal", - /* 294 */ "sliding_opt", - /* 295 */ "func", - /* 296 */ "expression_list", - /* 297 */ "topic_name", - /* 298 */ "topic_options", - /* 299 */ "query_expression", - /* 300 */ "cgroup_name", - /* 301 */ "analyze_opt", - /* 302 */ "explain_options", - /* 303 */ "agg_func_opt", - /* 304 */ "bufsize_opt", - /* 305 */ "stream_name", - /* 306 */ "stream_options", - /* 307 */ "into_opt", - /* 308 */ "dnode_list", - /* 309 */ "signed", - /* 310 */ "literal_func", - /* 311 */ "table_alias", - /* 312 */ "column_alias", - /* 313 */ "expression", - /* 314 */ "pseudo_column", - /* 315 */ "column_reference", - /* 316 */ "function_expression", - /* 317 */ "subquery", - /* 318 */ "star_func", - /* 319 */ "star_func_para_list", - /* 320 */ "noarg_func", - /* 321 */ "other_para_list", - /* 322 */ "star_func_para", - /* 323 */ "predicate", - /* 324 */ "compare_op", - /* 325 */ "in_op", - /* 326 */ "in_predicate_value", - /* 327 */ "boolean_value_expression", - /* 328 */ "boolean_primary", - /* 329 */ "common_expression", - /* 330 */ "from_clause", - /* 331 */ "table_reference_list", - /* 332 */ "table_reference", - /* 333 */ "table_primary", - /* 334 */ "joined_table", - /* 335 */ "alias_opt", - /* 336 */ "parenthesized_joined_table", - /* 337 */ "join_type", - /* 338 */ "search_condition", - /* 339 */ "query_specification", - /* 340 */ "set_quantifier_opt", - /* 341 */ "select_list", - /* 342 */ "where_clause_opt", - /* 343 */ "partition_by_clause_opt", - /* 344 */ "twindow_clause_opt", - /* 345 */ "group_by_clause_opt", - /* 346 */ "having_clause_opt", - /* 347 */ "select_sublist", - /* 348 */ "select_item", - /* 349 */ "fill_opt", - /* 350 */ "fill_mode", - /* 351 */ "group_by_list", - /* 352 */ "query_expression_body", - /* 353 */ "order_by_clause_opt", - /* 354 */ "slimit_clause_opt", - /* 355 */ "limit_clause_opt", - /* 356 */ "query_primary", - /* 357 */ "sort_specification_list", - /* 358 */ "sort_specification", - /* 359 */ "ordering_specification_opt", - /* 360 */ "null_ordering_opt", + /* 148 */ "DESC", + /* 149 */ "DESCRIBE", + /* 150 */ "RESET", + /* 151 */ "QUERY", + /* 152 */ "CACHE", + /* 153 */ "EXPLAIN", + /* 154 */ "ANALYZE", + /* 155 */ "VERBOSE", + /* 156 */ "NK_BOOL", + /* 157 */ "RATIO", + /* 158 */ "COMPACT", + /* 159 */ "VNODES", + /* 160 */ "IN", + /* 161 */ "OUTPUTTYPE", + /* 162 */ "AGGREGATE", + /* 163 */ "BUFSIZE", + /* 164 */ "STREAM", + /* 165 */ "INTO", + /* 166 */ "TRIGGER", + /* 167 */ "AT_ONCE", + /* 168 */ "WINDOW_CLOSE", + /* 169 */ "WATERMARK", + /* 170 */ "KILL", + /* 171 */ "CONNECTION", + /* 172 */ "TRANSACTION", + /* 173 */ "MERGE", + /* 174 */ "VGROUP", + /* 175 */ "REDISTRIBUTE", + /* 176 */ "SPLIT", + /* 177 */ "SYNCDB", + /* 178 */ "NULL", + /* 179 */ "NK_QUESTION", + /* 180 */ "NK_ARROW", + /* 181 */ "ROWTS", + /* 182 */ "TBNAME", + /* 183 */ "QSTARTTS", + /* 184 */ "QENDTS", + /* 185 */ "WSTARTTS", + /* 186 */ "WENDTS", + /* 187 */ "WDURATION", + /* 188 */ "CAST", + /* 189 */ "NOW", + /* 190 */ "TODAY", + /* 191 */ "TIMEZONE", + /* 192 */ "COUNT", + /* 193 */ "FIRST", + /* 194 */ "LAST", + /* 195 */ "LAST_ROW", + /* 196 */ "BETWEEN", + /* 197 */ "IS", + /* 198 */ "NK_LT", + /* 199 */ "NK_GT", + /* 200 */ "NK_LE", + /* 201 */ "NK_GE", + /* 202 */ "NK_NE", + /* 203 */ "MATCH", + /* 204 */ "NMATCH", + /* 205 */ "CONTAINS", + /* 206 */ "JOIN", + /* 207 */ "INNER", + /* 208 */ "SELECT", + /* 209 */ "DISTINCT", + /* 210 */ "WHERE", + /* 211 */ "PARTITION", + /* 212 */ "BY", + /* 213 */ "SESSION", + /* 214 */ "STATE_WINDOW", + /* 215 */ "SLIDING", + /* 216 */ "FILL", + /* 217 */ "VALUE", + /* 218 */ "NONE", + /* 219 */ "PREV", + /* 220 */ "LINEAR", + /* 221 */ "NEXT", + /* 222 */ "GROUP", + /* 223 */ "HAVING", + /* 224 */ "ORDER", + /* 225 */ "SLIMIT", + /* 226 */ "SOFFSET", + /* 227 */ "LIMIT", + /* 228 */ "OFFSET", + /* 229 */ "ASC", + /* 230 */ "NULLS", + /* 231 */ "ID", + /* 232 */ "NK_BITNOT", + /* 233 */ "INSERT", + /* 234 */ "VALUES", + /* 235 */ "IMPORT", + /* 236 */ "NK_SEMI", + /* 237 */ "FILE", + /* 238 */ "cmd", + /* 239 */ "account_options", + /* 240 */ "alter_account_options", + /* 241 */ "literal", + /* 242 */ "alter_account_option", + /* 243 */ "user_name", + /* 244 */ "privileges", + /* 245 */ "priv_level", + /* 246 */ "priv_type_list", + /* 247 */ "priv_type", + /* 248 */ "db_name", + /* 249 */ "dnode_endpoint", + /* 250 */ "dnode_host_name", + /* 251 */ "not_exists_opt", + /* 252 */ "db_options", + /* 253 */ "exists_opt", + /* 254 */ "alter_db_options", + /* 255 */ "integer_list", + /* 256 */ "variable_list", + /* 257 */ "retention_list", + /* 258 */ "alter_db_option", + /* 259 */ "retention", + /* 260 */ "full_table_name", + /* 261 */ "column_def_list", + /* 262 */ "tags_def_opt", + /* 263 */ "table_options", + /* 264 */ "multi_create_clause", + /* 265 */ "tags_def", + /* 266 */ "multi_drop_clause", + /* 267 */ "alter_table_clause", + /* 268 */ "alter_table_options", + /* 269 */ "column_name", + /* 270 */ "type_name", + /* 271 */ "signed_literal", + /* 272 */ "create_subtable_clause", + /* 273 */ "specific_tags_opt", + /* 274 */ "literal_list", + /* 275 */ "drop_table_clause", + /* 276 */ "col_name_list", + /* 277 */ "table_name", + /* 278 */ "column_def", + /* 279 */ "func_name_list", + /* 280 */ "alter_table_option", + /* 281 */ "col_name", + /* 282 */ "db_name_cond_opt", + /* 283 */ "like_pattern_opt", + /* 284 */ "table_name_cond", + /* 285 */ "from_db_opt", + /* 286 */ "func_name", + /* 287 */ "function_name", + /* 288 */ "index_name", + /* 289 */ "index_options", + /* 290 */ "func_list", + /* 291 */ "duration_literal", + /* 292 */ "sliding_opt", + /* 293 */ "func", + /* 294 */ "expression_list", + /* 295 */ "topic_name", + /* 296 */ "query_expression", + /* 297 */ "cgroup_name", + /* 298 */ "analyze_opt", + /* 299 */ "explain_options", + /* 300 */ "agg_func_opt", + /* 301 */ "bufsize_opt", + /* 302 */ "stream_name", + /* 303 */ "stream_options", + /* 304 */ "into_opt", + /* 305 */ "dnode_list", + /* 306 */ "signed", + /* 307 */ "literal_func", + /* 308 */ "table_alias", + /* 309 */ "column_alias", + /* 310 */ "expression", + /* 311 */ "pseudo_column", + /* 312 */ "column_reference", + /* 313 */ "function_expression", + /* 314 */ "subquery", + /* 315 */ "star_func", + /* 316 */ "star_func_para_list", + /* 317 */ "noarg_func", + /* 318 */ "other_para_list", + /* 319 */ "star_func_para", + /* 320 */ "predicate", + /* 321 */ "compare_op", + /* 322 */ "in_op", + /* 323 */ "in_predicate_value", + /* 324 */ "boolean_value_expression", + /* 325 */ "boolean_primary", + /* 326 */ "common_expression", + /* 327 */ "from_clause", + /* 328 */ "table_reference_list", + /* 329 */ "table_reference", + /* 330 */ "table_primary", + /* 331 */ "joined_table", + /* 332 */ "alias_opt", + /* 333 */ "parenthesized_joined_table", + /* 334 */ "join_type", + /* 335 */ "search_condition", + /* 336 */ "query_specification", + /* 337 */ "set_quantifier_opt", + /* 338 */ "select_list", + /* 339 */ "where_clause_opt", + /* 340 */ "partition_by_clause_opt", + /* 341 */ "twindow_clause_opt", + /* 342 */ "group_by_clause_opt", + /* 343 */ "having_clause_opt", + /* 344 */ "select_sublist", + /* 345 */ "select_item", + /* 346 */ "fill_opt", + /* 347 */ "fill_mode", + /* 348 */ "group_by_list", + /* 349 */ "query_expression_body", + /* 350 */ "order_by_clause_opt", + /* 351 */ "slimit_clause_opt", + /* 352 */ "limit_clause_opt", + /* 353 */ "query_primary", + /* 354 */ "sort_specification_list", + /* 355 */ "sort_specification", + /* 356 */ "ordering_specification_opt", + /* 357 */ "null_ordering_opt", }; #endif /* defined(YYCOVERAGE) || !defined(NDEBUG) */ @@ -1747,237 +1754,234 @@ static const char *const yyRuleName[] = { /* 221 */ "func_list ::= func", /* 222 */ "func_list ::= func_list NK_COMMA func", /* 223 */ "func ::= function_name NK_LP expression_list NK_RP", - /* 224 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name topic_options AS query_expression", - /* 225 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name topic_options AS db_name", - /* 226 */ "cmd ::= DROP TOPIC exists_opt topic_name", - /* 227 */ "cmd ::= DROP CGROUP exists_opt cgroup_name ON topic_name", - /* 228 */ "topic_options ::=", - /* 229 */ "topic_options ::= topic_options WITH TABLE", - /* 230 */ "topic_options ::= topic_options WITH SCHEMA", - /* 231 */ "topic_options ::= topic_options WITH TAG", - /* 232 */ "cmd ::= DESC full_table_name", - /* 233 */ "cmd ::= DESCRIBE full_table_name", - /* 234 */ "cmd ::= RESET QUERY CACHE", - /* 235 */ "cmd ::= EXPLAIN analyze_opt explain_options query_expression", - /* 236 */ "analyze_opt ::=", - /* 237 */ "analyze_opt ::= ANALYZE", - /* 238 */ "explain_options ::=", - /* 239 */ "explain_options ::= explain_options VERBOSE NK_BOOL", - /* 240 */ "explain_options ::= explain_options RATIO NK_FLOAT", - /* 241 */ "cmd ::= COMPACT VNODES IN NK_LP integer_list NK_RP", - /* 242 */ "cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt", - /* 243 */ "cmd ::= DROP FUNCTION exists_opt function_name", - /* 244 */ "agg_func_opt ::=", - /* 245 */ "agg_func_opt ::= AGGREGATE", - /* 246 */ "bufsize_opt ::=", - /* 247 */ "bufsize_opt ::= BUFSIZE NK_INTEGER", - /* 248 */ "cmd ::= CREATE STREAM not_exists_opt stream_name stream_options into_opt AS query_expression", - /* 249 */ "cmd ::= DROP STREAM exists_opt stream_name", - /* 250 */ "into_opt ::=", - /* 251 */ "into_opt ::= INTO full_table_name", - /* 252 */ "stream_options ::=", - /* 253 */ "stream_options ::= stream_options TRIGGER AT_ONCE", - /* 254 */ "stream_options ::= stream_options TRIGGER WINDOW_CLOSE", - /* 255 */ "stream_options ::= stream_options WATERMARK duration_literal", - /* 256 */ "cmd ::= KILL CONNECTION NK_INTEGER", - /* 257 */ "cmd ::= KILL QUERY NK_INTEGER", - /* 258 */ "cmd ::= KILL TRANSACTION NK_INTEGER", - /* 259 */ "cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER", - /* 260 */ "cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list", - /* 261 */ "cmd ::= SPLIT VGROUP NK_INTEGER", - /* 262 */ "dnode_list ::= DNODE NK_INTEGER", - /* 263 */ "dnode_list ::= dnode_list DNODE NK_INTEGER", - /* 264 */ "cmd ::= SYNCDB db_name REPLICA", - /* 265 */ "cmd ::= query_expression", - /* 266 */ "literal ::= NK_INTEGER", - /* 267 */ "literal ::= NK_FLOAT", - /* 268 */ "literal ::= NK_STRING", - /* 269 */ "literal ::= NK_BOOL", - /* 270 */ "literal ::= TIMESTAMP NK_STRING", - /* 271 */ "literal ::= duration_literal", - /* 272 */ "literal ::= NULL", - /* 273 */ "literal ::= NK_QUESTION", - /* 274 */ "duration_literal ::= NK_VARIABLE", - /* 275 */ "signed ::= NK_INTEGER", - /* 276 */ "signed ::= NK_PLUS NK_INTEGER", - /* 277 */ "signed ::= NK_MINUS NK_INTEGER", - /* 278 */ "signed ::= NK_FLOAT", - /* 279 */ "signed ::= NK_PLUS NK_FLOAT", - /* 280 */ "signed ::= NK_MINUS NK_FLOAT", - /* 281 */ "signed_literal ::= signed", - /* 282 */ "signed_literal ::= NK_STRING", - /* 283 */ "signed_literal ::= NK_BOOL", - /* 284 */ "signed_literal ::= TIMESTAMP NK_STRING", - /* 285 */ "signed_literal ::= duration_literal", - /* 286 */ "signed_literal ::= NULL", - /* 287 */ "signed_literal ::= literal_func", - /* 288 */ "literal_list ::= signed_literal", - /* 289 */ "literal_list ::= literal_list NK_COMMA signed_literal", - /* 290 */ "db_name ::= NK_ID", - /* 291 */ "table_name ::= NK_ID", - /* 292 */ "column_name ::= NK_ID", - /* 293 */ "function_name ::= NK_ID", - /* 294 */ "table_alias ::= NK_ID", - /* 295 */ "column_alias ::= NK_ID", - /* 296 */ "user_name ::= NK_ID", - /* 297 */ "index_name ::= NK_ID", - /* 298 */ "topic_name ::= NK_ID", - /* 299 */ "stream_name ::= NK_ID", - /* 300 */ "cgroup_name ::= NK_ID", - /* 301 */ "expression ::= literal", - /* 302 */ "expression ::= pseudo_column", - /* 303 */ "expression ::= column_reference", - /* 304 */ "expression ::= function_expression", - /* 305 */ "expression ::= subquery", - /* 306 */ "expression ::= NK_LP expression NK_RP", - /* 307 */ "expression ::= NK_PLUS expression", - /* 308 */ "expression ::= NK_MINUS expression", - /* 309 */ "expression ::= expression NK_PLUS expression", - /* 310 */ "expression ::= expression NK_MINUS expression", - /* 311 */ "expression ::= expression NK_STAR expression", - /* 312 */ "expression ::= expression NK_SLASH expression", - /* 313 */ "expression ::= expression NK_REM expression", - /* 314 */ "expression ::= column_reference NK_ARROW NK_STRING", - /* 315 */ "expression_list ::= expression", - /* 316 */ "expression_list ::= expression_list NK_COMMA expression", - /* 317 */ "column_reference ::= column_name", - /* 318 */ "column_reference ::= table_name NK_DOT column_name", - /* 319 */ "pseudo_column ::= ROWTS", - /* 320 */ "pseudo_column ::= TBNAME", - /* 321 */ "pseudo_column ::= table_name NK_DOT TBNAME", - /* 322 */ "pseudo_column ::= QSTARTTS", - /* 323 */ "pseudo_column ::= QENDTS", - /* 324 */ "pseudo_column ::= WSTARTTS", - /* 325 */ "pseudo_column ::= WENDTS", - /* 326 */ "pseudo_column ::= WDURATION", - /* 327 */ "function_expression ::= function_name NK_LP expression_list NK_RP", - /* 328 */ "function_expression ::= star_func NK_LP star_func_para_list NK_RP", - /* 329 */ "function_expression ::= CAST NK_LP expression AS type_name NK_RP", - /* 330 */ "function_expression ::= literal_func", - /* 331 */ "literal_func ::= noarg_func NK_LP NK_RP", - /* 332 */ "literal_func ::= NOW", - /* 333 */ "noarg_func ::= NOW", - /* 334 */ "noarg_func ::= TODAY", - /* 335 */ "noarg_func ::= TIMEZONE", - /* 336 */ "star_func ::= COUNT", - /* 337 */ "star_func ::= FIRST", - /* 338 */ "star_func ::= LAST", - /* 339 */ "star_func ::= LAST_ROW", - /* 340 */ "star_func_para_list ::= NK_STAR", - /* 341 */ "star_func_para_list ::= other_para_list", - /* 342 */ "other_para_list ::= star_func_para", - /* 343 */ "other_para_list ::= other_para_list NK_COMMA star_func_para", - /* 344 */ "star_func_para ::= expression", - /* 345 */ "star_func_para ::= table_name NK_DOT NK_STAR", - /* 346 */ "predicate ::= expression compare_op expression", - /* 347 */ "predicate ::= expression BETWEEN expression AND expression", - /* 348 */ "predicate ::= expression NOT BETWEEN expression AND expression", - /* 349 */ "predicate ::= expression IS NULL", - /* 350 */ "predicate ::= expression IS NOT NULL", - /* 351 */ "predicate ::= expression in_op in_predicate_value", - /* 352 */ "compare_op ::= NK_LT", - /* 353 */ "compare_op ::= NK_GT", - /* 354 */ "compare_op ::= NK_LE", - /* 355 */ "compare_op ::= NK_GE", - /* 356 */ "compare_op ::= NK_NE", - /* 357 */ "compare_op ::= NK_EQ", - /* 358 */ "compare_op ::= LIKE", - /* 359 */ "compare_op ::= NOT LIKE", - /* 360 */ "compare_op ::= MATCH", - /* 361 */ "compare_op ::= NMATCH", - /* 362 */ "compare_op ::= CONTAINS", - /* 363 */ "in_op ::= IN", - /* 364 */ "in_op ::= NOT IN", - /* 365 */ "in_predicate_value ::= NK_LP expression_list NK_RP", - /* 366 */ "boolean_value_expression ::= boolean_primary", - /* 367 */ "boolean_value_expression ::= NOT boolean_primary", - /* 368 */ "boolean_value_expression ::= boolean_value_expression OR boolean_value_expression", - /* 369 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression", - /* 370 */ "boolean_primary ::= predicate", - /* 371 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP", - /* 372 */ "common_expression ::= expression", - /* 373 */ "common_expression ::= boolean_value_expression", - /* 374 */ "from_clause ::= FROM table_reference_list", - /* 375 */ "table_reference_list ::= table_reference", - /* 376 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference", - /* 377 */ "table_reference ::= table_primary", - /* 378 */ "table_reference ::= joined_table", - /* 379 */ "table_primary ::= table_name alias_opt", - /* 380 */ "table_primary ::= db_name NK_DOT table_name alias_opt", - /* 381 */ "table_primary ::= subquery alias_opt", - /* 382 */ "table_primary ::= parenthesized_joined_table", - /* 383 */ "alias_opt ::=", - /* 384 */ "alias_opt ::= table_alias", - /* 385 */ "alias_opt ::= AS table_alias", - /* 386 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP", - /* 387 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP", - /* 388 */ "joined_table ::= table_reference join_type JOIN table_reference ON search_condition", - /* 389 */ "join_type ::=", - /* 390 */ "join_type ::= INNER", - /* 391 */ "query_specification ::= SELECT set_quantifier_opt select_list from_clause where_clause_opt partition_by_clause_opt twindow_clause_opt group_by_clause_opt having_clause_opt", - /* 392 */ "set_quantifier_opt ::=", - /* 393 */ "set_quantifier_opt ::= DISTINCT", - /* 394 */ "set_quantifier_opt ::= ALL", - /* 395 */ "select_list ::= NK_STAR", - /* 396 */ "select_list ::= select_sublist", - /* 397 */ "select_sublist ::= select_item", - /* 398 */ "select_sublist ::= select_sublist NK_COMMA select_item", - /* 399 */ "select_item ::= common_expression", - /* 400 */ "select_item ::= common_expression column_alias", - /* 401 */ "select_item ::= common_expression AS column_alias", - /* 402 */ "select_item ::= table_name NK_DOT NK_STAR", - /* 403 */ "where_clause_opt ::=", - /* 404 */ "where_clause_opt ::= WHERE search_condition", - /* 405 */ "partition_by_clause_opt ::=", - /* 406 */ "partition_by_clause_opt ::= PARTITION BY expression_list", - /* 407 */ "twindow_clause_opt ::=", - /* 408 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP", - /* 409 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP expression NK_RP", - /* 410 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt", - /* 411 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt", - /* 412 */ "sliding_opt ::=", - /* 413 */ "sliding_opt ::= SLIDING NK_LP duration_literal NK_RP", - /* 414 */ "fill_opt ::=", - /* 415 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP", - /* 416 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP", - /* 417 */ "fill_mode ::= NONE", - /* 418 */ "fill_mode ::= PREV", - /* 419 */ "fill_mode ::= NULL", - /* 420 */ "fill_mode ::= LINEAR", - /* 421 */ "fill_mode ::= NEXT", - /* 422 */ "group_by_clause_opt ::=", - /* 423 */ "group_by_clause_opt ::= GROUP BY group_by_list", - /* 424 */ "group_by_list ::= expression", - /* 425 */ "group_by_list ::= group_by_list NK_COMMA expression", - /* 426 */ "having_clause_opt ::=", - /* 427 */ "having_clause_opt ::= HAVING search_condition", - /* 428 */ "query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt", - /* 429 */ "query_expression_body ::= query_primary", - /* 430 */ "query_expression_body ::= query_expression_body UNION ALL query_expression_body", - /* 431 */ "query_expression_body ::= query_expression_body UNION query_expression_body", - /* 432 */ "query_primary ::= query_specification", - /* 433 */ "query_primary ::= NK_LP query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt NK_RP", - /* 434 */ "order_by_clause_opt ::=", - /* 435 */ "order_by_clause_opt ::= ORDER BY sort_specification_list", - /* 436 */ "slimit_clause_opt ::=", - /* 437 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER", - /* 438 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER", - /* 439 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER", - /* 440 */ "limit_clause_opt ::=", - /* 441 */ "limit_clause_opt ::= LIMIT NK_INTEGER", - /* 442 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER", - /* 443 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER", - /* 444 */ "subquery ::= NK_LP query_expression NK_RP", - /* 445 */ "search_condition ::= common_expression", - /* 446 */ "sort_specification_list ::= sort_specification", - /* 447 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification", - /* 448 */ "sort_specification ::= expression ordering_specification_opt null_ordering_opt", - /* 449 */ "ordering_specification_opt ::=", - /* 450 */ "ordering_specification_opt ::= ASC", - /* 451 */ "ordering_specification_opt ::= DESC", - /* 452 */ "null_ordering_opt ::=", - /* 453 */ "null_ordering_opt ::= NULLS FIRST", - /* 454 */ "null_ordering_opt ::= NULLS LAST", + /* 224 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_expression", + /* 225 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name", + /* 226 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name", + /* 227 */ "cmd ::= DROP TOPIC exists_opt topic_name", + /* 228 */ "cmd ::= DROP CGROUP exists_opt cgroup_name ON topic_name", + /* 229 */ "cmd ::= DESC full_table_name", + /* 230 */ "cmd ::= DESCRIBE full_table_name", + /* 231 */ "cmd ::= RESET QUERY CACHE", + /* 232 */ "cmd ::= EXPLAIN analyze_opt explain_options query_expression", + /* 233 */ "analyze_opt ::=", + /* 234 */ "analyze_opt ::= ANALYZE", + /* 235 */ "explain_options ::=", + /* 236 */ "explain_options ::= explain_options VERBOSE NK_BOOL", + /* 237 */ "explain_options ::= explain_options RATIO NK_FLOAT", + /* 238 */ "cmd ::= COMPACT VNODES IN NK_LP integer_list NK_RP", + /* 239 */ "cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt", + /* 240 */ "cmd ::= DROP FUNCTION exists_opt function_name", + /* 241 */ "agg_func_opt ::=", + /* 242 */ "agg_func_opt ::= AGGREGATE", + /* 243 */ "bufsize_opt ::=", + /* 244 */ "bufsize_opt ::= BUFSIZE NK_INTEGER", + /* 245 */ "cmd ::= CREATE STREAM not_exists_opt stream_name stream_options into_opt AS query_expression", + /* 246 */ "cmd ::= DROP STREAM exists_opt stream_name", + /* 247 */ "into_opt ::=", + /* 248 */ "into_opt ::= INTO full_table_name", + /* 249 */ "stream_options ::=", + /* 250 */ "stream_options ::= stream_options TRIGGER AT_ONCE", + /* 251 */ "stream_options ::= stream_options TRIGGER WINDOW_CLOSE", + /* 252 */ "stream_options ::= stream_options WATERMARK duration_literal", + /* 253 */ "cmd ::= KILL CONNECTION NK_INTEGER", + /* 254 */ "cmd ::= KILL QUERY NK_INTEGER", + /* 255 */ "cmd ::= KILL TRANSACTION NK_INTEGER", + /* 256 */ "cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER", + /* 257 */ "cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list", + /* 258 */ "cmd ::= SPLIT VGROUP NK_INTEGER", + /* 259 */ "dnode_list ::= DNODE NK_INTEGER", + /* 260 */ "dnode_list ::= dnode_list DNODE NK_INTEGER", + /* 261 */ "cmd ::= SYNCDB db_name REPLICA", + /* 262 */ "cmd ::= query_expression", + /* 263 */ "literal ::= NK_INTEGER", + /* 264 */ "literal ::= NK_FLOAT", + /* 265 */ "literal ::= NK_STRING", + /* 266 */ "literal ::= NK_BOOL", + /* 267 */ "literal ::= TIMESTAMP NK_STRING", + /* 268 */ "literal ::= duration_literal", + /* 269 */ "literal ::= NULL", + /* 270 */ "literal ::= NK_QUESTION", + /* 271 */ "duration_literal ::= NK_VARIABLE", + /* 272 */ "signed ::= NK_INTEGER", + /* 273 */ "signed ::= NK_PLUS NK_INTEGER", + /* 274 */ "signed ::= NK_MINUS NK_INTEGER", + /* 275 */ "signed ::= NK_FLOAT", + /* 276 */ "signed ::= NK_PLUS NK_FLOAT", + /* 277 */ "signed ::= NK_MINUS NK_FLOAT", + /* 278 */ "signed_literal ::= signed", + /* 279 */ "signed_literal ::= NK_STRING", + /* 280 */ "signed_literal ::= NK_BOOL", + /* 281 */ "signed_literal ::= TIMESTAMP NK_STRING", + /* 282 */ "signed_literal ::= duration_literal", + /* 283 */ "signed_literal ::= NULL", + /* 284 */ "signed_literal ::= literal_func", + /* 285 */ "literal_list ::= signed_literal", + /* 286 */ "literal_list ::= literal_list NK_COMMA signed_literal", + /* 287 */ "db_name ::= NK_ID", + /* 288 */ "table_name ::= NK_ID", + /* 289 */ "column_name ::= NK_ID", + /* 290 */ "function_name ::= NK_ID", + /* 291 */ "table_alias ::= NK_ID", + /* 292 */ "column_alias ::= NK_ID", + /* 293 */ "user_name ::= NK_ID", + /* 294 */ "index_name ::= NK_ID", + /* 295 */ "topic_name ::= NK_ID", + /* 296 */ "stream_name ::= NK_ID", + /* 297 */ "cgroup_name ::= NK_ID", + /* 298 */ "expression ::= literal", + /* 299 */ "expression ::= pseudo_column", + /* 300 */ "expression ::= column_reference", + /* 301 */ "expression ::= function_expression", + /* 302 */ "expression ::= subquery", + /* 303 */ "expression ::= NK_LP expression NK_RP", + /* 304 */ "expression ::= NK_PLUS expression", + /* 305 */ "expression ::= NK_MINUS expression", + /* 306 */ "expression ::= expression NK_PLUS expression", + /* 307 */ "expression ::= expression NK_MINUS expression", + /* 308 */ "expression ::= expression NK_STAR expression", + /* 309 */ "expression ::= expression NK_SLASH expression", + /* 310 */ "expression ::= expression NK_REM expression", + /* 311 */ "expression ::= column_reference NK_ARROW NK_STRING", + /* 312 */ "expression_list ::= expression", + /* 313 */ "expression_list ::= expression_list NK_COMMA expression", + /* 314 */ "column_reference ::= column_name", + /* 315 */ "column_reference ::= table_name NK_DOT column_name", + /* 316 */ "pseudo_column ::= ROWTS", + /* 317 */ "pseudo_column ::= TBNAME", + /* 318 */ "pseudo_column ::= table_name NK_DOT TBNAME", + /* 319 */ "pseudo_column ::= QSTARTTS", + /* 320 */ "pseudo_column ::= QENDTS", + /* 321 */ "pseudo_column ::= WSTARTTS", + /* 322 */ "pseudo_column ::= WENDTS", + /* 323 */ "pseudo_column ::= WDURATION", + /* 324 */ "function_expression ::= function_name NK_LP expression_list NK_RP", + /* 325 */ "function_expression ::= star_func NK_LP star_func_para_list NK_RP", + /* 326 */ "function_expression ::= CAST NK_LP expression AS type_name NK_RP", + /* 327 */ "function_expression ::= literal_func", + /* 328 */ "literal_func ::= noarg_func NK_LP NK_RP", + /* 329 */ "literal_func ::= NOW", + /* 330 */ "noarg_func ::= NOW", + /* 331 */ "noarg_func ::= TODAY", + /* 332 */ "noarg_func ::= TIMEZONE", + /* 333 */ "star_func ::= COUNT", + /* 334 */ "star_func ::= FIRST", + /* 335 */ "star_func ::= LAST", + /* 336 */ "star_func ::= LAST_ROW", + /* 337 */ "star_func_para_list ::= NK_STAR", + /* 338 */ "star_func_para_list ::= other_para_list", + /* 339 */ "other_para_list ::= star_func_para", + /* 340 */ "other_para_list ::= other_para_list NK_COMMA star_func_para", + /* 341 */ "star_func_para ::= expression", + /* 342 */ "star_func_para ::= table_name NK_DOT NK_STAR", + /* 343 */ "predicate ::= expression compare_op expression", + /* 344 */ "predicate ::= expression BETWEEN expression AND expression", + /* 345 */ "predicate ::= expression NOT BETWEEN expression AND expression", + /* 346 */ "predicate ::= expression IS NULL", + /* 347 */ "predicate ::= expression IS NOT NULL", + /* 348 */ "predicate ::= expression in_op in_predicate_value", + /* 349 */ "compare_op ::= NK_LT", + /* 350 */ "compare_op ::= NK_GT", + /* 351 */ "compare_op ::= NK_LE", + /* 352 */ "compare_op ::= NK_GE", + /* 353 */ "compare_op ::= NK_NE", + /* 354 */ "compare_op ::= NK_EQ", + /* 355 */ "compare_op ::= LIKE", + /* 356 */ "compare_op ::= NOT LIKE", + /* 357 */ "compare_op ::= MATCH", + /* 358 */ "compare_op ::= NMATCH", + /* 359 */ "compare_op ::= CONTAINS", + /* 360 */ "in_op ::= IN", + /* 361 */ "in_op ::= NOT IN", + /* 362 */ "in_predicate_value ::= NK_LP expression_list NK_RP", + /* 363 */ "boolean_value_expression ::= boolean_primary", + /* 364 */ "boolean_value_expression ::= NOT boolean_primary", + /* 365 */ "boolean_value_expression ::= boolean_value_expression OR boolean_value_expression", + /* 366 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression", + /* 367 */ "boolean_primary ::= predicate", + /* 368 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP", + /* 369 */ "common_expression ::= expression", + /* 370 */ "common_expression ::= boolean_value_expression", + /* 371 */ "from_clause ::= FROM table_reference_list", + /* 372 */ "table_reference_list ::= table_reference", + /* 373 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference", + /* 374 */ "table_reference ::= table_primary", + /* 375 */ "table_reference ::= joined_table", + /* 376 */ "table_primary ::= table_name alias_opt", + /* 377 */ "table_primary ::= db_name NK_DOT table_name alias_opt", + /* 378 */ "table_primary ::= subquery alias_opt", + /* 379 */ "table_primary ::= parenthesized_joined_table", + /* 380 */ "alias_opt ::=", + /* 381 */ "alias_opt ::= table_alias", + /* 382 */ "alias_opt ::= AS table_alias", + /* 383 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP", + /* 384 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP", + /* 385 */ "joined_table ::= table_reference join_type JOIN table_reference ON search_condition", + /* 386 */ "join_type ::=", + /* 387 */ "join_type ::= INNER", + /* 388 */ "query_specification ::= SELECT set_quantifier_opt select_list from_clause where_clause_opt partition_by_clause_opt twindow_clause_opt group_by_clause_opt having_clause_opt", + /* 389 */ "set_quantifier_opt ::=", + /* 390 */ "set_quantifier_opt ::= DISTINCT", + /* 391 */ "set_quantifier_opt ::= ALL", + /* 392 */ "select_list ::= NK_STAR", + /* 393 */ "select_list ::= select_sublist", + /* 394 */ "select_sublist ::= select_item", + /* 395 */ "select_sublist ::= select_sublist NK_COMMA select_item", + /* 396 */ "select_item ::= common_expression", + /* 397 */ "select_item ::= common_expression column_alias", + /* 398 */ "select_item ::= common_expression AS column_alias", + /* 399 */ "select_item ::= table_name NK_DOT NK_STAR", + /* 400 */ "where_clause_opt ::=", + /* 401 */ "where_clause_opt ::= WHERE search_condition", + /* 402 */ "partition_by_clause_opt ::=", + /* 403 */ "partition_by_clause_opt ::= PARTITION BY expression_list", + /* 404 */ "twindow_clause_opt ::=", + /* 405 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP", + /* 406 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP expression NK_RP", + /* 407 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt", + /* 408 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt", + /* 409 */ "sliding_opt ::=", + /* 410 */ "sliding_opt ::= SLIDING NK_LP duration_literal NK_RP", + /* 411 */ "fill_opt ::=", + /* 412 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP", + /* 413 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP", + /* 414 */ "fill_mode ::= NONE", + /* 415 */ "fill_mode ::= PREV", + /* 416 */ "fill_mode ::= NULL", + /* 417 */ "fill_mode ::= LINEAR", + /* 418 */ "fill_mode ::= NEXT", + /* 419 */ "group_by_clause_opt ::=", + /* 420 */ "group_by_clause_opt ::= GROUP BY group_by_list", + /* 421 */ "group_by_list ::= expression", + /* 422 */ "group_by_list ::= group_by_list NK_COMMA expression", + /* 423 */ "having_clause_opt ::=", + /* 424 */ "having_clause_opt ::= HAVING search_condition", + /* 425 */ "query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt", + /* 426 */ "query_expression_body ::= query_primary", + /* 427 */ "query_expression_body ::= query_expression_body UNION ALL query_expression_body", + /* 428 */ "query_expression_body ::= query_expression_body UNION query_expression_body", + /* 429 */ "query_primary ::= query_specification", + /* 430 */ "query_primary ::= NK_LP query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt NK_RP", + /* 431 */ "order_by_clause_opt ::=", + /* 432 */ "order_by_clause_opt ::= ORDER BY sort_specification_list", + /* 433 */ "slimit_clause_opt ::=", + /* 434 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER", + /* 435 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER", + /* 436 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER", + /* 437 */ "limit_clause_opt ::=", + /* 438 */ "limit_clause_opt ::= LIMIT NK_INTEGER", + /* 439 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER", + /* 440 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER", + /* 441 */ "subquery ::= NK_LP query_expression NK_RP", + /* 442 */ "search_condition ::= common_expression", + /* 443 */ "sort_specification_list ::= sort_specification", + /* 444 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification", + /* 445 */ "sort_specification ::= expression ordering_specification_opt null_ordering_opt", + /* 446 */ "ordering_specification_opt ::=", + /* 447 */ "ordering_specification_opt ::= ASC", + /* 448 */ "ordering_specification_opt ::= DESC", + /* 449 */ "null_ordering_opt ::=", + /* 450 */ "null_ordering_opt ::= NULLS FIRST", + /* 451 */ "null_ordering_opt ::= NULLS LAST", }; #endif /* NDEBUG */ @@ -2104,175 +2108,174 @@ static void yy_destructor( */ /********* Begin destructor definitions ***************************************/ /* Default NON-TERMINAL Destructor */ - case 240: /* cmd */ - case 243: /* literal */ - case 254: /* db_options */ - case 256: /* alter_db_options */ - case 261: /* retention */ - case 262: /* full_table_name */ - case 265: /* table_options */ - case 269: /* alter_table_clause */ - case 270: /* alter_table_options */ - case 273: /* signed_literal */ - case 274: /* create_subtable_clause */ - case 277: /* drop_table_clause */ - case 280: /* column_def */ - case 283: /* col_name */ - case 284: /* db_name_cond_opt */ - case 285: /* like_pattern_opt */ - case 286: /* table_name_cond */ - case 287: /* from_db_opt */ - case 288: /* func_name */ - case 291: /* index_options */ - case 293: /* duration_literal */ - case 294: /* sliding_opt */ - case 295: /* func */ - case 298: /* topic_options */ - case 299: /* query_expression */ - case 302: /* explain_options */ - case 306: /* stream_options */ - case 307: /* into_opt */ - case 309: /* signed */ - case 310: /* literal_func */ - case 313: /* expression */ - case 314: /* pseudo_column */ - case 315: /* column_reference */ - case 316: /* function_expression */ - case 317: /* subquery */ - case 322: /* star_func_para */ - case 323: /* predicate */ - case 326: /* in_predicate_value */ - case 327: /* boolean_value_expression */ - case 328: /* boolean_primary */ - case 329: /* common_expression */ - case 330: /* from_clause */ - case 331: /* table_reference_list */ - case 332: /* table_reference */ - case 333: /* table_primary */ - case 334: /* joined_table */ - case 336: /* parenthesized_joined_table */ - case 338: /* search_condition */ - case 339: /* query_specification */ - case 342: /* where_clause_opt */ - case 344: /* twindow_clause_opt */ - case 346: /* having_clause_opt */ - case 348: /* select_item */ - case 349: /* fill_opt */ - case 352: /* query_expression_body */ - case 354: /* slimit_clause_opt */ - case 355: /* limit_clause_opt */ - case 356: /* query_primary */ - case 358: /* sort_specification */ + case 238: /* cmd */ + case 241: /* literal */ + case 252: /* db_options */ + case 254: /* alter_db_options */ + case 259: /* retention */ + case 260: /* full_table_name */ + case 263: /* table_options */ + case 267: /* alter_table_clause */ + case 268: /* alter_table_options */ + case 271: /* signed_literal */ + case 272: /* create_subtable_clause */ + case 275: /* drop_table_clause */ + case 278: /* column_def */ + case 281: /* col_name */ + case 282: /* db_name_cond_opt */ + case 283: /* like_pattern_opt */ + case 284: /* table_name_cond */ + case 285: /* from_db_opt */ + case 286: /* func_name */ + case 289: /* index_options */ + case 291: /* duration_literal */ + case 292: /* sliding_opt */ + case 293: /* func */ + case 296: /* query_expression */ + case 299: /* explain_options */ + case 303: /* stream_options */ + case 304: /* into_opt */ + case 306: /* signed */ + case 307: /* literal_func */ + case 310: /* expression */ + case 311: /* pseudo_column */ + case 312: /* column_reference */ + case 313: /* function_expression */ + case 314: /* subquery */ + case 319: /* star_func_para */ + case 320: /* predicate */ + case 323: /* in_predicate_value */ + case 324: /* boolean_value_expression */ + case 325: /* boolean_primary */ + case 326: /* common_expression */ + case 327: /* from_clause */ + case 328: /* table_reference_list */ + case 329: /* table_reference */ + case 330: /* table_primary */ + case 331: /* joined_table */ + case 333: /* parenthesized_joined_table */ + case 335: /* search_condition */ + case 336: /* query_specification */ + case 339: /* where_clause_opt */ + case 341: /* twindow_clause_opt */ + case 343: /* having_clause_opt */ + case 345: /* select_item */ + case 346: /* fill_opt */ + case 349: /* query_expression_body */ + case 351: /* slimit_clause_opt */ + case 352: /* limit_clause_opt */ + case 353: /* query_primary */ + case 355: /* sort_specification */ { - nodesDestroyNode((yypminor->yy636)); + nodesDestroyNode((yypminor->yy172)); } break; - case 241: /* account_options */ - case 242: /* alter_account_options */ - case 244: /* alter_account_option */ - case 304: /* bufsize_opt */ + case 239: /* account_options */ + case 240: /* alter_account_options */ + case 242: /* alter_account_option */ + case 301: /* bufsize_opt */ { } break; - case 245: /* user_name */ - case 247: /* priv_level */ - case 250: /* db_name */ - case 251: /* dnode_endpoint */ - case 252: /* dnode_host_name */ - case 271: /* column_name */ - case 279: /* table_name */ - case 289: /* function_name */ - case 290: /* index_name */ - case 297: /* topic_name */ - case 300: /* cgroup_name */ - case 305: /* stream_name */ - case 311: /* table_alias */ - case 312: /* column_alias */ - case 318: /* star_func */ - case 320: /* noarg_func */ - case 335: /* alias_opt */ + case 243: /* user_name */ + case 245: /* priv_level */ + case 248: /* db_name */ + case 249: /* dnode_endpoint */ + case 250: /* dnode_host_name */ + case 269: /* column_name */ + case 277: /* table_name */ + case 287: /* function_name */ + case 288: /* index_name */ + case 295: /* topic_name */ + case 297: /* cgroup_name */ + case 302: /* stream_name */ + case 308: /* table_alias */ + case 309: /* column_alias */ + case 315: /* star_func */ + case 317: /* noarg_func */ + case 332: /* alias_opt */ { } break; - case 246: /* privileges */ - case 248: /* priv_type_list */ - case 249: /* priv_type */ + case 244: /* privileges */ + case 246: /* priv_type_list */ + case 247: /* priv_type */ { } break; - case 253: /* not_exists_opt */ - case 255: /* exists_opt */ - case 301: /* analyze_opt */ - case 303: /* agg_func_opt */ - case 340: /* set_quantifier_opt */ + case 251: /* not_exists_opt */ + case 253: /* exists_opt */ + case 298: /* analyze_opt */ + case 300: /* agg_func_opt */ + case 337: /* set_quantifier_opt */ { } break; - case 257: /* integer_list */ - case 258: /* variable_list */ - case 259: /* retention_list */ - case 263: /* column_def_list */ - case 264: /* tags_def_opt */ - case 266: /* multi_create_clause */ - case 267: /* tags_def */ - case 268: /* multi_drop_clause */ - case 275: /* specific_tags_opt */ - case 276: /* literal_list */ - case 278: /* col_name_list */ - case 281: /* func_name_list */ - case 292: /* func_list */ - case 296: /* expression_list */ - case 308: /* dnode_list */ - case 319: /* star_func_para_list */ - case 321: /* other_para_list */ - case 341: /* select_list */ - case 343: /* partition_by_clause_opt */ - case 345: /* group_by_clause_opt */ - case 347: /* select_sublist */ - case 351: /* group_by_list */ - case 353: /* order_by_clause_opt */ - case 357: /* sort_specification_list */ + case 255: /* integer_list */ + case 256: /* variable_list */ + case 257: /* retention_list */ + case 261: /* column_def_list */ + case 262: /* tags_def_opt */ + case 264: /* multi_create_clause */ + case 265: /* tags_def */ + case 266: /* multi_drop_clause */ + case 273: /* specific_tags_opt */ + case 274: /* literal_list */ + case 276: /* col_name_list */ + case 279: /* func_name_list */ + case 290: /* func_list */ + case 294: /* expression_list */ + case 305: /* dnode_list */ + case 316: /* star_func_para_list */ + case 318: /* other_para_list */ + case 338: /* select_list */ + case 340: /* partition_by_clause_opt */ + case 342: /* group_by_clause_opt */ + case 344: /* select_sublist */ + case 348: /* group_by_list */ + case 350: /* order_by_clause_opt */ + case 354: /* sort_specification_list */ { - nodesDestroyList((yypminor->yy236)); + nodesDestroyList((yypminor->yy60)); } break; - case 260: /* alter_db_option */ - case 282: /* alter_table_option */ + case 258: /* alter_db_option */ + case 280: /* alter_table_option */ { } break; - case 272: /* type_name */ + case 270: /* type_name */ { } break; - case 324: /* compare_op */ - case 325: /* in_op */ + case 321: /* compare_op */ + case 322: /* in_op */ { } break; - case 337: /* join_type */ + case 334: /* join_type */ { } break; - case 350: /* fill_mode */ + case 347: /* fill_mode */ { } break; - case 359: /* ordering_specification_opt */ + case 356: /* ordering_specification_opt */ { } break; - case 360: /* null_ordering_opt */ + case 357: /* null_ordering_opt */ { } @@ -2571,461 +2574,458 @@ static const struct { YYCODETYPE lhs; /* Symbol on the left-hand side of the rule */ signed char nrhs; /* Negative of the number of RHS symbols in the rule */ } yyRuleInfo[] = { - { 240, -6 }, /* (0) cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */ - { 240, -4 }, /* (1) cmd ::= ALTER ACCOUNT NK_ID alter_account_options */ - { 241, 0 }, /* (2) account_options ::= */ - { 241, -3 }, /* (3) account_options ::= account_options PPS literal */ - { 241, -3 }, /* (4) account_options ::= account_options TSERIES literal */ - { 241, -3 }, /* (5) account_options ::= account_options STORAGE literal */ - { 241, -3 }, /* (6) account_options ::= account_options STREAMS literal */ - { 241, -3 }, /* (7) account_options ::= account_options QTIME literal */ - { 241, -3 }, /* (8) account_options ::= account_options DBS literal */ - { 241, -3 }, /* (9) account_options ::= account_options USERS literal */ - { 241, -3 }, /* (10) account_options ::= account_options CONNS literal */ - { 241, -3 }, /* (11) account_options ::= account_options STATE literal */ - { 242, -1 }, /* (12) alter_account_options ::= alter_account_option */ - { 242, -2 }, /* (13) alter_account_options ::= alter_account_options alter_account_option */ - { 244, -2 }, /* (14) alter_account_option ::= PASS literal */ - { 244, -2 }, /* (15) alter_account_option ::= PPS literal */ - { 244, -2 }, /* (16) alter_account_option ::= TSERIES literal */ - { 244, -2 }, /* (17) alter_account_option ::= STORAGE literal */ - { 244, -2 }, /* (18) alter_account_option ::= STREAMS literal */ - { 244, -2 }, /* (19) alter_account_option ::= QTIME literal */ - { 244, -2 }, /* (20) alter_account_option ::= DBS literal */ - { 244, -2 }, /* (21) alter_account_option ::= USERS literal */ - { 244, -2 }, /* (22) alter_account_option ::= CONNS literal */ - { 244, -2 }, /* (23) alter_account_option ::= STATE literal */ - { 240, -5 }, /* (24) cmd ::= CREATE USER user_name PASS NK_STRING */ - { 240, -5 }, /* (25) cmd ::= ALTER USER user_name PASS NK_STRING */ - { 240, -5 }, /* (26) cmd ::= ALTER USER user_name PRIVILEGE NK_STRING */ - { 240, -3 }, /* (27) cmd ::= DROP USER user_name */ - { 240, -6 }, /* (28) cmd ::= GRANT privileges ON priv_level TO user_name */ - { 240, -6 }, /* (29) cmd ::= REVOKE privileges ON priv_level FROM user_name */ - { 246, -1 }, /* (30) privileges ::= ALL */ - { 246, -1 }, /* (31) privileges ::= priv_type_list */ - { 248, -1 }, /* (32) priv_type_list ::= priv_type */ - { 248, -3 }, /* (33) priv_type_list ::= priv_type_list NK_COMMA priv_type */ - { 249, -1 }, /* (34) priv_type ::= READ */ - { 249, -1 }, /* (35) priv_type ::= WRITE */ - { 247, -3 }, /* (36) priv_level ::= NK_STAR NK_DOT NK_STAR */ - { 247, -3 }, /* (37) priv_level ::= db_name NK_DOT NK_STAR */ - { 240, -3 }, /* (38) cmd ::= CREATE DNODE dnode_endpoint */ - { 240, -5 }, /* (39) cmd ::= CREATE DNODE dnode_host_name PORT NK_INTEGER */ - { 240, -3 }, /* (40) cmd ::= DROP DNODE NK_INTEGER */ - { 240, -3 }, /* (41) cmd ::= DROP DNODE dnode_endpoint */ - { 240, -4 }, /* (42) cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ - { 240, -5 }, /* (43) cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */ - { 240, -4 }, /* (44) cmd ::= ALTER ALL DNODES NK_STRING */ - { 240, -5 }, /* (45) cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */ - { 251, -1 }, /* (46) dnode_endpoint ::= NK_STRING */ - { 252, -1 }, /* (47) dnode_host_name ::= NK_ID */ - { 252, -1 }, /* (48) dnode_host_name ::= NK_IPTOKEN */ - { 240, -3 }, /* (49) cmd ::= ALTER LOCAL NK_STRING */ - { 240, -4 }, /* (50) cmd ::= ALTER LOCAL NK_STRING NK_STRING */ - { 240, -5 }, /* (51) cmd ::= CREATE QNODE ON DNODE NK_INTEGER */ - { 240, -5 }, /* (52) cmd ::= DROP QNODE ON DNODE NK_INTEGER */ - { 240, -5 }, /* (53) cmd ::= CREATE BNODE ON DNODE NK_INTEGER */ - { 240, -5 }, /* (54) cmd ::= DROP BNODE ON DNODE NK_INTEGER */ - { 240, -5 }, /* (55) cmd ::= CREATE SNODE ON DNODE NK_INTEGER */ - { 240, -5 }, /* (56) cmd ::= DROP SNODE ON DNODE NK_INTEGER */ - { 240, -5 }, /* (57) cmd ::= CREATE MNODE ON DNODE NK_INTEGER */ - { 240, -5 }, /* (58) cmd ::= DROP MNODE ON DNODE NK_INTEGER */ - { 240, -5 }, /* (59) cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ - { 240, -4 }, /* (60) cmd ::= DROP DATABASE exists_opt db_name */ - { 240, -2 }, /* (61) cmd ::= USE db_name */ - { 240, -4 }, /* (62) cmd ::= ALTER DATABASE db_name alter_db_options */ - { 253, -3 }, /* (63) not_exists_opt ::= IF NOT EXISTS */ - { 253, 0 }, /* (64) not_exists_opt ::= */ - { 255, -2 }, /* (65) exists_opt ::= IF EXISTS */ - { 255, 0 }, /* (66) exists_opt ::= */ - { 254, 0 }, /* (67) db_options ::= */ - { 254, -3 }, /* (68) db_options ::= db_options BUFFER NK_INTEGER */ - { 254, -3 }, /* (69) db_options ::= db_options CACHELAST NK_INTEGER */ - { 254, -3 }, /* (70) db_options ::= db_options COMP NK_INTEGER */ - { 254, -3 }, /* (71) db_options ::= db_options DAYS NK_INTEGER */ - { 254, -3 }, /* (72) db_options ::= db_options DAYS NK_VARIABLE */ - { 254, -3 }, /* (73) db_options ::= db_options FSYNC NK_INTEGER */ - { 254, -3 }, /* (74) db_options ::= db_options MAXROWS NK_INTEGER */ - { 254, -3 }, /* (75) db_options ::= db_options MINROWS NK_INTEGER */ - { 254, -3 }, /* (76) db_options ::= db_options KEEP integer_list */ - { 254, -3 }, /* (77) db_options ::= db_options KEEP variable_list */ - { 254, -3 }, /* (78) db_options ::= db_options PAGES NK_INTEGER */ - { 254, -3 }, /* (79) db_options ::= db_options PAGESIZE NK_INTEGER */ - { 254, -3 }, /* (80) db_options ::= db_options PRECISION NK_STRING */ - { 254, -3 }, /* (81) db_options ::= db_options REPLICA NK_INTEGER */ - { 254, -3 }, /* (82) db_options ::= db_options STRICT NK_INTEGER */ - { 254, -3 }, /* (83) db_options ::= db_options WAL NK_INTEGER */ - { 254, -3 }, /* (84) db_options ::= db_options VGROUPS NK_INTEGER */ - { 254, -3 }, /* (85) db_options ::= db_options SINGLE_STABLE NK_INTEGER */ - { 254, -3 }, /* (86) db_options ::= db_options RETENTIONS retention_list */ - { 254, -3 }, /* (87) db_options ::= db_options SCHEMALESS NK_INTEGER */ - { 256, -1 }, /* (88) alter_db_options ::= alter_db_option */ - { 256, -2 }, /* (89) alter_db_options ::= alter_db_options alter_db_option */ - { 260, -2 }, /* (90) alter_db_option ::= BUFFER NK_INTEGER */ - { 260, -2 }, /* (91) alter_db_option ::= CACHELAST NK_INTEGER */ - { 260, -2 }, /* (92) alter_db_option ::= FSYNC NK_INTEGER */ - { 260, -2 }, /* (93) alter_db_option ::= KEEP integer_list */ - { 260, -2 }, /* (94) alter_db_option ::= KEEP variable_list */ - { 260, -2 }, /* (95) alter_db_option ::= PAGES NK_INTEGER */ - { 260, -2 }, /* (96) alter_db_option ::= REPLICA NK_INTEGER */ - { 260, -2 }, /* (97) alter_db_option ::= STRICT NK_INTEGER */ - { 260, -2 }, /* (98) alter_db_option ::= WAL NK_INTEGER */ - { 257, -1 }, /* (99) integer_list ::= NK_INTEGER */ - { 257, -3 }, /* (100) integer_list ::= integer_list NK_COMMA NK_INTEGER */ - { 258, -1 }, /* (101) variable_list ::= NK_VARIABLE */ - { 258, -3 }, /* (102) variable_list ::= variable_list NK_COMMA NK_VARIABLE */ - { 259, -1 }, /* (103) retention_list ::= retention */ - { 259, -3 }, /* (104) retention_list ::= retention_list NK_COMMA retention */ - { 261, -3 }, /* (105) retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ - { 240, -9 }, /* (106) cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ - { 240, -3 }, /* (107) cmd ::= CREATE TABLE multi_create_clause */ - { 240, -9 }, /* (108) cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ - { 240, -3 }, /* (109) cmd ::= DROP TABLE multi_drop_clause */ - { 240, -4 }, /* (110) cmd ::= DROP STABLE exists_opt full_table_name */ - { 240, -3 }, /* (111) cmd ::= ALTER TABLE alter_table_clause */ - { 240, -3 }, /* (112) cmd ::= ALTER STABLE alter_table_clause */ - { 269, -2 }, /* (113) alter_table_clause ::= full_table_name alter_table_options */ - { 269, -5 }, /* (114) alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ - { 269, -4 }, /* (115) alter_table_clause ::= full_table_name DROP COLUMN column_name */ - { 269, -5 }, /* (116) alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ - { 269, -5 }, /* (117) alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ - { 269, -5 }, /* (118) alter_table_clause ::= full_table_name ADD TAG column_name type_name */ - { 269, -4 }, /* (119) alter_table_clause ::= full_table_name DROP TAG column_name */ - { 269, -5 }, /* (120) alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ - { 269, -5 }, /* (121) alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ - { 269, -6 }, /* (122) alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */ - { 266, -1 }, /* (123) multi_create_clause ::= create_subtable_clause */ - { 266, -2 }, /* (124) multi_create_clause ::= multi_create_clause create_subtable_clause */ - { 274, -10 }, /* (125) create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_tags_opt TAGS NK_LP literal_list NK_RP table_options */ - { 268, -1 }, /* (126) multi_drop_clause ::= drop_table_clause */ - { 268, -2 }, /* (127) multi_drop_clause ::= multi_drop_clause drop_table_clause */ - { 277, -2 }, /* (128) drop_table_clause ::= exists_opt full_table_name */ - { 275, 0 }, /* (129) specific_tags_opt ::= */ - { 275, -3 }, /* (130) specific_tags_opt ::= NK_LP col_name_list NK_RP */ - { 262, -1 }, /* (131) full_table_name ::= table_name */ - { 262, -3 }, /* (132) full_table_name ::= db_name NK_DOT table_name */ - { 263, -1 }, /* (133) column_def_list ::= column_def */ - { 263, -3 }, /* (134) column_def_list ::= column_def_list NK_COMMA column_def */ - { 280, -2 }, /* (135) column_def ::= column_name type_name */ - { 280, -4 }, /* (136) column_def ::= column_name type_name COMMENT NK_STRING */ - { 272, -1 }, /* (137) type_name ::= BOOL */ - { 272, -1 }, /* (138) type_name ::= TINYINT */ - { 272, -1 }, /* (139) type_name ::= SMALLINT */ - { 272, -1 }, /* (140) type_name ::= INT */ - { 272, -1 }, /* (141) type_name ::= INTEGER */ - { 272, -1 }, /* (142) type_name ::= BIGINT */ - { 272, -1 }, /* (143) type_name ::= FLOAT */ - { 272, -1 }, /* (144) type_name ::= DOUBLE */ - { 272, -4 }, /* (145) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ - { 272, -1 }, /* (146) type_name ::= TIMESTAMP */ - { 272, -4 }, /* (147) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ - { 272, -2 }, /* (148) type_name ::= TINYINT UNSIGNED */ - { 272, -2 }, /* (149) type_name ::= SMALLINT UNSIGNED */ - { 272, -2 }, /* (150) type_name ::= INT UNSIGNED */ - { 272, -2 }, /* (151) type_name ::= BIGINT UNSIGNED */ - { 272, -1 }, /* (152) type_name ::= JSON */ - { 272, -4 }, /* (153) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ - { 272, -1 }, /* (154) type_name ::= MEDIUMBLOB */ - { 272, -1 }, /* (155) type_name ::= BLOB */ - { 272, -4 }, /* (156) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ - { 272, -1 }, /* (157) type_name ::= DECIMAL */ - { 272, -4 }, /* (158) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ - { 272, -6 }, /* (159) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ - { 264, 0 }, /* (160) tags_def_opt ::= */ - { 264, -1 }, /* (161) tags_def_opt ::= tags_def */ - { 267, -4 }, /* (162) tags_def ::= TAGS NK_LP column_def_list NK_RP */ - { 265, 0 }, /* (163) table_options ::= */ - { 265, -3 }, /* (164) table_options ::= table_options COMMENT NK_STRING */ - { 265, -3 }, /* (165) table_options ::= table_options DELAY NK_INTEGER */ - { 265, -3 }, /* (166) table_options ::= table_options FILE_FACTOR NK_FLOAT */ - { 265, -5 }, /* (167) table_options ::= table_options ROLLUP NK_LP func_name_list NK_RP */ - { 265, -3 }, /* (168) table_options ::= table_options TTL NK_INTEGER */ - { 265, -5 }, /* (169) table_options ::= table_options SMA NK_LP col_name_list NK_RP */ - { 270, -1 }, /* (170) alter_table_options ::= alter_table_option */ - { 270, -2 }, /* (171) alter_table_options ::= alter_table_options alter_table_option */ - { 282, -2 }, /* (172) alter_table_option ::= COMMENT NK_STRING */ - { 282, -2 }, /* (173) alter_table_option ::= TTL NK_INTEGER */ - { 278, -1 }, /* (174) col_name_list ::= col_name */ - { 278, -3 }, /* (175) col_name_list ::= col_name_list NK_COMMA col_name */ - { 283, -1 }, /* (176) col_name ::= column_name */ - { 240, -2 }, /* (177) cmd ::= SHOW DNODES */ - { 240, -2 }, /* (178) cmd ::= SHOW USERS */ - { 240, -2 }, /* (179) cmd ::= SHOW DATABASES */ - { 240, -4 }, /* (180) cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */ - { 240, -4 }, /* (181) cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ - { 240, -3 }, /* (182) cmd ::= SHOW db_name_cond_opt VGROUPS */ - { 240, -2 }, /* (183) cmd ::= SHOW MNODES */ - { 240, -2 }, /* (184) cmd ::= SHOW MODULES */ - { 240, -2 }, /* (185) cmd ::= SHOW QNODES */ - { 240, -2 }, /* (186) cmd ::= SHOW FUNCTIONS */ - { 240, -5 }, /* (187) cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ - { 240, -2 }, /* (188) cmd ::= SHOW STREAMS */ - { 240, -2 }, /* (189) cmd ::= SHOW ACCOUNTS */ - { 240, -2 }, /* (190) cmd ::= SHOW APPS */ - { 240, -2 }, /* (191) cmd ::= SHOW CONNECTIONS */ - { 240, -2 }, /* (192) cmd ::= SHOW LICENCE */ - { 240, -2 }, /* (193) cmd ::= SHOW GRANTS */ - { 240, -4 }, /* (194) cmd ::= SHOW CREATE DATABASE db_name */ - { 240, -4 }, /* (195) cmd ::= SHOW CREATE TABLE full_table_name */ - { 240, -4 }, /* (196) cmd ::= SHOW CREATE STABLE full_table_name */ - { 240, -2 }, /* (197) cmd ::= SHOW QUERIES */ - { 240, -2 }, /* (198) cmd ::= SHOW SCORES */ - { 240, -2 }, /* (199) cmd ::= SHOW TOPICS */ - { 240, -2 }, /* (200) cmd ::= SHOW VARIABLES */ - { 240, -2 }, /* (201) cmd ::= SHOW BNODES */ - { 240, -2 }, /* (202) cmd ::= SHOW SNODES */ - { 240, -2 }, /* (203) cmd ::= SHOW CLUSTER */ - { 240, -2 }, /* (204) cmd ::= SHOW TRANSACTIONS */ - { 284, 0 }, /* (205) db_name_cond_opt ::= */ - { 284, -2 }, /* (206) db_name_cond_opt ::= db_name NK_DOT */ - { 285, 0 }, /* (207) like_pattern_opt ::= */ - { 285, -2 }, /* (208) like_pattern_opt ::= LIKE NK_STRING */ - { 286, -1 }, /* (209) table_name_cond ::= table_name */ - { 287, 0 }, /* (210) from_db_opt ::= */ - { 287, -2 }, /* (211) from_db_opt ::= FROM db_name */ - { 281, -1 }, /* (212) func_name_list ::= func_name */ - { 281, -3 }, /* (213) func_name_list ::= func_name_list NK_COMMA func_name */ - { 288, -1 }, /* (214) func_name ::= function_name */ - { 240, -8 }, /* (215) cmd ::= CREATE SMA INDEX not_exists_opt index_name ON table_name index_options */ - { 240, -10 }, /* (216) cmd ::= CREATE FULLTEXT INDEX not_exists_opt index_name ON table_name NK_LP col_name_list NK_RP */ - { 240, -6 }, /* (217) cmd ::= DROP INDEX exists_opt index_name ON table_name */ - { 291, 0 }, /* (218) index_options ::= */ - { 291, -9 }, /* (219) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt */ - { 291, -11 }, /* (220) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt */ - { 292, -1 }, /* (221) func_list ::= func */ - { 292, -3 }, /* (222) func_list ::= func_list NK_COMMA func */ - { 295, -4 }, /* (223) func ::= function_name NK_LP expression_list NK_RP */ - { 240, -7 }, /* (224) cmd ::= CREATE TOPIC not_exists_opt topic_name topic_options AS query_expression */ - { 240, -7 }, /* (225) cmd ::= CREATE TOPIC not_exists_opt topic_name topic_options AS db_name */ - { 240, -4 }, /* (226) cmd ::= DROP TOPIC exists_opt topic_name */ - { 240, -6 }, /* (227) cmd ::= DROP CGROUP exists_opt cgroup_name ON topic_name */ - { 298, 0 }, /* (228) topic_options ::= */ - { 298, -3 }, /* (229) topic_options ::= topic_options WITH TABLE */ - { 298, -3 }, /* (230) topic_options ::= topic_options WITH SCHEMA */ - { 298, -3 }, /* (231) topic_options ::= topic_options WITH TAG */ - { 240, -2 }, /* (232) cmd ::= DESC full_table_name */ - { 240, -2 }, /* (233) cmd ::= DESCRIBE full_table_name */ - { 240, -3 }, /* (234) cmd ::= RESET QUERY CACHE */ - { 240, -4 }, /* (235) cmd ::= EXPLAIN analyze_opt explain_options query_expression */ - { 301, 0 }, /* (236) analyze_opt ::= */ - { 301, -1 }, /* (237) analyze_opt ::= ANALYZE */ - { 302, 0 }, /* (238) explain_options ::= */ - { 302, -3 }, /* (239) explain_options ::= explain_options VERBOSE NK_BOOL */ - { 302, -3 }, /* (240) explain_options ::= explain_options RATIO NK_FLOAT */ - { 240, -6 }, /* (241) cmd ::= COMPACT VNODES IN NK_LP integer_list NK_RP */ - { 240, -10 }, /* (242) cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt */ - { 240, -4 }, /* (243) cmd ::= DROP FUNCTION exists_opt function_name */ - { 303, 0 }, /* (244) agg_func_opt ::= */ - { 303, -1 }, /* (245) agg_func_opt ::= AGGREGATE */ - { 304, 0 }, /* (246) bufsize_opt ::= */ - { 304, -2 }, /* (247) bufsize_opt ::= BUFSIZE NK_INTEGER */ - { 240, -8 }, /* (248) cmd ::= CREATE STREAM not_exists_opt stream_name stream_options into_opt AS query_expression */ - { 240, -4 }, /* (249) cmd ::= DROP STREAM exists_opt stream_name */ - { 307, 0 }, /* (250) into_opt ::= */ - { 307, -2 }, /* (251) into_opt ::= INTO full_table_name */ - { 306, 0 }, /* (252) stream_options ::= */ - { 306, -3 }, /* (253) stream_options ::= stream_options TRIGGER AT_ONCE */ - { 306, -3 }, /* (254) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ - { 306, -3 }, /* (255) stream_options ::= stream_options WATERMARK duration_literal */ - { 240, -3 }, /* (256) cmd ::= KILL CONNECTION NK_INTEGER */ - { 240, -3 }, /* (257) cmd ::= KILL QUERY NK_INTEGER */ - { 240, -3 }, /* (258) cmd ::= KILL TRANSACTION NK_INTEGER */ - { 240, -4 }, /* (259) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ - { 240, -4 }, /* (260) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ - { 240, -3 }, /* (261) cmd ::= SPLIT VGROUP NK_INTEGER */ - { 308, -2 }, /* (262) dnode_list ::= DNODE NK_INTEGER */ - { 308, -3 }, /* (263) dnode_list ::= dnode_list DNODE NK_INTEGER */ - { 240, -3 }, /* (264) cmd ::= SYNCDB db_name REPLICA */ - { 240, -1 }, /* (265) cmd ::= query_expression */ - { 243, -1 }, /* (266) literal ::= NK_INTEGER */ - { 243, -1 }, /* (267) literal ::= NK_FLOAT */ - { 243, -1 }, /* (268) literal ::= NK_STRING */ - { 243, -1 }, /* (269) literal ::= NK_BOOL */ - { 243, -2 }, /* (270) literal ::= TIMESTAMP NK_STRING */ - { 243, -1 }, /* (271) literal ::= duration_literal */ - { 243, -1 }, /* (272) literal ::= NULL */ - { 243, -1 }, /* (273) literal ::= NK_QUESTION */ - { 293, -1 }, /* (274) duration_literal ::= NK_VARIABLE */ - { 309, -1 }, /* (275) signed ::= NK_INTEGER */ - { 309, -2 }, /* (276) signed ::= NK_PLUS NK_INTEGER */ - { 309, -2 }, /* (277) signed ::= NK_MINUS NK_INTEGER */ - { 309, -1 }, /* (278) signed ::= NK_FLOAT */ - { 309, -2 }, /* (279) signed ::= NK_PLUS NK_FLOAT */ - { 309, -2 }, /* (280) signed ::= NK_MINUS NK_FLOAT */ - { 273, -1 }, /* (281) signed_literal ::= signed */ - { 273, -1 }, /* (282) signed_literal ::= NK_STRING */ - { 273, -1 }, /* (283) signed_literal ::= NK_BOOL */ - { 273, -2 }, /* (284) signed_literal ::= TIMESTAMP NK_STRING */ - { 273, -1 }, /* (285) signed_literal ::= duration_literal */ - { 273, -1 }, /* (286) signed_literal ::= NULL */ - { 273, -1 }, /* (287) signed_literal ::= literal_func */ - { 276, -1 }, /* (288) literal_list ::= signed_literal */ - { 276, -3 }, /* (289) literal_list ::= literal_list NK_COMMA signed_literal */ - { 250, -1 }, /* (290) db_name ::= NK_ID */ - { 279, -1 }, /* (291) table_name ::= NK_ID */ - { 271, -1 }, /* (292) column_name ::= NK_ID */ - { 289, -1 }, /* (293) function_name ::= NK_ID */ - { 311, -1 }, /* (294) table_alias ::= NK_ID */ - { 312, -1 }, /* (295) column_alias ::= NK_ID */ - { 245, -1 }, /* (296) user_name ::= NK_ID */ - { 290, -1 }, /* (297) index_name ::= NK_ID */ - { 297, -1 }, /* (298) topic_name ::= NK_ID */ - { 305, -1 }, /* (299) stream_name ::= NK_ID */ - { 300, -1 }, /* (300) cgroup_name ::= NK_ID */ - { 313, -1 }, /* (301) expression ::= literal */ - { 313, -1 }, /* (302) expression ::= pseudo_column */ - { 313, -1 }, /* (303) expression ::= column_reference */ - { 313, -1 }, /* (304) expression ::= function_expression */ - { 313, -1 }, /* (305) expression ::= subquery */ - { 313, -3 }, /* (306) expression ::= NK_LP expression NK_RP */ - { 313, -2 }, /* (307) expression ::= NK_PLUS expression */ - { 313, -2 }, /* (308) expression ::= NK_MINUS expression */ - { 313, -3 }, /* (309) expression ::= expression NK_PLUS expression */ - { 313, -3 }, /* (310) expression ::= expression NK_MINUS expression */ - { 313, -3 }, /* (311) expression ::= expression NK_STAR expression */ - { 313, -3 }, /* (312) expression ::= expression NK_SLASH expression */ - { 313, -3 }, /* (313) expression ::= expression NK_REM expression */ - { 313, -3 }, /* (314) expression ::= column_reference NK_ARROW NK_STRING */ - { 296, -1 }, /* (315) expression_list ::= expression */ - { 296, -3 }, /* (316) expression_list ::= expression_list NK_COMMA expression */ - { 315, -1 }, /* (317) column_reference ::= column_name */ - { 315, -3 }, /* (318) column_reference ::= table_name NK_DOT column_name */ - { 314, -1 }, /* (319) pseudo_column ::= ROWTS */ - { 314, -1 }, /* (320) pseudo_column ::= TBNAME */ - { 314, -3 }, /* (321) pseudo_column ::= table_name NK_DOT TBNAME */ - { 314, -1 }, /* (322) pseudo_column ::= QSTARTTS */ - { 314, -1 }, /* (323) pseudo_column ::= QENDTS */ - { 314, -1 }, /* (324) pseudo_column ::= WSTARTTS */ - { 314, -1 }, /* (325) pseudo_column ::= WENDTS */ - { 314, -1 }, /* (326) pseudo_column ::= WDURATION */ - { 316, -4 }, /* (327) function_expression ::= function_name NK_LP expression_list NK_RP */ - { 316, -4 }, /* (328) function_expression ::= star_func NK_LP star_func_para_list NK_RP */ - { 316, -6 }, /* (329) function_expression ::= CAST NK_LP expression AS type_name NK_RP */ - { 316, -1 }, /* (330) function_expression ::= literal_func */ - { 310, -3 }, /* (331) literal_func ::= noarg_func NK_LP NK_RP */ - { 310, -1 }, /* (332) literal_func ::= NOW */ - { 320, -1 }, /* (333) noarg_func ::= NOW */ - { 320, -1 }, /* (334) noarg_func ::= TODAY */ - { 320, -1 }, /* (335) noarg_func ::= TIMEZONE */ - { 318, -1 }, /* (336) star_func ::= COUNT */ - { 318, -1 }, /* (337) star_func ::= FIRST */ - { 318, -1 }, /* (338) star_func ::= LAST */ - { 318, -1 }, /* (339) star_func ::= LAST_ROW */ - { 319, -1 }, /* (340) star_func_para_list ::= NK_STAR */ - { 319, -1 }, /* (341) star_func_para_list ::= other_para_list */ - { 321, -1 }, /* (342) other_para_list ::= star_func_para */ - { 321, -3 }, /* (343) other_para_list ::= other_para_list NK_COMMA star_func_para */ - { 322, -1 }, /* (344) star_func_para ::= expression */ - { 322, -3 }, /* (345) star_func_para ::= table_name NK_DOT NK_STAR */ - { 323, -3 }, /* (346) predicate ::= expression compare_op expression */ - { 323, -5 }, /* (347) predicate ::= expression BETWEEN expression AND expression */ - { 323, -6 }, /* (348) predicate ::= expression NOT BETWEEN expression AND expression */ - { 323, -3 }, /* (349) predicate ::= expression IS NULL */ - { 323, -4 }, /* (350) predicate ::= expression IS NOT NULL */ - { 323, -3 }, /* (351) predicate ::= expression in_op in_predicate_value */ - { 324, -1 }, /* (352) compare_op ::= NK_LT */ - { 324, -1 }, /* (353) compare_op ::= NK_GT */ - { 324, -1 }, /* (354) compare_op ::= NK_LE */ - { 324, -1 }, /* (355) compare_op ::= NK_GE */ - { 324, -1 }, /* (356) compare_op ::= NK_NE */ - { 324, -1 }, /* (357) compare_op ::= NK_EQ */ - { 324, -1 }, /* (358) compare_op ::= LIKE */ - { 324, -2 }, /* (359) compare_op ::= NOT LIKE */ - { 324, -1 }, /* (360) compare_op ::= MATCH */ - { 324, -1 }, /* (361) compare_op ::= NMATCH */ - { 324, -1 }, /* (362) compare_op ::= CONTAINS */ - { 325, -1 }, /* (363) in_op ::= IN */ - { 325, -2 }, /* (364) in_op ::= NOT IN */ - { 326, -3 }, /* (365) in_predicate_value ::= NK_LP expression_list NK_RP */ - { 327, -1 }, /* (366) boolean_value_expression ::= boolean_primary */ - { 327, -2 }, /* (367) boolean_value_expression ::= NOT boolean_primary */ - { 327, -3 }, /* (368) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ - { 327, -3 }, /* (369) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ - { 328, -1 }, /* (370) boolean_primary ::= predicate */ - { 328, -3 }, /* (371) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ - { 329, -1 }, /* (372) common_expression ::= expression */ - { 329, -1 }, /* (373) common_expression ::= boolean_value_expression */ - { 330, -2 }, /* (374) from_clause ::= FROM table_reference_list */ - { 331, -1 }, /* (375) table_reference_list ::= table_reference */ - { 331, -3 }, /* (376) table_reference_list ::= table_reference_list NK_COMMA table_reference */ - { 332, -1 }, /* (377) table_reference ::= table_primary */ - { 332, -1 }, /* (378) table_reference ::= joined_table */ - { 333, -2 }, /* (379) table_primary ::= table_name alias_opt */ - { 333, -4 }, /* (380) table_primary ::= db_name NK_DOT table_name alias_opt */ - { 333, -2 }, /* (381) table_primary ::= subquery alias_opt */ - { 333, -1 }, /* (382) table_primary ::= parenthesized_joined_table */ - { 335, 0 }, /* (383) alias_opt ::= */ - { 335, -1 }, /* (384) alias_opt ::= table_alias */ - { 335, -2 }, /* (385) alias_opt ::= AS table_alias */ - { 336, -3 }, /* (386) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ - { 336, -3 }, /* (387) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ - { 334, -6 }, /* (388) joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ - { 337, 0 }, /* (389) join_type ::= */ - { 337, -1 }, /* (390) join_type ::= INNER */ - { 339, -9 }, /* (391) query_specification ::= SELECT set_quantifier_opt select_list from_clause where_clause_opt partition_by_clause_opt twindow_clause_opt group_by_clause_opt having_clause_opt */ - { 340, 0 }, /* (392) set_quantifier_opt ::= */ - { 340, -1 }, /* (393) set_quantifier_opt ::= DISTINCT */ - { 340, -1 }, /* (394) set_quantifier_opt ::= ALL */ - { 341, -1 }, /* (395) select_list ::= NK_STAR */ - { 341, -1 }, /* (396) select_list ::= select_sublist */ - { 347, -1 }, /* (397) select_sublist ::= select_item */ - { 347, -3 }, /* (398) select_sublist ::= select_sublist NK_COMMA select_item */ - { 348, -1 }, /* (399) select_item ::= common_expression */ - { 348, -2 }, /* (400) select_item ::= common_expression column_alias */ - { 348, -3 }, /* (401) select_item ::= common_expression AS column_alias */ - { 348, -3 }, /* (402) select_item ::= table_name NK_DOT NK_STAR */ - { 342, 0 }, /* (403) where_clause_opt ::= */ - { 342, -2 }, /* (404) where_clause_opt ::= WHERE search_condition */ - { 343, 0 }, /* (405) partition_by_clause_opt ::= */ - { 343, -3 }, /* (406) partition_by_clause_opt ::= PARTITION BY expression_list */ - { 344, 0 }, /* (407) twindow_clause_opt ::= */ - { 344, -6 }, /* (408) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ - { 344, -4 }, /* (409) twindow_clause_opt ::= STATE_WINDOW NK_LP expression NK_RP */ - { 344, -6 }, /* (410) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ - { 344, -8 }, /* (411) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ - { 294, 0 }, /* (412) sliding_opt ::= */ - { 294, -4 }, /* (413) sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ - { 349, 0 }, /* (414) fill_opt ::= */ - { 349, -4 }, /* (415) fill_opt ::= FILL NK_LP fill_mode NK_RP */ - { 349, -6 }, /* (416) fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */ - { 350, -1 }, /* (417) fill_mode ::= NONE */ - { 350, -1 }, /* (418) fill_mode ::= PREV */ - { 350, -1 }, /* (419) fill_mode ::= NULL */ - { 350, -1 }, /* (420) fill_mode ::= LINEAR */ - { 350, -1 }, /* (421) fill_mode ::= NEXT */ - { 345, 0 }, /* (422) group_by_clause_opt ::= */ - { 345, -3 }, /* (423) group_by_clause_opt ::= GROUP BY group_by_list */ - { 351, -1 }, /* (424) group_by_list ::= expression */ - { 351, -3 }, /* (425) group_by_list ::= group_by_list NK_COMMA expression */ - { 346, 0 }, /* (426) having_clause_opt ::= */ - { 346, -2 }, /* (427) having_clause_opt ::= HAVING search_condition */ - { 299, -4 }, /* (428) query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt */ - { 352, -1 }, /* (429) query_expression_body ::= query_primary */ - { 352, -4 }, /* (430) query_expression_body ::= query_expression_body UNION ALL query_expression_body */ - { 352, -3 }, /* (431) query_expression_body ::= query_expression_body UNION query_expression_body */ - { 356, -1 }, /* (432) query_primary ::= query_specification */ - { 356, -6 }, /* (433) query_primary ::= NK_LP query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt NK_RP */ - { 353, 0 }, /* (434) order_by_clause_opt ::= */ - { 353, -3 }, /* (435) order_by_clause_opt ::= ORDER BY sort_specification_list */ - { 354, 0 }, /* (436) slimit_clause_opt ::= */ - { 354, -2 }, /* (437) slimit_clause_opt ::= SLIMIT NK_INTEGER */ - { 354, -4 }, /* (438) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ - { 354, -4 }, /* (439) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - { 355, 0 }, /* (440) limit_clause_opt ::= */ - { 355, -2 }, /* (441) limit_clause_opt ::= LIMIT NK_INTEGER */ - { 355, -4 }, /* (442) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ - { 355, -4 }, /* (443) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - { 317, -3 }, /* (444) subquery ::= NK_LP query_expression NK_RP */ - { 338, -1 }, /* (445) search_condition ::= common_expression */ - { 357, -1 }, /* (446) sort_specification_list ::= sort_specification */ - { 357, -3 }, /* (447) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ - { 358, -3 }, /* (448) sort_specification ::= expression ordering_specification_opt null_ordering_opt */ - { 359, 0 }, /* (449) ordering_specification_opt ::= */ - { 359, -1 }, /* (450) ordering_specification_opt ::= ASC */ - { 359, -1 }, /* (451) ordering_specification_opt ::= DESC */ - { 360, 0 }, /* (452) null_ordering_opt ::= */ - { 360, -2 }, /* (453) null_ordering_opt ::= NULLS FIRST */ - { 360, -2 }, /* (454) null_ordering_opt ::= NULLS LAST */ + { 238, -6 }, /* (0) cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */ + { 238, -4 }, /* (1) cmd ::= ALTER ACCOUNT NK_ID alter_account_options */ + { 239, 0 }, /* (2) account_options ::= */ + { 239, -3 }, /* (3) account_options ::= account_options PPS literal */ + { 239, -3 }, /* (4) account_options ::= account_options TSERIES literal */ + { 239, -3 }, /* (5) account_options ::= account_options STORAGE literal */ + { 239, -3 }, /* (6) account_options ::= account_options STREAMS literal */ + { 239, -3 }, /* (7) account_options ::= account_options QTIME literal */ + { 239, -3 }, /* (8) account_options ::= account_options DBS literal */ + { 239, -3 }, /* (9) account_options ::= account_options USERS literal */ + { 239, -3 }, /* (10) account_options ::= account_options CONNS literal */ + { 239, -3 }, /* (11) account_options ::= account_options STATE literal */ + { 240, -1 }, /* (12) alter_account_options ::= alter_account_option */ + { 240, -2 }, /* (13) alter_account_options ::= alter_account_options alter_account_option */ + { 242, -2 }, /* (14) alter_account_option ::= PASS literal */ + { 242, -2 }, /* (15) alter_account_option ::= PPS literal */ + { 242, -2 }, /* (16) alter_account_option ::= TSERIES literal */ + { 242, -2 }, /* (17) alter_account_option ::= STORAGE literal */ + { 242, -2 }, /* (18) alter_account_option ::= STREAMS literal */ + { 242, -2 }, /* (19) alter_account_option ::= QTIME literal */ + { 242, -2 }, /* (20) alter_account_option ::= DBS literal */ + { 242, -2 }, /* (21) alter_account_option ::= USERS literal */ + { 242, -2 }, /* (22) alter_account_option ::= CONNS literal */ + { 242, -2 }, /* (23) alter_account_option ::= STATE literal */ + { 238, -5 }, /* (24) cmd ::= CREATE USER user_name PASS NK_STRING */ + { 238, -5 }, /* (25) cmd ::= ALTER USER user_name PASS NK_STRING */ + { 238, -5 }, /* (26) cmd ::= ALTER USER user_name PRIVILEGE NK_STRING */ + { 238, -3 }, /* (27) cmd ::= DROP USER user_name */ + { 238, -6 }, /* (28) cmd ::= GRANT privileges ON priv_level TO user_name */ + { 238, -6 }, /* (29) cmd ::= REVOKE privileges ON priv_level FROM user_name */ + { 244, -1 }, /* (30) privileges ::= ALL */ + { 244, -1 }, /* (31) privileges ::= priv_type_list */ + { 246, -1 }, /* (32) priv_type_list ::= priv_type */ + { 246, -3 }, /* (33) priv_type_list ::= priv_type_list NK_COMMA priv_type */ + { 247, -1 }, /* (34) priv_type ::= READ */ + { 247, -1 }, /* (35) priv_type ::= WRITE */ + { 245, -3 }, /* (36) priv_level ::= NK_STAR NK_DOT NK_STAR */ + { 245, -3 }, /* (37) priv_level ::= db_name NK_DOT NK_STAR */ + { 238, -3 }, /* (38) cmd ::= CREATE DNODE dnode_endpoint */ + { 238, -5 }, /* (39) cmd ::= CREATE DNODE dnode_host_name PORT NK_INTEGER */ + { 238, -3 }, /* (40) cmd ::= DROP DNODE NK_INTEGER */ + { 238, -3 }, /* (41) cmd ::= DROP DNODE dnode_endpoint */ + { 238, -4 }, /* (42) cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ + { 238, -5 }, /* (43) cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */ + { 238, -4 }, /* (44) cmd ::= ALTER ALL DNODES NK_STRING */ + { 238, -5 }, /* (45) cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */ + { 249, -1 }, /* (46) dnode_endpoint ::= NK_STRING */ + { 250, -1 }, /* (47) dnode_host_name ::= NK_ID */ + { 250, -1 }, /* (48) dnode_host_name ::= NK_IPTOKEN */ + { 238, -3 }, /* (49) cmd ::= ALTER LOCAL NK_STRING */ + { 238, -4 }, /* (50) cmd ::= ALTER LOCAL NK_STRING NK_STRING */ + { 238, -5 }, /* (51) cmd ::= CREATE QNODE ON DNODE NK_INTEGER */ + { 238, -5 }, /* (52) cmd ::= DROP QNODE ON DNODE NK_INTEGER */ + { 238, -5 }, /* (53) cmd ::= CREATE BNODE ON DNODE NK_INTEGER */ + { 238, -5 }, /* (54) cmd ::= DROP BNODE ON DNODE NK_INTEGER */ + { 238, -5 }, /* (55) cmd ::= CREATE SNODE ON DNODE NK_INTEGER */ + { 238, -5 }, /* (56) cmd ::= DROP SNODE ON DNODE NK_INTEGER */ + { 238, -5 }, /* (57) cmd ::= CREATE MNODE ON DNODE NK_INTEGER */ + { 238, -5 }, /* (58) cmd ::= DROP MNODE ON DNODE NK_INTEGER */ + { 238, -5 }, /* (59) cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ + { 238, -4 }, /* (60) cmd ::= DROP DATABASE exists_opt db_name */ + { 238, -2 }, /* (61) cmd ::= USE db_name */ + { 238, -4 }, /* (62) cmd ::= ALTER DATABASE db_name alter_db_options */ + { 251, -3 }, /* (63) not_exists_opt ::= IF NOT EXISTS */ + { 251, 0 }, /* (64) not_exists_opt ::= */ + { 253, -2 }, /* (65) exists_opt ::= IF EXISTS */ + { 253, 0 }, /* (66) exists_opt ::= */ + { 252, 0 }, /* (67) db_options ::= */ + { 252, -3 }, /* (68) db_options ::= db_options BUFFER NK_INTEGER */ + { 252, -3 }, /* (69) db_options ::= db_options CACHELAST NK_INTEGER */ + { 252, -3 }, /* (70) db_options ::= db_options COMP NK_INTEGER */ + { 252, -3 }, /* (71) db_options ::= db_options DAYS NK_INTEGER */ + { 252, -3 }, /* (72) db_options ::= db_options DAYS NK_VARIABLE */ + { 252, -3 }, /* (73) db_options ::= db_options FSYNC NK_INTEGER */ + { 252, -3 }, /* (74) db_options ::= db_options MAXROWS NK_INTEGER */ + { 252, -3 }, /* (75) db_options ::= db_options MINROWS NK_INTEGER */ + { 252, -3 }, /* (76) db_options ::= db_options KEEP integer_list */ + { 252, -3 }, /* (77) db_options ::= db_options KEEP variable_list */ + { 252, -3 }, /* (78) db_options ::= db_options PAGES NK_INTEGER */ + { 252, -3 }, /* (79) db_options ::= db_options PAGESIZE NK_INTEGER */ + { 252, -3 }, /* (80) db_options ::= db_options PRECISION NK_STRING */ + { 252, -3 }, /* (81) db_options ::= db_options REPLICA NK_INTEGER */ + { 252, -3 }, /* (82) db_options ::= db_options STRICT NK_INTEGER */ + { 252, -3 }, /* (83) db_options ::= db_options WAL NK_INTEGER */ + { 252, -3 }, /* (84) db_options ::= db_options VGROUPS NK_INTEGER */ + { 252, -3 }, /* (85) db_options ::= db_options SINGLE_STABLE NK_INTEGER */ + { 252, -3 }, /* (86) db_options ::= db_options RETENTIONS retention_list */ + { 252, -3 }, /* (87) db_options ::= db_options SCHEMALESS NK_INTEGER */ + { 254, -1 }, /* (88) alter_db_options ::= alter_db_option */ + { 254, -2 }, /* (89) alter_db_options ::= alter_db_options alter_db_option */ + { 258, -2 }, /* (90) alter_db_option ::= BUFFER NK_INTEGER */ + { 258, -2 }, /* (91) alter_db_option ::= CACHELAST NK_INTEGER */ + { 258, -2 }, /* (92) alter_db_option ::= FSYNC NK_INTEGER */ + { 258, -2 }, /* (93) alter_db_option ::= KEEP integer_list */ + { 258, -2 }, /* (94) alter_db_option ::= KEEP variable_list */ + { 258, -2 }, /* (95) alter_db_option ::= PAGES NK_INTEGER */ + { 258, -2 }, /* (96) alter_db_option ::= REPLICA NK_INTEGER */ + { 258, -2 }, /* (97) alter_db_option ::= STRICT NK_INTEGER */ + { 258, -2 }, /* (98) alter_db_option ::= WAL NK_INTEGER */ + { 255, -1 }, /* (99) integer_list ::= NK_INTEGER */ + { 255, -3 }, /* (100) integer_list ::= integer_list NK_COMMA NK_INTEGER */ + { 256, -1 }, /* (101) variable_list ::= NK_VARIABLE */ + { 256, -3 }, /* (102) variable_list ::= variable_list NK_COMMA NK_VARIABLE */ + { 257, -1 }, /* (103) retention_list ::= retention */ + { 257, -3 }, /* (104) retention_list ::= retention_list NK_COMMA retention */ + { 259, -3 }, /* (105) retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ + { 238, -9 }, /* (106) cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ + { 238, -3 }, /* (107) cmd ::= CREATE TABLE multi_create_clause */ + { 238, -9 }, /* (108) cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ + { 238, -3 }, /* (109) cmd ::= DROP TABLE multi_drop_clause */ + { 238, -4 }, /* (110) cmd ::= DROP STABLE exists_opt full_table_name */ + { 238, -3 }, /* (111) cmd ::= ALTER TABLE alter_table_clause */ + { 238, -3 }, /* (112) cmd ::= ALTER STABLE alter_table_clause */ + { 267, -2 }, /* (113) alter_table_clause ::= full_table_name alter_table_options */ + { 267, -5 }, /* (114) alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ + { 267, -4 }, /* (115) alter_table_clause ::= full_table_name DROP COLUMN column_name */ + { 267, -5 }, /* (116) alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ + { 267, -5 }, /* (117) alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ + { 267, -5 }, /* (118) alter_table_clause ::= full_table_name ADD TAG column_name type_name */ + { 267, -4 }, /* (119) alter_table_clause ::= full_table_name DROP TAG column_name */ + { 267, -5 }, /* (120) alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ + { 267, -5 }, /* (121) alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ + { 267, -6 }, /* (122) alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */ + { 264, -1 }, /* (123) multi_create_clause ::= create_subtable_clause */ + { 264, -2 }, /* (124) multi_create_clause ::= multi_create_clause create_subtable_clause */ + { 272, -10 }, /* (125) create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_tags_opt TAGS NK_LP literal_list NK_RP table_options */ + { 266, -1 }, /* (126) multi_drop_clause ::= drop_table_clause */ + { 266, -2 }, /* (127) multi_drop_clause ::= multi_drop_clause drop_table_clause */ + { 275, -2 }, /* (128) drop_table_clause ::= exists_opt full_table_name */ + { 273, 0 }, /* (129) specific_tags_opt ::= */ + { 273, -3 }, /* (130) specific_tags_opt ::= NK_LP col_name_list NK_RP */ + { 260, -1 }, /* (131) full_table_name ::= table_name */ + { 260, -3 }, /* (132) full_table_name ::= db_name NK_DOT table_name */ + { 261, -1 }, /* (133) column_def_list ::= column_def */ + { 261, -3 }, /* (134) column_def_list ::= column_def_list NK_COMMA column_def */ + { 278, -2 }, /* (135) column_def ::= column_name type_name */ + { 278, -4 }, /* (136) column_def ::= column_name type_name COMMENT NK_STRING */ + { 270, -1 }, /* (137) type_name ::= BOOL */ + { 270, -1 }, /* (138) type_name ::= TINYINT */ + { 270, -1 }, /* (139) type_name ::= SMALLINT */ + { 270, -1 }, /* (140) type_name ::= INT */ + { 270, -1 }, /* (141) type_name ::= INTEGER */ + { 270, -1 }, /* (142) type_name ::= BIGINT */ + { 270, -1 }, /* (143) type_name ::= FLOAT */ + { 270, -1 }, /* (144) type_name ::= DOUBLE */ + { 270, -4 }, /* (145) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ + { 270, -1 }, /* (146) type_name ::= TIMESTAMP */ + { 270, -4 }, /* (147) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ + { 270, -2 }, /* (148) type_name ::= TINYINT UNSIGNED */ + { 270, -2 }, /* (149) type_name ::= SMALLINT UNSIGNED */ + { 270, -2 }, /* (150) type_name ::= INT UNSIGNED */ + { 270, -2 }, /* (151) type_name ::= BIGINT UNSIGNED */ + { 270, -1 }, /* (152) type_name ::= JSON */ + { 270, -4 }, /* (153) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ + { 270, -1 }, /* (154) type_name ::= MEDIUMBLOB */ + { 270, -1 }, /* (155) type_name ::= BLOB */ + { 270, -4 }, /* (156) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ + { 270, -1 }, /* (157) type_name ::= DECIMAL */ + { 270, -4 }, /* (158) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ + { 270, -6 }, /* (159) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ + { 262, 0 }, /* (160) tags_def_opt ::= */ + { 262, -1 }, /* (161) tags_def_opt ::= tags_def */ + { 265, -4 }, /* (162) tags_def ::= TAGS NK_LP column_def_list NK_RP */ + { 263, 0 }, /* (163) table_options ::= */ + { 263, -3 }, /* (164) table_options ::= table_options COMMENT NK_STRING */ + { 263, -3 }, /* (165) table_options ::= table_options DELAY NK_INTEGER */ + { 263, -3 }, /* (166) table_options ::= table_options FILE_FACTOR NK_FLOAT */ + { 263, -5 }, /* (167) table_options ::= table_options ROLLUP NK_LP func_name_list NK_RP */ + { 263, -3 }, /* (168) table_options ::= table_options TTL NK_INTEGER */ + { 263, -5 }, /* (169) table_options ::= table_options SMA NK_LP col_name_list NK_RP */ + { 268, -1 }, /* (170) alter_table_options ::= alter_table_option */ + { 268, -2 }, /* (171) alter_table_options ::= alter_table_options alter_table_option */ + { 280, -2 }, /* (172) alter_table_option ::= COMMENT NK_STRING */ + { 280, -2 }, /* (173) alter_table_option ::= TTL NK_INTEGER */ + { 276, -1 }, /* (174) col_name_list ::= col_name */ + { 276, -3 }, /* (175) col_name_list ::= col_name_list NK_COMMA col_name */ + { 281, -1 }, /* (176) col_name ::= column_name */ + { 238, -2 }, /* (177) cmd ::= SHOW DNODES */ + { 238, -2 }, /* (178) cmd ::= SHOW USERS */ + { 238, -2 }, /* (179) cmd ::= SHOW DATABASES */ + { 238, -4 }, /* (180) cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */ + { 238, -4 }, /* (181) cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ + { 238, -3 }, /* (182) cmd ::= SHOW db_name_cond_opt VGROUPS */ + { 238, -2 }, /* (183) cmd ::= SHOW MNODES */ + { 238, -2 }, /* (184) cmd ::= SHOW MODULES */ + { 238, -2 }, /* (185) cmd ::= SHOW QNODES */ + { 238, -2 }, /* (186) cmd ::= SHOW FUNCTIONS */ + { 238, -5 }, /* (187) cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ + { 238, -2 }, /* (188) cmd ::= SHOW STREAMS */ + { 238, -2 }, /* (189) cmd ::= SHOW ACCOUNTS */ + { 238, -2 }, /* (190) cmd ::= SHOW APPS */ + { 238, -2 }, /* (191) cmd ::= SHOW CONNECTIONS */ + { 238, -2 }, /* (192) cmd ::= SHOW LICENCE */ + { 238, -2 }, /* (193) cmd ::= SHOW GRANTS */ + { 238, -4 }, /* (194) cmd ::= SHOW CREATE DATABASE db_name */ + { 238, -4 }, /* (195) cmd ::= SHOW CREATE TABLE full_table_name */ + { 238, -4 }, /* (196) cmd ::= SHOW CREATE STABLE full_table_name */ + { 238, -2 }, /* (197) cmd ::= SHOW QUERIES */ + { 238, -2 }, /* (198) cmd ::= SHOW SCORES */ + { 238, -2 }, /* (199) cmd ::= SHOW TOPICS */ + { 238, -2 }, /* (200) cmd ::= SHOW VARIABLES */ + { 238, -2 }, /* (201) cmd ::= SHOW BNODES */ + { 238, -2 }, /* (202) cmd ::= SHOW SNODES */ + { 238, -2 }, /* (203) cmd ::= SHOW CLUSTER */ + { 238, -2 }, /* (204) cmd ::= SHOW TRANSACTIONS */ + { 282, 0 }, /* (205) db_name_cond_opt ::= */ + { 282, -2 }, /* (206) db_name_cond_opt ::= db_name NK_DOT */ + { 283, 0 }, /* (207) like_pattern_opt ::= */ + { 283, -2 }, /* (208) like_pattern_opt ::= LIKE NK_STRING */ + { 284, -1 }, /* (209) table_name_cond ::= table_name */ + { 285, 0 }, /* (210) from_db_opt ::= */ + { 285, -2 }, /* (211) from_db_opt ::= FROM db_name */ + { 279, -1 }, /* (212) func_name_list ::= func_name */ + { 279, -3 }, /* (213) func_name_list ::= func_name_list NK_COMMA func_name */ + { 286, -1 }, /* (214) func_name ::= function_name */ + { 238, -8 }, /* (215) cmd ::= CREATE SMA INDEX not_exists_opt index_name ON table_name index_options */ + { 238, -10 }, /* (216) cmd ::= CREATE FULLTEXT INDEX not_exists_opt index_name ON table_name NK_LP col_name_list NK_RP */ + { 238, -6 }, /* (217) cmd ::= DROP INDEX exists_opt index_name ON table_name */ + { 289, 0 }, /* (218) index_options ::= */ + { 289, -9 }, /* (219) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt */ + { 289, -11 }, /* (220) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt */ + { 290, -1 }, /* (221) func_list ::= func */ + { 290, -3 }, /* (222) func_list ::= func_list NK_COMMA func */ + { 293, -4 }, /* (223) func ::= function_name NK_LP expression_list NK_RP */ + { 238, -6 }, /* (224) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_expression */ + { 238, -7 }, /* (225) cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name */ + { 238, -7 }, /* (226) cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name */ + { 238, -4 }, /* (227) cmd ::= DROP TOPIC exists_opt topic_name */ + { 238, -6 }, /* (228) cmd ::= DROP CGROUP exists_opt cgroup_name ON topic_name */ + { 238, -2 }, /* (229) cmd ::= DESC full_table_name */ + { 238, -2 }, /* (230) cmd ::= DESCRIBE full_table_name */ + { 238, -3 }, /* (231) cmd ::= RESET QUERY CACHE */ + { 238, -4 }, /* (232) cmd ::= EXPLAIN analyze_opt explain_options query_expression */ + { 298, 0 }, /* (233) analyze_opt ::= */ + { 298, -1 }, /* (234) analyze_opt ::= ANALYZE */ + { 299, 0 }, /* (235) explain_options ::= */ + { 299, -3 }, /* (236) explain_options ::= explain_options VERBOSE NK_BOOL */ + { 299, -3 }, /* (237) explain_options ::= explain_options RATIO NK_FLOAT */ + { 238, -6 }, /* (238) cmd ::= COMPACT VNODES IN NK_LP integer_list NK_RP */ + { 238, -10 }, /* (239) cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt */ + { 238, -4 }, /* (240) cmd ::= DROP FUNCTION exists_opt function_name */ + { 300, 0 }, /* (241) agg_func_opt ::= */ + { 300, -1 }, /* (242) agg_func_opt ::= AGGREGATE */ + { 301, 0 }, /* (243) bufsize_opt ::= */ + { 301, -2 }, /* (244) bufsize_opt ::= BUFSIZE NK_INTEGER */ + { 238, -8 }, /* (245) cmd ::= CREATE STREAM not_exists_opt stream_name stream_options into_opt AS query_expression */ + { 238, -4 }, /* (246) cmd ::= DROP STREAM exists_opt stream_name */ + { 304, 0 }, /* (247) into_opt ::= */ + { 304, -2 }, /* (248) into_opt ::= INTO full_table_name */ + { 303, 0 }, /* (249) stream_options ::= */ + { 303, -3 }, /* (250) stream_options ::= stream_options TRIGGER AT_ONCE */ + { 303, -3 }, /* (251) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ + { 303, -3 }, /* (252) stream_options ::= stream_options WATERMARK duration_literal */ + { 238, -3 }, /* (253) cmd ::= KILL CONNECTION NK_INTEGER */ + { 238, -3 }, /* (254) cmd ::= KILL QUERY NK_INTEGER */ + { 238, -3 }, /* (255) cmd ::= KILL TRANSACTION NK_INTEGER */ + { 238, -4 }, /* (256) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ + { 238, -4 }, /* (257) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ + { 238, -3 }, /* (258) cmd ::= SPLIT VGROUP NK_INTEGER */ + { 305, -2 }, /* (259) dnode_list ::= DNODE NK_INTEGER */ + { 305, -3 }, /* (260) dnode_list ::= dnode_list DNODE NK_INTEGER */ + { 238, -3 }, /* (261) cmd ::= SYNCDB db_name REPLICA */ + { 238, -1 }, /* (262) cmd ::= query_expression */ + { 241, -1 }, /* (263) literal ::= NK_INTEGER */ + { 241, -1 }, /* (264) literal ::= NK_FLOAT */ + { 241, -1 }, /* (265) literal ::= NK_STRING */ + { 241, -1 }, /* (266) literal ::= NK_BOOL */ + { 241, -2 }, /* (267) literal ::= TIMESTAMP NK_STRING */ + { 241, -1 }, /* (268) literal ::= duration_literal */ + { 241, -1 }, /* (269) literal ::= NULL */ + { 241, -1 }, /* (270) literal ::= NK_QUESTION */ + { 291, -1 }, /* (271) duration_literal ::= NK_VARIABLE */ + { 306, -1 }, /* (272) signed ::= NK_INTEGER */ + { 306, -2 }, /* (273) signed ::= NK_PLUS NK_INTEGER */ + { 306, -2 }, /* (274) signed ::= NK_MINUS NK_INTEGER */ + { 306, -1 }, /* (275) signed ::= NK_FLOAT */ + { 306, -2 }, /* (276) signed ::= NK_PLUS NK_FLOAT */ + { 306, -2 }, /* (277) signed ::= NK_MINUS NK_FLOAT */ + { 271, -1 }, /* (278) signed_literal ::= signed */ + { 271, -1 }, /* (279) signed_literal ::= NK_STRING */ + { 271, -1 }, /* (280) signed_literal ::= NK_BOOL */ + { 271, -2 }, /* (281) signed_literal ::= TIMESTAMP NK_STRING */ + { 271, -1 }, /* (282) signed_literal ::= duration_literal */ + { 271, -1 }, /* (283) signed_literal ::= NULL */ + { 271, -1 }, /* (284) signed_literal ::= literal_func */ + { 274, -1 }, /* (285) literal_list ::= signed_literal */ + { 274, -3 }, /* (286) literal_list ::= literal_list NK_COMMA signed_literal */ + { 248, -1 }, /* (287) db_name ::= NK_ID */ + { 277, -1 }, /* (288) table_name ::= NK_ID */ + { 269, -1 }, /* (289) column_name ::= NK_ID */ + { 287, -1 }, /* (290) function_name ::= NK_ID */ + { 308, -1 }, /* (291) table_alias ::= NK_ID */ + { 309, -1 }, /* (292) column_alias ::= NK_ID */ + { 243, -1 }, /* (293) user_name ::= NK_ID */ + { 288, -1 }, /* (294) index_name ::= NK_ID */ + { 295, -1 }, /* (295) topic_name ::= NK_ID */ + { 302, -1 }, /* (296) stream_name ::= NK_ID */ + { 297, -1 }, /* (297) cgroup_name ::= NK_ID */ + { 310, -1 }, /* (298) expression ::= literal */ + { 310, -1 }, /* (299) expression ::= pseudo_column */ + { 310, -1 }, /* (300) expression ::= column_reference */ + { 310, -1 }, /* (301) expression ::= function_expression */ + { 310, -1 }, /* (302) expression ::= subquery */ + { 310, -3 }, /* (303) expression ::= NK_LP expression NK_RP */ + { 310, -2 }, /* (304) expression ::= NK_PLUS expression */ + { 310, -2 }, /* (305) expression ::= NK_MINUS expression */ + { 310, -3 }, /* (306) expression ::= expression NK_PLUS expression */ + { 310, -3 }, /* (307) expression ::= expression NK_MINUS expression */ + { 310, -3 }, /* (308) expression ::= expression NK_STAR expression */ + { 310, -3 }, /* (309) expression ::= expression NK_SLASH expression */ + { 310, -3 }, /* (310) expression ::= expression NK_REM expression */ + { 310, -3 }, /* (311) expression ::= column_reference NK_ARROW NK_STRING */ + { 294, -1 }, /* (312) expression_list ::= expression */ + { 294, -3 }, /* (313) expression_list ::= expression_list NK_COMMA expression */ + { 312, -1 }, /* (314) column_reference ::= column_name */ + { 312, -3 }, /* (315) column_reference ::= table_name NK_DOT column_name */ + { 311, -1 }, /* (316) pseudo_column ::= ROWTS */ + { 311, -1 }, /* (317) pseudo_column ::= TBNAME */ + { 311, -3 }, /* (318) pseudo_column ::= table_name NK_DOT TBNAME */ + { 311, -1 }, /* (319) pseudo_column ::= QSTARTTS */ + { 311, -1 }, /* (320) pseudo_column ::= QENDTS */ + { 311, -1 }, /* (321) pseudo_column ::= WSTARTTS */ + { 311, -1 }, /* (322) pseudo_column ::= WENDTS */ + { 311, -1 }, /* (323) pseudo_column ::= WDURATION */ + { 313, -4 }, /* (324) function_expression ::= function_name NK_LP expression_list NK_RP */ + { 313, -4 }, /* (325) function_expression ::= star_func NK_LP star_func_para_list NK_RP */ + { 313, -6 }, /* (326) function_expression ::= CAST NK_LP expression AS type_name NK_RP */ + { 313, -1 }, /* (327) function_expression ::= literal_func */ + { 307, -3 }, /* (328) literal_func ::= noarg_func NK_LP NK_RP */ + { 307, -1 }, /* (329) literal_func ::= NOW */ + { 317, -1 }, /* (330) noarg_func ::= NOW */ + { 317, -1 }, /* (331) noarg_func ::= TODAY */ + { 317, -1 }, /* (332) noarg_func ::= TIMEZONE */ + { 315, -1 }, /* (333) star_func ::= COUNT */ + { 315, -1 }, /* (334) star_func ::= FIRST */ + { 315, -1 }, /* (335) star_func ::= LAST */ + { 315, -1 }, /* (336) star_func ::= LAST_ROW */ + { 316, -1 }, /* (337) star_func_para_list ::= NK_STAR */ + { 316, -1 }, /* (338) star_func_para_list ::= other_para_list */ + { 318, -1 }, /* (339) other_para_list ::= star_func_para */ + { 318, -3 }, /* (340) other_para_list ::= other_para_list NK_COMMA star_func_para */ + { 319, -1 }, /* (341) star_func_para ::= expression */ + { 319, -3 }, /* (342) star_func_para ::= table_name NK_DOT NK_STAR */ + { 320, -3 }, /* (343) predicate ::= expression compare_op expression */ + { 320, -5 }, /* (344) predicate ::= expression BETWEEN expression AND expression */ + { 320, -6 }, /* (345) predicate ::= expression NOT BETWEEN expression AND expression */ + { 320, -3 }, /* (346) predicate ::= expression IS NULL */ + { 320, -4 }, /* (347) predicate ::= expression IS NOT NULL */ + { 320, -3 }, /* (348) predicate ::= expression in_op in_predicate_value */ + { 321, -1 }, /* (349) compare_op ::= NK_LT */ + { 321, -1 }, /* (350) compare_op ::= NK_GT */ + { 321, -1 }, /* (351) compare_op ::= NK_LE */ + { 321, -1 }, /* (352) compare_op ::= NK_GE */ + { 321, -1 }, /* (353) compare_op ::= NK_NE */ + { 321, -1 }, /* (354) compare_op ::= NK_EQ */ + { 321, -1 }, /* (355) compare_op ::= LIKE */ + { 321, -2 }, /* (356) compare_op ::= NOT LIKE */ + { 321, -1 }, /* (357) compare_op ::= MATCH */ + { 321, -1 }, /* (358) compare_op ::= NMATCH */ + { 321, -1 }, /* (359) compare_op ::= CONTAINS */ + { 322, -1 }, /* (360) in_op ::= IN */ + { 322, -2 }, /* (361) in_op ::= NOT IN */ + { 323, -3 }, /* (362) in_predicate_value ::= NK_LP expression_list NK_RP */ + { 324, -1 }, /* (363) boolean_value_expression ::= boolean_primary */ + { 324, -2 }, /* (364) boolean_value_expression ::= NOT boolean_primary */ + { 324, -3 }, /* (365) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ + { 324, -3 }, /* (366) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ + { 325, -1 }, /* (367) boolean_primary ::= predicate */ + { 325, -3 }, /* (368) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ + { 326, -1 }, /* (369) common_expression ::= expression */ + { 326, -1 }, /* (370) common_expression ::= boolean_value_expression */ + { 327, -2 }, /* (371) from_clause ::= FROM table_reference_list */ + { 328, -1 }, /* (372) table_reference_list ::= table_reference */ + { 328, -3 }, /* (373) table_reference_list ::= table_reference_list NK_COMMA table_reference */ + { 329, -1 }, /* (374) table_reference ::= table_primary */ + { 329, -1 }, /* (375) table_reference ::= joined_table */ + { 330, -2 }, /* (376) table_primary ::= table_name alias_opt */ + { 330, -4 }, /* (377) table_primary ::= db_name NK_DOT table_name alias_opt */ + { 330, -2 }, /* (378) table_primary ::= subquery alias_opt */ + { 330, -1 }, /* (379) table_primary ::= parenthesized_joined_table */ + { 332, 0 }, /* (380) alias_opt ::= */ + { 332, -1 }, /* (381) alias_opt ::= table_alias */ + { 332, -2 }, /* (382) alias_opt ::= AS table_alias */ + { 333, -3 }, /* (383) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ + { 333, -3 }, /* (384) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ + { 331, -6 }, /* (385) joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ + { 334, 0 }, /* (386) join_type ::= */ + { 334, -1 }, /* (387) join_type ::= INNER */ + { 336, -9 }, /* (388) query_specification ::= SELECT set_quantifier_opt select_list from_clause where_clause_opt partition_by_clause_opt twindow_clause_opt group_by_clause_opt having_clause_opt */ + { 337, 0 }, /* (389) set_quantifier_opt ::= */ + { 337, -1 }, /* (390) set_quantifier_opt ::= DISTINCT */ + { 337, -1 }, /* (391) set_quantifier_opt ::= ALL */ + { 338, -1 }, /* (392) select_list ::= NK_STAR */ + { 338, -1 }, /* (393) select_list ::= select_sublist */ + { 344, -1 }, /* (394) select_sublist ::= select_item */ + { 344, -3 }, /* (395) select_sublist ::= select_sublist NK_COMMA select_item */ + { 345, -1 }, /* (396) select_item ::= common_expression */ + { 345, -2 }, /* (397) select_item ::= common_expression column_alias */ + { 345, -3 }, /* (398) select_item ::= common_expression AS column_alias */ + { 345, -3 }, /* (399) select_item ::= table_name NK_DOT NK_STAR */ + { 339, 0 }, /* (400) where_clause_opt ::= */ + { 339, -2 }, /* (401) where_clause_opt ::= WHERE search_condition */ + { 340, 0 }, /* (402) partition_by_clause_opt ::= */ + { 340, -3 }, /* (403) partition_by_clause_opt ::= PARTITION BY expression_list */ + { 341, 0 }, /* (404) twindow_clause_opt ::= */ + { 341, -6 }, /* (405) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ + { 341, -4 }, /* (406) twindow_clause_opt ::= STATE_WINDOW NK_LP expression NK_RP */ + { 341, -6 }, /* (407) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ + { 341, -8 }, /* (408) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ + { 292, 0 }, /* (409) sliding_opt ::= */ + { 292, -4 }, /* (410) sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ + { 346, 0 }, /* (411) fill_opt ::= */ + { 346, -4 }, /* (412) fill_opt ::= FILL NK_LP fill_mode NK_RP */ + { 346, -6 }, /* (413) fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */ + { 347, -1 }, /* (414) fill_mode ::= NONE */ + { 347, -1 }, /* (415) fill_mode ::= PREV */ + { 347, -1 }, /* (416) fill_mode ::= NULL */ + { 347, -1 }, /* (417) fill_mode ::= LINEAR */ + { 347, -1 }, /* (418) fill_mode ::= NEXT */ + { 342, 0 }, /* (419) group_by_clause_opt ::= */ + { 342, -3 }, /* (420) group_by_clause_opt ::= GROUP BY group_by_list */ + { 348, -1 }, /* (421) group_by_list ::= expression */ + { 348, -3 }, /* (422) group_by_list ::= group_by_list NK_COMMA expression */ + { 343, 0 }, /* (423) having_clause_opt ::= */ + { 343, -2 }, /* (424) having_clause_opt ::= HAVING search_condition */ + { 296, -4 }, /* (425) query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt */ + { 349, -1 }, /* (426) query_expression_body ::= query_primary */ + { 349, -4 }, /* (427) query_expression_body ::= query_expression_body UNION ALL query_expression_body */ + { 349, -3 }, /* (428) query_expression_body ::= query_expression_body UNION query_expression_body */ + { 353, -1 }, /* (429) query_primary ::= query_specification */ + { 353, -6 }, /* (430) query_primary ::= NK_LP query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt NK_RP */ + { 350, 0 }, /* (431) order_by_clause_opt ::= */ + { 350, -3 }, /* (432) order_by_clause_opt ::= ORDER BY sort_specification_list */ + { 351, 0 }, /* (433) slimit_clause_opt ::= */ + { 351, -2 }, /* (434) slimit_clause_opt ::= SLIMIT NK_INTEGER */ + { 351, -4 }, /* (435) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ + { 351, -4 }, /* (436) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + { 352, 0 }, /* (437) limit_clause_opt ::= */ + { 352, -2 }, /* (438) limit_clause_opt ::= LIMIT NK_INTEGER */ + { 352, -4 }, /* (439) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ + { 352, -4 }, /* (440) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + { 314, -3 }, /* (441) subquery ::= NK_LP query_expression NK_RP */ + { 335, -1 }, /* (442) search_condition ::= common_expression */ + { 354, -1 }, /* (443) sort_specification_list ::= sort_specification */ + { 354, -3 }, /* (444) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ + { 355, -3 }, /* (445) sort_specification ::= expression ordering_specification_opt null_ordering_opt */ + { 356, 0 }, /* (446) ordering_specification_opt ::= */ + { 356, -1 }, /* (447) ordering_specification_opt ::= ASC */ + { 356, -1 }, /* (448) ordering_specification_opt ::= DESC */ + { 357, 0 }, /* (449) null_ordering_opt ::= */ + { 357, -2 }, /* (450) null_ordering_opt ::= NULLS FIRST */ + { 357, -2 }, /* (451) null_ordering_opt ::= NULLS LAST */ }; static void yy_accept(yyParser*); /* Forward Declaration */ @@ -3114,11 +3114,11 @@ static YYACTIONTYPE yy_reduce( YYMINORTYPE yylhsminor; case 0: /* cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */ { pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); } - yy_destructor(yypParser,241,&yymsp[0].minor); + yy_destructor(yypParser,239,&yymsp[0].minor); break; case 1: /* cmd ::= ALTER ACCOUNT NK_ID alter_account_options */ { pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); } - yy_destructor(yypParser,242,&yymsp[0].minor); + yy_destructor(yypParser,240,&yymsp[0].minor); break; case 2: /* account_options ::= */ { } @@ -3132,20 +3132,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,241,&yymsp[-2].minor); +{ yy_destructor(yypParser,239,&yymsp[-2].minor); { } - yy_destructor(yypParser,243,&yymsp[0].minor); + yy_destructor(yypParser,241,&yymsp[0].minor); } break; case 12: /* alter_account_options ::= alter_account_option */ -{ yy_destructor(yypParser,244,&yymsp[0].minor); +{ yy_destructor(yypParser,242,&yymsp[0].minor); { } } break; case 13: /* alter_account_options ::= alter_account_options alter_account_option */ -{ yy_destructor(yypParser,242,&yymsp[-1].minor); +{ yy_destructor(yypParser,240,&yymsp[-1].minor); { } - yy_destructor(yypParser,244,&yymsp[0].minor); + yy_destructor(yypParser,242,&yymsp[0].minor); } break; case 14: /* alter_account_option ::= PASS literal */ @@ -3159,63 +3159,63 @@ static YYACTIONTYPE yy_reduce( case 22: /* alter_account_option ::= CONNS literal */ yytestcase(yyruleno==22); case 23: /* alter_account_option ::= STATE literal */ yytestcase(yyruleno==23); { } - yy_destructor(yypParser,243,&yymsp[0].minor); + yy_destructor(yypParser,241,&yymsp[0].minor); break; case 24: /* cmd ::= CREATE USER user_name PASS NK_STRING */ -{ pCxt->pRootNode = createCreateUserStmt(pCxt, &yymsp[-2].minor.yy53, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createCreateUserStmt(pCxt, &yymsp[-2].minor.yy105, &yymsp[0].minor.yy0); } break; case 25: /* cmd ::= ALTER USER user_name PASS NK_STRING */ -{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy53, TSDB_ALTER_USER_PASSWD, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy105, TSDB_ALTER_USER_PASSWD, &yymsp[0].minor.yy0); } break; case 26: /* cmd ::= ALTER USER user_name PRIVILEGE NK_STRING */ -{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy53, TSDB_ALTER_USER_PRIVILEGES, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy105, TSDB_ALTER_USER_PRIVILEGES, &yymsp[0].minor.yy0); } break; case 27: /* cmd ::= DROP USER user_name */ -{ pCxt->pRootNode = createDropUserStmt(pCxt, &yymsp[0].minor.yy53); } +{ pCxt->pRootNode = createDropUserStmt(pCxt, &yymsp[0].minor.yy105); } break; case 28: /* cmd ::= GRANT privileges ON priv_level TO user_name */ -{ pCxt->pRootNode = createGrantStmt(pCxt, yymsp[-4].minor.yy435, &yymsp[-2].minor.yy53, &yymsp[0].minor.yy53); } +{ pCxt->pRootNode = createGrantStmt(pCxt, yymsp[-4].minor.yy593, &yymsp[-2].minor.yy105, &yymsp[0].minor.yy105); } break; case 29: /* cmd ::= REVOKE privileges ON priv_level FROM user_name */ -{ pCxt->pRootNode = createRevokeStmt(pCxt, yymsp[-4].minor.yy435, &yymsp[-2].minor.yy53, &yymsp[0].minor.yy53); } +{ pCxt->pRootNode = createRevokeStmt(pCxt, yymsp[-4].minor.yy593, &yymsp[-2].minor.yy105, &yymsp[0].minor.yy105); } break; case 30: /* privileges ::= ALL */ -{ yymsp[0].minor.yy435 = PRIVILEGE_TYPE_ALL; } +{ yymsp[0].minor.yy593 = PRIVILEGE_TYPE_ALL; } break; case 31: /* privileges ::= priv_type_list */ case 32: /* priv_type_list ::= priv_type */ yytestcase(yyruleno==32); -{ yylhsminor.yy435 = yymsp[0].minor.yy435; } - yymsp[0].minor.yy435 = yylhsminor.yy435; +{ yylhsminor.yy593 = yymsp[0].minor.yy593; } + yymsp[0].minor.yy593 = yylhsminor.yy593; break; case 33: /* priv_type_list ::= priv_type_list NK_COMMA priv_type */ -{ yylhsminor.yy435 = yymsp[-2].minor.yy435 | yymsp[0].minor.yy435; } - yymsp[-2].minor.yy435 = yylhsminor.yy435; +{ yylhsminor.yy593 = yymsp[-2].minor.yy593 | yymsp[0].minor.yy593; } + yymsp[-2].minor.yy593 = yylhsminor.yy593; break; case 34: /* priv_type ::= READ */ -{ yymsp[0].minor.yy435 = PRIVILEGE_TYPE_READ; } +{ yymsp[0].minor.yy593 = PRIVILEGE_TYPE_READ; } break; case 35: /* priv_type ::= WRITE */ -{ yymsp[0].minor.yy435 = PRIVILEGE_TYPE_WRITE; } +{ yymsp[0].minor.yy593 = PRIVILEGE_TYPE_WRITE; } break; case 36: /* priv_level ::= NK_STAR NK_DOT NK_STAR */ -{ yylhsminor.yy53 = yymsp[-2].minor.yy0; } - yymsp[-2].minor.yy53 = yylhsminor.yy53; +{ yylhsminor.yy105 = yymsp[-2].minor.yy0; } + yymsp[-2].minor.yy105 = yylhsminor.yy105; break; case 37: /* priv_level ::= db_name NK_DOT NK_STAR */ -{ yylhsminor.yy53 = yymsp[-2].minor.yy53; } - yymsp[-2].minor.yy53 = yylhsminor.yy53; +{ yylhsminor.yy105 = yymsp[-2].minor.yy105; } + yymsp[-2].minor.yy105 = yylhsminor.yy105; break; case 38: /* cmd ::= CREATE DNODE dnode_endpoint */ -{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[0].minor.yy53, NULL); } +{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[0].minor.yy105, NULL); } break; case 39: /* cmd ::= CREATE DNODE dnode_host_name PORT NK_INTEGER */ -{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[-2].minor.yy53, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[-2].minor.yy105, &yymsp[0].minor.yy0); } break; case 40: /* cmd ::= DROP DNODE NK_INTEGER */ { pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[0].minor.yy0); } break; case 41: /* cmd ::= DROP DNODE dnode_endpoint */ -{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[0].minor.yy53); } +{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[0].minor.yy105); } break; case 42: /* cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ { pCxt->pRootNode = createAlterDnodeStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, NULL); } @@ -3232,26 +3232,26 @@ static YYACTIONTYPE yy_reduce( case 46: /* dnode_endpoint ::= NK_STRING */ case 47: /* dnode_host_name ::= NK_ID */ yytestcase(yyruleno==47); case 48: /* dnode_host_name ::= NK_IPTOKEN */ yytestcase(yyruleno==48); - case 290: /* db_name ::= NK_ID */ yytestcase(yyruleno==290); - case 291: /* table_name ::= NK_ID */ yytestcase(yyruleno==291); - case 292: /* column_name ::= NK_ID */ yytestcase(yyruleno==292); - case 293: /* function_name ::= NK_ID */ yytestcase(yyruleno==293); - case 294: /* table_alias ::= NK_ID */ yytestcase(yyruleno==294); - case 295: /* column_alias ::= NK_ID */ yytestcase(yyruleno==295); - case 296: /* user_name ::= NK_ID */ yytestcase(yyruleno==296); - case 297: /* index_name ::= NK_ID */ yytestcase(yyruleno==297); - case 298: /* topic_name ::= NK_ID */ yytestcase(yyruleno==298); - case 299: /* stream_name ::= NK_ID */ yytestcase(yyruleno==299); - case 300: /* cgroup_name ::= NK_ID */ yytestcase(yyruleno==300); - case 333: /* noarg_func ::= NOW */ yytestcase(yyruleno==333); - case 334: /* noarg_func ::= TODAY */ yytestcase(yyruleno==334); - case 335: /* noarg_func ::= TIMEZONE */ yytestcase(yyruleno==335); - case 336: /* star_func ::= COUNT */ yytestcase(yyruleno==336); - case 337: /* star_func ::= FIRST */ yytestcase(yyruleno==337); - case 338: /* star_func ::= LAST */ yytestcase(yyruleno==338); - case 339: /* star_func ::= LAST_ROW */ yytestcase(yyruleno==339); -{ yylhsminor.yy53 = yymsp[0].minor.yy0; } - yymsp[0].minor.yy53 = yylhsminor.yy53; + case 287: /* db_name ::= NK_ID */ yytestcase(yyruleno==287); + case 288: /* table_name ::= NK_ID */ yytestcase(yyruleno==288); + case 289: /* column_name ::= NK_ID */ yytestcase(yyruleno==289); + case 290: /* function_name ::= NK_ID */ yytestcase(yyruleno==290); + case 291: /* table_alias ::= NK_ID */ yytestcase(yyruleno==291); + case 292: /* column_alias ::= NK_ID */ yytestcase(yyruleno==292); + case 293: /* user_name ::= NK_ID */ yytestcase(yyruleno==293); + case 294: /* index_name ::= NK_ID */ yytestcase(yyruleno==294); + case 295: /* topic_name ::= NK_ID */ yytestcase(yyruleno==295); + case 296: /* stream_name ::= NK_ID */ yytestcase(yyruleno==296); + case 297: /* cgroup_name ::= NK_ID */ yytestcase(yyruleno==297); + case 330: /* noarg_func ::= NOW */ yytestcase(yyruleno==330); + case 331: /* noarg_func ::= TODAY */ yytestcase(yyruleno==331); + case 332: /* noarg_func ::= TIMEZONE */ yytestcase(yyruleno==332); + case 333: /* star_func ::= COUNT */ yytestcase(yyruleno==333); + case 334: /* star_func ::= FIRST */ yytestcase(yyruleno==334); + case 335: /* star_func ::= LAST */ yytestcase(yyruleno==335); + case 336: /* star_func ::= LAST_ROW */ yytestcase(yyruleno==336); +{ yylhsminor.yy105 = yymsp[0].minor.yy0; } + yymsp[0].minor.yy105 = yylhsminor.yy105; break; case 49: /* cmd ::= ALTER LOCAL NK_STRING */ { pCxt->pRootNode = createAlterLocalStmt(pCxt, &yymsp[0].minor.yy0, NULL); } @@ -3284,156 +3284,156 @@ static YYACTIONTYPE yy_reduce( { pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_MNODE_STMT, &yymsp[0].minor.yy0); } break; case 59: /* cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ -{ pCxt->pRootNode = createCreateDatabaseStmt(pCxt, yymsp[-2].minor.yy603, &yymsp[-1].minor.yy53, yymsp[0].minor.yy636); } +{ pCxt->pRootNode = createCreateDatabaseStmt(pCxt, yymsp[-2].minor.yy617, &yymsp[-1].minor.yy105, yymsp[0].minor.yy172); } break; case 60: /* cmd ::= DROP DATABASE exists_opt db_name */ -{ pCxt->pRootNode = createDropDatabaseStmt(pCxt, yymsp[-1].minor.yy603, &yymsp[0].minor.yy53); } +{ pCxt->pRootNode = createDropDatabaseStmt(pCxt, yymsp[-1].minor.yy617, &yymsp[0].minor.yy105); } break; case 61: /* cmd ::= USE db_name */ -{ pCxt->pRootNode = createUseDatabaseStmt(pCxt, &yymsp[0].minor.yy53); } +{ pCxt->pRootNode = createUseDatabaseStmt(pCxt, &yymsp[0].minor.yy105); } break; case 62: /* cmd ::= ALTER DATABASE db_name alter_db_options */ -{ pCxt->pRootNode = createAlterDatabaseStmt(pCxt, &yymsp[-1].minor.yy53, yymsp[0].minor.yy636); } +{ pCxt->pRootNode = createAlterDatabaseStmt(pCxt, &yymsp[-1].minor.yy105, yymsp[0].minor.yy172); } break; case 63: /* not_exists_opt ::= IF NOT EXISTS */ -{ yymsp[-2].minor.yy603 = true; } +{ yymsp[-2].minor.yy617 = true; } break; case 64: /* not_exists_opt ::= */ case 66: /* exists_opt ::= */ yytestcase(yyruleno==66); - case 236: /* analyze_opt ::= */ yytestcase(yyruleno==236); - case 244: /* agg_func_opt ::= */ yytestcase(yyruleno==244); - case 392: /* set_quantifier_opt ::= */ yytestcase(yyruleno==392); -{ yymsp[1].minor.yy603 = false; } + case 233: /* analyze_opt ::= */ yytestcase(yyruleno==233); + case 241: /* agg_func_opt ::= */ yytestcase(yyruleno==241); + case 389: /* set_quantifier_opt ::= */ yytestcase(yyruleno==389); +{ yymsp[1].minor.yy617 = false; } break; case 65: /* exists_opt ::= IF EXISTS */ -{ yymsp[-1].minor.yy603 = true; } +{ yymsp[-1].minor.yy617 = true; } break; case 67: /* db_options ::= */ -{ yymsp[1].minor.yy636 = createDefaultDatabaseOptions(pCxt); } +{ yymsp[1].minor.yy172 = createDefaultDatabaseOptions(pCxt); } break; case 68: /* db_options ::= db_options BUFFER NK_INTEGER */ -{ yylhsminor.yy636 = setDatabaseOption(pCxt, yymsp[-2].minor.yy636, DB_OPTION_BUFFER, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy172 = setDatabaseOption(pCxt, yymsp[-2].minor.yy172, DB_OPTION_BUFFER, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy172 = yylhsminor.yy172; break; case 69: /* db_options ::= db_options CACHELAST NK_INTEGER */ -{ yylhsminor.yy636 = setDatabaseOption(pCxt, yymsp[-2].minor.yy636, DB_OPTION_CACHELAST, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy172 = setDatabaseOption(pCxt, yymsp[-2].minor.yy172, DB_OPTION_CACHELAST, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy172 = yylhsminor.yy172; break; case 70: /* db_options ::= db_options COMP NK_INTEGER */ -{ yylhsminor.yy636 = setDatabaseOption(pCxt, yymsp[-2].minor.yy636, DB_OPTION_COMP, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy172 = setDatabaseOption(pCxt, yymsp[-2].minor.yy172, DB_OPTION_COMP, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy172 = yylhsminor.yy172; break; case 71: /* db_options ::= db_options DAYS NK_INTEGER */ case 72: /* db_options ::= db_options DAYS NK_VARIABLE */ yytestcase(yyruleno==72); -{ yylhsminor.yy636 = setDatabaseOption(pCxt, yymsp[-2].minor.yy636, DB_OPTION_DAYS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy172 = setDatabaseOption(pCxt, yymsp[-2].minor.yy172, DB_OPTION_DAYS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy172 = yylhsminor.yy172; break; case 73: /* db_options ::= db_options FSYNC NK_INTEGER */ -{ yylhsminor.yy636 = setDatabaseOption(pCxt, yymsp[-2].minor.yy636, DB_OPTION_FSYNC, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy172 = setDatabaseOption(pCxt, yymsp[-2].minor.yy172, DB_OPTION_FSYNC, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy172 = yylhsminor.yy172; break; case 74: /* db_options ::= db_options MAXROWS NK_INTEGER */ -{ yylhsminor.yy636 = setDatabaseOption(pCxt, yymsp[-2].minor.yy636, DB_OPTION_MAXROWS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy172 = setDatabaseOption(pCxt, yymsp[-2].minor.yy172, DB_OPTION_MAXROWS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy172 = yylhsminor.yy172; break; case 75: /* db_options ::= db_options MINROWS NK_INTEGER */ -{ yylhsminor.yy636 = setDatabaseOption(pCxt, yymsp[-2].minor.yy636, DB_OPTION_MINROWS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy172 = setDatabaseOption(pCxt, yymsp[-2].minor.yy172, DB_OPTION_MINROWS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy172 = yylhsminor.yy172; break; case 76: /* db_options ::= db_options KEEP integer_list */ case 77: /* db_options ::= db_options KEEP variable_list */ yytestcase(yyruleno==77); -{ yylhsminor.yy636 = setDatabaseOption(pCxt, yymsp[-2].minor.yy636, DB_OPTION_KEEP, yymsp[0].minor.yy236); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy172 = setDatabaseOption(pCxt, yymsp[-2].minor.yy172, DB_OPTION_KEEP, yymsp[0].minor.yy60); } + yymsp[-2].minor.yy172 = yylhsminor.yy172; break; case 78: /* db_options ::= db_options PAGES NK_INTEGER */ -{ yylhsminor.yy636 = setDatabaseOption(pCxt, yymsp[-2].minor.yy636, DB_OPTION_PAGES, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy172 = setDatabaseOption(pCxt, yymsp[-2].minor.yy172, DB_OPTION_PAGES, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy172 = yylhsminor.yy172; break; case 79: /* db_options ::= db_options PAGESIZE NK_INTEGER */ -{ yylhsminor.yy636 = setDatabaseOption(pCxt, yymsp[-2].minor.yy636, DB_OPTION_PAGESIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy172 = setDatabaseOption(pCxt, yymsp[-2].minor.yy172, DB_OPTION_PAGESIZE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy172 = yylhsminor.yy172; break; case 80: /* db_options ::= db_options PRECISION NK_STRING */ -{ yylhsminor.yy636 = setDatabaseOption(pCxt, yymsp[-2].minor.yy636, DB_OPTION_PRECISION, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy172 = setDatabaseOption(pCxt, yymsp[-2].minor.yy172, DB_OPTION_PRECISION, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy172 = yylhsminor.yy172; break; case 81: /* db_options ::= db_options REPLICA NK_INTEGER */ -{ yylhsminor.yy636 = setDatabaseOption(pCxt, yymsp[-2].minor.yy636, DB_OPTION_REPLICA, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy172 = setDatabaseOption(pCxt, yymsp[-2].minor.yy172, DB_OPTION_REPLICA, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy172 = yylhsminor.yy172; break; case 82: /* db_options ::= db_options STRICT NK_INTEGER */ -{ yylhsminor.yy636 = setDatabaseOption(pCxt, yymsp[-2].minor.yy636, DB_OPTION_STRICT, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy172 = setDatabaseOption(pCxt, yymsp[-2].minor.yy172, DB_OPTION_STRICT, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy172 = yylhsminor.yy172; break; case 83: /* db_options ::= db_options WAL NK_INTEGER */ -{ yylhsminor.yy636 = setDatabaseOption(pCxt, yymsp[-2].minor.yy636, DB_OPTION_WAL, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy172 = setDatabaseOption(pCxt, yymsp[-2].minor.yy172, DB_OPTION_WAL, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy172 = yylhsminor.yy172; break; case 84: /* db_options ::= db_options VGROUPS NK_INTEGER */ -{ yylhsminor.yy636 = setDatabaseOption(pCxt, yymsp[-2].minor.yy636, DB_OPTION_VGROUPS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy172 = setDatabaseOption(pCxt, yymsp[-2].minor.yy172, DB_OPTION_VGROUPS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy172 = yylhsminor.yy172; break; case 85: /* db_options ::= db_options SINGLE_STABLE NK_INTEGER */ -{ yylhsminor.yy636 = setDatabaseOption(pCxt, yymsp[-2].minor.yy636, DB_OPTION_SINGLE_STABLE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy172 = setDatabaseOption(pCxt, yymsp[-2].minor.yy172, DB_OPTION_SINGLE_STABLE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy172 = yylhsminor.yy172; break; case 86: /* db_options ::= db_options RETENTIONS retention_list */ -{ yylhsminor.yy636 = setDatabaseOption(pCxt, yymsp[-2].minor.yy636, DB_OPTION_RETENTIONS, yymsp[0].minor.yy236); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy172 = setDatabaseOption(pCxt, yymsp[-2].minor.yy172, DB_OPTION_RETENTIONS, yymsp[0].minor.yy60); } + yymsp[-2].minor.yy172 = yylhsminor.yy172; break; case 87: /* db_options ::= db_options SCHEMALESS NK_INTEGER */ -{ yylhsminor.yy636 = setDatabaseOption(pCxt, yymsp[-2].minor.yy636, DB_OPTION_SCHEMALESS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy172 = setDatabaseOption(pCxt, yymsp[-2].minor.yy172, DB_OPTION_SCHEMALESS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy172 = yylhsminor.yy172; break; case 88: /* alter_db_options ::= alter_db_option */ -{ yylhsminor.yy636 = createAlterDatabaseOptions(pCxt); yylhsminor.yy636 = setAlterDatabaseOption(pCxt, yylhsminor.yy636, &yymsp[0].minor.yy25); } - yymsp[0].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy172 = createAlterDatabaseOptions(pCxt); yylhsminor.yy172 = setAlterDatabaseOption(pCxt, yylhsminor.yy172, &yymsp[0].minor.yy609); } + yymsp[0].minor.yy172 = yylhsminor.yy172; break; case 89: /* alter_db_options ::= alter_db_options alter_db_option */ -{ yylhsminor.yy636 = setAlterDatabaseOption(pCxt, yymsp[-1].minor.yy636, &yymsp[0].minor.yy25); } - yymsp[-1].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy172 = setAlterDatabaseOption(pCxt, yymsp[-1].minor.yy172, &yymsp[0].minor.yy609); } + yymsp[-1].minor.yy172 = yylhsminor.yy172; break; case 90: /* alter_db_option ::= BUFFER NK_INTEGER */ -{ yymsp[-1].minor.yy25.type = DB_OPTION_BUFFER; yymsp[-1].minor.yy25.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy609.type = DB_OPTION_BUFFER; yymsp[-1].minor.yy609.val = yymsp[0].minor.yy0; } break; case 91: /* alter_db_option ::= CACHELAST NK_INTEGER */ -{ yymsp[-1].minor.yy25.type = DB_OPTION_CACHELAST; yymsp[-1].minor.yy25.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy609.type = DB_OPTION_CACHELAST; yymsp[-1].minor.yy609.val = yymsp[0].minor.yy0; } break; case 92: /* alter_db_option ::= FSYNC NK_INTEGER */ -{ yymsp[-1].minor.yy25.type = DB_OPTION_FSYNC; yymsp[-1].minor.yy25.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy609.type = DB_OPTION_FSYNC; yymsp[-1].minor.yy609.val = yymsp[0].minor.yy0; } break; case 93: /* alter_db_option ::= KEEP integer_list */ case 94: /* alter_db_option ::= KEEP variable_list */ yytestcase(yyruleno==94); -{ yymsp[-1].minor.yy25.type = DB_OPTION_KEEP; yymsp[-1].minor.yy25.pList = yymsp[0].minor.yy236; } +{ yymsp[-1].minor.yy609.type = DB_OPTION_KEEP; yymsp[-1].minor.yy609.pList = yymsp[0].minor.yy60; } break; case 95: /* alter_db_option ::= PAGES NK_INTEGER */ -{ yymsp[-1].minor.yy25.type = DB_OPTION_PAGES; yymsp[-1].minor.yy25.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy609.type = DB_OPTION_PAGES; yymsp[-1].minor.yy609.val = yymsp[0].minor.yy0; } break; case 96: /* alter_db_option ::= REPLICA NK_INTEGER */ -{ yymsp[-1].minor.yy25.type = DB_OPTION_REPLICA; yymsp[-1].minor.yy25.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy609.type = DB_OPTION_REPLICA; yymsp[-1].minor.yy609.val = yymsp[0].minor.yy0; } break; case 97: /* alter_db_option ::= STRICT NK_INTEGER */ -{ yymsp[-1].minor.yy25.type = DB_OPTION_STRICT; yymsp[-1].minor.yy25.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy609.type = DB_OPTION_STRICT; yymsp[-1].minor.yy609.val = yymsp[0].minor.yy0; } break; case 98: /* alter_db_option ::= WAL NK_INTEGER */ -{ yymsp[-1].minor.yy25.type = DB_OPTION_WAL; yymsp[-1].minor.yy25.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy609.type = DB_OPTION_WAL; yymsp[-1].minor.yy609.val = yymsp[0].minor.yy0; } break; case 99: /* integer_list ::= NK_INTEGER */ -{ yylhsminor.yy236 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy236 = yylhsminor.yy236; +{ yylhsminor.yy60 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy60 = yylhsminor.yy60; break; case 100: /* integer_list ::= integer_list NK_COMMA NK_INTEGER */ - case 263: /* dnode_list ::= dnode_list DNODE NK_INTEGER */ yytestcase(yyruleno==263); -{ yylhsminor.yy236 = addNodeToList(pCxt, yymsp[-2].minor.yy236, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } - yymsp[-2].minor.yy236 = yylhsminor.yy236; + case 260: /* dnode_list ::= dnode_list DNODE NK_INTEGER */ yytestcase(yyruleno==260); +{ yylhsminor.yy60 = addNodeToList(pCxt, yymsp[-2].minor.yy60, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } + yymsp[-2].minor.yy60 = yylhsminor.yy60; break; case 101: /* variable_list ::= NK_VARIABLE */ -{ yylhsminor.yy236 = createNodeList(pCxt, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy236 = yylhsminor.yy236; +{ yylhsminor.yy60 = createNodeList(pCxt, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy60 = yylhsminor.yy60; break; case 102: /* variable_list ::= variable_list NK_COMMA NK_VARIABLE */ -{ yylhsminor.yy236 = addNodeToList(pCxt, yymsp[-2].minor.yy236, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[-2].minor.yy236 = yylhsminor.yy236; +{ yylhsminor.yy60 = addNodeToList(pCxt, yymsp[-2].minor.yy60, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[-2].minor.yy60 = yylhsminor.yy60; break; case 103: /* retention_list ::= retention */ case 123: /* multi_create_clause ::= create_subtable_clause */ yytestcase(yyruleno==123); @@ -3442,246 +3442,246 @@ static YYACTIONTYPE yy_reduce( case 174: /* col_name_list ::= col_name */ yytestcase(yyruleno==174); case 212: /* func_name_list ::= func_name */ yytestcase(yyruleno==212); case 221: /* func_list ::= func */ yytestcase(yyruleno==221); - case 288: /* literal_list ::= signed_literal */ yytestcase(yyruleno==288); - case 342: /* other_para_list ::= star_func_para */ yytestcase(yyruleno==342); - case 397: /* select_sublist ::= select_item */ yytestcase(yyruleno==397); - case 446: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==446); -{ yylhsminor.yy236 = createNodeList(pCxt, yymsp[0].minor.yy636); } - yymsp[0].minor.yy236 = yylhsminor.yy236; + case 285: /* literal_list ::= signed_literal */ yytestcase(yyruleno==285); + case 339: /* other_para_list ::= star_func_para */ yytestcase(yyruleno==339); + case 394: /* select_sublist ::= select_item */ yytestcase(yyruleno==394); + case 443: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==443); +{ yylhsminor.yy60 = createNodeList(pCxt, yymsp[0].minor.yy172); } + yymsp[0].minor.yy60 = yylhsminor.yy60; break; case 104: /* retention_list ::= retention_list NK_COMMA retention */ case 134: /* column_def_list ::= column_def_list NK_COMMA column_def */ yytestcase(yyruleno==134); case 175: /* col_name_list ::= col_name_list NK_COMMA col_name */ yytestcase(yyruleno==175); case 213: /* func_name_list ::= func_name_list NK_COMMA func_name */ yytestcase(yyruleno==213); case 222: /* func_list ::= func_list NK_COMMA func */ yytestcase(yyruleno==222); - case 289: /* literal_list ::= literal_list NK_COMMA signed_literal */ yytestcase(yyruleno==289); - case 343: /* other_para_list ::= other_para_list NK_COMMA star_func_para */ yytestcase(yyruleno==343); - case 398: /* select_sublist ::= select_sublist NK_COMMA select_item */ yytestcase(yyruleno==398); - case 447: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==447); -{ yylhsminor.yy236 = addNodeToList(pCxt, yymsp[-2].minor.yy236, yymsp[0].minor.yy636); } - yymsp[-2].minor.yy236 = yylhsminor.yy236; + case 286: /* literal_list ::= literal_list NK_COMMA signed_literal */ yytestcase(yyruleno==286); + case 340: /* other_para_list ::= other_para_list NK_COMMA star_func_para */ yytestcase(yyruleno==340); + case 395: /* select_sublist ::= select_sublist NK_COMMA select_item */ yytestcase(yyruleno==395); + case 444: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==444); +{ yylhsminor.yy60 = addNodeToList(pCxt, yymsp[-2].minor.yy60, yymsp[0].minor.yy172); } + yymsp[-2].minor.yy60 = yylhsminor.yy60; break; case 105: /* retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ -{ yylhsminor.yy636 = createNodeListNodeEx(pCxt, createDurationValueNode(pCxt, &yymsp[-2].minor.yy0), createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy172 = createNodeListNodeEx(pCxt, createDurationValueNode(pCxt, &yymsp[-2].minor.yy0), createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[-2].minor.yy172 = yylhsminor.yy172; break; case 106: /* cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ case 108: /* cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ yytestcase(yyruleno==108); -{ pCxt->pRootNode = createCreateTableStmt(pCxt, yymsp[-6].minor.yy603, yymsp[-5].minor.yy636, yymsp[-3].minor.yy236, yymsp[-1].minor.yy236, yymsp[0].minor.yy636); } +{ pCxt->pRootNode = createCreateTableStmt(pCxt, yymsp[-6].minor.yy617, yymsp[-5].minor.yy172, yymsp[-3].minor.yy60, yymsp[-1].minor.yy60, yymsp[0].minor.yy172); } break; case 107: /* cmd ::= CREATE TABLE multi_create_clause */ -{ pCxt->pRootNode = createCreateMultiTableStmt(pCxt, yymsp[0].minor.yy236); } +{ pCxt->pRootNode = createCreateMultiTableStmt(pCxt, yymsp[0].minor.yy60); } break; case 109: /* cmd ::= DROP TABLE multi_drop_clause */ -{ pCxt->pRootNode = createDropTableStmt(pCxt, yymsp[0].minor.yy236); } +{ pCxt->pRootNode = createDropTableStmt(pCxt, yymsp[0].minor.yy60); } break; case 110: /* cmd ::= DROP STABLE exists_opt full_table_name */ -{ pCxt->pRootNode = createDropSuperTableStmt(pCxt, yymsp[-1].minor.yy603, yymsp[0].minor.yy636); } +{ pCxt->pRootNode = createDropSuperTableStmt(pCxt, yymsp[-1].minor.yy617, yymsp[0].minor.yy172); } break; case 111: /* cmd ::= ALTER TABLE alter_table_clause */ case 112: /* cmd ::= ALTER STABLE alter_table_clause */ yytestcase(yyruleno==112); - case 265: /* cmd ::= query_expression */ yytestcase(yyruleno==265); -{ pCxt->pRootNode = yymsp[0].minor.yy636; } + case 262: /* cmd ::= query_expression */ yytestcase(yyruleno==262); +{ pCxt->pRootNode = yymsp[0].minor.yy172; } break; case 113: /* alter_table_clause ::= full_table_name alter_table_options */ -{ yylhsminor.yy636 = createAlterTableModifyOptions(pCxt, yymsp[-1].minor.yy636, yymsp[0].minor.yy636); } - yymsp[-1].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy172 = createAlterTableModifyOptions(pCxt, yymsp[-1].minor.yy172, yymsp[0].minor.yy172); } + yymsp[-1].minor.yy172 = yylhsminor.yy172; break; case 114: /* alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ -{ yylhsminor.yy636 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy636, TSDB_ALTER_TABLE_ADD_COLUMN, &yymsp[-1].minor.yy53, yymsp[0].minor.yy450); } - yymsp[-4].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy172 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy172, TSDB_ALTER_TABLE_ADD_COLUMN, &yymsp[-1].minor.yy105, yymsp[0].minor.yy248); } + yymsp[-4].minor.yy172 = yylhsminor.yy172; break; case 115: /* alter_table_clause ::= full_table_name DROP COLUMN column_name */ -{ yylhsminor.yy636 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy636, TSDB_ALTER_TABLE_DROP_COLUMN, &yymsp[0].minor.yy53); } - yymsp[-3].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy172 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy172, TSDB_ALTER_TABLE_DROP_COLUMN, &yymsp[0].minor.yy105); } + yymsp[-3].minor.yy172 = yylhsminor.yy172; break; case 116: /* alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ -{ yylhsminor.yy636 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy636, TSDB_ALTER_TABLE_UPDATE_COLUMN_BYTES, &yymsp[-1].minor.yy53, yymsp[0].minor.yy450); } - yymsp[-4].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy172 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy172, TSDB_ALTER_TABLE_UPDATE_COLUMN_BYTES, &yymsp[-1].minor.yy105, yymsp[0].minor.yy248); } + yymsp[-4].minor.yy172 = yylhsminor.yy172; break; case 117: /* alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ -{ yylhsminor.yy636 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy636, TSDB_ALTER_TABLE_UPDATE_COLUMN_NAME, &yymsp[-1].minor.yy53, &yymsp[0].minor.yy53); } - yymsp[-4].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy172 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy172, TSDB_ALTER_TABLE_UPDATE_COLUMN_NAME, &yymsp[-1].minor.yy105, &yymsp[0].minor.yy105); } + yymsp[-4].minor.yy172 = yylhsminor.yy172; break; case 118: /* alter_table_clause ::= full_table_name ADD TAG column_name type_name */ -{ yylhsminor.yy636 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy636, TSDB_ALTER_TABLE_ADD_TAG, &yymsp[-1].minor.yy53, yymsp[0].minor.yy450); } - yymsp[-4].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy172 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy172, TSDB_ALTER_TABLE_ADD_TAG, &yymsp[-1].minor.yy105, yymsp[0].minor.yy248); } + yymsp[-4].minor.yy172 = yylhsminor.yy172; break; case 119: /* alter_table_clause ::= full_table_name DROP TAG column_name */ -{ yylhsminor.yy636 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy636, TSDB_ALTER_TABLE_DROP_TAG, &yymsp[0].minor.yy53); } - yymsp[-3].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy172 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy172, TSDB_ALTER_TABLE_DROP_TAG, &yymsp[0].minor.yy105); } + yymsp[-3].minor.yy172 = yylhsminor.yy172; break; case 120: /* alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ -{ yylhsminor.yy636 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy636, TSDB_ALTER_TABLE_UPDATE_TAG_BYTES, &yymsp[-1].minor.yy53, yymsp[0].minor.yy450); } - yymsp[-4].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy172 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy172, TSDB_ALTER_TABLE_UPDATE_TAG_BYTES, &yymsp[-1].minor.yy105, yymsp[0].minor.yy248); } + yymsp[-4].minor.yy172 = yylhsminor.yy172; break; case 121: /* alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ -{ yylhsminor.yy636 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy636, TSDB_ALTER_TABLE_UPDATE_TAG_NAME, &yymsp[-1].minor.yy53, &yymsp[0].minor.yy53); } - yymsp[-4].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy172 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy172, TSDB_ALTER_TABLE_UPDATE_TAG_NAME, &yymsp[-1].minor.yy105, &yymsp[0].minor.yy105); } + yymsp[-4].minor.yy172 = yylhsminor.yy172; break; case 122: /* alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */ -{ yylhsminor.yy636 = createAlterTableSetTag(pCxt, yymsp[-5].minor.yy636, &yymsp[-2].minor.yy53, yymsp[0].minor.yy636); } - yymsp[-5].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy172 = createAlterTableSetTag(pCxt, yymsp[-5].minor.yy172, &yymsp[-2].minor.yy105, yymsp[0].minor.yy172); } + yymsp[-5].minor.yy172 = yylhsminor.yy172; break; case 124: /* multi_create_clause ::= multi_create_clause create_subtable_clause */ case 127: /* multi_drop_clause ::= multi_drop_clause drop_table_clause */ yytestcase(yyruleno==127); -{ yylhsminor.yy236 = addNodeToList(pCxt, yymsp[-1].minor.yy236, yymsp[0].minor.yy636); } - yymsp[-1].minor.yy236 = yylhsminor.yy236; +{ yylhsminor.yy60 = addNodeToList(pCxt, yymsp[-1].minor.yy60, yymsp[0].minor.yy172); } + yymsp[-1].minor.yy60 = yylhsminor.yy60; break; case 125: /* create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_tags_opt TAGS NK_LP literal_list NK_RP table_options */ -{ yylhsminor.yy636 = createCreateSubTableClause(pCxt, yymsp[-9].minor.yy603, yymsp[-8].minor.yy636, yymsp[-6].minor.yy636, yymsp[-5].minor.yy236, yymsp[-2].minor.yy236, yymsp[0].minor.yy636); } - yymsp[-9].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy172 = createCreateSubTableClause(pCxt, yymsp[-9].minor.yy617, yymsp[-8].minor.yy172, yymsp[-6].minor.yy172, yymsp[-5].minor.yy60, yymsp[-2].minor.yy60, yymsp[0].minor.yy172); } + yymsp[-9].minor.yy172 = yylhsminor.yy172; break; case 128: /* drop_table_clause ::= exists_opt full_table_name */ -{ yylhsminor.yy636 = createDropTableClause(pCxt, yymsp[-1].minor.yy603, yymsp[0].minor.yy636); } - yymsp[-1].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy172 = createDropTableClause(pCxt, yymsp[-1].minor.yy617, yymsp[0].minor.yy172); } + yymsp[-1].minor.yy172 = yylhsminor.yy172; break; case 129: /* specific_tags_opt ::= */ case 160: /* tags_def_opt ::= */ yytestcase(yyruleno==160); - case 405: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==405); - case 422: /* group_by_clause_opt ::= */ yytestcase(yyruleno==422); - case 434: /* order_by_clause_opt ::= */ yytestcase(yyruleno==434); -{ yymsp[1].minor.yy236 = NULL; } + case 402: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==402); + case 419: /* group_by_clause_opt ::= */ yytestcase(yyruleno==419); + case 431: /* order_by_clause_opt ::= */ yytestcase(yyruleno==431); +{ yymsp[1].minor.yy60 = NULL; } break; case 130: /* specific_tags_opt ::= NK_LP col_name_list NK_RP */ -{ yymsp[-2].minor.yy236 = yymsp[-1].minor.yy236; } +{ yymsp[-2].minor.yy60 = yymsp[-1].minor.yy60; } break; case 131: /* full_table_name ::= table_name */ -{ yylhsminor.yy636 = createRealTableNode(pCxt, NULL, &yymsp[0].minor.yy53, NULL); } - yymsp[0].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy172 = createRealTableNode(pCxt, NULL, &yymsp[0].minor.yy105, NULL); } + yymsp[0].minor.yy172 = yylhsminor.yy172; break; case 132: /* full_table_name ::= db_name NK_DOT table_name */ -{ yylhsminor.yy636 = createRealTableNode(pCxt, &yymsp[-2].minor.yy53, &yymsp[0].minor.yy53, NULL); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy172 = createRealTableNode(pCxt, &yymsp[-2].minor.yy105, &yymsp[0].minor.yy105, NULL); } + yymsp[-2].minor.yy172 = yylhsminor.yy172; break; case 135: /* column_def ::= column_name type_name */ -{ yylhsminor.yy636 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy53, yymsp[0].minor.yy450, NULL); } - yymsp[-1].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy172 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy105, yymsp[0].minor.yy248, NULL); } + yymsp[-1].minor.yy172 = yylhsminor.yy172; break; case 136: /* column_def ::= column_name type_name COMMENT NK_STRING */ -{ yylhsminor.yy636 = createColumnDefNode(pCxt, &yymsp[-3].minor.yy53, yymsp[-2].minor.yy450, &yymsp[0].minor.yy0); } - yymsp[-3].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy172 = createColumnDefNode(pCxt, &yymsp[-3].minor.yy105, yymsp[-2].minor.yy248, &yymsp[0].minor.yy0); } + yymsp[-3].minor.yy172 = yylhsminor.yy172; break; case 137: /* type_name ::= BOOL */ -{ yymsp[0].minor.yy450 = createDataType(TSDB_DATA_TYPE_BOOL); } +{ yymsp[0].minor.yy248 = createDataType(TSDB_DATA_TYPE_BOOL); } break; case 138: /* type_name ::= TINYINT */ -{ yymsp[0].minor.yy450 = createDataType(TSDB_DATA_TYPE_TINYINT); } +{ yymsp[0].minor.yy248 = createDataType(TSDB_DATA_TYPE_TINYINT); } break; case 139: /* type_name ::= SMALLINT */ -{ yymsp[0].minor.yy450 = createDataType(TSDB_DATA_TYPE_SMALLINT); } +{ yymsp[0].minor.yy248 = createDataType(TSDB_DATA_TYPE_SMALLINT); } break; case 140: /* type_name ::= INT */ case 141: /* type_name ::= INTEGER */ yytestcase(yyruleno==141); -{ yymsp[0].minor.yy450 = createDataType(TSDB_DATA_TYPE_INT); } +{ yymsp[0].minor.yy248 = createDataType(TSDB_DATA_TYPE_INT); } break; case 142: /* type_name ::= BIGINT */ -{ yymsp[0].minor.yy450 = createDataType(TSDB_DATA_TYPE_BIGINT); } +{ yymsp[0].minor.yy248 = createDataType(TSDB_DATA_TYPE_BIGINT); } break; case 143: /* type_name ::= FLOAT */ -{ yymsp[0].minor.yy450 = createDataType(TSDB_DATA_TYPE_FLOAT); } +{ yymsp[0].minor.yy248 = createDataType(TSDB_DATA_TYPE_FLOAT); } break; case 144: /* type_name ::= DOUBLE */ -{ yymsp[0].minor.yy450 = createDataType(TSDB_DATA_TYPE_DOUBLE); } +{ yymsp[0].minor.yy248 = createDataType(TSDB_DATA_TYPE_DOUBLE); } break; case 145: /* type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy450 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy0); } +{ yymsp[-3].minor.yy248 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy0); } break; case 146: /* type_name ::= TIMESTAMP */ -{ yymsp[0].minor.yy450 = createDataType(TSDB_DATA_TYPE_TIMESTAMP); } +{ yymsp[0].minor.yy248 = createDataType(TSDB_DATA_TYPE_TIMESTAMP); } break; case 147: /* type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy450 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, &yymsp[-1].minor.yy0); } +{ yymsp[-3].minor.yy248 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, &yymsp[-1].minor.yy0); } break; case 148: /* type_name ::= TINYINT UNSIGNED */ -{ yymsp[-1].minor.yy450 = createDataType(TSDB_DATA_TYPE_UTINYINT); } +{ yymsp[-1].minor.yy248 = createDataType(TSDB_DATA_TYPE_UTINYINT); } break; case 149: /* type_name ::= SMALLINT UNSIGNED */ -{ yymsp[-1].minor.yy450 = createDataType(TSDB_DATA_TYPE_USMALLINT); } +{ yymsp[-1].minor.yy248 = createDataType(TSDB_DATA_TYPE_USMALLINT); } break; case 150: /* type_name ::= INT UNSIGNED */ -{ yymsp[-1].minor.yy450 = createDataType(TSDB_DATA_TYPE_UINT); } +{ yymsp[-1].minor.yy248 = createDataType(TSDB_DATA_TYPE_UINT); } break; case 151: /* type_name ::= BIGINT UNSIGNED */ -{ yymsp[-1].minor.yy450 = createDataType(TSDB_DATA_TYPE_UBIGINT); } +{ yymsp[-1].minor.yy248 = createDataType(TSDB_DATA_TYPE_UBIGINT); } break; case 152: /* type_name ::= JSON */ -{ yymsp[0].minor.yy450 = createDataType(TSDB_DATA_TYPE_JSON); } +{ yymsp[0].minor.yy248 = createDataType(TSDB_DATA_TYPE_JSON); } break; case 153: /* type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy450 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, &yymsp[-1].minor.yy0); } +{ yymsp[-3].minor.yy248 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, &yymsp[-1].minor.yy0); } break; case 154: /* type_name ::= MEDIUMBLOB */ -{ yymsp[0].minor.yy450 = createDataType(TSDB_DATA_TYPE_MEDIUMBLOB); } +{ yymsp[0].minor.yy248 = createDataType(TSDB_DATA_TYPE_MEDIUMBLOB); } break; case 155: /* type_name ::= BLOB */ -{ yymsp[0].minor.yy450 = createDataType(TSDB_DATA_TYPE_BLOB); } +{ yymsp[0].minor.yy248 = createDataType(TSDB_DATA_TYPE_BLOB); } break; case 156: /* type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy450 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, &yymsp[-1].minor.yy0); } +{ yymsp[-3].minor.yy248 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, &yymsp[-1].minor.yy0); } break; case 157: /* type_name ::= DECIMAL */ -{ yymsp[0].minor.yy450 = createDataType(TSDB_DATA_TYPE_DECIMAL); } +{ yymsp[0].minor.yy248 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; case 158: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy450 = createDataType(TSDB_DATA_TYPE_DECIMAL); } +{ yymsp[-3].minor.yy248 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; case 159: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ -{ yymsp[-5].minor.yy450 = createDataType(TSDB_DATA_TYPE_DECIMAL); } +{ yymsp[-5].minor.yy248 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; case 161: /* tags_def_opt ::= tags_def */ - case 341: /* star_func_para_list ::= other_para_list */ yytestcase(yyruleno==341); - case 396: /* select_list ::= select_sublist */ yytestcase(yyruleno==396); -{ yylhsminor.yy236 = yymsp[0].minor.yy236; } - yymsp[0].minor.yy236 = yylhsminor.yy236; + case 338: /* star_func_para_list ::= other_para_list */ yytestcase(yyruleno==338); + case 393: /* select_list ::= select_sublist */ yytestcase(yyruleno==393); +{ yylhsminor.yy60 = yymsp[0].minor.yy60; } + yymsp[0].minor.yy60 = yylhsminor.yy60; break; case 162: /* tags_def ::= TAGS NK_LP column_def_list NK_RP */ -{ yymsp[-3].minor.yy236 = yymsp[-1].minor.yy236; } +{ yymsp[-3].minor.yy60 = yymsp[-1].minor.yy60; } break; case 163: /* table_options ::= */ -{ yymsp[1].minor.yy636 = createDefaultTableOptions(pCxt); } +{ yymsp[1].minor.yy172 = createDefaultTableOptions(pCxt); } break; case 164: /* table_options ::= table_options COMMENT NK_STRING */ -{ yylhsminor.yy636 = setTableOption(pCxt, yymsp[-2].minor.yy636, TABLE_OPTION_COMMENT, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy172 = setTableOption(pCxt, yymsp[-2].minor.yy172, TABLE_OPTION_COMMENT, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy172 = yylhsminor.yy172; break; case 165: /* table_options ::= table_options DELAY NK_INTEGER */ -{ yylhsminor.yy636 = setTableOption(pCxt, yymsp[-2].minor.yy636, TABLE_OPTION_DELAY, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy172 = setTableOption(pCxt, yymsp[-2].minor.yy172, TABLE_OPTION_DELAY, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy172 = yylhsminor.yy172; break; case 166: /* table_options ::= table_options FILE_FACTOR NK_FLOAT */ -{ yylhsminor.yy636 = setTableOption(pCxt, yymsp[-2].minor.yy636, TABLE_OPTION_FILE_FACTOR, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy172 = setTableOption(pCxt, yymsp[-2].minor.yy172, TABLE_OPTION_FILE_FACTOR, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy172 = yylhsminor.yy172; break; case 167: /* table_options ::= table_options ROLLUP NK_LP func_name_list NK_RP */ -{ yylhsminor.yy636 = setTableOption(pCxt, yymsp[-4].minor.yy636, TABLE_OPTION_ROLLUP, yymsp[-1].minor.yy236); } - yymsp[-4].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy172 = setTableOption(pCxt, yymsp[-4].minor.yy172, TABLE_OPTION_ROLLUP, yymsp[-1].minor.yy60); } + yymsp[-4].minor.yy172 = yylhsminor.yy172; break; case 168: /* table_options ::= table_options TTL NK_INTEGER */ -{ yylhsminor.yy636 = setTableOption(pCxt, yymsp[-2].minor.yy636, TABLE_OPTION_TTL, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy172 = setTableOption(pCxt, yymsp[-2].minor.yy172, TABLE_OPTION_TTL, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy172 = yylhsminor.yy172; break; case 169: /* table_options ::= table_options SMA NK_LP col_name_list NK_RP */ -{ yylhsminor.yy636 = setTableOption(pCxt, yymsp[-4].minor.yy636, TABLE_OPTION_SMA, yymsp[-1].minor.yy236); } - yymsp[-4].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy172 = setTableOption(pCxt, yymsp[-4].minor.yy172, TABLE_OPTION_SMA, yymsp[-1].minor.yy60); } + yymsp[-4].minor.yy172 = yylhsminor.yy172; break; case 170: /* alter_table_options ::= alter_table_option */ -{ yylhsminor.yy636 = createAlterTableOptions(pCxt); yylhsminor.yy636 = setTableOption(pCxt, yylhsminor.yy636, yymsp[0].minor.yy25.type, &yymsp[0].minor.yy25.val); } - yymsp[0].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy172 = createAlterTableOptions(pCxt); yylhsminor.yy172 = setTableOption(pCxt, yylhsminor.yy172, yymsp[0].minor.yy609.type, &yymsp[0].minor.yy609.val); } + yymsp[0].minor.yy172 = yylhsminor.yy172; break; case 171: /* alter_table_options ::= alter_table_options alter_table_option */ -{ yylhsminor.yy636 = setTableOption(pCxt, yymsp[-1].minor.yy636, yymsp[0].minor.yy25.type, &yymsp[0].minor.yy25.val); } - yymsp[-1].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy172 = setTableOption(pCxt, yymsp[-1].minor.yy172, yymsp[0].minor.yy609.type, &yymsp[0].minor.yy609.val); } + yymsp[-1].minor.yy172 = yylhsminor.yy172; break; case 172: /* alter_table_option ::= COMMENT NK_STRING */ -{ yymsp[-1].minor.yy25.type = TABLE_OPTION_COMMENT; yymsp[-1].minor.yy25.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy609.type = TABLE_OPTION_COMMENT; yymsp[-1].minor.yy609.val = yymsp[0].minor.yy0; } break; case 173: /* alter_table_option ::= TTL NK_INTEGER */ -{ yymsp[-1].minor.yy25.type = TABLE_OPTION_TTL; yymsp[-1].minor.yy25.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy609.type = TABLE_OPTION_TTL; yymsp[-1].minor.yy609.val = yymsp[0].minor.yy0; } break; case 176: /* col_name ::= column_name */ -{ yylhsminor.yy636 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy53); } - yymsp[0].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy172 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy105); } + yymsp[0].minor.yy172 = yylhsminor.yy172; break; case 177: /* cmd ::= SHOW DNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DNODES_STMT, NULL, NULL); } @@ -3693,13 +3693,13 @@ static YYACTIONTYPE yy_reduce( { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DATABASES_STMT, NULL, NULL); } break; case 180: /* cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */ -{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TABLES_STMT, yymsp[-2].minor.yy636, yymsp[0].minor.yy636); } +{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TABLES_STMT, yymsp[-2].minor.yy172, yymsp[0].minor.yy172); } break; case 181: /* cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ -{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_STABLES_STMT, yymsp[-2].minor.yy636, yymsp[0].minor.yy636); } +{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_STABLES_STMT, yymsp[-2].minor.yy172, yymsp[0].minor.yy172); } break; case 182: /* cmd ::= SHOW db_name_cond_opt VGROUPS */ -{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, yymsp[-1].minor.yy636, NULL); } +{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, yymsp[-1].minor.yy172, NULL); } break; case 183: /* cmd ::= SHOW MNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_MNODES_STMT, NULL, NULL); } @@ -3714,7 +3714,7 @@ static YYACTIONTYPE yy_reduce( { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_FUNCTIONS_STMT, NULL, NULL); } break; case 187: /* cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ -{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, yymsp[-1].minor.yy636, yymsp[0].minor.yy636); } +{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, yymsp[-1].minor.yy172, yymsp[0].minor.yy172); } break; case 188: /* cmd ::= SHOW STREAMS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_STREAMS_STMT, NULL, NULL); } @@ -3733,13 +3733,13 @@ static YYACTIONTYPE yy_reduce( { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LICENCE_STMT, NULL, NULL); } break; case 194: /* cmd ::= SHOW CREATE DATABASE db_name */ -{ pCxt->pRootNode = createShowCreateDatabaseStmt(pCxt, &yymsp[0].minor.yy53); } +{ pCxt->pRootNode = createShowCreateDatabaseStmt(pCxt, &yymsp[0].minor.yy105); } break; case 195: /* cmd ::= SHOW CREATE TABLE full_table_name */ -{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_TABLE_STMT, yymsp[0].minor.yy636); } +{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_TABLE_STMT, yymsp[0].minor.yy172); } break; case 196: /* cmd ::= SHOW CREATE STABLE full_table_name */ -{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_STABLE_STMT, yymsp[0].minor.yy636); } +{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_STABLE_STMT, yymsp[0].minor.yy172); } break; case 197: /* cmd ::= SHOW QUERIES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QUERIES_STMT, NULL, NULL); } @@ -3767,678 +3767,666 @@ static YYACTIONTYPE yy_reduce( break; case 205: /* db_name_cond_opt ::= */ case 210: /* from_db_opt ::= */ yytestcase(yyruleno==210); -{ yymsp[1].minor.yy636 = createDefaultDatabaseCondValue(pCxt); } +{ yymsp[1].minor.yy172 = createDefaultDatabaseCondValue(pCxt); } break; case 206: /* db_name_cond_opt ::= db_name NK_DOT */ -{ yylhsminor.yy636 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy53); } - yymsp[-1].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy172 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy105); } + yymsp[-1].minor.yy172 = yylhsminor.yy172; break; case 207: /* like_pattern_opt ::= */ case 218: /* index_options ::= */ yytestcase(yyruleno==218); - case 250: /* into_opt ::= */ yytestcase(yyruleno==250); - case 403: /* where_clause_opt ::= */ yytestcase(yyruleno==403); - case 407: /* twindow_clause_opt ::= */ yytestcase(yyruleno==407); - case 412: /* sliding_opt ::= */ yytestcase(yyruleno==412); - case 414: /* fill_opt ::= */ yytestcase(yyruleno==414); - case 426: /* having_clause_opt ::= */ yytestcase(yyruleno==426); - case 436: /* slimit_clause_opt ::= */ yytestcase(yyruleno==436); - case 440: /* limit_clause_opt ::= */ yytestcase(yyruleno==440); -{ yymsp[1].minor.yy636 = NULL; } + case 247: /* into_opt ::= */ yytestcase(yyruleno==247); + case 400: /* where_clause_opt ::= */ yytestcase(yyruleno==400); + case 404: /* twindow_clause_opt ::= */ yytestcase(yyruleno==404); + case 409: /* sliding_opt ::= */ yytestcase(yyruleno==409); + case 411: /* fill_opt ::= */ yytestcase(yyruleno==411); + case 423: /* having_clause_opt ::= */ yytestcase(yyruleno==423); + case 433: /* slimit_clause_opt ::= */ yytestcase(yyruleno==433); + case 437: /* limit_clause_opt ::= */ yytestcase(yyruleno==437); +{ yymsp[1].minor.yy172 = NULL; } break; case 208: /* like_pattern_opt ::= LIKE NK_STRING */ -{ yymsp[-1].minor.yy636 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } +{ yymsp[-1].minor.yy172 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } break; case 209: /* table_name_cond ::= table_name */ -{ yylhsminor.yy636 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy53); } - yymsp[0].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy172 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy105); } + yymsp[0].minor.yy172 = yylhsminor.yy172; break; case 211: /* from_db_opt ::= FROM db_name */ -{ yymsp[-1].minor.yy636 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy53); } +{ yymsp[-1].minor.yy172 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy105); } break; case 214: /* func_name ::= function_name */ -{ yylhsminor.yy636 = createFunctionNode(pCxt, &yymsp[0].minor.yy53, NULL); } - yymsp[0].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy172 = createFunctionNode(pCxt, &yymsp[0].minor.yy105, NULL); } + yymsp[0].minor.yy172 = yylhsminor.yy172; break; case 215: /* cmd ::= CREATE SMA INDEX not_exists_opt index_name ON table_name index_options */ -{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_SMA, yymsp[-4].minor.yy603, &yymsp[-3].minor.yy53, &yymsp[-1].minor.yy53, NULL, yymsp[0].minor.yy636); } +{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_SMA, yymsp[-4].minor.yy617, &yymsp[-3].minor.yy105, &yymsp[-1].minor.yy105, NULL, yymsp[0].minor.yy172); } break; case 216: /* cmd ::= CREATE FULLTEXT INDEX not_exists_opt index_name ON table_name NK_LP col_name_list NK_RP */ -{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_FULLTEXT, yymsp[-6].minor.yy603, &yymsp[-5].minor.yy53, &yymsp[-3].minor.yy53, yymsp[-1].minor.yy236, NULL); } +{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_FULLTEXT, yymsp[-6].minor.yy617, &yymsp[-5].minor.yy105, &yymsp[-3].minor.yy105, yymsp[-1].minor.yy60, NULL); } break; case 217: /* cmd ::= DROP INDEX exists_opt index_name ON table_name */ -{ pCxt->pRootNode = createDropIndexStmt(pCxt, yymsp[-3].minor.yy603, &yymsp[-2].minor.yy53, &yymsp[0].minor.yy53); } +{ pCxt->pRootNode = createDropIndexStmt(pCxt, yymsp[-3].minor.yy617, &yymsp[-2].minor.yy105, &yymsp[0].minor.yy105); } break; case 219: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt */ -{ yymsp[-8].minor.yy636 = createIndexOption(pCxt, yymsp[-6].minor.yy236, releaseRawExprNode(pCxt, yymsp[-2].minor.yy636), NULL, yymsp[0].minor.yy636); } +{ yymsp[-8].minor.yy172 = createIndexOption(pCxt, yymsp[-6].minor.yy60, releaseRawExprNode(pCxt, yymsp[-2].minor.yy172), NULL, yymsp[0].minor.yy172); } break; case 220: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt */ -{ yymsp[-10].minor.yy636 = createIndexOption(pCxt, yymsp[-8].minor.yy236, releaseRawExprNode(pCxt, yymsp[-4].minor.yy636), releaseRawExprNode(pCxt, yymsp[-2].minor.yy636), yymsp[0].minor.yy636); } +{ yymsp[-10].minor.yy172 = createIndexOption(pCxt, yymsp[-8].minor.yy60, releaseRawExprNode(pCxt, yymsp[-4].minor.yy172), releaseRawExprNode(pCxt, yymsp[-2].minor.yy172), yymsp[0].minor.yy172); } break; case 223: /* func ::= function_name NK_LP expression_list NK_RP */ -{ yylhsminor.yy636 = createFunctionNode(pCxt, &yymsp[-3].minor.yy53, yymsp[-1].minor.yy236); } - yymsp[-3].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy172 = createFunctionNode(pCxt, &yymsp[-3].minor.yy105, yymsp[-1].minor.yy60); } + yymsp[-3].minor.yy172 = yylhsminor.yy172; break; - case 224: /* cmd ::= CREATE TOPIC not_exists_opt topic_name topic_options AS query_expression */ -{ pCxt->pRootNode = createCreateTopicStmt(pCxt, yymsp[-4].minor.yy603, &yymsp[-3].minor.yy53, yymsp[0].minor.yy636, NULL, yymsp[-2].minor.yy636); } + case 224: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_expression */ +{ pCxt->pRootNode = createCreateTopicStmt(pCxt, yymsp[-3].minor.yy617, &yymsp[-2].minor.yy105, yymsp[0].minor.yy172, NULL, NULL); } break; - case 225: /* cmd ::= CREATE TOPIC not_exists_opt topic_name topic_options AS db_name */ -{ pCxt->pRootNode = createCreateTopicStmt(pCxt, yymsp[-4].minor.yy603, &yymsp[-3].minor.yy53, NULL, &yymsp[0].minor.yy53, yymsp[-2].minor.yy636); } + case 225: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name */ +{ pCxt->pRootNode = createCreateTopicStmt(pCxt, yymsp[-4].minor.yy617, &yymsp[-3].minor.yy105, NULL, &yymsp[0].minor.yy105, NULL); } break; - case 226: /* cmd ::= DROP TOPIC exists_opt topic_name */ -{ pCxt->pRootNode = createDropTopicStmt(pCxt, yymsp[-1].minor.yy603, &yymsp[0].minor.yy53); } + case 226: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name */ +{ pCxt->pRootNode = createCreateTopicStmt(pCxt, yymsp[-4].minor.yy617, &yymsp[-3].minor.yy105, NULL, NULL, yymsp[0].minor.yy172); } break; - case 227: /* cmd ::= DROP CGROUP exists_opt cgroup_name ON topic_name */ -{ pCxt->pRootNode = createDropCGroupStmt(pCxt, yymsp[-3].minor.yy603, &yymsp[-2].minor.yy53, &yymsp[0].minor.yy53); } + case 227: /* cmd ::= DROP TOPIC exists_opt topic_name */ +{ pCxt->pRootNode = createDropTopicStmt(pCxt, yymsp[-1].minor.yy617, &yymsp[0].minor.yy105); } break; - case 228: /* topic_options ::= */ -{ yymsp[1].minor.yy636 = createTopicOptions(pCxt); } + case 228: /* cmd ::= DROP CGROUP exists_opt cgroup_name ON topic_name */ +{ pCxt->pRootNode = createDropCGroupStmt(pCxt, yymsp[-3].minor.yy617, &yymsp[-2].minor.yy105, &yymsp[0].minor.yy105); } break; - case 229: /* topic_options ::= topic_options WITH TABLE */ -{ ((STopicOptions*)yymsp[-2].minor.yy636)->withTable = true; yylhsminor.yy636 = yymsp[-2].minor.yy636; } - yymsp[-2].minor.yy636 = yylhsminor.yy636; + case 229: /* cmd ::= DESC full_table_name */ + case 230: /* cmd ::= DESCRIBE full_table_name */ yytestcase(yyruleno==230); +{ pCxt->pRootNode = createDescribeStmt(pCxt, yymsp[0].minor.yy172); } break; - case 230: /* topic_options ::= topic_options WITH SCHEMA */ -{ ((STopicOptions*)yymsp[-2].minor.yy636)->withSchema = true; yylhsminor.yy636 = yymsp[-2].minor.yy636; } - yymsp[-2].minor.yy636 = yylhsminor.yy636; - break; - case 231: /* topic_options ::= topic_options WITH TAG */ -{ ((STopicOptions*)yymsp[-2].minor.yy636)->withTag = true; yylhsminor.yy636 = yymsp[-2].minor.yy636; } - yymsp[-2].minor.yy636 = yylhsminor.yy636; - break; - case 232: /* cmd ::= DESC full_table_name */ - case 233: /* cmd ::= DESCRIBE full_table_name */ yytestcase(yyruleno==233); -{ pCxt->pRootNode = createDescribeStmt(pCxt, yymsp[0].minor.yy636); } - break; - case 234: /* cmd ::= RESET QUERY CACHE */ + case 231: /* cmd ::= RESET QUERY CACHE */ { pCxt->pRootNode = createResetQueryCacheStmt(pCxt); } break; - case 235: /* cmd ::= EXPLAIN analyze_opt explain_options query_expression */ -{ pCxt->pRootNode = createExplainStmt(pCxt, yymsp[-2].minor.yy603, yymsp[-1].minor.yy636, yymsp[0].minor.yy636); } + case 232: /* cmd ::= EXPLAIN analyze_opt explain_options query_expression */ +{ pCxt->pRootNode = createExplainStmt(pCxt, yymsp[-2].minor.yy617, yymsp[-1].minor.yy172, yymsp[0].minor.yy172); } break; - case 237: /* analyze_opt ::= ANALYZE */ - case 245: /* agg_func_opt ::= AGGREGATE */ yytestcase(yyruleno==245); - case 393: /* set_quantifier_opt ::= DISTINCT */ yytestcase(yyruleno==393); -{ yymsp[0].minor.yy603 = true; } + case 234: /* analyze_opt ::= ANALYZE */ + case 242: /* agg_func_opt ::= AGGREGATE */ yytestcase(yyruleno==242); + case 390: /* set_quantifier_opt ::= DISTINCT */ yytestcase(yyruleno==390); +{ yymsp[0].minor.yy617 = true; } break; - case 238: /* explain_options ::= */ -{ yymsp[1].minor.yy636 = createDefaultExplainOptions(pCxt); } + case 235: /* explain_options ::= */ +{ yymsp[1].minor.yy172 = createDefaultExplainOptions(pCxt); } break; - case 239: /* explain_options ::= explain_options VERBOSE NK_BOOL */ -{ yylhsminor.yy636 = setExplainVerbose(pCxt, yymsp[-2].minor.yy636, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; + case 236: /* explain_options ::= explain_options VERBOSE NK_BOOL */ +{ yylhsminor.yy172 = setExplainVerbose(pCxt, yymsp[-2].minor.yy172, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy172 = yylhsminor.yy172; break; - case 240: /* explain_options ::= explain_options RATIO NK_FLOAT */ -{ yylhsminor.yy636 = setExplainRatio(pCxt, yymsp[-2].minor.yy636, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; + case 237: /* explain_options ::= explain_options RATIO NK_FLOAT */ +{ yylhsminor.yy172 = setExplainRatio(pCxt, yymsp[-2].minor.yy172, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy172 = yylhsminor.yy172; break; - case 241: /* cmd ::= COMPACT VNODES IN NK_LP integer_list NK_RP */ -{ pCxt->pRootNode = createCompactStmt(pCxt, yymsp[-1].minor.yy236); } + case 238: /* cmd ::= COMPACT VNODES IN NK_LP integer_list NK_RP */ +{ pCxt->pRootNode = createCompactStmt(pCxt, yymsp[-1].minor.yy60); } break; - case 242: /* cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt */ -{ pCxt->pRootNode = createCreateFunctionStmt(pCxt, yymsp[-6].minor.yy603, yymsp[-8].minor.yy603, &yymsp[-5].minor.yy53, &yymsp[-3].minor.yy0, yymsp[-1].minor.yy450, yymsp[0].minor.yy158); } + case 239: /* cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt */ +{ pCxt->pRootNode = createCreateFunctionStmt(pCxt, yymsp[-6].minor.yy617, yymsp[-8].minor.yy617, &yymsp[-5].minor.yy105, &yymsp[-3].minor.yy0, yymsp[-1].minor.yy248, yymsp[0].minor.yy140); } break; - case 243: /* cmd ::= DROP FUNCTION exists_opt function_name */ -{ pCxt->pRootNode = createDropFunctionStmt(pCxt, yymsp[-1].minor.yy603, &yymsp[0].minor.yy53); } + case 240: /* cmd ::= DROP FUNCTION exists_opt function_name */ +{ pCxt->pRootNode = createDropFunctionStmt(pCxt, yymsp[-1].minor.yy617, &yymsp[0].minor.yy105); } break; - case 246: /* bufsize_opt ::= */ -{ yymsp[1].minor.yy158 = 0; } + case 243: /* bufsize_opt ::= */ +{ yymsp[1].minor.yy140 = 0; } break; - case 247: /* bufsize_opt ::= BUFSIZE NK_INTEGER */ -{ yymsp[-1].minor.yy158 = taosStr2Int32(yymsp[0].minor.yy0.z, NULL, 10); } + case 244: /* bufsize_opt ::= BUFSIZE NK_INTEGER */ +{ yymsp[-1].minor.yy140 = taosStr2Int32(yymsp[0].minor.yy0.z, NULL, 10); } break; - case 248: /* cmd ::= CREATE STREAM not_exists_opt stream_name stream_options into_opt AS query_expression */ -{ pCxt->pRootNode = createCreateStreamStmt(pCxt, yymsp[-5].minor.yy603, &yymsp[-4].minor.yy53, yymsp[-2].minor.yy636, yymsp[-3].minor.yy636, yymsp[0].minor.yy636); } + case 245: /* cmd ::= CREATE STREAM not_exists_opt stream_name stream_options into_opt AS query_expression */ +{ pCxt->pRootNode = createCreateStreamStmt(pCxt, yymsp[-5].minor.yy617, &yymsp[-4].minor.yy105, yymsp[-2].minor.yy172, yymsp[-3].minor.yy172, yymsp[0].minor.yy172); } break; - case 249: /* cmd ::= DROP STREAM exists_opt stream_name */ -{ pCxt->pRootNode = createDropStreamStmt(pCxt, yymsp[-1].minor.yy603, &yymsp[0].minor.yy53); } + case 246: /* cmd ::= DROP STREAM exists_opt stream_name */ +{ pCxt->pRootNode = createDropStreamStmt(pCxt, yymsp[-1].minor.yy617, &yymsp[0].minor.yy105); } break; - case 251: /* into_opt ::= INTO full_table_name */ - case 374: /* from_clause ::= FROM table_reference_list */ yytestcase(yyruleno==374); - case 404: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==404); - case 427: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==427); -{ yymsp[-1].minor.yy636 = yymsp[0].minor.yy636; } + case 248: /* into_opt ::= INTO full_table_name */ + case 371: /* from_clause ::= FROM table_reference_list */ yytestcase(yyruleno==371); + case 401: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==401); + case 424: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==424); +{ yymsp[-1].minor.yy172 = yymsp[0].minor.yy172; } break; - case 252: /* stream_options ::= */ -{ yymsp[1].minor.yy636 = createStreamOptions(pCxt); } + case 249: /* stream_options ::= */ +{ yymsp[1].minor.yy172 = createStreamOptions(pCxt); } break; - case 253: /* stream_options ::= stream_options TRIGGER AT_ONCE */ -{ ((SStreamOptions*)yymsp[-2].minor.yy636)->triggerType = STREAM_TRIGGER_AT_ONCE; yylhsminor.yy636 = yymsp[-2].minor.yy636; } - yymsp[-2].minor.yy636 = yylhsminor.yy636; + case 250: /* stream_options ::= stream_options TRIGGER AT_ONCE */ +{ ((SStreamOptions*)yymsp[-2].minor.yy172)->triggerType = STREAM_TRIGGER_AT_ONCE; yylhsminor.yy172 = yymsp[-2].minor.yy172; } + yymsp[-2].minor.yy172 = yylhsminor.yy172; break; - case 254: /* stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ -{ ((SStreamOptions*)yymsp[-2].minor.yy636)->triggerType = STREAM_TRIGGER_WINDOW_CLOSE; yylhsminor.yy636 = yymsp[-2].minor.yy636; } - yymsp[-2].minor.yy636 = yylhsminor.yy636; + case 251: /* stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ +{ ((SStreamOptions*)yymsp[-2].minor.yy172)->triggerType = STREAM_TRIGGER_WINDOW_CLOSE; yylhsminor.yy172 = yymsp[-2].minor.yy172; } + yymsp[-2].minor.yy172 = yylhsminor.yy172; break; - case 255: /* stream_options ::= stream_options WATERMARK duration_literal */ -{ ((SStreamOptions*)yymsp[-2].minor.yy636)->pWatermark = releaseRawExprNode(pCxt, yymsp[0].minor.yy636); yylhsminor.yy636 = yymsp[-2].minor.yy636; } - yymsp[-2].minor.yy636 = yylhsminor.yy636; + case 252: /* stream_options ::= stream_options WATERMARK duration_literal */ +{ ((SStreamOptions*)yymsp[-2].minor.yy172)->pWatermark = releaseRawExprNode(pCxt, yymsp[0].minor.yy172); yylhsminor.yy172 = yymsp[-2].minor.yy172; } + yymsp[-2].minor.yy172 = yylhsminor.yy172; break; - case 256: /* cmd ::= KILL CONNECTION NK_INTEGER */ + case 253: /* cmd ::= KILL CONNECTION NK_INTEGER */ { pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_CONNECTION_STMT, &yymsp[0].minor.yy0); } break; - case 257: /* cmd ::= KILL QUERY NK_INTEGER */ + case 254: /* cmd ::= KILL QUERY NK_INTEGER */ { pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_QUERY_STMT, &yymsp[0].minor.yy0); } break; - case 258: /* cmd ::= KILL TRANSACTION NK_INTEGER */ + case 255: /* cmd ::= KILL TRANSACTION NK_INTEGER */ { pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_TRANSACTION_STMT, &yymsp[0].minor.yy0); } break; - case 259: /* cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ + case 256: /* cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ { pCxt->pRootNode = createMergeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } break; - case 260: /* cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ -{ pCxt->pRootNode = createRedistributeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy236); } + case 257: /* cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ +{ pCxt->pRootNode = createRedistributeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy60); } break; - case 261: /* cmd ::= SPLIT VGROUP NK_INTEGER */ + case 258: /* cmd ::= SPLIT VGROUP NK_INTEGER */ { pCxt->pRootNode = createSplitVgroupStmt(pCxt, &yymsp[0].minor.yy0); } break; - case 262: /* dnode_list ::= DNODE NK_INTEGER */ -{ yymsp[-1].minor.yy236 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } + case 259: /* dnode_list ::= DNODE NK_INTEGER */ +{ yymsp[-1].minor.yy60 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } break; - case 264: /* cmd ::= SYNCDB db_name REPLICA */ -{ pCxt->pRootNode = createSyncdbStmt(pCxt, &yymsp[-1].minor.yy53); } + case 261: /* cmd ::= SYNCDB db_name REPLICA */ +{ pCxt->pRootNode = createSyncdbStmt(pCxt, &yymsp[-1].minor.yy105); } break; - case 266: /* literal ::= NK_INTEGER */ -{ yylhsminor.yy636 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy636 = yylhsminor.yy636; + case 263: /* literal ::= NK_INTEGER */ +{ yylhsminor.yy172 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy172 = yylhsminor.yy172; break; - case 267: /* literal ::= NK_FLOAT */ -{ yylhsminor.yy636 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy636 = yylhsminor.yy636; + case 264: /* literal ::= NK_FLOAT */ +{ yylhsminor.yy172 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy172 = yylhsminor.yy172; break; - case 268: /* literal ::= NK_STRING */ -{ yylhsminor.yy636 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy636 = yylhsminor.yy636; + case 265: /* literal ::= NK_STRING */ +{ yylhsminor.yy172 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy172 = yylhsminor.yy172; break; - case 269: /* literal ::= NK_BOOL */ -{ yylhsminor.yy636 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy636 = yylhsminor.yy636; + case 266: /* literal ::= NK_BOOL */ +{ yylhsminor.yy172 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy172 = yylhsminor.yy172; break; - case 270: /* literal ::= TIMESTAMP NK_STRING */ -{ yylhsminor.yy636 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0)); } - yymsp[-1].minor.yy636 = yylhsminor.yy636; + case 267: /* literal ::= TIMESTAMP NK_STRING */ +{ yylhsminor.yy172 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0)); } + yymsp[-1].minor.yy172 = yylhsminor.yy172; break; - case 271: /* literal ::= duration_literal */ - case 281: /* signed_literal ::= signed */ yytestcase(yyruleno==281); - case 301: /* expression ::= literal */ yytestcase(yyruleno==301); - case 302: /* expression ::= pseudo_column */ yytestcase(yyruleno==302); - case 303: /* expression ::= column_reference */ yytestcase(yyruleno==303); - case 304: /* expression ::= function_expression */ yytestcase(yyruleno==304); - case 305: /* expression ::= subquery */ yytestcase(yyruleno==305); - case 330: /* function_expression ::= literal_func */ yytestcase(yyruleno==330); - case 366: /* boolean_value_expression ::= boolean_primary */ yytestcase(yyruleno==366); - case 370: /* boolean_primary ::= predicate */ yytestcase(yyruleno==370); - case 372: /* common_expression ::= expression */ yytestcase(yyruleno==372); - case 373: /* common_expression ::= boolean_value_expression */ yytestcase(yyruleno==373); - case 375: /* table_reference_list ::= table_reference */ yytestcase(yyruleno==375); - case 377: /* table_reference ::= table_primary */ yytestcase(yyruleno==377); - case 378: /* table_reference ::= joined_table */ yytestcase(yyruleno==378); - case 382: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==382); - case 429: /* query_expression_body ::= query_primary */ yytestcase(yyruleno==429); - case 432: /* query_primary ::= query_specification */ yytestcase(yyruleno==432); -{ yylhsminor.yy636 = yymsp[0].minor.yy636; } - yymsp[0].minor.yy636 = yylhsminor.yy636; + case 268: /* literal ::= duration_literal */ + case 278: /* signed_literal ::= signed */ yytestcase(yyruleno==278); + case 298: /* expression ::= literal */ yytestcase(yyruleno==298); + case 299: /* expression ::= pseudo_column */ yytestcase(yyruleno==299); + case 300: /* expression ::= column_reference */ yytestcase(yyruleno==300); + case 301: /* expression ::= function_expression */ yytestcase(yyruleno==301); + case 302: /* expression ::= subquery */ yytestcase(yyruleno==302); + case 327: /* function_expression ::= literal_func */ yytestcase(yyruleno==327); + case 363: /* boolean_value_expression ::= boolean_primary */ yytestcase(yyruleno==363); + case 367: /* boolean_primary ::= predicate */ yytestcase(yyruleno==367); + case 369: /* common_expression ::= expression */ yytestcase(yyruleno==369); + case 370: /* common_expression ::= boolean_value_expression */ yytestcase(yyruleno==370); + case 372: /* table_reference_list ::= table_reference */ yytestcase(yyruleno==372); + case 374: /* table_reference ::= table_primary */ yytestcase(yyruleno==374); + case 375: /* table_reference ::= joined_table */ yytestcase(yyruleno==375); + case 379: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==379); + case 426: /* query_expression_body ::= query_primary */ yytestcase(yyruleno==426); + case 429: /* query_primary ::= query_specification */ yytestcase(yyruleno==429); +{ yylhsminor.yy172 = yymsp[0].minor.yy172; } + yymsp[0].minor.yy172 = yylhsminor.yy172; break; - case 272: /* literal ::= NULL */ -{ yylhsminor.yy636 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy636 = yylhsminor.yy636; + case 269: /* literal ::= NULL */ +{ yylhsminor.yy172 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy172 = yylhsminor.yy172; break; - case 273: /* literal ::= NK_QUESTION */ -{ yylhsminor.yy636 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy636 = yylhsminor.yy636; + case 270: /* literal ::= NK_QUESTION */ +{ yylhsminor.yy172 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy172 = yylhsminor.yy172; break; - case 274: /* duration_literal ::= NK_VARIABLE */ -{ yylhsminor.yy636 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy636 = yylhsminor.yy636; + case 271: /* duration_literal ::= NK_VARIABLE */ +{ yylhsminor.yy172 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy172 = yylhsminor.yy172; break; - case 275: /* signed ::= NK_INTEGER */ -{ yylhsminor.yy636 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy636 = yylhsminor.yy636; + case 272: /* signed ::= NK_INTEGER */ +{ yylhsminor.yy172 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy172 = yylhsminor.yy172; break; - case 276: /* signed ::= NK_PLUS NK_INTEGER */ -{ yymsp[-1].minor.yy636 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } + case 273: /* signed ::= NK_PLUS NK_INTEGER */ +{ yymsp[-1].minor.yy172 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } break; - case 277: /* signed ::= NK_MINUS NK_INTEGER */ + case 274: /* 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.yy636 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &t); + yylhsminor.yy172 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &t); } - yymsp[-1].minor.yy636 = yylhsminor.yy636; + yymsp[-1].minor.yy172 = yylhsminor.yy172; break; - case 278: /* signed ::= NK_FLOAT */ -{ yylhsminor.yy636 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy636 = yylhsminor.yy636; + case 275: /* signed ::= NK_FLOAT */ +{ yylhsminor.yy172 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy172 = yylhsminor.yy172; break; - case 279: /* signed ::= NK_PLUS NK_FLOAT */ -{ yymsp[-1].minor.yy636 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } + case 276: /* signed ::= NK_PLUS NK_FLOAT */ +{ yymsp[-1].minor.yy172 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } break; - case 280: /* signed ::= NK_MINUS NK_FLOAT */ + case 277: /* 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.yy636 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &t); + yylhsminor.yy172 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &t); } - yymsp[-1].minor.yy636 = yylhsminor.yy636; + yymsp[-1].minor.yy172 = yylhsminor.yy172; break; - case 282: /* signed_literal ::= NK_STRING */ -{ yylhsminor.yy636 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy636 = yylhsminor.yy636; + case 279: /* signed_literal ::= NK_STRING */ +{ yylhsminor.yy172 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy172 = yylhsminor.yy172; break; - case 283: /* signed_literal ::= NK_BOOL */ -{ yylhsminor.yy636 = createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy636 = yylhsminor.yy636; + case 280: /* signed_literal ::= NK_BOOL */ +{ yylhsminor.yy172 = createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy172 = yylhsminor.yy172; break; - case 284: /* signed_literal ::= TIMESTAMP NK_STRING */ -{ yymsp[-1].minor.yy636 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } + case 281: /* signed_literal ::= TIMESTAMP NK_STRING */ +{ yymsp[-1].minor.yy172 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } break; - case 285: /* signed_literal ::= duration_literal */ - case 287: /* signed_literal ::= literal_func */ yytestcase(yyruleno==287); - case 344: /* star_func_para ::= expression */ yytestcase(yyruleno==344); - case 399: /* select_item ::= common_expression */ yytestcase(yyruleno==399); - case 445: /* search_condition ::= common_expression */ yytestcase(yyruleno==445); -{ yylhsminor.yy636 = releaseRawExprNode(pCxt, yymsp[0].minor.yy636); } - yymsp[0].minor.yy636 = yylhsminor.yy636; + case 282: /* signed_literal ::= duration_literal */ + case 284: /* signed_literal ::= literal_func */ yytestcase(yyruleno==284); + case 341: /* star_func_para ::= expression */ yytestcase(yyruleno==341); + case 396: /* select_item ::= common_expression */ yytestcase(yyruleno==396); + case 442: /* search_condition ::= common_expression */ yytestcase(yyruleno==442); +{ yylhsminor.yy172 = releaseRawExprNode(pCxt, yymsp[0].minor.yy172); } + yymsp[0].minor.yy172 = yylhsminor.yy172; break; - case 286: /* signed_literal ::= NULL */ -{ yylhsminor.yy636 = createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy636 = yylhsminor.yy636; + case 283: /* signed_literal ::= NULL */ +{ yylhsminor.yy172 = createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy172 = yylhsminor.yy172; break; - case 306: /* expression ::= NK_LP expression NK_RP */ - case 371: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==371); -{ yylhsminor.yy636 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy636)); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; + case 303: /* expression ::= NK_LP expression NK_RP */ + case 368: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==368); +{ yylhsminor.yy172 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy172)); } + yymsp[-2].minor.yy172 = yylhsminor.yy172; break; - case 307: /* expression ::= NK_PLUS expression */ + case 304: /* expression ::= NK_PLUS expression */ { - SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy636); - yylhsminor.yy636 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, releaseRawExprNode(pCxt, yymsp[0].minor.yy636)); + SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy172); + yylhsminor.yy172 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, releaseRawExprNode(pCxt, yymsp[0].minor.yy172)); } - yymsp[-1].minor.yy636 = yylhsminor.yy636; + yymsp[-1].minor.yy172 = yylhsminor.yy172; break; - case 308: /* expression ::= NK_MINUS expression */ + case 305: /* expression ::= NK_MINUS expression */ { - SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy636); - yylhsminor.yy636 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, createOperatorNode(pCxt, OP_TYPE_MINUS, releaseRawExprNode(pCxt, yymsp[0].minor.yy636), NULL)); + SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy172); + yylhsminor.yy172 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, createOperatorNode(pCxt, OP_TYPE_MINUS, releaseRawExprNode(pCxt, yymsp[0].minor.yy172), NULL)); } - yymsp[-1].minor.yy636 = yylhsminor.yy636; + yymsp[-1].minor.yy172 = yylhsminor.yy172; break; - case 309: /* expression ::= expression NK_PLUS expression */ + case 306: /* expression ::= expression NK_PLUS expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy636); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy636); - yylhsminor.yy636 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_ADD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy636), releaseRawExprNode(pCxt, yymsp[0].minor.yy636))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy172); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy172); + yylhsminor.yy172 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_ADD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy172), releaseRawExprNode(pCxt, yymsp[0].minor.yy172))); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; + yymsp[-2].minor.yy172 = yylhsminor.yy172; break; - case 310: /* expression ::= expression NK_MINUS expression */ + case 307: /* expression ::= expression NK_MINUS expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy636); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy636); - yylhsminor.yy636 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[-2].minor.yy636), releaseRawExprNode(pCxt, yymsp[0].minor.yy636))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy172); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy172); + yylhsminor.yy172 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[-2].minor.yy172), releaseRawExprNode(pCxt, yymsp[0].minor.yy172))); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; + yymsp[-2].minor.yy172 = yylhsminor.yy172; break; - case 311: /* expression ::= expression NK_STAR expression */ + case 308: /* expression ::= expression NK_STAR expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy636); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy636); - yylhsminor.yy636 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MULTI, releaseRawExprNode(pCxt, yymsp[-2].minor.yy636), releaseRawExprNode(pCxt, yymsp[0].minor.yy636))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy172); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy172); + yylhsminor.yy172 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MULTI, releaseRawExprNode(pCxt, yymsp[-2].minor.yy172), releaseRawExprNode(pCxt, yymsp[0].minor.yy172))); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; + yymsp[-2].minor.yy172 = yylhsminor.yy172; break; - case 312: /* expression ::= expression NK_SLASH expression */ + case 309: /* expression ::= expression NK_SLASH expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy636); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy636); - yylhsminor.yy636 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_DIV, releaseRawExprNode(pCxt, yymsp[-2].minor.yy636), releaseRawExprNode(pCxt, yymsp[0].minor.yy636))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy172); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy172); + yylhsminor.yy172 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_DIV, releaseRawExprNode(pCxt, yymsp[-2].minor.yy172), releaseRawExprNode(pCxt, yymsp[0].minor.yy172))); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; + yymsp[-2].minor.yy172 = yylhsminor.yy172; break; - case 313: /* expression ::= expression NK_REM expression */ + case 310: /* expression ::= expression NK_REM expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy636); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy636); - yylhsminor.yy636 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MOD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy636), releaseRawExprNode(pCxt, yymsp[0].minor.yy636))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy172); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy172); + yylhsminor.yy172 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MOD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy172), releaseRawExprNode(pCxt, yymsp[0].minor.yy172))); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; + yymsp[-2].minor.yy172 = yylhsminor.yy172; break; - case 314: /* expression ::= column_reference NK_ARROW NK_STRING */ + case 311: /* expression ::= column_reference NK_ARROW NK_STRING */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy636); - yylhsminor.yy636 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_JSON_GET_VALUE, releaseRawExprNode(pCxt, yymsp[-2].minor.yy636), createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy172); + yylhsminor.yy172 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_JSON_GET_VALUE, releaseRawExprNode(pCxt, yymsp[-2].minor.yy172), createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0))); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; + yymsp[-2].minor.yy172 = yylhsminor.yy172; break; - case 315: /* expression_list ::= expression */ -{ yylhsminor.yy236 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy636)); } - yymsp[0].minor.yy236 = yylhsminor.yy236; + case 312: /* expression_list ::= expression */ +{ yylhsminor.yy60 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy172)); } + yymsp[0].minor.yy60 = yylhsminor.yy60; break; - case 316: /* expression_list ::= expression_list NK_COMMA expression */ -{ yylhsminor.yy236 = addNodeToList(pCxt, yymsp[-2].minor.yy236, releaseRawExprNode(pCxt, yymsp[0].minor.yy636)); } - yymsp[-2].minor.yy236 = yylhsminor.yy236; + case 313: /* expression_list ::= expression_list NK_COMMA expression */ +{ yylhsminor.yy60 = addNodeToList(pCxt, yymsp[-2].minor.yy60, releaseRawExprNode(pCxt, yymsp[0].minor.yy172)); } + yymsp[-2].minor.yy60 = yylhsminor.yy60; break; - case 317: /* column_reference ::= column_name */ -{ yylhsminor.yy636 = createRawExprNode(pCxt, &yymsp[0].minor.yy53, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy53)); } - yymsp[0].minor.yy636 = yylhsminor.yy636; + case 314: /* column_reference ::= column_name */ +{ yylhsminor.yy172 = createRawExprNode(pCxt, &yymsp[0].minor.yy105, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy105)); } + yymsp[0].minor.yy172 = yylhsminor.yy172; break; - case 318: /* column_reference ::= table_name NK_DOT column_name */ -{ yylhsminor.yy636 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy53, &yymsp[0].minor.yy53, createColumnNode(pCxt, &yymsp[-2].minor.yy53, &yymsp[0].minor.yy53)); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; + case 315: /* column_reference ::= table_name NK_DOT column_name */ +{ yylhsminor.yy172 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy105, &yymsp[0].minor.yy105, createColumnNode(pCxt, &yymsp[-2].minor.yy105, &yymsp[0].minor.yy105)); } + yymsp[-2].minor.yy172 = yylhsminor.yy172; break; - case 319: /* pseudo_column ::= ROWTS */ - case 320: /* pseudo_column ::= TBNAME */ yytestcase(yyruleno==320); - case 322: /* pseudo_column ::= QSTARTTS */ yytestcase(yyruleno==322); - case 323: /* pseudo_column ::= QENDTS */ yytestcase(yyruleno==323); - case 324: /* pseudo_column ::= WSTARTTS */ yytestcase(yyruleno==324); - case 325: /* pseudo_column ::= WENDTS */ yytestcase(yyruleno==325); - case 326: /* pseudo_column ::= WDURATION */ yytestcase(yyruleno==326); - case 332: /* literal_func ::= NOW */ yytestcase(yyruleno==332); -{ yylhsminor.yy636 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL)); } - yymsp[0].minor.yy636 = yylhsminor.yy636; + case 316: /* pseudo_column ::= ROWTS */ + case 317: /* pseudo_column ::= TBNAME */ yytestcase(yyruleno==317); + case 319: /* pseudo_column ::= QSTARTTS */ yytestcase(yyruleno==319); + case 320: /* pseudo_column ::= QENDTS */ yytestcase(yyruleno==320); + case 321: /* pseudo_column ::= WSTARTTS */ yytestcase(yyruleno==321); + case 322: /* pseudo_column ::= WENDTS */ yytestcase(yyruleno==322); + case 323: /* pseudo_column ::= WDURATION */ yytestcase(yyruleno==323); + case 329: /* literal_func ::= NOW */ yytestcase(yyruleno==329); +{ yylhsminor.yy172 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL)); } + yymsp[0].minor.yy172 = yylhsminor.yy172; break; - case 321: /* pseudo_column ::= table_name NK_DOT TBNAME */ -{ yylhsminor.yy636 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy53, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-2].minor.yy53)))); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; + case 318: /* pseudo_column ::= table_name NK_DOT TBNAME */ +{ yylhsminor.yy172 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy105, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-2].minor.yy105)))); } + yymsp[-2].minor.yy172 = yylhsminor.yy172; break; - case 327: /* function_expression ::= function_name NK_LP expression_list NK_RP */ - case 328: /* function_expression ::= star_func NK_LP star_func_para_list NK_RP */ yytestcase(yyruleno==328); -{ yylhsminor.yy636 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy53, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy53, yymsp[-1].minor.yy236)); } - yymsp[-3].minor.yy636 = yylhsminor.yy636; + case 324: /* function_expression ::= function_name NK_LP expression_list NK_RP */ + case 325: /* function_expression ::= star_func NK_LP star_func_para_list NK_RP */ yytestcase(yyruleno==325); +{ yylhsminor.yy172 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy105, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy105, yymsp[-1].minor.yy60)); } + yymsp[-3].minor.yy172 = yylhsminor.yy172; break; - case 329: /* function_expression ::= CAST NK_LP expression AS type_name NK_RP */ -{ yylhsminor.yy636 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createCastFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy636), yymsp[-1].minor.yy450)); } - yymsp[-5].minor.yy636 = yylhsminor.yy636; + case 326: /* function_expression ::= CAST NK_LP expression AS type_name NK_RP */ +{ yylhsminor.yy172 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createCastFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy172), yymsp[-1].minor.yy248)); } + yymsp[-5].minor.yy172 = yylhsminor.yy172; break; - case 331: /* literal_func ::= noarg_func NK_LP NK_RP */ -{ yylhsminor.yy636 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy53, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-2].minor.yy53, NULL)); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; + case 328: /* literal_func ::= noarg_func NK_LP NK_RP */ +{ yylhsminor.yy172 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy105, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-2].minor.yy105, NULL)); } + yymsp[-2].minor.yy172 = yylhsminor.yy172; break; - case 340: /* star_func_para_list ::= NK_STAR */ -{ yylhsminor.yy236 = createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy236 = yylhsminor.yy236; + case 337: /* star_func_para_list ::= NK_STAR */ +{ yylhsminor.yy60 = createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy60 = yylhsminor.yy60; break; - case 345: /* star_func_para ::= table_name NK_DOT NK_STAR */ - case 402: /* select_item ::= table_name NK_DOT NK_STAR */ yytestcase(yyruleno==402); -{ yylhsminor.yy636 = createColumnNode(pCxt, &yymsp[-2].minor.yy53, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; + case 342: /* star_func_para ::= table_name NK_DOT NK_STAR */ + case 399: /* select_item ::= table_name NK_DOT NK_STAR */ yytestcase(yyruleno==399); +{ yylhsminor.yy172 = createColumnNode(pCxt, &yymsp[-2].minor.yy105, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy172 = yylhsminor.yy172; break; - case 346: /* predicate ::= expression compare_op expression */ - case 351: /* predicate ::= expression in_op in_predicate_value */ yytestcase(yyruleno==351); + case 343: /* predicate ::= expression compare_op expression */ + case 348: /* predicate ::= expression in_op in_predicate_value */ yytestcase(yyruleno==348); { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy636); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy636); - yylhsminor.yy636 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, yymsp[-1].minor.yy136, releaseRawExprNode(pCxt, yymsp[-2].minor.yy636), releaseRawExprNode(pCxt, yymsp[0].minor.yy636))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy172); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy172); + yylhsminor.yy172 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, yymsp[-1].minor.yy572, releaseRawExprNode(pCxt, yymsp[-2].minor.yy172), releaseRawExprNode(pCxt, yymsp[0].minor.yy172))); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; + yymsp[-2].minor.yy172 = yylhsminor.yy172; break; - case 347: /* predicate ::= expression BETWEEN expression AND expression */ + case 344: /* predicate ::= expression BETWEEN expression AND expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-4].minor.yy636); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy636); - yylhsminor.yy636 = createRawExprNodeExt(pCxt, &s, &e, createBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-4].minor.yy636), releaseRawExprNode(pCxt, yymsp[-2].minor.yy636), releaseRawExprNode(pCxt, yymsp[0].minor.yy636))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-4].minor.yy172); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy172); + yylhsminor.yy172 = createRawExprNodeExt(pCxt, &s, &e, createBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-4].minor.yy172), releaseRawExprNode(pCxt, yymsp[-2].minor.yy172), releaseRawExprNode(pCxt, yymsp[0].minor.yy172))); } - yymsp[-4].minor.yy636 = yylhsminor.yy636; + yymsp[-4].minor.yy172 = yylhsminor.yy172; break; - case 348: /* predicate ::= expression NOT BETWEEN expression AND expression */ + case 345: /* predicate ::= expression NOT BETWEEN expression AND expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-5].minor.yy636); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy636); - yylhsminor.yy636 = createRawExprNodeExt(pCxt, &s, &e, createNotBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy636), releaseRawExprNode(pCxt, yymsp[-2].minor.yy636), releaseRawExprNode(pCxt, yymsp[0].minor.yy636))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-5].minor.yy172); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy172); + yylhsminor.yy172 = createRawExprNodeExt(pCxt, &s, &e, createNotBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy172), releaseRawExprNode(pCxt, yymsp[-2].minor.yy172), releaseRawExprNode(pCxt, yymsp[0].minor.yy172))); } - yymsp[-5].minor.yy636 = yylhsminor.yy636; + yymsp[-5].minor.yy172 = yylhsminor.yy172; break; - case 349: /* predicate ::= expression IS NULL */ + case 346: /* predicate ::= expression IS NULL */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy636); - yylhsminor.yy636 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NULL, releaseRawExprNode(pCxt, yymsp[-2].minor.yy636), NULL)); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy172); + yylhsminor.yy172 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NULL, releaseRawExprNode(pCxt, yymsp[-2].minor.yy172), NULL)); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; + yymsp[-2].minor.yy172 = yylhsminor.yy172; break; - case 350: /* predicate ::= expression IS NOT NULL */ + case 347: /* predicate ::= expression IS NOT NULL */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-3].minor.yy636); - yylhsminor.yy636 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NOT_NULL, releaseRawExprNode(pCxt, yymsp[-3].minor.yy636), NULL)); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-3].minor.yy172); + yylhsminor.yy172 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NOT_NULL, releaseRawExprNode(pCxt, yymsp[-3].minor.yy172), NULL)); } - yymsp[-3].minor.yy636 = yylhsminor.yy636; + yymsp[-3].minor.yy172 = yylhsminor.yy172; break; - case 352: /* compare_op ::= NK_LT */ -{ yymsp[0].minor.yy136 = OP_TYPE_LOWER_THAN; } + case 349: /* compare_op ::= NK_LT */ +{ yymsp[0].minor.yy572 = OP_TYPE_LOWER_THAN; } break; - case 353: /* compare_op ::= NK_GT */ -{ yymsp[0].minor.yy136 = OP_TYPE_GREATER_THAN; } + case 350: /* compare_op ::= NK_GT */ +{ yymsp[0].minor.yy572 = OP_TYPE_GREATER_THAN; } break; - case 354: /* compare_op ::= NK_LE */ -{ yymsp[0].minor.yy136 = OP_TYPE_LOWER_EQUAL; } + case 351: /* compare_op ::= NK_LE */ +{ yymsp[0].minor.yy572 = OP_TYPE_LOWER_EQUAL; } break; - case 355: /* compare_op ::= NK_GE */ -{ yymsp[0].minor.yy136 = OP_TYPE_GREATER_EQUAL; } + case 352: /* compare_op ::= NK_GE */ +{ yymsp[0].minor.yy572 = OP_TYPE_GREATER_EQUAL; } break; - case 356: /* compare_op ::= NK_NE */ -{ yymsp[0].minor.yy136 = OP_TYPE_NOT_EQUAL; } + case 353: /* compare_op ::= NK_NE */ +{ yymsp[0].minor.yy572 = OP_TYPE_NOT_EQUAL; } break; - case 357: /* compare_op ::= NK_EQ */ -{ yymsp[0].minor.yy136 = OP_TYPE_EQUAL; } + case 354: /* compare_op ::= NK_EQ */ +{ yymsp[0].minor.yy572 = OP_TYPE_EQUAL; } break; - case 358: /* compare_op ::= LIKE */ -{ yymsp[0].minor.yy136 = OP_TYPE_LIKE; } + case 355: /* compare_op ::= LIKE */ +{ yymsp[0].minor.yy572 = OP_TYPE_LIKE; } break; - case 359: /* compare_op ::= NOT LIKE */ -{ yymsp[-1].minor.yy136 = OP_TYPE_NOT_LIKE; } + case 356: /* compare_op ::= NOT LIKE */ +{ yymsp[-1].minor.yy572 = OP_TYPE_NOT_LIKE; } break; - case 360: /* compare_op ::= MATCH */ -{ yymsp[0].minor.yy136 = OP_TYPE_MATCH; } + case 357: /* compare_op ::= MATCH */ +{ yymsp[0].minor.yy572 = OP_TYPE_MATCH; } break; - case 361: /* compare_op ::= NMATCH */ -{ yymsp[0].minor.yy136 = OP_TYPE_NMATCH; } + case 358: /* compare_op ::= NMATCH */ +{ yymsp[0].minor.yy572 = OP_TYPE_NMATCH; } break; - case 362: /* compare_op ::= CONTAINS */ -{ yymsp[0].minor.yy136 = OP_TYPE_JSON_CONTAINS; } + case 359: /* compare_op ::= CONTAINS */ +{ yymsp[0].minor.yy572 = OP_TYPE_JSON_CONTAINS; } break; - case 363: /* in_op ::= IN */ -{ yymsp[0].minor.yy136 = OP_TYPE_IN; } + case 360: /* in_op ::= IN */ +{ yymsp[0].minor.yy572 = OP_TYPE_IN; } break; - case 364: /* in_op ::= NOT IN */ -{ yymsp[-1].minor.yy136 = OP_TYPE_NOT_IN; } + case 361: /* in_op ::= NOT IN */ +{ yymsp[-1].minor.yy572 = OP_TYPE_NOT_IN; } break; - case 365: /* in_predicate_value ::= NK_LP expression_list NK_RP */ -{ yylhsminor.yy636 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createNodeListNode(pCxt, yymsp[-1].minor.yy236)); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; + case 362: /* in_predicate_value ::= NK_LP expression_list NK_RP */ +{ yylhsminor.yy172 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createNodeListNode(pCxt, yymsp[-1].minor.yy60)); } + yymsp[-2].minor.yy172 = yylhsminor.yy172; break; - case 367: /* boolean_value_expression ::= NOT boolean_primary */ + case 364: /* boolean_value_expression ::= NOT boolean_primary */ { - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy636); - yylhsminor.yy636 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_NOT, releaseRawExprNode(pCxt, yymsp[0].minor.yy636), NULL)); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy172); + yylhsminor.yy172 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_NOT, releaseRawExprNode(pCxt, yymsp[0].minor.yy172), NULL)); } - yymsp[-1].minor.yy636 = yylhsminor.yy636; + yymsp[-1].minor.yy172 = yylhsminor.yy172; break; - case 368: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ + case 365: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy636); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy636); - yylhsminor.yy636 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy636), releaseRawExprNode(pCxt, yymsp[0].minor.yy636))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy172); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy172); + yylhsminor.yy172 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy172), releaseRawExprNode(pCxt, yymsp[0].minor.yy172))); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; + yymsp[-2].minor.yy172 = yylhsminor.yy172; break; - case 369: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ + case 366: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy636); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy636); - yylhsminor.yy636 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy636), releaseRawExprNode(pCxt, yymsp[0].minor.yy636))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy172); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy172); + yylhsminor.yy172 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy172), releaseRawExprNode(pCxt, yymsp[0].minor.yy172))); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; + yymsp[-2].minor.yy172 = yylhsminor.yy172; break; - case 376: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */ -{ yylhsminor.yy636 = createJoinTableNode(pCxt, JOIN_TYPE_INNER, yymsp[-2].minor.yy636, yymsp[0].minor.yy636, NULL); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; + case 373: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */ +{ yylhsminor.yy172 = createJoinTableNode(pCxt, JOIN_TYPE_INNER, yymsp[-2].minor.yy172, yymsp[0].minor.yy172, NULL); } + yymsp[-2].minor.yy172 = yylhsminor.yy172; break; - case 379: /* table_primary ::= table_name alias_opt */ -{ yylhsminor.yy636 = createRealTableNode(pCxt, NULL, &yymsp[-1].minor.yy53, &yymsp[0].minor.yy53); } - yymsp[-1].minor.yy636 = yylhsminor.yy636; + case 376: /* table_primary ::= table_name alias_opt */ +{ yylhsminor.yy172 = createRealTableNode(pCxt, NULL, &yymsp[-1].minor.yy105, &yymsp[0].minor.yy105); } + yymsp[-1].minor.yy172 = yylhsminor.yy172; break; - case 380: /* table_primary ::= db_name NK_DOT table_name alias_opt */ -{ yylhsminor.yy636 = createRealTableNode(pCxt, &yymsp[-3].minor.yy53, &yymsp[-1].minor.yy53, &yymsp[0].minor.yy53); } - yymsp[-3].minor.yy636 = yylhsminor.yy636; + case 377: /* table_primary ::= db_name NK_DOT table_name alias_opt */ +{ yylhsminor.yy172 = createRealTableNode(pCxt, &yymsp[-3].minor.yy105, &yymsp[-1].minor.yy105, &yymsp[0].minor.yy105); } + yymsp[-3].minor.yy172 = yylhsminor.yy172; break; - case 381: /* table_primary ::= subquery alias_opt */ -{ yylhsminor.yy636 = createTempTableNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy636), &yymsp[0].minor.yy53); } - yymsp[-1].minor.yy636 = yylhsminor.yy636; + case 378: /* table_primary ::= subquery alias_opt */ +{ yylhsminor.yy172 = createTempTableNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy172), &yymsp[0].minor.yy105); } + yymsp[-1].minor.yy172 = yylhsminor.yy172; break; - case 383: /* alias_opt ::= */ -{ yymsp[1].minor.yy53 = nil_token; } + case 380: /* alias_opt ::= */ +{ yymsp[1].minor.yy105 = nil_token; } break; - case 384: /* alias_opt ::= table_alias */ -{ yylhsminor.yy53 = yymsp[0].minor.yy53; } - yymsp[0].minor.yy53 = yylhsminor.yy53; + case 381: /* alias_opt ::= table_alias */ +{ yylhsminor.yy105 = yymsp[0].minor.yy105; } + yymsp[0].minor.yy105 = yylhsminor.yy105; break; - case 385: /* alias_opt ::= AS table_alias */ -{ yymsp[-1].minor.yy53 = yymsp[0].minor.yy53; } + case 382: /* alias_opt ::= AS table_alias */ +{ yymsp[-1].minor.yy105 = yymsp[0].minor.yy105; } break; - case 386: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */ - case 387: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==387); -{ yymsp[-2].minor.yy636 = yymsp[-1].minor.yy636; } + case 383: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */ + case 384: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==384); +{ yymsp[-2].minor.yy172 = yymsp[-1].minor.yy172; } break; - case 388: /* joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ -{ yylhsminor.yy636 = createJoinTableNode(pCxt, yymsp[-4].minor.yy342, yymsp[-5].minor.yy636, yymsp[-2].minor.yy636, yymsp[0].minor.yy636); } - yymsp[-5].minor.yy636 = yylhsminor.yy636; + case 385: /* joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ +{ yylhsminor.yy172 = createJoinTableNode(pCxt, yymsp[-4].minor.yy636, yymsp[-5].minor.yy172, yymsp[-2].minor.yy172, yymsp[0].minor.yy172); } + yymsp[-5].minor.yy172 = yylhsminor.yy172; break; - case 389: /* join_type ::= */ -{ yymsp[1].minor.yy342 = JOIN_TYPE_INNER; } + case 386: /* join_type ::= */ +{ yymsp[1].minor.yy636 = JOIN_TYPE_INNER; } break; - case 390: /* join_type ::= INNER */ -{ yymsp[0].minor.yy342 = JOIN_TYPE_INNER; } + case 387: /* join_type ::= INNER */ +{ yymsp[0].minor.yy636 = JOIN_TYPE_INNER; } break; - case 391: /* query_specification ::= SELECT set_quantifier_opt select_list from_clause where_clause_opt partition_by_clause_opt twindow_clause_opt group_by_clause_opt having_clause_opt */ + case 388: /* query_specification ::= SELECT set_quantifier_opt select_list from_clause where_clause_opt partition_by_clause_opt twindow_clause_opt group_by_clause_opt having_clause_opt */ { - yymsp[-8].minor.yy636 = createSelectStmt(pCxt, yymsp[-7].minor.yy603, yymsp[-6].minor.yy236, yymsp[-5].minor.yy636); - yymsp[-8].minor.yy636 = addWhereClause(pCxt, yymsp[-8].minor.yy636, yymsp[-4].minor.yy636); - yymsp[-8].minor.yy636 = addPartitionByClause(pCxt, yymsp[-8].minor.yy636, yymsp[-3].minor.yy236); - yymsp[-8].minor.yy636 = addWindowClauseClause(pCxt, yymsp[-8].minor.yy636, yymsp[-2].minor.yy636); - yymsp[-8].minor.yy636 = addGroupByClause(pCxt, yymsp[-8].minor.yy636, yymsp[-1].minor.yy236); - yymsp[-8].minor.yy636 = addHavingClause(pCxt, yymsp[-8].minor.yy636, yymsp[0].minor.yy636); + yymsp[-8].minor.yy172 = createSelectStmt(pCxt, yymsp[-7].minor.yy617, yymsp[-6].minor.yy60, yymsp[-5].minor.yy172); + yymsp[-8].minor.yy172 = addWhereClause(pCxt, yymsp[-8].minor.yy172, yymsp[-4].minor.yy172); + yymsp[-8].minor.yy172 = addPartitionByClause(pCxt, yymsp[-8].minor.yy172, yymsp[-3].minor.yy60); + yymsp[-8].minor.yy172 = addWindowClauseClause(pCxt, yymsp[-8].minor.yy172, yymsp[-2].minor.yy172); + yymsp[-8].minor.yy172 = addGroupByClause(pCxt, yymsp[-8].minor.yy172, yymsp[-1].minor.yy60); + yymsp[-8].minor.yy172 = addHavingClause(pCxt, yymsp[-8].minor.yy172, yymsp[0].minor.yy172); } break; - case 394: /* set_quantifier_opt ::= ALL */ -{ yymsp[0].minor.yy603 = false; } + case 391: /* set_quantifier_opt ::= ALL */ +{ yymsp[0].minor.yy617 = false; } break; - case 395: /* select_list ::= NK_STAR */ -{ yymsp[0].minor.yy236 = NULL; } + case 392: /* select_list ::= NK_STAR */ +{ yymsp[0].minor.yy60 = NULL; } break; - case 400: /* select_item ::= common_expression column_alias */ -{ yylhsminor.yy636 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy636), &yymsp[0].minor.yy53); } - yymsp[-1].minor.yy636 = yylhsminor.yy636; + case 397: /* select_item ::= common_expression column_alias */ +{ yylhsminor.yy172 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy172), &yymsp[0].minor.yy105); } + yymsp[-1].minor.yy172 = yylhsminor.yy172; break; - case 401: /* select_item ::= common_expression AS column_alias */ -{ yylhsminor.yy636 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy636), &yymsp[0].minor.yy53); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; + case 398: /* select_item ::= common_expression AS column_alias */ +{ yylhsminor.yy172 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy172), &yymsp[0].minor.yy105); } + yymsp[-2].minor.yy172 = yylhsminor.yy172; break; - case 406: /* partition_by_clause_opt ::= PARTITION BY expression_list */ - case 423: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==423); - case 435: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==435); -{ yymsp[-2].minor.yy236 = yymsp[0].minor.yy236; } + case 403: /* partition_by_clause_opt ::= PARTITION BY expression_list */ + case 420: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==420); + case 432: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==432); +{ yymsp[-2].minor.yy60 = yymsp[0].minor.yy60; } break; - case 408: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ -{ yymsp[-5].minor.yy636 = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy636), releaseRawExprNode(pCxt, yymsp[-1].minor.yy636)); } + case 405: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ +{ yymsp[-5].minor.yy172 = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy172), releaseRawExprNode(pCxt, yymsp[-1].minor.yy172)); } break; - case 409: /* twindow_clause_opt ::= STATE_WINDOW NK_LP expression NK_RP */ -{ yymsp[-3].minor.yy636 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy636)); } + case 406: /* twindow_clause_opt ::= STATE_WINDOW NK_LP expression NK_RP */ +{ yymsp[-3].minor.yy172 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy172)); } break; - case 410: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ -{ yymsp[-5].minor.yy636 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy636), NULL, yymsp[-1].minor.yy636, yymsp[0].minor.yy636); } + case 407: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ +{ yymsp[-5].minor.yy172 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy172), NULL, yymsp[-1].minor.yy172, yymsp[0].minor.yy172); } break; - case 411: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ -{ yymsp[-7].minor.yy636 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy636), releaseRawExprNode(pCxt, yymsp[-3].minor.yy636), yymsp[-1].minor.yy636, yymsp[0].minor.yy636); } + case 408: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ +{ yymsp[-7].minor.yy172 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy172), releaseRawExprNode(pCxt, yymsp[-3].minor.yy172), yymsp[-1].minor.yy172, yymsp[0].minor.yy172); } break; - case 413: /* sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ -{ yymsp[-3].minor.yy636 = releaseRawExprNode(pCxt, yymsp[-1].minor.yy636); } + case 410: /* sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ +{ yymsp[-3].minor.yy172 = releaseRawExprNode(pCxt, yymsp[-1].minor.yy172); } break; - case 415: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */ -{ yymsp[-3].minor.yy636 = createFillNode(pCxt, yymsp[-1].minor.yy18, NULL); } + case 412: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */ +{ yymsp[-3].minor.yy172 = createFillNode(pCxt, yymsp[-1].minor.yy202, NULL); } break; - case 416: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */ -{ yymsp[-5].minor.yy636 = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, yymsp[-1].minor.yy236)); } + case 413: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */ +{ yymsp[-5].minor.yy172 = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, yymsp[-1].minor.yy60)); } break; - case 417: /* fill_mode ::= NONE */ -{ yymsp[0].minor.yy18 = FILL_MODE_NONE; } + case 414: /* fill_mode ::= NONE */ +{ yymsp[0].minor.yy202 = FILL_MODE_NONE; } break; - case 418: /* fill_mode ::= PREV */ -{ yymsp[0].minor.yy18 = FILL_MODE_PREV; } + case 415: /* fill_mode ::= PREV */ +{ yymsp[0].minor.yy202 = FILL_MODE_PREV; } break; - case 419: /* fill_mode ::= NULL */ -{ yymsp[0].minor.yy18 = FILL_MODE_NULL; } + case 416: /* fill_mode ::= NULL */ +{ yymsp[0].minor.yy202 = FILL_MODE_NULL; } break; - case 420: /* fill_mode ::= LINEAR */ -{ yymsp[0].minor.yy18 = FILL_MODE_LINEAR; } + case 417: /* fill_mode ::= LINEAR */ +{ yymsp[0].minor.yy202 = FILL_MODE_LINEAR; } break; - case 421: /* fill_mode ::= NEXT */ -{ yymsp[0].minor.yy18 = FILL_MODE_NEXT; } + case 418: /* fill_mode ::= NEXT */ +{ yymsp[0].minor.yy202 = FILL_MODE_NEXT; } break; - case 424: /* group_by_list ::= expression */ -{ yylhsminor.yy236 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy636))); } - yymsp[0].minor.yy236 = yylhsminor.yy236; + case 421: /* group_by_list ::= expression */ +{ yylhsminor.yy60 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy172))); } + yymsp[0].minor.yy60 = yylhsminor.yy60; break; - case 425: /* group_by_list ::= group_by_list NK_COMMA expression */ -{ yylhsminor.yy236 = addNodeToList(pCxt, yymsp[-2].minor.yy236, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy636))); } - yymsp[-2].minor.yy236 = yylhsminor.yy236; + case 422: /* group_by_list ::= group_by_list NK_COMMA expression */ +{ yylhsminor.yy60 = addNodeToList(pCxt, yymsp[-2].minor.yy60, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy172))); } + yymsp[-2].minor.yy60 = yylhsminor.yy60; break; - case 428: /* query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt */ + case 425: /* query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt */ { - yylhsminor.yy636 = addOrderByClause(pCxt, yymsp[-3].minor.yy636, yymsp[-2].minor.yy236); - yylhsminor.yy636 = addSlimitClause(pCxt, yylhsminor.yy636, yymsp[-1].minor.yy636); - yylhsminor.yy636 = addLimitClause(pCxt, yylhsminor.yy636, yymsp[0].minor.yy636); + yylhsminor.yy172 = addOrderByClause(pCxt, yymsp[-3].minor.yy172, yymsp[-2].minor.yy60); + yylhsminor.yy172 = addSlimitClause(pCxt, yylhsminor.yy172, yymsp[-1].minor.yy172); + yylhsminor.yy172 = addLimitClause(pCxt, yylhsminor.yy172, yymsp[0].minor.yy172); } - yymsp[-3].minor.yy636 = yylhsminor.yy636; + yymsp[-3].minor.yy172 = yylhsminor.yy172; break; - case 430: /* query_expression_body ::= query_expression_body UNION ALL query_expression_body */ -{ yylhsminor.yy636 = createSetOperator(pCxt, SET_OP_TYPE_UNION_ALL, yymsp[-3].minor.yy636, yymsp[0].minor.yy636); } - yymsp[-3].minor.yy636 = yylhsminor.yy636; + case 427: /* query_expression_body ::= query_expression_body UNION ALL query_expression_body */ +{ yylhsminor.yy172 = createSetOperator(pCxt, SET_OP_TYPE_UNION_ALL, yymsp[-3].minor.yy172, yymsp[0].minor.yy172); } + yymsp[-3].minor.yy172 = yylhsminor.yy172; break; - case 431: /* query_expression_body ::= query_expression_body UNION query_expression_body */ -{ yylhsminor.yy636 = createSetOperator(pCxt, SET_OP_TYPE_UNION, yymsp[-2].minor.yy636, yymsp[0].minor.yy636); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; + case 428: /* query_expression_body ::= query_expression_body UNION query_expression_body */ +{ yylhsminor.yy172 = createSetOperator(pCxt, SET_OP_TYPE_UNION, yymsp[-2].minor.yy172, yymsp[0].minor.yy172); } + yymsp[-2].minor.yy172 = yylhsminor.yy172; break; - case 433: /* query_primary ::= NK_LP query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt NK_RP */ -{ yymsp[-5].minor.yy636 = yymsp[-4].minor.yy636; } - yy_destructor(yypParser,353,&yymsp[-3].minor); - yy_destructor(yypParser,354,&yymsp[-2].minor); - yy_destructor(yypParser,355,&yymsp[-1].minor); + case 430: /* query_primary ::= NK_LP query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt NK_RP */ +{ yymsp[-5].minor.yy172 = yymsp[-4].minor.yy172; } + yy_destructor(yypParser,350,&yymsp[-3].minor); + yy_destructor(yypParser,351,&yymsp[-2].minor); + yy_destructor(yypParser,352,&yymsp[-1].minor); break; - case 437: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */ - case 441: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==441); -{ yymsp[-1].minor.yy636 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); } + case 434: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */ + case 438: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==438); +{ yymsp[-1].minor.yy172 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); } break; - case 438: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ - case 442: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==442); -{ yymsp[-3].minor.yy636 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); } + case 435: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ + case 439: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==439); +{ yymsp[-3].minor.yy172 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); } break; - case 439: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - case 443: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==443); -{ yymsp[-3].minor.yy636 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); } + case 436: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + case 440: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==440); +{ yymsp[-3].minor.yy172 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); } break; - case 444: /* subquery ::= NK_LP query_expression NK_RP */ -{ yylhsminor.yy636 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy636); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; + case 441: /* subquery ::= NK_LP query_expression NK_RP */ +{ yylhsminor.yy172 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy172); } + yymsp[-2].minor.yy172 = yylhsminor.yy172; break; - case 448: /* sort_specification ::= expression ordering_specification_opt null_ordering_opt */ -{ yylhsminor.yy636 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy636), yymsp[-1].minor.yy430, yymsp[0].minor.yy185); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; + case 445: /* sort_specification ::= expression ordering_specification_opt null_ordering_opt */ +{ yylhsminor.yy172 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy172), yymsp[-1].minor.yy14, yymsp[0].minor.yy17); } + yymsp[-2].minor.yy172 = yylhsminor.yy172; break; - case 449: /* ordering_specification_opt ::= */ -{ yymsp[1].minor.yy430 = ORDER_ASC; } + case 446: /* ordering_specification_opt ::= */ +{ yymsp[1].minor.yy14 = ORDER_ASC; } break; - case 450: /* ordering_specification_opt ::= ASC */ -{ yymsp[0].minor.yy430 = ORDER_ASC; } + case 447: /* ordering_specification_opt ::= ASC */ +{ yymsp[0].minor.yy14 = ORDER_ASC; } break; - case 451: /* ordering_specification_opt ::= DESC */ -{ yymsp[0].minor.yy430 = ORDER_DESC; } + case 448: /* ordering_specification_opt ::= DESC */ +{ yymsp[0].minor.yy14 = ORDER_DESC; } break; - case 452: /* null_ordering_opt ::= */ -{ yymsp[1].minor.yy185 = NULL_ORDER_DEFAULT; } + case 449: /* null_ordering_opt ::= */ +{ yymsp[1].minor.yy17 = NULL_ORDER_DEFAULT; } break; - case 453: /* null_ordering_opt ::= NULLS FIRST */ -{ yymsp[-1].minor.yy185 = NULL_ORDER_FIRST; } + case 450: /* null_ordering_opt ::= NULLS FIRST */ +{ yymsp[-1].minor.yy17 = NULL_ORDER_FIRST; } break; - case 454: /* null_ordering_opt ::= NULLS LAST */ -{ yymsp[-1].minor.yy185 = NULL_ORDER_LAST; } + case 451: /* null_ordering_opt ::= NULLS LAST */ +{ yymsp[-1].minor.yy17 = NULL_ORDER_LAST; } break; default: break; diff --git a/source/libs/parser/test/parInitialCTest.cpp b/source/libs/parser/test/parInitialCTest.cpp index a5e7ef51a7..02f4647ae7 100644 --- a/source/libs/parser/test/parInitialCTest.cpp +++ b/source/libs/parser/test/parInitialCTest.cpp @@ -440,13 +440,62 @@ TEST_F(ParserInitialCTest, createTable) { TEST_F(ParserInitialCTest, createTopic) { useDb("root", "test"); + SCMCreateTopicReq expect = {0}; + + auto setCreateTopicReqFunc = [&](const char* pTopicName, int8_t igExists, const char* pSql, const char* pAst, + const char* pDbName = nullptr, const char* pTbname = nullptr) { + memset(&expect, 0, sizeof(SMCreateStbReq)); + snprintf(expect.name, sizeof(expect.name), "0.%s", pTopicName); + expect.igExists = igExists; + expect.sql = (char*)pSql; + if (nullptr != pTbname) { + expect.subType = TOPIC_SUB_TYPE__TABLE; + snprintf(expect.subStbName, sizeof(expect.subStbName), "0.%s.%s", pDbName, pTbname); + } else if (nullptr != pAst) { + expect.subType = TOPIC_SUB_TYPE__COLUMN; + expect.ast = (char*)pAst; + } else { + expect.subType = TOPIC_SUB_TYPE__DB; + snprintf(expect.subStbName, sizeof(expect.subStbName), "0.%s", pDbName); + } + }; + + setCheckDdlFunc([&](const SQuery* pQuery, ParserStage stage) { + ASSERT_EQ(nodeType(pQuery->pRoot), QUERY_NODE_CREATE_TOPIC_STMT); + SCMCreateTopicReq req = {0}; + ASSERT_TRUE(TSDB_CODE_SUCCESS == + tDeserializeSCMCreateTopicReq(pQuery->pCmdMsg->pMsg, pQuery->pCmdMsg->msgLen, &req)); + + ASSERT_EQ(std::string(req.name), std::string(expect.name)); + ASSERT_EQ(req.igExists, expect.igExists); + ASSERT_EQ(req.subType, expect.subType); + ASSERT_EQ(std::string(req.sql), std::string(expect.sql)); + switch (expect.subType) { + case TOPIC_SUB_TYPE__DB: + ASSERT_EQ(std::string(req.subDbName), std::string(expect.subDbName)); + break; + case TOPIC_SUB_TYPE__TABLE: + ASSERT_EQ(std::string(req.subStbName), std::string(expect.subStbName)); + break; + case TOPIC_SUB_TYPE__COLUMN: + ASSERT_NE(req.ast, nullptr); + break; + default: + ASSERT_TRUE(false); + } + }); + + setCreateTopicReqFunc("tp1", 0, "create topic tp1 as select * from t1", "ast"); run("CREATE TOPIC tp1 AS SELECT * FROM t1"); - run("CREATE TOPIC IF NOT EXISTS tp1 AS SELECT * FROM t1"); + setCreateTopicReqFunc("tp1", 1, "create topic if not exists tp1 as select ts, ceil(c1) from t1", "ast"); + run("CREATE TOPIC IF NOT EXISTS tp1 AS SELECT ts, CEIL(c1) FROM t1"); - run("CREATE TOPIC tp1 AS test"); + setCreateTopicReqFunc("tp1", 0, "create topic tp1 as database test", nullptr, "test"); + run("CREATE TOPIC tp1 AS DATABASE test"); - run("CREATE TOPIC IF NOT EXISTS tp1 AS test"); + setCreateTopicReqFunc("tp1", 1, "create topic if not exists tp1 as stable st1", nullptr, "test", "st1"); + run("CREATE TOPIC IF NOT EXISTS tp1 AS STABLE st1"); } TEST_F(ParserInitialCTest, createUser) { From c6f21c4969867038b718201b0bd06d551d4c4558 Mon Sep 17 00:00:00 2001 From: tomchon Date: Mon, 30 May 2022 13:27:53 +0800 Subject: [PATCH 04/56] test:modify testcase of python connector using Statement API --- .../1-insert/performanceInsert.json | 79 +++++++++++++++++++ .../1-insert/performanceQuery.json | 42 ++++++++++ .../1-insert/test_stmt_insert_query.py | 11 ++- tests/system-test/fulltest.sh | 1 + 4 files changed, 127 insertions(+), 6 deletions(-) create mode 100644 tests/system-test/1-insert/performanceInsert.json create mode 100644 tests/system-test/1-insert/performanceQuery.json diff --git a/tests/system-test/1-insert/performanceInsert.json b/tests/system-test/1-insert/performanceInsert.json new file mode 100644 index 0000000000..de410c30f2 --- /dev/null +++ b/tests/system-test/1-insert/performanceInsert.json @@ -0,0 +1,79 @@ +{ + "filetype": "insert", + "cfgdir": "/etc/taos/", + "host": "test216", + "port": 6030, + "user": "root", + "password": "taosdata", + "thread_count": 8, + "thread_count_create_tbl": 8, + "result_file": "./insert_res.txt", + "confirm_parameter_prompt": "no", + "insert_interval": 0, + "interlace_rows": 1000, + "num_of_records_per_req": 100000, + "databases": [ + { + "dbinfo": { + "name": "db", + "drop": "yes", + "vgroups": 24 + }, + "super_tables": [ + { + "name": "stb", + "child_table_exists": "no", + "childtable_count": 100000, + "childtable_prefix": "stb_", + "auto_create_table": "no", + "batch_create_tbl_num": 50000, + "data_source": "rand", + "insert_mode": "taosc", + "insert_rows": 5, + "interlace_rows": 100000, + "insert_interval": 0, + "max_sql_len": 10000000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 10, + "start_timestamp": "2022-05-01 00:00:00.000", + "sample_format": "csv", + "use_sample_ts": "no", + "tags_file": "", + "columns": [ + { + "type": "INT" + }, + { + "type": "TINYINT", + "count": 1 + }, + {"type": "DOUBLE"}, + + { + "type": "BINARY", + "len": 40, + "count": 1 + }, + { + "type": "nchar", + "len": 20, + "count": 1 + } + ], + "tags": [ + { + "type": "TINYINT", + "count": 1 + }, + { + "type": "BINARY", + "len": 16, + "count": 1 + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/tests/system-test/1-insert/performanceQuery.json b/tests/system-test/1-insert/performanceQuery.json new file mode 100644 index 0000000000..fe2991bd0f --- /dev/null +++ b/tests/system-test/1-insert/performanceQuery.json @@ -0,0 +1,42 @@ +{ + "filetype": "query", + "cfgdir": "/etc/taos", + "host": "test216", + "port": 6030, + "user": "root", + "password": "taosdata", + "confirm_parameter_prompt": "no", + "databases": "db", + "query_times": 100, + "query_mode": "taosc", + "specified_table_query": { + "query_interval": 0, + "threads": 8, + "sqls": [ + { + "sql": "select count(*) from stb_0 ", + "result": "./query_res0.txt" + }, + { + "sql": "select last_row(*) from stb_1 ", + "result": "./query_res1.txt" + }, + { + "sql": "select last(*) from stb_2 ", + "result": "./query_res2.txt" + }, + { + "sql": "select first(*) from stb_3 ", + "result": "./query_res3.txt" + }, + { + "sql": "select avg(c0),min(c2),max(c1) from stb_4", + "result": "./query_res4.txt" + }, + { + "sql": "select avg(c0),min(c2),max(c1) from stb_5 where ts <= '2022-05-01 20:00:00.500' and ts >= '2022-05-01 00:00:00.000' ", + "result": "./query_res5.txt" + } + ] + } +} \ No newline at end of file diff --git a/tests/system-test/1-insert/test_stmt_insert_query.py b/tests/system-test/1-insert/test_stmt_insert_query.py index c6faedd35e..90f168eecf 100644 --- a/tests/system-test/1-insert/test_stmt_insert_query.py +++ b/tests/system-test/1-insert/test_stmt_insert_query.py @@ -132,11 +132,11 @@ class TDTestCase: querystmt.bind_param(queryparam) querystmt.execute() result=querystmt.use_result() - rows=result.fetch_all() - print( querystmt.use_result()) + # rows=result.fetch_all() + # print( querystmt.use_result()) # result = conn.query("select * from log") - # rows=result.fetch_all() + rows=result.fetch_all() # rows=result.fetch_all() print(rows) assert rows[1][0] == "ts" @@ -247,10 +247,9 @@ class TDTestCase: config = buildPath+ "../sim/dnode1/cfg/" host="localhost" connectstmt=self.newcon(host,config) - print(connectstmt) self.test_stmt_insert_multi(connectstmt) - connectstmt=self.newcon(host,config) - self.test_stmt_set_tbname_tag(connectstmt) + # connectstmt=self.newcon(host,config) + # self.test_stmt_set_tbname_tag(connectstmt) return diff --git a/tests/system-test/fulltest.sh b/tests/system-test/fulltest.sh index 6331086fb3..466a1bcfc6 100644 --- a/tests/system-test/fulltest.sh +++ b/tests/system-test/fulltest.sh @@ -15,6 +15,7 @@ python3 ./test.py -f 0-others/user_control.py python3 ./test.py -f 0-others/fsync.py python3 ./test.py -f 1-insert/opentsdb_telnet_line_taosc_insert.py +python3 ./test.py -f 1-insert/test_stmt_insert_query.py python3 ./test.py -f 2-query/between.py python3 ./test.py -f 2-query/distinct.py From 53def5b77b0b4698dd0903fdb94aa169bd16de23 Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Mon, 30 May 2022 20:38:46 +0800 Subject: [PATCH 05/56] refactor: make trans support multi steps --- include/util/tdef.h | 1 + source/dnode/mnode/impl/inc/mndDef.h | 20 +- source/dnode/mnode/impl/inc/mndTrans.h | 34 +- source/dnode/mnode/impl/src/mndSubscribe.c | 2 +- source/dnode/mnode/impl/src/mndTrans.c | 584 ++++++++++----------- tests/test/c/sdbDump.c | 4 +- 6 files changed, 296 insertions(+), 349 deletions(-) diff --git a/include/util/tdef.h b/include/util/tdef.h index ad7206f7bb..709e2b8a7f 100644 --- a/include/util/tdef.h +++ b/include/util/tdef.h @@ -254,6 +254,7 @@ typedef enum ELogicConditionType { #define TSDB_TRANS_STAGE_LEN 12 #define TSDB_TRANS_TYPE_LEN 16 #define TSDB_TRANS_ERROR_LEN 64 +#define TSDB_TRANS_DESC_LEN 128 #define TSDB_STEP_NAME_LEN 32 #define TSDB_STEP_DESC_LEN 128 diff --git a/source/dnode/mnode/impl/inc/mndDef.h b/source/dnode/mnode/impl/inc/mndDef.h index 4d5aab4590..fd0f54c66b 100644 --- a/source/dnode/mnode/impl/inc/mndDef.h +++ b/source/dnode/mnode/impl/inc/mndDef.h @@ -60,14 +60,12 @@ typedef enum { typedef enum { TRN_STAGE_PREPARE = 0, - TRN_STAGE_REDO_LOG = 1, - TRN_STAGE_REDO_ACTION = 2, - TRN_STAGE_ROLLBACK = 3, - TRN_STAGE_UNDO_ACTION = 4, - TRN_STAGE_UNDO_LOG = 5, - TRN_STAGE_COMMIT = 6, - TRN_STAGE_COMMIT_LOG = 7, - TRN_STAGE_FINISHED = 8 + TRN_STAGE_REDO_ACTION = 1, + TRN_STAGE_ROLLBACK = 2, + TRN_STAGE_UNDO_ACTION = 3, + TRN_STAGE_COMMIT = 4, + TRN_STAGE_COMMIT_ACTION = 5, + TRN_STAGE_FINISHED = 6 } ETrnStage; typedef enum { @@ -168,16 +166,16 @@ typedef struct { SRpcHandleInfo rpcInfo; void* rpcRsp; int32_t rpcRspLen; - SArray* redoLogs; - SArray* undoLogs; - SArray* commitLogs; + int32_t redoActionPos; SArray* redoActions; SArray* undoActions; + SArray* commitActions; int64_t createdTime; int64_t lastExecTime; int64_t dbUid; char dbname[TSDB_DB_FNAME_LEN]; char lastError[TSDB_TRANS_ERROR_LEN]; + char desc[TSDB_TRANS_DESC_LEN]; int32_t startFunc; int32_t stopFunc; int32_t paramLen; diff --git a/source/dnode/mnode/impl/inc/mndTrans.h b/source/dnode/mnode/impl/inc/mndTrans.h index ce302a88e3..d9408467ad 100644 --- a/source/dnode/mnode/impl/inc/mndTrans.h +++ b/source/dnode/mnode/impl/inc/mndTrans.h @@ -26,31 +26,23 @@ typedef enum { TRANS_START_FUNC_TEST = 1, TRANS_STOP_FUNC_TEST = 2, TRANS_START_FUNC_MQ_REB = 3, - TRANS_STOP_FUNC_TEST_MQ_REB = 4, + TRANS_STOP_FUNC_MQ_REB = 4, } ETrnFunc; typedef struct { - SEpSet epSet; - tmsg_t msgType; - int8_t msgSent; - int8_t msgReceived; - int32_t errCode; - int32_t acceptableCode; - int32_t contLen; - void *pCont; -} STransAction; - -typedef struct { + int32_t id; + tmsg_t msgType; + int8_t msgSent; + int8_t msgReceived; + int8_t isRaw; + int8_t rawWritten; SSdbRaw *pRaw; -} STransLog; - -typedef struct { - ETrnStep stepType; - STransAction redoAction; - STransAction undoAction; - STransLog redoLog; - STransLog undoLog; -} STransStep; + SEpSet epSet; + int32_t errCode; + int32_t acceptableCode; + int32_t contLen; + void *pCont; +} STransAction; typedef void (*TransCbFp)(SMnode *pMnode, void *param, int32_t paramLen); diff --git a/source/dnode/mnode/impl/src/mndSubscribe.c b/source/dnode/mnode/impl/src/mndSubscribe.c index e58630ddbf..7e72aa2425 100644 --- a/source/dnode/mnode/impl/src/mndSubscribe.c +++ b/source/dnode/mnode/impl/src/mndSubscribe.c @@ -493,7 +493,7 @@ static int32_t mndPersistRebResult(SMnode *pMnode, SRpcMsg *pMsg, const SMqRebOu // 4. TODO commit log: modification log // 5. set cb - mndTransSetCb(pTrans, TRANS_START_FUNC_MQ_REB, TRANS_STOP_FUNC_TEST_MQ_REB, NULL, 0); + mndTransSetCb(pTrans, TRANS_START_FUNC_MQ_REB, TRANS_STOP_FUNC_MQ_REB, NULL, 0); // 6. execution if (mndTransPrepare(pMnode, pTrans) != 0) goto REB_FAIL; diff --git a/source/dnode/mnode/impl/src/mndTrans.c b/source/dnode/mnode/impl/src/mndTrans.c index 9d392c64fb..239e1bf4b1 100644 --- a/source/dnode/mnode/impl/src/mndTrans.c +++ b/source/dnode/mnode/impl/src/mndTrans.c @@ -43,13 +43,13 @@ static int32_t mndTransExecuteRedoLogs(SMnode *pMnode, STrans *pTrans); static int32_t mndTransExecuteUndoLogs(SMnode *pMnode, STrans *pTrans); static int32_t mndTransExecuteRedoActions(SMnode *pMnode, STrans *pTrans); static int32_t mndTransExecuteUndoActions(SMnode *pMnode, STrans *pTrans); -static int32_t mndTransExecuteCommitLogs(SMnode *pMnode, STrans *pTrans); +static int32_t mndTransExecuteCommitActions(SMnode *pMnode, STrans *pTrans); static bool mndTransPerformPrepareStage(SMnode *pMnode, STrans *pTrans); static bool mndTransPerformRedoLogStage(SMnode *pMnode, STrans *pTrans); static bool mndTransPerformRedoActionStage(SMnode *pMnode, STrans *pTrans); static bool mndTransPerformUndoLogStage(SMnode *pMnode, STrans *pTrans); static bool mndTransPerformUndoActionStage(SMnode *pMnode, STrans *pTrans); -static bool mndTransPerformCommitLogStage(SMnode *pMnode, STrans *pTrans); +static bool mndTransPerformCommitActionStage(SMnode *pMnode, STrans *pTrans); static bool mndTransPerformCommitStage(SMnode *pMnode, STrans *pTrans); static bool mndTransPerformRollbackStage(SMnode *pMnode, STrans *pTrans); static bool mndTransPerfromFinishedStage(SMnode *pMnode, STrans *pTrans); @@ -83,40 +83,30 @@ int32_t mndInitTrans(SMnode *pMnode) { void mndCleanupTrans(SMnode *pMnode) {} +static int32_t mndTransGetActionsSize(SArray *pArray) { + int32_t actionNum = taosArrayGetSize(pArray); + int32_t rawDataLen = 0; + + for (int32_t i = 0; i < actionNum; ++i) { + STransAction *pAction = taosArrayGet(pArray, i); + if (pAction->isRaw) { + rawDataLen += (sdbGetRawTotalSize(pAction->pRaw) + sizeof(int32_t)); + } else { + rawDataLen += (sizeof(STransAction) + pAction->contLen); + } + rawDataLen += sizeof(pAction->isRaw); + } + + return rawDataLen; +} + static SSdbRaw *mndTransActionEncode(STrans *pTrans) { terrno = TSDB_CODE_OUT_OF_MEMORY; int32_t rawDataLen = sizeof(STrans) + TRANS_RESERVE_SIZE; - int32_t redoLogNum = taosArrayGetSize(pTrans->redoLogs); - int32_t undoLogNum = taosArrayGetSize(pTrans->undoLogs); - int32_t commitLogNum = taosArrayGetSize(pTrans->commitLogs); - int32_t redoActionNum = taosArrayGetSize(pTrans->redoActions); - int32_t undoActionNum = taosArrayGetSize(pTrans->undoActions); - - for (int32_t i = 0; i < redoLogNum; ++i) { - SSdbRaw *pTmp = taosArrayGetP(pTrans->redoLogs, i); - rawDataLen += (sdbGetRawTotalSize(pTmp) + sizeof(int32_t)); - } - - for (int32_t i = 0; i < undoLogNum; ++i) { - SSdbRaw *pTmp = taosArrayGetP(pTrans->undoLogs, i); - rawDataLen += (sdbGetRawTotalSize(pTmp) + sizeof(int32_t)); - } - - for (int32_t i = 0; i < commitLogNum; ++i) { - SSdbRaw *pTmp = taosArrayGetP(pTrans->commitLogs, i); - rawDataLen += (sdbGetRawTotalSize(pTmp) + sizeof(int32_t)); - } - - for (int32_t i = 0; i < redoActionNum; ++i) { - STransAction *pAction = taosArrayGet(pTrans->redoActions, i); - rawDataLen += (sizeof(STransAction) + pAction->contLen); - } - - for (int32_t i = 0; i < undoActionNum; ++i) { - STransAction *pAction = taosArrayGet(pTrans->undoActions, i); - rawDataLen += (sizeof(STransAction) + pAction->contLen); - } + rawDataLen += mndTransGetActionsSize(pTrans->redoActions); + rawDataLen += mndTransGetActionsSize(pTrans->undoActions); + rawDataLen += mndTransGetActionsSize(pTrans->commitActions); SSdbRaw *pRaw = sdbAllocRaw(SDB_TRANS, TRANS_VER_NUMBER, rawDataLen); if (pRaw == NULL) { @@ -126,67 +116,67 @@ static SSdbRaw *mndTransActionEncode(STrans *pTrans) { int32_t dataPos = 0; SDB_SET_INT32(pRaw, dataPos, pTrans->id, _OVER) - - ETrnStage stage = pTrans->stage; - if (stage == TRN_STAGE_REDO_LOG || stage == TRN_STAGE_REDO_ACTION) { - stage = TRN_STAGE_PREPARE; - } else if (stage == TRN_STAGE_UNDO_ACTION || stage == TRN_STAGE_UNDO_LOG) { - stage = TRN_STAGE_ROLLBACK; - } else if (stage == TRN_STAGE_COMMIT_LOG || stage == TRN_STAGE_FINISHED) { - stage = TRN_STAGE_COMMIT; - } else { - } - - SDB_SET_INT16(pRaw, dataPos, stage, _OVER) + SDB_SET_INT16(pRaw, dataPos, pTrans->stage, _OVER) SDB_SET_INT16(pRaw, dataPos, pTrans->policy, _OVER) SDB_SET_INT16(pRaw, dataPos, pTrans->type, _OVER) SDB_SET_INT16(pRaw, dataPos, pTrans->parallel, _OVER) SDB_SET_INT64(pRaw, dataPos, pTrans->createdTime, _OVER) SDB_SET_INT64(pRaw, dataPos, pTrans->dbUid, _OVER) SDB_SET_BINARY(pRaw, dataPos, pTrans->dbname, TSDB_DB_FNAME_LEN, _OVER) - SDB_SET_INT32(pRaw, dataPos, redoLogNum, _OVER) - SDB_SET_INT32(pRaw, dataPos, undoLogNum, _OVER) - SDB_SET_INT32(pRaw, dataPos, commitLogNum, _OVER) + + int32_t redoActionNum = taosArrayGetSize(pTrans->redoActions); + int32_t undoActionNum = taosArrayGetSize(pTrans->undoActions); + int32_t commitActionNum = taosArrayGetSize(pTrans->commitActions); SDB_SET_INT32(pRaw, dataPos, redoActionNum, _OVER) SDB_SET_INT32(pRaw, dataPos, undoActionNum, _OVER) - - for (int32_t i = 0; i < redoLogNum; ++i) { - SSdbRaw *pTmp = taosArrayGetP(pTrans->redoLogs, i); - int32_t len = sdbGetRawTotalSize(pTmp); - SDB_SET_INT32(pRaw, dataPos, len, _OVER) - SDB_SET_BINARY(pRaw, dataPos, (void *)pTmp, len, _OVER) - } - - for (int32_t i = 0; i < undoLogNum; ++i) { - SSdbRaw *pTmp = taosArrayGetP(pTrans->undoLogs, i); - int32_t len = sdbGetRawTotalSize(pTmp); - SDB_SET_INT32(pRaw, dataPos, len, _OVER) - SDB_SET_BINARY(pRaw, dataPos, (void *)pTmp, len, _OVER) - } - - for (int32_t i = 0; i < commitLogNum; ++i) { - SSdbRaw *pTmp = taosArrayGetP(pTrans->commitLogs, i); - int32_t len = sdbGetRawTotalSize(pTmp); - SDB_SET_INT32(pRaw, dataPos, len, _OVER) - SDB_SET_BINARY(pRaw, dataPos, (void *)pTmp, len, _OVER) - } + SDB_SET_INT32(pRaw, dataPos, commitActionNum, _OVER) for (int32_t i = 0; i < redoActionNum; ++i) { STransAction *pAction = taosArrayGet(pTrans->redoActions, i); - SDB_SET_BINARY(pRaw, dataPos, (void *)&pAction->epSet, sizeof(SEpSet), _OVER) - SDB_SET_INT16(pRaw, dataPos, pAction->msgType, _OVER) - SDB_SET_INT32(pRaw, dataPos, pAction->acceptableCode, _OVER) - SDB_SET_INT32(pRaw, dataPos, pAction->contLen, _OVER) - SDB_SET_BINARY(pRaw, dataPos, pAction->pCont, pAction->contLen, _OVER) + SDB_SET_INT8(pRaw, dataPos, pAction->isRaw, _OVER) + if (pAction->isRaw) { + int32_t len = sdbGetRawTotalSize(pAction->pRaw); + SDB_SET_INT32(pRaw, dataPos, len, _OVER) + SDB_SET_BINARY(pRaw, dataPos, (void *)pAction->pRaw, len, _OVER) + } else { + SDB_SET_BINARY(pRaw, dataPos, (void *)&pAction->epSet, sizeof(SEpSet), _OVER) + SDB_SET_INT16(pRaw, dataPos, pAction->msgType, _OVER) + SDB_SET_INT32(pRaw, dataPos, pAction->acceptableCode, _OVER) + SDB_SET_INT32(pRaw, dataPos, pAction->contLen, _OVER) + SDB_SET_BINARY(pRaw, dataPos, pAction->pCont, pAction->contLen, _OVER) + } } for (int32_t i = 0; i < undoActionNum; ++i) { STransAction *pAction = taosArrayGet(pTrans->undoActions, i); - SDB_SET_BINARY(pRaw, dataPos, (void *)&pAction->epSet, sizeof(SEpSet), _OVER) - SDB_SET_INT16(pRaw, dataPos, pAction->msgType, _OVER) - SDB_SET_INT32(pRaw, dataPos, pAction->acceptableCode, _OVER) - SDB_SET_INT32(pRaw, dataPos, pAction->contLen, _OVER) - SDB_SET_BINARY(pRaw, dataPos, (void *)pAction->pCont, pAction->contLen, _OVER) + SDB_SET_INT8(pRaw, dataPos, pAction->isRaw, _OVER) + if (pAction->isRaw) { + int32_t len = sdbGetRawTotalSize(pAction->pRaw); + SDB_SET_INT32(pRaw, dataPos, len, _OVER) + SDB_SET_BINARY(pRaw, dataPos, (void *)pAction->pRaw, len, _OVER) + } else { + SDB_SET_BINARY(pRaw, dataPos, (void *)&pAction->epSet, sizeof(SEpSet), _OVER) + SDB_SET_INT16(pRaw, dataPos, pAction->msgType, _OVER) + SDB_SET_INT32(pRaw, dataPos, pAction->acceptableCode, _OVER) + SDB_SET_INT32(pRaw, dataPos, pAction->contLen, _OVER) + SDB_SET_BINARY(pRaw, dataPos, pAction->pCont, pAction->contLen, _OVER) + } + } + + for (int32_t i = 0; i < commitActionNum; ++i) { + STransAction *pAction = taosArrayGet(pTrans->commitActions, i); + SDB_SET_INT8(pRaw, dataPos, pAction->isRaw, _OVER) + if (pAction->isRaw) { + int32_t len = sdbGetRawTotalSize(pAction->pRaw); + SDB_SET_INT32(pRaw, dataPos, len, _OVER) + SDB_SET_BINARY(pRaw, dataPos, (void *)pAction->pRaw, len, _OVER) + } else { + SDB_SET_BINARY(pRaw, dataPos, (void *)&pAction->epSet, sizeof(SEpSet), _OVER) + SDB_SET_INT16(pRaw, dataPos, pAction->msgType, _OVER) + SDB_SET_INT32(pRaw, dataPos, pAction->acceptableCode, _OVER) + SDB_SET_INT32(pRaw, dataPos, pAction->contLen, _OVER) + SDB_SET_BINARY(pRaw, dataPos, pAction->pCont, pAction->contLen, _OVER) + } } SDB_SET_INT32(pRaw, dataPos, pTrans->startFunc, _OVER) @@ -220,11 +210,9 @@ static SSdbRow *mndTransActionDecode(SSdbRaw *pRaw) { char *pData = NULL; int32_t dataLen = 0; int8_t sver = 0; - int32_t redoLogNum = 0; - int32_t undoLogNum = 0; - int32_t commitLogNum = 0; int32_t redoActionNum = 0; int32_t undoActionNum = 0; + int32_t commitActionNum = 0; int32_t dataPos = 0; STransAction action = {0}; @@ -258,76 +246,85 @@ static SSdbRow *mndTransActionDecode(SSdbRaw *pRaw) { SDB_GET_INT64(pRaw, dataPos, &pTrans->createdTime, _OVER) SDB_GET_INT64(pRaw, dataPos, &pTrans->dbUid, _OVER) SDB_GET_BINARY(pRaw, dataPos, pTrans->dbname, TSDB_DB_FNAME_LEN, _OVER) - SDB_GET_INT32(pRaw, dataPos, &redoLogNum, _OVER) - SDB_GET_INT32(pRaw, dataPos, &undoLogNum, _OVER) - SDB_GET_INT32(pRaw, dataPos, &commitLogNum, _OVER) SDB_GET_INT32(pRaw, dataPos, &redoActionNum, _OVER) SDB_GET_INT32(pRaw, dataPos, &undoActionNum, _OVER) + SDB_GET_INT32(pRaw, dataPos, &commitActionNum, _OVER) - pTrans->redoLogs = taosArrayInit(redoLogNum, sizeof(void *)); - pTrans->undoLogs = taosArrayInit(undoLogNum, sizeof(void *)); - pTrans->commitLogs = taosArrayInit(commitLogNum, sizeof(void *)); pTrans->redoActions = taosArrayInit(redoActionNum, sizeof(STransAction)); pTrans->undoActions = taosArrayInit(undoActionNum, sizeof(STransAction)); + pTrans->commitActions = taosArrayInit(commitActionNum, sizeof(STransAction)); - if (pTrans->redoLogs == NULL) goto _OVER; - if (pTrans->undoLogs == NULL) goto _OVER; - if (pTrans->commitLogs == NULL) goto _OVER; if (pTrans->redoActions == NULL) goto _OVER; if (pTrans->undoActions == NULL) goto _OVER; - - for (int32_t i = 0; i < redoLogNum; ++i) { - SDB_GET_INT32(pRaw, dataPos, &dataLen, _OVER) - pData = taosMemoryMalloc(dataLen); - if (pData == NULL) goto _OVER; - mTrace("raw:%p, is created", pData); - SDB_GET_BINARY(pRaw, dataPos, pData, dataLen, _OVER); - if (taosArrayPush(pTrans->redoLogs, &pData) == NULL) goto _OVER; - pData = NULL; - } - - for (int32_t i = 0; i < undoLogNum; ++i) { - SDB_GET_INT32(pRaw, dataPos, &dataLen, _OVER) - pData = taosMemoryMalloc(dataLen); - if (pData == NULL) goto _OVER; - mTrace("raw:%p, is created", pData); - SDB_GET_BINARY(pRaw, dataPos, pData, dataLen, _OVER); - if (taosArrayPush(pTrans->undoLogs, &pData) == NULL) goto _OVER; - pData = NULL; - } - - for (int32_t i = 0; i < commitLogNum; ++i) { - SDB_GET_INT32(pRaw, dataPos, &dataLen, _OVER) - pData = taosMemoryMalloc(dataLen); - if (pData == NULL) goto _OVER; - mTrace("raw:%p, is created", pData); - SDB_GET_BINARY(pRaw, dataPos, pData, dataLen, _OVER); - if (taosArrayPush(pTrans->commitLogs, &pData) == NULL) goto _OVER; - pData = NULL; - } + if (pTrans->commitActions == NULL) goto _OVER; for (int32_t i = 0; i < redoActionNum; ++i) { - SDB_GET_BINARY(pRaw, dataPos, (void *)&action.epSet, sizeof(SEpSet), _OVER); - SDB_GET_INT16(pRaw, dataPos, &action.msgType, _OVER) - SDB_GET_INT32(pRaw, dataPos, &action.acceptableCode, _OVER) - SDB_GET_INT32(pRaw, dataPos, &action.contLen, _OVER) - action.pCont = taosMemoryMalloc(action.contLen); - if (action.pCont == NULL) goto _OVER; - SDB_GET_BINARY(pRaw, dataPos, action.pCont, action.contLen, _OVER); - if (taosArrayPush(pTrans->redoActions, &action) == NULL) goto _OVER; - action.pCont = NULL; + SDB_GET_INT8(pRaw, dataPos, &action.isRaw, _OVER) + if (action.isRaw) { + SDB_GET_INT32(pRaw, dataPos, &dataLen, _OVER) + pData = taosMemoryMalloc(dataLen); + if (pData == NULL) goto _OVER; + mTrace("raw:%p, is created", pData); + SDB_GET_BINARY(pRaw, dataPos, pData, dataLen, _OVER); + if (taosArrayPush(pTrans->redoActions, &pData) == NULL) goto _OVER; + pData = NULL; + } else { + SDB_GET_BINARY(pRaw, dataPos, (void *)&action.epSet, sizeof(SEpSet), _OVER); + SDB_GET_INT16(pRaw, dataPos, &action.msgType, _OVER) + SDB_GET_INT32(pRaw, dataPos, &action.acceptableCode, _OVER) + SDB_GET_INT32(pRaw, dataPos, &action.contLen, _OVER) + action.pCont = taosMemoryMalloc(action.contLen); + if (action.pCont == NULL) goto _OVER; + SDB_GET_BINARY(pRaw, dataPos, action.pCont, action.contLen, _OVER); + if (taosArrayPush(pTrans->redoActions, &action) == NULL) goto _OVER; + action.pCont = NULL; + } } for (int32_t i = 0; i < undoActionNum; ++i) { - SDB_GET_BINARY(pRaw, dataPos, (void *)&action.epSet, sizeof(SEpSet), _OVER); - SDB_GET_INT16(pRaw, dataPos, &action.msgType, _OVER) - SDB_GET_INT32(pRaw, dataPos, &action.acceptableCode, _OVER) - SDB_GET_INT32(pRaw, dataPos, &action.contLen, _OVER) - action.pCont = taosMemoryMalloc(action.contLen); - if (action.pCont == NULL) goto _OVER; - SDB_GET_BINARY(pRaw, dataPos, action.pCont, action.contLen, _OVER); - if (taosArrayPush(pTrans->undoActions, &action) == NULL) goto _OVER; - action.pCont = NULL; + SDB_GET_INT8(pRaw, dataPos, &action.isRaw, _OVER) + if (action.isRaw) { + SDB_GET_INT32(pRaw, dataPos, &dataLen, _OVER) + pData = taosMemoryMalloc(dataLen); + if (pData == NULL) goto _OVER; + mTrace("raw:%p, is created", pData); + SDB_GET_BINARY(pRaw, dataPos, pData, dataLen, _OVER); + if (taosArrayPush(pTrans->undoActions, &pData) == NULL) goto _OVER; + pData = NULL; + } else { + SDB_GET_BINARY(pRaw, dataPos, (void *)&action.epSet, sizeof(SEpSet), _OVER); + SDB_GET_INT16(pRaw, dataPos, &action.msgType, _OVER) + SDB_GET_INT32(pRaw, dataPos, &action.acceptableCode, _OVER) + SDB_GET_INT32(pRaw, dataPos, &action.contLen, _OVER) + action.pCont = taosMemoryMalloc(action.contLen); + if (action.pCont == NULL) goto _OVER; + SDB_GET_BINARY(pRaw, dataPos, action.pCont, action.contLen, _OVER); + if (taosArrayPush(pTrans->undoActions, &action) == NULL) goto _OVER; + action.pCont = NULL; + } + } + + for (int32_t i = 0; i < commitActionNum; ++i) { + SDB_GET_INT8(pRaw, dataPos, &action.isRaw, _OVER) + if (action.isRaw) { + SDB_GET_INT32(pRaw, dataPos, &dataLen, _OVER) + pData = taosMemoryMalloc(dataLen); + if (pData == NULL) goto _OVER; + mTrace("raw:%p, is created", pData); + SDB_GET_BINARY(pRaw, dataPos, pData, dataLen, _OVER); + if (taosArrayPush(pTrans->commitActions, &pData) == NULL) goto _OVER; + pData = NULL; + } else { + SDB_GET_BINARY(pRaw, dataPos, (void *)&action.epSet, sizeof(SEpSet), _OVER); + SDB_GET_INT16(pRaw, dataPos, &action.msgType, _OVER) + SDB_GET_INT32(pRaw, dataPos, &action.acceptableCode, _OVER) + SDB_GET_INT32(pRaw, dataPos, &action.contLen, _OVER) + action.pCont = taosMemoryMalloc(action.contLen); + if (action.pCont == NULL) goto _OVER; + SDB_GET_BINARY(pRaw, dataPos, action.pCont, action.contLen, _OVER); + if (taosArrayPush(pTrans->commitActions, &action) == NULL) goto _OVER; + action.pCont = NULL; + } } SDB_GET_INT32(pRaw, dataPos, &pTrans->startFunc, _OVER) @@ -360,20 +357,16 @@ static const char *mndTransStr(ETrnStage stage) { switch (stage) { case TRN_STAGE_PREPARE: return "prepare"; - case TRN_STAGE_REDO_LOG: - return "redoLog"; case TRN_STAGE_REDO_ACTION: return "redoAction"; - case TRN_STAGE_COMMIT: - return "commit"; - case TRN_STAGE_COMMIT_LOG: - return "commitLog"; - case TRN_STAGE_UNDO_ACTION: - return "undoAction"; - case TRN_STAGE_UNDO_LOG: - return "undoLog"; case TRN_STAGE_ROLLBACK: return "rollback"; + case TRN_STAGE_UNDO_ACTION: + return "undoAction"; + case TRN_STAGE_COMMIT: + return "commit"; + case TRN_STAGE_COMMIT_ACTION: + return "commitAction"; case TRN_STAGE_FINISHED: return "finished"; default: @@ -472,7 +465,7 @@ static TransCbFp mndTransGetCbFp(ETrnFunc ftype) { return mndTransTestStopFunc; case TRANS_START_FUNC_MQ_REB: return mndRebCntInc; - case TRANS_STOP_FUNC_TEST_MQ_REB: + case TRANS_STOP_FUNC_MQ_REB: return mndRebCntDec; default: return NULL; @@ -493,11 +486,9 @@ static int32_t mndTransActionInsert(SSdb *pSdb, STrans *pTrans) { } static void mndTransDropData(STrans *pTrans) { - mndTransDropLogs(pTrans->redoLogs); - mndTransDropLogs(pTrans->undoLogs); - mndTransDropLogs(pTrans->commitLogs); mndTransDropActions(pTrans->redoActions); mndTransDropActions(pTrans->undoActions); + mndTransDropActions(pTrans->commitActions); if (pTrans->rpcRsp != NULL) { taosMemoryFree(pTrans->rpcRsp); pTrans->rpcRsp = NULL; @@ -526,8 +517,8 @@ static int32_t mndTransActionDelete(SSdb *pSdb, STrans *pTrans, bool callFunc) { static int32_t mndTransActionUpdate(SSdb *pSdb, STrans *pOld, STrans *pNew) { if (pNew->stage == TRN_STAGE_COMMIT) { - pNew->stage = TRN_STAGE_COMMIT_LOG; - mTrace("trans:%d, stage from %s to %s", pNew->id, mndTransStr(TRN_STAGE_COMMIT), mndTransStr(TRN_STAGE_COMMIT_LOG)); + pNew->stage = TRN_STAGE_COMMIT_ACTION; + mTrace("trans:%d, stage from %s to %s", pNew->id, mndTransStr(TRN_STAGE_COMMIT), mndTransStr(TRN_STAGE_COMMIT_ACTION)); } if (pNew->stage == TRN_STAGE_ROLLBACK) { @@ -568,14 +559,11 @@ STrans *mndTransCreate(SMnode *pMnode, ETrnPolicy policy, ETrnType type, const S pTrans->type = type; pTrans->createdTime = taosGetTimestampMs(); if (pReq != NULL) pTrans->rpcInfo = pReq->info; - pTrans->redoLogs = taosArrayInit(TRANS_ARRAY_SIZE, sizeof(void *)); - pTrans->undoLogs = taosArrayInit(TRANS_ARRAY_SIZE, sizeof(void *)); - pTrans->commitLogs = taosArrayInit(TRANS_ARRAY_SIZE, sizeof(void *)); pTrans->redoActions = taosArrayInit(TRANS_ARRAY_SIZE, sizeof(STransAction)); pTrans->undoActions = taosArrayInit(TRANS_ARRAY_SIZE, sizeof(STransAction)); + pTrans->commitActions = taosArrayInit(TRANS_ARRAY_SIZE, sizeof(STransAction)); - if (pTrans->redoLogs == NULL || pTrans->undoLogs == NULL || pTrans->commitLogs == NULL || - pTrans->redoActions == NULL || pTrans->undoActions == NULL) { + if (pTrans->redoActions == NULL || pTrans->undoActions == NULL || pTrans->commitActions == NULL) { terrno = TSDB_CODE_OUT_OF_MEMORY; mError("failed to create transaction since %s", terrstr()); return NULL; @@ -585,21 +573,15 @@ STrans *mndTransCreate(SMnode *pMnode, ETrnPolicy policy, ETrnType type, const S return pTrans; } -static void mndTransDropLogs(SArray *pArray) { - int32_t size = taosArrayGetSize(pArray); - for (int32_t i = 0; i < size; ++i) { - SSdbRaw *pRaw = taosArrayGetP(pArray, i); - sdbFreeRaw(pRaw); - } - - taosArrayDestroy(pArray); -} - static void mndTransDropActions(SArray *pArray) { int32_t size = taosArrayGetSize(pArray); for (int32_t i = 0; i < size; ++i) { STransAction *pAction = taosArrayGet(pArray, i); - taosMemoryFreeClear(pAction->pCont); + if (pAction->isRaw) { + sdbFreeRaw(pAction->pRaw); + } else { + taosMemoryFreeClear(pAction->pCont); + } } taosArrayDestroy(pArray); @@ -613,27 +595,6 @@ void mndTransDrop(STrans *pTrans) { } } -static int32_t mndTransAppendLog(SArray *pArray, SSdbRaw *pRaw) { - if (pArray == NULL || pRaw == NULL) { - terrno = TSDB_CODE_INVALID_PARA; - return -1; - } - - void *ptr = taosArrayPush(pArray, &pRaw); - if (ptr == NULL) { - terrno = TSDB_CODE_OUT_OF_MEMORY; - return -1; - } - - return 0; -} - -int32_t mndTransAppendRedolog(STrans *pTrans, SSdbRaw *pRaw) { return mndTransAppendLog(pTrans->redoLogs, pRaw); } - -int32_t mndTransAppendUndolog(STrans *pTrans, SSdbRaw *pRaw) { return mndTransAppendLog(pTrans->undoLogs, pRaw); } - -int32_t mndTransAppendCommitlog(STrans *pTrans, SSdbRaw *pRaw) { return mndTransAppendLog(pTrans->commitLogs, pRaw); } - static int32_t mndTransAppendAction(SArray *pArray, STransAction *pAction) { void *ptr = taosArrayPush(pArray, pAction); if (ptr == NULL) { @@ -644,6 +605,21 @@ static int32_t mndTransAppendAction(SArray *pArray, STransAction *pAction) { return 0; } +int32_t mndTransAppendRedolog(STrans *pTrans, SSdbRaw *pRaw) { + STransAction action = {.isRaw = true, .pRaw = pRaw}; + return mndTransAppendAction(pTrans->redoActions, &action); +} + +int32_t mndTransAppendUndolog(STrans *pTrans, SSdbRaw *pRaw) { + STransAction action = {.isRaw = true, .pRaw = pRaw}; + return mndTransAppendAction(pTrans->undoActions, &action); +} + +int32_t mndTransAppendCommitlog(STrans *pTrans, SSdbRaw *pRaw) { + STransAction action = {.isRaw = true, .pRaw = pRaw}; + return mndTransAppendAction(pTrans->commitActions, &action); +} + int32_t mndTransAppendRedoAction(STrans *pTrans, STransAction *pAction) { return mndTransAppendAction(pTrans->redoActions, pAction); } @@ -768,7 +744,7 @@ int32_t mndTransPrepare(SMnode *pMnode, STrans *pTrans) { return -1; } - if (taosArrayGetSize(pTrans->commitLogs) <= 0) { + if (taosArrayGetSize(pTrans->commitActions) <= 0) { terrno = TSDB_CODE_MND_TRANS_CLOG_IS_NULL; mError("trans:%d, failed to prepare since %s", pTrans->id, terrstr()); return -1; @@ -799,8 +775,6 @@ int32_t mndTransPrepare(SMnode *pMnode, STrans *pTrans) { } static int32_t mndTransCommit(SMnode *pMnode, STrans *pTrans) { - if (taosArrayGetSize(pTrans->commitLogs) == 0 && taosArrayGetSize(pTrans->redoActions) == 0) return 0; - mDebug("trans:%d, commit transaction", pTrans->id); if (mndTransSync(pMnode, pTrans) != 0) { mError("trans:%d, failed to commit since %s", pTrans->id, terrstr()); @@ -829,8 +803,7 @@ static void mndTransSendRpcRsp(SMnode *pMnode, STrans *pTrans) { } if (pTrans->policy == TRN_POLICY_ROLLBACK) { - if (pTrans->stage == TRN_STAGE_UNDO_LOG || pTrans->stage == TRN_STAGE_UNDO_ACTION || - pTrans->stage == TRN_STAGE_ROLLBACK) { + if (pTrans->stage == pTrans->stage == TRN_STAGE_UNDO_ACTION || pTrans->stage == TRN_STAGE_ROLLBACK) { if (code == 0) code = TSDB_CODE_MND_TRANS_UNKNOW_ERROR; sendRsp = true; } @@ -930,30 +903,6 @@ static int32_t mndTransExecuteLogs(SMnode *pMnode, SArray *pArray) { return code; } -static int32_t mndTransExecuteRedoLogs(SMnode *pMnode, STrans *pTrans) { - int32_t code = mndTransExecuteLogs(pMnode, pTrans->redoLogs); - if (code != 0) { - mError("failed to execute redoLogs since %s", terrstr()); - } - return code; -} - -static int32_t mndTransExecuteUndoLogs(SMnode *pMnode, STrans *pTrans) { - int32_t code = mndTransExecuteLogs(pMnode, pTrans->undoLogs); - if (code != 0) { - mError("failed to execute undoLogs since %s, return success", terrstr()); - } - - return 0; // return success in any case -} - -static int32_t mndTransExecuteCommitLogs(SMnode *pMnode, STrans *pTrans) { - int32_t code = mndTransExecuteLogs(pMnode, pTrans->commitLogs); - if (code != 0) { - mError("failed to execute commitLogs since %s", terrstr()); - } - return code; -} static void mndTransResetActions(SMnode *pMnode, STrans *pTrans, SArray *pArray) { int32_t numOfActions = taosArrayGetSize(pArray); @@ -962,6 +911,7 @@ static void mndTransResetActions(SMnode *pMnode, STrans *pTrans, SArray *pArray) STransAction *pAction = taosArrayGet(pArray, action); if (pAction == NULL) continue; if (pAction->msgSent && pAction->msgReceived && pAction->errCode == 0) continue; + if (pAction->rawWritten && pAction->errCode == 0) continue; pAction->msgSent = 0; pAction->msgReceived = 0; @@ -970,56 +920,71 @@ static void mndTransResetActions(SMnode *pMnode, STrans *pTrans, SArray *pArray) } } +static int32_t mndTransWriteSingleLog(SMnode *pMnode, STrans *pTrans, STransAction *pAction) { + int32_t code = sdbWriteWithoutFree(pMnode->pSdb, pAction->pRaw); + if (code == 0) { + mDebug("trans:%d, action:%d write to sdb", pTrans->id, pAction->id); + } else { + mError("trans:%d, action:%d failed to write sdb since %s", pTrans->id, pAction->id, terrstr()); + } + + return code; +} + +static int32_t mndTransSendSingleMsg(SMnode *pMnode, STrans *pTrans, STransAction *pAction) { + if (pAction->msgSent) return 0; + if (!pMnode->deploy && !mndIsMaster(pMnode)) return -1; + + int64_t signature = pTrans->id; + signature = (signature << 32); + signature += pAction->id; + + SRpcMsg rpcMsg = {.msgType = pAction->msgType, .contLen = pAction->contLen, .info.ahandle = (void *)signature}; + rpcMsg.pCont = rpcMallocCont(pAction->contLen); + if (rpcMsg.pCont == NULL) { + terrno = TSDB_CODE_OUT_OF_MEMORY; + return -1; + } + memcpy(rpcMsg.pCont, pAction->pCont, pAction->contLen); + + int32_t code = tmsgSendReq(&pAction->epSet, &rpcMsg); + if (code == 0) { + pAction->msgSent = 1; + pAction->msgReceived = 0; + pAction->errCode = 0; + mDebug("trans:%d, action:%d is sent to %s:%u", pTrans->id, pAction->id, + pAction->epSet.eps[pAction->epSet.inUse].fqdn, pAction->epSet.eps[pAction->epSet.inUse].port); + } else { + pAction->msgSent = 0; + pAction->msgReceived = 0; + pAction->errCode = (terrno != 0) ? terrno : code; + mError("trans:%d, action:%d not send since %s", pTrans->id, pAction->id, terrstr()); + } + + return code; +} + +static int32_t mndTransExecSingleAction(SMnode *pMnode, STrans *pTrans, STransAction *pAction) { + if (pAction->isRaw) { + return mndTransWriteSingleLog(pMnode, pTrans, pAction); + } else { + return mndTransSendSingleMsg(pMnode, pTrans, pAction); + } +} + static int32_t mndTransSendActionMsg(SMnode *pMnode, STrans *pTrans, SArray *pArray) { int32_t numOfActions = taosArrayGetSize(pArray); + int32_t code = 0; for (int32_t action = 0; action < numOfActions; ++action) { STransAction *pAction = taosArrayGet(pArray, action); - if (pAction == NULL) continue; - - if (pAction->msgSent) { - if (pAction->msgReceived) { - continue; - } else { - if (pTrans->parallel == TRN_EXEC_ONE_BY_ONE) { - break; - } else { - continue; - } - } - } - - int64_t signature = pTrans->id; - signature = (signature << 32); - signature += action; - - SRpcMsg rpcMsg = {.msgType = pAction->msgType, .contLen = pAction->contLen, .info.ahandle = (void *)signature}; - rpcMsg.pCont = rpcMallocCont(pAction->contLen); - if (rpcMsg.pCont == NULL) { - terrno = TSDB_CODE_OUT_OF_MEMORY; - return -1; - } - memcpy(rpcMsg.pCont, pAction->pCont, pAction->contLen); - - if (tmsgSendReq(&pAction->epSet, &rpcMsg) == 0) { - mDebug("trans:%d, action:%d is sent to %s:%u", pTrans->id, action, pAction->epSet.eps[pAction->epSet.inUse].fqdn, - pAction->epSet.eps[pAction->epSet.inUse].port); - pAction->msgSent = 1; - pAction->msgReceived = 0; - pAction->errCode = 0; - if (pTrans->parallel == TRN_EXEC_ONE_BY_ONE) { - break; - } - } else { - pAction->msgSent = 0; - pAction->msgReceived = 0; - pAction->errCode = terrno; - mError("trans:%d, action:%d not send since %s", pTrans->id, action, terrstr()); - return -1; + code = mndTransExecSingleAction(pMnode, pTrans, pAction); + if (code != 0 && code != TSDB_CODE_ACTION_IN_PROGRESS) { + break; } } - return 0; + return code; } static int32_t mndTransExecuteActions(SMnode *pMnode, STrans *pTrans, SArray *pArray) { @@ -1075,35 +1040,52 @@ static int32_t mndTransExecuteUndoActions(SMnode *pMnode, STrans *pTrans) { return code; } +static int32_t mndTransExecuteCommitActions(SMnode *pMnode, STrans *pTrans) { + int32_t code = mndTransExecuteLogs(pMnode, pTrans->commitActions); + if (code != 0) { + mError("failed to execute commitActions since %s", terrstr()); + } + return code; +} + static bool mndTransPerformPrepareStage(SMnode *pMnode, STrans *pTrans) { bool continueExec = true; - pTrans->stage = TRN_STAGE_REDO_LOG; - mDebug("trans:%d, stage from prepare to redoLog", pTrans->id); + pTrans->stage = TRN_STAGE_REDO_ACTION; + mDebug("trans:%d, stage from prepare to redoAction", pTrans->id); return continueExec; } -static bool mndTransPerformRedoLogStage(SMnode *pMnode, STrans *pTrans) { - bool continueExec = true; - int32_t code = mndTransExecuteRedoLogs(pMnode, pTrans); +static bool mndTransExecuteRedoActionsOneByOne(SMnode *pMnode, STrans *pTrans) { + bool continueExec = true; + if (pTrans->redoActionPos >= taosArrayGetSize(pTrans->redoActions)) return continueExec; + STransAction *pAction = taosArrayGet(pTrans->redoActions, pTrans->redoActionPos); + int32_t code = mndTransExecSingleAction(pMnode, pTrans, pAction); if (code == 0) { - pTrans->code = 0; - pTrans->stage = TRN_STAGE_REDO_ACTION; - mDebug("trans:%d, stage from redoLog to redoAction", pTrans->id); + pTrans->redoActionPos++; + mDebug("trans:%d, redo action:%d is executed and need sync to other mnodes", pTrans->id, pAction->id); + + // todo sync these infos + } else if (code == TSDB_CODE_ACTION_IN_PROGRESS) { + mDebug("trans:%d, redo action:%d is in progress and wait it finish", pTrans->id, pAction->id); + continueExec = false; } else { - pTrans->code = terrno; - pTrans->stage = TRN_STAGE_UNDO_LOG; - mError("trans:%d, stage from redoLog to undoLog since %s", pTrans->id, terrstr()); + mError("trans:%d, redo action:%d failed to execute since %s", pTrans->id, pAction->id, terrstr()); + continueExec = false; } return continueExec; } static bool mndTransPerformRedoActionStage(SMnode *pMnode, STrans *pTrans) { - if (!pMnode->deploy && !mndIsMaster(pMnode)) return false; - bool continueExec = true; - int32_t code = mndTransExecuteRedoActions(pMnode, pTrans); + int32_t code = 0; + + if (pTrans->parallel == TRN_EXEC_ONE_BY_ONE) { + code = mndTransExecuteRedoActionsOneByOne(pMnode, pTrans); + } else { + code = mndTransExecuteRedoActions(pMnode, pTrans); + } if (code == 0) { pTrans->code = 0; @@ -1135,8 +1117,8 @@ static bool mndTransPerformCommitStage(SMnode *pMnode, STrans *pTrans) { if (code == 0) { pTrans->code = 0; - pTrans->stage = TRN_STAGE_COMMIT_LOG; - mDebug("trans:%d, stage from commit to commitLog", pTrans->id); + pTrans->stage = TRN_STAGE_COMMIT_ACTION; + mDebug("trans:%d, stage from commit to commitAction", pTrans->id); continueExec = true; } else { pTrans->code = terrno; @@ -1155,35 +1137,19 @@ static bool mndTransPerformCommitStage(SMnode *pMnode, STrans *pTrans) { return continueExec; } -static bool mndTransPerformCommitLogStage(SMnode *pMnode, STrans *pTrans) { +static bool mndTransPerformCommitActionStage(SMnode *pMnode, STrans *pTrans) { bool continueExec = true; - int32_t code = mndTransExecuteCommitLogs(pMnode, pTrans); + int32_t code = mndTransExecuteCommitActions(pMnode, pTrans); if (code == 0) { pTrans->code = 0; pTrans->stage = TRN_STAGE_FINISHED; - mDebug("trans:%d, stage from commitLog to finished", pTrans->id); + mDebug("trans:%d, stage from commitAction to finished", pTrans->id); continueExec = true; } else { pTrans->code = terrno; pTrans->failedTimes++; - mError("trans:%d, stage keep on commitLog since %s, failedTimes:%d", pTrans->id, terrstr(), pTrans->failedTimes); - continueExec = false; - } - - return continueExec; -} - -static bool mndTransPerformUndoLogStage(SMnode *pMnode, STrans *pTrans) { - bool continueExec = true; - int32_t code = mndTransExecuteUndoLogs(pMnode, pTrans); - - if (code == 0) { - pTrans->stage = TRN_STAGE_ROLLBACK; - mDebug("trans:%d, stage from undoLog to rollback", pTrans->id); - continueExec = true; - } else { - mError("trans:%d, stage keep on undoLog since %s", pTrans->id, terrstr()); + mError("trans:%d, stage keep on commitAction since %s, failedTimes:%d", pTrans->id, terrstr(), pTrans->failedTimes); continueExec = false; } @@ -1191,14 +1157,12 @@ static bool mndTransPerformUndoLogStage(SMnode *pMnode, STrans *pTrans) { } static bool mndTransPerformUndoActionStage(SMnode *pMnode, STrans *pTrans) { - if (!pMnode->deploy && !mndIsMaster(pMnode)) return false; - bool continueExec = true; int32_t code = mndTransExecuteUndoActions(pMnode, pTrans); if (code == 0) { - pTrans->stage = TRN_STAGE_UNDO_LOG; - mDebug("trans:%d, stage from undoAction to undoLog", pTrans->id); + pTrans->stage = TRN_STAGE_ROLLBACK; + mDebug("trans:%d, stage from undoAction to rollback", pTrans->id); continueExec = true; } else if (code == TSDB_CODE_ACTION_IN_PROGRESS) { mDebug("trans:%d, stage keep on undoAction since %s", pTrans->id, tstrerror(code)); @@ -1257,24 +1221,18 @@ static void mndTransExecute(SMnode *pMnode, STrans *pTrans) { case TRN_STAGE_PREPARE: continueExec = mndTransPerformPrepareStage(pMnode, pTrans); break; - case TRN_STAGE_REDO_LOG: - continueExec = mndTransPerformRedoLogStage(pMnode, pTrans); - break; case TRN_STAGE_REDO_ACTION: continueExec = mndTransPerformRedoActionStage(pMnode, pTrans); break; - case TRN_STAGE_UNDO_LOG: - continueExec = mndTransPerformUndoLogStage(pMnode, pTrans); + case TRN_STAGE_COMMIT: + continueExec = mndTransPerformCommitStage(pMnode, pTrans); + break; + case TRN_STAGE_COMMIT_ACTION: + continueExec = mndTransPerformCommitActionStage(pMnode, pTrans); break; case TRN_STAGE_UNDO_ACTION: continueExec = mndTransPerformUndoActionStage(pMnode, pTrans); break; - case TRN_STAGE_COMMIT_LOG: - continueExec = mndTransPerformCommitLogStage(pMnode, pTrans); - break; - case TRN_STAGE_COMMIT: - continueExec = mndTransPerformCommitStage(pMnode, pTrans); - break; case TRN_STAGE_ROLLBACK: continueExec = mndTransPerformRollbackStage(pMnode, pTrans); break; diff --git a/tests/test/c/sdbDump.c b/tests/test/c/sdbDump.c index 8be2822c0a..7343b4f829 100644 --- a/tests/test/c/sdbDump.c +++ b/tests/test/c/sdbDump.c @@ -283,9 +283,7 @@ void dumpTrans(SSdb *pSdb, SJson *json) { tjsonAddStringToObject(item, "createdTime", i642str(pObj->createdTime)); tjsonAddStringToObject(item, "dbUid", i642str(pObj->dbUid)); tjsonAddStringToObject(item, "dbname", pObj->dbname); - tjsonAddIntegerToObject(item, "redoLogNum", taosArrayGetSize(pObj->redoLogs)); - tjsonAddIntegerToObject(item, "undoLogNum", taosArrayGetSize(pObj->undoLogs)); - tjsonAddIntegerToObject(item, "commitLogNum", taosArrayGetSize(pObj->commitLogs)); + tjsonAddIntegerToObject(item, "commitLogNum", taosArrayGetSize(pObj->commitActions)); tjsonAddIntegerToObject(item, "redoActionNum", taosArrayGetSize(pObj->redoActions)); tjsonAddIntegerToObject(item, "undoActionNum", taosArrayGetSize(pObj->undoActions)); From b6c02346aba2473ae1d7efdee2cbd11f5eb81100 Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Tue, 31 May 2022 11:37:08 +0800 Subject: [PATCH 06/56] chore: decrease cmake version to 3.0 (#13275) [TD-16153] --- CMakeLists.txt | 2 +- cmake/cmake.define | 2 +- cmake/cmake.platform | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0436f5b259..8fe6cc69e0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.16) +cmake_minimum_required(VERSION 3.0) project( TDengine diff --git a/cmake/cmake.define b/cmake/cmake.define index a8bab17aba..5637c666b9 100644 --- a/cmake/cmake.define +++ b/cmake/cmake.define @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.16) +cmake_minimum_required(VERSION 3.0) set(CMAKE_VERBOSE_MAKEFILE OFF) diff --git a/cmake/cmake.platform b/cmake/cmake.platform index 0312f92a5b..acf17e9427 100644 --- a/cmake/cmake.platform +++ b/cmake/cmake.platform @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.16) +cmake_minimum_required(VERSION 3.0) MESSAGE("Current system is ${CMAKE_SYSTEM_NAME}") From 3759ad0ac7db6a5076b9d48b8567ec3bd7870398 Mon Sep 17 00:00:00 2001 From: Bo Ding Date: Tue, 31 May 2022 12:07:57 +0800 Subject: [PATCH 07/56] docs: enhance kafka connector tutorial (#13281) * docs: enhance kafka connector tutorial * docs: ehance kafka connector tutorial * docs: typo --- docs-cn/20-third-party/11-kafka.md | 101 ++++++++++++++++++++---- docs-en/05-get-started/_pkg_install.mdx | 2 +- docs-en/20-third-party/11-kafka.md | 84 +++++++++++++++++--- 3 files changed, 159 insertions(+), 28 deletions(-) diff --git a/docs-cn/20-third-party/11-kafka.md b/docs-cn/20-third-party/11-kafka.md index 0de5b43a39..8369806adc 100644 --- a/docs-cn/20-third-party/11-kafka.md +++ b/docs-cn/20-third-party/11-kafka.md @@ -7,7 +7,7 @@ TDengine Kafka Connector 包含两个插件: TDengine Source Connector 和 TDeng ## 什么是 Kafka Connect? -Kafka Connect 是 Apache Kafka 的一个组件,用于使其它系统,比如数据库、云服务、文件系统等能方便地连接到 Kafka。数据既可以通过 Kafka Connect 从其它系统流向 Kafka, 也可以通过 Kafka Connect 从 Kafka 流向其它系统。从其它系统读数据的插件称为 Source Connector, 写数据到其它系统的插件称为 Sink Connector。Source Connector 和 Sink Connector 都不会直接连接 Kafka Broker,Source Connector 把数据转交给 Kafka Connect。Sink Connector 从 Kafka Connect 接收数据。 +Kafka Connect 是 [Apache Kafka](https://kafka.apache.org/) 的一个组件,用于使其它系统,比如数据库、云服务、文件系统等能方便地连接到 Kafka。数据既可以通过 Kafka Connect 从其它系统流向 Kafka, 也可以通过 Kafka Connect 从 Kafka 流向其它系统。从其它系统读数据的插件称为 Source Connector, 写数据到其它系统的插件称为 Sink Connector。Source Connector 和 Sink Connector 都不会直接连接 Kafka Broker,Source Connector 把数据转交给 Kafka Connect。Sink Connector 从 Kafka Connect 接收数据。 ![TDengine Database Kafka Connector -- Kafka Connect structure](kafka/Kafka_Connect.webp) @@ -17,7 +17,7 @@ TDengine Source Connector 用于把数据实时地从 TDengine 读出来发送 ## 什么是 Confluent? -Confluent 在 Kafka 的基础上增加很多扩展功能。包括: +[Confluent](https://www.confluent.io/) 在 Kafka 的基础上增加很多扩展功能。包括: 1. Schema Registry 2. REST 代理 @@ -81,10 +81,10 @@ Development: false git clone https://github.com:taosdata/kafka-connect-tdengine.git cd kafka-connect-tdengine mvn clean package -unzip -d $CONFLUENT_HOME/share/confluent-hub-components/ target/components/packages/taosdata-kafka-connect-tdengine-0.1.0.zip +unzip -d $CONFLUENT_HOME/share/java/ target/components/packages/taosdata-kafka-connect-tdengine-*.zip ``` -以上脚本先 clone 项目源码,然后用 Maven 编译打包。打包完成后在 `target/components/packages/` 目录生成了插件的 zip 包。把这个 zip 包解压到安装插件的路径即可。安装插件的路径在配置文件 `$CONFLUENT_HOME/etc/kafka/connect-standalone.properties` 中。默认的路径为 `$CONFLUENT_HOME/share/confluent-hub-components/`。 +以上脚本先 clone 项目源码,然后用 Maven 编译打包。打包完成后在 `target/components/packages/` 目录生成了插件的 zip 包。把这个 zip 包解压到安装插件的路径即可。上面的示例中使用了内置的插件安装路径: `$CONFLUENT_HOME/share/java/`。 ### 用 confluent-hub 安装 @@ -98,7 +98,7 @@ confluent local services start ``` :::note -一定要先安装插件再启动 Confluent, 否则会出现找不到类的错误。Kafka Connect 的日志(默认路径: /tmp/confluent.xxxx/connect/logs/connect.log)中会输出成功安装的插件,据此可判断插件是否安装成功。 +一定要先安装插件再启动 Confluent, 否则加载插件会失败。 ::: :::tip @@ -125,6 +125,61 @@ Control Center is [UP] 清空数据可执行 `rm -rf /tmp/confluent.106668`。 ::: +### 验证各个组件是否启动成功 + +输入命令: + +``` +confluent local services status +``` + +如果各组件都启动成功,会得到如下输出: + +``` +Connect is [UP] +Control Center is [UP] +Kafka is [UP] +Kafka REST is [UP] +ksqlDB Server is [UP] +Schema Registry is [UP] +ZooKeeper is [UP] +``` + +### 验证插件是否安装成功 + +在 Kafka Connect 组件完全启动后,可用以下命令列出成功加载的插件: + +``` +confluent local services connect plugin list +``` + +如果成功安装,会输出如下: + +```txt {4,9} +Available Connect Plugins: +[ + { + "class": "com.taosdata.kafka.connect.sink.TDengineSinkConnector", + "type": "sink", + "version": "1.0.0" + }, + { + "class": "com.taosdata.kafka.connect.source.TDengineSourceConnector", + "type": "source", + "version": "1.0.0" + }, +...... +``` + +如果插件安装失败,请检查 Kafka Connect 的启动日志是否有异常信息,用以下命令输出日志路径: +``` +echo `cat /tmp/confluent.current`/connect/connect.stdout +``` +该命令的输出类似: `/tmp/confluent.104086/connect/connect.stdout`。 + +与日志文件 `connect.stdout` 同一目录,还有一个文件名为: `connect.properties`。在这个文件的末尾,可以看到最终生效的 `plugin.path`, 它是一系列用逗号分割的路径。如果插件安装失败,很可能是因为实际的安装路径不包含在 `plugin.path` 中。 + + ## TDengine Sink Connector 的使用 TDengine Sink Connector 的作用是同步指定 topic 的数据到 TDengine。用户无需提前创建数据库和超级表。可手动指定目标数据库的名字(见配置参数 connection.database), 也可按一定规则生成(见配置参数 connection.database.prefix)。 @@ -144,7 +199,7 @@ vi sink-demo.properties sink-demo.properties 内容如下: ```ini title="sink-demo.properties" -name=tdengine-sink-demo +name=TDengineSinkConnector connector.class=com.taosdata.kafka.connect.sink.TDengineSinkConnector tasks.max=1 topics=meters @@ -153,6 +208,7 @@ connection.user=root connection.password=taosdata connection.database=power db.schemaless=line +data.precision=ns key.converter=org.apache.kafka.connect.storage.StringConverter value.converter=org.apache.kafka.connect.storage.StringConverter ``` @@ -179,6 +235,7 @@ confluent local services connect connector load TDengineSinkConnector --config . "connection.url": "jdbc:TAOS://127.0.0.1:6030", "connection.user": "root", "connector.class": "com.taosdata.kafka.connect.sink.TDengineSinkConnector", + "data.precision": "ns", "db.schemaless": "line", "key.converter": "org.apache.kafka.connect.storage.StringConverter", "tasks.max": "1", @@ -223,10 +280,10 @@ Database changed. taos> select * from meters; ts | current | voltage | phase | groupid | location | =============================================================================================================================================================== - 2022-03-28 09:56:51.249000000 | 11.800000000 | 221.000000000 | 0.280000000 | 2 | California.LosAngeles | - 2022-03-28 09:56:51.250000000 | 13.400000000 | 223.000000000 | 0.290000000 | 2 | California.LosAngeles | - 2022-03-28 09:56:51.249000000 | 10.800000000 | 223.000000000 | 0.290000000 | 3 | California.LosAngeles | - 2022-03-28 09:56:51.250000000 | 11.300000000 | 221.000000000 | 0.350000000 | 3 | California.LosAngeles | + 2022-03-28 09:56:51.249000000 | 11.800000000 | 221.000000000 | 0.280000000 | 2 | California.LosAngeles | + 2022-03-28 09:56:51.250000000 | 13.400000000 | 223.000000000 | 0.290000000 | 2 | California.LosAngeles | + 2022-03-28 09:56:51.249000000 | 10.800000000 | 223.000000000 | 0.290000000 | 3 | California.LosAngeles | + 2022-03-28 09:56:51.250000000 | 11.300000000 | 221.000000000 | 0.350000000 | 3 | California.LosAngeles | Query OK, 4 row(s) in set (0.004208s) ``` @@ -356,21 +413,33 @@ confluent local services connect connector unload TDengineSourceConnector 2. `connection.database.prefix`: 当 connection.database 为 null 时, 目标数据库的前缀。可以包含占位符 '${topic}'。 比如 kafka_${topic}, 对于主题 'orders' 将写入数据库 'kafka_orders'。 默认 null。当为 null 时,目标数据库的名字和主题的名字是一致的。 3. `batch.size`: 分批写入每批记录数。当 Sink Connector 一次接收到的数据大于这个值时将分批写入。 4. `max.retries`: 发生错误时的最大重试次数。默认为 1。 -5. `retry.backoff.ms`: 发送错误时重试的时间间隔。单位毫秒,默认 3000。 -6. `db.schemaless`: 数据格式,必须指定为: line、json、telnet 中的一个。分别代表 InfluxDB 行协议格式、 OpenTSDB JSON 格式、 OpenTSDB Telnet 行协议格式。 +5. `retry.backoff.ms`: 发送错误时重试的时间间隔。单位毫秒,默认为 3000。 +6. `db.schemaless`: 数据格式,可选值为: + 1. line :代表 InfluxDB 行协议格式 + 2. json : 代表 OpenTSDB JSON 格式 + 3. telnet :代表 OpenTSDB Telnet 行协议格式 +7. `data.precision`: 使用 InfluxDB 行协议格式时,时间戳的精度。可选值为: + 1. ms : 表示毫秒 + 2. us : 表示微秒 + 3. ns : 表示纳秒。默认为纳秒。 ### TDengine Source Connector 特有的配置 1. `connection.database`: 源数据库名称,无缺省值。 2. `topic.prefix`: 数据导入 kafka 后 topic 名称前缀。 使用 `topic.prefix` + `connection.database` 名称作为完整 topic 名。默认为空字符串 ""。 -3. `timestamp.initial`: 数据同步起始时间。格式为'yyyy-MM-dd HH:mm:ss'。默认 "1970-01-01 00:00:00"。 -4. `poll.interval.ms`: 拉取数据间隔,单位为 ms。默认 1000。 +3. `timestamp.initial`: 数据同步起始时间。格式为'yyyy-MM-dd HH:mm:ss'。默认为 "1970-01-01 00:00:00"。 +4. `poll.interval.ms`: 拉取数据间隔,单位为 ms。默认为 1000。 5. `fetch.max.rows` : 检索数据库时最大检索条数。 默认为 100。 -6. `out.format`: 数据格式。取值 line 或 json。line 表示 InfluxDB Line 协议格式, json 表示 OpenTSDB JSON 格式。默认 line。 +6. `out.format`: 数据格式。取值 line 或 json。line 表示 InfluxDB Line 协议格式, json 表示 OpenTSDB JSON 格式。默认为 line。 + +## 其他说明 + +1. 插件的安装位置可以自定义,请参考官方文档:https://docs.confluent.io/home/connect/self-managed/install.html#install-connector-manually。 +2. 本教程的示例程序使用了 Confluent 平台,但是 TDengine Kafka Connector 本身同样适用于独立安装的 Kafka, 且配置方法相同。关于如何在独立安装的 Kafka 环境使用 Kafka Connect 插件, 请参考官方文档: https://kafka.apache.org/documentation/#connect。 ## 问题反馈 -https://github.com/taosdata/kafka-connect-tdengine/issues +无论遇到任何问题,都欢迎在本项目的 Github 仓库反馈: https://github.com/taosdata/kafka-connect-tdengine/issues。 ## 参考 diff --git a/docs-en/05-get-started/_pkg_install.mdx b/docs-en/05-get-started/_pkg_install.mdx index af04d2b70b..cf10497c96 100644 --- a/docs-en/05-get-started/_pkg_install.mdx +++ b/docs-en/05-get-started/_pkg_install.mdx @@ -12,6 +12,6 @@ Between two major release versions, some beta versions may be delivered for user For the details please refer to [Install and Uninstall](/operation/pkg-install)。 -To see the details of versions, please refer to [Download List](https://www.taosdata.com/all-downloads) and [Release Notes](https://github.com/taosdata/TDengine/releases). +To see the details of versions, please refer to [Download List](https://tdengine.com/all-downloads) and [Release Notes](https://github.com/taosdata/TDengine/releases). diff --git a/docs-en/20-third-party/11-kafka.md b/docs-en/20-third-party/11-kafka.md index 9c78a6645a..6720af8bf8 100644 --- a/docs-en/20-third-party/11-kafka.md +++ b/docs-en/20-third-party/11-kafka.md @@ -7,7 +7,7 @@ TDengine Kafka Connector contains two plugins: TDengine Source Connector and TDe ## What is Kafka Connect? -Kafka Connect is a component of Apache Kafka that enables other systems, such as databases, cloud services, file systems, etc., to connect to Kafka easily. Data can flow from other software to Kafka via Kafka Connect and Kafka to other systems via Kafka Connect. Plugins that read data from other software are called Source Connectors, and plugins that write data to other software are called Sink Connectors. Neither Source Connector nor Sink Connector will directly connect to Kafka Broker, and Source Connector transfers data to Kafka Connect. Sink Connector receives data from Kafka Connect. +Kafka Connect is a component of [Apache Kafka](https://kafka.apache.org/) that enables other systems, such as databases, cloud services, file systems, etc., to connect to Kafka easily. Data can flow from other software to Kafka via Kafka Connect and Kafka to other systems via Kafka Connect. Plugins that read data from other software are called Source Connectors, and plugins that write data to other software are called Sink Connectors. Neither Source Connector nor Sink Connector will directly connect to Kafka Broker, and Source Connector transfers data to Kafka Connect. Sink Connector receives data from Kafka Connect. ![TDengine Database Kafka Connector -- Kafka Connect](kafka/Kafka_Connect.webp) @@ -17,7 +17,7 @@ TDengine Source Connector is used to read data from TDengine in real-time and se ## What is Confluent? -Confluent adds many extensions to Kafka. include: +[Confluent](https://www.confluent.io/) adds many extensions to Kafka. include: 1. Schema Registry 2. REST Proxy @@ -79,10 +79,10 @@ Development: false git clone https://github.com:taosdata/kafka-connect-tdengine.git cd kafka-connect-tdengine mvn clean package -unzip -d $CONFLUENT_HOME/share/confluent-hub-components/ target/components/packages/taosdata-kafka-connect-tdengine-0.1.0.zip +unzip -d $CONFLUENT_HOME/share/java/ target/components/packages/taosdata-kafka-connect-tdengine-*.zip ``` -The above script first clones the project source code and then compiles and packages it with Maven. After the package is complete, the zip package of the plugin is generated in the `target/components/packages/` directory. Unzip this zip package to the path where the plugin is installed. The path to install the plugin is in the configuration file `$CONFLUENT_HOME/etc/kafka/connect-standalone.properties`. The default path is `$CONFLUENT_HOME/share/confluent-hub-components/`. +The above script first clones the project source code and then compiles and packages it with Maven. After the package is complete, the zip package of the plugin is generated in the `target/components/packages/` directory. Unzip this zip package to plugin path. We used `$CONFLUENT_HOME/share/java/` above because it's a build in plugin path. ### Install with confluent-hub @@ -96,7 +96,7 @@ confluent local services start ``` :::note -Be sure to install the plugin before starting Confluent. Otherwise, there will be a class not found error. The log of Kafka Connect (default path: /tmp/confluent.xxxx/connect/logs/connect.log) will output the successfully installed plugin, which users can use to determine whether the plugin is installed successfully. +Be sure to install the plugin before starting Confluent. Otherwise, Kafka Connect will fail to discover the plugins. ::: :::tip @@ -123,6 +123,59 @@ Control Center is [UP] To clear data, execute `rm -rf /tmp/confluent.106668`. ::: +### Check Confluent Services Status + +Use command bellow to check the status of all service: + +``` +confluent local services status +``` + +The expected output is: +``` +Connect is [UP] +Control Center is [UP] +Kafka is [UP] +Kafka REST is [UP] +ksqlDB Server is [UP] +Schema Registry is [UP] +ZooKeeper is [UP] +``` + +### Check Successfully Loaded Plugin + +After Kafka Connect was completely started, you can use bellow command to check if our plugins are installed successfully: +``` +confluent local services connect plugin list +``` + +The output should contains `TDengineSinkConnector` and `TDengineSourceConnector` as bellow: + +``` +Available Connect Plugins: +[ + { + "class": "com.taosdata.kafka.connect.sink.TDengineSinkConnector", + "type": "sink", + "version": "1.0.0" + }, + { + "class": "com.taosdata.kafka.connect.source.TDengineSourceConnector", + "type": "source", + "version": "1.0.0" + }, +...... +``` + +If not, please check the log file of Kafka Connect. To view the log file path, please execute: + +``` +echo `cat /tmp/confluent.current`/connect/connect.stdout +``` +It should produce a path like:`/tmp/confluent.104086/connect/connect.stdout` + +Besides log file `connect.stdout` there is a file named `connect.properties`. At the end of this file you can see the effective `plugin.path` which is a series of paths joined by comma. If Kafka Connect not found our plugins, it's probably because the installed path is not included in `plugin.path`. + ## The use of TDengine Sink Connector The role of the TDengine Sink Connector is to synchronize the data of the specified topic to TDengine. Users do not need to create databases and super tables in advance. The name of the target database can be specified manually (see the configuration parameter connection.database), or it can be generated according to specific rules (see the configuration parameter connection.database.prefix). @@ -142,7 +195,7 @@ vi sink-demo.properties sink-demo.properties' content is following: ```ini title="sink-demo.properties" -name=tdengine-sink-demo +name=TDengineSinkConnector connector.class=com.taosdata.kafka.connect.sink.TDengineSinkConnector tasks.max=1 topics=meters @@ -151,6 +204,7 @@ connection.user=root connection.password=taosdata connection.database=power db.schemaless=line +data.precision=ns key.converter=org.apache.kafka.connect.storage.StringConverter value.converter=org.apache.kafka.connect.storage.StringConverter ``` @@ -177,6 +231,7 @@ If the above command is executed successfully, the output is as follows: "connection.url": "jdbc:TAOS://127.0.0.1:6030", "connection.user": "root", "connector.class": "com.taosdata.kafka.connect.sink.TDengineSinkConnector", + "data.precision": "ns", "db.schemaless": "line", "key.converter": "org.apache.kafka.connect.storage.StringConverter", "tasks.max": "1", @@ -221,10 +276,10 @@ Database changed. taos> select * from meters; ts | current | voltage | phase | groupid | location | =============================================================================================================================================================== - 2022-03-28 09:56:51.249000000 | 11.800000000 | 221.000000000 | 0.280000000 | 2 | California.LoSangeles | - 2022-03-28 09:56:51.250000000 | 13.400000000 | 223.000000000 | 0.290000000 | 2 | California.LoSangeles | - 2022-03-28 09:56:51.249000000 | 10.800000000 | 223.000000000 | 0.290000000 | 3 | California.LoSangeles | - 2022-03-28 09:56:51.250000000 | 11.300000000 | 221.000000000 | 0.350000000 | 3 | California.LoSangeles | + 2022-03-28 09:56:51.249000000 | 11.800000000 | 221.000000000 | 0.280000000 | 2 | California.LosAngeles | + 2022-03-28 09:56:51.250000000 | 13.400000000 | 223.000000000 | 0.290000000 | 2 | California.LosAngeles | + 2022-03-28 09:56:51.249000000 | 10.800000000 | 223.000000000 | 0.290000000 | 3 | California.LosAngeles | + 2022-03-28 09:56:51.250000000 | 11.300000000 | 221.000000000 | 0.350000000 | 3 | California.LosAngeles | Query OK, 4 row(s) in set (0.004208s) ``` @@ -356,6 +411,7 @@ The following configuration items apply to TDengine Sink Connector and TDengine 4. `max.retries`: The maximum number of retries when an error occurs. Defaults to 1. 5. `retry.backoff.ms`: The time interval for retry when sending an error. The unit is milliseconds. The default is 3000. 6. `db.schemaless`: Data format, could be one of `line`, `json`, and `telnet`. Represent InfluxDB line protocol format, OpenTSDB JSON format, and OpenTSDB Telnet line protocol format. +7. `data.precision`: The time precision when use InfluxDB line protocol format data, could be one of `ms`, `us` and `ns`. The default is `ns`. ### TDengine Source Connector specific configuration @@ -366,7 +422,13 @@ The following configuration items apply to TDengine Sink Connector and TDengine 5. `fetch.max.rows`: The maximum number of rows retrieved when retrieving the database. Default is 100. 6. `out.format`: The data format. The value could be line or json. The line represents the InfluxDB Line protocol format, and json represents the OpenTSDB JSON format. Default is `line`. -## feedback + +## Other notes + +1. To install plugin to a customized location, refer to https://docs.confluent.io/home/connect/self-managed/install.html#install-connector-manually. +2. To use Kafka Connect without confluent, refer to https://kafka.apache.org/documentation/#connect. + +## Feedback https://github.com/taosdata/kafka-connect-tdengine/issues From eabc276ee7933cf540156bf8e35891e972af89f8 Mon Sep 17 00:00:00 2001 From: gccgdb1234 Date: Tue, 31 May 2022 12:12:49 +0800 Subject: [PATCH 08/56] docs: add some special keywords back --- docs-cn/12-taos-sql/12-keywords/index.md | 41 ++++++++++++++++++++++++ docs-en/12-taos-sql/12-keywords.md | 41 ++++++++++++++++++++++++ 2 files changed, 82 insertions(+) diff --git a/docs-cn/12-taos-sql/12-keywords/index.md b/docs-cn/12-taos-sql/12-keywords/index.md index a64a7161d0..0b9ec4de86 100644 --- a/docs-cn/12-taos-sql/12-keywords/index.md +++ b/docs-cn/12-taos-sql/12-keywords/index.md @@ -85,3 +85,44 @@ title: TDengine 参数限制与保留关键字 | CONNECTIONS | HAVING | NOT | SOFFSET | VNODES | | CONNS | ID | NOTNULL | STABLE | WAL | | COPY | IF | NOW | STABLES | WHERE | +| _C0 | _QSTART | _QSTOP | _QDURATION | _WSTART | +| _WSTOP | _WDURATION | + +## 特殊说明 +### TBNAME +`TBNAME` 可以视为超级表中一个特殊的标签,代表子表的表名。 + +获取一个超级表所有的子表名及相关的标签信息: +```mysql +SELECT TBNAME, location FROM meters; + +统计超级表下辖子表数量: +```mysql +SELECT COUNT(TBNAME) FROM meters; +``` + +以上两个查询均只支持在WHERE条件子句中添加针对标签(TAGS)的过滤条件。例如: +```mysql +taos> SELECT TBNAME, location FROM meters; + tbname | location | +================================================================== + d1004 | California.SanFrancisco | + d1003 | California.SanFrancisco | + d1002 | California.LosAngeles | + d1001 | California.LosAngeles | +Query OK, 4 row(s) in set (0.000881s) + +taos> SELECT COUNT(tbname) FROM meters WHERE groupId > 2; + count(tbname) | +======================== + 2 | +Query OK, 1 row(s) in set (0.001091s) +``` +### _QSTART/_QSTOP/_QDURATION +表示查询过滤窗口的起始,结束以及持续时间 (从2.6.0.0版本开始支持) + +### _WSTART/_WSTOP/_WDURATION +窗口切分聚合查询(例如 interval/session window/state window)中表示每个切分窗口的起始,结束以及持续时间(从 2.6.0.0 版本开始支持) + +### _c0 +表示表或超级表的第一列 \ No newline at end of file diff --git a/docs-en/12-taos-sql/12-keywords.md b/docs-en/12-taos-sql/12-keywords.md index fa750300b7..56a82a02a1 100644 --- a/docs-en/12-taos-sql/12-keywords.md +++ b/docs-en/12-taos-sql/12-keywords.md @@ -46,3 +46,44 @@ There are about 200 keywords reserved by TDengine, they can't be used as the nam | CONNECTIONS | HAVING | NOT | SOFFSET | VNODES | | CONNS | ID | NOTNULL | STable | WAL | | COPY | IF | NOW | STableS | WHERE | +| _C0 | _QSTART | _QSTOP | _QDURATION | _WSTART | +| _WSTOP | _WDURATION | + +## Explanations +### TBNAME +`TBNAME` can be considered as a special tag, which represents the name of the subtable, in STable. + +Get the table name and tag values of all subtables in a STable. +```mysql +SELECT TBNAME, location FROM meters; + +Count the number of subtables in a STable. +```mysql +SELECT COUNT(TBNAME) FROM meters; +``` + +Only filter on TAGS can be used in WHERE clause in the above two query statements. +```mysql +taos> SELECT TBNAME, location FROM meters; + tbname | location | +================================================================== + d1004 | California.SanFrancisco | + d1003 | California.SanFrancisco | + d1002 | California.LosAngeles | + d1001 | California.LosAngeles | +Query OK, 4 row(s) in set (0.000881s) + +taos> SELECT COUNT(tbname) FROM meters WHERE groupId > 2; + count(tbname) | +======================== + 2 | +Query OK, 1 row(s) in set (0.001091s) +``` +### _QSTART/_QSTOP/_QDURATION +The start, stop and duration of a query time window (Since version 2.6.0.0). + +### _WSTART/_WSTOP/_WDURATION +The start, stop and duration of aggegate query by time window, like interval, session window, state window (Since version 2.6.0.0). + +### _c0 +The first column of a table or STable. \ No newline at end of file From 28da2b487ce1218ca8614a256a3d2db23b411a31 Mon Sep 17 00:00:00 2001 From: Xuefeng Tan <1172915550@qq.com> Date: Tue, 31 May 2022 12:26:18 +0800 Subject: [PATCH 09/56] feat(docker): dockerization for TDengine 3.0 (#13232) * feat(docker): dockerization for TDengine 3.0 * feat(docker): dockerization for TDengine 3.0 --- packaging/docker/Dockerfile | 57 +++++++++++++----------------- packaging/docker/bin/entrypoint.sh | 44 ++++++++--------------- packaging/docker/bin/taos-check | 8 +++++ 3 files changed, 47 insertions(+), 62 deletions(-) create mode 100644 packaging/docker/bin/taos-check diff --git a/packaging/docker/Dockerfile b/packaging/docker/Dockerfile index 26349e2576..35bea0e65c 100644 --- a/packaging/docker/Dockerfile +++ b/packaging/docker/Dockerfile @@ -1,32 +1,25 @@ -FROM ubuntu:18.04 - -WORKDIR /root - -ARG pkgFile -ARG dirName -ARG cpuType -RUN echo ${pkgFile} && echo ${dirName} - -COPY ${pkgFile} /root/ -RUN tar -zxf ${pkgFile} -WORKDIR /root/ -RUN cd /root/${dirName}/ && /bin/bash install.sh -e no && cd /root -RUN rm /root/${pkgFile} -RUN rm -rf /root/${dirName} - -ENV DEBIAN_FRONTEND=noninteractive -RUN apt-get clean && apt-get update && apt-get install -y locales tzdata netcat && locale-gen en_US.UTF-8 -ENV LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/lib" \ - LC_CTYPE=en_US.UTF-8 \ - LANG=en_US.UTF-8 \ - LC_ALL=en_US.UTF-8 - -COPY ./bin/* /usr/bin/ - -ENV TINI_VERSION v0.19.0 -RUN bash -c 'echo -e "Downloading tini-${cpuType} ..."' -ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-${cpuType} /tini -RUN chmod +x /tini -ENTRYPOINT ["/tini", "--", "/usr/bin/entrypoint.sh"] -CMD ["taosd"] -VOLUME [ "/var/lib/taos", "/var/log/taos", "/corefile" ] +FROM ubuntu:18.04 + +WORKDIR /root + +ARG pkgFile +ARG dirName +ARG cpuType +RUN echo ${pkgFile} && echo ${dirName} + +COPY ${pkgFile} /root/ +ENV TINI_VERSION v0.19.0 +ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-${cpuType} /tini +ENV DEBIAN_FRONTEND=noninteractive +WORKDIR /root/ +RUN tar -zxf ${pkgFile} && cd /root/${dirName}/ && /bin/bash install.sh -e no && cd /root && rm /root/${pkgFile} && rm -rf /root/${dirName} && apt-get update && apt-get install -y locales tzdata netcat && locale-gen en_US.UTF-8 && apt-get clean && rm -rf /var/lib/apt/lists/ && chmod +x /tini + +ENV LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/lib" \ + LC_CTYPE=en_US.UTF-8 \ + LANG=en_US.UTF-8 \ + LC_ALL=en_US.UTF-8 +COPY ./bin/* /usr/bin/ + +ENTRYPOINT ["/tini", "--", "/usr/bin/entrypoint.sh"] +CMD ["taosd"] +VOLUME [ "/var/lib/taos", "/var/log/taos", "/corefile" ] diff --git a/packaging/docker/bin/entrypoint.sh b/packaging/docker/bin/entrypoint.sh index 5fb441004d..f4be349c0d 100644 --- a/packaging/docker/bin/entrypoint.sh +++ b/packaging/docker/bin/entrypoint.sh @@ -11,39 +11,22 @@ DISABLE_ADAPTER=${TAOS_DISABLE_ADAPTER:-0} unset TAOS_DISABLE_ADAPTER # to get mnodeEpSet from data dir -DATA_DIR=${TAOS_DATA_DIR:-/var/lib/taos} +DATA_DIR=$(taosd -C|grep -E 'dataDir.*(\S+)' -o |head -n1|sed 's/dataDir *//') +DATA_DIR=${DATA_DIR:-/var/lib/taos} -# append env to custom taos.cfg -CFG_DIR=/tmp/taos -CFG_FILE=$CFG_DIR/taos.cfg - -mkdir -p $CFG_DIR >/dev/null 2>&1 - -[ -f /etc/taos/taos.cfg ] && cat /etc/taos/taos.cfg | grep -E -v "^#|^\s*$" >$CFG_FILE -env-to-cfg >>$CFG_FILE - -FQDN=$(cat $CFG_FILE | grep -E -v "^#|^$" | grep fqdn | tail -n1 | sed -E 's/.*fqdn\s+//') +FQDN=$(taosd -C|grep -E 'fqdn.*(\S+)' -o |head -n1|sed 's/fqdn *//') # ensure the fqdn is resolved as localhost grep "$FQDN" /etc/hosts >/dev/null || echo "127.0.0.1 $FQDN" >>/etc/hosts - +FIRSET_EP=$(taosd -C|grep -E 'firstEp.*(\S+)' -o |head -n1|sed 's/firstEp *//') # parse first ep host and port -FIRST_EP_HOST=${TAOS_FIRST_EP%:*} -FIRST_EP_PORT=${TAOS_FIRST_EP#*:} +FIRST_EP_HOST=${FIRSET_EP%:*} +FIRST_EP_PORT=${FIRSET_EP#*:} # in case of custom server port -SERVER_PORT=$(cat $CFG_FILE | grep -E -v "^#|^$" | grep serverPort | tail -n1 | sed -E 's/.*serverPort\s+//') +SERVER_PORT=$(taosd -C|grep -E 'serverPort.*(\S+)' -o |head -n1|sed 's/serverPort *//') SERVER_PORT=${SERVER_PORT:-6030} -# for other binaries like interpreters -if echo $1 | grep -E "taosd$" - >/dev/null; then - true # will run taosd -else - cp -f $CFG_FILE /etc/taos/taos.cfg || true - $@ - exit $? -fi - set +e ulimit -c unlimited # set core files pattern, maybe failed @@ -62,22 +45,23 @@ fi # if has mnode ep set or the host is first ep or not for cluster, just start. if [ -f "$DATA_DIR/dnode/mnodeEpSet.json" ] || [ "$TAOS_FQDN" = "$FIRST_EP_HOST" ]; then - $@ -c $CFG_DIR + $@ # others will first wait the first ep ready. else if [ "$TAOS_FIRST_EP" = "" ]; then echo "run TDengine with single node." - $@ -c $CFG_DIR + $@ exit $? fi while true; do - es=0 - taos -h $FIRST_EP_HOST -P $FIRST_EP_PORT -n startup >/dev/null || es=$? - if [ "$es" -eq 0 ]; then + es=$(taos -h $FIRST_EP_HOST -P $FIRST_EP_PORT --check) + echo ${es} + if [ "${es%%:*}" -eq 2 ]; then + echo "execute create dnode" taos -h $FIRST_EP_HOST -P $FIRST_EP_PORT -s "create dnode \"$FQDN:$SERVER_PORT\";" break fi sleep 1s done - $@ -c $CFG_DIR + $@ fi diff --git a/packaging/docker/bin/taos-check b/packaging/docker/bin/taos-check new file mode 100644 index 0000000000..5dc06b6018 --- /dev/null +++ b/packaging/docker/bin/taos-check @@ -0,0 +1,8 @@ +#!/bin/sh +es=$(taos --check) +code=${es%%:*} +if [ "$code" -ne "0" ] && [ "$code" -ne "4" ]; then + exit 0 +fi +echo $es +exit 1 From 1f3b32f2ee75a0b333a1f69b49b639bb6efdd49a Mon Sep 17 00:00:00 2001 From: gccgdb1234 Date: Tue, 31 May 2022 12:52:54 +0800 Subject: [PATCH 10/56] docs: add elapsed function --- docs-cn/12-taos-sql/07-function.md | 26 ++++++++++++++++++++++++++ docs-en/12-taos-sql/07-function.md | 26 ++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) diff --git a/docs-cn/12-taos-sql/07-function.md b/docs-cn/12-taos-sql/07-function.md index 78389609db..2349e6aa3c 100644 --- a/docs-cn/12-taos-sql/07-function.md +++ b/docs-cn/12-taos-sql/07-function.md @@ -321,6 +321,32 @@ taos> SELECT HISTOGRAM(voltage, 'log_bin', '{"start": 1, "factor": 3, "count": 3 {"lower_bin":27, "upper_bin":inf, "count":1} | ``` +### ELAPSED + +```mysql +SELECT ELAPSED(field_name[, time_unit]) FROM { tb_name | stb_name } [WHERE clause] [INTERVAL(interval [, offset]) [SLIDING sliding]]; +``` + +**功能说明**:elapsed函数表达了统计周期内连续的时间长度,和twa函数配合使用可以计算统计曲线下的面积。在通过INTERVAL子句指定窗口的情况下,统计在给定时间范围内的每个窗口内有数据覆盖的时间范围;如果没有INTERVAL子句,则返回整个给定时间范围内的有数据覆盖的时间范围。注意,ELAPSED返回的并不是时间范围的绝对值,而是绝对值除以time_unit所得到的单位个数。 + +**返回结果类型**:Double + +**应用字段**:Timestamp类型 + +**支持的版本**:2.6.0.0 及以后的版本。 + +**适用于**: 表,超级表,嵌套查询的外层查询 + +**说明**: +- field_name参数只能是表的第一列,即timestamp主键列。 +- 按time_unit参数指定的时间单位返回,最小是数据库的时间分辨率。time_unit参数未指定时,以数据库的时间分辨率为时间单位。 +- 可以和interval组合使用,返回每个时间窗口的时间戳差值。需要特别注意的是,除第一个时间窗口和最后一个时间窗口外,中间窗口的时间戳差值均为窗口长度。 +- order by asc/desc不影响差值的计算结果。 +- 对于超级表,需要和group by tbname子句组合使用,不可以直接使用。 +- 对于普通表,不支持和group by子句组合使用。 +- 对于嵌套查询,仅当内层查询会输出隐式时间戳列时有效。例如select elapsed(ts) from (select diff(value) from sub1)语句,diff函数会让内层查询输出隐式时间戳列,此为主键列,可以用于elapsed函数的第一个参数。相反,例如select elapsed(ts) from (select * from sub1) 语句,ts列输出到外层时已经没有了主键列的含义,无法使用elapsed函数。此外,elapsed函数作为一个与时间线强依赖的函数,形如select elapsed(ts) from (select diff(value) from st group by tbname)尽管会返回一条计算结果,但并无实际意义,这种用法后续也将被限制。 +- 不支持与leastsquares、diff、derivative、top、bottom、last_row、interp等函数混合使用。 + ## 选择函数 在使用所有的选择函数的时候,可以同时指定输出 ts 列或标签列(包括 tbname),这样就可以方便地知道被选出的值是源于哪个数据行的。 diff --git a/docs-en/12-taos-sql/07-function.md b/docs-en/12-taos-sql/07-function.md index 1c2961d7b5..3589efe9cd 100644 --- a/docs-en/12-taos-sql/07-function.md +++ b/docs-en/12-taos-sql/07-function.md @@ -327,6 +327,32 @@ taos> SELECT HISTOGRAM(voltage, 'log_bin', '{"start": 1, "factor": 3, "count": 3 {"lower_bin":27, "upper_bin":inf, "count":1} | ``` +### ELAPSED + +```mysql +SELECT ELAPSED(field_name[, time_unit]) FROM { tb_name | stb_name } [WHERE clause] [INTERVAL(interval [, offset]) [SLIDING sliding]]; +``` + +**Description**:`elapsed` function can be used to calculate the continuous time length in which there is valid data. If it's used with `INTERVAL` clause, the returned result is the calcualted time length within each time window. If it's used without `INTERVAL` caluse, the returned result is the calculated time length within the specified time range. Please be noted that the return value of `elapsed` is the number of `time_unit` in the calculated time length. + +**Return value type**:Double + +**Applicable Column type**:Timestamp + +**Applicable versions**:Sicne version 2.6.0.0 + +**Applicable tables**: table, STable, outter in nested query + +**Explanations**: +- `field_name` parameter can only be the first column of a table, i.e. timestamp primary key. +- The minimum value of `time_unit` is the time precision of the database. If `time_unit` is not specified, the time precision of the database is used as the default ime unit. +- It can be used with `INTERVAL` to get the time valid time length of each time window. Please be noted that the return value is same as the time window for all time windows except for the first and the last time window. +- `order by asc/desc` has no effect on the result. +- `group by tbname` must be used together when `elapsed` is used against a STable. +- `group by` must NOT be used together when `elapsed` is used against a table or sub table. +- When used in nested query, it's only applicable when the inner query outputs an implicit timestamp column as the primary key. For example, `select elapsed(ts) from (select diff(value) from sub1)` is legal usage while `select elapsed(ts) from (select * from sub1)` is not. +- It can't be used with `leastsquares`, `diff`, `derivative`, `top`, `bottom`, `last_row`, `interp`. + ## Selection Functions When any select function is used, timestamp column or tag columns including `tbname` can be specified to show that the selected value are from which rows. From 6dbd215ab52ca6238b56d5039712c10c4b02ba9a Mon Sep 17 00:00:00 2001 From: gccgdb1234 Date: Tue, 31 May 2022 13:18:14 +0800 Subject: [PATCH 11/56] docs: add data types for 3.0 --- docs-cn/12-taos-sql/01-data-type.md | 46 +++++++++++++++++++++-------- 1 file changed, 34 insertions(+), 12 deletions(-) diff --git a/docs-cn/12-taos-sql/01-data-type.md b/docs-cn/12-taos-sql/01-data-type.md index be5c9a8cb4..dd68c24cd5 100644 --- a/docs-cn/12-taos-sql/01-data-type.md +++ b/docs-cn/12-taos-sql/01-data-type.md @@ -4,6 +4,8 @@ title: 支持的数据类型 description: "TDengine 支持的数据类型: 时间戳、浮点型、JSON 类型等" --- +## 时间戳 + 使用 TDengine,最重要的是时间戳。创建并插入记录、查询历史记录的时候,均需要指定时间戳。时间戳有如下规则: - 时间格式为 `YYYY-MM-DD HH:mm:ss.MS`,默认时间分辨率为毫秒。比如:`2017-08-12 18:25:58.128` @@ -17,22 +19,28 @@ TDengine 缺省的时间戳精度是毫秒,但通过在 `CREATE DATABASE` 时 ```sql CREATE DATABASE db_name PRECISION 'ns'; ``` +## 数据类型 -在 TDengine 中,普通表的数据模型中可使用以下 10 种数据类型。 +在 TDengine 中,普通表的数据模型中可使用以下数据类型。 | # | **类型** | **Bytes** | **说明** | | --- | :-------: | --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| 1 | TIMESTAMP | 8 | 时间戳。缺省精度毫秒,可支持微秒和纳秒。从格林威治时间 1970-01-01 00:00:00.000 (UTC/GMT) 开始,计时不能早于该时间。(从 2.0.18.0 版本开始,已经去除了这一时间范围限制)(从 2.1.5.0 版本开始支持纳秒精度) | -| 2 | INT | 4 | 整型,范围 [-2^31+1, 2^31-1], -2^31 用作 NULL | -| 3 | BIGINT | 8 | 长整型,范围 [-2^63+1, 2^63-1], -2^63 用作 NULL | -| 4 | FLOAT | 4 | 浮点型,有效位数 6-7,范围 [-3.4E38, 3.4E38] | -| 5 | DOUBLE | 8 | 双精度浮点型,有效位数 15-16,范围 [-1.7E308, 1.7E308] | -| 6 | BINARY | 自定义 | 记录单字节字符串,建议只用于处理 ASCII 可见字符,中文等多字节字符需使用 nchar。理论上,最长可以有 16374 字节。binary 仅支持字符串输入,字符串两端需使用单引号引用。使用时须指定大小,如 binary(20) 定义了最长为 20 个单字节字符的字符串,每个字符占 1 byte 的存储空间,总共固定占用 20 bytes 的空间,此时如果用户字符串超出 20 字节将会报错。对于字符串内的单引号,可以用转义字符反斜线加单引号来表示,即 `\’`。 | -| 7 | SMALLINT | 2 | 短整型, 范围 [-32767, 32767], -32768 用作 NULL | -| 8 | TINYINT | 1 | 单字节整型,范围 [-127, 127], -128 用作 NULL | -| 9 | BOOL | 1 | 布尔型,{true, false} | -| 10 | NCHAR | 自定义 | 记录包含多字节字符在内的字符串,如中文字符。每个 nchar 字符占用 4 bytes 的存储空间。字符串两端使用单引号引用,字符串内的单引号需用转义字符 `\’`。nchar 使用时须指定字符串大小,类型为 nchar(10) 的列表示此列的字符串最多存储 10 个 nchar 字符,会固定占用 40 bytes 的空间。如果用户字符串长度超出声明长度,将会报错。 | -| 11 | JSON | | json 数据类型, 只有 tag 可以是 json 格式 | +| 1 | TIMESTAMP | 8 | 时间戳。缺省精度毫秒,可支持微秒和纳秒。从格林威治时间 1970-01-01 00:00:00.000 (UTC/GMT) 开始,计时不能早于该时间。(从 2.0.18.0 版本开始,已经去除了这一时间范围限制)(从 2.1.5.0 版本开始支持纳秒精度) | +| 2 | INT | 4 | 整型,范围 [-2^31, 2^31-1] | +| 3 | INT UNSIGNED| 4| 无符号整数,[0, 2^32-1] +| 4 | BIGINT | 8 | 长整型,范围 [-2^63, 2^63-1] | +| 5 | BIGINT UNSIGNED | 8 | 长整型,范围 [0, 2^64-1] | +| 6 | FLOAT | 4 | 浮点型,有效位数 6-7,范围 [-3.4E38, 3.4E38] | +| 7 | DOUBLE | 8 | 双精度浮点型,有效位数 15-16,范围 [-1.7E308, 1.7E308] | +| 8 | BINARY | 自定义 | 记录单字节字符串,建议只用于处理 ASCII 可见字符,中文等多字节字符需使用 nchar。理论上,最长可以有 16374 字节。binary 仅支持字符串输入,字符串两端需使用单引号引用。使用时须指定大小,如 binary(20) 定义了最长为 20 个单字节字符的字符串,每个字符占 1 byte 的存储空间,总共固定占用 20 bytes 的空间,此时如果用户字符串超出 20 字节将会报错。对于字符串内的单引号,可以用转义字符反斜线加单引号来表示,即 `\’`。 | +| 9 | SMALLINT | 2 | 短整型, 范围 [-32768, 32767] | +| 10 | SMALLINT UNSIGNED | 2| 无符号短整型,范围 [0, 655357] | +| 11 | TINYINT | 1 | 单字节整型,范围 [-128, 127] | +| 12 | TINYINT UNSIGNED | 1 | 无符号单字节整型,范围 [0, 255] | +| 13 | BOOL | 1 | 布尔型,{true, false} | +| 14 | NCHAR | 自定义 | 记录包含多字节字符在内的字符串,如中文字符。每个 nchar 字符占用 4 bytes 的存储空间。字符串两端使用单引号引用,字符串内的单引号需用转义字符 `\’`。nchar 使用时须指定字符串大小,类型为 nchar(10) 的列表示此列的字符串最多存储 10 个 nchar 字符,会固定占用 40 bytes 的空间。如果用户字符串长度超出声明长度,将会报错。 | +| 15 | JSON | | json 数据类型, 只有 tag 可以是 json 格式 | +| 16 | VARCHAR | 自定义 | BINARY类型的别名 | :::tip TDengine 对 SQL 语句中的英文字符不区分大小写,自动转化为小写执行。因此用户大小写敏感的字符串及密码,需要使用单引号将字符串引起来。 @@ -48,3 +56,17 @@ TDengine 对 SQL 语句中的英文字符不区分大小写,自动转化为小 SQL 语句中的数值类型将依据是否存在小数点,或使用科学计数法表示,来判断数值类型是否为整型或者浮点型,因此在使用时要注意相应类型越界的情况。例如,9999999999999999999 会认为超过长整型的上边界而溢出,而 9999999999999999999.0 会被认为是有效的浮点数。 ::: + +## 常量 +TDengine支持多个类型的常量,细节如下表: + +| # | **语法** | **类型** | **说明** | +| --- | :-------: | --------- | -------------------------------------- | +| 1 | [{+ | -}]123 | BIGINT | 整型数值的字面量的类型均为BIGINT。如果用户输入超过了BIGINT的表示范围,TDengine 按BIGINT对数值进行截断。| +| 2 | 123.45 | DOUBLE | 浮点数值的字面量的类型均为DOUBLE。TDengine依据是否存在小数点,或使用科学计数法表示,来判断数值类型是否为整型或者浮点型,因此在使用时要注意相应类型越界的情况。例如,9999999999999999999会认为超过长整型的上边界而溢出,而9999999999999999999.0会被认为是有效的浮点数。| +| 3 | 1.2E3 | DOUBLE | 科学计数法的字面量的类型为DOUBLE。| +| 4 | 'abc' | BINARY | 单引号括住的内容为字符串字面值,其类型为BINARY,BINARY的size为实际的字符个数。对于字符串内的单引号,可以用转义字符反斜线加单引号来表示,即 \'。| +| 5 | "abc" | BINARY | 双引号括住的内容为字符串字面值,其类型为BINARY,BINARY的size为实际的字符个数。对于字符串内的双引号,可以用转义字符反斜线加单引号来表示,即 \"。 | +| 6 | TIMESTAMP {'literal' | "literal"} | TIMESTAMP | TIMESTAMP关键字表示后面的字符串字面量需要被解释为TIMESTAMP类型。字符串需要满足YYYY-MM-DD HH:mm:ss.MS格式,其时间分辨率为当前数据库的时间分辨率。 | +| 7 | {TRUE | FALSE} | BOOL | 布尔类型字面量。 | +| 8 | {'' | "" | '\t' | "\t" | ' ' | " " | NULL } | -- | 空值字面量。可以用于任意类型。| From 27ccabaa6e65a889e2a396d6243bd1551a658f1a Mon Sep 17 00:00:00 2001 From: Chait Diwadkar <94201190+cdiwadkar16@users.noreply.github.com> Date: Mon, 30 May 2022 20:19:09 -0700 Subject: [PATCH 12/56] docs:cdiwadkar16-patch-4-66 - few rewrites --- docs-en/27-train-faq/01-faq.md | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/docs-en/27-train-faq/01-faq.md b/docs-en/27-train-faq/01-faq.md index 4397751709..e182e25b9e 100644 --- a/docs-en/27-train-faq/01-faq.md +++ b/docs-en/27-train-faq/01-faq.md @@ -5,38 +5,38 @@ title: Frequently Asked Questions ## Submit an Issue -If the tips in FAQ don't help much, please submit an issue on [GitHub](https://github.com/taosdata/TDengine) to describe your problem description, including TDengine version, hardware and OS information, the steps to reproduce the problem, etc. It would be very helpful if you package the contents in `/var/log/taos` and `/etc/taos` and upload. These two are the default directories used by TDengine, if they have been changed in your configuration, please use according to the actual configuration. It's recommended to firstly set `debugFlag` to 135 in `taos.cfg`, restart `taosd`, then reproduce the problem and collect logs. If you don't want to restart, an alternative way of setting `debugFlag` is executing `alter dnode debugFlag 135` command in TDengine CLI `taos`. During normal running, however, please make sure `debugFlag` is set to 131. +If the tips in FAQ don't help much, please submit an issue on [GitHub](https://github.com/taosdata/TDengine) to describe your problem. In your description please include the TDengine version, hardware and OS information, the steps to reproduce the problem and any other relevant information. It would be very helpful if you can package the contents in `/var/log/taos` and `/etc/taos` and upload. These two are the default directories used by TDengine. If you have changed the default directories in your configuration, please package the files in your configured directories. We recommended setting `debugFlag` to 135 in `taos.cfg`, restarting `taosd`, then reproducing the problem and collecting the logs. If you don't want to restart, an alternative way of setting `debugFlag` is executing `alter dnode debugFlag 135` command in TDengine CLI `taos`. During normal running, however, please make sure `debugFlag` is set to 131. ## Frequently Asked Questions ### 1. How to upgrade to TDengine 2.0 from older version? -version 2.x is not compatible with version 1.x regarding configuration file and data file, please do following before upgrading: +version 2.x is not compatible with version 1.x. With regard to the configuration and data files, please perform the following steps before upgrading. Please follow data integrity, security, backup and other relevant SOPs, best practices before removing/deleting any data. -1. Delete configuration files: `sudo rm -rf /etc/taos/taos.cfg` +1. Delete configuration files: `sudo rm -rf /etc/taos/taos.cfg` 2. Delete log files: `sudo rm -rf /var/log/taos/` 3. Delete data files if the data doesn't need to be kept: `sudo rm -rf /var/lib/taos/` -4. Install latests 2.x version -5. If the data needs to be kept and migrated to newer version, please contact professional service of TDengine for assistance +4. Install latest 2.x version +5. If the data needs to be kept and migrated to newer version, please contact professional service at TDengine for assistance. ### 2. How to handle "Unable to establish connection"? -When the client is unable to connect to the server, you can try following ways to find out why. +When the client is unable to connect to the server, you can try the following ways to troubleshoot and resolve the problem. 1. Check the network - - Check if the hosts where the client and server are running can be accessible to each other, for example by `ping` command. - - Check if the TCP/UDP on port 6030-6042 are open for access if firewall is enabled. It's better to firstly disable firewall for diagnostics. - - Check if the FQDN and serverPort are configured correctly in `taos.cfg` used by the server side - - Check if the `firstEp` is set properly in the `taos.cfg` used by the client side + - Check if the hosts where the client and server are running are accessible to each other, for example by `ping` command. + - Check if the TCP/UDP on port 6030-6042 are open for access if firewall is enabled. If possible, disable the firewall for diagnostics, but please ensure that you are following security and other relevant protocols. + - Check if the FQDN and serverPort are configured correctly in `taos.cfg` used by the server side. + - Check if the `firstEp` is set properly in the `taos.cfg` used by the client side. 2. Make sure the client version and server version are same. 3. On server side, check the running status of `taosd` by executing `systemctl status taosd` . If your server is started using another way instead of `systemctl`, use the proper method to check whether the server process is running normally. -4. If using connector of Python, Java, Go, Rust, C#, node.JS on Linux to connect toe the server, please make sure `libtaos.so` is in directory `/usr/local/taos/driver` and `/usr/local/taos/driver` is in system lib search environment variable `LD_LIBRARY_PATH`. +4. If using connector of Python, Java, Go, Rust, C#, node.JS on Linux to connect to the server, please make sure `libtaos.so` is in directory `/usr/local/taos/driver` and `/usr/local/taos/driver` is in system lib search environment variable `LD_LIBRARY_PATH`. -5. If using connector on Windows, please make sure `C:\TDengine\driver\taos.dll` is in your system lib search path, it's suggested to put `taos.dll` under `C:\Windows\System32`. +5. If using connector on Windows, please make sure `C:\TDengine\driver\taos.dll` is in your system lib search path. We recommend putting `taos.dll` under `C:\Windows\System32`. 6. Some advanced network diagnostics tools @@ -45,7 +45,7 @@ When the client is unable to connect to the server, you can try following ways t Check whether a TCP port on server side is open: `nc -l {port}` Check whether a TCP port on client side is open: `nc {hostIP} {port}` - - On Windows system `Net-TestConnection -ComputerName {fqdn} -Port {port}` on PowerShell can be used to check whether the port on serer side is open for access. + - On Windows system `Net-TestConnection -ComputerName {fqdn} -Port {port}` on PowerShell can be used to check whether the port on server side is open for access. 7. TDengine CLI `taos` can also be used to check network, please refer to [TDengine CLI](/reference/taos-shell). From 0171ac5266428c828797eb88bf49a3a6c7f67873 Mon Sep 17 00:00:00 2001 From: Chait Diwadkar <94201190+cdiwadkar16@users.noreply.github.com> Date: Mon, 30 May 2022 21:11:38 -0700 Subject: [PATCH 13/56] docs:cdiwadkar16-patch-4-67 - minor --- docs-en/27-train-faq/03-docker.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs-en/27-train-faq/03-docker.md b/docs-en/27-train-faq/03-docker.md index 8f27c35d79..afee13c137 100644 --- a/docs-en/27-train-faq/03-docker.md +++ b/docs-en/27-train-faq/03-docker.md @@ -3,15 +3,15 @@ sidebar_label: TDengine in Docker title: Deploy TDengine in Docker --- -Even though it's not recommended to deploy TDengine using docker in production system, docker is still very useful in development environment, especially when your host is not Linux. From version 2.0.14.0, the official image of TDengine can support X86-64, X86, arm64, and rm32 . +We do not recommend deploying TDengine using Docker in a production system. However, Docker is still very useful in a development environment, especially when your host is not Linux. From version 2.0.14.0, the official image of TDengine can support X86-64, X86, arm64, and rm32 . -In this chapter a simple step by step guide of using TDengine in docker is introduced. +In this chapter we introduce a simple step by step guide to use TDengine in Docker. ## Install Docker -The installation of docker please refer to [Get Docker](https://docs.docker.com/get-docker/). +To install Docker please refer to [Get Docker](https://docs.docker.com/get-docker/). -After docker is installed, you can check whether Docker is installed properly by displaying Docker version. +After Docker is installed, you can check whether Docker is installed properly by displaying Docker version. ```bash $ docker -v @@ -27,7 +27,7 @@ $ docker run -d -p 6030-6049:6030-6049 -p 6030-6049:6030-6049/udp tdengine/tdeng 526aa188da767ae94b244226a2b2eec2b5f17dd8eff592893d9ec0cd0f3a1ccd ``` -In the above command, a docker container is started to run TDengine server, the port range 6030-6049 of the container is mapped to host port range 6030-6049. If port range 6030-6049 has been occupied on the host, please change to an available host port range. Regarding the requirements about ports on the host, please refer to [Port Configuration](/reference/config/#serverport). +In the above command, a docker container is started to run TDengine server, the port range 6030-6049 of the container is mapped to host port range 6030-6049. If port range 6030-6049 has been occupied on the host, please change to an available host port range. For port requirements on the host, please refer to [Port Configuration](/reference/config/#serverport). - **docker run**: Launch a docker container - **-d**: the container will run in background mode @@ -95,7 +95,7 @@ In TDengine CLI, SQL commands can be executed to create/drop databases, tables, ### Access TDengine from host -If `-p` used to map ports properly between host and container, it's also able to access TDengine in container from the host as long as `firstEp` is configured correctly for the client on host. +If option `-p` used to map ports properly between host and container, it's also able to access TDengine in container from the host as long as `firstEp` is configured correctly for the client on host. ``` $ taos @@ -271,7 +271,7 @@ Below is an example output: ### Access TDengine from 3rd party tools -A lot of 3rd party tools can be used to write data into TDengine through `taosAdapter` , for details please refer to [3rd party tools](/third-party/). +A lot of 3rd party tools can be used to write data into TDengine through `taosAdapter`, for details please refer to [3rd party tools](/third-party/). There is nothing different from the 3rd party side to access TDengine server inside a container, as long as the end point is specified correctly, the end point should be the FQDN and the mapped port of the host. From c8ed2f622968fb002f20f72cab85e0ac7779b21c Mon Sep 17 00:00:00 2001 From: Chait Diwadkar <94201190+cdiwadkar16@users.noreply.github.com> Date: Mon, 30 May 2022 21:37:38 -0700 Subject: [PATCH 14/56] docs:cdiwadkar16-patch-4-69 - changed link from FQDN blog in Chinese to English FAQ on troubleshooting unable to establish connection/fqdn error. --- docs-en/14-reference/03-connector/node.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs-en/14-reference/03-connector/node.mdx b/docs-en/14-reference/03-connector/node.mdx index 0774c35d62..8f586acde4 100644 --- a/docs-en/14-reference/03-connector/node.mdx +++ b/docs-en/14-reference/03-connector/node.mdx @@ -225,7 +225,7 @@ See [video tutorial](https://www.taosdata.com/blog/2020/11/11/1957.html) for the 2. "Unable to establish connection", "Unable to resolve FQDN" - Usually, root cause is the FQDN is not configured correctly. You can refer to [How to understand TDengine's FQDN (In Chinese)](https://www.taosdata.com/blog/2021/07/29/2741.html). + Usually, the root cause is an incorrect FQDN configuration. You can refer to this section in the [FAQ](https://docs.tdengine.com/2.4/train-faq/faq/#2-how-to-handle-unable-to-establish-connection) to troubleshoot. ## Important Updates From c3eec56ab115b7b6ca5cfee6f0be33bdec34541e Mon Sep 17 00:00:00 2001 From: Chait Diwadkar <94201190+cdiwadkar16@users.noreply.github.com> Date: Mon, 30 May 2022 21:33:33 -0700 Subject: [PATCH 15/56] docs:cdiwadkar16-patch-4-68 - changed link from FQDN blog in Chinese to FAQ section. --- docs-en/14-reference/03-connector/csharp.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs-en/14-reference/03-connector/csharp.mdx b/docs-en/14-reference/03-connector/csharp.mdx index 1b0748fbd0..5eb322cf91 100644 --- a/docs-en/14-reference/03-connector/csharp.mdx +++ b/docs-en/14-reference/03-connector/csharp.mdx @@ -179,7 +179,7 @@ namespace TDengineExample 1. "Unable to establish connection", "Unable to resolve FQDN" - Usually, it cause by the FQDN configuration is incorrect, you can refer to [How to understand TDengine's FQDN (Chinese)](https://www.taosdata.com/blog/2021/07/29/2741.html) to solve it. + Usually, it's caused by an incorrect FQDN configuration. Please refer to this section in the [FAQ](https://docs.tdengine.com/2.4/train-faq/faq/#2-how-to-handle-unable-to-establish-connection) to troubleshoot. 2. Unhandled exception. System.DllNotFoundException: Unable to load DLL 'taos' or one of its dependencies: The specified module cannot be found. From e30142f5186fbf05607ca8ed634221762516dff8 Mon Sep 17 00:00:00 2001 From: Chait Diwadkar <94201190+cdiwadkar16@users.noreply.github.com> Date: Sun, 29 May 2022 19:32:10 -0700 Subject: [PATCH 16/56] docs:cdiwadkar16-patch-4-41 - several Grammatical and stylistic changes, rephrased sentences. --- docs-en/14-reference/03-connector/cpp.mdx | 41 +++++++++++------------ 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/docs-en/14-reference/03-connector/cpp.mdx b/docs-en/14-reference/03-connector/cpp.mdx index 4b388d32a9..d13a74384c 100644 --- a/docs-en/14-reference/03-connector/cpp.mdx +++ b/docs-en/14-reference/03-connector/cpp.mdx @@ -4,7 +4,7 @@ sidebar_label: C/C++ title: C/C++ Connector --- -C/C++ developers can use TDengine's client driver and the C/C++ connector, to develop their applications to connect to TDengine clusters for data writing, querying, and other functions. To use it, you need to include the TDengine header file _taos.h_, which lists the function prototypes of the provided APIs; the application also needs to link to the corresponding dynamic libraries on the platform where it is located. +C/C++ developers can use TDengine's client driver and the C/C++ connector, to develop their applications to connect to TDengine clusters for data writing, querying, and other functions. To use the C/C++ connector you must include the TDengine header file _taos.h_, which lists the function prototypes of the provided APIs. The application also needs to link to the corresponding dynamic libraries on the platform where it is located. ```c #include @@ -26,7 +26,7 @@ Please refer to [list of supported platforms](/reference/connector#supported-pla ## Supported versions -The version number of the TDengine client driver and the version number of the TDengine server require one-to-one correspondence and recommend using the same version of client driver as what the TDengine server version is. Although a lower version of the client driver is compatible to work with a higher version of the server, if the first three version numbers are the same (i.e., only the fourth version number is different), but it is not recommended. It is strongly discouraged to use a higher version of the client driver to access a lower version of the TDengine server. +The version number of the TDengine client driver and the version number of the TDengine server should be the same. A lower version of the client driver is compatible with a higher version of the server, if the first three version numbers are the same (i.e., only the fourth version number is different). For e.g. if the client version is x.y.z.1 and the server version is x.y.z.2 the client and server are compatible. But in general we do not recommend using a lower client version with a newer server version. It is also strongly discouraged to use a higher version of the client driver to access a lower version of the TDengine server. ## Installation steps @@ -55,7 +55,7 @@ In the above example code, `taos_connect()` establishes a connection to port 603 :::note -- If not specified, when the return value of the API is an integer, _0_ means success, the others are error codes representing the reason for failure, and when the return value is a pointer, _NULL_ means failure. +- If not specified, when the return value of the API is an integer, _0_ means success. All others are error codes representing the reason for failure. When the return value is a pointer, _NULL_ means failure. - All error codes and their corresponding causes are described in the `taoserror.h` file. ::: @@ -140,13 +140,12 @@ The base API is used to do things like create database connections and provide a - `void taos_cleanup()` - Clean up the runtime environment and should be called before the application exits. + Cleans up the runtime environment and should be called before the application exits. - ` int taos_options(TSDB_OPTION option, const void * arg, ...) ` Set client options, currently supports region setting (`TSDB_OPTION_LOCALE`), character set -(`TSDB_OPTION_CHARSET`), time zone -(`TSDB_OPTION_TIMEZONE`), configuration file path (`TSDB_OPTION_CONFIGDIR`) . The region setting, character set, and time zone default to the current settings of the operating system. +(`TSDB_OPTION_CHARSET`), time zone (`TSDB_OPTION_TIMEZONE`), configuration file path (`TSDB_OPTION_CONFIGDIR`). The region setting, character set, and time zone default to the current settings of the operating system. - `char *taos_get_client_info()` @@ -159,7 +158,7 @@ The base API is used to do things like create database connections and provide a - host: FQDN of any node in the TDengine cluster - user: user name - pass: password - - db: database name, if the user does not provide, it can also be connected correctly, the user can create a new database through this connection, if the user provides the database name, it means that the database user has already created, the default use of the database + - db: the database name. Even if the user does not provide this, the connection will still work correctly. The user can create a new database through this connection. If the user provides the database name, it means that the database has already been created and the connection can be used for regular operations on the database. - port: the port the taosd program is listening on NULL indicates a failure. The application needs to save the returned parameters for subsequent use. @@ -187,7 +186,7 @@ The APIs described in this subsection are all synchronous interfaces. After bein - `TAOS_RES* taos_query(TAOS *taos, const char *sql)` - Executes an SQL command, either a DQL, DML, or DDL statement. The `taos` parameter is a handle obtained with `taos_connect()`. You can't tell if the result failed by whether the return value is `NULL`, but by parsing the error code in the result set with the `taos_errno()` function. + Executes an SQL command, either a DQL, DML, or DDL statement. The `taos` parameter is a handle obtained with `taos_connect()`. If the return value is `NULL` this does not necessarily indicate a failure. You can get the error code, if any, by parsing the error code in the result set with the `taos_errno()` function. - `int taos_result_precision(TAOS_RES *res)` @@ -231,7 +230,7 @@ typedef struct taosField { - ` void taos_free_result(TAOS_RES *res)` - Frees the query result set and the associated resources. Be sure to call this API to free the resources after the query is completed. Otherwise, it may lead to a memory leak in the application. However, note that the application will crash if you call a function like `taos_consume()` to get the query results after freeing the resources. + Frees the query result set and the associated resources. Be sure to call this API to free the resources after the query is completed. Failing to call this, may lead to a memory leak in the application. However, note that the application will crash if you call a function like `taos_consume()` to get the query results after freeing the resources. - `char *taos_errstr(TAOS_RES *res)` @@ -242,7 +241,7 @@ typedef struct taosField { Get the reason for the last API call failure. The return value is the error code. :::note -TDengine version 2.0 and above recommends that each thread of a database application create a separate connection or a connection pool based on threads. It is not recommended to pass the connection (TAOS\*) structure to different threads for shared use in the application. Queries, writes, etc., issued based on TAOS structures are multi-thread safe, but state quantities such as "USE statement" may interfere between threads. In addition, the C connector can dynamically create new database-oriented connections on demand (this procedure is not visible to the user), and it is recommended that `taos_close()` be called only at the final exit of the program to close the connection. +TDengine version 2.0 and above recommends that each thread of a database application create a separate connection or a connection pool based on threads. It is not recommended to pass the connection (TAOS\*) structure to different threads for shared use in the application. Queries, writes, and other operations issued that are based on TAOS structures are multi-thread safe, but state quantities such as the "USE statement" may interfere between threads. In addition, the C connector can dynamically create new database-oriented connections on demand (this procedure is not visible to the user), and it is recommended that `taos_close()` be called only at the final exit of the program to close the connection. ::: @@ -274,12 +273,12 @@ All TDengine's asynchronous APIs use a non-blocking call pattern. Applications c ### Parameter Binding API -In addition to direct calls to `taos_query()` to perform queries, TDengine also provides a set of `bind` APIs that supports parameter binding, similar in style to MySQL, and currently only supports using a question mark `? ` to represent the parameter to be bound. +In addition to direct calls to `taos_query()` to perform queries, TDengine also provides a set of `bind` APIs that supports parameter binding, similar in style to MySQL. TDengine currently only supports using a question mark `? ` to represent the parameter to be bound. -Starting with versions 2.1.1.0 and 2.1.2.0, TDengine has significantly improved the bind APIs to support for data writing (INSERT) scenarios. This avoids the resource consumption of SQL syntax parsing when writing data through the parameter binding interface, thus significantly improving write performance in most cases. A typical operation, in this case, is as follows. +Starting with versions 2.1.1.0 and 2.1.2.0, TDengine has significantly improved the bind APIs to support data writing (INSERT) scenarios. This avoids the resource consumption of SQL syntax parsing when writing data through the parameter binding interface, thus significantly improving write performance in most cases. A typical operation, in this case, is as follows. 1. call `taos_stmt_init()` to create the parameter binding object. -2. call `taos_stmt_prepare()` to parse the INSERT statement. 3. +2. call `taos_stmt_prepare()` to parse the INSERT statement. 3. call `taos_stmt_set_tbname()` to set the table name if it is reserved in the INSERT statement but not the TAGS. 4. call `taos_stmt_set_tbname_tags()` to set the table name and TAGS values if the table name and TAGS are reserved in the INSERT statement (for example, if the INSERT statement takes an automatic table build). 5. call `taos_stmt_bind_param_batch()` to set the value of VALUES in multiple columns, or call `taos_stmt_bind_param()` to set the value of VALUES in a single row. @@ -383,7 +382,7 @@ In addition to writing data using the SQL method or the parameter binding API, w **return value** TAOS_RES structure, application can get error message by using `taos_errstr()` and also error code by using `taos_errno()`. In some cases, the returned TAOS_RES is `NULL`, and it is still possible to call `taos_errno()` to safely get the error code information. - The returned TAOS_RES needs to be freed by the caller. Otherwise, a memory leak will occur. + The returned TAOS_RES needs to be freed by the caller in order to avoid memory leaks. **Description** The protocol type is enumerated and contains the following three formats. @@ -416,13 +415,13 @@ The Subscription API currently supports subscribing to one or more tables and co This function is responsible for starting the subscription service, returning the subscription object on success and `NULL` on failure, with the following parameters. - - taos: the database connection that has been established - - restart: if the subscription already exists, whether to restart or continue the previous subscription - - topic: the topic of the subscription (i.e., the name). This parameter is the unique identifier of the subscription - - sql: the query statement of the subscription, this statement can only be _select_ statement, only the original data should be queried, only the data can be queried in time order - - fp: the callback function when the query result is received (the function prototype will be introduced later), only used when called asynchronously. This parameter should be passed `NULL` when called synchronously - - param: additional parameter when calling the callback function, the system API will pass it to the callback function as it is, without any processing - - interval: polling period in milliseconds. The callback function will be called periodically according to this parameter when called asynchronously. not recommended to set this parameter too small To avoid impact on system performance when called synchronously. If the interval between two calls to `taos_consume()` is less than this period, the API will block until the interval exceeds this period. + - taos: the database connection that has been established. + - restart: if the subscription already exists, whether to restart or continue the previous subscription. + - topic: the topic of the subscription (i.e., the name). This parameter is the unique identifier of the subscription. + - sql: the query statement of the subscription which can only be a _select_ statement. Only the original data should be queried, and data can only be queried in temporal order. + - fp: the callback function when the query result is received only used when called asynchronously. This parameter should be passed `NULL` when called synchronously. The function prototype is described below. + - param: additional parameter when calling the callback function. The system API will pass it to the callback function as is, without any processing. + - interval: polling period in milliseconds. The callback function will be called periodically according to this parameter when called asynchronously. The interval should not be too small to avoid impact on system performance when called synchronously. If the interval between two calls to `taos_consume()` is less than this period, the API will block until the interval exceeds this period. - ` typedef void (*TAOS_SUBSCRIBE_CALLBACK)(TAOS_SUB* tsub, TAOS_RES *res, void* param, int code)` From 72d4048f5b09992a2f852286321ff4da7a14a98b Mon Sep 17 00:00:00 2001 From: afwerar <1296468573@qq.com> Date: Tue, 31 May 2022 13:50:29 +0800 Subject: [PATCH 17/56] fix(os): change-win-ctest --- source/dnode/mnode/impl/test/db/CMakeLists.txt | 10 ++++++---- source/dnode/mnode/impl/test/sma/CMakeLists.txt | 10 ++++++---- source/dnode/mnode/impl/test/stb/CMakeLists.txt | 10 ++++++---- source/libs/scalar/test/scalar/CMakeLists.txt | 10 ++++------ source/libs/scalar/test/scalar/scalarTests.cpp | 4 ++-- 5 files changed, 24 insertions(+), 20 deletions(-) diff --git a/source/dnode/mnode/impl/test/db/CMakeLists.txt b/source/dnode/mnode/impl/test/db/CMakeLists.txt index 3f6a80835f..e28cdd4f61 100644 --- a/source/dnode/mnode/impl/test/db/CMakeLists.txt +++ b/source/dnode/mnode/impl/test/db/CMakeLists.txt @@ -5,7 +5,9 @@ target_link_libraries( PUBLIC sut ) -add_test( - NAME dbTest - COMMAND dbTest -) +if(NOT TD_WINDOWS) + add_test( + NAME dbTest + COMMAND dbTest + ) +endif(NOT TD_WINDOWS) diff --git a/source/dnode/mnode/impl/test/sma/CMakeLists.txt b/source/dnode/mnode/impl/test/sma/CMakeLists.txt index 3f9ec123a8..fd596c5021 100644 --- a/source/dnode/mnode/impl/test/sma/CMakeLists.txt +++ b/source/dnode/mnode/impl/test/sma/CMakeLists.txt @@ -5,7 +5,9 @@ target_link_libraries( PUBLIC sut ) -add_test( - NAME smaTest - COMMAND smaTest -) +if(NOT TD_WINDOWS) + add_test( + NAME smaTest + COMMAND smaTest + ) +endif(NOT TD_WINDOWS) diff --git a/source/dnode/mnode/impl/test/stb/CMakeLists.txt b/source/dnode/mnode/impl/test/stb/CMakeLists.txt index d2fe387997..857c404c1c 100644 --- a/source/dnode/mnode/impl/test/stb/CMakeLists.txt +++ b/source/dnode/mnode/impl/test/stb/CMakeLists.txt @@ -5,7 +5,9 @@ target_link_libraries( PUBLIC sut ) -add_test( - NAME stbTest - COMMAND stbTest -) +if(NOT TD_WINDOWS) + add_test( + NAME stbTest + COMMAND stbTest + ) +endif(NOT TD_WINDOWS) \ No newline at end of file diff --git a/source/libs/scalar/test/scalar/CMakeLists.txt b/source/libs/scalar/test/scalar/CMakeLists.txt index 672cb5a3de..86b936d93a 100644 --- a/source/libs/scalar/test/scalar/CMakeLists.txt +++ b/source/libs/scalar/test/scalar/CMakeLists.txt @@ -17,9 +17,7 @@ TARGET_INCLUDE_DIRECTORIES( PUBLIC "${TD_SOURCE_DIR}/source/libs/parser/inc" PRIVATE "${TD_SOURCE_DIR}/source/libs/scalar/inc" ) -if(NOT TD_WINDOWS) - add_test( - NAME scalarTest - COMMAND scalarTest - ) -endif(NOT TD_WINDOWS) +add_test( + NAME scalarTest + COMMAND scalarTest +) diff --git a/source/libs/scalar/test/scalar/scalarTests.cpp b/source/libs/scalar/test/scalar/scalarTests.cpp index 3fafc83b18..6a32c65775 100644 --- a/source/libs/scalar/test/scalar/scalarTests.cpp +++ b/source/libs/scalar/test/scalar/scalarTests.cpp @@ -2498,7 +2498,7 @@ TEST(ScalarFunctionTest, tanFunction_column) { code = tanFunction(pInput, 1, pOutput); ASSERT_EQ(code, TSDB_CODE_SUCCESS); for (int32_t i = 0; i < rowNum; ++i) { - ASSERT_EQ(*((double *)colDataGetData(pOutput->columnData, i)), result[i]); + ASSERT_NEAR(*((double *)colDataGetData(pOutput->columnData, i)), result[i], 1e-15); PRINTF("tiny_int after TAN:%f\n", *((double *)colDataGetData(pOutput->columnData, i))); } scltDestroyDataBlock(pInput); @@ -2517,7 +2517,7 @@ TEST(ScalarFunctionTest, tanFunction_column) { code = tanFunction(pInput, 1, pOutput); ASSERT_EQ(code, TSDB_CODE_SUCCESS); for (int32_t i = 0; i < rowNum; ++i) { - ASSERT_EQ(*((double *)colDataGetData(pOutput->columnData, i)), result[i]); + ASSERT_NEAR(*((double *)colDataGetData(pOutput->columnData, i)), result[i], 1e-15); PRINTF("float after TAN:%f\n", *((double *)colDataGetData(pOutput->columnData, i))); } From b0cf14be72db868e5e2ed82441fc9804c7b6ecca Mon Sep 17 00:00:00 2001 From: gccgdb1234 Date: Tue, 31 May 2022 13:56:53 +0800 Subject: [PATCH 18/56] docs: correct format errors in data type page --- docs-cn/12-taos-sql/01-data-type.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs-cn/12-taos-sql/01-data-type.md b/docs-cn/12-taos-sql/01-data-type.md index dd68c24cd5..88dfd1a22f 100644 --- a/docs-cn/12-taos-sql/01-data-type.md +++ b/docs-cn/12-taos-sql/01-data-type.md @@ -62,11 +62,11 @@ TDengine支持多个类型的常量,细节如下表: | # | **语法** | **类型** | **说明** | | --- | :-------: | --------- | -------------------------------------- | -| 1 | [{+ | -}]123 | BIGINT | 整型数值的字面量的类型均为BIGINT。如果用户输入超过了BIGINT的表示范围,TDengine 按BIGINT对数值进行截断。| +| 1 | [{+ \| -}]123 | BIGINT | 整型数值的字面量的类型均为BIGINT。如果用户输入超过了BIGINT的表示范围,TDengine 按BIGINT对数值进行截断。| | 2 | 123.45 | DOUBLE | 浮点数值的字面量的类型均为DOUBLE。TDengine依据是否存在小数点,或使用科学计数法表示,来判断数值类型是否为整型或者浮点型,因此在使用时要注意相应类型越界的情况。例如,9999999999999999999会认为超过长整型的上边界而溢出,而9999999999999999999.0会被认为是有效的浮点数。| | 3 | 1.2E3 | DOUBLE | 科学计数法的字面量的类型为DOUBLE。| | 4 | 'abc' | BINARY | 单引号括住的内容为字符串字面值,其类型为BINARY,BINARY的size为实际的字符个数。对于字符串内的单引号,可以用转义字符反斜线加单引号来表示,即 \'。| | 5 | "abc" | BINARY | 双引号括住的内容为字符串字面值,其类型为BINARY,BINARY的size为实际的字符个数。对于字符串内的双引号,可以用转义字符反斜线加单引号来表示,即 \"。 | -| 6 | TIMESTAMP {'literal' | "literal"} | TIMESTAMP | TIMESTAMP关键字表示后面的字符串字面量需要被解释为TIMESTAMP类型。字符串需要满足YYYY-MM-DD HH:mm:ss.MS格式,其时间分辨率为当前数据库的时间分辨率。 | +| 6 | TIMESTAMP {'literal' \| "literal"} | TIMESTAMP | TIMESTAMP关键字表示后面的字符串字面量需要被解释为TIMESTAMP类型。字符串需要满足YYYY-MM-DD HH:mm:ss.MS格式,其时间分辨率为当前数据库的时间分辨率。 | | 7 | {TRUE | FALSE} | BOOL | 布尔类型字面量。 | -| 8 | {'' | "" | '\t' | "\t" | ' ' | " " | NULL } | -- | 空值字面量。可以用于任意类型。| +| 8 | {'' \| "" \| '\t' \| "\t" \| ' ' \| " " \| NULL } | -- | 空值字面量。可以用于任意类型。| From 9d0fc2a5ec7749e9fbb24543ec41bf55c8317134 Mon Sep 17 00:00:00 2001 From: gccgdb1234 Date: Tue, 31 May 2022 14:19:29 +0800 Subject: [PATCH 19/56] docs: refine data types explanation --- docs-cn/12-taos-sql/01-data-type.md | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/docs-cn/12-taos-sql/01-data-type.md b/docs-cn/12-taos-sql/01-data-type.md index 88dfd1a22f..0bdddb6e45 100644 --- a/docs-cn/12-taos-sql/01-data-type.md +++ b/docs-cn/12-taos-sql/01-data-type.md @@ -14,7 +14,7 @@ description: "TDengine 支持的数据类型: 时间戳、浮点型、JSON 类 - Epoch Time:时间戳也可以是一个长整数,表示从格林威治时间 1970-01-01 00:00:00.000 (UTC/GMT) 开始的毫秒数(相应地,如果所在 Database 的时间精度设置为“微秒”,则长整型格式的时间戳含义也就对应于从格林威治时间 1970-01-01 00:00:00.000 (UTC/GMT) 开始的微秒数;纳秒精度逻辑类似。) - 时间可以加减,比如 now-2h,表明查询时刻向前推 2 个小时(最近 2 小时)。数字后面的时间单位可以是 b(纳秒)、u(微秒)、a(毫秒)、s(秒)、m(分)、h(小时)、d(天)、w(周)。 比如 `select * from t1 where ts > now-2w and ts <= now-1w`,表示查询两周前整整一周的数据。在指定降采样操作(down sampling)的时间窗口(interval)时,时间单位还可以使用 n (自然月) 和 y (自然年)。 -TDengine 缺省的时间戳精度是毫秒,但通过在 `CREATE DATABASE` 时传递的 PRECISION 参数也可以支持微秒和纳秒。(从 2.1.5.0 版本开始支持纳秒精度) +TDengine 缺省的时间戳精度是毫秒,但通过在 `CREATE DATABASE` 时传递的 PRECISION 参数也可以支持微秒和纳秒。 ```sql CREATE DATABASE db_name PRECISION 'ns'; @@ -25,7 +25,7 @@ CREATE DATABASE db_name PRECISION 'ns'; | # | **类型** | **Bytes** | **说明** | | --- | :-------: | --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| 1 | TIMESTAMP | 8 | 时间戳。缺省精度毫秒,可支持微秒和纳秒。从格林威治时间 1970-01-01 00:00:00.000 (UTC/GMT) 开始,计时不能早于该时间。(从 2.0.18.0 版本开始,已经去除了这一时间范围限制)(从 2.1.5.0 版本开始支持纳秒精度) | +| 1 | TIMESTAMP | 8 | 时间戳。缺省精度毫秒,可支持微秒和纳秒,详细说明见上节。 | | 2 | INT | 4 | 整型,范围 [-2^31, 2^31-1] | | 3 | INT UNSIGNED| 4| 无符号整数,[0, 2^32-1] | 4 | BIGINT | 8 | 长整型,范围 [-2^63, 2^63-1] | @@ -42,20 +42,15 @@ CREATE DATABASE db_name PRECISION 'ns'; | 15 | JSON | | json 数据类型, 只有 tag 可以是 json 格式 | | 16 | VARCHAR | 自定义 | BINARY类型的别名 | -:::tip -TDengine 对 SQL 语句中的英文字符不区分大小写,自动转化为小写执行。因此用户大小写敏感的字符串及密码,需要使用单引号将字符串引起来。 - -::: :::note -虽然 BINARY 类型在底层存储上支持字节型的二进制字符,但不同编程语言对二进制数据的处理方式并不保证一致,因此建议在 BINARY 类型中只存储 ASCII 可见字符,而避免存储不可见字符。多字节的数据,例如中文字符,则需要使用 NCHAR 类型进行保存。如果强行使用 BINARY 类型保存中文字符,虽然有时也能正常读写,但并不带有字符集信息,很容易出现数据乱码甚至数据损坏等情况。 +- TDengine 对 SQL 语句中的英文字符不区分大小写,自动转化为小写执行。因此用户大小写敏感的字符串及密码,需要使用单引号将字符串引起来。 +- 虽然 BINARY 类型在底层存储上支持字节型的二进制字符,但不同编程语言对二进制数据的处理方式并不保证一致,因此建议在 BINARY 类型中只存储 ASCII 可见字符,而避免存储不可见字符。多字节的数据,例如中文字符,则需要使用 NCHAR 类型进行保存。如果强行使用 BINARY 类型保存中文字符,虽然有时也能正常读写,但并不带有字符集信息,很容易出现数据乱码甚至数据损坏等情况。 +- BINARY 类型理论上最长可以有 16374 字节。binary 仅支持字符串输入,字符串两端需使用单引号引用。使用时须指定大小,如 binary(20) 定义了最长为 20 个单字节字符的字符串,每个字符占 1 byte 的存储空间,总共固定占用 20 bytes 的空间,此时如果用户字符串超出 20 字节将会报错。对于字符串内的单引号,可以用转义字符反斜线加单引号来表示,即 `\’`。 +- SQL 语句中的数值类型将依据是否存在小数点,或使用科学计数法表示,来判断数值类型是否为整型或者浮点型,因此在使用时要注意相应类型越界的情况。例如,9999999999999999999 会认为超过长整型的上边界而溢出,而 9999999999999999999.0 会被认为是有效的浮点数。 ::: -:::note -SQL 语句中的数值类型将依据是否存在小数点,或使用科学计数法表示,来判断数值类型是否为整型或者浮点型,因此在使用时要注意相应类型越界的情况。例如,9999999999999999999 会认为超过长整型的上边界而溢出,而 9999999999999999999.0 会被认为是有效的浮点数。 - -::: ## 常量 TDengine支持多个类型的常量,细节如下表: From fe73aadf6f14613441c834a41c348fe3e186c761 Mon Sep 17 00:00:00 2001 From: gccgdb1234 Date: Tue, 31 May 2022 14:25:00 +0800 Subject: [PATCH 20/56] docs: refine data types BINARY --- docs-cn/12-taos-sql/01-data-type.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs-cn/12-taos-sql/01-data-type.md b/docs-cn/12-taos-sql/01-data-type.md index 0bdddb6e45..50d59a3186 100644 --- a/docs-cn/12-taos-sql/01-data-type.md +++ b/docs-cn/12-taos-sql/01-data-type.md @@ -32,7 +32,7 @@ CREATE DATABASE db_name PRECISION 'ns'; | 5 | BIGINT UNSIGNED | 8 | 长整型,范围 [0, 2^64-1] | | 6 | FLOAT | 4 | 浮点型,有效位数 6-7,范围 [-3.4E38, 3.4E38] | | 7 | DOUBLE | 8 | 双精度浮点型,有效位数 15-16,范围 [-1.7E308, 1.7E308] | -| 8 | BINARY | 自定义 | 记录单字节字符串,建议只用于处理 ASCII 可见字符,中文等多字节字符需使用 nchar。理论上,最长可以有 16374 字节。binary 仅支持字符串输入,字符串两端需使用单引号引用。使用时须指定大小,如 binary(20) 定义了最长为 20 个单字节字符的字符串,每个字符占 1 byte 的存储空间,总共固定占用 20 bytes 的空间,此时如果用户字符串超出 20 字节将会报错。对于字符串内的单引号,可以用转义字符反斜线加单引号来表示,即 `\’`。 | +| 8 | BINARY | 自定义 | 记录单字节字符串,建议只用于处理 ASCII 可见字符,中文等多字节字符需使用 nchar。 | | 9 | SMALLINT | 2 | 短整型, 范围 [-32768, 32767] | | 10 | SMALLINT UNSIGNED | 2| 无符号短整型,范围 [0, 655357] | | 11 | TINYINT | 1 | 单字节整型,范围 [-128, 127] | From 86f8bf6cb10832bd311737f6dff6398f49b51354 Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Tue, 31 May 2022 14:38:15 +0800 Subject: [PATCH 21/56] refactor: make trans support multi steps --- source/dnode/mgmt/node_mgmt/src/dmTransport.c | 2 +- source/dnode/mnode/impl/inc/mndTrans.h | 15 +- source/dnode/mnode/impl/src/mndAcct.c | 8 +- source/dnode/mnode/impl/src/mndCluster.c | 4 +- source/dnode/mnode/impl/src/mndDb.c | 2 +- source/dnode/mnode/impl/src/mndDnode.c | 10 +- source/dnode/mnode/impl/src/mndMain.c | 2 +- source/dnode/mnode/impl/src/mndMnode.c | 2 +- source/dnode/mnode/impl/src/mndStb.c | 2 +- source/dnode/mnode/impl/src/mndSync.c | 4 +- source/dnode/mnode/impl/src/mndTrans.c | 216 +++++++++++------- source/dnode/mnode/impl/src/mndUser.c | 2 +- source/dnode/mnode/impl/src/mndVgroup.c | 4 +- source/dnode/mnode/sdb/inc/sdb.h | 1 + source/dnode/mnode/sdb/src/sdb.c | 1 + source/dnode/mnode/sdb/src/sdbFile.c | 54 +++-- source/libs/qworker/src/qworker.c | 6 +- 17 files changed, 196 insertions(+), 139 deletions(-) diff --git a/source/dnode/mgmt/node_mgmt/src/dmTransport.c b/source/dnode/mgmt/node_mgmt/src/dmTransport.c index 987fc54416..e5893fd947 100644 --- a/source/dnode/mgmt/node_mgmt/src/dmTransport.c +++ b/source/dnode/mgmt/node_mgmt/src/dmTransport.c @@ -130,7 +130,7 @@ static void dmProcessRpcMsg(SDnode *pDnode, SRpcMsg *pRpc, SEpSet *pEpSet) { _OVER: if (code != 0) { - dError("msg:%p, failed to process since %s", pMsg, terrstr()); + dTrace("msg:%p, failed to process since %s, type:%s", pMsg, terrstr(), TMSG_INFO(pRpc->msgType)); if (terrno != 0) code = terrno; if (IsReq(pRpc)) { diff --git a/source/dnode/mnode/impl/inc/mndTrans.h b/source/dnode/mnode/impl/inc/mndTrans.h index d9408467ad..a7e1f7cd02 100644 --- a/source/dnode/mnode/impl/inc/mndTrans.h +++ b/source/dnode/mnode/impl/inc/mndTrans.h @@ -31,17 +31,18 @@ typedef enum { typedef struct { int32_t id; - tmsg_t msgType; - int8_t msgSent; - int8_t msgReceived; - int8_t isRaw; - int8_t rawWritten; - SSdbRaw *pRaw; - SEpSet epSet; int32_t errCode; int32_t acceptableCode; + int8_t stage; + int8_t isRaw; + int8_t rawWritten; + int8_t msgSent; + int8_t msgReceived; + tmsg_t msgType; + SEpSet epSet; int32_t contLen; void *pCont; + SSdbRaw *pRaw; } STransAction; typedef void (*TransCbFp)(SMnode *pMnode, void *param, int32_t paramLen); diff --git a/source/dnode/mnode/impl/src/mndAcct.c b/source/dnode/mnode/impl/src/mndAcct.c index a4fde4b706..f3ec3a421b 100644 --- a/source/dnode/mnode/impl/src/mndAcct.c +++ b/source/dnode/mnode/impl/src/mndAcct.c @@ -78,10 +78,8 @@ static int32_t mndCreateDefaultAcct(SMnode *pMnode) { if (pRaw == NULL) return -1; sdbSetRawStatus(pRaw, SDB_STATUS_READY); - mDebug("acct:%s, will be created while deploy sdb, raw:%p", acctObj.acct, pRaw); -#if 0 - return sdbWrite(pMnode->pSdb, pRaw); -#else + mDebug("acct:%s, will be created when deploying, raw:%p", acctObj.acct, pRaw); + STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_RETRY, TRN_TYPE_CREATE_ACCT, NULL); if (pTrans == NULL) { mError("acct:%s, failed to create since %s", acctObj.acct, terrstr()); @@ -94,7 +92,6 @@ static int32_t mndCreateDefaultAcct(SMnode *pMnode) { mndTransDrop(pTrans); return -1; } - sdbSetRawStatus(pRaw, SDB_STATUS_READY); if (mndTransPrepare(pMnode, pTrans) != 0) { mError("trans:%d, failed to prepare since %s", pTrans->id, terrstr()); @@ -104,7 +101,6 @@ static int32_t mndCreateDefaultAcct(SMnode *pMnode) { mndTransDrop(pTrans); return 0; -#endif } static SSdbRaw *mndAcctActionEncode(SAcctObj *pAcct) { diff --git a/source/dnode/mnode/impl/src/mndCluster.c b/source/dnode/mnode/impl/src/mndCluster.c index a421be5c06..76c8acf407 100644 --- a/source/dnode/mnode/impl/src/mndCluster.c +++ b/source/dnode/mnode/impl/src/mndCluster.c @@ -172,13 +172,13 @@ static int32_t mndCreateDefaultCluster(SMnode *pMnode) { clusterObj.id = mndGenerateUid(clusterObj.name, TSDB_CLUSTER_ID_LEN); clusterObj.id = (clusterObj.id >= 0 ? clusterObj.id : -clusterObj.id); pMnode->clusterId = clusterObj.id; - mDebug("cluster:%" PRId64 ", name is %s", clusterObj.id, clusterObj.name); + mInfo("cluster:%" PRId64 ", name is %s", clusterObj.id, clusterObj.name); SSdbRaw *pRaw = mndClusterActionEncode(&clusterObj); if (pRaw == NULL) return -1; sdbSetRawStatus(pRaw, SDB_STATUS_READY); - mDebug("cluster:%" PRId64 ", will be created while deploy sdb, raw:%p", clusterObj.id, pRaw); + mDebug("cluster:%" PRId64 ", will be created when deploying, raw:%p", clusterObj.id, pRaw); #if 0 return sdbWrite(pMnode->pSdb, pRaw); #else diff --git a/source/dnode/mnode/impl/src/mndDb.c b/source/dnode/mnode/impl/src/mndDb.c index 95d3383ee1..e3f843f0c7 100644 --- a/source/dnode/mnode/impl/src/mndDb.c +++ b/source/dnode/mnode/impl/src/mndDb.c @@ -1314,7 +1314,7 @@ int32_t mndValidateDbInfo(SMnode *pMnode, SDbVgVersion *pDbs, int32_t numOfDbs, SDbObj *pDb = mndAcquireDb(pMnode, pDbVgVersion->dbFName); if (pDb == NULL) { - mDebug("db:%s, no exist", pDbVgVersion->dbFName); + mTrace("db:%s, no exist", pDbVgVersion->dbFName); memcpy(usedbRsp.db, pDbVgVersion->dbFName, TSDB_DB_FNAME_LEN); usedbRsp.uid = pDbVgVersion->dbId; usedbRsp.vgVersion = -1; diff --git a/source/dnode/mnode/impl/src/mndDnode.c b/source/dnode/mnode/impl/src/mndDnode.c index 22f858c60b..8e06139c8c 100644 --- a/source/dnode/mnode/impl/src/mndDnode.c +++ b/source/dnode/mnode/impl/src/mndDnode.c @@ -98,7 +98,7 @@ static int32_t mndCreateDefaultDnode(SMnode *pMnode) { if (pRaw == NULL) return -1; if (sdbSetRawStatus(pRaw, SDB_STATUS_READY) != 0) return -1; - mDebug("dnode:%d, will be created while deploy sdb, raw:%p", dnodeObj.id, pRaw); + mDebug("dnode:%d, will be created when deploying, raw:%p", dnodeObj.id, pRaw); #if 0 return sdbWrite(pMnode->pSdb, pRaw); @@ -388,9 +388,10 @@ static int32_t mndProcessStatusReq(SRpcMsg *pReq) { mndReleaseMnode(pMnode, pObj); } + int64_t dnodeVer = sdbGetTableVer(pMnode->pSdb, SDB_DNODE) + sdbGetTableVer(pMnode->pSdb, SDB_MNODE); int64_t curMs = taosGetTimestampMs(); bool online = mndIsDnodeOnline(pMnode, pDnode, curMs); - bool dnodeChanged = (statusReq.dnodeVer != sdbGetTableVer(pMnode->pSdb, SDB_DNODE)); + bool dnodeChanged = (statusReq.dnodeVer != dnodeVer); bool reboot = (pDnode->rebootTime != statusReq.rebootTime); bool needCheck = !online || dnodeChanged || reboot; @@ -433,7 +434,8 @@ static int32_t mndProcessStatusReq(SRpcMsg *pReq) { if (!online) { mInfo("dnode:%d, from offline to online", pDnode->id); } else { - mDebug("dnode:%d, send dnode eps", pDnode->id); + mDebug("dnode:%d, send dnode epset, online:%d ver:% " PRId64 ":%" PRId64 " reboot:%d", pDnode->id, online, + statusReq.dnodeVer, dnodeVer, reboot); } pDnode->rebootTime = statusReq.rebootTime; @@ -441,7 +443,7 @@ static int32_t mndProcessStatusReq(SRpcMsg *pReq) { pDnode->numOfSupportVnodes = statusReq.numOfSupportVnodes; SStatusRsp statusRsp = {0}; - statusRsp.dnodeVer = sdbGetTableVer(pMnode->pSdb, SDB_DNODE) + sdbGetTableVer(pMnode->pSdb, SDB_MNODE); + statusRsp.dnodeVer = dnodeVer; statusRsp.dnodeCfg.dnodeId = pDnode->id; statusRsp.dnodeCfg.clusterId = pMnode->clusterId; statusRsp.pDnodeEps = taosArrayInit(mndGetDnodeSize(pMnode), sizeof(SDnodeEp)); diff --git a/source/dnode/mnode/impl/src/mndMain.c b/source/dnode/mnode/impl/src/mndMain.c index 0ac36c20ed..2a2a45a45d 100644 --- a/source/dnode/mnode/impl/src/mndMain.c +++ b/source/dnode/mnode/impl/src/mndMain.c @@ -472,7 +472,7 @@ int32_t mndProcessRpcMsg(SRpcMsg *pMsg) { } else if (code == 0) { mTrace("msg:%p, successfully processed and response", pMsg); } else { - mError("msg:%p, failed to process since %s, app:%p type:%s", pMsg, terrstr(), pMsg->info.ahandle, + mDebug("msg:%p, failed to process since %s, app:%p type:%s", pMsg, terrstr(), pMsg->info.ahandle, TMSG_INFO(pMsg->msgType)); } diff --git a/source/dnode/mnode/impl/src/mndMnode.c b/source/dnode/mnode/impl/src/mndMnode.c index 23634be77b..8c5ea840af 100644 --- a/source/dnode/mnode/impl/src/mndMnode.c +++ b/source/dnode/mnode/impl/src/mndMnode.c @@ -90,7 +90,7 @@ static int32_t mndCreateDefaultMnode(SMnode *pMnode) { if (pRaw == NULL) return -1; sdbSetRawStatus(pRaw, SDB_STATUS_READY); - mDebug("mnode:%d, will be created while deploy sdb, raw:%p", mnodeObj.id, pRaw); + mDebug("mnode:%d, will be created when deploying, raw:%p", mnodeObj.id, pRaw); #if 0 return sdbWrite(pMnode->pSdb, pRaw); diff --git a/source/dnode/mnode/impl/src/mndStb.c b/source/dnode/mnode/impl/src/mndStb.c index b33c09a0f9..81c3b24d97 100644 --- a/source/dnode/mnode/impl/src/mndStb.c +++ b/source/dnode/mnode/impl/src/mndStb.c @@ -1597,7 +1597,7 @@ static int32_t mndProcessTableMetaReq(SRpcMsg *pReq) { pReq->info.rspLen = rspLen; code = 0; - mDebug("stb:%s.%s, meta is retrieved", infoReq.dbFName, infoReq.tbName); + mTrace("%s.%s, meta is retrieved", infoReq.dbFName, infoReq.tbName); _OVER: if (code != 0) { diff --git a/source/dnode/mnode/impl/src/mndSync.c b/source/dnode/mnode/impl/src/mndSync.c index 8b602d796c..245f0938b9 100644 --- a/source/dnode/mnode/impl/src/mndSync.c +++ b/source/dnode/mnode/impl/src/mndSync.c @@ -65,7 +65,7 @@ int32_t mndSyncGetSnapshot(struct SSyncFSM *pFsm, SSnapshot *pSnapshot) { void mndRestoreFinish(struct SSyncFSM *pFsm) { SMnode *pMnode = pFsm->data; if (!pMnode->deploy) { - mInfo("mnode sync restore finished"); + mInfo("mnode sync restore finished, and will handle outstanding transactions"); mndTransPullup(pMnode); mndSetRestore(pMnode, true); } else { @@ -244,7 +244,7 @@ void mndSyncStart(SMnode *pMnode) { } else { syncStart(pMgmt->sync); } - mDebug("sync:%" PRId64 " is started, standby:%d", pMgmt->sync, pMgmt->standby); + mDebug("mnode sync started, id:%" PRId64 " standby:%d", pMgmt->sync, pMgmt->standby); } void mndSyncStop(SMnode *pMnode) {} diff --git a/source/dnode/mnode/impl/src/mndTrans.c b/source/dnode/mnode/impl/src/mndTrans.c index 239e1bf4b1..c5a1e0ba5a 100644 --- a/source/dnode/mnode/impl/src/mndTrans.c +++ b/source/dnode/mnode/impl/src/mndTrans.c @@ -37,7 +37,6 @@ static int32_t mndTransAppendAction(SArray *pArray, STransAction *pAction); static void mndTransDropLogs(SArray *pArray); static void mndTransDropActions(SArray *pArray); static void mndTransDropData(STrans *pTrans); -static int32_t mndTransExecuteLogs(SMnode *pMnode, SArray *pArray); static int32_t mndTransExecuteActions(SMnode *pMnode, STrans *pTrans, SArray *pArray); static int32_t mndTransExecuteRedoLogs(SMnode *pMnode, STrans *pTrans); static int32_t mndTransExecuteUndoLogs(SMnode *pMnode, STrans *pTrans); @@ -133,15 +132,21 @@ static SSdbRaw *mndTransActionEncode(STrans *pTrans) { for (int32_t i = 0; i < redoActionNum; ++i) { STransAction *pAction = taosArrayGet(pTrans->redoActions, i); + SDB_SET_INT32(pRaw, dataPos, pAction->id, _OVER) + SDB_SET_INT32(pRaw, dataPos, pAction->errCode, _OVER) + SDB_SET_INT32(pRaw, dataPos, pAction->acceptableCode, _OVER) SDB_SET_INT8(pRaw, dataPos, pAction->isRaw, _OVER) + SDB_SET_INT8(pRaw, dataPos, pAction->stage, _OVER) if (pAction->isRaw) { int32_t len = sdbGetRawTotalSize(pAction->pRaw); + SDB_SET_INT8(pRaw, dataPos, pAction->rawWritten, _OVER) SDB_SET_INT32(pRaw, dataPos, len, _OVER) SDB_SET_BINARY(pRaw, dataPos, (void *)pAction->pRaw, len, _OVER) } else { SDB_SET_BINARY(pRaw, dataPos, (void *)&pAction->epSet, sizeof(SEpSet), _OVER) SDB_SET_INT16(pRaw, dataPos, pAction->msgType, _OVER) - SDB_SET_INT32(pRaw, dataPos, pAction->acceptableCode, _OVER) + SDB_SET_INT8(pRaw, dataPos, pAction->msgSent, _OVER) + SDB_SET_INT8(pRaw, dataPos, pAction->msgReceived, _OVER) SDB_SET_INT32(pRaw, dataPos, pAction->contLen, _OVER) SDB_SET_BINARY(pRaw, dataPos, pAction->pCont, pAction->contLen, _OVER) } @@ -149,15 +154,21 @@ static SSdbRaw *mndTransActionEncode(STrans *pTrans) { for (int32_t i = 0; i < undoActionNum; ++i) { STransAction *pAction = taosArrayGet(pTrans->undoActions, i); + SDB_SET_INT32(pRaw, dataPos, pAction->id, _OVER) + SDB_SET_INT32(pRaw, dataPos, pAction->errCode, _OVER) + SDB_SET_INT32(pRaw, dataPos, pAction->acceptableCode, _OVER) SDB_SET_INT8(pRaw, dataPos, pAction->isRaw, _OVER) + SDB_SET_INT8(pRaw, dataPos, pAction->stage, _OVER) if (pAction->isRaw) { int32_t len = sdbGetRawTotalSize(pAction->pRaw); + SDB_SET_INT8(pRaw, dataPos, pAction->rawWritten, _OVER) SDB_SET_INT32(pRaw, dataPos, len, _OVER) SDB_SET_BINARY(pRaw, dataPos, (void *)pAction->pRaw, len, _OVER) } else { SDB_SET_BINARY(pRaw, dataPos, (void *)&pAction->epSet, sizeof(SEpSet), _OVER) SDB_SET_INT16(pRaw, dataPos, pAction->msgType, _OVER) - SDB_SET_INT32(pRaw, dataPos, pAction->acceptableCode, _OVER) + SDB_SET_INT8(pRaw, dataPos, pAction->msgSent, _OVER) + SDB_SET_INT8(pRaw, dataPos, pAction->msgReceived, _OVER) SDB_SET_INT32(pRaw, dataPos, pAction->contLen, _OVER) SDB_SET_BINARY(pRaw, dataPos, pAction->pCont, pAction->contLen, _OVER) } @@ -165,15 +176,21 @@ static SSdbRaw *mndTransActionEncode(STrans *pTrans) { for (int32_t i = 0; i < commitActionNum; ++i) { STransAction *pAction = taosArrayGet(pTrans->commitActions, i); + SDB_SET_INT32(pRaw, dataPos, pAction->id, _OVER) + SDB_SET_INT32(pRaw, dataPos, pAction->errCode, _OVER) + SDB_SET_INT32(pRaw, dataPos, pAction->acceptableCode, _OVER) SDB_SET_INT8(pRaw, dataPos, pAction->isRaw, _OVER) + SDB_SET_INT8(pRaw, dataPos, pAction->stage, _OVER) if (pAction->isRaw) { int32_t len = sdbGetRawTotalSize(pAction->pRaw); + SDB_SET_INT8(pRaw, dataPos, pAction->rawWritten, _OVER) SDB_SET_INT32(pRaw, dataPos, len, _OVER) SDB_SET_BINARY(pRaw, dataPos, (void *)pAction->pRaw, len, _OVER) } else { SDB_SET_BINARY(pRaw, dataPos, (void *)&pAction->epSet, sizeof(SEpSet), _OVER) SDB_SET_INT16(pRaw, dataPos, pAction->msgType, _OVER) - SDB_SET_INT32(pRaw, dataPos, pAction->acceptableCode, _OVER) + SDB_SET_INT8(pRaw, dataPos, pAction->msgSent, _OVER) + SDB_SET_INT8(pRaw, dataPos, pAction->msgReceived, _OVER) SDB_SET_INT32(pRaw, dataPos, pAction->contLen, _OVER) SDB_SET_BINARY(pRaw, dataPos, pAction->pCont, pAction->contLen, _OVER) } @@ -259,19 +276,25 @@ static SSdbRow *mndTransActionDecode(SSdbRaw *pRaw) { if (pTrans->commitActions == NULL) goto _OVER; for (int32_t i = 0; i < redoActionNum; ++i) { + SDB_GET_INT32(pRaw, dataPos, &action.id, _OVER) + SDB_GET_INT32(pRaw, dataPos, &action.errCode, _OVER) + SDB_GET_INT32(pRaw, dataPos, &action.acceptableCode, _OVER) SDB_GET_INT8(pRaw, dataPos, &action.isRaw, _OVER) + SDB_GET_INT8(pRaw, dataPos, &action.stage, _OVER) if (action.isRaw) { + SDB_GET_INT8(pRaw, dataPos, &action.rawWritten, _OVER) SDB_GET_INT32(pRaw, dataPos, &dataLen, _OVER) - pData = taosMemoryMalloc(dataLen); - if (pData == NULL) goto _OVER; + action.pRaw = taosMemoryMalloc(dataLen); + if (action.pRaw == NULL) goto _OVER; mTrace("raw:%p, is created", pData); - SDB_GET_BINARY(pRaw, dataPos, pData, dataLen, _OVER); - if (taosArrayPush(pTrans->redoActions, &pData) == NULL) goto _OVER; - pData = NULL; + SDB_GET_BINARY(pRaw, dataPos, (void *)action.pRaw, dataLen, _OVER); + if (taosArrayPush(pTrans->redoActions, &action) == NULL) goto _OVER; + action.pRaw = NULL; } else { SDB_GET_BINARY(pRaw, dataPos, (void *)&action.epSet, sizeof(SEpSet), _OVER); SDB_GET_INT16(pRaw, dataPos, &action.msgType, _OVER) - SDB_GET_INT32(pRaw, dataPos, &action.acceptableCode, _OVER) + SDB_GET_INT8(pRaw, dataPos, &action.msgSent, _OVER) + SDB_GET_INT8(pRaw, dataPos, &action.msgReceived, _OVER) SDB_GET_INT32(pRaw, dataPos, &action.contLen, _OVER) action.pCont = taosMemoryMalloc(action.contLen); if (action.pCont == NULL) goto _OVER; @@ -282,19 +305,25 @@ static SSdbRow *mndTransActionDecode(SSdbRaw *pRaw) { } for (int32_t i = 0; i < undoActionNum; ++i) { + SDB_GET_INT32(pRaw, dataPos, &action.id, _OVER) + SDB_GET_INT32(pRaw, dataPos, &action.errCode, _OVER) + SDB_GET_INT32(pRaw, dataPos, &action.acceptableCode, _OVER) SDB_GET_INT8(pRaw, dataPos, &action.isRaw, _OVER) + SDB_GET_INT8(pRaw, dataPos, &action.stage, _OVER) if (action.isRaw) { + SDB_GET_INT8(pRaw, dataPos, &action.rawWritten, _OVER) SDB_GET_INT32(pRaw, dataPos, &dataLen, _OVER) - pData = taosMemoryMalloc(dataLen); - if (pData == NULL) goto _OVER; + action.pRaw = taosMemoryMalloc(dataLen); + if (action.pRaw == NULL) goto _OVER; mTrace("raw:%p, is created", pData); - SDB_GET_BINARY(pRaw, dataPos, pData, dataLen, _OVER); - if (taosArrayPush(pTrans->undoActions, &pData) == NULL) goto _OVER; - pData = NULL; + SDB_GET_BINARY(pRaw, dataPos, (void *)action.pRaw, dataLen, _OVER); + if (taosArrayPush(pTrans->undoActions, &action) == NULL) goto _OVER; + action.pRaw = NULL; } else { SDB_GET_BINARY(pRaw, dataPos, (void *)&action.epSet, sizeof(SEpSet), _OVER); SDB_GET_INT16(pRaw, dataPos, &action.msgType, _OVER) - SDB_GET_INT32(pRaw, dataPos, &action.acceptableCode, _OVER) + SDB_GET_INT8(pRaw, dataPos, &action.msgSent, _OVER) + SDB_GET_INT8(pRaw, dataPos, &action.msgReceived, _OVER) SDB_GET_INT32(pRaw, dataPos, &action.contLen, _OVER) action.pCont = taosMemoryMalloc(action.contLen); if (action.pCont == NULL) goto _OVER; @@ -305,19 +334,25 @@ static SSdbRow *mndTransActionDecode(SSdbRaw *pRaw) { } for (int32_t i = 0; i < commitActionNum; ++i) { + SDB_GET_INT32(pRaw, dataPos, &action.id, _OVER) + SDB_GET_INT32(pRaw, dataPos, &action.errCode, _OVER) + SDB_GET_INT32(pRaw, dataPos, &action.acceptableCode, _OVER) SDB_GET_INT8(pRaw, dataPos, &action.isRaw, _OVER) + SDB_GET_INT8(pRaw, dataPos, &action.stage, _OVER) if (action.isRaw) { + SDB_GET_INT8(pRaw, dataPos, &action.rawWritten, _OVER) SDB_GET_INT32(pRaw, dataPos, &dataLen, _OVER) - pData = taosMemoryMalloc(dataLen); - if (pData == NULL) goto _OVER; + action.pRaw = taosMemoryMalloc(dataLen); + if (action.pRaw == NULL) goto _OVER; mTrace("raw:%p, is created", pData); - SDB_GET_BINARY(pRaw, dataPos, pData, dataLen, _OVER); - if (taosArrayPush(pTrans->commitActions, &pData) == NULL) goto _OVER; - pData = NULL; + SDB_GET_BINARY(pRaw, dataPos, (void *)action.pRaw, dataLen, _OVER); + if (taosArrayPush(pTrans->commitActions, &action) == NULL) goto _OVER; + action.pRaw = NULL; } else { SDB_GET_BINARY(pRaw, dataPos, (void *)&action.epSet, sizeof(SEpSet), _OVER); SDB_GET_INT16(pRaw, dataPos, &action.msgType, _OVER) - SDB_GET_INT32(pRaw, dataPos, &action.acceptableCode, _OVER) + SDB_GET_INT8(pRaw, dataPos, &action.msgSent, _OVER) + SDB_GET_INT8(pRaw, dataPos, &action.msgReceived, _OVER) SDB_GET_INT32(pRaw, dataPos, &action.contLen, _OVER) action.pCont = taosMemoryMalloc(action.contLen); if (action.pCont == NULL) goto _OVER; @@ -344,7 +379,6 @@ _OVER: mError("trans:%d, failed to parse from raw:%p since %s", pTrans->id, pRaw, terrstr()); mndTransDropData(pTrans); taosMemoryFreeClear(pRow); - taosMemoryFreeClear(pData); taosMemoryFreeClear(action.pCont); return NULL; } @@ -502,7 +536,7 @@ static void mndTransDropData(STrans *pTrans) { } static int32_t mndTransActionDelete(SSdb *pSdb, STrans *pTrans, bool callFunc) { - mDebug("trans:%d, perform delete action, row:%p stage:%s callfunc:%d", pTrans->id, pTrans, mndTransStr(pTrans->stage), + mTrace("trans:%d, perform delete action, row:%p stage:%s callfunc:%d", pTrans->id, pTrans, mndTransStr(pTrans->stage), callFunc); if (pTrans->stopFunc > 0 && callFunc) { TransCbFp fp = mndTransGetCbFp(pTrans->stopFunc); @@ -515,20 +549,34 @@ static int32_t mndTransActionDelete(SSdb *pSdb, STrans *pTrans, bool callFunc) { return 0; } +static void mndTransUpdateActions(SArray *pOldArray, SArray *pNewArray) { + for (int32_t i = 0; i < taosArrayGetSize(pOldArray); ++i) { + STransAction *pOldAction = taosArrayGet(pOldArray, i); + STransAction *pNewAction = taosArrayGet(pNewArray, i); + pOldAction->rawWritten = pNewAction->rawWritten; + pOldAction->msgSent = pNewAction->msgSent; + pOldAction->msgReceived = pNewAction->msgReceived; + pOldAction->errCode = pNewAction->errCode; + } +} + static int32_t mndTransActionUpdate(SSdb *pSdb, STrans *pOld, STrans *pNew) { - if (pNew->stage == TRN_STAGE_COMMIT) { - pNew->stage = TRN_STAGE_COMMIT_ACTION; - mTrace("trans:%d, stage from %s to %s", pNew->id, mndTransStr(TRN_STAGE_COMMIT), mndTransStr(TRN_STAGE_COMMIT_ACTION)); - } - - if (pNew->stage == TRN_STAGE_ROLLBACK) { - pNew->stage = TRN_STAGE_FINISHED; - mTrace("trans:%d, stage from %s to %s", pNew->id, mndTransStr(TRN_STAGE_ROLLBACK), mndTransStr(TRN_STAGE_FINISHED)); - } - mTrace("trans:%d, perform update action, old row:%p stage:%s, new row:%p stage:%s", pOld->id, pOld, mndTransStr(pOld->stage), pNew, mndTransStr(pNew->stage)); + mndTransUpdateActions(pOld->redoActions, pNew->redoActions); + mndTransUpdateActions(pOld->undoActions, pNew->undoActions); + mndTransUpdateActions(pOld->commitActions, pNew->commitActions); pOld->stage = pNew->stage; + + if (pOld->stage == TRN_STAGE_COMMIT) { + pOld->stage = TRN_STAGE_COMMIT_ACTION; + mTrace("trans:%d, stage from commit to commitAction", pNew->id); + } + + if (pOld->stage == TRN_STAGE_ROLLBACK) { + pOld->stage = TRN_STAGE_FINISHED; + mTrace("trans:%d, stage from rollback to finished", pNew->id); + } return 0; } @@ -557,8 +605,8 @@ STrans *mndTransCreate(SMnode *pMnode, ETrnPolicy policy, ETrnType type, const S pTrans->stage = TRN_STAGE_PREPARE; pTrans->policy = policy; pTrans->type = type; + pTrans->parallel = TRN_EXEC_PARALLEL; pTrans->createdTime = taosGetTimestampMs(); - if (pReq != NULL) pTrans->rpcInfo = pReq->info; pTrans->redoActions = taosArrayInit(TRANS_ARRAY_SIZE, sizeof(STransAction)); pTrans->undoActions = taosArrayInit(TRANS_ARRAY_SIZE, sizeof(STransAction)); pTrans->commitActions = taosArrayInit(TRANS_ARRAY_SIZE, sizeof(STransAction)); @@ -569,7 +617,8 @@ STrans *mndTransCreate(SMnode *pMnode, ETrnPolicy policy, ETrnType type, const S return NULL; } - mDebug("trans:%d, local object is created, data:%p", pTrans->id, pTrans); + if (pReq != NULL) pTrans->rpcInfo = pReq->info; + mTrace("trans:%d, local object is created, data:%p", pTrans->id, pTrans); return pTrans; } @@ -578,7 +627,7 @@ static void mndTransDropActions(SArray *pArray) { for (int32_t i = 0; i < size; ++i) { STransAction *pAction = taosArrayGet(pArray, i); if (pAction->isRaw) { - sdbFreeRaw(pAction->pRaw); + taosMemoryFreeClear(pAction->pRaw); } else { taosMemoryFreeClear(pAction->pCont); } @@ -590,12 +639,14 @@ static void mndTransDropActions(SArray *pArray) { void mndTransDrop(STrans *pTrans) { if (pTrans != NULL) { mndTransDropData(pTrans); - mDebug("trans:%d, local object is freed, data:%p", pTrans->id, pTrans); + mTrace("trans:%d, local object is freed, data:%p", pTrans->id, pTrans); taosMemoryFreeClear(pTrans); } } static int32_t mndTransAppendAction(SArray *pArray, STransAction *pAction) { + pAction->id = taosArrayGetSize(pArray); + void *ptr = taosArrayPush(pArray, pAction); if (ptr == NULL) { terrno = TSDB_CODE_OUT_OF_MEMORY; @@ -606,25 +657,27 @@ static int32_t mndTransAppendAction(SArray *pArray, STransAction *pAction) { } int32_t mndTransAppendRedolog(STrans *pTrans, SSdbRaw *pRaw) { - STransAction action = {.isRaw = true, .pRaw = pRaw}; + STransAction action = {.stage = TRN_STAGE_REDO_ACTION, .isRaw = true, .pRaw = pRaw}; return mndTransAppendAction(pTrans->redoActions, &action); } int32_t mndTransAppendUndolog(STrans *pTrans, SSdbRaw *pRaw) { - STransAction action = {.isRaw = true, .pRaw = pRaw}; + STransAction action = {.stage = TRN_STAGE_UNDO_ACTION, .isRaw = true, .pRaw = pRaw}; return mndTransAppendAction(pTrans->undoActions, &action); } int32_t mndTransAppendCommitlog(STrans *pTrans, SSdbRaw *pRaw) { - STransAction action = {.isRaw = true, .pRaw = pRaw}; + STransAction action = {.stage = TRN_STAGE_COMMIT_ACTION, .isRaw = true, .pRaw = pRaw}; return mndTransAppendAction(pTrans->commitActions, &action); } int32_t mndTransAppendRedoAction(STrans *pTrans, STransAction *pAction) { + pAction->stage = TRN_STAGE_REDO_ACTION; return mndTransAppendAction(pTrans->redoActions, pAction); } int32_t mndTransAppendUndoAction(STrans *pTrans, STransAction *pAction) { + pAction->stage = TRN_STAGE_UNDO_ACTION; return mndTransAppendAction(pTrans->undoActions, pAction); } @@ -821,7 +874,8 @@ static void mndTransSendRpcRsp(SMnode *pMnode, STrans *pTrans) { } taosMemoryFree(pTrans->rpcRsp); - mDebug("trans:%d, send rsp, code:0x%x stage:%d app:%p", pTrans->id, code, pTrans->stage, pTrans->rpcInfo.ahandle); + mDebug("trans:%d, send rsp, code:0x%x stage:%s app:%p", pTrans->id, code, mndTransStr(pTrans->stage), + pTrans->rpcInfo.ahandle); SRpcMsg rspMsg = { .code = code, .pCont = rpcCont, @@ -877,55 +931,46 @@ void mndTransProcessRsp(SRpcMsg *pRsp) { } } - mDebug("trans:%d, action:%d response is received, code:0x%x, accept:0x%04x", transId, action, pRsp->code, - pAction->acceptableCode); + mDebug("trans:%d, %s:%d response is received, code:0x%x, accept:0x%x", transId, mndTransStr(pAction->stage), action, + pRsp->code, pAction->acceptableCode); mndTransExecute(pMnode, pTrans); _OVER: mndReleaseTrans(pMnode, pTrans); } -static int32_t mndTransExecuteLogs(SMnode *pMnode, SArray *pArray) { - SSdb *pSdb = pMnode->pSdb; - int32_t arraySize = taosArrayGetSize(pArray); - - if (arraySize == 0) return 0; - - int32_t code = 0; - for (int32_t i = 0; i < arraySize; ++i) { - SSdbRaw *pRaw = taosArrayGetP(pArray, i); - if (sdbWriteWithoutFree(pSdb, pRaw) != 0) { - code = ((terrno != 0) ? terrno : -1); - } - } - - terrno = code; - return code; -} - - static void mndTransResetActions(SMnode *pMnode, STrans *pTrans, SArray *pArray) { int32_t numOfActions = taosArrayGetSize(pArray); for (int32_t action = 0; action < numOfActions; ++action) { STransAction *pAction = taosArrayGet(pArray, action); if (pAction == NULL) continue; - if (pAction->msgSent && pAction->msgReceived && pAction->errCode == 0) continue; - if (pAction->rawWritten && pAction->errCode == 0) continue; + if (pAction->msgSent && pAction->msgReceived && + (pAction->errCode == 0 || pAction->errCode == pAction->acceptableCode)) + continue; + if (pAction->rawWritten && (pAction->errCode == 0 || pAction->errCode == pAction->acceptableCode)) continue; + pAction->rawWritten = 0; pAction->msgSent = 0; pAction->msgReceived = 0; pAction->errCode = 0; - mDebug("trans:%d, action:%d execute status is reset", pTrans->id, action); + mDebug("trans:%d, %s:%d execute status is reset", pTrans->id, mndTransStr(pAction->stage), action); } } static int32_t mndTransWriteSingleLog(SMnode *pMnode, STrans *pTrans, STransAction *pAction) { + if (pAction->rawWritten) return 0; + int32_t code = sdbWriteWithoutFree(pMnode->pSdb, pAction->pRaw); - if (code == 0) { - mDebug("trans:%d, action:%d write to sdb", pTrans->id, pAction->id); + if (code == 0 || terrno == TSDB_CODE_SDB_OBJ_NOT_THERE) { + pAction->rawWritten = true; + pAction->errCode = 0; + code = 0; + mDebug("trans:%d, %s:%d write to sdb", pTrans->id, mndTransStr(pAction->stage), pAction->id); } else { - mError("trans:%d, action:%d failed to write sdb since %s", pTrans->id, pAction->id, terrstr()); + pAction->errCode = (terrno != 0) ? terrno : code; + mError("trans:%d, %s:%d failed to write sdb since %s", pTrans->id, mndTransStr(pAction->stage), pAction->id, + terrstr()); } return code; @@ -952,13 +997,13 @@ static int32_t mndTransSendSingleMsg(SMnode *pMnode, STrans *pTrans, STransActio pAction->msgSent = 1; pAction->msgReceived = 0; pAction->errCode = 0; - mDebug("trans:%d, action:%d is sent to %s:%u", pTrans->id, pAction->id, + mDebug("trans:%d, %s:%d is sent to %s:%u", pTrans->id, mndTransStr(pAction->stage), pAction->id, pAction->epSet.eps[pAction->epSet.inUse].fqdn, pAction->epSet.eps[pAction->epSet.inUse].port); } else { pAction->msgSent = 0; pAction->msgReceived = 0; pAction->errCode = (terrno != 0) ? terrno : code; - mError("trans:%d, action:%d not send since %s", pTrans->id, pAction->id, terrstr()); + mError("trans:%d, %s:%d not send since %s", pTrans->id, mndTransStr(pAction->stage), pAction->id, terrstr()); } return code; @@ -995,20 +1040,20 @@ static int32_t mndTransExecuteActions(SMnode *pMnode, STrans *pTrans, SArray *pA return -1; } - int32_t numOfReceived = 0; + int32_t numOfExecuted = 0; int32_t errCode = 0; for (int32_t action = 0; action < numOfActions; ++action) { STransAction *pAction = taosArrayGet(pArray, action); if (pAction == NULL) continue; - if (pAction->msgSent && pAction->msgReceived) { - numOfReceived++; + if ((pAction->msgSent && pAction->msgReceived) || pAction->rawWritten) { + numOfExecuted++; if (pAction->errCode != 0 && pAction->errCode != pAction->acceptableCode) { errCode = pAction->errCode; } } } - if (numOfReceived == numOfActions) { + if (numOfExecuted == numOfActions) { if (errCode == 0) { mDebug("trans:%d, all %d actions execute successfully", pTrans->id, numOfActions); return 0; @@ -1019,7 +1064,7 @@ static int32_t mndTransExecuteActions(SMnode *pMnode, STrans *pTrans, SArray *pA return errCode; } } else { - mDebug("trans:%d, %d of %d actions executed", pTrans->id, numOfReceived, numOfActions); + mDebug("trans:%d, %d of %d actions executed", pTrans->id, numOfExecuted, numOfActions); return TSDB_CODE_ACTION_IN_PROGRESS; } } @@ -1041,7 +1086,7 @@ static int32_t mndTransExecuteUndoActions(SMnode *pMnode, STrans *pTrans) { } static int32_t mndTransExecuteCommitActions(SMnode *pMnode, STrans *pTrans) { - int32_t code = mndTransExecuteLogs(pMnode, pTrans->commitActions); + int32_t code = mndTransExecuteActions(pMnode, pTrans, pTrans->commitActions); if (code != 0) { mError("failed to execute commitActions since %s", terrstr()); } @@ -1063,14 +1108,16 @@ static bool mndTransExecuteRedoActionsOneByOne(SMnode *pMnode, STrans *pTrans) { int32_t code = mndTransExecSingleAction(pMnode, pTrans, pAction); if (code == 0) { pTrans->redoActionPos++; - mDebug("trans:%d, redo action:%d is executed and need sync to other mnodes", pTrans->id, pAction->id); + mDebug("trans:%d, %s:%d is executed and need sync to other mnodes", pTrans->id, mndTransStr(pAction->stage), + pAction->id); // todo sync these infos } else if (code == TSDB_CODE_ACTION_IN_PROGRESS) { - mDebug("trans:%d, redo action:%d is in progress and wait it finish", pTrans->id, pAction->id); + mDebug("trans:%d, %s:%d is in progress and wait it finish", pTrans->id, mndTransStr(pAction->stage), pAction->id); continueExec = false; } else { - mError("trans:%d, redo action:%d failed to execute since %s", pTrans->id, pAction->id, terrstr()); + mError("trans:%d, %s:%d failed to execute since %s", pTrans->id, mndTransStr(pAction->stage), pAction->id, + terrstr()); continueExec = false; } @@ -1207,8 +1254,7 @@ static bool mndTransPerfromFinishedStage(SMnode *pMnode, STrans *pTrans) { mError("trans:%d, failed to write sdb since %s", pTrans->id, terrstr()); } - mDebug("trans:%d, finished, code:0x%x, failedTimes:%d", pTrans->id, pTrans->code, pTrans->failedTimes); - + mDebug("trans:%d, execute finished, code:0x%x, failedTimes:%d", pTrans->id, pTrans->code, pTrans->failedTimes); return continueExec; } @@ -1271,15 +1317,15 @@ int32_t mndKillTrans(SMnode *pMnode, STrans *pTrans) { if (pAction == NULL) continue; if (pAction->msgReceived == 0) { - mInfo("trans:%d, action:%d set processed for kill msg received", pTrans->id, i); + mInfo("trans:%d, %s:%d set processed for kill msg received", pTrans->id, mndTransStr(pAction->stage), i); pAction->msgSent = 1; pAction->msgReceived = 1; pAction->errCode = 0; } if (pAction->errCode != 0) { - mInfo("trans:%d, action:%d set processed for kill msg received, errCode from %s to success", pTrans->id, i, - tstrerror(pAction->errCode)); + mInfo("trans:%d, %s:%d set processed for kill msg received, errCode from %s to success", pTrans->id, + mndTransStr(pAction->stage), i, tstrerror(pAction->errCode)); pAction->msgSent = 1; pAction->msgReceived = 1; pAction->errCode = 0; diff --git a/source/dnode/mnode/impl/src/mndUser.c b/source/dnode/mnode/impl/src/mndUser.c index cc6364c457..83d00c86e3 100644 --- a/source/dnode/mnode/impl/src/mndUser.c +++ b/source/dnode/mnode/impl/src/mndUser.c @@ -77,7 +77,7 @@ static int32_t mndCreateDefaultUser(SMnode *pMnode, char *acct, char *user, char if (pRaw == NULL) return -1; sdbSetRawStatus(pRaw, SDB_STATUS_READY); - mDebug("user:%s, will be created while deploy sdb, raw:%p", userObj.user, pRaw); + mDebug("user:%s, will be created when deploying, raw:%p", userObj.user, pRaw); #if 0 return sdbWrite(pMnode->pSdb, pRaw); diff --git a/source/dnode/mnode/impl/src/mndVgroup.c b/source/dnode/mnode/impl/src/mndVgroup.c index e05b38a7c0..161fc5379c 100644 --- a/source/dnode/mnode/impl/src/mndVgroup.c +++ b/source/dnode/mnode/impl/src/mndVgroup.c @@ -501,7 +501,7 @@ int32_t mndAllocVgroup(SMnode *pMnode, SDbObj *pDb, SVgObj **ppVgroups) { *ppVgroups = pVgroups; code = 0; - mInfo("db:%s, %d vgroups is alloced, replica:%d", pDb->name, pDb->cfg.numOfVgroups, pDb->cfg.replications); + mInfo("db:%s, total %d vgroups is alloced, replica:%d", pDb->name, pDb->cfg.numOfVgroups, pDb->cfg.replications); _OVER: if (code != 0) taosMemoryFree(pVgroups); @@ -539,7 +539,7 @@ int32_t mndAddVnodeToVgroup(SMnode *pMnode, SVgObj *pVgroup, SArray *pArray) { pVgid->role = TAOS_SYNC_STATE_FOLLOWER; pDnode->numOfVnodes++; - mInfo("db:%s, vgId:%d, vn:%d dnode:%d is added", pVgroup->dbName, pVgroup->vgId, maxPos, pVgid->dnodeId); + mInfo("db:%s, vgId:%d, vnode_index:%d dnode:%d is added", pVgroup->dbName, pVgroup->vgId, maxPos, pVgid->dnodeId); maxPos++; if (maxPos == 3) return 0; } diff --git a/source/dnode/mnode/sdb/inc/sdb.h b/source/dnode/mnode/sdb/inc/sdb.h index c66b47a24b..1fd0260d0d 100644 --- a/source/dnode/mnode/sdb/inc/sdb.h +++ b/source/dnode/mnode/sdb/inc/sdb.h @@ -168,6 +168,7 @@ typedef struct SSdb { char *currDir; char *tmpDir; int64_t lastCommitVer; + int64_t lastCommitTerm; int64_t curVer; int64_t curTerm; int64_t tableVer[SDB_MAX]; diff --git a/source/dnode/mnode/sdb/src/sdb.c b/source/dnode/mnode/sdb/src/sdb.c index 485b729deb..0526ea5c2d 100644 --- a/source/dnode/mnode/sdb/src/sdb.c +++ b/source/dnode/mnode/sdb/src/sdb.c @@ -55,6 +55,7 @@ SSdb *sdbInit(SSdbOpt *pOption) { pSdb->curVer = -1; pSdb->curTerm = -1; pSdb->lastCommitVer = -1; + pSdb->lastCommitTerm = -1; pSdb->pMnode = pOption->pMnode; taosThreadMutexInit(&pSdb->filelock, NULL); mDebug("sdb init successfully"); diff --git a/source/dnode/mnode/sdb/src/sdbFile.c b/source/dnode/mnode/sdb/src/sdbFile.c index 834e7a00c8..83135491a9 100644 --- a/source/dnode/mnode/sdb/src/sdbFile.c +++ b/source/dnode/mnode/sdb/src/sdbFile.c @@ -70,6 +70,7 @@ static void sdbResetData(SSdb *pSdb) { pSdb->curVer = -1; pSdb->curTerm = -1; pSdb->lastCommitVer = -1; + pSdb->lastCommitTerm = -1; mDebug("sdb reset successfully"); } @@ -211,12 +212,12 @@ static int32_t sdbReadFileImp(SSdb *pSdb) { char file[PATH_MAX] = {0}; snprintf(file, sizeof(file), "%s%ssdb.data", pSdb->currDir, TD_DIRSEP); - mDebug("start to read file:%s", file); + mDebug("start to read sdb file:%s", file); SSdbRaw *pRaw = taosMemoryMalloc(WAL_MAX_SIZE + 100); if (pRaw == NULL) { terrno = TSDB_CODE_OUT_OF_MEMORY; - mError("failed read file since %s", terrstr()); + mError("failed read sdb file since %s", terrstr()); return -1; } @@ -224,12 +225,12 @@ static int32_t sdbReadFileImp(SSdb *pSdb) { if (pFile == NULL) { taosMemoryFree(pRaw); terrno = TAOS_SYSTEM_ERROR(errno); - mError("failed to read file:%s since %s", file, terrstr()); + mError("failed to read sdb file:%s since %s", file, terrstr()); return 0; } if (sdbReadFileHead(pSdb, pFile) != 0) { - mError("failed to read file:%s head since %s", file, terrstr()); + mError("failed to read sdb file:%s head since %s", file, terrstr()); taosMemoryFree(pRaw); taosCloseFile(&pFile); return -1; @@ -245,13 +246,13 @@ static int32_t sdbReadFileImp(SSdb *pSdb) { if (ret < 0) { code = TAOS_SYSTEM_ERROR(errno); - mError("failed to read file:%s since %s", file, tstrerror(code)); + mError("failed to read sdb file:%s since %s", file, tstrerror(code)); break; } if (ret != readLen) { code = TSDB_CODE_FILE_CORRUPTED; - mError("failed to read file:%s since %s", file, tstrerror(code)); + mError("failed to read sdb file:%s since %s", file, tstrerror(code)); break; } @@ -259,34 +260,36 @@ static int32_t sdbReadFileImp(SSdb *pSdb) { ret = taosReadFile(pFile, pRaw->pData, readLen); if (ret < 0) { code = TAOS_SYSTEM_ERROR(errno); - mError("failed to read file:%s since %s", file, tstrerror(code)); + mError("failed to read sdb file:%s since %s", file, tstrerror(code)); break; } if (ret != readLen) { code = TSDB_CODE_FILE_CORRUPTED; - mError("failed to read file:%s since %s", file, tstrerror(code)); + mError("failed to read sdb file:%s since %s", file, tstrerror(code)); break; } int32_t totalLen = sizeof(SSdbRaw) + pRaw->dataLen + sizeof(int32_t); if ((!taosCheckChecksumWhole((const uint8_t *)pRaw, totalLen)) != 0) { code = TSDB_CODE_CHECKSUM_ERROR; - mError("failed to read file:%s since %s", file, tstrerror(code)); + mError("failed to read sdb file:%s since %s", file, tstrerror(code)); break; } code = sdbWriteWithoutFree(pSdb, pRaw); if (code != 0) { - mError("failed to read file:%s since %s", file, terrstr()); + mError("failed to read sdb file:%s since %s", file, terrstr()); goto _OVER; } } code = 0; pSdb->lastCommitVer = pSdb->curVer; + pSdb->lastCommitTerm = pSdb->curTerm; memcpy(pSdb->tableVer, tableVer, sizeof(tableVer)); - mDebug("read file:%s successfully, ver:%" PRId64, file, pSdb->lastCommitVer); + mDebug("read sdb file:%s successfully, ver:%" PRId64 " term:%" PRId64, file, pSdb->lastCommitVer, + pSdb->lastCommitTerm); _OVER: taosCloseFile(&pFile); @@ -302,7 +305,7 @@ int32_t sdbReadFile(SSdb *pSdb) { sdbResetData(pSdb); int32_t code = sdbReadFileImp(pSdb); if (code != 0) { - mError("failed to read sdb since %s", terrstr()); + mError("failed to read sdb file since %s", terrstr()); sdbResetData(pSdb); } @@ -318,18 +321,19 @@ static int32_t sdbWriteFileImp(SSdb *pSdb) { char curfile[PATH_MAX] = {0}; snprintf(curfile, sizeof(curfile), "%s%ssdb.data", pSdb->currDir, TD_DIRSEP); - mDebug("start to write file:%s, current ver:%" PRId64 " term:%" PRId64 ", commit ver:%" PRId64, curfile, pSdb->curVer, - pSdb->curTerm, pSdb->lastCommitVer); + mDebug("start to write sdb file, current ver:%" PRId64 " term:%" PRId64 ", commit ver:%" PRId64 " term:%" PRId64 + " file:%s", + pSdb->curVer, pSdb->curTerm, pSdb->lastCommitVer, pSdb->lastCommitTerm, curfile); TdFilePtr pFile = taosOpenFile(tmpfile, TD_FILE_CREATE | TD_FILE_WRITE | TD_FILE_TRUNC); if (pFile == NULL) { terrno = TAOS_SYSTEM_ERROR(errno); - mError("failed to open file:%s for write since %s", tmpfile, terrstr()); + mError("failed to open sdb file:%s for write since %s", tmpfile, terrstr()); return -1; } if (sdbWriteFileHead(pSdb, pFile) != 0) { - mError("failed to write file:%s head since %s", tmpfile, terrstr()); + mError("failed to write sdb file:%s head since %s", tmpfile, terrstr()); taosCloseFile(&pFile); return -1; } @@ -338,7 +342,7 @@ static int32_t sdbWriteFileImp(SSdb *pSdb) { SdbEncodeFp encodeFp = pSdb->encodeFps[i]; if (encodeFp == NULL) continue; - mTrace("write %s to file, total %d rows", sdbTableName(i), sdbGetSize(pSdb, i)); + mTrace("write %s to sdb file, total %d rows", sdbTableName(i), sdbGetSize(pSdb, i)); SHashObj *hash = pSdb->hashObjs[i]; TdThreadRwlock *pLock = &pSdb->locks[i]; @@ -394,7 +398,7 @@ static int32_t sdbWriteFileImp(SSdb *pSdb) { code = taosFsyncFile(pFile); if (code != 0) { code = TAOS_SYSTEM_ERROR(errno); - mError("failed to sync file:%s since %s", tmpfile, tstrerror(code)); + mError("failed to sync sdb file:%s since %s", tmpfile, tstrerror(code)); } } @@ -404,15 +408,17 @@ static int32_t sdbWriteFileImp(SSdb *pSdb) { code = taosRenameFile(tmpfile, curfile); if (code != 0) { code = TAOS_SYSTEM_ERROR(errno); - mError("failed to write file:%s since %s", curfile, tstrerror(code)); + mError("failed to write sdb file:%s since %s", curfile, tstrerror(code)); } } if (code != 0) { - mError("failed to write file:%s since %s", curfile, tstrerror(code)); + mError("failed to write sdb file:%s since %s", curfile, tstrerror(code)); } else { pSdb->lastCommitVer = pSdb->curVer; - mDebug("write file:%s successfully, ver:%" PRId64 " term:%" PRId64, curfile, pSdb->lastCommitVer, pSdb->curTerm); + pSdb->lastCommitTerm = pSdb->curTerm; + mDebug("write sdb file successfully, ver:%" PRId64 " term:%" PRId64 " file:%s", pSdb->lastCommitVer, + pSdb->lastCommitTerm, curfile); } terrno = code; @@ -427,7 +433,7 @@ int32_t sdbWriteFile(SSdb *pSdb) { taosThreadMutexLock(&pSdb->filelock); int32_t code = sdbWriteFileImp(pSdb); if (code != 0) { - mError("failed to write sdb since %s", terrstr()); + mError("failed to write sdb file since %s", terrstr()); } taosThreadMutexUnlock(&pSdb->filelock); return code; @@ -493,7 +499,7 @@ int32_t sdbStartRead(SSdb *pSdb, SSdbIter **ppIter) { if (taosCopyFile(datafile, pIter->name) < 0) { taosThreadMutexUnlock(&pSdb->filelock); terrno = TAOS_SYSTEM_ERROR(errno); - mError("failed to copy file %s to %s since %s", datafile, pIter->name, terrstr()); + mError("failed to copy sdb file %s to %s since %s", datafile, pIter->name, terrstr()); sdbCloseIter(pIter); return -1; } @@ -502,7 +508,7 @@ int32_t sdbStartRead(SSdb *pSdb, SSdbIter **ppIter) { pIter->file = taosOpenFile(pIter->name, TD_FILE_READ); if (pIter->file == NULL) { terrno = TAOS_SYSTEM_ERROR(errno); - mError("failed to open file:%s since %s", pIter->name, terrstr()); + mError("failed to open sdb file:%s since %s", pIter->name, terrstr()); sdbCloseIter(pIter); return -1; } diff --git a/source/libs/qworker/src/qworker.c b/source/libs/qworker/src/qworker.c index 7201820854..655dcbc853 100644 --- a/source/libs/qworker/src/qworker.c +++ b/source/libs/qworker/src/qworker.c @@ -79,7 +79,11 @@ int32_t qwExecTask(QW_FPARAMS_DEF, SQWTaskCtx *ctx, bool *queryEnd) { if (taskHandle) { code = qExecTask(taskHandle, &pRes, &useconds); if (code) { - QW_TASK_ELOG("qExecTask failed, code:%x - %s", code, tstrerror(code)); + if (code != TSDB_CODE_OPS_NOT_SUPPORT) { + QW_TASK_ELOG("qExecTask failed, code:%x - %s", code, tstrerror(code)); + } else { + QW_TASK_DLOG("qExecTask failed, code:%x - %s", code, tstrerror(code)); + } QW_ERR_RET(code); } } From e18ad0eb696581f3c36729661e5620c8877a6d7f Mon Sep 17 00:00:00 2001 From: jiacy-jcy Date: Tue, 31 May 2022 14:51:58 +0800 Subject: [PATCH 22/56] add test case for stateduration --- tests/system-test/2-query/stateduration.py | 269 +++++++++++++++++++++ 1 file changed, 269 insertions(+) create mode 100644 tests/system-test/2-query/stateduration.py diff --git a/tests/system-test/2-query/stateduration.py b/tests/system-test/2-query/stateduration.py new file mode 100644 index 0000000000..6689fab2c3 --- /dev/null +++ b/tests/system-test/2-query/stateduration.py @@ -0,0 +1,269 @@ +################################################################### +# 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 -*- + +from util.log import * +from util.cases import * +from util.sql import * + +class TDTestCase: + def init(self, conn, logSql): + tdLog.debug("start to execute %s" % __file__) + tdSql.init(conn.cursor()) + self.ts = 1537146000000 + self.param_list = ['LT','lt','Lt','lT','GT','gt','Gt','gT','LE','le','Le','lE','GE','ge','Ge','gE','NE','ne','Ne','nE','EQ','eq','Eq','eQ'] + self.row_num = 10 + def run(self): + tdSql.prepare() + + + + + # timestamp = 1ms , time_unit = 1s + tdSql.execute('''create table test(ts timestamp, col1 tinyint, col2 smallint, col3 int, col4 bigint, col5 float, col6 double, + col7 bool, col8 binary(20), col9 nchar(20), col11 tinyint unsigned, col12 smallint unsigned, col13 int unsigned, col14 bigint unsigned)''') + for i in range(self.row_num): + tdSql.execute("insert into test values(%d, %d, %d, %d, %d, %f, %f, %d, 'taosdata%d', '涛思数据%d', %d, %d, %d, %d)" + % (self.ts + i, i + 1, i + 1, i + 1, i + 1, i + 0.1, i + 0.1, i % 2, i + 1, i + 1, i + 1, i + 1, i + 1, i + 1)) + integer_list = [1,2,3,4,11,12,13,14] + float_list = [5,6] + + for i in integer_list: + for j in self.param_list: + tdSql.query(f"select stateduration(col{i},'{j}',5) from test") + tdSql.checkRows(10) + if j in ['LT' ,'lt','Lt','lT']: + tdSql.checkEqual(tdSql.queryResult,[(0,), (0,), (0,), (0,), (-1,), (-1,), (-1,), (-1,), (-1,), (-1,)]) + elif j in ['GT','gt', 'Gt','gT']: + tdSql.checkEqual(tdSql.queryResult,[(-1,), (-1,), (-1,), (-1,), (-1,), (0,), (0,), (0,), (0,), (0,)]) + elif j in ['LE','le','Le','lE']: + tdSql.checkEqual(tdSql.queryResult,[(0,), (0,), (0,), (0,), (0,), (-1,), (-1,), (-1,), (-1,), (-1,)]) + elif j in [ 'GE','ge','Ge','gE']: + tdSql.checkEqual(tdSql.queryResult,[(-1,), (-1,), (-1,), (-1,), (0,), (0,), (0,), (0,), (0,), (0,)]) + elif j in ['NE','ne','Ne','nE']: + tdSql.checkEqual(tdSql.queryResult,[(0,), (0,), (0,), (0,), (-1,), (0,), (0,), (0,), (0,), (0,)]) + elif j in ['EQ','eq','Eq','eQ']: + tdSql.checkEqual(tdSql.queryResult,[(-1,), (-1,), (-1,), (-1,), (0,), (-1,), (-1,), (-1,), (-1,), (-1,)]) + for i in float_list: + for j in self.param_list: + tdSql.query(f"select stateduration(col{i},'{j}',5) from test") + tdSql.checkRows(10) + if j in ['LT','lt','Lt','lT','LE','le','Le','lE']: + tdSql.checkEqual(tdSql.queryResult,[(0,), (0,), (0,), (0,), (0,), (-1,), (-1,), (-1,), (-1,), (-1,)]) + elif j in ['GE','ge','Ge','gE','GT','gt','Gt','gT']: + tdSql.checkEqual(tdSql.queryResult,[(-1,), (-1,), (-1,), (-1,), (-1,), (0,), (0,), (0,), (0,), (0,)]) + elif j in ['NE','ne','Ne','nE']: + tdSql.checkEqual(tdSql.queryResult,[(0,), (0,), (0,), (0,), (0,), (0,), (0,), (0,), (0,), (0,)]) + elif j in ['EQ','eq','Eq','eQ']: + tdSql.checkEqual(tdSql.queryResult,[(-1,), (-1,), (-1,), (-1,), (-1,), (-1,), (-1,), (-1,), (-1,), (-1,)]) + + error_column_list = ['ts','col7','col8','col9','a',1] + for i in error_column_list: + for j in self.param_list: + tdSql.error(f"select stateduration({i},{j},5) from test") + + error_param_list = ['a',1] + for i in error_param_list: + tdSql.error(f"select stateduration(col1,{i},5) from test") + + # timestamp = 1s, time_unit =1s + tdSql.execute('''create table test1(ts timestamp, col1 tinyint, col2 smallint, col3 int, col4 bigint, col5 float, col6 double, + col7 bool, col8 binary(20), col9 nchar(20), col11 tinyint unsigned, col12 smallint unsigned, col13 int unsigned, col14 bigint unsigned)''') + for i in range(self.row_num): + tdSql.execute("insert into test1 values(%d, %d, %d, %d, %d, %f, %f, %d, 'taosdata%d', '涛思数据%d', %d, %d, %d, %d)" + % (self.ts + i*1000, i + 1, i + 1, i + 1, i + 1, i + 0.1, i + 0.1, i % 2, i + 1, i + 1, i + 1, i + 1, i + 1, i + 1)) + + for i in integer_list: + for j in self.param_list: + tdSql.query(f"select stateduration(col{i},'{j}',5) from test1") + tdSql.checkRows(10) + # print(tdSql.queryResult) + if j in ['LT' ,'lt','Lt','lT']: + tdSql.checkEqual(tdSql.queryResult,[(0,), (1,), (2,), (3,), (-1,), (-1,), (-1,), (-1,), (-1,), (-1,)]) + elif j in ['GT','gt', 'Gt','gT']: + tdSql.checkEqual(tdSql.queryResult,[(-1,), (-1,), (-1,), (-1,), (-1,), (0,), (1,), (2,), (3,), (4,)]) + elif j in ['LE','le','Le','lE']: + tdSql.checkEqual(tdSql.queryResult,[(0,), (1,), (2,), (3,), (4,), (-1,), (-1,), (-1,), (-1,), (-1,)]) + elif j in [ 'GE','ge','Ge','gE']: + tdSql.checkEqual(tdSql.queryResult,[(-1,), (-1,), (-1,), (-1,), (0,), (1,), (2,), (3,), (4,), (5,)]) + elif j in ['NE','ne','Ne','nE']: + tdSql.checkEqual(tdSql.queryResult,[(0,), (1,), (2,), (3,), (-1,), (0,), (1,), (2,), (3,), (4,)]) + elif j in ['EQ','eq','Eq','eQ']: + tdSql.checkEqual(tdSql.queryResult,[(-1,), (-1,), (-1,), (-1,), (0,), (-1,), (-1,), (-1,), (-1,), (-1,)]) + for i in float_list: + for j in self.param_list: + tdSql.query(f"select stateduration(col{i},'{j}',5) from test1") + tdSql.checkRows(10) + print(tdSql.queryResult) + if j in ['LT','lt','Lt','lT','LE','le','Le','lE']: + tdSql.checkEqual(tdSql.queryResult,[(0,), (1,), (2,), (3,), (4,), (-1,), (-1,), (-1,), (-1,), (-1,)]) + elif j in ['GE','ge','Ge','gE','GT','gt','Gt','gT']: + tdSql.checkEqual(tdSql.queryResult,[(-1,), (-1,), (-1,), (-1,), (-1,), (0,), (1,), (2,), (3,), (4,)]) + elif j in ['NE','ne','Ne','nE']: + tdSql.checkEqual(tdSql.queryResult,[(0,), (1,), (2,), (3,), (4,), (5,), (6,), (7,), (8,), (9,)]) + elif j in ['EQ','eq','Eq','eQ']: + tdSql.checkEqual(tdSql.queryResult,[(-1,), (-1,), (-1,), (-1,), (-1,), (-1,), (-1,), (-1,), (-1,), (-1,)]) + + + # timestamp = 1m, time_unit =1m + tdSql.execute('''create table test2(ts timestamp, col1 tinyint, col2 smallint, col3 int, col4 bigint, col5 float, col6 double, + col7 bool, col8 binary(20), col9 nchar(20), col11 tinyint unsigned, col12 smallint unsigned, col13 int unsigned, col14 bigint unsigned)''') + for i in range(self.row_num): + tdSql.execute("insert into test2 values(%d, %d, %d, %d, %d, %f, %f, %d, 'taosdata%d', '涛思数据%d', %d, %d, %d, %d)" + % (self.ts + i*1000*60, i + 1, i + 1, i + 1, i + 1, i + 0.1, i + 0.1, i % 2, i + 1, i + 1, i + 1, i + 1, i + 1, i + 1)) + + for i in integer_list: + for j in self.param_list: + tdSql.query(f"select stateduration(col{i},'{j}',5,1m) from test2") + tdSql.checkRows(10) + # print(tdSql.queryResult) + if j in ['LT' ,'lt','Lt','lT']: + tdSql.checkEqual(tdSql.queryResult,[(0,), (1,), (2,), (3,), (-1,), (-1,), (-1,), (-1,), (-1,), (-1,)]) + elif j in ['GT','gt', 'Gt','gT']: + tdSql.checkEqual(tdSql.queryResult,[(-1,), (-1,), (-1,), (-1,), (-1,), (0,), (1,), (2,), (3,), (4,)]) + elif j in ['LE','le','Le','lE']: + tdSql.checkEqual(tdSql.queryResult,[(0,), (1,), (2,), (3,), (4,), (-1,), (-1,), (-1,), (-1,), (-1,)]) + elif j in [ 'GE','ge','Ge','gE']: + tdSql.checkEqual(tdSql.queryResult,[(-1,), (-1,), (-1,), (-1,), (0,), (1,), (2,), (3,), (4,), (5,)]) + elif j in ['NE','ne','Ne','nE']: + tdSql.checkEqual(tdSql.queryResult,[(0,), (1,), (2,), (3,), (-1,), (0,), (1,), (2,), (3,), (4,)]) + elif j in ['EQ','eq','Eq','eQ']: + tdSql.checkEqual(tdSql.queryResult,[(-1,), (-1,), (-1,), (-1,), (0,), (-1,), (-1,), (-1,), (-1,), (-1,)]) + for i in float_list: + for j in self.param_list: + tdSql.query(f"select stateduration(col{i},'{j}',5,1m) from test2") + tdSql.checkRows(10) + print(tdSql.queryResult) + if j in ['LT','lt','Lt','lT','LE','le','Le','lE']: + tdSql.checkEqual(tdSql.queryResult,[(0,), (1,), (2,), (3,), (4,), (-1,), (-1,), (-1,), (-1,), (-1,)]) + elif j in ['GE','ge','Ge','gE','GT','gt','Gt','gT']: + tdSql.checkEqual(tdSql.queryResult,[(-1,), (-1,), (-1,), (-1,), (-1,), (0,), (1,), (2,), (3,), (4,)]) + elif j in ['NE','ne','Ne','nE']: + tdSql.checkEqual(tdSql.queryResult,[(0,), (1,), (2,), (3,), (4,), (5,), (6,), (7,), (8,), (9,)]) + elif j in ['EQ','eq','Eq','eQ']: + tdSql.checkEqual(tdSql.queryResult,[(-1,), (-1,), (-1,), (-1,), (-1,), (-1,), (-1,), (-1,), (-1,), (-1,)]) + + # timestamp = 1h, time_unit =1h + tdSql.execute('''create table test3(ts timestamp, col1 tinyint, col2 smallint, col3 int, col4 bigint, col5 float, col6 double, + col7 bool, col8 binary(20), col9 nchar(20), col11 tinyint unsigned, col12 smallint unsigned, col13 int unsigned, col14 bigint unsigned)''') + for i in range(self.row_num): + tdSql.execute("insert into test3 values(%d, %d, %d, %d, %d, %f, %f, %d, 'taosdata%d', '涛思数据%d', %d, %d, %d, %d)" + % (self.ts + i*1000*60*60, i + 1, i + 1, i + 1, i + 1, i + 0.1, i + 0.1, i % 2, i + 1, i + 1, i + 1, i + 1, i + 1, i + 1)) + + for i in integer_list: + for j in self.param_list: + tdSql.query(f"select stateduration(col{i},'{j}',5,1h) from test3") + tdSql.checkRows(10) + # print(tdSql.queryResult) + if j in ['LT' ,'lt','Lt','lT']: + tdSql.checkEqual(tdSql.queryResult,[(0,), (1,), (2,), (3,), (-1,), (-1,), (-1,), (-1,), (-1,), (-1,)]) + elif j in ['GT','gt', 'Gt','gT']: + tdSql.checkEqual(tdSql.queryResult,[(-1,), (-1,), (-1,), (-1,), (-1,), (0,), (1,), (2,), (3,), (4,)]) + elif j in ['LE','le','Le','lE']: + tdSql.checkEqual(tdSql.queryResult,[(0,), (1,), (2,), (3,), (4,), (-1,), (-1,), (-1,), (-1,), (-1,)]) + elif j in [ 'GE','ge','Ge','gE']: + tdSql.checkEqual(tdSql.queryResult,[(-1,), (-1,), (-1,), (-1,), (0,), (1,), (2,), (3,), (4,), (5,)]) + elif j in ['NE','ne','Ne','nE']: + tdSql.checkEqual(tdSql.queryResult,[(0,), (1,), (2,), (3,), (-1,), (0,), (1,), (2,), (3,), (4,)]) + elif j in ['EQ','eq','Eq','eQ']: + tdSql.checkEqual(tdSql.queryResult,[(-1,), (-1,), (-1,), (-1,), (0,), (-1,), (-1,), (-1,), (-1,), (-1,)]) + for i in float_list: + for j in self.param_list: + tdSql.query(f"select stateduration(col{i},'{j}',5,1h) from test3") + tdSql.checkRows(10) + print(tdSql.queryResult) + if j in ['LT','lt','Lt','lT','LE','le','Le','lE']: + tdSql.checkEqual(tdSql.queryResult,[(0,), (1,), (2,), (3,), (4,), (-1,), (-1,), (-1,), (-1,), (-1,)]) + elif j in ['GE','ge','Ge','gE','GT','gt','Gt','gT']: + tdSql.checkEqual(tdSql.queryResult,[(-1,), (-1,), (-1,), (-1,), (-1,), (0,), (1,), (2,), (3,), (4,)]) + elif j in ['NE','ne','Ne','nE']: + tdSql.checkEqual(tdSql.queryResult,[(0,), (1,), (2,), (3,), (4,), (5,), (6,), (7,), (8,), (9,)]) + elif j in ['EQ','eq','Eq','eQ']: + tdSql.checkEqual(tdSql.queryResult,[(-1,), (-1,), (-1,), (-1,), (-1,), (-1,), (-1,), (-1,), (-1,), (-1,)]) + + # timestamp = 1h,time_unit =1m + for i in integer_list: + for j in self.param_list: + tdSql.query(f"select stateduration(col{i},'{j}',5,1m) from test3") + tdSql.checkRows(10) + # print(tdSql.queryResult) + if j in ['LT' ,'lt','Lt','lT']: + tdSql.checkEqual(tdSql.queryResult,[(0,), (60,), (120,), (180,), (-1,), (-1,), (-1,), (-1,), (-1,), (-1,)]) + elif j in ['GT','gt', 'Gt','gT']: + tdSql.checkEqual(tdSql.queryResult,[(-1,), (-1,), (-1,), (-1,), (-1,), (0,), (60,), (120,), (180,), (240,)]) + elif j in ['LE','le','Le','lE']: + tdSql.checkEqual(tdSql.queryResult,[(0,), (60,), (120,), (180,), (240,), (-1,), (-1,), (-1,), (-1,), (-1,)]) + elif j in [ 'GE','ge','Ge','gE']: + tdSql.checkEqual(tdSql.queryResult,[(-1,), (-1,), (-1,), (-1,), (0,), (60,), (120,), (180,), (240,), (300,)]) + elif j in ['NE','ne','Ne','nE']: + tdSql.checkEqual(tdSql.queryResult,[(0,), (60,), (120,), (180,), (-1,), (0,), (60,), (120,), (180,), (240,)]) + elif j in ['EQ','eq','Eq','eQ']: + tdSql.checkEqual(tdSql.queryResult,[(-1,), (-1,), (-1,), (-1,), (0,), (-1,), (-1,), (-1,), (-1,), (-1,)]) + for i in float_list: + for j in self.param_list: + tdSql.query(f"select stateduration(col{i},'{j}',5,1m) from test3") + tdSql.checkRows(10) + print(tdSql.queryResult) + if j in ['LT','lt','Lt','lT','LE','le','Le','lE']: + tdSql.checkEqual(tdSql.queryResult,[(0,), (60,), (120,), (180,), (240,), (-1,), (-1,), (-1,), (-1,), (-1,)]) + elif j in ['GE','ge','Ge','gE','GT','gt','Gt','gT']: + tdSql.checkEqual(tdSql.queryResult,[(-1,), (-1,), (-1,), (-1,), (-1,), (0,), (60,), (120,), (180,), (240,)]) + elif j in ['NE','ne','Ne','nE']: + tdSql.checkEqual(tdSql.queryResult,[(0,), (60,), (120,), (180,), (240,), (300,), (360,), (420,), (480,), (540,)]) + elif j in ['EQ','eq','Eq','eQ']: + tdSql.checkEqual(tdSql.queryResult,[(-1,), (-1,), (-1,), (-1,), (-1,), (-1,), (-1,), (-1,), (-1,), (-1,)]) + + # for stb + tdSql.execute('''create table stb(ts timestamp, col1 tinyint, col2 smallint, col3 int, col4 bigint, col5 float, col6 double, + col7 bool, col8 binary(20), col9 nchar(20), col11 tinyint unsigned, col12 smallint unsigned, col13 int unsigned, col14 bigint unsigned) tags(t0 int)''') + tdSql.execute('create table stb_1 using stb tags(1)') + for i in range(self.row_num): + tdSql.execute("insert into stb_1 values(%d, %d, %d, %d, %d, %f, %f, %d, 'taosdata%d', '涛思数据%d', %d, %d, %d, %d)" + % (self.ts + i*1000*60*60, i + 1, i + 1, i + 1, i + 1, i + 0.1, i + 0.1, i % 2, i + 1, i + 1, i + 1, i + 1, i + 1, i + 1)) + + for i in integer_list: + for j in self.param_list: + tdSql.query(f"select stateduration(col{i},'{j}',5,1h) from stb") + tdSql.checkRows(10) + # print(tdSql.queryResult) + if j in ['LT' ,'lt','Lt','lT']: + tdSql.checkEqual(tdSql.queryResult,[(0,), (1,), (2,), (3,), (-1,), (-1,), (-1,), (-1,), (-1,), (-1,)]) + elif j in ['GT','gt', 'Gt','gT']: + tdSql.checkEqual(tdSql.queryResult,[(-1,), (-1,), (-1,), (-1,), (-1,), (0,), (1,), (2,), (3,), (4,)]) + elif j in ['LE','le','Le','lE']: + tdSql.checkEqual(tdSql.queryResult,[(0,), (1,), (2,), (3,), (4,), (-1,), (-1,), (-1,), (-1,), (-1,)]) + elif j in [ 'GE','ge','Ge','gE']: + tdSql.checkEqual(tdSql.queryResult,[(-1,), (-1,), (-1,), (-1,), (0,), (1,), (2,), (3,), (4,), (5,)]) + elif j in ['NE','ne','Ne','nE']: + tdSql.checkEqual(tdSql.queryResult,[(0,), (1,), (2,), (3,), (-1,), (0,), (1,), (2,), (3,), (4,)]) + elif j in ['EQ','eq','Eq','eQ']: + tdSql.checkEqual(tdSql.queryResult,[(-1,), (-1,), (-1,), (-1,), (0,), (-1,), (-1,), (-1,), (-1,), (-1,)]) + for i in float_list: + for j in self.param_list: + tdSql.query(f"select stateduration(col{i},'{j}',5,1h) from stb") + tdSql.checkRows(10) + print(tdSql.queryResult) + if j in ['LT','lt','Lt','lT','LE','le','Le','lE']: + tdSql.checkEqual(tdSql.queryResult,[(0,), (1,), (2,), (3,), (4,), (-1,), (-1,), (-1,), (-1,), (-1,)]) + elif j in ['GE','ge','Ge','gE','GT','gt','Gt','gT']: + tdSql.checkEqual(tdSql.queryResult,[(-1,), (-1,), (-1,), (-1,), (-1,), (0,), (1,), (2,), (3,), (4,)]) + elif j in ['NE','ne','Ne','nE']: + tdSql.checkEqual(tdSql.queryResult,[(0,), (1,), (2,), (3,), (4,), (5,), (6,), (7,), (8,), (9,)]) + elif j in ['EQ','eq','Eq','eQ']: + tdSql.checkEqual(tdSql.queryResult,[(-1,), (-1,), (-1,), (-1,), (-1,), (-1,), (-1,), (-1,), (-1,), (-1,)]) + + 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 From ac02f8d2807ed8f5fb74f787f3cbe00fba0bc197 Mon Sep 17 00:00:00 2001 From: plum-lihui Date: Tue, 31 May 2022 14:52:36 +0800 Subject: [PATCH 23/56] test: modify case --- tests/system-test/fulltest.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/system-test/fulltest.sh b/tests/system-test/fulltest.sh index 2725cf3d13..f2a4b3cd27 100644 --- a/tests/system-test/fulltest.sh +++ b/tests/system-test/fulltest.sh @@ -92,4 +92,3 @@ python3 ./test.py -f 7-tmq/subscribeStb1.py python3 ./test.py -f 7-tmq/subscribeStb2.py python3 ./test.py -f 7-tmq/subscribeStb3.py python3 ./test.py -f 7-tmq/subscribeStb4.py -python3 ./test.py -f 7-tmq/subscribeStb2.py \ No newline at end of file From a714a64e2f7f5621c5a7be31458c7c6003c4a822 Mon Sep 17 00:00:00 2001 From: jiacy-jcy Date: Tue, 31 May 2022 15:02:12 +0800 Subject: [PATCH 24/56] update fulltest.sh --- tests/system-test/fulltest.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/system-test/fulltest.sh b/tests/system-test/fulltest.sh index 6331086fb3..5708a7adeb 100644 --- a/tests/system-test/fulltest.sh +++ b/tests/system-test/fulltest.sh @@ -55,8 +55,8 @@ python3 ./test.py -f 2-query/Timediff.py python3 ./test.py -f 2-query/top.py python3 ./test.py -f 2-query/bottom.py - - +python3 ./test.py -f 2-query/percentile.py +python3 ./test.py -f 2-query/apercentile.py python3 ./test.py -f 2-query/abs.py python3 ./test.py -f 2-query/ceil.py python3 ./test.py -f 2-query/floor.py From ce166fb146ef58e29396d8b14631a03c39697276 Mon Sep 17 00:00:00 2001 From: Xiaoyu Wang Date: Tue, 31 May 2022 15:07:15 +0800 Subject: [PATCH 25/56] fix: error in data precision of super table query --- include/common/ttokendef.h | 156 +-- source/libs/nodes/src/nodesCloneFuncs.c | 1 + source/libs/parser/inc/sql.y | 2 +- source/libs/parser/src/parTokenizer.c | 2 +- source/libs/parser/src/parTranslater.c | 42 +- source/libs/parser/src/sql.c | 1354 ++++++++++--------- source/libs/parser/test/parInitialDTest.cpp | 6 +- source/libs/parser/test/parSelectTest.cpp | 2 + source/libs/planner/src/planLogicCreater.c | 2 + 9 files changed, 795 insertions(+), 772 deletions(-) diff --git a/include/common/ttokendef.h b/include/common/ttokendef.h index 2fc524eeac..0e54f07991 100644 --- a/include/common/ttokendef.h +++ b/include/common/ttokendef.h @@ -162,84 +162,84 @@ #define TK_INTERVAL 144 #define TK_TOPIC 145 #define TK_AS 146 -#define TK_CGROUP 147 -#define TK_WITH 148 -#define TK_SCHEMA 149 -#define TK_DESC 150 -#define TK_DESCRIBE 151 -#define TK_RESET 152 -#define TK_QUERY 153 -#define TK_CACHE 154 -#define TK_EXPLAIN 155 -#define TK_ANALYZE 156 -#define TK_VERBOSE 157 -#define TK_NK_BOOL 158 -#define TK_RATIO 159 -#define TK_COMPACT 160 -#define TK_VNODES 161 -#define TK_IN 162 -#define TK_OUTPUTTYPE 163 -#define TK_AGGREGATE 164 -#define TK_BUFSIZE 165 -#define TK_STREAM 166 -#define TK_INTO 167 -#define TK_TRIGGER 168 -#define TK_AT_ONCE 169 -#define TK_WINDOW_CLOSE 170 -#define TK_WATERMARK 171 -#define TK_KILL 172 -#define TK_CONNECTION 173 -#define TK_TRANSACTION 174 -#define TK_MERGE 175 -#define TK_VGROUP 176 -#define TK_REDISTRIBUTE 177 -#define TK_SPLIT 178 -#define TK_SYNCDB 179 -#define TK_NULL 180 -#define TK_NK_QUESTION 181 -#define TK_NK_ARROW 182 -#define TK_ROWTS 183 -#define TK_TBNAME 184 -#define TK_QSTARTTS 185 -#define TK_QENDTS 186 -#define TK_WSTARTTS 187 -#define TK_WENDTS 188 -#define TK_WDURATION 189 -#define TK_CAST 190 -#define TK_NOW 191 -#define TK_TODAY 192 -#define TK_TIMEZONE 193 -#define TK_COUNT 194 -#define TK_FIRST 195 -#define TK_LAST 196 -#define TK_LAST_ROW 197 -#define TK_BETWEEN 198 -#define TK_IS 199 -#define TK_NK_LT 200 -#define TK_NK_GT 201 -#define TK_NK_LE 202 -#define TK_NK_GE 203 -#define TK_NK_NE 204 -#define TK_MATCH 205 -#define TK_NMATCH 206 -#define TK_CONTAINS 207 -#define TK_JOIN 208 -#define TK_INNER 209 -#define TK_SELECT 210 -#define TK_DISTINCT 211 -#define TK_WHERE 212 -#define TK_PARTITION 213 -#define TK_BY 214 -#define TK_SESSION 215 -#define TK_STATE_WINDOW 216 -#define TK_SLIDING 217 -#define TK_FILL 218 -#define TK_VALUE 219 -#define TK_NONE 220 -#define TK_PREV 221 -#define TK_LINEAR 222 -#define TK_NEXT 223 -#define TK_GROUP 224 +#define TK_CONSUMER 147 +#define TK_GROUP 148 +#define TK_WITH 149 +#define TK_SCHEMA 150 +#define TK_DESC 151 +#define TK_DESCRIBE 152 +#define TK_RESET 153 +#define TK_QUERY 154 +#define TK_CACHE 155 +#define TK_EXPLAIN 156 +#define TK_ANALYZE 157 +#define TK_VERBOSE 158 +#define TK_NK_BOOL 159 +#define TK_RATIO 160 +#define TK_COMPACT 161 +#define TK_VNODES 162 +#define TK_IN 163 +#define TK_OUTPUTTYPE 164 +#define TK_AGGREGATE 165 +#define TK_BUFSIZE 166 +#define TK_STREAM 167 +#define TK_INTO 168 +#define TK_TRIGGER 169 +#define TK_AT_ONCE 170 +#define TK_WINDOW_CLOSE 171 +#define TK_WATERMARK 172 +#define TK_KILL 173 +#define TK_CONNECTION 174 +#define TK_TRANSACTION 175 +#define TK_MERGE 176 +#define TK_VGROUP 177 +#define TK_REDISTRIBUTE 178 +#define TK_SPLIT 179 +#define TK_SYNCDB 180 +#define TK_NULL 181 +#define TK_NK_QUESTION 182 +#define TK_NK_ARROW 183 +#define TK_ROWTS 184 +#define TK_TBNAME 185 +#define TK_QSTARTTS 186 +#define TK_QENDTS 187 +#define TK_WSTARTTS 188 +#define TK_WENDTS 189 +#define TK_WDURATION 190 +#define TK_CAST 191 +#define TK_NOW 192 +#define TK_TODAY 193 +#define TK_TIMEZONE 194 +#define TK_COUNT 195 +#define TK_FIRST 196 +#define TK_LAST 197 +#define TK_LAST_ROW 198 +#define TK_BETWEEN 199 +#define TK_IS 200 +#define TK_NK_LT 201 +#define TK_NK_GT 202 +#define TK_NK_LE 203 +#define TK_NK_GE 204 +#define TK_NK_NE 205 +#define TK_MATCH 206 +#define TK_NMATCH 207 +#define TK_CONTAINS 208 +#define TK_JOIN 209 +#define TK_INNER 210 +#define TK_SELECT 211 +#define TK_DISTINCT 212 +#define TK_WHERE 213 +#define TK_PARTITION 214 +#define TK_BY 215 +#define TK_SESSION 216 +#define TK_STATE_WINDOW 217 +#define TK_SLIDING 218 +#define TK_FILL 219 +#define TK_VALUE 220 +#define TK_NONE 221 +#define TK_PREV 222 +#define TK_LINEAR 223 +#define TK_NEXT 224 #define TK_HAVING 225 #define TK_ORDER 226 #define TK_SLIMIT 227 diff --git a/source/libs/nodes/src/nodesCloneFuncs.c b/source/libs/nodes/src/nodesCloneFuncs.c index 68d3741b48..84b5e0a043 100644 --- a/source/libs/nodes/src/nodesCloneFuncs.c +++ b/source/libs/nodes/src/nodesCloneFuncs.c @@ -305,6 +305,7 @@ static SNode* logicNodeCopy(const SLogicNode* pSrc, SLogicNode* pDst) { CLONE_NODE_FIELD(pConditions); CLONE_NODE_LIST_FIELD(pChildren); COPY_SCALAR_FIELD(optimizedFlag); + COPY_SCALAR_FIELD(precision); return (SNode*)pDst; } diff --git a/source/libs/parser/inc/sql.y b/source/libs/parser/inc/sql.y index 1fb60f83a5..f45f10f3b9 100644 --- a/source/libs/parser/inc/sql.y +++ b/source/libs/parser/inc/sql.y @@ -408,7 +408,7 @@ cmd ::= CREATE TOPIC not_exists_opt(A) cmd ::= CREATE TOPIC not_exists_opt(A) topic_name(B) topic_options(D) AS db_name(C). { pCxt->pRootNode = createCreateTopicStmt(pCxt, A, &B, NULL, &C, D); } cmd ::= DROP TOPIC exists_opt(A) topic_name(B). { pCxt->pRootNode = createDropTopicStmt(pCxt, A, &B); } -cmd ::= DROP CGROUP exists_opt(A) cgroup_name(B) ON topic_name(C). { pCxt->pRootNode = createDropCGroupStmt(pCxt, A, &B, &C); } +cmd ::= DROP CONSUMER GROUP exists_opt(A) cgroup_name(B) ON topic_name(C). { pCxt->pRootNode = createDropCGroupStmt(pCxt, A, &B, &C); } topic_options(A) ::= . { A = createTopicOptions(pCxt); } topic_options(A) ::= topic_options(B) WITH TABLE. { ((STopicOptions*)B)->withTable = true; A = B; } diff --git a/source/libs/parser/src/parTokenizer.c b/source/libs/parser/src/parTokenizer.c index 540de2d639..47edd3e5a8 100644 --- a/source/libs/parser/src/parTokenizer.c +++ b/source/libs/parser/src/parTokenizer.c @@ -53,7 +53,6 @@ static SKeyword keywordTable[] = { {"CACHE", TK_CACHE}, {"CACHELAST", TK_CACHELAST}, {"CAST", TK_CAST}, - {"CGROUP", TK_CGROUP}, {"CLUSTER", TK_CLUSTER}, {"COLUMN", TK_COLUMN}, {"COMMENT", TK_COMMENT}, @@ -62,6 +61,7 @@ static SKeyword keywordTable[] = { {"CONNS", TK_CONNS}, {"CONNECTION", TK_CONNECTION}, {"CONNECTIONS", TK_CONNECTIONS}, + {"CONSUMER", TK_CONSUMER}, {"COUNT", TK_COUNT}, {"CREATE", TK_CREATE}, {"DATABASE", TK_DATABASE}, diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c index c6a7f95d5e..1fded1e4d5 100644 --- a/source/libs/parser/src/parTranslater.c +++ b/source/libs/parser/src/parTranslater.c @@ -465,20 +465,22 @@ static bool isPrimaryKey(STempTableNode* pTable, SNode* pExpr) { return isPrimaryKeyImpl(pTable, pExpr); } -static bool findAndSetColumn(SColumnNode** pColRef, const STableNode* pTable) { +static int32_t findAndSetColumn(STranslateContext* pCxt, SColumnNode** pColRef, const STableNode* pTable, + bool* pFound) { SColumnNode* pCol = *pColRef; - bool found = false; + *pFound = false; if (QUERY_NODE_REAL_TABLE == nodeType(pTable)) { const STableMeta* pMeta = ((SRealTableNode*)pTable)->pMeta; if (isInternalPrimaryKey(pCol)) { setColumnInfoBySchema((SRealTableNode*)pTable, pMeta->schema, false, pCol); - return true; + *pFound = true; + return TSDB_CODE_SUCCESS; } int32_t nums = pMeta->tableInfo.numOfTags + pMeta->tableInfo.numOfColumns; for (int32_t i = 0; i < nums; ++i) { if (0 == strcmp(pCol->colName, pMeta->schema[i].name)) { setColumnInfoBySchema((SRealTableNode*)pTable, pMeta->schema + i, (i >= pMeta->tableInfo.numOfColumns), pCol); - found = true; + *pFound = true; break; } } @@ -489,13 +491,15 @@ static bool findAndSetColumn(SColumnNode** pColRef, const STableNode* pTable) { SExprNode* pExpr = (SExprNode*)pNode; if (0 == strcmp(pCol->colName, pExpr->aliasName) || (isPrimaryKey((STempTableNode*)pTable, pNode) && isInternalPrimaryKey(pCol))) { + if (*pFound) { + return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_AMBIGUOUS_COLUMN, pCol->colName); + } setColumnInfoByExpr(pTable, pExpr, pColRef); - found = true; - break; + *pFound = true; } } } - return found; + return TSDB_CODE_SUCCESS; } static EDealRes translateColumnWithPrefix(STranslateContext* pCxt, SColumnNode** pCol) { @@ -506,7 +510,12 @@ static EDealRes translateColumnWithPrefix(STranslateContext* pCxt, SColumnNode** STableNode* pTable = taosArrayGetP(pTables, i); if (belongTable(pCxt->pParseCxt->db, (*pCol), pTable)) { foundTable = true; - if (findAndSetColumn(pCol, pTable)) { + bool foundCol = false; + pCxt->errCode = findAndSetColumn(pCxt, pCol, pTable, &foundCol); + if (TSDB_CODE_SUCCESS != pCxt->errCode) { + return DEAL_RES_ERROR; + } + if (foundCol) { break; } return generateDealNodeErrMsg(pCxt, TSDB_CODE_PAR_INVALID_COLUMN, (*pCol)->colName); @@ -525,14 +534,19 @@ static EDealRes translateColumnWithoutPrefix(STranslateContext* pCxt, SColumnNod bool isInternalPk = isInternalPrimaryKey(*pCol); for (size_t i = 0; i < nums; ++i) { STableNode* pTable = taosArrayGetP(pTables, i); - if (findAndSetColumn(pCol, pTable)) { + bool foundCol = false; + pCxt->errCode = findAndSetColumn(pCxt, pCol, pTable, &foundCol); + if (TSDB_CODE_SUCCESS != pCxt->errCode) { + return DEAL_RES_ERROR; + } + if (foundCol) { if (found) { return generateDealNodeErrMsg(pCxt, TSDB_CODE_PAR_AMBIGUOUS_COLUMN, (*pCol)->colName); } found = true; - if (isInternalPk) { - break; - } + } + if (isInternalPk) { + break; } } if (!found) { @@ -1939,7 +1953,9 @@ static int32_t createPrimaryKeyColByTable(STranslateContext* pCxt, STableNode* p } pCol->colId = PRIMARYKEY_TIMESTAMP_COL_ID; strcpy(pCol->colName, PK_TS_COL_INTERNAL_NAME); - if (!findAndSetColumn(&pCol, pTable)) { + bool found = false; + int32_t code = findAndSetColumn(pCxt, &pCol, pTable, &found); + if (TSDB_CODE_SUCCESS != code || !found) { return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_TIMELINE_FUNC); } *pPrimaryKey = (SNode*)pCol; diff --git a/source/libs/parser/src/sql.c b/source/libs/parser/src/sql.c index 262abac54b..6fb8faf391 100644 --- a/source/libs/parser/src/sql.c +++ b/source/libs/parser/src/sql.c @@ -134,17 +134,17 @@ typedef union { #define ParseCTX_FETCH #define ParseCTX_STORE #define YYFALLBACK 1 -#define YYNSTATE 611 +#define YYNSTATE 612 #define YYNRULE 455 #define YYNTOKEN 240 -#define YY_MAX_SHIFT 610 -#define YY_MIN_SHIFTREDUCE 901 -#define YY_MAX_SHIFTREDUCE 1355 -#define YY_ERROR_ACTION 1356 -#define YY_ACCEPT_ACTION 1357 -#define YY_NO_ACTION 1358 -#define YY_MIN_REDUCE 1359 -#define YY_MAX_REDUCE 1813 +#define YY_MAX_SHIFT 611 +#define YY_MIN_SHIFTREDUCE 902 +#define YY_MAX_SHIFTREDUCE 1356 +#define YY_ERROR_ACTION 1357 +#define YY_ACCEPT_ACTION 1358 +#define YY_NO_ACTION 1359 +#define YY_MIN_REDUCE 1360 +#define YY_MAX_REDUCE 1814 /************* End control #defines *******************************************/ #define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0]))) @@ -211,604 +211,606 @@ typedef union { ** yy_default[] Default action for each state. ** *********** Begin parsing tables **********************************************/ -#define YY_ACTTAB_COUNT (2153) +#define YY_ACTTAB_COUNT (2136) static const YYACTIONTYPE yy_action[] = { - /* 0 */ 386, 1647, 387, 1391, 295, 394, 524, 387, 1391, 28, - /* 10 */ 226, 931, 35, 33, 130, 1676, 1371, 1660, 104, 1791, - /* 20 */ 304, 1644, 1169, 477, 523, 424, 36, 34, 32, 31, - /* 30 */ 30, 385, 1790, 62, 389, 1490, 1788, 1640, 1646, 36, - /* 40 */ 34, 32, 31, 30, 1535, 1676, 108, 1167, 527, 935, - /* 50 */ 936, 294, 1000, 508, 524, 1485, 1533, 154, 14, 476, - /* 60 */ 35, 33, 1296, 507, 1175, 24, 350, 1630, 304, 1002, - /* 70 */ 1169, 1418, 277, 488, 523, 36, 34, 32, 31, 30, - /* 80 */ 56, 1, 60, 1490, 1689, 59, 524, 80, 1661, 510, - /* 90 */ 1663, 1664, 506, 1359, 527, 1167, 1207, 1729, 104, 603, - /* 100 */ 602, 276, 1725, 607, 1258, 429, 14, 36, 34, 32, - /* 110 */ 31, 30, 1175, 1791, 1168, 1490, 140, 103, 102, 101, - /* 120 */ 100, 99, 98, 97, 96, 95, 147, 376, 1529, 2, - /* 130 */ 1788, 583, 582, 581, 319, 39, 580, 579, 578, 114, - /* 140 */ 573, 572, 571, 570, 569, 568, 567, 566, 121, 562, - /* 150 */ 511, 607, 1568, 307, 1259, 55, 1580, 55, 1170, 156, - /* 160 */ 94, 1791, 1168, 93, 92, 91, 90, 89, 88, 87, - /* 170 */ 86, 85, 158, 157, 146, 352, 1264, 1352, 1788, 393, - /* 180 */ 1173, 1174, 389, 1220, 1221, 1223, 1224, 1225, 1226, 1227, - /* 190 */ 503, 525, 1235, 1236, 1237, 1238, 1239, 1240, 1468, 36, - /* 200 */ 34, 32, 31, 30, 64, 292, 1170, 131, 191, 274, - /* 210 */ 148, 1447, 27, 302, 1253, 1254, 1255, 1256, 1257, 1261, - /* 220 */ 1262, 1263, 1421, 36, 34, 32, 31, 30, 1173, 1174, - /* 230 */ 484, 1220, 1221, 1223, 1224, 1225, 1226, 1227, 503, 525, - /* 240 */ 1235, 1236, 1237, 1238, 1239, 1240, 35, 33, 1467, 948, - /* 250 */ 70, 947, 438, 437, 304, 403, 1169, 436, 1351, 112, - /* 260 */ 109, 433, 308, 1791, 432, 431, 430, 35, 33, 1310, - /* 270 */ 128, 1483, 1660, 403, 523, 304, 1789, 1169, 949, 1492, - /* 280 */ 1788, 1167, 438, 437, 148, 1193, 148, 436, 62, 972, - /* 290 */ 109, 433, 14, 1207, 432, 431, 430, 110, 1175, 1360, - /* 300 */ 1676, 1303, 1167, 1382, 1660, 524, 973, 1193, 508, 524, - /* 310 */ 1486, 486, 142, 1736, 1737, 2, 1741, 351, 507, 1175, - /* 320 */ 94, 361, 1630, 93, 92, 91, 90, 89, 88, 87, - /* 330 */ 86, 85, 1676, 1381, 1490, 38, 8, 607, 1490, 1689, - /* 340 */ 487, 559, 82, 1661, 510, 1663, 1664, 506, 1168, 527, - /* 350 */ 507, 1191, 1729, 1630, 1630, 1535, 1728, 1725, 607, 128, - /* 360 */ 558, 557, 309, 556, 555, 554, 1380, 1533, 1493, 1168, - /* 370 */ 565, 1689, 1462, 1535, 81, 1661, 510, 1663, 1664, 506, - /* 380 */ 315, 527, 524, 1630, 1729, 1533, 1743, 26, 297, 1725, - /* 390 */ 141, 478, 1170, 54, 362, 435, 434, 36, 34, 32, - /* 400 */ 31, 30, 218, 36, 34, 32, 31, 30, 466, 1756, - /* 410 */ 1740, 1490, 55, 1170, 1173, 1174, 1630, 1220, 1221, 1223, - /* 420 */ 1224, 1225, 1226, 1227, 503, 525, 1235, 1236, 1237, 1238, - /* 430 */ 1239, 1240, 460, 577, 575, 1173, 1174, 1379, 1220, 1221, - /* 440 */ 1223, 1224, 1225, 1226, 1227, 503, 525, 1235, 1236, 1237, - /* 450 */ 1238, 1239, 1240, 35, 33, 1241, 1378, 443, 1195, 610, - /* 460 */ 316, 304, 1377, 1169, 148, 148, 249, 1571, 1573, 1520, - /* 470 */ 1246, 1222, 451, 243, 35, 33, 1193, 1481, 1376, 1660, - /* 480 */ 1647, 461, 304, 312, 1169, 105, 190, 1630, 1167, 524, - /* 490 */ 473, 599, 595, 591, 587, 242, 391, 1644, 446, 1357, - /* 500 */ 1644, 402, 1191, 440, 561, 1175, 1630, 1676, 189, 1167, - /* 510 */ 337, 484, 1630, 1640, 1646, 508, 1640, 1646, 1490, 484, - /* 520 */ 78, 1791, 9, 237, 527, 507, 1175, 527, 1630, 1630, - /* 530 */ 339, 335, 564, 51, 145, 488, 50, 127, 1788, 511, - /* 540 */ 112, 148, 576, 9, 607, 1581, 1689, 1194, 112, 80, - /* 550 */ 1661, 510, 1663, 1664, 506, 1168, 527, 520, 320, 1729, - /* 560 */ 1375, 479, 474, 276, 1725, 607, 36, 34, 32, 31, - /* 570 */ 30, 1648, 1130, 314, 1479, 1791, 1168, 428, 110, 553, - /* 580 */ 1132, 128, 465, 340, 217, 198, 110, 1465, 145, 55, - /* 590 */ 1492, 1644, 1788, 143, 1736, 1737, 77, 1741, 1791, 1170, - /* 600 */ 427, 144, 1736, 1737, 1146, 1741, 193, 1640, 1646, 113, - /* 610 */ 1630, 145, 277, 1572, 1573, 1788, 490, 1482, 527, 1295, - /* 620 */ 1170, 1173, 1174, 1374, 1220, 1221, 1223, 1224, 1225, 1226, - /* 630 */ 1227, 503, 525, 1235, 1236, 1237, 1238, 1239, 1240, 286, - /* 640 */ 1222, 1131, 1173, 1174, 1258, 1220, 1221, 1223, 1224, 1225, - /* 650 */ 1226, 1227, 503, 525, 1235, 1236, 1237, 1238, 1239, 1240, - /* 660 */ 35, 33, 273, 559, 1191, 345, 1320, 344, 304, 524, - /* 670 */ 1169, 369, 524, 1630, 381, 32, 31, 30, 1748, 1291, - /* 680 */ 559, 1487, 558, 557, 1610, 556, 555, 554, 287, 7, - /* 690 */ 285, 284, 382, 426, 1259, 1167, 947, 428, 1490, 558, - /* 700 */ 557, 1490, 556, 555, 554, 470, 1318, 1319, 1321, 1322, - /* 710 */ 1535, 317, 1175, 11, 10, 1373, 1264, 1743, 148, 128, - /* 720 */ 427, 422, 1534, 935, 936, 1743, 1154, 1155, 1492, 2, - /* 730 */ 1038, 550, 549, 548, 1042, 547, 1044, 1045, 546, 1047, - /* 740 */ 543, 1739, 1053, 540, 1055, 1056, 537, 534, 346, 1738, - /* 750 */ 1370, 607, 27, 302, 1253, 1254, 1255, 1256, 1257, 1261, - /* 760 */ 1262, 1263, 1168, 380, 1466, 1630, 375, 374, 373, 372, - /* 770 */ 371, 368, 367, 366, 365, 364, 360, 359, 358, 357, - /* 780 */ 356, 355, 354, 353, 524, 524, 129, 524, 1791, 1196, - /* 790 */ 492, 255, 1192, 1193, 1272, 1260, 521, 522, 1475, 239, - /* 800 */ 1630, 145, 1369, 253, 53, 1788, 1170, 52, 1368, 1367, - /* 810 */ 1366, 452, 1365, 1490, 1490, 1364, 1490, 1265, 524, 1363, - /* 820 */ 1660, 561, 1362, 47, 159, 275, 1294, 1477, 1173, 1174, - /* 830 */ 318, 1220, 1221, 1223, 1224, 1225, 1226, 1227, 503, 525, - /* 840 */ 1235, 1236, 1237, 1238, 1239, 1240, 495, 1490, 1676, 55, - /* 850 */ 1473, 1791, 1630, 25, 1619, 194, 487, 1408, 1630, 1630, - /* 860 */ 1630, 1291, 1630, 1403, 145, 1630, 507, 1401, 1788, 1630, - /* 870 */ 1630, 182, 1630, 184, 180, 186, 183, 188, 185, 439, - /* 880 */ 187, 1660, 500, 450, 502, 441, 79, 1689, 76, 444, - /* 890 */ 81, 1661, 510, 1663, 1664, 506, 448, 527, 72, 327, - /* 900 */ 1729, 11, 10, 552, 297, 1725, 141, 1372, 459, 1676, - /* 910 */ 1354, 1355, 1650, 1448, 1660, 202, 1178, 508, 58, 57, - /* 920 */ 349, 118, 46, 153, 471, 1757, 1177, 507, 343, 205, - /* 930 */ 221, 1630, 37, 37, 37, 453, 212, 1677, 1392, 228, - /* 940 */ 272, 421, 1676, 333, 1530, 329, 325, 150, 1689, 1652, - /* 950 */ 508, 81, 1661, 510, 1663, 1664, 506, 1222, 527, 1759, - /* 960 */ 507, 1729, 462, 1317, 1630, 297, 1725, 1804, 1191, 116, - /* 970 */ 207, 117, 485, 1266, 1228, 1124, 1763, 493, 148, 1660, - /* 980 */ 230, 1689, 220, 1181, 81, 1661, 510, 1663, 1664, 506, - /* 990 */ 223, 527, 118, 1180, 1729, 1660, 46, 532, 297, 1725, - /* 1000 */ 1804, 322, 117, 225, 1250, 3, 118, 1676, 326, 1786, - /* 1010 */ 516, 282, 236, 1000, 283, 508, 119, 117, 244, 155, - /* 1020 */ 1138, 363, 370, 1676, 1570, 507, 378, 1660, 377, 1630, - /* 1030 */ 379, 508, 383, 1031, 1197, 496, 384, 248, 1059, 392, - /* 1040 */ 1200, 507, 395, 1063, 162, 1630, 1689, 1070, 396, 82, - /* 1050 */ 1661, 510, 1663, 1664, 506, 1676, 527, 1068, 120, 1729, - /* 1060 */ 1199, 164, 1689, 508, 1726, 81, 1661, 510, 1663, 1664, - /* 1070 */ 506, 1201, 527, 507, 397, 1729, 398, 1630, 1660, 297, - /* 1080 */ 1725, 1804, 167, 488, 399, 169, 1198, 400, 401, 172, - /* 1090 */ 1747, 61, 404, 1660, 1689, 175, 423, 262, 1661, 510, - /* 1100 */ 1663, 1664, 506, 425, 527, 84, 1676, 1175, 1480, 179, - /* 1110 */ 1476, 291, 181, 1614, 508, 122, 123, 1478, 1474, 124, - /* 1120 */ 125, 1676, 245, 1791, 507, 192, 455, 195, 1630, 508, - /* 1130 */ 246, 197, 454, 464, 488, 463, 147, 200, 1196, 507, - /* 1140 */ 1788, 458, 472, 1630, 1660, 1689, 1770, 203, 262, 1661, - /* 1150 */ 510, 1663, 1664, 506, 514, 527, 6, 1750, 469, 1769, - /* 1160 */ 1689, 211, 481, 82, 1661, 510, 1663, 1664, 506, 206, - /* 1170 */ 527, 1760, 1676, 1729, 1791, 296, 475, 499, 1725, 1195, - /* 1180 */ 505, 468, 5, 1291, 111, 40, 497, 145, 1744, 1807, - /* 1190 */ 507, 1788, 298, 18, 1630, 512, 1660, 513, 494, 306, - /* 1200 */ 311, 310, 1579, 135, 1578, 1660, 214, 517, 518, 519, - /* 1210 */ 1183, 1689, 213, 1787, 270, 1661, 510, 1663, 1664, 506, - /* 1220 */ 504, 527, 501, 1701, 1676, 219, 232, 71, 491, 1710, - /* 1230 */ 234, 247, 508, 1676, 69, 1176, 250, 1491, 241, 222, - /* 1240 */ 606, 508, 507, 1463, 498, 48, 1630, 530, 224, 256, - /* 1250 */ 134, 507, 1175, 1660, 263, 1630, 257, 293, 467, 252, - /* 1260 */ 254, 1624, 1623, 1689, 321, 1620, 132, 1661, 510, 1663, - /* 1270 */ 1664, 506, 1689, 527, 323, 271, 1661, 510, 1663, 1664, - /* 1280 */ 506, 1676, 527, 324, 1163, 1660, 1164, 151, 1618, 508, - /* 1290 */ 328, 528, 330, 331, 1617, 332, 334, 1616, 336, 507, - /* 1300 */ 1615, 338, 1179, 1630, 1600, 152, 341, 1141, 342, 1140, - /* 1310 */ 489, 1805, 1594, 1676, 1593, 347, 348, 1660, 1592, 1591, - /* 1320 */ 1689, 508, 1107, 266, 1661, 510, 1663, 1664, 506, 1563, - /* 1330 */ 527, 507, 1562, 1561, 1560, 1630, 1559, 1558, 1557, 1556, - /* 1340 */ 1555, 1554, 1553, 1552, 1551, 1676, 1184, 1550, 1549, 1548, - /* 1350 */ 1547, 1546, 1689, 508, 1545, 132, 1661, 510, 1663, 1664, - /* 1360 */ 506, 480, 527, 507, 115, 1660, 1544, 1630, 1187, 1543, - /* 1370 */ 301, 1542, 1541, 1540, 1109, 1539, 1538, 1537, 1660, 525, - /* 1380 */ 1235, 1236, 1536, 1420, 1689, 1388, 160, 271, 1661, 510, - /* 1390 */ 1663, 1664, 506, 1676, 527, 938, 106, 138, 937, 388, - /* 1400 */ 1806, 505, 1387, 161, 390, 107, 1676, 1608, 1602, 1586, - /* 1410 */ 1585, 507, 1576, 1469, 508, 1630, 166, 171, 1660, 1419, - /* 1420 */ 966, 1417, 1415, 407, 507, 405, 1413, 411, 1630, 415, - /* 1430 */ 1411, 303, 1689, 419, 406, 270, 1661, 510, 1663, 1664, - /* 1440 */ 506, 409, 527, 410, 1702, 1689, 1676, 413, 271, 1661, - /* 1450 */ 510, 1663, 1664, 506, 508, 527, 414, 1400, 177, 1399, - /* 1460 */ 418, 417, 1386, 1471, 507, 1074, 1660, 1470, 1630, 1073, - /* 1470 */ 139, 305, 574, 576, 999, 1169, 420, 416, 412, 408, - /* 1480 */ 176, 45, 998, 178, 997, 1689, 996, 993, 271, 1661, - /* 1490 */ 510, 1663, 1664, 506, 1676, 527, 992, 991, 1409, 288, - /* 1500 */ 1167, 1404, 508, 289, 442, 63, 1402, 290, 174, 1385, - /* 1510 */ 447, 445, 507, 1384, 449, 83, 1630, 1175, 1607, 1148, - /* 1520 */ 49, 1601, 456, 1660, 1584, 126, 1583, 1575, 199, 65, - /* 1530 */ 196, 4, 133, 1689, 201, 37, 258, 1661, 510, 1663, - /* 1540 */ 1664, 506, 204, 527, 15, 457, 43, 1316, 1309, 208, - /* 1550 */ 22, 1676, 209, 23, 210, 66, 607, 1288, 1650, 508, - /* 1560 */ 1287, 216, 1345, 42, 136, 41, 173, 1168, 165, 507, - /* 1570 */ 170, 1660, 168, 1630, 17, 1340, 1339, 16, 13, 1334, - /* 1580 */ 10, 299, 1344, 1343, 300, 1251, 19, 137, 149, 1230, - /* 1590 */ 1689, 163, 1215, 265, 1661, 510, 1663, 1664, 506, 1676, - /* 1600 */ 527, 1660, 509, 1574, 29, 515, 12, 508, 1649, 233, - /* 1610 */ 72, 1170, 1229, 20, 235, 1185, 531, 507, 238, 21, - /* 1620 */ 229, 1630, 227, 529, 1314, 964, 313, 231, 67, 1676, - /* 1630 */ 68, 1660, 1692, 1173, 1174, 1232, 526, 508, 1689, 44, - /* 1640 */ 533, 267, 1661, 510, 1663, 1664, 506, 507, 527, 1060, - /* 1650 */ 1057, 1630, 535, 538, 536, 541, 544, 1054, 539, 1676, - /* 1660 */ 1037, 1052, 1048, 542, 1069, 1046, 545, 508, 1689, 551, - /* 1670 */ 1051, 259, 1661, 510, 1663, 1664, 506, 507, 527, 1660, - /* 1680 */ 73, 1630, 74, 75, 1066, 1065, 1050, 560, 1660, 1049, - /* 1690 */ 988, 1006, 563, 240, 986, 985, 984, 983, 1689, 981, - /* 1700 */ 1067, 268, 1661, 510, 1663, 1664, 506, 1676, 527, 982, - /* 1710 */ 1003, 980, 979, 1001, 976, 508, 1676, 975, 974, 971, - /* 1720 */ 970, 969, 1416, 584, 508, 507, 585, 586, 1414, 1630, - /* 1730 */ 588, 589, 590, 1412, 507, 592, 1660, 593, 1630, 594, - /* 1740 */ 1410, 596, 597, 598, 1398, 600, 1689, 601, 1397, 260, - /* 1750 */ 1661, 510, 1663, 1664, 506, 1689, 527, 1383, 269, 1661, - /* 1760 */ 510, 1663, 1664, 506, 1676, 527, 609, 604, 605, 1358, - /* 1770 */ 1358, 1171, 508, 251, 608, 1358, 1358, 1358, 1358, 1358, - /* 1780 */ 1358, 1358, 507, 1358, 1660, 1358, 1630, 1358, 1358, 1358, - /* 1790 */ 1358, 1358, 1358, 1358, 1358, 1660, 1358, 1358, 1358, 1358, - /* 1800 */ 1358, 1358, 1358, 1689, 1358, 1358, 261, 1661, 510, 1663, - /* 1810 */ 1664, 506, 1676, 527, 1660, 1358, 1358, 1358, 1358, 1358, - /* 1820 */ 508, 1358, 1358, 1676, 1358, 1358, 1358, 1358, 1358, 1358, - /* 1830 */ 507, 508, 1358, 1358, 1630, 1358, 1358, 1358, 1358, 1358, - /* 1840 */ 1358, 507, 1676, 1358, 1358, 1630, 1358, 1358, 1358, 1358, - /* 1850 */ 508, 1689, 1358, 1358, 1672, 1661, 510, 1663, 1664, 506, - /* 1860 */ 507, 527, 1689, 1358, 1630, 1671, 1661, 510, 1663, 1664, - /* 1870 */ 506, 1358, 527, 1660, 1358, 1358, 1358, 1358, 1358, 1358, - /* 1880 */ 1358, 1689, 1660, 1358, 1670, 1661, 510, 1663, 1664, 506, - /* 1890 */ 1358, 527, 1358, 1358, 1358, 1358, 1358, 1358, 1358, 1358, - /* 1900 */ 1358, 1676, 1358, 1358, 1358, 1358, 1358, 1358, 1358, 508, - /* 1910 */ 1676, 1358, 1358, 1358, 1358, 1358, 1358, 1358, 508, 507, - /* 1920 */ 1358, 1358, 1358, 1630, 1358, 1358, 1358, 1358, 507, 1358, - /* 1930 */ 1358, 1358, 1630, 1358, 1358, 1358, 1358, 1358, 1358, 1358, - /* 1940 */ 1689, 1358, 1660, 280, 1661, 510, 1663, 1664, 506, 1689, - /* 1950 */ 527, 1660, 279, 1661, 510, 1663, 1664, 506, 1358, 527, - /* 1960 */ 1358, 1358, 1358, 1358, 1358, 1358, 1358, 1358, 1358, 1358, - /* 1970 */ 1676, 1358, 1358, 1358, 1358, 1358, 1358, 1358, 508, 1676, - /* 1980 */ 1358, 1358, 1358, 1358, 1358, 1358, 1358, 508, 507, 1358, - /* 1990 */ 1358, 1358, 1630, 1358, 1358, 1358, 1358, 507, 1358, 1660, - /* 2000 */ 1358, 1630, 1358, 1358, 1358, 1358, 1358, 1358, 1358, 1689, - /* 2010 */ 484, 1358, 281, 1661, 510, 1663, 1664, 506, 1689, 527, - /* 2020 */ 1358, 278, 1661, 510, 1663, 1664, 506, 1676, 527, 1358, - /* 2030 */ 1358, 1358, 1358, 1358, 1358, 508, 1358, 1358, 1358, 112, - /* 2040 */ 1358, 1358, 1358, 1358, 1358, 507, 484, 1358, 1358, 1630, - /* 2050 */ 1358, 1358, 1358, 1358, 1358, 1358, 1358, 1358, 1358, 488, - /* 2060 */ 1358, 1358, 1358, 1358, 1358, 1358, 1689, 1358, 1358, 264, - /* 2070 */ 1661, 510, 1663, 1664, 506, 112, 527, 110, 1358, 1358, - /* 2080 */ 1358, 1358, 1358, 1358, 1358, 1358, 1358, 1358, 1358, 1358, - /* 2090 */ 1358, 1358, 215, 1736, 483, 488, 482, 1358, 1358, 1791, - /* 2100 */ 1358, 1358, 1358, 1358, 1358, 1358, 1358, 1358, 1358, 1358, - /* 2110 */ 1358, 1358, 147, 110, 1358, 1358, 1788, 1358, 1358, 1358, - /* 2120 */ 1358, 1358, 1358, 1358, 1358, 1358, 1358, 1358, 215, 1736, - /* 2130 */ 483, 1358, 482, 1358, 1358, 1791, 1358, 1358, 1358, 1358, - /* 2140 */ 1358, 1358, 1358, 1358, 1358, 1358, 1358, 1358, 145, 1358, - /* 2150 */ 1358, 1358, 1788, + /* 0 */ 460, 1648, 1536, 1648, 295, 386, 312, 387, 1392, 294, + /* 10 */ 28, 226, 35, 33, 1534, 24, 1383, 1661, 932, 1480, + /* 20 */ 304, 1645, 1170, 1645, 140, 36, 34, 32, 31, 30, + /* 30 */ 36, 34, 32, 31, 30, 1482, 1530, 1641, 1647, 1641, + /* 40 */ 1647, 394, 1469, 387, 1392, 1677, 524, 1168, 528, 130, + /* 50 */ 528, 1372, 1792, 509, 485, 1645, 936, 937, 14, 524, + /* 60 */ 35, 33, 1297, 508, 1176, 1791, 1631, 1631, 304, 1789, + /* 70 */ 1170, 1641, 1647, 489, 36, 34, 32, 31, 30, 604, + /* 80 */ 603, 1, 528, 112, 1690, 1131, 525, 80, 1662, 511, + /* 90 */ 1664, 1665, 507, 1133, 528, 1168, 1661, 1730, 104, 404, + /* 100 */ 1311, 276, 1726, 608, 1744, 425, 14, 39, 35, 33, + /* 110 */ 1792, 1649, 1176, 1792, 1169, 1491, 304, 1744, 1170, 512, + /* 120 */ 277, 110, 307, 146, 1677, 1581, 147, 1789, 1741, 2, + /* 130 */ 1789, 1645, 506, 1304, 376, 487, 142, 1737, 1738, 1194, + /* 140 */ 1742, 1740, 508, 1168, 1208, 55, 1631, 1641, 1647, 525, + /* 150 */ 56, 608, 1259, 131, 14, 1132, 1677, 1448, 528, 1171, + /* 160 */ 1176, 350, 1169, 1690, 478, 404, 270, 1662, 511, 1664, + /* 170 */ 1665, 507, 505, 528, 502, 1702, 1382, 2, 1491, 158, + /* 180 */ 157, 1174, 1175, 1194, 1221, 1222, 1224, 1225, 1226, 1227, + /* 190 */ 1228, 504, 526, 1236, 1237, 1238, 1239, 1240, 1241, 608, + /* 200 */ 477, 62, 1260, 154, 64, 292, 1296, 1171, 191, 94, + /* 210 */ 1169, 148, 93, 92, 91, 90, 89, 88, 87, 86, + /* 220 */ 85, 1381, 345, 1487, 344, 1265, 1631, 55, 60, 1174, + /* 230 */ 1175, 59, 1221, 1222, 1224, 1225, 1226, 1227, 1228, 504, + /* 240 */ 526, 1236, 1237, 1238, 1239, 1240, 1241, 1419, 286, 479, + /* 250 */ 36, 34, 32, 31, 30, 1171, 36, 34, 32, 31, + /* 260 */ 30, 27, 302, 1254, 1255, 1256, 1257, 1258, 1262, 1263, + /* 270 */ 1264, 1631, 55, 1358, 1744, 148, 385, 1174, 1175, 389, + /* 280 */ 1221, 1222, 1224, 1225, 1226, 1227, 1228, 504, 526, 1236, + /* 290 */ 1237, 1238, 1239, 1240, 1241, 35, 33, 287, 1739, 285, + /* 300 */ 284, 524, 427, 304, 1223, 1170, 429, 584, 583, 582, + /* 310 */ 319, 1467, 581, 580, 579, 114, 574, 573, 572, 571, + /* 320 */ 570, 569, 568, 567, 121, 563, 439, 438, 62, 428, + /* 330 */ 1168, 437, 320, 1661, 109, 434, 560, 346, 433, 432, + /* 340 */ 431, 108, 525, 35, 33, 1242, 391, 1176, 1192, 948, + /* 350 */ 1486, 304, 1192, 1170, 351, 559, 558, 148, 557, 556, + /* 360 */ 555, 1677, 38, 1792, 8, 308, 1380, 474, 562, 488, + /* 370 */ 1261, 1491, 1792, 128, 423, 453, 1790, 1792, 1168, 508, + /* 380 */ 1789, 1321, 1493, 1631, 127, 145, 608, 436, 435, 1789, + /* 390 */ 145, 35, 33, 1266, 1789, 1176, 949, 1169, 948, 304, + /* 400 */ 1690, 1170, 148, 81, 1662, 511, 1664, 1665, 507, 55, + /* 410 */ 528, 1379, 9, 1730, 1295, 1792, 1631, 297, 1726, 141, + /* 420 */ 471, 1319, 1320, 1322, 1323, 950, 1168, 1361, 145, 25, + /* 430 */ 512, 218, 1789, 314, 608, 1422, 1582, 467, 1757, 480, + /* 440 */ 475, 128, 1171, 1176, 1409, 1169, 393, 1378, 94, 389, + /* 450 */ 1493, 93, 92, 91, 90, 89, 88, 87, 86, 85, + /* 460 */ 9, 1631, 578, 576, 1174, 1175, 440, 1221, 1222, 1224, + /* 470 */ 1225, 1226, 1227, 1228, 504, 526, 1236, 1237, 1238, 1239, + /* 480 */ 1240, 1241, 608, 36, 34, 32, 31, 30, 1468, 70, + /* 490 */ 1171, 1569, 148, 1169, 148, 439, 438, 1631, 156, 1536, + /* 500 */ 437, 7, 525, 109, 434, 1195, 309, 433, 432, 431, + /* 510 */ 1484, 1534, 1174, 1175, 361, 1221, 1222, 1224, 1225, 1226, + /* 520 */ 1227, 1228, 504, 526, 1236, 1237, 1238, 1239, 1240, 1241, + /* 530 */ 493, 1491, 36, 34, 32, 31, 30, 1196, 1171, 148, + /* 540 */ 1039, 551, 550, 549, 1043, 548, 1045, 1046, 547, 1048, + /* 550 */ 544, 316, 1054, 541, 1056, 1057, 538, 535, 1572, 1574, + /* 560 */ 1174, 1175, 1377, 1221, 1222, 1224, 1225, 1226, 1227, 1228, + /* 570 */ 504, 526, 1236, 1237, 1238, 1239, 1240, 1241, 35, 33, + /* 580 */ 273, 560, 1192, 26, 11, 10, 304, 1661, 1170, 369, + /* 590 */ 54, 1001, 381, 36, 34, 32, 31, 30, 1573, 1574, + /* 600 */ 559, 558, 1208, 557, 556, 555, 177, 525, 1003, 1536, + /* 610 */ 382, 1247, 1631, 1168, 1360, 1677, 315, 1194, 139, 362, + /* 620 */ 525, 1534, 1353, 509, 421, 417, 413, 409, 176, 1376, + /* 630 */ 1176, 337, 403, 508, 936, 937, 1491, 1631, 103, 102, + /* 640 */ 101, 100, 99, 98, 97, 96, 95, 2, 485, 1491, + /* 650 */ 1193, 339, 335, 63, 1690, 77, 174, 81, 1662, 511, + /* 660 */ 1664, 1665, 507, 217, 528, 1273, 128, 1730, 113, 608, + /* 670 */ 352, 297, 1726, 1805, 1292, 1494, 1483, 112, 461, 1631, + /* 680 */ 1169, 380, 1764, 1375, 375, 374, 373, 372, 371, 368, + /* 690 */ 367, 366, 365, 364, 360, 359, 358, 357, 356, 355, + /* 700 */ 354, 353, 1352, 249, 274, 129, 1521, 525, 554, 525, + /* 710 */ 255, 32, 31, 30, 173, 110, 165, 494, 170, 1488, + /* 720 */ 399, 104, 253, 53, 562, 1171, 52, 462, 430, 565, + /* 730 */ 143, 1737, 1738, 1631, 1742, 1197, 1491, 1661, 1491, 182, + /* 740 */ 163, 1466, 180, 159, 1374, 496, 1371, 1174, 1175, 1194, + /* 750 */ 1221, 1222, 1224, 1225, 1226, 1227, 1228, 504, 526, 1236, + /* 760 */ 1237, 1238, 1239, 1240, 1241, 1677, 1370, 1792, 55, 525, + /* 770 */ 566, 317, 1463, 509, 36, 34, 32, 31, 30, 128, + /* 780 */ 145, 1611, 1223, 508, 1789, 1749, 1292, 1631, 1493, 525, + /* 790 */ 525, 1369, 1620, 489, 1631, 485, 1631, 1368, 1491, 1476, + /* 800 */ 429, 522, 523, 525, 1690, 79, 485, 80, 1662, 511, + /* 810 */ 1664, 1665, 507, 491, 528, 239, 1631, 1730, 1491, 1491, + /* 820 */ 277, 276, 1726, 428, 112, 1367, 1155, 1156, 184, 1404, + /* 830 */ 525, 183, 1491, 1792, 560, 112, 1661, 327, 58, 57, + /* 840 */ 349, 1631, 318, 153, 489, 1170, 145, 1631, 343, 1366, + /* 850 */ 1789, 442, 1259, 559, 558, 1365, 557, 556, 555, 1491, + /* 860 */ 272, 202, 110, 333, 1677, 329, 325, 150, 1364, 1363, + /* 870 */ 1168, 501, 488, 110, 577, 1631, 1478, 215, 1737, 484, + /* 880 */ 186, 483, 508, 185, 1792, 76, 1631, 1176, 144, 1737, + /* 890 */ 1738, 47, 1742, 188, 275, 72, 187, 147, 148, 1631, + /* 900 */ 1536, 1789, 1260, 1690, 1661, 1631, 81, 1662, 511, 1664, + /* 910 */ 1665, 507, 1535, 528, 1223, 340, 1730, 1402, 1631, 1631, + /* 920 */ 297, 1726, 141, 451, 485, 1265, 608, 11, 10, 1355, + /* 930 */ 1356, 118, 1677, 1373, 497, 1179, 449, 1169, 1474, 445, + /* 940 */ 509, 1758, 46, 1651, 205, 1178, 1449, 194, 503, 553, + /* 950 */ 508, 37, 37, 112, 1631, 37, 228, 116, 221, 117, + /* 960 */ 118, 27, 302, 1254, 1255, 1256, 1257, 1258, 1262, 1263, + /* 970 */ 1264, 1690, 463, 489, 81, 1662, 511, 1664, 1665, 507, + /* 980 */ 1653, 528, 1171, 1318, 1730, 207, 46, 1661, 297, 1726, + /* 990 */ 1805, 110, 1267, 1229, 1251, 533, 1125, 230, 517, 1787, + /* 1000 */ 236, 1032, 1182, 117, 1174, 1175, 215, 1737, 484, 118, + /* 1010 */ 483, 119, 1181, 1792, 973, 1677, 454, 212, 472, 1661, + /* 1020 */ 1678, 1393, 117, 509, 422, 1760, 145, 248, 1531, 486, + /* 1030 */ 1789, 974, 220, 508, 223, 225, 1060, 1631, 3, 1192, + /* 1040 */ 322, 326, 282, 283, 1064, 1001, 1139, 1677, 244, 1661, + /* 1050 */ 1071, 363, 1069, 1571, 1690, 509, 155, 81, 1662, 511, + /* 1060 */ 1664, 1665, 507, 120, 528, 508, 370, 1730, 378, 1631, + /* 1070 */ 377, 297, 1726, 1805, 379, 489, 383, 1677, 1198, 384, + /* 1080 */ 392, 1201, 1748, 395, 1200, 509, 1690, 162, 396, 262, + /* 1090 */ 1662, 511, 1664, 1665, 507, 508, 528, 164, 1202, 1631, + /* 1100 */ 398, 167, 397, 169, 400, 489, 401, 1661, 1199, 402, + /* 1110 */ 444, 172, 61, 405, 175, 1792, 1690, 424, 426, 262, + /* 1120 */ 1662, 511, 1664, 1665, 507, 452, 528, 84, 147, 1481, + /* 1130 */ 291, 179, 1789, 1477, 1176, 1677, 181, 122, 123, 190, + /* 1140 */ 1479, 1475, 124, 509, 125, 1792, 1615, 1661, 245, 192, + /* 1150 */ 455, 447, 246, 508, 456, 464, 441, 1631, 145, 195, + /* 1160 */ 197, 189, 1789, 459, 1197, 465, 1661, 473, 515, 1771, + /* 1170 */ 1770, 6, 470, 200, 1690, 1677, 203, 82, 1662, 511, + /* 1180 */ 1664, 1665, 507, 509, 528, 206, 51, 1730, 296, 50, + /* 1190 */ 1761, 1729, 1726, 508, 1677, 1751, 482, 1631, 1661, 211, + /* 1200 */ 469, 476, 509, 5, 135, 1292, 111, 1196, 1745, 40, + /* 1210 */ 213, 214, 508, 18, 1690, 495, 1631, 82, 1662, 511, + /* 1220 */ 1664, 1665, 507, 498, 528, 298, 1677, 1730, 1580, 513, + /* 1230 */ 514, 500, 1726, 1690, 509, 1788, 132, 1662, 511, 1664, + /* 1240 */ 1665, 507, 306, 528, 508, 1579, 219, 1808, 1631, 492, + /* 1250 */ 1711, 518, 519, 611, 222, 232, 520, 234, 247, 69, + /* 1260 */ 499, 1492, 71, 1661, 531, 1690, 224, 243, 82, 1662, + /* 1270 */ 511, 1664, 1665, 507, 1464, 528, 250, 241, 1730, 105, + /* 1280 */ 490, 1806, 607, 1727, 134, 600, 596, 592, 588, 242, + /* 1290 */ 256, 1677, 263, 257, 48, 293, 252, 254, 1625, 509, + /* 1300 */ 1624, 321, 1621, 323, 324, 1164, 1165, 151, 328, 508, + /* 1310 */ 1619, 1661, 330, 1631, 78, 331, 468, 237, 332, 1618, + /* 1320 */ 334, 1617, 336, 1616, 338, 1601, 152, 341, 342, 1142, + /* 1330 */ 1690, 1141, 1595, 271, 1662, 511, 1664, 1665, 507, 1677, + /* 1340 */ 528, 1594, 1593, 347, 348, 1592, 1564, 509, 1108, 1563, + /* 1350 */ 1562, 521, 1561, 1560, 1559, 1558, 1557, 508, 1556, 1661, + /* 1360 */ 1555, 1631, 1554, 1553, 1552, 1551, 1550, 1549, 1661, 1548, + /* 1370 */ 1547, 115, 1546, 1545, 1544, 1543, 466, 1542, 1690, 198, + /* 1380 */ 1541, 266, 1662, 511, 1664, 1665, 507, 1677, 528, 1540, + /* 1390 */ 1110, 1539, 1538, 1537, 1421, 509, 1677, 160, 106, 1147, + /* 1400 */ 1389, 193, 939, 388, 509, 508, 1388, 1609, 1603, 1631, + /* 1410 */ 938, 1587, 138, 1586, 508, 168, 161, 1577, 1631, 481, + /* 1420 */ 390, 301, 1661, 107, 166, 1470, 1690, 171, 1420, 132, + /* 1430 */ 1662, 511, 1664, 1665, 507, 1690, 528, 1661, 271, 1662, + /* 1440 */ 511, 1664, 1665, 507, 967, 528, 1418, 407, 406, 408, + /* 1450 */ 1677, 1416, 410, 412, 411, 1414, 416, 414, 506, 415, + /* 1460 */ 1412, 420, 418, 419, 1401, 1677, 1400, 1387, 508, 1472, + /* 1470 */ 1661, 45, 1631, 509, 1807, 1074, 1075, 1471, 1000, 999, + /* 1480 */ 998, 997, 575, 508, 577, 1661, 178, 1631, 1410, 1690, + /* 1490 */ 303, 994, 270, 1662, 511, 1664, 1665, 507, 1677, 528, + /* 1500 */ 288, 1703, 1405, 993, 1690, 992, 509, 271, 1662, 511, + /* 1510 */ 1664, 1665, 507, 1677, 528, 1403, 508, 289, 443, 290, + /* 1520 */ 1631, 509, 446, 305, 1386, 1661, 448, 1385, 450, 83, + /* 1530 */ 1608, 508, 1149, 1602, 457, 1631, 1585, 1690, 196, 1584, + /* 1540 */ 271, 1662, 511, 1664, 1665, 507, 1576, 528, 126, 49, + /* 1550 */ 458, 199, 1690, 1677, 65, 258, 1662, 511, 1664, 1665, + /* 1560 */ 507, 509, 528, 201, 4, 204, 37, 43, 1317, 1310, + /* 1570 */ 133, 508, 208, 22, 10, 1631, 209, 1661, 210, 66, + /* 1580 */ 29, 1651, 1289, 23, 216, 1288, 42, 136, 17, 1346, + /* 1590 */ 1335, 1341, 1690, 19, 15, 265, 1662, 511, 1664, 1665, + /* 1600 */ 507, 1340, 528, 299, 1345, 1677, 1344, 300, 1252, 137, + /* 1610 */ 1231, 1230, 12, 509, 16, 149, 1216, 1575, 510, 20, + /* 1620 */ 516, 233, 235, 508, 1650, 1661, 238, 1631, 965, 41, + /* 1630 */ 21, 1186, 227, 1315, 532, 313, 13, 536, 539, 229, + /* 1640 */ 1661, 1038, 231, 67, 1690, 68, 72, 267, 1662, 511, + /* 1650 */ 1664, 1665, 507, 1677, 528, 1693, 552, 1233, 527, 44, + /* 1660 */ 530, 509, 542, 1061, 534, 545, 1066, 1058, 1677, 1070, + /* 1670 */ 537, 508, 1053, 1661, 1055, 1631, 509, 540, 1052, 1049, + /* 1680 */ 543, 1051, 1047, 546, 1050, 73, 508, 1067, 74, 75, + /* 1690 */ 1631, 561, 1690, 989, 1007, 259, 1662, 511, 1664, 1665, + /* 1700 */ 507, 1677, 528, 564, 240, 987, 986, 1690, 985, 509, + /* 1710 */ 268, 1662, 511, 1664, 1665, 507, 982, 528, 984, 508, + /* 1720 */ 983, 981, 980, 1631, 1068, 1002, 1004, 1661, 977, 976, + /* 1730 */ 975, 972, 971, 970, 1417, 585, 1661, 586, 587, 1415, + /* 1740 */ 1690, 590, 589, 260, 1662, 511, 1664, 1665, 507, 591, + /* 1750 */ 528, 1413, 593, 594, 595, 1677, 597, 599, 598, 1399, + /* 1760 */ 1398, 601, 602, 509, 1677, 1411, 1384, 605, 606, 1359, + /* 1770 */ 1172, 251, 509, 508, 609, 610, 1359, 1631, 1359, 1359, + /* 1780 */ 1359, 1359, 508, 1359, 1661, 1359, 1631, 1359, 1359, 1359, + /* 1790 */ 1359, 1359, 1359, 1359, 1690, 1359, 1661, 269, 1662, 511, + /* 1800 */ 1664, 1665, 507, 1690, 528, 1359, 261, 1662, 511, 1664, + /* 1810 */ 1665, 507, 1677, 528, 1359, 1359, 1359, 1359, 1359, 1359, + /* 1820 */ 509, 1359, 1359, 1359, 1677, 1359, 1359, 1359, 1359, 1359, + /* 1830 */ 508, 1359, 509, 1359, 1631, 1359, 1661, 1359, 1359, 1359, + /* 1840 */ 1359, 1359, 508, 1359, 1359, 1359, 1631, 1359, 1359, 1661, + /* 1850 */ 1359, 1690, 1359, 1359, 1673, 1662, 511, 1664, 1665, 507, + /* 1860 */ 1359, 528, 1359, 1690, 1677, 1359, 1672, 1662, 511, 1664, + /* 1870 */ 1665, 507, 509, 528, 1359, 1359, 1359, 1677, 1359, 1359, + /* 1880 */ 1359, 1359, 508, 1359, 1359, 509, 1631, 1359, 1359, 1359, + /* 1890 */ 1359, 1359, 1359, 1359, 1359, 508, 1359, 1661, 1359, 1631, + /* 1900 */ 1359, 1359, 1359, 1690, 1359, 1359, 1671, 1662, 511, 1664, + /* 1910 */ 1665, 507, 1661, 528, 1359, 1359, 1690, 1359, 1359, 280, + /* 1920 */ 1662, 511, 1664, 1665, 507, 1677, 528, 1359, 1359, 1359, + /* 1930 */ 1359, 1359, 1359, 509, 1359, 1359, 1359, 1359, 1359, 1359, + /* 1940 */ 1677, 1359, 1359, 508, 1359, 1661, 1359, 1631, 509, 1359, + /* 1950 */ 1359, 1359, 1359, 311, 310, 1359, 1359, 1359, 508, 1359, + /* 1960 */ 1359, 1359, 1631, 1184, 1690, 1359, 1359, 279, 1662, 511, + /* 1970 */ 1664, 1665, 507, 1677, 528, 1359, 1359, 1359, 1359, 1690, + /* 1980 */ 1359, 509, 281, 1662, 511, 1664, 1665, 507, 1177, 528, + /* 1990 */ 1359, 508, 1359, 1359, 1359, 1631, 1359, 1359, 1359, 1661, + /* 2000 */ 1359, 1359, 1359, 1359, 1359, 1176, 1359, 1359, 1359, 1359, + /* 2010 */ 1359, 1359, 1690, 1359, 1359, 278, 1662, 511, 1664, 1665, + /* 2020 */ 507, 1359, 528, 1359, 1359, 1359, 1359, 1677, 1359, 1359, + /* 2030 */ 1359, 1359, 1359, 1359, 1359, 509, 1359, 1359, 1359, 1359, + /* 2040 */ 1359, 1359, 1359, 1359, 529, 508, 1359, 1359, 1359, 1631, + /* 2050 */ 1359, 1359, 1359, 1359, 1359, 1180, 1359, 1359, 1359, 1359, + /* 2060 */ 1359, 1359, 1359, 1359, 1359, 1359, 1690, 1359, 1359, 264, + /* 2070 */ 1662, 511, 1664, 1665, 507, 1359, 528, 1359, 1359, 1359, + /* 2080 */ 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359, + /* 2090 */ 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359, + /* 2100 */ 1185, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359, + /* 2110 */ 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359, + /* 2120 */ 1359, 1359, 1188, 1359, 1359, 1359, 1359, 1359, 1359, 1359, + /* 2130 */ 1359, 1359, 1359, 526, 1236, 1237, }; static const YYCODETYPE yy_lookahead[] = { - /* 0 */ 246, 273, 248, 249, 276, 246, 250, 248, 249, 324, - /* 10 */ 325, 4, 12, 13, 242, 271, 244, 243, 262, 339, - /* 20 */ 20, 293, 22, 279, 20, 269, 12, 13, 14, 15, - /* 30 */ 16, 247, 352, 255, 250, 279, 356, 309, 310, 12, - /* 40 */ 13, 14, 15, 16, 271, 271, 268, 47, 320, 42, - /* 50 */ 43, 278, 47, 279, 250, 277, 283, 55, 58, 315, - /* 60 */ 12, 13, 14, 289, 64, 2, 262, 293, 20, 64, - /* 70 */ 22, 0, 58, 299, 20, 12, 13, 14, 15, 16, - /* 80 */ 4, 81, 80, 279, 310, 83, 250, 313, 314, 315, - /* 90 */ 316, 317, 318, 0, 320, 47, 82, 323, 262, 251, - /* 100 */ 252, 327, 328, 103, 90, 269, 58, 12, 13, 14, - /* 110 */ 15, 16, 64, 339, 114, 279, 270, 24, 25, 26, - /* 120 */ 27, 28, 29, 30, 31, 32, 352, 75, 282, 81, - /* 130 */ 356, 60, 61, 62, 63, 81, 65, 66, 67, 68, - /* 140 */ 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, - /* 150 */ 289, 103, 279, 292, 140, 81, 295, 81, 158, 286, - /* 160 */ 21, 339, 114, 24, 25, 26, 27, 28, 29, 30, - /* 170 */ 31, 32, 120, 121, 352, 250, 162, 150, 356, 247, - /* 180 */ 180, 181, 250, 183, 184, 185, 186, 187, 188, 189, - /* 190 */ 190, 191, 192, 193, 194, 195, 196, 197, 0, 12, - /* 200 */ 13, 14, 15, 16, 167, 168, 158, 256, 171, 284, - /* 210 */ 210, 260, 198, 199, 200, 201, 202, 203, 204, 205, - /* 220 */ 206, 207, 0, 12, 13, 14, 15, 16, 180, 181, - /* 230 */ 250, 183, 184, 185, 186, 187, 188, 189, 190, 191, - /* 240 */ 192, 193, 194, 195, 196, 197, 12, 13, 0, 20, - /* 250 */ 253, 22, 60, 61, 20, 57, 22, 65, 231, 279, - /* 260 */ 68, 69, 263, 339, 72, 73, 74, 12, 13, 82, - /* 270 */ 271, 274, 243, 57, 20, 20, 352, 22, 49, 280, - /* 280 */ 356, 47, 60, 61, 210, 20, 210, 65, 255, 47, - /* 290 */ 68, 69, 58, 82, 72, 73, 74, 317, 64, 0, - /* 300 */ 271, 14, 47, 243, 243, 250, 64, 20, 279, 250, - /* 310 */ 277, 331, 332, 333, 334, 81, 336, 262, 289, 64, - /* 320 */ 21, 262, 293, 24, 25, 26, 27, 28, 29, 30, - /* 330 */ 31, 32, 271, 243, 279, 81, 81, 103, 279, 310, - /* 340 */ 279, 93, 313, 314, 315, 316, 317, 318, 114, 320, - /* 350 */ 289, 20, 323, 293, 293, 271, 327, 328, 103, 271, - /* 360 */ 112, 113, 278, 115, 116, 117, 243, 283, 280, 114, - /* 370 */ 259, 310, 261, 271, 313, 314, 315, 316, 317, 318, - /* 380 */ 278, 320, 250, 293, 323, 283, 311, 2, 327, 328, - /* 390 */ 329, 20, 158, 3, 262, 257, 258, 12, 13, 14, - /* 400 */ 15, 16, 341, 12, 13, 14, 15, 16, 347, 348, - /* 410 */ 335, 279, 81, 158, 180, 181, 293, 183, 184, 185, - /* 420 */ 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, - /* 430 */ 196, 197, 250, 257, 258, 180, 181, 243, 183, 184, - /* 440 */ 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, - /* 450 */ 195, 196, 197, 12, 13, 14, 243, 4, 20, 19, - /* 460 */ 281, 20, 243, 22, 210, 210, 264, 288, 289, 267, - /* 470 */ 14, 184, 19, 33, 12, 13, 20, 273, 243, 243, - /* 480 */ 273, 299, 20, 276, 22, 45, 33, 293, 47, 250, - /* 490 */ 144, 51, 52, 53, 54, 55, 14, 293, 45, 240, - /* 500 */ 293, 262, 20, 50, 57, 64, 293, 271, 55, 47, - /* 510 */ 153, 250, 293, 309, 310, 279, 309, 310, 279, 250, - /* 520 */ 80, 339, 81, 83, 320, 289, 64, 320, 293, 293, - /* 530 */ 173, 174, 64, 80, 352, 299, 83, 146, 356, 289, - /* 540 */ 279, 210, 41, 81, 103, 295, 310, 20, 279, 313, - /* 550 */ 314, 315, 316, 317, 318, 114, 320, 117, 299, 323, - /* 560 */ 243, 215, 216, 327, 328, 103, 12, 13, 14, 15, - /* 570 */ 16, 273, 80, 263, 272, 339, 114, 93, 317, 92, - /* 580 */ 88, 271, 142, 82, 146, 145, 317, 0, 352, 81, - /* 590 */ 280, 293, 356, 332, 333, 334, 253, 336, 339, 158, - /* 600 */ 116, 332, 333, 334, 164, 336, 166, 309, 310, 266, - /* 610 */ 293, 352, 58, 288, 289, 356, 226, 274, 320, 4, - /* 620 */ 158, 180, 181, 243, 183, 184, 185, 186, 187, 188, - /* 630 */ 189, 190, 191, 192, 193, 194, 195, 196, 197, 35, - /* 640 */ 184, 149, 180, 181, 90, 183, 184, 185, 186, 187, - /* 650 */ 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, - /* 660 */ 12, 13, 18, 93, 20, 157, 180, 159, 20, 250, - /* 670 */ 22, 27, 250, 293, 30, 14, 15, 16, 208, 209, - /* 680 */ 93, 262, 112, 113, 262, 115, 116, 117, 84, 37, - /* 690 */ 86, 87, 48, 89, 140, 47, 22, 93, 279, 112, - /* 700 */ 113, 279, 115, 116, 117, 219, 220, 221, 222, 223, - /* 710 */ 271, 263, 64, 1, 2, 243, 162, 311, 210, 271, - /* 720 */ 116, 47, 283, 42, 43, 311, 169, 170, 280, 81, - /* 730 */ 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, - /* 740 */ 104, 335, 106, 107, 108, 109, 110, 111, 299, 335, - /* 750 */ 243, 103, 198, 199, 200, 201, 202, 203, 204, 205, - /* 760 */ 206, 207, 114, 119, 0, 293, 122, 123, 124, 125, - /* 770 */ 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, - /* 780 */ 136, 137, 138, 139, 250, 250, 18, 250, 339, 20, - /* 790 */ 41, 23, 20, 20, 82, 140, 262, 262, 272, 262, - /* 800 */ 293, 352, 243, 35, 36, 356, 158, 39, 243, 243, - /* 810 */ 243, 299, 243, 279, 279, 243, 279, 162, 250, 243, - /* 820 */ 243, 57, 243, 146, 56, 148, 211, 272, 180, 181, - /* 830 */ 262, 183, 184, 185, 186, 187, 188, 189, 190, 191, - /* 840 */ 192, 193, 194, 195, 196, 197, 41, 279, 271, 81, - /* 850 */ 272, 339, 293, 198, 0, 272, 279, 0, 293, 293, - /* 860 */ 293, 209, 293, 0, 352, 293, 289, 0, 356, 293, - /* 870 */ 293, 85, 293, 85, 88, 85, 88, 85, 88, 22, - /* 880 */ 88, 243, 58, 21, 272, 22, 118, 310, 81, 22, - /* 890 */ 313, 314, 315, 316, 317, 318, 34, 320, 91, 45, - /* 900 */ 323, 1, 2, 272, 327, 328, 329, 244, 303, 271, - /* 910 */ 195, 196, 44, 260, 243, 146, 47, 279, 150, 151, - /* 920 */ 152, 41, 41, 155, 350, 348, 47, 289, 160, 41, - /* 930 */ 359, 293, 41, 41, 41, 307, 344, 271, 249, 41, - /* 940 */ 172, 251, 271, 175, 282, 177, 178, 179, 310, 81, - /* 950 */ 279, 313, 314, 315, 316, 317, 318, 184, 320, 312, - /* 960 */ 289, 323, 82, 82, 293, 327, 328, 329, 20, 41, - /* 970 */ 82, 41, 337, 82, 82, 82, 338, 228, 210, 243, - /* 980 */ 82, 310, 353, 114, 313, 314, 315, 316, 317, 318, - /* 990 */ 353, 320, 41, 114, 323, 243, 41, 41, 327, 328, - /* 1000 */ 329, 250, 41, 353, 180, 340, 41, 271, 45, 338, - /* 1010 */ 82, 308, 82, 47, 257, 279, 41, 41, 301, 40, - /* 1020 */ 156, 250, 287, 271, 250, 289, 140, 243, 285, 293, - /* 1030 */ 285, 279, 250, 82, 20, 230, 245, 82, 82, 245, - /* 1040 */ 20, 289, 305, 82, 255, 293, 310, 82, 289, 313, - /* 1050 */ 314, 315, 316, 317, 318, 271, 320, 82, 82, 323, - /* 1060 */ 20, 255, 310, 279, 328, 313, 314, 315, 316, 317, - /* 1070 */ 318, 20, 320, 289, 297, 323, 300, 293, 243, 327, - /* 1080 */ 328, 329, 255, 299, 297, 255, 20, 279, 290, 255, - /* 1090 */ 338, 255, 250, 243, 310, 255, 245, 313, 314, 315, - /* 1100 */ 316, 317, 318, 271, 320, 250, 271, 64, 271, 271, - /* 1110 */ 271, 245, 271, 293, 279, 271, 271, 271, 271, 271, - /* 1120 */ 271, 271, 305, 339, 289, 253, 304, 253, 293, 279, - /* 1130 */ 297, 253, 165, 290, 299, 279, 352, 253, 20, 289, - /* 1140 */ 356, 289, 218, 293, 243, 310, 349, 294, 313, 314, - /* 1150 */ 315, 316, 317, 318, 217, 320, 225, 346, 293, 349, - /* 1160 */ 310, 345, 224, 313, 314, 315, 316, 317, 318, 294, - /* 1170 */ 320, 312, 271, 323, 339, 293, 293, 327, 328, 20, - /* 1180 */ 279, 213, 212, 209, 279, 40, 229, 352, 311, 360, - /* 1190 */ 289, 356, 232, 81, 293, 293, 243, 293, 227, 293, - /* 1200 */ 12, 13, 294, 343, 294, 243, 330, 143, 291, 290, - /* 1210 */ 22, 310, 342, 355, 313, 314, 315, 316, 317, 318, - /* 1220 */ 319, 320, 321, 322, 271, 354, 279, 81, 355, 326, - /* 1230 */ 253, 267, 279, 271, 253, 47, 250, 279, 253, 354, - /* 1240 */ 245, 279, 289, 261, 355, 302, 293, 275, 354, 265, - /* 1250 */ 306, 289, 64, 243, 265, 293, 265, 298, 296, 254, - /* 1260 */ 241, 0, 0, 310, 72, 0, 313, 314, 315, 316, - /* 1270 */ 317, 318, 310, 320, 47, 313, 314, 315, 316, 317, - /* 1280 */ 318, 271, 320, 176, 47, 243, 47, 47, 0, 279, - /* 1290 */ 176, 103, 47, 47, 0, 176, 47, 0, 47, 289, - /* 1300 */ 0, 47, 114, 293, 0, 81, 162, 114, 161, 158, - /* 1310 */ 357, 358, 0, 271, 0, 154, 153, 243, 0, 0, - /* 1320 */ 310, 279, 44, 313, 314, 315, 316, 317, 318, 0, - /* 1330 */ 320, 289, 0, 0, 0, 293, 0, 0, 0, 0, - /* 1340 */ 0, 0, 0, 0, 0, 271, 158, 0, 0, 0, - /* 1350 */ 0, 0, 310, 279, 0, 313, 314, 315, 316, 317, - /* 1360 */ 318, 351, 320, 289, 40, 243, 0, 293, 180, 0, - /* 1370 */ 296, 0, 0, 0, 22, 0, 0, 0, 243, 191, - /* 1380 */ 192, 193, 0, 0, 310, 0, 40, 313, 314, 315, - /* 1390 */ 316, 317, 318, 271, 320, 14, 37, 41, 14, 44, - /* 1400 */ 358, 279, 0, 38, 44, 37, 271, 0, 0, 0, - /* 1410 */ 0, 289, 0, 0, 279, 293, 37, 37, 243, 0, - /* 1420 */ 59, 0, 0, 37, 289, 47, 0, 37, 293, 37, - /* 1430 */ 0, 296, 310, 37, 45, 313, 314, 315, 316, 317, - /* 1440 */ 318, 47, 320, 45, 322, 310, 271, 47, 313, 314, - /* 1450 */ 315, 316, 317, 318, 279, 320, 45, 0, 33, 0, - /* 1460 */ 45, 47, 0, 0, 289, 47, 243, 0, 293, 22, - /* 1470 */ 45, 296, 41, 41, 47, 22, 51, 52, 53, 54, - /* 1480 */ 55, 90, 47, 88, 47, 310, 47, 47, 313, 314, - /* 1490 */ 315, 316, 317, 318, 271, 320, 47, 47, 0, 22, - /* 1500 */ 47, 0, 279, 22, 48, 80, 0, 22, 83, 0, - /* 1510 */ 22, 47, 289, 0, 22, 20, 293, 64, 0, 47, - /* 1520 */ 146, 0, 22, 243, 0, 163, 0, 0, 37, 81, - /* 1530 */ 143, 41, 81, 310, 141, 41, 313, 314, 315, 316, - /* 1540 */ 317, 318, 82, 320, 214, 146, 41, 82, 82, 81, - /* 1550 */ 81, 271, 41, 41, 44, 81, 103, 82, 44, 279, - /* 1560 */ 82, 44, 82, 41, 44, 208, 141, 114, 143, 289, - /* 1570 */ 145, 243, 147, 293, 41, 47, 47, 214, 214, 82, - /* 1580 */ 2, 47, 47, 47, 47, 180, 41, 44, 44, 82, - /* 1590 */ 310, 166, 22, 313, 314, 315, 316, 317, 318, 271, - /* 1600 */ 320, 243, 182, 0, 81, 144, 81, 279, 44, 37, - /* 1610 */ 91, 158, 82, 81, 141, 22, 47, 289, 44, 81, - /* 1620 */ 81, 293, 82, 92, 82, 59, 47, 81, 81, 271, - /* 1630 */ 81, 243, 81, 180, 181, 82, 81, 279, 310, 81, - /* 1640 */ 81, 313, 314, 315, 316, 317, 318, 289, 320, 82, - /* 1650 */ 82, 293, 47, 47, 81, 47, 47, 82, 81, 271, - /* 1660 */ 22, 105, 82, 81, 47, 82, 81, 279, 310, 93, - /* 1670 */ 105, 313, 314, 315, 316, 317, 318, 289, 320, 243, - /* 1680 */ 81, 293, 81, 81, 47, 22, 105, 58, 243, 105, - /* 1690 */ 47, 64, 79, 41, 47, 47, 47, 47, 310, 22, - /* 1700 */ 114, 313, 314, 315, 316, 317, 318, 271, 320, 47, - /* 1710 */ 64, 47, 47, 47, 47, 279, 271, 47, 47, 47, - /* 1720 */ 47, 47, 0, 47, 279, 289, 45, 37, 0, 293, - /* 1730 */ 47, 45, 37, 0, 289, 47, 243, 45, 293, 37, - /* 1740 */ 0, 47, 45, 37, 0, 47, 310, 46, 0, 313, - /* 1750 */ 314, 315, 316, 317, 318, 310, 320, 0, 313, 314, - /* 1760 */ 315, 316, 317, 318, 271, 320, 20, 22, 21, 361, - /* 1770 */ 361, 22, 279, 22, 21, 361, 361, 361, 361, 361, + /* 0 */ 303, 273, 271, 273, 276, 246, 276, 248, 249, 278, + /* 10 */ 324, 325, 12, 13, 283, 2, 243, 243, 4, 272, + /* 20 */ 20, 293, 22, 293, 270, 12, 13, 14, 15, 16, + /* 30 */ 12, 13, 14, 15, 16, 273, 282, 309, 310, 309, + /* 40 */ 310, 246, 0, 248, 249, 271, 20, 47, 320, 242, + /* 50 */ 320, 244, 339, 279, 250, 293, 42, 43, 58, 20, + /* 60 */ 12, 13, 14, 289, 64, 352, 293, 293, 20, 356, + /* 70 */ 22, 309, 310, 299, 12, 13, 14, 15, 16, 251, + /* 80 */ 252, 81, 320, 279, 310, 80, 250, 313, 314, 315, + /* 90 */ 316, 317, 318, 88, 320, 47, 243, 323, 262, 57, + /* 100 */ 82, 327, 328, 103, 311, 269, 58, 81, 12, 13, + /* 110 */ 339, 273, 64, 339, 114, 279, 20, 311, 22, 289, + /* 120 */ 58, 317, 292, 352, 271, 295, 352, 356, 335, 81, + /* 130 */ 356, 293, 279, 14, 75, 331, 332, 333, 334, 20, + /* 140 */ 336, 335, 289, 47, 82, 81, 293, 309, 310, 250, + /* 150 */ 4, 103, 90, 256, 58, 150, 271, 260, 320, 159, + /* 160 */ 64, 262, 114, 310, 279, 57, 313, 314, 315, 316, + /* 170 */ 317, 318, 319, 320, 321, 322, 243, 81, 279, 120, + /* 180 */ 121, 181, 182, 20, 184, 185, 186, 187, 188, 189, + /* 190 */ 190, 191, 192, 193, 194, 195, 196, 197, 198, 103, + /* 200 */ 315, 255, 140, 55, 168, 169, 4, 159, 172, 21, + /* 210 */ 114, 211, 24, 25, 26, 27, 28, 29, 30, 31, + /* 220 */ 32, 243, 158, 277, 160, 163, 293, 81, 80, 181, + /* 230 */ 182, 83, 184, 185, 186, 187, 188, 189, 190, 191, + /* 240 */ 192, 193, 194, 195, 196, 197, 198, 0, 35, 20, + /* 250 */ 12, 13, 14, 15, 16, 159, 12, 13, 14, 15, + /* 260 */ 16, 199, 200, 201, 202, 203, 204, 205, 206, 207, + /* 270 */ 208, 293, 81, 240, 311, 211, 247, 181, 182, 250, + /* 280 */ 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, + /* 290 */ 194, 195, 196, 197, 198, 12, 13, 84, 335, 86, + /* 300 */ 87, 20, 89, 20, 185, 22, 93, 60, 61, 62, + /* 310 */ 63, 0, 65, 66, 67, 68, 69, 70, 71, 72, + /* 320 */ 73, 74, 75, 76, 77, 78, 60, 61, 255, 116, + /* 330 */ 47, 65, 299, 243, 68, 69, 93, 299, 72, 73, + /* 340 */ 74, 268, 250, 12, 13, 14, 14, 64, 20, 22, + /* 350 */ 277, 20, 20, 22, 262, 112, 113, 211, 115, 116, + /* 360 */ 117, 271, 81, 339, 81, 263, 243, 144, 57, 279, + /* 370 */ 140, 279, 339, 271, 47, 299, 352, 339, 47, 289, + /* 380 */ 356, 181, 280, 293, 146, 352, 103, 257, 258, 356, + /* 390 */ 352, 12, 13, 163, 356, 64, 20, 114, 22, 20, + /* 400 */ 310, 22, 211, 313, 314, 315, 316, 317, 318, 81, + /* 410 */ 320, 243, 81, 323, 212, 339, 293, 327, 328, 329, + /* 420 */ 220, 221, 222, 223, 224, 49, 47, 0, 352, 199, + /* 430 */ 289, 341, 356, 263, 103, 0, 295, 347, 348, 216, + /* 440 */ 217, 271, 159, 64, 0, 114, 247, 243, 21, 250, + /* 450 */ 280, 24, 25, 26, 27, 28, 29, 30, 31, 32, + /* 460 */ 81, 293, 257, 258, 181, 182, 22, 184, 185, 186, + /* 470 */ 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, + /* 480 */ 197, 198, 103, 12, 13, 14, 15, 16, 0, 253, + /* 490 */ 159, 279, 211, 114, 211, 60, 61, 293, 286, 271, + /* 500 */ 65, 37, 250, 68, 69, 20, 278, 72, 73, 74, + /* 510 */ 274, 283, 181, 182, 262, 184, 185, 186, 187, 188, + /* 520 */ 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, + /* 530 */ 41, 279, 12, 13, 14, 15, 16, 20, 159, 211, + /* 540 */ 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, + /* 550 */ 104, 281, 106, 107, 108, 109, 110, 111, 288, 289, + /* 560 */ 181, 182, 243, 184, 185, 186, 187, 188, 189, 190, + /* 570 */ 191, 192, 193, 194, 195, 196, 197, 198, 12, 13, + /* 580 */ 18, 93, 20, 2, 1, 2, 20, 243, 22, 27, + /* 590 */ 3, 47, 30, 12, 13, 14, 15, 16, 288, 289, + /* 600 */ 112, 113, 82, 115, 116, 117, 33, 250, 64, 271, + /* 610 */ 48, 14, 293, 47, 0, 271, 278, 20, 45, 262, + /* 620 */ 250, 283, 151, 279, 51, 52, 53, 54, 55, 243, + /* 630 */ 64, 154, 262, 289, 42, 43, 279, 293, 24, 25, + /* 640 */ 26, 27, 28, 29, 30, 31, 32, 81, 250, 279, + /* 650 */ 20, 174, 175, 80, 310, 253, 83, 313, 314, 315, + /* 660 */ 316, 317, 318, 146, 320, 82, 271, 323, 266, 103, + /* 670 */ 250, 327, 328, 329, 210, 280, 274, 279, 250, 293, + /* 680 */ 114, 119, 338, 243, 122, 123, 124, 125, 126, 127, + /* 690 */ 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, + /* 700 */ 138, 139, 231, 264, 284, 18, 267, 250, 92, 250, + /* 710 */ 23, 14, 15, 16, 141, 317, 143, 228, 145, 262, + /* 720 */ 147, 262, 35, 36, 57, 159, 39, 299, 269, 64, + /* 730 */ 332, 333, 334, 293, 336, 20, 279, 243, 279, 85, + /* 740 */ 167, 0, 88, 56, 243, 41, 243, 181, 182, 20, + /* 750 */ 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, + /* 760 */ 194, 195, 196, 197, 198, 271, 243, 339, 81, 250, + /* 770 */ 259, 263, 261, 279, 12, 13, 14, 15, 16, 271, + /* 780 */ 352, 262, 185, 289, 356, 209, 210, 293, 280, 250, + /* 790 */ 250, 243, 0, 299, 293, 250, 293, 243, 279, 272, + /* 800 */ 93, 262, 262, 250, 310, 118, 250, 313, 314, 315, + /* 810 */ 316, 317, 318, 226, 320, 262, 293, 323, 279, 279, + /* 820 */ 58, 327, 328, 116, 279, 243, 170, 171, 85, 0, + /* 830 */ 250, 88, 279, 339, 93, 279, 243, 45, 151, 152, + /* 840 */ 153, 293, 262, 156, 299, 22, 352, 293, 161, 243, + /* 850 */ 356, 22, 90, 112, 113, 243, 115, 116, 117, 279, + /* 860 */ 173, 146, 317, 176, 271, 178, 179, 180, 243, 243, + /* 870 */ 47, 58, 279, 317, 41, 293, 272, 332, 333, 334, + /* 880 */ 85, 336, 289, 88, 339, 81, 293, 64, 332, 333, + /* 890 */ 334, 146, 336, 85, 149, 91, 88, 352, 211, 293, + /* 900 */ 271, 356, 140, 310, 243, 293, 313, 314, 315, 316, + /* 910 */ 317, 318, 283, 320, 185, 82, 323, 0, 293, 293, + /* 920 */ 327, 328, 329, 21, 250, 163, 103, 1, 2, 196, + /* 930 */ 197, 41, 271, 244, 230, 47, 34, 114, 272, 22, + /* 940 */ 279, 348, 41, 44, 41, 47, 260, 272, 272, 272, + /* 950 */ 289, 41, 41, 279, 293, 41, 41, 41, 359, 41, + /* 960 */ 41, 199, 200, 201, 202, 203, 204, 205, 206, 207, + /* 970 */ 208, 310, 82, 299, 313, 314, 315, 316, 317, 318, + /* 980 */ 81, 320, 159, 82, 323, 82, 41, 243, 327, 328, + /* 990 */ 329, 317, 82, 82, 181, 41, 82, 82, 82, 338, + /* 1000 */ 82, 82, 114, 41, 181, 182, 332, 333, 334, 41, + /* 1010 */ 336, 41, 114, 339, 47, 271, 307, 344, 350, 243, + /* 1020 */ 271, 249, 41, 279, 251, 312, 352, 82, 282, 337, + /* 1030 */ 356, 64, 353, 289, 353, 353, 82, 293, 340, 20, + /* 1040 */ 250, 45, 308, 257, 82, 47, 157, 271, 301, 243, + /* 1050 */ 82, 250, 82, 250, 310, 279, 40, 313, 314, 315, + /* 1060 */ 316, 317, 318, 82, 320, 289, 287, 323, 140, 293, + /* 1070 */ 285, 327, 328, 329, 285, 299, 250, 271, 20, 245, + /* 1080 */ 245, 20, 338, 305, 20, 279, 310, 255, 289, 313, + /* 1090 */ 314, 315, 316, 317, 318, 289, 320, 255, 20, 293, + /* 1100 */ 300, 255, 297, 255, 297, 299, 279, 243, 20, 290, + /* 1110 */ 4, 255, 255, 250, 255, 339, 310, 245, 271, 313, + /* 1120 */ 314, 315, 316, 317, 318, 19, 320, 250, 352, 271, + /* 1130 */ 245, 271, 356, 271, 64, 271, 271, 271, 271, 33, + /* 1140 */ 271, 271, 271, 279, 271, 339, 293, 243, 305, 253, + /* 1150 */ 166, 45, 297, 289, 304, 279, 50, 293, 352, 253, + /* 1160 */ 253, 55, 356, 289, 20, 290, 243, 219, 218, 349, + /* 1170 */ 349, 225, 293, 253, 310, 271, 294, 313, 314, 315, + /* 1180 */ 316, 317, 318, 279, 320, 294, 80, 323, 293, 83, + /* 1190 */ 312, 327, 328, 289, 271, 346, 148, 293, 243, 345, + /* 1200 */ 214, 293, 279, 213, 343, 210, 279, 20, 311, 40, + /* 1210 */ 342, 330, 289, 81, 310, 227, 293, 313, 314, 315, + /* 1220 */ 316, 317, 318, 229, 320, 232, 271, 323, 294, 293, + /* 1230 */ 293, 327, 328, 310, 279, 355, 313, 314, 315, 316, + /* 1240 */ 317, 318, 293, 320, 289, 294, 354, 360, 293, 355, + /* 1250 */ 326, 143, 291, 19, 354, 279, 290, 253, 267, 253, + /* 1260 */ 355, 279, 81, 243, 275, 310, 354, 33, 313, 314, + /* 1270 */ 315, 316, 317, 318, 261, 320, 250, 253, 323, 45, + /* 1280 */ 357, 358, 245, 328, 306, 51, 52, 53, 54, 55, + /* 1290 */ 265, 271, 265, 265, 302, 298, 254, 241, 0, 279, + /* 1300 */ 0, 72, 0, 47, 177, 47, 47, 47, 177, 289, + /* 1310 */ 0, 243, 47, 293, 80, 47, 296, 83, 177, 0, + /* 1320 */ 47, 0, 47, 0, 47, 0, 81, 163, 162, 114, + /* 1330 */ 310, 159, 0, 313, 314, 315, 316, 317, 318, 271, + /* 1340 */ 320, 0, 0, 155, 154, 0, 0, 279, 44, 0, + /* 1350 */ 0, 117, 0, 0, 0, 0, 0, 289, 0, 243, + /* 1360 */ 0, 293, 0, 0, 0, 0, 0, 0, 243, 0, + /* 1370 */ 0, 40, 0, 0, 0, 0, 142, 0, 310, 145, + /* 1380 */ 0, 313, 314, 315, 316, 317, 318, 271, 320, 0, + /* 1390 */ 22, 0, 0, 0, 0, 279, 271, 40, 37, 165, + /* 1400 */ 0, 167, 14, 44, 279, 289, 0, 0, 0, 293, + /* 1410 */ 14, 0, 41, 0, 289, 148, 38, 0, 293, 351, + /* 1420 */ 44, 296, 243, 37, 37, 0, 310, 37, 0, 313, + /* 1430 */ 314, 315, 316, 317, 318, 310, 320, 243, 313, 314, + /* 1440 */ 315, 316, 317, 318, 59, 320, 0, 45, 47, 37, + /* 1450 */ 271, 0, 47, 37, 45, 0, 37, 47, 279, 45, + /* 1460 */ 0, 37, 47, 45, 0, 271, 0, 0, 289, 0, + /* 1470 */ 243, 90, 293, 279, 358, 22, 47, 0, 47, 47, + /* 1480 */ 47, 47, 41, 289, 41, 243, 88, 293, 0, 310, + /* 1490 */ 296, 47, 313, 314, 315, 316, 317, 318, 271, 320, + /* 1500 */ 22, 322, 0, 47, 310, 47, 279, 313, 314, 315, + /* 1510 */ 316, 317, 318, 271, 320, 0, 289, 22, 48, 22, + /* 1520 */ 293, 279, 47, 296, 0, 243, 22, 0, 22, 20, + /* 1530 */ 0, 289, 47, 0, 22, 293, 0, 310, 143, 0, + /* 1540 */ 313, 314, 315, 316, 317, 318, 0, 320, 164, 146, + /* 1550 */ 146, 37, 310, 271, 81, 313, 314, 315, 316, 317, + /* 1560 */ 318, 279, 320, 141, 41, 82, 41, 41, 82, 82, + /* 1570 */ 81, 289, 81, 81, 2, 293, 41, 243, 44, 81, + /* 1580 */ 81, 44, 82, 41, 44, 82, 41, 44, 41, 82, + /* 1590 */ 82, 47, 310, 41, 215, 313, 314, 315, 316, 317, + /* 1600 */ 318, 47, 320, 47, 47, 271, 47, 47, 181, 44, + /* 1610 */ 82, 82, 81, 279, 215, 44, 22, 0, 183, 81, + /* 1620 */ 144, 37, 141, 289, 44, 243, 44, 293, 59, 209, + /* 1630 */ 81, 22, 82, 82, 47, 47, 215, 47, 47, 81, + /* 1640 */ 243, 22, 81, 81, 310, 81, 91, 313, 314, 315, + /* 1650 */ 316, 317, 318, 271, 320, 81, 93, 82, 81, 81, + /* 1660 */ 92, 279, 47, 82, 81, 47, 22, 82, 271, 47, + /* 1670 */ 81, 289, 105, 243, 82, 293, 279, 81, 105, 82, + /* 1680 */ 81, 105, 82, 81, 105, 81, 289, 47, 81, 81, + /* 1690 */ 293, 58, 310, 47, 64, 313, 314, 315, 316, 317, + /* 1700 */ 318, 271, 320, 79, 41, 47, 47, 310, 47, 279, + /* 1710 */ 313, 314, 315, 316, 317, 318, 22, 320, 47, 289, + /* 1720 */ 47, 47, 47, 293, 114, 47, 64, 243, 47, 47, + /* 1730 */ 47, 47, 47, 47, 0, 47, 243, 45, 37, 0, + /* 1740 */ 310, 45, 47, 313, 314, 315, 316, 317, 318, 37, + /* 1750 */ 320, 0, 47, 45, 37, 271, 47, 37, 45, 0, + /* 1760 */ 0, 47, 46, 279, 271, 0, 0, 22, 21, 361, + /* 1770 */ 22, 22, 279, 289, 21, 20, 361, 293, 361, 361, /* 1780 */ 361, 361, 289, 361, 243, 361, 293, 361, 361, 361, - /* 1790 */ 361, 361, 361, 361, 361, 243, 361, 361, 361, 361, - /* 1800 */ 361, 361, 361, 310, 361, 361, 313, 314, 315, 316, - /* 1810 */ 317, 318, 271, 320, 243, 361, 361, 361, 361, 361, - /* 1820 */ 279, 361, 361, 271, 361, 361, 361, 361, 361, 361, - /* 1830 */ 289, 279, 361, 361, 293, 361, 361, 361, 361, 361, - /* 1840 */ 361, 289, 271, 361, 361, 293, 361, 361, 361, 361, - /* 1850 */ 279, 310, 361, 361, 313, 314, 315, 316, 317, 318, - /* 1860 */ 289, 320, 310, 361, 293, 313, 314, 315, 316, 317, - /* 1870 */ 318, 361, 320, 243, 361, 361, 361, 361, 361, 361, - /* 1880 */ 361, 310, 243, 361, 313, 314, 315, 316, 317, 318, - /* 1890 */ 361, 320, 361, 361, 361, 361, 361, 361, 361, 361, - /* 1900 */ 361, 271, 361, 361, 361, 361, 361, 361, 361, 279, - /* 1910 */ 271, 361, 361, 361, 361, 361, 361, 361, 279, 289, - /* 1920 */ 361, 361, 361, 293, 361, 361, 361, 361, 289, 361, - /* 1930 */ 361, 361, 293, 361, 361, 361, 361, 361, 361, 361, - /* 1940 */ 310, 361, 243, 313, 314, 315, 316, 317, 318, 310, - /* 1950 */ 320, 243, 313, 314, 315, 316, 317, 318, 361, 320, - /* 1960 */ 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, - /* 1970 */ 271, 361, 361, 361, 361, 361, 361, 361, 279, 271, - /* 1980 */ 361, 361, 361, 361, 361, 361, 361, 279, 289, 361, - /* 1990 */ 361, 361, 293, 361, 361, 361, 361, 289, 361, 243, - /* 2000 */ 361, 293, 361, 361, 361, 361, 361, 361, 361, 310, - /* 2010 */ 250, 361, 313, 314, 315, 316, 317, 318, 310, 320, - /* 2020 */ 361, 313, 314, 315, 316, 317, 318, 271, 320, 361, - /* 2030 */ 361, 361, 361, 361, 361, 279, 361, 361, 361, 279, - /* 2040 */ 361, 361, 361, 361, 361, 289, 250, 361, 361, 293, - /* 2050 */ 361, 361, 361, 361, 361, 361, 361, 361, 361, 299, + /* 1790 */ 361, 361, 361, 361, 310, 361, 243, 313, 314, 315, + /* 1800 */ 316, 317, 318, 310, 320, 361, 313, 314, 315, 316, + /* 1810 */ 317, 318, 271, 320, 361, 361, 361, 361, 361, 361, + /* 1820 */ 279, 361, 361, 361, 271, 361, 361, 361, 361, 361, + /* 1830 */ 289, 361, 279, 361, 293, 361, 243, 361, 361, 361, + /* 1840 */ 361, 361, 289, 361, 361, 361, 293, 361, 361, 243, + /* 1850 */ 361, 310, 361, 361, 313, 314, 315, 316, 317, 318, + /* 1860 */ 361, 320, 361, 310, 271, 361, 313, 314, 315, 316, + /* 1870 */ 317, 318, 279, 320, 361, 361, 361, 271, 361, 361, + /* 1880 */ 361, 361, 289, 361, 361, 279, 293, 361, 361, 361, + /* 1890 */ 361, 361, 361, 361, 361, 289, 361, 243, 361, 293, + /* 1900 */ 361, 361, 361, 310, 361, 361, 313, 314, 315, 316, + /* 1910 */ 317, 318, 243, 320, 361, 361, 310, 361, 361, 313, + /* 1920 */ 314, 315, 316, 317, 318, 271, 320, 361, 361, 361, + /* 1930 */ 361, 361, 361, 279, 361, 361, 361, 361, 361, 361, + /* 1940 */ 271, 361, 361, 289, 361, 243, 361, 293, 279, 361, + /* 1950 */ 361, 361, 361, 12, 13, 361, 361, 361, 289, 361, + /* 1960 */ 361, 361, 293, 22, 310, 361, 361, 313, 314, 315, + /* 1970 */ 316, 317, 318, 271, 320, 361, 361, 361, 361, 310, + /* 1980 */ 361, 279, 313, 314, 315, 316, 317, 318, 47, 320, + /* 1990 */ 361, 289, 361, 361, 361, 293, 361, 361, 361, 243, + /* 2000 */ 361, 361, 361, 361, 361, 64, 361, 361, 361, 361, + /* 2010 */ 361, 361, 310, 361, 361, 313, 314, 315, 316, 317, + /* 2020 */ 318, 361, 320, 361, 361, 361, 361, 271, 361, 361, + /* 2030 */ 361, 361, 361, 361, 361, 279, 361, 361, 361, 361, + /* 2040 */ 361, 361, 361, 361, 103, 289, 361, 361, 361, 293, + /* 2050 */ 361, 361, 361, 361, 361, 114, 361, 361, 361, 361, /* 2060 */ 361, 361, 361, 361, 361, 361, 310, 361, 361, 313, - /* 2070 */ 314, 315, 316, 317, 318, 279, 320, 317, 361, 361, + /* 2070 */ 314, 315, 316, 317, 318, 361, 320, 361, 361, 361, /* 2080 */ 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, - /* 2090 */ 361, 361, 332, 333, 334, 299, 336, 361, 361, 339, - /* 2100 */ 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, - /* 2110 */ 361, 361, 352, 317, 361, 361, 356, 361, 361, 361, - /* 2120 */ 361, 361, 361, 361, 361, 361, 361, 361, 332, 333, - /* 2130 */ 334, 361, 336, 361, 361, 339, 361, 361, 361, 361, - /* 2140 */ 361, 361, 361, 361, 361, 361, 361, 361, 352, 361, - /* 2150 */ 361, 361, 356, + /* 2090 */ 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, + /* 2100 */ 159, 361, 361, 361, 361, 361, 361, 361, 361, 361, + /* 2110 */ 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, + /* 2120 */ 361, 361, 181, 361, 361, 361, 361, 361, 361, 361, + /* 2130 */ 361, 361, 361, 192, 193, 194, 361, 361, 361, 361, + /* 2140 */ 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, + /* 2150 */ 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, + /* 2160 */ 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, + /* 2170 */ 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, + /* 2180 */ 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, + /* 2190 */ 361, 361, 361, 361, }; -#define YY_SHIFT_COUNT (610) +#define YY_SHIFT_COUNT (611) #define YY_SHIFT_MIN (0) -#define YY_SHIFT_MAX (1757) +#define YY_SHIFT_MAX (1941) static const unsigned short int yy_shift_ofst[] = { - /* 0 */ 768, 0, 0, 48, 234, 234, 234, 234, 255, 255, - /* 10 */ 234, 234, 441, 462, 648, 462, 462, 462, 462, 462, - /* 20 */ 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, - /* 30 */ 462, 462, 462, 462, 462, 462, 462, 462, 254, 254, - /* 40 */ 54, 54, 54, 1188, 1188, 1188, 1188, 331, 508, 74, - /* 50 */ 4, 4, 7, 7, 76, 74, 74, 4, 4, 4, - /* 60 */ 4, 4, 4, 216, 4, 265, 371, 527, 265, 4, - /* 70 */ 4, 265, 4, 265, 265, 527, 265, 4, 447, 644, - /* 80 */ 14, 554, 554, 139, 192, 1453, 1453, 1453, 1453, 1453, - /* 90 */ 1453, 1453, 1453, 1453, 1453, 1453, 1453, 1453, 1453, 1453, - /* 100 */ 1453, 1453, 1453, 1453, 604, 229, 482, 482, 198, 5, - /* 110 */ 438, 438, 438, 764, 5, 772, 527, 265, 265, 527, - /* 120 */ 487, 468, 636, 636, 636, 636, 636, 636, 636, 440, - /* 130 */ 299, 222, 27, 486, 37, 346, 287, 456, 681, 674, - /* 140 */ 484, 769, 470, 652, 470, 390, 390, 390, 615, 773, - /* 150 */ 948, 963, 966, 864, 948, 948, 979, 886, 886, 948, - /* 160 */ 1014, 1014, 1020, 216, 527, 216, 1040, 1051, 216, 1040, - /* 170 */ 216, 772, 1066, 216, 216, 948, 216, 1014, 265, 265, - /* 180 */ 265, 265, 265, 265, 265, 265, 265, 265, 265, 948, - /* 190 */ 1014, 1043, 1020, 447, 967, 527, 447, 1040, 447, 772, - /* 200 */ 1066, 447, 1118, 924, 937, 1043, 924, 937, 1043, 1043, - /* 210 */ 265, 931, 938, 968, 970, 974, 772, 1159, 1145, 957, - /* 220 */ 971, 960, 957, 971, 957, 971, 1112, 937, 1043, 1043, - /* 230 */ 937, 1043, 1064, 772, 1066, 447, 487, 447, 772, 1146, - /* 240 */ 468, 948, 447, 1014, 2153, 2153, 2153, 2153, 2153, 2153, - /* 250 */ 2153, 2153, 71, 1425, 93, 453, 248, 587, 187, 63, - /* 260 */ 385, 391, 211, 570, 95, 95, 95, 95, 95, 95, - /* 270 */ 95, 95, 357, 2, 52, 492, 712, 655, 661, 661, - /* 280 */ 661, 661, 854, 501, 786, 788, 790, 792, 857, 863, - /* 290 */ 867, 862, 557, 677, 880, 881, 888, 900, 715, 749, - /* 300 */ 805, 891, 824, 892, 868, 893, 898, 928, 930, 951, - /* 310 */ 869, 879, 955, 956, 961, 965, 975, 976, 807, 242, - /* 320 */ 1261, 1262, 1192, 1265, 1227, 1107, 1237, 1239, 1240, 1114, - /* 330 */ 1288, 1245, 1246, 1119, 1294, 1249, 1297, 1251, 1300, 1254, - /* 340 */ 1304, 1224, 1144, 1147, 1193, 1151, 1312, 1314, 1161, 1163, - /* 350 */ 1318, 1319, 1278, 1329, 1332, 1333, 1334, 1336, 1337, 1338, - /* 360 */ 1339, 1340, 1341, 1342, 1343, 1344, 1347, 1348, 1349, 1350, - /* 370 */ 1351, 1324, 1354, 1366, 1369, 1371, 1372, 1373, 1352, 1375, - /* 380 */ 1376, 1377, 1382, 1383, 1385, 1346, 1359, 1356, 1381, 1355, - /* 390 */ 1384, 1360, 1402, 1365, 1368, 1407, 1408, 1409, 1379, 1410, - /* 400 */ 1412, 1380, 1413, 1361, 1419, 1421, 1378, 1389, 1386, 1422, - /* 410 */ 1394, 1398, 1390, 1426, 1400, 1411, 1392, 1430, 1414, 1415, - /* 420 */ 1396, 1457, 1459, 1462, 1463, 1391, 1395, 1418, 1447, 1467, - /* 430 */ 1427, 1435, 1437, 1439, 1431, 1432, 1440, 1449, 1450, 1498, - /* 440 */ 1477, 1501, 1481, 1456, 1506, 1485, 1464, 1509, 1488, 1513, - /* 450 */ 1492, 1495, 1518, 1374, 1472, 1521, 1362, 1500, 1399, 1387, - /* 460 */ 1524, 1526, 1527, 1448, 1491, 1393, 1490, 1494, 1330, 1460, - /* 470 */ 1505, 1465, 1451, 1468, 1469, 1466, 1511, 1510, 1514, 1474, - /* 480 */ 1512, 1363, 1475, 1478, 1517, 1357, 1522, 1520, 1480, 1533, - /* 490 */ 1364, 1497, 1528, 1529, 1534, 1535, 1536, 1537, 1497, 1578, - /* 500 */ 1405, 1545, 1507, 1523, 1530, 1543, 1525, 1532, 1544, 1570, - /* 510 */ 1420, 1538, 1540, 1542, 1539, 1546, 1461, 1547, 1603, 1572, - /* 520 */ 1473, 1549, 1519, 1564, 1574, 1551, 1553, 1555, 1593, 1558, - /* 530 */ 1531, 1567, 1569, 1579, 1559, 1568, 1605, 1573, 1575, 1606, - /* 540 */ 1577, 1580, 1608, 1582, 1583, 1609, 1585, 1556, 1565, 1581, - /* 550 */ 1584, 1638, 1576, 1599, 1601, 1617, 1602, 1586, 1637, 1663, - /* 560 */ 1566, 1629, 1643, 1627, 1613, 1652, 1647, 1648, 1649, 1650, - /* 570 */ 1662, 1677, 1664, 1665, 1646, 1431, 1666, 1432, 1667, 1670, - /* 580 */ 1671, 1672, 1673, 1674, 1722, 1676, 1681, 1690, 1728, 1683, - /* 590 */ 1686, 1695, 1733, 1688, 1692, 1702, 1740, 1694, 1697, 1706, - /* 600 */ 1744, 1698, 1701, 1748, 1757, 1745, 1747, 1749, 1751, 1753, - /* 610 */ 1746, + /* 0 */ 687, 0, 0, 48, 96, 96, 96, 96, 283, 283, + /* 10 */ 96, 96, 331, 379, 566, 379, 379, 379, 379, 379, + /* 20 */ 379, 379, 379, 379, 379, 379, 379, 379, 379, 379, + /* 30 */ 379, 379, 379, 379, 379, 379, 379, 379, 281, 281, + /* 40 */ 26, 26, 26, 1941, 1941, 1941, 1941, 328, 64, 191, + /* 50 */ 39, 39, 14, 14, 146, 191, 191, 39, 39, 39, + /* 60 */ 39, 39, 39, 108, 39, 163, 229, 485, 163, 39, + /* 70 */ 39, 163, 39, 163, 163, 485, 163, 39, 667, 562, + /* 80 */ 62, 762, 762, 188, 266, 823, 823, 823, 823, 823, + /* 90 */ 823, 823, 823, 823, 823, 823, 823, 823, 823, 823, + /* 100 */ 823, 823, 823, 823, 213, 376, 332, 332, 42, 544, + /* 110 */ 517, 517, 517, 311, 544, 630, 485, 163, 163, 485, + /* 120 */ 616, 665, 446, 446, 446, 446, 446, 446, 446, 1234, + /* 130 */ 427, 435, 471, 200, 36, 223, 119, 597, 592, 327, + /* 140 */ 707, 715, 576, 464, 576, 587, 587, 587, 202, 729, + /* 150 */ 1019, 996, 998, 889, 1019, 1019, 1016, 928, 928, 1019, + /* 160 */ 1058, 1058, 1061, 108, 485, 108, 1064, 1078, 108, 1064, + /* 170 */ 108, 630, 1088, 108, 108, 1019, 108, 1058, 163, 163, + /* 180 */ 163, 163, 163, 163, 163, 163, 163, 163, 163, 1019, + /* 190 */ 1058, 1070, 1061, 667, 984, 485, 667, 1064, 667, 630, + /* 200 */ 1088, 667, 1144, 948, 950, 1070, 948, 950, 1070, 1070, + /* 210 */ 163, 946, 1048, 986, 990, 995, 630, 1187, 1169, 994, + /* 220 */ 988, 993, 994, 988, 994, 988, 1132, 950, 1070, 1070, + /* 230 */ 950, 1070, 1108, 630, 1088, 667, 616, 667, 630, 1181, + /* 240 */ 665, 1019, 667, 1058, 2136, 2136, 2136, 2136, 2136, 2136, + /* 250 */ 2136, 2136, 247, 573, 614, 1106, 488, 741, 18, 13, + /* 260 */ 581, 238, 520, 243, 244, 244, 244, 244, 244, 244, + /* 270 */ 244, 244, 477, 148, 59, 5, 583, 230, 697, 697, + /* 280 */ 697, 697, 792, 833, 654, 743, 795, 808, 444, 829, + /* 290 */ 917, 902, 656, 745, 890, 901, 903, 926, 733, 489, + /* 300 */ 704, 910, 813, 911, 899, 914, 915, 916, 918, 919, + /* 310 */ 888, 898, 945, 954, 962, 968, 970, 981, 804, 967, + /* 320 */ 1298, 1300, 1229, 1302, 1256, 1127, 1258, 1259, 1260, 1131, + /* 330 */ 1310, 1265, 1268, 1141, 1319, 1273, 1321, 1275, 1323, 1277, + /* 340 */ 1325, 1245, 1164, 1166, 1215, 1172, 1332, 1341, 1188, 1190, + /* 350 */ 1342, 1345, 1304, 1346, 1349, 1350, 1352, 1353, 1354, 1355, + /* 360 */ 1356, 1358, 1360, 1362, 1363, 1364, 1365, 1366, 1367, 1369, + /* 370 */ 1370, 1331, 1372, 1373, 1374, 1375, 1377, 1380, 1368, 1389, + /* 380 */ 1391, 1392, 1393, 1394, 1400, 1357, 1361, 1371, 1388, 1359, + /* 390 */ 1396, 1376, 1406, 1378, 1386, 1407, 1408, 1411, 1387, 1267, + /* 400 */ 1413, 1417, 1390, 1425, 1385, 1428, 1446, 1401, 1402, 1412, + /* 410 */ 1451, 1405, 1409, 1416, 1455, 1410, 1414, 1419, 1460, 1415, + /* 420 */ 1418, 1424, 1464, 1466, 1467, 1469, 1381, 1398, 1429, 1453, + /* 430 */ 1477, 1431, 1432, 1433, 1434, 1441, 1443, 1444, 1456, 1458, + /* 440 */ 1488, 1478, 1502, 1495, 1470, 1515, 1497, 1475, 1524, 1504, + /* 450 */ 1527, 1506, 1509, 1530, 1403, 1485, 1533, 1384, 1512, 1404, + /* 460 */ 1395, 1536, 1539, 1546, 1473, 1514, 1422, 1523, 1525, 1379, + /* 470 */ 1483, 1526, 1486, 1489, 1491, 1492, 1487, 1535, 1534, 1537, + /* 480 */ 1498, 1542, 1399, 1500, 1503, 1540, 1420, 1545, 1543, 1507, + /* 490 */ 1547, 1421, 1508, 1544, 1554, 1556, 1557, 1559, 1560, 1508, + /* 500 */ 1572, 1427, 1552, 1528, 1499, 1529, 1565, 1531, 1538, 1571, + /* 510 */ 1594, 1435, 1549, 1550, 1551, 1558, 1561, 1476, 1562, 1617, + /* 520 */ 1584, 1481, 1564, 1555, 1580, 1582, 1574, 1575, 1577, 1609, + /* 530 */ 1578, 1568, 1581, 1587, 1588, 1583, 1585, 1590, 1589, 1592, + /* 540 */ 1591, 1596, 1597, 1615, 1599, 1600, 1618, 1602, 1567, 1573, + /* 550 */ 1576, 1579, 1619, 1563, 1604, 1607, 1622, 1608, 1610, 1640, + /* 560 */ 1644, 1569, 1633, 1646, 1630, 1624, 1663, 1658, 1659, 1661, + /* 570 */ 1671, 1673, 1694, 1674, 1675, 1662, 1441, 1678, 1443, 1681, + /* 580 */ 1682, 1683, 1684, 1685, 1686, 1734, 1688, 1692, 1701, 1739, + /* 590 */ 1695, 1696, 1712, 1751, 1705, 1708, 1717, 1765, 1709, 1713, + /* 600 */ 1720, 1759, 1714, 1716, 1760, 1766, 1745, 1747, 1748, 1749, + /* 610 */ 1753, 1755, }; #define YY_REDUCE_COUNT (251) -#define YY_REDUCE_MIN (-320) -#define YY_REDUCE_MAX (1796) +#define YY_REDUCE_MIN (-314) +#define YY_REDUCE_MAX (1756) static const short yy_reduce_ofst[] = { - /* 0 */ 259, -226, 236, 61, 577, 638, 671, 752, 784, 835, - /* 10 */ 29, 850, 901, 953, 736, 962, 1010, 1042, 1074, 1122, - /* 20 */ 1135, 1175, 1223, 1280, 1328, 1358, 1388, 1436, 1445, 1493, - /* 30 */ 1541, 1552, 1571, 1630, 1639, 1699, 1708, 1756, 1760, 1796, - /* 40 */ -20, 261, 269, -272, 207, 204, 298, 182, 449, 512, - /* 50 */ -244, -164, -246, -241, -320, -178, -76, -196, 55, 59, - /* 60 */ 132, 239, 419, -222, 422, -227, -256, -139, -1, 534, - /* 70 */ 535, 84, 537, 310, 102, 179, 448, 568, 343, -75, - /* 80 */ -315, -315, -315, -228, -49, 60, 90, 123, 194, 213, - /* 90 */ 219, 235, 317, 380, 472, 507, 559, 565, 566, 567, - /* 100 */ 569, 572, 576, 579, -154, -152, -216, -68, 33, 138, - /* 110 */ 75, 406, 414, -3, 176, -127, 250, 88, 439, 325, - /* 120 */ 202, 111, 302, 526, 555, 578, 583, 612, 631, 605, - /* 130 */ 663, 653, 571, 574, 628, 592, 666, 666, 689, 690, - /* 140 */ 662, 647, 635, 635, 635, 629, 637, 650, 665, 666, - /* 150 */ 751, 703, 757, 717, 771, 774, 735, 743, 745, 782, - /* 160 */ 791, 794, 737, 789, 759, 806, 777, 776, 827, 787, - /* 170 */ 830, 808, 798, 834, 836, 842, 840, 851, 832, 837, - /* 180 */ 838, 839, 841, 844, 845, 846, 847, 848, 849, 855, - /* 190 */ 866, 820, 817, 872, 822, 852, 874, 833, 878, 856, - /* 200 */ 843, 884, 859, 797, 853, 865, 810, 875, 882, 883, - /* 210 */ 666, 811, 816, 860, 870, 635, 905, 877, 876, 858, - /* 220 */ 871, 829, 873, 885, 889, 894, 903, 908, 902, 904, - /* 230 */ 910, 906, 917, 947, 919, 977, 964, 981, 958, 972, - /* 240 */ 982, 986, 985, 995, 943, 944, 959, 984, 989, 991, - /* 250 */ 1005, 1019, + /* 0 */ 33, -226, 494, 90, 593, 344, 661, 744, 776, 806, + /* 10 */ 864, 904, -147, 923, 955, 1020, 1068, 1116, 1125, 1179, + /* 20 */ 1194, 1227, 1242, 1282, 1334, 1382, 1397, 1430, 1484, 1493, + /* 30 */ 1541, 1553, 1593, 1606, 1654, 1669, 1702, 1756, 545, 674, + /* 40 */ -196, 398, 556, -272, -270, -238, -162, 428, 38, 76, + /* 50 */ -164, 459, -241, -205, -287, -229, 24, -101, 92, 252, + /* 60 */ 357, 370, 457, 73, 519, -269, -115, -170, 102, 539, + /* 70 */ 540, 228, 553, 170, 338, 270, 508, 580, 402, 420, + /* 80 */ -314, -314, -314, -193, -103, -227, -67, -22, 123, 168, + /* 90 */ 204, 319, 386, 440, 501, 503, 523, 548, 554, 582, + /* 100 */ 606, 612, 625, 626, -246, -172, 29, 199, -54, 130, + /* 110 */ -207, -194, -37, 236, 205, 212, 141, 395, 629, 310, + /* 120 */ 439, 511, -253, 527, 604, 666, 675, 676, 677, -303, + /* 130 */ 689, 686, 599, 668, 709, 673, 749, 749, 772, 773, + /* 140 */ 746, 713, 692, 692, 692, 679, 681, 682, 698, 749, + /* 150 */ 790, 734, 786, 747, 801, 803, 779, 785, 789, 826, + /* 160 */ 834, 835, 778, 832, 799, 842, 805, 800, 846, 807, + /* 170 */ 848, 827, 819, 856, 857, 863, 859, 872, 847, 858, + /* 180 */ 860, 862, 865, 866, 867, 869, 870, 871, 873, 877, + /* 190 */ 885, 853, 843, 896, 850, 874, 906, 855, 907, 876, + /* 200 */ 875, 920, 878, 820, 882, 879, 821, 891, 895, 908, + /* 210 */ 749, 849, 854, 861, 868, 692, 927, 897, 881, 880, + /* 220 */ 892, 887, 894, 900, 905, 912, 924, 934, 936, 937, + /* 230 */ 951, 949, 961, 976, 966, 1004, 991, 1006, 982, 989, + /* 240 */ 1013, 1026, 1024, 1037, 992, 978, 997, 1025, 1027, 1028, + /* 250 */ 1042, 1056, }; static const YYACTIONTYPE yy_default[] = { - /* 0 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, - /* 10 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, - /* 20 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, - /* 30 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, - /* 40 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, - /* 50 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, - /* 60 */ 1356, 1356, 1356, 1425, 1356, 1356, 1356, 1356, 1356, 1356, - /* 70 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1423, 1564, - /* 80 */ 1356, 1731, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, - /* 90 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, - /* 100 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1425, 1356, - /* 110 */ 1742, 1742, 1742, 1423, 1356, 1356, 1356, 1356, 1356, 1356, - /* 120 */ 1519, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1603, - /* 130 */ 1356, 1356, 1808, 1356, 1609, 1766, 1356, 1356, 1356, 1356, - /* 140 */ 1472, 1758, 1734, 1748, 1735, 1793, 1793, 1793, 1751, 1356, - /* 150 */ 1356, 1356, 1356, 1595, 1356, 1356, 1569, 1566, 1566, 1356, - /* 160 */ 1356, 1356, 1356, 1425, 1356, 1425, 1356, 1356, 1425, 1356, - /* 170 */ 1425, 1356, 1356, 1425, 1425, 1356, 1425, 1356, 1356, 1356, - /* 180 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, - /* 190 */ 1356, 1356, 1356, 1423, 1605, 1356, 1423, 1356, 1423, 1356, - /* 200 */ 1356, 1423, 1356, 1773, 1771, 1356, 1773, 1771, 1356, 1356, - /* 210 */ 1356, 1785, 1781, 1764, 1762, 1748, 1356, 1356, 1356, 1799, - /* 220 */ 1795, 1811, 1799, 1795, 1799, 1795, 1356, 1771, 1356, 1356, - /* 230 */ 1771, 1356, 1577, 1356, 1356, 1423, 1356, 1423, 1356, 1488, - /* 240 */ 1356, 1356, 1423, 1356, 1597, 1611, 1587, 1522, 1522, 1522, - /* 250 */ 1426, 1361, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, - /* 260 */ 1356, 1356, 1356, 1484, 1675, 1784, 1783, 1707, 1706, 1705, - /* 270 */ 1703, 1674, 1356, 1356, 1356, 1356, 1356, 1356, 1668, 1669, - /* 280 */ 1667, 1666, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, - /* 290 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1732, 1356, 1796, - /* 300 */ 1800, 1356, 1356, 1356, 1651, 1356, 1356, 1356, 1356, 1356, - /* 310 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, - /* 320 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, - /* 330 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, - /* 340 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, - /* 350 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, - /* 360 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, - /* 370 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, - /* 380 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1390, 1356, 1356, - /* 390 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, - /* 400 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, - /* 410 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, - /* 420 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, - /* 430 */ 1356, 1356, 1356, 1356, 1453, 1452, 1356, 1356, 1356, 1356, - /* 440 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, - /* 450 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, - /* 460 */ 1356, 1356, 1356, 1356, 1356, 1356, 1755, 1765, 1356, 1356, - /* 470 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1651, 1356, - /* 480 */ 1782, 1356, 1741, 1737, 1356, 1356, 1733, 1356, 1356, 1794, - /* 490 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1727, - /* 500 */ 1356, 1700, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, - /* 510 */ 1662, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, - /* 520 */ 1356, 1356, 1356, 1650, 1356, 1691, 1356, 1356, 1356, 1356, - /* 530 */ 1356, 1356, 1356, 1356, 1516, 1356, 1356, 1356, 1356, 1356, - /* 540 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1501, 1499, 1498, - /* 550 */ 1497, 1356, 1494, 1356, 1356, 1356, 1356, 1356, 1356, 1356, - /* 560 */ 1356, 1356, 1356, 1356, 1356, 1445, 1356, 1356, 1356, 1356, - /* 570 */ 1356, 1356, 1356, 1356, 1356, 1436, 1356, 1435, 1356, 1356, - /* 580 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, - /* 590 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, - /* 600 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, - /* 610 */ 1356, + /* 0 */ 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, + /* 10 */ 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, + /* 20 */ 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, + /* 30 */ 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, + /* 40 */ 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, + /* 50 */ 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, + /* 60 */ 1357, 1357, 1357, 1426, 1357, 1357, 1357, 1357, 1357, 1357, + /* 70 */ 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1424, 1565, + /* 80 */ 1357, 1732, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, + /* 90 */ 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, + /* 100 */ 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1426, 1357, + /* 110 */ 1743, 1743, 1743, 1424, 1357, 1357, 1357, 1357, 1357, 1357, + /* 120 */ 1520, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1604, + /* 130 */ 1357, 1357, 1809, 1357, 1610, 1767, 1357, 1357, 1357, 1357, + /* 140 */ 1473, 1759, 1735, 1749, 1736, 1794, 1794, 1794, 1752, 1357, + /* 150 */ 1357, 1357, 1357, 1596, 1357, 1357, 1570, 1567, 1567, 1357, + /* 160 */ 1357, 1357, 1357, 1426, 1357, 1426, 1357, 1357, 1426, 1357, + /* 170 */ 1426, 1357, 1357, 1426, 1426, 1357, 1426, 1357, 1357, 1357, + /* 180 */ 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, + /* 190 */ 1357, 1357, 1357, 1424, 1606, 1357, 1424, 1357, 1424, 1357, + /* 200 */ 1357, 1424, 1357, 1774, 1772, 1357, 1774, 1772, 1357, 1357, + /* 210 */ 1357, 1786, 1782, 1765, 1763, 1749, 1357, 1357, 1357, 1800, + /* 220 */ 1796, 1812, 1800, 1796, 1800, 1796, 1357, 1772, 1357, 1357, + /* 230 */ 1772, 1357, 1578, 1357, 1357, 1424, 1357, 1424, 1357, 1489, + /* 240 */ 1357, 1357, 1424, 1357, 1598, 1612, 1588, 1523, 1523, 1523, + /* 250 */ 1427, 1362, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, + /* 260 */ 1357, 1357, 1357, 1485, 1676, 1785, 1784, 1708, 1707, 1706, + /* 270 */ 1704, 1675, 1357, 1357, 1357, 1357, 1357, 1357, 1669, 1670, + /* 280 */ 1668, 1667, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, + /* 290 */ 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1733, 1357, 1797, + /* 300 */ 1801, 1357, 1357, 1357, 1652, 1357, 1357, 1357, 1357, 1357, + /* 310 */ 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, + /* 320 */ 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, + /* 330 */ 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, + /* 340 */ 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, + /* 350 */ 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, + /* 360 */ 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, + /* 370 */ 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, + /* 380 */ 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1391, 1357, 1357, + /* 390 */ 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, + /* 400 */ 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, + /* 410 */ 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, + /* 420 */ 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, + /* 430 */ 1357, 1357, 1357, 1357, 1357, 1454, 1453, 1357, 1357, 1357, + /* 440 */ 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, + /* 450 */ 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, + /* 460 */ 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1756, 1766, 1357, + /* 470 */ 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1652, + /* 480 */ 1357, 1783, 1357, 1742, 1738, 1357, 1357, 1734, 1357, 1357, + /* 490 */ 1795, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, + /* 500 */ 1728, 1357, 1701, 1357, 1357, 1357, 1357, 1357, 1357, 1357, + /* 510 */ 1357, 1663, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, + /* 520 */ 1357, 1357, 1357, 1357, 1651, 1357, 1692, 1357, 1357, 1357, + /* 530 */ 1357, 1357, 1357, 1357, 1357, 1517, 1357, 1357, 1357, 1357, + /* 540 */ 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1502, 1500, + /* 550 */ 1499, 1498, 1357, 1495, 1357, 1357, 1357, 1357, 1357, 1357, + /* 560 */ 1357, 1357, 1357, 1357, 1357, 1357, 1446, 1357, 1357, 1357, + /* 570 */ 1357, 1357, 1357, 1357, 1357, 1357, 1437, 1357, 1436, 1357, + /* 580 */ 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, + /* 590 */ 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, + /* 600 */ 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, + /* 610 */ 1357, 1357, }; /********** End of lemon-generated parsing tables *****************************/ @@ -975,7 +977,8 @@ static const YYCODETYPE yyFallback[] = { 0, /* INTERVAL => nothing */ 0, /* TOPIC => nothing */ 0, /* AS => nothing */ - 0, /* CGROUP => nothing */ + 0, /* CONSUMER => nothing */ + 0, /* GROUP => nothing */ 0, /* WITH => nothing */ 0, /* SCHEMA => nothing */ 0, /* DESC => nothing */ @@ -1052,7 +1055,6 @@ static const YYCODETYPE yyFallback[] = { 0, /* PREV => nothing */ 0, /* LINEAR => nothing */ 0, /* NEXT => nothing */ - 0, /* GROUP => nothing */ 0, /* HAVING => nothing */ 0, /* ORDER => nothing */ 0, /* SLIMIT => nothing */ @@ -1302,84 +1304,84 @@ static const char *const yyTokenName[] = { /* 144 */ "INTERVAL", /* 145 */ "TOPIC", /* 146 */ "AS", - /* 147 */ "CGROUP", - /* 148 */ "WITH", - /* 149 */ "SCHEMA", - /* 150 */ "DESC", - /* 151 */ "DESCRIBE", - /* 152 */ "RESET", - /* 153 */ "QUERY", - /* 154 */ "CACHE", - /* 155 */ "EXPLAIN", - /* 156 */ "ANALYZE", - /* 157 */ "VERBOSE", - /* 158 */ "NK_BOOL", - /* 159 */ "RATIO", - /* 160 */ "COMPACT", - /* 161 */ "VNODES", - /* 162 */ "IN", - /* 163 */ "OUTPUTTYPE", - /* 164 */ "AGGREGATE", - /* 165 */ "BUFSIZE", - /* 166 */ "STREAM", - /* 167 */ "INTO", - /* 168 */ "TRIGGER", - /* 169 */ "AT_ONCE", - /* 170 */ "WINDOW_CLOSE", - /* 171 */ "WATERMARK", - /* 172 */ "KILL", - /* 173 */ "CONNECTION", - /* 174 */ "TRANSACTION", - /* 175 */ "MERGE", - /* 176 */ "VGROUP", - /* 177 */ "REDISTRIBUTE", - /* 178 */ "SPLIT", - /* 179 */ "SYNCDB", - /* 180 */ "NULL", - /* 181 */ "NK_QUESTION", - /* 182 */ "NK_ARROW", - /* 183 */ "ROWTS", - /* 184 */ "TBNAME", - /* 185 */ "QSTARTTS", - /* 186 */ "QENDTS", - /* 187 */ "WSTARTTS", - /* 188 */ "WENDTS", - /* 189 */ "WDURATION", - /* 190 */ "CAST", - /* 191 */ "NOW", - /* 192 */ "TODAY", - /* 193 */ "TIMEZONE", - /* 194 */ "COUNT", - /* 195 */ "FIRST", - /* 196 */ "LAST", - /* 197 */ "LAST_ROW", - /* 198 */ "BETWEEN", - /* 199 */ "IS", - /* 200 */ "NK_LT", - /* 201 */ "NK_GT", - /* 202 */ "NK_LE", - /* 203 */ "NK_GE", - /* 204 */ "NK_NE", - /* 205 */ "MATCH", - /* 206 */ "NMATCH", - /* 207 */ "CONTAINS", - /* 208 */ "JOIN", - /* 209 */ "INNER", - /* 210 */ "SELECT", - /* 211 */ "DISTINCT", - /* 212 */ "WHERE", - /* 213 */ "PARTITION", - /* 214 */ "BY", - /* 215 */ "SESSION", - /* 216 */ "STATE_WINDOW", - /* 217 */ "SLIDING", - /* 218 */ "FILL", - /* 219 */ "VALUE", - /* 220 */ "NONE", - /* 221 */ "PREV", - /* 222 */ "LINEAR", - /* 223 */ "NEXT", - /* 224 */ "GROUP", + /* 147 */ "CONSUMER", + /* 148 */ "GROUP", + /* 149 */ "WITH", + /* 150 */ "SCHEMA", + /* 151 */ "DESC", + /* 152 */ "DESCRIBE", + /* 153 */ "RESET", + /* 154 */ "QUERY", + /* 155 */ "CACHE", + /* 156 */ "EXPLAIN", + /* 157 */ "ANALYZE", + /* 158 */ "VERBOSE", + /* 159 */ "NK_BOOL", + /* 160 */ "RATIO", + /* 161 */ "COMPACT", + /* 162 */ "VNODES", + /* 163 */ "IN", + /* 164 */ "OUTPUTTYPE", + /* 165 */ "AGGREGATE", + /* 166 */ "BUFSIZE", + /* 167 */ "STREAM", + /* 168 */ "INTO", + /* 169 */ "TRIGGER", + /* 170 */ "AT_ONCE", + /* 171 */ "WINDOW_CLOSE", + /* 172 */ "WATERMARK", + /* 173 */ "KILL", + /* 174 */ "CONNECTION", + /* 175 */ "TRANSACTION", + /* 176 */ "MERGE", + /* 177 */ "VGROUP", + /* 178 */ "REDISTRIBUTE", + /* 179 */ "SPLIT", + /* 180 */ "SYNCDB", + /* 181 */ "NULL", + /* 182 */ "NK_QUESTION", + /* 183 */ "NK_ARROW", + /* 184 */ "ROWTS", + /* 185 */ "TBNAME", + /* 186 */ "QSTARTTS", + /* 187 */ "QENDTS", + /* 188 */ "WSTARTTS", + /* 189 */ "WENDTS", + /* 190 */ "WDURATION", + /* 191 */ "CAST", + /* 192 */ "NOW", + /* 193 */ "TODAY", + /* 194 */ "TIMEZONE", + /* 195 */ "COUNT", + /* 196 */ "FIRST", + /* 197 */ "LAST", + /* 198 */ "LAST_ROW", + /* 199 */ "BETWEEN", + /* 200 */ "IS", + /* 201 */ "NK_LT", + /* 202 */ "NK_GT", + /* 203 */ "NK_LE", + /* 204 */ "NK_GE", + /* 205 */ "NK_NE", + /* 206 */ "MATCH", + /* 207 */ "NMATCH", + /* 208 */ "CONTAINS", + /* 209 */ "JOIN", + /* 210 */ "INNER", + /* 211 */ "SELECT", + /* 212 */ "DISTINCT", + /* 213 */ "WHERE", + /* 214 */ "PARTITION", + /* 215 */ "BY", + /* 216 */ "SESSION", + /* 217 */ "STATE_WINDOW", + /* 218 */ "SLIDING", + /* 219 */ "FILL", + /* 220 */ "VALUE", + /* 221 */ "NONE", + /* 222 */ "PREV", + /* 223 */ "LINEAR", + /* 224 */ "NEXT", /* 225 */ "HAVING", /* 226 */ "ORDER", /* 227 */ "SLIMIT", @@ -1750,7 +1752,7 @@ static const char *const yyRuleName[] = { /* 224 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name topic_options AS query_expression", /* 225 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name topic_options AS db_name", /* 226 */ "cmd ::= DROP TOPIC exists_opt topic_name", - /* 227 */ "cmd ::= DROP CGROUP exists_opt cgroup_name ON topic_name", + /* 227 */ "cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name", /* 228 */ "topic_options ::=", /* 229 */ "topic_options ::= topic_options WITH TABLE", /* 230 */ "topic_options ::= topic_options WITH SCHEMA", @@ -2798,7 +2800,7 @@ static const struct { { 240, -7 }, /* (224) cmd ::= CREATE TOPIC not_exists_opt topic_name topic_options AS query_expression */ { 240, -7 }, /* (225) cmd ::= CREATE TOPIC not_exists_opt topic_name topic_options AS db_name */ { 240, -4 }, /* (226) cmd ::= DROP TOPIC exists_opt topic_name */ - { 240, -6 }, /* (227) cmd ::= DROP CGROUP exists_opt cgroup_name ON topic_name */ + { 240, -7 }, /* (227) cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ { 298, 0 }, /* (228) topic_options ::= */ { 298, -3 }, /* (229) topic_options ::= topic_options WITH TABLE */ { 298, -3 }, /* (230) topic_options ::= topic_options WITH SCHEMA */ @@ -3827,7 +3829,7 @@ static YYACTIONTYPE yy_reduce( case 226: /* cmd ::= DROP TOPIC exists_opt topic_name */ { pCxt->pRootNode = createDropTopicStmt(pCxt, yymsp[-1].minor.yy603, &yymsp[0].minor.yy53); } break; - case 227: /* cmd ::= DROP CGROUP exists_opt cgroup_name ON topic_name */ + case 227: /* cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ { pCxt->pRootNode = createDropCGroupStmt(pCxt, yymsp[-3].minor.yy603, &yymsp[-2].minor.yy53, &yymsp[0].minor.yy53); } break; case 228: /* topic_options ::= */ diff --git a/source/libs/parser/test/parInitialDTest.cpp b/source/libs/parser/test/parInitialDTest.cpp index 57d349e7ee..5ad427d964 100644 --- a/source/libs/parser/test/parInitialDTest.cpp +++ b/source/libs/parser/test/parInitialDTest.cpp @@ -32,7 +32,7 @@ TEST_F(ParserInitialDTest, dropBnode) { run("DROP BNODE ON DNODE 1"); } -// DROP CGROUP [ IF EXISTS ] cgroup_name ON topic_name +// DROP CONSUMER GROUP [ IF EXISTS ] cgroup_name ON topic_name TEST_F(ParserInitialDTest, dropCGroup) { useDb("root", "test"); @@ -56,10 +56,10 @@ TEST_F(ParserInitialDTest, dropCGroup) { }); setDropCgroupReqFunc("tp1", "cg1"); - run("DROP CGROUP cg1 ON tp1"); + run("DROP CONSUMER GROUP cg1 ON tp1"); setDropCgroupReqFunc("tp1", "cg1", 1); - run("DROP CGROUP IF EXISTS cg1 ON tp1"); + run("DROP CONSUMER GROUP IF EXISTS cg1 ON tp1"); } // todo drop database diff --git a/source/libs/parser/test/parSelectTest.cpp b/source/libs/parser/test/parSelectTest.cpp index a675bb936f..a5192595f0 100644 --- a/source/libs/parser/test/parSelectTest.cpp +++ b/source/libs/parser/test/parSelectTest.cpp @@ -252,6 +252,8 @@ TEST_F(ParserSelectTest, semanticError) { // TSDB_CODE_PAR_AMBIGUOUS_COLUMN run("SELECT c2 FROM t1 tt1, t1 tt2 WHERE tt1.c1 = tt2.c1", TSDB_CODE_PAR_AMBIGUOUS_COLUMN, PARSER_STAGE_TRANSLATE); + run("SELECT c2 FROM (SELECT c1 c2, c2 FROM t1)", TSDB_CODE_PAR_AMBIGUOUS_COLUMN, PARSER_STAGE_TRANSLATE); + // TSDB_CODE_PAR_WRONG_VALUE_TYPE run("SELECT timestamp '2010a' FROM t1", TSDB_CODE_PAR_WRONG_VALUE_TYPE, PARSER_STAGE_TRANSLATE); diff --git a/source/libs/planner/src/planLogicCreater.c b/source/libs/planner/src/planLogicCreater.c index 467b26b7c4..2df248e53f 100644 --- a/source/libs/planner/src/planLogicCreater.c +++ b/source/libs/planner/src/planLogicCreater.c @@ -124,6 +124,7 @@ static int32_t createChildLogicNode(SLogicPlanContext* pCxt, SSelectStmt* pSelec SLogicNode* pNode = NULL; int32_t code = func(pCxt, pSelect, &pNode); if (TSDB_CODE_SUCCESS == code && NULL != pNode) { + pNode->precision = pSelect->precision; code = pushLogicNode(pCxt, pRoot, pNode); } if (TSDB_CODE_SUCCESS != code) { @@ -400,6 +401,7 @@ static int32_t createLogicNodeByTable(SLogicPlanContext* pCxt, SSelectStmt* pSel nodesDestroyNode(pNode); return TSDB_CODE_OUT_OF_MEMORY; } + pNode->precision = pSelect->precision; *pLogicNode = pNode; } return code; From 9a6776c321eeb68f4c6f9ee9359e337bfa9d2672 Mon Sep 17 00:00:00 2001 From: Xiaoyu Wang Date: Tue, 31 May 2022 15:11:26 +0800 Subject: [PATCH 26/56] fix: error in data precision of super table query --- include/libs/nodes/cmdnodes.h | 1 - include/util/tdef.h | 3 --- source/libs/parser/inc/parAst.h | 1 - source/libs/parser/inc/sql.y | 1 - source/libs/parser/src/parAstCreater.c | 5 ----- source/libs/parser/src/parTranslater.c | 6 +----- 6 files changed, 1 insertion(+), 16 deletions(-) diff --git a/include/libs/nodes/cmdnodes.h b/include/libs/nodes/cmdnodes.h index 7bd3a40c71..0bd6d73ce1 100644 --- a/include/libs/nodes/cmdnodes.h +++ b/include/libs/nodes/cmdnodes.h @@ -80,7 +80,6 @@ typedef struct SAlterDatabaseStmt { typedef struct STableOptions { ENodeType type; char comment[TSDB_TB_COMMENT_LEN]; - int32_t delay; float filesFactor; SNodeList* pRollupFuncs; int32_t ttl; diff --git a/include/util/tdef.h b/include/util/tdef.h index 7c1f46ce69..1e1770d1b9 100644 --- a/include/util/tdef.h +++ b/include/util/tdef.h @@ -344,9 +344,6 @@ typedef enum ELogicConditionType { #define TSDB_MIN_ROLLUP_FILE_FACTOR 0 #define TSDB_MAX_ROLLUP_FILE_FACTOR 1 #define TSDB_DEFAULT_ROLLUP_FILE_FACTOR 0.1 -#define TSDB_MIN_ROLLUP_DELAY 1 -#define TSDB_MAX_ROLLUP_DELAY 10 -#define TSDB_DEFAULT_ROLLUP_DELAY 2 #define TSDB_MIN_TABLE_TTL 0 #define TSDB_DEFAULT_TABLE_TTL 0 diff --git a/source/libs/parser/inc/parAst.h b/source/libs/parser/inc/parAst.h index a1c304118b..9c9aa5ccb9 100644 --- a/source/libs/parser/inc/parAst.h +++ b/source/libs/parser/inc/parAst.h @@ -59,7 +59,6 @@ typedef enum EDatabaseOptionType { typedef enum ETableOptionType { TABLE_OPTION_COMMENT = 1, - TABLE_OPTION_DELAY, TABLE_OPTION_FILE_FACTOR, TABLE_OPTION_ROLLUP, TABLE_OPTION_TTL, diff --git a/source/libs/parser/inc/sql.y b/source/libs/parser/inc/sql.y index f45f10f3b9..ec5a9c26d4 100644 --- a/source/libs/parser/inc/sql.y +++ b/source/libs/parser/inc/sql.y @@ -313,7 +313,6 @@ tags_def(A) ::= TAGS NK_LP column_def_list(B) NK_RP. table_options(A) ::= . { A = createDefaultTableOptions(pCxt); } table_options(A) ::= table_options(B) COMMENT NK_STRING(C). { A = setTableOption(pCxt, B, TABLE_OPTION_COMMENT, &C); } -table_options(A) ::= table_options(B) DELAY NK_INTEGER(C). { A = setTableOption(pCxt, B, TABLE_OPTION_DELAY, &C); } table_options(A) ::= table_options(B) FILE_FACTOR NK_FLOAT(C). { A = setTableOption(pCxt, B, TABLE_OPTION_FILE_FACTOR, &C); } table_options(A) ::= table_options(B) ROLLUP NK_LP func_name_list(C) NK_RP. { A = setTableOption(pCxt, B, TABLE_OPTION_ROLLUP, C); } table_options(A) ::= table_options(B) TTL NK_INTEGER(C). { A = setTableOption(pCxt, B, TABLE_OPTION_TTL, &C); } diff --git a/source/libs/parser/src/parAstCreater.c b/source/libs/parser/src/parAstCreater.c index 836a0cb520..4380e28727 100644 --- a/source/libs/parser/src/parAstCreater.c +++ b/source/libs/parser/src/parAstCreater.c @@ -857,7 +857,6 @@ SNode* createDefaultTableOptions(SAstCreateContext* pCxt) { CHECK_PARSER_STATUS(pCxt); STableOptions* pOptions = nodesMakeNode(QUERY_NODE_TABLE_OPTIONS); CHECK_OUT_OF_MEM(pOptions); - pOptions->delay = TSDB_DEFAULT_ROLLUP_DELAY; pOptions->filesFactor = TSDB_DEFAULT_ROLLUP_FILE_FACTOR; pOptions->ttl = TSDB_DEFAULT_TABLE_TTL; return (SNode*)pOptions; @@ -867,7 +866,6 @@ SNode* createAlterTableOptions(SAstCreateContext* pCxt) { CHECK_PARSER_STATUS(pCxt); STableOptions* pOptions = nodesMakeNode(QUERY_NODE_TABLE_OPTIONS); CHECK_OUT_OF_MEM(pOptions); - pOptions->delay = -1; pOptions->filesFactor = -1; pOptions->ttl = -1; return (SNode*)pOptions; @@ -882,9 +880,6 @@ SNode* setTableOption(SAstCreateContext* pCxt, SNode* pOptions, ETableOptionType sizeof(((STableOptions*)pOptions)->comment)); } break; - case TABLE_OPTION_DELAY: - ((STableOptions*)pOptions)->delay = taosStr2Int32(((SToken*)pVal)->z, NULL, 10); - break; case TABLE_OPTION_FILE_FACTOR: ((STableOptions*)pOptions)->filesFactor = taosStr2Float(((SToken*)pVal)->z, NULL); break; diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c index 1fded1e4d5..0dda71023f 100644 --- a/source/libs/parser/src/parTranslater.c +++ b/source/libs/parser/src/parTranslater.c @@ -2633,10 +2633,7 @@ static int32_t checkTableSchema(STranslateContext* pCxt, SCreateTableStmt* pStmt } static int32_t checkCreateTable(STranslateContext* pCxt, SCreateTableStmt* pStmt) { - int32_t code = checkRangeOption(pCxt, "delay", pStmt->pOptions->delay, TSDB_MIN_ROLLUP_DELAY, TSDB_MAX_ROLLUP_DELAY); - if (TSDB_CODE_SUCCESS == code) { - code = checTableFactorOption(pCxt, pStmt->pOptions->filesFactor); - } + int32_t code = checTableFactorOption(pCxt, pStmt->pOptions->filesFactor); if (TSDB_CODE_SUCCESS == code) { code = checkTableRollupOption(pCxt, pStmt->pOptions->pRollupFuncs); } @@ -2877,7 +2874,6 @@ static int32_t buildRollupAst(STranslateContext* pCxt, SCreateTableStmt* pStmt, static int32_t buildCreateStbReq(STranslateContext* pCxt, SCreateTableStmt* pStmt, SMCreateStbReq* pReq) { pReq->igExists = pStmt->ignoreExists; pReq->xFilesFactor = pStmt->pOptions->filesFactor; - pReq->delay = pStmt->pOptions->delay; pReq->ttl = pStmt->pOptions->ttl; columnDefNodeToField(pStmt->pCols, &pReq->pColumns); columnDefNodeToField(pStmt->pTags, &pReq->pTags); From 44b00ed346c4c8d2e687ca04046d9a58ff0ee3db Mon Sep 17 00:00:00 2001 From: Xiaoyu Wang Date: Tue, 31 May 2022 15:12:31 +0800 Subject: [PATCH 27/56] fix: error in data precision of super table query --- include/common/ttokendef.h | 255 +- source/libs/parser/src/parTokenizer.c | 1 - source/libs/parser/src/sql.c | 4970 +++++++++++++------------ 3 files changed, 2616 insertions(+), 2610 deletions(-) diff --git a/include/common/ttokendef.h b/include/common/ttokendef.h index 0e54f07991..a7a534533e 100644 --- a/include/common/ttokendef.h +++ b/include/common/ttokendef.h @@ -127,134 +127,133 @@ #define TK_BLOB 109 #define TK_VARBINARY 110 #define TK_DECIMAL 111 -#define TK_DELAY 112 -#define TK_FILE_FACTOR 113 -#define TK_NK_FLOAT 114 -#define TK_ROLLUP 115 -#define TK_TTL 116 -#define TK_SMA 117 -#define TK_SHOW 118 -#define TK_DATABASES 119 -#define TK_TABLES 120 -#define TK_STABLES 121 -#define TK_MNODES 122 -#define TK_MODULES 123 -#define TK_QNODES 124 -#define TK_FUNCTIONS 125 -#define TK_INDEXES 126 -#define TK_ACCOUNTS 127 -#define TK_APPS 128 -#define TK_CONNECTIONS 129 -#define TK_LICENCE 130 -#define TK_GRANTS 131 -#define TK_QUERIES 132 -#define TK_SCORES 133 -#define TK_TOPICS 134 -#define TK_VARIABLES 135 -#define TK_BNODES 136 -#define TK_SNODES 137 -#define TK_CLUSTER 138 -#define TK_TRANSACTIONS 139 -#define TK_LIKE 140 -#define TK_INDEX 141 -#define TK_FULLTEXT 142 -#define TK_FUNCTION 143 -#define TK_INTERVAL 144 -#define TK_TOPIC 145 -#define TK_AS 146 -#define TK_CONSUMER 147 -#define TK_GROUP 148 -#define TK_WITH 149 -#define TK_SCHEMA 150 -#define TK_DESC 151 -#define TK_DESCRIBE 152 -#define TK_RESET 153 -#define TK_QUERY 154 -#define TK_CACHE 155 -#define TK_EXPLAIN 156 -#define TK_ANALYZE 157 -#define TK_VERBOSE 158 -#define TK_NK_BOOL 159 -#define TK_RATIO 160 -#define TK_COMPACT 161 -#define TK_VNODES 162 -#define TK_IN 163 -#define TK_OUTPUTTYPE 164 -#define TK_AGGREGATE 165 -#define TK_BUFSIZE 166 -#define TK_STREAM 167 -#define TK_INTO 168 -#define TK_TRIGGER 169 -#define TK_AT_ONCE 170 -#define TK_WINDOW_CLOSE 171 -#define TK_WATERMARK 172 -#define TK_KILL 173 -#define TK_CONNECTION 174 -#define TK_TRANSACTION 175 -#define TK_MERGE 176 -#define TK_VGROUP 177 -#define TK_REDISTRIBUTE 178 -#define TK_SPLIT 179 -#define TK_SYNCDB 180 -#define TK_NULL 181 -#define TK_NK_QUESTION 182 -#define TK_NK_ARROW 183 -#define TK_ROWTS 184 -#define TK_TBNAME 185 -#define TK_QSTARTTS 186 -#define TK_QENDTS 187 -#define TK_WSTARTTS 188 -#define TK_WENDTS 189 -#define TK_WDURATION 190 -#define TK_CAST 191 -#define TK_NOW 192 -#define TK_TODAY 193 -#define TK_TIMEZONE 194 -#define TK_COUNT 195 -#define TK_FIRST 196 -#define TK_LAST 197 -#define TK_LAST_ROW 198 -#define TK_BETWEEN 199 -#define TK_IS 200 -#define TK_NK_LT 201 -#define TK_NK_GT 202 -#define TK_NK_LE 203 -#define TK_NK_GE 204 -#define TK_NK_NE 205 -#define TK_MATCH 206 -#define TK_NMATCH 207 -#define TK_CONTAINS 208 -#define TK_JOIN 209 -#define TK_INNER 210 -#define TK_SELECT 211 -#define TK_DISTINCT 212 -#define TK_WHERE 213 -#define TK_PARTITION 214 -#define TK_BY 215 -#define TK_SESSION 216 -#define TK_STATE_WINDOW 217 -#define TK_SLIDING 218 -#define TK_FILL 219 -#define TK_VALUE 220 -#define TK_NONE 221 -#define TK_PREV 222 -#define TK_LINEAR 223 -#define TK_NEXT 224 -#define TK_HAVING 225 -#define TK_ORDER 226 -#define TK_SLIMIT 227 -#define TK_SOFFSET 228 -#define TK_LIMIT 229 -#define TK_OFFSET 230 -#define TK_ASC 231 -#define TK_NULLS 232 -#define TK_ID 233 -#define TK_NK_BITNOT 234 -#define TK_INSERT 235 -#define TK_VALUES 236 -#define TK_IMPORT 237 -#define TK_NK_SEMI 238 -#define TK_FILE 239 +#define TK_FILE_FACTOR 112 +#define TK_NK_FLOAT 113 +#define TK_ROLLUP 114 +#define TK_TTL 115 +#define TK_SMA 116 +#define TK_SHOW 117 +#define TK_DATABASES 118 +#define TK_TABLES 119 +#define TK_STABLES 120 +#define TK_MNODES 121 +#define TK_MODULES 122 +#define TK_QNODES 123 +#define TK_FUNCTIONS 124 +#define TK_INDEXES 125 +#define TK_ACCOUNTS 126 +#define TK_APPS 127 +#define TK_CONNECTIONS 128 +#define TK_LICENCE 129 +#define TK_GRANTS 130 +#define TK_QUERIES 131 +#define TK_SCORES 132 +#define TK_TOPICS 133 +#define TK_VARIABLES 134 +#define TK_BNODES 135 +#define TK_SNODES 136 +#define TK_CLUSTER 137 +#define TK_TRANSACTIONS 138 +#define TK_LIKE 139 +#define TK_INDEX 140 +#define TK_FULLTEXT 141 +#define TK_FUNCTION 142 +#define TK_INTERVAL 143 +#define TK_TOPIC 144 +#define TK_AS 145 +#define TK_CONSUMER 146 +#define TK_GROUP 147 +#define TK_WITH 148 +#define TK_SCHEMA 149 +#define TK_DESC 150 +#define TK_DESCRIBE 151 +#define TK_RESET 152 +#define TK_QUERY 153 +#define TK_CACHE 154 +#define TK_EXPLAIN 155 +#define TK_ANALYZE 156 +#define TK_VERBOSE 157 +#define TK_NK_BOOL 158 +#define TK_RATIO 159 +#define TK_COMPACT 160 +#define TK_VNODES 161 +#define TK_IN 162 +#define TK_OUTPUTTYPE 163 +#define TK_AGGREGATE 164 +#define TK_BUFSIZE 165 +#define TK_STREAM 166 +#define TK_INTO 167 +#define TK_TRIGGER 168 +#define TK_AT_ONCE 169 +#define TK_WINDOW_CLOSE 170 +#define TK_WATERMARK 171 +#define TK_KILL 172 +#define TK_CONNECTION 173 +#define TK_TRANSACTION 174 +#define TK_MERGE 175 +#define TK_VGROUP 176 +#define TK_REDISTRIBUTE 177 +#define TK_SPLIT 178 +#define TK_SYNCDB 179 +#define TK_NULL 180 +#define TK_NK_QUESTION 181 +#define TK_NK_ARROW 182 +#define TK_ROWTS 183 +#define TK_TBNAME 184 +#define TK_QSTARTTS 185 +#define TK_QENDTS 186 +#define TK_WSTARTTS 187 +#define TK_WENDTS 188 +#define TK_WDURATION 189 +#define TK_CAST 190 +#define TK_NOW 191 +#define TK_TODAY 192 +#define TK_TIMEZONE 193 +#define TK_COUNT 194 +#define TK_FIRST 195 +#define TK_LAST 196 +#define TK_LAST_ROW 197 +#define TK_BETWEEN 198 +#define TK_IS 199 +#define TK_NK_LT 200 +#define TK_NK_GT 201 +#define TK_NK_LE 202 +#define TK_NK_GE 203 +#define TK_NK_NE 204 +#define TK_MATCH 205 +#define TK_NMATCH 206 +#define TK_CONTAINS 207 +#define TK_JOIN 208 +#define TK_INNER 209 +#define TK_SELECT 210 +#define TK_DISTINCT 211 +#define TK_WHERE 212 +#define TK_PARTITION 213 +#define TK_BY 214 +#define TK_SESSION 215 +#define TK_STATE_WINDOW 216 +#define TK_SLIDING 217 +#define TK_FILL 218 +#define TK_VALUE 219 +#define TK_NONE 220 +#define TK_PREV 221 +#define TK_LINEAR 222 +#define TK_NEXT 223 +#define TK_HAVING 224 +#define TK_ORDER 225 +#define TK_SLIMIT 226 +#define TK_SOFFSET 227 +#define TK_LIMIT 228 +#define TK_OFFSET 229 +#define TK_ASC 230 +#define TK_NULLS 231 +#define TK_ID 232 +#define TK_NK_BITNOT 233 +#define TK_INSERT 234 +#define TK_VALUES 235 +#define TK_IMPORT 236 +#define TK_NK_SEMI 237 +#define TK_FILE 238 #define TK_NK_SPACE 300 #define TK_NK_COMMENT 301 diff --git a/source/libs/parser/src/parTokenizer.c b/source/libs/parser/src/parTokenizer.c index 47edd3e5a8..5f478532b9 100644 --- a/source/libs/parser/src/parTokenizer.c +++ b/source/libs/parser/src/parTokenizer.c @@ -68,7 +68,6 @@ static SKeyword keywordTable[] = { {"DATABASES", TK_DATABASES}, {"DAYS", TK_DAYS}, {"DBS", TK_DBS}, - {"DELAY", TK_DELAY}, {"DESC", TK_DESC}, {"DESCRIBE", TK_DESCRIBE}, {"DISTINCT", TK_DISTINCT}, diff --git a/source/libs/parser/src/sql.c b/source/libs/parser/src/sql.c index 6fb8faf391..775702a5c6 100644 --- a/source/libs/parser/src/sql.c +++ b/source/libs/parser/src/sql.c @@ -100,25 +100,25 @@ #endif /************* Begin control #defines *****************************************/ #define YYCODETYPE unsigned short int -#define YYNOCODE 361 +#define YYNOCODE 360 #define YYACTIONTYPE unsigned short int #define ParseTOKENTYPE SToken typedef union { int yyinit; ParseTOKENTYPE yy0; - EFillMode yy18; - SAlterOption yy25; - SToken yy53; - EOperatorType yy136; - int32_t yy158; - ENullOrder yy185; - SNodeList* yy236; - EJoinType yy342; - EOrder yy430; - int64_t yy435; - SDataType yy450; - bool yy603; - SNode* yy636; + EFillMode yy54; + int32_t yy100; + bool yy137; + int64_t yy189; + SToken yy209; + ENullOrder yy217; + SDataType yy304; + EOperatorType yy380; + SNodeList* yy424; + EOrder yy578; + SAlterOption yy605; + EJoinType yy612; + SNode* yy632; } YYMINORTYPE; #ifndef YYSTACKDEPTH #define YYSTACKDEPTH 100 @@ -134,17 +134,17 @@ typedef union { #define ParseCTX_FETCH #define ParseCTX_STORE #define YYFALLBACK 1 -#define YYNSTATE 612 -#define YYNRULE 455 -#define YYNTOKEN 240 -#define YY_MAX_SHIFT 611 -#define YY_MIN_SHIFTREDUCE 902 -#define YY_MAX_SHIFTREDUCE 1356 -#define YY_ERROR_ACTION 1357 -#define YY_ACCEPT_ACTION 1358 -#define YY_NO_ACTION 1359 -#define YY_MIN_REDUCE 1360 -#define YY_MAX_REDUCE 1814 +#define YYNSTATE 611 +#define YYNRULE 454 +#define YYNTOKEN 239 +#define YY_MAX_SHIFT 610 +#define YY_MIN_SHIFTREDUCE 900 +#define YY_MAX_SHIFTREDUCE 1353 +#define YY_ERROR_ACTION 1354 +#define YY_ACCEPT_ACTION 1355 +#define YY_NO_ACTION 1356 +#define YY_MIN_REDUCE 1357 +#define YY_MAX_REDUCE 1810 /************* End control #defines *******************************************/ #define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0]))) @@ -211,606 +211,622 @@ typedef union { ** yy_default[] Default action for each state. ** *********** Begin parsing tables **********************************************/ -#define YY_ACTTAB_COUNT (2136) +#define YY_ACTTAB_COUNT (2213) static const YYACTIONTYPE yy_action[] = { - /* 0 */ 460, 1648, 1536, 1648, 295, 386, 312, 387, 1392, 294, - /* 10 */ 28, 226, 35, 33, 1534, 24, 1383, 1661, 932, 1480, - /* 20 */ 304, 1645, 1170, 1645, 140, 36, 34, 32, 31, 30, - /* 30 */ 36, 34, 32, 31, 30, 1482, 1530, 1641, 1647, 1641, - /* 40 */ 1647, 394, 1469, 387, 1392, 1677, 524, 1168, 528, 130, - /* 50 */ 528, 1372, 1792, 509, 485, 1645, 936, 937, 14, 524, - /* 60 */ 35, 33, 1297, 508, 1176, 1791, 1631, 1631, 304, 1789, - /* 70 */ 1170, 1641, 1647, 489, 36, 34, 32, 31, 30, 604, - /* 80 */ 603, 1, 528, 112, 1690, 1131, 525, 80, 1662, 511, - /* 90 */ 1664, 1665, 507, 1133, 528, 1168, 1661, 1730, 104, 404, - /* 100 */ 1311, 276, 1726, 608, 1744, 425, 14, 39, 35, 33, - /* 110 */ 1792, 1649, 1176, 1792, 1169, 1491, 304, 1744, 1170, 512, - /* 120 */ 277, 110, 307, 146, 1677, 1581, 147, 1789, 1741, 2, - /* 130 */ 1789, 1645, 506, 1304, 376, 487, 142, 1737, 1738, 1194, - /* 140 */ 1742, 1740, 508, 1168, 1208, 55, 1631, 1641, 1647, 525, - /* 150 */ 56, 608, 1259, 131, 14, 1132, 1677, 1448, 528, 1171, - /* 160 */ 1176, 350, 1169, 1690, 478, 404, 270, 1662, 511, 1664, - /* 170 */ 1665, 507, 505, 528, 502, 1702, 1382, 2, 1491, 158, - /* 180 */ 157, 1174, 1175, 1194, 1221, 1222, 1224, 1225, 1226, 1227, - /* 190 */ 1228, 504, 526, 1236, 1237, 1238, 1239, 1240, 1241, 608, - /* 200 */ 477, 62, 1260, 154, 64, 292, 1296, 1171, 191, 94, - /* 210 */ 1169, 148, 93, 92, 91, 90, 89, 88, 87, 86, - /* 220 */ 85, 1381, 345, 1487, 344, 1265, 1631, 55, 60, 1174, - /* 230 */ 1175, 59, 1221, 1222, 1224, 1225, 1226, 1227, 1228, 504, - /* 240 */ 526, 1236, 1237, 1238, 1239, 1240, 1241, 1419, 286, 479, - /* 250 */ 36, 34, 32, 31, 30, 1171, 36, 34, 32, 31, - /* 260 */ 30, 27, 302, 1254, 1255, 1256, 1257, 1258, 1262, 1263, - /* 270 */ 1264, 1631, 55, 1358, 1744, 148, 385, 1174, 1175, 389, - /* 280 */ 1221, 1222, 1224, 1225, 1226, 1227, 1228, 504, 526, 1236, - /* 290 */ 1237, 1238, 1239, 1240, 1241, 35, 33, 287, 1739, 285, - /* 300 */ 284, 524, 427, 304, 1223, 1170, 429, 584, 583, 582, - /* 310 */ 319, 1467, 581, 580, 579, 114, 574, 573, 572, 571, - /* 320 */ 570, 569, 568, 567, 121, 563, 439, 438, 62, 428, - /* 330 */ 1168, 437, 320, 1661, 109, 434, 560, 346, 433, 432, - /* 340 */ 431, 108, 525, 35, 33, 1242, 391, 1176, 1192, 948, - /* 350 */ 1486, 304, 1192, 1170, 351, 559, 558, 148, 557, 556, - /* 360 */ 555, 1677, 38, 1792, 8, 308, 1380, 474, 562, 488, - /* 370 */ 1261, 1491, 1792, 128, 423, 453, 1790, 1792, 1168, 508, - /* 380 */ 1789, 1321, 1493, 1631, 127, 145, 608, 436, 435, 1789, - /* 390 */ 145, 35, 33, 1266, 1789, 1176, 949, 1169, 948, 304, - /* 400 */ 1690, 1170, 148, 81, 1662, 511, 1664, 1665, 507, 55, - /* 410 */ 528, 1379, 9, 1730, 1295, 1792, 1631, 297, 1726, 141, - /* 420 */ 471, 1319, 1320, 1322, 1323, 950, 1168, 1361, 145, 25, - /* 430 */ 512, 218, 1789, 314, 608, 1422, 1582, 467, 1757, 480, - /* 440 */ 475, 128, 1171, 1176, 1409, 1169, 393, 1378, 94, 389, - /* 450 */ 1493, 93, 92, 91, 90, 89, 88, 87, 86, 85, - /* 460 */ 9, 1631, 578, 576, 1174, 1175, 440, 1221, 1222, 1224, - /* 470 */ 1225, 1226, 1227, 1228, 504, 526, 1236, 1237, 1238, 1239, - /* 480 */ 1240, 1241, 608, 36, 34, 32, 31, 30, 1468, 70, - /* 490 */ 1171, 1569, 148, 1169, 148, 439, 438, 1631, 156, 1536, - /* 500 */ 437, 7, 525, 109, 434, 1195, 309, 433, 432, 431, - /* 510 */ 1484, 1534, 1174, 1175, 361, 1221, 1222, 1224, 1225, 1226, - /* 520 */ 1227, 1228, 504, 526, 1236, 1237, 1238, 1239, 1240, 1241, - /* 530 */ 493, 1491, 36, 34, 32, 31, 30, 1196, 1171, 148, - /* 540 */ 1039, 551, 550, 549, 1043, 548, 1045, 1046, 547, 1048, - /* 550 */ 544, 316, 1054, 541, 1056, 1057, 538, 535, 1572, 1574, - /* 560 */ 1174, 1175, 1377, 1221, 1222, 1224, 1225, 1226, 1227, 1228, - /* 570 */ 504, 526, 1236, 1237, 1238, 1239, 1240, 1241, 35, 33, - /* 580 */ 273, 560, 1192, 26, 11, 10, 304, 1661, 1170, 369, - /* 590 */ 54, 1001, 381, 36, 34, 32, 31, 30, 1573, 1574, - /* 600 */ 559, 558, 1208, 557, 556, 555, 177, 525, 1003, 1536, - /* 610 */ 382, 1247, 1631, 1168, 1360, 1677, 315, 1194, 139, 362, - /* 620 */ 525, 1534, 1353, 509, 421, 417, 413, 409, 176, 1376, - /* 630 */ 1176, 337, 403, 508, 936, 937, 1491, 1631, 103, 102, - /* 640 */ 101, 100, 99, 98, 97, 96, 95, 2, 485, 1491, - /* 650 */ 1193, 339, 335, 63, 1690, 77, 174, 81, 1662, 511, - /* 660 */ 1664, 1665, 507, 217, 528, 1273, 128, 1730, 113, 608, - /* 670 */ 352, 297, 1726, 1805, 1292, 1494, 1483, 112, 461, 1631, - /* 680 */ 1169, 380, 1764, 1375, 375, 374, 373, 372, 371, 368, - /* 690 */ 367, 366, 365, 364, 360, 359, 358, 357, 356, 355, - /* 700 */ 354, 353, 1352, 249, 274, 129, 1521, 525, 554, 525, - /* 710 */ 255, 32, 31, 30, 173, 110, 165, 494, 170, 1488, - /* 720 */ 399, 104, 253, 53, 562, 1171, 52, 462, 430, 565, - /* 730 */ 143, 1737, 1738, 1631, 1742, 1197, 1491, 1661, 1491, 182, - /* 740 */ 163, 1466, 180, 159, 1374, 496, 1371, 1174, 1175, 1194, - /* 750 */ 1221, 1222, 1224, 1225, 1226, 1227, 1228, 504, 526, 1236, - /* 760 */ 1237, 1238, 1239, 1240, 1241, 1677, 1370, 1792, 55, 525, - /* 770 */ 566, 317, 1463, 509, 36, 34, 32, 31, 30, 128, - /* 780 */ 145, 1611, 1223, 508, 1789, 1749, 1292, 1631, 1493, 525, - /* 790 */ 525, 1369, 1620, 489, 1631, 485, 1631, 1368, 1491, 1476, - /* 800 */ 429, 522, 523, 525, 1690, 79, 485, 80, 1662, 511, - /* 810 */ 1664, 1665, 507, 491, 528, 239, 1631, 1730, 1491, 1491, - /* 820 */ 277, 276, 1726, 428, 112, 1367, 1155, 1156, 184, 1404, - /* 830 */ 525, 183, 1491, 1792, 560, 112, 1661, 327, 58, 57, - /* 840 */ 349, 1631, 318, 153, 489, 1170, 145, 1631, 343, 1366, - /* 850 */ 1789, 442, 1259, 559, 558, 1365, 557, 556, 555, 1491, - /* 860 */ 272, 202, 110, 333, 1677, 329, 325, 150, 1364, 1363, - /* 870 */ 1168, 501, 488, 110, 577, 1631, 1478, 215, 1737, 484, - /* 880 */ 186, 483, 508, 185, 1792, 76, 1631, 1176, 144, 1737, - /* 890 */ 1738, 47, 1742, 188, 275, 72, 187, 147, 148, 1631, - /* 900 */ 1536, 1789, 1260, 1690, 1661, 1631, 81, 1662, 511, 1664, - /* 910 */ 1665, 507, 1535, 528, 1223, 340, 1730, 1402, 1631, 1631, - /* 920 */ 297, 1726, 141, 451, 485, 1265, 608, 11, 10, 1355, - /* 930 */ 1356, 118, 1677, 1373, 497, 1179, 449, 1169, 1474, 445, - /* 940 */ 509, 1758, 46, 1651, 205, 1178, 1449, 194, 503, 553, - /* 950 */ 508, 37, 37, 112, 1631, 37, 228, 116, 221, 117, - /* 960 */ 118, 27, 302, 1254, 1255, 1256, 1257, 1258, 1262, 1263, - /* 970 */ 1264, 1690, 463, 489, 81, 1662, 511, 1664, 1665, 507, - /* 980 */ 1653, 528, 1171, 1318, 1730, 207, 46, 1661, 297, 1726, - /* 990 */ 1805, 110, 1267, 1229, 1251, 533, 1125, 230, 517, 1787, - /* 1000 */ 236, 1032, 1182, 117, 1174, 1175, 215, 1737, 484, 118, - /* 1010 */ 483, 119, 1181, 1792, 973, 1677, 454, 212, 472, 1661, - /* 1020 */ 1678, 1393, 117, 509, 422, 1760, 145, 248, 1531, 486, - /* 1030 */ 1789, 974, 220, 508, 223, 225, 1060, 1631, 3, 1192, - /* 1040 */ 322, 326, 282, 283, 1064, 1001, 1139, 1677, 244, 1661, - /* 1050 */ 1071, 363, 1069, 1571, 1690, 509, 155, 81, 1662, 511, - /* 1060 */ 1664, 1665, 507, 120, 528, 508, 370, 1730, 378, 1631, - /* 1070 */ 377, 297, 1726, 1805, 379, 489, 383, 1677, 1198, 384, - /* 1080 */ 392, 1201, 1748, 395, 1200, 509, 1690, 162, 396, 262, - /* 1090 */ 1662, 511, 1664, 1665, 507, 508, 528, 164, 1202, 1631, - /* 1100 */ 398, 167, 397, 169, 400, 489, 401, 1661, 1199, 402, - /* 1110 */ 444, 172, 61, 405, 175, 1792, 1690, 424, 426, 262, - /* 1120 */ 1662, 511, 1664, 1665, 507, 452, 528, 84, 147, 1481, - /* 1130 */ 291, 179, 1789, 1477, 1176, 1677, 181, 122, 123, 190, - /* 1140 */ 1479, 1475, 124, 509, 125, 1792, 1615, 1661, 245, 192, - /* 1150 */ 455, 447, 246, 508, 456, 464, 441, 1631, 145, 195, - /* 1160 */ 197, 189, 1789, 459, 1197, 465, 1661, 473, 515, 1771, - /* 1170 */ 1770, 6, 470, 200, 1690, 1677, 203, 82, 1662, 511, - /* 1180 */ 1664, 1665, 507, 509, 528, 206, 51, 1730, 296, 50, - /* 1190 */ 1761, 1729, 1726, 508, 1677, 1751, 482, 1631, 1661, 211, - /* 1200 */ 469, 476, 509, 5, 135, 1292, 111, 1196, 1745, 40, - /* 1210 */ 213, 214, 508, 18, 1690, 495, 1631, 82, 1662, 511, - /* 1220 */ 1664, 1665, 507, 498, 528, 298, 1677, 1730, 1580, 513, - /* 1230 */ 514, 500, 1726, 1690, 509, 1788, 132, 1662, 511, 1664, - /* 1240 */ 1665, 507, 306, 528, 508, 1579, 219, 1808, 1631, 492, - /* 1250 */ 1711, 518, 519, 611, 222, 232, 520, 234, 247, 69, - /* 1260 */ 499, 1492, 71, 1661, 531, 1690, 224, 243, 82, 1662, - /* 1270 */ 511, 1664, 1665, 507, 1464, 528, 250, 241, 1730, 105, - /* 1280 */ 490, 1806, 607, 1727, 134, 600, 596, 592, 588, 242, - /* 1290 */ 256, 1677, 263, 257, 48, 293, 252, 254, 1625, 509, - /* 1300 */ 1624, 321, 1621, 323, 324, 1164, 1165, 151, 328, 508, - /* 1310 */ 1619, 1661, 330, 1631, 78, 331, 468, 237, 332, 1618, - /* 1320 */ 334, 1617, 336, 1616, 338, 1601, 152, 341, 342, 1142, - /* 1330 */ 1690, 1141, 1595, 271, 1662, 511, 1664, 1665, 507, 1677, - /* 1340 */ 528, 1594, 1593, 347, 348, 1592, 1564, 509, 1108, 1563, - /* 1350 */ 1562, 521, 1561, 1560, 1559, 1558, 1557, 508, 1556, 1661, - /* 1360 */ 1555, 1631, 1554, 1553, 1552, 1551, 1550, 1549, 1661, 1548, - /* 1370 */ 1547, 115, 1546, 1545, 1544, 1543, 466, 1542, 1690, 198, - /* 1380 */ 1541, 266, 1662, 511, 1664, 1665, 507, 1677, 528, 1540, - /* 1390 */ 1110, 1539, 1538, 1537, 1421, 509, 1677, 160, 106, 1147, - /* 1400 */ 1389, 193, 939, 388, 509, 508, 1388, 1609, 1603, 1631, - /* 1410 */ 938, 1587, 138, 1586, 508, 168, 161, 1577, 1631, 481, - /* 1420 */ 390, 301, 1661, 107, 166, 1470, 1690, 171, 1420, 132, - /* 1430 */ 1662, 511, 1664, 1665, 507, 1690, 528, 1661, 271, 1662, - /* 1440 */ 511, 1664, 1665, 507, 967, 528, 1418, 407, 406, 408, - /* 1450 */ 1677, 1416, 410, 412, 411, 1414, 416, 414, 506, 415, - /* 1460 */ 1412, 420, 418, 419, 1401, 1677, 1400, 1387, 508, 1472, - /* 1470 */ 1661, 45, 1631, 509, 1807, 1074, 1075, 1471, 1000, 999, - /* 1480 */ 998, 997, 575, 508, 577, 1661, 178, 1631, 1410, 1690, - /* 1490 */ 303, 994, 270, 1662, 511, 1664, 1665, 507, 1677, 528, - /* 1500 */ 288, 1703, 1405, 993, 1690, 992, 509, 271, 1662, 511, - /* 1510 */ 1664, 1665, 507, 1677, 528, 1403, 508, 289, 443, 290, - /* 1520 */ 1631, 509, 446, 305, 1386, 1661, 448, 1385, 450, 83, - /* 1530 */ 1608, 508, 1149, 1602, 457, 1631, 1585, 1690, 196, 1584, - /* 1540 */ 271, 1662, 511, 1664, 1665, 507, 1576, 528, 126, 49, - /* 1550 */ 458, 199, 1690, 1677, 65, 258, 1662, 511, 1664, 1665, - /* 1560 */ 507, 509, 528, 201, 4, 204, 37, 43, 1317, 1310, - /* 1570 */ 133, 508, 208, 22, 10, 1631, 209, 1661, 210, 66, - /* 1580 */ 29, 1651, 1289, 23, 216, 1288, 42, 136, 17, 1346, - /* 1590 */ 1335, 1341, 1690, 19, 15, 265, 1662, 511, 1664, 1665, - /* 1600 */ 507, 1340, 528, 299, 1345, 1677, 1344, 300, 1252, 137, - /* 1610 */ 1231, 1230, 12, 509, 16, 149, 1216, 1575, 510, 20, - /* 1620 */ 516, 233, 235, 508, 1650, 1661, 238, 1631, 965, 41, - /* 1630 */ 21, 1186, 227, 1315, 532, 313, 13, 536, 539, 229, - /* 1640 */ 1661, 1038, 231, 67, 1690, 68, 72, 267, 1662, 511, - /* 1650 */ 1664, 1665, 507, 1677, 528, 1693, 552, 1233, 527, 44, - /* 1660 */ 530, 509, 542, 1061, 534, 545, 1066, 1058, 1677, 1070, - /* 1670 */ 537, 508, 1053, 1661, 1055, 1631, 509, 540, 1052, 1049, - /* 1680 */ 543, 1051, 1047, 546, 1050, 73, 508, 1067, 74, 75, - /* 1690 */ 1631, 561, 1690, 989, 1007, 259, 1662, 511, 1664, 1665, - /* 1700 */ 507, 1677, 528, 564, 240, 987, 986, 1690, 985, 509, - /* 1710 */ 268, 1662, 511, 1664, 1665, 507, 982, 528, 984, 508, - /* 1720 */ 983, 981, 980, 1631, 1068, 1002, 1004, 1661, 977, 976, - /* 1730 */ 975, 972, 971, 970, 1417, 585, 1661, 586, 587, 1415, - /* 1740 */ 1690, 590, 589, 260, 1662, 511, 1664, 1665, 507, 591, - /* 1750 */ 528, 1413, 593, 594, 595, 1677, 597, 599, 598, 1399, - /* 1760 */ 1398, 601, 602, 509, 1677, 1411, 1384, 605, 606, 1359, - /* 1770 */ 1172, 251, 509, 508, 609, 610, 1359, 1631, 1359, 1359, - /* 1780 */ 1359, 1359, 508, 1359, 1661, 1359, 1631, 1359, 1359, 1359, - /* 1790 */ 1359, 1359, 1359, 1359, 1690, 1359, 1661, 269, 1662, 511, - /* 1800 */ 1664, 1665, 507, 1690, 528, 1359, 261, 1662, 511, 1664, - /* 1810 */ 1665, 507, 1677, 528, 1359, 1359, 1359, 1359, 1359, 1359, - /* 1820 */ 509, 1359, 1359, 1359, 1677, 1359, 1359, 1359, 1359, 1359, - /* 1830 */ 508, 1359, 509, 1359, 1631, 1359, 1661, 1359, 1359, 1359, - /* 1840 */ 1359, 1359, 508, 1359, 1359, 1359, 1631, 1359, 1359, 1661, - /* 1850 */ 1359, 1690, 1359, 1359, 1673, 1662, 511, 1664, 1665, 507, - /* 1860 */ 1359, 528, 1359, 1690, 1677, 1359, 1672, 1662, 511, 1664, - /* 1870 */ 1665, 507, 509, 528, 1359, 1359, 1359, 1677, 1359, 1359, - /* 1880 */ 1359, 1359, 508, 1359, 1359, 509, 1631, 1359, 1359, 1359, - /* 1890 */ 1359, 1359, 1359, 1359, 1359, 508, 1359, 1661, 1359, 1631, - /* 1900 */ 1359, 1359, 1359, 1690, 1359, 1359, 1671, 1662, 511, 1664, - /* 1910 */ 1665, 507, 1661, 528, 1359, 1359, 1690, 1359, 1359, 280, - /* 1920 */ 1662, 511, 1664, 1665, 507, 1677, 528, 1359, 1359, 1359, - /* 1930 */ 1359, 1359, 1359, 509, 1359, 1359, 1359, 1359, 1359, 1359, - /* 1940 */ 1677, 1359, 1359, 508, 1359, 1661, 1359, 1631, 509, 1359, - /* 1950 */ 1359, 1359, 1359, 311, 310, 1359, 1359, 1359, 508, 1359, - /* 1960 */ 1359, 1359, 1631, 1184, 1690, 1359, 1359, 279, 1662, 511, - /* 1970 */ 1664, 1665, 507, 1677, 528, 1359, 1359, 1359, 1359, 1690, - /* 1980 */ 1359, 509, 281, 1662, 511, 1664, 1665, 507, 1177, 528, - /* 1990 */ 1359, 508, 1359, 1359, 1359, 1631, 1359, 1359, 1359, 1661, - /* 2000 */ 1359, 1359, 1359, 1359, 1359, 1176, 1359, 1359, 1359, 1359, - /* 2010 */ 1359, 1359, 1690, 1359, 1359, 278, 1662, 511, 1664, 1665, - /* 2020 */ 507, 1359, 528, 1359, 1359, 1359, 1359, 1677, 1359, 1359, - /* 2030 */ 1359, 1359, 1359, 1359, 1359, 509, 1359, 1359, 1359, 1359, - /* 2040 */ 1359, 1359, 1359, 1359, 529, 508, 1359, 1359, 1359, 1631, - /* 2050 */ 1359, 1359, 1359, 1359, 1359, 1180, 1359, 1359, 1359, 1359, - /* 2060 */ 1359, 1359, 1359, 1359, 1359, 1359, 1690, 1359, 1359, 264, - /* 2070 */ 1662, 511, 1664, 1665, 507, 1359, 528, 1359, 1359, 1359, - /* 2080 */ 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359, - /* 2090 */ 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359, - /* 2100 */ 1185, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359, - /* 2110 */ 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359, - /* 2120 */ 1359, 1359, 1188, 1359, 1359, 1359, 1359, 1359, 1359, 1359, - /* 2130 */ 1359, 1359, 1359, 526, 1236, 1237, + /* 0 */ 386, 1644, 387, 1389, 295, 394, 525, 387, 1389, 1740, + /* 10 */ 62, 930, 35, 33, 28, 226, 1477, 1657, 104, 1479, + /* 20 */ 304, 1641, 1167, 108, 1532, 425, 36, 34, 32, 31, + /* 30 */ 30, 294, 1483, 1737, 1355, 1488, 1530, 1637, 1643, 1641, + /* 40 */ 36, 34, 32, 31, 30, 1673, 524, 1165, 528, 934, + /* 50 */ 935, 524, 77, 509, 485, 1637, 1643, 947, 14, 946, + /* 60 */ 35, 33, 1294, 508, 1173, 113, 528, 1627, 304, 524, + /* 70 */ 1167, 352, 277, 1480, 36, 34, 32, 31, 30, 512, + /* 80 */ 404, 1, 307, 112, 1686, 1577, 948, 82, 1658, 511, + /* 90 */ 1660, 1661, 507, 320, 528, 1165, 1205, 1726, 1657, 1380, + /* 100 */ 1191, 1725, 1722, 607, 1256, 274, 14, 39, 35, 33, + /* 110 */ 603, 602, 1173, 1166, 385, 1788, 304, 389, 1167, 1644, + /* 120 */ 277, 110, 312, 1673, 55, 999, 1673, 1645, 1787, 2, + /* 130 */ 38, 478, 1785, 1788, 509, 487, 142, 1733, 1734, 1641, + /* 140 */ 1738, 55, 1001, 1165, 508, 56, 145, 1641, 1627, 1627, + /* 150 */ 1785, 607, 1256, 1257, 14, 1637, 1643, 62, 1168, 1465, + /* 160 */ 1173, 1166, 479, 1637, 1643, 1686, 528, 477, 256, 1658, + /* 170 */ 511, 1660, 1661, 507, 528, 528, 1262, 2, 1350, 1484, + /* 180 */ 1171, 1172, 376, 1218, 1219, 1221, 1222, 1223, 1224, 1225, + /* 190 */ 504, 526, 1233, 1234, 1235, 1236, 1237, 1238, 1192, 607, + /* 200 */ 345, 1257, 344, 64, 292, 1379, 1168, 191, 429, 1166, + /* 210 */ 148, 1189, 27, 302, 1251, 1252, 1253, 1254, 1255, 1259, + /* 220 */ 1260, 1261, 55, 130, 1262, 1369, 158, 157, 1171, 1172, + /* 230 */ 428, 1218, 1219, 1221, 1222, 1223, 1224, 1225, 504, 526, + /* 240 */ 1233, 1234, 1235, 1236, 1237, 1238, 1416, 36, 34, 32, + /* 250 */ 31, 30, 559, 148, 1168, 1627, 1406, 1318, 1349, 148, + /* 260 */ 27, 302, 1251, 1252, 1253, 1254, 1255, 1259, 1260, 1261, + /* 270 */ 148, 558, 55, 557, 556, 555, 1171, 1172, 440, 1218, + /* 280 */ 1219, 1221, 1222, 1223, 1224, 1225, 504, 526, 1233, 1234, + /* 290 */ 1235, 1236, 1237, 1238, 35, 33, 471, 1316, 1317, 1319, + /* 300 */ 1320, 131, 304, 154, 1167, 1445, 583, 582, 581, 319, + /* 310 */ 561, 580, 579, 578, 114, 573, 572, 571, 570, 569, + /* 320 */ 568, 567, 566, 121, 562, 1193, 559, 1466, 60, 1165, + /* 330 */ 94, 59, 1657, 93, 92, 91, 90, 89, 88, 87, + /* 340 */ 86, 85, 35, 33, 1239, 558, 1173, 557, 556, 555, + /* 350 */ 304, 148, 1167, 439, 438, 32, 31, 30, 437, 554, + /* 360 */ 1673, 109, 434, 8, 1301, 433, 432, 431, 509, 140, + /* 370 */ 1191, 36, 34, 32, 31, 30, 1788, 1165, 508, 1788, + /* 380 */ 127, 1526, 1627, 393, 404, 607, 389, 1190, 474, 146, + /* 390 */ 35, 33, 1786, 1785, 1173, 1166, 1785, 451, 304, 1686, + /* 400 */ 1167, 148, 132, 1658, 511, 1660, 1661, 507, 1740, 528, + /* 410 */ 449, 9, 436, 435, 1037, 551, 550, 549, 1041, 548, + /* 420 */ 1043, 1044, 547, 1046, 544, 1165, 1052, 541, 1054, 1055, + /* 430 */ 538, 535, 1736, 607, 1419, 36, 34, 32, 31, 30, + /* 440 */ 1168, 1308, 1173, 1166, 24, 316, 490, 1802, 249, 461, + /* 450 */ 217, 1518, 1568, 1570, 36, 34, 32, 31, 30, 9, + /* 460 */ 480, 475, 1171, 1172, 485, 1218, 1219, 1221, 1222, 1223, + /* 470 */ 1224, 1225, 504, 526, 1233, 1234, 1235, 1236, 1237, 1238, + /* 480 */ 1378, 607, 36, 34, 32, 31, 30, 1473, 1168, 1532, + /* 490 */ 1565, 1166, 148, 112, 439, 438, 309, 156, 462, 437, + /* 500 */ 346, 1530, 109, 434, 1463, 1205, 433, 432, 431, 1194, + /* 510 */ 1171, 1172, 485, 1218, 1219, 1221, 1222, 1223, 1224, 1225, + /* 520 */ 504, 526, 1233, 1234, 1235, 1236, 1237, 1238, 11, 10, + /* 530 */ 1627, 110, 1532, 1258, 1220, 946, 1168, 308, 1788, 315, + /* 540 */ 1788, 112, 577, 575, 1530, 128, 143, 1733, 1734, 1377, + /* 550 */ 1738, 145, 286, 145, 1490, 1785, 1263, 1785, 1171, 1172, + /* 560 */ 423, 1218, 1219, 1221, 1222, 1223, 1224, 1225, 504, 526, + /* 570 */ 1233, 1234, 1235, 1236, 1237, 1238, 35, 33, 273, 110, + /* 580 */ 1189, 1128, 1569, 1570, 304, 1657, 1167, 369, 525, 1130, + /* 590 */ 381, 1740, 25, 525, 144, 1733, 1734, 559, 1738, 1627, + /* 600 */ 104, 287, 7, 285, 284, 350, 427, 430, 382, 1270, + /* 610 */ 429, 1165, 1358, 1673, 1376, 1735, 558, 1488, 557, 556, + /* 620 */ 555, 509, 1488, 1244, 512, 1375, 337, 1475, 1173, 1191, + /* 630 */ 1578, 508, 428, 94, 202, 1627, 93, 92, 91, 90, + /* 640 */ 89, 88, 87, 86, 85, 2, 339, 335, 391, 1464, + /* 650 */ 1129, 70, 1686, 1191, 1189, 81, 1658, 511, 1660, 1661, + /* 660 */ 507, 453, 528, 564, 1627, 1726, 565, 607, 1460, 297, + /* 670 */ 1722, 1801, 1481, 1374, 1471, 1627, 54, 1166, 380, 493, + /* 680 */ 1760, 375, 374, 373, 372, 371, 368, 367, 366, 365, + /* 690 */ 364, 360, 359, 358, 357, 356, 355, 354, 353, 26, + /* 700 */ 1167, 1788, 576, 610, 525, 501, 561, 314, 1532, 36, + /* 710 */ 34, 32, 31, 30, 145, 128, 351, 243, 1785, 1373, + /* 720 */ 1531, 128, 1168, 1627, 1490, 1165, 1372, 1293, 1371, 105, + /* 730 */ 1491, 194, 1368, 1488, 1657, 599, 595, 591, 587, 242, + /* 740 */ 934, 935, 1173, 340, 1171, 1172, 503, 1218, 1219, 1221, + /* 750 */ 1222, 1223, 1224, 1225, 504, 526, 1233, 1234, 1235, 1236, + /* 760 */ 1237, 1238, 1673, 525, 78, 525, 496, 237, 1616, 1627, + /* 770 */ 509, 317, 1370, 525, 1289, 361, 1627, 362, 1627, 128, + /* 780 */ 508, 607, 1627, 1367, 1627, 403, 485, 525, 1490, 1366, + /* 790 */ 489, 1166, 1488, 1220, 1488, 1365, 1745, 1289, 460, 522, + /* 800 */ 521, 1686, 1488, 118, 80, 1658, 511, 1660, 1661, 507, + /* 810 */ 1657, 528, 525, 327, 1726, 112, 1488, 1220, 276, 1722, + /* 820 */ 525, 76, 525, 1364, 1485, 466, 182, 1248, 198, 180, + /* 830 */ 1788, 72, 1607, 1627, 523, 489, 1168, 184, 1673, 1627, + /* 840 */ 183, 1488, 1401, 147, 463, 1627, 509, 1785, 1144, 1488, + /* 850 */ 193, 1488, 1363, 110, 186, 553, 508, 185, 1171, 1172, + /* 860 */ 1627, 1362, 1361, 1360, 442, 494, 489, 525, 215, 1733, + /* 870 */ 484, 1657, 483, 1627, 444, 1788, 1446, 1686, 221, 239, + /* 880 */ 80, 1658, 511, 1660, 1661, 507, 1399, 528, 147, 452, + /* 890 */ 1726, 472, 1785, 525, 276, 1722, 1488, 188, 491, 1673, + /* 900 */ 187, 47, 1627, 190, 275, 318, 1788, 488, 445, 129, + /* 910 */ 454, 1627, 1627, 1627, 255, 447, 971, 508, 212, 145, + /* 920 */ 441, 1627, 1488, 1785, 46, 189, 253, 53, 1152, 1153, + /* 930 */ 52, 1390, 1657, 972, 1292, 1176, 205, 1674, 1686, 1352, + /* 940 */ 1353, 81, 1658, 511, 1660, 1661, 507, 159, 528, 422, + /* 950 */ 51, 1726, 1527, 50, 497, 297, 1722, 141, 11, 10, + /* 960 */ 1673, 1357, 1175, 1756, 486, 1315, 220, 223, 488, 218, + /* 970 */ 37, 3, 55, 1189, 37, 467, 1753, 207, 508, 225, + /* 980 */ 322, 37, 1627, 1647, 228, 103, 102, 101, 100, 99, + /* 990 */ 98, 97, 96, 95, 326, 116, 282, 117, 999, 1686, + /* 1000 */ 485, 1179, 81, 1658, 511, 1660, 1661, 507, 79, 528, + /* 1010 */ 283, 1264, 1726, 244, 1136, 1226, 297, 1722, 141, 118, + /* 1020 */ 1649, 363, 1122, 46, 533, 230, 1567, 155, 1178, 112, + /* 1030 */ 117, 370, 118, 119, 117, 378, 517, 1754, 236, 377, + /* 1040 */ 383, 58, 57, 349, 1657, 379, 153, 1195, 384, 489, + /* 1050 */ 392, 343, 1198, 395, 162, 396, 1197, 164, 1199, 397, + /* 1060 */ 1030, 167, 400, 272, 248, 1058, 333, 110, 329, 325, + /* 1070 */ 150, 1062, 1673, 1068, 1066, 120, 169, 398, 1196, 401, + /* 1080 */ 509, 402, 215, 1733, 484, 172, 483, 61, 405, 1788, + /* 1090 */ 508, 175, 424, 426, 1627, 1478, 179, 1474, 181, 1657, + /* 1100 */ 122, 148, 145, 84, 123, 1476, 1785, 291, 1472, 1173, + /* 1110 */ 124, 1686, 1611, 125, 81, 1658, 511, 1660, 1661, 507, + /* 1120 */ 245, 528, 456, 192, 1726, 455, 195, 1673, 297, 1722, + /* 1130 */ 1801, 197, 459, 464, 465, 509, 200, 246, 1194, 1783, + /* 1140 */ 1757, 473, 1767, 515, 203, 508, 1766, 482, 470, 1627, + /* 1150 */ 1657, 6, 206, 296, 476, 1747, 135, 211, 469, 5, + /* 1160 */ 111, 1289, 1657, 1193, 40, 213, 1686, 495, 219, 81, + /* 1170 */ 1658, 511, 1660, 1661, 507, 1741, 528, 298, 1673, 1726, + /* 1180 */ 1804, 214, 18, 297, 1722, 1801, 509, 498, 518, 222, + /* 1190 */ 1673, 1707, 1576, 513, 1744, 514, 508, 1575, 509, 224, + /* 1200 */ 1627, 1784, 306, 492, 499, 520, 489, 519, 508, 232, + /* 1210 */ 234, 71, 1627, 1489, 247, 1657, 69, 1686, 489, 250, + /* 1220 */ 260, 1658, 511, 1660, 1661, 507, 241, 528, 1461, 1686, + /* 1230 */ 606, 48, 260, 1658, 511, 1660, 1661, 507, 254, 528, + /* 1240 */ 531, 134, 1621, 1673, 261, 271, 1788, 293, 1657, 262, + /* 1250 */ 252, 509, 1620, 321, 1617, 323, 324, 1161, 1788, 147, + /* 1260 */ 1162, 508, 151, 1785, 328, 1627, 1615, 330, 331, 332, + /* 1270 */ 1614, 145, 334, 1613, 336, 1785, 1673, 1612, 338, 1597, + /* 1280 */ 152, 341, 1686, 342, 506, 82, 1658, 511, 1660, 1661, + /* 1290 */ 507, 1139, 528, 1138, 508, 1726, 1591, 1590, 1627, 500, + /* 1300 */ 1722, 347, 348, 1589, 1588, 1105, 1657, 1560, 1559, 1558, + /* 1310 */ 1557, 1556, 1555, 1554, 1553, 1686, 115, 1542, 269, 1658, + /* 1320 */ 511, 1660, 1661, 507, 505, 528, 502, 1698, 1552, 1551, + /* 1330 */ 1550, 1549, 1548, 1547, 1673, 1546, 1545, 1544, 1543, 1541, + /* 1340 */ 1540, 1539, 509, 1538, 1537, 1107, 1536, 1535, 1534, 1533, + /* 1350 */ 1418, 1386, 508, 1385, 1657, 160, 1627, 106, 1605, 138, + /* 1360 */ 161, 107, 1599, 388, 1583, 390, 937, 1657, 1582, 936, + /* 1370 */ 168, 166, 1573, 1686, 1467, 1417, 82, 1658, 511, 1660, + /* 1380 */ 1661, 507, 1673, 528, 965, 1415, 1726, 1413, 1411, 406, + /* 1390 */ 509, 1723, 410, 171, 408, 1673, 412, 1409, 1398, 407, + /* 1400 */ 508, 1397, 1384, 509, 1627, 411, 416, 468, 414, 1469, + /* 1410 */ 415, 419, 1071, 508, 418, 1657, 45, 1627, 420, 1468, + /* 1420 */ 1072, 1686, 1407, 998, 270, 1658, 511, 1660, 1661, 507, + /* 1430 */ 997, 528, 574, 996, 1686, 576, 995, 265, 1658, 511, + /* 1440 */ 1660, 1661, 507, 1673, 528, 288, 992, 991, 1402, 289, + /* 1450 */ 990, 509, 443, 1400, 446, 290, 1383, 448, 178, 1382, + /* 1460 */ 450, 508, 83, 1604, 1146, 1627, 1657, 1598, 126, 457, + /* 1470 */ 1581, 1580, 49, 1572, 65, 481, 199, 1657, 4, 15, + /* 1480 */ 210, 37, 1686, 16, 43, 132, 1658, 511, 1660, 1661, + /* 1490 */ 507, 133, 528, 204, 1673, 1314, 208, 22, 209, 1647, + /* 1500 */ 1307, 66, 509, 23, 216, 1673, 1286, 1285, 458, 41, + /* 1510 */ 42, 201, 508, 506, 13, 1338, 1627, 17, 136, 301, + /* 1520 */ 196, 10, 1337, 508, 299, 1657, 1343, 1627, 1332, 1342, + /* 1530 */ 1803, 1341, 300, 1686, 19, 29, 270, 1658, 511, 1660, + /* 1540 */ 1661, 507, 137, 528, 1686, 149, 1228, 269, 1658, 511, + /* 1550 */ 1660, 1661, 507, 1673, 528, 1213, 1699, 1249, 1657, 1571, + /* 1560 */ 1227, 509, 12, 233, 510, 1646, 238, 20, 21, 516, + /* 1570 */ 227, 508, 1312, 229, 235, 1627, 231, 67, 303, 1230, + /* 1580 */ 68, 1689, 72, 527, 1183, 44, 1673, 1059, 532, 313, + /* 1590 */ 1056, 534, 1686, 536, 509, 270, 1658, 511, 1660, 1661, + /* 1600 */ 507, 530, 528, 539, 508, 537, 1036, 1053, 1627, 540, + /* 1610 */ 542, 305, 1047, 543, 545, 1067, 1045, 546, 73, 1051, + /* 1620 */ 1050, 1657, 1049, 1048, 552, 1686, 177, 560, 270, 1658, + /* 1630 */ 511, 1660, 1661, 507, 1657, 528, 74, 1064, 139, 75, + /* 1640 */ 1065, 963, 987, 1005, 421, 417, 413, 409, 176, 1673, + /* 1650 */ 563, 240, 980, 985, 984, 983, 982, 509, 981, 979, + /* 1660 */ 978, 1002, 1673, 1000, 975, 974, 973, 508, 970, 969, + /* 1670 */ 509, 1627, 968, 63, 1657, 1414, 174, 585, 584, 586, + /* 1680 */ 508, 1412, 588, 589, 1627, 590, 1410, 592, 1686, 593, + /* 1690 */ 594, 264, 1658, 511, 1660, 1661, 507, 1408, 528, 596, + /* 1700 */ 597, 1686, 1673, 598, 266, 1658, 511, 1660, 1661, 507, + /* 1710 */ 509, 528, 1396, 1395, 600, 601, 1381, 604, 1169, 605, + /* 1720 */ 508, 251, 608, 609, 1627, 1657, 1356, 1356, 1356, 1356, + /* 1730 */ 1356, 1356, 1356, 173, 1356, 165, 1356, 170, 1356, 399, + /* 1740 */ 1356, 1686, 1356, 1356, 257, 1658, 511, 1660, 1661, 507, + /* 1750 */ 1356, 528, 1356, 1673, 1356, 1657, 1356, 1356, 1356, 163, + /* 1760 */ 1356, 509, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, + /* 1770 */ 1356, 508, 1356, 1356, 1356, 1627, 1356, 1356, 1356, 1356, + /* 1780 */ 1356, 1356, 1356, 1673, 1356, 1356, 1356, 1657, 1356, 1356, + /* 1790 */ 1356, 509, 1686, 1356, 1356, 267, 1658, 511, 1660, 1661, + /* 1800 */ 507, 508, 528, 1356, 1356, 1627, 1356, 1356, 1356, 1356, + /* 1810 */ 1356, 1356, 1356, 1356, 1356, 1673, 1356, 1356, 1356, 1356, + /* 1820 */ 1356, 1356, 1686, 509, 1356, 258, 1658, 511, 1660, 1661, + /* 1830 */ 507, 1356, 528, 508, 1356, 1356, 1356, 1627, 1657, 1356, + /* 1840 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1657, 1356, 1356, + /* 1850 */ 1356, 1356, 1356, 1356, 1686, 1356, 1356, 268, 1658, 511, + /* 1860 */ 1660, 1661, 507, 1356, 528, 1356, 1673, 1356, 1356, 1356, + /* 1870 */ 1356, 1356, 1356, 1356, 509, 1673, 1356, 1356, 1356, 1356, + /* 1880 */ 1356, 1356, 1356, 509, 508, 1356, 1356, 1356, 1627, 1356, + /* 1890 */ 1356, 1356, 1356, 508, 1356, 1356, 1356, 1627, 1356, 1356, + /* 1900 */ 1657, 1356, 1356, 1356, 1356, 1686, 1356, 1356, 259, 1658, + /* 1910 */ 511, 1660, 1661, 507, 1686, 528, 1657, 1669, 1658, 511, + /* 1920 */ 1660, 1661, 507, 1356, 528, 1356, 1356, 1356, 1673, 1356, + /* 1930 */ 1356, 1356, 1356, 1356, 1356, 1356, 509, 1356, 1356, 1356, + /* 1940 */ 1356, 1356, 1356, 1356, 1673, 1356, 508, 1356, 1657, 1356, + /* 1950 */ 1627, 1356, 509, 1356, 1356, 1356, 1356, 1356, 1356, 1356, + /* 1960 */ 1356, 1356, 508, 1356, 1356, 1356, 1627, 1686, 1356, 1356, + /* 1970 */ 1668, 1658, 511, 1660, 1661, 507, 1673, 528, 1657, 1356, + /* 1980 */ 1356, 1356, 1356, 1686, 509, 1356, 1667, 1658, 511, 1660, + /* 1990 */ 1661, 507, 1356, 528, 508, 1356, 1356, 1356, 1627, 1356, + /* 2000 */ 1356, 1356, 1356, 1356, 1356, 1356, 1673, 1356, 1356, 1356, + /* 2010 */ 1356, 1356, 1356, 1356, 509, 1686, 1356, 1356, 280, 1658, + /* 2020 */ 511, 1660, 1661, 507, 508, 528, 1657, 1356, 1627, 1356, + /* 2030 */ 1356, 311, 310, 1356, 1356, 1657, 1356, 1356, 1356, 1356, + /* 2040 */ 1356, 1181, 1356, 1356, 1356, 1686, 1356, 1356, 279, 1658, + /* 2050 */ 511, 1660, 1661, 507, 1673, 528, 1356, 1356, 1356, 1356, + /* 2060 */ 1356, 1356, 509, 1673, 1356, 1356, 1174, 1356, 1356, 1356, + /* 2070 */ 1356, 509, 508, 1356, 1356, 1356, 1627, 1356, 1356, 1356, + /* 2080 */ 1356, 508, 1356, 1173, 1356, 1627, 1356, 1356, 1356, 1356, + /* 2090 */ 1657, 1356, 1356, 1686, 1356, 1356, 281, 1658, 511, 1660, + /* 2100 */ 1661, 507, 1686, 528, 1356, 278, 1658, 511, 1660, 1661, + /* 2110 */ 507, 1356, 528, 1356, 1356, 1356, 1356, 1356, 1673, 1356, + /* 2120 */ 1356, 1356, 529, 1356, 1356, 1356, 509, 1356, 1356, 1356, + /* 2130 */ 1356, 1356, 1177, 1356, 1356, 1356, 508, 1356, 1356, 1356, + /* 2140 */ 1627, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, + /* 2150 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1686, 1356, 1356, + /* 2160 */ 263, 1658, 511, 1660, 1661, 507, 1356, 528, 1356, 1356, + /* 2170 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1182, 1356, 1356, + /* 2180 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, + /* 2190 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1185, + /* 2200 */ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, + /* 2210 */ 526, 1233, 1234, }; static const YYCODETYPE yy_lookahead[] = { - /* 0 */ 303, 273, 271, 273, 276, 246, 276, 248, 249, 278, - /* 10 */ 324, 325, 12, 13, 283, 2, 243, 243, 4, 272, - /* 20 */ 20, 293, 22, 293, 270, 12, 13, 14, 15, 16, - /* 30 */ 12, 13, 14, 15, 16, 273, 282, 309, 310, 309, - /* 40 */ 310, 246, 0, 248, 249, 271, 20, 47, 320, 242, - /* 50 */ 320, 244, 339, 279, 250, 293, 42, 43, 58, 20, - /* 60 */ 12, 13, 14, 289, 64, 352, 293, 293, 20, 356, - /* 70 */ 22, 309, 310, 299, 12, 13, 14, 15, 16, 251, - /* 80 */ 252, 81, 320, 279, 310, 80, 250, 313, 314, 315, - /* 90 */ 316, 317, 318, 88, 320, 47, 243, 323, 262, 57, - /* 100 */ 82, 327, 328, 103, 311, 269, 58, 81, 12, 13, - /* 110 */ 339, 273, 64, 339, 114, 279, 20, 311, 22, 289, - /* 120 */ 58, 317, 292, 352, 271, 295, 352, 356, 335, 81, - /* 130 */ 356, 293, 279, 14, 75, 331, 332, 333, 334, 20, - /* 140 */ 336, 335, 289, 47, 82, 81, 293, 309, 310, 250, - /* 150 */ 4, 103, 90, 256, 58, 150, 271, 260, 320, 159, - /* 160 */ 64, 262, 114, 310, 279, 57, 313, 314, 315, 316, - /* 170 */ 317, 318, 319, 320, 321, 322, 243, 81, 279, 120, - /* 180 */ 121, 181, 182, 20, 184, 185, 186, 187, 188, 189, - /* 190 */ 190, 191, 192, 193, 194, 195, 196, 197, 198, 103, - /* 200 */ 315, 255, 140, 55, 168, 169, 4, 159, 172, 21, - /* 210 */ 114, 211, 24, 25, 26, 27, 28, 29, 30, 31, - /* 220 */ 32, 243, 158, 277, 160, 163, 293, 81, 80, 181, - /* 230 */ 182, 83, 184, 185, 186, 187, 188, 189, 190, 191, - /* 240 */ 192, 193, 194, 195, 196, 197, 198, 0, 35, 20, - /* 250 */ 12, 13, 14, 15, 16, 159, 12, 13, 14, 15, - /* 260 */ 16, 199, 200, 201, 202, 203, 204, 205, 206, 207, - /* 270 */ 208, 293, 81, 240, 311, 211, 247, 181, 182, 250, + /* 0 */ 245, 272, 247, 248, 275, 245, 249, 247, 248, 310, + /* 10 */ 254, 4, 12, 13, 323, 324, 271, 242, 261, 272, + /* 20 */ 20, 292, 22, 267, 270, 268, 12, 13, 14, 15, + /* 30 */ 16, 277, 276, 334, 239, 278, 282, 308, 309, 292, + /* 40 */ 12, 13, 14, 15, 16, 270, 20, 47, 319, 42, + /* 50 */ 43, 20, 252, 278, 249, 308, 309, 20, 58, 22, + /* 60 */ 12, 13, 14, 288, 64, 265, 319, 292, 20, 20, + /* 70 */ 22, 249, 58, 273, 12, 13, 14, 15, 16, 288, + /* 80 */ 57, 81, 291, 278, 309, 294, 49, 312, 313, 314, + /* 90 */ 315, 316, 317, 298, 319, 47, 82, 322, 242, 242, + /* 100 */ 20, 326, 327, 103, 90, 283, 58, 81, 12, 13, + /* 110 */ 250, 251, 64, 113, 246, 338, 20, 249, 22, 272, + /* 120 */ 58, 316, 275, 270, 81, 47, 270, 272, 351, 81, + /* 130 */ 81, 278, 355, 338, 278, 330, 331, 332, 333, 292, + /* 140 */ 335, 81, 64, 47, 288, 4, 351, 292, 292, 292, + /* 150 */ 355, 103, 90, 139, 58, 308, 309, 254, 158, 0, + /* 160 */ 64, 113, 20, 308, 309, 309, 319, 314, 312, 313, + /* 170 */ 314, 315, 316, 317, 319, 319, 162, 81, 150, 276, + /* 180 */ 180, 181, 75, 183, 184, 185, 186, 187, 188, 189, + /* 190 */ 190, 191, 192, 193, 194, 195, 196, 197, 20, 103, + /* 200 */ 157, 139, 159, 167, 168, 242, 158, 171, 93, 113, + /* 210 */ 210, 20, 198, 199, 200, 201, 202, 203, 204, 205, + /* 220 */ 206, 207, 81, 241, 162, 243, 119, 120, 180, 181, + /* 230 */ 115, 183, 184, 185, 186, 187, 188, 189, 190, 191, + /* 240 */ 192, 193, 194, 195, 196, 197, 0, 12, 13, 14, + /* 250 */ 15, 16, 93, 210, 158, 292, 0, 180, 230, 210, + /* 260 */ 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, + /* 270 */ 210, 112, 81, 114, 115, 116, 180, 181, 22, 183, /* 280 */ 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, - /* 290 */ 194, 195, 196, 197, 198, 12, 13, 84, 335, 86, - /* 300 */ 87, 20, 89, 20, 185, 22, 93, 60, 61, 62, - /* 310 */ 63, 0, 65, 66, 67, 68, 69, 70, 71, 72, - /* 320 */ 73, 74, 75, 76, 77, 78, 60, 61, 255, 116, - /* 330 */ 47, 65, 299, 243, 68, 69, 93, 299, 72, 73, - /* 340 */ 74, 268, 250, 12, 13, 14, 14, 64, 20, 22, - /* 350 */ 277, 20, 20, 22, 262, 112, 113, 211, 115, 116, - /* 360 */ 117, 271, 81, 339, 81, 263, 243, 144, 57, 279, - /* 370 */ 140, 279, 339, 271, 47, 299, 352, 339, 47, 289, - /* 380 */ 356, 181, 280, 293, 146, 352, 103, 257, 258, 356, - /* 390 */ 352, 12, 13, 163, 356, 64, 20, 114, 22, 20, - /* 400 */ 310, 22, 211, 313, 314, 315, 316, 317, 318, 81, - /* 410 */ 320, 243, 81, 323, 212, 339, 293, 327, 328, 329, - /* 420 */ 220, 221, 222, 223, 224, 49, 47, 0, 352, 199, - /* 430 */ 289, 341, 356, 263, 103, 0, 295, 347, 348, 216, - /* 440 */ 217, 271, 159, 64, 0, 114, 247, 243, 21, 250, - /* 450 */ 280, 24, 25, 26, 27, 28, 29, 30, 31, 32, - /* 460 */ 81, 293, 257, 258, 181, 182, 22, 184, 185, 186, - /* 470 */ 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, - /* 480 */ 197, 198, 103, 12, 13, 14, 15, 16, 0, 253, - /* 490 */ 159, 279, 211, 114, 211, 60, 61, 293, 286, 271, - /* 500 */ 65, 37, 250, 68, 69, 20, 278, 72, 73, 74, - /* 510 */ 274, 283, 181, 182, 262, 184, 185, 186, 187, 188, - /* 520 */ 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, - /* 530 */ 41, 279, 12, 13, 14, 15, 16, 20, 159, 211, - /* 540 */ 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, - /* 550 */ 104, 281, 106, 107, 108, 109, 110, 111, 288, 289, - /* 560 */ 181, 182, 243, 184, 185, 186, 187, 188, 189, 190, - /* 570 */ 191, 192, 193, 194, 195, 196, 197, 198, 12, 13, - /* 580 */ 18, 93, 20, 2, 1, 2, 20, 243, 22, 27, - /* 590 */ 3, 47, 30, 12, 13, 14, 15, 16, 288, 289, - /* 600 */ 112, 113, 82, 115, 116, 117, 33, 250, 64, 271, - /* 610 */ 48, 14, 293, 47, 0, 271, 278, 20, 45, 262, - /* 620 */ 250, 283, 151, 279, 51, 52, 53, 54, 55, 243, - /* 630 */ 64, 154, 262, 289, 42, 43, 279, 293, 24, 25, - /* 640 */ 26, 27, 28, 29, 30, 31, 32, 81, 250, 279, - /* 650 */ 20, 174, 175, 80, 310, 253, 83, 313, 314, 315, - /* 660 */ 316, 317, 318, 146, 320, 82, 271, 323, 266, 103, - /* 670 */ 250, 327, 328, 329, 210, 280, 274, 279, 250, 293, - /* 680 */ 114, 119, 338, 243, 122, 123, 124, 125, 126, 127, - /* 690 */ 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, - /* 700 */ 138, 139, 231, 264, 284, 18, 267, 250, 92, 250, - /* 710 */ 23, 14, 15, 16, 141, 317, 143, 228, 145, 262, - /* 720 */ 147, 262, 35, 36, 57, 159, 39, 299, 269, 64, - /* 730 */ 332, 333, 334, 293, 336, 20, 279, 243, 279, 85, - /* 740 */ 167, 0, 88, 56, 243, 41, 243, 181, 182, 20, - /* 750 */ 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, - /* 760 */ 194, 195, 196, 197, 198, 271, 243, 339, 81, 250, - /* 770 */ 259, 263, 261, 279, 12, 13, 14, 15, 16, 271, - /* 780 */ 352, 262, 185, 289, 356, 209, 210, 293, 280, 250, - /* 790 */ 250, 243, 0, 299, 293, 250, 293, 243, 279, 272, - /* 800 */ 93, 262, 262, 250, 310, 118, 250, 313, 314, 315, - /* 810 */ 316, 317, 318, 226, 320, 262, 293, 323, 279, 279, - /* 820 */ 58, 327, 328, 116, 279, 243, 170, 171, 85, 0, - /* 830 */ 250, 88, 279, 339, 93, 279, 243, 45, 151, 152, - /* 840 */ 153, 293, 262, 156, 299, 22, 352, 293, 161, 243, - /* 850 */ 356, 22, 90, 112, 113, 243, 115, 116, 117, 279, - /* 860 */ 173, 146, 317, 176, 271, 178, 179, 180, 243, 243, - /* 870 */ 47, 58, 279, 317, 41, 293, 272, 332, 333, 334, - /* 880 */ 85, 336, 289, 88, 339, 81, 293, 64, 332, 333, - /* 890 */ 334, 146, 336, 85, 149, 91, 88, 352, 211, 293, - /* 900 */ 271, 356, 140, 310, 243, 293, 313, 314, 315, 316, - /* 910 */ 317, 318, 283, 320, 185, 82, 323, 0, 293, 293, - /* 920 */ 327, 328, 329, 21, 250, 163, 103, 1, 2, 196, - /* 930 */ 197, 41, 271, 244, 230, 47, 34, 114, 272, 22, - /* 940 */ 279, 348, 41, 44, 41, 47, 260, 272, 272, 272, - /* 950 */ 289, 41, 41, 279, 293, 41, 41, 41, 359, 41, - /* 960 */ 41, 199, 200, 201, 202, 203, 204, 205, 206, 207, - /* 970 */ 208, 310, 82, 299, 313, 314, 315, 316, 317, 318, - /* 980 */ 81, 320, 159, 82, 323, 82, 41, 243, 327, 328, - /* 990 */ 329, 317, 82, 82, 181, 41, 82, 82, 82, 338, - /* 1000 */ 82, 82, 114, 41, 181, 182, 332, 333, 334, 41, - /* 1010 */ 336, 41, 114, 339, 47, 271, 307, 344, 350, 243, - /* 1020 */ 271, 249, 41, 279, 251, 312, 352, 82, 282, 337, - /* 1030 */ 356, 64, 353, 289, 353, 353, 82, 293, 340, 20, - /* 1040 */ 250, 45, 308, 257, 82, 47, 157, 271, 301, 243, - /* 1050 */ 82, 250, 82, 250, 310, 279, 40, 313, 314, 315, - /* 1060 */ 316, 317, 318, 82, 320, 289, 287, 323, 140, 293, - /* 1070 */ 285, 327, 328, 329, 285, 299, 250, 271, 20, 245, - /* 1080 */ 245, 20, 338, 305, 20, 279, 310, 255, 289, 313, - /* 1090 */ 314, 315, 316, 317, 318, 289, 320, 255, 20, 293, - /* 1100 */ 300, 255, 297, 255, 297, 299, 279, 243, 20, 290, - /* 1110 */ 4, 255, 255, 250, 255, 339, 310, 245, 271, 313, - /* 1120 */ 314, 315, 316, 317, 318, 19, 320, 250, 352, 271, - /* 1130 */ 245, 271, 356, 271, 64, 271, 271, 271, 271, 33, - /* 1140 */ 271, 271, 271, 279, 271, 339, 293, 243, 305, 253, - /* 1150 */ 166, 45, 297, 289, 304, 279, 50, 293, 352, 253, - /* 1160 */ 253, 55, 356, 289, 20, 290, 243, 219, 218, 349, - /* 1170 */ 349, 225, 293, 253, 310, 271, 294, 313, 314, 315, - /* 1180 */ 316, 317, 318, 279, 320, 294, 80, 323, 293, 83, - /* 1190 */ 312, 327, 328, 289, 271, 346, 148, 293, 243, 345, - /* 1200 */ 214, 293, 279, 213, 343, 210, 279, 20, 311, 40, - /* 1210 */ 342, 330, 289, 81, 310, 227, 293, 313, 314, 315, - /* 1220 */ 316, 317, 318, 229, 320, 232, 271, 323, 294, 293, - /* 1230 */ 293, 327, 328, 310, 279, 355, 313, 314, 315, 316, - /* 1240 */ 317, 318, 293, 320, 289, 294, 354, 360, 293, 355, - /* 1250 */ 326, 143, 291, 19, 354, 279, 290, 253, 267, 253, - /* 1260 */ 355, 279, 81, 243, 275, 310, 354, 33, 313, 314, - /* 1270 */ 315, 316, 317, 318, 261, 320, 250, 253, 323, 45, - /* 1280 */ 357, 358, 245, 328, 306, 51, 52, 53, 54, 55, - /* 1290 */ 265, 271, 265, 265, 302, 298, 254, 241, 0, 279, - /* 1300 */ 0, 72, 0, 47, 177, 47, 47, 47, 177, 289, - /* 1310 */ 0, 243, 47, 293, 80, 47, 296, 83, 177, 0, - /* 1320 */ 47, 0, 47, 0, 47, 0, 81, 163, 162, 114, - /* 1330 */ 310, 159, 0, 313, 314, 315, 316, 317, 318, 271, - /* 1340 */ 320, 0, 0, 155, 154, 0, 0, 279, 44, 0, - /* 1350 */ 0, 117, 0, 0, 0, 0, 0, 289, 0, 243, - /* 1360 */ 0, 293, 0, 0, 0, 0, 0, 0, 243, 0, - /* 1370 */ 0, 40, 0, 0, 0, 0, 142, 0, 310, 145, - /* 1380 */ 0, 313, 314, 315, 316, 317, 318, 271, 320, 0, - /* 1390 */ 22, 0, 0, 0, 0, 279, 271, 40, 37, 165, - /* 1400 */ 0, 167, 14, 44, 279, 289, 0, 0, 0, 293, - /* 1410 */ 14, 0, 41, 0, 289, 148, 38, 0, 293, 351, - /* 1420 */ 44, 296, 243, 37, 37, 0, 310, 37, 0, 313, - /* 1430 */ 314, 315, 316, 317, 318, 310, 320, 243, 313, 314, - /* 1440 */ 315, 316, 317, 318, 59, 320, 0, 45, 47, 37, - /* 1450 */ 271, 0, 47, 37, 45, 0, 37, 47, 279, 45, - /* 1460 */ 0, 37, 47, 45, 0, 271, 0, 0, 289, 0, - /* 1470 */ 243, 90, 293, 279, 358, 22, 47, 0, 47, 47, - /* 1480 */ 47, 47, 41, 289, 41, 243, 88, 293, 0, 310, - /* 1490 */ 296, 47, 313, 314, 315, 316, 317, 318, 271, 320, - /* 1500 */ 22, 322, 0, 47, 310, 47, 279, 313, 314, 315, - /* 1510 */ 316, 317, 318, 271, 320, 0, 289, 22, 48, 22, - /* 1520 */ 293, 279, 47, 296, 0, 243, 22, 0, 22, 20, - /* 1530 */ 0, 289, 47, 0, 22, 293, 0, 310, 143, 0, - /* 1540 */ 313, 314, 315, 316, 317, 318, 0, 320, 164, 146, - /* 1550 */ 146, 37, 310, 271, 81, 313, 314, 315, 316, 317, - /* 1560 */ 318, 279, 320, 141, 41, 82, 41, 41, 82, 82, - /* 1570 */ 81, 289, 81, 81, 2, 293, 41, 243, 44, 81, - /* 1580 */ 81, 44, 82, 41, 44, 82, 41, 44, 41, 82, - /* 1590 */ 82, 47, 310, 41, 215, 313, 314, 315, 316, 317, - /* 1600 */ 318, 47, 320, 47, 47, 271, 47, 47, 181, 44, - /* 1610 */ 82, 82, 81, 279, 215, 44, 22, 0, 183, 81, - /* 1620 */ 144, 37, 141, 289, 44, 243, 44, 293, 59, 209, - /* 1630 */ 81, 22, 82, 82, 47, 47, 215, 47, 47, 81, - /* 1640 */ 243, 22, 81, 81, 310, 81, 91, 313, 314, 315, - /* 1650 */ 316, 317, 318, 271, 320, 81, 93, 82, 81, 81, - /* 1660 */ 92, 279, 47, 82, 81, 47, 22, 82, 271, 47, - /* 1670 */ 81, 289, 105, 243, 82, 293, 279, 81, 105, 82, - /* 1680 */ 81, 105, 82, 81, 105, 81, 289, 47, 81, 81, - /* 1690 */ 293, 58, 310, 47, 64, 313, 314, 315, 316, 317, - /* 1700 */ 318, 271, 320, 79, 41, 47, 47, 310, 47, 279, - /* 1710 */ 313, 314, 315, 316, 317, 318, 22, 320, 47, 289, - /* 1720 */ 47, 47, 47, 293, 114, 47, 64, 243, 47, 47, - /* 1730 */ 47, 47, 47, 47, 0, 47, 243, 45, 37, 0, - /* 1740 */ 310, 45, 47, 313, 314, 315, 316, 317, 318, 37, - /* 1750 */ 320, 0, 47, 45, 37, 271, 47, 37, 45, 0, - /* 1760 */ 0, 47, 46, 279, 271, 0, 0, 22, 21, 361, - /* 1770 */ 22, 22, 279, 289, 21, 20, 361, 293, 361, 361, - /* 1780 */ 361, 361, 289, 361, 243, 361, 293, 361, 361, 361, - /* 1790 */ 361, 361, 361, 361, 310, 361, 243, 313, 314, 315, - /* 1800 */ 316, 317, 318, 310, 320, 361, 313, 314, 315, 316, - /* 1810 */ 317, 318, 271, 320, 361, 361, 361, 361, 361, 361, - /* 1820 */ 279, 361, 361, 361, 271, 361, 361, 361, 361, 361, - /* 1830 */ 289, 361, 279, 361, 293, 361, 243, 361, 361, 361, - /* 1840 */ 361, 361, 289, 361, 361, 361, 293, 361, 361, 243, - /* 1850 */ 361, 310, 361, 361, 313, 314, 315, 316, 317, 318, - /* 1860 */ 361, 320, 361, 310, 271, 361, 313, 314, 315, 316, - /* 1870 */ 317, 318, 279, 320, 361, 361, 361, 271, 361, 361, - /* 1880 */ 361, 361, 289, 361, 361, 279, 293, 361, 361, 361, - /* 1890 */ 361, 361, 361, 361, 361, 289, 361, 243, 361, 293, - /* 1900 */ 361, 361, 361, 310, 361, 361, 313, 314, 315, 316, - /* 1910 */ 317, 318, 243, 320, 361, 361, 310, 361, 361, 313, - /* 1920 */ 314, 315, 316, 317, 318, 271, 320, 361, 361, 361, - /* 1930 */ 361, 361, 361, 279, 361, 361, 361, 361, 361, 361, - /* 1940 */ 271, 361, 361, 289, 361, 243, 361, 293, 279, 361, - /* 1950 */ 361, 361, 361, 12, 13, 361, 361, 361, 289, 361, - /* 1960 */ 361, 361, 293, 22, 310, 361, 361, 313, 314, 315, - /* 1970 */ 316, 317, 318, 271, 320, 361, 361, 361, 361, 310, - /* 1980 */ 361, 279, 313, 314, 315, 316, 317, 318, 47, 320, - /* 1990 */ 361, 289, 361, 361, 361, 293, 361, 361, 361, 243, - /* 2000 */ 361, 361, 361, 361, 361, 64, 361, 361, 361, 361, - /* 2010 */ 361, 361, 310, 361, 361, 313, 314, 315, 316, 317, - /* 2020 */ 318, 361, 320, 361, 361, 361, 361, 271, 361, 361, - /* 2030 */ 361, 361, 361, 361, 361, 279, 361, 361, 361, 361, - /* 2040 */ 361, 361, 361, 361, 103, 289, 361, 361, 361, 293, - /* 2050 */ 361, 361, 361, 361, 361, 114, 361, 361, 361, 361, - /* 2060 */ 361, 361, 361, 361, 361, 361, 310, 361, 361, 313, - /* 2070 */ 314, 315, 316, 317, 318, 361, 320, 361, 361, 361, - /* 2080 */ 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, - /* 2090 */ 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, - /* 2100 */ 159, 361, 361, 361, 361, 361, 361, 361, 361, 361, - /* 2110 */ 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, - /* 2120 */ 361, 361, 181, 361, 361, 361, 361, 361, 361, 361, - /* 2130 */ 361, 361, 361, 192, 193, 194, 361, 361, 361, 361, - /* 2140 */ 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, - /* 2150 */ 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, - /* 2160 */ 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, - /* 2170 */ 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, - /* 2180 */ 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, - /* 2190 */ 361, 361, 361, 361, + /* 290 */ 194, 195, 196, 197, 12, 13, 219, 220, 221, 222, + /* 300 */ 223, 255, 20, 55, 22, 259, 60, 61, 62, 63, + /* 310 */ 57, 65, 66, 67, 68, 69, 70, 71, 72, 73, + /* 320 */ 74, 75, 76, 77, 78, 20, 93, 0, 80, 47, + /* 330 */ 21, 83, 242, 24, 25, 26, 27, 28, 29, 30, + /* 340 */ 31, 32, 12, 13, 14, 112, 64, 114, 115, 116, + /* 350 */ 20, 210, 22, 60, 61, 14, 15, 16, 65, 92, + /* 360 */ 270, 68, 69, 81, 14, 72, 73, 74, 278, 269, + /* 370 */ 20, 12, 13, 14, 15, 16, 338, 47, 288, 338, + /* 380 */ 145, 281, 292, 246, 57, 103, 249, 20, 143, 351, + /* 390 */ 12, 13, 351, 355, 64, 113, 355, 21, 20, 309, + /* 400 */ 22, 210, 312, 313, 314, 315, 316, 317, 310, 319, + /* 410 */ 34, 81, 256, 257, 94, 95, 96, 97, 98, 99, + /* 420 */ 100, 101, 102, 103, 104, 47, 106, 107, 108, 109, + /* 430 */ 110, 111, 334, 103, 0, 12, 13, 14, 15, 16, + /* 440 */ 158, 82, 64, 113, 2, 280, 356, 357, 263, 249, + /* 450 */ 145, 266, 287, 288, 12, 13, 14, 15, 16, 81, + /* 460 */ 215, 216, 180, 181, 249, 183, 184, 185, 186, 187, + /* 470 */ 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, + /* 480 */ 242, 103, 12, 13, 14, 15, 16, 271, 158, 270, + /* 490 */ 278, 113, 210, 278, 60, 61, 277, 285, 298, 65, + /* 500 */ 298, 282, 68, 69, 0, 82, 72, 73, 74, 20, + /* 510 */ 180, 181, 249, 183, 184, 185, 186, 187, 188, 189, + /* 520 */ 190, 191, 192, 193, 194, 195, 196, 197, 1, 2, + /* 530 */ 292, 316, 270, 139, 184, 22, 158, 262, 338, 277, + /* 540 */ 338, 278, 256, 257, 282, 270, 331, 332, 333, 242, + /* 550 */ 335, 351, 35, 351, 279, 355, 162, 355, 180, 181, + /* 560 */ 47, 183, 184, 185, 186, 187, 188, 189, 190, 191, + /* 570 */ 192, 193, 194, 195, 196, 197, 12, 13, 18, 316, + /* 580 */ 20, 80, 287, 288, 20, 242, 22, 27, 249, 88, + /* 590 */ 30, 310, 198, 249, 331, 332, 333, 93, 335, 292, + /* 600 */ 261, 84, 37, 86, 87, 261, 89, 268, 48, 82, + /* 610 */ 93, 47, 0, 270, 242, 334, 112, 278, 114, 115, + /* 620 */ 116, 278, 278, 14, 288, 242, 153, 271, 64, 20, + /* 630 */ 294, 288, 115, 21, 145, 292, 24, 25, 26, 27, + /* 640 */ 28, 29, 30, 31, 32, 81, 173, 174, 14, 0, + /* 650 */ 149, 252, 309, 20, 20, 312, 313, 314, 315, 316, + /* 660 */ 317, 298, 319, 64, 292, 322, 258, 103, 260, 326, + /* 670 */ 327, 328, 273, 242, 271, 292, 3, 113, 118, 41, + /* 680 */ 337, 121, 122, 123, 124, 125, 126, 127, 128, 129, + /* 690 */ 130, 131, 132, 133, 134, 135, 136, 137, 138, 2, + /* 700 */ 22, 338, 41, 19, 249, 58, 57, 262, 270, 12, + /* 710 */ 13, 14, 15, 16, 351, 270, 261, 33, 355, 242, + /* 720 */ 282, 270, 158, 292, 279, 47, 242, 4, 242, 45, + /* 730 */ 279, 271, 242, 278, 242, 51, 52, 53, 54, 55, + /* 740 */ 42, 43, 64, 82, 180, 181, 271, 183, 184, 185, + /* 750 */ 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, + /* 760 */ 196, 197, 270, 249, 80, 249, 41, 83, 0, 292, + /* 770 */ 278, 262, 243, 249, 209, 261, 292, 261, 292, 270, + /* 780 */ 288, 103, 292, 242, 292, 261, 249, 249, 279, 242, + /* 790 */ 298, 113, 278, 184, 278, 242, 208, 209, 302, 261, + /* 800 */ 116, 309, 278, 41, 312, 313, 314, 315, 316, 317, + /* 810 */ 242, 319, 249, 45, 322, 278, 278, 184, 326, 327, + /* 820 */ 249, 81, 249, 242, 261, 141, 85, 180, 144, 88, + /* 830 */ 338, 91, 261, 292, 261, 298, 158, 85, 270, 292, + /* 840 */ 88, 278, 0, 351, 82, 292, 278, 355, 164, 278, + /* 850 */ 166, 278, 242, 316, 85, 271, 288, 88, 180, 181, + /* 860 */ 292, 242, 242, 242, 22, 227, 298, 249, 331, 332, + /* 870 */ 333, 242, 335, 292, 4, 338, 259, 309, 358, 261, + /* 880 */ 312, 313, 314, 315, 316, 317, 0, 319, 351, 19, + /* 890 */ 322, 349, 355, 249, 326, 327, 278, 85, 225, 270, + /* 900 */ 88, 145, 292, 33, 148, 261, 338, 278, 22, 18, + /* 910 */ 306, 292, 292, 292, 23, 45, 47, 288, 343, 351, + /* 920 */ 50, 292, 278, 355, 41, 55, 35, 36, 169, 170, + /* 930 */ 39, 248, 242, 64, 211, 47, 41, 270, 309, 195, + /* 940 */ 196, 312, 313, 314, 315, 316, 317, 56, 319, 250, + /* 950 */ 80, 322, 281, 83, 229, 326, 327, 328, 1, 2, + /* 960 */ 270, 0, 47, 311, 336, 82, 352, 352, 278, 340, + /* 970 */ 41, 339, 81, 20, 41, 346, 347, 82, 288, 352, + /* 980 */ 249, 41, 292, 44, 41, 24, 25, 26, 27, 28, + /* 990 */ 29, 30, 31, 32, 45, 41, 307, 41, 47, 309, + /* 1000 */ 249, 113, 312, 313, 314, 315, 316, 317, 117, 319, + /* 1010 */ 256, 82, 322, 300, 156, 82, 326, 327, 328, 41, + /* 1020 */ 81, 249, 82, 41, 41, 82, 249, 40, 113, 278, + /* 1030 */ 41, 286, 41, 41, 41, 139, 82, 347, 82, 284, + /* 1040 */ 249, 150, 151, 152, 242, 284, 155, 20, 244, 298, + /* 1050 */ 244, 160, 20, 304, 254, 288, 20, 254, 20, 296, + /* 1060 */ 82, 254, 296, 172, 82, 82, 175, 316, 177, 178, + /* 1070 */ 179, 82, 270, 82, 82, 82, 254, 299, 20, 278, + /* 1080 */ 278, 289, 331, 332, 333, 254, 335, 254, 249, 338, + /* 1090 */ 288, 254, 244, 270, 292, 270, 270, 270, 270, 242, + /* 1100 */ 270, 210, 351, 249, 270, 270, 355, 244, 270, 64, + /* 1110 */ 270, 309, 292, 270, 312, 313, 314, 315, 316, 317, + /* 1120 */ 304, 319, 303, 252, 322, 165, 252, 270, 326, 327, + /* 1130 */ 328, 252, 288, 278, 289, 278, 252, 296, 20, 337, + /* 1140 */ 311, 218, 348, 217, 293, 288, 348, 147, 292, 292, + /* 1150 */ 242, 224, 293, 292, 292, 345, 342, 344, 213, 212, + /* 1160 */ 278, 209, 242, 20, 40, 341, 309, 226, 353, 312, + /* 1170 */ 313, 314, 315, 316, 317, 310, 319, 231, 270, 322, + /* 1180 */ 359, 329, 81, 326, 327, 328, 278, 228, 142, 353, + /* 1190 */ 270, 325, 293, 292, 337, 292, 288, 293, 278, 353, + /* 1200 */ 292, 354, 292, 354, 354, 289, 298, 290, 288, 278, + /* 1210 */ 252, 81, 292, 278, 266, 242, 252, 309, 298, 249, + /* 1220 */ 312, 313, 314, 315, 316, 317, 252, 319, 260, 309, + /* 1230 */ 244, 301, 312, 313, 314, 315, 316, 317, 240, 319, + /* 1240 */ 274, 305, 0, 270, 264, 264, 338, 297, 242, 264, + /* 1250 */ 253, 278, 0, 72, 0, 47, 176, 47, 338, 351, + /* 1260 */ 47, 288, 47, 355, 176, 292, 0, 47, 47, 176, + /* 1270 */ 0, 351, 47, 0, 47, 355, 270, 0, 47, 0, + /* 1280 */ 81, 162, 309, 161, 278, 312, 313, 314, 315, 316, + /* 1290 */ 317, 113, 319, 158, 288, 322, 0, 0, 292, 326, + /* 1300 */ 327, 154, 153, 0, 0, 44, 242, 0, 0, 0, + /* 1310 */ 0, 0, 0, 0, 0, 309, 40, 0, 312, 313, + /* 1320 */ 314, 315, 316, 317, 318, 319, 320, 321, 0, 0, + /* 1330 */ 0, 0, 0, 0, 270, 0, 0, 0, 0, 0, + /* 1340 */ 0, 0, 278, 0, 0, 22, 0, 0, 0, 0, + /* 1350 */ 0, 0, 288, 0, 242, 40, 292, 37, 0, 41, + /* 1360 */ 38, 37, 0, 44, 0, 44, 14, 242, 0, 14, + /* 1370 */ 147, 37, 0, 309, 0, 0, 312, 313, 314, 315, + /* 1380 */ 316, 317, 270, 319, 59, 0, 322, 0, 0, 47, + /* 1390 */ 278, 327, 47, 37, 37, 270, 37, 0, 0, 45, + /* 1400 */ 288, 0, 0, 278, 292, 45, 37, 295, 47, 0, + /* 1410 */ 45, 45, 22, 288, 47, 242, 90, 292, 37, 0, + /* 1420 */ 47, 309, 0, 47, 312, 313, 314, 315, 316, 317, + /* 1430 */ 47, 319, 41, 47, 309, 41, 47, 312, 313, 314, + /* 1440 */ 315, 316, 317, 270, 319, 22, 47, 47, 0, 22, + /* 1450 */ 47, 278, 48, 0, 47, 22, 0, 22, 88, 0, + /* 1460 */ 22, 288, 20, 0, 47, 292, 242, 0, 163, 22, + /* 1470 */ 0, 0, 145, 0, 81, 350, 37, 242, 41, 214, + /* 1480 */ 44, 41, 309, 214, 41, 312, 313, 314, 315, 316, + /* 1490 */ 317, 81, 319, 82, 270, 82, 81, 81, 41, 44, + /* 1500 */ 82, 81, 278, 41, 44, 270, 82, 82, 145, 208, + /* 1510 */ 41, 140, 288, 278, 214, 47, 292, 41, 44, 295, + /* 1520 */ 142, 2, 47, 288, 47, 242, 82, 292, 82, 47, + /* 1530 */ 357, 47, 47, 309, 41, 81, 312, 313, 314, 315, + /* 1540 */ 316, 317, 44, 319, 309, 44, 82, 312, 313, 314, + /* 1550 */ 315, 316, 317, 270, 319, 22, 321, 180, 242, 0, + /* 1560 */ 82, 278, 81, 37, 182, 44, 44, 81, 81, 143, + /* 1570 */ 82, 288, 82, 81, 140, 292, 81, 81, 295, 82, + /* 1580 */ 81, 81, 91, 81, 22, 81, 270, 82, 47, 47, + /* 1590 */ 82, 81, 309, 47, 278, 312, 313, 314, 315, 316, + /* 1600 */ 317, 92, 319, 47, 288, 81, 22, 82, 292, 81, + /* 1610 */ 47, 295, 82, 81, 47, 47, 82, 81, 81, 105, + /* 1620 */ 105, 242, 105, 105, 93, 309, 33, 58, 312, 313, + /* 1630 */ 314, 315, 316, 317, 242, 319, 81, 22, 45, 81, + /* 1640 */ 113, 59, 47, 64, 51, 52, 53, 54, 55, 270, + /* 1650 */ 79, 41, 22, 47, 47, 47, 47, 278, 47, 47, + /* 1660 */ 47, 64, 270, 47, 47, 47, 47, 288, 47, 47, + /* 1670 */ 278, 292, 47, 80, 242, 0, 83, 45, 47, 37, + /* 1680 */ 288, 0, 47, 45, 292, 37, 0, 47, 309, 45, + /* 1690 */ 37, 312, 313, 314, 315, 316, 317, 0, 319, 47, + /* 1700 */ 45, 309, 270, 37, 312, 313, 314, 315, 316, 317, + /* 1710 */ 278, 319, 0, 0, 47, 46, 0, 22, 22, 21, + /* 1720 */ 288, 22, 21, 20, 292, 242, 360, 360, 360, 360, + /* 1730 */ 360, 360, 360, 140, 360, 142, 360, 144, 360, 146, + /* 1740 */ 360, 309, 360, 360, 312, 313, 314, 315, 316, 317, + /* 1750 */ 360, 319, 360, 270, 360, 242, 360, 360, 360, 166, + /* 1760 */ 360, 278, 360, 360, 360, 360, 360, 360, 360, 360, + /* 1770 */ 360, 288, 360, 360, 360, 292, 360, 360, 360, 360, + /* 1780 */ 360, 360, 360, 270, 360, 360, 360, 242, 360, 360, + /* 1790 */ 360, 278, 309, 360, 360, 312, 313, 314, 315, 316, + /* 1800 */ 317, 288, 319, 360, 360, 292, 360, 360, 360, 360, + /* 1810 */ 360, 360, 360, 360, 360, 270, 360, 360, 360, 360, + /* 1820 */ 360, 360, 309, 278, 360, 312, 313, 314, 315, 316, + /* 1830 */ 317, 360, 319, 288, 360, 360, 360, 292, 242, 360, + /* 1840 */ 360, 360, 360, 360, 360, 360, 360, 242, 360, 360, + /* 1850 */ 360, 360, 360, 360, 309, 360, 360, 312, 313, 314, + /* 1860 */ 315, 316, 317, 360, 319, 360, 270, 360, 360, 360, + /* 1870 */ 360, 360, 360, 360, 278, 270, 360, 360, 360, 360, + /* 1880 */ 360, 360, 360, 278, 288, 360, 360, 360, 292, 360, + /* 1890 */ 360, 360, 360, 288, 360, 360, 360, 292, 360, 360, + /* 1900 */ 242, 360, 360, 360, 360, 309, 360, 360, 312, 313, + /* 1910 */ 314, 315, 316, 317, 309, 319, 242, 312, 313, 314, + /* 1920 */ 315, 316, 317, 360, 319, 360, 360, 360, 270, 360, + /* 1930 */ 360, 360, 360, 360, 360, 360, 278, 360, 360, 360, + /* 1940 */ 360, 360, 360, 360, 270, 360, 288, 360, 242, 360, + /* 1950 */ 292, 360, 278, 360, 360, 360, 360, 360, 360, 360, + /* 1960 */ 360, 360, 288, 360, 360, 360, 292, 309, 360, 360, + /* 1970 */ 312, 313, 314, 315, 316, 317, 270, 319, 242, 360, + /* 1980 */ 360, 360, 360, 309, 278, 360, 312, 313, 314, 315, + /* 1990 */ 316, 317, 360, 319, 288, 360, 360, 360, 292, 360, + /* 2000 */ 360, 360, 360, 360, 360, 360, 270, 360, 360, 360, + /* 2010 */ 360, 360, 360, 360, 278, 309, 360, 360, 312, 313, + /* 2020 */ 314, 315, 316, 317, 288, 319, 242, 360, 292, 360, + /* 2030 */ 360, 12, 13, 360, 360, 242, 360, 360, 360, 360, + /* 2040 */ 360, 22, 360, 360, 360, 309, 360, 360, 312, 313, + /* 2050 */ 314, 315, 316, 317, 270, 319, 360, 360, 360, 360, + /* 2060 */ 360, 360, 278, 270, 360, 360, 47, 360, 360, 360, + /* 2070 */ 360, 278, 288, 360, 360, 360, 292, 360, 360, 360, + /* 2080 */ 360, 288, 360, 64, 360, 292, 360, 360, 360, 360, + /* 2090 */ 242, 360, 360, 309, 360, 360, 312, 313, 314, 315, + /* 2100 */ 316, 317, 309, 319, 360, 312, 313, 314, 315, 316, + /* 2110 */ 317, 360, 319, 360, 360, 360, 360, 360, 270, 360, + /* 2120 */ 360, 360, 103, 360, 360, 360, 278, 360, 360, 360, + /* 2130 */ 360, 360, 113, 360, 360, 360, 288, 360, 360, 360, + /* 2140 */ 292, 360, 360, 360, 360, 360, 360, 360, 360, 360, + /* 2150 */ 360, 360, 360, 360, 360, 360, 360, 309, 360, 360, + /* 2160 */ 312, 313, 314, 315, 316, 317, 360, 319, 360, 360, + /* 2170 */ 360, 360, 360, 360, 360, 360, 360, 158, 360, 360, + /* 2180 */ 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, + /* 2190 */ 360, 360, 360, 360, 360, 360, 360, 360, 360, 180, + /* 2200 */ 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, + /* 2210 */ 191, 192, 193, 360, 360, 360, 360, 360, 360, 360, + /* 2220 */ 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, + /* 2230 */ 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, + /* 2240 */ 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, + /* 2250 */ 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, + /* 2260 */ 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, + /* 2270 */ 360, }; -#define YY_SHIFT_COUNT (611) +#define YY_SHIFT_COUNT (610) #define YY_SHIFT_MIN (0) -#define YY_SHIFT_MAX (1941) +#define YY_SHIFT_MAX (2019) static const unsigned short int yy_shift_ofst[] = { - /* 0 */ 687, 0, 0, 48, 96, 96, 96, 96, 283, 283, - /* 10 */ 96, 96, 331, 379, 566, 379, 379, 379, 379, 379, - /* 20 */ 379, 379, 379, 379, 379, 379, 379, 379, 379, 379, - /* 30 */ 379, 379, 379, 379, 379, 379, 379, 379, 281, 281, - /* 40 */ 26, 26, 26, 1941, 1941, 1941, 1941, 328, 64, 191, - /* 50 */ 39, 39, 14, 14, 146, 191, 191, 39, 39, 39, - /* 60 */ 39, 39, 39, 108, 39, 163, 229, 485, 163, 39, - /* 70 */ 39, 163, 39, 163, 163, 485, 163, 39, 667, 562, - /* 80 */ 62, 762, 762, 188, 266, 823, 823, 823, 823, 823, - /* 90 */ 823, 823, 823, 823, 823, 823, 823, 823, 823, 823, - /* 100 */ 823, 823, 823, 823, 213, 376, 332, 332, 42, 544, - /* 110 */ 517, 517, 517, 311, 544, 630, 485, 163, 163, 485, - /* 120 */ 616, 665, 446, 446, 446, 446, 446, 446, 446, 1234, - /* 130 */ 427, 435, 471, 200, 36, 223, 119, 597, 592, 327, - /* 140 */ 707, 715, 576, 464, 576, 587, 587, 587, 202, 729, - /* 150 */ 1019, 996, 998, 889, 1019, 1019, 1016, 928, 928, 1019, - /* 160 */ 1058, 1058, 1061, 108, 485, 108, 1064, 1078, 108, 1064, - /* 170 */ 108, 630, 1088, 108, 108, 1019, 108, 1058, 163, 163, - /* 180 */ 163, 163, 163, 163, 163, 163, 163, 163, 163, 1019, - /* 190 */ 1058, 1070, 1061, 667, 984, 485, 667, 1064, 667, 630, - /* 200 */ 1088, 667, 1144, 948, 950, 1070, 948, 950, 1070, 1070, - /* 210 */ 163, 946, 1048, 986, 990, 995, 630, 1187, 1169, 994, - /* 220 */ 988, 993, 994, 988, 994, 988, 1132, 950, 1070, 1070, - /* 230 */ 950, 1070, 1108, 630, 1088, 667, 616, 667, 630, 1181, - /* 240 */ 665, 1019, 667, 1058, 2136, 2136, 2136, 2136, 2136, 2136, - /* 250 */ 2136, 2136, 247, 573, 614, 1106, 488, 741, 18, 13, - /* 260 */ 581, 238, 520, 243, 244, 244, 244, 244, 244, 244, - /* 270 */ 244, 244, 477, 148, 59, 5, 583, 230, 697, 697, - /* 280 */ 697, 697, 792, 833, 654, 743, 795, 808, 444, 829, - /* 290 */ 917, 902, 656, 745, 890, 901, 903, 926, 733, 489, - /* 300 */ 704, 910, 813, 911, 899, 914, 915, 916, 918, 919, - /* 310 */ 888, 898, 945, 954, 962, 968, 970, 981, 804, 967, - /* 320 */ 1298, 1300, 1229, 1302, 1256, 1127, 1258, 1259, 1260, 1131, - /* 330 */ 1310, 1265, 1268, 1141, 1319, 1273, 1321, 1275, 1323, 1277, - /* 340 */ 1325, 1245, 1164, 1166, 1215, 1172, 1332, 1341, 1188, 1190, - /* 350 */ 1342, 1345, 1304, 1346, 1349, 1350, 1352, 1353, 1354, 1355, - /* 360 */ 1356, 1358, 1360, 1362, 1363, 1364, 1365, 1366, 1367, 1369, - /* 370 */ 1370, 1331, 1372, 1373, 1374, 1375, 1377, 1380, 1368, 1389, - /* 380 */ 1391, 1392, 1393, 1394, 1400, 1357, 1361, 1371, 1388, 1359, - /* 390 */ 1396, 1376, 1406, 1378, 1386, 1407, 1408, 1411, 1387, 1267, - /* 400 */ 1413, 1417, 1390, 1425, 1385, 1428, 1446, 1401, 1402, 1412, - /* 410 */ 1451, 1405, 1409, 1416, 1455, 1410, 1414, 1419, 1460, 1415, - /* 420 */ 1418, 1424, 1464, 1466, 1467, 1469, 1381, 1398, 1429, 1453, - /* 430 */ 1477, 1431, 1432, 1433, 1434, 1441, 1443, 1444, 1456, 1458, - /* 440 */ 1488, 1478, 1502, 1495, 1470, 1515, 1497, 1475, 1524, 1504, - /* 450 */ 1527, 1506, 1509, 1530, 1403, 1485, 1533, 1384, 1512, 1404, - /* 460 */ 1395, 1536, 1539, 1546, 1473, 1514, 1422, 1523, 1525, 1379, - /* 470 */ 1483, 1526, 1486, 1489, 1491, 1492, 1487, 1535, 1534, 1537, - /* 480 */ 1498, 1542, 1399, 1500, 1503, 1540, 1420, 1545, 1543, 1507, - /* 490 */ 1547, 1421, 1508, 1544, 1554, 1556, 1557, 1559, 1560, 1508, - /* 500 */ 1572, 1427, 1552, 1528, 1499, 1529, 1565, 1531, 1538, 1571, - /* 510 */ 1594, 1435, 1549, 1550, 1551, 1558, 1561, 1476, 1562, 1617, - /* 520 */ 1584, 1481, 1564, 1555, 1580, 1582, 1574, 1575, 1577, 1609, - /* 530 */ 1578, 1568, 1581, 1587, 1588, 1583, 1585, 1590, 1589, 1592, - /* 540 */ 1591, 1596, 1597, 1615, 1599, 1600, 1618, 1602, 1567, 1573, - /* 550 */ 1576, 1579, 1619, 1563, 1604, 1607, 1622, 1608, 1610, 1640, - /* 560 */ 1644, 1569, 1633, 1646, 1630, 1624, 1663, 1658, 1659, 1661, - /* 570 */ 1671, 1673, 1694, 1674, 1675, 1662, 1441, 1678, 1443, 1681, - /* 580 */ 1682, 1683, 1684, 1685, 1686, 1734, 1688, 1692, 1701, 1739, - /* 590 */ 1695, 1696, 1712, 1751, 1705, 1708, 1717, 1765, 1709, 1713, - /* 600 */ 1720, 1759, 1714, 1716, 1760, 1766, 1745, 1747, 1748, 1749, - /* 610 */ 1753, 1755, + /* 0 */ 891, 0, 0, 48, 96, 96, 96, 96, 282, 282, + /* 10 */ 96, 96, 330, 378, 564, 378, 378, 378, 378, 378, + /* 20 */ 378, 378, 378, 378, 378, 378, 378, 378, 378, 378, + /* 30 */ 378, 378, 378, 378, 378, 378, 378, 378, 49, 49, + /* 40 */ 26, 26, 26, 2019, 2019, 2019, 2019, 191, 43, 60, + /* 50 */ 31, 31, 7, 7, 141, 60, 60, 31, 31, 31, + /* 60 */ 31, 31, 31, 23, 31, 80, 142, 178, 80, 31, + /* 70 */ 31, 80, 31, 80, 80, 178, 80, 31, 253, 560, + /* 80 */ 14, 62, 62, 309, 293, 678, 678, 678, 678, 678, + /* 90 */ 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, + /* 100 */ 678, 678, 678, 678, 517, 37, 634, 634, 327, 78, + /* 110 */ 305, 305, 305, 649, 78, 367, 178, 80, 80, 178, + /* 120 */ 267, 599, 320, 320, 320, 320, 320, 320, 320, 684, + /* 130 */ 612, 434, 28, 77, 36, 245, 350, 609, 698, 513, + /* 140 */ 115, 489, 588, 565, 588, 673, 673, 673, 723, 633, + /* 150 */ 953, 949, 951, 858, 953, 953, 987, 896, 896, 953, + /* 160 */ 1027, 1027, 1032, 23, 178, 23, 1036, 1038, 23, 1036, + /* 170 */ 23, 367, 1058, 23, 23, 953, 23, 1027, 80, 80, + /* 180 */ 80, 80, 80, 80, 80, 80, 80, 80, 80, 953, + /* 190 */ 1027, 1045, 1032, 253, 960, 178, 253, 1036, 253, 367, + /* 200 */ 1058, 253, 1118, 923, 926, 1045, 923, 926, 1045, 1045, + /* 210 */ 80, 927, 1000, 945, 947, 952, 367, 1143, 1124, 959, + /* 220 */ 941, 946, 959, 941, 959, 941, 1101, 926, 1045, 1045, + /* 230 */ 926, 1045, 1046, 367, 1058, 253, 267, 253, 367, 1130, + /* 240 */ 599, 953, 253, 1027, 2213, 2213, 2213, 2213, 2213, 2213, + /* 250 */ 2213, 2213, 246, 1593, 961, 870, 359, 442, 697, 235, + /* 260 */ 423, 159, 504, 470, 470, 470, 470, 470, 470, 470, + /* 270 */ 470, 233, 473, 248, 107, 501, 527, 394, 341, 341, + /* 280 */ 341, 341, 768, 661, 741, 752, 769, 812, 256, 842, + /* 290 */ 886, 376, 759, 756, 762, 883, 895, 957, 744, 638, + /* 300 */ 725, 929, 647, 933, 939, 940, 943, 954, 956, 978, + /* 310 */ 888, 915, 982, 983, 989, 991, 992, 993, 740, 869, + /* 320 */ 1242, 1252, 1181, 1254, 1208, 1080, 1210, 1213, 1215, 1088, + /* 330 */ 1266, 1220, 1221, 1093, 1270, 1225, 1273, 1227, 1277, 1231, + /* 340 */ 1279, 1199, 1119, 1122, 1178, 1135, 1296, 1297, 1147, 1149, + /* 350 */ 1303, 1304, 1261, 1307, 1308, 1309, 1310, 1311, 1312, 1313, + /* 360 */ 1314, 1328, 1329, 1330, 1331, 1332, 1333, 1335, 1336, 1337, + /* 370 */ 1338, 1276, 1317, 1339, 1340, 1341, 1343, 1344, 1323, 1346, + /* 380 */ 1347, 1348, 1349, 1350, 1351, 1315, 1320, 1318, 1352, 1319, + /* 390 */ 1355, 1321, 1353, 1322, 1324, 1358, 1362, 1364, 1334, 1223, + /* 400 */ 1368, 1372, 1356, 1374, 1325, 1375, 1385, 1342, 1354, 1357, + /* 410 */ 1387, 1345, 1360, 1359, 1388, 1361, 1365, 1369, 1397, 1367, + /* 420 */ 1366, 1381, 1398, 1401, 1402, 1409, 1326, 1370, 1373, 1390, + /* 430 */ 1419, 1376, 1383, 1386, 1389, 1391, 1394, 1399, 1400, 1403, + /* 440 */ 1422, 1423, 1448, 1427, 1404, 1453, 1433, 1407, 1456, 1435, + /* 450 */ 1459, 1438, 1442, 1463, 1327, 1417, 1467, 1305, 1447, 1363, + /* 460 */ 1378, 1470, 1471, 1473, 1393, 1439, 1371, 1437, 1440, 1265, + /* 470 */ 1411, 1443, 1413, 1410, 1415, 1416, 1418, 1457, 1436, 1455, + /* 480 */ 1420, 1462, 1269, 1424, 1425, 1460, 1301, 1469, 1474, 1444, + /* 490 */ 1476, 1300, 1446, 1468, 1475, 1477, 1482, 1484, 1485, 1446, + /* 500 */ 1519, 1377, 1493, 1464, 1454, 1478, 1498, 1481, 1486, 1501, + /* 510 */ 1533, 1382, 1487, 1488, 1490, 1492, 1495, 1426, 1496, 1559, + /* 520 */ 1526, 1434, 1499, 1491, 1521, 1522, 1500, 1497, 1502, 1562, + /* 530 */ 1504, 1509, 1505, 1541, 1542, 1510, 1508, 1546, 1524, 1525, + /* 540 */ 1556, 1528, 1530, 1563, 1532, 1534, 1567, 1536, 1514, 1515, + /* 550 */ 1517, 1518, 1584, 1531, 1537, 1555, 1568, 1558, 1527, 1615, + /* 560 */ 1582, 1569, 1595, 1579, 1571, 1610, 1606, 1607, 1608, 1609, + /* 570 */ 1611, 1630, 1612, 1613, 1597, 1391, 1616, 1394, 1617, 1618, + /* 580 */ 1619, 1621, 1622, 1625, 1675, 1631, 1632, 1642, 1681, 1635, + /* 590 */ 1638, 1648, 1686, 1640, 1644, 1653, 1697, 1652, 1655, 1666, + /* 600 */ 1712, 1667, 1669, 1713, 1716, 1695, 1698, 1696, 1699, 1701, + /* 610 */ 1703, }; #define YY_REDUCE_COUNT (251) -#define YY_REDUCE_MIN (-314) -#define YY_REDUCE_MAX (1756) +#define YY_REDUCE_MIN (-309) +#define YY_REDUCE_MAX (1848) static const short yy_reduce_ofst[] = { - /* 0 */ 33, -226, 494, 90, 593, 344, 661, 744, 776, 806, - /* 10 */ 864, 904, -147, 923, 955, 1020, 1068, 1116, 1125, 1179, - /* 20 */ 1194, 1227, 1242, 1282, 1334, 1382, 1397, 1430, 1484, 1493, - /* 30 */ 1541, 1553, 1593, 1606, 1654, 1669, 1702, 1756, 545, 674, - /* 40 */ -196, 398, 556, -272, -270, -238, -162, 428, 38, 76, - /* 50 */ -164, 459, -241, -205, -287, -229, 24, -101, 92, 252, - /* 60 */ 357, 370, 457, 73, 519, -269, -115, -170, 102, 539, - /* 70 */ 540, 228, 553, 170, 338, 270, 508, 580, 402, 420, - /* 80 */ -314, -314, -314, -193, -103, -227, -67, -22, 123, 168, - /* 90 */ 204, 319, 386, 440, 501, 503, 523, 548, 554, 582, - /* 100 */ 606, 612, 625, 626, -246, -172, 29, 199, -54, 130, - /* 110 */ -207, -194, -37, 236, 205, 212, 141, 395, 629, 310, - /* 120 */ 439, 511, -253, 527, 604, 666, 675, 676, 677, -303, - /* 130 */ 689, 686, 599, 668, 709, 673, 749, 749, 772, 773, - /* 140 */ 746, 713, 692, 692, 692, 679, 681, 682, 698, 749, - /* 150 */ 790, 734, 786, 747, 801, 803, 779, 785, 789, 826, - /* 160 */ 834, 835, 778, 832, 799, 842, 805, 800, 846, 807, - /* 170 */ 848, 827, 819, 856, 857, 863, 859, 872, 847, 858, - /* 180 */ 860, 862, 865, 866, 867, 869, 870, 871, 873, 877, - /* 190 */ 885, 853, 843, 896, 850, 874, 906, 855, 907, 876, - /* 200 */ 875, 920, 878, 820, 882, 879, 821, 891, 895, 908, - /* 210 */ 749, 849, 854, 861, 868, 692, 927, 897, 881, 880, - /* 220 */ 892, 887, 894, 900, 905, 912, 924, 934, 936, 937, - /* 230 */ 951, 949, 961, 976, 966, 1004, 991, 1006, 982, 989, - /* 240 */ 1013, 1026, 1024, 1037, 992, 978, 997, 1025, 1027, 1028, - /* 250 */ 1042, 1056, + /* 0 */ -205, 492, 568, 629, 690, 343, 802, 857, 908, 920, + /* 10 */ -225, 973, 1006, 90, 1064, 1112, 1125, 1173, 1224, 1235, + /* 20 */ 1283, 1316, -144, 1379, 1392, 1432, 1483, 1513, 1545, 1596, + /* 30 */ 1605, 1658, 1674, 1706, 1736, 1784, 1793, 1848, 537, 751, + /* 40 */ -195, 215, 263, -271, -153, -253, -145, 200, 202, 363, + /* 50 */ -243, 339, -245, -240, -223, 38, 41, 344, 455, 514, + /* 60 */ 516, 524, 563, -244, 571, -246, -147, -209, 275, 538, + /* 70 */ 573, 219, 618, 445, 262, 165, 509, 644, -200, -178, + /* 80 */ -309, -309, -309, -18, 46, -143, -37, 238, 307, 372, + /* 90 */ 383, 431, 477, 484, 486, 490, 541, 547, 553, 581, + /* 100 */ 610, 619, 620, 621, 100, -140, -132, 137, -97, 156, + /* 110 */ -301, 98, 281, 399, 286, 212, 336, 451, 438, 295, + /* 120 */ 185, 408, -255, 216, 356, 403, 460, 475, 584, 496, + /* 130 */ 529, 617, 520, 542, 604, 575, 667, 667, 683, 699, + /* 140 */ 671, 652, 628, 628, 628, 614, 615, 627, 632, 667, + /* 150 */ 731, 689, 754, 713, 772, 777, 745, 755, 761, 791, + /* 160 */ 804, 806, 749, 800, 767, 803, 763, 778, 807, 766, + /* 170 */ 822, 801, 792, 831, 833, 839, 837, 848, 823, 825, + /* 180 */ 826, 827, 828, 830, 834, 835, 838, 840, 843, 854, + /* 190 */ 863, 820, 816, 871, 819, 844, 874, 841, 879, 855, + /* 200 */ 845, 884, 829, 794, 851, 856, 798, 859, 861, 862, + /* 210 */ 667, 810, 813, 814, 824, 628, 882, 865, 852, 847, + /* 220 */ 815, 821, 849, 836, 850, 846, 866, 899, 901, 903, + /* 230 */ 904, 910, 917, 931, 916, 958, 948, 964, 935, 966, + /* 240 */ 968, 970, 974, 986, 930, 936, 950, 980, 981, 985, + /* 250 */ 997, 998, }; static const YYACTIONTYPE yy_default[] = { - /* 0 */ 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, - /* 10 */ 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, - /* 20 */ 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, - /* 30 */ 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, - /* 40 */ 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, - /* 50 */ 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, - /* 60 */ 1357, 1357, 1357, 1426, 1357, 1357, 1357, 1357, 1357, 1357, - /* 70 */ 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1424, 1565, - /* 80 */ 1357, 1732, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, - /* 90 */ 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, - /* 100 */ 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1426, 1357, - /* 110 */ 1743, 1743, 1743, 1424, 1357, 1357, 1357, 1357, 1357, 1357, - /* 120 */ 1520, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1604, - /* 130 */ 1357, 1357, 1809, 1357, 1610, 1767, 1357, 1357, 1357, 1357, - /* 140 */ 1473, 1759, 1735, 1749, 1736, 1794, 1794, 1794, 1752, 1357, - /* 150 */ 1357, 1357, 1357, 1596, 1357, 1357, 1570, 1567, 1567, 1357, - /* 160 */ 1357, 1357, 1357, 1426, 1357, 1426, 1357, 1357, 1426, 1357, - /* 170 */ 1426, 1357, 1357, 1426, 1426, 1357, 1426, 1357, 1357, 1357, - /* 180 */ 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, - /* 190 */ 1357, 1357, 1357, 1424, 1606, 1357, 1424, 1357, 1424, 1357, - /* 200 */ 1357, 1424, 1357, 1774, 1772, 1357, 1774, 1772, 1357, 1357, - /* 210 */ 1357, 1786, 1782, 1765, 1763, 1749, 1357, 1357, 1357, 1800, - /* 220 */ 1796, 1812, 1800, 1796, 1800, 1796, 1357, 1772, 1357, 1357, - /* 230 */ 1772, 1357, 1578, 1357, 1357, 1424, 1357, 1424, 1357, 1489, - /* 240 */ 1357, 1357, 1424, 1357, 1598, 1612, 1588, 1523, 1523, 1523, - /* 250 */ 1427, 1362, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, - /* 260 */ 1357, 1357, 1357, 1485, 1676, 1785, 1784, 1708, 1707, 1706, - /* 270 */ 1704, 1675, 1357, 1357, 1357, 1357, 1357, 1357, 1669, 1670, - /* 280 */ 1668, 1667, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, - /* 290 */ 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1733, 1357, 1797, - /* 300 */ 1801, 1357, 1357, 1357, 1652, 1357, 1357, 1357, 1357, 1357, - /* 310 */ 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, - /* 320 */ 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, - /* 330 */ 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, - /* 340 */ 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, - /* 350 */ 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, - /* 360 */ 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, - /* 370 */ 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, - /* 380 */ 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1391, 1357, 1357, - /* 390 */ 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, - /* 400 */ 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, - /* 410 */ 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, - /* 420 */ 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, - /* 430 */ 1357, 1357, 1357, 1357, 1357, 1454, 1453, 1357, 1357, 1357, - /* 440 */ 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, - /* 450 */ 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, - /* 460 */ 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1756, 1766, 1357, - /* 470 */ 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1652, - /* 480 */ 1357, 1783, 1357, 1742, 1738, 1357, 1357, 1734, 1357, 1357, - /* 490 */ 1795, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, - /* 500 */ 1728, 1357, 1701, 1357, 1357, 1357, 1357, 1357, 1357, 1357, - /* 510 */ 1357, 1663, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, - /* 520 */ 1357, 1357, 1357, 1357, 1651, 1357, 1692, 1357, 1357, 1357, - /* 530 */ 1357, 1357, 1357, 1357, 1357, 1517, 1357, 1357, 1357, 1357, - /* 540 */ 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1502, 1500, - /* 550 */ 1499, 1498, 1357, 1495, 1357, 1357, 1357, 1357, 1357, 1357, - /* 560 */ 1357, 1357, 1357, 1357, 1357, 1357, 1446, 1357, 1357, 1357, - /* 570 */ 1357, 1357, 1357, 1357, 1357, 1357, 1437, 1357, 1436, 1357, - /* 580 */ 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, - /* 590 */ 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, - /* 600 */ 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, - /* 610 */ 1357, 1357, + /* 0 */ 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, + /* 10 */ 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, + /* 20 */ 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, + /* 30 */ 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, + /* 40 */ 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, + /* 50 */ 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, + /* 60 */ 1354, 1354, 1354, 1423, 1354, 1354, 1354, 1354, 1354, 1354, + /* 70 */ 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1421, 1561, + /* 80 */ 1354, 1728, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, + /* 90 */ 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, + /* 100 */ 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1423, 1354, + /* 110 */ 1739, 1739, 1739, 1421, 1354, 1354, 1354, 1354, 1354, 1354, + /* 120 */ 1517, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1600, + /* 130 */ 1354, 1354, 1805, 1354, 1606, 1763, 1354, 1354, 1354, 1354, + /* 140 */ 1470, 1755, 1731, 1745, 1732, 1790, 1790, 1790, 1748, 1354, + /* 150 */ 1354, 1354, 1354, 1592, 1354, 1354, 1566, 1563, 1563, 1354, + /* 160 */ 1354, 1354, 1354, 1423, 1354, 1423, 1354, 1354, 1423, 1354, + /* 170 */ 1423, 1354, 1354, 1423, 1423, 1354, 1423, 1354, 1354, 1354, + /* 180 */ 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, + /* 190 */ 1354, 1354, 1354, 1421, 1602, 1354, 1421, 1354, 1421, 1354, + /* 200 */ 1354, 1421, 1354, 1770, 1768, 1354, 1770, 1768, 1354, 1354, + /* 210 */ 1354, 1782, 1778, 1761, 1759, 1745, 1354, 1354, 1354, 1796, + /* 220 */ 1792, 1808, 1796, 1792, 1796, 1792, 1354, 1768, 1354, 1354, + /* 230 */ 1768, 1354, 1574, 1354, 1354, 1421, 1354, 1421, 1354, 1486, + /* 240 */ 1354, 1354, 1421, 1354, 1594, 1608, 1584, 1520, 1520, 1520, + /* 250 */ 1424, 1359, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, + /* 260 */ 1354, 1354, 1354, 1672, 1781, 1780, 1704, 1703, 1702, 1700, + /* 270 */ 1671, 1482, 1354, 1354, 1354, 1354, 1354, 1354, 1665, 1666, + /* 280 */ 1664, 1663, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, + /* 290 */ 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1729, 1354, 1793, + /* 300 */ 1797, 1354, 1354, 1354, 1648, 1354, 1354, 1354, 1354, 1354, + /* 310 */ 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, + /* 320 */ 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, + /* 330 */ 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, + /* 340 */ 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, + /* 350 */ 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, + /* 360 */ 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, + /* 370 */ 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, + /* 380 */ 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1388, 1354, 1354, + /* 390 */ 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, + /* 400 */ 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, + /* 410 */ 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, + /* 420 */ 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, + /* 430 */ 1354, 1354, 1354, 1354, 1354, 1451, 1450, 1354, 1354, 1354, + /* 440 */ 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, + /* 450 */ 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, + /* 460 */ 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1752, 1762, 1354, + /* 470 */ 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1648, + /* 480 */ 1354, 1779, 1354, 1738, 1734, 1354, 1354, 1730, 1354, 1354, + /* 490 */ 1791, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, + /* 500 */ 1724, 1354, 1697, 1354, 1354, 1354, 1354, 1354, 1354, 1354, + /* 510 */ 1354, 1659, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, + /* 520 */ 1354, 1354, 1354, 1354, 1647, 1354, 1688, 1354, 1354, 1354, + /* 530 */ 1354, 1354, 1354, 1354, 1354, 1514, 1354, 1354, 1354, 1354, + /* 540 */ 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1499, 1497, + /* 550 */ 1496, 1495, 1354, 1492, 1354, 1354, 1354, 1354, 1354, 1354, + /* 560 */ 1354, 1354, 1354, 1354, 1354, 1443, 1354, 1354, 1354, 1354, + /* 570 */ 1354, 1354, 1354, 1354, 1354, 1434, 1354, 1433, 1354, 1354, + /* 580 */ 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, + /* 590 */ 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, + /* 600 */ 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, + /* 610 */ 1354, }; /********** End of lemon-generated parsing tables *****************************/ @@ -942,7 +958,6 @@ static const YYCODETYPE yyFallback[] = { 0, /* BLOB => nothing */ 0, /* VARBINARY => nothing */ 0, /* DECIMAL => nothing */ - 0, /* DELAY => nothing */ 0, /* FILE_FACTOR => nothing */ 0, /* NK_FLOAT => nothing */ 0, /* ROLLUP => nothing */ @@ -1064,12 +1079,12 @@ static const YYCODETYPE yyFallback[] = { 0, /* ASC => nothing */ 0, /* NULLS => nothing */ 0, /* ID => nothing */ - 233, /* NK_BITNOT => ID */ - 233, /* INSERT => ID */ - 233, /* VALUES => ID */ - 233, /* IMPORT => ID */ - 233, /* NK_SEMI => ID */ - 233, /* FILE => ID */ + 232, /* NK_BITNOT => ID */ + 232, /* INSERT => ID */ + 232, /* VALUES => ID */ + 232, /* IMPORT => ID */ + 232, /* NK_SEMI => ID */ + 232, /* FILE => ID */ }; #endif /* YYFALLBACK */ @@ -1269,255 +1284,254 @@ static const char *const yyTokenName[] = { /* 109 */ "BLOB", /* 110 */ "VARBINARY", /* 111 */ "DECIMAL", - /* 112 */ "DELAY", - /* 113 */ "FILE_FACTOR", - /* 114 */ "NK_FLOAT", - /* 115 */ "ROLLUP", - /* 116 */ "TTL", - /* 117 */ "SMA", - /* 118 */ "SHOW", - /* 119 */ "DATABASES", - /* 120 */ "TABLES", - /* 121 */ "STABLES", - /* 122 */ "MNODES", - /* 123 */ "MODULES", - /* 124 */ "QNODES", - /* 125 */ "FUNCTIONS", - /* 126 */ "INDEXES", - /* 127 */ "ACCOUNTS", - /* 128 */ "APPS", - /* 129 */ "CONNECTIONS", - /* 130 */ "LICENCE", - /* 131 */ "GRANTS", - /* 132 */ "QUERIES", - /* 133 */ "SCORES", - /* 134 */ "TOPICS", - /* 135 */ "VARIABLES", - /* 136 */ "BNODES", - /* 137 */ "SNODES", - /* 138 */ "CLUSTER", - /* 139 */ "TRANSACTIONS", - /* 140 */ "LIKE", - /* 141 */ "INDEX", - /* 142 */ "FULLTEXT", - /* 143 */ "FUNCTION", - /* 144 */ "INTERVAL", - /* 145 */ "TOPIC", - /* 146 */ "AS", - /* 147 */ "CONSUMER", - /* 148 */ "GROUP", - /* 149 */ "WITH", - /* 150 */ "SCHEMA", - /* 151 */ "DESC", - /* 152 */ "DESCRIBE", - /* 153 */ "RESET", - /* 154 */ "QUERY", - /* 155 */ "CACHE", - /* 156 */ "EXPLAIN", - /* 157 */ "ANALYZE", - /* 158 */ "VERBOSE", - /* 159 */ "NK_BOOL", - /* 160 */ "RATIO", - /* 161 */ "COMPACT", - /* 162 */ "VNODES", - /* 163 */ "IN", - /* 164 */ "OUTPUTTYPE", - /* 165 */ "AGGREGATE", - /* 166 */ "BUFSIZE", - /* 167 */ "STREAM", - /* 168 */ "INTO", - /* 169 */ "TRIGGER", - /* 170 */ "AT_ONCE", - /* 171 */ "WINDOW_CLOSE", - /* 172 */ "WATERMARK", - /* 173 */ "KILL", - /* 174 */ "CONNECTION", - /* 175 */ "TRANSACTION", - /* 176 */ "MERGE", - /* 177 */ "VGROUP", - /* 178 */ "REDISTRIBUTE", - /* 179 */ "SPLIT", - /* 180 */ "SYNCDB", - /* 181 */ "NULL", - /* 182 */ "NK_QUESTION", - /* 183 */ "NK_ARROW", - /* 184 */ "ROWTS", - /* 185 */ "TBNAME", - /* 186 */ "QSTARTTS", - /* 187 */ "QENDTS", - /* 188 */ "WSTARTTS", - /* 189 */ "WENDTS", - /* 190 */ "WDURATION", - /* 191 */ "CAST", - /* 192 */ "NOW", - /* 193 */ "TODAY", - /* 194 */ "TIMEZONE", - /* 195 */ "COUNT", - /* 196 */ "FIRST", - /* 197 */ "LAST", - /* 198 */ "LAST_ROW", - /* 199 */ "BETWEEN", - /* 200 */ "IS", - /* 201 */ "NK_LT", - /* 202 */ "NK_GT", - /* 203 */ "NK_LE", - /* 204 */ "NK_GE", - /* 205 */ "NK_NE", - /* 206 */ "MATCH", - /* 207 */ "NMATCH", - /* 208 */ "CONTAINS", - /* 209 */ "JOIN", - /* 210 */ "INNER", - /* 211 */ "SELECT", - /* 212 */ "DISTINCT", - /* 213 */ "WHERE", - /* 214 */ "PARTITION", - /* 215 */ "BY", - /* 216 */ "SESSION", - /* 217 */ "STATE_WINDOW", - /* 218 */ "SLIDING", - /* 219 */ "FILL", - /* 220 */ "VALUE", - /* 221 */ "NONE", - /* 222 */ "PREV", - /* 223 */ "LINEAR", - /* 224 */ "NEXT", - /* 225 */ "HAVING", - /* 226 */ "ORDER", - /* 227 */ "SLIMIT", - /* 228 */ "SOFFSET", - /* 229 */ "LIMIT", - /* 230 */ "OFFSET", - /* 231 */ "ASC", - /* 232 */ "NULLS", - /* 233 */ "ID", - /* 234 */ "NK_BITNOT", - /* 235 */ "INSERT", - /* 236 */ "VALUES", - /* 237 */ "IMPORT", - /* 238 */ "NK_SEMI", - /* 239 */ "FILE", - /* 240 */ "cmd", - /* 241 */ "account_options", - /* 242 */ "alter_account_options", - /* 243 */ "literal", - /* 244 */ "alter_account_option", - /* 245 */ "user_name", - /* 246 */ "privileges", - /* 247 */ "priv_level", - /* 248 */ "priv_type_list", - /* 249 */ "priv_type", - /* 250 */ "db_name", - /* 251 */ "dnode_endpoint", - /* 252 */ "dnode_host_name", - /* 253 */ "not_exists_opt", - /* 254 */ "db_options", - /* 255 */ "exists_opt", - /* 256 */ "alter_db_options", - /* 257 */ "integer_list", - /* 258 */ "variable_list", - /* 259 */ "retention_list", - /* 260 */ "alter_db_option", - /* 261 */ "retention", - /* 262 */ "full_table_name", - /* 263 */ "column_def_list", - /* 264 */ "tags_def_opt", - /* 265 */ "table_options", - /* 266 */ "multi_create_clause", - /* 267 */ "tags_def", - /* 268 */ "multi_drop_clause", - /* 269 */ "alter_table_clause", - /* 270 */ "alter_table_options", - /* 271 */ "column_name", - /* 272 */ "type_name", - /* 273 */ "signed_literal", - /* 274 */ "create_subtable_clause", - /* 275 */ "specific_tags_opt", - /* 276 */ "literal_list", - /* 277 */ "drop_table_clause", - /* 278 */ "col_name_list", - /* 279 */ "table_name", - /* 280 */ "column_def", - /* 281 */ "func_name_list", - /* 282 */ "alter_table_option", - /* 283 */ "col_name", - /* 284 */ "db_name_cond_opt", - /* 285 */ "like_pattern_opt", - /* 286 */ "table_name_cond", - /* 287 */ "from_db_opt", - /* 288 */ "func_name", - /* 289 */ "function_name", - /* 290 */ "index_name", - /* 291 */ "index_options", - /* 292 */ "func_list", - /* 293 */ "duration_literal", - /* 294 */ "sliding_opt", - /* 295 */ "func", - /* 296 */ "expression_list", - /* 297 */ "topic_name", - /* 298 */ "topic_options", - /* 299 */ "query_expression", - /* 300 */ "cgroup_name", - /* 301 */ "analyze_opt", - /* 302 */ "explain_options", - /* 303 */ "agg_func_opt", - /* 304 */ "bufsize_opt", - /* 305 */ "stream_name", - /* 306 */ "stream_options", - /* 307 */ "into_opt", - /* 308 */ "dnode_list", - /* 309 */ "signed", - /* 310 */ "literal_func", - /* 311 */ "table_alias", - /* 312 */ "column_alias", - /* 313 */ "expression", - /* 314 */ "pseudo_column", - /* 315 */ "column_reference", - /* 316 */ "function_expression", - /* 317 */ "subquery", - /* 318 */ "star_func", - /* 319 */ "star_func_para_list", - /* 320 */ "noarg_func", - /* 321 */ "other_para_list", - /* 322 */ "star_func_para", - /* 323 */ "predicate", - /* 324 */ "compare_op", - /* 325 */ "in_op", - /* 326 */ "in_predicate_value", - /* 327 */ "boolean_value_expression", - /* 328 */ "boolean_primary", - /* 329 */ "common_expression", - /* 330 */ "from_clause", - /* 331 */ "table_reference_list", - /* 332 */ "table_reference", - /* 333 */ "table_primary", - /* 334 */ "joined_table", - /* 335 */ "alias_opt", - /* 336 */ "parenthesized_joined_table", - /* 337 */ "join_type", - /* 338 */ "search_condition", - /* 339 */ "query_specification", - /* 340 */ "set_quantifier_opt", - /* 341 */ "select_list", - /* 342 */ "where_clause_opt", - /* 343 */ "partition_by_clause_opt", - /* 344 */ "twindow_clause_opt", - /* 345 */ "group_by_clause_opt", - /* 346 */ "having_clause_opt", - /* 347 */ "select_sublist", - /* 348 */ "select_item", - /* 349 */ "fill_opt", - /* 350 */ "fill_mode", - /* 351 */ "group_by_list", - /* 352 */ "query_expression_body", - /* 353 */ "order_by_clause_opt", - /* 354 */ "slimit_clause_opt", - /* 355 */ "limit_clause_opt", - /* 356 */ "query_primary", - /* 357 */ "sort_specification_list", - /* 358 */ "sort_specification", - /* 359 */ "ordering_specification_opt", - /* 360 */ "null_ordering_opt", + /* 112 */ "FILE_FACTOR", + /* 113 */ "NK_FLOAT", + /* 114 */ "ROLLUP", + /* 115 */ "TTL", + /* 116 */ "SMA", + /* 117 */ "SHOW", + /* 118 */ "DATABASES", + /* 119 */ "TABLES", + /* 120 */ "STABLES", + /* 121 */ "MNODES", + /* 122 */ "MODULES", + /* 123 */ "QNODES", + /* 124 */ "FUNCTIONS", + /* 125 */ "INDEXES", + /* 126 */ "ACCOUNTS", + /* 127 */ "APPS", + /* 128 */ "CONNECTIONS", + /* 129 */ "LICENCE", + /* 130 */ "GRANTS", + /* 131 */ "QUERIES", + /* 132 */ "SCORES", + /* 133 */ "TOPICS", + /* 134 */ "VARIABLES", + /* 135 */ "BNODES", + /* 136 */ "SNODES", + /* 137 */ "CLUSTER", + /* 138 */ "TRANSACTIONS", + /* 139 */ "LIKE", + /* 140 */ "INDEX", + /* 141 */ "FULLTEXT", + /* 142 */ "FUNCTION", + /* 143 */ "INTERVAL", + /* 144 */ "TOPIC", + /* 145 */ "AS", + /* 146 */ "CONSUMER", + /* 147 */ "GROUP", + /* 148 */ "WITH", + /* 149 */ "SCHEMA", + /* 150 */ "DESC", + /* 151 */ "DESCRIBE", + /* 152 */ "RESET", + /* 153 */ "QUERY", + /* 154 */ "CACHE", + /* 155 */ "EXPLAIN", + /* 156 */ "ANALYZE", + /* 157 */ "VERBOSE", + /* 158 */ "NK_BOOL", + /* 159 */ "RATIO", + /* 160 */ "COMPACT", + /* 161 */ "VNODES", + /* 162 */ "IN", + /* 163 */ "OUTPUTTYPE", + /* 164 */ "AGGREGATE", + /* 165 */ "BUFSIZE", + /* 166 */ "STREAM", + /* 167 */ "INTO", + /* 168 */ "TRIGGER", + /* 169 */ "AT_ONCE", + /* 170 */ "WINDOW_CLOSE", + /* 171 */ "WATERMARK", + /* 172 */ "KILL", + /* 173 */ "CONNECTION", + /* 174 */ "TRANSACTION", + /* 175 */ "MERGE", + /* 176 */ "VGROUP", + /* 177 */ "REDISTRIBUTE", + /* 178 */ "SPLIT", + /* 179 */ "SYNCDB", + /* 180 */ "NULL", + /* 181 */ "NK_QUESTION", + /* 182 */ "NK_ARROW", + /* 183 */ "ROWTS", + /* 184 */ "TBNAME", + /* 185 */ "QSTARTTS", + /* 186 */ "QENDTS", + /* 187 */ "WSTARTTS", + /* 188 */ "WENDTS", + /* 189 */ "WDURATION", + /* 190 */ "CAST", + /* 191 */ "NOW", + /* 192 */ "TODAY", + /* 193 */ "TIMEZONE", + /* 194 */ "COUNT", + /* 195 */ "FIRST", + /* 196 */ "LAST", + /* 197 */ "LAST_ROW", + /* 198 */ "BETWEEN", + /* 199 */ "IS", + /* 200 */ "NK_LT", + /* 201 */ "NK_GT", + /* 202 */ "NK_LE", + /* 203 */ "NK_GE", + /* 204 */ "NK_NE", + /* 205 */ "MATCH", + /* 206 */ "NMATCH", + /* 207 */ "CONTAINS", + /* 208 */ "JOIN", + /* 209 */ "INNER", + /* 210 */ "SELECT", + /* 211 */ "DISTINCT", + /* 212 */ "WHERE", + /* 213 */ "PARTITION", + /* 214 */ "BY", + /* 215 */ "SESSION", + /* 216 */ "STATE_WINDOW", + /* 217 */ "SLIDING", + /* 218 */ "FILL", + /* 219 */ "VALUE", + /* 220 */ "NONE", + /* 221 */ "PREV", + /* 222 */ "LINEAR", + /* 223 */ "NEXT", + /* 224 */ "HAVING", + /* 225 */ "ORDER", + /* 226 */ "SLIMIT", + /* 227 */ "SOFFSET", + /* 228 */ "LIMIT", + /* 229 */ "OFFSET", + /* 230 */ "ASC", + /* 231 */ "NULLS", + /* 232 */ "ID", + /* 233 */ "NK_BITNOT", + /* 234 */ "INSERT", + /* 235 */ "VALUES", + /* 236 */ "IMPORT", + /* 237 */ "NK_SEMI", + /* 238 */ "FILE", + /* 239 */ "cmd", + /* 240 */ "account_options", + /* 241 */ "alter_account_options", + /* 242 */ "literal", + /* 243 */ "alter_account_option", + /* 244 */ "user_name", + /* 245 */ "privileges", + /* 246 */ "priv_level", + /* 247 */ "priv_type_list", + /* 248 */ "priv_type", + /* 249 */ "db_name", + /* 250 */ "dnode_endpoint", + /* 251 */ "dnode_host_name", + /* 252 */ "not_exists_opt", + /* 253 */ "db_options", + /* 254 */ "exists_opt", + /* 255 */ "alter_db_options", + /* 256 */ "integer_list", + /* 257 */ "variable_list", + /* 258 */ "retention_list", + /* 259 */ "alter_db_option", + /* 260 */ "retention", + /* 261 */ "full_table_name", + /* 262 */ "column_def_list", + /* 263 */ "tags_def_opt", + /* 264 */ "table_options", + /* 265 */ "multi_create_clause", + /* 266 */ "tags_def", + /* 267 */ "multi_drop_clause", + /* 268 */ "alter_table_clause", + /* 269 */ "alter_table_options", + /* 270 */ "column_name", + /* 271 */ "type_name", + /* 272 */ "signed_literal", + /* 273 */ "create_subtable_clause", + /* 274 */ "specific_tags_opt", + /* 275 */ "literal_list", + /* 276 */ "drop_table_clause", + /* 277 */ "col_name_list", + /* 278 */ "table_name", + /* 279 */ "column_def", + /* 280 */ "func_name_list", + /* 281 */ "alter_table_option", + /* 282 */ "col_name", + /* 283 */ "db_name_cond_opt", + /* 284 */ "like_pattern_opt", + /* 285 */ "table_name_cond", + /* 286 */ "from_db_opt", + /* 287 */ "func_name", + /* 288 */ "function_name", + /* 289 */ "index_name", + /* 290 */ "index_options", + /* 291 */ "func_list", + /* 292 */ "duration_literal", + /* 293 */ "sliding_opt", + /* 294 */ "func", + /* 295 */ "expression_list", + /* 296 */ "topic_name", + /* 297 */ "topic_options", + /* 298 */ "query_expression", + /* 299 */ "cgroup_name", + /* 300 */ "analyze_opt", + /* 301 */ "explain_options", + /* 302 */ "agg_func_opt", + /* 303 */ "bufsize_opt", + /* 304 */ "stream_name", + /* 305 */ "stream_options", + /* 306 */ "into_opt", + /* 307 */ "dnode_list", + /* 308 */ "signed", + /* 309 */ "literal_func", + /* 310 */ "table_alias", + /* 311 */ "column_alias", + /* 312 */ "expression", + /* 313 */ "pseudo_column", + /* 314 */ "column_reference", + /* 315 */ "function_expression", + /* 316 */ "subquery", + /* 317 */ "star_func", + /* 318 */ "star_func_para_list", + /* 319 */ "noarg_func", + /* 320 */ "other_para_list", + /* 321 */ "star_func_para", + /* 322 */ "predicate", + /* 323 */ "compare_op", + /* 324 */ "in_op", + /* 325 */ "in_predicate_value", + /* 326 */ "boolean_value_expression", + /* 327 */ "boolean_primary", + /* 328 */ "common_expression", + /* 329 */ "from_clause", + /* 330 */ "table_reference_list", + /* 331 */ "table_reference", + /* 332 */ "table_primary", + /* 333 */ "joined_table", + /* 334 */ "alias_opt", + /* 335 */ "parenthesized_joined_table", + /* 336 */ "join_type", + /* 337 */ "search_condition", + /* 338 */ "query_specification", + /* 339 */ "set_quantifier_opt", + /* 340 */ "select_list", + /* 341 */ "where_clause_opt", + /* 342 */ "partition_by_clause_opt", + /* 343 */ "twindow_clause_opt", + /* 344 */ "group_by_clause_opt", + /* 345 */ "having_clause_opt", + /* 346 */ "select_sublist", + /* 347 */ "select_item", + /* 348 */ "fill_opt", + /* 349 */ "fill_mode", + /* 350 */ "group_by_list", + /* 351 */ "query_expression_body", + /* 352 */ "order_by_clause_opt", + /* 353 */ "slimit_clause_opt", + /* 354 */ "limit_clause_opt", + /* 355 */ "query_primary", + /* 356 */ "sort_specification_list", + /* 357 */ "sort_specification", + /* 358 */ "ordering_specification_opt", + /* 359 */ "null_ordering_opt", }; #endif /* defined(YYCOVERAGE) || !defined(NDEBUG) */ @@ -1690,296 +1704,295 @@ static const char *const yyRuleName[] = { /* 162 */ "tags_def ::= TAGS NK_LP column_def_list NK_RP", /* 163 */ "table_options ::=", /* 164 */ "table_options ::= table_options COMMENT NK_STRING", - /* 165 */ "table_options ::= table_options DELAY NK_INTEGER", - /* 166 */ "table_options ::= table_options FILE_FACTOR NK_FLOAT", - /* 167 */ "table_options ::= table_options ROLLUP NK_LP func_name_list NK_RP", - /* 168 */ "table_options ::= table_options TTL NK_INTEGER", - /* 169 */ "table_options ::= table_options SMA NK_LP col_name_list NK_RP", - /* 170 */ "alter_table_options ::= alter_table_option", - /* 171 */ "alter_table_options ::= alter_table_options alter_table_option", - /* 172 */ "alter_table_option ::= COMMENT NK_STRING", - /* 173 */ "alter_table_option ::= TTL NK_INTEGER", - /* 174 */ "col_name_list ::= col_name", - /* 175 */ "col_name_list ::= col_name_list NK_COMMA col_name", - /* 176 */ "col_name ::= column_name", - /* 177 */ "cmd ::= SHOW DNODES", - /* 178 */ "cmd ::= SHOW USERS", - /* 179 */ "cmd ::= SHOW DATABASES", - /* 180 */ "cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt", - /* 181 */ "cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt", - /* 182 */ "cmd ::= SHOW db_name_cond_opt VGROUPS", - /* 183 */ "cmd ::= SHOW MNODES", - /* 184 */ "cmd ::= SHOW MODULES", - /* 185 */ "cmd ::= SHOW QNODES", - /* 186 */ "cmd ::= SHOW FUNCTIONS", - /* 187 */ "cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt", - /* 188 */ "cmd ::= SHOW STREAMS", - /* 189 */ "cmd ::= SHOW ACCOUNTS", - /* 190 */ "cmd ::= SHOW APPS", - /* 191 */ "cmd ::= SHOW CONNECTIONS", - /* 192 */ "cmd ::= SHOW LICENCE", - /* 193 */ "cmd ::= SHOW GRANTS", - /* 194 */ "cmd ::= SHOW CREATE DATABASE db_name", - /* 195 */ "cmd ::= SHOW CREATE TABLE full_table_name", - /* 196 */ "cmd ::= SHOW CREATE STABLE full_table_name", - /* 197 */ "cmd ::= SHOW QUERIES", - /* 198 */ "cmd ::= SHOW SCORES", - /* 199 */ "cmd ::= SHOW TOPICS", - /* 200 */ "cmd ::= SHOW VARIABLES", - /* 201 */ "cmd ::= SHOW BNODES", - /* 202 */ "cmd ::= SHOW SNODES", - /* 203 */ "cmd ::= SHOW CLUSTER", - /* 204 */ "cmd ::= SHOW TRANSACTIONS", - /* 205 */ "db_name_cond_opt ::=", - /* 206 */ "db_name_cond_opt ::= db_name NK_DOT", - /* 207 */ "like_pattern_opt ::=", - /* 208 */ "like_pattern_opt ::= LIKE NK_STRING", - /* 209 */ "table_name_cond ::= table_name", - /* 210 */ "from_db_opt ::=", - /* 211 */ "from_db_opt ::= FROM db_name", - /* 212 */ "func_name_list ::= func_name", - /* 213 */ "func_name_list ::= func_name_list NK_COMMA func_name", - /* 214 */ "func_name ::= function_name", - /* 215 */ "cmd ::= CREATE SMA INDEX not_exists_opt index_name ON table_name index_options", - /* 216 */ "cmd ::= CREATE FULLTEXT INDEX not_exists_opt index_name ON table_name NK_LP col_name_list NK_RP", - /* 217 */ "cmd ::= DROP INDEX exists_opt index_name ON table_name", - /* 218 */ "index_options ::=", - /* 219 */ "index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt", - /* 220 */ "index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt", - /* 221 */ "func_list ::= func", - /* 222 */ "func_list ::= func_list NK_COMMA func", - /* 223 */ "func ::= function_name NK_LP expression_list NK_RP", - /* 224 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name topic_options AS query_expression", - /* 225 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name topic_options AS db_name", - /* 226 */ "cmd ::= DROP TOPIC exists_opt topic_name", - /* 227 */ "cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name", - /* 228 */ "topic_options ::=", - /* 229 */ "topic_options ::= topic_options WITH TABLE", - /* 230 */ "topic_options ::= topic_options WITH SCHEMA", - /* 231 */ "topic_options ::= topic_options WITH TAG", - /* 232 */ "cmd ::= DESC full_table_name", - /* 233 */ "cmd ::= DESCRIBE full_table_name", - /* 234 */ "cmd ::= RESET QUERY CACHE", - /* 235 */ "cmd ::= EXPLAIN analyze_opt explain_options query_expression", - /* 236 */ "analyze_opt ::=", - /* 237 */ "analyze_opt ::= ANALYZE", - /* 238 */ "explain_options ::=", - /* 239 */ "explain_options ::= explain_options VERBOSE NK_BOOL", - /* 240 */ "explain_options ::= explain_options RATIO NK_FLOAT", - /* 241 */ "cmd ::= COMPACT VNODES IN NK_LP integer_list NK_RP", - /* 242 */ "cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt", - /* 243 */ "cmd ::= DROP FUNCTION exists_opt function_name", - /* 244 */ "agg_func_opt ::=", - /* 245 */ "agg_func_opt ::= AGGREGATE", - /* 246 */ "bufsize_opt ::=", - /* 247 */ "bufsize_opt ::= BUFSIZE NK_INTEGER", - /* 248 */ "cmd ::= CREATE STREAM not_exists_opt stream_name stream_options into_opt AS query_expression", - /* 249 */ "cmd ::= DROP STREAM exists_opt stream_name", - /* 250 */ "into_opt ::=", - /* 251 */ "into_opt ::= INTO full_table_name", - /* 252 */ "stream_options ::=", - /* 253 */ "stream_options ::= stream_options TRIGGER AT_ONCE", - /* 254 */ "stream_options ::= stream_options TRIGGER WINDOW_CLOSE", - /* 255 */ "stream_options ::= stream_options WATERMARK duration_literal", - /* 256 */ "cmd ::= KILL CONNECTION NK_INTEGER", - /* 257 */ "cmd ::= KILL QUERY NK_INTEGER", - /* 258 */ "cmd ::= KILL TRANSACTION NK_INTEGER", - /* 259 */ "cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER", - /* 260 */ "cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list", - /* 261 */ "cmd ::= SPLIT VGROUP NK_INTEGER", - /* 262 */ "dnode_list ::= DNODE NK_INTEGER", - /* 263 */ "dnode_list ::= dnode_list DNODE NK_INTEGER", - /* 264 */ "cmd ::= SYNCDB db_name REPLICA", - /* 265 */ "cmd ::= query_expression", - /* 266 */ "literal ::= NK_INTEGER", - /* 267 */ "literal ::= NK_FLOAT", - /* 268 */ "literal ::= NK_STRING", - /* 269 */ "literal ::= NK_BOOL", - /* 270 */ "literal ::= TIMESTAMP NK_STRING", - /* 271 */ "literal ::= duration_literal", - /* 272 */ "literal ::= NULL", - /* 273 */ "literal ::= NK_QUESTION", - /* 274 */ "duration_literal ::= NK_VARIABLE", - /* 275 */ "signed ::= NK_INTEGER", - /* 276 */ "signed ::= NK_PLUS NK_INTEGER", - /* 277 */ "signed ::= NK_MINUS NK_INTEGER", - /* 278 */ "signed ::= NK_FLOAT", - /* 279 */ "signed ::= NK_PLUS NK_FLOAT", - /* 280 */ "signed ::= NK_MINUS NK_FLOAT", - /* 281 */ "signed_literal ::= signed", - /* 282 */ "signed_literal ::= NK_STRING", - /* 283 */ "signed_literal ::= NK_BOOL", - /* 284 */ "signed_literal ::= TIMESTAMP NK_STRING", - /* 285 */ "signed_literal ::= duration_literal", - /* 286 */ "signed_literal ::= NULL", - /* 287 */ "signed_literal ::= literal_func", - /* 288 */ "literal_list ::= signed_literal", - /* 289 */ "literal_list ::= literal_list NK_COMMA signed_literal", - /* 290 */ "db_name ::= NK_ID", - /* 291 */ "table_name ::= NK_ID", - /* 292 */ "column_name ::= NK_ID", - /* 293 */ "function_name ::= NK_ID", - /* 294 */ "table_alias ::= NK_ID", - /* 295 */ "column_alias ::= NK_ID", - /* 296 */ "user_name ::= NK_ID", - /* 297 */ "index_name ::= NK_ID", - /* 298 */ "topic_name ::= NK_ID", - /* 299 */ "stream_name ::= NK_ID", - /* 300 */ "cgroup_name ::= NK_ID", - /* 301 */ "expression ::= literal", - /* 302 */ "expression ::= pseudo_column", - /* 303 */ "expression ::= column_reference", - /* 304 */ "expression ::= function_expression", - /* 305 */ "expression ::= subquery", - /* 306 */ "expression ::= NK_LP expression NK_RP", - /* 307 */ "expression ::= NK_PLUS expression", - /* 308 */ "expression ::= NK_MINUS expression", - /* 309 */ "expression ::= expression NK_PLUS expression", - /* 310 */ "expression ::= expression NK_MINUS expression", - /* 311 */ "expression ::= expression NK_STAR expression", - /* 312 */ "expression ::= expression NK_SLASH expression", - /* 313 */ "expression ::= expression NK_REM expression", - /* 314 */ "expression ::= column_reference NK_ARROW NK_STRING", - /* 315 */ "expression_list ::= expression", - /* 316 */ "expression_list ::= expression_list NK_COMMA expression", - /* 317 */ "column_reference ::= column_name", - /* 318 */ "column_reference ::= table_name NK_DOT column_name", - /* 319 */ "pseudo_column ::= ROWTS", - /* 320 */ "pseudo_column ::= TBNAME", - /* 321 */ "pseudo_column ::= table_name NK_DOT TBNAME", - /* 322 */ "pseudo_column ::= QSTARTTS", - /* 323 */ "pseudo_column ::= QENDTS", - /* 324 */ "pseudo_column ::= WSTARTTS", - /* 325 */ "pseudo_column ::= WENDTS", - /* 326 */ "pseudo_column ::= WDURATION", - /* 327 */ "function_expression ::= function_name NK_LP expression_list NK_RP", - /* 328 */ "function_expression ::= star_func NK_LP star_func_para_list NK_RP", - /* 329 */ "function_expression ::= CAST NK_LP expression AS type_name NK_RP", - /* 330 */ "function_expression ::= literal_func", - /* 331 */ "literal_func ::= noarg_func NK_LP NK_RP", - /* 332 */ "literal_func ::= NOW", - /* 333 */ "noarg_func ::= NOW", - /* 334 */ "noarg_func ::= TODAY", - /* 335 */ "noarg_func ::= TIMEZONE", - /* 336 */ "star_func ::= COUNT", - /* 337 */ "star_func ::= FIRST", - /* 338 */ "star_func ::= LAST", - /* 339 */ "star_func ::= LAST_ROW", - /* 340 */ "star_func_para_list ::= NK_STAR", - /* 341 */ "star_func_para_list ::= other_para_list", - /* 342 */ "other_para_list ::= star_func_para", - /* 343 */ "other_para_list ::= other_para_list NK_COMMA star_func_para", - /* 344 */ "star_func_para ::= expression", - /* 345 */ "star_func_para ::= table_name NK_DOT NK_STAR", - /* 346 */ "predicate ::= expression compare_op expression", - /* 347 */ "predicate ::= expression BETWEEN expression AND expression", - /* 348 */ "predicate ::= expression NOT BETWEEN expression AND expression", - /* 349 */ "predicate ::= expression IS NULL", - /* 350 */ "predicate ::= expression IS NOT NULL", - /* 351 */ "predicate ::= expression in_op in_predicate_value", - /* 352 */ "compare_op ::= NK_LT", - /* 353 */ "compare_op ::= NK_GT", - /* 354 */ "compare_op ::= NK_LE", - /* 355 */ "compare_op ::= NK_GE", - /* 356 */ "compare_op ::= NK_NE", - /* 357 */ "compare_op ::= NK_EQ", - /* 358 */ "compare_op ::= LIKE", - /* 359 */ "compare_op ::= NOT LIKE", - /* 360 */ "compare_op ::= MATCH", - /* 361 */ "compare_op ::= NMATCH", - /* 362 */ "compare_op ::= CONTAINS", - /* 363 */ "in_op ::= IN", - /* 364 */ "in_op ::= NOT IN", - /* 365 */ "in_predicate_value ::= NK_LP expression_list NK_RP", - /* 366 */ "boolean_value_expression ::= boolean_primary", - /* 367 */ "boolean_value_expression ::= NOT boolean_primary", - /* 368 */ "boolean_value_expression ::= boolean_value_expression OR boolean_value_expression", - /* 369 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression", - /* 370 */ "boolean_primary ::= predicate", - /* 371 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP", - /* 372 */ "common_expression ::= expression", - /* 373 */ "common_expression ::= boolean_value_expression", - /* 374 */ "from_clause ::= FROM table_reference_list", - /* 375 */ "table_reference_list ::= table_reference", - /* 376 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference", - /* 377 */ "table_reference ::= table_primary", - /* 378 */ "table_reference ::= joined_table", - /* 379 */ "table_primary ::= table_name alias_opt", - /* 380 */ "table_primary ::= db_name NK_DOT table_name alias_opt", - /* 381 */ "table_primary ::= subquery alias_opt", - /* 382 */ "table_primary ::= parenthesized_joined_table", - /* 383 */ "alias_opt ::=", - /* 384 */ "alias_opt ::= table_alias", - /* 385 */ "alias_opt ::= AS table_alias", - /* 386 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP", - /* 387 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP", - /* 388 */ "joined_table ::= table_reference join_type JOIN table_reference ON search_condition", - /* 389 */ "join_type ::=", - /* 390 */ "join_type ::= INNER", - /* 391 */ "query_specification ::= SELECT set_quantifier_opt select_list from_clause where_clause_opt partition_by_clause_opt twindow_clause_opt group_by_clause_opt having_clause_opt", - /* 392 */ "set_quantifier_opt ::=", - /* 393 */ "set_quantifier_opt ::= DISTINCT", - /* 394 */ "set_quantifier_opt ::= ALL", - /* 395 */ "select_list ::= NK_STAR", - /* 396 */ "select_list ::= select_sublist", - /* 397 */ "select_sublist ::= select_item", - /* 398 */ "select_sublist ::= select_sublist NK_COMMA select_item", - /* 399 */ "select_item ::= common_expression", - /* 400 */ "select_item ::= common_expression column_alias", - /* 401 */ "select_item ::= common_expression AS column_alias", - /* 402 */ "select_item ::= table_name NK_DOT NK_STAR", - /* 403 */ "where_clause_opt ::=", - /* 404 */ "where_clause_opt ::= WHERE search_condition", - /* 405 */ "partition_by_clause_opt ::=", - /* 406 */ "partition_by_clause_opt ::= PARTITION BY expression_list", - /* 407 */ "twindow_clause_opt ::=", - /* 408 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP", - /* 409 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP expression NK_RP", - /* 410 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt", - /* 411 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt", - /* 412 */ "sliding_opt ::=", - /* 413 */ "sliding_opt ::= SLIDING NK_LP duration_literal NK_RP", - /* 414 */ "fill_opt ::=", - /* 415 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP", - /* 416 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP", - /* 417 */ "fill_mode ::= NONE", - /* 418 */ "fill_mode ::= PREV", - /* 419 */ "fill_mode ::= NULL", - /* 420 */ "fill_mode ::= LINEAR", - /* 421 */ "fill_mode ::= NEXT", - /* 422 */ "group_by_clause_opt ::=", - /* 423 */ "group_by_clause_opt ::= GROUP BY group_by_list", - /* 424 */ "group_by_list ::= expression", - /* 425 */ "group_by_list ::= group_by_list NK_COMMA expression", - /* 426 */ "having_clause_opt ::=", - /* 427 */ "having_clause_opt ::= HAVING search_condition", - /* 428 */ "query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt", - /* 429 */ "query_expression_body ::= query_primary", - /* 430 */ "query_expression_body ::= query_expression_body UNION ALL query_expression_body", - /* 431 */ "query_expression_body ::= query_expression_body UNION query_expression_body", - /* 432 */ "query_primary ::= query_specification", - /* 433 */ "query_primary ::= NK_LP query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt NK_RP", - /* 434 */ "order_by_clause_opt ::=", - /* 435 */ "order_by_clause_opt ::= ORDER BY sort_specification_list", - /* 436 */ "slimit_clause_opt ::=", - /* 437 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER", - /* 438 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER", - /* 439 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER", - /* 440 */ "limit_clause_opt ::=", - /* 441 */ "limit_clause_opt ::= LIMIT NK_INTEGER", - /* 442 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER", - /* 443 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER", - /* 444 */ "subquery ::= NK_LP query_expression NK_RP", - /* 445 */ "search_condition ::= common_expression", - /* 446 */ "sort_specification_list ::= sort_specification", - /* 447 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification", - /* 448 */ "sort_specification ::= expression ordering_specification_opt null_ordering_opt", - /* 449 */ "ordering_specification_opt ::=", - /* 450 */ "ordering_specification_opt ::= ASC", - /* 451 */ "ordering_specification_opt ::= DESC", - /* 452 */ "null_ordering_opt ::=", - /* 453 */ "null_ordering_opt ::= NULLS FIRST", - /* 454 */ "null_ordering_opt ::= NULLS LAST", + /* 165 */ "table_options ::= table_options FILE_FACTOR NK_FLOAT", + /* 166 */ "table_options ::= table_options ROLLUP NK_LP func_name_list NK_RP", + /* 167 */ "table_options ::= table_options TTL NK_INTEGER", + /* 168 */ "table_options ::= table_options SMA NK_LP col_name_list NK_RP", + /* 169 */ "alter_table_options ::= alter_table_option", + /* 170 */ "alter_table_options ::= alter_table_options alter_table_option", + /* 171 */ "alter_table_option ::= COMMENT NK_STRING", + /* 172 */ "alter_table_option ::= TTL NK_INTEGER", + /* 173 */ "col_name_list ::= col_name", + /* 174 */ "col_name_list ::= col_name_list NK_COMMA col_name", + /* 175 */ "col_name ::= column_name", + /* 176 */ "cmd ::= SHOW DNODES", + /* 177 */ "cmd ::= SHOW USERS", + /* 178 */ "cmd ::= SHOW DATABASES", + /* 179 */ "cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt", + /* 180 */ "cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt", + /* 181 */ "cmd ::= SHOW db_name_cond_opt VGROUPS", + /* 182 */ "cmd ::= SHOW MNODES", + /* 183 */ "cmd ::= SHOW MODULES", + /* 184 */ "cmd ::= SHOW QNODES", + /* 185 */ "cmd ::= SHOW FUNCTIONS", + /* 186 */ "cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt", + /* 187 */ "cmd ::= SHOW STREAMS", + /* 188 */ "cmd ::= SHOW ACCOUNTS", + /* 189 */ "cmd ::= SHOW APPS", + /* 190 */ "cmd ::= SHOW CONNECTIONS", + /* 191 */ "cmd ::= SHOW LICENCE", + /* 192 */ "cmd ::= SHOW GRANTS", + /* 193 */ "cmd ::= SHOW CREATE DATABASE db_name", + /* 194 */ "cmd ::= SHOW CREATE TABLE full_table_name", + /* 195 */ "cmd ::= SHOW CREATE STABLE full_table_name", + /* 196 */ "cmd ::= SHOW QUERIES", + /* 197 */ "cmd ::= SHOW SCORES", + /* 198 */ "cmd ::= SHOW TOPICS", + /* 199 */ "cmd ::= SHOW VARIABLES", + /* 200 */ "cmd ::= SHOW BNODES", + /* 201 */ "cmd ::= SHOW SNODES", + /* 202 */ "cmd ::= SHOW CLUSTER", + /* 203 */ "cmd ::= SHOW TRANSACTIONS", + /* 204 */ "db_name_cond_opt ::=", + /* 205 */ "db_name_cond_opt ::= db_name NK_DOT", + /* 206 */ "like_pattern_opt ::=", + /* 207 */ "like_pattern_opt ::= LIKE NK_STRING", + /* 208 */ "table_name_cond ::= table_name", + /* 209 */ "from_db_opt ::=", + /* 210 */ "from_db_opt ::= FROM db_name", + /* 211 */ "func_name_list ::= func_name", + /* 212 */ "func_name_list ::= func_name_list NK_COMMA func_name", + /* 213 */ "func_name ::= function_name", + /* 214 */ "cmd ::= CREATE SMA INDEX not_exists_opt index_name ON table_name index_options", + /* 215 */ "cmd ::= CREATE FULLTEXT INDEX not_exists_opt index_name ON table_name NK_LP col_name_list NK_RP", + /* 216 */ "cmd ::= DROP INDEX exists_opt index_name ON table_name", + /* 217 */ "index_options ::=", + /* 218 */ "index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt", + /* 219 */ "index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt", + /* 220 */ "func_list ::= func", + /* 221 */ "func_list ::= func_list NK_COMMA func", + /* 222 */ "func ::= function_name NK_LP expression_list NK_RP", + /* 223 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name topic_options AS query_expression", + /* 224 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name topic_options AS db_name", + /* 225 */ "cmd ::= DROP TOPIC exists_opt topic_name", + /* 226 */ "cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name", + /* 227 */ "topic_options ::=", + /* 228 */ "topic_options ::= topic_options WITH TABLE", + /* 229 */ "topic_options ::= topic_options WITH SCHEMA", + /* 230 */ "topic_options ::= topic_options WITH TAG", + /* 231 */ "cmd ::= DESC full_table_name", + /* 232 */ "cmd ::= DESCRIBE full_table_name", + /* 233 */ "cmd ::= RESET QUERY CACHE", + /* 234 */ "cmd ::= EXPLAIN analyze_opt explain_options query_expression", + /* 235 */ "analyze_opt ::=", + /* 236 */ "analyze_opt ::= ANALYZE", + /* 237 */ "explain_options ::=", + /* 238 */ "explain_options ::= explain_options VERBOSE NK_BOOL", + /* 239 */ "explain_options ::= explain_options RATIO NK_FLOAT", + /* 240 */ "cmd ::= COMPACT VNODES IN NK_LP integer_list NK_RP", + /* 241 */ "cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt", + /* 242 */ "cmd ::= DROP FUNCTION exists_opt function_name", + /* 243 */ "agg_func_opt ::=", + /* 244 */ "agg_func_opt ::= AGGREGATE", + /* 245 */ "bufsize_opt ::=", + /* 246 */ "bufsize_opt ::= BUFSIZE NK_INTEGER", + /* 247 */ "cmd ::= CREATE STREAM not_exists_opt stream_name stream_options into_opt AS query_expression", + /* 248 */ "cmd ::= DROP STREAM exists_opt stream_name", + /* 249 */ "into_opt ::=", + /* 250 */ "into_opt ::= INTO full_table_name", + /* 251 */ "stream_options ::=", + /* 252 */ "stream_options ::= stream_options TRIGGER AT_ONCE", + /* 253 */ "stream_options ::= stream_options TRIGGER WINDOW_CLOSE", + /* 254 */ "stream_options ::= stream_options WATERMARK duration_literal", + /* 255 */ "cmd ::= KILL CONNECTION NK_INTEGER", + /* 256 */ "cmd ::= KILL QUERY NK_INTEGER", + /* 257 */ "cmd ::= KILL TRANSACTION NK_INTEGER", + /* 258 */ "cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER", + /* 259 */ "cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list", + /* 260 */ "cmd ::= SPLIT VGROUP NK_INTEGER", + /* 261 */ "dnode_list ::= DNODE NK_INTEGER", + /* 262 */ "dnode_list ::= dnode_list DNODE NK_INTEGER", + /* 263 */ "cmd ::= SYNCDB db_name REPLICA", + /* 264 */ "cmd ::= query_expression", + /* 265 */ "literal ::= NK_INTEGER", + /* 266 */ "literal ::= NK_FLOAT", + /* 267 */ "literal ::= NK_STRING", + /* 268 */ "literal ::= NK_BOOL", + /* 269 */ "literal ::= TIMESTAMP NK_STRING", + /* 270 */ "literal ::= duration_literal", + /* 271 */ "literal ::= NULL", + /* 272 */ "literal ::= NK_QUESTION", + /* 273 */ "duration_literal ::= NK_VARIABLE", + /* 274 */ "signed ::= NK_INTEGER", + /* 275 */ "signed ::= NK_PLUS NK_INTEGER", + /* 276 */ "signed ::= NK_MINUS NK_INTEGER", + /* 277 */ "signed ::= NK_FLOAT", + /* 278 */ "signed ::= NK_PLUS NK_FLOAT", + /* 279 */ "signed ::= NK_MINUS NK_FLOAT", + /* 280 */ "signed_literal ::= signed", + /* 281 */ "signed_literal ::= NK_STRING", + /* 282 */ "signed_literal ::= NK_BOOL", + /* 283 */ "signed_literal ::= TIMESTAMP NK_STRING", + /* 284 */ "signed_literal ::= duration_literal", + /* 285 */ "signed_literal ::= NULL", + /* 286 */ "signed_literal ::= literal_func", + /* 287 */ "literal_list ::= signed_literal", + /* 288 */ "literal_list ::= literal_list NK_COMMA signed_literal", + /* 289 */ "db_name ::= NK_ID", + /* 290 */ "table_name ::= NK_ID", + /* 291 */ "column_name ::= NK_ID", + /* 292 */ "function_name ::= NK_ID", + /* 293 */ "table_alias ::= NK_ID", + /* 294 */ "column_alias ::= NK_ID", + /* 295 */ "user_name ::= NK_ID", + /* 296 */ "index_name ::= NK_ID", + /* 297 */ "topic_name ::= NK_ID", + /* 298 */ "stream_name ::= NK_ID", + /* 299 */ "cgroup_name ::= NK_ID", + /* 300 */ "expression ::= literal", + /* 301 */ "expression ::= pseudo_column", + /* 302 */ "expression ::= column_reference", + /* 303 */ "expression ::= function_expression", + /* 304 */ "expression ::= subquery", + /* 305 */ "expression ::= NK_LP expression NK_RP", + /* 306 */ "expression ::= NK_PLUS expression", + /* 307 */ "expression ::= NK_MINUS expression", + /* 308 */ "expression ::= expression NK_PLUS expression", + /* 309 */ "expression ::= expression NK_MINUS expression", + /* 310 */ "expression ::= expression NK_STAR expression", + /* 311 */ "expression ::= expression NK_SLASH expression", + /* 312 */ "expression ::= expression NK_REM expression", + /* 313 */ "expression ::= column_reference NK_ARROW NK_STRING", + /* 314 */ "expression_list ::= expression", + /* 315 */ "expression_list ::= expression_list NK_COMMA expression", + /* 316 */ "column_reference ::= column_name", + /* 317 */ "column_reference ::= table_name NK_DOT column_name", + /* 318 */ "pseudo_column ::= ROWTS", + /* 319 */ "pseudo_column ::= TBNAME", + /* 320 */ "pseudo_column ::= table_name NK_DOT TBNAME", + /* 321 */ "pseudo_column ::= QSTARTTS", + /* 322 */ "pseudo_column ::= QENDTS", + /* 323 */ "pseudo_column ::= WSTARTTS", + /* 324 */ "pseudo_column ::= WENDTS", + /* 325 */ "pseudo_column ::= WDURATION", + /* 326 */ "function_expression ::= function_name NK_LP expression_list NK_RP", + /* 327 */ "function_expression ::= star_func NK_LP star_func_para_list NK_RP", + /* 328 */ "function_expression ::= CAST NK_LP expression AS type_name NK_RP", + /* 329 */ "function_expression ::= literal_func", + /* 330 */ "literal_func ::= noarg_func NK_LP NK_RP", + /* 331 */ "literal_func ::= NOW", + /* 332 */ "noarg_func ::= NOW", + /* 333 */ "noarg_func ::= TODAY", + /* 334 */ "noarg_func ::= TIMEZONE", + /* 335 */ "star_func ::= COUNT", + /* 336 */ "star_func ::= FIRST", + /* 337 */ "star_func ::= LAST", + /* 338 */ "star_func ::= LAST_ROW", + /* 339 */ "star_func_para_list ::= NK_STAR", + /* 340 */ "star_func_para_list ::= other_para_list", + /* 341 */ "other_para_list ::= star_func_para", + /* 342 */ "other_para_list ::= other_para_list NK_COMMA star_func_para", + /* 343 */ "star_func_para ::= expression", + /* 344 */ "star_func_para ::= table_name NK_DOT NK_STAR", + /* 345 */ "predicate ::= expression compare_op expression", + /* 346 */ "predicate ::= expression BETWEEN expression AND expression", + /* 347 */ "predicate ::= expression NOT BETWEEN expression AND expression", + /* 348 */ "predicate ::= expression IS NULL", + /* 349 */ "predicate ::= expression IS NOT NULL", + /* 350 */ "predicate ::= expression in_op in_predicate_value", + /* 351 */ "compare_op ::= NK_LT", + /* 352 */ "compare_op ::= NK_GT", + /* 353 */ "compare_op ::= NK_LE", + /* 354 */ "compare_op ::= NK_GE", + /* 355 */ "compare_op ::= NK_NE", + /* 356 */ "compare_op ::= NK_EQ", + /* 357 */ "compare_op ::= LIKE", + /* 358 */ "compare_op ::= NOT LIKE", + /* 359 */ "compare_op ::= MATCH", + /* 360 */ "compare_op ::= NMATCH", + /* 361 */ "compare_op ::= CONTAINS", + /* 362 */ "in_op ::= IN", + /* 363 */ "in_op ::= NOT IN", + /* 364 */ "in_predicate_value ::= NK_LP expression_list NK_RP", + /* 365 */ "boolean_value_expression ::= boolean_primary", + /* 366 */ "boolean_value_expression ::= NOT boolean_primary", + /* 367 */ "boolean_value_expression ::= boolean_value_expression OR boolean_value_expression", + /* 368 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression", + /* 369 */ "boolean_primary ::= predicate", + /* 370 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP", + /* 371 */ "common_expression ::= expression", + /* 372 */ "common_expression ::= boolean_value_expression", + /* 373 */ "from_clause ::= FROM table_reference_list", + /* 374 */ "table_reference_list ::= table_reference", + /* 375 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference", + /* 376 */ "table_reference ::= table_primary", + /* 377 */ "table_reference ::= joined_table", + /* 378 */ "table_primary ::= table_name alias_opt", + /* 379 */ "table_primary ::= db_name NK_DOT table_name alias_opt", + /* 380 */ "table_primary ::= subquery alias_opt", + /* 381 */ "table_primary ::= parenthesized_joined_table", + /* 382 */ "alias_opt ::=", + /* 383 */ "alias_opt ::= table_alias", + /* 384 */ "alias_opt ::= AS table_alias", + /* 385 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP", + /* 386 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP", + /* 387 */ "joined_table ::= table_reference join_type JOIN table_reference ON search_condition", + /* 388 */ "join_type ::=", + /* 389 */ "join_type ::= INNER", + /* 390 */ "query_specification ::= SELECT set_quantifier_opt select_list from_clause where_clause_opt partition_by_clause_opt twindow_clause_opt group_by_clause_opt having_clause_opt", + /* 391 */ "set_quantifier_opt ::=", + /* 392 */ "set_quantifier_opt ::= DISTINCT", + /* 393 */ "set_quantifier_opt ::= ALL", + /* 394 */ "select_list ::= NK_STAR", + /* 395 */ "select_list ::= select_sublist", + /* 396 */ "select_sublist ::= select_item", + /* 397 */ "select_sublist ::= select_sublist NK_COMMA select_item", + /* 398 */ "select_item ::= common_expression", + /* 399 */ "select_item ::= common_expression column_alias", + /* 400 */ "select_item ::= common_expression AS column_alias", + /* 401 */ "select_item ::= table_name NK_DOT NK_STAR", + /* 402 */ "where_clause_opt ::=", + /* 403 */ "where_clause_opt ::= WHERE search_condition", + /* 404 */ "partition_by_clause_opt ::=", + /* 405 */ "partition_by_clause_opt ::= PARTITION BY expression_list", + /* 406 */ "twindow_clause_opt ::=", + /* 407 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP", + /* 408 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP expression NK_RP", + /* 409 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt", + /* 410 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt", + /* 411 */ "sliding_opt ::=", + /* 412 */ "sliding_opt ::= SLIDING NK_LP duration_literal NK_RP", + /* 413 */ "fill_opt ::=", + /* 414 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP", + /* 415 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP", + /* 416 */ "fill_mode ::= NONE", + /* 417 */ "fill_mode ::= PREV", + /* 418 */ "fill_mode ::= NULL", + /* 419 */ "fill_mode ::= LINEAR", + /* 420 */ "fill_mode ::= NEXT", + /* 421 */ "group_by_clause_opt ::=", + /* 422 */ "group_by_clause_opt ::= GROUP BY group_by_list", + /* 423 */ "group_by_list ::= expression", + /* 424 */ "group_by_list ::= group_by_list NK_COMMA expression", + /* 425 */ "having_clause_opt ::=", + /* 426 */ "having_clause_opt ::= HAVING search_condition", + /* 427 */ "query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt", + /* 428 */ "query_expression_body ::= query_primary", + /* 429 */ "query_expression_body ::= query_expression_body UNION ALL query_expression_body", + /* 430 */ "query_expression_body ::= query_expression_body UNION query_expression_body", + /* 431 */ "query_primary ::= query_specification", + /* 432 */ "query_primary ::= NK_LP query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt NK_RP", + /* 433 */ "order_by_clause_opt ::=", + /* 434 */ "order_by_clause_opt ::= ORDER BY sort_specification_list", + /* 435 */ "slimit_clause_opt ::=", + /* 436 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER", + /* 437 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER", + /* 438 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER", + /* 439 */ "limit_clause_opt ::=", + /* 440 */ "limit_clause_opt ::= LIMIT NK_INTEGER", + /* 441 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER", + /* 442 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER", + /* 443 */ "subquery ::= NK_LP query_expression NK_RP", + /* 444 */ "search_condition ::= common_expression", + /* 445 */ "sort_specification_list ::= sort_specification", + /* 446 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification", + /* 447 */ "sort_specification ::= expression ordering_specification_opt null_ordering_opt", + /* 448 */ "ordering_specification_opt ::=", + /* 449 */ "ordering_specification_opt ::= ASC", + /* 450 */ "ordering_specification_opt ::= DESC", + /* 451 */ "null_ordering_opt ::=", + /* 452 */ "null_ordering_opt ::= NULLS FIRST", + /* 453 */ "null_ordering_opt ::= NULLS LAST", }; #endif /* NDEBUG */ @@ -2106,175 +2119,175 @@ static void yy_destructor( */ /********* Begin destructor definitions ***************************************/ /* Default NON-TERMINAL Destructor */ - case 240: /* cmd */ - case 243: /* literal */ - case 254: /* db_options */ - case 256: /* alter_db_options */ - case 261: /* retention */ - case 262: /* full_table_name */ - case 265: /* table_options */ - case 269: /* alter_table_clause */ - case 270: /* alter_table_options */ - case 273: /* signed_literal */ - case 274: /* create_subtable_clause */ - case 277: /* drop_table_clause */ - case 280: /* column_def */ - case 283: /* col_name */ - case 284: /* db_name_cond_opt */ - case 285: /* like_pattern_opt */ - case 286: /* table_name_cond */ - case 287: /* from_db_opt */ - case 288: /* func_name */ - case 291: /* index_options */ - case 293: /* duration_literal */ - case 294: /* sliding_opt */ - case 295: /* func */ - case 298: /* topic_options */ - case 299: /* query_expression */ - case 302: /* explain_options */ - case 306: /* stream_options */ - case 307: /* into_opt */ - case 309: /* signed */ - case 310: /* literal_func */ - case 313: /* expression */ - case 314: /* pseudo_column */ - case 315: /* column_reference */ - case 316: /* function_expression */ - case 317: /* subquery */ - case 322: /* star_func_para */ - case 323: /* predicate */ - case 326: /* in_predicate_value */ - case 327: /* boolean_value_expression */ - case 328: /* boolean_primary */ - case 329: /* common_expression */ - case 330: /* from_clause */ - case 331: /* table_reference_list */ - case 332: /* table_reference */ - case 333: /* table_primary */ - case 334: /* joined_table */ - case 336: /* parenthesized_joined_table */ - case 338: /* search_condition */ - case 339: /* query_specification */ - case 342: /* where_clause_opt */ - case 344: /* twindow_clause_opt */ - case 346: /* having_clause_opt */ - case 348: /* select_item */ - case 349: /* fill_opt */ - case 352: /* query_expression_body */ - case 354: /* slimit_clause_opt */ - case 355: /* limit_clause_opt */ - case 356: /* query_primary */ - case 358: /* sort_specification */ + case 239: /* cmd */ + case 242: /* literal */ + case 253: /* db_options */ + case 255: /* alter_db_options */ + case 260: /* retention */ + case 261: /* full_table_name */ + case 264: /* table_options */ + case 268: /* alter_table_clause */ + case 269: /* alter_table_options */ + case 272: /* signed_literal */ + case 273: /* create_subtable_clause */ + case 276: /* drop_table_clause */ + case 279: /* column_def */ + case 282: /* col_name */ + case 283: /* db_name_cond_opt */ + case 284: /* like_pattern_opt */ + case 285: /* table_name_cond */ + case 286: /* from_db_opt */ + case 287: /* func_name */ + case 290: /* index_options */ + case 292: /* duration_literal */ + case 293: /* sliding_opt */ + case 294: /* func */ + case 297: /* topic_options */ + case 298: /* query_expression */ + case 301: /* explain_options */ + case 305: /* stream_options */ + case 306: /* into_opt */ + case 308: /* signed */ + case 309: /* literal_func */ + case 312: /* expression */ + case 313: /* pseudo_column */ + case 314: /* column_reference */ + case 315: /* function_expression */ + case 316: /* subquery */ + case 321: /* star_func_para */ + case 322: /* predicate */ + case 325: /* in_predicate_value */ + case 326: /* boolean_value_expression */ + case 327: /* boolean_primary */ + case 328: /* common_expression */ + case 329: /* from_clause */ + case 330: /* table_reference_list */ + case 331: /* table_reference */ + case 332: /* table_primary */ + case 333: /* joined_table */ + case 335: /* parenthesized_joined_table */ + case 337: /* search_condition */ + case 338: /* query_specification */ + case 341: /* where_clause_opt */ + case 343: /* twindow_clause_opt */ + case 345: /* having_clause_opt */ + case 347: /* select_item */ + case 348: /* fill_opt */ + case 351: /* query_expression_body */ + case 353: /* slimit_clause_opt */ + case 354: /* limit_clause_opt */ + case 355: /* query_primary */ + case 357: /* sort_specification */ { - nodesDestroyNode((yypminor->yy636)); + nodesDestroyNode((yypminor->yy632)); } break; - case 241: /* account_options */ - case 242: /* alter_account_options */ - case 244: /* alter_account_option */ - case 304: /* bufsize_opt */ + case 240: /* account_options */ + case 241: /* alter_account_options */ + case 243: /* alter_account_option */ + case 303: /* bufsize_opt */ { } break; - case 245: /* user_name */ - case 247: /* priv_level */ - case 250: /* db_name */ - case 251: /* dnode_endpoint */ - case 252: /* dnode_host_name */ - case 271: /* column_name */ - case 279: /* table_name */ - case 289: /* function_name */ - case 290: /* index_name */ - case 297: /* topic_name */ - case 300: /* cgroup_name */ - case 305: /* stream_name */ - case 311: /* table_alias */ - case 312: /* column_alias */ - case 318: /* star_func */ - case 320: /* noarg_func */ - case 335: /* alias_opt */ + case 244: /* user_name */ + case 246: /* priv_level */ + case 249: /* db_name */ + case 250: /* dnode_endpoint */ + case 251: /* dnode_host_name */ + case 270: /* column_name */ + case 278: /* table_name */ + case 288: /* function_name */ + case 289: /* index_name */ + case 296: /* topic_name */ + case 299: /* cgroup_name */ + case 304: /* stream_name */ + case 310: /* table_alias */ + case 311: /* column_alias */ + case 317: /* star_func */ + case 319: /* noarg_func */ + case 334: /* alias_opt */ { } break; - case 246: /* privileges */ - case 248: /* priv_type_list */ - case 249: /* priv_type */ + case 245: /* privileges */ + case 247: /* priv_type_list */ + case 248: /* priv_type */ { } break; - case 253: /* not_exists_opt */ - case 255: /* exists_opt */ - case 301: /* analyze_opt */ - case 303: /* agg_func_opt */ - case 340: /* set_quantifier_opt */ + case 252: /* not_exists_opt */ + case 254: /* exists_opt */ + case 300: /* analyze_opt */ + case 302: /* agg_func_opt */ + case 339: /* set_quantifier_opt */ { } break; - case 257: /* integer_list */ - case 258: /* variable_list */ - case 259: /* retention_list */ - case 263: /* column_def_list */ - case 264: /* tags_def_opt */ - case 266: /* multi_create_clause */ - case 267: /* tags_def */ - case 268: /* multi_drop_clause */ - case 275: /* specific_tags_opt */ - case 276: /* literal_list */ - case 278: /* col_name_list */ - case 281: /* func_name_list */ - case 292: /* func_list */ - case 296: /* expression_list */ - case 308: /* dnode_list */ - case 319: /* star_func_para_list */ - case 321: /* other_para_list */ - case 341: /* select_list */ - case 343: /* partition_by_clause_opt */ - case 345: /* group_by_clause_opt */ - case 347: /* select_sublist */ - case 351: /* group_by_list */ - case 353: /* order_by_clause_opt */ - case 357: /* sort_specification_list */ + case 256: /* integer_list */ + case 257: /* variable_list */ + case 258: /* retention_list */ + case 262: /* column_def_list */ + case 263: /* tags_def_opt */ + case 265: /* multi_create_clause */ + case 266: /* tags_def */ + case 267: /* multi_drop_clause */ + case 274: /* specific_tags_opt */ + case 275: /* literal_list */ + case 277: /* col_name_list */ + case 280: /* func_name_list */ + case 291: /* func_list */ + case 295: /* expression_list */ + case 307: /* dnode_list */ + case 318: /* star_func_para_list */ + case 320: /* other_para_list */ + case 340: /* select_list */ + case 342: /* partition_by_clause_opt */ + case 344: /* group_by_clause_opt */ + case 346: /* select_sublist */ + case 350: /* group_by_list */ + case 352: /* order_by_clause_opt */ + case 356: /* sort_specification_list */ { - nodesDestroyList((yypminor->yy236)); + nodesDestroyList((yypminor->yy424)); } break; - case 260: /* alter_db_option */ - case 282: /* alter_table_option */ + case 259: /* alter_db_option */ + case 281: /* alter_table_option */ { } break; - case 272: /* type_name */ + case 271: /* type_name */ { } break; - case 324: /* compare_op */ - case 325: /* in_op */ + case 323: /* compare_op */ + case 324: /* in_op */ { } break; - case 337: /* join_type */ + case 336: /* join_type */ { } break; - case 350: /* fill_mode */ + case 349: /* fill_mode */ { } break; - case 359: /* ordering_specification_opt */ + case 358: /* ordering_specification_opt */ { } break; - case 360: /* null_ordering_opt */ + case 359: /* null_ordering_opt */ { } @@ -2573,461 +2586,460 @@ static const struct { YYCODETYPE lhs; /* Symbol on the left-hand side of the rule */ signed char nrhs; /* Negative of the number of RHS symbols in the rule */ } yyRuleInfo[] = { - { 240, -6 }, /* (0) cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */ - { 240, -4 }, /* (1) cmd ::= ALTER ACCOUNT NK_ID alter_account_options */ - { 241, 0 }, /* (2) account_options ::= */ - { 241, -3 }, /* (3) account_options ::= account_options PPS literal */ - { 241, -3 }, /* (4) account_options ::= account_options TSERIES literal */ - { 241, -3 }, /* (5) account_options ::= account_options STORAGE literal */ - { 241, -3 }, /* (6) account_options ::= account_options STREAMS literal */ - { 241, -3 }, /* (7) account_options ::= account_options QTIME literal */ - { 241, -3 }, /* (8) account_options ::= account_options DBS literal */ - { 241, -3 }, /* (9) account_options ::= account_options USERS literal */ - { 241, -3 }, /* (10) account_options ::= account_options CONNS literal */ - { 241, -3 }, /* (11) account_options ::= account_options STATE literal */ - { 242, -1 }, /* (12) alter_account_options ::= alter_account_option */ - { 242, -2 }, /* (13) alter_account_options ::= alter_account_options alter_account_option */ - { 244, -2 }, /* (14) alter_account_option ::= PASS literal */ - { 244, -2 }, /* (15) alter_account_option ::= PPS literal */ - { 244, -2 }, /* (16) alter_account_option ::= TSERIES literal */ - { 244, -2 }, /* (17) alter_account_option ::= STORAGE literal */ - { 244, -2 }, /* (18) alter_account_option ::= STREAMS literal */ - { 244, -2 }, /* (19) alter_account_option ::= QTIME literal */ - { 244, -2 }, /* (20) alter_account_option ::= DBS literal */ - { 244, -2 }, /* (21) alter_account_option ::= USERS literal */ - { 244, -2 }, /* (22) alter_account_option ::= CONNS literal */ - { 244, -2 }, /* (23) alter_account_option ::= STATE literal */ - { 240, -5 }, /* (24) cmd ::= CREATE USER user_name PASS NK_STRING */ - { 240, -5 }, /* (25) cmd ::= ALTER USER user_name PASS NK_STRING */ - { 240, -5 }, /* (26) cmd ::= ALTER USER user_name PRIVILEGE NK_STRING */ - { 240, -3 }, /* (27) cmd ::= DROP USER user_name */ - { 240, -6 }, /* (28) cmd ::= GRANT privileges ON priv_level TO user_name */ - { 240, -6 }, /* (29) cmd ::= REVOKE privileges ON priv_level FROM user_name */ - { 246, -1 }, /* (30) privileges ::= ALL */ - { 246, -1 }, /* (31) privileges ::= priv_type_list */ - { 248, -1 }, /* (32) priv_type_list ::= priv_type */ - { 248, -3 }, /* (33) priv_type_list ::= priv_type_list NK_COMMA priv_type */ - { 249, -1 }, /* (34) priv_type ::= READ */ - { 249, -1 }, /* (35) priv_type ::= WRITE */ - { 247, -3 }, /* (36) priv_level ::= NK_STAR NK_DOT NK_STAR */ - { 247, -3 }, /* (37) priv_level ::= db_name NK_DOT NK_STAR */ - { 240, -3 }, /* (38) cmd ::= CREATE DNODE dnode_endpoint */ - { 240, -5 }, /* (39) cmd ::= CREATE DNODE dnode_host_name PORT NK_INTEGER */ - { 240, -3 }, /* (40) cmd ::= DROP DNODE NK_INTEGER */ - { 240, -3 }, /* (41) cmd ::= DROP DNODE dnode_endpoint */ - { 240, -4 }, /* (42) cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ - { 240, -5 }, /* (43) cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */ - { 240, -4 }, /* (44) cmd ::= ALTER ALL DNODES NK_STRING */ - { 240, -5 }, /* (45) cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */ - { 251, -1 }, /* (46) dnode_endpoint ::= NK_STRING */ - { 252, -1 }, /* (47) dnode_host_name ::= NK_ID */ - { 252, -1 }, /* (48) dnode_host_name ::= NK_IPTOKEN */ - { 240, -3 }, /* (49) cmd ::= ALTER LOCAL NK_STRING */ - { 240, -4 }, /* (50) cmd ::= ALTER LOCAL NK_STRING NK_STRING */ - { 240, -5 }, /* (51) cmd ::= CREATE QNODE ON DNODE NK_INTEGER */ - { 240, -5 }, /* (52) cmd ::= DROP QNODE ON DNODE NK_INTEGER */ - { 240, -5 }, /* (53) cmd ::= CREATE BNODE ON DNODE NK_INTEGER */ - { 240, -5 }, /* (54) cmd ::= DROP BNODE ON DNODE NK_INTEGER */ - { 240, -5 }, /* (55) cmd ::= CREATE SNODE ON DNODE NK_INTEGER */ - { 240, -5 }, /* (56) cmd ::= DROP SNODE ON DNODE NK_INTEGER */ - { 240, -5 }, /* (57) cmd ::= CREATE MNODE ON DNODE NK_INTEGER */ - { 240, -5 }, /* (58) cmd ::= DROP MNODE ON DNODE NK_INTEGER */ - { 240, -5 }, /* (59) cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ - { 240, -4 }, /* (60) cmd ::= DROP DATABASE exists_opt db_name */ - { 240, -2 }, /* (61) cmd ::= USE db_name */ - { 240, -4 }, /* (62) cmd ::= ALTER DATABASE db_name alter_db_options */ - { 253, -3 }, /* (63) not_exists_opt ::= IF NOT EXISTS */ - { 253, 0 }, /* (64) not_exists_opt ::= */ - { 255, -2 }, /* (65) exists_opt ::= IF EXISTS */ - { 255, 0 }, /* (66) exists_opt ::= */ - { 254, 0 }, /* (67) db_options ::= */ - { 254, -3 }, /* (68) db_options ::= db_options BUFFER NK_INTEGER */ - { 254, -3 }, /* (69) db_options ::= db_options CACHELAST NK_INTEGER */ - { 254, -3 }, /* (70) db_options ::= db_options COMP NK_INTEGER */ - { 254, -3 }, /* (71) db_options ::= db_options DAYS NK_INTEGER */ - { 254, -3 }, /* (72) db_options ::= db_options DAYS NK_VARIABLE */ - { 254, -3 }, /* (73) db_options ::= db_options FSYNC NK_INTEGER */ - { 254, -3 }, /* (74) db_options ::= db_options MAXROWS NK_INTEGER */ - { 254, -3 }, /* (75) db_options ::= db_options MINROWS NK_INTEGER */ - { 254, -3 }, /* (76) db_options ::= db_options KEEP integer_list */ - { 254, -3 }, /* (77) db_options ::= db_options KEEP variable_list */ - { 254, -3 }, /* (78) db_options ::= db_options PAGES NK_INTEGER */ - { 254, -3 }, /* (79) db_options ::= db_options PAGESIZE NK_INTEGER */ - { 254, -3 }, /* (80) db_options ::= db_options PRECISION NK_STRING */ - { 254, -3 }, /* (81) db_options ::= db_options REPLICA NK_INTEGER */ - { 254, -3 }, /* (82) db_options ::= db_options STRICT NK_INTEGER */ - { 254, -3 }, /* (83) db_options ::= db_options WAL NK_INTEGER */ - { 254, -3 }, /* (84) db_options ::= db_options VGROUPS NK_INTEGER */ - { 254, -3 }, /* (85) db_options ::= db_options SINGLE_STABLE NK_INTEGER */ - { 254, -3 }, /* (86) db_options ::= db_options RETENTIONS retention_list */ - { 254, -3 }, /* (87) db_options ::= db_options SCHEMALESS NK_INTEGER */ - { 256, -1 }, /* (88) alter_db_options ::= alter_db_option */ - { 256, -2 }, /* (89) alter_db_options ::= alter_db_options alter_db_option */ - { 260, -2 }, /* (90) alter_db_option ::= BUFFER NK_INTEGER */ - { 260, -2 }, /* (91) alter_db_option ::= CACHELAST NK_INTEGER */ - { 260, -2 }, /* (92) alter_db_option ::= FSYNC NK_INTEGER */ - { 260, -2 }, /* (93) alter_db_option ::= KEEP integer_list */ - { 260, -2 }, /* (94) alter_db_option ::= KEEP variable_list */ - { 260, -2 }, /* (95) alter_db_option ::= PAGES NK_INTEGER */ - { 260, -2 }, /* (96) alter_db_option ::= REPLICA NK_INTEGER */ - { 260, -2 }, /* (97) alter_db_option ::= STRICT NK_INTEGER */ - { 260, -2 }, /* (98) alter_db_option ::= WAL NK_INTEGER */ - { 257, -1 }, /* (99) integer_list ::= NK_INTEGER */ - { 257, -3 }, /* (100) integer_list ::= integer_list NK_COMMA NK_INTEGER */ - { 258, -1 }, /* (101) variable_list ::= NK_VARIABLE */ - { 258, -3 }, /* (102) variable_list ::= variable_list NK_COMMA NK_VARIABLE */ - { 259, -1 }, /* (103) retention_list ::= retention */ - { 259, -3 }, /* (104) retention_list ::= retention_list NK_COMMA retention */ - { 261, -3 }, /* (105) retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ - { 240, -9 }, /* (106) cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ - { 240, -3 }, /* (107) cmd ::= CREATE TABLE multi_create_clause */ - { 240, -9 }, /* (108) cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ - { 240, -3 }, /* (109) cmd ::= DROP TABLE multi_drop_clause */ - { 240, -4 }, /* (110) cmd ::= DROP STABLE exists_opt full_table_name */ - { 240, -3 }, /* (111) cmd ::= ALTER TABLE alter_table_clause */ - { 240, -3 }, /* (112) cmd ::= ALTER STABLE alter_table_clause */ - { 269, -2 }, /* (113) alter_table_clause ::= full_table_name alter_table_options */ - { 269, -5 }, /* (114) alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ - { 269, -4 }, /* (115) alter_table_clause ::= full_table_name DROP COLUMN column_name */ - { 269, -5 }, /* (116) alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ - { 269, -5 }, /* (117) alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ - { 269, -5 }, /* (118) alter_table_clause ::= full_table_name ADD TAG column_name type_name */ - { 269, -4 }, /* (119) alter_table_clause ::= full_table_name DROP TAG column_name */ - { 269, -5 }, /* (120) alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ - { 269, -5 }, /* (121) alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ - { 269, -6 }, /* (122) alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */ - { 266, -1 }, /* (123) multi_create_clause ::= create_subtable_clause */ - { 266, -2 }, /* (124) multi_create_clause ::= multi_create_clause create_subtable_clause */ - { 274, -10 }, /* (125) create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_tags_opt TAGS NK_LP literal_list NK_RP table_options */ - { 268, -1 }, /* (126) multi_drop_clause ::= drop_table_clause */ - { 268, -2 }, /* (127) multi_drop_clause ::= multi_drop_clause drop_table_clause */ - { 277, -2 }, /* (128) drop_table_clause ::= exists_opt full_table_name */ - { 275, 0 }, /* (129) specific_tags_opt ::= */ - { 275, -3 }, /* (130) specific_tags_opt ::= NK_LP col_name_list NK_RP */ - { 262, -1 }, /* (131) full_table_name ::= table_name */ - { 262, -3 }, /* (132) full_table_name ::= db_name NK_DOT table_name */ - { 263, -1 }, /* (133) column_def_list ::= column_def */ - { 263, -3 }, /* (134) column_def_list ::= column_def_list NK_COMMA column_def */ - { 280, -2 }, /* (135) column_def ::= column_name type_name */ - { 280, -4 }, /* (136) column_def ::= column_name type_name COMMENT NK_STRING */ - { 272, -1 }, /* (137) type_name ::= BOOL */ - { 272, -1 }, /* (138) type_name ::= TINYINT */ - { 272, -1 }, /* (139) type_name ::= SMALLINT */ - { 272, -1 }, /* (140) type_name ::= INT */ - { 272, -1 }, /* (141) type_name ::= INTEGER */ - { 272, -1 }, /* (142) type_name ::= BIGINT */ - { 272, -1 }, /* (143) type_name ::= FLOAT */ - { 272, -1 }, /* (144) type_name ::= DOUBLE */ - { 272, -4 }, /* (145) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ - { 272, -1 }, /* (146) type_name ::= TIMESTAMP */ - { 272, -4 }, /* (147) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ - { 272, -2 }, /* (148) type_name ::= TINYINT UNSIGNED */ - { 272, -2 }, /* (149) type_name ::= SMALLINT UNSIGNED */ - { 272, -2 }, /* (150) type_name ::= INT UNSIGNED */ - { 272, -2 }, /* (151) type_name ::= BIGINT UNSIGNED */ - { 272, -1 }, /* (152) type_name ::= JSON */ - { 272, -4 }, /* (153) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ - { 272, -1 }, /* (154) type_name ::= MEDIUMBLOB */ - { 272, -1 }, /* (155) type_name ::= BLOB */ - { 272, -4 }, /* (156) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ - { 272, -1 }, /* (157) type_name ::= DECIMAL */ - { 272, -4 }, /* (158) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ - { 272, -6 }, /* (159) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ - { 264, 0 }, /* (160) tags_def_opt ::= */ - { 264, -1 }, /* (161) tags_def_opt ::= tags_def */ - { 267, -4 }, /* (162) tags_def ::= TAGS NK_LP column_def_list NK_RP */ - { 265, 0 }, /* (163) table_options ::= */ - { 265, -3 }, /* (164) table_options ::= table_options COMMENT NK_STRING */ - { 265, -3 }, /* (165) table_options ::= table_options DELAY NK_INTEGER */ - { 265, -3 }, /* (166) table_options ::= table_options FILE_FACTOR NK_FLOAT */ - { 265, -5 }, /* (167) table_options ::= table_options ROLLUP NK_LP func_name_list NK_RP */ - { 265, -3 }, /* (168) table_options ::= table_options TTL NK_INTEGER */ - { 265, -5 }, /* (169) table_options ::= table_options SMA NK_LP col_name_list NK_RP */ - { 270, -1 }, /* (170) alter_table_options ::= alter_table_option */ - { 270, -2 }, /* (171) alter_table_options ::= alter_table_options alter_table_option */ - { 282, -2 }, /* (172) alter_table_option ::= COMMENT NK_STRING */ - { 282, -2 }, /* (173) alter_table_option ::= TTL NK_INTEGER */ - { 278, -1 }, /* (174) col_name_list ::= col_name */ - { 278, -3 }, /* (175) col_name_list ::= col_name_list NK_COMMA col_name */ - { 283, -1 }, /* (176) col_name ::= column_name */ - { 240, -2 }, /* (177) cmd ::= SHOW DNODES */ - { 240, -2 }, /* (178) cmd ::= SHOW USERS */ - { 240, -2 }, /* (179) cmd ::= SHOW DATABASES */ - { 240, -4 }, /* (180) cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */ - { 240, -4 }, /* (181) cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ - { 240, -3 }, /* (182) cmd ::= SHOW db_name_cond_opt VGROUPS */ - { 240, -2 }, /* (183) cmd ::= SHOW MNODES */ - { 240, -2 }, /* (184) cmd ::= SHOW MODULES */ - { 240, -2 }, /* (185) cmd ::= SHOW QNODES */ - { 240, -2 }, /* (186) cmd ::= SHOW FUNCTIONS */ - { 240, -5 }, /* (187) cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ - { 240, -2 }, /* (188) cmd ::= SHOW STREAMS */ - { 240, -2 }, /* (189) cmd ::= SHOW ACCOUNTS */ - { 240, -2 }, /* (190) cmd ::= SHOW APPS */ - { 240, -2 }, /* (191) cmd ::= SHOW CONNECTIONS */ - { 240, -2 }, /* (192) cmd ::= SHOW LICENCE */ - { 240, -2 }, /* (193) cmd ::= SHOW GRANTS */ - { 240, -4 }, /* (194) cmd ::= SHOW CREATE DATABASE db_name */ - { 240, -4 }, /* (195) cmd ::= SHOW CREATE TABLE full_table_name */ - { 240, -4 }, /* (196) cmd ::= SHOW CREATE STABLE full_table_name */ - { 240, -2 }, /* (197) cmd ::= SHOW QUERIES */ - { 240, -2 }, /* (198) cmd ::= SHOW SCORES */ - { 240, -2 }, /* (199) cmd ::= SHOW TOPICS */ - { 240, -2 }, /* (200) cmd ::= SHOW VARIABLES */ - { 240, -2 }, /* (201) cmd ::= SHOW BNODES */ - { 240, -2 }, /* (202) cmd ::= SHOW SNODES */ - { 240, -2 }, /* (203) cmd ::= SHOW CLUSTER */ - { 240, -2 }, /* (204) cmd ::= SHOW TRANSACTIONS */ - { 284, 0 }, /* (205) db_name_cond_opt ::= */ - { 284, -2 }, /* (206) db_name_cond_opt ::= db_name NK_DOT */ - { 285, 0 }, /* (207) like_pattern_opt ::= */ - { 285, -2 }, /* (208) like_pattern_opt ::= LIKE NK_STRING */ - { 286, -1 }, /* (209) table_name_cond ::= table_name */ - { 287, 0 }, /* (210) from_db_opt ::= */ - { 287, -2 }, /* (211) from_db_opt ::= FROM db_name */ - { 281, -1 }, /* (212) func_name_list ::= func_name */ - { 281, -3 }, /* (213) func_name_list ::= func_name_list NK_COMMA func_name */ - { 288, -1 }, /* (214) func_name ::= function_name */ - { 240, -8 }, /* (215) cmd ::= CREATE SMA INDEX not_exists_opt index_name ON table_name index_options */ - { 240, -10 }, /* (216) cmd ::= CREATE FULLTEXT INDEX not_exists_opt index_name ON table_name NK_LP col_name_list NK_RP */ - { 240, -6 }, /* (217) cmd ::= DROP INDEX exists_opt index_name ON table_name */ - { 291, 0 }, /* (218) index_options ::= */ - { 291, -9 }, /* (219) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt */ - { 291, -11 }, /* (220) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt */ - { 292, -1 }, /* (221) func_list ::= func */ - { 292, -3 }, /* (222) func_list ::= func_list NK_COMMA func */ - { 295, -4 }, /* (223) func ::= function_name NK_LP expression_list NK_RP */ - { 240, -7 }, /* (224) cmd ::= CREATE TOPIC not_exists_opt topic_name topic_options AS query_expression */ - { 240, -7 }, /* (225) cmd ::= CREATE TOPIC not_exists_opt topic_name topic_options AS db_name */ - { 240, -4 }, /* (226) cmd ::= DROP TOPIC exists_opt topic_name */ - { 240, -7 }, /* (227) cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ - { 298, 0 }, /* (228) topic_options ::= */ - { 298, -3 }, /* (229) topic_options ::= topic_options WITH TABLE */ - { 298, -3 }, /* (230) topic_options ::= topic_options WITH SCHEMA */ - { 298, -3 }, /* (231) topic_options ::= topic_options WITH TAG */ - { 240, -2 }, /* (232) cmd ::= DESC full_table_name */ - { 240, -2 }, /* (233) cmd ::= DESCRIBE full_table_name */ - { 240, -3 }, /* (234) cmd ::= RESET QUERY CACHE */ - { 240, -4 }, /* (235) cmd ::= EXPLAIN analyze_opt explain_options query_expression */ - { 301, 0 }, /* (236) analyze_opt ::= */ - { 301, -1 }, /* (237) analyze_opt ::= ANALYZE */ - { 302, 0 }, /* (238) explain_options ::= */ - { 302, -3 }, /* (239) explain_options ::= explain_options VERBOSE NK_BOOL */ - { 302, -3 }, /* (240) explain_options ::= explain_options RATIO NK_FLOAT */ - { 240, -6 }, /* (241) cmd ::= COMPACT VNODES IN NK_LP integer_list NK_RP */ - { 240, -10 }, /* (242) cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt */ - { 240, -4 }, /* (243) cmd ::= DROP FUNCTION exists_opt function_name */ - { 303, 0 }, /* (244) agg_func_opt ::= */ - { 303, -1 }, /* (245) agg_func_opt ::= AGGREGATE */ - { 304, 0 }, /* (246) bufsize_opt ::= */ - { 304, -2 }, /* (247) bufsize_opt ::= BUFSIZE NK_INTEGER */ - { 240, -8 }, /* (248) cmd ::= CREATE STREAM not_exists_opt stream_name stream_options into_opt AS query_expression */ - { 240, -4 }, /* (249) cmd ::= DROP STREAM exists_opt stream_name */ - { 307, 0 }, /* (250) into_opt ::= */ - { 307, -2 }, /* (251) into_opt ::= INTO full_table_name */ - { 306, 0 }, /* (252) stream_options ::= */ - { 306, -3 }, /* (253) stream_options ::= stream_options TRIGGER AT_ONCE */ - { 306, -3 }, /* (254) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ - { 306, -3 }, /* (255) stream_options ::= stream_options WATERMARK duration_literal */ - { 240, -3 }, /* (256) cmd ::= KILL CONNECTION NK_INTEGER */ - { 240, -3 }, /* (257) cmd ::= KILL QUERY NK_INTEGER */ - { 240, -3 }, /* (258) cmd ::= KILL TRANSACTION NK_INTEGER */ - { 240, -4 }, /* (259) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ - { 240, -4 }, /* (260) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ - { 240, -3 }, /* (261) cmd ::= SPLIT VGROUP NK_INTEGER */ - { 308, -2 }, /* (262) dnode_list ::= DNODE NK_INTEGER */ - { 308, -3 }, /* (263) dnode_list ::= dnode_list DNODE NK_INTEGER */ - { 240, -3 }, /* (264) cmd ::= SYNCDB db_name REPLICA */ - { 240, -1 }, /* (265) cmd ::= query_expression */ - { 243, -1 }, /* (266) literal ::= NK_INTEGER */ - { 243, -1 }, /* (267) literal ::= NK_FLOAT */ - { 243, -1 }, /* (268) literal ::= NK_STRING */ - { 243, -1 }, /* (269) literal ::= NK_BOOL */ - { 243, -2 }, /* (270) literal ::= TIMESTAMP NK_STRING */ - { 243, -1 }, /* (271) literal ::= duration_literal */ - { 243, -1 }, /* (272) literal ::= NULL */ - { 243, -1 }, /* (273) literal ::= NK_QUESTION */ - { 293, -1 }, /* (274) duration_literal ::= NK_VARIABLE */ - { 309, -1 }, /* (275) signed ::= NK_INTEGER */ - { 309, -2 }, /* (276) signed ::= NK_PLUS NK_INTEGER */ - { 309, -2 }, /* (277) signed ::= NK_MINUS NK_INTEGER */ - { 309, -1 }, /* (278) signed ::= NK_FLOAT */ - { 309, -2 }, /* (279) signed ::= NK_PLUS NK_FLOAT */ - { 309, -2 }, /* (280) signed ::= NK_MINUS NK_FLOAT */ - { 273, -1 }, /* (281) signed_literal ::= signed */ - { 273, -1 }, /* (282) signed_literal ::= NK_STRING */ - { 273, -1 }, /* (283) signed_literal ::= NK_BOOL */ - { 273, -2 }, /* (284) signed_literal ::= TIMESTAMP NK_STRING */ - { 273, -1 }, /* (285) signed_literal ::= duration_literal */ - { 273, -1 }, /* (286) signed_literal ::= NULL */ - { 273, -1 }, /* (287) signed_literal ::= literal_func */ - { 276, -1 }, /* (288) literal_list ::= signed_literal */ - { 276, -3 }, /* (289) literal_list ::= literal_list NK_COMMA signed_literal */ - { 250, -1 }, /* (290) db_name ::= NK_ID */ - { 279, -1 }, /* (291) table_name ::= NK_ID */ - { 271, -1 }, /* (292) column_name ::= NK_ID */ - { 289, -1 }, /* (293) function_name ::= NK_ID */ - { 311, -1 }, /* (294) table_alias ::= NK_ID */ - { 312, -1 }, /* (295) column_alias ::= NK_ID */ - { 245, -1 }, /* (296) user_name ::= NK_ID */ - { 290, -1 }, /* (297) index_name ::= NK_ID */ - { 297, -1 }, /* (298) topic_name ::= NK_ID */ - { 305, -1 }, /* (299) stream_name ::= NK_ID */ - { 300, -1 }, /* (300) cgroup_name ::= NK_ID */ - { 313, -1 }, /* (301) expression ::= literal */ - { 313, -1 }, /* (302) expression ::= pseudo_column */ - { 313, -1 }, /* (303) expression ::= column_reference */ - { 313, -1 }, /* (304) expression ::= function_expression */ - { 313, -1 }, /* (305) expression ::= subquery */ - { 313, -3 }, /* (306) expression ::= NK_LP expression NK_RP */ - { 313, -2 }, /* (307) expression ::= NK_PLUS expression */ - { 313, -2 }, /* (308) expression ::= NK_MINUS expression */ - { 313, -3 }, /* (309) expression ::= expression NK_PLUS expression */ - { 313, -3 }, /* (310) expression ::= expression NK_MINUS expression */ - { 313, -3 }, /* (311) expression ::= expression NK_STAR expression */ - { 313, -3 }, /* (312) expression ::= expression NK_SLASH expression */ - { 313, -3 }, /* (313) expression ::= expression NK_REM expression */ - { 313, -3 }, /* (314) expression ::= column_reference NK_ARROW NK_STRING */ - { 296, -1 }, /* (315) expression_list ::= expression */ - { 296, -3 }, /* (316) expression_list ::= expression_list NK_COMMA expression */ - { 315, -1 }, /* (317) column_reference ::= column_name */ - { 315, -3 }, /* (318) column_reference ::= table_name NK_DOT column_name */ - { 314, -1 }, /* (319) pseudo_column ::= ROWTS */ - { 314, -1 }, /* (320) pseudo_column ::= TBNAME */ - { 314, -3 }, /* (321) pseudo_column ::= table_name NK_DOT TBNAME */ - { 314, -1 }, /* (322) pseudo_column ::= QSTARTTS */ - { 314, -1 }, /* (323) pseudo_column ::= QENDTS */ - { 314, -1 }, /* (324) pseudo_column ::= WSTARTTS */ - { 314, -1 }, /* (325) pseudo_column ::= WENDTS */ - { 314, -1 }, /* (326) pseudo_column ::= WDURATION */ - { 316, -4 }, /* (327) function_expression ::= function_name NK_LP expression_list NK_RP */ - { 316, -4 }, /* (328) function_expression ::= star_func NK_LP star_func_para_list NK_RP */ - { 316, -6 }, /* (329) function_expression ::= CAST NK_LP expression AS type_name NK_RP */ - { 316, -1 }, /* (330) function_expression ::= literal_func */ - { 310, -3 }, /* (331) literal_func ::= noarg_func NK_LP NK_RP */ - { 310, -1 }, /* (332) literal_func ::= NOW */ - { 320, -1 }, /* (333) noarg_func ::= NOW */ - { 320, -1 }, /* (334) noarg_func ::= TODAY */ - { 320, -1 }, /* (335) noarg_func ::= TIMEZONE */ - { 318, -1 }, /* (336) star_func ::= COUNT */ - { 318, -1 }, /* (337) star_func ::= FIRST */ - { 318, -1 }, /* (338) star_func ::= LAST */ - { 318, -1 }, /* (339) star_func ::= LAST_ROW */ - { 319, -1 }, /* (340) star_func_para_list ::= NK_STAR */ - { 319, -1 }, /* (341) star_func_para_list ::= other_para_list */ - { 321, -1 }, /* (342) other_para_list ::= star_func_para */ - { 321, -3 }, /* (343) other_para_list ::= other_para_list NK_COMMA star_func_para */ - { 322, -1 }, /* (344) star_func_para ::= expression */ - { 322, -3 }, /* (345) star_func_para ::= table_name NK_DOT NK_STAR */ - { 323, -3 }, /* (346) predicate ::= expression compare_op expression */ - { 323, -5 }, /* (347) predicate ::= expression BETWEEN expression AND expression */ - { 323, -6 }, /* (348) predicate ::= expression NOT BETWEEN expression AND expression */ - { 323, -3 }, /* (349) predicate ::= expression IS NULL */ - { 323, -4 }, /* (350) predicate ::= expression IS NOT NULL */ - { 323, -3 }, /* (351) predicate ::= expression in_op in_predicate_value */ - { 324, -1 }, /* (352) compare_op ::= NK_LT */ - { 324, -1 }, /* (353) compare_op ::= NK_GT */ - { 324, -1 }, /* (354) compare_op ::= NK_LE */ - { 324, -1 }, /* (355) compare_op ::= NK_GE */ - { 324, -1 }, /* (356) compare_op ::= NK_NE */ - { 324, -1 }, /* (357) compare_op ::= NK_EQ */ - { 324, -1 }, /* (358) compare_op ::= LIKE */ - { 324, -2 }, /* (359) compare_op ::= NOT LIKE */ - { 324, -1 }, /* (360) compare_op ::= MATCH */ - { 324, -1 }, /* (361) compare_op ::= NMATCH */ - { 324, -1 }, /* (362) compare_op ::= CONTAINS */ - { 325, -1 }, /* (363) in_op ::= IN */ - { 325, -2 }, /* (364) in_op ::= NOT IN */ - { 326, -3 }, /* (365) in_predicate_value ::= NK_LP expression_list NK_RP */ - { 327, -1 }, /* (366) boolean_value_expression ::= boolean_primary */ - { 327, -2 }, /* (367) boolean_value_expression ::= NOT boolean_primary */ - { 327, -3 }, /* (368) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ - { 327, -3 }, /* (369) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ - { 328, -1 }, /* (370) boolean_primary ::= predicate */ - { 328, -3 }, /* (371) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ - { 329, -1 }, /* (372) common_expression ::= expression */ - { 329, -1 }, /* (373) common_expression ::= boolean_value_expression */ - { 330, -2 }, /* (374) from_clause ::= FROM table_reference_list */ - { 331, -1 }, /* (375) table_reference_list ::= table_reference */ - { 331, -3 }, /* (376) table_reference_list ::= table_reference_list NK_COMMA table_reference */ - { 332, -1 }, /* (377) table_reference ::= table_primary */ - { 332, -1 }, /* (378) table_reference ::= joined_table */ - { 333, -2 }, /* (379) table_primary ::= table_name alias_opt */ - { 333, -4 }, /* (380) table_primary ::= db_name NK_DOT table_name alias_opt */ - { 333, -2 }, /* (381) table_primary ::= subquery alias_opt */ - { 333, -1 }, /* (382) table_primary ::= parenthesized_joined_table */ - { 335, 0 }, /* (383) alias_opt ::= */ - { 335, -1 }, /* (384) alias_opt ::= table_alias */ - { 335, -2 }, /* (385) alias_opt ::= AS table_alias */ - { 336, -3 }, /* (386) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ - { 336, -3 }, /* (387) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ - { 334, -6 }, /* (388) joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ - { 337, 0 }, /* (389) join_type ::= */ - { 337, -1 }, /* (390) join_type ::= INNER */ - { 339, -9 }, /* (391) query_specification ::= SELECT set_quantifier_opt select_list from_clause where_clause_opt partition_by_clause_opt twindow_clause_opt group_by_clause_opt having_clause_opt */ - { 340, 0 }, /* (392) set_quantifier_opt ::= */ - { 340, -1 }, /* (393) set_quantifier_opt ::= DISTINCT */ - { 340, -1 }, /* (394) set_quantifier_opt ::= ALL */ - { 341, -1 }, /* (395) select_list ::= NK_STAR */ - { 341, -1 }, /* (396) select_list ::= select_sublist */ - { 347, -1 }, /* (397) select_sublist ::= select_item */ - { 347, -3 }, /* (398) select_sublist ::= select_sublist NK_COMMA select_item */ - { 348, -1 }, /* (399) select_item ::= common_expression */ - { 348, -2 }, /* (400) select_item ::= common_expression column_alias */ - { 348, -3 }, /* (401) select_item ::= common_expression AS column_alias */ - { 348, -3 }, /* (402) select_item ::= table_name NK_DOT NK_STAR */ - { 342, 0 }, /* (403) where_clause_opt ::= */ - { 342, -2 }, /* (404) where_clause_opt ::= WHERE search_condition */ - { 343, 0 }, /* (405) partition_by_clause_opt ::= */ - { 343, -3 }, /* (406) partition_by_clause_opt ::= PARTITION BY expression_list */ - { 344, 0 }, /* (407) twindow_clause_opt ::= */ - { 344, -6 }, /* (408) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ - { 344, -4 }, /* (409) twindow_clause_opt ::= STATE_WINDOW NK_LP expression NK_RP */ - { 344, -6 }, /* (410) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ - { 344, -8 }, /* (411) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ - { 294, 0 }, /* (412) sliding_opt ::= */ - { 294, -4 }, /* (413) sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ - { 349, 0 }, /* (414) fill_opt ::= */ - { 349, -4 }, /* (415) fill_opt ::= FILL NK_LP fill_mode NK_RP */ - { 349, -6 }, /* (416) fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */ - { 350, -1 }, /* (417) fill_mode ::= NONE */ - { 350, -1 }, /* (418) fill_mode ::= PREV */ - { 350, -1 }, /* (419) fill_mode ::= NULL */ - { 350, -1 }, /* (420) fill_mode ::= LINEAR */ - { 350, -1 }, /* (421) fill_mode ::= NEXT */ - { 345, 0 }, /* (422) group_by_clause_opt ::= */ - { 345, -3 }, /* (423) group_by_clause_opt ::= GROUP BY group_by_list */ - { 351, -1 }, /* (424) group_by_list ::= expression */ - { 351, -3 }, /* (425) group_by_list ::= group_by_list NK_COMMA expression */ - { 346, 0 }, /* (426) having_clause_opt ::= */ - { 346, -2 }, /* (427) having_clause_opt ::= HAVING search_condition */ - { 299, -4 }, /* (428) query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt */ - { 352, -1 }, /* (429) query_expression_body ::= query_primary */ - { 352, -4 }, /* (430) query_expression_body ::= query_expression_body UNION ALL query_expression_body */ - { 352, -3 }, /* (431) query_expression_body ::= query_expression_body UNION query_expression_body */ - { 356, -1 }, /* (432) query_primary ::= query_specification */ - { 356, -6 }, /* (433) query_primary ::= NK_LP query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt NK_RP */ - { 353, 0 }, /* (434) order_by_clause_opt ::= */ - { 353, -3 }, /* (435) order_by_clause_opt ::= ORDER BY sort_specification_list */ - { 354, 0 }, /* (436) slimit_clause_opt ::= */ - { 354, -2 }, /* (437) slimit_clause_opt ::= SLIMIT NK_INTEGER */ - { 354, -4 }, /* (438) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ - { 354, -4 }, /* (439) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - { 355, 0 }, /* (440) limit_clause_opt ::= */ - { 355, -2 }, /* (441) limit_clause_opt ::= LIMIT NK_INTEGER */ - { 355, -4 }, /* (442) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ - { 355, -4 }, /* (443) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - { 317, -3 }, /* (444) subquery ::= NK_LP query_expression NK_RP */ - { 338, -1 }, /* (445) search_condition ::= common_expression */ - { 357, -1 }, /* (446) sort_specification_list ::= sort_specification */ - { 357, -3 }, /* (447) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ - { 358, -3 }, /* (448) sort_specification ::= expression ordering_specification_opt null_ordering_opt */ - { 359, 0 }, /* (449) ordering_specification_opt ::= */ - { 359, -1 }, /* (450) ordering_specification_opt ::= ASC */ - { 359, -1 }, /* (451) ordering_specification_opt ::= DESC */ - { 360, 0 }, /* (452) null_ordering_opt ::= */ - { 360, -2 }, /* (453) null_ordering_opt ::= NULLS FIRST */ - { 360, -2 }, /* (454) null_ordering_opt ::= NULLS LAST */ + { 239, -6 }, /* (0) cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */ + { 239, -4 }, /* (1) cmd ::= ALTER ACCOUNT NK_ID alter_account_options */ + { 240, 0 }, /* (2) account_options ::= */ + { 240, -3 }, /* (3) account_options ::= account_options PPS literal */ + { 240, -3 }, /* (4) account_options ::= account_options TSERIES literal */ + { 240, -3 }, /* (5) account_options ::= account_options STORAGE literal */ + { 240, -3 }, /* (6) account_options ::= account_options STREAMS literal */ + { 240, -3 }, /* (7) account_options ::= account_options QTIME literal */ + { 240, -3 }, /* (8) account_options ::= account_options DBS literal */ + { 240, -3 }, /* (9) account_options ::= account_options USERS literal */ + { 240, -3 }, /* (10) account_options ::= account_options CONNS literal */ + { 240, -3 }, /* (11) account_options ::= account_options STATE literal */ + { 241, -1 }, /* (12) alter_account_options ::= alter_account_option */ + { 241, -2 }, /* (13) alter_account_options ::= alter_account_options alter_account_option */ + { 243, -2 }, /* (14) alter_account_option ::= PASS literal */ + { 243, -2 }, /* (15) alter_account_option ::= PPS literal */ + { 243, -2 }, /* (16) alter_account_option ::= TSERIES literal */ + { 243, -2 }, /* (17) alter_account_option ::= STORAGE literal */ + { 243, -2 }, /* (18) alter_account_option ::= STREAMS literal */ + { 243, -2 }, /* (19) alter_account_option ::= QTIME literal */ + { 243, -2 }, /* (20) alter_account_option ::= DBS literal */ + { 243, -2 }, /* (21) alter_account_option ::= USERS literal */ + { 243, -2 }, /* (22) alter_account_option ::= CONNS literal */ + { 243, -2 }, /* (23) alter_account_option ::= STATE literal */ + { 239, -5 }, /* (24) cmd ::= CREATE USER user_name PASS NK_STRING */ + { 239, -5 }, /* (25) cmd ::= ALTER USER user_name PASS NK_STRING */ + { 239, -5 }, /* (26) cmd ::= ALTER USER user_name PRIVILEGE NK_STRING */ + { 239, -3 }, /* (27) cmd ::= DROP USER user_name */ + { 239, -6 }, /* (28) cmd ::= GRANT privileges ON priv_level TO user_name */ + { 239, -6 }, /* (29) cmd ::= REVOKE privileges ON priv_level FROM user_name */ + { 245, -1 }, /* (30) privileges ::= ALL */ + { 245, -1 }, /* (31) privileges ::= priv_type_list */ + { 247, -1 }, /* (32) priv_type_list ::= priv_type */ + { 247, -3 }, /* (33) priv_type_list ::= priv_type_list NK_COMMA priv_type */ + { 248, -1 }, /* (34) priv_type ::= READ */ + { 248, -1 }, /* (35) priv_type ::= WRITE */ + { 246, -3 }, /* (36) priv_level ::= NK_STAR NK_DOT NK_STAR */ + { 246, -3 }, /* (37) priv_level ::= db_name NK_DOT NK_STAR */ + { 239, -3 }, /* (38) cmd ::= CREATE DNODE dnode_endpoint */ + { 239, -5 }, /* (39) cmd ::= CREATE DNODE dnode_host_name PORT NK_INTEGER */ + { 239, -3 }, /* (40) cmd ::= DROP DNODE NK_INTEGER */ + { 239, -3 }, /* (41) cmd ::= DROP DNODE dnode_endpoint */ + { 239, -4 }, /* (42) cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ + { 239, -5 }, /* (43) cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */ + { 239, -4 }, /* (44) cmd ::= ALTER ALL DNODES NK_STRING */ + { 239, -5 }, /* (45) cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */ + { 250, -1 }, /* (46) dnode_endpoint ::= NK_STRING */ + { 251, -1 }, /* (47) dnode_host_name ::= NK_ID */ + { 251, -1 }, /* (48) dnode_host_name ::= NK_IPTOKEN */ + { 239, -3 }, /* (49) cmd ::= ALTER LOCAL NK_STRING */ + { 239, -4 }, /* (50) cmd ::= ALTER LOCAL NK_STRING NK_STRING */ + { 239, -5 }, /* (51) cmd ::= CREATE QNODE ON DNODE NK_INTEGER */ + { 239, -5 }, /* (52) cmd ::= DROP QNODE ON DNODE NK_INTEGER */ + { 239, -5 }, /* (53) cmd ::= CREATE BNODE ON DNODE NK_INTEGER */ + { 239, -5 }, /* (54) cmd ::= DROP BNODE ON DNODE NK_INTEGER */ + { 239, -5 }, /* (55) cmd ::= CREATE SNODE ON DNODE NK_INTEGER */ + { 239, -5 }, /* (56) cmd ::= DROP SNODE ON DNODE NK_INTEGER */ + { 239, -5 }, /* (57) cmd ::= CREATE MNODE ON DNODE NK_INTEGER */ + { 239, -5 }, /* (58) cmd ::= DROP MNODE ON DNODE NK_INTEGER */ + { 239, -5 }, /* (59) cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ + { 239, -4 }, /* (60) cmd ::= DROP DATABASE exists_opt db_name */ + { 239, -2 }, /* (61) cmd ::= USE db_name */ + { 239, -4 }, /* (62) cmd ::= ALTER DATABASE db_name alter_db_options */ + { 252, -3 }, /* (63) not_exists_opt ::= IF NOT EXISTS */ + { 252, 0 }, /* (64) not_exists_opt ::= */ + { 254, -2 }, /* (65) exists_opt ::= IF EXISTS */ + { 254, 0 }, /* (66) exists_opt ::= */ + { 253, 0 }, /* (67) db_options ::= */ + { 253, -3 }, /* (68) db_options ::= db_options BUFFER NK_INTEGER */ + { 253, -3 }, /* (69) db_options ::= db_options CACHELAST NK_INTEGER */ + { 253, -3 }, /* (70) db_options ::= db_options COMP NK_INTEGER */ + { 253, -3 }, /* (71) db_options ::= db_options DAYS NK_INTEGER */ + { 253, -3 }, /* (72) db_options ::= db_options DAYS NK_VARIABLE */ + { 253, -3 }, /* (73) db_options ::= db_options FSYNC NK_INTEGER */ + { 253, -3 }, /* (74) db_options ::= db_options MAXROWS NK_INTEGER */ + { 253, -3 }, /* (75) db_options ::= db_options MINROWS NK_INTEGER */ + { 253, -3 }, /* (76) db_options ::= db_options KEEP integer_list */ + { 253, -3 }, /* (77) db_options ::= db_options KEEP variable_list */ + { 253, -3 }, /* (78) db_options ::= db_options PAGES NK_INTEGER */ + { 253, -3 }, /* (79) db_options ::= db_options PAGESIZE NK_INTEGER */ + { 253, -3 }, /* (80) db_options ::= db_options PRECISION NK_STRING */ + { 253, -3 }, /* (81) db_options ::= db_options REPLICA NK_INTEGER */ + { 253, -3 }, /* (82) db_options ::= db_options STRICT NK_INTEGER */ + { 253, -3 }, /* (83) db_options ::= db_options WAL NK_INTEGER */ + { 253, -3 }, /* (84) db_options ::= db_options VGROUPS NK_INTEGER */ + { 253, -3 }, /* (85) db_options ::= db_options SINGLE_STABLE NK_INTEGER */ + { 253, -3 }, /* (86) db_options ::= db_options RETENTIONS retention_list */ + { 253, -3 }, /* (87) db_options ::= db_options SCHEMALESS NK_INTEGER */ + { 255, -1 }, /* (88) alter_db_options ::= alter_db_option */ + { 255, -2 }, /* (89) alter_db_options ::= alter_db_options alter_db_option */ + { 259, -2 }, /* (90) alter_db_option ::= BUFFER NK_INTEGER */ + { 259, -2 }, /* (91) alter_db_option ::= CACHELAST NK_INTEGER */ + { 259, -2 }, /* (92) alter_db_option ::= FSYNC NK_INTEGER */ + { 259, -2 }, /* (93) alter_db_option ::= KEEP integer_list */ + { 259, -2 }, /* (94) alter_db_option ::= KEEP variable_list */ + { 259, -2 }, /* (95) alter_db_option ::= PAGES NK_INTEGER */ + { 259, -2 }, /* (96) alter_db_option ::= REPLICA NK_INTEGER */ + { 259, -2 }, /* (97) alter_db_option ::= STRICT NK_INTEGER */ + { 259, -2 }, /* (98) alter_db_option ::= WAL NK_INTEGER */ + { 256, -1 }, /* (99) integer_list ::= NK_INTEGER */ + { 256, -3 }, /* (100) integer_list ::= integer_list NK_COMMA NK_INTEGER */ + { 257, -1 }, /* (101) variable_list ::= NK_VARIABLE */ + { 257, -3 }, /* (102) variable_list ::= variable_list NK_COMMA NK_VARIABLE */ + { 258, -1 }, /* (103) retention_list ::= retention */ + { 258, -3 }, /* (104) retention_list ::= retention_list NK_COMMA retention */ + { 260, -3 }, /* (105) retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ + { 239, -9 }, /* (106) cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ + { 239, -3 }, /* (107) cmd ::= CREATE TABLE multi_create_clause */ + { 239, -9 }, /* (108) cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ + { 239, -3 }, /* (109) cmd ::= DROP TABLE multi_drop_clause */ + { 239, -4 }, /* (110) cmd ::= DROP STABLE exists_opt full_table_name */ + { 239, -3 }, /* (111) cmd ::= ALTER TABLE alter_table_clause */ + { 239, -3 }, /* (112) cmd ::= ALTER STABLE alter_table_clause */ + { 268, -2 }, /* (113) alter_table_clause ::= full_table_name alter_table_options */ + { 268, -5 }, /* (114) alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ + { 268, -4 }, /* (115) alter_table_clause ::= full_table_name DROP COLUMN column_name */ + { 268, -5 }, /* (116) alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ + { 268, -5 }, /* (117) alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ + { 268, -5 }, /* (118) alter_table_clause ::= full_table_name ADD TAG column_name type_name */ + { 268, -4 }, /* (119) alter_table_clause ::= full_table_name DROP TAG column_name */ + { 268, -5 }, /* (120) alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ + { 268, -5 }, /* (121) alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ + { 268, -6 }, /* (122) alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */ + { 265, -1 }, /* (123) multi_create_clause ::= create_subtable_clause */ + { 265, -2 }, /* (124) multi_create_clause ::= multi_create_clause create_subtable_clause */ + { 273, -10 }, /* (125) create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_tags_opt TAGS NK_LP literal_list NK_RP table_options */ + { 267, -1 }, /* (126) multi_drop_clause ::= drop_table_clause */ + { 267, -2 }, /* (127) multi_drop_clause ::= multi_drop_clause drop_table_clause */ + { 276, -2 }, /* (128) drop_table_clause ::= exists_opt full_table_name */ + { 274, 0 }, /* (129) specific_tags_opt ::= */ + { 274, -3 }, /* (130) specific_tags_opt ::= NK_LP col_name_list NK_RP */ + { 261, -1 }, /* (131) full_table_name ::= table_name */ + { 261, -3 }, /* (132) full_table_name ::= db_name NK_DOT table_name */ + { 262, -1 }, /* (133) column_def_list ::= column_def */ + { 262, -3 }, /* (134) column_def_list ::= column_def_list NK_COMMA column_def */ + { 279, -2 }, /* (135) column_def ::= column_name type_name */ + { 279, -4 }, /* (136) column_def ::= column_name type_name COMMENT NK_STRING */ + { 271, -1 }, /* (137) type_name ::= BOOL */ + { 271, -1 }, /* (138) type_name ::= TINYINT */ + { 271, -1 }, /* (139) type_name ::= SMALLINT */ + { 271, -1 }, /* (140) type_name ::= INT */ + { 271, -1 }, /* (141) type_name ::= INTEGER */ + { 271, -1 }, /* (142) type_name ::= BIGINT */ + { 271, -1 }, /* (143) type_name ::= FLOAT */ + { 271, -1 }, /* (144) type_name ::= DOUBLE */ + { 271, -4 }, /* (145) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ + { 271, -1 }, /* (146) type_name ::= TIMESTAMP */ + { 271, -4 }, /* (147) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ + { 271, -2 }, /* (148) type_name ::= TINYINT UNSIGNED */ + { 271, -2 }, /* (149) type_name ::= SMALLINT UNSIGNED */ + { 271, -2 }, /* (150) type_name ::= INT UNSIGNED */ + { 271, -2 }, /* (151) type_name ::= BIGINT UNSIGNED */ + { 271, -1 }, /* (152) type_name ::= JSON */ + { 271, -4 }, /* (153) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ + { 271, -1 }, /* (154) type_name ::= MEDIUMBLOB */ + { 271, -1 }, /* (155) type_name ::= BLOB */ + { 271, -4 }, /* (156) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ + { 271, -1 }, /* (157) type_name ::= DECIMAL */ + { 271, -4 }, /* (158) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ + { 271, -6 }, /* (159) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ + { 263, 0 }, /* (160) tags_def_opt ::= */ + { 263, -1 }, /* (161) tags_def_opt ::= tags_def */ + { 266, -4 }, /* (162) tags_def ::= TAGS NK_LP column_def_list NK_RP */ + { 264, 0 }, /* (163) table_options ::= */ + { 264, -3 }, /* (164) table_options ::= table_options COMMENT NK_STRING */ + { 264, -3 }, /* (165) table_options ::= table_options FILE_FACTOR NK_FLOAT */ + { 264, -5 }, /* (166) table_options ::= table_options ROLLUP NK_LP func_name_list NK_RP */ + { 264, -3 }, /* (167) table_options ::= table_options TTL NK_INTEGER */ + { 264, -5 }, /* (168) table_options ::= table_options SMA NK_LP col_name_list NK_RP */ + { 269, -1 }, /* (169) alter_table_options ::= alter_table_option */ + { 269, -2 }, /* (170) alter_table_options ::= alter_table_options alter_table_option */ + { 281, -2 }, /* (171) alter_table_option ::= COMMENT NK_STRING */ + { 281, -2 }, /* (172) alter_table_option ::= TTL NK_INTEGER */ + { 277, -1 }, /* (173) col_name_list ::= col_name */ + { 277, -3 }, /* (174) col_name_list ::= col_name_list NK_COMMA col_name */ + { 282, -1 }, /* (175) col_name ::= column_name */ + { 239, -2 }, /* (176) cmd ::= SHOW DNODES */ + { 239, -2 }, /* (177) cmd ::= SHOW USERS */ + { 239, -2 }, /* (178) cmd ::= SHOW DATABASES */ + { 239, -4 }, /* (179) cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */ + { 239, -4 }, /* (180) cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ + { 239, -3 }, /* (181) cmd ::= SHOW db_name_cond_opt VGROUPS */ + { 239, -2 }, /* (182) cmd ::= SHOW MNODES */ + { 239, -2 }, /* (183) cmd ::= SHOW MODULES */ + { 239, -2 }, /* (184) cmd ::= SHOW QNODES */ + { 239, -2 }, /* (185) cmd ::= SHOW FUNCTIONS */ + { 239, -5 }, /* (186) cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ + { 239, -2 }, /* (187) cmd ::= SHOW STREAMS */ + { 239, -2 }, /* (188) cmd ::= SHOW ACCOUNTS */ + { 239, -2 }, /* (189) cmd ::= SHOW APPS */ + { 239, -2 }, /* (190) cmd ::= SHOW CONNECTIONS */ + { 239, -2 }, /* (191) cmd ::= SHOW LICENCE */ + { 239, -2 }, /* (192) cmd ::= SHOW GRANTS */ + { 239, -4 }, /* (193) cmd ::= SHOW CREATE DATABASE db_name */ + { 239, -4 }, /* (194) cmd ::= SHOW CREATE TABLE full_table_name */ + { 239, -4 }, /* (195) cmd ::= SHOW CREATE STABLE full_table_name */ + { 239, -2 }, /* (196) cmd ::= SHOW QUERIES */ + { 239, -2 }, /* (197) cmd ::= SHOW SCORES */ + { 239, -2 }, /* (198) cmd ::= SHOW TOPICS */ + { 239, -2 }, /* (199) cmd ::= SHOW VARIABLES */ + { 239, -2 }, /* (200) cmd ::= SHOW BNODES */ + { 239, -2 }, /* (201) cmd ::= SHOW SNODES */ + { 239, -2 }, /* (202) cmd ::= SHOW CLUSTER */ + { 239, -2 }, /* (203) cmd ::= SHOW TRANSACTIONS */ + { 283, 0 }, /* (204) db_name_cond_opt ::= */ + { 283, -2 }, /* (205) db_name_cond_opt ::= db_name NK_DOT */ + { 284, 0 }, /* (206) like_pattern_opt ::= */ + { 284, -2 }, /* (207) like_pattern_opt ::= LIKE NK_STRING */ + { 285, -1 }, /* (208) table_name_cond ::= table_name */ + { 286, 0 }, /* (209) from_db_opt ::= */ + { 286, -2 }, /* (210) from_db_opt ::= FROM db_name */ + { 280, -1 }, /* (211) func_name_list ::= func_name */ + { 280, -3 }, /* (212) func_name_list ::= func_name_list NK_COMMA func_name */ + { 287, -1 }, /* (213) func_name ::= function_name */ + { 239, -8 }, /* (214) cmd ::= CREATE SMA INDEX not_exists_opt index_name ON table_name index_options */ + { 239, -10 }, /* (215) cmd ::= CREATE FULLTEXT INDEX not_exists_opt index_name ON table_name NK_LP col_name_list NK_RP */ + { 239, -6 }, /* (216) cmd ::= DROP INDEX exists_opt index_name ON table_name */ + { 290, 0 }, /* (217) index_options ::= */ + { 290, -9 }, /* (218) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt */ + { 290, -11 }, /* (219) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt */ + { 291, -1 }, /* (220) func_list ::= func */ + { 291, -3 }, /* (221) func_list ::= func_list NK_COMMA func */ + { 294, -4 }, /* (222) func ::= function_name NK_LP expression_list NK_RP */ + { 239, -7 }, /* (223) cmd ::= CREATE TOPIC not_exists_opt topic_name topic_options AS query_expression */ + { 239, -7 }, /* (224) cmd ::= CREATE TOPIC not_exists_opt topic_name topic_options AS db_name */ + { 239, -4 }, /* (225) cmd ::= DROP TOPIC exists_opt topic_name */ + { 239, -7 }, /* (226) cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ + { 297, 0 }, /* (227) topic_options ::= */ + { 297, -3 }, /* (228) topic_options ::= topic_options WITH TABLE */ + { 297, -3 }, /* (229) topic_options ::= topic_options WITH SCHEMA */ + { 297, -3 }, /* (230) topic_options ::= topic_options WITH TAG */ + { 239, -2 }, /* (231) cmd ::= DESC full_table_name */ + { 239, -2 }, /* (232) cmd ::= DESCRIBE full_table_name */ + { 239, -3 }, /* (233) cmd ::= RESET QUERY CACHE */ + { 239, -4 }, /* (234) cmd ::= EXPLAIN analyze_opt explain_options query_expression */ + { 300, 0 }, /* (235) analyze_opt ::= */ + { 300, -1 }, /* (236) analyze_opt ::= ANALYZE */ + { 301, 0 }, /* (237) explain_options ::= */ + { 301, -3 }, /* (238) explain_options ::= explain_options VERBOSE NK_BOOL */ + { 301, -3 }, /* (239) explain_options ::= explain_options RATIO NK_FLOAT */ + { 239, -6 }, /* (240) cmd ::= COMPACT VNODES IN NK_LP integer_list NK_RP */ + { 239, -10 }, /* (241) cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt */ + { 239, -4 }, /* (242) cmd ::= DROP FUNCTION exists_opt function_name */ + { 302, 0 }, /* (243) agg_func_opt ::= */ + { 302, -1 }, /* (244) agg_func_opt ::= AGGREGATE */ + { 303, 0 }, /* (245) bufsize_opt ::= */ + { 303, -2 }, /* (246) bufsize_opt ::= BUFSIZE NK_INTEGER */ + { 239, -8 }, /* (247) cmd ::= CREATE STREAM not_exists_opt stream_name stream_options into_opt AS query_expression */ + { 239, -4 }, /* (248) cmd ::= DROP STREAM exists_opt stream_name */ + { 306, 0 }, /* (249) into_opt ::= */ + { 306, -2 }, /* (250) into_opt ::= INTO full_table_name */ + { 305, 0 }, /* (251) stream_options ::= */ + { 305, -3 }, /* (252) stream_options ::= stream_options TRIGGER AT_ONCE */ + { 305, -3 }, /* (253) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ + { 305, -3 }, /* (254) stream_options ::= stream_options WATERMARK duration_literal */ + { 239, -3 }, /* (255) cmd ::= KILL CONNECTION NK_INTEGER */ + { 239, -3 }, /* (256) cmd ::= KILL QUERY NK_INTEGER */ + { 239, -3 }, /* (257) cmd ::= KILL TRANSACTION NK_INTEGER */ + { 239, -4 }, /* (258) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ + { 239, -4 }, /* (259) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ + { 239, -3 }, /* (260) cmd ::= SPLIT VGROUP NK_INTEGER */ + { 307, -2 }, /* (261) dnode_list ::= DNODE NK_INTEGER */ + { 307, -3 }, /* (262) dnode_list ::= dnode_list DNODE NK_INTEGER */ + { 239, -3 }, /* (263) cmd ::= SYNCDB db_name REPLICA */ + { 239, -1 }, /* (264) cmd ::= query_expression */ + { 242, -1 }, /* (265) literal ::= NK_INTEGER */ + { 242, -1 }, /* (266) literal ::= NK_FLOAT */ + { 242, -1 }, /* (267) literal ::= NK_STRING */ + { 242, -1 }, /* (268) literal ::= NK_BOOL */ + { 242, -2 }, /* (269) literal ::= TIMESTAMP NK_STRING */ + { 242, -1 }, /* (270) literal ::= duration_literal */ + { 242, -1 }, /* (271) literal ::= NULL */ + { 242, -1 }, /* (272) literal ::= NK_QUESTION */ + { 292, -1 }, /* (273) duration_literal ::= NK_VARIABLE */ + { 308, -1 }, /* (274) signed ::= NK_INTEGER */ + { 308, -2 }, /* (275) signed ::= NK_PLUS NK_INTEGER */ + { 308, -2 }, /* (276) signed ::= NK_MINUS NK_INTEGER */ + { 308, -1 }, /* (277) signed ::= NK_FLOAT */ + { 308, -2 }, /* (278) signed ::= NK_PLUS NK_FLOAT */ + { 308, -2 }, /* (279) signed ::= NK_MINUS NK_FLOAT */ + { 272, -1 }, /* (280) signed_literal ::= signed */ + { 272, -1 }, /* (281) signed_literal ::= NK_STRING */ + { 272, -1 }, /* (282) signed_literal ::= NK_BOOL */ + { 272, -2 }, /* (283) signed_literal ::= TIMESTAMP NK_STRING */ + { 272, -1 }, /* (284) signed_literal ::= duration_literal */ + { 272, -1 }, /* (285) signed_literal ::= NULL */ + { 272, -1 }, /* (286) signed_literal ::= literal_func */ + { 275, -1 }, /* (287) literal_list ::= signed_literal */ + { 275, -3 }, /* (288) literal_list ::= literal_list NK_COMMA signed_literal */ + { 249, -1 }, /* (289) db_name ::= NK_ID */ + { 278, -1 }, /* (290) table_name ::= NK_ID */ + { 270, -1 }, /* (291) column_name ::= NK_ID */ + { 288, -1 }, /* (292) function_name ::= NK_ID */ + { 310, -1 }, /* (293) table_alias ::= NK_ID */ + { 311, -1 }, /* (294) column_alias ::= NK_ID */ + { 244, -1 }, /* (295) user_name ::= NK_ID */ + { 289, -1 }, /* (296) index_name ::= NK_ID */ + { 296, -1 }, /* (297) topic_name ::= NK_ID */ + { 304, -1 }, /* (298) stream_name ::= NK_ID */ + { 299, -1 }, /* (299) cgroup_name ::= NK_ID */ + { 312, -1 }, /* (300) expression ::= literal */ + { 312, -1 }, /* (301) expression ::= pseudo_column */ + { 312, -1 }, /* (302) expression ::= column_reference */ + { 312, -1 }, /* (303) expression ::= function_expression */ + { 312, -1 }, /* (304) expression ::= subquery */ + { 312, -3 }, /* (305) expression ::= NK_LP expression NK_RP */ + { 312, -2 }, /* (306) expression ::= NK_PLUS expression */ + { 312, -2 }, /* (307) expression ::= NK_MINUS expression */ + { 312, -3 }, /* (308) expression ::= expression NK_PLUS expression */ + { 312, -3 }, /* (309) expression ::= expression NK_MINUS expression */ + { 312, -3 }, /* (310) expression ::= expression NK_STAR expression */ + { 312, -3 }, /* (311) expression ::= expression NK_SLASH expression */ + { 312, -3 }, /* (312) expression ::= expression NK_REM expression */ + { 312, -3 }, /* (313) expression ::= column_reference NK_ARROW NK_STRING */ + { 295, -1 }, /* (314) expression_list ::= expression */ + { 295, -3 }, /* (315) expression_list ::= expression_list NK_COMMA expression */ + { 314, -1 }, /* (316) column_reference ::= column_name */ + { 314, -3 }, /* (317) column_reference ::= table_name NK_DOT column_name */ + { 313, -1 }, /* (318) pseudo_column ::= ROWTS */ + { 313, -1 }, /* (319) pseudo_column ::= TBNAME */ + { 313, -3 }, /* (320) pseudo_column ::= table_name NK_DOT TBNAME */ + { 313, -1 }, /* (321) pseudo_column ::= QSTARTTS */ + { 313, -1 }, /* (322) pseudo_column ::= QENDTS */ + { 313, -1 }, /* (323) pseudo_column ::= WSTARTTS */ + { 313, -1 }, /* (324) pseudo_column ::= WENDTS */ + { 313, -1 }, /* (325) pseudo_column ::= WDURATION */ + { 315, -4 }, /* (326) function_expression ::= function_name NK_LP expression_list NK_RP */ + { 315, -4 }, /* (327) function_expression ::= star_func NK_LP star_func_para_list NK_RP */ + { 315, -6 }, /* (328) function_expression ::= CAST NK_LP expression AS type_name NK_RP */ + { 315, -1 }, /* (329) function_expression ::= literal_func */ + { 309, -3 }, /* (330) literal_func ::= noarg_func NK_LP NK_RP */ + { 309, -1 }, /* (331) literal_func ::= NOW */ + { 319, -1 }, /* (332) noarg_func ::= NOW */ + { 319, -1 }, /* (333) noarg_func ::= TODAY */ + { 319, -1 }, /* (334) noarg_func ::= TIMEZONE */ + { 317, -1 }, /* (335) star_func ::= COUNT */ + { 317, -1 }, /* (336) star_func ::= FIRST */ + { 317, -1 }, /* (337) star_func ::= LAST */ + { 317, -1 }, /* (338) star_func ::= LAST_ROW */ + { 318, -1 }, /* (339) star_func_para_list ::= NK_STAR */ + { 318, -1 }, /* (340) star_func_para_list ::= other_para_list */ + { 320, -1 }, /* (341) other_para_list ::= star_func_para */ + { 320, -3 }, /* (342) other_para_list ::= other_para_list NK_COMMA star_func_para */ + { 321, -1 }, /* (343) star_func_para ::= expression */ + { 321, -3 }, /* (344) star_func_para ::= table_name NK_DOT NK_STAR */ + { 322, -3 }, /* (345) predicate ::= expression compare_op expression */ + { 322, -5 }, /* (346) predicate ::= expression BETWEEN expression AND expression */ + { 322, -6 }, /* (347) predicate ::= expression NOT BETWEEN expression AND expression */ + { 322, -3 }, /* (348) predicate ::= expression IS NULL */ + { 322, -4 }, /* (349) predicate ::= expression IS NOT NULL */ + { 322, -3 }, /* (350) predicate ::= expression in_op in_predicate_value */ + { 323, -1 }, /* (351) compare_op ::= NK_LT */ + { 323, -1 }, /* (352) compare_op ::= NK_GT */ + { 323, -1 }, /* (353) compare_op ::= NK_LE */ + { 323, -1 }, /* (354) compare_op ::= NK_GE */ + { 323, -1 }, /* (355) compare_op ::= NK_NE */ + { 323, -1 }, /* (356) compare_op ::= NK_EQ */ + { 323, -1 }, /* (357) compare_op ::= LIKE */ + { 323, -2 }, /* (358) compare_op ::= NOT LIKE */ + { 323, -1 }, /* (359) compare_op ::= MATCH */ + { 323, -1 }, /* (360) compare_op ::= NMATCH */ + { 323, -1 }, /* (361) compare_op ::= CONTAINS */ + { 324, -1 }, /* (362) in_op ::= IN */ + { 324, -2 }, /* (363) in_op ::= NOT IN */ + { 325, -3 }, /* (364) in_predicate_value ::= NK_LP expression_list NK_RP */ + { 326, -1 }, /* (365) boolean_value_expression ::= boolean_primary */ + { 326, -2 }, /* (366) boolean_value_expression ::= NOT boolean_primary */ + { 326, -3 }, /* (367) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ + { 326, -3 }, /* (368) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ + { 327, -1 }, /* (369) boolean_primary ::= predicate */ + { 327, -3 }, /* (370) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ + { 328, -1 }, /* (371) common_expression ::= expression */ + { 328, -1 }, /* (372) common_expression ::= boolean_value_expression */ + { 329, -2 }, /* (373) from_clause ::= FROM table_reference_list */ + { 330, -1 }, /* (374) table_reference_list ::= table_reference */ + { 330, -3 }, /* (375) table_reference_list ::= table_reference_list NK_COMMA table_reference */ + { 331, -1 }, /* (376) table_reference ::= table_primary */ + { 331, -1 }, /* (377) table_reference ::= joined_table */ + { 332, -2 }, /* (378) table_primary ::= table_name alias_opt */ + { 332, -4 }, /* (379) table_primary ::= db_name NK_DOT table_name alias_opt */ + { 332, -2 }, /* (380) table_primary ::= subquery alias_opt */ + { 332, -1 }, /* (381) table_primary ::= parenthesized_joined_table */ + { 334, 0 }, /* (382) alias_opt ::= */ + { 334, -1 }, /* (383) alias_opt ::= table_alias */ + { 334, -2 }, /* (384) alias_opt ::= AS table_alias */ + { 335, -3 }, /* (385) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ + { 335, -3 }, /* (386) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ + { 333, -6 }, /* (387) joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ + { 336, 0 }, /* (388) join_type ::= */ + { 336, -1 }, /* (389) join_type ::= INNER */ + { 338, -9 }, /* (390) query_specification ::= SELECT set_quantifier_opt select_list from_clause where_clause_opt partition_by_clause_opt twindow_clause_opt group_by_clause_opt having_clause_opt */ + { 339, 0 }, /* (391) set_quantifier_opt ::= */ + { 339, -1 }, /* (392) set_quantifier_opt ::= DISTINCT */ + { 339, -1 }, /* (393) set_quantifier_opt ::= ALL */ + { 340, -1 }, /* (394) select_list ::= NK_STAR */ + { 340, -1 }, /* (395) select_list ::= select_sublist */ + { 346, -1 }, /* (396) select_sublist ::= select_item */ + { 346, -3 }, /* (397) select_sublist ::= select_sublist NK_COMMA select_item */ + { 347, -1 }, /* (398) select_item ::= common_expression */ + { 347, -2 }, /* (399) select_item ::= common_expression column_alias */ + { 347, -3 }, /* (400) select_item ::= common_expression AS column_alias */ + { 347, -3 }, /* (401) select_item ::= table_name NK_DOT NK_STAR */ + { 341, 0 }, /* (402) where_clause_opt ::= */ + { 341, -2 }, /* (403) where_clause_opt ::= WHERE search_condition */ + { 342, 0 }, /* (404) partition_by_clause_opt ::= */ + { 342, -3 }, /* (405) partition_by_clause_opt ::= PARTITION BY expression_list */ + { 343, 0 }, /* (406) twindow_clause_opt ::= */ + { 343, -6 }, /* (407) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ + { 343, -4 }, /* (408) twindow_clause_opt ::= STATE_WINDOW NK_LP expression NK_RP */ + { 343, -6 }, /* (409) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ + { 343, -8 }, /* (410) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ + { 293, 0 }, /* (411) sliding_opt ::= */ + { 293, -4 }, /* (412) sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ + { 348, 0 }, /* (413) fill_opt ::= */ + { 348, -4 }, /* (414) fill_opt ::= FILL NK_LP fill_mode NK_RP */ + { 348, -6 }, /* (415) fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */ + { 349, -1 }, /* (416) fill_mode ::= NONE */ + { 349, -1 }, /* (417) fill_mode ::= PREV */ + { 349, -1 }, /* (418) fill_mode ::= NULL */ + { 349, -1 }, /* (419) fill_mode ::= LINEAR */ + { 349, -1 }, /* (420) fill_mode ::= NEXT */ + { 344, 0 }, /* (421) group_by_clause_opt ::= */ + { 344, -3 }, /* (422) group_by_clause_opt ::= GROUP BY group_by_list */ + { 350, -1 }, /* (423) group_by_list ::= expression */ + { 350, -3 }, /* (424) group_by_list ::= group_by_list NK_COMMA expression */ + { 345, 0 }, /* (425) having_clause_opt ::= */ + { 345, -2 }, /* (426) having_clause_opt ::= HAVING search_condition */ + { 298, -4 }, /* (427) query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt */ + { 351, -1 }, /* (428) query_expression_body ::= query_primary */ + { 351, -4 }, /* (429) query_expression_body ::= query_expression_body UNION ALL query_expression_body */ + { 351, -3 }, /* (430) query_expression_body ::= query_expression_body UNION query_expression_body */ + { 355, -1 }, /* (431) query_primary ::= query_specification */ + { 355, -6 }, /* (432) query_primary ::= NK_LP query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt NK_RP */ + { 352, 0 }, /* (433) order_by_clause_opt ::= */ + { 352, -3 }, /* (434) order_by_clause_opt ::= ORDER BY sort_specification_list */ + { 353, 0 }, /* (435) slimit_clause_opt ::= */ + { 353, -2 }, /* (436) slimit_clause_opt ::= SLIMIT NK_INTEGER */ + { 353, -4 }, /* (437) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ + { 353, -4 }, /* (438) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + { 354, 0 }, /* (439) limit_clause_opt ::= */ + { 354, -2 }, /* (440) limit_clause_opt ::= LIMIT NK_INTEGER */ + { 354, -4 }, /* (441) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ + { 354, -4 }, /* (442) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + { 316, -3 }, /* (443) subquery ::= NK_LP query_expression NK_RP */ + { 337, -1 }, /* (444) search_condition ::= common_expression */ + { 356, -1 }, /* (445) sort_specification_list ::= sort_specification */ + { 356, -3 }, /* (446) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ + { 357, -3 }, /* (447) sort_specification ::= expression ordering_specification_opt null_ordering_opt */ + { 358, 0 }, /* (448) ordering_specification_opt ::= */ + { 358, -1 }, /* (449) ordering_specification_opt ::= ASC */ + { 358, -1 }, /* (450) ordering_specification_opt ::= DESC */ + { 359, 0 }, /* (451) null_ordering_opt ::= */ + { 359, -2 }, /* (452) null_ordering_opt ::= NULLS FIRST */ + { 359, -2 }, /* (453) null_ordering_opt ::= NULLS LAST */ }; static void yy_accept(yyParser*); /* Forward Declaration */ @@ -3116,11 +3128,11 @@ static YYACTIONTYPE yy_reduce( YYMINORTYPE yylhsminor; case 0: /* cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */ { pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); } - yy_destructor(yypParser,241,&yymsp[0].minor); + yy_destructor(yypParser,240,&yymsp[0].minor); break; case 1: /* cmd ::= ALTER ACCOUNT NK_ID alter_account_options */ { pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); } - yy_destructor(yypParser,242,&yymsp[0].minor); + yy_destructor(yypParser,241,&yymsp[0].minor); break; case 2: /* account_options ::= */ { } @@ -3134,20 +3146,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,241,&yymsp[-2].minor); +{ yy_destructor(yypParser,240,&yymsp[-2].minor); { } - yy_destructor(yypParser,243,&yymsp[0].minor); + yy_destructor(yypParser,242,&yymsp[0].minor); } break; case 12: /* alter_account_options ::= alter_account_option */ -{ yy_destructor(yypParser,244,&yymsp[0].minor); +{ yy_destructor(yypParser,243,&yymsp[0].minor); { } } break; case 13: /* alter_account_options ::= alter_account_options alter_account_option */ -{ yy_destructor(yypParser,242,&yymsp[-1].minor); +{ yy_destructor(yypParser,241,&yymsp[-1].minor); { } - yy_destructor(yypParser,244,&yymsp[0].minor); + yy_destructor(yypParser,243,&yymsp[0].minor); } break; case 14: /* alter_account_option ::= PASS literal */ @@ -3161,63 +3173,63 @@ static YYACTIONTYPE yy_reduce( case 22: /* alter_account_option ::= CONNS literal */ yytestcase(yyruleno==22); case 23: /* alter_account_option ::= STATE literal */ yytestcase(yyruleno==23); { } - yy_destructor(yypParser,243,&yymsp[0].minor); + yy_destructor(yypParser,242,&yymsp[0].minor); break; case 24: /* cmd ::= CREATE USER user_name PASS NK_STRING */ -{ pCxt->pRootNode = createCreateUserStmt(pCxt, &yymsp[-2].minor.yy53, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createCreateUserStmt(pCxt, &yymsp[-2].minor.yy209, &yymsp[0].minor.yy0); } break; case 25: /* cmd ::= ALTER USER user_name PASS NK_STRING */ -{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy53, TSDB_ALTER_USER_PASSWD, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy209, TSDB_ALTER_USER_PASSWD, &yymsp[0].minor.yy0); } break; case 26: /* cmd ::= ALTER USER user_name PRIVILEGE NK_STRING */ -{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy53, TSDB_ALTER_USER_PRIVILEGES, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy209, TSDB_ALTER_USER_PRIVILEGES, &yymsp[0].minor.yy0); } break; case 27: /* cmd ::= DROP USER user_name */ -{ pCxt->pRootNode = createDropUserStmt(pCxt, &yymsp[0].minor.yy53); } +{ pCxt->pRootNode = createDropUserStmt(pCxt, &yymsp[0].minor.yy209); } break; case 28: /* cmd ::= GRANT privileges ON priv_level TO user_name */ -{ pCxt->pRootNode = createGrantStmt(pCxt, yymsp[-4].minor.yy435, &yymsp[-2].minor.yy53, &yymsp[0].minor.yy53); } +{ pCxt->pRootNode = createGrantStmt(pCxt, yymsp[-4].minor.yy189, &yymsp[-2].minor.yy209, &yymsp[0].minor.yy209); } break; case 29: /* cmd ::= REVOKE privileges ON priv_level FROM user_name */ -{ pCxt->pRootNode = createRevokeStmt(pCxt, yymsp[-4].minor.yy435, &yymsp[-2].minor.yy53, &yymsp[0].minor.yy53); } +{ pCxt->pRootNode = createRevokeStmt(pCxt, yymsp[-4].minor.yy189, &yymsp[-2].minor.yy209, &yymsp[0].minor.yy209); } break; case 30: /* privileges ::= ALL */ -{ yymsp[0].minor.yy435 = PRIVILEGE_TYPE_ALL; } +{ yymsp[0].minor.yy189 = PRIVILEGE_TYPE_ALL; } break; case 31: /* privileges ::= priv_type_list */ case 32: /* priv_type_list ::= priv_type */ yytestcase(yyruleno==32); -{ yylhsminor.yy435 = yymsp[0].minor.yy435; } - yymsp[0].minor.yy435 = yylhsminor.yy435; +{ yylhsminor.yy189 = yymsp[0].minor.yy189; } + yymsp[0].minor.yy189 = yylhsminor.yy189; break; case 33: /* priv_type_list ::= priv_type_list NK_COMMA priv_type */ -{ yylhsminor.yy435 = yymsp[-2].minor.yy435 | yymsp[0].minor.yy435; } - yymsp[-2].minor.yy435 = yylhsminor.yy435; +{ yylhsminor.yy189 = yymsp[-2].minor.yy189 | yymsp[0].minor.yy189; } + yymsp[-2].minor.yy189 = yylhsminor.yy189; break; case 34: /* priv_type ::= READ */ -{ yymsp[0].minor.yy435 = PRIVILEGE_TYPE_READ; } +{ yymsp[0].minor.yy189 = PRIVILEGE_TYPE_READ; } break; case 35: /* priv_type ::= WRITE */ -{ yymsp[0].minor.yy435 = PRIVILEGE_TYPE_WRITE; } +{ yymsp[0].minor.yy189 = PRIVILEGE_TYPE_WRITE; } break; case 36: /* priv_level ::= NK_STAR NK_DOT NK_STAR */ -{ yylhsminor.yy53 = yymsp[-2].minor.yy0; } - yymsp[-2].minor.yy53 = yylhsminor.yy53; +{ yylhsminor.yy209 = yymsp[-2].minor.yy0; } + yymsp[-2].minor.yy209 = yylhsminor.yy209; break; case 37: /* priv_level ::= db_name NK_DOT NK_STAR */ -{ yylhsminor.yy53 = yymsp[-2].minor.yy53; } - yymsp[-2].minor.yy53 = yylhsminor.yy53; +{ yylhsminor.yy209 = yymsp[-2].minor.yy209; } + yymsp[-2].minor.yy209 = yylhsminor.yy209; break; case 38: /* cmd ::= CREATE DNODE dnode_endpoint */ -{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[0].minor.yy53, NULL); } +{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[0].minor.yy209, NULL); } break; case 39: /* cmd ::= CREATE DNODE dnode_host_name PORT NK_INTEGER */ -{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[-2].minor.yy53, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[-2].minor.yy209, &yymsp[0].minor.yy0); } break; case 40: /* cmd ::= DROP DNODE NK_INTEGER */ { pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[0].minor.yy0); } break; case 41: /* cmd ::= DROP DNODE dnode_endpoint */ -{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[0].minor.yy53); } +{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[0].minor.yy209); } break; case 42: /* cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ { pCxt->pRootNode = createAlterDnodeStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, NULL); } @@ -3234,26 +3246,26 @@ static YYACTIONTYPE yy_reduce( case 46: /* dnode_endpoint ::= NK_STRING */ case 47: /* dnode_host_name ::= NK_ID */ yytestcase(yyruleno==47); case 48: /* dnode_host_name ::= NK_IPTOKEN */ yytestcase(yyruleno==48); - case 290: /* db_name ::= NK_ID */ yytestcase(yyruleno==290); - case 291: /* table_name ::= NK_ID */ yytestcase(yyruleno==291); - case 292: /* column_name ::= NK_ID */ yytestcase(yyruleno==292); - case 293: /* function_name ::= NK_ID */ yytestcase(yyruleno==293); - case 294: /* table_alias ::= NK_ID */ yytestcase(yyruleno==294); - case 295: /* column_alias ::= NK_ID */ yytestcase(yyruleno==295); - case 296: /* user_name ::= NK_ID */ yytestcase(yyruleno==296); - case 297: /* index_name ::= NK_ID */ yytestcase(yyruleno==297); - case 298: /* topic_name ::= NK_ID */ yytestcase(yyruleno==298); - case 299: /* stream_name ::= NK_ID */ yytestcase(yyruleno==299); - case 300: /* cgroup_name ::= NK_ID */ yytestcase(yyruleno==300); - case 333: /* noarg_func ::= NOW */ yytestcase(yyruleno==333); - case 334: /* noarg_func ::= TODAY */ yytestcase(yyruleno==334); - case 335: /* noarg_func ::= TIMEZONE */ yytestcase(yyruleno==335); - case 336: /* star_func ::= COUNT */ yytestcase(yyruleno==336); - case 337: /* star_func ::= FIRST */ yytestcase(yyruleno==337); - case 338: /* star_func ::= LAST */ yytestcase(yyruleno==338); - case 339: /* star_func ::= LAST_ROW */ yytestcase(yyruleno==339); -{ yylhsminor.yy53 = yymsp[0].minor.yy0; } - yymsp[0].minor.yy53 = yylhsminor.yy53; + case 289: /* db_name ::= NK_ID */ yytestcase(yyruleno==289); + case 290: /* table_name ::= NK_ID */ yytestcase(yyruleno==290); + case 291: /* column_name ::= NK_ID */ yytestcase(yyruleno==291); + case 292: /* function_name ::= NK_ID */ yytestcase(yyruleno==292); + case 293: /* table_alias ::= NK_ID */ yytestcase(yyruleno==293); + case 294: /* column_alias ::= NK_ID */ yytestcase(yyruleno==294); + case 295: /* user_name ::= NK_ID */ yytestcase(yyruleno==295); + case 296: /* index_name ::= NK_ID */ yytestcase(yyruleno==296); + case 297: /* topic_name ::= NK_ID */ yytestcase(yyruleno==297); + case 298: /* stream_name ::= NK_ID */ yytestcase(yyruleno==298); + case 299: /* cgroup_name ::= NK_ID */ yytestcase(yyruleno==299); + case 332: /* noarg_func ::= NOW */ yytestcase(yyruleno==332); + case 333: /* noarg_func ::= TODAY */ yytestcase(yyruleno==333); + case 334: /* noarg_func ::= TIMEZONE */ yytestcase(yyruleno==334); + case 335: /* star_func ::= COUNT */ yytestcase(yyruleno==335); + case 336: /* star_func ::= FIRST */ yytestcase(yyruleno==336); + case 337: /* star_func ::= LAST */ yytestcase(yyruleno==337); + case 338: /* star_func ::= LAST_ROW */ yytestcase(yyruleno==338); +{ yylhsminor.yy209 = yymsp[0].minor.yy0; } + yymsp[0].minor.yy209 = yylhsminor.yy209; break; case 49: /* cmd ::= ALTER LOCAL NK_STRING */ { pCxt->pRootNode = createAlterLocalStmt(pCxt, &yymsp[0].minor.yy0, NULL); } @@ -3286,1161 +3298,1157 @@ static YYACTIONTYPE yy_reduce( { pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_MNODE_STMT, &yymsp[0].minor.yy0); } break; case 59: /* cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ -{ pCxt->pRootNode = createCreateDatabaseStmt(pCxt, yymsp[-2].minor.yy603, &yymsp[-1].minor.yy53, yymsp[0].minor.yy636); } +{ pCxt->pRootNode = createCreateDatabaseStmt(pCxt, yymsp[-2].minor.yy137, &yymsp[-1].minor.yy209, yymsp[0].minor.yy632); } break; case 60: /* cmd ::= DROP DATABASE exists_opt db_name */ -{ pCxt->pRootNode = createDropDatabaseStmt(pCxt, yymsp[-1].minor.yy603, &yymsp[0].minor.yy53); } +{ pCxt->pRootNode = createDropDatabaseStmt(pCxt, yymsp[-1].minor.yy137, &yymsp[0].minor.yy209); } break; case 61: /* cmd ::= USE db_name */ -{ pCxt->pRootNode = createUseDatabaseStmt(pCxt, &yymsp[0].minor.yy53); } +{ pCxt->pRootNode = createUseDatabaseStmt(pCxt, &yymsp[0].minor.yy209); } break; case 62: /* cmd ::= ALTER DATABASE db_name alter_db_options */ -{ pCxt->pRootNode = createAlterDatabaseStmt(pCxt, &yymsp[-1].minor.yy53, yymsp[0].minor.yy636); } +{ pCxt->pRootNode = createAlterDatabaseStmt(pCxt, &yymsp[-1].minor.yy209, yymsp[0].minor.yy632); } break; case 63: /* not_exists_opt ::= IF NOT EXISTS */ -{ yymsp[-2].minor.yy603 = true; } +{ yymsp[-2].minor.yy137 = true; } break; case 64: /* not_exists_opt ::= */ case 66: /* exists_opt ::= */ yytestcase(yyruleno==66); - case 236: /* analyze_opt ::= */ yytestcase(yyruleno==236); - case 244: /* agg_func_opt ::= */ yytestcase(yyruleno==244); - case 392: /* set_quantifier_opt ::= */ yytestcase(yyruleno==392); -{ yymsp[1].minor.yy603 = false; } + case 235: /* analyze_opt ::= */ yytestcase(yyruleno==235); + case 243: /* agg_func_opt ::= */ yytestcase(yyruleno==243); + case 391: /* set_quantifier_opt ::= */ yytestcase(yyruleno==391); +{ yymsp[1].minor.yy137 = false; } break; case 65: /* exists_opt ::= IF EXISTS */ -{ yymsp[-1].minor.yy603 = true; } +{ yymsp[-1].minor.yy137 = true; } break; case 67: /* db_options ::= */ -{ yymsp[1].minor.yy636 = createDefaultDatabaseOptions(pCxt); } +{ yymsp[1].minor.yy632 = createDefaultDatabaseOptions(pCxt); } break; case 68: /* db_options ::= db_options BUFFER NK_INTEGER */ -{ yylhsminor.yy636 = setDatabaseOption(pCxt, yymsp[-2].minor.yy636, DB_OPTION_BUFFER, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy632 = setDatabaseOption(pCxt, yymsp[-2].minor.yy632, DB_OPTION_BUFFER, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; case 69: /* db_options ::= db_options CACHELAST NK_INTEGER */ -{ yylhsminor.yy636 = setDatabaseOption(pCxt, yymsp[-2].minor.yy636, DB_OPTION_CACHELAST, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy632 = setDatabaseOption(pCxt, yymsp[-2].minor.yy632, DB_OPTION_CACHELAST, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; case 70: /* db_options ::= db_options COMP NK_INTEGER */ -{ yylhsminor.yy636 = setDatabaseOption(pCxt, yymsp[-2].minor.yy636, DB_OPTION_COMP, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy632 = setDatabaseOption(pCxt, yymsp[-2].minor.yy632, DB_OPTION_COMP, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; case 71: /* db_options ::= db_options DAYS NK_INTEGER */ case 72: /* db_options ::= db_options DAYS NK_VARIABLE */ yytestcase(yyruleno==72); -{ yylhsminor.yy636 = setDatabaseOption(pCxt, yymsp[-2].minor.yy636, DB_OPTION_DAYS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy632 = setDatabaseOption(pCxt, yymsp[-2].minor.yy632, DB_OPTION_DAYS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; case 73: /* db_options ::= db_options FSYNC NK_INTEGER */ -{ yylhsminor.yy636 = setDatabaseOption(pCxt, yymsp[-2].minor.yy636, DB_OPTION_FSYNC, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy632 = setDatabaseOption(pCxt, yymsp[-2].minor.yy632, DB_OPTION_FSYNC, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; case 74: /* db_options ::= db_options MAXROWS NK_INTEGER */ -{ yylhsminor.yy636 = setDatabaseOption(pCxt, yymsp[-2].minor.yy636, DB_OPTION_MAXROWS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy632 = setDatabaseOption(pCxt, yymsp[-2].minor.yy632, DB_OPTION_MAXROWS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; case 75: /* db_options ::= db_options MINROWS NK_INTEGER */ -{ yylhsminor.yy636 = setDatabaseOption(pCxt, yymsp[-2].minor.yy636, DB_OPTION_MINROWS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy632 = setDatabaseOption(pCxt, yymsp[-2].minor.yy632, DB_OPTION_MINROWS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; case 76: /* db_options ::= db_options KEEP integer_list */ case 77: /* db_options ::= db_options KEEP variable_list */ yytestcase(yyruleno==77); -{ yylhsminor.yy636 = setDatabaseOption(pCxt, yymsp[-2].minor.yy636, DB_OPTION_KEEP, yymsp[0].minor.yy236); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy632 = setDatabaseOption(pCxt, yymsp[-2].minor.yy632, DB_OPTION_KEEP, yymsp[0].minor.yy424); } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; case 78: /* db_options ::= db_options PAGES NK_INTEGER */ -{ yylhsminor.yy636 = setDatabaseOption(pCxt, yymsp[-2].minor.yy636, DB_OPTION_PAGES, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy632 = setDatabaseOption(pCxt, yymsp[-2].minor.yy632, DB_OPTION_PAGES, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; case 79: /* db_options ::= db_options PAGESIZE NK_INTEGER */ -{ yylhsminor.yy636 = setDatabaseOption(pCxt, yymsp[-2].minor.yy636, DB_OPTION_PAGESIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy632 = setDatabaseOption(pCxt, yymsp[-2].minor.yy632, DB_OPTION_PAGESIZE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; case 80: /* db_options ::= db_options PRECISION NK_STRING */ -{ yylhsminor.yy636 = setDatabaseOption(pCxt, yymsp[-2].minor.yy636, DB_OPTION_PRECISION, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy632 = setDatabaseOption(pCxt, yymsp[-2].minor.yy632, DB_OPTION_PRECISION, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; case 81: /* db_options ::= db_options REPLICA NK_INTEGER */ -{ yylhsminor.yy636 = setDatabaseOption(pCxt, yymsp[-2].minor.yy636, DB_OPTION_REPLICA, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy632 = setDatabaseOption(pCxt, yymsp[-2].minor.yy632, DB_OPTION_REPLICA, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; case 82: /* db_options ::= db_options STRICT NK_INTEGER */ -{ yylhsminor.yy636 = setDatabaseOption(pCxt, yymsp[-2].minor.yy636, DB_OPTION_STRICT, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy632 = setDatabaseOption(pCxt, yymsp[-2].minor.yy632, DB_OPTION_STRICT, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; case 83: /* db_options ::= db_options WAL NK_INTEGER */ -{ yylhsminor.yy636 = setDatabaseOption(pCxt, yymsp[-2].minor.yy636, DB_OPTION_WAL, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy632 = setDatabaseOption(pCxt, yymsp[-2].minor.yy632, DB_OPTION_WAL, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; case 84: /* db_options ::= db_options VGROUPS NK_INTEGER */ -{ yylhsminor.yy636 = setDatabaseOption(pCxt, yymsp[-2].minor.yy636, DB_OPTION_VGROUPS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy632 = setDatabaseOption(pCxt, yymsp[-2].minor.yy632, DB_OPTION_VGROUPS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; case 85: /* db_options ::= db_options SINGLE_STABLE NK_INTEGER */ -{ yylhsminor.yy636 = setDatabaseOption(pCxt, yymsp[-2].minor.yy636, DB_OPTION_SINGLE_STABLE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy632 = setDatabaseOption(pCxt, yymsp[-2].minor.yy632, DB_OPTION_SINGLE_STABLE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; case 86: /* db_options ::= db_options RETENTIONS retention_list */ -{ yylhsminor.yy636 = setDatabaseOption(pCxt, yymsp[-2].minor.yy636, DB_OPTION_RETENTIONS, yymsp[0].minor.yy236); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy632 = setDatabaseOption(pCxt, yymsp[-2].minor.yy632, DB_OPTION_RETENTIONS, yymsp[0].minor.yy424); } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; case 87: /* db_options ::= db_options SCHEMALESS NK_INTEGER */ -{ yylhsminor.yy636 = setDatabaseOption(pCxt, yymsp[-2].minor.yy636, DB_OPTION_SCHEMALESS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy632 = setDatabaseOption(pCxt, yymsp[-2].minor.yy632, DB_OPTION_SCHEMALESS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; case 88: /* alter_db_options ::= alter_db_option */ -{ yylhsminor.yy636 = createAlterDatabaseOptions(pCxt); yylhsminor.yy636 = setAlterDatabaseOption(pCxt, yylhsminor.yy636, &yymsp[0].minor.yy25); } - yymsp[0].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy632 = createAlterDatabaseOptions(pCxt); yylhsminor.yy632 = setAlterDatabaseOption(pCxt, yylhsminor.yy632, &yymsp[0].minor.yy605); } + yymsp[0].minor.yy632 = yylhsminor.yy632; break; case 89: /* alter_db_options ::= alter_db_options alter_db_option */ -{ yylhsminor.yy636 = setAlterDatabaseOption(pCxt, yymsp[-1].minor.yy636, &yymsp[0].minor.yy25); } - yymsp[-1].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy632 = setAlterDatabaseOption(pCxt, yymsp[-1].minor.yy632, &yymsp[0].minor.yy605); } + yymsp[-1].minor.yy632 = yylhsminor.yy632; break; case 90: /* alter_db_option ::= BUFFER NK_INTEGER */ -{ yymsp[-1].minor.yy25.type = DB_OPTION_BUFFER; yymsp[-1].minor.yy25.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy605.type = DB_OPTION_BUFFER; yymsp[-1].minor.yy605.val = yymsp[0].minor.yy0; } break; case 91: /* alter_db_option ::= CACHELAST NK_INTEGER */ -{ yymsp[-1].minor.yy25.type = DB_OPTION_CACHELAST; yymsp[-1].minor.yy25.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy605.type = DB_OPTION_CACHELAST; yymsp[-1].minor.yy605.val = yymsp[0].minor.yy0; } break; case 92: /* alter_db_option ::= FSYNC NK_INTEGER */ -{ yymsp[-1].minor.yy25.type = DB_OPTION_FSYNC; yymsp[-1].minor.yy25.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy605.type = DB_OPTION_FSYNC; yymsp[-1].minor.yy605.val = yymsp[0].minor.yy0; } break; case 93: /* alter_db_option ::= KEEP integer_list */ case 94: /* alter_db_option ::= KEEP variable_list */ yytestcase(yyruleno==94); -{ yymsp[-1].minor.yy25.type = DB_OPTION_KEEP; yymsp[-1].minor.yy25.pList = yymsp[0].minor.yy236; } +{ yymsp[-1].minor.yy605.type = DB_OPTION_KEEP; yymsp[-1].minor.yy605.pList = yymsp[0].minor.yy424; } break; case 95: /* alter_db_option ::= PAGES NK_INTEGER */ -{ yymsp[-1].minor.yy25.type = DB_OPTION_PAGES; yymsp[-1].minor.yy25.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy605.type = DB_OPTION_PAGES; yymsp[-1].minor.yy605.val = yymsp[0].minor.yy0; } break; case 96: /* alter_db_option ::= REPLICA NK_INTEGER */ -{ yymsp[-1].minor.yy25.type = DB_OPTION_REPLICA; yymsp[-1].minor.yy25.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy605.type = DB_OPTION_REPLICA; yymsp[-1].minor.yy605.val = yymsp[0].minor.yy0; } break; case 97: /* alter_db_option ::= STRICT NK_INTEGER */ -{ yymsp[-1].minor.yy25.type = DB_OPTION_STRICT; yymsp[-1].minor.yy25.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy605.type = DB_OPTION_STRICT; yymsp[-1].minor.yy605.val = yymsp[0].minor.yy0; } break; case 98: /* alter_db_option ::= WAL NK_INTEGER */ -{ yymsp[-1].minor.yy25.type = DB_OPTION_WAL; yymsp[-1].minor.yy25.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy605.type = DB_OPTION_WAL; yymsp[-1].minor.yy605.val = yymsp[0].minor.yy0; } break; case 99: /* integer_list ::= NK_INTEGER */ -{ yylhsminor.yy236 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy236 = yylhsminor.yy236; +{ yylhsminor.yy424 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy424 = yylhsminor.yy424; break; case 100: /* integer_list ::= integer_list NK_COMMA NK_INTEGER */ - case 263: /* dnode_list ::= dnode_list DNODE NK_INTEGER */ yytestcase(yyruleno==263); -{ yylhsminor.yy236 = addNodeToList(pCxt, yymsp[-2].minor.yy236, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } - yymsp[-2].minor.yy236 = yylhsminor.yy236; + case 262: /* dnode_list ::= dnode_list DNODE NK_INTEGER */ yytestcase(yyruleno==262); +{ yylhsminor.yy424 = addNodeToList(pCxt, yymsp[-2].minor.yy424, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } + yymsp[-2].minor.yy424 = yylhsminor.yy424; break; case 101: /* variable_list ::= NK_VARIABLE */ -{ yylhsminor.yy236 = createNodeList(pCxt, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy236 = yylhsminor.yy236; +{ yylhsminor.yy424 = createNodeList(pCxt, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy424 = yylhsminor.yy424; break; case 102: /* variable_list ::= variable_list NK_COMMA NK_VARIABLE */ -{ yylhsminor.yy236 = addNodeToList(pCxt, yymsp[-2].minor.yy236, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[-2].minor.yy236 = yylhsminor.yy236; +{ yylhsminor.yy424 = addNodeToList(pCxt, yymsp[-2].minor.yy424, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[-2].minor.yy424 = yylhsminor.yy424; break; case 103: /* retention_list ::= retention */ case 123: /* multi_create_clause ::= create_subtable_clause */ yytestcase(yyruleno==123); case 126: /* multi_drop_clause ::= drop_table_clause */ yytestcase(yyruleno==126); case 133: /* column_def_list ::= column_def */ yytestcase(yyruleno==133); - case 174: /* col_name_list ::= col_name */ yytestcase(yyruleno==174); - case 212: /* func_name_list ::= func_name */ yytestcase(yyruleno==212); - case 221: /* func_list ::= func */ yytestcase(yyruleno==221); - case 288: /* literal_list ::= signed_literal */ yytestcase(yyruleno==288); - case 342: /* other_para_list ::= star_func_para */ yytestcase(yyruleno==342); - case 397: /* select_sublist ::= select_item */ yytestcase(yyruleno==397); - case 446: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==446); -{ yylhsminor.yy236 = createNodeList(pCxt, yymsp[0].minor.yy636); } - yymsp[0].minor.yy236 = yylhsminor.yy236; + case 173: /* col_name_list ::= col_name */ yytestcase(yyruleno==173); + case 211: /* func_name_list ::= func_name */ yytestcase(yyruleno==211); + case 220: /* func_list ::= func */ yytestcase(yyruleno==220); + case 287: /* literal_list ::= signed_literal */ yytestcase(yyruleno==287); + case 341: /* other_para_list ::= star_func_para */ yytestcase(yyruleno==341); + case 396: /* select_sublist ::= select_item */ yytestcase(yyruleno==396); + case 445: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==445); +{ yylhsminor.yy424 = createNodeList(pCxt, yymsp[0].minor.yy632); } + yymsp[0].minor.yy424 = yylhsminor.yy424; break; case 104: /* retention_list ::= retention_list NK_COMMA retention */ case 134: /* column_def_list ::= column_def_list NK_COMMA column_def */ yytestcase(yyruleno==134); - case 175: /* col_name_list ::= col_name_list NK_COMMA col_name */ yytestcase(yyruleno==175); - case 213: /* func_name_list ::= func_name_list NK_COMMA func_name */ yytestcase(yyruleno==213); - case 222: /* func_list ::= func_list NK_COMMA func */ yytestcase(yyruleno==222); - case 289: /* literal_list ::= literal_list NK_COMMA signed_literal */ yytestcase(yyruleno==289); - case 343: /* other_para_list ::= other_para_list NK_COMMA star_func_para */ yytestcase(yyruleno==343); - case 398: /* select_sublist ::= select_sublist NK_COMMA select_item */ yytestcase(yyruleno==398); - case 447: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==447); -{ yylhsminor.yy236 = addNodeToList(pCxt, yymsp[-2].minor.yy236, yymsp[0].minor.yy636); } - yymsp[-2].minor.yy236 = yylhsminor.yy236; + case 174: /* col_name_list ::= col_name_list NK_COMMA col_name */ yytestcase(yyruleno==174); + case 212: /* func_name_list ::= func_name_list NK_COMMA func_name */ yytestcase(yyruleno==212); + case 221: /* func_list ::= func_list NK_COMMA func */ yytestcase(yyruleno==221); + case 288: /* literal_list ::= literal_list NK_COMMA signed_literal */ yytestcase(yyruleno==288); + case 342: /* other_para_list ::= other_para_list NK_COMMA star_func_para */ yytestcase(yyruleno==342); + case 397: /* select_sublist ::= select_sublist NK_COMMA select_item */ yytestcase(yyruleno==397); + case 446: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==446); +{ yylhsminor.yy424 = addNodeToList(pCxt, yymsp[-2].minor.yy424, yymsp[0].minor.yy632); } + yymsp[-2].minor.yy424 = yylhsminor.yy424; break; case 105: /* retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ -{ yylhsminor.yy636 = createNodeListNodeEx(pCxt, createDurationValueNode(pCxt, &yymsp[-2].minor.yy0), createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy632 = createNodeListNodeEx(pCxt, createDurationValueNode(pCxt, &yymsp[-2].minor.yy0), createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; case 106: /* cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ case 108: /* cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ yytestcase(yyruleno==108); -{ pCxt->pRootNode = createCreateTableStmt(pCxt, yymsp[-6].minor.yy603, yymsp[-5].minor.yy636, yymsp[-3].minor.yy236, yymsp[-1].minor.yy236, yymsp[0].minor.yy636); } +{ pCxt->pRootNode = createCreateTableStmt(pCxt, yymsp[-6].minor.yy137, yymsp[-5].minor.yy632, yymsp[-3].minor.yy424, yymsp[-1].minor.yy424, yymsp[0].minor.yy632); } break; case 107: /* cmd ::= CREATE TABLE multi_create_clause */ -{ pCxt->pRootNode = createCreateMultiTableStmt(pCxt, yymsp[0].minor.yy236); } +{ pCxt->pRootNode = createCreateMultiTableStmt(pCxt, yymsp[0].minor.yy424); } break; case 109: /* cmd ::= DROP TABLE multi_drop_clause */ -{ pCxt->pRootNode = createDropTableStmt(pCxt, yymsp[0].minor.yy236); } +{ pCxt->pRootNode = createDropTableStmt(pCxt, yymsp[0].minor.yy424); } break; case 110: /* cmd ::= DROP STABLE exists_opt full_table_name */ -{ pCxt->pRootNode = createDropSuperTableStmt(pCxt, yymsp[-1].minor.yy603, yymsp[0].minor.yy636); } +{ pCxt->pRootNode = createDropSuperTableStmt(pCxt, yymsp[-1].minor.yy137, yymsp[0].minor.yy632); } break; case 111: /* cmd ::= ALTER TABLE alter_table_clause */ case 112: /* cmd ::= ALTER STABLE alter_table_clause */ yytestcase(yyruleno==112); - case 265: /* cmd ::= query_expression */ yytestcase(yyruleno==265); -{ pCxt->pRootNode = yymsp[0].minor.yy636; } + case 264: /* cmd ::= query_expression */ yytestcase(yyruleno==264); +{ pCxt->pRootNode = yymsp[0].minor.yy632; } break; case 113: /* alter_table_clause ::= full_table_name alter_table_options */ -{ yylhsminor.yy636 = createAlterTableModifyOptions(pCxt, yymsp[-1].minor.yy636, yymsp[0].minor.yy636); } - yymsp[-1].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy632 = createAlterTableModifyOptions(pCxt, yymsp[-1].minor.yy632, yymsp[0].minor.yy632); } + yymsp[-1].minor.yy632 = yylhsminor.yy632; break; case 114: /* alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ -{ yylhsminor.yy636 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy636, TSDB_ALTER_TABLE_ADD_COLUMN, &yymsp[-1].minor.yy53, yymsp[0].minor.yy450); } - yymsp[-4].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy632 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy632, TSDB_ALTER_TABLE_ADD_COLUMN, &yymsp[-1].minor.yy209, yymsp[0].minor.yy304); } + yymsp[-4].minor.yy632 = yylhsminor.yy632; break; case 115: /* alter_table_clause ::= full_table_name DROP COLUMN column_name */ -{ yylhsminor.yy636 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy636, TSDB_ALTER_TABLE_DROP_COLUMN, &yymsp[0].minor.yy53); } - yymsp[-3].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy632 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy632, TSDB_ALTER_TABLE_DROP_COLUMN, &yymsp[0].minor.yy209); } + yymsp[-3].minor.yy632 = yylhsminor.yy632; break; case 116: /* alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ -{ yylhsminor.yy636 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy636, TSDB_ALTER_TABLE_UPDATE_COLUMN_BYTES, &yymsp[-1].minor.yy53, yymsp[0].minor.yy450); } - yymsp[-4].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy632 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy632, TSDB_ALTER_TABLE_UPDATE_COLUMN_BYTES, &yymsp[-1].minor.yy209, yymsp[0].minor.yy304); } + yymsp[-4].minor.yy632 = yylhsminor.yy632; break; case 117: /* alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ -{ yylhsminor.yy636 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy636, TSDB_ALTER_TABLE_UPDATE_COLUMN_NAME, &yymsp[-1].minor.yy53, &yymsp[0].minor.yy53); } - yymsp[-4].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy632 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy632, TSDB_ALTER_TABLE_UPDATE_COLUMN_NAME, &yymsp[-1].minor.yy209, &yymsp[0].minor.yy209); } + yymsp[-4].minor.yy632 = yylhsminor.yy632; break; case 118: /* alter_table_clause ::= full_table_name ADD TAG column_name type_name */ -{ yylhsminor.yy636 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy636, TSDB_ALTER_TABLE_ADD_TAG, &yymsp[-1].minor.yy53, yymsp[0].minor.yy450); } - yymsp[-4].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy632 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy632, TSDB_ALTER_TABLE_ADD_TAG, &yymsp[-1].minor.yy209, yymsp[0].minor.yy304); } + yymsp[-4].minor.yy632 = yylhsminor.yy632; break; case 119: /* alter_table_clause ::= full_table_name DROP TAG column_name */ -{ yylhsminor.yy636 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy636, TSDB_ALTER_TABLE_DROP_TAG, &yymsp[0].minor.yy53); } - yymsp[-3].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy632 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy632, TSDB_ALTER_TABLE_DROP_TAG, &yymsp[0].minor.yy209); } + yymsp[-3].minor.yy632 = yylhsminor.yy632; break; case 120: /* alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ -{ yylhsminor.yy636 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy636, TSDB_ALTER_TABLE_UPDATE_TAG_BYTES, &yymsp[-1].minor.yy53, yymsp[0].minor.yy450); } - yymsp[-4].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy632 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy632, TSDB_ALTER_TABLE_UPDATE_TAG_BYTES, &yymsp[-1].minor.yy209, yymsp[0].minor.yy304); } + yymsp[-4].minor.yy632 = yylhsminor.yy632; break; case 121: /* alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ -{ yylhsminor.yy636 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy636, TSDB_ALTER_TABLE_UPDATE_TAG_NAME, &yymsp[-1].minor.yy53, &yymsp[0].minor.yy53); } - yymsp[-4].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy632 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy632, TSDB_ALTER_TABLE_UPDATE_TAG_NAME, &yymsp[-1].minor.yy209, &yymsp[0].minor.yy209); } + yymsp[-4].minor.yy632 = yylhsminor.yy632; break; case 122: /* alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */ -{ yylhsminor.yy636 = createAlterTableSetTag(pCxt, yymsp[-5].minor.yy636, &yymsp[-2].minor.yy53, yymsp[0].minor.yy636); } - yymsp[-5].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy632 = createAlterTableSetTag(pCxt, yymsp[-5].minor.yy632, &yymsp[-2].minor.yy209, yymsp[0].minor.yy632); } + yymsp[-5].minor.yy632 = yylhsminor.yy632; break; case 124: /* multi_create_clause ::= multi_create_clause create_subtable_clause */ case 127: /* multi_drop_clause ::= multi_drop_clause drop_table_clause */ yytestcase(yyruleno==127); -{ yylhsminor.yy236 = addNodeToList(pCxt, yymsp[-1].minor.yy236, yymsp[0].minor.yy636); } - yymsp[-1].minor.yy236 = yylhsminor.yy236; +{ yylhsminor.yy424 = addNodeToList(pCxt, yymsp[-1].minor.yy424, yymsp[0].minor.yy632); } + yymsp[-1].minor.yy424 = yylhsminor.yy424; break; case 125: /* create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_tags_opt TAGS NK_LP literal_list NK_RP table_options */ -{ yylhsminor.yy636 = createCreateSubTableClause(pCxt, yymsp[-9].minor.yy603, yymsp[-8].minor.yy636, yymsp[-6].minor.yy636, yymsp[-5].minor.yy236, yymsp[-2].minor.yy236, yymsp[0].minor.yy636); } - yymsp[-9].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy632 = createCreateSubTableClause(pCxt, yymsp[-9].minor.yy137, yymsp[-8].minor.yy632, yymsp[-6].minor.yy632, yymsp[-5].minor.yy424, yymsp[-2].minor.yy424, yymsp[0].minor.yy632); } + yymsp[-9].minor.yy632 = yylhsminor.yy632; break; case 128: /* drop_table_clause ::= exists_opt full_table_name */ -{ yylhsminor.yy636 = createDropTableClause(pCxt, yymsp[-1].minor.yy603, yymsp[0].minor.yy636); } - yymsp[-1].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy632 = createDropTableClause(pCxt, yymsp[-1].minor.yy137, yymsp[0].minor.yy632); } + yymsp[-1].minor.yy632 = yylhsminor.yy632; break; case 129: /* specific_tags_opt ::= */ case 160: /* tags_def_opt ::= */ yytestcase(yyruleno==160); - case 405: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==405); - case 422: /* group_by_clause_opt ::= */ yytestcase(yyruleno==422); - case 434: /* order_by_clause_opt ::= */ yytestcase(yyruleno==434); -{ yymsp[1].minor.yy236 = NULL; } + case 404: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==404); + case 421: /* group_by_clause_opt ::= */ yytestcase(yyruleno==421); + case 433: /* order_by_clause_opt ::= */ yytestcase(yyruleno==433); +{ yymsp[1].minor.yy424 = NULL; } break; case 130: /* specific_tags_opt ::= NK_LP col_name_list NK_RP */ -{ yymsp[-2].minor.yy236 = yymsp[-1].minor.yy236; } +{ yymsp[-2].minor.yy424 = yymsp[-1].minor.yy424; } break; case 131: /* full_table_name ::= table_name */ -{ yylhsminor.yy636 = createRealTableNode(pCxt, NULL, &yymsp[0].minor.yy53, NULL); } - yymsp[0].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy632 = createRealTableNode(pCxt, NULL, &yymsp[0].minor.yy209, NULL); } + yymsp[0].minor.yy632 = yylhsminor.yy632; break; case 132: /* full_table_name ::= db_name NK_DOT table_name */ -{ yylhsminor.yy636 = createRealTableNode(pCxt, &yymsp[-2].minor.yy53, &yymsp[0].minor.yy53, NULL); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy632 = createRealTableNode(pCxt, &yymsp[-2].minor.yy209, &yymsp[0].minor.yy209, NULL); } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; case 135: /* column_def ::= column_name type_name */ -{ yylhsminor.yy636 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy53, yymsp[0].minor.yy450, NULL); } - yymsp[-1].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy632 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy209, yymsp[0].minor.yy304, NULL); } + yymsp[-1].minor.yy632 = yylhsminor.yy632; break; case 136: /* column_def ::= column_name type_name COMMENT NK_STRING */ -{ yylhsminor.yy636 = createColumnDefNode(pCxt, &yymsp[-3].minor.yy53, yymsp[-2].minor.yy450, &yymsp[0].minor.yy0); } - yymsp[-3].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy632 = createColumnDefNode(pCxt, &yymsp[-3].minor.yy209, yymsp[-2].minor.yy304, &yymsp[0].minor.yy0); } + yymsp[-3].minor.yy632 = yylhsminor.yy632; break; case 137: /* type_name ::= BOOL */ -{ yymsp[0].minor.yy450 = createDataType(TSDB_DATA_TYPE_BOOL); } +{ yymsp[0].minor.yy304 = createDataType(TSDB_DATA_TYPE_BOOL); } break; case 138: /* type_name ::= TINYINT */ -{ yymsp[0].minor.yy450 = createDataType(TSDB_DATA_TYPE_TINYINT); } +{ yymsp[0].minor.yy304 = createDataType(TSDB_DATA_TYPE_TINYINT); } break; case 139: /* type_name ::= SMALLINT */ -{ yymsp[0].minor.yy450 = createDataType(TSDB_DATA_TYPE_SMALLINT); } +{ yymsp[0].minor.yy304 = createDataType(TSDB_DATA_TYPE_SMALLINT); } break; case 140: /* type_name ::= INT */ case 141: /* type_name ::= INTEGER */ yytestcase(yyruleno==141); -{ yymsp[0].minor.yy450 = createDataType(TSDB_DATA_TYPE_INT); } +{ yymsp[0].minor.yy304 = createDataType(TSDB_DATA_TYPE_INT); } break; case 142: /* type_name ::= BIGINT */ -{ yymsp[0].minor.yy450 = createDataType(TSDB_DATA_TYPE_BIGINT); } +{ yymsp[0].minor.yy304 = createDataType(TSDB_DATA_TYPE_BIGINT); } break; case 143: /* type_name ::= FLOAT */ -{ yymsp[0].minor.yy450 = createDataType(TSDB_DATA_TYPE_FLOAT); } +{ yymsp[0].minor.yy304 = createDataType(TSDB_DATA_TYPE_FLOAT); } break; case 144: /* type_name ::= DOUBLE */ -{ yymsp[0].minor.yy450 = createDataType(TSDB_DATA_TYPE_DOUBLE); } +{ yymsp[0].minor.yy304 = createDataType(TSDB_DATA_TYPE_DOUBLE); } break; case 145: /* type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy450 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy0); } +{ yymsp[-3].minor.yy304 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy0); } break; case 146: /* type_name ::= TIMESTAMP */ -{ yymsp[0].minor.yy450 = createDataType(TSDB_DATA_TYPE_TIMESTAMP); } +{ yymsp[0].minor.yy304 = createDataType(TSDB_DATA_TYPE_TIMESTAMP); } break; case 147: /* type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy450 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, &yymsp[-1].minor.yy0); } +{ yymsp[-3].minor.yy304 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, &yymsp[-1].minor.yy0); } break; case 148: /* type_name ::= TINYINT UNSIGNED */ -{ yymsp[-1].minor.yy450 = createDataType(TSDB_DATA_TYPE_UTINYINT); } +{ yymsp[-1].minor.yy304 = createDataType(TSDB_DATA_TYPE_UTINYINT); } break; case 149: /* type_name ::= SMALLINT UNSIGNED */ -{ yymsp[-1].minor.yy450 = createDataType(TSDB_DATA_TYPE_USMALLINT); } +{ yymsp[-1].minor.yy304 = createDataType(TSDB_DATA_TYPE_USMALLINT); } break; case 150: /* type_name ::= INT UNSIGNED */ -{ yymsp[-1].minor.yy450 = createDataType(TSDB_DATA_TYPE_UINT); } +{ yymsp[-1].minor.yy304 = createDataType(TSDB_DATA_TYPE_UINT); } break; case 151: /* type_name ::= BIGINT UNSIGNED */ -{ yymsp[-1].minor.yy450 = createDataType(TSDB_DATA_TYPE_UBIGINT); } +{ yymsp[-1].minor.yy304 = createDataType(TSDB_DATA_TYPE_UBIGINT); } break; case 152: /* type_name ::= JSON */ -{ yymsp[0].minor.yy450 = createDataType(TSDB_DATA_TYPE_JSON); } +{ yymsp[0].minor.yy304 = createDataType(TSDB_DATA_TYPE_JSON); } break; case 153: /* type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy450 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, &yymsp[-1].minor.yy0); } +{ yymsp[-3].minor.yy304 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, &yymsp[-1].minor.yy0); } break; case 154: /* type_name ::= MEDIUMBLOB */ -{ yymsp[0].minor.yy450 = createDataType(TSDB_DATA_TYPE_MEDIUMBLOB); } +{ yymsp[0].minor.yy304 = createDataType(TSDB_DATA_TYPE_MEDIUMBLOB); } break; case 155: /* type_name ::= BLOB */ -{ yymsp[0].minor.yy450 = createDataType(TSDB_DATA_TYPE_BLOB); } +{ yymsp[0].minor.yy304 = createDataType(TSDB_DATA_TYPE_BLOB); } break; case 156: /* type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy450 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, &yymsp[-1].minor.yy0); } +{ yymsp[-3].minor.yy304 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, &yymsp[-1].minor.yy0); } break; case 157: /* type_name ::= DECIMAL */ -{ yymsp[0].minor.yy450 = createDataType(TSDB_DATA_TYPE_DECIMAL); } +{ yymsp[0].minor.yy304 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; case 158: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy450 = createDataType(TSDB_DATA_TYPE_DECIMAL); } +{ yymsp[-3].minor.yy304 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; case 159: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ -{ yymsp[-5].minor.yy450 = createDataType(TSDB_DATA_TYPE_DECIMAL); } +{ yymsp[-5].minor.yy304 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; case 161: /* tags_def_opt ::= tags_def */ - case 341: /* star_func_para_list ::= other_para_list */ yytestcase(yyruleno==341); - case 396: /* select_list ::= select_sublist */ yytestcase(yyruleno==396); -{ yylhsminor.yy236 = yymsp[0].minor.yy236; } - yymsp[0].minor.yy236 = yylhsminor.yy236; + case 340: /* star_func_para_list ::= other_para_list */ yytestcase(yyruleno==340); + case 395: /* select_list ::= select_sublist */ yytestcase(yyruleno==395); +{ yylhsminor.yy424 = yymsp[0].minor.yy424; } + yymsp[0].minor.yy424 = yylhsminor.yy424; break; case 162: /* tags_def ::= TAGS NK_LP column_def_list NK_RP */ -{ yymsp[-3].minor.yy236 = yymsp[-1].minor.yy236; } +{ yymsp[-3].minor.yy424 = yymsp[-1].minor.yy424; } break; case 163: /* table_options ::= */ -{ yymsp[1].minor.yy636 = createDefaultTableOptions(pCxt); } +{ yymsp[1].minor.yy632 = createDefaultTableOptions(pCxt); } break; case 164: /* table_options ::= table_options COMMENT NK_STRING */ -{ yylhsminor.yy636 = setTableOption(pCxt, yymsp[-2].minor.yy636, TABLE_OPTION_COMMENT, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; +{ yylhsminor.yy632 = setTableOption(pCxt, yymsp[-2].minor.yy632, TABLE_OPTION_COMMENT, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; - case 165: /* table_options ::= table_options DELAY NK_INTEGER */ -{ yylhsminor.yy636 = setTableOption(pCxt, yymsp[-2].minor.yy636, TABLE_OPTION_DELAY, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; + case 165: /* table_options ::= table_options FILE_FACTOR NK_FLOAT */ +{ yylhsminor.yy632 = setTableOption(pCxt, yymsp[-2].minor.yy632, TABLE_OPTION_FILE_FACTOR, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; - case 166: /* table_options ::= table_options FILE_FACTOR NK_FLOAT */ -{ yylhsminor.yy636 = setTableOption(pCxt, yymsp[-2].minor.yy636, TABLE_OPTION_FILE_FACTOR, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; + case 166: /* table_options ::= table_options ROLLUP NK_LP func_name_list NK_RP */ +{ yylhsminor.yy632 = setTableOption(pCxt, yymsp[-4].minor.yy632, TABLE_OPTION_ROLLUP, yymsp[-1].minor.yy424); } + yymsp[-4].minor.yy632 = yylhsminor.yy632; break; - case 167: /* table_options ::= table_options ROLLUP NK_LP func_name_list NK_RP */ -{ yylhsminor.yy636 = setTableOption(pCxt, yymsp[-4].minor.yy636, TABLE_OPTION_ROLLUP, yymsp[-1].minor.yy236); } - yymsp[-4].minor.yy636 = yylhsminor.yy636; + case 167: /* table_options ::= table_options TTL NK_INTEGER */ +{ yylhsminor.yy632 = setTableOption(pCxt, yymsp[-2].minor.yy632, TABLE_OPTION_TTL, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; - case 168: /* table_options ::= table_options TTL NK_INTEGER */ -{ yylhsminor.yy636 = setTableOption(pCxt, yymsp[-2].minor.yy636, TABLE_OPTION_TTL, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; + case 168: /* table_options ::= table_options SMA NK_LP col_name_list NK_RP */ +{ yylhsminor.yy632 = setTableOption(pCxt, yymsp[-4].minor.yy632, TABLE_OPTION_SMA, yymsp[-1].minor.yy424); } + yymsp[-4].minor.yy632 = yylhsminor.yy632; break; - case 169: /* table_options ::= table_options SMA NK_LP col_name_list NK_RP */ -{ yylhsminor.yy636 = setTableOption(pCxt, yymsp[-4].minor.yy636, TABLE_OPTION_SMA, yymsp[-1].minor.yy236); } - yymsp[-4].minor.yy636 = yylhsminor.yy636; + case 169: /* alter_table_options ::= alter_table_option */ +{ yylhsminor.yy632 = createAlterTableOptions(pCxt); yylhsminor.yy632 = setTableOption(pCxt, yylhsminor.yy632, yymsp[0].minor.yy605.type, &yymsp[0].minor.yy605.val); } + yymsp[0].minor.yy632 = yylhsminor.yy632; break; - case 170: /* alter_table_options ::= alter_table_option */ -{ yylhsminor.yy636 = createAlterTableOptions(pCxt); yylhsminor.yy636 = setTableOption(pCxt, yylhsminor.yy636, yymsp[0].minor.yy25.type, &yymsp[0].minor.yy25.val); } - yymsp[0].minor.yy636 = yylhsminor.yy636; + case 170: /* alter_table_options ::= alter_table_options alter_table_option */ +{ yylhsminor.yy632 = setTableOption(pCxt, yymsp[-1].minor.yy632, yymsp[0].minor.yy605.type, &yymsp[0].minor.yy605.val); } + yymsp[-1].minor.yy632 = yylhsminor.yy632; break; - case 171: /* alter_table_options ::= alter_table_options alter_table_option */ -{ yylhsminor.yy636 = setTableOption(pCxt, yymsp[-1].minor.yy636, yymsp[0].minor.yy25.type, &yymsp[0].minor.yy25.val); } - yymsp[-1].minor.yy636 = yylhsminor.yy636; + case 171: /* alter_table_option ::= COMMENT NK_STRING */ +{ yymsp[-1].minor.yy605.type = TABLE_OPTION_COMMENT; yymsp[-1].minor.yy605.val = yymsp[0].minor.yy0; } break; - case 172: /* alter_table_option ::= COMMENT NK_STRING */ -{ yymsp[-1].minor.yy25.type = TABLE_OPTION_COMMENT; yymsp[-1].minor.yy25.val = yymsp[0].minor.yy0; } + case 172: /* alter_table_option ::= TTL NK_INTEGER */ +{ yymsp[-1].minor.yy605.type = TABLE_OPTION_TTL; yymsp[-1].minor.yy605.val = yymsp[0].minor.yy0; } break; - case 173: /* alter_table_option ::= TTL NK_INTEGER */ -{ yymsp[-1].minor.yy25.type = TABLE_OPTION_TTL; yymsp[-1].minor.yy25.val = yymsp[0].minor.yy0; } + case 175: /* col_name ::= column_name */ +{ yylhsminor.yy632 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy209); } + yymsp[0].minor.yy632 = yylhsminor.yy632; break; - case 176: /* col_name ::= column_name */ -{ yylhsminor.yy636 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy53); } - yymsp[0].minor.yy636 = yylhsminor.yy636; - break; - case 177: /* cmd ::= SHOW DNODES */ + case 176: /* cmd ::= SHOW DNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DNODES_STMT, NULL, NULL); } break; - case 178: /* cmd ::= SHOW USERS */ + case 177: /* cmd ::= SHOW USERS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_USERS_STMT, NULL, NULL); } break; - case 179: /* cmd ::= SHOW DATABASES */ + case 178: /* cmd ::= SHOW DATABASES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DATABASES_STMT, NULL, NULL); } break; - case 180: /* cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */ -{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TABLES_STMT, yymsp[-2].minor.yy636, yymsp[0].minor.yy636); } + case 179: /* cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */ +{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TABLES_STMT, yymsp[-2].minor.yy632, yymsp[0].minor.yy632); } break; - case 181: /* cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ -{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_STABLES_STMT, yymsp[-2].minor.yy636, yymsp[0].minor.yy636); } + case 180: /* cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ +{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_STABLES_STMT, yymsp[-2].minor.yy632, yymsp[0].minor.yy632); } break; - case 182: /* cmd ::= SHOW db_name_cond_opt VGROUPS */ -{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, yymsp[-1].minor.yy636, NULL); } + case 181: /* cmd ::= SHOW db_name_cond_opt VGROUPS */ +{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, yymsp[-1].minor.yy632, NULL); } break; - case 183: /* cmd ::= SHOW MNODES */ + case 182: /* cmd ::= SHOW MNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_MNODES_STMT, NULL, NULL); } break; - case 184: /* cmd ::= SHOW MODULES */ + case 183: /* cmd ::= SHOW MODULES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_MODULES_STMT, NULL, NULL); } break; - case 185: /* cmd ::= SHOW QNODES */ + case 184: /* cmd ::= SHOW QNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QNODES_STMT, NULL, NULL); } break; - case 186: /* cmd ::= SHOW FUNCTIONS */ + case 185: /* cmd ::= SHOW FUNCTIONS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_FUNCTIONS_STMT, NULL, NULL); } break; - case 187: /* cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ -{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, yymsp[-1].minor.yy636, yymsp[0].minor.yy636); } + case 186: /* cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ +{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, yymsp[-1].minor.yy632, yymsp[0].minor.yy632); } break; - case 188: /* cmd ::= SHOW STREAMS */ + case 187: /* cmd ::= SHOW STREAMS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_STREAMS_STMT, NULL, NULL); } break; - case 189: /* cmd ::= SHOW ACCOUNTS */ + case 188: /* cmd ::= SHOW ACCOUNTS */ { pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); } break; - case 190: /* cmd ::= SHOW APPS */ + case 189: /* cmd ::= SHOW APPS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_APPS_STMT, NULL, NULL); } break; - case 191: /* cmd ::= SHOW CONNECTIONS */ + case 190: /* cmd ::= SHOW CONNECTIONS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CONNECTIONS_STMT, NULL, NULL); } break; - case 192: /* cmd ::= SHOW LICENCE */ - case 193: /* cmd ::= SHOW GRANTS */ yytestcase(yyruleno==193); + case 191: /* cmd ::= SHOW LICENCE */ + case 192: /* cmd ::= SHOW GRANTS */ yytestcase(yyruleno==192); { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LICENCE_STMT, NULL, NULL); } break; - case 194: /* cmd ::= SHOW CREATE DATABASE db_name */ -{ pCxt->pRootNode = createShowCreateDatabaseStmt(pCxt, &yymsp[0].minor.yy53); } + case 193: /* cmd ::= SHOW CREATE DATABASE db_name */ +{ pCxt->pRootNode = createShowCreateDatabaseStmt(pCxt, &yymsp[0].minor.yy209); } break; - case 195: /* cmd ::= SHOW CREATE TABLE full_table_name */ -{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_TABLE_STMT, yymsp[0].minor.yy636); } + case 194: /* cmd ::= SHOW CREATE TABLE full_table_name */ +{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_TABLE_STMT, yymsp[0].minor.yy632); } break; - case 196: /* cmd ::= SHOW CREATE STABLE full_table_name */ -{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_STABLE_STMT, yymsp[0].minor.yy636); } + case 195: /* cmd ::= SHOW CREATE STABLE full_table_name */ +{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_STABLE_STMT, yymsp[0].minor.yy632); } break; - case 197: /* cmd ::= SHOW QUERIES */ + case 196: /* cmd ::= SHOW QUERIES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QUERIES_STMT, NULL, NULL); } break; - case 198: /* cmd ::= SHOW SCORES */ + case 197: /* cmd ::= SHOW SCORES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SCORES_STMT, NULL, NULL); } break; - case 199: /* cmd ::= SHOW TOPICS */ + case 198: /* cmd ::= SHOW TOPICS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TOPICS_STMT, NULL, NULL); } break; - case 200: /* cmd ::= SHOW VARIABLES */ + case 199: /* cmd ::= SHOW VARIABLES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_VARIABLE_STMT, NULL, NULL); } break; - case 201: /* cmd ::= SHOW BNODES */ + case 200: /* cmd ::= SHOW BNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_BNODES_STMT, NULL, NULL); } break; - case 202: /* cmd ::= SHOW SNODES */ + case 201: /* cmd ::= SHOW SNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SNODES_STMT, NULL, NULL); } break; - case 203: /* cmd ::= SHOW CLUSTER */ + case 202: /* cmd ::= SHOW CLUSTER */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CLUSTER_STMT, NULL, NULL); } break; - case 204: /* cmd ::= SHOW TRANSACTIONS */ + case 203: /* cmd ::= SHOW TRANSACTIONS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TRANSACTIONS_STMT, NULL, NULL); } break; - case 205: /* db_name_cond_opt ::= */ - case 210: /* from_db_opt ::= */ yytestcase(yyruleno==210); -{ yymsp[1].minor.yy636 = createDefaultDatabaseCondValue(pCxt); } + case 204: /* db_name_cond_opt ::= */ + case 209: /* from_db_opt ::= */ yytestcase(yyruleno==209); +{ yymsp[1].minor.yy632 = createDefaultDatabaseCondValue(pCxt); } break; - case 206: /* db_name_cond_opt ::= db_name NK_DOT */ -{ yylhsminor.yy636 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy53); } - yymsp[-1].minor.yy636 = yylhsminor.yy636; + case 205: /* db_name_cond_opt ::= db_name NK_DOT */ +{ yylhsminor.yy632 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy209); } + yymsp[-1].minor.yy632 = yylhsminor.yy632; break; - case 207: /* like_pattern_opt ::= */ - case 218: /* index_options ::= */ yytestcase(yyruleno==218); - case 250: /* into_opt ::= */ yytestcase(yyruleno==250); - case 403: /* where_clause_opt ::= */ yytestcase(yyruleno==403); - case 407: /* twindow_clause_opt ::= */ yytestcase(yyruleno==407); - case 412: /* sliding_opt ::= */ yytestcase(yyruleno==412); - case 414: /* fill_opt ::= */ yytestcase(yyruleno==414); - case 426: /* having_clause_opt ::= */ yytestcase(yyruleno==426); - case 436: /* slimit_clause_opt ::= */ yytestcase(yyruleno==436); - case 440: /* limit_clause_opt ::= */ yytestcase(yyruleno==440); -{ yymsp[1].minor.yy636 = NULL; } + case 206: /* like_pattern_opt ::= */ + case 217: /* index_options ::= */ yytestcase(yyruleno==217); + case 249: /* into_opt ::= */ yytestcase(yyruleno==249); + case 402: /* where_clause_opt ::= */ yytestcase(yyruleno==402); + case 406: /* twindow_clause_opt ::= */ yytestcase(yyruleno==406); + case 411: /* sliding_opt ::= */ yytestcase(yyruleno==411); + case 413: /* fill_opt ::= */ yytestcase(yyruleno==413); + case 425: /* having_clause_opt ::= */ yytestcase(yyruleno==425); + case 435: /* slimit_clause_opt ::= */ yytestcase(yyruleno==435); + case 439: /* limit_clause_opt ::= */ yytestcase(yyruleno==439); +{ yymsp[1].minor.yy632 = NULL; } break; - case 208: /* like_pattern_opt ::= LIKE NK_STRING */ -{ yymsp[-1].minor.yy636 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } + case 207: /* like_pattern_opt ::= LIKE NK_STRING */ +{ yymsp[-1].minor.yy632 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } break; - case 209: /* table_name_cond ::= table_name */ -{ yylhsminor.yy636 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy53); } - yymsp[0].minor.yy636 = yylhsminor.yy636; + case 208: /* table_name_cond ::= table_name */ +{ yylhsminor.yy632 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy209); } + yymsp[0].minor.yy632 = yylhsminor.yy632; break; - case 211: /* from_db_opt ::= FROM db_name */ -{ yymsp[-1].minor.yy636 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy53); } + case 210: /* from_db_opt ::= FROM db_name */ +{ yymsp[-1].minor.yy632 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy209); } break; - case 214: /* func_name ::= function_name */ -{ yylhsminor.yy636 = createFunctionNode(pCxt, &yymsp[0].minor.yy53, NULL); } - yymsp[0].minor.yy636 = yylhsminor.yy636; + case 213: /* func_name ::= function_name */ +{ yylhsminor.yy632 = createFunctionNode(pCxt, &yymsp[0].minor.yy209, NULL); } + yymsp[0].minor.yy632 = yylhsminor.yy632; break; - case 215: /* cmd ::= CREATE SMA INDEX not_exists_opt index_name ON table_name index_options */ -{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_SMA, yymsp[-4].minor.yy603, &yymsp[-3].minor.yy53, &yymsp[-1].minor.yy53, NULL, yymsp[0].minor.yy636); } + case 214: /* cmd ::= CREATE SMA INDEX not_exists_opt index_name ON table_name index_options */ +{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_SMA, yymsp[-4].minor.yy137, &yymsp[-3].minor.yy209, &yymsp[-1].minor.yy209, NULL, yymsp[0].minor.yy632); } break; - case 216: /* cmd ::= CREATE FULLTEXT INDEX not_exists_opt index_name ON table_name NK_LP col_name_list NK_RP */ -{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_FULLTEXT, yymsp[-6].minor.yy603, &yymsp[-5].minor.yy53, &yymsp[-3].minor.yy53, yymsp[-1].minor.yy236, NULL); } + case 215: /* cmd ::= CREATE FULLTEXT INDEX not_exists_opt index_name ON table_name NK_LP col_name_list NK_RP */ +{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_FULLTEXT, yymsp[-6].minor.yy137, &yymsp[-5].minor.yy209, &yymsp[-3].minor.yy209, yymsp[-1].minor.yy424, NULL); } break; - case 217: /* cmd ::= DROP INDEX exists_opt index_name ON table_name */ -{ pCxt->pRootNode = createDropIndexStmt(pCxt, yymsp[-3].minor.yy603, &yymsp[-2].minor.yy53, &yymsp[0].minor.yy53); } + case 216: /* cmd ::= DROP INDEX exists_opt index_name ON table_name */ +{ pCxt->pRootNode = createDropIndexStmt(pCxt, yymsp[-3].minor.yy137, &yymsp[-2].minor.yy209, &yymsp[0].minor.yy209); } break; - case 219: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt */ -{ yymsp[-8].minor.yy636 = createIndexOption(pCxt, yymsp[-6].minor.yy236, releaseRawExprNode(pCxt, yymsp[-2].minor.yy636), NULL, yymsp[0].minor.yy636); } + case 218: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt */ +{ yymsp[-8].minor.yy632 = createIndexOption(pCxt, yymsp[-6].minor.yy424, releaseRawExprNode(pCxt, yymsp[-2].minor.yy632), NULL, yymsp[0].minor.yy632); } break; - case 220: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt */ -{ yymsp[-10].minor.yy636 = createIndexOption(pCxt, yymsp[-8].minor.yy236, releaseRawExprNode(pCxt, yymsp[-4].minor.yy636), releaseRawExprNode(pCxt, yymsp[-2].minor.yy636), yymsp[0].minor.yy636); } + case 219: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt */ +{ yymsp[-10].minor.yy632 = createIndexOption(pCxt, yymsp[-8].minor.yy424, releaseRawExprNode(pCxt, yymsp[-4].minor.yy632), releaseRawExprNode(pCxt, yymsp[-2].minor.yy632), yymsp[0].minor.yy632); } break; - case 223: /* func ::= function_name NK_LP expression_list NK_RP */ -{ yylhsminor.yy636 = createFunctionNode(pCxt, &yymsp[-3].minor.yy53, yymsp[-1].minor.yy236); } - yymsp[-3].minor.yy636 = yylhsminor.yy636; + case 222: /* func ::= function_name NK_LP expression_list NK_RP */ +{ yylhsminor.yy632 = createFunctionNode(pCxt, &yymsp[-3].minor.yy209, yymsp[-1].minor.yy424); } + yymsp[-3].minor.yy632 = yylhsminor.yy632; break; - case 224: /* cmd ::= CREATE TOPIC not_exists_opt topic_name topic_options AS query_expression */ -{ pCxt->pRootNode = createCreateTopicStmt(pCxt, yymsp[-4].minor.yy603, &yymsp[-3].minor.yy53, yymsp[0].minor.yy636, NULL, yymsp[-2].minor.yy636); } + case 223: /* cmd ::= CREATE TOPIC not_exists_opt topic_name topic_options AS query_expression */ +{ pCxt->pRootNode = createCreateTopicStmt(pCxt, yymsp[-4].minor.yy137, &yymsp[-3].minor.yy209, yymsp[0].minor.yy632, NULL, yymsp[-2].minor.yy632); } break; - case 225: /* cmd ::= CREATE TOPIC not_exists_opt topic_name topic_options AS db_name */ -{ pCxt->pRootNode = createCreateTopicStmt(pCxt, yymsp[-4].minor.yy603, &yymsp[-3].minor.yy53, NULL, &yymsp[0].minor.yy53, yymsp[-2].minor.yy636); } + case 224: /* cmd ::= CREATE TOPIC not_exists_opt topic_name topic_options AS db_name */ +{ pCxt->pRootNode = createCreateTopicStmt(pCxt, yymsp[-4].minor.yy137, &yymsp[-3].minor.yy209, NULL, &yymsp[0].minor.yy209, yymsp[-2].minor.yy632); } break; - case 226: /* cmd ::= DROP TOPIC exists_opt topic_name */ -{ pCxt->pRootNode = createDropTopicStmt(pCxt, yymsp[-1].minor.yy603, &yymsp[0].minor.yy53); } + case 225: /* cmd ::= DROP TOPIC exists_opt topic_name */ +{ pCxt->pRootNode = createDropTopicStmt(pCxt, yymsp[-1].minor.yy137, &yymsp[0].minor.yy209); } break; - case 227: /* cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ -{ pCxt->pRootNode = createDropCGroupStmt(pCxt, yymsp[-3].minor.yy603, &yymsp[-2].minor.yy53, &yymsp[0].minor.yy53); } + case 226: /* cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ +{ pCxt->pRootNode = createDropCGroupStmt(pCxt, yymsp[-3].minor.yy137, &yymsp[-2].minor.yy209, &yymsp[0].minor.yy209); } break; - case 228: /* topic_options ::= */ -{ yymsp[1].minor.yy636 = createTopicOptions(pCxt); } + case 227: /* topic_options ::= */ +{ yymsp[1].minor.yy632 = createTopicOptions(pCxt); } break; - case 229: /* topic_options ::= topic_options WITH TABLE */ -{ ((STopicOptions*)yymsp[-2].minor.yy636)->withTable = true; yylhsminor.yy636 = yymsp[-2].minor.yy636; } - yymsp[-2].minor.yy636 = yylhsminor.yy636; + case 228: /* topic_options ::= topic_options WITH TABLE */ +{ ((STopicOptions*)yymsp[-2].minor.yy632)->withTable = true; yylhsminor.yy632 = yymsp[-2].minor.yy632; } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; - case 230: /* topic_options ::= topic_options WITH SCHEMA */ -{ ((STopicOptions*)yymsp[-2].minor.yy636)->withSchema = true; yylhsminor.yy636 = yymsp[-2].minor.yy636; } - yymsp[-2].minor.yy636 = yylhsminor.yy636; + case 229: /* topic_options ::= topic_options WITH SCHEMA */ +{ ((STopicOptions*)yymsp[-2].minor.yy632)->withSchema = true; yylhsminor.yy632 = yymsp[-2].minor.yy632; } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; - case 231: /* topic_options ::= topic_options WITH TAG */ -{ ((STopicOptions*)yymsp[-2].minor.yy636)->withTag = true; yylhsminor.yy636 = yymsp[-2].minor.yy636; } - yymsp[-2].minor.yy636 = yylhsminor.yy636; + case 230: /* topic_options ::= topic_options WITH TAG */ +{ ((STopicOptions*)yymsp[-2].minor.yy632)->withTag = true; yylhsminor.yy632 = yymsp[-2].minor.yy632; } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; - case 232: /* cmd ::= DESC full_table_name */ - case 233: /* cmd ::= DESCRIBE full_table_name */ yytestcase(yyruleno==233); -{ pCxt->pRootNode = createDescribeStmt(pCxt, yymsp[0].minor.yy636); } + case 231: /* cmd ::= DESC full_table_name */ + case 232: /* cmd ::= DESCRIBE full_table_name */ yytestcase(yyruleno==232); +{ pCxt->pRootNode = createDescribeStmt(pCxt, yymsp[0].minor.yy632); } break; - case 234: /* cmd ::= RESET QUERY CACHE */ + case 233: /* cmd ::= RESET QUERY CACHE */ { pCxt->pRootNode = createResetQueryCacheStmt(pCxt); } break; - case 235: /* cmd ::= EXPLAIN analyze_opt explain_options query_expression */ -{ pCxt->pRootNode = createExplainStmt(pCxt, yymsp[-2].minor.yy603, yymsp[-1].minor.yy636, yymsp[0].minor.yy636); } + case 234: /* cmd ::= EXPLAIN analyze_opt explain_options query_expression */ +{ pCxt->pRootNode = createExplainStmt(pCxt, yymsp[-2].minor.yy137, yymsp[-1].minor.yy632, yymsp[0].minor.yy632); } break; - case 237: /* analyze_opt ::= ANALYZE */ - case 245: /* agg_func_opt ::= AGGREGATE */ yytestcase(yyruleno==245); - case 393: /* set_quantifier_opt ::= DISTINCT */ yytestcase(yyruleno==393); -{ yymsp[0].minor.yy603 = true; } + case 236: /* analyze_opt ::= ANALYZE */ + case 244: /* agg_func_opt ::= AGGREGATE */ yytestcase(yyruleno==244); + case 392: /* set_quantifier_opt ::= DISTINCT */ yytestcase(yyruleno==392); +{ yymsp[0].minor.yy137 = true; } break; - case 238: /* explain_options ::= */ -{ yymsp[1].minor.yy636 = createDefaultExplainOptions(pCxt); } + case 237: /* explain_options ::= */ +{ yymsp[1].minor.yy632 = createDefaultExplainOptions(pCxt); } break; - case 239: /* explain_options ::= explain_options VERBOSE NK_BOOL */ -{ yylhsminor.yy636 = setExplainVerbose(pCxt, yymsp[-2].minor.yy636, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; + case 238: /* explain_options ::= explain_options VERBOSE NK_BOOL */ +{ yylhsminor.yy632 = setExplainVerbose(pCxt, yymsp[-2].minor.yy632, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; - case 240: /* explain_options ::= explain_options RATIO NK_FLOAT */ -{ yylhsminor.yy636 = setExplainRatio(pCxt, yymsp[-2].minor.yy636, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; + case 239: /* explain_options ::= explain_options RATIO NK_FLOAT */ +{ yylhsminor.yy632 = setExplainRatio(pCxt, yymsp[-2].minor.yy632, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; - case 241: /* cmd ::= COMPACT VNODES IN NK_LP integer_list NK_RP */ -{ pCxt->pRootNode = createCompactStmt(pCxt, yymsp[-1].minor.yy236); } + case 240: /* cmd ::= COMPACT VNODES IN NK_LP integer_list NK_RP */ +{ pCxt->pRootNode = createCompactStmt(pCxt, yymsp[-1].minor.yy424); } break; - case 242: /* cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt */ -{ pCxt->pRootNode = createCreateFunctionStmt(pCxt, yymsp[-6].minor.yy603, yymsp[-8].minor.yy603, &yymsp[-5].minor.yy53, &yymsp[-3].minor.yy0, yymsp[-1].minor.yy450, yymsp[0].minor.yy158); } + case 241: /* cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt */ +{ pCxt->pRootNode = createCreateFunctionStmt(pCxt, yymsp[-6].minor.yy137, yymsp[-8].minor.yy137, &yymsp[-5].minor.yy209, &yymsp[-3].minor.yy0, yymsp[-1].minor.yy304, yymsp[0].minor.yy100); } break; - case 243: /* cmd ::= DROP FUNCTION exists_opt function_name */ -{ pCxt->pRootNode = createDropFunctionStmt(pCxt, yymsp[-1].minor.yy603, &yymsp[0].minor.yy53); } + case 242: /* cmd ::= DROP FUNCTION exists_opt function_name */ +{ pCxt->pRootNode = createDropFunctionStmt(pCxt, yymsp[-1].minor.yy137, &yymsp[0].minor.yy209); } break; - case 246: /* bufsize_opt ::= */ -{ yymsp[1].minor.yy158 = 0; } + case 245: /* bufsize_opt ::= */ +{ yymsp[1].minor.yy100 = 0; } break; - case 247: /* bufsize_opt ::= BUFSIZE NK_INTEGER */ -{ yymsp[-1].minor.yy158 = taosStr2Int32(yymsp[0].minor.yy0.z, NULL, 10); } + case 246: /* bufsize_opt ::= BUFSIZE NK_INTEGER */ +{ yymsp[-1].minor.yy100 = taosStr2Int32(yymsp[0].minor.yy0.z, NULL, 10); } break; - case 248: /* cmd ::= CREATE STREAM not_exists_opt stream_name stream_options into_opt AS query_expression */ -{ pCxt->pRootNode = createCreateStreamStmt(pCxt, yymsp[-5].minor.yy603, &yymsp[-4].minor.yy53, yymsp[-2].minor.yy636, yymsp[-3].minor.yy636, yymsp[0].minor.yy636); } + case 247: /* cmd ::= CREATE STREAM not_exists_opt stream_name stream_options into_opt AS query_expression */ +{ pCxt->pRootNode = createCreateStreamStmt(pCxt, yymsp[-5].minor.yy137, &yymsp[-4].minor.yy209, yymsp[-2].minor.yy632, yymsp[-3].minor.yy632, yymsp[0].minor.yy632); } break; - case 249: /* cmd ::= DROP STREAM exists_opt stream_name */ -{ pCxt->pRootNode = createDropStreamStmt(pCxt, yymsp[-1].minor.yy603, &yymsp[0].minor.yy53); } + case 248: /* cmd ::= DROP STREAM exists_opt stream_name */ +{ pCxt->pRootNode = createDropStreamStmt(pCxt, yymsp[-1].minor.yy137, &yymsp[0].minor.yy209); } break; - case 251: /* into_opt ::= INTO full_table_name */ - case 374: /* from_clause ::= FROM table_reference_list */ yytestcase(yyruleno==374); - case 404: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==404); - case 427: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==427); -{ yymsp[-1].minor.yy636 = yymsp[0].minor.yy636; } + case 250: /* into_opt ::= INTO full_table_name */ + case 373: /* from_clause ::= FROM table_reference_list */ yytestcase(yyruleno==373); + case 403: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==403); + case 426: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==426); +{ yymsp[-1].minor.yy632 = yymsp[0].minor.yy632; } break; - case 252: /* stream_options ::= */ -{ yymsp[1].minor.yy636 = createStreamOptions(pCxt); } + case 251: /* stream_options ::= */ +{ yymsp[1].minor.yy632 = createStreamOptions(pCxt); } break; - case 253: /* stream_options ::= stream_options TRIGGER AT_ONCE */ -{ ((SStreamOptions*)yymsp[-2].minor.yy636)->triggerType = STREAM_TRIGGER_AT_ONCE; yylhsminor.yy636 = yymsp[-2].minor.yy636; } - yymsp[-2].minor.yy636 = yylhsminor.yy636; + case 252: /* stream_options ::= stream_options TRIGGER AT_ONCE */ +{ ((SStreamOptions*)yymsp[-2].minor.yy632)->triggerType = STREAM_TRIGGER_AT_ONCE; yylhsminor.yy632 = yymsp[-2].minor.yy632; } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; - case 254: /* stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ -{ ((SStreamOptions*)yymsp[-2].minor.yy636)->triggerType = STREAM_TRIGGER_WINDOW_CLOSE; yylhsminor.yy636 = yymsp[-2].minor.yy636; } - yymsp[-2].minor.yy636 = yylhsminor.yy636; + case 253: /* stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ +{ ((SStreamOptions*)yymsp[-2].minor.yy632)->triggerType = STREAM_TRIGGER_WINDOW_CLOSE; yylhsminor.yy632 = yymsp[-2].minor.yy632; } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; - case 255: /* stream_options ::= stream_options WATERMARK duration_literal */ -{ ((SStreamOptions*)yymsp[-2].minor.yy636)->pWatermark = releaseRawExprNode(pCxt, yymsp[0].minor.yy636); yylhsminor.yy636 = yymsp[-2].minor.yy636; } - yymsp[-2].minor.yy636 = yylhsminor.yy636; + case 254: /* stream_options ::= stream_options WATERMARK duration_literal */ +{ ((SStreamOptions*)yymsp[-2].minor.yy632)->pWatermark = releaseRawExprNode(pCxt, yymsp[0].minor.yy632); yylhsminor.yy632 = yymsp[-2].minor.yy632; } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; - case 256: /* cmd ::= KILL CONNECTION NK_INTEGER */ + case 255: /* cmd ::= KILL CONNECTION NK_INTEGER */ { pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_CONNECTION_STMT, &yymsp[0].minor.yy0); } break; - case 257: /* cmd ::= KILL QUERY NK_INTEGER */ + case 256: /* cmd ::= KILL QUERY NK_INTEGER */ { pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_QUERY_STMT, &yymsp[0].minor.yy0); } break; - case 258: /* cmd ::= KILL TRANSACTION NK_INTEGER */ + case 257: /* cmd ::= KILL TRANSACTION NK_INTEGER */ { pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_TRANSACTION_STMT, &yymsp[0].minor.yy0); } break; - case 259: /* cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ + case 258: /* cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ { pCxt->pRootNode = createMergeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } break; - case 260: /* cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ -{ pCxt->pRootNode = createRedistributeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy236); } + case 259: /* cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ +{ pCxt->pRootNode = createRedistributeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy424); } break; - case 261: /* cmd ::= SPLIT VGROUP NK_INTEGER */ + case 260: /* cmd ::= SPLIT VGROUP NK_INTEGER */ { pCxt->pRootNode = createSplitVgroupStmt(pCxt, &yymsp[0].minor.yy0); } break; - case 262: /* dnode_list ::= DNODE NK_INTEGER */ -{ yymsp[-1].minor.yy236 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } + case 261: /* dnode_list ::= DNODE NK_INTEGER */ +{ yymsp[-1].minor.yy424 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } break; - case 264: /* cmd ::= SYNCDB db_name REPLICA */ -{ pCxt->pRootNode = createSyncdbStmt(pCxt, &yymsp[-1].minor.yy53); } + case 263: /* cmd ::= SYNCDB db_name REPLICA */ +{ pCxt->pRootNode = createSyncdbStmt(pCxt, &yymsp[-1].minor.yy209); } break; - case 266: /* literal ::= NK_INTEGER */ -{ yylhsminor.yy636 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy636 = yylhsminor.yy636; + case 265: /* literal ::= NK_INTEGER */ +{ yylhsminor.yy632 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy632 = yylhsminor.yy632; break; - case 267: /* literal ::= NK_FLOAT */ -{ yylhsminor.yy636 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy636 = yylhsminor.yy636; + case 266: /* literal ::= NK_FLOAT */ +{ yylhsminor.yy632 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy632 = yylhsminor.yy632; break; - case 268: /* literal ::= NK_STRING */ -{ yylhsminor.yy636 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy636 = yylhsminor.yy636; + case 267: /* literal ::= NK_STRING */ +{ yylhsminor.yy632 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy632 = yylhsminor.yy632; break; - case 269: /* literal ::= NK_BOOL */ -{ yylhsminor.yy636 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy636 = yylhsminor.yy636; + case 268: /* literal ::= NK_BOOL */ +{ yylhsminor.yy632 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy632 = yylhsminor.yy632; break; - case 270: /* literal ::= TIMESTAMP NK_STRING */ -{ yylhsminor.yy636 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0)); } - yymsp[-1].minor.yy636 = yylhsminor.yy636; + case 269: /* literal ::= TIMESTAMP NK_STRING */ +{ yylhsminor.yy632 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0)); } + yymsp[-1].minor.yy632 = yylhsminor.yy632; break; - case 271: /* literal ::= duration_literal */ - case 281: /* signed_literal ::= signed */ yytestcase(yyruleno==281); - case 301: /* expression ::= literal */ yytestcase(yyruleno==301); - case 302: /* expression ::= pseudo_column */ yytestcase(yyruleno==302); - case 303: /* expression ::= column_reference */ yytestcase(yyruleno==303); - case 304: /* expression ::= function_expression */ yytestcase(yyruleno==304); - case 305: /* expression ::= subquery */ yytestcase(yyruleno==305); - case 330: /* function_expression ::= literal_func */ yytestcase(yyruleno==330); - case 366: /* boolean_value_expression ::= boolean_primary */ yytestcase(yyruleno==366); - case 370: /* boolean_primary ::= predicate */ yytestcase(yyruleno==370); - case 372: /* common_expression ::= expression */ yytestcase(yyruleno==372); - case 373: /* common_expression ::= boolean_value_expression */ yytestcase(yyruleno==373); - case 375: /* table_reference_list ::= table_reference */ yytestcase(yyruleno==375); - case 377: /* table_reference ::= table_primary */ yytestcase(yyruleno==377); - case 378: /* table_reference ::= joined_table */ yytestcase(yyruleno==378); - case 382: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==382); - case 429: /* query_expression_body ::= query_primary */ yytestcase(yyruleno==429); - case 432: /* query_primary ::= query_specification */ yytestcase(yyruleno==432); -{ yylhsminor.yy636 = yymsp[0].minor.yy636; } - yymsp[0].minor.yy636 = yylhsminor.yy636; + case 270: /* literal ::= duration_literal */ + case 280: /* signed_literal ::= signed */ yytestcase(yyruleno==280); + case 300: /* expression ::= literal */ yytestcase(yyruleno==300); + case 301: /* expression ::= pseudo_column */ yytestcase(yyruleno==301); + case 302: /* expression ::= column_reference */ yytestcase(yyruleno==302); + case 303: /* expression ::= function_expression */ yytestcase(yyruleno==303); + case 304: /* expression ::= subquery */ yytestcase(yyruleno==304); + case 329: /* function_expression ::= literal_func */ yytestcase(yyruleno==329); + case 365: /* boolean_value_expression ::= boolean_primary */ yytestcase(yyruleno==365); + case 369: /* boolean_primary ::= predicate */ yytestcase(yyruleno==369); + case 371: /* common_expression ::= expression */ yytestcase(yyruleno==371); + case 372: /* common_expression ::= boolean_value_expression */ yytestcase(yyruleno==372); + case 374: /* table_reference_list ::= table_reference */ yytestcase(yyruleno==374); + case 376: /* table_reference ::= table_primary */ yytestcase(yyruleno==376); + case 377: /* table_reference ::= joined_table */ yytestcase(yyruleno==377); + case 381: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==381); + case 428: /* query_expression_body ::= query_primary */ yytestcase(yyruleno==428); + case 431: /* query_primary ::= query_specification */ yytestcase(yyruleno==431); +{ yylhsminor.yy632 = yymsp[0].minor.yy632; } + yymsp[0].minor.yy632 = yylhsminor.yy632; break; - case 272: /* literal ::= NULL */ -{ yylhsminor.yy636 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy636 = yylhsminor.yy636; + case 271: /* literal ::= NULL */ +{ yylhsminor.yy632 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy632 = yylhsminor.yy632; break; - case 273: /* literal ::= NK_QUESTION */ -{ yylhsminor.yy636 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy636 = yylhsminor.yy636; + case 272: /* literal ::= NK_QUESTION */ +{ yylhsminor.yy632 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy632 = yylhsminor.yy632; break; - case 274: /* duration_literal ::= NK_VARIABLE */ -{ yylhsminor.yy636 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy636 = yylhsminor.yy636; + case 273: /* duration_literal ::= NK_VARIABLE */ +{ yylhsminor.yy632 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy632 = yylhsminor.yy632; break; - case 275: /* signed ::= NK_INTEGER */ -{ yylhsminor.yy636 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy636 = yylhsminor.yy636; + case 274: /* signed ::= NK_INTEGER */ +{ yylhsminor.yy632 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy632 = yylhsminor.yy632; break; - case 276: /* signed ::= NK_PLUS NK_INTEGER */ -{ yymsp[-1].minor.yy636 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } + case 275: /* signed ::= NK_PLUS NK_INTEGER */ +{ yymsp[-1].minor.yy632 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } break; - case 277: /* signed ::= NK_MINUS NK_INTEGER */ + case 276: /* 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.yy636 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &t); + yylhsminor.yy632 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &t); } - yymsp[-1].minor.yy636 = yylhsminor.yy636; + yymsp[-1].minor.yy632 = yylhsminor.yy632; break; - case 278: /* signed ::= NK_FLOAT */ -{ yylhsminor.yy636 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy636 = yylhsminor.yy636; + case 277: /* signed ::= NK_FLOAT */ +{ yylhsminor.yy632 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy632 = yylhsminor.yy632; break; - case 279: /* signed ::= NK_PLUS NK_FLOAT */ -{ yymsp[-1].minor.yy636 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } + case 278: /* signed ::= NK_PLUS NK_FLOAT */ +{ yymsp[-1].minor.yy632 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } break; - case 280: /* signed ::= NK_MINUS NK_FLOAT */ + case 279: /* 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.yy636 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &t); + yylhsminor.yy632 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &t); } - yymsp[-1].minor.yy636 = yylhsminor.yy636; + yymsp[-1].minor.yy632 = yylhsminor.yy632; break; - case 282: /* signed_literal ::= NK_STRING */ -{ yylhsminor.yy636 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy636 = yylhsminor.yy636; + case 281: /* signed_literal ::= NK_STRING */ +{ yylhsminor.yy632 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy632 = yylhsminor.yy632; break; - case 283: /* signed_literal ::= NK_BOOL */ -{ yylhsminor.yy636 = createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy636 = yylhsminor.yy636; + case 282: /* signed_literal ::= NK_BOOL */ +{ yylhsminor.yy632 = createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy632 = yylhsminor.yy632; break; - case 284: /* signed_literal ::= TIMESTAMP NK_STRING */ -{ yymsp[-1].minor.yy636 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } + case 283: /* signed_literal ::= TIMESTAMP NK_STRING */ +{ yymsp[-1].minor.yy632 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } break; - case 285: /* signed_literal ::= duration_literal */ - case 287: /* signed_literal ::= literal_func */ yytestcase(yyruleno==287); - case 344: /* star_func_para ::= expression */ yytestcase(yyruleno==344); - case 399: /* select_item ::= common_expression */ yytestcase(yyruleno==399); - case 445: /* search_condition ::= common_expression */ yytestcase(yyruleno==445); -{ yylhsminor.yy636 = releaseRawExprNode(pCxt, yymsp[0].minor.yy636); } - yymsp[0].minor.yy636 = yylhsminor.yy636; + case 284: /* signed_literal ::= duration_literal */ + case 286: /* signed_literal ::= literal_func */ yytestcase(yyruleno==286); + case 343: /* star_func_para ::= expression */ yytestcase(yyruleno==343); + case 398: /* select_item ::= common_expression */ yytestcase(yyruleno==398); + case 444: /* search_condition ::= common_expression */ yytestcase(yyruleno==444); +{ yylhsminor.yy632 = releaseRawExprNode(pCxt, yymsp[0].minor.yy632); } + yymsp[0].minor.yy632 = yylhsminor.yy632; break; - case 286: /* signed_literal ::= NULL */ -{ yylhsminor.yy636 = createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy636 = yylhsminor.yy636; + case 285: /* signed_literal ::= NULL */ +{ yylhsminor.yy632 = createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy632 = yylhsminor.yy632; break; - case 306: /* expression ::= NK_LP expression NK_RP */ - case 371: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==371); -{ yylhsminor.yy636 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy636)); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; + case 305: /* expression ::= NK_LP expression NK_RP */ + case 370: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==370); +{ yylhsminor.yy632 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy632)); } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; - case 307: /* expression ::= NK_PLUS expression */ + case 306: /* expression ::= NK_PLUS expression */ { - SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy636); - yylhsminor.yy636 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, releaseRawExprNode(pCxt, yymsp[0].minor.yy636)); + SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy632); + yylhsminor.yy632 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, releaseRawExprNode(pCxt, yymsp[0].minor.yy632)); } - yymsp[-1].minor.yy636 = yylhsminor.yy636; + yymsp[-1].minor.yy632 = yylhsminor.yy632; break; - case 308: /* expression ::= NK_MINUS expression */ + case 307: /* expression ::= NK_MINUS expression */ { - SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy636); - yylhsminor.yy636 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, createOperatorNode(pCxt, OP_TYPE_MINUS, releaseRawExprNode(pCxt, yymsp[0].minor.yy636), NULL)); + SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy632); + yylhsminor.yy632 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, createOperatorNode(pCxt, OP_TYPE_MINUS, releaseRawExprNode(pCxt, yymsp[0].minor.yy632), NULL)); } - yymsp[-1].minor.yy636 = yylhsminor.yy636; + yymsp[-1].minor.yy632 = yylhsminor.yy632; break; - case 309: /* expression ::= expression NK_PLUS expression */ + case 308: /* expression ::= expression NK_PLUS expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy636); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy636); - yylhsminor.yy636 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_ADD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy636), releaseRawExprNode(pCxt, yymsp[0].minor.yy636))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy632); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy632); + yylhsminor.yy632 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_ADD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy632), releaseRawExprNode(pCxt, yymsp[0].minor.yy632))); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; - case 310: /* expression ::= expression NK_MINUS expression */ + case 309: /* expression ::= expression NK_MINUS expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy636); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy636); - yylhsminor.yy636 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[-2].minor.yy636), releaseRawExprNode(pCxt, yymsp[0].minor.yy636))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy632); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy632); + yylhsminor.yy632 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[-2].minor.yy632), releaseRawExprNode(pCxt, yymsp[0].minor.yy632))); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; - case 311: /* expression ::= expression NK_STAR expression */ + case 310: /* expression ::= expression NK_STAR expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy636); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy636); - yylhsminor.yy636 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MULTI, releaseRawExprNode(pCxt, yymsp[-2].minor.yy636), releaseRawExprNode(pCxt, yymsp[0].minor.yy636))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy632); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy632); + yylhsminor.yy632 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MULTI, releaseRawExprNode(pCxt, yymsp[-2].minor.yy632), releaseRawExprNode(pCxt, yymsp[0].minor.yy632))); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; - case 312: /* expression ::= expression NK_SLASH expression */ + case 311: /* expression ::= expression NK_SLASH expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy636); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy636); - yylhsminor.yy636 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_DIV, releaseRawExprNode(pCxt, yymsp[-2].minor.yy636), releaseRawExprNode(pCxt, yymsp[0].minor.yy636))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy632); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy632); + yylhsminor.yy632 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_DIV, releaseRawExprNode(pCxt, yymsp[-2].minor.yy632), releaseRawExprNode(pCxt, yymsp[0].minor.yy632))); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; - case 313: /* expression ::= expression NK_REM expression */ + case 312: /* expression ::= expression NK_REM expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy636); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy636); - yylhsminor.yy636 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MOD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy636), releaseRawExprNode(pCxt, yymsp[0].minor.yy636))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy632); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy632); + yylhsminor.yy632 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MOD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy632), releaseRawExprNode(pCxt, yymsp[0].minor.yy632))); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; - case 314: /* expression ::= column_reference NK_ARROW NK_STRING */ + case 313: /* expression ::= column_reference NK_ARROW NK_STRING */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy636); - yylhsminor.yy636 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_JSON_GET_VALUE, releaseRawExprNode(pCxt, yymsp[-2].minor.yy636), createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy632); + yylhsminor.yy632 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_JSON_GET_VALUE, releaseRawExprNode(pCxt, yymsp[-2].minor.yy632), createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0))); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; - case 315: /* expression_list ::= expression */ -{ yylhsminor.yy236 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy636)); } - yymsp[0].minor.yy236 = yylhsminor.yy236; + case 314: /* expression_list ::= expression */ +{ yylhsminor.yy424 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy632)); } + yymsp[0].minor.yy424 = yylhsminor.yy424; break; - case 316: /* expression_list ::= expression_list NK_COMMA expression */ -{ yylhsminor.yy236 = addNodeToList(pCxt, yymsp[-2].minor.yy236, releaseRawExprNode(pCxt, yymsp[0].minor.yy636)); } - yymsp[-2].minor.yy236 = yylhsminor.yy236; + case 315: /* expression_list ::= expression_list NK_COMMA expression */ +{ yylhsminor.yy424 = addNodeToList(pCxt, yymsp[-2].minor.yy424, releaseRawExprNode(pCxt, yymsp[0].minor.yy632)); } + yymsp[-2].minor.yy424 = yylhsminor.yy424; break; - case 317: /* column_reference ::= column_name */ -{ yylhsminor.yy636 = createRawExprNode(pCxt, &yymsp[0].minor.yy53, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy53)); } - yymsp[0].minor.yy636 = yylhsminor.yy636; + case 316: /* column_reference ::= column_name */ +{ yylhsminor.yy632 = createRawExprNode(pCxt, &yymsp[0].minor.yy209, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy209)); } + yymsp[0].minor.yy632 = yylhsminor.yy632; break; - case 318: /* column_reference ::= table_name NK_DOT column_name */ -{ yylhsminor.yy636 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy53, &yymsp[0].minor.yy53, createColumnNode(pCxt, &yymsp[-2].minor.yy53, &yymsp[0].minor.yy53)); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; + case 317: /* column_reference ::= table_name NK_DOT column_name */ +{ yylhsminor.yy632 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy209, &yymsp[0].minor.yy209, createColumnNode(pCxt, &yymsp[-2].minor.yy209, &yymsp[0].minor.yy209)); } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; - case 319: /* pseudo_column ::= ROWTS */ - case 320: /* pseudo_column ::= TBNAME */ yytestcase(yyruleno==320); - case 322: /* pseudo_column ::= QSTARTTS */ yytestcase(yyruleno==322); - case 323: /* pseudo_column ::= QENDTS */ yytestcase(yyruleno==323); - case 324: /* pseudo_column ::= WSTARTTS */ yytestcase(yyruleno==324); - case 325: /* pseudo_column ::= WENDTS */ yytestcase(yyruleno==325); - case 326: /* pseudo_column ::= WDURATION */ yytestcase(yyruleno==326); - case 332: /* literal_func ::= NOW */ yytestcase(yyruleno==332); -{ yylhsminor.yy636 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL)); } - yymsp[0].minor.yy636 = yylhsminor.yy636; + case 318: /* pseudo_column ::= ROWTS */ + case 319: /* pseudo_column ::= TBNAME */ yytestcase(yyruleno==319); + case 321: /* pseudo_column ::= QSTARTTS */ yytestcase(yyruleno==321); + case 322: /* pseudo_column ::= QENDTS */ yytestcase(yyruleno==322); + case 323: /* pseudo_column ::= WSTARTTS */ yytestcase(yyruleno==323); + case 324: /* pseudo_column ::= WENDTS */ yytestcase(yyruleno==324); + case 325: /* pseudo_column ::= WDURATION */ yytestcase(yyruleno==325); + case 331: /* literal_func ::= NOW */ yytestcase(yyruleno==331); +{ yylhsminor.yy632 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL)); } + yymsp[0].minor.yy632 = yylhsminor.yy632; break; - case 321: /* pseudo_column ::= table_name NK_DOT TBNAME */ -{ yylhsminor.yy636 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy53, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-2].minor.yy53)))); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; + case 320: /* pseudo_column ::= table_name NK_DOT TBNAME */ +{ yylhsminor.yy632 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy209, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-2].minor.yy209)))); } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; - case 327: /* function_expression ::= function_name NK_LP expression_list NK_RP */ - case 328: /* function_expression ::= star_func NK_LP star_func_para_list NK_RP */ yytestcase(yyruleno==328); -{ yylhsminor.yy636 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy53, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy53, yymsp[-1].minor.yy236)); } - yymsp[-3].minor.yy636 = yylhsminor.yy636; + case 326: /* function_expression ::= function_name NK_LP expression_list NK_RP */ + case 327: /* function_expression ::= star_func NK_LP star_func_para_list NK_RP */ yytestcase(yyruleno==327); +{ yylhsminor.yy632 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy209, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy209, yymsp[-1].minor.yy424)); } + yymsp[-3].minor.yy632 = yylhsminor.yy632; break; - case 329: /* function_expression ::= CAST NK_LP expression AS type_name NK_RP */ -{ yylhsminor.yy636 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createCastFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy636), yymsp[-1].minor.yy450)); } - yymsp[-5].minor.yy636 = yylhsminor.yy636; + case 328: /* function_expression ::= CAST NK_LP expression AS type_name NK_RP */ +{ yylhsminor.yy632 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createCastFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy632), yymsp[-1].minor.yy304)); } + yymsp[-5].minor.yy632 = yylhsminor.yy632; break; - case 331: /* literal_func ::= noarg_func NK_LP NK_RP */ -{ yylhsminor.yy636 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy53, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-2].minor.yy53, NULL)); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; + case 330: /* literal_func ::= noarg_func NK_LP NK_RP */ +{ yylhsminor.yy632 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy209, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-2].minor.yy209, NULL)); } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; - case 340: /* star_func_para_list ::= NK_STAR */ -{ yylhsminor.yy236 = createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy236 = yylhsminor.yy236; + case 339: /* star_func_para_list ::= NK_STAR */ +{ yylhsminor.yy424 = createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy424 = yylhsminor.yy424; break; - case 345: /* star_func_para ::= table_name NK_DOT NK_STAR */ - case 402: /* select_item ::= table_name NK_DOT NK_STAR */ yytestcase(yyruleno==402); -{ yylhsminor.yy636 = createColumnNode(pCxt, &yymsp[-2].minor.yy53, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; + case 344: /* star_func_para ::= table_name NK_DOT NK_STAR */ + case 401: /* select_item ::= table_name NK_DOT NK_STAR */ yytestcase(yyruleno==401); +{ yylhsminor.yy632 = createColumnNode(pCxt, &yymsp[-2].minor.yy209, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; - case 346: /* predicate ::= expression compare_op expression */ - case 351: /* predicate ::= expression in_op in_predicate_value */ yytestcase(yyruleno==351); + case 345: /* predicate ::= expression compare_op expression */ + case 350: /* predicate ::= expression in_op in_predicate_value */ yytestcase(yyruleno==350); { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy636); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy636); - yylhsminor.yy636 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, yymsp[-1].minor.yy136, releaseRawExprNode(pCxt, yymsp[-2].minor.yy636), releaseRawExprNode(pCxt, yymsp[0].minor.yy636))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy632); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy632); + yylhsminor.yy632 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, yymsp[-1].minor.yy380, releaseRawExprNode(pCxt, yymsp[-2].minor.yy632), releaseRawExprNode(pCxt, yymsp[0].minor.yy632))); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; - case 347: /* predicate ::= expression BETWEEN expression AND expression */ + case 346: /* predicate ::= expression BETWEEN expression AND expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-4].minor.yy636); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy636); - yylhsminor.yy636 = createRawExprNodeExt(pCxt, &s, &e, createBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-4].minor.yy636), releaseRawExprNode(pCxt, yymsp[-2].minor.yy636), releaseRawExprNode(pCxt, yymsp[0].minor.yy636))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-4].minor.yy632); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy632); + yylhsminor.yy632 = createRawExprNodeExt(pCxt, &s, &e, createBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-4].minor.yy632), releaseRawExprNode(pCxt, yymsp[-2].minor.yy632), releaseRawExprNode(pCxt, yymsp[0].minor.yy632))); } - yymsp[-4].minor.yy636 = yylhsminor.yy636; + yymsp[-4].minor.yy632 = yylhsminor.yy632; break; - case 348: /* predicate ::= expression NOT BETWEEN expression AND expression */ + case 347: /* predicate ::= expression NOT BETWEEN expression AND expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-5].minor.yy636); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy636); - yylhsminor.yy636 = createRawExprNodeExt(pCxt, &s, &e, createNotBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy636), releaseRawExprNode(pCxt, yymsp[-2].minor.yy636), releaseRawExprNode(pCxt, yymsp[0].minor.yy636))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-5].minor.yy632); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy632); + yylhsminor.yy632 = createRawExprNodeExt(pCxt, &s, &e, createNotBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy632), releaseRawExprNode(pCxt, yymsp[-2].minor.yy632), releaseRawExprNode(pCxt, yymsp[0].minor.yy632))); } - yymsp[-5].minor.yy636 = yylhsminor.yy636; + yymsp[-5].minor.yy632 = yylhsminor.yy632; break; - case 349: /* predicate ::= expression IS NULL */ + case 348: /* predicate ::= expression IS NULL */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy636); - yylhsminor.yy636 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NULL, releaseRawExprNode(pCxt, yymsp[-2].minor.yy636), NULL)); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy632); + yylhsminor.yy632 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NULL, releaseRawExprNode(pCxt, yymsp[-2].minor.yy632), NULL)); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; - case 350: /* predicate ::= expression IS NOT NULL */ + case 349: /* predicate ::= expression IS NOT NULL */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-3].minor.yy636); - yylhsminor.yy636 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NOT_NULL, releaseRawExprNode(pCxt, yymsp[-3].minor.yy636), NULL)); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-3].minor.yy632); + yylhsminor.yy632 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NOT_NULL, releaseRawExprNode(pCxt, yymsp[-3].minor.yy632), NULL)); } - yymsp[-3].minor.yy636 = yylhsminor.yy636; + yymsp[-3].minor.yy632 = yylhsminor.yy632; break; - case 352: /* compare_op ::= NK_LT */ -{ yymsp[0].minor.yy136 = OP_TYPE_LOWER_THAN; } + case 351: /* compare_op ::= NK_LT */ +{ yymsp[0].minor.yy380 = OP_TYPE_LOWER_THAN; } break; - case 353: /* compare_op ::= NK_GT */ -{ yymsp[0].minor.yy136 = OP_TYPE_GREATER_THAN; } + case 352: /* compare_op ::= NK_GT */ +{ yymsp[0].minor.yy380 = OP_TYPE_GREATER_THAN; } break; - case 354: /* compare_op ::= NK_LE */ -{ yymsp[0].minor.yy136 = OP_TYPE_LOWER_EQUAL; } + case 353: /* compare_op ::= NK_LE */ +{ yymsp[0].minor.yy380 = OP_TYPE_LOWER_EQUAL; } break; - case 355: /* compare_op ::= NK_GE */ -{ yymsp[0].minor.yy136 = OP_TYPE_GREATER_EQUAL; } + case 354: /* compare_op ::= NK_GE */ +{ yymsp[0].minor.yy380 = OP_TYPE_GREATER_EQUAL; } break; - case 356: /* compare_op ::= NK_NE */ -{ yymsp[0].minor.yy136 = OP_TYPE_NOT_EQUAL; } + case 355: /* compare_op ::= NK_NE */ +{ yymsp[0].minor.yy380 = OP_TYPE_NOT_EQUAL; } break; - case 357: /* compare_op ::= NK_EQ */ -{ yymsp[0].minor.yy136 = OP_TYPE_EQUAL; } + case 356: /* compare_op ::= NK_EQ */ +{ yymsp[0].minor.yy380 = OP_TYPE_EQUAL; } break; - case 358: /* compare_op ::= LIKE */ -{ yymsp[0].minor.yy136 = OP_TYPE_LIKE; } + case 357: /* compare_op ::= LIKE */ +{ yymsp[0].minor.yy380 = OP_TYPE_LIKE; } break; - case 359: /* compare_op ::= NOT LIKE */ -{ yymsp[-1].minor.yy136 = OP_TYPE_NOT_LIKE; } + case 358: /* compare_op ::= NOT LIKE */ +{ yymsp[-1].minor.yy380 = OP_TYPE_NOT_LIKE; } break; - case 360: /* compare_op ::= MATCH */ -{ yymsp[0].minor.yy136 = OP_TYPE_MATCH; } + case 359: /* compare_op ::= MATCH */ +{ yymsp[0].minor.yy380 = OP_TYPE_MATCH; } break; - case 361: /* compare_op ::= NMATCH */ -{ yymsp[0].minor.yy136 = OP_TYPE_NMATCH; } + case 360: /* compare_op ::= NMATCH */ +{ yymsp[0].minor.yy380 = OP_TYPE_NMATCH; } break; - case 362: /* compare_op ::= CONTAINS */ -{ yymsp[0].minor.yy136 = OP_TYPE_JSON_CONTAINS; } + case 361: /* compare_op ::= CONTAINS */ +{ yymsp[0].minor.yy380 = OP_TYPE_JSON_CONTAINS; } break; - case 363: /* in_op ::= IN */ -{ yymsp[0].minor.yy136 = OP_TYPE_IN; } + case 362: /* in_op ::= IN */ +{ yymsp[0].minor.yy380 = OP_TYPE_IN; } break; - case 364: /* in_op ::= NOT IN */ -{ yymsp[-1].minor.yy136 = OP_TYPE_NOT_IN; } + case 363: /* in_op ::= NOT IN */ +{ yymsp[-1].minor.yy380 = OP_TYPE_NOT_IN; } break; - case 365: /* in_predicate_value ::= NK_LP expression_list NK_RP */ -{ yylhsminor.yy636 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createNodeListNode(pCxt, yymsp[-1].minor.yy236)); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; + case 364: /* in_predicate_value ::= NK_LP expression_list NK_RP */ +{ yylhsminor.yy632 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createNodeListNode(pCxt, yymsp[-1].minor.yy424)); } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; - case 367: /* boolean_value_expression ::= NOT boolean_primary */ + case 366: /* boolean_value_expression ::= NOT boolean_primary */ { - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy636); - yylhsminor.yy636 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_NOT, releaseRawExprNode(pCxt, yymsp[0].minor.yy636), NULL)); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy632); + yylhsminor.yy632 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_NOT, releaseRawExprNode(pCxt, yymsp[0].minor.yy632), NULL)); } - yymsp[-1].minor.yy636 = yylhsminor.yy636; + yymsp[-1].minor.yy632 = yylhsminor.yy632; break; - case 368: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ + case 367: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy636); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy636); - yylhsminor.yy636 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy636), releaseRawExprNode(pCxt, yymsp[0].minor.yy636))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy632); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy632); + yylhsminor.yy632 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy632), releaseRawExprNode(pCxt, yymsp[0].minor.yy632))); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; - case 369: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ + case 368: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy636); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy636); - yylhsminor.yy636 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy636), releaseRawExprNode(pCxt, yymsp[0].minor.yy636))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy632); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy632); + yylhsminor.yy632 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy632), releaseRawExprNode(pCxt, yymsp[0].minor.yy632))); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; - case 376: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */ -{ yylhsminor.yy636 = createJoinTableNode(pCxt, JOIN_TYPE_INNER, yymsp[-2].minor.yy636, yymsp[0].minor.yy636, NULL); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; + case 375: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */ +{ yylhsminor.yy632 = createJoinTableNode(pCxt, JOIN_TYPE_INNER, yymsp[-2].minor.yy632, yymsp[0].minor.yy632, NULL); } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; - case 379: /* table_primary ::= table_name alias_opt */ -{ yylhsminor.yy636 = createRealTableNode(pCxt, NULL, &yymsp[-1].minor.yy53, &yymsp[0].minor.yy53); } - yymsp[-1].minor.yy636 = yylhsminor.yy636; + case 378: /* table_primary ::= table_name alias_opt */ +{ yylhsminor.yy632 = createRealTableNode(pCxt, NULL, &yymsp[-1].minor.yy209, &yymsp[0].minor.yy209); } + yymsp[-1].minor.yy632 = yylhsminor.yy632; break; - case 380: /* table_primary ::= db_name NK_DOT table_name alias_opt */ -{ yylhsminor.yy636 = createRealTableNode(pCxt, &yymsp[-3].minor.yy53, &yymsp[-1].minor.yy53, &yymsp[0].minor.yy53); } - yymsp[-3].minor.yy636 = yylhsminor.yy636; + case 379: /* table_primary ::= db_name NK_DOT table_name alias_opt */ +{ yylhsminor.yy632 = createRealTableNode(pCxt, &yymsp[-3].minor.yy209, &yymsp[-1].minor.yy209, &yymsp[0].minor.yy209); } + yymsp[-3].minor.yy632 = yylhsminor.yy632; break; - case 381: /* table_primary ::= subquery alias_opt */ -{ yylhsminor.yy636 = createTempTableNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy636), &yymsp[0].minor.yy53); } - yymsp[-1].minor.yy636 = yylhsminor.yy636; + case 380: /* table_primary ::= subquery alias_opt */ +{ yylhsminor.yy632 = createTempTableNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy632), &yymsp[0].minor.yy209); } + yymsp[-1].minor.yy632 = yylhsminor.yy632; break; - case 383: /* alias_opt ::= */ -{ yymsp[1].minor.yy53 = nil_token; } + case 382: /* alias_opt ::= */ +{ yymsp[1].minor.yy209 = nil_token; } break; - case 384: /* alias_opt ::= table_alias */ -{ yylhsminor.yy53 = yymsp[0].minor.yy53; } - yymsp[0].minor.yy53 = yylhsminor.yy53; + case 383: /* alias_opt ::= table_alias */ +{ yylhsminor.yy209 = yymsp[0].minor.yy209; } + yymsp[0].minor.yy209 = yylhsminor.yy209; break; - case 385: /* alias_opt ::= AS table_alias */ -{ yymsp[-1].minor.yy53 = yymsp[0].minor.yy53; } + case 384: /* alias_opt ::= AS table_alias */ +{ yymsp[-1].minor.yy209 = yymsp[0].minor.yy209; } break; - case 386: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */ - case 387: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==387); -{ yymsp[-2].minor.yy636 = yymsp[-1].minor.yy636; } + case 385: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */ + case 386: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==386); +{ yymsp[-2].minor.yy632 = yymsp[-1].minor.yy632; } break; - case 388: /* joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ -{ yylhsminor.yy636 = createJoinTableNode(pCxt, yymsp[-4].minor.yy342, yymsp[-5].minor.yy636, yymsp[-2].minor.yy636, yymsp[0].minor.yy636); } - yymsp[-5].minor.yy636 = yylhsminor.yy636; + case 387: /* joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ +{ yylhsminor.yy632 = createJoinTableNode(pCxt, yymsp[-4].minor.yy612, yymsp[-5].minor.yy632, yymsp[-2].minor.yy632, yymsp[0].minor.yy632); } + yymsp[-5].minor.yy632 = yylhsminor.yy632; break; - case 389: /* join_type ::= */ -{ yymsp[1].minor.yy342 = JOIN_TYPE_INNER; } + case 388: /* join_type ::= */ +{ yymsp[1].minor.yy612 = JOIN_TYPE_INNER; } break; - case 390: /* join_type ::= INNER */ -{ yymsp[0].minor.yy342 = JOIN_TYPE_INNER; } + case 389: /* join_type ::= INNER */ +{ yymsp[0].minor.yy612 = JOIN_TYPE_INNER; } break; - case 391: /* query_specification ::= SELECT set_quantifier_opt select_list from_clause where_clause_opt partition_by_clause_opt twindow_clause_opt group_by_clause_opt having_clause_opt */ + case 390: /* query_specification ::= SELECT set_quantifier_opt select_list from_clause where_clause_opt partition_by_clause_opt twindow_clause_opt group_by_clause_opt having_clause_opt */ { - yymsp[-8].minor.yy636 = createSelectStmt(pCxt, yymsp[-7].minor.yy603, yymsp[-6].minor.yy236, yymsp[-5].minor.yy636); - yymsp[-8].minor.yy636 = addWhereClause(pCxt, yymsp[-8].minor.yy636, yymsp[-4].minor.yy636); - yymsp[-8].minor.yy636 = addPartitionByClause(pCxt, yymsp[-8].minor.yy636, yymsp[-3].minor.yy236); - yymsp[-8].minor.yy636 = addWindowClauseClause(pCxt, yymsp[-8].minor.yy636, yymsp[-2].minor.yy636); - yymsp[-8].minor.yy636 = addGroupByClause(pCxt, yymsp[-8].minor.yy636, yymsp[-1].minor.yy236); - yymsp[-8].minor.yy636 = addHavingClause(pCxt, yymsp[-8].minor.yy636, yymsp[0].minor.yy636); + yymsp[-8].minor.yy632 = createSelectStmt(pCxt, yymsp[-7].minor.yy137, yymsp[-6].minor.yy424, yymsp[-5].minor.yy632); + yymsp[-8].minor.yy632 = addWhereClause(pCxt, yymsp[-8].minor.yy632, yymsp[-4].minor.yy632); + yymsp[-8].minor.yy632 = addPartitionByClause(pCxt, yymsp[-8].minor.yy632, yymsp[-3].minor.yy424); + yymsp[-8].minor.yy632 = addWindowClauseClause(pCxt, yymsp[-8].minor.yy632, yymsp[-2].minor.yy632); + yymsp[-8].minor.yy632 = addGroupByClause(pCxt, yymsp[-8].minor.yy632, yymsp[-1].minor.yy424); + yymsp[-8].minor.yy632 = addHavingClause(pCxt, yymsp[-8].minor.yy632, yymsp[0].minor.yy632); } break; - case 394: /* set_quantifier_opt ::= ALL */ -{ yymsp[0].minor.yy603 = false; } + case 393: /* set_quantifier_opt ::= ALL */ +{ yymsp[0].minor.yy137 = false; } break; - case 395: /* select_list ::= NK_STAR */ -{ yymsp[0].minor.yy236 = NULL; } + case 394: /* select_list ::= NK_STAR */ +{ yymsp[0].minor.yy424 = NULL; } break; - case 400: /* select_item ::= common_expression column_alias */ -{ yylhsminor.yy636 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy636), &yymsp[0].minor.yy53); } - yymsp[-1].minor.yy636 = yylhsminor.yy636; + case 399: /* select_item ::= common_expression column_alias */ +{ yylhsminor.yy632 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy632), &yymsp[0].minor.yy209); } + yymsp[-1].minor.yy632 = yylhsminor.yy632; break; - case 401: /* select_item ::= common_expression AS column_alias */ -{ yylhsminor.yy636 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy636), &yymsp[0].minor.yy53); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; + case 400: /* select_item ::= common_expression AS column_alias */ +{ yylhsminor.yy632 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy632), &yymsp[0].minor.yy209); } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; - case 406: /* partition_by_clause_opt ::= PARTITION BY expression_list */ - case 423: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==423); - case 435: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==435); -{ yymsp[-2].minor.yy236 = yymsp[0].minor.yy236; } + case 405: /* partition_by_clause_opt ::= PARTITION BY expression_list */ + case 422: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==422); + case 434: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==434); +{ yymsp[-2].minor.yy424 = yymsp[0].minor.yy424; } break; - case 408: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ -{ yymsp[-5].minor.yy636 = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy636), releaseRawExprNode(pCxt, yymsp[-1].minor.yy636)); } + case 407: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ +{ yymsp[-5].minor.yy632 = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy632), releaseRawExprNode(pCxt, yymsp[-1].minor.yy632)); } break; - case 409: /* twindow_clause_opt ::= STATE_WINDOW NK_LP expression NK_RP */ -{ yymsp[-3].minor.yy636 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy636)); } + case 408: /* twindow_clause_opt ::= STATE_WINDOW NK_LP expression NK_RP */ +{ yymsp[-3].minor.yy632 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy632)); } break; - case 410: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ -{ yymsp[-5].minor.yy636 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy636), NULL, yymsp[-1].minor.yy636, yymsp[0].minor.yy636); } + case 409: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ +{ yymsp[-5].minor.yy632 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy632), NULL, yymsp[-1].minor.yy632, yymsp[0].minor.yy632); } break; - case 411: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ -{ yymsp[-7].minor.yy636 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy636), releaseRawExprNode(pCxt, yymsp[-3].minor.yy636), yymsp[-1].minor.yy636, yymsp[0].minor.yy636); } + case 410: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ +{ yymsp[-7].minor.yy632 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy632), releaseRawExprNode(pCxt, yymsp[-3].minor.yy632), yymsp[-1].minor.yy632, yymsp[0].minor.yy632); } break; - case 413: /* sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ -{ yymsp[-3].minor.yy636 = releaseRawExprNode(pCxt, yymsp[-1].minor.yy636); } + case 412: /* sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ +{ yymsp[-3].minor.yy632 = releaseRawExprNode(pCxt, yymsp[-1].minor.yy632); } break; - case 415: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */ -{ yymsp[-3].minor.yy636 = createFillNode(pCxt, yymsp[-1].minor.yy18, NULL); } + case 414: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */ +{ yymsp[-3].minor.yy632 = createFillNode(pCxt, yymsp[-1].minor.yy54, NULL); } break; - case 416: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */ -{ yymsp[-5].minor.yy636 = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, yymsp[-1].minor.yy236)); } + case 415: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */ +{ yymsp[-5].minor.yy632 = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, yymsp[-1].minor.yy424)); } break; - case 417: /* fill_mode ::= NONE */ -{ yymsp[0].minor.yy18 = FILL_MODE_NONE; } + case 416: /* fill_mode ::= NONE */ +{ yymsp[0].minor.yy54 = FILL_MODE_NONE; } break; - case 418: /* fill_mode ::= PREV */ -{ yymsp[0].minor.yy18 = FILL_MODE_PREV; } + case 417: /* fill_mode ::= PREV */ +{ yymsp[0].minor.yy54 = FILL_MODE_PREV; } break; - case 419: /* fill_mode ::= NULL */ -{ yymsp[0].minor.yy18 = FILL_MODE_NULL; } + case 418: /* fill_mode ::= NULL */ +{ yymsp[0].minor.yy54 = FILL_MODE_NULL; } break; - case 420: /* fill_mode ::= LINEAR */ -{ yymsp[0].minor.yy18 = FILL_MODE_LINEAR; } + case 419: /* fill_mode ::= LINEAR */ +{ yymsp[0].minor.yy54 = FILL_MODE_LINEAR; } break; - case 421: /* fill_mode ::= NEXT */ -{ yymsp[0].minor.yy18 = FILL_MODE_NEXT; } + case 420: /* fill_mode ::= NEXT */ +{ yymsp[0].minor.yy54 = FILL_MODE_NEXT; } break; - case 424: /* group_by_list ::= expression */ -{ yylhsminor.yy236 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy636))); } - yymsp[0].minor.yy236 = yylhsminor.yy236; + case 423: /* group_by_list ::= expression */ +{ yylhsminor.yy424 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy632))); } + yymsp[0].minor.yy424 = yylhsminor.yy424; break; - case 425: /* group_by_list ::= group_by_list NK_COMMA expression */ -{ yylhsminor.yy236 = addNodeToList(pCxt, yymsp[-2].minor.yy236, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy636))); } - yymsp[-2].minor.yy236 = yylhsminor.yy236; + case 424: /* group_by_list ::= group_by_list NK_COMMA expression */ +{ yylhsminor.yy424 = addNodeToList(pCxt, yymsp[-2].minor.yy424, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy632))); } + yymsp[-2].minor.yy424 = yylhsminor.yy424; break; - case 428: /* query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt */ + case 427: /* query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt */ { - yylhsminor.yy636 = addOrderByClause(pCxt, yymsp[-3].minor.yy636, yymsp[-2].minor.yy236); - yylhsminor.yy636 = addSlimitClause(pCxt, yylhsminor.yy636, yymsp[-1].minor.yy636); - yylhsminor.yy636 = addLimitClause(pCxt, yylhsminor.yy636, yymsp[0].minor.yy636); + yylhsminor.yy632 = addOrderByClause(pCxt, yymsp[-3].minor.yy632, yymsp[-2].minor.yy424); + yylhsminor.yy632 = addSlimitClause(pCxt, yylhsminor.yy632, yymsp[-1].minor.yy632); + yylhsminor.yy632 = addLimitClause(pCxt, yylhsminor.yy632, yymsp[0].minor.yy632); } - yymsp[-3].minor.yy636 = yylhsminor.yy636; + yymsp[-3].minor.yy632 = yylhsminor.yy632; break; - case 430: /* query_expression_body ::= query_expression_body UNION ALL query_expression_body */ -{ yylhsminor.yy636 = createSetOperator(pCxt, SET_OP_TYPE_UNION_ALL, yymsp[-3].minor.yy636, yymsp[0].minor.yy636); } - yymsp[-3].minor.yy636 = yylhsminor.yy636; + case 429: /* query_expression_body ::= query_expression_body UNION ALL query_expression_body */ +{ yylhsminor.yy632 = createSetOperator(pCxt, SET_OP_TYPE_UNION_ALL, yymsp[-3].minor.yy632, yymsp[0].minor.yy632); } + yymsp[-3].minor.yy632 = yylhsminor.yy632; break; - case 431: /* query_expression_body ::= query_expression_body UNION query_expression_body */ -{ yylhsminor.yy636 = createSetOperator(pCxt, SET_OP_TYPE_UNION, yymsp[-2].minor.yy636, yymsp[0].minor.yy636); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; + case 430: /* query_expression_body ::= query_expression_body UNION query_expression_body */ +{ yylhsminor.yy632 = createSetOperator(pCxt, SET_OP_TYPE_UNION, yymsp[-2].minor.yy632, yymsp[0].minor.yy632); } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; - case 433: /* query_primary ::= NK_LP query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt NK_RP */ -{ yymsp[-5].minor.yy636 = yymsp[-4].minor.yy636; } - yy_destructor(yypParser,353,&yymsp[-3].minor); - yy_destructor(yypParser,354,&yymsp[-2].minor); - yy_destructor(yypParser,355,&yymsp[-1].minor); + case 432: /* query_primary ::= NK_LP query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt NK_RP */ +{ yymsp[-5].minor.yy632 = yymsp[-4].minor.yy632; } + yy_destructor(yypParser,352,&yymsp[-3].minor); + yy_destructor(yypParser,353,&yymsp[-2].minor); + yy_destructor(yypParser,354,&yymsp[-1].minor); break; - case 437: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */ - case 441: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==441); -{ yymsp[-1].minor.yy636 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); } + case 436: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */ + case 440: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==440); +{ yymsp[-1].minor.yy632 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); } break; - case 438: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ - case 442: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==442); -{ yymsp[-3].minor.yy636 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); } + case 437: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ + case 441: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==441); +{ yymsp[-3].minor.yy632 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); } break; - case 439: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - case 443: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==443); -{ yymsp[-3].minor.yy636 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); } + case 438: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + case 442: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==442); +{ yymsp[-3].minor.yy632 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); } break; - case 444: /* subquery ::= NK_LP query_expression NK_RP */ -{ yylhsminor.yy636 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy636); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; + case 443: /* subquery ::= NK_LP query_expression NK_RP */ +{ yylhsminor.yy632 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy632); } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; - case 448: /* sort_specification ::= expression ordering_specification_opt null_ordering_opt */ -{ yylhsminor.yy636 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy636), yymsp[-1].minor.yy430, yymsp[0].minor.yy185); } - yymsp[-2].minor.yy636 = yylhsminor.yy636; + case 447: /* sort_specification ::= expression ordering_specification_opt null_ordering_opt */ +{ yylhsminor.yy632 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy632), yymsp[-1].minor.yy578, yymsp[0].minor.yy217); } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; - case 449: /* ordering_specification_opt ::= */ -{ yymsp[1].minor.yy430 = ORDER_ASC; } + case 448: /* ordering_specification_opt ::= */ +{ yymsp[1].minor.yy578 = ORDER_ASC; } break; - case 450: /* ordering_specification_opt ::= ASC */ -{ yymsp[0].minor.yy430 = ORDER_ASC; } + case 449: /* ordering_specification_opt ::= ASC */ +{ yymsp[0].minor.yy578 = ORDER_ASC; } break; - case 451: /* ordering_specification_opt ::= DESC */ -{ yymsp[0].minor.yy430 = ORDER_DESC; } + case 450: /* ordering_specification_opt ::= DESC */ +{ yymsp[0].minor.yy578 = ORDER_DESC; } break; - case 452: /* null_ordering_opt ::= */ -{ yymsp[1].minor.yy185 = NULL_ORDER_DEFAULT; } + case 451: /* null_ordering_opt ::= */ +{ yymsp[1].minor.yy217 = NULL_ORDER_DEFAULT; } break; - case 453: /* null_ordering_opt ::= NULLS FIRST */ -{ yymsp[-1].minor.yy185 = NULL_ORDER_FIRST; } + case 452: /* null_ordering_opt ::= NULLS FIRST */ +{ yymsp[-1].minor.yy217 = NULL_ORDER_FIRST; } break; - case 454: /* null_ordering_opt ::= NULLS LAST */ -{ yymsp[-1].minor.yy185 = NULL_ORDER_LAST; } + case 453: /* null_ordering_opt ::= NULLS LAST */ +{ yymsp[-1].minor.yy217 = NULL_ORDER_LAST; } break; default: break; From 7511bfbadaddc51121c031f4130b192f3987394e Mon Sep 17 00:00:00 2001 From: Xiaoyu Wang Date: Tue, 31 May 2022 15:13:57 +0800 Subject: [PATCH 28/56] fix: error in data precision of super table query --- source/libs/parser/test/parInitialCTest.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/source/libs/parser/test/parInitialCTest.cpp b/source/libs/parser/test/parInitialCTest.cpp index e55f36376c..51ea1bf5e3 100644 --- a/source/libs/parser/test/parInitialCTest.cpp +++ b/source/libs/parser/test/parInitialCTest.cpp @@ -298,14 +298,12 @@ TEST_F(ParserInitialCTest, createStable) { auto setCreateStbReqFunc = [&](const char* pTbname, int8_t igExists = 0, float xFilesFactor = TSDB_DEFAULT_ROLLUP_FILE_FACTOR, - int32_t delay = TSDB_DEFAULT_ROLLUP_DELAY, int32_t ttl = TSDB_DEFAULT_TABLE_TTL, - const char* pComment = nullptr) { + int32_t ttl = TSDB_DEFAULT_TABLE_TTL, const char* pComment = nullptr) { memset(&expect, 0, sizeof(SMCreateStbReq)); int32_t len = snprintf(expect.name, sizeof(expect.name), "0.test.%s", pTbname); expect.name[len] = '\0'; expect.igExists = igExists; expect.xFilesFactor = xFilesFactor; - expect.delay = delay; expect.ttl = ttl; if (nullptr != pComment) { expect.comment = strdup(pComment); @@ -393,7 +391,7 @@ TEST_F(ParserInitialCTest, createStable) { addFieldToCreateStbReqFunc(false, "id", TSDB_DATA_TYPE_INT); run("CREATE STABLE t1(ts TIMESTAMP, c1 INT) TAGS(id INT)"); - setCreateStbReqFunc("t1", 1, 0.1, 2, 100, "test create table"); + setCreateStbReqFunc("t1", 1, 0.1, 100, "test create table"); addFieldToCreateStbReqFunc(true, "ts", TSDB_DATA_TYPE_TIMESTAMP, 0, 0); addFieldToCreateStbReqFunc(true, "c1", TSDB_DATA_TYPE_INT); addFieldToCreateStbReqFunc(true, "c2", TSDB_DATA_TYPE_UINT); @@ -431,7 +429,7 @@ TEST_F(ParserInitialCTest, createStable) { "TAGS (a1 TIMESTAMP, a2 INT, a3 INT UNSIGNED, a4 BIGINT, a5 BIGINT UNSIGNED, a6 FLOAT, a7 DOUBLE, " "a8 BINARY(20), a9 SMALLINT, a10 SMALLINT UNSIGNED COMMENT 'test column comment', a11 TINYINT, " "a12 TINYINT UNSIGNED, a13 BOOL, a14 NCHAR(30), a15 VARCHAR(50)) " - "TTL 100 COMMENT 'test create table' SMA(c1, c2, c3) ROLLUP (MIN) FILE_FACTOR 0.1 DELAY 2"); + "TTL 100 COMMENT 'test create table' SMA(c1, c2, c3) ROLLUP (MIN) FILE_FACTOR 0.1"); } TEST_F(ParserInitialCTest, createStream) { From 0b99a1b3e05225d939777cea862df202cdafdf96 Mon Sep 17 00:00:00 2001 From: wade zhang <95411902+gccgdb1234@users.noreply.github.com> Date: Tue, 31 May 2022 15:16:10 +0800 Subject: [PATCH 29/56] Update 01-data-type.md --- docs-cn/12-taos-sql/01-data-type.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs-cn/12-taos-sql/01-data-type.md b/docs-cn/12-taos-sql/01-data-type.md index 50d59a3186..bdf20c7f1f 100644 --- a/docs-cn/12-taos-sql/01-data-type.md +++ b/docs-cn/12-taos-sql/01-data-type.md @@ -63,5 +63,5 @@ TDengine支持多个类型的常量,细节如下表: | 4 | 'abc' | BINARY | 单引号括住的内容为字符串字面值,其类型为BINARY,BINARY的size为实际的字符个数。对于字符串内的单引号,可以用转义字符反斜线加单引号来表示,即 \'。| | 5 | "abc" | BINARY | 双引号括住的内容为字符串字面值,其类型为BINARY,BINARY的size为实际的字符个数。对于字符串内的双引号,可以用转义字符反斜线加单引号来表示,即 \"。 | | 6 | TIMESTAMP {'literal' \| "literal"} | TIMESTAMP | TIMESTAMP关键字表示后面的字符串字面量需要被解释为TIMESTAMP类型。字符串需要满足YYYY-MM-DD HH:mm:ss.MS格式,其时间分辨率为当前数据库的时间分辨率。 | -| 7 | {TRUE | FALSE} | BOOL | 布尔类型字面量。 | +| 7 | {TRUE \| FALSE} | BOOL | 布尔类型字面量。 | | 8 | {'' \| "" \| '\t' \| "\t" \| ' ' \| " " \| NULL } | -- | 空值字面量。可以用于任意类型。| From dbda5c8b2e3df935c549471c3493845418bb7721 Mon Sep 17 00:00:00 2001 From: jiacy-jcy Date: Tue, 31 May 2022 15:38:20 +0800 Subject: [PATCH 30/56] update --- tests/system-test/2-query/stateduration.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/tests/system-test/2-query/stateduration.py b/tests/system-test/2-query/stateduration.py index 6689fab2c3..fa71009ef2 100644 --- a/tests/system-test/2-query/stateduration.py +++ b/tests/system-test/2-query/stateduration.py @@ -24,10 +24,6 @@ class TDTestCase: self.row_num = 10 def run(self): tdSql.prepare() - - - - # timestamp = 1ms , time_unit = 1s tdSql.execute('''create table test(ts timestamp, col1 tinyint, col2 smallint, col3 int, col4 bigint, col5 float, col6 double, col7 bool, col8 binary(20), col9 nchar(20), col11 tinyint unsigned, col12 smallint unsigned, col13 int unsigned, col14 bigint unsigned)''') From 48c15b18e8ffb823260f4fdbe59e5bd101a37148 Mon Sep 17 00:00:00 2001 From: jiacy-jcy Date: Tue, 31 May 2022 15:38:56 +0800 Subject: [PATCH 31/56] update --- tests/system-test/fulltest.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/system-test/fulltest.sh b/tests/system-test/fulltest.sh index 7b4908eba2..b33c4b14be 100644 --- a/tests/system-test/fulltest.sh +++ b/tests/system-test/fulltest.sh @@ -81,6 +81,7 @@ python3 ./test.py -f 2-query/diff.py python3 ./test.py -f 2-query/sample.py python3 ./test.py -f 2-query/function_diff.py python3 ./test.py -f 2-query/unique.py +python3 ./test.py -f 2-query/stateduration.py python3 ./test.py -f 7-tmq/basic5.py python3 ./test.py -f 7-tmq/subscribeDb.py From 85c2647b10b4858a4de5c64155b6bbdbb0e4a3ff Mon Sep 17 00:00:00 2001 From: gccgdb1234 Date: Tue, 31 May 2022 15:45:14 +0800 Subject: [PATCH 32/56] docs: refine data types for 3.0 in English --- docs-cn/12-taos-sql/01-data-type.md | 9 +++-- docs-en/12-taos-sql/01-data-type.md | 54 ++++++++++++++++++++--------- 2 files changed, 44 insertions(+), 19 deletions(-) diff --git a/docs-cn/12-taos-sql/01-data-type.md b/docs-cn/12-taos-sql/01-data-type.md index 50d59a3186..8ac6ee3b87 100644 --- a/docs-cn/12-taos-sql/01-data-type.md +++ b/docs-cn/12-taos-sql/01-data-type.md @@ -58,10 +58,15 @@ TDengine支持多个类型的常量,细节如下表: | # | **语法** | **类型** | **说明** | | --- | :-------: | --------- | -------------------------------------- | | 1 | [{+ \| -}]123 | BIGINT | 整型数值的字面量的类型均为BIGINT。如果用户输入超过了BIGINT的表示范围,TDengine 按BIGINT对数值进行截断。| -| 2 | 123.45 | DOUBLE | 浮点数值的字面量的类型均为DOUBLE。TDengine依据是否存在小数点,或使用科学计数法表示,来判断数值类型是否为整型或者浮点型,因此在使用时要注意相应类型越界的情况。例如,9999999999999999999会认为超过长整型的上边界而溢出,而9999999999999999999.0会被认为是有效的浮点数。| +| 2 | 123.45 | DOUBLE | 浮点数值的字面量的类型均为DOUBLE。TDengine依据是否存在小数点,或使用科学计数法表示,来判断数值类型是否为整型或者浮点型。| | 3 | 1.2E3 | DOUBLE | 科学计数法的字面量的类型为DOUBLE。| | 4 | 'abc' | BINARY | 单引号括住的内容为字符串字面值,其类型为BINARY,BINARY的size为实际的字符个数。对于字符串内的单引号,可以用转义字符反斜线加单引号来表示,即 \'。| | 5 | "abc" | BINARY | 双引号括住的内容为字符串字面值,其类型为BINARY,BINARY的size为实际的字符个数。对于字符串内的双引号,可以用转义字符反斜线加单引号来表示,即 \"。 | | 6 | TIMESTAMP {'literal' \| "literal"} | TIMESTAMP | TIMESTAMP关键字表示后面的字符串字面量需要被解释为TIMESTAMP类型。字符串需要满足YYYY-MM-DD HH:mm:ss.MS格式,其时间分辨率为当前数据库的时间分辨率。 | -| 7 | {TRUE | FALSE} | BOOL | 布尔类型字面量。 | +| 7 | {TRUE \| FALSE} | BOOL | 布尔类型字面量。 | | 8 | {'' \| "" \| '\t' \| "\t" \| ' ' \| " " \| NULL } | -- | 空值字面量。可以用于任意类型。| + +:::note +- TDengine依据是否存在小数点,或使用科学计数法表示,来判断数值类型是否为整型或者浮点型,因此在使用时要注意相应类型越界的情况。例如,9999999999999999999会认为超过长整型的上边界而溢出,而9999999999999999999.0会被认为是有效的浮点数。 + +::: diff --git a/docs-en/12-taos-sql/01-data-type.md b/docs-en/12-taos-sql/01-data-type.md index 3f5a49e313..d038219c8a 100644 --- a/docs-en/12-taos-sql/01-data-type.md +++ b/docs-en/12-taos-sql/01-data-type.md @@ -3,6 +3,8 @@ title: Data Types description: "TDengine supports a variety of data types including timestamp, float, JSON and many others." --- +## TIMESTAMP + When using TDengine to store and query data, the most important part of the data is timestamp. Timestamp must be specified when creating and inserting data rows. Timestamp must follow the rules below: - The format must be `YYYY-MM-DD HH:mm:ss.MS`, the default time precision is millisecond (ms), for example `2017-08-12 18:25:58.128` @@ -17,33 +19,51 @@ Time precision in TDengine can be set by the `PRECISION` parameter when executin CREATE DATABASE db_name PRECISION 'ns'; ``` +## Data Types + In TDengine, the data types below can be used when specifying a column or tag. | # | **type** | **Bytes** | **Description** | | --- | :-------: | --------- | ------------------------- | | 1 | TIMESTAMP | 8 | Default precision is millisecond, microsecond and nanosecond are also supported | -| 2 | INT | 4 | Integer, the value range is [-2^31+1, 2^31-1], while -2^31 is treated as NULL | -| 3 | BIGINT | 8 | Long integer, the value range is [-2^63+1, 2^63-1], while -2^63 is treated as NULL | -| 4 | FLOAT | 4 | Floating point number, the effective number of digits is 6-7, the value range is [-3.4E38, 3.4E38] | -| 5 | DOUBLE | 8 | Double precision floating point number, the effective number of digits is 15-16, the value range is [-1.7E308, 1.7E308] | -| 6 | BINARY | User Defined | Single-byte string for ASCII visible characters. Length must be specified when defining a column or tag of binary type. The string length can be up to 16374 bytes. The string value must be quoted with single quotes. The literal single quote inside the string must be preceded with back slash like `\'` | -| 7 | SMALLINT | 2 | Short integer, the value range is [-32767, 32767], while -32768 is treated as NULL | -| 8 | TINYINT | 1 | Single-byte integer, the value range is [-127, 127], while -128 is treated as NULL | -| 9 | BOOL | 1 | Bool, the value range is {true, false} | -| 10 | NCHAR | User Defined| Multi-Byte string that can include multi byte characters like Chinese characters. Each character of NCHAR type consumes 4 bytes storage. The string value should be quoted with single quotes. Literal single quote inside the string must be preceded with backslash, like `\’`. The length must be specified when defining a column or tag of NCHAR type, for example nchar(10) means it can store at most 10 characters of nchar type and will consume fixed storage of 40 bytes. An error will be reported if the string value exceeds the length defined. | -| 11 | JSON | | JSON type can only be used on tags. A tag of json type is excluded with any other tags of any other type | - -:::tip -TDengine is case insensitive and treats any characters in the sql command as lower case by default, case sensitive strings must be quoted with single quotes. - -::: +| 2 | INT | 4 | Integer, the value range is [-2^31, 2^31-1] | +| 3 |INT UNSIGNED|4 | Unsigned integer, the value range is [0, 2^31-1] | +| 4 | BIGINT | 8 | Long integer, the value range is [-2^63, 2^63-1] | +| 5 | BIGINT UNSIGNED | 8 | Unsigned long integer, the value range is [0, 2^63-1] | +| 6 | FLOAT | 4 | Floating point number, the effective number of digits is 6-7, the value range is [-3.4E38, 3.4E38] | +| 7 | DOUBLE | 8 | Double precision floating point number, the effective number of digits is 15-16, the value range is [-1.7E308, 1.7E308] | +| 8 | BINARY | User Defined | Single-byte string for ASCII visible characters. Length must be specified when defining a column or tag of binary type. The string length can be up to 16374 bytes. The string value must be quoted with single quotes. The literal single quote inside the string must be preceded with back slash like `\'` | +| 9 | SMALLINT | 2 | Short integer, the value range is [-32768, 32767] | +| 10 | SMALLINT UNSIGNED | 2 | Unsigned short integer, the value range is [0, 32767] | +| 11 | TINYINT | 1 | Single-byte integer, the value range is [-128, 127] | +| 12 | TINYINT UNSIGNED | 1 | Unsigned single-byte integer, the value range is [0, 127] | +| 13 | BOOL | 1 | Bool, the value range is {true, false} | +| 14 | NCHAR | User Defined| Multi-Byte string that can include multi byte characters like Chinese characters. Each character of NCHAR type consumes 4 bytes storage. The string value should be quoted with single quotes. Literal single quote inside the string must be preceded with backslash, like `\’`. The length must be specified when defining a column or tag of NCHAR type, for example nchar(10) means it can store at most 10 characters of nchar type and will consume fixed storage of 40 bytes. An error will be reported if the string value exceeds the length defined. | +| 15 | JSON | | JSON type can only be used on tags. A tag of json type is excluded with any other tags of any other type | +| 16 | VARCHAR | User Defined| Alias of BINARY type | :::note -Only ASCII visible characters are suggested to be used in a column or tag of BINARY type. Multi-byte characters must be stored in NCHAR type. +- TDengine is case insensitive and treats any characters in the sql command as lower case by default, case sensitive strings must be quoted with single quotes. +- Only ASCII visible characters are suggested to be used in a column or tag of BINARY type. Multi-byte characters must be stored in NCHAR type. +- Numeric values in SQL statements will be determined as integer or float type according to whether there is decimal point or whether scientific notation is used, so attention must be paid to avoid overflow. For example, 9999999999999999999 will be considered as overflow because it exceeds the upper limit of long integer, but 9999999999999999999.0 will be considered as a legal float number. ::: +## Constants +TDengine supports constants of multiple data type. + +| # | **Syntax** | **Type** | **Description** | +| --- | :-------: | --------- | -------------------------------------- | +| 1 | [{+ \| -}]123 | BIGINT | Numeric constants are treated as BIGINT type. The value will be truncated if it exceeds the range of BIGINT type. | +| 2 | 123.45 | DOUBLE | Floating number constants are treated as DOUBLE type. TDengine determines whether it's a floating number based on if decimal point or scientific notation is used. | +| 3 | 1.2E3 | DOUBLE | Constants in scientific notation are treated ad DOUBLE type. | +| 4 | 'abc' | BINARY | String constants enclosed by single quotes are treated as BINARY type. Its size is determined as the acutal length. Single quote itself can be included by preceding backslash, i.e. `\'`, in a string constant. | +| 5 | "abc" | BINARY | String constants enclosed by double quotes are treated as BINARY type. Its size is determined as the acutal length. Double quote itself can be included by preceding backslash, i.e. `\"`, in a string constant. | +| 6 | TIMESTAMP {'literal' \| "literal"} | TIMESTAMP | A string constant following `TIMESTAMP` keyword is treated as TIMESTAMP type. The string should be in the format of "YYYY-MM-DD HH:mm:ss.MS". Its time precision is same as that of the current database being used. | +| 7 | {TRUE \| FALSE} | BOOL | BOOL type contant. | +| 8 | {'' \| "" \| '\t' \| "\t" \| ' ' \| " " \| NULL } | -- | NULL constant, it can be used for any type.| + :::note -Numeric values in SQL statements will be determined as integer or float type according to whether there is decimal point or whether scientific notation is used, so attention must be paid to avoid overflow. For example, 9999999999999999999 will be considered as overflow because it exceeds the upper limit of long integer, but 9999999999999999999.0 will be considered as a legal float number. +- TDengine determines whether it's a floating number based on if decimal point or scientific notation is used. So whether the value is determined as overflow depends on both the value and the determined type. For example, 9999999999999999999 is determined as overflow because it exceeds the upper limit of BIGINT type, while 9999999999999999999.0 is considered as a valid floating number because it is within the range of DOUBLE type. ::: From 96a0555d1fd0b62decab68b3b1ba4d0b41ad7ca2 Mon Sep 17 00:00:00 2001 From: Xiaoyu Wang Date: Tue, 31 May 2022 15:49:14 +0800 Subject: [PATCH 33/56] fix: error in data precision of super table query --- source/libs/parser/test/parInitialCTest.cpp | 2 +- tests/script/tsim/insert/update0.sim | 2 +- tests/script/tsim/sma/rsmaCreateInsertQuery.sim | 2 +- tests/system-test/fulltest.sh | 4 +++- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/source/libs/parser/test/parInitialCTest.cpp b/source/libs/parser/test/parInitialCTest.cpp index 51ea1bf5e3..f8072c0792 100644 --- a/source/libs/parser/test/parInitialCTest.cpp +++ b/source/libs/parser/test/parInitialCTest.cpp @@ -462,7 +462,7 @@ TEST_F(ParserInitialCTest, createTable) { "TAGS (a1 TIMESTAMP, a2 INT, a3 INT UNSIGNED, a4 BIGINT, a5 BIGINT UNSIGNED, a6 FLOAT, a7 DOUBLE, a8 BINARY(20), " "a9 SMALLINT, a10 SMALLINT UNSIGNED COMMENT 'test column comment', a11 TINYINT, a12 TINYINT UNSIGNED, a13 BOOL, " "a14 NCHAR(30), a15 VARCHAR(50)) " - "TTL 100 COMMENT 'test create table' SMA(c1, c2, c3) ROLLUP (MIN) FILE_FACTOR 0.1 DELAY 2"); + "TTL 100 COMMENT 'test create table' SMA(c1, c2, c3) ROLLUP (MIN) FILE_FACTOR 0.1"); run("CREATE TABLE IF NOT EXISTS t1 USING st1 TAGS(1, 'wxy')"); diff --git a/tests/script/tsim/insert/update0.sim b/tests/script/tsim/insert/update0.sim index 3cb5e4008e..0ba3e98c91 100644 --- a/tests/script/tsim/insert/update0.sim +++ b/tests/script/tsim/insert/update0.sim @@ -9,7 +9,7 @@ sql create database d0 keep 365000d,365000d,365000d sql use d0 print =============== create super table and register rsma -sql create table if not exists stb (ts timestamp, c1 int) tags (city binary(20),district binary(20)) rollup(min) file_factor 0.1 delay 2; +sql create table if not exists stb (ts timestamp, c1 int) tags (city binary(20),district binary(20)) rollup(min) file_factor 0.1; sql show stables if $rows != 1 then diff --git a/tests/script/tsim/sma/rsmaCreateInsertQuery.sim b/tests/script/tsim/sma/rsmaCreateInsertQuery.sim index 5d9425e506..f929dda18c 100644 --- a/tests/script/tsim/sma/rsmaCreateInsertQuery.sim +++ b/tests/script/tsim/sma/rsmaCreateInsertQuery.sim @@ -9,7 +9,7 @@ sql create database d0 retentions 15s:7d,1m:21d,15m:365d; sql use d0 print =============== create super table and register rsma -sql create table if not exists stb (ts timestamp, c1 int) tags (city binary(20),district binary(20)) rollup(min) file_factor 0.1 delay 2; +sql create table if not exists stb (ts timestamp, c1 int) tags (city binary(20),district binary(20)) rollup(min) file_factor 0.1; sql show stables if $rows != 1 then diff --git a/tests/system-test/fulltest.sh b/tests/system-test/fulltest.sh index 2725cf3d13..a155515551 100644 --- a/tests/system-test/fulltest.sh +++ b/tests/system-test/fulltest.sh @@ -72,7 +72,9 @@ python3 ./test.py -f 2-query/arccos.py python3 ./test.py -f 2-query/arctan.py python3 ./test.py -f 2-query/query_cols_tags_and_or.py # python3 ./test.py -f 2-query/nestedQuery.py -python3 ./test.py -f 2-query/nestedQuery_str.py +# TD-15983 subquery output duplicate name column. +# Please Xiangyang Guo modify the following script +# python3 ./test.py -f 2-query/nestedQuery_str.py python3 ./test.py -f 2-query/avg.py python3 ./test.py -f 2-query/elapsed.py python3 ./test.py -f 2-query/csum.py From 1f833afebc7f899504a4fe3b9c6bf95a0f146d31 Mon Sep 17 00:00:00 2001 From: Hui Li <52318143+plum-lihui@users.noreply.github.com> Date: Tue, 31 May 2022 15:50:24 +0800 Subject: [PATCH 34/56] Delete insert.json test: no use --- tests/system-test/insert.json | 76 ----------------------------------- 1 file changed, 76 deletions(-) delete mode 100644 tests/system-test/insert.json diff --git a/tests/system-test/insert.json b/tests/system-test/insert.json deleted file mode 100644 index 5dea9eabfe..0000000000 --- a/tests/system-test/insert.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "filetype": "insert", - "cfgdir": "/etc/taos", - "host": "127.0.0.1", - "port": 6030, - "user": "root", - "password": "taosdata", - "thread_count": 16, - "create_table_thread_count": 1, - "result_file": "./insert_res.txt", - "confirm_parameter_prompt": "no", - "insert_interval": 0, - "interlace_rows": 0, - "num_of_records_per_req": 10000, - "prepared_rand": 10000, - "chinese": "no", - "databases": [ - { - "dbinfo": { - "name": "db", - "drop": "yes", - "vgroups":4, - "replica": 1, - "precision": "ms" - }, - "super_tables": [ - { - "name": "stb", - "child_table_exists": "no", - "childtable_count": 1000, - "childtable_prefix": "stb_", - "escape_character": "no", - "auto_create_table": "no", - "batch_create_tbl_num": 10, - "data_source": "rand", - "insert_mode": "taosc", - "non_stop_mode": "no", - "line_protocol": "line", - "insert_rows": 100000, - "interlace_rows": 0, - "insert_interval": 0, - "disorder_ratio": 0, - "timestamp_step": 1, - "start_timestamp": "2020-10-01 00:00:00.000", - "use_sample_ts": "no", - "tags_file": "", - "columns": [ - { - "type": "FLOAT", - "name": "current", - "count": 4, - "max": 12, - "min": 8 - }, - { "type": "INT", "name": "voltage", "max": 225, "min": 215 }, - { "type": "FLOAT", "name": "phase", "max": 1, "min": 0 } - ], - "tags": [ - { - "type": "TINYINT", - "name": "groupid", - "max": 10, - "min": 1 - }, - { - "name": "location", - "type": "BINARY", - "len": 16, - "values": ["beijing", "shanghai"] - } - ] - } - ] - } - ] -} From 6bf44b6aa26fc29ffe5fcfaf0c07ee3b8f212bbd Mon Sep 17 00:00:00 2001 From: gccgdb1234 Date: Tue, 31 May 2022 16:11:26 +0800 Subject: [PATCH 35/56] docs: refine keywords in 3.0 --- docs-cn/12-taos-sql/12-keywords/index.md | 6 +++--- docs-en/12-taos-sql/12-keywords.md | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs-cn/12-taos-sql/12-keywords/index.md b/docs-cn/12-taos-sql/12-keywords/index.md index 0b9ec4de86..c6640b2f92 100644 --- a/docs-cn/12-taos-sql/12-keywords/index.md +++ b/docs-cn/12-taos-sql/12-keywords/index.md @@ -86,7 +86,7 @@ title: TDengine 参数限制与保留关键字 | CONNS | ID | NOTNULL | STABLE | WAL | | COPY | IF | NOW | STABLES | WHERE | | _C0 | _QSTART | _QSTOP | _QDURATION | _WSTART | -| _WSTOP | _WDURATION | +| _WSTOP | _WDURATION | _ROWTS | ## 特殊说明 ### TBNAME @@ -124,5 +124,5 @@ Query OK, 1 row(s) in set (0.001091s) ### _WSTART/_WSTOP/_WDURATION 窗口切分聚合查询(例如 interval/session window/state window)中表示每个切分窗口的起始,结束以及持续时间(从 2.6.0.0 版本开始支持) -### _c0 -表示表或超级表的第一列 \ No newline at end of file +### _c0/_ROWTS +_c0 _ROWTS 等价,表示表或超级表的第一列 \ No newline at end of file diff --git a/docs-en/12-taos-sql/12-keywords.md b/docs-en/12-taos-sql/12-keywords.md index 56a82a02a1..cbacf6cfc7 100644 --- a/docs-en/12-taos-sql/12-keywords.md +++ b/docs-en/12-taos-sql/12-keywords.md @@ -47,11 +47,11 @@ There are about 200 keywords reserved by TDengine, they can't be used as the nam | CONNS | ID | NOTNULL | STable | WAL | | COPY | IF | NOW | STableS | WHERE | | _C0 | _QSTART | _QSTOP | _QDURATION | _WSTART | -| _WSTOP | _WDURATION | +| _WSTOP | _WDURATION | _ROWTS | ## Explanations ### TBNAME -`TBNAME` can be considered as a special tag, which represents the name of the subtable, in STable. +`TBNAME` can be considered as a special tag, which represents the name of the subtable, in a STable. Get the table name and tag values of all subtables in a STable. ```mysql @@ -85,5 +85,5 @@ The start, stop and duration of a query time window (Since version 2.6.0.0). ### _WSTART/_WSTOP/_WDURATION The start, stop and duration of aggegate query by time window, like interval, session window, state window (Since version 2.6.0.0). -### _c0 -The first column of a table or STable. \ No newline at end of file +### _c0/_ROWTS +_c0 is equal to _ROWTS, it means the first column of a table or STable. \ No newline at end of file From 901ff9bf18bbf28b2b79a33be2bf513cf3016463 Mon Sep 17 00:00:00 2001 From: 54liuyao <54liuyao@163.com> Date: Tue, 31 May 2022 15:31:28 +0800 Subject: [PATCH 36/56] feat(sma):files factor --- include/common/tmsg.h | 6 +- include/libs/nodes/cmdnodes.h | 2 +- include/libs/nodes/plannodes.h | 4 + include/libs/planner/planner.h | 1 + source/dnode/mnode/impl/inc/mndScheduler.h | 2 +- source/dnode/mnode/impl/src/mndScheduler.c | 3 +- source/dnode/mnode/impl/src/mndStb.c | 4 +- source/dnode/vnode/src/inc/vnodeInt.h | 2 +- source/dnode/vnode/src/sma/smaRollup.c | 6 +- source/dnode/vnode/src/vnd/vnodeSvr.c | 2 +- source/libs/executor/inc/executorimpl.h | 5 +- source/libs/executor/src/executorimpl.c | 33 ++++++- source/libs/executor/src/scanoperator.c | 12 ++- source/libs/executor/src/timewindowoperator.c | 44 +++++++--- source/libs/nodes/src/nodesCloneFuncs.c | 5 ++ source/libs/nodes/src/nodesCodeFuncs.c | 15 +++- source/libs/parser/src/parAstCreater.c | 2 +- source/libs/planner/src/planLogicCreater.c | 4 + source/libs/planner/src/planOptimizer.c | 4 +- source/libs/planner/src/planPhysiCreater.c | 2 + source/libs/stream/src/tstreamUpdate.c | 4 +- .../script/tsim/sma/tsmaCreateInsertData.sim | 2 +- tests/script/tsim/stream/session0.sim | 4 +- tests/script/tsim/stream/session1.sim | 6 +- tests/script/tsim/stream/triggerInterval0.sim | 88 ------------------- 25 files changed, 132 insertions(+), 130 deletions(-) diff --git a/include/common/tmsg.h b/include/common/tmsg.h index faf4addb4b..12d1c85879 100644 --- a/include/common/tmsg.h +++ b/include/common/tmsg.h @@ -1439,8 +1439,10 @@ typedef struct { int32_t code; } STaskDropRsp; -#define STREAM_TRIGGER_AT_ONCE 1 -#define STREAM_TRIGGER_WINDOW_CLOSE 2 +#define STREAM_TRIGGER_AT_ONCE_SMA 0 +#define STREAM_TRIGGER_AT_ONCE 1 +#define STREAM_TRIGGER_WINDOW_CLOSE 2 +#define STREAM_TRIGGER_WINDOW_CLOSE_SMA 3 typedef struct { char name[TSDB_TABLE_FNAME_LEN]; diff --git a/include/libs/nodes/cmdnodes.h b/include/libs/nodes/cmdnodes.h index 0bd6d73ce1..b437ad60b8 100644 --- a/include/libs/nodes/cmdnodes.h +++ b/include/libs/nodes/cmdnodes.h @@ -80,7 +80,7 @@ typedef struct SAlterDatabaseStmt { typedef struct STableOptions { ENodeType type; char comment[TSDB_TB_COMMENT_LEN]; - float filesFactor; + double filesFactor; SNodeList* pRollupFuncs; int32_t ttl; SNodeList* pSma; diff --git a/include/libs/nodes/plannodes.h b/include/libs/nodes/plannodes.h index 2648a468dd..44e7295b69 100644 --- a/include/libs/nodes/plannodes.h +++ b/include/libs/nodes/plannodes.h @@ -59,6 +59,7 @@ typedef struct SScanLogicNode { int8_t triggerType; int64_t watermark; int16_t tsColId; + double filesFactor; } SScanLogicNode; typedef struct SJoinLogicNode { @@ -113,6 +114,7 @@ typedef struct SWindowLogicNode { SNode* pStateExpr; int8_t triggerType; int64_t watermark; + double filesFactor; } SWindowLogicNode; typedef struct SFillLogicNode { @@ -222,6 +224,7 @@ typedef struct STableScanPhysiNode { int8_t triggerType; int64_t watermark; int16_t tsColId; + double filesFactor; } STableScanPhysiNode; typedef STableScanPhysiNode STableSeqScanPhysiNode; @@ -272,6 +275,7 @@ typedef struct SWinodwPhysiNode { SNode* pTspk; // timestamp primary key int8_t triggerType; int64_t watermark; + double filesFactor; } SWinodwPhysiNode; typedef struct SIntervalPhysiNode { diff --git a/include/libs/planner/planner.h b/include/libs/planner/planner.h index c4f71e57a8..6e14445ac7 100644 --- a/include/libs/planner/planner.h +++ b/include/libs/planner/planner.h @@ -36,6 +36,7 @@ typedef struct SPlanContext { int64_t watermark; char* pMsg; int32_t msgLen; + double filesFactor; } SPlanContext; // Create the physical plan for the query, according to the AST. diff --git a/source/dnode/mnode/impl/inc/mndScheduler.h b/source/dnode/mnode/impl/inc/mndScheduler.h index 9f4e377dd1..05aea3f68c 100644 --- a/source/dnode/mnode/impl/inc/mndScheduler.h +++ b/source/dnode/mnode/impl/inc/mndScheduler.h @@ -30,7 +30,7 @@ int32_t mndSchedInitSubEp(SMnode* pMnode, const SMqTopicObj* pTopic, SMqSubscrib int32_t mndScheduleStream(SMnode* pMnode, STrans* pTrans, SStreamObj* pStream); int32_t mndConvertRSmaTask(const char* ast, int64_t uid, int8_t triggerType, int64_t watermark, char** pStr, - int32_t* pLen); + int32_t* pLen, double filesFactor); #ifdef __cplusplus } diff --git a/source/dnode/mnode/impl/src/mndScheduler.c b/source/dnode/mnode/impl/src/mndScheduler.c index d1404b96fe..eb8d2f0752 100644 --- a/source/dnode/mnode/impl/src/mndScheduler.c +++ b/source/dnode/mnode/impl/src/mndScheduler.c @@ -36,7 +36,7 @@ extern bool tsStreamSchedV; int32_t mndConvertRSmaTask(const char* ast, int64_t uid, int8_t triggerType, int64_t watermark, char** pStr, - int32_t* pLen) { + int32_t* pLen, double filesFactor) { SNode* pAst = NULL; SQueryPlan* pPlan = NULL; terrno = TSDB_CODE_SUCCESS; @@ -58,6 +58,7 @@ int32_t mndConvertRSmaTask(const char* ast, int64_t uid, int8_t triggerType, int .rSmaQuery = true, .triggerType = triggerType, .watermark = watermark, + .filesFactor = filesFactor, }; if (qCreateQueryPlan(&cxt, &pPlan, NULL) < 0) { terrno = TSDB_CODE_QRY_INVALID_INPUT; diff --git a/source/dnode/mnode/impl/src/mndStb.c b/source/dnode/mnode/impl/src/mndStb.c index b33c09a0f9..d436b684ad 100644 --- a/source/dnode/mnode/impl/src/mndStb.c +++ b/source/dnode/mnode/impl/src/mndStb.c @@ -397,13 +397,13 @@ static void *mndBuildVCreateStbReq(SMnode *pMnode, SVgObj *pVgroup, SStbObj *pSt req.pRSmaParam.xFilesFactor = pStb->xFilesFactor; req.pRSmaParam.delay = pStb->delay; if (pStb->ast1Len > 0) { - if (mndConvertRSmaTask(pStb->pAst1, pStb->uid, 0, 0, &req.pRSmaParam.qmsg1, &req.pRSmaParam.qmsg1Len) != + if (mndConvertRSmaTask(pStb->pAst1, pStb->uid, 0, 0, &req.pRSmaParam.qmsg1, &req.pRSmaParam.qmsg1Len, req.pRSmaParam.xFilesFactor) != TSDB_CODE_SUCCESS) { return NULL; } } if (pStb->ast2Len > 0) { - if (mndConvertRSmaTask(pStb->pAst2, pStb->uid, 0, 0, &req.pRSmaParam.qmsg2, &req.pRSmaParam.qmsg2Len) != + if (mndConvertRSmaTask(pStb->pAst2, pStb->uid, 0, 0, &req.pRSmaParam.qmsg2, &req.pRSmaParam.qmsg2Len, req.pRSmaParam.xFilesFactor) != TSDB_CODE_SUCCESS) { return NULL; } diff --git a/source/dnode/vnode/src/inc/vnodeInt.h b/source/dnode/vnode/src/inc/vnodeInt.h index 0e67d9e426..e3a0c94ccc 100644 --- a/source/dnode/vnode/src/inc/vnodeInt.h +++ b/source/dnode/vnode/src/inc/vnodeInt.h @@ -149,7 +149,7 @@ int32_t tdUpdateExpireWindow(SSma* pSma, SSubmitReq* pMsg, int64_t version); int32_t tdProcessTSmaCreate(SSma* pSma, int64_t version, const char* msg); int32_t tdProcessTSmaInsert(SSma* pSma, int64_t indexUid, const char* msg); -int32_t tdProcessRSmaCreate(SSma* pSma, SMeta* pMeta, SVCreateStbReq* pReq, SMsgCb* pMsgCb); +int32_t tdProcessRSmaCreate(SVnode *pVnode, SVCreateStbReq* pReq); int32_t tdProcessRSmaSubmit(SSma* pSma, void* pMsg, int32_t inputType); int32_t tdFetchTbUidList(SSma* pSma, STbUidStore** ppStore, tb_uid_t suid, tb_uid_t uid); int32_t tdUpdateTbUidList(SSma* pSma, STbUidStore* pUidStore); diff --git a/source/dnode/vnode/src/sma/smaRollup.c b/source/dnode/vnode/src/sma/smaRollup.c index 0769da12bc..a1e397f11d 100644 --- a/source/dnode/vnode/src/sma/smaRollup.c +++ b/source/dnode/vnode/src/sma/smaRollup.c @@ -165,7 +165,10 @@ int32_t tdFetchTbUidList(SSma *pSma, STbUidStore **ppStore, tb_uid_t suid, tb_ui * @param pReq * @return int32_t */ -int32_t tdProcessRSmaCreate(SSma *pSma, SMeta *pMeta, SVCreateStbReq *pReq, SMsgCb *pMsgCb) { +int32_t tdProcessRSmaCreate(SVnode *pVnode, SVCreateStbReq *pReq) { + SSma *pSma = pVnode->pSma; + SMeta *pMeta = pVnode->pMeta; + SMsgCb *pMsgCb = &pVnode->msgCb; if (!pReq->rollup) { smaTrace("vgId:%d return directly since no rollup for stable %s %" PRIi64, SMA_VID(pSma), pReq->name, pReq->suid); return TSDB_CODE_SUCCESS; @@ -210,6 +213,7 @@ int32_t tdProcessRSmaCreate(SSma *pSma, SMeta *pMeta, SVCreateStbReq *pReq, SMsg .reader = pReadHandle, .meta = pMeta, .pMsgCb = pMsgCb, + .vnode = pVnode, }; if (param->qmsg1) { diff --git a/source/dnode/vnode/src/vnd/vnodeSvr.c b/source/dnode/vnode/src/vnd/vnodeSvr.c index 74b6982008..4b237bc703 100644 --- a/source/dnode/vnode/src/vnd/vnodeSvr.c +++ b/source/dnode/vnode/src/vnd/vnodeSvr.c @@ -360,7 +360,7 @@ static int vnodeProcessCreateStbReq(SVnode *pVnode, int64_t version, void *pReq, goto _err; } - tdProcessRSmaCreate(pVnode->pSma, pVnode->pMeta, &req, &pVnode->msgCb); + tdProcessRSmaCreate(pVnode, &req); tDecoderClear(&coder); return 0; diff --git a/source/libs/executor/inc/executorimpl.h b/source/libs/executor/inc/executorimpl.h index cb45fa9730..8139e71f63 100644 --- a/source/libs/executor/inc/executorimpl.h +++ b/source/libs/executor/inc/executorimpl.h @@ -440,6 +440,7 @@ typedef struct STimeWindowSupp { int64_t waterMark; TSKEY maxTs; SColumnInfoData timeWindowData; // query time window info for scalar function execution. + SHashObj *winMap; } STimeWindowAggSupp; typedef struct SIntervalAggOperatorInfo { @@ -758,7 +759,7 @@ SOperatorInfo* createDataBlockInfoScanOperator(void* dataReader, SExecTaskInfo* SOperatorInfo* createStreamScanOperatorInfo(void* pDataReader, SReadHandle* pHandle, SArray* pTableIdList, STableScanPhysiNode* pTableScanNode, SExecTaskInfo* pTaskInfo, - STimeWindowAggSupp* pTwSup, int16_t tsColId); + STimeWindowAggSupp* pTwSup); SOperatorInfo* createFillOperatorInfo(SOperatorInfo* downstream, SExprInfo* pExpr, int32_t numOfCols, @@ -837,6 +838,8 @@ SResultWindowInfo* getSessionTimeWindow(SArray* pWinInfos, TSKEY ts, int64_t gap int32_t updateSessionWindowInfo(SResultWindowInfo* pWinInfo, TSKEY* pTs, int32_t rows, int32_t start, int64_t gap, SHashObj* pStDeleted); bool functionNeedToExecute(SqlFunctionCtx* pCtx); +int64_t getSmaWaterMark(int64_t interval, double filesFactor); +bool isSmaStream(int8_t triggerType); int32_t compareTimeWindow(const void* p1, const void* p2, const void* param); #ifdef __cplusplus diff --git a/source/libs/executor/src/executorimpl.c b/source/libs/executor/src/executorimpl.c index e7de886b03..7786ae009a 100644 --- a/source/libs/executor/src/executorimpl.c +++ b/source/libs/executor/src/executorimpl.c @@ -4529,8 +4529,8 @@ SOperatorInfo* createOperatorTree(SPhysiNode* pPhyNode, SExecTaskInfo* pTaskInfo qDebug("%s pDataReader is not NULL", GET_TASKID(pTaskInfo)); } SArray* tableIdList = extractTableIdList(pTableListInfo); - SOperatorInfo* pOperator = createStreamScanOperatorInfo(pDataReader, pHandle, tableIdList, pTableScanNode, - pTaskInfo, &twSup, pTableScanNode->tsColId); + SOperatorInfo* pOperator = createStreamScanOperatorInfo(pDataReader, pHandle, + tableIdList, pTableScanNode, pTaskInfo, &twSup); taosArrayDestroy(tableIdList); return pOperator; @@ -4631,7 +4631,19 @@ SOperatorInfo* createOperatorTree(SPhysiNode* pPhyNode, SExecTaskInfo* pTaskInfo STimeWindowAggSupp as = {.waterMark = pIntervalPhyNode->window.watermark, .calTrigger = pIntervalPhyNode->window.triggerType, - .maxTs = INT64_MIN}; + .maxTs = INT64_MIN, + .winMap = NULL,}; + if (isSmaStream(pIntervalPhyNode->window.triggerType)) { + if (FLT_LESS(pIntervalPhyNode->window.filesFactor, 1.000000)) { + as.calTrigger = STREAM_TRIGGER_AT_ONCE_SMA; + } else { + _hash_fn_t hashFn = taosGetDefaultHashFunction(TSDB_DATA_TYPE_TIMESTAMP); + as.winMap = taosHashInit(64, hashFn, true, HASH_NO_LOCK); + as.waterMark = getSmaWaterMark(interval.interval, + pIntervalPhyNode->window.filesFactor); + as.calTrigger = STREAM_TRIGGER_WINDOW_CLOSE_SMA; + } + } int32_t tsSlotId = ((SColumnNode*)pIntervalPhyNode->window.pTspk)->slotId; pOptr = createIntervalOperatorInfo(ops[0], pExprInfo, num, pResBlock, &interval, tsSlotId, &as, pTaskInfo); @@ -5300,3 +5312,18 @@ int32_t initStreamAggSupporter(SStreamAggSupporter* pSup, const char* pKey) { } return createDiskbasedBuf(&pSup->pResultBuf, pageSize, bufSize, pKey, TD_TMP_DIR_PATH); } + +int64_t getSmaWaterMark(int64_t interval, double filesFactor) { + int64_t waterMark = 0; + ASSERT(FLT_GREATEREQUAL(filesFactor,0.000000)); + waterMark = -1 * filesFactor; + return waterMark; +} + +bool isSmaStream(int8_t triggerType) { + if (triggerType == STREAM_TRIGGER_AT_ONCE || + triggerType == STREAM_TRIGGER_WINDOW_CLOSE) { + return false; + } + return true; +} diff --git a/source/libs/executor/src/scanoperator.c b/source/libs/executor/src/scanoperator.c index b954eb3a22..3e14589faa 100644 --- a/source/libs/executor/src/scanoperator.c +++ b/source/libs/executor/src/scanoperator.c @@ -875,7 +875,7 @@ static SSDataBlock* doStreamBlockScan(SOperatorInfo* pOperator) { if (rows == 0) { pOperator->status = OP_EXEC_DONE; } else if (pInfo->pUpdateInfo) { - SSDataBlock* upRes = getUpdateDataBlock(pInfo, true); // TODO(liuyao) get invertible from plan + SSDataBlock* upRes = getUpdateDataBlock(pInfo, true); if (upRes) { pInfo->pUpdateRes = upRes; if (upRes->info.type == STREAM_REPROCESS) { @@ -894,7 +894,7 @@ static SSDataBlock* doStreamBlockScan(SOperatorInfo* pOperator) { SOperatorInfo* createStreamScanOperatorInfo(void* pDataReader, SReadHandle* pHandle, SArray* pTableIdList, STableScanPhysiNode* pTableScanNode, SExecTaskInfo* pTaskInfo, - STimeWindowAggSupp* pTwSup, int16_t tsColId) { + STimeWindowAggSupp* pTwSup) { SStreamBlockScanInfo* pInfo = taosMemoryCalloc(1, sizeof(SStreamBlockScanInfo)); SOperatorInfo* pOperator = taosMemoryCalloc(1, sizeof(SOperatorInfo)); if (pInfo == NULL || pOperator == NULL) { @@ -939,8 +939,12 @@ SOperatorInfo* createStreamScanOperatorInfo(void* pDataReader, SReadHandle* pHan goto _error; } - pInfo->primaryTsIndex = tsColId; - if (pSTInfo->interval.interval > 0) { + if (isSmaStream(pTableScanNode->triggerType)) { + pTwSup->waterMark = getSmaWaterMark(pSTInfo->interval.interval, + pTableScanNode->filesFactor); + } + pInfo->primaryTsIndex = 0; // pTableScanNode->tsColId; + if (pSTInfo->interval.interval > 0 && pDataReader) { pInfo->pUpdateInfo = updateInfoInitP(&pSTInfo->interval, pTwSup->waterMark); } else { pInfo->pUpdateInfo = NULL; diff --git a/source/libs/executor/src/timewindowoperator.c b/source/libs/executor/src/timewindowoperator.c index 9b8c2f75ba..14344daf81 100644 --- a/source/libs/executor/src/timewindowoperator.c +++ b/source/libs/executor/src/timewindowoperator.c @@ -748,10 +748,14 @@ static void hashIntervalAgg(SOperatorInfo* pOperatorInfo, SResultRowInfo* pResul longjmp(pTaskInfo->env, TSDB_CODE_QRY_OUT_OF_MEMORY); } - if (pInfo->execModel == OPTR_EXEC_MODEL_STREAM && - (pInfo->twAggSup.calTrigger == STREAM_TRIGGER_AT_ONCE || - pInfo->twAggSup.calTrigger == 0) ) { - saveResult(pResult, tableGroupId, pUpdated); + if (pInfo->execModel == OPTR_EXEC_MODEL_STREAM) { + if (pInfo->twAggSup.calTrigger == STREAM_TRIGGER_AT_ONCE || + pInfo->twAggSup.calTrigger == STREAM_TRIGGER_AT_ONCE_SMA) { + saveResult(pResult, tableGroupId, pUpdated); + } + if (pInfo->twAggSup.winMap) { + taosHashRemove(pInfo->twAggSup.winMap, &win.skey, sizeof(TSKEY)); + } } int32_t forwardStep = 0; @@ -824,10 +828,14 @@ static void hashIntervalAgg(SOperatorInfo* pOperatorInfo, SResultRowInfo* pResul longjmp(pTaskInfo->env, TSDB_CODE_QRY_OUT_OF_MEMORY); } - if (pInfo->execModel == OPTR_EXEC_MODEL_STREAM && - (pInfo->twAggSup.calTrigger == STREAM_TRIGGER_AT_ONCE || - pInfo->twAggSup.calTrigger == 0) ) { - saveResult(pResult, tableGroupId, pUpdated); + if (pInfo->execModel == OPTR_EXEC_MODEL_STREAM) { + if (pInfo->twAggSup.calTrigger == STREAM_TRIGGER_AT_ONCE || + pInfo->twAggSup.calTrigger == STREAM_TRIGGER_AT_ONCE_SMA) { + saveResult(pResult, tableGroupId, pUpdated); + } + if (pInfo->twAggSup.winMap) { + taosHashRemove(pInfo->twAggSup.winMap, &win.skey, sizeof(TSKEY)); + } } ekey = ascScan? nextWin.ekey:nextWin.skey; @@ -1172,15 +1180,23 @@ static int32_t closeIntervalWindow(SHashObj *pHashMap, STimeWindowAggSupp *pSup, void* key = taosHashGetKey(pIte, &keyLen); uint64_t groupId = *(uint64_t*) key; ASSERT(keyLen == GET_RES_WINDOW_KEY_LEN(sizeof(TSKEY))); - TSKEY ts = *(uint64_t*) ((char*)key + sizeof(uint64_t)); + TSKEY ts = *(int64_t*) ((char*)key + sizeof(uint64_t)); SResultRowInfo dumyInfo; dumyInfo.cur.pageId = -1; STimeWindow win = getActiveTimeWindow(NULL, &dumyInfo, ts, pInterval, pInterval->precision, NULL); if (win.ekey < pSup->maxTs - pSup->waterMark) { + if (pSup->calTrigger == STREAM_TRIGGER_WINDOW_CLOSE_SMA) { + if (taosHashGet(pSup->winMap, &win.skey, sizeof(TSKEY))) { + continue; + } + } char keyBuf[GET_RES_WINDOW_KEY_LEN(sizeof(TSKEY))]; SET_RES_WINDOW_KEY(keyBuf, &ts, sizeof(TSKEY), groupId); - taosHashRemove(pHashMap, keyBuf, keyLen); + if (pSup->calTrigger != STREAM_TRIGGER_AT_ONCE_SMA && + pSup->calTrigger != STREAM_TRIGGER_WINDOW_CLOSE_SMA) { + taosHashRemove(pHashMap, keyBuf, keyLen); + } SResKeyPos* pos = taosMemoryMalloc(sizeof(SResKeyPos) + sizeof(uint64_t)); if (pos == NULL) { return TSDB_CODE_OUT_OF_MEMORY; @@ -1192,6 +1208,7 @@ static int32_t closeIntervalWindow(SHashObj *pHashMap, STimeWindowAggSupp *pSup, taosMemoryFree(pos); return TSDB_CODE_OUT_OF_MEMORY; } + taosHashPut(pSup->winMap, &win.skey, sizeof(TSKEY), NULL, 0); } } return TSDB_CODE_SUCCESS; @@ -1248,7 +1265,8 @@ static SSDataBlock* doStreamIntervalAgg(SOperatorInfo* pOperator) { &pInfo->interval, pClosed); finalizeUpdatedResult(pOperator->numOfExprs, pInfo->aggSup.pResultBuf, pClosed, pInfo->binfo.rowCellInfoOffset); - if (pInfo->twAggSup.calTrigger == STREAM_TRIGGER__WINDOW_CLOSE) { + if (pInfo->twAggSup.calTrigger == STREAM_TRIGGER_WINDOW_CLOSE || + pInfo->twAggSup.calTrigger == STREAM_TRIGGER_WINDOW_CLOSE_SMA) { taosArrayAddAll(pUpdated, pClosed); } taosArrayDestroy(pClosed); @@ -2412,7 +2430,7 @@ int32_t closeSessionWindow(SArray *pWins, STimeWindowAggSupp *pTwSup, SArray *pC return TSDB_CODE_OUT_OF_MEMORY; } pSeWin->isClosed = true; - if (calTrigger == STREAM_TRIGGER__WINDOW_CLOSE) { + if (calTrigger == STREAM_TRIGGER_WINDOW_CLOSE) { pSeWin->isOutput = true; } } @@ -2486,7 +2504,7 @@ static SSDataBlock* doStreamSessionWindowAgg(SOperatorInfo* pOperator) { SArray* pUpdated = taosArrayInit(16, POINTER_BYTES); copyUpdateResult(pStUpdated, pUpdated, pBInfo->pRes->info.groupId); taosHashCleanup(pStUpdated); - if (pInfo->twAggSup.calTrigger == STREAM_TRIGGER__WINDOW_CLOSE) { + if (pInfo->twAggSup.calTrigger == STREAM_TRIGGER_WINDOW_CLOSE) { taosArrayAddAll(pUpdated, pClosed); } diff --git a/source/libs/nodes/src/nodesCloneFuncs.c b/source/libs/nodes/src/nodesCloneFuncs.c index 84b5e0a043..cb4a4f104c 100644 --- a/source/libs/nodes/src/nodesCloneFuncs.c +++ b/source/libs/nodes/src/nodesCloneFuncs.c @@ -329,6 +329,10 @@ static SNode* logicScanCopy(const SScanLogicNode* pSrc, SScanLogicNode* pDst) { COPY_SCALAR_FIELD(intervalUnit); COPY_SCALAR_FIELD(slidingUnit); CLONE_NODE_FIELD(pTagCond); + COPY_SCALAR_FIELD(triggerType); + COPY_SCALAR_FIELD(watermark); + COPY_SCALAR_FIELD(tsColId); + COPY_SCALAR_FIELD(filesFactor); return (SNode*)pDst; } @@ -385,6 +389,7 @@ static SNode* logicWindowCopy(const SWindowLogicNode* pSrc, SWindowLogicNode* pD CLONE_NODE_FIELD(pStateExpr); COPY_SCALAR_FIELD(triggerType); COPY_SCALAR_FIELD(watermark); + COPY_SCALAR_FIELD(filesFactor); return (SNode*)pDst; } diff --git a/source/libs/nodes/src/nodesCodeFuncs.c b/source/libs/nodes/src/nodesCodeFuncs.c index 78710569cb..4b62963ac6 100644 --- a/source/libs/nodes/src/nodesCodeFuncs.c +++ b/source/libs/nodes/src/nodesCodeFuncs.c @@ -1133,6 +1133,7 @@ static const char* jkTableScanPhysiPlanSlidingUnit = "slidingUnit"; static const char* jkTableScanPhysiPlanTriggerType = "triggerType"; static const char* jkTableScanPhysiPlanWatermark = "watermark"; static const char* jkTableScanPhysiPlanTsColId = "tsColId"; +static const char* jkTableScanPhysiPlanFilesFactor = "FilesFactor"; static int32_t physiTableScanNodeToJson(const void* pObj, SJson* pJson) { const STableScanPhysiNode* pNode = (const STableScanPhysiNode*)pObj; @@ -1183,6 +1184,9 @@ static int32_t physiTableScanNodeToJson(const void* pObj, SJson* pJson) { if (TSDB_CODE_SUCCESS == code) { code = tjsonAddIntegerToObject(pJson, jkTableScanPhysiPlanTsColId, pNode->tsColId); } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddDoubleToObject(pJson, jkTableScanPhysiPlanFilesFactor, pNode->filesFactor); + } return code; } @@ -1242,7 +1246,9 @@ static int32_t jsonToPhysiTableScanNode(const SJson* pJson, void* pObj) { if (TSDB_CODE_SUCCESS == code) { tjsonGetNumberValue(pJson, jkTableScanPhysiPlanTsColId, pNode->tsColId, code); } - + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetDoubleValue(pJson, jkTableScanPhysiPlanFilesFactor, &pNode->filesFactor); + } return code; } @@ -1496,6 +1502,7 @@ static const char* jkWindowPhysiPlanFuncs = "Funcs"; static const char* jkWindowPhysiPlanTsPk = "TsPk"; static const char* jkWindowPhysiPlanTriggerType = "TriggerType"; static const char* jkWindowPhysiPlanWatermark = "Watermark"; +static const char* jkWindowPhysiPlanFilesFactor = "FilesFactor"; static int32_t physiWindowNodeToJson(const void* pObj, SJson* pJson) { const SWinodwPhysiNode* pNode = (const SWinodwPhysiNode*)pObj; @@ -1516,6 +1523,9 @@ static int32_t physiWindowNodeToJson(const void* pObj, SJson* pJson) { if (TSDB_CODE_SUCCESS == code) { code = tjsonAddIntegerToObject(pJson, jkWindowPhysiPlanWatermark, pNode->watermark); } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddDoubleToObject(pJson, jkWindowPhysiPlanFilesFactor, pNode->filesFactor); + } return code; } @@ -1541,6 +1551,9 @@ static int32_t jsonToPhysiWindowNode(const SJson* pJson, void* pObj) { tjsonGetNumberValue(pJson, jkWindowPhysiPlanWatermark, pNode->watermark, code); ; } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetDoubleValue(pJson, jkWindowPhysiPlanFilesFactor, &pNode->filesFactor); + } return code; } diff --git a/source/libs/parser/src/parAstCreater.c b/source/libs/parser/src/parAstCreater.c index 4380e28727..eb51830d61 100644 --- a/source/libs/parser/src/parAstCreater.c +++ b/source/libs/parser/src/parAstCreater.c @@ -881,7 +881,7 @@ SNode* setTableOption(SAstCreateContext* pCxt, SNode* pOptions, ETableOptionType } break; case TABLE_OPTION_FILE_FACTOR: - ((STableOptions*)pOptions)->filesFactor = taosStr2Float(((SToken*)pVal)->z, NULL); + ((STableOptions*)pOptions)->filesFactor = taosStr2Double(((SToken*)pVal)->z, NULL); break; case TABLE_OPTION_ROLLUP: ((STableOptions*)pOptions)->pRollupFuncs = pVal; diff --git a/source/libs/planner/src/planLogicCreater.c b/source/libs/planner/src/planLogicCreater.c index 2df248e53f..eae8799b04 100644 --- a/source/libs/planner/src/planLogicCreater.c +++ b/source/libs/planner/src/planLogicCreater.c @@ -487,6 +487,10 @@ static int32_t createWindowLogicNodeFinalize(SLogicPlanContext* pCxt, SSelectStm pWindow->watermark = pCxt->pPlanCxt->watermark; } + if (pCxt->pPlanCxt->rSmaQuery) { + pWindow->filesFactor = pCxt->pPlanCxt->filesFactor; + } + if (TSDB_CODE_SUCCESS == code) { code = rewriteExprForSelect(pWindow->pFuncs, pSelect, SQL_CLAUSE_WINDOW); } diff --git a/source/libs/planner/src/planOptimizer.c b/source/libs/planner/src/planOptimizer.c index adc07fcd0d..5f88fc40e5 100644 --- a/source/libs/planner/src/planOptimizer.c +++ b/source/libs/planner/src/planOptimizer.c @@ -99,7 +99,8 @@ static bool osdMayBeOptimized(SLogicNode* pNode) { return false; } // todo: release after function splitting - if (TSDB_SUPER_TABLE == ((SScanLogicNode*)pNode)->pMeta->tableType) { + if (TSDB_SUPER_TABLE == ((SScanLogicNode*)pNode)->pMeta->tableType && + SCAN_TYPE_STREAM != ((SScanLogicNode*)pNode)->scanType) { return false; } if (NULL == pNode->pParent || (QUERY_NODE_LOGIC_PLAN_WINDOW != nodeType(pNode->pParent) && @@ -226,6 +227,7 @@ static void setScanWindowInfo(SScanLogicNode* pScan) { pScan->triggerType = ((SWindowLogicNode*)pScan->node.pParent)->triggerType; pScan->watermark = ((SWindowLogicNode*)pScan->node.pParent)->watermark; pScan->tsColId = ((SColumnNode*)((SWindowLogicNode*)pScan->node.pParent)->pTspk)->colId; + pScan->filesFactor = ((SWindowLogicNode*)pScan->node.pParent)->filesFactor; } } diff --git a/source/libs/planner/src/planPhysiCreater.c b/source/libs/planner/src/planPhysiCreater.c index a45eabefb9..62fde889da 100644 --- a/source/libs/planner/src/planPhysiCreater.c +++ b/source/libs/planner/src/planPhysiCreater.c @@ -506,6 +506,7 @@ static int32_t createTableScanPhysiNode(SPhysiPlanContext* pCxt, SSubplan* pSubp pTableScan->triggerType = pScanLogicNode->triggerType; pTableScan->watermark = pScanLogicNode->watermark; pTableScan->tsColId = pScanLogicNode->tsColId; + pTableScan->filesFactor = pScanLogicNode->filesFactor; return createScanPhysiNodeFinalize(pCxt, pSubplan, pScanLogicNode, (SScanPhysiNode*)pTableScan, pPhyNode); } @@ -917,6 +918,7 @@ static int32_t createWindowPhysiNodeFinalize(SPhysiPlanContext* pCxt, SNodeList* pWindow->triggerType = pWindowLogicNode->triggerType; pWindow->watermark = pWindowLogicNode->watermark; + pWindow->filesFactor = pWindowLogicNode->filesFactor; if (TSDB_CODE_SUCCESS == code) { *pPhyNode = (SPhysiNode*)pWindow; diff --git a/source/libs/stream/src/tstreamUpdate.c b/source/libs/stream/src/tstreamUpdate.c index 7587fcecc9..6935355a93 100644 --- a/source/libs/stream/src/tstreamUpdate.c +++ b/source/libs/stream/src/tstreamUpdate.c @@ -73,8 +73,8 @@ static int64_t adjustInterval(int64_t interval, int32_t precision) { } static int64_t adjustWatermark(int64_t adjInterval, int64_t originInt, int64_t watermark) { - if (watermark <= 0) { - watermark = TMIN(originInt/adjInterval, 1) * adjInterval; + if (watermark <= adjInterval) { + watermark = TMAX(originInt/adjInterval, 1) * adjInterval; } else if (watermark > MAX_NUM_SCALABLE_BF * adjInterval) { watermark = MAX_NUM_SCALABLE_BF * adjInterval; }/* else if (watermark < MIN_NUM_SCALABLE_BF * adjInterval) { diff --git a/tests/script/tsim/sma/tsmaCreateInsertData.sim b/tests/script/tsim/sma/tsmaCreateInsertData.sim index 07c5adef5d..0202c53800 100644 --- a/tests/script/tsim/sma/tsmaCreateInsertData.sim +++ b/tests/script/tsim/sma/tsmaCreateInsertData.sim @@ -5,7 +5,7 @@ sleep 50 sql connect print =============== create database -sql create database d1 +sql create database d1 vgroups 1 sql use d1 print =============== create super table, include column type for count/sum/min/max/first diff --git a/tests/script/tsim/stream/session0.sim b/tests/script/tsim/stream/session0.sim index 46b343632a..41a8b33710 100644 --- a/tests/script/tsim/stream/session0.sim +++ b/tests/script/tsim/stream/session0.sim @@ -23,7 +23,7 @@ sql insert into t1 values(1648791223001,10,2,3,1.1,2); sql insert into t1 values(1648791233002,3,2,3,2.1,3); sql insert into t1 values(1648791243003,NULL,NULL,NULL,NULL,4); sql insert into t1 values(1648791213002,NULL,NULL,NULL,NULL,5) (1648791233012,NULL,NULL,NULL,NULL,6); - +sleep 300 sql select * from streamt order by s desc; # row 0 @@ -115,7 +115,7 @@ sql insert into t1 values(1648791233002,3,2,3,2.1,9); sql insert into t1 values(1648791243003,4,2,3,3.1,10); sql insert into t1 values(1648791213002,4,2,3,4.1,11) ; sql insert into t1 values(1648791213002,4,2,3,4.1,12) (1648791223009,4,2,3,4.1,13); - +sleep 300 sql select * from streamt order by s desc ; # row 0 diff --git a/tests/script/tsim/stream/session1.sim b/tests/script/tsim/stream/session1.sim index a44639ba7a..fb31818f98 100644 --- a/tests/script/tsim/stream/session1.sim +++ b/tests/script/tsim/stream/session1.sim @@ -22,7 +22,7 @@ sql insert into t1 values(1648791210000,1,1,1,1.1,1); sql insert into t1 values(1648791220000,2,2,2,2.1,2); sql insert into t1 values(1648791230000,3,3,3,3.1,3); sql insert into t1 values(1648791240000,4,4,4,4.1,4); - +sleep 300 sql select * from streamt order by s desc; # row 0 @@ -50,7 +50,7 @@ sql insert into t1 values(1648791250005,5,5,5,5.1,5); sql insert into t1 values(1648791260006,6,6,6,6.1,6); sql insert into t1 values(1648791270007,7,7,7,7.1,7); sql insert into t1 values(1648791240005,5,5,5,5.1,8) (1648791250006,6,6,6,6.1,9); - +sleep 300 sql select * from streamt order by s desc; # row 0 @@ -100,7 +100,7 @@ sql insert into t1 values(1648791260007,7,7,7,7.1,12) (1648791290008,7,7,7,7.1,1 sql insert into t1 values(1648791500000,7,7,7,7.1,15) (1648791520000,8,8,8,8.1,16) (1648791540000,8,8,8,8.1,17); sql insert into t1 values(1648791530000,8,8,8,8.1,18); sql insert into t1 values(1648791220000,10,10,10,10.1,19) (1648791290008,2,2,2,2.1,20) (1648791540000,17,17,17,17.1,21) (1648791500001,22,22,22,22.1,22); - +sleep 300 sql select * from streamt order by s desc; # row 0 diff --git a/tests/script/tsim/stream/triggerInterval0.sim b/tests/script/tsim/stream/triggerInterval0.sim index 6f1d8f4b7b..756f591f3f 100644 --- a/tests/script/tsim/stream/triggerInterval0.sim +++ b/tests/script/tsim/stream/triggerInterval0.sim @@ -94,92 +94,4 @@ if $data11 != 5 then return -1 endi -sql create table t2(ts timestamp, a int, b int , c int, d double); -sql create stream streams2 trigger window_close watermark 20s into streamt2 as select _wstartts, count(*) c1, count(d) c2 , sum(a) c3 , max(b) c4, min(c) c5 from t2 interval(10s); -sql insert into t2 values(1648791213000,1,2,3,1.0); -sql insert into t2 values(1648791239999,1,2,3,1.0); -sleep 300 -sql select * from streamt2; -if $rows != 0 then - print ======$rows - return -1 -endi - -sql insert into t2 values(1648791240000,1,2,3,1.0); -sleep 300 -sql select * from streamt2; -if $rows != 1 then - print ======$rows - return -1 -endi -if $data01 != 1 then - print ======$data01 - return -1 -endi - -sql insert into t2 values(1648791250001,1,2,3,1.0) (1648791250002,1,2,3,1.0) (1648791250003,1,2,3,1.0) (1648791240000,1,2,3,1.0); -sleep 300 -sql select * from streamt2; -if $rows != 1 then - print ======$rows - return -1 -endi -if $data01 != 1 then - print ======$data01 - return -1 -endi - -sql insert into t2 values(1648791280000,1,2,3,1.0); -sleep 300 -sql select * from streamt2; -if $rows != 4 then - print ======$rows - return -1 -endi -if $data01 != 1 then - print ======$data01 - return -1 -endi -if $data11 != 1 then - print ======$data11 - return -1 -endi -if $data21 != 1 then - print ======$data21 - return -1 -endi -if $data31 != 3 then - print ======$data31 - return -1 -endi - -sql insert into t2 values(1648791250001,1,2,3,1.0) (1648791250002,1,2,3,1.0) (1648791250003,1,2,3,1.0) (1648791280000,1,2,3,1.0) (1648791280001,1,2,3,1.0) (1648791280002,1,2,3,1.0) (1648791310000,1,2,3,1.0) (1648791280001,1,2,3,1.0); -sleep 300 -sql select * from streamt2; - -if $rows != 5 then - print ======$rows - return -1 -endi -if $data01 != 1 then - print ======$data01 - return -1 -endi -if $data11 != 1 then - print ======$data11 - return -1 -endi -if $data21 != 1 then - print ======$data21 - return -1 -endi -if $data31 != 3 then - print ======$data31 - return -1 -endi -if $data41 != 3 then - print ======$data31 - return -1 -endi - system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file From 7bcc753ae7b21c8a627964c83fc80141d1dfd324 Mon Sep 17 00:00:00 2001 From: wade zhang <95411902+gccgdb1234@users.noreply.github.com> Date: Tue, 31 May 2022 16:17:45 +0800 Subject: [PATCH 37/56] Update 12-keywords.md --- docs-en/12-taos-sql/12-keywords.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs-en/12-taos-sql/12-keywords.md b/docs-en/12-taos-sql/12-keywords.md index cbacf6cfc7..8f045f4801 100644 --- a/docs-en/12-taos-sql/12-keywords.md +++ b/docs-en/12-taos-sql/12-keywords.md @@ -80,10 +80,10 @@ taos> SELECT COUNT(tbname) FROM meters WHERE groupId > 2; Query OK, 1 row(s) in set (0.001091s) ``` ### _QSTART/_QSTOP/_QDURATION -The start, stop and duration of a query time window (Since version 2.6.0.0). +The start, stop and duration of a query time window. ### _WSTART/_WSTOP/_WDURATION -The start, stop and duration of aggegate query by time window, like interval, session window, state window (Since version 2.6.0.0). +The start, stop and duration of aggegate query by time window, like interval, session window, state window. ### _c0/_ROWTS -_c0 is equal to _ROWTS, it means the first column of a table or STable. \ No newline at end of file +_c0 is equal to _ROWTS, it means the first column of a table or STable. From 2bc9d1d7035771a8e10e7a0f9d79e0aaa1ae0735 Mon Sep 17 00:00:00 2001 From: wade zhang <95411902+gccgdb1234@users.noreply.github.com> Date: Tue, 31 May 2022 16:18:34 +0800 Subject: [PATCH 38/56] Update index.md --- docs-cn/12-taos-sql/12-keywords/index.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs-cn/12-taos-sql/12-keywords/index.md b/docs-cn/12-taos-sql/12-keywords/index.md index c6640b2f92..0e8e1edfee 100644 --- a/docs-cn/12-taos-sql/12-keywords/index.md +++ b/docs-cn/12-taos-sql/12-keywords/index.md @@ -119,10 +119,10 @@ taos> SELECT COUNT(tbname) FROM meters WHERE groupId > 2; Query OK, 1 row(s) in set (0.001091s) ``` ### _QSTART/_QSTOP/_QDURATION -表示查询过滤窗口的起始,结束以及持续时间 (从2.6.0.0版本开始支持) +表示查询过滤窗口的起始,结束以及持续时间。 ### _WSTART/_WSTOP/_WDURATION -窗口切分聚合查询(例如 interval/session window/state window)中表示每个切分窗口的起始,结束以及持续时间(从 2.6.0.0 版本开始支持) +窗口切分聚合查询(例如 interval/session window/state window)中表示每个切分窗口的起始,结束以及持续时间。 ### _c0/_ROWTS -_c0 _ROWTS 等价,表示表或超级表的第一列 \ No newline at end of file +_c0 _ROWTS 等价,表示表或超级表的第一列 From 451d19f98653208a6f67b5536d661053ee97dc06 Mon Sep 17 00:00:00 2001 From: Liu Jicong Date: Tue, 31 May 2022 16:20:40 +0800 Subject: [PATCH 39/56] feat(tmq): create topic new grammar --- example/src/tmq.c | 4 +- include/common/tmsg.h | 24 +- source/dnode/mnode/impl/inc/mndDef.h | 38 +- source/dnode/mnode/impl/src/mndDef.c | 18 +- source/dnode/mnode/impl/src/mndScheduler.c | 4 +- source/dnode/mnode/impl/src/mndSubscribe.c | 12 +- source/dnode/mnode/impl/src/mndTopic.c | 44 ++- source/dnode/vnode/CMakeLists.txt | 1 + source/dnode/vnode/src/inc/tq.h | 95 ++++- source/dnode/vnode/src/tq/tq.c | 440 ++++++++------------- source/dnode/vnode/src/tq/tqExec.c | 124 ++++++ source/dnode/vnode/src/tq/tqMeta.c | 14 + source/dnode/vnode/src/tq/tqRead.c | 52 ++- tests/system-test/7-tmq/subscribeDb.py | 10 +- tests/system-test/7-tmq/subscribeDb0.py | 12 +- tests/system-test/7-tmq/subscribeDb1.py | 8 +- 16 files changed, 513 insertions(+), 387 deletions(-) create mode 100644 source/dnode/vnode/src/tq/tqExec.c create mode 100644 source/dnode/vnode/src/tq/tqMeta.c diff --git a/example/src/tmq.c b/example/src/tmq.c index 913096ee90..8d64bd3e79 100644 --- a/example/src/tmq.c +++ b/example/src/tmq.c @@ -106,8 +106,8 @@ int32_t create_topic() { } taos_free_result(pRes); - /*pRes = taos_query(pConn, "create topic topic_ctb_column as abc1");*/ - pRes = taos_query(pConn, "create topic topic_ctb_column as select ts, c1, c2, c3 from st1"); + pRes = taos_query(pConn, "create topic topic_ctb_column as database abc1"); + /*pRes = taos_query(pConn, "create topic topic_ctb_column as select ts, c1, c2, c3 from st1");*/ if (taos_errno(pRes) != 0) { printf("failed to create topic topic_ctb_column, reason:%s\n", taos_errstr(pRes)); return -1; diff --git a/include/common/tmsg.h b/include/common/tmsg.h index 37faf90898..e870eefd77 100644 --- a/include/common/tmsg.h +++ b/include/common/tmsg.h @@ -2170,10 +2170,10 @@ typedef struct { int64_t newConsumerId; char subKey[TSDB_SUBSCRIBE_KEY_LEN]; int8_t subType; - int8_t withTbName; - int8_t withSchema; - int8_t withTag; - char* qmsg; + // int8_t withTbName; + // int8_t withSchema; + // int8_t withTag; + char* qmsg; } SMqRebVgReq; static FORCE_INLINE int32_t tEncodeSMqRebVgReq(void** buf, const SMqRebVgReq* pReq) { @@ -2184,10 +2184,10 @@ static FORCE_INLINE int32_t tEncodeSMqRebVgReq(void** buf, const SMqRebVgReq* pR tlen += taosEncodeFixedI64(buf, pReq->newConsumerId); tlen += taosEncodeString(buf, pReq->subKey); tlen += taosEncodeFixedI8(buf, pReq->subType); - tlen += taosEncodeFixedI8(buf, pReq->withTbName); - tlen += taosEncodeFixedI8(buf, pReq->withSchema); - tlen += taosEncodeFixedI8(buf, pReq->withTag); - if (pReq->subType == TOPIC_SUB_TYPE__TABLE) { + // tlen += taosEncodeFixedI8(buf, pReq->withTbName); + // tlen += taosEncodeFixedI8(buf, pReq->withSchema); + // tlen += taosEncodeFixedI8(buf, pReq->withTag); + if (pReq->subType == TOPIC_SUB_TYPE__COLUMN) { tlen += taosEncodeString(buf, pReq->qmsg); } return tlen; @@ -2200,10 +2200,10 @@ static FORCE_INLINE void* tDecodeSMqRebVgReq(const void* buf, SMqRebVgReq* pReq) buf = taosDecodeFixedI64(buf, &pReq->newConsumerId); buf = taosDecodeStringTo(buf, pReq->subKey); buf = taosDecodeFixedI8(buf, &pReq->subType); - buf = taosDecodeFixedI8(buf, &pReq->withTbName); - buf = taosDecodeFixedI8(buf, &pReq->withSchema); - buf = taosDecodeFixedI8(buf, &pReq->withTag); - if (pReq->subType == TOPIC_SUB_TYPE__TABLE) { + // buf = taosDecodeFixedI8(buf, &pReq->withTbName); + // buf = taosDecodeFixedI8(buf, &pReq->withSchema); + // buf = taosDecodeFixedI8(buf, &pReq->withTag); + if (pReq->subType == TOPIC_SUB_TYPE__COLUMN) { buf = taosDecodeString(buf, &pReq->qmsg); } return (void*)buf; diff --git a/source/dnode/mnode/impl/inc/mndDef.h b/source/dnode/mnode/impl/inc/mndDef.h index 2164c98c83..8a8d2d5dc4 100644 --- a/source/dnode/mnode/impl/inc/mndDef.h +++ b/source/dnode/mnode/impl/inc/mndDef.h @@ -454,17 +454,17 @@ int32_t tEncodeSMqOffsetObj(void** buf, const SMqOffsetObj* pOffset); void* tDecodeSMqOffsetObj(void* buf, SMqOffsetObj* pOffset); typedef struct { - char name[TSDB_TOPIC_FNAME_LEN]; - char db[TSDB_DB_FNAME_LEN]; - int64_t createTime; - int64_t updateTime; - int64_t uid; - int64_t dbUid; - int32_t version; - int8_t subType; // db or table - int8_t withTbName; - int8_t withSchema; - int8_t withTag; + char name[TSDB_TOPIC_FNAME_LEN]; + char db[TSDB_DB_FNAME_LEN]; + int64_t createTime; + int64_t updateTime; + int64_t uid; + int64_t dbUid; + int32_t version; + int8_t subType; // column, db or stable + // int8_t withTbName; + // int8_t withSchema; + // int8_t withTag; SRWLatch lock; int32_t consumerCnt; int32_t sqlLen; @@ -527,14 +527,14 @@ int32_t tEncodeSMqConsumerEp(void** buf, const SMqConsumerEp* pEp); void* tDecodeSMqConsumerEp(const void* buf, SMqConsumerEp* pEp); typedef struct { - char key[TSDB_SUBSCRIBE_KEY_LEN]; - SRWLatch lock; - int64_t dbUid; - int32_t vgNum; - int8_t subType; - int8_t withTbName; - int8_t withSchema; - int8_t withTag; + char key[TSDB_SUBSCRIBE_KEY_LEN]; + SRWLatch lock; + int64_t dbUid; + int32_t vgNum; + int8_t subType; + // int8_t withTbName; + // int8_t withSchema; + // int8_t withTag; SHashObj* consumerHash; // consumerId -> SMqConsumerEp SArray* unassignedVgs; // SArray } SMqSubscribeObj; diff --git a/source/dnode/mnode/impl/src/mndDef.c b/source/dnode/mnode/impl/src/mndDef.c index 35ba25acd5..b45b6f9ee9 100644 --- a/source/dnode/mnode/impl/src/mndDef.c +++ b/source/dnode/mnode/impl/src/mndDef.c @@ -396,9 +396,9 @@ SMqSubscribeObj *tCloneSubscribeObj(const SMqSubscribeObj *pSub) { pSubNew->dbUid = pSub->dbUid; pSubNew->subType = pSub->subType; - pSubNew->withTbName = pSub->withTbName; - pSubNew->withSchema = pSub->withSchema; - pSubNew->withTag = pSub->withTag; + /*pSubNew->withTbName = pSub->withTbName;*/ + /*pSubNew->withSchema = pSub->withSchema;*/ + /*pSubNew->withTag = pSub->withTag;*/ pSubNew->vgNum = pSub->vgNum; pSubNew->consumerHash = taosHashInit(64, taosGetDefaultHashFunction(TSDB_DATA_TYPE_BIGINT), false, HASH_NO_LOCK); @@ -431,9 +431,9 @@ int32_t tEncodeSubscribeObj(void **buf, const SMqSubscribeObj *pSub) { tlen += taosEncodeFixedI64(buf, pSub->dbUid); tlen += taosEncodeFixedI32(buf, pSub->vgNum); tlen += taosEncodeFixedI8(buf, pSub->subType); - tlen += taosEncodeFixedI8(buf, pSub->withTbName); - tlen += taosEncodeFixedI8(buf, pSub->withSchema); - tlen += taosEncodeFixedI8(buf, pSub->withTag); + /*tlen += taosEncodeFixedI8(buf, pSub->withTbName);*/ + /*tlen += taosEncodeFixedI8(buf, pSub->withSchema);*/ + /*tlen += taosEncodeFixedI8(buf, pSub->withTag);*/ void *pIter = NULL; int32_t sz = taosHashGetSize(pSub->consumerHash); @@ -458,9 +458,9 @@ void *tDecodeSubscribeObj(const void *buf, SMqSubscribeObj *pSub) { buf = taosDecodeFixedI64(buf, &pSub->dbUid); buf = taosDecodeFixedI32(buf, &pSub->vgNum); buf = taosDecodeFixedI8(buf, &pSub->subType); - buf = taosDecodeFixedI8(buf, &pSub->withTbName); - buf = taosDecodeFixedI8(buf, &pSub->withSchema); - buf = taosDecodeFixedI8(buf, &pSub->withTag); + /*buf = taosDecodeFixedI8(buf, &pSub->withTbName);*/ + /*buf = taosDecodeFixedI8(buf, &pSub->withSchema);*/ + /*buf = taosDecodeFixedI8(buf, &pSub->withTag);*/ int32_t sz; buf = taosDecodeFixedI32(buf, &sz); diff --git a/source/dnode/mnode/impl/src/mndScheduler.c b/source/dnode/mnode/impl/src/mndScheduler.c index d1404b96fe..a457183e0b 100644 --- a/source/dnode/mnode/impl/src/mndScheduler.c +++ b/source/dnode/mnode/impl/src/mndScheduler.c @@ -506,7 +506,7 @@ int32_t mndSchedInitSubEp(SMnode* pMnode, const SMqTopicObj* pTopic, SMqSubscrib SQueryPlan* pPlan = NULL; SSubplan* plan = NULL; - if (pTopic->subType == TOPIC_SUB_TYPE__TABLE) { + if (pTopic->subType == TOPIC_SUB_TYPE__COLUMN) { pPlan = qStringToQueryPlan(pTopic->physicalPlan); if (pPlan == NULL) { terrno = TSDB_CODE_QRY_INVALID_INPUT; @@ -552,7 +552,7 @@ int32_t mndSchedInitSubEp(SMnode* pMnode, const SMqTopicObj* pTopic, SMqSubscrib mDebug("init subscription %s, assign vg: %d", pSub->key, pVgEp->vgId); - if (pTopic->subType == TOPIC_SUB_TYPE__TABLE) { + if (pTopic->subType == TOPIC_SUB_TYPE__COLUMN) { int32_t msgLen; plan->execNode.epSet = pVgEp->epSet; diff --git a/source/dnode/mnode/impl/src/mndSubscribe.c b/source/dnode/mnode/impl/src/mndSubscribe.c index f360f34e14..05029f27c0 100644 --- a/source/dnode/mnode/impl/src/mndSubscribe.c +++ b/source/dnode/mnode/impl/src/mndSubscribe.c @@ -93,9 +93,9 @@ static SMqSubscribeObj *mndCreateSub(SMnode *pMnode, const SMqTopicObj *pTopic, } pSub->dbUid = pTopic->dbUid; pSub->subType = pTopic->subType; - pSub->withTbName = pTopic->withTbName; - pSub->withSchema = pTopic->withSchema; - pSub->withTag = pTopic->withTag; + /*pSub->withTbName = pTopic->withTbName;*/ + /*pSub->withSchema = pTopic->withSchema;*/ + /*pSub->withTag = pTopic->withTag;*/ ASSERT(pSub->unassignedVgs->size == 0); ASSERT(taosHashGetSize(pSub->consumerHash) == 0); @@ -120,9 +120,9 @@ static int32_t mndBuildSubChangeReq(void **pBuf, int32_t *pLen, const SMqSubscri req.vgId = pRebVg->pVgEp->vgId; req.qmsg = pRebVg->pVgEp->qmsg; req.subType = pSub->subType; - req.withTbName = pSub->withTbName; - req.withSchema = pSub->withSchema; - req.withTag = pSub->withTag; + /*req.withTbName = pSub->withTbName;*/ + /*req.withSchema = pSub->withSchema;*/ + /*req.withTag = pSub->withTag;*/ strncpy(req.subKey, pSub->key, TSDB_SUBSCRIBE_KEY_LEN); int32_t tlen = sizeof(SMsgHead) + tEncodeSMqRebVgReq(NULL, &req); diff --git a/source/dnode/mnode/impl/src/mndTopic.c b/source/dnode/mnode/impl/src/mndTopic.c index d271f91cd4..02f06a0de8 100644 --- a/source/dnode/mnode/impl/src/mndTopic.c +++ b/source/dnode/mnode/impl/src/mndTopic.c @@ -96,9 +96,9 @@ SSdbRaw *mndTopicActionEncode(SMqTopicObj *pTopic) { SDB_SET_INT64(pRaw, dataPos, pTopic->dbUid, TOPIC_ENCODE_OVER); SDB_SET_INT32(pRaw, dataPos, pTopic->version, TOPIC_ENCODE_OVER); SDB_SET_INT8(pRaw, dataPos, pTopic->subType, TOPIC_ENCODE_OVER); - SDB_SET_INT8(pRaw, dataPos, pTopic->withTbName, TOPIC_ENCODE_OVER); - SDB_SET_INT8(pRaw, dataPos, pTopic->withSchema, TOPIC_ENCODE_OVER); - SDB_SET_INT8(pRaw, dataPos, pTopic->withTag, TOPIC_ENCODE_OVER); + /*SDB_SET_INT8(pRaw, dataPos, pTopic->withTbName, TOPIC_ENCODE_OVER);*/ + /*SDB_SET_INT8(pRaw, dataPos, pTopic->withSchema, TOPIC_ENCODE_OVER);*/ + /*SDB_SET_INT8(pRaw, dataPos, pTopic->withTag, TOPIC_ENCODE_OVER);*/ SDB_SET_INT32(pRaw, dataPos, pTopic->consumerCnt, TOPIC_ENCODE_OVER); SDB_SET_INT32(pRaw, dataPos, pTopic->sqlLen, TOPIC_ENCODE_OVER); @@ -168,9 +168,9 @@ SSdbRow *mndTopicActionDecode(SSdbRaw *pRaw) { SDB_GET_INT64(pRaw, dataPos, &pTopic->dbUid, TOPIC_DECODE_OVER); SDB_GET_INT32(pRaw, dataPos, &pTopic->version, TOPIC_DECODE_OVER); SDB_GET_INT8(pRaw, dataPos, &pTopic->subType, TOPIC_DECODE_OVER); - SDB_GET_INT8(pRaw, dataPos, &pTopic->withTbName, TOPIC_DECODE_OVER); - SDB_GET_INT8(pRaw, dataPos, &pTopic->withSchema, TOPIC_DECODE_OVER); - SDB_GET_INT8(pRaw, dataPos, &pTopic->withTag, TOPIC_DECODE_OVER); + /*SDB_GET_INT8(pRaw, dataPos, &pTopic->withTbName, TOPIC_DECODE_OVER);*/ + /*SDB_GET_INT8(pRaw, dataPos, &pTopic->withSchema, TOPIC_DECODE_OVER);*/ + /*SDB_GET_INT8(pRaw, dataPos, &pTopic->withTag, TOPIC_DECODE_OVER);*/ SDB_GET_INT32(pRaw, dataPos, &pTopic->consumerCnt, TOPIC_DECODE_OVER); @@ -308,11 +308,19 @@ static SDDropTopicReq *mndBuildDropTopicMsg(SMnode *pMnode, SVgObj *pVgroup, SMq } static int32_t mndCheckCreateTopicReq(SCMCreateTopicReq *pCreate) { - if (pCreate->name[0] == 0 || pCreate->sql == NULL || pCreate->sql[0] == 0 || pCreate->subDbName[0] == 0) { - terrno = TSDB_CODE_MND_INVALID_TOPIC; - return -1; + terrno = TSDB_CODE_MND_INVALID_TOPIC; + + if (pCreate->sql == NULL) return -1; + + if (pCreate->subType == TOPIC_SUB_TYPE__COLUMN) { + if (pCreate->ast == NULL || pCreate->ast[0] == 0) return -1; + } else if (pCreate->subType == TOPIC_SUB_TYPE__TABLE) { + if (pCreate->subStbName[0] == 0) return -1; + } else if (pCreate->subType == TOPIC_SUB_TYPE__DB) { + if (pCreate->subDbName[0] == 0) return -1; } + terrno = TSDB_CODE_SUCCESS; return 0; } @@ -328,12 +336,11 @@ static int32_t mndCreateTopic(SMnode *pMnode, SRpcMsg *pReq, SCMCreateTopicReq * topicObj.version = 1; topicObj.sql = strdup(pCreate->sql); topicObj.sqlLen = strlen(pCreate->sql) + 1; - /*topicObj.refConsumerCnt = 0;*/ + topicObj.subType = pCreate->subType; - if (pCreate->ast && pCreate->ast[0]) { + if (pCreate->subType == TOPIC_SUB_TYPE__COLUMN) { topicObj.ast = strdup(pCreate->ast); topicObj.astLen = strlen(pCreate->ast) + 1; - topicObj.subType = TOPIC_SUB_TYPE__TABLE; /*topicObj.withTbName = pCreate->withTbName;*/ /*topicObj.withSchema = pCreate->withSchema;*/ @@ -368,13 +375,12 @@ static int32_t mndCreateTopic(SMnode *pMnode, SRpcMsg *pReq, SCMCreateTopicReq * taosMemoryFree(topicObj.sql); return -1; } - } else { - topicObj.ast = NULL; - topicObj.astLen = 0; - topicObj.physicalPlan = NULL; - topicObj.subType = TOPIC_SUB_TYPE__DB; - topicObj.withTbName = 1; - topicObj.withSchema = 1; + /*} else if (pCreate->subType == TOPIC_SUB_TYPE__DB) {*/ + /*topicObj.ast = NULL;*/ + /*topicObj.astLen = 0;*/ + /*topicObj.physicalPlan = NULL;*/ + /*topicObj.withTbName = 1;*/ + /*topicObj.withSchema = 1;*/ } STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_ROLLBACK, TRN_TYPE_CREATE_TOPIC, pReq); diff --git a/source/dnode/vnode/CMakeLists.txt b/source/dnode/vnode/CMakeLists.txt index d988f97188..17445b7abe 100644 --- a/source/dnode/vnode/CMakeLists.txt +++ b/source/dnode/vnode/CMakeLists.txt @@ -51,6 +51,7 @@ target_sources( # tq "src/tq/tq.c" + "src/tq/tqExec.c" "src/tq/tqCommit.c" "src/tq/tqOffset.c" "src/tq/tqPush.c" diff --git a/source/dnode/vnode/src/inc/tq.h b/source/dnode/vnode/src/inc/tq.h index 06ff6329e0..72138926aa 100644 --- a/source/dnode/vnode/src/inc/tq.h +++ b/source/dnode/vnode/src/inc/tq.h @@ -44,21 +44,27 @@ extern "C" { typedef struct STqOffsetCfg STqOffsetCfg; typedef struct STqOffsetStore STqOffsetStore; +// tqRead + struct STqReadHandle { int64_t ver; - SHashObj* tbIdHash; const SSubmitReq* pMsg; SSubmitBlk* pBlock; SSubmitMsgIter msgIter; SSubmitBlkIter blkIter; - SMeta* pVnodeMeta; - SArray* pColIdList; // SArray - int32_t sver; - int64_t cachedSchemaUid; - SSchemaWrapper* pSchemaWrapper; - STSchema* pSchema; + + SMeta* pVnodeMeta; + SHashObj* tbIdHash; + SArray* pColIdList; // SArray + + int32_t cachedSchemaVer; + int64_t cachedSchemaUid; + SSchemaWrapper* pSchemaWrapper; + STSchema* pSchema; }; +// tqPush + typedef struct { int64_t consumerId; int32_t epoch; @@ -68,14 +74,15 @@ typedef struct { SRpcMsg* handle; } STqPushHandle; +#if 0 typedef struct { - char subKey[TSDB_SUBSCRIBE_KEY_LEN]; - int64_t consumerId; - int32_t epoch; - int8_t subType; - int8_t withTbName; - int8_t withSchema; - int8_t withTag; + char subKey[TSDB_SUBSCRIBE_KEY_LEN]; + int64_t consumerId; + int32_t epoch; + int8_t subType; + // int8_t withTbName; + // int8_t withSchema; + // int8_t withTag; char* qmsg; SHashObj* pDropTbUid; STqPushHandle pushHandle; @@ -85,15 +92,55 @@ typedef struct { STqReadHandle* pExecReader[5]; qTaskInfo_t task[5]; } STqExec; +#endif -int32_t tEncodeSTqExec(SEncoder* pEncoder, const STqExec* pExec); -int32_t tDecodeSTqExec(SDecoder* pDecoder, STqExec* pExec); +// tqExec + +typedef struct { + char* qmsg; + qTaskInfo_t task[5]; +} STqExecCol; + +typedef struct { + int64_t suid; +} STqExecTb; + +typedef struct { + SHashObj* pFilterOutTbUid; +} STqExecDb; + +typedef struct { + int8_t subType; + + STqReadHandle* pExecReader[5]; + union { + STqExecCol execCol; + STqExecTb execTb; + STqExecDb execDb; + } exec; +} STqExecHandle; + +typedef struct { + // info + char subKey[TSDB_SUBSCRIBE_KEY_LEN]; + int64_t consumerId; + int32_t epoch; + + // reader + SWalReadHandle* pWalReader; + + // push + STqPushHandle pushHandle; + + // exec + STqExecHandle execHandle; +} STqHandle; struct STQ { char* path; - SHashObj* pushMgr; // consumerId -> STqExec* - SHashObj* execs; // subKey -> STqExec - SHashObj* pStreamTasks; + SHashObj* pushMgr; // consumerId -> STqHandle* + SHashObj* handles; // subKey -> STqHandle + SHashObj* pStreamTasks; // taksId -> SStreamTask SVnode* pVnode; SWal* pWal; TDB* pMetaStore; @@ -111,6 +158,16 @@ static STqMgmt tqMgmt = {0}; int tqInit(); void tqCleanUp(); +// int32_t tEncodeSTqExec(SEncoder* pEncoder, const STqExec* pExec); +// int32_t tDecodeSTqExec(SDecoder* pDecoder, STqExec* pExec); + +int32_t tEncodeSTqHandle(SEncoder* pEncoder, const STqHandle* pHandle); +int32_t tDecodeSTqHandle(SDecoder* pDecoder, STqHandle* pHandle); + +int64_t tqFetchLog(STQ* pTq, STqHandle* pHandle, int64_t* fetchOffset, SWalHead** pHeadWithCkSum); + +int32_t tqDataExec(STQ* pTq, STqExecHandle* pExec, SSubmitReq* pReq, SMqDataBlkRsp* pRsp, int32_t workerId); + // tqOffset STqOffsetStore* STqOffsetOpen(STqOffsetCfg*); void STqOffsetClose(STqOffsetStore*); diff --git a/source/dnode/vnode/src/tq/tq.c b/source/dnode/vnode/src/tq/tq.c index e3cdbaa44b..16201994f0 100644 --- a/source/dnode/vnode/src/tq/tq.c +++ b/source/dnode/vnode/src/tq/tq.c @@ -51,10 +51,10 @@ int tqExecKeyCompare(const void* pKey1, int32_t kLen1, const void* pKey2, int32_ return strcmp(pKey1, pKey2); } -int32_t tqStoreExec(STQ* pTq, const char* key, const STqExec* pExec) { +int32_t tqStoreHandle(STQ* pTq, const char* key, const STqHandle* pHandle) { int32_t code; int32_t vlen; - tEncodeSize(tEncodeSTqExec, pExec, vlen, code); + tEncodeSize(tEncodeSTqHandle, pHandle, vlen, code); ASSERT(code == 0); void* buf = taosMemoryCalloc(1, vlen); @@ -65,7 +65,7 @@ int32_t tqStoreExec(STQ* pTq, const char* key, const STqExec* pExec) { SEncoder encoder; tEncoderInit(&encoder, buf, vlen); - if (tEncodeSTqExec(&encoder, pExec) < 0) { + if (tEncodeSTqHandle(&encoder, pHandle) < 0) { ASSERT(0); } @@ -102,7 +102,7 @@ STQ* tqOpen(const char* path, SVnode* pVnode, SWal* pWal) { pTq->pVnode = pVnode; pTq->pWal = pWal; - pTq->execs = taosHashInit(64, MurmurHash3_32, true, HASH_ENTRY_LOCK); + pTq->handles = taosHashInit(64, MurmurHash3_32, true, HASH_ENTRY_LOCK); pTq->pStreamTasks = taosHashInit(64, taosGetDefaultHashFunction(TSDB_DATA_TYPE_INT), true, HASH_NO_LOCK); @@ -112,7 +112,7 @@ STQ* tqOpen(const char* path, SVnode* pVnode, SWal* pWal) { ASSERT(0); } - if (tdbTbOpen("exec", -1, -1, tqExecKeyCompare, pTq->pMetaStore, &pTq->pExecStore) < 0) { + if (tdbTbOpen("handles", -1, -1, tqExecKeyCompare, pTq->pMetaStore, &pTq->pExecStore) < 0) { ASSERT(0); } @@ -134,30 +134,31 @@ STQ* tqOpen(const char* path, SVnode* pVnode, SWal* pWal) { tdbTbcMoveToFirst(pCur); SDecoder decoder; - while (tdbTbcNext(pCur, &pKey, &kLen, &pVal, &vLen) == 0) { - STqExec exec; - tDecoderInit(&decoder, (uint8_t*)pVal, vLen); - tDecodeSTqExec(&decoder, &exec); - exec.pWalReader = walOpenReadHandle(pTq->pVnode->pWal); - if (exec.subType == TOPIC_SUB_TYPE__TABLE) { - for (int32_t i = 0; i < 5; i++) { - exec.pExecReader[i] = tqInitSubmitMsgScanner(pTq->pVnode->pMeta); - SReadHandle handle = { - .reader = exec.pExecReader[i], + while (tdbTbcNext(pCur, &pKey, &kLen, &pVal, &vLen) == 0) { + STqHandle handle; + tDecoderInit(&decoder, (uint8_t*)pVal, vLen); + tDecodeSTqHandle(&decoder, &handle); + handle.pWalReader = walOpenReadHandle(pTq->pVnode->pWal); + for (int32_t i = 0; i < 5; i++) { + handle.execHandle.pExecReader[i] = tqInitSubmitMsgScanner(pTq->pVnode->pMeta); + } + if (handle.execHandle.subType == TOPIC_SUB_TYPE__COLUMN) { + for (int32_t i = 0; i < 5; i++) { + SReadHandle reader = { + .reader = handle.execHandle.pExecReader[i], .meta = pTq->pVnode->pMeta, .pMsgCb = &pTq->pVnode->msgCb, }; - exec.task[i] = qCreateStreamExecTaskInfo(exec.qmsg, &handle); - ASSERT(exec.task[i]); + handle.execHandle.exec.execCol.task[i] = + qCreateStreamExecTaskInfo(handle.execHandle.exec.execCol.qmsg, &reader); + ASSERT(handle.execHandle.exec.execCol.task[i]); } } else { - for (int32_t i = 0; i < 5; i++) { - exec.pExecReader[i] = tqInitSubmitMsgScanner(pTq->pVnode->pMeta); - } - exec.pDropTbUid = taosHashInit(64, taosGetDefaultHashFunction(TSDB_DATA_TYPE_BIGINT), false, HASH_NO_LOCK); + handle.execHandle.exec.execDb.pFilterOutTbUid = + taosHashInit(64, taosGetDefaultHashFunction(TSDB_DATA_TYPE_BIGINT), false, HASH_NO_LOCK); } - taosHashPut(pTq->execs, pKey, kLen, &exec, sizeof(STqExec)); + taosHashPut(pTq->handles, pKey, kLen, &handle, sizeof(STqHandle)); } if (tdbTxnClose(&txn) < 0) { @@ -170,7 +171,7 @@ STQ* tqOpen(const char* path, SVnode* pVnode, SWal* pWal) { void tqClose(STQ* pTq) { if (pTq) { taosMemoryFreeClear(pTq->path); - taosHashCleanup(pTq->execs); + taosHashCleanup(pTq->handles); taosHashCleanup(pTq->pStreamTasks); taosHashCleanup(pTq->pushMgr); tdbClose(pTq->pMetaStore); @@ -179,16 +180,17 @@ void tqClose(STQ* pTq) { // TODO } +#if 0 int32_t tEncodeSTqExec(SEncoder* pEncoder, const STqExec* pExec) { if (tStartEncode(pEncoder) < 0) return -1; if (tEncodeCStr(pEncoder, pExec->subKey) < 0) return -1; if (tEncodeI64(pEncoder, pExec->consumerId) < 0) return -1; if (tEncodeI32(pEncoder, pExec->epoch) < 0) return -1; if (tEncodeI8(pEncoder, pExec->subType) < 0) return -1; - if (tEncodeI8(pEncoder, pExec->withTbName) < 0) return -1; - if (tEncodeI8(pEncoder, pExec->withSchema) < 0) return -1; - if (tEncodeI8(pEncoder, pExec->withTag) < 0) return -1; - if (pExec->subType == TOPIC_SUB_TYPE__TABLE) { + /*if (tEncodeI8(pEncoder, pExec->withTbName) < 0) return -1;*/ + /*if (tEncodeI8(pEncoder, pExec->withSchema) < 0) return -1;*/ + /*if (tEncodeI8(pEncoder, pExec->withTag) < 0) return -1;*/ + if (pExec->subType == TOPIC_SUB_TYPE__COLUMN) { if (tEncodeCStr(pEncoder, pExec->qmsg) < 0) return -1; } tEndEncode(pEncoder); @@ -201,34 +203,64 @@ int32_t tDecodeSTqExec(SDecoder* pDecoder, STqExec* pExec) { if (tDecodeI64(pDecoder, &pExec->consumerId) < 0) return -1; if (tDecodeI32(pDecoder, &pExec->epoch) < 0) return -1; if (tDecodeI8(pDecoder, &pExec->subType) < 0) return -1; - if (tDecodeI8(pDecoder, &pExec->withTbName) < 0) return -1; - if (tDecodeI8(pDecoder, &pExec->withSchema) < 0) return -1; - if (tDecodeI8(pDecoder, &pExec->withTag) < 0) return -1; - if (pExec->subType == TOPIC_SUB_TYPE__TABLE) { + /*if (tDecodeI8(pDecoder, &pExec->withTbName) < 0) return -1;*/ + /*if (tDecodeI8(pDecoder, &pExec->withSchema) < 0) return -1;*/ + /*if (tDecodeI8(pDecoder, &pExec->withTag) < 0) return -1;*/ + if (pExec->subType == TOPIC_SUB_TYPE__COLUMN) { if (tDecodeCStrAlloc(pDecoder, &pExec->qmsg) < 0) return -1; } tEndDecode(pDecoder); return 0; } +#endif + +int32_t tEncodeSTqHandle(SEncoder* pEncoder, const STqHandle* pHandle) { + if (tStartEncode(pEncoder) < 0) return -1; + if (tEncodeCStr(pEncoder, pHandle->subKey) < 0) return -1; + if (tEncodeI64(pEncoder, pHandle->consumerId) < 0) return -1; + if (tEncodeI32(pEncoder, pHandle->epoch) < 0) return -1; + if (tEncodeI8(pEncoder, pHandle->execHandle.subType) < 0) return -1; + if (pHandle->execHandle.subType == TOPIC_SUB_TYPE__COLUMN) { + if (tEncodeCStr(pEncoder, pHandle->execHandle.exec.execCol.qmsg) < 0) return -1; + } + tEndEncode(pEncoder); + return pEncoder->pos; +} + +int32_t tDecodeSTqHandle(SDecoder* pDecoder, STqHandle* pHandle) { + if (tStartDecode(pDecoder) < 0) return -1; + if (tDecodeCStrTo(pDecoder, pHandle->subKey) < 0) return -1; + if (tDecodeI64(pDecoder, &pHandle->consumerId) < 0) return -1; + if (tDecodeI32(pDecoder, &pHandle->epoch) < 0) return -1; + if (tDecodeI8(pDecoder, &pHandle->execHandle.subType) < 0) return -1; + if (pHandle->execHandle.subType == TOPIC_SUB_TYPE__COLUMN) { + if (tDecodeCStrAlloc(pDecoder, &pHandle->execHandle.exec.execCol.qmsg) < 0) return -1; + } + tEndDecode(pDecoder); + return 0; +} + int32_t tqUpdateTbUidList(STQ* pTq, const SArray* tbUidList, bool isAdd) { void* pIter = NULL; while (1) { - pIter = taosHashIterate(pTq->execs, pIter); + pIter = taosHashIterate(pTq->handles, pIter); if (pIter == NULL) break; - STqExec* pExec = (STqExec*)pIter; - if (pExec->subType == TOPIC_SUB_TYPE__DB) { + STqHandle* pExec = (STqHandle*)pIter; + if (pExec->execHandle.subType == TOPIC_SUB_TYPE__COLUMN) { + for (int32_t i = 0; i < 5; i++) { + int32_t code = qUpdateQualifiedTableId(pExec->execHandle.exec.execCol.task[i], tbUidList, isAdd); + ASSERT(code == 0); + } + } else if (pExec->execHandle.subType == TOPIC_SUB_TYPE__DB) { if (!isAdd) { int32_t sz = taosArrayGetSize(tbUidList); for (int32_t i = 0; i < sz; i++) { int64_t tbUid = *(int64_t*)taosArrayGet(tbUidList, i); - taosHashPut(pExec->pDropTbUid, &tbUid, sizeof(int64_t), NULL, 0); + taosHashPut(pExec->execHandle.exec.execDb.pFilterOutTbUid, &tbUid, sizeof(int64_t), NULL, 0); } } } else { - for (int32_t i = 0; i < 5; i++) { - int32_t code = qUpdateQualifiedTableId(pExec->task[i], tbUidList, isAdd); - ASSERT(code == 0); - } + // tq update id } } while (1) { @@ -246,7 +278,7 @@ int32_t tqUpdateTbUidList(STQ* pTq, const SArray* tbUidList, bool isAdd) { int32_t tqPushMsgNew(STQ* pTq, void* msg, int32_t msgLen, tmsg_t msgType, int64_t ver, SRpcHandleInfo handleInfo) { if (msgType != TDMT_VND_SUBMIT) return 0; void* pIter = NULL; - STqExec* pExec = NULL; + STqHandle* pHandle = NULL; SSubmitReq* pReq = (SSubmitReq*)msg; int32_t workerId = 4; int64_t fetchOffset = ver; @@ -254,84 +286,27 @@ int32_t tqPushMsgNew(STQ* pTq, void* msg, int32_t msgLen, tmsg_t msgType, int64_ while (1) { pIter = taosHashIterate(pTq->pushMgr, pIter); if (pIter == NULL) break; - pExec = *(STqExec**)pIter; + pHandle = *(STqHandle**)pIter; - taosWLockLatch(&pExec->pushHandle.lock); + taosWLockLatch(&pHandle->pushHandle.lock); - SRpcMsg* pMsg = atomic_load_ptr(&pExec->pushHandle.handle); + SRpcMsg* pMsg = atomic_load_ptr(&pHandle->pushHandle.handle); ASSERT(pMsg); SMqDataBlkRsp rsp = {0}; - rsp.reqOffset = pExec->pushHandle.reqOffset; + rsp.reqOffset = pHandle->pushHandle.reqOffset; rsp.blockData = taosArrayInit(0, sizeof(void*)); rsp.blockDataLen = taosArrayInit(0, sizeof(int32_t)); - if (pExec->subType == TOPIC_SUB_TYPE__TABLE) { - qTaskInfo_t task = pExec->task[workerId]; - ASSERT(task); - qSetStreamInput(task, pReq, STREAM_DATA_TYPE_SUBMIT_BLOCK, false); - while (1) { - SSDataBlock* pDataBlock = NULL; - uint64_t ts = 0; - if (qExecTask(task, &pDataBlock, &ts) < 0) { - ASSERT(0); - } - if (pDataBlock == NULL) break; - - ASSERT(pDataBlock->info.rows != 0); - ASSERT(pDataBlock->info.numOfCols != 0); - - int32_t dataStrLen = sizeof(SRetrieveTableRsp) + blockGetEncodeSize(pDataBlock); - void* buf = taosMemoryCalloc(1, dataStrLen); - SRetrieveTableRsp* pRetrieve = (SRetrieveTableRsp*)buf; - pRetrieve->useconds = ts; - pRetrieve->precision = TSDB_DEFAULT_PRECISION; - pRetrieve->compressed = 0; - pRetrieve->completed = 1; - pRetrieve->numOfRows = htonl(pDataBlock->info.rows); - - // TODO enable compress - int32_t actualLen = 0; - blockCompressEncode(pDataBlock, pRetrieve->data, &actualLen, pDataBlock->info.numOfCols, false); - actualLen += sizeof(SRetrieveTableRsp); - ASSERT(actualLen <= dataStrLen); - taosArrayPush(rsp.blockDataLen, &actualLen); - taosArrayPush(rsp.blockData, &buf); - rsp.blockNum++; - } - } else if (pExec->subType == TOPIC_SUB_TYPE__DB) { - STqReadHandle* pReader = pExec->pExecReader[workerId]; - tqReadHandleSetMsg(pReader, pReq, 0); - while (tqNextDataBlock(pReader)) { - SSDataBlock block = {0}; - if (tqRetrieveDataBlock(&block.pDataBlock, pReader, &block.info.groupId, &block.info.uid, &block.info.rows, - &block.info.numOfCols) < 0) { - ASSERT(0); - } - int32_t dataStrLen = sizeof(SRetrieveTableRsp) + blockGetEncodeSize(&block); - void* buf = taosMemoryCalloc(1, dataStrLen); - SRetrieveTableRsp* pRetrieve = (SRetrieveTableRsp*)buf; - /*pRetrieve->useconds = 0;*/ - pRetrieve->precision = TSDB_DEFAULT_PRECISION; - pRetrieve->compressed = 0; - pRetrieve->completed = 1; - pRetrieve->numOfRows = htonl(block.info.rows); - - // TODO enable compress - int32_t actualLen = 0; - blockCompressEncode(&block, pRetrieve->data, &actualLen, block.info.numOfCols, false); - actualLen += sizeof(SRetrieveTableRsp); - ASSERT(actualLen <= dataStrLen); - taosArrayPush(rsp.blockDataLen, &actualLen); - taosArrayPush(rsp.blockData, &buf); - rsp.blockNum++; - } + if (msgType == TDMT_VND_SUBMIT) { + tqDataExec(pTq, &pHandle->execHandle, pReq, &rsp, workerId); } else { + // TODO ASSERT(0); } if (rsp.blockNum == 0) { - taosWUnLockLatch(&pExec->pushHandle.lock); + taosWUnLockLatch(&pHandle->pushHandle.lock); continue; } @@ -348,8 +323,8 @@ int32_t tqPushMsgNew(STQ* pTq, void* msg, int32_t msgLen, tmsg_t msgType, int64_ } ((SMqRspHead*)buf)->mqMsgType = TMQ_MSG_TYPE__POLL_RSP; - ((SMqRspHead*)buf)->epoch = pExec->pushHandle.epoch; - ((SMqRspHead*)buf)->consumerId = pExec->pushHandle.consumerId; + ((SMqRspHead*)buf)->epoch = pHandle->pushHandle.epoch; + ((SMqRspHead*)buf)->consumerId = pHandle->pushHandle.consumerId; void* abuf = POINTER_SHIFT(buf, sizeof(SMqRspHead)); tEncodeSMqDataBlkRsp(&abuf, &rsp); @@ -357,11 +332,11 @@ int32_t tqPushMsgNew(STQ* pTq, void* msg, int32_t msgLen, tmsg_t msgType, int64_ SRpcMsg resp = {.info = handleInfo, .pCont = buf, .contLen = tlen, .code = 0}; tmsgSendRsp(&resp); - atomic_store_ptr(&pExec->pushHandle.handle, NULL); - taosWUnLockLatch(&pExec->pushHandle.lock); + atomic_store_ptr(&pHandle->pushHandle.handle, NULL); + taosWUnLockLatch(&pHandle->pushHandle.lock); tqDebug("vg %d offset %ld from consumer %ld (epoch %d) send rsp, block num: %d, reqOffset: %ld, rspOffset: %ld", - TD_VID(pTq->pVnode), fetchOffset, pExec->pushHandle.consumerId, pExec->pushHandle.epoch, rsp.blockNum, + TD_VID(pTq->pVnode), fetchOffset, pHandle->pushHandle.consumerId, pHandle->pushHandle.epoch, rsp.blockNum, rsp.reqOffset, rsp.rspOffset); // TODO destroy @@ -415,12 +390,12 @@ int32_t tqProcessPollReq(STQ* pTq, SRpcMsg* pMsg, int32_t workerId) { tqDebug("tmq poll: consumer %ld (epoch %d) recv poll req in vg %d, req %ld %ld", consumerId, pReq->epoch, TD_VID(pTq->pVnode), pReq->currentOffset, fetchOffset); - STqExec* pExec = taosHashGet(pTq->execs, pReq->subKey, strlen(pReq->subKey)); - ASSERT(pExec); + STqHandle* pHandle = taosHashGet(pTq->handles, pReq->subKey, strlen(pReq->subKey)); + ASSERT(pHandle); - int32_t consumerEpoch = atomic_load_32(&pExec->epoch); + int32_t consumerEpoch = atomic_load_32(&pHandle->epoch); while (consumerEpoch < reqEpoch) { - consumerEpoch = atomic_val_compare_exchange_32(&pExec->epoch, consumerEpoch, reqEpoch); + consumerEpoch = atomic_val_compare_exchange_32(&pHandle->epoch, consumerEpoch, reqEpoch); } SWalHead* pHeadWithCkSum = taosMemoryMalloc(sizeof(SWalHead) + 2048); @@ -428,49 +403,51 @@ int32_t tqProcessPollReq(STQ* pTq, SRpcMsg* pMsg, int32_t workerId) { return -1; } - walSetReaderCapacity(pExec->pWalReader, 2048); + walSetReaderCapacity(pHandle->pWalReader, 2048); SMqDataBlkRsp rsp = {0}; rsp.reqOffset = pReq->currentOffset; - rsp.withSchema = pExec->withSchema; rsp.blockData = taosArrayInit(0, sizeof(void*)); rsp.blockDataLen = taosArrayInit(0, sizeof(int32_t)); rsp.blockSchema = taosArrayInit(0, sizeof(void*)); rsp.blockTbName = taosArrayInit(0, sizeof(void*)); - int8_t withTbName = pExec->withTbName; - if (pReq->withTbName != -1) { - withTbName = pReq->withTbName; + rsp.withTbName = pReq->withTbName; + if (pHandle->execHandle.subType == TOPIC_SUB_TYPE__COLUMN) { + rsp.withSchema = false; + rsp.withTag = false; + } else { + rsp.withSchema = true; + rsp.withTag = false; } - rsp.withTbName = withTbName; + + /*int8_t withTbName = pExec->withTbName;*/ + /*if (pReq->withTbName != -1) {*/ + /*withTbName = pReq->withTbName;*/ + /*}*/ + /*rsp.withTbName = withTbName;*/ while (1) { - consumerEpoch = atomic_load_32(&pExec->epoch); + consumerEpoch = atomic_load_32(&pHandle->epoch); if (consumerEpoch > reqEpoch) { tqDebug("tmq poll: consumer %ld (epoch %d) vg %d offset %ld, found new consumer epoch %d discard req epoch %d", consumerId, pReq->epoch, TD_VID(pTq->pVnode), fetchOffset, consumerEpoch, reqEpoch); break; } - taosThreadMutexLock(&pExec->pWalReader->mutex); - - if (walFetchHead(pExec->pWalReader, fetchOffset, pHeadWithCkSum) < 0) { - tqDebug("tmq poll: consumer %ld (epoch %d) vg %d offset %ld, no more log to return", consumerId, pReq->epoch, - TD_VID(pTq->pVnode), fetchOffset); - taosThreadMutexUnlock(&pExec->pWalReader->mutex); + if (tqFetchLog(pTq, pHandle, &fetchOffset, &pHeadWithCkSum) < 0) { + // TODO add push mgr break; } - if (pHeadWithCkSum->head.msgType != TDMT_VND_SUBMIT) { - ASSERT(walSkipFetchBody(pExec->pWalReader, pHeadWithCkSum) == 0); - } else { - ASSERT(walFetchBody(pExec->pWalReader, &pHeadWithCkSum) == 0); - } + tqDebug("tmq poll vg %d: offset %ld msgType %d", pTq->pVnode->config.vgId, fetchOffset, + pHeadWithCkSum->head.msgType); SWalReadHead* pHead = &pHeadWithCkSum->head; - taosThreadMutexUnlock(&pExec->pWalReader->mutex); + tqDebug("tmq poll vg %d: offset %ld msgType %d", pTq->pVnode->config.vgId, fetchOffset, + pHeadWithCkSum->head.msgType); #if 0 SWalReadHead* pHead; @@ -511,122 +488,26 @@ int32_t tqProcessPollReq(STQ* pTq, SRpcMsg* pMsg, int32_t workerId) { if (pHead->msgType == TDMT_VND_SUBMIT) { SSubmitReq* pCont = (SSubmitReq*)&pHead->body; - // table subscribe - if (pExec->subType == TOPIC_SUB_TYPE__TABLE) { - qTaskInfo_t task = pExec->task[workerId]; - ASSERT(task); - qSetStreamInput(task, pCont, STREAM_DATA_TYPE_SUBMIT_BLOCK, false); - while (1) { - SSDataBlock* pDataBlock = NULL; - uint64_t ts = 0; - if (qExecTask(task, &pDataBlock, &ts) < 0) { - ASSERT(0); - } - if (pDataBlock == NULL) break; - ASSERT(pDataBlock->info.rows != 0); - ASSERT(pDataBlock->info.numOfCols != 0); - - int32_t dataStrLen = sizeof(SRetrieveTableRsp) + blockGetEncodeSize(pDataBlock); - void* buf = taosMemoryCalloc(1, dataStrLen); - SRetrieveTableRsp* pRetrieve = (SRetrieveTableRsp*)buf; - pRetrieve->useconds = ts; - pRetrieve->precision = TSDB_DEFAULT_PRECISION; - pRetrieve->compressed = 0; - pRetrieve->completed = 1; - pRetrieve->numOfRows = htonl(pDataBlock->info.rows); - - // TODO enable compress - int32_t actualLen = 0; - blockCompressEncode(pDataBlock, pRetrieve->data, &actualLen, pDataBlock->info.numOfCols, false); - actualLen += sizeof(SRetrieveTableRsp); - ASSERT(actualLen <= dataStrLen); - taosArrayPush(rsp.blockDataLen, &actualLen); - taosArrayPush(rsp.blockData, &buf); - - if (pExec->withSchema) { - SSchemaWrapper* pSW = tCloneSSchemaWrapper(pExec->pExecReader[workerId]->pSchemaWrapper); - taosArrayPush(rsp.blockSchema, &pSW); - } - - if (withTbName) { - SMetaReader mr = {0}; - metaReaderInit(&mr, pTq->pVnode->pMeta, 0); - int64_t uid = pExec->pExecReader[workerId]->msgIter.uid; - if (metaGetTableEntryByUid(&mr, uid) < 0) { - ASSERT(0); - } - char* tbName = strdup(mr.me.name); - taosArrayPush(rsp.blockTbName, &tbName); - metaReaderClear(&mr); - } - - rsp.blockNum++; - } - // db subscribe - } else if (pExec->subType == TOPIC_SUB_TYPE__DB) { - rsp.withSchema = 1; - STqReadHandle* pReader = pExec->pExecReader[workerId]; - tqReadHandleSetMsg(pReader, pCont, 0); - while (tqNextDataBlockFilterOut(pReader, pExec->pDropTbUid)) { - SSDataBlock block = {0}; - if (tqRetrieveDataBlock(&block.pDataBlock, pReader, &block.info.groupId, &block.info.uid, &block.info.rows, - &block.info.numOfCols) < 0) { - if (terrno == TSDB_CODE_TQ_TABLE_SCHEMA_NOT_FOUND) continue; - ASSERT(0); - } - int32_t dataStrLen = sizeof(SRetrieveTableRsp) + blockGetEncodeSize(&block); - void* buf = taosMemoryCalloc(1, dataStrLen); - SRetrieveTableRsp* pRetrieve = (SRetrieveTableRsp*)buf; - /*pRetrieve->useconds = 0;*/ - pRetrieve->precision = TSDB_DEFAULT_PRECISION; - pRetrieve->compressed = 0; - pRetrieve->completed = 1; - pRetrieve->numOfRows = htonl(block.info.rows); - - // TODO enable compress - int32_t actualLen = 0; - blockCompressEncode(&block, pRetrieve->data, &actualLen, block.info.numOfCols, false); - actualLen += sizeof(SRetrieveTableRsp); - ASSERT(actualLen <= dataStrLen); - taosArrayPush(rsp.blockDataLen, &actualLen); - taosArrayPush(rsp.blockData, &buf); - if (withTbName) { - SMetaReader mr = {0}; - metaReaderInit(&mr, pTq->pVnode->pMeta, 0); - if (metaGetTableEntryByUid(&mr, block.info.uid) < 0) { - ASSERT(0); - } - char* tbName = strdup(mr.me.name); - taosArrayPush(rsp.blockTbName, &tbName); - metaReaderClear(&mr); - } - - SSchemaWrapper* pSW = tCloneSSchemaWrapper(pExec->pExecReader[workerId]->pSchemaWrapper); - taosArrayPush(rsp.blockSchema, &pSW); - - rsp.blockNum++; - } - } else { - ASSERT(0); - } + tqDataExec(pTq, &pHandle->execHandle, pCont, &rsp, workerId); + } else { + // TODO + ASSERT(0); } // TODO batch optimization: // TODO continue scan until meeting batch requirement - if (rsp.blockNum != 0) break; - rsp.skipLogNum++; - fetchOffset++; + if (rsp.blockNum > 0 /* threshold */) { + break; + } } taosMemoryFree(pHeadWithCkSum); + ASSERT(taosArrayGetSize(rsp.blockData) == rsp.blockNum); ASSERT(taosArrayGetSize(rsp.blockDataLen) == rsp.blockNum); - if (rsp.blockNum != 0) - rsp.rspOffset = fetchOffset; - else - rsp.rspOffset = fetchOffset - 1; + rsp.rspOffset = fetchOffset; int32_t tlen = sizeof(SMqRspHead) + tEncodeSMqDataBlkRsp(NULL, &rsp); void* buf = rpcMallocCont(tlen); @@ -642,13 +523,18 @@ int32_t tqProcessPollReq(STQ* pTq, SRpcMsg* pMsg, int32_t workerId) { void* abuf = POINTER_SHIFT(buf, sizeof(SMqRspHead)); tEncodeSMqDataBlkRsp(&abuf, &rsp); - SRpcMsg resp = {.info = pMsg->info, .pCont = buf, .contLen = tlen, .code = 0}; + SRpcMsg resp = { + .info = pMsg->info, + .pCont = buf, + .contLen = tlen, + .code = 0, + }; tmsgSendRsp(&resp); tqDebug("vg %d offset %ld from consumer %ld (epoch %d) send rsp, block num: %d, reqOffset: %ld, rspOffset: %ld", TD_VID(pTq->pVnode), fetchOffset, consumerId, pReq->epoch, rsp.blockNum, rsp.reqOffset, rsp.rspOffset); - // TODO destroy + // TODO wrap in destroy func taosArrayDestroy(rsp.blockData); taosArrayDestroy(rsp.blockDataLen); taosArrayDestroyP(rsp.blockSchema, (FDelete)tDeleteSSchemaWrapper); @@ -660,7 +546,7 @@ int32_t tqProcessPollReq(STQ* pTq, SRpcMsg* pMsg, int32_t workerId) { int32_t tqProcessVgDeleteReq(STQ* pTq, char* msg, int32_t msgLen) { SMqVDeleteReq* pReq = (SMqVDeleteReq*)msg; - int32_t code = taosHashRemove(pTq->execs, pReq->subKey, strlen(pReq->subKey)); + int32_t code = taosHashRemove(pTq->handles, pReq->subKey, strlen(pReq->subKey)); ASSERT(code == 0); TXN txn; @@ -689,63 +575,59 @@ int32_t tqProcessVgChangeReq(STQ* pTq, char* msg, int32_t msgLen) { SMqRebVgReq req = {0}; tDecodeSMqRebVgReq(msg, &req); // todo lock - STqExec* pExec = taosHashGet(pTq->execs, req.subKey, strlen(req.subKey)); - if (pExec == NULL) { + STqHandle* pHandle = taosHashGet(pTq->handles, req.subKey, strlen(req.subKey)); + if (pHandle == NULL) { ASSERT(req.oldConsumerId == -1); ASSERT(req.newConsumerId != -1); - STqExec exec = {0}; - pExec = &exec; + STqHandle tqHandle = {0}; + pHandle = &tqHandle; /*taosInitRWLatch(&pExec->lock);*/ - memcpy(pExec->subKey, req.subKey, TSDB_SUBSCRIBE_KEY_LEN); - pExec->consumerId = req.newConsumerId; - pExec->epoch = -1; + memcpy(pHandle->subKey, req.subKey, TSDB_SUBSCRIBE_KEY_LEN); + pHandle->consumerId = req.newConsumerId; + pHandle->epoch = -1; - pExec->subType = req.subType; - pExec->withTbName = req.withTbName; - pExec->withSchema = req.withSchema; - pExec->withTag = req.withTag; + pHandle->execHandle.subType = req.subType; + /*pExec->withTbName = req.withTbName;*/ + /*pExec->withSchema = req.withSchema;*/ + /*pExec->withTag = req.withTag;*/ - pExec->qmsg = req.qmsg; + pHandle->execHandle.exec.execCol.qmsg = req.qmsg; req.qmsg = NULL; - pExec->pWalReader = walOpenReadHandle(pTq->pVnode->pWal); - if (pExec->subType == TOPIC_SUB_TYPE__TABLE) { + pHandle->pWalReader = walOpenReadHandle(pTq->pVnode->pWal); + for (int32_t i = 0; i < 5; i++) { + pHandle->execHandle.pExecReader[i] = tqInitSubmitMsgScanner(pTq->pVnode->pMeta); + } + if (pHandle->execHandle.subType == TOPIC_SUB_TYPE__COLUMN) { for (int32_t i = 0; i < 5; i++) { - pExec->pExecReader[i] = tqInitSubmitMsgScanner(pTq->pVnode->pMeta); - SReadHandle handle = { - .reader = pExec->pExecReader[i], + .reader = pHandle->execHandle.pExecReader[i], .meta = pTq->pVnode->pMeta, .pMsgCb = &pTq->pVnode->msgCb, }; - pExec->task[i] = qCreateStreamExecTaskInfo(pExec->qmsg, &handle); - ASSERT(pExec->task[i]); + pHandle->execHandle.exec.execCol.task[i] = + qCreateStreamExecTaskInfo(pHandle->execHandle.exec.execCol.qmsg, &handle); + ASSERT(pHandle->execHandle.exec.execCol.task[i]); } - } else { - for (int32_t i = 0; i < 5; i++) { - pExec->pExecReader[i] = tqInitSubmitMsgScanner(pTq->pVnode->pMeta); - } - pExec->pDropTbUid = taosHashInit(64, taosGetDefaultHashFunction(TSDB_DATA_TYPE_BIGINT), false, HASH_NO_LOCK); + } else if (pHandle->execHandle.subType == TOPIC_SUB_TYPE__DB) { + pHandle->execHandle.exec.execDb.pFilterOutTbUid = + taosHashInit(64, taosGetDefaultHashFunction(TSDB_DATA_TYPE_BIGINT), false, HASH_NO_LOCK); + } else if (pHandle->execHandle.subType == TOPIC_SUB_TYPE__TABLE) { } - taosHashPut(pTq->execs, req.subKey, strlen(req.subKey), pExec, sizeof(STqExec)); - - if (tqStoreExec(pTq, req.subKey, pExec) < 0) { - // TODO - } - return 0; + taosHashPut(pTq->handles, req.subKey, strlen(req.subKey), pHandle, sizeof(STqHandle)); } else { /*ASSERT(pExec->consumerId == req.oldConsumerId);*/ // TODO handle qmsg and exec modification - atomic_store_32(&pExec->epoch, -1); - atomic_store_64(&pExec->consumerId, req.newConsumerId); - atomic_add_fetch_32(&pExec->epoch, 1); - - if (tqStoreExec(pTq, req.subKey, pExec) < 0) { - // TODO - } - return 0; + atomic_store_32(&pHandle->epoch, -1); + atomic_store_64(&pHandle->consumerId, req.newConsumerId); + atomic_add_fetch_32(&pHandle->epoch, 1); } + + if (tqStoreHandle(pTq, req.subKey, pHandle) < 0) { + // TODO + } + return 0; } void tqTableSink(SStreamTask* pTask, void* vnode, int64_t ver, void* data) { diff --git a/source/dnode/vnode/src/tq/tqExec.c b/source/dnode/vnode/src/tq/tqExec.c new file mode 100644 index 0000000000..b8fec34b57 --- /dev/null +++ b/source/dnode/vnode/src/tq/tqExec.c @@ -0,0 +1,124 @@ +/* + * Copyright (c) 2019 TAOS Data, Inc. + * + * This program is free software: you can use, redistribute, and/or modify + * it under the terms of the GNU Affero General Public License, version 3 + * or later ("AGPL"), as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +#include "tq.h" + +static int32_t tqAddBlockDataToRsp(const SSDataBlock* pBlock, SMqDataBlkRsp* pRsp) { + int32_t dataStrLen = sizeof(SRetrieveTableRsp) + blockGetEncodeSize(pBlock); + void* buf = taosMemoryCalloc(1, dataStrLen); + if (buf == NULL) return -1; + + SRetrieveTableRsp* pRetrieve = (SRetrieveTableRsp*)buf; + pRetrieve->useconds = 0; + pRetrieve->precision = TSDB_DEFAULT_PRECISION; + pRetrieve->compressed = 0; + pRetrieve->completed = 1; + pRetrieve->numOfRows = htonl(pBlock->info.rows); + + // TODO enable compress + int32_t actualLen = 0; + blockCompressEncode(pBlock, pRetrieve->data, &actualLen, pBlock->info.numOfCols, false); + actualLen += sizeof(SRetrieveTableRsp); + ASSERT(actualLen <= dataStrLen); + taosArrayPush(pRsp->blockDataLen, &actualLen); + taosArrayPush(pRsp->blockData, &buf); + return 0; +} + +static int32_t tqAddBlockSchemaToRsp(const STqExecHandle* pExec, int32_t workerId, SMqDataBlkRsp* pRsp) { + SSchemaWrapper* pSW = tCloneSSchemaWrapper(pExec->pExecReader[workerId]->pSchemaWrapper); + taosArrayPush(pRsp->blockSchema, &pSW); + return 0; +} + +static int32_t tqAddTbNameToRsp(const STQ* pTq, const STqExecHandle* pExec, SMqDataBlkRsp* pRsp, int32_t workerId) { + SMetaReader mr = {0}; + metaReaderInit(&mr, pTq->pVnode->pMeta, 0); + int64_t uid = pExec->pExecReader[workerId]->msgIter.uid; + if (metaGetTableEntryByUid(&mr, uid) < 0) { + ASSERT(0); + return -1; + } + char* tbName = strdup(mr.me.name); + taosArrayPush(pRsp->blockTbName, &tbName); + metaReaderClear(&mr); + return 0; +} + +int32_t tqDataExec(STQ* pTq, STqExecHandle* pExec, SSubmitReq* pReq, SMqDataBlkRsp* pRsp, int32_t workerId) { + if (pExec->subType == TOPIC_SUB_TYPE__COLUMN) { + qTaskInfo_t task = pExec->exec.execCol.task[workerId]; + ASSERT(task); + qSetStreamInput(task, pReq, STREAM_DATA_TYPE_SUBMIT_BLOCK, false); + while (1) { + SSDataBlock* pDataBlock = NULL; + uint64_t ts = 0; + if (qExecTask(task, &pDataBlock, &ts) < 0) { + ASSERT(0); + } + if (pDataBlock == NULL) break; + + ASSERT(pDataBlock->info.rows != 0); + ASSERT(pDataBlock->info.numOfCols != 0); + + tqAddBlockDataToRsp(pDataBlock, pRsp); + if (pRsp->withTbName) { + tqAddTbNameToRsp(pTq, pExec, pRsp, workerId); + } + pRsp->blockNum++; + } + } else if (pExec->subType == TOPIC_SUB_TYPE__TABLE) { + pRsp->withSchema = 1; + STqReadHandle* pReader = pExec->pExecReader[workerId]; + tqReadHandleSetMsg(pReader, pReq, 0); + while (tqNextDataBlock(pReader)) { + SSDataBlock block = {0}; + if (tqRetrieveDataBlock(&block.pDataBlock, pReader, &block.info.groupId, &block.info.uid, &block.info.rows, + &block.info.numOfCols) < 0) { + if (terrno == TSDB_CODE_TQ_TABLE_SCHEMA_NOT_FOUND) continue; + ASSERT(0); + } + tqAddBlockDataToRsp(&block, pRsp); + if (pRsp->withTbName) { + tqAddTbNameToRsp(pTq, pExec, pRsp, workerId); + } + tqAddBlockSchemaToRsp(pExec, workerId, pRsp); + pRsp->blockNum++; + } + } else if (pExec->subType == TOPIC_SUB_TYPE__DB) { + pRsp->withSchema = 1; + STqReadHandle* pReader = pExec->pExecReader[workerId]; + tqReadHandleSetMsg(pReader, pReq, 0); + while (tqNextDataBlockFilterOut(pReader, pExec->exec.execDb.pFilterOutTbUid)) { + SSDataBlock block = {0}; + if (tqRetrieveDataBlock(&block.pDataBlock, pReader, &block.info.groupId, &block.info.uid, &block.info.rows, + &block.info.numOfCols) < 0) { + if (terrno == TSDB_CODE_TQ_TABLE_SCHEMA_NOT_FOUND) continue; + ASSERT(0); + } + tqAddBlockDataToRsp(&block, pRsp); + if (pRsp->withTbName) { + tqAddTbNameToRsp(pTq, pExec, pRsp, workerId); + } + tqAddBlockSchemaToRsp(pExec, workerId, pRsp); + pRsp->blockNum++; + } + } + if (pRsp->blockNum == 0) { + pRsp->skipLogNum++; + return -1; + } + return 0; +} diff --git a/source/dnode/vnode/src/tq/tqMeta.c b/source/dnode/vnode/src/tq/tqMeta.c new file mode 100644 index 0000000000..f2f48bbc8a --- /dev/null +++ b/source/dnode/vnode/src/tq/tqMeta.c @@ -0,0 +1,14 @@ +/* + * 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 . + */ diff --git a/source/dnode/vnode/src/tq/tqRead.c b/source/dnode/vnode/src/tq/tqRead.c index 9f4c5fc81e..1f5d3b7f53 100644 --- a/source/dnode/vnode/src/tq/tqRead.c +++ b/source/dnode/vnode/src/tq/tqRead.c @@ -15,6 +15,48 @@ #include "tq.h" +int64_t tqFetchLog(STQ* pTq, STqHandle* pHandle, int64_t* fetchOffset, SWalHead** ppHeadWithCkSum) { + int32_t code = 0; + taosThreadMutexLock(&pHandle->pWalReader->mutex); + int64_t offset = *fetchOffset; + + while (1) { + if (walFetchHead(pHandle->pWalReader, offset, *ppHeadWithCkSum) < 0) { + tqDebug("tmq poll: consumer %ld (epoch %d) vg %d offset %ld, no more log to return", pHandle->consumerId, + pHandle->epoch, TD_VID(pTq->pVnode), offset); + *fetchOffset = offset - 1; + code = -1; + goto END; + } + + if ((*ppHeadWithCkSum)->head.msgType == TDMT_VND_SUBMIT) { + code = walFetchBody(pHandle->pWalReader, ppHeadWithCkSum); + + if (code < 0) { + ASSERT(0); + *fetchOffset = offset; + code = -1; + goto END; + } + *fetchOffset = offset; + code = 0; + goto END; + } else { + code = walSkipFetchBody(pHandle->pWalReader, *ppHeadWithCkSum); + if (code < 0) { + ASSERT(0); + *fetchOffset = offset; + code = -1; + goto END; + } + offset++; + } + } +END: + taosThreadMutexUnlock(&pHandle->pWalReader->mutex); + return code; +} + STqReadHandle* tqInitSubmitMsgScanner(SMeta* pMeta) { STqReadHandle* pReadHandle = taosMemoryMalloc(sizeof(STqReadHandle)); if (pReadHandle == NULL) { @@ -24,7 +66,7 @@ STqReadHandle* tqInitSubmitMsgScanner(SMeta* pMeta) { pReadHandle->pMsg = NULL; pReadHandle->ver = -1; pReadHandle->pColIdList = NULL; - pReadHandle->sver = -1; + pReadHandle->cachedSchemaVer = -1; pReadHandle->cachedSchemaUid = -1; pReadHandle->pSchema = NULL; pReadHandle->pSchemaWrapper = NULL; @@ -88,11 +130,11 @@ int32_t tqRetrieveDataBlock(SArray** ppCols, STqReadHandle* pHandle, uint64_t* p // TODO set to real sversion /*int32_t sversion = 1;*/ int32_t sversion = htonl(pHandle->pBlock->sversion); - if (pHandle->sver != sversion || pHandle->cachedSchemaUid != pHandle->msgIter.suid) { + if (pHandle->cachedSchemaVer != sversion || pHandle->cachedSchemaUid != pHandle->msgIter.suid) { pHandle->pSchema = metaGetTbTSchema(pHandle->pVnodeMeta, pHandle->msgIter.uid, sversion); if (pHandle->pSchema == NULL) { tqWarn("cannot found tsschema for table: uid: %ld (suid: %ld), version %d, possibly dropped table", - pHandle->msgIter.uid, pHandle->msgIter.suid, pHandle->sver); + pHandle->msgIter.uid, pHandle->msgIter.suid, pHandle->cachedSchemaVer); /*ASSERT(0);*/ terrno = TSDB_CODE_TQ_TABLE_SCHEMA_NOT_FOUND; return -1; @@ -102,12 +144,12 @@ int32_t tqRetrieveDataBlock(SArray** ppCols, STqReadHandle* pHandle, uint64_t* p pHandle->pSchemaWrapper = metaGetTableSchema(pHandle->pVnodeMeta, pHandle->msgIter.suid, sversion, true); if (pHandle->pSchemaWrapper == NULL) { tqWarn("cannot found schema wrapper for table: suid: %ld, version %d, possibly dropped table", - pHandle->msgIter.suid, pHandle->sver); + pHandle->msgIter.suid, pHandle->cachedSchemaVer); /*ASSERT(0);*/ terrno = TSDB_CODE_TQ_TABLE_SCHEMA_NOT_FOUND; return -1; } - pHandle->sver = sversion; + pHandle->cachedSchemaVer = sversion; pHandle->cachedSchemaUid = pHandle->msgIter.suid; } diff --git a/tests/system-test/7-tmq/subscribeDb.py b/tests/system-test/7-tmq/subscribeDb.py index 157bc7928b..43b707e651 100644 --- a/tests/system-test/7-tmq/subscribeDb.py +++ b/tests/system-test/7-tmq/subscribeDb.py @@ -182,7 +182,7 @@ class TDTestCase: tdLog.info("create topics from db") topicName1 = 'topic_db1' - tdSql.execute("create topic %s as %s" %(topicName1, parameterDict['dbName'])) + tdSql.execute("create topic %s as database %s" %(topicName1, parameterDict['dbName'])) consumerId = 0 expectrowcnt = parameterDict["rowsPerTbl"] * parameterDict["ctbNum"] topicList = topicName1 @@ -223,7 +223,7 @@ class TDTestCase: tdLog.info("create topics from db") topicName1 = 'topic_db1' - tdSql.execute("create topic %s as %s" %(topicName1, parameterDict['dbName'])) + tdSql.execute("create topic %s as database %s" %(topicName1, parameterDict['dbName'])) consumerId = 0 expectrowcnt = parameterDict["rowsPerTbl"] * parameterDict["ctbNum"] topicList = topicName1 @@ -279,7 +279,7 @@ class TDTestCase: tdLog.info("create topics from db") topicName1 = 'topic_db1' - tdSql.execute("create topic %s as %s" %(topicName1, parameterDict['dbName'])) + tdSql.execute("create topic %s as database %s" %(topicName1, parameterDict['dbName'])) consumerId = 0 expectrowcnt = parameterDict["rowsPerTbl"] * parameterDict["ctbNum"] @@ -343,7 +343,7 @@ class TDTestCase: tdLog.info("create topics from db") topicName1 = 'topic_db1' - tdSql.execute("create topic %s as %s" %(topicName1, parameterDict['dbName'])) + tdSql.execute("create topic %s as database %s" %(topicName1, parameterDict['dbName'])) consumerId = 0 expectrowcnt = parameterDict["rowsPerTbl"] * parameterDict["ctbNum"] @@ -427,7 +427,7 @@ class TDTestCase: tdLog.info("create topics from db") topicName1 = 'topic_db1' - tdSql.execute("create topic %s as %s" %(topicName1, parameterDict['dbName'])) + tdSql.execute("create topic %s as database %s" %(topicName1, parameterDict['dbName'])) consumerId = 0 expectrowcnt = parameterDict["rowsPerTbl"] * parameterDict["ctbNum"] + parameterDict2["rowsPerTbl"] * parameterDict2["ctbNum"] diff --git a/tests/system-test/7-tmq/subscribeDb0.py b/tests/system-test/7-tmq/subscribeDb0.py index d6f93acfd6..ce273367c7 100644 --- a/tests/system-test/7-tmq/subscribeDb0.py +++ b/tests/system-test/7-tmq/subscribeDb0.py @@ -195,7 +195,7 @@ class TDTestCase: tdLog.info("create topics from db") topicName1 = 'topic_db1' - tdSql.execute("create topic %s as %s" %(topicName1, parameterDict['dbName'])) + tdSql.execute("create topic %s as database %s" %(topicName1, parameterDict['dbName'])) consumerId = 0 expectrowcnt = parameterDict["rowsPerTbl"] * parameterDict["ctbNum"] + parameterDict2["rowsPerTbl"] * parameterDict2["ctbNum"] @@ -272,7 +272,7 @@ class TDTestCase: tdLog.info("create topics from db") topicName1 = 'topic_db1' - tdSql.execute("create topic %s as %s" %(topicName1, parameterDict['dbName'])) + tdSql.execute("create topic %s as database %s" %(topicName1, parameterDict['dbName'])) consumerId = 0 expectrowcnt = parameterDict["rowsPerTbl"] * parameterDict["ctbNum"] + parameterDict2["rowsPerTbl"] * parameterDict2["ctbNum"] @@ -358,8 +358,8 @@ class TDTestCase: topicName1 = 'topic_db60' topicName2 = 'topic_db61' - tdSql.execute("create topic %s as %s" %(topicName1, parameterDict['dbName'])) - tdSql.execute("create topic %s as %s" %(topicName2, parameterDict2['dbName'])) + tdSql.execute("create topic %s as database %s" %(topicName1, parameterDict['dbName'])) + tdSql.execute("create topic %s as database %s" %(topicName2, parameterDict2['dbName'])) consumerId = 0 expectrowcnt = parameterDict["rowsPerTbl"] * parameterDict["ctbNum"] + parameterDict2["rowsPerTbl"] * parameterDict2["ctbNum"] @@ -443,8 +443,8 @@ class TDTestCase: topicName1 = 'topic_db60' topicName2 = 'topic_db61' - tdSql.execute("create topic %s as %s" %(topicName1, parameterDict['dbName'])) - tdSql.execute("create topic %s as %s" %(topicName2, parameterDict2['dbName'])) + tdSql.execute("create topic %s as database %s" %(topicName1, parameterDict['dbName'])) + tdSql.execute("create topic %s as database %s" %(topicName2, parameterDict2['dbName'])) consumerId = 0 expectrowcnt = parameterDict["rowsPerTbl"] * parameterDict["ctbNum"] + parameterDict2["rowsPerTbl"] * parameterDict2["ctbNum"] diff --git a/tests/system-test/7-tmq/subscribeDb1.py b/tests/system-test/7-tmq/subscribeDb1.py index b86364b9c3..ca87f0dba5 100644 --- a/tests/system-test/7-tmq/subscribeDb1.py +++ b/tests/system-test/7-tmq/subscribeDb1.py @@ -183,7 +183,7 @@ class TDTestCase: tdLog.info("create topics from db") topicName1 = 'topic_db1' - tdSql.execute("create topic %s as %s" %(topicName1, parameterDict['dbName'])) + tdSql.execute("create topic %s as database %s" %(topicName1, parameterDict['dbName'])) consumerId = 0 expectrowcnt = parameterDict["rowsPerTbl"] * parameterDict["ctbNum"] / 2 topicList = topicName1 @@ -261,7 +261,7 @@ class TDTestCase: tdLog.info("create topics from db") topicName1 = 'topic_db1' - tdSql.execute("create topic %s as %s" %(topicName1, parameterDict['dbName'])) + tdSql.execute("create topic %s as database %s" %(topicName1, parameterDict['dbName'])) consumerId = 0 expectrowcnt = parameterDict["rowsPerTbl"] * parameterDict["ctbNum"] / 2 topicList = topicName1 @@ -339,7 +339,7 @@ class TDTestCase: tdLog.info("create topics from db") topicName1 = 'topic_db1' - tdSql.execute("create topic %s as %s" %(topicName1, parameterDict['dbName'])) + tdSql.execute("create topic %s as database %s" %(topicName1, parameterDict['dbName'])) consumerId = 0 expectrowcnt = parameterDict["rowsPerTbl"] * parameterDict["ctbNum"] topicList = topicName1 @@ -411,7 +411,7 @@ class TDTestCase: tdLog.info("create topics from db") topicName1 = 'topic_db1' - tdSql.execute("create topic %s as %s" %(topicName1, parameterDict['dbName'])) + tdSql.execute("create topic %s as database %s" %(topicName1, parameterDict['dbName'])) consumerId = 0 expectrowcnt = parameterDict["rowsPerTbl"] * parameterDict["ctbNum"] topicList = topicName1 From 2f7ff30101af6bed809199ed53a2c07341fa23a9 Mon Sep 17 00:00:00 2001 From: tomchon Date: Tue, 31 May 2022 16:22:10 +0800 Subject: [PATCH 40/56] test:add testcase of python connector using Statement API --- ..._query.py => test_stmt_insert_query_ex.py} | 21 +- .../1-insert/test_stmt_muti_insert_query.py | 181 ++++++++++++++++++ .../1-insert/test_stmt_set_tbname_tag.py | 176 +++++++++++++++++ tests/system-test/fulltest.sh | 2 +- 4 files changed, 374 insertions(+), 6 deletions(-) rename tests/system-test/1-insert/{test_stmt_insert_query.py => test_stmt_insert_query_ex.py} (93%) create mode 100644 tests/system-test/1-insert/test_stmt_muti_insert_query.py create mode 100644 tests/system-test/1-insert/test_stmt_set_tbname_tag.py diff --git a/tests/system-test/1-insert/test_stmt_insert_query.py b/tests/system-test/1-insert/test_stmt_insert_query_ex.py similarity index 93% rename from tests/system-test/1-insert/test_stmt_insert_query.py rename to tests/system-test/1-insert/test_stmt_insert_query_ex.py index 90f168eecf..1a286ceadc 100644 --- a/tests/system-test/1-insert/test_stmt_insert_query.py +++ b/tests/system-test/1-insert/test_stmt_insert_query_ex.py @@ -230,9 +230,20 @@ class TDTestCase: querystmt1.execute() result1=querystmt1.use_result() rows1=result1.fetch_all() - assert str(rows1[0][0]) == "2021-07-21 17:56:32.589111" - assert rows1[0][10] == 3 - assert rows1[1][10] == 4 + print(rows1) + querystmt2=conn.statement("select abs(?) from log where bu < ?") + queryparam2=new_bind_params(2) + print(type(queryparam1)) + queryparam2[0].int(5) + queryparam2[1].int(5) + querystmt2.bind_param(queryparam2) + querystmt2.execute() + result2=querystmt2.use_result() + rows2=result2.fetch_all() + print(rows2) + # assert str(rows1[0][0]) == "2021-07-21 17:56:32.589111" + # assert rows1[0][10] == 3 + # assert rows1[1][10] == 4 # conn.execute("drop database if exists %s" % dbname) conn.close() @@ -248,8 +259,8 @@ class TDTestCase: host="localhost" connectstmt=self.newcon(host,config) self.test_stmt_insert_multi(connectstmt) - # connectstmt=self.newcon(host,config) - # self.test_stmt_set_tbname_tag(connectstmt) + connectstmt=self.newcon(host,config) + self.test_stmt_set_tbname_tag(connectstmt) return diff --git a/tests/system-test/1-insert/test_stmt_muti_insert_query.py b/tests/system-test/1-insert/test_stmt_muti_insert_query.py new file mode 100644 index 0000000000..486bcd8062 --- /dev/null +++ b/tests/system-test/1-insert/test_stmt_muti_insert_query.py @@ -0,0 +1,181 @@ +################################################################### +# 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 os +import threading as thd +import multiprocessing as mp +from numpy.lib.function_base import insert +import taos +from taos import * +from util.log import * +from util.cases import * +from util.sql import * +import numpy as np +import datetime as dt +from datetime import datetime +from ctypes import * +import time +# constant define +WAITS = 5 # wait seconds + +class TDTestCase: + # + # --------------- main frame ------------------- + def caseDescription(self): + ''' + limit and offset keyword function test cases; + case1: limit offset base function test + case2: offset return valid + ''' + return + + def getBuildPath(self): + selfPath = os.path.dirname(os.path.realpath(__file__)) + + if ("community" in selfPath): + projPath = selfPath[:selfPath.find("community")] + else: + projPath = selfPath[:selfPath.find("tests")] + + for root, dirs, files in os.walk(projPath): + if ("taosd" in files): + rootRealPath = os.path.dirname(os.path.realpath(root)) + if ("packaging" not in rootRealPath): + buildPath = root[:len(root)-len("/build/bin")] + break + return buildPath + + # init + def init(self, conn, logSql): + tdLog.debug("start to execute %s" % __file__) + tdSql.init(conn.cursor()) + # tdSql.prepare() + # self.create_tables(); + self.ts = 1500000000000 + + # stop + def stop(self): + tdSql.close() + tdLog.success("%s successfully executed" % __file__) + + + # --------------- case ------------------- + + + def newcon(self,host,cfg): + user = "root" + password = "taosdata" + port =6030 + con=taos.connect(host=host, user=user, password=password, config=cfg ,port=port) + print(con) + return con + + def test_stmt_insert_multi(self,conn): + # type: (TaosConnection) -> None + + dbname = "pytest_taos_stmt_multi" + try: + conn.execute("drop database if exists %s" % dbname) + conn.execute("create database if not exists %s" % dbname) + conn.select_db(dbname) + + conn.execute( + "create table if not exists log(ts timestamp, bo bool, nil tinyint, ti tinyint, si smallint, ii int,\ + bi bigint, tu tinyint unsigned, su smallint unsigned, iu int unsigned, bu bigint unsigned, \ + ff float, dd double, bb binary(100), nn nchar(100), tt timestamp)", + ) + # conn.load_table_info("log") + + start = datetime.now() + stmt = conn.statement("insert into log values(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)") + + params = new_multi_binds(16) + params[0].timestamp((1626861392589, 1626861392590, 1626861392591)) + params[1].bool((True, None, False)) + params[2].tinyint([-128, -128, None]) # -128 is tinyint null + params[3].tinyint([0, 127, None]) + params[4].smallint([3, None, 2]) + params[5].int([3, 4, None]) + params[6].bigint([3, 4, None]) + params[7].tinyint_unsigned([3, 4, None]) + params[8].smallint_unsigned([3, 4, None]) + params[9].int_unsigned([3, 4, None]) + params[10].bigint_unsigned([3, 4, None]) + params[11].float([3, None, 1]) + params[12].double([3, None, 1.2]) + params[13].binary(["abc", "dddafadfadfadfadfa", None]) + params[14].nchar(["涛思数据", None, "a long string with 中文字符"]) + params[15].timestamp([None, None, 1626861392591]) + # print(type(stmt)) + stmt.bind_param_batch(params) + stmt.execute() + end = datetime.now() + print("elapsed time: ", end - start) + assert stmt.affected_rows == 3 + + #query + querystmt=conn.statement("select ?,bu from log") + queryparam=new_bind_params(1) + print(type(queryparam)) + queryparam[0].binary("ts") + querystmt.bind_param(queryparam) + querystmt.execute() + result=querystmt.use_result() + # rows=result.fetch_all() + # print( querystmt.use_result()) + + # result = conn.query("select * from log") + rows=result.fetch_all() + # rows=result.fetch_all() + print(rows) + assert rows[1][0] == "ts" + assert rows[0][1] == 3 + + #query + querystmt1=conn.statement("select * from log where bu < ?") + queryparam1=new_bind_params(1) + print(type(queryparam1)) + queryparam1[0].int(4) + querystmt1.bind_param(queryparam1) + querystmt1.execute() + result1=querystmt1.use_result() + rows1=result1.fetch_all() + print(rows1) + assert str(rows1[0][0]) == "2021-07-21 17:56:32.589000" + assert rows1[0][10] == 3 + + + stmt.close() + + # conn.execute("drop database if exists %s" % dbname) + conn.close() + + except Exception as err: + # conn.execute("drop database if exists %s" % dbname) + conn.close() + raise err + + def run(self): + buildPath = self.getBuildPath() + config = buildPath+ "../sim/dnode1/cfg/" + host="localhost" + connectstmt=self.newcon(host,config) + self.test_stmt_insert_multi(connectstmt) + return + + +# add case with filename +# +tdCases.addWindows(__file__, TDTestCase()) +tdCases.addLinux(__file__, TDTestCase()) \ No newline at end of file diff --git a/tests/system-test/1-insert/test_stmt_set_tbname_tag.py b/tests/system-test/1-insert/test_stmt_set_tbname_tag.py new file mode 100644 index 0000000000..54d5cfbafb --- /dev/null +++ b/tests/system-test/1-insert/test_stmt_set_tbname_tag.py @@ -0,0 +1,176 @@ +################################################################### +# 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 os +import threading as thd +import multiprocessing as mp +from numpy.lib.function_base import insert +import taos +from taos import * +from util.log import * +from util.cases import * +from util.sql import * +import numpy as np +import datetime as dt +from datetime import datetime +from ctypes import * +import time +# constant define +WAITS = 5 # wait seconds + +class TDTestCase: + # + # --------------- main frame ------------------- + def caseDescription(self): + ''' + limit and offset keyword function test cases; + case1: limit offset base function test + case2: offset return valid + ''' + return + + def getBuildPath(self): + selfPath = os.path.dirname(os.path.realpath(__file__)) + + if ("community" in selfPath): + projPath = selfPath[:selfPath.find("community")] + else: + projPath = selfPath[:selfPath.find("tests")] + + for root, dirs, files in os.walk(projPath): + if ("taosd" in files): + rootRealPath = os.path.dirname(os.path.realpath(root)) + if ("packaging" not in rootRealPath): + buildPath = root[:len(root)-len("/build/bin")] + break + return buildPath + + # init + def init(self, conn, logSql): + tdLog.debug("start to execute %s" % __file__) + tdSql.init(conn.cursor()) + # tdSql.prepare() + # self.create_tables(); + self.ts = 1500000000000 + + # stop + def stop(self): + tdSql.close() + tdLog.success("%s successfully executed" % __file__) + + + # --------------- case ------------------- + + + def newcon(self,host,cfg): + user = "root" + password = "taosdata" + port =6030 + con=taos.connect(host=host, user=user, password=password, config=cfg ,port=port) + print(con) + return con + + def test_stmt_set_tbname_tag(self,conn): + dbname = "pytest_taos_stmt_set_tbname_tag" + + try: + conn.execute("drop database if exists %s" % dbname) + conn.execute("create database if not exists %s PRECISION 'us' " % dbname) + conn.select_db(dbname) + conn.execute("create table if not exists log(ts timestamp, bo bool, nil tinyint, ti tinyint, si smallint, ii int,\ + bi bigint, tu tinyint unsigned, su smallint unsigned, iu int unsigned, bu bigint unsigned, \ + ff float, dd double, bb binary(100), nn nchar(100), tt timestamp , vc varchar(100)) tags (t1 timestamp, t2 bool,\ + t3 tinyint, t4 tinyint, t5 smallint, t6 int, t7 bigint, t8 tinyint unsigned, t9 smallint unsigned, \ + t10 int unsigned, t11 bigint unsigned, t12 float, t13 double, t14 binary(100), t15 nchar(100), t16 timestamp)") + + stmt = conn.statement("insert into ? using log tags (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) \ + values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)") + tags = new_bind_params(16) + tags[0].timestamp(1626861392589123, PrecisionEnum.Microseconds) + tags[1].bool(True) + tags[2].null() + tags[3].tinyint(2) + tags[4].smallint(3) + tags[5].int(4) + tags[6].bigint(5) + tags[7].tinyint_unsigned(6) + tags[8].smallint_unsigned(7) + tags[9].int_unsigned(8) + tags[10].bigint_unsigned(9) + tags[11].float(10.1) + tags[12].double(10.11) + tags[13].binary("hello") + tags[14].nchar("stmt") + tags[15].timestamp(1626861392589, PrecisionEnum.Milliseconds) + stmt.set_tbname_tags("tb1", tags) + params = new_multi_binds(16) + params[0].timestamp((1626861392589111, 1626861392590111, 1626861392591111)) + params[1].bool((True, None, False)) + params[2].tinyint([-128, -128, None]) # -128 is tinyint null + params[3].tinyint([0, 127, None]) + params[4].smallint([3, None, 2]) + params[5].int([3, 4, None]) + params[6].bigint([3, 4, None]) + params[7].tinyint_unsigned([3, 4, None]) + params[8].smallint_unsigned([3, 4, None]) + params[9].int_unsigned([3, 4, None]) + params[10].bigint_unsigned([3, 4, 5]) + params[11].float([3, None, 1]) + params[12].double([3, None, 1.2]) + params[13].binary(["abc", "dddafadfadfadfadfa", None]) + params[14].nchar(["涛思数据", None, "a long string with 中文字符"]) + params[15].timestamp([None, None, 1626861392591]) + params[16].binary(["涛思数据16", None, "a long string with 中文-字符"]) + + stmt.bind_param_batch(params) + stmt.execute() + + assert stmt.affected_rows == 3 + + #query + querystmt1=conn.statement("select * from log where bu < ?") + queryparam1=new_bind_params(1) + print(type(queryparam1)) + queryparam1[0].int(5) + querystmt1.bind_param(queryparam1) + querystmt1.execute() + result1=querystmt1.use_result() + rows1=result1.fetch_all() + print(rows1) + # assert str(rows1[0][0]) == "2021-07-21 17:56:32.589111" + # assert rows1[0][10] == 3 + # assert rows1[1][10] == 4 + + # conn.execute("drop database if exists %s" % dbname) + conn.close() + + except Exception as err: + # conn.execute("drop database if exists %s" % dbname) + conn.close() + raise err + + def run(self): + buildPath = self.getBuildPath() + config = buildPath+ "../sim/dnode1/cfg/" + host="localhost" + connectstmt=self.newcon(host,config) + self.test_stmt_set_tbname_tag(connectstmt) + + return + + +# add case with filename +# +tdCases.addWindows(__file__, TDTestCase()) +tdCases.addLinux(__file__, TDTestCase()) \ No newline at end of file diff --git a/tests/system-test/fulltest.sh b/tests/system-test/fulltest.sh index 7f41a41cc1..e68d970ab9 100644 --- a/tests/system-test/fulltest.sh +++ b/tests/system-test/fulltest.sh @@ -15,7 +15,7 @@ python3 ./test.py -f 0-others/user_control.py python3 ./test.py -f 0-others/fsync.py python3 ./test.py -f 1-insert/opentsdb_telnet_line_taosc_insert.py -python3 ./test.py -f 1-insert/test_stmt_insert_query.py +python3 ./test.py -f 1-insert/test_stmt_muti_insert_query.py python3 ./test.py -f 2-query/between.py python3 ./test.py -f 2-query/distinct.py From 527644b6dd5f538616ea511d6921e66cd246afb8 Mon Sep 17 00:00:00 2001 From: gccgdb1234 Date: Tue, 31 May 2022 16:23:09 +0800 Subject: [PATCH 41/56] docs: refine file structure for keywords --- .../12-taos-sql/12-keywords/_category_.yml | 1 - docs-cn/12-taos-sql/12-keywords/index.md | 128 ------------------ 2 files changed, 129 deletions(-) delete mode 100644 docs-cn/12-taos-sql/12-keywords/_category_.yml delete mode 100644 docs-cn/12-taos-sql/12-keywords/index.md diff --git a/docs-cn/12-taos-sql/12-keywords/_category_.yml b/docs-cn/12-taos-sql/12-keywords/_category_.yml deleted file mode 100644 index 67738650a4..0000000000 --- a/docs-cn/12-taos-sql/12-keywords/_category_.yml +++ /dev/null @@ -1 +0,0 @@ -label: 参数限制与保留关键字 \ No newline at end of file diff --git a/docs-cn/12-taos-sql/12-keywords/index.md b/docs-cn/12-taos-sql/12-keywords/index.md deleted file mode 100644 index 0e8e1edfee..0000000000 --- a/docs-cn/12-taos-sql/12-keywords/index.md +++ /dev/null @@ -1,128 +0,0 @@ ---- -sidebar_label: 参数限制与保留关键字 -title: TDengine 参数限制与保留关键字 ---- - -## 名称命名规则 - -1. 合法字符:英文字符、数字和下划线 -2. 允许英文字符或下划线开头,不允许以数字开头 -3. 不区分大小写 -4. 转义后表(列)名规则: - 为了兼容支持更多形式的表(列)名,TDengine 引入新的转义符 "`"。可用让表名与关键词不冲突,同时不受限于上述表名称合法性约束检查。 - 转义后的表(列)名同样受到长度限制要求,且长度计算的时候不计算转义符。使用转义字符以后,不再对转义字符中的内容进行大小写统一。 - - 例如:\`aBc\` 和 \`abc\` 是不同的表(列)名,但是 abc 和 aBc 是相同的表(列)名。 - 需要注意的是转义字符中的内容必须是可打印字符。 - 支持转义符的功能从 2.3.0.1 版本开始。 - -## 密码合法字符集 - -`[a-zA-Z0-9!?$%^&*()_–+={[}]:;@~#|<,>.?/]` - -去掉了 `` ‘“`\ `` (单双引号、撇号、反斜杠、空格) - -- 数据库名:不能包含“.”以及特殊字符,不能超过 32 个字符 -- 表名:不能包含“.”以及特殊字符,与所属数据库名一起,不能超过 192 个字节 ,每行数据最大长度 48KB -- 表的列名:不能包含特殊字符,不能超过 64 个字节 -- 数据库名、表名、列名,都不能以数字开头,合法的可用字符集是“英文字符、数字和下划线” -- 表的列数:不能超过 1024 列,最少需要 2 列,第一列必须是时间戳(从 2.1.7.0 版本开始,改为最多支持 4096 列) -- 记录的最大长度:包括时间戳 8 字节,不能超过 48KB(每个 BINARY/NCHAR 类型的列还会额外占用 2 个 字节 的存储位置) -- 单条 SQL 语句默认最大字符串长度:1048576 字节,但可通过系统配置参数 maxSQLLength 修改,取值范围 65480 ~ 1048576 字节 -- 数据库副本数:不能超过 3 -- 用户名:不能超过 23 个 字节 -- 用户密码:不能超过 15 个 字节 -- 标签(Tags)数量:不能超过 128 个,可以 0 个 -- 标签的总长度:不能超过 16KB -- 记录条数:仅受存储空间限制 -- 表的个数:仅受节点个数限制 -- 库的个数:仅受节点个数限制 -- 单个库上虚拟节点个数:不能超过 64 个 -- 库的数目,超级表的数目、表的数目,系统不做限制,仅受系统资源限制 -- SELECT 语句的查询结果,最多允许返回 1024 列(语句中的函数调用可能也会占用一些列空间),超限时需要显式指定较少的返回数据列,以避免语句执行报错。(从 2.1.7.0 版本开始,改为最多允许 4096 列) - -## 保留关键字 - -目前 TDengine 有将近 200 个内部保留关键字,这些关键字无论大小写均不可以用作库名、表名、STable 名、数据列名及标签列名等。这些关键字列表如下: - -| 关键字列表 | | | | | -| ----------- | ---------- | --------- | ---------- | ------------ | -| ABORT | CREATE | IGNORE | NULL | STAR | -| ACCOUNT | CTIME | IMMEDIATE | OF | STATE | -| ACCOUNTS | DATABASE | IMPORT | OFFSET | STATEMENT | -| ADD | DATABASES | IN | OR | STATE_WINDOW | -| AFTER | DAYS | INITIALLY | ORDER | STORAGE | -| ALL | DBS | INSERT | PARTITIONS | STREAM | -| ALTER | DEFERRED | INSTEAD | PASS | STREAMS | -| AND | DELIMITERS | INT | PLUS | STRING | -| AS | DESC | INTEGER | PPS | SYNCDB | -| ASC | DESCRIBE | INTERVAL | PRECISION | TABLE | -| ATTACH | DETACH | INTO | PREV | TABLES | -| BEFORE | DISTINCT | IS | PRIVILEGE | TAG | -| BEGIN | DIVIDE | ISNULL | QTIME | TAGS | -| BETWEEN | DNODE | JOIN | QUERIES | TBNAME | -| BIGINT | DNODES | KEEP | QUERY | TIMES | -| BINARY | DOT | KEY | QUORUM | TIMESTAMP | -| BITAND | DOUBLE | KILL | RAISE | TINYINT | -| BITNOT | DROP | LE | REM | TOPIC | -| BITOR | EACH | LIKE | REPLACE | TOPICS | -| BLOCKS | END | LIMIT | REPLICA | TRIGGER | -| BOOL | EQ | LINEAR | RESET | TSERIES | -| BY | EXISTS | LOCAL | RESTRICT | UMINUS | -| CACHE | EXPLAIN | LP | ROW | UNION | -| CACHELAST | FAIL | LSHIFT | RP | UNSIGNED | -| CASCADE | FILE | LT | RSHIFT | UPDATE | -| CHANGE | FILL | MATCH | SCORES | UPLUS | -| CLUSTER | FLOAT | MAXROWS | SELECT | USE | -| COLON | FOR | MINROWS | SEMI | USER | -| COLUMN | FROM | MINUS | SESSION | USERS | -| COMMA | FSYNC | MNODES | SET | USING | -| COMP | GE | MODIFY | SHOW | VALUES | -| COMPACT | GLOB | MODULES | SLASH | VARIABLE | -| CONCAT | GRANTS | NCHAR | SLIDING | VARIABLES | -| CONFLICT | GROUP | NE | SLIMIT | VGROUPS | -| CONNECTION | GT | NONE | SMALLINT | VIEW | -| CONNECTIONS | HAVING | NOT | SOFFSET | VNODES | -| CONNS | ID | NOTNULL | STABLE | WAL | -| COPY | IF | NOW | STABLES | WHERE | -| _C0 | _QSTART | _QSTOP | _QDURATION | _WSTART | -| _WSTOP | _WDURATION | _ROWTS | - -## 特殊说明 -### TBNAME -`TBNAME` 可以视为超级表中一个特殊的标签,代表子表的表名。 - -获取一个超级表所有的子表名及相关的标签信息: -```mysql -SELECT TBNAME, location FROM meters; - -统计超级表下辖子表数量: -```mysql -SELECT COUNT(TBNAME) FROM meters; -``` - -以上两个查询均只支持在WHERE条件子句中添加针对标签(TAGS)的过滤条件。例如: -```mysql -taos> SELECT TBNAME, location FROM meters; - tbname | location | -================================================================== - d1004 | California.SanFrancisco | - d1003 | California.SanFrancisco | - d1002 | California.LosAngeles | - d1001 | California.LosAngeles | -Query OK, 4 row(s) in set (0.000881s) - -taos> SELECT COUNT(tbname) FROM meters WHERE groupId > 2; - count(tbname) | -======================== - 2 | -Query OK, 1 row(s) in set (0.001091s) -``` -### _QSTART/_QSTOP/_QDURATION -表示查询过滤窗口的起始,结束以及持续时间。 - -### _WSTART/_WSTOP/_WDURATION -窗口切分聚合查询(例如 interval/session window/state window)中表示每个切分窗口的起始,结束以及持续时间。 - -### _c0/_ROWTS -_c0 _ROWTS 等价,表示表或超级表的第一列 From bcfcc6baad78b1b10115a2149d23eab918e3b571 Mon Sep 17 00:00:00 2001 From: gccgdb1234 Date: Tue, 31 May 2022 16:28:11 +0800 Subject: [PATCH 42/56] docs: add 12-keywords.md --- docs-cn/12-taos-sql/12-keywords.md | 128 +++++++++++++++++++++++++++++ 1 file changed, 128 insertions(+) create mode 100644 docs-cn/12-taos-sql/12-keywords.md diff --git a/docs-cn/12-taos-sql/12-keywords.md b/docs-cn/12-taos-sql/12-keywords.md new file mode 100644 index 0000000000..0e8e1edfee --- /dev/null +++ b/docs-cn/12-taos-sql/12-keywords.md @@ -0,0 +1,128 @@ +--- +sidebar_label: 参数限制与保留关键字 +title: TDengine 参数限制与保留关键字 +--- + +## 名称命名规则 + +1. 合法字符:英文字符、数字和下划线 +2. 允许英文字符或下划线开头,不允许以数字开头 +3. 不区分大小写 +4. 转义后表(列)名规则: + 为了兼容支持更多形式的表(列)名,TDengine 引入新的转义符 "`"。可用让表名与关键词不冲突,同时不受限于上述表名称合法性约束检查。 + 转义后的表(列)名同样受到长度限制要求,且长度计算的时候不计算转义符。使用转义字符以后,不再对转义字符中的内容进行大小写统一。 + + 例如:\`aBc\` 和 \`abc\` 是不同的表(列)名,但是 abc 和 aBc 是相同的表(列)名。 + 需要注意的是转义字符中的内容必须是可打印字符。 + 支持转义符的功能从 2.3.0.1 版本开始。 + +## 密码合法字符集 + +`[a-zA-Z0-9!?$%^&*()_–+={[}]:;@~#|<,>.?/]` + +去掉了 `` ‘“`\ `` (单双引号、撇号、反斜杠、空格) + +- 数据库名:不能包含“.”以及特殊字符,不能超过 32 个字符 +- 表名:不能包含“.”以及特殊字符,与所属数据库名一起,不能超过 192 个字节 ,每行数据最大长度 48KB +- 表的列名:不能包含特殊字符,不能超过 64 个字节 +- 数据库名、表名、列名,都不能以数字开头,合法的可用字符集是“英文字符、数字和下划线” +- 表的列数:不能超过 1024 列,最少需要 2 列,第一列必须是时间戳(从 2.1.7.0 版本开始,改为最多支持 4096 列) +- 记录的最大长度:包括时间戳 8 字节,不能超过 48KB(每个 BINARY/NCHAR 类型的列还会额外占用 2 个 字节 的存储位置) +- 单条 SQL 语句默认最大字符串长度:1048576 字节,但可通过系统配置参数 maxSQLLength 修改,取值范围 65480 ~ 1048576 字节 +- 数据库副本数:不能超过 3 +- 用户名:不能超过 23 个 字节 +- 用户密码:不能超过 15 个 字节 +- 标签(Tags)数量:不能超过 128 个,可以 0 个 +- 标签的总长度:不能超过 16KB +- 记录条数:仅受存储空间限制 +- 表的个数:仅受节点个数限制 +- 库的个数:仅受节点个数限制 +- 单个库上虚拟节点个数:不能超过 64 个 +- 库的数目,超级表的数目、表的数目,系统不做限制,仅受系统资源限制 +- SELECT 语句的查询结果,最多允许返回 1024 列(语句中的函数调用可能也会占用一些列空间),超限时需要显式指定较少的返回数据列,以避免语句执行报错。(从 2.1.7.0 版本开始,改为最多允许 4096 列) + +## 保留关键字 + +目前 TDengine 有将近 200 个内部保留关键字,这些关键字无论大小写均不可以用作库名、表名、STable 名、数据列名及标签列名等。这些关键字列表如下: + +| 关键字列表 | | | | | +| ----------- | ---------- | --------- | ---------- | ------------ | +| ABORT | CREATE | IGNORE | NULL | STAR | +| ACCOUNT | CTIME | IMMEDIATE | OF | STATE | +| ACCOUNTS | DATABASE | IMPORT | OFFSET | STATEMENT | +| ADD | DATABASES | IN | OR | STATE_WINDOW | +| AFTER | DAYS | INITIALLY | ORDER | STORAGE | +| ALL | DBS | INSERT | PARTITIONS | STREAM | +| ALTER | DEFERRED | INSTEAD | PASS | STREAMS | +| AND | DELIMITERS | INT | PLUS | STRING | +| AS | DESC | INTEGER | PPS | SYNCDB | +| ASC | DESCRIBE | INTERVAL | PRECISION | TABLE | +| ATTACH | DETACH | INTO | PREV | TABLES | +| BEFORE | DISTINCT | IS | PRIVILEGE | TAG | +| BEGIN | DIVIDE | ISNULL | QTIME | TAGS | +| BETWEEN | DNODE | JOIN | QUERIES | TBNAME | +| BIGINT | DNODES | KEEP | QUERY | TIMES | +| BINARY | DOT | KEY | QUORUM | TIMESTAMP | +| BITAND | DOUBLE | KILL | RAISE | TINYINT | +| BITNOT | DROP | LE | REM | TOPIC | +| BITOR | EACH | LIKE | REPLACE | TOPICS | +| BLOCKS | END | LIMIT | REPLICA | TRIGGER | +| BOOL | EQ | LINEAR | RESET | TSERIES | +| BY | EXISTS | LOCAL | RESTRICT | UMINUS | +| CACHE | EXPLAIN | LP | ROW | UNION | +| CACHELAST | FAIL | LSHIFT | RP | UNSIGNED | +| CASCADE | FILE | LT | RSHIFT | UPDATE | +| CHANGE | FILL | MATCH | SCORES | UPLUS | +| CLUSTER | FLOAT | MAXROWS | SELECT | USE | +| COLON | FOR | MINROWS | SEMI | USER | +| COLUMN | FROM | MINUS | SESSION | USERS | +| COMMA | FSYNC | MNODES | SET | USING | +| COMP | GE | MODIFY | SHOW | VALUES | +| COMPACT | GLOB | MODULES | SLASH | VARIABLE | +| CONCAT | GRANTS | NCHAR | SLIDING | VARIABLES | +| CONFLICT | GROUP | NE | SLIMIT | VGROUPS | +| CONNECTION | GT | NONE | SMALLINT | VIEW | +| CONNECTIONS | HAVING | NOT | SOFFSET | VNODES | +| CONNS | ID | NOTNULL | STABLE | WAL | +| COPY | IF | NOW | STABLES | WHERE | +| _C0 | _QSTART | _QSTOP | _QDURATION | _WSTART | +| _WSTOP | _WDURATION | _ROWTS | + +## 特殊说明 +### TBNAME +`TBNAME` 可以视为超级表中一个特殊的标签,代表子表的表名。 + +获取一个超级表所有的子表名及相关的标签信息: +```mysql +SELECT TBNAME, location FROM meters; + +统计超级表下辖子表数量: +```mysql +SELECT COUNT(TBNAME) FROM meters; +``` + +以上两个查询均只支持在WHERE条件子句中添加针对标签(TAGS)的过滤条件。例如: +```mysql +taos> SELECT TBNAME, location FROM meters; + tbname | location | +================================================================== + d1004 | California.SanFrancisco | + d1003 | California.SanFrancisco | + d1002 | California.LosAngeles | + d1001 | California.LosAngeles | +Query OK, 4 row(s) in set (0.000881s) + +taos> SELECT COUNT(tbname) FROM meters WHERE groupId > 2; + count(tbname) | +======================== + 2 | +Query OK, 1 row(s) in set (0.001091s) +``` +### _QSTART/_QSTOP/_QDURATION +表示查询过滤窗口的起始,结束以及持续时间。 + +### _WSTART/_WSTOP/_WDURATION +窗口切分聚合查询(例如 interval/session window/state window)中表示每个切分窗口的起始,结束以及持续时间。 + +### _c0/_ROWTS +_c0 _ROWTS 等价,表示表或超级表的第一列 From f8d29a12abc223f0a3b963725d44a6147919813a Mon Sep 17 00:00:00 2001 From: plum-lihui Date: Tue, 31 May 2022 16:46:01 +0800 Subject: [PATCH 43/56] test: support taosc run by valgrind to python cases --- tests/pytest/util/dnodes.py | 38 +++++++++++++++++++++---------------- tests/system-test/test.py | 10 ++++++++-- 2 files changed, 30 insertions(+), 18 deletions(-) diff --git a/tests/pytest/util/dnodes.py b/tests/pytest/util/dnodes.py index b8cb73cb44..2e11b93e5f 100644 --- a/tests/pytest/util/dnodes.py +++ b/tests/pytest/util/dnodes.py @@ -494,6 +494,7 @@ class TDDnodes: self.simDeployed = False self.testCluster = False self.valgrind = 0 + self.killValgrind = 1 def init(self, path, remoteIP = ""): psCmd = "ps -ef|grep -w taosd| grep -v grep| grep -v defunct | awk '{print $2}'" @@ -505,14 +506,15 @@ class TDDnodes: processID = subprocess.check_output( psCmd, shell=True).decode("utf-8") - psCmd = "ps -ef|grep -w valgrind.bin| grep -v grep | awk '{print $2}'" - processID = subprocess.check_output(psCmd, shell=True).decode("utf-8") - while(processID): - killCmd = "kill -9 %s > /dev/null 2>&1" % processID - os.system(killCmd) - time.sleep(1) - processID = subprocess.check_output( - psCmd, shell=True).decode("utf-8") + if self.killValgrind == 1: + psCmd = "ps -ef|grep -w valgrind.bin| grep -v grep | awk '{print $2}'" + processID = subprocess.check_output(psCmd, shell=True).decode("utf-8") + while(processID): + killCmd = "kill -9 %s > /dev/null 2>&1" % processID + os.system(killCmd) + time.sleep(1) + processID = subprocess.check_output( + psCmd, shell=True).decode("utf-8") binPath = self.dnodes[0].getPath() + "/../../../" # tdLog.debug("binPath %s" % (binPath)) @@ -549,6 +551,9 @@ class TDDnodes: def setValgrind(self, value): self.valgrind = value + def setKillValgrind(self, value): + self.killValgrind = value + def deploy(self, index, *updatecfgDict): self.sim.setTestCluster(self.testCluster) @@ -622,14 +627,15 @@ class TDDnodes: processID = subprocess.check_output( psCmd, shell=True).decode("utf-8") - psCmd = "ps -ef|grep -w valgrind.bin| grep -v grep | awk '{print $2}'" - processID = subprocess.check_output(psCmd, shell=True).decode("utf-8") - while(processID): - killCmd = "kill -TERM %s > /dev/null 2>&1" % processID - os.system(killCmd) - time.sleep(1) - processID = subprocess.check_output( - psCmd, shell=True).decode("utf-8") + if self.killValgrind == 1: + psCmd = "ps -ef|grep -w valgrind.bin| grep -v grep | awk '{print $2}'" + processID = subprocess.check_output(psCmd, shell=True).decode("utf-8") + while(processID): + killCmd = "kill -TERM %s > /dev/null 2>&1" % processID + os.system(killCmd) + time.sleep(1) + processID = subprocess.check_output( + psCmd, shell=True).decode("utf-8") # if os.system(cmd) != 0 : # tdLog.exit(cmd) diff --git a/tests/system-test/test.py b/tests/system-test/test.py index 6b6487918c..a11085708c 100644 --- a/tests/system-test/test.py +++ b/tests/system-test/test.py @@ -37,6 +37,7 @@ if __name__ == "__main__": masterIp = "" testCluster = False valgrind = 0 + killValgrind = 1 logSql = True stop = 0 restart = False @@ -45,8 +46,8 @@ if __name__ == "__main__": windows = 1 updateCfgDict = {} execCmd = "" - opts, args = getopt.gnu_getopt(sys.argv[1:], 'f:p:m:l:scghrd:e:', [ - 'file=', 'path=', 'master', 'logSql', 'stop', 'cluster', 'valgrind', 'help', 'restart', 'updateCfgDict', 'execCmd']) + opts, args = getopt.gnu_getopt(sys.argv[1:], 'f:p:m:l:scghrd:k:e:', [ + 'file=', 'path=', 'master', 'logSql', 'stop', 'cluster', 'valgrind', 'help', 'restart', 'updateCfgDict', 'killv', 'execCmd']) for key, value in opts: if key in ['-h', '--help']: tdLog.printNoPrefix( @@ -60,6 +61,7 @@ if __name__ == "__main__": tdLog.printNoPrefix('-g valgrind Test Flag') tdLog.printNoPrefix('-r taosd restart test') tdLog.printNoPrefix('-d update cfg dict, base64 json str') + tdLog.printNoPrefix('-k not kill valgrind processer') tdLog.printNoPrefix('-e eval str to run') sys.exit(0) @@ -100,6 +102,9 @@ if __name__ == "__main__": print('updateCfgDict convert fail.') sys.exit(0) + if key in ['-k', '--killValgrind']: + killValgrind = 0 + if key in ['-e', '--execCmd']: try: execCmd = base64.b64decode(value.encode()).decode() @@ -189,6 +194,7 @@ if __name__ == "__main__": else: tdCases.runAllWindows(conn) else: + tdDnodes.setKillValgrind(killValgrind) tdDnodes.init(deployPath, masterIp) tdDnodes.setTestCluster(testCluster) tdDnodes.setValgrind(valgrind) From 0fdb225d7eea68dfd4005dc874aea573cb535e65 Mon Sep 17 00:00:00 2001 From: Liu Jicong Date: Tue, 31 May 2022 16:49:52 +0800 Subject: [PATCH 44/56] fix: parser --- source/libs/parser/src/parTranslater.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c index 9fff330ef0..af2c13946d 100644 --- a/source/libs/parser/src/parTranslater.c +++ b/source/libs/parser/src/parTranslater.c @@ -3317,9 +3317,8 @@ static int32_t buildCreateTopicReq(STranslateContext* pCxt, SCreateTopicStmt* pS tNameGetFullDbName(&name, pReq->subDbName); } else { pReq->subType = TOPIC_SUB_TYPE__COLUMN; - tNameSetDbName(&name, pCxt->pParseCxt->acctId, - ((SRealTableNode*)(((SSelectStmt*)pStmt->pQuery)->pFromTable))->table.dbName, - strlen(pStmt->subDbName)); + char* dbName = ((SRealTableNode*)(((SSelectStmt*)pStmt->pQuery)->pFromTable))->table.dbName; + tNameSetDbName(&name, pCxt->pParseCxt->acctId, dbName, strlen(dbName)); tNameGetFullDbName(&name, pReq->subDbName); pCxt->pParseCxt->topicQuery = true; code = translateQuery(pCxt, pStmt->pQuery); From 18ca6d93e7dc0af7dd530b8db8ce6f2e50eaadbb Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Tue, 31 May 2022 16:55:16 +0800 Subject: [PATCH 45/56] refactor: make trans support multi steps --- source/dnode/mnode/impl/inc/mndDef.h | 2 +- source/dnode/mnode/impl/inc/mndTrans.h | 2 +- source/dnode/mnode/impl/src/mndMnode.c | 4 +- source/dnode/mnode/impl/src/mndSma.c | 2 +- source/dnode/mnode/impl/src/mndTrans.c | 114 ++++++++++++++----------- 5 files changed, 70 insertions(+), 54 deletions(-) diff --git a/source/dnode/mnode/impl/inc/mndDef.h b/source/dnode/mnode/impl/inc/mndDef.h index fd0f54c66b..9a60ad860f 100644 --- a/source/dnode/mnode/impl/inc/mndDef.h +++ b/source/dnode/mnode/impl/inc/mndDef.h @@ -129,7 +129,7 @@ typedef enum { typedef enum { TRN_EXEC_PARALLEL = 0, - TRN_EXEC_ONE_BY_ONE = 1, + TRN_EXEC_NO_PARALLEL = 1, } ETrnExecType; typedef enum { diff --git a/source/dnode/mnode/impl/inc/mndTrans.h b/source/dnode/mnode/impl/inc/mndTrans.h index a7e1f7cd02..ba6f5faf1e 100644 --- a/source/dnode/mnode/impl/inc/mndTrans.h +++ b/source/dnode/mnode/impl/inc/mndTrans.h @@ -62,7 +62,7 @@ int32_t mndTransAppendUndoAction(STrans *pTrans, STransAction *pAction); void mndTransSetRpcRsp(STrans *pTrans, void *pCont, int32_t contLen); void mndTransSetCb(STrans *pTrans, ETrnFunc startFunc, ETrnFunc stopFunc, void *param, int32_t paramLen); void mndTransSetDbInfo(STrans *pTrans, SDbObj *pDb); -void mndTransSetExecOneByOne(STrans *pTrans); +void mndTransSetNoParallel(STrans *pTrans); int32_t mndTransPrepare(SMnode *pMnode, STrans *pTrans); void mndTransProcessRsp(SRpcMsg *pRsp); diff --git a/source/dnode/mnode/impl/src/mndMnode.c b/source/dnode/mnode/impl/src/mndMnode.c index 8c5ea840af..5b8ba6deaa 100644 --- a/source/dnode/mnode/impl/src/mndMnode.c +++ b/source/dnode/mnode/impl/src/mndMnode.c @@ -367,7 +367,7 @@ static int32_t mndCreateMnode(SMnode *pMnode, SRpcMsg *pReq, SDnodeObj *pDnode, if (pTrans == NULL) goto _OVER; mDebug("trans:%d, used to create mnode:%d", pTrans->id, pCreate->dnodeId); - mndTransSetExecOneByOne(pTrans); + mndTransSetNoParallel(pTrans); if (mndSetCreateMnodeRedoLogs(pMnode, pTrans, &mnodeObj) != 0) goto _OVER; if (mndSetCreateMnodeCommitLogs(pMnode, pTrans, &mnodeObj) != 0) goto _OVER; if (mndSetCreateMnodeRedoActions(pMnode, pTrans, pDnode, &mnodeObj) != 0) goto _OVER; @@ -539,7 +539,7 @@ static int32_t mndDropMnode(SMnode *pMnode, SRpcMsg *pReq, SMnodeObj *pObj) { if (pTrans == NULL) goto _OVER; mDebug("trans:%d, used to drop mnode:%d", pTrans->id, pObj->id); - mndTransSetExecOneByOne(pTrans); + mndTransSetNoParallel(pTrans); if (mndSetDropMnodeRedoLogs(pMnode, pTrans, pObj) != 0) goto _OVER; if (mndSetDropMnodeCommitLogs(pMnode, pTrans, pObj) != 0) goto _OVER; if (mndSetDropMnodeRedoActions(pMnode, pTrans, pObj->pDnode, pObj) != 0) goto _OVER; diff --git a/source/dnode/mnode/impl/src/mndSma.c b/source/dnode/mnode/impl/src/mndSma.c index 7b5d1b6c32..0493b00d33 100644 --- a/source/dnode/mnode/impl/src/mndSma.c +++ b/source/dnode/mnode/impl/src/mndSma.c @@ -507,7 +507,7 @@ static int32_t mndCreateSma(SMnode *pMnode, SRpcMsg *pReq, SMCreateSmaReq *pCrea mDebug("trans:%d, used to create sma:%s", pTrans->id, pCreate->name); mndTransSetDbInfo(pTrans, pDb); - mndTransSetExecOneByOne(pTrans); + mndTransSetNoParallel(pTrans); if (mndSetCreateSmaRedoLogs(pMnode, pTrans, &smaObj) != 0) goto _OVER; if (mndSetCreateSmaVgroupRedoLogs(pMnode, pTrans, &streamObj.fixedSinkVg) != 0) goto _OVER; diff --git a/source/dnode/mnode/impl/src/mndTrans.c b/source/dnode/mnode/impl/src/mndTrans.c index c5a1e0ba5a..ad6388c585 100644 --- a/source/dnode/mnode/impl/src/mndTrans.c +++ b/source/dnode/mnode/impl/src/mndTrans.c @@ -120,8 +120,8 @@ static SSdbRaw *mndTransActionEncode(STrans *pTrans) { SDB_SET_INT16(pRaw, dataPos, pTrans->type, _OVER) SDB_SET_INT16(pRaw, dataPos, pTrans->parallel, _OVER) SDB_SET_INT64(pRaw, dataPos, pTrans->createdTime, _OVER) - SDB_SET_INT64(pRaw, dataPos, pTrans->dbUid, _OVER) SDB_SET_BINARY(pRaw, dataPos, pTrans->dbname, TSDB_DB_FNAME_LEN, _OVER) + SDB_SET_INT32(pRaw, dataPos, pTrans->redoActionPos, _OVER) int32_t redoActionNum = taosArrayGetSize(pTrans->redoActions); int32_t undoActionNum = taosArrayGetSize(pTrans->undoActions); @@ -261,8 +261,8 @@ static SSdbRow *mndTransActionDecode(SSdbRaw *pRaw) { pTrans->type = type; pTrans->parallel = parallel; SDB_GET_INT64(pRaw, dataPos, &pTrans->createdTime, _OVER) - SDB_GET_INT64(pRaw, dataPos, &pTrans->dbUid, _OVER) SDB_GET_BINARY(pRaw, dataPos, pTrans->dbname, TSDB_DB_FNAME_LEN, _OVER) + SDB_GET_INT32(pRaw, dataPos, &pTrans->redoActionPos, _OVER) SDB_GET_INT32(pRaw, dataPos, &redoActionNum, _OVER) SDB_GET_INT32(pRaw, dataPos, &undoActionNum, _OVER) SDB_GET_INT32(pRaw, dataPos, &commitActionNum, _OVER) @@ -567,6 +567,7 @@ static int32_t mndTransActionUpdate(SSdb *pSdb, STrans *pOld, STrans *pNew) { mndTransUpdateActions(pOld->undoActions, pNew->undoActions); mndTransUpdateActions(pOld->commitActions, pNew->commitActions); pOld->stage = pNew->stage; + pOld->redoActionPos = pNew->redoActionPos; if (pOld->stage == TRN_STAGE_COMMIT) { pOld->stage = TRN_STAGE_COMMIT_ACTION; @@ -694,11 +695,10 @@ void mndTransSetCb(STrans *pTrans, ETrnFunc startFunc, ETrnFunc stopFunc, void * } void mndTransSetDbInfo(STrans *pTrans, SDbObj *pDb) { - pTrans->dbUid = pDb->uid; memcpy(pTrans->dbname, pDb->name, TSDB_DB_FNAME_LEN); } -void mndTransSetExecOneByOne(STrans *pTrans) { pTrans->parallel = TRN_EXEC_ONE_BY_ONE; } +void mndTransSetNoParallel(STrans *pTrans) { pTrans->parallel = TRN_EXEC_NO_PARALLEL; } static int32_t mndTransSync(SMnode *pMnode, STrans *pTrans) { SSdbRaw *pRaw = mndTransActionEncode(pTrans); @@ -708,7 +708,7 @@ static int32_t mndTransSync(SMnode *pMnode, STrans *pTrans) { } sdbSetRawStatus(pRaw, SDB_STATUS_READY); - mDebug("trans:%d, sync to other nodes", pTrans->id); + mDebug("trans:%d, sync to other mnodes", pTrans->id); int32_t code = mndSyncPropose(pMnode, pRaw, pTrans->id); if (code != 0) { mError("trans:%d, failed to sync since %s", pTrans->id, terrstr()); @@ -761,7 +761,7 @@ static bool mndCheckTransConflict(SMnode *pMnode, STrans *pNewTrans) { mError("trans:%d, can't execute since trans:%d in progress", pNewTrans->id, pTrans->id); conflict = true; } else if (mndIsDbTrans(pTrans) || mndIsStbTrans(pTrans)) { - if (pNewTrans->dbUid == pTrans->dbUid) { + if (strcmp(pNewTrans->dbname, pTrans->dbname) == 0) { mError("trans:%d, can't execute since trans:%d in progress db:%s", pNewTrans->id, pTrans->id, pTrans->dbname); conflict = true; } @@ -774,7 +774,7 @@ static bool mndCheckTransConflict(SMnode *pMnode, STrans *pNewTrans) { mError("trans:%d, can't execute since trans:%d in progress", pNewTrans->id, pTrans->id); conflict = true; } else if (mndIsDbTrans(pTrans)) { - if (pNewTrans->dbUid == pTrans->dbUid) { + if (strcmp(pNewTrans->dbname, pTrans->dbname) == 0) { mError("trans:%d, can't execute since trans:%d in progress db:%s", pNewTrans->id, pTrans->id, pTrans->dbname); conflict = true; } @@ -856,7 +856,7 @@ static void mndTransSendRpcRsp(SMnode *pMnode, STrans *pTrans) { } if (pTrans->policy == TRN_POLICY_ROLLBACK) { - if (pTrans->stage == pTrans->stage == TRN_STAGE_UNDO_ACTION || pTrans->stage == TRN_STAGE_ROLLBACK) { + if (pTrans->stage == TRN_STAGE_UNDO_ACTION || pTrans->stage == TRN_STAGE_ROLLBACK) { if (code == 0) code = TSDB_CODE_MND_TRANS_UNKNOW_ERROR; sendRsp = true; } @@ -876,12 +876,7 @@ static void mndTransSendRpcRsp(SMnode *pMnode, STrans *pTrans) { mDebug("trans:%d, send rsp, code:0x%x stage:%s app:%p", pTrans->id, code, mndTransStr(pTrans->stage), pTrans->rpcInfo.ahandle); - SRpcMsg rspMsg = { - .code = code, - .pCont = rpcCont, - .contLen = pTrans->rpcRspLen, - .info = pTrans->rpcInfo, - }; + SRpcMsg rspMsg = {.code = code, .pCont = rpcCont, .contLen = pTrans->rpcRspLen, .info = pTrans->rpcInfo}; tmsgSendRsp(&rspMsg); pTrans->rpcInfo.handle = NULL; pTrans->rpcRsp = NULL; @@ -944,7 +939,6 @@ static void mndTransResetActions(SMnode *pMnode, STrans *pTrans, SArray *pArray) for (int32_t action = 0; action < numOfActions; ++action) { STransAction *pAction = taosArrayGet(pArray, action); - if (pAction == NULL) continue; if (pAction->msgSent && pAction->msgReceived && (pAction->errCode == 0 || pAction->errCode == pAction->acceptableCode)) continue; @@ -1017,16 +1011,14 @@ static int32_t mndTransExecSingleAction(SMnode *pMnode, STrans *pTrans, STransAc } } -static int32_t mndTransSendActionMsg(SMnode *pMnode, STrans *pTrans, SArray *pArray) { +static int32_t mndTransExecSingleActions(SMnode *pMnode, STrans *pTrans, SArray *pArray) { int32_t numOfActions = taosArrayGetSize(pArray); int32_t code = 0; for (int32_t action = 0; action < numOfActions; ++action) { STransAction *pAction = taosArrayGet(pArray, action); code = mndTransExecSingleAction(pMnode, pTrans, pAction); - if (code != 0 && code != TSDB_CODE_ACTION_IN_PROGRESS) { - break; - } + if (code != 0) break; } return code; @@ -1036,7 +1028,7 @@ static int32_t mndTransExecuteActions(SMnode *pMnode, STrans *pTrans, SArray *pA int32_t numOfActions = taosArrayGetSize(pArray); if (numOfActions == 0) return 0; - if (mndTransSendActionMsg(pMnode, pTrans, pArray) != 0) { + if (mndTransExecSingleActions(pMnode, pTrans, pArray) != 0) { return -1; } @@ -1044,8 +1036,7 @@ static int32_t mndTransExecuteActions(SMnode *pMnode, STrans *pTrans, SArray *pA int32_t errCode = 0; for (int32_t action = 0; action < numOfActions; ++action) { STransAction *pAction = taosArrayGet(pArray, action); - if (pAction == NULL) continue; - if ((pAction->msgSent && pAction->msgReceived) || pAction->rawWritten) { + if (pAction->msgReceived || pAction->rawWritten) { numOfExecuted++; if (pAction->errCode != 0 && pAction->errCode != pAction->acceptableCode) { errCode = pAction->errCode; @@ -1087,12 +1078,61 @@ static int32_t mndTransExecuteUndoActions(SMnode *pMnode, STrans *pTrans) { static int32_t mndTransExecuteCommitActions(SMnode *pMnode, STrans *pTrans) { int32_t code = mndTransExecuteActions(pMnode, pTrans, pTrans->commitActions); - if (code != 0) { + if (code != 0 && code != TSDB_CODE_ACTION_IN_PROGRESS) { mError("failed to execute commitActions since %s", terrstr()); } return code; } +static int32_t mndTransExecuteRedoActionsNoParallel(SMnode *pMnode, STrans *pTrans) { + int32_t code = 0; + int32_t numOfActions = taosArrayGetSize(pTrans->redoActions); + if (numOfActions == 0) return code; + if (pTrans->redoActionPos >= numOfActions) return code; + + for (int32_t action = pTrans->redoActionPos; action < numOfActions; ++action) { + STransAction *pAction = taosArrayGet(pTrans->redoActions, pTrans->redoActionPos); + + code = mndTransExecSingleAction(pMnode, pTrans, pAction); + if (code == 0) { + if (pAction->msgSent) { + if (pAction->msgReceived) { + if (pAction->errCode != 0 && pAction->errCode != pAction->acceptableCode) { + code = pAction->errCode; + } + } else { + code = TSDB_CODE_ACTION_IN_PROGRESS; + } + } + if (pAction->rawWritten) { + if (pAction->errCode != 0 && pAction->errCode != pAction->acceptableCode) { + code = pAction->errCode; + } + } + } + + if (code == 0) { + pTrans->redoActionPos++; + mDebug("trans:%d, %s:%d is executed and need sync to other mnodes", pTrans->id, mndTransStr(pAction->stage), + pAction->id); + code = mndTransSync(pMnode, pTrans); + if (code != 0) { + mError("trans:%d, failed to sync redoActionPos since %s", pTrans->id, terrstr()); + break; + } + } else if (code == TSDB_CODE_ACTION_IN_PROGRESS) { + mDebug("trans:%d, %s:%d is in progress and wait it finish", pTrans->id, mndTransStr(pAction->stage), pAction->id); + break; + } else { + mError("trans:%d, %s:%d failed to execute since %s", pTrans->id, mndTransStr(pAction->stage), pAction->id, + terrstr()); + break; + } + } + + return code; +} + static bool mndTransPerformPrepareStage(SMnode *pMnode, STrans *pTrans) { bool continueExec = true; pTrans->stage = TRN_STAGE_REDO_ACTION; @@ -1100,36 +1140,12 @@ static bool mndTransPerformPrepareStage(SMnode *pMnode, STrans *pTrans) { return continueExec; } -static bool mndTransExecuteRedoActionsOneByOne(SMnode *pMnode, STrans *pTrans) { - bool continueExec = true; - if (pTrans->redoActionPos >= taosArrayGetSize(pTrans->redoActions)) return continueExec; - - STransAction *pAction = taosArrayGet(pTrans->redoActions, pTrans->redoActionPos); - int32_t code = mndTransExecSingleAction(pMnode, pTrans, pAction); - if (code == 0) { - pTrans->redoActionPos++; - mDebug("trans:%d, %s:%d is executed and need sync to other mnodes", pTrans->id, mndTransStr(pAction->stage), - pAction->id); - - // todo sync these infos - } else if (code == TSDB_CODE_ACTION_IN_PROGRESS) { - mDebug("trans:%d, %s:%d is in progress and wait it finish", pTrans->id, mndTransStr(pAction->stage), pAction->id); - continueExec = false; - } else { - mError("trans:%d, %s:%d failed to execute since %s", pTrans->id, mndTransStr(pAction->stage), pAction->id, - terrstr()); - continueExec = false; - } - - return continueExec; -} - static bool mndTransPerformRedoActionStage(SMnode *pMnode, STrans *pTrans) { bool continueExec = true; int32_t code = 0; - if (pTrans->parallel == TRN_EXEC_ONE_BY_ONE) { - code = mndTransExecuteRedoActionsOneByOne(pMnode, pTrans); + if (pTrans->parallel == TRN_EXEC_NO_PARALLEL) { + code = mndTransExecuteRedoActionsNoParallel(pMnode, pTrans); } else { code = mndTransExecuteRedoActions(pMnode, pTrans); } From d595b5a0808e2ce586bc7039104b998b785ebc5b Mon Sep 17 00:00:00 2001 From: Zhengmao Zhu <70138133+fenghuazzm@users.noreply.github.com> Date: Tue, 31 May 2022 16:05:24 +0800 Subject: [PATCH 46/56] docs: Correction of typos in the taosdump page --- docs-cn/14-reference/06-taosdump.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs-cn/14-reference/06-taosdump.md b/docs-cn/14-reference/06-taosdump.md index 7131493ec9..3a9f2e9acd 100644 --- a/docs-cn/14-reference/06-taosdump.md +++ b/docs-cn/14-reference/06-taosdump.md @@ -38,7 +38,7 @@ taosdump 有两种安装方式: :::tip - taosdump 1.4.1 之后的版本提供 `-I` 参数,用于解析 avro 文件 schema 和数据,如果指定 `-s` 参数将只解析 schema。 -- taosdump 1.4.2 之后的备份使用 `-B` 参数指定的批次数,默认值为 16384,如果在某些环境下由于网络速度或磁盘性能不足导致 "Error actual dump .. batch .." 可以通过 `-B` 参数挑战为更小的值进行尝试。 +- taosdump 1.4.2 之后的备份使用 `-B` 参数指定的批次数,默认值为 16384,如果在某些环境下由于网络速度或磁盘性能不足导致 "Error actual dump .. batch .." 可以通过 `-B` 参数调整为更小的值进行尝试。 ::: From 4169eb559a2e08a39a97db6376640384601475de Mon Sep 17 00:00:00 2001 From: Liu Jicong Date: Tue, 31 May 2022 17:02:43 +0800 Subject: [PATCH 47/56] fix(tmq): skip log --- source/dnode/vnode/src/tq/tq.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/source/dnode/vnode/src/tq/tq.c b/source/dnode/vnode/src/tq/tq.c index 16201994f0..b4747f2264 100644 --- a/source/dnode/vnode/src/tq/tq.c +++ b/source/dnode/vnode/src/tq/tq.c @@ -441,14 +441,8 @@ int32_t tqProcessPollReq(STQ* pTq, SRpcMsg* pMsg, int32_t workerId) { break; } - tqDebug("tmq poll vg %d: offset %ld msgType %d", pTq->pVnode->config.vgId, fetchOffset, - pHeadWithCkSum->head.msgType); - SWalReadHead* pHead = &pHeadWithCkSum->head; - tqDebug("tmq poll vg %d: offset %ld msgType %d", pTq->pVnode->config.vgId, fetchOffset, - pHeadWithCkSum->head.msgType); - #if 0 SWalReadHead* pHead; if (walReadWithHandle_s(pExec->pWalReader, fetchOffset, &pHead) < 0) { @@ -499,6 +493,8 @@ int32_t tqProcessPollReq(STQ* pTq, SRpcMsg* pMsg, int32_t workerId) { // TODO continue scan until meeting batch requirement if (rsp.blockNum > 0 /* threshold */) { break; + } else { + fetchOffset++; } } From 3eb4afd82e81ab1bdeb98faff6291da8d6ec5c51 Mon Sep 17 00:00:00 2001 From: tomchon Date: Tue, 31 May 2022 17:06:33 +0800 Subject: [PATCH 48/56] test:modify testcase of python connector using Statement API --- .../1-insert/test_stmt_insert_query_ex.py | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/tests/system-test/1-insert/test_stmt_insert_query_ex.py b/tests/system-test/1-insert/test_stmt_insert_query_ex.py index 1a286ceadc..376b60d615 100644 --- a/tests/system-test/1-insert/test_stmt_insert_query_ex.py +++ b/tests/system-test/1-insert/test_stmt_insert_query_ex.py @@ -213,7 +213,7 @@ class TDTestCase: params[11].float([3, None, 1]) params[12].double([3, None, 1.2]) params[13].binary(["abc", "dddafadfadfadfadfa", None]) - params[14].nchar(["涛思数据", None, "a long string with 中文字符"]) + params[14].nchar(["涛思数据", None, "a? long string with 中文字符"]) params[15].timestamp([None, None, 1626861392591]) stmt.bind_param_batch(params) @@ -230,17 +230,28 @@ class TDTestCase: querystmt1.execute() result1=querystmt1.use_result() rows1=result1.fetch_all() - print(rows1) + print("1",rows1) + querystmt2=conn.statement("select abs(?) from log where bu < ?") queryparam2=new_bind_params(2) - print(type(queryparam1)) + print(type(queryparam2)) queryparam2[0].int(5) queryparam2[1].int(5) querystmt2.bind_param(queryparam2) querystmt2.execute() result2=querystmt2.use_result() rows2=result2.fetch_all() - print(rows2) + print("2",rows2) + + querystmt3=conn.statement("select abs(?) from log where nn= 'a? long string with 中文字符' ") + queryparam3=new_bind_params(1) + print(type(queryparam3)) + queryparam3[0].int(5) + querystmt3.bind_param(queryparam3) + querystmt3.execute() + result3=querystmt3.use_result() + rows3=result3.fetch_all() + print("3",rows3) # assert str(rows1[0][0]) == "2021-07-21 17:56:32.589111" # assert rows1[0][10] == 3 # assert rows1[1][10] == 4 From 5c8d59e562e590e6682a78673014c731933a03fa Mon Sep 17 00:00:00 2001 From: Liu Jicong Date: Tue, 31 May 2022 17:15:23 +0800 Subject: [PATCH 49/56] fix(parser): create topic ut --- source/libs/parser/test/parInitialCTest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/libs/parser/test/parInitialCTest.cpp b/source/libs/parser/test/parInitialCTest.cpp index 8b545b3cb4..65d5194936 100644 --- a/source/libs/parser/test/parInitialCTest.cpp +++ b/source/libs/parser/test/parInitialCTest.cpp @@ -491,7 +491,7 @@ TEST_F(ParserInitialCTest, createTopic) { expect.ast = (char*)pAst; } else { expect.subType = TOPIC_SUB_TYPE__DB; - snprintf(expect.subStbName, sizeof(expect.subStbName), "0.%s", pDbName); + snprintf(expect.subDbName, sizeof(expect.subDbName), "0.%s", pDbName); } }; From 870f24a0c9ee7a29d78686cbea97e0e65a54a36e Mon Sep 17 00:00:00 2001 From: 54liuyao <54liuyao@163.com> Date: Tue, 31 May 2022 17:15:43 +0800 Subject: [PATCH 50/56] feat(stream):adjust bloom filter --- source/libs/stream/src/tstreamUpdate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/libs/stream/src/tstreamUpdate.c b/source/libs/stream/src/tstreamUpdate.c index 6935355a93..ada391b40a 100644 --- a/source/libs/stream/src/tstreamUpdate.c +++ b/source/libs/stream/src/tstreamUpdate.c @@ -42,7 +42,7 @@ static void windowSBfAdd(SUpdateInfo *pInfo, uint64_t count) { } static void windowSBfDelete(SUpdateInfo *pInfo, uint64_t count) { - if (count < pInfo->numSBFs - 1) { + if (count < pInfo->numSBFs) { for (uint64_t i = 0; i < count; ++i) { SScalableBf *pTsSBFs = taosArrayGetP(pInfo->pTsSBFs, 0); tScalableBfDestroy(pTsSBFs); From aa6569fa690ec474a2e280b5bd1e007a2e6a84b1 Mon Sep 17 00:00:00 2001 From: gccgdb1234 Date: Tue, 31 May 2022 17:28:54 +0800 Subject: [PATCH 51/56] docs: add chapter for operators --- docs-cn/12-taos-sql/07-function.md | 29 ------------ docs-cn/12-taos-sql/13-operators.md | 71 +++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+), 29 deletions(-) create mode 100644 docs-cn/12-taos-sql/13-operators.md diff --git a/docs-cn/12-taos-sql/07-function.md b/docs-cn/12-taos-sql/07-function.md index 2349e6aa3c..b924aad042 100644 --- a/docs-cn/12-taos-sql/07-function.md +++ b/docs-cn/12-taos-sql/07-function.md @@ -1464,35 +1464,6 @@ SELECT ROUND(field_name) FROM { tb_name | stb_name } [WHERE clause]; - 该函数适用于内层查询和外层查询。 - 版本2.6.0.x后支持 -### 四则运算 - -``` -SELECT field_name [+|-|*|/|%][Value|field_name] FROM { tb_name | stb_name } [WHERE clause]; -``` - -**功能说明**:统计表/超级表中某列或多列间的值加、减、乘、除、取余计算结果。 - -**返回数据类型**:双精度浮点数。 - -**应用字段**:不能应用在 timestamp、binary、nchar、bool 类型字段。 - -**适用于**:表、超级表。 - -**使用说明**: - -- 支持两列或多列之间进行计算,可使用括号控制计算优先级; -- NULL 字段不参与计算,如果参与计算的某行中包含 NULL,该行的计算结果为 NULL。 - -``` -taos> SELECT current + voltage * phase FROM d1001; -(current+(voltage*phase)) | -============================ - 78.190000713 | - 84.540003240 | - 80.810000718 | -Query OK, 3 row(s) in set (0.001046s) -``` - ### STATECOUNT ``` diff --git a/docs-cn/12-taos-sql/13-operators.md b/docs-cn/12-taos-sql/13-operators.md new file mode 100644 index 0000000000..4480988286 --- /dev/null +++ b/docs-cn/12-taos-sql/13-operators.md @@ -0,0 +1,71 @@ +--- +sidebar_label: 运算符 +title: 运算符 +--- + +## 算术运算符 + +| # | **运算符** | **支持的类型** | **说明** | +| --- | :--------: | -------------- | -------------------------- | +| 1 | +, - | 数值类型 | 表达正数和负数,一元运算符 | +| 2 | +, - | 数值类型 | 表示加法和减法,二元运算符 | +| 3 | \*, / | 数值类型 | 表示乘法和除法,二元运算符 | +| 4 | % | 数值类型 | 表示取余运算,二元运算符 | + +## 位运算符 + +| # | **运算符** | **支持的类型** | **说明** | +| --- | :--------: | -------------- | ------------------ | +| 1 | & | 数值类型 | 按位与,二元运算符 | +| 2 | \| | 数值类型 | 按位或,二元运算符 | + +## JSON 运算符 + +`->` 运算符可以对 JSON 类型的列按键取值。->左侧是列标识符,右侧是键的字符串常量,如 col->'name',返回键'name'的值。 + +## 集合运算符 + +集合运算符将两个查询的结果合并为一个结果。包含集合运算符的查询称之为复合查询。复合查询中每条查询的选择列表中的相应表达式在数量上必须匹配,并且必须位于同一数据类型组中(如数值类型或字符串类型)。 + +- 对于字符串类型数据,返回值的数据类型按如下方式确定: + - 如果具有相同的类型(都为 BINARY 或都为 NCHAR),则返回此类型,并以较大的长度作为返回值长度。 + - 如果具有不同的类型,则返回 BINARY 类型,并以较大的长度(NCHAR 类型长度按四倍计算)作为返回值长度。 +- 对于数值类型数据,返回值的数据类型是数字表达范围较大的那个。 + +TDengine 支持 `UNION ALL` 操作符。UNION ALL 将查询返回的结果集合并返回,并不去重。在同一个 SQL 语句中,UNION ALL 最多支持 100 个。 + +## 比较运算符 + +| # | **运算符** | **支持的类型** | **说明** | +| --- | :---------------: | -------------------------------------------------------------------- | -------------------- | +| 1 | = | 除 BLOB、MEDIUMBLOB 和 JSON 外的所有类型 | 相等 | +| 2 | <\>, != | 除 BLOB、MEDIUMBLOB 和 JSON 外的所有类型,且不可以为表的时间戳主键列 | 不相等 | +| 3 | \>, \< | 除 BLOB、MEDIUMBLOB 和 JSON 外的所有类型 | 大于,小于 | +| 4 | \>=, \<= | 除 BLOB、MEDIUMBLOB 和 JSON 外的所有类型 | 大于等于,小于等于 | +| 5 | IS [NOT] NULL | 所有类型 | 是否为空值 | +| 6 | [NOT] BETWEEN AND | 除 BOOL、BLOB、MEDIUMBLOB 和 JSON 外的所有类型 | 闭区间比较 | +| 7 | IN | 除 BLOB、MEDIUMBLOB 和 JSON 外的所有类型,且不可以为表的时间戳主键列 | 与列表内的任意值相等 | +| 8 | LIKE | BINARY、NCHAR 和 VARCHAR | 通配符匹配 | +| 9 | MATCH, NMATCH | BINARY、NCHAR 和 VARCHAR | 正则表达式匹配 | +| 10 | CONTAINS | JSON | JSON 中是否存在某键 | + +LIKE 条件使用通配符字符串进行匹配检查,规则如下: + +- '%'(百分号)匹配 0 到任意个字符;'\_'(下划线)匹配单个任意 ASCII 字符。 +- 如果希望匹配字符串中原本就带有的 \_(下划线)字符,那么可以在通配符字符串中写作 \_,即加一个反斜线来进行转义。 +- 通配符字符串最长不能超过 100 字节。不建议使用太长的通配符字符串,否则将有可能严重影响 LIKE 操作的执行性能。 + +MATCH 条件和 NMATCH 条件使用正则表达式进行匹配,规则如下: + +- 支持符合 POSIX 规范的正则表达式,具体规范内容可参见 Regular Expressions。 +- 只能针对子表名(即 tbname)、字符串类型的标签值进行正则表达式过滤,不支持普通列的过滤。 +- 正则匹配字符串长度不能超过 128 字节。可以通过参数 maxRegexStringLen 设置和调整最大允许的正则匹配字符串,该参数是客户端配置参数,需要重启客户端才能生效 + +## 逻辑运算符 + +| # | **运算符** | **支持的类型** | **说明** | +| --- | :--------: | -------------- | --------------------------------------------------------------------------- | +| 1 | AND | BOOL | 逻辑与,如果两个条件均为 TRUE, 则返回 TRUE。如果任一为 FALSE,则返回 FALSE | +| 2 | OR | BOOL | 逻辑或,如果任一条件为 TRUE, 则返回 TRUE。如果两者都是 FALSE,则返回 FALSE | + +TDengine 在计算逻辑条件时,会进行短路径优化,即对于 AND,第一个条件为 FALSE,则不再计算第二个条件,直接返回 FALSE;对于 OR,第一个条件为 TRUE,则不再计算第二个条件,直接返回 TRUE。 From 7322f92ad63194df5b3c15786e71472e6edadb28 Mon Sep 17 00:00:00 2001 From: Xiaoyu Wang <59301069+xiao-yu-wang@users.noreply.github.com> Date: Tue, 31 May 2022 17:56:03 +0800 Subject: [PATCH 52/56] Update 13-operators.md --- docs-cn/12-taos-sql/13-operators.md | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/docs-cn/12-taos-sql/13-operators.md b/docs-cn/12-taos-sql/13-operators.md index 4480988286..65b1a65dcb 100644 --- a/docs-cn/12-taos-sql/13-operators.md +++ b/docs-cn/12-taos-sql/13-operators.md @@ -25,14 +25,9 @@ title: 运算符 ## 集合运算符 -集合运算符将两个查询的结果合并为一个结果。包含集合运算符的查询称之为复合查询。复合查询中每条查询的选择列表中的相应表达式在数量上必须匹配,并且必须位于同一数据类型组中(如数值类型或字符串类型)。 +集合运算符将两个查询的结果合并为一个结果。包含集合运算符的查询称之为复合查询。复合查询中每条查询的选择列表中的相应表达式在数量上必须匹配,且结果类型以第一条查询为准,后续查询的结果类型必须可转换到第一条查询的结果类型,转换规则同 CAST 函数。 -- 对于字符串类型数据,返回值的数据类型按如下方式确定: - - 如果具有相同的类型(都为 BINARY 或都为 NCHAR),则返回此类型,并以较大的长度作为返回值长度。 - - 如果具有不同的类型,则返回 BINARY 类型,并以较大的长度(NCHAR 类型长度按四倍计算)作为返回值长度。 -- 对于数值类型数据,返回值的数据类型是数字表达范围较大的那个。 - -TDengine 支持 `UNION ALL` 操作符。UNION ALL 将查询返回的结果集合并返回,并不去重。在同一个 SQL 语句中,UNION ALL 最多支持 100 个。 +TDengine 支持 `UNION ALL` 和 `UNION` 操作符。UNION ALL 将查询返回的结果集合并返回,并不去重。UNION 将查询返回的结果集合并并去重后返回。在同一个 SQL 语句中,集合操作符最多支持 100 个。 ## 比较运算符 From d805439568b260c7685c35563b9f248bac8d24d6 Mon Sep 17 00:00:00 2001 From: Xiaoyu Wang Date: Tue, 31 May 2022 18:09:19 +0800 Subject: [PATCH 53/56] fix: compile error --- source/libs/parser/src/sql.c | 1792 ++++++++++------------------------ 1 file changed, 543 insertions(+), 1249 deletions(-) diff --git a/source/libs/parser/src/sql.c b/source/libs/parser/src/sql.c index d180b4892f..7fb89bdd7c 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,7 +22,10 @@ ** The following is the concatenation of all %include directives from the ** input grammar file: */ +#include +#include /************ Begin %include sections from the grammar ************************/ + #include #include #include @@ -37,247 +38,11 @@ #include "ttokendef.h" #include "parAst.h" /**************** 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_USER 33 -#define TK_PRIVILEGE 34 -#define TK_DROP 35 -#define TK_GRANT 36 -#define TK_ON 37 -#define TK_TO 38 -#define TK_REVOKE 39 -#define TK_FROM 40 -#define TK_NK_COMMA 41 -#define TK_READ 42 -#define TK_WRITE 43 -#define TK_NK_DOT 44 -#define TK_DNODE 45 -#define TK_PORT 46 -#define TK_NK_INTEGER 47 -#define TK_DNODES 48 -#define TK_NK_IPTOKEN 49 -#define TK_LOCAL 50 -#define TK_QNODE 51 -#define TK_BNODE 52 -#define TK_SNODE 53 -#define TK_MNODE 54 -#define TK_DATABASE 55 -#define TK_USE 56 -#define TK_IF 57 -#define TK_NOT 58 -#define TK_EXISTS 59 -#define TK_BUFFER 60 -#define TK_CACHELAST 61 -#define TK_COMP 62 -#define TK_DAYS 63 -#define TK_NK_VARIABLE 64 -#define TK_FSYNC 65 -#define TK_MAXROWS 66 -#define TK_MINROWS 67 -#define TK_KEEP 68 -#define TK_PAGES 69 -#define TK_PAGESIZE 70 -#define TK_PRECISION 71 -#define TK_REPLICA 72 -#define TK_STRICT 73 -#define TK_WAL 74 -#define TK_VGROUPS 75 -#define TK_SINGLE_STABLE 76 -#define TK_RETENTIONS 77 -#define TK_SCHEMALESS 78 -#define TK_NK_COLON 79 -#define TK_TABLE 80 -#define TK_NK_LP 81 -#define TK_NK_RP 82 -#define TK_STABLE 83 -#define TK_ADD 84 -#define TK_COLUMN 85 -#define TK_MODIFY 86 -#define TK_RENAME 87 -#define TK_TAG 88 -#define TK_SET 89 -#define TK_NK_EQ 90 -#define TK_USING 91 -#define TK_TAGS 92 -#define TK_COMMENT 93 -#define TK_BOOL 94 -#define TK_TINYINT 95 -#define TK_SMALLINT 96 -#define TK_INT 97 -#define TK_INTEGER 98 -#define TK_BIGINT 99 -#define TK_FLOAT 100 -#define TK_DOUBLE 101 -#define TK_BINARY 102 -#define TK_TIMESTAMP 103 -#define TK_NCHAR 104 -#define TK_UNSIGNED 105 -#define TK_JSON 106 -#define TK_VARCHAR 107 -#define TK_MEDIUMBLOB 108 -#define TK_BLOB 109 -#define TK_VARBINARY 110 -#define TK_DECIMAL 111 -#define TK_FILE_FACTOR 112 -#define TK_NK_FLOAT 113 -#define TK_ROLLUP 114 -#define TK_TTL 115 -#define TK_SMA 116 -#define TK_SHOW 117 -#define TK_DATABASES 118 -#define TK_TABLES 119 -#define TK_STABLES 120 -#define TK_MNODES 121 -#define TK_MODULES 122 -#define TK_QNODES 123 -#define TK_FUNCTIONS 124 -#define TK_INDEXES 125 -#define TK_ACCOUNTS 126 -#define TK_APPS 127 -#define TK_CONNECTIONS 128 -#define TK_LICENCE 129 -#define TK_GRANTS 130 -#define TK_QUERIES 131 -#define TK_SCORES 132 -#define TK_TOPICS 133 -#define TK_VARIABLES 134 -#define TK_BNODES 135 -#define TK_SNODES 136 -#define TK_CLUSTER 137 -#define TK_TRANSACTIONS 138 -#define TK_LIKE 139 -#define TK_INDEX 140 -#define TK_FULLTEXT 141 -#define TK_FUNCTION 142 -#define TK_INTERVAL 143 -#define TK_TOPIC 144 -#define TK_AS 145 -#define TK_CONSUMER 146 -#define TK_GROUP 147 -#define TK_DESC 148 -#define TK_DESCRIBE 149 -#define TK_RESET 150 -#define TK_QUERY 151 -#define TK_CACHE 152 -#define TK_EXPLAIN 153 -#define TK_ANALYZE 154 -#define TK_VERBOSE 155 -#define TK_NK_BOOL 156 -#define TK_RATIO 157 -#define TK_COMPACT 158 -#define TK_VNODES 159 -#define TK_IN 160 -#define TK_OUTPUTTYPE 161 -#define TK_AGGREGATE 162 -#define TK_BUFSIZE 163 -#define TK_STREAM 164 -#define TK_INTO 165 -#define TK_TRIGGER 166 -#define TK_AT_ONCE 167 -#define TK_WINDOW_CLOSE 168 -#define TK_WATERMARK 169 -#define TK_KILL 170 -#define TK_CONNECTION 171 -#define TK_TRANSACTION 172 -#define TK_MERGE 173 -#define TK_VGROUP 174 -#define TK_REDISTRIBUTE 175 -#define TK_SPLIT 176 -#define TK_SYNCDB 177 -#define TK_NULL 178 -#define TK_NK_QUESTION 179 -#define TK_NK_ARROW 180 -#define TK_ROWTS 181 -#define TK_TBNAME 182 -#define TK_QSTARTTS 183 -#define TK_QENDTS 184 -#define TK_WSTARTTS 185 -#define TK_WENDTS 186 -#define TK_WDURATION 187 -#define TK_CAST 188 -#define TK_NOW 189 -#define TK_TODAY 190 -#define TK_TIMEZONE 191 -#define TK_COUNT 192 -#define TK_FIRST 193 -#define TK_LAST 194 -#define TK_LAST_ROW 195 -#define TK_BETWEEN 196 -#define TK_IS 197 -#define TK_NK_LT 198 -#define TK_NK_GT 199 -#define TK_NK_LE 200 -#define TK_NK_GE 201 -#define TK_NK_NE 202 -#define TK_MATCH 203 -#define TK_NMATCH 204 -#define TK_CONTAINS 205 -#define TK_JOIN 206 -#define TK_INNER 207 -#define TK_SELECT 208 -#define TK_DISTINCT 209 -#define TK_WHERE 210 -#define TK_PARTITION 211 -#define TK_BY 212 -#define TK_SESSION 213 -#define TK_STATE_WINDOW 214 -#define TK_SLIDING 215 -#define TK_FILL 216 -#define TK_VALUE 217 -#define TK_NONE 218 -#define TK_PREV 219 -#define TK_LINEAR 220 -#define TK_NEXT 221 -#define TK_HAVING 222 -#define TK_ORDER 223 -#define TK_SLIMIT 224 -#define TK_SOFFSET 225 -#define TK_LIMIT 226 -#define TK_OFFSET 227 -#define TK_ASC 228 -#define TK_NULLS 229 -#define TK_ID 230 -#define TK_NK_BITNOT 231 -#define TK_INSERT 232 -#define TK_VALUES 233 -#define TK_IMPORT 234 -#define TK_NK_SEMI 235 -#define TK_FILE 236 -#endif -/**************** End token definitions ***************************************/ +/* 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. @@ -371,7 +136,6 @@ typedef union { #define YYFALLBACK 1 #define YYNSTATE 612 #define YYNRULE 451 -#define YYNRULE_WITH_ACTION 451 #define YYNTOKEN 237 #define YY_MAX_SHIFT 611 #define YY_MIN_SHIFTREDUCE 898 @@ -876,31 +640,7 @@ static const YYCODETYPE yy_lookahead[] = { /* 2090 */ 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, /* 2100 */ 328, 329, 330, 357, 332, 357, 357, 335, 357, 357, /* 2110 */ 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, - /* 2120 */ 348, 357, 357, 357, 352, 237, 237, 237, 237, 237, - /* 2130 */ 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, - /* 2140 */ 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, - /* 2150 */ 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, - /* 2160 */ 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, - /* 2170 */ 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, - /* 2180 */ 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, - /* 2190 */ 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, - /* 2200 */ 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, - /* 2210 */ 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, - /* 2220 */ 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, - /* 2230 */ 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, - /* 2240 */ 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, - /* 2250 */ 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, - /* 2260 */ 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, - /* 2270 */ 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, - /* 2280 */ 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, - /* 2290 */ 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, - /* 2300 */ 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, - /* 2310 */ 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, - /* 2320 */ 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, - /* 2330 */ 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, - /* 2340 */ 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, - /* 2350 */ 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, - /* 2360 */ 237, 237, + /* 2120 */ 348, 357, 357, 357, 352, }; #define YY_SHIFT_COUNT (611) #define YY_SHIFT_MIN (0) @@ -1370,7 +1110,6 @@ struct yyParser { }; typedef struct yyParser yyParser; -#include #ifndef NDEBUG #include static FILE *yyTraceFILE = 0; @@ -2643,18 +2382,15 @@ static YYACTIONTYPE yy_find_shift_action( do{ i = yy_shift_ofst[stateno]; assert( i>=0 ); - assert( i<=YY_ACTTAB_COUNT ); - assert( i+YYNTOKEN<=(int)YY_NLOOKAHEAD ); + /* assert( i+YYNTOKEN<=(int)YY_NLOOKAHEAD ); */ assert( iLookAhead!=YYNOCODE ); assert( iLookAhead < YYNTOKEN ); i += iLookAhead; - assert( i<(int)YY_NLOOKAHEAD ); - if( yy_lookahead[i]!=iLookAhead ){ + if( i>=YY_NLOOKAHEAD || yy_lookahead[i]!=iLookAhead ){ #ifdef YYFALLBACK YYCODETYPE iFallback; /* Fallback token */ - assert( iLookAhead %s\n", @@ -2669,8 +2405,16 @@ static YYACTIONTYPE yy_find_shift_action( #ifdef YYWILDCARD { int j = i - iLookAhead + YYWILDCARD; - assert( j<(int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0])) ); - if( yy_lookahead[j]==YYWILDCARD && iLookAhead>0 ){ + if( +#if YY_SHIFT_MIN+YYWILDCARD<0 + j>=0 && +#endif +#if YY_SHIFT_MAX+YYWILDCARD>=YY_ACTTAB_COUNT + j0 + ){ #ifndef NDEBUG if( yyTraceFILE ){ fprintf(yyTraceFILE, "%sWILDCARD %s => %s\n", @@ -2684,7 +2428,6 @@ static YYACTIONTYPE yy_find_shift_action( #endif /* YYWILDCARD */ return yy_default[stateno]; }else{ - assert( i>=0 && i<(int)(sizeof(yy_action)/sizeof(yy_action[0])) ); return yy_action[i]; } }while(1); @@ -2803,916 +2546,464 @@ static void yy_shift( yyTraceShift(yypParser, yyNewState, "Shift"); } -/* For rule J, yyRuleInfoLhs[J] contains the symbol on the left-hand side -** of that rule */ -static const YYCODETYPE yyRuleInfoLhs[] = { - 237, /* (0) cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */ - 237, /* (1) cmd ::= ALTER ACCOUNT NK_ID alter_account_options */ - 238, /* (2) account_options ::= */ - 238, /* (3) account_options ::= account_options PPS literal */ - 238, /* (4) account_options ::= account_options TSERIES literal */ - 238, /* (5) account_options ::= account_options STORAGE literal */ - 238, /* (6) account_options ::= account_options STREAMS literal */ - 238, /* (7) account_options ::= account_options QTIME literal */ - 238, /* (8) account_options ::= account_options DBS literal */ - 238, /* (9) account_options ::= account_options USERS literal */ - 238, /* (10) account_options ::= account_options CONNS literal */ - 238, /* (11) account_options ::= account_options STATE literal */ - 239, /* (12) alter_account_options ::= alter_account_option */ - 239, /* (13) alter_account_options ::= alter_account_options alter_account_option */ - 241, /* (14) alter_account_option ::= PASS literal */ - 241, /* (15) alter_account_option ::= PPS literal */ - 241, /* (16) alter_account_option ::= TSERIES literal */ - 241, /* (17) alter_account_option ::= STORAGE literal */ - 241, /* (18) alter_account_option ::= STREAMS literal */ - 241, /* (19) alter_account_option ::= QTIME literal */ - 241, /* (20) alter_account_option ::= DBS literal */ - 241, /* (21) alter_account_option ::= USERS literal */ - 241, /* (22) alter_account_option ::= CONNS literal */ - 241, /* (23) alter_account_option ::= STATE literal */ - 237, /* (24) cmd ::= CREATE USER user_name PASS NK_STRING */ - 237, /* (25) cmd ::= ALTER USER user_name PASS NK_STRING */ - 237, /* (26) cmd ::= ALTER USER user_name PRIVILEGE NK_STRING */ - 237, /* (27) cmd ::= DROP USER user_name */ - 237, /* (28) cmd ::= GRANT privileges ON priv_level TO user_name */ - 237, /* (29) cmd ::= REVOKE privileges ON priv_level FROM user_name */ - 243, /* (30) privileges ::= ALL */ - 243, /* (31) privileges ::= priv_type_list */ - 245, /* (32) priv_type_list ::= priv_type */ - 245, /* (33) priv_type_list ::= priv_type_list NK_COMMA priv_type */ - 246, /* (34) priv_type ::= READ */ - 246, /* (35) priv_type ::= WRITE */ - 244, /* (36) priv_level ::= NK_STAR NK_DOT NK_STAR */ - 244, /* (37) priv_level ::= db_name NK_DOT NK_STAR */ - 237, /* (38) cmd ::= CREATE DNODE dnode_endpoint */ - 237, /* (39) cmd ::= CREATE DNODE dnode_host_name PORT NK_INTEGER */ - 237, /* (40) cmd ::= DROP DNODE NK_INTEGER */ - 237, /* (41) cmd ::= DROP DNODE dnode_endpoint */ - 237, /* (42) cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ - 237, /* (43) cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */ - 237, /* (44) cmd ::= ALTER ALL DNODES NK_STRING */ - 237, /* (45) cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */ - 248, /* (46) dnode_endpoint ::= NK_STRING */ - 249, /* (47) dnode_host_name ::= NK_ID */ - 249, /* (48) dnode_host_name ::= NK_IPTOKEN */ - 237, /* (49) cmd ::= ALTER LOCAL NK_STRING */ - 237, /* (50) cmd ::= ALTER LOCAL NK_STRING NK_STRING */ - 237, /* (51) cmd ::= CREATE QNODE ON DNODE NK_INTEGER */ - 237, /* (52) cmd ::= DROP QNODE ON DNODE NK_INTEGER */ - 237, /* (53) cmd ::= CREATE BNODE ON DNODE NK_INTEGER */ - 237, /* (54) cmd ::= DROP BNODE ON DNODE NK_INTEGER */ - 237, /* (55) cmd ::= CREATE SNODE ON DNODE NK_INTEGER */ - 237, /* (56) cmd ::= DROP SNODE ON DNODE NK_INTEGER */ - 237, /* (57) cmd ::= CREATE MNODE ON DNODE NK_INTEGER */ - 237, /* (58) cmd ::= DROP MNODE ON DNODE NK_INTEGER */ - 237, /* (59) cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ - 237, /* (60) cmd ::= DROP DATABASE exists_opt db_name */ - 237, /* (61) cmd ::= USE db_name */ - 237, /* (62) cmd ::= ALTER DATABASE db_name alter_db_options */ - 250, /* (63) not_exists_opt ::= IF NOT EXISTS */ - 250, /* (64) not_exists_opt ::= */ - 252, /* (65) exists_opt ::= IF EXISTS */ - 252, /* (66) exists_opt ::= */ - 251, /* (67) db_options ::= */ - 251, /* (68) db_options ::= db_options BUFFER NK_INTEGER */ - 251, /* (69) db_options ::= db_options CACHELAST NK_INTEGER */ - 251, /* (70) db_options ::= db_options COMP NK_INTEGER */ - 251, /* (71) db_options ::= db_options DAYS NK_INTEGER */ - 251, /* (72) db_options ::= db_options DAYS NK_VARIABLE */ - 251, /* (73) db_options ::= db_options FSYNC NK_INTEGER */ - 251, /* (74) db_options ::= db_options MAXROWS NK_INTEGER */ - 251, /* (75) db_options ::= db_options MINROWS NK_INTEGER */ - 251, /* (76) db_options ::= db_options KEEP integer_list */ - 251, /* (77) db_options ::= db_options KEEP variable_list */ - 251, /* (78) db_options ::= db_options PAGES NK_INTEGER */ - 251, /* (79) db_options ::= db_options PAGESIZE NK_INTEGER */ - 251, /* (80) db_options ::= db_options PRECISION NK_STRING */ - 251, /* (81) db_options ::= db_options REPLICA NK_INTEGER */ - 251, /* (82) db_options ::= db_options STRICT NK_INTEGER */ - 251, /* (83) db_options ::= db_options WAL NK_INTEGER */ - 251, /* (84) db_options ::= db_options VGROUPS NK_INTEGER */ - 251, /* (85) db_options ::= db_options SINGLE_STABLE NK_INTEGER */ - 251, /* (86) db_options ::= db_options RETENTIONS retention_list */ - 251, /* (87) db_options ::= db_options SCHEMALESS NK_INTEGER */ - 253, /* (88) alter_db_options ::= alter_db_option */ - 253, /* (89) alter_db_options ::= alter_db_options alter_db_option */ - 257, /* (90) alter_db_option ::= BUFFER NK_INTEGER */ - 257, /* (91) alter_db_option ::= CACHELAST NK_INTEGER */ - 257, /* (92) alter_db_option ::= FSYNC NK_INTEGER */ - 257, /* (93) alter_db_option ::= KEEP integer_list */ - 257, /* (94) alter_db_option ::= KEEP variable_list */ - 257, /* (95) alter_db_option ::= PAGES NK_INTEGER */ - 257, /* (96) alter_db_option ::= REPLICA NK_INTEGER */ - 257, /* (97) alter_db_option ::= STRICT NK_INTEGER */ - 257, /* (98) alter_db_option ::= WAL NK_INTEGER */ - 254, /* (99) integer_list ::= NK_INTEGER */ - 254, /* (100) integer_list ::= integer_list NK_COMMA NK_INTEGER */ - 255, /* (101) variable_list ::= NK_VARIABLE */ - 255, /* (102) variable_list ::= variable_list NK_COMMA NK_VARIABLE */ - 256, /* (103) retention_list ::= retention */ - 256, /* (104) retention_list ::= retention_list NK_COMMA retention */ - 258, /* (105) retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ - 237, /* (106) cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ - 237, /* (107) cmd ::= CREATE TABLE multi_create_clause */ - 237, /* (108) cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ - 237, /* (109) cmd ::= DROP TABLE multi_drop_clause */ - 237, /* (110) cmd ::= DROP STABLE exists_opt full_table_name */ - 237, /* (111) cmd ::= ALTER TABLE alter_table_clause */ - 237, /* (112) cmd ::= ALTER STABLE alter_table_clause */ - 266, /* (113) alter_table_clause ::= full_table_name alter_table_options */ - 266, /* (114) alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ - 266, /* (115) alter_table_clause ::= full_table_name DROP COLUMN column_name */ - 266, /* (116) alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ - 266, /* (117) alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ - 266, /* (118) alter_table_clause ::= full_table_name ADD TAG column_name type_name */ - 266, /* (119) alter_table_clause ::= full_table_name DROP TAG column_name */ - 266, /* (120) alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ - 266, /* (121) alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ - 266, /* (122) alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */ - 263, /* (123) multi_create_clause ::= create_subtable_clause */ - 263, /* (124) multi_create_clause ::= multi_create_clause create_subtable_clause */ - 271, /* (125) create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_tags_opt TAGS NK_LP literal_list NK_RP table_options */ - 265, /* (126) multi_drop_clause ::= drop_table_clause */ - 265, /* (127) multi_drop_clause ::= multi_drop_clause drop_table_clause */ - 274, /* (128) drop_table_clause ::= exists_opt full_table_name */ - 272, /* (129) specific_tags_opt ::= */ - 272, /* (130) specific_tags_opt ::= NK_LP col_name_list NK_RP */ - 259, /* (131) full_table_name ::= table_name */ - 259, /* (132) full_table_name ::= db_name NK_DOT table_name */ - 260, /* (133) column_def_list ::= column_def */ - 260, /* (134) column_def_list ::= column_def_list NK_COMMA column_def */ - 277, /* (135) column_def ::= column_name type_name */ - 277, /* (136) column_def ::= column_name type_name COMMENT NK_STRING */ - 269, /* (137) type_name ::= BOOL */ - 269, /* (138) type_name ::= TINYINT */ - 269, /* (139) type_name ::= SMALLINT */ - 269, /* (140) type_name ::= INT */ - 269, /* (141) type_name ::= INTEGER */ - 269, /* (142) type_name ::= BIGINT */ - 269, /* (143) type_name ::= FLOAT */ - 269, /* (144) type_name ::= DOUBLE */ - 269, /* (145) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ - 269, /* (146) type_name ::= TIMESTAMP */ - 269, /* (147) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ - 269, /* (148) type_name ::= TINYINT UNSIGNED */ - 269, /* (149) type_name ::= SMALLINT UNSIGNED */ - 269, /* (150) type_name ::= INT UNSIGNED */ - 269, /* (151) type_name ::= BIGINT UNSIGNED */ - 269, /* (152) type_name ::= JSON */ - 269, /* (153) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ - 269, /* (154) type_name ::= MEDIUMBLOB */ - 269, /* (155) type_name ::= BLOB */ - 269, /* (156) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ - 269, /* (157) type_name ::= DECIMAL */ - 269, /* (158) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ - 269, /* (159) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ - 261, /* (160) tags_def_opt ::= */ - 261, /* (161) tags_def_opt ::= tags_def */ - 264, /* (162) tags_def ::= TAGS NK_LP column_def_list NK_RP */ - 262, /* (163) table_options ::= */ - 262, /* (164) table_options ::= table_options COMMENT NK_STRING */ - 262, /* (165) table_options ::= table_options FILE_FACTOR NK_FLOAT */ - 262, /* (166) table_options ::= table_options ROLLUP NK_LP func_name_list NK_RP */ - 262, /* (167) table_options ::= table_options TTL NK_INTEGER */ - 262, /* (168) table_options ::= table_options SMA NK_LP col_name_list NK_RP */ - 267, /* (169) alter_table_options ::= alter_table_option */ - 267, /* (170) alter_table_options ::= alter_table_options alter_table_option */ - 279, /* (171) alter_table_option ::= COMMENT NK_STRING */ - 279, /* (172) alter_table_option ::= TTL NK_INTEGER */ - 275, /* (173) col_name_list ::= col_name */ - 275, /* (174) col_name_list ::= col_name_list NK_COMMA col_name */ - 280, /* (175) col_name ::= column_name */ - 237, /* (176) cmd ::= SHOW DNODES */ - 237, /* (177) cmd ::= SHOW USERS */ - 237, /* (178) cmd ::= SHOW DATABASES */ - 237, /* (179) cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */ - 237, /* (180) cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ - 237, /* (181) cmd ::= SHOW db_name_cond_opt VGROUPS */ - 237, /* (182) cmd ::= SHOW MNODES */ - 237, /* (183) cmd ::= SHOW MODULES */ - 237, /* (184) cmd ::= SHOW QNODES */ - 237, /* (185) cmd ::= SHOW FUNCTIONS */ - 237, /* (186) cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ - 237, /* (187) cmd ::= SHOW STREAMS */ - 237, /* (188) cmd ::= SHOW ACCOUNTS */ - 237, /* (189) cmd ::= SHOW APPS */ - 237, /* (190) cmd ::= SHOW CONNECTIONS */ - 237, /* (191) cmd ::= SHOW LICENCE */ - 237, /* (192) cmd ::= SHOW GRANTS */ - 237, /* (193) cmd ::= SHOW CREATE DATABASE db_name */ - 237, /* (194) cmd ::= SHOW CREATE TABLE full_table_name */ - 237, /* (195) cmd ::= SHOW CREATE STABLE full_table_name */ - 237, /* (196) cmd ::= SHOW QUERIES */ - 237, /* (197) cmd ::= SHOW SCORES */ - 237, /* (198) cmd ::= SHOW TOPICS */ - 237, /* (199) cmd ::= SHOW VARIABLES */ - 237, /* (200) cmd ::= SHOW BNODES */ - 237, /* (201) cmd ::= SHOW SNODES */ - 237, /* (202) cmd ::= SHOW CLUSTER */ - 237, /* (203) cmd ::= SHOW TRANSACTIONS */ - 281, /* (204) db_name_cond_opt ::= */ - 281, /* (205) db_name_cond_opt ::= db_name NK_DOT */ - 282, /* (206) like_pattern_opt ::= */ - 282, /* (207) like_pattern_opt ::= LIKE NK_STRING */ - 283, /* (208) table_name_cond ::= table_name */ - 284, /* (209) from_db_opt ::= */ - 284, /* (210) from_db_opt ::= FROM db_name */ - 278, /* (211) func_name_list ::= func_name */ - 278, /* (212) func_name_list ::= func_name_list NK_COMMA func_name */ - 285, /* (213) func_name ::= function_name */ - 237, /* (214) cmd ::= CREATE SMA INDEX not_exists_opt index_name ON table_name index_options */ - 237, /* (215) cmd ::= CREATE FULLTEXT INDEX not_exists_opt index_name ON table_name NK_LP col_name_list NK_RP */ - 237, /* (216) cmd ::= DROP INDEX exists_opt index_name ON table_name */ - 288, /* (217) index_options ::= */ - 288, /* (218) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt */ - 288, /* (219) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt */ - 289, /* (220) func_list ::= func */ - 289, /* (221) func_list ::= func_list NK_COMMA func */ - 292, /* (222) func ::= function_name NK_LP expression_list NK_RP */ - 237, /* (223) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_expression */ - 237, /* (224) cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name */ - 237, /* (225) cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name */ - 237, /* (226) cmd ::= DROP TOPIC exists_opt topic_name */ - 237, /* (227) cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ - 237, /* (228) cmd ::= DESC full_table_name */ - 237, /* (229) cmd ::= DESCRIBE full_table_name */ - 237, /* (230) cmd ::= RESET QUERY CACHE */ - 237, /* (231) cmd ::= EXPLAIN analyze_opt explain_options query_expression */ - 297, /* (232) analyze_opt ::= */ - 297, /* (233) analyze_opt ::= ANALYZE */ - 298, /* (234) explain_options ::= */ - 298, /* (235) explain_options ::= explain_options VERBOSE NK_BOOL */ - 298, /* (236) explain_options ::= explain_options RATIO NK_FLOAT */ - 237, /* (237) cmd ::= COMPACT VNODES IN NK_LP integer_list NK_RP */ - 237, /* (238) cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt */ - 237, /* (239) cmd ::= DROP FUNCTION exists_opt function_name */ - 299, /* (240) agg_func_opt ::= */ - 299, /* (241) agg_func_opt ::= AGGREGATE */ - 300, /* (242) bufsize_opt ::= */ - 300, /* (243) bufsize_opt ::= BUFSIZE NK_INTEGER */ - 237, /* (244) cmd ::= CREATE STREAM not_exists_opt stream_name stream_options into_opt AS query_expression */ - 237, /* (245) cmd ::= DROP STREAM exists_opt stream_name */ - 303, /* (246) into_opt ::= */ - 303, /* (247) into_opt ::= INTO full_table_name */ - 302, /* (248) stream_options ::= */ - 302, /* (249) stream_options ::= stream_options TRIGGER AT_ONCE */ - 302, /* (250) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ - 302, /* (251) stream_options ::= stream_options WATERMARK duration_literal */ - 237, /* (252) cmd ::= KILL CONNECTION NK_INTEGER */ - 237, /* (253) cmd ::= KILL QUERY NK_INTEGER */ - 237, /* (254) cmd ::= KILL TRANSACTION NK_INTEGER */ - 237, /* (255) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ - 237, /* (256) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ - 237, /* (257) cmd ::= SPLIT VGROUP NK_INTEGER */ - 304, /* (258) dnode_list ::= DNODE NK_INTEGER */ - 304, /* (259) dnode_list ::= dnode_list DNODE NK_INTEGER */ - 237, /* (260) cmd ::= SYNCDB db_name REPLICA */ - 237, /* (261) cmd ::= query_expression */ - 240, /* (262) literal ::= NK_INTEGER */ - 240, /* (263) literal ::= NK_FLOAT */ - 240, /* (264) literal ::= NK_STRING */ - 240, /* (265) literal ::= NK_BOOL */ - 240, /* (266) literal ::= TIMESTAMP NK_STRING */ - 240, /* (267) literal ::= duration_literal */ - 240, /* (268) literal ::= NULL */ - 240, /* (269) literal ::= NK_QUESTION */ - 290, /* (270) duration_literal ::= NK_VARIABLE */ - 305, /* (271) signed ::= NK_INTEGER */ - 305, /* (272) signed ::= NK_PLUS NK_INTEGER */ - 305, /* (273) signed ::= NK_MINUS NK_INTEGER */ - 305, /* (274) signed ::= NK_FLOAT */ - 305, /* (275) signed ::= NK_PLUS NK_FLOAT */ - 305, /* (276) signed ::= NK_MINUS NK_FLOAT */ - 270, /* (277) signed_literal ::= signed */ - 270, /* (278) signed_literal ::= NK_STRING */ - 270, /* (279) signed_literal ::= NK_BOOL */ - 270, /* (280) signed_literal ::= TIMESTAMP NK_STRING */ - 270, /* (281) signed_literal ::= duration_literal */ - 270, /* (282) signed_literal ::= NULL */ - 270, /* (283) signed_literal ::= literal_func */ - 273, /* (284) literal_list ::= signed_literal */ - 273, /* (285) literal_list ::= literal_list NK_COMMA signed_literal */ - 247, /* (286) db_name ::= NK_ID */ - 276, /* (287) table_name ::= NK_ID */ - 268, /* (288) column_name ::= NK_ID */ - 286, /* (289) function_name ::= NK_ID */ - 307, /* (290) table_alias ::= NK_ID */ - 308, /* (291) column_alias ::= NK_ID */ - 242, /* (292) user_name ::= NK_ID */ - 287, /* (293) index_name ::= NK_ID */ - 294, /* (294) topic_name ::= NK_ID */ - 301, /* (295) stream_name ::= NK_ID */ - 296, /* (296) cgroup_name ::= NK_ID */ - 309, /* (297) expression ::= literal */ - 309, /* (298) expression ::= pseudo_column */ - 309, /* (299) expression ::= column_reference */ - 309, /* (300) expression ::= function_expression */ - 309, /* (301) expression ::= subquery */ - 309, /* (302) expression ::= NK_LP expression NK_RP */ - 309, /* (303) expression ::= NK_PLUS expression */ - 309, /* (304) expression ::= NK_MINUS expression */ - 309, /* (305) expression ::= expression NK_PLUS expression */ - 309, /* (306) expression ::= expression NK_MINUS expression */ - 309, /* (307) expression ::= expression NK_STAR expression */ - 309, /* (308) expression ::= expression NK_SLASH expression */ - 309, /* (309) expression ::= expression NK_REM expression */ - 309, /* (310) expression ::= column_reference NK_ARROW NK_STRING */ - 293, /* (311) expression_list ::= expression */ - 293, /* (312) expression_list ::= expression_list NK_COMMA expression */ - 311, /* (313) column_reference ::= column_name */ - 311, /* (314) column_reference ::= table_name NK_DOT column_name */ - 310, /* (315) pseudo_column ::= ROWTS */ - 310, /* (316) pseudo_column ::= TBNAME */ - 310, /* (317) pseudo_column ::= table_name NK_DOT TBNAME */ - 310, /* (318) pseudo_column ::= QSTARTTS */ - 310, /* (319) pseudo_column ::= QENDTS */ - 310, /* (320) pseudo_column ::= WSTARTTS */ - 310, /* (321) pseudo_column ::= WENDTS */ - 310, /* (322) pseudo_column ::= WDURATION */ - 312, /* (323) function_expression ::= function_name NK_LP expression_list NK_RP */ - 312, /* (324) function_expression ::= star_func NK_LP star_func_para_list NK_RP */ - 312, /* (325) function_expression ::= CAST NK_LP expression AS type_name NK_RP */ - 312, /* (326) function_expression ::= literal_func */ - 306, /* (327) literal_func ::= noarg_func NK_LP NK_RP */ - 306, /* (328) literal_func ::= NOW */ - 316, /* (329) noarg_func ::= NOW */ - 316, /* (330) noarg_func ::= TODAY */ - 316, /* (331) noarg_func ::= TIMEZONE */ - 314, /* (332) star_func ::= COUNT */ - 314, /* (333) star_func ::= FIRST */ - 314, /* (334) star_func ::= LAST */ - 314, /* (335) star_func ::= LAST_ROW */ - 315, /* (336) star_func_para_list ::= NK_STAR */ - 315, /* (337) star_func_para_list ::= other_para_list */ - 317, /* (338) other_para_list ::= star_func_para */ - 317, /* (339) other_para_list ::= other_para_list NK_COMMA star_func_para */ - 318, /* (340) star_func_para ::= expression */ - 318, /* (341) star_func_para ::= table_name NK_DOT NK_STAR */ - 319, /* (342) predicate ::= expression compare_op expression */ - 319, /* (343) predicate ::= expression BETWEEN expression AND expression */ - 319, /* (344) predicate ::= expression NOT BETWEEN expression AND expression */ - 319, /* (345) predicate ::= expression IS NULL */ - 319, /* (346) predicate ::= expression IS NOT NULL */ - 319, /* (347) predicate ::= expression in_op in_predicate_value */ - 320, /* (348) compare_op ::= NK_LT */ - 320, /* (349) compare_op ::= NK_GT */ - 320, /* (350) compare_op ::= NK_LE */ - 320, /* (351) compare_op ::= NK_GE */ - 320, /* (352) compare_op ::= NK_NE */ - 320, /* (353) compare_op ::= NK_EQ */ - 320, /* (354) compare_op ::= LIKE */ - 320, /* (355) compare_op ::= NOT LIKE */ - 320, /* (356) compare_op ::= MATCH */ - 320, /* (357) compare_op ::= NMATCH */ - 320, /* (358) compare_op ::= CONTAINS */ - 321, /* (359) in_op ::= IN */ - 321, /* (360) in_op ::= NOT IN */ - 322, /* (361) in_predicate_value ::= NK_LP expression_list NK_RP */ - 323, /* (362) boolean_value_expression ::= boolean_primary */ - 323, /* (363) boolean_value_expression ::= NOT boolean_primary */ - 323, /* (364) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ - 323, /* (365) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ - 324, /* (366) boolean_primary ::= predicate */ - 324, /* (367) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ - 325, /* (368) common_expression ::= expression */ - 325, /* (369) common_expression ::= boolean_value_expression */ - 326, /* (370) from_clause ::= FROM table_reference_list */ - 327, /* (371) table_reference_list ::= table_reference */ - 327, /* (372) table_reference_list ::= table_reference_list NK_COMMA table_reference */ - 328, /* (373) table_reference ::= table_primary */ - 328, /* (374) table_reference ::= joined_table */ - 329, /* (375) table_primary ::= table_name alias_opt */ - 329, /* (376) table_primary ::= db_name NK_DOT table_name alias_opt */ - 329, /* (377) table_primary ::= subquery alias_opt */ - 329, /* (378) table_primary ::= parenthesized_joined_table */ - 331, /* (379) alias_opt ::= */ - 331, /* (380) alias_opt ::= table_alias */ - 331, /* (381) alias_opt ::= AS table_alias */ - 332, /* (382) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ - 332, /* (383) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ - 330, /* (384) joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ - 333, /* (385) join_type ::= */ - 333, /* (386) join_type ::= INNER */ - 335, /* (387) query_specification ::= SELECT set_quantifier_opt select_list from_clause where_clause_opt partition_by_clause_opt twindow_clause_opt group_by_clause_opt having_clause_opt */ - 336, /* (388) set_quantifier_opt ::= */ - 336, /* (389) set_quantifier_opt ::= DISTINCT */ - 336, /* (390) set_quantifier_opt ::= ALL */ - 337, /* (391) select_list ::= NK_STAR */ - 337, /* (392) select_list ::= select_sublist */ - 343, /* (393) select_sublist ::= select_item */ - 343, /* (394) select_sublist ::= select_sublist NK_COMMA select_item */ - 344, /* (395) select_item ::= common_expression */ - 344, /* (396) select_item ::= common_expression column_alias */ - 344, /* (397) select_item ::= common_expression AS column_alias */ - 344, /* (398) select_item ::= table_name NK_DOT NK_STAR */ - 338, /* (399) where_clause_opt ::= */ - 338, /* (400) where_clause_opt ::= WHERE search_condition */ - 339, /* (401) partition_by_clause_opt ::= */ - 339, /* (402) partition_by_clause_opt ::= PARTITION BY expression_list */ - 340, /* (403) twindow_clause_opt ::= */ - 340, /* (404) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ - 340, /* (405) twindow_clause_opt ::= STATE_WINDOW NK_LP expression NK_RP */ - 340, /* (406) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ - 340, /* (407) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ - 291, /* (408) sliding_opt ::= */ - 291, /* (409) sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ - 345, /* (410) fill_opt ::= */ - 345, /* (411) fill_opt ::= FILL NK_LP fill_mode NK_RP */ - 345, /* (412) fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */ - 346, /* (413) fill_mode ::= NONE */ - 346, /* (414) fill_mode ::= PREV */ - 346, /* (415) fill_mode ::= NULL */ - 346, /* (416) fill_mode ::= LINEAR */ - 346, /* (417) fill_mode ::= NEXT */ - 341, /* (418) group_by_clause_opt ::= */ - 341, /* (419) group_by_clause_opt ::= GROUP BY group_by_list */ - 347, /* (420) group_by_list ::= expression */ - 347, /* (421) group_by_list ::= group_by_list NK_COMMA expression */ - 342, /* (422) having_clause_opt ::= */ - 342, /* (423) having_clause_opt ::= HAVING search_condition */ - 295, /* (424) query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt */ - 348, /* (425) query_expression_body ::= query_primary */ - 348, /* (426) query_expression_body ::= query_expression_body UNION ALL query_expression_body */ - 348, /* (427) query_expression_body ::= query_expression_body UNION query_expression_body */ - 352, /* (428) query_primary ::= query_specification */ - 352, /* (429) query_primary ::= NK_LP query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt NK_RP */ - 349, /* (430) order_by_clause_opt ::= */ - 349, /* (431) order_by_clause_opt ::= ORDER BY sort_specification_list */ - 350, /* (432) slimit_clause_opt ::= */ - 350, /* (433) slimit_clause_opt ::= SLIMIT NK_INTEGER */ - 350, /* (434) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ - 350, /* (435) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - 351, /* (436) limit_clause_opt ::= */ - 351, /* (437) limit_clause_opt ::= LIMIT NK_INTEGER */ - 351, /* (438) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ - 351, /* (439) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - 313, /* (440) subquery ::= NK_LP query_expression NK_RP */ - 334, /* (441) search_condition ::= common_expression */ - 353, /* (442) sort_specification_list ::= sort_specification */ - 353, /* (443) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ - 354, /* (444) sort_specification ::= expression ordering_specification_opt null_ordering_opt */ - 355, /* (445) ordering_specification_opt ::= */ - 355, /* (446) ordering_specification_opt ::= ASC */ - 355, /* (447) ordering_specification_opt ::= DESC */ - 356, /* (448) null_ordering_opt ::= */ - 356, /* (449) null_ordering_opt ::= NULLS FIRST */ - 356, /* (450) null_ordering_opt ::= NULLS LAST */ -}; - -/* For rule J, yyRuleInfoNRhs[J] contains the negative of the number -** of symbols on the right-hand side of that rule. */ -static const signed char yyRuleInfoNRhs[] = { - -6, /* (0) cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */ - -4, /* (1) cmd ::= ALTER ACCOUNT NK_ID alter_account_options */ - 0, /* (2) account_options ::= */ - -3, /* (3) account_options ::= account_options PPS literal */ - -3, /* (4) account_options ::= account_options TSERIES literal */ - -3, /* (5) account_options ::= account_options STORAGE literal */ - -3, /* (6) account_options ::= account_options STREAMS literal */ - -3, /* (7) account_options ::= account_options QTIME literal */ - -3, /* (8) account_options ::= account_options DBS literal */ - -3, /* (9) account_options ::= account_options USERS literal */ - -3, /* (10) account_options ::= account_options CONNS literal */ - -3, /* (11) account_options ::= account_options STATE literal */ - -1, /* (12) alter_account_options ::= alter_account_option */ - -2, /* (13) alter_account_options ::= alter_account_options alter_account_option */ - -2, /* (14) alter_account_option ::= PASS literal */ - -2, /* (15) alter_account_option ::= PPS literal */ - -2, /* (16) alter_account_option ::= TSERIES literal */ - -2, /* (17) alter_account_option ::= STORAGE literal */ - -2, /* (18) alter_account_option ::= STREAMS literal */ - -2, /* (19) alter_account_option ::= QTIME literal */ - -2, /* (20) alter_account_option ::= DBS literal */ - -2, /* (21) alter_account_option ::= USERS literal */ - -2, /* (22) alter_account_option ::= CONNS literal */ - -2, /* (23) alter_account_option ::= STATE literal */ - -5, /* (24) cmd ::= CREATE USER user_name PASS NK_STRING */ - -5, /* (25) cmd ::= ALTER USER user_name PASS NK_STRING */ - -5, /* (26) cmd ::= ALTER USER user_name PRIVILEGE NK_STRING */ - -3, /* (27) cmd ::= DROP USER user_name */ - -6, /* (28) cmd ::= GRANT privileges ON priv_level TO user_name */ - -6, /* (29) cmd ::= REVOKE privileges ON priv_level FROM user_name */ - -1, /* (30) privileges ::= ALL */ - -1, /* (31) privileges ::= priv_type_list */ - -1, /* (32) priv_type_list ::= priv_type */ - -3, /* (33) priv_type_list ::= priv_type_list NK_COMMA priv_type */ - -1, /* (34) priv_type ::= READ */ - -1, /* (35) priv_type ::= WRITE */ - -3, /* (36) priv_level ::= NK_STAR NK_DOT NK_STAR */ - -3, /* (37) priv_level ::= db_name NK_DOT NK_STAR */ - -3, /* (38) cmd ::= CREATE DNODE dnode_endpoint */ - -5, /* (39) cmd ::= CREATE DNODE dnode_host_name PORT NK_INTEGER */ - -3, /* (40) cmd ::= DROP DNODE NK_INTEGER */ - -3, /* (41) cmd ::= DROP DNODE dnode_endpoint */ - -4, /* (42) cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ - -5, /* (43) cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */ - -4, /* (44) cmd ::= ALTER ALL DNODES NK_STRING */ - -5, /* (45) cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */ - -1, /* (46) dnode_endpoint ::= NK_STRING */ - -1, /* (47) dnode_host_name ::= NK_ID */ - -1, /* (48) dnode_host_name ::= NK_IPTOKEN */ - -3, /* (49) cmd ::= ALTER LOCAL NK_STRING */ - -4, /* (50) cmd ::= ALTER LOCAL NK_STRING NK_STRING */ - -5, /* (51) cmd ::= CREATE QNODE ON DNODE NK_INTEGER */ - -5, /* (52) cmd ::= DROP QNODE ON DNODE NK_INTEGER */ - -5, /* (53) cmd ::= CREATE BNODE ON DNODE NK_INTEGER */ - -5, /* (54) cmd ::= DROP BNODE ON DNODE NK_INTEGER */ - -5, /* (55) cmd ::= CREATE SNODE ON DNODE NK_INTEGER */ - -5, /* (56) cmd ::= DROP SNODE ON DNODE NK_INTEGER */ - -5, /* (57) cmd ::= CREATE MNODE ON DNODE NK_INTEGER */ - -5, /* (58) cmd ::= DROP MNODE ON DNODE NK_INTEGER */ - -5, /* (59) cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ - -4, /* (60) cmd ::= DROP DATABASE exists_opt db_name */ - -2, /* (61) cmd ::= USE db_name */ - -4, /* (62) cmd ::= ALTER DATABASE db_name alter_db_options */ - -3, /* (63) not_exists_opt ::= IF NOT EXISTS */ - 0, /* (64) not_exists_opt ::= */ - -2, /* (65) exists_opt ::= IF EXISTS */ - 0, /* (66) exists_opt ::= */ - 0, /* (67) db_options ::= */ - -3, /* (68) db_options ::= db_options BUFFER NK_INTEGER */ - -3, /* (69) db_options ::= db_options CACHELAST NK_INTEGER */ - -3, /* (70) db_options ::= db_options COMP NK_INTEGER */ - -3, /* (71) db_options ::= db_options DAYS NK_INTEGER */ - -3, /* (72) db_options ::= db_options DAYS NK_VARIABLE */ - -3, /* (73) db_options ::= db_options FSYNC NK_INTEGER */ - -3, /* (74) db_options ::= db_options MAXROWS NK_INTEGER */ - -3, /* (75) db_options ::= db_options MINROWS NK_INTEGER */ - -3, /* (76) db_options ::= db_options KEEP integer_list */ - -3, /* (77) db_options ::= db_options KEEP variable_list */ - -3, /* (78) db_options ::= db_options PAGES NK_INTEGER */ - -3, /* (79) db_options ::= db_options PAGESIZE NK_INTEGER */ - -3, /* (80) db_options ::= db_options PRECISION NK_STRING */ - -3, /* (81) db_options ::= db_options REPLICA NK_INTEGER */ - -3, /* (82) db_options ::= db_options STRICT NK_INTEGER */ - -3, /* (83) db_options ::= db_options WAL NK_INTEGER */ - -3, /* (84) db_options ::= db_options VGROUPS NK_INTEGER */ - -3, /* (85) db_options ::= db_options SINGLE_STABLE NK_INTEGER */ - -3, /* (86) db_options ::= db_options RETENTIONS retention_list */ - -3, /* (87) db_options ::= db_options SCHEMALESS NK_INTEGER */ - -1, /* (88) alter_db_options ::= alter_db_option */ - -2, /* (89) alter_db_options ::= alter_db_options alter_db_option */ - -2, /* (90) alter_db_option ::= BUFFER NK_INTEGER */ - -2, /* (91) alter_db_option ::= CACHELAST NK_INTEGER */ - -2, /* (92) alter_db_option ::= FSYNC NK_INTEGER */ - -2, /* (93) alter_db_option ::= KEEP integer_list */ - -2, /* (94) alter_db_option ::= KEEP variable_list */ - -2, /* (95) alter_db_option ::= PAGES NK_INTEGER */ - -2, /* (96) alter_db_option ::= REPLICA NK_INTEGER */ - -2, /* (97) alter_db_option ::= STRICT NK_INTEGER */ - -2, /* (98) alter_db_option ::= WAL NK_INTEGER */ - -1, /* (99) integer_list ::= NK_INTEGER */ - -3, /* (100) integer_list ::= integer_list NK_COMMA NK_INTEGER */ - -1, /* (101) variable_list ::= NK_VARIABLE */ - -3, /* (102) variable_list ::= variable_list NK_COMMA NK_VARIABLE */ - -1, /* (103) retention_list ::= retention */ - -3, /* (104) retention_list ::= retention_list NK_COMMA retention */ - -3, /* (105) retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ - -9, /* (106) cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ - -3, /* (107) cmd ::= CREATE TABLE multi_create_clause */ - -9, /* (108) cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ - -3, /* (109) cmd ::= DROP TABLE multi_drop_clause */ - -4, /* (110) cmd ::= DROP STABLE exists_opt full_table_name */ - -3, /* (111) cmd ::= ALTER TABLE alter_table_clause */ - -3, /* (112) cmd ::= ALTER STABLE alter_table_clause */ - -2, /* (113) alter_table_clause ::= full_table_name alter_table_options */ - -5, /* (114) alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ - -4, /* (115) alter_table_clause ::= full_table_name DROP COLUMN column_name */ - -5, /* (116) alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ - -5, /* (117) alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ - -5, /* (118) alter_table_clause ::= full_table_name ADD TAG column_name type_name */ - -4, /* (119) alter_table_clause ::= full_table_name DROP TAG column_name */ - -5, /* (120) alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ - -5, /* (121) alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ - -6, /* (122) alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */ - -1, /* (123) multi_create_clause ::= create_subtable_clause */ - -2, /* (124) multi_create_clause ::= multi_create_clause create_subtable_clause */ - -10, /* (125) create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_tags_opt TAGS NK_LP literal_list NK_RP table_options */ - -1, /* (126) multi_drop_clause ::= drop_table_clause */ - -2, /* (127) multi_drop_clause ::= multi_drop_clause drop_table_clause */ - -2, /* (128) drop_table_clause ::= exists_opt full_table_name */ - 0, /* (129) specific_tags_opt ::= */ - -3, /* (130) specific_tags_opt ::= NK_LP col_name_list NK_RP */ - -1, /* (131) full_table_name ::= table_name */ - -3, /* (132) full_table_name ::= db_name NK_DOT table_name */ - -1, /* (133) column_def_list ::= column_def */ - -3, /* (134) column_def_list ::= column_def_list NK_COMMA column_def */ - -2, /* (135) column_def ::= column_name type_name */ - -4, /* (136) column_def ::= column_name type_name COMMENT NK_STRING */ - -1, /* (137) type_name ::= BOOL */ - -1, /* (138) type_name ::= TINYINT */ - -1, /* (139) type_name ::= SMALLINT */ - -1, /* (140) type_name ::= INT */ - -1, /* (141) type_name ::= INTEGER */ - -1, /* (142) type_name ::= BIGINT */ - -1, /* (143) type_name ::= FLOAT */ - -1, /* (144) type_name ::= DOUBLE */ - -4, /* (145) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ - -1, /* (146) type_name ::= TIMESTAMP */ - -4, /* (147) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ - -2, /* (148) type_name ::= TINYINT UNSIGNED */ - -2, /* (149) type_name ::= SMALLINT UNSIGNED */ - -2, /* (150) type_name ::= INT UNSIGNED */ - -2, /* (151) type_name ::= BIGINT UNSIGNED */ - -1, /* (152) type_name ::= JSON */ - -4, /* (153) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ - -1, /* (154) type_name ::= MEDIUMBLOB */ - -1, /* (155) type_name ::= BLOB */ - -4, /* (156) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ - -1, /* (157) type_name ::= DECIMAL */ - -4, /* (158) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ - -6, /* (159) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ - 0, /* (160) tags_def_opt ::= */ - -1, /* (161) tags_def_opt ::= tags_def */ - -4, /* (162) tags_def ::= TAGS NK_LP column_def_list NK_RP */ - 0, /* (163) table_options ::= */ - -3, /* (164) table_options ::= table_options COMMENT NK_STRING */ - -3, /* (165) table_options ::= table_options FILE_FACTOR NK_FLOAT */ - -5, /* (166) table_options ::= table_options ROLLUP NK_LP func_name_list NK_RP */ - -3, /* (167) table_options ::= table_options TTL NK_INTEGER */ - -5, /* (168) table_options ::= table_options SMA NK_LP col_name_list NK_RP */ - -1, /* (169) alter_table_options ::= alter_table_option */ - -2, /* (170) alter_table_options ::= alter_table_options alter_table_option */ - -2, /* (171) alter_table_option ::= COMMENT NK_STRING */ - -2, /* (172) alter_table_option ::= TTL NK_INTEGER */ - -1, /* (173) col_name_list ::= col_name */ - -3, /* (174) col_name_list ::= col_name_list NK_COMMA col_name */ - -1, /* (175) col_name ::= column_name */ - -2, /* (176) cmd ::= SHOW DNODES */ - -2, /* (177) cmd ::= SHOW USERS */ - -2, /* (178) cmd ::= SHOW DATABASES */ - -4, /* (179) cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */ - -4, /* (180) cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ - -3, /* (181) cmd ::= SHOW db_name_cond_opt VGROUPS */ - -2, /* (182) cmd ::= SHOW MNODES */ - -2, /* (183) cmd ::= SHOW MODULES */ - -2, /* (184) cmd ::= SHOW QNODES */ - -2, /* (185) cmd ::= SHOW FUNCTIONS */ - -5, /* (186) cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ - -2, /* (187) cmd ::= SHOW STREAMS */ - -2, /* (188) cmd ::= SHOW ACCOUNTS */ - -2, /* (189) cmd ::= SHOW APPS */ - -2, /* (190) cmd ::= SHOW CONNECTIONS */ - -2, /* (191) cmd ::= SHOW LICENCE */ - -2, /* (192) cmd ::= SHOW GRANTS */ - -4, /* (193) cmd ::= SHOW CREATE DATABASE db_name */ - -4, /* (194) cmd ::= SHOW CREATE TABLE full_table_name */ - -4, /* (195) cmd ::= SHOW CREATE STABLE full_table_name */ - -2, /* (196) cmd ::= SHOW QUERIES */ - -2, /* (197) cmd ::= SHOW SCORES */ - -2, /* (198) cmd ::= SHOW TOPICS */ - -2, /* (199) cmd ::= SHOW VARIABLES */ - -2, /* (200) cmd ::= SHOW BNODES */ - -2, /* (201) cmd ::= SHOW SNODES */ - -2, /* (202) cmd ::= SHOW CLUSTER */ - -2, /* (203) cmd ::= SHOW TRANSACTIONS */ - 0, /* (204) db_name_cond_opt ::= */ - -2, /* (205) db_name_cond_opt ::= db_name NK_DOT */ - 0, /* (206) like_pattern_opt ::= */ - -2, /* (207) like_pattern_opt ::= LIKE NK_STRING */ - -1, /* (208) table_name_cond ::= table_name */ - 0, /* (209) from_db_opt ::= */ - -2, /* (210) from_db_opt ::= FROM db_name */ - -1, /* (211) func_name_list ::= func_name */ - -3, /* (212) func_name_list ::= func_name_list NK_COMMA func_name */ - -1, /* (213) func_name ::= function_name */ - -8, /* (214) cmd ::= CREATE SMA INDEX not_exists_opt index_name ON table_name index_options */ - -10, /* (215) cmd ::= CREATE FULLTEXT INDEX not_exists_opt index_name ON table_name NK_LP col_name_list NK_RP */ - -6, /* (216) cmd ::= DROP INDEX exists_opt index_name ON table_name */ - 0, /* (217) index_options ::= */ - -9, /* (218) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt */ - -11, /* (219) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt */ - -1, /* (220) func_list ::= func */ - -3, /* (221) func_list ::= func_list NK_COMMA func */ - -4, /* (222) func ::= function_name NK_LP expression_list NK_RP */ - -6, /* (223) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_expression */ - -7, /* (224) cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name */ - -7, /* (225) cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name */ - -4, /* (226) cmd ::= DROP TOPIC exists_opt topic_name */ - -7, /* (227) cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ - -2, /* (228) cmd ::= DESC full_table_name */ - -2, /* (229) cmd ::= DESCRIBE full_table_name */ - -3, /* (230) cmd ::= RESET QUERY CACHE */ - -4, /* (231) cmd ::= EXPLAIN analyze_opt explain_options query_expression */ - 0, /* (232) analyze_opt ::= */ - -1, /* (233) analyze_opt ::= ANALYZE */ - 0, /* (234) explain_options ::= */ - -3, /* (235) explain_options ::= explain_options VERBOSE NK_BOOL */ - -3, /* (236) explain_options ::= explain_options RATIO NK_FLOAT */ - -6, /* (237) cmd ::= COMPACT VNODES IN NK_LP integer_list NK_RP */ - -10, /* (238) cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt */ - -4, /* (239) cmd ::= DROP FUNCTION exists_opt function_name */ - 0, /* (240) agg_func_opt ::= */ - -1, /* (241) agg_func_opt ::= AGGREGATE */ - 0, /* (242) bufsize_opt ::= */ - -2, /* (243) bufsize_opt ::= BUFSIZE NK_INTEGER */ - -8, /* (244) cmd ::= CREATE STREAM not_exists_opt stream_name stream_options into_opt AS query_expression */ - -4, /* (245) cmd ::= DROP STREAM exists_opt stream_name */ - 0, /* (246) into_opt ::= */ - -2, /* (247) into_opt ::= INTO full_table_name */ - 0, /* (248) stream_options ::= */ - -3, /* (249) stream_options ::= stream_options TRIGGER AT_ONCE */ - -3, /* (250) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ - -3, /* (251) stream_options ::= stream_options WATERMARK duration_literal */ - -3, /* (252) cmd ::= KILL CONNECTION NK_INTEGER */ - -3, /* (253) cmd ::= KILL QUERY NK_INTEGER */ - -3, /* (254) cmd ::= KILL TRANSACTION NK_INTEGER */ - -4, /* (255) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ - -4, /* (256) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ - -3, /* (257) cmd ::= SPLIT VGROUP NK_INTEGER */ - -2, /* (258) dnode_list ::= DNODE NK_INTEGER */ - -3, /* (259) dnode_list ::= dnode_list DNODE NK_INTEGER */ - -3, /* (260) cmd ::= SYNCDB db_name REPLICA */ - -1, /* (261) cmd ::= query_expression */ - -1, /* (262) literal ::= NK_INTEGER */ - -1, /* (263) literal ::= NK_FLOAT */ - -1, /* (264) literal ::= NK_STRING */ - -1, /* (265) literal ::= NK_BOOL */ - -2, /* (266) literal ::= TIMESTAMP NK_STRING */ - -1, /* (267) literal ::= duration_literal */ - -1, /* (268) literal ::= NULL */ - -1, /* (269) literal ::= NK_QUESTION */ - -1, /* (270) duration_literal ::= NK_VARIABLE */ - -1, /* (271) signed ::= NK_INTEGER */ - -2, /* (272) signed ::= NK_PLUS NK_INTEGER */ - -2, /* (273) signed ::= NK_MINUS NK_INTEGER */ - -1, /* (274) signed ::= NK_FLOAT */ - -2, /* (275) signed ::= NK_PLUS NK_FLOAT */ - -2, /* (276) signed ::= NK_MINUS NK_FLOAT */ - -1, /* (277) signed_literal ::= signed */ - -1, /* (278) signed_literal ::= NK_STRING */ - -1, /* (279) signed_literal ::= NK_BOOL */ - -2, /* (280) signed_literal ::= TIMESTAMP NK_STRING */ - -1, /* (281) signed_literal ::= duration_literal */ - -1, /* (282) signed_literal ::= NULL */ - -1, /* (283) signed_literal ::= literal_func */ - -1, /* (284) literal_list ::= signed_literal */ - -3, /* (285) literal_list ::= literal_list NK_COMMA signed_literal */ - -1, /* (286) db_name ::= NK_ID */ - -1, /* (287) table_name ::= NK_ID */ - -1, /* (288) column_name ::= NK_ID */ - -1, /* (289) function_name ::= NK_ID */ - -1, /* (290) table_alias ::= NK_ID */ - -1, /* (291) column_alias ::= NK_ID */ - -1, /* (292) user_name ::= NK_ID */ - -1, /* (293) index_name ::= NK_ID */ - -1, /* (294) topic_name ::= NK_ID */ - -1, /* (295) stream_name ::= NK_ID */ - -1, /* (296) cgroup_name ::= NK_ID */ - -1, /* (297) expression ::= literal */ - -1, /* (298) expression ::= pseudo_column */ - -1, /* (299) expression ::= column_reference */ - -1, /* (300) expression ::= function_expression */ - -1, /* (301) expression ::= subquery */ - -3, /* (302) expression ::= NK_LP expression NK_RP */ - -2, /* (303) expression ::= NK_PLUS expression */ - -2, /* (304) expression ::= NK_MINUS expression */ - -3, /* (305) expression ::= expression NK_PLUS expression */ - -3, /* (306) expression ::= expression NK_MINUS expression */ - -3, /* (307) expression ::= expression NK_STAR expression */ - -3, /* (308) expression ::= expression NK_SLASH expression */ - -3, /* (309) expression ::= expression NK_REM expression */ - -3, /* (310) expression ::= column_reference NK_ARROW NK_STRING */ - -1, /* (311) expression_list ::= expression */ - -3, /* (312) expression_list ::= expression_list NK_COMMA expression */ - -1, /* (313) column_reference ::= column_name */ - -3, /* (314) column_reference ::= table_name NK_DOT column_name */ - -1, /* (315) pseudo_column ::= ROWTS */ - -1, /* (316) pseudo_column ::= TBNAME */ - -3, /* (317) pseudo_column ::= table_name NK_DOT TBNAME */ - -1, /* (318) pseudo_column ::= QSTARTTS */ - -1, /* (319) pseudo_column ::= QENDTS */ - -1, /* (320) pseudo_column ::= WSTARTTS */ - -1, /* (321) pseudo_column ::= WENDTS */ - -1, /* (322) pseudo_column ::= WDURATION */ - -4, /* (323) function_expression ::= function_name NK_LP expression_list NK_RP */ - -4, /* (324) function_expression ::= star_func NK_LP star_func_para_list NK_RP */ - -6, /* (325) function_expression ::= CAST NK_LP expression AS type_name NK_RP */ - -1, /* (326) function_expression ::= literal_func */ - -3, /* (327) literal_func ::= noarg_func NK_LP NK_RP */ - -1, /* (328) literal_func ::= NOW */ - -1, /* (329) noarg_func ::= NOW */ - -1, /* (330) noarg_func ::= TODAY */ - -1, /* (331) noarg_func ::= TIMEZONE */ - -1, /* (332) star_func ::= COUNT */ - -1, /* (333) star_func ::= FIRST */ - -1, /* (334) star_func ::= LAST */ - -1, /* (335) star_func ::= LAST_ROW */ - -1, /* (336) star_func_para_list ::= NK_STAR */ - -1, /* (337) star_func_para_list ::= other_para_list */ - -1, /* (338) other_para_list ::= star_func_para */ - -3, /* (339) other_para_list ::= other_para_list NK_COMMA star_func_para */ - -1, /* (340) star_func_para ::= expression */ - -3, /* (341) star_func_para ::= table_name NK_DOT NK_STAR */ - -3, /* (342) predicate ::= expression compare_op expression */ - -5, /* (343) predicate ::= expression BETWEEN expression AND expression */ - -6, /* (344) predicate ::= expression NOT BETWEEN expression AND expression */ - -3, /* (345) predicate ::= expression IS NULL */ - -4, /* (346) predicate ::= expression IS NOT NULL */ - -3, /* (347) predicate ::= expression in_op in_predicate_value */ - -1, /* (348) compare_op ::= NK_LT */ - -1, /* (349) compare_op ::= NK_GT */ - -1, /* (350) compare_op ::= NK_LE */ - -1, /* (351) compare_op ::= NK_GE */ - -1, /* (352) compare_op ::= NK_NE */ - -1, /* (353) compare_op ::= NK_EQ */ - -1, /* (354) compare_op ::= LIKE */ - -2, /* (355) compare_op ::= NOT LIKE */ - -1, /* (356) compare_op ::= MATCH */ - -1, /* (357) compare_op ::= NMATCH */ - -1, /* (358) compare_op ::= CONTAINS */ - -1, /* (359) in_op ::= IN */ - -2, /* (360) in_op ::= NOT IN */ - -3, /* (361) in_predicate_value ::= NK_LP expression_list NK_RP */ - -1, /* (362) boolean_value_expression ::= boolean_primary */ - -2, /* (363) boolean_value_expression ::= NOT boolean_primary */ - -3, /* (364) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ - -3, /* (365) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ - -1, /* (366) boolean_primary ::= predicate */ - -3, /* (367) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ - -1, /* (368) common_expression ::= expression */ - -1, /* (369) common_expression ::= boolean_value_expression */ - -2, /* (370) from_clause ::= FROM table_reference_list */ - -1, /* (371) table_reference_list ::= table_reference */ - -3, /* (372) table_reference_list ::= table_reference_list NK_COMMA table_reference */ - -1, /* (373) table_reference ::= table_primary */ - -1, /* (374) table_reference ::= joined_table */ - -2, /* (375) table_primary ::= table_name alias_opt */ - -4, /* (376) table_primary ::= db_name NK_DOT table_name alias_opt */ - -2, /* (377) table_primary ::= subquery alias_opt */ - -1, /* (378) table_primary ::= parenthesized_joined_table */ - 0, /* (379) alias_opt ::= */ - -1, /* (380) alias_opt ::= table_alias */ - -2, /* (381) alias_opt ::= AS table_alias */ - -3, /* (382) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ - -3, /* (383) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ - -6, /* (384) joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ - 0, /* (385) join_type ::= */ - -1, /* (386) join_type ::= INNER */ - -9, /* (387) query_specification ::= SELECT set_quantifier_opt select_list from_clause where_clause_opt partition_by_clause_opt twindow_clause_opt group_by_clause_opt having_clause_opt */ - 0, /* (388) set_quantifier_opt ::= */ - -1, /* (389) set_quantifier_opt ::= DISTINCT */ - -1, /* (390) set_quantifier_opt ::= ALL */ - -1, /* (391) select_list ::= NK_STAR */ - -1, /* (392) select_list ::= select_sublist */ - -1, /* (393) select_sublist ::= select_item */ - -3, /* (394) select_sublist ::= select_sublist NK_COMMA select_item */ - -1, /* (395) select_item ::= common_expression */ - -2, /* (396) select_item ::= common_expression column_alias */ - -3, /* (397) select_item ::= common_expression AS column_alias */ - -3, /* (398) select_item ::= table_name NK_DOT NK_STAR */ - 0, /* (399) where_clause_opt ::= */ - -2, /* (400) where_clause_opt ::= WHERE search_condition */ - 0, /* (401) partition_by_clause_opt ::= */ - -3, /* (402) partition_by_clause_opt ::= PARTITION BY expression_list */ - 0, /* (403) twindow_clause_opt ::= */ - -6, /* (404) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ - -4, /* (405) twindow_clause_opt ::= STATE_WINDOW NK_LP expression NK_RP */ - -6, /* (406) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ - -8, /* (407) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ - 0, /* (408) sliding_opt ::= */ - -4, /* (409) sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ - 0, /* (410) fill_opt ::= */ - -4, /* (411) fill_opt ::= FILL NK_LP fill_mode NK_RP */ - -6, /* (412) fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */ - -1, /* (413) fill_mode ::= NONE */ - -1, /* (414) fill_mode ::= PREV */ - -1, /* (415) fill_mode ::= NULL */ - -1, /* (416) fill_mode ::= LINEAR */ - -1, /* (417) fill_mode ::= NEXT */ - 0, /* (418) group_by_clause_opt ::= */ - -3, /* (419) group_by_clause_opt ::= GROUP BY group_by_list */ - -1, /* (420) group_by_list ::= expression */ - -3, /* (421) group_by_list ::= group_by_list NK_COMMA expression */ - 0, /* (422) having_clause_opt ::= */ - -2, /* (423) having_clause_opt ::= HAVING search_condition */ - -4, /* (424) query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt */ - -1, /* (425) query_expression_body ::= query_primary */ - -4, /* (426) query_expression_body ::= query_expression_body UNION ALL query_expression_body */ - -3, /* (427) query_expression_body ::= query_expression_body UNION query_expression_body */ - -1, /* (428) query_primary ::= query_specification */ - -6, /* (429) query_primary ::= NK_LP query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt NK_RP */ - 0, /* (430) order_by_clause_opt ::= */ - -3, /* (431) order_by_clause_opt ::= ORDER BY sort_specification_list */ - 0, /* (432) slimit_clause_opt ::= */ - -2, /* (433) slimit_clause_opt ::= SLIMIT NK_INTEGER */ - -4, /* (434) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ - -4, /* (435) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - 0, /* (436) limit_clause_opt ::= */ - -2, /* (437) limit_clause_opt ::= LIMIT NK_INTEGER */ - -4, /* (438) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ - -4, /* (439) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - -3, /* (440) subquery ::= NK_LP query_expression NK_RP */ - -1, /* (441) search_condition ::= common_expression */ - -1, /* (442) sort_specification_list ::= sort_specification */ - -3, /* (443) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ - -3, /* (444) sort_specification ::= expression ordering_specification_opt null_ordering_opt */ - 0, /* (445) ordering_specification_opt ::= */ - -1, /* (446) ordering_specification_opt ::= ASC */ - -1, /* (447) ordering_specification_opt ::= DESC */ - 0, /* (448) null_ordering_opt ::= */ - -2, /* (449) null_ordering_opt ::= NULLS FIRST */ - -2, /* (450) null_ordering_opt ::= NULLS LAST */ +/* The following table contains information about every rule that +** is used during the reduce. +*/ +static const struct { + YYCODETYPE lhs; /* Symbol on the left-hand side of the rule */ + signed char nrhs; /* Negative of the number of RHS symbols in the rule */ +} yyRuleInfo[] = { + { 237, -6 }, /* (0) cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */ + { 237, -4 }, /* (1) cmd ::= ALTER ACCOUNT NK_ID alter_account_options */ + { 238, 0 }, /* (2) account_options ::= */ + { 238, -3 }, /* (3) account_options ::= account_options PPS literal */ + { 238, -3 }, /* (4) account_options ::= account_options TSERIES literal */ + { 238, -3 }, /* (5) account_options ::= account_options STORAGE literal */ + { 238, -3 }, /* (6) account_options ::= account_options STREAMS literal */ + { 238, -3 }, /* (7) account_options ::= account_options QTIME literal */ + { 238, -3 }, /* (8) account_options ::= account_options DBS literal */ + { 238, -3 }, /* (9) account_options ::= account_options USERS literal */ + { 238, -3 }, /* (10) account_options ::= account_options CONNS literal */ + { 238, -3 }, /* (11) account_options ::= account_options STATE literal */ + { 239, -1 }, /* (12) alter_account_options ::= alter_account_option */ + { 239, -2 }, /* (13) alter_account_options ::= alter_account_options alter_account_option */ + { 241, -2 }, /* (14) alter_account_option ::= PASS literal */ + { 241, -2 }, /* (15) alter_account_option ::= PPS literal */ + { 241, -2 }, /* (16) alter_account_option ::= TSERIES literal */ + { 241, -2 }, /* (17) alter_account_option ::= STORAGE literal */ + { 241, -2 }, /* (18) alter_account_option ::= STREAMS literal */ + { 241, -2 }, /* (19) alter_account_option ::= QTIME literal */ + { 241, -2 }, /* (20) alter_account_option ::= DBS literal */ + { 241, -2 }, /* (21) alter_account_option ::= USERS literal */ + { 241, -2 }, /* (22) alter_account_option ::= CONNS literal */ + { 241, -2 }, /* (23) alter_account_option ::= STATE literal */ + { 237, -5 }, /* (24) cmd ::= CREATE USER user_name PASS NK_STRING */ + { 237, -5 }, /* (25) cmd ::= ALTER USER user_name PASS NK_STRING */ + { 237, -5 }, /* (26) cmd ::= ALTER USER user_name PRIVILEGE NK_STRING */ + { 237, -3 }, /* (27) cmd ::= DROP USER user_name */ + { 237, -6 }, /* (28) cmd ::= GRANT privileges ON priv_level TO user_name */ + { 237, -6 }, /* (29) cmd ::= REVOKE privileges ON priv_level FROM user_name */ + { 243, -1 }, /* (30) privileges ::= ALL */ + { 243, -1 }, /* (31) privileges ::= priv_type_list */ + { 245, -1 }, /* (32) priv_type_list ::= priv_type */ + { 245, -3 }, /* (33) priv_type_list ::= priv_type_list NK_COMMA priv_type */ + { 246, -1 }, /* (34) priv_type ::= READ */ + { 246, -1 }, /* (35) priv_type ::= WRITE */ + { 244, -3 }, /* (36) priv_level ::= NK_STAR NK_DOT NK_STAR */ + { 244, -3 }, /* (37) priv_level ::= db_name NK_DOT NK_STAR */ + { 237, -3 }, /* (38) cmd ::= CREATE DNODE dnode_endpoint */ + { 237, -5 }, /* (39) cmd ::= CREATE DNODE dnode_host_name PORT NK_INTEGER */ + { 237, -3 }, /* (40) cmd ::= DROP DNODE NK_INTEGER */ + { 237, -3 }, /* (41) cmd ::= DROP DNODE dnode_endpoint */ + { 237, -4 }, /* (42) cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ + { 237, -5 }, /* (43) cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */ + { 237, -4 }, /* (44) cmd ::= ALTER ALL DNODES NK_STRING */ + { 237, -5 }, /* (45) cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */ + { 248, -1 }, /* (46) dnode_endpoint ::= NK_STRING */ + { 249, -1 }, /* (47) dnode_host_name ::= NK_ID */ + { 249, -1 }, /* (48) dnode_host_name ::= NK_IPTOKEN */ + { 237, -3 }, /* (49) cmd ::= ALTER LOCAL NK_STRING */ + { 237, -4 }, /* (50) cmd ::= ALTER LOCAL NK_STRING NK_STRING */ + { 237, -5 }, /* (51) cmd ::= CREATE QNODE ON DNODE NK_INTEGER */ + { 237, -5 }, /* (52) cmd ::= DROP QNODE ON DNODE NK_INTEGER */ + { 237, -5 }, /* (53) cmd ::= CREATE BNODE ON DNODE NK_INTEGER */ + { 237, -5 }, /* (54) cmd ::= DROP BNODE ON DNODE NK_INTEGER */ + { 237, -5 }, /* (55) cmd ::= CREATE SNODE ON DNODE NK_INTEGER */ + { 237, -5 }, /* (56) cmd ::= DROP SNODE ON DNODE NK_INTEGER */ + { 237, -5 }, /* (57) cmd ::= CREATE MNODE ON DNODE NK_INTEGER */ + { 237, -5 }, /* (58) cmd ::= DROP MNODE ON DNODE NK_INTEGER */ + { 237, -5 }, /* (59) cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ + { 237, -4 }, /* (60) cmd ::= DROP DATABASE exists_opt db_name */ + { 237, -2 }, /* (61) cmd ::= USE db_name */ + { 237, -4 }, /* (62) cmd ::= ALTER DATABASE db_name alter_db_options */ + { 250, -3 }, /* (63) not_exists_opt ::= IF NOT EXISTS */ + { 250, 0 }, /* (64) not_exists_opt ::= */ + { 252, -2 }, /* (65) exists_opt ::= IF EXISTS */ + { 252, 0 }, /* (66) exists_opt ::= */ + { 251, 0 }, /* (67) db_options ::= */ + { 251, -3 }, /* (68) db_options ::= db_options BUFFER NK_INTEGER */ + { 251, -3 }, /* (69) db_options ::= db_options CACHELAST NK_INTEGER */ + { 251, -3 }, /* (70) db_options ::= db_options COMP NK_INTEGER */ + { 251, -3 }, /* (71) db_options ::= db_options DAYS NK_INTEGER */ + { 251, -3 }, /* (72) db_options ::= db_options DAYS NK_VARIABLE */ + { 251, -3 }, /* (73) db_options ::= db_options FSYNC NK_INTEGER */ + { 251, -3 }, /* (74) db_options ::= db_options MAXROWS NK_INTEGER */ + { 251, -3 }, /* (75) db_options ::= db_options MINROWS NK_INTEGER */ + { 251, -3 }, /* (76) db_options ::= db_options KEEP integer_list */ + { 251, -3 }, /* (77) db_options ::= db_options KEEP variable_list */ + { 251, -3 }, /* (78) db_options ::= db_options PAGES NK_INTEGER */ + { 251, -3 }, /* (79) db_options ::= db_options PAGESIZE NK_INTEGER */ + { 251, -3 }, /* (80) db_options ::= db_options PRECISION NK_STRING */ + { 251, -3 }, /* (81) db_options ::= db_options REPLICA NK_INTEGER */ + { 251, -3 }, /* (82) db_options ::= db_options STRICT NK_INTEGER */ + { 251, -3 }, /* (83) db_options ::= db_options WAL NK_INTEGER */ + { 251, -3 }, /* (84) db_options ::= db_options VGROUPS NK_INTEGER */ + { 251, -3 }, /* (85) db_options ::= db_options SINGLE_STABLE NK_INTEGER */ + { 251, -3 }, /* (86) db_options ::= db_options RETENTIONS retention_list */ + { 251, -3 }, /* (87) db_options ::= db_options SCHEMALESS NK_INTEGER */ + { 253, -1 }, /* (88) alter_db_options ::= alter_db_option */ + { 253, -2 }, /* (89) alter_db_options ::= alter_db_options alter_db_option */ + { 257, -2 }, /* (90) alter_db_option ::= BUFFER NK_INTEGER */ + { 257, -2 }, /* (91) alter_db_option ::= CACHELAST NK_INTEGER */ + { 257, -2 }, /* (92) alter_db_option ::= FSYNC NK_INTEGER */ + { 257, -2 }, /* (93) alter_db_option ::= KEEP integer_list */ + { 257, -2 }, /* (94) alter_db_option ::= KEEP variable_list */ + { 257, -2 }, /* (95) alter_db_option ::= PAGES NK_INTEGER */ + { 257, -2 }, /* (96) alter_db_option ::= REPLICA NK_INTEGER */ + { 257, -2 }, /* (97) alter_db_option ::= STRICT NK_INTEGER */ + { 257, -2 }, /* (98) alter_db_option ::= WAL NK_INTEGER */ + { 254, -1 }, /* (99) integer_list ::= NK_INTEGER */ + { 254, -3 }, /* (100) integer_list ::= integer_list NK_COMMA NK_INTEGER */ + { 255, -1 }, /* (101) variable_list ::= NK_VARIABLE */ + { 255, -3 }, /* (102) variable_list ::= variable_list NK_COMMA NK_VARIABLE */ + { 256, -1 }, /* (103) retention_list ::= retention */ + { 256, -3 }, /* (104) retention_list ::= retention_list NK_COMMA retention */ + { 258, -3 }, /* (105) retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ + { 237, -9 }, /* (106) cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ + { 237, -3 }, /* (107) cmd ::= CREATE TABLE multi_create_clause */ + { 237, -9 }, /* (108) cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ + { 237, -3 }, /* (109) cmd ::= DROP TABLE multi_drop_clause */ + { 237, -4 }, /* (110) cmd ::= DROP STABLE exists_opt full_table_name */ + { 237, -3 }, /* (111) cmd ::= ALTER TABLE alter_table_clause */ + { 237, -3 }, /* (112) cmd ::= ALTER STABLE alter_table_clause */ + { 266, -2 }, /* (113) alter_table_clause ::= full_table_name alter_table_options */ + { 266, -5 }, /* (114) alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ + { 266, -4 }, /* (115) alter_table_clause ::= full_table_name DROP COLUMN column_name */ + { 266, -5 }, /* (116) alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ + { 266, -5 }, /* (117) alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ + { 266, -5 }, /* (118) alter_table_clause ::= full_table_name ADD TAG column_name type_name */ + { 266, -4 }, /* (119) alter_table_clause ::= full_table_name DROP TAG column_name */ + { 266, -5 }, /* (120) alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ + { 266, -5 }, /* (121) alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ + { 266, -6 }, /* (122) alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */ + { 263, -1 }, /* (123) multi_create_clause ::= create_subtable_clause */ + { 263, -2 }, /* (124) multi_create_clause ::= multi_create_clause create_subtable_clause */ + { 271, -10 }, /* (125) create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_tags_opt TAGS NK_LP literal_list NK_RP table_options */ + { 265, -1 }, /* (126) multi_drop_clause ::= drop_table_clause */ + { 265, -2 }, /* (127) multi_drop_clause ::= multi_drop_clause drop_table_clause */ + { 274, -2 }, /* (128) drop_table_clause ::= exists_opt full_table_name */ + { 272, 0 }, /* (129) specific_tags_opt ::= */ + { 272, -3 }, /* (130) specific_tags_opt ::= NK_LP col_name_list NK_RP */ + { 259, -1 }, /* (131) full_table_name ::= table_name */ + { 259, -3 }, /* (132) full_table_name ::= db_name NK_DOT table_name */ + { 260, -1 }, /* (133) column_def_list ::= column_def */ + { 260, -3 }, /* (134) column_def_list ::= column_def_list NK_COMMA column_def */ + { 277, -2 }, /* (135) column_def ::= column_name type_name */ + { 277, -4 }, /* (136) column_def ::= column_name type_name COMMENT NK_STRING */ + { 269, -1 }, /* (137) type_name ::= BOOL */ + { 269, -1 }, /* (138) type_name ::= TINYINT */ + { 269, -1 }, /* (139) type_name ::= SMALLINT */ + { 269, -1 }, /* (140) type_name ::= INT */ + { 269, -1 }, /* (141) type_name ::= INTEGER */ + { 269, -1 }, /* (142) type_name ::= BIGINT */ + { 269, -1 }, /* (143) type_name ::= FLOAT */ + { 269, -1 }, /* (144) type_name ::= DOUBLE */ + { 269, -4 }, /* (145) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ + { 269, -1 }, /* (146) type_name ::= TIMESTAMP */ + { 269, -4 }, /* (147) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ + { 269, -2 }, /* (148) type_name ::= TINYINT UNSIGNED */ + { 269, -2 }, /* (149) type_name ::= SMALLINT UNSIGNED */ + { 269, -2 }, /* (150) type_name ::= INT UNSIGNED */ + { 269, -2 }, /* (151) type_name ::= BIGINT UNSIGNED */ + { 269, -1 }, /* (152) type_name ::= JSON */ + { 269, -4 }, /* (153) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ + { 269, -1 }, /* (154) type_name ::= MEDIUMBLOB */ + { 269, -1 }, /* (155) type_name ::= BLOB */ + { 269, -4 }, /* (156) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ + { 269, -1 }, /* (157) type_name ::= DECIMAL */ + { 269, -4 }, /* (158) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ + { 269, -6 }, /* (159) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ + { 261, 0 }, /* (160) tags_def_opt ::= */ + { 261, -1 }, /* (161) tags_def_opt ::= tags_def */ + { 264, -4 }, /* (162) tags_def ::= TAGS NK_LP column_def_list NK_RP */ + { 262, 0 }, /* (163) table_options ::= */ + { 262, -3 }, /* (164) table_options ::= table_options COMMENT NK_STRING */ + { 262, -3 }, /* (165) table_options ::= table_options FILE_FACTOR NK_FLOAT */ + { 262, -5 }, /* (166) table_options ::= table_options ROLLUP NK_LP func_name_list NK_RP */ + { 262, -3 }, /* (167) table_options ::= table_options TTL NK_INTEGER */ + { 262, -5 }, /* (168) table_options ::= table_options SMA NK_LP col_name_list NK_RP */ + { 267, -1 }, /* (169) alter_table_options ::= alter_table_option */ + { 267, -2 }, /* (170) alter_table_options ::= alter_table_options alter_table_option */ + { 279, -2 }, /* (171) alter_table_option ::= COMMENT NK_STRING */ + { 279, -2 }, /* (172) alter_table_option ::= TTL NK_INTEGER */ + { 275, -1 }, /* (173) col_name_list ::= col_name */ + { 275, -3 }, /* (174) col_name_list ::= col_name_list NK_COMMA col_name */ + { 280, -1 }, /* (175) col_name ::= column_name */ + { 237, -2 }, /* (176) cmd ::= SHOW DNODES */ + { 237, -2 }, /* (177) cmd ::= SHOW USERS */ + { 237, -2 }, /* (178) cmd ::= SHOW DATABASES */ + { 237, -4 }, /* (179) cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */ + { 237, -4 }, /* (180) cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ + { 237, -3 }, /* (181) cmd ::= SHOW db_name_cond_opt VGROUPS */ + { 237, -2 }, /* (182) cmd ::= SHOW MNODES */ + { 237, -2 }, /* (183) cmd ::= SHOW MODULES */ + { 237, -2 }, /* (184) cmd ::= SHOW QNODES */ + { 237, -2 }, /* (185) cmd ::= SHOW FUNCTIONS */ + { 237, -5 }, /* (186) cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ + { 237, -2 }, /* (187) cmd ::= SHOW STREAMS */ + { 237, -2 }, /* (188) cmd ::= SHOW ACCOUNTS */ + { 237, -2 }, /* (189) cmd ::= SHOW APPS */ + { 237, -2 }, /* (190) cmd ::= SHOW CONNECTIONS */ + { 237, -2 }, /* (191) cmd ::= SHOW LICENCE */ + { 237, -2 }, /* (192) cmd ::= SHOW GRANTS */ + { 237, -4 }, /* (193) cmd ::= SHOW CREATE DATABASE db_name */ + { 237, -4 }, /* (194) cmd ::= SHOW CREATE TABLE full_table_name */ + { 237, -4 }, /* (195) cmd ::= SHOW CREATE STABLE full_table_name */ + { 237, -2 }, /* (196) cmd ::= SHOW QUERIES */ + { 237, -2 }, /* (197) cmd ::= SHOW SCORES */ + { 237, -2 }, /* (198) cmd ::= SHOW TOPICS */ + { 237, -2 }, /* (199) cmd ::= SHOW VARIABLES */ + { 237, -2 }, /* (200) cmd ::= SHOW BNODES */ + { 237, -2 }, /* (201) cmd ::= SHOW SNODES */ + { 237, -2 }, /* (202) cmd ::= SHOW CLUSTER */ + { 237, -2 }, /* (203) cmd ::= SHOW TRANSACTIONS */ + { 281, 0 }, /* (204) db_name_cond_opt ::= */ + { 281, -2 }, /* (205) db_name_cond_opt ::= db_name NK_DOT */ + { 282, 0 }, /* (206) like_pattern_opt ::= */ + { 282, -2 }, /* (207) like_pattern_opt ::= LIKE NK_STRING */ + { 283, -1 }, /* (208) table_name_cond ::= table_name */ + { 284, 0 }, /* (209) from_db_opt ::= */ + { 284, -2 }, /* (210) from_db_opt ::= FROM db_name */ + { 278, -1 }, /* (211) func_name_list ::= func_name */ + { 278, -3 }, /* (212) func_name_list ::= func_name_list NK_COMMA func_name */ + { 285, -1 }, /* (213) func_name ::= function_name */ + { 237, -8 }, /* (214) cmd ::= CREATE SMA INDEX not_exists_opt index_name ON table_name index_options */ + { 237, -10 }, /* (215) cmd ::= CREATE FULLTEXT INDEX not_exists_opt index_name ON table_name NK_LP col_name_list NK_RP */ + { 237, -6 }, /* (216) cmd ::= DROP INDEX exists_opt index_name ON table_name */ + { 288, 0 }, /* (217) index_options ::= */ + { 288, -9 }, /* (218) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt */ + { 288, -11 }, /* (219) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt */ + { 289, -1 }, /* (220) func_list ::= func */ + { 289, -3 }, /* (221) func_list ::= func_list NK_COMMA func */ + { 292, -4 }, /* (222) func ::= function_name NK_LP expression_list NK_RP */ + { 237, -6 }, /* (223) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_expression */ + { 237, -7 }, /* (224) cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name */ + { 237, -7 }, /* (225) cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name */ + { 237, -4 }, /* (226) cmd ::= DROP TOPIC exists_opt topic_name */ + { 237, -7 }, /* (227) cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ + { 237, -2 }, /* (228) cmd ::= DESC full_table_name */ + { 237, -2 }, /* (229) cmd ::= DESCRIBE full_table_name */ + { 237, -3 }, /* (230) cmd ::= RESET QUERY CACHE */ + { 237, -4 }, /* (231) cmd ::= EXPLAIN analyze_opt explain_options query_expression */ + { 297, 0 }, /* (232) analyze_opt ::= */ + { 297, -1 }, /* (233) analyze_opt ::= ANALYZE */ + { 298, 0 }, /* (234) explain_options ::= */ + { 298, -3 }, /* (235) explain_options ::= explain_options VERBOSE NK_BOOL */ + { 298, -3 }, /* (236) explain_options ::= explain_options RATIO NK_FLOAT */ + { 237, -6 }, /* (237) cmd ::= COMPACT VNODES IN NK_LP integer_list NK_RP */ + { 237, -10 }, /* (238) cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt */ + { 237, -4 }, /* (239) cmd ::= DROP FUNCTION exists_opt function_name */ + { 299, 0 }, /* (240) agg_func_opt ::= */ + { 299, -1 }, /* (241) agg_func_opt ::= AGGREGATE */ + { 300, 0 }, /* (242) bufsize_opt ::= */ + { 300, -2 }, /* (243) bufsize_opt ::= BUFSIZE NK_INTEGER */ + { 237, -8 }, /* (244) cmd ::= CREATE STREAM not_exists_opt stream_name stream_options into_opt AS query_expression */ + { 237, -4 }, /* (245) cmd ::= DROP STREAM exists_opt stream_name */ + { 303, 0 }, /* (246) into_opt ::= */ + { 303, -2 }, /* (247) into_opt ::= INTO full_table_name */ + { 302, 0 }, /* (248) stream_options ::= */ + { 302, -3 }, /* (249) stream_options ::= stream_options TRIGGER AT_ONCE */ + { 302, -3 }, /* (250) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ + { 302, -3 }, /* (251) stream_options ::= stream_options WATERMARK duration_literal */ + { 237, -3 }, /* (252) cmd ::= KILL CONNECTION NK_INTEGER */ + { 237, -3 }, /* (253) cmd ::= KILL QUERY NK_INTEGER */ + { 237, -3 }, /* (254) cmd ::= KILL TRANSACTION NK_INTEGER */ + { 237, -4 }, /* (255) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ + { 237, -4 }, /* (256) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ + { 237, -3 }, /* (257) cmd ::= SPLIT VGROUP NK_INTEGER */ + { 304, -2 }, /* (258) dnode_list ::= DNODE NK_INTEGER */ + { 304, -3 }, /* (259) dnode_list ::= dnode_list DNODE NK_INTEGER */ + { 237, -3 }, /* (260) cmd ::= SYNCDB db_name REPLICA */ + { 237, -1 }, /* (261) cmd ::= query_expression */ + { 240, -1 }, /* (262) literal ::= NK_INTEGER */ + { 240, -1 }, /* (263) literal ::= NK_FLOAT */ + { 240, -1 }, /* (264) literal ::= NK_STRING */ + { 240, -1 }, /* (265) literal ::= NK_BOOL */ + { 240, -2 }, /* (266) literal ::= TIMESTAMP NK_STRING */ + { 240, -1 }, /* (267) literal ::= duration_literal */ + { 240, -1 }, /* (268) literal ::= NULL */ + { 240, -1 }, /* (269) literal ::= NK_QUESTION */ + { 290, -1 }, /* (270) duration_literal ::= NK_VARIABLE */ + { 305, -1 }, /* (271) signed ::= NK_INTEGER */ + { 305, -2 }, /* (272) signed ::= NK_PLUS NK_INTEGER */ + { 305, -2 }, /* (273) signed ::= NK_MINUS NK_INTEGER */ + { 305, -1 }, /* (274) signed ::= NK_FLOAT */ + { 305, -2 }, /* (275) signed ::= NK_PLUS NK_FLOAT */ + { 305, -2 }, /* (276) signed ::= NK_MINUS NK_FLOAT */ + { 270, -1 }, /* (277) signed_literal ::= signed */ + { 270, -1 }, /* (278) signed_literal ::= NK_STRING */ + { 270, -1 }, /* (279) signed_literal ::= NK_BOOL */ + { 270, -2 }, /* (280) signed_literal ::= TIMESTAMP NK_STRING */ + { 270, -1 }, /* (281) signed_literal ::= duration_literal */ + { 270, -1 }, /* (282) signed_literal ::= NULL */ + { 270, -1 }, /* (283) signed_literal ::= literal_func */ + { 273, -1 }, /* (284) literal_list ::= signed_literal */ + { 273, -3 }, /* (285) literal_list ::= literal_list NK_COMMA signed_literal */ + { 247, -1 }, /* (286) db_name ::= NK_ID */ + { 276, -1 }, /* (287) table_name ::= NK_ID */ + { 268, -1 }, /* (288) column_name ::= NK_ID */ + { 286, -1 }, /* (289) function_name ::= NK_ID */ + { 307, -1 }, /* (290) table_alias ::= NK_ID */ + { 308, -1 }, /* (291) column_alias ::= NK_ID */ + { 242, -1 }, /* (292) user_name ::= NK_ID */ + { 287, -1 }, /* (293) index_name ::= NK_ID */ + { 294, -1 }, /* (294) topic_name ::= NK_ID */ + { 301, -1 }, /* (295) stream_name ::= NK_ID */ + { 296, -1 }, /* (296) cgroup_name ::= NK_ID */ + { 309, -1 }, /* (297) expression ::= literal */ + { 309, -1 }, /* (298) expression ::= pseudo_column */ + { 309, -1 }, /* (299) expression ::= column_reference */ + { 309, -1 }, /* (300) expression ::= function_expression */ + { 309, -1 }, /* (301) expression ::= subquery */ + { 309, -3 }, /* (302) expression ::= NK_LP expression NK_RP */ + { 309, -2 }, /* (303) expression ::= NK_PLUS expression */ + { 309, -2 }, /* (304) expression ::= NK_MINUS expression */ + { 309, -3 }, /* (305) expression ::= expression NK_PLUS expression */ + { 309, -3 }, /* (306) expression ::= expression NK_MINUS expression */ + { 309, -3 }, /* (307) expression ::= expression NK_STAR expression */ + { 309, -3 }, /* (308) expression ::= expression NK_SLASH expression */ + { 309, -3 }, /* (309) expression ::= expression NK_REM expression */ + { 309, -3 }, /* (310) expression ::= column_reference NK_ARROW NK_STRING */ + { 293, -1 }, /* (311) expression_list ::= expression */ + { 293, -3 }, /* (312) expression_list ::= expression_list NK_COMMA expression */ + { 311, -1 }, /* (313) column_reference ::= column_name */ + { 311, -3 }, /* (314) column_reference ::= table_name NK_DOT column_name */ + { 310, -1 }, /* (315) pseudo_column ::= ROWTS */ + { 310, -1 }, /* (316) pseudo_column ::= TBNAME */ + { 310, -3 }, /* (317) pseudo_column ::= table_name NK_DOT TBNAME */ + { 310, -1 }, /* (318) pseudo_column ::= QSTARTTS */ + { 310, -1 }, /* (319) pseudo_column ::= QENDTS */ + { 310, -1 }, /* (320) pseudo_column ::= WSTARTTS */ + { 310, -1 }, /* (321) pseudo_column ::= WENDTS */ + { 310, -1 }, /* (322) pseudo_column ::= WDURATION */ + { 312, -4 }, /* (323) function_expression ::= function_name NK_LP expression_list NK_RP */ + { 312, -4 }, /* (324) function_expression ::= star_func NK_LP star_func_para_list NK_RP */ + { 312, -6 }, /* (325) function_expression ::= CAST NK_LP expression AS type_name NK_RP */ + { 312, -1 }, /* (326) function_expression ::= literal_func */ + { 306, -3 }, /* (327) literal_func ::= noarg_func NK_LP NK_RP */ + { 306, -1 }, /* (328) literal_func ::= NOW */ + { 316, -1 }, /* (329) noarg_func ::= NOW */ + { 316, -1 }, /* (330) noarg_func ::= TODAY */ + { 316, -1 }, /* (331) noarg_func ::= TIMEZONE */ + { 314, -1 }, /* (332) star_func ::= COUNT */ + { 314, -1 }, /* (333) star_func ::= FIRST */ + { 314, -1 }, /* (334) star_func ::= LAST */ + { 314, -1 }, /* (335) star_func ::= LAST_ROW */ + { 315, -1 }, /* (336) star_func_para_list ::= NK_STAR */ + { 315, -1 }, /* (337) star_func_para_list ::= other_para_list */ + { 317, -1 }, /* (338) other_para_list ::= star_func_para */ + { 317, -3 }, /* (339) other_para_list ::= other_para_list NK_COMMA star_func_para */ + { 318, -1 }, /* (340) star_func_para ::= expression */ + { 318, -3 }, /* (341) star_func_para ::= table_name NK_DOT NK_STAR */ + { 319, -3 }, /* (342) predicate ::= expression compare_op expression */ + { 319, -5 }, /* (343) predicate ::= expression BETWEEN expression AND expression */ + { 319, -6 }, /* (344) predicate ::= expression NOT BETWEEN expression AND expression */ + { 319, -3 }, /* (345) predicate ::= expression IS NULL */ + { 319, -4 }, /* (346) predicate ::= expression IS NOT NULL */ + { 319, -3 }, /* (347) predicate ::= expression in_op in_predicate_value */ + { 320, -1 }, /* (348) compare_op ::= NK_LT */ + { 320, -1 }, /* (349) compare_op ::= NK_GT */ + { 320, -1 }, /* (350) compare_op ::= NK_LE */ + { 320, -1 }, /* (351) compare_op ::= NK_GE */ + { 320, -1 }, /* (352) compare_op ::= NK_NE */ + { 320, -1 }, /* (353) compare_op ::= NK_EQ */ + { 320, -1 }, /* (354) compare_op ::= LIKE */ + { 320, -2 }, /* (355) compare_op ::= NOT LIKE */ + { 320, -1 }, /* (356) compare_op ::= MATCH */ + { 320, -1 }, /* (357) compare_op ::= NMATCH */ + { 320, -1 }, /* (358) compare_op ::= CONTAINS */ + { 321, -1 }, /* (359) in_op ::= IN */ + { 321, -2 }, /* (360) in_op ::= NOT IN */ + { 322, -3 }, /* (361) in_predicate_value ::= NK_LP expression_list NK_RP */ + { 323, -1 }, /* (362) boolean_value_expression ::= boolean_primary */ + { 323, -2 }, /* (363) boolean_value_expression ::= NOT boolean_primary */ + { 323, -3 }, /* (364) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ + { 323, -3 }, /* (365) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ + { 324, -1 }, /* (366) boolean_primary ::= predicate */ + { 324, -3 }, /* (367) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ + { 325, -1 }, /* (368) common_expression ::= expression */ + { 325, -1 }, /* (369) common_expression ::= boolean_value_expression */ + { 326, -2 }, /* (370) from_clause ::= FROM table_reference_list */ + { 327, -1 }, /* (371) table_reference_list ::= table_reference */ + { 327, -3 }, /* (372) table_reference_list ::= table_reference_list NK_COMMA table_reference */ + { 328, -1 }, /* (373) table_reference ::= table_primary */ + { 328, -1 }, /* (374) table_reference ::= joined_table */ + { 329, -2 }, /* (375) table_primary ::= table_name alias_opt */ + { 329, -4 }, /* (376) table_primary ::= db_name NK_DOT table_name alias_opt */ + { 329, -2 }, /* (377) table_primary ::= subquery alias_opt */ + { 329, -1 }, /* (378) table_primary ::= parenthesized_joined_table */ + { 331, 0 }, /* (379) alias_opt ::= */ + { 331, -1 }, /* (380) alias_opt ::= table_alias */ + { 331, -2 }, /* (381) alias_opt ::= AS table_alias */ + { 332, -3 }, /* (382) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ + { 332, -3 }, /* (383) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ + { 330, -6 }, /* (384) joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ + { 333, 0 }, /* (385) join_type ::= */ + { 333, -1 }, /* (386) join_type ::= INNER */ + { 335, -9 }, /* (387) query_specification ::= SELECT set_quantifier_opt select_list from_clause where_clause_opt partition_by_clause_opt twindow_clause_opt group_by_clause_opt having_clause_opt */ + { 336, 0 }, /* (388) set_quantifier_opt ::= */ + { 336, -1 }, /* (389) set_quantifier_opt ::= DISTINCT */ + { 336, -1 }, /* (390) set_quantifier_opt ::= ALL */ + { 337, -1 }, /* (391) select_list ::= NK_STAR */ + { 337, -1 }, /* (392) select_list ::= select_sublist */ + { 343, -1 }, /* (393) select_sublist ::= select_item */ + { 343, -3 }, /* (394) select_sublist ::= select_sublist NK_COMMA select_item */ + { 344, -1 }, /* (395) select_item ::= common_expression */ + { 344, -2 }, /* (396) select_item ::= common_expression column_alias */ + { 344, -3 }, /* (397) select_item ::= common_expression AS column_alias */ + { 344, -3 }, /* (398) select_item ::= table_name NK_DOT NK_STAR */ + { 338, 0 }, /* (399) where_clause_opt ::= */ + { 338, -2 }, /* (400) where_clause_opt ::= WHERE search_condition */ + { 339, 0 }, /* (401) partition_by_clause_opt ::= */ + { 339, -3 }, /* (402) partition_by_clause_opt ::= PARTITION BY expression_list */ + { 340, 0 }, /* (403) twindow_clause_opt ::= */ + { 340, -6 }, /* (404) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ + { 340, -4 }, /* (405) twindow_clause_opt ::= STATE_WINDOW NK_LP expression NK_RP */ + { 340, -6 }, /* (406) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ + { 340, -8 }, /* (407) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ + { 291, 0 }, /* (408) sliding_opt ::= */ + { 291, -4 }, /* (409) sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ + { 345, 0 }, /* (410) fill_opt ::= */ + { 345, -4 }, /* (411) fill_opt ::= FILL NK_LP fill_mode NK_RP */ + { 345, -6 }, /* (412) fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */ + { 346, -1 }, /* (413) fill_mode ::= NONE */ + { 346, -1 }, /* (414) fill_mode ::= PREV */ + { 346, -1 }, /* (415) fill_mode ::= NULL */ + { 346, -1 }, /* (416) fill_mode ::= LINEAR */ + { 346, -1 }, /* (417) fill_mode ::= NEXT */ + { 341, 0 }, /* (418) group_by_clause_opt ::= */ + { 341, -3 }, /* (419) group_by_clause_opt ::= GROUP BY group_by_list */ + { 347, -1 }, /* (420) group_by_list ::= expression */ + { 347, -3 }, /* (421) group_by_list ::= group_by_list NK_COMMA expression */ + { 342, 0 }, /* (422) having_clause_opt ::= */ + { 342, -2 }, /* (423) having_clause_opt ::= HAVING search_condition */ + { 295, -4 }, /* (424) query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt */ + { 348, -1 }, /* (425) query_expression_body ::= query_primary */ + { 348, -4 }, /* (426) query_expression_body ::= query_expression_body UNION ALL query_expression_body */ + { 348, -3 }, /* (427) query_expression_body ::= query_expression_body UNION query_expression_body */ + { 352, -1 }, /* (428) query_primary ::= query_specification */ + { 352, -6 }, /* (429) query_primary ::= NK_LP query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt NK_RP */ + { 349, 0 }, /* (430) order_by_clause_opt ::= */ + { 349, -3 }, /* (431) order_by_clause_opt ::= ORDER BY sort_specification_list */ + { 350, 0 }, /* (432) slimit_clause_opt ::= */ + { 350, -2 }, /* (433) slimit_clause_opt ::= SLIMIT NK_INTEGER */ + { 350, -4 }, /* (434) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ + { 350, -4 }, /* (435) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + { 351, 0 }, /* (436) limit_clause_opt ::= */ + { 351, -2 }, /* (437) limit_clause_opt ::= LIMIT NK_INTEGER */ + { 351, -4 }, /* (438) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ + { 351, -4 }, /* (439) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + { 313, -3 }, /* (440) subquery ::= NK_LP query_expression NK_RP */ + { 334, -1 }, /* (441) search_condition ::= common_expression */ + { 353, -1 }, /* (442) sort_specification_list ::= sort_specification */ + { 353, -3 }, /* (443) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ + { 354, -3 }, /* (444) sort_specification ::= expression ordering_specification_opt null_ordering_opt */ + { 355, 0 }, /* (445) ordering_specification_opt ::= */ + { 355, -1 }, /* (446) ordering_specification_opt ::= ASC */ + { 355, -1 }, /* (447) ordering_specification_opt ::= DESC */ + { 356, 0 }, /* (448) null_ordering_opt ::= */ + { 356, -2 }, /* (449) null_ordering_opt ::= NULLS FIRST */ + { 356, -2 }, /* (450) null_ordering_opt ::= NULLS LAST */ }; static void yy_accept(yyParser*); /* Forward Declaration */ @@ -3742,6 +3033,51 @@ static YYACTIONTYPE yy_reduce( (void)yyLookahead; (void)yyLookaheadToken; yymsp = yypParser->yytos; +#ifndef NDEBUG + if( yyTraceFILE && yyruleno<(int)(sizeof(yyRuleName)/sizeof(yyRuleName[0])) ){ + yysize = yyRuleInfo[yyruleno].nrhs; + if( yysize ){ + fprintf(yyTraceFILE, "%sReduce %d [%s], go to state %d.\n", + yyTracePrompt, + yyruleno, yyRuleName[yyruleno], yymsp[yysize].stateno); + }else{ + fprintf(yyTraceFILE, "%sReduce %d [%s].\n", + yyTracePrompt, yyruleno, yyRuleName[yyruleno]); + } + } +#endif /* NDEBUG */ + + /* Check that the stack is large enough to grow by a single entry + ** if the RHS of the rule is empty. This ensures that there is room + ** enough on the stack to push the LHS value */ + if( yyRuleInfo[yyruleno].nrhs==0 ){ +#ifdef YYTRACKMAXSTACKDEPTH + if( (int)(yypParser->yytos - yypParser->yystack)>yypParser->yyhwm ){ + yypParser->yyhwm++; + assert( yypParser->yyhwm == (int)(yypParser->yytos - yypParser->yystack)); + } +#endif +#if YYSTACKDEPTH>0 + if( yypParser->yytos>=yypParser->yystackEnd ){ + yyStackOverflow(yypParser); + /* The call to yyStackOverflow() above pops the stack until it is + ** empty, causing the main parser loop to exit. So the return value + ** is never used and does not matter. */ + return 0; + } +#else + if( yypParser->yytos>=&yypParser->yystack[yypParser->yystksz-1] ){ + if( yyGrowStack(yypParser) ){ + yyStackOverflow(yypParser); + /* The call to yyStackOverflow() above pops the stack until it is + ** empty, causing the main parser loop to exit. So the return value + ** is never used and does not matter. */ + return 0; + } + yymsp = yypParser->yytos; + } +#endif + } switch( yyruleno ){ /* Beginning here are the reduction cases. A typical example @@ -5070,9 +4406,9 @@ static YYACTIONTYPE yy_reduce( break; /********** End reduce actions ************************************************/ }; - assert( yyrulenoyytos>=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 @@ -5324,13 +4616,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 @@ -5380,7 +4673,7 @@ void Parse( break; #endif } - } + }while( yypParser->yytos>yypParser->yystack ); #ifndef NDEBUG if( yyTraceFILE ){ yyStackEntry *i; @@ -5402,10 +4695,11 @@ void Parse( */ int ParseFallback(int iToken){ #ifdef YYFALLBACK - assert( iToken<(int)(sizeof(yyFallback)/sizeof(yyFallback[0])) ); - return yyFallback[iToken]; + if( iToken<(int)(sizeof(yyFallback)/sizeof(yyFallback[0])) ){ + return yyFallback[iToken]; + } #else (void)iToken; - return 0; #endif + return 0; } From 5a9774b53c138fc12cec6b4c6550a66eab7fc736 Mon Sep 17 00:00:00 2001 From: gccgdb1234 Date: Tue, 31 May 2022 18:50:52 +0800 Subject: [PATCH 54/56] docs: add operator chapter in English --- docs-cn/12-taos-sql/13-operators.md | 2 +- docs-en/12-taos-sql/13-operators.md | 66 +++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 docs-en/12-taos-sql/13-operators.md diff --git a/docs-cn/12-taos-sql/13-operators.md b/docs-cn/12-taos-sql/13-operators.md index 65b1a65dcb..1ffc823044 100644 --- a/docs-cn/12-taos-sql/13-operators.md +++ b/docs-cn/12-taos-sql/13-operators.md @@ -21,7 +21,7 @@ title: 运算符 ## JSON 运算符 -`->` 运算符可以对 JSON 类型的列按键取值。->左侧是列标识符,右侧是键的字符串常量,如 col->'name',返回键'name'的值。 +`->` 运算符可以对 JSON 类型的列按键取值。`->` 左侧是列标识符,右侧是键的字符串常量,如 `col->'name'`,返回键 `'name'` 的值。 ## 集合运算符 diff --git a/docs-en/12-taos-sql/13-operators.md b/docs-en/12-taos-sql/13-operators.md new file mode 100644 index 0000000000..2db1397d67 --- /dev/null +++ b/docs-en/12-taos-sql/13-operators.md @@ -0,0 +1,66 @@ +--- +sidebar_label: Operators +title: Operators +--- + +## Arithmetic Operators + +| # | **Operator** | **Data Types** | **Description** | +| --- | :----------: | -------------- | --------------------------------------------------------- | +| 1 | +, - | Numeric Types | Representing positive or negative numbers, unary operator | +| 2 | +, - | Numeric Types | Addition and substraction, binary operator | +| 3 | \*, / | Numeric Types | Multiplication and division, binary oeprator | +| 4 | % | Numeric Types | Taking the remainder, binary operator | + +## Bitwise Operators + +| # | **Operator** | **Data Types** | **Description** | +| --- | :----------: | -------------- | ----------------------------- | +| 1 | & | Numeric Types | Bitewise AND, binary operator | +| 2 | \| | Numeric Types | Bitewise OR, binary operator | + +## JSON Operator + +`->` operator can be used to get the value of a key in a column of JSON type, the left oeprand is the column name, the right operand is a string constant. For example, `col->'name'` returns the value of key `'name'`. + +## Set Operator + +Set operators are used to combine the results of two queries into single result. A query including set operators is called a combined query. The number of rows in each result in a combined query must be same, and the type is determined by the first query's result, the type of the following queriess result must be able to be converted to the type of the first query's result, the conversion rule is same as `CAST` function. + +TDengine provides 2 set operators: `UNION ALL` and `UNION`. `UNION ALL` combines the results without removing duplicate data. `UNION` combines the results and remove duplicate data rows. In single SQL statement, at most 100 set operators can be used. + +## Comparsion Operator + +| # | **Operator** | **Data Types** | **Description** | +| --- | :---------------: | ------------------------------------------------------------------- | ----------------------------------------------- | +| 1 | = | Except for BLOB, MEDIUMBLOB and JSON | Equal | +| 2 | <\>, != | Except for BLOB, MEDIUMBLOB, JSON and primary key of timestamp type | Not equal | +| 3 | \>, \< | Except for BLOB, MEDIUMBLOB and JSON | Greater than, less than | +| 4 | \>=, \<= | Except for BLOB, MEDIUMBLOB and JSON | Greater than or equal to, less than or equal to | +| 5 | IS [NOT] NULL | Any types | Is NULL or NOT | +| 6 | [NOT] BETWEEN AND | Except for BLOB, MEDIUMBLOB and JSON | In a value range or not | +| 7 | IN | Except for BLOB, MEDIUMBLOB, JSON and primary key of timestamp type | In a list of values or not | +| 8 | LIKE | BINARY, NCHAR and VARCHAR | Wildcard matching | +| 9 | MATCH, NMATCH | BINARY, NCHAR and VARCHAR | Regular expression matching | +| 10 | CONTAINS | JSON | If A key exists in JSON | + +`LIKE` operator uses wildcard to match a string, the rules are: + +- '%' matches 0 to any number of characters; '\_' matches any single ASCII character. +- \_ can be used to match a `_` in the string, i.e. using escape character backslash `\` +- Wildcard string is 100 bytes at most. Longer a wildcard string is, worse the performance of LIKE operator is. + +`MATCH` and `NMATCH` operators use regular expressions to match a string, the rules are: + +- Regular expressions of POSIX standard are supported. +- Only `tbname`, i.e. table name of sub tables, and tag columns of string types can be matched with regular expression, data columns are not supported. +- Regular expression string is 128 bytes at most, and can be adjusted by setting parameter `maxRegexStringLen`, which is a client side configuration and needs to restart the client to take effect. + +## Logical Operators + +| # | **Operator** | **Data Types** | **Description** | +| --- | :----------: | -------------- | ---------------------------------------------------------------------------------------- | +| 1 | AND | BOOL | Logical AND, return TRUE if both conditions are TRUE; return FALSE if any one is FALSE. | +| 2 | OR | BOOL | Logical OR, return TRUE if any condition is TRUE; return FALSE if both are FALSE | + +TDengine employs shortcircut optimization when performing logical operations. For AND operator, if the first condition is evaluated to FALSE, then the second one is not evaluated. For OR operator, if the first condition is evaluated to TRUE, then the second one is not evaluated. From 6144cad04fa692a31aed053f0f81cbe6351ac323 Mon Sep 17 00:00:00 2001 From: gccgdb1234 Date: Tue, 31 May 2022 18:53:17 +0800 Subject: [PATCH 55/56] docs: remove arithmetic from functions.md --- docs-en/12-taos-sql/07-function.md | 31 ------------------------------ 1 file changed, 31 deletions(-) diff --git a/docs-en/12-taos-sql/07-function.md b/docs-en/12-taos-sql/07-function.md index 3589efe9cd..1a0dc28fa0 100644 --- a/docs-en/12-taos-sql/07-function.md +++ b/docs-en/12-taos-sql/07-function.md @@ -1537,37 +1537,6 @@ SELECT SUBSTR(str,pos[,len]) FROM { tb_name | stb_name } [WHERE clause] - Parameter `pos` can be an positive or negative integer; If it's positive, the starting position will be counted from the beginning of the string; if it's negative, the starting position will be counted from the end of the string. - If `len` is not specified, it means from `pos` to the end. -### Arithmetic Operations - -``` -SELECT field_name [+|-|*|/|%][Value|field_name] FROM { tb_name | stb_name } [WHERE clause]; -``` - -**Description**: The sum, difference, product, quotient, or remainder between one or more columns - -**Return value type**: Double precision floating point - -**Applicable column types**: Data types except for timestamp, binary, nchar, bool - -**Applicable table types**: table, STable - -**More explanations**: - -- Arithmetic operations can be performed on two or more columns, Parentheses `()` can be used to control the order of precedence. -- NULL doesn't participate in the operation i.e. if one of the operands is NULL then result is NULL. - -**Examples**: - -``` -taos> SELECT current + voltage * phase FROM d1001; -(current+(voltage*phase)) | -============================ - 78.190000713 | - 84.540003240 | - 80.810000718 | -Query OK, 3 row(s) in set (0.001046s) -``` - ### STATECOUNT ``` From 5e4c31c7943f4301a67dd278b6830d2373bd8421 Mon Sep 17 00:00:00 2001 From: gccgdb1234 Date: Tue, 31 May 2022 18:54:34 +0800 Subject: [PATCH 56/56] docs: rephrases --- docs-en/12-taos-sql/13-operators.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs-en/12-taos-sql/13-operators.md b/docs-en/12-taos-sql/13-operators.md index 2db1397d67..e393c82c76 100644 --- a/docs-en/12-taos-sql/13-operators.md +++ b/docs-en/12-taos-sql/13-operators.md @@ -63,4 +63,4 @@ TDengine provides 2 set operators: `UNION ALL` and `UNION`. `UNION ALL` combines | 1 | AND | BOOL | Logical AND, return TRUE if both conditions are TRUE; return FALSE if any one is FALSE. | | 2 | OR | BOOL | Logical OR, return TRUE if any condition is TRUE; return FALSE if both are FALSE | -TDengine employs shortcircut optimization when performing logical operations. For AND operator, if the first condition is evaluated to FALSE, then the second one is not evaluated. For OR operator, if the first condition is evaluated to TRUE, then the second one is not evaluated. +TDengine uses shortcircut optimization when performing logical operations. For AND operator, if the first condition is evaluated to FALSE, then the second one is not evaluated. For OR operator, if the first condition is evaluated to TRUE, then the second one is not evaluated.