From 598843f6992dc25f2f4e447e24f28e97e5365c7d Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Tue, 5 Nov 2024 10:55:06 +0800 Subject: [PATCH 01/55] some code change --- include/common/tmsg.h | 1 + include/common/ttokendef.h | 392 +- include/libs/nodes/cmdnodes.h | 7 + source/libs/nodes/src/nodesCodeFuncs.c | 21 + source/libs/nodes/src/nodesUtilFuncs.c | 9 + source/libs/parser/inc/parAst.h | 1 + source/libs/parser/inc/sql.y | 1 + source/libs/parser/src/parAstCreater.c | 15 + source/libs/parser/src/parAstParser.c | 9 + source/libs/parser/src/sql.c | 8713 +++++++++++++----------- 10 files changed, 4822 insertions(+), 4347 deletions(-) diff --git a/include/common/tmsg.h b/include/common/tmsg.h index cdcbb84462..7f6bd3ba87 100644 --- a/include/common/tmsg.h +++ b/include/common/tmsg.h @@ -306,6 +306,7 @@ typedef enum ENodeType { QUERY_NODE_DESCRIBE_STMT, QUERY_NODE_RESET_QUERY_CACHE_STMT, QUERY_NODE_COMPACT_DATABASE_STMT, + QUERY_NODE_COMPACT_VGROUPS_STMT, QUERY_NODE_CREATE_FUNCTION_STMT, QUERY_NODE_DROP_FUNCTION_STMT, QUERY_NODE_CREATE_STREAM_STMT, diff --git a/include/common/ttokendef.h b/include/common/ttokendef.h index 3b2a0a0094..b03354cb1a 100644 --- a/include/common/ttokendef.h +++ b/include/common/ttokendef.h @@ -92,202 +92,202 @@ #define TK_TRIM 74 #define TK_S3MIGRATE 75 #define TK_COMPACT 76 -#define TK_IF 77 -#define TK_NOT 78 -#define TK_EXISTS 79 -#define TK_BUFFER 80 -#define TK_CACHEMODEL 81 -#define TK_CACHESIZE 82 -#define TK_COMP 83 -#define TK_DURATION 84 -#define TK_NK_VARIABLE 85 -#define TK_MAXROWS 86 -#define TK_MINROWS 87 -#define TK_KEEP 88 -#define TK_PAGES 89 -#define TK_PAGESIZE 90 -#define TK_TSDB_PAGESIZE 91 -#define TK_PRECISION 92 -#define TK_REPLICA 93 -#define TK_VGROUPS 94 -#define TK_SINGLE_STABLE 95 -#define TK_RETENTIONS 96 -#define TK_SCHEMALESS 97 -#define TK_WAL_LEVEL 98 -#define TK_WAL_FSYNC_PERIOD 99 -#define TK_WAL_RETENTION_PERIOD 100 -#define TK_WAL_RETENTION_SIZE 101 -#define TK_WAL_ROLL_PERIOD 102 -#define TK_WAL_SEGMENT_SIZE 103 -#define TK_STT_TRIGGER 104 -#define TK_TABLE_PREFIX 105 -#define TK_TABLE_SUFFIX 106 -#define TK_S3_CHUNKPAGES 107 -#define TK_S3_KEEPLOCAL 108 -#define TK_S3_COMPACT 109 -#define TK_KEEP_TIME_OFFSET 110 -#define TK_ENCRYPT_ALGORITHM 111 -#define TK_NK_COLON 112 -#define TK_BWLIMIT 113 -#define TK_START 114 -#define TK_TIMESTAMP 115 -#define TK_END 116 -#define TK_TABLE 117 -#define TK_NK_LP 118 -#define TK_NK_RP 119 -#define TK_USING 120 -#define TK_FILE 121 -#define TK_STABLE 122 -#define TK_COLUMN 123 -#define TK_MODIFY 124 -#define TK_RENAME 125 -#define TK_TAG 126 -#define TK_SET 127 -#define TK_NK_EQ 128 -#define TK_TAGS 129 -#define TK_BOOL 130 -#define TK_TINYINT 131 -#define TK_SMALLINT 132 -#define TK_INT 133 -#define TK_INTEGER 134 -#define TK_BIGINT 135 -#define TK_FLOAT 136 -#define TK_DOUBLE 137 -#define TK_BINARY 138 -#define TK_NCHAR 139 -#define TK_UNSIGNED 140 -#define TK_JSON 141 -#define TK_VARCHAR 142 -#define TK_MEDIUMBLOB 143 -#define TK_BLOB 144 -#define TK_VARBINARY 145 -#define TK_GEOMETRY 146 -#define TK_DECIMAL 147 -#define TK_COMMENT 148 -#define TK_MAX_DELAY 149 -#define TK_WATERMARK 150 -#define TK_ROLLUP 151 -#define TK_TTL 152 -#define TK_SMA 153 -#define TK_DELETE_MARK 154 -#define TK_FIRST 155 -#define TK_LAST 156 -#define TK_SHOW 157 -#define TK_FULL 158 -#define TK_PRIVILEGES 159 -#define TK_DATABASES 160 -#define TK_TABLES 161 -#define TK_STABLES 162 -#define TK_MNODES 163 -#define TK_QNODES 164 -#define TK_ARBGROUPS 165 -#define TK_FUNCTIONS 166 -#define TK_INDEXES 167 -#define TK_ACCOUNTS 168 -#define TK_APPS 169 -#define TK_CONNECTIONS 170 -#define TK_LICENCES 171 -#define TK_GRANTS 172 -#define TK_LOGS 173 -#define TK_MACHINES 174 -#define TK_ENCRYPTIONS 175 -#define TK_QUERIES 176 -#define TK_SCORES 177 -#define TK_TOPICS 178 -#define TK_VARIABLES 179 -#define TK_BNODES 180 -#define TK_SNODES 181 -#define TK_TRANSACTIONS 182 -#define TK_DISTRIBUTED 183 -#define TK_CONSUMERS 184 -#define TK_SUBSCRIPTIONS 185 -#define TK_VNODES 186 -#define TK_ALIVE 187 -#define TK_VIEWS 188 -#define TK_VIEW 189 -#define TK_COMPACTS 190 -#define TK_NORMAL 191 -#define TK_CHILD 192 -#define TK_LIKE 193 -#define TK_TBNAME 194 -#define TK_QTAGS 195 -#define TK_AS 196 -#define TK_SYSTEM 197 -#define TK_TSMA 198 -#define TK_INTERVAL 199 -#define TK_RECURSIVE 200 -#define TK_TSMAS 201 -#define TK_FUNCTION 202 -#define TK_INDEX 203 -#define TK_COUNT 204 -#define TK_LAST_ROW 205 -#define TK_META 206 -#define TK_ONLY 207 -#define TK_TOPIC 208 -#define TK_CONSUMER 209 -#define TK_GROUP 210 -#define TK_DESC 211 -#define TK_DESCRIBE 212 -#define TK_RESET 213 -#define TK_QUERY 214 -#define TK_CACHE 215 -#define TK_EXPLAIN 216 -#define TK_ANALYZE 217 -#define TK_VERBOSE 218 -#define TK_NK_BOOL 219 -#define TK_RATIO 220 -#define TK_NK_FLOAT 221 -#define TK_OUTPUTTYPE 222 -#define TK_AGGREGATE 223 -#define TK_BUFSIZE 224 -#define TK_LANGUAGE 225 -#define TK_REPLACE 226 -#define TK_STREAM 227 -#define TK_INTO 228 -#define TK_PAUSE 229 -#define TK_RESUME 230 -#define TK_PRIMARY 231 -#define TK_KEY 232 -#define TK_TRIGGER 233 -#define TK_AT_ONCE 234 -#define TK_WINDOW_CLOSE 235 -#define TK_IGNORE 236 -#define TK_EXPIRED 237 -#define TK_FILL_HISTORY 238 -#define TK_SUBTABLE 239 -#define TK_UNTREATED 240 -#define TK_KILL 241 -#define TK_CONNECTION 242 -#define TK_TRANSACTION 243 -#define TK_BALANCE 244 -#define TK_VGROUP 245 -#define TK_LEADER 246 -#define TK_MERGE 247 -#define TK_REDISTRIBUTE 248 -#define TK_SPLIT 249 -#define TK_DELETE 250 -#define TK_INSERT 251 -#define TK_NK_BIN 252 -#define TK_NK_HEX 253 -#define TK_NULL 254 -#define TK_NK_QUESTION 255 -#define TK_NK_ALIAS 256 -#define TK_NK_ARROW 257 -#define TK_ROWTS 258 -#define TK_QSTART 259 -#define TK_QEND 260 -#define TK_QDURATION 261 -#define TK_WSTART 262 -#define TK_WEND 263 -#define TK_WDURATION 264 -#define TK_IROWTS 265 -#define TK_ISFILLED 266 -#define TK_FLOW 267 -#define TK_FHIGH 268 -#define TK_FROWTS 269 -#define TK_CAST 270 -#define TK_POSITION 271 -#define TK_IN 272 +#define TK_VGROUPS 77 +#define TK_IN 78 +#define TK_NK_LP 79 +#define TK_NK_RP 80 +#define TK_IF 81 +#define TK_NOT 82 +#define TK_EXISTS 83 +#define TK_BUFFER 84 +#define TK_CACHEMODEL 85 +#define TK_CACHESIZE 86 +#define TK_COMP 87 +#define TK_DURATION 88 +#define TK_NK_VARIABLE 89 +#define TK_MAXROWS 90 +#define TK_MINROWS 91 +#define TK_KEEP 92 +#define TK_PAGES 93 +#define TK_PAGESIZE 94 +#define TK_TSDB_PAGESIZE 95 +#define TK_PRECISION 96 +#define TK_REPLICA 97 +#define TK_SINGLE_STABLE 98 +#define TK_RETENTIONS 99 +#define TK_SCHEMALESS 100 +#define TK_WAL_LEVEL 101 +#define TK_WAL_FSYNC_PERIOD 102 +#define TK_WAL_RETENTION_PERIOD 103 +#define TK_WAL_RETENTION_SIZE 104 +#define TK_WAL_ROLL_PERIOD 105 +#define TK_WAL_SEGMENT_SIZE 106 +#define TK_STT_TRIGGER 107 +#define TK_TABLE_PREFIX 108 +#define TK_TABLE_SUFFIX 109 +#define TK_S3_CHUNKPAGES 110 +#define TK_S3_KEEPLOCAL 111 +#define TK_S3_COMPACT 112 +#define TK_KEEP_TIME_OFFSET 113 +#define TK_ENCRYPT_ALGORITHM 114 +#define TK_NK_COLON 115 +#define TK_BWLIMIT 116 +#define TK_START 117 +#define TK_TIMESTAMP 118 +#define TK_END 119 +#define TK_TABLE 120 +#define TK_USING 121 +#define TK_FILE 122 +#define TK_STABLE 123 +#define TK_COLUMN 124 +#define TK_MODIFY 125 +#define TK_RENAME 126 +#define TK_TAG 127 +#define TK_SET 128 +#define TK_NK_EQ 129 +#define TK_TAGS 130 +#define TK_BOOL 131 +#define TK_TINYINT 132 +#define TK_SMALLINT 133 +#define TK_INT 134 +#define TK_INTEGER 135 +#define TK_BIGINT 136 +#define TK_FLOAT 137 +#define TK_DOUBLE 138 +#define TK_BINARY 139 +#define TK_NCHAR 140 +#define TK_UNSIGNED 141 +#define TK_JSON 142 +#define TK_VARCHAR 143 +#define TK_MEDIUMBLOB 144 +#define TK_BLOB 145 +#define TK_VARBINARY 146 +#define TK_GEOMETRY 147 +#define TK_DECIMAL 148 +#define TK_COMMENT 149 +#define TK_MAX_DELAY 150 +#define TK_WATERMARK 151 +#define TK_ROLLUP 152 +#define TK_TTL 153 +#define TK_SMA 154 +#define TK_DELETE_MARK 155 +#define TK_FIRST 156 +#define TK_LAST 157 +#define TK_SHOW 158 +#define TK_FULL 159 +#define TK_PRIVILEGES 160 +#define TK_DATABASES 161 +#define TK_TABLES 162 +#define TK_STABLES 163 +#define TK_MNODES 164 +#define TK_QNODES 165 +#define TK_ARBGROUPS 166 +#define TK_FUNCTIONS 167 +#define TK_INDEXES 168 +#define TK_ACCOUNTS 169 +#define TK_APPS 170 +#define TK_CONNECTIONS 171 +#define TK_LICENCES 172 +#define TK_GRANTS 173 +#define TK_LOGS 174 +#define TK_MACHINES 175 +#define TK_ENCRYPTIONS 176 +#define TK_QUERIES 177 +#define TK_SCORES 178 +#define TK_TOPICS 179 +#define TK_VARIABLES 180 +#define TK_BNODES 181 +#define TK_SNODES 182 +#define TK_TRANSACTIONS 183 +#define TK_DISTRIBUTED 184 +#define TK_CONSUMERS 185 +#define TK_SUBSCRIPTIONS 186 +#define TK_VNODES 187 +#define TK_ALIVE 188 +#define TK_VIEWS 189 +#define TK_VIEW 190 +#define TK_COMPACTS 191 +#define TK_NORMAL 192 +#define TK_CHILD 193 +#define TK_LIKE 194 +#define TK_TBNAME 195 +#define TK_QTAGS 196 +#define TK_AS 197 +#define TK_SYSTEM 198 +#define TK_TSMA 199 +#define TK_INTERVAL 200 +#define TK_RECURSIVE 201 +#define TK_TSMAS 202 +#define TK_FUNCTION 203 +#define TK_INDEX 204 +#define TK_COUNT 205 +#define TK_LAST_ROW 206 +#define TK_META 207 +#define TK_ONLY 208 +#define TK_TOPIC 209 +#define TK_CONSUMER 210 +#define TK_GROUP 211 +#define TK_DESC 212 +#define TK_DESCRIBE 213 +#define TK_RESET 214 +#define TK_QUERY 215 +#define TK_CACHE 216 +#define TK_EXPLAIN 217 +#define TK_ANALYZE 218 +#define TK_VERBOSE 219 +#define TK_NK_BOOL 220 +#define TK_RATIO 221 +#define TK_NK_FLOAT 222 +#define TK_OUTPUTTYPE 223 +#define TK_AGGREGATE 224 +#define TK_BUFSIZE 225 +#define TK_LANGUAGE 226 +#define TK_REPLACE 227 +#define TK_STREAM 228 +#define TK_INTO 229 +#define TK_PAUSE 230 +#define TK_RESUME 231 +#define TK_PRIMARY 232 +#define TK_KEY 233 +#define TK_TRIGGER 234 +#define TK_AT_ONCE 235 +#define TK_WINDOW_CLOSE 236 +#define TK_IGNORE 237 +#define TK_EXPIRED 238 +#define TK_FILL_HISTORY 239 +#define TK_SUBTABLE 240 +#define TK_UNTREATED 241 +#define TK_KILL 242 +#define TK_CONNECTION 243 +#define TK_TRANSACTION 244 +#define TK_BALANCE 245 +#define TK_VGROUP 246 +#define TK_LEADER 247 +#define TK_MERGE 248 +#define TK_REDISTRIBUTE 249 +#define TK_SPLIT 250 +#define TK_DELETE 251 +#define TK_INSERT 252 +#define TK_NK_BIN 253 +#define TK_NK_HEX 254 +#define TK_NULL 255 +#define TK_NK_QUESTION 256 +#define TK_NK_ALIAS 257 +#define TK_NK_ARROW 258 +#define TK_ROWTS 259 +#define TK_QSTART 260 +#define TK_QEND 261 +#define TK_QDURATION 262 +#define TK_WSTART 263 +#define TK_WEND 264 +#define TK_WDURATION 265 +#define TK_IROWTS 266 +#define TK_ISFILLED 267 +#define TK_FLOW 268 +#define TK_FHIGH 269 +#define TK_FROWTS 270 +#define TK_CAST 271 +#define TK_POSITION 272 #define TK_FOR 273 #define TK_NOW 274 #define TK_TODAY 275 diff --git a/include/libs/nodes/cmdnodes.h b/include/libs/nodes/cmdnodes.h index 514eddbc24..cf76645abc 100644 --- a/include/libs/nodes/cmdnodes.h +++ b/include/libs/nodes/cmdnodes.h @@ -158,6 +158,13 @@ typedef struct SCompactDatabaseStmt { SNode* pEnd; } SCompactDatabaseStmt; +typedef struct SCompactVgroupsStmt { + ENodeType type; + SNodeList* vgidList; + SNode* pStart; + SNode* pEnd; +} SCompactVgroupsStmt; + typedef struct STableOptions { ENodeType type; bool commentNull; diff --git a/source/libs/nodes/src/nodesCodeFuncs.c b/source/libs/nodes/src/nodesCodeFuncs.c index 723a38c2bd..3f6c4de7b6 100644 --- a/source/libs/nodes/src/nodesCodeFuncs.c +++ b/source/libs/nodes/src/nodesCodeFuncs.c @@ -183,6 +183,8 @@ const char* nodesNodeName(ENodeType type) { return "DescribeStmt"; case QUERY_NODE_COMPACT_DATABASE_STMT: return "CompactDatabaseStmt"; + case QUERY_NODE_COMPACT_VGROUPS_STMT: + return "CompactVgroupsStmt"; case QUERY_NODE_CREATE_STREAM_STMT: return "CreateStreamStmt"; case QUERY_NODE_DROP_STREAM_STMT: @@ -6936,6 +6938,21 @@ static int32_t jsonToCompactDatabaseStmt(const SJson* pJson, void* pObj) { return tjsonGetStringValue(pJson, jkCompactDatabaseStmtDbName, pNode->dbName); } +static int32_t compactVgroupsStmtToJson(const void* pObj, SJson* pJson) { + const SCompactVgroupsStmt* pNode = (const SCompactVgroupsStmt*)pObj; + // TODO + ASSERT(0); + return 0; +} + +static int32_t jsonToCompactVgroupsStmt(const SJson* pJson, void* pObj) { + // TODO + ASSERT(0); + SCompactVgroupsStmt* pNode = (SCompactVgroupsStmt*)pObj; + return 0; + // tjsonGetStringValue(pJson, jkCompactDatabaseStmtDbName, pNode->dbName); +} + static const char* jkCreateStreamStmtStreamName = "StreamName"; static const char* jkCreateStreamStmtTargetDbName = "TargetDbName"; static const char* jkCreateStreamStmtTargetTabName = "TargetTabName"; @@ -7817,6 +7834,8 @@ static int32_t specificNodeToJson(const void* pObj, SJson* pJson) { return describeStmtToJson(pObj, pJson); case QUERY_NODE_COMPACT_DATABASE_STMT: return compactDatabaseStmtToJson(pObj, pJson); + case QUERY_NODE_COMPACT_VGROUPS_STMT: + return compactVgroupsStmtToJson(pObj, pJson); case QUERY_NODE_CREATE_STREAM_STMT: return createStreamStmtToJson(pObj, pJson); case QUERY_NODE_DROP_STREAM_STMT: @@ -8179,6 +8198,8 @@ static int32_t jsonToSpecificNode(const SJson* pJson, void* pObj) { return jsonToDescribeStmt(pJson, pObj); case QUERY_NODE_COMPACT_DATABASE_STMT: return jsonToCompactDatabaseStmt(pJson, pObj); + case QUERY_NODE_COMPACT_VGROUPS_STMT: + return jsonToCompactVgroupsStmt(pJson, pObj); case QUERY_NODE_CREATE_STREAM_STMT: return jsonToCreateStreamStmt(pJson, pObj); case QUERY_NODE_DROP_STREAM_STMT: diff --git a/source/libs/nodes/src/nodesUtilFuncs.c b/source/libs/nodes/src/nodesUtilFuncs.c index af51eff8a9..1f9bef8e25 100644 --- a/source/libs/nodes/src/nodesUtilFuncs.c +++ b/source/libs/nodes/src/nodesUtilFuncs.c @@ -512,6 +512,8 @@ int32_t nodesMakeNode(ENodeType type, SNode** ppNodeOut) { code = makeNode(type, sizeof(SNode), &pNode); break; case QUERY_NODE_COMPACT_DATABASE_STMT: code = makeNode(type, sizeof(SCompactDatabaseStmt), &pNode); break; + case QUERY_NODE_COMPACT_VGROUPS_STMT: + code = makeNode(type, sizeof(SCompactVgroupsStmt), &pNode); break; case QUERY_NODE_CREATE_FUNCTION_STMT: code = makeNode(type, sizeof(SCreateFunctionStmt), &pNode); break; case QUERY_NODE_DROP_FUNCTION_STMT: @@ -1239,6 +1241,13 @@ void nodesDestroyNode(SNode* pNode) { nodesDestroyNode(pStmt->pEnd); break; } + case QUERY_NODE_COMPACT_VGROUPS_STMT: { + SCompactVgroupsStmt* pStmt = (SCompactVgroupsStmt*)pNode; + nodesDestroyList(pStmt->vgidList); + nodesDestroyNode(pStmt->pStart); + nodesDestroyNode(pStmt->pEnd); + break; + } case QUERY_NODE_CREATE_FUNCTION_STMT: // no pointer field case QUERY_NODE_DROP_FUNCTION_STMT: // no pointer field break; diff --git a/source/libs/parser/inc/parAst.h b/source/libs/parser/inc/parAst.h index 3caa8da80f..943a0c7675 100644 --- a/source/libs/parser/inc/parAst.h +++ b/source/libs/parser/inc/parAst.h @@ -198,6 +198,7 @@ SNode* createFlushDatabaseStmt(SAstCreateContext* pCxt, SToken* pDbName); SNode* createTrimDatabaseStmt(SAstCreateContext* pCxt, SToken* pDbName, int32_t maxSpeed); SNode* createS3MigrateDatabaseStmt(SAstCreateContext* pCxt, SToken* pDbName); SNode* createCompactStmt(SAstCreateContext* pCxt, SToken* pDbName, SNode* pStart, SNode* pEnd); +SNode* createCompactVgroupsStmt(SAstCreateContext* pCxt, SNodeList* vgidList, SNode* pStart, SNode* pEnd); SNode* createDefaultTableOptions(SAstCreateContext* pCxt); SNode* createAlterTableOptions(SAstCreateContext* pCxt); SNode* setTableOption(SAstCreateContext* pCxt, SNode* pOptions, ETableOptionType type, void* pVal); diff --git a/source/libs/parser/inc/sql.y b/source/libs/parser/inc/sql.y index 635e9f570f..79f86ecc59 100644 --- a/source/libs/parser/inc/sql.y +++ b/source/libs/parser/inc/sql.y @@ -229,6 +229,7 @@ cmd ::= FLUSH DATABASE db_name(A). cmd ::= TRIM DATABASE db_name(A) speed_opt(B). { pCxt->pRootNode = createTrimDatabaseStmt(pCxt, &A, B); } cmd ::= S3MIGRATE DATABASE db_name(A). { pCxt->pRootNode = createS3MigrateDatabaseStmt(pCxt, &A); } cmd ::= COMPACT DATABASE db_name(A) start_opt(B) end_opt(C). { pCxt->pRootNode = createCompactStmt(pCxt, &A, B, C); } +cmd ::= COMPACT VGROUPS IN NK_LP integer_list(A) NK_RP start_opt(B) end_opt(C). { pCxt->pRootNode = createCompactVgroupsStmt(pCxt, A, B, C); } %type not_exists_opt { bool } %destructor not_exists_opt { } diff --git a/source/libs/parser/src/parAstCreater.c b/source/libs/parser/src/parAstCreater.c index 269e9e4a04..0cf03b7c84 100644 --- a/source/libs/parser/src/parAstCreater.c +++ b/source/libs/parser/src/parAstCreater.c @@ -2115,6 +2115,21 @@ _err: return NULL; } +SNode* createCompactVgroupsStmt(SAstCreateContext* pCxt, SNodeList* vgidList, SNode* pStart, SNode* pEnd) { + CHECK_PARSER_STATUS(pCxt); + SCompactVgroupsStmt* pStmt = NULL; + pCxt->errCode = nodesMakeNode(QUERY_NODE_COMPACT_VGROUPS_STMT, (SNode**)&pStmt); + CHECK_MAKE_NODE(pStmt); + pStmt->vgidList = vgidList; + pStmt->pStart = pStart; + pStmt->pEnd = pEnd; + return (SNode*)pStmt; +_err: + nodesDestroyNode(pStart); + nodesDestroyNode(pEnd); + return NULL; +} + SNode* createDefaultTableOptions(SAstCreateContext* pCxt) { CHECK_PARSER_STATUS(pCxt); STableOptions* pOptions = NULL; diff --git a/source/libs/parser/src/parAstParser.c b/source/libs/parser/src/parAstParser.c index eecc04658b..944363431a 100644 --- a/source/libs/parser/src/parAstParser.c +++ b/source/libs/parser/src/parAstParser.c @@ -858,6 +858,13 @@ static int32_t collectMetaKeyFromCompactDatabase(SCollectMetaKeyCxt* pCxt, SComp return reserveDbCfgInCache(pCxt->pParseCxt->acctId, pStmt->dbName, pCxt->pMetaCache); } +static int32_t collectMetaKeyFromCompactVgroups(SCollectMetaKeyCxt* pCxt, SCompactVgroupsStmt* pStmt) { + // TODO + ASSERT(0); + return 0; + // return reserveDbCfgInCache(pCxt->pParseCxt->acctId, pStmt->dbName, pCxt->pMetaCache); +} + static int32_t collectMetaKeyFromGrant(SCollectMetaKeyCxt* pCxt, SGrantStmt* pStmt) { if ('\0' == pStmt->tabName[0]) { return TSDB_CODE_SUCCESS; @@ -983,6 +990,8 @@ static int32_t collectMetaKeyFromQuery(SCollectMetaKeyCxt* pCxt, SNode* pStmt) { return collectMetaKeyFromDescribe(pCxt, (SDescribeStmt*)pStmt); case QUERY_NODE_COMPACT_DATABASE_STMT: return collectMetaKeyFromCompactDatabase(pCxt, (SCompactDatabaseStmt*)pStmt); + case QUERY_NODE_COMPACT_VGROUPS_STMT: + return collectMetaKeyFromCompactVgroups(pCxt, (SCompactVgroupsStmt*)pStmt); case QUERY_NODE_CREATE_STREAM_STMT: return collectMetaKeyFromCreateStream(pCxt, (SCreateStreamStmt*)pStmt); case QUERY_NODE_GRANT_STMT: diff --git a/source/libs/parser/src/sql.c b/source/libs/parser/src/sql.c index a352b237b6..5a9ac7b147 100644 --- a/source/libs/parser/src/sql.c +++ b/source/libs/parser/src/sql.c @@ -1,3 +1,5 @@ +/* This file is automatically generated by Lemon from input grammar +** source file "./sql.y". */ /* ** 2000-05-29 ** @@ -22,10 +24,7 @@ ** 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 @@ -42,11 +41,399 @@ #define YYSTACKDEPTH 0 /**************** End of %include directives **********************************/ -/* These constants specify the various numeric values for terminal symbols -** in a format understandable to "makeheaders". This section is blank unless -** "lemon" is run with the "-m" command-line option. -***************** Begin makeheaders token definitions *************************/ -/**************** End makeheaders token definitions ***************************/ +/* These constants specify the various numeric values for terminal symbols. +***************** Begin token definitions *************************************/ +#ifndef TK_OR +#define TK_OR 1 +#define TK_AND 2 +#define TK_UNION 3 +#define TK_ALL 4 +#define TK_MINUS 5 +#define TK_EXCEPT 6 +#define TK_INTERSECT 7 +#define TK_NK_BITAND 8 +#define TK_NK_BITOR 9 +#define TK_NK_LSHIFT 10 +#define TK_NK_RSHIFT 11 +#define TK_NK_PLUS 12 +#define TK_NK_MINUS 13 +#define TK_NK_STAR 14 +#define TK_NK_SLASH 15 +#define TK_NK_REM 16 +#define TK_NK_CONCAT 17 +#define TK_CREATE 18 +#define TK_ACCOUNT 19 +#define TK_NK_ID 20 +#define TK_PASS 21 +#define TK_NK_STRING 22 +#define TK_ALTER 23 +#define TK_PPS 24 +#define TK_TSERIES 25 +#define TK_STORAGE 26 +#define TK_STREAMS 27 +#define TK_QTIME 28 +#define TK_DBS 29 +#define TK_USERS 30 +#define TK_CONNS 31 +#define TK_STATE 32 +#define TK_NK_COMMA 33 +#define TK_HOST 34 +#define TK_IS_IMPORT 35 +#define TK_NK_INTEGER 36 +#define TK_CREATEDB 37 +#define TK_USER 38 +#define TK_ENABLE 39 +#define TK_SYSINFO 40 +#define TK_ADD 41 +#define TK_DROP 42 +#define TK_GRANT 43 +#define TK_ON 44 +#define TK_TO 45 +#define TK_REVOKE 46 +#define TK_FROM 47 +#define TK_SUBSCRIBE 48 +#define TK_READ 49 +#define TK_WRITE 50 +#define TK_NK_DOT 51 +#define TK_WITH 52 +#define TK_ENCRYPT_KEY 53 +#define TK_ANODE 54 +#define TK_UPDATE 55 +#define TK_ANODES 56 +#define TK_DNODE 57 +#define TK_PORT 58 +#define TK_DNODES 59 +#define TK_RESTORE 60 +#define TK_NK_IPTOKEN 61 +#define TK_FORCE 62 +#define TK_UNSAFE 63 +#define TK_CLUSTER 64 +#define TK_LOCAL 65 +#define TK_QNODE 66 +#define TK_BNODE 67 +#define TK_SNODE 68 +#define TK_MNODE 69 +#define TK_VNODE 70 +#define TK_DATABASE 71 +#define TK_USE 72 +#define TK_FLUSH 73 +#define TK_TRIM 74 +#define TK_S3MIGRATE 75 +#define TK_COMPACT 76 +#define TK_VGROUPS 77 +#define TK_IN 78 +#define TK_NK_LP 79 +#define TK_NK_RP 80 +#define TK_IF 81 +#define TK_NOT 82 +#define TK_EXISTS 83 +#define TK_BUFFER 84 +#define TK_CACHEMODEL 85 +#define TK_CACHESIZE 86 +#define TK_COMP 87 +#define TK_DURATION 88 +#define TK_NK_VARIABLE 89 +#define TK_MAXROWS 90 +#define TK_MINROWS 91 +#define TK_KEEP 92 +#define TK_PAGES 93 +#define TK_PAGESIZE 94 +#define TK_TSDB_PAGESIZE 95 +#define TK_PRECISION 96 +#define TK_REPLICA 97 +#define TK_SINGLE_STABLE 98 +#define TK_RETENTIONS 99 +#define TK_SCHEMALESS 100 +#define TK_WAL_LEVEL 101 +#define TK_WAL_FSYNC_PERIOD 102 +#define TK_WAL_RETENTION_PERIOD 103 +#define TK_WAL_RETENTION_SIZE 104 +#define TK_WAL_ROLL_PERIOD 105 +#define TK_WAL_SEGMENT_SIZE 106 +#define TK_STT_TRIGGER 107 +#define TK_TABLE_PREFIX 108 +#define TK_TABLE_SUFFIX 109 +#define TK_S3_CHUNKPAGES 110 +#define TK_S3_KEEPLOCAL 111 +#define TK_S3_COMPACT 112 +#define TK_KEEP_TIME_OFFSET 113 +#define TK_ENCRYPT_ALGORITHM 114 +#define TK_NK_COLON 115 +#define TK_BWLIMIT 116 +#define TK_START 117 +#define TK_TIMESTAMP 118 +#define TK_END 119 +#define TK_TABLE 120 +#define TK_USING 121 +#define TK_FILE 122 +#define TK_STABLE 123 +#define TK_COLUMN 124 +#define TK_MODIFY 125 +#define TK_RENAME 126 +#define TK_TAG 127 +#define TK_SET 128 +#define TK_NK_EQ 129 +#define TK_TAGS 130 +#define TK_BOOL 131 +#define TK_TINYINT 132 +#define TK_SMALLINT 133 +#define TK_INT 134 +#define TK_INTEGER 135 +#define TK_BIGINT 136 +#define TK_FLOAT 137 +#define TK_DOUBLE 138 +#define TK_BINARY 139 +#define TK_NCHAR 140 +#define TK_UNSIGNED 141 +#define TK_JSON 142 +#define TK_VARCHAR 143 +#define TK_MEDIUMBLOB 144 +#define TK_BLOB 145 +#define TK_VARBINARY 146 +#define TK_GEOMETRY 147 +#define TK_DECIMAL 148 +#define TK_COMMENT 149 +#define TK_MAX_DELAY 150 +#define TK_WATERMARK 151 +#define TK_ROLLUP 152 +#define TK_TTL 153 +#define TK_SMA 154 +#define TK_DELETE_MARK 155 +#define TK_FIRST 156 +#define TK_LAST 157 +#define TK_SHOW 158 +#define TK_FULL 159 +#define TK_PRIVILEGES 160 +#define TK_DATABASES 161 +#define TK_TABLES 162 +#define TK_STABLES 163 +#define TK_MNODES 164 +#define TK_QNODES 165 +#define TK_ARBGROUPS 166 +#define TK_FUNCTIONS 167 +#define TK_INDEXES 168 +#define TK_ACCOUNTS 169 +#define TK_APPS 170 +#define TK_CONNECTIONS 171 +#define TK_LICENCES 172 +#define TK_GRANTS 173 +#define TK_LOGS 174 +#define TK_MACHINES 175 +#define TK_ENCRYPTIONS 176 +#define TK_QUERIES 177 +#define TK_SCORES 178 +#define TK_TOPICS 179 +#define TK_VARIABLES 180 +#define TK_BNODES 181 +#define TK_SNODES 182 +#define TK_TRANSACTIONS 183 +#define TK_DISTRIBUTED 184 +#define TK_CONSUMERS 185 +#define TK_SUBSCRIPTIONS 186 +#define TK_VNODES 187 +#define TK_ALIVE 188 +#define TK_VIEWS 189 +#define TK_VIEW 190 +#define TK_COMPACTS 191 +#define TK_NORMAL 192 +#define TK_CHILD 193 +#define TK_LIKE 194 +#define TK_TBNAME 195 +#define TK_QTAGS 196 +#define TK_AS 197 +#define TK_SYSTEM 198 +#define TK_TSMA 199 +#define TK_INTERVAL 200 +#define TK_RECURSIVE 201 +#define TK_TSMAS 202 +#define TK_FUNCTION 203 +#define TK_INDEX 204 +#define TK_COUNT 205 +#define TK_LAST_ROW 206 +#define TK_META 207 +#define TK_ONLY 208 +#define TK_TOPIC 209 +#define TK_CONSUMER 210 +#define TK_GROUP 211 +#define TK_DESC 212 +#define TK_DESCRIBE 213 +#define TK_RESET 214 +#define TK_QUERY 215 +#define TK_CACHE 216 +#define TK_EXPLAIN 217 +#define TK_ANALYZE 218 +#define TK_VERBOSE 219 +#define TK_NK_BOOL 220 +#define TK_RATIO 221 +#define TK_NK_FLOAT 222 +#define TK_OUTPUTTYPE 223 +#define TK_AGGREGATE 224 +#define TK_BUFSIZE 225 +#define TK_LANGUAGE 226 +#define TK_REPLACE 227 +#define TK_STREAM 228 +#define TK_INTO 229 +#define TK_PAUSE 230 +#define TK_RESUME 231 +#define TK_PRIMARY 232 +#define TK_KEY 233 +#define TK_TRIGGER 234 +#define TK_AT_ONCE 235 +#define TK_WINDOW_CLOSE 236 +#define TK_IGNORE 237 +#define TK_EXPIRED 238 +#define TK_FILL_HISTORY 239 +#define TK_SUBTABLE 240 +#define TK_UNTREATED 241 +#define TK_KILL 242 +#define TK_CONNECTION 243 +#define TK_TRANSACTION 244 +#define TK_BALANCE 245 +#define TK_VGROUP 246 +#define TK_LEADER 247 +#define TK_MERGE 248 +#define TK_REDISTRIBUTE 249 +#define TK_SPLIT 250 +#define TK_DELETE 251 +#define TK_INSERT 252 +#define TK_NK_BIN 253 +#define TK_NK_HEX 254 +#define TK_NULL 255 +#define TK_NK_QUESTION 256 +#define TK_NK_ALIAS 257 +#define TK_NK_ARROW 258 +#define TK_ROWTS 259 +#define TK_QSTART 260 +#define TK_QEND 261 +#define TK_QDURATION 262 +#define TK_WSTART 263 +#define TK_WEND 264 +#define TK_WDURATION 265 +#define TK_IROWTS 266 +#define TK_ISFILLED 267 +#define TK_FLOW 268 +#define TK_FHIGH 269 +#define TK_FROWTS 270 +#define TK_CAST 271 +#define TK_POSITION 272 +#define TK_FOR 273 +#define TK_NOW 274 +#define TK_TODAY 275 +#define TK_RAND 276 +#define TK_SUBSTR 277 +#define TK_SUBSTRING 278 +#define TK_BOTH 279 +#define TK_TRAILING 280 +#define TK_LEADING 281 +#define TK_TIMEZONE 282 +#define TK_CLIENT_VERSION 283 +#define TK_SERVER_VERSION 284 +#define TK_SERVER_STATUS 285 +#define TK_CURRENT_USER 286 +#define TK_PI 287 +#define TK_CASE 288 +#define TK_WHEN 289 +#define TK_THEN 290 +#define TK_ELSE 291 +#define TK_BETWEEN 292 +#define TK_IS 293 +#define TK_NK_LT 294 +#define TK_NK_GT 295 +#define TK_NK_LE 296 +#define TK_NK_GE 297 +#define TK_NK_NE 298 +#define TK_MATCH 299 +#define TK_NMATCH 300 +#define TK_CONTAINS 301 +#define TK_JOIN 302 +#define TK_INNER 303 +#define TK_LEFT 304 +#define TK_RIGHT 305 +#define TK_OUTER 306 +#define TK_SEMI 307 +#define TK_ANTI 308 +#define TK_ASOF 309 +#define TK_WINDOW 310 +#define TK_WINDOW_OFFSET 311 +#define TK_JLIMIT 312 +#define TK_SELECT 313 +#define TK_NK_HINT 314 +#define TK_DISTINCT 315 +#define TK_WHERE 316 +#define TK_PARTITION 317 +#define TK_BY 318 +#define TK_SESSION 319 +#define TK_STATE_WINDOW 320 +#define TK_EVENT_WINDOW 321 +#define TK_COUNT_WINDOW 322 +#define TK_ANOMALY_WINDOW 323 +#define TK_SLIDING 324 +#define TK_FILL 325 +#define TK_VALUE 326 +#define TK_VALUE_F 327 +#define TK_NONE 328 +#define TK_PREV 329 +#define TK_NULL_F 330 +#define TK_LINEAR 331 +#define TK_NEXT 332 +#define TK_HAVING 333 +#define TK_RANGE 334 +#define TK_EVERY 335 +#define TK_ORDER 336 +#define TK_SLIMIT 337 +#define TK_SOFFSET 338 +#define TK_LIMIT 339 +#define TK_OFFSET 340 +#define TK_ASC 341 +#define TK_NULLS 342 +#define TK_ABORT 343 +#define TK_AFTER 344 +#define TK_ATTACH 345 +#define TK_BEFORE 346 +#define TK_BEGIN 347 +#define TK_BITAND 348 +#define TK_BITNOT 349 +#define TK_BITOR 350 +#define TK_BLOCKS 351 +#define TK_CHANGE 352 +#define TK_COMMA 353 +#define TK_CONCAT 354 +#define TK_CONFLICT 355 +#define TK_COPY 356 +#define TK_DEFERRED 357 +#define TK_DELIMITERS 358 +#define TK_DETACH 359 +#define TK_DIVIDE 360 +#define TK_DOT 361 +#define TK_EACH 362 +#define TK_FAIL 363 +#define TK_GLOB 364 +#define TK_ID 365 +#define TK_IMMEDIATE 366 +#define TK_IMPORT 367 +#define TK_INITIALLY 368 +#define TK_INSTEAD 369 +#define TK_ISNULL 370 +#define TK_MODULES 371 +#define TK_NK_BITNOT 372 +#define TK_NK_SEMI 373 +#define TK_NOTNULL 374 +#define TK_OF 375 +#define TK_PLUS 376 +#define TK_PRIVILEGE 377 +#define TK_RAISE 378 +#define TK_RESTRICT 379 +#define TK_ROW 380 +#define TK_STAR 381 +#define TK_STATEMENT 382 +#define TK_STRICT 383 +#define TK_STRING 384 +#define TK_TIMES 385 +#define TK_VALUES 386 +#define TK_VARIABLE 387 +#define TK_WAL 388 +#endif +/**************** End token definitions ***************************************/ /* The next sections is a series of control #defines. ** various aspects of the generated parser. @@ -144,18 +531,18 @@ typedef union { #define ParseCTX_FETCH #define ParseCTX_STORE #define YYFALLBACK 1 -#define YYNSTATE 1026 -#define YYNRULE 785 -#define YYNRULE_WITH_ACTION 785 +#define YYNSTATE 1033 +#define YYNRULE 786 +#define YYNRULE_WITH_ACTION 786 #define YYNTOKEN 389 -#define YY_MAX_SHIFT 1025 -#define YY_MIN_SHIFTREDUCE 1518 -#define YY_MAX_SHIFTREDUCE 2302 -#define YY_ERROR_ACTION 2303 -#define YY_ACCEPT_ACTION 2304 -#define YY_NO_ACTION 2305 -#define YY_MIN_REDUCE 2306 -#define YY_MAX_REDUCE 3090 +#define YY_MAX_SHIFT 1032 +#define YY_MIN_SHIFTREDUCE 1525 +#define YY_MAX_SHIFTREDUCE 2310 +#define YY_ERROR_ACTION 2311 +#define YY_ACCEPT_ACTION 2312 +#define YY_NO_ACTION 2313 +#define YY_MIN_REDUCE 2314 +#define YY_MAX_REDUCE 3099 /************* End control #defines *******************************************/ #define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0]))) @@ -222,916 +609,926 @@ typedef union { ** yy_default[] Default action for each state. ** *********** Begin parsing tables **********************************************/ -#define YY_ACTTAB_COUNT (4475) +#define YY_ACTTAB_COUNT (4572) static const YYACTIONTYPE yy_action[] = { - /* 0 */ 839, 683, 3063, 2678, 684, 2354, 113, 2510, 3058, 678, - /* 10 */ 3058, 2820, 60, 58, 225, 59, 57, 56, 55, 54, - /* 20 */ 506, 2307, 2019, 2676, 901, 471, 838, 231, 224, 3062, - /* 30 */ 2820, 3059, 840, 3059, 3061, 2514, 2017, 2803, 2127, 2402, - /* 40 */ 523, 2824, 151, 2845, 2568, 150, 149, 148, 147, 146, - /* 50 */ 145, 144, 143, 142, 196, 851, 170, 914, 854, 680, - /* 60 */ 2824, 53, 52, 526, 2523, 59, 57, 56, 55, 54, - /* 70 */ 512, 2122, 151, 2048, 884, 150, 149, 148, 147, 146, - /* 80 */ 145, 144, 143, 142, 919, 2025, 914, 2678, 2863, 53, - /* 90 */ 52, 2826, 2829, 59, 57, 56, 55, 54, 957, 691, - /* 100 */ 512, 498, 684, 2354, 2810, 919, 896, 2675, 901, 2044, - /* 110 */ 2826, 2828, 501, 2763, 919, 1022, 851, 170, 61, 991, - /* 120 */ 990, 989, 988, 536, 919, 987, 986, 175, 981, 980, - /* 130 */ 979, 978, 977, 976, 975, 174, 969, 968, 967, 535, - /* 140 */ 534, 964, 963, 962, 211, 210, 961, 531, 960, 959, - /* 150 */ 958, 2844, 2804, 2525, 2895, 2130, 2131, 127, 134, 2846, - /* 160 */ 900, 2848, 2849, 895, 45, 355, 883, 2896, 919, 914, - /* 170 */ 802, 772, 1594, 213, 1593, 2958, 2045, 251, 3058, 500, - /* 180 */ 2954, 207, 2966, 850, 63, 162, 849, 766, 166, 770, - /* 190 */ 768, 303, 302, 3058, 2080, 2090, 3064, 231, 829, 232, - /* 200 */ 785, 3059, 840, 3063, 2129, 2132, 528, 3005, 75, 2574, - /* 210 */ 2576, 838, 231, 1595, 782, 512, 3059, 840, 914, 2020, - /* 220 */ 2047, 2018, 824, 107, 197, 9, 882, 2223, 106, 919, - /* 230 */ 53, 52, 2452, 2044, 59, 57, 56, 55, 54, 676, - /* 240 */ 64, 853, 200, 2966, 2967, 699, 168, 2971, 674, 227, - /* 250 */ 318, 670, 666, 581, 2023, 2024, 2077, 2845, 2079, 2082, - /* 260 */ 2083, 2084, 2085, 2086, 2087, 2088, 2089, 2091, 2092, 2093, - /* 270 */ 892, 885, 894, 307, 917, 916, 881, 2114, 2115, 2116, - /* 280 */ 2117, 2118, 2121, 2123, 2124, 2125, 2126, 2128, 2, 60, - /* 290 */ 58, 2219, 2296, 2845, 445, 105, 2042, 506, 2306, 2019, - /* 300 */ 458, 118, 2863, 625, 644, 642, 469, 441, 897, 2049, - /* 310 */ 245, 1892, 1893, 2017, 646, 2127, 63, 79, 2810, 2289, - /* 320 */ 896, 2620, 160, 159, 158, 157, 156, 155, 154, 153, - /* 330 */ 152, 466, 468, 604, 2750, 648, 828, 220, 2863, 2194, - /* 340 */ 446, 606, 830, 825, 818, 814, 810, 2138, 2122, 2678, - /* 350 */ 2157, 884, 584, 2044, 2810, 19, 896, 3062, 1946, 1947, - /* 360 */ 1891, 1894, 2025, 508, 2651, 2844, 2863, 2329, 2895, 2675, - /* 370 */ 901, 2028, 436, 2846, 900, 2848, 2849, 895, 893, 339, - /* 380 */ 883, 2896, 919, 874, 2923, 954, 187, 186, 951, 950, - /* 390 */ 949, 184, 1022, 467, 2048, 15, 337, 2044, 851, 170, - /* 400 */ 1698, 2844, 2254, 339, 2895, 592, 518, 2081, 134, 2846, - /* 410 */ 900, 2848, 2849, 895, 1697, 2158, 883, 2896, 919, 558, - /* 420 */ 2603, 172, 2295, 181, 2929, 2958, 533, 532, 2810, 500, - /* 430 */ 2954, 75, 2130, 2131, 2077, 339, 2658, 2637, 827, 634, - /* 440 */ 633, 631, 630, 629, 624, 623, 622, 621, 450, 702, - /* 450 */ 2026, 611, 610, 609, 608, 607, 601, 600, 599, 510, - /* 460 */ 594, 593, 465, 2045, 706, 220, 585, 1853, 1854, 2078, - /* 470 */ 220, 2080, 2090, 1872, 821, 820, 2252, 2253, 2255, 2256, - /* 480 */ 2257, 2129, 2132, 2978, 2191, 2192, 2193, 2978, 2978, 2978, - /* 490 */ 2978, 2978, 2651, 649, 2163, 618, 2020, 2652, 2018, 41, - /* 500 */ 617, 688, 2044, 882, 956, 53, 52, 685, 616, 59, - /* 510 */ 57, 56, 55, 54, 44, 502, 2152, 2153, 2154, 2155, - /* 520 */ 2156, 2160, 2161, 2162, 140, 2966, 2967, 2081, 168, 2971, - /* 530 */ 2754, 2023, 2024, 2077, 2845, 2079, 2082, 2083, 2084, 2085, - /* 540 */ 2086, 2087, 2088, 2089, 2091, 2092, 2093, 892, 885, 854, - /* 550 */ 3063, 917, 916, 881, 2114, 2115, 2031, 562, 3058, 2121, - /* 560 */ 2123, 2124, 2125, 2126, 2128, 2, 60, 58, 2845, 2194, - /* 570 */ 2019, 1865, 1866, 75, 506, 700, 2019, 3062, 620, 2863, - /* 580 */ 222, 3059, 3060, 897, 2017, 564, 560, 546, 1750, 2078, - /* 590 */ 2017, 1988, 2127, 619, 205, 2810, 332, 896, 1789, 1790, - /* 600 */ 75, 2328, 1563, 1741, 946, 945, 944, 1745, 943, 1747, - /* 610 */ 1748, 942, 939, 2863, 1756, 936, 1758, 1759, 933, 930, - /* 620 */ 927, 1570, 517, 516, 786, 2122, 339, 887, 884, 2810, - /* 630 */ 2049, 896, 19, 2025, 137, 2029, 915, 2521, 886, 2025, - /* 640 */ 701, 2671, 2844, 526, 2523, 2895, 1565, 1568, 1569, 134, - /* 650 */ 2846, 900, 2848, 2849, 895, 12, 530, 883, 2896, 919, - /* 660 */ 915, 2521, 2810, 1022, 213, 117, 2958, 590, 2647, 1022, - /* 670 */ 500, 2954, 15, 572, 971, 571, 2844, 915, 2521, 2895, - /* 680 */ 161, 2845, 521, 135, 2846, 900, 2848, 2849, 895, 731, - /* 690 */ 842, 883, 2896, 919, 487, 2725, 897, 236, 3006, 1920, - /* 700 */ 2958, 2503, 473, 2194, 2957, 2954, 570, 693, 2717, 2130, - /* 710 */ 2131, 2575, 2576, 2978, 2191, 2192, 2193, 2978, 2978, 2978, - /* 720 */ 2978, 2978, 247, 53, 52, 783, 2863, 59, 57, 56, - /* 730 */ 55, 54, 752, 751, 750, 851, 170, 915, 2521, 742, - /* 740 */ 167, 746, 2810, 2025, 896, 745, 973, 2973, 2080, 2090, - /* 750 */ 744, 749, 480, 479, 915, 2521, 743, 161, 2129, 2132, - /* 760 */ 478, 739, 738, 737, 1597, 1598, 736, 2020, 339, 2018, - /* 770 */ 915, 2521, 43, 2020, 68, 2018, 2970, 2048, 53, 52, - /* 780 */ 882, 389, 59, 57, 56, 55, 54, 267, 2047, 2844, - /* 790 */ 578, 686, 2895, 2362, 2496, 339, 199, 2846, 900, 2848, - /* 800 */ 2849, 895, 2023, 2024, 883, 2896, 919, 2304, 2023, 2024, - /* 810 */ 2077, 2845, 2079, 2082, 2083, 2084, 2085, 2086, 2087, 2088, - /* 820 */ 2089, 2091, 2092, 2093, 892, 885, 897, 176, 917, 916, - /* 830 */ 881, 2114, 2115, 947, 2265, 2044, 2121, 2123, 2124, 2125, - /* 840 */ 2126, 2128, 2, 12, 60, 58, 803, 3016, 2191, 2192, - /* 850 */ 2193, 269, 506, 195, 2019, 686, 2863, 2362, 786, 1686, - /* 860 */ 1750, 201, 2966, 2967, 2527, 168, 2971, 1987, 2017, 198, - /* 870 */ 2127, 2318, 2810, 2508, 896, 1741, 946, 945, 944, 1745, - /* 880 */ 943, 1747, 1748, 891, 890, 2581, 1756, 889, 1758, 1759, - /* 890 */ 888, 930, 927, 464, 596, 2647, 2973, 539, 520, 519, - /* 900 */ 346, 347, 538, 2122, 2579, 345, 884, 638, 1688, 396, - /* 910 */ 19, 3019, 2196, 2197, 2198, 2199, 2200, 2025, 1681, 2844, - /* 920 */ 915, 2521, 2895, 627, 2647, 2969, 135, 2846, 900, 2848, - /* 930 */ 2849, 895, 915, 2521, 883, 2896, 919, 2506, 915, 2521, - /* 940 */ 579, 788, 2717, 2958, 2845, 915, 2521, 1022, 2955, 249, - /* 950 */ 15, 2327, 598, 226, 802, 2581, 915, 2521, 612, 897, - /* 960 */ 2764, 2364, 3058, 496, 337, 613, 190, 1682, 703, 486, - /* 970 */ 2725, 409, 533, 532, 2579, 256, 614, 1594, 254, 1593, - /* 980 */ 3064, 231, 2033, 2581, 839, 3059, 840, 2130, 2131, 2863, - /* 990 */ 407, 89, 3058, 395, 88, 2326, 2026, 12, 2127, 10, - /* 1000 */ 637, 255, 858, 470, 2495, 2810, 314, 896, 447, 2081, - /* 1010 */ 838, 231, 2810, 2049, 635, 3059, 840, 802, 1595, 402, - /* 1020 */ 265, 661, 659, 656, 654, 3058, 2080, 2090, 2665, 974, - /* 1030 */ 704, 2122, 2478, 1702, 53, 52, 2129, 2132, 59, 57, - /* 1040 */ 56, 55, 54, 3064, 231, 2025, 2581, 1701, 3059, 840, - /* 1050 */ 91, 2020, 2844, 2018, 511, 2895, 2810, 2048, 882, 134, - /* 1060 */ 2846, 900, 2848, 2849, 895, 2579, 75, 883, 2896, 919, - /* 1070 */ 875, 2078, 2930, 2325, 3078, 879, 2958, 56, 55, 54, - /* 1080 */ 500, 2954, 14, 13, 574, 1570, 2023, 2024, 2077, 573, - /* 1090 */ 2079, 2082, 2083, 2084, 2085, 2086, 2087, 2088, 2089, 2091, - /* 1100 */ 2092, 2093, 892, 885, 104, 76, 917, 916, 881, 2114, - /* 1110 */ 2115, 1568, 1569, 2324, 2121, 2123, 2124, 2125, 2126, 2128, - /* 1120 */ 2, 60, 58, 2133, 915, 2521, 651, 2323, 2525, 506, - /* 1130 */ 2322, 2019, 53, 52, 2810, 2370, 59, 57, 56, 55, - /* 1140 */ 54, 802, 306, 775, 705, 2017, 305, 2127, 171, 3058, - /* 1150 */ 759, 2929, 954, 187, 186, 951, 950, 949, 184, 101, - /* 1160 */ 100, 577, 915, 2521, 244, 773, 509, 3064, 231, 2492, - /* 1170 */ 2321, 40, 3059, 840, 2810, 2319, 195, 569, 567, 2034, - /* 1180 */ 2122, 2029, 2516, 884, 304, 725, 724, 2526, 2810, 444, - /* 1190 */ 2405, 2810, 556, 1009, 2025, 552, 548, 544, 541, 570, - /* 1200 */ 2171, 53, 52, 762, 2246, 59, 57, 56, 55, 54, - /* 1210 */ 756, 754, 915, 2521, 2037, 2039, 948, 301, 2247, 2572, - /* 1220 */ 116, 2845, 727, 726, 1022, 453, 34, 61, 485, 2581, - /* 1230 */ 774, 2810, 309, 234, 917, 916, 897, 527, 3013, 748, - /* 1240 */ 747, 2320, 2121, 2123, 2124, 2125, 2126, 2128, 2579, 915, - /* 1250 */ 2521, 53, 52, 915, 2521, 59, 57, 56, 55, 54, - /* 1260 */ 2216, 339, 2453, 85, 2130, 2131, 2863, 2245, 84, 317, - /* 1270 */ 752, 751, 750, 857, 2044, 205, 809, 742, 167, 746, - /* 1280 */ 97, 801, 2810, 745, 896, 915, 2521, 2317, 744, 749, - /* 1290 */ 480, 479, 822, 2049, 743, 915, 2521, 173, 478, 739, - /* 1300 */ 738, 737, 2810, 2080, 2090, 350, 915, 2521, 2511, 877, - /* 1310 */ 833, 2930, 2266, 2129, 2132, 871, 553, 954, 187, 186, - /* 1320 */ 951, 950, 949, 184, 126, 776, 357, 2316, 2020, 2844, - /* 1330 */ 2018, 2159, 2895, 985, 983, 882, 134, 2846, 900, 2848, - /* 1340 */ 2849, 895, 2581, 238, 883, 2896, 919, 952, 2810, 2592, - /* 1350 */ 2572, 3078, 2512, 2958, 2493, 2315, 403, 500, 2954, 2314, - /* 1360 */ 2558, 866, 2241, 2023, 2024, 2077, 2845, 2079, 2082, 2083, - /* 1370 */ 2084, 2085, 2086, 2087, 2088, 2089, 2091, 2092, 2093, 892, - /* 1380 */ 885, 897, 2205, 917, 916, 881, 2114, 2115, 2810, 915, - /* 1390 */ 2521, 2121, 2123, 2124, 2125, 2126, 2128, 2, 60, 58, - /* 1400 */ 2845, 915, 2521, 915, 2521, 2313, 506, 2312, 2019, 908, - /* 1410 */ 2164, 2863, 915, 2521, 2311, 897, 2810, 3026, 396, 2310, - /* 1420 */ 2810, 909, 2017, 913, 2127, 73, 2309, 2810, 185, 896, - /* 1430 */ 42, 956, 385, 53, 52, 2973, 799, 59, 57, 56, - /* 1440 */ 55, 54, 53, 52, 529, 2863, 59, 57, 56, 55, - /* 1450 */ 54, 2581, 953, 1572, 195, 2572, 2630, 2122, 735, 2043, - /* 1460 */ 884, 2810, 734, 896, 2968, 2526, 2810, 113, 2810, 2583, - /* 1470 */ 2580, 2025, 2731, 294, 2844, 2810, 292, 2895, 177, 2726, - /* 1480 */ 2810, 413, 2846, 900, 2848, 2849, 895, 2810, 32, 883, - /* 1490 */ 2896, 919, 196, 2334, 1015, 3, 2515, 333, 2845, 843, - /* 1500 */ 588, 1022, 2524, 846, 61, 2112, 922, 632, 2844, 66, - /* 1510 */ 2078, 2895, 2027, 897, 67, 134, 2846, 900, 2848, 2849, - /* 1520 */ 895, 163, 177, 883, 2896, 919, 296, 852, 298, 295, - /* 1530 */ 3078, 297, 2958, 185, 308, 103, 500, 2954, 2389, 740, - /* 1540 */ 741, 2130, 2131, 2863, 2104, 300, 2298, 2299, 299, 325, - /* 1550 */ 53, 52, 812, 2235, 59, 57, 56, 55, 54, 2810, - /* 1560 */ 753, 896, 1679, 1677, 1936, 14, 13, 165, 53, 52, - /* 1570 */ 880, 2215, 59, 57, 56, 55, 54, 2864, 53, 52, - /* 1580 */ 2080, 2090, 59, 57, 56, 55, 54, 2444, 1658, 47, - /* 1590 */ 2129, 2132, 53, 52, 62, 62, 59, 57, 56, 55, - /* 1600 */ 54, 132, 214, 129, 62, 2020, 2844, 2018, 1944, 2895, - /* 1610 */ 2387, 2378, 882, 134, 2846, 900, 2848, 2849, 895, 856, - /* 1620 */ 344, 883, 2896, 919, 364, 363, 2831, 647, 2933, 2443, - /* 1630 */ 2958, 2355, 755, 757, 500, 2954, 2376, 1659, 2239, 3009, - /* 1640 */ 2023, 2024, 2077, 819, 2079, 2082, 2083, 2084, 2085, 2086, - /* 1650 */ 2087, 2088, 2089, 2091, 2092, 2093, 892, 885, 760, 492, - /* 1660 */ 917, 916, 881, 2114, 2115, 488, 90, 62, 2121, 2123, - /* 1670 */ 2124, 2125, 2126, 2128, 2, 60, 58, 2845, 77, 2100, - /* 1680 */ 2251, 2250, 779, 506, 826, 2019, 62, 860, 323, 2102, - /* 1690 */ 2113, 62, 897, 2833, 816, 366, 365, 2030, 46, 2017, - /* 1700 */ 62, 2127, 2656, 2105, 90, 537, 348, 53, 52, 555, - /* 1710 */ 39, 59, 57, 56, 55, 54, 2361, 923, 2569, 53, - /* 1720 */ 52, 795, 2863, 59, 57, 56, 55, 54, 2845, 87, - /* 1730 */ 368, 367, 370, 369, 2122, 372, 371, 884, 2810, 802, - /* 1740 */ 896, 182, 163, 897, 3010, 185, 2149, 3058, 2025, 374, - /* 1750 */ 373, 965, 863, 2103, 376, 375, 378, 377, 48, 380, - /* 1760 */ 379, 382, 381, 925, 2165, 3064, 231, 384, 383, 183, - /* 1770 */ 3059, 840, 2106, 2863, 1650, 966, 185, 2094, 1022, 3020, - /* 1780 */ 335, 61, 834, 835, 1631, 2844, 1889, 330, 2895, 2810, - /* 1790 */ 1879, 896, 134, 2846, 900, 2848, 2849, 895, 1648, 164, - /* 1800 */ 883, 2896, 919, 2657, 844, 338, 2479, 3078, 540, 2958, - /* 1810 */ 847, 182, 5, 500, 2954, 401, 53, 52, 2130, 2131, - /* 1820 */ 59, 57, 56, 55, 54, 545, 462, 360, 912, 2042, - /* 1830 */ 2099, 1732, 554, 1632, 2052, 566, 2844, 565, 239, 2895, - /* 1840 */ 1913, 582, 240, 135, 2846, 900, 2848, 2849, 895, 1763, - /* 1850 */ 568, 883, 2896, 919, 394, 1771, 242, 2080, 2090, 2043, - /* 1860 */ 2958, 589, 1778, 253, 878, 2954, 591, 2129, 2132, 53, - /* 1870 */ 52, 597, 595, 59, 57, 56, 55, 54, 640, 602, - /* 1880 */ 615, 2649, 2020, 628, 2018, 1776, 53, 52, 626, 882, - /* 1890 */ 59, 57, 56, 55, 54, 636, 639, 188, 652, 477, - /* 1900 */ 475, 641, 650, 653, 259, 258, 657, 655, 658, 262, - /* 1910 */ 660, 662, 2050, 681, 4, 682, 689, 2023, 2024, 2077, - /* 1920 */ 692, 2079, 2082, 2083, 2084, 2085, 2086, 2087, 2088, 2089, - /* 1930 */ 2091, 2092, 2093, 892, 885, 690, 270, 917, 916, 881, - /* 1940 */ 2114, 2115, 2045, 787, 109, 2121, 2123, 2124, 2125, 2126, - /* 1950 */ 2128, 2, 60, 58, 694, 273, 2051, 695, 2053, 696, - /* 1960 */ 506, 276, 2019, 698, 855, 278, 2054, 2672, 110, 2055, - /* 1970 */ 1730, 49, 2666, 111, 2845, 730, 2017, 284, 2127, 707, - /* 1980 */ 2101, 112, 474, 472, 114, 733, 2740, 287, 763, 897, - /* 1990 */ 764, 3051, 2737, 732, 2509, 139, 291, 2098, 439, 778, - /* 2000 */ 802, 2736, 2505, 780, 138, 2845, 735, 115, 3058, 178, - /* 2010 */ 734, 2122, 2046, 397, 884, 293, 191, 136, 2507, 2863, - /* 2020 */ 897, 802, 2502, 192, 2718, 2025, 3064, 231, 193, 3058, - /* 2030 */ 310, 3059, 840, 791, 789, 2810, 790, 896, 794, 315, - /* 2040 */ 823, 313, 3025, 796, 797, 806, 861, 3064, 231, 3024, - /* 2050 */ 2863, 832, 3059, 840, 8, 1022, 2845, 2997, 61, 204, - /* 2060 */ 807, 320, 326, 322, 324, 805, 2810, 804, 896, 837, - /* 2070 */ 327, 897, 328, 2990, 329, 836, 493, 2977, 331, 848, - /* 2080 */ 334, 3081, 2844, 845, 3057, 2895, 169, 2047, 2213, 134, - /* 2090 */ 2846, 900, 2848, 2849, 895, 2130, 2131, 883, 2896, 919, - /* 2100 */ 2211, 2863, 2974, 217, 3078, 340, 2958, 179, 398, 859, - /* 2110 */ 500, 2954, 2686, 898, 1, 2685, 2895, 2810, 2684, 896, - /* 2120 */ 135, 2846, 900, 2848, 2849, 895, 497, 399, 883, 2896, - /* 2130 */ 919, 864, 180, 869, 2080, 2090, 865, 2958, 872, 353, - /* 2140 */ 74, 457, 2954, 233, 2129, 2132, 2939, 902, 906, 400, - /* 2150 */ 904, 2802, 907, 2801, 358, 2797, 2796, 2788, 125, 2020, - /* 2160 */ 2522, 2018, 128, 2787, 2844, 387, 882, 2895, 1542, 2779, - /* 2170 */ 921, 134, 2846, 900, 2848, 2849, 895, 2778, 404, 883, - /* 2180 */ 2896, 919, 2794, 1018, 1019, 2793, 3078, 782, 2958, 1017, - /* 2190 */ 1014, 406, 500, 2954, 2023, 2024, 2077, 189, 2079, 2082, - /* 2200 */ 2083, 2084, 2085, 2086, 2087, 2088, 2089, 2091, 2092, 2093, - /* 2210 */ 892, 885, 2785, 390, 917, 916, 881, 2114, 2115, 391, - /* 2220 */ 2784, 1021, 2121, 2123, 2124, 2125, 2126, 2128, 2, 60, - /* 2230 */ 58, 440, 2773, 2772, 2791, 476, 2790, 506, 2782, 2019, - /* 2240 */ 2781, 65, 2770, 2769, 2767, 2766, 427, 2573, 454, 455, - /* 2250 */ 438, 2845, 524, 2017, 428, 2127, 408, 2762, 2761, 2760, - /* 2260 */ 98, 2755, 542, 543, 1970, 547, 897, 1971, 237, 2753, - /* 2270 */ 549, 550, 551, 1969, 2752, 2751, 463, 2749, 557, 2748, - /* 2280 */ 559, 2747, 561, 2746, 563, 1957, 2722, 241, 2122, 2721, - /* 2290 */ 243, 884, 99, 1916, 1915, 2699, 2863, 2698, 2697, 575, - /* 2300 */ 576, 2696, 2025, 2695, 2639, 580, 1852, 2636, 583, 2635, - /* 2310 */ 2629, 2626, 2810, 587, 896, 246, 586, 2625, 102, 2624, - /* 2320 */ 2623, 2628, 2627, 2622, 248, 2621, 2619, 449, 448, 2618, - /* 2330 */ 2617, 250, 1022, 2845, 2616, 15, 603, 513, 605, 2614, - /* 2340 */ 2613, 2612, 2611, 2610, 2634, 2609, 2608, 2607, 897, 2632, - /* 2350 */ 2615, 522, 2606, 2127, 2605, 2604, 2602, 2601, 2600, 2844, - /* 2360 */ 2599, 2598, 2895, 2597, 252, 2596, 134, 2846, 900, 2848, - /* 2370 */ 2849, 895, 2130, 2131, 883, 2896, 919, 2595, 2863, 108, - /* 2380 */ 2594, 2931, 2593, 2958, 2591, 2590, 2122, 500, 2954, 2664, - /* 2390 */ 2633, 2631, 2589, 2588, 2810, 1858, 896, 2587, 2586, 257, - /* 2400 */ 643, 2585, 645, 2584, 2582, 1699, 2409, 260, 1703, 2408, - /* 2410 */ 1695, 2080, 2090, 2407, 451, 2406, 452, 2404, 2401, 261, - /* 2420 */ 665, 2129, 2132, 663, 263, 664, 2400, 668, 2393, 672, - /* 2430 */ 264, 667, 669, 2380, 2368, 671, 2020, 677, 2018, 2367, - /* 2440 */ 673, 2844, 2350, 882, 2895, 2830, 675, 679, 134, 2846, - /* 2450 */ 900, 2848, 2849, 895, 266, 212, 883, 2896, 919, 223, - /* 2460 */ 94, 1571, 2349, 876, 268, 2958, 2720, 2716, 95, 500, - /* 2470 */ 2954, 2023, 2024, 2077, 687, 2079, 2082, 2083, 2084, 2085, - /* 2480 */ 2086, 2087, 2088, 2089, 2091, 2092, 2093, 892, 885, 784, - /* 2490 */ 2706, 917, 916, 881, 2114, 2115, 2694, 275, 277, 2121, - /* 2500 */ 2123, 2124, 2125, 2126, 2128, 2, 2693, 1025, 280, 2670, - /* 2510 */ 282, 2663, 2497, 2403, 1624, 2845, 2399, 708, 709, 710, - /* 2520 */ 2397, 712, 713, 714, 2395, 716, 393, 717, 718, 2392, - /* 2530 */ 897, 720, 2375, 721, 2010, 722, 1986, 2373, 2374, 2372, - /* 2540 */ 2369, 1013, 1011, 728, 2346, 221, 2499, 290, 86, 1782, - /* 2550 */ 1783, 2498, 1685, 1684, 1007, 1003, 999, 995, 1683, 388, - /* 2560 */ 2863, 1680, 1678, 2390, 1676, 2388, 982, 515, 514, 2011, - /* 2570 */ 1675, 1674, 1673, 2379, 1667, 984, 2810, 1672, 896, 1669, - /* 2580 */ 481, 1668, 482, 1666, 483, 2377, 484, 2345, 2344, 917, - /* 2590 */ 916, 761, 2343, 765, 2342, 767, 2341, 2121, 2123, 2124, - /* 2600 */ 2125, 2126, 2128, 769, 2340, 133, 771, 758, 1951, 141, - /* 2610 */ 361, 1953, 1950, 1955, 2719, 33, 80, 312, 2715, 1922, - /* 2620 */ 1924, 2845, 2705, 2844, 792, 69, 2895, 70, 1926, 316, - /* 2630 */ 202, 2846, 900, 2848, 2849, 895, 897, 1941, 883, 2896, - /* 2640 */ 919, 867, 793, 2692, 2845, 781, 2691, 194, 1901, 798, - /* 2650 */ 1900, 800, 3063, 22, 808, 17, 23, 811, 6, 897, - /* 2660 */ 489, 7, 24, 216, 228, 2206, 2863, 35, 2831, 2268, - /* 2670 */ 38, 319, 229, 2242, 36, 78, 2208, 26, 2283, 336, - /* 2680 */ 2240, 2282, 2810, 494, 896, 817, 359, 813, 873, 2863, - /* 2690 */ 815, 342, 841, 3079, 2287, 203, 341, 321, 2249, 215, - /* 2700 */ 37, 2286, 495, 72, 96, 2810, 503, 896, 208, 2234, - /* 2710 */ 2204, 230, 2690, 2669, 2288, 311, 2289, 119, 25, 2188, - /* 2720 */ 2845, 120, 2187, 2668, 343, 121, 2244, 2662, 218, 2844, - /* 2730 */ 349, 122, 2895, 82, 71, 897, 437, 2846, 900, 2848, - /* 2740 */ 2849, 895, 27, 352, 883, 2896, 919, 13, 18, 209, - /* 2750 */ 868, 2140, 2844, 11, 2139, 2895, 2035, 2150, 219, 199, - /* 2760 */ 2846, 900, 2848, 2849, 895, 2863, 21, 883, 2896, 919, - /* 2770 */ 28, 2845, 29, 351, 20, 2070, 899, 50, 2661, 123, - /* 2780 */ 2097, 2810, 2096, 896, 129, 932, 897, 935, 2494, 938, - /* 2790 */ 910, 941, 51, 362, 2095, 2062, 16, 30, 31, 2302, - /* 2800 */ 862, 83, 1755, 903, 2845, 490, 356, 870, 124, 354, - /* 2810 */ 3017, 92, 911, 2908, 2907, 905, 2863, 924, 2109, 897, - /* 2820 */ 918, 81, 525, 920, 1764, 1761, 926, 928, 2844, 929, - /* 2830 */ 931, 2895, 2810, 1760, 896, 437, 2846, 900, 2848, 2849, - /* 2840 */ 895, 1757, 934, 883, 2896, 919, 937, 1751, 1749, 2863, - /* 2850 */ 940, 2301, 386, 1777, 130, 1754, 491, 1753, 1752, 131, - /* 2860 */ 1773, 93, 1622, 955, 1663, 2810, 1662, 896, 1661, 2845, - /* 2870 */ 1660, 1657, 1654, 1653, 1693, 1652, 1651, 1649, 1692, 2844, - /* 2880 */ 1640, 1647, 2895, 1646, 897, 1645, 437, 2846, 900, 2848, - /* 2890 */ 2849, 895, 2845, 235, 883, 2896, 919, 1643, 1642, 1641, - /* 2900 */ 1639, 1638, 970, 1637, 972, 1689, 1687, 894, 1634, 1633, - /* 2910 */ 1630, 1629, 2844, 1628, 2863, 2895, 1627, 2398, 992, 430, - /* 2920 */ 2846, 900, 2848, 2849, 895, 993, 2396, 883, 2896, 919, - /* 2930 */ 2810, 994, 896, 996, 997, 2394, 998, 2863, 1000, 1002, - /* 2940 */ 1001, 2391, 1004, 1005, 1006, 2371, 1008, 2366, 2365, 1010, - /* 2950 */ 1012, 1560, 2339, 2810, 1543, 896, 1016, 1548, 1550, 392, - /* 2960 */ 2845, 1020, 2305, 2305, 2021, 405, 2305, 1023, 2305, 1024, - /* 2970 */ 2305, 2305, 2305, 831, 2305, 897, 2305, 2844, 2305, 2305, - /* 2980 */ 2895, 2305, 2305, 2305, 202, 2846, 900, 2848, 2849, 895, - /* 2990 */ 2305, 2305, 883, 2896, 919, 2305, 2305, 2305, 2305, 2305, - /* 3000 */ 2844, 2305, 2305, 2895, 2305, 2863, 2305, 436, 2846, 900, - /* 3010 */ 2848, 2849, 895, 2305, 2305, 883, 2896, 919, 2305, 2924, - /* 3020 */ 2305, 2810, 2305, 896, 2305, 2845, 2305, 289, 2305, 2305, - /* 3030 */ 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, - /* 3040 */ 897, 2305, 2305, 729, 2305, 504, 206, 3080, 2305, 2305, - /* 3050 */ 2305, 2305, 2845, 2305, 2305, 723, 719, 715, 711, 2305, - /* 3060 */ 288, 2305, 2305, 2305, 2305, 2305, 2305, 897, 2844, 2305, - /* 3070 */ 2863, 2895, 2305, 2305, 2305, 437, 2846, 900, 2848, 2849, - /* 3080 */ 895, 2305, 2305, 883, 2896, 919, 2810, 2305, 896, 2305, - /* 3090 */ 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2863, 2305, 2305, - /* 3100 */ 2305, 2305, 2305, 2305, 2305, 2305, 286, 2305, 2305, 2305, - /* 3110 */ 499, 285, 2305, 2810, 2305, 896, 2305, 2305, 2305, 2305, - /* 3120 */ 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, - /* 3130 */ 2305, 2305, 2305, 2844, 2305, 2305, 2895, 505, 2845, 2305, - /* 3140 */ 422, 2846, 900, 2848, 2849, 895, 2305, 2305, 883, 2896, - /* 3150 */ 919, 2305, 2305, 897, 2305, 2305, 2305, 2305, 2845, 2305, - /* 3160 */ 2844, 2305, 2305, 2895, 2305, 2305, 2305, 437, 2846, 900, - /* 3170 */ 2848, 2849, 895, 897, 2305, 883, 2896, 919, 272, 2845, - /* 3180 */ 2305, 2305, 2305, 2863, 2305, 2305, 2305, 283, 2305, 2305, - /* 3190 */ 2305, 274, 281, 2305, 897, 2305, 2305, 279, 697, 2810, - /* 3200 */ 2305, 896, 2305, 2863, 2305, 2305, 2305, 2305, 2305, 2305, - /* 3210 */ 2305, 2305, 2305, 2305, 2305, 2305, 271, 2305, 2305, 2810, - /* 3220 */ 2305, 896, 2305, 507, 2863, 2305, 2305, 2305, 2305, 2305, - /* 3230 */ 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, - /* 3240 */ 2810, 2305, 896, 2305, 2305, 2305, 2844, 2305, 2305, 2895, - /* 3250 */ 2305, 2305, 2305, 437, 2846, 900, 2848, 2849, 895, 2305, - /* 3260 */ 2305, 883, 2896, 919, 2305, 2305, 2844, 2305, 2305, 2895, - /* 3270 */ 2305, 2305, 2305, 418, 2846, 900, 2848, 2849, 895, 2305, - /* 3280 */ 2305, 883, 2896, 919, 2305, 2845, 2305, 777, 2305, 2305, - /* 3290 */ 2895, 2305, 2305, 2305, 432, 2846, 900, 2848, 2849, 895, - /* 3300 */ 897, 2305, 883, 2896, 919, 2845, 2305, 2305, 2305, 2305, - /* 3310 */ 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, - /* 3320 */ 897, 2305, 2305, 2305, 2305, 2845, 2305, 2305, 2305, 2305, - /* 3330 */ 2863, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, - /* 3340 */ 897, 2305, 2305, 2305, 2305, 2305, 2810, 2305, 896, 2305, - /* 3350 */ 2863, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, - /* 3360 */ 2305, 2305, 2305, 2305, 2305, 2305, 2810, 2305, 896, 2305, - /* 3370 */ 2863, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, - /* 3380 */ 2305, 2305, 2305, 2305, 2305, 2305, 2810, 2305, 896, 2305, - /* 3390 */ 2305, 2305, 2305, 2844, 2305, 2305, 2895, 2305, 2305, 2305, - /* 3400 */ 414, 2846, 900, 2848, 2849, 895, 2305, 2305, 883, 2896, - /* 3410 */ 919, 2305, 2845, 2844, 2305, 2305, 2895, 2305, 2305, 2305, - /* 3420 */ 410, 2846, 900, 2848, 2849, 895, 2305, 897, 883, 2896, - /* 3430 */ 919, 2305, 2305, 2844, 2305, 2305, 2895, 2305, 2845, 2305, - /* 3440 */ 411, 2846, 900, 2848, 2849, 895, 2305, 2305, 883, 2896, - /* 3450 */ 919, 2305, 2305, 897, 2305, 2305, 2305, 2863, 2305, 2305, - /* 3460 */ 2305, 2845, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, - /* 3470 */ 2305, 2305, 2305, 2810, 2305, 896, 897, 2305, 2305, 2305, - /* 3480 */ 2305, 2845, 2305, 2863, 2305, 2305, 2305, 2305, 2305, 2305, - /* 3490 */ 2305, 2305, 2305, 2305, 2305, 2305, 897, 2305, 2305, 2810, - /* 3500 */ 2305, 896, 2305, 2845, 2305, 2305, 2863, 2305, 2305, 2305, - /* 3510 */ 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 897, 2305, - /* 3520 */ 2844, 2305, 2810, 2895, 896, 2305, 2863, 415, 2846, 900, - /* 3530 */ 2848, 2849, 895, 2305, 2305, 883, 2896, 919, 2305, 2305, - /* 3540 */ 2305, 2305, 2810, 2305, 896, 2305, 2844, 2305, 2863, 2895, - /* 3550 */ 2305, 2305, 2305, 429, 2846, 900, 2848, 2849, 895, 2305, - /* 3560 */ 2305, 883, 2896, 919, 2810, 2305, 896, 2305, 2845, 2844, - /* 3570 */ 2305, 2305, 2895, 2305, 2305, 2305, 416, 2846, 900, 2848, - /* 3580 */ 2849, 895, 2305, 897, 883, 2896, 919, 2845, 2305, 2844, - /* 3590 */ 2305, 2305, 2895, 2305, 2305, 2305, 417, 2846, 900, 2848, - /* 3600 */ 2849, 895, 897, 2305, 883, 2896, 919, 2305, 2305, 2845, - /* 3610 */ 2305, 2844, 2305, 2863, 2895, 2305, 2305, 2305, 433, 2846, - /* 3620 */ 900, 2848, 2849, 895, 897, 2305, 883, 2896, 919, 2810, - /* 3630 */ 2305, 896, 2863, 2305, 2305, 2305, 2305, 2305, 2305, 2305, - /* 3640 */ 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2810, 2305, - /* 3650 */ 896, 2305, 2305, 2305, 2863, 2305, 2305, 2305, 2305, 2305, - /* 3660 */ 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, - /* 3670 */ 2810, 2305, 896, 2305, 2845, 2305, 2844, 2305, 2305, 2895, - /* 3680 */ 2305, 2305, 2305, 419, 2846, 900, 2848, 2849, 895, 897, - /* 3690 */ 2305, 883, 2896, 919, 2305, 2844, 2305, 2305, 2895, 2305, - /* 3700 */ 2305, 2305, 434, 2846, 900, 2848, 2849, 895, 2305, 2305, - /* 3710 */ 883, 2896, 919, 2305, 2305, 2305, 2305, 2844, 2305, 2863, - /* 3720 */ 2895, 2305, 2305, 2845, 420, 2846, 900, 2848, 2849, 895, - /* 3730 */ 2305, 2305, 883, 2896, 919, 2810, 2305, 896, 897, 2305, - /* 3740 */ 2305, 2305, 2305, 2845, 2305, 2305, 2305, 2305, 2305, 2305, - /* 3750 */ 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 897, 2305, - /* 3760 */ 2305, 2305, 2305, 2845, 2305, 2305, 2305, 2305, 2863, 2305, - /* 3770 */ 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 897, 2305, - /* 3780 */ 2305, 2305, 2844, 2305, 2810, 2895, 896, 2305, 2863, 435, - /* 3790 */ 2846, 900, 2848, 2849, 895, 2305, 2305, 883, 2896, 919, - /* 3800 */ 2305, 2305, 2305, 2305, 2810, 2305, 896, 2305, 2863, 2305, - /* 3810 */ 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, - /* 3820 */ 2305, 2305, 2305, 2305, 2810, 2305, 896, 2305, 2305, 2305, - /* 3830 */ 2305, 2844, 2305, 2305, 2895, 2305, 2305, 2305, 421, 2846, - /* 3840 */ 900, 2848, 2849, 895, 2305, 2305, 883, 2896, 919, 2305, - /* 3850 */ 2845, 2844, 2305, 2305, 2895, 2305, 2305, 2305, 412, 2846, - /* 3860 */ 900, 2848, 2849, 895, 2305, 897, 883, 2896, 919, 2845, - /* 3870 */ 2305, 2844, 2305, 2305, 2895, 2305, 2305, 2305, 423, 2846, - /* 3880 */ 900, 2848, 2849, 895, 897, 2305, 883, 2896, 919, 2845, - /* 3890 */ 2305, 2305, 2305, 2305, 2305, 2863, 2305, 2305, 2305, 2305, - /* 3900 */ 2305, 2305, 2305, 2305, 897, 2305, 2305, 2305, 2305, 2305, - /* 3910 */ 2305, 2810, 2305, 896, 2863, 2305, 2305, 2305, 2305, 2305, - /* 3920 */ 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, - /* 3930 */ 2810, 2305, 896, 2305, 2863, 2305, 2305, 2305, 2305, 2305, - /* 3940 */ 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, - /* 3950 */ 2810, 2305, 896, 2305, 2305, 2305, 2845, 2305, 2844, 2305, - /* 3960 */ 2305, 2895, 2305, 2305, 2305, 424, 2846, 900, 2848, 2849, - /* 3970 */ 895, 897, 2305, 883, 2896, 919, 2845, 2844, 2305, 2305, - /* 3980 */ 2895, 2305, 2305, 2305, 425, 2846, 900, 2848, 2849, 895, - /* 3990 */ 2305, 897, 883, 2896, 919, 2845, 2305, 2844, 2305, 2305, - /* 4000 */ 2895, 2863, 2305, 2305, 426, 2846, 900, 2848, 2849, 895, - /* 4010 */ 897, 2305, 883, 2896, 919, 2305, 2305, 2810, 2305, 896, - /* 4020 */ 2305, 2863, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, - /* 4030 */ 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2810, 2305, 896, - /* 4040 */ 2863, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, - /* 4050 */ 2305, 2305, 2305, 2305, 2305, 2305, 2810, 2305, 896, 2305, - /* 4060 */ 2305, 2305, 2305, 2845, 2844, 2305, 2305, 2895, 2305, 2305, - /* 4070 */ 2305, 442, 2846, 900, 2848, 2849, 895, 2305, 897, 883, - /* 4080 */ 2896, 919, 2845, 2305, 2844, 2305, 2305, 2895, 2305, 2305, - /* 4090 */ 2305, 443, 2846, 900, 2848, 2849, 895, 897, 2305, 883, - /* 4100 */ 2896, 919, 2305, 2844, 2305, 2305, 2895, 2305, 2863, 2305, - /* 4110 */ 2857, 2846, 900, 2848, 2849, 895, 2305, 2305, 883, 2896, - /* 4120 */ 919, 2305, 2305, 2305, 2810, 2305, 896, 2863, 2305, 2305, - /* 4130 */ 2305, 2845, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, - /* 4140 */ 2305, 2305, 2305, 2810, 2305, 896, 897, 2305, 2305, 2305, - /* 4150 */ 2305, 2845, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, - /* 4160 */ 2305, 2305, 2305, 2305, 2305, 2305, 897, 2305, 2305, 2305, - /* 4170 */ 2305, 2844, 2305, 2305, 2895, 2305, 2863, 2305, 2856, 2846, - /* 4180 */ 900, 2848, 2849, 895, 2305, 2305, 883, 2896, 919, 2305, - /* 4190 */ 2844, 2305, 2810, 2895, 896, 2305, 2863, 2855, 2846, 900, - /* 4200 */ 2848, 2849, 895, 2305, 2305, 883, 2896, 919, 2305, 2305, - /* 4210 */ 2305, 2305, 2810, 2305, 896, 2305, 2305, 2305, 2305, 2845, - /* 4220 */ 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, - /* 4230 */ 2305, 2305, 2305, 2305, 897, 2305, 2305, 2305, 2305, 2844, - /* 4240 */ 2305, 2305, 2895, 2845, 2305, 2305, 459, 2846, 900, 2848, - /* 4250 */ 2849, 895, 2305, 2305, 883, 2896, 919, 2305, 897, 2844, - /* 4260 */ 2305, 2305, 2895, 2305, 2863, 2305, 460, 2846, 900, 2848, - /* 4270 */ 2849, 895, 2305, 2305, 883, 2896, 919, 2305, 2305, 2305, - /* 4280 */ 2810, 2305, 896, 2305, 2305, 2305, 2305, 2305, 2863, 2305, - /* 4290 */ 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, - /* 4300 */ 2305, 2305, 2305, 2305, 2810, 2305, 896, 2305, 2305, 2305, - /* 4310 */ 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, - /* 4320 */ 2305, 2305, 2305, 2305, 2305, 2845, 2305, 2844, 2305, 2305, - /* 4330 */ 2895, 2305, 2305, 2305, 456, 2846, 900, 2848, 2849, 895, - /* 4340 */ 897, 2305, 883, 2896, 919, 2305, 2305, 2305, 2305, 2845, - /* 4350 */ 2305, 2844, 2305, 2305, 2895, 2305, 2305, 2305, 461, 2846, - /* 4360 */ 900, 2848, 2849, 895, 897, 2305, 883, 2896, 919, 2305, - /* 4370 */ 2863, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, - /* 4380 */ 2305, 2305, 2305, 2305, 2305, 2305, 2810, 2305, 896, 2305, - /* 4390 */ 2305, 2305, 2305, 2305, 2863, 2305, 2305, 2305, 2305, 2305, - /* 4400 */ 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, - /* 4410 */ 2810, 2305, 896, 2305, 2305, 2305, 2305, 2305, 2305, 2305, - /* 4420 */ 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, - /* 4430 */ 2305, 2305, 2305, 898, 2305, 2305, 2895, 2305, 2305, 2305, - /* 4440 */ 432, 2846, 900, 2848, 2849, 895, 2305, 2305, 883, 2896, - /* 4450 */ 919, 2305, 2305, 2305, 2305, 2305, 2305, 2844, 2305, 2305, - /* 4460 */ 2895, 2305, 2305, 2305, 431, 2846, 900, 2848, 2849, 895, - /* 4470 */ 2305, 2305, 883, 2896, 919, + /* 0 */ 846, 2812, 579, 586, 528, 137, 196, 578, 3067, 2590, + /* 10 */ 922, 2530, 60, 58, 531, 2532, 2533, 501, 97, 270, + /* 20 */ 511, 3072, 2027, 693, 779, 2370, 845, 231, 2588, 3067, + /* 30 */ 161, 3068, 847, 45, 358, 173, 2025, 2410, 2135, 738, + /* 40 */ 773, 3072, 777, 775, 306, 305, 2520, 2854, 3071, 3067, + /* 50 */ 2052, 710, 3068, 3070, 649, 647, 2687, 444, 9, 809, + /* 60 */ 245, 2590, 861, 2759, 517, 492, 2734, 3067, 3071, 467, + /* 70 */ 503, 2130, 3068, 3069, 891, 2314, 2684, 908, 926, 61, + /* 80 */ 2588, 3071, 858, 170, 690, 3073, 231, 691, 2362, 2033, + /* 90 */ 3068, 847, 2872, 1577, 921, 2687, 964, 922, 2530, 160, + /* 100 */ 159, 158, 157, 156, 155, 154, 153, 152, 2819, 513, + /* 110 */ 903, 2674, 2053, 711, 983, 2684, 908, 161, 1029, 1575, + /* 120 */ 1576, 998, 997, 996, 995, 541, 743, 994, 993, 175, + /* 130 */ 988, 987, 986, 985, 984, 982, 174, 976, 975, 974, + /* 140 */ 540, 539, 971, 970, 969, 211, 210, 968, 536, 967, + /* 150 */ 966, 965, 205, 63, 335, 2853, 2138, 2139, 2904, 514, + /* 160 */ 846, 2519, 134, 2855, 907, 2857, 2858, 902, 3067, 195, + /* 170 */ 890, 2905, 926, 2202, 858, 170, 683, 213, 698, 2967, + /* 180 */ 2535, 691, 2362, 505, 2963, 681, 845, 231, 677, 673, + /* 190 */ 3, 3068, 847, 53, 52, 2088, 2098, 59, 57, 56, + /* 200 */ 55, 54, 2052, 232, 66, 2137, 2140, 860, 200, 2975, + /* 210 */ 2976, 3014, 168, 2980, 2052, 1758, 858, 170, 349, 350, + /* 220 */ 2028, 887, 2026, 348, 517, 1873, 1874, 889, 1749, 953, + /* 230 */ 952, 951, 1753, 950, 1755, 1756, 949, 946, 926, 1764, + /* 240 */ 943, 1766, 1767, 940, 937, 934, 53, 52, 1797, 1798, + /* 250 */ 59, 57, 56, 55, 54, 2031, 2032, 2085, 2056, 2087, + /* 260 */ 2090, 2091, 2092, 2093, 2094, 2095, 2096, 2097, 2099, 2100, + /* 270 */ 2101, 899, 892, 75, 924, 923, 888, 2122, 2123, 2124, + /* 280 */ 2125, 2126, 2129, 2131, 2132, 2133, 2134, 2136, 2, 60, + /* 290 */ 58, 2227, 2854, 1601, 448, 1600, 2050, 511, 836, 2027, + /* 300 */ 140, 2975, 2976, 630, 168, 2980, 472, 904, 533, 166, + /* 310 */ 222, 2583, 2585, 2025, 651, 2135, 2987, 2199, 2200, 2201, + /* 320 */ 2987, 2987, 2987, 2987, 2987, 961, 187, 186, 958, 957, + /* 330 */ 956, 184, 471, 609, 1602, 653, 713, 2872, 79, 695, + /* 340 */ 449, 611, 201, 2975, 2976, 692, 168, 2980, 2130, 858, + /* 350 */ 170, 891, 589, 2819, 1758, 903, 15, 53, 52, 19, + /* 360 */ 126, 59, 57, 56, 55, 54, 2033, 1749, 953, 952, + /* 370 */ 951, 1753, 950, 1755, 1756, 898, 897, 2089, 1764, 896, + /* 380 */ 1766, 1767, 895, 937, 934, 53, 52, 342, 2521, 59, + /* 390 */ 57, 56, 55, 54, 2157, 1029, 470, 2304, 469, 2612, + /* 400 */ 2853, 482, 480, 2904, 220, 2687, 597, 134, 2855, 907, + /* 410 */ 2857, 2858, 902, 75, 849, 890, 2905, 926, 2512, 478, + /* 420 */ 172, 2829, 181, 2938, 2967, 2685, 908, 49, 505, 2963, + /* 430 */ 75, 2660, 2053, 2138, 2139, 227, 2502, 2667, 2646, 2086, + /* 440 */ 639, 638, 636, 635, 634, 629, 628, 627, 626, 453, + /* 450 */ 2202, 2833, 616, 615, 614, 613, 612, 606, 605, 604, + /* 460 */ 921, 599, 598, 468, 922, 2530, 190, 590, 1861, 1862, + /* 470 */ 2590, 412, 2088, 2098, 1880, 207, 2975, 857, 516, 162, + /* 480 */ 856, 685, 2137, 2140, 535, 479, 477, 3067, 740, 2588, + /* 490 */ 410, 89, 515, 310, 88, 2057, 2337, 2028, 220, 2026, + /* 500 */ 835, 2835, 2838, 475, 889, 845, 231, 342, 450, 742, + /* 510 */ 3068, 847, 272, 741, 2055, 926, 693, 963, 2370, 63, + /* 520 */ 268, 668, 666, 663, 474, 2660, 2303, 75, 75, 2312, + /* 530 */ 2872, 687, 2031, 2032, 2085, 2085, 2087, 2090, 2091, 2092, + /* 540 */ 2093, 2094, 2095, 2096, 2097, 2099, 2100, 2101, 899, 892, + /* 550 */ 64, 924, 923, 888, 2122, 2123, 2315, 2819, 625, 2129, + /* 560 */ 2131, 2132, 2133, 2134, 2136, 2, 60, 58, 1900, 1901, + /* 570 */ 577, 399, 576, 624, 511, 2829, 2027, 151, 1954, 1955, + /* 580 */ 150, 149, 148, 147, 146, 145, 144, 143, 142, 558, + /* 590 */ 2025, 921, 2135, 2987, 2199, 2200, 2201, 2987, 2987, 2987, + /* 600 */ 2987, 2987, 834, 575, 151, 2833, 76, 150, 149, 148, + /* 610 */ 147, 146, 145, 144, 143, 142, 238, 1899, 1902, 544, + /* 620 */ 981, 2231, 2854, 2487, 543, 2130, 2840, 2052, 891, 1570, + /* 630 */ 2772, 491, 2734, 15, 53, 52, 19, 904, 59, 57, + /* 640 */ 56, 55, 54, 2033, 2534, 53, 52, 342, 1577, 59, + /* 650 */ 57, 56, 55, 54, 2842, 2835, 2837, 506, 2590, 34, + /* 660 */ 101, 100, 582, 2052, 342, 244, 532, 2872, 2056, 926, + /* 670 */ 816, 2854, 1029, 1572, 1575, 1576, 809, 2588, 574, 572, + /* 680 */ 2262, 595, 2656, 2819, 3067, 903, 861, 809, 601, 2656, + /* 690 */ 447, 340, 127, 561, 921, 3067, 557, 553, 549, 546, + /* 700 */ 575, 2027, 3073, 231, 197, 789, 2274, 3068, 847, 792, + /* 710 */ 2138, 2139, 2461, 3073, 231, 2025, 2872, 2249, 3068, 847, + /* 720 */ 53, 52, 632, 2656, 59, 57, 56, 55, 54, 198, + /* 730 */ 2853, 2326, 2819, 2904, 903, 747, 247, 416, 2855, 907, + /* 740 */ 2857, 2858, 902, 249, 32, 890, 2905, 926, 2202, 2088, + /* 750 */ 2098, 828, 827, 2260, 2261, 2263, 2264, 2265, 1687, 2137, + /* 760 */ 2140, 342, 342, 563, 894, 53, 52, 2629, 2033, 59, + /* 770 */ 57, 56, 55, 54, 2028, 893, 2026, 254, 220, 2853, + /* 780 */ 963, 889, 2904, 3072, 342, 643, 134, 2855, 907, 2857, + /* 790 */ 2858, 902, 2112, 1579, 890, 2905, 926, 1029, 2982, 2051, + /* 800 */ 2055, 213, 2089, 2967, 40, 2661, 2146, 505, 2963, 2031, + /* 810 */ 2032, 2085, 2052, 2087, 2090, 2091, 2092, 2093, 2094, 2095, + /* 820 */ 2096, 2097, 2099, 2100, 2101, 899, 892, 2979, 924, 923, + /* 830 */ 888, 2122, 2123, 922, 2530, 3015, 2129, 2131, 2132, 2133, + /* 840 */ 2134, 2136, 2, 12, 60, 58, 2854, 2204, 2205, 2206, + /* 850 */ 2207, 2208, 511, 236, 2027, 59, 57, 56, 55, 54, + /* 860 */ 2297, 904, 2036, 2372, 2086, 309, 41, 2740, 2025, 308, + /* 870 */ 2135, 256, 53, 52, 1694, 43, 59, 57, 56, 55, + /* 880 */ 54, 53, 52, 2854, 2336, 59, 57, 56, 55, 54, + /* 890 */ 2504, 2872, 2199, 2200, 2201, 2813, 642, 255, 904, 2028, + /* 900 */ 3022, 2026, 567, 2130, 224, 2057, 891, 2819, 978, 903, + /* 910 */ 640, 15, 2501, 793, 19, 707, 14, 13, 53, 52, + /* 920 */ 2577, 2033, 59, 57, 56, 55, 54, 1696, 2872, 311, + /* 930 */ 569, 565, 53, 52, 2031, 2032, 59, 57, 56, 55, + /* 940 */ 54, 706, 623, 116, 2819, 2819, 903, 622, 456, 171, + /* 950 */ 1029, 490, 2938, 781, 2853, 621, 748, 2904, 517, 2254, + /* 960 */ 2854, 134, 2855, 907, 2857, 2858, 902, 2773, 808, 890, + /* 970 */ 2905, 926, 926, 2255, 523, 904, 3087, 340, 2967, 1685, + /* 980 */ 708, 2680, 505, 2963, 980, 46, 2335, 2089, 2138, 2139, + /* 990 */ 2273, 2853, 526, 2982, 2904, 2179, 700, 2726, 134, 2855, + /* 1000 */ 907, 2857, 2858, 902, 2243, 2872, 890, 2905, 926, 922, + /* 1010 */ 2530, 922, 2530, 3087, 2590, 2967, 922, 2530, 2172, 505, + /* 1020 */ 2963, 2819, 2978, 903, 809, 196, 2253, 2088, 2098, 68, + /* 1030 */ 709, 583, 3067, 865, 531, 2532, 584, 2137, 2140, 961, + /* 1040 */ 187, 186, 958, 957, 956, 184, 2056, 2819, 2039, 2086, + /* 1050 */ 3073, 231, 2028, 831, 2026, 3068, 847, 1604, 1605, 889, + /* 1060 */ 793, 961, 187, 186, 958, 957, 956, 184, 2853, 2334, + /* 1070 */ 1601, 2904, 1600, 2056, 2333, 199, 2855, 907, 2857, 2858, + /* 1080 */ 902, 538, 537, 890, 2905, 926, 2052, 2031, 2032, 2085, + /* 1090 */ 2332, 2087, 2090, 2091, 2092, 2093, 2094, 2095, 2096, 2097, + /* 1100 */ 2099, 2100, 2101, 899, 892, 2034, 924, 923, 888, 2122, + /* 1110 */ 2123, 1602, 2224, 73, 2129, 2131, 2132, 2133, 2134, 2136, + /* 1120 */ 2, 60, 58, 2141, 806, 810, 3025, 2584, 2585, 511, + /* 1130 */ 2819, 2027, 53, 52, 2167, 2819, 59, 57, 56, 55, + /* 1140 */ 54, 922, 2530, 795, 2726, 2025, 2331, 2135, 2763, 53, + /* 1150 */ 52, 2819, 2854, 59, 57, 56, 55, 54, 53, 52, + /* 1160 */ 1996, 603, 59, 57, 56, 55, 54, 904, 12, 3035, + /* 1170 */ 10, 48, 837, 832, 825, 821, 817, 113, 1995, 882, + /* 1180 */ 2130, 2939, 251, 891, 56, 55, 54, 2330, 61, 2590, + /* 1190 */ 786, 522, 521, 2033, 922, 2530, 476, 2872, 2033, 922, + /* 1200 */ 2530, 2854, 922, 2530, 2107, 551, 2523, 2819, 873, 525, + /* 1210 */ 524, 755, 754, 2819, 617, 903, 904, 732, 731, 618, + /* 1220 */ 790, 2108, 619, 226, 195, 922, 2530, 1029, 452, 451, + /* 1230 */ 2110, 107, 42, 2329, 106, 2536, 53, 52, 518, 1706, + /* 1240 */ 59, 57, 56, 55, 54, 712, 2872, 809, 2819, 884, + /* 1250 */ 234, 2939, 527, 1705, 2135, 3067, 734, 733, 117, 12, + /* 1260 */ 2853, 2982, 2819, 2904, 903, 2138, 2139, 134, 2855, 907, + /* 1270 */ 2857, 2858, 902, 3073, 231, 890, 2905, 926, 3068, 847, + /* 1280 */ 922, 2530, 3087, 2057, 2967, 534, 132, 2130, 505, 2963, + /* 1290 */ 2977, 2037, 1928, 2328, 2819, 195, 2854, 992, 990, 2325, + /* 1300 */ 2525, 105, 922, 2530, 2088, 2098, 2535, 850, 2113, 2853, + /* 1310 */ 2057, 904, 2904, 823, 2137, 2140, 135, 2855, 907, 2857, + /* 1320 */ 2858, 902, 312, 2086, 890, 2905, 926, 2324, 129, 2028, + /* 1330 */ 406, 2026, 113, 2967, 2567, 657, 889, 2966, 2963, 2323, + /* 1340 */ 2322, 2872, 922, 2530, 2321, 53, 52, 922, 2530, 59, + /* 1350 */ 57, 56, 55, 54, 2819, 955, 91, 2819, 2581, 903, + /* 1360 */ 2819, 2524, 320, 2590, 2031, 2032, 2085, 864, 2087, 2090, + /* 1370 */ 2091, 2092, 2093, 2094, 2095, 2096, 2097, 2099, 2100, 2101, + /* 1380 */ 899, 892, 2589, 924, 923, 888, 2122, 2123, 2819, 922, + /* 1390 */ 2530, 2129, 2131, 2132, 2133, 2134, 2136, 2, 60, 58, + /* 1400 */ 2819, 2819, 2342, 1022, 2853, 2819, 511, 2904, 2027, 353, + /* 1410 */ 104, 134, 2855, 907, 2857, 2858, 902, 2109, 399, 890, + /* 1420 */ 2905, 926, 2025, 2223, 2135, 742, 3087, 2320, 2967, 741, + /* 1430 */ 840, 2601, 505, 2963, 922, 2530, 2018, 954, 1994, 922, + /* 1440 */ 2530, 853, 1710, 922, 2530, 53, 52, 2854, 2319, 59, + /* 1450 */ 57, 56, 55, 54, 878, 2318, 1709, 2130, 959, 360, + /* 1460 */ 891, 2581, 904, 915, 3060, 61, 2120, 922, 2530, 520, + /* 1470 */ 519, 2019, 2317, 960, 185, 2033, 2581, 263, 2854, 2735, + /* 1480 */ 2505, 991, 163, 656, 47, 922, 2530, 916, 2819, 2397, + /* 1490 */ 924, 923, 2872, 904, 922, 2530, 103, 392, 2129, 2131, + /* 1500 */ 2132, 2133, 2134, 2136, 1029, 920, 2213, 2639, 2819, 2819, + /* 1510 */ 903, 760, 2854, 176, 388, 1689, 2819, 759, 758, 757, + /* 1520 */ 2592, 67, 2378, 2872, 749, 167, 753, 901, 259, 297, + /* 1530 */ 752, 929, 295, 2819, 751, 756, 485, 484, 659, 2819, + /* 1540 */ 750, 903, 2138, 2139, 483, 746, 745, 744, 782, 299, + /* 1550 */ 301, 593, 298, 300, 2395, 2853, 303, 2872, 2904, 302, + /* 1560 */ 2306, 2307, 134, 2855, 907, 2857, 2858, 902, 1690, 177, + /* 1570 */ 890, 2905, 926, 2819, 177, 903, 762, 3087, 2386, 2967, + /* 1580 */ 1016, 2088, 2098, 505, 2963, 2384, 2853, 225, 321, 2904, + /* 1590 */ 637, 2137, 2140, 135, 2855, 907, 2857, 2858, 902, 2517, + /* 1600 */ 764, 890, 2905, 926, 14, 13, 2028, 767, 2026, 2515, + /* 1610 */ 2967, 398, 851, 889, 317, 2964, 1944, 367, 366, 819, + /* 1620 */ 2853, 1952, 405, 2904, 2534, 369, 368, 439, 2855, 907, + /* 1630 */ 2857, 2858, 902, 900, 62, 890, 2905, 926, 881, 2932, + /* 1640 */ 118, 2031, 2032, 2085, 766, 2087, 2090, 2091, 2092, 2093, + /* 1650 */ 2094, 2095, 2096, 2097, 2099, 2100, 2101, 899, 892, 780, + /* 1660 */ 924, 923, 888, 2122, 2123, 1666, 2247, 2462, 2129, 2131, + /* 1670 */ 2132, 2133, 2134, 2136, 2, 60, 58, 2854, 307, 652, + /* 1680 */ 2035, 2259, 62, 511, 2327, 2027, 214, 3028, 185, 347, + /* 1690 */ 371, 370, 904, 1639, 2999, 373, 372, 769, 90, 2025, + /* 1700 */ 205, 2135, 62, 77, 763, 761, 62, 62, 53, 52, + /* 1710 */ 39, 304, 59, 57, 56, 55, 54, 62, 1667, 53, + /* 1720 */ 52, 972, 2872, 59, 57, 56, 55, 54, 62, 2258, + /* 1730 */ 87, 783, 90, 326, 2130, 863, 351, 891, 2819, 182, + /* 1740 */ 903, 2413, 61, 930, 1658, 870, 1640, 794, 854, 2111, + /* 1750 */ 2173, 163, 2033, 2121, 2114, 829, 185, 973, 375, 374, + /* 1760 */ 85, 377, 376, 84, 2102, 379, 378, 381, 380, 383, + /* 1770 */ 382, 385, 384, 387, 386, 1897, 932, 404, 2171, 1887, + /* 1780 */ 1656, 1029, 461, 336, 328, 2853, 363, 859, 2904, 165, + /* 1790 */ 2873, 2106, 134, 2855, 907, 2857, 2858, 902, 919, 183, + /* 1800 */ 890, 2905, 926, 1740, 809, 2453, 2452, 3087, 2363, 2967, + /* 1810 */ 185, 3018, 3067, 505, 2963, 164, 182, 826, 497, 2138, + /* 1820 */ 2139, 833, 493, 1771, 867, 759, 758, 757, 2665, 2165, + /* 1830 */ 3073, 231, 749, 167, 753, 3068, 847, 542, 752, 560, + /* 1840 */ 2578, 2369, 751, 756, 485, 484, 1779, 802, 750, 3019, + /* 1850 */ 2854, 841, 483, 746, 745, 744, 3029, 1786, 2088, 2098, + /* 1860 */ 842, 338, 1784, 188, 333, 904, 2038, 341, 2137, 2140, + /* 1870 */ 2488, 5, 2666, 545, 53, 52, 550, 465, 59, 57, + /* 1880 */ 56, 55, 54, 2028, 2050, 2026, 571, 559, 2060, 570, + /* 1890 */ 889, 240, 239, 573, 2166, 2872, 397, 242, 1921, 2051, + /* 1900 */ 587, 253, 594, 600, 596, 602, 645, 620, 2658, 607, + /* 1910 */ 631, 2819, 641, 903, 633, 644, 646, 660, 2031, 2032, + /* 1920 */ 2085, 658, 2087, 2090, 2091, 2092, 2093, 2094, 2095, 2096, + /* 1930 */ 2097, 2099, 2100, 2101, 899, 892, 258, 924, 923, 888, + /* 1940 */ 2122, 2123, 654, 1694, 473, 2129, 2131, 2132, 2133, 2134, + /* 1950 */ 2136, 2, 60, 58, 661, 261, 262, 2854, 2853, 662, + /* 1960 */ 511, 2904, 2027, 664, 665, 134, 2855, 907, 2857, 2858, + /* 1970 */ 902, 862, 904, 890, 2905, 926, 2025, 265, 2135, 667, + /* 1980 */ 2942, 669, 2967, 2058, 4, 689, 505, 2963, 688, 696, + /* 1990 */ 697, 699, 44, 507, 2160, 2161, 2162, 2163, 2164, 2168, + /* 2000 */ 2169, 2170, 2872, 273, 2053, 2059, 109, 701, 276, 2061, + /* 2010 */ 702, 2130, 703, 279, 891, 705, 2062, 2681, 2819, 61, + /* 2020 */ 903, 281, 2063, 110, 2675, 111, 112, 1738, 809, 2033, + /* 2030 */ 287, 714, 114, 290, 737, 442, 3067, 739, 139, 785, + /* 2040 */ 770, 2518, 771, 787, 115, 2749, 294, 2746, 2745, 2514, + /* 2050 */ 178, 296, 191, 136, 3073, 231, 2516, 2511, 1029, 3068, + /* 2060 */ 847, 192, 2054, 138, 193, 2853, 797, 400, 2904, 2727, + /* 2070 */ 796, 313, 134, 2855, 907, 2857, 2858, 902, 801, 318, + /* 2080 */ 890, 2905, 926, 804, 798, 830, 813, 2940, 868, 2967, + /* 2090 */ 3034, 3033, 839, 505, 2963, 323, 2138, 2139, 8, 325, + /* 2100 */ 327, 803, 814, 812, 316, 811, 3006, 538, 537, 844, + /* 2110 */ 330, 204, 329, 331, 332, 498, 2986, 2041, 843, 855, + /* 2120 */ 169, 334, 852, 2055, 2221, 2219, 233, 2854, 3090, 3066, + /* 2130 */ 1, 2034, 337, 2135, 2983, 2088, 2098, 217, 343, 179, + /* 2140 */ 401, 866, 904, 2695, 2694, 2137, 2140, 2693, 402, 502, + /* 2150 */ 871, 872, 180, 879, 876, 356, 74, 2948, 911, 909, + /* 2160 */ 2028, 361, 2026, 403, 125, 913, 2130, 889, 914, 2531, + /* 2170 */ 2811, 128, 2872, 2810, 2806, 2805, 407, 2797, 1549, 928, + /* 2180 */ 2796, 2788, 1025, 2787, 2033, 2803, 2802, 2794, 2819, 2793, + /* 2190 */ 903, 2782, 1026, 2781, 1024, 2031, 2032, 2085, 2800, 2087, + /* 2200 */ 2090, 2091, 2092, 2093, 2094, 2095, 2096, 2097, 2099, 2100, + /* 2210 */ 2101, 899, 892, 886, 924, 923, 888, 2122, 2123, 390, + /* 2220 */ 189, 2799, 2129, 2131, 2132, 2133, 2134, 2136, 2, 60, + /* 2230 */ 58, 2791, 2790, 393, 2779, 2853, 1021, 511, 2904, 2027, + /* 2240 */ 2778, 394, 134, 2855, 907, 2857, 2858, 902, 2776, 2775, + /* 2250 */ 890, 2905, 926, 2025, 2582, 2135, 1028, 883, 65, 2967, + /* 2260 */ 481, 430, 789, 505, 2963, 457, 443, 458, 441, 529, + /* 2270 */ 409, 431, 411, 2771, 2770, 2769, 98, 2764, 2854, 548, + /* 2280 */ 547, 292, 1978, 1979, 237, 552, 2762, 554, 2130, 555, + /* 2290 */ 556, 891, 2761, 904, 1977, 2760, 15, 736, 466, 2758, + /* 2300 */ 206, 562, 2757, 564, 2756, 566, 2033, 2755, 568, 730, + /* 2310 */ 726, 722, 718, 1965, 291, 2042, 2731, 2037, 241, 2730, + /* 2320 */ 99, 243, 1924, 2872, 1923, 2708, 2707, 2706, 580, 581, + /* 2330 */ 2705, 2704, 2648, 585, 2645, 1029, 1860, 588, 2644, 2819, + /* 2340 */ 2638, 903, 591, 2635, 592, 246, 2634, 102, 2633, 2632, + /* 2350 */ 2045, 2047, 2637, 2636, 248, 2631, 2630, 2628, 2627, 2626, + /* 2360 */ 250, 2625, 610, 289, 608, 2623, 288, 2622, 2621, 924, + /* 2370 */ 923, 2620, 2619, 2138, 2139, 2643, 2618, 2129, 2131, 2132, + /* 2380 */ 2133, 2134, 2136, 2617, 2616, 2641, 2853, 2624, 2615, 2904, + /* 2390 */ 2614, 2613, 2611, 135, 2855, 907, 2857, 2858, 902, 2610, + /* 2400 */ 2609, 890, 2905, 926, 2854, 2608, 2607, 2606, 2605, 108, + /* 2410 */ 2967, 252, 2088, 2098, 885, 2963, 1866, 2596, 2595, 904, + /* 2420 */ 2604, 2603, 2137, 2140, 2602, 2600, 2599, 2673, 2642, 2640, + /* 2430 */ 2598, 2597, 257, 275, 2594, 2593, 650, 2028, 454, 2026, + /* 2440 */ 648, 2591, 286, 2418, 889, 260, 277, 284, 655, 2872, + /* 2450 */ 455, 2417, 282, 704, 1707, 1711, 2416, 2415, 1703, 2414, + /* 2460 */ 264, 2412, 2409, 672, 266, 2819, 267, 903, 671, 2408, + /* 2470 */ 675, 274, 2031, 2032, 2085, 670, 2087, 2090, 2091, 2092, + /* 2480 */ 2093, 2094, 2095, 2096, 2097, 2099, 2100, 2101, 899, 892, + /* 2490 */ 674, 924, 923, 888, 2122, 2123, 791, 676, 2401, 2129, + /* 2500 */ 2131, 2132, 2133, 2134, 2136, 2, 678, 679, 680, 2388, + /* 2510 */ 682, 2376, 905, 2375, 1032, 2904, 684, 2358, 686, 135, + /* 2520 */ 2855, 907, 2857, 2858, 902, 269, 212, 890, 2905, 926, + /* 2530 */ 94, 2839, 1578, 396, 223, 2854, 2967, 2357, 694, 271, + /* 2540 */ 460, 2963, 2729, 95, 2725, 2715, 2703, 280, 1020, 1018, + /* 2550 */ 904, 278, 221, 2702, 2679, 283, 285, 2672, 2506, 2854, + /* 2560 */ 1632, 1014, 1010, 1006, 1002, 2411, 391, 2407, 715, 716, + /* 2570 */ 717, 2405, 719, 720, 904, 721, 2403, 723, 724, 725, + /* 2580 */ 2872, 2400, 728, 727, 729, 2383, 2381, 2382, 2380, 2377, + /* 2590 */ 2354, 735, 2508, 293, 86, 1791, 2819, 1790, 903, 2507, + /* 2600 */ 1693, 989, 1692, 2398, 2872, 1691, 1688, 2396, 1686, 1684, + /* 2610 */ 1683, 2387, 991, 1682, 2385, 133, 1681, 1675, 364, 1680, + /* 2620 */ 2819, 765, 903, 486, 487, 2353, 488, 1677, 489, 1676, + /* 2630 */ 1674, 2352, 768, 2351, 772, 2350, 774, 2349, 2348, 778, + /* 2640 */ 141, 776, 33, 2853, 508, 1959, 2904, 2728, 2854, 874, + /* 2650 */ 202, 2855, 907, 2857, 2858, 902, 1949, 1961, 890, 2905, + /* 2660 */ 926, 80, 1958, 904, 1963, 69, 315, 2853, 788, 1934, + /* 2670 */ 2904, 2724, 70, 1932, 440, 2855, 907, 2857, 2858, 902, + /* 2680 */ 2714, 1930, 890, 2905, 926, 799, 194, 800, 319, 2701, + /* 2690 */ 2700, 805, 22, 2872, 362, 807, 880, 1909, 1908, 345, + /* 2700 */ 3072, 35, 818, 2276, 344, 494, 322, 815, 2250, 2819, + /* 2710 */ 2248, 903, 848, 3088, 17, 36, 2854, 6, 820, 7, + /* 2720 */ 324, 23, 2257, 314, 24, 203, 216, 822, 215, 824, + /* 2730 */ 2242, 904, 37, 228, 96, 2840, 38, 2214, 2212, 229, + /* 2740 */ 230, 2216, 2296, 2854, 78, 26, 2291, 2290, 2297, 499, + /* 2750 */ 2295, 2294, 500, 2196, 2195, 25, 2853, 71, 904, 2904, + /* 2760 */ 339, 2872, 18, 199, 2855, 907, 2857, 2858, 902, 72, + /* 2770 */ 208, 890, 2905, 926, 2699, 2678, 346, 2819, 119, 903, + /* 2780 */ 2252, 120, 2677, 218, 121, 2671, 352, 82, 2872, 122, + /* 2790 */ 27, 2148, 11, 13, 2147, 2043, 355, 869, 875, 21, + /* 2800 */ 28, 495, 29, 2158, 2819, 20, 903, 50, 2854, 2105, + /* 2810 */ 877, 2104, 939, 942, 3026, 357, 209, 354, 945, 219, + /* 2820 */ 2078, 948, 51, 904, 2853, 2670, 2103, 2904, 496, 16, + /* 2830 */ 2854, 440, 2855, 907, 2857, 2858, 902, 30, 31, 890, + /* 2840 */ 2905, 926, 2070, 83, 123, 904, 910, 2503, 359, 124, + /* 2850 */ 917, 2853, 912, 2872, 2904, 92, 129, 365, 440, 2855, + /* 2860 */ 907, 2857, 2858, 902, 2117, 2917, 890, 2905, 926, 2819, + /* 2870 */ 918, 903, 2916, 2854, 925, 2872, 906, 927, 81, 2310, + /* 2880 */ 931, 1772, 530, 933, 935, 1769, 936, 2309, 901, 938, + /* 2890 */ 1768, 2819, 1765, 903, 941, 2854, 1759, 944, 1757, 947, + /* 2900 */ 130, 1763, 1762, 389, 1761, 131, 93, 1785, 1760, 1781, + /* 2910 */ 904, 1671, 1670, 1630, 962, 1669, 2853, 1668, 2872, 2904, + /* 2920 */ 1665, 1662, 2854, 433, 2855, 907, 2857, 2858, 902, 1661, + /* 2930 */ 1701, 890, 2905, 926, 2819, 1660, 903, 904, 2853, 1659, + /* 2940 */ 2872, 2904, 1657, 1655, 1654, 202, 2855, 907, 2857, 2858, + /* 2950 */ 902, 1653, 977, 890, 2905, 926, 2819, 1700, 903, 235, + /* 2960 */ 979, 1651, 1648, 1650, 1649, 1647, 1646, 2872, 1645, 1697, + /* 2970 */ 1695, 1642, 1641, 1638, 1637, 1636, 2406, 838, 1635, 999, + /* 2980 */ 509, 2853, 2404, 2819, 2904, 903, 2402, 1003, 439, 2855, + /* 2990 */ 907, 2857, 2858, 902, 1001, 2399, 890, 2905, 926, 1005, + /* 3000 */ 2933, 1000, 1004, 2853, 1007, 1008, 2904, 504, 3089, 1009, + /* 3010 */ 440, 2855, 907, 2857, 2858, 902, 1011, 1012, 890, 2905, + /* 3020 */ 926, 1013, 2379, 1015, 2374, 1017, 2373, 1019, 1567, 2347, + /* 3030 */ 2853, 1550, 1023, 2904, 1555, 395, 2854, 425, 2855, 907, + /* 3040 */ 2857, 2858, 902, 1557, 1027, 890, 2905, 926, 2313, 2029, + /* 3050 */ 408, 904, 1030, 1031, 2313, 2313, 2854, 2313, 2313, 2313, + /* 3060 */ 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2313, + /* 3070 */ 2313, 904, 2313, 2313, 2313, 2854, 2313, 2313, 2313, 2313, + /* 3080 */ 2313, 2872, 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2313, + /* 3090 */ 904, 2313, 2313, 2313, 2313, 2313, 2313, 2819, 2313, 903, + /* 3100 */ 2313, 2872, 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2313, + /* 3110 */ 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2819, 2313, 903, + /* 3120 */ 2872, 510, 2313, 2313, 2854, 2313, 2313, 2313, 2313, 2313, + /* 3130 */ 2313, 2313, 2313, 2313, 2313, 2313, 2819, 2313, 903, 904, + /* 3140 */ 2313, 512, 2313, 2313, 2853, 2313, 2313, 2904, 2313, 2313, + /* 3150 */ 2313, 440, 2855, 907, 2857, 2858, 902, 2313, 2313, 890, + /* 3160 */ 2905, 926, 2313, 2313, 2853, 2313, 2313, 2904, 2313, 2872, + /* 3170 */ 2313, 440, 2855, 907, 2857, 2858, 902, 2313, 2313, 890, + /* 3180 */ 2905, 926, 2313, 2853, 2313, 2819, 2904, 903, 2313, 2313, + /* 3190 */ 421, 2855, 907, 2857, 2858, 902, 2313, 2313, 890, 2905, + /* 3200 */ 926, 2854, 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2313, + /* 3210 */ 2313, 2313, 2313, 2313, 2313, 2313, 904, 2313, 2313, 2313, + /* 3220 */ 2313, 2854, 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2313, + /* 3230 */ 2313, 2313, 784, 2313, 2313, 2904, 904, 2313, 2313, 435, + /* 3240 */ 2855, 907, 2857, 2858, 902, 2313, 2872, 890, 2905, 926, + /* 3250 */ 2313, 2313, 2854, 2313, 2313, 2313, 2313, 2313, 2313, 2313, + /* 3260 */ 2313, 2313, 2819, 2313, 903, 2313, 2872, 904, 2313, 2313, + /* 3270 */ 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2313, + /* 3280 */ 2313, 2313, 2819, 2313, 903, 2313, 2854, 2313, 2313, 2313, + /* 3290 */ 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2872, 2313, 2313, + /* 3300 */ 2313, 904, 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2853, + /* 3310 */ 2313, 2313, 2904, 2819, 2313, 903, 417, 2855, 907, 2857, + /* 3320 */ 2858, 902, 2313, 2313, 890, 2905, 926, 2313, 2313, 2853, + /* 3330 */ 2313, 2872, 2904, 2313, 2313, 2313, 413, 2855, 907, 2857, + /* 3340 */ 2858, 902, 2313, 2313, 890, 2905, 926, 2819, 2313, 903, + /* 3350 */ 2313, 2854, 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2313, + /* 3360 */ 2853, 2313, 2313, 2904, 2313, 2313, 904, 414, 2855, 907, + /* 3370 */ 2857, 2858, 902, 2854, 2313, 890, 2905, 926, 2313, 2313, + /* 3380 */ 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2313, 904, 2313, + /* 3390 */ 2313, 2313, 2313, 2854, 2853, 2313, 2872, 2904, 2313, 2313, + /* 3400 */ 2313, 418, 2855, 907, 2857, 2858, 902, 2313, 904, 890, + /* 3410 */ 2905, 926, 2819, 2313, 903, 2313, 2313, 2313, 2872, 2313, + /* 3420 */ 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2313, + /* 3430 */ 2313, 2313, 2313, 2313, 2819, 2313, 903, 2313, 2872, 2313, + /* 3440 */ 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2313, + /* 3450 */ 2313, 2313, 2313, 2313, 2819, 2313, 903, 2313, 2313, 2853, + /* 3460 */ 2313, 2313, 2904, 2313, 2313, 2313, 432, 2855, 907, 2857, + /* 3470 */ 2858, 902, 2313, 2313, 890, 2905, 926, 2313, 2313, 2313, + /* 3480 */ 2313, 2853, 2313, 2313, 2904, 2313, 2313, 2313, 419, 2855, + /* 3490 */ 907, 2857, 2858, 902, 2313, 2313, 890, 2905, 926, 2313, + /* 3500 */ 2313, 2853, 2313, 2313, 2904, 2313, 2313, 2313, 420, 2855, + /* 3510 */ 907, 2857, 2858, 902, 2854, 2313, 890, 2905, 926, 2313, + /* 3520 */ 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2313, 904, + /* 3530 */ 2313, 2313, 2313, 2313, 2854, 2313, 2313, 2313, 2313, 2313, + /* 3540 */ 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2313, 904, + /* 3550 */ 2313, 2313, 2313, 2854, 2313, 2313, 2313, 2313, 2313, 2872, + /* 3560 */ 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2313, 904, 2313, + /* 3570 */ 2313, 2313, 2313, 2313, 2313, 2819, 2313, 903, 2313, 2872, + /* 3580 */ 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2313, + /* 3590 */ 2313, 2313, 2313, 2313, 2313, 2819, 2313, 903, 2872, 2313, + /* 3600 */ 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2313, + /* 3610 */ 2313, 2313, 2313, 2313, 2819, 2313, 903, 2313, 2313, 2313, + /* 3620 */ 2313, 2313, 2853, 2313, 2313, 2904, 2313, 2313, 2313, 436, + /* 3630 */ 2855, 907, 2857, 2858, 902, 2313, 2313, 890, 2905, 926, + /* 3640 */ 2854, 2313, 2853, 2313, 2313, 2904, 2313, 2313, 2313, 422, + /* 3650 */ 2855, 907, 2857, 2858, 902, 904, 2313, 890, 2905, 926, + /* 3660 */ 2854, 2853, 2313, 2313, 2904, 2313, 2313, 2313, 437, 2855, + /* 3670 */ 907, 2857, 2858, 902, 2313, 904, 890, 2905, 926, 2854, + /* 3680 */ 2313, 2313, 2313, 2313, 2313, 2872, 2313, 2313, 2313, 2313, + /* 3690 */ 2313, 2313, 2313, 2313, 904, 2313, 2313, 2313, 2313, 2313, + /* 3700 */ 2313, 2819, 2313, 903, 2313, 2872, 2313, 2313, 2313, 2313, + /* 3710 */ 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2313, + /* 3720 */ 2313, 2819, 2313, 903, 2872, 2313, 2313, 2313, 2313, 2313, + /* 3730 */ 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2313, + /* 3740 */ 2819, 2313, 903, 2313, 2313, 2313, 2313, 2313, 2853, 2313, + /* 3750 */ 2313, 2904, 2313, 2313, 2313, 423, 2855, 907, 2857, 2858, + /* 3760 */ 902, 2313, 2313, 890, 2905, 926, 2854, 2313, 2853, 2313, + /* 3770 */ 2313, 2904, 2313, 2313, 2313, 438, 2855, 907, 2857, 2858, + /* 3780 */ 902, 904, 2313, 890, 2905, 926, 2854, 2853, 2313, 2313, + /* 3790 */ 2904, 2313, 2313, 2313, 424, 2855, 907, 2857, 2858, 902, + /* 3800 */ 2313, 904, 890, 2905, 926, 2854, 2313, 2313, 2313, 2313, + /* 3810 */ 2313, 2872, 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2313, + /* 3820 */ 904, 2313, 2313, 2313, 2313, 2313, 2313, 2819, 2313, 903, + /* 3830 */ 2313, 2872, 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2313, + /* 3840 */ 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2819, 2313, 903, + /* 3850 */ 2872, 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2313, + /* 3860 */ 2313, 2313, 2313, 2313, 2313, 2313, 2819, 2313, 903, 2313, + /* 3870 */ 2313, 2313, 2313, 2313, 2853, 2313, 2313, 2904, 2313, 2313, + /* 3880 */ 2313, 415, 2855, 907, 2857, 2858, 902, 2313, 2313, 890, + /* 3890 */ 2905, 926, 2313, 2313, 2853, 2313, 2313, 2904, 2313, 2313, + /* 3900 */ 2313, 426, 2855, 907, 2857, 2858, 902, 2313, 2313, 890, + /* 3910 */ 2905, 926, 2313, 2853, 2313, 2313, 2904, 2313, 2313, 2313, + /* 3920 */ 427, 2855, 907, 2857, 2858, 902, 2313, 2854, 890, 2905, + /* 3930 */ 926, 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2313, + /* 3940 */ 2313, 2313, 904, 2313, 2313, 2313, 2854, 2313, 2313, 2313, + /* 3950 */ 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2313, + /* 3960 */ 2313, 904, 2313, 2313, 2313, 2313, 2313, 2313, 2854, 2313, + /* 3970 */ 2313, 2313, 2872, 2313, 2313, 2313, 2313, 2313, 2313, 2313, + /* 3980 */ 2313, 2313, 2313, 904, 2313, 2313, 2313, 2313, 2819, 2313, + /* 3990 */ 903, 2872, 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2313, + /* 4000 */ 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2819, 2313, 903, + /* 4010 */ 2313, 2313, 2313, 2872, 2313, 2313, 2313, 2313, 2313, 2313, + /* 4020 */ 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2819, + /* 4030 */ 2313, 903, 2313, 2854, 2313, 2853, 2313, 2313, 2904, 2313, + /* 4040 */ 2313, 2313, 428, 2855, 907, 2857, 2858, 902, 904, 2313, + /* 4050 */ 890, 2905, 926, 2854, 2853, 2313, 2313, 2904, 2313, 2313, + /* 4060 */ 2313, 429, 2855, 907, 2857, 2858, 902, 2313, 904, 890, + /* 4070 */ 2905, 926, 2313, 2313, 2313, 2313, 2853, 2313, 2872, 2904, + /* 4080 */ 2313, 2313, 2313, 445, 2855, 907, 2857, 2858, 902, 2313, + /* 4090 */ 2313, 890, 2905, 926, 2819, 2313, 903, 2313, 2872, 2313, + /* 4100 */ 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2313, + /* 4110 */ 2313, 2313, 2313, 2313, 2819, 2313, 903, 2313, 2313, 2313, + /* 4120 */ 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2313, + /* 4130 */ 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2313, + /* 4140 */ 2313, 2853, 2313, 2313, 2904, 2313, 2313, 2313, 446, 2855, + /* 4150 */ 907, 2857, 2858, 902, 2313, 2313, 890, 2905, 926, 2854, + /* 4160 */ 2313, 2853, 2313, 2313, 2904, 2313, 2313, 2313, 2866, 2855, + /* 4170 */ 907, 2857, 2858, 902, 904, 2313, 890, 2905, 926, 2854, + /* 4180 */ 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2313, + /* 4190 */ 2313, 2313, 2313, 2313, 904, 2313, 2313, 2313, 2854, 2313, + /* 4200 */ 2313, 2313, 2313, 2313, 2872, 2313, 2313, 2313, 2313, 2313, + /* 4210 */ 2313, 2313, 2313, 904, 2313, 2313, 2313, 2313, 2313, 2313, + /* 4220 */ 2819, 2313, 903, 2313, 2872, 2313, 2313, 2313, 2313, 2313, + /* 4230 */ 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2313, + /* 4240 */ 2819, 2313, 903, 2872, 2313, 2313, 2313, 2313, 2313, 2313, + /* 4250 */ 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2819, + /* 4260 */ 2313, 903, 2313, 2313, 2313, 2313, 2313, 2853, 2313, 2313, + /* 4270 */ 2904, 2313, 2313, 2313, 2865, 2855, 907, 2857, 2858, 902, + /* 4280 */ 2313, 2313, 890, 2905, 926, 2313, 2313, 2853, 2313, 2313, + /* 4290 */ 2904, 2313, 2313, 2313, 2864, 2855, 907, 2857, 2858, 902, + /* 4300 */ 2313, 2313, 890, 2905, 926, 2313, 2853, 2313, 2313, 2904, + /* 4310 */ 2313, 2313, 2313, 462, 2855, 907, 2857, 2858, 902, 2313, + /* 4320 */ 2854, 890, 2905, 926, 2313, 2313, 2313, 2313, 2313, 2313, + /* 4330 */ 2313, 2313, 2313, 2313, 2313, 904, 2313, 2313, 2313, 2854, + /* 4340 */ 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2313, + /* 4350 */ 2313, 2313, 2313, 2313, 904, 2313, 2313, 2313, 2313, 2313, + /* 4360 */ 2313, 2854, 2313, 2313, 2313, 2872, 2313, 2313, 2313, 2313, + /* 4370 */ 2313, 2313, 2313, 2313, 2313, 2313, 904, 2313, 2313, 2313, + /* 4380 */ 2313, 2819, 2313, 903, 2872, 2313, 2313, 2313, 2313, 2313, + /* 4390 */ 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2313, + /* 4400 */ 2819, 2313, 903, 2313, 2313, 2313, 2872, 2313, 2313, 2313, + /* 4410 */ 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2313, + /* 4420 */ 2313, 2313, 2819, 2313, 903, 2313, 2854, 2313, 2853, 2313, + /* 4430 */ 2313, 2904, 2313, 2313, 2313, 463, 2855, 907, 2857, 2858, + /* 4440 */ 902, 904, 2313, 890, 2905, 926, 2854, 2853, 2313, 2313, + /* 4450 */ 2904, 2313, 2313, 2313, 459, 2855, 907, 2857, 2858, 902, + /* 4460 */ 2313, 904, 890, 2905, 926, 2313, 2313, 2313, 2313, 2853, + /* 4470 */ 2313, 2872, 2904, 2313, 2313, 2313, 464, 2855, 907, 2857, + /* 4480 */ 2858, 902, 2313, 2313, 890, 2905, 926, 2819, 2313, 903, + /* 4490 */ 2313, 2872, 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2313, + /* 4500 */ 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2819, 2313, 903, + /* 4510 */ 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2313, + /* 4520 */ 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2313, 2313, + /* 4530 */ 2313, 2313, 2313, 2313, 905, 2313, 2313, 2904, 2313, 2313, + /* 4540 */ 2313, 435, 2855, 907, 2857, 2858, 902, 2313, 2313, 890, + /* 4550 */ 2905, 926, 2313, 2313, 2853, 2313, 2313, 2904, 2313, 2313, + /* 4560 */ 2313, 434, 2855, 907, 2857, 2858, 902, 2313, 2313, 890, + /* 4570 */ 2905, 926, }; static const YYCODETYPE yy_lookahead[] = { - /* 0 */ 536, 401, 536, 455, 404, 405, 415, 440, 544, 4, - /* 10 */ 544, 423, 12, 13, 485, 12, 13, 14, 15, 16, - /* 20 */ 20, 0, 22, 475, 476, 434, 562, 563, 436, 563, - /* 30 */ 423, 567, 568, 567, 568, 444, 36, 440, 38, 0, - /* 40 */ 443, 453, 21, 392, 452, 24, 25, 26, 27, 28, - /* 50 */ 29, 30, 31, 32, 437, 406, 407, 20, 407, 54, - /* 60 */ 453, 8, 9, 446, 447, 12, 13, 14, 15, 16, - /* 70 */ 503, 71, 21, 20, 74, 24, 25, 26, 27, 28, - /* 80 */ 29, 30, 31, 32, 517, 85, 20, 455, 437, 8, - /* 90 */ 9, 503, 504, 12, 13, 14, 15, 16, 59, 401, - /* 100 */ 503, 469, 404, 405, 453, 517, 455, 475, 476, 20, - /* 110 */ 503, 504, 505, 479, 517, 115, 406, 407, 118, 80, - /* 120 */ 81, 82, 83, 84, 517, 86, 87, 88, 89, 90, - /* 130 */ 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, - /* 140 */ 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, - /* 150 */ 111, 500, 440, 438, 503, 155, 156, 120, 507, 508, - /* 160 */ 509, 510, 511, 512, 525, 526, 515, 516, 517, 20, - /* 170 */ 536, 21, 20, 522, 22, 524, 20, 71, 544, 528, - /* 180 */ 529, 532, 533, 534, 118, 536, 537, 37, 36, 39, - /* 190 */ 40, 41, 42, 544, 194, 195, 562, 563, 20, 548, - /* 200 */ 20, 567, 568, 3, 204, 205, 451, 556, 118, 454, - /* 210 */ 455, 562, 563, 61, 499, 503, 567, 568, 20, 219, - /* 220 */ 20, 221, 199, 117, 416, 44, 226, 14, 122, 517, - /* 230 */ 8, 9, 424, 20, 12, 13, 14, 15, 16, 57, - /* 240 */ 118, 531, 532, 533, 534, 20, 536, 537, 66, 196, - /* 250 */ 71, 69, 70, 406, 254, 255, 256, 392, 258, 259, + /* 0 */ 536, 440, 479, 406, 443, 437, 437, 484, 544, 437, + /* 10 */ 406, 407, 12, 13, 446, 447, 447, 445, 413, 402, + /* 20 */ 20, 536, 22, 406, 21, 408, 562, 563, 456, 544, + /* 30 */ 426, 567, 568, 525, 526, 430, 36, 0, 38, 435, + /* 40 */ 37, 536, 39, 40, 41, 42, 441, 392, 563, 544, + /* 50 */ 20, 406, 567, 568, 457, 458, 455, 460, 44, 536, + /* 60 */ 463, 437, 407, 0, 503, 497, 498, 544, 563, 445, + /* 70 */ 469, 71, 567, 568, 74, 0, 475, 476, 517, 79, + /* 80 */ 456, 3, 406, 407, 401, 562, 563, 404, 405, 89, + /* 90 */ 567, 568, 437, 23, 20, 455, 59, 406, 407, 24, + /* 100 */ 25, 26, 27, 28, 29, 30, 31, 32, 453, 469, + /* 110 */ 455, 466, 20, 468, 77, 475, 476, 426, 118, 49, + /* 120 */ 50, 84, 85, 86, 87, 88, 435, 90, 91, 92, + /* 130 */ 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, + /* 140 */ 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, + /* 150 */ 113, 114, 538, 79, 540, 500, 156, 157, 503, 427, + /* 160 */ 536, 440, 507, 508, 509, 510, 511, 512, 544, 437, + /* 170 */ 515, 516, 517, 159, 406, 407, 57, 522, 401, 524, + /* 180 */ 448, 404, 405, 528, 529, 66, 562, 563, 69, 70, + /* 190 */ 33, 567, 568, 8, 9, 195, 196, 12, 13, 14, + /* 200 */ 15, 16, 20, 548, 47, 205, 206, 531, 532, 533, + /* 210 */ 534, 556, 536, 537, 20, 118, 406, 407, 150, 151, + /* 220 */ 220, 82, 222, 155, 503, 195, 196, 227, 131, 132, + /* 230 */ 133, 134, 135, 136, 137, 138, 139, 140, 517, 142, + /* 240 */ 143, 144, 145, 146, 147, 148, 8, 9, 156, 157, + /* 250 */ 12, 13, 14, 15, 16, 255, 256, 257, 20, 259, /* 260 */ 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, - /* 270 */ 270, 271, 407, 149, 274, 275, 276, 277, 278, 279, + /* 270 */ 270, 271, 272, 79, 274, 275, 276, 277, 278, 279, /* 280 */ 280, 281, 282, 283, 284, 285, 286, 287, 288, 12, - /* 290 */ 13, 14, 211, 392, 18, 189, 20, 20, 0, 22, - /* 300 */ 78, 122, 437, 27, 457, 458, 30, 460, 407, 256, - /* 310 */ 463, 155, 156, 36, 38, 38, 118, 4, 453, 119, - /* 320 */ 455, 0, 24, 25, 26, 27, 28, 29, 30, 31, - /* 330 */ 32, 431, 56, 57, 0, 59, 407, 437, 437, 158, - /* 340 */ 64, 65, 319, 320, 321, 322, 323, 14, 71, 455, - /* 350 */ 128, 74, 76, 20, 453, 78, 455, 3, 234, 235, - /* 360 */ 204, 205, 85, 469, 464, 500, 437, 392, 503, 475, - /* 370 */ 476, 36, 507, 508, 509, 510, 511, 512, 513, 313, - /* 380 */ 515, 516, 517, 518, 519, 148, 149, 150, 151, 152, - /* 390 */ 153, 154, 115, 117, 20, 118, 196, 20, 406, 407, - /* 400 */ 22, 500, 254, 313, 503, 129, 36, 194, 507, 508, - /* 410 */ 509, 510, 511, 512, 36, 193, 515, 516, 517, 76, - /* 420 */ 0, 520, 341, 522, 523, 524, 12, 13, 453, 528, - /* 430 */ 529, 118, 155, 156, 256, 313, 160, 161, 509, 163, - /* 440 */ 164, 165, 166, 167, 168, 169, 170, 171, 172, 20, - /* 450 */ 36, 175, 176, 177, 178, 179, 180, 181, 182, 431, - /* 460 */ 184, 185, 186, 20, 77, 437, 190, 191, 192, 256, - /* 470 */ 437, 194, 195, 197, 326, 327, 328, 329, 330, 331, - /* 480 */ 332, 204, 205, 302, 303, 304, 305, 306, 307, 308, - /* 490 */ 309, 310, 464, 115, 272, 174, 219, 464, 221, 2, - /* 500 */ 179, 14, 20, 226, 77, 8, 9, 20, 187, 12, - /* 510 */ 13, 14, 15, 16, 292, 293, 294, 295, 296, 297, - /* 520 */ 298, 299, 300, 301, 532, 533, 534, 194, 536, 537, - /* 530 */ 0, 254, 255, 256, 392, 258, 259, 260, 261, 262, - /* 540 */ 263, 264, 265, 266, 267, 268, 269, 270, 271, 407, - /* 550 */ 536, 274, 275, 276, 277, 278, 221, 214, 544, 282, - /* 560 */ 283, 284, 285, 286, 287, 288, 12, 13, 392, 158, - /* 570 */ 22, 194, 195, 118, 20, 406, 22, 563, 158, 437, - /* 580 */ 246, 567, 568, 407, 36, 242, 243, 57, 115, 256, - /* 590 */ 36, 221, 38, 173, 538, 453, 540, 455, 155, 156, - /* 600 */ 118, 392, 4, 130, 131, 132, 133, 134, 135, 136, - /* 610 */ 137, 138, 139, 437, 141, 142, 143, 144, 145, 146, - /* 620 */ 147, 23, 252, 253, 406, 71, 313, 438, 74, 453, - /* 630 */ 256, 455, 78, 85, 437, 221, 406, 407, 449, 85, - /* 640 */ 471, 472, 500, 446, 447, 503, 48, 49, 50, 507, - /* 650 */ 508, 509, 510, 511, 512, 289, 426, 515, 516, 517, - /* 660 */ 406, 407, 453, 115, 522, 189, 524, 406, 407, 115, - /* 670 */ 528, 529, 118, 218, 13, 220, 500, 406, 407, 503, - /* 680 */ 426, 392, 36, 507, 508, 509, 510, 511, 512, 435, - /* 690 */ 336, 515, 516, 517, 497, 498, 407, 426, 556, 223, - /* 700 */ 524, 438, 439, 158, 528, 529, 251, 489, 490, 155, - /* 710 */ 156, 454, 455, 302, 303, 304, 305, 306, 307, 308, - /* 720 */ 309, 310, 461, 8, 9, 129, 437, 12, 13, 14, - /* 730 */ 15, 16, 80, 81, 82, 406, 407, 406, 407, 87, - /* 740 */ 88, 89, 453, 85, 455, 93, 85, 506, 194, 195, - /* 750 */ 98, 99, 100, 101, 406, 407, 104, 426, 204, 205, - /* 760 */ 108, 109, 110, 111, 62, 63, 435, 219, 313, 221, - /* 770 */ 406, 407, 2, 219, 426, 221, 535, 20, 8, 9, - /* 780 */ 226, 34, 12, 13, 14, 15, 16, 402, 20, 500, - /* 790 */ 426, 406, 503, 408, 0, 313, 507, 508, 509, 510, - /* 800 */ 511, 512, 254, 255, 515, 516, 517, 389, 254, 255, - /* 810 */ 256, 392, 258, 259, 260, 261, 262, 263, 264, 265, - /* 820 */ 266, 267, 268, 269, 270, 271, 407, 33, 274, 275, - /* 830 */ 276, 277, 278, 129, 119, 20, 282, 283, 284, 285, - /* 840 */ 286, 287, 288, 289, 12, 13, 557, 558, 303, 304, - /* 850 */ 305, 402, 20, 437, 22, 406, 437, 408, 406, 36, - /* 860 */ 115, 532, 533, 534, 448, 536, 537, 221, 36, 391, - /* 870 */ 38, 393, 453, 438, 455, 130, 131, 132, 133, 134, - /* 880 */ 135, 136, 137, 138, 139, 437, 141, 142, 143, 144, - /* 890 */ 145, 146, 147, 445, 406, 407, 506, 479, 252, 253, - /* 900 */ 149, 150, 484, 71, 456, 154, 74, 94, 85, 437, - /* 910 */ 78, 465, 306, 307, 308, 309, 310, 85, 36, 500, - /* 920 */ 406, 407, 503, 406, 407, 535, 507, 508, 509, 510, - /* 930 */ 511, 512, 406, 407, 515, 516, 517, 438, 406, 407, - /* 940 */ 426, 489, 490, 524, 392, 406, 407, 115, 529, 461, - /* 950 */ 118, 392, 426, 196, 536, 437, 406, 407, 426, 407, - /* 960 */ 479, 409, 544, 445, 196, 426, 18, 85, 406, 497, - /* 970 */ 498, 23, 12, 13, 456, 162, 426, 20, 461, 22, - /* 980 */ 562, 563, 22, 437, 536, 567, 568, 155, 156, 437, - /* 990 */ 42, 43, 544, 438, 46, 392, 36, 289, 38, 291, - /* 1000 */ 187, 188, 456, 55, 0, 453, 438, 455, 60, 194, - /* 1010 */ 562, 563, 453, 256, 201, 567, 568, 536, 61, 438, - /* 1020 */ 72, 73, 74, 75, 76, 544, 194, 195, 466, 422, - /* 1030 */ 468, 71, 425, 22, 8, 9, 204, 205, 12, 13, - /* 1040 */ 14, 15, 16, 562, 563, 85, 437, 36, 567, 568, - /* 1050 */ 129, 219, 500, 221, 445, 503, 453, 20, 226, 507, - /* 1060 */ 508, 509, 510, 511, 512, 456, 118, 515, 516, 517, - /* 1070 */ 521, 256, 523, 392, 522, 115, 524, 14, 15, 16, - /* 1080 */ 528, 529, 1, 2, 479, 23, 254, 255, 256, 484, - /* 1090 */ 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, - /* 1100 */ 268, 269, 270, 271, 183, 157, 274, 275, 276, 277, - /* 1110 */ 278, 49, 50, 392, 282, 283, 284, 285, 286, 287, - /* 1120 */ 288, 12, 13, 14, 406, 407, 115, 392, 438, 20, - /* 1130 */ 392, 22, 8, 9, 453, 0, 12, 13, 14, 15, - /* 1140 */ 16, 536, 150, 55, 426, 36, 154, 38, 520, 544, - /* 1150 */ 4, 523, 148, 149, 150, 151, 152, 153, 154, 211, - /* 1160 */ 212, 213, 406, 407, 216, 19, 427, 562, 563, 0, - /* 1170 */ 392, 47, 567, 568, 453, 393, 437, 229, 230, 219, - /* 1180 */ 71, 221, 426, 74, 38, 411, 412, 448, 453, 241, - /* 1190 */ 0, 453, 244, 58, 85, 247, 248, 249, 250, 251, - /* 1200 */ 119, 8, 9, 57, 22, 12, 13, 14, 15, 16, - /* 1210 */ 64, 65, 406, 407, 254, 255, 450, 71, 36, 453, - /* 1220 */ 228, 392, 411, 412, 115, 233, 33, 118, 236, 437, - /* 1230 */ 238, 453, 426, 196, 274, 275, 407, 445, 409, 420, - /* 1240 */ 421, 392, 282, 283, 284, 285, 286, 287, 456, 406, - /* 1250 */ 407, 8, 9, 406, 407, 12, 13, 14, 15, 16, - /* 1260 */ 4, 313, 424, 117, 155, 156, 437, 85, 122, 426, - /* 1270 */ 80, 81, 82, 426, 20, 538, 33, 87, 88, 89, - /* 1280 */ 413, 52, 453, 93, 455, 406, 407, 392, 98, 99, - /* 1290 */ 100, 101, 560, 256, 104, 406, 407, 430, 108, 109, - /* 1300 */ 110, 111, 453, 194, 195, 426, 406, 407, 441, 521, - /* 1310 */ 13, 523, 119, 204, 205, 426, 44, 148, 149, 150, - /* 1320 */ 151, 152, 153, 154, 413, 237, 426, 392, 219, 500, - /* 1330 */ 221, 193, 503, 420, 421, 226, 507, 508, 509, 510, - /* 1340 */ 511, 512, 437, 71, 515, 516, 517, 450, 453, 0, - /* 1350 */ 453, 522, 441, 524, 0, 392, 428, 528, 529, 392, - /* 1360 */ 432, 456, 119, 254, 255, 256, 392, 258, 259, 260, + /* 290 */ 13, 14, 392, 20, 18, 22, 20, 20, 20, 22, + /* 300 */ 532, 533, 534, 27, 536, 537, 30, 407, 451, 36, + /* 310 */ 247, 454, 455, 36, 38, 38, 302, 303, 304, 305, + /* 320 */ 306, 307, 308, 309, 310, 149, 150, 151, 152, 153, + /* 330 */ 154, 155, 56, 57, 61, 59, 81, 437, 4, 14, + /* 340 */ 64, 65, 532, 533, 534, 20, 536, 537, 71, 406, + /* 350 */ 407, 74, 76, 453, 118, 455, 79, 8, 9, 82, + /* 360 */ 413, 12, 13, 14, 15, 16, 89, 131, 132, 133, + /* 370 */ 134, 135, 136, 137, 138, 139, 140, 195, 142, 143, + /* 380 */ 144, 145, 146, 147, 148, 8, 9, 313, 441, 12, + /* 390 */ 13, 14, 15, 16, 255, 118, 120, 212, 431, 0, + /* 400 */ 500, 41, 42, 503, 437, 455, 130, 507, 508, 509, + /* 410 */ 510, 511, 512, 79, 336, 515, 516, 517, 438, 439, + /* 420 */ 520, 423, 522, 523, 524, 475, 476, 78, 528, 529, + /* 430 */ 79, 464, 20, 156, 157, 197, 0, 161, 162, 257, + /* 440 */ 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, + /* 450 */ 159, 453, 176, 177, 178, 179, 180, 181, 182, 183, + /* 460 */ 20, 185, 186, 187, 406, 407, 18, 191, 192, 193, + /* 470 */ 437, 23, 195, 196, 198, 532, 533, 534, 445, 536, + /* 480 */ 537, 4, 205, 206, 426, 125, 126, 544, 128, 456, + /* 490 */ 42, 43, 431, 150, 46, 257, 392, 220, 437, 222, + /* 500 */ 407, 503, 504, 55, 227, 562, 563, 313, 60, 149, + /* 510 */ 567, 568, 402, 153, 20, 517, 406, 81, 408, 79, + /* 520 */ 72, 73, 74, 75, 76, 464, 341, 79, 79, 389, + /* 530 */ 437, 54, 255, 256, 257, 257, 259, 260, 261, 262, + /* 540 */ 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, + /* 550 */ 79, 274, 275, 276, 277, 278, 0, 453, 159, 282, + /* 560 */ 283, 284, 285, 286, 287, 288, 12, 13, 156, 157, + /* 570 */ 219, 437, 221, 174, 20, 423, 22, 21, 235, 236, + /* 580 */ 24, 25, 26, 27, 28, 29, 30, 31, 32, 44, + /* 590 */ 36, 20, 38, 302, 303, 304, 305, 306, 307, 308, + /* 600 */ 309, 310, 509, 252, 21, 453, 158, 24, 25, 26, + /* 610 */ 27, 28, 29, 30, 31, 32, 71, 205, 206, 479, + /* 620 */ 422, 14, 392, 425, 484, 71, 51, 20, 74, 4, + /* 630 */ 479, 497, 498, 79, 8, 9, 82, 407, 12, 13, + /* 640 */ 14, 15, 16, 89, 438, 8, 9, 313, 23, 12, + /* 650 */ 13, 14, 15, 16, 79, 503, 504, 505, 437, 33, + /* 660 */ 212, 213, 214, 20, 313, 217, 445, 437, 20, 517, + /* 670 */ 33, 392, 118, 48, 49, 50, 536, 456, 230, 231, + /* 680 */ 255, 406, 407, 453, 544, 455, 407, 536, 406, 407, + /* 690 */ 242, 197, 121, 245, 20, 544, 248, 249, 250, 251, + /* 700 */ 252, 22, 562, 563, 416, 499, 80, 567, 568, 20, + /* 710 */ 156, 157, 424, 562, 563, 36, 437, 80, 567, 568, + /* 720 */ 8, 9, 406, 407, 12, 13, 14, 15, 16, 391, + /* 730 */ 500, 393, 453, 503, 455, 13, 461, 507, 508, 509, + /* 740 */ 510, 511, 512, 461, 514, 515, 516, 517, 159, 195, + /* 750 */ 196, 326, 327, 328, 329, 330, 331, 332, 36, 205, + /* 760 */ 206, 313, 313, 76, 438, 8, 9, 0, 89, 12, + /* 770 */ 13, 14, 15, 16, 220, 449, 222, 461, 437, 500, + /* 780 */ 81, 227, 503, 3, 313, 77, 507, 508, 509, 510, + /* 790 */ 511, 512, 80, 14, 515, 516, 517, 118, 506, 20, + /* 800 */ 20, 522, 195, 524, 47, 464, 14, 528, 529, 255, + /* 810 */ 256, 257, 20, 259, 260, 261, 262, 263, 264, 265, + /* 820 */ 266, 267, 268, 269, 270, 271, 272, 535, 274, 275, + /* 830 */ 276, 277, 278, 406, 407, 556, 282, 283, 284, 285, + /* 840 */ 286, 287, 288, 289, 12, 13, 392, 306, 307, 308, + /* 850 */ 309, 310, 20, 426, 22, 12, 13, 14, 15, 16, + /* 860 */ 80, 407, 36, 409, 257, 151, 2, 432, 36, 155, + /* 870 */ 38, 163, 8, 9, 36, 2, 12, 13, 14, 15, + /* 880 */ 16, 8, 9, 392, 392, 12, 13, 14, 15, 16, + /* 890 */ 0, 437, 303, 304, 305, 440, 188, 189, 407, 220, + /* 900 */ 409, 222, 215, 71, 436, 257, 74, 453, 13, 455, + /* 910 */ 202, 79, 0, 406, 82, 406, 1, 2, 8, 9, + /* 920 */ 452, 89, 12, 13, 14, 15, 16, 89, 437, 494, + /* 930 */ 243, 244, 8, 9, 255, 256, 12, 13, 14, 15, + /* 940 */ 16, 20, 175, 229, 453, 453, 455, 180, 234, 520, + /* 950 */ 118, 237, 523, 239, 500, 188, 13, 503, 503, 22, + /* 960 */ 392, 507, 508, 509, 510, 511, 512, 479, 52, 515, + /* 970 */ 516, 517, 517, 36, 36, 407, 522, 197, 524, 36, + /* 980 */ 471, 472, 528, 529, 89, 273, 392, 195, 156, 157, + /* 990 */ 80, 500, 36, 506, 503, 80, 489, 490, 507, 508, + /* 1000 */ 509, 510, 511, 512, 80, 437, 515, 516, 517, 406, + /* 1010 */ 407, 406, 407, 522, 437, 524, 406, 407, 78, 528, + /* 1020 */ 529, 453, 535, 455, 536, 437, 89, 195, 196, 426, + /* 1030 */ 20, 426, 544, 456, 446, 447, 426, 205, 206, 149, + /* 1040 */ 150, 151, 152, 153, 154, 155, 20, 453, 222, 257, + /* 1050 */ 562, 563, 220, 200, 222, 567, 568, 62, 63, 227, + /* 1060 */ 406, 149, 150, 151, 152, 153, 154, 155, 500, 392, + /* 1070 */ 20, 503, 22, 20, 392, 507, 508, 509, 510, 511, + /* 1080 */ 512, 12, 13, 515, 516, 517, 20, 255, 256, 257, + /* 1090 */ 392, 259, 260, 261, 262, 263, 264, 265, 266, 267, + /* 1100 */ 268, 269, 270, 271, 272, 36, 274, 275, 276, 277, + /* 1110 */ 278, 61, 4, 197, 282, 283, 284, 285, 286, 287, + /* 1120 */ 288, 12, 13, 14, 208, 557, 558, 454, 455, 20, + /* 1130 */ 453, 22, 8, 9, 194, 453, 12, 13, 14, 15, + /* 1140 */ 16, 406, 407, 489, 490, 36, 392, 38, 0, 8, + /* 1150 */ 9, 453, 392, 12, 13, 14, 15, 16, 8, 9, + /* 1160 */ 222, 426, 12, 13, 14, 15, 16, 407, 289, 409, + /* 1170 */ 291, 47, 319, 320, 321, 322, 323, 415, 222, 521, + /* 1180 */ 71, 523, 71, 74, 14, 15, 16, 392, 79, 437, + /* 1190 */ 479, 253, 254, 89, 406, 407, 434, 437, 89, 406, + /* 1200 */ 407, 392, 406, 407, 80, 57, 444, 453, 456, 253, + /* 1210 */ 254, 420, 421, 453, 426, 455, 407, 411, 412, 426, + /* 1220 */ 130, 80, 426, 197, 437, 406, 407, 118, 12, 13, + /* 1230 */ 80, 120, 292, 392, 123, 448, 8, 9, 22, 22, + /* 1240 */ 12, 13, 14, 15, 16, 426, 437, 536, 453, 521, + /* 1250 */ 197, 523, 36, 36, 38, 544, 411, 412, 190, 289, + /* 1260 */ 500, 506, 453, 503, 455, 156, 157, 507, 508, 509, + /* 1270 */ 510, 511, 512, 562, 563, 515, 516, 517, 567, 568, + /* 1280 */ 406, 407, 522, 257, 524, 427, 79, 71, 528, 529, + /* 1290 */ 535, 222, 224, 392, 453, 437, 392, 420, 421, 392, + /* 1300 */ 426, 190, 406, 407, 195, 196, 448, 33, 80, 500, + /* 1310 */ 257, 407, 503, 409, 205, 206, 507, 508, 509, 510, + /* 1320 */ 511, 512, 426, 257, 515, 516, 517, 392, 121, 220, + /* 1330 */ 428, 222, 415, 524, 432, 118, 227, 528, 529, 392, + /* 1340 */ 392, 437, 406, 407, 392, 8, 9, 406, 407, 12, + /* 1350 */ 13, 14, 15, 16, 453, 450, 130, 453, 453, 455, + /* 1360 */ 453, 444, 426, 437, 255, 256, 257, 426, 259, 260, /* 1370 */ 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, - /* 1380 */ 271, 407, 85, 274, 275, 276, 277, 278, 453, 406, + /* 1380 */ 271, 272, 456, 274, 275, 276, 277, 278, 453, 406, /* 1390 */ 407, 282, 283, 284, 285, 286, 287, 288, 12, 13, - /* 1400 */ 392, 406, 407, 406, 407, 392, 20, 392, 22, 426, - /* 1410 */ 272, 437, 406, 407, 392, 407, 453, 409, 437, 392, - /* 1420 */ 453, 426, 36, 426, 38, 196, 392, 453, 33, 455, - /* 1430 */ 292, 77, 426, 8, 9, 506, 207, 12, 13, 14, - /* 1440 */ 15, 16, 8, 9, 427, 437, 12, 13, 14, 15, - /* 1450 */ 16, 437, 450, 14, 437, 453, 0, 71, 148, 20, - /* 1460 */ 74, 453, 152, 455, 535, 448, 453, 415, 453, 0, - /* 1470 */ 456, 85, 432, 123, 500, 453, 126, 503, 33, 498, - /* 1480 */ 453, 507, 508, 509, 510, 511, 512, 453, 514, 515, - /* 1490 */ 516, 517, 437, 395, 396, 33, 444, 571, 392, 33, - /* 1500 */ 44, 115, 447, 33, 118, 119, 20, 158, 500, 47, - /* 1510 */ 256, 503, 36, 407, 119, 507, 508, 509, 510, 511, - /* 1520 */ 512, 33, 33, 515, 516, 517, 123, 539, 123, 126, - /* 1530 */ 522, 126, 524, 33, 494, 47, 528, 529, 0, 13, - /* 1540 */ 13, 155, 156, 437, 119, 123, 155, 156, 126, 553, - /* 1550 */ 8, 9, 33, 119, 12, 13, 14, 15, 16, 453, - /* 1560 */ 22, 455, 36, 36, 119, 1, 2, 410, 8, 9, - /* 1570 */ 78, 315, 12, 13, 14, 15, 16, 437, 8, 9, - /* 1580 */ 194, 195, 12, 13, 14, 15, 16, 423, 36, 47, - /* 1590 */ 204, 205, 8, 9, 33, 33, 12, 13, 14, 15, - /* 1600 */ 16, 118, 33, 120, 33, 219, 500, 221, 119, 503, - /* 1610 */ 0, 0, 226, 507, 508, 509, 510, 511, 512, 119, - /* 1620 */ 33, 515, 516, 517, 12, 13, 51, 158, 522, 423, - /* 1630 */ 524, 405, 22, 22, 528, 529, 0, 85, 119, 465, - /* 1640 */ 254, 255, 256, 559, 258, 259, 260, 261, 262, 263, - /* 1650 */ 264, 265, 266, 267, 268, 269, 270, 271, 22, 559, - /* 1660 */ 274, 275, 276, 277, 278, 478, 33, 33, 282, 283, - /* 1670 */ 284, 285, 286, 287, 288, 12, 13, 392, 33, 119, - /* 1680 */ 119, 119, 479, 20, 559, 22, 33, 559, 119, 119, - /* 1690 */ 119, 33, 407, 118, 409, 12, 13, 221, 273, 36, - /* 1700 */ 33, 38, 465, 119, 33, 410, 119, 8, 9, 501, - /* 1710 */ 47, 12, 13, 14, 15, 16, 407, 231, 452, 8, - /* 1720 */ 9, 486, 437, 12, 13, 14, 15, 16, 392, 33, - /* 1730 */ 12, 13, 12, 13, 71, 12, 13, 74, 453, 536, - /* 1740 */ 455, 33, 33, 407, 465, 33, 254, 544, 85, 12, - /* 1750 */ 13, 13, 119, 119, 12, 13, 12, 13, 47, 12, - /* 1760 */ 13, 12, 13, 33, 119, 562, 563, 12, 13, 33, - /* 1770 */ 567, 568, 119, 437, 36, 13, 33, 119, 115, 465, - /* 1780 */ 564, 118, 543, 543, 36, 500, 119, 530, 503, 453, - /* 1790 */ 119, 455, 507, 508, 509, 510, 511, 512, 36, 33, - /* 1800 */ 515, 516, 517, 465, 338, 546, 425, 522, 480, 524, - /* 1810 */ 340, 33, 316, 528, 529, 119, 8, 9, 155, 156, - /* 1820 */ 12, 13, 14, 15, 16, 57, 502, 119, 119, 20, - /* 1830 */ 119, 119, 406, 85, 20, 491, 500, 236, 496, 503, - /* 1840 */ 217, 406, 415, 507, 508, 509, 510, 511, 512, 119, - /* 1850 */ 491, 515, 516, 517, 482, 119, 415, 194, 195, 20, - /* 1860 */ 524, 407, 119, 47, 528, 529, 462, 204, 205, 8, - /* 1870 */ 9, 462, 407, 12, 13, 14, 15, 16, 193, 459, - /* 1880 */ 406, 406, 219, 462, 221, 119, 8, 9, 407, 226, - /* 1890 */ 12, 13, 14, 15, 16, 459, 459, 119, 116, 41, - /* 1900 */ 42, 459, 114, 419, 406, 418, 113, 406, 417, 406, - /* 1910 */ 406, 406, 20, 399, 52, 403, 399, 254, 255, 256, - /* 1920 */ 491, 258, 259, 260, 261, 262, 263, 264, 265, 266, - /* 1930 */ 267, 268, 269, 270, 271, 403, 415, 274, 275, 276, - /* 1940 */ 277, 278, 20, 479, 415, 282, 283, 284, 285, 286, - /* 1950 */ 287, 288, 12, 13, 455, 415, 20, 408, 20, 481, - /* 1960 */ 20, 415, 22, 408, 479, 415, 20, 472, 415, 20, - /* 1970 */ 52, 272, 466, 415, 392, 399, 36, 433, 38, 406, - /* 1980 */ 119, 415, 124, 125, 433, 127, 453, 415, 395, 407, - /* 1990 */ 395, 409, 453, 437, 437, 406, 437, 119, 399, 239, - /* 2000 */ 536, 453, 437, 495, 196, 392, 148, 118, 544, 493, - /* 2010 */ 152, 71, 20, 491, 74, 437, 437, 437, 437, 437, - /* 2020 */ 407, 536, 437, 437, 490, 85, 562, 563, 437, 544, - /* 2030 */ 413, 567, 568, 488, 224, 453, 225, 455, 455, 413, - /* 2040 */ 325, 487, 552, 480, 406, 453, 324, 562, 563, 552, - /* 2050 */ 437, 210, 567, 568, 333, 115, 392, 555, 118, 552, - /* 2060 */ 335, 473, 551, 473, 554, 334, 453, 317, 455, 312, - /* 2070 */ 550, 407, 549, 409, 480, 311, 342, 542, 541, 339, - /* 2080 */ 565, 572, 500, 337, 566, 503, 407, 20, 129, 507, - /* 2090 */ 508, 509, 510, 511, 512, 155, 156, 515, 516, 517, - /* 2100 */ 314, 437, 506, 408, 522, 413, 524, 413, 473, 453, - /* 2110 */ 528, 529, 453, 500, 547, 453, 503, 453, 453, 455, - /* 2120 */ 507, 508, 509, 510, 511, 512, 453, 473, 515, 516, - /* 2130 */ 517, 202, 413, 453, 194, 195, 470, 524, 466, 413, - /* 2140 */ 118, 528, 529, 545, 204, 205, 527, 202, 467, 432, - /* 2150 */ 453, 453, 466, 453, 413, 453, 453, 453, 413, 219, - /* 2160 */ 407, 221, 118, 453, 500, 413, 226, 503, 22, 453, - /* 2170 */ 442, 507, 508, 509, 510, 511, 512, 453, 406, 515, - /* 2180 */ 516, 517, 453, 35, 37, 453, 522, 499, 524, 394, - /* 2190 */ 40, 414, 528, 529, 254, 255, 256, 397, 258, 259, + /* 1400 */ 453, 453, 395, 396, 500, 453, 20, 503, 22, 426, + /* 1410 */ 184, 507, 508, 509, 510, 511, 512, 80, 437, 515, + /* 1420 */ 516, 517, 36, 315, 38, 149, 522, 392, 524, 153, + /* 1430 */ 13, 0, 528, 529, 406, 407, 220, 130, 222, 406, + /* 1440 */ 407, 33, 22, 406, 407, 8, 9, 392, 392, 12, + /* 1450 */ 13, 14, 15, 16, 426, 392, 36, 71, 450, 426, + /* 1460 */ 74, 453, 407, 426, 409, 79, 80, 406, 407, 253, + /* 1470 */ 254, 255, 392, 450, 33, 89, 453, 71, 392, 498, + /* 1480 */ 0, 33, 33, 77, 47, 406, 407, 426, 453, 0, + /* 1490 */ 274, 275, 437, 407, 406, 407, 47, 34, 282, 283, + /* 1500 */ 284, 285, 286, 287, 118, 426, 89, 0, 453, 453, + /* 1510 */ 455, 22, 392, 33, 426, 36, 453, 84, 85, 86, + /* 1520 */ 0, 80, 0, 437, 91, 92, 93, 407, 80, 124, + /* 1530 */ 97, 20, 127, 453, 101, 102, 103, 104, 118, 453, + /* 1540 */ 107, 455, 156, 157, 111, 112, 113, 114, 55, 124, + /* 1550 */ 124, 44, 127, 127, 0, 500, 124, 437, 503, 127, + /* 1560 */ 156, 157, 507, 508, 509, 510, 511, 512, 89, 33, + /* 1570 */ 515, 516, 517, 453, 33, 455, 22, 522, 0, 524, + /* 1580 */ 58, 195, 196, 528, 529, 0, 500, 485, 71, 503, + /* 1590 */ 159, 205, 206, 507, 508, 509, 510, 511, 512, 438, + /* 1600 */ 22, 515, 516, 517, 1, 2, 220, 22, 222, 438, + /* 1610 */ 524, 438, 338, 227, 438, 529, 80, 12, 13, 33, + /* 1620 */ 500, 80, 438, 503, 438, 12, 13, 507, 508, 509, + /* 1630 */ 510, 511, 512, 513, 33, 515, 516, 517, 518, 519, + /* 1640 */ 123, 255, 256, 257, 4, 259, 260, 261, 262, 263, + /* 1650 */ 264, 265, 266, 267, 268, 269, 270, 271, 272, 19, + /* 1660 */ 274, 275, 276, 277, 278, 36, 80, 424, 282, 283, + /* 1670 */ 284, 285, 286, 287, 288, 12, 13, 392, 38, 159, + /* 1680 */ 36, 80, 33, 20, 393, 22, 33, 465, 33, 33, + /* 1690 */ 12, 13, 407, 36, 409, 12, 13, 57, 33, 36, + /* 1700 */ 538, 38, 33, 33, 64, 65, 33, 33, 8, 9, + /* 1710 */ 47, 71, 12, 13, 14, 15, 16, 33, 89, 8, + /* 1720 */ 9, 13, 437, 12, 13, 14, 15, 16, 33, 80, + /* 1730 */ 33, 238, 33, 80, 71, 80, 80, 74, 453, 33, + /* 1740 */ 455, 0, 79, 232, 36, 80, 89, 479, 340, 80, + /* 1750 */ 80, 33, 89, 80, 80, 560, 33, 13, 12, 13, + /* 1760 */ 120, 12, 13, 123, 80, 12, 13, 12, 13, 12, + /* 1770 */ 13, 12, 13, 12, 13, 80, 33, 80, 78, 80, + /* 1780 */ 36, 118, 82, 571, 553, 500, 80, 539, 503, 410, + /* 1790 */ 437, 80, 507, 508, 509, 510, 511, 512, 80, 33, + /* 1800 */ 515, 516, 517, 80, 536, 423, 423, 522, 405, 524, + /* 1810 */ 33, 465, 544, 528, 529, 33, 33, 559, 559, 156, + /* 1820 */ 157, 559, 478, 80, 559, 84, 85, 86, 465, 129, + /* 1830 */ 562, 563, 91, 92, 93, 567, 568, 410, 97, 501, + /* 1840 */ 452, 407, 101, 102, 103, 104, 80, 486, 107, 465, + /* 1850 */ 392, 543, 111, 112, 113, 114, 465, 80, 195, 196, + /* 1860 */ 543, 564, 80, 80, 530, 407, 222, 546, 205, 206, + /* 1870 */ 425, 316, 465, 480, 8, 9, 57, 502, 12, 13, + /* 1880 */ 14, 15, 16, 220, 20, 222, 491, 406, 20, 237, + /* 1890 */ 227, 415, 496, 491, 194, 437, 482, 415, 218, 20, + /* 1900 */ 406, 47, 407, 407, 462, 462, 194, 406, 406, 459, + /* 1910 */ 407, 453, 459, 455, 462, 459, 459, 119, 255, 256, + /* 1920 */ 257, 117, 259, 260, 261, 262, 263, 264, 265, 266, + /* 1930 */ 267, 268, 269, 270, 271, 272, 418, 274, 275, 276, + /* 1940 */ 277, 278, 419, 36, 420, 282, 283, 284, 285, 286, + /* 1950 */ 287, 288, 12, 13, 419, 418, 406, 392, 500, 406, + /* 1960 */ 20, 503, 22, 116, 417, 507, 508, 509, 510, 511, + /* 1970 */ 512, 479, 407, 515, 516, 517, 36, 406, 38, 406, + /* 1980 */ 522, 406, 524, 20, 52, 403, 528, 529, 399, 399, + /* 1990 */ 403, 491, 292, 293, 294, 295, 296, 297, 298, 299, + /* 2000 */ 300, 301, 437, 415, 20, 20, 415, 455, 415, 20, + /* 2010 */ 408, 71, 481, 415, 74, 408, 20, 472, 453, 79, + /* 2020 */ 455, 415, 20, 415, 466, 415, 415, 52, 536, 89, + /* 2030 */ 433, 406, 433, 415, 399, 399, 544, 437, 406, 240, + /* 2040 */ 395, 437, 395, 495, 79, 453, 437, 453, 453, 437, + /* 2050 */ 493, 437, 437, 437, 562, 563, 437, 437, 118, 567, + /* 2060 */ 568, 437, 20, 197, 437, 500, 226, 491, 503, 490, + /* 2070 */ 225, 413, 507, 508, 509, 510, 511, 512, 455, 413, + /* 2080 */ 515, 516, 517, 406, 488, 325, 453, 522, 324, 524, + /* 2090 */ 552, 552, 211, 528, 529, 473, 156, 157, 333, 473, + /* 2100 */ 554, 480, 335, 334, 487, 317, 555, 12, 13, 312, + /* 2110 */ 550, 552, 551, 549, 480, 342, 542, 22, 311, 339, + /* 2120 */ 407, 541, 337, 20, 130, 314, 545, 392, 572, 566, + /* 2130 */ 547, 36, 565, 38, 506, 195, 196, 408, 413, 413, + /* 2140 */ 473, 453, 407, 453, 453, 205, 206, 453, 473, 453, + /* 2150 */ 203, 470, 413, 466, 453, 413, 79, 527, 453, 203, + /* 2160 */ 220, 413, 222, 432, 413, 467, 71, 227, 466, 407, + /* 2170 */ 453, 79, 437, 453, 453, 453, 406, 453, 22, 442, + /* 2180 */ 453, 453, 35, 453, 89, 453, 453, 453, 453, 453, + /* 2190 */ 455, 453, 37, 453, 394, 255, 256, 257, 453, 259, /* 2200 */ 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, - /* 2210 */ 270, 271, 453, 398, 274, 275, 276, 277, 278, 400, - /* 2220 */ 453, 399, 282, 283, 284, 285, 286, 287, 288, 12, - /* 2230 */ 13, 492, 453, 453, 453, 439, 453, 20, 453, 22, - /* 2240 */ 453, 483, 453, 453, 453, 453, 429, 453, 474, 474, - /* 2250 */ 429, 392, 439, 36, 429, 38, 390, 0, 0, 0, - /* 2260 */ 47, 0, 36, 245, 36, 245, 407, 36, 36, 0, - /* 2270 */ 36, 36, 245, 36, 0, 0, 245, 0, 36, 0, - /* 2280 */ 36, 0, 22, 0, 36, 240, 0, 227, 71, 0, - /* 2290 */ 227, 74, 228, 221, 219, 0, 437, 0, 0, 215, - /* 2300 */ 214, 0, 85, 0, 161, 51, 51, 0, 36, 0, - /* 2310 */ 0, 0, 453, 57, 455, 51, 36, 0, 47, 0, - /* 2320 */ 0, 0, 0, 0, 51, 0, 0, 12, 13, 0, - /* 2330 */ 0, 179, 115, 392, 0, 118, 36, 22, 179, 0, - /* 2340 */ 0, 0, 0, 0, 0, 0, 0, 0, 407, 0, - /* 2350 */ 0, 36, 0, 38, 0, 0, 0, 0, 0, 500, - /* 2360 */ 0, 0, 503, 0, 51, 0, 507, 508, 509, 510, - /* 2370 */ 511, 512, 155, 156, 515, 516, 517, 0, 437, 47, - /* 2380 */ 0, 522, 0, 524, 0, 0, 71, 528, 529, 0, - /* 2390 */ 0, 0, 0, 0, 453, 22, 455, 0, 0, 161, - /* 2400 */ 160, 0, 159, 0, 0, 22, 0, 71, 22, 0, - /* 2410 */ 36, 194, 195, 0, 52, 0, 52, 0, 0, 71, - /* 2420 */ 44, 204, 205, 36, 71, 57, 0, 57, 0, 57, - /* 2430 */ 71, 36, 44, 0, 0, 36, 219, 56, 221, 0, - /* 2440 */ 44, 500, 0, 226, 503, 51, 36, 36, 507, 508, - /* 2450 */ 509, 510, 511, 512, 47, 33, 515, 516, 517, 51, - /* 2460 */ 44, 14, 0, 522, 45, 524, 0, 0, 44, 528, - /* 2470 */ 529, 254, 255, 256, 51, 258, 259, 260, 261, 262, - /* 2480 */ 263, 264, 265, 266, 267, 268, 269, 270, 271, 1, - /* 2490 */ 0, 274, 275, 276, 277, 278, 0, 44, 210, 282, - /* 2500 */ 283, 284, 285, 286, 287, 288, 0, 19, 51, 0, - /* 2510 */ 51, 0, 0, 0, 79, 392, 0, 36, 57, 44, - /* 2520 */ 0, 36, 57, 44, 0, 36, 38, 57, 44, 0, - /* 2530 */ 407, 36, 0, 57, 219, 44, 221, 0, 0, 0, - /* 2540 */ 0, 53, 54, 36, 0, 57, 0, 126, 128, 22, - /* 2550 */ 36, 0, 22, 36, 66, 67, 68, 69, 36, 71, - /* 2560 */ 437, 36, 36, 0, 36, 0, 33, 252, 253, 254, - /* 2570 */ 36, 36, 36, 0, 22, 33, 453, 36, 455, 36, - /* 2580 */ 22, 36, 22, 36, 22, 0, 22, 0, 0, 274, - /* 2590 */ 275, 36, 0, 36, 0, 36, 0, 282, 283, 284, - /* 2600 */ 285, 286, 287, 36, 0, 117, 22, 59, 36, 20, - /* 2610 */ 122, 36, 36, 119, 0, 118, 118, 51, 0, 36, - /* 2620 */ 22, 392, 0, 500, 22, 196, 503, 196, 226, 202, - /* 2630 */ 507, 508, 509, 510, 511, 512, 407, 232, 515, 516, - /* 2640 */ 517, 153, 196, 0, 392, 231, 0, 222, 196, 206, - /* 2650 */ 196, 206, 3, 33, 22, 318, 33, 36, 52, 407, - /* 2660 */ 36, 52, 33, 33, 51, 85, 437, 118, 51, 119, - /* 2670 */ 33, 118, 33, 119, 118, 3, 36, 33, 36, 51, - /* 2680 */ 119, 36, 453, 36, 455, 114, 198, 118, 200, 437, - /* 2690 */ 116, 203, 569, 570, 36, 118, 208, 119, 119, 118, - /* 2700 */ 118, 36, 36, 33, 118, 453, 477, 455, 51, 119, - /* 2710 */ 119, 118, 0, 0, 119, 227, 119, 118, 318, 119, - /* 2720 */ 392, 44, 119, 0, 119, 44, 119, 0, 118, 500, - /* 2730 */ 118, 44, 503, 118, 302, 407, 507, 508, 509, 510, - /* 2740 */ 511, 512, 33, 118, 515, 516, 517, 2, 318, 51, - /* 2750 */ 119, 116, 500, 290, 116, 503, 22, 254, 51, 507, - /* 2760 */ 508, 509, 510, 511, 512, 437, 118, 515, 516, 517, - /* 2770 */ 118, 392, 118, 203, 118, 22, 257, 118, 0, 44, - /* 2780 */ 119, 453, 119, 455, 120, 118, 407, 118, 0, 118, - /* 2790 */ 22, 118, 118, 51, 119, 119, 118, 118, 118, 22, - /* 2800 */ 199, 118, 140, 119, 392, 477, 118, 199, 118, 198, - /* 2810 */ 558, 118, 121, 118, 118, 199, 437, 36, 119, 407, - /* 2820 */ 118, 118, 36, 129, 119, 119, 118, 36, 500, 118, - /* 2830 */ 36, 503, 453, 119, 455, 507, 508, 509, 510, 511, - /* 2840 */ 512, 119, 36, 515, 516, 517, 36, 119, 119, 437, - /* 2850 */ 36, 232, 33, 36, 118, 140, 477, 140, 140, 118, - /* 2860 */ 22, 118, 79, 78, 22, 453, 22, 455, 36, 392, - /* 2870 */ 36, 36, 36, 36, 85, 36, 36, 36, 85, 500, - /* 2880 */ 22, 36, 503, 36, 407, 36, 507, 508, 509, 510, - /* 2890 */ 511, 512, 392, 33, 515, 516, 517, 36, 36, 36, - /* 2900 */ 36, 36, 112, 36, 112, 85, 36, 407, 36, 36, - /* 2910 */ 36, 36, 500, 22, 437, 503, 36, 0, 36, 507, - /* 2920 */ 508, 509, 510, 511, 512, 57, 0, 515, 516, 517, - /* 2930 */ 453, 44, 455, 36, 57, 0, 44, 437, 36, 44, - /* 2940 */ 57, 0, 36, 57, 44, 0, 36, 0, 0, 22, - /* 2950 */ 22, 36, 0, 453, 22, 455, 33, 36, 36, 22, - /* 2960 */ 392, 21, 573, 573, 22, 22, 573, 21, 573, 20, - /* 2970 */ 573, 573, 573, 561, 573, 407, 573, 500, 573, 573, - /* 2980 */ 503, 573, 573, 573, 507, 508, 509, 510, 511, 512, - /* 2990 */ 573, 573, 515, 516, 517, 573, 573, 573, 573, 573, - /* 3000 */ 500, 573, 573, 503, 573, 437, 573, 507, 508, 509, - /* 3010 */ 510, 511, 512, 573, 573, 515, 516, 517, 573, 519, - /* 3020 */ 573, 453, 573, 455, 573, 392, 573, 38, 573, 573, - /* 3030 */ 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, - /* 3040 */ 407, 573, 573, 54, 573, 477, 57, 570, 573, 573, - /* 3050 */ 573, 573, 392, 573, 573, 66, 67, 68, 69, 573, - /* 3060 */ 71, 573, 573, 573, 573, 573, 573, 407, 500, 573, - /* 3070 */ 437, 503, 573, 573, 573, 507, 508, 509, 510, 511, - /* 3080 */ 512, 573, 573, 515, 516, 517, 453, 573, 455, 573, - /* 3090 */ 573, 573, 573, 573, 573, 573, 573, 437, 573, 573, - /* 3100 */ 573, 573, 573, 573, 573, 573, 117, 573, 573, 573, - /* 3110 */ 477, 122, 573, 453, 573, 455, 573, 573, 573, 573, - /* 3120 */ 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, - /* 3130 */ 573, 573, 573, 500, 573, 573, 503, 477, 392, 573, - /* 3140 */ 507, 508, 509, 510, 511, 512, 573, 573, 515, 516, - /* 3150 */ 517, 573, 573, 407, 573, 573, 573, 573, 392, 573, - /* 3160 */ 500, 573, 573, 503, 573, 573, 573, 507, 508, 509, - /* 3170 */ 510, 511, 512, 407, 573, 515, 516, 517, 189, 392, - /* 3180 */ 573, 573, 573, 437, 573, 573, 573, 198, 573, 573, - /* 3190 */ 573, 202, 203, 573, 407, 573, 573, 208, 209, 453, - /* 3200 */ 573, 455, 573, 437, 573, 573, 573, 573, 573, 573, - /* 3210 */ 573, 573, 573, 573, 573, 573, 227, 573, 573, 453, - /* 3220 */ 573, 455, 573, 477, 437, 573, 573, 573, 573, 573, - /* 3230 */ 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, - /* 3240 */ 453, 573, 455, 573, 573, 573, 500, 573, 573, 503, - /* 3250 */ 573, 573, 573, 507, 508, 509, 510, 511, 512, 573, - /* 3260 */ 573, 515, 516, 517, 573, 573, 500, 573, 573, 503, - /* 3270 */ 573, 573, 573, 507, 508, 509, 510, 511, 512, 573, - /* 3280 */ 573, 515, 516, 517, 573, 392, 573, 500, 573, 573, - /* 3290 */ 503, 573, 573, 573, 507, 508, 509, 510, 511, 512, - /* 3300 */ 407, 573, 515, 516, 517, 392, 573, 573, 573, 573, - /* 3310 */ 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, - /* 3320 */ 407, 573, 573, 573, 573, 392, 573, 573, 573, 573, - /* 3330 */ 437, 573, 573, 573, 573, 573, 573, 573, 573, 573, - /* 3340 */ 407, 573, 573, 573, 573, 573, 453, 573, 455, 573, - /* 3350 */ 437, 573, 573, 573, 573, 573, 573, 573, 573, 573, - /* 3360 */ 573, 573, 573, 573, 573, 573, 453, 573, 455, 573, - /* 3370 */ 437, 573, 573, 573, 573, 573, 573, 573, 573, 573, - /* 3380 */ 573, 573, 573, 573, 573, 573, 453, 573, 455, 573, - /* 3390 */ 573, 573, 573, 500, 573, 573, 503, 573, 573, 573, - /* 3400 */ 507, 508, 509, 510, 511, 512, 573, 573, 515, 516, - /* 3410 */ 517, 573, 392, 500, 573, 573, 503, 573, 573, 573, - /* 3420 */ 507, 508, 509, 510, 511, 512, 573, 407, 515, 516, - /* 3430 */ 517, 573, 573, 500, 573, 573, 503, 573, 392, 573, - /* 3440 */ 507, 508, 509, 510, 511, 512, 573, 573, 515, 516, - /* 3450 */ 517, 573, 573, 407, 573, 573, 573, 437, 573, 573, - /* 3460 */ 573, 392, 573, 573, 573, 573, 573, 573, 573, 573, - /* 3470 */ 573, 573, 573, 453, 573, 455, 407, 573, 573, 573, - /* 3480 */ 573, 392, 573, 437, 573, 573, 573, 573, 573, 573, - /* 3490 */ 573, 573, 573, 573, 573, 573, 407, 573, 573, 453, - /* 3500 */ 573, 455, 573, 392, 573, 573, 437, 573, 573, 573, - /* 3510 */ 573, 573, 573, 573, 573, 573, 573, 573, 407, 573, - /* 3520 */ 500, 573, 453, 503, 455, 573, 437, 507, 508, 509, - /* 3530 */ 510, 511, 512, 573, 573, 515, 516, 517, 573, 573, - /* 3540 */ 573, 573, 453, 573, 455, 573, 500, 573, 437, 503, - /* 3550 */ 573, 573, 573, 507, 508, 509, 510, 511, 512, 573, - /* 3560 */ 573, 515, 516, 517, 453, 573, 455, 573, 392, 500, - /* 3570 */ 573, 573, 503, 573, 573, 573, 507, 508, 509, 510, - /* 3580 */ 511, 512, 573, 407, 515, 516, 517, 392, 573, 500, - /* 3590 */ 573, 573, 503, 573, 573, 573, 507, 508, 509, 510, - /* 3600 */ 511, 512, 407, 573, 515, 516, 517, 573, 573, 392, - /* 3610 */ 573, 500, 573, 437, 503, 573, 573, 573, 507, 508, - /* 3620 */ 509, 510, 511, 512, 407, 573, 515, 516, 517, 453, - /* 3630 */ 573, 455, 437, 573, 573, 573, 573, 573, 573, 573, - /* 3640 */ 573, 573, 573, 573, 573, 573, 573, 573, 453, 573, - /* 3650 */ 455, 573, 573, 573, 437, 573, 573, 573, 573, 573, - /* 3660 */ 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, - /* 3670 */ 453, 573, 455, 573, 392, 573, 500, 573, 573, 503, - /* 3680 */ 573, 573, 573, 507, 508, 509, 510, 511, 512, 407, - /* 3690 */ 573, 515, 516, 517, 573, 500, 573, 573, 503, 573, - /* 3700 */ 573, 573, 507, 508, 509, 510, 511, 512, 573, 573, - /* 3710 */ 515, 516, 517, 573, 573, 573, 573, 500, 573, 437, - /* 3720 */ 503, 573, 573, 392, 507, 508, 509, 510, 511, 512, - /* 3730 */ 573, 573, 515, 516, 517, 453, 573, 455, 407, 573, - /* 3740 */ 573, 573, 573, 392, 573, 573, 573, 573, 573, 573, - /* 3750 */ 573, 573, 573, 573, 573, 573, 573, 573, 407, 573, - /* 3760 */ 573, 573, 573, 392, 573, 573, 573, 573, 437, 573, - /* 3770 */ 573, 573, 573, 573, 573, 573, 573, 573, 407, 573, - /* 3780 */ 573, 573, 500, 573, 453, 503, 455, 573, 437, 507, - /* 3790 */ 508, 509, 510, 511, 512, 573, 573, 515, 516, 517, - /* 3800 */ 573, 573, 573, 573, 453, 573, 455, 573, 437, 573, - /* 3810 */ 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, - /* 3820 */ 573, 573, 573, 573, 453, 573, 455, 573, 573, 573, - /* 3830 */ 573, 500, 573, 573, 503, 573, 573, 573, 507, 508, - /* 3840 */ 509, 510, 511, 512, 573, 573, 515, 516, 517, 573, - /* 3850 */ 392, 500, 573, 573, 503, 573, 573, 573, 507, 508, - /* 3860 */ 509, 510, 511, 512, 573, 407, 515, 516, 517, 392, - /* 3870 */ 573, 500, 573, 573, 503, 573, 573, 573, 507, 508, - /* 3880 */ 509, 510, 511, 512, 407, 573, 515, 516, 517, 392, - /* 3890 */ 573, 573, 573, 573, 573, 437, 573, 573, 573, 573, - /* 3900 */ 573, 573, 573, 573, 407, 573, 573, 573, 573, 573, - /* 3910 */ 573, 453, 573, 455, 437, 573, 573, 573, 573, 573, - /* 3920 */ 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, - /* 3930 */ 453, 573, 455, 573, 437, 573, 573, 573, 573, 573, - /* 3940 */ 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, - /* 3950 */ 453, 573, 455, 573, 573, 573, 392, 573, 500, 573, - /* 3960 */ 573, 503, 573, 573, 573, 507, 508, 509, 510, 511, - /* 3970 */ 512, 407, 573, 515, 516, 517, 392, 500, 573, 573, - /* 3980 */ 503, 573, 573, 573, 507, 508, 509, 510, 511, 512, - /* 3990 */ 573, 407, 515, 516, 517, 392, 573, 500, 573, 573, - /* 4000 */ 503, 437, 573, 573, 507, 508, 509, 510, 511, 512, - /* 4010 */ 407, 573, 515, 516, 517, 573, 573, 453, 573, 455, - /* 4020 */ 573, 437, 573, 573, 573, 573, 573, 573, 573, 573, - /* 4030 */ 573, 573, 573, 573, 573, 573, 573, 453, 573, 455, - /* 4040 */ 437, 573, 573, 573, 573, 573, 573, 573, 573, 573, - /* 4050 */ 573, 573, 573, 573, 573, 573, 453, 573, 455, 573, - /* 4060 */ 573, 573, 573, 392, 500, 573, 573, 503, 573, 573, - /* 4070 */ 573, 507, 508, 509, 510, 511, 512, 573, 407, 515, - /* 4080 */ 516, 517, 392, 573, 500, 573, 573, 503, 573, 573, - /* 4090 */ 573, 507, 508, 509, 510, 511, 512, 407, 573, 515, - /* 4100 */ 516, 517, 573, 500, 573, 573, 503, 573, 437, 573, - /* 4110 */ 507, 508, 509, 510, 511, 512, 573, 573, 515, 516, - /* 4120 */ 517, 573, 573, 573, 453, 573, 455, 437, 573, 573, - /* 4130 */ 573, 392, 573, 573, 573, 573, 573, 573, 573, 573, - /* 4140 */ 573, 573, 573, 453, 573, 455, 407, 573, 573, 573, - /* 4150 */ 573, 392, 573, 573, 573, 573, 573, 573, 573, 573, - /* 4160 */ 573, 573, 573, 573, 573, 573, 407, 573, 573, 573, - /* 4170 */ 573, 500, 573, 573, 503, 573, 437, 573, 507, 508, - /* 4180 */ 509, 510, 511, 512, 573, 573, 515, 516, 517, 573, - /* 4190 */ 500, 573, 453, 503, 455, 573, 437, 507, 508, 509, - /* 4200 */ 510, 511, 512, 573, 573, 515, 516, 517, 573, 573, - /* 4210 */ 573, 573, 453, 573, 455, 573, 573, 573, 573, 392, - /* 4220 */ 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, - /* 4230 */ 573, 573, 573, 573, 407, 573, 573, 573, 573, 500, - /* 4240 */ 573, 573, 503, 392, 573, 573, 507, 508, 509, 510, - /* 4250 */ 511, 512, 573, 573, 515, 516, 517, 573, 407, 500, - /* 4260 */ 573, 573, 503, 573, 437, 573, 507, 508, 509, 510, - /* 4270 */ 511, 512, 573, 573, 515, 516, 517, 573, 573, 573, - /* 4280 */ 453, 573, 455, 573, 573, 573, 573, 573, 437, 573, - /* 4290 */ 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, - /* 4300 */ 573, 573, 573, 573, 453, 573, 455, 573, 573, 573, - /* 4310 */ 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, - /* 4320 */ 573, 573, 573, 573, 573, 392, 573, 500, 573, 573, - /* 4330 */ 503, 573, 573, 573, 507, 508, 509, 510, 511, 512, - /* 4340 */ 407, 573, 515, 516, 517, 573, 573, 573, 573, 392, - /* 4350 */ 573, 500, 573, 573, 503, 573, 573, 573, 507, 508, - /* 4360 */ 509, 510, 511, 512, 407, 573, 515, 516, 517, 573, - /* 4370 */ 437, 573, 573, 573, 573, 573, 573, 573, 573, 573, - /* 4380 */ 573, 573, 573, 573, 573, 573, 453, 573, 455, 573, - /* 4390 */ 573, 573, 573, 573, 437, 573, 573, 573, 573, 573, - /* 4400 */ 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, - /* 4410 */ 453, 573, 455, 573, 573, 573, 573, 573, 573, 573, - /* 4420 */ 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, - /* 4430 */ 573, 573, 573, 500, 573, 573, 503, 573, 573, 573, - /* 4440 */ 507, 508, 509, 510, 511, 512, 573, 573, 515, 516, - /* 4450 */ 517, 573, 573, 573, 573, 573, 573, 500, 573, 573, - /* 4460 */ 503, 573, 573, 573, 507, 508, 509, 510, 511, 512, - /* 4470 */ 573, 573, 515, 516, 517, 389, 389, 389, 389, 389, - /* 4480 */ 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, - /* 4490 */ 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, - /* 4500 */ 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, - /* 4510 */ 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, - /* 4520 */ 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, - /* 4530 */ 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, - /* 4540 */ 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, - /* 4550 */ 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, - /* 4560 */ 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, - /* 4570 */ 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, + /* 2210 */ 270, 271, 272, 118, 274, 275, 276, 277, 278, 413, + /* 2220 */ 397, 453, 282, 283, 284, 285, 286, 287, 288, 12, + /* 2230 */ 13, 453, 453, 398, 453, 500, 40, 20, 503, 22, + /* 2240 */ 453, 400, 507, 508, 509, 510, 511, 512, 453, 453, + /* 2250 */ 515, 516, 517, 36, 453, 38, 399, 522, 483, 524, + /* 2260 */ 439, 429, 499, 528, 529, 474, 492, 474, 429, 439, + /* 2270 */ 414, 429, 390, 0, 0, 0, 47, 0, 392, 246, + /* 2280 */ 36, 38, 36, 36, 36, 246, 0, 36, 71, 36, + /* 2290 */ 246, 74, 0, 407, 36, 0, 79, 54, 246, 0, + /* 2300 */ 57, 36, 0, 36, 0, 22, 89, 0, 36, 66, + /* 2310 */ 67, 68, 69, 241, 71, 220, 0, 222, 228, 0, + /* 2320 */ 229, 228, 222, 437, 220, 0, 0, 0, 216, 215, + /* 2330 */ 0, 0, 162, 51, 0, 118, 51, 36, 0, 453, + /* 2340 */ 0, 455, 36, 0, 57, 51, 0, 47, 0, 0, + /* 2350 */ 255, 256, 0, 0, 51, 0, 0, 0, 0, 0, + /* 2360 */ 180, 0, 180, 120, 36, 0, 123, 0, 0, 274, + /* 2370 */ 275, 0, 0, 156, 157, 0, 0, 282, 283, 284, + /* 2380 */ 285, 286, 287, 0, 0, 0, 500, 0, 0, 503, + /* 2390 */ 0, 0, 0, 507, 508, 509, 510, 511, 512, 0, + /* 2400 */ 0, 515, 516, 517, 392, 0, 0, 0, 0, 47, + /* 2410 */ 524, 51, 195, 196, 528, 529, 22, 0, 0, 407, + /* 2420 */ 0, 0, 205, 206, 0, 0, 0, 0, 0, 0, + /* 2430 */ 0, 0, 162, 190, 0, 0, 160, 220, 52, 222, + /* 2440 */ 161, 0, 199, 0, 227, 79, 203, 204, 78, 437, + /* 2450 */ 52, 0, 209, 210, 22, 22, 0, 0, 36, 0, + /* 2460 */ 71, 0, 0, 44, 71, 453, 71, 455, 57, 0, + /* 2470 */ 57, 228, 255, 256, 257, 36, 259, 260, 261, 262, + /* 2480 */ 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, + /* 2490 */ 36, 274, 275, 276, 277, 278, 1, 44, 0, 282, + /* 2500 */ 283, 284, 285, 286, 287, 288, 36, 57, 44, 0, + /* 2510 */ 36, 0, 500, 0, 19, 503, 56, 0, 36, 507, + /* 2520 */ 508, 509, 510, 511, 512, 47, 33, 515, 516, 517, + /* 2530 */ 44, 51, 14, 38, 51, 392, 524, 0, 51, 45, + /* 2540 */ 528, 529, 0, 44, 0, 0, 0, 211, 53, 54, + /* 2550 */ 407, 44, 57, 0, 0, 51, 51, 0, 0, 392, + /* 2560 */ 83, 66, 67, 68, 69, 0, 71, 0, 36, 57, + /* 2570 */ 44, 0, 36, 57, 407, 44, 0, 36, 57, 44, + /* 2580 */ 437, 0, 57, 36, 44, 0, 0, 0, 0, 0, + /* 2590 */ 0, 36, 0, 127, 129, 36, 453, 22, 455, 0, + /* 2600 */ 22, 33, 36, 0, 437, 36, 36, 0, 36, 36, + /* 2610 */ 36, 0, 33, 36, 0, 120, 36, 22, 123, 36, + /* 2620 */ 453, 59, 455, 22, 22, 0, 22, 36, 22, 36, + /* 2630 */ 36, 0, 36, 0, 36, 0, 36, 0, 0, 22, + /* 2640 */ 20, 36, 79, 500, 477, 36, 503, 0, 392, 154, + /* 2650 */ 507, 508, 509, 510, 511, 512, 233, 36, 515, 516, + /* 2660 */ 517, 79, 36, 407, 80, 197, 51, 500, 232, 227, + /* 2670 */ 503, 0, 197, 22, 507, 508, 509, 510, 511, 512, + /* 2680 */ 0, 36, 515, 516, 517, 22, 223, 197, 203, 0, + /* 2690 */ 0, 207, 33, 437, 199, 207, 201, 197, 197, 204, + /* 2700 */ 3, 79, 36, 80, 209, 36, 79, 22, 80, 453, + /* 2710 */ 80, 455, 569, 570, 318, 79, 392, 52, 79, 52, + /* 2720 */ 80, 33, 80, 228, 33, 79, 33, 119, 79, 117, + /* 2730 */ 80, 407, 79, 51, 79, 51, 33, 89, 80, 33, + /* 2740 */ 79, 36, 80, 392, 3, 33, 36, 36, 80, 36, + /* 2750 */ 36, 36, 36, 80, 80, 318, 500, 302, 407, 503, + /* 2760 */ 51, 437, 318, 507, 508, 509, 510, 511, 512, 33, + /* 2770 */ 51, 515, 516, 517, 0, 0, 80, 453, 79, 455, + /* 2780 */ 80, 44, 0, 79, 44, 0, 79, 79, 437, 44, + /* 2790 */ 33, 119, 290, 2, 119, 22, 79, 200, 80, 79, + /* 2800 */ 79, 477, 79, 255, 453, 79, 455, 79, 392, 80, + /* 2810 */ 200, 80, 79, 79, 558, 199, 51, 204, 79, 51, + /* 2820 */ 22, 79, 79, 407, 500, 0, 80, 503, 477, 79, + /* 2830 */ 392, 507, 508, 509, 510, 511, 512, 79, 79, 515, + /* 2840 */ 516, 517, 80, 79, 44, 407, 80, 0, 79, 79, + /* 2850 */ 22, 500, 200, 437, 503, 79, 121, 51, 507, 508, + /* 2860 */ 509, 510, 511, 512, 80, 79, 515, 516, 517, 453, + /* 2870 */ 122, 455, 79, 392, 79, 437, 258, 130, 79, 22, + /* 2880 */ 36, 80, 36, 79, 36, 80, 79, 233, 407, 36, + /* 2890 */ 80, 453, 80, 455, 36, 392, 80, 36, 80, 36, + /* 2900 */ 79, 141, 141, 33, 141, 79, 79, 36, 141, 22, + /* 2910 */ 407, 22, 22, 83, 82, 36, 500, 36, 437, 503, + /* 2920 */ 36, 36, 392, 507, 508, 509, 510, 511, 512, 36, + /* 2930 */ 89, 515, 516, 517, 453, 36, 455, 407, 500, 36, + /* 2940 */ 437, 503, 36, 36, 36, 507, 508, 509, 510, 511, + /* 2950 */ 512, 36, 115, 515, 516, 517, 453, 89, 455, 33, + /* 2960 */ 115, 36, 22, 36, 36, 36, 36, 437, 36, 89, + /* 2970 */ 36, 36, 36, 36, 36, 22, 0, 561, 36, 36, + /* 2980 */ 477, 500, 0, 453, 503, 455, 0, 36, 507, 508, + /* 2990 */ 509, 510, 511, 512, 44, 0, 515, 516, 517, 44, + /* 3000 */ 519, 57, 57, 500, 36, 57, 503, 477, 570, 44, + /* 3010 */ 507, 508, 509, 510, 511, 512, 36, 57, 515, 516, + /* 3020 */ 517, 44, 0, 36, 0, 22, 0, 22, 36, 0, + /* 3030 */ 500, 22, 33, 503, 36, 22, 392, 507, 508, 509, + /* 3040 */ 510, 511, 512, 36, 21, 515, 516, 517, 573, 22, + /* 3050 */ 22, 407, 21, 20, 573, 573, 392, 573, 573, 573, + /* 3060 */ 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, + /* 3070 */ 573, 407, 573, 573, 573, 392, 573, 573, 573, 573, + /* 3080 */ 573, 437, 573, 573, 573, 573, 573, 573, 573, 573, + /* 3090 */ 407, 573, 573, 573, 573, 573, 573, 453, 573, 455, + /* 3100 */ 573, 437, 573, 573, 573, 573, 573, 573, 573, 573, + /* 3110 */ 573, 573, 573, 573, 573, 573, 573, 453, 573, 455, + /* 3120 */ 437, 477, 573, 573, 392, 573, 573, 573, 573, 573, + /* 3130 */ 573, 573, 573, 573, 573, 573, 453, 573, 455, 407, + /* 3140 */ 573, 477, 573, 573, 500, 573, 573, 503, 573, 573, + /* 3150 */ 573, 507, 508, 509, 510, 511, 512, 573, 573, 515, + /* 3160 */ 516, 517, 573, 573, 500, 573, 573, 503, 573, 437, + /* 3170 */ 573, 507, 508, 509, 510, 511, 512, 573, 573, 515, + /* 3180 */ 516, 517, 573, 500, 573, 453, 503, 455, 573, 573, + /* 3190 */ 507, 508, 509, 510, 511, 512, 573, 573, 515, 516, + /* 3200 */ 517, 392, 573, 573, 573, 573, 573, 573, 573, 573, + /* 3210 */ 573, 573, 573, 573, 573, 573, 407, 573, 573, 573, + /* 3220 */ 573, 392, 573, 573, 573, 573, 573, 573, 573, 573, + /* 3230 */ 573, 573, 500, 573, 573, 503, 407, 573, 573, 507, + /* 3240 */ 508, 509, 510, 511, 512, 573, 437, 515, 516, 517, + /* 3250 */ 573, 573, 392, 573, 573, 573, 573, 573, 573, 573, + /* 3260 */ 573, 573, 453, 573, 455, 573, 437, 407, 573, 573, + /* 3270 */ 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, + /* 3280 */ 573, 573, 453, 573, 455, 573, 392, 573, 573, 573, + /* 3290 */ 573, 573, 573, 573, 573, 573, 573, 437, 573, 573, + /* 3300 */ 573, 407, 573, 573, 573, 573, 573, 573, 573, 500, + /* 3310 */ 573, 573, 503, 453, 573, 455, 507, 508, 509, 510, + /* 3320 */ 511, 512, 573, 573, 515, 516, 517, 573, 573, 500, + /* 3330 */ 573, 437, 503, 573, 573, 573, 507, 508, 509, 510, + /* 3340 */ 511, 512, 573, 573, 515, 516, 517, 453, 573, 455, + /* 3350 */ 573, 392, 573, 573, 573, 573, 573, 573, 573, 573, + /* 3360 */ 500, 573, 573, 503, 573, 573, 407, 507, 508, 509, + /* 3370 */ 510, 511, 512, 392, 573, 515, 516, 517, 573, 573, + /* 3380 */ 573, 573, 573, 573, 573, 573, 573, 573, 407, 573, + /* 3390 */ 573, 573, 573, 392, 500, 573, 437, 503, 573, 573, + /* 3400 */ 573, 507, 508, 509, 510, 511, 512, 573, 407, 515, + /* 3410 */ 516, 517, 453, 573, 455, 573, 573, 573, 437, 573, + /* 3420 */ 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, + /* 3430 */ 573, 573, 573, 573, 453, 573, 455, 573, 437, 573, + /* 3440 */ 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, + /* 3450 */ 573, 573, 573, 573, 453, 573, 455, 573, 573, 500, + /* 3460 */ 573, 573, 503, 573, 573, 573, 507, 508, 509, 510, + /* 3470 */ 511, 512, 573, 573, 515, 516, 517, 573, 573, 573, + /* 3480 */ 573, 500, 573, 573, 503, 573, 573, 573, 507, 508, + /* 3490 */ 509, 510, 511, 512, 573, 573, 515, 516, 517, 573, + /* 3500 */ 573, 500, 573, 573, 503, 573, 573, 573, 507, 508, + /* 3510 */ 509, 510, 511, 512, 392, 573, 515, 516, 517, 573, + /* 3520 */ 573, 573, 573, 573, 573, 573, 573, 573, 573, 407, + /* 3530 */ 573, 573, 573, 573, 392, 573, 573, 573, 573, 573, + /* 3540 */ 573, 573, 573, 573, 573, 573, 573, 573, 573, 407, + /* 3550 */ 573, 573, 573, 392, 573, 573, 573, 573, 573, 437, + /* 3560 */ 573, 573, 573, 573, 573, 573, 573, 573, 407, 573, + /* 3570 */ 573, 573, 573, 573, 573, 453, 573, 455, 573, 437, + /* 3580 */ 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, + /* 3590 */ 573, 573, 573, 573, 573, 453, 573, 455, 437, 573, + /* 3600 */ 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, + /* 3610 */ 573, 573, 573, 573, 453, 573, 455, 573, 573, 573, + /* 3620 */ 573, 573, 500, 573, 573, 503, 573, 573, 573, 507, + /* 3630 */ 508, 509, 510, 511, 512, 573, 573, 515, 516, 517, + /* 3640 */ 392, 573, 500, 573, 573, 503, 573, 573, 573, 507, + /* 3650 */ 508, 509, 510, 511, 512, 407, 573, 515, 516, 517, + /* 3660 */ 392, 500, 573, 573, 503, 573, 573, 573, 507, 508, + /* 3670 */ 509, 510, 511, 512, 573, 407, 515, 516, 517, 392, + /* 3680 */ 573, 573, 573, 573, 573, 437, 573, 573, 573, 573, + /* 3690 */ 573, 573, 573, 573, 407, 573, 573, 573, 573, 573, + /* 3700 */ 573, 453, 573, 455, 573, 437, 573, 573, 573, 573, + /* 3710 */ 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, + /* 3720 */ 573, 453, 573, 455, 437, 573, 573, 573, 573, 573, + /* 3730 */ 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, + /* 3740 */ 453, 573, 455, 573, 573, 573, 573, 573, 500, 573, + /* 3750 */ 573, 503, 573, 573, 573, 507, 508, 509, 510, 511, + /* 3760 */ 512, 573, 573, 515, 516, 517, 392, 573, 500, 573, + /* 3770 */ 573, 503, 573, 573, 573, 507, 508, 509, 510, 511, + /* 3780 */ 512, 407, 573, 515, 516, 517, 392, 500, 573, 573, + /* 3790 */ 503, 573, 573, 573, 507, 508, 509, 510, 511, 512, + /* 3800 */ 573, 407, 515, 516, 517, 392, 573, 573, 573, 573, + /* 3810 */ 573, 437, 573, 573, 573, 573, 573, 573, 573, 573, + /* 3820 */ 407, 573, 573, 573, 573, 573, 573, 453, 573, 455, + /* 3830 */ 573, 437, 573, 573, 573, 573, 573, 573, 573, 573, + /* 3840 */ 573, 573, 573, 573, 573, 573, 573, 453, 573, 455, + /* 3850 */ 437, 573, 573, 573, 573, 573, 573, 573, 573, 573, + /* 3860 */ 573, 573, 573, 573, 573, 573, 453, 573, 455, 573, + /* 3870 */ 573, 573, 573, 573, 500, 573, 573, 503, 573, 573, + /* 3880 */ 573, 507, 508, 509, 510, 511, 512, 573, 573, 515, + /* 3890 */ 516, 517, 573, 573, 500, 573, 573, 503, 573, 573, + /* 3900 */ 573, 507, 508, 509, 510, 511, 512, 573, 573, 515, + /* 3910 */ 516, 517, 573, 500, 573, 573, 503, 573, 573, 573, + /* 3920 */ 507, 508, 509, 510, 511, 512, 573, 392, 515, 516, + /* 3930 */ 517, 573, 573, 573, 573, 573, 573, 573, 573, 573, + /* 3940 */ 573, 573, 407, 573, 573, 573, 392, 573, 573, 573, + /* 3950 */ 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, + /* 3960 */ 573, 407, 573, 573, 573, 573, 573, 573, 392, 573, + /* 3970 */ 573, 573, 437, 573, 573, 573, 573, 573, 573, 573, + /* 3980 */ 573, 573, 573, 407, 573, 573, 573, 573, 453, 573, + /* 3990 */ 455, 437, 573, 573, 573, 573, 573, 573, 573, 573, + /* 4000 */ 573, 573, 573, 573, 573, 573, 573, 453, 573, 455, + /* 4010 */ 573, 573, 573, 437, 573, 573, 573, 573, 573, 573, + /* 4020 */ 573, 573, 573, 573, 573, 573, 573, 573, 573, 453, + /* 4030 */ 573, 455, 573, 392, 573, 500, 573, 573, 503, 573, + /* 4040 */ 573, 573, 507, 508, 509, 510, 511, 512, 407, 573, + /* 4050 */ 515, 516, 517, 392, 500, 573, 573, 503, 573, 573, + /* 4060 */ 573, 507, 508, 509, 510, 511, 512, 573, 407, 515, + /* 4070 */ 516, 517, 573, 573, 573, 573, 500, 573, 437, 503, + /* 4080 */ 573, 573, 573, 507, 508, 509, 510, 511, 512, 573, + /* 4090 */ 573, 515, 516, 517, 453, 573, 455, 573, 437, 573, + /* 4100 */ 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, + /* 4110 */ 573, 573, 573, 573, 453, 573, 455, 573, 573, 573, + /* 4120 */ 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, + /* 4130 */ 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, + /* 4140 */ 573, 500, 573, 573, 503, 573, 573, 573, 507, 508, + /* 4150 */ 509, 510, 511, 512, 573, 573, 515, 516, 517, 392, + /* 4160 */ 573, 500, 573, 573, 503, 573, 573, 573, 507, 508, + /* 4170 */ 509, 510, 511, 512, 407, 573, 515, 516, 517, 392, + /* 4180 */ 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, + /* 4190 */ 573, 573, 573, 573, 407, 573, 573, 573, 392, 573, + /* 4200 */ 573, 573, 573, 573, 437, 573, 573, 573, 573, 573, + /* 4210 */ 573, 573, 573, 407, 573, 573, 573, 573, 573, 573, + /* 4220 */ 453, 573, 455, 573, 437, 573, 573, 573, 573, 573, + /* 4230 */ 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, + /* 4240 */ 453, 573, 455, 437, 573, 573, 573, 573, 573, 573, + /* 4250 */ 573, 573, 573, 573, 573, 573, 573, 573, 573, 453, + /* 4260 */ 573, 455, 573, 573, 573, 573, 573, 500, 573, 573, + /* 4270 */ 503, 573, 573, 573, 507, 508, 509, 510, 511, 512, + /* 4280 */ 573, 573, 515, 516, 517, 573, 573, 500, 573, 573, + /* 4290 */ 503, 573, 573, 573, 507, 508, 509, 510, 511, 512, + /* 4300 */ 573, 573, 515, 516, 517, 573, 500, 573, 573, 503, + /* 4310 */ 573, 573, 573, 507, 508, 509, 510, 511, 512, 573, + /* 4320 */ 392, 515, 516, 517, 573, 573, 573, 573, 573, 573, + /* 4330 */ 573, 573, 573, 573, 573, 407, 573, 573, 573, 392, + /* 4340 */ 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, + /* 4350 */ 573, 573, 573, 573, 407, 573, 573, 573, 573, 573, + /* 4360 */ 573, 392, 573, 573, 573, 437, 573, 573, 573, 573, + /* 4370 */ 573, 573, 573, 573, 573, 573, 407, 573, 573, 573, + /* 4380 */ 573, 453, 573, 455, 437, 573, 573, 573, 573, 573, + /* 4390 */ 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, + /* 4400 */ 453, 573, 455, 573, 573, 573, 437, 573, 573, 573, + /* 4410 */ 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, + /* 4420 */ 573, 573, 453, 573, 455, 573, 392, 573, 500, 573, + /* 4430 */ 573, 503, 573, 573, 573, 507, 508, 509, 510, 511, + /* 4440 */ 512, 407, 573, 515, 516, 517, 392, 500, 573, 573, + /* 4450 */ 503, 573, 573, 573, 507, 508, 509, 510, 511, 512, + /* 4460 */ 573, 407, 515, 516, 517, 573, 573, 573, 573, 500, + /* 4470 */ 573, 437, 503, 573, 573, 573, 507, 508, 509, 510, + /* 4480 */ 511, 512, 573, 573, 515, 516, 517, 453, 573, 455, + /* 4490 */ 573, 437, 573, 573, 573, 573, 573, 573, 573, 573, + /* 4500 */ 573, 573, 573, 573, 573, 573, 573, 453, 573, 455, + /* 4510 */ 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, + /* 4520 */ 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, + /* 4530 */ 573, 573, 573, 573, 500, 573, 573, 503, 573, 573, + /* 4540 */ 573, 507, 508, 509, 510, 511, 512, 573, 573, 515, + /* 4550 */ 516, 517, 573, 573, 500, 573, 573, 503, 573, 573, + /* 4560 */ 573, 507, 508, 509, 510, 511, 512, 573, 573, 515, + /* 4570 */ 516, 517, 389, 389, 389, 389, 389, 389, 389, 389, /* 4580 */ 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, /* 4590 */ 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, /* 4600 */ 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, @@ -1160,266 +1557,278 @@ static const YYCODETYPE yy_lookahead[] = { /* 4830 */ 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, /* 4840 */ 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, /* 4850 */ 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, - /* 4860 */ 389, 389, 389, 389, + /* 4860 */ 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, + /* 4870 */ 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, + /* 4880 */ 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, + /* 4890 */ 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, + /* 4900 */ 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, + /* 4910 */ 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, + /* 4920 */ 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, + /* 4930 */ 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, + /* 4940 */ 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, + /* 4950 */ 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, + /* 4960 */ 389, }; -#define YY_SHIFT_COUNT (1025) +#define YY_SHIFT_COUNT (1032) #define YY_SHIFT_MIN (0) -#define YY_SHIFT_MAX (2989) +#define YY_SHIFT_MAX (3033) static const unsigned short int yy_shift_ofst[] = { - /* 0 */ 948, 277, 554, 277, 832, 832, 832, 832, 832, 832, + /* 0 */ 448, 277, 554, 277, 832, 832, 832, 832, 832, 832, /* 10 */ 832, 832, 832, 832, 832, 832, 1109, 1940, 1940, 2217, /* 20 */ 0, 1386, 1940, 1940, 1940, 1940, 1940, 1940, 1940, 1940, /* 30 */ 1940, 1940, 1663, 1940, 1940, 1940, 1940, 1940, 1940, 1940, /* 40 */ 1940, 1940, 1940, 1940, 1940, 1940, 1940, 1940, 1940, 1940, /* 50 */ 1940, 1940, 1940, 1940, 1940, 1940, 1940, 1940, 1940, 1940, - /* 60 */ 1940, 1940, 1940, 66, 482, 455, 198, 90, 122, 90, - /* 70 */ 90, 198, 198, 90, 960, 90, 276, 960, 313, 90, - /* 80 */ 89, 2315, 156, 156, 149, 149, 2315, 2315, 598, 598, - /* 90 */ 156, 377, 377, 443, 487, 487, 178, 37, 149, 149, - /* 100 */ 149, 149, 149, 149, 149, 149, 149, 149, 149, 180, - /* 110 */ 225, 429, 149, 149, 387, 89, 149, 180, 149, 89, - /* 120 */ 149, 149, 149, 149, 89, 149, 149, 149, 89, 149, - /* 130 */ 89, 89, 89, 427, 222, 222, 473, 473, 745, 652, - /* 140 */ 181, 51, 548, 548, 548, 548, 548, 548, 548, 548, - /* 150 */ 548, 548, 548, 548, 548, 548, 548, 548, 548, 548, - /* 160 */ 548, 1858, 200, 377, 443, 702, 702, 823, 768, 768, - /* 170 */ 768, 708, 708, 1354, 661, 823, 387, 89, 596, 89, - /* 180 */ 89, 366, 89, 89, 658, 89, 658, 658, 704, 747, - /* 190 */ 2488, 473, 473, 473, 473, 473, 473, 1190, 21, 53, - /* 200 */ 411, 411, 81, 148, 23, 606, 152, 545, 213, 333, - /* 210 */ 414, 414, 1062, 757, 1182, 1182, 1182, 1229, 1182, 815, - /* 220 */ 1037, 957, 1272, 1439, 1310, 476, 374, 374, 1254, 1297, - /* 230 */ 1297, 354, 1462, 1256, 374, 661, 1496, 1768, 1809, 1814, - /* 240 */ 1601, 387, 1814, 387, 1623, 1809, 1839, 1816, 1839, 1816, - /* 250 */ 1685, 1809, 1839, 1809, 1816, 1685, 1685, 1685, 1782, 1788, - /* 260 */ 1809, 1809, 1793, 1809, 1809, 1809, 1892, 1862, 1892, 1862, - /* 270 */ 1814, 387, 387, 1922, 387, 1936, 1938, 387, 1936, 387, - /* 280 */ 1946, 387, 1949, 387, 387, 1918, 1918, 1809, 387, 1892, - /* 290 */ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, - /* 300 */ 89, 1809, 747, 747, 1892, 658, 658, 658, 1760, 1889, - /* 310 */ 1814, 427, 1992, 1811, 1810, 1922, 427, 1496, 1809, 658, - /* 320 */ 1715, 1722, 1715, 1722, 1721, 1841, 1715, 1725, 1731, 1750, - /* 330 */ 1496, 1757, 1764, 1734, 1740, 1746, 1839, 2067, 1959, 1786, - /* 340 */ 1936, 427, 427, 1722, 658, 658, 658, 658, 1722, 658, - /* 350 */ 1929, 427, 658, 1949, 427, 2022, 658, 1945, 1949, 427, - /* 360 */ 704, 427, 1839, 658, 658, 658, 658, 658, 658, 658, - /* 370 */ 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, - /* 380 */ 658, 658, 658, 658, 658, 2044, 658, 1809, 427, 2146, - /* 390 */ 2148, 2147, 2150, 1892, 4475, 4475, 4475, 4475, 4475, 4475, - /* 400 */ 4475, 4475, 4475, 4475, 4475, 4475, 39, 2989, 298, 1146, - /* 410 */ 1193, 1243, 1425, 1711, 715, 1434, 1560, 1570, 1124, 497, - /* 420 */ 770, 1584, 1542, 1861, 1878, 1699, 1808, 1004, 1169, 1026, - /* 430 */ 1026, 1026, 1026, 1026, 1026, 1026, 1026, 1026, 237, 150, - /* 440 */ 992, 813, 3, 3, 343, 106, 321, 182, 370, 646, - /* 450 */ 420, 378, 1011, 124, 751, 751, 1063, 1081, 1138, 1063, - /* 460 */ 1063, 1063, 530, 334, 1395, 1456, 1488, 921, 1349, 1469, - /* 470 */ 5, 794, 1350, 1486, 1403, 1405, 1486, 1422, 882, 1526, - /* 480 */ 1527, 1538, 1610, 1611, 1636, 1088, 1445, 1489, 179, 1519, - /* 490 */ 1561, 1562, 1569, 1391, 1466, 1470, 1500, 1587, 1633, 1634, - /* 500 */ 1564, 1645, 1492, 1571, 1653, 1658, 1575, 1667, 1671, 1708, - /* 510 */ 1709, 1712, 1612, 1683, 1718, 1720, 1723, 1737, 1742, 1744, - /* 520 */ 1747, 1749, 1755, 1696, 1486, 1730, 1736, 1743, 1766, 1778, - /* 530 */ 1483, 1552, 335, 1476, 1738, 1762, 1748, 1135, 2257, 2258, - /* 540 */ 2259, 2213, 2261, 2226, 2018, 2228, 2231, 2232, 2020, 2269, - /* 550 */ 2234, 2235, 2027, 2237, 2274, 2275, 2031, 2277, 2242, 2279, - /* 560 */ 2244, 2281, 2260, 2283, 2248, 2045, 2286, 2060, 2289, 2063, - /* 570 */ 2064, 2072, 2075, 2295, 2297, 2298, 2084, 2086, 2301, 2303, - /* 580 */ 2143, 2254, 2255, 2307, 2272, 2309, 2310, 2280, 2256, 2311, - /* 590 */ 2264, 2317, 2271, 2319, 2320, 2321, 2273, 2322, 2323, 2325, - /* 600 */ 2326, 2329, 2330, 2152, 2300, 2334, 2159, 2339, 2340, 2341, - /* 610 */ 2342, 2343, 2344, 2345, 2346, 2347, 2349, 2350, 2352, 2354, - /* 620 */ 2355, 2356, 2357, 2358, 2360, 2361, 2363, 2313, 2365, 2332, - /* 630 */ 2377, 2380, 2382, 2384, 2385, 2389, 2390, 2391, 2392, 2393, - /* 640 */ 2373, 2397, 2238, 2398, 2240, 2401, 2243, 2403, 2404, 2383, - /* 650 */ 2362, 2386, 2364, 2406, 2336, 2409, 2348, 2374, 2413, 2353, - /* 660 */ 2415, 2359, 2417, 2418, 2387, 2368, 2376, 2426, 2395, 2370, - /* 670 */ 2388, 2428, 2399, 2372, 2396, 2433, 2410, 2434, 2381, 2439, - /* 680 */ 2411, 2442, 2407, 2416, 2422, 2394, 2408, 2447, 2423, 2462, - /* 690 */ 2419, 2424, 2466, 2467, 2490, 2496, 2453, 2288, 2506, 2394, - /* 700 */ 2457, 2509, 2394, 2459, 2511, 2512, 2435, 2513, 2516, 2481, - /* 710 */ 2461, 2475, 2520, 2485, 2465, 2479, 2524, 2489, 2470, 2484, - /* 720 */ 2529, 2495, 2476, 2491, 2532, 2537, 2538, 2539, 2540, 2507, - /* 730 */ 2544, 2546, 2420, 2421, 2514, 2527, 2551, 2530, 2517, 2522, - /* 740 */ 2525, 2526, 2528, 2534, 2535, 2536, 2541, 2533, 2542, 2543, - /* 750 */ 2545, 2552, 2547, 2563, 2558, 2565, 2560, 2573, 2562, 2548, - /* 760 */ 2585, 2564, 2555, 2587, 2588, 2592, 2557, 2594, 2559, 2596, - /* 770 */ 2567, 2604, 2584, 2589, 2572, 2575, 2576, 2494, 2497, 2614, - /* 780 */ 2429, 2405, 2414, 2498, 2402, 2394, 2566, 2618, 2431, 2583, - /* 790 */ 2598, 2622, 2425, 2602, 2446, 2427, 2643, 2646, 2452, 2443, - /* 800 */ 2454, 2445, 2649, 2620, 2337, 2549, 2550, 2553, 2554, 2632, - /* 810 */ 2556, 2561, 2621, 2624, 2569, 2606, 2574, 2609, 2571, 2578, - /* 820 */ 2623, 2629, 2579, 2577, 2581, 2582, 2590, 2630, 2613, 2617, - /* 830 */ 2586, 2637, 2400, 2580, 2591, 2639, 2593, 2640, 2595, 2597, - /* 840 */ 2672, 2644, 2430, 2642, 2645, 2647, 2658, 2665, 2666, 2600, - /* 850 */ 2603, 2628, 2432, 2670, 2657, 2712, 2713, 2599, 2677, 2605, - /* 860 */ 2607, 2610, 2612, 2601, 2615, 2723, 2681, 2570, 2727, 2631, - /* 870 */ 2625, 2608, 2687, 2611, 2709, 2635, 2463, 2638, 2745, 2734, - /* 880 */ 2503, 2648, 2652, 2654, 2656, 2659, 2661, 2663, 2667, 2669, - /* 890 */ 2671, 2673, 2674, 2675, 2698, 2678, 2679, 2707, 2676, 2753, - /* 900 */ 2519, 2680, 2683, 2778, 2684, 2688, 2616, 2735, 2690, 2664, - /* 910 */ 2788, 2768, 2691, 2693, 2394, 2742, 2695, 2696, 2699, 2702, - /* 920 */ 2703, 2694, 2777, 2619, 2705, 2781, 2786, 2708, 2706, 2791, - /* 930 */ 2711, 2714, 2794, 2667, 2722, 2806, 2669, 2728, 2810, 2671, - /* 940 */ 2729, 2814, 2673, 2662, 2715, 2717, 2718, 2736, 2819, 2741, - /* 950 */ 2817, 2743, 2819, 2819, 2838, 2783, 2785, 2842, 2844, 2832, - /* 960 */ 2834, 2835, 2836, 2837, 2839, 2840, 2841, 2845, 2847, 2849, - /* 970 */ 2789, 2790, 2793, 2792, 2860, 2861, 2862, 2863, 2858, 2864, - /* 980 */ 2865, 2867, 2820, 2533, 2870, 2542, 2872, 2873, 2874, 2875, - /* 990 */ 2891, 2880, 2917, 2882, 2868, 2887, 2926, 2897, 2877, 2892, - /* 1000 */ 2935, 2902, 2883, 2895, 2941, 2906, 2886, 2900, 2945, 2910, - /* 1010 */ 2947, 2927, 2948, 2928, 2915, 2952, 2932, 2923, 2921, 2922, - /* 1020 */ 2937, 2940, 2942, 2943, 2946, 2949, + /* 60 */ 1940, 1940, 1940, 74, 194, 351, 440, 449, 471, 449, + /* 70 */ 449, 440, 440, 449, 2095, 449, 276, 2095, 334, 449, + /* 80 */ 643, 1216, 412, 412, 674, 674, 1216, 1216, 625, 625, + /* 90 */ 412, 30, 30, 92, 325, 325, 278, 571, 674, 674, + /* 100 */ 674, 674, 674, 674, 674, 674, 674, 674, 674, 689, + /* 110 */ 921, 1010, 674, 674, 255, 643, 674, 689, 674, 643, + /* 120 */ 674, 674, 674, 674, 643, 674, 674, 674, 643, 674, + /* 130 */ 643, 643, 643, 699, 1700, 1700, 97, 97, 236, 1433, + /* 140 */ 14, 583, 679, 679, 679, 679, 679, 679, 679, 679, + /* 150 */ 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, + /* 160 */ 679, 360, 780, 30, 92, 995, 995, 838, 494, 494, + /* 170 */ 494, 879, 879, 436, 895, 838, 255, 643, 1090, 643, + /* 180 */ 643, 970, 643, 643, 1104, 643, 1104, 1104, 1307, 1463, + /* 190 */ 2495, 97, 97, 97, 97, 97, 97, 1741, 556, 238, + /* 200 */ 291, 291, 185, 425, 853, 541, 273, 589, 607, 792, + /* 210 */ 1069, 1069, 70, 1026, 937, 937, 937, 916, 937, 182, + /* 220 */ 1053, 1050, 545, 779, 1276, 1068, 648, 648, 1066, 1417, + /* 230 */ 1417, 78, 157, 1108, 648, 895, 1555, 1819, 1864, 1868, + /* 240 */ 1652, 255, 1868, 255, 1680, 1864, 1879, 1854, 1879, 1854, + /* 250 */ 1712, 1864, 1879, 1864, 1854, 1712, 1712, 1712, 1798, 1804, + /* 260 */ 1907, 1798, 1804, 1864, 1864, 1847, 1864, 1864, 1864, 1963, + /* 270 */ 1932, 1963, 1932, 1868, 255, 255, 1984, 255, 1985, 1989, + /* 280 */ 255, 1985, 255, 1996, 255, 2002, 255, 255, 1975, 1975, + /* 290 */ 1864, 255, 1963, 643, 643, 643, 643, 643, 643, 643, + /* 300 */ 643, 643, 643, 643, 1864, 1463, 1463, 1963, 1104, 1104, + /* 310 */ 1104, 1799, 1965, 1868, 699, 2042, 1840, 1845, 1984, 699, + /* 320 */ 1555, 1864, 1104, 1760, 1764, 1760, 1764, 1765, 1881, 1760, + /* 330 */ 1767, 1769, 1788, 1555, 1797, 1807, 1773, 1780, 1785, 1879, + /* 340 */ 2103, 1994, 1811, 1985, 699, 699, 1764, 1104, 1104, 1104, + /* 350 */ 1104, 1764, 1104, 1947, 699, 1104, 2002, 699, 2077, 1104, + /* 360 */ 1956, 2002, 699, 1307, 699, 1879, 1104, 1104, 1104, 1104, + /* 370 */ 1104, 1104, 1104, 1104, 1104, 1104, 1104, 1104, 1104, 1104, + /* 380 */ 1104, 1104, 1104, 1104, 1104, 1104, 1104, 1104, 2092, 1104, + /* 390 */ 1864, 699, 2156, 2147, 2155, 2196, 1963, 4572, 4572, 4572, + /* 400 */ 4572, 4572, 4572, 4572, 4572, 4572, 4572, 4572, 4572, 37, + /* 410 */ 2243, 75, 1640, 626, 637, 712, 1124, 910, 924, 1141, + /* 420 */ 1150, 757, 864, 873, 1228, 1437, 1337, 1711, 349, 1866, + /* 430 */ 890, 912, 377, 377, 377, 377, 377, 377, 377, 377, + /* 440 */ 377, 176, 3, 714, 708, 843, 843, 687, 1111, 767, + /* 450 */ 119, 938, 956, 399, 1217, 1420, 343, 68, 68, 1170, + /* 460 */ 915, 940, 1170, 1170, 1170, 1148, 63, 1441, 1507, 1449, + /* 470 */ 1226, 1431, 1520, 1448, 1406, 477, 1480, 1405, 1511, 1425, + /* 480 */ 1426, 1511, 1432, 1479, 722, 943, 1489, 1554, 1578, 1585, + /* 490 */ 1493, 1536, 1541, 1517, 1586, 1601, 1649, 1653, 1404, 1274, + /* 500 */ 1408, 1655, 1656, 1665, 1669, 1603, 1670, 139, 1673, 1674, + /* 510 */ 1684, 575, 1695, 1699, 1706, 1718, 1723, 1605, 1613, 1678, + /* 520 */ 1683, 1746, 1749, 1753, 1755, 1757, 1759, 1761, 1697, 1511, + /* 530 */ 1743, 1766, 1777, 1782, 1783, 1207, 1629, 826, 1644, 1708, + /* 540 */ 1744, 1657, 1522, 2273, 2274, 2275, 2229, 2277, 2244, 2033, + /* 550 */ 2246, 2247, 2248, 2039, 2286, 2251, 2253, 2044, 2258, 2292, + /* 560 */ 2295, 2052, 2299, 2265, 2302, 2267, 2304, 2283, 2307, 2272, + /* 570 */ 2072, 2316, 2090, 2319, 2093, 2091, 2100, 2104, 2325, 2326, + /* 580 */ 2327, 2112, 2114, 2330, 2331, 2170, 2282, 2285, 2334, 2301, + /* 590 */ 2338, 2340, 2306, 2287, 2343, 2294, 2346, 2300, 2348, 2349, + /* 600 */ 2352, 2303, 2353, 2355, 2356, 2357, 2358, 2359, 2180, 2328, + /* 610 */ 2361, 2182, 2365, 2367, 2368, 2371, 2372, 2375, 2376, 2383, + /* 620 */ 2384, 2385, 2387, 2388, 2390, 2391, 2392, 2399, 2400, 2405, + /* 630 */ 2406, 2407, 2360, 2408, 2362, 2420, 2421, 2424, 2425, 2426, + /* 640 */ 2427, 2428, 2429, 2430, 2431, 2394, 2417, 2270, 2418, 2279, + /* 650 */ 2434, 2276, 2435, 2441, 2443, 2366, 2370, 2432, 2386, 2433, + /* 660 */ 2398, 2451, 2456, 2389, 2422, 2457, 2393, 2459, 2395, 2461, + /* 670 */ 2462, 2439, 2411, 2419, 2469, 2454, 2413, 2453, 2498, 2470, + /* 680 */ 2450, 2464, 2509, 2474, 2511, 2460, 2513, 2482, 2517, 2478, + /* 690 */ 2486, 2493, 2480, 2483, 2518, 2487, 2537, 2494, 2499, 2542, + /* 700 */ 2544, 2545, 2546, 2507, 2336, 2553, 2480, 2504, 2554, 2480, + /* 710 */ 2505, 2557, 2558, 2477, 2565, 2567, 2532, 2512, 2526, 2571, + /* 720 */ 2536, 2516, 2531, 2576, 2541, 2521, 2535, 2581, 2547, 2525, + /* 730 */ 2540, 2585, 2586, 2587, 2588, 2589, 2555, 2590, 2592, 2465, + /* 740 */ 2466, 2559, 2575, 2599, 2578, 2566, 2569, 2570, 2572, 2573, + /* 750 */ 2574, 2577, 2580, 2583, 2568, 2579, 2591, 2593, 2595, 2594, + /* 760 */ 2603, 2601, 2607, 2602, 2611, 2604, 2562, 2614, 2606, 2596, + /* 770 */ 2625, 2631, 2633, 2598, 2635, 2600, 2637, 2605, 2638, 2617, + /* 780 */ 2620, 2609, 2621, 2626, 2584, 2563, 2647, 2468, 2423, 2436, + /* 790 */ 2582, 2442, 2480, 2615, 2671, 2475, 2645, 2651, 2680, 2463, + /* 800 */ 2663, 2490, 2485, 2689, 2690, 2500, 2484, 2501, 2488, 2697, + /* 810 */ 2659, 2396, 2622, 2623, 2627, 2628, 2685, 2636, 2630, 2666, + /* 820 */ 2669, 2639, 2665, 2608, 2667, 2612, 2640, 2688, 2691, 2642, + /* 830 */ 2646, 2649, 2653, 2650, 2693, 2682, 2684, 2655, 2703, 2437, + /* 840 */ 2648, 2658, 2706, 2661, 2705, 2662, 2668, 2741, 2712, 2444, + /* 850 */ 2710, 2711, 2713, 2714, 2715, 2716, 2673, 2674, 2709, 2455, + /* 860 */ 2736, 2719, 2774, 2775, 2699, 2737, 2696, 2700, 2704, 2707, + /* 870 */ 2597, 2708, 2782, 2740, 2613, 2785, 2718, 2717, 2610, 2745, + /* 880 */ 2616, 2757, 2672, 2502, 2675, 2791, 2773, 2548, 2720, 2721, + /* 890 */ 2723, 2726, 2728, 2729, 2731, 2733, 2734, 2739, 2742, 2743, + /* 900 */ 2746, 2765, 2750, 2758, 2768, 2762, 2798, 2618, 2759, 2764, + /* 910 */ 2825, 2766, 2769, 2652, 2800, 2770, 2735, 2847, 2828, 2748, + /* 920 */ 2776, 2480, 2806, 2786, 2793, 2784, 2795, 2799, 2747, 2857, + /* 930 */ 2654, 2801, 2844, 2846, 2804, 2805, 2848, 2807, 2810, 2853, + /* 940 */ 2733, 2812, 2858, 2734, 2816, 2861, 2739, 2818, 2863, 2742, + /* 950 */ 2760, 2761, 2763, 2767, 2821, 2870, 2826, 2871, 2827, 2870, + /* 960 */ 2870, 2887, 2830, 2832, 2889, 2890, 2879, 2881, 2884, 2885, + /* 970 */ 2893, 2899, 2903, 2906, 2907, 2908, 2915, 2841, 2837, 2868, + /* 980 */ 2845, 2926, 2925, 2927, 2928, 2940, 2929, 2930, 2932, 2880, + /* 990 */ 2568, 2934, 2579, 2935, 2936, 2937, 2938, 2953, 2942, 2976, + /* 1000 */ 2943, 2944, 2950, 2982, 2951, 2945, 2955, 2986, 2968, 2948, + /* 1010 */ 2965, 2995, 2980, 2960, 2977, 3022, 2987, 3024, 3003, 3026, + /* 1020 */ 3005, 2992, 3029, 3009, 2999, 2998, 3007, 3013, 3023, 3027, + /* 1030 */ 3028, 3031, 3033, }; -#define YY_REDUCE_COUNT (405) +#define YY_REDUCE_COUNT (408) #define YY_REDUCE_MIN (-536) -#define YY_REDUCE_MAX (3957) +#define YY_REDUCE_MAX (4054) static const short yy_reduce_ofst[] = { - /* 0 */ 418, -349, -99, 142, 552, 829, 1008, 1285, 1582, 1664, - /* 10 */ 1106, 1859, 1941, 176, 1336, 1613, -135, 289, 2123, 419, - /* 20 */ 974, 2229, 2252, 2328, 2379, 2412, 2477, 2500, 2568, 2633, - /* 30 */ 2660, 2746, 2766, 2787, 2893, 2913, 2933, 3020, 3046, 3069, - /* 40 */ 3089, 3111, 3176, 3195, 3217, 3282, 3331, 3351, 3371, 3458, - /* 50 */ 3477, 3497, 3564, 3584, 3603, 3671, 3690, 3739, 3759, 3827, - /* 60 */ 3851, 3933, 3957, -351, 448, 605, -290, -366, 481, 1203, - /* 70 */ 1464, -8, 329, 1485, -393, -536, -153, -412, -534, 14, - /* 80 */ 197, -403, -368, -106, 254, 331, -433, -288, -400, -302, - /* 90 */ -452, -100, 28, -245, 385, 449, -71, 230, 271, 348, - /* 100 */ 364, 514, 261, 488, 526, 532, 539, 550, 517, 218, - /* 110 */ 169, 562, 718, 756, -409, 472, 806, 452, 843, 518, - /* 120 */ 847, 879, 889, 900, 739, 983, 995, 997, 609, 1006, - /* 130 */ -383, 792, 1017, 867, -361, -361, 263, -285, 189, -192, - /* 140 */ 56, 478, -25, 209, 559, 603, 681, 721, 735, 738, - /* 150 */ 778, 849, 895, 935, 963, 967, 1013, 1015, 1022, 1027, - /* 160 */ 1034, -408, 241, 33, 257, 774, 811, 819, 241, 390, - /* 170 */ 929, 549, 788, 911, 607, 913, 1052, 981, 1040, 546, - /* 180 */ 905, 628, 416, 1055, 766, 1014, 897, 1002, 928, 1098, - /* 190 */ -471, 435, 499, 555, 568, 581, 690, 838, 782, 446, - /* 200 */ 737, 737, 926, 732, 996, 988, 1157, 737, 1140, 1140, - /* 210 */ 1164, 1206, 1226, 1174, 1084, 1100, 1125, 1187, 1128, 1140, - /* 220 */ 1237, 1295, 1208, 1309, 1266, 1235, 1279, 1314, 1140, 1239, - /* 230 */ 1240, 1216, 1257, 1259, 1338, 1381, 1328, 1324, 1426, 1344, - /* 240 */ 1342, 1427, 1359, 1441, 1372, 1435, 1454, 1404, 1465, 1409, - /* 250 */ 1420, 1474, 1481, 1475, 1421, 1436, 1437, 1442, 1484, 1487, - /* 260 */ 1498, 1501, 1491, 1503, 1504, 1505, 1514, 1512, 1517, 1532, - /* 270 */ 1429, 1521, 1529, 1499, 1540, 1549, 1478, 1546, 1555, 1550, - /* 280 */ 1495, 1553, 1506, 1558, 1566, 1544, 1551, 1573, 1572, 1576, - /* 290 */ 1556, 1557, 1559, 1565, 1578, 1579, 1580, 1581, 1585, 1586, - /* 300 */ 1591, 1589, 1593, 1595, 1599, 1533, 1539, 1548, 1508, 1516, - /* 310 */ 1522, 1617, 1534, 1545, 1554, 1583, 1626, 1563, 1638, 1592, - /* 320 */ 1490, 1588, 1497, 1590, 1502, 1510, 1507, 1511, 1520, 1523, - /* 330 */ 1594, 1535, 1537, 1509, 1518, 1515, 1679, 1596, 1567, 1598, - /* 340 */ 1695, 1692, 1694, 1635, 1656, 1659, 1662, 1665, 1654, 1673, - /* 350 */ 1666, 1719, 1680, 1672, 1726, 1619, 1697, 1681, 1686, 1741, - /* 360 */ 1717, 1745, 1753, 1698, 1700, 1702, 1703, 1704, 1710, 1716, - /* 370 */ 1724, 1729, 1732, 1759, 1767, 1779, 1780, 1781, 1783, 1785, - /* 380 */ 1787, 1789, 1790, 1791, 1792, 1728, 1794, 1772, 1752, 1795, - /* 390 */ 1800, 1815, 1819, 1822, 1758, 1796, 1688, 1739, 1774, 1775, - /* 400 */ 1817, 1821, 1813, 1825, 1777, 1866, + /* 0 */ 140, -345, -100, 279, 454, 491, 760, 904, 1055, 1285, + /* 10 */ 1458, 1565, 1735, 809, 1886, 2012, 1120, 568, 2143, 1086, + /* 20 */ 230, 2167, 2256, 2324, 2351, 2416, 2438, 2481, 2503, 2530, + /* 30 */ 2644, 2664, 2683, 2732, 2809, 2829, 2860, 2894, 2959, 2981, + /* 40 */ 3001, 3122, 3142, 3161, 3248, 3268, 3287, 3374, 3394, 3413, + /* 50 */ 3535, 3554, 3576, 3641, 3661, 3767, 3787, 3806, 3928, 3947, + /* 60 */ 3969, 4034, 4054, -57, -376, -477, -324, 151, 488, 711, + /* 70 */ 1268, -232, -190, 1492, 152, -536, -403, -2, -515, -495, + /* 80 */ -432, -439, -399, -360, -396, -309, -279, 455, -317, -223, + /* 90 */ -50, -33, 61, -143, -383, 110, 93, 58, 427, 603, + /* 100 */ 605, 610, 275, 282, 735, 788, 793, 796, 316, 507, + /* 110 */ 509, -355, 819, 874, 762, 134, 896, 654, 936, -428, + /* 120 */ 941, 983, 1028, 1033, -268, 1037, 1061, 1079, 33, 1088, + /* 130 */ 588, 221, 858, -395, -492, -492, -20, 206, 326, 288, + /* 140 */ -386, 338, 104, 492, 594, 677, 682, 698, 754, 795, + /* 150 */ 841, 901, 907, 935, 947, 948, 952, 1035, 1056, 1063, + /* 160 */ 1080, 468, 292, 341, 673, 806, 845, 791, 292, 487, + /* 170 */ 755, 658, 728, -53, 198, 877, 917, 981, 435, 577, + /* 180 */ 752, 429, 787, -431, 905, 926, 1008, 1023, 902, 1007, + /* 190 */ 1102, 1161, 1171, 1173, 1176, 1184, 1186, 1243, 1291, 1222, + /* 200 */ 1162, 1162, 1212, 1195, 1231, 1248, 1379, 1162, 1353, 1353, + /* 210 */ 1382, 1383, 1403, 1346, 1258, 1259, 1262, 1344, 1265, 1353, + /* 220 */ 1363, 1427, 1338, 1434, 1388, 1361, 1384, 1391, 1353, 1308, + /* 230 */ 1317, 1297, 1334, 1321, 1407, 1445, 1393, 1375, 1481, 1395, + /* 240 */ 1396, 1476, 1402, 1482, 1414, 1494, 1495, 1442, 1496, 1443, + /* 250 */ 1450, 1501, 1503, 1502, 1452, 1453, 1456, 1457, 1523, 1518, + /* 260 */ 1524, 1535, 1537, 1550, 1553, 1547, 1571, 1573, 1575, 1589, + /* 270 */ 1582, 1590, 1587, 1500, 1588, 1591, 1552, 1593, 1602, 1531, + /* 280 */ 1598, 1607, 1606, 1545, 1608, 1558, 1610, 1611, 1597, 1599, + /* 290 */ 1625, 1618, 1635, 1600, 1604, 1609, 1612, 1614, 1615, 1616, + /* 300 */ 1619, 1620, 1624, 1627, 1632, 1645, 1647, 1636, 1592, 1594, + /* 310 */ 1595, 1548, 1557, 1576, 1658, 1579, 1596, 1617, 1623, 1666, + /* 320 */ 1621, 1677, 1633, 1538, 1622, 1539, 1626, 1551, 1546, 1559, + /* 330 */ 1561, 1560, 1564, 1634, 1574, 1580, 1556, 1563, 1567, 1713, + /* 340 */ 1628, 1583, 1581, 1729, 1725, 1726, 1667, 1688, 1690, 1691, + /* 350 */ 1694, 1675, 1696, 1681, 1739, 1701, 1687, 1742, 1630, 1705, + /* 360 */ 1698, 1702, 1748, 1731, 1751, 1762, 1717, 1720, 1721, 1722, + /* 370 */ 1724, 1727, 1728, 1730, 1732, 1733, 1734, 1736, 1738, 1740, + /* 380 */ 1745, 1768, 1778, 1779, 1781, 1787, 1795, 1796, 1737, 1801, + /* 390 */ 1770, 1806, 1800, 1823, 1835, 1841, 1857, 1775, 1821, 1763, + /* 400 */ 1774, 1791, 1793, 1832, 1839, 1830, 1842, 1856, 1882, }; static const YYACTIONTYPE yy_default[] = { - /* 0 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, - /* 10 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, - /* 20 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, - /* 30 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, - /* 40 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, - /* 50 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, - /* 60 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, - /* 70 */ 2303, 2303, 2303, 2687, 2303, 2303, 2643, 2303, 2303, 2303, - /* 80 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, - /* 90 */ 2303, 2650, 2650, 2303, 2303, 2303, 2303, 2303, 2303, 2303, - /* 100 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, - /* 110 */ 2303, 2303, 2303, 2303, 2413, 2303, 2303, 2303, 2303, 2303, - /* 120 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, - /* 130 */ 2303, 2303, 2303, 2411, 2960, 2303, 3088, 2728, 2303, 2303, - /* 140 */ 2989, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, - /* 150 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, - /* 160 */ 2303, 2303, 2972, 2303, 2303, 2384, 2384, 2303, 2972, 2972, - /* 170 */ 2972, 2932, 2932, 2411, 2303, 2303, 2413, 2303, 2730, 2303, - /* 180 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2557, 2333, - /* 190 */ 2713, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 3018, - /* 200 */ 2964, 2965, 3082, 2303, 3021, 2983, 2303, 2978, 2303, 2303, - /* 210 */ 2303, 2303, 2303, 3008, 2303, 2303, 2303, 2303, 2303, 2303, - /* 220 */ 2655, 2303, 2756, 2303, 2500, 2707, 2303, 2303, 2303, 2303, - /* 230 */ 2303, 3066, 2962, 3002, 2303, 2303, 3012, 2303, 2303, 2303, - /* 240 */ 2744, 2413, 2303, 2413, 2700, 2638, 2303, 2648, 2303, 2648, - /* 250 */ 2645, 2303, 2303, 2303, 2648, 2645, 2645, 2645, 2488, 2484, - /* 260 */ 2303, 2303, 2482, 2303, 2303, 2303, 2303, 2363, 2303, 2363, - /* 270 */ 2303, 2413, 2413, 2303, 2413, 2303, 2303, 2413, 2303, 2413, - /* 280 */ 2303, 2413, 2303, 2413, 2413, 2517, 2517, 2303, 2413, 2303, - /* 290 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, - /* 300 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2742, 2723, - /* 310 */ 2303, 2411, 2303, 2711, 2709, 2303, 2411, 3012, 2303, 2303, - /* 320 */ 3036, 3031, 3036, 3031, 3050, 3046, 3036, 3055, 3052, 3014, - /* 330 */ 3012, 2995, 2991, 3085, 3072, 3068, 2303, 2303, 3000, 2998, - /* 340 */ 2303, 2411, 2411, 3031, 2303, 2303, 2303, 2303, 3031, 2303, - /* 350 */ 2303, 2411, 2303, 2303, 2411, 2303, 2303, 2303, 2303, 2411, - /* 360 */ 2303, 2411, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, - /* 370 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, - /* 380 */ 2303, 2303, 2303, 2303, 2303, 2519, 2303, 2303, 2411, 2303, - /* 390 */ 2335, 2337, 2347, 2303, 2702, 3088, 2728, 2733, 2683, 2683, - /* 400 */ 2560, 2560, 3088, 2560, 2414, 2308, 2303, 2303, 2303, 2303, - /* 410 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, - /* 420 */ 2303, 2303, 2861, 2303, 2303, 2303, 2303, 2303, 2303, 3049, - /* 430 */ 3048, 2862, 2303, 2936, 2935, 2934, 2925, 2861, 2513, 2303, - /* 440 */ 2303, 2303, 2860, 2859, 2303, 2303, 2303, 2303, 2303, 2303, - /* 450 */ 2303, 2303, 2303, 2303, 2674, 2673, 2853, 2303, 2303, 2854, - /* 460 */ 2852, 2851, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, - /* 470 */ 2303, 2303, 2303, 2504, 2303, 2303, 2501, 2303, 2303, 2303, - /* 480 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, - /* 490 */ 2303, 2303, 2303, 2303, 3069, 3073, 2303, 2303, 2303, 2303, - /* 500 */ 2961, 2303, 2303, 2303, 2303, 2303, 2832, 2303, 2303, 2303, - /* 510 */ 2303, 2303, 2800, 2795, 2786, 2777, 2792, 2783, 2771, 2789, - /* 520 */ 2780, 2768, 2765, 2303, 2528, 2303, 2303, 2303, 2303, 2303, - /* 530 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, - /* 540 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, - /* 550 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, - /* 560 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, - /* 570 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, - /* 580 */ 2644, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, - /* 590 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, - /* 600 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, - /* 610 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, - /* 620 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, - /* 630 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, - /* 640 */ 2303, 2303, 2303, 2303, 2303, 2303, 2659, 2303, 2303, 2303, - /* 650 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, - /* 660 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, - /* 670 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, - /* 680 */ 2303, 2303, 2303, 2303, 2352, 2839, 2303, 2303, 2303, 2303, - /* 690 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2842, - /* 700 */ 2303, 2303, 2843, 2303, 2303, 2303, 2303, 2303, 2303, 2303, - /* 710 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, - /* 720 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, - /* 730 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, - /* 740 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2459, 2458, 2303, - /* 750 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, - /* 760 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, - /* 770 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2844, 2303, 2303, - /* 780 */ 2303, 2303, 2727, 2303, 2303, 2834, 2303, 2303, 2303, 2303, - /* 790 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, - /* 800 */ 2303, 2303, 3065, 3015, 2303, 2303, 2303, 2303, 2303, 2303, - /* 810 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, - /* 820 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2832, - /* 830 */ 2303, 3047, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 3063, - /* 840 */ 2303, 3067, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2971, - /* 850 */ 2967, 2303, 2303, 2963, 2303, 2303, 2303, 2303, 2303, 2303, - /* 860 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, - /* 870 */ 2303, 2303, 2303, 2303, 2922, 2303, 2303, 2303, 2956, 2303, - /* 880 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2556, 2555, - /* 890 */ 2554, 2553, 2303, 2303, 2303, 2303, 2303, 2303, 2844, 2303, - /* 900 */ 2847, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, - /* 910 */ 2303, 2303, 2303, 2303, 2831, 2303, 2899, 2898, 2303, 2303, - /* 920 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2550, 2303, 2303, - /* 930 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, - /* 940 */ 2303, 2303, 2303, 2534, 2532, 2531, 2530, 2303, 2567, 2303, - /* 950 */ 2303, 2303, 2563, 2562, 2303, 2303, 2303, 2303, 2303, 2303, - /* 960 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, - /* 970 */ 2303, 2303, 2303, 2303, 2432, 2303, 2303, 2303, 2303, 2303, - /* 980 */ 2303, 2303, 2303, 2424, 2303, 2423, 2303, 2303, 2303, 2303, - /* 990 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, - /* 1000 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2303, - /* 1010 */ 2303, 2303, 2303, 2303, 2303, 2303, 2303, 2332, 2303, 2303, - /* 1020 */ 2303, 2303, 2303, 2303, 2303, 2303, + /* 0 */ 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, + /* 10 */ 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, + /* 20 */ 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, + /* 30 */ 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, + /* 40 */ 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, + /* 50 */ 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, + /* 60 */ 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, + /* 70 */ 2311, 2311, 2311, 2696, 2311, 2311, 2652, 2311, 2311, 2311, + /* 80 */ 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, + /* 90 */ 2311, 2659, 2659, 2311, 2311, 2311, 2311, 2311, 2311, 2311, + /* 100 */ 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, + /* 110 */ 2311, 2311, 2311, 2311, 2422, 2311, 2311, 2311, 2311, 2311, + /* 120 */ 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, + /* 130 */ 2311, 2311, 2311, 2420, 2969, 2311, 3097, 2737, 2311, 2311, + /* 140 */ 2998, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, + /* 150 */ 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, + /* 160 */ 2311, 2311, 2981, 2311, 2311, 2392, 2392, 2311, 2981, 2981, + /* 170 */ 2981, 2941, 2941, 2420, 2311, 2311, 2422, 2311, 2739, 2311, + /* 180 */ 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2566, 2341, + /* 190 */ 2722, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 3027, + /* 200 */ 2973, 2974, 3091, 2311, 3030, 2992, 2311, 2987, 2311, 2311, + /* 210 */ 2311, 2311, 2311, 3017, 2311, 2311, 2311, 2311, 2311, 2311, + /* 220 */ 2664, 2311, 2765, 2311, 2509, 2716, 2311, 2311, 2311, 2311, + /* 230 */ 2311, 3075, 2971, 3011, 2311, 2311, 3021, 2311, 2311, 2311, + /* 240 */ 2753, 2422, 2311, 2422, 2709, 2647, 2311, 2657, 2311, 2657, + /* 250 */ 2654, 2311, 2311, 2311, 2657, 2654, 2654, 2654, 2497, 2493, + /* 260 */ 2311, 2497, 2493, 2311, 2311, 2491, 2311, 2311, 2311, 2311, + /* 270 */ 2371, 2311, 2371, 2311, 2422, 2422, 2311, 2422, 2311, 2311, + /* 280 */ 2422, 2311, 2422, 2311, 2422, 2311, 2422, 2422, 2526, 2526, + /* 290 */ 2311, 2422, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, + /* 300 */ 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, + /* 310 */ 2311, 2751, 2732, 2311, 2420, 2311, 2720, 2718, 2311, 2420, + /* 320 */ 3021, 2311, 2311, 3045, 3040, 3045, 3040, 3059, 3055, 3045, + /* 330 */ 3064, 3061, 3023, 3021, 3004, 3000, 3094, 3081, 3077, 2311, + /* 340 */ 2311, 3009, 3007, 2311, 2420, 2420, 3040, 2311, 2311, 2311, + /* 350 */ 2311, 3040, 2311, 2311, 2420, 2311, 2311, 2420, 2311, 2311, + /* 360 */ 2311, 2311, 2420, 2311, 2420, 2311, 2311, 2311, 2311, 2311, + /* 370 */ 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, + /* 380 */ 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2528, 2311, + /* 390 */ 2311, 2420, 2311, 2343, 2345, 2355, 2311, 2711, 3097, 2737, + /* 400 */ 2742, 2692, 2692, 2569, 2569, 3097, 2569, 2423, 2316, 2311, + /* 410 */ 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, + /* 420 */ 2311, 2311, 2311, 2311, 2311, 2870, 2311, 2311, 2311, 2311, + /* 430 */ 2311, 2311, 3058, 3057, 2871, 2311, 2945, 2944, 2943, 2934, + /* 440 */ 2870, 2522, 2311, 2311, 2311, 2869, 2868, 2311, 2311, 2311, + /* 450 */ 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2683, 2682, 2862, + /* 460 */ 2311, 2311, 2863, 2861, 2860, 2311, 2311, 2311, 2311, 2311, + /* 470 */ 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2513, 2311, + /* 480 */ 2311, 2510, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, + /* 490 */ 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 3078, + /* 500 */ 3082, 2311, 2311, 2311, 2311, 2970, 2311, 2311, 2311, 2311, + /* 510 */ 2311, 2841, 2311, 2311, 2311, 2311, 2311, 2809, 2804, 2795, + /* 520 */ 2786, 2801, 2792, 2780, 2798, 2789, 2777, 2774, 2311, 2537, + /* 530 */ 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, + /* 540 */ 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, + /* 550 */ 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, + /* 560 */ 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, + /* 570 */ 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, + /* 580 */ 2311, 2311, 2311, 2311, 2311, 2653, 2311, 2311, 2311, 2311, + /* 590 */ 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, + /* 600 */ 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, + /* 610 */ 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, + /* 620 */ 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, + /* 630 */ 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, + /* 640 */ 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, + /* 650 */ 2311, 2668, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, + /* 660 */ 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, + /* 670 */ 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, + /* 680 */ 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, + /* 690 */ 2311, 2360, 2848, 2311, 2311, 2311, 2311, 2311, 2311, 2311, + /* 700 */ 2311, 2311, 2311, 2311, 2311, 2311, 2851, 2311, 2311, 2852, + /* 710 */ 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, + /* 720 */ 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, + /* 730 */ 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, + /* 740 */ 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, + /* 750 */ 2311, 2311, 2311, 2311, 2468, 2467, 2311, 2311, 2311, 2311, + /* 760 */ 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, + /* 770 */ 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, + /* 780 */ 2311, 2311, 2311, 2311, 2853, 2311, 2311, 2311, 2311, 2736, + /* 790 */ 2311, 2311, 2843, 2311, 2311, 2311, 2311, 2311, 2311, 2311, + /* 800 */ 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 3074, + /* 810 */ 3024, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, + /* 820 */ 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, + /* 830 */ 2311, 2311, 2311, 2311, 2311, 2311, 2841, 2311, 3056, 2311, + /* 840 */ 2311, 2311, 2311, 2311, 2311, 2311, 3072, 2311, 3076, 2311, + /* 850 */ 2311, 2311, 2311, 2311, 2311, 2311, 2980, 2976, 2311, 2311, + /* 860 */ 2972, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, + /* 870 */ 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, + /* 880 */ 2311, 2931, 2311, 2311, 2311, 2965, 2311, 2311, 2311, 2311, + /* 890 */ 2311, 2311, 2311, 2311, 2311, 2565, 2564, 2563, 2562, 2311, + /* 900 */ 2311, 2311, 2311, 2311, 2311, 2853, 2311, 2856, 2311, 2311, + /* 910 */ 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, + /* 920 */ 2311, 2840, 2311, 2908, 2907, 2311, 2311, 2311, 2311, 2311, + /* 930 */ 2311, 2311, 2311, 2311, 2559, 2311, 2311, 2311, 2311, 2311, + /* 940 */ 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, + /* 950 */ 2543, 2541, 2540, 2539, 2311, 2576, 2311, 2311, 2311, 2572, + /* 960 */ 2571, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, + /* 970 */ 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, + /* 980 */ 2311, 2441, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, + /* 990 */ 2433, 2311, 2432, 2311, 2311, 2311, 2311, 2311, 2311, 2311, + /* 1000 */ 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, + /* 1010 */ 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311, + /* 1020 */ 2311, 2311, 2311, 2311, 2340, 2311, 2311, 2311, 2311, 2311, + /* 1030 */ 2311, 2311, 2311, }; /********** End of lemon-generated parsing tables *****************************/ @@ -1516,6 +1925,10 @@ static const YYCODETYPE yyFallback[] = { 0, /* TRIM => nothing */ 0, /* S3MIGRATE => nothing */ 0, /* COMPACT => nothing */ + 0, /* VGROUPS => nothing */ + 0, /* IN => nothing */ + 0, /* NK_LP => nothing */ + 0, /* NK_RP => nothing */ 0, /* IF => nothing */ 0, /* NOT => nothing */ 0, /* EXISTS => nothing */ @@ -1533,7 +1946,6 @@ static const YYCODETYPE yyFallback[] = { 0, /* TSDB_PAGESIZE => nothing */ 0, /* PRECISION => nothing */ 0, /* REPLICA => nothing */ - 0, /* VGROUPS => nothing */ 0, /* SINGLE_STABLE => nothing */ 0, /* RETENTIONS => nothing */ 0, /* SCHEMALESS => nothing */ @@ -1557,8 +1969,6 @@ static const YYCODETYPE yyFallback[] = { 0, /* TIMESTAMP => nothing */ 343, /* END => ABORT */ 0, /* TABLE => nothing */ - 0, /* NK_LP => nothing */ - 0, /* NK_RP => nothing */ 0, /* USING => nothing */ 343, /* FILE => ABORT */ 0, /* STABLE => nothing */ @@ -1711,7 +2121,6 @@ static const YYCODETYPE yyFallback[] = { 0, /* FROWTS => nothing */ 0, /* CAST => nothing */ 0, /* POSITION => nothing */ - 0, /* IN => nothing */ 343, /* FOR => ABORT */ 0, /* NOW => nothing */ 0, /* TODAY => nothing */ @@ -1879,6 +2288,7 @@ struct yyParser { }; typedef struct yyParser yyParser; +#include #ifndef NDEBUG #include static FILE *yyTraceFILE = 0; @@ -1992,202 +2402,202 @@ static const char *const yyTokenName[] = { /* 74 */ "TRIM", /* 75 */ "S3MIGRATE", /* 76 */ "COMPACT", - /* 77 */ "IF", - /* 78 */ "NOT", - /* 79 */ "EXISTS", - /* 80 */ "BUFFER", - /* 81 */ "CACHEMODEL", - /* 82 */ "CACHESIZE", - /* 83 */ "COMP", - /* 84 */ "DURATION", - /* 85 */ "NK_VARIABLE", - /* 86 */ "MAXROWS", - /* 87 */ "MINROWS", - /* 88 */ "KEEP", - /* 89 */ "PAGES", - /* 90 */ "PAGESIZE", - /* 91 */ "TSDB_PAGESIZE", - /* 92 */ "PRECISION", - /* 93 */ "REPLICA", - /* 94 */ "VGROUPS", - /* 95 */ "SINGLE_STABLE", - /* 96 */ "RETENTIONS", - /* 97 */ "SCHEMALESS", - /* 98 */ "WAL_LEVEL", - /* 99 */ "WAL_FSYNC_PERIOD", - /* 100 */ "WAL_RETENTION_PERIOD", - /* 101 */ "WAL_RETENTION_SIZE", - /* 102 */ "WAL_ROLL_PERIOD", - /* 103 */ "WAL_SEGMENT_SIZE", - /* 104 */ "STT_TRIGGER", - /* 105 */ "TABLE_PREFIX", - /* 106 */ "TABLE_SUFFIX", - /* 107 */ "S3_CHUNKPAGES", - /* 108 */ "S3_KEEPLOCAL", - /* 109 */ "S3_COMPACT", - /* 110 */ "KEEP_TIME_OFFSET", - /* 111 */ "ENCRYPT_ALGORITHM", - /* 112 */ "NK_COLON", - /* 113 */ "BWLIMIT", - /* 114 */ "START", - /* 115 */ "TIMESTAMP", - /* 116 */ "END", - /* 117 */ "TABLE", - /* 118 */ "NK_LP", - /* 119 */ "NK_RP", - /* 120 */ "USING", - /* 121 */ "FILE", - /* 122 */ "STABLE", - /* 123 */ "COLUMN", - /* 124 */ "MODIFY", - /* 125 */ "RENAME", - /* 126 */ "TAG", - /* 127 */ "SET", - /* 128 */ "NK_EQ", - /* 129 */ "TAGS", - /* 130 */ "BOOL", - /* 131 */ "TINYINT", - /* 132 */ "SMALLINT", - /* 133 */ "INT", - /* 134 */ "INTEGER", - /* 135 */ "BIGINT", - /* 136 */ "FLOAT", - /* 137 */ "DOUBLE", - /* 138 */ "BINARY", - /* 139 */ "NCHAR", - /* 140 */ "UNSIGNED", - /* 141 */ "JSON", - /* 142 */ "VARCHAR", - /* 143 */ "MEDIUMBLOB", - /* 144 */ "BLOB", - /* 145 */ "VARBINARY", - /* 146 */ "GEOMETRY", - /* 147 */ "DECIMAL", - /* 148 */ "COMMENT", - /* 149 */ "MAX_DELAY", - /* 150 */ "WATERMARK", - /* 151 */ "ROLLUP", - /* 152 */ "TTL", - /* 153 */ "SMA", - /* 154 */ "DELETE_MARK", - /* 155 */ "FIRST", - /* 156 */ "LAST", - /* 157 */ "SHOW", - /* 158 */ "FULL", - /* 159 */ "PRIVILEGES", - /* 160 */ "DATABASES", - /* 161 */ "TABLES", - /* 162 */ "STABLES", - /* 163 */ "MNODES", - /* 164 */ "QNODES", - /* 165 */ "ARBGROUPS", - /* 166 */ "FUNCTIONS", - /* 167 */ "INDEXES", - /* 168 */ "ACCOUNTS", - /* 169 */ "APPS", - /* 170 */ "CONNECTIONS", - /* 171 */ "LICENCES", - /* 172 */ "GRANTS", - /* 173 */ "LOGS", - /* 174 */ "MACHINES", - /* 175 */ "ENCRYPTIONS", - /* 176 */ "QUERIES", - /* 177 */ "SCORES", - /* 178 */ "TOPICS", - /* 179 */ "VARIABLES", - /* 180 */ "BNODES", - /* 181 */ "SNODES", - /* 182 */ "TRANSACTIONS", - /* 183 */ "DISTRIBUTED", - /* 184 */ "CONSUMERS", - /* 185 */ "SUBSCRIPTIONS", - /* 186 */ "VNODES", - /* 187 */ "ALIVE", - /* 188 */ "VIEWS", - /* 189 */ "VIEW", - /* 190 */ "COMPACTS", - /* 191 */ "NORMAL", - /* 192 */ "CHILD", - /* 193 */ "LIKE", - /* 194 */ "TBNAME", - /* 195 */ "QTAGS", - /* 196 */ "AS", - /* 197 */ "SYSTEM", - /* 198 */ "TSMA", - /* 199 */ "INTERVAL", - /* 200 */ "RECURSIVE", - /* 201 */ "TSMAS", - /* 202 */ "FUNCTION", - /* 203 */ "INDEX", - /* 204 */ "COUNT", - /* 205 */ "LAST_ROW", - /* 206 */ "META", - /* 207 */ "ONLY", - /* 208 */ "TOPIC", - /* 209 */ "CONSUMER", - /* 210 */ "GROUP", - /* 211 */ "DESC", - /* 212 */ "DESCRIBE", - /* 213 */ "RESET", - /* 214 */ "QUERY", - /* 215 */ "CACHE", - /* 216 */ "EXPLAIN", - /* 217 */ "ANALYZE", - /* 218 */ "VERBOSE", - /* 219 */ "NK_BOOL", - /* 220 */ "RATIO", - /* 221 */ "NK_FLOAT", - /* 222 */ "OUTPUTTYPE", - /* 223 */ "AGGREGATE", - /* 224 */ "BUFSIZE", - /* 225 */ "LANGUAGE", - /* 226 */ "REPLACE", - /* 227 */ "STREAM", - /* 228 */ "INTO", - /* 229 */ "PAUSE", - /* 230 */ "RESUME", - /* 231 */ "PRIMARY", - /* 232 */ "KEY", - /* 233 */ "TRIGGER", - /* 234 */ "AT_ONCE", - /* 235 */ "WINDOW_CLOSE", - /* 236 */ "IGNORE", - /* 237 */ "EXPIRED", - /* 238 */ "FILL_HISTORY", - /* 239 */ "SUBTABLE", - /* 240 */ "UNTREATED", - /* 241 */ "KILL", - /* 242 */ "CONNECTION", - /* 243 */ "TRANSACTION", - /* 244 */ "BALANCE", - /* 245 */ "VGROUP", - /* 246 */ "LEADER", - /* 247 */ "MERGE", - /* 248 */ "REDISTRIBUTE", - /* 249 */ "SPLIT", - /* 250 */ "DELETE", - /* 251 */ "INSERT", - /* 252 */ "NK_BIN", - /* 253 */ "NK_HEX", - /* 254 */ "NULL", - /* 255 */ "NK_QUESTION", - /* 256 */ "NK_ALIAS", - /* 257 */ "NK_ARROW", - /* 258 */ "ROWTS", - /* 259 */ "QSTART", - /* 260 */ "QEND", - /* 261 */ "QDURATION", - /* 262 */ "WSTART", - /* 263 */ "WEND", - /* 264 */ "WDURATION", - /* 265 */ "IROWTS", - /* 266 */ "ISFILLED", - /* 267 */ "FLOW", - /* 268 */ "FHIGH", - /* 269 */ "FROWTS", - /* 270 */ "CAST", - /* 271 */ "POSITION", - /* 272 */ "IN", + /* 77 */ "VGROUPS", + /* 78 */ "IN", + /* 79 */ "NK_LP", + /* 80 */ "NK_RP", + /* 81 */ "IF", + /* 82 */ "NOT", + /* 83 */ "EXISTS", + /* 84 */ "BUFFER", + /* 85 */ "CACHEMODEL", + /* 86 */ "CACHESIZE", + /* 87 */ "COMP", + /* 88 */ "DURATION", + /* 89 */ "NK_VARIABLE", + /* 90 */ "MAXROWS", + /* 91 */ "MINROWS", + /* 92 */ "KEEP", + /* 93 */ "PAGES", + /* 94 */ "PAGESIZE", + /* 95 */ "TSDB_PAGESIZE", + /* 96 */ "PRECISION", + /* 97 */ "REPLICA", + /* 98 */ "SINGLE_STABLE", + /* 99 */ "RETENTIONS", + /* 100 */ "SCHEMALESS", + /* 101 */ "WAL_LEVEL", + /* 102 */ "WAL_FSYNC_PERIOD", + /* 103 */ "WAL_RETENTION_PERIOD", + /* 104 */ "WAL_RETENTION_SIZE", + /* 105 */ "WAL_ROLL_PERIOD", + /* 106 */ "WAL_SEGMENT_SIZE", + /* 107 */ "STT_TRIGGER", + /* 108 */ "TABLE_PREFIX", + /* 109 */ "TABLE_SUFFIX", + /* 110 */ "S3_CHUNKPAGES", + /* 111 */ "S3_KEEPLOCAL", + /* 112 */ "S3_COMPACT", + /* 113 */ "KEEP_TIME_OFFSET", + /* 114 */ "ENCRYPT_ALGORITHM", + /* 115 */ "NK_COLON", + /* 116 */ "BWLIMIT", + /* 117 */ "START", + /* 118 */ "TIMESTAMP", + /* 119 */ "END", + /* 120 */ "TABLE", + /* 121 */ "USING", + /* 122 */ "FILE", + /* 123 */ "STABLE", + /* 124 */ "COLUMN", + /* 125 */ "MODIFY", + /* 126 */ "RENAME", + /* 127 */ "TAG", + /* 128 */ "SET", + /* 129 */ "NK_EQ", + /* 130 */ "TAGS", + /* 131 */ "BOOL", + /* 132 */ "TINYINT", + /* 133 */ "SMALLINT", + /* 134 */ "INT", + /* 135 */ "INTEGER", + /* 136 */ "BIGINT", + /* 137 */ "FLOAT", + /* 138 */ "DOUBLE", + /* 139 */ "BINARY", + /* 140 */ "NCHAR", + /* 141 */ "UNSIGNED", + /* 142 */ "JSON", + /* 143 */ "VARCHAR", + /* 144 */ "MEDIUMBLOB", + /* 145 */ "BLOB", + /* 146 */ "VARBINARY", + /* 147 */ "GEOMETRY", + /* 148 */ "DECIMAL", + /* 149 */ "COMMENT", + /* 150 */ "MAX_DELAY", + /* 151 */ "WATERMARK", + /* 152 */ "ROLLUP", + /* 153 */ "TTL", + /* 154 */ "SMA", + /* 155 */ "DELETE_MARK", + /* 156 */ "FIRST", + /* 157 */ "LAST", + /* 158 */ "SHOW", + /* 159 */ "FULL", + /* 160 */ "PRIVILEGES", + /* 161 */ "DATABASES", + /* 162 */ "TABLES", + /* 163 */ "STABLES", + /* 164 */ "MNODES", + /* 165 */ "QNODES", + /* 166 */ "ARBGROUPS", + /* 167 */ "FUNCTIONS", + /* 168 */ "INDEXES", + /* 169 */ "ACCOUNTS", + /* 170 */ "APPS", + /* 171 */ "CONNECTIONS", + /* 172 */ "LICENCES", + /* 173 */ "GRANTS", + /* 174 */ "LOGS", + /* 175 */ "MACHINES", + /* 176 */ "ENCRYPTIONS", + /* 177 */ "QUERIES", + /* 178 */ "SCORES", + /* 179 */ "TOPICS", + /* 180 */ "VARIABLES", + /* 181 */ "BNODES", + /* 182 */ "SNODES", + /* 183 */ "TRANSACTIONS", + /* 184 */ "DISTRIBUTED", + /* 185 */ "CONSUMERS", + /* 186 */ "SUBSCRIPTIONS", + /* 187 */ "VNODES", + /* 188 */ "ALIVE", + /* 189 */ "VIEWS", + /* 190 */ "VIEW", + /* 191 */ "COMPACTS", + /* 192 */ "NORMAL", + /* 193 */ "CHILD", + /* 194 */ "LIKE", + /* 195 */ "TBNAME", + /* 196 */ "QTAGS", + /* 197 */ "AS", + /* 198 */ "SYSTEM", + /* 199 */ "TSMA", + /* 200 */ "INTERVAL", + /* 201 */ "RECURSIVE", + /* 202 */ "TSMAS", + /* 203 */ "FUNCTION", + /* 204 */ "INDEX", + /* 205 */ "COUNT", + /* 206 */ "LAST_ROW", + /* 207 */ "META", + /* 208 */ "ONLY", + /* 209 */ "TOPIC", + /* 210 */ "CONSUMER", + /* 211 */ "GROUP", + /* 212 */ "DESC", + /* 213 */ "DESCRIBE", + /* 214 */ "RESET", + /* 215 */ "QUERY", + /* 216 */ "CACHE", + /* 217 */ "EXPLAIN", + /* 218 */ "ANALYZE", + /* 219 */ "VERBOSE", + /* 220 */ "NK_BOOL", + /* 221 */ "RATIO", + /* 222 */ "NK_FLOAT", + /* 223 */ "OUTPUTTYPE", + /* 224 */ "AGGREGATE", + /* 225 */ "BUFSIZE", + /* 226 */ "LANGUAGE", + /* 227 */ "REPLACE", + /* 228 */ "STREAM", + /* 229 */ "INTO", + /* 230 */ "PAUSE", + /* 231 */ "RESUME", + /* 232 */ "PRIMARY", + /* 233 */ "KEY", + /* 234 */ "TRIGGER", + /* 235 */ "AT_ONCE", + /* 236 */ "WINDOW_CLOSE", + /* 237 */ "IGNORE", + /* 238 */ "EXPIRED", + /* 239 */ "FILL_HISTORY", + /* 240 */ "SUBTABLE", + /* 241 */ "UNTREATED", + /* 242 */ "KILL", + /* 243 */ "CONNECTION", + /* 244 */ "TRANSACTION", + /* 245 */ "BALANCE", + /* 246 */ "VGROUP", + /* 247 */ "LEADER", + /* 248 */ "MERGE", + /* 249 */ "REDISTRIBUTE", + /* 250 */ "SPLIT", + /* 251 */ "DELETE", + /* 252 */ "INSERT", + /* 253 */ "NK_BIN", + /* 254 */ "NK_HEX", + /* 255 */ "NULL", + /* 256 */ "NK_QUESTION", + /* 257 */ "NK_ALIAS", + /* 258 */ "NK_ARROW", + /* 259 */ "ROWTS", + /* 260 */ "QSTART", + /* 261 */ "QEND", + /* 262 */ "QDURATION", + /* 263 */ "WSTART", + /* 264 */ "WEND", + /* 265 */ "WDURATION", + /* 266 */ "IROWTS", + /* 267 */ "ISFILLED", + /* 268 */ "FLOW", + /* 269 */ "FHIGH", + /* 270 */ "FROWTS", + /* 271 */ "CAST", + /* 272 */ "POSITION", /* 273 */ "FOR", /* 274 */ "NOW", /* 275 */ "TODAY", @@ -2599,687 +3009,688 @@ static const char *const yyRuleName[] = { /* 101 */ "cmd ::= TRIM DATABASE db_name speed_opt", /* 102 */ "cmd ::= S3MIGRATE DATABASE db_name", /* 103 */ "cmd ::= COMPACT DATABASE db_name start_opt end_opt", - /* 104 */ "not_exists_opt ::= IF NOT EXISTS", - /* 105 */ "not_exists_opt ::=", - /* 106 */ "exists_opt ::= IF EXISTS", - /* 107 */ "exists_opt ::=", - /* 108 */ "db_options ::=", - /* 109 */ "db_options ::= db_options BUFFER NK_INTEGER", - /* 110 */ "db_options ::= db_options CACHEMODEL NK_STRING", - /* 111 */ "db_options ::= db_options CACHESIZE NK_INTEGER", - /* 112 */ "db_options ::= db_options COMP NK_INTEGER", - /* 113 */ "db_options ::= db_options DURATION NK_INTEGER", - /* 114 */ "db_options ::= db_options DURATION NK_VARIABLE", - /* 115 */ "db_options ::= db_options MAXROWS NK_INTEGER", - /* 116 */ "db_options ::= db_options MINROWS NK_INTEGER", - /* 117 */ "db_options ::= db_options KEEP integer_list", - /* 118 */ "db_options ::= db_options KEEP variable_list", - /* 119 */ "db_options ::= db_options PAGES NK_INTEGER", - /* 120 */ "db_options ::= db_options PAGESIZE NK_INTEGER", - /* 121 */ "db_options ::= db_options TSDB_PAGESIZE NK_INTEGER", - /* 122 */ "db_options ::= db_options PRECISION NK_STRING", - /* 123 */ "db_options ::= db_options REPLICA NK_INTEGER", - /* 124 */ "db_options ::= db_options VGROUPS NK_INTEGER", - /* 125 */ "db_options ::= db_options SINGLE_STABLE NK_INTEGER", - /* 126 */ "db_options ::= db_options RETENTIONS retention_list", - /* 127 */ "db_options ::= db_options SCHEMALESS NK_INTEGER", - /* 128 */ "db_options ::= db_options WAL_LEVEL NK_INTEGER", - /* 129 */ "db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER", - /* 130 */ "db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER", - /* 131 */ "db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER", - /* 132 */ "db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER", - /* 133 */ "db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER", - /* 134 */ "db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER", - /* 135 */ "db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER", - /* 136 */ "db_options ::= db_options STT_TRIGGER NK_INTEGER", - /* 137 */ "db_options ::= db_options TABLE_PREFIX signed", - /* 138 */ "db_options ::= db_options TABLE_SUFFIX signed", - /* 139 */ "db_options ::= db_options S3_CHUNKPAGES NK_INTEGER", - /* 140 */ "db_options ::= db_options S3_KEEPLOCAL NK_INTEGER", - /* 141 */ "db_options ::= db_options S3_KEEPLOCAL NK_VARIABLE", - /* 142 */ "db_options ::= db_options S3_COMPACT NK_INTEGER", - /* 143 */ "db_options ::= db_options KEEP_TIME_OFFSET NK_INTEGER", - /* 144 */ "db_options ::= db_options ENCRYPT_ALGORITHM NK_STRING", - /* 145 */ "db_options ::= db_options DNODES NK_STRING", - /* 146 */ "alter_db_options ::= alter_db_option", - /* 147 */ "alter_db_options ::= alter_db_options alter_db_option", - /* 148 */ "alter_db_option ::= BUFFER NK_INTEGER", - /* 149 */ "alter_db_option ::= CACHEMODEL NK_STRING", - /* 150 */ "alter_db_option ::= CACHESIZE NK_INTEGER", - /* 151 */ "alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER", - /* 152 */ "alter_db_option ::= KEEP integer_list", - /* 153 */ "alter_db_option ::= KEEP variable_list", - /* 154 */ "alter_db_option ::= PAGES NK_INTEGER", - /* 155 */ "alter_db_option ::= REPLICA NK_INTEGER", - /* 156 */ "alter_db_option ::= WAL_LEVEL NK_INTEGER", - /* 157 */ "alter_db_option ::= STT_TRIGGER NK_INTEGER", - /* 158 */ "alter_db_option ::= MINROWS NK_INTEGER", - /* 159 */ "alter_db_option ::= WAL_RETENTION_PERIOD NK_INTEGER", - /* 160 */ "alter_db_option ::= WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER", - /* 161 */ "alter_db_option ::= WAL_RETENTION_SIZE NK_INTEGER", - /* 162 */ "alter_db_option ::= WAL_RETENTION_SIZE NK_MINUS NK_INTEGER", - /* 163 */ "alter_db_option ::= S3_KEEPLOCAL NK_INTEGER", - /* 164 */ "alter_db_option ::= S3_KEEPLOCAL NK_VARIABLE", - /* 165 */ "alter_db_option ::= S3_COMPACT NK_INTEGER", - /* 166 */ "alter_db_option ::= KEEP_TIME_OFFSET NK_INTEGER", - /* 167 */ "alter_db_option ::= ENCRYPT_ALGORITHM NK_STRING", - /* 168 */ "integer_list ::= NK_INTEGER", - /* 169 */ "integer_list ::= integer_list NK_COMMA NK_INTEGER", - /* 170 */ "variable_list ::= NK_VARIABLE", - /* 171 */ "variable_list ::= variable_list NK_COMMA NK_VARIABLE", - /* 172 */ "retention_list ::= retention", - /* 173 */ "retention_list ::= retention_list NK_COMMA retention", - /* 174 */ "retention ::= NK_VARIABLE NK_COLON NK_VARIABLE", - /* 175 */ "retention ::= NK_MINUS NK_COLON NK_VARIABLE", - /* 176 */ "speed_opt ::=", - /* 177 */ "speed_opt ::= BWLIMIT NK_INTEGER", - /* 178 */ "start_opt ::=", - /* 179 */ "start_opt ::= START WITH NK_INTEGER", - /* 180 */ "start_opt ::= START WITH NK_STRING", - /* 181 */ "start_opt ::= START WITH TIMESTAMP NK_STRING", - /* 182 */ "end_opt ::=", - /* 183 */ "end_opt ::= END WITH NK_INTEGER", - /* 184 */ "end_opt ::= END WITH NK_STRING", - /* 185 */ "end_opt ::= END WITH TIMESTAMP NK_STRING", - /* 186 */ "cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options", - /* 187 */ "cmd ::= CREATE TABLE multi_create_clause", - /* 188 */ "cmd ::= CREATE TABLE not_exists_opt USING full_table_name NK_LP tag_list_opt NK_RP FILE NK_STRING", - /* 189 */ "cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options", - /* 190 */ "cmd ::= DROP TABLE with_opt multi_drop_clause", - /* 191 */ "cmd ::= DROP STABLE with_opt exists_opt full_table_name", - /* 192 */ "cmd ::= ALTER TABLE alter_table_clause", - /* 193 */ "cmd ::= ALTER STABLE alter_table_clause", - /* 194 */ "alter_table_clause ::= full_table_name alter_table_options", - /* 195 */ "alter_table_clause ::= full_table_name ADD COLUMN column_name type_name column_options", - /* 196 */ "alter_table_clause ::= full_table_name DROP COLUMN column_name", - /* 197 */ "alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name", - /* 198 */ "alter_table_clause ::= full_table_name MODIFY COLUMN column_name column_options", - /* 199 */ "alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name", - /* 200 */ "alter_table_clause ::= full_table_name ADD TAG column_name type_name", - /* 201 */ "alter_table_clause ::= full_table_name DROP TAG column_name", - /* 202 */ "alter_table_clause ::= full_table_name MODIFY TAG column_name type_name", - /* 203 */ "alter_table_clause ::= full_table_name RENAME TAG column_name column_name", - /* 204 */ "alter_table_clause ::= full_table_name SET TAG column_name NK_EQ tags_literal", - /* 205 */ "multi_create_clause ::= create_subtable_clause", - /* 206 */ "multi_create_clause ::= multi_create_clause create_subtable_clause", - /* 207 */ "create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_cols_opt TAGS NK_LP tags_literal_list NK_RP table_options", - /* 208 */ "multi_drop_clause ::= drop_table_clause", - /* 209 */ "multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause", - /* 210 */ "drop_table_clause ::= exists_opt full_table_name", - /* 211 */ "with_opt ::=", - /* 212 */ "with_opt ::= WITH", - /* 213 */ "specific_cols_opt ::=", - /* 214 */ "specific_cols_opt ::= NK_LP col_name_list NK_RP", - /* 215 */ "full_table_name ::= table_name", - /* 216 */ "full_table_name ::= db_name NK_DOT table_name", - /* 217 */ "tag_def_list ::= tag_def", - /* 218 */ "tag_def_list ::= tag_def_list NK_COMMA tag_def", - /* 219 */ "tag_def ::= column_name type_name", - /* 220 */ "column_def_list ::= column_def", - /* 221 */ "column_def_list ::= column_def_list NK_COMMA column_def", - /* 222 */ "column_def ::= column_name type_name column_options", - /* 223 */ "type_name ::= BOOL", - /* 224 */ "type_name ::= TINYINT", - /* 225 */ "type_name ::= SMALLINT", - /* 226 */ "type_name ::= INT", - /* 227 */ "type_name ::= INTEGER", - /* 228 */ "type_name ::= BIGINT", - /* 229 */ "type_name ::= FLOAT", - /* 230 */ "type_name ::= DOUBLE", - /* 231 */ "type_name ::= BINARY NK_LP NK_INTEGER NK_RP", - /* 232 */ "type_name ::= TIMESTAMP", - /* 233 */ "type_name ::= NCHAR NK_LP NK_INTEGER NK_RP", - /* 234 */ "type_name ::= TINYINT UNSIGNED", - /* 235 */ "type_name ::= SMALLINT UNSIGNED", - /* 236 */ "type_name ::= INT UNSIGNED", - /* 237 */ "type_name ::= BIGINT UNSIGNED", - /* 238 */ "type_name ::= JSON", - /* 239 */ "type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP", - /* 240 */ "type_name ::= MEDIUMBLOB", - /* 241 */ "type_name ::= BLOB", - /* 242 */ "type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP", - /* 243 */ "type_name ::= GEOMETRY NK_LP NK_INTEGER NK_RP", - /* 244 */ "type_name ::= DECIMAL", - /* 245 */ "type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP", - /* 246 */ "type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP", - /* 247 */ "type_name_default_len ::= BINARY", - /* 248 */ "type_name_default_len ::= NCHAR", - /* 249 */ "type_name_default_len ::= VARCHAR", - /* 250 */ "type_name_default_len ::= VARBINARY", - /* 251 */ "tags_def_opt ::=", - /* 252 */ "tags_def_opt ::= tags_def", - /* 253 */ "tags_def ::= TAGS NK_LP tag_def_list NK_RP", - /* 254 */ "table_options ::=", - /* 255 */ "table_options ::= table_options COMMENT NK_STRING", - /* 256 */ "table_options ::= table_options MAX_DELAY duration_list", - /* 257 */ "table_options ::= table_options WATERMARK duration_list", - /* 258 */ "table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP", - /* 259 */ "table_options ::= table_options TTL NK_INTEGER", - /* 260 */ "table_options ::= table_options SMA NK_LP col_name_list NK_RP", - /* 261 */ "table_options ::= table_options DELETE_MARK duration_list", - /* 262 */ "alter_table_options ::= alter_table_option", - /* 263 */ "alter_table_options ::= alter_table_options alter_table_option", - /* 264 */ "alter_table_option ::= COMMENT NK_STRING", - /* 265 */ "alter_table_option ::= TTL NK_INTEGER", - /* 266 */ "duration_list ::= duration_literal", - /* 267 */ "duration_list ::= duration_list NK_COMMA duration_literal", - /* 268 */ "rollup_func_list ::= rollup_func_name", - /* 269 */ "rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name", - /* 270 */ "rollup_func_name ::= function_name", - /* 271 */ "rollup_func_name ::= FIRST", - /* 272 */ "rollup_func_name ::= LAST", - /* 273 */ "col_name_list ::= col_name", - /* 274 */ "col_name_list ::= col_name_list NK_COMMA col_name", - /* 275 */ "col_name ::= column_name", - /* 276 */ "cmd ::= SHOW DNODES", - /* 277 */ "cmd ::= SHOW USERS", - /* 278 */ "cmd ::= SHOW USERS FULL", - /* 279 */ "cmd ::= SHOW USER PRIVILEGES", - /* 280 */ "cmd ::= SHOW db_kind_opt DATABASES", - /* 281 */ "cmd ::= SHOW table_kind_db_name_cond_opt TABLES like_pattern_opt", - /* 282 */ "cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt", - /* 283 */ "cmd ::= SHOW db_name_cond_opt VGROUPS", - /* 284 */ "cmd ::= SHOW MNODES", - /* 285 */ "cmd ::= SHOW QNODES", - /* 286 */ "cmd ::= SHOW ANODES", - /* 287 */ "cmd ::= SHOW ANODES FULL", - /* 288 */ "cmd ::= SHOW ARBGROUPS", - /* 289 */ "cmd ::= SHOW FUNCTIONS", - /* 290 */ "cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt", - /* 291 */ "cmd ::= SHOW INDEXES FROM db_name NK_DOT table_name", - /* 292 */ "cmd ::= SHOW STREAMS", - /* 293 */ "cmd ::= SHOW ACCOUNTS", - /* 294 */ "cmd ::= SHOW APPS", - /* 295 */ "cmd ::= SHOW CONNECTIONS", - /* 296 */ "cmd ::= SHOW LICENCES", - /* 297 */ "cmd ::= SHOW GRANTS", - /* 298 */ "cmd ::= SHOW GRANTS FULL", - /* 299 */ "cmd ::= SHOW GRANTS LOGS", - /* 300 */ "cmd ::= SHOW CLUSTER MACHINES", - /* 301 */ "cmd ::= SHOW CREATE DATABASE db_name", - /* 302 */ "cmd ::= SHOW CREATE TABLE full_table_name", - /* 303 */ "cmd ::= SHOW CREATE STABLE full_table_name", - /* 304 */ "cmd ::= SHOW ENCRYPTIONS", - /* 305 */ "cmd ::= SHOW QUERIES", - /* 306 */ "cmd ::= SHOW SCORES", - /* 307 */ "cmd ::= SHOW TOPICS", - /* 308 */ "cmd ::= SHOW VARIABLES", - /* 309 */ "cmd ::= SHOW CLUSTER VARIABLES", - /* 310 */ "cmd ::= SHOW LOCAL VARIABLES", - /* 311 */ "cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt", - /* 312 */ "cmd ::= SHOW BNODES", - /* 313 */ "cmd ::= SHOW SNODES", - /* 314 */ "cmd ::= SHOW CLUSTER", - /* 315 */ "cmd ::= SHOW TRANSACTIONS", - /* 316 */ "cmd ::= SHOW TABLE DISTRIBUTED full_table_name", - /* 317 */ "cmd ::= SHOW CONSUMERS", - /* 318 */ "cmd ::= SHOW SUBSCRIPTIONS", - /* 319 */ "cmd ::= SHOW TAGS FROM table_name_cond from_db_opt", - /* 320 */ "cmd ::= SHOW TAGS FROM db_name NK_DOT table_name", - /* 321 */ "cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt", - /* 322 */ "cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name", - /* 323 */ "cmd ::= SHOW VNODES ON DNODE NK_INTEGER", - /* 324 */ "cmd ::= SHOW VNODES", - /* 325 */ "cmd ::= SHOW db_name_cond_opt ALIVE", - /* 326 */ "cmd ::= SHOW CLUSTER ALIVE", - /* 327 */ "cmd ::= SHOW db_name_cond_opt VIEWS like_pattern_opt", - /* 328 */ "cmd ::= SHOW CREATE VIEW full_table_name", - /* 329 */ "cmd ::= SHOW COMPACTS", - /* 330 */ "cmd ::= SHOW COMPACT NK_INTEGER", - /* 331 */ "table_kind_db_name_cond_opt ::=", - /* 332 */ "table_kind_db_name_cond_opt ::= table_kind", - /* 333 */ "table_kind_db_name_cond_opt ::= db_name NK_DOT", - /* 334 */ "table_kind_db_name_cond_opt ::= table_kind db_name NK_DOT", - /* 335 */ "table_kind ::= NORMAL", - /* 336 */ "table_kind ::= CHILD", - /* 337 */ "db_name_cond_opt ::=", - /* 338 */ "db_name_cond_opt ::= db_name NK_DOT", - /* 339 */ "like_pattern_opt ::=", - /* 340 */ "like_pattern_opt ::= LIKE NK_STRING", - /* 341 */ "table_name_cond ::= table_name", - /* 342 */ "from_db_opt ::=", - /* 343 */ "from_db_opt ::= FROM db_name", - /* 344 */ "tag_list_opt ::=", - /* 345 */ "tag_list_opt ::= tag_item", - /* 346 */ "tag_list_opt ::= tag_list_opt NK_COMMA tag_item", - /* 347 */ "tag_item ::= TBNAME", - /* 348 */ "tag_item ::= QTAGS", - /* 349 */ "tag_item ::= column_name", - /* 350 */ "tag_item ::= column_name column_alias", - /* 351 */ "tag_item ::= column_name AS column_alias", - /* 352 */ "db_kind_opt ::=", - /* 353 */ "db_kind_opt ::= USER", - /* 354 */ "db_kind_opt ::= SYSTEM", - /* 355 */ "cmd ::= CREATE TSMA not_exists_opt tsma_name ON full_table_name tsma_func_list INTERVAL NK_LP duration_literal NK_RP", - /* 356 */ "cmd ::= CREATE RECURSIVE TSMA not_exists_opt tsma_name ON full_table_name INTERVAL NK_LP duration_literal NK_RP", - /* 357 */ "cmd ::= DROP TSMA exists_opt full_tsma_name", - /* 358 */ "cmd ::= SHOW db_name_cond_opt TSMAS", - /* 359 */ "full_tsma_name ::= tsma_name", - /* 360 */ "full_tsma_name ::= db_name NK_DOT tsma_name", - /* 361 */ "tsma_func_list ::= FUNCTION NK_LP func_list NK_RP", - /* 362 */ "cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options", - /* 363 */ "cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP", - /* 364 */ "cmd ::= DROP INDEX exists_opt full_index_name", - /* 365 */ "full_index_name ::= index_name", - /* 366 */ "full_index_name ::= db_name NK_DOT index_name", - /* 367 */ "index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt", - /* 368 */ "index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt sma_stream_opt", - /* 369 */ "func_list ::= func", - /* 370 */ "func_list ::= func_list NK_COMMA func", - /* 371 */ "func ::= sma_func_name NK_LP expression_list NK_RP", - /* 372 */ "sma_func_name ::= function_name", - /* 373 */ "sma_func_name ::= COUNT", - /* 374 */ "sma_func_name ::= FIRST", - /* 375 */ "sma_func_name ::= LAST", - /* 376 */ "sma_func_name ::= LAST_ROW", - /* 377 */ "sma_stream_opt ::=", - /* 378 */ "sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal", - /* 379 */ "sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal", - /* 380 */ "sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal", - /* 381 */ "with_meta ::= AS", - /* 382 */ "with_meta ::= WITH META AS", - /* 383 */ "with_meta ::= ONLY META AS", - /* 384 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery", - /* 385 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name", - /* 386 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt", - /* 387 */ "cmd ::= DROP TOPIC exists_opt topic_name", - /* 388 */ "cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name", - /* 389 */ "cmd ::= DESC full_table_name", - /* 390 */ "cmd ::= DESCRIBE full_table_name", - /* 391 */ "cmd ::= RESET QUERY CACHE", - /* 392 */ "cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery", - /* 393 */ "cmd ::= EXPLAIN analyze_opt explain_options insert_query", - /* 394 */ "analyze_opt ::=", - /* 395 */ "analyze_opt ::= ANALYZE", - /* 396 */ "explain_options ::=", - /* 397 */ "explain_options ::= explain_options VERBOSE NK_BOOL", - /* 398 */ "explain_options ::= explain_options RATIO NK_FLOAT", - /* 399 */ "cmd ::= CREATE or_replace_opt agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt language_opt", - /* 400 */ "cmd ::= DROP FUNCTION exists_opt function_name", - /* 401 */ "agg_func_opt ::=", - /* 402 */ "agg_func_opt ::= AGGREGATE", - /* 403 */ "bufsize_opt ::=", - /* 404 */ "bufsize_opt ::= BUFSIZE NK_INTEGER", - /* 405 */ "language_opt ::=", - /* 406 */ "language_opt ::= LANGUAGE NK_STRING", - /* 407 */ "or_replace_opt ::=", - /* 408 */ "or_replace_opt ::= OR REPLACE", - /* 409 */ "cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery", - /* 410 */ "cmd ::= DROP VIEW exists_opt full_view_name", - /* 411 */ "full_view_name ::= view_name", - /* 412 */ "full_view_name ::= db_name NK_DOT view_name", - /* 413 */ "cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name col_list_opt tag_def_or_ref_opt subtable_opt AS query_or_subquery", - /* 414 */ "cmd ::= DROP STREAM exists_opt stream_name", - /* 415 */ "cmd ::= PAUSE STREAM exists_opt stream_name", - /* 416 */ "cmd ::= RESUME STREAM exists_opt ignore_opt stream_name", - /* 417 */ "col_list_opt ::=", - /* 418 */ "col_list_opt ::= NK_LP column_stream_def_list NK_RP", - /* 419 */ "column_stream_def_list ::= column_stream_def", - /* 420 */ "column_stream_def_list ::= column_stream_def_list NK_COMMA column_stream_def", - /* 421 */ "column_stream_def ::= column_name stream_col_options", - /* 422 */ "stream_col_options ::=", - /* 423 */ "stream_col_options ::= stream_col_options PRIMARY KEY", - /* 424 */ "tag_def_or_ref_opt ::=", - /* 425 */ "tag_def_or_ref_opt ::= tags_def", - /* 426 */ "tag_def_or_ref_opt ::= TAGS NK_LP column_stream_def_list NK_RP", - /* 427 */ "stream_options ::=", - /* 428 */ "stream_options ::= stream_options TRIGGER AT_ONCE", - /* 429 */ "stream_options ::= stream_options TRIGGER WINDOW_CLOSE", - /* 430 */ "stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal", - /* 431 */ "stream_options ::= stream_options WATERMARK duration_literal", - /* 432 */ "stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER", - /* 433 */ "stream_options ::= stream_options FILL_HISTORY NK_INTEGER", - /* 434 */ "stream_options ::= stream_options DELETE_MARK duration_literal", - /* 435 */ "stream_options ::= stream_options IGNORE UPDATE NK_INTEGER", - /* 436 */ "subtable_opt ::=", - /* 437 */ "subtable_opt ::= SUBTABLE NK_LP expression NK_RP", - /* 438 */ "ignore_opt ::=", - /* 439 */ "ignore_opt ::= IGNORE UNTREATED", - /* 440 */ "cmd ::= KILL CONNECTION NK_INTEGER", - /* 441 */ "cmd ::= KILL QUERY NK_STRING", - /* 442 */ "cmd ::= KILL TRANSACTION NK_INTEGER", - /* 443 */ "cmd ::= KILL COMPACT NK_INTEGER", - /* 444 */ "cmd ::= BALANCE VGROUP", - /* 445 */ "cmd ::= BALANCE VGROUP LEADER on_vgroup_id", - /* 446 */ "cmd ::= BALANCE VGROUP LEADER DATABASE db_name", - /* 447 */ "cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER", - /* 448 */ "cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list", - /* 449 */ "cmd ::= SPLIT VGROUP NK_INTEGER", - /* 450 */ "on_vgroup_id ::=", - /* 451 */ "on_vgroup_id ::= ON NK_INTEGER", - /* 452 */ "dnode_list ::= DNODE NK_INTEGER", - /* 453 */ "dnode_list ::= dnode_list DNODE NK_INTEGER", - /* 454 */ "cmd ::= DELETE FROM full_table_name where_clause_opt", - /* 455 */ "cmd ::= query_or_subquery", - /* 456 */ "cmd ::= insert_query", - /* 457 */ "insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery", - /* 458 */ "insert_query ::= INSERT INTO full_table_name query_or_subquery", - /* 459 */ "tags_literal ::= NK_INTEGER", - /* 460 */ "tags_literal ::= NK_INTEGER NK_PLUS duration_literal", - /* 461 */ "tags_literal ::= NK_INTEGER NK_MINUS duration_literal", - /* 462 */ "tags_literal ::= NK_PLUS NK_INTEGER", - /* 463 */ "tags_literal ::= NK_PLUS NK_INTEGER NK_PLUS duration_literal", - /* 464 */ "tags_literal ::= NK_PLUS NK_INTEGER NK_MINUS duration_literal", - /* 465 */ "tags_literal ::= NK_MINUS NK_INTEGER", - /* 466 */ "tags_literal ::= NK_MINUS NK_INTEGER NK_PLUS duration_literal", - /* 467 */ "tags_literal ::= NK_MINUS NK_INTEGER NK_MINUS duration_literal", - /* 468 */ "tags_literal ::= NK_FLOAT", - /* 469 */ "tags_literal ::= NK_PLUS NK_FLOAT", - /* 470 */ "tags_literal ::= NK_MINUS NK_FLOAT", - /* 471 */ "tags_literal ::= NK_BIN", - /* 472 */ "tags_literal ::= NK_BIN NK_PLUS duration_literal", - /* 473 */ "tags_literal ::= NK_BIN NK_MINUS duration_literal", - /* 474 */ "tags_literal ::= NK_PLUS NK_BIN", - /* 475 */ "tags_literal ::= NK_PLUS NK_BIN NK_PLUS duration_literal", - /* 476 */ "tags_literal ::= NK_PLUS NK_BIN NK_MINUS duration_literal", - /* 477 */ "tags_literal ::= NK_MINUS NK_BIN", - /* 478 */ "tags_literal ::= NK_MINUS NK_BIN NK_PLUS duration_literal", - /* 479 */ "tags_literal ::= NK_MINUS NK_BIN NK_MINUS duration_literal", - /* 480 */ "tags_literal ::= NK_HEX", - /* 481 */ "tags_literal ::= NK_HEX NK_PLUS duration_literal", - /* 482 */ "tags_literal ::= NK_HEX NK_MINUS duration_literal", - /* 483 */ "tags_literal ::= NK_PLUS NK_HEX", - /* 484 */ "tags_literal ::= NK_PLUS NK_HEX NK_PLUS duration_literal", - /* 485 */ "tags_literal ::= NK_PLUS NK_HEX NK_MINUS duration_literal", - /* 486 */ "tags_literal ::= NK_MINUS NK_HEX", - /* 487 */ "tags_literal ::= NK_MINUS NK_HEX NK_PLUS duration_literal", - /* 488 */ "tags_literal ::= NK_MINUS NK_HEX NK_MINUS duration_literal", - /* 489 */ "tags_literal ::= NK_STRING", - /* 490 */ "tags_literal ::= NK_STRING NK_PLUS duration_literal", - /* 491 */ "tags_literal ::= NK_STRING NK_MINUS duration_literal", - /* 492 */ "tags_literal ::= NK_BOOL", - /* 493 */ "tags_literal ::= NULL", - /* 494 */ "tags_literal ::= literal_func", - /* 495 */ "tags_literal ::= literal_func NK_PLUS duration_literal", - /* 496 */ "tags_literal ::= literal_func NK_MINUS duration_literal", - /* 497 */ "tags_literal_list ::= tags_literal", - /* 498 */ "tags_literal_list ::= tags_literal_list NK_COMMA tags_literal", - /* 499 */ "literal ::= NK_INTEGER", - /* 500 */ "literal ::= NK_FLOAT", - /* 501 */ "literal ::= NK_STRING", - /* 502 */ "literal ::= NK_BOOL", - /* 503 */ "literal ::= TIMESTAMP NK_STRING", - /* 504 */ "literal ::= duration_literal", - /* 505 */ "literal ::= NULL", - /* 506 */ "literal ::= NK_QUESTION", - /* 507 */ "duration_literal ::= NK_VARIABLE", - /* 508 */ "signed ::= NK_INTEGER", - /* 509 */ "signed ::= NK_PLUS NK_INTEGER", - /* 510 */ "signed ::= NK_MINUS NK_INTEGER", - /* 511 */ "signed ::= NK_FLOAT", - /* 512 */ "signed ::= NK_PLUS NK_FLOAT", - /* 513 */ "signed ::= NK_MINUS NK_FLOAT", - /* 514 */ "signed_literal ::= signed", - /* 515 */ "signed_literal ::= NK_STRING", - /* 516 */ "signed_literal ::= NK_BOOL", - /* 517 */ "signed_literal ::= TIMESTAMP NK_STRING", - /* 518 */ "signed_literal ::= duration_literal", - /* 519 */ "signed_literal ::= NULL", - /* 520 */ "signed_literal ::= literal_func", - /* 521 */ "signed_literal ::= NK_QUESTION", - /* 522 */ "literal_list ::= signed_literal", - /* 523 */ "literal_list ::= literal_list NK_COMMA signed_literal", - /* 524 */ "db_name ::= NK_ID", - /* 525 */ "table_name ::= NK_ID", - /* 526 */ "column_name ::= NK_ID", - /* 527 */ "function_name ::= NK_ID", - /* 528 */ "view_name ::= NK_ID", - /* 529 */ "table_alias ::= NK_ID", - /* 530 */ "column_alias ::= NK_ID", - /* 531 */ "column_alias ::= NK_ALIAS", - /* 532 */ "user_name ::= NK_ID", - /* 533 */ "topic_name ::= NK_ID", - /* 534 */ "stream_name ::= NK_ID", - /* 535 */ "cgroup_name ::= NK_ID", - /* 536 */ "index_name ::= NK_ID", - /* 537 */ "tsma_name ::= NK_ID", - /* 538 */ "expr_or_subquery ::= expression", - /* 539 */ "expression ::= literal", - /* 540 */ "expression ::= pseudo_column", - /* 541 */ "expression ::= column_reference", - /* 542 */ "expression ::= function_expression", - /* 543 */ "expression ::= case_when_expression", - /* 544 */ "expression ::= NK_LP expression NK_RP", - /* 545 */ "expression ::= NK_PLUS expr_or_subquery", - /* 546 */ "expression ::= NK_MINUS expr_or_subquery", - /* 547 */ "expression ::= expr_or_subquery NK_PLUS expr_or_subquery", - /* 548 */ "expression ::= expr_or_subquery NK_MINUS expr_or_subquery", - /* 549 */ "expression ::= expr_or_subquery NK_STAR expr_or_subquery", - /* 550 */ "expression ::= expr_or_subquery NK_SLASH expr_or_subquery", - /* 551 */ "expression ::= expr_or_subquery NK_REM expr_or_subquery", - /* 552 */ "expression ::= column_reference NK_ARROW NK_STRING", - /* 553 */ "expression ::= expr_or_subquery NK_BITAND expr_or_subquery", - /* 554 */ "expression ::= expr_or_subquery NK_BITOR expr_or_subquery", - /* 555 */ "expression_list ::= expr_or_subquery", - /* 556 */ "expression_list ::= expression_list NK_COMMA expr_or_subquery", - /* 557 */ "column_reference ::= column_name", - /* 558 */ "column_reference ::= table_name NK_DOT column_name", - /* 559 */ "column_reference ::= NK_ALIAS", - /* 560 */ "column_reference ::= table_name NK_DOT NK_ALIAS", - /* 561 */ "pseudo_column ::= ROWTS", - /* 562 */ "pseudo_column ::= TBNAME", - /* 563 */ "pseudo_column ::= table_name NK_DOT TBNAME", - /* 564 */ "pseudo_column ::= QSTART", - /* 565 */ "pseudo_column ::= QEND", - /* 566 */ "pseudo_column ::= QDURATION", - /* 567 */ "pseudo_column ::= WSTART", - /* 568 */ "pseudo_column ::= WEND", - /* 569 */ "pseudo_column ::= WDURATION", - /* 570 */ "pseudo_column ::= IROWTS", - /* 571 */ "pseudo_column ::= ISFILLED", - /* 572 */ "pseudo_column ::= QTAGS", - /* 573 */ "pseudo_column ::= FLOW", - /* 574 */ "pseudo_column ::= FHIGH", - /* 575 */ "pseudo_column ::= FROWTS", - /* 576 */ "function_expression ::= function_name NK_LP expression_list NK_RP", - /* 577 */ "function_expression ::= star_func NK_LP star_func_para_list NK_RP", - /* 578 */ "function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP", - /* 579 */ "function_expression ::= CAST NK_LP expr_or_subquery AS type_name_default_len NK_RP", - /* 580 */ "function_expression ::= POSITION NK_LP expr_or_subquery IN expr_or_subquery NK_RP", - /* 581 */ "function_expression ::= TRIM NK_LP expr_or_subquery NK_RP", - /* 582 */ "function_expression ::= TRIM NK_LP trim_specification_type FROM expr_or_subquery NK_RP", - /* 583 */ "function_expression ::= TRIM NK_LP expr_or_subquery FROM expr_or_subquery NK_RP", - /* 584 */ "function_expression ::= TRIM NK_LP trim_specification_type expr_or_subquery FROM expr_or_subquery NK_RP", - /* 585 */ "function_expression ::= substr_func NK_LP expression_list NK_RP", - /* 586 */ "function_expression ::= substr_func NK_LP expr_or_subquery FROM expr_or_subquery NK_RP", - /* 587 */ "function_expression ::= substr_func NK_LP expr_or_subquery FROM expr_or_subquery FOR expr_or_subquery NK_RP", - /* 588 */ "function_expression ::= REPLACE NK_LP expression_list NK_RP", - /* 589 */ "function_expression ::= literal_func", - /* 590 */ "function_expression ::= rand_func", - /* 591 */ "literal_func ::= noarg_func NK_LP NK_RP", - /* 592 */ "literal_func ::= NOW", - /* 593 */ "literal_func ::= TODAY", - /* 594 */ "rand_func ::= RAND NK_LP NK_RP", - /* 595 */ "rand_func ::= RAND NK_LP expression_list NK_RP", - /* 596 */ "substr_func ::= SUBSTR", - /* 597 */ "substr_func ::= SUBSTRING", - /* 598 */ "trim_specification_type ::= BOTH", - /* 599 */ "trim_specification_type ::= TRAILING", - /* 600 */ "trim_specification_type ::= LEADING", - /* 601 */ "noarg_func ::= NOW", - /* 602 */ "noarg_func ::= TODAY", - /* 603 */ "noarg_func ::= TIMEZONE", - /* 604 */ "noarg_func ::= DATABASE", - /* 605 */ "noarg_func ::= CLIENT_VERSION", - /* 606 */ "noarg_func ::= SERVER_VERSION", - /* 607 */ "noarg_func ::= SERVER_STATUS", - /* 608 */ "noarg_func ::= CURRENT_USER", - /* 609 */ "noarg_func ::= USER", - /* 610 */ "noarg_func ::= PI", - /* 611 */ "star_func ::= COUNT", - /* 612 */ "star_func ::= FIRST", - /* 613 */ "star_func ::= LAST", - /* 614 */ "star_func ::= LAST_ROW", - /* 615 */ "star_func_para_list ::= NK_STAR", - /* 616 */ "star_func_para_list ::= other_para_list", - /* 617 */ "other_para_list ::= star_func_para", - /* 618 */ "other_para_list ::= other_para_list NK_COMMA star_func_para", - /* 619 */ "star_func_para ::= expr_or_subquery", - /* 620 */ "star_func_para ::= table_name NK_DOT NK_STAR", - /* 621 */ "case_when_expression ::= CASE when_then_list case_when_else_opt END", - /* 622 */ "case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END", - /* 623 */ "when_then_list ::= when_then_expr", - /* 624 */ "when_then_list ::= when_then_list when_then_expr", - /* 625 */ "when_then_expr ::= WHEN common_expression THEN common_expression", - /* 626 */ "case_when_else_opt ::=", - /* 627 */ "case_when_else_opt ::= ELSE common_expression", - /* 628 */ "predicate ::= expr_or_subquery compare_op expr_or_subquery", - /* 629 */ "predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery", - /* 630 */ "predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery", - /* 631 */ "predicate ::= expr_or_subquery IS NULL", - /* 632 */ "predicate ::= expr_or_subquery IS NOT NULL", - /* 633 */ "predicate ::= expr_or_subquery in_op in_predicate_value", - /* 634 */ "compare_op ::= NK_LT", - /* 635 */ "compare_op ::= NK_GT", - /* 636 */ "compare_op ::= NK_LE", - /* 637 */ "compare_op ::= NK_GE", - /* 638 */ "compare_op ::= NK_NE", - /* 639 */ "compare_op ::= NK_EQ", - /* 640 */ "compare_op ::= LIKE", - /* 641 */ "compare_op ::= NOT LIKE", - /* 642 */ "compare_op ::= MATCH", - /* 643 */ "compare_op ::= NMATCH", - /* 644 */ "compare_op ::= CONTAINS", - /* 645 */ "in_op ::= IN", - /* 646 */ "in_op ::= NOT IN", - /* 647 */ "in_predicate_value ::= NK_LP literal_list NK_RP", - /* 648 */ "boolean_value_expression ::= boolean_primary", - /* 649 */ "boolean_value_expression ::= NOT boolean_primary", - /* 650 */ "boolean_value_expression ::= boolean_value_expression OR boolean_value_expression", - /* 651 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression", - /* 652 */ "boolean_primary ::= predicate", - /* 653 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP", - /* 654 */ "common_expression ::= expr_or_subquery", - /* 655 */ "common_expression ::= boolean_value_expression", - /* 656 */ "from_clause_opt ::=", - /* 657 */ "from_clause_opt ::= FROM table_reference_list", - /* 658 */ "table_reference_list ::= table_reference", - /* 659 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference", - /* 660 */ "table_reference ::= table_primary", - /* 661 */ "table_reference ::= joined_table", - /* 662 */ "table_primary ::= table_name alias_opt", - /* 663 */ "table_primary ::= db_name NK_DOT table_name alias_opt", - /* 664 */ "table_primary ::= subquery alias_opt", - /* 665 */ "table_primary ::= parenthesized_joined_table", - /* 666 */ "alias_opt ::=", - /* 667 */ "alias_opt ::= table_alias", - /* 668 */ "alias_opt ::= AS table_alias", - /* 669 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP", - /* 670 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP", - /* 671 */ "joined_table ::= table_reference join_type join_subtype JOIN table_reference join_on_clause_opt window_offset_clause_opt jlimit_clause_opt", - /* 672 */ "join_type ::=", - /* 673 */ "join_type ::= INNER", - /* 674 */ "join_type ::= LEFT", - /* 675 */ "join_type ::= RIGHT", - /* 676 */ "join_type ::= FULL", - /* 677 */ "join_subtype ::=", - /* 678 */ "join_subtype ::= OUTER", - /* 679 */ "join_subtype ::= SEMI", - /* 680 */ "join_subtype ::= ANTI", - /* 681 */ "join_subtype ::= ASOF", - /* 682 */ "join_subtype ::= WINDOW", - /* 683 */ "join_on_clause_opt ::=", - /* 684 */ "join_on_clause_opt ::= ON search_condition", - /* 685 */ "window_offset_clause_opt ::=", - /* 686 */ "window_offset_clause_opt ::= WINDOW_OFFSET NK_LP window_offset_literal NK_COMMA window_offset_literal NK_RP", - /* 687 */ "window_offset_literal ::= NK_VARIABLE", - /* 688 */ "window_offset_literal ::= NK_MINUS NK_VARIABLE", - /* 689 */ "jlimit_clause_opt ::=", - /* 690 */ "jlimit_clause_opt ::= JLIMIT NK_INTEGER", - /* 691 */ "query_specification ::= SELECT hint_list set_quantifier_opt tag_mode_opt select_list from_clause_opt where_clause_opt partition_by_clause_opt range_opt every_opt fill_opt twindow_clause_opt group_by_clause_opt having_clause_opt", - /* 692 */ "hint_list ::=", - /* 693 */ "hint_list ::= NK_HINT", - /* 694 */ "tag_mode_opt ::=", - /* 695 */ "tag_mode_opt ::= TAGS", - /* 696 */ "set_quantifier_opt ::=", - /* 697 */ "set_quantifier_opt ::= DISTINCT", - /* 698 */ "set_quantifier_opt ::= ALL", - /* 699 */ "select_list ::= select_item", - /* 700 */ "select_list ::= select_list NK_COMMA select_item", - /* 701 */ "select_item ::= NK_STAR", - /* 702 */ "select_item ::= common_expression", - /* 703 */ "select_item ::= common_expression column_alias", - /* 704 */ "select_item ::= common_expression AS column_alias", - /* 705 */ "select_item ::= table_name NK_DOT NK_STAR", - /* 706 */ "where_clause_opt ::=", - /* 707 */ "where_clause_opt ::= WHERE search_condition", - /* 708 */ "partition_by_clause_opt ::=", - /* 709 */ "partition_by_clause_opt ::= PARTITION BY partition_list", - /* 710 */ "partition_list ::= partition_item", - /* 711 */ "partition_list ::= partition_list NK_COMMA partition_item", - /* 712 */ "partition_item ::= expr_or_subquery", - /* 713 */ "partition_item ::= expr_or_subquery column_alias", - /* 714 */ "partition_item ::= expr_or_subquery AS column_alias", - /* 715 */ "twindow_clause_opt ::=", - /* 716 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP", - /* 717 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP", - /* 718 */ "twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt", - /* 719 */ "twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_COMMA interval_sliding_duration_literal NK_RP sliding_opt fill_opt", - /* 720 */ "twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition", - /* 721 */ "twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_RP", - /* 722 */ "twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP", - /* 723 */ "twindow_clause_opt ::= ANOMALY_WINDOW NK_LP expr_or_subquery NK_RP", - /* 724 */ "twindow_clause_opt ::= ANOMALY_WINDOW NK_LP expr_or_subquery NK_COMMA NK_STRING NK_RP", - /* 725 */ "sliding_opt ::=", - /* 726 */ "sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP", - /* 727 */ "interval_sliding_duration_literal ::= NK_VARIABLE", - /* 728 */ "interval_sliding_duration_literal ::= NK_STRING", - /* 729 */ "interval_sliding_duration_literal ::= NK_INTEGER", - /* 730 */ "fill_opt ::=", - /* 731 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP", - /* 732 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP", - /* 733 */ "fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP", - /* 734 */ "fill_mode ::= NONE", - /* 735 */ "fill_mode ::= PREV", - /* 736 */ "fill_mode ::= NULL", - /* 737 */ "fill_mode ::= NULL_F", - /* 738 */ "fill_mode ::= LINEAR", - /* 739 */ "fill_mode ::= NEXT", - /* 740 */ "group_by_clause_opt ::=", - /* 741 */ "group_by_clause_opt ::= GROUP BY group_by_list", - /* 742 */ "group_by_list ::= expr_or_subquery", - /* 743 */ "group_by_list ::= group_by_list NK_COMMA expr_or_subquery", - /* 744 */ "having_clause_opt ::=", - /* 745 */ "having_clause_opt ::= HAVING search_condition", - /* 746 */ "range_opt ::=", - /* 747 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP", - /* 748 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_RP", - /* 749 */ "every_opt ::=", - /* 750 */ "every_opt ::= EVERY NK_LP duration_literal NK_RP", - /* 751 */ "query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt", - /* 752 */ "query_simple ::= query_specification", - /* 753 */ "query_simple ::= union_query_expression", - /* 754 */ "union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery", - /* 755 */ "union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery", - /* 756 */ "query_simple_or_subquery ::= query_simple", - /* 757 */ "query_simple_or_subquery ::= subquery", - /* 758 */ "query_or_subquery ::= query_expression", - /* 759 */ "query_or_subquery ::= subquery", - /* 760 */ "order_by_clause_opt ::=", - /* 761 */ "order_by_clause_opt ::= ORDER BY sort_specification_list", - /* 762 */ "slimit_clause_opt ::=", - /* 763 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER", - /* 764 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER", - /* 765 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER", - /* 766 */ "limit_clause_opt ::=", - /* 767 */ "limit_clause_opt ::= LIMIT NK_INTEGER", - /* 768 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER", - /* 769 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER", - /* 770 */ "subquery ::= NK_LP query_expression NK_RP", - /* 771 */ "subquery ::= NK_LP subquery NK_RP", - /* 772 */ "search_condition ::= common_expression", - /* 773 */ "sort_specification_list ::= sort_specification", - /* 774 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification", - /* 775 */ "sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt", - /* 776 */ "ordering_specification_opt ::=", - /* 777 */ "ordering_specification_opt ::= ASC", - /* 778 */ "ordering_specification_opt ::= DESC", - /* 779 */ "null_ordering_opt ::=", - /* 780 */ "null_ordering_opt ::= NULLS FIRST", - /* 781 */ "null_ordering_opt ::= NULLS LAST", - /* 782 */ "column_options ::=", - /* 783 */ "column_options ::= column_options PRIMARY KEY", - /* 784 */ "column_options ::= column_options NK_ID NK_STRING", + /* 104 */ "cmd ::= COMPACT VGROUPS IN NK_LP integer_list NK_RP start_opt end_opt", + /* 105 */ "not_exists_opt ::= IF NOT EXISTS", + /* 106 */ "not_exists_opt ::=", + /* 107 */ "exists_opt ::= IF EXISTS", + /* 108 */ "exists_opt ::=", + /* 109 */ "db_options ::=", + /* 110 */ "db_options ::= db_options BUFFER NK_INTEGER", + /* 111 */ "db_options ::= db_options CACHEMODEL NK_STRING", + /* 112 */ "db_options ::= db_options CACHESIZE NK_INTEGER", + /* 113 */ "db_options ::= db_options COMP NK_INTEGER", + /* 114 */ "db_options ::= db_options DURATION NK_INTEGER", + /* 115 */ "db_options ::= db_options DURATION NK_VARIABLE", + /* 116 */ "db_options ::= db_options MAXROWS NK_INTEGER", + /* 117 */ "db_options ::= db_options MINROWS NK_INTEGER", + /* 118 */ "db_options ::= db_options KEEP integer_list", + /* 119 */ "db_options ::= db_options KEEP variable_list", + /* 120 */ "db_options ::= db_options PAGES NK_INTEGER", + /* 121 */ "db_options ::= db_options PAGESIZE NK_INTEGER", + /* 122 */ "db_options ::= db_options TSDB_PAGESIZE NK_INTEGER", + /* 123 */ "db_options ::= db_options PRECISION NK_STRING", + /* 124 */ "db_options ::= db_options REPLICA NK_INTEGER", + /* 125 */ "db_options ::= db_options VGROUPS NK_INTEGER", + /* 126 */ "db_options ::= db_options SINGLE_STABLE NK_INTEGER", + /* 127 */ "db_options ::= db_options RETENTIONS retention_list", + /* 128 */ "db_options ::= db_options SCHEMALESS NK_INTEGER", + /* 129 */ "db_options ::= db_options WAL_LEVEL NK_INTEGER", + /* 130 */ "db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER", + /* 131 */ "db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER", + /* 132 */ "db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER", + /* 133 */ "db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER", + /* 134 */ "db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER", + /* 135 */ "db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER", + /* 136 */ "db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER", + /* 137 */ "db_options ::= db_options STT_TRIGGER NK_INTEGER", + /* 138 */ "db_options ::= db_options TABLE_PREFIX signed", + /* 139 */ "db_options ::= db_options TABLE_SUFFIX signed", + /* 140 */ "db_options ::= db_options S3_CHUNKPAGES NK_INTEGER", + /* 141 */ "db_options ::= db_options S3_KEEPLOCAL NK_INTEGER", + /* 142 */ "db_options ::= db_options S3_KEEPLOCAL NK_VARIABLE", + /* 143 */ "db_options ::= db_options S3_COMPACT NK_INTEGER", + /* 144 */ "db_options ::= db_options KEEP_TIME_OFFSET NK_INTEGER", + /* 145 */ "db_options ::= db_options ENCRYPT_ALGORITHM NK_STRING", + /* 146 */ "db_options ::= db_options DNODES NK_STRING", + /* 147 */ "alter_db_options ::= alter_db_option", + /* 148 */ "alter_db_options ::= alter_db_options alter_db_option", + /* 149 */ "alter_db_option ::= BUFFER NK_INTEGER", + /* 150 */ "alter_db_option ::= CACHEMODEL NK_STRING", + /* 151 */ "alter_db_option ::= CACHESIZE NK_INTEGER", + /* 152 */ "alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER", + /* 153 */ "alter_db_option ::= KEEP integer_list", + /* 154 */ "alter_db_option ::= KEEP variable_list", + /* 155 */ "alter_db_option ::= PAGES NK_INTEGER", + /* 156 */ "alter_db_option ::= REPLICA NK_INTEGER", + /* 157 */ "alter_db_option ::= WAL_LEVEL NK_INTEGER", + /* 158 */ "alter_db_option ::= STT_TRIGGER NK_INTEGER", + /* 159 */ "alter_db_option ::= MINROWS NK_INTEGER", + /* 160 */ "alter_db_option ::= WAL_RETENTION_PERIOD NK_INTEGER", + /* 161 */ "alter_db_option ::= WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER", + /* 162 */ "alter_db_option ::= WAL_RETENTION_SIZE NK_INTEGER", + /* 163 */ "alter_db_option ::= WAL_RETENTION_SIZE NK_MINUS NK_INTEGER", + /* 164 */ "alter_db_option ::= S3_KEEPLOCAL NK_INTEGER", + /* 165 */ "alter_db_option ::= S3_KEEPLOCAL NK_VARIABLE", + /* 166 */ "alter_db_option ::= S3_COMPACT NK_INTEGER", + /* 167 */ "alter_db_option ::= KEEP_TIME_OFFSET NK_INTEGER", + /* 168 */ "alter_db_option ::= ENCRYPT_ALGORITHM NK_STRING", + /* 169 */ "integer_list ::= NK_INTEGER", + /* 170 */ "integer_list ::= integer_list NK_COMMA NK_INTEGER", + /* 171 */ "variable_list ::= NK_VARIABLE", + /* 172 */ "variable_list ::= variable_list NK_COMMA NK_VARIABLE", + /* 173 */ "retention_list ::= retention", + /* 174 */ "retention_list ::= retention_list NK_COMMA retention", + /* 175 */ "retention ::= NK_VARIABLE NK_COLON NK_VARIABLE", + /* 176 */ "retention ::= NK_MINUS NK_COLON NK_VARIABLE", + /* 177 */ "speed_opt ::=", + /* 178 */ "speed_opt ::= BWLIMIT NK_INTEGER", + /* 179 */ "start_opt ::=", + /* 180 */ "start_opt ::= START WITH NK_INTEGER", + /* 181 */ "start_opt ::= START WITH NK_STRING", + /* 182 */ "start_opt ::= START WITH TIMESTAMP NK_STRING", + /* 183 */ "end_opt ::=", + /* 184 */ "end_opt ::= END WITH NK_INTEGER", + /* 185 */ "end_opt ::= END WITH NK_STRING", + /* 186 */ "end_opt ::= END WITH TIMESTAMP NK_STRING", + /* 187 */ "cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options", + /* 188 */ "cmd ::= CREATE TABLE multi_create_clause", + /* 189 */ "cmd ::= CREATE TABLE not_exists_opt USING full_table_name NK_LP tag_list_opt NK_RP FILE NK_STRING", + /* 190 */ "cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options", + /* 191 */ "cmd ::= DROP TABLE with_opt multi_drop_clause", + /* 192 */ "cmd ::= DROP STABLE with_opt exists_opt full_table_name", + /* 193 */ "cmd ::= ALTER TABLE alter_table_clause", + /* 194 */ "cmd ::= ALTER STABLE alter_table_clause", + /* 195 */ "alter_table_clause ::= full_table_name alter_table_options", + /* 196 */ "alter_table_clause ::= full_table_name ADD COLUMN column_name type_name column_options", + /* 197 */ "alter_table_clause ::= full_table_name DROP COLUMN column_name", + /* 198 */ "alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name", + /* 199 */ "alter_table_clause ::= full_table_name MODIFY COLUMN column_name column_options", + /* 200 */ "alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name", + /* 201 */ "alter_table_clause ::= full_table_name ADD TAG column_name type_name", + /* 202 */ "alter_table_clause ::= full_table_name DROP TAG column_name", + /* 203 */ "alter_table_clause ::= full_table_name MODIFY TAG column_name type_name", + /* 204 */ "alter_table_clause ::= full_table_name RENAME TAG column_name column_name", + /* 205 */ "alter_table_clause ::= full_table_name SET TAG column_name NK_EQ tags_literal", + /* 206 */ "multi_create_clause ::= create_subtable_clause", + /* 207 */ "multi_create_clause ::= multi_create_clause create_subtable_clause", + /* 208 */ "create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_cols_opt TAGS NK_LP tags_literal_list NK_RP table_options", + /* 209 */ "multi_drop_clause ::= drop_table_clause", + /* 210 */ "multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause", + /* 211 */ "drop_table_clause ::= exists_opt full_table_name", + /* 212 */ "with_opt ::=", + /* 213 */ "with_opt ::= WITH", + /* 214 */ "specific_cols_opt ::=", + /* 215 */ "specific_cols_opt ::= NK_LP col_name_list NK_RP", + /* 216 */ "full_table_name ::= table_name", + /* 217 */ "full_table_name ::= db_name NK_DOT table_name", + /* 218 */ "tag_def_list ::= tag_def", + /* 219 */ "tag_def_list ::= tag_def_list NK_COMMA tag_def", + /* 220 */ "tag_def ::= column_name type_name", + /* 221 */ "column_def_list ::= column_def", + /* 222 */ "column_def_list ::= column_def_list NK_COMMA column_def", + /* 223 */ "column_def ::= column_name type_name column_options", + /* 224 */ "type_name ::= BOOL", + /* 225 */ "type_name ::= TINYINT", + /* 226 */ "type_name ::= SMALLINT", + /* 227 */ "type_name ::= INT", + /* 228 */ "type_name ::= INTEGER", + /* 229 */ "type_name ::= BIGINT", + /* 230 */ "type_name ::= FLOAT", + /* 231 */ "type_name ::= DOUBLE", + /* 232 */ "type_name ::= BINARY NK_LP NK_INTEGER NK_RP", + /* 233 */ "type_name ::= TIMESTAMP", + /* 234 */ "type_name ::= NCHAR NK_LP NK_INTEGER NK_RP", + /* 235 */ "type_name ::= TINYINT UNSIGNED", + /* 236 */ "type_name ::= SMALLINT UNSIGNED", + /* 237 */ "type_name ::= INT UNSIGNED", + /* 238 */ "type_name ::= BIGINT UNSIGNED", + /* 239 */ "type_name ::= JSON", + /* 240 */ "type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP", + /* 241 */ "type_name ::= MEDIUMBLOB", + /* 242 */ "type_name ::= BLOB", + /* 243 */ "type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP", + /* 244 */ "type_name ::= GEOMETRY NK_LP NK_INTEGER NK_RP", + /* 245 */ "type_name ::= DECIMAL", + /* 246 */ "type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP", + /* 247 */ "type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP", + /* 248 */ "type_name_default_len ::= BINARY", + /* 249 */ "type_name_default_len ::= NCHAR", + /* 250 */ "type_name_default_len ::= VARCHAR", + /* 251 */ "type_name_default_len ::= VARBINARY", + /* 252 */ "tags_def_opt ::=", + /* 253 */ "tags_def_opt ::= tags_def", + /* 254 */ "tags_def ::= TAGS NK_LP tag_def_list NK_RP", + /* 255 */ "table_options ::=", + /* 256 */ "table_options ::= table_options COMMENT NK_STRING", + /* 257 */ "table_options ::= table_options MAX_DELAY duration_list", + /* 258 */ "table_options ::= table_options WATERMARK duration_list", + /* 259 */ "table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP", + /* 260 */ "table_options ::= table_options TTL NK_INTEGER", + /* 261 */ "table_options ::= table_options SMA NK_LP col_name_list NK_RP", + /* 262 */ "table_options ::= table_options DELETE_MARK duration_list", + /* 263 */ "alter_table_options ::= alter_table_option", + /* 264 */ "alter_table_options ::= alter_table_options alter_table_option", + /* 265 */ "alter_table_option ::= COMMENT NK_STRING", + /* 266 */ "alter_table_option ::= TTL NK_INTEGER", + /* 267 */ "duration_list ::= duration_literal", + /* 268 */ "duration_list ::= duration_list NK_COMMA duration_literal", + /* 269 */ "rollup_func_list ::= rollup_func_name", + /* 270 */ "rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name", + /* 271 */ "rollup_func_name ::= function_name", + /* 272 */ "rollup_func_name ::= FIRST", + /* 273 */ "rollup_func_name ::= LAST", + /* 274 */ "col_name_list ::= col_name", + /* 275 */ "col_name_list ::= col_name_list NK_COMMA col_name", + /* 276 */ "col_name ::= column_name", + /* 277 */ "cmd ::= SHOW DNODES", + /* 278 */ "cmd ::= SHOW USERS", + /* 279 */ "cmd ::= SHOW USERS FULL", + /* 280 */ "cmd ::= SHOW USER PRIVILEGES", + /* 281 */ "cmd ::= SHOW db_kind_opt DATABASES", + /* 282 */ "cmd ::= SHOW table_kind_db_name_cond_opt TABLES like_pattern_opt", + /* 283 */ "cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt", + /* 284 */ "cmd ::= SHOW db_name_cond_opt VGROUPS", + /* 285 */ "cmd ::= SHOW MNODES", + /* 286 */ "cmd ::= SHOW QNODES", + /* 287 */ "cmd ::= SHOW ANODES", + /* 288 */ "cmd ::= SHOW ANODES FULL", + /* 289 */ "cmd ::= SHOW ARBGROUPS", + /* 290 */ "cmd ::= SHOW FUNCTIONS", + /* 291 */ "cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt", + /* 292 */ "cmd ::= SHOW INDEXES FROM db_name NK_DOT table_name", + /* 293 */ "cmd ::= SHOW STREAMS", + /* 294 */ "cmd ::= SHOW ACCOUNTS", + /* 295 */ "cmd ::= SHOW APPS", + /* 296 */ "cmd ::= SHOW CONNECTIONS", + /* 297 */ "cmd ::= SHOW LICENCES", + /* 298 */ "cmd ::= SHOW GRANTS", + /* 299 */ "cmd ::= SHOW GRANTS FULL", + /* 300 */ "cmd ::= SHOW GRANTS LOGS", + /* 301 */ "cmd ::= SHOW CLUSTER MACHINES", + /* 302 */ "cmd ::= SHOW CREATE DATABASE db_name", + /* 303 */ "cmd ::= SHOW CREATE TABLE full_table_name", + /* 304 */ "cmd ::= SHOW CREATE STABLE full_table_name", + /* 305 */ "cmd ::= SHOW ENCRYPTIONS", + /* 306 */ "cmd ::= SHOW QUERIES", + /* 307 */ "cmd ::= SHOW SCORES", + /* 308 */ "cmd ::= SHOW TOPICS", + /* 309 */ "cmd ::= SHOW VARIABLES", + /* 310 */ "cmd ::= SHOW CLUSTER VARIABLES", + /* 311 */ "cmd ::= SHOW LOCAL VARIABLES", + /* 312 */ "cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt", + /* 313 */ "cmd ::= SHOW BNODES", + /* 314 */ "cmd ::= SHOW SNODES", + /* 315 */ "cmd ::= SHOW CLUSTER", + /* 316 */ "cmd ::= SHOW TRANSACTIONS", + /* 317 */ "cmd ::= SHOW TABLE DISTRIBUTED full_table_name", + /* 318 */ "cmd ::= SHOW CONSUMERS", + /* 319 */ "cmd ::= SHOW SUBSCRIPTIONS", + /* 320 */ "cmd ::= SHOW TAGS FROM table_name_cond from_db_opt", + /* 321 */ "cmd ::= SHOW TAGS FROM db_name NK_DOT table_name", + /* 322 */ "cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt", + /* 323 */ "cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name", + /* 324 */ "cmd ::= SHOW VNODES ON DNODE NK_INTEGER", + /* 325 */ "cmd ::= SHOW VNODES", + /* 326 */ "cmd ::= SHOW db_name_cond_opt ALIVE", + /* 327 */ "cmd ::= SHOW CLUSTER ALIVE", + /* 328 */ "cmd ::= SHOW db_name_cond_opt VIEWS like_pattern_opt", + /* 329 */ "cmd ::= SHOW CREATE VIEW full_table_name", + /* 330 */ "cmd ::= SHOW COMPACTS", + /* 331 */ "cmd ::= SHOW COMPACT NK_INTEGER", + /* 332 */ "table_kind_db_name_cond_opt ::=", + /* 333 */ "table_kind_db_name_cond_opt ::= table_kind", + /* 334 */ "table_kind_db_name_cond_opt ::= db_name NK_DOT", + /* 335 */ "table_kind_db_name_cond_opt ::= table_kind db_name NK_DOT", + /* 336 */ "table_kind ::= NORMAL", + /* 337 */ "table_kind ::= CHILD", + /* 338 */ "db_name_cond_opt ::=", + /* 339 */ "db_name_cond_opt ::= db_name NK_DOT", + /* 340 */ "like_pattern_opt ::=", + /* 341 */ "like_pattern_opt ::= LIKE NK_STRING", + /* 342 */ "table_name_cond ::= table_name", + /* 343 */ "from_db_opt ::=", + /* 344 */ "from_db_opt ::= FROM db_name", + /* 345 */ "tag_list_opt ::=", + /* 346 */ "tag_list_opt ::= tag_item", + /* 347 */ "tag_list_opt ::= tag_list_opt NK_COMMA tag_item", + /* 348 */ "tag_item ::= TBNAME", + /* 349 */ "tag_item ::= QTAGS", + /* 350 */ "tag_item ::= column_name", + /* 351 */ "tag_item ::= column_name column_alias", + /* 352 */ "tag_item ::= column_name AS column_alias", + /* 353 */ "db_kind_opt ::=", + /* 354 */ "db_kind_opt ::= USER", + /* 355 */ "db_kind_opt ::= SYSTEM", + /* 356 */ "cmd ::= CREATE TSMA not_exists_opt tsma_name ON full_table_name tsma_func_list INTERVAL NK_LP duration_literal NK_RP", + /* 357 */ "cmd ::= CREATE RECURSIVE TSMA not_exists_opt tsma_name ON full_table_name INTERVAL NK_LP duration_literal NK_RP", + /* 358 */ "cmd ::= DROP TSMA exists_opt full_tsma_name", + /* 359 */ "cmd ::= SHOW db_name_cond_opt TSMAS", + /* 360 */ "full_tsma_name ::= tsma_name", + /* 361 */ "full_tsma_name ::= db_name NK_DOT tsma_name", + /* 362 */ "tsma_func_list ::= FUNCTION NK_LP func_list NK_RP", + /* 363 */ "cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options", + /* 364 */ "cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP", + /* 365 */ "cmd ::= DROP INDEX exists_opt full_index_name", + /* 366 */ "full_index_name ::= index_name", + /* 367 */ "full_index_name ::= db_name NK_DOT index_name", + /* 368 */ "index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt", + /* 369 */ "index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt sma_stream_opt", + /* 370 */ "func_list ::= func", + /* 371 */ "func_list ::= func_list NK_COMMA func", + /* 372 */ "func ::= sma_func_name NK_LP expression_list NK_RP", + /* 373 */ "sma_func_name ::= function_name", + /* 374 */ "sma_func_name ::= COUNT", + /* 375 */ "sma_func_name ::= FIRST", + /* 376 */ "sma_func_name ::= LAST", + /* 377 */ "sma_func_name ::= LAST_ROW", + /* 378 */ "sma_stream_opt ::=", + /* 379 */ "sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal", + /* 380 */ "sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal", + /* 381 */ "sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal", + /* 382 */ "with_meta ::= AS", + /* 383 */ "with_meta ::= WITH META AS", + /* 384 */ "with_meta ::= ONLY META AS", + /* 385 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery", + /* 386 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name", + /* 387 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt", + /* 388 */ "cmd ::= DROP TOPIC exists_opt topic_name", + /* 389 */ "cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name", + /* 390 */ "cmd ::= DESC full_table_name", + /* 391 */ "cmd ::= DESCRIBE full_table_name", + /* 392 */ "cmd ::= RESET QUERY CACHE", + /* 393 */ "cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery", + /* 394 */ "cmd ::= EXPLAIN analyze_opt explain_options insert_query", + /* 395 */ "analyze_opt ::=", + /* 396 */ "analyze_opt ::= ANALYZE", + /* 397 */ "explain_options ::=", + /* 398 */ "explain_options ::= explain_options VERBOSE NK_BOOL", + /* 399 */ "explain_options ::= explain_options RATIO NK_FLOAT", + /* 400 */ "cmd ::= CREATE or_replace_opt agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt language_opt", + /* 401 */ "cmd ::= DROP FUNCTION exists_opt function_name", + /* 402 */ "agg_func_opt ::=", + /* 403 */ "agg_func_opt ::= AGGREGATE", + /* 404 */ "bufsize_opt ::=", + /* 405 */ "bufsize_opt ::= BUFSIZE NK_INTEGER", + /* 406 */ "language_opt ::=", + /* 407 */ "language_opt ::= LANGUAGE NK_STRING", + /* 408 */ "or_replace_opt ::=", + /* 409 */ "or_replace_opt ::= OR REPLACE", + /* 410 */ "cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery", + /* 411 */ "cmd ::= DROP VIEW exists_opt full_view_name", + /* 412 */ "full_view_name ::= view_name", + /* 413 */ "full_view_name ::= db_name NK_DOT view_name", + /* 414 */ "cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name col_list_opt tag_def_or_ref_opt subtable_opt AS query_or_subquery", + /* 415 */ "cmd ::= DROP STREAM exists_opt stream_name", + /* 416 */ "cmd ::= PAUSE STREAM exists_opt stream_name", + /* 417 */ "cmd ::= RESUME STREAM exists_opt ignore_opt stream_name", + /* 418 */ "col_list_opt ::=", + /* 419 */ "col_list_opt ::= NK_LP column_stream_def_list NK_RP", + /* 420 */ "column_stream_def_list ::= column_stream_def", + /* 421 */ "column_stream_def_list ::= column_stream_def_list NK_COMMA column_stream_def", + /* 422 */ "column_stream_def ::= column_name stream_col_options", + /* 423 */ "stream_col_options ::=", + /* 424 */ "stream_col_options ::= stream_col_options PRIMARY KEY", + /* 425 */ "tag_def_or_ref_opt ::=", + /* 426 */ "tag_def_or_ref_opt ::= tags_def", + /* 427 */ "tag_def_or_ref_opt ::= TAGS NK_LP column_stream_def_list NK_RP", + /* 428 */ "stream_options ::=", + /* 429 */ "stream_options ::= stream_options TRIGGER AT_ONCE", + /* 430 */ "stream_options ::= stream_options TRIGGER WINDOW_CLOSE", + /* 431 */ "stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal", + /* 432 */ "stream_options ::= stream_options WATERMARK duration_literal", + /* 433 */ "stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER", + /* 434 */ "stream_options ::= stream_options FILL_HISTORY NK_INTEGER", + /* 435 */ "stream_options ::= stream_options DELETE_MARK duration_literal", + /* 436 */ "stream_options ::= stream_options IGNORE UPDATE NK_INTEGER", + /* 437 */ "subtable_opt ::=", + /* 438 */ "subtable_opt ::= SUBTABLE NK_LP expression NK_RP", + /* 439 */ "ignore_opt ::=", + /* 440 */ "ignore_opt ::= IGNORE UNTREATED", + /* 441 */ "cmd ::= KILL CONNECTION NK_INTEGER", + /* 442 */ "cmd ::= KILL QUERY NK_STRING", + /* 443 */ "cmd ::= KILL TRANSACTION NK_INTEGER", + /* 444 */ "cmd ::= KILL COMPACT NK_INTEGER", + /* 445 */ "cmd ::= BALANCE VGROUP", + /* 446 */ "cmd ::= BALANCE VGROUP LEADER on_vgroup_id", + /* 447 */ "cmd ::= BALANCE VGROUP LEADER DATABASE db_name", + /* 448 */ "cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER", + /* 449 */ "cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list", + /* 450 */ "cmd ::= SPLIT VGROUP NK_INTEGER", + /* 451 */ "on_vgroup_id ::=", + /* 452 */ "on_vgroup_id ::= ON NK_INTEGER", + /* 453 */ "dnode_list ::= DNODE NK_INTEGER", + /* 454 */ "dnode_list ::= dnode_list DNODE NK_INTEGER", + /* 455 */ "cmd ::= DELETE FROM full_table_name where_clause_opt", + /* 456 */ "cmd ::= query_or_subquery", + /* 457 */ "cmd ::= insert_query", + /* 458 */ "insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery", + /* 459 */ "insert_query ::= INSERT INTO full_table_name query_or_subquery", + /* 460 */ "tags_literal ::= NK_INTEGER", + /* 461 */ "tags_literal ::= NK_INTEGER NK_PLUS duration_literal", + /* 462 */ "tags_literal ::= NK_INTEGER NK_MINUS duration_literal", + /* 463 */ "tags_literal ::= NK_PLUS NK_INTEGER", + /* 464 */ "tags_literal ::= NK_PLUS NK_INTEGER NK_PLUS duration_literal", + /* 465 */ "tags_literal ::= NK_PLUS NK_INTEGER NK_MINUS duration_literal", + /* 466 */ "tags_literal ::= NK_MINUS NK_INTEGER", + /* 467 */ "tags_literal ::= NK_MINUS NK_INTEGER NK_PLUS duration_literal", + /* 468 */ "tags_literal ::= NK_MINUS NK_INTEGER NK_MINUS duration_literal", + /* 469 */ "tags_literal ::= NK_FLOAT", + /* 470 */ "tags_literal ::= NK_PLUS NK_FLOAT", + /* 471 */ "tags_literal ::= NK_MINUS NK_FLOAT", + /* 472 */ "tags_literal ::= NK_BIN", + /* 473 */ "tags_literal ::= NK_BIN NK_PLUS duration_literal", + /* 474 */ "tags_literal ::= NK_BIN NK_MINUS duration_literal", + /* 475 */ "tags_literal ::= NK_PLUS NK_BIN", + /* 476 */ "tags_literal ::= NK_PLUS NK_BIN NK_PLUS duration_literal", + /* 477 */ "tags_literal ::= NK_PLUS NK_BIN NK_MINUS duration_literal", + /* 478 */ "tags_literal ::= NK_MINUS NK_BIN", + /* 479 */ "tags_literal ::= NK_MINUS NK_BIN NK_PLUS duration_literal", + /* 480 */ "tags_literal ::= NK_MINUS NK_BIN NK_MINUS duration_literal", + /* 481 */ "tags_literal ::= NK_HEX", + /* 482 */ "tags_literal ::= NK_HEX NK_PLUS duration_literal", + /* 483 */ "tags_literal ::= NK_HEX NK_MINUS duration_literal", + /* 484 */ "tags_literal ::= NK_PLUS NK_HEX", + /* 485 */ "tags_literal ::= NK_PLUS NK_HEX NK_PLUS duration_literal", + /* 486 */ "tags_literal ::= NK_PLUS NK_HEX NK_MINUS duration_literal", + /* 487 */ "tags_literal ::= NK_MINUS NK_HEX", + /* 488 */ "tags_literal ::= NK_MINUS NK_HEX NK_PLUS duration_literal", + /* 489 */ "tags_literal ::= NK_MINUS NK_HEX NK_MINUS duration_literal", + /* 490 */ "tags_literal ::= NK_STRING", + /* 491 */ "tags_literal ::= NK_STRING NK_PLUS duration_literal", + /* 492 */ "tags_literal ::= NK_STRING NK_MINUS duration_literal", + /* 493 */ "tags_literal ::= NK_BOOL", + /* 494 */ "tags_literal ::= NULL", + /* 495 */ "tags_literal ::= literal_func", + /* 496 */ "tags_literal ::= literal_func NK_PLUS duration_literal", + /* 497 */ "tags_literal ::= literal_func NK_MINUS duration_literal", + /* 498 */ "tags_literal_list ::= tags_literal", + /* 499 */ "tags_literal_list ::= tags_literal_list NK_COMMA tags_literal", + /* 500 */ "literal ::= NK_INTEGER", + /* 501 */ "literal ::= NK_FLOAT", + /* 502 */ "literal ::= NK_STRING", + /* 503 */ "literal ::= NK_BOOL", + /* 504 */ "literal ::= TIMESTAMP NK_STRING", + /* 505 */ "literal ::= duration_literal", + /* 506 */ "literal ::= NULL", + /* 507 */ "literal ::= NK_QUESTION", + /* 508 */ "duration_literal ::= NK_VARIABLE", + /* 509 */ "signed ::= NK_INTEGER", + /* 510 */ "signed ::= NK_PLUS NK_INTEGER", + /* 511 */ "signed ::= NK_MINUS NK_INTEGER", + /* 512 */ "signed ::= NK_FLOAT", + /* 513 */ "signed ::= NK_PLUS NK_FLOAT", + /* 514 */ "signed ::= NK_MINUS NK_FLOAT", + /* 515 */ "signed_literal ::= signed", + /* 516 */ "signed_literal ::= NK_STRING", + /* 517 */ "signed_literal ::= NK_BOOL", + /* 518 */ "signed_literal ::= TIMESTAMP NK_STRING", + /* 519 */ "signed_literal ::= duration_literal", + /* 520 */ "signed_literal ::= NULL", + /* 521 */ "signed_literal ::= literal_func", + /* 522 */ "signed_literal ::= NK_QUESTION", + /* 523 */ "literal_list ::= signed_literal", + /* 524 */ "literal_list ::= literal_list NK_COMMA signed_literal", + /* 525 */ "db_name ::= NK_ID", + /* 526 */ "table_name ::= NK_ID", + /* 527 */ "column_name ::= NK_ID", + /* 528 */ "function_name ::= NK_ID", + /* 529 */ "view_name ::= NK_ID", + /* 530 */ "table_alias ::= NK_ID", + /* 531 */ "column_alias ::= NK_ID", + /* 532 */ "column_alias ::= NK_ALIAS", + /* 533 */ "user_name ::= NK_ID", + /* 534 */ "topic_name ::= NK_ID", + /* 535 */ "stream_name ::= NK_ID", + /* 536 */ "cgroup_name ::= NK_ID", + /* 537 */ "index_name ::= NK_ID", + /* 538 */ "tsma_name ::= NK_ID", + /* 539 */ "expr_or_subquery ::= expression", + /* 540 */ "expression ::= literal", + /* 541 */ "expression ::= pseudo_column", + /* 542 */ "expression ::= column_reference", + /* 543 */ "expression ::= function_expression", + /* 544 */ "expression ::= case_when_expression", + /* 545 */ "expression ::= NK_LP expression NK_RP", + /* 546 */ "expression ::= NK_PLUS expr_or_subquery", + /* 547 */ "expression ::= NK_MINUS expr_or_subquery", + /* 548 */ "expression ::= expr_or_subquery NK_PLUS expr_or_subquery", + /* 549 */ "expression ::= expr_or_subquery NK_MINUS expr_or_subquery", + /* 550 */ "expression ::= expr_or_subquery NK_STAR expr_or_subquery", + /* 551 */ "expression ::= expr_or_subquery NK_SLASH expr_or_subquery", + /* 552 */ "expression ::= expr_or_subquery NK_REM expr_or_subquery", + /* 553 */ "expression ::= column_reference NK_ARROW NK_STRING", + /* 554 */ "expression ::= expr_or_subquery NK_BITAND expr_or_subquery", + /* 555 */ "expression ::= expr_or_subquery NK_BITOR expr_or_subquery", + /* 556 */ "expression_list ::= expr_or_subquery", + /* 557 */ "expression_list ::= expression_list NK_COMMA expr_or_subquery", + /* 558 */ "column_reference ::= column_name", + /* 559 */ "column_reference ::= table_name NK_DOT column_name", + /* 560 */ "column_reference ::= NK_ALIAS", + /* 561 */ "column_reference ::= table_name NK_DOT NK_ALIAS", + /* 562 */ "pseudo_column ::= ROWTS", + /* 563 */ "pseudo_column ::= TBNAME", + /* 564 */ "pseudo_column ::= table_name NK_DOT TBNAME", + /* 565 */ "pseudo_column ::= QSTART", + /* 566 */ "pseudo_column ::= QEND", + /* 567 */ "pseudo_column ::= QDURATION", + /* 568 */ "pseudo_column ::= WSTART", + /* 569 */ "pseudo_column ::= WEND", + /* 570 */ "pseudo_column ::= WDURATION", + /* 571 */ "pseudo_column ::= IROWTS", + /* 572 */ "pseudo_column ::= ISFILLED", + /* 573 */ "pseudo_column ::= QTAGS", + /* 574 */ "pseudo_column ::= FLOW", + /* 575 */ "pseudo_column ::= FHIGH", + /* 576 */ "pseudo_column ::= FROWTS", + /* 577 */ "function_expression ::= function_name NK_LP expression_list NK_RP", + /* 578 */ "function_expression ::= star_func NK_LP star_func_para_list NK_RP", + /* 579 */ "function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP", + /* 580 */ "function_expression ::= CAST NK_LP expr_or_subquery AS type_name_default_len NK_RP", + /* 581 */ "function_expression ::= POSITION NK_LP expr_or_subquery IN expr_or_subquery NK_RP", + /* 582 */ "function_expression ::= TRIM NK_LP expr_or_subquery NK_RP", + /* 583 */ "function_expression ::= TRIM NK_LP trim_specification_type FROM expr_or_subquery NK_RP", + /* 584 */ "function_expression ::= TRIM NK_LP expr_or_subquery FROM expr_or_subquery NK_RP", + /* 585 */ "function_expression ::= TRIM NK_LP trim_specification_type expr_or_subquery FROM expr_or_subquery NK_RP", + /* 586 */ "function_expression ::= substr_func NK_LP expression_list NK_RP", + /* 587 */ "function_expression ::= substr_func NK_LP expr_or_subquery FROM expr_or_subquery NK_RP", + /* 588 */ "function_expression ::= substr_func NK_LP expr_or_subquery FROM expr_or_subquery FOR expr_or_subquery NK_RP", + /* 589 */ "function_expression ::= REPLACE NK_LP expression_list NK_RP", + /* 590 */ "function_expression ::= literal_func", + /* 591 */ "function_expression ::= rand_func", + /* 592 */ "literal_func ::= noarg_func NK_LP NK_RP", + /* 593 */ "literal_func ::= NOW", + /* 594 */ "literal_func ::= TODAY", + /* 595 */ "rand_func ::= RAND NK_LP NK_RP", + /* 596 */ "rand_func ::= RAND NK_LP expression_list NK_RP", + /* 597 */ "substr_func ::= SUBSTR", + /* 598 */ "substr_func ::= SUBSTRING", + /* 599 */ "trim_specification_type ::= BOTH", + /* 600 */ "trim_specification_type ::= TRAILING", + /* 601 */ "trim_specification_type ::= LEADING", + /* 602 */ "noarg_func ::= NOW", + /* 603 */ "noarg_func ::= TODAY", + /* 604 */ "noarg_func ::= TIMEZONE", + /* 605 */ "noarg_func ::= DATABASE", + /* 606 */ "noarg_func ::= CLIENT_VERSION", + /* 607 */ "noarg_func ::= SERVER_VERSION", + /* 608 */ "noarg_func ::= SERVER_STATUS", + /* 609 */ "noarg_func ::= CURRENT_USER", + /* 610 */ "noarg_func ::= USER", + /* 611 */ "noarg_func ::= PI", + /* 612 */ "star_func ::= COUNT", + /* 613 */ "star_func ::= FIRST", + /* 614 */ "star_func ::= LAST", + /* 615 */ "star_func ::= LAST_ROW", + /* 616 */ "star_func_para_list ::= NK_STAR", + /* 617 */ "star_func_para_list ::= other_para_list", + /* 618 */ "other_para_list ::= star_func_para", + /* 619 */ "other_para_list ::= other_para_list NK_COMMA star_func_para", + /* 620 */ "star_func_para ::= expr_or_subquery", + /* 621 */ "star_func_para ::= table_name NK_DOT NK_STAR", + /* 622 */ "case_when_expression ::= CASE when_then_list case_when_else_opt END", + /* 623 */ "case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END", + /* 624 */ "when_then_list ::= when_then_expr", + /* 625 */ "when_then_list ::= when_then_list when_then_expr", + /* 626 */ "when_then_expr ::= WHEN common_expression THEN common_expression", + /* 627 */ "case_when_else_opt ::=", + /* 628 */ "case_when_else_opt ::= ELSE common_expression", + /* 629 */ "predicate ::= expr_or_subquery compare_op expr_or_subquery", + /* 630 */ "predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery", + /* 631 */ "predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery", + /* 632 */ "predicate ::= expr_or_subquery IS NULL", + /* 633 */ "predicate ::= expr_or_subquery IS NOT NULL", + /* 634 */ "predicate ::= expr_or_subquery in_op in_predicate_value", + /* 635 */ "compare_op ::= NK_LT", + /* 636 */ "compare_op ::= NK_GT", + /* 637 */ "compare_op ::= NK_LE", + /* 638 */ "compare_op ::= NK_GE", + /* 639 */ "compare_op ::= NK_NE", + /* 640 */ "compare_op ::= NK_EQ", + /* 641 */ "compare_op ::= LIKE", + /* 642 */ "compare_op ::= NOT LIKE", + /* 643 */ "compare_op ::= MATCH", + /* 644 */ "compare_op ::= NMATCH", + /* 645 */ "compare_op ::= CONTAINS", + /* 646 */ "in_op ::= IN", + /* 647 */ "in_op ::= NOT IN", + /* 648 */ "in_predicate_value ::= NK_LP literal_list NK_RP", + /* 649 */ "boolean_value_expression ::= boolean_primary", + /* 650 */ "boolean_value_expression ::= NOT boolean_primary", + /* 651 */ "boolean_value_expression ::= boolean_value_expression OR boolean_value_expression", + /* 652 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression", + /* 653 */ "boolean_primary ::= predicate", + /* 654 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP", + /* 655 */ "common_expression ::= expr_or_subquery", + /* 656 */ "common_expression ::= boolean_value_expression", + /* 657 */ "from_clause_opt ::=", + /* 658 */ "from_clause_opt ::= FROM table_reference_list", + /* 659 */ "table_reference_list ::= table_reference", + /* 660 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference", + /* 661 */ "table_reference ::= table_primary", + /* 662 */ "table_reference ::= joined_table", + /* 663 */ "table_primary ::= table_name alias_opt", + /* 664 */ "table_primary ::= db_name NK_DOT table_name alias_opt", + /* 665 */ "table_primary ::= subquery alias_opt", + /* 666 */ "table_primary ::= parenthesized_joined_table", + /* 667 */ "alias_opt ::=", + /* 668 */ "alias_opt ::= table_alias", + /* 669 */ "alias_opt ::= AS table_alias", + /* 670 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP", + /* 671 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP", + /* 672 */ "joined_table ::= table_reference join_type join_subtype JOIN table_reference join_on_clause_opt window_offset_clause_opt jlimit_clause_opt", + /* 673 */ "join_type ::=", + /* 674 */ "join_type ::= INNER", + /* 675 */ "join_type ::= LEFT", + /* 676 */ "join_type ::= RIGHT", + /* 677 */ "join_type ::= FULL", + /* 678 */ "join_subtype ::=", + /* 679 */ "join_subtype ::= OUTER", + /* 680 */ "join_subtype ::= SEMI", + /* 681 */ "join_subtype ::= ANTI", + /* 682 */ "join_subtype ::= ASOF", + /* 683 */ "join_subtype ::= WINDOW", + /* 684 */ "join_on_clause_opt ::=", + /* 685 */ "join_on_clause_opt ::= ON search_condition", + /* 686 */ "window_offset_clause_opt ::=", + /* 687 */ "window_offset_clause_opt ::= WINDOW_OFFSET NK_LP window_offset_literal NK_COMMA window_offset_literal NK_RP", + /* 688 */ "window_offset_literal ::= NK_VARIABLE", + /* 689 */ "window_offset_literal ::= NK_MINUS NK_VARIABLE", + /* 690 */ "jlimit_clause_opt ::=", + /* 691 */ "jlimit_clause_opt ::= JLIMIT NK_INTEGER", + /* 692 */ "query_specification ::= SELECT hint_list set_quantifier_opt tag_mode_opt select_list from_clause_opt where_clause_opt partition_by_clause_opt range_opt every_opt fill_opt twindow_clause_opt group_by_clause_opt having_clause_opt", + /* 693 */ "hint_list ::=", + /* 694 */ "hint_list ::= NK_HINT", + /* 695 */ "tag_mode_opt ::=", + /* 696 */ "tag_mode_opt ::= TAGS", + /* 697 */ "set_quantifier_opt ::=", + /* 698 */ "set_quantifier_opt ::= DISTINCT", + /* 699 */ "set_quantifier_opt ::= ALL", + /* 700 */ "select_list ::= select_item", + /* 701 */ "select_list ::= select_list NK_COMMA select_item", + /* 702 */ "select_item ::= NK_STAR", + /* 703 */ "select_item ::= common_expression", + /* 704 */ "select_item ::= common_expression column_alias", + /* 705 */ "select_item ::= common_expression AS column_alias", + /* 706 */ "select_item ::= table_name NK_DOT NK_STAR", + /* 707 */ "where_clause_opt ::=", + /* 708 */ "where_clause_opt ::= WHERE search_condition", + /* 709 */ "partition_by_clause_opt ::=", + /* 710 */ "partition_by_clause_opt ::= PARTITION BY partition_list", + /* 711 */ "partition_list ::= partition_item", + /* 712 */ "partition_list ::= partition_list NK_COMMA partition_item", + /* 713 */ "partition_item ::= expr_or_subquery", + /* 714 */ "partition_item ::= expr_or_subquery column_alias", + /* 715 */ "partition_item ::= expr_or_subquery AS column_alias", + /* 716 */ "twindow_clause_opt ::=", + /* 717 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP", + /* 718 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP", + /* 719 */ "twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt", + /* 720 */ "twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_COMMA interval_sliding_duration_literal NK_RP sliding_opt fill_opt", + /* 721 */ "twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition", + /* 722 */ "twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_RP", + /* 723 */ "twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP", + /* 724 */ "twindow_clause_opt ::= ANOMALY_WINDOW NK_LP expr_or_subquery NK_RP", + /* 725 */ "twindow_clause_opt ::= ANOMALY_WINDOW NK_LP expr_or_subquery NK_COMMA NK_STRING NK_RP", + /* 726 */ "sliding_opt ::=", + /* 727 */ "sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP", + /* 728 */ "interval_sliding_duration_literal ::= NK_VARIABLE", + /* 729 */ "interval_sliding_duration_literal ::= NK_STRING", + /* 730 */ "interval_sliding_duration_literal ::= NK_INTEGER", + /* 731 */ "fill_opt ::=", + /* 732 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP", + /* 733 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP", + /* 734 */ "fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP", + /* 735 */ "fill_mode ::= NONE", + /* 736 */ "fill_mode ::= PREV", + /* 737 */ "fill_mode ::= NULL", + /* 738 */ "fill_mode ::= NULL_F", + /* 739 */ "fill_mode ::= LINEAR", + /* 740 */ "fill_mode ::= NEXT", + /* 741 */ "group_by_clause_opt ::=", + /* 742 */ "group_by_clause_opt ::= GROUP BY group_by_list", + /* 743 */ "group_by_list ::= expr_or_subquery", + /* 744 */ "group_by_list ::= group_by_list NK_COMMA expr_or_subquery", + /* 745 */ "having_clause_opt ::=", + /* 746 */ "having_clause_opt ::= HAVING search_condition", + /* 747 */ "range_opt ::=", + /* 748 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP", + /* 749 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_RP", + /* 750 */ "every_opt ::=", + /* 751 */ "every_opt ::= EVERY NK_LP duration_literal NK_RP", + /* 752 */ "query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt", + /* 753 */ "query_simple ::= query_specification", + /* 754 */ "query_simple ::= union_query_expression", + /* 755 */ "union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery", + /* 756 */ "union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery", + /* 757 */ "query_simple_or_subquery ::= query_simple", + /* 758 */ "query_simple_or_subquery ::= subquery", + /* 759 */ "query_or_subquery ::= query_expression", + /* 760 */ "query_or_subquery ::= subquery", + /* 761 */ "order_by_clause_opt ::=", + /* 762 */ "order_by_clause_opt ::= ORDER BY sort_specification_list", + /* 763 */ "slimit_clause_opt ::=", + /* 764 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER", + /* 765 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER", + /* 766 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER", + /* 767 */ "limit_clause_opt ::=", + /* 768 */ "limit_clause_opt ::= LIMIT NK_INTEGER", + /* 769 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER", + /* 770 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER", + /* 771 */ "subquery ::= NK_LP query_expression NK_RP", + /* 772 */ "subquery ::= NK_LP subquery NK_RP", + /* 773 */ "search_condition ::= common_expression", + /* 774 */ "sort_specification_list ::= sort_specification", + /* 775 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification", + /* 776 */ "sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt", + /* 777 */ "ordering_specification_opt ::=", + /* 778 */ "ordering_specification_opt ::= ASC", + /* 779 */ "ordering_specification_opt ::= DESC", + /* 780 */ "null_ordering_opt ::=", + /* 781 */ "null_ordering_opt ::= NULLS FIRST", + /* 782 */ "null_ordering_opt ::= NULLS LAST", + /* 783 */ "column_options ::=", + /* 784 */ "column_options ::= column_options PRIMARY KEY", + /* 785 */ "column_options ::= column_options NK_ID NK_STRING", }; #endif /* NDEBUG */ @@ -3834,7 +4245,7 @@ static YYACTIONTYPE yy_find_shift_action( #endif /* YYWILDCARD */ return yy_default[stateno]; }else{ - assert( i>=0 && i=0 && i<(int)(sizeof(yy_action)/sizeof(yy_action[0])) ); return yy_action[i]; } }while(1); @@ -4060,687 +4471,688 @@ static const YYCODETYPE yyRuleInfoLhs[] = { 389, /* (101) cmd ::= TRIM DATABASE db_name speed_opt */ 389, /* (102) cmd ::= S3MIGRATE DATABASE db_name */ 389, /* (103) cmd ::= COMPACT DATABASE db_name start_opt end_opt */ - 413, /* (104) not_exists_opt ::= IF NOT EXISTS */ - 413, /* (105) not_exists_opt ::= */ - 415, /* (106) exists_opt ::= IF EXISTS */ - 415, /* (107) exists_opt ::= */ - 414, /* (108) db_options ::= */ - 414, /* (109) db_options ::= db_options BUFFER NK_INTEGER */ - 414, /* (110) db_options ::= db_options CACHEMODEL NK_STRING */ - 414, /* (111) db_options ::= db_options CACHESIZE NK_INTEGER */ - 414, /* (112) db_options ::= db_options COMP NK_INTEGER */ - 414, /* (113) db_options ::= db_options DURATION NK_INTEGER */ - 414, /* (114) db_options ::= db_options DURATION NK_VARIABLE */ - 414, /* (115) db_options ::= db_options MAXROWS NK_INTEGER */ - 414, /* (116) db_options ::= db_options MINROWS NK_INTEGER */ - 414, /* (117) db_options ::= db_options KEEP integer_list */ - 414, /* (118) db_options ::= db_options KEEP variable_list */ - 414, /* (119) db_options ::= db_options PAGES NK_INTEGER */ - 414, /* (120) db_options ::= db_options PAGESIZE NK_INTEGER */ - 414, /* (121) db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */ - 414, /* (122) db_options ::= db_options PRECISION NK_STRING */ - 414, /* (123) db_options ::= db_options REPLICA NK_INTEGER */ - 414, /* (124) db_options ::= db_options VGROUPS NK_INTEGER */ - 414, /* (125) db_options ::= db_options SINGLE_STABLE NK_INTEGER */ - 414, /* (126) db_options ::= db_options RETENTIONS retention_list */ - 414, /* (127) db_options ::= db_options SCHEMALESS NK_INTEGER */ - 414, /* (128) db_options ::= db_options WAL_LEVEL NK_INTEGER */ - 414, /* (129) db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */ - 414, /* (130) db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */ - 414, /* (131) db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ - 414, /* (132) db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */ - 414, /* (133) db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ - 414, /* (134) db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */ - 414, /* (135) db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */ - 414, /* (136) db_options ::= db_options STT_TRIGGER NK_INTEGER */ - 414, /* (137) db_options ::= db_options TABLE_PREFIX signed */ - 414, /* (138) db_options ::= db_options TABLE_SUFFIX signed */ - 414, /* (139) db_options ::= db_options S3_CHUNKPAGES NK_INTEGER */ - 414, /* (140) db_options ::= db_options S3_KEEPLOCAL NK_INTEGER */ - 414, /* (141) db_options ::= db_options S3_KEEPLOCAL NK_VARIABLE */ - 414, /* (142) db_options ::= db_options S3_COMPACT NK_INTEGER */ - 414, /* (143) db_options ::= db_options KEEP_TIME_OFFSET NK_INTEGER */ - 414, /* (144) db_options ::= db_options ENCRYPT_ALGORITHM NK_STRING */ - 414, /* (145) db_options ::= db_options DNODES NK_STRING */ - 416, /* (146) alter_db_options ::= alter_db_option */ - 416, /* (147) alter_db_options ::= alter_db_options alter_db_option */ - 424, /* (148) alter_db_option ::= BUFFER NK_INTEGER */ - 424, /* (149) alter_db_option ::= CACHEMODEL NK_STRING */ - 424, /* (150) alter_db_option ::= CACHESIZE NK_INTEGER */ - 424, /* (151) alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */ - 424, /* (152) alter_db_option ::= KEEP integer_list */ - 424, /* (153) alter_db_option ::= KEEP variable_list */ - 424, /* (154) alter_db_option ::= PAGES NK_INTEGER */ - 424, /* (155) alter_db_option ::= REPLICA NK_INTEGER */ - 424, /* (156) alter_db_option ::= WAL_LEVEL NK_INTEGER */ - 424, /* (157) alter_db_option ::= STT_TRIGGER NK_INTEGER */ - 424, /* (158) alter_db_option ::= MINROWS NK_INTEGER */ - 424, /* (159) alter_db_option ::= WAL_RETENTION_PERIOD NK_INTEGER */ - 424, /* (160) alter_db_option ::= WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ - 424, /* (161) alter_db_option ::= WAL_RETENTION_SIZE NK_INTEGER */ - 424, /* (162) alter_db_option ::= WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ - 424, /* (163) alter_db_option ::= S3_KEEPLOCAL NK_INTEGER */ - 424, /* (164) alter_db_option ::= S3_KEEPLOCAL NK_VARIABLE */ - 424, /* (165) alter_db_option ::= S3_COMPACT NK_INTEGER */ - 424, /* (166) alter_db_option ::= KEEP_TIME_OFFSET NK_INTEGER */ - 424, /* (167) alter_db_option ::= ENCRYPT_ALGORITHM NK_STRING */ - 420, /* (168) integer_list ::= NK_INTEGER */ - 420, /* (169) integer_list ::= integer_list NK_COMMA NK_INTEGER */ - 421, /* (170) variable_list ::= NK_VARIABLE */ - 421, /* (171) variable_list ::= variable_list NK_COMMA NK_VARIABLE */ - 422, /* (172) retention_list ::= retention */ - 422, /* (173) retention_list ::= retention_list NK_COMMA retention */ - 425, /* (174) retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ - 425, /* (175) retention ::= NK_MINUS NK_COLON NK_VARIABLE */ - 417, /* (176) speed_opt ::= */ - 417, /* (177) speed_opt ::= BWLIMIT NK_INTEGER */ - 418, /* (178) start_opt ::= */ - 418, /* (179) start_opt ::= START WITH NK_INTEGER */ - 418, /* (180) start_opt ::= START WITH NK_STRING */ - 418, /* (181) start_opt ::= START WITH TIMESTAMP NK_STRING */ - 419, /* (182) end_opt ::= */ - 419, /* (183) end_opt ::= END WITH NK_INTEGER */ - 419, /* (184) end_opt ::= END WITH NK_STRING */ - 419, /* (185) end_opt ::= END WITH TIMESTAMP NK_STRING */ - 389, /* (186) cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ - 389, /* (187) cmd ::= CREATE TABLE multi_create_clause */ - 389, /* (188) cmd ::= CREATE TABLE not_exists_opt USING full_table_name NK_LP tag_list_opt NK_RP FILE NK_STRING */ - 389, /* (189) cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ - 389, /* (190) cmd ::= DROP TABLE with_opt multi_drop_clause */ - 389, /* (191) cmd ::= DROP STABLE with_opt exists_opt full_table_name */ - 389, /* (192) cmd ::= ALTER TABLE alter_table_clause */ - 389, /* (193) cmd ::= ALTER STABLE alter_table_clause */ - 435, /* (194) alter_table_clause ::= full_table_name alter_table_options */ - 435, /* (195) alter_table_clause ::= full_table_name ADD COLUMN column_name type_name column_options */ - 435, /* (196) alter_table_clause ::= full_table_name DROP COLUMN column_name */ - 435, /* (197) alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ - 435, /* (198) alter_table_clause ::= full_table_name MODIFY COLUMN column_name column_options */ - 435, /* (199) alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ - 435, /* (200) alter_table_clause ::= full_table_name ADD TAG column_name type_name */ - 435, /* (201) alter_table_clause ::= full_table_name DROP TAG column_name */ - 435, /* (202) alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ - 435, /* (203) alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ - 435, /* (204) alter_table_clause ::= full_table_name SET TAG column_name NK_EQ tags_literal */ - 430, /* (205) multi_create_clause ::= create_subtable_clause */ - 430, /* (206) multi_create_clause ::= multi_create_clause create_subtable_clause */ - 441, /* (207) create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_cols_opt TAGS NK_LP tags_literal_list NK_RP table_options */ - 434, /* (208) multi_drop_clause ::= drop_table_clause */ - 434, /* (209) multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause */ - 444, /* (210) drop_table_clause ::= exists_opt full_table_name */ - 433, /* (211) with_opt ::= */ - 433, /* (212) with_opt ::= WITH */ - 442, /* (213) specific_cols_opt ::= */ - 442, /* (214) specific_cols_opt ::= NK_LP col_name_list NK_RP */ - 426, /* (215) full_table_name ::= table_name */ - 426, /* (216) full_table_name ::= db_name NK_DOT table_name */ - 446, /* (217) tag_def_list ::= tag_def */ - 446, /* (218) tag_def_list ::= tag_def_list NK_COMMA tag_def */ - 447, /* (219) tag_def ::= column_name type_name */ - 427, /* (220) column_def_list ::= column_def */ - 427, /* (221) column_def_list ::= column_def_list NK_COMMA column_def */ - 448, /* (222) column_def ::= column_name type_name column_options */ - 438, /* (223) type_name ::= BOOL */ - 438, /* (224) type_name ::= TINYINT */ - 438, /* (225) type_name ::= SMALLINT */ - 438, /* (226) type_name ::= INT */ - 438, /* (227) type_name ::= INTEGER */ - 438, /* (228) type_name ::= BIGINT */ - 438, /* (229) type_name ::= FLOAT */ - 438, /* (230) type_name ::= DOUBLE */ - 438, /* (231) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ - 438, /* (232) type_name ::= TIMESTAMP */ - 438, /* (233) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ - 438, /* (234) type_name ::= TINYINT UNSIGNED */ - 438, /* (235) type_name ::= SMALLINT UNSIGNED */ - 438, /* (236) type_name ::= INT UNSIGNED */ - 438, /* (237) type_name ::= BIGINT UNSIGNED */ - 438, /* (238) type_name ::= JSON */ - 438, /* (239) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ - 438, /* (240) type_name ::= MEDIUMBLOB */ - 438, /* (241) type_name ::= BLOB */ - 438, /* (242) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ - 438, /* (243) type_name ::= GEOMETRY NK_LP NK_INTEGER NK_RP */ - 438, /* (244) type_name ::= DECIMAL */ - 438, /* (245) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ - 438, /* (246) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ - 449, /* (247) type_name_default_len ::= BINARY */ - 449, /* (248) type_name_default_len ::= NCHAR */ - 449, /* (249) type_name_default_len ::= VARCHAR */ - 449, /* (250) type_name_default_len ::= VARBINARY */ - 428, /* (251) tags_def_opt ::= */ - 428, /* (252) tags_def_opt ::= tags_def */ - 432, /* (253) tags_def ::= TAGS NK_LP tag_def_list NK_RP */ - 429, /* (254) table_options ::= */ - 429, /* (255) table_options ::= table_options COMMENT NK_STRING */ - 429, /* (256) table_options ::= table_options MAX_DELAY duration_list */ - 429, /* (257) table_options ::= table_options WATERMARK duration_list */ - 429, /* (258) table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ - 429, /* (259) table_options ::= table_options TTL NK_INTEGER */ - 429, /* (260) table_options ::= table_options SMA NK_LP col_name_list NK_RP */ - 429, /* (261) table_options ::= table_options DELETE_MARK duration_list */ - 436, /* (262) alter_table_options ::= alter_table_option */ - 436, /* (263) alter_table_options ::= alter_table_options alter_table_option */ - 452, /* (264) alter_table_option ::= COMMENT NK_STRING */ - 452, /* (265) alter_table_option ::= TTL NK_INTEGER */ - 450, /* (266) duration_list ::= duration_literal */ - 450, /* (267) duration_list ::= duration_list NK_COMMA duration_literal */ - 451, /* (268) rollup_func_list ::= rollup_func_name */ - 451, /* (269) rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ - 454, /* (270) rollup_func_name ::= function_name */ - 454, /* (271) rollup_func_name ::= FIRST */ - 454, /* (272) rollup_func_name ::= LAST */ - 445, /* (273) col_name_list ::= col_name */ - 445, /* (274) col_name_list ::= col_name_list NK_COMMA col_name */ - 456, /* (275) col_name ::= column_name */ - 389, /* (276) cmd ::= SHOW DNODES */ - 389, /* (277) cmd ::= SHOW USERS */ - 389, /* (278) cmd ::= SHOW USERS FULL */ - 389, /* (279) cmd ::= SHOW USER PRIVILEGES */ - 389, /* (280) cmd ::= SHOW db_kind_opt DATABASES */ - 389, /* (281) cmd ::= SHOW table_kind_db_name_cond_opt TABLES like_pattern_opt */ - 389, /* (282) cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ - 389, /* (283) cmd ::= SHOW db_name_cond_opt VGROUPS */ - 389, /* (284) cmd ::= SHOW MNODES */ - 389, /* (285) cmd ::= SHOW QNODES */ - 389, /* (286) cmd ::= SHOW ANODES */ - 389, /* (287) cmd ::= SHOW ANODES FULL */ - 389, /* (288) cmd ::= SHOW ARBGROUPS */ - 389, /* (289) cmd ::= SHOW FUNCTIONS */ - 389, /* (290) cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ - 389, /* (291) cmd ::= SHOW INDEXES FROM db_name NK_DOT table_name */ - 389, /* (292) cmd ::= SHOW STREAMS */ - 389, /* (293) cmd ::= SHOW ACCOUNTS */ - 389, /* (294) cmd ::= SHOW APPS */ - 389, /* (295) cmd ::= SHOW CONNECTIONS */ - 389, /* (296) cmd ::= SHOW LICENCES */ - 389, /* (297) cmd ::= SHOW GRANTS */ - 389, /* (298) cmd ::= SHOW GRANTS FULL */ - 389, /* (299) cmd ::= SHOW GRANTS LOGS */ - 389, /* (300) cmd ::= SHOW CLUSTER MACHINES */ - 389, /* (301) cmd ::= SHOW CREATE DATABASE db_name */ - 389, /* (302) cmd ::= SHOW CREATE TABLE full_table_name */ - 389, /* (303) cmd ::= SHOW CREATE STABLE full_table_name */ - 389, /* (304) cmd ::= SHOW ENCRYPTIONS */ - 389, /* (305) cmd ::= SHOW QUERIES */ - 389, /* (306) cmd ::= SHOW SCORES */ - 389, /* (307) cmd ::= SHOW TOPICS */ - 389, /* (308) cmd ::= SHOW VARIABLES */ - 389, /* (309) cmd ::= SHOW CLUSTER VARIABLES */ - 389, /* (310) cmd ::= SHOW LOCAL VARIABLES */ - 389, /* (311) cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */ - 389, /* (312) cmd ::= SHOW BNODES */ - 389, /* (313) cmd ::= SHOW SNODES */ - 389, /* (314) cmd ::= SHOW CLUSTER */ - 389, /* (315) cmd ::= SHOW TRANSACTIONS */ - 389, /* (316) cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ - 389, /* (317) cmd ::= SHOW CONSUMERS */ - 389, /* (318) cmd ::= SHOW SUBSCRIPTIONS */ - 389, /* (319) cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ - 389, /* (320) cmd ::= SHOW TAGS FROM db_name NK_DOT table_name */ - 389, /* (321) cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ - 389, /* (322) cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name */ - 389, /* (323) cmd ::= SHOW VNODES ON DNODE NK_INTEGER */ - 389, /* (324) cmd ::= SHOW VNODES */ - 389, /* (325) cmd ::= SHOW db_name_cond_opt ALIVE */ - 389, /* (326) cmd ::= SHOW CLUSTER ALIVE */ - 389, /* (327) cmd ::= SHOW db_name_cond_opt VIEWS like_pattern_opt */ - 389, /* (328) cmd ::= SHOW CREATE VIEW full_table_name */ - 389, /* (329) cmd ::= SHOW COMPACTS */ - 389, /* (330) cmd ::= SHOW COMPACT NK_INTEGER */ - 458, /* (331) table_kind_db_name_cond_opt ::= */ - 458, /* (332) table_kind_db_name_cond_opt ::= table_kind */ - 458, /* (333) table_kind_db_name_cond_opt ::= db_name NK_DOT */ - 458, /* (334) table_kind_db_name_cond_opt ::= table_kind db_name NK_DOT */ - 463, /* (335) table_kind ::= NORMAL */ - 463, /* (336) table_kind ::= CHILD */ - 460, /* (337) db_name_cond_opt ::= */ - 460, /* (338) db_name_cond_opt ::= db_name NK_DOT */ - 459, /* (339) like_pattern_opt ::= */ - 459, /* (340) like_pattern_opt ::= LIKE NK_STRING */ - 461, /* (341) table_name_cond ::= table_name */ - 462, /* (342) from_db_opt ::= */ - 462, /* (343) from_db_opt ::= FROM db_name */ - 431, /* (344) tag_list_opt ::= */ - 431, /* (345) tag_list_opt ::= tag_item */ - 431, /* (346) tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ - 464, /* (347) tag_item ::= TBNAME */ - 464, /* (348) tag_item ::= QTAGS */ - 464, /* (349) tag_item ::= column_name */ - 464, /* (350) tag_item ::= column_name column_alias */ - 464, /* (351) tag_item ::= column_name AS column_alias */ - 457, /* (352) db_kind_opt ::= */ - 457, /* (353) db_kind_opt ::= USER */ - 457, /* (354) db_kind_opt ::= SYSTEM */ - 389, /* (355) cmd ::= CREATE TSMA not_exists_opt tsma_name ON full_table_name tsma_func_list INTERVAL NK_LP duration_literal NK_RP */ - 389, /* (356) cmd ::= CREATE RECURSIVE TSMA not_exists_opt tsma_name ON full_table_name INTERVAL NK_LP duration_literal NK_RP */ - 389, /* (357) cmd ::= DROP TSMA exists_opt full_tsma_name */ - 389, /* (358) cmd ::= SHOW db_name_cond_opt TSMAS */ - 468, /* (359) full_tsma_name ::= tsma_name */ - 468, /* (360) full_tsma_name ::= db_name NK_DOT tsma_name */ - 467, /* (361) tsma_func_list ::= FUNCTION NK_LP func_list NK_RP */ - 389, /* (362) cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options */ - 389, /* (363) cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP */ - 389, /* (364) cmd ::= DROP INDEX exists_opt full_index_name */ - 471, /* (365) full_index_name ::= index_name */ - 471, /* (366) full_index_name ::= db_name NK_DOT index_name */ - 470, /* (367) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ - 470, /* (368) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt sma_stream_opt */ - 469, /* (369) func_list ::= func */ - 469, /* (370) func_list ::= func_list NK_COMMA func */ - 475, /* (371) func ::= sma_func_name NK_LP expression_list NK_RP */ - 476, /* (372) sma_func_name ::= function_name */ - 476, /* (373) sma_func_name ::= COUNT */ - 476, /* (374) sma_func_name ::= FIRST */ - 476, /* (375) sma_func_name ::= LAST */ - 476, /* (376) sma_func_name ::= LAST_ROW */ - 474, /* (377) sma_stream_opt ::= */ - 474, /* (378) sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ - 474, /* (379) sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ - 474, /* (380) sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ - 478, /* (381) with_meta ::= AS */ - 478, /* (382) with_meta ::= WITH META AS */ - 478, /* (383) with_meta ::= ONLY META AS */ - 389, /* (384) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ - 389, /* (385) cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name */ - 389, /* (386) cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt */ - 389, /* (387) cmd ::= DROP TOPIC exists_opt topic_name */ - 389, /* (388) cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ - 389, /* (389) cmd ::= DESC full_table_name */ - 389, /* (390) cmd ::= DESCRIBE full_table_name */ - 389, /* (391) cmd ::= RESET QUERY CACHE */ - 389, /* (392) cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ - 389, /* (393) cmd ::= EXPLAIN analyze_opt explain_options insert_query */ - 482, /* (394) analyze_opt ::= */ - 482, /* (395) analyze_opt ::= ANALYZE */ - 483, /* (396) explain_options ::= */ - 483, /* (397) explain_options ::= explain_options VERBOSE NK_BOOL */ - 483, /* (398) explain_options ::= explain_options RATIO NK_FLOAT */ - 389, /* (399) cmd ::= CREATE or_replace_opt agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt language_opt */ - 389, /* (400) cmd ::= DROP FUNCTION exists_opt function_name */ - 486, /* (401) agg_func_opt ::= */ - 486, /* (402) agg_func_opt ::= AGGREGATE */ - 487, /* (403) bufsize_opt ::= */ - 487, /* (404) bufsize_opt ::= BUFSIZE NK_INTEGER */ - 488, /* (405) language_opt ::= */ - 488, /* (406) language_opt ::= LANGUAGE NK_STRING */ - 485, /* (407) or_replace_opt ::= */ - 485, /* (408) or_replace_opt ::= OR REPLACE */ - 389, /* (409) cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery */ - 389, /* (410) cmd ::= DROP VIEW exists_opt full_view_name */ - 489, /* (411) full_view_name ::= view_name */ - 489, /* (412) full_view_name ::= db_name NK_DOT view_name */ - 389, /* (413) cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name col_list_opt tag_def_or_ref_opt subtable_opt AS query_or_subquery */ - 389, /* (414) cmd ::= DROP STREAM exists_opt stream_name */ - 389, /* (415) cmd ::= PAUSE STREAM exists_opt stream_name */ - 389, /* (416) cmd ::= RESUME STREAM exists_opt ignore_opt stream_name */ - 493, /* (417) col_list_opt ::= */ - 493, /* (418) col_list_opt ::= NK_LP column_stream_def_list NK_RP */ - 497, /* (419) column_stream_def_list ::= column_stream_def */ - 497, /* (420) column_stream_def_list ::= column_stream_def_list NK_COMMA column_stream_def */ - 498, /* (421) column_stream_def ::= column_name stream_col_options */ - 499, /* (422) stream_col_options ::= */ - 499, /* (423) stream_col_options ::= stream_col_options PRIMARY KEY */ - 494, /* (424) tag_def_or_ref_opt ::= */ - 494, /* (425) tag_def_or_ref_opt ::= tags_def */ - 494, /* (426) tag_def_or_ref_opt ::= TAGS NK_LP column_stream_def_list NK_RP */ - 492, /* (427) stream_options ::= */ - 492, /* (428) stream_options ::= stream_options TRIGGER AT_ONCE */ - 492, /* (429) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ - 492, /* (430) stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ - 492, /* (431) stream_options ::= stream_options WATERMARK duration_literal */ - 492, /* (432) stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ - 492, /* (433) stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ - 492, /* (434) stream_options ::= stream_options DELETE_MARK duration_literal */ - 492, /* (435) stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */ - 495, /* (436) subtable_opt ::= */ - 495, /* (437) subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ - 496, /* (438) ignore_opt ::= */ - 496, /* (439) ignore_opt ::= IGNORE UNTREATED */ - 389, /* (440) cmd ::= KILL CONNECTION NK_INTEGER */ - 389, /* (441) cmd ::= KILL QUERY NK_STRING */ - 389, /* (442) cmd ::= KILL TRANSACTION NK_INTEGER */ - 389, /* (443) cmd ::= KILL COMPACT NK_INTEGER */ - 389, /* (444) cmd ::= BALANCE VGROUP */ - 389, /* (445) cmd ::= BALANCE VGROUP LEADER on_vgroup_id */ - 389, /* (446) cmd ::= BALANCE VGROUP LEADER DATABASE db_name */ - 389, /* (447) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ - 389, /* (448) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ - 389, /* (449) cmd ::= SPLIT VGROUP NK_INTEGER */ - 501, /* (450) on_vgroup_id ::= */ - 501, /* (451) on_vgroup_id ::= ON NK_INTEGER */ - 502, /* (452) dnode_list ::= DNODE NK_INTEGER */ - 502, /* (453) dnode_list ::= dnode_list DNODE NK_INTEGER */ - 389, /* (454) cmd ::= DELETE FROM full_table_name where_clause_opt */ - 389, /* (455) cmd ::= query_or_subquery */ - 389, /* (456) cmd ::= insert_query */ - 484, /* (457) insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ - 484, /* (458) insert_query ::= INSERT INTO full_table_name query_or_subquery */ - 440, /* (459) tags_literal ::= NK_INTEGER */ - 440, /* (460) tags_literal ::= NK_INTEGER NK_PLUS duration_literal */ - 440, /* (461) tags_literal ::= NK_INTEGER NK_MINUS duration_literal */ - 440, /* (462) tags_literal ::= NK_PLUS NK_INTEGER */ - 440, /* (463) tags_literal ::= NK_PLUS NK_INTEGER NK_PLUS duration_literal */ - 440, /* (464) tags_literal ::= NK_PLUS NK_INTEGER NK_MINUS duration_literal */ - 440, /* (465) tags_literal ::= NK_MINUS NK_INTEGER */ - 440, /* (466) tags_literal ::= NK_MINUS NK_INTEGER NK_PLUS duration_literal */ - 440, /* (467) tags_literal ::= NK_MINUS NK_INTEGER NK_MINUS duration_literal */ - 440, /* (468) tags_literal ::= NK_FLOAT */ - 440, /* (469) tags_literal ::= NK_PLUS NK_FLOAT */ - 440, /* (470) tags_literal ::= NK_MINUS NK_FLOAT */ - 440, /* (471) tags_literal ::= NK_BIN */ - 440, /* (472) tags_literal ::= NK_BIN NK_PLUS duration_literal */ - 440, /* (473) tags_literal ::= NK_BIN NK_MINUS duration_literal */ - 440, /* (474) tags_literal ::= NK_PLUS NK_BIN */ - 440, /* (475) tags_literal ::= NK_PLUS NK_BIN NK_PLUS duration_literal */ - 440, /* (476) tags_literal ::= NK_PLUS NK_BIN NK_MINUS duration_literal */ - 440, /* (477) tags_literal ::= NK_MINUS NK_BIN */ - 440, /* (478) tags_literal ::= NK_MINUS NK_BIN NK_PLUS duration_literal */ - 440, /* (479) tags_literal ::= NK_MINUS NK_BIN NK_MINUS duration_literal */ - 440, /* (480) tags_literal ::= NK_HEX */ - 440, /* (481) tags_literal ::= NK_HEX NK_PLUS duration_literal */ - 440, /* (482) tags_literal ::= NK_HEX NK_MINUS duration_literal */ - 440, /* (483) tags_literal ::= NK_PLUS NK_HEX */ - 440, /* (484) tags_literal ::= NK_PLUS NK_HEX NK_PLUS duration_literal */ - 440, /* (485) tags_literal ::= NK_PLUS NK_HEX NK_MINUS duration_literal */ - 440, /* (486) tags_literal ::= NK_MINUS NK_HEX */ - 440, /* (487) tags_literal ::= NK_MINUS NK_HEX NK_PLUS duration_literal */ - 440, /* (488) tags_literal ::= NK_MINUS NK_HEX NK_MINUS duration_literal */ - 440, /* (489) tags_literal ::= NK_STRING */ - 440, /* (490) tags_literal ::= NK_STRING NK_PLUS duration_literal */ - 440, /* (491) tags_literal ::= NK_STRING NK_MINUS duration_literal */ - 440, /* (492) tags_literal ::= NK_BOOL */ - 440, /* (493) tags_literal ::= NULL */ - 440, /* (494) tags_literal ::= literal_func */ - 440, /* (495) tags_literal ::= literal_func NK_PLUS duration_literal */ - 440, /* (496) tags_literal ::= literal_func NK_MINUS duration_literal */ - 443, /* (497) tags_literal_list ::= tags_literal */ - 443, /* (498) tags_literal_list ::= tags_literal_list NK_COMMA tags_literal */ - 392, /* (499) literal ::= NK_INTEGER */ - 392, /* (500) literal ::= NK_FLOAT */ - 392, /* (501) literal ::= NK_STRING */ - 392, /* (502) literal ::= NK_BOOL */ - 392, /* (503) literal ::= TIMESTAMP NK_STRING */ - 392, /* (504) literal ::= duration_literal */ - 392, /* (505) literal ::= NULL */ - 392, /* (506) literal ::= NK_QUESTION */ - 453, /* (507) duration_literal ::= NK_VARIABLE */ - 423, /* (508) signed ::= NK_INTEGER */ - 423, /* (509) signed ::= NK_PLUS NK_INTEGER */ - 423, /* (510) signed ::= NK_MINUS NK_INTEGER */ - 423, /* (511) signed ::= NK_FLOAT */ - 423, /* (512) signed ::= NK_PLUS NK_FLOAT */ - 423, /* (513) signed ::= NK_MINUS NK_FLOAT */ - 504, /* (514) signed_literal ::= signed */ - 504, /* (515) signed_literal ::= NK_STRING */ - 504, /* (516) signed_literal ::= NK_BOOL */ - 504, /* (517) signed_literal ::= TIMESTAMP NK_STRING */ - 504, /* (518) signed_literal ::= duration_literal */ - 504, /* (519) signed_literal ::= NULL */ - 504, /* (520) signed_literal ::= literal_func */ - 504, /* (521) signed_literal ::= NK_QUESTION */ - 505, /* (522) literal_list ::= signed_literal */ - 505, /* (523) literal_list ::= literal_list NK_COMMA signed_literal */ - 406, /* (524) db_name ::= NK_ID */ - 407, /* (525) table_name ::= NK_ID */ - 437, /* (526) column_name ::= NK_ID */ - 455, /* (527) function_name ::= NK_ID */ - 490, /* (528) view_name ::= NK_ID */ - 506, /* (529) table_alias ::= NK_ID */ - 465, /* (530) column_alias ::= NK_ID */ - 465, /* (531) column_alias ::= NK_ALIAS */ - 399, /* (532) user_name ::= NK_ID */ - 408, /* (533) topic_name ::= NK_ID */ - 491, /* (534) stream_name ::= NK_ID */ - 481, /* (535) cgroup_name ::= NK_ID */ - 472, /* (536) index_name ::= NK_ID */ - 466, /* (537) tsma_name ::= NK_ID */ - 507, /* (538) expr_or_subquery ::= expression */ - 500, /* (539) expression ::= literal */ - 500, /* (540) expression ::= pseudo_column */ - 500, /* (541) expression ::= column_reference */ - 500, /* (542) expression ::= function_expression */ - 500, /* (543) expression ::= case_when_expression */ - 500, /* (544) expression ::= NK_LP expression NK_RP */ - 500, /* (545) expression ::= NK_PLUS expr_or_subquery */ - 500, /* (546) expression ::= NK_MINUS expr_or_subquery */ - 500, /* (547) expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ - 500, /* (548) expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ - 500, /* (549) expression ::= expr_or_subquery NK_STAR expr_or_subquery */ - 500, /* (550) expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ - 500, /* (551) expression ::= expr_or_subquery NK_REM expr_or_subquery */ - 500, /* (552) expression ::= column_reference NK_ARROW NK_STRING */ - 500, /* (553) expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ - 500, /* (554) expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ - 477, /* (555) expression_list ::= expr_or_subquery */ - 477, /* (556) expression_list ::= expression_list NK_COMMA expr_or_subquery */ - 509, /* (557) column_reference ::= column_name */ - 509, /* (558) column_reference ::= table_name NK_DOT column_name */ - 509, /* (559) column_reference ::= NK_ALIAS */ - 509, /* (560) column_reference ::= table_name NK_DOT NK_ALIAS */ - 508, /* (561) pseudo_column ::= ROWTS */ - 508, /* (562) pseudo_column ::= TBNAME */ - 508, /* (563) pseudo_column ::= table_name NK_DOT TBNAME */ - 508, /* (564) pseudo_column ::= QSTART */ - 508, /* (565) pseudo_column ::= QEND */ - 508, /* (566) pseudo_column ::= QDURATION */ - 508, /* (567) pseudo_column ::= WSTART */ - 508, /* (568) pseudo_column ::= WEND */ - 508, /* (569) pseudo_column ::= WDURATION */ - 508, /* (570) pseudo_column ::= IROWTS */ - 508, /* (571) pseudo_column ::= ISFILLED */ - 508, /* (572) pseudo_column ::= QTAGS */ - 508, /* (573) pseudo_column ::= FLOW */ - 508, /* (574) pseudo_column ::= FHIGH */ - 508, /* (575) pseudo_column ::= FROWTS */ - 510, /* (576) function_expression ::= function_name NK_LP expression_list NK_RP */ - 510, /* (577) function_expression ::= star_func NK_LP star_func_para_list NK_RP */ - 510, /* (578) function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ - 510, /* (579) function_expression ::= CAST NK_LP expr_or_subquery AS type_name_default_len NK_RP */ - 510, /* (580) function_expression ::= POSITION NK_LP expr_or_subquery IN expr_or_subquery NK_RP */ - 510, /* (581) function_expression ::= TRIM NK_LP expr_or_subquery NK_RP */ - 510, /* (582) function_expression ::= TRIM NK_LP trim_specification_type FROM expr_or_subquery NK_RP */ - 510, /* (583) function_expression ::= TRIM NK_LP expr_or_subquery FROM expr_or_subquery NK_RP */ - 510, /* (584) function_expression ::= TRIM NK_LP trim_specification_type expr_or_subquery FROM expr_or_subquery NK_RP */ - 510, /* (585) function_expression ::= substr_func NK_LP expression_list NK_RP */ - 510, /* (586) function_expression ::= substr_func NK_LP expr_or_subquery FROM expr_or_subquery NK_RP */ - 510, /* (587) function_expression ::= substr_func NK_LP expr_or_subquery FROM expr_or_subquery FOR expr_or_subquery NK_RP */ - 510, /* (588) function_expression ::= REPLACE NK_LP expression_list NK_RP */ - 510, /* (589) function_expression ::= literal_func */ - 510, /* (590) function_expression ::= rand_func */ - 503, /* (591) literal_func ::= noarg_func NK_LP NK_RP */ - 503, /* (592) literal_func ::= NOW */ - 503, /* (593) literal_func ::= TODAY */ - 516, /* (594) rand_func ::= RAND NK_LP NK_RP */ - 516, /* (595) rand_func ::= RAND NK_LP expression_list NK_RP */ - 515, /* (596) substr_func ::= SUBSTR */ - 515, /* (597) substr_func ::= SUBSTRING */ - 514, /* (598) trim_specification_type ::= BOTH */ - 514, /* (599) trim_specification_type ::= TRAILING */ - 514, /* (600) trim_specification_type ::= LEADING */ - 517, /* (601) noarg_func ::= NOW */ - 517, /* (602) noarg_func ::= TODAY */ - 517, /* (603) noarg_func ::= TIMEZONE */ - 517, /* (604) noarg_func ::= DATABASE */ - 517, /* (605) noarg_func ::= CLIENT_VERSION */ - 517, /* (606) noarg_func ::= SERVER_VERSION */ - 517, /* (607) noarg_func ::= SERVER_STATUS */ - 517, /* (608) noarg_func ::= CURRENT_USER */ - 517, /* (609) noarg_func ::= USER */ - 517, /* (610) noarg_func ::= PI */ - 512, /* (611) star_func ::= COUNT */ - 512, /* (612) star_func ::= FIRST */ - 512, /* (613) star_func ::= LAST */ - 512, /* (614) star_func ::= LAST_ROW */ - 513, /* (615) star_func_para_list ::= NK_STAR */ - 513, /* (616) star_func_para_list ::= other_para_list */ - 518, /* (617) other_para_list ::= star_func_para */ - 518, /* (618) other_para_list ::= other_para_list NK_COMMA star_func_para */ - 519, /* (619) star_func_para ::= expr_or_subquery */ - 519, /* (620) star_func_para ::= table_name NK_DOT NK_STAR */ - 511, /* (621) case_when_expression ::= CASE when_then_list case_when_else_opt END */ - 511, /* (622) case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ - 520, /* (623) when_then_list ::= when_then_expr */ - 520, /* (624) when_then_list ::= when_then_list when_then_expr */ - 523, /* (625) when_then_expr ::= WHEN common_expression THEN common_expression */ - 521, /* (626) case_when_else_opt ::= */ - 521, /* (627) case_when_else_opt ::= ELSE common_expression */ - 524, /* (628) predicate ::= expr_or_subquery compare_op expr_or_subquery */ - 524, /* (629) predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ - 524, /* (630) predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ - 524, /* (631) predicate ::= expr_or_subquery IS NULL */ - 524, /* (632) predicate ::= expr_or_subquery IS NOT NULL */ - 524, /* (633) predicate ::= expr_or_subquery in_op in_predicate_value */ - 525, /* (634) compare_op ::= NK_LT */ - 525, /* (635) compare_op ::= NK_GT */ - 525, /* (636) compare_op ::= NK_LE */ - 525, /* (637) compare_op ::= NK_GE */ - 525, /* (638) compare_op ::= NK_NE */ - 525, /* (639) compare_op ::= NK_EQ */ - 525, /* (640) compare_op ::= LIKE */ - 525, /* (641) compare_op ::= NOT LIKE */ - 525, /* (642) compare_op ::= MATCH */ - 525, /* (643) compare_op ::= NMATCH */ - 525, /* (644) compare_op ::= CONTAINS */ - 526, /* (645) in_op ::= IN */ - 526, /* (646) in_op ::= NOT IN */ - 527, /* (647) in_predicate_value ::= NK_LP literal_list NK_RP */ - 528, /* (648) boolean_value_expression ::= boolean_primary */ - 528, /* (649) boolean_value_expression ::= NOT boolean_primary */ - 528, /* (650) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ - 528, /* (651) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ - 529, /* (652) boolean_primary ::= predicate */ - 529, /* (653) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ - 522, /* (654) common_expression ::= expr_or_subquery */ - 522, /* (655) common_expression ::= boolean_value_expression */ - 530, /* (656) from_clause_opt ::= */ - 530, /* (657) from_clause_opt ::= FROM table_reference_list */ - 531, /* (658) table_reference_list ::= table_reference */ - 531, /* (659) table_reference_list ::= table_reference_list NK_COMMA table_reference */ - 532, /* (660) table_reference ::= table_primary */ - 532, /* (661) table_reference ::= joined_table */ - 533, /* (662) table_primary ::= table_name alias_opt */ - 533, /* (663) table_primary ::= db_name NK_DOT table_name alias_opt */ - 533, /* (664) table_primary ::= subquery alias_opt */ - 533, /* (665) table_primary ::= parenthesized_joined_table */ - 535, /* (666) alias_opt ::= */ - 535, /* (667) alias_opt ::= table_alias */ - 535, /* (668) alias_opt ::= AS table_alias */ - 537, /* (669) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ - 537, /* (670) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ - 534, /* (671) joined_table ::= table_reference join_type join_subtype JOIN table_reference join_on_clause_opt window_offset_clause_opt jlimit_clause_opt */ - 538, /* (672) join_type ::= */ - 538, /* (673) join_type ::= INNER */ - 538, /* (674) join_type ::= LEFT */ - 538, /* (675) join_type ::= RIGHT */ - 538, /* (676) join_type ::= FULL */ - 539, /* (677) join_subtype ::= */ - 539, /* (678) join_subtype ::= OUTER */ - 539, /* (679) join_subtype ::= SEMI */ - 539, /* (680) join_subtype ::= ANTI */ - 539, /* (681) join_subtype ::= ASOF */ - 539, /* (682) join_subtype ::= WINDOW */ - 540, /* (683) join_on_clause_opt ::= */ - 540, /* (684) join_on_clause_opt ::= ON search_condition */ - 541, /* (685) window_offset_clause_opt ::= */ - 541, /* (686) window_offset_clause_opt ::= WINDOW_OFFSET NK_LP window_offset_literal NK_COMMA window_offset_literal NK_RP */ - 543, /* (687) window_offset_literal ::= NK_VARIABLE */ - 543, /* (688) window_offset_literal ::= NK_MINUS NK_VARIABLE */ - 542, /* (689) jlimit_clause_opt ::= */ - 542, /* (690) jlimit_clause_opt ::= JLIMIT NK_INTEGER */ - 544, /* (691) query_specification ::= SELECT hint_list set_quantifier_opt tag_mode_opt select_list from_clause_opt where_clause_opt partition_by_clause_opt range_opt every_opt fill_opt twindow_clause_opt group_by_clause_opt having_clause_opt */ - 545, /* (692) hint_list ::= */ - 545, /* (693) hint_list ::= NK_HINT */ - 547, /* (694) tag_mode_opt ::= */ - 547, /* (695) tag_mode_opt ::= TAGS */ - 546, /* (696) set_quantifier_opt ::= */ - 546, /* (697) set_quantifier_opt ::= DISTINCT */ - 546, /* (698) set_quantifier_opt ::= ALL */ - 548, /* (699) select_list ::= select_item */ - 548, /* (700) select_list ::= select_list NK_COMMA select_item */ - 556, /* (701) select_item ::= NK_STAR */ - 556, /* (702) select_item ::= common_expression */ - 556, /* (703) select_item ::= common_expression column_alias */ - 556, /* (704) select_item ::= common_expression AS column_alias */ - 556, /* (705) select_item ::= table_name NK_DOT NK_STAR */ - 480, /* (706) where_clause_opt ::= */ - 480, /* (707) where_clause_opt ::= WHERE search_condition */ - 549, /* (708) partition_by_clause_opt ::= */ - 549, /* (709) partition_by_clause_opt ::= PARTITION BY partition_list */ - 557, /* (710) partition_list ::= partition_item */ - 557, /* (711) partition_list ::= partition_list NK_COMMA partition_item */ - 558, /* (712) partition_item ::= expr_or_subquery */ - 558, /* (713) partition_item ::= expr_or_subquery column_alias */ - 558, /* (714) partition_item ::= expr_or_subquery AS column_alias */ - 553, /* (715) twindow_clause_opt ::= */ - 553, /* (716) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP */ - 553, /* (717) twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ - 553, /* (718) twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ - 553, /* (719) twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_COMMA interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ - 553, /* (720) twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ - 553, /* (721) twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_RP */ - 553, /* (722) twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ - 553, /* (723) twindow_clause_opt ::= ANOMALY_WINDOW NK_LP expr_or_subquery NK_RP */ - 553, /* (724) twindow_clause_opt ::= ANOMALY_WINDOW NK_LP expr_or_subquery NK_COMMA NK_STRING NK_RP */ - 473, /* (725) sliding_opt ::= */ - 473, /* (726) sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP */ - 559, /* (727) interval_sliding_duration_literal ::= NK_VARIABLE */ - 559, /* (728) interval_sliding_duration_literal ::= NK_STRING */ - 559, /* (729) interval_sliding_duration_literal ::= NK_INTEGER */ - 552, /* (730) fill_opt ::= */ - 552, /* (731) fill_opt ::= FILL NK_LP fill_mode NK_RP */ - 552, /* (732) fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP */ - 552, /* (733) fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP */ - 560, /* (734) fill_mode ::= NONE */ - 560, /* (735) fill_mode ::= PREV */ - 560, /* (736) fill_mode ::= NULL */ - 560, /* (737) fill_mode ::= NULL_F */ - 560, /* (738) fill_mode ::= LINEAR */ - 560, /* (739) fill_mode ::= NEXT */ - 554, /* (740) group_by_clause_opt ::= */ - 554, /* (741) group_by_clause_opt ::= GROUP BY group_by_list */ - 561, /* (742) group_by_list ::= expr_or_subquery */ - 561, /* (743) group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ - 555, /* (744) having_clause_opt ::= */ - 555, /* (745) having_clause_opt ::= HAVING search_condition */ - 550, /* (746) range_opt ::= */ - 550, /* (747) range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ - 550, /* (748) range_opt ::= RANGE NK_LP expr_or_subquery NK_RP */ - 551, /* (749) every_opt ::= */ - 551, /* (750) every_opt ::= EVERY NK_LP duration_literal NK_RP */ - 562, /* (751) query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ - 563, /* (752) query_simple ::= query_specification */ - 563, /* (753) query_simple ::= union_query_expression */ - 567, /* (754) union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ - 567, /* (755) union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ - 568, /* (756) query_simple_or_subquery ::= query_simple */ - 568, /* (757) query_simple_or_subquery ::= subquery */ - 479, /* (758) query_or_subquery ::= query_expression */ - 479, /* (759) query_or_subquery ::= subquery */ - 564, /* (760) order_by_clause_opt ::= */ - 564, /* (761) order_by_clause_opt ::= ORDER BY sort_specification_list */ - 565, /* (762) slimit_clause_opt ::= */ - 565, /* (763) slimit_clause_opt ::= SLIMIT NK_INTEGER */ - 565, /* (764) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ - 565, /* (765) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - 566, /* (766) limit_clause_opt ::= */ - 566, /* (767) limit_clause_opt ::= LIMIT NK_INTEGER */ - 566, /* (768) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ - 566, /* (769) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - 536, /* (770) subquery ::= NK_LP query_expression NK_RP */ - 536, /* (771) subquery ::= NK_LP subquery NK_RP */ - 409, /* (772) search_condition ::= common_expression */ - 569, /* (773) sort_specification_list ::= sort_specification */ - 569, /* (774) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ - 570, /* (775) sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ - 571, /* (776) ordering_specification_opt ::= */ - 571, /* (777) ordering_specification_opt ::= ASC */ - 571, /* (778) ordering_specification_opt ::= DESC */ - 572, /* (779) null_ordering_opt ::= */ - 572, /* (780) null_ordering_opt ::= NULLS FIRST */ - 572, /* (781) null_ordering_opt ::= NULLS LAST */ - 439, /* (782) column_options ::= */ - 439, /* (783) column_options ::= column_options PRIMARY KEY */ - 439, /* (784) column_options ::= column_options NK_ID NK_STRING */ + 389, /* (104) cmd ::= COMPACT VGROUPS IN NK_LP integer_list NK_RP start_opt end_opt */ + 413, /* (105) not_exists_opt ::= IF NOT EXISTS */ + 413, /* (106) not_exists_opt ::= */ + 415, /* (107) exists_opt ::= IF EXISTS */ + 415, /* (108) exists_opt ::= */ + 414, /* (109) db_options ::= */ + 414, /* (110) db_options ::= db_options BUFFER NK_INTEGER */ + 414, /* (111) db_options ::= db_options CACHEMODEL NK_STRING */ + 414, /* (112) db_options ::= db_options CACHESIZE NK_INTEGER */ + 414, /* (113) db_options ::= db_options COMP NK_INTEGER */ + 414, /* (114) db_options ::= db_options DURATION NK_INTEGER */ + 414, /* (115) db_options ::= db_options DURATION NK_VARIABLE */ + 414, /* (116) db_options ::= db_options MAXROWS NK_INTEGER */ + 414, /* (117) db_options ::= db_options MINROWS NK_INTEGER */ + 414, /* (118) db_options ::= db_options KEEP integer_list */ + 414, /* (119) db_options ::= db_options KEEP variable_list */ + 414, /* (120) db_options ::= db_options PAGES NK_INTEGER */ + 414, /* (121) db_options ::= db_options PAGESIZE NK_INTEGER */ + 414, /* (122) db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */ + 414, /* (123) db_options ::= db_options PRECISION NK_STRING */ + 414, /* (124) db_options ::= db_options REPLICA NK_INTEGER */ + 414, /* (125) db_options ::= db_options VGROUPS NK_INTEGER */ + 414, /* (126) db_options ::= db_options SINGLE_STABLE NK_INTEGER */ + 414, /* (127) db_options ::= db_options RETENTIONS retention_list */ + 414, /* (128) db_options ::= db_options SCHEMALESS NK_INTEGER */ + 414, /* (129) db_options ::= db_options WAL_LEVEL NK_INTEGER */ + 414, /* (130) db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */ + 414, /* (131) db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */ + 414, /* (132) db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ + 414, /* (133) db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */ + 414, /* (134) db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ + 414, /* (135) db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */ + 414, /* (136) db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */ + 414, /* (137) db_options ::= db_options STT_TRIGGER NK_INTEGER */ + 414, /* (138) db_options ::= db_options TABLE_PREFIX signed */ + 414, /* (139) db_options ::= db_options TABLE_SUFFIX signed */ + 414, /* (140) db_options ::= db_options S3_CHUNKPAGES NK_INTEGER */ + 414, /* (141) db_options ::= db_options S3_KEEPLOCAL NK_INTEGER */ + 414, /* (142) db_options ::= db_options S3_KEEPLOCAL NK_VARIABLE */ + 414, /* (143) db_options ::= db_options S3_COMPACT NK_INTEGER */ + 414, /* (144) db_options ::= db_options KEEP_TIME_OFFSET NK_INTEGER */ + 414, /* (145) db_options ::= db_options ENCRYPT_ALGORITHM NK_STRING */ + 414, /* (146) db_options ::= db_options DNODES NK_STRING */ + 416, /* (147) alter_db_options ::= alter_db_option */ + 416, /* (148) alter_db_options ::= alter_db_options alter_db_option */ + 424, /* (149) alter_db_option ::= BUFFER NK_INTEGER */ + 424, /* (150) alter_db_option ::= CACHEMODEL NK_STRING */ + 424, /* (151) alter_db_option ::= CACHESIZE NK_INTEGER */ + 424, /* (152) alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */ + 424, /* (153) alter_db_option ::= KEEP integer_list */ + 424, /* (154) alter_db_option ::= KEEP variable_list */ + 424, /* (155) alter_db_option ::= PAGES NK_INTEGER */ + 424, /* (156) alter_db_option ::= REPLICA NK_INTEGER */ + 424, /* (157) alter_db_option ::= WAL_LEVEL NK_INTEGER */ + 424, /* (158) alter_db_option ::= STT_TRIGGER NK_INTEGER */ + 424, /* (159) alter_db_option ::= MINROWS NK_INTEGER */ + 424, /* (160) alter_db_option ::= WAL_RETENTION_PERIOD NK_INTEGER */ + 424, /* (161) alter_db_option ::= WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ + 424, /* (162) alter_db_option ::= WAL_RETENTION_SIZE NK_INTEGER */ + 424, /* (163) alter_db_option ::= WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ + 424, /* (164) alter_db_option ::= S3_KEEPLOCAL NK_INTEGER */ + 424, /* (165) alter_db_option ::= S3_KEEPLOCAL NK_VARIABLE */ + 424, /* (166) alter_db_option ::= S3_COMPACT NK_INTEGER */ + 424, /* (167) alter_db_option ::= KEEP_TIME_OFFSET NK_INTEGER */ + 424, /* (168) alter_db_option ::= ENCRYPT_ALGORITHM NK_STRING */ + 420, /* (169) integer_list ::= NK_INTEGER */ + 420, /* (170) integer_list ::= integer_list NK_COMMA NK_INTEGER */ + 421, /* (171) variable_list ::= NK_VARIABLE */ + 421, /* (172) variable_list ::= variable_list NK_COMMA NK_VARIABLE */ + 422, /* (173) retention_list ::= retention */ + 422, /* (174) retention_list ::= retention_list NK_COMMA retention */ + 425, /* (175) retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ + 425, /* (176) retention ::= NK_MINUS NK_COLON NK_VARIABLE */ + 417, /* (177) speed_opt ::= */ + 417, /* (178) speed_opt ::= BWLIMIT NK_INTEGER */ + 418, /* (179) start_opt ::= */ + 418, /* (180) start_opt ::= START WITH NK_INTEGER */ + 418, /* (181) start_opt ::= START WITH NK_STRING */ + 418, /* (182) start_opt ::= START WITH TIMESTAMP NK_STRING */ + 419, /* (183) end_opt ::= */ + 419, /* (184) end_opt ::= END WITH NK_INTEGER */ + 419, /* (185) end_opt ::= END WITH NK_STRING */ + 419, /* (186) end_opt ::= END WITH TIMESTAMP NK_STRING */ + 389, /* (187) cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ + 389, /* (188) cmd ::= CREATE TABLE multi_create_clause */ + 389, /* (189) cmd ::= CREATE TABLE not_exists_opt USING full_table_name NK_LP tag_list_opt NK_RP FILE NK_STRING */ + 389, /* (190) cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ + 389, /* (191) cmd ::= DROP TABLE with_opt multi_drop_clause */ + 389, /* (192) cmd ::= DROP STABLE with_opt exists_opt full_table_name */ + 389, /* (193) cmd ::= ALTER TABLE alter_table_clause */ + 389, /* (194) cmd ::= ALTER STABLE alter_table_clause */ + 435, /* (195) alter_table_clause ::= full_table_name alter_table_options */ + 435, /* (196) alter_table_clause ::= full_table_name ADD COLUMN column_name type_name column_options */ + 435, /* (197) alter_table_clause ::= full_table_name DROP COLUMN column_name */ + 435, /* (198) alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ + 435, /* (199) alter_table_clause ::= full_table_name MODIFY COLUMN column_name column_options */ + 435, /* (200) alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ + 435, /* (201) alter_table_clause ::= full_table_name ADD TAG column_name type_name */ + 435, /* (202) alter_table_clause ::= full_table_name DROP TAG column_name */ + 435, /* (203) alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ + 435, /* (204) alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ + 435, /* (205) alter_table_clause ::= full_table_name SET TAG column_name NK_EQ tags_literal */ + 430, /* (206) multi_create_clause ::= create_subtable_clause */ + 430, /* (207) multi_create_clause ::= multi_create_clause create_subtable_clause */ + 441, /* (208) create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_cols_opt TAGS NK_LP tags_literal_list NK_RP table_options */ + 434, /* (209) multi_drop_clause ::= drop_table_clause */ + 434, /* (210) multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause */ + 444, /* (211) drop_table_clause ::= exists_opt full_table_name */ + 433, /* (212) with_opt ::= */ + 433, /* (213) with_opt ::= WITH */ + 442, /* (214) specific_cols_opt ::= */ + 442, /* (215) specific_cols_opt ::= NK_LP col_name_list NK_RP */ + 426, /* (216) full_table_name ::= table_name */ + 426, /* (217) full_table_name ::= db_name NK_DOT table_name */ + 446, /* (218) tag_def_list ::= tag_def */ + 446, /* (219) tag_def_list ::= tag_def_list NK_COMMA tag_def */ + 447, /* (220) tag_def ::= column_name type_name */ + 427, /* (221) column_def_list ::= column_def */ + 427, /* (222) column_def_list ::= column_def_list NK_COMMA column_def */ + 448, /* (223) column_def ::= column_name type_name column_options */ + 438, /* (224) type_name ::= BOOL */ + 438, /* (225) type_name ::= TINYINT */ + 438, /* (226) type_name ::= SMALLINT */ + 438, /* (227) type_name ::= INT */ + 438, /* (228) type_name ::= INTEGER */ + 438, /* (229) type_name ::= BIGINT */ + 438, /* (230) type_name ::= FLOAT */ + 438, /* (231) type_name ::= DOUBLE */ + 438, /* (232) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ + 438, /* (233) type_name ::= TIMESTAMP */ + 438, /* (234) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ + 438, /* (235) type_name ::= TINYINT UNSIGNED */ + 438, /* (236) type_name ::= SMALLINT UNSIGNED */ + 438, /* (237) type_name ::= INT UNSIGNED */ + 438, /* (238) type_name ::= BIGINT UNSIGNED */ + 438, /* (239) type_name ::= JSON */ + 438, /* (240) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ + 438, /* (241) type_name ::= MEDIUMBLOB */ + 438, /* (242) type_name ::= BLOB */ + 438, /* (243) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ + 438, /* (244) type_name ::= GEOMETRY NK_LP NK_INTEGER NK_RP */ + 438, /* (245) type_name ::= DECIMAL */ + 438, /* (246) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ + 438, /* (247) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ + 449, /* (248) type_name_default_len ::= BINARY */ + 449, /* (249) type_name_default_len ::= NCHAR */ + 449, /* (250) type_name_default_len ::= VARCHAR */ + 449, /* (251) type_name_default_len ::= VARBINARY */ + 428, /* (252) tags_def_opt ::= */ + 428, /* (253) tags_def_opt ::= tags_def */ + 432, /* (254) tags_def ::= TAGS NK_LP tag_def_list NK_RP */ + 429, /* (255) table_options ::= */ + 429, /* (256) table_options ::= table_options COMMENT NK_STRING */ + 429, /* (257) table_options ::= table_options MAX_DELAY duration_list */ + 429, /* (258) table_options ::= table_options WATERMARK duration_list */ + 429, /* (259) table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ + 429, /* (260) table_options ::= table_options TTL NK_INTEGER */ + 429, /* (261) table_options ::= table_options SMA NK_LP col_name_list NK_RP */ + 429, /* (262) table_options ::= table_options DELETE_MARK duration_list */ + 436, /* (263) alter_table_options ::= alter_table_option */ + 436, /* (264) alter_table_options ::= alter_table_options alter_table_option */ + 452, /* (265) alter_table_option ::= COMMENT NK_STRING */ + 452, /* (266) alter_table_option ::= TTL NK_INTEGER */ + 450, /* (267) duration_list ::= duration_literal */ + 450, /* (268) duration_list ::= duration_list NK_COMMA duration_literal */ + 451, /* (269) rollup_func_list ::= rollup_func_name */ + 451, /* (270) rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ + 454, /* (271) rollup_func_name ::= function_name */ + 454, /* (272) rollup_func_name ::= FIRST */ + 454, /* (273) rollup_func_name ::= LAST */ + 445, /* (274) col_name_list ::= col_name */ + 445, /* (275) col_name_list ::= col_name_list NK_COMMA col_name */ + 456, /* (276) col_name ::= column_name */ + 389, /* (277) cmd ::= SHOW DNODES */ + 389, /* (278) cmd ::= SHOW USERS */ + 389, /* (279) cmd ::= SHOW USERS FULL */ + 389, /* (280) cmd ::= SHOW USER PRIVILEGES */ + 389, /* (281) cmd ::= SHOW db_kind_opt DATABASES */ + 389, /* (282) cmd ::= SHOW table_kind_db_name_cond_opt TABLES like_pattern_opt */ + 389, /* (283) cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ + 389, /* (284) cmd ::= SHOW db_name_cond_opt VGROUPS */ + 389, /* (285) cmd ::= SHOW MNODES */ + 389, /* (286) cmd ::= SHOW QNODES */ + 389, /* (287) cmd ::= SHOW ANODES */ + 389, /* (288) cmd ::= SHOW ANODES FULL */ + 389, /* (289) cmd ::= SHOW ARBGROUPS */ + 389, /* (290) cmd ::= SHOW FUNCTIONS */ + 389, /* (291) cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ + 389, /* (292) cmd ::= SHOW INDEXES FROM db_name NK_DOT table_name */ + 389, /* (293) cmd ::= SHOW STREAMS */ + 389, /* (294) cmd ::= SHOW ACCOUNTS */ + 389, /* (295) cmd ::= SHOW APPS */ + 389, /* (296) cmd ::= SHOW CONNECTIONS */ + 389, /* (297) cmd ::= SHOW LICENCES */ + 389, /* (298) cmd ::= SHOW GRANTS */ + 389, /* (299) cmd ::= SHOW GRANTS FULL */ + 389, /* (300) cmd ::= SHOW GRANTS LOGS */ + 389, /* (301) cmd ::= SHOW CLUSTER MACHINES */ + 389, /* (302) cmd ::= SHOW CREATE DATABASE db_name */ + 389, /* (303) cmd ::= SHOW CREATE TABLE full_table_name */ + 389, /* (304) cmd ::= SHOW CREATE STABLE full_table_name */ + 389, /* (305) cmd ::= SHOW ENCRYPTIONS */ + 389, /* (306) cmd ::= SHOW QUERIES */ + 389, /* (307) cmd ::= SHOW SCORES */ + 389, /* (308) cmd ::= SHOW TOPICS */ + 389, /* (309) cmd ::= SHOW VARIABLES */ + 389, /* (310) cmd ::= SHOW CLUSTER VARIABLES */ + 389, /* (311) cmd ::= SHOW LOCAL VARIABLES */ + 389, /* (312) cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */ + 389, /* (313) cmd ::= SHOW BNODES */ + 389, /* (314) cmd ::= SHOW SNODES */ + 389, /* (315) cmd ::= SHOW CLUSTER */ + 389, /* (316) cmd ::= SHOW TRANSACTIONS */ + 389, /* (317) cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ + 389, /* (318) cmd ::= SHOW CONSUMERS */ + 389, /* (319) cmd ::= SHOW SUBSCRIPTIONS */ + 389, /* (320) cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ + 389, /* (321) cmd ::= SHOW TAGS FROM db_name NK_DOT table_name */ + 389, /* (322) cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ + 389, /* (323) cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name */ + 389, /* (324) cmd ::= SHOW VNODES ON DNODE NK_INTEGER */ + 389, /* (325) cmd ::= SHOW VNODES */ + 389, /* (326) cmd ::= SHOW db_name_cond_opt ALIVE */ + 389, /* (327) cmd ::= SHOW CLUSTER ALIVE */ + 389, /* (328) cmd ::= SHOW db_name_cond_opt VIEWS like_pattern_opt */ + 389, /* (329) cmd ::= SHOW CREATE VIEW full_table_name */ + 389, /* (330) cmd ::= SHOW COMPACTS */ + 389, /* (331) cmd ::= SHOW COMPACT NK_INTEGER */ + 458, /* (332) table_kind_db_name_cond_opt ::= */ + 458, /* (333) table_kind_db_name_cond_opt ::= table_kind */ + 458, /* (334) table_kind_db_name_cond_opt ::= db_name NK_DOT */ + 458, /* (335) table_kind_db_name_cond_opt ::= table_kind db_name NK_DOT */ + 463, /* (336) table_kind ::= NORMAL */ + 463, /* (337) table_kind ::= CHILD */ + 460, /* (338) db_name_cond_opt ::= */ + 460, /* (339) db_name_cond_opt ::= db_name NK_DOT */ + 459, /* (340) like_pattern_opt ::= */ + 459, /* (341) like_pattern_opt ::= LIKE NK_STRING */ + 461, /* (342) table_name_cond ::= table_name */ + 462, /* (343) from_db_opt ::= */ + 462, /* (344) from_db_opt ::= FROM db_name */ + 431, /* (345) tag_list_opt ::= */ + 431, /* (346) tag_list_opt ::= tag_item */ + 431, /* (347) tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ + 464, /* (348) tag_item ::= TBNAME */ + 464, /* (349) tag_item ::= QTAGS */ + 464, /* (350) tag_item ::= column_name */ + 464, /* (351) tag_item ::= column_name column_alias */ + 464, /* (352) tag_item ::= column_name AS column_alias */ + 457, /* (353) db_kind_opt ::= */ + 457, /* (354) db_kind_opt ::= USER */ + 457, /* (355) db_kind_opt ::= SYSTEM */ + 389, /* (356) cmd ::= CREATE TSMA not_exists_opt tsma_name ON full_table_name tsma_func_list INTERVAL NK_LP duration_literal NK_RP */ + 389, /* (357) cmd ::= CREATE RECURSIVE TSMA not_exists_opt tsma_name ON full_table_name INTERVAL NK_LP duration_literal NK_RP */ + 389, /* (358) cmd ::= DROP TSMA exists_opt full_tsma_name */ + 389, /* (359) cmd ::= SHOW db_name_cond_opt TSMAS */ + 468, /* (360) full_tsma_name ::= tsma_name */ + 468, /* (361) full_tsma_name ::= db_name NK_DOT tsma_name */ + 467, /* (362) tsma_func_list ::= FUNCTION NK_LP func_list NK_RP */ + 389, /* (363) cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options */ + 389, /* (364) cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP */ + 389, /* (365) cmd ::= DROP INDEX exists_opt full_index_name */ + 471, /* (366) full_index_name ::= index_name */ + 471, /* (367) full_index_name ::= db_name NK_DOT index_name */ + 470, /* (368) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ + 470, /* (369) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt sma_stream_opt */ + 469, /* (370) func_list ::= func */ + 469, /* (371) func_list ::= func_list NK_COMMA func */ + 475, /* (372) func ::= sma_func_name NK_LP expression_list NK_RP */ + 476, /* (373) sma_func_name ::= function_name */ + 476, /* (374) sma_func_name ::= COUNT */ + 476, /* (375) sma_func_name ::= FIRST */ + 476, /* (376) sma_func_name ::= LAST */ + 476, /* (377) sma_func_name ::= LAST_ROW */ + 474, /* (378) sma_stream_opt ::= */ + 474, /* (379) sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ + 474, /* (380) sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ + 474, /* (381) sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ + 478, /* (382) with_meta ::= AS */ + 478, /* (383) with_meta ::= WITH META AS */ + 478, /* (384) with_meta ::= ONLY META AS */ + 389, /* (385) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ + 389, /* (386) cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name */ + 389, /* (387) cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt */ + 389, /* (388) cmd ::= DROP TOPIC exists_opt topic_name */ + 389, /* (389) cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ + 389, /* (390) cmd ::= DESC full_table_name */ + 389, /* (391) cmd ::= DESCRIBE full_table_name */ + 389, /* (392) cmd ::= RESET QUERY CACHE */ + 389, /* (393) cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ + 389, /* (394) cmd ::= EXPLAIN analyze_opt explain_options insert_query */ + 482, /* (395) analyze_opt ::= */ + 482, /* (396) analyze_opt ::= ANALYZE */ + 483, /* (397) explain_options ::= */ + 483, /* (398) explain_options ::= explain_options VERBOSE NK_BOOL */ + 483, /* (399) explain_options ::= explain_options RATIO NK_FLOAT */ + 389, /* (400) cmd ::= CREATE or_replace_opt agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt language_opt */ + 389, /* (401) cmd ::= DROP FUNCTION exists_opt function_name */ + 486, /* (402) agg_func_opt ::= */ + 486, /* (403) agg_func_opt ::= AGGREGATE */ + 487, /* (404) bufsize_opt ::= */ + 487, /* (405) bufsize_opt ::= BUFSIZE NK_INTEGER */ + 488, /* (406) language_opt ::= */ + 488, /* (407) language_opt ::= LANGUAGE NK_STRING */ + 485, /* (408) or_replace_opt ::= */ + 485, /* (409) or_replace_opt ::= OR REPLACE */ + 389, /* (410) cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery */ + 389, /* (411) cmd ::= DROP VIEW exists_opt full_view_name */ + 489, /* (412) full_view_name ::= view_name */ + 489, /* (413) full_view_name ::= db_name NK_DOT view_name */ + 389, /* (414) cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name col_list_opt tag_def_or_ref_opt subtable_opt AS query_or_subquery */ + 389, /* (415) cmd ::= DROP STREAM exists_opt stream_name */ + 389, /* (416) cmd ::= PAUSE STREAM exists_opt stream_name */ + 389, /* (417) cmd ::= RESUME STREAM exists_opt ignore_opt stream_name */ + 493, /* (418) col_list_opt ::= */ + 493, /* (419) col_list_opt ::= NK_LP column_stream_def_list NK_RP */ + 497, /* (420) column_stream_def_list ::= column_stream_def */ + 497, /* (421) column_stream_def_list ::= column_stream_def_list NK_COMMA column_stream_def */ + 498, /* (422) column_stream_def ::= column_name stream_col_options */ + 499, /* (423) stream_col_options ::= */ + 499, /* (424) stream_col_options ::= stream_col_options PRIMARY KEY */ + 494, /* (425) tag_def_or_ref_opt ::= */ + 494, /* (426) tag_def_or_ref_opt ::= tags_def */ + 494, /* (427) tag_def_or_ref_opt ::= TAGS NK_LP column_stream_def_list NK_RP */ + 492, /* (428) stream_options ::= */ + 492, /* (429) stream_options ::= stream_options TRIGGER AT_ONCE */ + 492, /* (430) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ + 492, /* (431) stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ + 492, /* (432) stream_options ::= stream_options WATERMARK duration_literal */ + 492, /* (433) stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ + 492, /* (434) stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ + 492, /* (435) stream_options ::= stream_options DELETE_MARK duration_literal */ + 492, /* (436) stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */ + 495, /* (437) subtable_opt ::= */ + 495, /* (438) subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ + 496, /* (439) ignore_opt ::= */ + 496, /* (440) ignore_opt ::= IGNORE UNTREATED */ + 389, /* (441) cmd ::= KILL CONNECTION NK_INTEGER */ + 389, /* (442) cmd ::= KILL QUERY NK_STRING */ + 389, /* (443) cmd ::= KILL TRANSACTION NK_INTEGER */ + 389, /* (444) cmd ::= KILL COMPACT NK_INTEGER */ + 389, /* (445) cmd ::= BALANCE VGROUP */ + 389, /* (446) cmd ::= BALANCE VGROUP LEADER on_vgroup_id */ + 389, /* (447) cmd ::= BALANCE VGROUP LEADER DATABASE db_name */ + 389, /* (448) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ + 389, /* (449) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ + 389, /* (450) cmd ::= SPLIT VGROUP NK_INTEGER */ + 501, /* (451) on_vgroup_id ::= */ + 501, /* (452) on_vgroup_id ::= ON NK_INTEGER */ + 502, /* (453) dnode_list ::= DNODE NK_INTEGER */ + 502, /* (454) dnode_list ::= dnode_list DNODE NK_INTEGER */ + 389, /* (455) cmd ::= DELETE FROM full_table_name where_clause_opt */ + 389, /* (456) cmd ::= query_or_subquery */ + 389, /* (457) cmd ::= insert_query */ + 484, /* (458) insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ + 484, /* (459) insert_query ::= INSERT INTO full_table_name query_or_subquery */ + 440, /* (460) tags_literal ::= NK_INTEGER */ + 440, /* (461) tags_literal ::= NK_INTEGER NK_PLUS duration_literal */ + 440, /* (462) tags_literal ::= NK_INTEGER NK_MINUS duration_literal */ + 440, /* (463) tags_literal ::= NK_PLUS NK_INTEGER */ + 440, /* (464) tags_literal ::= NK_PLUS NK_INTEGER NK_PLUS duration_literal */ + 440, /* (465) tags_literal ::= NK_PLUS NK_INTEGER NK_MINUS duration_literal */ + 440, /* (466) tags_literal ::= NK_MINUS NK_INTEGER */ + 440, /* (467) tags_literal ::= NK_MINUS NK_INTEGER NK_PLUS duration_literal */ + 440, /* (468) tags_literal ::= NK_MINUS NK_INTEGER NK_MINUS duration_literal */ + 440, /* (469) tags_literal ::= NK_FLOAT */ + 440, /* (470) tags_literal ::= NK_PLUS NK_FLOAT */ + 440, /* (471) tags_literal ::= NK_MINUS NK_FLOAT */ + 440, /* (472) tags_literal ::= NK_BIN */ + 440, /* (473) tags_literal ::= NK_BIN NK_PLUS duration_literal */ + 440, /* (474) tags_literal ::= NK_BIN NK_MINUS duration_literal */ + 440, /* (475) tags_literal ::= NK_PLUS NK_BIN */ + 440, /* (476) tags_literal ::= NK_PLUS NK_BIN NK_PLUS duration_literal */ + 440, /* (477) tags_literal ::= NK_PLUS NK_BIN NK_MINUS duration_literal */ + 440, /* (478) tags_literal ::= NK_MINUS NK_BIN */ + 440, /* (479) tags_literal ::= NK_MINUS NK_BIN NK_PLUS duration_literal */ + 440, /* (480) tags_literal ::= NK_MINUS NK_BIN NK_MINUS duration_literal */ + 440, /* (481) tags_literal ::= NK_HEX */ + 440, /* (482) tags_literal ::= NK_HEX NK_PLUS duration_literal */ + 440, /* (483) tags_literal ::= NK_HEX NK_MINUS duration_literal */ + 440, /* (484) tags_literal ::= NK_PLUS NK_HEX */ + 440, /* (485) tags_literal ::= NK_PLUS NK_HEX NK_PLUS duration_literal */ + 440, /* (486) tags_literal ::= NK_PLUS NK_HEX NK_MINUS duration_literal */ + 440, /* (487) tags_literal ::= NK_MINUS NK_HEX */ + 440, /* (488) tags_literal ::= NK_MINUS NK_HEX NK_PLUS duration_literal */ + 440, /* (489) tags_literal ::= NK_MINUS NK_HEX NK_MINUS duration_literal */ + 440, /* (490) tags_literal ::= NK_STRING */ + 440, /* (491) tags_literal ::= NK_STRING NK_PLUS duration_literal */ + 440, /* (492) tags_literal ::= NK_STRING NK_MINUS duration_literal */ + 440, /* (493) tags_literal ::= NK_BOOL */ + 440, /* (494) tags_literal ::= NULL */ + 440, /* (495) tags_literal ::= literal_func */ + 440, /* (496) tags_literal ::= literal_func NK_PLUS duration_literal */ + 440, /* (497) tags_literal ::= literal_func NK_MINUS duration_literal */ + 443, /* (498) tags_literal_list ::= tags_literal */ + 443, /* (499) tags_literal_list ::= tags_literal_list NK_COMMA tags_literal */ + 392, /* (500) literal ::= NK_INTEGER */ + 392, /* (501) literal ::= NK_FLOAT */ + 392, /* (502) literal ::= NK_STRING */ + 392, /* (503) literal ::= NK_BOOL */ + 392, /* (504) literal ::= TIMESTAMP NK_STRING */ + 392, /* (505) literal ::= duration_literal */ + 392, /* (506) literal ::= NULL */ + 392, /* (507) literal ::= NK_QUESTION */ + 453, /* (508) duration_literal ::= NK_VARIABLE */ + 423, /* (509) signed ::= NK_INTEGER */ + 423, /* (510) signed ::= NK_PLUS NK_INTEGER */ + 423, /* (511) signed ::= NK_MINUS NK_INTEGER */ + 423, /* (512) signed ::= NK_FLOAT */ + 423, /* (513) signed ::= NK_PLUS NK_FLOAT */ + 423, /* (514) signed ::= NK_MINUS NK_FLOAT */ + 504, /* (515) signed_literal ::= signed */ + 504, /* (516) signed_literal ::= NK_STRING */ + 504, /* (517) signed_literal ::= NK_BOOL */ + 504, /* (518) signed_literal ::= TIMESTAMP NK_STRING */ + 504, /* (519) signed_literal ::= duration_literal */ + 504, /* (520) signed_literal ::= NULL */ + 504, /* (521) signed_literal ::= literal_func */ + 504, /* (522) signed_literal ::= NK_QUESTION */ + 505, /* (523) literal_list ::= signed_literal */ + 505, /* (524) literal_list ::= literal_list NK_COMMA signed_literal */ + 406, /* (525) db_name ::= NK_ID */ + 407, /* (526) table_name ::= NK_ID */ + 437, /* (527) column_name ::= NK_ID */ + 455, /* (528) function_name ::= NK_ID */ + 490, /* (529) view_name ::= NK_ID */ + 506, /* (530) table_alias ::= NK_ID */ + 465, /* (531) column_alias ::= NK_ID */ + 465, /* (532) column_alias ::= NK_ALIAS */ + 399, /* (533) user_name ::= NK_ID */ + 408, /* (534) topic_name ::= NK_ID */ + 491, /* (535) stream_name ::= NK_ID */ + 481, /* (536) cgroup_name ::= NK_ID */ + 472, /* (537) index_name ::= NK_ID */ + 466, /* (538) tsma_name ::= NK_ID */ + 507, /* (539) expr_or_subquery ::= expression */ + 500, /* (540) expression ::= literal */ + 500, /* (541) expression ::= pseudo_column */ + 500, /* (542) expression ::= column_reference */ + 500, /* (543) expression ::= function_expression */ + 500, /* (544) expression ::= case_when_expression */ + 500, /* (545) expression ::= NK_LP expression NK_RP */ + 500, /* (546) expression ::= NK_PLUS expr_or_subquery */ + 500, /* (547) expression ::= NK_MINUS expr_or_subquery */ + 500, /* (548) expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ + 500, /* (549) expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ + 500, /* (550) expression ::= expr_or_subquery NK_STAR expr_or_subquery */ + 500, /* (551) expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ + 500, /* (552) expression ::= expr_or_subquery NK_REM expr_or_subquery */ + 500, /* (553) expression ::= column_reference NK_ARROW NK_STRING */ + 500, /* (554) expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ + 500, /* (555) expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ + 477, /* (556) expression_list ::= expr_or_subquery */ + 477, /* (557) expression_list ::= expression_list NK_COMMA expr_or_subquery */ + 509, /* (558) column_reference ::= column_name */ + 509, /* (559) column_reference ::= table_name NK_DOT column_name */ + 509, /* (560) column_reference ::= NK_ALIAS */ + 509, /* (561) column_reference ::= table_name NK_DOT NK_ALIAS */ + 508, /* (562) pseudo_column ::= ROWTS */ + 508, /* (563) pseudo_column ::= TBNAME */ + 508, /* (564) pseudo_column ::= table_name NK_DOT TBNAME */ + 508, /* (565) pseudo_column ::= QSTART */ + 508, /* (566) pseudo_column ::= QEND */ + 508, /* (567) pseudo_column ::= QDURATION */ + 508, /* (568) pseudo_column ::= WSTART */ + 508, /* (569) pseudo_column ::= WEND */ + 508, /* (570) pseudo_column ::= WDURATION */ + 508, /* (571) pseudo_column ::= IROWTS */ + 508, /* (572) pseudo_column ::= ISFILLED */ + 508, /* (573) pseudo_column ::= QTAGS */ + 508, /* (574) pseudo_column ::= FLOW */ + 508, /* (575) pseudo_column ::= FHIGH */ + 508, /* (576) pseudo_column ::= FROWTS */ + 510, /* (577) function_expression ::= function_name NK_LP expression_list NK_RP */ + 510, /* (578) function_expression ::= star_func NK_LP star_func_para_list NK_RP */ + 510, /* (579) function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ + 510, /* (580) function_expression ::= CAST NK_LP expr_or_subquery AS type_name_default_len NK_RP */ + 510, /* (581) function_expression ::= POSITION NK_LP expr_or_subquery IN expr_or_subquery NK_RP */ + 510, /* (582) function_expression ::= TRIM NK_LP expr_or_subquery NK_RP */ + 510, /* (583) function_expression ::= TRIM NK_LP trim_specification_type FROM expr_or_subquery NK_RP */ + 510, /* (584) function_expression ::= TRIM NK_LP expr_or_subquery FROM expr_or_subquery NK_RP */ + 510, /* (585) function_expression ::= TRIM NK_LP trim_specification_type expr_or_subquery FROM expr_or_subquery NK_RP */ + 510, /* (586) function_expression ::= substr_func NK_LP expression_list NK_RP */ + 510, /* (587) function_expression ::= substr_func NK_LP expr_or_subquery FROM expr_or_subquery NK_RP */ + 510, /* (588) function_expression ::= substr_func NK_LP expr_or_subquery FROM expr_or_subquery FOR expr_or_subquery NK_RP */ + 510, /* (589) function_expression ::= REPLACE NK_LP expression_list NK_RP */ + 510, /* (590) function_expression ::= literal_func */ + 510, /* (591) function_expression ::= rand_func */ + 503, /* (592) literal_func ::= noarg_func NK_LP NK_RP */ + 503, /* (593) literal_func ::= NOW */ + 503, /* (594) literal_func ::= TODAY */ + 516, /* (595) rand_func ::= RAND NK_LP NK_RP */ + 516, /* (596) rand_func ::= RAND NK_LP expression_list NK_RP */ + 515, /* (597) substr_func ::= SUBSTR */ + 515, /* (598) substr_func ::= SUBSTRING */ + 514, /* (599) trim_specification_type ::= BOTH */ + 514, /* (600) trim_specification_type ::= TRAILING */ + 514, /* (601) trim_specification_type ::= LEADING */ + 517, /* (602) noarg_func ::= NOW */ + 517, /* (603) noarg_func ::= TODAY */ + 517, /* (604) noarg_func ::= TIMEZONE */ + 517, /* (605) noarg_func ::= DATABASE */ + 517, /* (606) noarg_func ::= CLIENT_VERSION */ + 517, /* (607) noarg_func ::= SERVER_VERSION */ + 517, /* (608) noarg_func ::= SERVER_STATUS */ + 517, /* (609) noarg_func ::= CURRENT_USER */ + 517, /* (610) noarg_func ::= USER */ + 517, /* (611) noarg_func ::= PI */ + 512, /* (612) star_func ::= COUNT */ + 512, /* (613) star_func ::= FIRST */ + 512, /* (614) star_func ::= LAST */ + 512, /* (615) star_func ::= LAST_ROW */ + 513, /* (616) star_func_para_list ::= NK_STAR */ + 513, /* (617) star_func_para_list ::= other_para_list */ + 518, /* (618) other_para_list ::= star_func_para */ + 518, /* (619) other_para_list ::= other_para_list NK_COMMA star_func_para */ + 519, /* (620) star_func_para ::= expr_or_subquery */ + 519, /* (621) star_func_para ::= table_name NK_DOT NK_STAR */ + 511, /* (622) case_when_expression ::= CASE when_then_list case_when_else_opt END */ + 511, /* (623) case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ + 520, /* (624) when_then_list ::= when_then_expr */ + 520, /* (625) when_then_list ::= when_then_list when_then_expr */ + 523, /* (626) when_then_expr ::= WHEN common_expression THEN common_expression */ + 521, /* (627) case_when_else_opt ::= */ + 521, /* (628) case_when_else_opt ::= ELSE common_expression */ + 524, /* (629) predicate ::= expr_or_subquery compare_op expr_or_subquery */ + 524, /* (630) predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ + 524, /* (631) predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ + 524, /* (632) predicate ::= expr_or_subquery IS NULL */ + 524, /* (633) predicate ::= expr_or_subquery IS NOT NULL */ + 524, /* (634) predicate ::= expr_or_subquery in_op in_predicate_value */ + 525, /* (635) compare_op ::= NK_LT */ + 525, /* (636) compare_op ::= NK_GT */ + 525, /* (637) compare_op ::= NK_LE */ + 525, /* (638) compare_op ::= NK_GE */ + 525, /* (639) compare_op ::= NK_NE */ + 525, /* (640) compare_op ::= NK_EQ */ + 525, /* (641) compare_op ::= LIKE */ + 525, /* (642) compare_op ::= NOT LIKE */ + 525, /* (643) compare_op ::= MATCH */ + 525, /* (644) compare_op ::= NMATCH */ + 525, /* (645) compare_op ::= CONTAINS */ + 526, /* (646) in_op ::= IN */ + 526, /* (647) in_op ::= NOT IN */ + 527, /* (648) in_predicate_value ::= NK_LP literal_list NK_RP */ + 528, /* (649) boolean_value_expression ::= boolean_primary */ + 528, /* (650) boolean_value_expression ::= NOT boolean_primary */ + 528, /* (651) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ + 528, /* (652) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ + 529, /* (653) boolean_primary ::= predicate */ + 529, /* (654) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ + 522, /* (655) common_expression ::= expr_or_subquery */ + 522, /* (656) common_expression ::= boolean_value_expression */ + 530, /* (657) from_clause_opt ::= */ + 530, /* (658) from_clause_opt ::= FROM table_reference_list */ + 531, /* (659) table_reference_list ::= table_reference */ + 531, /* (660) table_reference_list ::= table_reference_list NK_COMMA table_reference */ + 532, /* (661) table_reference ::= table_primary */ + 532, /* (662) table_reference ::= joined_table */ + 533, /* (663) table_primary ::= table_name alias_opt */ + 533, /* (664) table_primary ::= db_name NK_DOT table_name alias_opt */ + 533, /* (665) table_primary ::= subquery alias_opt */ + 533, /* (666) table_primary ::= parenthesized_joined_table */ + 535, /* (667) alias_opt ::= */ + 535, /* (668) alias_opt ::= table_alias */ + 535, /* (669) alias_opt ::= AS table_alias */ + 537, /* (670) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ + 537, /* (671) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ + 534, /* (672) joined_table ::= table_reference join_type join_subtype JOIN table_reference join_on_clause_opt window_offset_clause_opt jlimit_clause_opt */ + 538, /* (673) join_type ::= */ + 538, /* (674) join_type ::= INNER */ + 538, /* (675) join_type ::= LEFT */ + 538, /* (676) join_type ::= RIGHT */ + 538, /* (677) join_type ::= FULL */ + 539, /* (678) join_subtype ::= */ + 539, /* (679) join_subtype ::= OUTER */ + 539, /* (680) join_subtype ::= SEMI */ + 539, /* (681) join_subtype ::= ANTI */ + 539, /* (682) join_subtype ::= ASOF */ + 539, /* (683) join_subtype ::= WINDOW */ + 540, /* (684) join_on_clause_opt ::= */ + 540, /* (685) join_on_clause_opt ::= ON search_condition */ + 541, /* (686) window_offset_clause_opt ::= */ + 541, /* (687) window_offset_clause_opt ::= WINDOW_OFFSET NK_LP window_offset_literal NK_COMMA window_offset_literal NK_RP */ + 543, /* (688) window_offset_literal ::= NK_VARIABLE */ + 543, /* (689) window_offset_literal ::= NK_MINUS NK_VARIABLE */ + 542, /* (690) jlimit_clause_opt ::= */ + 542, /* (691) jlimit_clause_opt ::= JLIMIT NK_INTEGER */ + 544, /* (692) query_specification ::= SELECT hint_list set_quantifier_opt tag_mode_opt select_list from_clause_opt where_clause_opt partition_by_clause_opt range_opt every_opt fill_opt twindow_clause_opt group_by_clause_opt having_clause_opt */ + 545, /* (693) hint_list ::= */ + 545, /* (694) hint_list ::= NK_HINT */ + 547, /* (695) tag_mode_opt ::= */ + 547, /* (696) tag_mode_opt ::= TAGS */ + 546, /* (697) set_quantifier_opt ::= */ + 546, /* (698) set_quantifier_opt ::= DISTINCT */ + 546, /* (699) set_quantifier_opt ::= ALL */ + 548, /* (700) select_list ::= select_item */ + 548, /* (701) select_list ::= select_list NK_COMMA select_item */ + 556, /* (702) select_item ::= NK_STAR */ + 556, /* (703) select_item ::= common_expression */ + 556, /* (704) select_item ::= common_expression column_alias */ + 556, /* (705) select_item ::= common_expression AS column_alias */ + 556, /* (706) select_item ::= table_name NK_DOT NK_STAR */ + 480, /* (707) where_clause_opt ::= */ + 480, /* (708) where_clause_opt ::= WHERE search_condition */ + 549, /* (709) partition_by_clause_opt ::= */ + 549, /* (710) partition_by_clause_opt ::= PARTITION BY partition_list */ + 557, /* (711) partition_list ::= partition_item */ + 557, /* (712) partition_list ::= partition_list NK_COMMA partition_item */ + 558, /* (713) partition_item ::= expr_or_subquery */ + 558, /* (714) partition_item ::= expr_or_subquery column_alias */ + 558, /* (715) partition_item ::= expr_or_subquery AS column_alias */ + 553, /* (716) twindow_clause_opt ::= */ + 553, /* (717) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP */ + 553, /* (718) twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ + 553, /* (719) twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ + 553, /* (720) twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_COMMA interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ + 553, /* (721) twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ + 553, /* (722) twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_RP */ + 553, /* (723) twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ + 553, /* (724) twindow_clause_opt ::= ANOMALY_WINDOW NK_LP expr_or_subquery NK_RP */ + 553, /* (725) twindow_clause_opt ::= ANOMALY_WINDOW NK_LP expr_or_subquery NK_COMMA NK_STRING NK_RP */ + 473, /* (726) sliding_opt ::= */ + 473, /* (727) sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP */ + 559, /* (728) interval_sliding_duration_literal ::= NK_VARIABLE */ + 559, /* (729) interval_sliding_duration_literal ::= NK_STRING */ + 559, /* (730) interval_sliding_duration_literal ::= NK_INTEGER */ + 552, /* (731) fill_opt ::= */ + 552, /* (732) fill_opt ::= FILL NK_LP fill_mode NK_RP */ + 552, /* (733) fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP */ + 552, /* (734) fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP */ + 560, /* (735) fill_mode ::= NONE */ + 560, /* (736) fill_mode ::= PREV */ + 560, /* (737) fill_mode ::= NULL */ + 560, /* (738) fill_mode ::= NULL_F */ + 560, /* (739) fill_mode ::= LINEAR */ + 560, /* (740) fill_mode ::= NEXT */ + 554, /* (741) group_by_clause_opt ::= */ + 554, /* (742) group_by_clause_opt ::= GROUP BY group_by_list */ + 561, /* (743) group_by_list ::= expr_or_subquery */ + 561, /* (744) group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ + 555, /* (745) having_clause_opt ::= */ + 555, /* (746) having_clause_opt ::= HAVING search_condition */ + 550, /* (747) range_opt ::= */ + 550, /* (748) range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ + 550, /* (749) range_opt ::= RANGE NK_LP expr_or_subquery NK_RP */ + 551, /* (750) every_opt ::= */ + 551, /* (751) every_opt ::= EVERY NK_LP duration_literal NK_RP */ + 562, /* (752) query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ + 563, /* (753) query_simple ::= query_specification */ + 563, /* (754) query_simple ::= union_query_expression */ + 567, /* (755) union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ + 567, /* (756) union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ + 568, /* (757) query_simple_or_subquery ::= query_simple */ + 568, /* (758) query_simple_or_subquery ::= subquery */ + 479, /* (759) query_or_subquery ::= query_expression */ + 479, /* (760) query_or_subquery ::= subquery */ + 564, /* (761) order_by_clause_opt ::= */ + 564, /* (762) order_by_clause_opt ::= ORDER BY sort_specification_list */ + 565, /* (763) slimit_clause_opt ::= */ + 565, /* (764) slimit_clause_opt ::= SLIMIT NK_INTEGER */ + 565, /* (765) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ + 565, /* (766) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + 566, /* (767) limit_clause_opt ::= */ + 566, /* (768) limit_clause_opt ::= LIMIT NK_INTEGER */ + 566, /* (769) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ + 566, /* (770) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + 536, /* (771) subquery ::= NK_LP query_expression NK_RP */ + 536, /* (772) subquery ::= NK_LP subquery NK_RP */ + 409, /* (773) search_condition ::= common_expression */ + 569, /* (774) sort_specification_list ::= sort_specification */ + 569, /* (775) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ + 570, /* (776) sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ + 571, /* (777) ordering_specification_opt ::= */ + 571, /* (778) ordering_specification_opt ::= ASC */ + 571, /* (779) ordering_specification_opt ::= DESC */ + 572, /* (780) null_ordering_opt ::= */ + 572, /* (781) null_ordering_opt ::= NULLS FIRST */ + 572, /* (782) null_ordering_opt ::= NULLS LAST */ + 439, /* (783) column_options ::= */ + 439, /* (784) column_options ::= column_options PRIMARY KEY */ + 439, /* (785) column_options ::= column_options NK_ID NK_STRING */ }; /* For rule J, yyRuleInfoNRhs[J] contains the negative of the number @@ -4850,687 +5262,688 @@ static const signed char yyRuleInfoNRhs[] = { -4, /* (101) cmd ::= TRIM DATABASE db_name speed_opt */ -3, /* (102) cmd ::= S3MIGRATE DATABASE db_name */ -5, /* (103) cmd ::= COMPACT DATABASE db_name start_opt end_opt */ - -3, /* (104) not_exists_opt ::= IF NOT EXISTS */ - 0, /* (105) not_exists_opt ::= */ - -2, /* (106) exists_opt ::= IF EXISTS */ - 0, /* (107) exists_opt ::= */ - 0, /* (108) db_options ::= */ - -3, /* (109) db_options ::= db_options BUFFER NK_INTEGER */ - -3, /* (110) db_options ::= db_options CACHEMODEL NK_STRING */ - -3, /* (111) db_options ::= db_options CACHESIZE NK_INTEGER */ - -3, /* (112) db_options ::= db_options COMP NK_INTEGER */ - -3, /* (113) db_options ::= db_options DURATION NK_INTEGER */ - -3, /* (114) db_options ::= db_options DURATION NK_VARIABLE */ - -3, /* (115) db_options ::= db_options MAXROWS NK_INTEGER */ - -3, /* (116) db_options ::= db_options MINROWS NK_INTEGER */ - -3, /* (117) db_options ::= db_options KEEP integer_list */ - -3, /* (118) db_options ::= db_options KEEP variable_list */ - -3, /* (119) db_options ::= db_options PAGES NK_INTEGER */ - -3, /* (120) db_options ::= db_options PAGESIZE NK_INTEGER */ - -3, /* (121) db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */ - -3, /* (122) db_options ::= db_options PRECISION NK_STRING */ - -3, /* (123) db_options ::= db_options REPLICA NK_INTEGER */ - -3, /* (124) db_options ::= db_options VGROUPS NK_INTEGER */ - -3, /* (125) db_options ::= db_options SINGLE_STABLE NK_INTEGER */ - -3, /* (126) db_options ::= db_options RETENTIONS retention_list */ - -3, /* (127) db_options ::= db_options SCHEMALESS NK_INTEGER */ - -3, /* (128) db_options ::= db_options WAL_LEVEL NK_INTEGER */ - -3, /* (129) db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */ - -3, /* (130) db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */ - -4, /* (131) db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ - -3, /* (132) db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */ - -4, /* (133) db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ - -3, /* (134) db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */ - -3, /* (135) db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */ - -3, /* (136) db_options ::= db_options STT_TRIGGER NK_INTEGER */ - -3, /* (137) db_options ::= db_options TABLE_PREFIX signed */ - -3, /* (138) db_options ::= db_options TABLE_SUFFIX signed */ - -3, /* (139) db_options ::= db_options S3_CHUNKPAGES NK_INTEGER */ - -3, /* (140) db_options ::= db_options S3_KEEPLOCAL NK_INTEGER */ - -3, /* (141) db_options ::= db_options S3_KEEPLOCAL NK_VARIABLE */ - -3, /* (142) db_options ::= db_options S3_COMPACT NK_INTEGER */ - -3, /* (143) db_options ::= db_options KEEP_TIME_OFFSET NK_INTEGER */ - -3, /* (144) db_options ::= db_options ENCRYPT_ALGORITHM NK_STRING */ - -3, /* (145) db_options ::= db_options DNODES NK_STRING */ - -1, /* (146) alter_db_options ::= alter_db_option */ - -2, /* (147) alter_db_options ::= alter_db_options alter_db_option */ - -2, /* (148) alter_db_option ::= BUFFER NK_INTEGER */ - -2, /* (149) alter_db_option ::= CACHEMODEL NK_STRING */ - -2, /* (150) alter_db_option ::= CACHESIZE NK_INTEGER */ - -2, /* (151) alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */ - -2, /* (152) alter_db_option ::= KEEP integer_list */ - -2, /* (153) alter_db_option ::= KEEP variable_list */ - -2, /* (154) alter_db_option ::= PAGES NK_INTEGER */ - -2, /* (155) alter_db_option ::= REPLICA NK_INTEGER */ - -2, /* (156) alter_db_option ::= WAL_LEVEL NK_INTEGER */ - -2, /* (157) alter_db_option ::= STT_TRIGGER NK_INTEGER */ - -2, /* (158) alter_db_option ::= MINROWS NK_INTEGER */ - -2, /* (159) alter_db_option ::= WAL_RETENTION_PERIOD NK_INTEGER */ - -3, /* (160) alter_db_option ::= WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ - -2, /* (161) alter_db_option ::= WAL_RETENTION_SIZE NK_INTEGER */ - -3, /* (162) alter_db_option ::= WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ - -2, /* (163) alter_db_option ::= S3_KEEPLOCAL NK_INTEGER */ - -2, /* (164) alter_db_option ::= S3_KEEPLOCAL NK_VARIABLE */ - -2, /* (165) alter_db_option ::= S3_COMPACT NK_INTEGER */ - -2, /* (166) alter_db_option ::= KEEP_TIME_OFFSET NK_INTEGER */ - -2, /* (167) alter_db_option ::= ENCRYPT_ALGORITHM NK_STRING */ - -1, /* (168) integer_list ::= NK_INTEGER */ - -3, /* (169) integer_list ::= integer_list NK_COMMA NK_INTEGER */ - -1, /* (170) variable_list ::= NK_VARIABLE */ - -3, /* (171) variable_list ::= variable_list NK_COMMA NK_VARIABLE */ - -1, /* (172) retention_list ::= retention */ - -3, /* (173) retention_list ::= retention_list NK_COMMA retention */ - -3, /* (174) retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ - -3, /* (175) retention ::= NK_MINUS NK_COLON NK_VARIABLE */ - 0, /* (176) speed_opt ::= */ - -2, /* (177) speed_opt ::= BWLIMIT NK_INTEGER */ - 0, /* (178) start_opt ::= */ - -3, /* (179) start_opt ::= START WITH NK_INTEGER */ - -3, /* (180) start_opt ::= START WITH NK_STRING */ - -4, /* (181) start_opt ::= START WITH TIMESTAMP NK_STRING */ - 0, /* (182) end_opt ::= */ - -3, /* (183) end_opt ::= END WITH NK_INTEGER */ - -3, /* (184) end_opt ::= END WITH NK_STRING */ - -4, /* (185) end_opt ::= END WITH TIMESTAMP NK_STRING */ - -9, /* (186) cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ - -3, /* (187) cmd ::= CREATE TABLE multi_create_clause */ - -10, /* (188) cmd ::= CREATE TABLE not_exists_opt USING full_table_name NK_LP tag_list_opt NK_RP FILE NK_STRING */ - -9, /* (189) cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ - -4, /* (190) cmd ::= DROP TABLE with_opt multi_drop_clause */ - -5, /* (191) cmd ::= DROP STABLE with_opt exists_opt full_table_name */ - -3, /* (192) cmd ::= ALTER TABLE alter_table_clause */ - -3, /* (193) cmd ::= ALTER STABLE alter_table_clause */ - -2, /* (194) alter_table_clause ::= full_table_name alter_table_options */ - -6, /* (195) alter_table_clause ::= full_table_name ADD COLUMN column_name type_name column_options */ - -4, /* (196) alter_table_clause ::= full_table_name DROP COLUMN column_name */ - -5, /* (197) alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ - -5, /* (198) alter_table_clause ::= full_table_name MODIFY COLUMN column_name column_options */ - -5, /* (199) alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ - -5, /* (200) alter_table_clause ::= full_table_name ADD TAG column_name type_name */ - -4, /* (201) alter_table_clause ::= full_table_name DROP TAG column_name */ - -5, /* (202) alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ - -5, /* (203) alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ - -6, /* (204) alter_table_clause ::= full_table_name SET TAG column_name NK_EQ tags_literal */ - -1, /* (205) multi_create_clause ::= create_subtable_clause */ - -2, /* (206) multi_create_clause ::= multi_create_clause create_subtable_clause */ - -10, /* (207) create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_cols_opt TAGS NK_LP tags_literal_list NK_RP table_options */ - -1, /* (208) multi_drop_clause ::= drop_table_clause */ - -3, /* (209) multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause */ - -2, /* (210) drop_table_clause ::= exists_opt full_table_name */ - 0, /* (211) with_opt ::= */ - -1, /* (212) with_opt ::= WITH */ - 0, /* (213) specific_cols_opt ::= */ - -3, /* (214) specific_cols_opt ::= NK_LP col_name_list NK_RP */ - -1, /* (215) full_table_name ::= table_name */ - -3, /* (216) full_table_name ::= db_name NK_DOT table_name */ - -1, /* (217) tag_def_list ::= tag_def */ - -3, /* (218) tag_def_list ::= tag_def_list NK_COMMA tag_def */ - -2, /* (219) tag_def ::= column_name type_name */ - -1, /* (220) column_def_list ::= column_def */ - -3, /* (221) column_def_list ::= column_def_list NK_COMMA column_def */ - -3, /* (222) column_def ::= column_name type_name column_options */ - -1, /* (223) type_name ::= BOOL */ - -1, /* (224) type_name ::= TINYINT */ - -1, /* (225) type_name ::= SMALLINT */ - -1, /* (226) type_name ::= INT */ - -1, /* (227) type_name ::= INTEGER */ - -1, /* (228) type_name ::= BIGINT */ - -1, /* (229) type_name ::= FLOAT */ - -1, /* (230) type_name ::= DOUBLE */ - -4, /* (231) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ - -1, /* (232) type_name ::= TIMESTAMP */ - -4, /* (233) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ - -2, /* (234) type_name ::= TINYINT UNSIGNED */ - -2, /* (235) type_name ::= SMALLINT UNSIGNED */ - -2, /* (236) type_name ::= INT UNSIGNED */ - -2, /* (237) type_name ::= BIGINT UNSIGNED */ - -1, /* (238) type_name ::= JSON */ - -4, /* (239) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ - -1, /* (240) type_name ::= MEDIUMBLOB */ - -1, /* (241) type_name ::= BLOB */ - -4, /* (242) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ - -4, /* (243) type_name ::= GEOMETRY NK_LP NK_INTEGER NK_RP */ - -1, /* (244) type_name ::= DECIMAL */ - -4, /* (245) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ - -6, /* (246) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ - -1, /* (247) type_name_default_len ::= BINARY */ - -1, /* (248) type_name_default_len ::= NCHAR */ - -1, /* (249) type_name_default_len ::= VARCHAR */ - -1, /* (250) type_name_default_len ::= VARBINARY */ - 0, /* (251) tags_def_opt ::= */ - -1, /* (252) tags_def_opt ::= tags_def */ - -4, /* (253) tags_def ::= TAGS NK_LP tag_def_list NK_RP */ - 0, /* (254) table_options ::= */ - -3, /* (255) table_options ::= table_options COMMENT NK_STRING */ - -3, /* (256) table_options ::= table_options MAX_DELAY duration_list */ - -3, /* (257) table_options ::= table_options WATERMARK duration_list */ - -5, /* (258) table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ - -3, /* (259) table_options ::= table_options TTL NK_INTEGER */ - -5, /* (260) table_options ::= table_options SMA NK_LP col_name_list NK_RP */ - -3, /* (261) table_options ::= table_options DELETE_MARK duration_list */ - -1, /* (262) alter_table_options ::= alter_table_option */ - -2, /* (263) alter_table_options ::= alter_table_options alter_table_option */ - -2, /* (264) alter_table_option ::= COMMENT NK_STRING */ - -2, /* (265) alter_table_option ::= TTL NK_INTEGER */ - -1, /* (266) duration_list ::= duration_literal */ - -3, /* (267) duration_list ::= duration_list NK_COMMA duration_literal */ - -1, /* (268) rollup_func_list ::= rollup_func_name */ - -3, /* (269) rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ - -1, /* (270) rollup_func_name ::= function_name */ - -1, /* (271) rollup_func_name ::= FIRST */ - -1, /* (272) rollup_func_name ::= LAST */ - -1, /* (273) col_name_list ::= col_name */ - -3, /* (274) col_name_list ::= col_name_list NK_COMMA col_name */ - -1, /* (275) col_name ::= column_name */ - -2, /* (276) cmd ::= SHOW DNODES */ - -2, /* (277) cmd ::= SHOW USERS */ - -3, /* (278) cmd ::= SHOW USERS FULL */ - -3, /* (279) cmd ::= SHOW USER PRIVILEGES */ - -3, /* (280) cmd ::= SHOW db_kind_opt DATABASES */ - -4, /* (281) cmd ::= SHOW table_kind_db_name_cond_opt TABLES like_pattern_opt */ - -4, /* (282) cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ - -3, /* (283) cmd ::= SHOW db_name_cond_opt VGROUPS */ - -2, /* (284) cmd ::= SHOW MNODES */ - -2, /* (285) cmd ::= SHOW QNODES */ - -2, /* (286) cmd ::= SHOW ANODES */ - -3, /* (287) cmd ::= SHOW ANODES FULL */ - -2, /* (288) cmd ::= SHOW ARBGROUPS */ - -2, /* (289) cmd ::= SHOW FUNCTIONS */ - -5, /* (290) cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ - -6, /* (291) cmd ::= SHOW INDEXES FROM db_name NK_DOT table_name */ - -2, /* (292) cmd ::= SHOW STREAMS */ - -2, /* (293) cmd ::= SHOW ACCOUNTS */ - -2, /* (294) cmd ::= SHOW APPS */ - -2, /* (295) cmd ::= SHOW CONNECTIONS */ - -2, /* (296) cmd ::= SHOW LICENCES */ - -2, /* (297) cmd ::= SHOW GRANTS */ - -3, /* (298) cmd ::= SHOW GRANTS FULL */ - -3, /* (299) cmd ::= SHOW GRANTS LOGS */ - -3, /* (300) cmd ::= SHOW CLUSTER MACHINES */ - -4, /* (301) cmd ::= SHOW CREATE DATABASE db_name */ - -4, /* (302) cmd ::= SHOW CREATE TABLE full_table_name */ - -4, /* (303) cmd ::= SHOW CREATE STABLE full_table_name */ - -2, /* (304) cmd ::= SHOW ENCRYPTIONS */ - -2, /* (305) cmd ::= SHOW QUERIES */ - -2, /* (306) cmd ::= SHOW SCORES */ - -2, /* (307) cmd ::= SHOW TOPICS */ - -2, /* (308) cmd ::= SHOW VARIABLES */ - -3, /* (309) cmd ::= SHOW CLUSTER VARIABLES */ - -3, /* (310) cmd ::= SHOW LOCAL VARIABLES */ - -5, /* (311) cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */ - -2, /* (312) cmd ::= SHOW BNODES */ - -2, /* (313) cmd ::= SHOW SNODES */ - -2, /* (314) cmd ::= SHOW CLUSTER */ - -2, /* (315) cmd ::= SHOW TRANSACTIONS */ - -4, /* (316) cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ - -2, /* (317) cmd ::= SHOW CONSUMERS */ - -2, /* (318) cmd ::= SHOW SUBSCRIPTIONS */ - -5, /* (319) cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ - -6, /* (320) cmd ::= SHOW TAGS FROM db_name NK_DOT table_name */ - -7, /* (321) cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ - -8, /* (322) cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name */ - -5, /* (323) cmd ::= SHOW VNODES ON DNODE NK_INTEGER */ - -2, /* (324) cmd ::= SHOW VNODES */ - -3, /* (325) cmd ::= SHOW db_name_cond_opt ALIVE */ - -3, /* (326) cmd ::= SHOW CLUSTER ALIVE */ - -4, /* (327) cmd ::= SHOW db_name_cond_opt VIEWS like_pattern_opt */ - -4, /* (328) cmd ::= SHOW CREATE VIEW full_table_name */ - -2, /* (329) cmd ::= SHOW COMPACTS */ - -3, /* (330) cmd ::= SHOW COMPACT NK_INTEGER */ - 0, /* (331) table_kind_db_name_cond_opt ::= */ - -1, /* (332) table_kind_db_name_cond_opt ::= table_kind */ - -2, /* (333) table_kind_db_name_cond_opt ::= db_name NK_DOT */ - -3, /* (334) table_kind_db_name_cond_opt ::= table_kind db_name NK_DOT */ - -1, /* (335) table_kind ::= NORMAL */ - -1, /* (336) table_kind ::= CHILD */ - 0, /* (337) db_name_cond_opt ::= */ - -2, /* (338) db_name_cond_opt ::= db_name NK_DOT */ - 0, /* (339) like_pattern_opt ::= */ - -2, /* (340) like_pattern_opt ::= LIKE NK_STRING */ - -1, /* (341) table_name_cond ::= table_name */ - 0, /* (342) from_db_opt ::= */ - -2, /* (343) from_db_opt ::= FROM db_name */ - 0, /* (344) tag_list_opt ::= */ - -1, /* (345) tag_list_opt ::= tag_item */ - -3, /* (346) tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ - -1, /* (347) tag_item ::= TBNAME */ - -1, /* (348) tag_item ::= QTAGS */ - -1, /* (349) tag_item ::= column_name */ - -2, /* (350) tag_item ::= column_name column_alias */ - -3, /* (351) tag_item ::= column_name AS column_alias */ - 0, /* (352) db_kind_opt ::= */ - -1, /* (353) db_kind_opt ::= USER */ - -1, /* (354) db_kind_opt ::= SYSTEM */ - -11, /* (355) cmd ::= CREATE TSMA not_exists_opt tsma_name ON full_table_name tsma_func_list INTERVAL NK_LP duration_literal NK_RP */ - -11, /* (356) cmd ::= CREATE RECURSIVE TSMA not_exists_opt tsma_name ON full_table_name INTERVAL NK_LP duration_literal NK_RP */ - -4, /* (357) cmd ::= DROP TSMA exists_opt full_tsma_name */ - -3, /* (358) cmd ::= SHOW db_name_cond_opt TSMAS */ - -1, /* (359) full_tsma_name ::= tsma_name */ - -3, /* (360) full_tsma_name ::= db_name NK_DOT tsma_name */ - -4, /* (361) tsma_func_list ::= FUNCTION NK_LP func_list NK_RP */ - -8, /* (362) cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options */ - -9, /* (363) cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP */ - -4, /* (364) cmd ::= DROP INDEX exists_opt full_index_name */ - -1, /* (365) full_index_name ::= index_name */ - -3, /* (366) full_index_name ::= db_name NK_DOT index_name */ - -10, /* (367) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ - -12, /* (368) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt sma_stream_opt */ - -1, /* (369) func_list ::= func */ - -3, /* (370) func_list ::= func_list NK_COMMA func */ - -4, /* (371) func ::= sma_func_name NK_LP expression_list NK_RP */ - -1, /* (372) sma_func_name ::= function_name */ - -1, /* (373) sma_func_name ::= COUNT */ - -1, /* (374) sma_func_name ::= FIRST */ - -1, /* (375) sma_func_name ::= LAST */ - -1, /* (376) sma_func_name ::= LAST_ROW */ - 0, /* (377) sma_stream_opt ::= */ - -3, /* (378) sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ - -3, /* (379) sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ - -3, /* (380) sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ - -1, /* (381) with_meta ::= AS */ - -3, /* (382) with_meta ::= WITH META AS */ - -3, /* (383) with_meta ::= ONLY META AS */ - -6, /* (384) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ - -7, /* (385) cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name */ - -8, /* (386) cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt */ - -4, /* (387) cmd ::= DROP TOPIC exists_opt topic_name */ - -7, /* (388) cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ - -2, /* (389) cmd ::= DESC full_table_name */ - -2, /* (390) cmd ::= DESCRIBE full_table_name */ - -3, /* (391) cmd ::= RESET QUERY CACHE */ - -4, /* (392) cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ - -4, /* (393) cmd ::= EXPLAIN analyze_opt explain_options insert_query */ - 0, /* (394) analyze_opt ::= */ - -1, /* (395) analyze_opt ::= ANALYZE */ - 0, /* (396) explain_options ::= */ - -3, /* (397) explain_options ::= explain_options VERBOSE NK_BOOL */ - -3, /* (398) explain_options ::= explain_options RATIO NK_FLOAT */ - -12, /* (399) cmd ::= CREATE or_replace_opt agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt language_opt */ - -4, /* (400) cmd ::= DROP FUNCTION exists_opt function_name */ - 0, /* (401) agg_func_opt ::= */ - -1, /* (402) agg_func_opt ::= AGGREGATE */ - 0, /* (403) bufsize_opt ::= */ - -2, /* (404) bufsize_opt ::= BUFSIZE NK_INTEGER */ - 0, /* (405) language_opt ::= */ - -2, /* (406) language_opt ::= LANGUAGE NK_STRING */ - 0, /* (407) or_replace_opt ::= */ - -2, /* (408) or_replace_opt ::= OR REPLACE */ - -6, /* (409) cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery */ - -4, /* (410) cmd ::= DROP VIEW exists_opt full_view_name */ - -1, /* (411) full_view_name ::= view_name */ - -3, /* (412) full_view_name ::= db_name NK_DOT view_name */ - -12, /* (413) cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name col_list_opt tag_def_or_ref_opt subtable_opt AS query_or_subquery */ - -4, /* (414) cmd ::= DROP STREAM exists_opt stream_name */ - -4, /* (415) cmd ::= PAUSE STREAM exists_opt stream_name */ - -5, /* (416) cmd ::= RESUME STREAM exists_opt ignore_opt stream_name */ - 0, /* (417) col_list_opt ::= */ - -3, /* (418) col_list_opt ::= NK_LP column_stream_def_list NK_RP */ - -1, /* (419) column_stream_def_list ::= column_stream_def */ - -3, /* (420) column_stream_def_list ::= column_stream_def_list NK_COMMA column_stream_def */ - -2, /* (421) column_stream_def ::= column_name stream_col_options */ - 0, /* (422) stream_col_options ::= */ - -3, /* (423) stream_col_options ::= stream_col_options PRIMARY KEY */ - 0, /* (424) tag_def_or_ref_opt ::= */ - -1, /* (425) tag_def_or_ref_opt ::= tags_def */ - -4, /* (426) tag_def_or_ref_opt ::= TAGS NK_LP column_stream_def_list NK_RP */ - 0, /* (427) stream_options ::= */ - -3, /* (428) stream_options ::= stream_options TRIGGER AT_ONCE */ - -3, /* (429) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ - -4, /* (430) stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ - -3, /* (431) stream_options ::= stream_options WATERMARK duration_literal */ - -4, /* (432) stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ - -3, /* (433) stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ - -3, /* (434) stream_options ::= stream_options DELETE_MARK duration_literal */ - -4, /* (435) stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */ - 0, /* (436) subtable_opt ::= */ - -4, /* (437) subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ - 0, /* (438) ignore_opt ::= */ - -2, /* (439) ignore_opt ::= IGNORE UNTREATED */ - -3, /* (440) cmd ::= KILL CONNECTION NK_INTEGER */ - -3, /* (441) cmd ::= KILL QUERY NK_STRING */ - -3, /* (442) cmd ::= KILL TRANSACTION NK_INTEGER */ - -3, /* (443) cmd ::= KILL COMPACT NK_INTEGER */ - -2, /* (444) cmd ::= BALANCE VGROUP */ - -4, /* (445) cmd ::= BALANCE VGROUP LEADER on_vgroup_id */ - -5, /* (446) cmd ::= BALANCE VGROUP LEADER DATABASE db_name */ - -4, /* (447) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ - -4, /* (448) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ - -3, /* (449) cmd ::= SPLIT VGROUP NK_INTEGER */ - 0, /* (450) on_vgroup_id ::= */ - -2, /* (451) on_vgroup_id ::= ON NK_INTEGER */ - -2, /* (452) dnode_list ::= DNODE NK_INTEGER */ - -3, /* (453) dnode_list ::= dnode_list DNODE NK_INTEGER */ - -4, /* (454) cmd ::= DELETE FROM full_table_name where_clause_opt */ - -1, /* (455) cmd ::= query_or_subquery */ - -1, /* (456) cmd ::= insert_query */ - -7, /* (457) insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ - -4, /* (458) insert_query ::= INSERT INTO full_table_name query_or_subquery */ - -1, /* (459) tags_literal ::= NK_INTEGER */ - -3, /* (460) tags_literal ::= NK_INTEGER NK_PLUS duration_literal */ - -3, /* (461) tags_literal ::= NK_INTEGER NK_MINUS duration_literal */ - -2, /* (462) tags_literal ::= NK_PLUS NK_INTEGER */ - -4, /* (463) tags_literal ::= NK_PLUS NK_INTEGER NK_PLUS duration_literal */ - -4, /* (464) tags_literal ::= NK_PLUS NK_INTEGER NK_MINUS duration_literal */ - -2, /* (465) tags_literal ::= NK_MINUS NK_INTEGER */ - -4, /* (466) tags_literal ::= NK_MINUS NK_INTEGER NK_PLUS duration_literal */ - -4, /* (467) tags_literal ::= NK_MINUS NK_INTEGER NK_MINUS duration_literal */ - -1, /* (468) tags_literal ::= NK_FLOAT */ - -2, /* (469) tags_literal ::= NK_PLUS NK_FLOAT */ - -2, /* (470) tags_literal ::= NK_MINUS NK_FLOAT */ - -1, /* (471) tags_literal ::= NK_BIN */ - -3, /* (472) tags_literal ::= NK_BIN NK_PLUS duration_literal */ - -3, /* (473) tags_literal ::= NK_BIN NK_MINUS duration_literal */ - -2, /* (474) tags_literal ::= NK_PLUS NK_BIN */ - -4, /* (475) tags_literal ::= NK_PLUS NK_BIN NK_PLUS duration_literal */ - -4, /* (476) tags_literal ::= NK_PLUS NK_BIN NK_MINUS duration_literal */ - -2, /* (477) tags_literal ::= NK_MINUS NK_BIN */ - -4, /* (478) tags_literal ::= NK_MINUS NK_BIN NK_PLUS duration_literal */ - -4, /* (479) tags_literal ::= NK_MINUS NK_BIN NK_MINUS duration_literal */ - -1, /* (480) tags_literal ::= NK_HEX */ - -3, /* (481) tags_literal ::= NK_HEX NK_PLUS duration_literal */ - -3, /* (482) tags_literal ::= NK_HEX NK_MINUS duration_literal */ - -2, /* (483) tags_literal ::= NK_PLUS NK_HEX */ - -4, /* (484) tags_literal ::= NK_PLUS NK_HEX NK_PLUS duration_literal */ - -4, /* (485) tags_literal ::= NK_PLUS NK_HEX NK_MINUS duration_literal */ - -2, /* (486) tags_literal ::= NK_MINUS NK_HEX */ - -4, /* (487) tags_literal ::= NK_MINUS NK_HEX NK_PLUS duration_literal */ - -4, /* (488) tags_literal ::= NK_MINUS NK_HEX NK_MINUS duration_literal */ - -1, /* (489) tags_literal ::= NK_STRING */ - -3, /* (490) tags_literal ::= NK_STRING NK_PLUS duration_literal */ - -3, /* (491) tags_literal ::= NK_STRING NK_MINUS duration_literal */ - -1, /* (492) tags_literal ::= NK_BOOL */ - -1, /* (493) tags_literal ::= NULL */ - -1, /* (494) tags_literal ::= literal_func */ - -3, /* (495) tags_literal ::= literal_func NK_PLUS duration_literal */ - -3, /* (496) tags_literal ::= literal_func NK_MINUS duration_literal */ - -1, /* (497) tags_literal_list ::= tags_literal */ - -3, /* (498) tags_literal_list ::= tags_literal_list NK_COMMA tags_literal */ - -1, /* (499) literal ::= NK_INTEGER */ - -1, /* (500) literal ::= NK_FLOAT */ - -1, /* (501) literal ::= NK_STRING */ - -1, /* (502) literal ::= NK_BOOL */ - -2, /* (503) literal ::= TIMESTAMP NK_STRING */ - -1, /* (504) literal ::= duration_literal */ - -1, /* (505) literal ::= NULL */ - -1, /* (506) literal ::= NK_QUESTION */ - -1, /* (507) duration_literal ::= NK_VARIABLE */ - -1, /* (508) signed ::= NK_INTEGER */ - -2, /* (509) signed ::= NK_PLUS NK_INTEGER */ - -2, /* (510) signed ::= NK_MINUS NK_INTEGER */ - -1, /* (511) signed ::= NK_FLOAT */ - -2, /* (512) signed ::= NK_PLUS NK_FLOAT */ - -2, /* (513) signed ::= NK_MINUS NK_FLOAT */ - -1, /* (514) signed_literal ::= signed */ - -1, /* (515) signed_literal ::= NK_STRING */ - -1, /* (516) signed_literal ::= NK_BOOL */ - -2, /* (517) signed_literal ::= TIMESTAMP NK_STRING */ - -1, /* (518) signed_literal ::= duration_literal */ - -1, /* (519) signed_literal ::= NULL */ - -1, /* (520) signed_literal ::= literal_func */ - -1, /* (521) signed_literal ::= NK_QUESTION */ - -1, /* (522) literal_list ::= signed_literal */ - -3, /* (523) literal_list ::= literal_list NK_COMMA signed_literal */ - -1, /* (524) db_name ::= NK_ID */ - -1, /* (525) table_name ::= NK_ID */ - -1, /* (526) column_name ::= NK_ID */ - -1, /* (527) function_name ::= NK_ID */ - -1, /* (528) view_name ::= NK_ID */ - -1, /* (529) table_alias ::= NK_ID */ - -1, /* (530) column_alias ::= NK_ID */ - -1, /* (531) column_alias ::= NK_ALIAS */ - -1, /* (532) user_name ::= NK_ID */ - -1, /* (533) topic_name ::= NK_ID */ - -1, /* (534) stream_name ::= NK_ID */ - -1, /* (535) cgroup_name ::= NK_ID */ - -1, /* (536) index_name ::= NK_ID */ - -1, /* (537) tsma_name ::= NK_ID */ - -1, /* (538) expr_or_subquery ::= expression */ - -1, /* (539) expression ::= literal */ - -1, /* (540) expression ::= pseudo_column */ - -1, /* (541) expression ::= column_reference */ - -1, /* (542) expression ::= function_expression */ - -1, /* (543) expression ::= case_when_expression */ - -3, /* (544) expression ::= NK_LP expression NK_RP */ - -2, /* (545) expression ::= NK_PLUS expr_or_subquery */ - -2, /* (546) expression ::= NK_MINUS expr_or_subquery */ - -3, /* (547) expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ - -3, /* (548) expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ - -3, /* (549) expression ::= expr_or_subquery NK_STAR expr_or_subquery */ - -3, /* (550) expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ - -3, /* (551) expression ::= expr_or_subquery NK_REM expr_or_subquery */ - -3, /* (552) expression ::= column_reference NK_ARROW NK_STRING */ - -3, /* (553) expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ - -3, /* (554) expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ - -1, /* (555) expression_list ::= expr_or_subquery */ - -3, /* (556) expression_list ::= expression_list NK_COMMA expr_or_subquery */ - -1, /* (557) column_reference ::= column_name */ - -3, /* (558) column_reference ::= table_name NK_DOT column_name */ - -1, /* (559) column_reference ::= NK_ALIAS */ - -3, /* (560) column_reference ::= table_name NK_DOT NK_ALIAS */ - -1, /* (561) pseudo_column ::= ROWTS */ - -1, /* (562) pseudo_column ::= TBNAME */ - -3, /* (563) pseudo_column ::= table_name NK_DOT TBNAME */ - -1, /* (564) pseudo_column ::= QSTART */ - -1, /* (565) pseudo_column ::= QEND */ - -1, /* (566) pseudo_column ::= QDURATION */ - -1, /* (567) pseudo_column ::= WSTART */ - -1, /* (568) pseudo_column ::= WEND */ - -1, /* (569) pseudo_column ::= WDURATION */ - -1, /* (570) pseudo_column ::= IROWTS */ - -1, /* (571) pseudo_column ::= ISFILLED */ - -1, /* (572) pseudo_column ::= QTAGS */ - -1, /* (573) pseudo_column ::= FLOW */ - -1, /* (574) pseudo_column ::= FHIGH */ - -1, /* (575) pseudo_column ::= FROWTS */ - -4, /* (576) function_expression ::= function_name NK_LP expression_list NK_RP */ - -4, /* (577) function_expression ::= star_func NK_LP star_func_para_list NK_RP */ - -6, /* (578) function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ - -6, /* (579) function_expression ::= CAST NK_LP expr_or_subquery AS type_name_default_len NK_RP */ - -6, /* (580) function_expression ::= POSITION NK_LP expr_or_subquery IN expr_or_subquery NK_RP */ - -4, /* (581) function_expression ::= TRIM NK_LP expr_or_subquery NK_RP */ - -6, /* (582) function_expression ::= TRIM NK_LP trim_specification_type FROM expr_or_subquery NK_RP */ - -6, /* (583) function_expression ::= TRIM NK_LP expr_or_subquery FROM expr_or_subquery NK_RP */ - -7, /* (584) function_expression ::= TRIM NK_LP trim_specification_type expr_or_subquery FROM expr_or_subquery NK_RP */ - -4, /* (585) function_expression ::= substr_func NK_LP expression_list NK_RP */ - -6, /* (586) function_expression ::= substr_func NK_LP expr_or_subquery FROM expr_or_subquery NK_RP */ - -8, /* (587) function_expression ::= substr_func NK_LP expr_or_subquery FROM expr_or_subquery FOR expr_or_subquery NK_RP */ - -4, /* (588) function_expression ::= REPLACE NK_LP expression_list NK_RP */ - -1, /* (589) function_expression ::= literal_func */ - -1, /* (590) function_expression ::= rand_func */ - -3, /* (591) literal_func ::= noarg_func NK_LP NK_RP */ - -1, /* (592) literal_func ::= NOW */ - -1, /* (593) literal_func ::= TODAY */ - -3, /* (594) rand_func ::= RAND NK_LP NK_RP */ - -4, /* (595) rand_func ::= RAND NK_LP expression_list NK_RP */ - -1, /* (596) substr_func ::= SUBSTR */ - -1, /* (597) substr_func ::= SUBSTRING */ - -1, /* (598) trim_specification_type ::= BOTH */ - -1, /* (599) trim_specification_type ::= TRAILING */ - -1, /* (600) trim_specification_type ::= LEADING */ - -1, /* (601) noarg_func ::= NOW */ - -1, /* (602) noarg_func ::= TODAY */ - -1, /* (603) noarg_func ::= TIMEZONE */ - -1, /* (604) noarg_func ::= DATABASE */ - -1, /* (605) noarg_func ::= CLIENT_VERSION */ - -1, /* (606) noarg_func ::= SERVER_VERSION */ - -1, /* (607) noarg_func ::= SERVER_STATUS */ - -1, /* (608) noarg_func ::= CURRENT_USER */ - -1, /* (609) noarg_func ::= USER */ - -1, /* (610) noarg_func ::= PI */ - -1, /* (611) star_func ::= COUNT */ - -1, /* (612) star_func ::= FIRST */ - -1, /* (613) star_func ::= LAST */ - -1, /* (614) star_func ::= LAST_ROW */ - -1, /* (615) star_func_para_list ::= NK_STAR */ - -1, /* (616) star_func_para_list ::= other_para_list */ - -1, /* (617) other_para_list ::= star_func_para */ - -3, /* (618) other_para_list ::= other_para_list NK_COMMA star_func_para */ - -1, /* (619) star_func_para ::= expr_or_subquery */ - -3, /* (620) star_func_para ::= table_name NK_DOT NK_STAR */ - -4, /* (621) case_when_expression ::= CASE when_then_list case_when_else_opt END */ - -5, /* (622) case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ - -1, /* (623) when_then_list ::= when_then_expr */ - -2, /* (624) when_then_list ::= when_then_list when_then_expr */ - -4, /* (625) when_then_expr ::= WHEN common_expression THEN common_expression */ - 0, /* (626) case_when_else_opt ::= */ - -2, /* (627) case_when_else_opt ::= ELSE common_expression */ - -3, /* (628) predicate ::= expr_or_subquery compare_op expr_or_subquery */ - -5, /* (629) predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ - -6, /* (630) predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ - -3, /* (631) predicate ::= expr_or_subquery IS NULL */ - -4, /* (632) predicate ::= expr_or_subquery IS NOT NULL */ - -3, /* (633) predicate ::= expr_or_subquery in_op in_predicate_value */ - -1, /* (634) compare_op ::= NK_LT */ - -1, /* (635) compare_op ::= NK_GT */ - -1, /* (636) compare_op ::= NK_LE */ - -1, /* (637) compare_op ::= NK_GE */ - -1, /* (638) compare_op ::= NK_NE */ - -1, /* (639) compare_op ::= NK_EQ */ - -1, /* (640) compare_op ::= LIKE */ - -2, /* (641) compare_op ::= NOT LIKE */ - -1, /* (642) compare_op ::= MATCH */ - -1, /* (643) compare_op ::= NMATCH */ - -1, /* (644) compare_op ::= CONTAINS */ - -1, /* (645) in_op ::= IN */ - -2, /* (646) in_op ::= NOT IN */ - -3, /* (647) in_predicate_value ::= NK_LP literal_list NK_RP */ - -1, /* (648) boolean_value_expression ::= boolean_primary */ - -2, /* (649) boolean_value_expression ::= NOT boolean_primary */ - -3, /* (650) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ - -3, /* (651) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ - -1, /* (652) boolean_primary ::= predicate */ - -3, /* (653) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ - -1, /* (654) common_expression ::= expr_or_subquery */ - -1, /* (655) common_expression ::= boolean_value_expression */ - 0, /* (656) from_clause_opt ::= */ - -2, /* (657) from_clause_opt ::= FROM table_reference_list */ - -1, /* (658) table_reference_list ::= table_reference */ - -3, /* (659) table_reference_list ::= table_reference_list NK_COMMA table_reference */ - -1, /* (660) table_reference ::= table_primary */ - -1, /* (661) table_reference ::= joined_table */ - -2, /* (662) table_primary ::= table_name alias_opt */ - -4, /* (663) table_primary ::= db_name NK_DOT table_name alias_opt */ - -2, /* (664) table_primary ::= subquery alias_opt */ - -1, /* (665) table_primary ::= parenthesized_joined_table */ - 0, /* (666) alias_opt ::= */ - -1, /* (667) alias_opt ::= table_alias */ - -2, /* (668) alias_opt ::= AS table_alias */ - -3, /* (669) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ - -3, /* (670) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ - -8, /* (671) joined_table ::= table_reference join_type join_subtype JOIN table_reference join_on_clause_opt window_offset_clause_opt jlimit_clause_opt */ - 0, /* (672) join_type ::= */ - -1, /* (673) join_type ::= INNER */ - -1, /* (674) join_type ::= LEFT */ - -1, /* (675) join_type ::= RIGHT */ - -1, /* (676) join_type ::= FULL */ - 0, /* (677) join_subtype ::= */ - -1, /* (678) join_subtype ::= OUTER */ - -1, /* (679) join_subtype ::= SEMI */ - -1, /* (680) join_subtype ::= ANTI */ - -1, /* (681) join_subtype ::= ASOF */ - -1, /* (682) join_subtype ::= WINDOW */ - 0, /* (683) join_on_clause_opt ::= */ - -2, /* (684) join_on_clause_opt ::= ON search_condition */ - 0, /* (685) window_offset_clause_opt ::= */ - -6, /* (686) window_offset_clause_opt ::= WINDOW_OFFSET NK_LP window_offset_literal NK_COMMA window_offset_literal NK_RP */ - -1, /* (687) window_offset_literal ::= NK_VARIABLE */ - -2, /* (688) window_offset_literal ::= NK_MINUS NK_VARIABLE */ - 0, /* (689) jlimit_clause_opt ::= */ - -2, /* (690) jlimit_clause_opt ::= JLIMIT NK_INTEGER */ - -14, /* (691) query_specification ::= SELECT hint_list set_quantifier_opt tag_mode_opt select_list from_clause_opt where_clause_opt partition_by_clause_opt range_opt every_opt fill_opt twindow_clause_opt group_by_clause_opt having_clause_opt */ - 0, /* (692) hint_list ::= */ - -1, /* (693) hint_list ::= NK_HINT */ - 0, /* (694) tag_mode_opt ::= */ - -1, /* (695) tag_mode_opt ::= TAGS */ - 0, /* (696) set_quantifier_opt ::= */ - -1, /* (697) set_quantifier_opt ::= DISTINCT */ - -1, /* (698) set_quantifier_opt ::= ALL */ - -1, /* (699) select_list ::= select_item */ - -3, /* (700) select_list ::= select_list NK_COMMA select_item */ - -1, /* (701) select_item ::= NK_STAR */ - -1, /* (702) select_item ::= common_expression */ - -2, /* (703) select_item ::= common_expression column_alias */ - -3, /* (704) select_item ::= common_expression AS column_alias */ - -3, /* (705) select_item ::= table_name NK_DOT NK_STAR */ - 0, /* (706) where_clause_opt ::= */ - -2, /* (707) where_clause_opt ::= WHERE search_condition */ - 0, /* (708) partition_by_clause_opt ::= */ - -3, /* (709) partition_by_clause_opt ::= PARTITION BY partition_list */ - -1, /* (710) partition_list ::= partition_item */ - -3, /* (711) partition_list ::= partition_list NK_COMMA partition_item */ - -1, /* (712) partition_item ::= expr_or_subquery */ - -2, /* (713) partition_item ::= expr_or_subquery column_alias */ - -3, /* (714) partition_item ::= expr_or_subquery AS column_alias */ - 0, /* (715) twindow_clause_opt ::= */ - -6, /* (716) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP */ - -4, /* (717) twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ - -6, /* (718) twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ - -8, /* (719) twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_COMMA interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ - -7, /* (720) twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ - -4, /* (721) twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_RP */ - -6, /* (722) twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ - -4, /* (723) twindow_clause_opt ::= ANOMALY_WINDOW NK_LP expr_or_subquery NK_RP */ - -6, /* (724) twindow_clause_opt ::= ANOMALY_WINDOW NK_LP expr_or_subquery NK_COMMA NK_STRING NK_RP */ - 0, /* (725) sliding_opt ::= */ - -4, /* (726) sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP */ - -1, /* (727) interval_sliding_duration_literal ::= NK_VARIABLE */ - -1, /* (728) interval_sliding_duration_literal ::= NK_STRING */ - -1, /* (729) interval_sliding_duration_literal ::= NK_INTEGER */ - 0, /* (730) fill_opt ::= */ - -4, /* (731) fill_opt ::= FILL NK_LP fill_mode NK_RP */ - -6, /* (732) fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP */ - -6, /* (733) fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP */ - -1, /* (734) fill_mode ::= NONE */ - -1, /* (735) fill_mode ::= PREV */ - -1, /* (736) fill_mode ::= NULL */ - -1, /* (737) fill_mode ::= NULL_F */ - -1, /* (738) fill_mode ::= LINEAR */ - -1, /* (739) fill_mode ::= NEXT */ - 0, /* (740) group_by_clause_opt ::= */ - -3, /* (741) group_by_clause_opt ::= GROUP BY group_by_list */ - -1, /* (742) group_by_list ::= expr_or_subquery */ - -3, /* (743) group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ - 0, /* (744) having_clause_opt ::= */ - -2, /* (745) having_clause_opt ::= HAVING search_condition */ - 0, /* (746) range_opt ::= */ - -6, /* (747) range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ - -4, /* (748) range_opt ::= RANGE NK_LP expr_or_subquery NK_RP */ - 0, /* (749) every_opt ::= */ - -4, /* (750) every_opt ::= EVERY NK_LP duration_literal NK_RP */ - -4, /* (751) query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ - -1, /* (752) query_simple ::= query_specification */ - -1, /* (753) query_simple ::= union_query_expression */ - -4, /* (754) union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ - -3, /* (755) union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ - -1, /* (756) query_simple_or_subquery ::= query_simple */ - -1, /* (757) query_simple_or_subquery ::= subquery */ - -1, /* (758) query_or_subquery ::= query_expression */ - -1, /* (759) query_or_subquery ::= subquery */ - 0, /* (760) order_by_clause_opt ::= */ - -3, /* (761) order_by_clause_opt ::= ORDER BY sort_specification_list */ - 0, /* (762) slimit_clause_opt ::= */ - -2, /* (763) slimit_clause_opt ::= SLIMIT NK_INTEGER */ - -4, /* (764) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ - -4, /* (765) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - 0, /* (766) limit_clause_opt ::= */ - -2, /* (767) limit_clause_opt ::= LIMIT NK_INTEGER */ - -4, /* (768) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ - -4, /* (769) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - -3, /* (770) subquery ::= NK_LP query_expression NK_RP */ - -3, /* (771) subquery ::= NK_LP subquery NK_RP */ - -1, /* (772) search_condition ::= common_expression */ - -1, /* (773) sort_specification_list ::= sort_specification */ - -3, /* (774) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ - -3, /* (775) sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ - 0, /* (776) ordering_specification_opt ::= */ - -1, /* (777) ordering_specification_opt ::= ASC */ - -1, /* (778) ordering_specification_opt ::= DESC */ - 0, /* (779) null_ordering_opt ::= */ - -2, /* (780) null_ordering_opt ::= NULLS FIRST */ - -2, /* (781) null_ordering_opt ::= NULLS LAST */ - 0, /* (782) column_options ::= */ - -3, /* (783) column_options ::= column_options PRIMARY KEY */ - -3, /* (784) column_options ::= column_options NK_ID NK_STRING */ + -8, /* (104) cmd ::= COMPACT VGROUPS IN NK_LP integer_list NK_RP start_opt end_opt */ + -3, /* (105) not_exists_opt ::= IF NOT EXISTS */ + 0, /* (106) not_exists_opt ::= */ + -2, /* (107) exists_opt ::= IF EXISTS */ + 0, /* (108) exists_opt ::= */ + 0, /* (109) db_options ::= */ + -3, /* (110) db_options ::= db_options BUFFER NK_INTEGER */ + -3, /* (111) db_options ::= db_options CACHEMODEL NK_STRING */ + -3, /* (112) db_options ::= db_options CACHESIZE NK_INTEGER */ + -3, /* (113) db_options ::= db_options COMP NK_INTEGER */ + -3, /* (114) db_options ::= db_options DURATION NK_INTEGER */ + -3, /* (115) db_options ::= db_options DURATION NK_VARIABLE */ + -3, /* (116) db_options ::= db_options MAXROWS NK_INTEGER */ + -3, /* (117) db_options ::= db_options MINROWS NK_INTEGER */ + -3, /* (118) db_options ::= db_options KEEP integer_list */ + -3, /* (119) db_options ::= db_options KEEP variable_list */ + -3, /* (120) db_options ::= db_options PAGES NK_INTEGER */ + -3, /* (121) db_options ::= db_options PAGESIZE NK_INTEGER */ + -3, /* (122) db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */ + -3, /* (123) db_options ::= db_options PRECISION NK_STRING */ + -3, /* (124) db_options ::= db_options REPLICA NK_INTEGER */ + -3, /* (125) db_options ::= db_options VGROUPS NK_INTEGER */ + -3, /* (126) db_options ::= db_options SINGLE_STABLE NK_INTEGER */ + -3, /* (127) db_options ::= db_options RETENTIONS retention_list */ + -3, /* (128) db_options ::= db_options SCHEMALESS NK_INTEGER */ + -3, /* (129) db_options ::= db_options WAL_LEVEL NK_INTEGER */ + -3, /* (130) db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */ + -3, /* (131) db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */ + -4, /* (132) db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ + -3, /* (133) db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */ + -4, /* (134) db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ + -3, /* (135) db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */ + -3, /* (136) db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */ + -3, /* (137) db_options ::= db_options STT_TRIGGER NK_INTEGER */ + -3, /* (138) db_options ::= db_options TABLE_PREFIX signed */ + -3, /* (139) db_options ::= db_options TABLE_SUFFIX signed */ + -3, /* (140) db_options ::= db_options S3_CHUNKPAGES NK_INTEGER */ + -3, /* (141) db_options ::= db_options S3_KEEPLOCAL NK_INTEGER */ + -3, /* (142) db_options ::= db_options S3_KEEPLOCAL NK_VARIABLE */ + -3, /* (143) db_options ::= db_options S3_COMPACT NK_INTEGER */ + -3, /* (144) db_options ::= db_options KEEP_TIME_OFFSET NK_INTEGER */ + -3, /* (145) db_options ::= db_options ENCRYPT_ALGORITHM NK_STRING */ + -3, /* (146) db_options ::= db_options DNODES NK_STRING */ + -1, /* (147) alter_db_options ::= alter_db_option */ + -2, /* (148) alter_db_options ::= alter_db_options alter_db_option */ + -2, /* (149) alter_db_option ::= BUFFER NK_INTEGER */ + -2, /* (150) alter_db_option ::= CACHEMODEL NK_STRING */ + -2, /* (151) alter_db_option ::= CACHESIZE NK_INTEGER */ + -2, /* (152) alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */ + -2, /* (153) alter_db_option ::= KEEP integer_list */ + -2, /* (154) alter_db_option ::= KEEP variable_list */ + -2, /* (155) alter_db_option ::= PAGES NK_INTEGER */ + -2, /* (156) alter_db_option ::= REPLICA NK_INTEGER */ + -2, /* (157) alter_db_option ::= WAL_LEVEL NK_INTEGER */ + -2, /* (158) alter_db_option ::= STT_TRIGGER NK_INTEGER */ + -2, /* (159) alter_db_option ::= MINROWS NK_INTEGER */ + -2, /* (160) alter_db_option ::= WAL_RETENTION_PERIOD NK_INTEGER */ + -3, /* (161) alter_db_option ::= WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ + -2, /* (162) alter_db_option ::= WAL_RETENTION_SIZE NK_INTEGER */ + -3, /* (163) alter_db_option ::= WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ + -2, /* (164) alter_db_option ::= S3_KEEPLOCAL NK_INTEGER */ + -2, /* (165) alter_db_option ::= S3_KEEPLOCAL NK_VARIABLE */ + -2, /* (166) alter_db_option ::= S3_COMPACT NK_INTEGER */ + -2, /* (167) alter_db_option ::= KEEP_TIME_OFFSET NK_INTEGER */ + -2, /* (168) alter_db_option ::= ENCRYPT_ALGORITHM NK_STRING */ + -1, /* (169) integer_list ::= NK_INTEGER */ + -3, /* (170) integer_list ::= integer_list NK_COMMA NK_INTEGER */ + -1, /* (171) variable_list ::= NK_VARIABLE */ + -3, /* (172) variable_list ::= variable_list NK_COMMA NK_VARIABLE */ + -1, /* (173) retention_list ::= retention */ + -3, /* (174) retention_list ::= retention_list NK_COMMA retention */ + -3, /* (175) retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ + -3, /* (176) retention ::= NK_MINUS NK_COLON NK_VARIABLE */ + 0, /* (177) speed_opt ::= */ + -2, /* (178) speed_opt ::= BWLIMIT NK_INTEGER */ + 0, /* (179) start_opt ::= */ + -3, /* (180) start_opt ::= START WITH NK_INTEGER */ + -3, /* (181) start_opt ::= START WITH NK_STRING */ + -4, /* (182) start_opt ::= START WITH TIMESTAMP NK_STRING */ + 0, /* (183) end_opt ::= */ + -3, /* (184) end_opt ::= END WITH NK_INTEGER */ + -3, /* (185) end_opt ::= END WITH NK_STRING */ + -4, /* (186) end_opt ::= END WITH TIMESTAMP NK_STRING */ + -9, /* (187) cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ + -3, /* (188) cmd ::= CREATE TABLE multi_create_clause */ + -10, /* (189) cmd ::= CREATE TABLE not_exists_opt USING full_table_name NK_LP tag_list_opt NK_RP FILE NK_STRING */ + -9, /* (190) cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ + -4, /* (191) cmd ::= DROP TABLE with_opt multi_drop_clause */ + -5, /* (192) cmd ::= DROP STABLE with_opt exists_opt full_table_name */ + -3, /* (193) cmd ::= ALTER TABLE alter_table_clause */ + -3, /* (194) cmd ::= ALTER STABLE alter_table_clause */ + -2, /* (195) alter_table_clause ::= full_table_name alter_table_options */ + -6, /* (196) alter_table_clause ::= full_table_name ADD COLUMN column_name type_name column_options */ + -4, /* (197) alter_table_clause ::= full_table_name DROP COLUMN column_name */ + -5, /* (198) alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ + -5, /* (199) alter_table_clause ::= full_table_name MODIFY COLUMN column_name column_options */ + -5, /* (200) alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ + -5, /* (201) alter_table_clause ::= full_table_name ADD TAG column_name type_name */ + -4, /* (202) alter_table_clause ::= full_table_name DROP TAG column_name */ + -5, /* (203) alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ + -5, /* (204) alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ + -6, /* (205) alter_table_clause ::= full_table_name SET TAG column_name NK_EQ tags_literal */ + -1, /* (206) multi_create_clause ::= create_subtable_clause */ + -2, /* (207) multi_create_clause ::= multi_create_clause create_subtable_clause */ + -10, /* (208) create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_cols_opt TAGS NK_LP tags_literal_list NK_RP table_options */ + -1, /* (209) multi_drop_clause ::= drop_table_clause */ + -3, /* (210) multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause */ + -2, /* (211) drop_table_clause ::= exists_opt full_table_name */ + 0, /* (212) with_opt ::= */ + -1, /* (213) with_opt ::= WITH */ + 0, /* (214) specific_cols_opt ::= */ + -3, /* (215) specific_cols_opt ::= NK_LP col_name_list NK_RP */ + -1, /* (216) full_table_name ::= table_name */ + -3, /* (217) full_table_name ::= db_name NK_DOT table_name */ + -1, /* (218) tag_def_list ::= tag_def */ + -3, /* (219) tag_def_list ::= tag_def_list NK_COMMA tag_def */ + -2, /* (220) tag_def ::= column_name type_name */ + -1, /* (221) column_def_list ::= column_def */ + -3, /* (222) column_def_list ::= column_def_list NK_COMMA column_def */ + -3, /* (223) column_def ::= column_name type_name column_options */ + -1, /* (224) type_name ::= BOOL */ + -1, /* (225) type_name ::= TINYINT */ + -1, /* (226) type_name ::= SMALLINT */ + -1, /* (227) type_name ::= INT */ + -1, /* (228) type_name ::= INTEGER */ + -1, /* (229) type_name ::= BIGINT */ + -1, /* (230) type_name ::= FLOAT */ + -1, /* (231) type_name ::= DOUBLE */ + -4, /* (232) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ + -1, /* (233) type_name ::= TIMESTAMP */ + -4, /* (234) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ + -2, /* (235) type_name ::= TINYINT UNSIGNED */ + -2, /* (236) type_name ::= SMALLINT UNSIGNED */ + -2, /* (237) type_name ::= INT UNSIGNED */ + -2, /* (238) type_name ::= BIGINT UNSIGNED */ + -1, /* (239) type_name ::= JSON */ + -4, /* (240) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ + -1, /* (241) type_name ::= MEDIUMBLOB */ + -1, /* (242) type_name ::= BLOB */ + -4, /* (243) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ + -4, /* (244) type_name ::= GEOMETRY NK_LP NK_INTEGER NK_RP */ + -1, /* (245) type_name ::= DECIMAL */ + -4, /* (246) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ + -6, /* (247) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ + -1, /* (248) type_name_default_len ::= BINARY */ + -1, /* (249) type_name_default_len ::= NCHAR */ + -1, /* (250) type_name_default_len ::= VARCHAR */ + -1, /* (251) type_name_default_len ::= VARBINARY */ + 0, /* (252) tags_def_opt ::= */ + -1, /* (253) tags_def_opt ::= tags_def */ + -4, /* (254) tags_def ::= TAGS NK_LP tag_def_list NK_RP */ + 0, /* (255) table_options ::= */ + -3, /* (256) table_options ::= table_options COMMENT NK_STRING */ + -3, /* (257) table_options ::= table_options MAX_DELAY duration_list */ + -3, /* (258) table_options ::= table_options WATERMARK duration_list */ + -5, /* (259) table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ + -3, /* (260) table_options ::= table_options TTL NK_INTEGER */ + -5, /* (261) table_options ::= table_options SMA NK_LP col_name_list NK_RP */ + -3, /* (262) table_options ::= table_options DELETE_MARK duration_list */ + -1, /* (263) alter_table_options ::= alter_table_option */ + -2, /* (264) alter_table_options ::= alter_table_options alter_table_option */ + -2, /* (265) alter_table_option ::= COMMENT NK_STRING */ + -2, /* (266) alter_table_option ::= TTL NK_INTEGER */ + -1, /* (267) duration_list ::= duration_literal */ + -3, /* (268) duration_list ::= duration_list NK_COMMA duration_literal */ + -1, /* (269) rollup_func_list ::= rollup_func_name */ + -3, /* (270) rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ + -1, /* (271) rollup_func_name ::= function_name */ + -1, /* (272) rollup_func_name ::= FIRST */ + -1, /* (273) rollup_func_name ::= LAST */ + -1, /* (274) col_name_list ::= col_name */ + -3, /* (275) col_name_list ::= col_name_list NK_COMMA col_name */ + -1, /* (276) col_name ::= column_name */ + -2, /* (277) cmd ::= SHOW DNODES */ + -2, /* (278) cmd ::= SHOW USERS */ + -3, /* (279) cmd ::= SHOW USERS FULL */ + -3, /* (280) cmd ::= SHOW USER PRIVILEGES */ + -3, /* (281) cmd ::= SHOW db_kind_opt DATABASES */ + -4, /* (282) cmd ::= SHOW table_kind_db_name_cond_opt TABLES like_pattern_opt */ + -4, /* (283) cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ + -3, /* (284) cmd ::= SHOW db_name_cond_opt VGROUPS */ + -2, /* (285) cmd ::= SHOW MNODES */ + -2, /* (286) cmd ::= SHOW QNODES */ + -2, /* (287) cmd ::= SHOW ANODES */ + -3, /* (288) cmd ::= SHOW ANODES FULL */ + -2, /* (289) cmd ::= SHOW ARBGROUPS */ + -2, /* (290) cmd ::= SHOW FUNCTIONS */ + -5, /* (291) cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ + -6, /* (292) cmd ::= SHOW INDEXES FROM db_name NK_DOT table_name */ + -2, /* (293) cmd ::= SHOW STREAMS */ + -2, /* (294) cmd ::= SHOW ACCOUNTS */ + -2, /* (295) cmd ::= SHOW APPS */ + -2, /* (296) cmd ::= SHOW CONNECTIONS */ + -2, /* (297) cmd ::= SHOW LICENCES */ + -2, /* (298) cmd ::= SHOW GRANTS */ + -3, /* (299) cmd ::= SHOW GRANTS FULL */ + -3, /* (300) cmd ::= SHOW GRANTS LOGS */ + -3, /* (301) cmd ::= SHOW CLUSTER MACHINES */ + -4, /* (302) cmd ::= SHOW CREATE DATABASE db_name */ + -4, /* (303) cmd ::= SHOW CREATE TABLE full_table_name */ + -4, /* (304) cmd ::= SHOW CREATE STABLE full_table_name */ + -2, /* (305) cmd ::= SHOW ENCRYPTIONS */ + -2, /* (306) cmd ::= SHOW QUERIES */ + -2, /* (307) cmd ::= SHOW SCORES */ + -2, /* (308) cmd ::= SHOW TOPICS */ + -2, /* (309) cmd ::= SHOW VARIABLES */ + -3, /* (310) cmd ::= SHOW CLUSTER VARIABLES */ + -3, /* (311) cmd ::= SHOW LOCAL VARIABLES */ + -5, /* (312) cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */ + -2, /* (313) cmd ::= SHOW BNODES */ + -2, /* (314) cmd ::= SHOW SNODES */ + -2, /* (315) cmd ::= SHOW CLUSTER */ + -2, /* (316) cmd ::= SHOW TRANSACTIONS */ + -4, /* (317) cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ + -2, /* (318) cmd ::= SHOW CONSUMERS */ + -2, /* (319) cmd ::= SHOW SUBSCRIPTIONS */ + -5, /* (320) cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ + -6, /* (321) cmd ::= SHOW TAGS FROM db_name NK_DOT table_name */ + -7, /* (322) cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ + -8, /* (323) cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name */ + -5, /* (324) cmd ::= SHOW VNODES ON DNODE NK_INTEGER */ + -2, /* (325) cmd ::= SHOW VNODES */ + -3, /* (326) cmd ::= SHOW db_name_cond_opt ALIVE */ + -3, /* (327) cmd ::= SHOW CLUSTER ALIVE */ + -4, /* (328) cmd ::= SHOW db_name_cond_opt VIEWS like_pattern_opt */ + -4, /* (329) cmd ::= SHOW CREATE VIEW full_table_name */ + -2, /* (330) cmd ::= SHOW COMPACTS */ + -3, /* (331) cmd ::= SHOW COMPACT NK_INTEGER */ + 0, /* (332) table_kind_db_name_cond_opt ::= */ + -1, /* (333) table_kind_db_name_cond_opt ::= table_kind */ + -2, /* (334) table_kind_db_name_cond_opt ::= db_name NK_DOT */ + -3, /* (335) table_kind_db_name_cond_opt ::= table_kind db_name NK_DOT */ + -1, /* (336) table_kind ::= NORMAL */ + -1, /* (337) table_kind ::= CHILD */ + 0, /* (338) db_name_cond_opt ::= */ + -2, /* (339) db_name_cond_opt ::= db_name NK_DOT */ + 0, /* (340) like_pattern_opt ::= */ + -2, /* (341) like_pattern_opt ::= LIKE NK_STRING */ + -1, /* (342) table_name_cond ::= table_name */ + 0, /* (343) from_db_opt ::= */ + -2, /* (344) from_db_opt ::= FROM db_name */ + 0, /* (345) tag_list_opt ::= */ + -1, /* (346) tag_list_opt ::= tag_item */ + -3, /* (347) tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ + -1, /* (348) tag_item ::= TBNAME */ + -1, /* (349) tag_item ::= QTAGS */ + -1, /* (350) tag_item ::= column_name */ + -2, /* (351) tag_item ::= column_name column_alias */ + -3, /* (352) tag_item ::= column_name AS column_alias */ + 0, /* (353) db_kind_opt ::= */ + -1, /* (354) db_kind_opt ::= USER */ + -1, /* (355) db_kind_opt ::= SYSTEM */ + -11, /* (356) cmd ::= CREATE TSMA not_exists_opt tsma_name ON full_table_name tsma_func_list INTERVAL NK_LP duration_literal NK_RP */ + -11, /* (357) cmd ::= CREATE RECURSIVE TSMA not_exists_opt tsma_name ON full_table_name INTERVAL NK_LP duration_literal NK_RP */ + -4, /* (358) cmd ::= DROP TSMA exists_opt full_tsma_name */ + -3, /* (359) cmd ::= SHOW db_name_cond_opt TSMAS */ + -1, /* (360) full_tsma_name ::= tsma_name */ + -3, /* (361) full_tsma_name ::= db_name NK_DOT tsma_name */ + -4, /* (362) tsma_func_list ::= FUNCTION NK_LP func_list NK_RP */ + -8, /* (363) cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options */ + -9, /* (364) cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP */ + -4, /* (365) cmd ::= DROP INDEX exists_opt full_index_name */ + -1, /* (366) full_index_name ::= index_name */ + -3, /* (367) full_index_name ::= db_name NK_DOT index_name */ + -10, /* (368) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ + -12, /* (369) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt sma_stream_opt */ + -1, /* (370) func_list ::= func */ + -3, /* (371) func_list ::= func_list NK_COMMA func */ + -4, /* (372) func ::= sma_func_name NK_LP expression_list NK_RP */ + -1, /* (373) sma_func_name ::= function_name */ + -1, /* (374) sma_func_name ::= COUNT */ + -1, /* (375) sma_func_name ::= FIRST */ + -1, /* (376) sma_func_name ::= LAST */ + -1, /* (377) sma_func_name ::= LAST_ROW */ + 0, /* (378) sma_stream_opt ::= */ + -3, /* (379) sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ + -3, /* (380) sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ + -3, /* (381) sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ + -1, /* (382) with_meta ::= AS */ + -3, /* (383) with_meta ::= WITH META AS */ + -3, /* (384) with_meta ::= ONLY META AS */ + -6, /* (385) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ + -7, /* (386) cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name */ + -8, /* (387) cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt */ + -4, /* (388) cmd ::= DROP TOPIC exists_opt topic_name */ + -7, /* (389) cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ + -2, /* (390) cmd ::= DESC full_table_name */ + -2, /* (391) cmd ::= DESCRIBE full_table_name */ + -3, /* (392) cmd ::= RESET QUERY CACHE */ + -4, /* (393) cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ + -4, /* (394) cmd ::= EXPLAIN analyze_opt explain_options insert_query */ + 0, /* (395) analyze_opt ::= */ + -1, /* (396) analyze_opt ::= ANALYZE */ + 0, /* (397) explain_options ::= */ + -3, /* (398) explain_options ::= explain_options VERBOSE NK_BOOL */ + -3, /* (399) explain_options ::= explain_options RATIO NK_FLOAT */ + -12, /* (400) cmd ::= CREATE or_replace_opt agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt language_opt */ + -4, /* (401) cmd ::= DROP FUNCTION exists_opt function_name */ + 0, /* (402) agg_func_opt ::= */ + -1, /* (403) agg_func_opt ::= AGGREGATE */ + 0, /* (404) bufsize_opt ::= */ + -2, /* (405) bufsize_opt ::= BUFSIZE NK_INTEGER */ + 0, /* (406) language_opt ::= */ + -2, /* (407) language_opt ::= LANGUAGE NK_STRING */ + 0, /* (408) or_replace_opt ::= */ + -2, /* (409) or_replace_opt ::= OR REPLACE */ + -6, /* (410) cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery */ + -4, /* (411) cmd ::= DROP VIEW exists_opt full_view_name */ + -1, /* (412) full_view_name ::= view_name */ + -3, /* (413) full_view_name ::= db_name NK_DOT view_name */ + -12, /* (414) cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name col_list_opt tag_def_or_ref_opt subtable_opt AS query_or_subquery */ + -4, /* (415) cmd ::= DROP STREAM exists_opt stream_name */ + -4, /* (416) cmd ::= PAUSE STREAM exists_opt stream_name */ + -5, /* (417) cmd ::= RESUME STREAM exists_opt ignore_opt stream_name */ + 0, /* (418) col_list_opt ::= */ + -3, /* (419) col_list_opt ::= NK_LP column_stream_def_list NK_RP */ + -1, /* (420) column_stream_def_list ::= column_stream_def */ + -3, /* (421) column_stream_def_list ::= column_stream_def_list NK_COMMA column_stream_def */ + -2, /* (422) column_stream_def ::= column_name stream_col_options */ + 0, /* (423) stream_col_options ::= */ + -3, /* (424) stream_col_options ::= stream_col_options PRIMARY KEY */ + 0, /* (425) tag_def_or_ref_opt ::= */ + -1, /* (426) tag_def_or_ref_opt ::= tags_def */ + -4, /* (427) tag_def_or_ref_opt ::= TAGS NK_LP column_stream_def_list NK_RP */ + 0, /* (428) stream_options ::= */ + -3, /* (429) stream_options ::= stream_options TRIGGER AT_ONCE */ + -3, /* (430) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ + -4, /* (431) stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ + -3, /* (432) stream_options ::= stream_options WATERMARK duration_literal */ + -4, /* (433) stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ + -3, /* (434) stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ + -3, /* (435) stream_options ::= stream_options DELETE_MARK duration_literal */ + -4, /* (436) stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */ + 0, /* (437) subtable_opt ::= */ + -4, /* (438) subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ + 0, /* (439) ignore_opt ::= */ + -2, /* (440) ignore_opt ::= IGNORE UNTREATED */ + -3, /* (441) cmd ::= KILL CONNECTION NK_INTEGER */ + -3, /* (442) cmd ::= KILL QUERY NK_STRING */ + -3, /* (443) cmd ::= KILL TRANSACTION NK_INTEGER */ + -3, /* (444) cmd ::= KILL COMPACT NK_INTEGER */ + -2, /* (445) cmd ::= BALANCE VGROUP */ + -4, /* (446) cmd ::= BALANCE VGROUP LEADER on_vgroup_id */ + -5, /* (447) cmd ::= BALANCE VGROUP LEADER DATABASE db_name */ + -4, /* (448) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ + -4, /* (449) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ + -3, /* (450) cmd ::= SPLIT VGROUP NK_INTEGER */ + 0, /* (451) on_vgroup_id ::= */ + -2, /* (452) on_vgroup_id ::= ON NK_INTEGER */ + -2, /* (453) dnode_list ::= DNODE NK_INTEGER */ + -3, /* (454) dnode_list ::= dnode_list DNODE NK_INTEGER */ + -4, /* (455) cmd ::= DELETE FROM full_table_name where_clause_opt */ + -1, /* (456) cmd ::= query_or_subquery */ + -1, /* (457) cmd ::= insert_query */ + -7, /* (458) insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ + -4, /* (459) insert_query ::= INSERT INTO full_table_name query_or_subquery */ + -1, /* (460) tags_literal ::= NK_INTEGER */ + -3, /* (461) tags_literal ::= NK_INTEGER NK_PLUS duration_literal */ + -3, /* (462) tags_literal ::= NK_INTEGER NK_MINUS duration_literal */ + -2, /* (463) tags_literal ::= NK_PLUS NK_INTEGER */ + -4, /* (464) tags_literal ::= NK_PLUS NK_INTEGER NK_PLUS duration_literal */ + -4, /* (465) tags_literal ::= NK_PLUS NK_INTEGER NK_MINUS duration_literal */ + -2, /* (466) tags_literal ::= NK_MINUS NK_INTEGER */ + -4, /* (467) tags_literal ::= NK_MINUS NK_INTEGER NK_PLUS duration_literal */ + -4, /* (468) tags_literal ::= NK_MINUS NK_INTEGER NK_MINUS duration_literal */ + -1, /* (469) tags_literal ::= NK_FLOAT */ + -2, /* (470) tags_literal ::= NK_PLUS NK_FLOAT */ + -2, /* (471) tags_literal ::= NK_MINUS NK_FLOAT */ + -1, /* (472) tags_literal ::= NK_BIN */ + -3, /* (473) tags_literal ::= NK_BIN NK_PLUS duration_literal */ + -3, /* (474) tags_literal ::= NK_BIN NK_MINUS duration_literal */ + -2, /* (475) tags_literal ::= NK_PLUS NK_BIN */ + -4, /* (476) tags_literal ::= NK_PLUS NK_BIN NK_PLUS duration_literal */ + -4, /* (477) tags_literal ::= NK_PLUS NK_BIN NK_MINUS duration_literal */ + -2, /* (478) tags_literal ::= NK_MINUS NK_BIN */ + -4, /* (479) tags_literal ::= NK_MINUS NK_BIN NK_PLUS duration_literal */ + -4, /* (480) tags_literal ::= NK_MINUS NK_BIN NK_MINUS duration_literal */ + -1, /* (481) tags_literal ::= NK_HEX */ + -3, /* (482) tags_literal ::= NK_HEX NK_PLUS duration_literal */ + -3, /* (483) tags_literal ::= NK_HEX NK_MINUS duration_literal */ + -2, /* (484) tags_literal ::= NK_PLUS NK_HEX */ + -4, /* (485) tags_literal ::= NK_PLUS NK_HEX NK_PLUS duration_literal */ + -4, /* (486) tags_literal ::= NK_PLUS NK_HEX NK_MINUS duration_literal */ + -2, /* (487) tags_literal ::= NK_MINUS NK_HEX */ + -4, /* (488) tags_literal ::= NK_MINUS NK_HEX NK_PLUS duration_literal */ + -4, /* (489) tags_literal ::= NK_MINUS NK_HEX NK_MINUS duration_literal */ + -1, /* (490) tags_literal ::= NK_STRING */ + -3, /* (491) tags_literal ::= NK_STRING NK_PLUS duration_literal */ + -3, /* (492) tags_literal ::= NK_STRING NK_MINUS duration_literal */ + -1, /* (493) tags_literal ::= NK_BOOL */ + -1, /* (494) tags_literal ::= NULL */ + -1, /* (495) tags_literal ::= literal_func */ + -3, /* (496) tags_literal ::= literal_func NK_PLUS duration_literal */ + -3, /* (497) tags_literal ::= literal_func NK_MINUS duration_literal */ + -1, /* (498) tags_literal_list ::= tags_literal */ + -3, /* (499) tags_literal_list ::= tags_literal_list NK_COMMA tags_literal */ + -1, /* (500) literal ::= NK_INTEGER */ + -1, /* (501) literal ::= NK_FLOAT */ + -1, /* (502) literal ::= NK_STRING */ + -1, /* (503) literal ::= NK_BOOL */ + -2, /* (504) literal ::= TIMESTAMP NK_STRING */ + -1, /* (505) literal ::= duration_literal */ + -1, /* (506) literal ::= NULL */ + -1, /* (507) literal ::= NK_QUESTION */ + -1, /* (508) duration_literal ::= NK_VARIABLE */ + -1, /* (509) signed ::= NK_INTEGER */ + -2, /* (510) signed ::= NK_PLUS NK_INTEGER */ + -2, /* (511) signed ::= NK_MINUS NK_INTEGER */ + -1, /* (512) signed ::= NK_FLOAT */ + -2, /* (513) signed ::= NK_PLUS NK_FLOAT */ + -2, /* (514) signed ::= NK_MINUS NK_FLOAT */ + -1, /* (515) signed_literal ::= signed */ + -1, /* (516) signed_literal ::= NK_STRING */ + -1, /* (517) signed_literal ::= NK_BOOL */ + -2, /* (518) signed_literal ::= TIMESTAMP NK_STRING */ + -1, /* (519) signed_literal ::= duration_literal */ + -1, /* (520) signed_literal ::= NULL */ + -1, /* (521) signed_literal ::= literal_func */ + -1, /* (522) signed_literal ::= NK_QUESTION */ + -1, /* (523) literal_list ::= signed_literal */ + -3, /* (524) literal_list ::= literal_list NK_COMMA signed_literal */ + -1, /* (525) db_name ::= NK_ID */ + -1, /* (526) table_name ::= NK_ID */ + -1, /* (527) column_name ::= NK_ID */ + -1, /* (528) function_name ::= NK_ID */ + -1, /* (529) view_name ::= NK_ID */ + -1, /* (530) table_alias ::= NK_ID */ + -1, /* (531) column_alias ::= NK_ID */ + -1, /* (532) column_alias ::= NK_ALIAS */ + -1, /* (533) user_name ::= NK_ID */ + -1, /* (534) topic_name ::= NK_ID */ + -1, /* (535) stream_name ::= NK_ID */ + -1, /* (536) cgroup_name ::= NK_ID */ + -1, /* (537) index_name ::= NK_ID */ + -1, /* (538) tsma_name ::= NK_ID */ + -1, /* (539) expr_or_subquery ::= expression */ + -1, /* (540) expression ::= literal */ + -1, /* (541) expression ::= pseudo_column */ + -1, /* (542) expression ::= column_reference */ + -1, /* (543) expression ::= function_expression */ + -1, /* (544) expression ::= case_when_expression */ + -3, /* (545) expression ::= NK_LP expression NK_RP */ + -2, /* (546) expression ::= NK_PLUS expr_or_subquery */ + -2, /* (547) expression ::= NK_MINUS expr_or_subquery */ + -3, /* (548) expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ + -3, /* (549) expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ + -3, /* (550) expression ::= expr_or_subquery NK_STAR expr_or_subquery */ + -3, /* (551) expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ + -3, /* (552) expression ::= expr_or_subquery NK_REM expr_or_subquery */ + -3, /* (553) expression ::= column_reference NK_ARROW NK_STRING */ + -3, /* (554) expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ + -3, /* (555) expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ + -1, /* (556) expression_list ::= expr_or_subquery */ + -3, /* (557) expression_list ::= expression_list NK_COMMA expr_or_subquery */ + -1, /* (558) column_reference ::= column_name */ + -3, /* (559) column_reference ::= table_name NK_DOT column_name */ + -1, /* (560) column_reference ::= NK_ALIAS */ + -3, /* (561) column_reference ::= table_name NK_DOT NK_ALIAS */ + -1, /* (562) pseudo_column ::= ROWTS */ + -1, /* (563) pseudo_column ::= TBNAME */ + -3, /* (564) pseudo_column ::= table_name NK_DOT TBNAME */ + -1, /* (565) pseudo_column ::= QSTART */ + -1, /* (566) pseudo_column ::= QEND */ + -1, /* (567) pseudo_column ::= QDURATION */ + -1, /* (568) pseudo_column ::= WSTART */ + -1, /* (569) pseudo_column ::= WEND */ + -1, /* (570) pseudo_column ::= WDURATION */ + -1, /* (571) pseudo_column ::= IROWTS */ + -1, /* (572) pseudo_column ::= ISFILLED */ + -1, /* (573) pseudo_column ::= QTAGS */ + -1, /* (574) pseudo_column ::= FLOW */ + -1, /* (575) pseudo_column ::= FHIGH */ + -1, /* (576) pseudo_column ::= FROWTS */ + -4, /* (577) function_expression ::= function_name NK_LP expression_list NK_RP */ + -4, /* (578) function_expression ::= star_func NK_LP star_func_para_list NK_RP */ + -6, /* (579) function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ + -6, /* (580) function_expression ::= CAST NK_LP expr_or_subquery AS type_name_default_len NK_RP */ + -6, /* (581) function_expression ::= POSITION NK_LP expr_or_subquery IN expr_or_subquery NK_RP */ + -4, /* (582) function_expression ::= TRIM NK_LP expr_or_subquery NK_RP */ + -6, /* (583) function_expression ::= TRIM NK_LP trim_specification_type FROM expr_or_subquery NK_RP */ + -6, /* (584) function_expression ::= TRIM NK_LP expr_or_subquery FROM expr_or_subquery NK_RP */ + -7, /* (585) function_expression ::= TRIM NK_LP trim_specification_type expr_or_subquery FROM expr_or_subquery NK_RP */ + -4, /* (586) function_expression ::= substr_func NK_LP expression_list NK_RP */ + -6, /* (587) function_expression ::= substr_func NK_LP expr_or_subquery FROM expr_or_subquery NK_RP */ + -8, /* (588) function_expression ::= substr_func NK_LP expr_or_subquery FROM expr_or_subquery FOR expr_or_subquery NK_RP */ + -4, /* (589) function_expression ::= REPLACE NK_LP expression_list NK_RP */ + -1, /* (590) function_expression ::= literal_func */ + -1, /* (591) function_expression ::= rand_func */ + -3, /* (592) literal_func ::= noarg_func NK_LP NK_RP */ + -1, /* (593) literal_func ::= NOW */ + -1, /* (594) literal_func ::= TODAY */ + -3, /* (595) rand_func ::= RAND NK_LP NK_RP */ + -4, /* (596) rand_func ::= RAND NK_LP expression_list NK_RP */ + -1, /* (597) substr_func ::= SUBSTR */ + -1, /* (598) substr_func ::= SUBSTRING */ + -1, /* (599) trim_specification_type ::= BOTH */ + -1, /* (600) trim_specification_type ::= TRAILING */ + -1, /* (601) trim_specification_type ::= LEADING */ + -1, /* (602) noarg_func ::= NOW */ + -1, /* (603) noarg_func ::= TODAY */ + -1, /* (604) noarg_func ::= TIMEZONE */ + -1, /* (605) noarg_func ::= DATABASE */ + -1, /* (606) noarg_func ::= CLIENT_VERSION */ + -1, /* (607) noarg_func ::= SERVER_VERSION */ + -1, /* (608) noarg_func ::= SERVER_STATUS */ + -1, /* (609) noarg_func ::= CURRENT_USER */ + -1, /* (610) noarg_func ::= USER */ + -1, /* (611) noarg_func ::= PI */ + -1, /* (612) star_func ::= COUNT */ + -1, /* (613) star_func ::= FIRST */ + -1, /* (614) star_func ::= LAST */ + -1, /* (615) star_func ::= LAST_ROW */ + -1, /* (616) star_func_para_list ::= NK_STAR */ + -1, /* (617) star_func_para_list ::= other_para_list */ + -1, /* (618) other_para_list ::= star_func_para */ + -3, /* (619) other_para_list ::= other_para_list NK_COMMA star_func_para */ + -1, /* (620) star_func_para ::= expr_or_subquery */ + -3, /* (621) star_func_para ::= table_name NK_DOT NK_STAR */ + -4, /* (622) case_when_expression ::= CASE when_then_list case_when_else_opt END */ + -5, /* (623) case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ + -1, /* (624) when_then_list ::= when_then_expr */ + -2, /* (625) when_then_list ::= when_then_list when_then_expr */ + -4, /* (626) when_then_expr ::= WHEN common_expression THEN common_expression */ + 0, /* (627) case_when_else_opt ::= */ + -2, /* (628) case_when_else_opt ::= ELSE common_expression */ + -3, /* (629) predicate ::= expr_or_subquery compare_op expr_or_subquery */ + -5, /* (630) predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ + -6, /* (631) predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ + -3, /* (632) predicate ::= expr_or_subquery IS NULL */ + -4, /* (633) predicate ::= expr_or_subquery IS NOT NULL */ + -3, /* (634) predicate ::= expr_or_subquery in_op in_predicate_value */ + -1, /* (635) compare_op ::= NK_LT */ + -1, /* (636) compare_op ::= NK_GT */ + -1, /* (637) compare_op ::= NK_LE */ + -1, /* (638) compare_op ::= NK_GE */ + -1, /* (639) compare_op ::= NK_NE */ + -1, /* (640) compare_op ::= NK_EQ */ + -1, /* (641) compare_op ::= LIKE */ + -2, /* (642) compare_op ::= NOT LIKE */ + -1, /* (643) compare_op ::= MATCH */ + -1, /* (644) compare_op ::= NMATCH */ + -1, /* (645) compare_op ::= CONTAINS */ + -1, /* (646) in_op ::= IN */ + -2, /* (647) in_op ::= NOT IN */ + -3, /* (648) in_predicate_value ::= NK_LP literal_list NK_RP */ + -1, /* (649) boolean_value_expression ::= boolean_primary */ + -2, /* (650) boolean_value_expression ::= NOT boolean_primary */ + -3, /* (651) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ + -3, /* (652) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ + -1, /* (653) boolean_primary ::= predicate */ + -3, /* (654) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ + -1, /* (655) common_expression ::= expr_or_subquery */ + -1, /* (656) common_expression ::= boolean_value_expression */ + 0, /* (657) from_clause_opt ::= */ + -2, /* (658) from_clause_opt ::= FROM table_reference_list */ + -1, /* (659) table_reference_list ::= table_reference */ + -3, /* (660) table_reference_list ::= table_reference_list NK_COMMA table_reference */ + -1, /* (661) table_reference ::= table_primary */ + -1, /* (662) table_reference ::= joined_table */ + -2, /* (663) table_primary ::= table_name alias_opt */ + -4, /* (664) table_primary ::= db_name NK_DOT table_name alias_opt */ + -2, /* (665) table_primary ::= subquery alias_opt */ + -1, /* (666) table_primary ::= parenthesized_joined_table */ + 0, /* (667) alias_opt ::= */ + -1, /* (668) alias_opt ::= table_alias */ + -2, /* (669) alias_opt ::= AS table_alias */ + -3, /* (670) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ + -3, /* (671) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ + -8, /* (672) joined_table ::= table_reference join_type join_subtype JOIN table_reference join_on_clause_opt window_offset_clause_opt jlimit_clause_opt */ + 0, /* (673) join_type ::= */ + -1, /* (674) join_type ::= INNER */ + -1, /* (675) join_type ::= LEFT */ + -1, /* (676) join_type ::= RIGHT */ + -1, /* (677) join_type ::= FULL */ + 0, /* (678) join_subtype ::= */ + -1, /* (679) join_subtype ::= OUTER */ + -1, /* (680) join_subtype ::= SEMI */ + -1, /* (681) join_subtype ::= ANTI */ + -1, /* (682) join_subtype ::= ASOF */ + -1, /* (683) join_subtype ::= WINDOW */ + 0, /* (684) join_on_clause_opt ::= */ + -2, /* (685) join_on_clause_opt ::= ON search_condition */ + 0, /* (686) window_offset_clause_opt ::= */ + -6, /* (687) window_offset_clause_opt ::= WINDOW_OFFSET NK_LP window_offset_literal NK_COMMA window_offset_literal NK_RP */ + -1, /* (688) window_offset_literal ::= NK_VARIABLE */ + -2, /* (689) window_offset_literal ::= NK_MINUS NK_VARIABLE */ + 0, /* (690) jlimit_clause_opt ::= */ + -2, /* (691) jlimit_clause_opt ::= JLIMIT NK_INTEGER */ + -14, /* (692) query_specification ::= SELECT hint_list set_quantifier_opt tag_mode_opt select_list from_clause_opt where_clause_opt partition_by_clause_opt range_opt every_opt fill_opt twindow_clause_opt group_by_clause_opt having_clause_opt */ + 0, /* (693) hint_list ::= */ + -1, /* (694) hint_list ::= NK_HINT */ + 0, /* (695) tag_mode_opt ::= */ + -1, /* (696) tag_mode_opt ::= TAGS */ + 0, /* (697) set_quantifier_opt ::= */ + -1, /* (698) set_quantifier_opt ::= DISTINCT */ + -1, /* (699) set_quantifier_opt ::= ALL */ + -1, /* (700) select_list ::= select_item */ + -3, /* (701) select_list ::= select_list NK_COMMA select_item */ + -1, /* (702) select_item ::= NK_STAR */ + -1, /* (703) select_item ::= common_expression */ + -2, /* (704) select_item ::= common_expression column_alias */ + -3, /* (705) select_item ::= common_expression AS column_alias */ + -3, /* (706) select_item ::= table_name NK_DOT NK_STAR */ + 0, /* (707) where_clause_opt ::= */ + -2, /* (708) where_clause_opt ::= WHERE search_condition */ + 0, /* (709) partition_by_clause_opt ::= */ + -3, /* (710) partition_by_clause_opt ::= PARTITION BY partition_list */ + -1, /* (711) partition_list ::= partition_item */ + -3, /* (712) partition_list ::= partition_list NK_COMMA partition_item */ + -1, /* (713) partition_item ::= expr_or_subquery */ + -2, /* (714) partition_item ::= expr_or_subquery column_alias */ + -3, /* (715) partition_item ::= expr_or_subquery AS column_alias */ + 0, /* (716) twindow_clause_opt ::= */ + -6, /* (717) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP */ + -4, /* (718) twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ + -6, /* (719) twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ + -8, /* (720) twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_COMMA interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ + -7, /* (721) twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ + -4, /* (722) twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_RP */ + -6, /* (723) twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ + -4, /* (724) twindow_clause_opt ::= ANOMALY_WINDOW NK_LP expr_or_subquery NK_RP */ + -6, /* (725) twindow_clause_opt ::= ANOMALY_WINDOW NK_LP expr_or_subquery NK_COMMA NK_STRING NK_RP */ + 0, /* (726) sliding_opt ::= */ + -4, /* (727) sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP */ + -1, /* (728) interval_sliding_duration_literal ::= NK_VARIABLE */ + -1, /* (729) interval_sliding_duration_literal ::= NK_STRING */ + -1, /* (730) interval_sliding_duration_literal ::= NK_INTEGER */ + 0, /* (731) fill_opt ::= */ + -4, /* (732) fill_opt ::= FILL NK_LP fill_mode NK_RP */ + -6, /* (733) fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP */ + -6, /* (734) fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP */ + -1, /* (735) fill_mode ::= NONE */ + -1, /* (736) fill_mode ::= PREV */ + -1, /* (737) fill_mode ::= NULL */ + -1, /* (738) fill_mode ::= NULL_F */ + -1, /* (739) fill_mode ::= LINEAR */ + -1, /* (740) fill_mode ::= NEXT */ + 0, /* (741) group_by_clause_opt ::= */ + -3, /* (742) group_by_clause_opt ::= GROUP BY group_by_list */ + -1, /* (743) group_by_list ::= expr_or_subquery */ + -3, /* (744) group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ + 0, /* (745) having_clause_opt ::= */ + -2, /* (746) having_clause_opt ::= HAVING search_condition */ + 0, /* (747) range_opt ::= */ + -6, /* (748) range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ + -4, /* (749) range_opt ::= RANGE NK_LP expr_or_subquery NK_RP */ + 0, /* (750) every_opt ::= */ + -4, /* (751) every_opt ::= EVERY NK_LP duration_literal NK_RP */ + -4, /* (752) query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ + -1, /* (753) query_simple ::= query_specification */ + -1, /* (754) query_simple ::= union_query_expression */ + -4, /* (755) union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ + -3, /* (756) union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ + -1, /* (757) query_simple_or_subquery ::= query_simple */ + -1, /* (758) query_simple_or_subquery ::= subquery */ + -1, /* (759) query_or_subquery ::= query_expression */ + -1, /* (760) query_or_subquery ::= subquery */ + 0, /* (761) order_by_clause_opt ::= */ + -3, /* (762) order_by_clause_opt ::= ORDER BY sort_specification_list */ + 0, /* (763) slimit_clause_opt ::= */ + -2, /* (764) slimit_clause_opt ::= SLIMIT NK_INTEGER */ + -4, /* (765) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ + -4, /* (766) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + 0, /* (767) limit_clause_opt ::= */ + -2, /* (768) limit_clause_opt ::= LIMIT NK_INTEGER */ + -4, /* (769) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ + -4, /* (770) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + -3, /* (771) subquery ::= NK_LP query_expression NK_RP */ + -3, /* (772) subquery ::= NK_LP subquery NK_RP */ + -1, /* (773) search_condition ::= common_expression */ + -1, /* (774) sort_specification_list ::= sort_specification */ + -3, /* (775) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ + -3, /* (776) sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ + 0, /* (777) ordering_specification_opt ::= */ + -1, /* (778) ordering_specification_opt ::= ASC */ + -1, /* (779) ordering_specification_opt ::= DESC */ + 0, /* (780) null_ordering_opt ::= */ + -2, /* (781) null_ordering_opt ::= NULLS FIRST */ + -2, /* (782) null_ordering_opt ::= NULLS LAST */ + 0, /* (783) column_options ::= */ + -3, /* (784) column_options ::= column_options PRIMARY KEY */ + -3, /* (785) column_options ::= column_options NK_ID NK_STRING */ }; static void yy_accept(yyParser*); /* Forward Declaration */ @@ -5560,54 +5973,6 @@ static YYACTIONTYPE yy_reduce( (void)yyLookahead; (void)yyLookaheadToken; yymsp = yypParser->yytos; -#ifndef NDEBUG - if( yyTraceFILE && yyruleno<(int)(sizeof(yyRuleName)/sizeof(yyRuleName[0])) ){ - yysize = yyRuleInfoNRhs[yyruleno]; - if( yysize ){ - fprintf(yyTraceFILE, "%sReduce %d [%s]%s, pop back to state %d.\n", - yyTracePrompt, - yyruleno, yyRuleName[yyruleno], - yyrulenoyytos - yypParser->yystack)>yypParser->yyhwm ){ - yypParser->yyhwm++; - assert( yypParser->yyhwm == (int)(yypParser->yytos - yypParser->yystack)); - } -#endif -#if YYSTACKDEPTH>0 - if( yypParser->yytos>=yypParser->yystackEnd ){ - yyStackOverflow(yypParser); - /* The call to yyStackOverflow() above pops the stack until it is - ** empty, causing the main parser loop to exit. So the return value - ** is never used and does not matter. */ - return 0; - } -#else - if( yypParser->yytos>=&yypParser->yystack[yypParser->yystksz-1] ){ - if( yyGrowStack(yypParser) ){ - yyStackOverflow(yypParser); - /* The call to yyStackOverflow() above pops the stack until it is - ** empty, causing the main parser loop to exit. So the return value - ** is never used and does not matter. */ - return 0; - } - yymsp = yypParser->yytos; - } -#endif - } switch( yyruleno ){ /* Beginning here are the reduction cases. A typical example @@ -5681,20 +6046,20 @@ static YYACTIONTYPE yy_reduce( { yymsp[-1].minor.yy946 = yymsp[0].minor.yy946; } break; case 27: /* white_list_opt ::= */ - case 213: /* specific_cols_opt ::= */ yytestcase(yyruleno==213); - case 251: /* tags_def_opt ::= */ yytestcase(yyruleno==251); - case 344: /* tag_list_opt ::= */ yytestcase(yyruleno==344); - case 417: /* col_list_opt ::= */ yytestcase(yyruleno==417); - case 424: /* tag_def_or_ref_opt ::= */ yytestcase(yyruleno==424); - case 708: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==708); - case 740: /* group_by_clause_opt ::= */ yytestcase(yyruleno==740); - case 760: /* order_by_clause_opt ::= */ yytestcase(yyruleno==760); + case 214: /* specific_cols_opt ::= */ yytestcase(yyruleno==214); + case 252: /* tags_def_opt ::= */ yytestcase(yyruleno==252); + case 345: /* tag_list_opt ::= */ yytestcase(yyruleno==345); + case 418: /* col_list_opt ::= */ yytestcase(yyruleno==418); + case 425: /* tag_def_or_ref_opt ::= */ yytestcase(yyruleno==425); + case 709: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==709); + case 741: /* group_by_clause_opt ::= */ yytestcase(yyruleno==741); + case 761: /* order_by_clause_opt ::= */ yytestcase(yyruleno==761); { yymsp[1].minor.yy946 = NULL; } break; case 28: /* white_list_opt ::= white_list */ - case 252: /* tags_def_opt ::= tags_def */ yytestcase(yyruleno==252); - case 425: /* tag_def_or_ref_opt ::= tags_def */ yytestcase(yyruleno==425); - case 616: /* star_func_para_list ::= other_para_list */ yytestcase(yyruleno==616); + case 253: /* tags_def_opt ::= tags_def */ yytestcase(yyruleno==253); + case 426: /* tag_def_or_ref_opt ::= tags_def */ yytestcase(yyruleno==426); + case 617: /* star_func_para_list ::= other_para_list */ yytestcase(yyruleno==617); { yylhsminor.yy946 = yymsp[0].minor.yy946; } yymsp[0].minor.yy946 = yylhsminor.yy946; break; @@ -5784,31 +6149,31 @@ static YYACTIONTYPE yy_reduce( yymsp[0].minor.yy723 = yylhsminor.yy723; break; case 57: /* with_clause_opt ::= */ - case 178: /* start_opt ::= */ yytestcase(yyruleno==178); - case 182: /* end_opt ::= */ yytestcase(yyruleno==182); - case 339: /* like_pattern_opt ::= */ yytestcase(yyruleno==339); - case 436: /* subtable_opt ::= */ yytestcase(yyruleno==436); - case 626: /* case_when_else_opt ::= */ yytestcase(yyruleno==626); - case 656: /* from_clause_opt ::= */ yytestcase(yyruleno==656); - case 683: /* join_on_clause_opt ::= */ yytestcase(yyruleno==683); - case 685: /* window_offset_clause_opt ::= */ yytestcase(yyruleno==685); - case 689: /* jlimit_clause_opt ::= */ yytestcase(yyruleno==689); - case 706: /* where_clause_opt ::= */ yytestcase(yyruleno==706); - case 715: /* twindow_clause_opt ::= */ yytestcase(yyruleno==715); - case 725: /* sliding_opt ::= */ yytestcase(yyruleno==725); - case 730: /* fill_opt ::= */ yytestcase(yyruleno==730); - case 744: /* having_clause_opt ::= */ yytestcase(yyruleno==744); - case 746: /* range_opt ::= */ yytestcase(yyruleno==746); - case 749: /* every_opt ::= */ yytestcase(yyruleno==749); - case 762: /* slimit_clause_opt ::= */ yytestcase(yyruleno==762); - case 766: /* limit_clause_opt ::= */ yytestcase(yyruleno==766); + case 179: /* start_opt ::= */ yytestcase(yyruleno==179); + case 183: /* end_opt ::= */ yytestcase(yyruleno==183); + case 340: /* like_pattern_opt ::= */ yytestcase(yyruleno==340); + case 437: /* subtable_opt ::= */ yytestcase(yyruleno==437); + case 627: /* case_when_else_opt ::= */ yytestcase(yyruleno==627); + case 657: /* from_clause_opt ::= */ yytestcase(yyruleno==657); + case 684: /* join_on_clause_opt ::= */ yytestcase(yyruleno==684); + case 686: /* window_offset_clause_opt ::= */ yytestcase(yyruleno==686); + case 690: /* jlimit_clause_opt ::= */ yytestcase(yyruleno==690); + case 707: /* where_clause_opt ::= */ yytestcase(yyruleno==707); + case 716: /* twindow_clause_opt ::= */ yytestcase(yyruleno==716); + case 726: /* sliding_opt ::= */ yytestcase(yyruleno==726); + case 731: /* fill_opt ::= */ yytestcase(yyruleno==731); + case 745: /* having_clause_opt ::= */ yytestcase(yyruleno==745); + case 747: /* range_opt ::= */ yytestcase(yyruleno==747); + case 750: /* every_opt ::= */ yytestcase(yyruleno==750); + case 763: /* slimit_clause_opt ::= */ yytestcase(yyruleno==763); + case 767: /* limit_clause_opt ::= */ yytestcase(yyruleno==767); { yymsp[1].minor.yy974 = NULL; } break; case 58: /* with_clause_opt ::= WITH search_condition */ - case 657: /* from_clause_opt ::= FROM table_reference_list */ yytestcase(yyruleno==657); - case 684: /* join_on_clause_opt ::= ON search_condition */ yytestcase(yyruleno==684); - case 707: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==707); - case 745: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==745); + case 658: /* from_clause_opt ::= FROM table_reference_list */ yytestcase(yyruleno==658); + case 685: /* join_on_clause_opt ::= ON search_condition */ yytestcase(yyruleno==685); + case 708: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==708); + case 746: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==746); { yymsp[-1].minor.yy974 = yymsp[0].minor.yy974; } break; case 59: /* cmd ::= CREATE ENCRYPT_KEY NK_STRING */ @@ -5862,62 +6227,62 @@ static YYACTIONTYPE yy_reduce( case 75: /* dnode_endpoint ::= NK_STRING */ case 76: /* dnode_endpoint ::= NK_ID */ yytestcase(yyruleno==76); case 77: /* dnode_endpoint ::= NK_IPTOKEN */ yytestcase(yyruleno==77); - case 373: /* sma_func_name ::= COUNT */ yytestcase(yyruleno==373); - case 374: /* sma_func_name ::= FIRST */ yytestcase(yyruleno==374); - case 375: /* sma_func_name ::= LAST */ yytestcase(yyruleno==375); - case 376: /* sma_func_name ::= LAST_ROW */ yytestcase(yyruleno==376); - case 524: /* db_name ::= NK_ID */ yytestcase(yyruleno==524); - case 525: /* table_name ::= NK_ID */ yytestcase(yyruleno==525); - case 526: /* column_name ::= NK_ID */ yytestcase(yyruleno==526); - case 527: /* function_name ::= NK_ID */ yytestcase(yyruleno==527); - case 528: /* view_name ::= NK_ID */ yytestcase(yyruleno==528); - case 529: /* table_alias ::= NK_ID */ yytestcase(yyruleno==529); - case 530: /* column_alias ::= NK_ID */ yytestcase(yyruleno==530); - case 531: /* column_alias ::= NK_ALIAS */ yytestcase(yyruleno==531); - case 532: /* user_name ::= NK_ID */ yytestcase(yyruleno==532); - case 533: /* topic_name ::= NK_ID */ yytestcase(yyruleno==533); - case 534: /* stream_name ::= NK_ID */ yytestcase(yyruleno==534); - case 535: /* cgroup_name ::= NK_ID */ yytestcase(yyruleno==535); - case 536: /* index_name ::= NK_ID */ yytestcase(yyruleno==536); - case 537: /* tsma_name ::= NK_ID */ yytestcase(yyruleno==537); - case 596: /* substr_func ::= SUBSTR */ yytestcase(yyruleno==596); - case 597: /* substr_func ::= SUBSTRING */ yytestcase(yyruleno==597); - case 601: /* noarg_func ::= NOW */ yytestcase(yyruleno==601); - case 602: /* noarg_func ::= TODAY */ yytestcase(yyruleno==602); - case 603: /* noarg_func ::= TIMEZONE */ yytestcase(yyruleno==603); - case 604: /* noarg_func ::= DATABASE */ yytestcase(yyruleno==604); - case 605: /* noarg_func ::= CLIENT_VERSION */ yytestcase(yyruleno==605); - case 606: /* noarg_func ::= SERVER_VERSION */ yytestcase(yyruleno==606); - case 607: /* noarg_func ::= SERVER_STATUS */ yytestcase(yyruleno==607); - case 608: /* noarg_func ::= CURRENT_USER */ yytestcase(yyruleno==608); - case 609: /* noarg_func ::= USER */ yytestcase(yyruleno==609); - case 610: /* noarg_func ::= PI */ yytestcase(yyruleno==610); - case 611: /* star_func ::= COUNT */ yytestcase(yyruleno==611); - case 612: /* star_func ::= FIRST */ yytestcase(yyruleno==612); - case 613: /* star_func ::= LAST */ yytestcase(yyruleno==613); - case 614: /* star_func ::= LAST_ROW */ yytestcase(yyruleno==614); + case 374: /* sma_func_name ::= COUNT */ yytestcase(yyruleno==374); + case 375: /* sma_func_name ::= FIRST */ yytestcase(yyruleno==375); + case 376: /* sma_func_name ::= LAST */ yytestcase(yyruleno==376); + case 377: /* sma_func_name ::= LAST_ROW */ yytestcase(yyruleno==377); + case 525: /* db_name ::= NK_ID */ yytestcase(yyruleno==525); + case 526: /* table_name ::= NK_ID */ yytestcase(yyruleno==526); + case 527: /* column_name ::= NK_ID */ yytestcase(yyruleno==527); + case 528: /* function_name ::= NK_ID */ yytestcase(yyruleno==528); + case 529: /* view_name ::= NK_ID */ yytestcase(yyruleno==529); + case 530: /* table_alias ::= NK_ID */ yytestcase(yyruleno==530); + case 531: /* column_alias ::= NK_ID */ yytestcase(yyruleno==531); + case 532: /* column_alias ::= NK_ALIAS */ yytestcase(yyruleno==532); + case 533: /* user_name ::= NK_ID */ yytestcase(yyruleno==533); + case 534: /* topic_name ::= NK_ID */ yytestcase(yyruleno==534); + case 535: /* stream_name ::= NK_ID */ yytestcase(yyruleno==535); + case 536: /* cgroup_name ::= NK_ID */ yytestcase(yyruleno==536); + case 537: /* index_name ::= NK_ID */ yytestcase(yyruleno==537); + case 538: /* tsma_name ::= NK_ID */ yytestcase(yyruleno==538); + case 597: /* substr_func ::= SUBSTR */ yytestcase(yyruleno==597); + case 598: /* substr_func ::= SUBSTRING */ yytestcase(yyruleno==598); + case 602: /* noarg_func ::= NOW */ yytestcase(yyruleno==602); + case 603: /* noarg_func ::= TODAY */ yytestcase(yyruleno==603); + case 604: /* noarg_func ::= TIMEZONE */ yytestcase(yyruleno==604); + case 605: /* noarg_func ::= DATABASE */ yytestcase(yyruleno==605); + case 606: /* noarg_func ::= CLIENT_VERSION */ yytestcase(yyruleno==606); + case 607: /* noarg_func ::= SERVER_VERSION */ yytestcase(yyruleno==607); + case 608: /* noarg_func ::= SERVER_STATUS */ yytestcase(yyruleno==608); + case 609: /* noarg_func ::= CURRENT_USER */ yytestcase(yyruleno==609); + case 610: /* noarg_func ::= USER */ yytestcase(yyruleno==610); + case 611: /* noarg_func ::= PI */ yytestcase(yyruleno==611); + case 612: /* star_func ::= COUNT */ yytestcase(yyruleno==612); + case 613: /* star_func ::= FIRST */ yytestcase(yyruleno==613); + case 614: /* star_func ::= LAST */ yytestcase(yyruleno==614); + case 615: /* star_func ::= LAST_ROW */ yytestcase(yyruleno==615); { yylhsminor.yy557 = yymsp[0].minor.yy0; } yymsp[0].minor.yy557 = yylhsminor.yy557; break; case 78: /* force_opt ::= */ - case 105: /* not_exists_opt ::= */ yytestcase(yyruleno==105); - case 107: /* exists_opt ::= */ yytestcase(yyruleno==107); - case 211: /* with_opt ::= */ yytestcase(yyruleno==211); - case 394: /* analyze_opt ::= */ yytestcase(yyruleno==394); - case 401: /* agg_func_opt ::= */ yytestcase(yyruleno==401); - case 407: /* or_replace_opt ::= */ yytestcase(yyruleno==407); - case 438: /* ignore_opt ::= */ yytestcase(yyruleno==438); - case 694: /* tag_mode_opt ::= */ yytestcase(yyruleno==694); - case 696: /* set_quantifier_opt ::= */ yytestcase(yyruleno==696); + case 106: /* not_exists_opt ::= */ yytestcase(yyruleno==106); + case 108: /* exists_opt ::= */ yytestcase(yyruleno==108); + case 212: /* with_opt ::= */ yytestcase(yyruleno==212); + case 395: /* analyze_opt ::= */ yytestcase(yyruleno==395); + case 402: /* agg_func_opt ::= */ yytestcase(yyruleno==402); + case 408: /* or_replace_opt ::= */ yytestcase(yyruleno==408); + case 439: /* ignore_opt ::= */ yytestcase(yyruleno==439); + case 695: /* tag_mode_opt ::= */ yytestcase(yyruleno==695); + case 697: /* set_quantifier_opt ::= */ yytestcase(yyruleno==697); { yymsp[1].minor.yy569 = false; } break; case 79: /* force_opt ::= FORCE */ case 80: /* unsafe_opt ::= UNSAFE */ yytestcase(yyruleno==80); - case 212: /* with_opt ::= WITH */ yytestcase(yyruleno==212); - case 395: /* analyze_opt ::= ANALYZE */ yytestcase(yyruleno==395); - case 402: /* agg_func_opt ::= AGGREGATE */ yytestcase(yyruleno==402); - case 695: /* tag_mode_opt ::= TAGS */ yytestcase(yyruleno==695); - case 697: /* set_quantifier_opt ::= DISTINCT */ yytestcase(yyruleno==697); + case 213: /* with_opt ::= WITH */ yytestcase(yyruleno==213); + case 396: /* analyze_opt ::= ANALYZE */ yytestcase(yyruleno==396); + case 403: /* agg_func_opt ::= AGGREGATE */ yytestcase(yyruleno==403); + case 696: /* tag_mode_opt ::= TAGS */ yytestcase(yyruleno==696); + case 698: /* set_quantifier_opt ::= DISTINCT */ yytestcase(yyruleno==698); { yymsp[0].minor.yy569 = true; } break; case 81: /* cmd ::= ALTER CLUSTER NK_STRING */ @@ -5989,100 +6354,103 @@ static YYACTIONTYPE yy_reduce( case 103: /* cmd ::= COMPACT DATABASE db_name start_opt end_opt */ { pCxt->pRootNode = createCompactStmt(pCxt, &yymsp[-2].minor.yy557, yymsp[-1].minor.yy974, yymsp[0].minor.yy974); } break; - case 104: /* not_exists_opt ::= IF NOT EXISTS */ + case 104: /* cmd ::= COMPACT VGROUPS IN NK_LP integer_list NK_RP start_opt end_opt */ +{ pCxt->pRootNode = createCompactVgroupsStmt(pCxt, yymsp[-3].minor.yy946, yymsp[-1].minor.yy974, yymsp[0].minor.yy974); } + break; + case 105: /* not_exists_opt ::= IF NOT EXISTS */ { yymsp[-2].minor.yy569 = true; } break; - case 106: /* exists_opt ::= IF EXISTS */ - case 408: /* or_replace_opt ::= OR REPLACE */ yytestcase(yyruleno==408); - case 439: /* ignore_opt ::= IGNORE UNTREATED */ yytestcase(yyruleno==439); + case 107: /* exists_opt ::= IF EXISTS */ + case 409: /* or_replace_opt ::= OR REPLACE */ yytestcase(yyruleno==409); + case 440: /* ignore_opt ::= IGNORE UNTREATED */ yytestcase(yyruleno==440); { yymsp[-1].minor.yy569 = true; } break; - case 108: /* db_options ::= */ + case 109: /* db_options ::= */ { yymsp[1].minor.yy974 = createDefaultDatabaseOptions(pCxt); } break; - case 109: /* db_options ::= db_options BUFFER NK_INTEGER */ + case 110: /* db_options ::= db_options BUFFER NK_INTEGER */ { yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_BUFFER, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 110: /* db_options ::= db_options CACHEMODEL NK_STRING */ + case 111: /* db_options ::= db_options CACHEMODEL NK_STRING */ { yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_CACHEMODEL, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 111: /* db_options ::= db_options CACHESIZE NK_INTEGER */ + case 112: /* db_options ::= db_options CACHESIZE NK_INTEGER */ { yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_CACHESIZE, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 112: /* db_options ::= db_options COMP NK_INTEGER */ + case 113: /* db_options ::= db_options COMP NK_INTEGER */ { yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_COMP, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 113: /* db_options ::= db_options DURATION NK_INTEGER */ - case 114: /* db_options ::= db_options DURATION NK_VARIABLE */ yytestcase(yyruleno==114); + case 114: /* db_options ::= db_options DURATION NK_INTEGER */ + case 115: /* db_options ::= db_options DURATION NK_VARIABLE */ yytestcase(yyruleno==115); { yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_DAYS, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 115: /* db_options ::= db_options MAXROWS NK_INTEGER */ + case 116: /* db_options ::= db_options MAXROWS NK_INTEGER */ { yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_MAXROWS, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 116: /* db_options ::= db_options MINROWS NK_INTEGER */ + case 117: /* db_options ::= db_options MINROWS NK_INTEGER */ { yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_MINROWS, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 117: /* db_options ::= db_options KEEP integer_list */ - case 118: /* db_options ::= db_options KEEP variable_list */ yytestcase(yyruleno==118); + case 118: /* db_options ::= db_options KEEP integer_list */ + case 119: /* db_options ::= db_options KEEP variable_list */ yytestcase(yyruleno==119); { yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_KEEP, yymsp[0].minor.yy946); } yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 119: /* db_options ::= db_options PAGES NK_INTEGER */ + case 120: /* db_options ::= db_options PAGES NK_INTEGER */ { yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_PAGES, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 120: /* db_options ::= db_options PAGESIZE NK_INTEGER */ + case 121: /* db_options ::= db_options PAGESIZE NK_INTEGER */ { yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_PAGESIZE, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 121: /* db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */ + case 122: /* db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */ { yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_TSDB_PAGESIZE, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 122: /* db_options ::= db_options PRECISION NK_STRING */ + case 123: /* db_options ::= db_options PRECISION NK_STRING */ { yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_PRECISION, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 123: /* db_options ::= db_options REPLICA NK_INTEGER */ + case 124: /* db_options ::= db_options REPLICA NK_INTEGER */ { yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_REPLICA, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 124: /* db_options ::= db_options VGROUPS NK_INTEGER */ + case 125: /* db_options ::= db_options VGROUPS NK_INTEGER */ { yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_VGROUPS, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 125: /* db_options ::= db_options SINGLE_STABLE NK_INTEGER */ + case 126: /* db_options ::= db_options SINGLE_STABLE NK_INTEGER */ { yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_SINGLE_STABLE, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 126: /* db_options ::= db_options RETENTIONS retention_list */ + case 127: /* db_options ::= db_options RETENTIONS retention_list */ { yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_RETENTIONS, yymsp[0].minor.yy946); } yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 127: /* db_options ::= db_options SCHEMALESS NK_INTEGER */ + case 128: /* db_options ::= db_options SCHEMALESS NK_INTEGER */ { yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_SCHEMALESS, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 128: /* db_options ::= db_options WAL_LEVEL NK_INTEGER */ + case 129: /* db_options ::= db_options WAL_LEVEL NK_INTEGER */ { yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_WAL, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 129: /* db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */ + case 130: /* db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */ { yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_FSYNC, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 130: /* db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */ + case 131: /* db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */ { yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_WAL_RETENTION_PERIOD, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 131: /* db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ + case 132: /* db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; @@ -6090,11 +6458,11 @@ static YYACTIONTYPE yy_reduce( } yymsp[-3].minor.yy974 = yylhsminor.yy974; break; - case 132: /* db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */ + case 133: /* db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */ { yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_WAL_RETENTION_SIZE, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 133: /* db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ + case 134: /* db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; @@ -6102,941 +6470,941 @@ static YYACTIONTYPE yy_reduce( } yymsp[-3].minor.yy974 = yylhsminor.yy974; break; - case 134: /* db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */ + case 135: /* db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */ { yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_WAL_ROLL_PERIOD, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 135: /* db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */ + case 136: /* db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */ { yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_WAL_SEGMENT_SIZE, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 136: /* db_options ::= db_options STT_TRIGGER NK_INTEGER */ + case 137: /* db_options ::= db_options STT_TRIGGER NK_INTEGER */ { yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_STT_TRIGGER, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 137: /* db_options ::= db_options TABLE_PREFIX signed */ + case 138: /* db_options ::= db_options TABLE_PREFIX signed */ { yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_TABLE_PREFIX, yymsp[0].minor.yy974); } yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 138: /* db_options ::= db_options TABLE_SUFFIX signed */ + case 139: /* db_options ::= db_options TABLE_SUFFIX signed */ { yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_TABLE_SUFFIX, yymsp[0].minor.yy974); } yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 139: /* db_options ::= db_options S3_CHUNKPAGES NK_INTEGER */ + case 140: /* db_options ::= db_options S3_CHUNKPAGES NK_INTEGER */ { yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_S3_CHUNKPAGES, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 140: /* db_options ::= db_options S3_KEEPLOCAL NK_INTEGER */ - case 141: /* db_options ::= db_options S3_KEEPLOCAL NK_VARIABLE */ yytestcase(yyruleno==141); + case 141: /* db_options ::= db_options S3_KEEPLOCAL NK_INTEGER */ + case 142: /* db_options ::= db_options S3_KEEPLOCAL NK_VARIABLE */ yytestcase(yyruleno==142); { yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_S3_KEEPLOCAL, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 142: /* db_options ::= db_options S3_COMPACT NK_INTEGER */ + case 143: /* db_options ::= db_options S3_COMPACT NK_INTEGER */ { yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_S3_COMPACT, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 143: /* db_options ::= db_options KEEP_TIME_OFFSET NK_INTEGER */ + case 144: /* db_options ::= db_options KEEP_TIME_OFFSET NK_INTEGER */ { yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_KEEP_TIME_OFFSET, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 144: /* db_options ::= db_options ENCRYPT_ALGORITHM NK_STRING */ + case 145: /* db_options ::= db_options ENCRYPT_ALGORITHM NK_STRING */ { yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_ENCRYPT_ALGORITHM, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 145: /* db_options ::= db_options DNODES NK_STRING */ + case 146: /* db_options ::= db_options DNODES NK_STRING */ { yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_DNODES, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 146: /* alter_db_options ::= alter_db_option */ + case 147: /* alter_db_options ::= alter_db_option */ { yylhsminor.yy974 = createAlterDatabaseOptions(pCxt); yylhsminor.yy974 = setAlterDatabaseOption(pCxt, yylhsminor.yy974, &yymsp[0].minor.yy683); } yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 147: /* alter_db_options ::= alter_db_options alter_db_option */ + case 148: /* alter_db_options ::= alter_db_options alter_db_option */ { yylhsminor.yy974 = setAlterDatabaseOption(pCxt, yymsp[-1].minor.yy974, &yymsp[0].minor.yy683); } yymsp[-1].minor.yy974 = yylhsminor.yy974; break; - case 148: /* alter_db_option ::= BUFFER NK_INTEGER */ + case 149: /* alter_db_option ::= BUFFER NK_INTEGER */ { yymsp[-1].minor.yy683.type = DB_OPTION_BUFFER; yymsp[-1].minor.yy683.val = yymsp[0].minor.yy0; } break; - case 149: /* alter_db_option ::= CACHEMODEL NK_STRING */ + case 150: /* alter_db_option ::= CACHEMODEL NK_STRING */ { yymsp[-1].minor.yy683.type = DB_OPTION_CACHEMODEL; yymsp[-1].minor.yy683.val = yymsp[0].minor.yy0; } break; - case 150: /* alter_db_option ::= CACHESIZE NK_INTEGER */ + case 151: /* alter_db_option ::= CACHESIZE NK_INTEGER */ { yymsp[-1].minor.yy683.type = DB_OPTION_CACHESIZE; yymsp[-1].minor.yy683.val = yymsp[0].minor.yy0; } break; - case 151: /* alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */ + case 152: /* alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */ { yymsp[-1].minor.yy683.type = DB_OPTION_FSYNC; yymsp[-1].minor.yy683.val = yymsp[0].minor.yy0; } break; - case 152: /* alter_db_option ::= KEEP integer_list */ - case 153: /* alter_db_option ::= KEEP variable_list */ yytestcase(yyruleno==153); + case 153: /* alter_db_option ::= KEEP integer_list */ + case 154: /* alter_db_option ::= KEEP variable_list */ yytestcase(yyruleno==154); { yymsp[-1].minor.yy683.type = DB_OPTION_KEEP; yymsp[-1].minor.yy683.pList = yymsp[0].minor.yy946; } break; - case 154: /* alter_db_option ::= PAGES NK_INTEGER */ + case 155: /* alter_db_option ::= PAGES NK_INTEGER */ { yymsp[-1].minor.yy683.type = DB_OPTION_PAGES; yymsp[-1].minor.yy683.val = yymsp[0].minor.yy0; } break; - case 155: /* alter_db_option ::= REPLICA NK_INTEGER */ + case 156: /* alter_db_option ::= REPLICA NK_INTEGER */ { yymsp[-1].minor.yy683.type = DB_OPTION_REPLICA; yymsp[-1].minor.yy683.val = yymsp[0].minor.yy0; } break; - case 156: /* alter_db_option ::= WAL_LEVEL NK_INTEGER */ + case 157: /* alter_db_option ::= WAL_LEVEL NK_INTEGER */ { yymsp[-1].minor.yy683.type = DB_OPTION_WAL; yymsp[-1].minor.yy683.val = yymsp[0].minor.yy0; } break; - case 157: /* alter_db_option ::= STT_TRIGGER NK_INTEGER */ + case 158: /* alter_db_option ::= STT_TRIGGER NK_INTEGER */ { yymsp[-1].minor.yy683.type = DB_OPTION_STT_TRIGGER; yymsp[-1].minor.yy683.val = yymsp[0].minor.yy0; } break; - case 158: /* alter_db_option ::= MINROWS NK_INTEGER */ + case 159: /* alter_db_option ::= MINROWS NK_INTEGER */ { yymsp[-1].minor.yy683.type = DB_OPTION_MINROWS; yymsp[-1].minor.yy683.val = yymsp[0].minor.yy0; } break; - case 159: /* alter_db_option ::= WAL_RETENTION_PERIOD NK_INTEGER */ + case 160: /* alter_db_option ::= WAL_RETENTION_PERIOD NK_INTEGER */ { yymsp[-1].minor.yy683.type = DB_OPTION_WAL_RETENTION_PERIOD; yymsp[-1].minor.yy683.val = yymsp[0].minor.yy0; } break; - case 160: /* alter_db_option ::= WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ + case 161: /* alter_db_option ::= WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; yymsp[-2].minor.yy683.type = DB_OPTION_WAL_RETENTION_PERIOD; yymsp[-2].minor.yy683.val = t; } break; - case 161: /* alter_db_option ::= WAL_RETENTION_SIZE NK_INTEGER */ + case 162: /* alter_db_option ::= WAL_RETENTION_SIZE NK_INTEGER */ { yymsp[-1].minor.yy683.type = DB_OPTION_WAL_RETENTION_SIZE; yymsp[-1].minor.yy683.val = yymsp[0].minor.yy0; } break; - case 162: /* alter_db_option ::= WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ + case 163: /* alter_db_option ::= WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; yymsp[-2].minor.yy683.type = DB_OPTION_WAL_RETENTION_SIZE; yymsp[-2].minor.yy683.val = t; } break; - case 163: /* alter_db_option ::= S3_KEEPLOCAL NK_INTEGER */ - case 164: /* alter_db_option ::= S3_KEEPLOCAL NK_VARIABLE */ yytestcase(yyruleno==164); + case 164: /* alter_db_option ::= S3_KEEPLOCAL NK_INTEGER */ + case 165: /* alter_db_option ::= S3_KEEPLOCAL NK_VARIABLE */ yytestcase(yyruleno==165); { yymsp[-1].minor.yy683.type = DB_OPTION_S3_KEEPLOCAL; yymsp[-1].minor.yy683.val = yymsp[0].minor.yy0; } break; - case 165: /* alter_db_option ::= S3_COMPACT NK_INTEGER */ + case 166: /* alter_db_option ::= S3_COMPACT NK_INTEGER */ { yymsp[-1].minor.yy683.type = DB_OPTION_S3_COMPACT, yymsp[-1].minor.yy683.val = yymsp[0].minor.yy0; } break; - case 166: /* alter_db_option ::= KEEP_TIME_OFFSET NK_INTEGER */ + case 167: /* alter_db_option ::= KEEP_TIME_OFFSET NK_INTEGER */ { yymsp[-1].minor.yy683.type = DB_OPTION_KEEP_TIME_OFFSET; yymsp[-1].minor.yy683.val = yymsp[0].minor.yy0; } break; - case 167: /* alter_db_option ::= ENCRYPT_ALGORITHM NK_STRING */ + case 168: /* alter_db_option ::= ENCRYPT_ALGORITHM NK_STRING */ { yymsp[-1].minor.yy683.type = DB_OPTION_ENCRYPT_ALGORITHM; yymsp[-1].minor.yy683.val = yymsp[0].minor.yy0; } break; - case 168: /* integer_list ::= NK_INTEGER */ + case 169: /* integer_list ::= NK_INTEGER */ { yylhsminor.yy946 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy946 = yylhsminor.yy946; break; - case 169: /* integer_list ::= integer_list NK_COMMA NK_INTEGER */ - case 453: /* dnode_list ::= dnode_list DNODE NK_INTEGER */ yytestcase(yyruleno==453); + case 170: /* integer_list ::= integer_list NK_COMMA NK_INTEGER */ + case 454: /* dnode_list ::= dnode_list DNODE NK_INTEGER */ yytestcase(yyruleno==454); { yylhsminor.yy946 = addNodeToList(pCxt, yymsp[-2].minor.yy946, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } yymsp[-2].minor.yy946 = yylhsminor.yy946; break; - case 170: /* variable_list ::= NK_VARIABLE */ + case 171: /* variable_list ::= NK_VARIABLE */ { yylhsminor.yy946 = createNodeList(pCxt, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy946 = yylhsminor.yy946; break; - case 171: /* variable_list ::= variable_list NK_COMMA NK_VARIABLE */ + case 172: /* variable_list ::= variable_list NK_COMMA NK_VARIABLE */ { yylhsminor.yy946 = addNodeToList(pCxt, yymsp[-2].minor.yy946, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } yymsp[-2].minor.yy946 = yylhsminor.yy946; break; - case 172: /* retention_list ::= retention */ - case 205: /* multi_create_clause ::= create_subtable_clause */ yytestcase(yyruleno==205); - case 208: /* multi_drop_clause ::= drop_table_clause */ yytestcase(yyruleno==208); - case 217: /* tag_def_list ::= tag_def */ yytestcase(yyruleno==217); - case 220: /* column_def_list ::= column_def */ yytestcase(yyruleno==220); - case 268: /* rollup_func_list ::= rollup_func_name */ yytestcase(yyruleno==268); - case 273: /* col_name_list ::= col_name */ yytestcase(yyruleno==273); - case 345: /* tag_list_opt ::= tag_item */ yytestcase(yyruleno==345); - case 369: /* func_list ::= func */ yytestcase(yyruleno==369); - case 419: /* column_stream_def_list ::= column_stream_def */ yytestcase(yyruleno==419); - case 497: /* tags_literal_list ::= tags_literal */ yytestcase(yyruleno==497); - case 522: /* literal_list ::= signed_literal */ yytestcase(yyruleno==522); - case 617: /* other_para_list ::= star_func_para */ yytestcase(yyruleno==617); - case 623: /* when_then_list ::= when_then_expr */ yytestcase(yyruleno==623); - case 699: /* select_list ::= select_item */ yytestcase(yyruleno==699); - case 710: /* partition_list ::= partition_item */ yytestcase(yyruleno==710); - case 773: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==773); + case 173: /* retention_list ::= retention */ + case 206: /* multi_create_clause ::= create_subtable_clause */ yytestcase(yyruleno==206); + case 209: /* multi_drop_clause ::= drop_table_clause */ yytestcase(yyruleno==209); + case 218: /* tag_def_list ::= tag_def */ yytestcase(yyruleno==218); + case 221: /* column_def_list ::= column_def */ yytestcase(yyruleno==221); + case 269: /* rollup_func_list ::= rollup_func_name */ yytestcase(yyruleno==269); + case 274: /* col_name_list ::= col_name */ yytestcase(yyruleno==274); + case 346: /* tag_list_opt ::= tag_item */ yytestcase(yyruleno==346); + case 370: /* func_list ::= func */ yytestcase(yyruleno==370); + case 420: /* column_stream_def_list ::= column_stream_def */ yytestcase(yyruleno==420); + case 498: /* tags_literal_list ::= tags_literal */ yytestcase(yyruleno==498); + case 523: /* literal_list ::= signed_literal */ yytestcase(yyruleno==523); + case 618: /* other_para_list ::= star_func_para */ yytestcase(yyruleno==618); + case 624: /* when_then_list ::= when_then_expr */ yytestcase(yyruleno==624); + case 700: /* select_list ::= select_item */ yytestcase(yyruleno==700); + case 711: /* partition_list ::= partition_item */ yytestcase(yyruleno==711); + case 774: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==774); { yylhsminor.yy946 = createNodeList(pCxt, yymsp[0].minor.yy974); } yymsp[0].minor.yy946 = yylhsminor.yy946; break; - case 173: /* retention_list ::= retention_list NK_COMMA retention */ - case 209: /* multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause */ yytestcase(yyruleno==209); - case 218: /* tag_def_list ::= tag_def_list NK_COMMA tag_def */ yytestcase(yyruleno==218); - case 221: /* column_def_list ::= column_def_list NK_COMMA column_def */ yytestcase(yyruleno==221); - case 269: /* rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ yytestcase(yyruleno==269); - case 274: /* col_name_list ::= col_name_list NK_COMMA col_name */ yytestcase(yyruleno==274); - case 346: /* tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ yytestcase(yyruleno==346); - case 370: /* func_list ::= func_list NK_COMMA func */ yytestcase(yyruleno==370); - case 420: /* column_stream_def_list ::= column_stream_def_list NK_COMMA column_stream_def */ yytestcase(yyruleno==420); - case 498: /* tags_literal_list ::= tags_literal_list NK_COMMA tags_literal */ yytestcase(yyruleno==498); - case 523: /* literal_list ::= literal_list NK_COMMA signed_literal */ yytestcase(yyruleno==523); - case 618: /* other_para_list ::= other_para_list NK_COMMA star_func_para */ yytestcase(yyruleno==618); - case 700: /* select_list ::= select_list NK_COMMA select_item */ yytestcase(yyruleno==700); - case 711: /* partition_list ::= partition_list NK_COMMA partition_item */ yytestcase(yyruleno==711); - case 774: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==774); + case 174: /* retention_list ::= retention_list NK_COMMA retention */ + case 210: /* multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause */ yytestcase(yyruleno==210); + case 219: /* tag_def_list ::= tag_def_list NK_COMMA tag_def */ yytestcase(yyruleno==219); + case 222: /* column_def_list ::= column_def_list NK_COMMA column_def */ yytestcase(yyruleno==222); + case 270: /* rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ yytestcase(yyruleno==270); + case 275: /* col_name_list ::= col_name_list NK_COMMA col_name */ yytestcase(yyruleno==275); + case 347: /* tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ yytestcase(yyruleno==347); + case 371: /* func_list ::= func_list NK_COMMA func */ yytestcase(yyruleno==371); + case 421: /* column_stream_def_list ::= column_stream_def_list NK_COMMA column_stream_def */ yytestcase(yyruleno==421); + case 499: /* tags_literal_list ::= tags_literal_list NK_COMMA tags_literal */ yytestcase(yyruleno==499); + case 524: /* literal_list ::= literal_list NK_COMMA signed_literal */ yytestcase(yyruleno==524); + case 619: /* other_para_list ::= other_para_list NK_COMMA star_func_para */ yytestcase(yyruleno==619); + case 701: /* select_list ::= select_list NK_COMMA select_item */ yytestcase(yyruleno==701); + case 712: /* partition_list ::= partition_list NK_COMMA partition_item */ yytestcase(yyruleno==712); + case 775: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==775); { yylhsminor.yy946 = addNodeToList(pCxt, yymsp[-2].minor.yy946, yymsp[0].minor.yy974); } yymsp[-2].minor.yy946 = yylhsminor.yy946; break; - case 174: /* retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ - case 175: /* retention ::= NK_MINUS NK_COLON NK_VARIABLE */ yytestcase(yyruleno==175); + case 175: /* retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ + case 176: /* retention ::= NK_MINUS NK_COLON NK_VARIABLE */ yytestcase(yyruleno==176); { yylhsminor.yy974 = createNodeListNodeEx(pCxt, createDurationValueNode(pCxt, &yymsp[-2].minor.yy0), createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 176: /* speed_opt ::= */ - case 403: /* bufsize_opt ::= */ yytestcase(yyruleno==403); + case 177: /* speed_opt ::= */ + case 404: /* bufsize_opt ::= */ yytestcase(yyruleno==404); { yymsp[1].minor.yy904 = 0; } break; - case 177: /* speed_opt ::= BWLIMIT NK_INTEGER */ - case 404: /* bufsize_opt ::= BUFSIZE NK_INTEGER */ yytestcase(yyruleno==404); + case 178: /* speed_opt ::= BWLIMIT NK_INTEGER */ + case 405: /* bufsize_opt ::= BUFSIZE NK_INTEGER */ yytestcase(yyruleno==405); { yymsp[-1].minor.yy904 = taosStr2Int32(yymsp[0].minor.yy0.z, NULL, 10); } break; - case 179: /* start_opt ::= START WITH NK_INTEGER */ - case 183: /* end_opt ::= END WITH NK_INTEGER */ yytestcase(yyruleno==183); + case 180: /* start_opt ::= START WITH NK_INTEGER */ + case 184: /* end_opt ::= END WITH NK_INTEGER */ yytestcase(yyruleno==184); { yymsp[-2].minor.yy974 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } break; - case 180: /* start_opt ::= START WITH NK_STRING */ - case 184: /* end_opt ::= END WITH NK_STRING */ yytestcase(yyruleno==184); + case 181: /* start_opt ::= START WITH NK_STRING */ + case 185: /* end_opt ::= END WITH NK_STRING */ yytestcase(yyruleno==185); { yymsp[-2].minor.yy974 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } break; - case 181: /* start_opt ::= START WITH TIMESTAMP NK_STRING */ - case 185: /* end_opt ::= END WITH TIMESTAMP NK_STRING */ yytestcase(yyruleno==185); + case 182: /* start_opt ::= START WITH TIMESTAMP NK_STRING */ + case 186: /* end_opt ::= END WITH TIMESTAMP NK_STRING */ yytestcase(yyruleno==186); { yymsp[-3].minor.yy974 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } break; - case 186: /* cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ - case 189: /* cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ yytestcase(yyruleno==189); + case 187: /* cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ + case 190: /* cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ yytestcase(yyruleno==190); { pCxt->pRootNode = createCreateTableStmt(pCxt, yymsp[-6].minor.yy569, yymsp[-5].minor.yy974, yymsp[-3].minor.yy946, yymsp[-1].minor.yy946, yymsp[0].minor.yy974); } break; - case 187: /* cmd ::= CREATE TABLE multi_create_clause */ + case 188: /* cmd ::= CREATE TABLE multi_create_clause */ { pCxt->pRootNode = createCreateMultiTableStmt(pCxt, yymsp[0].minor.yy946); } break; - case 188: /* cmd ::= CREATE TABLE not_exists_opt USING full_table_name NK_LP tag_list_opt NK_RP FILE NK_STRING */ + case 189: /* cmd ::= CREATE TABLE not_exists_opt USING full_table_name NK_LP tag_list_opt NK_RP FILE NK_STRING */ { pCxt->pRootNode = createCreateSubTableFromFileClause(pCxt, yymsp[-7].minor.yy569, yymsp[-5].minor.yy974, yymsp[-3].minor.yy946, &yymsp[0].minor.yy0); } break; - case 190: /* cmd ::= DROP TABLE with_opt multi_drop_clause */ + case 191: /* cmd ::= DROP TABLE with_opt multi_drop_clause */ { pCxt->pRootNode = createDropTableStmt(pCxt, yymsp[-1].minor.yy569, yymsp[0].minor.yy946); } break; - case 191: /* cmd ::= DROP STABLE with_opt exists_opt full_table_name */ + case 192: /* cmd ::= DROP STABLE with_opt exists_opt full_table_name */ { pCxt->pRootNode = createDropSuperTableStmt(pCxt, yymsp[-2].minor.yy569, yymsp[-1].minor.yy569, yymsp[0].minor.yy974); } break; - case 192: /* cmd ::= ALTER TABLE alter_table_clause */ - case 455: /* cmd ::= query_or_subquery */ yytestcase(yyruleno==455); - case 456: /* cmd ::= insert_query */ yytestcase(yyruleno==456); + case 193: /* cmd ::= ALTER TABLE alter_table_clause */ + case 456: /* cmd ::= query_or_subquery */ yytestcase(yyruleno==456); + case 457: /* cmd ::= insert_query */ yytestcase(yyruleno==457); { pCxt->pRootNode = yymsp[0].minor.yy974; } break; - case 193: /* cmd ::= ALTER STABLE alter_table_clause */ + case 194: /* cmd ::= ALTER STABLE alter_table_clause */ { pCxt->pRootNode = setAlterSuperTableType(yymsp[0].minor.yy974); } break; - case 194: /* alter_table_clause ::= full_table_name alter_table_options */ + case 195: /* alter_table_clause ::= full_table_name alter_table_options */ { yylhsminor.yy974 = createAlterTableModifyOptions(pCxt, yymsp[-1].minor.yy974, yymsp[0].minor.yy974); } yymsp[-1].minor.yy974 = yylhsminor.yy974; break; - case 195: /* alter_table_clause ::= full_table_name ADD COLUMN column_name type_name column_options */ + case 196: /* alter_table_clause ::= full_table_name ADD COLUMN column_name type_name column_options */ { yylhsminor.yy974 = createAlterTableAddModifyColOptions2(pCxt, yymsp[-5].minor.yy974, TSDB_ALTER_TABLE_ADD_COLUMN, &yymsp[-2].minor.yy557, yymsp[-1].minor.yy424, yymsp[0].minor.yy974); } yymsp[-5].minor.yy974 = yylhsminor.yy974; break; - case 196: /* alter_table_clause ::= full_table_name DROP COLUMN column_name */ + case 197: /* alter_table_clause ::= full_table_name DROP COLUMN column_name */ { yylhsminor.yy974 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy974, TSDB_ALTER_TABLE_DROP_COLUMN, &yymsp[0].minor.yy557); } yymsp[-3].minor.yy974 = yylhsminor.yy974; break; - case 197: /* alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ + case 198: /* alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ { yylhsminor.yy974 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy974, TSDB_ALTER_TABLE_UPDATE_COLUMN_BYTES, &yymsp[-1].minor.yy557, yymsp[0].minor.yy424); } yymsp[-4].minor.yy974 = yylhsminor.yy974; break; - case 198: /* alter_table_clause ::= full_table_name MODIFY COLUMN column_name column_options */ + case 199: /* alter_table_clause ::= full_table_name MODIFY COLUMN column_name column_options */ { yylhsminor.yy974 = createAlterTableAddModifyColOptions(pCxt, yymsp[-4].minor.yy974, TSDB_ALTER_TABLE_UPDATE_COLUMN_COMPRESS, &yymsp[-1].minor.yy557, yymsp[0].minor.yy974); } yymsp[-4].minor.yy974 = yylhsminor.yy974; break; - case 199: /* alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ + case 200: /* alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ { yylhsminor.yy974 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy974, TSDB_ALTER_TABLE_UPDATE_COLUMN_NAME, &yymsp[-1].minor.yy557, &yymsp[0].minor.yy557); } yymsp[-4].minor.yy974 = yylhsminor.yy974; break; - case 200: /* alter_table_clause ::= full_table_name ADD TAG column_name type_name */ + case 201: /* alter_table_clause ::= full_table_name ADD TAG column_name type_name */ { yylhsminor.yy974 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy974, TSDB_ALTER_TABLE_ADD_TAG, &yymsp[-1].minor.yy557, yymsp[0].minor.yy424); } yymsp[-4].minor.yy974 = yylhsminor.yy974; break; - case 201: /* alter_table_clause ::= full_table_name DROP TAG column_name */ + case 202: /* alter_table_clause ::= full_table_name DROP TAG column_name */ { yylhsminor.yy974 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy974, TSDB_ALTER_TABLE_DROP_TAG, &yymsp[0].minor.yy557); } yymsp[-3].minor.yy974 = yylhsminor.yy974; break; - case 202: /* alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ + case 203: /* alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ { yylhsminor.yy974 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy974, TSDB_ALTER_TABLE_UPDATE_TAG_BYTES, &yymsp[-1].minor.yy557, yymsp[0].minor.yy424); } yymsp[-4].minor.yy974 = yylhsminor.yy974; break; - case 203: /* alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ + case 204: /* alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ { yylhsminor.yy974 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy974, TSDB_ALTER_TABLE_UPDATE_TAG_NAME, &yymsp[-1].minor.yy557, &yymsp[0].minor.yy557); } yymsp[-4].minor.yy974 = yylhsminor.yy974; break; - case 204: /* alter_table_clause ::= full_table_name SET TAG column_name NK_EQ tags_literal */ + case 205: /* alter_table_clause ::= full_table_name SET TAG column_name NK_EQ tags_literal */ { yylhsminor.yy974 = createAlterTableSetTag(pCxt, yymsp[-5].minor.yy974, &yymsp[-2].minor.yy557, yymsp[0].minor.yy974); } yymsp[-5].minor.yy974 = yylhsminor.yy974; break; - case 206: /* multi_create_clause ::= multi_create_clause create_subtable_clause */ - case 624: /* when_then_list ::= when_then_list when_then_expr */ yytestcase(yyruleno==624); + case 207: /* multi_create_clause ::= multi_create_clause create_subtable_clause */ + case 625: /* when_then_list ::= when_then_list when_then_expr */ yytestcase(yyruleno==625); { yylhsminor.yy946 = addNodeToList(pCxt, yymsp[-1].minor.yy946, yymsp[0].minor.yy974); } yymsp[-1].minor.yy946 = yylhsminor.yy946; break; - case 207: /* create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_cols_opt TAGS NK_LP tags_literal_list NK_RP table_options */ + case 208: /* create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_cols_opt TAGS NK_LP tags_literal_list NK_RP table_options */ { yylhsminor.yy974 = createCreateSubTableClause(pCxt, yymsp[-9].minor.yy569, yymsp[-8].minor.yy974, yymsp[-6].minor.yy974, yymsp[-5].minor.yy946, yymsp[-2].minor.yy946, yymsp[0].minor.yy974); } yymsp[-9].minor.yy974 = yylhsminor.yy974; break; - case 210: /* drop_table_clause ::= exists_opt full_table_name */ + case 211: /* drop_table_clause ::= exists_opt full_table_name */ { yylhsminor.yy974 = createDropTableClause(pCxt, yymsp[-1].minor.yy569, yymsp[0].minor.yy974); } yymsp[-1].minor.yy974 = yylhsminor.yy974; break; - case 214: /* specific_cols_opt ::= NK_LP col_name_list NK_RP */ - case 418: /* col_list_opt ::= NK_LP column_stream_def_list NK_RP */ yytestcase(yyruleno==418); + case 215: /* specific_cols_opt ::= NK_LP col_name_list NK_RP */ + case 419: /* col_list_opt ::= NK_LP column_stream_def_list NK_RP */ yytestcase(yyruleno==419); { yymsp[-2].minor.yy946 = yymsp[-1].minor.yy946; } break; - case 215: /* full_table_name ::= table_name */ - case 359: /* full_tsma_name ::= tsma_name */ yytestcase(yyruleno==359); + case 216: /* full_table_name ::= table_name */ + case 360: /* full_tsma_name ::= tsma_name */ yytestcase(yyruleno==360); { yylhsminor.yy974 = createRealTableNode(pCxt, NULL, &yymsp[0].minor.yy557, NULL); } yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 216: /* full_table_name ::= db_name NK_DOT table_name */ - case 360: /* full_tsma_name ::= db_name NK_DOT tsma_name */ yytestcase(yyruleno==360); + case 217: /* full_table_name ::= db_name NK_DOT table_name */ + case 361: /* full_tsma_name ::= db_name NK_DOT tsma_name */ yytestcase(yyruleno==361); { yylhsminor.yy974 = createRealTableNode(pCxt, &yymsp[-2].minor.yy557, &yymsp[0].minor.yy557, NULL); } yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 219: /* tag_def ::= column_name type_name */ + case 220: /* tag_def ::= column_name type_name */ { yylhsminor.yy974 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy557, yymsp[0].minor.yy424, NULL); } yymsp[-1].minor.yy974 = yylhsminor.yy974; break; - case 222: /* column_def ::= column_name type_name column_options */ + case 223: /* column_def ::= column_name type_name column_options */ { yylhsminor.yy974 = createColumnDefNode(pCxt, &yymsp[-2].minor.yy557, yymsp[-1].minor.yy424, yymsp[0].minor.yy974); } yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 223: /* type_name ::= BOOL */ + case 224: /* type_name ::= BOOL */ { yymsp[0].minor.yy424 = createDataType(TSDB_DATA_TYPE_BOOL); } break; - case 224: /* type_name ::= TINYINT */ + case 225: /* type_name ::= TINYINT */ { yymsp[0].minor.yy424 = createDataType(TSDB_DATA_TYPE_TINYINT); } break; - case 225: /* type_name ::= SMALLINT */ + case 226: /* type_name ::= SMALLINT */ { yymsp[0].minor.yy424 = createDataType(TSDB_DATA_TYPE_SMALLINT); } break; - case 226: /* type_name ::= INT */ - case 227: /* type_name ::= INTEGER */ yytestcase(yyruleno==227); + case 227: /* type_name ::= INT */ + case 228: /* type_name ::= INTEGER */ yytestcase(yyruleno==228); { yymsp[0].minor.yy424 = createDataType(TSDB_DATA_TYPE_INT); } break; - case 228: /* type_name ::= BIGINT */ + case 229: /* type_name ::= BIGINT */ { yymsp[0].minor.yy424 = createDataType(TSDB_DATA_TYPE_BIGINT); } break; - case 229: /* type_name ::= FLOAT */ + case 230: /* type_name ::= FLOAT */ { yymsp[0].minor.yy424 = createDataType(TSDB_DATA_TYPE_FLOAT); } break; - case 230: /* type_name ::= DOUBLE */ + case 231: /* type_name ::= DOUBLE */ { yymsp[0].minor.yy424 = createDataType(TSDB_DATA_TYPE_DOUBLE); } break; - case 231: /* type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ + case 232: /* type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ { yymsp[-3].minor.yy424 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy0); } break; - case 232: /* type_name ::= TIMESTAMP */ + case 233: /* type_name ::= TIMESTAMP */ { yymsp[0].minor.yy424 = createDataType(TSDB_DATA_TYPE_TIMESTAMP); } break; - case 233: /* type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ + case 234: /* type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ { yymsp[-3].minor.yy424 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, &yymsp[-1].minor.yy0); } break; - case 234: /* type_name ::= TINYINT UNSIGNED */ + case 235: /* type_name ::= TINYINT UNSIGNED */ { yymsp[-1].minor.yy424 = createDataType(TSDB_DATA_TYPE_UTINYINT); } break; - case 235: /* type_name ::= SMALLINT UNSIGNED */ + case 236: /* type_name ::= SMALLINT UNSIGNED */ { yymsp[-1].minor.yy424 = createDataType(TSDB_DATA_TYPE_USMALLINT); } break; - case 236: /* type_name ::= INT UNSIGNED */ + case 237: /* type_name ::= INT UNSIGNED */ { yymsp[-1].minor.yy424 = createDataType(TSDB_DATA_TYPE_UINT); } break; - case 237: /* type_name ::= BIGINT UNSIGNED */ + case 238: /* type_name ::= BIGINT UNSIGNED */ { yymsp[-1].minor.yy424 = createDataType(TSDB_DATA_TYPE_UBIGINT); } break; - case 238: /* type_name ::= JSON */ + case 239: /* type_name ::= JSON */ { yymsp[0].minor.yy424 = createDataType(TSDB_DATA_TYPE_JSON); } break; - case 239: /* type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ + case 240: /* type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ { yymsp[-3].minor.yy424 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, &yymsp[-1].minor.yy0); } break; - case 240: /* type_name ::= MEDIUMBLOB */ + case 241: /* type_name ::= MEDIUMBLOB */ { yymsp[0].minor.yy424 = createDataType(TSDB_DATA_TYPE_MEDIUMBLOB); } break; - case 241: /* type_name ::= BLOB */ + case 242: /* type_name ::= BLOB */ { yymsp[0].minor.yy424 = createDataType(TSDB_DATA_TYPE_BLOB); } break; - case 242: /* type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ + case 243: /* type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ { yymsp[-3].minor.yy424 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, &yymsp[-1].minor.yy0); } break; - case 243: /* type_name ::= GEOMETRY NK_LP NK_INTEGER NK_RP */ + case 244: /* type_name ::= GEOMETRY NK_LP NK_INTEGER NK_RP */ { yymsp[-3].minor.yy424 = createVarLenDataType(TSDB_DATA_TYPE_GEOMETRY, &yymsp[-1].minor.yy0); } break; - case 244: /* type_name ::= DECIMAL */ + case 245: /* type_name ::= DECIMAL */ { yymsp[0].minor.yy424 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; - case 245: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ + case 246: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ { yymsp[-3].minor.yy424 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; - case 246: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ + case 247: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ { yymsp[-5].minor.yy424 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; - case 247: /* type_name_default_len ::= BINARY */ + case 248: /* type_name_default_len ::= BINARY */ { yymsp[0].minor.yy424 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, NULL); } break; - case 248: /* type_name_default_len ::= NCHAR */ + case 249: /* type_name_default_len ::= NCHAR */ { yymsp[0].minor.yy424 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, NULL); } break; - case 249: /* type_name_default_len ::= VARCHAR */ + case 250: /* type_name_default_len ::= VARCHAR */ { yymsp[0].minor.yy424 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, NULL); } break; - case 250: /* type_name_default_len ::= VARBINARY */ + case 251: /* type_name_default_len ::= VARBINARY */ { yymsp[0].minor.yy424 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, NULL); } break; - case 253: /* tags_def ::= TAGS NK_LP tag_def_list NK_RP */ - case 426: /* tag_def_or_ref_opt ::= TAGS NK_LP column_stream_def_list NK_RP */ yytestcase(yyruleno==426); + case 254: /* tags_def ::= TAGS NK_LP tag_def_list NK_RP */ + case 427: /* tag_def_or_ref_opt ::= TAGS NK_LP column_stream_def_list NK_RP */ yytestcase(yyruleno==427); { yymsp[-3].minor.yy946 = yymsp[-1].minor.yy946; } break; - case 254: /* table_options ::= */ + case 255: /* table_options ::= */ { yymsp[1].minor.yy974 = createDefaultTableOptions(pCxt); } break; - case 255: /* table_options ::= table_options COMMENT NK_STRING */ + case 256: /* table_options ::= table_options COMMENT NK_STRING */ { yylhsminor.yy974 = setTableOption(pCxt, yymsp[-2].minor.yy974, TABLE_OPTION_COMMENT, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 256: /* table_options ::= table_options MAX_DELAY duration_list */ + case 257: /* table_options ::= table_options MAX_DELAY duration_list */ { yylhsminor.yy974 = setTableOption(pCxt, yymsp[-2].minor.yy974, TABLE_OPTION_MAXDELAY, yymsp[0].minor.yy946); } yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 257: /* table_options ::= table_options WATERMARK duration_list */ + case 258: /* table_options ::= table_options WATERMARK duration_list */ { yylhsminor.yy974 = setTableOption(pCxt, yymsp[-2].minor.yy974, TABLE_OPTION_WATERMARK, yymsp[0].minor.yy946); } yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 258: /* table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ + case 259: /* table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ { yylhsminor.yy974 = setTableOption(pCxt, yymsp[-4].minor.yy974, TABLE_OPTION_ROLLUP, yymsp[-1].minor.yy946); } yymsp[-4].minor.yy974 = yylhsminor.yy974; break; - case 259: /* table_options ::= table_options TTL NK_INTEGER */ + case 260: /* table_options ::= table_options TTL NK_INTEGER */ { yylhsminor.yy974 = setTableOption(pCxt, yymsp[-2].minor.yy974, TABLE_OPTION_TTL, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 260: /* table_options ::= table_options SMA NK_LP col_name_list NK_RP */ + case 261: /* table_options ::= table_options SMA NK_LP col_name_list NK_RP */ { yylhsminor.yy974 = setTableOption(pCxt, yymsp[-4].minor.yy974, TABLE_OPTION_SMA, yymsp[-1].minor.yy946); } yymsp[-4].minor.yy974 = yylhsminor.yy974; break; - case 261: /* table_options ::= table_options DELETE_MARK duration_list */ + case 262: /* table_options ::= table_options DELETE_MARK duration_list */ { yylhsminor.yy974 = setTableOption(pCxt, yymsp[-2].minor.yy974, TABLE_OPTION_DELETE_MARK, yymsp[0].minor.yy946); } yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 262: /* alter_table_options ::= alter_table_option */ + case 263: /* alter_table_options ::= alter_table_option */ { yylhsminor.yy974 = createAlterTableOptions(pCxt); yylhsminor.yy974 = setTableOption(pCxt, yylhsminor.yy974, yymsp[0].minor.yy683.type, &yymsp[0].minor.yy683.val); } yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 263: /* alter_table_options ::= alter_table_options alter_table_option */ + case 264: /* alter_table_options ::= alter_table_options alter_table_option */ { yylhsminor.yy974 = setTableOption(pCxt, yymsp[-1].minor.yy974, yymsp[0].minor.yy683.type, &yymsp[0].minor.yy683.val); } yymsp[-1].minor.yy974 = yylhsminor.yy974; break; - case 264: /* alter_table_option ::= COMMENT NK_STRING */ + case 265: /* alter_table_option ::= COMMENT NK_STRING */ { yymsp[-1].minor.yy683.type = TABLE_OPTION_COMMENT; yymsp[-1].minor.yy683.val = yymsp[0].minor.yy0; } break; - case 265: /* alter_table_option ::= TTL NK_INTEGER */ + case 266: /* alter_table_option ::= TTL NK_INTEGER */ { yymsp[-1].minor.yy683.type = TABLE_OPTION_TTL; yymsp[-1].minor.yy683.val = yymsp[0].minor.yy0; } break; - case 266: /* duration_list ::= duration_literal */ - case 555: /* expression_list ::= expr_or_subquery */ yytestcase(yyruleno==555); + case 267: /* duration_list ::= duration_literal */ + case 556: /* expression_list ::= expr_or_subquery */ yytestcase(yyruleno==556); { yylhsminor.yy946 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy974)); } yymsp[0].minor.yy946 = yylhsminor.yy946; break; - case 267: /* duration_list ::= duration_list NK_COMMA duration_literal */ - case 556: /* expression_list ::= expression_list NK_COMMA expr_or_subquery */ yytestcase(yyruleno==556); + case 268: /* duration_list ::= duration_list NK_COMMA duration_literal */ + case 557: /* expression_list ::= expression_list NK_COMMA expr_or_subquery */ yytestcase(yyruleno==557); { yylhsminor.yy946 = addNodeToList(pCxt, yymsp[-2].minor.yy946, releaseRawExprNode(pCxt, yymsp[0].minor.yy974)); } yymsp[-2].minor.yy946 = yylhsminor.yy946; break; - case 270: /* rollup_func_name ::= function_name */ + case 271: /* rollup_func_name ::= function_name */ { yylhsminor.yy974 = createFunctionNode(pCxt, &yymsp[0].minor.yy557, NULL); } yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 271: /* rollup_func_name ::= FIRST */ - case 272: /* rollup_func_name ::= LAST */ yytestcase(yyruleno==272); - case 348: /* tag_item ::= QTAGS */ yytestcase(yyruleno==348); + case 272: /* rollup_func_name ::= FIRST */ + case 273: /* rollup_func_name ::= LAST */ yytestcase(yyruleno==273); + case 349: /* tag_item ::= QTAGS */ yytestcase(yyruleno==349); { yylhsminor.yy974 = createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL); } yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 275: /* col_name ::= column_name */ - case 349: /* tag_item ::= column_name */ yytestcase(yyruleno==349); + case 276: /* col_name ::= column_name */ + case 350: /* tag_item ::= column_name */ yytestcase(yyruleno==350); { yylhsminor.yy974 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy557); } yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 276: /* cmd ::= SHOW DNODES */ + case 277: /* cmd ::= SHOW DNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DNODES_STMT); } break; - case 277: /* cmd ::= SHOW USERS */ + case 278: /* cmd ::= SHOW USERS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_USERS_STMT); } break; - case 278: /* cmd ::= SHOW USERS FULL */ + case 279: /* cmd ::= SHOW USERS FULL */ { pCxt->pRootNode = createShowStmtWithFull(pCxt, QUERY_NODE_SHOW_USERS_FULL_STMT); } break; - case 279: /* cmd ::= SHOW USER PRIVILEGES */ + case 280: /* cmd ::= SHOW USER PRIVILEGES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_USER_PRIVILEGES_STMT); } break; - case 280: /* cmd ::= SHOW db_kind_opt DATABASES */ + case 281: /* cmd ::= SHOW db_kind_opt DATABASES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DATABASES_STMT); (void)setShowKind(pCxt, pCxt->pRootNode, yymsp[-1].minor.yy741); } break; - case 281: /* cmd ::= SHOW table_kind_db_name_cond_opt TABLES like_pattern_opt */ + case 282: /* cmd ::= SHOW table_kind_db_name_cond_opt TABLES like_pattern_opt */ { pCxt->pRootNode = createShowTablesStmt(pCxt, yymsp[-2].minor.yy595, yymsp[0].minor.yy974, OP_TYPE_LIKE); } break; - case 282: /* cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ + case 283: /* cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ { pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_STABLES_STMT, yymsp[-2].minor.yy974, yymsp[0].minor.yy974, OP_TYPE_LIKE); } break; - case 283: /* cmd ::= SHOW db_name_cond_opt VGROUPS */ + case 284: /* cmd ::= SHOW db_name_cond_opt VGROUPS */ { pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, yymsp[-1].minor.yy974, NULL, OP_TYPE_LIKE); } break; - case 284: /* cmd ::= SHOW MNODES */ + case 285: /* cmd ::= SHOW MNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_MNODES_STMT); } break; - case 285: /* cmd ::= SHOW QNODES */ + case 286: /* cmd ::= SHOW QNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QNODES_STMT); } break; - case 286: /* cmd ::= SHOW ANODES */ + case 287: /* cmd ::= SHOW ANODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_ANODES_STMT); } break; - case 287: /* cmd ::= SHOW ANODES FULL */ + case 288: /* cmd ::= SHOW ANODES FULL */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_ANODES_FULL_STMT); } break; - case 288: /* cmd ::= SHOW ARBGROUPS */ + case 289: /* cmd ::= SHOW ARBGROUPS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_ARBGROUPS_STMT); } break; - case 289: /* cmd ::= SHOW FUNCTIONS */ + case 290: /* cmd ::= SHOW FUNCTIONS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_FUNCTIONS_STMT); } break; - case 290: /* cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ + case 291: /* cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ { pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, yymsp[0].minor.yy974, yymsp[-1].minor.yy974, OP_TYPE_EQUAL); } break; - case 291: /* cmd ::= SHOW INDEXES FROM db_name NK_DOT table_name */ + case 292: /* cmd ::= SHOW INDEXES FROM db_name NK_DOT table_name */ { pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, createIdentifierValueNode(pCxt, &yymsp[-2].minor.yy557), createIdentifierValueNode(pCxt, &yymsp[0].minor.yy557), OP_TYPE_EQUAL); } break; - case 292: /* cmd ::= SHOW STREAMS */ + case 293: /* cmd ::= SHOW STREAMS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_STREAMS_STMT); } break; - case 293: /* cmd ::= SHOW ACCOUNTS */ + case 294: /* cmd ::= SHOW ACCOUNTS */ { pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); } break; - case 294: /* cmd ::= SHOW APPS */ + case 295: /* cmd ::= SHOW APPS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_APPS_STMT); } break; - case 295: /* cmd ::= SHOW CONNECTIONS */ + case 296: /* cmd ::= SHOW CONNECTIONS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CONNECTIONS_STMT); } break; - case 296: /* cmd ::= SHOW LICENCES */ - case 297: /* cmd ::= SHOW GRANTS */ yytestcase(yyruleno==297); + case 297: /* cmd ::= SHOW LICENCES */ + case 298: /* cmd ::= SHOW GRANTS */ yytestcase(yyruleno==298); { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LICENCES_STMT); } break; - case 298: /* cmd ::= SHOW GRANTS FULL */ + case 299: /* cmd ::= SHOW GRANTS FULL */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_GRANTS_FULL_STMT); } break; - case 299: /* cmd ::= SHOW GRANTS LOGS */ + case 300: /* cmd ::= SHOW GRANTS LOGS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_GRANTS_LOGS_STMT); } break; - case 300: /* cmd ::= SHOW CLUSTER MACHINES */ + case 301: /* cmd ::= SHOW CLUSTER MACHINES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CLUSTER_MACHINES_STMT); } break; - case 301: /* cmd ::= SHOW CREATE DATABASE db_name */ + case 302: /* cmd ::= SHOW CREATE DATABASE db_name */ { pCxt->pRootNode = createShowCreateDatabaseStmt(pCxt, &yymsp[0].minor.yy557); } break; - case 302: /* cmd ::= SHOW CREATE TABLE full_table_name */ + case 303: /* cmd ::= SHOW CREATE TABLE full_table_name */ { pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_TABLE_STMT, yymsp[0].minor.yy974); } break; - case 303: /* cmd ::= SHOW CREATE STABLE full_table_name */ + case 304: /* cmd ::= SHOW CREATE STABLE full_table_name */ { pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_STABLE_STMT, yymsp[0].minor.yy974); } break; - case 304: /* cmd ::= SHOW ENCRYPTIONS */ + case 305: /* cmd ::= SHOW ENCRYPTIONS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_ENCRYPTIONS_STMT); } break; - case 305: /* cmd ::= SHOW QUERIES */ + case 306: /* cmd ::= SHOW QUERIES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QUERIES_STMT); } break; - case 306: /* cmd ::= SHOW SCORES */ + case 307: /* cmd ::= SHOW SCORES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SCORES_STMT); } break; - case 307: /* cmd ::= SHOW TOPICS */ + case 308: /* cmd ::= SHOW TOPICS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TOPICS_STMT); } break; - case 308: /* cmd ::= SHOW VARIABLES */ - case 309: /* cmd ::= SHOW CLUSTER VARIABLES */ yytestcase(yyruleno==309); + case 309: /* cmd ::= SHOW VARIABLES */ + case 310: /* cmd ::= SHOW CLUSTER VARIABLES */ yytestcase(yyruleno==310); { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_VARIABLES_STMT); } break; - case 310: /* cmd ::= SHOW LOCAL VARIABLES */ + case 311: /* cmd ::= SHOW LOCAL VARIABLES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LOCAL_VARIABLES_STMT); } break; - case 311: /* cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */ + case 312: /* cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */ { pCxt->pRootNode = createShowDnodeVariablesStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[-2].minor.yy0), yymsp[0].minor.yy974); } break; - case 312: /* cmd ::= SHOW BNODES */ + case 313: /* cmd ::= SHOW BNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_BNODES_STMT); } break; - case 313: /* cmd ::= SHOW SNODES */ + case 314: /* cmd ::= SHOW SNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SNODES_STMT); } break; - case 314: /* cmd ::= SHOW CLUSTER */ + case 315: /* cmd ::= SHOW CLUSTER */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CLUSTER_STMT); } break; - case 315: /* cmd ::= SHOW TRANSACTIONS */ + case 316: /* cmd ::= SHOW TRANSACTIONS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TRANSACTIONS_STMT); } break; - case 316: /* cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ + case 317: /* cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ { pCxt->pRootNode = createShowTableDistributedStmt(pCxt, yymsp[0].minor.yy974); } break; - case 317: /* cmd ::= SHOW CONSUMERS */ + case 318: /* cmd ::= SHOW CONSUMERS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CONSUMERS_STMT); } break; - case 318: /* cmd ::= SHOW SUBSCRIPTIONS */ + case 319: /* cmd ::= SHOW SUBSCRIPTIONS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SUBSCRIPTIONS_STMT); } break; - case 319: /* cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ + case 320: /* cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ { pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TAGS_STMT, yymsp[0].minor.yy974, yymsp[-1].minor.yy974, OP_TYPE_EQUAL); } break; - case 320: /* cmd ::= SHOW TAGS FROM db_name NK_DOT table_name */ + case 321: /* cmd ::= SHOW TAGS FROM db_name NK_DOT table_name */ { pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TAGS_STMT, createIdentifierValueNode(pCxt, &yymsp[-2].minor.yy557), createIdentifierValueNode(pCxt, &yymsp[0].minor.yy557), OP_TYPE_EQUAL); } break; - case 321: /* cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ + case 322: /* cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ { pCxt->pRootNode = createShowTableTagsStmt(pCxt, yymsp[-1].minor.yy974, yymsp[0].minor.yy974, yymsp[-3].minor.yy946); } break; - case 322: /* cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name */ + case 323: /* cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name */ { pCxt->pRootNode = createShowTableTagsStmt(pCxt, createIdentifierValueNode(pCxt, &yymsp[0].minor.yy557), createIdentifierValueNode(pCxt, &yymsp[-2].minor.yy557), yymsp[-4].minor.yy946); } break; - case 323: /* cmd ::= SHOW VNODES ON DNODE NK_INTEGER */ + case 324: /* cmd ::= SHOW VNODES ON DNODE NK_INTEGER */ { pCxt->pRootNode = createShowVnodesStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0), NULL); } break; - case 324: /* cmd ::= SHOW VNODES */ + case 325: /* cmd ::= SHOW VNODES */ { pCxt->pRootNode = createShowVnodesStmt(pCxt, NULL, NULL); } break; - case 325: /* cmd ::= SHOW db_name_cond_opt ALIVE */ + case 326: /* cmd ::= SHOW db_name_cond_opt ALIVE */ { pCxt->pRootNode = createShowAliveStmt(pCxt, yymsp[-1].minor.yy974, QUERY_NODE_SHOW_DB_ALIVE_STMT); } break; - case 326: /* cmd ::= SHOW CLUSTER ALIVE */ + case 327: /* cmd ::= SHOW CLUSTER ALIVE */ { pCxt->pRootNode = createShowAliveStmt(pCxt, NULL, QUERY_NODE_SHOW_CLUSTER_ALIVE_STMT); } break; - case 327: /* cmd ::= SHOW db_name_cond_opt VIEWS like_pattern_opt */ + case 328: /* cmd ::= SHOW db_name_cond_opt VIEWS like_pattern_opt */ { pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VIEWS_STMT, yymsp[-2].minor.yy974, yymsp[0].minor.yy974, OP_TYPE_LIKE); } break; - case 328: /* cmd ::= SHOW CREATE VIEW full_table_name */ + case 329: /* cmd ::= SHOW CREATE VIEW full_table_name */ { pCxt->pRootNode = createShowCreateViewStmt(pCxt, QUERY_NODE_SHOW_CREATE_VIEW_STMT, yymsp[0].minor.yy974); } break; - case 329: /* cmd ::= SHOW COMPACTS */ + case 330: /* cmd ::= SHOW COMPACTS */ { pCxt->pRootNode = createShowCompactsStmt(pCxt, QUERY_NODE_SHOW_COMPACTS_STMT); } break; - case 330: /* cmd ::= SHOW COMPACT NK_INTEGER */ + case 331: /* cmd ::= SHOW COMPACT NK_INTEGER */ { pCxt->pRootNode = createShowCompactDetailsStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } break; - case 331: /* table_kind_db_name_cond_opt ::= */ + case 332: /* table_kind_db_name_cond_opt ::= */ { yymsp[1].minor.yy595.kind = SHOW_KIND_ALL; yymsp[1].minor.yy595.dbName = nil_token; } break; - case 332: /* table_kind_db_name_cond_opt ::= table_kind */ + case 333: /* table_kind_db_name_cond_opt ::= table_kind */ { yylhsminor.yy595.kind = yymsp[0].minor.yy741; yylhsminor.yy595.dbName = nil_token; } yymsp[0].minor.yy595 = yylhsminor.yy595; break; - case 333: /* table_kind_db_name_cond_opt ::= db_name NK_DOT */ + case 334: /* table_kind_db_name_cond_opt ::= db_name NK_DOT */ { yylhsminor.yy595.kind = SHOW_KIND_ALL; yylhsminor.yy595.dbName = yymsp[-1].minor.yy557; } yymsp[-1].minor.yy595 = yylhsminor.yy595; break; - case 334: /* table_kind_db_name_cond_opt ::= table_kind db_name NK_DOT */ + case 335: /* table_kind_db_name_cond_opt ::= table_kind db_name NK_DOT */ { yylhsminor.yy595.kind = yymsp[-2].minor.yy741; yylhsminor.yy595.dbName = yymsp[-1].minor.yy557; } yymsp[-2].minor.yy595 = yylhsminor.yy595; break; - case 335: /* table_kind ::= NORMAL */ + case 336: /* table_kind ::= NORMAL */ { yymsp[0].minor.yy741 = SHOW_KIND_TABLES_NORMAL; } break; - case 336: /* table_kind ::= CHILD */ + case 337: /* table_kind ::= CHILD */ { yymsp[0].minor.yy741 = SHOW_KIND_TABLES_CHILD; } break; - case 337: /* db_name_cond_opt ::= */ - case 342: /* from_db_opt ::= */ yytestcase(yyruleno==342); + case 338: /* db_name_cond_opt ::= */ + case 343: /* from_db_opt ::= */ yytestcase(yyruleno==343); { yymsp[1].minor.yy974 = createDefaultDatabaseCondValue(pCxt); } break; - case 338: /* db_name_cond_opt ::= db_name NK_DOT */ + case 339: /* db_name_cond_opt ::= db_name NK_DOT */ { yylhsminor.yy974 = createIdentifierValueNode(pCxt, &yymsp[-1].minor.yy557); } yymsp[-1].minor.yy974 = yylhsminor.yy974; break; - case 340: /* like_pattern_opt ::= LIKE NK_STRING */ + case 341: /* like_pattern_opt ::= LIKE NK_STRING */ { yymsp[-1].minor.yy974 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } break; - case 341: /* table_name_cond ::= table_name */ + case 342: /* table_name_cond ::= table_name */ { yylhsminor.yy974 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy557); } yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 343: /* from_db_opt ::= FROM db_name */ + case 344: /* from_db_opt ::= FROM db_name */ { yymsp[-1].minor.yy974 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy557); } break; - case 347: /* tag_item ::= TBNAME */ + case 348: /* tag_item ::= TBNAME */ { yylhsminor.yy974 = setProjectionAlias(pCxt, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL), &yymsp[0].minor.yy0); } yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 350: /* tag_item ::= column_name column_alias */ + case 351: /* tag_item ::= column_name column_alias */ { yylhsminor.yy974 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-1].minor.yy557), &yymsp[0].minor.yy557); } yymsp[-1].minor.yy974 = yylhsminor.yy974; break; - case 351: /* tag_item ::= column_name AS column_alias */ + case 352: /* tag_item ::= column_name AS column_alias */ { yylhsminor.yy974 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-2].minor.yy557), &yymsp[0].minor.yy557); } yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 352: /* db_kind_opt ::= */ + case 353: /* db_kind_opt ::= */ { yymsp[1].minor.yy741 = SHOW_KIND_ALL; } break; - case 353: /* db_kind_opt ::= USER */ + case 354: /* db_kind_opt ::= USER */ { yymsp[0].minor.yy741 = SHOW_KIND_DATABASES_USER; } break; - case 354: /* db_kind_opt ::= SYSTEM */ + case 355: /* db_kind_opt ::= SYSTEM */ { yymsp[0].minor.yy741 = SHOW_KIND_DATABASES_SYSTEM; } break; - case 355: /* cmd ::= CREATE TSMA not_exists_opt tsma_name ON full_table_name tsma_func_list INTERVAL NK_LP duration_literal NK_RP */ + case 356: /* cmd ::= CREATE TSMA not_exists_opt tsma_name ON full_table_name tsma_func_list INTERVAL NK_LP duration_literal NK_RP */ { pCxt->pRootNode = createCreateTSMAStmt(pCxt, yymsp[-8].minor.yy569, &yymsp[-7].minor.yy557, yymsp[-4].minor.yy974, yymsp[-5].minor.yy974, releaseRawExprNode(pCxt, yymsp[-1].minor.yy974)); } break; - case 356: /* cmd ::= CREATE RECURSIVE TSMA not_exists_opt tsma_name ON full_table_name INTERVAL NK_LP duration_literal NK_RP */ + case 357: /* cmd ::= CREATE RECURSIVE TSMA not_exists_opt tsma_name ON full_table_name INTERVAL NK_LP duration_literal NK_RP */ { pCxt->pRootNode = createCreateTSMAStmt(pCxt, yymsp[-7].minor.yy569, &yymsp[-6].minor.yy557, NULL, yymsp[-4].minor.yy974, releaseRawExprNode(pCxt, yymsp[-1].minor.yy974)); } break; - case 357: /* cmd ::= DROP TSMA exists_opt full_tsma_name */ + case 358: /* cmd ::= DROP TSMA exists_opt full_tsma_name */ { pCxt->pRootNode = createDropTSMAStmt(pCxt, yymsp[-1].minor.yy569, yymsp[0].minor.yy974); } break; - case 358: /* cmd ::= SHOW db_name_cond_opt TSMAS */ + case 359: /* cmd ::= SHOW db_name_cond_opt TSMAS */ { pCxt->pRootNode = createShowTSMASStmt(pCxt, yymsp[-1].minor.yy974); } break; - case 361: /* tsma_func_list ::= FUNCTION NK_LP func_list NK_RP */ + case 362: /* tsma_func_list ::= FUNCTION NK_LP func_list NK_RP */ { yymsp[-3].minor.yy974 = createTSMAOptions(pCxt, yymsp[-1].minor.yy946); } break; - case 362: /* cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options */ + case 363: /* cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options */ { pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_SMA, yymsp[-4].minor.yy569, yymsp[-3].minor.yy974, yymsp[-1].minor.yy974, NULL, yymsp[0].minor.yy974); } break; - case 363: /* cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP */ + case 364: /* cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP */ { pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_NORMAL, yymsp[-6].minor.yy569, yymsp[-5].minor.yy974, yymsp[-3].minor.yy974, yymsp[-1].minor.yy946, NULL); } break; - case 364: /* cmd ::= DROP INDEX exists_opt full_index_name */ + case 365: /* cmd ::= DROP INDEX exists_opt full_index_name */ { pCxt->pRootNode = createDropIndexStmt(pCxt, yymsp[-1].minor.yy569, yymsp[0].minor.yy974); } break; - case 365: /* full_index_name ::= index_name */ + case 366: /* full_index_name ::= index_name */ { yylhsminor.yy974 = createRealTableNodeForIndexName(pCxt, NULL, &yymsp[0].minor.yy557); } yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 366: /* full_index_name ::= db_name NK_DOT index_name */ + case 367: /* full_index_name ::= db_name NK_DOT index_name */ { yylhsminor.yy974 = createRealTableNodeForIndexName(pCxt, &yymsp[-2].minor.yy557, &yymsp[0].minor.yy557); } yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 367: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ + case 368: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ { yymsp[-9].minor.yy974 = createIndexOption(pCxt, yymsp[-7].minor.yy946, releaseRawExprNode(pCxt, yymsp[-3].minor.yy974), NULL, yymsp[-1].minor.yy974, yymsp[0].minor.yy974); } break; - case 368: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt sma_stream_opt */ + case 369: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt sma_stream_opt */ { yymsp[-11].minor.yy974 = createIndexOption(pCxt, yymsp[-9].minor.yy946, releaseRawExprNode(pCxt, yymsp[-5].minor.yy974), releaseRawExprNode(pCxt, yymsp[-3].minor.yy974), yymsp[-1].minor.yy974, yymsp[0].minor.yy974); } break; - case 371: /* func ::= sma_func_name NK_LP expression_list NK_RP */ + case 372: /* func ::= sma_func_name NK_LP expression_list NK_RP */ { yylhsminor.yy974 = createFunctionNode(pCxt, &yymsp[-3].minor.yy557, yymsp[-1].minor.yy946); } yymsp[-3].minor.yy974 = yylhsminor.yy974; break; - case 372: /* sma_func_name ::= function_name */ - case 667: /* alias_opt ::= table_alias */ yytestcase(yyruleno==667); + case 373: /* sma_func_name ::= function_name */ + case 668: /* alias_opt ::= table_alias */ yytestcase(yyruleno==668); { yylhsminor.yy557 = yymsp[0].minor.yy557; } yymsp[0].minor.yy557 = yylhsminor.yy557; break; - case 377: /* sma_stream_opt ::= */ - case 427: /* stream_options ::= */ yytestcase(yyruleno==427); + case 378: /* sma_stream_opt ::= */ + case 428: /* stream_options ::= */ yytestcase(yyruleno==428); { yymsp[1].minor.yy974 = createStreamOptions(pCxt); } break; - case 378: /* sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ + case 379: /* sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ { ((SStreamOptions*)yymsp[-2].minor.yy974)->pWatermark = releaseRawExprNode(pCxt, yymsp[0].minor.yy974); yylhsminor.yy974 = yymsp[-2].minor.yy974; } yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 379: /* sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ + case 380: /* sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ { ((SStreamOptions*)yymsp[-2].minor.yy974)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy974); yylhsminor.yy974 = yymsp[-2].minor.yy974; } yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 380: /* sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ + case 381: /* sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ { ((SStreamOptions*)yymsp[-2].minor.yy974)->pDeleteMark = releaseRawExprNode(pCxt, yymsp[0].minor.yy974); yylhsminor.yy974 = yymsp[-2].minor.yy974; } yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 381: /* with_meta ::= AS */ + case 382: /* with_meta ::= AS */ { yymsp[0].minor.yy904 = 0; } break; - case 382: /* with_meta ::= WITH META AS */ + case 383: /* with_meta ::= WITH META AS */ { yymsp[-2].minor.yy904 = 1; } break; - case 383: /* with_meta ::= ONLY META AS */ + case 384: /* with_meta ::= ONLY META AS */ { yymsp[-2].minor.yy904 = 2; } break; - case 384: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ + case 385: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ { pCxt->pRootNode = createCreateTopicStmtUseQuery(pCxt, yymsp[-3].minor.yy569, &yymsp[-2].minor.yy557, yymsp[0].minor.yy974); } break; - case 385: /* cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name */ + case 386: /* cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name */ { pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-4].minor.yy569, &yymsp[-3].minor.yy557, &yymsp[0].minor.yy557, yymsp[-2].minor.yy904); } break; - case 386: /* cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt */ + case 387: /* cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt */ { pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-5].minor.yy569, &yymsp[-4].minor.yy557, yymsp[-1].minor.yy974, yymsp[-3].minor.yy904, yymsp[0].minor.yy974); } break; - case 387: /* cmd ::= DROP TOPIC exists_opt topic_name */ + case 388: /* cmd ::= DROP TOPIC exists_opt topic_name */ { pCxt->pRootNode = createDropTopicStmt(pCxt, yymsp[-1].minor.yy569, &yymsp[0].minor.yy557); } break; - case 388: /* cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ + case 389: /* cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ { pCxt->pRootNode = createDropCGroupStmt(pCxt, yymsp[-3].minor.yy569, &yymsp[-2].minor.yy557, &yymsp[0].minor.yy557); } break; - case 389: /* cmd ::= DESC full_table_name */ - case 390: /* cmd ::= DESCRIBE full_table_name */ yytestcase(yyruleno==390); + case 390: /* cmd ::= DESC full_table_name */ + case 391: /* cmd ::= DESCRIBE full_table_name */ yytestcase(yyruleno==391); { pCxt->pRootNode = createDescribeStmt(pCxt, yymsp[0].minor.yy974); } break; - case 391: /* cmd ::= RESET QUERY CACHE */ + case 392: /* cmd ::= RESET QUERY CACHE */ { pCxt->pRootNode = createResetQueryCacheStmt(pCxt); } break; - case 392: /* cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ - case 393: /* cmd ::= EXPLAIN analyze_opt explain_options insert_query */ yytestcase(yyruleno==393); + case 393: /* cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ + case 394: /* cmd ::= EXPLAIN analyze_opt explain_options insert_query */ yytestcase(yyruleno==394); { pCxt->pRootNode = createExplainStmt(pCxt, yymsp[-2].minor.yy569, yymsp[-1].minor.yy974, yymsp[0].minor.yy974); } break; - case 396: /* explain_options ::= */ + case 397: /* explain_options ::= */ { yymsp[1].minor.yy974 = createDefaultExplainOptions(pCxt); } break; - case 397: /* explain_options ::= explain_options VERBOSE NK_BOOL */ + case 398: /* explain_options ::= explain_options VERBOSE NK_BOOL */ { yylhsminor.yy974 = setExplainVerbose(pCxt, yymsp[-2].minor.yy974, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 398: /* explain_options ::= explain_options RATIO NK_FLOAT */ + case 399: /* explain_options ::= explain_options RATIO NK_FLOAT */ { yylhsminor.yy974 = setExplainRatio(pCxt, yymsp[-2].minor.yy974, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 399: /* cmd ::= CREATE or_replace_opt agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt language_opt */ + case 400: /* cmd ::= CREATE or_replace_opt agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt language_opt */ { pCxt->pRootNode = createCreateFunctionStmt(pCxt, yymsp[-7].minor.yy569, yymsp[-9].minor.yy569, &yymsp[-6].minor.yy557, &yymsp[-4].minor.yy0, yymsp[-2].minor.yy424, yymsp[-1].minor.yy904, &yymsp[0].minor.yy557, yymsp[-10].minor.yy569); } break; - case 400: /* cmd ::= DROP FUNCTION exists_opt function_name */ + case 401: /* cmd ::= DROP FUNCTION exists_opt function_name */ { pCxt->pRootNode = createDropFunctionStmt(pCxt, yymsp[-1].minor.yy569, &yymsp[0].minor.yy557); } break; - case 405: /* language_opt ::= */ - case 450: /* on_vgroup_id ::= */ yytestcase(yyruleno==450); + case 406: /* language_opt ::= */ + case 451: /* on_vgroup_id ::= */ yytestcase(yyruleno==451); { yymsp[1].minor.yy557 = nil_token; } break; - case 406: /* language_opt ::= LANGUAGE NK_STRING */ - case 451: /* on_vgroup_id ::= ON NK_INTEGER */ yytestcase(yyruleno==451); + case 407: /* language_opt ::= LANGUAGE NK_STRING */ + case 452: /* on_vgroup_id ::= ON NK_INTEGER */ yytestcase(yyruleno==452); { yymsp[-1].minor.yy557 = yymsp[0].minor.yy0; } break; - case 409: /* cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery */ + case 410: /* cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery */ { pCxt->pRootNode = createCreateViewStmt(pCxt, yymsp[-4].minor.yy569, yymsp[-2].minor.yy974, &yymsp[-1].minor.yy0, yymsp[0].minor.yy974); } break; - case 410: /* cmd ::= DROP VIEW exists_opt full_view_name */ + case 411: /* cmd ::= DROP VIEW exists_opt full_view_name */ { pCxt->pRootNode = createDropViewStmt(pCxt, yymsp[-1].minor.yy569, yymsp[0].minor.yy974); } break; - case 411: /* full_view_name ::= view_name */ + case 412: /* full_view_name ::= view_name */ { yylhsminor.yy974 = createViewNode(pCxt, NULL, &yymsp[0].minor.yy557); } yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 412: /* full_view_name ::= db_name NK_DOT view_name */ + case 413: /* full_view_name ::= db_name NK_DOT view_name */ { yylhsminor.yy974 = createViewNode(pCxt, &yymsp[-2].minor.yy557, &yymsp[0].minor.yy557); } yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 413: /* cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name col_list_opt tag_def_or_ref_opt subtable_opt AS query_or_subquery */ + case 414: /* cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name col_list_opt tag_def_or_ref_opt subtable_opt AS query_or_subquery */ { pCxt->pRootNode = createCreateStreamStmt(pCxt, yymsp[-9].minor.yy569, &yymsp[-8].minor.yy557, yymsp[-5].minor.yy974, yymsp[-7].minor.yy974, yymsp[-3].minor.yy946, yymsp[-2].minor.yy974, yymsp[0].minor.yy974, yymsp[-4].minor.yy946); } break; - case 414: /* cmd ::= DROP STREAM exists_opt stream_name */ + case 415: /* cmd ::= DROP STREAM exists_opt stream_name */ { pCxt->pRootNode = createDropStreamStmt(pCxt, yymsp[-1].minor.yy569, &yymsp[0].minor.yy557); } break; - case 415: /* cmd ::= PAUSE STREAM exists_opt stream_name */ + case 416: /* cmd ::= PAUSE STREAM exists_opt stream_name */ { pCxt->pRootNode = createPauseStreamStmt(pCxt, yymsp[-1].minor.yy569, &yymsp[0].minor.yy557); } break; - case 416: /* cmd ::= RESUME STREAM exists_opt ignore_opt stream_name */ + case 417: /* cmd ::= RESUME STREAM exists_opt ignore_opt stream_name */ { pCxt->pRootNode = createResumeStreamStmt(pCxt, yymsp[-2].minor.yy569, yymsp[-1].minor.yy569, &yymsp[0].minor.yy557); } break; - case 421: /* column_stream_def ::= column_name stream_col_options */ + case 422: /* column_stream_def ::= column_name stream_col_options */ { yylhsminor.yy974 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy557, createDataType(TSDB_DATA_TYPE_NULL), yymsp[0].minor.yy974); } yymsp[-1].minor.yy974 = yylhsminor.yy974; break; - case 422: /* stream_col_options ::= */ - case 782: /* column_options ::= */ yytestcase(yyruleno==782); + case 423: /* stream_col_options ::= */ + case 783: /* column_options ::= */ yytestcase(yyruleno==783); { yymsp[1].minor.yy974 = createDefaultColumnOptions(pCxt); } break; - case 423: /* stream_col_options ::= stream_col_options PRIMARY KEY */ - case 783: /* column_options ::= column_options PRIMARY KEY */ yytestcase(yyruleno==783); + case 424: /* stream_col_options ::= stream_col_options PRIMARY KEY */ + case 784: /* column_options ::= column_options PRIMARY KEY */ yytestcase(yyruleno==784); { yylhsminor.yy974 = setColumnOptionsPK(pCxt, yymsp[-2].minor.yy974); } yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 428: /* stream_options ::= stream_options TRIGGER AT_ONCE */ - case 429: /* stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ yytestcase(yyruleno==429); + case 429: /* stream_options ::= stream_options TRIGGER AT_ONCE */ + case 430: /* stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ yytestcase(yyruleno==430); { yylhsminor.yy974 = setStreamOptions(pCxt, yymsp[-2].minor.yy974, SOPT_TRIGGER_TYPE_SET, &yymsp[0].minor.yy0, NULL); } yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 430: /* stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ + case 431: /* stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ { yylhsminor.yy974 = setStreamOptions(pCxt, yymsp[-3].minor.yy974, SOPT_TRIGGER_TYPE_SET, &yymsp[-1].minor.yy0, releaseRawExprNode(pCxt, yymsp[0].minor.yy974)); } yymsp[-3].minor.yy974 = yylhsminor.yy974; break; - case 431: /* stream_options ::= stream_options WATERMARK duration_literal */ + case 432: /* stream_options ::= stream_options WATERMARK duration_literal */ { yylhsminor.yy974 = setStreamOptions(pCxt, yymsp[-2].minor.yy974, SOPT_WATERMARK_SET, NULL, releaseRawExprNode(pCxt, yymsp[0].minor.yy974)); } yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 432: /* stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ + case 433: /* stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ { yylhsminor.yy974 = setStreamOptions(pCxt, yymsp[-3].minor.yy974, SOPT_IGNORE_EXPIRED_SET, &yymsp[0].minor.yy0, NULL); } yymsp[-3].minor.yy974 = yylhsminor.yy974; break; - case 433: /* stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ + case 434: /* stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ { yylhsminor.yy974 = setStreamOptions(pCxt, yymsp[-2].minor.yy974, SOPT_FILL_HISTORY_SET, &yymsp[0].minor.yy0, NULL); } yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 434: /* stream_options ::= stream_options DELETE_MARK duration_literal */ + case 435: /* stream_options ::= stream_options DELETE_MARK duration_literal */ { yylhsminor.yy974 = setStreamOptions(pCxt, yymsp[-2].minor.yy974, SOPT_DELETE_MARK_SET, NULL, releaseRawExprNode(pCxt, yymsp[0].minor.yy974)); } yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 435: /* stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */ + case 436: /* stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */ { yylhsminor.yy974 = setStreamOptions(pCxt, yymsp[-3].minor.yy974, SOPT_IGNORE_UPDATE_SET, &yymsp[0].minor.yy0, NULL); } yymsp[-3].minor.yy974 = yylhsminor.yy974; break; - case 437: /* subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ - case 726: /* sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP */ yytestcase(yyruleno==726); - case 750: /* every_opt ::= EVERY NK_LP duration_literal NK_RP */ yytestcase(yyruleno==750); + case 438: /* subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ + case 727: /* sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP */ yytestcase(yyruleno==727); + case 751: /* every_opt ::= EVERY NK_LP duration_literal NK_RP */ yytestcase(yyruleno==751); { yymsp[-3].minor.yy974 = releaseRawExprNode(pCxt, yymsp[-1].minor.yy974); } break; - case 440: /* cmd ::= KILL CONNECTION NK_INTEGER */ + case 441: /* cmd ::= KILL CONNECTION NK_INTEGER */ { pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_CONNECTION_STMT, &yymsp[0].minor.yy0); } break; - case 441: /* cmd ::= KILL QUERY NK_STRING */ + case 442: /* cmd ::= KILL QUERY NK_STRING */ { pCxt->pRootNode = createKillQueryStmt(pCxt, &yymsp[0].minor.yy0); } break; - case 442: /* cmd ::= KILL TRANSACTION NK_INTEGER */ + case 443: /* cmd ::= KILL TRANSACTION NK_INTEGER */ { pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_TRANSACTION_STMT, &yymsp[0].minor.yy0); } break; - case 443: /* cmd ::= KILL COMPACT NK_INTEGER */ + case 444: /* cmd ::= KILL COMPACT NK_INTEGER */ { pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_COMPACT_STMT, &yymsp[0].minor.yy0); } break; - case 444: /* cmd ::= BALANCE VGROUP */ + case 445: /* cmd ::= BALANCE VGROUP */ { pCxt->pRootNode = createBalanceVgroupStmt(pCxt); } break; - case 445: /* cmd ::= BALANCE VGROUP LEADER on_vgroup_id */ + case 446: /* cmd ::= BALANCE VGROUP LEADER on_vgroup_id */ { pCxt->pRootNode = createBalanceVgroupLeaderStmt(pCxt, &yymsp[0].minor.yy557); } break; - case 446: /* cmd ::= BALANCE VGROUP LEADER DATABASE db_name */ + case 447: /* cmd ::= BALANCE VGROUP LEADER DATABASE db_name */ { pCxt->pRootNode = createBalanceVgroupLeaderDBNameStmt(pCxt, &yymsp[0].minor.yy557); } break; - case 447: /* cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ + case 448: /* cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ { pCxt->pRootNode = createMergeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } break; - case 448: /* cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ + case 449: /* cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ { pCxt->pRootNode = createRedistributeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy946); } break; - case 449: /* cmd ::= SPLIT VGROUP NK_INTEGER */ + case 450: /* cmd ::= SPLIT VGROUP NK_INTEGER */ { pCxt->pRootNode = createSplitVgroupStmt(pCxt, &yymsp[0].minor.yy0); } break; - case 452: /* dnode_list ::= DNODE NK_INTEGER */ + case 453: /* dnode_list ::= DNODE NK_INTEGER */ { yymsp[-1].minor.yy946 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } break; - case 454: /* cmd ::= DELETE FROM full_table_name where_clause_opt */ + case 455: /* cmd ::= DELETE FROM full_table_name where_clause_opt */ { pCxt->pRootNode = createDeleteStmt(pCxt, yymsp[-1].minor.yy974, yymsp[0].minor.yy974); } break; - case 457: /* insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ + case 458: /* insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ { yymsp[-6].minor.yy974 = createInsertStmt(pCxt, yymsp[-4].minor.yy974, yymsp[-2].minor.yy946, yymsp[0].minor.yy974); } break; - case 458: /* insert_query ::= INSERT INTO full_table_name query_or_subquery */ + case 459: /* insert_query ::= INSERT INTO full_table_name query_or_subquery */ { yymsp[-3].minor.yy974 = createInsertStmt(pCxt, yymsp[-1].minor.yy974, NULL, yymsp[0].minor.yy974); } break; - case 459: /* tags_literal ::= NK_INTEGER */ - case 471: /* tags_literal ::= NK_BIN */ yytestcase(yyruleno==471); - case 480: /* tags_literal ::= NK_HEX */ yytestcase(yyruleno==480); + case 460: /* tags_literal ::= NK_INTEGER */ + case 472: /* tags_literal ::= NK_BIN */ yytestcase(yyruleno==472); + case 481: /* tags_literal ::= NK_HEX */ yytestcase(yyruleno==481); { yylhsminor.yy974 = createRawValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0, NULL); } yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 460: /* tags_literal ::= NK_INTEGER NK_PLUS duration_literal */ - case 461: /* tags_literal ::= NK_INTEGER NK_MINUS duration_literal */ yytestcase(yyruleno==461); - case 472: /* tags_literal ::= NK_BIN NK_PLUS duration_literal */ yytestcase(yyruleno==472); - case 473: /* tags_literal ::= NK_BIN NK_MINUS duration_literal */ yytestcase(yyruleno==473); - case 481: /* tags_literal ::= NK_HEX NK_PLUS duration_literal */ yytestcase(yyruleno==481); - case 482: /* tags_literal ::= NK_HEX NK_MINUS duration_literal */ yytestcase(yyruleno==482); - case 490: /* tags_literal ::= NK_STRING NK_PLUS duration_literal */ yytestcase(yyruleno==490); - case 491: /* tags_literal ::= NK_STRING NK_MINUS duration_literal */ yytestcase(yyruleno==491); + case 461: /* tags_literal ::= NK_INTEGER NK_PLUS duration_literal */ + case 462: /* tags_literal ::= NK_INTEGER NK_MINUS duration_literal */ yytestcase(yyruleno==462); + case 473: /* tags_literal ::= NK_BIN NK_PLUS duration_literal */ yytestcase(yyruleno==473); + case 474: /* tags_literal ::= NK_BIN NK_MINUS duration_literal */ yytestcase(yyruleno==474); + case 482: /* tags_literal ::= NK_HEX NK_PLUS duration_literal */ yytestcase(yyruleno==482); + case 483: /* tags_literal ::= NK_HEX NK_MINUS duration_literal */ yytestcase(yyruleno==483); + case 491: /* tags_literal ::= NK_STRING NK_PLUS duration_literal */ yytestcase(yyruleno==491); + case 492: /* tags_literal ::= NK_STRING NK_MINUS duration_literal */ yytestcase(yyruleno==492); { SToken l = yymsp[-2].minor.yy0; SToken r = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy974); @@ -7045,12 +7413,12 @@ yymsp[0].minor.yy974); } } yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 462: /* tags_literal ::= NK_PLUS NK_INTEGER */ - case 465: /* tags_literal ::= NK_MINUS NK_INTEGER */ yytestcase(yyruleno==465); - case 474: /* tags_literal ::= NK_PLUS NK_BIN */ yytestcase(yyruleno==474); - case 477: /* tags_literal ::= NK_MINUS NK_BIN */ yytestcase(yyruleno==477); - case 483: /* tags_literal ::= NK_PLUS NK_HEX */ yytestcase(yyruleno==483); - case 486: /* tags_literal ::= NK_MINUS NK_HEX */ yytestcase(yyruleno==486); + case 463: /* tags_literal ::= NK_PLUS NK_INTEGER */ + case 466: /* tags_literal ::= NK_MINUS NK_INTEGER */ yytestcase(yyruleno==466); + case 475: /* tags_literal ::= NK_PLUS NK_BIN */ yytestcase(yyruleno==475); + case 478: /* tags_literal ::= NK_MINUS NK_BIN */ yytestcase(yyruleno==478); + case 484: /* tags_literal ::= NK_PLUS NK_HEX */ yytestcase(yyruleno==484); + case 487: /* tags_literal ::= NK_MINUS NK_HEX */ yytestcase(yyruleno==487); { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; @@ -7058,18 +7426,18 @@ yymsp[0].minor.yy974); } } yymsp[-1].minor.yy974 = yylhsminor.yy974; break; - case 463: /* tags_literal ::= NK_PLUS NK_INTEGER NK_PLUS duration_literal */ - case 464: /* tags_literal ::= NK_PLUS NK_INTEGER NK_MINUS duration_literal */ yytestcase(yyruleno==464); - case 466: /* tags_literal ::= NK_MINUS NK_INTEGER NK_PLUS duration_literal */ yytestcase(yyruleno==466); - case 467: /* tags_literal ::= NK_MINUS NK_INTEGER NK_MINUS duration_literal */ yytestcase(yyruleno==467); - case 475: /* tags_literal ::= NK_PLUS NK_BIN NK_PLUS duration_literal */ yytestcase(yyruleno==475); - case 476: /* tags_literal ::= NK_PLUS NK_BIN NK_MINUS duration_literal */ yytestcase(yyruleno==476); - case 478: /* tags_literal ::= NK_MINUS NK_BIN NK_PLUS duration_literal */ yytestcase(yyruleno==478); - case 479: /* tags_literal ::= NK_MINUS NK_BIN NK_MINUS duration_literal */ yytestcase(yyruleno==479); - case 484: /* tags_literal ::= NK_PLUS NK_HEX NK_PLUS duration_literal */ yytestcase(yyruleno==484); - case 485: /* tags_literal ::= NK_PLUS NK_HEX NK_MINUS duration_literal */ yytestcase(yyruleno==485); - case 487: /* tags_literal ::= NK_MINUS NK_HEX NK_PLUS duration_literal */ yytestcase(yyruleno==487); - case 488: /* tags_literal ::= NK_MINUS NK_HEX NK_MINUS duration_literal */ yytestcase(yyruleno==488); + case 464: /* tags_literal ::= NK_PLUS NK_INTEGER NK_PLUS duration_literal */ + case 465: /* tags_literal ::= NK_PLUS NK_INTEGER NK_MINUS duration_literal */ yytestcase(yyruleno==465); + case 467: /* tags_literal ::= NK_MINUS NK_INTEGER NK_PLUS duration_literal */ yytestcase(yyruleno==467); + case 468: /* tags_literal ::= NK_MINUS NK_INTEGER NK_MINUS duration_literal */ yytestcase(yyruleno==468); + case 476: /* tags_literal ::= NK_PLUS NK_BIN NK_PLUS duration_literal */ yytestcase(yyruleno==476); + case 477: /* tags_literal ::= NK_PLUS NK_BIN NK_MINUS duration_literal */ yytestcase(yyruleno==477); + case 479: /* tags_literal ::= NK_MINUS NK_BIN NK_PLUS duration_literal */ yytestcase(yyruleno==479); + case 480: /* tags_literal ::= NK_MINUS NK_BIN NK_MINUS duration_literal */ yytestcase(yyruleno==480); + case 485: /* tags_literal ::= NK_PLUS NK_HEX NK_PLUS duration_literal */ yytestcase(yyruleno==485); + case 486: /* tags_literal ::= NK_PLUS NK_HEX NK_MINUS duration_literal */ yytestcase(yyruleno==486); + case 488: /* tags_literal ::= NK_MINUS NK_HEX NK_PLUS duration_literal */ yytestcase(yyruleno==488); + case 489: /* tags_literal ::= NK_MINUS NK_HEX NK_MINUS duration_literal */ yytestcase(yyruleno==489); { SToken l = yymsp[-3].minor.yy0; SToken r = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy974); @@ -7078,12 +7446,12 @@ yymsp[0].minor.yy974); } } yymsp[-3].minor.yy974 = yylhsminor.yy974; break; - case 468: /* tags_literal ::= NK_FLOAT */ + case 469: /* tags_literal ::= NK_FLOAT */ { yylhsminor.yy974 = createRawValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0, NULL); } yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 469: /* tags_literal ::= NK_PLUS NK_FLOAT */ - case 470: /* tags_literal ::= NK_MINUS NK_FLOAT */ yytestcase(yyruleno==470); + case 470: /* tags_literal ::= NK_PLUS NK_FLOAT */ + case 471: /* tags_literal ::= NK_MINUS NK_FLOAT */ yytestcase(yyruleno==471); { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; @@ -7091,24 +7459,24 @@ yymsp[0].minor.yy974); } } yymsp[-1].minor.yy974 = yylhsminor.yy974; break; - case 489: /* tags_literal ::= NK_STRING */ + case 490: /* tags_literal ::= NK_STRING */ { yylhsminor.yy974 = createRawValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0, NULL); } yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 492: /* tags_literal ::= NK_BOOL */ + case 493: /* tags_literal ::= NK_BOOL */ { yylhsminor.yy974 = createRawValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0, NULL); } yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 493: /* tags_literal ::= NULL */ + case 494: /* tags_literal ::= NULL */ { yylhsminor.yy974 = createRawValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0, NULL); } yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 494: /* tags_literal ::= literal_func */ + case 495: /* tags_literal ::= literal_func */ { yylhsminor.yy974 = createRawValueNode(pCxt, TSDB_DATA_TYPE_BINARY, NULL, yymsp[0].minor.yy974); } yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 495: /* tags_literal ::= literal_func NK_PLUS duration_literal */ - case 496: /* tags_literal ::= literal_func NK_MINUS duration_literal */ yytestcase(yyruleno==496); + case 496: /* tags_literal ::= literal_func NK_PLUS duration_literal */ + case 497: /* tags_literal ::= literal_func NK_MINUS duration_literal */ yytestcase(yyruleno==497); { SToken l = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy974); SToken r = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy974); @@ -7117,73 +7485,73 @@ yymsp[0].minor.yy974); } } yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 499: /* literal ::= NK_INTEGER */ + case 500: /* literal ::= NK_INTEGER */ { yylhsminor.yy974 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 500: /* literal ::= NK_FLOAT */ + case 501: /* literal ::= NK_FLOAT */ { yylhsminor.yy974 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 501: /* literal ::= NK_STRING */ + case 502: /* literal ::= NK_STRING */ { yylhsminor.yy974 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 502: /* literal ::= NK_BOOL */ + case 503: /* literal ::= NK_BOOL */ { yylhsminor.yy974 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 503: /* literal ::= TIMESTAMP NK_STRING */ + case 504: /* literal ::= TIMESTAMP NK_STRING */ { yylhsminor.yy974 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0)); } yymsp[-1].minor.yy974 = yylhsminor.yy974; break; - case 504: /* literal ::= duration_literal */ - case 514: /* signed_literal ::= signed */ yytestcase(yyruleno==514); - case 538: /* expr_or_subquery ::= expression */ yytestcase(yyruleno==538); - case 539: /* expression ::= literal */ yytestcase(yyruleno==539); - case 541: /* expression ::= column_reference */ yytestcase(yyruleno==541); - case 542: /* expression ::= function_expression */ yytestcase(yyruleno==542); - case 543: /* expression ::= case_when_expression */ yytestcase(yyruleno==543); - case 589: /* function_expression ::= literal_func */ yytestcase(yyruleno==589); - case 590: /* function_expression ::= rand_func */ yytestcase(yyruleno==590); - case 648: /* boolean_value_expression ::= boolean_primary */ yytestcase(yyruleno==648); - case 652: /* boolean_primary ::= predicate */ yytestcase(yyruleno==652); - case 654: /* common_expression ::= expr_or_subquery */ yytestcase(yyruleno==654); - case 655: /* common_expression ::= boolean_value_expression */ yytestcase(yyruleno==655); - case 658: /* table_reference_list ::= table_reference */ yytestcase(yyruleno==658); - case 660: /* table_reference ::= table_primary */ yytestcase(yyruleno==660); - case 661: /* table_reference ::= joined_table */ yytestcase(yyruleno==661); - case 665: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==665); - case 752: /* query_simple ::= query_specification */ yytestcase(yyruleno==752); - case 753: /* query_simple ::= union_query_expression */ yytestcase(yyruleno==753); - case 756: /* query_simple_or_subquery ::= query_simple */ yytestcase(yyruleno==756); - case 758: /* query_or_subquery ::= query_expression */ yytestcase(yyruleno==758); + case 505: /* literal ::= duration_literal */ + case 515: /* signed_literal ::= signed */ yytestcase(yyruleno==515); + case 539: /* expr_or_subquery ::= expression */ yytestcase(yyruleno==539); + case 540: /* expression ::= literal */ yytestcase(yyruleno==540); + case 542: /* expression ::= column_reference */ yytestcase(yyruleno==542); + case 543: /* expression ::= function_expression */ yytestcase(yyruleno==543); + case 544: /* expression ::= case_when_expression */ yytestcase(yyruleno==544); + case 590: /* function_expression ::= literal_func */ yytestcase(yyruleno==590); + case 591: /* function_expression ::= rand_func */ yytestcase(yyruleno==591); + case 649: /* boolean_value_expression ::= boolean_primary */ yytestcase(yyruleno==649); + case 653: /* boolean_primary ::= predicate */ yytestcase(yyruleno==653); + case 655: /* common_expression ::= expr_or_subquery */ yytestcase(yyruleno==655); + case 656: /* common_expression ::= boolean_value_expression */ yytestcase(yyruleno==656); + case 659: /* table_reference_list ::= table_reference */ yytestcase(yyruleno==659); + case 661: /* table_reference ::= table_primary */ yytestcase(yyruleno==661); + case 662: /* table_reference ::= joined_table */ yytestcase(yyruleno==662); + case 666: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==666); + case 753: /* query_simple ::= query_specification */ yytestcase(yyruleno==753); + case 754: /* query_simple ::= union_query_expression */ yytestcase(yyruleno==754); + case 757: /* query_simple_or_subquery ::= query_simple */ yytestcase(yyruleno==757); + case 759: /* query_or_subquery ::= query_expression */ yytestcase(yyruleno==759); { yylhsminor.yy974 = yymsp[0].minor.yy974; } yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 505: /* literal ::= NULL */ + case 506: /* literal ::= NULL */ { yylhsminor.yy974 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 506: /* literal ::= NK_QUESTION */ + case 507: /* literal ::= NK_QUESTION */ { yylhsminor.yy974 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 507: /* duration_literal ::= NK_VARIABLE */ - case 727: /* interval_sliding_duration_literal ::= NK_VARIABLE */ yytestcase(yyruleno==727); - case 728: /* interval_sliding_duration_literal ::= NK_STRING */ yytestcase(yyruleno==728); - case 729: /* interval_sliding_duration_literal ::= NK_INTEGER */ yytestcase(yyruleno==729); + case 508: /* duration_literal ::= NK_VARIABLE */ + case 728: /* interval_sliding_duration_literal ::= NK_VARIABLE */ yytestcase(yyruleno==728); + case 729: /* interval_sliding_duration_literal ::= NK_STRING */ yytestcase(yyruleno==729); + case 730: /* interval_sliding_duration_literal ::= NK_INTEGER */ yytestcase(yyruleno==730); { yylhsminor.yy974 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 508: /* signed ::= NK_INTEGER */ + case 509: /* signed ::= NK_INTEGER */ { yylhsminor.yy974 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 509: /* signed ::= NK_PLUS NK_INTEGER */ + case 510: /* signed ::= NK_PLUS NK_INTEGER */ { yymsp[-1].minor.yy974 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } break; - case 510: /* signed ::= NK_MINUS NK_INTEGER */ + case 511: /* 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; @@ -7191,14 +7559,14 @@ yymsp[0].minor.yy974); } } yymsp[-1].minor.yy974 = yylhsminor.yy974; break; - case 511: /* signed ::= NK_FLOAT */ + case 512: /* signed ::= NK_FLOAT */ { yylhsminor.yy974 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 512: /* signed ::= NK_PLUS NK_FLOAT */ + case 513: /* signed ::= NK_PLUS NK_FLOAT */ { yymsp[-1].minor.yy974 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } break; - case 513: /* signed ::= NK_MINUS NK_FLOAT */ + case 514: /* 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; @@ -7206,61 +7574,61 @@ yymsp[0].minor.yy974); } } yymsp[-1].minor.yy974 = yylhsminor.yy974; break; - case 515: /* signed_literal ::= NK_STRING */ + case 516: /* signed_literal ::= NK_STRING */ { yylhsminor.yy974 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 516: /* signed_literal ::= NK_BOOL */ + case 517: /* signed_literal ::= NK_BOOL */ { yylhsminor.yy974 = createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0); } yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 517: /* signed_literal ::= TIMESTAMP NK_STRING */ + case 518: /* signed_literal ::= TIMESTAMP NK_STRING */ { yymsp[-1].minor.yy974 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } break; - case 518: /* signed_literal ::= duration_literal */ - case 520: /* signed_literal ::= literal_func */ yytestcase(yyruleno==520); - case 619: /* star_func_para ::= expr_or_subquery */ yytestcase(yyruleno==619); - case 702: /* select_item ::= common_expression */ yytestcase(yyruleno==702); - case 712: /* partition_item ::= expr_or_subquery */ yytestcase(yyruleno==712); - case 757: /* query_simple_or_subquery ::= subquery */ yytestcase(yyruleno==757); - case 759: /* query_or_subquery ::= subquery */ yytestcase(yyruleno==759); - case 772: /* search_condition ::= common_expression */ yytestcase(yyruleno==772); + case 519: /* signed_literal ::= duration_literal */ + case 521: /* signed_literal ::= literal_func */ yytestcase(yyruleno==521); + case 620: /* star_func_para ::= expr_or_subquery */ yytestcase(yyruleno==620); + case 703: /* select_item ::= common_expression */ yytestcase(yyruleno==703); + case 713: /* partition_item ::= expr_or_subquery */ yytestcase(yyruleno==713); + case 758: /* query_simple_or_subquery ::= subquery */ yytestcase(yyruleno==758); + case 760: /* query_or_subquery ::= subquery */ yytestcase(yyruleno==760); + case 773: /* search_condition ::= common_expression */ yytestcase(yyruleno==773); { yylhsminor.yy974 = releaseRawExprNode(pCxt, yymsp[0].minor.yy974); } yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 519: /* signed_literal ::= NULL */ + case 520: /* signed_literal ::= NULL */ { yylhsminor.yy974 = createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0); } yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 521: /* signed_literal ::= NK_QUESTION */ + case 522: /* signed_literal ::= NK_QUESTION */ { yylhsminor.yy974 = createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0); } yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 540: /* expression ::= pseudo_column */ + case 541: /* expression ::= pseudo_column */ { yylhsminor.yy974 = yymsp[0].minor.yy974; (void)setRawExprNodeIsPseudoColumn(pCxt, yylhsminor.yy974, true); } yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 544: /* expression ::= NK_LP expression NK_RP */ - case 653: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==653); - case 771: /* subquery ::= NK_LP subquery NK_RP */ yytestcase(yyruleno==771); + case 545: /* expression ::= NK_LP expression NK_RP */ + case 654: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==654); + case 772: /* subquery ::= NK_LP subquery NK_RP */ yytestcase(yyruleno==772); { yylhsminor.yy974 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy974)); } yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 545: /* expression ::= NK_PLUS expr_or_subquery */ + case 546: /* expression ::= NK_PLUS expr_or_subquery */ { SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy974); yylhsminor.yy974 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, releaseRawExprNode(pCxt, yymsp[0].minor.yy974)); } yymsp[-1].minor.yy974 = yylhsminor.yy974; break; - case 546: /* expression ::= NK_MINUS expr_or_subquery */ + case 547: /* expression ::= NK_MINUS expr_or_subquery */ { SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy974); yylhsminor.yy974 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, createOperatorNode(pCxt, OP_TYPE_MINUS, releaseRawExprNode(pCxt, yymsp[0].minor.yy974), NULL)); } yymsp[-1].minor.yy974 = yylhsminor.yy974; break; - case 547: /* expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ + case 548: /* expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy974); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy974); @@ -7268,7 +7636,7 @@ yymsp[0].minor.yy974); } } yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 548: /* expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ + case 549: /* expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy974); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy974); @@ -7276,7 +7644,7 @@ yymsp[0].minor.yy974); } } yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 549: /* expression ::= expr_or_subquery NK_STAR expr_or_subquery */ + case 550: /* expression ::= expr_or_subquery NK_STAR expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy974); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy974); @@ -7284,7 +7652,7 @@ yymsp[0].minor.yy974); } } yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 550: /* expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ + case 551: /* expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy974); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy974); @@ -7292,7 +7660,7 @@ yymsp[0].minor.yy974); } } yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 551: /* expression ::= expr_or_subquery NK_REM expr_or_subquery */ + case 552: /* expression ::= expr_or_subquery NK_REM expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy974); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy974); @@ -7300,14 +7668,14 @@ yymsp[0].minor.yy974); } } yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 552: /* expression ::= column_reference NK_ARROW NK_STRING */ + case 553: /* expression ::= column_reference NK_ARROW NK_STRING */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy974); yylhsminor.yy974 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_JSON_GET_VALUE, releaseRawExprNode(pCxt, yymsp[-2].minor.yy974), createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0))); } yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 553: /* expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ + case 554: /* expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy974); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy974); @@ -7315,7 +7683,7 @@ yymsp[0].minor.yy974); } } yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 554: /* expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ + case 555: /* expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy974); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy974); @@ -7323,131 +7691,131 @@ yymsp[0].minor.yy974); } } yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 557: /* column_reference ::= column_name */ + case 558: /* column_reference ::= column_name */ { yylhsminor.yy974 = createRawExprNode(pCxt, &yymsp[0].minor.yy557, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy557)); } yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 558: /* column_reference ::= table_name NK_DOT column_name */ + case 559: /* column_reference ::= table_name NK_DOT column_name */ { yylhsminor.yy974 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy557, &yymsp[0].minor.yy557, createColumnNode(pCxt, &yymsp[-2].minor.yy557, &yymsp[0].minor.yy557)); } yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 559: /* column_reference ::= NK_ALIAS */ + case 560: /* column_reference ::= NK_ALIAS */ { yylhsminor.yy974 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 560: /* column_reference ::= table_name NK_DOT NK_ALIAS */ + case 561: /* column_reference ::= table_name NK_DOT NK_ALIAS */ { yylhsminor.yy974 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy557, &yymsp[0].minor.yy0, createColumnNode(pCxt, &yymsp[-2].minor.yy557, &yymsp[0].minor.yy0)); } yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 561: /* pseudo_column ::= ROWTS */ - case 562: /* pseudo_column ::= TBNAME */ yytestcase(yyruleno==562); - case 564: /* pseudo_column ::= QSTART */ yytestcase(yyruleno==564); - case 565: /* pseudo_column ::= QEND */ yytestcase(yyruleno==565); - case 566: /* pseudo_column ::= QDURATION */ yytestcase(yyruleno==566); - case 567: /* pseudo_column ::= WSTART */ yytestcase(yyruleno==567); - case 568: /* pseudo_column ::= WEND */ yytestcase(yyruleno==568); - case 569: /* pseudo_column ::= WDURATION */ yytestcase(yyruleno==569); - case 570: /* pseudo_column ::= IROWTS */ yytestcase(yyruleno==570); - case 571: /* pseudo_column ::= ISFILLED */ yytestcase(yyruleno==571); - case 572: /* pseudo_column ::= QTAGS */ yytestcase(yyruleno==572); - case 573: /* pseudo_column ::= FLOW */ yytestcase(yyruleno==573); - case 574: /* pseudo_column ::= FHIGH */ yytestcase(yyruleno==574); - case 575: /* pseudo_column ::= FROWTS */ yytestcase(yyruleno==575); - case 592: /* literal_func ::= NOW */ yytestcase(yyruleno==592); - case 593: /* literal_func ::= TODAY */ yytestcase(yyruleno==593); + case 562: /* pseudo_column ::= ROWTS */ + case 563: /* pseudo_column ::= TBNAME */ yytestcase(yyruleno==563); + case 565: /* pseudo_column ::= QSTART */ yytestcase(yyruleno==565); + case 566: /* pseudo_column ::= QEND */ yytestcase(yyruleno==566); + case 567: /* pseudo_column ::= QDURATION */ yytestcase(yyruleno==567); + case 568: /* pseudo_column ::= WSTART */ yytestcase(yyruleno==568); + case 569: /* pseudo_column ::= WEND */ yytestcase(yyruleno==569); + case 570: /* pseudo_column ::= WDURATION */ yytestcase(yyruleno==570); + case 571: /* pseudo_column ::= IROWTS */ yytestcase(yyruleno==571); + case 572: /* pseudo_column ::= ISFILLED */ yytestcase(yyruleno==572); + case 573: /* pseudo_column ::= QTAGS */ yytestcase(yyruleno==573); + case 574: /* pseudo_column ::= FLOW */ yytestcase(yyruleno==574); + case 575: /* pseudo_column ::= FHIGH */ yytestcase(yyruleno==575); + case 576: /* pseudo_column ::= FROWTS */ yytestcase(yyruleno==576); + case 593: /* literal_func ::= NOW */ yytestcase(yyruleno==593); + case 594: /* literal_func ::= TODAY */ yytestcase(yyruleno==594); { yylhsminor.yy974 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL)); } yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 563: /* pseudo_column ::= table_name NK_DOT TBNAME */ + case 564: /* pseudo_column ::= table_name NK_DOT TBNAME */ { yylhsminor.yy974 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy557, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-2].minor.yy557)))); } yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 576: /* function_expression ::= function_name NK_LP expression_list NK_RP */ - case 577: /* function_expression ::= star_func NK_LP star_func_para_list NK_RP */ yytestcase(yyruleno==577); - case 585: /* function_expression ::= substr_func NK_LP expression_list NK_RP */ yytestcase(yyruleno==585); + case 577: /* function_expression ::= function_name NK_LP expression_list NK_RP */ + case 578: /* function_expression ::= star_func NK_LP star_func_para_list NK_RP */ yytestcase(yyruleno==578); + case 586: /* function_expression ::= substr_func NK_LP expression_list NK_RP */ yytestcase(yyruleno==586); { yylhsminor.yy974 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy557, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy557, yymsp[-1].minor.yy946)); } yymsp[-3].minor.yy974 = yylhsminor.yy974; break; - case 578: /* function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ - case 579: /* function_expression ::= CAST NK_LP expr_or_subquery AS type_name_default_len NK_RP */ yytestcase(yyruleno==579); + case 579: /* function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ + case 580: /* function_expression ::= CAST NK_LP expr_or_subquery AS type_name_default_len NK_RP */ yytestcase(yyruleno==580); { yylhsminor.yy974 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createCastFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy974), yymsp[-1].minor.yy424)); } yymsp[-5].minor.yy974 = yylhsminor.yy974; break; - case 580: /* function_expression ::= POSITION NK_LP expr_or_subquery IN expr_or_subquery NK_RP */ + case 581: /* function_expression ::= POSITION NK_LP expr_or_subquery IN expr_or_subquery NK_RP */ { yylhsminor.yy974 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createPositionFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy974), releaseRawExprNode(pCxt, yymsp[-1].minor.yy974))); } yymsp[-5].minor.yy974 = yylhsminor.yy974; break; - case 581: /* function_expression ::= TRIM NK_LP expr_or_subquery NK_RP */ + case 582: /* function_expression ::= TRIM NK_LP expr_or_subquery NK_RP */ { yylhsminor.yy974 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, createTrimFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy974), TRIM_TYPE_BOTH)); } yymsp[-3].minor.yy974 = yylhsminor.yy974; break; - case 582: /* function_expression ::= TRIM NK_LP trim_specification_type FROM expr_or_subquery NK_RP */ + case 583: /* function_expression ::= TRIM NK_LP trim_specification_type FROM expr_or_subquery NK_RP */ { yylhsminor.yy974 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createTrimFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy974), yymsp[-3].minor.yy300)); } yymsp[-5].minor.yy974 = yylhsminor.yy974; break; - case 583: /* function_expression ::= TRIM NK_LP expr_or_subquery FROM expr_or_subquery NK_RP */ + case 584: /* function_expression ::= TRIM NK_LP expr_or_subquery FROM expr_or_subquery NK_RP */ { yylhsminor.yy974 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createTrimFunctionNodeExt(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy974), releaseRawExprNode(pCxt, yymsp[-1].minor.yy974), TRIM_TYPE_BOTH)); } yymsp[-5].minor.yy974 = yylhsminor.yy974; break; - case 584: /* function_expression ::= TRIM NK_LP trim_specification_type expr_or_subquery FROM expr_or_subquery NK_RP */ + case 585: /* function_expression ::= TRIM NK_LP trim_specification_type expr_or_subquery FROM expr_or_subquery NK_RP */ { yylhsminor.yy974 = createRawExprNodeExt(pCxt, &yymsp[-6].minor.yy0, &yymsp[0].minor.yy0, createTrimFunctionNodeExt(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy974), releaseRawExprNode(pCxt, yymsp[-1].minor.yy974), yymsp[-4].minor.yy300)); } yymsp[-6].minor.yy974 = yylhsminor.yy974; break; - case 586: /* function_expression ::= substr_func NK_LP expr_or_subquery FROM expr_or_subquery NK_RP */ + case 587: /* function_expression ::= substr_func NK_LP expr_or_subquery FROM expr_or_subquery NK_RP */ { yylhsminor.yy974 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy557, &yymsp[0].minor.yy0, createSubstrFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy974), releaseRawExprNode(pCxt, yymsp[-1].minor.yy974))); } yymsp[-5].minor.yy974 = yylhsminor.yy974; break; - case 587: /* function_expression ::= substr_func NK_LP expr_or_subquery FROM expr_or_subquery FOR expr_or_subquery NK_RP */ + case 588: /* function_expression ::= substr_func NK_LP expr_or_subquery FROM expr_or_subquery FOR expr_or_subquery NK_RP */ { yylhsminor.yy974 = createRawExprNodeExt(pCxt, &yymsp[-7].minor.yy557, &yymsp[0].minor.yy0, createSubstrFunctionNodeExt(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy974), releaseRawExprNode(pCxt, yymsp[-3].minor.yy974), releaseRawExprNode(pCxt, yymsp[-1].minor.yy974))); } yymsp[-7].minor.yy974 = yylhsminor.yy974; break; - case 588: /* function_expression ::= REPLACE NK_LP expression_list NK_RP */ - case 595: /* rand_func ::= RAND NK_LP expression_list NK_RP */ yytestcase(yyruleno==595); + case 589: /* function_expression ::= REPLACE NK_LP expression_list NK_RP */ + case 596: /* rand_func ::= RAND NK_LP expression_list NK_RP */ yytestcase(yyruleno==596); { yylhsminor.yy974 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy0, yymsp[-1].minor.yy946)); } yymsp[-3].minor.yy974 = yylhsminor.yy974; break; - case 591: /* literal_func ::= noarg_func NK_LP NK_RP */ + case 592: /* literal_func ::= noarg_func NK_LP NK_RP */ { yylhsminor.yy974 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy557, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-2].minor.yy557, NULL)); } yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 594: /* rand_func ::= RAND NK_LP NK_RP */ + case 595: /* rand_func ::= RAND NK_LP NK_RP */ { yylhsminor.yy974 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-2].minor.yy0, NULL)); } yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 598: /* trim_specification_type ::= BOTH */ + case 599: /* trim_specification_type ::= BOTH */ { yymsp[0].minor.yy300 = TRIM_TYPE_BOTH; } break; - case 599: /* trim_specification_type ::= TRAILING */ + case 600: /* trim_specification_type ::= TRAILING */ { yymsp[0].minor.yy300 = TRIM_TYPE_TRAILING; } break; - case 600: /* trim_specification_type ::= LEADING */ + case 601: /* trim_specification_type ::= LEADING */ { yymsp[0].minor.yy300 = TRIM_TYPE_LEADING; } break; - case 615: /* star_func_para_list ::= NK_STAR */ + case 616: /* star_func_para_list ::= NK_STAR */ { yylhsminor.yy946 = createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy946 = yylhsminor.yy946; break; - case 620: /* star_func_para ::= table_name NK_DOT NK_STAR */ - case 705: /* select_item ::= table_name NK_DOT NK_STAR */ yytestcase(yyruleno==705); + case 621: /* star_func_para ::= table_name NK_DOT NK_STAR */ + case 706: /* select_item ::= table_name NK_DOT NK_STAR */ yytestcase(yyruleno==706); { yylhsminor.yy974 = createColumnNode(pCxt, &yymsp[-2].minor.yy557, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 621: /* case_when_expression ::= CASE when_then_list case_when_else_opt END */ + case 622: /* case_when_expression ::= CASE when_then_list case_when_else_opt END */ { yylhsminor.yy974 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, NULL, yymsp[-2].minor.yy946, yymsp[-1].minor.yy974)); } yymsp[-3].minor.yy974 = yylhsminor.yy974; break; - case 622: /* case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ + case 623: /* case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ { yylhsminor.yy974 = createRawExprNodeExt(pCxt, &yymsp[-4].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy974), yymsp[-2].minor.yy946, yymsp[-1].minor.yy974)); } yymsp[-4].minor.yy974 = yylhsminor.yy974; break; - case 625: /* when_then_expr ::= WHEN common_expression THEN common_expression */ + case 626: /* when_then_expr ::= WHEN common_expression THEN common_expression */ { yymsp[-3].minor.yy974 = createWhenThenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy974), releaseRawExprNode(pCxt, yymsp[0].minor.yy974)); } break; - case 627: /* case_when_else_opt ::= ELSE common_expression */ + case 628: /* case_when_else_opt ::= ELSE common_expression */ { yymsp[-1].minor.yy974 = releaseRawExprNode(pCxt, yymsp[0].minor.yy974); } break; - case 628: /* predicate ::= expr_or_subquery compare_op expr_or_subquery */ - case 633: /* predicate ::= expr_or_subquery in_op in_predicate_value */ yytestcase(yyruleno==633); + case 629: /* predicate ::= expr_or_subquery compare_op expr_or_subquery */ + case 634: /* predicate ::= expr_or_subquery in_op in_predicate_value */ yytestcase(yyruleno==634); { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy974); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy974); @@ -7455,7 +7823,7 @@ yymsp[0].minor.yy974); } } yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 629: /* predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ + case 630: /* predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-4].minor.yy974); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy974); @@ -7463,7 +7831,7 @@ yymsp[0].minor.yy974); } } yymsp[-4].minor.yy974 = yylhsminor.yy974; break; - case 630: /* predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ + case 631: /* predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-5].minor.yy974); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy974); @@ -7471,71 +7839,71 @@ yymsp[0].minor.yy974); } } yymsp[-5].minor.yy974 = yylhsminor.yy974; break; - case 631: /* predicate ::= expr_or_subquery IS NULL */ + case 632: /* predicate ::= expr_or_subquery IS NULL */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy974); yylhsminor.yy974 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NULL, releaseRawExprNode(pCxt, yymsp[-2].minor.yy974), NULL)); } yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 632: /* predicate ::= expr_or_subquery IS NOT NULL */ + case 633: /* predicate ::= expr_or_subquery IS NOT NULL */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-3].minor.yy974); yylhsminor.yy974 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NOT_NULL, releaseRawExprNode(pCxt, yymsp[-3].minor.yy974), NULL)); } yymsp[-3].minor.yy974 = yylhsminor.yy974; break; - case 634: /* compare_op ::= NK_LT */ + case 635: /* compare_op ::= NK_LT */ { yymsp[0].minor.yy140 = OP_TYPE_LOWER_THAN; } break; - case 635: /* compare_op ::= NK_GT */ + case 636: /* compare_op ::= NK_GT */ { yymsp[0].minor.yy140 = OP_TYPE_GREATER_THAN; } break; - case 636: /* compare_op ::= NK_LE */ + case 637: /* compare_op ::= NK_LE */ { yymsp[0].minor.yy140 = OP_TYPE_LOWER_EQUAL; } break; - case 637: /* compare_op ::= NK_GE */ + case 638: /* compare_op ::= NK_GE */ { yymsp[0].minor.yy140 = OP_TYPE_GREATER_EQUAL; } break; - case 638: /* compare_op ::= NK_NE */ + case 639: /* compare_op ::= NK_NE */ { yymsp[0].minor.yy140 = OP_TYPE_NOT_EQUAL; } break; - case 639: /* compare_op ::= NK_EQ */ + case 640: /* compare_op ::= NK_EQ */ { yymsp[0].minor.yy140 = OP_TYPE_EQUAL; } break; - case 640: /* compare_op ::= LIKE */ + case 641: /* compare_op ::= LIKE */ { yymsp[0].minor.yy140 = OP_TYPE_LIKE; } break; - case 641: /* compare_op ::= NOT LIKE */ + case 642: /* compare_op ::= NOT LIKE */ { yymsp[-1].minor.yy140 = OP_TYPE_NOT_LIKE; } break; - case 642: /* compare_op ::= MATCH */ + case 643: /* compare_op ::= MATCH */ { yymsp[0].minor.yy140 = OP_TYPE_MATCH; } break; - case 643: /* compare_op ::= NMATCH */ + case 644: /* compare_op ::= NMATCH */ { yymsp[0].minor.yy140 = OP_TYPE_NMATCH; } break; - case 644: /* compare_op ::= CONTAINS */ + case 645: /* compare_op ::= CONTAINS */ { yymsp[0].minor.yy140 = OP_TYPE_JSON_CONTAINS; } break; - case 645: /* in_op ::= IN */ + case 646: /* in_op ::= IN */ { yymsp[0].minor.yy140 = OP_TYPE_IN; } break; - case 646: /* in_op ::= NOT IN */ + case 647: /* in_op ::= NOT IN */ { yymsp[-1].minor.yy140 = OP_TYPE_NOT_IN; } break; - case 647: /* in_predicate_value ::= NK_LP literal_list NK_RP */ + case 648: /* in_predicate_value ::= NK_LP literal_list NK_RP */ { yylhsminor.yy974 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createNodeListNode(pCxt, yymsp[-1].minor.yy946)); } yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 649: /* boolean_value_expression ::= NOT boolean_primary */ + case 650: /* boolean_value_expression ::= NOT boolean_primary */ { SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy974); yylhsminor.yy974 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_NOT, releaseRawExprNode(pCxt, yymsp[0].minor.yy974), NULL)); } yymsp[-1].minor.yy974 = yylhsminor.yy974; break; - case 650: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ + case 651: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy974); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy974); @@ -7543,7 +7911,7 @@ yymsp[0].minor.yy974); } } yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 651: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ + case 652: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy974); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy974); @@ -7551,33 +7919,33 @@ yymsp[0].minor.yy974); } } yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 659: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */ + case 660: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */ { yylhsminor.yy974 = createJoinTableNode(pCxt, JOIN_TYPE_INNER, JOIN_STYPE_NONE, yymsp[-2].minor.yy974, yymsp[0].minor.yy974, NULL); } yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 662: /* table_primary ::= table_name alias_opt */ + case 663: /* table_primary ::= table_name alias_opt */ { yylhsminor.yy974 = createRealTableNode(pCxt, NULL, &yymsp[-1].minor.yy557, &yymsp[0].minor.yy557); } yymsp[-1].minor.yy974 = yylhsminor.yy974; break; - case 663: /* table_primary ::= db_name NK_DOT table_name alias_opt */ + case 664: /* table_primary ::= db_name NK_DOT table_name alias_opt */ { yylhsminor.yy974 = createRealTableNode(pCxt, &yymsp[-3].minor.yy557, &yymsp[-1].minor.yy557, &yymsp[0].minor.yy557); } yymsp[-3].minor.yy974 = yylhsminor.yy974; break; - case 664: /* table_primary ::= subquery alias_opt */ + case 665: /* table_primary ::= subquery alias_opt */ { yylhsminor.yy974 = createTempTableNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy974), &yymsp[0].minor.yy557); } yymsp[-1].minor.yy974 = yylhsminor.yy974; break; - case 666: /* alias_opt ::= */ + case 667: /* alias_opt ::= */ { yymsp[1].minor.yy557 = nil_token; } break; - case 668: /* alias_opt ::= AS table_alias */ + case 669: /* alias_opt ::= AS table_alias */ { yymsp[-1].minor.yy557 = yymsp[0].minor.yy557; } break; - case 669: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */ - case 670: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==670); + case 670: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */ + case 671: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==671); { yymsp[-2].minor.yy974 = yymsp[-1].minor.yy974; } break; - case 671: /* joined_table ::= table_reference join_type join_subtype JOIN table_reference join_on_clause_opt window_offset_clause_opt jlimit_clause_opt */ + case 672: /* joined_table ::= table_reference join_type join_subtype JOIN table_reference join_on_clause_opt window_offset_clause_opt jlimit_clause_opt */ { yylhsminor.yy974 = createJoinTableNode(pCxt, yymsp[-6].minor.yy792, yymsp[-5].minor.yy744, yymsp[-7].minor.yy974, yymsp[-3].minor.yy974, yymsp[-2].minor.yy974); yylhsminor.yy974 = addWindowOffsetClause(pCxt, yylhsminor.yy974, yymsp[-1].minor.yy974); @@ -7585,47 +7953,47 @@ yymsp[0].minor.yy974); } } yymsp[-7].minor.yy974 = yylhsminor.yy974; break; - case 672: /* join_type ::= */ + case 673: /* join_type ::= */ { yymsp[1].minor.yy792 = JOIN_TYPE_INNER; } break; - case 673: /* join_type ::= INNER */ + case 674: /* join_type ::= INNER */ { yymsp[0].minor.yy792 = JOIN_TYPE_INNER; } break; - case 674: /* join_type ::= LEFT */ + case 675: /* join_type ::= LEFT */ { yymsp[0].minor.yy792 = JOIN_TYPE_LEFT; } break; - case 675: /* join_type ::= RIGHT */ + case 676: /* join_type ::= RIGHT */ { yymsp[0].minor.yy792 = JOIN_TYPE_RIGHT; } break; - case 676: /* join_type ::= FULL */ + case 677: /* join_type ::= FULL */ { yymsp[0].minor.yy792 = JOIN_TYPE_FULL; } break; - case 677: /* join_subtype ::= */ + case 678: /* join_subtype ::= */ { yymsp[1].minor.yy744 = JOIN_STYPE_NONE; } break; - case 678: /* join_subtype ::= OUTER */ + case 679: /* join_subtype ::= OUTER */ { yymsp[0].minor.yy744 = JOIN_STYPE_OUTER; } break; - case 679: /* join_subtype ::= SEMI */ + case 680: /* join_subtype ::= SEMI */ { yymsp[0].minor.yy744 = JOIN_STYPE_SEMI; } break; - case 680: /* join_subtype ::= ANTI */ + case 681: /* join_subtype ::= ANTI */ { yymsp[0].minor.yy744 = JOIN_STYPE_ANTI; } break; - case 681: /* join_subtype ::= ASOF */ + case 682: /* join_subtype ::= ASOF */ { yymsp[0].minor.yy744 = JOIN_STYPE_ASOF; } break; - case 682: /* join_subtype ::= WINDOW */ + case 683: /* join_subtype ::= WINDOW */ { yymsp[0].minor.yy744 = JOIN_STYPE_WIN; } break; - case 686: /* window_offset_clause_opt ::= WINDOW_OFFSET NK_LP window_offset_literal NK_COMMA window_offset_literal NK_RP */ + case 687: /* window_offset_clause_opt ::= WINDOW_OFFSET NK_LP window_offset_literal NK_COMMA window_offset_literal NK_RP */ { yymsp[-5].minor.yy974 = createWindowOffsetNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy974), releaseRawExprNode(pCxt, yymsp[-1].minor.yy974)); } break; - case 687: /* window_offset_literal ::= NK_VARIABLE */ + case 688: /* window_offset_literal ::= NK_VARIABLE */ { yylhsminor.yy974 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createTimeOffsetValueNode(pCxt, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 688: /* window_offset_literal ::= NK_MINUS NK_VARIABLE */ + case 689: /* window_offset_literal ::= NK_MINUS NK_VARIABLE */ { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; @@ -7633,12 +8001,12 @@ yymsp[0].minor.yy974); } } yymsp[-1].minor.yy974 = yylhsminor.yy974; break; - case 690: /* jlimit_clause_opt ::= JLIMIT NK_INTEGER */ - case 763: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */ yytestcase(yyruleno==763); - case 767: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==767); + case 691: /* jlimit_clause_opt ::= JLIMIT NK_INTEGER */ + case 764: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */ yytestcase(yyruleno==764); + case 768: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==768); { yymsp[-1].minor.yy974 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); } break; - case 691: /* query_specification ::= SELECT hint_list set_quantifier_opt tag_mode_opt select_list from_clause_opt where_clause_opt partition_by_clause_opt range_opt every_opt fill_opt twindow_clause_opt group_by_clause_opt having_clause_opt */ + case 692: /* query_specification ::= SELECT hint_list set_quantifier_opt tag_mode_opt select_list from_clause_opt where_clause_opt partition_by_clause_opt range_opt every_opt fill_opt twindow_clause_opt group_by_clause_opt having_clause_opt */ { yymsp[-13].minor.yy974 = createSelectStmt(pCxt, yymsp[-11].minor.yy569, yymsp[-9].minor.yy946, yymsp[-8].minor.yy974, yymsp[-12].minor.yy946); yymsp[-13].minor.yy974 = setSelectStmtTagMode(pCxt, yymsp[-13].minor.yy974, yymsp[-10].minor.yy569); @@ -7652,104 +8020,104 @@ yymsp[0].minor.yy974); } yymsp[-13].minor.yy974 = addFillClause(pCxt, yymsp[-13].minor.yy974, yymsp[-3].minor.yy974); } break; - case 692: /* hint_list ::= */ + case 693: /* hint_list ::= */ { yymsp[1].minor.yy946 = createHintNodeList(pCxt, NULL); } break; - case 693: /* hint_list ::= NK_HINT */ + case 694: /* hint_list ::= NK_HINT */ { yylhsminor.yy946 = createHintNodeList(pCxt, &yymsp[0].minor.yy0); } yymsp[0].minor.yy946 = yylhsminor.yy946; break; - case 698: /* set_quantifier_opt ::= ALL */ + case 699: /* set_quantifier_opt ::= ALL */ { yymsp[0].minor.yy569 = false; } break; - case 701: /* select_item ::= NK_STAR */ + case 702: /* select_item ::= NK_STAR */ { yylhsminor.yy974 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0); } yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 703: /* select_item ::= common_expression column_alias */ - case 713: /* partition_item ::= expr_or_subquery column_alias */ yytestcase(yyruleno==713); + case 704: /* select_item ::= common_expression column_alias */ + case 714: /* partition_item ::= expr_or_subquery column_alias */ yytestcase(yyruleno==714); { yylhsminor.yy974 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy974), &yymsp[0].minor.yy557); } yymsp[-1].minor.yy974 = yylhsminor.yy974; break; - case 704: /* select_item ::= common_expression AS column_alias */ - case 714: /* partition_item ::= expr_or_subquery AS column_alias */ yytestcase(yyruleno==714); + case 705: /* select_item ::= common_expression AS column_alias */ + case 715: /* partition_item ::= expr_or_subquery AS column_alias */ yytestcase(yyruleno==715); { yylhsminor.yy974 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy974), &yymsp[0].minor.yy557); } yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 709: /* partition_by_clause_opt ::= PARTITION BY partition_list */ - case 741: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==741); - case 761: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==761); + case 710: /* partition_by_clause_opt ::= PARTITION BY partition_list */ + case 742: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==742); + case 762: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==762); { yymsp[-2].minor.yy946 = yymsp[0].minor.yy946; } break; - case 716: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP */ + case 717: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP */ { yymsp[-5].minor.yy974 = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy974), releaseRawExprNode(pCxt, yymsp[-1].minor.yy974)); } break; - case 717: /* twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ + case 718: /* twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ { yymsp[-3].minor.yy974 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy974)); } break; - case 718: /* twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ + case 719: /* twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ { yymsp[-5].minor.yy974 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy974), NULL, yymsp[-1].minor.yy974, yymsp[0].minor.yy974); } break; - case 719: /* twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_COMMA interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ + case 720: /* twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_COMMA interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ { yymsp[-7].minor.yy974 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy974), releaseRawExprNode(pCxt, yymsp[-3].minor.yy974), yymsp[-1].minor.yy974, yymsp[0].minor.yy974); } break; - case 720: /* twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ + case 721: /* twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ { yymsp[-6].minor.yy974 = createEventWindowNode(pCxt, yymsp[-3].minor.yy974, yymsp[0].minor.yy974); } break; - case 721: /* twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_RP */ + case 722: /* twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_RP */ { yymsp[-3].minor.yy974 = createCountWindowNode(pCxt, &yymsp[-1].minor.yy0, &yymsp[-1].minor.yy0); } break; - case 722: /* twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ + case 723: /* twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ { yymsp[-5].minor.yy974 = createCountWindowNode(pCxt, &yymsp[-3].minor.yy0, &yymsp[-1].minor.yy0); } break; - case 723: /* twindow_clause_opt ::= ANOMALY_WINDOW NK_LP expr_or_subquery NK_RP */ + case 724: /* twindow_clause_opt ::= ANOMALY_WINDOW NK_LP expr_or_subquery NK_RP */ { yymsp[-3].minor.yy974 = createAnomalyWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy974), NULL); } break; - case 724: /* twindow_clause_opt ::= ANOMALY_WINDOW NK_LP expr_or_subquery NK_COMMA NK_STRING NK_RP */ + case 725: /* twindow_clause_opt ::= ANOMALY_WINDOW NK_LP expr_or_subquery NK_COMMA NK_STRING NK_RP */ { yymsp[-5].minor.yy974 = createAnomalyWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy974), &yymsp[-1].minor.yy0); } break; - case 731: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */ + case 732: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */ { yymsp[-3].minor.yy974 = createFillNode(pCxt, yymsp[-1].minor.yy102, NULL); } break; - case 732: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP */ + case 733: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP */ { yymsp[-5].minor.yy974 = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, yymsp[-1].minor.yy946)); } break; - case 733: /* fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP */ + case 734: /* fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP */ { yymsp[-5].minor.yy974 = createFillNode(pCxt, FILL_MODE_VALUE_F, createNodeListNode(pCxt, yymsp[-1].minor.yy946)); } break; - case 734: /* fill_mode ::= NONE */ + case 735: /* fill_mode ::= NONE */ { yymsp[0].minor.yy102 = FILL_MODE_NONE; } break; - case 735: /* fill_mode ::= PREV */ + case 736: /* fill_mode ::= PREV */ { yymsp[0].minor.yy102 = FILL_MODE_PREV; } break; - case 736: /* fill_mode ::= NULL */ + case 737: /* fill_mode ::= NULL */ { yymsp[0].minor.yy102 = FILL_MODE_NULL; } break; - case 737: /* fill_mode ::= NULL_F */ + case 738: /* fill_mode ::= NULL_F */ { yymsp[0].minor.yy102 = FILL_MODE_NULL_F; } break; - case 738: /* fill_mode ::= LINEAR */ + case 739: /* fill_mode ::= LINEAR */ { yymsp[0].minor.yy102 = FILL_MODE_LINEAR; } break; - case 739: /* fill_mode ::= NEXT */ + case 740: /* fill_mode ::= NEXT */ { yymsp[0].minor.yy102 = FILL_MODE_NEXT; } break; - case 742: /* group_by_list ::= expr_or_subquery */ + case 743: /* group_by_list ::= expr_or_subquery */ { yylhsminor.yy946 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy974))); } yymsp[0].minor.yy946 = yylhsminor.yy946; break; - case 743: /* group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ + case 744: /* group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ { yylhsminor.yy946 = addNodeToList(pCxt, yymsp[-2].minor.yy946, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy974))); } yymsp[-2].minor.yy946 = yylhsminor.yy946; break; - case 747: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ + case 748: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ { yymsp[-5].minor.yy974 = createInterpTimeRange(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy974), releaseRawExprNode(pCxt, yymsp[-1].minor.yy974)); } break; - case 748: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_RP */ + case 749: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_RP */ { yymsp[-3].minor.yy974 = createInterpTimePoint(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy974)); } break; - case 751: /* query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ + case 752: /* query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ { yylhsminor.yy974 = addOrderByClause(pCxt, yymsp[-3].minor.yy974, yymsp[-2].minor.yy946); yylhsminor.yy974 = addSlimitClause(pCxt, yylhsminor.yy974, yymsp[-1].minor.yy974); @@ -7757,49 +8125,49 @@ yymsp[0].minor.yy974); } } yymsp[-3].minor.yy974 = yylhsminor.yy974; break; - case 754: /* union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ + case 755: /* union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ { yylhsminor.yy974 = createSetOperator(pCxt, SET_OP_TYPE_UNION_ALL, yymsp[-3].minor.yy974, yymsp[0].minor.yy974); } yymsp[-3].minor.yy974 = yylhsminor.yy974; break; - case 755: /* union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ + case 756: /* union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ { yylhsminor.yy974 = createSetOperator(pCxt, SET_OP_TYPE_UNION, yymsp[-2].minor.yy974, yymsp[0].minor.yy974); } yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 764: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ - case 768: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==768); + case 765: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ + case 769: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==769); { yymsp[-3].minor.yy974 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); } break; - case 765: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - case 769: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==769); + case 766: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + case 770: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==770); { yymsp[-3].minor.yy974 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); } break; - case 770: /* subquery ::= NK_LP query_expression NK_RP */ + case 771: /* subquery ::= NK_LP query_expression NK_RP */ { yylhsminor.yy974 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy974); } yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 775: /* sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ + case 776: /* sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ { yylhsminor.yy974 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy974), yymsp[-1].minor.yy410, yymsp[0].minor.yy307); } yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 776: /* ordering_specification_opt ::= */ + case 777: /* ordering_specification_opt ::= */ { yymsp[1].minor.yy410 = ORDER_ASC; } break; - case 777: /* ordering_specification_opt ::= ASC */ + case 778: /* ordering_specification_opt ::= ASC */ { yymsp[0].minor.yy410 = ORDER_ASC; } break; - case 778: /* ordering_specification_opt ::= DESC */ + case 779: /* ordering_specification_opt ::= DESC */ { yymsp[0].minor.yy410 = ORDER_DESC; } break; - case 779: /* null_ordering_opt ::= */ + case 780: /* null_ordering_opt ::= */ { yymsp[1].minor.yy307 = NULL_ORDER_DEFAULT; } break; - case 780: /* null_ordering_opt ::= NULLS FIRST */ + case 781: /* null_ordering_opt ::= NULLS FIRST */ { yymsp[-1].minor.yy307 = NULL_ORDER_FIRST; } break; - case 781: /* null_ordering_opt ::= NULLS LAST */ + case 782: /* null_ordering_opt ::= NULLS LAST */ { yymsp[-1].minor.yy307 = NULL_ORDER_LAST; } break; - case 784: /* column_options ::= column_options NK_ID NK_STRING */ + case 785: /* column_options ::= column_options NK_ID NK_STRING */ { yylhsminor.yy974 = setColumnOptions(pCxt, yymsp[-2].minor.yy974, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy974 = yylhsminor.yy974; break; @@ -7958,12 +8326,56 @@ void Parse( } #endif - do{ + while(1){ /* Exit by "break" */ + assert( yypParser->yytos>=yypParser->yystack ); assert( yyact==yypParser->yytos->stateno ); yyact = yy_find_shift_action((YYCODETYPE)yymajor,yyact); if( yyact >= YY_MIN_REDUCE ){ - yyact = yy_reduce(yypParser,yyact-YY_MIN_REDUCE,yymajor, - yyminor ParseCTX_PARAM); + unsigned int yyruleno = yyact - YY_MIN_REDUCE; /* Reduce by this rule */ +#ifndef NDEBUG + assert( yyruleno<(int)(sizeof(yyRuleName)/sizeof(yyRuleName[0])) ); + if( yyTraceFILE ){ + int yysize = yyRuleInfoNRhs[yyruleno]; + if( yysize ){ + fprintf(yyTraceFILE, "%sReduce %d [%s]%s, pop back to state %d.\n", + yyTracePrompt, + yyruleno, yyRuleName[yyruleno], + yyrulenoyytos[yysize].stateno); + }else{ + fprintf(yyTraceFILE, "%sReduce %d [%s]%s.\n", + yyTracePrompt, yyruleno, yyRuleName[yyruleno], + yyrulenoyytos - yypParser->yystack)>yypParser->yyhwm ){ + yypParser->yyhwm++; + assert( yypParser->yyhwm == + (int)(yypParser->yytos - yypParser->yystack)); + } +#endif +#if YYSTACKDEPTH>0 + if( yypParser->yytos>=yypParser->yystackEnd ){ + yyStackOverflow(yypParser); + break; + } +#else + if( yypParser->yytos>=&yypParser->yystack[yypParser->yystksz-1] ){ + if( yyGrowStack(yypParser) ){ + yyStackOverflow(yypParser); + break; + } + } +#endif + } + yyact = yy_reduce(yypParser,yyruleno,yymajor,yyminor ParseCTX_PARAM); }else if( yyact <= YY_MAX_SHIFTREDUCE ){ yy_shift(yypParser,yyact,(YYCODETYPE)yymajor,yyminor); #ifndef YYNOERRORRECOVERY @@ -8019,14 +8431,13 @@ void Parse( yy_destructor(yypParser, (YYCODETYPE)yymajor, &yyminorunion); yymajor = YYNOCODE; }else{ - while( yypParser->yytos >= yypParser->yystack - && (yyact = yy_find_reduce_action( - yypParser->yytos->stateno, - YYERRORSYMBOL)) > YY_MAX_SHIFTREDUCE - ){ + while( yypParser->yytos > yypParser->yystack ){ + yyact = yy_find_reduce_action(yypParser->yytos->stateno, + YYERRORSYMBOL); + if( yyact<=YY_MAX_SHIFTREDUCE ) break; yy_pop_parser_stack(yypParser); } - if( yypParser->yytos < yypParser->yystack || yymajor==0 ){ + if( yypParser->yytos <= yypParser->yystack || yymajor==0 ){ yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion); yy_parse_failed(yypParser); #ifndef YYNOERRORRECOVERY @@ -8076,7 +8487,7 @@ void Parse( break; #endif } - }while( yypParser->yytos>yypParser->yystack ); + } #ifndef NDEBUG if( yyTraceFILE ){ yyStackEntry *i; From a72c49495bacb85492f0b4c492d13b673462cd10 Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Tue, 5 Nov 2024 16:14:55 +0800 Subject: [PATCH 02/55] more code --- include/common/tmsg.h | 11 +++ include/common/tmsgdef.h | 1 + source/common/src/tmsg.c | 103 +++++++++++++++++++++++++ source/libs/parser/src/parTranslater.c | 64 +++++++++++---- 4 files changed, 164 insertions(+), 15 deletions(-) diff --git a/include/common/tmsg.h b/include/common/tmsg.h index 7f6bd3ba87..b07678d24e 100644 --- a/include/common/tmsg.h +++ b/include/common/tmsg.h @@ -1623,6 +1623,17 @@ typedef struct { int32_t tSerializeSCompactDbRsp(void* buf, int32_t bufLen, SCompactDbRsp* pRsp); int32_t tDeserializeSCompactDbRsp(void* buf, int32_t bufLen, SCompactDbRsp* pRsp); +typedef struct { + SArray* vgroupIds; + STimeWindow timeRange; + int32_t sqlLen; + char* sql; +} SCompactVgroupsReq; + +int32_t tSerializeSCompactVgroupsReq(void* buf, int32_t bufLen, SCompactVgroupsReq* pReq); +int32_t tDeserializeSCompactVgroupsReq(void* buf, int32_t bufLen, SCompactVgroupsReq* pReq); +void tFreeSCompactVgroupsReq(SCompactVgroupsReq* pReq); + typedef struct { int32_t compactId; int32_t sqlLen; diff --git a/include/common/tmsgdef.h b/include/common/tmsgdef.h index 2c797e39bf..ce72757e18 100644 --- a/include/common/tmsgdef.h +++ b/include/common/tmsgdef.h @@ -259,6 +259,7 @@ TD_DEF_MSG_TYPE(TDMT_MND_STREAM_DROP_ORPHANTASKS, "stream-drop-orphan-tasks", NULL, NULL) TD_DEF_MSG_TYPE(TDMT_MND_STREAM_TASK_RESET, "stream-reset-tasks", NULL, NULL) TD_DEF_MSG_TYPE(TDMT_MND_UPDATE_DNODE_INFO, "update-dnode-info", NULL, NULL) + TD_DEF_MSG_TYPE(TDMT_MND_COMPACT_VGROUPS, "compact-vgroups", NULL, NULL) TD_CLOSE_MSG_SEG(TDMT_END_MND_MSG) TD_NEW_MSG_SEG(TDMT_VND_MSG) // 2<<8 diff --git a/source/common/src/tmsg.c b/source/common/src/tmsg.c index 9b54da2c30..8196d6fa30 100644 --- a/source/common/src/tmsg.c +++ b/source/common/src/tmsg.c @@ -4530,6 +4530,109 @@ _exit: return code; } +int32_t tSerializeSCompactVgroupsReq(void *buf, int32_t bufLen, SCompactVgroupsReq *pReq) { + int32_t code = TSDB_CODE_SUCCESS; + SEncoder encoder = {0}; + int32_t lino; + int32_t tlen; + + tEncoderInit(&encoder, buf, bufLen); + + code = tStartEncode(&encoder); + TSDB_CHECK_CODE(code, lino, _exit); + + // encode vgid list + code = tEncodeI32(&encoder, taosArrayGetSize(pReq->vgroupIds)); + TSDB_CHECK_CODE(code, lino, _exit); + + for (int32_t i = 0; i < taosArrayGetSize(pReq->vgroupIds); ++i) { + int32_t vgid = *(int32_t *)taosArrayGet(pReq->vgroupIds, i); + code = tEncodeI32(&encoder, vgid); + TSDB_CHECK_CODE(code, lino, _exit); + } + + // encode time range + code = tEncodeI64(&encoder, pReq->timeRange.skey); + TSDB_CHECK_CODE(code, lino, _exit); + + code = tEncodeI64(&encoder, pReq->timeRange.ekey); + TSDB_CHECK_CODE(code, lino, _exit); + + // encode sql + ENCODESQL(); + + tEndEncode(&encoder); + +_exit: + if (code) { + tlen = code; + } else { + tlen = encoder.pos; + } + tEncoderClear(&encoder); + return tlen; +} + +int32_t tDeserializeSCompactVgroupsReq(void *buf, int32_t bufLen, SCompactVgroupsReq *pReq) { + int32_t code = TSDB_CODE_SUCCESS; + int32_t lino; + SDecoder decoder = {0}; + + tDecoderInit(&decoder, buf, bufLen); + + code = tStartDecode(&decoder); + TSDB_CHECK_CODE(code, lino, _exit); + + // decode vgid list + int32_t vgidNum = 0; + code = tDecodeI32(&decoder, &vgidNum); + TSDB_CHECK_CODE(code, lino, _exit); + + pReq->vgroupIds = taosArrayInit(vgidNum, sizeof(int32_t)); + if (NULL == pReq->vgroupIds) { + TSDB_CHECK_CODE(code = terrno, lino, _exit); + } + + for (int32_t i = 0; i < vgidNum; ++i) { + int32_t vgid; + + code = tDecodeI32(&decoder, &vgid); + TSDB_CHECK_CODE(code, lino, _exit); + + if (taosArrayPush(pReq->vgroupIds, &vgid) == NULL) { + TSDB_CHECK_CODE(code = terrno, lino, _exit); + } + } + + // decode time range + code = tDecodeI64(&decoder, &pReq->timeRange.skey); + TSDB_CHECK_CODE(code, lino, _exit); + + code = tDecodeI64(&decoder, &pReq->timeRange.ekey); + TSDB_CHECK_CODE(code, lino, _exit); + + // decode sql + DECODESQL(); + + tEndDecode(&decoder); + +_exit: + tDecoderClear(&decoder); + if (code) { + tFreeSCompactVgroupsReq(pReq); + } + return code; +} + +void tFreeSCompactVgroupsReq(SCompactVgroupsReq *pReq) { + if (pReq->vgroupIds) { + taosArrayDestroy(pReq->vgroupIds); + pReq->vgroupIds = NULL; + } + + FREESQL(); +} + int32_t tSerializeSKillCompactReq(void *buf, int32_t bufLen, SKillCompactReq *pReq) { SEncoder encoder = {0}; int32_t code = 0; diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c index 5c9202298d..627c4a45e2 100755 --- a/source/libs/parser/src/parTranslater.c +++ b/source/libs/parser/src/parTranslater.c @@ -10396,27 +10396,28 @@ static int32_t translateDescribe(STranslateContext* pCxt, SDescribeStmt* pStmt) return code; } -static int32_t translateCompactRange(STranslateContext* pCxt, SCompactDatabaseStmt* pStmt, SCompactDbReq* pReq) { +static int32_t translateCompactRange(STranslateContext* pCxt, const char* dbName, SNode* pStart, SNode* pEnd, + STimeWindow* timeRange) { SDbCfgInfo dbCfg = {0}; - int32_t code = getDBCfg(pCxt, pStmt->dbName, &dbCfg); - if (TSDB_CODE_SUCCESS == code && NULL != pStmt->pStart) { - ((SValueNode*)pStmt->pStart)->node.resType.precision = dbCfg.precision; - ((SValueNode*)pStmt->pStart)->node.resType.type = TSDB_DATA_TYPE_TIMESTAMP; - code = doTranslateValue(pCxt, (SValueNode*)pStmt->pStart); + int32_t code = getDBCfg(pCxt, dbName, &dbCfg); + if (TSDB_CODE_SUCCESS == code && NULL != pStart) { + ((SValueNode*)pStart)->node.resType.precision = dbCfg.precision; + ((SValueNode*)pStart)->node.resType.type = TSDB_DATA_TYPE_TIMESTAMP; + code = doTranslateValue(pCxt, (SValueNode*)pStart); } - if (TSDB_CODE_SUCCESS == code && NULL != pStmt->pEnd) { - ((SValueNode*)pStmt->pEnd)->node.resType.precision = dbCfg.precision; - ((SValueNode*)pStmt->pEnd)->node.resType.type = TSDB_DATA_TYPE_TIMESTAMP; - code = doTranslateValue(pCxt, (SValueNode*)pStmt->pEnd); + if (TSDB_CODE_SUCCESS == code && NULL != pEnd) { + ((SValueNode*)pEnd)->node.resType.precision = dbCfg.precision; + ((SValueNode*)pEnd)->node.resType.type = TSDB_DATA_TYPE_TIMESTAMP; + code = doTranslateValue(pCxt, (SValueNode*)pEnd); } if (TSDB_CODE_SUCCESS == code) { - pReq->timeRange.skey = NULL != pStmt->pStart ? ((SValueNode*)pStmt->pStart)->datum.i : INT64_MIN; - pReq->timeRange.ekey = NULL != pStmt->pEnd ? ((SValueNode*)pStmt->pEnd)->datum.i : INT64_MAX; + timeRange->skey = NULL != pStart ? ((SValueNode*)pStart)->datum.i : INT64_MIN; + timeRange->ekey = NULL != pEnd ? ((SValueNode*)pEnd)->datum.i : INT64_MAX; } return code; } -static int32_t translateCompact(STranslateContext* pCxt, SCompactDatabaseStmt* pStmt) { +static int32_t translateCompactDb(STranslateContext* pCxt, SCompactDatabaseStmt* pStmt) { SCompactDbReq compactReq = {0}; SName name; int32_t code = TSDB_CODE_SUCCESS; @@ -10424,7 +10425,7 @@ static int32_t translateCompact(STranslateContext* pCxt, SCompactDatabaseStmt* p if (TSDB_CODE_SUCCESS != code) return code; (void)tNameGetFullDbName(&name, compactReq.db); - code = translateCompactRange(pCxt, pStmt, &compactReq); + code = translateCompactRange(pCxt, pStmt->dbName, pStmt->pStart, pStmt->pEnd, &compactReq.timeRange); if (TSDB_CODE_SUCCESS == code) { code = buildCmdMsg(pCxt, TDMT_MND_COMPACT_DB, (FSerializeFunc)tSerializeSCompactDbReq, &compactReq); } @@ -10432,6 +10433,35 @@ static int32_t translateCompact(STranslateContext* pCxt, SCompactDatabaseStmt* p return code; } +static int32_t translateVgroupList(STranslateContext* pCxt, SNodeList* vgroupList, SArray** ppVgroups) { + int32_t code = TSDB_CODE_SUCCESS; + + // TODO + ASSERT(0); + + return code; +} + +static int32_t translateCompactVgroups(STranslateContext* pCxt, SCompactVgroupsStmt* pStmt) { + int32_t code = TSDB_CODE_SUCCESS; + SCompactVgroupsReq req = {0}; + + if (TSDB_CODE_SUCCESS == code) { + code = translateVgroupList(pCxt, pStmt->vgidList, &req.vgroupIds); + } + + if (TSDB_CODE_SUCCESS == code) { + code = translateCompactRange(pCxt, NULL /* TODO */, pStmt->pStart, pStmt->pEnd, &req.timeRange); + } + + if (TSDB_CODE_SUCCESS == code) { + code = buildCmdMsg(pCxt, TDMT_MND_COMPACT_VGROUPS, (FSerializeFunc)tSerializeSCompactVgroupsReq, &req); + } + + tFreeSCompactVgroupsReq(&req); + return code; +} + static int32_t translateKillConnection(STranslateContext* pCxt, SKillStmt* pStmt) { SKillConnReq killReq = {0}; killReq.connId = pStmt->targetId; @@ -12720,8 +12750,10 @@ static int32_t translateQuery(STranslateContext* pCxt, SNode* pNode) { code = translateDescribe(pCxt, (SDescribeStmt*)pNode); break; case QUERY_NODE_COMPACT_DATABASE_STMT: - code = translateCompact(pCxt, (SCompactDatabaseStmt*)pNode); + code = translateCompactDb(pCxt, (SCompactDatabaseStmt*)pNode); break; + case QUERY_NODE_COMPACT_VGROUPS_STMT: + code = translateCompactVgroups(pCxt, (SCompactVgroupsStmt*)pNode); case QUERY_NODE_ALTER_CLUSTER_STMT: code = translateAlterCluster(pCxt, (SAlterClusterStmt*)pNode); break; @@ -13039,6 +13071,7 @@ int32_t extractResultSchema(const SNode* pRoot, int32_t* numOfCols, SSchema** pS case QUERY_NODE_SHOW_VARIABLES_STMT: return extractShowVariablesResultSchema(numOfCols, pSchema); case QUERY_NODE_COMPACT_DATABASE_STMT: + case QUERY_NODE_COMPACT_VGROUPS_STMT: return extractCompactDbResultSchema(numOfCols, pSchema); default: break; @@ -16222,6 +16255,7 @@ static int32_t setQuery(STranslateContext* pCxt, SQuery* pQuery) { break; case QUERY_NODE_SHOW_VARIABLES_STMT: case QUERY_NODE_COMPACT_DATABASE_STMT: + case QUERY_NODE_COMPACT_VGROUPS_STMT: pQuery->haveResultSet = true; pQuery->execMode = QUERY_EXEC_MODE_RPC; if (NULL != pCxt->pCmdMsg) { From a16fcc5dea44d039b5c38b17b43753680ee3ea99 Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Tue, 5 Nov 2024 17:48:26 +0800 Subject: [PATCH 03/55] more code --- source/common/src/tmsg.c | 10 +++++----- source/libs/parser/src/parAstCreater.c | 3 ++- source/libs/parser/src/parAstParser.c | 1 - source/libs/parser/src/parTranslater.c | 27 ++++++++++++++++++++++++-- 4 files changed, 32 insertions(+), 9 deletions(-) diff --git a/source/common/src/tmsg.c b/source/common/src/tmsg.c index 8196d6fa30..72228be2eb 100644 --- a/source/common/src/tmsg.c +++ b/source/common/src/tmsg.c @@ -4546,8 +4546,8 @@ int32_t tSerializeSCompactVgroupsReq(void *buf, int32_t bufLen, SCompactVgroupsR TSDB_CHECK_CODE(code, lino, _exit); for (int32_t i = 0; i < taosArrayGetSize(pReq->vgroupIds); ++i) { - int32_t vgid = *(int32_t *)taosArrayGet(pReq->vgroupIds, i); - code = tEncodeI32(&encoder, vgid); + int64_t vgid = *(int64_t *)taosArrayGet(pReq->vgroupIds, i); + code = tEncodeI64v(&encoder, vgid); TSDB_CHECK_CODE(code, lino, _exit); } @@ -4588,15 +4588,15 @@ int32_t tDeserializeSCompactVgroupsReq(void *buf, int32_t bufLen, SCompactVgroup code = tDecodeI32(&decoder, &vgidNum); TSDB_CHECK_CODE(code, lino, _exit); - pReq->vgroupIds = taosArrayInit(vgidNum, sizeof(int32_t)); + pReq->vgroupIds = taosArrayInit(vgidNum, sizeof(int64_t)); if (NULL == pReq->vgroupIds) { TSDB_CHECK_CODE(code = terrno, lino, _exit); } for (int32_t i = 0; i < vgidNum; ++i) { - int32_t vgid; + int64_t vgid; - code = tDecodeI32(&decoder, &vgid); + code = tDecodeI64v(&decoder, &vgid); TSDB_CHECK_CODE(code, lino, _exit); if (taosArrayPush(pReq->vgroupIds, &vgid) == NULL) { diff --git a/source/libs/parser/src/parAstCreater.c b/source/libs/parser/src/parAstCreater.c index 0cf03b7c84..7ebb1f540e 100644 --- a/source/libs/parser/src/parAstCreater.c +++ b/source/libs/parser/src/parAstCreater.c @@ -1976,7 +1976,7 @@ static SNode* setDatabaseOptionImpl(SAstCreateContext* pCxt, SNode* pOptions, ED case DB_OPTION_S3_COMPACT: pDbOptions->s3Compact = taosStr2Int8(((SToken*)pVal)->z, NULL, 10); break; - case DB_OPTION_KEEP_TIME_OFFSET: + case DB_OPTION_KEEP_TIME_OFFSET: pDbOptions->keepTimeOffset = taosStr2Int32(((SToken*)pVal)->z, NULL, 10); break; case DB_OPTION_ENCRYPT_ALGORITHM: @@ -2117,6 +2117,7 @@ _err: SNode* createCompactVgroupsStmt(SAstCreateContext* pCxt, SNodeList* vgidList, SNode* pStart, SNode* pEnd) { CHECK_PARSER_STATUS(pCxt); + CHECK_NAME(checkDbName(pCxt, NULL, true)); SCompactVgroupsStmt* pStmt = NULL; pCxt->errCode = nodesMakeNode(QUERY_NODE_COMPACT_VGROUPS_STMT, (SNode**)&pStmt); CHECK_MAKE_NODE(pStmt); diff --git a/source/libs/parser/src/parAstParser.c b/source/libs/parser/src/parAstParser.c index 944363431a..0bc7d666c0 100644 --- a/source/libs/parser/src/parAstParser.c +++ b/source/libs/parser/src/parAstParser.c @@ -860,7 +860,6 @@ static int32_t collectMetaKeyFromCompactDatabase(SCollectMetaKeyCxt* pCxt, SComp static int32_t collectMetaKeyFromCompactVgroups(SCollectMetaKeyCxt* pCxt, SCompactVgroupsStmt* pStmt) { // TODO - ASSERT(0); return 0; // return reserveDbCfgInCache(pCxt->pParseCxt->acctId, pStmt->dbName, pCxt->pMetaCache); } diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c index 627c4a45e2..ec1e5fed48 100755 --- a/source/libs/parser/src/parTranslater.c +++ b/source/libs/parser/src/parTranslater.c @@ -10436,9 +10436,32 @@ static int32_t translateCompactDb(STranslateContext* pCxt, SCompactDatabaseStmt* static int32_t translateVgroupList(STranslateContext* pCxt, SNodeList* vgroupList, SArray** ppVgroups) { int32_t code = TSDB_CODE_SUCCESS; - // TODO - ASSERT(0); + int32_t numOfVgroups = LIST_LENGTH(vgroupList); + (*ppVgroups) = taosArrayInit(numOfVgroups, sizeof(int64_t)); + if (NULL == *ppVgroups) { + return terrno; + } + + SNode* pNode = NULL; + FOREACH(pNode, vgroupList) { + SValueNode* pVal = (SValueNode*)pNode; + if (DEAL_RES_ERROR == translateValue(pCxt, pVal)) { + code = TSDB_CODE_VND_INVALID_VGROUP_ID; + break; + } + + int64_t vgroupId = getBigintFromValueNode(pVal); + if (NULL == taosArrayPush(*ppVgroups, &vgroupId)) { + code = terrno; + break; + } + } + + if (code) { + taosArrayDestroy(*ppVgroups); + *ppVgroups = NULL; + } return code; } From 318ac32ca2e00ef3c69a9eecb40c8457cada9fe6 Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Thu, 7 Nov 2024 15:43:54 +0800 Subject: [PATCH 04/55] more code --- include/libs/nodes/cmdnodes.h | 1 + source/libs/nodes/src/nodesUtilFuncs.c | 1 + source/libs/parser/inc/parAst.h | 3 ++- source/libs/parser/inc/sql.y | 2 +- source/libs/parser/src/parAstCreater.c | 10 ++++++++-- source/libs/parser/src/parTranslater.c | 3 ++- 6 files changed, 15 insertions(+), 5 deletions(-) diff --git a/include/libs/nodes/cmdnodes.h b/include/libs/nodes/cmdnodes.h index cf76645abc..f261db4916 100644 --- a/include/libs/nodes/cmdnodes.h +++ b/include/libs/nodes/cmdnodes.h @@ -160,6 +160,7 @@ typedef struct SCompactDatabaseStmt { typedef struct SCompactVgroupsStmt { ENodeType type; + SNode* pDbName; SNodeList* vgidList; SNode* pStart; SNode* pEnd; diff --git a/source/libs/nodes/src/nodesUtilFuncs.c b/source/libs/nodes/src/nodesUtilFuncs.c index 69a9d19933..ad5284c484 100644 --- a/source/libs/nodes/src/nodesUtilFuncs.c +++ b/source/libs/nodes/src/nodesUtilFuncs.c @@ -1245,6 +1245,7 @@ void nodesDestroyNode(SNode* pNode) { } case QUERY_NODE_COMPACT_VGROUPS_STMT: { SCompactVgroupsStmt* pStmt = (SCompactVgroupsStmt*)pNode; + nodesDestroyNode(pStmt->pDbName); nodesDestroyList(pStmt->vgidList); nodesDestroyNode(pStmt->pStart); nodesDestroyNode(pStmt->pEnd); diff --git a/source/libs/parser/inc/parAst.h b/source/libs/parser/inc/parAst.h index 943a0c7675..87efeb878b 100644 --- a/source/libs/parser/inc/parAst.h +++ b/source/libs/parser/inc/parAst.h @@ -198,7 +198,8 @@ SNode* createFlushDatabaseStmt(SAstCreateContext* pCxt, SToken* pDbName); SNode* createTrimDatabaseStmt(SAstCreateContext* pCxt, SToken* pDbName, int32_t maxSpeed); SNode* createS3MigrateDatabaseStmt(SAstCreateContext* pCxt, SToken* pDbName); SNode* createCompactStmt(SAstCreateContext* pCxt, SToken* pDbName, SNode* pStart, SNode* pEnd); -SNode* createCompactVgroupsStmt(SAstCreateContext* pCxt, SNodeList* vgidList, SNode* pStart, SNode* pEnd); +SNode* createCompactVgroupsStmt(SAstCreateContext* pCxt, SNode* pDbName, SNodeList* vgidList, SNode* pStart, + SNode* pEnd); SNode* createDefaultTableOptions(SAstCreateContext* pCxt); SNode* createAlterTableOptions(SAstCreateContext* pCxt); SNode* setTableOption(SAstCreateContext* pCxt, SNode* pOptions, ETableOptionType type, void* pVal); diff --git a/source/libs/parser/inc/sql.y b/source/libs/parser/inc/sql.y index 5f65b9b06c..0c4cc3f605 100644 --- a/source/libs/parser/inc/sql.y +++ b/source/libs/parser/inc/sql.y @@ -229,7 +229,7 @@ cmd ::= FLUSH DATABASE db_name(A). cmd ::= TRIM DATABASE db_name(A) speed_opt(B). { pCxt->pRootNode = createTrimDatabaseStmt(pCxt, &A, B); } cmd ::= S3MIGRATE DATABASE db_name(A). { pCxt->pRootNode = createS3MigrateDatabaseStmt(pCxt, &A); } cmd ::= COMPACT DATABASE db_name(A) start_opt(B) end_opt(C). { pCxt->pRootNode = createCompactStmt(pCxt, &A, B, C); } -cmd ::= COMPACT VGROUPS IN NK_LP integer_list(A) NK_RP start_opt(B) end_opt(C). { pCxt->pRootNode = createCompactVgroupsStmt(pCxt, A, B, C); } +cmd ::= COMPACT db_name_cond_opt(A) VGROUPS IN NK_LP integer_list(B) NK_RP start_opt(C) end_opt(D). { pCxt->pRootNode = createCompactVgroupsStmt(pCxt, A, B, C, D); } %type not_exists_opt { bool } %destructor not_exists_opt { } diff --git a/source/libs/parser/src/parAstCreater.c b/source/libs/parser/src/parAstCreater.c index 8c33964594..e0f88442ed 100644 --- a/source/libs/parser/src/parAstCreater.c +++ b/source/libs/parser/src/parAstCreater.c @@ -2115,12 +2115,18 @@ _err: return NULL; } -SNode* createCompactVgroupsStmt(SAstCreateContext* pCxt, SNodeList* vgidList, SNode* pStart, SNode* pEnd) { +SNode* createCompactVgroupsStmt(SAstCreateContext* pCxt, SNode* pDbName, SNodeList* vgidList, SNode* pStart, + SNode* pEnd) { CHECK_PARSER_STATUS(pCxt); - CHECK_NAME(checkDbName(pCxt, NULL, true)); + if (NULL == pDbName) { + snprintf(pCxt->pQueryCxt->pMsg, pCxt->pQueryCxt->msgLen, "database not specified"); + pCxt->errCode = TSDB_CODE_PAR_DB_NOT_SPECIFIED; + CHECK_PARSER_STATUS(pCxt); + } SCompactVgroupsStmt* pStmt = NULL; pCxt->errCode = nodesMakeNode(QUERY_NODE_COMPACT_VGROUPS_STMT, (SNode**)&pStmt); CHECK_MAKE_NODE(pStmt); + pStmt->pDbName = pDbName; pStmt->vgidList = vgidList; pStmt->pStart = pStart; pStmt->pEnd = pEnd; diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c index 76851c4884..83dea08398 100755 --- a/source/libs/parser/src/parTranslater.c +++ b/source/libs/parser/src/parTranslater.c @@ -10489,7 +10489,8 @@ static int32_t translateCompactVgroups(STranslateContext* pCxt, SCompactVgroupsS } if (TSDB_CODE_SUCCESS == code) { - code = translateCompactRange(pCxt, NULL /* TODO */, pStmt->pStart, pStmt->pEnd, &req.timeRange); + code = + translateCompactRange(pCxt, ((SValueNode*)pStmt->pDbName)->literal, pStmt->pStart, pStmt->pEnd, &req.timeRange); } if (TSDB_CODE_SUCCESS == code) { From 0f1692b63f2802fbd6fe772942f3a599110b17aa Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Thu, 7 Nov 2024 16:35:01 +0800 Subject: [PATCH 05/55] more code --- source/client/src/clientMsgHandler.c | 1 + source/dnode/mgmt/mgmt_mnode/src/mmHandle.c | 1 + source/dnode/mnode/impl/inc/mndDb.h | 1 + source/dnode/mnode/impl/src/mndCluster.c | 2 +- source/dnode/mnode/impl/src/mndDb.c | 2 ++ source/libs/parser/src/parAstParser.c | 4 +--- source/libs/parser/src/parTranslater.c | 4 ++++ 7 files changed, 11 insertions(+), 4 deletions(-) diff --git a/source/client/src/clientMsgHandler.c b/source/client/src/clientMsgHandler.c index 9a723218ff..b4c535499f 100644 --- a/source/client/src/clientMsgHandler.c +++ b/source/client/src/clientMsgHandler.c @@ -845,6 +845,7 @@ __async_send_cb_fn_t getMsgRspHandle(int32_t msgType) { case TDMT_MND_SHOW_VARIABLES: return processShowVariablesRsp; case TDMT_MND_COMPACT_DB: + case TDMT_MND_COMPACT_VGROUPS: return processCompactDbRsp; default: return genericRspCallback; diff --git a/source/dnode/mgmt/mgmt_mnode/src/mmHandle.c b/source/dnode/mgmt/mgmt_mnode/src/mmHandle.c index 0d804eadf0..f79866f099 100644 --- a/source/dnode/mgmt/mgmt_mnode/src/mmHandle.c +++ b/source/dnode/mgmt/mgmt_mnode/src/mmHandle.c @@ -149,6 +149,7 @@ SArray *mmGetMsgHandles() { if (dmSetMgmtHandle(pArray, TDMT_MND_USE_DB, mmPutMsgToReadQueue, 0) == NULL) goto _OVER; if (dmSetMgmtHandle(pArray, TDMT_MND_ALTER_DB, mmPutMsgToWriteQueue, 0) == NULL) goto _OVER; if (dmSetMgmtHandle(pArray, TDMT_MND_COMPACT_DB, mmPutMsgToWriteQueue, 0) == NULL) goto _OVER; + if (dmSetMgmtHandle(pArray, TDMT_MND_COMPACT_VGROUPS, mmPutMsgToWriteQueue, 0) == NULL) goto _OVER; if (dmSetMgmtHandle(pArray, TDMT_MND_TRIM_DB, mmPutMsgToWriteQueue, 0) == NULL) goto _OVER; if (dmSetMgmtHandle(pArray, TDMT_MND_S3MIGRATE_DB, mmPutMsgToWriteQueue, 0) == NULL) goto _OVER; if (dmSetMgmtHandle(pArray, TDMT_MND_GET_DB_CFG, mmPutMsgToReadQueue, 0) == NULL) goto _OVER; diff --git a/source/dnode/mnode/impl/inc/mndDb.h b/source/dnode/mnode/impl/inc/mndDb.h index fdb6b5a80b..8e6d93f449 100644 --- a/source/dnode/mnode/impl/inc/mndDb.h +++ b/source/dnode/mnode/impl/inc/mndDb.h @@ -37,6 +37,7 @@ const char *mndGetDbStr(const char *src); const char *mndGetStableStr(const char *src); int32_t mndProcessCompactDbReq(SRpcMsg *pReq); +int32_t mndProcessCompactVgroupsReq(SRpcMsg *pReq); int32_t mndCheckDbDnodeList(SMnode *pMnode, char *db, char *dnodeListStr, SArray *dnodeList); #ifdef __cplusplus diff --git a/source/dnode/mnode/impl/src/mndCluster.c b/source/dnode/mnode/impl/src/mndCluster.c index 3779bea564..50bba755c9 100644 --- a/source/dnode/mnode/impl/src/mndCluster.c +++ b/source/dnode/mnode/impl/src/mndCluster.c @@ -457,7 +457,7 @@ int32_t mndProcessConfigClusterReq(SRpcMsg *pReq) { _exit: tFreeSMCfgClusterReq(&cfgReq); if (code != 0) { - mError("cluster: failed to config:%s %s since %s", cfgReq.config, cfgReq.value, terrstr()); + mError("cluster: failed to config:%s %s since %s", cfgReq.config, cfgReq.value, tstrerror(code)); } else { mInfo("cluster: success to config:%s %s", cfgReq.config, cfgReq.value); } diff --git a/source/dnode/mnode/impl/src/mndDb.c b/source/dnode/mnode/impl/src/mndDb.c index 0d17ccd0b0..76b1f1d1d8 100644 --- a/source/dnode/mnode/impl/src/mndDb.c +++ b/source/dnode/mnode/impl/src/mndDb.c @@ -57,6 +57,7 @@ static int32_t mndProcessGetDbCfgReq(SRpcMsg *pReq); #ifndef TD_ENTERPRISE int32_t mndProcessCompactDbReq(SRpcMsg *pReq) { return TSDB_CODE_OPS_NOT_SUPPORT; } +int32_t mndProcessCompactVgroupsReq(SRpcMsg *pReq) { return TSDB_CODE_OPS_NOT_SUPPORT; } #endif int32_t mndInitDb(SMnode *pMnode) { @@ -76,6 +77,7 @@ int32_t mndInitDb(SMnode *pMnode) { mndSetMsgHandle(pMnode, TDMT_MND_DROP_DB, mndProcessDropDbReq); mndSetMsgHandle(pMnode, TDMT_MND_USE_DB, mndProcessUseDbReq); mndSetMsgHandle(pMnode, TDMT_MND_COMPACT_DB, mndProcessCompactDbReq); + mndSetMsgHandle(pMnode, TDMT_MND_COMPACT_VGROUPS, mndProcessCompactVgroupsReq); mndSetMsgHandle(pMnode, TDMT_MND_TRIM_DB, mndProcessTrimDbReq); mndSetMsgHandle(pMnode, TDMT_MND_GET_DB_CFG, mndProcessGetDbCfgReq); mndSetMsgHandle(pMnode, TDMT_MND_S3MIGRATE_DB, mndProcessS3MigrateDbReq); diff --git a/source/libs/parser/src/parAstParser.c b/source/libs/parser/src/parAstParser.c index 0bc7d666c0..dde5e0edd4 100644 --- a/source/libs/parser/src/parAstParser.c +++ b/source/libs/parser/src/parAstParser.c @@ -859,9 +859,7 @@ static int32_t collectMetaKeyFromCompactDatabase(SCollectMetaKeyCxt* pCxt, SComp } static int32_t collectMetaKeyFromCompactVgroups(SCollectMetaKeyCxt* pCxt, SCompactVgroupsStmt* pStmt) { - // TODO - return 0; - // return reserveDbCfgInCache(pCxt->pParseCxt->acctId, pStmt->dbName, pCxt->pMetaCache); + return reserveDbCfgInCache(pCxt->pParseCxt->acctId, ((SValueNode*)pStmt->pDbName)->literal, pCxt->pMetaCache); } static int32_t collectMetaKeyFromGrant(SCollectMetaKeyCxt* pCxt, SGrantStmt* pStmt) { diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c index 83dea08398..af44b6bd4d 100755 --- a/source/libs/parser/src/parTranslater.c +++ b/source/libs/parser/src/parTranslater.c @@ -8080,6 +8080,10 @@ static int32_t fillCmdSql(STranslateContext* pCxt, int16_t msgType, void* pReq) FILL_CMD_SQL(sql, sqlLen, pCmdReq, SCompactDbReq, pReq); break; } + case TDMT_MND_COMPACT_VGROUPS: { + FILL_CMD_SQL(sql, sqlLen, pCmdReq, SCompactVgroupsReq, pReq); + break; + } case TDMT_MND_TMQ_DROP_TOPIC: { FILL_CMD_SQL(sql, sqlLen, pCmdReq, SMDropTopicReq, pReq); From 173528f747319b93b1bc9d5c1a1b5f869c268303 Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Thu, 7 Nov 2024 18:42:29 +0800 Subject: [PATCH 06/55] fix code --- source/libs/parser/src/parTranslater.c | 1 + 1 file changed, 1 insertion(+) diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c index af44b6bd4d..ddedef6e8a 100755 --- a/source/libs/parser/src/parTranslater.c +++ b/source/libs/parser/src/parTranslater.c @@ -12939,6 +12939,7 @@ static int32_t translateQuery(STranslateContext* pCxt, SNode* pNode) { break; case QUERY_NODE_COMPACT_VGROUPS_STMT: code = translateCompactVgroups(pCxt, (SCompactVgroupsStmt*)pNode); + break; case QUERY_NODE_ALTER_CLUSTER_STMT: code = translateAlterCluster(pCxt, (SAlterClusterStmt*)pNode); break; From f3de4bb2d899b487dac2e4466d0473df25b1dd56 Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Fri, 8 Nov 2024 11:13:37 +0800 Subject: [PATCH 07/55] more code --- include/common/tmsg.h | 12 +- include/common/tmsgdef.h | 1 - source/client/src/clientMsgHandler.c | 3 +- source/common/src/tmsg.c | 140 +++++--------------- source/dnode/mgmt/mgmt_mnode/src/mmHandle.c | 1 - source/dnode/mnode/impl/inc/mndDb.h | 1 - source/dnode/mnode/impl/src/mndDb.c | 2 - source/libs/parser/src/parTranslater.c | 21 +-- 8 files changed, 50 insertions(+), 131 deletions(-) diff --git a/include/common/tmsg.h b/include/common/tmsg.h index 36ce39fa7a..3a74ef2395 100644 --- a/include/common/tmsg.h +++ b/include/common/tmsg.h @@ -1613,6 +1613,7 @@ typedef struct { STimeWindow timeRange; int32_t sqlLen; char* sql; + SArray* vgroupIds; } SCompactDbReq; int32_t tSerializeSCompactDbReq(void* buf, int32_t bufLen, SCompactDbReq* pReq); @@ -1627,17 +1628,6 @@ typedef struct { int32_t tSerializeSCompactDbRsp(void* buf, int32_t bufLen, SCompactDbRsp* pRsp); int32_t tDeserializeSCompactDbRsp(void* buf, int32_t bufLen, SCompactDbRsp* pRsp); -typedef struct { - SArray* vgroupIds; - STimeWindow timeRange; - int32_t sqlLen; - char* sql; -} SCompactVgroupsReq; - -int32_t tSerializeSCompactVgroupsReq(void* buf, int32_t bufLen, SCompactVgroupsReq* pReq); -int32_t tDeserializeSCompactVgroupsReq(void* buf, int32_t bufLen, SCompactVgroupsReq* pReq); -void tFreeSCompactVgroupsReq(SCompactVgroupsReq* pReq); - typedef struct { int32_t compactId; int32_t sqlLen; diff --git a/include/common/tmsgdef.h b/include/common/tmsgdef.h index 28539268dd..c22a3da5ad 100644 --- a/include/common/tmsgdef.h +++ b/include/common/tmsgdef.h @@ -260,7 +260,6 @@ TD_DEF_MSG_TYPE(TDMT_MND_STREAM_TASK_RESET, "stream-reset-tasks", NULL, NULL) TD_DEF_MSG_TYPE(TDMT_MND_UPDATE_DNODE_INFO, "update-dnode-info", NULL, NULL) TD_DEF_MSG_TYPE(TDMT_MND_AUDIT, "audit", NULL, NULL) - TD_DEF_MSG_TYPE(TDMT_MND_COMPACT_VGROUPS, "compact-vgroups", NULL, NULL) TD_CLOSE_MSG_SEG(TDMT_END_MND_MSG) TD_NEW_MSG_SEG(TDMT_VND_MSG) // 2<<8 diff --git a/source/client/src/clientMsgHandler.c b/source/client/src/clientMsgHandler.c index b4c535499f..4a605d6c1e 100644 --- a/source/client/src/clientMsgHandler.c +++ b/source/client/src/clientMsgHandler.c @@ -845,8 +845,7 @@ __async_send_cb_fn_t getMsgRspHandle(int32_t msgType) { case TDMT_MND_SHOW_VARIABLES: return processShowVariablesRsp; case TDMT_MND_COMPACT_DB: - case TDMT_MND_COMPACT_VGROUPS: - return processCompactDbRsp; + return processCompactDbRsp; default: return genericRspCallback; } diff --git a/source/common/src/tmsg.c b/source/common/src/tmsg.c index c8bea91d97..98795bc5f4 100644 --- a/source/common/src/tmsg.c +++ b/source/common/src/tmsg.c @@ -4521,6 +4521,17 @@ int32_t tSerializeSCompactDbReq(void *buf, int32_t bufLen, SCompactDbReq *pReq) TAOS_CHECK_EXIT(tEncodeI64(&encoder, pReq->timeRange.skey)); TAOS_CHECK_EXIT(tEncodeI64(&encoder, pReq->timeRange.ekey)); ENCODESQL(); + + // encode vgroup list + int32_t numOfVgroups = taosArrayGetSize(pReq->vgroupIds); + TAOS_CHECK_EXIT(tEncodeI32(&encoder, numOfVgroups)); + if (numOfVgroups > 0) { + for (int32_t i = 0; i < numOfVgroups; ++i) { + int64_t vgid = *(int64_t *)taosArrayGet(pReq->vgroupIds, i); + TAOS_CHECK_EXIT(tEncodeI64v(&encoder, vgid)); + } + } + tEndEncode(&encoder); _exit: @@ -4544,6 +4555,26 @@ int32_t tDeserializeSCompactDbReq(void *buf, int32_t bufLen, SCompactDbReq *pReq TAOS_CHECK_EXIT(tDecodeI64(&decoder, &pReq->timeRange.skey)); TAOS_CHECK_EXIT(tDecodeI64(&decoder, &pReq->timeRange.ekey)); DECODESQL(); + + // decode vgroup list + if (!tDecodeIsEnd(&decoder)) { + int32_t numOfVgroups = 0; + TAOS_CHECK_EXIT(tDecodeI32(&decoder, &numOfVgroups)); + if (numOfVgroups > 0) { + pReq->vgroupIds = taosArrayInit(numOfVgroups, sizeof(int64_t)); + if (NULL == pReq->vgroupIds) { + TAOS_CHECK_EXIT(terrno); + } + + for (int32_t i = 0; i < numOfVgroups; ++i) { + int64_t vgid; + TAOS_CHECK_EXIT(tDecodeI64v(&decoder, &vgid)); + if (taosArrayPush(pReq->vgroupIds, &vgid) == NULL) { + TAOS_CHECK_EXIT(terrno); + } + } + } + } tEndDecode(&decoder); _exit: @@ -4551,7 +4582,11 @@ _exit: return code; } -void tFreeSCompactDbReq(SCompactDbReq *pReq) { FREESQL(); } +void tFreeSCompactDbReq(SCompactDbReq *pReq) { + FREESQL(); + taosArrayDestroy(pReq->vgroupIds); + pReq->vgroupIds = NULL; +} int32_t tSerializeSCompactDbRsp(void *buf, int32_t bufLen, SCompactDbRsp *pRsp) { SEncoder encoder = {0}; @@ -4591,109 +4626,6 @@ _exit: return code; } -int32_t tSerializeSCompactVgroupsReq(void *buf, int32_t bufLen, SCompactVgroupsReq *pReq) { - int32_t code = TSDB_CODE_SUCCESS; - SEncoder encoder = {0}; - int32_t lino; - int32_t tlen; - - tEncoderInit(&encoder, buf, bufLen); - - code = tStartEncode(&encoder); - TSDB_CHECK_CODE(code, lino, _exit); - - // encode vgid list - code = tEncodeI32(&encoder, taosArrayGetSize(pReq->vgroupIds)); - TSDB_CHECK_CODE(code, lino, _exit); - - for (int32_t i = 0; i < taosArrayGetSize(pReq->vgroupIds); ++i) { - int64_t vgid = *(int64_t *)taosArrayGet(pReq->vgroupIds, i); - code = tEncodeI64v(&encoder, vgid); - TSDB_CHECK_CODE(code, lino, _exit); - } - - // encode time range - code = tEncodeI64(&encoder, pReq->timeRange.skey); - TSDB_CHECK_CODE(code, lino, _exit); - - code = tEncodeI64(&encoder, pReq->timeRange.ekey); - TSDB_CHECK_CODE(code, lino, _exit); - - // encode sql - ENCODESQL(); - - tEndEncode(&encoder); - -_exit: - if (code) { - tlen = code; - } else { - tlen = encoder.pos; - } - tEncoderClear(&encoder); - return tlen; -} - -int32_t tDeserializeSCompactVgroupsReq(void *buf, int32_t bufLen, SCompactVgroupsReq *pReq) { - int32_t code = TSDB_CODE_SUCCESS; - int32_t lino; - SDecoder decoder = {0}; - - tDecoderInit(&decoder, buf, bufLen); - - code = tStartDecode(&decoder); - TSDB_CHECK_CODE(code, lino, _exit); - - // decode vgid list - int32_t vgidNum = 0; - code = tDecodeI32(&decoder, &vgidNum); - TSDB_CHECK_CODE(code, lino, _exit); - - pReq->vgroupIds = taosArrayInit(vgidNum, sizeof(int64_t)); - if (NULL == pReq->vgroupIds) { - TSDB_CHECK_CODE(code = terrno, lino, _exit); - } - - for (int32_t i = 0; i < vgidNum; ++i) { - int64_t vgid; - - code = tDecodeI64v(&decoder, &vgid); - TSDB_CHECK_CODE(code, lino, _exit); - - if (taosArrayPush(pReq->vgroupIds, &vgid) == NULL) { - TSDB_CHECK_CODE(code = terrno, lino, _exit); - } - } - - // decode time range - code = tDecodeI64(&decoder, &pReq->timeRange.skey); - TSDB_CHECK_CODE(code, lino, _exit); - - code = tDecodeI64(&decoder, &pReq->timeRange.ekey); - TSDB_CHECK_CODE(code, lino, _exit); - - // decode sql - DECODESQL(); - - tEndDecode(&decoder); - -_exit: - tDecoderClear(&decoder); - if (code) { - tFreeSCompactVgroupsReq(pReq); - } - return code; -} - -void tFreeSCompactVgroupsReq(SCompactVgroupsReq *pReq) { - if (pReq->vgroupIds) { - taosArrayDestroy(pReq->vgroupIds); - pReq->vgroupIds = NULL; - } - - FREESQL(); -} - int32_t tSerializeSKillCompactReq(void *buf, int32_t bufLen, SKillCompactReq *pReq) { SEncoder encoder = {0}; int32_t code = 0; diff --git a/source/dnode/mgmt/mgmt_mnode/src/mmHandle.c b/source/dnode/mgmt/mgmt_mnode/src/mmHandle.c index f79866f099..0d804eadf0 100644 --- a/source/dnode/mgmt/mgmt_mnode/src/mmHandle.c +++ b/source/dnode/mgmt/mgmt_mnode/src/mmHandle.c @@ -149,7 +149,6 @@ SArray *mmGetMsgHandles() { if (dmSetMgmtHandle(pArray, TDMT_MND_USE_DB, mmPutMsgToReadQueue, 0) == NULL) goto _OVER; if (dmSetMgmtHandle(pArray, TDMT_MND_ALTER_DB, mmPutMsgToWriteQueue, 0) == NULL) goto _OVER; if (dmSetMgmtHandle(pArray, TDMT_MND_COMPACT_DB, mmPutMsgToWriteQueue, 0) == NULL) goto _OVER; - if (dmSetMgmtHandle(pArray, TDMT_MND_COMPACT_VGROUPS, mmPutMsgToWriteQueue, 0) == NULL) goto _OVER; if (dmSetMgmtHandle(pArray, TDMT_MND_TRIM_DB, mmPutMsgToWriteQueue, 0) == NULL) goto _OVER; if (dmSetMgmtHandle(pArray, TDMT_MND_S3MIGRATE_DB, mmPutMsgToWriteQueue, 0) == NULL) goto _OVER; if (dmSetMgmtHandle(pArray, TDMT_MND_GET_DB_CFG, mmPutMsgToReadQueue, 0) == NULL) goto _OVER; diff --git a/source/dnode/mnode/impl/inc/mndDb.h b/source/dnode/mnode/impl/inc/mndDb.h index 8e6d93f449..fdb6b5a80b 100644 --- a/source/dnode/mnode/impl/inc/mndDb.h +++ b/source/dnode/mnode/impl/inc/mndDb.h @@ -37,7 +37,6 @@ const char *mndGetDbStr(const char *src); const char *mndGetStableStr(const char *src); int32_t mndProcessCompactDbReq(SRpcMsg *pReq); -int32_t mndProcessCompactVgroupsReq(SRpcMsg *pReq); int32_t mndCheckDbDnodeList(SMnode *pMnode, char *db, char *dnodeListStr, SArray *dnodeList); #ifdef __cplusplus diff --git a/source/dnode/mnode/impl/src/mndDb.c b/source/dnode/mnode/impl/src/mndDb.c index 76b1f1d1d8..0d17ccd0b0 100644 --- a/source/dnode/mnode/impl/src/mndDb.c +++ b/source/dnode/mnode/impl/src/mndDb.c @@ -57,7 +57,6 @@ static int32_t mndProcessGetDbCfgReq(SRpcMsg *pReq); #ifndef TD_ENTERPRISE int32_t mndProcessCompactDbReq(SRpcMsg *pReq) { return TSDB_CODE_OPS_NOT_SUPPORT; } -int32_t mndProcessCompactVgroupsReq(SRpcMsg *pReq) { return TSDB_CODE_OPS_NOT_SUPPORT; } #endif int32_t mndInitDb(SMnode *pMnode) { @@ -77,7 +76,6 @@ int32_t mndInitDb(SMnode *pMnode) { mndSetMsgHandle(pMnode, TDMT_MND_DROP_DB, mndProcessDropDbReq); mndSetMsgHandle(pMnode, TDMT_MND_USE_DB, mndProcessUseDbReq); mndSetMsgHandle(pMnode, TDMT_MND_COMPACT_DB, mndProcessCompactDbReq); - mndSetMsgHandle(pMnode, TDMT_MND_COMPACT_VGROUPS, mndProcessCompactVgroupsReq); mndSetMsgHandle(pMnode, TDMT_MND_TRIM_DB, mndProcessTrimDbReq); mndSetMsgHandle(pMnode, TDMT_MND_GET_DB_CFG, mndProcessGetDbCfgReq); mndSetMsgHandle(pMnode, TDMT_MND_S3MIGRATE_DB, mndProcessS3MigrateDbReq); diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c index ddedef6e8a..8caa0e6a4c 100755 --- a/source/libs/parser/src/parTranslater.c +++ b/source/libs/parser/src/parTranslater.c @@ -8080,10 +8080,6 @@ static int32_t fillCmdSql(STranslateContext* pCxt, int16_t msgType, void* pReq) FILL_CMD_SQL(sql, sqlLen, pCmdReq, SCompactDbReq, pReq); break; } - case TDMT_MND_COMPACT_VGROUPS: { - FILL_CMD_SQL(sql, sqlLen, pCmdReq, SCompactVgroupsReq, pReq); - break; - } case TDMT_MND_TMQ_DROP_TOPIC: { FILL_CMD_SQL(sql, sqlLen, pCmdReq, SMDropTopicReq, pReq); @@ -10485,11 +10481,14 @@ static int32_t translateVgroupList(STranslateContext* pCxt, SNodeList* vgroupLis } static int32_t translateCompactVgroups(STranslateContext* pCxt, SCompactVgroupsStmt* pStmt) { - int32_t code = TSDB_CODE_SUCCESS; - SCompactVgroupsReq req = {0}; + int32_t code = TSDB_CODE_SUCCESS; + SName name; + SCompactDbReq req = {0}; + code = tNameSetDbName(&name, pCxt->pParseCxt->acctId, ((SValueNode*)pStmt->pDbName)->literal, + strlen(((SValueNode*)pStmt->pDbName)->literal)); if (TSDB_CODE_SUCCESS == code) { - code = translateVgroupList(pCxt, pStmt->vgidList, &req.vgroupIds); + (void)tNameGetFullDbName(&name, req.db); } if (TSDB_CODE_SUCCESS == code) { @@ -10498,10 +10497,14 @@ static int32_t translateCompactVgroups(STranslateContext* pCxt, SCompactVgroupsS } if (TSDB_CODE_SUCCESS == code) { - code = buildCmdMsg(pCxt, TDMT_MND_COMPACT_VGROUPS, (FSerializeFunc)tSerializeSCompactVgroupsReq, &req); + code = translateVgroupList(pCxt, pStmt->vgidList, &req.vgroupIds); } - tFreeSCompactVgroupsReq(&req); + if (TSDB_CODE_SUCCESS == code) { + code = buildCmdMsg(pCxt, TDMT_MND_COMPACT_DB, (FSerializeFunc)tSerializeSCompactDbReq, &req); + } + + tFreeSCompactDbReq(&req); return code; } From f5da2c71ec3a0c110dcc8cd92ab45b5e4fa3319b Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Mon, 11 Nov 2024 14:18:55 +0800 Subject: [PATCH 08/55] test: add some test case --- tests/system-test/0-others/compact_vgroups.py | 65 +++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 tests/system-test/0-others/compact_vgroups.py diff --git a/tests/system-test/0-others/compact_vgroups.py b/tests/system-test/0-others/compact_vgroups.py new file mode 100644 index 0000000000..0b5f547baa --- /dev/null +++ b/tests/system-test/0-others/compact_vgroups.py @@ -0,0 +1,65 @@ +################################################################### +# 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 * +from util.common import * +from util.sqlset import * +from util.autogen import * + +import taos + +class TDTestCase: + # Test cases ====================== + def compactVgroupsSqlTest(self): + # create database db1 + sql = "create database db1 vgroups 10" + tdLog.info(sql) + tdSql.execute(sql) + + # invalid sql + sql = "compact vgroups" + tdLog.info(f"expect error SQL: {sql}") + tdSql.execute(sql, False) + + sql = "compact vgroups in" + tdLog.info(f"expect error SQL: {sql}") + tdSql.execute(sql, False) + + sql = "compact vgroups in ()" + tdLog.info(f"expect error SQL: {sql}") + tdSql.execute(sql, False) + + # error without using database + sql = "compact vgroups in (2)" + tdLog.info(f"expect error SQL: {sql}") + tdSql.execute(sql, False) + + + # Test Framework Apis + def init(self, conn, logSql, replicaVar=1): + tdLog.debug(f"start to execute {__file__}") + + # init sql + tdSql.init(conn.cursor(), True) + + def run(self): + # do compact vgroups test + self.compactVgroupsSqlTest() + + def stop(self): + tdSql.close() + tdLog.success(f"stop to execute {__file__}") + +tdCases.addLinux(__file__, TDTestCase()) +tdCases.addWindows(__file__, TDTestCase()) \ No newline at end of file From a9e5699a4d309826885d955d25330221a90edd4a Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Mon, 11 Nov 2024 15:23:41 +0800 Subject: [PATCH 09/55] enh: add more error case handle code --- include/util/taoserror.h | 1 + source/libs/parser/src/parAstCreater.c | 2 ++ source/libs/parser/src/parTranslater.c | 47 ++++++++++++++++++-------- source/util/src/terror.c | 1 + 4 files changed, 37 insertions(+), 14 deletions(-) diff --git a/include/util/taoserror.h b/include/util/taoserror.h index 2c811495fd..eefd2061c4 100644 --- a/include/util/taoserror.h +++ b/include/util/taoserror.h @@ -895,6 +895,7 @@ int32_t taosGetErrSize(); #define TSDB_CODE_PAR_INVALID_ANOMALY_WIN_COL TAOS_DEF_ERROR_CODE(0, 0x2683) #define TSDB_CODE_PAR_INVALID_ANOMALY_WIN_OPT TAOS_DEF_ERROR_CODE(0, 0x2684) #define TSDB_CODE_PAR_INVALID_FORECAST_CLAUSE TAOS_DEF_ERROR_CODE(0, 0x2685) +#define TSDB_CODE_PAR_INVALID_VGID_LIST TAOS_DEF_ERROR_CODE(0, 0x2686) #define TSDB_CODE_PAR_INTERNAL_ERROR TAOS_DEF_ERROR_CODE(0, 0x26FF) //planner diff --git a/source/libs/parser/src/parAstCreater.c b/source/libs/parser/src/parAstCreater.c index e0f88442ed..8774cebe41 100644 --- a/source/libs/parser/src/parAstCreater.c +++ b/source/libs/parser/src/parAstCreater.c @@ -2132,6 +2132,8 @@ SNode* createCompactVgroupsStmt(SAstCreateContext* pCxt, SNode* pDbName, SNodeLi pStmt->pEnd = pEnd; return (SNode*)pStmt; _err: + nodesDestroyNode(pDbName); + nodesDestroyList(vgidList); nodesDestroyNode(pStart); nodesDestroyNode(pEnd); return NULL; diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c index d47669a084..c69fbcf67d 100755 --- a/source/libs/parser/src/parTranslater.c +++ b/source/libs/parser/src/parTranslater.c @@ -10449,30 +10449,49 @@ static int32_t translateCompactDb(STranslateContext* pCxt, SCompactDatabaseStmt* } static int32_t translateVgroupList(STranslateContext* pCxt, SNodeList* vgroupList, SArray** ppVgroups) { - int32_t code = TSDB_CODE_SUCCESS; - - int32_t numOfVgroups = LIST_LENGTH(vgroupList); + int32_t code = TSDB_CODE_SUCCESS; + SHashObj* pHash = NULL; + int32_t numOfVgroups = LIST_LENGTH(vgroupList); (*ppVgroups) = taosArrayInit(numOfVgroups, sizeof(int64_t)); if (NULL == *ppVgroups) { return terrno; } - SNode* pNode = NULL; - FOREACH(pNode, vgroupList) { - SValueNode* pVal = (SValueNode*)pNode; - if (DEAL_RES_ERROR == translateValue(pCxt, pVal)) { - code = TSDB_CODE_VND_INVALID_VGROUP_ID; - break; - } + pHash = taosHashInit(64, taosGetDefaultHashFunction(TSDB_DATA_TYPE_BIGINT), false, HASH_NO_LOCK); + if (NULL == pHash) { + code = terrno; + } - int64_t vgroupId = getBigintFromValueNode(pVal); - if (NULL == taosArrayPush(*ppVgroups, &vgroupId)) { - code = terrno; - break; + if (TSDB_CODE_SUCCESS == code) { + SNode* pNode = NULL; + FOREACH(pNode, vgroupList) { + SValueNode* pVal = (SValueNode*)pNode; + if (DEAL_RES_ERROR == translateValue(pCxt, pVal)) { + code = TSDB_CODE_VND_INVALID_VGROUP_ID; + break; + } + + int64_t vgroupId = getBigintFromValueNode(pVal); + + if (NULL != taosHashGet(pHash, &vgroupId, sizeof(vgroupId))) { + code = TSDB_CODE_PAR_INVALID_VGID_LIST; + break; + } + + code = taosHashPut(pHash, &vgroupId, sizeof(vgroupId), NULL, 0); + if (code) { + break; + } + + if (NULL == taosArrayPush(*ppVgroups, &vgroupId)) { + code = terrno; + break; + } } } + taosHashCleanup(pHash); if (code) { taosArrayDestroy(*ppVgroups); *ppVgroups = NULL; diff --git a/source/util/src/terror.c b/source/util/src/terror.c index 0d8a85155a..30ef3ae481 100644 --- a/source/util/src/terror.c +++ b/source/util/src/terror.c @@ -739,6 +739,7 @@ TAOS_DEFINE_ERROR(TSDB_CODE_PAR_INVALID_ANOMALY_WIN_COL, "ANOMALY_WINDOW not TAOS_DEFINE_ERROR(TSDB_CODE_PAR_INVALID_ANOMALY_WIN_OPT, "ANOMALY_WINDOW option should include algo field") TAOS_DEFINE_ERROR(TSDB_CODE_PAR_INVALID_FORECAST_CLAUSE, "Invalid forecast clause") TAOS_DEFINE_ERROR(TSDB_CODE_PAR_REGULAR_EXPRESSION_ERROR, "Syntax error in regular expression") +TAOS_DEFINE_ERROR(TSDB_CODE_PAR_INVALID_VGID_LIST, "Invalid vgid list") TAOS_DEFINE_ERROR(TSDB_CODE_PAR_INTERNAL_ERROR, "Parser internal error") //planner From 7c0d150708e70780d1359f3ed14e044bad4b61eb Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Wed, 13 Nov 2024 14:17:27 +0800 Subject: [PATCH 10/55] feat: show progress and remain time for compact task --- source/common/src/systable.c | 2 ++ source/dnode/mnode/impl/src/mndCompactDetail.c | 10 ++++++++++ 2 files changed, 12 insertions(+) diff --git a/source/common/src/systable.c b/source/common/src/systable.c index 4993ece7c1..8950569a5f 100644 --- a/source/common/src/systable.c +++ b/source/common/src/systable.c @@ -397,6 +397,8 @@ static const SSysDbTableSchema userCompactsDetailSchema[] = { {.name = "number_fileset", .bytes = 4, .type = TSDB_DATA_TYPE_INT, .sysInfo = false}, {.name = "finished", .bytes = 4, .type = TSDB_DATA_TYPE_INT, .sysInfo = false}, {.name = "start_time", .bytes = 8, .type = TSDB_DATA_TYPE_TIMESTAMP, .sysInfo = false}, + {.name = "progress(%)", .bytes = 4, .type = TSDB_DATA_TYPE_INT, .sysInfo = false}, + {.name = "remain_time(s)", .bytes = 8, .type = TSDB_DATA_TYPE_BIGINT, .sysInfo = false}, }; static const SSysDbTableSchema anodesSchema[] = { diff --git a/source/dnode/mnode/impl/src/mndCompactDetail.c b/source/dnode/mnode/impl/src/mndCompactDetail.c index cbd0df7e68..910606818f 100644 --- a/source/dnode/mnode/impl/src/mndCompactDetail.c +++ b/source/dnode/mnode/impl/src/mndCompactDetail.c @@ -90,6 +90,16 @@ int32_t mndRetrieveCompactDetail(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pB TAOS_CHECK_RETURN_WITH_RELEASE(colDataSetVal(pColInfo, numOfRows, (const char *)&pCompactDetail->startTime, false), pSdb, pCompactDetail); + int32_t percentage = 0; + pColInfo = taosArrayGet(pBlock->pDataBlock, cols++); + TAOS_CHECK_RETURN_WITH_RELEASE(colDataSetVal(pColInfo, numOfRows, (const char *)&percentage, false), pSdb, + pCompactDetail); + + int64_t remainTime = 0; + pColInfo = taosArrayGet(pBlock->pDataBlock, cols++); + TAOS_CHECK_RETURN_WITH_RELEASE(colDataSetVal(pColInfo, numOfRows, (const char *)&remainTime, false), pSdb, + pCompactDetail); + numOfRows++; sdbRelease(pSdb, pCompactDetail); } From 9a59689fba491d1787236ae3fdb1a3c6b2412273 Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Wed, 13 Nov 2024 16:17:16 +0800 Subject: [PATCH 11/55] more code --- include/common/tmsg.h | 2 ++ source/common/src/tmsg.c | 11 ++++++++ .../dnode/mnode/impl/inc/mndCompactDetail.h | 12 ++++----- source/dnode/mnode/impl/inc/mndDef.h | 2 ++ source/dnode/mnode/impl/src/mndCompact.c | 2 ++ .../dnode/mnode/impl/src/mndCompactDetail.c | 25 +++++++++++++------ 6 files changed, 39 insertions(+), 15 deletions(-) diff --git a/include/common/tmsg.h b/include/common/tmsg.h index 89b1277245..43f2f9e442 100644 --- a/include/common/tmsg.h +++ b/include/common/tmsg.h @@ -1984,6 +1984,8 @@ typedef struct { int32_t dnodeId; int32_t numberFileset; int32_t finished; + int32_t progress; + int64_t remainingTime; } SQueryCompactProgressRsp; int32_t tSerializeSQueryCompactProgressRsp(void* buf, int32_t bufLen, SQueryCompactProgressRsp* pReq); diff --git a/source/common/src/tmsg.c b/source/common/src/tmsg.c index 98d9089e36..8f6d105f29 100644 --- a/source/common/src/tmsg.c +++ b/source/common/src/tmsg.c @@ -6816,6 +6816,9 @@ int32_t tSerializeSQueryCompactProgressRsp(void *buf, int32_t bufLen, SQueryComp TAOS_CHECK_EXIT(tEncodeI32(&encoder, pReq->dnodeId)); TAOS_CHECK_EXIT(tEncodeI32(&encoder, pReq->numberFileset)); TAOS_CHECK_EXIT(tEncodeI32(&encoder, pReq->finished)); + // 1. add progress and remaining time + TAOS_CHECK_EXIT(tEncodeI32v(&encoder, pReq->progress)); + TAOS_CHECK_EXIT(tEncodeI64v(&encoder, pReq->remainingTime)); tEndEncode(&encoder); @@ -6840,6 +6843,14 @@ int32_t tDeserializeSQueryCompactProgressRsp(void *buf, int32_t bufLen, SQueryCo TAOS_CHECK_EXIT(tDecodeI32(&decoder, &pReq->dnodeId)); TAOS_CHECK_EXIT(tDecodeI32(&decoder, &pReq->numberFileset)); TAOS_CHECK_EXIT(tDecodeI32(&decoder, &pReq->finished)); + // 1. decode progress and remaining time + if (!tDecodeIsEnd(&decoder)) { + TAOS_CHECK_EXIT(tDecodeI32v(&decoder, &pReq->progress)); + TAOS_CHECK_EXIT(tDecodeI64v(&decoder, &pReq->remainingTime)); + } else { + pReq->progress = 0; + pReq->remainingTime = 0; + } tEndDecode(&decoder); _exit: diff --git a/source/dnode/mnode/impl/inc/mndCompactDetail.h b/source/dnode/mnode/impl/inc/mndCompactDetail.h index 601af3b64b..e99923e226 100644 --- a/source/dnode/mnode/impl/inc/mndCompactDetail.h +++ b/source/dnode/mnode/impl/inc/mndCompactDetail.h @@ -25,19 +25,17 @@ extern "C" { int32_t mndInitCompactDetail(SMnode *pMnode); void mndCleanupCompactDetail(SMnode *pMnode); -void tFreeCompactDetailObj(SCompactDetailObj *pCompact); -int32_t tSerializeSCompactDetailObj(void *buf, int32_t bufLen, const SCompactDetailObj *pObj); -int32_t tDeserializeSCompactDetailObj(void *buf, int32_t bufLen, SCompactDetailObj *pObj); +void tFreeCompactDetailObj(SCompactDetailObj *pCompact); -SSdbRaw* mndCompactDetailActionEncode(SCompactDetailObj *pCompact); -SSdbRow* mndCompactDetailActionDecode(SSdbRaw *pRaw); +SSdbRaw *mndCompactDetailActionEncode(SCompactDetailObj *pCompact); +SSdbRow *mndCompactDetailActionDecode(SSdbRaw *pRaw); int32_t mndCompactDetailActionInsert(SSdb *pSdb, SCompactDetailObj *pCompact); int32_t mndCompactDetailActionDelete(SSdb *pSdb, SCompactDetailObj *pCompact); int32_t mndCompactDetailActionUpdate(SSdb *pSdb, SCompactDetailObj *pOldCompact, SCompactDetailObj *pNewCompact); -int32_t mndAddCompactDetailToTran(SMnode *pMnode, STrans *pTrans, SCompactObj* pCompact, SVgObj *pVgroup, - SVnodeGid *pVgid, int32_t index); +int32_t mndAddCompactDetailToTran(SMnode *pMnode, STrans *pTrans, SCompactObj *pCompact, SVgObj *pVgroup, + SVnodeGid *pVgid, int32_t index); int32_t mndRetrieveCompactDetail(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pBlock, int32_t rows); diff --git a/source/dnode/mnode/impl/inc/mndDef.h b/source/dnode/mnode/impl/inc/mndDef.h index d2d9b2e8eb..89d767ab72 100644 --- a/source/dnode/mnode/impl/inc/mndDef.h +++ b/source/dnode/mnode/impl/inc/mndDef.h @@ -846,6 +846,8 @@ typedef struct { int64_t startTime; int32_t newNumberFileset; int32_t newFinished; + int32_t progress; + int64_t remainingTime; } SCompactDetailObj; typedef struct { diff --git a/source/dnode/mnode/impl/src/mndCompact.c b/source/dnode/mnode/impl/src/mndCompact.c index 106680da7f..ee49c60084 100644 --- a/source/dnode/mnode/impl/src/mndCompact.c +++ b/source/dnode/mnode/impl/src/mndCompact.c @@ -546,6 +546,8 @@ static int32_t mndUpdateCompactProgress(SMnode *pMnode, SRpcMsg *pReq, int32_t c if (pDetail->compactId == compactId && pDetail->vgId == rsp->vgId && pDetail->dnodeId == rsp->dnodeId) { pDetail->newNumberFileset = rsp->numberFileset; pDetail->newFinished = rsp->finished; + pDetail->progress = rsp->progress; + pDetail->remainingTime = rsp->remainingTime; sdbCancelFetch(pMnode->pSdb, pIter); sdbRelease(pMnode->pSdb, pDetail); diff --git a/source/dnode/mnode/impl/src/mndCompactDetail.c b/source/dnode/mnode/impl/src/mndCompactDetail.c index 910606818f..9a053066b2 100644 --- a/source/dnode/mnode/impl/src/mndCompactDetail.c +++ b/source/dnode/mnode/impl/src/mndCompactDetail.c @@ -90,15 +90,13 @@ int32_t mndRetrieveCompactDetail(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pB TAOS_CHECK_RETURN_WITH_RELEASE(colDataSetVal(pColInfo, numOfRows, (const char *)&pCompactDetail->startTime, false), pSdb, pCompactDetail); - int32_t percentage = 0; pColInfo = taosArrayGet(pBlock->pDataBlock, cols++); - TAOS_CHECK_RETURN_WITH_RELEASE(colDataSetVal(pColInfo, numOfRows, (const char *)&percentage, false), pSdb, - pCompactDetail); + TAOS_CHECK_RETURN_WITH_RELEASE(colDataSetVal(pColInfo, numOfRows, (const char *)&pCompactDetail->progress, false), + pSdb, pCompactDetail); - int64_t remainTime = 0; pColInfo = taosArrayGet(pBlock->pDataBlock, cols++); - TAOS_CHECK_RETURN_WITH_RELEASE(colDataSetVal(pColInfo, numOfRows, (const char *)&remainTime, false), pSdb, - pCompactDetail); + TAOS_CHECK_RETURN_WITH_RELEASE( + colDataSetVal(pColInfo, numOfRows, (const char *)&pCompactDetail->remainingTime, false), pSdb, pCompactDetail); numOfRows++; sdbRelease(pSdb, pCompactDetail); @@ -111,7 +109,7 @@ int32_t mndRetrieveCompactDetail(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pB void tFreeCompactDetailObj(SCompactDetailObj *pCompact) {} -int32_t tSerializeSCompactDetailObj(void *buf, int32_t bufLen, const SCompactDetailObj *pObj) { +static int32_t tSerializeSCompactDetailObj(void *buf, int32_t bufLen, const SCompactDetailObj *pObj) { SEncoder encoder = {0}; int32_t code = 0; int32_t lino; @@ -128,6 +126,9 @@ int32_t tSerializeSCompactDetailObj(void *buf, int32_t bufLen, const SCompactDet TAOS_CHECK_EXIT(tEncodeI64(&encoder, pObj->startTime)); TAOS_CHECK_EXIT(tEncodeI32(&encoder, pObj->newNumberFileset)); TAOS_CHECK_EXIT(tEncodeI32(&encoder, pObj->newFinished)); + // 1. add progress and remaining time + TAOS_CHECK_EXIT(tEncodeI32v(&encoder, pObj->progress)); + TAOS_CHECK_EXIT(tEncodeI64v(&encoder, pObj->remainingTime)); tEndEncode(&encoder); @@ -141,7 +142,7 @@ _exit: return tlen; } -int32_t tDeserializeSCompactDetailObj(void *buf, int32_t bufLen, SCompactDetailObj *pObj) { +static int32_t tDeserializeSCompactDetailObj(void *buf, int32_t bufLen, SCompactDetailObj *pObj) { int32_t code = 0; int32_t lino; SDecoder decoder = {0}; @@ -157,6 +158,14 @@ int32_t tDeserializeSCompactDetailObj(void *buf, int32_t bufLen, SCompactDetailO TAOS_CHECK_EXIT(tDecodeI64(&decoder, &pObj->startTime)); TAOS_CHECK_EXIT(tDecodeI32(&decoder, &pObj->newNumberFileset)); TAOS_CHECK_EXIT(tDecodeI32(&decoder, &pObj->newFinished)); + // 1. add progress and remaining time decode + if (!tDecodeIsEnd(&decoder)) { + TAOS_CHECK_EXIT(tDecodeI32v(&decoder, &pObj->progress)); + TAOS_CHECK_EXIT(tDecodeI64v(&decoder, &pObj->remainingTime)); + } else { + pObj->progress = 0; + pObj->remainingTime = 0; + } tEndDecode(&decoder); From be743733a5aa5495ad2c1a22ae318a83fab90b35 Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Thu, 14 Nov 2024 17:01:15 +0800 Subject: [PATCH 12/55] feat: support database auto compact parameters --- include/common/tmsg.h | 33 +- include/libs/nodes/cmdnodes.h | 20 +- include/util/tdef.h | 54 +- source/common/src/tmsg.c | 60 ++- source/dnode/mnode/impl/inc/mndDef.h | 30 +- source/dnode/mnode/impl/src/mndDb.c | 51 +- source/libs/nodes/src/nodesCodeFuncs.c | 88 ++-- source/libs/nodes/src/nodesUtilFuncs.c | 669 ++++++++++++++++--------- source/libs/parser/inc/parAst.h | 3 + source/libs/parser/inc/sql.y | 6 + source/libs/parser/src/parAstCreater.c | 19 + source/libs/parser/src/parTranslater.c | 149 ++++-- 12 files changed, 791 insertions(+), 391 deletions(-) diff --git a/include/common/tmsg.h b/include/common/tmsg.h index 43f2f9e442..d3f897fedc 100644 --- a/include/common/tmsg.h +++ b/include/common/tmsg.h @@ -422,7 +422,7 @@ typedef enum ENodeType { // physical plan node QUERY_NODE_PHYSICAL_PLAN_TAG_SCAN = 1100, QUERY_NODE_PHYSICAL_PLAN_TABLE_SCAN, - QUERY_NODE_PHYSICAL_PLAN_TABLE_SEQ_SCAN, // INACTIVE + QUERY_NODE_PHYSICAL_PLAN_TABLE_SEQ_SCAN, // INACTIVE QUERY_NODE_PHYSICAL_PLAN_TABLE_MERGE_SCAN, QUERY_NODE_PHYSICAL_PLAN_STREAM_SCAN, QUERY_NODE_PHYSICAL_PLAN_SYSTABLE_SCAN, @@ -436,7 +436,7 @@ typedef enum ENodeType { QUERY_NODE_PHYSICAL_PLAN_SORT, QUERY_NODE_PHYSICAL_PLAN_GROUP_SORT, QUERY_NODE_PHYSICAL_PLAN_HASH_INTERVAL, - QUERY_NODE_PHYSICAL_PLAN_MERGE_INTERVAL, // INACTIVE + QUERY_NODE_PHYSICAL_PLAN_MERGE_INTERVAL, // INACTIVE QUERY_NODE_PHYSICAL_PLAN_MERGE_ALIGNED_INTERVAL, QUERY_NODE_PHYSICAL_PLAN_STREAM_INTERVAL, QUERY_NODE_PHYSICAL_PLAN_STREAM_FINAL_INTERVAL, @@ -677,7 +677,7 @@ typedef struct { int32_t tsSlowLogThreshold; int32_t tsSlowLogMaxLen; int32_t tsSlowLogScope; - int32_t tsSlowLogThresholdTest; //Obsolete + int32_t tsSlowLogThresholdTest; // Obsolete char tsSlowLogExceptDb[TSDB_DB_NAME_LEN]; } SMonitorParas; @@ -986,7 +986,6 @@ typedef struct SEpSet { SEp eps[TSDB_MAX_REPLICA]; } SEpSet; - int32_t tEncodeSEpSet(SEncoder* pEncoder, const SEpSet* pEp); int32_t tDecodeSEpSet(SDecoder* pDecoder, SEpSet* pEp); int32_t taosEncodeSEpSet(void** buf, const SEpSet* pEp); @@ -1343,6 +1342,11 @@ typedef struct { int8_t withArbitrator; int8_t encryptAlgorithm; char dnodeListStr[TSDB_DNODE_LIST_LEN]; + // 1. add auto-compact parameters + int32_t compactInterval; + int32_t compactStartTime; + int32_t compactEndTime; + int32_t compactTimeOffset; } SCreateDbReq; int32_t tSerializeSCreateDbReq(void* buf, int32_t bufLen, SCreateDbReq* pReq); @@ -1374,6 +1378,11 @@ typedef struct { int32_t sqlLen; char* sql; int8_t withArbitrator; + // 1. add auto-compact parameters + int32_t compactInterval; + int32_t compactStartTime; + int32_t compactEndTime; + int32_t compactTimeOffset; } SAlterDbReq; int32_t tSerializeSAlterDbReq(void* buf, int32_t bufLen, SAlterDbReq* pReq); @@ -4147,20 +4156,20 @@ typedef struct { SArray* blockTbName; SArray* blockSchema; - union{ - struct{ - int64_t sleepTime; + union { + struct { + int64_t sleepTime; }; - struct{ - int32_t createTableNum; - SArray* createTableLen; - SArray* createTableReq; + struct { + int32_t createTableNum; + SArray* createTableLen; + SArray* createTableReq; }; }; } SMqDataRsp; -int32_t tEncodeMqDataRsp(SEncoder *pEncoder, const SMqDataRsp *pObj); +int32_t tEncodeMqDataRsp(SEncoder* pEncoder, const SMqDataRsp* pObj); int32_t tDecodeMqDataRsp(SDecoder* pDecoder, SMqDataRsp* pRsp); void tDeleteMqDataRsp(SMqDataRsp* pRsp); diff --git a/include/libs/nodes/cmdnodes.h b/include/libs/nodes/cmdnodes.h index f261db4916..7b687fc782 100644 --- a/include/libs/nodes/cmdnodes.h +++ b/include/libs/nodes/cmdnodes.h @@ -109,6 +109,14 @@ typedef struct SDatabaseOptions { SValueNode* s3KeepLocalStr; int8_t s3Compact; int8_t withArbitrator; + // for auto-compact + SValueNode* pCompactIntervalNode; + int32_t compactInterval; + SNodeList* pCompactTimeRangeList; + int32_t compactStartTime; + int32_t compactEndTime; + SValueNode* pCompactTimeOffsetNode; + int32_t compactTimeOffset; } SDatabaseOptions; typedef struct SCreateDatabaseStmt { @@ -348,7 +356,7 @@ typedef struct SShowStmt { SNode* pTbName; // SValueNode EOperatorType tableCondType; EShowKind showKind; // show databases: user/system, show tables: normal/child, others NULL - bool withFull; // for show users full; + bool withFull; // for show users full; } SShowStmt; typedef struct SShowCreateDatabaseStmt { @@ -658,7 +666,7 @@ typedef struct SCreateTSMAStmt { bool ignoreExists; char tsmaName[TSDB_TABLE_NAME_LEN]; char dbName[TSDB_DB_NAME_LEN]; - char tableName[TSDB_TABLE_NAME_LEN]; // base tb name or base tsma name + char tableName[TSDB_TABLE_NAME_LEN]; // base tb name or base tsma name char originalTbName[TSDB_TABLE_NAME_LEN]; STSMAOptions* pOptions; SNode* pPrevQuery; @@ -667,10 +675,10 @@ typedef struct SCreateTSMAStmt { } SCreateTSMAStmt; typedef struct SDropTSMAStmt { - ENodeType type; - bool ignoreNotExists; - char dbName[TSDB_DB_NAME_LEN]; - char tsmaName[TSDB_TABLE_NAME_LEN]; + ENodeType type; + bool ignoreNotExists; + char dbName[TSDB_DB_NAME_LEN]; + char tsmaName[TSDB_TABLE_NAME_LEN]; } SDropTSMAStmt; #ifdef __cplusplus diff --git a/include/util/tdef.h b/include/util/tdef.h index ba30e78c59..639a3f1c25 100644 --- a/include/util/tdef.h +++ b/include/util/tdef.h @@ -190,45 +190,22 @@ typedef enum EOperatorType { } EOperatorType; static const EOperatorType OPERATOR_ARRAY[] = { - OP_TYPE_ADD, - OP_TYPE_SUB, - OP_TYPE_MULTI, - OP_TYPE_DIV, - OP_TYPE_REM, - - OP_TYPE_MINUS, - - OP_TYPE_BIT_AND, - OP_TYPE_BIT_OR, + OP_TYPE_ADD, OP_TYPE_SUB, OP_TYPE_MULTI, OP_TYPE_DIV, OP_TYPE_REM, - OP_TYPE_GREATER_THAN, - OP_TYPE_GREATER_EQUAL, - OP_TYPE_LOWER_THAN, - OP_TYPE_LOWER_EQUAL, - OP_TYPE_EQUAL, - OP_TYPE_NOT_EQUAL, - OP_TYPE_IN, - OP_TYPE_NOT_IN, - OP_TYPE_LIKE, - OP_TYPE_NOT_LIKE, - OP_TYPE_MATCH, - OP_TYPE_NMATCH, - - OP_TYPE_IS_NULL, - OP_TYPE_IS_NOT_NULL, - OP_TYPE_IS_TRUE, - OP_TYPE_IS_FALSE, - OP_TYPE_IS_UNKNOWN, - OP_TYPE_IS_NOT_TRUE, - OP_TYPE_IS_NOT_FALSE, - OP_TYPE_IS_NOT_UNKNOWN, - //OP_TYPE_COMPARE_MAX_VALUE, + OP_TYPE_MINUS, - OP_TYPE_JSON_GET_VALUE, - OP_TYPE_JSON_CONTAINS, + OP_TYPE_BIT_AND, OP_TYPE_BIT_OR, - OP_TYPE_ASSIGN -}; + OP_TYPE_GREATER_THAN, OP_TYPE_GREATER_EQUAL, OP_TYPE_LOWER_THAN, OP_TYPE_LOWER_EQUAL, OP_TYPE_EQUAL, + OP_TYPE_NOT_EQUAL, OP_TYPE_IN, OP_TYPE_NOT_IN, OP_TYPE_LIKE, OP_TYPE_NOT_LIKE, OP_TYPE_MATCH, OP_TYPE_NMATCH, + + OP_TYPE_IS_NULL, OP_TYPE_IS_NOT_NULL, OP_TYPE_IS_TRUE, OP_TYPE_IS_FALSE, OP_TYPE_IS_UNKNOWN, OP_TYPE_IS_NOT_TRUE, + OP_TYPE_IS_NOT_FALSE, OP_TYPE_IS_NOT_UNKNOWN, + // OP_TYPE_COMPARE_MAX_VALUE, + + OP_TYPE_JSON_GET_VALUE, OP_TYPE_JSON_CONTAINS, + + OP_TYPE_ASSIGN}; #define OP_TYPE_CALC_MAX OP_TYPE_BIT_OR @@ -528,6 +505,11 @@ typedef enum ELogicConditionType { #define TSDB_MIN_TABLE_TTL 0 #define TSDB_DEFAULT_TABLE_TTL 0 +#define TSDB_DEFAULT_COMPACT_INTERVAL 0 +#define TSDB_DEFAULT_COMPACT_START_TIME 0 +#define TSDB_DEFAULT_COMPACT_END_TIME 0 +#define TSDB_DEFAULT_COMPACT_TIME_OFFSET 0 + #define TSDB_MIN_EXPLAIN_RATIO 0 #define TSDB_MAX_EXPLAIN_RATIO 1 #define TSDB_DEFAULT_EXPLAIN_RATIO 0.001 diff --git a/source/common/src/tmsg.c b/source/common/src/tmsg.c index 8f6d105f29..178bdecbd8 100644 --- a/source/common/src/tmsg.c +++ b/source/common/src/tmsg.c @@ -76,7 +76,7 @@ static int32_t tSerializeSMonitorParas(SEncoder *encoder, const SMonitorParas *p TAOS_CHECK_RETURN(tEncodeI32(encoder, pMonitorParas->tsSlowLogScope)); TAOS_CHECK_RETURN(tEncodeI32(encoder, pMonitorParas->tsSlowLogMaxLen)); TAOS_CHECK_RETURN(tEncodeI32(encoder, pMonitorParas->tsSlowLogThreshold)); - TAOS_CHECK_RETURN(tEncodeI32(encoder, pMonitorParas->tsSlowLogThresholdTest)); //Obsolete + TAOS_CHECK_RETURN(tEncodeI32(encoder, pMonitorParas->tsSlowLogThresholdTest)); // Obsolete TAOS_CHECK_RETURN(tEncodeCStr(encoder, pMonitorParas->tsSlowLogExceptDb)); return 0; } @@ -87,7 +87,7 @@ static int32_t tDeserializeSMonitorParas(SDecoder *decoder, SMonitorParas *pMoni TAOS_CHECK_RETURN(tDecodeI32(decoder, &pMonitorParas->tsSlowLogScope)); TAOS_CHECK_RETURN(tDecodeI32(decoder, &pMonitorParas->tsSlowLogMaxLen)); TAOS_CHECK_RETURN(tDecodeI32(decoder, &pMonitorParas->tsSlowLogThreshold)); - TAOS_CHECK_RETURN(tDecodeI32(decoder, &pMonitorParas->tsSlowLogThresholdTest)); //Obsolete + TAOS_CHECK_RETURN(tDecodeI32(decoder, &pMonitorParas->tsSlowLogThresholdTest)); // Obsolete TAOS_CHECK_RETURN(tDecodeCStrTo(decoder, pMonitorParas->tsSlowLogExceptDb)); return 0; } @@ -2166,9 +2166,9 @@ int32_t tSerializeRetrieveAnalAlgoRsp(void *buf, int32_t bufLen, SRetrieveAnalAl int32_t numOfAlgos = 0; void *pIter = taosHashIterate(pRsp->hash, NULL); while (pIter != NULL) { - SAnalyticsUrl *pUrl = pIter; - size_t nameLen = 0; - const char *name = taosHashGetKey(pIter, &nameLen); + SAnalyticsUrl *pUrl = pIter; + size_t nameLen = 0; + const char *name = taosHashGetKey(pIter, &nameLen); if (nameLen > 0 && nameLen <= TSDB_ANAL_ALGO_KEY_LEN && pUrl->urlLen > 0) { numOfAlgos++; } @@ -2181,9 +2181,9 @@ int32_t tSerializeRetrieveAnalAlgoRsp(void *buf, int32_t bufLen, SRetrieveAnalAl pIter = taosHashIterate(pRsp->hash, NULL); while (pIter != NULL) { - SAnalyticsUrl *pUrl = pIter; - size_t nameLen = 0; - const char *name = taosHashGetKey(pIter, &nameLen); + SAnalyticsUrl *pUrl = pIter; + size_t nameLen = 0; + const char *name = taosHashGetKey(pIter, &nameLen); if (nameLen > 0 && pUrl->urlLen > 0) { TAOS_CHECK_EXIT(tEncodeI32(&encoder, nameLen)); TAOS_CHECK_EXIT(tEncodeBinary(&encoder, (const uint8_t *)name, nameLen)); @@ -2221,10 +2221,10 @@ int32_t tDeserializeRetrieveAnalAlgoRsp(void *buf, int32_t bufLen, SRetrieveAnal int32_t lino; tDecoderInit(&decoder, buf, bufLen); - int32_t numOfAlgos = 0; - int32_t nameLen; - int32_t type; - char name[TSDB_ANAL_ALGO_KEY_LEN]; + int32_t numOfAlgos = 0; + int32_t nameLen; + int32_t type; + char name[TSDB_ANAL_ALGO_KEY_LEN]; SAnalyticsUrl url = {0}; TAOS_CHECK_EXIT(tStartDecode(&decoder)); @@ -3937,6 +3937,12 @@ int32_t tSerializeSCreateDbReq(void *buf, int32_t bufLen, SCreateDbReq *pReq) { TAOS_CHECK_EXIT(tEncodeI8(&encoder, pReq->s3Compact)); TAOS_CHECK_EXIT(tEncodeCStr(&encoder, pReq->dnodeListStr)); + // auto-compact parameters + TAOS_CHECK_EXIT(tEncodeI32v(&encoder, pReq->compactInterval)); + TAOS_CHECK_EXIT(tEncodeI32v(&encoder, pReq->compactStartTime)); + TAOS_CHECK_EXIT(tEncodeI32v(&encoder, pReq->compactEndTime)); + TAOS_CHECK_EXIT(tEncodeI32v(&encoder, pReq->compactTimeOffset)); + tEndEncode(&encoder); _exit: @@ -4028,6 +4034,18 @@ int32_t tDeserializeSCreateDbReq(void *buf, int32_t bufLen, SCreateDbReq *pReq) TAOS_CHECK_EXIT(tDecodeCStrTo(&decoder, pReq->dnodeListStr)); } + if (!tDecodeIsEnd(&decoder)) { + TAOS_CHECK_EXIT(tDecodeI32v(&decoder, &pReq->compactInterval)); + TAOS_CHECK_EXIT(tDecodeI32v(&decoder, &pReq->compactStartTime)); + TAOS_CHECK_EXIT(tDecodeI32v(&decoder, &pReq->compactEndTime)); + TAOS_CHECK_EXIT(tDecodeI32v(&decoder, &pReq->compactTimeOffset)); + } else { + pReq->compactInterval = 0; + pReq->compactStartTime = 0; + pReq->compactEndTime = 0; + pReq->compactTimeOffset = 0; + } + tEndDecode(&decoder); _exit: @@ -4078,6 +4096,11 @@ int32_t tSerializeSAlterDbReq(void *buf, int32_t bufLen, SAlterDbReq *pReq) { ENCODESQL(); TAOS_CHECK_EXIT(tEncodeI8(&encoder, pReq->withArbitrator)); + // auto compact config + TAOS_CHECK_EXIT(tEncodeI32v(&encoder, pReq->compactInterval)); + TAOS_CHECK_EXIT(tEncodeI32v(&encoder, pReq->compactStartTime)); + TAOS_CHECK_EXIT(tEncodeI32v(&encoder, pReq->compactEndTime)); + TAOS_CHECK_EXIT(tEncodeI32v(&encoder, pReq->compactTimeOffset)); tEndEncode(&encoder); _exit: @@ -4145,6 +4168,19 @@ int32_t tDeserializeSAlterDbReq(void *buf, int32_t bufLen, SAlterDbReq *pReq) { if (!tDecodeIsEnd(&decoder)) { TAOS_CHECK_EXIT(tDecodeI8(&decoder, &pReq->withArbitrator)); } + + // auto compact config + if (!tDecodeIsEnd(&decoder)) { + TAOS_CHECK_EXIT(tDecodeI32v(&decoder, &pReq->compactInterval)); + TAOS_CHECK_EXIT(tDecodeI32v(&decoder, &pReq->compactStartTime)); + TAOS_CHECK_EXIT(tDecodeI32v(&decoder, &pReq->compactEndTime)); + TAOS_CHECK_EXIT(tDecodeI32v(&decoder, &pReq->compactTimeOffset)); + } else { + pReq->compactInterval = 0; + pReq->compactStartTime = 0; + pReq->compactEndTime = 0; + pReq->compactTimeOffset = 0; + } tEndDecode(&decoder); _exit: diff --git a/source/dnode/mnode/impl/inc/mndDef.h b/source/dnode/mnode/impl/inc/mndDef.h index 89d767ab72..2b1de5cf7b 100644 --- a/source/dnode/mnode/impl/inc/mndDef.h +++ b/source/dnode/mnode/impl/inc/mndDef.h @@ -106,8 +106,8 @@ typedef enum { TRN_CONFLICT_GLOBAL = 1, TRN_CONFLICT_DB = 2, TRN_CONFLICT_DB_INSIDE = 3, -// TRN_CONFLICT_TOPIC = 4, -// TRN_CONFLICT_TOPIC_INSIDE = 5, + // TRN_CONFLICT_TOPIC = 4, + // TRN_CONFLICT_TOPIC_INSIDE = 5, TRN_CONFLICT_ARBGROUP = 6, TRN_CONFLICT_TSMA = 7, } ETrnConflct; @@ -423,6 +423,10 @@ typedef struct { int8_t s3Compact; int8_t withArbitrator; int8_t encryptAlgorithm; + int32_t compactInterval; + int32_t compactStartTime; + int32_t compactEndTime; + int32_t compactTimeOffset; } SDbCfg; typedef struct { @@ -649,12 +653,12 @@ typedef struct { int32_t maxPollIntervalMs; } SMqConsumerObj; -int32_t tNewSMqConsumerObj(int64_t consumerId, char *cgroup, int8_t updateType, - char *topic, SCMSubscribeReq *subscribe, SMqConsumerObj** ppConsumer); -void tClearSMqConsumerObj(SMqConsumerObj* pConsumer); -void tDeleteSMqConsumerObj(SMqConsumerObj* pConsumer); -int32_t tEncodeSMqConsumerObj(void** buf, const SMqConsumerObj* pConsumer); -void* tDecodeSMqConsumerObj(const void* buf, SMqConsumerObj* pConsumer, int8_t sver); +int32_t tNewSMqConsumerObj(int64_t consumerId, char* cgroup, int8_t updateType, char* topic, SCMSubscribeReq* subscribe, + SMqConsumerObj** ppConsumer); +void tClearSMqConsumerObj(SMqConsumerObj* pConsumer); +void tDeleteSMqConsumerObj(SMqConsumerObj* pConsumer); +int32_t tEncodeSMqConsumerObj(void** buf, const SMqConsumerObj* pConsumer); +void* tDecodeSMqConsumerObj(const void* buf, SMqConsumerObj* pConsumer, int8_t sver); typedef struct { int32_t vgId; @@ -693,11 +697,11 @@ typedef struct { char* qmsg; // SubPlanToString } SMqSubscribeObj; -int32_t tNewSubscribeObj(const char *key, SMqSubscribeObj **ppSub); -int32_t tCloneSubscribeObj(const SMqSubscribeObj* pSub, SMqSubscribeObj **ppSub); -void tDeleteSubscribeObj(SMqSubscribeObj* pSub); -int32_t tEncodeSubscribeObj(void** buf, const SMqSubscribeObj* pSub); -void* tDecodeSubscribeObj(const void* buf, SMqSubscribeObj* pSub, int8_t sver); +int32_t tNewSubscribeObj(const char* key, SMqSubscribeObj** ppSub); +int32_t tCloneSubscribeObj(const SMqSubscribeObj* pSub, SMqSubscribeObj** ppSub); +void tDeleteSubscribeObj(SMqSubscribeObj* pSub); +int32_t tEncodeSubscribeObj(void** buf, const SMqSubscribeObj* pSub); +void* tDecodeSubscribeObj(const void* buf, SMqSubscribeObj* pSub, int8_t sver); // typedef struct { // int32_t epoch; diff --git a/source/dnode/mnode/impl/src/mndDb.c b/source/dnode/mnode/impl/src/mndDb.c index 0d17ccd0b0..db42bc8ff4 100644 --- a/source/dnode/mnode/impl/src/mndDb.c +++ b/source/dnode/mnode/impl/src/mndDb.c @@ -16,6 +16,7 @@ #define _DEFAULT_SOURCE #include "mndDb.h" #include "audit.h" +#include "command.h" #include "mndArbGroup.h" #include "mndCluster.h" #include "mndDnode.h" @@ -34,7 +35,6 @@ #include "systable.h" #include "thttp.h" #include "tjson.h" -#include "command.h" #define DB_VER_NUMBER 1 #define DB_RESERVE_SIZE 27 @@ -795,6 +795,10 @@ static int32_t mndCreateDb(SMnode *pMnode, SRpcMsg *pReq, SCreateDbReq *pCreate, .tsdbPageSize = pCreate->tsdbPageSize, .withArbitrator = pCreate->withArbitrator, .encryptAlgorithm = pCreate->encryptAlgorithm, + .compactInterval = pCreate->compactInterval, + .compactStartTime = pCreate->compactStartTime, + .compactEndTime = pCreate->compactEndTime, + .compactTimeOffset = pCreate->compactTimeOffset, }; dbObj.cfg.numOfRetensions = pCreate->numOfRetensions; @@ -1138,6 +1142,32 @@ static int32_t mndSetDbCfgFromAlterDbReq(SDbObj *pDb, SAlterDbReq *pAlter) { code = 0; } + if (pAlter->compactInterval != TSDB_DEFAULT_COMPACT_INTERVAL && pAlter->compactInterval != pDb->cfg.compactInterval) { + pDb->cfg.compactInterval = pAlter->compactInterval; + pDb->vgVersion++; + code = 0; + } + + if (pAlter->compactStartTime != TSDB_DEFAULT_COMPACT_START_TIME && + pAlter->compactStartTime != pDb->cfg.compactStartTime) { + pDb->cfg.compactStartTime = pAlter->compactStartTime; + pDb->vgVersion++; + code = 0; + } + + if (pAlter->compactEndTime != TSDB_DEFAULT_COMPACT_END_TIME && pAlter->compactEndTime != pDb->cfg.compactEndTime) { + pDb->cfg.compactEndTime = pAlter->compactEndTime; + pDb->vgVersion++; + code = 0; + } + + if (pAlter->compactTimeOffset != TSDB_DEFAULT_COMPACT_TIME_OFFSET && + pAlter->compactTimeOffset != pDb->cfg.compactTimeOffset) { + pDb->cfg.compactTimeOffset = pAlter->compactTimeOffset; + pDb->vgVersion++; + code = 0; + } + TAOS_RETURN(code); } @@ -1560,8 +1590,8 @@ static int32_t mndBuildDropVgroupAction(SMnode *pMnode, STrans *pTrans, SDbObj * static int32_t mndSetDropDbRedoActions(SMnode *pMnode, STrans *pTrans, SDbObj *pDb) { int32_t code = 0; - SSdb *pSdb = pMnode->pSdb; - void *pIter = NULL; + SSdb *pSdb = pMnode->pSdb; + void *pIter = NULL; while (1) { SVgObj *pVgroup = NULL; @@ -1941,9 +1971,9 @@ int32_t mndValidateDbInfo(SMnode *pMnode, SDbCacheInfo *pDbs, int32_t numOfDbs, continue; } else { mTrace("db:%s, valid dbinfo, vgVersion:%d cfgVersion:%d stateTs:%" PRId64 - " numOfTables:%d, changed to vgVersion:%d cfgVersion:%d stateTs:%" PRId64 " numOfTables:%d", - pDbCacheInfo->dbFName, pDbCacheInfo->vgVersion, pDbCacheInfo->cfgVersion, pDbCacheInfo->stateTs, - pDbCacheInfo->numOfTable, pDb->vgVersion, pDb->cfgVersion, pDb->stateTs, numOfTable); + " numOfTables:%d, changed to vgVersion:%d cfgVersion:%d stateTs:%" PRId64 " numOfTables:%d", + pDbCacheInfo->dbFName, pDbCacheInfo->vgVersion, pDbCacheInfo->cfgVersion, pDbCacheInfo->stateTs, + pDbCacheInfo->numOfTable, pDb->vgVersion, pDb->cfgVersion, pDb->stateTs, numOfTable); } if (pDbCacheInfo->cfgVersion < pDb->cfgVersion) { @@ -1955,7 +1985,7 @@ int32_t mndValidateDbInfo(SMnode *pMnode, SDbCacheInfo *pDbs, int32_t numOfDbs, rsp.pTsmaRsp = taosMemoryCalloc(1, sizeof(STableTSMAInfoRsp)); if (rsp.pTsmaRsp) rsp.pTsmaRsp->pTsmas = taosArrayInit(4, POINTER_BYTES); if (rsp.pTsmaRsp && rsp.pTsmaRsp->pTsmas) { - bool exist = false; + bool exist = false; int32_t code = mndGetDbTsmas(pMnode, 0, pDb->uid, rsp.pTsmaRsp, &exist); if (TSDB_CODE_SUCCESS != code) { mndReleaseDb(pMnode, pDb); @@ -2386,7 +2416,8 @@ static void mndDumpDbInfoData(SMnode *pMnode, SSDataBlock *pBlock, SDbObj *pDb, TAOS_CHECK_GOTO(colDataSetVal(pColInfo, rows, (const char *)strictVstr, false), &lino, _OVER); char durationVstr[128] = {0}; - int32_t len = formatDurationOrKeep(&durationVstr[VARSTR_HEADER_SIZE], sizeof(durationVstr) - VARSTR_HEADER_SIZE, pDb->cfg.daysPerFile); + int32_t len = formatDurationOrKeep(&durationVstr[VARSTR_HEADER_SIZE], sizeof(durationVstr) - VARSTR_HEADER_SIZE, + pDb->cfg.daysPerFile); varDataSetLen(durationVstr, len); pColInfo = taosArrayGet(pBlock->pDataBlock, cols++); @@ -2402,9 +2433,9 @@ static void mndDumpDbInfoData(SMnode *pMnode, SSDataBlock *pBlock, SDbObj *pDb, int32_t lenKeep2 = formatDurationOrKeep(keep2Str, sizeof(keep2Str), pDb->cfg.daysToKeep2); if (pDb->cfg.daysToKeep0 > pDb->cfg.daysToKeep1 || pDb->cfg.daysToKeep0 > pDb->cfg.daysToKeep2) { - len = sprintf(&keepVstr[VARSTR_HEADER_SIZE], "%s,%s,%s", keep1Str, keep2Str, keep0Str); + len = sprintf(&keepVstr[VARSTR_HEADER_SIZE], "%s,%s,%s", keep1Str, keep2Str, keep0Str); } else { - len = sprintf(&keepVstr[VARSTR_HEADER_SIZE], "%s,%s,%s", keep0Str, keep1Str, keep2Str); + len = sprintf(&keepVstr[VARSTR_HEADER_SIZE], "%s,%s,%s", keep0Str, keep1Str, keep2Str); } varDataSetLen(keepVstr, len); pColInfo = taosArrayGet(pBlock->pDataBlock, cols++); diff --git a/source/libs/nodes/src/nodesCodeFuncs.c b/source/libs/nodes/src/nodesCodeFuncs.c index 8390c2b73e..8c24754fcc 100644 --- a/source/libs/nodes/src/nodesCodeFuncs.c +++ b/source/libs/nodes/src/nodesCodeFuncs.c @@ -1248,7 +1248,7 @@ static const char* jkStreamOption_destHasPrimaryKey = "StreamOptionDestHasPrimar static int32_t streamNodeOptionToJson(const void* pObj, SJson* pJson) { const SStreamNodeOption* pNode = (const SStreamNodeOption*)pObj; - int32_t code = tjsonAddIntegerToObject(pJson, jkStreamOption_triggerType, pNode->triggerType); + int32_t code = tjsonAddIntegerToObject(pJson, jkStreamOption_triggerType, pNode->triggerType); if (TSDB_CODE_SUCCESS == code) { code = tjsonAddIntegerToObject(pJson, jkStreamOption_watermark, pNode->watermark); @@ -1270,7 +1270,7 @@ static int32_t streamNodeOptionToJson(const void* pObj, SJson* pJson) { static int32_t jsonToStreamNodeOption(const SJson* pJson, void* pObj) { SStreamNodeOption* pNode = (SStreamNodeOption*)pObj; - int32_t code = tjsonGetTinyIntValue(pJson, jkStreamOption_triggerType, &pNode->triggerType); + int32_t code = tjsonGetTinyIntValue(pJson, jkStreamOption_triggerType, &pNode->triggerType); if (TSDB_CODE_SUCCESS == code) { code = tjsonGetBigIntValue(pJson, jkStreamOption_watermark, &pNode->watermark); @@ -1333,7 +1333,8 @@ static int32_t logicInterpFuncNodeToJson(const void* pObj, SJson* pJson) { code = tjsonAddObject(pJson, jkInterpFuncLogicPlanTimeSeries, nodeToJson, pNode->pTimeSeries); } if (TSDB_CODE_SUCCESS == code) { - code = tjsonAddObject(pJson, jkInterpFuncLogicPlanStreamNodeOption, streamNodeOptionToJson, &pNode->streamNodeOption); + code = + tjsonAddObject(pJson, jkInterpFuncLogicPlanStreamNodeOption, streamNodeOptionToJson, &pNode->streamNodeOption); } return code; @@ -1371,7 +1372,8 @@ static int32_t jsonToLogicInterpFuncNode(const SJson* pJson, void* pObj) { code = jsonToNodeObject(pJson, jkInterpFuncLogicPlanTimeSeries, &pNode->pTimeSeries); } if (TSDB_CODE_SUCCESS == code) { - code = tjsonToObject(pJson, jkInterpFuncLogicPlanStreamNodeOption, jsonToStreamNodeOption, &pNode->streamNodeOption); + code = + tjsonToObject(pJson, jkInterpFuncLogicPlanStreamNodeOption, jsonToStreamNodeOption, &pNode->streamNodeOption); } return code; @@ -2363,7 +2365,7 @@ static int32_t physiMergeJoinNodeToJson(const void* pObj, SJson* pJson) { } if (TSDB_CODE_SUCCESS == code) { code = tjsonAddIntegerToObject(pJson, jkJoinPhysiPlanAsofOp, pNode->asofOpType); - } + } if (TSDB_CODE_SUCCESS == code) { code = tjsonAddObject(pJson, jkJoinPhysiPlanLeftPrimExpr, nodeToJson, pNode->leftPrimExpr); } @@ -2372,10 +2374,10 @@ static int32_t physiMergeJoinNodeToJson(const void* pObj, SJson* pJson) { } if (TSDB_CODE_SUCCESS == code) { code = tjsonAddIntegerToObject(pJson, jkJoinPhysiPlanLeftPrimSlotId, pNode->leftPrimSlotId); - } + } if (TSDB_CODE_SUCCESS == code) { code = tjsonAddIntegerToObject(pJson, jkJoinPhysiPlanRightPrimSlotId, pNode->rightPrimSlotId); - } + } if (TSDB_CODE_SUCCESS == code) { code = nodeListToJson(pJson, jkJoinPhysiPlanLeftEqCols, pNode->pEqLeft); } @@ -2477,7 +2479,7 @@ static int32_t jsonToPhysiMergeJoinNode(const SJson* pJson, void* pObj) { if (TSDB_CODE_SUCCESS == code) { code = tjsonGetBoolValue(pJson, jkJoinPhysiPlanGroupJoin, &pNode->grpJoin); } - + return code; } @@ -2490,7 +2492,7 @@ static int32_t physiHashJoinNodeToJson(const void* pObj, SJson* pJson) { } if (TSDB_CODE_SUCCESS == code) { code = tjsonAddIntegerToObject(pJson, jkJoinPhysiPlanSubType, pNode->subType); - } + } if (TSDB_CODE_SUCCESS == code) { code = nodeListToJson(pJson, jkJoinPhysiPlanOnLeftCols, pNode->pOnLeft); } @@ -2505,10 +2507,10 @@ static int32_t physiHashJoinNodeToJson(const void* pObj, SJson* pJson) { } if (TSDB_CODE_SUCCESS == code) { code = tjsonAddIntegerToObject(pJson, jkJoinPhysiPlanLeftPrimSlotId, pNode->leftPrimSlotId); - } + } if (TSDB_CODE_SUCCESS == code) { code = tjsonAddIntegerToObject(pJson, jkJoinPhysiPlanRightPrimSlotId, pNode->rightPrimSlotId); - } + } if (TSDB_CODE_SUCCESS == code) { code = tjsonAddObject(pJson, jkJoinPhysiPlanOnConditions, nodeToJson, pNode->pFullOnCond); } @@ -2555,7 +2557,7 @@ static int32_t jsonToPhysiHashJoinNode(const SJson* pJson, void* pObj) { } if (TSDB_CODE_SUCCESS == code) { tjsonGetNumberValue(pJson, jkJoinPhysiPlanSubType, pNode->subType, code); - } + } if (TSDB_CODE_SUCCESS == code) { code = jsonToNodeList(pJson, jkJoinPhysiPlanOnLeftCols, &pNode->pOnLeft); } @@ -2573,7 +2575,7 @@ static int32_t jsonToPhysiHashJoinNode(const SJson* pJson, void* pObj) { } if (TSDB_CODE_SUCCESS == code) { tjsonGetNumberValue(pJson, jkJoinPhysiPlanRightPrimSlotId, pNode->rightPrimSlotId, code); - } + } if (TSDB_CODE_SUCCESS == code) { code = jsonToNodeObject(pJson, jkJoinPhysiPlanOnConditions, &pNode->pFullOnCond); } @@ -2600,7 +2602,7 @@ static int32_t jsonToPhysiHashJoinNode(const SJson* pJson, void* pObj) { } if (TSDB_CODE_SUCCESS == code) { tjsonGetNumberValue(pJson, jkJoinPhysiPlanTimeRangeTarget, pNode->timeRangeTarget, code); - } + } if (TSDB_CODE_SUCCESS == code) { code = tjsonGetBigIntValue(pJson, jkJoinPhysiPlanTimeRangeSKey, &pNode->timeRange.skey); } @@ -3350,7 +3352,8 @@ static int32_t physiInterpFuncNodeToJson(const void* pObj, SJson* pJson) { code = tjsonAddObject(pJson, jkInterpFuncPhysiPlanTimeSeries, nodeToJson, pNode->pTimeSeries); } if (TSDB_CODE_SUCCESS == code) { - code = tjsonAddObject(pJson, jkInterpFuncPhysiPlanStreamNodeOption, streamNodeOptionToJson, &pNode->streamNodeOption); + code = + tjsonAddObject(pJson, jkInterpFuncPhysiPlanStreamNodeOption, streamNodeOptionToJson, &pNode->streamNodeOption); } return code; @@ -3391,7 +3394,8 @@ static int32_t jsonToPhysiInterpFuncNode(const SJson* pJson, void* pObj) { code = jsonToNodeObject(pJson, jkInterpFuncPhysiPlanTimeSeries, &pNode->pTimeSeries); } if (TSDB_CODE_SUCCESS == code) { - code = tjsonToObject(pJson, jkInterpFuncPhysiPlanStreamNodeOption, jsonToStreamNodeOption, &pNode->streamNodeOption); + code = + tjsonToObject(pJson, jkInterpFuncPhysiPlanStreamNodeOption, jsonToStreamNodeOption, &pNode->streamNodeOption); } return code; @@ -4089,7 +4093,7 @@ static int32_t columnNodeToJson(const void* pObj, SJson* pJson) { } if (TSDB_CODE_SUCCESS == code) { code = tjsonAddBoolToObject(pJson, jkColumnIsPk, pNode->isPk); - } + } if (TSDB_CODE_SUCCESS == code) { code = tjsonAddIntegerToObject(pJson, jkColumnNumOfPKs, pNode->numOfPKs); } @@ -4138,10 +4142,10 @@ static int32_t jsonToColumnNode(const SJson* pJson, void* pObj) { } if (TSDB_CODE_SUCCESS == code) { code = tjsonGetBoolValue(pJson, jkColumnIsPk, &pNode->isPk); - } + } if (TSDB_CODE_SUCCESS == code) { code = tjsonGetSmallIntValue(pJson, jkColumnNumOfPKs, &pNode->numOfPKs); - } + } return code; } @@ -4184,7 +4188,7 @@ static int32_t datumToJson(const void* pObj, SJson* pJson) { case TSDB_DATA_TYPE_NCHAR: { // cJSON only support utf-8 encoding. Convert memory content to hex string. int32_t bufSize = varDataLen(pNode->datum.p) * 2 + 1; - char* buf = taosMemoryCalloc(bufSize, sizeof(char)); + char* buf = taosMemoryCalloc(bufSize, sizeof(char)); if (!buf) return terrno; code = taosHexEncode(varDataVal(pNode->datum.p), buf, varDataLen(pNode->datum.p), bufSize); if (code != TSDB_CODE_SUCCESS) { @@ -4551,7 +4555,7 @@ static int32_t jsonToFunctionNode(const SJson* pJson, void* pObj) { } if (TSDB_CODE_SUCCESS == code) { code = tjsonGetIntValue(pJson, jkFunctionPkBytes, &pNode->pkBytes); - } + } if (TSDB_CODE_SUCCESS == code) { code = tjsonGetBoolValue(pJson, jkFunctionIsMergeFunc, &pNode->hasOriginalFunc); } @@ -5255,7 +5259,7 @@ static int32_t jsonToColumnDefNode(const SJson* pJson, void* pObj) { code = tjsonGetBoolValue(pJson, jkColumnDefSma, &pNode->sma); } if (TSDB_CODE_SUCCESS == code) { - code = jsonToNodeObject(pJson, jkColumnDefOptions, (SNode**)&pNode->pOptions); + code = jsonToNodeObject(pJson, jkColumnDefOptions, (SNode**)&pNode->pOptions); } return code; } @@ -5315,7 +5319,7 @@ static int32_t jsonToDownstreamSourceNode(const SJson* pJson, void* pObj) { static const char* jkWindowOffsetStartOffset = "StartOffset"; static const char* jkWindowOffsetEndOffset = "EndOffset"; -static int32_t windowOffsetNodeToJson(const void* pObj, SJson* pJson) { +static int32_t windowOffsetNodeToJson(const void* pObj, SJson* pJson) { const SWindowOffsetNode* pNode = (const SWindowOffsetNode*)pObj; int32_t code = tjsonAddObject(pJson, jkWindowOffsetStartOffset, nodeToJson, pNode->pStartOffset); @@ -5335,7 +5339,6 @@ static int32_t jsonToWindowOffsetNode(const SJson* pJson, void* pObj) { return code; } - static const char* jkDatabaseOptionsBuffer = "Buffer"; static const char* jkDatabaseOptionsCacheModel = "CacheModel"; static const char* jkDatabaseOptionsCompressionLevel = "CompressionLevel"; @@ -5359,6 +5362,9 @@ static const char* jkDatabaseOptionsS3ChunkSize = "S3ChunkSize"; static const char* jkDatabaseOptionsS3KeepLocalNode = "S3KeepLocalNode"; static const char* jkDatabaseOptionsS3KeepLocal = "S3KeepLocal"; static const char* jkDatabaseOptionsS3Compact = "S3Compact"; +static const char* jkDatabaseOptionsCompactIntervalNode = "compactIntervalNode"; +static const char* jkDatabaseOptionsCompactTimeRange = "compactTimeRange"; +static const char* jkDatabaseOptionsCompactTimeOffsetNode = "compactTimeOffsetNode"; static int32_t databaseOptionsToJson(const void* pObj, SJson* pJson) { const SDatabaseOptions* pNode = (const SDatabaseOptions*)pObj; @@ -5430,6 +5436,15 @@ static int32_t databaseOptionsToJson(const void* pObj, SJson* pJson) { if (TSDB_CODE_SUCCESS == code) { code = tjsonAddIntegerToObject(pJson, jkDatabaseOptionsS3Compact, pNode->s3Compact); } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddObject(pJson, jkDatabaseOptionsCompactIntervalNode, nodeToJson, pNode->pCompactIntervalNode); + } + if (TSDB_CODE_SUCCESS == code) { + code = nodeListToJson(pJson, jkDatabaseOptionsCompactTimeRange, pNode->pCompactTimeRangeList); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddObject(pJson, jkDatabaseOptionsCompactTimeOffsetNode, nodeToJson, pNode->pCompactTimeOffsetNode); + } return code; } @@ -5504,6 +5519,15 @@ static int32_t jsonToDatabaseOptions(const SJson* pJson, void* pObj) { if (TSDB_CODE_SUCCESS == code) { code = tjsonGetTinyIntValue(pJson, jkDatabaseOptionsS3Compact, &pNode->s3Compact); } + if (TSDB_CODE_SUCCESS == code) { + code = jsonToNodeObject(pJson, jkDatabaseOptionsCompactIntervalNode, (SNode**)&pNode->pCompactIntervalNode); + } + if (TSDB_CODE_SUCCESS == code) { + code = jsonToNodeList(pJson, jkDatabaseOptionsCompactTimeRange, &pNode->pCompactTimeRangeList); + } + if (TSDB_CODE_SUCCESS == code) { + code = jsonToNodeObject(pJson, jkDatabaseOptionsCompactTimeOffsetNode, (SNode**)&pNode->pCompactTimeOffsetNode); + } return code; } @@ -6747,7 +6771,7 @@ static int32_t dropQnodeStmtToJson(const void* pObj, SJson* pJson) { return drop static int32_t jsonToDropQnodeStmt(const SJson* pJson, void* pObj) { return jsonToDropComponentNodeStmt(pJson, pObj); } static const char* jkCreateAnodeStmtUrl = "Url"; -static const char* jkUpdateDropANodeStmtId = "AnodeId"; +static const char* jkUpdateDropANodeStmtId = "AnodeId"; static int32_t createAnodeStmtToJson(const void* pObj, SJson* pJson) { const SCreateAnodeStmt* pNode = (const SCreateAnodeStmt*)pObj; @@ -7741,7 +7765,7 @@ static const char* jkTSMAOptionTsPrecision = "Precision"; static int32_t tsmaOptionToJson(const void* pObj, SJson* pJson) { const STSMAOptions* pNode = (const STSMAOptions*)pObj; - int32_t code = nodeListToJson(pJson, jkTSMAOptionFuncs, pNode->pFuncs); + int32_t code = nodeListToJson(pJson, jkTSMAOptionFuncs, pNode->pFuncs); if (TSDB_CODE_SUCCESS == code) { code = tjsonAddObject(pJson, jkTSMAOptionInterval, nodeToJson, pNode->pInterval); } @@ -7753,7 +7777,7 @@ static int32_t tsmaOptionToJson(const void* pObj, SJson* pJson) { static int32_t jsonToTSMAOption(const SJson* pJson, void* pObj) { STSMAOptions* pNode = (STSMAOptions*)pObj; - int32_t code = jsonToNodeList(pJson, jkTSMAOptionFuncs, &pNode->pFuncs); + int32_t code = jsonToNodeList(pJson, jkTSMAOptionFuncs, &pNode->pFuncs); if (TSDB_CODE_SUCCESS == code) { code = jsonToNodeObject(pJson, jkTSMAOptionInterval, &pNode->pInterval); } @@ -7771,7 +7795,7 @@ static const char* jkCreateTSMAStmtpOptions = "Options"; static int32_t createTSMAStmtToJson(const void* pObj, SJson* pJson) { const SCreateTSMAStmt* pNode = (const SCreateTSMAStmt*)pObj; - int32_t code = tjsonAddBoolToObject(pJson, jkCreateTSMAStmtIgnoreExists, pNode->ignoreExists); + int32_t code = tjsonAddBoolToObject(pJson, jkCreateTSMAStmtIgnoreExists, pNode->ignoreExists); if (TSDB_CODE_SUCCESS == code) { code = tjsonAddStringToObject(pJson, jkCreateTSMAStmtTsmaName, pNode->tsmaName); } @@ -7789,7 +7813,7 @@ static int32_t createTSMAStmtToJson(const void* pObj, SJson* pJson) { static int32_t jsonToCreateTSMAStmt(const SJson* pJson, void* pObj) { SCreateTSMAStmt* pNode = (SCreateTSMAStmt*)pObj; - int32_t code = tjsonGetBoolValue(pJson, jkCreateTSMAStmtIgnoreExists, &pNode->ignoreExists); + int32_t code = tjsonGetBoolValue(pJson, jkCreateTSMAStmtIgnoreExists, &pNode->ignoreExists); if (TSDB_CODE_SUCCESS == code) { code = tjsonGetStringValue(pJson, jkCreateTSMAStmtTsmaName, pNode->tsmaName); } @@ -7811,7 +7835,7 @@ static const char* jkDropTSMAStmtTsmaName = "TSMAName"; static int32_t dropTSMAStmtToJson(const void* pObj, SJson* pJson) { const SDropTSMAStmt* pNode = (const SDropTSMAStmt*)pObj; - int32_t code = tjsonAddBoolToObject(pJson, jkDropTSMAStmtIgnoreNotExists, pNode->ignoreNotExists); + int32_t code = tjsonAddBoolToObject(pJson, jkDropTSMAStmtIgnoreNotExists, pNode->ignoreNotExists); if (TSDB_CODE_SUCCESS == code) { code = tjsonAddStringToObject(pJson, jkDropTSMAStmtDbName, pNode->dbName); } @@ -7823,7 +7847,7 @@ static int32_t dropTSMAStmtToJson(const void* pObj, SJson* pJson) { static int32_t jsonToDropTSMAStmt(const SJson* pJson, void* pObj) { SDropTSMAStmt* pNode = (SDropTSMAStmt*)pObj; - int32_t code = tjsonGetBoolValue(pJson, jkDropTSMAStmtIgnoreNotExists, &pNode->ignoreNotExists); + int32_t code = tjsonGetBoolValue(pJson, jkDropTSMAStmtIgnoreNotExists, &pNode->ignoreNotExists); if (TSDB_CODE_SUCCESS == code) { code = tjsonGetStringValue(pJson, jkDropTSMAStmtDbName, pNode->dbName); } @@ -8361,7 +8385,7 @@ static int32_t jsonToSpecificNode(const SJson* pJson, void* pObj) { case QUERY_NODE_BALANCE_VGROUP_LEADER_STMT: return TSDB_CODE_SUCCESS; case QUERY_NODE_BALANCE_VGROUP_LEADER_DATABASE_STMT: - return TSDB_CODE_SUCCESS; // SBalanceVgroupLeaderStmt has no fields to deserialize. + return TSDB_CODE_SUCCESS; // SBalanceVgroupLeaderStmt has no fields to deserialize. case QUERY_NODE_MERGE_VGROUP_STMT: return jsonToMergeVgroupStmt(pJson, pObj); case QUERY_NODE_REDISTRIBUTE_VGROUP_STMT: diff --git a/source/libs/nodes/src/nodesUtilFuncs.c b/source/libs/nodes/src/nodesUtilFuncs.c index ad5284c484..77b7350c94 100644 --- a/source/libs/nodes/src/nodesUtilFuncs.c +++ b/source/libs/nodes/src/nodesUtilFuncs.c @@ -14,6 +14,7 @@ */ #include "cmdnodes.h" +#include "functionMgt.h" #include "nodesUtil.h" #include "plannodes.h" #include "querynodes.h" @@ -22,7 +23,6 @@ #include "tdatablock.h" #include "thash.h" #include "tref.h" -#include "functionMgt.h" typedef struct SNodeMemChunk { int32_t availableSize; @@ -56,15 +56,13 @@ char* getJoinSTypeString(EJoinSubType type) { char* getFullJoinTypeString(EJoinType type, EJoinSubType stype) { static char* joinFullType[][8] = { - {"INNER", "INNER", "INNER", "INNER", "INNER", "INNER ANY", "INNER", "INNER"}, - {"LEFT", "LEFT", "LEFT OUTER", "LEFT SEMI", "LEFT ANTI", "LEFT ANY", "LEFT ASOF", "LEFT WINDOW"}, - {"RIGHT", "RIGHT", "RIGHT OUTER", "RIGHT SEMI", "RIGHT ANTI", "RIGHT ANY", "RIGHT ASOF", "RIGHT WINDOW"}, - {"FULL", "FULL", "FULL OUTER", "FULL", "FULL", "FULL ANY", "FULL", "FULL"} - }; + {"INNER", "INNER", "INNER", "INNER", "INNER", "INNER ANY", "INNER", "INNER"}, + {"LEFT", "LEFT", "LEFT OUTER", "LEFT SEMI", "LEFT ANTI", "LEFT ANY", "LEFT ASOF", "LEFT WINDOW"}, + {"RIGHT", "RIGHT", "RIGHT OUTER", "RIGHT SEMI", "RIGHT ANTI", "RIGHT ANY", "RIGHT ASOF", "RIGHT WINDOW"}, + {"FULL", "FULL", "FULL OUTER", "FULL", "FULL", "FULL ANY", "FULL", "FULL"}}; return joinFullType[type][stype]; } - int32_t mergeJoinConds(SNode** ppDst, SNode** ppSrc) { if (NULL == *ppSrc) { return TSDB_CODE_SUCCESS; @@ -74,14 +72,16 @@ int32_t mergeJoinConds(SNode** ppDst, SNode** ppSrc) { *ppSrc = NULL; return TSDB_CODE_SUCCESS; } - if (QUERY_NODE_LOGIC_CONDITION == nodeType(*ppSrc) && ((SLogicConditionNode*)(*ppSrc))->condType == LOGIC_COND_TYPE_AND) { + if (QUERY_NODE_LOGIC_CONDITION == nodeType(*ppSrc) && + ((SLogicConditionNode*)(*ppSrc))->condType == LOGIC_COND_TYPE_AND) { TSWAP(*ppDst, *ppSrc); } int32_t code = 0; if (QUERY_NODE_LOGIC_CONDITION == nodeType(*ppDst)) { SLogicConditionNode* pDst = (SLogicConditionNode*)*ppDst; if (pDst->condType == LOGIC_COND_TYPE_AND) { - if (QUERY_NODE_LOGIC_CONDITION == nodeType(*ppSrc) && ((SLogicConditionNode*)(*ppSrc))->condType == LOGIC_COND_TYPE_AND) { + if (QUERY_NODE_LOGIC_CONDITION == nodeType(*ppSrc) && + ((SLogicConditionNode*)(*ppSrc))->condType == LOGIC_COND_TYPE_AND) { code = nodesListStrictAppendList(pDst->pParameterList, ((SLogicConditionNode*)(*ppSrc))->pParameterList); ((SLogicConditionNode*)(*ppSrc))->pParameterList = NULL; } else { @@ -109,13 +109,12 @@ int32_t mergeJoinConds(SNode** ppDst, SNode** ppSrc) { *ppSrc = NULL; code = nodesListMakeStrictAppend(&pLogicCond->pParameterList, *ppDst); } - if (TSDB_CODE_SUCCESS == code) { + if (TSDB_CODE_SUCCESS == code) { *ppDst = (SNode*)pLogicCond; } return code; } - static int32_t callocNodeChunk(SNodeAllocator* pAllocator, SNodeMemChunk** pOutChunk) { SNodeMemChunk* pNewChunk = taosMemoryCalloc(1, sizeof(SNodeMemChunk) + pAllocator->chunkSize); if (NULL == pNewChunk) { @@ -155,11 +154,12 @@ static int32_t nodesCallocImpl(int32_t size, void** pOut) { void* p = g_pNodeAllocator->pCurrChunk->pBuf + g_pNodeAllocator->pCurrChunk->usedSize; g_pNodeAllocator->pCurrChunk->usedSize += size; *pOut = p; - return TSDB_CODE_SUCCESS;; + return TSDB_CODE_SUCCESS; + ; } static int32_t nodesCalloc(int32_t num, int32_t size, void** pOut) { - void* p = NULL; + void* p = NULL; int32_t code = nodesCallocImpl(num * size + 1, &p); if (TSDB_CODE_SUCCESS != code) { return code; @@ -237,7 +237,8 @@ void nodesDestroyAllocatorSet() { refId = pAllocator->self; int32_t code = taosRemoveRef(g_allocatorReqRefPool, refId); if (TSDB_CODE_SUCCESS != code) { - nodesError("failed to remove ref at: %s:%d, rsetId:%d, refId:%"PRId64, __func__, __LINE__, g_allocatorReqRefPool, refId); + nodesError("failed to remove ref at: %s:%d, rsetId:%d, refId:%" PRId64, __func__, __LINE__, + g_allocatorReqRefPool, refId); } pAllocator = taosIterateRef(g_allocatorReqRefPool, refId); } @@ -333,7 +334,8 @@ void nodesDestroyAllocator(int64_t allocatorId) { int32_t code = taosRemoveRef(g_allocatorReqRefPool, allocatorId); if (TSDB_CODE_SUCCESS != code) { - nodesError("failed to remove ref at: %s:%d, rsetId:%d, refId:%"PRId64, __func__, __LINE__, g_allocatorReqRefPool, allocatorId); + nodesError("failed to remove ref at: %s:%d, rsetId:%d, refId:%" PRId64, __func__, __LINE__, g_allocatorReqRefPool, + allocatorId); } } @@ -348,204 +350,297 @@ static int32_t makeNode(ENodeType type, int32_t size, SNode** ppNode) { } int32_t nodesMakeNode(ENodeType type, SNode** ppNodeOut) { - SNode* pNode = NULL; + SNode* pNode = NULL; int32_t code = 0; switch (type) { case QUERY_NODE_COLUMN: - code = makeNode(type, sizeof(SColumnNode), &pNode); break; + code = makeNode(type, sizeof(SColumnNode), &pNode); + break; case QUERY_NODE_VALUE: - code = makeNode(type, sizeof(SValueNode), &pNode); break; + code = makeNode(type, sizeof(SValueNode), &pNode); + break; case QUERY_NODE_OPERATOR: - code = makeNode(type, sizeof(SOperatorNode), &pNode); break; + code = makeNode(type, sizeof(SOperatorNode), &pNode); + break; case QUERY_NODE_LOGIC_CONDITION: - code = makeNode(type, sizeof(SLogicConditionNode), &pNode); break; + code = makeNode(type, sizeof(SLogicConditionNode), &pNode); + break; case QUERY_NODE_FUNCTION: - code = makeNode(type, sizeof(SFunctionNode), &pNode); break; + code = makeNode(type, sizeof(SFunctionNode), &pNode); + break; case QUERY_NODE_REAL_TABLE: - code = makeNode(type, sizeof(SRealTableNode), &pNode); break; + code = makeNode(type, sizeof(SRealTableNode), &pNode); + break; case QUERY_NODE_TEMP_TABLE: - code = makeNode(type, sizeof(STempTableNode), &pNode); break; + code = makeNode(type, sizeof(STempTableNode), &pNode); + break; case QUERY_NODE_JOIN_TABLE: - code = makeNode(type, sizeof(SJoinTableNode), &pNode); break; + code = makeNode(type, sizeof(SJoinTableNode), &pNode); + break; case QUERY_NODE_GROUPING_SET: - code = makeNode(type, sizeof(SGroupingSetNode), &pNode); break; + code = makeNode(type, sizeof(SGroupingSetNode), &pNode); + break; case QUERY_NODE_ORDER_BY_EXPR: - code = makeNode(type, sizeof(SOrderByExprNode), &pNode); break; + code = makeNode(type, sizeof(SOrderByExprNode), &pNode); + break; case QUERY_NODE_LIMIT: - code = makeNode(type, sizeof(SLimitNode), &pNode); break; + code = makeNode(type, sizeof(SLimitNode), &pNode); + break; case QUERY_NODE_STATE_WINDOW: - code = makeNode(type, sizeof(SStateWindowNode), &pNode); break; + code = makeNode(type, sizeof(SStateWindowNode), &pNode); + break; case QUERY_NODE_SESSION_WINDOW: - code = makeNode(type, sizeof(SSessionWindowNode), &pNode); break; + code = makeNode(type, sizeof(SSessionWindowNode), &pNode); + break; case QUERY_NODE_INTERVAL_WINDOW: - code = makeNode(type, sizeof(SIntervalWindowNode), &pNode); break; + code = makeNode(type, sizeof(SIntervalWindowNode), &pNode); + break; case QUERY_NODE_NODE_LIST: - code = makeNode(type, sizeof(SNodeListNode), &pNode); break; + code = makeNode(type, sizeof(SNodeListNode), &pNode); + break; case QUERY_NODE_FILL: - code = makeNode(type, sizeof(SFillNode), &pNode); break; + code = makeNode(type, sizeof(SFillNode), &pNode); + break; case QUERY_NODE_RAW_EXPR: - code = makeNode(type, sizeof(SRawExprNode), &pNode); break; + code = makeNode(type, sizeof(SRawExprNode), &pNode); + break; case QUERY_NODE_TARGET: - code = makeNode(type, sizeof(STargetNode), &pNode); break; + code = makeNode(type, sizeof(STargetNode), &pNode); + break; case QUERY_NODE_DATABLOCK_DESC: - code = makeNode(type, sizeof(SDataBlockDescNode), &pNode); break; + code = makeNode(type, sizeof(SDataBlockDescNode), &pNode); + break; case QUERY_NODE_SLOT_DESC: - code = makeNode(type, sizeof(SSlotDescNode), &pNode); break; + code = makeNode(type, sizeof(SSlotDescNode), &pNode); + break; case QUERY_NODE_COLUMN_DEF: - code = makeNode(type, sizeof(SColumnDefNode), &pNode); break; + code = makeNode(type, sizeof(SColumnDefNode), &pNode); + break; case QUERY_NODE_DOWNSTREAM_SOURCE: - code = makeNode(type, sizeof(SDownstreamSourceNode), &pNode); break; + code = makeNode(type, sizeof(SDownstreamSourceNode), &pNode); + break; case QUERY_NODE_DATABASE_OPTIONS: - code = makeNode(type, sizeof(SDatabaseOptions), &pNode); break; + code = makeNode(type, sizeof(SDatabaseOptions), &pNode); + break; case QUERY_NODE_TABLE_OPTIONS: - code = makeNode(type, sizeof(STableOptions), &pNode); break; + code = makeNode(type, sizeof(STableOptions), &pNode); + break; case QUERY_NODE_COLUMN_OPTIONS: - code = makeNode(type, sizeof(SColumnOptions), &pNode); break; + code = makeNode(type, sizeof(SColumnOptions), &pNode); + break; case QUERY_NODE_INDEX_OPTIONS: - code = makeNode(type, sizeof(SIndexOptions), &pNode); break; + code = makeNode(type, sizeof(SIndexOptions), &pNode); + break; case QUERY_NODE_EXPLAIN_OPTIONS: - code = makeNode(type, sizeof(SExplainOptions), &pNode); break; + code = makeNode(type, sizeof(SExplainOptions), &pNode); + break; case QUERY_NODE_STREAM_OPTIONS: - code = makeNode(type, sizeof(SStreamOptions), &pNode); break; + code = makeNode(type, sizeof(SStreamOptions), &pNode); + break; case QUERY_NODE_LEFT_VALUE: - code = makeNode(type, sizeof(SLeftValueNode), &pNode); break; + code = makeNode(type, sizeof(SLeftValueNode), &pNode); + break; case QUERY_NODE_COLUMN_REF: - code = makeNode(type, sizeof(SColumnRefNode), &pNode); break; + code = makeNode(type, sizeof(SColumnRefNode), &pNode); + break; case QUERY_NODE_WHEN_THEN: - code = makeNode(type, sizeof(SWhenThenNode), &pNode); break; + code = makeNode(type, sizeof(SWhenThenNode), &pNode); + break; case QUERY_NODE_CASE_WHEN: - code = makeNode(type, sizeof(SCaseWhenNode), &pNode); break; + code = makeNode(type, sizeof(SCaseWhenNode), &pNode); + break; case QUERY_NODE_EVENT_WINDOW: - code = makeNode(type, sizeof(SEventWindowNode), &pNode); break; + code = makeNode(type, sizeof(SEventWindowNode), &pNode); + break; case QUERY_NODE_COUNT_WINDOW: - code = makeNode(type, sizeof(SCountWindowNode), &pNode); break; + code = makeNode(type, sizeof(SCountWindowNode), &pNode); + break; case QUERY_NODE_ANOMALY_WINDOW: - code = makeNode(type, sizeof(SAnomalyWindowNode), &pNode); break; + code = makeNode(type, sizeof(SAnomalyWindowNode), &pNode); + break; case QUERY_NODE_HINT: - code = makeNode(type, sizeof(SHintNode), &pNode); break; + code = makeNode(type, sizeof(SHintNode), &pNode); + break; case QUERY_NODE_VIEW: - code = makeNode(type, sizeof(SViewNode), &pNode); break; + code = makeNode(type, sizeof(SViewNode), &pNode); + break; case QUERY_NODE_WINDOW_OFFSET: - code = makeNode(type, sizeof(SWindowOffsetNode), &pNode); break; + code = makeNode(type, sizeof(SWindowOffsetNode), &pNode); + break; case QUERY_NODE_SET_OPERATOR: - code = makeNode(type, sizeof(SSetOperator), &pNode); break; + code = makeNode(type, sizeof(SSetOperator), &pNode); + break; case QUERY_NODE_SELECT_STMT: - code = makeNode(type, sizeof(SSelectStmt), &pNode); break; + code = makeNode(type, sizeof(SSelectStmt), &pNode); + break; case QUERY_NODE_VNODE_MODIFY_STMT: - code = makeNode(type, sizeof(SVnodeModifyOpStmt), &pNode); break; + code = makeNode(type, sizeof(SVnodeModifyOpStmt), &pNode); + break; case QUERY_NODE_CREATE_DATABASE_STMT: - code = makeNode(type, sizeof(SCreateDatabaseStmt), &pNode); break; + code = makeNode(type, sizeof(SCreateDatabaseStmt), &pNode); + break; case QUERY_NODE_DROP_DATABASE_STMT: - code = makeNode(type, sizeof(SDropDatabaseStmt), &pNode); break; + code = makeNode(type, sizeof(SDropDatabaseStmt), &pNode); + break; case QUERY_NODE_ALTER_DATABASE_STMT: - code = makeNode(type, sizeof(SAlterDatabaseStmt), &pNode); break; + code = makeNode(type, sizeof(SAlterDatabaseStmt), &pNode); + break; case QUERY_NODE_FLUSH_DATABASE_STMT: - code = makeNode(type, sizeof(SFlushDatabaseStmt), &pNode); break; + code = makeNode(type, sizeof(SFlushDatabaseStmt), &pNode); + break; case QUERY_NODE_TRIM_DATABASE_STMT: - code = makeNode(type, sizeof(STrimDatabaseStmt), &pNode); break; + code = makeNode(type, sizeof(STrimDatabaseStmt), &pNode); + break; case QUERY_NODE_S3MIGRATE_DATABASE_STMT: - code = makeNode(type, sizeof(SS3MigrateDatabaseStmt), &pNode); break; + code = makeNode(type, sizeof(SS3MigrateDatabaseStmt), &pNode); + break; case QUERY_NODE_CREATE_TABLE_STMT: - code = makeNode(type, sizeof(SCreateTableStmt), &pNode); break; + code = makeNode(type, sizeof(SCreateTableStmt), &pNode); + break; case QUERY_NODE_CREATE_SUBTABLE_CLAUSE: - code = makeNode(type, sizeof(SCreateSubTableClause), &pNode); break; + code = makeNode(type, sizeof(SCreateSubTableClause), &pNode); + break; case QUERY_NODE_CREATE_SUBTABLE_FROM_FILE_CLAUSE: - code = makeNode(type, sizeof(SCreateSubTableFromFileClause), &pNode); break; + code = makeNode(type, sizeof(SCreateSubTableFromFileClause), &pNode); + break; case QUERY_NODE_CREATE_MULTI_TABLES_STMT: - code = makeNode(type, sizeof(SCreateMultiTablesStmt), &pNode); break; + code = makeNode(type, sizeof(SCreateMultiTablesStmt), &pNode); + break; case QUERY_NODE_DROP_TABLE_CLAUSE: - code = makeNode(type, sizeof(SDropTableClause), &pNode); break; + code = makeNode(type, sizeof(SDropTableClause), &pNode); + break; case QUERY_NODE_DROP_TABLE_STMT: - code = makeNode(type, sizeof(SDropTableStmt), &pNode); break; + code = makeNode(type, sizeof(SDropTableStmt), &pNode); + break; case QUERY_NODE_DROP_SUPER_TABLE_STMT: - code = makeNode(type, sizeof(SDropSuperTableStmt), &pNode); break; + code = makeNode(type, sizeof(SDropSuperTableStmt), &pNode); + break; case QUERY_NODE_ALTER_TABLE_STMT: case QUERY_NODE_ALTER_SUPER_TABLE_STMT: - code = makeNode(type, sizeof(SAlterTableStmt), &pNode); break; + code = makeNode(type, sizeof(SAlterTableStmt), &pNode); + break; case QUERY_NODE_CREATE_USER_STMT: - code = makeNode(type, sizeof(SCreateUserStmt), &pNode); break; + code = makeNode(type, sizeof(SCreateUserStmt), &pNode); + break; case QUERY_NODE_ALTER_USER_STMT: - code = makeNode(type, sizeof(SAlterUserStmt), &pNode); break; + code = makeNode(type, sizeof(SAlterUserStmt), &pNode); + break; case QUERY_NODE_DROP_USER_STMT: - code = makeNode(type, sizeof(SDropUserStmt), &pNode); break; + code = makeNode(type, sizeof(SDropUserStmt), &pNode); + break; case QUERY_NODE_USE_DATABASE_STMT: - code = makeNode(type, sizeof(SUseDatabaseStmt), &pNode); break; + code = makeNode(type, sizeof(SUseDatabaseStmt), &pNode); + break; case QUERY_NODE_CREATE_DNODE_STMT: - code = makeNode(type, sizeof(SCreateDnodeStmt), &pNode); break; + code = makeNode(type, sizeof(SCreateDnodeStmt), &pNode); + break; case QUERY_NODE_DROP_DNODE_STMT: - code = makeNode(type, sizeof(SDropDnodeStmt), &pNode); break; + code = makeNode(type, sizeof(SDropDnodeStmt), &pNode); + break; case QUERY_NODE_ALTER_DNODE_STMT: - code = makeNode(type, sizeof(SAlterDnodeStmt), &pNode); break; + code = makeNode(type, sizeof(SAlterDnodeStmt), &pNode); + break; case QUERY_NODE_CREATE_ANODE_STMT: - code = makeNode(type, sizeof(SCreateAnodeStmt), &pNode); break; + code = makeNode(type, sizeof(SCreateAnodeStmt), &pNode); + break; case QUERY_NODE_DROP_ANODE_STMT: - code = makeNode(type, sizeof(SDropAnodeStmt), &pNode); break; + code = makeNode(type, sizeof(SDropAnodeStmt), &pNode); + break; case QUERY_NODE_UPDATE_ANODE_STMT: - code = makeNode(type, sizeof(SUpdateAnodeStmt), &pNode); break; + code = makeNode(type, sizeof(SUpdateAnodeStmt), &pNode); + break; case QUERY_NODE_CREATE_INDEX_STMT: - code = makeNode(type, sizeof(SCreateIndexStmt), &pNode); break; + code = makeNode(type, sizeof(SCreateIndexStmt), &pNode); + break; case QUERY_NODE_DROP_INDEX_STMT: - code = makeNode(type, sizeof(SDropIndexStmt), &pNode); break; + code = makeNode(type, sizeof(SDropIndexStmt), &pNode); + break; case QUERY_NODE_CREATE_QNODE_STMT: case QUERY_NODE_CREATE_BNODE_STMT: case QUERY_NODE_CREATE_SNODE_STMT: case QUERY_NODE_CREATE_MNODE_STMT: - code = makeNode(type, sizeof(SCreateComponentNodeStmt), &pNode); break; + code = makeNode(type, sizeof(SCreateComponentNodeStmt), &pNode); + break; case QUERY_NODE_DROP_QNODE_STMT: case QUERY_NODE_DROP_BNODE_STMT: case QUERY_NODE_DROP_SNODE_STMT: case QUERY_NODE_DROP_MNODE_STMT: - code = makeNode(type, sizeof(SDropComponentNodeStmt), &pNode); break; + code = makeNode(type, sizeof(SDropComponentNodeStmt), &pNode); + break; case QUERY_NODE_CREATE_TOPIC_STMT: - code = makeNode(type, sizeof(SCreateTopicStmt), &pNode); break; + code = makeNode(type, sizeof(SCreateTopicStmt), &pNode); + break; case QUERY_NODE_DROP_TOPIC_STMT: - code = makeNode(type, sizeof(SDropTopicStmt), &pNode); break; + code = makeNode(type, sizeof(SDropTopicStmt), &pNode); + break; case QUERY_NODE_DROP_CGROUP_STMT: - code = makeNode(type, sizeof(SDropCGroupStmt), &pNode); break; + code = makeNode(type, sizeof(SDropCGroupStmt), &pNode); + break; case QUERY_NODE_ALTER_LOCAL_STMT: - code = makeNode(type, sizeof(SAlterLocalStmt), &pNode); break; + code = makeNode(type, sizeof(SAlterLocalStmt), &pNode); + break; case QUERY_NODE_EXPLAIN_STMT: - code = makeNode(type, sizeof(SExplainStmt), &pNode); break; + code = makeNode(type, sizeof(SExplainStmt), &pNode); + break; case QUERY_NODE_DESCRIBE_STMT: - code = makeNode(type, sizeof(SDescribeStmt), &pNode); break; + code = makeNode(type, sizeof(SDescribeStmt), &pNode); + break; case QUERY_NODE_RESET_QUERY_CACHE_STMT: - code = makeNode(type, sizeof(SNode), &pNode); break; + code = makeNode(type, sizeof(SNode), &pNode); + break; case QUERY_NODE_COMPACT_DATABASE_STMT: - code = makeNode(type, sizeof(SCompactDatabaseStmt), &pNode); break; + code = makeNode(type, sizeof(SCompactDatabaseStmt), &pNode); + break; case QUERY_NODE_COMPACT_VGROUPS_STMT: - code = makeNode(type, sizeof(SCompactVgroupsStmt), &pNode); break; + code = makeNode(type, sizeof(SCompactVgroupsStmt), &pNode); + break; case QUERY_NODE_CREATE_FUNCTION_STMT: - code = makeNode(type, sizeof(SCreateFunctionStmt), &pNode); break; + code = makeNode(type, sizeof(SCreateFunctionStmt), &pNode); + break; case QUERY_NODE_DROP_FUNCTION_STMT: - code = makeNode(type, sizeof(SDropFunctionStmt), &pNode); break; + code = makeNode(type, sizeof(SDropFunctionStmt), &pNode); + break; case QUERY_NODE_CREATE_STREAM_STMT: - code = makeNode(type, sizeof(SCreateStreamStmt), &pNode); break; + code = makeNode(type, sizeof(SCreateStreamStmt), &pNode); + break; case QUERY_NODE_DROP_STREAM_STMT: - code = makeNode(type, sizeof(SDropStreamStmt), &pNode); break; + code = makeNode(type, sizeof(SDropStreamStmt), &pNode); + break; case QUERY_NODE_PAUSE_STREAM_STMT: - code = makeNode(type, sizeof(SPauseStreamStmt), &pNode); break; + code = makeNode(type, sizeof(SPauseStreamStmt), &pNode); + break; case QUERY_NODE_RESUME_STREAM_STMT: - code = makeNode(type, sizeof(SResumeStreamStmt), &pNode); break; + code = makeNode(type, sizeof(SResumeStreamStmt), &pNode); + break; case QUERY_NODE_BALANCE_VGROUP_STMT: - code = makeNode(type, sizeof(SBalanceVgroupStmt), &pNode); break; + code = makeNode(type, sizeof(SBalanceVgroupStmt), &pNode); + break; case QUERY_NODE_BALANCE_VGROUP_LEADER_STMT: - code = makeNode(type, sizeof(SBalanceVgroupLeaderStmt), &pNode); break; + code = makeNode(type, sizeof(SBalanceVgroupLeaderStmt), &pNode); + break; case QUERY_NODE_BALANCE_VGROUP_LEADER_DATABASE_STMT: - code = makeNode(type, sizeof(SBalanceVgroupLeaderStmt), &pNode); break; + code = makeNode(type, sizeof(SBalanceVgroupLeaderStmt), &pNode); + break; case QUERY_NODE_MERGE_VGROUP_STMT: - code = makeNode(type, sizeof(SMergeVgroupStmt), &pNode); break; + code = makeNode(type, sizeof(SMergeVgroupStmt), &pNode); + break; case QUERY_NODE_REDISTRIBUTE_VGROUP_STMT: - code = makeNode(type, sizeof(SRedistributeVgroupStmt), &pNode); break; + code = makeNode(type, sizeof(SRedistributeVgroupStmt), &pNode); + break; case QUERY_NODE_SPLIT_VGROUP_STMT: - code = makeNode(type, sizeof(SSplitVgroupStmt), &pNode); break; + code = makeNode(type, sizeof(SSplitVgroupStmt), &pNode); + break; case QUERY_NODE_SYNCDB_STMT: break; case QUERY_NODE_GRANT_STMT: - code = makeNode(type, sizeof(SGrantStmt), &pNode); break; + code = makeNode(type, sizeof(SGrantStmt), &pNode); + break; case QUERY_NODE_REVOKE_STMT: - code = makeNode(type, sizeof(SRevokeStmt), &pNode); break; + code = makeNode(type, sizeof(SRevokeStmt), &pNode); + break; case QUERY_NODE_ALTER_CLUSTER_STMT: - code = makeNode(type, sizeof(SAlterClusterStmt), &pNode); break; + code = makeNode(type, sizeof(SAlterClusterStmt), &pNode); + break; case QUERY_NODE_SHOW_DNODES_STMT: case QUERY_NODE_SHOW_MNODES_STMT: case QUERY_NODE_SHOW_MODULES_STMT: @@ -585,191 +680,280 @@ int32_t nodesMakeNode(ENodeType type, SNode** ppNodeOut) { case QUERY_NODE_SHOW_CLUSTER_MACHINES_STMT: case QUERY_NODE_SHOW_ENCRYPTIONS_STMT: case QUERY_NODE_SHOW_TSMAS_STMT: - code = makeNode(type, sizeof(SShowStmt), &pNode); break; + code = makeNode(type, sizeof(SShowStmt), &pNode); + break; case QUERY_NODE_SHOW_TABLE_TAGS_STMT: - code = makeNode(type, sizeof(SShowTableTagsStmt), &pNode); break; + code = makeNode(type, sizeof(SShowTableTagsStmt), &pNode); + break; case QUERY_NODE_SHOW_DNODE_VARIABLES_STMT: - code = makeNode(type, sizeof(SShowDnodeVariablesStmt), &pNode); break; + code = makeNode(type, sizeof(SShowDnodeVariablesStmt), &pNode); + break; case QUERY_NODE_SHOW_CREATE_DATABASE_STMT: - code = makeNode(type, sizeof(SShowCreateDatabaseStmt), &pNode); break; + code = makeNode(type, sizeof(SShowCreateDatabaseStmt), &pNode); + break; case QUERY_NODE_SHOW_DB_ALIVE_STMT: case QUERY_NODE_SHOW_CLUSTER_ALIVE_STMT: - code = makeNode(type, sizeof(SShowAliveStmt), &pNode); break; + code = makeNode(type, sizeof(SShowAliveStmt), &pNode); + break; case QUERY_NODE_SHOW_CREATE_TABLE_STMT: case QUERY_NODE_SHOW_CREATE_STABLE_STMT: - code = makeNode(type, sizeof(SShowCreateTableStmt), &pNode); break; + code = makeNode(type, sizeof(SShowCreateTableStmt), &pNode); + break; case QUERY_NODE_SHOW_CREATE_VIEW_STMT: - code = makeNode(type, sizeof(SShowCreateViewStmt), &pNode); break; + code = makeNode(type, sizeof(SShowCreateViewStmt), &pNode); + break; case QUERY_NODE_SHOW_TABLE_DISTRIBUTED_STMT: - code = makeNode(type, sizeof(SShowTableDistributedStmt), &pNode); break; + code = makeNode(type, sizeof(SShowTableDistributedStmt), &pNode); + break; case QUERY_NODE_SHOW_COMPACTS_STMT: - code = makeNode(type, sizeof(SShowCompactsStmt), &pNode); break; + code = makeNode(type, sizeof(SShowCompactsStmt), &pNode); + break; case QUERY_NODE_SHOW_COMPACT_DETAILS_STMT: - code = makeNode(type, sizeof(SShowCompactDetailsStmt), &pNode); break; + code = makeNode(type, sizeof(SShowCompactDetailsStmt), &pNode); + break; case QUERY_NODE_KILL_QUERY_STMT: - code = makeNode(type, sizeof(SKillQueryStmt), &pNode); break; + code = makeNode(type, sizeof(SKillQueryStmt), &pNode); + break; case QUERY_NODE_KILL_TRANSACTION_STMT: case QUERY_NODE_KILL_CONNECTION_STMT: case QUERY_NODE_KILL_COMPACT_STMT: - code = makeNode(type, sizeof(SKillStmt), &pNode); break; + code = makeNode(type, sizeof(SKillStmt), &pNode); + break; case QUERY_NODE_DELETE_STMT: - code = makeNode(type, sizeof(SDeleteStmt), &pNode); break; + code = makeNode(type, sizeof(SDeleteStmt), &pNode); + break; case QUERY_NODE_INSERT_STMT: - code = makeNode(type, sizeof(SInsertStmt), &pNode); break; + code = makeNode(type, sizeof(SInsertStmt), &pNode); + break; case QUERY_NODE_QUERY: - code = makeNode(type, sizeof(SQuery), &pNode); break; + code = makeNode(type, sizeof(SQuery), &pNode); + break; case QUERY_NODE_RESTORE_DNODE_STMT: case QUERY_NODE_RESTORE_QNODE_STMT: case QUERY_NODE_RESTORE_MNODE_STMT: case QUERY_NODE_RESTORE_VNODE_STMT: - code = makeNode(type, sizeof(SRestoreComponentNodeStmt), &pNode); break; + code = makeNode(type, sizeof(SRestoreComponentNodeStmt), &pNode); + break; case QUERY_NODE_CREATE_VIEW_STMT: - code = makeNode(type, sizeof(SCreateViewStmt), &pNode); break; + code = makeNode(type, sizeof(SCreateViewStmt), &pNode); + break; case QUERY_NODE_DROP_VIEW_STMT: - code = makeNode(type, sizeof(SDropViewStmt), &pNode); break; + code = makeNode(type, sizeof(SDropViewStmt), &pNode); + break; case QUERY_NODE_CREATE_TSMA_STMT: - code = makeNode(type, sizeof(SCreateTSMAStmt), &pNode); break; + code = makeNode(type, sizeof(SCreateTSMAStmt), &pNode); + break; case QUERY_NODE_DROP_TSMA_STMT: - code = makeNode(type, sizeof(SDropTSMAStmt), &pNode); break; + code = makeNode(type, sizeof(SDropTSMAStmt), &pNode); + break; case QUERY_NODE_TSMA_OPTIONS: - code = makeNode(type, sizeof(STSMAOptions), &pNode); break; + code = makeNode(type, sizeof(STSMAOptions), &pNode); + break; case QUERY_NODE_LOGIC_PLAN_SCAN: - code = makeNode(type, sizeof(SScanLogicNode), &pNode); break; + code = makeNode(type, sizeof(SScanLogicNode), &pNode); + break; case QUERY_NODE_LOGIC_PLAN_JOIN: - code = makeNode(type, sizeof(SJoinLogicNode), &pNode); break; + code = makeNode(type, sizeof(SJoinLogicNode), &pNode); + break; case QUERY_NODE_LOGIC_PLAN_AGG: - code = makeNode(type, sizeof(SAggLogicNode), &pNode); break; + code = makeNode(type, sizeof(SAggLogicNode), &pNode); + break; case QUERY_NODE_LOGIC_PLAN_PROJECT: - code = makeNode(type, sizeof(SProjectLogicNode), &pNode); break; + code = makeNode(type, sizeof(SProjectLogicNode), &pNode); + break; case QUERY_NODE_LOGIC_PLAN_VNODE_MODIFY: - code = makeNode(type, sizeof(SVnodeModifyLogicNode), &pNode); break; + code = makeNode(type, sizeof(SVnodeModifyLogicNode), &pNode); + break; case QUERY_NODE_LOGIC_PLAN_EXCHANGE: - code = makeNode(type, sizeof(SExchangeLogicNode), &pNode); break; + code = makeNode(type, sizeof(SExchangeLogicNode), &pNode); + break; case QUERY_NODE_LOGIC_PLAN_MERGE: - code = makeNode(type, sizeof(SMergeLogicNode), &pNode); break; + code = makeNode(type, sizeof(SMergeLogicNode), &pNode); + break; case QUERY_NODE_LOGIC_PLAN_WINDOW: - code = makeNode(type, sizeof(SWindowLogicNode), &pNode); break; + code = makeNode(type, sizeof(SWindowLogicNode), &pNode); + break; case QUERY_NODE_LOGIC_PLAN_FILL: - code = makeNode(type, sizeof(SFillLogicNode), &pNode); break; + code = makeNode(type, sizeof(SFillLogicNode), &pNode); + break; case QUERY_NODE_LOGIC_PLAN_SORT: - code = makeNode(type, sizeof(SSortLogicNode), &pNode); break; + code = makeNode(type, sizeof(SSortLogicNode), &pNode); + break; case QUERY_NODE_LOGIC_PLAN_PARTITION: - code = makeNode(type, sizeof(SPartitionLogicNode), &pNode); break; + code = makeNode(type, sizeof(SPartitionLogicNode), &pNode); + break; case QUERY_NODE_LOGIC_PLAN_INDEF_ROWS_FUNC: - code = makeNode(type, sizeof(SIndefRowsFuncLogicNode), &pNode); break; + code = makeNode(type, sizeof(SIndefRowsFuncLogicNode), &pNode); + break; case QUERY_NODE_LOGIC_PLAN_INTERP_FUNC: - code = makeNode(type, sizeof(SInterpFuncLogicNode), &pNode); break; + code = makeNode(type, sizeof(SInterpFuncLogicNode), &pNode); + break; case QUERY_NODE_LOGIC_PLAN_FORECAST_FUNC: - code = makeNode(type, sizeof(SForecastFuncLogicNode), &pNode); break; + code = makeNode(type, sizeof(SForecastFuncLogicNode), &pNode); + break; case QUERY_NODE_LOGIC_PLAN_GROUP_CACHE: - code = makeNode(type, sizeof(SGroupCacheLogicNode), &pNode); break; + code = makeNode(type, sizeof(SGroupCacheLogicNode), &pNode); + break; case QUERY_NODE_LOGIC_PLAN_DYN_QUERY_CTRL: - code = makeNode(type, sizeof(SDynQueryCtrlLogicNode), &pNode); break; + code = makeNode(type, sizeof(SDynQueryCtrlLogicNode), &pNode); + break; case QUERY_NODE_LOGIC_SUBPLAN: - code = makeNode(type, sizeof(SLogicSubplan), &pNode); break; + code = makeNode(type, sizeof(SLogicSubplan), &pNode); + break; case QUERY_NODE_LOGIC_PLAN: - code = makeNode(type, sizeof(SQueryLogicPlan), &pNode); break; + code = makeNode(type, sizeof(SQueryLogicPlan), &pNode); + break; case QUERY_NODE_PHYSICAL_PLAN_TAG_SCAN: - code = makeNode(type, sizeof(STagScanPhysiNode), &pNode); break; + code = makeNode(type, sizeof(STagScanPhysiNode), &pNode); + break; case QUERY_NODE_PHYSICAL_PLAN_TABLE_SCAN: - code = makeNode(type, sizeof(STableScanPhysiNode), &pNode); break; + code = makeNode(type, sizeof(STableScanPhysiNode), &pNode); + break; case QUERY_NODE_PHYSICAL_PLAN_TABLE_SEQ_SCAN: - code = makeNode(type, sizeof(STableSeqScanPhysiNode), &pNode); break; + code = makeNode(type, sizeof(STableSeqScanPhysiNode), &pNode); + break; case QUERY_NODE_PHYSICAL_PLAN_TABLE_MERGE_SCAN: - code = makeNode(type, sizeof(STableMergeScanPhysiNode), &pNode); break; + code = makeNode(type, sizeof(STableMergeScanPhysiNode), &pNode); + break; case QUERY_NODE_PHYSICAL_PLAN_STREAM_SCAN: - code = makeNode(type, sizeof(SStreamScanPhysiNode), &pNode); break; + code = makeNode(type, sizeof(SStreamScanPhysiNode), &pNode); + break; case QUERY_NODE_PHYSICAL_PLAN_SYSTABLE_SCAN: - code = makeNode(type, sizeof(SSystemTableScanPhysiNode), &pNode); break; + code = makeNode(type, sizeof(SSystemTableScanPhysiNode), &pNode); + break; case QUERY_NODE_PHYSICAL_PLAN_BLOCK_DIST_SCAN: - code = makeNode(type, sizeof(SBlockDistScanPhysiNode), &pNode); break; + code = makeNode(type, sizeof(SBlockDistScanPhysiNode), &pNode); + break; case QUERY_NODE_PHYSICAL_PLAN_LAST_ROW_SCAN: - code = makeNode(type, sizeof(SLastRowScanPhysiNode), &pNode); break; + code = makeNode(type, sizeof(SLastRowScanPhysiNode), &pNode); + break; case QUERY_NODE_PHYSICAL_PLAN_TABLE_COUNT_SCAN: - code = makeNode(type, sizeof(STableCountScanPhysiNode), &pNode); break; + code = makeNode(type, sizeof(STableCountScanPhysiNode), &pNode); + break; case QUERY_NODE_PHYSICAL_PLAN_PROJECT: - code = makeNode(type, sizeof(SProjectPhysiNode), &pNode); break; + code = makeNode(type, sizeof(SProjectPhysiNode), &pNode); + break; case QUERY_NODE_PHYSICAL_PLAN_MERGE_JOIN: - code = makeNode(type, sizeof(SSortMergeJoinPhysiNode), &pNode); break; + code = makeNode(type, sizeof(SSortMergeJoinPhysiNode), &pNode); + break; case QUERY_NODE_PHYSICAL_PLAN_HASH_JOIN: - code = makeNode(type, sizeof(SHashJoinPhysiNode), &pNode); break; + code = makeNode(type, sizeof(SHashJoinPhysiNode), &pNode); + break; case QUERY_NODE_PHYSICAL_PLAN_HASH_AGG: - code = makeNode(type, sizeof(SAggPhysiNode), &pNode); break; + code = makeNode(type, sizeof(SAggPhysiNode), &pNode); + break; case QUERY_NODE_PHYSICAL_PLAN_EXCHANGE: - code = makeNode(type, sizeof(SExchangePhysiNode), &pNode); break; + code = makeNode(type, sizeof(SExchangePhysiNode), &pNode); + break; case QUERY_NODE_PHYSICAL_PLAN_MERGE: - code = makeNode(type, sizeof(SMergePhysiNode), &pNode); break; + code = makeNode(type, sizeof(SMergePhysiNode), &pNode); + break; case QUERY_NODE_PHYSICAL_PLAN_SORT: - code = makeNode(type, sizeof(SSortPhysiNode), &pNode); break; + code = makeNode(type, sizeof(SSortPhysiNode), &pNode); + break; case QUERY_NODE_PHYSICAL_PLAN_GROUP_SORT: - code = makeNode(type, sizeof(SGroupSortPhysiNode), &pNode); break; + code = makeNode(type, sizeof(SGroupSortPhysiNode), &pNode); + break; case QUERY_NODE_PHYSICAL_PLAN_HASH_INTERVAL: - code = makeNode(type, sizeof(SIntervalPhysiNode), &pNode); break; + code = makeNode(type, sizeof(SIntervalPhysiNode), &pNode); + break; case QUERY_NODE_PHYSICAL_PLAN_MERGE_INTERVAL: - code = makeNode(type, sizeof(SMergeIntervalPhysiNode), &pNode); break; + code = makeNode(type, sizeof(SMergeIntervalPhysiNode), &pNode); + break; case QUERY_NODE_PHYSICAL_PLAN_MERGE_ALIGNED_INTERVAL: - code = makeNode(type, sizeof(SMergeAlignedIntervalPhysiNode), &pNode); break; + code = makeNode(type, sizeof(SMergeAlignedIntervalPhysiNode), &pNode); + break; case QUERY_NODE_PHYSICAL_PLAN_STREAM_INTERVAL: - code = makeNode(type, sizeof(SStreamIntervalPhysiNode), &pNode); break; + code = makeNode(type, sizeof(SStreamIntervalPhysiNode), &pNode); + break; case QUERY_NODE_PHYSICAL_PLAN_STREAM_FINAL_INTERVAL: - code = makeNode(type, sizeof(SStreamFinalIntervalPhysiNode), &pNode); break; + code = makeNode(type, sizeof(SStreamFinalIntervalPhysiNode), &pNode); + break; case QUERY_NODE_PHYSICAL_PLAN_STREAM_SEMI_INTERVAL: - code = makeNode(type, sizeof(SStreamSemiIntervalPhysiNode), &pNode); break; + code = makeNode(type, sizeof(SStreamSemiIntervalPhysiNode), &pNode); + break; case QUERY_NODE_PHYSICAL_PLAN_STREAM_MID_INTERVAL: - code = makeNode(type, sizeof(SStreamMidIntervalPhysiNode), &pNode); break; + code = makeNode(type, sizeof(SStreamMidIntervalPhysiNode), &pNode); + break; case QUERY_NODE_PHYSICAL_PLAN_FILL: case QUERY_NODE_PHYSICAL_PLAN_STREAM_FILL: - code = makeNode(type, sizeof(SFillPhysiNode), &pNode); break; + code = makeNode(type, sizeof(SFillPhysiNode), &pNode); + break; case QUERY_NODE_PHYSICAL_PLAN_MERGE_SESSION: - code = makeNode(type, sizeof(SSessionWinodwPhysiNode), &pNode); break; + code = makeNode(type, sizeof(SSessionWinodwPhysiNode), &pNode); + break; case QUERY_NODE_PHYSICAL_PLAN_STREAM_SESSION: - code = makeNode(type, sizeof(SStreamSessionWinodwPhysiNode), &pNode); break; + code = makeNode(type, sizeof(SStreamSessionWinodwPhysiNode), &pNode); + break; case QUERY_NODE_PHYSICAL_PLAN_STREAM_SEMI_SESSION: - code = makeNode(type, sizeof(SStreamSemiSessionWinodwPhysiNode), &pNode); break; + code = makeNode(type, sizeof(SStreamSemiSessionWinodwPhysiNode), &pNode); + break; case QUERY_NODE_PHYSICAL_PLAN_STREAM_FINAL_SESSION: - code = makeNode(type, sizeof(SStreamFinalSessionWinodwPhysiNode), &pNode); break; + code = makeNode(type, sizeof(SStreamFinalSessionWinodwPhysiNode), &pNode); + break; case QUERY_NODE_PHYSICAL_PLAN_MERGE_STATE: - code = makeNode(type, sizeof(SStateWinodwPhysiNode), &pNode); break; + code = makeNode(type, sizeof(SStateWinodwPhysiNode), &pNode); + break; case QUERY_NODE_PHYSICAL_PLAN_STREAM_STATE: - code = makeNode(type, sizeof(SStreamStateWinodwPhysiNode), &pNode); break; + code = makeNode(type, sizeof(SStreamStateWinodwPhysiNode), &pNode); + break; case QUERY_NODE_PHYSICAL_PLAN_MERGE_EVENT: - code = makeNode(type, sizeof(SEventWinodwPhysiNode), &pNode); break; + code = makeNode(type, sizeof(SEventWinodwPhysiNode), &pNode); + break; case QUERY_NODE_PHYSICAL_PLAN_STREAM_EVENT: - code = makeNode(type, sizeof(SStreamEventWinodwPhysiNode), &pNode); break; + code = makeNode(type, sizeof(SStreamEventWinodwPhysiNode), &pNode); + break; case QUERY_NODE_PHYSICAL_PLAN_MERGE_COUNT: - code = makeNode(type, sizeof(SCountWinodwPhysiNode), &pNode); break; + code = makeNode(type, sizeof(SCountWinodwPhysiNode), &pNode); + break; case QUERY_NODE_PHYSICAL_PLAN_MERGE_ANOMALY: - code = makeNode(type, sizeof(SAnomalyWindowPhysiNode), &pNode); break; + code = makeNode(type, sizeof(SAnomalyWindowPhysiNode), &pNode); + break; case QUERY_NODE_PHYSICAL_PLAN_STREAM_COUNT: - code = makeNode(type, sizeof(SStreamCountWinodwPhysiNode), &pNode); break; + code = makeNode(type, sizeof(SStreamCountWinodwPhysiNode), &pNode); + break; case QUERY_NODE_PHYSICAL_PLAN_PARTITION: - code = makeNode(type, sizeof(SPartitionPhysiNode), &pNode); break; + code = makeNode(type, sizeof(SPartitionPhysiNode), &pNode); + break; case QUERY_NODE_PHYSICAL_PLAN_STREAM_PARTITION: - code = makeNode(type, sizeof(SStreamPartitionPhysiNode), &pNode); break; + code = makeNode(type, sizeof(SStreamPartitionPhysiNode), &pNode); + break; case QUERY_NODE_PHYSICAL_PLAN_INDEF_ROWS_FUNC: - code = makeNode(type, sizeof(SIndefRowsFuncPhysiNode), &pNode); break; + code = makeNode(type, sizeof(SIndefRowsFuncPhysiNode), &pNode); + break; case QUERY_NODE_PHYSICAL_PLAN_INTERP_FUNC: - code = makeNode(type, sizeof(SInterpFuncLogicNode), &pNode); break; + code = makeNode(type, sizeof(SInterpFuncLogicNode), &pNode); + break; case QUERY_NODE_PHYSICAL_PLAN_FORECAST_FUNC: - code = makeNode(type, sizeof(SForecastFuncLogicNode), &pNode); break; + code = makeNode(type, sizeof(SForecastFuncLogicNode), &pNode); + break; case QUERY_NODE_PHYSICAL_PLAN_DISPATCH: - code = makeNode(type, sizeof(SDataDispatcherNode), &pNode); break; + code = makeNode(type, sizeof(SDataDispatcherNode), &pNode); + break; case QUERY_NODE_PHYSICAL_PLAN_INSERT: - code = makeNode(type, sizeof(SDataInserterNode), &pNode); break; + code = makeNode(type, sizeof(SDataInserterNode), &pNode); + break; case QUERY_NODE_PHYSICAL_PLAN_QUERY_INSERT: - code = makeNode(type, sizeof(SQueryInserterNode), &pNode); break; + code = makeNode(type, sizeof(SQueryInserterNode), &pNode); + break; case QUERY_NODE_PHYSICAL_PLAN_DELETE: - code = makeNode(type, sizeof(SDataDeleterNode), &pNode); break; + code = makeNode(type, sizeof(SDataDeleterNode), &pNode); + break; case QUERY_NODE_PHYSICAL_PLAN_GROUP_CACHE: - code = makeNode(type, sizeof(SGroupCachePhysiNode), &pNode); break; + code = makeNode(type, sizeof(SGroupCachePhysiNode), &pNode); + break; case QUERY_NODE_PHYSICAL_PLAN_DYN_QUERY_CTRL: - code = makeNode(type, sizeof(SDynQueryCtrlPhysiNode), &pNode); break; + code = makeNode(type, sizeof(SDynQueryCtrlPhysiNode), &pNode); + break; case QUERY_NODE_PHYSICAL_SUBPLAN: - code = makeNode(type, sizeof(SSubplan), &pNode); break; + code = makeNode(type, sizeof(SSubplan), &pNode); + break; case QUERY_NODE_PHYSICAL_PLAN: - code = makeNode(type, sizeof(SQueryPlan), &pNode); break; + code = makeNode(type, sizeof(SQueryPlan), &pNode); + break; case QUERY_NODE_PHYSICAL_PLAN_STREAM_INTERP_FUNC: - code = makeNode(type, sizeof(SStreamInterpFuncPhysiNode), &pNode); break; + code = makeNode(type, sizeof(SStreamInterpFuncPhysiNode), &pNode); + break; default: break; } @@ -959,7 +1143,7 @@ void nodesDestroyNode(SNode* pNode) { case QUERY_NODE_DATABLOCK_DESC: nodesDestroyList(((SDataBlockDescNode*)pNode)->pSlots); break; - case QUERY_NODE_SLOT_DESC: // no pointer field + case QUERY_NODE_SLOT_DESC: // no pointer field break; case QUERY_NODE_COLUMN_DEF: nodesDestroyNode(((SColumnDefNode*)pNode)->pOptions); @@ -972,6 +1156,9 @@ void nodesDestroyNode(SNode* pNode) { nodesDestroyNode((SNode*)pOptions->s3KeepLocalStr); nodesDestroyList(pOptions->pKeep); nodesDestroyList(pOptions->pRetentions); + nodesDestroyNode((SNode*)pOptions->pCompactIntervalNode); + nodesDestroyList(pOptions->pCompactTimeRangeList); + nodesDestroyNode((SNode*)pOptions->pCompactTimeOffsetNode); break; } case QUERY_NODE_TABLE_OPTIONS: { @@ -1140,7 +1327,7 @@ void nodesDestroyNode(SNode* pNode) { case QUERY_NODE_FLUSH_DATABASE_STMT: // no pointer field case QUERY_NODE_TRIM_DATABASE_STMT: // no pointer field break; - case QUERY_NODE_S3MIGRATE_DATABASE_STMT: // no pointer field + case QUERY_NODE_S3MIGRATE_DATABASE_STMT: // no pointer field break; case QUERY_NODE_CREATE_TABLE_STMT: { SCreateTableStmt* pStmt = (SCreateTableStmt*)pNode; @@ -1264,13 +1451,13 @@ void nodesDestroyNode(SNode* pNode) { taosMemoryFreeClear(pStmt->pReq); break; } - case QUERY_NODE_DROP_STREAM_STMT: // no pointer field - case QUERY_NODE_PAUSE_STREAM_STMT: // no pointer field - case QUERY_NODE_RESUME_STREAM_STMT: // no pointer field - case QUERY_NODE_BALANCE_VGROUP_STMT: // no pointer field - case QUERY_NODE_BALANCE_VGROUP_LEADER_STMT: // no pointer field + case QUERY_NODE_DROP_STREAM_STMT: // no pointer field + case QUERY_NODE_PAUSE_STREAM_STMT: // no pointer field + case QUERY_NODE_RESUME_STREAM_STMT: // no pointer field + case QUERY_NODE_BALANCE_VGROUP_STMT: // no pointer field + case QUERY_NODE_BALANCE_VGROUP_LEADER_STMT: // no pointer field case QUERY_NODE_BALANCE_VGROUP_LEADER_DATABASE_STMT: // no pointer field - case QUERY_NODE_MERGE_VGROUP_STMT: // no pointer field + case QUERY_NODE_MERGE_VGROUP_STMT: // no pointer field break; case QUERY_NODE_REDISTRIBUTE_VGROUP_STMT: nodesDestroyList(((SRedistributeVgroupStmt*)pNode)->pDnodes); @@ -1284,7 +1471,7 @@ void nodesDestroyNode(SNode* pNode) { case QUERY_NODE_REVOKE_STMT: nodesDestroyNode(((SRevokeStmt*)pNode)->pTagCond); break; - case QUERY_NODE_ALTER_CLUSTER_STMT: // no pointer field + case QUERY_NODE_ALTER_CLUSTER_STMT: // no pointer field break; case QUERY_NODE_SHOW_DNODES_STMT: case QUERY_NODE_SHOW_MNODES_STMT: @@ -1397,12 +1584,12 @@ void nodesDestroyNode(SNode* pNode) { nodesDestroyNode(pQuery->pPrepareRoot); break; } - case QUERY_NODE_RESTORE_DNODE_STMT: // no pointer field - case QUERY_NODE_RESTORE_QNODE_STMT: // no pointer field - case QUERY_NODE_RESTORE_MNODE_STMT: // no pointer field - case QUERY_NODE_RESTORE_VNODE_STMT: // no pointer field + case QUERY_NODE_RESTORE_DNODE_STMT: // no pointer field + case QUERY_NODE_RESTORE_QNODE_STMT: // no pointer field + case QUERY_NODE_RESTORE_MNODE_STMT: // no pointer field + case QUERY_NODE_RESTORE_VNODE_STMT: // no pointer field break; - case QUERY_NODE_CREATE_VIEW_STMT: { + case QUERY_NODE_CREATE_VIEW_STMT: { SCreateViewStmt* pStmt = (SCreateViewStmt*)pNode; taosMemoryFree(pStmt->pQuerySql); tFreeSCMCreateViewReq(&pStmt->createReq); @@ -1419,7 +1606,7 @@ void nodesDestroyNode(SNode* pNode) { taosMemoryFreeClear(pStmt->pReq); } break; - } + } case QUERY_NODE_LOGIC_PLAN_SCAN: { SScanLogicNode* pLogicNode = (SScanLogicNode*)pNode; destroyLogicNode((SLogicNode*)pLogicNode); @@ -1810,7 +1997,7 @@ void nodesDestroyNode(SNode* pNode) { int32_t nodesMakeList(SNodeList** ppListOut) { SNodeList* p = NULL; - int32_t code = nodesCalloc(1, sizeof(SNodeList), (void**)&p); + int32_t code = nodesCalloc(1, sizeof(SNodeList), (void**)&p); if (TSDB_CODE_SUCCESS == code) { *ppListOut = p; } @@ -1822,7 +2009,7 @@ int32_t nodesListAppend(SNodeList* pList, SNode* pNode) { return TSDB_CODE_FAILED; } SListCell* p = NULL; - int32_t code = nodesCalloc(1, sizeof(SListCell), (void**)&p); + int32_t code = nodesCalloc(1, sizeof(SListCell), (void**)&p); if (TSDB_CODE_SUCCESS != code) { return code; } @@ -1901,7 +2088,6 @@ int32_t nodesListStrictAppendList(SNodeList* pTarget, SNodeList* pSrc) { return code; } - int32_t nodesListMakeStrictAppendList(SNodeList** pTarget, SNodeList* pSrc) { if (NULL == *pTarget) { int32_t code = nodesMakeList(pTarget); @@ -1912,7 +2098,7 @@ int32_t nodesListMakeStrictAppendList(SNodeList** pTarget, SNodeList* pSrc) { return nodesListStrictAppendList(*pTarget, pSrc); } -int32_t nodesListMakePushFront(SNodeList** pList, SNode* pNode) { +int32_t nodesListMakePushFront(SNodeList** pList, SNode* pNode) { if (*pList == NULL) { int32_t code = nodesMakeList(pList); if (*pList == NULL) { @@ -1927,7 +2113,7 @@ int32_t nodesListPushFront(SNodeList* pList, SNode* pNode) { return TSDB_CODE_FAILED; } SListCell* p = NULL; - int32_t code = nodesCalloc(1, sizeof(SListCell), (void**)&p); + int32_t code = nodesCalloc(1, sizeof(SListCell), (void**)&p); if (TSDB_CODE_SUCCESS != code) { return code; } @@ -2360,7 +2546,8 @@ static EDealRes doCollect(SCollectColumnsCxt* pCxt, SColumnNode* pCol, SNode* pN static bool isCollectType(ECollectColType collectType, EColumnType colType) { return COLLECT_COL_TYPE_ALL == collectType ? true - : (COLLECT_COL_TYPE_TAG == collectType ? COLUMN_TYPE_TAG == colType : (COLUMN_TYPE_TAG != colType && COLUMN_TYPE_TBNAME != colType)); + : (COLLECT_COL_TYPE_TAG == collectType ? COLUMN_TYPE_TAG == colType + : (COLUMN_TYPE_TAG != colType && COLUMN_TYPE_TBNAME != colType)); } static EDealRes collectColumns(SNode* pNode, void* pContext) { @@ -2380,7 +2567,9 @@ static EDealRes collectColumnsExt(SNode* pNode, void* pContext) { if (QUERY_NODE_COLUMN == nodeType(pNode)) { SColumnNode* pCol = (SColumnNode*)pNode; if (isCollectType(pCxt->collectType, pCol->colType) && 0 != strcmp(pCol->colName, "*") && - (NULL == pCxt->pMultiTableAlias || NULL != (pCxt->pTableAlias = tSimpleHashGet(pCxt->pMultiTableAlias, pCol->tableAlias, strlen(pCol->tableAlias))))) { + (NULL == pCxt->pMultiTableAlias || + NULL != (pCxt->pTableAlias = + tSimpleHashGet(pCxt->pMultiTableAlias, pCol->tableAlias, strlen(pCol->tableAlias))))) { return doCollect(pCxt, pCol, pNode); } } @@ -2392,7 +2581,7 @@ int32_t nodesCollectColumns(SSelectStmt* pSelect, ESqlClause clause, const char* if (NULL == pSelect || NULL == pCols) { return TSDB_CODE_FAILED; } - SNodeList * pList = NULL; + SNodeList* pList = NULL; if (!*pCols) { int32_t code = nodesMakeList(&pList); if (TSDB_CODE_SUCCESS != code) { @@ -2424,13 +2613,13 @@ int32_t nodesCollectColumns(SSelectStmt* pSelect, ESqlClause clause, const char* return TSDB_CODE_SUCCESS; } -int32_t nodesCollectColumnsExt(SSelectStmt* pSelect, ESqlClause clause, SSHashObj* pMultiTableAlias, ECollectColType type, - SNodeList** pCols) { +int32_t nodesCollectColumnsExt(SSelectStmt* pSelect, ESqlClause clause, SSHashObj* pMultiTableAlias, + ECollectColType type, SNodeList** pCols) { if (NULL == pSelect || NULL == pCols) { return TSDB_CODE_FAILED; } - SNodeList * pList = NULL; + SNodeList* pList = NULL; if (!*pCols) { int32_t code = nodesMakeList(&pList); if (TSDB_CODE_SUCCESS != code) { @@ -2468,7 +2657,7 @@ int32_t nodesCollectColumnsFromNode(SNode* node, const char* pTableAlias, EColle if (NULL == pCols) { return TSDB_CODE_FAILED; } - SNodeList * pList = NULL; + SNodeList* pList = NULL; if (!*pCols) { int32_t code = nodesMakeList(&pList); if (TSDB_CODE_SUCCESS != code) { @@ -2521,7 +2710,7 @@ static EDealRes collectFuncs(SNode* pNode, void* pContext) { } } - bool bFound = false; + bool bFound = false; SNode* pn = NULL; FOREACH(pn, pCxt->pFuncs) { if (nodesEqualNode(pn, pNode)) { @@ -2553,21 +2742,21 @@ static int32_t funcNodeEqual(const void* pLeft, const void* pRight, size_t len) return nodesEqualNode(*(const SNode**)pLeft, *(const SNode**)pRight) ? 0 : 1; } -int32_t nodesCollectSelectFuncs(SSelectStmt* pSelect, ESqlClause clause, char* tableAlias, FFuncClassifier classifier, SNodeList* pFuncs) { +int32_t nodesCollectSelectFuncs(SSelectStmt* pSelect, ESqlClause clause, char* tableAlias, FFuncClassifier classifier, + SNodeList* pFuncs) { if (NULL == pSelect || NULL == pFuncs) { return TSDB_CODE_FAILED; } - SCollectFuncsCxt cxt = {.errCode = TSDB_CODE_SUCCESS, - .classifier = classifier, - .tableAlias = tableAlias, - .pFuncs = pFuncs}; + SCollectFuncsCxt cxt = { + .errCode = TSDB_CODE_SUCCESS, .classifier = classifier, .tableAlias = tableAlias, .pFuncs = pFuncs}; nodesWalkSelectStmt(pSelect, clause, collectFuncs, &cxt); return cxt.errCode; } -int32_t nodesCollectFuncs(SSelectStmt* pSelect, ESqlClause clause, char* tableAlias, FFuncClassifier classifier, SNodeList** pFuncs) { +int32_t nodesCollectFuncs(SSelectStmt* pSelect, ESqlClause clause, char* tableAlias, FFuncClassifier classifier, + SNodeList** pFuncs) { if (NULL == pSelect || NULL == pFuncs) { return TSDB_CODE_FAILED; } @@ -2793,7 +2982,7 @@ int32_t nodesMergeConds(SNode** pDst, SNodeList** pSrc) { nodesClearList(*pSrc); } else { SLogicConditionNode* pLogicCond = NULL; - int32_t code = nodesMakeNode(QUERY_NODE_LOGIC_CONDITION, (SNode**)&pLogicCond); + int32_t code = nodesMakeNode(QUERY_NODE_LOGIC_CONDITION, (SNode**)&pLogicCond); if (TSDB_CODE_SUCCESS != code) { return code; } @@ -2825,13 +3014,13 @@ const char* dataOrderStr(EDataOrderLevel order) { } int32_t nodesMakeValueNodeFromString(char* literal, SValueNode** ppValNode) { - int32_t lenStr = strlen(literal); + int32_t lenStr = strlen(literal); SValueNode* pValNode = NULL; - int32_t code = nodesMakeNode(QUERY_NODE_VALUE, (SNode**)&pValNode); + int32_t code = nodesMakeNode(QUERY_NODE_VALUE, (SNode**)&pValNode); if (pValNode) { pValNode->node.resType.type = TSDB_DATA_TYPE_VARCHAR; pValNode->node.resType.bytes = lenStr + VARSTR_HEADER_SIZE; - char* p = taosMemoryMalloc(lenStr + 1 + VARSTR_HEADER_SIZE); + char* p = taosMemoryMalloc(lenStr + 1 + VARSTR_HEADER_SIZE); if (p == NULL) { return terrno; } @@ -2848,7 +3037,7 @@ int32_t nodesMakeValueNodeFromString(char* literal, SValueNode** ppValNode) { int32_t nodesMakeValueNodeFromBool(bool b, SValueNode** ppValNode) { SValueNode* pValNode = NULL; - int32_t code = nodesMakeNode(QUERY_NODE_VALUE, (SNode**)&pValNode); + int32_t code = nodesMakeNode(QUERY_NODE_VALUE, (SNode**)&pValNode); if (TSDB_CODE_SUCCESS == code) { pValNode->node.resType.type = TSDB_DATA_TYPE_BOOL; pValNode->node.resType.bytes = tDataTypes[TSDB_DATA_TYPE_BOOL].bytes; @@ -2866,7 +3055,7 @@ int32_t nodesMakeValueNodeFromBool(bool b, SValueNode** ppValNode) { int32_t nodesMakeValueNodeFromInt32(int32_t value, SNode** ppNode) { SValueNode* pValNode = NULL; - int32_t code = nodesMakeNode(QUERY_NODE_VALUE, (SNode**)&pValNode); + int32_t code = nodesMakeNode(QUERY_NODE_VALUE, (SNode**)&pValNode); if (TSDB_CODE_SUCCESS == code) { pValNode->node.resType.type = TSDB_DATA_TYPE_INT; pValNode->node.resType.bytes = tDataTypes[TSDB_DATA_TYPE_INT].bytes; @@ -2895,7 +3084,7 @@ bool nodesIsTableStar(SNode* pNode) { void nodesSortList(SNodeList** pList, int32_t (*comp)(SNode* pNode1, SNode* pNode2)) { if ((*pList)->length == 1) return; - uint32_t inSize = 1; + uint32_t inSize = 1; SListCell* pHead = (*pList)->pHead; while (1) { SListCell* p = pHead; @@ -2906,7 +3095,7 @@ void nodesSortList(SNodeList** pList, int32_t (*comp)(SNode* pNode1, SNode* pNod while (p) { ++nMerges; SListCell* q = p; - uint32_t pSize = 0; + uint32_t pSize = 0; for (uint32_t i = 0; i < inSize; ++i) { ++pSize; q = q->pNext; diff --git a/source/libs/parser/inc/parAst.h b/source/libs/parser/inc/parAst.h index 87efeb878b..a7ff6a34ee 100644 --- a/source/libs/parser/inc/parAst.h +++ b/source/libs/parser/inc/parAst.h @@ -70,6 +70,9 @@ typedef enum EDatabaseOptionType { DB_OPTION_KEEP_TIME_OFFSET, DB_OPTION_ENCRYPT_ALGORITHM, DB_OPTION_DNODES, + DB_OPTION_COMPACT_INTERVAL, + DB_OPTION_COMPACT_TIME_RANGE, + DB_OPTION_COMPACT_TIME_OFFSET, } EDatabaseOptionType; typedef enum ETableOptionType { diff --git a/source/libs/parser/inc/sql.y b/source/libs/parser/inc/sql.y index 0c4cc3f605..aae227dc5c 100644 --- a/source/libs/parser/inc/sql.y +++ b/source/libs/parser/inc/sql.y @@ -288,6 +288,9 @@ db_options(A) ::= db_options(B) S3_COMPACT NK_INTEGER(C). db_options(A) ::= db_options(B) KEEP_TIME_OFFSET NK_INTEGER(C). { A = setDatabaseOption(pCxt, B, DB_OPTION_KEEP_TIME_OFFSET, &C); } db_options(A) ::= db_options(B) ENCRYPT_ALGORITHM NK_STRING(C). { A = setDatabaseOption(pCxt, B, DB_OPTION_ENCRYPT_ALGORITHM, &C); } db_options(A) ::= db_options(B) DNODES NK_STRING(C). { A = setDatabaseOption(pCxt, B, DB_OPTION_DNODES, &C); } +db_options(A) ::= db_options(B) COMPACT_INTERVAL NK_VARIABLE(C). { A = setDatabaseOption(pCxt, B, DB_OPTION_COMPACT_INTERVAL, &C); } +db_options(A) ::= db_options(B) COMPACT_TIME_RANGE variable_list(C). { A = setDatabaseOption(pCxt, B, DB_OPTION_COMPACT_TIME_RANGE, &C); } +db_options(A) ::= db_options(B) COMPACT_TIME_OFFSET NK_VARIABLE(C). { A = setDatabaseOption(pCxt, B, DB_OPTION_COMPACT_TIME_OFFSET, &C); } alter_db_options(A) ::= alter_db_option(B). { A = createAlterDatabaseOptions(pCxt); A = setAlterDatabaseOption(pCxt, A, &B); } alter_db_options(A) ::= alter_db_options(B) alter_db_option(C). { A = setAlterDatabaseOption(pCxt, B, &C); } @@ -323,6 +326,9 @@ alter_db_option(A) ::= S3_KEEPLOCAL NK_VARIABLE(B). alter_db_option(A) ::= S3_COMPACT NK_INTEGER(B). { A.type = DB_OPTION_S3_COMPACT, A.val = B; } alter_db_option(A) ::= KEEP_TIME_OFFSET NK_INTEGER(B). { A.type = DB_OPTION_KEEP_TIME_OFFSET; A.val = B; } alter_db_option(A) ::= ENCRYPT_ALGORITHM NK_STRING(B). { A.type = DB_OPTION_ENCRYPT_ALGORITHM; A.val = B; } +alter_db_option(A) ::= COMPACT_INTERVAL NK_VARIABLE(B). { A.type = DB_OPTION_COMPACT_INTERVAL; A.val = B; } +alter_db_option(A) ::= COMPACT_TIME_RANGE variable_list(B). { A.type = DB_OPTION_COMPACT_TIME_RANGE; A.pList = B; } +alter_db_option(A) ::= COMPACT_TIME_OFFSET NK_VARIABLE(B). { A.type = DB_OPTION_COMPACT_TIME_OFFSET; A.val = B; } %type integer_list { SNodeList* } %destructor integer_list { nodesDestroyList($$); } diff --git a/source/libs/parser/src/parAstCreater.c b/source/libs/parser/src/parAstCreater.c index 8774cebe41..89fa3734b3 100644 --- a/source/libs/parser/src/parAstCreater.c +++ b/source/libs/parser/src/parAstCreater.c @@ -1800,6 +1800,10 @@ SNode* createDefaultDatabaseOptions(SAstCreateContext* pCxt) { pOptions->withArbitrator = TSDB_DEFAULT_DB_WITH_ARBITRATOR; pOptions->encryptAlgorithm = TSDB_DEFAULT_ENCRYPT_ALGO; pOptions->dnodeListStr[0] = 0; + pOptions->compactInterval = TSDB_DEFAULT_COMPACT_INTERVAL; + pOptions->compactStartTime = TSDB_DEFAULT_COMPACT_START_TIME; + pOptions->compactEndTime = TSDB_DEFAULT_COMPACT_END_TIME; + pOptions->compactTimeOffset = TSDB_DEFAULT_COMPACT_TIME_OFFSET; return (SNode*)pOptions; _err: return NULL; @@ -1844,6 +1848,10 @@ SNode* createAlterDatabaseOptions(SAstCreateContext* pCxt) { pOptions->withArbitrator = -1; pOptions->encryptAlgorithm = -1; pOptions->dnodeListStr[0] = 0; + pOptions->compactInterval = TSDB_DEFAULT_COMPACT_INTERVAL; + pOptions->compactStartTime = TSDB_DEFAULT_COMPACT_START_TIME; + pOptions->compactEndTime = TSDB_DEFAULT_COMPACT_END_TIME; + pOptions->compactTimeOffset = TSDB_DEFAULT_COMPACT_TIME_OFFSET; return (SNode*)pOptions; _err: return NULL; @@ -1991,6 +1999,17 @@ static SNode* setDatabaseOptionImpl(SAstCreateContext* pCxt, SNode* pOptions, ED } else { COPY_STRING_FORM_STR_TOKEN(pDbOptions->dnodeListStr, (SToken*)pVal); } + break; + case DB_OPTION_COMPACT_INTERVAL: + pDbOptions->pCompactIntervalNode = (SValueNode*)createDurationValueNode(pCxt, (SToken*)pVal); + break; + case DB_OPTION_COMPACT_TIME_RANGE: + pDbOptions->pCompactTimeRangeList = pVal; + break; + case DB_OPTION_COMPACT_TIME_OFFSET: + pDbOptions->pCompactTimeOffsetNode = (SValueNode*)createDurationValueNode(pCxt, (SToken*)pVal); + ; + break; default: break; } diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c index c69fbcf67d..7f873a9b90 100755 --- a/source/libs/parser/src/parTranslater.c +++ b/source/libs/parser/src/parTranslater.c @@ -1853,7 +1853,7 @@ static bool clauseSupportAlias(ESqlClause clause) { return SQL_CLAUSE_GROUP_BY == clause || SQL_CLAUSE_PARTITION_BY == clause || SQL_CLAUSE_ORDER_BY == clause; } -static EDealRes translateColumnInGroupByClause(STranslateContext* pCxt, SColumnNode** pCol, bool *translateAsAlias) { +static EDealRes translateColumnInGroupByClause(STranslateContext* pCxt, SColumnNode** pCol, bool* translateAsAlias) { *translateAsAlias = false; // count(*)/first(*)/last(*) and so on if (0 == strcmp((*pCol)->colName, "*")) { @@ -1862,7 +1862,7 @@ static EDealRes translateColumnInGroupByClause(STranslateContext* pCxt, SColumnN if (pCxt->pParseCxt->biMode) { SNode** ppNode = (SNode**)pCol; - bool ret; + bool ret; pCxt->errCode = biRewriteToTbnameFunc(pCxt, ppNode, &ret); if (TSDB_CODE_SUCCESS != pCxt->errCode) return DEAL_RES_ERROR; if (ret) { @@ -1876,9 +1876,8 @@ static EDealRes translateColumnInGroupByClause(STranslateContext* pCxt, SColumnN } else { bool found = false; res = translateColumnWithoutPrefix(pCxt, pCol); - if (!(*pCol)->node.asParam && - res != DEAL_RES_CONTINUE && - res != DEAL_RES_END && pCxt->errCode != TSDB_CODE_PAR_AMBIGUOUS_COLUMN) { + if (!(*pCol)->node.asParam && res != DEAL_RES_CONTINUE && res != DEAL_RES_END && + pCxt->errCode != TSDB_CODE_PAR_AMBIGUOUS_COLUMN) { res = translateColumnUseAlias(pCxt, pCol, &found); *translateAsAlias = true; } @@ -3311,26 +3310,28 @@ static int32_t selectCommonType(SDataType* commonType, const SDataType* newType) } else { resultType = gDisplyTypes[type2][type1]; } - + if (resultType == -1) { return TSDB_CODE_SCALAR_CONVERT_ERROR; } - + if (commonType->type == newType->type) { commonType->bytes = TMAX(commonType->bytes, newType->bytes); return TSDB_CODE_SUCCESS; } - if ((resultType == TSDB_DATA_TYPE_VARCHAR) && (IS_MATHABLE_TYPE(commonType->type) || IS_MATHABLE_TYPE(newType->type))) { + if ((resultType == TSDB_DATA_TYPE_VARCHAR) && + (IS_MATHABLE_TYPE(commonType->type) || IS_MATHABLE_TYPE(newType->type))) { commonType->bytes = TMAX(TMAX(commonType->bytes, newType->bytes), QUERY_NUMBER_MAX_DISPLAY_LEN); - } else if ((resultType == TSDB_DATA_TYPE_NCHAR) && (IS_MATHABLE_TYPE(commonType->type) || IS_MATHABLE_TYPE(newType->type))) { + } else if ((resultType == TSDB_DATA_TYPE_NCHAR) && + (IS_MATHABLE_TYPE(commonType->type) || IS_MATHABLE_TYPE(newType->type))) { commonType->bytes = TMAX(TMAX(commonType->bytes, newType->bytes), QUERY_NUMBER_MAX_DISPLAY_LEN * TSDB_NCHAR_SIZE); } else { commonType->bytes = TMAX(TMAX(commonType->bytes, newType->bytes), TYPE_BYTES[resultType]); } - + commonType->type = resultType; - + return TSDB_CODE_SUCCESS; } @@ -5480,7 +5481,7 @@ static EDealRes translateGroupPartitionByImpl(SNode** pNode, void* pContext) { int32_t code = TSDB_CODE_SUCCESS; STranslateContext* pTransCxt = pCxt->pTranslateCxt; if (QUERY_NODE_VALUE == nodeType(*pNode)) { - SValueNode* pVal = (SValueNode*) *pNode; + SValueNode* pVal = (SValueNode*)*pNode; if (DEAL_RES_ERROR == translateValue(pTransCxt, pVal)) { return DEAL_RES_CONTINUE; } @@ -5528,8 +5529,7 @@ static int32_t translateGroupByList(STranslateContext* pCxt, SSelectStmt* pSelec if (NULL == pSelect->pGroupByList) { return TSDB_CODE_SUCCESS; } - SReplaceGroupByAliasCxt cxt = { - .pTranslateCxt = pCxt, .pProjectionList = pSelect->pProjectionList}; + SReplaceGroupByAliasCxt cxt = {.pTranslateCxt = pCxt, .pProjectionList = pSelect->pProjectionList}; nodesRewriteExprsPostOrder(pSelect->pGroupByList, translateGroupPartitionByImpl, &cxt); return pCxt->errCode; @@ -5540,8 +5540,7 @@ static int32_t translatePartitionByList(STranslateContext* pCxt, SSelectStmt* pS return TSDB_CODE_SUCCESS; } - SReplaceGroupByAliasCxt cxt = { - .pTranslateCxt = pCxt, .pProjectionList = pSelect->pProjectionList}; + SReplaceGroupByAliasCxt cxt = {.pTranslateCxt = pCxt, .pProjectionList = pSelect->pProjectionList}; nodesRewriteExprsPostOrder(pSelect->pPartitionByList, translateGroupPartitionByImpl, &cxt); return pCxt->errCode; @@ -7559,6 +7558,12 @@ static int32_t buildCreateDbReq(STranslateContext* pCxt, SCreateDatabaseStmt* pS pReq->encryptAlgorithm = pStmt->pOptions->encryptAlgorithm; tstrncpy(pReq->dnodeListStr, pStmt->pOptions->dnodeListStr, TSDB_DNODE_LIST_LEN); + // auto-compact options + pReq->compactInterval = pStmt->pOptions->compactInterval; + pReq->compactStartTime = pStmt->pOptions->compactStartTime; + pReq->compactEndTime = pStmt->pOptions->compactEndTime; + pReq->compactTimeOffset = pStmt->pOptions->compactTimeOffset; + return buildCreateDbRetentions(pStmt->pOptions->pRetentions, pReq); } @@ -7922,6 +7927,79 @@ static int32_t checkOptionsDependency(STranslateContext* pCxt, const char* pDbNa return TSDB_CODE_SUCCESS; } +static int32_t checkDbCompactIntervalOption(STranslateContext* pCxt, SDatabaseOptions* pOptions) { + if (NULL == pOptions->pCompactIntervalNode) return TSDB_CODE_SUCCESS; + + if (DEAL_RES_ERROR == translateValue(pCxt, pOptions->pCompactIntervalNode)) { + return pCxt->errCode; + } + if (TIME_UNIT_MINUTE != pOptions->pCompactIntervalNode->unit && + TIME_UNIT_HOUR != pOptions->pCompactIntervalNode->unit) { + return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_DB_OPTION, + "Invalid option compact_interval unit: %c, only %c, %c allowed", + pOptions->pCompactIntervalNode->unit, TIME_UNIT_MINUTE, TIME_UNIT_HOUR); + } + pOptions->compactInterval = getBigintFromValueNode(pOptions->pCompactIntervalNode); + + // TODO: check the semantic of compact_interval + return TSDB_CODE_SUCCESS; +} + +static int32_t checkDbCompactTimeRangeOption(STranslateContext* pCxt, SDatabaseOptions* pOptions) { + if (NULL == pOptions->pCompactTimeRangeList) { + return TSDB_CODE_SUCCESS; + } + + if (LIST_LENGTH(pOptions->pCompactTimeRangeList) != 2) { + return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_DB_OPTION, + "Invalid option compact_time_range, should have 2 values"); + } + + SValueNode* pStart = (SValueNode*)nodesListGetNode(pOptions->pCompactTimeRangeList, 0); + SValueNode* pEnd = (SValueNode*)nodesListGetNode(pOptions->pCompactTimeRangeList, 1); + if (DEAL_RES_ERROR == translateValue(pCxt, pStart)) { + return pCxt->errCode; + } + if (DEAL_RES_ERROR == translateValue(pCxt, pEnd)) { + return pCxt->errCode; + } + if (TIME_UNIT_MINUTE != pStart->unit && TIME_UNIT_HOUR != pStart->unit && TIME_UNIT_DAY != pStart->unit) { + return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_DB_OPTION, + "Invalid option compact_time_range start unit: %c, only %c, %c, %c allowed", + pStart->unit, TIME_UNIT_MINUTE, TIME_UNIT_HOUR, TIME_UNIT_DAY); + } + if (TIME_UNIT_MINUTE != pEnd->unit && TIME_UNIT_HOUR != pEnd->unit && TIME_UNIT_DAY != pEnd->unit) { + return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_DB_OPTION, + "Invalid option compact_time_range end unit: %c, only %c, %c, %c allowed", + pEnd->unit, TIME_UNIT_MINUTE, TIME_UNIT_HOUR, TIME_UNIT_DAY); + } + pOptions->compactStartTime = getBigintFromValueNode(pStart); + pOptions->compactEndTime = getBigintFromValueNode(pEnd); + + // TODO: check the semantic of compact_time_range + return TSDB_CODE_SUCCESS; +} + +static int32_t checkDbCompactTimeOffsetOption(STranslateContext* pCxt, SDatabaseOptions* pOptions) { + if (NULL == pOptions->pCompactTimeOffsetNode) { + return TSDB_CODE_SUCCESS; + } + + if (DEAL_RES_ERROR == translateValue(pCxt, pOptions->pCompactTimeOffsetNode)) { + return pCxt->errCode; + } + if (TIME_UNIT_MINUTE != pOptions->pCompactTimeOffsetNode->unit && + TIME_UNIT_HOUR != pOptions->pCompactTimeOffsetNode->unit) { + return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_DB_OPTION, + "Invalid option compact_time_offset unit: %c, only %c, %c allowed", + pOptions->pCompactTimeOffsetNode->unit, TIME_UNIT_MINUTE, TIME_UNIT_HOUR); + } + pOptions->compactTimeOffset = getBigintFromValueNode(pOptions->pCompactTimeOffsetNode); + + // TODO: check the semantic of compact_time_offset + return TSDB_CODE_SUCCESS; +} + static int32_t checkDatabaseOptions(STranslateContext* pCxt, const char* pDbName, SDatabaseOptions* pOptions) { int32_t code = checkDbRangeOption(pCxt, "buffer", pOptions->buffer, TSDB_MIN_BUFFER_PER_VNODE, TSDB_MAX_BUFFER_PER_VNODE); @@ -8038,6 +8116,15 @@ static int32_t checkDatabaseOptions(STranslateContext* pCxt, const char* pDbName if (TSDB_CODE_SUCCESS == code) { code = checkDbRangeOption(pCxt, "s3_compact", pOptions->s3Compact, TSDB_MIN_S3_COMPACT, TSDB_MAX_S3_COMPACT); } + if (TSDB_CODE_SUCCESS == code) { + code = checkDbCompactIntervalOption(pCxt, pOptions); + } + if (TSDB_CODE_SUCCESS == code) { + code = checkDbCompactTimeRangeOption(pCxt, pOptions); + } + if (TSDB_CODE_SUCCESS == code) { + code = checkDbCompactTimeOffsetOption(pCxt, pOptions); + } return code; } @@ -8274,6 +8361,10 @@ static int32_t buildAlterDbReq(STranslateContext* pCxt, SAlterDatabaseStmt* pStm pReq->s3KeepLocal = pStmt->pOptions->s3KeepLocal; pReq->s3Compact = pStmt->pOptions->s3Compact; pReq->withArbitrator = pStmt->pOptions->withArbitrator; + pReq->compactInterval = pStmt->pOptions->compactInterval; + pReq->compactStartTime = pStmt->pOptions->compactStartTime; + pReq->compactEndTime = pStmt->pOptions->compactEndTime; + pReq->compactTimeOffset = pStmt->pOptions->compactTimeOffset; return code; } @@ -10601,7 +10692,8 @@ static void getSourceDatabase(SNode* pStmt, int32_t acctId, char* pDbFName) { (void)tNameGetFullDbName(&name, pDbFName); } -static void getStreamQueryFirstProjectAliasName(SHashObj* pUserAliasSet, char* aliasName, int32_t len, char* defaultName[]) { +static void getStreamQueryFirstProjectAliasName(SHashObj* pUserAliasSet, char* aliasName, int32_t len, + char* defaultName[]) { for (int32_t i = 0; defaultName[i] != NULL; i++) { if (NULL == taosHashGet(pUserAliasSet, defaultName[i], strlen(defaultName[i]))) { snprintf(aliasName, len, "%s", defaultName[i]); @@ -10627,8 +10719,8 @@ static int32_t setColumnDefNodePrimaryKey(SColumnDefNode* pNode, bool isPk) { return code; } -static int32_t addIrowTsToCreateStreamQueryImpl(STranslateContext* pCxt, SSelectStmt* pSelect, - SHashObj* pUserAliasSet, SNodeList* pCols, SCMCreateStreamReq* pReq) { +static int32_t addIrowTsToCreateStreamQueryImpl(STranslateContext* pCxt, SSelectStmt* pSelect, SHashObj* pUserAliasSet, + SNodeList* pCols, SCMCreateStreamReq* pReq) { SNode* pProj = nodesListGetNode(pSelect->pProjectionList, 0); if (!pSelect->hasInterpFunc || (QUERY_NODE_FUNCTION == nodeType(pProj) && 0 == strcmp("_irowts", ((SFunctionNode*)pProj)->functionName))) { @@ -10675,7 +10767,7 @@ static int32_t addWstartTsToCreateStreamQueryImpl(STranslateContext* pCxt, SSele return TSDB_CODE_SUCCESS; } SFunctionNode* pFunc = NULL; - int32_t code = nodesMakeNode(QUERY_NODE_FUNCTION, (SNode**)&pFunc); + int32_t code = nodesMakeNode(QUERY_NODE_FUNCTION, (SNode**)&pFunc); if (NULL == pFunc) { return code; } @@ -10707,7 +10799,7 @@ static int32_t addWstartTsToCreateStreamQueryImpl(STranslateContext* pCxt, SSele } static int32_t addTsKeyToCreateStreamQuery(STranslateContext* pCxt, SNode* pStmt, SNodeList* pCols, - SCMCreateStreamReq* pReq) { + SCMCreateStreamReq* pReq) { SSelectStmt* pSelect = (SSelectStmt*)pStmt; SHashObj* pUserAliasSet = NULL; int32_t code = checkProjectAlias(pCxt, pSelect->pProjectionList, &pUserAliasSet); @@ -11070,21 +11162,18 @@ static int32_t checkStreamQuery(STranslateContext* pCxt, SCreateStreamStmt* pStm if (pStmt->pOptions->triggerType == STREAM_TRIGGER_FORCE_WINDOW_CLOSE) { if (pStmt->pOptions->fillHistory) { - return generateSyntaxErrMsgExt( - &pCxt->msgBuf, TSDB_CODE_PAR_INVALID_STREAM_QUERY, - "When trigger was force window close, Stream unsupported Fill history"); + return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_STREAM_QUERY, + "When trigger was force window close, Stream unsupported Fill history"); } if (pStmt->pOptions->ignoreExpired != 1) { - return generateSyntaxErrMsgExt( - &pCxt->msgBuf, TSDB_CODE_PAR_INVALID_STREAM_QUERY, - "When trigger was force window close, Stream must not set ignore expired 0"); + return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_STREAM_QUERY, + "When trigger was force window close, Stream must not set ignore expired 0"); } if (pStmt->pOptions->ignoreUpdate != 1) { - return generateSyntaxErrMsgExt( - &pCxt->msgBuf, TSDB_CODE_PAR_INVALID_STREAM_QUERY, - "When trigger was force window close, Stream must not set ignore update 0"); + return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_STREAM_QUERY, + "When trigger was force window close, Stream must not set ignore update 0"); } if (pSelect->pWindow != NULL && QUERY_NODE_INTERVAL_WINDOW == nodeType(pSelect->pWindow)) { From 5a856888198d91fb236af04fa76206218e889a13 Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Mon, 18 Nov 2024 16:57:15 +0800 Subject: [PATCH 13/55] enh: add query filesets sql supoort --- include/common/systable.h | 1 + include/common/tmsg.h | 2 ++ source/common/src/systable.c | 13 +++++++++++++ source/dnode/mnode/impl/src/mndShow.c | 2 ++ source/libs/executor/src/sysscanoperator.c | 8 ++++++++ source/libs/parser/src/parAstParser.c | 18 +++++++++++++++++- source/libs/parser/src/parTranslater.c | 13 +++++++++++-- source/libs/planner/src/planOptimizer.c | 3 ++- source/libs/planner/src/planPhysiCreater.c | 5 +++-- 9 files changed, 59 insertions(+), 6 deletions(-) diff --git a/include/common/systable.h b/include/common/systable.h index 0acafbfc30..b941e940c3 100644 --- a/include/common/systable.h +++ b/include/common/systable.h @@ -61,6 +61,7 @@ extern "C" { #define TSDB_INS_TABLE_MACHINES "ins_machines" #define TSDB_INS_TABLE_ENCRYPTIONS "ins_encryptions" #define TSDB_INS_TABLE_TSMAS "ins_tsmas" +#define TSDB_INS_TABLE_FILESETS "ins_filesets" #define TSDB_PERFORMANCE_SCHEMA_DB "performance_schema" #define TSDB_PERFS_TABLE_SMAS "perf_smas" diff --git a/include/common/tmsg.h b/include/common/tmsg.h index 4ff4dcdbd3..91050193d0 100644 --- a/include/common/tmsg.h +++ b/include/common/tmsg.h @@ -161,6 +161,7 @@ typedef enum _mgmt_table { TSDB_MGMT_TABLE_USER_FULL, TSDB_MGMT_TABLE_ANODE, TSDB_MGMT_TABLE_ANODE_FULL, + TSDB_MGMT_TABLE_FILESETS, TSDB_MGMT_TABLE_MAX, } EShowType; @@ -369,6 +370,7 @@ typedef enum ENodeType { QUERY_NODE_SHOW_STABLES_STMT, QUERY_NODE_SHOW_STREAMS_STMT, QUERY_NODE_SHOW_TABLES_STMT, + QUERY_NODE_SHOW_FILESETS_STMT, QUERY_NODE_SHOW_TAGS_STMT, QUERY_NODE_SHOW_USERS_STMT, QUERY_NODE_SHOW_USERS_FULL_STMT, diff --git a/source/common/src/systable.c b/source/common/src/systable.c index 88bb270b43..35238cfebc 100644 --- a/source/common/src/systable.c +++ b/source/common/src/systable.c @@ -416,6 +416,18 @@ static const SSysDbTableSchema anodesFullSchema[] = { {.name = "algo", .bytes = TSDB_ANAL_ALGO_NAME_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, }; +static const SSysDbTableSchema filesetsFullSchema[] = { + {.name = "dnode_id", .bytes = 4, .type = TSDB_DATA_TYPE_INT, .sysInfo = false}, + {.name = "db_name", .bytes = SYSTABLE_SCH_DB_NAME_LEN, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = false}, + {.name = "vgroup_id", .bytes = 4, .type = TSDB_DATA_TYPE_INT, .sysInfo = false}, + {.name = "fileset_id", .bytes = 4, .type = TSDB_DATA_TYPE_INT, .sysInfo = false}, + {.name = "start_time", .bytes = 8, .type = TSDB_DATA_TYPE_TIMESTAMP, .sysInfo = false}, + {.name = "end_time", .bytes = 8, .type = TSDB_DATA_TYPE_TIMESTAMP, .sysInfo = false}, + {.name = "last_compact", .bytes = 8, .type = TSDB_DATA_TYPE_TIMESTAMP, .sysInfo = false}, + {.name = "shold_compact", .bytes = 1, .type = TSDB_DATA_TYPE_BOOL, .sysInfo = false}, + {.name = "details", .bytes = 256 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = false}, +}; + static const SSysDbTableSchema tsmaSchema[] = { {.name = "tsma_name", .bytes = SYSTABLE_SCH_TABLE_NAME_LEN, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = false}, {.name = "db_name", .bytes = SYSTABLE_SCH_DB_NAME_LEN, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = false}, @@ -493,6 +505,7 @@ static const SSysTableMeta infosMeta[] = { {TSDB_INS_TABLE_TSMAS, tsmaSchema, tListLen(tsmaSchema), false}, {TSDB_INS_TABLE_ANODES, anodesSchema, tListLen(anodesSchema), true}, {TSDB_INS_TABLE_ANODES_FULL, anodesFullSchema, tListLen(anodesFullSchema), true}, + {TSDB_INS_TABLE_FILESETS, filesetsFullSchema, tListLen(filesetsFullSchema), false}, }; static const SSysDbTableSchema connectionsSchema[] = { diff --git a/source/dnode/mnode/impl/src/mndShow.c b/source/dnode/mnode/impl/src/mndShow.c index 29f6c32dbe..8e4fa91161 100644 --- a/source/dnode/mnode/impl/src/mndShow.c +++ b/source/dnode/mnode/impl/src/mndShow.c @@ -142,6 +142,8 @@ static int32_t convertToRetrieveType(char *name, int32_t len) { type = TSDB_MGMT_TABLE_ENCRYPTIONS; } else if (strncasecmp(name, TSDB_INS_TABLE_TSMAS, len) == 0) { type = TSDB_MGMT_TABLE_TSMAS; + } else if (strncasecmp(name, TSDB_INS_TABLE_FILESETS, len) == 0) { + type = TSDB_MGMT_TABLE_FILESETS; } else { mError("invalid show name:%s len:%d", name, len); } diff --git a/source/libs/executor/src/sysscanoperator.c b/source/libs/executor/src/sysscanoperator.c index af5313297e..5917910d56 100644 --- a/source/libs/executor/src/sysscanoperator.c +++ b/source/libs/executor/src/sysscanoperator.c @@ -1989,6 +1989,12 @@ static SSDataBlock* sysTableScanUserSTables(SOperatorInfo* pOperator) { return (pInfo->pRes->info.rows == 0) ? NULL : pInfo->pRes; } +static SSDataBlock* sysTableScanUserFileSets(SOperatorInfo* pOperator) { + // TODO + ASSERT(0); + return NULL; +} + static int32_t getSysTableDbNameColId(const char* pTable) { // if (0 == strcmp(TSDB_INS_TABLE_INDEXES, pTable)) { // return 1; @@ -2086,6 +2092,8 @@ static int32_t doSysTableScanNext(SOperatorInfo* pOperator, SSDataBlock** ppRes) } else if (strncasecmp(name, TSDB_INS_TABLE_STABLES, TSDB_TABLE_FNAME_LEN) == 0 && pInfo->showRewrite && IS_SYS_DBNAME(dbName)) { pBlock = sysTableScanUserSTables(pOperator); + } else if (strncasecmp(name, TSDB_INS_TABLE_FILESETS, TSDB_TABLE_FNAME_LEN) == 0) { + pBlock = sysTableScanUserFileSets(pOperator); } else { // load the meta from mnode of the given epset pBlock = sysTableScanFromMNode(pOperator, pInfo, name, pTaskInfo); } diff --git a/source/libs/parser/src/parAstParser.c b/source/libs/parser/src/parAstParser.c index dde5e0edd4..fa055fe169 100644 --- a/source/libs/parser/src/parAstParser.c +++ b/source/libs/parser/src/parAstParser.c @@ -184,7 +184,7 @@ static int32_t collectMetaKeyFromRealTableImpl(SCollectMetaKeyCxt* pCxt, const c } if (TSDB_CODE_SUCCESS == code && (0 == strcmp(pTable, TSDB_INS_TABLE_TAGS) || 0 == strcmp(pTable, TSDB_INS_TABLE_TABLES) || - 0 == strcmp(pTable, TSDB_INS_TABLE_COLS)) && + 0 == strcmp(pTable, TSDB_INS_TABLE_FILESETS) || 0 == strcmp(pTable, TSDB_INS_TABLE_COLS)) && QUERY_NODE_SELECT_STMT == nodeType(pCxt->pStmt)) { code = collectMetaKeyFromInsTags(pCxt); } @@ -640,6 +640,20 @@ static int32_t collectMetaKeyFromShowTables(SCollectMetaKeyCxt* pCxt, SShowStmt* return code; } +static int32_t collectMetaKeyFromShowFilesets(SCollectMetaKeyCxt* pCxt, SShowStmt* pStmt) { + int32_t code = reserveTableMetaInCache(pCxt->pParseCxt->acctId, TSDB_INFORMATION_SCHEMA_DB, TSDB_INS_TABLE_FILESETS, + pCxt->pMetaCache); + if (TSDB_CODE_SUCCESS == code) { + code = reserveDbVgInfoInCache(pCxt->pParseCxt->acctId, ((SValueNode*)pStmt->pDbName)->literal, pCxt->pMetaCache); + } + if (TSDB_CODE_SUCCESS == code) { + code = + reserveUserAuthInCache(pCxt->pParseCxt->acctId, pCxt->pParseCxt->pUser, ((SValueNode*)pStmt->pDbName)->literal, + NULL, AUTH_TYPE_READ_OR_WRITE, pCxt->pMetaCache); + } + return code; +} + static int32_t collectMetaKeyFromShowTags(SCollectMetaKeyCxt* pCxt, SShowStmt* pStmt) { int32_t code = reserveTableMetaInCache(pCxt->pParseCxt->acctId, TSDB_INFORMATION_SCHEMA_DB, TSDB_INS_TABLE_TAGS, pCxt->pMetaCache); @@ -1027,6 +1041,8 @@ static int32_t collectMetaKeyFromQuery(SCollectMetaKeyCxt* pCxt, SNode* pStmt) { return collectMetaKeyFromShowStreams(pCxt, (SShowStmt*)pStmt); case QUERY_NODE_SHOW_TABLES_STMT: return collectMetaKeyFromShowTables(pCxt, (SShowStmt*)pStmt); + case QUERY_NODE_SHOW_FILESETS_STMT: + return collectMetaKeyFromShowFilesets(pCxt, (SShowStmt*)pStmt); case QUERY_NODE_SHOW_TAGS_STMT: return collectMetaKeyFromShowTags(pCxt, (SShowStmt*)pStmt); case QUERY_NODE_SHOW_TABLE_TAGS_STMT: diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c index cf9a83ecb1..59b5d113ad 100755 --- a/source/libs/parser/src/parTranslater.c +++ b/source/libs/parser/src/parTranslater.c @@ -363,6 +363,13 @@ static const SSysTableShowAdapter sysTableShowAdapter[] = { .numOfShowCols = 1, .pShowCols = {"*"} }, + { + .showType = QUERY_NODE_SHOW_TABLES_STMT, + .pDbName = TSDB_INFORMATION_SCHEMA_DB, + .pTableName = TSDB_INS_TABLE_FILESETS, + .numOfShowCols = 1, + .pShowCols = {"*"} + }, }; // clang-format on @@ -4074,7 +4081,7 @@ static int32_t dnodeToVgroupsInfo(SArray* pDnodes, SVgroupsInfo** pVgsInfo) { static bool sysTableFromVnode(const char* pTable) { return ((0 == strcmp(pTable, TSDB_INS_TABLE_TABLES)) || (0 == strcmp(pTable, TSDB_INS_TABLE_TAGS)) || - (0 == strcmp(pTable, TSDB_INS_TABLE_COLS))); + (0 == strcmp(pTable, TSDB_INS_TABLE_COLS)) || (0 == strcmp(pTable, TSDB_INS_TABLE_FILESETS))); } static bool sysTableFromDnode(const char* pTable) { return 0 == strcmp(pTable, TSDB_INS_TABLE_DNODE_VARIABLES); } @@ -4146,7 +4153,8 @@ static int32_t setVnodeSysTableVgroupList(STranslateContext* pCxt, SName* pName, if (TSDB_CODE_SUCCESS == code && (0 == strcmp(pRealTable->table.tableName, TSDB_INS_TABLE_TABLES) && !hasUserDbCond) || - 0 == strcmp(pRealTable->table.tableName, TSDB_INS_TABLE_COLS)) { + 0 == strcmp(pRealTable->table.tableName, TSDB_INS_TABLE_COLS) || + 0 == strcmp(pRealTable->table.tableName, TSDB_INS_TABLE_FILESETS)) { code = addMnodeToVgroupList(&pCxt->pParseCxt->mgmtEpSet, &pVgs); } @@ -4245,6 +4253,7 @@ static bool isSingleTable(SRealTableNode* pRealTable) { if (TSDB_SYSTEM_TABLE == tableType) { return 0 != strcmp(pRealTable->table.tableName, TSDB_INS_TABLE_TABLES) && 0 != strcmp(pRealTable->table.tableName, TSDB_INS_TABLE_TAGS) && + 0 != strcmp(pRealTable->table.tableName, TSDB_INS_TABLE_FILESETS) && 0 != strcmp(pRealTable->table.tableName, TSDB_INS_TABLE_COLS); } return (TSDB_CHILD_TABLE == tableType || TSDB_NORMAL_TABLE == tableType); diff --git a/source/libs/planner/src/planOptimizer.c b/source/libs/planner/src/planOptimizer.c index 39024731ed..7901f90a1c 100644 --- a/source/libs/planner/src/planOptimizer.c +++ b/source/libs/planner/src/planOptimizer.c @@ -5390,7 +5390,8 @@ static bool tbCntScanOptIsEligibleConds(STbCntScanOptInfo* pInfo, SNode* pCondit static bool tbCntScanOptIsEligibleScan(STbCntScanOptInfo* pInfo) { if (0 != strcmp(pInfo->pScan->tableName.dbname, TSDB_INFORMATION_SCHEMA_DB) || - 0 != strcmp(pInfo->pScan->tableName.tname, TSDB_INS_TABLE_TABLES) || NULL != pInfo->pScan->pGroupTags) { + 0 != strcmp(pInfo->pScan->tableName.tname, TSDB_INS_TABLE_TABLES) || + 0 != strcmp(pInfo->pScan->tableName.tname, TSDB_INS_TABLE_FILESETS) || NULL != pInfo->pScan->pGroupTags) { return false; } if (1 == pInfo->pScan->pVgroupList->numOfVgroups && MNODE_HANDLE == pInfo->pScan->pVgroupList->vgroups[0].vgId) { diff --git a/source/libs/planner/src/planPhysiCreater.c b/source/libs/planner/src/planPhysiCreater.c index 347aeba95e..1e86085886 100644 --- a/source/libs/planner/src/planPhysiCreater.c +++ b/source/libs/planner/src/planPhysiCreater.c @@ -819,8 +819,9 @@ static int32_t createSystemTableScanPhysiNode(SPhysiPlanContext* pCxt, SSubplan* pScan->sysInfo = pCxt->pPlanCxt->sysInfo; if (0 == strcmp(pScanLogicNode->tableName.tname, TSDB_INS_TABLE_TABLES) || 0 == strcmp(pScanLogicNode->tableName.tname, TSDB_INS_TABLE_TAGS) || - 0 == strcmp(pScanLogicNode->tableName.tname, TSDB_INS_TABLE_COLS)) { - if (pScanLogicNode->pVgroupList) { + 0 == strcmp(pScanLogicNode->tableName.tname, TSDB_INS_TABLE_COLS) || + 0 == strcmp(pScanLogicNode->tableName.tname, TSDB_INS_TABLE_FILESETS)) { + if (pScanLogicNode->pVgroupList && pScanLogicNode->pVgroupList->numOfVgroups > 0) { vgroupInfoToNodeAddr(pScanLogicNode->pVgroupList->vgroups, &pSubplan->execNode); } } else { From e79a5232f56e6803e18ebad05c40bb56fb9a8237 Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Tue, 19 Nov 2024 15:32:48 +0800 Subject: [PATCH 14/55] feat: add maxCompactConcurrency config item --- include/common/tglobal.h | 1 + source/common/src/tglobal.c | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/include/common/tglobal.h b/include/common/tglobal.h index 5125c1caef..2d9ae33aa9 100644 --- a/include/common/tglobal.h +++ b/include/common/tglobal.h @@ -77,6 +77,7 @@ extern int32_t tsReadTimeout; extern int32_t tsTimeToGetAvailableConn; extern int32_t tsKeepAliveIdle; extern int32_t tsNumOfCommitThreads; +extern int32_t tsNumOfCompactThreads; extern int32_t tsNumOfTaskQueueThreads; extern int32_t tsNumOfMnodeQueryThreads; extern int32_t tsNumOfMnodeFetchThreads; diff --git a/source/common/src/tglobal.c b/source/common/src/tglobal.c index 93c86a2dcd..266fb1478c 100644 --- a/source/common/src/tglobal.c +++ b/source/common/src/tglobal.c @@ -61,6 +61,7 @@ int32_t tsReadTimeout = 900; int32_t tsTimeToGetAvailableConn = 500000; int32_t tsNumOfCommitThreads = 2; +int32_t tsNumOfCompactThreads = 2; int32_t tsNumOfTaskQueueThreads = 16; int32_t tsNumOfMnodeQueryThreads = 16; int32_t tsNumOfMnodeFetchThreads = 1; @@ -688,6 +689,9 @@ static int32_t taosAddServerCfg(SConfig *pCfg) { tsNumOfCommitThreads = tsNumOfCores / 2; tsNumOfCommitThreads = TRANGE(tsNumOfCommitThreads, 2, 4); + tsNumOfCompactThreads = tsNumOfCommitThreads; + tsNumOfCompactThreads = TRANGE(tsNumOfCompactThreads, 2, 4); + tsNumOfSupportVnodes = tsNumOfCores * 2 + 5; tsNumOfSupportVnodes = TMAX(tsNumOfSupportVnodes, 2); @@ -732,6 +736,7 @@ static int32_t taosAddServerCfg(SConfig *pCfg) { TAOS_CHECK_RETURN(cfgAddInt32(pCfg, "queryBufferSize", tsQueryBufferSize, -1, 500000000000, CFG_SCOPE_SERVER, CFG_DYN_NONE)); TAOS_CHECK_RETURN(cfgAddInt32(pCfg, "queryRspPolicy", tsQueryRspPolicy, 0, 1, CFG_SCOPE_SERVER, CFG_DYN_ENT_SERVER)); TAOS_CHECK_RETURN(cfgAddInt32(pCfg, "numOfCommitThreads", tsNumOfCommitThreads, 1, 1024, CFG_SCOPE_SERVER, CFG_DYN_NONE)); + TAOS_CHECK_RETURN(cfgAddInt32(pCfg, "maxCompactConcurrency", tsNumOfCompactThreads, 1, 1024, CFG_SCOPE_SERVER, CFG_DYN_NONE)); TAOS_CHECK_RETURN(cfgAddInt32(pCfg, "retentionSpeedLimitMB", tsRetentionSpeedLimitMB, 0, 1024, CFG_SCOPE_SERVER, CFG_DYN_NONE)); TAOS_CHECK_RETURN(cfgAddInt32(pCfg, "numOfMnodeReadThreads", tsNumOfMnodeReadThreads, 1, 1024, CFG_SCOPE_SERVER, CFG_DYN_NONE)); @@ -921,6 +926,14 @@ static int32_t taosUpdateServerCfg(SConfig *pCfg) { pItem->stype = stype; } + pItem = cfgGetItem(pCfg, "maxCompactConcurrency"); + if (pItem != NULL && pItem->stype == CFG_STYPE_DEFAULT) { + tsNumOfCompactThreads = numOfCores / 2; + tsNumOfCompactThreads = TRANGE(tsNumOfCompactThreads, 2, 4); + pItem->i32 = tsNumOfCompactThreads; + pItem->stype = stype; + } + pItem = cfgGetItem(pCfg, "numOfMnodeReadThreads"); if (pItem != NULL && pItem->stype == CFG_STYPE_DEFAULT) { tsNumOfMnodeReadThreads = numOfCores / 8; @@ -1406,6 +1419,9 @@ static int32_t taosSetServerCfg(SConfig *pCfg) { TAOS_CHECK_GET_CFG_ITEM(pCfg, pItem, "numOfCommitThreads"); tsNumOfCommitThreads = pItem->i32; + TAOS_CHECK_GET_CFG_ITEM(pCfg, pItem, "maxCompactConcurrency"); + tsNumOfCompactThreads = pItem->i32; + TAOS_CHECK_GET_CFG_ITEM(pCfg, pItem, "retentionSpeedLimitMB"); tsRetentionSpeedLimitMB = pItem->i32; From 9e484be276467523f88b9d677d5e7fe1be89a772 Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Wed, 20 Nov 2024 14:17:50 +0800 Subject: [PATCH 15/55] feat: support `alter dnode max_compact_tasks` --- include/common/tglobal.h | 4 ++- include/util/taoserror.h | 1 + source/common/src/tglobal.c | 4 ++- source/dnode/mgmt/mgmt_dnode/src/dmHandle.c | 21 ++++++++++++++ source/dnode/mnode/impl/src/mndDnode.c | 3 ++ source/libs/parser/src/parTranslater.c | 32 ++++++++++++++++++++- source/util/src/terror.c | 3 +- 7 files changed, 64 insertions(+), 4 deletions(-) diff --git a/include/common/tglobal.h b/include/common/tglobal.h index 2d9ae33aa9..cca89a6cdc 100644 --- a/include/common/tglobal.h +++ b/include/common/tglobal.h @@ -77,7 +77,6 @@ extern int32_t tsReadTimeout; extern int32_t tsTimeToGetAvailableConn; extern int32_t tsKeepAliveIdle; extern int32_t tsNumOfCommitThreads; -extern int32_t tsNumOfCompactThreads; extern int32_t tsNumOfTaskQueueThreads; extern int32_t tsNumOfMnodeQueryThreads; extern int32_t tsNumOfMnodeFetchThreads; @@ -93,6 +92,9 @@ extern int32_t tsNumOfSnodeWriteThreads; extern int64_t tsQueueMemoryAllowed; extern int32_t tsRetentionSpeedLimitMB; +extern const char *tsAlterCompactTaskKeywords; +extern int32_t tsNumOfCompactThreads; + // sync raft extern int32_t tsElectInterval; extern int32_t tsHeartbeatInterval; diff --git a/include/util/taoserror.h b/include/util/taoserror.h index e71e60ae8c..d7a6cba316 100644 --- a/include/util/taoserror.h +++ b/include/util/taoserror.h @@ -478,6 +478,7 @@ int32_t taosGetErrSize(); #define TSDB_CODE_DNODE_INVALID_EN_WHITELIST TAOS_DEF_ERROR_CODE(0, 0x0428) #define TSDB_CODE_DNODE_INVALID_MONITOR_PARAS TAOS_DEF_ERROR_CODE(0, 0x0429) #define TSDB_CODE_MNODE_STOPPED TAOS_DEF_ERROR_CODE(0, 0x042A) +#define TSDB_CODE_DNODE_INVALID_COMPACT_TASKS TAOS_DEF_ERROR_CODE(0, 0x042B) // anode #define TSDB_CODE_MND_ANODE_ALREADY_EXIST TAOS_DEF_ERROR_CODE(0, 0x0430) diff --git a/source/common/src/tglobal.c b/source/common/src/tglobal.c index 266fb1478c..e0714d4ee5 100644 --- a/source/common/src/tglobal.c +++ b/source/common/src/tglobal.c @@ -61,7 +61,6 @@ int32_t tsReadTimeout = 900; int32_t tsTimeToGetAvailableConn = 500000; int32_t tsNumOfCommitThreads = 2; -int32_t tsNumOfCompactThreads = 2; int32_t tsNumOfTaskQueueThreads = 16; int32_t tsNumOfMnodeQueryThreads = 16; int32_t tsNumOfMnodeFetchThreads = 1; @@ -78,6 +77,9 @@ int32_t tsMaxStreamBackendCache = 128; // M int32_t tsPQSortMemThreshold = 16; // M int32_t tsRetentionSpeedLimitMB = 0; // unlimited +const char *tsAlterCompactTaskKeywords = "max_compact_tasks"; +int32_t tsNumOfCompactThreads = 2; + // sync raft int32_t tsElectInterval = 25 * 1000; int32_t tsHeartbeatInterval = 1000; diff --git a/source/dnode/mgmt/mgmt_dnode/src/dmHandle.c b/source/dnode/mgmt/mgmt_dnode/src/dmHandle.c index c01fdcc85b..4cd9195404 100644 --- a/source/dnode/mgmt/mgmt_dnode/src/dmHandle.c +++ b/source/dnode/mgmt/mgmt_dnode/src/dmHandle.c @@ -344,6 +344,23 @@ int32_t dmProcessGrantRsp(SDnodeMgmt *pMgmt, SRpcMsg *pMsg) { return 0; } +static int32_t dmAlterMaxCompactTask(const char *value) { + int32_t max_compact_tasks; + char *endptr = NULL; + + max_compact_tasks = taosStr2Int32(value, &endptr, 10); + if (endptr == value || endptr[0] != '\0') { + return TSDB_CODE_INVALID_MSG; + } + + if (max_compact_tasks != tsNumOfCompactThreads) { + dInfo("alter max compact tasks from %d to %d", tsNumOfCompactThreads, max_compact_tasks); + tsNumOfCompactThreads = max_compact_tasks; + } + + return TSDB_CODE_SUCCESS; +} + int32_t dmProcessConfigReq(SDnodeMgmt *pMgmt, SRpcMsg *pMsg) { int32_t code = 0; SDCfgDnodeReq cfgReq = {0}; @@ -351,6 +368,10 @@ int32_t dmProcessConfigReq(SDnodeMgmt *pMgmt, SRpcMsg *pMsg) { return TSDB_CODE_INVALID_MSG; } + if (strncmp(cfgReq.config, tsAlterCompactTaskKeywords, strlen(tsAlterCompactTaskKeywords) + 1) == 0) { + return dmAlterMaxCompactTask(cfgReq.value); + } + dInfo("start to config, option:%s, value:%s", cfgReq.config, cfgReq.value); SConfig *pCfg = taosGetCfg(); diff --git a/source/dnode/mnode/impl/src/mndDnode.c b/source/dnode/mnode/impl/src/mndDnode.c index 0011c11b0a..02359bccfe 100644 --- a/source/dnode/mnode/impl/src/mndDnode.c +++ b/source/dnode/mnode/impl/src/mndDnode.c @@ -1536,6 +1536,9 @@ static int32_t mndProcessConfigDnodeReq(SRpcMsg *pReq) { strcpy(dcfgReq.config, "s3blocksize"); snprintf(dcfgReq.value, TSDB_DNODE_VALUE_LEN, "%d", flag); #endif + } else if (strncasecmp(cfgReq.config, tsAlterCompactTaskKeywords, strlen(tsAlterCompactTaskKeywords) + 1) == 0) { + tstrncpy(dcfgReq.config, cfgReq.config, TSDB_DNODE_CONFIG_LEN); + tstrncpy(dcfgReq.value, cfgReq.value, TSDB_DNODE_VALUE_LEN); } else { TAOS_CHECK_GOTO (mndMCfg2DCfg(&cfgReq, &dcfgReq), NULL, _err_out); if (strlen(dcfgReq.config) > TSDB_DNODE_CONFIG_LEN) { diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c index 59b5d113ad..282d58ea6a 100755 --- a/source/libs/parser/src/parTranslater.c +++ b/source/libs/parser/src/parTranslater.c @@ -9718,6 +9718,9 @@ static int32_t translateDropDnode(STranslateContext* pCxt, SDropDnodeStmt* pStmt return code; } +#define MIN_MAX_COMPACT_TASKS 1 +#define MAX_MAX_COMPACT_TASKS 100 + static int32_t translateAlterDnode(STranslateContext* pCxt, SAlterDnodeStmt* pStmt) { SMCfgDnodeReq cfgReq = {0}; cfgReq.dnodeId = pStmt->dnodeId; @@ -9725,7 +9728,12 @@ static int32_t translateAlterDnode(STranslateContext* pCxt, SAlterDnodeStmt* pSt strcpy(cfgReq.value, pStmt->value); int32_t code = 0; - if (0 == strncasecmp(cfgReq.config, "encrypt_key", 12)) { + + const char* validConfigs[] = { + "encrypt_key", + tsAlterCompactTaskKeywords, + }; + if (0 == strncasecmp(cfgReq.config, validConfigs[0], strlen(validConfigs[0]) + 1)) { int32_t klen = strlen(cfgReq.value); if (klen > ENCRYPT_KEY_LEN || klen < ENCRYPT_KEY_LEN_MIN) { tFreeSMCfgDnodeReq(&cfgReq); @@ -9734,6 +9742,28 @@ static int32_t translateAlterDnode(STranslateContext* pCxt, SAlterDnodeStmt* pSt ENCRYPT_KEY_LEN_MIN, ENCRYPT_KEY_LEN); } code = buildCmdMsg(pCxt, TDMT_MND_CREATE_ENCRYPT_KEY, (FSerializeFunc)tSerializeSMCfgDnodeReq, &cfgReq); + } else if (0 == strncasecmp(cfgReq.config, validConfigs[1], strlen(validConfigs[1]) + 1)) { + char* endptr = NULL; + int32_t maxCompactTasks = taosStr2Int32(cfgReq.value, &endptr, 10); + int32_t minMaxCompactTasks = MIN_MAX_COMPACT_TASKS; + int32_t maxMaxCompactTasks = MAX_MAX_COMPACT_TASKS; + + // check format + if (endptr == cfgReq.value || endptr[0] != '\0') { + tFreeSMCfgDnodeReq(&cfgReq); + return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_DNODE_INVALID_COMPACT_TASKS, + "Invalid max compact tasks: %s", cfgReq.value); + } + + // check range + if (maxCompactTasks < minMaxCompactTasks || maxCompactTasks > maxMaxCompactTasks) { + tFreeSMCfgDnodeReq(&cfgReq); + return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_DNODE_INVALID_COMPACT_TASKS, + "Invalid max compact tasks: %d, valid range [%d,%d]", maxCompactTasks, + minMaxCompactTasks, maxMaxCompactTasks); + } + + code = buildCmdMsg(pCxt, TDMT_MND_CONFIG_DNODE, (FSerializeFunc)tSerializeSMCfgDnodeReq, &cfgReq); } else { code = buildCmdMsg(pCxt, TDMT_MND_CONFIG_DNODE, (FSerializeFunc)tSerializeSMCfgDnodeReq, &cfgReq); } diff --git a/source/util/src/terror.c b/source/util/src/terror.c index 753aed9878..fd660a297a 100644 --- a/source/util/src/terror.c +++ b/source/util/src/terror.c @@ -415,7 +415,8 @@ TAOS_DEFINE_ERROR(TSDB_CODE_DNODE_INVALID_CHARSET, "charset not match") TAOS_DEFINE_ERROR(TSDB_CODE_DNODE_INVALID_LOCALE, "locale not match") TAOS_DEFINE_ERROR(TSDB_CODE_DNODE_INVALID_TTL_CHG_ON_WR, "ttlChangeOnWrite not match") TAOS_DEFINE_ERROR(TSDB_CODE_DNODE_INVALID_EN_WHITELIST, "enableWhiteList not match") -TAOS_DEFINE_ERROR(TSDB_CODE_MNODE_STOPPED, "Mnode stopped") +TAOS_DEFINE_ERROR(TSDB_CODE_MNODE_STOPPED, "Mnode stopped") +TAOS_DEFINE_ERROR(TSDB_CODE_DNODE_INVALID_COMPACT_TASKS, "Invalid max compact tasks") // vnode TAOS_DEFINE_ERROR(TSDB_CODE_VND_INVALID_VGROUP_ID, "Vnode is closed or removed") From dfae4f4487002fc959f0c8562e2d257733e4e434 Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Wed, 20 Nov 2024 16:19:52 +0800 Subject: [PATCH 16/55] more code --- source/util/src/terror.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/util/src/terror.c b/source/util/src/terror.c index fd660a297a..49598458a0 100644 --- a/source/util/src/terror.c +++ b/source/util/src/terror.c @@ -193,7 +193,7 @@ TAOS_DEFINE_ERROR(TSDB_CODE_SDB_OBJ_DROPPING, "Object is dropping") // mnode-dnode-part1 TAOS_DEFINE_ERROR(TSDB_CODE_MND_DNODE_ALREADY_EXIST, "Dnode already exists") TAOS_DEFINE_ERROR(TSDB_CODE_MND_DNODE_NOT_EXIST, "Dnode does not exist") -TAOS_DEFINE_ERROR(TSDB_CODE_MND_VGROUP_NOT_EXIST, "Vgroup does not exist") +TAOS_DEFINE_ERROR(TSDB_CODE_MND_VGROUP_NOT_EXIST, "Vgroup does not exist or not in db") TAOS_DEFINE_ERROR(TSDB_CODE_MND_CANT_DROP_LEADER, "Cannot drop mnode which is leader") TAOS_DEFINE_ERROR(TSDB_CODE_MND_NO_ENOUGH_DNODES, "Out of dnodes") TAOS_DEFINE_ERROR(TSDB_CODE_MND_INVALID_CLUSTER_CFG, "Cluster cfg inconsistent") From 34944abfd36d307ed738fac3498397ff53777e19 Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Wed, 20 Nov 2024 16:47:35 +0800 Subject: [PATCH 17/55] more change --- source/libs/parser/src/parTranslater.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c index 282d58ea6a..2a86316ec0 100755 --- a/source/libs/parser/src/parTranslater.c +++ b/source/libs/parser/src/parTranslater.c @@ -364,7 +364,7 @@ static const SSysTableShowAdapter sysTableShowAdapter[] = { .pShowCols = {"*"} }, { - .showType = QUERY_NODE_SHOW_TABLES_STMT, + .showType = QUERY_NODE_SHOW_FILESETS_STMT, .pDbName = TSDB_INFORMATION_SCHEMA_DB, .pTableName = TSDB_INS_TABLE_FILESETS, .numOfShowCols = 1, From 8b3e84ef2d9aac4674214864ab79ce27f0b4c1ec Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Thu, 21 Nov 2024 10:16:17 +0800 Subject: [PATCH 18/55] fix query problem --- include/common/tmsg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/common/tmsg.h b/include/common/tmsg.h index d285a2ebfd..8564684d02 100644 --- a/include/common/tmsg.h +++ b/include/common/tmsg.h @@ -370,7 +370,6 @@ typedef enum ENodeType { QUERY_NODE_SHOW_STABLES_STMT, QUERY_NODE_SHOW_STREAMS_STMT, QUERY_NODE_SHOW_TABLES_STMT, - QUERY_NODE_SHOW_FILESETS_STMT, QUERY_NODE_SHOW_TAGS_STMT, QUERY_NODE_SHOW_USERS_STMT, QUERY_NODE_SHOW_USERS_FULL_STMT, @@ -400,6 +399,7 @@ typedef enum ENodeType { QUERY_NODE_CREATE_TSMA_STMT, QUERY_NODE_SHOW_CREATE_TSMA_STMT, QUERY_NODE_DROP_TSMA_STMT, + QUERY_NODE_SHOW_FILESETS_STMT, // logic plan node QUERY_NODE_LOGIC_PLAN_SCAN = 1000, From bca566602c6d740fe0dd764b84b7075b0b27cb3b Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Thu, 21 Nov 2024 10:52:37 +0800 Subject: [PATCH 19/55] adjust some macro position --- include/common/tmsg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/common/tmsg.h b/include/common/tmsg.h index 8564684d02..c703d2dce9 100644 --- a/include/common/tmsg.h +++ b/include/common/tmsg.h @@ -388,7 +388,6 @@ typedef enum ENodeType { QUERY_NODE_SHOW_USER_PRIVILEGES_STMT, QUERY_NODE_SHOW_VIEWS_STMT, QUERY_NODE_SHOW_COMPACTS_STMT, - QUERY_NODE_SHOW_COMPACT_DETAILS_STMT, QUERY_NODE_SHOW_GRANTS_FULL_STMT, QUERY_NODE_SHOW_GRANTS_LOGS_STMT, QUERY_NODE_SHOW_CLUSTER_MACHINES_STMT, @@ -400,6 +399,7 @@ typedef enum ENodeType { QUERY_NODE_SHOW_CREATE_TSMA_STMT, QUERY_NODE_DROP_TSMA_STMT, QUERY_NODE_SHOW_FILESETS_STMT, + QUERY_NODE_SHOW_COMPACT_DETAILS_STMT, // logic plan node QUERY_NODE_LOGIC_PLAN_SCAN = 1000, From ef2e694a36077d7acb44a9e73980cdfd55b93994 Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Mon, 25 Nov 2024 16:05:32 +0800 Subject: [PATCH 20/55] more code --- source/common/src/tglobal.c | 32 ++++++++++++--------- source/dnode/mgmt/mgmt_dnode/src/dmHandle.c | 4 +++ source/dnode/vnode/src/inc/tsdb.h | 5 +++- source/dnode/vnode/src/tsdb/tsdbOpen.c | 16 +++++++++++ source/dnode/vnode/src/vnd/vnodeModule.c | 3 ++ 5 files changed, 45 insertions(+), 15 deletions(-) diff --git a/source/common/src/tglobal.c b/source/common/src/tglobal.c index e0714d4ee5..235538e75a 100644 --- a/source/common/src/tglobal.c +++ b/source/common/src/tglobal.c @@ -458,9 +458,7 @@ int32_t taosSetS3Cfg(SConfig *pCfg) { TAOS_RETURN(TSDB_CODE_SUCCESS); } -struct SConfig *taosGetCfg() { - return tsCfg; -} +struct SConfig *taosGetCfg() { return tsCfg; } static int32_t taosLoadCfg(SConfig *pCfg, const char **envCmd, const char *inputCfgDir, const char *envFile, char *apolloUrl) { @@ -541,7 +539,8 @@ int32_t taosAddClientLogCfg(SConfig *pCfg) { TAOS_CHECK_RETURN(cfgAddInt32(pCfg, "jniDebugFlag", jniDebugFlag, 0, 255, CFG_SCOPE_CLIENT, CFG_DYN_CLIENT)); TAOS_CHECK_RETURN(cfgAddInt32(pCfg, "qDebugFlag", qDebugFlag, 0, 255, CFG_SCOPE_BOTH, CFG_DYN_BOTH)); TAOS_CHECK_RETURN(cfgAddInt32(pCfg, "cDebugFlag", cDebugFlag, 0, 255, CFG_SCOPE_CLIENT, CFG_DYN_CLIENT)); - TAOS_CHECK_RETURN(cfgAddInt32(pCfg, "tqClientDebugFlag", tqClientDebugFlag, 0, 255, CFG_SCOPE_CLIENT, CFG_DYN_SERVER)); + TAOS_CHECK_RETURN( + cfgAddInt32(pCfg, "tqClientDebugFlag", tqClientDebugFlag, 0, 255, CFG_SCOPE_CLIENT, CFG_DYN_SERVER)); TAOS_RETURN(TSDB_CODE_SUCCESS); } @@ -594,8 +593,10 @@ static int32_t taosAddClientCfg(SConfig *pCfg) { TAOS_CHECK_RETURN( cfgAddBool(pCfg, "queryUseNodeAllocator", tsQueryUseNodeAllocator, CFG_SCOPE_CLIENT, CFG_DYN_CLIENT)); TAOS_CHECK_RETURN(cfgAddBool(pCfg, "keepColumnName", tsKeepColumnName, CFG_SCOPE_CLIENT, CFG_DYN_CLIENT)); - TAOS_CHECK_RETURN(cfgAddInt32(pCfg, "minSlidingTime", tsMinSlidingTime, 1, 1000000, CFG_SCOPE_CLIENT, CFG_DYN_CLIENT)); - TAOS_CHECK_RETURN(cfgAddInt32(pCfg, "minIntervalTime", tsMinIntervalTime, 1, 1000000, CFG_SCOPE_CLIENT, CFG_DYN_CLIENT)); + TAOS_CHECK_RETURN( + cfgAddInt32(pCfg, "minSlidingTime", tsMinSlidingTime, 1, 1000000, CFG_SCOPE_CLIENT, CFG_DYN_CLIENT)); + TAOS_CHECK_RETURN( + cfgAddInt32(pCfg, "minIntervalTime", tsMinIntervalTime, 1, 1000000, CFG_SCOPE_CLIENT, CFG_DYN_CLIENT)); TAOS_CHECK_RETURN(cfgAddString(pCfg, "smlChildTableName", tsSmlChildTableName, CFG_SCOPE_CLIENT, CFG_DYN_CLIENT)); TAOS_CHECK_RETURN(cfgAddString(pCfg, "smlAutoChildTableNameDelimiter", tsSmlAutoChildTableNameDelimiter, CFG_SCOPE_CLIENT, CFG_DYN_CLIENT)); @@ -2019,14 +2020,17 @@ static int32_t taosCfgDynamicOptionsForServer(SConfig *pCfg, const char *name) { { // 'bool/int32_t/int64_t/float/double' variables with general modification function static OptionNameAndVar debugOptions[] = { - {"dDebugFlag", &dDebugFlag}, {"vDebugFlag", &vDebugFlag}, {"mDebugFlag", &mDebugFlag}, - {"wDebugFlag", &wDebugFlag}, {"azDebugFlag", &azDebugFlag}, {"sDebugFlag", &sDebugFlag}, - {"tsdbDebugFlag", &tsdbDebugFlag}, {"tqDebugFlag", &tqDebugFlag}, {"fsDebugFlag", &fsDebugFlag}, - {"udfDebugFlag", &udfDebugFlag}, {"smaDebugFlag", &smaDebugFlag}, {"idxDebugFlag", &idxDebugFlag}, - {"tdbDebugFlag", &tdbDebugFlag}, {"tmrDebugFlag", &tmrDebugFlag}, {"uDebugFlag", &uDebugFlag}, - {"smaDebugFlag", &smaDebugFlag}, {"rpcDebugFlag", &rpcDebugFlag}, {"qDebugFlag", &qDebugFlag}, - {"metaDebugFlag", &metaDebugFlag}, {"stDebugFlag", &stDebugFlag}, {"sndDebugFlag", &sndDebugFlag}, - {"tqClientDebugFlag", &tqClientDebugFlag}, + {"dDebugFlag", &dDebugFlag}, {"vDebugFlag", &vDebugFlag}, + {"mDebugFlag", &mDebugFlag}, {"wDebugFlag", &wDebugFlag}, + {"azDebugFlag", &azDebugFlag}, {"sDebugFlag", &sDebugFlag}, + {"tsdbDebugFlag", &tsdbDebugFlag}, {"tqDebugFlag", &tqDebugFlag}, + {"fsDebugFlag", &fsDebugFlag}, {"udfDebugFlag", &udfDebugFlag}, + {"smaDebugFlag", &smaDebugFlag}, {"idxDebugFlag", &idxDebugFlag}, + {"tdbDebugFlag", &tdbDebugFlag}, {"tmrDebugFlag", &tmrDebugFlag}, + {"uDebugFlag", &uDebugFlag}, {"smaDebugFlag", &smaDebugFlag}, + {"rpcDebugFlag", &rpcDebugFlag}, {"qDebugFlag", &qDebugFlag}, + {"metaDebugFlag", &metaDebugFlag}, {"stDebugFlag", &stDebugFlag}, + {"sndDebugFlag", &sndDebugFlag}, {"tqClientDebugFlag", &tqClientDebugFlag}, }; static OptionNameAndVar options[] = {{"audit", &tsEnableAudit}, diff --git a/source/dnode/mgmt/mgmt_dnode/src/dmHandle.c b/source/dnode/mgmt/mgmt_dnode/src/dmHandle.c index 4cd9195404..ba124739f1 100644 --- a/source/dnode/mgmt/mgmt_dnode/src/dmHandle.c +++ b/source/dnode/mgmt/mgmt_dnode/src/dmHandle.c @@ -344,6 +344,7 @@ int32_t dmProcessGrantRsp(SDnodeMgmt *pMgmt, SRpcMsg *pMsg) { return 0; } +extern void tsdbAlterMaxCompactTasks(); static int32_t dmAlterMaxCompactTask(const char *value) { int32_t max_compact_tasks; char *endptr = NULL; @@ -356,6 +357,9 @@ static int32_t dmAlterMaxCompactTask(const char *value) { if (max_compact_tasks != tsNumOfCompactThreads) { dInfo("alter max compact tasks from %d to %d", tsNumOfCompactThreads, max_compact_tasks); tsNumOfCompactThreads = max_compact_tasks; +#ifdef TD_ENTERPRISE + tsdbAlterMaxCompactTasks(); +#endif } return TSDB_CODE_SUCCESS; diff --git a/source/dnode/vnode/src/inc/tsdb.h b/source/dnode/vnode/src/inc/tsdb.h index c1123db7a3..f8c0431c34 100644 --- a/source/dnode/vnode/src/inc/tsdb.h +++ b/source/dnode/vnode/src/inc/tsdb.h @@ -379,7 +379,7 @@ struct STsdb { struct { SVHashTable *ht; SArray *arr; - } * commitInfo; + } *commitInfo; }; struct TSDBKEY { @@ -1080,6 +1080,9 @@ void tsdbRemoveFile(const char *path); } \ } while (0) +int32_t tsdbInit(); +void tsdbCleanUp(); + #ifdef __cplusplus } #endif diff --git a/source/dnode/vnode/src/tsdb/tsdbOpen.c b/source/dnode/vnode/src/tsdb/tsdbOpen.c index c1f8f45d7e..58a22a6c7b 100644 --- a/source/dnode/vnode/src/tsdb/tsdbOpen.c +++ b/source/dnode/vnode/src/tsdb/tsdbOpen.c @@ -18,6 +18,22 @@ extern int32_t tsdbOpenCompMonitor(STsdb *tsdb); extern void tsdbCloseCompMonitor(STsdb *tsdb); +extern int32_t tsdbInitCompact(); +extern void tsdbClearnupCompact(); + +int32_t tsdbInit() { +#ifdef TD_ENTERPRISE + return tsdbInitCompact(); +#endif + return 0; +} + +void tsdbCleanUp() { +#ifdef TD_ENTERPRISE + tsdbClearnupCompact(); +#endif + return; +} void tsdbSetKeepCfg(STsdb *pTsdb, STsdbCfg *pCfg) { STsdbKeepCfg *pKeepCfg = &pTsdb->keepCfg; diff --git a/source/dnode/vnode/src/vnd/vnodeModule.c b/source/dnode/vnode/src/vnd/vnodeModule.c index 781736edba..9d326defdd 100644 --- a/source/dnode/vnode/src/vnd/vnodeModule.c +++ b/source/dnode/vnode/src/vnd/vnodeModule.c @@ -15,6 +15,7 @@ #include "cos.h" #include "monitor.h" +#include "tsdb.h" #include "vnd.h" static volatile int32_t VINIT = 0; @@ -26,6 +27,7 @@ int vnodeInit(int nthreads, StopDnodeFp stopDnodeFp) { TAOS_CHECK_RETURN(vnodeAsyncOpen(nthreads)); TAOS_CHECK_RETURN(walInit(stopDnodeFp)); + TAOS_CHECK_RETURN(tsdbInit()); monInitVnode(); @@ -34,6 +36,7 @@ int vnodeInit(int nthreads, StopDnodeFp stopDnodeFp) { void vnodeCleanup() { if (atomic_val_compare_exchange_32(&VINIT, 1, 0) == 0) return; + tsdbCleanUp(); vnodeAsyncClose(); walCleanUp(); smaCleanUp(); From a2b0fee617e3d37aa699905836d0ce75e9c5ee65 Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Tue, 26 Nov 2024 14:23:13 +0800 Subject: [PATCH 21/55] fix query bug --- source/libs/planner/src/planPhysiCreater.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/libs/planner/src/planPhysiCreater.c b/source/libs/planner/src/planPhysiCreater.c index 1e86085886..27661a9d8c 100644 --- a/source/libs/planner/src/planPhysiCreater.c +++ b/source/libs/planner/src/planPhysiCreater.c @@ -821,7 +821,7 @@ static int32_t createSystemTableScanPhysiNode(SPhysiPlanContext* pCxt, SSubplan* 0 == strcmp(pScanLogicNode->tableName.tname, TSDB_INS_TABLE_TAGS) || 0 == strcmp(pScanLogicNode->tableName.tname, TSDB_INS_TABLE_COLS) || 0 == strcmp(pScanLogicNode->tableName.tname, TSDB_INS_TABLE_FILESETS)) { - if (pScanLogicNode->pVgroupList && pScanLogicNode->pVgroupList->numOfVgroups > 0) { + if (pScanLogicNode->pVgroupList) { vgroupInfoToNodeAddr(pScanLogicNode->pVgroupList->vgroups, &pSubplan->execNode); } } else { From 67924ee55bf9dfbcc72df6dd23d75f9966ce67c4 Mon Sep 17 00:00:00 2001 From: kailixu Date: Tue, 26 Nov 2024 19:46:48 +0800 Subject: [PATCH 22/55] feat: support auto compact --- include/common/tmsg.h | 12 +-- include/libs/nodes/cmdnodes.h | 8 +- include/util/tdef.h | 4 + source/common/src/tmsg.c | 24 +++--- source/dnode/mnode/impl/inc/mndDef.h | 6 +- source/dnode/mnode/impl/src/mndCompact.c | 52 +++++++++++- source/dnode/mnode/impl/src/mndDb.c | 14 ++- source/libs/parser/inc/sql.y | 5 +- source/libs/parser/src/parAstCreater.c | 11 ++- source/libs/parser/src/parTokenizer.c | 3 + source/libs/parser/src/parTranslater.c | 104 ++++++++++++++--------- 11 files changed, 173 insertions(+), 70 deletions(-) diff --git a/include/common/tmsg.h b/include/common/tmsg.h index d3f897fedc..cdc43ad64a 100644 --- a/include/common/tmsg.h +++ b/include/common/tmsg.h @@ -1344,9 +1344,9 @@ typedef struct { char dnodeListStr[TSDB_DNODE_LIST_LEN]; // 1. add auto-compact parameters int32_t compactInterval; - int32_t compactStartTime; - int32_t compactEndTime; - int32_t compactTimeOffset; + int64_t compactStartTime; + int64_t compactEndTime; + int8_t compactTimeOffset; } SCreateDbReq; int32_t tSerializeSCreateDbReq(void* buf, int32_t bufLen, SCreateDbReq* pReq); @@ -1380,9 +1380,9 @@ typedef struct { int8_t withArbitrator; // 1. add auto-compact parameters int32_t compactInterval; - int32_t compactStartTime; - int32_t compactEndTime; - int32_t compactTimeOffset; + int64_t compactStartTime; + int64_t compactEndTime; + int8_t compactTimeOffset; } SAlterDbReq; int32_t tSerializeSAlterDbReq(void* buf, int32_t bufLen, SAlterDbReq* pReq); diff --git a/include/libs/nodes/cmdnodes.h b/include/libs/nodes/cmdnodes.h index 7b687fc782..fe3c5dbd8f 100644 --- a/include/libs/nodes/cmdnodes.h +++ b/include/libs/nodes/cmdnodes.h @@ -111,12 +111,12 @@ typedef struct SDatabaseOptions { int8_t withArbitrator; // for auto-compact SValueNode* pCompactIntervalNode; - int32_t compactInterval; + int32_t compactInterval; // minutes SNodeList* pCompactTimeRangeList; - int32_t compactStartTime; - int32_t compactEndTime; + int32_t compactStartTime; // minutes + int32_t compactEndTime; // minutes SValueNode* pCompactTimeOffsetNode; - int32_t compactTimeOffset; + int32_t compactTimeOffset; // hours } SDatabaseOptions; typedef struct SCreateDatabaseStmt { diff --git a/include/util/tdef.h b/include/util/tdef.h index 639a3f1c25..56a2ea878b 100644 --- a/include/util/tdef.h +++ b/include/util/tdef.h @@ -506,8 +506,12 @@ typedef enum ELogicConditionType { #define TSDB_DEFAULT_TABLE_TTL 0 #define TSDB_DEFAULT_COMPACT_INTERVAL 0 +#define TSDB_MIN_COMPACT_INTERVAL 10 // unit minute +#define TSDB_MAX_COMPACT_INTERVAL TSDB_MAX_KEEP // unit minute #define TSDB_DEFAULT_COMPACT_START_TIME 0 #define TSDB_DEFAULT_COMPACT_END_TIME 0 +#define TSDB_MIN_COMPACT_TIME_OFFSET 0 +#define TSDB_MAX_COMPACT_TIME_OFFSET 23 #define TSDB_DEFAULT_COMPACT_TIME_OFFSET 0 #define TSDB_MIN_EXPLAIN_RATIO 0 diff --git a/source/common/src/tmsg.c b/source/common/src/tmsg.c index 178bdecbd8..eff7e4c2ea 100644 --- a/source/common/src/tmsg.c +++ b/source/common/src/tmsg.c @@ -3939,9 +3939,9 @@ int32_t tSerializeSCreateDbReq(void *buf, int32_t bufLen, SCreateDbReq *pReq) { // auto-compact parameters TAOS_CHECK_EXIT(tEncodeI32v(&encoder, pReq->compactInterval)); - TAOS_CHECK_EXIT(tEncodeI32v(&encoder, pReq->compactStartTime)); - TAOS_CHECK_EXIT(tEncodeI32v(&encoder, pReq->compactEndTime)); - TAOS_CHECK_EXIT(tEncodeI32v(&encoder, pReq->compactTimeOffset)); + TAOS_CHECK_EXIT(tEncodeI64v(&encoder, pReq->compactStartTime)); + TAOS_CHECK_EXIT(tEncodeI64v(&encoder, pReq->compactEndTime)); + TAOS_CHECK_EXIT(tEncodeI8(&encoder, pReq->compactTimeOffset)); tEndEncode(&encoder); @@ -4036,9 +4036,9 @@ int32_t tDeserializeSCreateDbReq(void *buf, int32_t bufLen, SCreateDbReq *pReq) if (!tDecodeIsEnd(&decoder)) { TAOS_CHECK_EXIT(tDecodeI32v(&decoder, &pReq->compactInterval)); - TAOS_CHECK_EXIT(tDecodeI32v(&decoder, &pReq->compactStartTime)); - TAOS_CHECK_EXIT(tDecodeI32v(&decoder, &pReq->compactEndTime)); - TAOS_CHECK_EXIT(tDecodeI32v(&decoder, &pReq->compactTimeOffset)); + TAOS_CHECK_EXIT(tDecodeI64v(&decoder, &pReq->compactStartTime)); + TAOS_CHECK_EXIT(tDecodeI64v(&decoder, &pReq->compactEndTime)); + TAOS_CHECK_EXIT(tDecodeI8(&decoder, &pReq->compactTimeOffset)); } else { pReq->compactInterval = 0; pReq->compactStartTime = 0; @@ -4098,9 +4098,9 @@ int32_t tSerializeSAlterDbReq(void *buf, int32_t bufLen, SAlterDbReq *pReq) { TAOS_CHECK_EXIT(tEncodeI8(&encoder, pReq->withArbitrator)); // auto compact config TAOS_CHECK_EXIT(tEncodeI32v(&encoder, pReq->compactInterval)); - TAOS_CHECK_EXIT(tEncodeI32v(&encoder, pReq->compactStartTime)); - TAOS_CHECK_EXIT(tEncodeI32v(&encoder, pReq->compactEndTime)); - TAOS_CHECK_EXIT(tEncodeI32v(&encoder, pReq->compactTimeOffset)); + TAOS_CHECK_EXIT(tEncodeI64v(&encoder, pReq->compactStartTime)); + TAOS_CHECK_EXIT(tEncodeI64v(&encoder, pReq->compactEndTime)); + TAOS_CHECK_EXIT(tEncodeI8(&encoder, pReq->compactTimeOffset)); tEndEncode(&encoder); _exit: @@ -4172,9 +4172,9 @@ int32_t tDeserializeSAlterDbReq(void *buf, int32_t bufLen, SAlterDbReq *pReq) { // auto compact config if (!tDecodeIsEnd(&decoder)) { TAOS_CHECK_EXIT(tDecodeI32v(&decoder, &pReq->compactInterval)); - TAOS_CHECK_EXIT(tDecodeI32v(&decoder, &pReq->compactStartTime)); - TAOS_CHECK_EXIT(tDecodeI32v(&decoder, &pReq->compactEndTime)); - TAOS_CHECK_EXIT(tDecodeI32v(&decoder, &pReq->compactTimeOffset)); + TAOS_CHECK_EXIT(tDecodeI64v(&decoder, &pReq->compactStartTime)); + TAOS_CHECK_EXIT(tDecodeI64v(&decoder, &pReq->compactEndTime)); + TAOS_CHECK_EXIT(tDecodeI8(&decoder, &pReq->compactTimeOffset)); } else { pReq->compactInterval = 0; pReq->compactStartTime = 0; diff --git a/source/dnode/mnode/impl/inc/mndDef.h b/source/dnode/mnode/impl/inc/mndDef.h index 2b1de5cf7b..66b296dde4 100644 --- a/source/dnode/mnode/impl/inc/mndDef.h +++ b/source/dnode/mnode/impl/inc/mndDef.h @@ -423,10 +423,10 @@ typedef struct { int8_t s3Compact; int8_t withArbitrator; int8_t encryptAlgorithm; + int8_t compactTimeOffset; int32_t compactInterval; - int32_t compactStartTime; - int32_t compactEndTime; - int32_t compactTimeOffset; + int64_t compactStartTime; + int64_t compactEndTime; } SDbCfg; typedef struct { diff --git a/source/dnode/mnode/impl/src/mndCompact.c b/source/dnode/mnode/impl/src/mndCompact.c index ee49c60084..5650fb5899 100644 --- a/source/dnode/mnode/impl/src/mndCompact.c +++ b/source/dnode/mnode/impl/src/mndCompact.c @@ -858,7 +858,7 @@ static int32_t mndSaveCompactProgress(SMnode *pMnode, int32_t compactId) { return 0; } -void mndCompactPullup(SMnode *pMnode) { +static void mndCompactPullup(SMnode *pMnode) { int32_t code = 0; SSdb *pSdb = pMnode->pSdb; SArray *pArray = taosArrayInit(sdbGetSize(pSdb, SDB_COMPACT), sizeof(int32_t)); @@ -891,8 +891,58 @@ void mndCompactPullup(SMnode *pMnode) { taosArrayDestroy(pArray); } +static int32_t mndProcessAutoCompact(SRpcMsg *pReq) { + int32_t code = 0, lino = 0; + SMnode *pMnode = pReq->info.node; + SSdb *pSdb = pMnode->pSdb; + int64_t now = taosGetTimestampMs(); + + void *pDbIter = NULL; + while (1) { + SDbObj *pDb = NULL; + pDbIter = sdbFetch(pSdb, SDB_DB, pDbIter, (void **)&pDb); + if (pDbIter == NULL) break; + + if ((pDb->cfg.compactInterval == 0) || (pDb->cfg.compactStartTime == pDb->cfg.compactEndTime)) { + sdbRelease(pSdb, pDb); + continue; + } + + if (pDb->cfg.compactStartTime > pDb->cfg.compactEndTime) { + mWarn("db:%s compact start time is greater than end time", pDb->name); + sdbRelease(pSdb, pDb); + continue; + } + + // check if there is an unfinished compact task for this db + bool hasCompact = false; + void *pCompactIter = NULL; + while (1) { + SCompactObj *pCompact = NULL; + pCompactIter = sdbFetch(pSdb, SDB_COMPACT, pCompactIter, (void **)&pCompact); + if (pCompactIter == NULL) break; + if (0 == strncmp(pCompact->dbname, pDb->name, TSDB_DB_FNAME_LEN) == 0) { + hasCompact = true; + sdbRelease(pSdb, pCompact); + break; + } + sdbRelease(pSdb, pCompact); + } + if (hasCompact) { + mInfo("db:%s skip auto compact since unfinished compact task", pDb->name); + sdbRelease(pSdb, pDb); + continue; + } + + sdbRelease(pSdb, pDb); + } + + return 0; +} + static int32_t mndProcessCompactTimer(SRpcMsg *pReq) { mTrace("start to process compact timer"); mndCompactPullup(pReq->info.node); + TAOS_UNUSED(mndProcessAutoCompact(pReq)); return 0; } diff --git a/source/dnode/mnode/impl/src/mndDb.c b/source/dnode/mnode/impl/src/mndDb.c index db42bc8ff4..ded29ad84e 100644 --- a/source/dnode/mnode/impl/src/mndDb.c +++ b/source/dnode/mnode/impl/src/mndDb.c @@ -37,7 +37,7 @@ #include "tjson.h" #define DB_VER_NUMBER 1 -#define DB_RESERVE_SIZE 27 +#define DB_RESERVE_SIZE 6 static SSdbRow *mndDbActionDecode(SSdbRaw *pRaw); static int32_t mndDbActionInsert(SSdb *pSdb, SDbObj *pDb); @@ -151,6 +151,10 @@ SSdbRaw *mndDbActionEncode(SDbObj *pDb) { SDB_SET_INT8(pRaw, dataPos, pDb->cfg.withArbitrator, _OVER) SDB_SET_INT8(pRaw, dataPos, pDb->cfg.encryptAlgorithm, _OVER) SDB_SET_INT32(pRaw, dataPos, pDb->tsmaVersion, _OVER); + SDB_SET_INT8(pRaw, dataPos, pDb->cfg.compactTimeOffset, _OVER) + SDB_SET_INT64(pRaw, dataPos, pDb->cfg.compactStartTime, _OVER) + SDB_SET_INT64(pRaw, dataPos, pDb->cfg.compactEndTime, _OVER) + SDB_SET_INT32(pRaw, dataPos, pDb->cfg.compactInterval, _OVER) SDB_SET_RESERVE(pRaw, dataPos, DB_RESERVE_SIZE, _OVER) SDB_SET_DATALEN(pRaw, dataPos, _OVER) @@ -250,6 +254,10 @@ static SSdbRow *mndDbActionDecode(SSdbRaw *pRaw) { SDB_GET_INT8(pRaw, dataPos, &pDb->cfg.withArbitrator, _OVER) SDB_GET_INT8(pRaw, dataPos, &pDb->cfg.encryptAlgorithm, _OVER) SDB_GET_INT32(pRaw, dataPos, &pDb->tsmaVersion, _OVER); + SDB_GET_INT8(pRaw, dataPos, &pDb->cfg.compactTimeOffset, _OVER) + SDB_GET_INT64(pRaw, dataPos, &pDb->cfg.compactStartTime, _OVER) + SDB_GET_INT64(pRaw, dataPos, &pDb->cfg.compactEndTime, _OVER) + SDB_GET_INT32(pRaw, dataPos, &pDb->cfg.compactInterval, _OVER) SDB_GET_RESERVE(pRaw, dataPos, DB_RESERVE_SIZE, _OVER) taosInitRWLatch(&pDb->lock); @@ -365,6 +373,10 @@ static int32_t mndDbActionUpdate(SSdb *pSdb, SDbObj *pOld, SDbObj *pNew) { pOld->cfg.s3KeepLocal = pNew->cfg.s3KeepLocal; pOld->cfg.s3Compact = pNew->cfg.s3Compact; pOld->cfg.withArbitrator = pNew->cfg.withArbitrator; + pOld->cfg.compactInterval = pNew->cfg.compactInterval; + pOld->cfg.compactStartTime = pNew->cfg.compactStartTime; + pOld->cfg.compactEndTime = pNew->cfg.compactEndTime; + pOld->cfg.compactTimeOffset = pNew->cfg.compactTimeOffset; pOld->compactStartTime = pNew->compactStartTime; pOld->tsmaVersion = pNew->tsmaVersion; taosWUnLockLatch(&pOld->lock); diff --git a/source/libs/parser/inc/sql.y b/source/libs/parser/inc/sql.y index aae227dc5c..869e925799 100644 --- a/source/libs/parser/inc/sql.y +++ b/source/libs/parser/inc/sql.y @@ -288,8 +288,11 @@ db_options(A) ::= db_options(B) S3_COMPACT NK_INTEGER(C). db_options(A) ::= db_options(B) KEEP_TIME_OFFSET NK_INTEGER(C). { A = setDatabaseOption(pCxt, B, DB_OPTION_KEEP_TIME_OFFSET, &C); } db_options(A) ::= db_options(B) ENCRYPT_ALGORITHM NK_STRING(C). { A = setDatabaseOption(pCxt, B, DB_OPTION_ENCRYPT_ALGORITHM, &C); } db_options(A) ::= db_options(B) DNODES NK_STRING(C). { A = setDatabaseOption(pCxt, B, DB_OPTION_DNODES, &C); } +db_options(A) ::= db_options(B) COMPACT_INTERVAL NK_INTEGER (C). { A = setDatabaseOption(pCxt, B, DB_OPTION_COMPACT_INTERVAL, &C); } db_options(A) ::= db_options(B) COMPACT_INTERVAL NK_VARIABLE(C). { A = setDatabaseOption(pCxt, B, DB_OPTION_COMPACT_INTERVAL, &C); } +db_options(A) ::= db_options(B) COMPACT_TIME_RANGE integer_list(C). { A = setDatabaseOption(pCxt, B, DB_OPTION_COMPACT_TIME_RANGE, &C); } db_options(A) ::= db_options(B) COMPACT_TIME_RANGE variable_list(C). { A = setDatabaseOption(pCxt, B, DB_OPTION_COMPACT_TIME_RANGE, &C); } +db_options(A) ::= db_options(B) COMPACT_TIME_OFFSET NK_INTEGER(C). { A = setDatabaseOption(pCxt, B, DB_OPTION_COMPACT_TIME_OFFSET, &C); } db_options(A) ::= db_options(B) COMPACT_TIME_OFFSET NK_VARIABLE(C). { A = setDatabaseOption(pCxt, B, DB_OPTION_COMPACT_TIME_OFFSET, &C); } alter_db_options(A) ::= alter_db_option(B). { A = createAlterDatabaseOptions(pCxt); A = setAlterDatabaseOption(pCxt, A, &B); } @@ -328,7 +331,7 @@ alter_db_option(A) ::= KEEP_TIME_OFFSET NK_INTEGER(B). alter_db_option(A) ::= ENCRYPT_ALGORITHM NK_STRING(B). { A.type = DB_OPTION_ENCRYPT_ALGORITHM; A.val = B; } alter_db_option(A) ::= COMPACT_INTERVAL NK_VARIABLE(B). { A.type = DB_OPTION_COMPACT_INTERVAL; A.val = B; } alter_db_option(A) ::= COMPACT_TIME_RANGE variable_list(B). { A.type = DB_OPTION_COMPACT_TIME_RANGE; A.pList = B; } -alter_db_option(A) ::= COMPACT_TIME_OFFSET NK_VARIABLE(B). { A.type = DB_OPTION_COMPACT_TIME_OFFSET; A.val = B; } +alter_db_option(A) ::= COMPACT_TIME_OFFSET NK_INTEGER(B). { A.type = DB_OPTION_COMPACT_TIME_OFFSET; A.val = B; } %type integer_list { SNodeList* } %destructor integer_list { nodesDestroyList($$); } diff --git a/source/libs/parser/src/parAstCreater.c b/source/libs/parser/src/parAstCreater.c index 89fa3734b3..720a26fa45 100644 --- a/source/libs/parser/src/parAstCreater.c +++ b/source/libs/parser/src/parAstCreater.c @@ -2001,14 +2001,17 @@ static SNode* setDatabaseOptionImpl(SAstCreateContext* pCxt, SNode* pOptions, ED } break; case DB_OPTION_COMPACT_INTERVAL: - pDbOptions->pCompactIntervalNode = (SValueNode*)createDurationValueNode(pCxt, (SToken*)pVal); + if (TK_NK_INTEGER == ((SToken*)pVal)->type) { + pDbOptions->compactInterval = taosStr2Int32(((SToken*)pVal)->z, NULL, 10); + } else { + pDbOptions->pCompactIntervalNode = (SValueNode*)createDurationValueNode(pCxt, (SToken*)pVal); + } break; case DB_OPTION_COMPACT_TIME_RANGE: pDbOptions->pCompactTimeRangeList = pVal; break; case DB_OPTION_COMPACT_TIME_OFFSET: - pDbOptions->pCompactTimeOffsetNode = (SValueNode*)createDurationValueNode(pCxt, (SToken*)pVal); - ; + pDbOptions->compactTimeOffset = taosStr2Int32(((SToken*)pVal)->z, NULL, 10); break; default: break; @@ -2019,6 +2022,8 @@ _err: return NULL; } + + SNode* setDatabaseOption(SAstCreateContext* pCxt, SNode* pOptions, EDatabaseOptionType type, void* pVal) { return setDatabaseOptionImpl(pCxt, pOptions, type, pVal, false); } diff --git a/source/libs/parser/src/parTokenizer.c b/source/libs/parser/src/parTokenizer.c index 1db139b8d4..792b409906 100644 --- a/source/libs/parser/src/parTokenizer.c +++ b/source/libs/parser/src/parTokenizer.c @@ -72,6 +72,9 @@ static SKeyword keywordTable[] = { {"COMP", TK_COMP}, {"COMPACT", TK_COMPACT}, {"COMPACTS", TK_COMPACTS}, + {"COMPACT_INTERVAL", TK_COMPACT_INTERVAL}, + {"COMPACT_TIME_OFFSET", TK_COMPACT_TIME_OFFSET}, + {"COMPACT_TIME_RANGE", TK_COMPACT_TIME_RANGE}, {"CONNECTION", TK_CONNECTION}, {"CONNECTIONS", TK_CONNECTIONS}, {"CONNS", TK_CONNS}, diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c index 7f873a9b90..9391c08a81 100755 --- a/source/libs/parser/src/parTranslater.c +++ b/source/libs/parser/src/parTranslater.c @@ -7577,8 +7577,8 @@ static int32_t checkRangeOption(STranslateContext* pCxt, int32_t code, const cha return TSDB_CODE_SUCCESS; } -static int32_t checkDbRangeOption(STranslateContext* pCxt, const char* pName, int32_t val, int32_t minVal, - int32_t maxVal) { +static int32_t checkDbRangeOption(STranslateContext* pCxt, const char* pName, int64_t val, int64_t minVal, + int64_t maxVal) { return checkRangeOption(pCxt, TSDB_CODE_PAR_INVALID_DB_OPTION, pName, val, minVal, maxVal, true); } @@ -7928,21 +7928,31 @@ static int32_t checkOptionsDependency(STranslateContext* pCxt, const char* pDbNa } static int32_t checkDbCompactIntervalOption(STranslateContext* pCxt, SDatabaseOptions* pOptions) { - if (NULL == pOptions->pCompactIntervalNode) return TSDB_CODE_SUCCESS; - - if (DEAL_RES_ERROR == translateValue(pCxt, pOptions->pCompactIntervalNode)) { - return pCxt->errCode; + int32_t code = 0; + int64_t interval = 0; + if (NULL != pOptions->pCompactIntervalNode) { + if (DEAL_RES_ERROR == translateValue(pCxt, pOptions->pCompactIntervalNode)) { + return pCxt->errCode; + } + if (TIME_UNIT_MINUTE != pOptions->pCompactIntervalNode->unit && + TIME_UNIT_HOUR != pOptions->pCompactIntervalNode->unit && + TIME_UNIT_DAY != pOptions->pCompactIntervalNode->unit) { + return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_DB_OPTION, + "Invalid option compact_interval unit: %c, only %c, %c, %c allowed", + pOptions->pCompactIntervalNode->unit, TIME_UNIT_MINUTE, TIME_UNIT_HOUR, + TIME_UNIT_DAY); + } + interval = getBigintFromValueNode(pOptions->pCompactIntervalNode); + if (interval != 0) { + code = checkDbRangeOption(pCxt, "compact_interval", pOptions->compactInterval, TSDB_MIN_COMPACT_INTERVAL, + pOptions->keep[2]); + } + } else if (pOptions->compactInterval != 0) { + interval = pOptions->compactInterval * 1440; // convert to minutes + code = checkDbRangeOption(pCxt, "compact_interval", interval, TSDB_MIN_COMPACT_INTERVAL, pOptions->keep[2]); } - if (TIME_UNIT_MINUTE != pOptions->pCompactIntervalNode->unit && - TIME_UNIT_HOUR != pOptions->pCompactIntervalNode->unit) { - return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_DB_OPTION, - "Invalid option compact_interval unit: %c, only %c, %c allowed", - pOptions->pCompactIntervalNode->unit, TIME_UNIT_MINUTE, TIME_UNIT_HOUR); - } - pOptions->compactInterval = getBigintFromValueNode(pOptions->pCompactIntervalNode); - - // TODO: check the semantic of compact_interval - return TSDB_CODE_SUCCESS; + if (code == 0) pOptions->compactInterval = interval; + return code; } static int32_t checkDbCompactTimeRangeOption(STranslateContext* pCxt, SDatabaseOptions* pOptions) { @@ -7963,40 +7973,56 @@ static int32_t checkDbCompactTimeRangeOption(STranslateContext* pCxt, SDatabaseO if (DEAL_RES_ERROR == translateValue(pCxt, pEnd)) { return pCxt->errCode; } - if (TIME_UNIT_MINUTE != pStart->unit && TIME_UNIT_HOUR != pStart->unit && TIME_UNIT_DAY != pStart->unit) { - return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_DB_OPTION, - "Invalid option compact_time_range start unit: %c, only %c, %c, %c allowed", - pStart->unit, TIME_UNIT_MINUTE, TIME_UNIT_HOUR, TIME_UNIT_DAY); + if (IS_DURATION_VAL(pStart->flag)) { + if (TIME_UNIT_MINUTE != pStart->unit && TIME_UNIT_HOUR != pStart->unit && TIME_UNIT_DAY != pStart->unit) { + return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_DB_OPTION, + "Invalid option compact_time_range start unit: %c, only %c, %c, %c allowed", + pStart->unit, TIME_UNIT_MINUTE, TIME_UNIT_HOUR, TIME_UNIT_DAY); + } + } else { + pStart->datum.i *= 1440; } - if (TIME_UNIT_MINUTE != pEnd->unit && TIME_UNIT_HOUR != pEnd->unit && TIME_UNIT_DAY != pEnd->unit) { - return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_DB_OPTION, - "Invalid option compact_time_range end unit: %c, only %c, %c, %c allowed", - pEnd->unit, TIME_UNIT_MINUTE, TIME_UNIT_HOUR, TIME_UNIT_DAY); + if (IS_DURATION_VAL(pEnd->flag)) { + if (TIME_UNIT_MINUTE != pEnd->unit && TIME_UNIT_HOUR != pEnd->unit && TIME_UNIT_DAY != pEnd->unit) { + return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_DB_OPTION, + "Invalid option compact_time_range end unit: %c, only %c, %c, %c allowed", + pEnd->unit, TIME_UNIT_MINUTE, TIME_UNIT_HOUR, TIME_UNIT_DAY); + } + } else { + pStart->datum.i *= 1440; } pOptions->compactStartTime = getBigintFromValueNode(pStart); pOptions->compactEndTime = getBigintFromValueNode(pEnd); - // TODO: check the semantic of compact_time_range + if (pOptions->compactStartTime >= pOptions->compactEndTime) { + return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_DB_OPTION, + "Invalid option compact_time_range, start time should be less than end time"); + } + if (pOptions->compactStartTime < -pOptions->keep[2] || pOptions->compactStartTime > -pOptions->daysPerFile) { + return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_DB_OPTION, + "Invalid option compact_time_range, start_time should be in range: [%" PRIi64 + "m, %" PRId64 "m]", + -pOptions->keep[2], -pOptions->daysPerFile); + } + if (pOptions->compactEndTime < -pOptions->keep[2] || pOptions->compactEndTime > -pOptions->daysPerFile) { + return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_DB_OPTION, + "Invalid option compact_time_range, end time should be in range: [%" PRIi64 + "m, %" PRId64 "m]", + -pOptions->keep[2], -pOptions->daysPerFile); + } + return TSDB_CODE_SUCCESS; } static int32_t checkDbCompactTimeOffsetOption(STranslateContext* pCxt, SDatabaseOptions* pOptions) { - if (NULL == pOptions->pCompactTimeOffsetNode) { - return TSDB_CODE_SUCCESS; - } - - if (DEAL_RES_ERROR == translateValue(pCxt, pOptions->pCompactTimeOffsetNode)) { - return pCxt->errCode; - } - if (TIME_UNIT_MINUTE != pOptions->pCompactTimeOffsetNode->unit && - TIME_UNIT_HOUR != pOptions->pCompactTimeOffsetNode->unit) { + if (pOptions->compactTimeOffset < TSDB_MIN_COMPACT_TIME_OFFSET || + pOptions->compactTimeOffset > TSDB_MAX_COMPACT_TIME_OFFSET) { return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_DB_OPTION, - "Invalid option compact_time_offset unit: %c, only %c, %c allowed", - pOptions->pCompactTimeOffsetNode->unit, TIME_UNIT_MINUTE, TIME_UNIT_HOUR); + "Invalid option compact_time_offset: %d" + " valid range: [%d, %d]", + pOptions->compactTimeOffset, TSDB_MIN_COMPACT_TIME_OFFSET, + TSDB_MAX_COMPACT_TIME_OFFSET); } - pOptions->compactTimeOffset = getBigintFromValueNode(pOptions->pCompactTimeOffsetNode); - - // TODO: check the semantic of compact_time_offset return TSDB_CODE_SUCCESS; } From 6b236018d5373dbf43845040866babc33909589c Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Wed, 27 Nov 2024 14:40:58 +0800 Subject: [PATCH 23/55] more code and case change --- include/libs/executor/storageapi.h | 11 +- source/libs/executor/src/sysscanoperator.c | 197 +++++++++++++++++- .../develop-test/2-query/table_count_scan.py | 2 +- tests/script/tsim/query/sys_tbname.sim | 2 +- tests/script/tsim/query/tableCount.sim | 6 +- 5 files changed, 200 insertions(+), 18 deletions(-) diff --git a/include/libs/executor/storageapi.h b/include/libs/executor/storageapi.h index feb7bcc25e..1959f79584 100644 --- a/include/libs/executor/storageapi.h +++ b/include/libs/executor/storageapi.h @@ -191,6 +191,12 @@ typedef struct TsdReader { void (*tsdSetFilesetDelimited)(void* pReader); void (*tsdSetSetNotifyCb)(void* pReader, TsdReaderNotifyCbFn notifyFn, void* param); + + // for fileset query + void *(*openFilesetReadCursor)(void *pVnode); + void *(*nextFilesetReadCursor)(void *cursor); + void (*closeFilesetReadCursor)(void *pReader); + } TsdReader; typedef struct SStoreCacheReader { @@ -400,7 +406,8 @@ typedef struct SStateStore { int32_t (*streamStateCountWinAddIfNotExist)(SStreamState* pState, SSessionKey* pKey, COUNT_TYPE winCount, void** ppVal, int32_t* pVLen, int32_t* pWinCode); - int32_t (*streamStateCountWinAdd)(SStreamState* pState, SSessionKey* pKey, COUNT_TYPE winCount, void** pVal, int32_t* pVLen); + int32_t (*streamStateCountWinAdd)(SStreamState* pState, SSessionKey* pKey, COUNT_TYPE winCount, void** pVal, + int32_t* pVLen); int32_t (*updateInfoInit)(int64_t interval, int32_t precision, int64_t watermark, bool igUp, int8_t pkType, int32_t pkLen, SUpdateInfo** ppInfo); @@ -429,7 +436,7 @@ typedef struct SStateStore { int32_t (*streamFileStateInit)(int64_t memSize, uint32_t keySize, uint32_t rowSize, uint32_t selectRowSize, GetTsFun fp, void* pFile, TSKEY delMark, const char* id, int64_t ckId, int8_t type, struct SStreamFileState** ppFileState); - + int32_t (*streamStateGroupPut)(SStreamState* pState, int64_t groupId, void* value, int32_t vLen); SStreamStateCur* (*streamStateGroupGetCur)(SStreamState* pState); void (*streamStateGroupCurNext)(SStreamStateCur* pCur); diff --git a/source/libs/executor/src/sysscanoperator.c b/source/libs/executor/src/sysscanoperator.c index 5917910d56..cf54e67214 100644 --- a/source/libs/executor/src/sysscanoperator.c +++ b/source/libs/executor/src/sysscanoperator.c @@ -1066,8 +1066,8 @@ static int32_t sysTableUserTagsFillOneTableTags(const SSysTableScanInfo* pInfo, pColInfoData = taosArrayGet(dataBlock->pDataBlock, 4); QUERY_CHECK_NULL(pColInfoData, code, lino, _end, terrno); int32_t tagStrBufflen = 32; - char tagTypeStr[VARSTR_HEADER_SIZE + 32]; - int tagTypeLen = tsnprintf(varDataVal(tagTypeStr), tagStrBufflen, "%s", tDataTypes[tagType].name); + char tagTypeStr[VARSTR_HEADER_SIZE + 32]; + int tagTypeLen = tsnprintf(varDataVal(tagTypeStr), tagStrBufflen, "%s", tDataTypes[tagType].name); tagStrBufflen -= tagTypeLen; if (tagStrBufflen <= 0) { code = TSDB_CODE_INVALID_PARA; @@ -1079,8 +1079,8 @@ static int32_t sysTableUserTagsFillOneTableTags(const SSysTableScanInfo* pInfo, varDataVal(tagTypeStr) + tagTypeLen, tagStrBufflen, "(%d)", (int32_t)(((*smrSuperTable).me.stbEntry.schemaTag.pSchema[i].bytes - VARSTR_HEADER_SIZE) / TSDB_NCHAR_SIZE)); } else if (IS_VAR_DATA_TYPE(tagType)) { - tagTypeLen += tsnprintf(varDataVal(tagTypeStr) + tagTypeLen, tagStrBufflen, "(%d)", - (int32_t)((*smrSuperTable).me.stbEntry.schemaTag.pSchema[i].bytes - VARSTR_HEADER_SIZE)); + tagTypeLen += tsnprintf(varDataVal(tagTypeStr) + tagTypeLen, tagStrBufflen, "(%d)", + (int32_t)((*smrSuperTable).me.stbEntry.schemaTag.pSchema[i].bytes - VARSTR_HEADER_SIZE)); } varDataSetLen(tagTypeStr, tagTypeLen); code = colDataSetVal(pColInfoData, numOfRows, (char*)tagTypeStr, false); @@ -1205,8 +1205,8 @@ static int32_t sysTableUserColsFillOneTableCols(const SSysTableScanInfo* pInfo, pColInfoData = taosArrayGet(dataBlock->pDataBlock, 4); QUERY_CHECK_NULL(pColInfoData, code, lino, _end, terrno); int32_t colStrBufflen = 32; - char colTypeStr[VARSTR_HEADER_SIZE + 32]; - int colTypeLen = tsnprintf(varDataVal(colTypeStr), colStrBufflen, "%s", tDataTypes[colType].name); + char colTypeStr[VARSTR_HEADER_SIZE + 32]; + int colTypeLen = tsnprintf(varDataVal(colTypeStr), colStrBufflen, "%s", tDataTypes[colType].name); colStrBufflen -= colTypeLen; if (colStrBufflen <= 0) { code = TSDB_CODE_INVALID_PARA; @@ -1214,10 +1214,10 @@ static int32_t sysTableUserColsFillOneTableCols(const SSysTableScanInfo* pInfo, } if (colType == TSDB_DATA_TYPE_VARCHAR) { colTypeLen += tsnprintf(varDataVal(colTypeStr) + colTypeLen, colStrBufflen, "(%d)", - (int32_t)(schemaRow->pSchema[i].bytes - VARSTR_HEADER_SIZE)); + (int32_t)(schemaRow->pSchema[i].bytes - VARSTR_HEADER_SIZE)); } else if (colType == TSDB_DATA_TYPE_NCHAR) { colTypeLen += tsnprintf(varDataVal(colTypeStr) + colTypeLen, colStrBufflen, "(%d)", - (int32_t)((schemaRow->pSchema[i].bytes - VARSTR_HEADER_SIZE) / TSDB_NCHAR_SIZE)); + (int32_t)((schemaRow->pSchema[i].bytes - VARSTR_HEADER_SIZE) / TSDB_NCHAR_SIZE)); } varDataSetLen(colTypeStr, colTypeLen); code = colDataSetVal(pColInfoData, numOfRows, (char*)colTypeStr, false); @@ -1989,9 +1989,183 @@ static SSDataBlock* sysTableScanUserSTables(SOperatorInfo* pOperator) { return (pInfo->pRes->info.rows == 0) ? NULL : pInfo->pRes; } -static SSDataBlock* sysTableScanUserFileSets(SOperatorInfo* pOperator) { +static int32_t doSetQueryFileSetRow() { + int32_t code = TSDB_CODE_SUCCESS; + int32_t lino = 0; + // TODO - ASSERT(0); + +_exit: + return code; +} + +static SSDataBlock* sysTableBuildUserFileSets(SOperatorInfo* pOperator) { + int32_t code = TSDB_CODE_SUCCESS; + int32_t lino = 0; + SExecTaskInfo* pTaskInfo = pOperator->pTaskInfo; + SStorageAPI* pAPI = &pTaskInfo->storageAPI; + SSysTableScanInfo* pInfo = pOperator->info; + SSDataBlock* p = NULL; + + // open cursor if not opened + // TODO: call corresponding api to open the cursor + if (pInfo->pCur == NULL) { + // pInfo->pCur = pAPI->tsdReader.openFileSetCursor(pInfo->readHandle.vnode); + // QUERY_CHECK_NULL(pInfo->pCur, code, lino, _end, terrno); + } + + blockDataCleanup(pInfo->pRes); + int32_t numOfRows = 0; + + const char* db = NULL; + int32_t vgId = 0; + pAPI->metaFn.getBasicInfo(pInfo->readHandle.vnode, &db, &vgId, NULL, NULL); + + SName sn = {0}; + char dbname[TSDB_DB_FNAME_LEN + VARSTR_HEADER_SIZE] = {0}; + code = tNameFromString(&sn, db, T_NAME_ACCT | T_NAME_DB); + QUERY_CHECK_CODE(code, lino, _end); + + code = tNameGetDbName(&sn, varDataVal(dbname)); + QUERY_CHECK_CODE(code, lino, _end); + + varDataSetLen(dbname, strlen(varDataVal(dbname))); + + p = buildInfoSchemaTableMetaBlock(TSDB_INS_TABLE_FILESETS); + QUERY_CHECK_NULL(p, code, lino, _end, terrno); + + code = blockDataEnsureCapacity(p, pOperator->resultInfo.capacity); + QUERY_CHECK_CODE(code, lino, _end); + + char n[TSDB_TABLE_NAME_LEN + VARSTR_HEADER_SIZE] = {0}; + int32_t ret = 0; + + // loop to query each entry + for (;;) { + void* entry = pAPI->tsdReader.nextFilesetReadCursor(pInfo->pCur); + if (entry == NULL) { + break; + } + + code = doSetQueryFileSetRow(); + QUERY_CHECK_CODE(code, lino, _end); + + if (++numOfRows >= pOperator->resultInfo.capacity) { + p->info.rows = numOfRows; + pInfo->pRes->info.rows = numOfRows; + + code = relocateColumnData(pInfo->pRes, pInfo->matchInfo.pList, p->pDataBlock, false); + QUERY_CHECK_CODE(code, lino, _end); + + code = doFilter(pInfo->pRes, pOperator->exprSupp.pFilterInfo, NULL); + QUERY_CHECK_CODE(code, lino, _end); + + blockDataCleanup(p); + numOfRows = 0; + + if (pInfo->pRes->info.rows > 0) { + pAPI->metaFn.pauseTableMetaCursor(pInfo->pCur); + break; + } + } + } + +#if 0 + if (numOfRows > 0) { + pAPI->metaFn.pauseTableMetaCursor(pInfo->pCur); + p->info.rows = numOfRows; + pInfo->pRes->info.rows = numOfRows; + + code = relocateColumnData(pInfo->pRes, pInfo->matchInfo.pList, p->pDataBlock, false); + QUERY_CHECK_CODE(code, lino, _end); + + code = doFilter(pInfo->pRes, pOperator->exprSupp.pFilterInfo, NULL); + QUERY_CHECK_CODE(code, lino, _end); + + blockDataCleanup(p); + numOfRows = 0; + } + + blockDataDestroy(p); + p = NULL; + + // todo temporarily free the cursor here, the true reason why the free is not valid needs to be found + if (ret != 0) { + pAPI->metaFn.closeTableMetaCursor(pInfo->pCur); + pInfo->pCur = NULL; + setOperatorCompleted(pOperator); + } + + pInfo->loadInfo.totalRows += pInfo->pRes->info.rows; +#endif + +_end: + if (code != TSDB_CODE_SUCCESS) { + qError("%s failed at line %d since %s", __func__, lino, tstrerror(code)); + blockDataDestroy(p); + pTaskInfo->code = code; + pAPI->metaFn.closeTableMetaCursor(pInfo->pCur); + pInfo->pCur = NULL; + T_LONG_JMP(pTaskInfo->env, code); + } + return (pInfo->pRes->info.rows == 0) ? NULL : pInfo->pRes; +} + +static SSDataBlock* sysTableScanUserFileSets(SOperatorInfo* pOperator) { + int32_t code = TSDB_CODE_SUCCESS; + int32_t lino = 0; + SSysTableScanInfo* pInfo = pOperator->info; + SExecTaskInfo* pTaskInfo = pOperator->pTaskInfo; + SNode* pCondition = pInfo->pCondition; + + if (pOperator->status == OP_EXEC_DONE) { + return NULL; + } + + if (pInfo->readHandle.mnd != NULL) { + // do nothing on mnode + qTrace("This operator do nothing on mnode, task id:%s", GET_TASKID(pTaskInfo)); + return NULL; + } else { +#if 0 + if (pInfo->showRewrite == false) { + if (pCondition != NULL && pInfo->pIdx == NULL) { + SSTabFltArg arg = { + .pMeta = pInfo->readHandle.vnode, .pVnode = pInfo->readHandle.vnode, .pAPI = &pTaskInfo->storageAPI}; + + SSysTableIndex* idx = taosMemoryMalloc(sizeof(SSysTableIndex)); + QUERY_CHECK_NULL(idx, code, lino, _end, terrno); + idx->init = 0; + idx->uids = taosArrayInit(128, sizeof(int64_t)); + QUERY_CHECK_NULL(idx->uids, code, lino, _end, terrno); + idx->lastIdx = 0; + + pInfo->pIdx = idx; // set idx arg + + int flt = optSysTabFilte(&arg, pCondition, idx->uids); + if (flt == 0) { + pInfo->pIdx->init = 1; + SSDataBlock* blk = sysTableBuildUserTablesByUids(pOperator); + return blk; + } else if ((flt == -1) || (flt == -2)) { + qDebug("%s failed to get sys table info by idx, scan sys table one by one", GET_TASKID(pTaskInfo)); + } + } else if (pCondition != NULL && (pInfo->pIdx != NULL && pInfo->pIdx->init == 1)) { + SSDataBlock* blk = sysTableBuildUserTablesByUids(pOperator); + return blk; + } + } +#endif + + return sysTableBuildUserFileSets(pOperator); + } + +_end: + if (code != TSDB_CODE_SUCCESS) { + qError("%s failed at line %d since %s", __func__, lino, tstrerror(code)); + pTaskInfo->code = code; + T_LONG_JMP(pTaskInfo->env, code); + } return NULL; } @@ -2303,7 +2477,8 @@ int32_t createSysTableScanOperatorInfo(void* readHandle, SSystemTableScanPhysiNo const char* name = tNameGetTableName(&pInfo->name); if (strncasecmp(name, TSDB_INS_TABLE_TABLES, TSDB_TABLE_FNAME_LEN) == 0 || - strncasecmp(name, TSDB_INS_TABLE_TAGS, TSDB_TABLE_FNAME_LEN) == 0) { + strncasecmp(name, TSDB_INS_TABLE_TAGS, TSDB_TABLE_FNAME_LEN) == 0 || + strncasecmp(name, TSDB_INS_TABLE_FILESETS, TSDB_TABLE_FNAME_LEN) == 0) { pInfo->readHandle = *(SReadHandle*)readHandle; } else { if (tsem_init(&pInfo->ready, 0, 0) != TSDB_CODE_SUCCESS) { diff --git a/tests/develop-test/2-query/table_count_scan.py b/tests/develop-test/2-query/table_count_scan.py index b2b48c1f0b..4e64f455fd 100644 --- a/tests/develop-test/2-query/table_count_scan.py +++ b/tests/develop-test/2-query/table_count_scan.py @@ -65,7 +65,7 @@ class TDTestCase: tdSql.query('select count(*),db_name, stable_name from information_schema.ins_tables group by db_name, stable_name;') tdSql.checkRows(3) - tdSql.checkData(0, 0, 34) + tdSql.checkData(0, 0, 35) tdSql.checkData(0, 1, 'information_schema') tdSql.checkData(0, 2, None) tdSql.checkData(1, 0, 3) diff --git a/tests/script/tsim/query/sys_tbname.sim b/tests/script/tsim/query/sys_tbname.sim index 9736893428..a9b27f1389 100644 --- a/tests/script/tsim/query/sys_tbname.sim +++ b/tests/script/tsim/query/sys_tbname.sim @@ -58,7 +58,7 @@ endi sql select tbname from information_schema.ins_tables; print $rows $data00 -if $rows != 43 then +if $rows != 44 then return -1 endi if $data00 != @ins_tables@ then diff --git a/tests/script/tsim/query/tableCount.sim b/tests/script/tsim/query/tableCount.sim index 87f72eb3b6..a22bdc8b24 100644 --- a/tests/script/tsim/query/tableCount.sim +++ b/tests/script/tsim/query/tableCount.sim @@ -53,7 +53,7 @@ sql select stable_name,count(table_name) from information_schema.ins_tables grou if $rows != 3 then return -1 endi -if $data01 != 40 then +if $data01 != 41 then return -1 endi if $data11 != 10 then @@ -72,7 +72,7 @@ endi if $data11 != 5 then return -1 endi -if $data21 != 34 then +if $data21 != 35 then return -1 endi if $data31 != 5 then @@ -97,7 +97,7 @@ endi if $data42 != 3 then return -1 endi -if $data52 != 34 then +if $data52 != 35 then return -1 endi if $data62 != 5 then From 404b66e860689d0d9df679abe55fac135eac225e Mon Sep 17 00:00:00 2001 From: kailixu Date: Wed, 27 Nov 2024 16:27:14 +0800 Subject: [PATCH 24/55] feat: support auto compact --- include/common/tmsg.h | 16 ++++++---- source/common/src/tmsg.c | 12 ++++---- source/libs/parser/inc/sql.y | 42 ++++++++++++++++++++------ source/libs/parser/src/parAstCreater.c | 9 +++--- source/libs/parser/src/parTranslater.c | 22 ++++++++------ 5 files changed, 66 insertions(+), 35 deletions(-) diff --git a/include/common/tmsg.h b/include/common/tmsg.h index cdc43ad64a..ec1bcdc269 100644 --- a/include/common/tmsg.h +++ b/include/common/tmsg.h @@ -1343,10 +1343,10 @@ typedef struct { int8_t encryptAlgorithm; char dnodeListStr[TSDB_DNODE_LIST_LEN]; // 1. add auto-compact parameters - int32_t compactInterval; - int64_t compactStartTime; - int64_t compactEndTime; - int8_t compactTimeOffset; + int32_t compactInterval; // minutes + int32_t compactStartTime; // minutes + int32_t compactEndTime; // minutes + int8_t compactTimeOffset; // hour } SCreateDbReq; int32_t tSerializeSCreateDbReq(void* buf, int32_t bufLen, SCreateDbReq* pReq); @@ -1380,8 +1380,8 @@ typedef struct { int8_t withArbitrator; // 1. add auto-compact parameters int32_t compactInterval; - int64_t compactStartTime; - int64_t compactEndTime; + int32_t compactStartTime; + int32_t compactEndTime; int8_t compactTimeOffset; } SAlterDbReq; @@ -1515,6 +1515,10 @@ typedef struct { int32_t s3ChunkSize; int32_t s3KeepLocal; int8_t s3Compact; + int8_t compactTimeOffset; + int32_t compactInterval; + int32_t compactStartTime; + int32_t compactEndTime; int32_t tsdbPageSize; int32_t walRetentionPeriod; int32_t walRollPeriod; diff --git a/source/common/src/tmsg.c b/source/common/src/tmsg.c index eff7e4c2ea..730db800c5 100644 --- a/source/common/src/tmsg.c +++ b/source/common/src/tmsg.c @@ -4036,8 +4036,8 @@ int32_t tDeserializeSCreateDbReq(void *buf, int32_t bufLen, SCreateDbReq *pReq) if (!tDecodeIsEnd(&decoder)) { TAOS_CHECK_EXIT(tDecodeI32v(&decoder, &pReq->compactInterval)); - TAOS_CHECK_EXIT(tDecodeI64v(&decoder, &pReq->compactStartTime)); - TAOS_CHECK_EXIT(tDecodeI64v(&decoder, &pReq->compactEndTime)); + TAOS_CHECK_EXIT(tDecodeI32v(&decoder, &pReq->compactStartTime)); + TAOS_CHECK_EXIT(tDecodeI32v(&decoder, &pReq->compactEndTime)); TAOS_CHECK_EXIT(tDecodeI8(&decoder, &pReq->compactTimeOffset)); } else { pReq->compactInterval = 0; @@ -4098,8 +4098,8 @@ int32_t tSerializeSAlterDbReq(void *buf, int32_t bufLen, SAlterDbReq *pReq) { TAOS_CHECK_EXIT(tEncodeI8(&encoder, pReq->withArbitrator)); // auto compact config TAOS_CHECK_EXIT(tEncodeI32v(&encoder, pReq->compactInterval)); - TAOS_CHECK_EXIT(tEncodeI64v(&encoder, pReq->compactStartTime)); - TAOS_CHECK_EXIT(tEncodeI64v(&encoder, pReq->compactEndTime)); + TAOS_CHECK_EXIT(tEncodeI32v(&encoder, pReq->compactStartTime)); + TAOS_CHECK_EXIT(tEncodeI32v(&encoder, pReq->compactEndTime)); TAOS_CHECK_EXIT(tEncodeI8(&encoder, pReq->compactTimeOffset)); tEndEncode(&encoder); @@ -4172,8 +4172,8 @@ int32_t tDeserializeSAlterDbReq(void *buf, int32_t bufLen, SAlterDbReq *pReq) { // auto compact config if (!tDecodeIsEnd(&decoder)) { TAOS_CHECK_EXIT(tDecodeI32v(&decoder, &pReq->compactInterval)); - TAOS_CHECK_EXIT(tDecodeI64v(&decoder, &pReq->compactStartTime)); - TAOS_CHECK_EXIT(tDecodeI64v(&decoder, &pReq->compactEndTime)); + TAOS_CHECK_EXIT(tDecodeI32v(&decoder, &pReq->compactStartTime)); + TAOS_CHECK_EXIT(tDecodeI32v(&decoder, &pReq->compactEndTime)); TAOS_CHECK_EXIT(tDecodeI8(&decoder, &pReq->compactTimeOffset)); } else { pReq->compactInterval = 0; diff --git a/source/libs/parser/inc/sql.y b/source/libs/parser/inc/sql.y index 869e925799..cb0e58be29 100644 --- a/source/libs/parser/inc/sql.y +++ b/source/libs/parser/inc/sql.y @@ -290,8 +290,8 @@ db_options(A) ::= db_options(B) ENCRYPT_ALGORITHM NK_STRING(C). db_options(A) ::= db_options(B) DNODES NK_STRING(C). { A = setDatabaseOption(pCxt, B, DB_OPTION_DNODES, &C); } db_options(A) ::= db_options(B) COMPACT_INTERVAL NK_INTEGER (C). { A = setDatabaseOption(pCxt, B, DB_OPTION_COMPACT_INTERVAL, &C); } db_options(A) ::= db_options(B) COMPACT_INTERVAL NK_VARIABLE(C). { A = setDatabaseOption(pCxt, B, DB_OPTION_COMPACT_INTERVAL, &C); } -db_options(A) ::= db_options(B) COMPACT_TIME_RANGE integer_list(C). { A = setDatabaseOption(pCxt, B, DB_OPTION_COMPACT_TIME_RANGE, &C); } -db_options(A) ::= db_options(B) COMPACT_TIME_RANGE variable_list(C). { A = setDatabaseOption(pCxt, B, DB_OPTION_COMPACT_TIME_RANGE, &C); } +db_options(A) ::= db_options(B) COMPACT_TIME_RANGE integer_list(C). { A = setDatabaseOption(pCxt, B, DB_OPTION_COMPACT_TIME_RANGE, C); } +db_options(A) ::= db_options(B) COMPACT_TIME_RANGE variable_list(C). { A = setDatabaseOption(pCxt, B, DB_OPTION_COMPACT_TIME_RANGE, C); } db_options(A) ::= db_options(B) COMPACT_TIME_OFFSET NK_INTEGER(C). { A = setDatabaseOption(pCxt, B, DB_OPTION_COMPACT_TIME_OFFSET, &C); } db_options(A) ::= db_options(B) COMPACT_TIME_OFFSET NK_VARIABLE(C). { A = setDatabaseOption(pCxt, B, DB_OPTION_COMPACT_TIME_OFFSET, &C); } @@ -329,8 +329,10 @@ alter_db_option(A) ::= S3_KEEPLOCAL NK_VARIABLE(B). alter_db_option(A) ::= S3_COMPACT NK_INTEGER(B). { A.type = DB_OPTION_S3_COMPACT, A.val = B; } alter_db_option(A) ::= KEEP_TIME_OFFSET NK_INTEGER(B). { A.type = DB_OPTION_KEEP_TIME_OFFSET; A.val = B; } alter_db_option(A) ::= ENCRYPT_ALGORITHM NK_STRING(B). { A.type = DB_OPTION_ENCRYPT_ALGORITHM; A.val = B; } +alter_db_option(A) ::= COMPACT_INTERVAL NK_INTEGER(B). { A.type = DB_OPTION_COMPACT_INTERVAL; A.val = B; } alter_db_option(A) ::= COMPACT_INTERVAL NK_VARIABLE(B). { A.type = DB_OPTION_COMPACT_INTERVAL; A.val = B; } -alter_db_option(A) ::= COMPACT_TIME_RANGE variable_list(B). { A.type = DB_OPTION_COMPACT_TIME_RANGE; A.pList = B; } +alter_db_option(A) ::= COMPACT_TIME_RANGE signed_integer_list(B). { A.type = DB_OPTION_COMPACT_TIME_RANGE; A.pList = B; } +alter_db_option(A) ::= COMPACT_TIME_RANGE signed_variable_list(B). { A.type = DB_OPTION_COMPACT_TIME_RANGE; A.pList = B; } alter_db_option(A) ::= COMPACT_TIME_OFFSET NK_INTEGER(B). { A.type = DB_OPTION_COMPACT_TIME_OFFSET; A.val = B; } %type integer_list { SNodeList* } @@ -338,11 +340,21 @@ alter_db_option(A) ::= COMPACT_TIME_OFFSET NK_INTEGER(B). integer_list(A) ::= NK_INTEGER(B). { A = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &B)); } integer_list(A) ::= integer_list(B) NK_COMMA NK_INTEGER(C). { A = addNodeToList(pCxt, B, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &C)); } +%type signed_integer_list { SNodeList* } +%destructor signed_integer_list { nodesDestroyList($$); } +signed_integer_list(A) ::= signed_integer(B). { A = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &B)); } +signed_integer_list(A) ::= signed_integer_list(B) NK_COMMA signed_integer(C). { A = addNodeToList(pCxt, B, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &C)); } + %type variable_list { SNodeList* } %destructor variable_list { nodesDestroyList($$); } variable_list(A) ::= NK_VARIABLE(B). { A = createNodeList(pCxt, createDurationValueNode(pCxt, &B)); } variable_list(A) ::= variable_list(B) NK_COMMA NK_VARIABLE(C). { A = addNodeToList(pCxt, B, createDurationValueNode(pCxt, &C)); } +%type signed_variable_list { SNodeList* } +%destructor signed_variable_list { nodesDestroyList($$); } +signed_variable_list(A) ::= NK_VARIABLE(B). { A = createNodeList(pCxt, createDurationValueNode(pCxt, &B)); } +signed_variable_list(A) ::= variable_list(B) NK_COMMA NK_VARIABLE(C). { A = addNodeToList(pCxt, B, createDurationValueNode(pCxt, &C)); } + %type retention_list { SNodeList* } %destructor retention_list { nodesDestroyList($$); } retention_list(A) ::= retention(B). { A = createNodeList(pCxt, B); } @@ -1044,21 +1056,33 @@ literal(A) ::= NK_QUESTION(B). duration_literal(A) ::= NK_VARIABLE(B). { A = createRawExprNode(pCxt, &B, createDurationValueNode(pCxt, &B)); } -signed(A) ::= NK_INTEGER(B). { A = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &B); } -signed(A) ::= NK_PLUS NK_INTEGER(B). { A = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &B); } -signed(A) ::= NK_MINUS(B) NK_INTEGER(C). { +signed_variable(A) ::= NK_VARIABLE(B). { A = createRawExprNode(pCxt, &B, createDurationValueNode(pCxt, &B)); } +signed_variable(A) ::= NK_PLUS NK_VARIABLE(B). { A = createRawExprNode(pCxt, &B, createDurationValueNode(pCxt, &B)); } +signed_variable(A) ::= NK_MINUS(B) NK_VARIABLE(C). { + SToken t = B; + t.n = (C.z + C.n) - B.z; + A = createRawExprNode(pCxt, &B, createDurationValueNode(pCxt, &t)); + } + +signed_integer(A) ::= NK_INTEGER(B). { A = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &B); } +signed_integer(A) ::= NK_PLUS NK_INTEGER(B). { A = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &B); } +signed_integer(A) ::= NK_MINUS(B) NK_INTEGER(C). { SToken t = B; t.n = (C.z + C.n) - B.z; A = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &t); } -signed(A) ::= NK_FLOAT(B). { A = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &B); } -signed(A) ::= NK_PLUS NK_FLOAT(B). { A = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &B); } -signed(A) ::= NK_MINUS(B) NK_FLOAT(C). { + +signed_float(A) ::= NK_FLOAT(B). { A = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &B); } +signed_float(A) ::= NK_PLUS NK_FLOAT(B). { A = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &B); } +signed_float(A) ::= NK_MINUS(B) NK_FLOAT(C). { SToken t = B; t.n = (C.z + C.n) - B.z; A = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &t); } +signed(A) ::= signed_integer(B). { A = B; } +signed(A) ::= signed_float(B). { A = B; } + signed_literal(A) ::= signed(B). { A = B; } signed_literal(A) ::= NK_STRING(B). { A = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &B); } signed_literal(A) ::= NK_BOOL(B). { A = createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &B); } diff --git a/source/libs/parser/src/parAstCreater.c b/source/libs/parser/src/parAstCreater.c index 720a26fa45..fe5bee265b 100644 --- a/source/libs/parser/src/parAstCreater.c +++ b/source/libs/parser/src/parAstCreater.c @@ -1848,10 +1848,10 @@ SNode* createAlterDatabaseOptions(SAstCreateContext* pCxt) { pOptions->withArbitrator = -1; pOptions->encryptAlgorithm = -1; pOptions->dnodeListStr[0] = 0; - pOptions->compactInterval = TSDB_DEFAULT_COMPACT_INTERVAL; - pOptions->compactStartTime = TSDB_DEFAULT_COMPACT_START_TIME; - pOptions->compactEndTime = TSDB_DEFAULT_COMPACT_END_TIME; - pOptions->compactTimeOffset = TSDB_DEFAULT_COMPACT_TIME_OFFSET; + pOptions->compactInterval = -1; + pOptions->compactStartTime = -1; + pOptions->compactEndTime = -1; + pOptions->compactTimeOffset = -1; return (SNode*)pOptions; _err: return NULL; @@ -2033,6 +2033,7 @@ SNode* setAlterDatabaseOption(SAstCreateContext* pCxt, SNode* pOptions, SAlterOp switch (pAlterOption->type) { case DB_OPTION_KEEP: case DB_OPTION_RETENTIONS: + case DB_OPTION_COMPACT_TIME_RANGE: return setDatabaseOptionImpl(pCxt, pOptions, pAlterOption->type, pAlterOption->pList, true); default: break; diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c index 9391c08a81..cd65f0afdb 100755 --- a/source/libs/parser/src/parTranslater.c +++ b/source/libs/parser/src/parTranslater.c @@ -7989,26 +7989,28 @@ static int32_t checkDbCompactTimeRangeOption(STranslateContext* pCxt, SDatabaseO pEnd->unit, TIME_UNIT_MINUTE, TIME_UNIT_HOUR, TIME_UNIT_DAY); } } else { - pStart->datum.i *= 1440; + pEnd->datum.i *= 1440; } pOptions->compactStartTime = getBigintFromValueNode(pStart); pOptions->compactEndTime = getBigintFromValueNode(pEnd); if (pOptions->compactStartTime >= pOptions->compactEndTime) { - return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_DB_OPTION, - "Invalid option compact_time_range, start time should be less than end time"); + return generateSyntaxErrMsgExt( + &pCxt->msgBuf, TSDB_CODE_PAR_INVALID_DB_OPTION, + "Invalid option compact_time_range: %dm,%dm, start time should be less than end time", + pOptions->compactStartTime, pOptions->compactEndTime); } if (pOptions->compactStartTime < -pOptions->keep[2] || pOptions->compactStartTime > -pOptions->daysPerFile) { return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_DB_OPTION, - "Invalid option compact_time_range, start_time should be in range: [%" PRIi64 - "m, %" PRId64 "m]", - -pOptions->keep[2], -pOptions->daysPerFile); + "Invalid option compact_time_range: %dm, start_time should be in range: [%" PRIi64 + "m, %dm]", + pOptions->compactStartTime, -pOptions->keep[2], -pOptions->daysPerFile); } if (pOptions->compactEndTime < -pOptions->keep[2] || pOptions->compactEndTime > -pOptions->daysPerFile) { return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_DB_OPTION, - "Invalid option compact_time_range, end time should be in range: [%" PRIi64 - "m, %" PRId64 "m]", - -pOptions->keep[2], -pOptions->daysPerFile); + "Invalid option compact_time_range: %dm, end time should be in range: [%" PRIi64 + "m, %dm]", + pOptions->compactEndTime, -pOptions->keep[2], -pOptions->daysPerFile); } return TSDB_CODE_SUCCESS; @@ -8019,7 +8021,7 @@ static int32_t checkDbCompactTimeOffsetOption(STranslateContext* pCxt, SDatabase pOptions->compactTimeOffset > TSDB_MAX_COMPACT_TIME_OFFSET) { return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_DB_OPTION, "Invalid option compact_time_offset: %d" - " valid range: [%d, %d]", + ", valid range: [%d, %d]", pOptions->compactTimeOffset, TSDB_MIN_COMPACT_TIME_OFFSET, TSDB_MAX_COMPACT_TIME_OFFSET); } From 3ae5a72a4c68e4ef69d1f8b23135b3d860c3daf0 Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Wed, 27 Nov 2024 17:53:53 +0800 Subject: [PATCH 25/55] more code --- include/libs/executor/storageapi.h | 9 +- source/common/src/systable.c | 2 +- source/dnode/vnode/inc/vnode.h | 6 ++ source/dnode/vnode/src/tsdb/tsdbFS2.c | 115 ++++++++++++++++++++ source/dnode/vnode/src/vnd/vnodeInitApi.c | 6 ++ source/libs/executor/src/sysscanoperator.c | 116 +++++++++++++++++---- 6 files changed, 228 insertions(+), 26 deletions(-) diff --git a/include/libs/executor/storageapi.h b/include/libs/executor/storageapi.h index 1959f79584..2ac358c35f 100644 --- a/include/libs/executor/storageapi.h +++ b/include/libs/executor/storageapi.h @@ -171,6 +171,8 @@ typedef union { typedef void (*TsdReaderNotifyCbFn)(ETsdReaderNotifyType type, STsdReaderNotifyInfo* info, void* param); +struct SFileSetReader; + typedef struct TsdReader { int32_t (*tsdReaderOpen)(void* pVnode, SQueryTableDataCond* pCond, void* pTableList, int32_t numOfTables, SSDataBlock* pResBlock, void** ppReader, const char* idstr, SHashObj** pIgnoreTables); @@ -193,9 +195,10 @@ typedef struct TsdReader { void (*tsdSetSetNotifyCb)(void* pReader, TsdReaderNotifyCbFn notifyFn, void* param); // for fileset query - void *(*openFilesetReadCursor)(void *pVnode); - void *(*nextFilesetReadCursor)(void *cursor); - void (*closeFilesetReadCursor)(void *pReader); + int32_t (*fileSetReaderOpen)(void *pVnode, struct SFileSetReader **ppReader); + int32_t (*fileSetReadNext)(struct SFileSetReader *); + int32_t (*fileSetGetEntryField)(struct SFileSetReader *, const char *, void *); + void (*fileSetReaderClose)(struct SFileSetReader **); } TsdReader; diff --git a/source/common/src/systable.c b/source/common/src/systable.c index a122c53614..e74f6d0aa3 100644 --- a/source/common/src/systable.c +++ b/source/common/src/systable.c @@ -425,7 +425,7 @@ static const SSysDbTableSchema filesetsFullSchema[] = { {.name = "end_time", .bytes = 8, .type = TSDB_DATA_TYPE_TIMESTAMP, .sysInfo = false}, {.name = "last_compact", .bytes = 8, .type = TSDB_DATA_TYPE_TIMESTAMP, .sysInfo = false}, {.name = "shold_compact", .bytes = 1, .type = TSDB_DATA_TYPE_BOOL, .sysInfo = false}, - {.name = "details", .bytes = 256 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = false}, + // {.name = "details", .bytes = 256 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = false}, }; static const SSysDbTableSchema tsmaSchema[] = { diff --git a/source/dnode/vnode/inc/vnode.h b/source/dnode/vnode/inc/vnode.h index 743bfd36d0..73147265c3 100644 --- a/source/dnode/vnode/inc/vnode.h +++ b/source/dnode/vnode/inc/vnode.h @@ -339,6 +339,12 @@ struct SVnodeCfg { #define TABLE_IS_COL_COMPRESSED(FLG) (((FLG) & (TABLE_COL_COMPRESSED)) != 0) #define TABLE_SET_COL_COMPRESSED(FLG) ((FLG) |= TABLE_COL_COMPRESSED) +struct SFileSetReader; +int32_t tsdbFileSetReaderOpen(void *pVnode, struct SFileSetReader **ppReader); +int32_t tsdbFileSetReaderNext(struct SFileSetReader *pReader); +int32_t tsdbFileSetGetEntryField(struct SFileSetReader *pReader, const char *field, void *value); +void tsdbFileSetReaderClose(struct SFileSetReader **ppReader); + #ifdef __cplusplus } #endif diff --git a/source/dnode/vnode/src/tsdb/tsdbFS2.c b/source/dnode/vnode/src/tsdb/tsdbFS2.c index 0c9d9e56cf..c5f27768b2 100644 --- a/source/dnode/vnode/src/tsdb/tsdbFS2.c +++ b/source/dnode/vnode/src/tsdb/tsdbFS2.c @@ -1239,3 +1239,118 @@ void tsdbFinishTaskOnFileSet(STsdb *tsdb, int32_t fid) { } } } + +struct SFileSetReader { + STsdb *pTsdb; + int32_t fid; + int64_t startTime; + int64_t endTime; + STFileSet *pFileSet; +}; + +int32_t tsdbFileSetReaderOpen(void *pVnode, struct SFileSetReader **ppReader) { + if (pVnode == NULL || ppReader == NULL) { + return TSDB_CODE_INVALID_PARA; + } + + STsdb *pTsdb = ((SVnode *)pVnode)->pTsdb; + + (*ppReader) = taosMemoryCalloc(1, sizeof(struct SFileSetReader)); + if (*ppReader == NULL) { + tsdbError("vgId:%d %s failed at %s:%d since %s", TD_VID(pTsdb->pVnode), __func__, __FILE__, __LINE__, + tstrerror(terrno)); + return terrno; + } + + (*ppReader)->pTsdb = pTsdb; + (*ppReader)->fid = INT32_MIN; + (*ppReader)->pFileSet = NULL; + + return TSDB_CODE_SUCCESS; +} + +static int32_t tsdbFileSetReaderNextNoLock(struct SFileSetReader *pReader) { + STsdb *pTsdb = pReader->pTsdb; + + tsdbTFileSetClear(&pReader->pFileSet); + + STFileSet *fset = &(STFileSet){ + .fid = pReader->fid, + }; + + STFileSet **fsetPtr = TARRAY2_SEARCH(pReader->pTsdb->pFS->fSetArr, &fset, tsdbTFileSetCmprFn, TD_GT); + if (fsetPtr == NULL) { + pReader->fid = INT32_MAX; + return TSDB_CODE_NOT_FOUND; + } + + pReader->fid = (*fsetPtr)->fid; + tsdbFidKeyRange(pReader->fid, pTsdb->keepCfg.days, pTsdb->keepCfg.precision, &pReader->startTime, &pReader->endTime); + return tsdbTFileSetInitRef(pReader->pTsdb, *fsetPtr, &pReader->pFileSet); +} + +int32_t tsdbFileSetReaderNext(struct SFileSetReader *pReader) { + int32_t code = TSDB_CODE_SUCCESS; + (void)taosThreadMutexLock(&pReader->pTsdb->mutex); + code = tsdbFileSetReaderNextNoLock(pReader); + (void)taosThreadMutexUnlock(&pReader->pTsdb->mutex); + return code; +} + +int32_t tsdbFileSetGetEntryField(struct SFileSetReader *pReader, const char *field, void *value) { + const char *fieldName; + + if (pReader->fid == INT32_MIN || pReader->fid == INT32_MAX) { + return TSDB_CODE_INVALID_PARA; + } + + fieldName = "fileset_id"; + if (strncmp(field, fieldName, strlen(fieldName) + 1) == 0) { + *(int32_t *)value = pReader->fid; + return TSDB_CODE_SUCCESS; + } + + fieldName = "start_time"; + if (strncmp(field, fieldName, strlen(fieldName) + 1) == 0) { + *(int64_t *)value = pReader->startTime; + return TSDB_CODE_SUCCESS; + } + + fieldName = "end_time"; + if (strncmp(field, fieldName, strlen(fieldName) + 1) == 0) { + *(int64_t *)value = pReader->endTime; + return TSDB_CODE_SUCCESS; + } + + fieldName = "last_compact_time"; + if (strncmp(field, fieldName, strlen(fieldName) + 1) == 0) { + *(int64_t *)value = 0; // TODO + return TSDB_CODE_SUCCESS; + } + + fieldName = "should_compact"; + if (strncmp(field, fieldName, strlen(fieldName) + 1) == 0) { + *(char *)value = 0; // TODO + return TSDB_CODE_SUCCESS; + } + + fieldName = "details"; + if (strncmp(field, fieldName, strlen(fieldName) + 1) == 0) { + // TODO + return TSDB_CODE_SUCCESS; + } + + return TSDB_CODE_INVALID_PARA; +} + +void tsdbFileSetReaderClose(struct SFileSetReader **ppReader) { + if (ppReader == NULL || *ppReader == NULL) { + return; + } + + tsdbTFileSetClear(&(*ppReader)->pFileSet); + taosMemoryFree(*ppReader); + + *ppReader = NULL; + return; +} \ No newline at end of file diff --git a/source/dnode/vnode/src/vnd/vnodeInitApi.c b/source/dnode/vnode/src/vnd/vnodeInitApi.c index 0ac0ee1b8f..ed09b9847e 100644 --- a/source/dnode/vnode/src/vnd/vnodeInitApi.c +++ b/source/dnode/vnode/src/vnd/vnodeInitApi.c @@ -63,6 +63,12 @@ void initTsdbReaderAPI(TsdReader* pReader) { pReader->tsdSetFilesetDelimited = (void (*)(void*))tsdbSetFilesetDelimited; pReader->tsdSetSetNotifyCb = (void (*)(void*, TsdReaderNotifyCbFn, void*))tsdbReaderSetNotifyCb; + + // file set iterate + pReader->fileSetReaderOpen = tsdbFileSetReaderOpen; + pReader->fileSetReadNext = tsdbFileSetReaderNext; + pReader->fileSetGetEntryField = tsdbFileSetGetEntryField; + pReader->fileSetReaderClose = tsdbFileSetReaderClose; } void initMetadataAPI(SStoreMeta* pMeta) { diff --git a/source/libs/executor/src/sysscanoperator.c b/source/libs/executor/src/sysscanoperator.c index cf54e67214..ec71bb721b 100644 --- a/source/libs/executor/src/sysscanoperator.c +++ b/source/libs/executor/src/sysscanoperator.c @@ -73,6 +73,9 @@ typedef struct SSysTableScanInfo { SLimitInfo limitInfo; int32_t tbnameSlotId; SStorageAPI* pAPI; + + // file set iterate + struct SFileSetReader* pFileSetReader; } SSysTableScanInfo; typedef struct { @@ -2008,10 +2011,9 @@ static SSDataBlock* sysTableBuildUserFileSets(SOperatorInfo* pOperator) { SSDataBlock* p = NULL; // open cursor if not opened - // TODO: call corresponding api to open the cursor - if (pInfo->pCur == NULL) { - // pInfo->pCur = pAPI->tsdReader.openFileSetCursor(pInfo->readHandle.vnode); - // QUERY_CHECK_NULL(pInfo->pCur, code, lino, _end, terrno); + if (pInfo->pFileSetReader == NULL) { + code = pAPI->tsdReader.fileSetReaderOpen(pInfo->readHandle.vnode, &pInfo->pFileSetReader); + QUERY_CHECK_CODE(code, lino, _end); } blockDataCleanup(pInfo->pRes); @@ -2042,14 +2044,96 @@ static SSDataBlock* sysTableBuildUserFileSets(SOperatorInfo* pOperator) { // loop to query each entry for (;;) { - void* entry = pAPI->tsdReader.nextFilesetReadCursor(pInfo->pCur); - if (entry == NULL) { - break; + int32_t ret = pAPI->tsdReader.fileSetReadNext(pInfo->pFileSetReader); + if (ret) { + if (ret == TSDB_CODE_NOT_FOUND) { + // no more scan entry + break; + } else { + code = ret; + QUERY_CHECK_CODE(code, lino, _end); + } } - code = doSetQueryFileSetRow(); - QUERY_CHECK_CODE(code, lino, _end); + // fill the data block + { + SColumnInfoData* pColInfoData; + // dnode_id + int32_t dnodeId = 0; // TODO + pColInfoData = taosArrayGet(p->pDataBlock, 0); + QUERY_CHECK_NULL(pColInfoData, code, lino, _end, terrno); + code = colDataSetVal(pColInfoData, numOfRows, (char*)&dnodeId, false); + QUERY_CHECK_CODE(code, lino, _end); + + // db_name + pColInfoData = taosArrayGet(p->pDataBlock, 1); + QUERY_CHECK_NULL(pColInfoData, code, lino, _end, terrno); + code = colDataSetVal(pColInfoData, numOfRows, db, false); + QUERY_CHECK_CODE(code, lino, _end); + + // vgroup_id + pColInfoData = taosArrayGet(p->pDataBlock, 2); + QUERY_CHECK_NULL(pColInfoData, code, lino, _end, terrno); + code = colDataSetVal(pColInfoData, numOfRows, (char*)&vgId, false); + QUERY_CHECK_CODE(code, lino, _end); + + // fileset_id + int32_t filesetId = 0; + code = pAPI->tsdReader.fileSetGetEntryField(pInfo->pFileSetReader, "fileset_id", &filesetId); + QUERY_CHECK_CODE(code, lino, _end); + pColInfoData = taosArrayGet(p->pDataBlock, 3); + QUERY_CHECK_NULL(pColInfoData, code, lino, _end, terrno); + code = colDataSetVal(pColInfoData, numOfRows, (char*)&filesetId, false); + QUERY_CHECK_CODE(code, lino, _end); + + // start_time + int64_t startTime = 0; + code = pAPI->tsdReader.fileSetGetEntryField(pInfo->pFileSetReader, "start_time", &startTime); + QUERY_CHECK_CODE(code, lino, _end); + pColInfoData = taosArrayGet(p->pDataBlock, 4); + QUERY_CHECK_NULL(pColInfoData, code, lino, _end, terrno); + code = colDataSetVal(pColInfoData, numOfRows, (char*)&startTime, false); + QUERY_CHECK_CODE(code, lino, _end); + + // end_time + int64_t endTime = 0; + code = pAPI->tsdReader.fileSetGetEntryField(pInfo->pFileSetReader, "end_time", &endTime); + QUERY_CHECK_CODE(code, lino, _end); + pColInfoData = taosArrayGet(p->pDataBlock, 5); + QUERY_CHECK_NULL(pColInfoData, code, lino, _end, terrno); + code = colDataSetVal(pColInfoData, numOfRows, (char*)&endTime, false); + QUERY_CHECK_CODE(code, lino, _end); + + // last_compact + int64_t lastCompacat = 0; + code = pAPI->tsdReader.fileSetGetEntryField(pInfo->pFileSetReader, "last_compact_time", &lastCompacat); + QUERY_CHECK_CODE(code, lino, _end); + pColInfoData = taosArrayGet(p->pDataBlock, 6); + QUERY_CHECK_NULL(pColInfoData, code, lino, _end, terrno); + code = colDataSetVal(pColInfoData, numOfRows, (char*)&lastCompacat, false); + QUERY_CHECK_CODE(code, lino, _end); + + // shold_compact + bool shouldCompact = false; + code = pAPI->tsdReader.fileSetGetEntryField(pInfo->pFileSetReader, "should_compact", &shouldCompact); + QUERY_CHECK_CODE(code, lino, _end); + pColInfoData = taosArrayGet(p->pDataBlock, 7); + QUERY_CHECK_NULL(pColInfoData, code, lino, _end, terrno); + code = colDataSetVal(pColInfoData, numOfRows, (char*)&shouldCompact, false); + QUERY_CHECK_CODE(code, lino, _end); + + // // details + // const char* details = NULL; + // code = pAPI->tsdReader.fileSetGetEntryField(pInfo->pFileSetReader, "details", &details); + // QUERY_CHECK_CODE(code, lino, _end); + // pColInfoData = taosArrayGet(p->pDataBlock, 8); + // QUERY_CHECK_NULL(pColInfoData, code, lino, _end, terrno); + // code = colDataSetVal(pColInfoData, numOfRows, (char*)&vgId, false); + // QUERY_CHECK_CODE(code, lino, _end); + } + + // check capacity if (++numOfRows >= pOperator->resultInfo.capacity) { p->info.rows = numOfRows; pInfo->pRes->info.rows = numOfRows; @@ -2064,15 +2148,12 @@ static SSDataBlock* sysTableBuildUserFileSets(SOperatorInfo* pOperator) { numOfRows = 0; if (pInfo->pRes->info.rows > 0) { - pAPI->metaFn.pauseTableMetaCursor(pInfo->pCur); break; } } } -#if 0 if (numOfRows > 0) { - pAPI->metaFn.pauseTableMetaCursor(pInfo->pCur); p->info.rows = numOfRows; pInfo->pRes->info.rows = numOfRows; @@ -2089,23 +2170,14 @@ static SSDataBlock* sysTableBuildUserFileSets(SOperatorInfo* pOperator) { blockDataDestroy(p); p = NULL; - // todo temporarily free the cursor here, the true reason why the free is not valid needs to be found - if (ret != 0) { - pAPI->metaFn.closeTableMetaCursor(pInfo->pCur); - pInfo->pCur = NULL; - setOperatorCompleted(pOperator); - } - pInfo->loadInfo.totalRows += pInfo->pRes->info.rows; -#endif _end: if (code != TSDB_CODE_SUCCESS) { qError("%s failed at line %d since %s", __func__, lino, tstrerror(code)); blockDataDestroy(p); pTaskInfo->code = code; - pAPI->metaFn.closeTableMetaCursor(pInfo->pCur); - pInfo->pCur = NULL; + pAPI->tsdReader.fileSetReaderClose(&pInfo->pFileSetReader); T_LONG_JMP(pTaskInfo->env, code); } return (pInfo->pRes->info.rows == 0) ? NULL : pInfo->pRes; From df8a4ea6dce253a91c798eeb260150e54de9a2d8 Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Wed, 27 Nov 2024 18:49:48 +0800 Subject: [PATCH 26/55] more code --- source/common/src/systable.c | 1 + source/dnode/vnode/src/tsdb/tsdbFS2.c | 38 +++++++++++++++++++--- source/libs/executor/src/sysscanoperator.c | 15 +++++++-- 3 files changed, 46 insertions(+), 8 deletions(-) diff --git a/source/common/src/systable.c b/source/common/src/systable.c index e74f6d0aa3..f2778042bf 100644 --- a/source/common/src/systable.c +++ b/source/common/src/systable.c @@ -423,6 +423,7 @@ static const SSysDbTableSchema filesetsFullSchema[] = { {.name = "fileset_id", .bytes = 4, .type = TSDB_DATA_TYPE_INT, .sysInfo = false}, {.name = "start_time", .bytes = 8, .type = TSDB_DATA_TYPE_TIMESTAMP, .sysInfo = false}, {.name = "end_time", .bytes = 8, .type = TSDB_DATA_TYPE_TIMESTAMP, .sysInfo = false}, + {.name = "total_size", .bytes = 8, .type = TSDB_DATA_TYPE_BIGINT, .sysInfo = false}, {.name = "last_compact", .bytes = 8, .type = TSDB_DATA_TYPE_TIMESTAMP, .sysInfo = false}, {.name = "shold_compact", .bytes = 1, .type = TSDB_DATA_TYPE_BOOL, .sysInfo = false}, // {.name = "details", .bytes = 256 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = false}, diff --git a/source/dnode/vnode/src/tsdb/tsdbFS2.c b/source/dnode/vnode/src/tsdb/tsdbFS2.c index c5f27768b2..ef2766acda 100644 --- a/source/dnode/vnode/src/tsdb/tsdbFS2.c +++ b/source/dnode/vnode/src/tsdb/tsdbFS2.c @@ -1242,10 +1242,12 @@ void tsdbFinishTaskOnFileSet(STsdb *tsdb, int32_t fid) { struct SFileSetReader { STsdb *pTsdb; + STFileSet *pFileSet; int32_t fid; int64_t startTime; int64_t endTime; - STFileSet *pFileSet; + int64_t lastCompactTime; + int64_t totalSize; }; int32_t tsdbFileSetReaderOpen(void *pVnode, struct SFileSetReader **ppReader) { @@ -1270,7 +1272,8 @@ int32_t tsdbFileSetReaderOpen(void *pVnode, struct SFileSetReader **ppReader) { } static int32_t tsdbFileSetReaderNextNoLock(struct SFileSetReader *pReader) { - STsdb *pTsdb = pReader->pTsdb; + STsdb *pTsdb = pReader->pTsdb; + int32_t code = TSDB_CODE_SUCCESS; tsdbTFileSetClear(&pReader->pFileSet); @@ -1284,9 +1287,28 @@ static int32_t tsdbFileSetReaderNextNoLock(struct SFileSetReader *pReader) { return TSDB_CODE_NOT_FOUND; } - pReader->fid = (*fsetPtr)->fid; + // ref file set + code = tsdbTFileSetInitRef(pReader->pTsdb, *fsetPtr, &pReader->pFileSet); + if (code) return code; + + // get file set details + pReader->fid = pReader->pFileSet->fid; tsdbFidKeyRange(pReader->fid, pTsdb->keepCfg.days, pTsdb->keepCfg.precision, &pReader->startTime, &pReader->endTime); - return tsdbTFileSetInitRef(pReader->pTsdb, *fsetPtr, &pReader->pFileSet); + pReader->lastCompactTime = 0; // TODO + pReader->totalSize = 0; + for (int32_t i = 0; i < TSDB_FTYPE_MAX; i++) { + STFileObj *fobj = pReader->pFileSet->farr[i]; + if (fobj) { + pReader->totalSize += fobj->f->size; + } + } + SSttLvl *lvl; + TARRAY2_FOREACH(pReader->pFileSet->lvlArr, lvl) { + STFileObj *fobj; + TARRAY2_FOREACH(lvl->fobjArr, fobj) { pReader->totalSize += fobj->f->size; } + } + + return code; } int32_t tsdbFileSetReaderNext(struct SFileSetReader *pReader) { @@ -1322,9 +1344,15 @@ int32_t tsdbFileSetGetEntryField(struct SFileSetReader *pReader, const char *fie return TSDB_CODE_SUCCESS; } + fieldName = "total_size"; + if (strncmp(field, fieldName, strlen(fieldName) + 1) == 0) { + *(int64_t *)value = pReader->totalSize; + return TSDB_CODE_SUCCESS; + } + fieldName = "last_compact_time"; if (strncmp(field, fieldName, strlen(fieldName) + 1) == 0) { - *(int64_t *)value = 0; // TODO + *(int64_t *)value = pReader->lastCompactTime; return TSDB_CODE_SUCCESS; } diff --git a/source/libs/executor/src/sysscanoperator.c b/source/libs/executor/src/sysscanoperator.c index ec71bb721b..7b79d25f96 100644 --- a/source/libs/executor/src/sysscanoperator.c +++ b/source/libs/executor/src/sysscanoperator.c @@ -2105,11 +2105,20 @@ static SSDataBlock* sysTableBuildUserFileSets(SOperatorInfo* pOperator) { code = colDataSetVal(pColInfoData, numOfRows, (char*)&endTime, false); QUERY_CHECK_CODE(code, lino, _end); + // total_size + int64_t totalSize = 0; + code = pAPI->tsdReader.fileSetGetEntryField(pInfo->pFileSetReader, "total_size", &totalSize); + QUERY_CHECK_CODE(code, lino, _end); + pColInfoData = taosArrayGet(p->pDataBlock, 6); + QUERY_CHECK_NULL(pColInfoData, code, lino, _end, terrno); + code = colDataSetVal(pColInfoData, numOfRows, (char*)&totalSize, false); + QUERY_CHECK_CODE(code, lino, _end); + // last_compact int64_t lastCompacat = 0; code = pAPI->tsdReader.fileSetGetEntryField(pInfo->pFileSetReader, "last_compact_time", &lastCompacat); QUERY_CHECK_CODE(code, lino, _end); - pColInfoData = taosArrayGet(p->pDataBlock, 6); + pColInfoData = taosArrayGet(p->pDataBlock, 7); QUERY_CHECK_NULL(pColInfoData, code, lino, _end, terrno); code = colDataSetVal(pColInfoData, numOfRows, (char*)&lastCompacat, false); QUERY_CHECK_CODE(code, lino, _end); @@ -2118,7 +2127,7 @@ static SSDataBlock* sysTableBuildUserFileSets(SOperatorInfo* pOperator) { bool shouldCompact = false; code = pAPI->tsdReader.fileSetGetEntryField(pInfo->pFileSetReader, "should_compact", &shouldCompact); QUERY_CHECK_CODE(code, lino, _end); - pColInfoData = taosArrayGet(p->pDataBlock, 7); + pColInfoData = taosArrayGet(p->pDataBlock, 8); QUERY_CHECK_NULL(pColInfoData, code, lino, _end, terrno); code = colDataSetVal(pColInfoData, numOfRows, (char*)&shouldCompact, false); QUERY_CHECK_CODE(code, lino, _end); @@ -2127,7 +2136,7 @@ static SSDataBlock* sysTableBuildUserFileSets(SOperatorInfo* pOperator) { // const char* details = NULL; // code = pAPI->tsdReader.fileSetGetEntryField(pInfo->pFileSetReader, "details", &details); // QUERY_CHECK_CODE(code, lino, _end); - // pColInfoData = taosArrayGet(p->pDataBlock, 8); + // pColInfoData = taosArrayGet(p->pDataBlock, 9); // QUERY_CHECK_NULL(pColInfoData, code, lino, _end, terrno); // code = colDataSetVal(pColInfoData, numOfRows, (char*)&vgId, false); // QUERY_CHECK_CODE(code, lino, _end); From 684cd33de0f8807d9029e11e42b4d0af4226537d Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Wed, 27 Nov 2024 19:00:24 +0800 Subject: [PATCH 27/55] fix ci problem --- include/common/tmsg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/common/tmsg.h b/include/common/tmsg.h index c703d2dce9..8564684d02 100644 --- a/include/common/tmsg.h +++ b/include/common/tmsg.h @@ -388,6 +388,7 @@ typedef enum ENodeType { QUERY_NODE_SHOW_USER_PRIVILEGES_STMT, QUERY_NODE_SHOW_VIEWS_STMT, QUERY_NODE_SHOW_COMPACTS_STMT, + QUERY_NODE_SHOW_COMPACT_DETAILS_STMT, QUERY_NODE_SHOW_GRANTS_FULL_STMT, QUERY_NODE_SHOW_GRANTS_LOGS_STMT, QUERY_NODE_SHOW_CLUSTER_MACHINES_STMT, @@ -399,7 +400,6 @@ typedef enum ENodeType { QUERY_NODE_SHOW_CREATE_TSMA_STMT, QUERY_NODE_DROP_TSMA_STMT, QUERY_NODE_SHOW_FILESETS_STMT, - QUERY_NODE_SHOW_COMPACT_DETAILS_STMT, // logic plan node QUERY_NODE_LOGIC_PLAN_SCAN = 1000, From 35a864491e392d48abcecfbc19ae80cd430a558c Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Thu, 28 Nov 2024 15:15:15 +0800 Subject: [PATCH 28/55] fix: change ci case --- tests/system-test/0-others/information_schema.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/system-test/0-others/information_schema.py b/tests/system-test/0-others/information_schema.py index 538aa1ad63..affbd9d3f8 100644 --- a/tests/system-test/0-others/information_schema.py +++ b/tests/system-test/0-others/information_schema.py @@ -61,7 +61,7 @@ class TDTestCase: self.ins_list = ['ins_dnodes','ins_mnodes','ins_qnodes','ins_snodes','ins_cluster','ins_databases','ins_functions',\ 'ins_indexes','ins_stables','ins_tables','ins_tags','ins_columns','ins_users','ins_grants','ins_vgroups','ins_configs','ins_dnode_variables',\ 'ins_topics','ins_subscriptions','ins_streams','ins_stream_tasks','ins_vnodes','ins_user_privileges','ins_views', - 'ins_compacts', 'ins_compact_details', 'ins_grants_full','ins_grants_logs', 'ins_machines', 'ins_arbgroups', 'ins_tsmas', "ins_encryptions", "ins_anodes", "ins_anodes_full"] + 'ins_compacts', 'ins_compact_details', 'ins_grants_full','ins_grants_logs', 'ins_machines', 'ins_arbgroups', 'ins_tsmas', "ins_encryptions", "ins_anodes", "ins_anodes_full", "ins_filesets"] self.perf_list = ['perf_connections','perf_queries','perf_consumers','perf_trans','perf_apps'] def insert_data(self,column_dict,tbname,row_num): insert_sql = self.setsql.set_insertsql(column_dict,tbname,self.binary_str,self.nchar_str) From 56df90322e83d67fe7b3e770d3d16fbe5e21c9a0 Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Thu, 28 Nov 2024 16:03:46 +0800 Subject: [PATCH 29/55] more code --- docs/en/14-reference/03-taos-sql/22-meta.md | 21 +++++++++++------ docs/zh/08-operation/04-maintenance.md | 2 ++ docs/zh/14-reference/03-taos-sql/22-meta.md | 22 +++++++++++------ source/common/src/systable.c | 1 - source/libs/executor/src/sysscanoperator.c | 26 ++++++++------------- 5 files changed, 41 insertions(+), 31 deletions(-) diff --git a/docs/en/14-reference/03-taos-sql/22-meta.md b/docs/en/14-reference/03-taos-sql/22-meta.md index f3d1017788..d62edefa72 100644 --- a/docs/en/14-reference/03-taos-sql/22-meta.md +++ b/docs/en/14-reference/03-taos-sql/22-meta.md @@ -316,10 +316,17 @@ Provides dnode configuration information. Users whose SYSINFO attribute is 0 can Users whose SYSINFO attribute is 0 can't view this table. -| # | **Column** | **Data Type** | **Description** |** | -| --- | :----------: | ------------ | -------------------------------------------| -| 1 | user_name | VARCHAR(24) | Username | -| 2 | privilege | VARCHAR(10) | Privilege description | -| 3 | db_name | VARCHAR(65) | Database name | -| 4 | table_name | VARCHAR(193) | Table name | -| 5 | condition | VARCHAR(49152) | The privilege filter for child tables | +## INS_FILESETS + +Provides information about file sets. + +| # | **Column** | **Data Type** | **Description** | ** | +| --- | :-----------: | ------------- | ---------------------------------------------------- | +| 1 | db_name | VARCHAR(65) | Database name | +| 2 | vgroup_id | INT | Vgroup ID | +| 3 | fileset_id | INT | File set ID | +| 4 | start_time | TIMESTAMP | Start time of the time range covered by the file set | +| 5 | end_time | TIMESTAMP | End time of the time range covered by the file set | +| 6 | total_size | BIGINT | Total size of the file set | +| 7 | last_compact | TIMESTAMP | Time of the last compaction | +| 8 | shold_compact | bool | Whether the file set should be compacted | diff --git a/docs/zh/08-operation/04-maintenance.md b/docs/zh/08-operation/04-maintenance.md index 88122fed69..9ef165179d 100644 --- a/docs/zh/08-operation/04-maintenance.md +++ b/docs/zh/08-operation/04-maintenance.md @@ -18,6 +18,7 @@ TDengine 面向多种写入场景,而很多写入场景下,TDengine 的存 ```SQL COMPACT DATABASE db_name [start with 'XXXX'] [end with 'YYYY']; +COMPACT [db_name.]VGROUPS IN (vgroup_id1, vgroup_id2, ...) [start with 'XXXX'] [end with 'YYYY']; SHOW COMPACTS [compact_id]; KILL COMPACT compact_id; ``` @@ -25,6 +26,7 @@ KILL COMPACT compact_id; ### 效果 - 扫描并压缩指定的 DB 中所有 VGROUP 中 VNODE 的所有数据文件 +- 扫描并压缩 DB 中指定的 VGROUP 列表中 VNODE 的所有数据文件, 若 db_name 为空,则默认为当前数据库 - COMPCAT 会删除被删除数据以及被删除的表的数据 - COMPACT 会合并多个 STT 文件 - 可通过 start with 关键字指定 COMPACT 数据的起始时间 diff --git a/docs/zh/14-reference/03-taos-sql/22-meta.md b/docs/zh/14-reference/03-taos-sql/22-meta.md index b61e06f759..df921a9bb1 100644 --- a/docs/zh/14-reference/03-taos-sql/22-meta.md +++ b/docs/zh/14-reference/03-taos-sql/22-meta.md @@ -319,10 +319,18 @@ TDengine 内置了一个名为 `INFORMATION_SCHEMA` 的数据库,提供对数 注:SYSINFO 属性为 0 的用户不能查看此表。 -| # | **列名** | **数据类型** | **说明** | -| --- | :----------: | ------------ | -------------------------------------------------------------------------------------------------------------------- | -| 1 | user_name | VARCHAR(24) | 用户名 -| 2 | privilege | VARCHAR(10) | 权限描述 -| 3 | db_name | VARCHAR(65) | 数据库名称 -| 4 | table_name | VARCHAR(193) | 表名称 -| 5 | condition | VARCHAR(49152) | 子表权限过滤条件 +## INS_FILESETS + +提供当前数据存储的文件组的相关信息。 + + +| # | **列名** | **数据类型** | **说明** | +| --- | :-----------: | ------------ | --------------------------------------- | +| 1 | db_name | VARCHAR(65) | 数据库名 | +| 2 | vgroup_id | INT | vgroup id | +| 3 | fileset_id | INT | 文件组 id | +| 4 | start_time | TIMESTAMP | 文件组的覆盖数据的开始时间 | +| 5 | end_time | TIMESTAMP | 文件组的覆盖数据的结束时间 | +| 6 | total_size | BIGINT | 文件组的总大小 | +| 7 | last_compact | TIMESTAMP | 最后一次压缩的时间 | +| 8 | shold_compact | bool | 是否需要压缩,true:需要,false:不需要 | \ No newline at end of file diff --git a/source/common/src/systable.c b/source/common/src/systable.c index f2778042bf..cac5fec8e5 100644 --- a/source/common/src/systable.c +++ b/source/common/src/systable.c @@ -417,7 +417,6 @@ static const SSysDbTableSchema anodesFullSchema[] = { }; static const SSysDbTableSchema filesetsFullSchema[] = { - {.name = "dnode_id", .bytes = 4, .type = TSDB_DATA_TYPE_INT, .sysInfo = false}, {.name = "db_name", .bytes = SYSTABLE_SCH_DB_NAME_LEN, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = false}, {.name = "vgroup_id", .bytes = 4, .type = TSDB_DATA_TYPE_INT, .sysInfo = false}, {.name = "fileset_id", .bytes = 4, .type = TSDB_DATA_TYPE_INT, .sysInfo = false}, diff --git a/source/libs/executor/src/sysscanoperator.c b/source/libs/executor/src/sysscanoperator.c index 7b79d25f96..bd90e1796c 100644 --- a/source/libs/executor/src/sysscanoperator.c +++ b/source/libs/executor/src/sysscanoperator.c @@ -2058,22 +2058,16 @@ static SSDataBlock* sysTableBuildUserFileSets(SOperatorInfo* pOperator) { // fill the data block { SColumnInfoData* pColInfoData; - - // dnode_id - int32_t dnodeId = 0; // TODO - pColInfoData = taosArrayGet(p->pDataBlock, 0); - QUERY_CHECK_NULL(pColInfoData, code, lino, _end, terrno); - code = colDataSetVal(pColInfoData, numOfRows, (char*)&dnodeId, false); - QUERY_CHECK_CODE(code, lino, _end); + int32_t index = 0; // db_name - pColInfoData = taosArrayGet(p->pDataBlock, 1); + pColInfoData = taosArrayGet(p->pDataBlock, index++); QUERY_CHECK_NULL(pColInfoData, code, lino, _end, terrno); code = colDataSetVal(pColInfoData, numOfRows, db, false); QUERY_CHECK_CODE(code, lino, _end); // vgroup_id - pColInfoData = taosArrayGet(p->pDataBlock, 2); + pColInfoData = taosArrayGet(p->pDataBlock, index++); QUERY_CHECK_NULL(pColInfoData, code, lino, _end, terrno); code = colDataSetVal(pColInfoData, numOfRows, (char*)&vgId, false); QUERY_CHECK_CODE(code, lino, _end); @@ -2082,7 +2076,7 @@ static SSDataBlock* sysTableBuildUserFileSets(SOperatorInfo* pOperator) { int32_t filesetId = 0; code = pAPI->tsdReader.fileSetGetEntryField(pInfo->pFileSetReader, "fileset_id", &filesetId); QUERY_CHECK_CODE(code, lino, _end); - pColInfoData = taosArrayGet(p->pDataBlock, 3); + pColInfoData = taosArrayGet(p->pDataBlock, index++); QUERY_CHECK_NULL(pColInfoData, code, lino, _end, terrno); code = colDataSetVal(pColInfoData, numOfRows, (char*)&filesetId, false); QUERY_CHECK_CODE(code, lino, _end); @@ -2091,7 +2085,7 @@ static SSDataBlock* sysTableBuildUserFileSets(SOperatorInfo* pOperator) { int64_t startTime = 0; code = pAPI->tsdReader.fileSetGetEntryField(pInfo->pFileSetReader, "start_time", &startTime); QUERY_CHECK_CODE(code, lino, _end); - pColInfoData = taosArrayGet(p->pDataBlock, 4); + pColInfoData = taosArrayGet(p->pDataBlock, index++); QUERY_CHECK_NULL(pColInfoData, code, lino, _end, terrno); code = colDataSetVal(pColInfoData, numOfRows, (char*)&startTime, false); QUERY_CHECK_CODE(code, lino, _end); @@ -2100,7 +2094,7 @@ static SSDataBlock* sysTableBuildUserFileSets(SOperatorInfo* pOperator) { int64_t endTime = 0; code = pAPI->tsdReader.fileSetGetEntryField(pInfo->pFileSetReader, "end_time", &endTime); QUERY_CHECK_CODE(code, lino, _end); - pColInfoData = taosArrayGet(p->pDataBlock, 5); + pColInfoData = taosArrayGet(p->pDataBlock, index++); QUERY_CHECK_NULL(pColInfoData, code, lino, _end, terrno); code = colDataSetVal(pColInfoData, numOfRows, (char*)&endTime, false); QUERY_CHECK_CODE(code, lino, _end); @@ -2109,7 +2103,7 @@ static SSDataBlock* sysTableBuildUserFileSets(SOperatorInfo* pOperator) { int64_t totalSize = 0; code = pAPI->tsdReader.fileSetGetEntryField(pInfo->pFileSetReader, "total_size", &totalSize); QUERY_CHECK_CODE(code, lino, _end); - pColInfoData = taosArrayGet(p->pDataBlock, 6); + pColInfoData = taosArrayGet(p->pDataBlock, index++); QUERY_CHECK_NULL(pColInfoData, code, lino, _end, terrno); code = colDataSetVal(pColInfoData, numOfRows, (char*)&totalSize, false); QUERY_CHECK_CODE(code, lino, _end); @@ -2118,7 +2112,7 @@ static SSDataBlock* sysTableBuildUserFileSets(SOperatorInfo* pOperator) { int64_t lastCompacat = 0; code = pAPI->tsdReader.fileSetGetEntryField(pInfo->pFileSetReader, "last_compact_time", &lastCompacat); QUERY_CHECK_CODE(code, lino, _end); - pColInfoData = taosArrayGet(p->pDataBlock, 7); + pColInfoData = taosArrayGet(p->pDataBlock, index++); QUERY_CHECK_NULL(pColInfoData, code, lino, _end, terrno); code = colDataSetVal(pColInfoData, numOfRows, (char*)&lastCompacat, false); QUERY_CHECK_CODE(code, lino, _end); @@ -2127,7 +2121,7 @@ static SSDataBlock* sysTableBuildUserFileSets(SOperatorInfo* pOperator) { bool shouldCompact = false; code = pAPI->tsdReader.fileSetGetEntryField(pInfo->pFileSetReader, "should_compact", &shouldCompact); QUERY_CHECK_CODE(code, lino, _end); - pColInfoData = taosArrayGet(p->pDataBlock, 8); + pColInfoData = taosArrayGet(p->pDataBlock, index++); QUERY_CHECK_NULL(pColInfoData, code, lino, _end, terrno); code = colDataSetVal(pColInfoData, numOfRows, (char*)&shouldCompact, false); QUERY_CHECK_CODE(code, lino, _end); @@ -2136,7 +2130,7 @@ static SSDataBlock* sysTableBuildUserFileSets(SOperatorInfo* pOperator) { // const char* details = NULL; // code = pAPI->tsdReader.fileSetGetEntryField(pInfo->pFileSetReader, "details", &details); // QUERY_CHECK_CODE(code, lino, _end); - // pColInfoData = taosArrayGet(p->pDataBlock, 9); + // pColInfoData = taosArrayGet(p->pDataBlock, index++); // QUERY_CHECK_NULL(pColInfoData, code, lino, _end, terrno); // code = colDataSetVal(pColInfoData, numOfRows, (char*)&vgId, false); // QUERY_CHECK_CODE(code, lino, _end); From e96359055a28b87639b9937be4be0f5afddb403a Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Thu, 28 Nov 2024 16:11:36 +0800 Subject: [PATCH 30/55] fix CI problem --- tests/system-test/0-others/information_schema.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/system-test/0-others/information_schema.py b/tests/system-test/0-others/information_schema.py index affbd9d3f8..859fc788d8 100644 --- a/tests/system-test/0-others/information_schema.py +++ b/tests/system-test/0-others/information_schema.py @@ -222,7 +222,7 @@ class TDTestCase: tdSql.query("select * from information_schema.ins_columns where db_name ='information_schema'") tdLog.info(len(tdSql.queryResult)) - tdSql.checkEqual(True, len(tdSql.queryResult) in range(282, 283)) + tdSql.checkEqual(True, len(tdSql.queryResult) in range(292, 293)) tdSql.query("select * from information_schema.ins_columns where db_name ='performance_schema'") tdSql.checkEqual(56, len(tdSql.queryResult)) From 58b1339c2ff5de696bac6d8fb8b86a2526a1b05c Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Fri, 29 Nov 2024 11:12:37 +0800 Subject: [PATCH 31/55] more test case --- tests/system-test/0-others/compact_vgroups.py | 38 ++++++++++++++++--- 1 file changed, 32 insertions(+), 6 deletions(-) diff --git a/tests/system-test/0-others/compact_vgroups.py b/tests/system-test/0-others/compact_vgroups.py index 0b5f547baa..056860da2b 100644 --- a/tests/system-test/0-others/compact_vgroups.py +++ b/tests/system-test/0-others/compact_vgroups.py @@ -23,28 +23,54 @@ class TDTestCase: # Test cases ====================== def compactVgroupsSqlTest(self): # create database db1 - sql = "create database db1 vgroups 10" + sql = "create database db1 vgroups 5" + tdLog.info(sql) + tdSql.execute(sql) + + # create database db2 + sql = "create database db2 vgroups 5" tdLog.info(sql) tdSql.execute(sql) # invalid sql - sql = "compact vgroups" + sql = "compact vgroups;" tdLog.info(f"expect error SQL: {sql}") - tdSql.execute(sql, False) + tdSql.error(sql) + # invalid sql sql = "compact vgroups in" tdLog.info(f"expect error SQL: {sql}") - tdSql.execute(sql, False) + tdSql.error(sql) + # invalid sql sql = "compact vgroups in ()" tdLog.info(f"expect error SQL: {sql}") - tdSql.execute(sql, False) + tdSql.error(sql) # error without using database sql = "compact vgroups in (2)" tdLog.info(f"expect error SQL: {sql}") - tdSql.execute(sql, False) + tdSql.error(sql) + # error with duplicate vgroup + sql = "compact db1.vgroups in (2, 2)" + tdLog.info(f"expect error SQL: {sql}") + tdSql.error(sql) + + # error with invalid vgroup id + sql = "compact db1.vgroups in (0, -1)" + tdLog.info(f"expect error SQL: {sql}") + tdSql.error(sql) + + # error to compact vgroups not in the same dat + sql = "compact db1.vgroups in (7, 8)" + tdLog.info(f"expect error SQL: {sql}") + tdSql.error(sql) + + # error to compact vgroups not in the same database + sql = "compact db1.vgroups in (2, 5, 8)" + tdLog.info(f"expect error SQL: {sql}") + tdSql.error(sql) # Test Framework Apis def init(self, conn, logSql, replicaVar=1): From 9d96009b1beec227f0fca737df8649421140355a Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Fri, 29 Nov 2024 16:33:10 +0800 Subject: [PATCH 32/55] more test case --- tests/system-test/0-others/compact_vgroups.py | 87 ++++++++++++++++--- 1 file changed, 75 insertions(+), 12 deletions(-) diff --git a/tests/system-test/0-others/compact_vgroups.py b/tests/system-test/0-others/compact_vgroups.py index 056860da2b..27202a2e4b 100644 --- a/tests/system-test/0-others/compact_vgroups.py +++ b/tests/system-test/0-others/compact_vgroups.py @@ -21,17 +21,7 @@ import taos class TDTestCase: # Test cases ====================== - def compactVgroupsSqlTest(self): - # create database db1 - sql = "create database db1 vgroups 5" - tdLog.info(sql) - tdSql.execute(sql) - - # create database db2 - sql = "create database db2 vgroups 5" - tdLog.info(sql) - tdSql.execute(sql) - + def compactVgroupsErrorTest(self): # invalid sql sql = "compact vgroups;" tdLog.info(f"expect error SQL: {sql}") @@ -71,6 +61,66 @@ class TDTestCase: sql = "compact db1.vgroups in (2, 5, 8)" tdLog.info(f"expect error SQL: {sql}") tdSql.error(sql) + + def waitCompactFinish(self): + while True: + sql = 'show compacts' + rows = tdSql.query(sql) + if rows == 0: + break + time.sleep(1) + + def compactVgroupsSqlTest(self): + # make sure there is no compacts + sql = 'show compacts' + rows = tdSql.query(sql) + tdSql.checkEqual(rows, 0) + + # use db1 and compact with db name should be ok + sql = 'use db1' + tdLog.info(f'expect success SQL: {sql}') + tdSql.execute(sql) + + sql = 'compact vgroups in (2)' + tdLog.info(f'expect success SQL: {sql}') + tdSql.execute(sql) + + # check there should be one row in compacts + sql = 'show compacts' + rows = tdSql.query(sql) + tdSql.checkEqual(rows, 1) + + compactId = tdSql.getData(0, 0) + + # query the compact status + sql = f'show compact {compactId}' + tdLog.info(f'expect success SQL: {sql}') + rows = tdSql.query(sql) + tdSql.checkEqual(rows, 1) + tdSql.checkEqual(tdSql.getData(0, 0), compactId) # compact_id + tdSql.checkEqual(tdSql.getData(0, 1), 2) # vgroup_id + + # wait for compact finish + self.waitCompactFinish() + + # start a new compact + sql = 'compact db2.vgroups in (7, 10)' + tdLog.info(f'expect success SQL: {sql}') + tdSql.execute(sql) + + sql = 'show compacts' + rows = tdSql.query(sql) + tdSql.checkEqual(rows, 1) + + compactId = tdSql.getData(0, 0) + sql = f'show compact {compactId}' + tdLog.info(f'expect success SQL: {sql}') + rows = tdSql.query(sql) + tdSql.checkEqual(rows, 2) + tdSql.checkEqual(tdSql.getData(0, 1) in (7, 10), True) + tdSql.checkEqual(tdSql.getData(1, 1) in (7, 10), True) + tdSql.checkEqual(tdSql.getData(0, 1) != tdSql.getData(1, 1), True) + # Test Framework Apis def init(self, conn, logSql, replicaVar=1): @@ -80,7 +130,20 @@ class TDTestCase: tdSql.init(conn.cursor(), True) def run(self): - # do compact vgroups test + # create database db1 + sql = "create database db1 vgroups 5" + tdLog.info(sql) + tdSql.execute(sql) + + # create database db2 + sql = "create database db2 vgroups 5" + tdLog.info(sql) + tdSql.execute(sql) + + # error test + self.compactVgroupsErrorTest() + + # success to compact vgroups self.compactVgroupsSqlTest() def stop(self): From b91528f19ca14b01344f8c5634ed071024c28b56 Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Fri, 29 Nov 2024 17:12:05 +0800 Subject: [PATCH 33/55] add ci test --- tests/parallel_test/cases.task | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/parallel_test/cases.task b/tests/parallel_test/cases.task index 0cc84ad0ec..eb9fa62dd0 100644 --- a/tests/parallel_test/cases.task +++ b/tests/parallel_test/cases.task @@ -383,6 +383,7 @@ ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/test_hot_refresh_configurations.py ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/subscribe_stream_privilege.py ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/empty_identifier.py +,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/compact_vgroups.py ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/composite_primary_key_create.py ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/composite_primary_key_insert.py From 154e17a8e7249e524df112516cf09e09fafdce11 Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Mon, 2 Dec 2024 17:24:39 +0800 Subject: [PATCH 34/55] fix: fix CI case --- .../develop-test/2-query/table_count_scan.py | 38 ++++++++++--------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/tests/develop-test/2-query/table_count_scan.py b/tests/develop-test/2-query/table_count_scan.py index 4e64f455fd..91112ea8b1 100644 --- a/tests/develop-test/2-query/table_count_scan.py +++ b/tests/develop-test/2-query/table_count_scan.py @@ -65,19 +65,23 @@ class TDTestCase: tdSql.query('select count(*),db_name, stable_name from information_schema.ins_tables group by db_name, stable_name;') tdSql.checkRows(3) - tdSql.checkData(0, 0, 35) - tdSql.checkData(0, 1, 'information_schema') - tdSql.checkData(0, 2, None) - tdSql.checkData(1, 0, 3) - tdSql.checkData(1, 1, 'tbl_count') - tdSql.checkData(1, 2, 'stb1') - tdSql.checkData(2, 0, 5) - tdSql.checkData(2, 1, 'performance_schema') - tdSql.checkData(2, 2, None) - + for i in range(0, 3): + db_name = tdSql.getData(i, 1) + if db_name == 'information_schema': + tdSql.checkData(i, 0, 35) + tdSql.checkData(i, 2, None) + elif db_name == 'performance_schema': + tdSql.checkData(i, 0, 5) + tdSql.checkData(i, 2, None) + elif db_name == 'tbl_count': + tdSql.checkData(i, 0, 3) + tdSql.checkData(i, 2, 'stb1') + else: + raise Exception("unexpected db_name: %s" % db_name) + tdSql.query('select count(1) v,db_name, stable_name from information_schema.ins_tables group by db_name, stable_name order by v desc;') tdSql.checkRows(3) - tdSql.checkData(0, 0, 34) + tdSql.checkData(0, 0, 35) tdSql.checkData(0, 1, 'information_schema') tdSql.checkData(0, 2, None) tdSql.checkData(1, 0, 5) @@ -93,7 +97,7 @@ class TDTestCase: tdSql.checkData(1, 1, 'performance_schema') tdSql.checkData(0, 0, 3) tdSql.checkData(0, 1, 'tbl_count') - tdSql.checkData(2, 0, 34) + tdSql.checkData(2, 0, 35) tdSql.checkData(2, 1, 'information_schema') tdSql.query("select count(*) from information_schema.ins_tables where db_name='tbl_count'") @@ -106,7 +110,7 @@ class TDTestCase: tdSql.query('select count(*) from information_schema.ins_tables') tdSql.checkRows(1) - tdSql.checkData(0, 0, 42) + tdSql.checkData(0, 0, 43) tdSql.execute('create table stba (ts timestamp, c1 bool, c2 tinyint, c3 smallint, c4 int, c5 bigint, c6 float, c7 double, c8 binary(10), c9 nchar(10), c10 tinyint unsigned, c11 smallint unsigned, c12 int unsigned, c13 bigint unsigned) TAGS(t1 int, t2 binary(10), t3 double);') @@ -189,7 +193,7 @@ class TDTestCase: tdSql.checkData(2, 0, 5) tdSql.checkData(2, 1, 'performance_schema') tdSql.checkData(2, 2, None) - tdSql.checkData(3, 0, 34) + tdSql.checkData(3, 0, 35) tdSql.checkData(3, 1, 'information_schema') tdSql.checkData(3, 2, None) @@ -204,7 +208,7 @@ class TDTestCase: tdSql.checkData(2, 0, 5) tdSql.checkData(2, 1, 'performance_schema') tdSql.checkData(2, 2, None) - tdSql.checkData(3, 0, 34) + tdSql.checkData(3, 0, 35) tdSql.checkData(3, 1, 'information_schema') tdSql.checkData(3, 2, None) @@ -215,7 +219,7 @@ class TDTestCase: tdSql.checkData(0, 1, 'tbl_count') tdSql.checkData(1, 0, 5) tdSql.checkData(1, 1, 'performance_schema') - tdSql.checkData(2, 0, 34) + tdSql.checkData(2, 0, 35) tdSql.checkData(2, 1, 'information_schema') tdSql.query("select count(*) from information_schema.ins_tables where db_name='tbl_count'") @@ -228,7 +232,7 @@ class TDTestCase: tdSql.query('select count(*) from information_schema.ins_tables') tdSql.checkRows(1) - tdSql.checkData(0, 0, 43) + tdSql.checkData(0, 0, 44) tdSql.execute('drop database tbl_count') From 1643632d8c2094638cd007a341bbee722418cdec Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Tue, 3 Dec 2024 15:17:50 +0800 Subject: [PATCH 35/55] more test case --- tests/system-test/0-others/compact_vgroups.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/system-test/0-others/compact_vgroups.py b/tests/system-test/0-others/compact_vgroups.py index 27202a2e4b..783eaa465f 100644 --- a/tests/system-test/0-others/compact_vgroups.py +++ b/tests/system-test/0-others/compact_vgroups.py @@ -121,6 +121,9 @@ class TDTestCase: tdSql.checkEqual(tdSql.getData(1, 1) in (7, 10), True) tdSql.checkEqual(tdSql.getData(0, 1) != tdSql.getData(1, 1), True) + # wait for compact finish + self.waitCompactFinish() + # Test Framework Apis def init(self, conn, logSql, replicaVar=1): From 976974cd0fef3f952ae072bb55a98036e4a96658 Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Tue, 3 Dec 2024 17:51:17 +0800 Subject: [PATCH 36/55] fix test case --- tests/system-test/0-others/compact_vgroups.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/system-test/0-others/compact_vgroups.py b/tests/system-test/0-others/compact_vgroups.py index 783eaa465f..18ad36359f 100644 --- a/tests/system-test/0-others/compact_vgroups.py +++ b/tests/system-test/0-others/compact_vgroups.py @@ -151,7 +151,7 @@ class TDTestCase: def stop(self): tdSql.close() - tdLog.success(f"stop to execute {__file__}") + tdLog.success("%s successfully executed" % __file__) tdCases.addLinux(__file__, TDTestCase()) tdCases.addWindows(__file__, TDTestCase()) \ No newline at end of file From 92471c58342c194a9ca25e4fddc893fdb250b1ff Mon Sep 17 00:00:00 2001 From: kailixu Date: Tue, 3 Dec 2024 17:51:41 +0800 Subject: [PATCH 37/55] feat: add time range list for auto compact --- source/dnode/vnode/src/tsdb/tsdbOpen.c | 4 ++-- source/libs/nodes/src/nodesUtilFuncs.c | 6 ++---- source/libs/parser/inc/sql.y | 8 ++++---- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/source/dnode/vnode/src/tsdb/tsdbOpen.c b/source/dnode/vnode/src/tsdb/tsdbOpen.c index 58a22a6c7b..b2e4621878 100644 --- a/source/dnode/vnode/src/tsdb/tsdbOpen.c +++ b/source/dnode/vnode/src/tsdb/tsdbOpen.c @@ -19,7 +19,7 @@ extern int32_t tsdbOpenCompMonitor(STsdb *tsdb); extern void tsdbCloseCompMonitor(STsdb *tsdb); extern int32_t tsdbInitCompact(); -extern void tsdbClearnupCompact(); +extern void tsdbCleanupCompact(); int32_t tsdbInit() { #ifdef TD_ENTERPRISE @@ -30,7 +30,7 @@ int32_t tsdbInit() { void tsdbCleanUp() { #ifdef TD_ENTERPRISE - tsdbClearnupCompact(); + tsdbCleanupCompact(); #endif return; } diff --git a/source/libs/nodes/src/nodesUtilFuncs.c b/source/libs/nodes/src/nodesUtilFuncs.c index 0162fcc8fd..50f798bc23 100644 --- a/source/libs/nodes/src/nodesUtilFuncs.c +++ b/source/libs/nodes/src/nodesUtilFuncs.c @@ -470,11 +470,9 @@ int32_t nodesMakeNode(ENodeType type, SNode** ppNodeOut) { case QUERY_NODE_SET_OPERATOR: code = makeNode(type, sizeof(SSetOperator), &pNode); break; -<<<<<<< HEAD -======= case QUERY_NODE_RANGE_AROUND: - code = makeNode(type, sizeof(SRangeAroundNode), &pNode); break; ->>>>>>> feat/TS-4994-3.0 + code = makeNode(type, sizeof(SRangeAroundNode), &pNode); + break; case QUERY_NODE_SELECT_STMT: code = makeNode(type, sizeof(SSelectStmt), &pNode); break; diff --git a/source/libs/parser/inc/sql.y b/source/libs/parser/inc/sql.y index 12712c7f92..cbfcd84670 100644 --- a/source/libs/parser/inc/sql.y +++ b/source/libs/parser/inc/sql.y @@ -342,8 +342,8 @@ integer_list(A) ::= integer_list(B) NK_COMMA NK_INTEGER(C). %type signed_integer_list { SNodeList* } %destructor signed_integer_list { nodesDestroyList($$); } -signed_integer_list(A) ::= signed_integer(B). { A = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &B)); } -signed_integer_list(A) ::= signed_integer_list(B) NK_COMMA signed_integer(C). { A = addNodeToList(pCxt, B, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &C)); } +signed_integer_list(A) ::= signed_integer(B). { A = createNodeList(pCxt, B); } +signed_integer_list(A) ::= signed_integer_list(B) NK_COMMA signed_integer(C). { A = addNodeToList(pCxt, B, C); } %type variable_list { SNodeList* } %destructor variable_list { nodesDestroyList($$); } @@ -352,8 +352,8 @@ variable_list(A) ::= variable_list(B) NK_COMMA NK_VARIABLE(C). %type signed_variable_list { SNodeList* } %destructor signed_variable_list { nodesDestroyList($$); } -signed_variable_list(A) ::= NK_VARIABLE(B). { A = createNodeList(pCxt, createDurationValueNode(pCxt, &B)); } -signed_variable_list(A) ::= variable_list(B) NK_COMMA NK_VARIABLE(C). { A = addNodeToList(pCxt, B, createDurationValueNode(pCxt, &C)); } +signed_variable_list(A) ::= signed_variable(B). { A = createNodeList(pCxt, releaseRawExprNode(pCxt, B)); } +signed_variable_list(A) ::= signed_variable_list(B) NK_COMMA signed_variable(C). { A = addNodeToList(pCxt, B, releaseRawExprNode(pCxt, C)); } %type retention_list { SNodeList* } %destructor retention_list { nodesDestroyList($$); } From 118c75241d5dedd6a5e16f39669dbdd0116a0150 Mon Sep 17 00:00:00 2001 From: kailixu Date: Tue, 3 Dec 2024 19:23:17 +0800 Subject: [PATCH 38/55] feat: time_range syntax for auto compact --- source/libs/parser/inc/sql.y | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/libs/parser/inc/sql.y b/source/libs/parser/inc/sql.y index cbfcd84670..f47db6be20 100644 --- a/source/libs/parser/inc/sql.y +++ b/source/libs/parser/inc/sql.y @@ -290,8 +290,8 @@ db_options(A) ::= db_options(B) ENCRYPT_ALGORITHM NK_STRING(C). db_options(A) ::= db_options(B) DNODES NK_STRING(C). { A = setDatabaseOption(pCxt, B, DB_OPTION_DNODES, &C); } db_options(A) ::= db_options(B) COMPACT_INTERVAL NK_INTEGER (C). { A = setDatabaseOption(pCxt, B, DB_OPTION_COMPACT_INTERVAL, &C); } db_options(A) ::= db_options(B) COMPACT_INTERVAL NK_VARIABLE(C). { A = setDatabaseOption(pCxt, B, DB_OPTION_COMPACT_INTERVAL, &C); } -db_options(A) ::= db_options(B) COMPACT_TIME_RANGE integer_list(C). { A = setDatabaseOption(pCxt, B, DB_OPTION_COMPACT_TIME_RANGE, C); } -db_options(A) ::= db_options(B) COMPACT_TIME_RANGE variable_list(C). { A = setDatabaseOption(pCxt, B, DB_OPTION_COMPACT_TIME_RANGE, C); } +db_options(A) ::= db_options(B) COMPACT_TIME_RANGE signed_integer_list(C). { A = setDatabaseOption(pCxt, B, DB_OPTION_COMPACT_TIME_RANGE, C); } +db_options(A) ::= db_options(B) COMPACT_TIME_RANGE signed_variable_list(C). { A = setDatabaseOption(pCxt, B, DB_OPTION_COMPACT_TIME_RANGE, C); } db_options(A) ::= db_options(B) COMPACT_TIME_OFFSET NK_INTEGER(C). { A = setDatabaseOption(pCxt, B, DB_OPTION_COMPACT_TIME_OFFSET, &C); } db_options(A) ::= db_options(B) COMPACT_TIME_OFFSET NK_VARIABLE(C). { A = setDatabaseOption(pCxt, B, DB_OPTION_COMPACT_TIME_OFFSET, &C); } From bf67531c109f6a9a313387cbad9aca92792beb46 Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Wed, 4 Dec 2024 09:37:43 +0800 Subject: [PATCH 39/55] fix ci cases after merge --- tests/develop-test/2-query/table_count_scan.py | 16 ++++++++-------- tests/script/tsim/query/sys_tbname.sim | 2 +- tests/script/tsim/query/tableCount.sim | 6 +++--- tests/system-test/0-others/information_schema.py | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/tests/develop-test/2-query/table_count_scan.py b/tests/develop-test/2-query/table_count_scan.py index 91112ea8b1..9725c36bee 100644 --- a/tests/develop-test/2-query/table_count_scan.py +++ b/tests/develop-test/2-query/table_count_scan.py @@ -68,7 +68,7 @@ class TDTestCase: for i in range(0, 3): db_name = tdSql.getData(i, 1) if db_name == 'information_schema': - tdSql.checkData(i, 0, 35) + tdSql.checkData(i, 0, 36) tdSql.checkData(i, 2, None) elif db_name == 'performance_schema': tdSql.checkData(i, 0, 5) @@ -81,7 +81,7 @@ class TDTestCase: tdSql.query('select count(1) v,db_name, stable_name from information_schema.ins_tables group by db_name, stable_name order by v desc;') tdSql.checkRows(3) - tdSql.checkData(0, 0, 35) + tdSql.checkData(0, 0, 36) tdSql.checkData(0, 1, 'information_schema') tdSql.checkData(0, 2, None) tdSql.checkData(1, 0, 5) @@ -97,7 +97,7 @@ class TDTestCase: tdSql.checkData(1, 1, 'performance_schema') tdSql.checkData(0, 0, 3) tdSql.checkData(0, 1, 'tbl_count') - tdSql.checkData(2, 0, 35) + tdSql.checkData(2, 0, 36) tdSql.checkData(2, 1, 'information_schema') tdSql.query("select count(*) from information_schema.ins_tables where db_name='tbl_count'") @@ -110,7 +110,7 @@ class TDTestCase: tdSql.query('select count(*) from information_schema.ins_tables') tdSql.checkRows(1) - tdSql.checkData(0, 0, 43) + tdSql.checkData(0, 0, 44) tdSql.execute('create table stba (ts timestamp, c1 bool, c2 tinyint, c3 smallint, c4 int, c5 bigint, c6 float, c7 double, c8 binary(10), c9 nchar(10), c10 tinyint unsigned, c11 smallint unsigned, c12 int unsigned, c13 bigint unsigned) TAGS(t1 int, t2 binary(10), t3 double);') @@ -193,7 +193,7 @@ class TDTestCase: tdSql.checkData(2, 0, 5) tdSql.checkData(2, 1, 'performance_schema') tdSql.checkData(2, 2, None) - tdSql.checkData(3, 0, 35) + tdSql.checkData(3, 0, 36) tdSql.checkData(3, 1, 'information_schema') tdSql.checkData(3, 2, None) @@ -208,7 +208,7 @@ class TDTestCase: tdSql.checkData(2, 0, 5) tdSql.checkData(2, 1, 'performance_schema') tdSql.checkData(2, 2, None) - tdSql.checkData(3, 0, 35) + tdSql.checkData(3, 0, 36) tdSql.checkData(3, 1, 'information_schema') tdSql.checkData(3, 2, None) @@ -219,7 +219,7 @@ class TDTestCase: tdSql.checkData(0, 1, 'tbl_count') tdSql.checkData(1, 0, 5) tdSql.checkData(1, 1, 'performance_schema') - tdSql.checkData(2, 0, 35) + tdSql.checkData(2, 0, 36) tdSql.checkData(2, 1, 'information_schema') tdSql.query("select count(*) from information_schema.ins_tables where db_name='tbl_count'") @@ -232,7 +232,7 @@ class TDTestCase: tdSql.query('select count(*) from information_schema.ins_tables') tdSql.checkRows(1) - tdSql.checkData(0, 0, 44) + tdSql.checkData(0, 0, 45) tdSql.execute('drop database tbl_count') diff --git a/tests/script/tsim/query/sys_tbname.sim b/tests/script/tsim/query/sys_tbname.sim index a9b27f1389..f8c1d6a986 100644 --- a/tests/script/tsim/query/sys_tbname.sim +++ b/tests/script/tsim/query/sys_tbname.sim @@ -58,7 +58,7 @@ endi sql select tbname from information_schema.ins_tables; print $rows $data00 -if $rows != 44 then +if $rows != 45 then return -1 endi if $data00 != @ins_tables@ then diff --git a/tests/script/tsim/query/tableCount.sim b/tests/script/tsim/query/tableCount.sim index a22bdc8b24..49e9126361 100644 --- a/tests/script/tsim/query/tableCount.sim +++ b/tests/script/tsim/query/tableCount.sim @@ -53,7 +53,7 @@ sql select stable_name,count(table_name) from information_schema.ins_tables grou if $rows != 3 then return -1 endi -if $data01 != 41 then +if $data01 != 42 then return -1 endi if $data11 != 10 then @@ -72,7 +72,7 @@ endi if $data11 != 5 then return -1 endi -if $data21 != 35 then +if $data21 != 36 then return -1 endi if $data31 != 5 then @@ -97,7 +97,7 @@ endi if $data42 != 3 then return -1 endi -if $data52 != 35 then +if $data52 != 36 then return -1 endi if $data62 != 5 then diff --git a/tests/system-test/0-others/information_schema.py b/tests/system-test/0-others/information_schema.py index a22efcb06d..5967d2f6d3 100644 --- a/tests/system-test/0-others/information_schema.py +++ b/tests/system-test/0-others/information_schema.py @@ -222,7 +222,7 @@ class TDTestCase: tdSql.query("select * from information_schema.ins_columns where db_name ='information_schema'") tdLog.info(len(tdSql.queryResult)) - tdSql.checkEqual(True, len(tdSql.queryResult) in range(292, 293)) + tdSql.checkEqual(True, len(tdSql.queryResult) in range(302, 303)) tdSql.query("select * from information_schema.ins_columns where db_name ='performance_schema'") tdSql.checkEqual(56, len(tdSql.queryResult)) From 77418f154a92c119e21f55b604d0506783aed0b6 Mon Sep 17 00:00:00 2001 From: kailixu Date: Wed, 4 Dec 2024 10:49:33 +0800 Subject: [PATCH 40/55] feat: db options for auto compact --- source/common/src/msg/tmsg.c | 63 +++++++++++++++++--------- source/dnode/mnode/impl/inc/mndDef.h | 4 +- source/dnode/mnode/impl/src/mndDb.c | 14 ++++-- source/libs/command/src/command.c | 6 ++- source/libs/parser/src/parTranslater.c | 4 +- 5 files changed, 58 insertions(+), 33 deletions(-) diff --git a/source/common/src/msg/tmsg.c b/source/common/src/msg/tmsg.c index f26ae89743..26ac61c42a 100644 --- a/source/common/src/msg/tmsg.c +++ b/source/common/src/msg/tmsg.c @@ -3939,8 +3939,8 @@ int32_t tSerializeSCreateDbReq(void *buf, int32_t bufLen, SCreateDbReq *pReq) { // auto-compact parameters TAOS_CHECK_EXIT(tEncodeI32v(&encoder, pReq->compactInterval)); - TAOS_CHECK_EXIT(tEncodeI64v(&encoder, pReq->compactStartTime)); - TAOS_CHECK_EXIT(tEncodeI64v(&encoder, pReq->compactEndTime)); + TAOS_CHECK_EXIT(tEncodeI32v(&encoder, pReq->compactStartTime)); + TAOS_CHECK_EXIT(tEncodeI32v(&encoder, pReq->compactEndTime)); TAOS_CHECK_EXIT(tEncodeI8(&encoder, pReq->compactTimeOffset)); tEndEncode(&encoder); @@ -4010,24 +4010,26 @@ int32_t tDeserializeSCreateDbReq(void *buf, int32_t bufLen, SCreateDbReq *pReq) TAOS_CHECK_EXIT(tDecodeI32(&decoder, &pReq->tsdbPageSize)); - pReq->keepTimeOffset = TSDB_DEFAULT_KEEP_TIME_OFFSET; if (!tDecodeIsEnd(&decoder)) { TAOS_CHECK_EXIT(tDecodeI32(&decoder, &pReq->keepTimeOffset)); + } else { + pReq->keepTimeOffset = TSDB_DEFAULT_KEEP_TIME_OFFSET; } DECODESQL(); - pReq->withArbitrator = TSDB_DEFAULT_DB_WITH_ARBITRATOR; - pReq->encryptAlgorithm = TSDB_DEFAULT_ENCRYPT_ALGO; - pReq->s3ChunkSize = TSDB_DEFAULT_S3_CHUNK_SIZE; - pReq->s3KeepLocal = TSDB_DEFAULT_S3_KEEP_LOCAL; - pReq->s3Compact = TSDB_DEFAULT_S3_COMPACT; if (!tDecodeIsEnd(&decoder)) { TAOS_CHECK_EXIT(tDecodeI8(&decoder, &pReq->withArbitrator)); TAOS_CHECK_EXIT(tDecodeI8(&decoder, &pReq->encryptAlgorithm)); TAOS_CHECK_EXIT(tDecodeI32(&decoder, &pReq->s3ChunkSize)); TAOS_CHECK_EXIT(tDecodeI32(&decoder, &pReq->s3KeepLocal)); TAOS_CHECK_EXIT(tDecodeI8(&decoder, &pReq->s3Compact)); + } else { + pReq->withArbitrator = TSDB_DEFAULT_DB_WITH_ARBITRATOR; + pReq->encryptAlgorithm = TSDB_DEFAULT_ENCRYPT_ALGO; + pReq->s3ChunkSize = TSDB_DEFAULT_S3_CHUNK_SIZE; + pReq->s3KeepLocal = TSDB_DEFAULT_S3_KEEP_LOCAL; + pReq->s3Compact = TSDB_DEFAULT_S3_COMPACT; } if (!tDecodeIsEnd(&decoder)) { @@ -4040,10 +4042,10 @@ int32_t tDeserializeSCreateDbReq(void *buf, int32_t bufLen, SCreateDbReq *pReq) TAOS_CHECK_EXIT(tDecodeI32v(&decoder, &pReq->compactEndTime)); TAOS_CHECK_EXIT(tDecodeI8(&decoder, &pReq->compactTimeOffset)); } else { - pReq->compactInterval = 0; - pReq->compactStartTime = 0; - pReq->compactEndTime = 0; - pReq->compactTimeOffset = 0; + pReq->compactInterval = TSDB_DEFAULT_COMPACT_INTERVAL; + pReq->compactStartTime = TSDB_DEFAULT_COMPACT_START_TIME; + pReq->compactEndTime = TSDB_DEFAULT_COMPACT_END_TIME; + pReq->compactTimeOffset = TSDB_DEFAULT_COMPACT_TIME_OFFSET; } tEndDecode(&decoder); @@ -4176,10 +4178,10 @@ int32_t tDeserializeSAlterDbReq(void *buf, int32_t bufLen, SAlterDbReq *pReq) { TAOS_CHECK_EXIT(tDecodeI32v(&decoder, &pReq->compactEndTime)); TAOS_CHECK_EXIT(tDecodeI8(&decoder, &pReq->compactTimeOffset)); } else { - pReq->compactInterval = 0; - pReq->compactStartTime = 0; - pReq->compactEndTime = 0; - pReq->compactTimeOffset = 0; + pReq->compactInterval = TSDB_DEFAULT_COMPACT_INTERVAL; + pReq->compactStartTime = TSDB_DEFAULT_COMPACT_START_TIME; + pReq->compactEndTime = TSDB_DEFAULT_COMPACT_END_TIME; + pReq->compactTimeOffset = TSDB_DEFAULT_COMPACT_TIME_OFFSET; } tEndDecode(&decoder); @@ -5314,6 +5316,10 @@ int32_t tSerializeSDbCfgRspImpl(SEncoder *encoder, const SDbCfgRsp *pRsp) { TAOS_CHECK_RETURN(tEncodeI32(encoder, pRsp->s3KeepLocal)); TAOS_CHECK_RETURN(tEncodeI8(encoder, pRsp->s3Compact)); TAOS_CHECK_RETURN(tEncodeI8(encoder, pRsp->hashMethod)); + TAOS_CHECK_RETURN(tEncodeI32v(encoder, pRsp->compactInterval)); + TAOS_CHECK_RETURN(tEncodeI32v(encoder, pRsp->compactStartTime)); + TAOS_CHECK_RETURN(tEncodeI32v(encoder, pRsp->compactEndTime)); + TAOS_CHECK_RETURN(tEncodeI8(encoder, pRsp->compactTimeOffset)); return 0; } @@ -5389,27 +5395,40 @@ int32_t tDeserializeSDbCfgRspImpl(SDecoder *decoder, SDbCfgRsp *pRsp) { } TAOS_CHECK_RETURN(tDecodeI8(decoder, &pRsp->schemaless)); TAOS_CHECK_RETURN(tDecodeI16(decoder, &pRsp->sstTrigger)); - pRsp->keepTimeOffset = TSDB_DEFAULT_KEEP_TIME_OFFSET; if (!tDecodeIsEnd(decoder)) { TAOS_CHECK_RETURN(tDecodeI32(decoder, &pRsp->keepTimeOffset)); + } else { + pRsp->keepTimeOffset = TSDB_DEFAULT_KEEP_TIME_OFFSET; } - pRsp->withArbitrator = TSDB_DEFAULT_DB_WITH_ARBITRATOR; - pRsp->encryptAlgorithm = TSDB_DEFAULT_ENCRYPT_ALGO; - pRsp->s3ChunkSize = TSDB_DEFAULT_S3_CHUNK_SIZE; - pRsp->s3KeepLocal = TSDB_DEFAULT_S3_KEEP_LOCAL; - pRsp->s3Compact = TSDB_DEFAULT_S3_COMPACT; if (!tDecodeIsEnd(decoder)) { TAOS_CHECK_RETURN(tDecodeI8(decoder, &pRsp->withArbitrator)); TAOS_CHECK_RETURN(tDecodeI8(decoder, &pRsp->encryptAlgorithm)); TAOS_CHECK_RETURN(tDecodeI32(decoder, &pRsp->s3ChunkSize)); TAOS_CHECK_RETURN(tDecodeI32(decoder, &pRsp->s3KeepLocal)); TAOS_CHECK_RETURN(tDecodeI8(decoder, &pRsp->s3Compact)); + } else { + pRsp->withArbitrator = TSDB_DEFAULT_DB_WITH_ARBITRATOR; + pRsp->encryptAlgorithm = TSDB_DEFAULT_ENCRYPT_ALGO; + pRsp->s3ChunkSize = TSDB_DEFAULT_S3_CHUNK_SIZE; + pRsp->s3KeepLocal = TSDB_DEFAULT_S3_KEEP_LOCAL; + pRsp->s3Compact = TSDB_DEFAULT_S3_COMPACT; } if (!tDecodeIsEnd(decoder)) { TAOS_CHECK_RETURN(tDecodeI8(decoder, &pRsp->hashMethod)); } else { pRsp->hashMethod = 1; // default value } + if (!tDecodeIsEnd(decoder)) { + TAOS_CHECK_RETURN(tDecodeI32v(decoder, &pRsp->compactInterval)); + TAOS_CHECK_RETURN(tDecodeI32v(decoder, &pRsp->compactStartTime)); + TAOS_CHECK_RETURN(tDecodeI32v(decoder, &pRsp->compactEndTime)); + TAOS_CHECK_RETURN(tDecodeI8(decoder, &pRsp->compactTimeOffset)); + } else { + pRsp->compactInterval = TSDB_DEFAULT_COMPACT_INTERVAL; + pRsp->compactStartTime = TSDB_DEFAULT_COMPACT_START_TIME; + pRsp->compactEndTime = TSDB_DEFAULT_COMPACT_END_TIME; + pRsp->compactTimeOffset = TSDB_DEFAULT_COMPACT_TIME_OFFSET; + } return 0; } diff --git a/source/dnode/mnode/impl/inc/mndDef.h b/source/dnode/mnode/impl/inc/mndDef.h index 66b296dde4..3a47b87b8b 100644 --- a/source/dnode/mnode/impl/inc/mndDef.h +++ b/source/dnode/mnode/impl/inc/mndDef.h @@ -425,8 +425,8 @@ typedef struct { int8_t encryptAlgorithm; int8_t compactTimeOffset; int32_t compactInterval; - int64_t compactStartTime; - int64_t compactEndTime; + int32_t compactStartTime; + int32_t compactEndTime; } SDbCfg; typedef struct { diff --git a/source/dnode/mnode/impl/src/mndDb.c b/source/dnode/mnode/impl/src/mndDb.c index deddb22907..1c6c54de95 100644 --- a/source/dnode/mnode/impl/src/mndDb.c +++ b/source/dnode/mnode/impl/src/mndDb.c @@ -37,7 +37,7 @@ #include "tjson.h" #define DB_VER_NUMBER 1 -#define DB_RESERVE_SIZE 6 +#define DB_RESERVE_SIZE 14 static SSdbRow *mndDbActionDecode(SSdbRaw *pRaw); static int32_t mndDbActionInsert(SSdb *pSdb, SDbObj *pDb); @@ -152,8 +152,8 @@ SSdbRaw *mndDbActionEncode(SDbObj *pDb) { SDB_SET_INT8(pRaw, dataPos, pDb->cfg.encryptAlgorithm, _OVER) SDB_SET_INT32(pRaw, dataPos, pDb->tsmaVersion, _OVER); SDB_SET_INT8(pRaw, dataPos, pDb->cfg.compactTimeOffset, _OVER) - SDB_SET_INT64(pRaw, dataPos, pDb->cfg.compactStartTime, _OVER) - SDB_SET_INT64(pRaw, dataPos, pDb->cfg.compactEndTime, _OVER) + SDB_SET_INT32(pRaw, dataPos, pDb->cfg.compactStartTime, _OVER) + SDB_SET_INT32(pRaw, dataPos, pDb->cfg.compactEndTime, _OVER) SDB_SET_INT32(pRaw, dataPos, pDb->cfg.compactInterval, _OVER) SDB_SET_RESERVE(pRaw, dataPos, DB_RESERVE_SIZE, _OVER) @@ -255,8 +255,8 @@ static SSdbRow *mndDbActionDecode(SSdbRaw *pRaw) { SDB_GET_INT8(pRaw, dataPos, &pDb->cfg.encryptAlgorithm, _OVER) SDB_GET_INT32(pRaw, dataPos, &pDb->tsmaVersion, _OVER); SDB_GET_INT8(pRaw, dataPos, &pDb->cfg.compactTimeOffset, _OVER) - SDB_GET_INT64(pRaw, dataPos, &pDb->cfg.compactStartTime, _OVER) - SDB_GET_INT64(pRaw, dataPos, &pDb->cfg.compactEndTime, _OVER) + SDB_GET_INT32(pRaw, dataPos, &pDb->cfg.compactStartTime, _OVER) + SDB_GET_INT32(pRaw, dataPos, &pDb->cfg.compactEndTime, _OVER) SDB_GET_INT32(pRaw, dataPos, &pDb->cfg.compactInterval, _OVER) SDB_GET_RESERVE(pRaw, dataPos, DB_RESERVE_SIZE, _OVER) @@ -1413,6 +1413,10 @@ static void mndDumpDbCfgInfo(SDbCfgRsp *cfgRsp, SDbObj *pDb) { cfgRsp->s3Compact = pDb->cfg.s3Compact; cfgRsp->withArbitrator = pDb->cfg.withArbitrator; cfgRsp->encryptAlgorithm = pDb->cfg.encryptAlgorithm; + cfgRsp->compactInterval = pDb->cfg.compactInterval; + cfgRsp->compactStartTime = pDb->cfg.compactStartTime; + cfgRsp->compactEndTime = pDb->cfg.compactEndTime; + cfgRsp->compactTimeOffset = pDb->cfg.compactTimeOffset; } static int32_t mndProcessGetDbCfgReq(SRpcMsg *pReq) { diff --git a/source/libs/command/src/command.c b/source/libs/command/src/command.c index 353bc1fa18..ae1bcb461e 100644 --- a/source/libs/command/src/command.c +++ b/source/libs/command/src/command.c @@ -428,13 +428,15 @@ static int32_t setCreateDBResultIntoDataBlock(SSDataBlock* pBlock, char* dbName, "PRECISION '%s' REPLICA %d " "WAL_LEVEL %d VGROUPS %d SINGLE_STABLE %d TABLE_PREFIX %d TABLE_SUFFIX %d TSDB_PAGESIZE %d " "WAL_RETENTION_PERIOD %d WAL_RETENTION_SIZE %" PRId64 - " KEEP_TIME_OFFSET %d ENCRYPT_ALGORITHM '%s' S3_CHUNKPAGES %d S3_KEEPLOCAL %dm S3_COMPACT %d", + " KEEP_TIME_OFFSET %d ENCRYPT_ALGORITHM '%s' S3_CHUNKPAGES %d S3_KEEPLOCAL %dm S3_COMPACT %d " + "COMPACT_INTERVAL %d COMPACT_TIME_RANGE %d,%d COMPACT_TIME_OFFSET %"PRIi8, dbName, pCfg->buffer, pCfg->cacheSize, cacheModelStr(pCfg->cacheLast), pCfg->compression, durationStr, pCfg->walFsyncPeriod, pCfg->maxRows, pCfg->minRows, pCfg->sstTrigger, keep0Str, keep1Str, keep2Str, pCfg->pages, pCfg->pageSize, prec, pCfg->replications, pCfg->walLevel, pCfg->numOfVgroups, 1 == pCfg->numOfStables, hashPrefix, pCfg->hashSuffix, pCfg->tsdbPageSize, pCfg->walRetentionPeriod, pCfg->walRetentionSize, pCfg->keepTimeOffset, encryptAlgorithmStr(pCfg->encryptAlgorithm), - pCfg->s3ChunkSize, pCfg->s3KeepLocal, pCfg->s3Compact); + pCfg->s3ChunkSize, pCfg->s3KeepLocal, pCfg->s3Compact, pCfg->compactInterval, pCfg->compactStartTime, + pCfg->compactEndTime, pCfg->compactTimeOffset); if (pRetentions) { len += tsnprintf(buf2 + VARSTR_HEADER_SIZE + len, SHOW_CREATE_DB_RESULT_FIELD2_LEN - VARSTR_HEADER_SIZE, diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c index bf3345addc..6ebc720aa3 100755 --- a/source/libs/parser/src/parTranslater.c +++ b/source/libs/parser/src/parTranslater.c @@ -2002,7 +2002,7 @@ static int32_t parseBoolFromValueNode(STranslateContext* pCxt, SValueNode* pVal) static EDealRes translateDurationValue(STranslateContext* pCxt, SValueNode* pVal) { if (parseNatualDuration(pVal->literal, strlen(pVal->literal), &pVal->datum.i, &pVal->unit, - pVal->node.resType.precision, false) != TSDB_CODE_SUCCESS) { + pVal->node.resType.precision, true) != TSDB_CODE_SUCCESS) { return generateDealNodeErrMsg(pCxt, TSDB_CODE_PAR_WRONG_VALUE_TYPE, pVal->literal); } *(int64_t*)&pVal->typeData = pVal->datum.i; @@ -8099,7 +8099,7 @@ static int32_t checkDbCompactIntervalOption(STranslateContext* pCxt, SDatabaseOp } interval = getBigintFromValueNode(pOptions->pCompactIntervalNode); if (interval != 0) { - code = checkDbRangeOption(pCxt, "compact_interval", pOptions->compactInterval, TSDB_MIN_COMPACT_INTERVAL, + code = checkDbRangeOption(pCxt, "compact_interval", interval, TSDB_MIN_COMPACT_INTERVAL, pOptions->keep[2]); } } else if (pOptions->compactInterval != 0) { From fb029944a466b0af4fd3af4e79538fe4c567c9aa Mon Sep 17 00:00:00 2001 From: kailixu Date: Wed, 4 Dec 2024 15:46:42 +0800 Subject: [PATCH 41/55] feat: auto compact options for db --- include/libs/nodes/cmdnodes.h | 6 +++--- source/dnode/mnode/impl/src/mndDb.c | 8 ++++++++ source/libs/command/src/command.c | 14 ++++++++++---- source/libs/parser/src/parAstCreater.c | 6 +++++- source/libs/parser/src/parTranslater.c | 20 ++++++++++++-------- 5 files changed, 38 insertions(+), 16 deletions(-) diff --git a/include/libs/nodes/cmdnodes.h b/include/libs/nodes/cmdnodes.h index 4f76d00f9b..3f23de8c7d 100644 --- a/include/libs/nodes/cmdnodes.h +++ b/include/libs/nodes/cmdnodes.h @@ -111,13 +111,13 @@ typedef struct SDatabaseOptions { int8_t s3Compact; int8_t withArbitrator; // for auto-compact - SValueNode* pCompactIntervalNode; + int8_t compactTimeOffset; // hours int32_t compactInterval; // minutes - SNodeList* pCompactTimeRangeList; int32_t compactStartTime; // minutes int32_t compactEndTime; // minutes SValueNode* pCompactTimeOffsetNode; - int32_t compactTimeOffset; // hours + SValueNode* pCompactIntervalNode; + SNodeList* pCompactTimeRangeList; } SDatabaseOptions; typedef struct SCreateDatabaseStmt { diff --git a/source/dnode/mnode/impl/src/mndDb.c b/source/dnode/mnode/impl/src/mndDb.c index 1c6c54de95..f28de3f11a 100644 --- a/source/dnode/mnode/impl/src/mndDb.c +++ b/source/dnode/mnode/impl/src/mndDb.c @@ -1416,6 +1416,14 @@ static void mndDumpDbCfgInfo(SDbCfgRsp *cfgRsp, SDbObj *pDb) { cfgRsp->compactInterval = pDb->cfg.compactInterval; cfgRsp->compactStartTime = pDb->cfg.compactStartTime; cfgRsp->compactEndTime = pDb->cfg.compactEndTime; + if (cfgRsp->compactInterval > 0) { + if (cfgRsp->compactStartTime == 0) { + cfgRsp->compactStartTime = -cfgRsp->daysToKeep2; + } + if (cfgRsp->compactEndTime == 0) { + cfgRsp->compactEndTime = -cfgRsp->daysPerFile; + } + } cfgRsp->compactTimeOffset = pDb->cfg.compactTimeOffset; } diff --git a/source/libs/command/src/command.c b/source/libs/command/src/command.c index ae1bcb461e..33c0a2abee 100644 --- a/source/libs/command/src/command.c +++ b/source/libs/command/src/command.c @@ -411,11 +411,17 @@ static int32_t setCreateDBResultIntoDataBlock(SSDataBlock* pBlock, char* dbName, char keep0Str[128] = {0}; char keep1Str[128] = {0}; char keep2Str[128] = {0}; + char compactIntervalStr[13] = {0}; + char compactStartTimeStr[13] = {0}; + char compactEndTimeStr[13] = {0}; int32_t lenDuration = formatDurationOrKeep(durationStr, sizeof(durationStr), pCfg->daysPerFile); int32_t lenKeep0 = formatDurationOrKeep(keep0Str, sizeof(keep0Str), pCfg->daysToKeep0); int32_t lenKeep1 = formatDurationOrKeep(keep1Str, sizeof(keep1Str), pCfg->daysToKeep1); int32_t lenKeep2 = formatDurationOrKeep(keep2Str, sizeof(keep2Str), pCfg->daysToKeep2); + UNUSED(formatDurationOrKeep(compactIntervalStr, sizeof(compactIntervalStr), pCfg->compactInterval)); + UNUSED(formatDurationOrKeep(compactStartTimeStr, sizeof(compactStartTimeStr), pCfg->compactStartTime)); + UNUSED(formatDurationOrKeep(compactEndTimeStr, sizeof(compactEndTimeStr), pCfg->compactEndTime)); if (IS_SYS_DBNAME(dbName)) { len += tsnprintf(buf2 + VARSTR_HEADER_SIZE, SHOW_CREATE_DB_RESULT_FIELD2_LEN - VARSTR_HEADER_SIZE, @@ -428,15 +434,15 @@ static int32_t setCreateDBResultIntoDataBlock(SSDataBlock* pBlock, char* dbName, "PRECISION '%s' REPLICA %d " "WAL_LEVEL %d VGROUPS %d SINGLE_STABLE %d TABLE_PREFIX %d TABLE_SUFFIX %d TSDB_PAGESIZE %d " "WAL_RETENTION_PERIOD %d WAL_RETENTION_SIZE %" PRId64 - " KEEP_TIME_OFFSET %d ENCRYPT_ALGORITHM '%s' S3_CHUNKPAGES %d S3_KEEPLOCAL %dm S3_COMPACT %d " - "COMPACT_INTERVAL %d COMPACT_TIME_RANGE %d,%d COMPACT_TIME_OFFSET %"PRIi8, + " KEEP_TIME_OFFSET %dh ENCRYPT_ALGORITHM '%s' S3_CHUNKPAGES %d S3_KEEPLOCAL %dm S3_COMPACT %d " + "COMPACT_INTERVAL %s COMPACT_TIME_RANGE %s,%s COMPACT_TIME_OFFSET %"PRIi8 "h", dbName, pCfg->buffer, pCfg->cacheSize, cacheModelStr(pCfg->cacheLast), pCfg->compression, durationStr, pCfg->walFsyncPeriod, pCfg->maxRows, pCfg->minRows, pCfg->sstTrigger, keep0Str, keep1Str, keep2Str, pCfg->pages, pCfg->pageSize, prec, pCfg->replications, pCfg->walLevel, pCfg->numOfVgroups, 1 == pCfg->numOfStables, hashPrefix, pCfg->hashSuffix, pCfg->tsdbPageSize, pCfg->walRetentionPeriod, pCfg->walRetentionSize, pCfg->keepTimeOffset, encryptAlgorithmStr(pCfg->encryptAlgorithm), - pCfg->s3ChunkSize, pCfg->s3KeepLocal, pCfg->s3Compact, pCfg->compactInterval, pCfg->compactStartTime, - pCfg->compactEndTime, pCfg->compactTimeOffset); + pCfg->s3ChunkSize, pCfg->s3KeepLocal, pCfg->s3Compact, compactIntervalStr, compactStartTimeStr, + compactEndTimeStr, pCfg->compactTimeOffset); if (pRetentions) { len += tsnprintf(buf2 + VARSTR_HEADER_SIZE + len, SHOW_CREATE_DB_RESULT_FIELD2_LEN - VARSTR_HEADER_SIZE, diff --git a/source/libs/parser/src/parAstCreater.c b/source/libs/parser/src/parAstCreater.c index 75c3dcf2c4..ffcabca37f 100644 --- a/source/libs/parser/src/parAstCreater.c +++ b/source/libs/parser/src/parAstCreater.c @@ -2034,7 +2034,11 @@ static SNode* setDatabaseOptionImpl(SAstCreateContext* pCxt, SNode* pOptions, ED pDbOptions->pCompactTimeRangeList = pVal; break; case DB_OPTION_COMPACT_TIME_OFFSET: - pDbOptions->compactTimeOffset = taosStr2Int32(((SToken*)pVal)->z, NULL, 10); + if (TK_NK_INTEGER == ((SToken*)pVal)->type) { + pDbOptions->compactTimeOffset = taosStr2Int32(((SToken*)pVal)->z, NULL, 10); + } else { + pDbOptions->pCompactTimeOffsetNode = (SValueNode*)createDurationValueNode(pCxt, (SToken*)pVal); + } break; default: break; diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c index 6ebc720aa3..750b80835c 100755 --- a/source/libs/parser/src/parTranslater.c +++ b/source/libs/parser/src/parTranslater.c @@ -8172,15 +8172,19 @@ static int32_t checkDbCompactTimeRangeOption(STranslateContext* pCxt, SDatabaseO } static int32_t checkDbCompactTimeOffsetOption(STranslateContext* pCxt, SDatabaseOptions* pOptions) { - if (pOptions->compactTimeOffset < TSDB_MIN_COMPACT_TIME_OFFSET || - pOptions->compactTimeOffset > TSDB_MAX_COMPACT_TIME_OFFSET) { - return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_DB_OPTION, - "Invalid option compact_time_offset: %d" - ", valid range: [%d, %d]", - pOptions->compactTimeOffset, TSDB_MIN_COMPACT_TIME_OFFSET, - TSDB_MAX_COMPACT_TIME_OFFSET); + if (pOptions->pCompactTimeOffsetNode) { + if (DEAL_RES_ERROR == translateValue(pCxt, pOptions->pCompactTimeOffsetNode)) { + return pCxt->errCode; + } + if (TIME_UNIT_HOUR != pOptions->pCompactTimeOffsetNode->unit) { + return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_DB_OPTION, + "Invalid option compact_time_offset unit: %c, only %c allowed", + pOptions->pCompactTimeOffsetNode->unit, TIME_UNIT_HOUR); + } + pOptions->compactTimeOffset = getBigintFromValueNode(pOptions->pCompactTimeOffsetNode) / 60; } - return TSDB_CODE_SUCCESS; + return checkDbRangeOption(pCxt, "compact_time_offset", pOptions->compactTimeOffset, TSDB_MIN_COMPACT_TIME_OFFSET, + TSDB_MAX_COMPACT_TIME_OFFSET); } static int32_t checkDatabaseOptions(STranslateContext* pCxt, const char* pDbName, SDatabaseOptions* pOptions) { From 47071493690984143b4ec009112b81bf506bcfe7 Mon Sep 17 00:00:00 2001 From: kailixu Date: Wed, 4 Dec 2024 17:50:17 +0800 Subject: [PATCH 42/55] feat: dispatch auto compact req --- source/dnode/mnode/impl/src/mndCompact.c | 49 ++++++------------------ 1 file changed, 12 insertions(+), 37 deletions(-) diff --git a/source/dnode/mnode/impl/src/mndCompact.c b/source/dnode/mnode/impl/src/mndCompact.c index 5650fb5899..0647134547 100644 --- a/source/dnode/mnode/impl/src/mndCompact.c +++ b/source/dnode/mnode/impl/src/mndCompact.c @@ -891,58 +891,33 @@ static void mndCompactPullup(SMnode *pMnode) { taosArrayDestroy(pArray); } -static int32_t mndProcessAutoCompact(SRpcMsg *pReq) { +static int32_t mndCompactDispatch(SRpcMsg *pReq) { int32_t code = 0, lino = 0; SMnode *pMnode = pReq->info.node; SSdb *pSdb = pMnode->pSdb; int64_t now = taosGetTimestampMs(); - void *pDbIter = NULL; - while (1) { - SDbObj *pDb = NULL; - pDbIter = sdbFetch(pSdb, SDB_DB, pDbIter, (void **)&pDb); - if (pDbIter == NULL) break; - - if ((pDb->cfg.compactInterval == 0) || (pDb->cfg.compactStartTime == pDb->cfg.compactEndTime)) { - sdbRelease(pSdb, pDb); - continue; - } - - if (pDb->cfg.compactStartTime > pDb->cfg.compactEndTime) { - mWarn("db:%s compact start time is greater than end time", pDb->name); - sdbRelease(pSdb, pDb); - continue; - } - - // check if there is an unfinished compact task for this db - bool hasCompact = false; - void *pCompactIter = NULL; - while (1) { - SCompactObj *pCompact = NULL; - pCompactIter = sdbFetch(pSdb, SDB_COMPACT, pCompactIter, (void **)&pCompact); - if (pCompactIter == NULL) break; - if (0 == strncmp(pCompact->dbname, pDb->name, TSDB_DB_FNAME_LEN) == 0) { - hasCompact = true; - sdbRelease(pSdb, pCompact); - break; - } - sdbRelease(pSdb, pCompact); - } - if (hasCompact) { - mInfo("db:%s skip auto compact since unfinished compact task", pDb->name); + void *pDbIter = NULL; + SDbObj *pDb = NULL; + while ((pDbIter = sdbFetch(pSdb, SDB_DB, pDbIter, (void **)&pDb))) { + if ((pDb->cfg.compactInterval == 0) || (pDb->cfg.compactStartTime >= pDb->cfg.compactEndTime)) { sdbRelease(pSdb, pDb); continue; } + // mndCompactSendProgressReq(pMnode, pDb); sdbRelease(pSdb, pDb); } - - return 0; +_exit: + if (code) { + mWarn("failed to dispatch auto compact at line %d since %s", lino, tstrerror(code)); + } + return code; } static int32_t mndProcessCompactTimer(SRpcMsg *pReq) { mTrace("start to process compact timer"); mndCompactPullup(pReq->info.node); - TAOS_UNUSED(mndProcessAutoCompact(pReq)); + TAOS_UNUSED(mndCompactDispatch(pReq)); return 0; } From f4fc423f34c6ce7072ccc53b160fc7fb9c96ed5c Mon Sep 17 00:00:00 2001 From: kailixu Date: Wed, 4 Dec 2024 20:09:04 +0800 Subject: [PATCH 43/55] feat: dispatch db auto compact --- source/dnode/mnode/impl/inc/mndDef.h | 8 +- source/dnode/mnode/impl/src/mndCompact.c | 93 +++++++++++++++++++++--- 2 files changed, 88 insertions(+), 13 deletions(-) diff --git a/source/dnode/mnode/impl/inc/mndDef.h b/source/dnode/mnode/impl/inc/mndDef.h index 3a47b87b8b..2346e060f6 100644 --- a/source/dnode/mnode/impl/inc/mndDef.h +++ b/source/dnode/mnode/impl/inc/mndDef.h @@ -423,10 +423,10 @@ typedef struct { int8_t s3Compact; int8_t withArbitrator; int8_t encryptAlgorithm; - int8_t compactTimeOffset; - int32_t compactInterval; - int32_t compactStartTime; - int32_t compactEndTime; + int8_t compactTimeOffset; // hour + int32_t compactInterval; // minute + int32_t compactStartTime; // minute + int32_t compactEndTime; // minute } SDbCfg; typedef struct { diff --git a/source/dnode/mnode/impl/src/mndCompact.c b/source/dnode/mnode/impl/src/mndCompact.c index 0647134547..47ed48bb05 100644 --- a/source/dnode/mnode/impl/src/mndCompact.c +++ b/source/dnode/mnode/impl/src/mndCompact.c @@ -891,28 +891,103 @@ static void mndCompactPullup(SMnode *pMnode) { taosArrayDestroy(pArray); } +static int32_t mndCompactDispatchReq(SMnode *pMnode, SDnodeInfo *pDnodeInfo, int32_t contLen, void *pCont) { + // send grant status to dnode + SRpcMsg rpcMsg = { + .pCont = pCont, .contLen = contLen, .msgType = TDMT_MND_GRANT, .info.ahandle = (void *)0x818, .info.noResp = 1}; + + SEpSet epSet = {.numOfEps = 1}; + tstrncpy(epSet.eps[0].fqdn, pDnodeInfo->ep.fqdn, TSDB_FQDN_LEN); + epSet.eps[0].port = pDnodeInfo->ep.port; + + int32_t code = 0; + if ((code = tmsgSendReq(&epSet, &rpcMsg)) != 0) { + uWarn("failed to send grant status msg since %s", tstrerror(code)); + TAOS_RETURN(code); + } + + TAOS_RETURN(TSDB_CODE_SUCCESS); +} + +static int32_t mndCompactDispatchAudit(SMnode *pMnode, SRpcMsg *pReq, SDbObj *pDb, STimeWindow *tw) { + if (!tsEnableAudit || tsMonitorFqdn[0] == 0 || tsMonitorPort == 0) { + return 0; + } + + SName name = {0}; + int32_t sqlLen = 0; + char sql[256] = {0}; + char skeyStr[40] = {0}; + char ekeyStr[40] = {0}; + char *pDbName = pDb->name; + + if (tNameFromString(&name, pDb->name, T_NAME_ACCT | T_NAME_DB) == 0) { + pDbName = name.dbname; + } + + if (taosFormatUtcTime(skeyStr, sizeof(skeyStr), tw->skey, pDb->cfg.precision) == 0 && + taosFormatUtcTime(ekeyStr, sizeof(ekeyStr), tw->ekey, pDb->cfg.precision) == 0) { + sqlLen = tsnprintf(sql, sizeof(sql), "compact db %s start with '%s' end with '%s'", pDbName, skeyStr, ekeyStr); + } else { + sqlLen = tsnprintf(sql, sizeof(sql), "compact db %s start with %" PRIi64 " end with %" PRIi64, pDbName, tw->skey, + tw->ekey); + } + auditRecord(pReq, pMnode->clusterId, "autoCompactDB", name.dbname, "", sql, sqlLen); + + return 0; +} + +extern int32_t mndCompactDb(SMnode *pMnode, SRpcMsg *pReq, SDbObj *pDb, STimeWindow tw, SArray *vgroupIds); static int32_t mndCompactDispatch(SRpcMsg *pReq) { - int32_t code = 0, lino = 0; + int32_t code = 0; SMnode *pMnode = pReq->info.node; SSdb *pSdb = pMnode->pSdb; int64_t now = taosGetTimestampMs(); + int64_t nowSec = now / 60000; - void *pDbIter = NULL; + void *pIter = NULL; SDbObj *pDb = NULL; - while ((pDbIter = sdbFetch(pSdb, SDB_DB, pDbIter, (void **)&pDb))) { + while ((pIter = sdbFetch(pSdb, SDB_DB, pIter, (void **)&pDb))) { if ((pDb->cfg.compactInterval == 0) || (pDb->cfg.compactStartTime >= pDb->cfg.compactEndTime)) { sdbRelease(pSdb, pDb); continue; } - // mndCompactSendProgressReq(pMnode, pDb); + if (pDb->compactStartTime == nowSec) { + assert(0); + sdbRelease(pSdb, pDb); + continue; + } + + if (((nowSec + pDb->cfg.compactTimeOffset) % pDb->cfg.compactInterval) != 0) { + sdbRelease(pSdb, pDb); + continue; + } + + STimeWindow tw = {.skey = convertTimePrecision(now - (int64_t)pDb->cfg.compactStartTime * 60000, + TSDB_TIME_PRECISION_MILLI, pDb->cfg.precision), + .ekey = convertTimePrecision(now - (int64_t)pDb->cfg.compactEndTime * 60000, + TSDB_TIME_PRECISION_MILLI, pDb->cfg.precision)}; + + if ((code = mndCompactDb(pMnode, pReq, pDb, tw, NULL)) == 0) { + pDb->compactStartTime = nowSec; + mInfo("db:%s, dispatch auto compact with range:[%" PRIi64 ",%" PRIi64 + "], interval:%d, start:%d, end:%d, offset:%" PRIi8, + pDb->name, tw.skey, tw.ekey, pDb->cfg.compactInterval, pDb->cfg.compactStartTime, pDb->cfg.compactEndTime, + pDb->cfg.compactTimeOffset); + } else { + mWarn("db:%s, failed to dispatch auto compact with range:[%" PRIi64 ",%" PRIi64 + "], interval:%d, start:%d, end:%d, offset:%" PRIi8 ", since %s", + pDb->name, tw.skey, tw.ekey, pDb->cfg.compactInterval, pDb->cfg.compactStartTime, pDb->cfg.compactEndTime, + pDb->cfg.compactTimeOffset, tstrerror(code)); + } + + TAOS_UNUSED(mndCompactDispatchAudit(pMnode, pReq, pDb, &tw)); + sdbRelease(pSdb, pDb); } -_exit: - if (code) { - mWarn("failed to dispatch auto compact at line %d since %s", lino, tstrerror(code)); - } - return code; + + return 0; } static int32_t mndProcessCompactTimer(SRpcMsg *pReq) { From a3dc026c0de75f32d2db1af21c95212b05274466 Mon Sep 17 00:00:00 2001 From: kailixu Date: Thu, 5 Dec 2024 10:33:51 +0800 Subject: [PATCH 44/55] feat: db auto compact --- include/util/tdef.h | 4 +-- source/dnode/mnode/impl/src/mndCompact.c | 41 ++++++++++++++---------- 2 files changed, 26 insertions(+), 19 deletions(-) diff --git a/include/util/tdef.h b/include/util/tdef.h index 68a8b281ec..4c1b263755 100644 --- a/include/util/tdef.h +++ b/include/util/tdef.h @@ -507,8 +507,8 @@ typedef enum ELogicConditionType { #define TSDB_DEFAULT_TABLE_TTL 0 #define TSDB_DEFAULT_COMPACT_INTERVAL 0 -#define TSDB_MIN_COMPACT_INTERVAL 10 // unit minute -#define TSDB_MAX_COMPACT_INTERVAL TSDB_MAX_KEEP // unit minute +#define TSDB_MIN_COMPACT_INTERVAL 10 // unit minute +#define TSDB_MAX_COMPACT_INTERVAL TSDB_MAX_KEEP // unit minute #define TSDB_DEFAULT_COMPACT_START_TIME 0 #define TSDB_DEFAULT_COMPACT_END_TIME 0 #define TSDB_MIN_COMPACT_TIME_OFFSET 0 diff --git a/source/dnode/mnode/impl/src/mndCompact.c b/source/dnode/mnode/impl/src/mndCompact.c index 47ed48bb05..cbc584eb1e 100644 --- a/source/dnode/mnode/impl/src/mndCompact.c +++ b/source/dnode/mnode/impl/src/mndCompact.c @@ -942,57 +942,64 @@ static int32_t mndCompactDispatch(SRpcMsg *pReq) { int32_t code = 0; SMnode *pMnode = pReq->info.node; SSdb *pSdb = pMnode->pSdb; - int64_t now = taosGetTimestampMs(); - int64_t nowSec = now / 60000; + int64_t curMs = taosGetTimestampMs(); + int64_t curMin = curMs / 60000LL; void *pIter = NULL; SDbObj *pDb = NULL; while ((pIter = sdbFetch(pSdb, SDB_DB, pIter, (void **)&pDb))) { if ((pDb->cfg.compactInterval == 0) || (pDb->cfg.compactStartTime >= pDb->cfg.compactEndTime)) { + mDebug("db:%p,%s, compact interval is %dm or start time:%dm >= end time:%dm, skip", pDb, pDb->name, + pDb->cfg.compactInterval, pDb->cfg.compactStartTime, pDb->cfg.compactEndTime); sdbRelease(pSdb, pDb); continue; } - if (pDb->compactStartTime == nowSec) { - assert(0); + int64_t remainder = ((curMin + (int64_t)pDb->cfg.compactTimeOffset * 60LL) % pDb->cfg.compactInterval); + if (remainder != 0) { + mDebug("db:%p,%s, current time:%" PRIi64 "m is not divisible by compact interval:%dm, offset:%" PRIi8 + "h, remainder:%" PRIi64 "m, skip", + pDb, pDb->name, curMin, pDb->cfg.compactInterval, pDb->cfg.compactTimeOffset, remainder); sdbRelease(pSdb, pDb); continue; } - if (((nowSec + pDb->cfg.compactTimeOffset) % pDb->cfg.compactInterval) != 0) { + if ((pDb->compactStartTime / 60000LL) == curMin) { + mDebug("db:%p:%s, compact has already been dispatched at %" PRIi64 "m(%" PRIi64 "ms), skip", pDb, pDb->name, + curMin, pDb->compactStartTime); sdbRelease(pSdb, pDb); continue; } - STimeWindow tw = {.skey = convertTimePrecision(now - (int64_t)pDb->cfg.compactStartTime * 60000, + STimeWindow tw = {.skey = convertTimePrecision(curMs + (int64_t)pDb->cfg.compactStartTime * 60000LL, TSDB_TIME_PRECISION_MILLI, pDb->cfg.precision), - .ekey = convertTimePrecision(now - (int64_t)pDb->cfg.compactEndTime * 60000, + .ekey = convertTimePrecision(curMs + (int64_t)pDb->cfg.compactEndTime * 60000LL, TSDB_TIME_PRECISION_MILLI, pDb->cfg.precision)}; if ((code = mndCompactDb(pMnode, pReq, pDb, tw, NULL)) == 0) { - pDb->compactStartTime = nowSec; - mInfo("db:%s, dispatch auto compact with range:[%" PRIi64 ",%" PRIi64 - "], interval:%d, start:%d, end:%d, offset:%" PRIi8, - pDb->name, tw.skey, tw.ekey, pDb->cfg.compactInterval, pDb->cfg.compactStartTime, pDb->cfg.compactEndTime, - pDb->cfg.compactTimeOffset); + mInfo("db:%p,%s, succeed to dispatch compact with range:[%" PRIi64 ",%" PRIi64 + "], interval:%dm, start:%dm, end:%dm, offset:%" PRIi8 "h", + pDb, pDb->name, tw.skey, tw.ekey, pDb->cfg.compactInterval, pDb->cfg.compactStartTime, + pDb->cfg.compactEndTime, pDb->cfg.compactTimeOffset); } else { - mWarn("db:%s, failed to dispatch auto compact with range:[%" PRIi64 ",%" PRIi64 - "], interval:%d, start:%d, end:%d, offset:%" PRIi8 ", since %s", - pDb->name, tw.skey, tw.ekey, pDb->cfg.compactInterval, pDb->cfg.compactStartTime, pDb->cfg.compactEndTime, - pDb->cfg.compactTimeOffset, tstrerror(code)); + mWarn("db:%p,%s, failed to dispatch compact with range:[%" PRIi64 ",%" PRIi64 + "], interval:%dm, start:%dm, end:%dm, offset:%" PRIi8 "h, since %s", + pDb, pDb->name, tw.skey, tw.ekey, pDb->cfg.compactInterval, pDb->cfg.compactStartTime, + pDb->cfg.compactEndTime, pDb->cfg.compactTimeOffset, tstrerror(code)); } TAOS_UNUSED(mndCompactDispatchAudit(pMnode, pReq, pDb, &tw)); sdbRelease(pSdb, pDb); } - return 0; } static int32_t mndProcessCompactTimer(SRpcMsg *pReq) { +#ifdef TD_ENTERPRISE mTrace("start to process compact timer"); mndCompactPullup(pReq->info.node); TAOS_UNUSED(mndCompactDispatch(pReq)); +#endif return 0; } From 615f7f395fd6e4ae9f26d27561606e229a8d02e3 Mon Sep 17 00:00:00 2001 From: kailixu Date: Thu, 5 Dec 2024 10:52:11 +0800 Subject: [PATCH 45/55] enh: default compact start and end time if compact interval is not zero --- source/dnode/mnode/impl/src/mndCompact.c | 38 ++++++++++++++---------- 1 file changed, 23 insertions(+), 15 deletions(-) diff --git a/source/dnode/mnode/impl/src/mndCompact.c b/source/dnode/mnode/impl/src/mndCompact.c index cbc584eb1e..de143533f3 100644 --- a/source/dnode/mnode/impl/src/mndCompact.c +++ b/source/dnode/mnode/impl/src/mndCompact.c @@ -948,9 +948,18 @@ static int32_t mndCompactDispatch(SRpcMsg *pReq) { void *pIter = NULL; SDbObj *pDb = NULL; while ((pIter = sdbFetch(pSdb, SDB_DB, pIter, (void **)&pDb))) { - if ((pDb->cfg.compactInterval == 0) || (pDb->cfg.compactStartTime >= pDb->cfg.compactEndTime)) { - mDebug("db:%p,%s, compact interval is %dm or start time:%dm >= end time:%dm, skip", pDb, pDb->name, - pDb->cfg.compactInterval, pDb->cfg.compactStartTime, pDb->cfg.compactEndTime); + if (pDb->cfg.compactInterval <= 0) { + mDebug("db:%p,%s, compact interval is %dm, skip", pDb, pDb->name, pDb->cfg.compactInterval); + sdbRelease(pSdb, pDb); + continue; + } + + int64_t compactStartTime = pDb->cfg.compactStartTime ? pDb->cfg.compactStartTime : -pDb->cfg.daysToKeep2; + int64_t compactEndTime = pDb->cfg.compactEndTime ? pDb->cfg.compactEndTime : -pDb->cfg.daysPerFile; + + if (compactStartTime >= compactEndTime) { + mDebug("db:%p,%s, compact start time:%" PRIi64 "m >= end time:%" PRIi64 "m, skip", pDb, pDb->name, + compactStartTime, compactEndTime); sdbRelease(pSdb, pDb); continue; } @@ -971,21 +980,20 @@ static int32_t mndCompactDispatch(SRpcMsg *pReq) { continue; } - STimeWindow tw = {.skey = convertTimePrecision(curMs + (int64_t)pDb->cfg.compactStartTime * 60000LL, - TSDB_TIME_PRECISION_MILLI, pDb->cfg.precision), - .ekey = convertTimePrecision(curMs + (int64_t)pDb->cfg.compactEndTime * 60000LL, - TSDB_TIME_PRECISION_MILLI, pDb->cfg.precision)}; + STimeWindow tw = { + .skey = convertTimePrecision(curMs + compactStartTime * 60000LL, TSDB_TIME_PRECISION_MILLI, pDb->cfg.precision), + .ekey = convertTimePrecision(curMs + compactEndTime * 60000LL, TSDB_TIME_PRECISION_MILLI, pDb->cfg.precision)}; if ((code = mndCompactDb(pMnode, pReq, pDb, tw, NULL)) == 0) { - mInfo("db:%p,%s, succeed to dispatch compact with range:[%" PRIi64 ",%" PRIi64 - "], interval:%dm, start:%dm, end:%dm, offset:%" PRIi8 "h", - pDb, pDb->name, tw.skey, tw.ekey, pDb->cfg.compactInterval, pDb->cfg.compactStartTime, - pDb->cfg.compactEndTime, pDb->cfg.compactTimeOffset); + mInfo("db:%p,%s, succeed to dispatch compact with range:[%" PRIi64 ",%" PRIi64 "], interval:%dm, start:%" PRIi64 + "m, end:%" PRIi64 "m, offset:%" PRIi8 "h", + pDb, pDb->name, tw.skey, tw.ekey, pDb->cfg.compactInterval, compactStartTime, compactEndTime, + pDb->cfg.compactTimeOffset); } else { - mWarn("db:%p,%s, failed to dispatch compact with range:[%" PRIi64 ",%" PRIi64 - "], interval:%dm, start:%dm, end:%dm, offset:%" PRIi8 "h, since %s", - pDb, pDb->name, tw.skey, tw.ekey, pDb->cfg.compactInterval, pDb->cfg.compactStartTime, - pDb->cfg.compactEndTime, pDb->cfg.compactTimeOffset, tstrerror(code)); + mWarn("db:%p,%s, failed to dispatch compact with range:[%" PRIi64 ",%" PRIi64 "], interval:%dm, start:%" PRIi64 + "m, end:%" PRIi64 "m, offset:%" PRIi8 "h, since %s", + pDb, pDb->name, tw.skey, tw.ekey, pDb->cfg.compactInterval, compactStartTime, compactEndTime, + pDb->cfg.compactTimeOffset, tstrerror(code)); } TAOS_UNUSED(mndCompactDispatchAudit(pMnode, pReq, pDb, &tw)); From a6e86619b0a3ad4a6cb858a8d2bfb16c9d14758b Mon Sep 17 00:00:00 2001 From: kailixu Date: Thu, 5 Dec 2024 13:06:53 +0800 Subject: [PATCH 46/55] feat: database auto compact --- source/dnode/mnode/impl/src/mndCompact.c | 8 ++++++++ source/libs/parser/inc/sql.y | 1 + 2 files changed, 9 insertions(+) diff --git a/source/dnode/mnode/impl/src/mndCompact.c b/source/dnode/mnode/impl/src/mndCompact.c index de143533f3..3c70727cbc 100644 --- a/source/dnode/mnode/impl/src/mndCompact.c +++ b/source/dnode/mnode/impl/src/mndCompact.c @@ -954,6 +954,14 @@ static int32_t mndCompactDispatch(SRpcMsg *pReq) { continue; } + // daysToKeep2 would change after compactEndTime is set + if (pDb->cfg.compactEndTime && (pDb->cfg.compactEndTime <= -pDb->cfg.daysToKeep2)) { + mWarn("db:%p,%s, compact end time:%dm <= -keep2:%dm , skip", pDb, pDb->name, pDb->cfg.compactEndTime, + -pDb->cfg.daysToKeep2); + sdbRelease(pSdb, pDb); + continue; + } + int64_t compactStartTime = pDb->cfg.compactStartTime ? pDb->cfg.compactStartTime : -pDb->cfg.daysToKeep2; int64_t compactEndTime = pDb->cfg.compactEndTime ? pDb->cfg.compactEndTime : -pDb->cfg.daysPerFile; diff --git a/source/libs/parser/inc/sql.y b/source/libs/parser/inc/sql.y index f47db6be20..c24ebf2221 100644 --- a/source/libs/parser/inc/sql.y +++ b/source/libs/parser/inc/sql.y @@ -334,6 +334,7 @@ alter_db_option(A) ::= COMPACT_INTERVAL NK_VARIABLE(B). alter_db_option(A) ::= COMPACT_TIME_RANGE signed_integer_list(B). { A.type = DB_OPTION_COMPACT_TIME_RANGE; A.pList = B; } alter_db_option(A) ::= COMPACT_TIME_RANGE signed_variable_list(B). { A.type = DB_OPTION_COMPACT_TIME_RANGE; A.pList = B; } alter_db_option(A) ::= COMPACT_TIME_OFFSET NK_INTEGER(B). { A.type = DB_OPTION_COMPACT_TIME_OFFSET; A.val = B; } +alter_db_option(A) ::= COMPACT_TIME_OFFSET NK_VARIABLE(B). { A.type = DB_OPTION_COMPACT_TIME_OFFSET; A.val = B; } %type integer_list { SNodeList* } %destructor integer_list { nodesDestroyList($$); } From 03e051ee633611d0812b382e5f03c1ebabee5763 Mon Sep 17 00:00:00 2001 From: kailixu Date: Thu, 5 Dec 2024 17:15:23 +0800 Subject: [PATCH 47/55] feat: dispatch auto compact --- include/libs/nodes/cmdnodes.h | 10 ++-- source/dnode/mnode/impl/src/mndCompact.c | 4 +- source/dnode/mnode/impl/src/mndDb.c | 12 ++-- source/libs/nodes/src/nodesUtilFuncs.c | 14 +++-- source/libs/parser/src/parTranslater.c | 74 +++++++++++++++--------- 5 files changed, 72 insertions(+), 42 deletions(-) diff --git a/include/libs/nodes/cmdnodes.h b/include/libs/nodes/cmdnodes.h index 3f23de8c7d..eccfe17ddc 100644 --- a/include/libs/nodes/cmdnodes.h +++ b/include/libs/nodes/cmdnodes.h @@ -111,13 +111,15 @@ typedef struct SDatabaseOptions { int8_t s3Compact; int8_t withArbitrator; // for auto-compact - int8_t compactTimeOffset; // hours - int32_t compactInterval; // minutes - int32_t compactStartTime; // minutes - int32_t compactEndTime; // minutes + int8_t compactTimeOffset; // hours + int32_t compactInterval; // minutes + int32_t compactStartTime; // minutes + int32_t compactEndTime; // minutes SValueNode* pCompactTimeOffsetNode; SValueNode* pCompactIntervalNode; SNodeList* pCompactTimeRangeList; + // for cache + SDbCfgInfo* pDbCfg; } SDatabaseOptions; typedef struct SCreateDatabaseStmt { diff --git a/source/dnode/mnode/impl/src/mndCompact.c b/source/dnode/mnode/impl/src/mndCompact.c index 3c70727cbc..6324d0727f 100644 --- a/source/dnode/mnode/impl/src/mndCompact.c +++ b/source/dnode/mnode/impl/src/mndCompact.c @@ -932,7 +932,7 @@ static int32_t mndCompactDispatchAudit(SMnode *pMnode, SRpcMsg *pReq, SDbObj *pD sqlLen = tsnprintf(sql, sizeof(sql), "compact db %s start with %" PRIi64 " end with %" PRIi64, pDbName, tw->skey, tw->ekey); } - auditRecord(pReq, pMnode->clusterId, "autoCompactDB", name.dbname, "", sql, sqlLen); + auditRecord(NULL, pMnode->clusterId, "autoCompactDB", name.dbname, "", sql, sqlLen); return 0; } @@ -992,7 +992,7 @@ static int32_t mndCompactDispatch(SRpcMsg *pReq) { .skey = convertTimePrecision(curMs + compactStartTime * 60000LL, TSDB_TIME_PRECISION_MILLI, pDb->cfg.precision), .ekey = convertTimePrecision(curMs + compactEndTime * 60000LL, TSDB_TIME_PRECISION_MILLI, pDb->cfg.precision)}; - if ((code = mndCompactDb(pMnode, pReq, pDb, tw, NULL)) == 0) { + if ((code = mndCompactDb(pMnode, NULL, pDb, tw, NULL)) == 0) { mInfo("db:%p,%s, succeed to dispatch compact with range:[%" PRIi64 ",%" PRIi64 "], interval:%dm, start:%" PRIi64 "m, end:%" PRIi64 "m, offset:%" PRIi8 "h", pDb, pDb->name, tw.skey, tw.ekey, pDb->cfg.compactInterval, compactStartTime, compactEndTime, diff --git a/source/dnode/mnode/impl/src/mndDb.c b/source/dnode/mnode/impl/src/mndDb.c index f28de3f11a..2347de6cbc 100644 --- a/source/dnode/mnode/impl/src/mndDb.c +++ b/source/dnode/mnode/impl/src/mndDb.c @@ -1154,26 +1154,28 @@ static int32_t mndSetDbCfgFromAlterDbReq(SDbObj *pDb, SAlterDbReq *pAlter) { code = 0; } - if (pAlter->compactInterval != TSDB_DEFAULT_COMPACT_INTERVAL && pAlter->compactInterval != pDb->cfg.compactInterval) { + if (pAlter->compactInterval >= TSDB_DEFAULT_COMPACT_INTERVAL && pAlter->compactInterval != pDb->cfg.compactInterval) { pDb->cfg.compactInterval = pAlter->compactInterval; pDb->vgVersion++; code = 0; } - if (pAlter->compactStartTime != TSDB_DEFAULT_COMPACT_START_TIME && - pAlter->compactStartTime != pDb->cfg.compactStartTime) { + if (pAlter->compactStartTime != pDb->cfg.compactStartTime && + (pAlter->compactStartTime == TSDB_DEFAULT_COMPACT_START_TIME || + pAlter->compactStartTime <= -pDb->cfg.daysPerFile)) { pDb->cfg.compactStartTime = pAlter->compactStartTime; pDb->vgVersion++; code = 0; } - if (pAlter->compactEndTime != TSDB_DEFAULT_COMPACT_END_TIME && pAlter->compactEndTime != pDb->cfg.compactEndTime) { + if (pAlter->compactEndTime != pDb->cfg.compactEndTime && + (pAlter->compactEndTime == TSDB_DEFAULT_COMPACT_END_TIME || pAlter->compactEndTime <= -pDb->cfg.daysPerFile)) { pDb->cfg.compactEndTime = pAlter->compactEndTime; pDb->vgVersion++; code = 0; } - if (pAlter->compactTimeOffset != TSDB_DEFAULT_COMPACT_TIME_OFFSET && + if (pAlter->compactTimeOffset >= TSDB_MIN_COMPACT_TIME_OFFSET && pAlter->compactTimeOffset != pDb->cfg.compactTimeOffset) { pDb->cfg.compactTimeOffset = pAlter->compactTimeOffset; pDb->vgVersion++; diff --git a/source/libs/nodes/src/nodesUtilFuncs.c b/source/libs/nodes/src/nodesUtilFuncs.c index 50f798bc23..466275b397 100644 --- a/source/libs/nodes/src/nodesUtilFuncs.c +++ b/source/libs/nodes/src/nodesUtilFuncs.c @@ -1327,14 +1327,20 @@ void nodesDestroyNode(SNode* pNode) { } break; } - case QUERY_NODE_CREATE_DATABASE_STMT: - nodesDestroyNode((SNode*)((SCreateDatabaseStmt*)pNode)->pOptions); + case QUERY_NODE_CREATE_DATABASE_STMT: { + SDatabaseOptions* pOptions = ((SCreateDatabaseStmt*)pNode)->pOptions; + taosMemoryFreeClear(pOptions->pDbCfg); + nodesDestroyNode((SNode*)pOptions); break; + } case QUERY_NODE_DROP_DATABASE_STMT: // no pointer field break; - case QUERY_NODE_ALTER_DATABASE_STMT: - nodesDestroyNode((SNode*)((SAlterDatabaseStmt*)pNode)->pOptions); + case QUERY_NODE_ALTER_DATABASE_STMT: { + SDatabaseOptions* pOptions = ((SAlterDatabaseStmt*)pNode)->pOptions; + taosMemoryFreeClear(pOptions->pDbCfg); + nodesDestroyNode((SNode*)pOptions); break; + } case QUERY_NODE_FLUSH_DATABASE_STMT: // no pointer field case QUERY_NODE_TRIM_DATABASE_STMT: // no pointer field break; diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c index 750b80835c..696d96adb0 100755 --- a/source/libs/parser/src/parTranslater.c +++ b/source/libs/parser/src/parTranslater.c @@ -8045,6 +8045,16 @@ static int32_t checkDbTbPrefixSuffixOptions(STranslateContext* pCxt, int32_t tbP return TSDB_CODE_SUCCESS; } +static FORCE_INLINE int32_t translateGetDbCfg(STranslateContext* pCxt, const char* pDbName, SDbCfgInfo** ppDbCfg) { + if (*ppDbCfg) { + return TSDB_CODE_SUCCESS; + } + if (!(*ppDbCfg = taosMemoryCalloc(1, sizeof(SDbCfgInfo)))) { + return terrno; + } + return getDBCfg(pCxt, pDbName, *ppDbCfg); +} + static int32_t checkOptionsDependency(STranslateContext* pCxt, const char* pDbName, SDatabaseOptions* pOptions) { int32_t daysPerFile = pOptions->daysPerFile; int32_t s3KeepLocal = pOptions->s3KeepLocal; @@ -8052,13 +8062,9 @@ static int32_t checkOptionsDependency(STranslateContext* pCxt, const char* pDbNa if (-1 == daysPerFile && -1 == daysToKeep0) { return TSDB_CODE_SUCCESS; } else if (-1 == daysPerFile || -1 == daysToKeep0) { - SDbCfgInfo dbCfg = {0}; - int32_t code = getDBCfg(pCxt, pDbName, &dbCfg); - if (TSDB_CODE_SUCCESS != code) { - return code; - } - daysPerFile = (-1 == daysPerFile ? dbCfg.daysPerFile : daysPerFile); - daysToKeep0 = (-1 == daysToKeep0 ? dbCfg.daysToKeep0 : daysToKeep0); + TAOS_CHECK_RETURN(translateGetDbCfg(pCxt, pDbName, &pOptions->pDbCfg)); + daysPerFile = (-1 == daysPerFile ? pOptions->pDbCfg->daysPerFile : daysPerFile); + daysToKeep0 = (-1 == daysToKeep0 ? pOptions->pDbCfg->daysToKeep0 : daysToKeep0); } if (daysPerFile > daysToKeep0 / 3) { return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_DB_OPTION, @@ -8082,9 +8088,11 @@ static int32_t checkOptionsDependency(STranslateContext* pCxt, const char* pDbNa return TSDB_CODE_SUCCESS; } -static int32_t checkDbCompactIntervalOption(STranslateContext* pCxt, SDatabaseOptions* pOptions) { +static int32_t checkDbCompactIntervalOption(STranslateContext* pCxt, const char* pDbName, SDatabaseOptions* pOptions) { int32_t code = 0; int64_t interval = 0; + int32_t keep2 = pOptions->keep[2]; + if (NULL != pOptions->pCompactIntervalNode) { if (DEAL_RES_ERROR == translateValue(pCxt, pOptions->pCompactIntervalNode)) { return pCxt->errCode; @@ -8099,18 +8107,25 @@ static int32_t checkDbCompactIntervalOption(STranslateContext* pCxt, SDatabaseOp } interval = getBigintFromValueNode(pOptions->pCompactIntervalNode); if (interval != 0) { - code = checkDbRangeOption(pCxt, "compact_interval", interval, TSDB_MIN_COMPACT_INTERVAL, - pOptions->keep[2]); + if (keep2 == -1) { // alter db + TAOS_CHECK_RETURN(translateGetDbCfg(pCxt, pDbName, &pOptions->pDbCfg)); + keep2 = pOptions->pDbCfg->daysToKeep2; + } + code = checkDbRangeOption(pCxt, "compact_interval", interval, TSDB_MIN_COMPACT_INTERVAL, keep2); } - } else if (pOptions->compactInterval != 0) { + } else if (pOptions->compactInterval > 0) { interval = pOptions->compactInterval * 1440; // convert to minutes - code = checkDbRangeOption(pCxt, "compact_interval", interval, TSDB_MIN_COMPACT_INTERVAL, pOptions->keep[2]); + if (keep2 == -1) { // alter db + TAOS_CHECK_RETURN(translateGetDbCfg(pCxt, pDbName, &pOptions->pDbCfg)); + keep2 = pOptions->pDbCfg->daysToKeep2; + } + code = checkDbRangeOption(pCxt, "compact_interval", interval, TSDB_MIN_COMPACT_INTERVAL, keep2); } if (code == 0) pOptions->compactInterval = interval; return code; } -static int32_t checkDbCompactTimeRangeOption(STranslateContext* pCxt, SDatabaseOptions* pOptions) { +static int32_t checkDbCompactTimeRangeOption(STranslateContext* pCxt, const char* pDbName, SDatabaseOptions* pOptions) { if (NULL == pOptions->pCompactTimeRangeList) { return TSDB_CODE_SUCCESS; } @@ -8155,17 +8170,23 @@ static int32_t checkDbCompactTimeRangeOption(STranslateContext* pCxt, SDatabaseO "Invalid option compact_time_range: %dm,%dm, start time should be less than end time", pOptions->compactStartTime, pOptions->compactEndTime); } - if (pOptions->compactStartTime < -pOptions->keep[2] || pOptions->compactStartTime > -pOptions->daysPerFile) { - return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_DB_OPTION, - "Invalid option compact_time_range: %dm, start_time should be in range: [%" PRIi64 - "m, %dm]", - pOptions->compactStartTime, -pOptions->keep[2], -pOptions->daysPerFile); + + int32_t keep2 = pOptions->keep[2]; + int32_t days = pOptions->daysPerFile; + if (keep2 == -1 || days == -1) { // alter db + TAOS_CHECK_RETURN(translateGetDbCfg(pCxt, pDbName, &pOptions->pDbCfg)); + keep2 = pOptions->pDbCfg->daysToKeep2; + days = pOptions->pDbCfg->daysPerFile; } - if (pOptions->compactEndTime < -pOptions->keep[2] || pOptions->compactEndTime > -pOptions->daysPerFile) { + if (pOptions->compactStartTime < -keep2 || pOptions->compactStartTime > -days) { return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_DB_OPTION, - "Invalid option compact_time_range: %dm, end time should be in range: [%" PRIi64 - "m, %dm]", - pOptions->compactEndTime, -pOptions->keep[2], -pOptions->daysPerFile); + "Invalid option compact_time_range: %dm, start_time should be in range: [%dm, %dm]", + pOptions->compactStartTime, -keep2, -days); + } + if (pOptions->compactEndTime < -keep2 || pOptions->compactEndTime > -days) { + return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_DB_OPTION, + "Invalid option compact_time_range: %dm, end time should be in range: [%dm, %dm]", + pOptions->compactEndTime, -keep2, -days); } return TSDB_CODE_SUCCESS; @@ -8304,10 +8325,10 @@ static int32_t checkDatabaseOptions(STranslateContext* pCxt, const char* pDbName code = checkDbRangeOption(pCxt, "s3_compact", pOptions->s3Compact, TSDB_MIN_S3_COMPACT, TSDB_MAX_S3_COMPACT); } if (TSDB_CODE_SUCCESS == code) { - code = checkDbCompactIntervalOption(pCxt, pOptions); + code = checkDbCompactIntervalOption(pCxt, pDbName, pOptions); } if (TSDB_CODE_SUCCESS == code) { - code = checkDbCompactTimeRangeOption(pCxt, pOptions); + code = checkDbCompactTimeRangeOption(pCxt, pDbName, pOptions); } if (TSDB_CODE_SUCCESS == code) { code = checkDbCompactTimeOffsetOption(pCxt, pOptions); @@ -8557,9 +8578,8 @@ static int32_t buildAlterDbReq(STranslateContext* pCxt, SAlterDatabaseStmt* pStm static int32_t translateAlterDatabase(STranslateContext* pCxt, SAlterDatabaseStmt* pStmt) { if (pStmt->pOptions->walLevel == 0) { - SDbCfgInfo dbCfg = {0}; - int32_t code = getDBCfg(pCxt, pStmt->dbName, &dbCfg); - if (TSDB_CODE_SUCCESS == code && dbCfg.replications > 1) { + TAOS_CHECK_RETURN(translateGetDbCfg(pCxt, pStmt->dbName, &pStmt->pOptions->pDbCfg)); + if (pStmt->pOptions->pDbCfg->replications > 1) { return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_DB_OPTION, "Invalid option, wal_level 0 should be used with replica 1"); } From f57765564d5be666aab4b4307b3c41632756b6ca Mon Sep 17 00:00:00 2001 From: kailixu Date: Thu, 5 Dec 2024 17:50:10 +0800 Subject: [PATCH 48/55] feat: remove obsolete codes --- source/dnode/mnode/impl/src/mndCompact.c | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/source/dnode/mnode/impl/src/mndCompact.c b/source/dnode/mnode/impl/src/mndCompact.c index 6324d0727f..82fc96a34c 100644 --- a/source/dnode/mnode/impl/src/mndCompact.c +++ b/source/dnode/mnode/impl/src/mndCompact.c @@ -891,24 +891,6 @@ static void mndCompactPullup(SMnode *pMnode) { taosArrayDestroy(pArray); } -static int32_t mndCompactDispatchReq(SMnode *pMnode, SDnodeInfo *pDnodeInfo, int32_t contLen, void *pCont) { - // send grant status to dnode - SRpcMsg rpcMsg = { - .pCont = pCont, .contLen = contLen, .msgType = TDMT_MND_GRANT, .info.ahandle = (void *)0x818, .info.noResp = 1}; - - SEpSet epSet = {.numOfEps = 1}; - tstrncpy(epSet.eps[0].fqdn, pDnodeInfo->ep.fqdn, TSDB_FQDN_LEN); - epSet.eps[0].port = pDnodeInfo->ep.port; - - int32_t code = 0; - if ((code = tmsgSendReq(&epSet, &rpcMsg)) != 0) { - uWarn("failed to send grant status msg since %s", tstrerror(code)); - TAOS_RETURN(code); - } - - TAOS_RETURN(TSDB_CODE_SUCCESS); -} - static int32_t mndCompactDispatchAudit(SMnode *pMnode, SRpcMsg *pReq, SDbObj *pDb, STimeWindow *tw) { if (!tsEnableAudit || tsMonitorFqdn[0] == 0 || tsMonitorPort == 0) { return 0; @@ -954,7 +936,7 @@ static int32_t mndCompactDispatch(SRpcMsg *pReq) { continue; } - // daysToKeep2 would change after compactEndTime is set + // daysToKeep2 would be altered if (pDb->cfg.compactEndTime && (pDb->cfg.compactEndTime <= -pDb->cfg.daysToKeep2)) { mWarn("db:%p,%s, compact end time:%dm <= -keep2:%dm , skip", pDb, pDb->name, pDb->cfg.compactEndTime, -pDb->cfg.daysToKeep2); From 6ca9da394598a91da71c0292393afaaf4dfd7271 Mon Sep 17 00:00:00 2001 From: kailixu Date: Fri, 6 Dec 2024 09:12:40 +0800 Subject: [PATCH 49/55] CI: schedule the linux CI server --- Jenkinsfile2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile2 b/Jenkinsfile2 index 249a8d1c9d..428762e52e 100644 --- a/Jenkinsfile2 +++ b/Jenkinsfile2 @@ -505,7 +505,7 @@ pipeline { } } stage('linux test') { - agent{label "slave1_47 || slave1_48 || slave1_49 || slave1_50 || slave1_52 || slave1_59 || slave1_63 || worker03 || slave215 || slave217 || slave219 "} + agent{label "slave1_47 || slave1_48 || slave1_49 || slave1_50 || slave1_59 || slave1_63"} options { skipDefaultCheckout() } when { changeRequest() From 60fdd0fe6446711f9af000f0eb8906a5230b4bb0 Mon Sep 17 00:00:00 2001 From: Kaili Xu Date: Fri, 13 Dec 2024 17:05:46 +0800 Subject: [PATCH 50/55] enh: calculation of compact time offset --- source/dnode/mnode/impl/src/mndCompact.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/dnode/mnode/impl/src/mndCompact.c b/source/dnode/mnode/impl/src/mndCompact.c index 74a17b7b8d..ade7b63afa 100644 --- a/source/dnode/mnode/impl/src/mndCompact.c +++ b/source/dnode/mnode/impl/src/mndCompact.c @@ -957,7 +957,7 @@ static int32_t mndCompactDispatch(SRpcMsg *pReq) { continue; } - int64_t remainder = ((curMin + (int64_t)pDb->cfg.compactTimeOffset * 60LL) % pDb->cfg.compactInterval); + int64_t remainder = ((curMin - (int64_t)pDb->cfg.compactTimeOffset * 60LL) % pDb->cfg.compactInterval); if (remainder != 0) { mDebug("db:%p,%s, current time:%" PRIi64 "m is not divisible by compact interval:%dm, offset:%" PRIi8 "h, remainder:%" PRIi64 "m, skip", From ed062cf0aff678d8e93406f5f7b7f05c606a424f Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Sat, 14 Dec 2024 12:08:33 +0800 Subject: [PATCH 51/55] remove assert --- source/libs/nodes/src/nodesCodeFuncs.c | 27 +++++++++++--------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/source/libs/nodes/src/nodesCodeFuncs.c b/source/libs/nodes/src/nodesCodeFuncs.c index 5e6bc94a46..6d4d89607f 100644 --- a/source/libs/nodes/src/nodesCodeFuncs.c +++ b/source/libs/nodes/src/nodesCodeFuncs.c @@ -5392,13 +5392,13 @@ static int32_t jsonToDownstreamSourceNode(const SJson* pJson, void* pObj) { static const char* jkWindowOffsetStartOffset = "StartOffset"; static const char* jkWindowOffsetEndOffset = "EndOffset"; static int32_t windowOffsetNodeToJson(const void* pObj, SJson* pJson) { - const SWindowOffsetNode* pNode = (const SWindowOffsetNode*)pObj; + const SWindowOffsetNode* pNode = (const SWindowOffsetNode*)pObj; - int32_t code = tjsonAddObject(pJson, jkWindowOffsetStartOffset, nodeToJson, pNode->pStartOffset); - if (TSDB_CODE_SUCCESS == code) { - code = tjsonAddObject(pJson, jkWindowOffsetEndOffset, nodeToJson, pNode->pEndOffset); + int32_t code = tjsonAddObject(pJson, jkWindowOffsetStartOffset, nodeToJson, pNode->pStartOffset); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddObject(pJson, jkWindowOffsetEndOffset, nodeToJson, pNode->pEndOffset); } - return code; + return code; } static int32_t jsonToWindowOffsetNode(const SJson* pJson, void* pObj) { @@ -5668,11 +5668,11 @@ static const char* jkColumnOptionsEncode = "encode"; static const char* jkColumnOptionsCompress = "compress"; static const char* jkColumnOptionsLevel = "level"; static int32_t columnOptionsToJson(const void* pObj, SJson* pJson) { - const SColumnOptions* pNode = (const SColumnOptions*)pObj; - int32_t code = tjsonAddStringToObject(pJson, jkColumnOptionsEncode, pNode->encode); - code = tjsonAddStringToObject(pJson, jkColumnOptionsCompress, pNode->compress); - code = tjsonAddStringToObject(pJson, jkColumnOptionsLevel, pNode->compressLevel); - return code; + const SColumnOptions* pNode = (const SColumnOptions*)pObj; + int32_t code = tjsonAddStringToObject(pJson, jkColumnOptionsEncode, pNode->encode); + code = tjsonAddStringToObject(pJson, jkColumnOptionsCompress, pNode->compress); + code = tjsonAddStringToObject(pJson, jkColumnOptionsLevel, pNode->compressLevel); + return code; } static int32_t jsonToColumnOptions(const SJson* pJson, void* pObj) { @@ -7187,17 +7187,12 @@ static int32_t jsonToCompactDatabaseStmt(const SJson* pJson, void* pObj) { static int32_t compactVgroupsStmtToJson(const void* pObj, SJson* pJson) { const SCompactVgroupsStmt* pNode = (const SCompactVgroupsStmt*)pObj; - // TODO - ASSERT(0); return 0; } static int32_t jsonToCompactVgroupsStmt(const SJson* pJson, void* pObj) { - // TODO - ASSERT(0); SCompactVgroupsStmt* pNode = (SCompactVgroupsStmt*)pObj; return 0; - // tjsonGetStringValue(pJson, jkCompactDatabaseStmtDbName, pNode->dbName); } static const char* jkCreateStreamStmtStreamName = "StreamName"; @@ -7532,7 +7527,7 @@ static int32_t jsonToShowClusterMachinesStmt(const SJson* pJson, void* pObj) { r static int32_t jsonToShowEncryptionsStmt(const SJson* pJson, void* pObj) { return jsonToShowStmt(pJson, pObj); } static int32_t showUsageStmtStmtToJson(const void* pObj, SJson* pJson) { return showStmtToJson(pObj, pJson); } -static int32_t jsonToShowUsageStmt(const SJson* pJson, void* pObj) { return jsonToShowStmt(pJson, pObj); } +static int32_t jsonToShowUsageStmt(const SJson* pJson, void* pObj) { return jsonToShowStmt(pJson, pObj); } static const char* jkShowDnodeVariablesStmtDnodeId = "DnodeId"; static const char* jkShowDnodeVariablesStmtLikePattern = "LikePattern"; From 63a7f59cbc29bc1cdda467b345d14f5b1219a043 Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Sat, 14 Dec 2024 13:48:36 +0800 Subject: [PATCH 52/55] fix: CI case --- tests/system-test/2-query/union.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/system-test/2-query/union.py b/tests/system-test/2-query/union.py index 24ccac5d90..a6cccb8aaa 100644 --- a/tests/system-test/2-query/union.py +++ b/tests/system-test/2-query/union.py @@ -434,7 +434,7 @@ class TDTestCase: tdSql.checkRows(2) sql = "select db_name `TABLE_CAT`, '' `TABLE_SCHEM`, stable_name `TABLE_NAME`, 'TABLE' `TABLE_TYPE`, table_comment `REMARKS` from information_schema.ins_stables union all select db_name `TABLE_CAT`, '' `TABLE_SCHEM`, table_name `TABLE_NAME`, case when `type`='SYSTEM_TABLE' then 'TABLE' when `type`='NORMAL_TABLE' then 'TABLE' when `type`='CHILD_TABLE' then 'TABLE' else 'UNKNOWN' end `TABLE_TYPE`, table_comment `REMARKS` from information_schema.ins_tables union all select db_name `TABLE_CAT`, '' `TABLE_SCHEM`, view_name `TABLE_NAME`, 'VIEW' `TABLE_TYPE`, NULL `REMARKS` from information_schema.ins_views" tdSql.query(sql, queryTimes=1) - tdSql.checkRows(48) + tdSql.checkRows(49) def stop(self): tdSql.close() From bdece7fcfc0f7b29dc129691555055e15eb104d5 Mon Sep 17 00:00:00 2001 From: kailixu Date: Sat, 14 Dec 2024 13:48:47 +0800 Subject: [PATCH 53/55] chore: update error code ignore list --- tests/army/whole/checkErrorCode.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/army/whole/checkErrorCode.py b/tests/army/whole/checkErrorCode.py index b24c2ae7b5..b2aa1fce1b 100644 --- a/tests/army/whole/checkErrorCode.py +++ b/tests/army/whole/checkErrorCode.py @@ -39,7 +39,7 @@ ignoreCodes = [ '0x800003A7', '0x800003AA', '0x800003AB', '0x800003AC', '0x800003AD', '0x800003B0', '0x800003B2', '0x800003B4', '0x800003B5', '0x800003BA', '0x800003C0', '0x800003C1', '0x800003D0', '0x800003D8', '0x800003D9', '0x800003E2', '0x800003F4', '0x800003F8', '0x80000412', '0x80000413', '0x80000414', '0x80000415', '0x80000416', '0x80000417', '0x80000418', '0x80000419', '0x80000420', '0x80000421', '0x80000422', '0x80000423', - '0x80000424', '0x80000425', '0x80000426', '0x80000427', '0x80000428', '0x80000429', '0x8000042A', '0x80000430', '0x80000431', '0x80000432', + '0x80000424', '0x80000425', '0x80000426', '0x80000427', '0x80000428', '0x80000429', '0x8000042A', '0x8000042B','0x80000430', '0x80000431', '0x80000432', '0x80000433', '0x80000434', '0x80000435', '0x80000436', '0x80000437', '0x80000438', '0x80000440', '0x80000441', '0x80000442', '0x80000443', '0x80000444', '0x80000445', '0x80000446', '0x80000447', '0x80000485', '0x80000486', '0x800004A0', '0x800004A1', '0x800004B1', '0x800004B2', '0x800004B3', '0x80000504', '0x80000528', '0x80000532', '0x80000533', '0x80000534', '0x80000535', '0x80000536', '0x80000537', '0x80000538', @@ -55,7 +55,7 @@ ignoreCodes = [ '0x80002207', '0x80002406', '0x80002407', '0x80002503', '0x80002506', '0x80002507', '0x8000261B', '0x80002653', '0x80002668', '0x80002669', '0x8000266A', '0x8000266B', '0x8000266C', '0x8000266D', '0x8000266E', '0x8000266F', '0x80002670', '0x80002671', '0x80002672', '0x80002673', '0x80002674', '0x80002675', '0x80002676', '0x80002677', '0x80002678', '0x80002679', '0x8000267A', '0x8000267B', '0x8000267C', '0x8000267D', - '0x8000267E', '0x8000267F', '0x80002680', '0x80002681', '0x80002682', '0x80002683', '0x80002684', '0x80002685', '0x80002703', '0x80002806', + '0x8000267E', '0x8000267F', '0x80002680', '0x80002681', '0x80002682', '0x80002683', '0x80002684', '0x80002685', '0x80002686', '0x80002703', '0x80002806', '0x80002807', '0x80002808', '0x80002809', '0x8000280A', '0x8000280B', '0x8000280C', '0x8000280D', '0x8000280E', '0x8000280F', '0x80002810', '0x80002811', '0x80002812', '0x80002813', '0x80002814', '0x80002815', '0x8000290B', '0x80002920', '0x80003003', '0x80003006', '0x80003106', '0x80003107', '0x80003108', '0x80003109', '0x80003110', '0x80003111', '0x80003112', '0x80003250', '0x80004003', '0x80004004', '0x80004005', From c771b45fb2410a844227d5702808dfa597b5def6 Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Sat, 14 Dec 2024 22:00:36 +0800 Subject: [PATCH 54/55] recover Jenkins --- Jenkinsfile2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile2 b/Jenkinsfile2 index 428762e52e..249a8d1c9d 100644 --- a/Jenkinsfile2 +++ b/Jenkinsfile2 @@ -505,7 +505,7 @@ pipeline { } } stage('linux test') { - agent{label "slave1_47 || slave1_48 || slave1_49 || slave1_50 || slave1_59 || slave1_63"} + agent{label "slave1_47 || slave1_48 || slave1_49 || slave1_50 || slave1_52 || slave1_59 || slave1_63 || worker03 || slave215 || slave217 || slave219 "} options { skipDefaultCheckout() } when { changeRequest() From 1c54d67572f1a89d4f4ff73b3d2560226df8f391 Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Sun, 15 Dec 2024 00:41:53 +0800 Subject: [PATCH 55/55] fix: merge problem --- source/common/src/tglobal.c | 3 ++- tests/system-test/0-others/information_schema.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/source/common/src/tglobal.c b/source/common/src/tglobal.c index 2190f93c68..271f4c7f0d 100644 --- a/source/common/src/tglobal.c +++ b/source/common/src/tglobal.c @@ -14,12 +14,12 @@ */ #define _DEFAULT_SOURCE +#include "tglobal.h" #include "cJSON.h" #include "defines.h" #include "os.h" #include "osString.h" #include "tconfig.h" -#include "tglobal.h" #include "tgrant.h" #include "tjson.h" #include "tlog.h" @@ -822,6 +822,7 @@ static int32_t taosAddServerCfg(SConfig *pCfg) { TAOS_CHECK_RETURN(cfgAddInt32(pCfg, "queryBufferSize", tsQueryBufferSize, -1, 500000000000, CFG_SCOPE_SERVER, CFG_DYN_SERVER_LAZY, CFG_CATEGORY_LOCAL)); TAOS_CHECK_RETURN(cfgAddInt32(pCfg, "queryRspPolicy", tsQueryRspPolicy, 0, 1, CFG_SCOPE_SERVER, CFG_DYN_SERVER,CFG_CATEGORY_GLOBAL)); TAOS_CHECK_RETURN(cfgAddInt32(pCfg, "numOfCommitThreads", tsNumOfCommitThreads, 1, 1024, CFG_SCOPE_SERVER, CFG_DYN_SERVER_LAZY,CFG_CATEGORY_LOCAL)); + TAOS_CHECK_RETURN(cfgAddInt32(pCfg, "maxCompactConcurrency", tsNumOfCompactThreads, 1, 1024, CFG_SCOPE_SERVER, CFG_DYN_SERVER_LAZY,CFG_CATEGORY_LOCAL)); TAOS_CHECK_RETURN(cfgAddInt32(pCfg, "retentionSpeedLimitMB", tsRetentionSpeedLimitMB, 0, 1024, CFG_SCOPE_SERVER, CFG_DYN_SERVER,CFG_CATEGORY_GLOBAL)); TAOS_CHECK_RETURN(cfgAddBool(pCfg, "queryUseMemoryPool", tsQueryUseMemoryPool, CFG_SCOPE_SERVER, CFG_DYN_NONE,CFG_CATEGORY_LOCAL) != 0); TAOS_CHECK_RETURN(cfgAddBool(pCfg, "memPoolFullFunc", tsMemPoolFullFunc, CFG_SCOPE_SERVER, CFG_DYN_NONE,CFG_CATEGORY_LOCAL) != 0); diff --git a/tests/system-test/0-others/information_schema.py b/tests/system-test/0-others/information_schema.py index 81de6cdd4c..af0dd6d949 100644 --- a/tests/system-test/0-others/information_schema.py +++ b/tests/system-test/0-others/information_schema.py @@ -222,7 +222,7 @@ class TDTestCase: tdSql.query("select * from information_schema.ins_columns where db_name ='information_schema'") tdLog.info(len(tdSql.queryResult)) - tdSql.checkEqual(True, len(tdSql.queryResult) in range(302, 303)) + tdSql.checkEqual(True, len(tdSql.queryResult) in range(303, 304)) tdSql.query("select * from information_schema.ins_columns where db_name ='performance_schema'") tdSql.checkEqual(60, len(tdSql.queryResult))