diff --git a/include/common/cos.h b/include/common/cos.h index afeca3ca03..8e48533304 100644 --- a/include/common/cos.h +++ b/include/common/cos.h @@ -33,10 +33,12 @@ extern int32_t tsS3UploadDelaySec; int32_t s3Init(); void s3CleanUp(); +int32_t s3CheckCfg(); int32_t s3PutObjectFromFile(const char *file, const char *object); int32_t s3PutObjectFromFile2(const char *file, const char *object, int8_t withcp); +int32_t s3PutObjectFromFileOffset(const char *file, const char *object_name, int64_t offset, int64_t size); void s3DeleteObjectsByPrefix(const char *prefix); -void s3DeleteObjects(const char *object_name[], int nobject); +int32_t s3DeleteObjects(const char *object_name[], int nobject); bool s3Exists(const char *object_name); bool s3Get(const char *object_name, const char *path); int32_t s3GetObjectBlock(const char *object_name, int64_t offset, int64_t size, bool check, uint8_t **ppBlock); @@ -45,6 +47,8 @@ void s3EvictCache(const char *path, long object_size); long s3Size(const char *object_name); int32_t s3GetObjectToFile(const char *object_name, char *fileName); +#define S3_DATA_CHUNK_PAGES (256 * 1024 * 1024) + #ifdef __cplusplus } #endif diff --git a/include/common/tglobal.h b/include/common/tglobal.h index 1a85a882cb..029712e083 100644 --- a/include/common/tglobal.h +++ b/include/common/tglobal.h @@ -136,9 +136,9 @@ extern int32_t tsMonitorIntervalForBasic; extern bool tsMonitorForceV2; // audit -extern bool tsEnableAudit; -extern bool tsEnableAuditCreateTable; -extern int32_t tsAuditInterval; +extern bool tsEnableAudit; +extern bool tsEnableAuditCreateTable; +extern int32_t tsAuditInterval; // telem extern bool tsEnableTelem; @@ -146,9 +146,9 @@ extern int32_t tsTelemInterval; extern char tsTelemServer[]; extern uint16_t tsTelemPort; extern bool tsEnableCrashReport; -extern char * tsTelemUri; -extern char * tsClientCrashReportUri; -extern char * tsSvrCrashReportUri; +extern char *tsTelemUri; +extern char *tsClientCrashReportUri; +extern char *tsSvrCrashReportUri; // query buffer management extern int32_t tsQueryBufferSize; // maximum allowed usage buffer size in MB for each data node during query processing @@ -235,6 +235,8 @@ extern int32_t tsTtlUnit; extern int32_t tsTtlPushIntervalSec; extern int32_t tsTtlBatchDropNum; extern int32_t tsTrimVDbIntervalSec; +extern int32_t tsS3MigrateIntervalSec; +extern bool tsS3MigrateEnabled; extern int32_t tsGrantHBInterval; extern int32_t tsUptimeInterval; diff --git a/include/common/tmsg.h b/include/common/tmsg.h index 2943ad162f..2230f73997 100644 --- a/include/common/tmsg.h +++ b/include/common/tmsg.h @@ -302,7 +302,8 @@ typedef enum ENodeType { QUERY_NODE_GRANT_STMT, QUERY_NODE_REVOKE_STMT, QUERY_NODE_ALTER_CLUSTER_STMT, - // placeholder for [153, 180] + QUERY_NODE_S3MIGRATE_DATABASE_STMT, + // placeholder for [154, 180] QUERY_NODE_SHOW_CREATE_VIEW_STMT = 181, QUERY_NODE_SHOW_CREATE_DATABASE_STMT, QUERY_NODE_SHOW_CREATE_TABLE_STMT, @@ -588,7 +589,7 @@ typedef struct { // int32_t tEncodeSSubmitRsp(SEncoder* pEncoder, const SSubmitRsp* pRsp); // int32_t tDecodeSSubmitRsp(SDecoder* pDecoder, SSubmitRsp* pRsp); // void tFreeSSubmitBlkRsp(void* param); -void tFreeSSubmitRsp(SSubmitRsp* pRsp); +void tFreeSSubmitRsp(SSubmitRsp* pRsp); #define COL_SMA_ON ((int8_t)0x1) #define COL_IDX_ON ((int8_t)0x2) @@ -1155,6 +1156,9 @@ typedef struct { int32_t sstTrigger; int16_t hashPrefix; int16_t hashSuffix; + int32_t s3ChunkSize; + int32_t s3KeepLocal; + int8_t s3Compact; int32_t tsdbPageSize; int32_t sqlLen; char* sql; @@ -1186,6 +1190,8 @@ typedef struct { int32_t minRows; int32_t walRetentionPeriod; int32_t walRetentionSize; + int32_t s3KeepLocal; + int8_t s3Compact; int32_t sqlLen; char* sql; int8_t withArbitrator; @@ -1266,6 +1272,20 @@ typedef struct { int32_t tSerializeSVTrimDbReq(void* buf, int32_t bufLen, SVTrimDbReq* pReq); int32_t tDeserializeSVTrimDbReq(void* buf, int32_t bufLen, SVTrimDbReq* pReq); +typedef struct { + char db[TSDB_DB_FNAME_LEN]; +} SS3MigrateDbReq; + +int32_t tSerializeSS3MigrateDbReq(void* buf, int32_t bufLen, SS3MigrateDbReq* pReq); +int32_t tDeserializeSS3MigrateDbReq(void* buf, int32_t bufLen, SS3MigrateDbReq* pReq); + +typedef struct { + int32_t timestamp; +} SVS3MigrateDbReq; + +int32_t tSerializeSVS3MigrateDbReq(void* buf, int32_t bufLen, SVS3MigrateDbReq* pReq); +int32_t tDeserializeSVS3MigrateDbReq(void* buf, int32_t bufLen, SVS3MigrateDbReq* pReq); + typedef struct { int32_t timestampSec; int32_t ttlDropMaxCount; @@ -1303,6 +1323,9 @@ typedef struct { int8_t strict; int8_t cacheLast; int8_t encryptAlgorithm; + int32_t s3ChunkSize; + int32_t s3KeepLocal; + int8_t s3Compact; int32_t tsdbPageSize; int32_t walRetentionPeriod; int32_t walRollPeriod; @@ -1595,13 +1618,13 @@ int32_t tDeserializeSStatusReq(void* buf, int32_t bufLen, SStatusReq* pReq); void tFreeSStatusReq(SStatusReq* pReq); typedef struct { - int32_t contLen; - char* pCont; + int32_t contLen; + char* pCont; } SStatisReq; int32_t tSerializeSStatisReq(void* buf, int32_t bufLen, SStatisReq* pReq); int32_t tDeserializeSStatisReq(void* buf, int32_t bufLen, SStatisReq* pReq); -void tFreeSStatisReq(SStatisReq *pReq); +void tFreeSStatisReq(SStatisReq* pReq); typedef struct { int32_t dnodeId; @@ -1706,7 +1729,10 @@ typedef struct { int16_t hashPrefix; int16_t hashSuffix; int32_t tsdbPageSize; - int64_t reserved[8]; + int32_t s3ChunkSize; + int32_t s3KeepLocal; + int8_t s3Compact; + int64_t reserved[6]; int8_t learnerReplica; int8_t learnerSelfIndex; SReplica learnerReplicas[TSDB_MAX_LEARNER_REPLICA]; @@ -1795,13 +1821,15 @@ typedef struct { int8_t walLevel; int8_t strict; int8_t cacheLast; - int64_t reserved[8]; + int64_t reserved[7]; // 1st modification int16_t sttTrigger; int32_t minRows; // 2nd modification int32_t walRetentionPeriod; int32_t walRetentionSize; + int32_t s3KeepLocal; + int8_t s3Compact; } SAlterVnodeConfigReq; int32_t tSerializeSAlterVnodeConfigReq(void* buf, int32_t bufLen, SAlterVnodeConfigReq* pReq); @@ -1960,7 +1988,7 @@ typedef struct { int32_t tSerializeSShowReq(void* buf, int32_t bufLen, SShowReq* pReq); // int32_t tDeserializeSShowReq(void* buf, int32_t bufLen, SShowReq* pReq); -void tFreeSShowReq(SShowReq* pReq); +void tFreeSShowReq(SShowReq* pReq); typedef struct { int64_t showId; @@ -2844,7 +2872,7 @@ typedef struct { SVCreateTbReq* pReqs; SArray* pArray; }; - int8_t source; // TD_REQ_FROM_TAOX-taosX or TD_REQ_FROM_APP-taosClient + int8_t source; // TD_REQ_FROM_TAOX-taosX or TD_REQ_FROM_APP-taosClient } SVCreateTbBatchReq; int tEncodeSVCreateTbBatchReq(SEncoder* pCoder, const SVCreateTbBatchReq* pReq); @@ -2939,7 +2967,7 @@ typedef struct { int32_t newCommentLen; char* newComment; int64_t ctimeMs; // fill by vnode - int8_t source; // TD_REQ_FROM_TAOX-taosX or TD_REQ_FROM_APP-taosClient + int8_t source; // TD_REQ_FROM_TAOX-taosX or TD_REQ_FROM_APP-taosClient } SVAlterTbReq; int32_t tEncodeSVAlterTbReq(SEncoder* pEncoder, const SVAlterTbReq* pReq); @@ -4058,7 +4086,7 @@ int32_t tDeserializeSMqSeekReq(void* buf, int32_t bufLen, SMqSeekReq* pReq); #define TD_REQ_FROM_TAOX 0x8 #define SUBMIT_REQUEST_VERSION (1) -#define TD_REQ_FROM_TAOX_OLD 0x1 // for compatibility +#define TD_REQ_FROM_TAOX_OLD 0x1 // for compatibility typedef struct { int32_t flags; diff --git a/include/common/tmsgdef.h b/include/common/tmsgdef.h index ec909c7e8b..2f010c7f91 100644 --- a/include/common/tmsgdef.h +++ b/include/common/tmsgdef.h @@ -222,6 +222,8 @@ TD_DEF_MSG_TYPE(TDMT_MND_STREAM_REQ_CHKPT, "stream-req-checkpoint", NULL, NULL) TD_DEF_MSG_TYPE(TDMT_MND_CONFIG_CLUSTER, "config-cluster", NULL, NULL) TD_DEF_MSG_TYPE(TDMT_MND_CREATE_ENCRYPT_KEY, "create-encrypt-key", NULL, NULL) + TD_DEF_MSG_TYPE(TDMT_MND_S3MIGRATE_DB, "s3migrate-db", NULL, NULL) + TD_DEF_MSG_TYPE(TDMT_MND_S3MIGRATE_DB_TIMER, "s3migrate-db-tmr", NULL, NULL) TD_DEF_MSG_TYPE(TDMT_MND_MAX_MSG, "mnd-max", NULL, NULL) TD_CLOSE_MSG_SEG(TDMT_END_MND_MSG) @@ -274,6 +276,7 @@ TD_DEF_MSG_TYPE(TDMT_VND_DISABLE_WRITE, "vnode-disable-write", NULL, NULL) TD_DEF_MSG_TYPE(TDMT_VND_QUERY_COMPACT_PROGRESS, "vnode-query-compact-progress", NULL, NULL) TD_DEF_MSG_TYPE(TDMT_VND_KILL_COMPACT, "kill-compact", NULL, NULL) + TD_DEF_MSG_TYPE(TDMT_VND_S3MIGRATE, "vnode-s3migrate", NULL, NULL) TD_DEF_MSG_TYPE(TDMT_VND_ARB_HEARTBEAT, "vnode-arb-hb", NULL, NULL) TD_DEF_MSG_TYPE(TDMT_VND_ARB_CHECK_SYNC, "vnode-arb-check-sync", NULL, NULL) TD_DEF_MSG_TYPE(TDMT_VND_MAX_MSG, "vnd-max", NULL, NULL) diff --git a/include/common/ttokendef.h b/include/common/ttokendef.h index ac75884ec9..b2cdefa225 100644 --- a/include/common/ttokendef.h +++ b/include/common/ttokendef.h @@ -85,305 +85,309 @@ #define TK_USE 67 #define TK_FLUSH 68 #define TK_TRIM 69 -#define TK_COMPACT 70 -#define TK_IF 71 -#define TK_NOT 72 -#define TK_EXISTS 73 -#define TK_BUFFER 74 -#define TK_CACHEMODEL 75 -#define TK_CACHESIZE 76 -#define TK_COMP 77 -#define TK_DURATION 78 -#define TK_NK_VARIABLE 79 -#define TK_MAXROWS 80 -#define TK_MINROWS 81 -#define TK_KEEP 82 -#define TK_PAGES 83 -#define TK_PAGESIZE 84 -#define TK_TSDB_PAGESIZE 85 -#define TK_PRECISION 86 -#define TK_REPLICA 87 -#define TK_VGROUPS 88 -#define TK_SINGLE_STABLE 89 -#define TK_RETENTIONS 90 -#define TK_SCHEMALESS 91 -#define TK_WAL_LEVEL 92 -#define TK_WAL_FSYNC_PERIOD 93 -#define TK_WAL_RETENTION_PERIOD 94 -#define TK_WAL_RETENTION_SIZE 95 -#define TK_WAL_ROLL_PERIOD 96 -#define TK_WAL_SEGMENT_SIZE 97 -#define TK_STT_TRIGGER 98 -#define TK_TABLE_PREFIX 99 -#define TK_TABLE_SUFFIX 100 -#define TK_KEEP_TIME_OFFSET 101 -#define TK_ENCRYPT_ALGORITHM 102 -#define TK_NK_COLON 103 -#define TK_BWLIMIT 104 -#define TK_START 105 -#define TK_TIMESTAMP 106 -#define TK_END 107 -#define TK_TABLE 108 -#define TK_NK_LP 109 -#define TK_NK_RP 110 -#define TK_STABLE 111 -#define TK_COLUMN 112 -#define TK_MODIFY 113 -#define TK_RENAME 114 -#define TK_TAG 115 -#define TK_SET 116 -#define TK_NK_EQ 117 -#define TK_USING 118 -#define TK_TAGS 119 -#define TK_PRIMARY 120 -#define TK_KEY 121 -#define TK_BOOL 122 -#define TK_TINYINT 123 -#define TK_SMALLINT 124 -#define TK_INT 125 -#define TK_INTEGER 126 -#define TK_BIGINT 127 -#define TK_FLOAT 128 -#define TK_DOUBLE 129 -#define TK_BINARY 130 -#define TK_NCHAR 131 -#define TK_UNSIGNED 132 -#define TK_JSON 133 -#define TK_VARCHAR 134 -#define TK_MEDIUMBLOB 135 -#define TK_BLOB 136 -#define TK_VARBINARY 137 -#define TK_GEOMETRY 138 -#define TK_DECIMAL 139 -#define TK_COMMENT 140 -#define TK_MAX_DELAY 141 -#define TK_WATERMARK 142 -#define TK_ROLLUP 143 -#define TK_TTL 144 -#define TK_SMA 145 -#define TK_DELETE_MARK 146 -#define TK_FIRST 147 -#define TK_LAST 148 -#define TK_SHOW 149 -#define TK_PRIVILEGES 150 -#define TK_DATABASES 151 -#define TK_TABLES 152 -#define TK_STABLES 153 -#define TK_MNODES 154 -#define TK_QNODES 155 -#define TK_ARBGROUPS 156 -#define TK_FUNCTIONS 157 -#define TK_INDEXES 158 -#define TK_ACCOUNTS 159 -#define TK_APPS 160 -#define TK_CONNECTIONS 161 -#define TK_LICENCES 162 -#define TK_GRANTS 163 -#define TK_FULL 164 -#define TK_LOGS 165 -#define TK_MACHINES 166 -#define TK_ENCRYPTIONS 167 -#define TK_QUERIES 168 -#define TK_SCORES 169 -#define TK_TOPICS 170 -#define TK_VARIABLES 171 -#define TK_BNODES 172 -#define TK_SNODES 173 -#define TK_TRANSACTIONS 174 -#define TK_DISTRIBUTED 175 -#define TK_CONSUMERS 176 -#define TK_SUBSCRIPTIONS 177 -#define TK_VNODES 178 -#define TK_ALIVE 179 -#define TK_VIEWS 180 -#define TK_VIEW 181 -#define TK_COMPACTS 182 -#define TK_NORMAL 183 -#define TK_CHILD 184 -#define TK_LIKE 185 -#define TK_TBNAME 186 -#define TK_QTAGS 187 -#define TK_AS 188 -#define TK_SYSTEM 189 -#define TK_INDEX 190 -#define TK_FUNCTION 191 -#define TK_INTERVAL 192 -#define TK_COUNT 193 -#define TK_LAST_ROW 194 -#define TK_META 195 -#define TK_ONLY 196 -#define TK_TOPIC 197 -#define TK_CONSUMER 198 -#define TK_GROUP 199 -#define TK_DESC 200 -#define TK_DESCRIBE 201 -#define TK_RESET 202 -#define TK_QUERY 203 -#define TK_CACHE 204 -#define TK_EXPLAIN 205 -#define TK_ANALYZE 206 -#define TK_VERBOSE 207 -#define TK_NK_BOOL 208 -#define TK_RATIO 209 -#define TK_NK_FLOAT 210 -#define TK_OUTPUTTYPE 211 -#define TK_AGGREGATE 212 -#define TK_BUFSIZE 213 -#define TK_LANGUAGE 214 -#define TK_REPLACE 215 -#define TK_STREAM 216 -#define TK_INTO 217 -#define TK_PAUSE 218 -#define TK_RESUME 219 -#define TK_TRIGGER 220 -#define TK_AT_ONCE 221 -#define TK_WINDOW_CLOSE 222 -#define TK_IGNORE 223 -#define TK_EXPIRED 224 -#define TK_FILL_HISTORY 225 -#define TK_UPDATE 226 -#define TK_SUBTABLE 227 -#define TK_UNTREATED 228 -#define TK_KILL 229 -#define TK_CONNECTION 230 -#define TK_TRANSACTION 231 -#define TK_BALANCE 232 -#define TK_VGROUP 233 -#define TK_LEADER 234 -#define TK_MERGE 235 -#define TK_REDISTRIBUTE 236 -#define TK_SPLIT 237 -#define TK_DELETE 238 -#define TK_INSERT 239 -#define TK_NK_BIN 240 -#define TK_NK_HEX 241 -#define TK_NULL 242 -#define TK_NK_QUESTION 243 -#define TK_NK_ALIAS 244 -#define TK_NK_ARROW 245 -#define TK_ROWTS 246 -#define TK_QSTART 247 -#define TK_QEND 248 -#define TK_QDURATION 249 -#define TK_WSTART 250 -#define TK_WEND 251 -#define TK_WDURATION 252 -#define TK_IROWTS 253 -#define TK_ISFILLED 254 -#define TK_CAST 255 -#define TK_NOW 256 -#define TK_TODAY 257 -#define TK_TIMEZONE 258 -#define TK_CLIENT_VERSION 259 -#define TK_SERVER_VERSION 260 -#define TK_SERVER_STATUS 261 -#define TK_CURRENT_USER 262 -#define TK_CASE 263 -#define TK_WHEN 264 -#define TK_THEN 265 -#define TK_ELSE 266 -#define TK_BETWEEN 267 -#define TK_IS 268 -#define TK_NK_LT 269 -#define TK_NK_GT 270 -#define TK_NK_LE 271 -#define TK_NK_GE 272 -#define TK_NK_NE 273 -#define TK_MATCH 274 -#define TK_NMATCH 275 -#define TK_CONTAINS 276 -#define TK_IN 277 -#define TK_JOIN 278 -#define TK_INNER 279 -#define TK_SELECT 280 -#define TK_NK_HINT 281 -#define TK_DISTINCT 282 -#define TK_WHERE 283 -#define TK_PARTITION 284 -#define TK_BY 285 -#define TK_SESSION 286 -#define TK_STATE_WINDOW 287 -#define TK_EVENT_WINDOW 288 -#define TK_COUNT_WINDOW 289 -#define TK_SLIDING 290 -#define TK_FILL 291 -#define TK_VALUE 292 -#define TK_VALUE_F 293 -#define TK_NONE 294 -#define TK_PREV 295 -#define TK_NULL_F 296 -#define TK_LINEAR 297 -#define TK_NEXT 298 -#define TK_HAVING 299 -#define TK_RANGE 300 -#define TK_EVERY 301 -#define TK_ORDER 302 -#define TK_SLIMIT 303 -#define TK_SOFFSET 304 -#define TK_LIMIT 305 -#define TK_OFFSET 306 -#define TK_ASC 307 -#define TK_NULLS 308 -#define TK_ABORT 309 -#define TK_AFTER 310 -#define TK_ATTACH 311 -#define TK_BEFORE 312 -#define TK_BEGIN 313 -#define TK_BITAND 314 -#define TK_BITNOT 315 -#define TK_BITOR 316 -#define TK_BLOCKS 317 -#define TK_CHANGE 318 -#define TK_COMMA 319 -#define TK_CONCAT 320 -#define TK_CONFLICT 321 -#define TK_COPY 322 -#define TK_DEFERRED 323 -#define TK_DELIMITERS 324 -#define TK_DETACH 325 -#define TK_DIVIDE 326 -#define TK_DOT 327 -#define TK_EACH 328 -#define TK_FAIL 329 -#define TK_FILE 330 -#define TK_FOR 331 -#define TK_GLOB 332 -#define TK_ID 333 -#define TK_IMMEDIATE 334 -#define TK_IMPORT 335 -#define TK_INITIALLY 336 -#define TK_INSTEAD 337 -#define TK_ISNULL 338 -#define TK_MODULES 339 -#define TK_NK_BITNOT 340 -#define TK_NK_SEMI 341 -#define TK_NOTNULL 342 -#define TK_OF 343 -#define TK_PLUS 344 -#define TK_PRIVILEGE 345 -#define TK_RAISE 346 -#define TK_RESTRICT 347 -#define TK_ROW 348 -#define TK_SEMI 349 -#define TK_STAR 350 -#define TK_STATEMENT 351 -#define TK_STRICT 352 -#define TK_STRING 353 -#define TK_TIMES 354 -#define TK_VALUES 355 -#define TK_VARIABLE 356 -#define TK_WAL 357 +#define TK_S3MIGRATE 70 +#define TK_COMPACT 71 +#define TK_IF 72 +#define TK_NOT 73 +#define TK_EXISTS 74 +#define TK_BUFFER 75 +#define TK_CACHEMODEL 76 +#define TK_CACHESIZE 77 +#define TK_COMP 78 +#define TK_DURATION 79 +#define TK_NK_VARIABLE 80 +#define TK_MAXROWS 81 +#define TK_MINROWS 82 +#define TK_KEEP 83 +#define TK_PAGES 84 +#define TK_PAGESIZE 85 +#define TK_TSDB_PAGESIZE 86 +#define TK_PRECISION 87 +#define TK_REPLICA 88 +#define TK_VGROUPS 89 +#define TK_SINGLE_STABLE 90 +#define TK_RETENTIONS 91 +#define TK_SCHEMALESS 92 +#define TK_WAL_LEVEL 93 +#define TK_WAL_FSYNC_PERIOD 94 +#define TK_WAL_RETENTION_PERIOD 95 +#define TK_WAL_RETENTION_SIZE 96 +#define TK_WAL_ROLL_PERIOD 97 +#define TK_WAL_SEGMENT_SIZE 98 +#define TK_STT_TRIGGER 99 +#define TK_TABLE_PREFIX 100 +#define TK_TABLE_SUFFIX 101 +#define TK_S3_CHUNKSIZE 102 +#define TK_S3_KEEPLOCAL 103 +#define TK_S3_COMPACT 104 +#define TK_KEEP_TIME_OFFSET 105 +#define TK_ENCRYPT_ALGORITHM 106 +#define TK_NK_COLON 107 +#define TK_BWLIMIT 108 +#define TK_START 109 +#define TK_TIMESTAMP 110 +#define TK_END 111 +#define TK_TABLE 112 +#define TK_NK_LP 113 +#define TK_NK_RP 114 +#define TK_STABLE 115 +#define TK_COLUMN 116 +#define TK_MODIFY 117 +#define TK_RENAME 118 +#define TK_TAG 119 +#define TK_SET 120 +#define TK_NK_EQ 121 +#define TK_USING 122 +#define TK_TAGS 123 +#define TK_PRIMARY 124 +#define TK_KEY 125 +#define TK_BOOL 126 +#define TK_TINYINT 127 +#define TK_SMALLINT 128 +#define TK_INT 129 +#define TK_INTEGER 130 +#define TK_BIGINT 131 +#define TK_FLOAT 132 +#define TK_DOUBLE 133 +#define TK_BINARY 134 +#define TK_NCHAR 135 +#define TK_UNSIGNED 136 +#define TK_JSON 137 +#define TK_VARCHAR 138 +#define TK_MEDIUMBLOB 139 +#define TK_BLOB 140 +#define TK_VARBINARY 141 +#define TK_GEOMETRY 142 +#define TK_DECIMAL 143 +#define TK_COMMENT 144 +#define TK_MAX_DELAY 145 +#define TK_WATERMARK 146 +#define TK_ROLLUP 147 +#define TK_TTL 148 +#define TK_SMA 149 +#define TK_DELETE_MARK 150 +#define TK_FIRST 151 +#define TK_LAST 152 +#define TK_SHOW 153 +#define TK_PRIVILEGES 154 +#define TK_DATABASES 155 +#define TK_TABLES 156 +#define TK_STABLES 157 +#define TK_MNODES 158 +#define TK_QNODES 159 +#define TK_ARBGROUPS 160 +#define TK_FUNCTIONS 161 +#define TK_INDEXES 162 +#define TK_ACCOUNTS 163 +#define TK_APPS 164 +#define TK_CONNECTIONS 165 +#define TK_LICENCES 166 +#define TK_GRANTS 167 +#define TK_FULL 168 +#define TK_LOGS 169 +#define TK_MACHINES 170 +#define TK_ENCRYPTIONS 171 +#define TK_QUERIES 172 +#define TK_SCORES 173 +#define TK_TOPICS 174 +#define TK_VARIABLES 175 +#define TK_BNODES 176 +#define TK_SNODES 177 +#define TK_TRANSACTIONS 178 +#define TK_DISTRIBUTED 179 +#define TK_CONSUMERS 180 +#define TK_SUBSCRIPTIONS 181 +#define TK_VNODES 182 +#define TK_ALIVE 183 +#define TK_VIEWS 184 +#define TK_VIEW 185 +#define TK_COMPACTS 186 +#define TK_NORMAL 187 +#define TK_CHILD 188 +#define TK_LIKE 189 +#define TK_TBNAME 190 +#define TK_QTAGS 191 +#define TK_AS 192 +#define TK_SYSTEM 193 +#define TK_INDEX 194 +#define TK_FUNCTION 195 +#define TK_INTERVAL 196 +#define TK_COUNT 197 +#define TK_LAST_ROW 198 +#define TK_META 199 +#define TK_ONLY 200 +#define TK_TOPIC 201 +#define TK_CONSUMER 202 +#define TK_GROUP 203 +#define TK_DESC 204 +#define TK_DESCRIBE 205 +#define TK_RESET 206 +#define TK_QUERY 207 +#define TK_CACHE 208 +#define TK_EXPLAIN 209 +#define TK_ANALYZE 210 +#define TK_VERBOSE 211 +#define TK_NK_BOOL 212 +#define TK_RATIO 213 +#define TK_NK_FLOAT 214 +#define TK_OUTPUTTYPE 215 +#define TK_AGGREGATE 216 +#define TK_BUFSIZE 217 +#define TK_LANGUAGE 218 +#define TK_REPLACE 219 +#define TK_STREAM 220 +#define TK_INTO 221 +#define TK_PAUSE 222 +#define TK_RESUME 223 +#define TK_TRIGGER 224 +#define TK_AT_ONCE 225 +#define TK_WINDOW_CLOSE 226 +#define TK_IGNORE 227 +#define TK_EXPIRED 228 +#define TK_FILL_HISTORY 229 +#define TK_UPDATE 230 +#define TK_SUBTABLE 231 +#define TK_UNTREATED 232 +#define TK_KILL 233 +#define TK_CONNECTION 234 +#define TK_TRANSACTION 235 +#define TK_BALANCE 236 +#define TK_VGROUP 237 +#define TK_LEADER 238 +#define TK_MERGE 239 +#define TK_REDISTRIBUTE 240 +#define TK_SPLIT 241 +#define TK_DELETE 242 +#define TK_INSERT 243 +#define TK_NK_BIN 244 +#define TK_NK_HEX 245 +#define TK_NULL 246 +#define TK_NK_QUESTION 247 +#define TK_NK_ALIAS 248 +#define TK_NK_ARROW 249 +#define TK_ROWTS 250 +#define TK_QSTART 251 +#define TK_QEND 252 +#define TK_QDURATION 253 +#define TK_WSTART 254 +#define TK_WEND 255 +#define TK_WDURATION 256 +#define TK_IROWTS 257 +#define TK_ISFILLED 258 +#define TK_CAST 259 +#define TK_NOW 260 +#define TK_TODAY 261 +#define TK_TIMEZONE 262 +#define TK_CLIENT_VERSION 263 +#define TK_SERVER_VERSION 264 +#define TK_SERVER_STATUS 265 +#define TK_CURRENT_USER 266 +#define TK_CASE 267 +#define TK_WHEN 268 +#define TK_THEN 269 +#define TK_ELSE 270 +#define TK_BETWEEN 271 +#define TK_IS 272 +#define TK_NK_LT 273 +#define TK_NK_GT 274 +#define TK_NK_LE 275 +#define TK_NK_GE 276 +#define TK_NK_NE 277 +#define TK_MATCH 278 +#define TK_NMATCH 279 +#define TK_CONTAINS 280 +#define TK_IN 281 +#define TK_JOIN 282 +#define TK_INNER 283 +#define TK_SELECT 284 +#define TK_NK_HINT 285 +#define TK_DISTINCT 286 +#define TK_WHERE 287 +#define TK_PARTITION 288 +#define TK_BY 289 +#define TK_SESSION 290 +#define TK_STATE_WINDOW 291 +#define TK_EVENT_WINDOW 292 +#define TK_COUNT_WINDOW 293 +#define TK_SLIDING 294 +#define TK_FILL 295 +#define TK_VALUE 296 +#define TK_VALUE_F 297 +#define TK_NONE 298 +#define TK_PREV 299 +#define TK_NULL_F 300 +#define TK_LINEAR 301 +#define TK_NEXT 302 +#define TK_HAVING 303 +#define TK_RANGE 304 +#define TK_EVERY 305 +#define TK_ORDER 306 +#define TK_SLIMIT 307 +#define TK_SOFFSET 308 +#define TK_LIMIT 309 +#define TK_OFFSET 310 +#define TK_ASC 311 +#define TK_NULLS 312 +#define TK_ABORT 313 +#define TK_AFTER 314 +#define TK_ATTACH 315 +#define TK_BEFORE 316 +#define TK_BEGIN 317 +#define TK_BITAND 318 +#define TK_BITNOT 319 +#define TK_BITOR 320 +#define TK_BLOCKS 321 +#define TK_CHANGE 322 +#define TK_COMMA 323 +#define TK_CONCAT 324 +#define TK_CONFLICT 325 +#define TK_COPY 326 +#define TK_DEFERRED 327 +#define TK_DELIMITERS 328 +#define TK_DETACH 329 +#define TK_DIVIDE 330 +#define TK_DOT 331 +#define TK_EACH 332 +#define TK_FAIL 333 +#define TK_FILE 334 +#define TK_FOR 335 +#define TK_GLOB 336 +#define TK_ID 337 +#define TK_IMMEDIATE 338 +#define TK_IMPORT 339 +#define TK_INITIALLY 340 +#define TK_INSTEAD 341 +#define TK_ISNULL 342 +#define TK_MODULES 343 +#define TK_NK_BITNOT 344 +#define TK_NK_SEMI 345 +#define TK_NOTNULL 346 +#define TK_OF 347 +#define TK_PLUS 348 +#define TK_PRIVILEGE 349 +#define TK_RAISE 350 +#define TK_RESTRICT 351 +#define TK_ROW 352 +#define TK_SEMI 353 +#define TK_STAR 354 +#define TK_STATEMENT 355 +#define TK_STRICT 356 +#define TK_STRING 357 +#define TK_TIMES 358 +#define TK_VALUES 359 +#define TK_VARIABLE 360 +#define TK_WAL 361 #define TK_NK_SPACE 600 #define TK_NK_COMMENT 601 #define TK_NK_ILLEGAL 602 // #define TK_NK_HEX 603 // hex number 0x123 -#define TK_NK_OCT 604 // oct number +#define TK_NK_OCT 604 // oct number // #define TK_NK_BIN 605 // bin format data 0b111 -#define TK_BATCH_SCAN 606 -#define TK_NO_BATCH_SCAN 607 -#define TK_SORT_FOR_GROUP 608 -#define TK_PARTITION_FIRST 609 +#define TK_BATCH_SCAN 606 +#define TK_NO_BATCH_SCAN 607 +#define TK_SORT_FOR_GROUP 608 +#define TK_PARTITION_FIRST 609 #define TK_PARA_TABLES_SORT 610 #define TK_SMALLDATA_TS_SORT 611 diff --git a/include/libs/nodes/cmdnodes.h b/include/libs/nodes/cmdnodes.h index 2dd6512a73..c428741d53 100644 --- a/include/libs/nodes/cmdnodes.h +++ b/include/libs/nodes/cmdnodes.h @@ -102,6 +102,10 @@ typedef struct SDatabaseOptions { int32_t sstTrigger; int32_t tablePrefix; int32_t tableSuffix; + int32_t s3ChunkSize; + int32_t s3KeepLocal; + SValueNode* s3KeepLocalStr; + int8_t s3Compact; int8_t withArbitrator; } SDatabaseOptions; @@ -140,6 +144,11 @@ typedef struct STrimDatabaseStmt { int32_t maxSpeed; } STrimDatabaseStmt; +typedef struct SS3MigrateDatabaseStmt { + ENodeType type; + char dbName[TSDB_DB_NAME_LEN]; +} SS3MigrateDatabaseStmt; + typedef struct SCompactDatabaseStmt { ENodeType type; char dbName[TSDB_DB_NAME_LEN]; diff --git a/include/util/tconfig.h b/include/util/tconfig.h index f2a9446700..45abe2ff83 100644 --- a/include/util/tconfig.h +++ b/include/util/tconfig.h @@ -51,11 +51,7 @@ typedef enum { CFG_DTYPE_TIMEZONE } ECfgDataType; -typedef enum { - CFG_SCOPE_SERVER, - CFG_SCOPE_CLIENT, - CFG_SCOPE_BOTH -} ECfgScopeType; +typedef enum { CFG_SCOPE_SERVER, CFG_SCOPE_CLIENT, CFG_SCOPE_BOTH } ECfgScopeType; typedef enum { CFG_DYN_NONE = 0, @@ -138,6 +134,7 @@ void cfgDumpItemValue(SConfigItem *pItem, char *buf, int32_t bufSize, int32_t *p void cfgDumpItemScope(SConfigItem *pItem, char *buf, int32_t bufSize, int32_t *pLen); void cfgDumpCfg(SConfig *pCfg, bool tsc, bool dump); +void cfgDumpCfgS3(SConfig *pCfg, bool tsc, bool dump); int32_t cfgGetApollUrl(const char **envCmd, const char *envFile, char *apolloUrl); diff --git a/include/util/tdef.h b/include/util/tdef.h index bc439ddb35..1a0bba9e58 100644 --- a/include/util/tdef.h +++ b/include/util/tdef.h @@ -201,8 +201,8 @@ typedef enum ELogicConditionType { #define TSDB_POINTER_PRINT_BYTES 18 // 0x1122334455667788 // ACCOUNT is a 32 bit positive integer // this is the length of its string representation, including the terminator zero -#define TSDB_ACCT_ID_LEN 11 -#define TSDB_NODE_ID_LEN 11 +#define TSDB_ACCT_ID_LEN 11 +#define TSDB_NODE_ID_LEN 11 #define TSDB_VGROUP_ID_LEN 11 #define TSDB_MAX_COLUMNS 4096 @@ -297,8 +297,8 @@ typedef enum ELogicConditionType { #define TSDB_DNODE_CONFIG_LEN 128 #define TSDB_DNODE_VALUE_LEN 256 -#define TSDB_CLUSTER_VALUE_LEN 1000 -#define TSDB_GRANT_LOG_COL_LEN 15600 +#define TSDB_CLUSTER_VALUE_LEN 1000 +#define TSDB_GRANT_LOG_COL_LEN 15600 #define TSDB_ACTIVE_KEY_LEN 109 #define TSDB_CONN_ACTIVE_KEY_LEN 255 @@ -428,6 +428,16 @@ typedef enum ELogicConditionType { #define TSDB_MAX_HASH_SUFFIX (TSDB_TABLE_NAME_LEN - 2) #define TSDB_DEFAULT_HASH_SUFFIX 0 +#define TSDB_MIN_S3_CHUNK_SIZE (32 * 1024) +#define TSDB_MAX_S3_CHUNK_SIZE (1024 * 1024) +#define TSDB_DEFAULT_S3_CHUNK_SIZE (256 * 1024) +#define TSDB_MIN_S3_KEEP_LOCAL (1 * 1440) // unit minute +#define TSDB_MAX_S3_KEEP_LOCAL (365000 * 1440) +#define TSDB_DEFAULT_S3_KEEP_LOCAL (3650 * 1440) +#define TSDB_MIN_S3_COMPACT 0 +#define TSDB_MAX_S3_COMPACT 1 +#define TSDB_DEFAULT_S3_COMPACT 0 + #define TSDB_DB_MIN_WAL_RETENTION_PERIOD -1 #define TSDB_REP_DEF_DB_WAL_RET_PERIOD 3600 #define TSDB_REPS_DEF_DB_WAL_RET_PERIOD 3600 @@ -543,12 +553,12 @@ enum { SND_WORKER_TYPE__UNIQUE, }; -#define DEFAULT_HANDLE 0 -#define MNODE_HANDLE 1 -#define QNODE_HANDLE -1 -#define SNODE_HANDLE -2 -#define VNODE_HANDLE -3 -#define CLIENT_HANDLE -5 +#define DEFAULT_HANDLE 0 +#define MNODE_HANDLE 1 +#define QNODE_HANDLE -1 +#define SNODE_HANDLE -2 +#define VNODE_HANDLE -3 +#define CLIENT_HANDLE -5 #define TSDB_CONFIG_OPTION_LEN 32 #define TSDB_CONFIG_VALUE_LEN 64 @@ -568,13 +578,13 @@ enum { // sort page size by default #define DEFAULT_PAGESIZE 4096 -#define VNODE_TIMEOUT_SEC 60 -#define MNODE_TIMEOUT_SEC 60 +#define VNODE_TIMEOUT_SEC 60 +#define MNODE_TIMEOUT_SEC 60 -#define MONITOR_TABLENAME_LEN 200 -#define MONITOR_TAG_NAME_LEN 100 -#define MONITOR_TAG_VALUE_LEN 300 -#define MONITOR_METRIC_NAME_LEN 100 +#define MONITOR_TABLENAME_LEN 200 +#define MONITOR_TAG_NAME_LEN 100 +#define MONITOR_TAG_VALUE_LEN 300 +#define MONITOR_METRIC_NAME_LEN 100 #ifdef __cplusplus } #endif diff --git a/source/common/CMakeLists.txt b/source/common/CMakeLists.txt index d3df1345df..eb3dd95e95 100644 --- a/source/common/CMakeLists.txt +++ b/source/common/CMakeLists.txt @@ -16,14 +16,15 @@ ENDIF () IF (TD_STORAGE) ADD_DEFINITIONS(-D_STORAGE) TARGET_LINK_LIBRARIES(common PRIVATE storage) +ENDIF () +IF (TD_ENTERPRISE) IF(${BUILD_WITH_S3}) add_definitions(-DUSE_S3) ELSEIF(${BUILD_WITH_COS}) add_definitions(-DUSE_COS) ENDIF() - -ENDIF () +ENDIF() target_include_directories( common diff --git a/source/common/src/cos.c b/source/common/src/cos.c index fcc777ac99..990bfdcea3 100644 --- a/source/common/src/cos.c +++ b/source/common/src/cos.c @@ -53,6 +53,100 @@ int32_t s3Init() { return 0; /*s3Begin();*/ } void s3CleanUp() { /*s3End();*/ } +static int32_t s3ListBucket(char const *bucketname); + +int32_t s3CheckCfg() { + int32_t code = 0; + + code = s3Begin(); + if (code != 0) { + fprintf(stderr, "failed to initialize s3.\n"); + goto _exit; + } + + // test put + char testdata[17] = "0123456789abcdef"; + const char *objectname[] = {"s3test.txt"}; + char path[PATH_MAX] = {0}; + int ds_len = strlen(TD_DIRSEP); + int tmp_len = strlen(tsTempDir); + + snprintf(path, PATH_MAX, "%s", tsTempDir); + if (strncmp(tsTempDir + tmp_len - ds_len, TD_DIRSEP, ds_len) != 0) { + snprintf(path + tmp_len, PATH_MAX, "%s", TD_DIRSEP); + snprintf(path + tmp_len + ds_len, PATH_MAX, "%s", objectname[0]); + } else { + snprintf(path + tmp_len, PATH_MAX, "%s", objectname[0]); + } + + TdFilePtr fp = taosOpenFile(path, TD_FILE_CREATE | TD_FILE_WRITE | TD_FILE_READ | TD_FILE_TRUNC); + if (!fp) { + code = TAOS_SYSTEM_ERROR(errno); + fprintf(stderr, "failed to open test file: %s.\n", path); + // uError("ERROR: %s Failed to open %s", __func__, path); + goto _exit; + } + if (taosWriteFile(fp, testdata, strlen(testdata)) < 0) { + code = TAOS_SYSTEM_ERROR(errno); + fprintf(stderr, "failed to write test file: %s.\n", path); + goto _exit; + } + if (taosFsyncFile(fp) < 0) { + code = TAOS_SYSTEM_ERROR(errno); + fprintf(stderr, "failed to fsync test file: %s.\n", path); + goto _exit; + } + taosCloseFile(&fp); + + fprintf(stderr, "\nstart to put object: %s, file: %s content: %s\n", objectname[0], path, testdata); + code = s3PutObjectFromFileOffset(path, objectname[0], 0, 16); + if (code != 0) { + fprintf(stderr, "put object %s : failed.\n", objectname[0]); + goto _exit; + } + fprintf(stderr, "put object %s: success.\n\n", objectname[0]); + + // list buckets + fprintf(stderr, "start to list bucket %s by prefix s3.\n", tsS3BucketName); + code = s3ListBucket(tsS3BucketName); + if (code != 0) { + fprintf(stderr, "listing bucket %s : failed.\n", tsS3BucketName); + goto _exit; + } + fprintf(stderr, "listing bucket %s: success.\n\n", tsS3BucketName); + + // test range get + uint8_t *pBlock = NULL; + int c_offset = 10; + int c_len = 6; + + fprintf(stderr, "start to range get object %s offset: %d len: %d.\n", objectname[0], c_offset, c_len); + code = s3GetObjectBlock(objectname[0], c_offset, c_len, true, &pBlock); + if (code != 0) { + fprintf(stderr, "get object %s : failed.\n", objectname[0]); + goto _exit; + } + char buf[7] = {0}; + memcpy(buf, pBlock, c_len); + taosMemoryFree(pBlock); + fprintf(stderr, "object content: %s\n", buf); + fprintf(stderr, "get object %s: success.\n\n", objectname[0]); + + // delete test object + fprintf(stderr, "start to delete object: %s.\n", objectname[0]); + code = s3DeleteObjects(objectname, 1); + if (code != 0) { + fprintf(stderr, "delete object %s : failed.\n", objectname[0]); + goto _exit; + } + fprintf(stderr, "delete object %s: success.\n\n", objectname[0]); + + s3End(); + +_exit: + return code; +} + static int should_retry() { /* if (retriesG--) { @@ -85,7 +179,7 @@ typedef struct { } TS3GetData; typedef struct { - char err_msg[128]; + char err_msg[512]; S3Status status; uint64_t content_length; char *buf; @@ -137,6 +231,30 @@ static void responseCompleteCallback(S3Status status, const S3ErrorDetails *erro } } +static SArray *getListByPrefix(const char *prefix); +static void s3FreeObjectKey(void *pItem); + +static int32_t s3ListBucket(char const *bucketname) { + int32_t code = 0; + + SArray *objectArray = getListByPrefix("s3"); + if (objectArray == NULL) { + return -1; + } + + const char **object_name = TARRAY_DATA(objectArray); + int size = TARRAY_SIZE(objectArray); + + fprintf(stderr, "objects:\n"); + for (int i = 0; i < size; ++i) { + fprintf(stderr, "%s\n", object_name[i]); + } + + taosArrayDestroyEx(objectArray, s3FreeObjectKey); + + return code; +} + typedef struct growbuffer { // The total number of bytes, and the start byte int size; @@ -471,10 +589,11 @@ static int32_t s3PutObjectFromFileSimple(S3BucketContext *bucket_context, char c } while (S3_status_is_retryable(data->status) && should_retry()); if (data->status != S3StatusOK) { - s3PrintError(__FILE__, __LINE__, __func__, data->status, data->err_msg); + // s3PrintError(__FILE__, __LINE__, __func__, data->status, data->err_msg); + s3PrintError(NULL, __LINE__, __func__, data->status, data->err_msg); code = TAOS_SYSTEM_ERROR(EIO); } else if (data->contentLength) { - uError("%s Failed to read remaining %llu bytes from input", __func__, (unsigned long long)data->contentLength); + uError("%s Failed to put remaining %llu bytes", __func__, (unsigned long long)data->contentLength); code = TAOS_SYSTEM_ERROR(EIO); } @@ -830,6 +949,66 @@ int32_t s3PutObjectFromFile2(const char *file, const char *object_name, int8_t w return code; } +int32_t s3PutObjectFromFileOffset(const char *file, const char *object_name, int64_t offset, int64_t size) { + int32_t code = 0; + int32_t lmtime = 0; + const char *filename = 0; + uint64_t contentLength = 0; + const char *cacheControl = 0, *contentType = 0, *md5 = 0; + const char *contentDispositionFilename = 0, *contentEncoding = 0; + int64_t expires = -1; + S3CannedAcl cannedAcl = S3CannedAclPrivate; + int metaPropertiesCount = 0; + S3NameValue metaProperties[S3_MAX_METADATA_COUNT]; + char useServerSideEncryption = 0; + put_object_callback_data data = {0}; + + if (taosStatFile(file, &contentLength, &lmtime, NULL) < 0) { + code = TAOS_SYSTEM_ERROR(errno); + uError("ERROR: %s Failed to stat file %s: ", __func__, file); + return code; + } + + contentLength = size; + + if (!(data.infileFD = taosOpenFile(file, TD_FILE_READ))) { + code = TAOS_SYSTEM_ERROR(errno); + uError("ERROR: %s Failed to open file %s: ", __func__, file); + return code; + } + if (taosLSeekFile(data.infileFD, offset, SEEK_SET) < 0) { + taosCloseFile(&data.infileFD); + code = TAOS_SYSTEM_ERROR(errno); + return code; + } + + data.totalContentLength = data.totalOriginalContentLength = data.contentLength = data.originalContentLength = + contentLength; + + S3BucketContext bucketContext = {0, tsS3BucketName, protocolG, uriStyleG, tsS3AccessKeyId, tsS3AccessKeySecret, + 0, awsRegionG}; + + S3PutProperties putProperties = {contentType, md5, + cacheControl, contentDispositionFilename, + contentEncoding, expires, + cannedAcl, metaPropertiesCount, + metaProperties, useServerSideEncryption}; + + if (contentLength <= MULTIPART_CHUNK_SIZE) { + code = s3PutObjectFromFileSimple(&bucketContext, object_name, contentLength, &putProperties, &data); + } else { + code = s3PutObjectFromFileWithoutCp(&bucketContext, object_name, contentLength, &putProperties, &data); + } + + if (data.infileFD) { + taosCloseFile(&data.infileFD); + } else if (data.gb) { + growbuffer_destroy(data.gb); + } + + return code; +} + typedef struct list_bucket_callback_data { char err_msg[512]; S3Status status; @@ -888,7 +1067,7 @@ static SArray *getListByPrefix(const char *prefix) { const char *marker = 0, *delimiter = 0; int maxkeys = 0, allDetails = 0; - list_bucket_callback_data data; + list_bucket_callback_data data = {0}; data.objectArray = taosArrayInit(32, sizeof(void *)); if (!data.objectArray) { uError("%s: %s", __func__, "out of memoty"); @@ -918,14 +1097,17 @@ static SArray *getListByPrefix(const char *prefix) { return data.objectArray; } } else { - s3PrintError(__FILE__, __LINE__, __func__, data.status, data.err_msg); + uError("failed to list with prefix %s: %s", prefix, S3_get_status_name(data.status)); + // s3PrintError(__FILE__, __LINE__, __func__, data.status, data.err_msg); } taosArrayDestroyEx(data.objectArray, s3FreeObjectKey); return NULL; } -void s3DeleteObjects(const char *object_name[], int nobject) { +int32_t s3DeleteObjects(const char *object_name[], int nobject) { + int32_t code = 0; + S3BucketContext bucketContext = {0, tsS3BucketName, protocolG, uriStyleG, tsS3AccessKeyId, tsS3AccessKeySecret, 0, awsRegionG}; S3ResponseHandler responseHandler = {0, &responseCompleteCallback}; @@ -938,8 +1120,11 @@ void s3DeleteObjects(const char *object_name[], int nobject) { if ((cbd.status != S3StatusOK) && (cbd.status != S3StatusErrorPreconditionFailed)) { s3PrintError(__FILE__, __LINE__, __func__, cbd.status, cbd.err_msg); + code = -1; } } + + return code; } void s3DeleteObjectsByPrefix(const char *prefix) { @@ -991,12 +1176,12 @@ int32_t s3GetObjectBlock(const char *object_name, int64_t offset, int64_t size, } while (S3_status_is_retryable(cbd.status) && should_retry()); if (cbd.status != S3StatusOK) { - uError("%s: %d(%s)", __func__, cbd.status, cbd.err_msg); + uError("%s: %d/%s(%s)", __func__, cbd.status, S3_get_status_name(cbd.status), cbd.err_msg); return TAOS_SYSTEM_ERROR(EIO); } if (check && cbd.buf_pos != size) { - uError("%s: %d(%s)", __func__, cbd.status, cbd.err_msg); + uError("%s: %d/%s(%s)", __func__, cbd.status, S3_get_status_name(cbd.status), cbd.err_msg); return TAOS_SYSTEM_ERROR(EIO); } @@ -1233,7 +1418,7 @@ void s3DeleteObjectsByPrefix(const char *prefix_str) { cos_pool_destroy(p); } -void s3DeleteObjects(const char *object_name[], int nobject) { +int32_t s3DeleteObjects(const char *object_name[], int nobject) { cos_pool_t *p = NULL; int is_cname = 0; cos_string_t bucket; @@ -1267,6 +1452,8 @@ void s3DeleteObjects(const char *object_name[], int nobject) { } else { cos_warn_log("delete objects failed\n"); } + + return 0; } bool s3Exists(const char *object_name) { @@ -1535,8 +1722,9 @@ int32_t s3Init() { return 0; } void s3CleanUp() {} int32_t s3PutObjectFromFile(const char *file, const char *object) { return 0; } int32_t s3PutObjectFromFile2(const char *file, const char *object, int8_t withcp) { return 0; } +int32_t s3PutObjectFromFileOffset(const char *file, const char *object_name, int64_t offset, int64_t size) { return 0; } void s3DeleteObjectsByPrefix(const char *prefix) {} -void s3DeleteObjects(const char *object_name[], int nobject) {} +int32_t s3DeleteObjects(const char *object_name[], int nobject) { return 0; } bool s3Exists(const char *object_name) { return false; } bool s3Get(const char *object_name, const char *path) { return false; } int32_t s3GetObjectBlock(const char *object_name, int64_t offset, int64_t size, bool check, uint8_t **ppBlock) { diff --git a/source/common/src/systable.c b/source/common/src/systable.c index 3d3b40507d..043289870c 100644 --- a/source/common/src/systable.c +++ b/source/common/src/systable.c @@ -24,7 +24,7 @@ #define SYSTABLE_SCH_TABLE_NAME_LEN ((TSDB_TABLE_NAME_LEN - 1) + VARSTR_HEADER_SIZE) #define SYSTABLE_SCH_DB_NAME_LEN ((TSDB_DB_NAME_LEN - 1) + VARSTR_HEADER_SIZE) #define SYSTABLE_SCH_COL_NAME_LEN ((TSDB_COL_NAME_LEN - 1) + VARSTR_HEADER_SIZE) -#define SYSTABLE_SCH_VIEW_NAME_LEN ((TSDB_VIEW_NAME_LEN - 1) + VARSTR_HEADER_SIZE) +#define SYSTABLE_SCH_VIEW_NAME_LEN ((TSDB_VIEW_NAME_LEN - 1) + VARSTR_HEADER_SIZE) // clang-format off static const SSysDbTableSchema dnodesSchema[] = { @@ -117,6 +117,9 @@ static const SSysDbTableSchema userDBSchema[] = { {.name = "table_suffix", .bytes = 2, .type = TSDB_DATA_TYPE_SMALLINT, .sysInfo = true}, {.name = "tsdb_pagesize", .bytes = 4, .type = TSDB_DATA_TYPE_INT, .sysInfo = true}, {.name = "keep_time_offset", .bytes = 4, .type = TSDB_DATA_TYPE_INT, .sysInfo = false}, + {.name = "s3_chunksize", .bytes = 4, .type = TSDB_DATA_TYPE_INT, .sysInfo = true}, + {.name = "s3_keeplocal", .bytes = 10 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, + {.name = "s3_compact", .bytes = 1, .type = TSDB_DATA_TYPE_TINYINT, .sysInfo = true}, {.name = "with_arbitrator", .bytes = 1, .type = TSDB_DATA_TYPE_TINYINT, .sysInfo = true}, {.name = "encrypt_algorithm", .bytes = TSDB_ENCRYPT_ALGO_STR_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, }; diff --git a/source/common/src/tglobal.c b/source/common/src/tglobal.c index 5b8f54cfa5..c7ba7849ff 100644 --- a/source/common/src/tglobal.c +++ b/source/common/src/tglobal.c @@ -275,7 +275,9 @@ float tsSinkDataRate = 2.0; int32_t tsStreamNodeCheckInterval = 16; int32_t tsTtlUnit = 86400; int32_t tsTtlPushIntervalSec = 10; -int32_t tsTrimVDbIntervalSec = 60 * 60; // interval of trimming db in all vgroups +int32_t tsTrimVDbIntervalSec = 60 * 60; // interval of trimming db in all vgroups +int32_t tsS3MigrateIntervalSec = 60 * 60; // interval of s3migrate db in all vgroups +bool tsS3MigrateEnabled = 1; int32_t tsGrantHBInterval = 60; int32_t tsUptimeInterval = 300; // seconds char tsUdfdResFuncs[512] = ""; // udfd resident funcs that teardown when udfd exits @@ -301,7 +303,7 @@ char tsS3Hostname[TSDB_FQDN_LEN] = ""; int32_t tsS3BlockSize = -1; // number of tsdb pages (4096) int32_t tsS3BlockCacheSize = 16; // number of blocks int32_t tsS3PageCacheSize = 4096; // number of pages -int32_t tsS3UploadDelaySec = 60 * 60 * 24; +int32_t tsS3UploadDelaySec = 60; bool tsExperimental = true; @@ -361,7 +363,9 @@ int32_t taosSetS3Cfg(SConfig *pCfg) { } if (tsS3BucketName[0] != '<') { #if defined(USE_COS) || defined(USE_S3) - if (tsDiskCfgNum > 1) tsS3Enabled = true; +#ifdef TD_ENTERPRISE + /*if (tsDiskCfgNum > 1) */ tsS3Enabled = true; +#endif tsS3StreamEnabled = true; #endif } @@ -688,8 +692,8 @@ static int32_t taosAddServerCfg(SConfig *pCfg) { if (cfgAddInt32(pCfg, "syncHeartbeatTimeout", tsHeartbeatTimeout, 10, 1000 * 60 * 24 * 2, CFG_SCOPE_SERVER, CFG_DYN_NONE) != 0) return -1; - if (cfgAddInt32(pCfg, "syncSnapReplMaxWaitN", tsSnapReplMaxWaitN, 16, - (TSDB_SYNC_SNAP_BUFFER_SIZE >> 2), CFG_SCOPE_SERVER, CFG_DYN_NONE) != 0) + if (cfgAddInt32(pCfg, "syncSnapReplMaxWaitN", tsSnapReplMaxWaitN, 16, (TSDB_SYNC_SNAP_BUFFER_SIZE >> 2), + CFG_SCOPE_SERVER, CFG_DYN_NONE) != 0) return -1; if (cfgAddInt32(pCfg, "arbHeartBeatIntervalSec", tsArbHeartBeatIntervalSec, 1, 60 * 24 * 2, CFG_SCOPE_SERVER, @@ -713,7 +717,8 @@ static int32_t taosAddServerCfg(SConfig *pCfg) { if (cfgAddInt32(pCfg, "monitorMaxLogs", tsMonitorMaxLogs, 1, 1000000, CFG_SCOPE_SERVER, CFG_DYN_NONE) != 0) return -1; if (cfgAddBool(pCfg, "monitorComp", tsMonitorComp, CFG_SCOPE_SERVER, CFG_DYN_NONE) != 0) return -1; if (cfgAddBool(pCfg, "monitorLogProtocol", tsMonitorLogProtocol, CFG_SCOPE_SERVER, CFG_DYN_SERVER) != 0) return -1; - if (cfgAddInt32(pCfg, "monitorIntervalForBasic", tsMonitorIntervalForBasic, 1, 200000, CFG_SCOPE_SERVER, CFG_DYN_NONE) != 0) + if (cfgAddInt32(pCfg, "monitorIntervalForBasic", tsMonitorIntervalForBasic, 1, 200000, CFG_SCOPE_SERVER, + CFG_DYN_NONE) != 0) return -1; if (cfgAddBool(pCfg, "monitorForceV2", tsMonitorForceV2, CFG_SCOPE_SERVER, CFG_DYN_NONE) != 0) return -1; @@ -758,6 +763,10 @@ static int32_t taosAddServerCfg(SConfig *pCfg) { if (cfgAddInt32(pCfg, "trimVDbIntervalSec", tsTrimVDbIntervalSec, 1, 100000, CFG_SCOPE_SERVER, CFG_DYN_ENT_SERVER) != 0) return -1; + if (cfgAddInt32(pCfg, "s3MigrateIntervalSec", tsS3MigrateIntervalSec, 600, 100000, CFG_SCOPE_SERVER, + CFG_DYN_ENT_SERVER) != 0) + return -1; + if (cfgAddBool(pCfg, "s3MigrateEnabled", tsS3MigrateEnabled, CFG_SCOPE_SERVER, CFG_DYN_ENT_SERVER) != 0) return -1; if (cfgAddInt32(pCfg, "uptimeInterval", tsUptimeInterval, 1, 100000, CFG_SCOPE_SERVER, CFG_DYN_NONE) != 0) return -1; if (cfgAddInt32(pCfg, "queryRsmaTolerance", tsQueryRsmaTolerance, 0, 900000, CFG_SCOPE_SERVER, CFG_DYN_NONE) != 0) return -1; @@ -776,8 +785,7 @@ static int32_t taosAddServerCfg(SConfig *pCfg) { if (cfgAddBool(pCfg, "disableStream", tsDisableStream, CFG_SCOPE_SERVER, CFG_DYN_ENT_SERVER) != 0) return -1; if (cfgAddInt64(pCfg, "streamBufferSize", tsStreamBufferSize, 0, INT64_MAX, CFG_SCOPE_SERVER, CFG_DYN_NONE) != 0) return -1; - if (cfgAddInt64(pCfg, "streamAggCnt", tsStreamAggCnt, 2, INT32_MAX, CFG_SCOPE_SERVER, CFG_DYN_NONE) != 0) - return -1; + if (cfgAddInt64(pCfg, "streamAggCnt", tsStreamAggCnt, 2, INT32_MAX, CFG_SCOPE_SERVER, CFG_DYN_NONE) != 0) return -1; if (cfgAddInt32(pCfg, "checkpointInterval", tsStreamCheckpointInterval, 60, 1200, CFG_SCOPE_SERVER, CFG_DYN_ENT_SERVER) != 0) @@ -808,6 +816,7 @@ static int32_t taosAddServerCfg(SConfig *pCfg) { if (cfgAddString(pCfg, "s3Accesskey", tsS3AccessKey, CFG_SCOPE_SERVER, CFG_DYN_NONE) != 0) return -1; if (cfgAddString(pCfg, "s3Endpoint", tsS3Endpoint, CFG_SCOPE_SERVER, CFG_DYN_NONE) != 0) return -1; if (cfgAddString(pCfg, "s3BucketName", tsS3BucketName, CFG_SCOPE_SERVER, CFG_DYN_NONE) != 0) return -1; + /* if (cfgAddInt32(pCfg, "s3BlockSize", tsS3BlockSize, -1, 1024 * 1024, CFG_SCOPE_SERVER, CFG_DYN_ENT_SERVER) != 0) return -1; if (tsS3BlockSize > -1 && tsS3BlockSize < 1024) { @@ -817,10 +826,11 @@ static int32_t taosAddServerCfg(SConfig *pCfg) { if (cfgAddInt32(pCfg, "s3BlockCacheSize", tsS3BlockCacheSize, 4, 1024 * 1024, CFG_SCOPE_SERVER, CFG_DYN_ENT_SERVER) != 0) return -1; + */ if (cfgAddInt32(pCfg, "s3PageCacheSize", tsS3PageCacheSize, 4, 1024 * 1024 * 1024, CFG_SCOPE_SERVER, CFG_DYN_ENT_SERVER) != 0) return -1; - if (cfgAddInt32(pCfg, "s3UploadDelaySec", tsS3UploadDelaySec, 60 * 1, 60 * 60 * 24 * 30, CFG_SCOPE_SERVER, + if (cfgAddInt32(pCfg, "s3UploadDelaySec", tsS3UploadDelaySec, 1, 60 * 60 * 24 * 30, CFG_SCOPE_SERVER, CFG_DYN_ENT_SERVER) != 0) return -1; @@ -1262,8 +1272,8 @@ static int32_t taosSetServerCfg(SConfig *pCfg) { tsResolveFQDNRetryTime = cfgGetItem(pCfg, "resolveFQDNRetryTime")->i32; tsMinDiskFreeSize = cfgGetItem(pCfg, "minDiskFreeSize")->i64; - tsS3BlockSize = cfgGetItem(pCfg, "s3BlockSize")->i32; - tsS3BlockCacheSize = cfgGetItem(pCfg, "s3BlockCacheSize")->i32; + // tsS3BlockSize = cfgGetItem(pCfg, "s3BlockSize")->i32; + // tsS3BlockCacheSize = cfgGetItem(pCfg, "s3BlockCacheSize")->i32; tsS3PageCacheSize = cfgGetItem(pCfg, "s3PageCacheSize")->i32; tsS3UploadDelaySec = cfgGetItem(pCfg, "s3UploadDelaySec")->i32; @@ -1541,6 +1551,8 @@ static int32_t taosCfgDynamicOptionsForServer(SConfig *pCfg, char *name) { {"ttlBatchDropNum", &tsTtlBatchDropNum}, {"ttlFlushThreshold", &tsTtlFlushThreshold}, {"ttlPushInterval", &tsTtlPushIntervalSec}, + {"s3MigrateIntervalSec", &tsS3MigrateIntervalSec}, + {"s3MigrateEnabled", &tsS3MigrateEnabled}, //{"s3BlockSize", &tsS3BlockSize}, {"s3BlockCacheSize", &tsS3BlockCacheSize}, {"s3PageCacheSize", &tsS3PageCacheSize}, diff --git a/source/common/src/tmsg.c b/source/common/src/tmsg.c index a9ad6ec75b..a563987b56 100644 --- a/source/common/src/tmsg.c +++ b/source/common/src/tmsg.c @@ -1475,9 +1475,7 @@ int32_t tDeserializeSStatisReq(void *buf, int32_t bufLen, SStatisReq *pReq) { return 0; } -void tFreeSStatisReq(SStatisReq *pReq) { - taosMemoryFreeClear(pReq->pCont); -} +void tFreeSStatisReq(SStatisReq *pReq) { taosMemoryFreeClear(pReq->pCont); } // int32_t tSerializeSCreateAcctReq(void *buf, int32_t bufLen, SCreateAcctReq *pReq) { // SEncoder encoder = {0}; @@ -1876,7 +1874,7 @@ int32_t tSerializeSGetUserAuthRspImpl(SEncoder *pEncoder, SGetUserAuthRsp *pRsp) char *tb = taosHashIterate(pRsp->readTbs, NULL); while (tb != NULL) { size_t keyLen = 0; - void * key = taosHashGetKey(tb, &keyLen); + void *key = taosHashGetKey(tb, &keyLen); if (tEncodeI32(pEncoder, keyLen) < 0) return -1; if (tEncodeCStr(pEncoder, key) < 0) return -1; @@ -1891,7 +1889,7 @@ int32_t tSerializeSGetUserAuthRspImpl(SEncoder *pEncoder, SGetUserAuthRsp *pRsp) tb = taosHashIterate(pRsp->writeTbs, NULL); while (tb != NULL) { size_t keyLen = 0; - void * key = taosHashGetKey(tb, &keyLen); + void *key = taosHashGetKey(tb, &keyLen); if (tEncodeI32(pEncoder, keyLen) < 0) return -1; if (tEncodeCStr(pEncoder, key) < 0) return -1; @@ -1906,7 +1904,7 @@ int32_t tSerializeSGetUserAuthRspImpl(SEncoder *pEncoder, SGetUserAuthRsp *pRsp) tb = taosHashIterate(pRsp->alterTbs, NULL); while (tb != NULL) { size_t keyLen = 0; - void * key = taosHashGetKey(tb, &keyLen); + void *key = taosHashGetKey(tb, &keyLen); if (tEncodeI32(pEncoder, keyLen) < 0) return -1; if (tEncodeCStr(pEncoder, key) < 0) return -1; @@ -1921,7 +1919,7 @@ int32_t tSerializeSGetUserAuthRspImpl(SEncoder *pEncoder, SGetUserAuthRsp *pRsp) tb = taosHashIterate(pRsp->readViews, NULL); while (tb != NULL) { size_t keyLen = 0; - void * key = taosHashGetKey(tb, &keyLen); + void *key = taosHashGetKey(tb, &keyLen); if (tEncodeI32(pEncoder, keyLen) < 0) return -1; if (tEncodeCStr(pEncoder, key) < 0) return -1; @@ -1936,7 +1934,7 @@ int32_t tSerializeSGetUserAuthRspImpl(SEncoder *pEncoder, SGetUserAuthRsp *pRsp) tb = taosHashIterate(pRsp->writeViews, NULL); while (tb != NULL) { size_t keyLen = 0; - void * key = taosHashGetKey(tb, &keyLen); + void *key = taosHashGetKey(tb, &keyLen); if (tEncodeI32(pEncoder, keyLen) < 0) return -1; if (tEncodeCStr(pEncoder, key) < 0) return -1; @@ -1951,7 +1949,7 @@ int32_t tSerializeSGetUserAuthRspImpl(SEncoder *pEncoder, SGetUserAuthRsp *pRsp) tb = taosHashIterate(pRsp->alterViews, NULL); while (tb != NULL) { size_t keyLen = 0; - void * key = taosHashGetKey(tb, &keyLen); + void *key = taosHashGetKey(tb, &keyLen); if (tEncodeI32(pEncoder, keyLen) < 0) return -1; if (tEncodeCStr(pEncoder, key) < 0) return -1; @@ -1966,7 +1964,7 @@ int32_t tSerializeSGetUserAuthRspImpl(SEncoder *pEncoder, SGetUserAuthRsp *pRsp) int32_t *useDb = taosHashIterate(pRsp->useDbs, NULL); while (useDb != NULL) { size_t keyLen = 0; - void * key = taosHashGetKey(useDb, &keyLen); + void *key = taosHashGetKey(useDb, &keyLen); if (tEncodeI32(pEncoder, keyLen) < 0) return -1; if (tEncodeCStr(pEncoder, key) < 0) return -1; @@ -3026,6 +3024,9 @@ int32_t tSerializeSCreateDbReq(void *buf, int32_t bufLen, SCreateDbReq *pReq) { } if (tEncodeI32(&encoder, pReq->tsdbPageSize) < 0) return -1; if (tEncodeI32(&encoder, pReq->keepTimeOffset) < 0) return -1; + if (tEncodeI32(&encoder, pReq->s3ChunkSize) < 0) return -1; + if (tEncodeI32(&encoder, pReq->s3KeepLocal) < 0) return -1; + if (tEncodeI8(&encoder, pReq->s3Compact) < 0) return -1; ENCODESQL(); @@ -3099,6 +3100,15 @@ int32_t tDeserializeSCreateDbReq(void *buf, int32_t bufLen, SCreateDbReq *pReq) if (tDecodeI32(&decoder, &pReq->keepTimeOffset) < 0) return -1; } + pReq->s3ChunkSize = TSDB_DEFAULT_S3_CHUNK_SIZE; + pReq->s3KeepLocal = TSDB_DEFAULT_S3_KEEP_LOCAL; + pReq->s3Compact = TSDB_DEFAULT_S3_COMPACT; + if (!tDecodeIsEnd(&decoder)) { + if (tDecodeI32(&decoder, &pReq->s3ChunkSize) < 0) return -1; + if (tDecodeI32(&decoder, &pReq->s3KeepLocal) < 0) return -1; + if (tDecodeI8(&decoder, &pReq->s3Compact) < 0) return -1; + } + DECODESQL(); pReq->withArbitrator = TSDB_DEFAULT_DB_WITH_ARBITRATOR; @@ -3146,6 +3156,10 @@ int32_t tSerializeSAlterDbReq(void *buf, int32_t bufLen, SAlterDbReq *pReq) { if (tEncodeI32(&encoder, pReq->walRetentionPeriod) < 0) return -1; if (tEncodeI32(&encoder, pReq->walRetentionSize) < 0) return -1; if (tEncodeI32(&encoder, pReq->keepTimeOffset) < 0) return -1; + + if (tEncodeI32(&encoder, pReq->s3KeepLocal) < 0) return -1; + if (tEncodeI8(&encoder, pReq->s3Compact) < 0) return -1; + ENCODESQL(); if (tEncodeI8(&encoder, pReq->withArbitrator) < 0) return -1; tEndEncode(&encoder); @@ -3196,6 +3210,13 @@ int32_t tDeserializeSAlterDbReq(void *buf, int32_t bufLen, SAlterDbReq *pReq) { if (tDecodeI32(&decoder, &pReq->keepTimeOffset) < 0) return -1; } + pReq->s3KeepLocal = TSDB_DEFAULT_S3_KEEP_LOCAL; + pReq->s3Compact = TSDB_DEFAULT_S3_COMPACT; + if (!tDecodeIsEnd(&decoder)) { + if (tDecodeI32(&decoder, &pReq->s3KeepLocal) < 0) return -1; + if (tDecodeI8(&decoder, &pReq->s3Compact) < 0) return -1; + } + DECODESQL(); pReq->withArbitrator = TSDB_DEFAULT_DB_WITH_ARBITRATOR; if (!tDecodeIsEnd(&decoder)) { @@ -3892,6 +3913,57 @@ int32_t tDeserializeSVTrimDbReq(void *buf, int32_t bufLen, SVTrimDbReq *pReq) { return 0; } +int32_t tSerializeSS3MigrateDbReq(void *buf, int32_t bufLen, SS3MigrateDbReq *pReq) { + SEncoder encoder = {0}; + tEncoderInit(&encoder, buf, bufLen); + + if (tStartEncode(&encoder) < 0) return -1; + if (tEncodeCStr(&encoder, pReq->db) < 0) return -1; + tEndEncode(&encoder); + + int32_t tlen = encoder.pos; + tEncoderClear(&encoder); + return tlen; +} + +int32_t tDeserializeSS3MigrateDbReq(void *buf, int32_t bufLen, SS3MigrateDbReq *pReq) { + SDecoder decoder = {0}; + tDecoderInit(&decoder, buf, bufLen); + + if (tStartDecode(&decoder) < 0) return -1; + if (tDecodeCStrTo(&decoder, pReq->db) < 0) return -1; + tEndDecode(&decoder); + + tDecoderClear(&decoder); + return 0; +} + +int32_t tSerializeSVS3MigrateDbReq(void *buf, int32_t bufLen, SVS3MigrateDbReq *pReq) { + SEncoder encoder = {0}; + tEncoderInit(&encoder, buf, bufLen); + + if (tStartEncode(&encoder) < 0) return -1; + if (tEncodeI32(&encoder, pReq->timestamp) < 0) return -1; + tEndEncode(&encoder); + + int32_t tlen = encoder.pos; + tEncoderClear(&encoder); + return tlen; +} + +int32_t tDeserializeSVS3MigrateDbReq(void *buf, int32_t bufLen, SVS3MigrateDbReq *pReq) { + SDecoder decoder = {0}; + tDecoderInit(&decoder, buf, bufLen); + + if (tStartDecode(&decoder) < 0) return -1; + if (tDecodeI32(&decoder, &pReq->timestamp) < 0) return -1; + + tEndDecode(&decoder); + + tDecoderClear(&decoder); + return 0; +} + int32_t tSerializeSVDropTtlTableReq(void *buf, int32_t bufLen, SVDropTtlTableReq *pReq) { SEncoder encoder = {0}; tEncoderInit(&encoder, buf, bufLen); @@ -3990,6 +4062,9 @@ int32_t tSerializeSDbCfgRspImpl(SEncoder *encoder, const SDbCfgRsp *pRsp) { if (tEncodeI32(encoder, pRsp->keepTimeOffset) < 0) return -1; if (tEncodeI8(encoder, pRsp->withArbitrator) < 0) return -1; if (tEncodeI8(encoder, pRsp->encryptAlgorithm) < 0) return -1; + if (tEncodeI32(encoder, pRsp->s3ChunkSize) < 0) return -1; + if (tEncodeI32(encoder, pRsp->s3KeepLocal) < 0) return -1; + if (tEncodeI8(encoder, pRsp->s3Compact) < 0) return -1; return 0; } @@ -4064,9 +4139,15 @@ int32_t tDeserializeSDbCfgRspImpl(SDecoder *decoder, SDbCfgRsp *pRsp) { } 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)) { if (tDecodeI8(decoder, &pRsp->withArbitrator) < 0) return -1; if (tDecodeI8(decoder, &pRsp->encryptAlgorithm) < 0) return -1; + if (tDecodeI32(decoder, &pRsp->s3ChunkSize) < 0) return -1; + if (tDecodeI32(decoder, &pRsp->s3KeepLocal) < 0) return -1; + if (tDecodeI8(decoder, &pRsp->s3Compact) < 0) return -1; } return 0; @@ -5092,7 +5173,7 @@ int32_t tSerializeSCreateVnodeReq(void *buf, int32_t bufLen, SCreateVnodeReq *pR if (tEncodeI16(&encoder, pReq->hashPrefix) < 0) return -1; if (tEncodeI16(&encoder, pReq->hashSuffix) < 0) return -1; if (tEncodeI32(&encoder, pReq->tsdbPageSize) < 0) return -1; - for (int32_t i = 0; i < 8; ++i) { + for (int32_t i = 0; i < 6; ++i) { if (tEncodeI64(&encoder, pReq->reserved[i]) < 0) return -1; } if (tEncodeI8(&encoder, pReq->learnerReplica) < 0) return -1; @@ -5104,6 +5185,9 @@ int32_t tSerializeSCreateVnodeReq(void *buf, int32_t bufLen, SCreateVnodeReq *pR if (tEncodeI32(&encoder, pReq->changeVersion) < 0) return -1; if (tEncodeI32(&encoder, pReq->keepTimeOffset) < 0) return -1; if (tEncodeI8(&encoder, pReq->encryptAlgorithm) < 0) return -1; + if (tEncodeI32(&encoder, pReq->s3ChunkSize) < 0) return -1; + if (tEncodeI32(&encoder, pReq->s3KeepLocal) < 0) return -1; + if (tEncodeI8(&encoder, pReq->s3Compact) < 0) return -1; tEndEncode(&encoder); @@ -5179,7 +5263,7 @@ int32_t tDeserializeSCreateVnodeReq(void *buf, int32_t bufLen, SCreateVnodeReq * if (tDecodeI16(&decoder, &pReq->hashPrefix) < 0) return -1; if (tDecodeI16(&decoder, &pReq->hashSuffix) < 0) return -1; if (tDecodeI32(&decoder, &pReq->tsdbPageSize) < 0) return -1; - for (int32_t i = 0; i < 8; ++i) { + for (int32_t i = 0; i < 6; ++i) { if (tDecodeI64(&decoder, &pReq->reserved[i]) < 0) return -1; } if (!tDecodeIsEnd(&decoder)) { @@ -5201,6 +5285,15 @@ int32_t tDeserializeSCreateVnodeReq(void *buf, int32_t bufLen, SCreateVnodeReq * if (tDecodeI8(&decoder, &pReq->encryptAlgorithm) < 0) return -1; } + pReq->s3ChunkSize = TSDB_DEFAULT_S3_CHUNK_SIZE; + pReq->s3KeepLocal = TSDB_DEFAULT_S3_KEEP_LOCAL; + pReq->s3Compact = TSDB_DEFAULT_S3_COMPACT; + if (!tDecodeIsEnd(&decoder)) { + if (tDecodeI32(&decoder, &pReq->s3ChunkSize) < 0) return -1; + if (tDecodeI32(&decoder, &pReq->s3KeepLocal) < 0) return -1; + if (tDecodeI8(&decoder, &pReq->s3Compact) < 0) return -1; + } + tEndDecode(&decoder); tDecoderClear(&decoder); return 0; @@ -5456,7 +5549,7 @@ int32_t tSerializeSAlterVnodeConfigReq(void *buf, int32_t bufLen, SAlterVnodeCon if (tEncodeI8(&encoder, pReq->walLevel) < 0) return -1; if (tEncodeI8(&encoder, pReq->strict) < 0) return -1; if (tEncodeI8(&encoder, pReq->cacheLast) < 0) return -1; - for (int32_t i = 0; i < 8; ++i) { + for (int32_t i = 0; i < 7; ++i) { if (tEncodeI64(&encoder, pReq->reserved[i]) < 0) return -1; } @@ -5467,6 +5560,10 @@ int32_t tSerializeSAlterVnodeConfigReq(void *buf, int32_t bufLen, SAlterVnodeCon if (tEncodeI32(&encoder, pReq->walRetentionPeriod) < 0) return -1; if (tEncodeI32(&encoder, pReq->walRetentionSize) < 0) return -1; if (tEncodeI32(&encoder, pReq->keepTimeOffset) < 0) return -1; + + if (tEncodeI32(&encoder, pReq->s3KeepLocal) < 0) return -1; + if (tEncodeI8(&encoder, pReq->s3Compact) < 0) return -1; + tEndEncode(&encoder); int32_t tlen = encoder.pos; @@ -5492,7 +5589,7 @@ int32_t tDeserializeSAlterVnodeConfigReq(void *buf, int32_t bufLen, SAlterVnodeC if (tDecodeI8(&decoder, &pReq->walLevel) < 0) return -1; if (tDecodeI8(&decoder, &pReq->strict) < 0) return -1; if (tDecodeI8(&decoder, &pReq->cacheLast) < 0) return -1; - for (int32_t i = 0; i < 8; ++i) { + for (int32_t i = 0; i < 7; ++i) { if (tDecodeI64(&decoder, &pReq->reserved[i]) < 0) return -1; } @@ -5518,6 +5615,13 @@ int32_t tDeserializeSAlterVnodeConfigReq(void *buf, int32_t bufLen, SAlterVnodeC if (tDecodeI32(&decoder, &pReq->keepTimeOffset) < 0) return -1; } + pReq->s3KeepLocal = TSDB_DEFAULT_S3_KEEP_LOCAL; + pReq->s3Compact = TSDB_DEFAULT_S3_COMPACT; + if (!tDecodeIsEnd(&decoder)) { + if (tDecodeI32(&decoder, &pReq->s3KeepLocal) < 0) return -1; + if (tDecodeI8(&decoder, &pReq->s3Compact) < 0) return -1; + } + tEndDecode(&decoder); tDecoderClear(&decoder); return 0; @@ -6571,9 +6675,7 @@ int32_t tDeserializeSMqAskEpReq(void *buf, int32_t bufLen, SMqAskEpReq *pReq) { return 0; } -void tDestroySMqHbRsp(SMqHbRsp *pRsp) { - taosArrayDestroy(pRsp->topicPrivileges); -} +void tDestroySMqHbRsp(SMqHbRsp *pRsp) { taosArrayDestroy(pRsp->topicPrivileges); } int32_t tSerializeSMqHbRsp(void *buf, int32_t bufLen, SMqHbRsp *pRsp) { SEncoder encoder = {0}; @@ -7359,27 +7461,27 @@ void tFreeSSchedulerHbRsp(SSchedulerHbRsp *pRsp) { taosArrayDestroy(pRsp->taskSt // return 0; // } -//int32_t tDeserializeSVCreateTbBatchRsp(void *buf, int32_t bufLen, SVCreateTbBatchRsp *pRsp) { - // SDecoder decoder = {0}; - // int32_t num = 0; - // tDecoderInit(&decoder, buf, bufLen); +// int32_t tDeserializeSVCreateTbBatchRsp(void *buf, int32_t bufLen, SVCreateTbBatchRsp *pRsp) { +// SDecoder decoder = {0}; +// int32_t num = 0; +// tDecoderInit(&decoder, buf, bufLen); - // if (tStartDecode(&decoder) < 0) return -1; - // if (tDecodeI32(&decoder, &num) < 0) return -1; - // if (num > 0) { - // pRsp->rspList = taosArrayInit(num, sizeof(SVCreateTbRsp)); - // if (NULL == pRsp->rspList) return -1; - // for (int32_t i = 0; i < num; ++i) { - // SVCreateTbRsp rsp = {0}; - // if (tDecodeI32(&decoder, &rsp.code) < 0) return -1; - // if (NULL == taosArrayPush(pRsp->rspList, &rsp)) return -1; - // } - // } else { - // pRsp->rspList = NULL; - // } - // tEndDecode(&decoder); +// if (tStartDecode(&decoder) < 0) return -1; +// if (tDecodeI32(&decoder, &num) < 0) return -1; +// if (num > 0) { +// pRsp->rspList = taosArrayInit(num, sizeof(SVCreateTbRsp)); +// if (NULL == pRsp->rspList) return -1; +// for (int32_t i = 0; i < num; ++i) { +// SVCreateTbRsp rsp = {0}; +// if (tDecodeI32(&decoder, &rsp.code) < 0) return -1; +// if (NULL == taosArrayPush(pRsp->rspList, &rsp)) return -1; +// } +// } else { +// pRsp->rspList = NULL; +// } +// tEndDecode(&decoder); - // tDecoderClear(&decoder); +// tDecoderClear(&decoder); // return 0; //} @@ -7656,8 +7758,8 @@ int32_t tSerializeSCMCreateStreamReq(void *buf, int32_t bufLen, const SCMCreateS if (tEncodeI32(&encoder, taosArrayGetSize(pReq->pVgroupVerList)) < 0) return -1; - for(int32_t i = 0; i < taosArrayGetSize(pReq->pVgroupVerList); ++i) { - SVgroupVer* p = taosArrayGet(pReq->pVgroupVerList, i); + for (int32_t i = 0; i < taosArrayGetSize(pReq->pVgroupVerList); ++i) { + SVgroupVer *p = taosArrayGet(pReq->pVgroupVerList, i); if (tEncodeI32(&encoder, p->vgId) < 0) return -1; if (tEncodeI64(&encoder, p->ver) < 0) return -1; } @@ -8921,7 +9023,7 @@ int32_t tEncodeMqDataRspCommon(SEncoder *pEncoder, const SMqDataRsp *pRsp) { for (int32_t i = 0; i < pRsp->blockNum; i++) { int32_t bLen = *(int32_t *)taosArrayGet(pRsp->blockDataLen, i); - void * data = taosArrayGetP(pRsp->blockData, i); + void *data = taosArrayGetP(pRsp->blockData, i); if (tEncodeBinary(pEncoder, (const uint8_t *)data, bLen) < 0) return -1; if (pRsp->withSchema) { SSchemaWrapper *pSW = (SSchemaWrapper *)taosArrayGetP(pRsp->blockSchema, i); @@ -8960,7 +9062,7 @@ int32_t tDecodeMqDataRspCommon(SDecoder *pDecoder, SMqDataRsp *pRsp) { } for (int32_t i = 0; i < pRsp->blockNum; i++) { - void * data; + void *data; uint64_t bLen; if (tDecodeBinaryAlloc(pDecoder, &data, &bLen) < 0) return -1; taosArrayPush(pRsp->blockData, &data); @@ -9020,7 +9122,7 @@ int32_t tEncodeSTaosxRsp(SEncoder *pEncoder, const STaosxRsp *pRsp) { if (tEncodeI32(pEncoder, pRsp->createTableNum) < 0) return -1; if (pRsp->createTableNum) { for (int32_t i = 0; i < pRsp->createTableNum; i++) { - void * createTableReq = taosArrayGetP(pRsp->createTableReq, i); + void *createTableReq = taosArrayGetP(pRsp->createTableReq, i); int32_t createTableLen = *(int32_t *)taosArrayGet(pRsp->createTableLen, i); if (tEncodeBinary(pEncoder, createTableReq, createTableLen) < 0) return -1; } @@ -9039,7 +9141,7 @@ int32_t tDecodeSTaosxRsp(SDecoder *pDecoder, STaosxRsp *pRsp, int8_t dataVersion pRsp->createTableLen = taosArrayInit(pRsp->createTableNum, sizeof(int32_t)); pRsp->createTableReq = taosArrayInit(pRsp->createTableNum, sizeof(void *)); for (int32_t i = 0; i < pRsp->createTableNum; i++) { - void * pCreate = NULL; + void *pCreate = NULL; uint64_t len; if (tDecodeBinaryAlloc(pDecoder, &pCreate, &len) < 0) return -1; int32_t l = (int32_t)len; @@ -9351,7 +9453,7 @@ void tDestroySubmitTbData(SSubmitTbData *pTbData, int32_t flag) { taosArrayDestroy(pTbData->aCol); } else { int32_t nRow = TARRAY_SIZE(pTbData->aRowP); - SRow ** rows = (SRow **)TARRAY_DATA(pTbData->aRowP); + SRow **rows = (SRow **)TARRAY_DATA(pTbData->aRowP); for (int32_t i = 0; i < nRow; ++i) { tRowDestroy(rows[i]); diff --git a/source/dnode/mgmt/CMakeLists.txt b/source/dnode/mgmt/CMakeLists.txt index 3ee3175a11..d72301279e 100644 --- a/source/dnode/mgmt/CMakeLists.txt +++ b/source/dnode/mgmt/CMakeLists.txt @@ -14,6 +14,14 @@ target_include_directories( PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/node_mgmt/inc" ) +IF (TD_ENTERPRISE) + IF(${BUILD_WITH_S3}) + add_definitions(-DUSE_S3) + ELSEIF(${BUILD_WITH_COS}) + add_definitions(-DUSE_COS) + ENDIF() +ENDIF() + IF (TD_LINUX_64 AND JEMALLOC_ENABLED) ADD_DEFINITIONS(-DTD_JEMALLOC_ENABLED -I${CMAKE_BINARY_DIR}/build/include -L${CMAKE_BINARY_DIR}/build/lib -Wl,-rpath,${CMAKE_BINARY_DIR}/build/lib -ljemalloc) SET(LINK_JEMALLOC "-L${CMAKE_BINARY_DIR}/build/lib -ljemalloc") diff --git a/source/dnode/mgmt/exe/dmMain.c b/source/dnode/mgmt/exe/dmMain.c index 3526b7daab..98459512f3 100644 --- a/source/dnode/mgmt/exe/dmMain.c +++ b/source/dnode/mgmt/exe/dmMain.c @@ -28,15 +28,15 @@ #include "cus_name.h" #else #ifndef CUS_NAME - #define CUS_NAME "TDengine" +#define CUS_NAME "TDengine" #endif #ifndef CUS_PROMPT - #define CUS_PROMPT "taos" +#define CUS_PROMPT "taos" #endif #ifndef CUS_EMAIL - #define CUS_EMAIL "" +#define CUS_EMAIL "" #endif #endif // clang-format off @@ -61,6 +61,7 @@ static struct { bool dumpSdb; bool generateGrant; bool memDbg; + bool checkS3; bool printAuth; bool printVersion; bool printHelp; @@ -174,7 +175,7 @@ static int32_t dmParseArgs(int32_t argc, char const *argv[]) { return -1; } } else if (strcmp(argv[i], "-a") == 0) { - if(i < argc - 1) { + if (i < argc - 1) { if (strlen(argv[++i]) >= PATH_MAX) { printf("apollo url overflow"); return -1; @@ -187,7 +188,7 @@ static int32_t dmParseArgs(int32_t argc, char const *argv[]) { } else if (strcmp(argv[i], "-s") == 0) { global.dumpSdb = true; } else if (strcmp(argv[i], "-E") == 0) { - if(i < argc - 1) { + if (i < argc - 1) { if (strlen(argv[++i]) >= PATH_MAX) { printf("env file path overflow"); return -1; @@ -229,6 +230,8 @@ static int32_t dmParseArgs(int32_t argc, char const *argv[]) { cmdEnvIndex++; } else if (strcmp(argv[i], "-dm") == 0) { global.memDbg = true; + } else if (strcmp(argv[i], "--checks3") == 0) { + global.checkS3 = true; } else if (strcmp(argv[i], "-h") == 0 || strcmp(argv[i], "--help") == 0 || strcmp(argv[i], "--usage") == 0 || strcmp(argv[i], "-?") == 0) { global.printHelp = true; @@ -290,8 +293,21 @@ static void dmDumpCfg() { cfgDumpCfg(pCfg, 0, true); } +static int32_t dmCheckS3() { + int32_t code = 0; + SConfig *pCfg = taosGetCfg(); + cfgDumpCfgS3(pCfg, 0, true); +#if defined(USE_S3) + extern int32_t s3CheckCfg(); + + code = s3CheckCfg(); +#endif + return code; +} + static int32_t dmInitLog() { - return taosCreateLog(CUS_PROMPT"dlog", 1, configDir, global.envCmd, global.envFile, global.apolloUrl, global.pArgs, 0); + return taosCreateLog(CUS_PROMPT "dlog", 1, configDir, global.envCmd, global.envFile, global.apolloUrl, global.pArgs, + 0); } static void taosCleanupArgs() { @@ -396,6 +412,15 @@ int mainWindows(int argc, char **argv) { return -1; } + if (global.checkS3) { + int32_t code = dmCheckS3(); + taosCleanupCfg(); + taosCloseLog(); + taosCleanupArgs(); + taosConvDestroy(); + return code; + } + if (global.dumpConfig) { dmDumpCfg(); taosCleanupCfg(); diff --git a/source/dnode/mgmt/mgmt_mnode/src/mmHandle.c b/source/dnode/mgmt/mgmt_mnode/src/mmHandle.c index 1fffe7e932..7e666d4533 100644 --- a/source/dnode/mgmt/mgmt_mnode/src/mmHandle.c +++ b/source/dnode/mgmt/mgmt_mnode/src/mmHandle.c @@ -142,6 +142,7 @@ SArray *mmGetMsgHandles() { 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_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; if (dmSetMgmtHandle(pArray, TDMT_MND_VGROUP_LIST, mmPutMsgToReadQueue, 0) == NULL) goto _OVER; if (dmSetMgmtHandle(pArray, TDMT_MND_REDISTRIBUTE_VGROUP, mmPutMsgToWriteQueue, 0) == NULL) goto _OVER; @@ -210,6 +211,7 @@ SArray *mmGetMsgHandles() { if (dmSetMgmtHandle(pArray, TDMT_VND_DROP_STB_RSP, mmPutMsgToWriteQueue, 0) == NULL) goto _OVER; if (dmSetMgmtHandle(pArray, TDMT_VND_DROP_TTL_TABLE_RSP, mmPutMsgToWriteQueue, 0) == NULL) goto _OVER; if (dmSetMgmtHandle(pArray, TDMT_VND_TRIM_RSP, mmPutMsgToWriteQueue, 0) == NULL) goto _OVER; + if (dmSetMgmtHandle(pArray, TDMT_VND_S3MIGRATE_RSP, mmPutMsgToWriteQueue, 0) == NULL) goto _OVER; if (dmSetMgmtHandle(pArray, TDMT_VND_CREATE_SMA_RSP, mmPutMsgToWriteQueue, 0) == NULL) goto _OVER; if (dmSetMgmtHandle(pArray, TDMT_VND_DROP_SMA_RSP, mmPutMsgToWriteQueue, 0) == NULL) goto _OVER; if (dmSetMgmtHandle(pArray, TDMT_VND_TMQ_SUBSCRIBE_RSP, mmPutMsgToWriteQueue, 0) == NULL) goto _OVER; diff --git a/source/dnode/mgmt/mgmt_vnode/src/vmHandle.c b/source/dnode/mgmt/mgmt_vnode/src/vmHandle.c index 858cf23309..75f9d01aa8 100644 --- a/source/dnode/mgmt/mgmt_vnode/src/vmHandle.c +++ b/source/dnode/mgmt/mgmt_vnode/src/vmHandle.c @@ -53,7 +53,7 @@ void vmGetVnodeLoadsLite(SVnodeMgmt *pMgmt, SMonVloadInfo *pInfo) { SVnodeObj **ppVnode = pIter; if (ppVnode == NULL || *ppVnode == NULL) continue; - SVnodeObj *pVnode = *ppVnode; + SVnodeObj *pVnode = *ppVnode; if (!pVnode->failed) { SVnodeLoadLite vload = {0}; if (vnodeGetLoadLite(pVnode->pImpl, &vload) == 0) { @@ -184,6 +184,10 @@ static void vmGenerateVnodeCfg(SCreateVnodeReq *pCreate, SVnodeCfg *pCfg) { pCfg->hashSuffix = pCreate->hashSuffix; pCfg->tsdbPageSize = pCreate->tsdbPageSize * 1024; + pCfg->s3ChunkSize = pCreate->s3ChunkSize; + pCfg->s3KeepLocal = pCreate->s3KeepLocal; + pCfg->s3Compact = pCreate->s3Compact; + pCfg->standby = 0; pCfg->syncCfg.replicaNum = 0; pCfg->syncCfg.totalReplicaNum = 0; @@ -263,17 +267,25 @@ int32_t vmProcessCreateVnodeReq(SVnodeMgmt *pMgmt, SRpcMsg *pMsg) { dInfo( "vgId:%d, vnode management handle msgType:%s, start to create vnode, page:%d pageSize:%d buffer:%d szPage:%d " "szBuf:%" PRIu64 ", cacheLast:%d cacheLastSize:%d sstTrigger:%d tsdbPageSize:%d %d dbname:%s dbId:%" PRId64 - ", days:%d keep0:%d keep1:%d keep2:%d keepTimeOffset%d tsma:%d precision:%d compression:%d minRows:%d maxRows:%d" + ", days:%d keep0:%d keep1:%d keep2:%d keepTimeOffset%d s3ChunkSize:%d s3KeepLocal:%d s3Compact:%d tsma:%d " + "precision:%d compression:%d minRows:%d maxRows:%d" ", wal fsync:%d level:%d retentionPeriod:%d retentionSize:%" PRId64 " rollPeriod:%d segSize:%" PRId64 ", hash method:%d begin:%u end:%u prefix:%d surfix:%d replica:%d selfIndex:%d " "learnerReplica:%d learnerSelfIndex:%d strict:%d changeVersion:%d encryptAlgorithm:%d", req.vgId, TMSG_INFO(pMsg->msgType), req.pages, req.pageSize, req.buffer, req.pageSize * 1024, (uint64_t)req.buffer * 1024 * 1024, req.cacheLast, req.cacheLastSize, req.sstTrigger, req.tsdbPageSize, req.tsdbPageSize * 1024, req.db, req.dbUid, req.daysPerFile, req.daysToKeep0, req.daysToKeep1, req.daysToKeep2, +<<<<<<< HEAD req.keepTimeOffset, req.isTsma, req.precision, req.compression, req.minRows, req.maxRows, req.walFsyncPeriod, req.walLevel, req.walRetentionPeriod, req.walRetentionSize, req.walRollPeriod, req.walSegmentSize, req.hashMethod, req.hashBegin, req.hashEnd, req.hashPrefix, req.hashSuffix, req.replica, req.selfIndex, req.learnerReplica, req.learnerSelfIndex, req.strict, req.changeVersion, req.encryptAlgorithm); +======= + req.keepTimeOffset, req.s3ChunkSize, req.s3KeepLocal, req.s3Compact, req.isTsma, req.precision, req.compression, + req.minRows, req.maxRows, req.walFsyncPeriod, req.walLevel, req.walRetentionPeriod, req.walRetentionSize, + req.walRollPeriod, req.walSegmentSize, req.hashMethod, req.hashBegin, req.hashEnd, req.hashPrefix, req.hashSuffix, + req.replica, req.selfIndex, req.learnerReplica, req.learnerSelfIndex, req.strict, req.changeVersion); +>>>>>>> 3.0 for (int32_t i = 0; i < req.replica; ++i) { dInfo("vgId:%d, replica:%d ep:%s:%u dnode:%d", req.vgId, i, req.replicas[i].fqdn, req.replicas[i].port, @@ -380,7 +392,7 @@ int32_t vmProcessCreateVnodeReq(SVnodeMgmt *pMgmt, SRpcMsg *pMsg) { _OVER: if (code != 0) { vnodeClose(pImpl); - vnodeDestroy(0, path, pMgmt->pTfs); + vnodeDestroy(0, path, pMgmt->pTfs, 0); } else { dInfo("vgId:%d, vnode management handle msgType:%s, end to create vnode, vnode is created", req.vgId, TMSG_INFO(pMsg->msgType)); @@ -391,7 +403,7 @@ _OVER: return code; } -//alter replica doesn't use this, but restore dnode still use this +// alter replica doesn't use this, but restore dnode still use this int32_t vmProcessAlterVnodeTypeReq(SVnodeMgmt *pMgmt, SRpcMsg *pMsg) { SAlterVnodeTypeReq req = {0}; if (tDeserializeSAlterVnodeReplicaReq(pMsg->pCont, pMsg->contLen, &req) != 0) { @@ -433,8 +445,8 @@ int32_t vmProcessAlterVnodeTypeReq(SVnodeMgmt *pMgmt, SRpcMsg *pMsg) { dInfo("node:%s, catched up leader, continue to process alter-node-type-request", pMgmt->name); int32_t vgId = req.vgId; - dInfo("vgId:%d, start to alter vnode type replica:%d selfIndex:%d strict:%d changeVersion:%d", - vgId, req.replica, req.selfIndex, req.strict, req.changeVersion); + dInfo("vgId:%d, start to alter vnode type replica:%d selfIndex:%d strict:%d changeVersion:%d", vgId, req.replica, + req.selfIndex, req.strict, req.changeVersion); for (int32_t i = 0; i < req.replica; ++i) { SReplica *pReplica = &req.replicas[i]; dInfo("vgId:%d, replica:%d ep:%s:%u dnode:%d", vgId, i, pReplica->fqdn, pReplica->port, pReplica->id); @@ -517,12 +529,12 @@ int32_t vmProcessCheckLearnCatchupReq(SVnodeMgmt *pMgmt, SRpcMsg *pMsg) { return -1; } - if(req.learnerReplicas == 0){ + if (req.learnerReplicas == 0) { req.learnerSelfIndex = -1; } - dInfo("vgId:%d, vnode management handle msgType:%s, start to process check-learner-catchup-request", - req.vgId, TMSG_INFO(pMsg->msgType)); + dInfo("vgId:%d, vnode management handle msgType:%s, start to process check-learner-catchup-request", req.vgId, + TMSG_INFO(pMsg->msgType)); SVnodeObj *pVnode = vmAcquireVnode(pMgmt, req.vgId); if (pVnode == NULL) { @@ -534,7 +546,7 @@ int32_t vmProcessCheckLearnCatchupReq(SVnodeMgmt *pMgmt, SRpcMsg *pMsg) { ESyncRole role = vnodeGetRole(pVnode->pImpl); dInfo("vgId:%d, checking node role:%d", req.vgId, role); - if(role == TAOS_SYNC_ROLE_VOTER){ + if (role == TAOS_SYNC_ROLE_VOTER) { dError("vgId:%d, failed to alter vnode type since node already is role:%d", req.vgId, role); terrno = TSDB_CODE_VND_ALREADY_IS_VOTER; vmReleaseVnode(pMgmt, pVnode); @@ -542,7 +554,7 @@ int32_t vmProcessCheckLearnCatchupReq(SVnodeMgmt *pMgmt, SRpcMsg *pMsg) { } dInfo("vgId:%d, checking node catch up", req.vgId); - if(vnodeIsCatchUp(pVnode->pImpl) != 1){ + if (vnodeIsCatchUp(pVnode->pImpl) != 1) { terrno = TSDB_CODE_VND_NOT_CATCH_UP; vmReleaseVnode(pMgmt, pVnode); return -1; @@ -552,8 +564,8 @@ int32_t vmProcessCheckLearnCatchupReq(SVnodeMgmt *pMgmt, SRpcMsg *pMsg) { vmReleaseVnode(pMgmt, pVnode); - dInfo("vgId:%d, vnode management handle msgType:%s, end to process check-learner-catchup-request", - req.vgId, TMSG_INFO(pMsg->msgType)); + dInfo("vgId:%d, vnode management handle msgType:%s, end to process check-learner-catchup-request", req.vgId, + TMSG_INFO(pMsg->msgType)); return 0; } @@ -966,6 +978,7 @@ SArray *vmGetMsgHandles() { if (dmSetMgmtHandle(pArray, TDMT_VND_ALTER_HASHRANGE, vmPutMsgToMgmtQueue, 0) == NULL) goto _OVER; if (dmSetMgmtHandle(pArray, TDMT_VND_COMPACT, vmPutMsgToWriteQueue, 0) == NULL) goto _OVER; if (dmSetMgmtHandle(pArray, TDMT_VND_TRIM, vmPutMsgToWriteQueue, 0) == NULL) goto _OVER; + if (dmSetMgmtHandle(pArray, TDMT_VND_S3MIGRATE, vmPutMsgToWriteQueue, 0) == NULL) goto _OVER; if (dmSetMgmtHandle(pArray, TDMT_DND_CREATE_VNODE, vmPutMsgToMgmtQueue, 0) == NULL) goto _OVER; if (dmSetMgmtHandle(pArray, TDMT_DND_DROP_VNODE, vmPutMsgToMgmtQueue, 0) == NULL) goto _OVER; if (dmSetMgmtHandle(pArray, TDMT_DND_ALTER_VNODE_TYPE, vmPutMsgToMgmtQueue, 0) == NULL) goto _OVER; diff --git a/source/dnode/mgmt/mgmt_vnode/src/vmInt.c b/source/dnode/mgmt/mgmt_vnode/src/vmInt.c index 3dfc2bd96f..296372a955 100644 --- a/source/dnode/mgmt/mgmt_vnode/src/vmInt.c +++ b/source/dnode/mgmt/mgmt_vnode/src/vmInt.c @@ -15,9 +15,9 @@ #define _DEFAULT_SOURCE #include "vmInt.h" +#include "libs/function/tudf.h" #include "tfs.h" #include "vnd.h" -#include "libs/function/tudf.h" int32_t vmGetPrimaryDisk(SVnodeMgmt *pMgmt, int32_t vgId) { int32_t diskId = -1; @@ -234,6 +234,7 @@ void vmCloseVnode(SVnodeMgmt *pMgmt, SVnodeObj *pVnode, bool commitAndRemoveWal) dInfo("vgId:%d, commit data finished", pVnode->vgId); } + int32_t nodeId = vnodeNodeId(pVnode->pImpl); vnodeClose(pVnode->pImpl); pVnode->pImpl = NULL; @@ -250,7 +251,7 @@ _closed: if (pVnode->dropped) { dInfo("vgId:%d, vnode is destroyed, dropped:%d", pVnode->vgId, pVnode->dropped); snprintf(path, TSDB_FILENAME_LEN, "vnode%svnode%d", TD_DIRSEP, pVnode->vgId); - vnodeDestroy(pVnode->vgId, path, pMgmt->pTfs); + vnodeDestroy(pVnode->vgId, path, pMgmt->pTfs, nodeId); } vmFreeVnodeObj(&pVnode); diff --git a/source/dnode/mgmt/node_mgmt/CMakeLists.txt b/source/dnode/mgmt/node_mgmt/CMakeLists.txt index 0cdc68345a..82b9384d66 100644 --- a/source/dnode/mgmt/node_mgmt/CMakeLists.txt +++ b/source/dnode/mgmt/node_mgmt/CMakeLists.txt @@ -4,15 +4,13 @@ target_link_libraries( dnode mgmt_mnode mgmt_qnode mgmt_snode mgmt_vnode mgmt_dnode monitorfw ) -IF (TD_STORAGE) - +IF (TD_ENTERPRISE) IF(${BUILD_WITH_S3}) - add_definitions(-DUSE_S3) + add_definitions(-DUSE_S3) ELSEIF(${BUILD_WITH_COS}) - add_definitions(-DUSE_COS) + add_definitions(-DUSE_COS) ENDIF() - -ENDIF () +ENDIF() IF (DEFINED GRANT_CFG_INCLUDE_DIR) add_definitions(-DGRANTS_CFG) diff --git a/source/dnode/mnode/impl/inc/mndDef.h b/source/dnode/mnode/impl/inc/mndDef.h index 655a0d7edb..8816b53a31 100644 --- a/source/dnode/mnode/impl/inc/mndDef.h +++ b/source/dnode/mnode/impl/inc/mndDef.h @@ -382,6 +382,9 @@ typedef struct { int32_t walRollPeriod; int64_t walRetentionSize; int64_t walSegmentSize; + int32_t s3ChunkSize; + int32_t s3KeepLocal; + int8_t s3Compact; int8_t withArbitrator; int8_t encryptAlgorithm; } SDbCfg; diff --git a/source/dnode/mnode/impl/src/mndDb.c b/source/dnode/mnode/impl/src/mndDb.c index 81f82fa0be..5068bf79cb 100644 --- a/source/dnode/mnode/impl/src/mndDb.c +++ b/source/dnode/mnode/impl/src/mndDb.c @@ -36,7 +36,7 @@ #include "tjson.h" #define DB_VER_NUMBER 1 -#define DB_RESERVE_SIZE 40 +#define DB_RESERVE_SIZE 31 static SSdbRow *mndDbActionDecode(SSdbRaw *pRaw); static int32_t mndDbActionInsert(SSdb *pSdb, SDbObj *pDb); @@ -49,6 +49,7 @@ static int32_t mndProcessAlterDbReq(SRpcMsg *pReq); static int32_t mndProcessDropDbReq(SRpcMsg *pReq); static int32_t mndProcessUseDbReq(SRpcMsg *pReq); static int32_t mndProcessTrimDbReq(SRpcMsg *pReq); +static int32_t mndProcessS3MigrateDbReq(SRpcMsg *pReq); static int32_t mndRetrieveDbs(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pBlock, int32_t rowsCapacity); static void mndCancelGetNextDb(SMnode *pMnode, void *pIter); static int32_t mndProcessGetDbCfgReq(SRpcMsg *pReq); @@ -76,6 +77,7 @@ int32_t mndInitDb(SMnode *pMnode) { mndSetMsgHandle(pMnode, TDMT_MND_COMPACT_DB, mndProcessCompactDbReq); mndSetMsgHandle(pMnode, TDMT_MND_TRIM_DB, mndProcessTrimDbReq); mndSetMsgHandle(pMnode, TDMT_MND_GET_DB_CFG, mndProcessGetDbCfgReq); + mndSetMsgHandle(pMnode, TDMT_MND_S3MIGRATE_DB, mndProcessS3MigrateDbReq); mndAddShowRetrieveHandle(pMnode, TSDB_MGMT_TABLE_DB, mndRetrieveDbs); mndAddShowFreeIterHandle(pMnode, TSDB_MGMT_TABLE_DB, mndCancelGetNextDb); @@ -140,6 +142,9 @@ SSdbRaw *mndDbActionEncode(SDbObj *pDb) { SDB_SET_INT32(pRaw, dataPos, pDb->cfg.tsdbPageSize, _OVER) SDB_SET_INT64(pRaw, dataPos, pDb->compactStartTime, _OVER) SDB_SET_INT32(pRaw, dataPos, pDb->cfg.keepTimeOffset, _OVER) + SDB_SET_INT32(pRaw, dataPos, pDb->cfg.s3ChunkSize, _OVER) + SDB_SET_INT32(pRaw, dataPos, pDb->cfg.s3KeepLocal, _OVER) + SDB_SET_INT8(pRaw, dataPos, pDb->cfg.s3Compact, _OVER) SDB_SET_INT8(pRaw, dataPos, pDb->cfg.withArbitrator, _OVER) SDB_SET_INT8(pRaw, dataPos, pDb->cfg.encryptAlgorithm, _OVER) @@ -233,12 +238,27 @@ static SSdbRow *mndDbActionDecode(SSdbRaw *pRaw) { SDB_GET_INT32(pRaw, dataPos, &pDb->cfg.tsdbPageSize, _OVER) SDB_GET_INT64(pRaw, dataPos, &pDb->compactStartTime, _OVER) SDB_GET_INT32(pRaw, dataPos, &pDb->cfg.keepTimeOffset, _OVER) + SDB_GET_INT32(pRaw, dataPos, &pDb->cfg.s3ChunkSize, _OVER) + SDB_GET_INT32(pRaw, dataPos, &pDb->cfg.s3KeepLocal, _OVER) + SDB_GET_INT8(pRaw, dataPos, &pDb->cfg.s3Compact, _OVER) SDB_GET_INT8(pRaw, dataPos, &pDb->cfg.withArbitrator, _OVER) SDB_GET_INT8(pRaw, dataPos, &pDb->cfg.encryptAlgorithm, _OVER) SDB_GET_RESERVE(pRaw, dataPos, DB_RESERVE_SIZE, _OVER) taosInitRWLatch(&pDb->lock); + if (pDb->cfg.s3ChunkSize == 0) { + pDb->cfg.s3ChunkSize = TSDB_DEFAULT_S3_CHUNK_SIZE; + + mInfo("db:%s, s3ChunkSize set from %d to default %d", pDb->name, pDb->cfg.s3ChunkSize, TSDB_DEFAULT_S3_CHUNK_SIZE); + } + + if (pDb->cfg.s3KeepLocal == 0) { + pDb->cfg.s3KeepLocal = TSDB_DEFAULT_S3_KEEP_LOCAL; + + mInfo("db:%s, s3KeepLocal set from %d to default %d", pDb->name, pDb->cfg.s3KeepLocal, TSDB_DEFAULT_S3_KEEP_LOCAL); + } + if (pDb->cfg.tsdbPageSize != TSDB_MIN_TSDB_PAGESIZE) { mInfo("db:%s, tsdbPageSize set from %d to default %d", pDb->name, pDb->cfg.tsdbPageSize, TSDB_DEFAULT_TSDB_PAGESIZE); @@ -324,6 +344,9 @@ static int32_t mndDbActionUpdate(SSdb *pSdb, SDbObj *pOld, SDbObj *pNew) { pOld->cfg.minRows = pNew->cfg.minRows; pOld->cfg.maxRows = pNew->cfg.maxRows; pOld->cfg.tsdbPageSize = pNew->cfg.tsdbPageSize; + pOld->cfg.s3ChunkSize = pNew->cfg.s3ChunkSize; + pOld->cfg.s3KeepLocal = pNew->cfg.s3KeepLocal; + pOld->cfg.s3Compact = pNew->cfg.s3Compact; pOld->cfg.withArbitrator = pNew->cfg.withArbitrator; pOld->compactStartTime = pNew->compactStartTime; taosWUnLockLatch(&pOld->lock); @@ -427,6 +450,10 @@ static int32_t mndCheckDbCfg(SMnode *pMnode, SDbCfg *pCfg) { if (pCfg->tsdbPageSize < TSDB_MIN_TSDB_PAGESIZE || pCfg->tsdbPageSize > TSDB_MAX_TSDB_PAGESIZE) return -1; if (taosArrayGetSize(pCfg->pRetensions) != pCfg->numOfRetensions) return -1; + if (pCfg->s3ChunkSize < TSDB_MIN_S3_CHUNK_SIZE || pCfg->s3ChunkSize > TSDB_MAX_S3_CHUNK_SIZE) return -1; + if (pCfg->s3KeepLocal < TSDB_MIN_S3_KEEP_LOCAL || pCfg->s3KeepLocal > TSDB_MAX_S3_KEEP_LOCAL) return -1; + if (pCfg->s3Compact < TSDB_MIN_S3_COMPACT || pCfg->s3Compact > TSDB_MAX_S3_COMPACT) return -1; + terrno = 0; return terrno; } @@ -476,6 +503,9 @@ static int32_t mndCheckInChangeDbCfg(SMnode *pMnode, SDbCfg *pOldCfg, SDbCfg *pN terrno = TSDB_CODE_MND_NO_ENOUGH_DNODES; return -1; } + if (pNewCfg->s3ChunkSize < TSDB_MIN_S3_CHUNK_SIZE || pNewCfg->s3ChunkSize > TSDB_MAX_S3_CHUNK_SIZE) return -1; + if (pNewCfg->s3KeepLocal < TSDB_MIN_S3_KEEP_LOCAL || pNewCfg->s3KeepLocal > TSDB_MAX_S3_KEEP_LOCAL) return -1; + if (pNewCfg->s3Compact < TSDB_MIN_S3_COMPACT || pNewCfg->s3Compact > TSDB_MAX_S3_COMPACT) return -1; terrno = 0; return terrno; @@ -512,6 +542,9 @@ static void mndSetDefaultDbCfg(SDbCfg *pCfg) { if (pCfg->walSegmentSize < 0) pCfg->walSegmentSize = TSDB_DEFAULT_DB_WAL_SEGMENT_SIZE; if (pCfg->sstTrigger <= 0) pCfg->sstTrigger = TSDB_DEFAULT_SST_TRIGGER; if (pCfg->tsdbPageSize <= 0) pCfg->tsdbPageSize = TSDB_DEFAULT_TSDB_PAGESIZE; + if (pCfg->s3ChunkSize <= 0) pCfg->s3ChunkSize = TSDB_DEFAULT_S3_CHUNK_SIZE; + if (pCfg->s3KeepLocal <= 0) pCfg->s3KeepLocal = TSDB_DEFAULT_S3_KEEP_LOCAL; + if (pCfg->s3Compact <= 0) pCfg->s3Compact = TSDB_DEFAULT_S3_COMPACT; if (pCfg->withArbitrator < 0) pCfg->withArbitrator = TSDB_DEFAULT_DB_WITH_ARBITRATOR; } @@ -684,6 +717,9 @@ static int32_t mndCreateDb(SMnode *pMnode, SRpcMsg *pReq, SCreateDbReq *pCreate, .sstTrigger = pCreate->sstTrigger, .hashPrefix = pCreate->hashPrefix, .hashSuffix = pCreate->hashSuffix, + .s3ChunkSize = pCreate->s3ChunkSize, + .s3KeepLocal = pCreate->s3KeepLocal, + .s3Compact = pCreate->s3Compact, .tsdbPageSize = pCreate->tsdbPageSize, .withArbitrator = pCreate->withArbitrator, .encryptAlgorithm = pCreate->encryptAlgorithm, @@ -996,6 +1032,18 @@ static int32_t mndSetDbCfgFromAlterDbReq(SDbObj *pDb, SAlterDbReq *pAlter) { terrno = 0; } + if (pAlter->s3KeepLocal > TSDB_MIN_S3_KEEP_LOCAL && pAlter->s3KeepLocal != pDb->cfg.s3KeepLocal) { + pDb->cfg.s3KeepLocal = pAlter->s3KeepLocal; + pDb->vgVersion++; + terrno = 0; + } + + if (pAlter->s3Compact > TSDB_MIN_S3_COMPACT && pAlter->s3Compact != pDb->cfg.s3Compact) { + pDb->cfg.s3Compact = pAlter->s3Compact; + pDb->vgVersion++; + terrno = 0; + } + if (pAlter->withArbitrator >= TSDB_MIN_DB_WITH_ARBITRATOR && pAlter->withArbitrator != pDb->cfg.withArbitrator) { pDb->cfg.withArbitrator = pAlter->withArbitrator; pDb->vgVersion++; @@ -1202,6 +1250,9 @@ static void mndDumpDbCfgInfo(SDbCfgRsp *cfgRsp, SDbObj *pDb) { cfgRsp->pRetensions = taosArrayDup(pDb->cfg.pRetensions, NULL); cfgRsp->schemaless = pDb->cfg.schemaless; cfgRsp->sstTrigger = pDb->cfg.sstTrigger; + cfgRsp->s3ChunkSize = pDb->cfg.s3ChunkSize; + cfgRsp->s3KeepLocal = pDb->cfg.s3KeepLocal; + cfgRsp->s3Compact = pDb->cfg.s3Compact; cfgRsp->withArbitrator = pDb->cfg.withArbitrator; cfgRsp->encryptAlgorithm = pDb->cfg.encryptAlgorithm; } @@ -1270,7 +1321,7 @@ static int32_t mndSetDropDbPrepareLogs(SMnode *pMnode, STrans *pTrans, SDbObj *p if (pIter == NULL) break; if (pArbGroup->dbUid == pDb->uid) { - if (mndSetDropArbGroupPrepareLogs(pTrans,pArbGroup) != 0) { + if (mndSetDropArbGroupPrepareLogs(pTrans, pArbGroup) != 0) { sdbCancelFetch(pSdb, pIter); sdbRelease(pSdb, pArbGroup); return -1; @@ -1298,7 +1349,7 @@ static int32_t mndSetDropDbCommitLogs(SMnode *pMnode, STrans *pTrans, SDbObj *pD if (pIter == NULL) break; if (pArbGroup->dbUid == pDb->uid) { - if (mndSetDropArbGroupCommitLogs(pTrans,pArbGroup) != 0) { + if (mndSetDropArbGroupCommitLogs(pTrans, pArbGroup) != 0) { sdbCancelFetch(pSdb, pIter); sdbRelease(pSdb, pArbGroup); return -1; @@ -1850,6 +1901,77 @@ _OVER: return code; } +static int32_t mndS3MigrateDb(SMnode *pMnode, SDbObj *pDb) { + SSdb *pSdb = pMnode->pSdb; + SVgObj *pVgroup = NULL; + void *pIter = NULL; + SVS3MigrateDbReq s3migrateReq = {.timestamp = taosGetTimestampSec()}; + int32_t reqLen = tSerializeSVS3MigrateDbReq(NULL, 0, &s3migrateReq); + int32_t contLen = reqLen + sizeof(SMsgHead); + + while (1) { + pIter = sdbFetch(pSdb, SDB_VGROUP, pIter, (void **)&pVgroup); + if (pIter == NULL) break; + + if (pVgroup->dbUid != pDb->uid) continue; + + SMsgHead *pHead = rpcMallocCont(contLen); + if (pHead == NULL) { + sdbCancelFetch(pSdb, pVgroup); + sdbRelease(pSdb, pVgroup); + continue; + } + pHead->contLen = htonl(contLen); + pHead->vgId = htonl(pVgroup->vgId); + tSerializeSVS3MigrateDbReq((char *)pHead + sizeof(SMsgHead), contLen, &s3migrateReq); + + SRpcMsg rpcMsg = {.msgType = TDMT_VND_S3MIGRATE, .pCont = pHead, .contLen = contLen}; + SEpSet epSet = mndGetVgroupEpset(pMnode, pVgroup); + int32_t code = tmsgSendReq(&epSet, &rpcMsg); + if (code != 0) { + mError("vgId:%d, failed to send vnode-s3migrate request to vnode since 0x%x", pVgroup->vgId, code); + } else { + mInfo("vgId:%d, send vnode-s3migrate request to vnode, time:%d", pVgroup->vgId, s3migrateReq.timestamp); + } + sdbRelease(pSdb, pVgroup); + } + + return 0; +} + +static int32_t mndProcessS3MigrateDbReq(SRpcMsg *pReq) { + SMnode *pMnode = pReq->info.node; + int32_t code = -1; + SDbObj *pDb = NULL; + SS3MigrateDbReq s3migrateReq = {0}; + + if (tDeserializeSS3MigrateDbReq(pReq->pCont, pReq->contLen, &s3migrateReq) != 0) { + terrno = TSDB_CODE_INVALID_MSG; + goto _OVER; + } + + mInfo("db:%s, start to s3migrate", s3migrateReq.db); + + pDb = mndAcquireDb(pMnode, s3migrateReq.db); + if (pDb == NULL) { + goto _OVER; + } + + if (mndCheckDbPrivilege(pMnode, pReq->info.conn.user, MND_OPER_TRIM_DB, pDb) != 0) { + goto _OVER; + } + + code = mndS3MigrateDb(pMnode, pDb); + +_OVER: + if (code != 0) { + mError("db:%s, failed to process s3migrate db req since %s", s3migrateReq.db, terrstr()); + } + + mndReleaseDb(pMnode, pDb); + return code; +} + const char *mndGetDbStr(const char *src) { char *pos = strstr(src, TS_PATH_DELIMITER); if (pos != NULL) ++pos; @@ -2160,6 +2282,18 @@ static void mndDumpDbInfoData(SMnode *pMnode, SSDataBlock *pBlock, SDbObj *pDb, pColInfo = taosArrayGet(pBlock->pDataBlock, cols++); colDataSetVal(pColInfo, rows, (const char *)&pDb->cfg.keepTimeOffset, false); + pColInfo = taosArrayGet(pBlock->pDataBlock, cols++); + colDataSetVal(pColInfo, rows, (const char *)&pDb->cfg.s3ChunkSize, false); + + char keeplocalVstr[128] = {0}; + len = sprintf(&keeplocalVstr[VARSTR_HEADER_SIZE], "%dm", pDb->cfg.s3KeepLocal); + varDataSetLen(keeplocalVstr, len); + pColInfo = taosArrayGet(pBlock->pDataBlock, cols++); + colDataSetVal(pColInfo, rows, (const char *)keeplocalVstr, false); + + pColInfo = taosArrayGet(pBlock->pDataBlock, cols++); + colDataSetVal(pColInfo, rows, (const char *)&pDb->cfg.s3Compact, false); + pColInfo = taosArrayGet(pBlock->pDataBlock, cols++); colDataSetVal(pColInfo, rows, (const char *)&pDb->cfg.withArbitrator, false); diff --git a/source/dnode/mnode/impl/src/mndMain.c b/source/dnode/mnode/impl/src/mndMain.c index 0eb2559928..a78edcb05e 100644 --- a/source/dnode/mnode/impl/src/mndMain.c +++ b/source/dnode/mnode/impl/src/mndMain.c @@ -134,6 +134,14 @@ static void mndPullupTtl(SMnode *pMnode) { } static void mndPullupTrimDb(SMnode *pMnode) { + mTrace("pullup s3migrate"); + int32_t contLen = 0; + void *pReq = mndBuildTimerMsg(&contLen); + SRpcMsg rpcMsg = {.msgType = TDMT_MND_S3MIGRATE_DB_TIMER, .pCont = pReq, .contLen = contLen}; + tmsgPutToQueue(&pMnode->msgCb, WRITE_QUEUE, &rpcMsg); +} + +static void mndPullupS3MigrateDb(SMnode *pMnode) { mTrace("pullup trim"); int32_t contLen = 0; void *pReq = mndBuildTimerMsg(&contLen); @@ -319,6 +327,7 @@ static int32_t minCronTime() { int32_t min = INT32_MAX; min = TMIN(min, tsTtlPushIntervalSec); min = TMIN(min, tsTrimVDbIntervalSec); + min = TMIN(min, tsS3MigrateIntervalSec); min = TMIN(min, tsTransPullupInterval); min = TMIN(min, tsCompactPullupInterval); min = TMIN(min, tsMqRebalanceInterval); @@ -342,6 +351,10 @@ void mndDoTimerPullupTask(SMnode *pMnode, int64_t sec) { mndPullupTrimDb(pMnode); } + if (tsS3MigrateEnabled && sec % tsS3MigrateIntervalSec == 0) { + mndPullupS3MigrateDb(pMnode); + } + if (sec % tsTransPullupInterval == 0) { mndPullupTrans(pMnode); } @@ -821,6 +834,7 @@ _OVER: pMsg->msgType == TDMT_MND_COMPACT_TIMER || pMsg->msgType == TDMT_MND_NODECHECK_TIMER || pMsg->msgType == TDMT_MND_GRANT_HB_TIMER || pMsg->msgType == TDMT_MND_STREAM_CHECKPOINT_CANDIDITATE || pMsg->msgType == TDMT_MND_STREAM_CHECKPOINT_TIMER || pMsg->msgType == TDMT_MND_STREAM_REQ_CHKPT || + pMsg->msgType == TDMT_MND_S3MIGRATE_DB_TIMER || pMsg->msgType == TDMT_MND_ARB_HEARTBEAT_TIMER || pMsg->msgType == TDMT_MND_ARB_CHECK_SYNC_TIMER) { mTrace("timer not process since mnode restored:%d stopped:%d, sync restored:%d role:%s ", pMnode->restored, pMnode->stopped, state.restored, syncStr(state.state)); @@ -965,7 +979,7 @@ int32_t mndGetMonitorInfo(SMnode *pMnode, SMonClusterInfo *pClusterInfo, SMonVgr if (pObj->id == pMnode->selfDnodeId) { pClusterInfo->first_ep_dnode_id = pObj->id; tstrncpy(pClusterInfo->first_ep, pObj->pDnode->ep, sizeof(pClusterInfo->first_ep)); - //pClusterInfo->master_uptime = (float)mndGetClusterUpTime(pMnode) / 86400.0f; + // pClusterInfo->master_uptime = (float)mndGetClusterUpTime(pMnode) / 86400.0f; pClusterInfo->master_uptime = mndGetClusterUpTime(pMnode); // pClusterInfo->master_uptime = (ms - pObj->stateStartTime) / (86400000.0f); tstrncpy(desc.role, syncStr(TAOS_SYNC_STATE_LEADER), sizeof(desc.role)); diff --git a/source/dnode/mnode/impl/src/mndStb.c b/source/dnode/mnode/impl/src/mndStb.c index 79c62df766..c418241605 100644 --- a/source/dnode/mnode/impl/src/mndStb.c +++ b/source/dnode/mnode/impl/src/mndStb.c @@ -42,6 +42,8 @@ static int32_t mndStbActionDelete(SSdb *pSdb, SStbObj *pStb); static int32_t mndStbActionUpdate(SSdb *pSdb, SStbObj *pOld, SStbObj *pNew); static int32_t mndProcessTtlTimer(SRpcMsg *pReq); static int32_t mndProcessTrimDbTimer(SRpcMsg *pReq); +static int32_t mndProcessS3MigrateDbTimer(SRpcMsg *pReq); +static int32_t mndProcessS3MigrateDbRsp(SRpcMsg *pReq); static int32_t mndProcessCreateStbReq(SRpcMsg *pReq); static int32_t mndProcessAlterStbReq(SRpcMsg *pReq); static int32_t mndProcessDropStbReq(SRpcMsg *pReq); @@ -82,6 +84,8 @@ int32_t mndInitStb(SMnode *pMnode) { mndSetMsgHandle(pMnode, TDMT_MND_TABLE_META, mndProcessTableMetaReq); mndSetMsgHandle(pMnode, TDMT_MND_TTL_TIMER, mndProcessTtlTimer); mndSetMsgHandle(pMnode, TDMT_MND_TRIM_DB_TIMER, mndProcessTrimDbTimer); + mndSetMsgHandle(pMnode, TDMT_VND_S3MIGRATE_RSP, mndProcessS3MigrateDbRsp); + mndSetMsgHandle(pMnode, TDMT_MND_S3MIGRATE_DB_TIMER, mndProcessS3MigrateDbTimer); mndSetMsgHandle(pMnode, TDMT_MND_TABLE_CFG, mndProcessTableCfgReq); // mndSetMsgHandle(pMnode, TDMT_MND_SYSTABLE_RETRIEVE, mndProcessRetrieveStbReq); @@ -762,9 +766,9 @@ int32_t mndBuildStbFromReq(SMnode *pMnode, SStbObj *pDst, SMCreateStbReq *pCreat memcpy(pDst->db, pDb->name, TSDB_DB_FNAME_LEN); pDst->createdTime = taosGetTimestampMs(); pDst->updateTime = pDst->createdTime; - pDst->uid = - (pCreate->source == TD_REQ_FROM_TAOX_OLD || pCreate->source == TD_REQ_FROM_TAOX) - ? pCreate->suid : mndGenerateUid(pCreate->name, TSDB_TABLE_FNAME_LEN); + pDst->uid = (pCreate->source == TD_REQ_FROM_TAOX_OLD || pCreate->source == TD_REQ_FROM_TAOX) + ? pCreate->suid + : mndGenerateUid(pCreate->name, TSDB_TABLE_FNAME_LEN); pDst->dbUid = pDb->uid; pDst->tagVer = 1; pDst->colVer = 1; @@ -983,6 +987,43 @@ static int32_t mndProcessTrimDbTimer(SRpcMsg *pReq) { return 0; } +static int32_t mndProcessS3MigrateDbTimer(SRpcMsg *pReq) { + SMnode *pMnode = pReq->info.node; + SSdb *pSdb = pMnode->pSdb; + SVgObj *pVgroup = NULL; + void *pIter = NULL; + SVS3MigrateDbReq s3migrateReq = {.timestamp = taosGetTimestampSec()}; + int32_t reqLen = tSerializeSVS3MigrateDbReq(NULL, 0, &s3migrateReq); + int32_t contLen = reqLen + sizeof(SMsgHead); + + while (1) { + pIter = sdbFetch(pSdb, SDB_VGROUP, pIter, (void **)&pVgroup); + if (pIter == NULL) break; + + SMsgHead *pHead = rpcMallocCont(contLen); + if (pHead == NULL) { + sdbCancelFetch(pSdb, pVgroup); + sdbRelease(pSdb, pVgroup); + continue; + } + pHead->contLen = htonl(contLen); + pHead->vgId = htonl(pVgroup->vgId); + tSerializeSVS3MigrateDbReq((char *)pHead + sizeof(SMsgHead), reqLen, &s3migrateReq); + + SRpcMsg rpcMsg = {.msgType = TDMT_VND_S3MIGRATE, .pCont = pHead, .contLen = contLen}; + SEpSet epSet = mndGetVgroupEpset(pMnode, pVgroup); + int32_t code = tmsgSendReq(&epSet, &rpcMsg); + if (code != 0) { + mError("vgId:%d, timer failed to send vnode-s3migrate request to vnode since 0x%x", pVgroup->vgId, code); + } else { + mInfo("vgId:%d, timer send vnode-s3migrate request to vnode, time:%d", pVgroup->vgId, s3migrateReq.timestamp); + } + sdbRelease(pSdb, pVgroup); + } + + return 0; +} + static int32_t mndFindSuperTableTagIndex(const SStbObj *pStb, const char *tagName) { for (int32_t tag = 0; tag < pStb->numOfTags; tag++) { if (strcmp(pStb->pTags[tag].name, tagName) == 0) { @@ -1133,7 +1174,8 @@ static int32_t mndProcessCreateStbReq(SRpcMsg *pReq) { } } else if (terrno != TSDB_CODE_MND_STB_NOT_EXIST) { goto _OVER; - } else if ((createReq.source == TD_REQ_FROM_TAOX_OLD || createReq.source == TD_REQ_FROM_TAOX) && (createReq.tagVer != 1 || createReq.colVer != 1)) { + } else if ((createReq.source == TD_REQ_FROM_TAOX_OLD || createReq.source == TD_REQ_FROM_TAOX) && + (createReq.tagVer != 1 || createReq.colVer != 1)) { mInfo("stb:%s, alter table does not need to be done, because table is deleted", createReq.name); code = 0; goto _OVER; @@ -1184,14 +1226,13 @@ static int32_t mndProcessCreateStbReq(SRpcMsg *pReq) { SName name = {0}; tNameFromString(&name, createReq.name, T_NAME_ACCT | T_NAME_DB | T_NAME_TABLE); - if(createReq.sql == NULL && createReq.sqlLen == 0){ + if (createReq.sql == NULL && createReq.sqlLen == 0) { char detail[1000] = {0}; sprintf(detail, "dbname:%s, stable name:%s", name.dbname, name.tname); auditRecord(pReq, pMnode->clusterId, "createStb", name.dbname, name.tname, detail, strlen(detail)); - } - else{ + } else { auditRecord(pReq, pMnode->clusterId, "createStb", name.dbname, name.tname, createReq.sql, createReq.sqlLen); } _OVER: @@ -1573,7 +1614,7 @@ static int32_t mndAlterStbTagBytes(SMnode *pMnode, const SStbObj *pOld, SStbObj for (int32_t i = 0; i < pOld->numOfTags; ++i) { nLen += (pOld->pTags[i].colId == colId) ? pField->bytes : pOld->pTags[i].bytes; } - + if (nLen > TSDB_MAX_TAGS_LEN) { terrno = TSDB_CODE_PAR_INVALID_TAGS_LENGTH; return -1; @@ -1936,7 +1977,7 @@ static int32_t mndBuildStbCfgImp(SDbObj *pDb, SStbObj *pStb, const char *tbName, return 0; } -static int32_t mndValidateStbVersion(SMnode *pMnode, SSTableVersion* pStbVer, bool* schema, bool* sma) { +static int32_t mndValidateStbVersion(SMnode *pMnode, SSTableVersion *pStbVer, bool *schema, bool *sma) { char tbFName[TSDB_TABLE_FNAME_LEN] = {0}; snprintf(tbFName, sizeof(tbFName), "%s.%s", pStbVer->dbFName, pStbVer->stbName); @@ -1966,7 +2007,7 @@ static int32_t mndValidateStbVersion(SMnode *pMnode, SSTableVersion* pStbVer, bo } else { *schema = false; } - + if (pStbVer->smaVer && pStbVer->smaVer != pStb->smaVer) { *sma = true; } else { @@ -2537,6 +2578,7 @@ static int32_t mndCheckDropStbForStream(SMnode *pMnode, const char *stbFullName, static int32_t mndProcessDropTtltbRsp(SRpcMsg *pRsp) { return 0; } static int32_t mndProcessTrimDbRsp(SRpcMsg *pRsp) { return 0; } +static int32_t mndProcessS3MigrateDbRsp(SRpcMsg *pRsp) { return 0; } static int32_t mndProcessDropStbReq(SRpcMsg *pReq) { SMnode *pMnode = pReq->info.node; @@ -2750,8 +2792,8 @@ int32_t mndValidateStbInfo(SMnode *pMnode, SSTableVersion *pStbVersions, int32_t pStbVersion->tversion = ntohl(pStbVersion->tversion); pStbVersion->smaVer = ntohl(pStbVersion->smaVer); - bool schema = false; - bool sma = false; + bool schema = false; + bool sma = false; int32_t code = mndValidateStbVersion(pMnode, pStbVersion, &schema, &sma); if (TSDB_CODE_SUCCESS != code) { STableMetaRsp metaRsp = {0}; diff --git a/source/dnode/mnode/impl/src/mndVgroup.c b/source/dnode/mnode/impl/src/mndVgroup.c index 1b66c13ba2..3fc89c3d84 100644 --- a/source/dnode/mnode/impl/src/mndVgroup.c +++ b/source/dnode/mnode/impl/src/mndVgroup.c @@ -32,10 +32,10 @@ #define VGROUP_VER_NUMBER 1 #define VGROUP_RESERVE_SIZE 64 -static int32_t mndVgroupActionInsert(SSdb *pSdb, SVgObj *pVgroup); -static int32_t mndVgroupActionDelete(SSdb *pSdb, SVgObj *pVgroup); -static int32_t mndVgroupActionUpdate(SSdb *pSdb, SVgObj *pOld, SVgObj *pNew); -static int32_t mndNewVgActionValidate(SMnode *pMnode, STrans *pTrans, SSdbRaw *pRaw); +static int32_t mndVgroupActionInsert(SSdb *pSdb, SVgObj *pVgroup); +static int32_t mndVgroupActionDelete(SSdb *pSdb, SVgObj *pVgroup); +static int32_t mndVgroupActionUpdate(SSdb *pSdb, SVgObj *pOld, SVgObj *pNew); +static int32_t mndNewVgActionValidate(SMnode *pMnode, STrans *pTrans, SSdbRaw *pRaw); static int32_t mndRetrieveVgroups(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pBlock, int32_t rows); static void mndCancelGetNextVgroup(SMnode *pMnode, void *pIter); @@ -276,6 +276,9 @@ void *mndBuildCreateVnodeReq(SMnode *pMnode, SDnodeObj *pDnode, SDbObj *pDb, SVg createReq.daysToKeep1 = pDb->cfg.daysToKeep1; createReq.daysToKeep2 = pDb->cfg.daysToKeep2; createReq.keepTimeOffset = pDb->cfg.keepTimeOffset; + createReq.s3ChunkSize = pDb->cfg.s3ChunkSize; + createReq.s3KeepLocal = pDb->cfg.s3KeepLocal; + createReq.s3Compact = pDb->cfg.s3Compact; createReq.minRows = pDb->cfg.minRows; createReq.maxRows = pDb->cfg.maxRows; createReq.walFsyncPeriod = pDb->cfg.walFsyncPeriod; @@ -400,6 +403,8 @@ static void *mndBuildAlterVnodeConfigReq(SMnode *pMnode, SDbObj *pDb, SVgObj *pV alterReq.minRows = pDb->cfg.minRows; alterReq.walRetentionPeriod = pDb->cfg.walRetentionPeriod; alterReq.walRetentionSize = pDb->cfg.walRetentionSize; + alterReq.s3KeepLocal = pDb->cfg.s3KeepLocal; + alterReq.s3Compact = pDb->cfg.s3Compact; mInfo("vgId:%d, build alter vnode config req", pVgroup->vgId); int32_t contLen = tSerializeSAlterVnodeConfigReq(NULL, 0, &alterReq); diff --git a/source/dnode/vnode/inc/vnode.h b/source/dnode/vnode/inc/vnode.h index 627bdd7064..01086ed5e8 100644 --- a/source/dnode/vnode/inc/vnode.h +++ b/source/dnode/vnode/inc/vnode.h @@ -57,7 +57,7 @@ int32_t vnodeAlterHashRange(const char *srcPath, const char *dstPath, SAlterVnod int32_t diskPrimary, STfs *pTfs); int32_t vnodeRestoreVgroupId(const char *srcPath, const char *dstPath, int32_t srcVgId, int32_t dstVgId, int32_t diskPrimary, STfs *pTfs); -void vnodeDestroy(int32_t vgId, const char *path, STfs *pTfs); +void vnodeDestroy(int32_t vgId, const char *path, STfs *pTfs, int32_t nodeId); SVnode *vnodeOpen(const char *path, int32_t diskPrimary, STfs *pTfs, SMsgCb msgCb, bool force); void vnodePreClose(SVnode *pVnode); void vnodePostClose(SVnode *pVnode); @@ -69,7 +69,7 @@ int32_t vnodeBegin(SVnode *pVnode); int32_t vnodeStart(SVnode *pVnode); void vnodeStop(SVnode *pVnode); int64_t vnodeGetSyncHandle(SVnode *pVnode); -int32_t vnodeGetSnapshot(SVnode *pVnode, SSnapshot *pSnapshot); +int32_t vnodeGetSnapshot(SVnode *pVnode, SSnapshot *pSnapshot); void vnodeGetInfo(void *pVnode, const char **dbname, int32_t *vgId, int64_t *numOfTables, int64_t *numOfNormalTables); int32_t vnodeProcessCreateTSma(SVnode *pVnode, void *pCont, uint32_t contLen); int32_t vnodeGetTableList(void *pVnode, int8_t type, SArray *pList); @@ -137,8 +137,8 @@ tb_uid_t metaGetTableEntryUidByName(SMeta *pMeta, const char *name); int32_t metaGetCachedTbGroup(void *pVnode, tb_uid_t suid, const uint8_t *pKey, int32_t keyLen, SArray **pList); int32_t metaPutTbGroupToCache(void *pVnode, uint64_t suid, const void *pKey, int32_t keyLen, void *pPayload, int32_t payloadLen); -bool metaTbInFilterCache(SMeta *pMeta, const void* key, int8_t type); -int32_t metaPutTbToFilterCache(SMeta *pMeta, const void* key, int8_t type); +bool metaTbInFilterCache(SMeta *pMeta, const void *key, int8_t type); +int32_t metaPutTbToFilterCache(SMeta *pMeta, const void *key, int8_t type); int32_t metaSizeOfTbFilterCache(SMeta *pMeta, int8_t type); int32_t metaInitTbFilterCache(SMeta *pMeta); @@ -175,8 +175,8 @@ void *tsdbGetIvtIdx2(SMeta *pMeta); uint64_t tsdbGetReaderMaxVersion2(STsdbReader *pReader); void tsdbReaderSetCloseFlag(STsdbReader *pReader); int64_t tsdbGetLastTimestamp2(SVnode *pVnode, void *pTableList, int32_t numOfTables, const char *pIdStr); -void tsdbSetFilesetDelimited(STsdbReader* pReader); -void tsdbReaderSetNotifyCb(STsdbReader* pReader, TsdReaderNotifyCbFn notifyFn, void* param); +void tsdbSetFilesetDelimited(STsdbReader *pReader); +void tsdbReaderSetNotifyCb(STsdbReader *pReader, TsdReaderNotifyCbFn notifyFn, void *param); int32_t tsdbReuseCacherowsReader(void *pReader, void *pTableIdList, int32_t numOfTables); int32_t tsdbCacherowsReaderOpen(void *pVnode, int32_t type, void *pTableIdList, int32_t numOfTables, int32_t numOfCols, @@ -241,7 +241,7 @@ int32_t tqReaderSetSubmitMsg(STqReader *pReader, void *msgStr, int32_t msgLen, i bool tqNextDataBlockFilterOut(STqReader *pReader, SHashObj *filterOutUids); int32_t tqRetrieveDataBlock(STqReader *pReader, SSDataBlock **pRes, const char *idstr); int32_t tqRetrieveTaosxBlock(STqReader *pReader, SArray *blocks, SArray *schemas, SSubmitTbData **pSubmitTbDataRet); -int32_t tqGetStreamExecInfo(SVnode* pVnode, int64_t streamId, int64_t* pDelay, bool* fhFinished); +int32_t tqGetStreamExecInfo(SVnode *pVnode, int64_t streamId, int64_t *pDelay, bool *fhFinished); // sma int32_t smaGetTSmaDays(SVnodeCfg *pCfg, void *pCont, uint32_t contLen, int32_t *days); @@ -323,6 +323,9 @@ struct SVnodeCfg { int32_t tsdbPageSize; int32_t tdbEncryptAlgorithm; char tdbEncryptKey[ENCRYPT_KEY_LEN]; + int32_t s3ChunkSize; + int32_t s3KeepLocal; + int8_t s3Compact; }; #define TABLE_ROLLUP_ON ((int8_t)0x1) diff --git a/source/dnode/vnode/src/inc/tsdb.h b/source/dnode/vnode/src/inc/tsdb.h index 33cce621d5..8139780b02 100644 --- a/source/dnode/vnode/src/inc/tsdb.h +++ b/source/dnode/vnode/src/inc/tsdb.h @@ -635,6 +635,7 @@ typedef struct { STsdb *pTsdb; const char *objName; uint8_t s3File; + int32_t lcn; int32_t fid; int64_t cid; int64_t blkno; diff --git a/source/dnode/vnode/src/inc/vnd.h b/source/dnode/vnode/src/inc/vnd.h index 4036200d73..f9f4b603fd 100644 --- a/source/dnode/vnode/src/inc/vnd.h +++ b/source/dnode/vnode/src/inc/vnd.h @@ -133,6 +133,8 @@ int32_t vnodeAsyncCommit(SVnode* pVnode); bool vnodeShouldRollback(SVnode* pVnode); // vnodeSync.c +int64_t vnodeClusterId(SVnode* pVnode); +int32_t vnodeNodeId(SVnode* pVnode); int32_t vnodeSyncOpen(SVnode* pVnode, char* path, int32_t vnodeVersion); int32_t vnodeSyncStart(SVnode* pVnode); void vnodeSyncPreClose(SVnode* pVnode); diff --git a/source/dnode/vnode/src/inc/vnodeInt.h b/source/dnode/vnode/src/inc/vnodeInt.h index 30b7e685a1..13a13d81ca 100644 --- a/source/dnode/vnode/src/inc/vnodeInt.h +++ b/source/dnode/vnode/src/inc/vnodeInt.h @@ -108,13 +108,13 @@ typedef struct SQueryNode SQueryNode; #define VNODE_METRIC_SQL_COUNT "taosd_sql_req:count" -#define VNODE_METRIC_TAG_NAME_SQL_TYPE "sql_type" +#define VNODE_METRIC_TAG_NAME_SQL_TYPE "sql_type" #define VNODE_METRIC_TAG_NAME_CLUSTER_ID "cluster_id" -#define VNODE_METRIC_TAG_NAME_DNODE_ID "dnode_id" -#define VNODE_METRIC_TAG_NAME_DNODE_EP "dnode_ep" -#define VNODE_METRIC_TAG_NAME_VGROUP_ID "vgroup_id" -#define VNODE_METRIC_TAG_NAME_USERNAME "username" -#define VNODE_METRIC_TAG_NAME_RESULT "result" +#define VNODE_METRIC_TAG_NAME_DNODE_ID "dnode_id" +#define VNODE_METRIC_TAG_NAME_DNODE_EP "dnode_ep" +#define VNODE_METRIC_TAG_NAME_VGROUP_ID "vgroup_id" +#define VNODE_METRIC_TAG_NAME_USERNAME "username" +#define VNODE_METRIC_TAG_NAME_RESULT "result" #define VNODE_METRIC_TAG_VALUE_INSERT_AFFECTED_ROWS "inserted_rows" //#define VNODE_METRIC_TAG_VALUE_INSERT "insert" @@ -239,6 +239,7 @@ int32_t tsdbCacheNewNTableColumn(STsdb* pTsdb, int64_t uid, int16_t cid, int8_t int32_t tsdbCacheDropNTableColumn(STsdb* pTsdb, int64_t uid, int16_t cid, bool hasPrimayKey); int32_t tsdbCompact(STsdb* pTsdb, SCompactInfo* pInfo); int32_t tsdbRetention(STsdb* tsdb, int64_t now, int32_t sync); +int32_t tsdbS3Migrate(STsdb* tsdb, int64_t now, int32_t sync); int tsdbScanAndConvertSubmitMsg(STsdb* pTsdb, SSubmitReq2* pMsg); int tsdbInsertData(STsdb* pTsdb, int64_t version, SSubmitReq2* pMsg, SSubmitRsp2* pRsp); int32_t tsdbInsertTableData(STsdb* pTsdb, int64_t version, SSubmitTbData* pSubmitTbData, int32_t* affectedRows); @@ -461,12 +462,12 @@ typedef struct SVCommitSched { int64_t maxWaitMs; } SVCommitSched; -typedef struct SVMonitorObj{ - char strClusterId[TSDB_CLUSTER_ID_LEN]; - char strDnodeId[TSDB_NODE_ID_LEN]; - char strVgId[TSDB_VGROUP_ID_LEN]; - taos_counter_t *insertCounter; -}SVMonitorObj; +typedef struct SVMonitorObj { + char strClusterId[TSDB_CLUSTER_ID_LEN]; + char strDnodeId[TSDB_NODE_ID_LEN]; + char strVgId[TSDB_VGROUP_ID_LEN]; + taos_counter_t* insertCounter; +} SVMonitorObj; struct SVnode { char* path; diff --git a/source/dnode/vnode/src/tsdb/tsdbCommit2.c b/source/dnode/vnode/src/tsdb/tsdbCommit2.c index 700d6b10b7..df62fa23c2 100644 --- a/source/dnode/vnode/src/tsdb/tsdbCommit2.c +++ b/source/dnode/vnode/src/tsdb/tsdbCommit2.c @@ -46,7 +46,6 @@ typedef struct { STFileSet *fset; TABLEID tbid[1]; bool hasTSData; - bool skipTsRow; } ctx[1]; // reader @@ -128,21 +127,8 @@ static int32_t tsdbCommitTSData(SCommitter2 *committer) { continue; } } - /* - extern int8_t tsS3Enabled; - int32_t nlevel = tfsGetLevel(committer->tsdb->pVnode->pTfs); - committer->ctx->skipTsRow = false; - if (tsS3Enabled && nlevel > 1 && committer->ctx->did.level == nlevel - 1) { - committer->ctx->skipTsRow = true; - } - */ int64_t ts = TSDBROW_TS(&row->row); - - if (committer->ctx->skipTsRow && ts <= committer->ctx->maxKey) { - ts = committer->ctx->maxKey + 1; - } - if (ts > committer->ctx->maxKey) { committer->ctx->nextKey = TMIN(committer->ctx->nextKey, ts); code = tsdbIterMergerSkipTableData(committer->dataIterMerger, committer->ctx->tbid); @@ -406,31 +392,6 @@ static int32_t tsdbCommitFileSetBegin(SCommitter2 *committer) { // reset nextKey committer->ctx->nextKey = TSKEY_MAX; - committer->ctx->skipTsRow = false; - - extern int8_t tsS3Enabled; - extern int32_t tsS3UploadDelaySec; - long s3Size(const char *object_name); - int32_t nlevel = tfsGetLevel(committer->tsdb->pVnode->pTfs); - if (tsS3Enabled && nlevel > 1 && committer->ctx->fset) { - STFileObj *fobj = committer->ctx->fset->farr[TSDB_FTYPE_DATA]; - if (fobj && fobj->f->did.level == nlevel - 1) { - // if exists on s3 or local mtime < committer->ctx->now - tsS3UploadDelay - const char *object_name = taosDirEntryBaseName((char *)fobj->fname); - - if (taosCheckExistFile(fobj->fname)) { - int32_t mtime = 0; - taosStatFile(fobj->fname, NULL, &mtime, NULL); - if (mtime < committer->ctx->now - tsS3UploadDelaySec) { - committer->ctx->skipTsRow = true; - } - } else /*if (s3Size(object_name) > 0) */ { - committer->ctx->skipTsRow = true; - } - } - // new fset can be written with ts data - } - _exit: if (code) { TSDB_ERROR_LOG(TD_VID(tsdb->pVnode), lino, code); diff --git a/source/dnode/vnode/src/tsdb/tsdbDataFileRAW.c b/source/dnode/vnode/src/tsdb/tsdbDataFileRAW.c index 416c03829e..acacf98f84 100644 --- a/source/dnode/vnode/src/tsdb/tsdbDataFileRAW.c +++ b/source/dnode/vnode/src/tsdb/tsdbDataFileRAW.c @@ -29,15 +29,16 @@ int32_t tsdbDataFileRAWReaderOpen(const char *fname, const SDataFileRAWReaderCon reader[0]->config[0] = config[0]; + int32_t lcn = config->file.lcn; if (fname) { if (fname) { - code = tsdbOpenFile(fname, config->tsdb, TD_FILE_READ, &reader[0]->fd); + code = tsdbOpenFile(fname, config->tsdb, TD_FILE_READ, &reader[0]->fd, lcn); TSDB_CHECK_CODE(code, lino, _exit); } } else { char fname1[TSDB_FILENAME_LEN]; tsdbTFileName(config->tsdb, &config->file, fname1); - code = tsdbOpenFile(fname1, config->tsdb, TD_FILE_READ, &reader[0]->fd); + code = tsdbOpenFile(fname1, config->tsdb, TD_FILE_READ, &reader[0]->fd, lcn); TSDB_CHECK_CODE(code, lino, _exit); } @@ -115,8 +116,8 @@ static int32_t tsdbDataFileRAWWriterCloseAbort(SDataFileRAWWriter *writer) { static int32_t tsdbDataFileRAWWriterDoClose(SDataFileRAWWriter *writer) { return 0; } static int32_t tsdbDataFileRAWWriterCloseCommit(SDataFileRAWWriter *writer, TFileOpArray *opArr) { - int32_t code = 0; - int32_t lino = 0; + int32_t code = 0; + int32_t lino = 0; ASSERT(writer->ctx->offset <= writer->file.size); ASSERT(writer->config->fid == writer->file.fid); @@ -156,7 +157,7 @@ static int32_t tsdbDataFileRAWWriterOpenDataFD(SDataFileRAWWriter *writer) { } tsdbTFileName(writer->config->tsdb, &writer->file, fname); - code = tsdbOpenFile(fname, writer->config->tsdb, flag, &writer->fd); + code = tsdbOpenFile(fname, writer->config->tsdb, flag, &writer->fd, writer->file.lcn); TSDB_CHECK_CODE(code, lino, _exit); _exit: diff --git a/source/dnode/vnode/src/tsdb/tsdbDataFileRW.c b/source/dnode/vnode/src/tsdb/tsdbDataFileRW.c index 90aa06d0d5..f4cf96f232 100644 --- a/source/dnode/vnode/src/tsdb/tsdbDataFileRW.c +++ b/source/dnode/vnode/src/tsdb/tsdbDataFileRW.c @@ -107,7 +107,8 @@ int32_t tsdbDataFileReaderOpen(const char *fname[], const SDataFileReaderConfig if (fname) { for (int32_t i = 0; i < TSDB_FTYPE_MAX; ++i) { if (fname[i]) { - code = tsdbOpenFile(fname[i], config->tsdb, TD_FILE_READ, &reader[0]->fd[i]); + int32_t lcn = config->files[i].file.lcn; + code = tsdbOpenFile(fname[i], config->tsdb, TD_FILE_READ, &reader[0]->fd[i], lcn); TSDB_CHECK_CODE(code, lino, _exit); } } @@ -116,7 +117,8 @@ int32_t tsdbDataFileReaderOpen(const char *fname[], const SDataFileReaderConfig if (config->files[i].exist) { char fname1[TSDB_FILENAME_LEN]; tsdbTFileName(config->tsdb, &config->files[i].file, fname1); - code = tsdbOpenFile(fname1, config->tsdb, TD_FILE_READ, &reader[0]->fd[i]); + int32_t lcn = config->files[i].file.lcn; + code = tsdbOpenFile(fname1, config->tsdb, TD_FILE_READ, &reader[0]->fd[i], lcn); TSDB_CHECK_CODE(code, lino, _exit); } } @@ -340,15 +342,15 @@ int32_t tsdbDataFileReadBlockDataByColumn(SDataFileReader *reader, const SBrinRe TSDB_CHECK_CODE(code, lino, _exit); ASSERT(br.offset == buffer0->size); - bool loadExtra = false; + int extraColIdx = -1; for (int i = 0; i < ncid; i++) { if (tBlockDataGetColData(bData, cids[i]) == NULL) { - loadExtra = true; + extraColIdx = i; break; } } - if (!loadExtra) { + if (extraColIdx < 0) { goto _exit; } @@ -358,10 +360,78 @@ int32_t tsdbDataFileReadBlockDataByColumn(SDataFileReader *reader, const SBrinRe buffer0, 0, encryptAlgorithm, encryptKey); TSDB_CHECK_CODE(code, lino, _exit); + // calc szHint + int64_t szHint = 0; + int extraCols = 1; + for (int i = extraColIdx + 1; i < ncid; ++i) { + if (tBlockDataGetColData(bData, cids[i]) == NULL) { + ++extraCols; + break; + } + } + + if (extraCols >= 2) { + br = BUFFER_READER_INITIALIZER(0, buffer0); + + SBlockCol blockCol = {.cid = 0}; + for (int32_t i = extraColIdx; i < ncid; ++i) { + int16_t extraColCid = cids[i]; + + while (extraColCid > blockCol.cid) { + if (br.offset >= buffer0->size) { + blockCol.cid = INT16_MAX; + break; + } + + code = tGetBlockCol(&br, &blockCol); + TSDB_CHECK_CODE(code, lino, _exit); + } + + if (extraColCid == blockCol.cid || blockCol.cid == INT16_MAX) { + extraColIdx = i; + break; + } + } + + if (blockCol.cid > 0 && blockCol.cid < INT16_MAX /*&& blockCol->flag == HAS_VALUE*/) { + int64_t offset = blockCol.offset; + SBlockCol lastNonNoneBlockCol = {.cid = 0}; + + for (int32_t i = extraColIdx; i < ncid; ++i) { + int16_t extraColCid = cids[i]; + + while (extraColCid > blockCol.cid) { + if (br.offset >= buffer0->size) { + blockCol.cid = INT16_MAX; + break; + } + + code = tGetBlockCol(&br, &blockCol); + TSDB_CHECK_CODE(code, lino, _exit); + } + + if (extraColCid == blockCol.cid) { + lastNonNoneBlockCol = blockCol; + continue; + } + + if (blockCol.cid == INT16_MAX) { + break; + } + } + + if (lastNonNoneBlockCol.cid > 0) { + szHint = lastNonNoneBlockCol.offset + lastNonNoneBlockCol.szBitmap + lastNonNoneBlockCol.szOffset + + lastNonNoneBlockCol.szValue - offset; + } + } + } + // load each column SBlockCol blockCol = { .cid = 0, }; + bool firstRead = true; br = BUFFER_READER_INITIALIZER(0, buffer0); for (int32_t i = 0; i < ncid; i++) { int16_t cid = cids[i]; @@ -401,12 +471,20 @@ int32_t tsdbDataFileReadBlockDataByColumn(SDataFileReader *reader, const SBrinRe char* encryptKey = reader->config->tsdb->pVnode->config.tsdbCfg.encryptKey; // load from file tBufferClear(buffer1); +<<<<<<< HEAD code = tsdbReadFileToBuffer(reader->fd[TSDB_FTYPE_DATA], record->blockOffset + record->blockKeySize + hdr.szBlkCol + blockCol.offset, blockCol.szBitmap + blockCol.szOffset + blockCol.szValue, buffer1, 0, encryptAlgorithm, encryptKey); +======= + code = tsdbReadFileToBuffer( + reader->fd[TSDB_FTYPE_DATA], record->blockOffset + record->blockKeySize + hdr.szBlkCol + blockCol.offset, + blockCol.szBitmap + blockCol.szOffset + blockCol.szValue, buffer1, firstRead ? szHint : 0); +>>>>>>> 3.0 TSDB_CHECK_CODE(code, lino, _exit); + firstRead = false; + // decode the buffer SBufferReader br1 = BUFFER_READER_INITIALIZER(0, buffer1); code = tBlockDataDecompressColData(&hdr, &blockCol, &br1, bData, assist); @@ -683,6 +761,7 @@ static int32_t tsdbDataFileWriterDoOpen(SDataFileWriter *writer) { .fid = writer->config->fid, .cid = writer->config->cid, .size = 0, + .lcn = writer->config->lcn == -1 ? 0 : -1, .minVer = VERSION_MAX, .maxVer = VERSION_MIN, }; @@ -1698,8 +1777,9 @@ static int32_t tsdbDataFileWriterOpenDataFD(SDataFileWriter *writer) { flag |= (TD_FILE_CREATE | TD_FILE_TRUNC); } + int32_t lcn = writer->files[ftype].lcn; tsdbTFileName(writer->config->tsdb, &writer->files[ftype], fname); - code = tsdbOpenFile(fname, writer->config->tsdb, flag, &writer->fd[ftype]); + code = tsdbOpenFile(fname, writer->config->tsdb, flag, &writer->fd[ftype], lcn); TSDB_CHECK_CODE(code, lino, _exit); if (writer->files[ftype].size == 0) { @@ -1868,8 +1948,9 @@ static int32_t tsdbDataFileWriterOpenTombFD(SDataFileWriter *writer) { int32_t flag = (TD_FILE_READ | TD_FILE_WRITE | TD_FILE_CREATE | TD_FILE_TRUNC); + int32_t lcn = writer->files[ftype].lcn; tsdbTFileName(writer->config->tsdb, writer->files + ftype, fname); - code = tsdbOpenFile(fname, writer->config->tsdb, flag, &writer->fd[ftype]); + code = tsdbOpenFile(fname, writer->config->tsdb, flag, &writer->fd[ftype], lcn); TSDB_CHECK_CODE(code, lino, _exit); uint8_t hdr[TSDB_FHDR_SIZE] = {0}; diff --git a/source/dnode/vnode/src/tsdb/tsdbDataFileRW.h b/source/dnode/vnode/src/tsdb/tsdbDataFileRW.h index 31f930a0c3..680e8dbbfc 100644 --- a/source/dnode/vnode/src/tsdb/tsdbDataFileRW.h +++ b/source/dnode/vnode/src/tsdb/tsdbDataFileRW.h @@ -77,6 +77,7 @@ typedef struct SDataFileWriterConfig { int64_t cid; SDiskID did; int64_t compactVersion; + int32_t lcn; struct { bool exist; STFile file; diff --git a/source/dnode/vnode/src/tsdb/tsdbDef.h b/source/dnode/vnode/src/tsdb/tsdbDef.h index 606dfa223e..25fa6e28e5 100644 --- a/source/dnode/vnode/src/tsdb/tsdbDef.h +++ b/source/dnode/vnode/src/tsdb/tsdbDef.h @@ -31,7 +31,7 @@ typedef struct SFDataPtr { int64_t size; } SFDataPtr; -extern int32_t tsdbOpenFile(const char *path, STsdb *pTsdb, int32_t flag, STsdbFD **ppFD); +extern int32_t tsdbOpenFile(const char *path, STsdb *pTsdb, int32_t flag, STsdbFD **ppFD, int32_t lcn); extern void tsdbCloseFile(STsdbFD **ppFD); extern int32_t tsdbWriteFile(STsdbFD *pFD, int64_t offset, const uint8_t *pBuf, int64_t size, diff --git a/source/dnode/vnode/src/tsdb/tsdbFS2.c b/source/dnode/vnode/src/tsdb/tsdbFS2.c index 1d2fd60df2..6195c37ab2 100644 --- a/source/dnode/vnode/src/tsdb/tsdbFS2.c +++ b/source/dnode/vnode/src/tsdb/tsdbFS2.c @@ -20,7 +20,7 @@ #define BLOCK_COMMIT_FACTOR 3 -extern void remove_file(const char *fname, bool last_level); +extern void remove_file(const char *fname); #define TSDB_FS_EDIT_MIN TSDB_FEDIT_COMMIT #define TSDB_FS_EDIT_MAX (TSDB_FEDIT_MERGE + 1) @@ -355,17 +355,32 @@ static int32_t tsdbFSDoScanAndFixFile(STFileSystem *fs, const STFileObj *fobj) { // check file existence if (!taosCheckExistFile(fobj->fname)) { - if (tsS3Enabled) { - const char *object_name = taosDirEntryBaseName((char *)fobj->fname); - long s3_size = s3Size(object_name); - if (s3_size > 0) { - return 0; + bool found = false; + + if (tsS3Enabled && fobj->f->lcn > 1) { + char fname1[TSDB_FILENAME_LEN]; + tsdbTFileLastChunkName(fs->tsdb, fobj->f, fname1); + if (!taosCheckExistFile(fname1)) { + code = TSDB_CODE_FILE_CORRUPTED; + tsdbError("vgId:%d %s failed since file:%s does not exist", TD_VID(fs->tsdb->pVnode), __func__, fname1); + return code; } + + found = true; + /* + const char *object_name = taosDirEntryBaseName((char *)fobj->fname); + long s3_size = s3Size(object_name); + if (s3_size > 0) { + return 0; + } + */ } - code = TSDB_CODE_FILE_CORRUPTED; - tsdbError("vgId:%d %s failed since file:%s does not exist", TD_VID(fs->tsdb->pVnode), __func__, fobj->fname); - return code; + if (!found) { + code = TSDB_CODE_FILE_CORRUPTED; + tsdbError("vgId:%d %s failed since file:%s does not exist", TD_VID(fs->tsdb->pVnode), __func__, fobj->fname); + return code; + } } { // TODO: check file size @@ -530,9 +545,9 @@ static int32_t tsdbFSDoSanAndFix(STFileSystem *fs) { if (taosIsDir(file->aname)) continue; if (tsdbFSGetFileObjHashEntry(&fobjHash, file->aname) == NULL && - strncmp(file->aname + strlen(file->aname) - 3, ".cp", 3)) { - int32_t nlevel = tfsGetLevel(fs->tsdb->pVnode->pTfs); - remove_file(file->aname, nlevel > 1 && file->did.level == nlevel - 1); + strncmp(file->aname + strlen(file->aname) - 3, ".cp", 3) && + strncmp(file->aname + strlen(file->aname) - 5, ".data", 5)) { + remove_file(file->aname); } } @@ -900,57 +915,28 @@ int32_t tsdbFSEditCommit(STFileSystem *fs) { continue; } - bool skipMerge = false; + // bool skipMerge = false; int32_t numFile = TARRAY2_SIZE(lvl->fobjArr); if (numFile >= sttTrigger && (!fset->mergeScheduled)) { - // launch merge - { - extern int8_t tsS3Enabled; - extern int32_t tsS3UploadDelaySec; - long s3Size(const char *object_name); - int32_t nlevel = tfsGetLevel(fs->tsdb->pVnode->pTfs); - if (tsS3Enabled && nlevel > 1) { - STFileObj *fobj = fset->farr[TSDB_FTYPE_DATA]; - if (fobj && fobj->f->did.level == nlevel - 1) { - // if exists on s3 or local mtime < committer->ctx->now - tsS3UploadDelay - const char *object_name = taosDirEntryBaseName((char *)fobj->fname); + code = tsdbTFileSetOpenChannel(fset); + TSDB_CHECK_CODE(code, lino, _exit); - if (taosCheckExistFile(fobj->fname)) { - int32_t now = taosGetTimestampSec(); - int32_t mtime = 0; - taosStatFile(fobj->fname, NULL, &mtime, NULL); - if (mtime < now - tsS3UploadDelaySec) { - skipMerge = true; - } - } else /* if (s3Size(object_name) > 0) */ { - skipMerge = true; - } - } - // new fset can be written with ts data - } + SMergeArg *arg = taosMemoryMalloc(sizeof(*arg)); + if (arg == NULL) { + code = TSDB_CODE_OUT_OF_MEMORY; + TSDB_CHECK_CODE(code, lino, _exit); } - if (!skipMerge) { - code = tsdbTFileSetOpenChannel(fset); - TSDB_CHECK_CODE(code, lino, _exit); + arg->tsdb = fs->tsdb; + arg->fid = fset->fid; - SMergeArg *arg = taosMemoryMalloc(sizeof(*arg)); - if (arg == NULL) { - code = TSDB_CODE_OUT_OF_MEMORY; - TSDB_CHECK_CODE(code, lino, _exit); - } - - arg->tsdb = fs->tsdb; - arg->fid = fset->fid; - - code = vnodeAsyncC(vnodeAsyncHandle[1], fset->bgTaskChannel, EVA_PRIORITY_HIGH, tsdbMerge, taosMemoryFree, - arg, NULL); - TSDB_CHECK_CODE(code, lino, _exit); - fset->mergeScheduled = true; - } + code = vnodeAsyncC(vnodeAsyncHandle[1], fset->bgTaskChannel, EVA_PRIORITY_HIGH, tsdbMerge, taosMemoryFree, arg, + NULL); + TSDB_CHECK_CODE(code, lino, _exit); + fset->mergeScheduled = true; } - if (numFile >= sttTrigger * BLOCK_COMMIT_FACTOR && !skipMerge) { + if (numFile >= sttTrigger * BLOCK_COMMIT_FACTOR) { tsdbFSSetBlockCommit(fset, true); } else { tsdbFSSetBlockCommit(fset, false); diff --git a/source/dnode/vnode/src/tsdb/tsdbFSet2.c b/source/dnode/vnode/src/tsdb/tsdbFSet2.c index e088f54930..0820f53117 100644 --- a/source/dnode/vnode/src/tsdb/tsdbFSet2.c +++ b/source/dnode/vnode/src/tsdb/tsdbFSet2.c @@ -386,7 +386,11 @@ int32_t tsdbTFileSetApplyEdit(STsdb *pTsdb, const STFileSet *fset1, STFileSet *f fobj2->f[0] = fobj1->f[0]; } } else { - tsdbTFileObjRemove(fobj2); + if (fobj1->f->cid != fobj2->f->cid) { + tsdbTFileObjRemove(fobj2); + } else { + tsdbTFileObjRemoveUpdateLC(fobj2); + } code = tsdbTFileObjInit(pTsdb, fobj1->f, &fset2->farr[ftype]); if (code) return code; } @@ -585,7 +589,7 @@ int32_t tsdbTFileSetRangeClear(STFileSetRange **fsr) { return 0; } -int32_t tsdbTFileSetRangeArrayDestroy(TFileSetRangeArray** ppArr) { +int32_t tsdbTFileSetRangeArrayDestroy(TFileSetRangeArray **ppArr) { if (ppArr && ppArr[0]) { TARRAY2_DESTROY(ppArr[0], tsdbTFileSetRangeClear); taosMemoryFree(ppArr[0]); @@ -663,4 +667,4 @@ bool tsdbTFileSetIsEmpty(const STFileSet *fset) { int32_t tsdbTFileSetOpenChannel(STFileSet *fset) { if (VNODE_ASYNC_VALID_CHANNEL_ID(fset->bgTaskChannel)) return 0; return vnodeAChannelInit(vnodeAsyncHandle[1], &fset->bgTaskChannel); -} \ No newline at end of file +} diff --git a/source/dnode/vnode/src/tsdb/tsdbFSetRW.c b/source/dnode/vnode/src/tsdb/tsdbFSetRW.c index 9b28644c35..4343830016 100644 --- a/source/dnode/vnode/src/tsdb/tsdbFSetRW.c +++ b/source/dnode/vnode/src/tsdb/tsdbFSetRW.c @@ -148,6 +148,7 @@ int32_t tsdbFSetWriterOpen(SFSetWriterConfig *config, SFSetWriter **writer) { .compactVersion = config->compactVersion, .skmTb = writer[0]->skmTb, .skmRow = writer[0]->skmRow, + .lcn = config->lcn, .buffers = writer[0]->buffers, }; for (int32_t ftype = 0; ftype < TSDB_FTYPE_MAX; ++ftype) { diff --git a/source/dnode/vnode/src/tsdb/tsdbFSetRW.h b/source/dnode/vnode/src/tsdb/tsdbFSetRW.h index 0a8049cded..640e9db5cc 100644 --- a/source/dnode/vnode/src/tsdb/tsdbFSetRW.h +++ b/source/dnode/vnode/src/tsdb/tsdbFSetRW.h @@ -37,6 +37,7 @@ typedef struct { int64_t cid; SDiskID did; int32_t level; + int32_t lcn; struct { bool exist; STFile file; diff --git a/source/dnode/vnode/src/tsdb/tsdbFile2.c b/source/dnode/vnode/src/tsdb/tsdbFile2.c index 8cd9304188..792d94ce73 100644 --- a/source/dnode/vnode/src/tsdb/tsdbFile2.c +++ b/source/dnode/vnode/src/tsdb/tsdbFile2.c @@ -15,6 +15,7 @@ #include "tsdbFile2.h" #include "cos.h" +#include "vnd.h" // to_json static int32_t head_to_json(const STFile *file, cJSON *json); @@ -42,24 +43,9 @@ static const struct { [TSDB_FTYPE_STT] = {"stt", stt_to_json, stt_from_json}, }; -void remove_file(const char *fname, bool last_level) { - int32_t code = taosRemoveFile(fname); - if (code) { - if (tsS3Enabled && last_level) { - const char *object_name = taosDirEntryBaseName((char *)fname); - long s3_size = tsS3Enabled ? s3Size(object_name) : 0; - if (!strncmp(fname + strlen(fname) - 5, ".data", 5) && s3_size > 0) { - s3DeleteObjects(&object_name, 1); - tsdbInfo("file:%s is removed from s3", fname); - } else { - tsdbError("file:%s remove failed", fname); - } - } else { - tsdbError("file:%s remove failed", fname); - } - } else { - tsdbInfo("file:%s is removed", fname); - } +void remove_file(const char *fname) { + taosRemoveFile(fname); + tsdbInfo("file:%s is removed", fname); } static int32_t tfile_to_json(const STFile *file, cJSON *json) { @@ -73,6 +59,11 @@ static int32_t tfile_to_json(const STFile *file, cJSON *json) { return TSDB_CODE_OUT_OF_MEMORY; } + /* lcn - last chunk number */ + if (cJSON_AddNumberToObject(json, "lcn", file->lcn) == NULL) { + return TSDB_CODE_OUT_OF_MEMORY; + } + /* fid */ if (cJSON_AddNumberToObject(json, "fid", file->fid) == NULL) { return TSDB_CODE_OUT_OF_MEMORY; @@ -121,6 +112,14 @@ static int32_t tfile_from_json(const cJSON *json, STFile *file) { return TSDB_CODE_FILE_CORRUPTED; } + /* lcn */ + item = cJSON_GetObjectItem(json, "lcn"); + if (cJSON_IsNumber(item)) { + file->lcn = item->valuedouble; + } else { + // return TSDB_CODE_FILE_CORRUPTED; + } + /* fid */ item = cJSON_GetObjectItem(json, "fid"); if (cJSON_IsNumber(item)) { @@ -236,7 +235,8 @@ int32_t tsdbTFileObjInit(STsdb *pTsdb, const STFile *f, STFileObj **fobj) { fobj[0]->state = TSDB_FSTATE_LIVE; fobj[0]->ref = 1; tsdbTFileName(pTsdb, f, fobj[0]->fname); - fobj[0]->nlevel = tfsGetLevel(pTsdb->pVnode->pTfs); + // fobj[0]->nlevel = tfsGetLevel(pTsdb->pVnode->pTfs); + fobj[0]->nlevel = vnodeNodeId(pTsdb->pVnode); return 0; } @@ -258,7 +258,7 @@ int32_t tsdbTFileObjUnref(STFileObj *fobj) { tsdbTrace("unref file %s, fobj:%p ref %d", fobj->fname, fobj, nRef); if (nRef == 0) { if (fobj->state == TSDB_FSTATE_DEAD) { - remove_file(fobj->fname, fobj->nlevel > 1 && fobj->f->did.level == fobj->nlevel - 1); + remove_file(fobj->fname); } taosMemoryFree(fobj); } @@ -266,6 +266,61 @@ int32_t tsdbTFileObjUnref(STFileObj *fobj) { return 0; } +static void tsdbTFileObjRemoveLC(STFileObj *fobj, bool remove_all) { + if (fobj->f->type != TSDB_FTYPE_DATA) { + remove_file(fobj->fname); + return; + } + + if (!remove_all) { + if (fobj->f->lcn < 1) { + remove_file(fobj->fname); + return; + } else { + // remove local last chunk file + char lc_path[TSDB_FILENAME_LEN]; + tstrncpy(lc_path, fobj->fname, TSDB_FQDN_LEN); + + char *dot = strrchr(lc_path, '.'); + if (!dot) { + tsdbError("unexpected path: %s", lc_path); + return; + } + snprintf(dot + 1, TSDB_FQDN_LEN - (dot + 1 - lc_path), "%d.data", fobj->f->lcn); + + remove_file(lc_path); + } + } else { + // delete by data file prefix + char lc_path[TSDB_FILENAME_LEN]; + tstrncpy(lc_path, fobj->fname, TSDB_FQDN_LEN); + + char *object_name = taosDirEntryBaseName(lc_path); + int32_t node_id = fobj->nlevel; + char object_name_prefix[TSDB_FILENAME_LEN]; + snprintf(object_name_prefix, TSDB_FQDN_LEN, "%d/%s", node_id, object_name); + + char *dot = strrchr(object_name_prefix, '.'); + if (!dot) { + tsdbError("unexpected path: %s", object_name_prefix); + return; + } + *(dot + 1) = 0; + + s3DeleteObjectsByPrefix(object_name_prefix); + + // remove local last chunk file + dot = strrchr(lc_path, '.'); + if (!dot) { + tsdbError("unexpected path: %s", lc_path); + return; + } + snprintf(dot + 1, TSDB_FQDN_LEN - (dot + 1 - lc_path), "%d.data", fobj->f->lcn); + + remove_file(lc_path); + } +} + int32_t tsdbTFileObjRemove(STFileObj *fobj) { taosThreadMutexLock(&fobj->mutex); ASSERT(fobj->state == TSDB_FSTATE_LIVE && fobj->ref > 0); @@ -274,7 +329,21 @@ int32_t tsdbTFileObjRemove(STFileObj *fobj) { taosThreadMutexUnlock(&fobj->mutex); tsdbTrace("remove unref file %s, fobj:%p ref %d", fobj->fname, fobj, nRef); if (nRef == 0) { - remove_file(fobj->fname, fobj->nlevel > 1 && fobj->f->did.level == fobj->nlevel - 1); + tsdbTFileObjRemoveLC(fobj, true); + taosMemoryFree(fobj); + } + return 0; +} + +int32_t tsdbTFileObjRemoveUpdateLC(STFileObj *fobj) { + taosThreadMutexLock(&fobj->mutex); + ASSERT(fobj->state == TSDB_FSTATE_LIVE && fobj->ref > 0); + fobj->state = TSDB_FSTATE_DEAD; + int32_t nRef = --fobj->ref; + taosThreadMutexUnlock(&fobj->mutex); + tsdbTrace("remove unref file %s, fobj:%p ref %d", fobj->fname, fobj, nRef); + if (nRef == 0) { + tsdbTFileObjRemoveLC(fobj, false); taosMemoryFree(fobj); } return 0; @@ -310,13 +379,45 @@ int32_t tsdbTFileName(STsdb *pTsdb, const STFile *f, char fname[]) { return 0; } +int32_t tsdbTFileLastChunkName(STsdb *pTsdb, const STFile *f, char fname[]) { + SVnode *pVnode = pTsdb->pVnode; + STfs *pTfs = pVnode->pTfs; + + if (pTfs) { + snprintf(fname, // + TSDB_FILENAME_LEN, // + "%s%s%s%sv%df%dver%" PRId64 ".%d.%s", // + tfsGetDiskPath(pTfs, f->did), // + TD_DIRSEP, // + pTsdb->path, // + TD_DIRSEP, // + TD_VID(pVnode), // + f->fid, // + f->cid, // + f->lcn, // + g_tfile_info[f->type].suffix); + } else { + snprintf(fname, // + TSDB_FILENAME_LEN, // + "%s%sv%df%dver%" PRId64 ".%d.%s", // + pTsdb->path, // + TD_DIRSEP, // + TD_VID(pVnode), // + f->fid, // + f->cid, // + f->lcn, // + g_tfile_info[f->type].suffix); + } + return 0; +} + bool tsdbIsSameTFile(const STFile *f1, const STFile *f2) { if (f1->type != f2->type) return false; if (f1->did.level != f2->did.level) return false; if (f1->did.id != f2->did.id) return false; if (f1->fid != f2->fid) return false; if (f1->cid != f2->cid) return false; - if (f1->s3flag != f2->s3flag) return false; + if (f1->lcn != f2->lcn) return false; return true; } diff --git a/source/dnode/vnode/src/tsdb/tsdbFile2.h b/source/dnode/vnode/src/tsdb/tsdbFile2.h index b94f7a9fd0..70e167c1eb 100644 --- a/source/dnode/vnode/src/tsdb/tsdbFile2.h +++ b/source/dnode/vnode/src/tsdb/tsdbFile2.h @@ -45,6 +45,7 @@ enum { int32_t tsdbTFileToJson(const STFile *f, cJSON *json); int32_t tsdbJsonToTFile(const cJSON *json, tsdb_ftype_t ftype, STFile *f); int32_t tsdbTFileName(STsdb *pTsdb, const STFile *f, char fname[]); +int32_t tsdbTFileLastChunkName(STsdb *pTsdb, const STFile *f, char fname[]); bool tsdbIsSameTFile(const STFile *f1, const STFile *f2); bool tsdbIsTFileChanged(const STFile *f1, const STFile *f2); @@ -53,12 +54,13 @@ int32_t tsdbTFileObjInit(STsdb *pTsdb, const STFile *f, STFileObj **fobj); int32_t tsdbTFileObjRef(STFileObj *fobj); int32_t tsdbTFileObjUnref(STFileObj *fobj); int32_t tsdbTFileObjRemove(STFileObj *fobj); +int32_t tsdbTFileObjRemoveUpdateLC(STFileObj *fobj); int32_t tsdbTFileObjCmpr(const STFileObj **fobj1, const STFileObj **fobj2); struct STFile { tsdb_ftype_t type; SDiskID did; // disk id - int32_t s3flag; + int32_t lcn; // last chunk number int32_t fid; // file id int64_t cid; // commit id int64_t size; diff --git a/source/dnode/vnode/src/tsdb/tsdbMerge.c b/source/dnode/vnode/src/tsdb/tsdbMerge.c index 7f33f08794..87f48acaac 100644 --- a/source/dnode/vnode/src/tsdb/tsdbMerge.c +++ b/source/dnode/vnode/src/tsdb/tsdbMerge.c @@ -544,7 +544,7 @@ int32_t tsdbMerge(void *arg) { TSDB_CHECK_CODE(code, lino, _exit); if (merger->fset == NULL) return 0; - + /* bool skipMerge = false; { extern int8_t tsS3Enabled; @@ -565,7 +565,8 @@ int32_t tsdbMerge(void *arg) { if (mtime < now - tsS3UploadDelaySec) { skipMerge = true; } - } else /* if (s3Size(object_name) > 0) */ { + } else // if (s3Size(object_name) > 0) + { skipMerge = true; } } @@ -577,7 +578,7 @@ int32_t tsdbMerge(void *arg) { code = 0; goto _exit; } - + */ // do merge tsdbDebug("vgId:%d merge begin, fid:%d", TD_VID(tsdb->pVnode), merger->fid); code = tsdbDoMerge(merger); diff --git a/source/dnode/vnode/src/tsdb/tsdbReaderWriter.c b/source/dnode/vnode/src/tsdb/tsdbReaderWriter.c index bec2a65be4..46aa540cba 100644 --- a/source/dnode/vnode/src/tsdb/tsdbReaderWriter.c +++ b/source/dnode/vnode/src/tsdb/tsdbReaderWriter.c @@ -15,17 +15,52 @@ #include "cos.h" #include "tsdb.h" +<<<<<<< HEAD #include "crypt.h" +======= +#include "vnd.h" +>>>>>>> 3.0 static int32_t tsdbOpenFileImpl(STsdbFD *pFD) { int32_t code = 0; const char *path = pFD->path; int32_t szPage = pFD->szPage; int32_t flag = pFD->flag; + int64_t lc_size = 0; pFD->pFD = taosOpenFile(path, flag); if (pFD->pFD == NULL) { - int errsv = errno; + if (tsS3Enabled && pFD->lcn > 1 && !strncmp(path + strlen(path) - 5, ".data", 5)) { + char lc_path[TSDB_FILENAME_LEN]; + tstrncpy(lc_path, path, TSDB_FQDN_LEN); + + char *dot = strrchr(lc_path, '.'); + if (!dot) { + tsdbError("unexpected path: %s", lc_path); + code = TAOS_SYSTEM_ERROR(ENOENT); + goto _exit; + } + snprintf(dot + 1, TSDB_FQDN_LEN - (dot + 1 - lc_path), "%d.data", pFD->lcn); + + pFD->pFD = taosOpenFile(lc_path, flag); + if (pFD->pFD == NULL) { + code = TAOS_SYSTEM_ERROR(errno); + // taosMemoryFree(pFD); + goto _exit; + } + if (taosStatFile(lc_path, &lc_size, NULL, NULL) < 0) { + code = TAOS_SYSTEM_ERROR(errno); + // taosCloseFile(&pFD->pFD); + // taosMemoryFree(pFD); + goto _exit; + } + } else { + tsdbInfo("no file: %s", path); + code = TAOS_SYSTEM_ERROR(errno); + // taosMemoryFree(pFD); + goto _exit; + } + /* const char *object_name = taosDirEntryBaseName((char *)path); long s3_size = 0; if (tsS3Enabled) { @@ -44,7 +79,6 @@ static int32_t tsdbOpenFileImpl(STsdbFD *pFD) { s3Get(object_name, path); pFD->pFD = taosOpenFile(path, flag); - if (pFD->pFD == NULL) { code = TAOS_SYSTEM_ERROR(ENOENT); // taosMemoryFree(pFD); @@ -58,12 +92,7 @@ static int32_t tsdbOpenFileImpl(STsdbFD *pFD) { pFD->objName = object_name; // pFD->szFile = s3_size; #endif - } else { - tsdbInfo("no file: %s", path); - code = TAOS_SYSTEM_ERROR(errsv); - // taosMemoryFree(pFD); - goto _exit; - } + */ } pFD->pBuf = taosMemoryCalloc(1, szPage); @@ -74,26 +103,33 @@ static int32_t tsdbOpenFileImpl(STsdbFD *pFD) { goto _exit; } + if (lc_size > 0) { + SVnodeCfg *pCfg = &pFD->pTsdb->pVnode->config; + int64_t chunksize = (int64_t)pCfg->tsdbPageSize * pCfg->s3ChunkSize; + + pFD->szFile = lc_size + chunksize * (pFD->lcn - 1); + } + // not check file size when reading data files. - if (flag != TD_FILE_READ && !pFD->s3File) { - if (taosStatFile(path, &pFD->szFile, NULL, NULL) < 0) { + if (flag != TD_FILE_READ /* && !pFD->s3File*/) { + if (!lc_size && taosStatFile(path, &pFD->szFile, NULL, NULL) < 0) { code = TAOS_SYSTEM_ERROR(errno); // taosMemoryFree(pFD->pBuf); // taosCloseFile(&pFD->pFD); // taosMemoryFree(pFD); goto _exit; } - - ASSERT(pFD->szFile % szPage == 0); - pFD->szFile = pFD->szFile / szPage; } + ASSERT(pFD->szFile % szPage == 0); + pFD->szFile = pFD->szFile / szPage; + _exit: return code; } // =============== PAGE-WISE FILE =============== -int32_t tsdbOpenFile(const char *path, STsdb *pTsdb, int32_t flag, STsdbFD **ppFD) { +int32_t tsdbOpenFile(const char *path, STsdb *pTsdb, int32_t flag, STsdbFD **ppFD, int32_t lcn) { int32_t code = 0; STsdbFD *pFD = NULL; int32_t szPage = pTsdb->pVnode->config.tsdbPageSize; @@ -112,6 +148,7 @@ int32_t tsdbOpenFile(const char *path, STsdb *pTsdb, int32_t flag, STsdbFD **ppF pFD->flag = flag; pFD->szPage = szPage; pFD->pgno = 0; + pFD->lcn = lcn; pFD->pTsdb = pTsdb; *ppFD = pFD; @@ -124,9 +161,9 @@ void tsdbCloseFile(STsdbFD **ppFD) { STsdbFD *pFD = *ppFD; if (pFD) { taosMemoryFree(pFD->pBuf); - if (!pFD->s3File) { - taosCloseFile(&pFD->pFD); - } + // if (!pFD->s3File) { + taosCloseFile(&pFD->pFD); + //} taosMemoryFree(pFD); *ppFD = NULL; } @@ -142,12 +179,18 @@ static int32_t tsdbWriteFilePage(STsdbFD *pFD, int32_t encryptAlgorithm, char* e } } - if (pFD->s3File) { - tsdbWarn("%s file: %s", __func__, pFD->path); - return code; - } if (pFD->pgno > 0) { - int64_t n = taosLSeekFile(pFD->pFD, PAGE_OFFSET(pFD->pgno, pFD->szPage), SEEK_SET); + int64_t offset = PAGE_OFFSET(pFD->pgno, pFD->szPage); + if (pFD->lcn > 1) { + SVnodeCfg *pCfg = &pFD->pTsdb->pVnode->config; + int64_t chunksize = (int64_t)pCfg->tsdbPageSize * pCfg->s3ChunkSize; + int64_t chunkoffset = chunksize * (pFD->lcn - 1); + + offset -= chunkoffset; + } + ASSERT(offset >= 0); + + int64_t n = taosLSeekFile(pFD->pFD, offset, SEEK_SET); if (n < 0) { code = TAOS_SYSTEM_ERROR(errno); goto _exit; @@ -205,7 +248,15 @@ static int32_t tsdbReadFilePage(STsdbFD *pFD, int64_t pgno, int32_t encryptAlgor } int64_t offset = PAGE_OFFSET(pgno, pFD->szPage); + if (pFD->lcn > 1) { + SVnodeCfg *pCfg = &pFD->pTsdb->pVnode->config; + int64_t chunksize = (int64_t)pCfg->tsdbPageSize * pCfg->s3ChunkSize; + int64_t chunkoffset = chunksize * (pFD->lcn - 1); + offset -= chunkoffset; + } + ASSERT(offset >= 0); + /* if (pFD->s3File) { LRUHandle *handle = NULL; @@ -226,13 +277,15 @@ static int32_t tsdbReadFilePage(STsdbFD *pFD, int64_t pgno, int32_t encryptAlgor tsdbCacheRelease(pFD->pTsdb->bCache, handle); } else { - // seek - int64_t n = taosLSeekFile(pFD->pFD, offset, SEEK_SET); - if (n < 0) { - code = TAOS_SYSTEM_ERROR(errno); - goto _exit; - } + */ + // seek + int64_t n = taosLSeekFile(pFD->pFD, offset, SEEK_SET); + if (n < 0) { + code = TAOS_SYSTEM_ERROR(errno); + goto _exit; + } +<<<<<<< HEAD // read n = taosReadFile(pFD->pFD, pFD->pBuf, pFD->szPage); if (n < 0) { @@ -266,7 +319,18 @@ static int32_t tsdbReadFilePage(STsdbFD *pFD, int64_t pgno, int32_t encryptAlgor } //tsdbDebug("CBC_Decrypt count:%d %s", count, __FUNCTION__); } +======= + // read + n = taosReadFile(pFD->pFD, pFD->pBuf, pFD->szPage); + if (n < 0) { + code = TAOS_SYSTEM_ERROR(errno); + goto _exit; + } else if (n < pFD->szPage) { + code = TSDB_CODE_FILE_CORRUPTED; + goto _exit; +>>>>>>> 3.0 } + //} // check if (pgno > 1 && !taosCheckChecksumWhole(pFD->pBuf, pFD->szPage)) { @@ -343,6 +407,74 @@ _exit: return code; } +static int32_t tsdbReadFileBlock(STsdbFD *pFD, int64_t offset, int64_t size, bool check, uint8_t **ppBlock) { + int32_t code = 0; + SVnodeCfg *pCfg = &pFD->pTsdb->pVnode->config; + int64_t chunksize = (int64_t)pCfg->tsdbPageSize * pCfg->s3ChunkSize; + int64_t cOffset = offset % chunksize; + int64_t n = 0; + + char *object_name = taosDirEntryBaseName(pFD->path); + char object_name_prefix[TSDB_FILENAME_LEN]; + int32_t node_id = vnodeNodeId(pFD->pTsdb->pVnode); + snprintf(object_name_prefix, TSDB_FQDN_LEN, "%d/%s", node_id, object_name); + + char *dot = strrchr(object_name_prefix, '.'); + if (!dot) { + tsdbError("unexpected path: %s", object_name_prefix); + code = TAOS_SYSTEM_ERROR(ENOENT); + goto _exit; + } + + char *buf = taosMemoryCalloc(1, size); + + for (int32_t chunkno = offset / chunksize + 1; n < size; ++chunkno) { + int64_t nRead = TMIN(chunksize - cOffset, size - n); + + if (chunkno >= pFD->lcn) { + // read last chunk + int64_t ret = taosLSeekFile(pFD->pFD, chunksize * (chunkno - pFD->lcn) + cOffset, SEEK_SET); + if (ret < 0) { + code = TAOS_SYSTEM_ERROR(errno); + taosMemoryFree(buf); + goto _exit; + } + + ret = taosReadFile(pFD->pFD, buf + n, nRead); + if (ret < 0) { + code = TAOS_SYSTEM_ERROR(errno); + taosMemoryFree(buf); + goto _exit; + } else if (ret < nRead) { + code = TSDB_CODE_FILE_CORRUPTED; + taosMemoryFree(buf); + goto _exit; + } + } else { + uint8_t *pBlock = NULL; + + snprintf(dot + 1, TSDB_FQDN_LEN - (dot + 1 - object_name_prefix), "%d.data", chunkno); + + code = s3GetObjectBlock(object_name_prefix, cOffset, nRead, check, &pBlock); + if (code != TSDB_CODE_SUCCESS) { + taosMemoryFree(buf); + goto _exit; + } + + memcpy(buf + n, pBlock, nRead); + taosMemoryFree(pBlock); + } + + n += nRead; + cOffset = 0; + } + + *ppBlock = buf; + +_exit: + return code; +} + static int32_t tsdbReadFileS3(STsdbFD *pFD, int64_t offset, uint8_t *pBuf, int64_t size, int64_t szHint) { int32_t code = 0; int64_t n = 0; @@ -405,15 +537,22 @@ static int32_t tsdbReadFileS3(STsdbFD *pFD, int64_t offset, uint8_t *pBuf, int64 } int64_t retrieve_size = (pgnoEnd - pgno + 1) * pFD->szPage; + /* code = s3GetObjectBlock(pFD->objName, retrieve_offset, retrieve_size, 1, &pBlock); if (code != TSDB_CODE_SUCCESS) { goto _exit; } - + */ + code = tsdbReadFileBlock(pFD, retrieve_offset, retrieve_size, 1, &pBlock); + if (code != TSDB_CODE_SUCCESS) { + goto _exit; + } // 3, Store Pages in Cache int nPage = pgnoEnd - pgno + 1; for (int i = 0; i < nPage; ++i) { - tsdbCacheSetPageS3(pFD->pTsdb->pgCache, pFD, pgno, pBlock + i * pFD->szPage); + if (pFD->szFile != pgno) { // DONOT cache last volatile page + tsdbCacheSetPageS3(pFD->pTsdb->pgCache, pFD, pgno, pBlock + i * pFD->szPage); + } if (szHint > 0 && n >= size) { ++pgno; @@ -454,7 +593,7 @@ int32_t tsdbReadFile(STsdbFD *pFD, int64_t offset, uint8_t *pBuf, int64_t size, } } - if (pFD->s3File && tsS3BlockSize < 0) { + if (pFD->lcn > 1 /*pFD->s3File && tsS3BlockSize < 0*/) { return tsdbReadFileS3(pFD, offset, pBuf, size, szHint); } else { return tsdbReadFileImp(pFD, offset, pBuf, size, encryptAlgorithm, encryptKey); @@ -480,12 +619,17 @@ int32_t tsdbReadFileToBuffer(STsdbFD *pFD, int64_t offset, int64_t size, SBuffer int32_t tsdbFsyncFile(STsdbFD *pFD, int32_t encryptAlgorithm, char* encryptKey) { int32_t code = 0; - + /* if (pFD->s3File) { tsdbWarn("%s file: %s", __func__, pFD->path); return code; } +<<<<<<< HEAD code = tsdbWriteFilePage(pFD, encryptAlgorithm, encryptKey); +======= + */ + code = tsdbWriteFilePage(pFD); +>>>>>>> 3.0 if (code) goto _exit; if (taosFsyncFile(pFD->pFD) < 0) { @@ -516,23 +660,23 @@ int32_t tsdbDataFReaderOpen(SDataFReader **ppReader, STsdb *pTsdb, SDFileSet *pS // head tsdbHeadFileName(pTsdb, pSet->diskId, pSet->fid, pSet->pHeadF, fname); - code = tsdbOpenFile(fname, pTsdb, TD_FILE_READ, &pReader->pHeadFD); + code = tsdbOpenFile(fname, pTsdb, TD_FILE_READ, &pReader->pHeadFD, 0); TSDB_CHECK_CODE(code, lino, _exit); // data tsdbDataFileName(pTsdb, pSet->diskId, pSet->fid, pSet->pDataF, fname); - code = tsdbOpenFile(fname, pTsdb, TD_FILE_READ, &pReader->pDataFD); + code = tsdbOpenFile(fname, pTsdb, TD_FILE_READ, &pReader->pDataFD, 0); TSDB_CHECK_CODE(code, lino, _exit); // sma tsdbSmaFileName(pTsdb, pSet->diskId, pSet->fid, pSet->pSmaF, fname); - code = tsdbOpenFile(fname, pTsdb, TD_FILE_READ, &pReader->pSmaFD); + code = tsdbOpenFile(fname, pTsdb, TD_FILE_READ, &pReader->pSmaFD, 0); TSDB_CHECK_CODE(code, lino, _exit); // stt for (int32_t iStt = 0; iStt < pSet->nSttF; iStt++) { tsdbSttFileName(pTsdb, pSet->diskId, pSet->fid, pSet->aSttF[iStt], fname); - code = tsdbOpenFile(fname, pTsdb, TD_FILE_READ, &pReader->aSttFD[iStt]); + code = tsdbOpenFile(fname, pTsdb, TD_FILE_READ, &pReader->aSttFD[iStt], 0); TSDB_CHECK_CODE(code, lino, _exit); } @@ -716,7 +860,7 @@ int32_t tsdbDelFReaderOpen(SDelFReader **ppReader, SDelFile *pFile, STsdb *pTsdb pDelFReader->fDel = *pFile; tsdbDelFileName(pTsdb, pFile, fname); - code = tsdbOpenFile(fname, pTsdb, TD_FILE_READ, &pDelFReader->pReadH); + code = tsdbOpenFile(fname, pTsdb, TD_FILE_READ, &pDelFReader->pReadH, 0); if (code) { taosMemoryFree(pDelFReader); goto _exit; diff --git a/source/dnode/vnode/src/tsdb/tsdbRetention.c b/source/dnode/vnode/src/tsdb/tsdbRetention.c index 9ecb2fd5ba..2e0b44f5f8 100644 --- a/source/dnode/vnode/src/tsdb/tsdbRetention.c +++ b/source/dnode/vnode/src/tsdb/tsdbRetention.c @@ -38,24 +38,42 @@ static int32_t tsdbDoRemoveFileObject(SRTNer *rtner, const STFileObj *fobj) { return TARRAY2_APPEND(rtner->fopArr, op); } -static int32_t tsdbRemoveFileObjectS3(SRTNer *rtner, const STFileObj *fobj) { - int32_t code = 0, lino = 0; +static int32_t tsdbDoCopyFileLC(SRTNer *rtner, const STFileObj *from, const STFile *to) { + int32_t code = 0; + int32_t lino = 0; + TdFilePtr fdFrom = NULL, fdTo = NULL; + char fname_from[TSDB_FILENAME_LEN]; + char fname_to[TSDB_FILENAME_LEN]; - STFileOp op = { - .optype = TSDB_FOP_REMOVE, - .fid = fobj->f->fid, - .of = fobj->f[0], - }; + tsdbTFileLastChunkName(rtner->tsdb, from->f, fname_from); + tsdbTFileLastChunkName(rtner->tsdb, to, fname_to); - code = TARRAY2_APPEND(rtner->fopArr, op); + fdFrom = taosOpenFile(fname_from, TD_FILE_READ); + if (fdFrom == NULL) code = terrno; TSDB_CHECK_CODE(code, lino, _exit); - const char *object_name = taosDirEntryBaseName((char *)fobj->fname); - s3DeleteObjects(&object_name, 1); + tsdbInfo("vgId: %d, open tofile: %s size: %" PRId64, TD_VID(rtner->tsdb->pVnode), fname_to, from->f->size); + + fdTo = taosOpenFile(fname_to, TD_FILE_WRITE | TD_FILE_CREATE | TD_FILE_TRUNC); + if (fdTo == NULL) code = terrno; + TSDB_CHECK_CODE(code, lino, _exit); + + SVnodeCfg *pCfg = &rtner->tsdb->pVnode->config; + int64_t chunksize = (int64_t)pCfg->tsdbPageSize * pCfg->s3ChunkSize; + int64_t lc_size = tsdbLogicToFileSize(to->size, rtner->szPage) - chunksize * (to->lcn - 1); + int64_t n = taosFSendFile(fdTo, fdFrom, 0, lc_size); + if (n < 0) { + code = TAOS_SYSTEM_ERROR(errno); + TSDB_CHECK_CODE(code, lino, _exit); + } + taosCloseFile(&fdFrom); + taosCloseFile(&fdTo); _exit: if (code) { TSDB_ERROR_LOG(TD_VID(rtner->tsdb->pVnode), lino, code); + if (fdFrom) taosCloseFile(&fdFrom); + if (fdTo) taosCloseFile(&fdTo); } return code; } @@ -97,38 +115,11 @@ _exit: return code; } -static int32_t tsdbCopyFileS3(SRTNer *rtner, const STFileObj *from, const STFile *to) { - int32_t code = 0; - int32_t lino = 0; - - char fname[TSDB_FILENAME_LEN]; - TdFilePtr fdFrom = NULL; - // TdFilePtr fdTo = NULL; - - tsdbTFileName(rtner->tsdb, to, fname); - - fdFrom = taosOpenFile(from->fname, TD_FILE_READ); - if (fdFrom == NULL) code = terrno; - TSDB_CHECK_CODE(code, lino, _exit); - - char *object_name = taosDirEntryBaseName(fname); - code = s3PutObjectFromFile2(from->fname, object_name, 1); - TSDB_CHECK_CODE(code, lino, _exit); - - taosCloseFile(&fdFrom); - -_exit: - if (code) { - TSDB_ERROR_LOG(TD_VID(rtner->tsdb->pVnode), lino, code); - taosCloseFile(&fdFrom); - } - return code; -} - static int32_t tsdbDoMigrateFileObj(SRTNer *rtner, const STFileObj *fobj, const SDiskID *did) { int32_t code = 0; int32_t lino = 0; STFileOp op = {0}; + int32_t lcn = fobj->f->lcn; // remove old op = (STFileOp){ @@ -153,6 +144,7 @@ static int32_t tsdbDoMigrateFileObj(SRTNer *rtner, const STFileObj *fobj, const .maxVer = fobj->f->maxVer, .cid = fobj->f->cid, .size = fobj->f->size, + .lcn = lcn, .stt[0] = { .level = fobj->f->stt[0].level, @@ -164,59 +156,14 @@ static int32_t tsdbDoMigrateFileObj(SRTNer *rtner, const STFileObj *fobj, const TSDB_CHECK_CODE(code, lino, _exit); // do copy the file - code = tsdbDoCopyFile(rtner, fobj, &op.nf); - TSDB_CHECK_CODE(code, lino, _exit); -_exit: - if (code) { - TSDB_ERROR_LOG(TD_VID(rtner->tsdb->pVnode), lino, code); + if (lcn < 1) { + code = tsdbDoCopyFile(rtner, fobj, &op.nf); + TSDB_CHECK_CODE(code, lino, _exit); + } else { + code = tsdbDoCopyFileLC(rtner, fobj, &op.nf); + TSDB_CHECK_CODE(code, lino, _exit); } - return code; -} - -static int32_t tsdbMigrateDataFileS3(SRTNer *rtner, const STFileObj *fobj, const SDiskID *did) { - int32_t code = 0; - int32_t lino = 0; - STFileOp op = {0}; - - // remove old - op = (STFileOp){ - .optype = TSDB_FOP_REMOVE, - .fid = fobj->f->fid, - .of = fobj->f[0], - }; - - code = TARRAY2_APPEND(rtner->fopArr, op); - TSDB_CHECK_CODE(code, lino, _exit); - - // create new - op = (STFileOp){ - .optype = TSDB_FOP_CREATE, - .fid = fobj->f->fid, - .nf = - { - .type = fobj->f->type, - .did = did[0], - .fid = fobj->f->fid, - .minVer = fobj->f->minVer, - .maxVer = fobj->f->maxVer, - .cid = fobj->f->cid, - .size = fobj->f->size, - .stt[0] = - { - .level = fobj->f->stt[0].level, - }, - }, - }; - - op.nf.s3flag = true; - - code = TARRAY2_APPEND(rtner->fopArr, op); - TSDB_CHECK_CODE(code, lino, _exit); - - // do copy the file - code = tsdbCopyFileS3(rtner, fobj, &op.nf); - TSDB_CHECK_CODE(code, lino, _exit); _exit: if (code) { @@ -327,38 +274,14 @@ static int32_t tsdbDoRetentionOnFileSet(SRTNer *rtner, STFileSet *fset) { for (int32_t ftype = 0; ftype < TSDB_FTYPE_MAX && (fobj = fset->farr[ftype], 1); ++ftype) { if (fobj == NULL) continue; - int32_t nlevel = tfsGetLevel(rtner->tsdb->pVnode->pTfs); - if (fobj->f->did.level == did.level) { - if (tsS3Enabled && nlevel > 1 && TSDB_FTYPE_DATA == ftype && did.level == nlevel - 1 && - taosCheckExistFile(fobj->fname)) { - int32_t mtime = 0; - taosStatFile(fobj->fname, NULL, &mtime, NULL); - if (mtime < rtner->now - tsS3UploadDelaySec) { - tsdbInfo("file:%s size: %" PRId64 " do migrate s3", fobj->fname, fobj->f->size); - code = tsdbMigrateDataFileS3(rtner, fobj, &did); - TSDB_CHECK_CODE(code, lino, _exit); - } - } - + /* + code = tsdbCheckMigrateS3(rtner, fobj, ftype, &did); + TSDB_CHECK_CODE(code, lino, _exit); + */ continue; } - /* - if (tsS3Enabled && nlevel > 1 && TSDB_FTYPE_DATA == ftype && did.level == nlevel - 1) { - code = tsdbMigrateDataFileS3(rtner, fobj, &did); - TSDB_CHECK_CODE(code, lino, _exit); - } else { - if (tsS3Enabled) { - int64_t fsize = 0; - if (taosStatFile(fobj->fname, &fsize, NULL, NULL) < 0) { - code = TAOS_SYSTEM_ERROR(terrno); - tsdbError("vgId:%d %s failed since file:%s stat failed, reason:%s", TD_VID(rtner->tsdb->pVnode), - __func__, fobj->fname, tstrerror(code)); TSDB_CHECK_CODE(code, lino, _exit); - } - s3EvictCache(fobj->fname, fsize * 2); - } - */ if (fobj->f->did.level > did.level) { continue; } @@ -367,7 +290,6 @@ static int32_t tsdbDoRetentionOnFileSet(SRTNer *rtner, STFileSet *fset) { code = tsdbDoMigrateFileObj(rtner, fobj, &did); TSDB_CHECK_CODE(code, lino, _exit); - //} } // stt @@ -471,3 +393,414 @@ int32_t tsdbRetention(STsdb *tsdb, int64_t now, int32_t sync) { return code; } + +static int32_t tsdbS3FidLevel(int32_t fid, STsdbKeepCfg *pKeepCfg, int32_t s3KeepLocal, int64_t nowSec) { + int32_t localFid; + TSKEY key; + + if (pKeepCfg->precision == TSDB_TIME_PRECISION_MILLI) { + nowSec = nowSec * 1000; + } else if (pKeepCfg->precision == TSDB_TIME_PRECISION_MICRO) { + nowSec = nowSec * 1000000l; + } else if (pKeepCfg->precision == TSDB_TIME_PRECISION_NANO) { + nowSec = nowSec * 1000000000l; + } else { + ASSERT(0); + } + + nowSec = nowSec - pKeepCfg->keepTimeOffset * tsTickPerHour[pKeepCfg->precision]; + + key = nowSec - s3KeepLocal * tsTickPerMin[pKeepCfg->precision]; + localFid = tsdbKeyFid(key, pKeepCfg->days, pKeepCfg->precision); + + if (fid >= localFid) { + return 0; + } else { + return 1; + } +} + +static int32_t tsdbCopyFileS3(SRTNer *rtner, const STFileObj *from, const STFile *to) { + int32_t code = 0; + int32_t lino = 0; + + char fname[TSDB_FILENAME_LEN]; + TdFilePtr fdFrom = NULL; + // TdFilePtr fdTo = NULL; + + tsdbTFileName(rtner->tsdb, to, fname); + + fdFrom = taosOpenFile(from->fname, TD_FILE_READ); + if (fdFrom == NULL) code = terrno; + TSDB_CHECK_CODE(code, lino, _exit); + + char *object_name = taosDirEntryBaseName(fname); + code = s3PutObjectFromFile2(from->fname, object_name, 1); + TSDB_CHECK_CODE(code, lino, _exit); + + taosCloseFile(&fdFrom); + +_exit: + if (code) { + TSDB_ERROR_LOG(TD_VID(rtner->tsdb->pVnode), lino, code); + taosCloseFile(&fdFrom); + } + return code; +} + +static int32_t tsdbMigrateDataFileLCS3(SRTNer *rtner, const STFileObj *fobj, int64_t size, int64_t chunksize) { + int32_t code = 0; + int32_t lino = 0; + STFileOp op = {0}; + TdFilePtr fdFrom = NULL, fdTo = NULL; + int32_t lcn = fobj->f->lcn + (size - 1) / chunksize; + + // remove old + op = (STFileOp){ + .optype = TSDB_FOP_REMOVE, + .fid = fobj->f->fid, + .of = fobj->f[0], + }; + + code = TARRAY2_APPEND(rtner->fopArr, op); + TSDB_CHECK_CODE(code, lino, _exit); + + // create new + op = (STFileOp){ + .optype = TSDB_FOP_CREATE, + .fid = fobj->f->fid, + .nf = + { + .type = fobj->f->type, + .did = fobj->f->did, + .fid = fobj->f->fid, + .minVer = fobj->f->minVer, + .maxVer = fobj->f->maxVer, + .cid = fobj->f->cid, + .size = fobj->f->size, + .lcn = lcn, + .stt[0] = + { + .level = fobj->f->stt[0].level, + }, + }, + }; + + code = TARRAY2_APPEND(rtner->fopArr, op); + TSDB_CHECK_CODE(code, lino, _exit); + + char fname[TSDB_FILENAME_LEN]; + tsdbTFileName(rtner->tsdb, &op.nf, fname); + char *object_name = taosDirEntryBaseName(fname); + char object_name_prefix[TSDB_FILENAME_LEN]; + int32_t node_id = vnodeNodeId(rtner->tsdb->pVnode); + snprintf(object_name_prefix, TSDB_FQDN_LEN, "%d/%s", node_id, object_name); + + char *dot = strrchr(object_name_prefix, '.'); + if (!dot) { + tsdbError("vgId:%d, incorrect lcn: %d, %s at line %d", TD_VID(rtner->tsdb->pVnode), lcn, __func__, lino); + return -1; + } + + char *dot2 = strchr(object_name, '.'); + if (!dot) { + tsdbError("vgId:%d, incorrect lcn: %d, %s at line %d", TD_VID(rtner->tsdb->pVnode), lcn, __func__, lino); + return -1; + } + snprintf(dot2 + 1, TSDB_FQDN_LEN - (dot2 + 1 - object_name), "%d.data", fobj->f->lcn); + + // do copy the file + for (int32_t cn = fobj->f->lcn; cn < lcn; ++cn) { + snprintf(dot + 1, TSDB_FQDN_LEN - (dot + 1 - object_name_prefix), "%d.data", cn); + int64_t c_offset = chunksize * (cn - fobj->f->lcn); + + code = s3PutObjectFromFileOffset(fname, object_name_prefix, c_offset, chunksize); + TSDB_CHECK_CODE(code, lino, _exit); + } + + // copy last chunk + int64_t lc_offset = chunksize * (lcn - fobj->f->lcn); + int64_t lc_size = size - lc_offset; + + snprintf(dot2 + 1, TSDB_FQDN_LEN - (dot2 + 1 - object_name), "%d.data", fobj->f->lcn); + + fdFrom = taosOpenFile(fname, TD_FILE_READ); + if (fdFrom == NULL) code = terrno; + TSDB_CHECK_CODE(code, lino, _exit); + + tsdbInfo("vgId: %d, open lcfile: %s size: %" PRId64, TD_VID(rtner->tsdb->pVnode), fname, lc_size); + + snprintf(dot2 + 1, TSDB_FQDN_LEN - (dot2 + 1 - object_name), "%d.data", lcn); + fdTo = taosOpenFile(fname, TD_FILE_WRITE | TD_FILE_CREATE | TD_FILE_TRUNC); + if (fdTo == NULL) code = terrno; + TSDB_CHECK_CODE(code, lino, _exit); + + int64_t n = taosFSendFile(fdTo, fdFrom, &lc_offset, lc_size); + if (n < 0) { + code = TAOS_SYSTEM_ERROR(errno); + TSDB_CHECK_CODE(code, lino, _exit); + } + taosCloseFile(&fdFrom); + taosCloseFile(&fdTo); + +_exit: + if (code) { + TSDB_ERROR_LOG(TD_VID(rtner->tsdb->pVnode), lino, code); + if (fdFrom) taosCloseFile(&fdFrom); + if (fdTo) taosCloseFile(&fdTo); + } + return code; +} + +static int32_t tsdbMigrateDataFileS3(SRTNer *rtner, const STFileObj *fobj, int64_t size, int64_t chunksize) { + int32_t code = 0; + int32_t lino = 0; + STFileOp op = {0}; + int32_t lcn = (size - 1) / chunksize + 1; + + // remove old + op = (STFileOp){ + .optype = TSDB_FOP_REMOVE, + .fid = fobj->f->fid, + .of = fobj->f[0], + }; + + code = TARRAY2_APPEND(rtner->fopArr, op); + TSDB_CHECK_CODE(code, lino, _exit); + + // create new + op = (STFileOp){ + .optype = TSDB_FOP_CREATE, + .fid = fobj->f->fid, + .nf = + { + .type = fobj->f->type, + .did = fobj->f->did, + .fid = fobj->f->fid, + .minVer = fobj->f->minVer, + .maxVer = fobj->f->maxVer, + .cid = fobj->f->cid, + .size = fobj->f->size, + .lcn = lcn, + .stt[0] = + { + .level = fobj->f->stt[0].level, + }, + }, + }; + + code = TARRAY2_APPEND(rtner->fopArr, op); + TSDB_CHECK_CODE(code, lino, _exit); + + char fname[TSDB_FILENAME_LEN]; + tsdbTFileName(rtner->tsdb, &op.nf, fname); + char *object_name = taosDirEntryBaseName(fname); + char object_name_prefix[TSDB_FILENAME_LEN]; + int32_t node_id = vnodeNodeId(rtner->tsdb->pVnode); + snprintf(object_name_prefix, TSDB_FQDN_LEN, "%d/%s", node_id, object_name); + + char *dot = strrchr(object_name_prefix, '.'); + if (!dot) { + tsdbError("vgId:%d, incorrect lcn: %d, %s at line %d", TD_VID(rtner->tsdb->pVnode), lcn, __func__, lino); + return -1; + } + + // do copy the file + for (int32_t cn = 1; cn < lcn; ++cn) { + snprintf(dot + 1, TSDB_FQDN_LEN - (dot + 1 - object_name_prefix), "%d.data", cn); + int64_t c_offset = chunksize * (cn - 1); + + code = s3PutObjectFromFileOffset(fobj->fname, object_name_prefix, c_offset, chunksize); + TSDB_CHECK_CODE(code, lino, _exit); + } + + // copy last chunk + TdFilePtr fdFrom = NULL, fdTo = NULL; + int64_t lc_offset = (int64_t)(lcn - 1) * chunksize; + int64_t lc_size = size - lc_offset; + + dot = strchr(object_name, '.'); + if (!dot) { + tsdbError("vgId:%d, incorrect lcn: %d, %s at line %d", TD_VID(rtner->tsdb->pVnode), lcn, __func__, lino); + return -1; + } + snprintf(dot + 1, TSDB_FQDN_LEN - (dot + 1 - object_name), "%d.data", lcn); + + fdFrom = taosOpenFile(fobj->fname, TD_FILE_READ); + if (fdFrom == NULL) code = terrno; + TSDB_CHECK_CODE(code, lino, _exit); + + tsdbInfo("vgId: %d, open lcfile: %s size: %" PRId64, TD_VID(rtner->tsdb->pVnode), fname, fobj->f->size); + + fdTo = taosOpenFile(fname, TD_FILE_WRITE | TD_FILE_CREATE | TD_FILE_TRUNC); + if (fdTo == NULL) code = terrno; + TSDB_CHECK_CODE(code, lino, _exit); + + int64_t n = taosFSendFile(fdTo, fdFrom, &lc_offset, lc_size); + if (n < 0) { + code = TAOS_SYSTEM_ERROR(errno); + TSDB_CHECK_CODE(code, lino, _exit); + } + taosCloseFile(&fdFrom); + taosCloseFile(&fdTo); + +_exit: + if (code) { + TSDB_ERROR_LOG(TD_VID(rtner->tsdb->pVnode), lino, code); + taosCloseFile(&fdFrom); + taosCloseFile(&fdTo); + } + return code; +} + +static int32_t tsdbDoS3MigrateOnFileSet(SRTNer *rtner, STFileSet *fset) { + int32_t code = 0; + int32_t lino = 0; + + STFileObj *fobj = fset->farr[TSDB_FTYPE_DATA]; + if (!fobj) return code; + + int32_t expLevel = tsdbFidLevel(fset->fid, &rtner->tsdb->keepCfg, rtner->now); + if (expLevel < 0) return code; // expired + + SVnodeCfg *pCfg = &rtner->tsdb->pVnode->config; + int32_t s3KeepLocal = pCfg->s3KeepLocal; + int32_t s3ExpLevel = tsdbS3FidLevel(fset->fid, &rtner->tsdb->keepCfg, s3KeepLocal, rtner->now); + if (s3ExpLevel < 1) return code; // keep on local storage + + int64_t chunksize = (int64_t)pCfg->tsdbPageSize * pCfg->s3ChunkSize; + int32_t lcn = fobj->f->lcn; + + if (lcn < 1 && taosCheckExistFile(fobj->fname)) { + int32_t mtime = 0; + int64_t size = 0; + taosStatFile(fobj->fname, &size, &mtime, NULL); + if (size > chunksize && mtime < rtner->now - tsS3UploadDelaySec) { + if (pCfg->s3Compact && lcn < 0) { + extern int32_t tsdbAsyncCompact(STsdb * tsdb, const STimeWindow *tw, bool sync); + + STimeWindow win = {0}; + tsdbFidKeyRange(fset->fid, rtner->tsdb->keepCfg.days, rtner->tsdb->keepCfg.precision, &win.skey, &win.ekey); + + tsdbInfo("vgId:%d, compact begin lcn: %d.", TD_VID(rtner->tsdb->pVnode), lcn); + tsdbAsyncCompact(rtner->tsdb, &win, pCfg->sttTrigger == 1); + tsdbInfo("vgId:%d, compact end lcn: %d.", TD_VID(rtner->tsdb->pVnode), lcn); + return code; + } + + code = tsdbMigrateDataFileS3(rtner, fobj, size, chunksize); + TSDB_CHECK_CODE(code, lino, _exit); + } + } else { + if (lcn <= 1) { + tsdbError("vgId:%d, incorrect lcn: %d, %s at line %d", TD_VID(rtner->tsdb->pVnode), lcn, __func__, lino); + return code; + } + char fname1[TSDB_FILENAME_LEN]; + tsdbTFileLastChunkName(rtner->tsdb, fobj->f, fname1); + + if (taosCheckExistFile(fname1)) { + int32_t mtime = 0; + int64_t size = 0; + taosStatFile(fname1, &size, &mtime, NULL); + if (size > chunksize && mtime < rtner->now - tsS3UploadDelaySec) { + code = tsdbMigrateDataFileLCS3(rtner, fobj, size, chunksize); + TSDB_CHECK_CODE(code, lino, _exit); + } + } else { + tsdbError("vgId:%d, file: %s not found, %s at line %d", TD_VID(rtner->tsdb->pVnode), fname1, __func__, lino); + return code; + } + } + +_exit: + if (code) { + TSDB_ERROR_LOG(TD_VID(rtner->tsdb->pVnode), lino, code); + } + return code; +} + +static int32_t tsdbDoS3MigrateAsync(void *arg) { + int32_t code = 0; + int32_t lino = 0; + SRTNer rtner[1] = {0}; + + code = tsdbDoRetentionBegin(arg, rtner); + TSDB_CHECK_CODE(code, lino, _exit); + + STFileSet *fset; + TARRAY2_FOREACH(rtner->fsetArr, fset) { + if (fset->fid != ((SRtnArg *)arg)->fid) continue; + + code = tsdbDoS3MigrateOnFileSet(rtner, fset); + TSDB_CHECK_CODE(code, lino, _exit); + } + + code = tsdbDoRetentionEnd(rtner); + TSDB_CHECK_CODE(code, lino, _exit); + +_exit: + if (code) { + if (TARRAY2_DATA(rtner->fopArr)) { + TARRAY2_DESTROY(rtner->fopArr, NULL); + } + TFileSetArray **fsetArr = &rtner->fsetArr; + if (fsetArr[0]) { + tsdbFSDestroyCopySnapshot(&rtner->fsetArr); + } + + TSDB_ERROR_LOG(TD_VID(rtner->tsdb->pVnode), lino, code); + } + return code; +} + +int32_t tsdbS3Migrate(STsdb *tsdb, int64_t now, int32_t sync) { + int32_t code = 0; + + if (!tsS3Enabled) { + return code; + } + + taosThreadMutexLock(&tsdb->mutex); + + if (tsdb->bgTaskDisabled) { + taosThreadMutexUnlock(&tsdb->mutex); + return 0; + } + + STFileSet *fset; + TARRAY2_FOREACH(tsdb->pFS->fSetArr, fset) { + code = tsdbTFileSetOpenChannel(fset); + if (code) { + taosThreadMutexUnlock(&tsdb->mutex); + return code; + } + + SRtnArg *arg = taosMemoryMalloc(sizeof(*arg)); + if (arg == NULL) { + taosThreadMutexUnlock(&tsdb->mutex); + return TSDB_CODE_OUT_OF_MEMORY; + } + + arg->tsdb = tsdb; + arg->now = now; + arg->fid = fset->fid; + + if (sync) { + code = vnodeAsyncC(vnodeAsyncHandle[0], tsdb->pVnode->commitChannel, EVA_PRIORITY_LOW, tsdbDoS3MigrateAsync, + tsdbFreeRtnArg, arg, NULL); + } else { + code = vnodeAsyncC(vnodeAsyncHandle[1], fset->bgTaskChannel, EVA_PRIORITY_LOW, tsdbDoS3MigrateAsync, + tsdbFreeRtnArg, arg, NULL); + } + if (code) { + tsdbFreeRtnArg(arg); + taosThreadMutexUnlock(&tsdb->mutex); + return code; + } + } + + taosThreadMutexUnlock(&tsdb->mutex); + + return code; +} diff --git a/source/dnode/vnode/src/tsdb/tsdbSttFileRW.c b/source/dnode/vnode/src/tsdb/tsdbSttFileRW.c index 558096b36e..4fb4a12abb 100644 --- a/source/dnode/vnode/src/tsdb/tsdbSttFileRW.c +++ b/source/dnode/vnode/src/tsdb/tsdbSttFileRW.c @@ -49,12 +49,12 @@ int32_t tsdbSttFileReaderOpen(const char *fname, const SSttFileReaderConfig *con // open file if (fname) { - code = tsdbOpenFile(fname, config->tsdb, TD_FILE_READ, &reader[0]->fd); + code = tsdbOpenFile(fname, config->tsdb, TD_FILE_READ, &reader[0]->fd, 0); TSDB_CHECK_CODE(code, lino, _exit); } else { char fname1[TSDB_FILENAME_LEN]; tsdbTFileName(config->tsdb, config->file, fname1); - code = tsdbOpenFile(fname1, config->tsdb, TD_FILE_READ, &reader[0]->fd); + code = tsdbOpenFile(fname1, config->tsdb, TD_FILE_READ, &reader[0]->fd, 0); TSDB_CHECK_CODE(code, lino, _exit); } @@ -772,7 +772,7 @@ static int32_t tsdbSttFWriterDoOpen(SSttFileWriter *writer) { char fname[TSDB_FILENAME_LEN]; tsdbTFileName(writer->config->tsdb, writer->file, fname); - code = tsdbOpenFile(fname, writer->config->tsdb, flag, &writer->fd); + code = tsdbOpenFile(fname, writer->config->tsdb, flag, &writer->fd, 0); TSDB_CHECK_CODE(code, lino, _exit); uint8_t hdr[TSDB_FHDR_SIZE] = {0}; diff --git a/source/dnode/vnode/src/tsdb/tsdbUpgrade.c b/source/dnode/vnode/src/tsdb/tsdbUpgrade.c index 16ae803b34..09ab2243a0 100644 --- a/source/dnode/vnode/src/tsdb/tsdbUpgrade.c +++ b/source/dnode/vnode/src/tsdb/tsdbUpgrade.c @@ -84,7 +84,7 @@ static int32_t tsdbUpgradeHead(STsdb *tsdb, SDFileSet *pDFileSet, SDataFReader * char fname[TSDB_FILENAME_LEN]; tsdbTFileName(tsdb, &file, fname); - code = tsdbOpenFile(fname, tsdb, TD_FILE_READ | TD_FILE_WRITE, &ctx->fd); + code = tsdbOpenFile(fname, tsdb, TD_FILE_READ | TD_FILE_WRITE, &ctx->fd, 0); TSDB_CHECK_CODE(code, lino, _exit); // convert @@ -281,7 +281,7 @@ static int32_t tsdbUpgradeSttFile(STsdb *tsdb, SDFileSet *pDFileSet, SDataFReade code = tsdbTFileObjInit(tsdb, &file, &fobj); TSDB_CHECK_CODE(code, lino, _exit1); - code = tsdbOpenFile(fobj->fname, tsdb, TD_FILE_READ | TD_FILE_WRITE, &ctx->fd); + code = tsdbOpenFile(fobj->fname, tsdb, TD_FILE_READ | TD_FILE_WRITE, &ctx->fd, 0); TSDB_CHECK_CODE(code, lino, _exit1); for (int32_t iSttBlk = 0; iSttBlk < taosArrayGetSize(aSttBlk); iSttBlk++) { @@ -437,7 +437,7 @@ static int32_t tsdbUpgradeOpenTombFile(STsdb *tsdb, STFileSet *fset, STsdbFD **f } char fname[TSDB_FILENAME_LEN] = {0}; - code = tsdbOpenFile(fobj[0]->fname, tsdb, TD_FILE_READ | TD_FILE_WRITE | TD_FILE_TRUNC | TD_FILE_CREATE, fd); + code = tsdbOpenFile(fobj[0]->fname, tsdb, TD_FILE_READ | TD_FILE_WRITE | TD_FILE_TRUNC | TD_FILE_CREATE, fd, 0); TSDB_CHECK_CODE(code, lino, _exit); uint8_t hdr[TSDB_FHDR_SIZE] = {0}; diff --git a/source/dnode/vnode/src/vnd/vnodeCfg.c b/source/dnode/vnode/src/vnd/vnodeCfg.c index 860daa0b31..dd965849d4 100644 --- a/source/dnode/vnode/src/vnd/vnodeCfg.c +++ b/source/dnode/vnode/src/vnd/vnodeCfg.c @@ -52,6 +52,9 @@ const SVnodeCfg vnodeCfgDefault = {.vgId = -1, .hashEnd = 0, .hashMethod = 0, .sttTrigger = TSDB_DEFAULT_SST_TRIGGER, + .s3ChunkSize = TSDB_DEFAULT_S3_CHUNK_SIZE, + .s3KeepLocal = TSDB_DEFAULT_S3_KEEP_LOCAL, + .s3Compact = TSDB_DEFAULT_S3_COMPACT, .tsdbPageSize = TSDB_DEFAULT_PAGE_SIZE}; int vnodeCheckCfg(const SVnodeCfg *pCfg) { @@ -107,6 +110,9 @@ int vnodeEncodeConfig(const void *pObj, SJson *pJson) { if (tjsonAddIntegerToObject(pJson, "keep1", pCfg->tsdbCfg.keep1) < 0) return -1; if (tjsonAddIntegerToObject(pJson, "keep2", pCfg->tsdbCfg.keep2) < 0) return -1; if (tjsonAddIntegerToObject(pJson, "keepTimeOffset", pCfg->tsdbCfg.keepTimeOffset) < 0) return -1; + if (tjsonAddIntegerToObject(pJson, "s3ChunkSize", pCfg->s3ChunkSize) < 0) return -1; + if (tjsonAddIntegerToObject(pJson, "s3KeepLocal", pCfg->s3KeepLocal) < 0) return -1; + if (tjsonAddIntegerToObject(pJson, "s3Compact", pCfg->s3Compact) < 0) return -1; if (pCfg->tsdbCfg.retentions[0].keep > 0) { int32_t nRetention = 1; if (pCfg->tsdbCfg.retentions[1].freq > 0) { @@ -158,9 +164,8 @@ int vnodeEncodeConfig(const void *pObj, SJson *pJson) { SJson *nodeInfo = tjsonCreateArray(); if (nodeInfo == NULL) return -1; if (tjsonAddItemToObject(pJson, "syncCfg.nodeInfo", nodeInfo) < 0) return -1; - vDebug("vgId:%d, encode config, replicas:%d totalReplicas:%d selfIndex:%d changeVersion:%d", - pCfg->vgId, pCfg->syncCfg.replicaNum, - pCfg->syncCfg.totalReplicaNum, pCfg->syncCfg.myIndex, pCfg->syncCfg.changeVersion); + vDebug("vgId:%d, encode config, replicas:%d totalReplicas:%d selfIndex:%d changeVersion:%d", pCfg->vgId, + pCfg->syncCfg.replicaNum, pCfg->syncCfg.totalReplicaNum, pCfg->syncCfg.myIndex, pCfg->syncCfg.changeVersion); for (int i = 0; i < pCfg->syncCfg.totalReplicaNum; ++i) { SJson *info = tjsonCreateObject(); SNodeInfo *pNode = (SNodeInfo *)&pCfg->syncCfg.nodeInfo[i]; @@ -360,6 +365,19 @@ int vnodeDecodeConfig(const SJson *pJson, void *pObj) { pCfg->tsdbPageSize = TSDB_DEFAULT_TSDB_PAGESIZE * 1024; } + tjsonGetNumberValue(pJson, "s3ChunkSize", pCfg->s3ChunkSize, code); + if (code < 0) { + pCfg->s3ChunkSize = TSDB_DEFAULT_S3_CHUNK_SIZE; + } + tjsonGetNumberValue(pJson, "s3KeepLocal", pCfg->s3KeepLocal, code); + if (code < 0) { + pCfg->s3KeepLocal = TSDB_DEFAULT_S3_KEEP_LOCAL; + } + tjsonGetNumberValue(pJson, "s3Compact", pCfg->s3Compact, code); + if (code < 0) { + pCfg->s3Compact = TSDB_DEFAULT_S3_COMPACT; + } + return 0; } diff --git a/source/dnode/vnode/src/vnd/vnodeOpen.c b/source/dnode/vnode/src/vnd/vnodeOpen.c index daee8966f9..3036346230 100644 --- a/source/dnode/vnode/src/vnd/vnodeOpen.c +++ b/source/dnode/vnode/src/vnd/vnodeOpen.c @@ -305,14 +305,14 @@ int32_t vnodeRestoreVgroupId(const char *srcPath, const char *dstPath, int32_t s return dstVgId; } -void vnodeDestroy(int32_t vgId, const char *path, STfs *pTfs) { +void vnodeDestroy(int32_t vgId, const char *path, STfs *pTfs, int32_t nodeId) { vInfo("path:%s is removed while destroy vnode", path); tfsRmdir(pTfs, path); - int32_t nlevel = tfsGetLevel(pTfs); - if (vgId > 0 && nlevel > 1 && tsS3Enabled) { + // int32_t nlevel = tfsGetLevel(pTfs); + if (nodeId > 0 && vgId > 0 /*&& nlevel > 1*/ && tsS3Enabled) { char vnode_prefix[TSDB_FILENAME_LEN]; - snprintf(vnode_prefix, TSDB_FILENAME_LEN, "v%df", vgId); + snprintf(vnode_prefix, TSDB_FILENAME_LEN, "%d/v%df", nodeId, vgId); s3DeleteObjectsByPrefix(vnode_prefix); } } @@ -480,11 +480,11 @@ SVnode *vnodeOpen(const char *path, int32_t diskPrimary, STfs *pTfs, SMsgCb msgC vnodeRollback(pVnode); } - snprintf(pVnode->monitor.strClusterId, TSDB_CLUSTER_ID_LEN, "%"PRId64, pVnode->config.syncCfg.nodeInfo[0].clusterId); - snprintf(pVnode->monitor.strDnodeId, TSDB_NODE_ID_LEN, "%"PRId32, pVnode->config.syncCfg.nodeInfo[0].nodeId); - snprintf(pVnode->monitor.strVgId, TSDB_VGROUP_ID_LEN, "%"PRId32, pVnode->config.vgId); + snprintf(pVnode->monitor.strClusterId, TSDB_CLUSTER_ID_LEN, "%" PRId64, pVnode->config.syncCfg.nodeInfo[0].clusterId); + snprintf(pVnode->monitor.strDnodeId, TSDB_NODE_ID_LEN, "%" PRId32, pVnode->config.syncCfg.nodeInfo[0].nodeId); + snprintf(pVnode->monitor.strVgId, TSDB_VGROUP_ID_LEN, "%" PRId32, pVnode->config.vgId); - if(tsEnableMonitor && pVnode->monitor.insertCounter == NULL){ + if (tsEnableMonitor && pVnode->monitor.insertCounter == NULL) { taos_counter_t *counter = NULL; counter = taos_collector_registry_get_metric(VNODE_METRIC_SQL_COUNT); if(counter == NULL){ @@ -499,11 +499,11 @@ SVnode *vnodeOpen(const char *path, int32_t diskPrimary, STfs *pTfs, SMsgCb msgC if(taos_collector_registry_register_metric(counter) == 1){ taos_counter_destroy(counter); counter = taos_collector_registry_get_metric(VNODE_METRIC_SQL_COUNT); - vInfo("vgId:%d, get metric from registry:%p",TD_VID(pVnode), counter); + vInfo("vgId:%d, get metric from registry:%p", TD_VID(pVnode), counter); } } pVnode->monitor.insertCounter = counter; - vInfo("vgId:%d, succeed to set metric:%p",TD_VID(pVnode), counter); + vInfo("vgId:%d, succeed to set metric:%p", TD_VID(pVnode), counter); } return pVnode; diff --git a/source/dnode/vnode/src/vnd/vnodeRetention.c b/source/dnode/vnode/src/vnd/vnodeRetention.c index c510c0fe92..5db20b8fc7 100644 --- a/source/dnode/vnode/src/vnd/vnodeRetention.c +++ b/source/dnode/vnode/src/vnd/vnodeRetention.c @@ -23,4 +23,12 @@ int32_t vnodeDoRetention(SVnode *pVnode, int64_t now) { if (TSDB_CODE_SUCCESS == code) code = smaRetention(pVnode->pSma, now); return code; -} \ No newline at end of file +} + +int32_t vnodeDoS3Migrate(SVnode *pVnode, int64_t now) { + int32_t code = TSDB_CODE_SUCCESS; + + code = tsdbS3Migrate(pVnode->pTsdb, now, pVnode->config.sttTrigger == 1); + + return code; +} diff --git a/source/dnode/vnode/src/vnd/vnodeSvr.c b/source/dnode/vnode/src/vnd/vnodeSvr.c index b5e049b692..8a2438d5a4 100644 --- a/source/dnode/vnode/src/vnd/vnodeSvr.c +++ b/source/dnode/vnode/src/vnd/vnodeSvr.c @@ -38,6 +38,7 @@ static int32_t vnodeProcessAlterConfirmReq(SVnode *pVnode, int64_t ver, void *pR static int32_t vnodeProcessAlterConfigReq(SVnode *pVnode, int64_t ver, void *pReq, int32_t len, SRpcMsg *pRsp); static int32_t vnodeProcessDropTtlTbReq(SVnode *pVnode, int64_t ver, void *pReq, int32_t len, SRpcMsg *pRsp); static int32_t vnodeProcessTrimReq(SVnode *pVnode, int64_t ver, void *pReq, int32_t len, SRpcMsg *pRsp); +static int32_t vnodeProcessS3MigrateReq(SVnode *pVnode, int64_t ver, void *pReq, int32_t len, SRpcMsg *pRsp); static int32_t vnodeProcessDeleteReq(SVnode *pVnode, int64_t ver, void *pReq, int32_t len, SRpcMsg *pRsp, SRpcMsg *pOriginalMsg); static int32_t vnodeProcessBatchDeleteReq(SVnode *pVnode, int64_t ver, void *pReq, int32_t len, SRpcMsg *pRsp); @@ -565,6 +566,9 @@ int32_t vnodeProcessWriteMsg(SVnode *pVnode, SRpcMsg *pMsg, int64_t ver, SRpcMsg case TDMT_VND_TRIM: if (vnodeProcessTrimReq(pVnode, ver, pReq, len, pRsp) < 0) goto _err; break; + case TDMT_VND_S3MIGRATE: + if (vnodeProcessS3MigrateReq(pVnode, ver, pReq, len, pRsp) < 0) goto _err; + break; case TDMT_VND_CREATE_SMA: if (vnodeProcessCreateTSmaReq(pVnode, ver, pReq, len, pRsp) < 0) goto _err; break; @@ -875,6 +879,26 @@ _exit: return code; } +extern int32_t vnodeDoS3Migrate(SVnode *pVnode, int64_t now); + +static int32_t vnodeProcessS3MigrateReq(SVnode *pVnode, int64_t ver, void *pReq, int32_t len, SRpcMsg *pRsp) { + int32_t code = 0; + SVS3MigrateDbReq s3migrateReq = {0}; + + // decode + if (tDeserializeSVS3MigrateDbReq(pReq, len, &s3migrateReq) != 0) { + code = TSDB_CODE_INVALID_MSG; + goto _exit; + } + + vInfo("vgId:%d, s3migrate vnode request will be processed, time:%d", pVnode->config.vgId, s3migrateReq.timestamp); + + code = vnodeDoS3Migrate(pVnode, s3migrateReq.timestamp); + +_exit: + return code; +} + static int32_t vnodeProcessDropTtlTbReq(SVnode *pVnode, int64_t ver, void *pReq, int32_t len, SRpcMsg *pRsp) { SVDropTtlTableReq ttlReq = {0}; if (tDeserializeSVDropTtlTableReq(pReq, len, &ttlReq) != 0) { @@ -1893,11 +1917,13 @@ static int32_t vnodeProcessAlterConfigReq(SVnode *pVnode, int64_t ver, void *pRe } vInfo("vgId:%d, start to alter vnode config, page:%d pageSize:%d buffer:%d szPage:%d szBuf:%" PRIu64 - " cacheLast:%d cacheLastSize:%d days:%d keep0:%d keep1:%d keep2:%d keepTimeOffset:%d fsync:%d level:%d " + " cacheLast:%d cacheLastSize:%d days:%d keep0:%d keep1:%d keep2:%d keepTimeOffset:%d s3KeepLocal:%d " + "s3Compact:%d fsync:%d level:%d " "walRetentionPeriod:%d walRetentionSize:%d", TD_VID(pVnode), req.pages, req.pageSize, req.buffer, req.pageSize * 1024, (uint64_t)req.buffer * 1024 * 1024, req.cacheLast, req.cacheLastSize, req.daysPerFile, req.daysToKeep0, req.daysToKeep1, req.daysToKeep2, - req.keepTimeOffset, req.walFsyncPeriod, req.walLevel, req.walRetentionPeriod, req.walRetentionSize); + req.keepTimeOffset, req.s3KeepLocal, req.s3Compact, req.walFsyncPeriod, req.walLevel, req.walRetentionPeriod, + req.walRetentionSize); if (pVnode->config.cacheLastSize != req.cacheLastSize) { pVnode->config.cacheLastSize = req.cacheLastSize; @@ -1981,6 +2007,13 @@ static int32_t vnodeProcessAlterConfigReq(SVnode *pVnode, int64_t ver, void *pRe pVnode->config.tsdbCfg.minRows = req.minRows; } + if (req.s3KeepLocal != -1 && req.s3KeepLocal != pVnode->config.s3KeepLocal) { + pVnode->config.s3KeepLocal = req.s3KeepLocal; + } + if (req.s3Compact != -1 && req.s3Compact != pVnode->config.s3Compact) { + pVnode->config.s3Compact = req.s3Compact; + } + if (walChanged) { walAlter(pVnode->pWal, &pVnode->config.walCfg); } @@ -2263,4 +2296,5 @@ _OVER: int32_t vnodeProcessCompactVnodeReqImpl(SVnode *pVnode, int64_t ver, void *pReq, int32_t len, SRpcMsg *pRsp) { return 0; } +int32_t tsdbAsyncCompact(STsdb *tsdb, const STimeWindow *tw, bool sync); #endif diff --git a/source/dnode/vnode/src/vnd/vnodeSync.c b/source/dnode/vnode/src/vnd/vnodeSync.c index 63494a17b9..72cf8295dc 100644 --- a/source/dnode/vnode/src/vnd/vnodeSync.c +++ b/source/dnode/vnode/src/vnd/vnodeSync.c @@ -820,6 +820,16 @@ bool vnodeIsLeader(SVnode *pVnode) { return true; } +int64_t vnodeClusterId(SVnode *pVnode) { + SSyncCfg *syncCfg = &pVnode->config.syncCfg; + return syncCfg->nodeInfo[syncCfg->myIndex].clusterId; +} + +int32_t vnodeNodeId(SVnode *pVnode) { + SSyncCfg *syncCfg = &pVnode->config.syncCfg; + return syncCfg->nodeInfo[syncCfg->myIndex].nodeId; +} + int32_t vnodeGetSnapshot(SVnode *pVnode, SSnapshot *pSnap) { int code = 0; pSnap->lastApplyIndex = pVnode->state.committed; diff --git a/source/libs/command/src/command.c b/source/libs/command/src/command.c index 29491d94bd..7bec8019ce 100644 --- a/source/libs/command/src/command.c +++ b/source/libs/command/src/command.c @@ -325,12 +325,12 @@ static void setCreateDBResultIntoDataBlock(SSDataBlock* pBlock, char* dbName, ch "CREATE DATABASE `%s` BUFFER %d CACHESIZE %d CACHEMODEL '%s' COMP %d DURATION %dm " "WAL_FSYNC_PERIOD %d MAXROWS %d MINROWS %d STT_TRIGGER %d KEEP %dm,%dm,%dm PAGES %d PAGESIZE %d 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'", + "WAL_RETENTION_PERIOD %d WAL_RETENTION_SIZE %" PRId64 " KEEP_TIME_OFFSET %d ENCRYPT_ALGORITHM '%s' S3_CHUNKSIZE %d S3_KEEPLOCAL %dm S3_COMPACT %d", dbName, pCfg->buffer, pCfg->cacheSize, cacheModelStr(pCfg->cacheLast), pCfg->compression, pCfg->daysPerFile, pCfg->walFsyncPeriod, pCfg->maxRows, pCfg->minRows, pCfg->sstTrigger, pCfg->daysToKeep0, pCfg->daysToKeep1, pCfg->daysToKeep2, 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->keepTimeOffset, encryptAlgorithmStr(pCfg->encryptAlgorithm), pCfg->s3ChunkSize, pCfg->s3KeepLocal, pCfg->s3Compact); if (retentions) { len += sprintf(buf2 + VARSTR_HEADER_SIZE + len, " RETENTIONS %s", retentions); diff --git a/source/libs/nodes/src/nodesCodeFuncs.c b/source/libs/nodes/src/nodesCodeFuncs.c index f096cfda8b..0b3ba24635 100644 --- a/source/libs/nodes/src/nodesCodeFuncs.c +++ b/source/libs/nodes/src/nodesCodeFuncs.c @@ -109,6 +109,8 @@ const char* nodesNodeName(ENodeType type) { return "FlushDatabaseStmt"; case QUERY_NODE_TRIM_DATABASE_STMT: return "TrimDatabaseStmt"; + case QUERY_NODE_S3MIGRATE_DATABASE_STMT: + return "S3MigrateDatabaseStmt"; case QUERY_NODE_CREATE_TABLE_STMT: return "CreateTableStmt"; case QUERY_NODE_CREATE_SUBTABLE_CLAUSE: @@ -825,7 +827,7 @@ static int32_t jsonToLogicScanNode(const SJson* pJson, void* pObj) { static const char* jkProjectLogicPlanProjections = "Projections"; static const char* jkProjectLogicPlanIgnoreGroupId = "IgnoreGroupId"; -static const char* jkProjectLogicPlanInputIgnoreGroup= "InputIgnoreGroup"; +static const char* jkProjectLogicPlanInputIgnoreGroup = "InputIgnoreGroup"; static int32_t logicProjectNodeToJson(const void* pObj, SJson* pJson) { const SProjectLogicNode* pNode = (const SProjectLogicNode*)pObj; @@ -1341,7 +1343,6 @@ static int32_t jsonToLogicDynQueryCtrlNode(const SJson* pJson, void* pObj) { return code; } - static const char* jkSubplanIdQueryId = "QueryId"; static const char* jkSubplanIdGroupId = "GroupId"; static const char* jkSubplanIdSubplanId = "SubplanId"; @@ -1848,8 +1849,6 @@ static int32_t jsonToFuncType(const SJson* pJson, void* pObj) { return code; } - - static int32_t physiLastRowScanNodeToJson(const void* pObj, SJson* pJson) { const SLastRowScanPhysiNode* pNode = (const SLastRowScanPhysiNode*)pObj; @@ -1863,7 +1862,7 @@ static int32_t physiLastRowScanNodeToJson(const void* pObj, SJson* pJson) { if (TSDB_CODE_SUCCESS == code) { code = nodeListToJson(pJson, jkLastRowScanPhysiPlanTargets, pNode->pTargets); } - if (TSDB_CODE_SUCCESS == code) { + if (TSDB_CODE_SUCCESS == code) { code = tjsonAddTArray(pJson, jkLastRowScanPhysiPlanFuncTypes, funcTypeToJson, pNode->pFuncTypes); } @@ -2257,7 +2256,6 @@ static int32_t physiHashJoinNodeToJson(const void* pObj, SJson* pJson) { return code; } - static int32_t jsonToPhysiHashJoinNode(const SJson* pJson, void* pObj) { SHashJoinPhysiNode* pNode = (SHashJoinPhysiNode*)pObj; @@ -2292,7 +2290,6 @@ static int32_t jsonToPhysiHashJoinNode(const SJson* pJson, void* pObj) { return code; } - static const char* jkAggPhysiPlanExprs = "Exprs"; static const char* jkAggPhysiPlanGroupKeys = "GroupKeys"; static const char* jkAggPhysiPlanAggFuncs = "AggFuncs"; @@ -2506,7 +2503,7 @@ static int32_t jsonToPhysiSortNode(const SJson* pJson, void* pObj) { code = tjsonGetBoolValue(pJson, jkSortPhysiPlanCalcGroupIds, &pNode->calcGroupId); } if (TSDB_CODE_SUCCESS == code) { - code= tjsonGetBoolValue(pJson, jkSortPhysiPlanExcludePKCol, &pNode->excludePkCol); + code = tjsonGetBoolValue(pJson, jkSortPhysiPlanExcludePKCol, &pNode->excludePkCol); } return code; @@ -3189,7 +3186,6 @@ static const char* jkGroupCachePhysiPlanGroupByUid = "GroupByUid"; static const char* jkGroupCachePhysiPlanGlobalGroup = "GlobalGroup"; static const char* jkGroupCachePhysiPlanBatchFetch = "BatchFetch"; - static int32_t physiGroupCacheNodeToJson(const void* pObj, SJson* pJson) { const SGroupCachePhysiNode* pNode = (const SGroupCachePhysiNode*)pObj; @@ -3323,8 +3319,6 @@ static int32_t jsonToPhysiDynQueryCtrlNode(const SJson* pJson, void* pObj) { return code; } - - static const char* jkQueryNodeAddrId = "Id"; static const char* jkQueryNodeAddrInUse = "InUse"; static const char* jkQueryNodeAddrNumOfEps = "NumOfEps"; @@ -4857,6 +4851,10 @@ static const char* jkDatabaseOptionsNumOfVgroups = "NumOfVgroups"; static const char* jkDatabaseOptionsSingleStable = "SingleStable"; static const char* jkDatabaseOptionsRetentions = "Retentions"; static const char* jkDatabaseOptionsSchemaless = "Schemaless"; +static const char* jkDatabaseOptionsS3ChunkSize = "S3ChunkSize"; +static const char* jkDatabaseOptionsS3KeepLocalNode = "S3KeepLocalNode"; +static const char* jkDatabaseOptionsS3KeepLocal = "S3KeepLocal"; +static const char* jkDatabaseOptionsS3Compact = "S3Compact"; static int32_t databaseOptionsToJson(const void* pObj, SJson* pJson) { const SDatabaseOptions* pNode = (const SDatabaseOptions*)pObj; @@ -4916,6 +4914,18 @@ static int32_t databaseOptionsToJson(const void* pObj, SJson* pJson) { if (TSDB_CODE_SUCCESS == code) { code = tjsonAddIntegerToObject(pJson, jkDatabaseOptionsSchemaless, pNode->schemaless); } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddIntegerToObject(pJson, jkDatabaseOptionsS3ChunkSize, pNode->s3ChunkSize); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddObject(pJson, jkDatabaseOptionsS3KeepLocalNode, nodeToJson, pNode->s3KeepLocalStr); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddIntegerToObject(pJson, jkDatabaseOptionsS3KeepLocal, pNode->s3KeepLocal); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddIntegerToObject(pJson, jkDatabaseOptionsS3Compact, pNode->s3Compact); + } return code; } @@ -4978,6 +4988,18 @@ static int32_t jsonToDatabaseOptions(const SJson* pJson, void* pObj) { if (TSDB_CODE_SUCCESS == code) { code = tjsonGetTinyIntValue(pJson, jkDatabaseOptionsSchemaless, &pNode->schemaless); } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetIntValue(pJson, jkDatabaseOptionsS3ChunkSize, &pNode->s3ChunkSize); + } + if (TSDB_CODE_SUCCESS == code) { + code = jsonToNodeObject(pJson, jkDatabaseOptionsS3KeepLocalNode, (SNode**)&pNode->s3KeepLocalStr); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetIntValue(pJson, jkDatabaseOptionsS3KeepLocal, &pNode->s3KeepLocal); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetTinyIntValue(pJson, jkDatabaseOptionsS3Compact, &pNode->s3Compact); + } return code; } @@ -5566,6 +5588,24 @@ static int32_t jsonToTrimDatabaseStmt(const SJson* pJson, void* pObj) { return code; } +static const char* jkS3MigrateDatabaseStmtDbName = "DbName"; + +static int32_t s3migrateDatabaseStmtToJson(const void* pObj, SJson* pJson) { + const SS3MigrateDatabaseStmt* pNode = (const SS3MigrateDatabaseStmt*)pObj; + + int32_t code = tjsonAddStringToObject(pJson, jkS3MigrateDatabaseStmtDbName, pNode->dbName); + + return code; +} + +static int32_t jsonToS3MigrateDatabaseStmt(const SJson* pJson, void* pObj) { + SS3MigrateDatabaseStmt* pNode = (SS3MigrateDatabaseStmt*)pObj; + + int32_t code = tjsonGetStringValue(pJson, jkS3MigrateDatabaseStmtDbName, pNode->dbName); + + return code; +} + static const char* jkCreateTableStmtDbName = "DbName"; static const char* jkCreateTableStmtTableName = "TableName"; static const char* jkCreateTableStmtIgnoreExists = "IgnoreExists"; @@ -6235,10 +6275,6 @@ static int32_t jsonToRestoreVnodeStmt(const SJson* pJson, void* pObj) { return jsonToRestoreComponentNodeStmt(pJson, pObj); } - - - - static const char* jkCreateTopicStmtTopicName = "TopicName"; static const char* jkCreateTopicStmtSubscribeDbName = "SubscribeDbName"; static const char* jkCreateTopicStmtIgnoreExists = "IgnoreExists"; @@ -6898,7 +6934,6 @@ static int32_t showCreateViewStmtToJson(const void* pObj, SJson* pJson) { return code; } - static int32_t jsonToShowCreateViewStmt(const SJson* pJson, void* pObj) { SShowCreateViewStmt* pNode = (SShowCreateViewStmt*)pObj; @@ -6910,7 +6945,6 @@ static int32_t jsonToShowCreateViewStmt(const SJson* pJson, void* pObj) { return code; } - static const char* jkShowTableDistributedStmtDbName = "DbName"; static const char* jkShowTableDistributedStmtTableName = "TableName"; @@ -7156,6 +7190,8 @@ static int32_t specificNodeToJson(const void* pObj, SJson* pJson) { return alterDatabaseStmtToJson(pObj, pJson); case QUERY_NODE_TRIM_DATABASE_STMT: return trimDatabaseStmtToJson(pObj, pJson); + case QUERY_NODE_S3MIGRATE_DATABASE_STMT: + return s3migrateDatabaseStmtToJson(pObj, pJson); case QUERY_NODE_CREATE_TABLE_STMT: return createTableStmtToJson(pObj, pJson); case QUERY_NODE_CREATE_SUBTABLE_CLAUSE: @@ -7497,6 +7533,8 @@ static int32_t jsonToSpecificNode(const SJson* pJson, void* pObj) { return jsonToAlterDatabaseStmt(pJson, pObj); case QUERY_NODE_TRIM_DATABASE_STMT: return jsonToTrimDatabaseStmt(pJson, pObj); + case QUERY_NODE_S3MIGRATE_DATABASE_STMT: + return jsonToS3MigrateDatabaseStmt(pJson, pObj); case QUERY_NODE_CREATE_TABLE_STMT: return jsonToCreateTableStmt(pJson, pObj); case QUERY_NODE_CREATE_SUBTABLE_CLAUSE: diff --git a/source/libs/nodes/src/nodesUtilFuncs.c b/source/libs/nodes/src/nodesUtilFuncs.c index 52349d4a89..6920daf7e3 100644 --- a/source/libs/nodes/src/nodesUtilFuncs.c +++ b/source/libs/nodes/src/nodesUtilFuncs.c @@ -324,6 +324,8 @@ SNode* nodesMakeNode(ENodeType type) { return makeNode(type, sizeof(SFlushDatabaseStmt)); case QUERY_NODE_TRIM_DATABASE_STMT: return makeNode(type, sizeof(STrimDatabaseStmt)); + case QUERY_NODE_S3MIGRATE_DATABASE_STMT: + return makeNode(type, sizeof(SS3MigrateDatabaseStmt)); case QUERY_NODE_CREATE_TABLE_STMT: return makeNode(type, sizeof(SCreateTableStmt)); case QUERY_NODE_CREATE_SUBTABLE_CLAUSE: @@ -804,6 +806,7 @@ void nodesDestroyNode(SNode* pNode) { case QUERY_NODE_DATABASE_OPTIONS: { SDatabaseOptions* pOptions = (SDatabaseOptions*)pNode; nodesDestroyNode((SNode*)pOptions->pDaysPerFile); + nodesDestroyNode((SNode*)pOptions->s3KeepLocalStr); nodesDestroyList(pOptions->pKeep); nodesDestroyList(pOptions->pRetentions); break; @@ -941,6 +944,8 @@ 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 + break; case QUERY_NODE_CREATE_TABLE_STMT: { SCreateTableStmt* pStmt = (SCreateTableStmt*)pNode; nodesDestroyList(pStmt->pCols); diff --git a/source/libs/parser/inc/parAst.h b/source/libs/parser/inc/parAst.h index 8a0213fe28..5ca5087dcc 100644 --- a/source/libs/parser/inc/parAst.h +++ b/source/libs/parser/inc/parAst.h @@ -64,6 +64,9 @@ typedef enum EDatabaseOptionType { DB_OPTION_STT_TRIGGER, DB_OPTION_TABLE_PREFIX, DB_OPTION_TABLE_SUFFIX, + DB_OPTION_S3_CHUNKSIZE, + DB_OPTION_S3_KEEPLOCAL, + DB_OPTION_S3_COMPACT, DB_OPTION_KEEP_TIME_OFFSET, DB_OPTION_ENCRYPT_ALGORITHM, } EDatabaseOptionType; @@ -91,7 +94,7 @@ typedef struct STokenPair { typedef struct SShowTablesOption { EShowKind kind; - SToken dbName; + SToken dbName; } SShowTablesOption; extern SToken nil_token; @@ -112,37 +115,37 @@ SNode* createValueNode(SAstCreateContext* pCxt, int32_t dataType, const SToken* SNode* createRawValueNode(SAstCreateContext* pCxt, int32_t dataType, const SToken* pLiteral, SNode *pNode); SNode* createRawValueNodeExt(SAstCreateContext* pCxt, int32_t dataType, const SToken* pLiteral, SNode *pLeft, SNode *pRight); SNodeList* createHintNodeList(SAstCreateContext* pCxt, const SToken* pLiteral); -SNode* createIdentifierValueNode(SAstCreateContext* pCxt, SToken* pLiteral); -SNode* createDurationValueNode(SAstCreateContext* pCxt, const SToken* pLiteral); -SNode* createDefaultDatabaseCondValue(SAstCreateContext* pCxt); -SNode* createPlaceholderValueNode(SAstCreateContext* pCxt, const SToken* pLiteral); -SNode* setProjectionAlias(SAstCreateContext* pCxt, SNode* pNode, SToken* pAlias); -SNode* createLogicConditionNode(SAstCreateContext* pCxt, ELogicConditionType type, SNode* pParam1, SNode* pParam2); -SNode* createOperatorNode(SAstCreateContext* pCxt, EOperatorType type, SNode* pLeft, SNode* pRight); -SNode* createBetweenAnd(SAstCreateContext* pCxt, SNode* pExpr, SNode* pLeft, SNode* pRight); -SNode* createNotBetweenAnd(SAstCreateContext* pCxt, SNode* pExpr, SNode* pLeft, SNode* pRight); -SNode* createFunctionNode(SAstCreateContext* pCxt, const SToken* pFuncName, SNodeList* pParameterList); -SNode* createCastFunctionNode(SAstCreateContext* pCxt, SNode* pExpr, SDataType dt); -SNode* createNodeListNode(SAstCreateContext* pCxt, SNodeList* pList); -SNode* createNodeListNodeEx(SAstCreateContext* pCxt, SNode* p1, SNode* p2); -SNode* createRealTableNode(SAstCreateContext* pCxt, SToken* pDbName, SToken* pTableName, SToken* pTableAlias); -SNode* createTempTableNode(SAstCreateContext* pCxt, SNode* pSubquery, const SToken* pTableAlias); -SNode* createJoinTableNode(SAstCreateContext* pCxt, EJoinType type, SNode* pLeft, SNode* pRight, SNode* pJoinCond); -SNode* createViewNode(SAstCreateContext* pCxt, SToken* pDbName, SToken* pViewName); -SNode* createLimitNode(SAstCreateContext* pCxt, const SToken* pLimit, const SToken* pOffset); -SNode* createOrderByExprNode(SAstCreateContext* pCxt, SNode* pExpr, EOrder order, ENullOrder nullOrder); -SNode* createSessionWindowNode(SAstCreateContext* pCxt, SNode* pCol, SNode* pGap); -SNode* createStateWindowNode(SAstCreateContext* pCxt, SNode* pExpr); -SNode* createEventWindowNode(SAstCreateContext* pCxt, SNode* pStartCond, SNode* pEndCond); -SNode* createCountWindowNode(SAstCreateContext* pCxt, const SToken* pCountToken, const SToken* pSlidingToken); -SNode* createIntervalWindowNode(SAstCreateContext* pCxt, SNode* pInterval, SNode* pOffset, SNode* pSliding, - SNode* pFill); -SNode* createFillNode(SAstCreateContext* pCxt, EFillMode mode, SNode* pValues); -SNode* createGroupingSetNode(SAstCreateContext* pCxt, SNode* pNode); -SNode* createInterpTimeRange(SAstCreateContext* pCxt, SNode* pStart, SNode* pEnd); -SNode* createInterpTimePoint(SAstCreateContext* pCxt, SNode* pPoint); -SNode* createWhenThenNode(SAstCreateContext* pCxt, SNode* pWhen, SNode* pThen); -SNode* createCaseWhenNode(SAstCreateContext* pCxt, SNode* pCase, SNodeList* pWhenThenList, SNode* pElse); +SNode* createIdentifierValueNode(SAstCreateContext* pCxt, SToken* pLiteral); +SNode* createDurationValueNode(SAstCreateContext* pCxt, const SToken* pLiteral); +SNode* createDefaultDatabaseCondValue(SAstCreateContext* pCxt); +SNode* createPlaceholderValueNode(SAstCreateContext* pCxt, const SToken* pLiteral); +SNode* setProjectionAlias(SAstCreateContext* pCxt, SNode* pNode, SToken* pAlias); +SNode* createLogicConditionNode(SAstCreateContext* pCxt, ELogicConditionType type, SNode* pParam1, SNode* pParam2); +SNode* createOperatorNode(SAstCreateContext* pCxt, EOperatorType type, SNode* pLeft, SNode* pRight); +SNode* createBetweenAnd(SAstCreateContext* pCxt, SNode* pExpr, SNode* pLeft, SNode* pRight); +SNode* createNotBetweenAnd(SAstCreateContext* pCxt, SNode* pExpr, SNode* pLeft, SNode* pRight); +SNode* createFunctionNode(SAstCreateContext* pCxt, const SToken* pFuncName, SNodeList* pParameterList); +SNode* createCastFunctionNode(SAstCreateContext* pCxt, SNode* pExpr, SDataType dt); +SNode* createNodeListNode(SAstCreateContext* pCxt, SNodeList* pList); +SNode* createNodeListNodeEx(SAstCreateContext* pCxt, SNode* p1, SNode* p2); +SNode* createRealTableNode(SAstCreateContext* pCxt, SToken* pDbName, SToken* pTableName, SToken* pTableAlias); +SNode* createTempTableNode(SAstCreateContext* pCxt, SNode* pSubquery, const SToken* pTableAlias); +SNode* createJoinTableNode(SAstCreateContext* pCxt, EJoinType type, SNode* pLeft, SNode* pRight, SNode* pJoinCond); +SNode* createViewNode(SAstCreateContext* pCxt, SToken* pDbName, SToken* pViewName); +SNode* createLimitNode(SAstCreateContext* pCxt, const SToken* pLimit, const SToken* pOffset); +SNode* createOrderByExprNode(SAstCreateContext* pCxt, SNode* pExpr, EOrder order, ENullOrder nullOrder); +SNode* createSessionWindowNode(SAstCreateContext* pCxt, SNode* pCol, SNode* pGap); +SNode* createStateWindowNode(SAstCreateContext* pCxt, SNode* pExpr); +SNode* createEventWindowNode(SAstCreateContext* pCxt, SNode* pStartCond, SNode* pEndCond); +SNode* createCountWindowNode(SAstCreateContext* pCxt, const SToken* pCountToken, const SToken* pSlidingToken); +SNode* createIntervalWindowNode(SAstCreateContext* pCxt, SNode* pInterval, SNode* pOffset, SNode* pSliding, + SNode* pFill); +SNode* createFillNode(SAstCreateContext* pCxt, EFillMode mode, SNode* pValues); +SNode* createGroupingSetNode(SAstCreateContext* pCxt, SNode* pNode); +SNode* createInterpTimeRange(SAstCreateContext* pCxt, SNode* pStart, SNode* pEnd); +SNode* createInterpTimePoint(SAstCreateContext* pCxt, SNode* pPoint); +SNode* createWhenThenNode(SAstCreateContext* pCxt, SNode* pWhen, SNode* pThen); +SNode* createCaseWhenNode(SAstCreateContext* pCxt, SNode* pCase, SNodeList* pWhenThenList, SNode* pElse); SNode* addWhereClause(SAstCreateContext* pCxt, SNode* pStmt, SNode* pWhere); SNode* addPartitionByClause(SAstCreateContext* pCxt, SNode* pStmt, SNodeList* pPartitionByList); @@ -155,7 +158,8 @@ SNode* addLimitClause(SAstCreateContext* pCxt, SNode* pStmt, SNode* pLimit); SNode* addRangeClause(SAstCreateContext* pCxt, SNode* pStmt, SNode* pRange); SNode* addEveryClause(SAstCreateContext* pCxt, SNode* pStmt, SNode* pEvery); SNode* addFillClause(SAstCreateContext* pCxt, SNode* pStmt, SNode* pFill); -SNode* createSelectStmt(SAstCreateContext* pCxt, bool isDistinct, SNodeList* pProjectionList, SNode* pTable, SNodeList* pHint); +SNode* createSelectStmt(SAstCreateContext* pCxt, bool isDistinct, SNodeList* pProjectionList, SNode* pTable, + SNodeList* pHint); SNode* setSelectStmtTagMode(SAstCreateContext* pCxt, SNode* pStmt, bool bSelectTags); SNode* createSetOperator(SAstCreateContext* pCxt, ESetOperatorType type, SNode* pLeft, SNode* pRight); @@ -171,6 +175,7 @@ SNode* createDropDatabaseStmt(SAstCreateContext* pCxt, bool ignoreNotExists, STo SNode* createAlterDatabaseStmt(SAstCreateContext* pCxt, SToken* pDbName, SNode* pOptions); 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* createDefaultTableOptions(SAstCreateContext* pCxt); SNode* createAlterTableOptions(SAstCreateContext* pCxt); diff --git a/source/libs/parser/inc/sql.y b/source/libs/parser/inc/sql.y index 46b3022bc4..270f7c9748 100755 --- a/source/libs/parser/inc/sql.y +++ b/source/libs/parser/inc/sql.y @@ -211,6 +211,7 @@ cmd ::= USE db_name(A). cmd ::= ALTER DATABASE db_name(A) alter_db_options(B). { pCxt->pRootNode = createAlterDatabaseStmt(pCxt, &A, B); } cmd ::= FLUSH DATABASE db_name(A). { pCxt->pRootNode = createFlushDatabaseStmt(pCxt, &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); } %type not_exists_opt { bool } @@ -263,6 +264,10 @@ db_options(A) ::= db_options(B) WAL_SEGMENT_SIZE NK_INTEGER(C). db_options(A) ::= db_options(B) STT_TRIGGER NK_INTEGER(C). { A = setDatabaseOption(pCxt, B, DB_OPTION_STT_TRIGGER, &C); } db_options(A) ::= db_options(B) TABLE_PREFIX signed(C). { A = setDatabaseOption(pCxt, B, DB_OPTION_TABLE_PREFIX, C); } db_options(A) ::= db_options(B) TABLE_SUFFIX signed(C). { A = setDatabaseOption(pCxt, B, DB_OPTION_TABLE_SUFFIX, C); } +db_options(A) ::= db_options(B) S3_CHUNKSIZE NK_INTEGER(C). { A = setDatabaseOption(pCxt, B, DB_OPTION_S3_CHUNKSIZE, &C); } +db_options(A) ::= db_options(B) S3_KEEPLOCAL NK_INTEGER(C). { A = setDatabaseOption(pCxt, B, DB_OPTION_S3_KEEPLOCAL, &C); } +db_options(A) ::= db_options(B) S3_KEEPLOCAL NK_VARIABLE(C). { A = setDatabaseOption(pCxt, B, DB_OPTION_S3_KEEPLOCAL, &C); } +db_options(A) ::= db_options(B) S3_COMPACT NK_INTEGER(C). { A = setDatabaseOption(pCxt, B, DB_OPTION_S3_COMPACT, &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); } @@ -295,6 +300,9 @@ alter_db_option(A) ::= WAL_RETENTION_SIZE NK_MINUS(B) NK_INTEGER(C). t.n = (C.z + C.n) - B.z; A.type = DB_OPTION_WAL_RETENTION_SIZE; A.val = t; } +alter_db_option(A) ::= S3_KEEPLOCAL NK_INTEGER(B). { A.type = DB_OPTION_S3_KEEPLOCAL; A.val = B; } +alter_db_option(A) ::= S3_KEEPLOCAL NK_VARIABLE(B). { A.type = DB_OPTION_S3_KEEPLOCAL; A.val = 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; } diff --git a/source/libs/parser/src/parAstCreater.c b/source/libs/parser/src/parAstCreater.c index f830d423f2..8c62a5c08b 100644 --- a/source/libs/parser/src/parAstCreater.c +++ b/source/libs/parser/src/parAstCreater.c @@ -228,7 +228,6 @@ static bool checkViewName(SAstCreateContext* pCxt, SToken* pViewName) { return true; } - static bool checkStreamName(SAstCreateContext* pCxt, SToken* pStreamName) { trimEscape(pStreamName); if (pStreamName->n >= TSDB_STREAM_NAME_LEN) { @@ -918,7 +917,6 @@ SNode* createViewNode(SAstCreateContext* pCxt, SToken* pDbName, SToken* pViewNam return (SNode*)pView; } - SNode* createLimitNode(SAstCreateContext* pCxt, const SToken* pLimit, const SToken* pOffset) { CHECK_PARSER_STATUS(pCxt); SLimitNode* limitNode = (SLimitNode*)nodesMakeNode(QUERY_NODE_LIMIT); @@ -1263,6 +1261,9 @@ SNode* createDefaultDatabaseOptions(SAstCreateContext* pCxt) { pOptions->sstTrigger = TSDB_DEFAULT_SST_TRIGGER; pOptions->tablePrefix = TSDB_DEFAULT_HASH_PREFIX; pOptions->tableSuffix = TSDB_DEFAULT_HASH_SUFFIX; + pOptions->s3ChunkSize = TSDB_DEFAULT_S3_CHUNK_SIZE; + pOptions->s3KeepLocal = TSDB_DEFAULT_S3_KEEP_LOCAL; + pOptions->s3Compact = TSDB_DEFAULT_S3_COMPACT; pOptions->withArbitrator = TSDB_DEFAULT_DB_WITH_ARBITRATOR; pOptions->encryptAlgorithm = TSDB_DEFAULT_ENCRYPT_ALGO; return (SNode*)pOptions; @@ -1300,6 +1301,9 @@ SNode* createAlterDatabaseOptions(SAstCreateContext* pCxt) { pOptions->sstTrigger = -1; pOptions->tablePrefix = -1; pOptions->tableSuffix = -1; + pOptions->s3ChunkSize = -1; + pOptions->s3KeepLocal = -1; + pOptions->s3Compact = -1; pOptions->withArbitrator = -1; pOptions->encryptAlgorithm = -1; return (SNode*)pOptions; @@ -1417,6 +1421,21 @@ static SNode* setDatabaseOptionImpl(SAstCreateContext* pCxt, SNode* pOptions, ED nodesDestroyNode((SNode*)pNode); break; } + case DB_OPTION_S3_CHUNKSIZE: + pDbOptions->s3ChunkSize = taosStr2Int32(((SToken*)pVal)->z, NULL, 10); + break; + case DB_OPTION_S3_KEEPLOCAL: { + SToken* pToken = pVal; + if (TK_NK_INTEGER == pToken->type) { + pDbOptions->s3KeepLocal = taosStr2Int32(pToken->z, NULL, 10) * 1440; + } else { + pDbOptions->s3KeepLocalStr = (SValueNode*)createDurationValueNode(pCxt, pToken); + } + break; + } + case DB_OPTION_S3_COMPACT: + pDbOptions->s3Compact = taosStr2Int8(((SToken*)pVal)->z, NULL, 10); + break; case DB_OPTION_KEEP_TIME_OFFSET: { pDbOptions->keepTimeOffset = taosStr2Int32(((SToken*)pVal)->z, NULL, 10); break; @@ -1507,6 +1526,17 @@ SNode* createTrimDatabaseStmt(SAstCreateContext* pCxt, SToken* pDbName, int32_t return (SNode*)pStmt; } +SNode* createS3MigrateDatabaseStmt(SAstCreateContext* pCxt, SToken* pDbName) { + CHECK_PARSER_STATUS(pCxt); + if (!checkDbName(pCxt, pDbName, false)) { + return NULL; + } + SS3MigrateDatabaseStmt* pStmt = (SS3MigrateDatabaseStmt*)nodesMakeNode(QUERY_NODE_S3MIGRATE_DATABASE_STMT); + CHECK_OUT_OF_MEM(pStmt); + COPY_STRING_FORM_ID_TOKEN(pStmt->dbName, pDbName); + return (SNode*)pStmt; +} + SNode* createCompactStmt(SAstCreateContext* pCxt, SToken* pDbName, SNode* pStart, SNode* pEnd) { CHECK_PARSER_STATUS(pCxt); if (!checkDbName(pCxt, pDbName, false)) { @@ -1817,7 +1847,8 @@ SNode* createShowStmtWithCond(SAstCreateContext* pCxt, ENodeType type, SNode* pD return (SNode*)pStmt; } -SNode* createShowTablesStmt(SAstCreateContext* pCxt, SShowTablesOption option, SNode* pTbName, EOperatorType tableCondType) { +SNode* createShowTablesStmt(SAstCreateContext* pCxt, SShowTablesOption option, SNode* pTbName, + EOperatorType tableCondType) { CHECK_PARSER_STATUS(pCxt); SNode* pDbName = NULL; if (option.dbName.type == TK_NK_NIL) { @@ -1893,7 +1924,6 @@ SNode* createShowCreateViewStmt(SAstCreateContext* pCxt, ENodeType type, SNode* return (SNode*)pStmt; } - SNode* createShowTableDistributedStmt(SAstCreateContext* pCxt, SNode* pRealTable) { CHECK_PARSER_STATUS(pCxt); SShowTableDistributedStmt* pStmt = (SShowTableDistributedStmt*)nodesMakeNode(QUERY_NODE_SHOW_TABLE_DISTRIBUTED_STMT); diff --git a/source/libs/parser/src/parTokenizer.c b/source/libs/parser/src/parTokenizer.c index b6123164f7..5bb5b2aade 100644 --- a/source/libs/parser/src/parTokenizer.c +++ b/source/libs/parser/src/parTokenizer.c @@ -308,6 +308,10 @@ static SKeyword keywordTable[] = { {"_WSTART", TK_WSTART}, {"ALIVE", TK_ALIVE}, {"VARBINARY", TK_VARBINARY}, + {"S3_CHUNKSIZE", TK_S3_CHUNKSIZE}, + {"S3_KEEPLOCAL", TK_S3_KEEPLOCAL}, + {"S3_COMPACT", TK_S3_COMPACT}, + {"S3MIGRATE", TK_S3MIGRATE}, {"KEEP_TIME_OFFSET", TK_KEEP_TIME_OFFSET}, {"ARBGROUPS", TK_ARBGROUPS}, }; diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c index ded695a2f7..9fc76b2730 100644 --- a/source/libs/parser/src/parTranslater.c +++ b/source/libs/parser/src/parTranslater.c @@ -14,8 +14,8 @@ */ #include "parTranslater.h" -#include "tdatablock.h" #include "parInt.h" +#include "tdatablock.h" #include "catalog.h" #include "cmdnodes.h" @@ -387,7 +387,8 @@ static int32_t collectUseTable(const SName* pName, SHashObj* pTable) { } #ifdef BUILD_NO_CALL -static int32_t getViewMetaImpl(SParseContext* pParCxt, SParseMetaCache* pMetaCache, const SName* pName, STableMeta** pMeta) { +static int32_t getViewMetaImpl(SParseContext* pParCxt, SParseMetaCache* pMetaCache, const SName* pName, + STableMeta** pMeta) { #ifndef TD_ENTERPRISE return TSDB_CODE_PAR_TABLE_NOT_EXIST; #endif @@ -412,7 +413,8 @@ static int32_t getViewMetaImpl(SParseContext* pParCxt, SParseMetaCache* pMetaCac } #endif -int32_t getTargetMetaImpl(SParseContext* pParCxt, SParseMetaCache* pMetaCache, const SName* pName, STableMeta** pMeta, bool couldBeView) { +int32_t getTargetMetaImpl(SParseContext* pParCxt, SParseMetaCache* pMetaCache, const SName* pName, STableMeta** pMeta, + bool couldBeView) { int32_t code = TSDB_CODE_SUCCESS; if (pParCxt->async) { @@ -1140,7 +1142,7 @@ static EDealRes translateColumnUseAlias(STranslateContext* pCxt, SColumnNode** p SExprNode* pExpr = (SExprNode*)pNode; if (0 == strcmp((*pCol)->colName, pExpr->userAlias)) { if (true == *pFound) { - if(nodesEqualNode(pFoundNode, pNode)) { + if (nodesEqualNode(pFoundNode, pNode)) { continue; } pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_ORDERBY_AMBIGUOUS, (*pCol)->colName); @@ -1219,7 +1221,8 @@ static SNode* biMakeTbnameProjectAstNode(char* funcName, char* tableAlias) { } } -static int32_t biRewriteSelectFuncParamStar(STranslateContext* pCxt, SSelectStmt* pSelect, SNode* pNode, SListCell* pSelectListCell) { +static int32_t biRewriteSelectFuncParamStar(STranslateContext* pCxt, SSelectStmt* pSelect, SNode* pNode, + SListCell* pSelectListCell) { SNodeList* pTbnameNodeList = nodesMakeList(); SFunctionNode* pFunc = (SFunctionNode*)pNode; @@ -1244,7 +1247,7 @@ static int32_t biRewriteSelectFuncParamStar(STranslateContext* pCxt, SSelectStmt nodesListInsertListAfterPos(pSelect->pProjectionList, pSelectListCell, pTbnameNodeList); } } else if (nodesIsTableStar(pPara)) { - char* pTableAlias = ((SColumnNode*)pPara)->tableAlias; + char* pTableAlias = ((SColumnNode*)pPara)->tableAlias; STableNode* pTable = NULL; int32_t code = findTable(pCxt, pTableAlias, &pTable); if (TSDB_CODE_SUCCESS == code && nodeType(pTable) == QUERY_NODE_REAL_TABLE && @@ -1265,12 +1268,12 @@ static int32_t biRewriteSelectFuncParamStar(STranslateContext* pCxt, SSelectStmt // after translate from // before translate select list int32_t biRewriteSelectStar(STranslateContext* pCxt, SSelectStmt* pSelect) { - SNode* pNode = NULL; + SNode* pNode = NULL; SNodeList* pTbnameNodeList = nodesMakeList(); WHERE_EACH(pNode, pSelect->pProjectionList) { if (nodesIsStar(pNode)) { SArray* pTables = taosArrayGetP(pCxt->pNsLevel, pCxt->currLevel); - size_t n = taosArrayGetSize(pTables); + size_t n = taosArrayGetSize(pTables); for (int32_t i = 0; i < n; ++i) { STableNode* pTable = taosArrayGetP(pTables, i); if (nodeType(pTable) == QUERY_NODE_REAL_TABLE && @@ -1284,7 +1287,7 @@ int32_t biRewriteSelectStar(STranslateContext* pCxt, SSelectStmt* pSelect) { nodesListInsertListAfterPos(pSelect->pProjectionList, cell, pTbnameNodeList); } } else if (nodesIsTableStar(pNode)) { - char* pTableAlias = ((SColumnNode*)pNode)->tableAlias; + char* pTableAlias = ((SColumnNode*)pNode)->tableAlias; STableNode* pTable = NULL; int32_t code = findTable(pCxt, pTableAlias, &pTable); if (TSDB_CODE_SUCCESS == code && @@ -1300,7 +1303,7 @@ int32_t biRewriteSelectStar(STranslateContext* pCxt, SSelectStmt* pSelect) { } else if (nodeType(pNode) == QUERY_NODE_FUNCTION) { biRewriteSelectFuncParamStar(pCxt, pSelect, pNode, cell); } - WHERE_NEXT; + WHERE_NEXT; } return TSDB_CODE_SUCCESS; @@ -1308,11 +1311,11 @@ int32_t biRewriteSelectStar(STranslateContext* pCxt, SSelectStmt* pSelect) { bool biRewriteToTbnameFunc(STranslateContext* pCxt, SNode** ppNode) { SColumnNode* pCol = (SColumnNode*)(*ppNode); - if ((strcasecmp(pCol->colName, "tbname") == 0) && - ((SSelectStmt*)pCxt->pCurrStmt)->pFromTable && - QUERY_NODE_REAL_TABLE == nodeType(((SSelectStmt*)pCxt->pCurrStmt)->pFromTable)) { + if ((strcasecmp(pCol->colName, "tbname") == 0) && ((SSelectStmt*)pCxt->pCurrStmt)->pFromTable && + QUERY_NODE_REAL_TABLE == nodeType(((SSelectStmt*)pCxt->pCurrStmt)->pFromTable)) { SFunctionNode* tbnameFuncNode = NULL; - tbnameFuncNode = (SFunctionNode*)biMakeTbnameProjectAstNode(NULL, (pCol->tableAlias[0]!='\0') ? pCol->tableAlias : NULL); + tbnameFuncNode = + (SFunctionNode*)biMakeTbnameProjectAstNode(NULL, (pCol->tableAlias[0] != '\0') ? pCol->tableAlias : NULL); tbnameFuncNode->node.resType = pCol->node.resType; strcpy(tbnameFuncNode->node.aliasName, pCol->node.aliasName); strcpy(tbnameFuncNode->node.userAlias, pCol->node.userAlias); @@ -1327,24 +1330,26 @@ bool biRewriteToTbnameFunc(STranslateContext* pCxt, SNode** ppNode) { int32_t biCheckCreateTableTbnameCol(STranslateContext* pCxt, SCreateTableStmt* pStmt) { if (pStmt->pTags) { - SNode* pNode = NULL; - FOREACH(pNode, pStmt->pTags) { - SColumnDefNode* pTag = (SColumnDefNode*)pNode; - if (strcasecmp(pTag->colName, "tbname") == 0) { - int32_t code = generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_TAG_NAME, "tbname can not used for tags in BI mode"); - return code; - } + SNode* pNode = NULL; + FOREACH(pNode, pStmt->pTags) { + SColumnDefNode* pTag = (SColumnDefNode*)pNode; + if (strcasecmp(pTag->colName, "tbname") == 0) { + int32_t code = generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_TAG_NAME, + "tbname can not used for tags in BI mode"); + return code; } + } } if (pStmt->pCols) { - SNode* pNode = NULL; - FOREACH(pNode, pStmt->pCols) { - SColumnDefNode* pCol = (SColumnDefNode*)pNode; - if (strcasecmp(pCol->colName, "tbname") == 0) { - int32_t code = generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_COLUMN, "tbname can not used for columns in BI mode"); - return code; - } + SNode* pNode = NULL; + FOREACH(pNode, pStmt->pCols) { + SColumnDefNode* pCol = (SColumnDefNode*)pNode; + if (strcasecmp(pCol->colName, "tbname") == 0) { + int32_t code = generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_COLUMN, + "tbname can not used for columns in BI mode"); + return code; } + } } return TSDB_CODE_SUCCESS; } @@ -1382,9 +1387,9 @@ static EDealRes translateColumn(STranslateContext* pCxt, SColumnNode** pCol) { res = translateColumnWithoutPrefix(pCxt, pCol); } } - if(SQL_CLAUSE_ORDER_BY == pCxt->currClause && !(*pCol)->node.asParam - && res != DEAL_RES_CONTINUE && res != DEAL_RES_END) { - res = translateColumnUseAlias(pCxt, pCol, &found); + if (SQL_CLAUSE_ORDER_BY == pCxt->currClause && !(*pCol)->node.asParam && res != DEAL_RES_CONTINUE && + res != DEAL_RES_END) { + res = translateColumnUseAlias(pCxt, pCol, &found); } } return res; @@ -1966,8 +1971,8 @@ static int32_t translateInterpPseudoColumnFunc(STranslateContext* pCxt, SNode** } SSelectStmt* pSelect = (SSelectStmt*)pCxt->pCurrStmt; - SNode* pNode = NULL; - bool bFound = false; + SNode* pNode = NULL; + bool bFound = false; FOREACH(pNode, pSelect->pProjectionList) { if (nodeType(pNode) == QUERY_NODE_FUNCTION && strcasecmp(((SFunctionNode*)pNode)->functionName, "interp") == 0) { bFound = true; @@ -2272,7 +2277,7 @@ static int32_t replacePsedudoColumnFuncWithColumn(STranslateContext* pCxt, SNode return TSDB_CODE_OUT_OF_MEMORY; } SExprNode* pOldExpr = (SExprNode*)(*ppNode); - //rewrite a.tbname == tbname(a) + // rewrite a.tbname == tbname(a) if (nodeType(*ppNode) == QUERY_NODE_FUNCTION && ((SFunctionNode*)(*ppNode))->funcType == FUNCTION_TYPE_TBNAME) { SFunctionNode* pFunc = (SFunctionNode*)(*ppNode); if (0 != LIST_LENGTH(pFunc->pParameterList)) { @@ -2333,7 +2338,7 @@ static int32_t translateWindowPseudoColumnFunc(STranslateContext* pCxt, SNode** static int32_t translateScanPseudoColumnFunc(STranslateContext* pCxt, SNode** ppNode, bool* pRewriteToColumn) { SFunctionNode* pFunc = (SFunctionNode*)(*ppNode); - if (!fmIsScanPseudoColumnFunc(pFunc->funcId)) { + if (!fmIsScanPseudoColumnFunc(pFunc->funcId)) { return TSDB_CODE_SUCCESS; } if (0 == LIST_LENGTH(pFunc->pParameterList)) { @@ -2361,7 +2366,7 @@ static int32_t translateScanPseudoColumnFunc(STranslateContext* pCxt, SNode** pp static int32_t translateNormalFunction(STranslateContext* pCxt, SNode** ppNode) { SFunctionNode* pFunc = (SFunctionNode*)(*ppNode); - int32_t code = translateAggFunc(pCxt, pFunc); + int32_t code = translateAggFunc(pCxt, pFunc); if (TSDB_CODE_SUCCESS == code) { bool bRewriteToColumn = false; code = translateScanPseudoColumnFunc(pCxt, ppNode, &bRewriteToColumn); @@ -2849,18 +2854,17 @@ static EDealRes doCheckAggColCoexist(SNode** pNode, void* pContext) { } static int32_t checkIsEmptyResult(STranslateContext* pCxt, SSelectStmt* pSelect) { - if (pSelect->timeRange.skey > pSelect->timeRange.ekey - && !pSelect->hasCountFunc) { + if (pSelect->timeRange.skey > pSelect->timeRange.ekey && !pSelect->hasCountFunc) { pSelect->isEmptyResult = true; } - return TSDB_CODE_SUCCESS; + return TSDB_CODE_SUCCESS; } static int32_t resetSelectFuncNumWithoutDup(SSelectStmt* pSelect) { if (pSelect->selectFuncNum <= 1) return TSDB_CODE_SUCCESS; pSelect->selectFuncNum = 0; SNodeList* pNodeList = nodesMakeList(); - int32_t code = nodesCollectSelectFuncs(pSelect, SQL_CLAUSE_FROM, NULL, fmIsSelectFunc, pNodeList); + int32_t code = nodesCollectSelectFuncs(pSelect, SQL_CLAUSE_FROM, NULL, fmIsSelectFunc, pNodeList); if (TSDB_CODE_SUCCESS != code) { nodesDestroyList(pNodeList); return code; @@ -3937,57 +3941,57 @@ static void convertVarDuration(SValueNode* pOffset, uint8_t precision) { pOffset->unit = units[precision]; } -static const int64_t tsdbMaxKeepMS = (int64_t)60 * 1000 * TSDB_MAX_KEEP; -static int32_t checkIntervalWindow(STranslateContext* pCxt, SIntervalWindowNode* pInterval) { - uint8_t precision = ((SColumnNode*)pInterval->pCol)->node.resType.precision; +static const int64_t tsdbMaxKeepMS = (int64_t)60 * 1000 * TSDB_MAX_KEEP; +static int32_t checkIntervalWindow(STranslateContext* pCxt, SIntervalWindowNode* pInterval) { + uint8_t precision = ((SColumnNode*)pInterval->pCol)->node.resType.precision; - SValueNode* pInter = (SValueNode*)pInterval->pInterval; - bool valInter = IS_CALENDAR_TIME_DURATION(pInter->unit); - if (pInter->datum.i <= 0 || (!valInter && pInter->datum.i < tsMinIntervalTime)) { - return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_INTER_VALUE_TOO_SMALL, tsMinIntervalTime, - getPrecisionStr(precision)); + SValueNode* pInter = (SValueNode*)pInterval->pInterval; + bool valInter = IS_CALENDAR_TIME_DURATION(pInter->unit); + if (pInter->datum.i <= 0 || (!valInter && pInter->datum.i < tsMinIntervalTime)) { + return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_INTER_VALUE_TOO_SMALL, tsMinIntervalTime, + getPrecisionStr(precision)); } else if (pInter->datum.i / getPrecisionMultiple(precision) > tsdbMaxKeepMS) { - return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_INTER_VALUE_TOO_BIG, 1000, "years"); + return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_INTER_VALUE_TOO_BIG, 1000, "years"); } - if (NULL != pInterval->pOffset) { - SValueNode* pOffset = (SValueNode*)pInterval->pOffset; - if (pOffset->datum.i <= 0) { - return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_INTER_OFFSET_NEGATIVE); + if (NULL != pInterval->pOffset) { + SValueNode* pOffset = (SValueNode*)pInterval->pOffset; + if (pOffset->datum.i <= 0) { + return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_INTER_OFFSET_NEGATIVE); } - if (pInter->unit == 'n' && pOffset->unit == 'y') { - return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_INTER_OFFSET_UNIT); + if (pInter->unit == 'n' && pOffset->unit == 'y') { + return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_INTER_OFFSET_UNIT); } - bool fixed = !IS_CALENDAR_TIME_DURATION(pOffset->unit) && !valInter; - if ((fixed && pOffset->datum.i >= pInter->datum.i) || + bool fixed = !IS_CALENDAR_TIME_DURATION(pOffset->unit) && !valInter; + if ((fixed && pOffset->datum.i >= pInter->datum.i) || (!fixed && getMonthsFromTimeVal(pOffset->datum.i, precision, pOffset->unit) >= getMonthsFromTimeVal(pInter->datum.i, precision, pInter->unit))) { - return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_INTER_OFFSET_TOO_BIG); + return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_INTER_OFFSET_TOO_BIG); } - if (pOffset->unit == 'n' || pOffset->unit == 'y') { - convertVarDuration(pOffset, precision); + if (pOffset->unit == 'n' || pOffset->unit == 'y') { + convertVarDuration(pOffset, precision); } } - if (NULL != pInterval->pSliding) { - const static int32_t INTERVAL_SLIDING_FACTOR = 100; + if (NULL != pInterval->pSliding) { + const static int32_t INTERVAL_SLIDING_FACTOR = 100; - SValueNode* pSliding = (SValueNode*)pInterval->pSliding; - if (IS_CALENDAR_TIME_DURATION(pSliding->unit)) { - return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_INTER_SLIDING_UNIT); + SValueNode* pSliding = (SValueNode*)pInterval->pSliding; + if (IS_CALENDAR_TIME_DURATION(pSliding->unit)) { + return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_INTER_SLIDING_UNIT); } - if ((pSliding->datum.i < + if ((pSliding->datum.i < convertTimeFromPrecisionToUnit(tsMinSlidingTime, TSDB_TIME_PRECISION_MILLI, pSliding->unit)) || (pInter->datum.i / pSliding->datum.i > INTERVAL_SLIDING_FACTOR)) { - return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_INTER_SLIDING_TOO_SMALL); + return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_INTER_SLIDING_TOO_SMALL); } - if (pSliding->datum.i > pInter->datum.i) { - return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_INTER_SLIDING_TOO_BIG); + if (pSliding->datum.i > pInter->datum.i) { + return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_INTER_SLIDING_TOO_BIG); } } - return TSDB_CODE_SUCCESS; + return TSDB_CODE_SUCCESS; } static int32_t translateIntervalWindow(STranslateContext* pCxt, SSelectStmt* pSelect) { @@ -4128,11 +4132,11 @@ static EDealRes collectWindowsPseudocolumns(SNode* pNode, void* pContext) { } static int32_t checkWindowsConditonValid(SNode* pNode) { - int32_t code = TSDB_CODE_SUCCESS; - if(QUERY_NODE_EVENT_WINDOW != nodeType(pNode)) return code; + int32_t code = TSDB_CODE_SUCCESS; + if (QUERY_NODE_EVENT_WINDOW != nodeType(pNode)) return code; SEventWindowNode* pEventWindowNode = (SEventWindowNode*)pNode; - SNodeList* pCols = nodesMakeList(); + SNodeList* pCols = nodesMakeList(); if (NULL == pCols) { return TSDB_CODE_OUT_OF_MEMORY; } @@ -4342,14 +4346,15 @@ static int32_t translatePartitionBy(STranslateContext* pCxt, SSelectStmt* pSelec typedef struct SEqCondTbNameTableInfo { SRealTableNode* pRealTable; - SArray* aTbnames; + SArray* aTbnames; } SEqCondTbNameTableInfo; //[tableAlias.]tbname = tbNamVal -static bool isOperatorEqTbnameCond(STranslateContext* pCxt, SOperatorNode* pOperator, char** ppTableAlias, SArray** ppTabNames) { +static bool isOperatorEqTbnameCond(STranslateContext* pCxt, SOperatorNode* pOperator, char** ppTableAlias, + SArray** ppTabNames) { if (pOperator->opType != OP_TYPE_EQUAL) return false; SFunctionNode* pTbnameFunc = NULL; - SValueNode* pValueNode = NULL; + SValueNode* pValueNode = NULL; if (nodeType(pOperator->pLeft) == QUERY_NODE_FUNCTION && ((SFunctionNode*)(pOperator->pLeft))->funcType == FUNCTION_TYPE_TBNAME && nodeType(pOperator->pRight) == QUERY_NODE_VALUE) { @@ -4380,7 +4385,8 @@ static bool isOperatorEqTbnameCond(STranslateContext* pCxt, SOperatorNode* pOper } //[tableAlias.]tbname in (value1, value2, ...) -static bool isOperatorTbnameInCond(STranslateContext* pCxt, SOperatorNode* pOperator, char** ppTableAlias, SArray** ppTbNames) { +static bool isOperatorTbnameInCond(STranslateContext* pCxt, SOperatorNode* pOperator, char** ppTableAlias, + SArray** ppTbNames) { if (pOperator->opType != OP_TYPE_IN) return false; if (nodeType(pOperator->pLeft) != QUERY_NODE_FUNCTION || ((SFunctionNode*)(pOperator->pLeft))->funcType != FUNCTION_TYPE_TBNAME || @@ -4401,8 +4407,8 @@ static bool isOperatorTbnameInCond(STranslateContext* pCxt, SOperatorNode* pOper } *ppTbNames = taosArrayInit(1, sizeof(void*)); SNodeListNode* pValueListNode = (SNodeListNode*)pOperator->pRight; - SNodeList* pValueNodeList = pValueListNode->pNodeList; - SNode* pValNode = NULL; + SNodeList* pValueNodeList = pValueListNode->pNodeList; + SNode* pValNode = NULL; FOREACH(pValNode, pValueNodeList) { if (nodeType(pValNode) != QUERY_NODE_VALUE) { return false; @@ -4410,13 +4416,12 @@ static bool isOperatorTbnameInCond(STranslateContext* pCxt, SOperatorNode* pOper taosArrayPush(*ppTbNames, &((SValueNode*)pValNode)->literal); } return true; - } static bool findEqCondTbNameInOperatorNode(STranslateContext* pCxt, SNode* pWhere, SEqCondTbNameTableInfo* pInfo) { int32_t code = TSDB_CODE_SUCCESS; - char* pTableAlias = NULL; - char* pTbNameVal = NULL; + char* pTableAlias = NULL; + char* pTbNameVal = NULL; if (isOperatorEqTbnameCond(pCxt, (SOperatorNode*)pWhere, &pTableAlias, &pInfo->aTbnames) || isOperatorTbnameInCond(pCxt, (SOperatorNode*)pWhere, &pTableAlias, &pInfo->aTbnames)) { STableNode* pTable; @@ -4451,17 +4456,17 @@ static void findEqualCondTbnameInLogicCondAnd(STranslateContext* pCxt, SNode* pW FOREACH(pTmpNode, ((SLogicConditionNode*)pWhere)->pParameterList) { if (nodeType(pTmpNode) == QUERY_NODE_OPERATOR) { SEqCondTbNameTableInfo info = {0}; - bool bIsEqTbnameCond = findEqCondTbNameInOperatorNode(pCxt, pTmpNode, &info); + bool bIsEqTbnameCond = findEqCondTbNameInOperatorNode(pCxt, pTmpNode, &info); if (bIsEqTbnameCond) { if (!isTableExistInTableTbnames(aTableTbnames, info.pRealTable)) { - //TODO: intersect tbNames of same table? speed + // TODO: intersect tbNames of same table? speed taosArrayPush(aTableTbnames, &info); } else { taosArrayDestroy(info.aTbnames); } } } - //TODO: logic cond + // TODO: logic cond } } @@ -4486,10 +4491,10 @@ static void findEqualCondTbnameInLogicCondOr(STranslateContext* pCxt, SNode* pWh bool bAllTbName = true; SNode* pTmpNode = NULL; FOREACH(pTmpNode, ((SLogicConditionNode*)pWhere)->pParameterList) { - //TODO: logic cond + // TODO: logic cond if (nodeType(pTmpNode) == QUERY_NODE_OPERATOR) { SEqCondTbNameTableInfo info = {0}; - bool bIsEqTbnameCond = findEqCondTbNameInOperatorNode(pCxt, pTmpNode, &info); + bool bIsEqTbnameCond = findEqCondTbNameInOperatorNode(pCxt, pTmpNode, &info); if (!bIsEqTbnameCond) { bAllTbName = false; break; @@ -4512,10 +4517,10 @@ static void findEqualCondTbnameInLogicCondOr(STranslateContext* pCxt, SNode* pWh } static int32_t findEqualCondTbname(STranslateContext* pCxt, SNode* pWhere, SArray* aTableTbnames) { - //TODO: optimize nested and/or condition. now only the fist level is processed. + // TODO: optimize nested and/or condition. now only the fist level is processed. if (nodeType(pWhere) == QUERY_NODE_OPERATOR) { SEqCondTbNameTableInfo info = {0}; - bool bIsEqTbnameCond = findEqCondTbNameInOperatorNode(pCxt, pWhere, &info); + bool bIsEqTbnameCond = findEqCondTbNameInOperatorNode(pCxt, pWhere, &info); if (bIsEqTbnameCond) { taosArrayPush(aTableTbnames, &info); } @@ -4529,7 +4534,8 @@ static int32_t findEqualCondTbname(STranslateContext* pCxt, SNode* pWhere, SArra return TSDB_CODE_SUCCESS; } -static int32_t findVgroupsFromEqualTbname(STranslateContext* pCxt, SEqCondTbNameTableInfo* pInfo, SVgroupsInfo* vgsInfo) { +static int32_t findVgroupsFromEqualTbname(STranslateContext* pCxt, SEqCondTbNameTableInfo* pInfo, + SVgroupsInfo* vgsInfo) { int32_t nVgroups = 0; int32_t nTbls = taosArrayGetSize(pInfo->aTbnames); @@ -4571,10 +4577,10 @@ static int32_t setEqualTbnameTableVgroups(STranslateContext* pCxt, SSelectStmt* int32_t code = TSDB_CODE_SUCCESS; for (int i = 0; i < taosArrayGetSize(aTables); ++i) { SEqCondTbNameTableInfo* pInfo = taosArrayGet(aTables, i); - int32_t nTbls = taosArrayGetSize(pInfo->aTbnames); + int32_t nTbls = taosArrayGetSize(pInfo->aTbnames); SVgroupsInfo* vgsInfo = taosMemoryMalloc(sizeof(SVgroupsInfo) + nTbls * sizeof(SVgroupInfo)); - int32_t nVgroups = 0; + int32_t nVgroups = 0; findVgroupsFromEqualTbname(pCxt, pInfo, vgsInfo); if (vgsInfo->numOfVgroups != 0) { taosMemoryFree(pInfo->pRealTable->pVgroupList); @@ -5167,7 +5173,6 @@ static int32_t translateInsertTable(STranslateContext* pCxt, SNode** pTable) { if (TSDB_CODE_SUCCESS == code && TSDB_CHILD_TABLE != ((SRealTableNode*)*pTable)->pMeta->tableType && TSDB_NORMAL_TABLE != ((SRealTableNode*)*pTable)->pMeta->tableType) { code = buildInvalidOperationMsg(&pCxt->msgBuf, "insert data into super table is not supported"); - } return code; } @@ -5263,6 +5268,9 @@ static int32_t buildCreateDbReq(STranslateContext* pCxt, SCreateDatabaseStmt* pS pReq->hashSuffix = pStmt->pOptions->tableSuffix; pReq->tsdbPageSize = pStmt->pOptions->tsdbPageSize; pReq->keepTimeOffset = pStmt->pOptions->keepTimeOffset; + pReq->s3ChunkSize = pStmt->pOptions->s3ChunkSize; + pReq->s3KeepLocal = pStmt->pOptions->s3KeepLocal; + pReq->s3Compact = pStmt->pOptions->s3Compact; pReq->ignoreExist = pStmt->ignoreExists; pReq->withArbitrator = pStmt->pOptions->withArbitrator; pReq->encryptAlgorithm = pStmt->pOptions->encryptAlgorithm; @@ -5289,6 +5297,22 @@ static int32_t checkTableRangeOption(STranslateContext* pCxt, const char* pName, return checkRangeOption(pCxt, TSDB_CODE_PAR_INVALID_TABLE_OPTION, pName, val, minVal, maxVal); } +static int32_t checkDbS3KeepLocalOption(STranslateContext* pCxt, SDatabaseOptions* pOptions) { + if (NULL != pOptions->s3KeepLocalStr) { + if (DEAL_RES_ERROR == translateValue(pCxt, pOptions->s3KeepLocalStr)) { + return pCxt->errCode; + } + if (TIME_UNIT_MINUTE != pOptions->s3KeepLocalStr->unit && TIME_UNIT_HOUR != pOptions->s3KeepLocalStr->unit && + TIME_UNIT_DAY != pOptions->s3KeepLocalStr->unit) { + return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_DB_OPTION, + "Invalid option s3_keeplocal unit: %c, only %c, %c, %c allowed", + pOptions->s3KeepLocalStr->unit, TIME_UNIT_MINUTE, TIME_UNIT_HOUR, TIME_UNIT_DAY); + } + pOptions->s3KeepLocal = getBigintFromValueNode(pOptions->s3KeepLocalStr); + } + return checkDbRangeOption(pCxt, "s3KeepLocal", pOptions->s3KeepLocal, TSDB_MIN_S3_KEEP_LOCAL, TSDB_MAX_S3_KEEP_LOCAL); +} + static int32_t checkDbDaysOption(STranslateContext* pCxt, SDatabaseOptions* pOptions) { if (NULL != pOptions->pDaysPerFile) { if (DEAL_RES_ERROR == translateValue(pCxt, pOptions->pDaysPerFile)) { @@ -5566,6 +5590,7 @@ static int32_t checkDbTbPrefixSuffixOptions(STranslateContext* pCxt, int32_t tbP static int32_t checkOptionsDependency(STranslateContext* pCxt, const char* pDbName, SDatabaseOptions* pOptions) { int32_t daysPerFile = pOptions->daysPerFile; + int32_t s3KeepLocal = pOptions->s3KeepLocal; int64_t daysToKeep0 = pOptions->keep[0]; if (-1 == daysPerFile && -1 == daysToKeep0) { return TSDB_CODE_SUCCESS; @@ -5582,6 +5607,10 @@ static int32_t checkOptionsDependency(STranslateContext* pCxt, const char* pDbNa return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_DB_OPTION, "Invalid duration value, should be keep2 >= keep1 >= keep0 >= 3 * duration"); } + if (s3KeepLocal > 0 && daysPerFile > s3KeepLocal / 3) { + return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_DB_OPTION, + "Invalid parameters, should be s3_keeplocal >= 3 * duration"); + } if ((pOptions->replica == 2) ^ (pOptions->withArbitrator == TSDB_MAX_DB_WITH_ARBITRATOR)) { return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_DB_OPTION, @@ -5693,9 +5722,19 @@ static int32_t checkDatabaseOptions(STranslateContext* pCxt, const char* pDbName if (TSDB_CODE_SUCCESS == code) { code = checkDbTbPrefixSuffixOptions(pCxt, pOptions->tablePrefix, pOptions->tableSuffix); } + if (TSDB_CODE_SUCCESS == code) { + code = checkDbS3KeepLocalOption(pCxt, pOptions); + } if (TSDB_CODE_SUCCESS == code) { code = checkOptionsDependency(pCxt, pDbName, pOptions); } + if (TSDB_CODE_SUCCESS == code) { + code = + checkDbRangeOption(pCxt, "s3_chunksize", pOptions->s3ChunkSize, TSDB_MIN_S3_CHUNK_SIZE, TSDB_MAX_S3_CHUNK_SIZE); + } + if (TSDB_CODE_SUCCESS == code) { + code = checkDbRangeOption(pCxt, "s3_compact", pOptions->s3Compact, TSDB_MIN_S3_COMPACT, TSDB_MAX_S3_COMPACT); + } return code; } @@ -5708,18 +5747,18 @@ static int32_t checkCreateDatabase(STranslateContext* pCxt, SCreateDatabaseStmt* } #define FILL_CMD_SQL(sql, sqlLen, pCmdReq, CMD_TYPE, genericCmd) \ - CMD_TYPE* pCmdReq = genericCmd; \ - char* cmdSql = taosMemoryMalloc(sqlLen); \ - if (cmdSql == NULL) { \ - return TSDB_CODE_OUT_OF_MEMORY; \ - } \ - memcpy(cmdSql, sql, sqlLen); \ - pCmdReq->sqlLen = sqlLen; \ - pCmdReq->sql = cmdSql; \ + CMD_TYPE* pCmdReq = genericCmd; \ + char* cmdSql = taosMemoryMalloc(sqlLen); \ + if (cmdSql == NULL) { \ + return TSDB_CODE_OUT_OF_MEMORY; \ + } \ + memcpy(cmdSql, sql, sqlLen); \ + pCmdReq->sqlLen = sqlLen; \ + pCmdReq->sql = cmdSql; static int32_t fillCmdSql(STranslateContext* pCxt, int16_t msgType, void* pReq) { const char* sql = pCxt->pParseCxt->pSql; - size_t sqlLen = pCxt->pParseCxt->sqlLen; + size_t sqlLen = pCxt->pParseCxt->sqlLen; switch (msgType) { case TDMT_MND_CREATE_DB: { @@ -5834,7 +5873,6 @@ static int32_t fillCmdSql(STranslateContext* pCxt, int16_t msgType, void* pReq) default: { break; } - } return TSDB_CODE_SUCCESS; @@ -5907,6 +5945,8 @@ static void buildAlterDbReq(STranslateContext* pCxt, SAlterDatabaseStmt* pStmt, pReq->minRows = pStmt->pOptions->minRowsPerBlock; pReq->walRetentionPeriod = pStmt->pOptions->walRetentionPeriod; pReq->walRetentionSize = pStmt->pOptions->walRetentionSize; + pReq->s3KeepLocal = pStmt->pOptions->s3KeepLocal; + pReq->s3Compact = pStmt->pOptions->s3Compact; pReq->withArbitrator = pStmt->pOptions->withArbitrator; return; } @@ -5938,6 +5978,14 @@ static int32_t translateTrimDatabase(STranslateContext* pCxt, STrimDatabaseStmt* return buildCmdMsg(pCxt, TDMT_MND_TRIM_DB, (FSerializeFunc)tSerializeSTrimDbReq, &req); } +static int32_t translateS3MigrateDatabase(STranslateContext* pCxt, SS3MigrateDatabaseStmt* pStmt) { + SS3MigrateDbReq req = {0}; + SName name = {0}; + tNameSetDbName(&name, pCxt->pParseCxt->acctId, pStmt->dbName, strlen(pStmt->dbName)); + tNameGetFullDbName(&name, req.db); + return buildCmdMsg(pCxt, TDMT_MND_S3MIGRATE_DB, (FSerializeFunc)tSerializeSS3MigrateDbReq, &req); +} + static int32_t columnDefNodeToField(SNodeList* pList, SArray** pArray, bool calBytes) { *pArray = taosArrayInit(LIST_LENGTH(pList), sizeof(SField)); SNode* pNode; @@ -5989,7 +6037,7 @@ static int32_t checkTableSmaOption(STranslateContext* pCxt, SCreateTableStmt* pS } static bool validRollupFunc(const char* pFunc) { - static const char* rollupFuncs[] = {"avg", "sum", "min", "max", "last", "first"}; + static const char* rollupFuncs[] = {"avg", "sum", "min", "max", "last", "first"}; static const int32_t numOfRollupFuncs = (sizeof(rollupFuncs) / sizeof(char*)); for (int i = 0; i < numOfRollupFuncs; ++i) { if (0 == strcmp(rollupFuncs[i], pFunc)) { @@ -6297,7 +6345,6 @@ static int32_t checkTableDeleteMarkOption(STranslateContext* pCxt, STableOptions return code; } - static int32_t checkCreateTable(STranslateContext* pCxt, SCreateTableStmt* pStmt, bool createStable) { if (NULL != strchr(pStmt->tableName, '.')) { return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_IDENTIFIER_NAME, @@ -7409,8 +7456,8 @@ static int16_t getCreateComponentNodeMsgType(ENodeType type) { static int32_t translateCreateComponentNode(STranslateContext* pCxt, SCreateComponentNodeStmt* pStmt) { SMCreateQnodeReq createReq = {.dnodeId = pStmt->dnodeId}; - int32_t code = buildCmdMsg(pCxt, getCreateComponentNodeMsgType(nodeType(pStmt)), - (FSerializeFunc)tSerializeSCreateDropMQSNodeReq, &createReq); + int32_t code = buildCmdMsg(pCxt, getCreateComponentNodeMsgType(nodeType(pStmt)), + (FSerializeFunc)tSerializeSCreateDropMQSNodeReq, &createReq); tFreeSMCreateQnodeReq(&createReq); return code; } @@ -7433,8 +7480,8 @@ static int16_t getDropComponentNodeMsgType(ENodeType type) { static int32_t translateDropComponentNode(STranslateContext* pCxt, SDropComponentNodeStmt* pStmt) { SDDropQnodeReq dropReq = {.dnodeId = pStmt->dnodeId}; - int32_t code = buildCmdMsg(pCxt, getDropComponentNodeMsgType(nodeType(pStmt)), - (FSerializeFunc)tSerializeSCreateDropMQSNodeReq, &dropReq); + int32_t code = buildCmdMsg(pCxt, getDropComponentNodeMsgType(nodeType(pStmt)), + (FSerializeFunc)tSerializeSCreateDropMQSNodeReq, &dropReq); tFreeSDDropQnodeReq(&dropReq); return code; } @@ -7559,7 +7606,8 @@ static int32_t buildQueryForTableTopic(STranslateContext* pCxt, SCreateTopicStmt .mgmtEps = pParCxt->mgmtEpSet}; SName name; STableMeta* pMeta = NULL; - int32_t code = getTargetMeta(pCxt, toName(pParCxt->acctId, pStmt->subDbName, pStmt->subSTbName, &name), &pMeta, false); + int32_t code = + getTargetMeta(pCxt, toName(pParCxt->acctId, pStmt->subDbName, pStmt->subSTbName, &name), &pMeta, false); if (code) { taosMemoryFree(pMeta); return code; @@ -7667,7 +7715,7 @@ static int32_t translateDescribe(STranslateContext* pCxt, SDescribeStmt* pStmt) #ifdef TD_ENTERPRISE if (TSDB_CODE_PAR_TABLE_NOT_EXIST == code) { int32_t origCode = code; - SName name; + SName name; toName(pCxt->pParseCxt->acctId, pStmt->dbName, pStmt->tableName, &name); SViewMeta* pMeta = NULL; code = getViewMetaFromMetaCache(pCxt, &name, &pMeta); @@ -7675,9 +7723,10 @@ static int32_t translateDescribe(STranslateContext* pCxt, SDescribeStmt* pStmt) code = origCode; } else { SParseSqlRes res = {.resType = PARSE_SQL_RES_SCHEMA}; - char dbFName[TSDB_DB_FNAME_LEN]; + char dbFName[TSDB_DB_FNAME_LEN]; tNameGetFullDbName(&name, dbFName); - code = (*pCxt->pParseCxt->parseSqlFp)(pCxt->pParseCxt->parseSqlParam, name.dbname, pMeta->querySql, false, pMeta->user, &res); + code = (*pCxt->pParseCxt->parseSqlFp)(pCxt->pParseCxt->parseSqlParam, name.dbname, pMeta->querySql, false, + pMeta->user, &res); if (TSDB_CODE_SUCCESS == code) { code = collectUseTable(&name, pCxt->pTargetTables); } @@ -7690,7 +7739,8 @@ static int32_t translateDescribe(STranslateContext* pCxt, SDescribeStmt* pStmt) viewMeta.numOfCols = res.schemaRes.numOfCols; viewMeta.pSchema = res.schemaRes.pSchema; code = buildTableMetaFromViewMeta(&pStmt->pMeta, &viewMeta); - parserDebug("rebuild view meta, view:%s.%s, numOfCols:%d, code:0x%x", dbFName, pStmt->tableName, viewMeta.numOfCols, code); + parserDebug("rebuild view meta, view:%s.%s, numOfCols:%d, code:0x%x", dbFName, pStmt->tableName, + viewMeta.numOfCols, code); } taosMemoryFree(res.schemaRes.pSchema); } @@ -7780,12 +7830,12 @@ static int32_t checkCreateStream(STranslateContext* pCxt, SCreateStreamStmt* pSt #ifdef TD_ENTERPRISE SRealTableNode* pRealTable = (SRealTableNode*)((SSelectStmt*)pStmt->pQuery)->pFromTable; - SName name; - STableMeta* pMeta = NULL; - int8_t tableType = 0; - int32_t code = getTargetMeta( - pCxt, toName(pCxt->pParseCxt->acctId, pRealTable->table.dbName, pRealTable->table.tableName, &name), - &pMeta, true); + SName name; + STableMeta* pMeta = NULL; + int8_t tableType = 0; + int32_t code = + getTargetMeta(pCxt, toName(pCxt->pParseCxt->acctId, pRealTable->table.dbName, pRealTable->table.tableName, &name), + &pMeta, true); if (NULL != pMeta) { tableType = pMeta->tableType; taosMemoryFree(pMeta); @@ -8107,17 +8157,17 @@ static int32_t checkStreamQuery(STranslateContext* pCxt, SCreateStreamStmt* pStm && TSDB_SUPER_TABLE == ((SRealTableNode*)pSelect->pFromTable)->pMeta->tableType && !hasTbnameFunction(pSelect->pPartitionByList) ) { return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_STREAM_QUERY, - "Count window for stream on super table must patitioned by table name"); + "Count window for stream on super table must patitioned by table name"); } int64_t watermark = 0; if (pStmt->pOptions->pWatermark) { translateValue(pCxt, (SValueNode*)pStmt->pOptions->pWatermark); - watermark =((SValueNode*)pStmt->pOptions->pWatermark)->datum.i; + watermark = ((SValueNode*)pStmt->pOptions->pWatermark)->datum.i; } if (watermark <= 0) { return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_STREAM_QUERY, - "Watermark of Count window must exceed 0."); + "Watermark of Count window must exceed 0."); } if (pStmt->pOptions->ignoreExpired != 1) { @@ -8550,7 +8600,7 @@ static int32_t createLastTsSelectStmt(char* pDb, char* pTable, STableMeta* pMeta } snprintf(pFunc1->node.aliasName, sizeof(pFunc1->node.aliasName), "%s.%p", pFunc1->functionName, pFunc1); - code = nodesListStrictAppend(pProjectionList, (SNode*) pFunc1); + code = nodesListStrictAppend(pProjectionList, (SNode*)pFunc1); if (code) { nodesDestroyList(pProjectionList); return code; @@ -8563,7 +8613,7 @@ static int32_t createLastTsSelectStmt(char* pDb, char* pTable, STableMeta* pMeta } snprintf(pFunc2->node.aliasName, sizeof(pFunc2->node.aliasName), "%s.%p", pFunc2->functionName, pFunc2); - code = nodesListStrictAppend(pProjectionList, (SNode*) pFunc2); + code = nodesListStrictAppend(pProjectionList, (SNode*)pFunc2); if (code) { nodesDestroyList(pProjectionList); return code; @@ -8829,7 +8879,7 @@ static int32_t createStreamReqVersionInfo(SSDataBlock* pBlock, SArray** pArray, taosArrayPush(*pArray, &v); } } else { - int32_t precision = (pInterval->interval > 0)? pInterval->precision:TSDB_TIME_PRECISION_MILLI; + int32_t precision = (pInterval->interval > 0) ? pInterval->precision : TSDB_TIME_PRECISION_MILLI; *lastTs = taosGetTimestamp(precision); } @@ -8853,7 +8903,8 @@ int32_t translatePostCreateStream(SParseContext* pParseCxt, SQuery* pQuery, SSDa if (TSDB_CODE_SUCCESS == code) { if (interval.interval > 0) { - pStmt->pReq->lastTs = taosTimeAdd(taosTimeTruncate(lastTs, &interval), interval.interval, interval.intervalUnit, interval.precision); + pStmt->pReq->lastTs = taosTimeAdd(taosTimeTruncate(lastTs, &interval), interval.interval, interval.intervalUnit, + interval.precision); } else { pStmt->pReq->lastTs = lastTs + 1; // start key of the next time window } @@ -8908,26 +8959,27 @@ static int32_t validateCreateView(STranslateContext* pCxt, SCreateViewStmt* pStm return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_VIEW_QUERY, "Invalid view query type"); } -/* - STableMeta* pMetaCache = NULL; - int32_t code = getTableMeta(pCxt, pStmt->dbName, pStmt->viewName, &pMetaCache); - if (TSDB_CODE_SUCCESS == code) { - taosMemoryFreeClear(pMetaCache); - return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_VIEW_CONFLICT_WITH_TABLE, "View name is conflict with table"); - } -*/ + /* + STableMeta* pMetaCache = NULL; + int32_t code = getTableMeta(pCxt, pStmt->dbName, pStmt->viewName, &pMetaCache); + if (TSDB_CODE_SUCCESS == code) { + taosMemoryFreeClear(pMetaCache); + return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_VIEW_CONFLICT_WITH_TABLE, "View name is conflict with + table"); + } + */ return TSDB_CODE_SUCCESS; } static int32_t translateCreateView(STranslateContext* pCxt, SCreateViewStmt* pStmt) { #ifndef TD_ENTERPRISE - return TSDB_CODE_OPS_NOT_SUPPORT; + return TSDB_CODE_OPS_NOT_SUPPORT; #endif SParseSqlRes res = {.resType = PARSE_SQL_RES_SCHEMA}; - SName name; - char dbFName[TSDB_DB_FNAME_LEN]; + SName name; + char dbFName[TSDB_DB_FNAME_LEN]; toName(pCxt->pParseCxt->acctId, pStmt->dbName, pStmt->viewName, &name); tNameGetFullDbName(&name, dbFName); @@ -8944,7 +8996,8 @@ static int32_t translateCreateView(STranslateContext* pCxt, SCreateViewStmt* pSt pStmt->createReq.pSchema = res.schemaRes.pSchema; strncpy(pStmt->createReq.name, pStmt->viewName, sizeof(pStmt->createReq.name) - 1); tstrncpy(pStmt->createReq.dbFName, dbFName, sizeof(pStmt->createReq.dbFName)); - snprintf(pStmt->createReq.fullname, sizeof(pStmt->createReq.fullname) - 1, "%s.%s", pStmt->createReq.dbFName, pStmt->viewName); + snprintf(pStmt->createReq.fullname, sizeof(pStmt->createReq.fullname) - 1, "%s.%s", pStmt->createReq.dbFName, + pStmt->viewName); TSWAP(pStmt->createReq.querySql, pStmt->pQuerySql); pStmt->createReq.orReplace = pStmt->orReplace; pStmt->createReq.sql = tstrdup(pCxt->pParseCxt->pSql); @@ -8960,14 +9013,13 @@ static int32_t translateCreateView(STranslateContext* pCxt, SCreateViewStmt* pSt return code; } - static int32_t translateDropView(STranslateContext* pCxt, SDropViewStmt* pStmt) { #ifndef TD_ENTERPRISE return TSDB_CODE_OPS_NOT_SUPPORT; #endif - SCMDropViewReq dropReq = {0}; - SName name; + SCMDropViewReq dropReq = {0}; + SName name; tNameSetDbName(&name, pCxt->pParseCxt->acctId, pStmt->dbName, strlen(pStmt->dbName)); tNameGetFullDbName(&name, dropReq.dbFName); strncpy(dropReq.name, pStmt->viewName, sizeof(dropReq.name) - 1); @@ -8987,7 +9039,6 @@ static int32_t translateDropView(STranslateContext* pCxt, SDropViewStmt* pStmt) return buildCmdMsg(pCxt, TDMT_MND_DROP_VIEW, (FSerializeFunc)tSerializeSCMDropViewReq, &dropReq); } - static int32_t readFromFile(char* pName, int32_t* len, char** buf) { int64_t filesize = 0; if (taosStatFile(pName, &filesize, NULL, NULL) < 0) { @@ -9088,7 +9139,7 @@ static int32_t translateGrantTagCond(STranslateContext* pCxt, SGrantStmt* pStmt, if (TSDB_CODE_SUCCESS == code) { SName name; code = getTargetMeta(pCxt, toName(pCxt->pParseCxt->acctId, pTable->table.dbName, pTable->table.tableName, &name), - &(pTable->pMeta), false); + &(pTable->pMeta), false); if (code) { nodesDestroyNode((SNode*)pTable); return code; @@ -9122,15 +9173,16 @@ static int32_t translateGrantTagCond(STranslateContext* pCxt, SGrantStmt* pStmt, } static int32_t translateGrant(STranslateContext* pCxt, SGrantStmt* pStmt) { - int32_t code = 0; + int32_t code = 0; SAlterUserReq req = {0}; req.alterType = TSDB_ALTER_USER_ADD_PRIVILEGES; req.privileges = pStmt->privileges; #ifdef TD_ENTERPRISE if (0 != pStmt->tabName[0]) { - SName name; + SName name; STableMeta* pTableMeta = NULL; - code = getTargetMeta(pCxt, toName(pCxt->pParseCxt->acctId, pStmt->objName, pStmt->tabName, &name), &pTableMeta, true); + code = + getTargetMeta(pCxt, toName(pCxt->pParseCxt->acctId, pStmt->objName, pStmt->tabName, &name), &pTableMeta, true); if (TSDB_CODE_SUCCESS != code) { if (TSDB_CODE_PAR_TABLE_NOT_EXIST != code) { return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_GET_META_ERROR, tstrerror(code)); @@ -9156,16 +9208,17 @@ static int32_t translateGrant(STranslateContext* pCxt, SGrantStmt* pStmt) { } static int32_t translateRevoke(STranslateContext* pCxt, SRevokeStmt* pStmt) { - int32_t code = 0; + int32_t code = 0; SAlterUserReq req = {0}; req.alterType = TSDB_ALTER_USER_DEL_PRIVILEGES; req.privileges = pStmt->privileges; #ifdef TD_ENTERPRISE if (0 != pStmt->tabName[0]) { - SName name; + SName name; STableMeta* pTableMeta = NULL; - code = getTargetMeta(pCxt, toName(pCxt->pParseCxt->acctId, pStmt->objName, pStmt->tabName, &name), &pTableMeta, true); + code = + getTargetMeta(pCxt, toName(pCxt->pParseCxt->acctId, pStmt->objName, pStmt->tabName, &name), &pTableMeta, true); if (TSDB_CODE_SUCCESS != code) { if (TSDB_CODE_PAR_TABLE_NOT_EXIST != code) { return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_GET_META_ERROR, tstrerror(code)); @@ -9195,7 +9248,8 @@ static int32_t translateBalanceVgroup(STranslateContext* pCxt, SBalanceVgroupStm static int32_t translateBalanceVgroupLeader(STranslateContext* pCxt, SBalanceVgroupLeaderStmt* pStmt) { SBalanceVgroupLeaderReq req = {0}; req.vgId = pStmt->vgId; - int32_t code = buildCmdMsg(pCxt, TDMT_MND_BALANCE_VGROUP_LEADER, (FSerializeFunc)tSerializeSBalanceVgroupLeaderReq, &req); + int32_t code = + buildCmdMsg(pCxt, TDMT_MND_BALANCE_VGROUP_LEADER, (FSerializeFunc)tSerializeSBalanceVgroupLeaderReq, &req); tFreeSBalanceVgroupLeaderReq(&req); return code; } @@ -9319,6 +9373,9 @@ static int32_t translateQuery(STranslateContext* pCxt, SNode* pNode) { case QUERY_NODE_TRIM_DATABASE_STMT: code = translateTrimDatabase(pCxt, (STrimDatabaseStmt*)pNode); break; + case QUERY_NODE_S3MIGRATE_DATABASE_STMT: + code = translateS3MigrateDatabase(pCxt, (SS3MigrateDatabaseStmt*)pNode); + break; case QUERY_NODE_CREATE_TABLE_STMT: code = translateCreateSuperTable(pCxt, (SCreateTableStmt*)pNode); break; @@ -9628,7 +9685,6 @@ static int32_t extractShowCreateViewResultSchema(int32_t* numOfCols, SSchema** p return TSDB_CODE_SUCCESS; } - static int32_t extractShowVariablesResultSchema(int32_t* numOfCols, SSchema** pSchema) { *numOfCols = 3; *pSchema = taosMemoryCalloc((*numOfCols), sizeof(SSchema)); @@ -9819,17 +9875,16 @@ static int32_t createOperatorNode(EOperatorType opType, const char* pColName, SN static const char* getTbNameColName(ENodeType type) { const char* colName; - switch (type) - { - case QUERY_NODE_SHOW_VIEWS_STMT: - colName = "view_name"; - break; - case QUERY_NODE_SHOW_STABLES_STMT: - colName = "stable_name"; - break; - default: - colName = "table_name"; - break; + switch (type) { + case QUERY_NODE_SHOW_VIEWS_STMT: + colName = "view_name"; + break; + case QUERY_NODE_SHOW_STABLES_STMT: + colName = "stable_name"; + break; + default: + colName = "table_name"; + break; } return colName; } @@ -9863,14 +9918,14 @@ static int32_t insertCondIntoSelectStmt(SSelectStmt* pSelect, SNode* pCond) { SNodeList* pLogicCondList2 = NULL; if (nodeType(pSelect->pWhere) == QUERY_NODE_LOGIC_CONDITION && ((SLogicConditionNode*)pSelect->pWhere)->condType == LOGIC_COND_TYPE_AND) { - pLogicCondListWhere = ((SLogicConditionNode*)pSelect->pWhere)->pParameterList; + pLogicCondListWhere = ((SLogicConditionNode*)pSelect->pWhere)->pParameterList; } else { nodesListMakeAppend(&pLogicCondListWhere, pSelect->pWhere); } if (nodeType(pCond) == QUERY_NODE_LOGIC_CONDITION && ((SLogicConditionNode*)pCond)->condType == LOGIC_COND_TYPE_AND) { - pLogicCondList2 = ((SLogicConditionNode*)pCond)->pParameterList; + pLogicCondList2 = ((SLogicConditionNode*)pCond)->pParameterList; } else { nodesListMakeAppend(&pLogicCondList2, pCond); } @@ -11169,8 +11224,8 @@ static int32_t rewriteFlushDatabase(STranslateContext* pCxt, SQuery* pQuery) { static int32_t rewriteShowCompacts(STranslateContext* pCxt, SQuery* pQuery) { SShowCompactsStmt* pShow = (SShowCompactsStmt*)(pQuery->pRoot); - SSelectStmt* pStmt = NULL; - int32_t code = createSelectStmtForShow(QUERY_NODE_SHOW_COMPACTS_STMT, &pStmt); + SSelectStmt* pStmt = NULL; + int32_t code = createSelectStmtForShow(QUERY_NODE_SHOW_COMPACTS_STMT, &pStmt); if (TSDB_CODE_SUCCESS == code) { pCxt->showRewrite = true; pQuery->showRewrite = true; @@ -11182,8 +11237,8 @@ static int32_t rewriteShowCompacts(STranslateContext* pCxt, SQuery* pQuery) { static int32_t rewriteShowCompactDetailsStmt(STranslateContext* pCxt, SQuery* pQuery) { SShowCompactDetailsStmt* pShow = (SShowCompactDetailsStmt*)(pQuery->pRoot); - SSelectStmt* pStmt = NULL; - int32_t code = createSelectStmtForShow(QUERY_NODE_SHOW_COMPACT_DETAILS_STMT, &pStmt); + SSelectStmt* pStmt = NULL; + int32_t code = createSelectStmtForShow(QUERY_NODE_SHOW_COMPACT_DETAILS_STMT, &pStmt); if (TSDB_CODE_SUCCESS == code) { if (NULL != pShow->pCompactId) { code = createOperatorNode(OP_TYPE_EQUAL, "compact_id", pShow->pCompactId, &pStmt->pWhere); diff --git a/source/libs/parser/src/sql.c b/source/libs/parser/src/sql.c index 1f5af75ba0..3aa0feff42 100644 --- a/source/libs/parser/src/sql.c +++ b/source/libs/parser/src/sql.c @@ -104,29 +104,29 @@ #endif /************* Begin control #defines *****************************************/ #define YYCODETYPE unsigned short int -#define YYNOCODE 524 +#define YYNOCODE 528 #define YYACTIONTYPE unsigned short int #define ParseTOKENTYPE SToken typedef union { int yyinit; ParseTOKENTYPE yy0; - SDataType yy56; - SNodeList* yy72; - EOrder yy130; - SToken yy305; - EOperatorType yy324; - int8_t yy359; - STokenPair yy361; - int32_t yy444; - SShowTablesOption yy517; - ENullOrder yy681; - EShowKind yy761; - EJoinType yy828; - EFillMode yy926; - SAlterOption yy941; - bool yy985; - SNode* yy1000; - int64_t yy1005; + ENullOrder yy169; + bool yy185; + EOrder yy290; + EFillMode yy294; + int8_t yy311; + EShowKind yy321; + SNodeList* yy376; + SDataType yy400; + SShowTablesOption yy685; + int32_t yy772; + SToken yy833; + SNode* yy872; + SAlterOption yy893; + EJoinType yy948; + STokenPair yy1017; + EOperatorType yy1052; + int64_t yy1053; } YYMINORTYPE; #ifndef YYSTACKDEPTH #define YYSTACKDEPTH 100 @@ -142,18 +142,18 @@ typedef union { #define ParseCTX_FETCH #define ParseCTX_STORE #define YYFALLBACK 1 -#define YYNSTATE 905 -#define YYNRULE 705 -#define YYNRULE_WITH_ACTION 705 -#define YYNTOKEN 358 -#define YY_MAX_SHIFT 904 -#define YY_MIN_SHIFTREDUCE 1343 -#define YY_MAX_SHIFTREDUCE 2047 -#define YY_ERROR_ACTION 2048 -#define YY_ACCEPT_ACTION 2049 -#define YY_NO_ACTION 2050 -#define YY_MIN_REDUCE 2051 -#define YY_MAX_REDUCE 2755 +#define YYNSTATE 913 +#define YYNRULE 713 +#define YYNRULE_WITH_ACTION 713 +#define YYNTOKEN 362 +#define YY_MAX_SHIFT 912 +#define YY_MIN_SHIFTREDUCE 1358 +#define YY_MAX_SHIFTREDUCE 2070 +#define YY_ERROR_ACTION 2071 +#define YY_ACCEPT_ACTION 2072 +#define YY_NO_ACTION 2073 +#define YY_MIN_REDUCE 2074 +#define YY_MAX_REDUCE 2786 /************* End control #defines *******************************************/ #define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0]))) @@ -222,915 +222,918 @@ typedef union { *********** Begin parsing tables **********************************************/ #define YY_ACTTAB_COUNT (3200) static const YYACTIONTYPE yy_action[] = { - /* 0 */ 2512, 459, 176, 457, 2063, 746, 832, 606, 2726, 167, - /* 10 */ 607, 2094, 47, 45, 1969, 186, 198, 2246, 465, 464, - /* 20 */ 440, 2052, 1808, 2302, 758, 148, 745, 205, 505, 2289, - /* 30 */ 435, 2727, 747, 504, 1833, 1895, 2138, 1806, 411, 2300, - /* 40 */ 2369, 857, 129, 1815, 2205, 128, 127, 126, 125, 124, - /* 50 */ 123, 122, 121, 120, 149, 40, 39, 2616, 446, 46, - /* 60 */ 44, 43, 42, 41, 426, 2436, 1890, 1837, 2222, 805, - /* 70 */ 40, 39, 19, 2302, 46, 44, 43, 42, 41, 1814, - /* 80 */ 409, 717, 758, 148, 2726, 801, 2244, 66, 129, 2300, - /* 90 */ 186, 128, 127, 126, 125, 124, 123, 122, 121, 120, - /* 100 */ 225, 154, 2732, 205, 512, 210, 901, 2727, 747, 15, - /* 110 */ 874, 873, 872, 871, 468, 2370, 870, 869, 153, 864, - /* 120 */ 863, 862, 861, 860, 859, 858, 152, 852, 851, 850, - /* 130 */ 467, 466, 847, 846, 845, 185, 184, 844, 843, 303, - /* 140 */ 2653, 757, 91, 140, 756, 90, 2726, 1897, 1898, 2389, - /* 150 */ 573, 571, 2731, 391, 174, 2726, 96, 219, 113, 365, - /* 160 */ 800, 801, 2244, 746, 745, 205, 2726, 2387, 788, 2727, - /* 170 */ 747, 700, 2013, 413, 2730, 151, 363, 75, 2727, 2729, - /* 180 */ 74, 139, 2239, 2236, 745, 205, 1868, 1878, 649, 2727, - /* 190 */ 747, 392, 62, 1896, 1899, 800, 760, 203, 2653, 2654, - /* 200 */ 1833, 146, 2658, 238, 588, 586, 583, 2389, 1809, 623, - /* 210 */ 1807, 1836, 1834, 40, 39, 89, 1818, 46, 44, 43, - /* 220 */ 42, 41, 443, 40, 39, 2386, 788, 46, 44, 43, - /* 230 */ 42, 41, 40, 39, 800, 201, 46, 44, 43, 42, - /* 240 */ 41, 567, 1812, 1813, 1865, 62, 1867, 1870, 1871, 1872, - /* 250 */ 1873, 1874, 1875, 1876, 1877, 779, 803, 802, 1889, 1891, - /* 260 */ 1892, 1893, 1894, 2, 47, 45, 624, 2382, 1808, 389, - /* 270 */ 2051, 1831, 440, 100, 1808, 1493, 614, 401, 556, 607, - /* 280 */ 2094, 576, 611, 1806, 50, 63, 575, 1895, 608, 1806, - /* 290 */ 62, 1838, 2002, 622, 138, 137, 136, 135, 134, 133, - /* 300 */ 132, 131, 130, 535, 1711, 577, 230, 740, 40, 39, - /* 310 */ 390, 537, 46, 44, 43, 42, 41, 1495, 1890, 521, - /* 320 */ 2365, 515, 1924, 50, 19, 1814, 46, 44, 43, 42, - /* 330 */ 41, 1814, 566, 229, 1985, 2571, 85, 84, 508, 1590, - /* 340 */ 1591, 218, 733, 732, 2000, 2001, 2003, 2004, 2005, 1926, - /* 350 */ 758, 148, 901, 1833, 500, 498, 801, 2244, 901, 412, - /* 360 */ 489, 15, 626, 307, 1551, 388, 1663, 1664, 487, 221, - /* 370 */ 523, 484, 480, 476, 473, 501, 55, 842, 697, 305, - /* 380 */ 1542, 830, 829, 828, 1546, 827, 1548, 1549, 826, 823, - /* 390 */ 1925, 1557, 820, 1559, 1560, 817, 814, 811, 2074, 1897, - /* 400 */ 1898, 739, 2376, 2355, 51, 564, 563, 562, 561, 560, - /* 410 */ 555, 554, 553, 552, 395, 2044, 307, 2073, 542, 541, - /* 420 */ 540, 539, 538, 532, 531, 530, 240, 525, 524, 410, - /* 430 */ 609, 34, 2102, 516, 1651, 1652, 527, 2365, 1868, 1878, - /* 440 */ 1670, 1931, 62, 40, 39, 1896, 1899, 46, 44, 43, - /* 450 */ 42, 41, 2519, 242, 1809, 307, 1807, 609, 2660, 2102, - /* 460 */ 1809, 307, 1807, 801, 2244, 204, 2653, 2654, 29, 146, - /* 470 */ 2658, 2519, 36, 438, 1919, 1920, 1921, 1922, 1923, 1927, - /* 480 */ 1928, 1929, 1930, 139, 2657, 62, 223, 698, 1812, 1813, - /* 490 */ 654, 558, 2365, 493, 1812, 1813, 1865, 701, 1867, 1870, - /* 500 */ 1871, 1872, 1873, 1874, 1875, 1876, 1877, 779, 803, 802, - /* 510 */ 1889, 1891, 1892, 1893, 1894, 2, 12, 47, 45, 2220, - /* 520 */ 495, 491, 2043, 12, 1390, 440, 2731, 1808, 840, 164, - /* 530 */ 163, 837, 836, 835, 161, 1505, 1551, 1814, 2553, 2338, - /* 540 */ 1895, 228, 1806, 1836, 833, 2014, 2049, 676, 1388, 1389, - /* 550 */ 1504, 761, 1542, 830, 829, 828, 1546, 827, 1548, 1549, - /* 560 */ 778, 777, 688, 1557, 776, 1559, 1560, 775, 814, 811, - /* 570 */ 696, 1890, 653, 616, 2428, 307, 652, 19, 273, 2571, - /* 580 */ 669, 668, 667, 503, 1814, 502, 1383, 659, 145, 663, - /* 590 */ 842, 2235, 2519, 662, 783, 679, 37, 311, 661, 666, - /* 600 */ 419, 418, 673, 671, 660, 1390, 350, 656, 655, 270, - /* 610 */ 33, 901, 2233, 307, 15, 501, 40, 39, 2553, 578, - /* 620 */ 46, 44, 43, 42, 41, 425, 2436, 471, 1385, 1388, - /* 630 */ 1389, 784, 470, 2037, 461, 2229, 2552, 2295, 2297, 2591, - /* 640 */ 43, 42, 41, 115, 2554, 787, 2556, 2557, 782, 446, - /* 650 */ 805, 71, 1897, 1898, 70, 188, 307, 2645, 774, 2571, - /* 660 */ 805, 436, 2641, 40, 39, 741, 773, 46, 44, 43, - /* 670 */ 42, 41, 2519, 1392, 783, 35, 207, 2072, 687, 1832, - /* 680 */ 717, 40, 39, 2726, 2675, 46, 44, 43, 42, 41, - /* 690 */ 696, 1868, 1878, 685, 276, 683, 272, 271, 1896, 1899, - /* 700 */ 263, 2732, 205, 261, 175, 549, 2727, 747, 1973, 107, - /* 710 */ 548, 305, 2182, 1809, 1833, 1807, 2552, 2731, 547, 2591, - /* 720 */ 2726, 736, 2302, 115, 2554, 787, 2556, 2557, 782, 445, - /* 730 */ 805, 2519, 2553, 150, 2237, 158, 2616, 2645, 2300, 2730, - /* 740 */ 1837, 436, 2641, 2727, 2728, 761, 2437, 1812, 1813, 1865, - /* 750 */ 2660, 1867, 1870, 1871, 1872, 1873, 1874, 1875, 1876, 1877, - /* 760 */ 779, 803, 802, 1889, 1891, 1892, 1893, 1894, 2, 47, - /* 770 */ 45, 1900, 2221, 2571, 1736, 1737, 2656, 440, 2553, 1808, - /* 780 */ 12, 1551, 10, 1834, 2231, 452, 2519, 2219, 783, 199, - /* 790 */ 2513, 784, 1895, 2104, 1806, 417, 416, 1542, 830, 829, - /* 800 */ 828, 1546, 827, 1548, 1549, 826, 823, 2227, 1557, 820, - /* 810 */ 1559, 1560, 817, 814, 811, 742, 737, 730, 726, 2571, - /* 820 */ 758, 148, 834, 1890, 1410, 2293, 1409, 801, 2244, 1410, - /* 830 */ 2552, 1409, 2519, 2591, 783, 1994, 1814, 115, 2554, 787, - /* 840 */ 2556, 2557, 782, 117, 805, 603, 144, 509, 446, 188, - /* 850 */ 1995, 2645, 465, 464, 601, 436, 2641, 597, 593, 805, - /* 860 */ 1411, 1905, 1822, 901, 283, 1411, 48, 1833, 2553, 415, - /* 870 */ 414, 701, 651, 801, 2244, 1895, 2552, 1815, 2676, 2591, - /* 880 */ 1869, 784, 455, 115, 2554, 787, 2556, 2557, 782, 1865, - /* 890 */ 805, 444, 1993, 510, 2660, 2746, 653, 2645, 2529, 173, - /* 900 */ 652, 436, 2641, 1837, 1897, 1898, 1890, 2246, 196, 2571, - /* 910 */ 1683, 1684, 840, 164, 163, 837, 836, 835, 161, 1814, - /* 920 */ 2655, 1833, 2519, 2533, 783, 801, 2244, 840, 164, 163, - /* 930 */ 837, 836, 835, 161, 2441, 206, 2653, 2654, 1866, 146, - /* 940 */ 2658, 801, 2244, 1868, 1878, 529, 771, 703, 2428, 275, - /* 950 */ 1896, 1899, 2183, 274, 1413, 1414, 1682, 1685, 1777, 801, - /* 960 */ 2244, 543, 801, 2244, 1838, 1809, 2552, 1807, 2529, 2591, - /* 970 */ 2535, 2537, 437, 115, 2554, 787, 2556, 2557, 782, 544, - /* 980 */ 805, 805, 545, 1509, 2064, 2620, 459, 2645, 451, 450, - /* 990 */ 277, 436, 2641, 2533, 173, 2071, 14, 13, 1508, 1812, - /* 1000 */ 1813, 1865, 2246, 1867, 1870, 1871, 1872, 1873, 1874, 1875, - /* 1010 */ 1876, 1877, 779, 803, 802, 1889, 1891, 1892, 1893, 1894, - /* 1020 */ 2, 47, 45, 2553, 99, 801, 2244, 398, 716, 440, - /* 1030 */ 424, 1808, 689, 1869, 801, 2244, 784, 2730, 2683, 2070, - /* 1040 */ 2535, 2538, 801, 2244, 1895, 625, 1806, 2321, 1823, 2519, - /* 1050 */ 1818, 805, 1966, 2553, 2241, 1776, 801, 2244, 801, 2244, - /* 1060 */ 801, 2244, 278, 691, 2571, 690, 784, 580, 2696, 801, - /* 1070 */ 2244, 200, 801, 2244, 2302, 1890, 286, 2519, 764, 783, - /* 1080 */ 319, 460, 1826, 1828, 2069, 454, 453, 1869, 1814, 798, - /* 1090 */ 2300, 1866, 799, 2519, 2571, 2068, 803, 802, 1889, 1891, - /* 1100 */ 1892, 1893, 1894, 801, 2244, 1938, 462, 2519, 1837, 783, - /* 1110 */ 2067, 2296, 2297, 1833, 173, 901, 801, 2244, 48, 2066, - /* 1120 */ 2460, 2552, 2246, 346, 2591, 2472, 2553, 1838, 115, 2554, - /* 1130 */ 787, 2556, 2557, 782, 2065, 805, 463, 2062, 2519, 784, - /* 1140 */ 2746, 728, 2645, 315, 316, 1866, 436, 2641, 314, 2519, - /* 1150 */ 9, 2552, 2061, 2060, 2591, 2059, 1897, 1898, 115, 2554, - /* 1160 */ 787, 2556, 2557, 782, 2519, 805, 60, 2571, 868, 866, - /* 1170 */ 2746, 2058, 2645, 2519, 714, 750, 436, 2641, 717, 699, - /* 1180 */ 2519, 2726, 783, 645, 644, 2302, 665, 664, 2519, 647, - /* 1190 */ 646, 2519, 2057, 2056, 2055, 1868, 1878, 904, 1817, 2732, - /* 1200 */ 205, 765, 1896, 1899, 2727, 747, 2519, 2519, 767, 2519, - /* 1210 */ 2617, 551, 550, 352, 769, 753, 2617, 1809, 854, 1807, - /* 1220 */ 173, 2054, 300, 359, 2552, 2519, 2279, 2591, 2247, 894, - /* 1230 */ 195, 115, 2554, 787, 2556, 2557, 782, 2473, 805, 890, - /* 1240 */ 886, 882, 878, 2746, 349, 2645, 2519, 2519, 2519, 436, - /* 1250 */ 2641, 1812, 1813, 1865, 694, 1867, 1870, 1871, 1872, 1873, - /* 1260 */ 1874, 1875, 1876, 1877, 779, 803, 802, 1889, 1891, 1892, - /* 1270 */ 1893, 1894, 2, 47, 45, 2519, 96, 2348, 2302, 2302, - /* 1280 */ 162, 440, 838, 1808, 856, 2293, 114, 2079, 896, 322, - /* 1290 */ 717, 2665, 1958, 2726, 796, 2301, 1895, 839, 1806, 2463, - /* 1300 */ 2293, 3, 2240, 141, 77, 2553, 265, 717, 155, 264, - /* 1310 */ 2726, 2732, 205, 53, 155, 87, 2727, 747, 784, 519, - /* 1320 */ 2719, 267, 2125, 797, 266, 702, 657, 1890, 2732, 205, - /* 1330 */ 1965, 658, 1838, 2727, 747, 287, 749, 1866, 269, 724, - /* 1340 */ 1814, 268, 2123, 2114, 670, 2689, 2571, 2112, 49, 734, - /* 1350 */ 1489, 478, 294, 49, 212, 1487, 772, 54, 189, 2519, - /* 1360 */ 88, 783, 2046, 2047, 672, 674, 162, 901, 310, 677, - /* 1370 */ 15, 1820, 394, 393, 64, 309, 2540, 2553, 717, 2572, - /* 1380 */ 101, 2726, 447, 143, 762, 1727, 2179, 1958, 49, 49, - /* 1390 */ 784, 1734, 2664, 2178, 280, 1895, 313, 456, 112, 2732, - /* 1400 */ 205, 14, 13, 2552, 2727, 747, 2591, 109, 1897, 1898, - /* 1410 */ 115, 2554, 787, 2556, 2557, 782, 1989, 805, 2571, 325, - /* 1420 */ 324, 76, 2746, 1816, 2645, 1999, 1890, 2374, 436, 2641, - /* 1430 */ 1998, 2519, 1446, 783, 2095, 292, 2542, 717, 848, 2553, - /* 1440 */ 2726, 731, 2679, 763, 327, 326, 751, 1868, 1878, 2106, - /* 1450 */ 160, 1932, 784, 431, 1896, 1899, 162, 849, 2732, 205, - /* 1460 */ 329, 328, 1465, 2727, 747, 1879, 1680, 331, 330, 1809, - /* 1470 */ 738, 1807, 790, 317, 1447, 2552, 333, 332, 2591, 427, - /* 1480 */ 2571, 1463, 115, 2554, 787, 2556, 2557, 782, 754, 805, - /* 1490 */ 335, 334, 73, 2519, 2746, 783, 2645, 2375, 793, 809, - /* 1500 */ 436, 2641, 892, 1812, 1813, 1865, 469, 1867, 1870, 1871, - /* 1510 */ 1872, 1873, 1874, 1875, 1876, 1877, 779, 803, 802, 1889, - /* 1520 */ 1891, 1892, 1893, 1894, 2, 2553, 1916, 321, 337, 336, - /* 1530 */ 339, 338, 160, 1535, 341, 340, 2101, 2552, 784, 2290, - /* 1540 */ 2591, 343, 342, 710, 115, 2554, 787, 2556, 2557, 782, - /* 1550 */ 2680, 805, 162, 345, 344, 2690, 2618, 759, 2645, 142, - /* 1560 */ 302, 299, 436, 2641, 160, 306, 2571, 2206, 1799, 358, - /* 1570 */ 1775, 5, 472, 477, 407, 485, 1564, 486, 1841, 2519, - /* 1580 */ 496, 783, 497, 214, 213, 499, 216, 1704, 353, 513, - /* 1590 */ 1831, 1832, 520, 227, 522, 526, 1819, 2553, 528, 569, - /* 1600 */ 449, 448, 1800, 546, 533, 557, 2367, 565, 559, 1572, - /* 1610 */ 784, 568, 570, 581, 582, 233, 803, 802, 1889, 1891, - /* 1620 */ 1892, 1893, 1894, 2552, 232, 579, 2591, 2553, 584, 1579, - /* 1630 */ 115, 2554, 787, 2556, 2557, 782, 1577, 805, 2571, 585, - /* 1640 */ 784, 165, 768, 1839, 2645, 235, 587, 589, 436, 2641, - /* 1650 */ 4, 2519, 604, 783, 615, 605, 612, 613, 2553, 1834, - /* 1660 */ 243, 93, 617, 1840, 246, 1842, 618, 1843, 2571, 621, - /* 1670 */ 619, 784, 2383, 627, 249, 251, 648, 94, 95, 2450, - /* 1680 */ 256, 2519, 650, 783, 693, 2234, 2447, 118, 98, 385, - /* 1690 */ 680, 2446, 695, 156, 681, 2552, 1835, 354, 2591, 2571, - /* 1700 */ 2429, 705, 116, 2554, 787, 2556, 2557, 782, 706, 805, - /* 1710 */ 260, 2230, 2519, 262, 783, 279, 2645, 704, 168, 169, - /* 1720 */ 2644, 2641, 709, 2232, 284, 2552, 2228, 712, 2591, 735, - /* 1730 */ 170, 171, 116, 2554, 787, 2556, 2557, 782, 2695, 805, - /* 1740 */ 791, 2694, 711, 744, 2553, 289, 2645, 721, 282, 2667, - /* 1750 */ 770, 2641, 291, 8, 293, 180, 785, 781, 295, 2591, - /* 1760 */ 296, 722, 720, 116, 2554, 787, 2556, 2557, 782, 719, - /* 1770 */ 805, 2553, 755, 432, 298, 2725, 2749, 2645, 752, 301, - /* 1780 */ 1958, 400, 2641, 147, 784, 2571, 1836, 1963, 1961, 61, - /* 1790 */ 2553, 192, 308, 157, 355, 789, 2661, 2397, 2519, 2396, - /* 1800 */ 783, 1, 2395, 784, 297, 356, 442, 794, 795, 357, - /* 1810 */ 159, 106, 2571, 2245, 2511, 108, 2510, 2506, 2505, 2497, - /* 1820 */ 2626, 2496, 348, 2488, 1367, 2519, 898, 783, 895, 360, - /* 1830 */ 2487, 2571, 208, 2503, 2502, 2494, 2493, 2482, 166, 2481, - /* 1840 */ 807, 2500, 2552, 2499, 2519, 2591, 783, 900, 2491, 381, - /* 1850 */ 2554, 787, 2556, 2557, 782, 780, 805, 766, 2610, 364, - /* 1860 */ 2490, 2479, 2478, 362, 372, 383, 2476, 2475, 2294, 2552, - /* 1870 */ 52, 2553, 2591, 373, 405, 406, 177, 2554, 787, 2556, - /* 1880 */ 2557, 782, 2471, 805, 784, 2470, 2469, 384, 2552, 82, - /* 1890 */ 2464, 2591, 474, 475, 1759, 178, 2554, 787, 2556, 2557, - /* 1900 */ 782, 1760, 805, 211, 479, 2462, 481, 2553, 482, 1758, - /* 1910 */ 483, 2461, 2571, 2459, 408, 488, 2458, 490, 718, 2686, - /* 1920 */ 784, 492, 2456, 1747, 494, 2519, 2457, 783, 2433, 215, - /* 1930 */ 2553, 2432, 217, 1707, 83, 1706, 2410, 2409, 2408, 506, - /* 1940 */ 507, 2407, 2406, 784, 2357, 511, 1650, 2354, 2571, 748, - /* 1950 */ 2747, 514, 2353, 2347, 517, 518, 2344, 220, 2343, 2342, - /* 1960 */ 86, 2519, 2341, 783, 2346, 2345, 2340, 222, 2339, 2552, - /* 1970 */ 2337, 2571, 2591, 2336, 2335, 224, 116, 2554, 787, 2556, - /* 1980 */ 2557, 782, 534, 805, 2519, 2334, 783, 536, 2332, 2553, - /* 1990 */ 2645, 2331, 2330, 2329, 2328, 2642, 2352, 2327, 2326, 2325, - /* 2000 */ 2350, 2333, 784, 2324, 2323, 2552, 429, 572, 2591, 2322, - /* 2010 */ 2553, 2320, 177, 2554, 787, 2556, 2557, 782, 2319, 805, - /* 2020 */ 2318, 2317, 2316, 784, 2315, 226, 2314, 92, 2552, 2313, - /* 2030 */ 2571, 2591, 2312, 2311, 2310, 382, 2554, 787, 2556, 2557, - /* 2040 */ 782, 1656, 805, 2519, 2351, 783, 2349, 2309, 2308, 2307, - /* 2050 */ 231, 2571, 2306, 2305, 574, 2687, 2304, 2303, 1506, 1510, - /* 2060 */ 396, 2144, 397, 2143, 2519, 430, 783, 1502, 234, 2553, - /* 2070 */ 592, 236, 2142, 2140, 237, 2137, 590, 591, 2136, 594, - /* 2080 */ 596, 2129, 784, 595, 2116, 600, 2090, 2552, 598, 2089, - /* 2090 */ 2591, 602, 599, 1391, 382, 2554, 787, 2556, 2557, 782, - /* 2100 */ 239, 805, 79, 2431, 187, 241, 2427, 2539, 2552, 80, - /* 2110 */ 2571, 2591, 2417, 197, 610, 375, 2554, 787, 2556, 2557, - /* 2120 */ 782, 2405, 805, 2519, 248, 783, 250, 2404, 2381, 253, - /* 2130 */ 2553, 2223, 1439, 2139, 2135, 628, 630, 629, 2133, 632, - /* 2140 */ 633, 634, 2131, 781, 636, 637, 638, 2553, 2128, 641, - /* 2150 */ 640, 642, 2111, 2109, 2110, 2108, 2086, 2225, 1583, 1584, - /* 2160 */ 784, 743, 72, 2224, 2126, 259, 1491, 2552, 1492, 1490, - /* 2170 */ 2591, 2571, 1488, 865, 178, 2554, 787, 2556, 2557, 782, - /* 2180 */ 1486, 805, 1485, 2124, 2519, 2115, 783, 1484, 2571, 1477, - /* 2190 */ 2113, 420, 421, 2553, 867, 1483, 1482, 1479, 422, 1478, - /* 2200 */ 423, 2519, 2085, 783, 2084, 1476, 784, 119, 678, 2083, - /* 2210 */ 682, 2082, 684, 2081, 686, 1745, 1741, 1743, 1740, 675, - /* 2220 */ 28, 2430, 1731, 439, 67, 2426, 281, 1715, 2552, 2748, - /* 2230 */ 697, 2591, 2141, 1713, 2571, 381, 2554, 787, 2556, 2557, - /* 2240 */ 782, 2416, 805, 2403, 2611, 2552, 707, 2519, 2591, 783, - /* 2250 */ 1717, 2402, 382, 2554, 787, 2556, 2557, 782, 30, 805, - /* 2260 */ 285, 2731, 56, 713, 57, 708, 17, 20, 723, 441, - /* 2270 */ 6, 1692, 428, 7, 23, 1691, 2016, 172, 21, 22, - /* 2280 */ 191, 288, 2553, 32, 1990, 715, 202, 2540, 65, 727, - /* 2290 */ 24, 2552, 58, 725, 2591, 784, 729, 179, 382, 2554, - /* 2300 */ 787, 2556, 2557, 782, 290, 805, 669, 668, 667, 1997, - /* 2310 */ 190, 2031, 31, 659, 145, 663, 1984, 81, 2030, 662, - /* 2320 */ 2036, 433, 2037, 2571, 661, 666, 419, 418, 2035, 2034, - /* 2330 */ 660, 434, 1955, 656, 655, 258, 2519, 1954, 783, 304, - /* 2340 */ 59, 2553, 182, 2401, 2380, 102, 103, 25, 13, 1907, - /* 2350 */ 1824, 1906, 181, 1858, 784, 183, 1917, 11, 1882, 1881, - /* 2360 */ 193, 643, 639, 635, 631, 816, 257, 2379, 2553, 819, - /* 2370 */ 822, 825, 38, 323, 1880, 16, 18, 26, 792, 1850, - /* 2380 */ 692, 784, 2571, 2591, 786, 27, 194, 377, 2554, 787, - /* 2390 */ 2556, 2557, 782, 312, 805, 2519, 1992, 783, 318, 104, - /* 2400 */ 109, 808, 2553, 458, 69, 320, 105, 2596, 97, 2571, - /* 2410 */ 2595, 255, 1884, 1565, 804, 784, 812, 68, 806, 810, - /* 2420 */ 815, 813, 2519, 1562, 783, 1561, 1558, 818, 1552, 821, - /* 2430 */ 1550, 2553, 824, 347, 1578, 110, 111, 1574, 1541, 2552, - /* 2440 */ 841, 1556, 2591, 2571, 784, 78, 367, 2554, 787, 2556, - /* 2450 */ 2557, 782, 831, 805, 1555, 1554, 2519, 1553, 783, 1437, - /* 2460 */ 1473, 1472, 1469, 1468, 1467, 1466, 2552, 1464, 1462, 2591, - /* 2470 */ 1461, 1460, 2571, 366, 2554, 787, 2556, 2557, 782, 2553, - /* 2480 */ 805, 245, 1500, 853, 1499, 2519, 209, 783, 855, 1458, - /* 2490 */ 254, 247, 784, 1457, 1456, 1455, 1454, 252, 620, 1453, - /* 2500 */ 2552, 1452, 1496, 2591, 1494, 2553, 1449, 368, 2554, 787, - /* 2510 */ 2556, 2557, 782, 1448, 805, 1445, 244, 1444, 784, 1443, - /* 2520 */ 2571, 1442, 2134, 875, 876, 877, 2132, 879, 2130, 2552, - /* 2530 */ 881, 880, 2591, 2519, 884, 783, 374, 2554, 787, 2556, - /* 2540 */ 2557, 782, 883, 805, 885, 2127, 2571, 887, 888, 889, - /* 2550 */ 2107, 891, 2105, 893, 1380, 2080, 1368, 897, 351, 2519, - /* 2560 */ 899, 783, 1810, 361, 902, 2050, 903, 2050, 2553, 2050, - /* 2570 */ 2050, 2050, 2050, 2050, 2050, 2050, 2050, 2552, 2050, 2050, - /* 2580 */ 2591, 784, 2050, 2050, 378, 2554, 787, 2556, 2557, 782, - /* 2590 */ 2050, 805, 2050, 2050, 2553, 2050, 2050, 2050, 2050, 2050, - /* 2600 */ 2050, 2050, 2050, 2552, 2050, 2050, 2591, 784, 2050, 2571, - /* 2610 */ 369, 2554, 787, 2556, 2557, 782, 2553, 805, 2050, 2050, - /* 2620 */ 2050, 2050, 2519, 2050, 783, 2050, 2050, 2050, 2050, 784, - /* 2630 */ 2050, 2050, 2050, 2050, 2050, 2571, 2050, 2050, 2050, 2050, - /* 2640 */ 2050, 2050, 2050, 2050, 2050, 2050, 2050, 2050, 2519, 2050, - /* 2650 */ 783, 2050, 2050, 2050, 2050, 2050, 2050, 2571, 2050, 2050, - /* 2660 */ 2050, 2050, 2050, 2050, 2050, 2050, 2552, 2050, 2050, 2591, - /* 2670 */ 2519, 2050, 783, 379, 2554, 787, 2556, 2557, 782, 2050, - /* 2680 */ 805, 2050, 2050, 2050, 2050, 2050, 2050, 2050, 2050, 2050, - /* 2690 */ 2050, 2050, 2552, 2050, 2050, 2591, 2553, 2050, 2050, 370, - /* 2700 */ 2554, 787, 2556, 2557, 782, 2050, 805, 2050, 2050, 784, - /* 2710 */ 2050, 2050, 2050, 2050, 2552, 2050, 2553, 2591, 2050, 2050, - /* 2720 */ 2050, 380, 2554, 787, 2556, 2557, 782, 2050, 805, 784, - /* 2730 */ 2050, 2050, 2050, 2050, 2050, 2050, 2050, 2571, 2050, 2050, - /* 2740 */ 2050, 2050, 2553, 2050, 2050, 2050, 2050, 2050, 2050, 2050, - /* 2750 */ 2519, 2050, 783, 2050, 2050, 784, 2050, 2571, 2050, 2050, - /* 2760 */ 2050, 2050, 2050, 2050, 2050, 2050, 2050, 2050, 2050, 2050, - /* 2770 */ 2519, 2050, 783, 2050, 2050, 2050, 2050, 2553, 2050, 2050, - /* 2780 */ 2050, 2050, 2050, 2571, 2050, 2050, 2050, 2050, 2050, 2050, - /* 2790 */ 784, 2050, 2050, 2050, 2552, 2050, 2519, 2591, 783, 2050, - /* 2800 */ 2050, 371, 2554, 787, 2556, 2557, 782, 2050, 805, 2050, - /* 2810 */ 2050, 2050, 2050, 2050, 2552, 2050, 2050, 2591, 2571, 2050, - /* 2820 */ 2050, 386, 2554, 787, 2556, 2557, 782, 2050, 805, 2050, - /* 2830 */ 2050, 2519, 2050, 783, 2050, 2050, 2050, 2050, 2050, 2050, - /* 2840 */ 2552, 2050, 2050, 2591, 2050, 2050, 2050, 387, 2554, 787, - /* 2850 */ 2556, 2557, 782, 2553, 805, 2050, 2050, 2050, 2050, 2050, - /* 2860 */ 2050, 2050, 2050, 2050, 2050, 2050, 784, 2050, 2050, 2050, - /* 2870 */ 2050, 2050, 2050, 2050, 2050, 2552, 2050, 2050, 2591, 2050, - /* 2880 */ 2553, 2050, 2565, 2554, 787, 2556, 2557, 782, 2050, 805, - /* 2890 */ 2050, 2050, 2050, 784, 2571, 2050, 2050, 2050, 2050, 2553, - /* 2900 */ 2050, 2050, 2050, 2050, 2050, 2050, 2050, 2519, 2050, 783, - /* 2910 */ 2050, 2050, 784, 2050, 2050, 2050, 2050, 2050, 2050, 2050, - /* 2920 */ 2050, 2571, 2050, 2050, 2050, 2050, 2050, 2050, 2050, 2050, - /* 2930 */ 2050, 2050, 2050, 2050, 2519, 2050, 783, 2050, 2050, 2553, - /* 2940 */ 2571, 2050, 2050, 2050, 2050, 2050, 2050, 2050, 2050, 2050, - /* 2950 */ 2050, 2552, 784, 2519, 2591, 783, 2050, 2050, 2564, 2554, - /* 2960 */ 787, 2556, 2557, 782, 2050, 805, 2050, 2050, 2050, 2553, - /* 2970 */ 2050, 2050, 2050, 2050, 2050, 2050, 2050, 2050, 2552, 2050, - /* 2980 */ 2571, 2591, 784, 2050, 2050, 2563, 2554, 787, 2556, 2557, - /* 2990 */ 782, 2050, 805, 2519, 2050, 783, 2050, 2552, 2050, 2050, - /* 3000 */ 2591, 2050, 2050, 2050, 402, 2554, 787, 2556, 2557, 782, - /* 3010 */ 2571, 805, 2050, 2050, 2050, 2050, 2050, 2050, 2050, 2050, - /* 3020 */ 2050, 2050, 2050, 2519, 2050, 783, 2050, 2050, 2553, 2050, - /* 3030 */ 2050, 2050, 2050, 2050, 2050, 2050, 2050, 2552, 2050, 2050, - /* 3040 */ 2591, 784, 2050, 2050, 403, 2554, 787, 2556, 2557, 782, - /* 3050 */ 2050, 805, 2050, 2050, 2050, 2050, 2050, 2050, 2553, 2050, - /* 3060 */ 2050, 2050, 2050, 2050, 2050, 2050, 2050, 2552, 2050, 2571, - /* 3070 */ 2591, 784, 2050, 2050, 399, 2554, 787, 2556, 2557, 782, - /* 3080 */ 2050, 805, 2519, 2050, 783, 2050, 2050, 2553, 2050, 2050, - /* 3090 */ 2050, 2050, 2050, 2050, 2050, 2050, 2050, 2050, 2050, 2571, - /* 3100 */ 784, 2050, 2050, 2050, 2050, 2050, 2050, 2050, 2050, 2050, - /* 3110 */ 2050, 2050, 2519, 2050, 783, 2050, 2050, 2050, 2050, 2050, - /* 3120 */ 2050, 2050, 2050, 2050, 2050, 2050, 2552, 2050, 2571, 2591, - /* 3130 */ 2050, 2050, 2050, 404, 2554, 787, 2556, 2557, 782, 2050, - /* 3140 */ 805, 2519, 2050, 783, 2050, 2050, 2050, 2050, 2050, 2050, - /* 3150 */ 2050, 2050, 2050, 2050, 2050, 2050, 785, 2050, 2050, 2591, - /* 3160 */ 2050, 2050, 2050, 377, 2554, 787, 2556, 2557, 782, 2050, - /* 3170 */ 805, 2050, 2050, 2050, 2050, 2050, 2050, 2050, 2050, 2050, - /* 3180 */ 2050, 2050, 2050, 2050, 2050, 2552, 2050, 2050, 2591, 2050, - /* 3190 */ 2050, 2050, 376, 2554, 787, 2556, 2557, 782, 2050, 805, + /* 0 */ 2543, 838, 515, 459, 752, 2097, 2762, 2757, 780, 2757, + /* 10 */ 2761, 2584, 47, 45, 1992, 2075, 779, 241, 807, 2275, + /* 20 */ 442, 614, 1831, 2125, 790, 751, 205, 176, 2761, 2086, + /* 30 */ 2758, 753, 2758, 2760, 2266, 1918, 129, 1829, 210, 128, + /* 40 */ 127, 126, 125, 124, 123, 122, 121, 120, 576, 574, + /* 50 */ 1516, 392, 2602, 2544, 186, 219, 40, 39, 448, 2550, + /* 60 */ 46, 44, 43, 42, 41, 2550, 1913, 789, 1860, 811, + /* 70 */ 40, 39, 1856, 19, 46, 44, 43, 42, 41, 2401, + /* 80 */ 1837, 2161, 616, 46, 44, 43, 42, 41, 613, 747, + /* 90 */ 40, 39, 448, 1518, 46, 44, 43, 42, 41, 1856, + /* 100 */ 40, 39, 107, 811, 46, 44, 43, 42, 41, 2583, + /* 110 */ 909, 448, 2622, 15, 468, 467, 115, 2585, 793, 2587, + /* 120 */ 2588, 788, 811, 811, 608, 29, 150, 2268, 158, 2647, + /* 130 */ 2676, 14, 13, 606, 438, 2672, 602, 598, 129, 1838, + /* 140 */ 62, 128, 127, 126, 125, 124, 123, 122, 121, 120, + /* 150 */ 51, 1920, 1921, 225, 806, 402, 882, 881, 880, 879, + /* 160 */ 471, 706, 878, 877, 153, 872, 871, 870, 869, 868, + /* 170 */ 867, 866, 152, 860, 859, 858, 470, 469, 855, 854, + /* 180 */ 853, 185, 184, 852, 466, 851, 850, 849, 40, 39, + /* 190 */ 1891, 1901, 46, 44, 43, 42, 41, 1919, 1922, 91, + /* 200 */ 631, 1574, 90, 1947, 37, 312, 2037, 243, 764, 148, + /* 210 */ 62, 614, 1832, 2125, 1830, 703, 454, 1565, 836, 835, + /* 220 */ 834, 1569, 833, 1571, 1572, 832, 829, 112, 1580, 826, + /* 230 */ 1582, 1583, 823, 820, 817, 611, 109, 806, 612, 2117, + /* 240 */ 201, 1856, 1686, 1687, 1961, 658, 1835, 1836, 1888, 657, + /* 250 */ 1890, 1893, 1894, 1895, 1896, 1897, 1898, 1899, 1900, 785, + /* 260 */ 809, 808, 1912, 1914, 1915, 1916, 1917, 2, 47, 45, + /* 270 */ 2420, 1948, 89, 390, 2074, 1854, 442, 619, 1831, 2584, + /* 280 */ 612, 2117, 559, 463, 627, 579, 2326, 2328, 2418, 794, + /* 290 */ 578, 1918, 767, 1829, 2036, 1425, 1861, 1424, 138, 137, + /* 300 */ 136, 135, 134, 133, 132, 131, 130, 538, 506, 580, + /* 310 */ 505, 308, 144, 755, 391, 540, 1841, 1888, 2072, 1857, + /* 320 */ 2602, 308, 1913, 204, 2684, 2685, 518, 146, 2689, 19, + /* 330 */ 50, 1426, 848, 2550, 62, 789, 1837, 628, 40, 39, + /* 340 */ 504, 704, 46, 44, 43, 42, 41, 764, 148, 66, + /* 350 */ 524, 2396, 198, 36, 440, 1942, 1943, 1944, 1945, 1946, + /* 360 */ 1950, 1951, 1952, 1953, 492, 2320, 909, 413, 707, 15, + /* 370 */ 846, 164, 163, 843, 842, 841, 161, 2583, 526, 2762, + /* 380 */ 2622, 308, 2757, 2352, 115, 2585, 793, 2587, 2588, 788, + /* 390 */ 12, 811, 2252, 1800, 629, 2413, 188, 2251, 2676, 474, + /* 400 */ 221, 2761, 438, 2672, 473, 2758, 2759, 1920, 1921, 865, + /* 410 */ 2407, 2386, 2236, 567, 566, 565, 564, 563, 558, 557, + /* 420 */ 556, 555, 396, 453, 452, 2707, 545, 544, 543, 542, + /* 430 */ 541, 535, 534, 533, 175, 528, 527, 411, 2025, 366, + /* 440 */ 839, 519, 1674, 1675, 621, 2459, 1891, 1901, 1693, 1860, + /* 450 */ 1706, 1707, 723, 1919, 1922, 2757, 364, 75, 62, 756, + /* 460 */ 74, 766, 203, 2684, 2685, 722, 146, 2689, 1832, 848, + /* 470 */ 1830, 393, 351, 2763, 205, 418, 417, 1856, 2758, 753, + /* 480 */ 2420, 530, 2396, 239, 593, 591, 588, 586, 739, 738, + /* 490 */ 2023, 2024, 2026, 2027, 2028, 445, 1705, 1708, 2417, 794, + /* 500 */ 496, 308, 1835, 1836, 1888, 308, 1890, 1893, 1894, 1895, + /* 510 */ 1896, 1897, 1898, 1899, 1900, 785, 809, 808, 1912, 1914, + /* 520 */ 1915, 1916, 1917, 2, 12, 47, 45, 498, 494, 62, + /* 530 */ 1831, 223, 186, 442, 2067, 1831, 846, 164, 163, 843, + /* 540 */ 842, 841, 161, 1574, 1837, 1829, 561, 2396, 1918, 457, + /* 550 */ 1829, 554, 553, 416, 415, 412, 656, 2400, 1405, 1565, + /* 560 */ 836, 835, 834, 1569, 833, 1571, 1572, 784, 783, 63, + /* 570 */ 1580, 782, 1582, 1583, 781, 820, 817, 174, 2584, 1913, + /* 580 */ 658, 1574, 1403, 1404, 657, 2210, 19, 508, 1837, 702, + /* 590 */ 1949, 767, 507, 1837, 2264, 2503, 228, 1565, 836, 835, + /* 600 */ 834, 1569, 833, 1571, 1572, 832, 829, 60, 1580, 826, + /* 610 */ 1582, 1583, 823, 820, 817, 720, 807, 2275, 909, 2602, + /* 620 */ 85, 84, 511, 909, 806, 218, 15, 2369, 12, 308, + /* 630 */ 10, 276, 2550, 702, 789, 275, 55, 2584, 503, 501, + /* 640 */ 723, 2066, 2260, 2757, 427, 2467, 2560, 1892, 723, 389, + /* 650 */ 787, 2757, 490, 807, 2275, 487, 483, 479, 476, 504, + /* 660 */ 2262, 2763, 205, 707, 1920, 1921, 2758, 753, 746, 2763, + /* 670 */ 205, 2564, 34, 139, 2758, 753, 2583, 1861, 2602, 2622, + /* 680 */ 654, 2691, 1954, 115, 2585, 793, 2587, 2588, 788, 2468, + /* 690 */ 811, 2550, 773, 789, 2648, 188, 2602, 2676, 395, 394, + /* 700 */ 308, 438, 2672, 1891, 1901, 1889, 99, 2688, 449, 399, + /* 710 */ 1919, 1922, 426, 693, 695, 277, 207, 50, 2566, 2569, + /* 720 */ 1832, 1918, 1830, 458, 2706, 1832, 1799, 1830, 691, 811, + /* 730 */ 689, 273, 272, 1857, 757, 2583, 764, 148, 2622, 709, + /* 740 */ 2459, 3, 382, 2585, 793, 2587, 2588, 788, 786, 811, + /* 750 */ 772, 2641, 1913, 53, 1835, 1836, 456, 455, 862, 1835, + /* 760 */ 1836, 1888, 745, 1890, 1893, 1894, 1895, 1896, 1897, 1898, + /* 770 */ 1899, 1900, 785, 809, 808, 1912, 1914, 1915, 1916, 1917, + /* 780 */ 2, 47, 45, 1923, 2017, 2584, 2096, 2258, 682, 442, + /* 790 */ 1398, 1831, 43, 42, 41, 1759, 1760, 552, 790, 2018, + /* 800 */ 2127, 33, 551, 694, 1918, 2584, 1829, 40, 39, 1405, + /* 810 */ 550, 46, 44, 43, 42, 41, 2095, 35, 790, 274, + /* 820 */ 2714, 96, 2691, 40, 39, 864, 2602, 46, 44, 43, + /* 830 */ 42, 41, 1400, 1403, 1404, 1913, 685, 2691, 414, 2550, + /* 840 */ 2550, 789, 2016, 679, 677, 2211, 2602, 2270, 2687, 1837, + /* 850 */ 271, 206, 2684, 2685, 2762, 146, 2689, 807, 2275, 2550, + /* 860 */ 2472, 789, 2250, 2686, 1613, 1614, 2327, 2328, 40, 39, + /* 870 */ 2550, 1859, 46, 44, 43, 42, 41, 139, 1989, 909, + /* 880 */ 650, 649, 48, 2583, 659, 2094, 2622, 807, 2275, 284, + /* 890 */ 115, 2585, 793, 2587, 2588, 788, 71, 811, 1822, 70, + /* 900 */ 1798, 113, 2777, 2583, 2676, 2504, 2622, 512, 438, 2672, + /* 910 */ 115, 2585, 793, 2587, 2588, 788, 278, 811, 151, 446, + /* 920 */ 1920, 1921, 2777, 199, 2676, 1528, 2267, 173, 438, 2672, + /* 930 */ 451, 450, 1823, 807, 2275, 2277, 2720, 40, 39, 2550, + /* 940 */ 1527, 46, 44, 43, 42, 41, 809, 808, 1912, 1914, + /* 950 */ 1915, 1916, 1917, 513, 764, 148, 1996, 742, 723, 1891, + /* 960 */ 1901, 2757, 1856, 2087, 1860, 2060, 1919, 1922, 301, 675, + /* 970 */ 674, 673, 149, 570, 2008, 2647, 665, 145, 669, 2763, + /* 980 */ 205, 1832, 668, 1830, 2758, 753, 461, 667, 672, 421, + /* 990 */ 420, 652, 651, 666, 167, 1428, 1429, 419, 662, 661, + /* 1000 */ 660, 1859, 2277, 1856, 2093, 2584, 846, 164, 163, 843, + /* 1010 */ 842, 841, 161, 581, 2560, 1835, 1836, 1888, 790, 1890, + /* 1020 */ 1893, 1894, 1895, 1896, 1897, 1898, 1899, 1900, 785, 809, + /* 1030 */ 808, 1912, 1914, 1915, 1916, 1917, 2, 47, 45, 2564, + /* 1040 */ 461, 230, 2584, 306, 740, 442, 2602, 1831, 173, 428, + /* 1050 */ 2467, 748, 743, 736, 732, 790, 2277, 2727, 2550, 2550, + /* 1060 */ 1918, 789, 1829, 2333, 807, 2275, 1928, 569, 229, 304, + /* 1070 */ 2684, 763, 1856, 140, 762, 840, 2757, 2584, 2324, 771, + /* 1080 */ 2092, 807, 2275, 2602, 532, 1860, 2566, 2568, 439, 295, + /* 1090 */ 790, 1913, 734, 96, 751, 205, 2550, 811, 789, 2758, + /* 1100 */ 753, 546, 759, 2583, 2091, 1837, 2622, 807, 2275, 2333, + /* 1110 */ 115, 2585, 793, 2587, 2588, 788, 410, 811, 2602, 2271, + /* 1120 */ 2090, 117, 2651, 2333, 2676, 2331, 1532, 547, 438, 2672, + /* 1130 */ 437, 2550, 1892, 789, 2550, 909, 196, 2089, 48, 2331, + /* 1140 */ 2583, 1531, 9, 2622, 807, 2275, 2333, 115, 2585, 793, + /* 1150 */ 2587, 2588, 788, 447, 811, 141, 2333, 2584, 2550, 2777, + /* 1160 */ 1988, 2676, 2331, 462, 548, 438, 2672, 87, 807, 2275, + /* 1170 */ 790, 700, 2331, 306, 2550, 2583, 1920, 1921, 2622, 143, + /* 1180 */ 671, 670, 115, 2585, 793, 2587, 2588, 788, 630, 811, + /* 1190 */ 1889, 2550, 1861, 2088, 2777, 775, 2676, 2648, 2602, 752, + /* 1200 */ 438, 2672, 2757, 876, 874, 316, 317, 100, 807, 2275, + /* 1210 */ 315, 2550, 1407, 789, 583, 1891, 1901, 1425, 1855, 1424, + /* 1220 */ 751, 205, 1919, 1922, 723, 2758, 753, 2757, 2272, 807, + /* 1230 */ 2275, 1889, 807, 2275, 807, 2275, 173, 1832, 1734, 1830, + /* 1240 */ 807, 2275, 1892, 2085, 2278, 2763, 205, 2550, 2491, 279, + /* 1250 */ 2758, 753, 287, 1426, 770, 2583, 844, 200, 2622, 2324, + /* 1260 */ 320, 2584, 177, 2585, 793, 2587, 2588, 788, 697, 811, + /* 1270 */ 696, 1835, 1836, 1888, 790, 1890, 1893, 1894, 1895, 1896, + /* 1280 */ 1897, 1898, 1899, 1900, 785, 809, 808, 1912, 1914, 1915, + /* 1290 */ 1916, 1917, 2, 47, 45, 2584, 2084, 2550, 464, 2253, + /* 1300 */ 1889, 442, 2602, 1831, 724, 2717, 173, 162, 790, 77, + /* 1310 */ 2750, 807, 2275, 1861, 2277, 2550, 1918, 789, 1829, 2333, + /* 1320 */ 807, 2275, 2083, 807, 2275, 807, 2275, 2082, 2081, 2102, + /* 1330 */ 904, 804, 154, 2584, 845, 802, 2602, 2324, 2696, 1981, + /* 1340 */ 805, 2333, 708, 347, 2379, 465, 790, 1913, 2695, 2550, + /* 1350 */ 2550, 789, 2080, 360, 2079, 2078, 2310, 2332, 2603, 2583, + /* 1360 */ 2203, 1837, 2622, 2494, 2202, 88, 115, 2585, 793, 2587, + /* 1370 */ 2588, 788, 2077, 811, 2602, 663, 2550, 2405, 2649, 760, + /* 1380 */ 2676, 2550, 2550, 1981, 438, 2672, 522, 2550, 54, 789, + /* 1390 */ 2118, 909, 1511, 2583, 15, 723, 2622, 288, 2757, 1509, + /* 1400 */ 115, 2585, 793, 2587, 2588, 788, 2550, 811, 2550, 2550, + /* 1410 */ 768, 778, 2777, 664, 2676, 481, 2763, 205, 438, 2672, + /* 1420 */ 264, 2758, 753, 262, 266, 268, 2550, 265, 267, 2148, + /* 1430 */ 155, 2583, 1920, 1921, 2622, 1512, 155, 1507, 115, 2585, + /* 1440 */ 793, 2587, 2588, 788, 270, 811, 101, 269, 2146, 730, + /* 1450 */ 2777, 676, 2676, 2069, 2070, 2571, 438, 2672, 468, 467, + /* 1460 */ 2137, 1840, 2584, 723, 14, 13, 2757, 1839, 1845, 2135, + /* 1470 */ 678, 1891, 1901, 49, 49, 790, 189, 162, 1919, 1922, + /* 1480 */ 64, 1918, 680, 1838, 2763, 205, 212, 326, 325, 2758, + /* 1490 */ 753, 683, 49, 1832, 49, 1830, 2710, 314, 737, 76, + /* 1500 */ 328, 327, 433, 2602, 330, 329, 160, 332, 331, 744, + /* 1510 */ 162, 1750, 1913, 2164, 334, 333, 2550, 1757, 789, 2573, + /* 1520 */ 336, 335, 73, 338, 337, 429, 1837, 1835, 1836, 1888, + /* 1530 */ 2012, 1890, 1893, 1894, 1895, 1896, 1897, 1898, 1899, 1900, + /* 1540 */ 785, 809, 808, 1912, 1914, 1915, 1916, 1917, 2, 340, + /* 1550 */ 339, 342, 341, 815, 2022, 2021, 777, 293, 769, 1489, + /* 1560 */ 2583, 1955, 160, 2622, 344, 343, 162, 115, 2585, 793, + /* 1570 */ 2587, 2588, 788, 1902, 811, 1703, 346, 345, 318, 774, + /* 1580 */ 799, 2676, 142, 160, 1939, 438, 2672, 322, 675, 674, + /* 1590 */ 673, 1558, 1462, 2129, 796, 665, 145, 669, 856, 857, + /* 1600 */ 472, 668, 1490, 359, 2406, 2124, 667, 672, 421, 420, + /* 1610 */ 2321, 716, 666, 2711, 2721, 765, 419, 662, 661, 660, + /* 1620 */ 303, 300, 1481, 1479, 307, 259, 2237, 2584, 5, 475, + /* 1630 */ 480, 408, 489, 488, 1587, 1463, 1864, 499, 1843, 500, + /* 1640 */ 790, 214, 181, 1595, 1842, 502, 900, 1602, 213, 216, + /* 1650 */ 354, 648, 644, 640, 636, 1727, 258, 1854, 1846, 2584, + /* 1660 */ 1841, 516, 1855, 1600, 165, 523, 227, 525, 2602, 529, + /* 1670 */ 531, 572, 790, 549, 536, 560, 568, 2398, 562, 571, + /* 1680 */ 584, 2550, 573, 789, 582, 585, 1862, 232, 233, 587, + /* 1690 */ 589, 590, 1849, 1851, 236, 592, 594, 609, 4, 610, + /* 1700 */ 2602, 620, 97, 617, 618, 256, 809, 808, 1912, 1914, + /* 1710 */ 1915, 1916, 1917, 2550, 1857, 789, 1863, 1865, 244, 623, + /* 1720 */ 93, 247, 622, 624, 626, 2583, 1866, 2414, 2622, 250, + /* 1730 */ 632, 653, 116, 2585, 793, 2587, 2588, 788, 252, 811, + /* 1740 */ 2584, 686, 94, 95, 257, 655, 2676, 687, 2265, 118, + /* 1750 */ 2675, 2672, 261, 790, 2261, 263, 168, 2583, 386, 699, + /* 1760 */ 2622, 280, 98, 156, 116, 2585, 793, 2587, 2588, 788, + /* 1770 */ 169, 811, 2263, 2584, 2259, 246, 170, 171, 2676, 2481, + /* 1780 */ 701, 2602, 776, 2672, 255, 248, 790, 1858, 2478, 711, + /* 1790 */ 2460, 253, 625, 2477, 2550, 285, 789, 715, 710, 2584, + /* 1800 */ 718, 727, 355, 712, 741, 283, 797, 8, 750, 717, + /* 1810 */ 245, 728, 790, 725, 2602, 290, 294, 2726, 292, 726, + /* 1820 */ 2725, 297, 180, 761, 2698, 758, 296, 2550, 298, 789, + /* 1830 */ 299, 434, 2780, 147, 1981, 1859, 2692, 1986, 791, 1984, + /* 1840 */ 2602, 2622, 309, 2756, 192, 116, 2585, 793, 2587, 2588, + /* 1850 */ 788, 157, 811, 2550, 61, 789, 356, 302, 795, 2676, + /* 1860 */ 800, 1, 357, 401, 2672, 801, 108, 2657, 2428, 2427, + /* 1870 */ 2426, 2583, 444, 358, 2622, 159, 705, 106, 178, 2585, + /* 1880 */ 793, 2587, 2588, 788, 208, 811, 903, 2542, 2276, 2541, + /* 1890 */ 813, 2537, 1382, 2536, 912, 2528, 908, 2583, 2527, 2584, + /* 1900 */ 2622, 349, 2519, 2518, 116, 2585, 793, 2587, 2588, 788, + /* 1910 */ 353, 811, 790, 2534, 906, 2533, 2525, 2524, 2676, 2513, + /* 1920 */ 2512, 361, 2584, 2673, 2531, 52, 902, 195, 406, 166, + /* 1930 */ 363, 365, 754, 2778, 82, 790, 898, 894, 890, 886, + /* 1940 */ 2602, 350, 2530, 2522, 2502, 2584, 2521, 2501, 373, 2510, + /* 1950 */ 2509, 2507, 2500, 2550, 2506, 789, 384, 2325, 790, 385, + /* 1960 */ 374, 2495, 477, 2602, 478, 1782, 1783, 211, 482, 2493, + /* 1970 */ 484, 486, 485, 1781, 407, 2492, 2550, 409, 789, 2490, + /* 1980 */ 491, 2489, 493, 2488, 495, 2487, 2602, 114, 497, 1770, + /* 1990 */ 323, 2464, 215, 2463, 217, 1730, 83, 2583, 431, 2550, + /* 2000 */ 2622, 789, 1729, 2441, 177, 2585, 793, 2587, 2588, 788, + /* 2010 */ 2440, 811, 2439, 509, 510, 2438, 2437, 2388, 2385, 514, + /* 2020 */ 2583, 432, 1673, 2622, 803, 2584, 517, 383, 2585, 793, + /* 2030 */ 2587, 2588, 788, 2384, 811, 2378, 520, 2375, 790, 521, + /* 2040 */ 2374, 220, 86, 2583, 2373, 2372, 2622, 2718, 2377, 2584, + /* 2050 */ 383, 2585, 793, 2587, 2588, 788, 222, 811, 2376, 2371, + /* 2060 */ 2370, 2368, 790, 2367, 2366, 224, 2602, 537, 2365, 311, + /* 2070 */ 539, 2363, 2362, 2584, 2361, 2360, 310, 2359, 2383, 2550, + /* 2080 */ 2358, 789, 2357, 2356, 2381, 2364, 787, 2355, 2354, 2353, + /* 2090 */ 2602, 2351, 2350, 2349, 2348, 281, 2347, 2346, 226, 2345, + /* 2100 */ 92, 2344, 2343, 2550, 2342, 789, 2341, 2382, 2380, 2340, + /* 2110 */ 2339, 2338, 2584, 231, 2602, 2337, 2336, 1679, 575, 577, + /* 2120 */ 2335, 2334, 1529, 2583, 2168, 790, 2622, 2550, 234, 789, + /* 2130 */ 376, 2585, 793, 2587, 2588, 788, 397, 811, 2167, 1533, + /* 2140 */ 398, 2166, 235, 2165, 2163, 237, 2160, 2583, 2159, 2584, + /* 2150 */ 2622, 1525, 2152, 2602, 178, 2585, 793, 2587, 2588, 788, + /* 2160 */ 595, 811, 790, 599, 238, 596, 2550, 597, 789, 601, + /* 2170 */ 600, 2583, 603, 605, 2622, 2139, 749, 607, 382, 2585, + /* 2180 */ 793, 2587, 2588, 788, 604, 811, 2113, 2642, 441, 187, + /* 2190 */ 2602, 79, 240, 1406, 2570, 2584, 2112, 242, 2462, 80, + /* 2200 */ 197, 2458, 615, 2550, 2448, 789, 2436, 249, 790, 2779, + /* 2210 */ 2583, 251, 2435, 2622, 2412, 254, 2254, 383, 2585, 793, + /* 2220 */ 2587, 2588, 788, 2162, 811, 443, 2158, 633, 634, 2584, + /* 2230 */ 635, 2156, 1455, 638, 637, 639, 2602, 2154, 2151, 641, + /* 2240 */ 2134, 642, 790, 646, 645, 643, 2132, 2583, 2133, 2550, + /* 2250 */ 2622, 789, 647, 2131, 383, 2585, 793, 2587, 2588, 788, + /* 2260 */ 2109, 811, 2256, 72, 1607, 2584, 1606, 2255, 2149, 1515, + /* 2270 */ 2602, 1514, 1513, 1510, 260, 2147, 1508, 2138, 790, 1506, + /* 2280 */ 1505, 1497, 1504, 2550, 873, 789, 1503, 1502, 875, 1499, + /* 2290 */ 2136, 1498, 422, 698, 1496, 423, 2622, 2108, 424, 2584, + /* 2300 */ 378, 2585, 793, 2587, 2588, 788, 2602, 811, 684, 425, + /* 2310 */ 681, 2107, 790, 2106, 2105, 688, 690, 2104, 692, 2550, + /* 2320 */ 119, 789, 1764, 1768, 28, 1766, 1763, 2583, 2461, 56, + /* 2330 */ 2622, 67, 703, 282, 368, 2585, 793, 2587, 2588, 788, + /* 2340 */ 2602, 811, 1754, 2457, 1736, 1738, 2447, 1740, 172, 713, + /* 2350 */ 2434, 57, 714, 2550, 2433, 789, 286, 20, 2762, 17, + /* 2360 */ 1715, 719, 1714, 2583, 65, 6, 2622, 729, 721, 430, + /* 2370 */ 367, 2585, 793, 2587, 2588, 788, 30, 811, 2039, 289, + /* 2380 */ 21, 7, 22, 2013, 191, 731, 2584, 202, 291, 2571, + /* 2390 */ 735, 733, 32, 24, 23, 2054, 2020, 2583, 2432, 790, + /* 2400 */ 2622, 18, 2053, 435, 369, 2585, 793, 2587, 2588, 788, + /* 2410 */ 2058, 811, 2584, 2007, 179, 2057, 190, 31, 81, 436, + /* 2420 */ 2059, 305, 2060, 1978, 1977, 790, 59, 2602, 182, 2411, + /* 2430 */ 103, 102, 2584, 25, 13, 1847, 1930, 1929, 1940, 183, + /* 2440 */ 2550, 11, 789, 1905, 193, 790, 58, 1904, 822, 825, + /* 2450 */ 828, 2410, 831, 2602, 38, 321, 1903, 16, 26, 1881, + /* 2460 */ 104, 798, 1873, 324, 792, 27, 2550, 313, 789, 348, + /* 2470 */ 2015, 814, 460, 2602, 1597, 194, 319, 69, 818, 109, + /* 2480 */ 105, 2627, 2626, 810, 2583, 1907, 2550, 2622, 789, 68, + /* 2490 */ 816, 375, 2585, 793, 2587, 2588, 788, 812, 811, 1588, + /* 2500 */ 1585, 1584, 819, 821, 824, 1581, 1575, 837, 827, 830, + /* 2510 */ 2583, 1573, 1453, 2622, 1601, 2584, 1579, 379, 2585, 793, + /* 2520 */ 2587, 2588, 788, 847, 811, 110, 1564, 1493, 790, 111, + /* 2530 */ 2583, 1492, 2584, 2622, 78, 1578, 1491, 370, 2585, 793, + /* 2540 */ 2587, 2588, 788, 1577, 811, 790, 1576, 1488, 2584, 1485, + /* 2550 */ 1484, 1483, 1482, 1480, 1478, 1477, 2602, 1476, 1523, 1522, + /* 2560 */ 861, 790, 863, 209, 1474, 1473, 1472, 1471, 1470, 2550, + /* 2570 */ 1469, 789, 1468, 2602, 1517, 1519, 1465, 1464, 1461, 1460, + /* 2580 */ 1459, 1458, 2157, 883, 884, 885, 2550, 2155, 789, 2602, + /* 2590 */ 887, 889, 2153, 891, 893, 2150, 895, 897, 2130, 888, + /* 2600 */ 892, 899, 2550, 896, 789, 2128, 901, 2103, 1395, 905, + /* 2610 */ 1383, 352, 907, 2583, 911, 1833, 2622, 2073, 362, 2073, + /* 2620 */ 380, 2585, 793, 2587, 2588, 788, 2073, 811, 2073, 910, + /* 2630 */ 2583, 2073, 2073, 2622, 2073, 2073, 2073, 371, 2585, 793, + /* 2640 */ 2587, 2588, 788, 2073, 811, 2073, 2583, 2073, 2073, 2622, + /* 2650 */ 2073, 2584, 2073, 381, 2585, 793, 2587, 2588, 788, 2073, + /* 2660 */ 811, 2073, 2073, 2073, 790, 2073, 2073, 2584, 2073, 2073, + /* 2670 */ 2073, 2073, 2073, 2073, 2073, 2073, 2073, 2073, 2073, 2073, + /* 2680 */ 790, 2073, 2073, 2073, 2073, 2584, 2073, 2073, 2073, 2073, + /* 2690 */ 2073, 2073, 2602, 2073, 2073, 2073, 2073, 2073, 790, 2073, + /* 2700 */ 2073, 2073, 2073, 2073, 2073, 2550, 2073, 789, 2602, 2073, + /* 2710 */ 2073, 2073, 2073, 2073, 2073, 2073, 2073, 2073, 2073, 2073, + /* 2720 */ 2073, 2550, 2073, 789, 2073, 2073, 2602, 2073, 2073, 2073, + /* 2730 */ 2073, 2073, 2073, 2073, 2073, 2073, 2073, 2073, 2073, 2550, + /* 2740 */ 2073, 789, 2073, 2073, 2073, 2073, 2073, 2073, 2073, 2583, + /* 2750 */ 2073, 2073, 2622, 2073, 2073, 2073, 372, 2585, 793, 2587, + /* 2760 */ 2588, 788, 2073, 811, 2073, 2583, 2073, 2073, 2622, 2073, + /* 2770 */ 2073, 2584, 387, 2585, 793, 2587, 2588, 788, 2073, 811, + /* 2780 */ 2073, 2073, 2073, 2583, 790, 2073, 2622, 2073, 2073, 2073, + /* 2790 */ 388, 2585, 793, 2587, 2588, 788, 2073, 811, 2584, 2073, + /* 2800 */ 2073, 2073, 2073, 2073, 2073, 2073, 2073, 2073, 2073, 2073, + /* 2810 */ 2073, 790, 2602, 2073, 2073, 2073, 2073, 2073, 2073, 2584, + /* 2820 */ 2073, 2073, 2073, 2073, 2073, 2550, 2073, 789, 2073, 2073, + /* 2830 */ 2073, 2073, 790, 2073, 2073, 2073, 2073, 2073, 2073, 2602, + /* 2840 */ 2073, 2073, 2073, 2073, 2073, 2073, 2073, 2073, 2073, 2073, + /* 2850 */ 2073, 2073, 2550, 2073, 789, 2073, 2073, 2584, 2073, 2073, + /* 2860 */ 2602, 2073, 2073, 2073, 2073, 2073, 2073, 2073, 2073, 2583, + /* 2870 */ 790, 2073, 2622, 2550, 2073, 789, 2596, 2585, 793, 2587, + /* 2880 */ 2588, 788, 2073, 811, 2073, 2073, 2073, 2073, 2073, 2073, + /* 2890 */ 2073, 2073, 2073, 2073, 2073, 2073, 2583, 2073, 2602, 2622, + /* 2900 */ 2073, 2073, 2073, 2595, 2585, 793, 2587, 2588, 788, 2073, + /* 2910 */ 811, 2550, 2073, 789, 2073, 2073, 2073, 2583, 2073, 2073, + /* 2920 */ 2622, 2073, 2073, 2073, 2594, 2585, 793, 2587, 2588, 788, + /* 2930 */ 2073, 811, 2073, 2073, 2073, 2584, 2073, 2073, 2073, 2073, + /* 2940 */ 2073, 2073, 2073, 2073, 2073, 2073, 2073, 2073, 790, 2073, + /* 2950 */ 2073, 2073, 2073, 2073, 2073, 2583, 2073, 2073, 2622, 2073, + /* 2960 */ 2073, 2073, 403, 2585, 793, 2587, 2588, 788, 2584, 811, + /* 2970 */ 2073, 2073, 2073, 2073, 2073, 2073, 2602, 2073, 2073, 2073, + /* 2980 */ 2073, 790, 2073, 2073, 2073, 2073, 2073, 2073, 2073, 2550, + /* 2990 */ 2073, 789, 2073, 2073, 2073, 2073, 2073, 2073, 2073, 2073, + /* 3000 */ 2073, 2073, 2073, 2073, 2073, 2584, 2073, 2073, 2073, 2602, + /* 3010 */ 2073, 2073, 2073, 2073, 2073, 2073, 2073, 2073, 790, 2073, + /* 3020 */ 2073, 2073, 2550, 2073, 789, 2073, 2073, 2073, 2073, 2073, + /* 3030 */ 2073, 2073, 2073, 2583, 2073, 2073, 2622, 2073, 2073, 2073, + /* 3040 */ 404, 2585, 793, 2587, 2588, 788, 2602, 811, 2073, 2073, + /* 3050 */ 2073, 2584, 2073, 2073, 2073, 2073, 2073, 2073, 2073, 2550, + /* 3060 */ 2073, 789, 2073, 2073, 790, 2073, 2583, 2073, 2073, 2622, + /* 3070 */ 2073, 2073, 2073, 400, 2585, 793, 2587, 2588, 788, 2073, + /* 3080 */ 811, 2073, 2073, 2073, 2073, 2073, 2073, 2584, 2073, 2073, + /* 3090 */ 2073, 2073, 2602, 2073, 2073, 2073, 2073, 2073, 2073, 2073, + /* 3100 */ 790, 2073, 2073, 2583, 2073, 2550, 2622, 789, 2073, 2073, + /* 3110 */ 405, 2585, 793, 2587, 2588, 788, 2073, 811, 2073, 2073, + /* 3120 */ 2073, 2073, 2073, 2073, 2073, 2073, 2073, 2073, 2602, 2073, + /* 3130 */ 2073, 2073, 2073, 2073, 2073, 2073, 2073, 2073, 2073, 2073, + /* 3140 */ 2073, 2550, 2073, 789, 2073, 2073, 2073, 2073, 2073, 791, + /* 3150 */ 2073, 2073, 2622, 2073, 2073, 2073, 378, 2585, 793, 2587, + /* 3160 */ 2588, 788, 2073, 811, 2073, 2073, 2073, 2073, 2073, 2073, + /* 3170 */ 2073, 2073, 2073, 2073, 2073, 2073, 2073, 2073, 2073, 2073, + /* 3180 */ 2073, 2073, 2073, 2073, 2073, 2583, 2073, 2073, 2622, 2073, + /* 3190 */ 2073, 2073, 377, 2585, 793, 2587, 2588, 788, 2073, 811, }; static const YYCODETYPE yy_lookahead[] = { - /* 0 */ 404, 394, 360, 407, 362, 492, 403, 368, 495, 402, - /* 10 */ 371, 372, 12, 13, 14, 402, 401, 410, 12, 13, - /* 20 */ 20, 0, 22, 402, 373, 374, 513, 514, 439, 414, - /* 30 */ 409, 518, 519, 444, 20, 35, 0, 37, 425, 418, - /* 40 */ 427, 389, 21, 37, 392, 24, 25, 26, 27, 28, - /* 50 */ 29, 30, 31, 32, 476, 8, 9, 479, 462, 12, - /* 60 */ 13, 14, 15, 16, 457, 458, 66, 20, 0, 473, - /* 70 */ 8, 9, 72, 402, 12, 13, 14, 15, 16, 79, - /* 80 */ 409, 492, 373, 374, 495, 373, 374, 4, 21, 418, - /* 90 */ 402, 24, 25, 26, 27, 28, 29, 30, 31, 32, - /* 100 */ 66, 33, 513, 514, 373, 393, 106, 518, 519, 109, - /* 110 */ 74, 75, 76, 77, 78, 427, 80, 81, 82, 83, - /* 120 */ 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, - /* 130 */ 94, 95, 96, 97, 98, 99, 100, 101, 102, 488, - /* 140 */ 489, 490, 108, 492, 493, 111, 495, 147, 148, 417, - /* 150 */ 419, 420, 492, 422, 18, 495, 382, 426, 380, 23, - /* 160 */ 20, 373, 374, 492, 513, 514, 495, 435, 436, 518, - /* 170 */ 519, 20, 110, 399, 514, 397, 40, 41, 518, 519, - /* 180 */ 44, 393, 408, 405, 513, 514, 186, 187, 400, 518, - /* 190 */ 519, 55, 109, 193, 194, 20, 487, 488, 489, 490, - /* 200 */ 20, 492, 493, 67, 68, 69, 70, 417, 208, 373, - /* 210 */ 210, 20, 20, 8, 9, 181, 210, 12, 13, 14, - /* 220 */ 15, 16, 432, 8, 9, 435, 436, 12, 13, 14, - /* 230 */ 15, 16, 8, 9, 20, 188, 12, 13, 14, 15, - /* 240 */ 16, 88, 242, 243, 244, 109, 246, 247, 248, 249, + /* 0 */ 408, 407, 377, 411, 496, 365, 496, 499, 407, 499, + /* 10 */ 3, 365, 12, 13, 14, 0, 415, 373, 377, 378, + /* 20 */ 20, 377, 22, 379, 378, 517, 518, 364, 518, 366, + /* 30 */ 522, 523, 522, 523, 408, 35, 21, 37, 397, 24, + /* 40 */ 25, 26, 27, 28, 29, 30, 31, 32, 423, 424, + /* 50 */ 37, 426, 406, 408, 406, 430, 8, 9, 466, 419, + /* 60 */ 12, 13, 14, 15, 16, 419, 66, 421, 20, 477, + /* 70 */ 8, 9, 20, 73, 12, 13, 14, 15, 16, 431, + /* 80 */ 80, 0, 14, 12, 13, 14, 15, 16, 20, 20, + /* 90 */ 8, 9, 466, 80, 12, 13, 14, 15, 16, 20, + /* 100 */ 8, 9, 384, 477, 12, 13, 14, 15, 16, 463, + /* 110 */ 110, 466, 466, 113, 12, 13, 470, 471, 472, 473, + /* 120 */ 474, 475, 477, 477, 52, 33, 480, 409, 482, 483, + /* 130 */ 484, 1, 2, 61, 488, 489, 64, 65, 21, 37, + /* 140 */ 113, 24, 25, 26, 27, 28, 29, 30, 31, 32, + /* 150 */ 113, 151, 152, 66, 20, 73, 75, 76, 77, 78, + /* 160 */ 79, 20, 81, 82, 83, 84, 85, 86, 87, 88, + /* 170 */ 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, + /* 180 */ 99, 100, 101, 102, 103, 104, 105, 106, 8, 9, + /* 190 */ 190, 191, 12, 13, 14, 15, 16, 197, 198, 112, + /* 200 */ 72, 110, 115, 121, 485, 486, 114, 373, 377, 378, + /* 210 */ 113, 377, 212, 379, 214, 124, 37, 126, 127, 128, + /* 220 */ 129, 130, 131, 132, 133, 134, 135, 113, 137, 138, + /* 230 */ 139, 140, 141, 142, 143, 372, 122, 20, 375, 376, + /* 240 */ 192, 20, 190, 191, 114, 144, 246, 247, 248, 148, /* 250 */ 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, - /* 260 */ 260, 261, 262, 263, 12, 13, 430, 431, 22, 18, - /* 270 */ 0, 20, 20, 181, 22, 37, 368, 72, 27, 371, - /* 280 */ 372, 30, 14, 37, 109, 149, 35, 35, 20, 37, - /* 290 */ 109, 244, 242, 20, 24, 25, 26, 27, 28, 29, - /* 300 */ 30, 31, 32, 52, 212, 54, 153, 374, 8, 9, - /* 310 */ 59, 60, 12, 13, 14, 15, 16, 79, 66, 373, - /* 320 */ 374, 70, 117, 109, 72, 79, 12, 13, 14, 15, - /* 330 */ 16, 79, 179, 180, 110, 402, 200, 201, 202, 147, - /* 340 */ 148, 205, 292, 293, 294, 295, 296, 297, 298, 185, - /* 350 */ 373, 374, 106, 20, 218, 219, 373, 374, 106, 108, - /* 360 */ 70, 109, 71, 280, 106, 229, 186, 187, 232, 423, - /* 370 */ 119, 235, 236, 237, 238, 239, 393, 71, 120, 188, - /* 380 */ 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, - /* 390 */ 185, 133, 134, 135, 136, 137, 138, 139, 361, 147, - /* 400 */ 148, 468, 151, 152, 109, 154, 155, 156, 157, 158, - /* 410 */ 159, 160, 161, 162, 163, 200, 280, 361, 167, 168, - /* 420 */ 169, 170, 171, 172, 173, 174, 369, 176, 177, 178, - /* 430 */ 373, 267, 375, 182, 183, 184, 373, 374, 186, 187, - /* 440 */ 189, 277, 109, 8, 9, 193, 194, 12, 13, 14, - /* 450 */ 15, 16, 415, 369, 208, 280, 210, 373, 465, 375, - /* 460 */ 208, 280, 210, 373, 374, 488, 489, 490, 33, 492, - /* 470 */ 493, 415, 267, 268, 269, 270, 271, 272, 273, 274, - /* 480 */ 275, 276, 277, 393, 491, 109, 423, 119, 242, 243, - /* 490 */ 400, 373, 374, 203, 242, 243, 244, 373, 246, 247, - /* 500 */ 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, - /* 510 */ 258, 259, 260, 261, 262, 263, 264, 12, 13, 0, - /* 520 */ 230, 231, 307, 264, 23, 20, 3, 22, 140, 141, - /* 530 */ 142, 143, 144, 145, 146, 22, 106, 79, 361, 0, - /* 540 */ 35, 423, 37, 20, 119, 110, 358, 4, 47, 48, - /* 550 */ 37, 374, 122, 123, 124, 125, 126, 127, 128, 129, - /* 560 */ 130, 131, 19, 133, 134, 135, 136, 137, 138, 139, - /* 570 */ 402, 66, 140, 449, 450, 280, 144, 72, 35, 402, - /* 580 */ 74, 75, 76, 207, 79, 209, 4, 81, 82, 83, - /* 590 */ 71, 404, 415, 87, 417, 52, 481, 482, 92, 93, - /* 600 */ 94, 95, 59, 60, 98, 23, 34, 101, 102, 66, - /* 610 */ 2, 106, 403, 280, 109, 239, 8, 9, 361, 106, - /* 620 */ 12, 13, 14, 15, 16, 457, 458, 439, 46, 47, - /* 630 */ 48, 374, 444, 110, 413, 403, 459, 416, 417, 462, - /* 640 */ 14, 15, 16, 466, 467, 468, 469, 470, 471, 462, - /* 650 */ 473, 108, 147, 148, 111, 478, 280, 480, 403, 402, - /* 660 */ 473, 484, 485, 8, 9, 20, 411, 12, 13, 14, - /* 670 */ 15, 16, 415, 14, 417, 2, 499, 361, 21, 20, - /* 680 */ 492, 8, 9, 495, 507, 12, 13, 14, 15, 16, - /* 690 */ 402, 186, 187, 36, 141, 38, 39, 40, 193, 194, - /* 700 */ 112, 513, 514, 115, 383, 166, 518, 519, 14, 380, - /* 710 */ 171, 188, 391, 208, 20, 210, 459, 492, 179, 462, - /* 720 */ 495, 192, 402, 466, 467, 468, 469, 470, 471, 409, - /* 730 */ 473, 415, 361, 476, 405, 478, 479, 480, 418, 514, - /* 740 */ 20, 484, 485, 518, 519, 374, 458, 242, 243, 244, - /* 750 */ 465, 246, 247, 248, 249, 250, 251, 252, 253, 254, - /* 760 */ 255, 256, 257, 258, 259, 260, 261, 262, 263, 12, - /* 770 */ 13, 14, 0, 402, 221, 222, 491, 20, 361, 22, - /* 780 */ 264, 106, 266, 20, 403, 37, 415, 0, 417, 445, - /* 790 */ 404, 374, 35, 376, 37, 39, 40, 122, 123, 124, - /* 800 */ 125, 126, 127, 128, 129, 130, 131, 403, 133, 134, - /* 810 */ 135, 136, 137, 138, 139, 286, 287, 288, 289, 402, - /* 820 */ 373, 374, 412, 66, 20, 415, 22, 373, 374, 20, - /* 830 */ 459, 22, 415, 462, 417, 22, 79, 466, 467, 468, - /* 840 */ 469, 470, 471, 188, 473, 52, 37, 393, 462, 478, - /* 850 */ 37, 480, 12, 13, 61, 484, 485, 64, 65, 473, - /* 860 */ 56, 14, 22, 106, 403, 56, 109, 20, 361, 113, - /* 870 */ 114, 373, 116, 373, 374, 35, 459, 37, 507, 462, - /* 880 */ 186, 374, 37, 466, 467, 468, 469, 470, 471, 244, - /* 890 */ 473, 394, 79, 393, 465, 478, 140, 480, 390, 402, - /* 900 */ 144, 484, 485, 20, 147, 148, 66, 410, 188, 402, - /* 910 */ 147, 148, 140, 141, 142, 143, 144, 145, 146, 79, - /* 920 */ 491, 20, 415, 415, 417, 373, 374, 140, 141, 142, - /* 930 */ 143, 144, 145, 146, 398, 488, 489, 490, 244, 492, - /* 940 */ 493, 373, 374, 186, 187, 393, 106, 449, 450, 142, - /* 950 */ 193, 194, 391, 146, 57, 58, 193, 194, 210, 373, - /* 960 */ 374, 393, 373, 374, 244, 208, 459, 210, 390, 462, - /* 970 */ 462, 463, 464, 466, 467, 468, 469, 470, 471, 393, - /* 980 */ 473, 473, 393, 22, 362, 478, 394, 480, 240, 241, - /* 990 */ 454, 484, 485, 415, 402, 361, 1, 2, 37, 242, - /* 1000 */ 243, 244, 410, 246, 247, 248, 249, 250, 251, 252, - /* 1010 */ 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, - /* 1020 */ 263, 12, 13, 361, 217, 373, 374, 220, 50, 20, - /* 1030 */ 223, 22, 225, 186, 373, 374, 374, 3, 376, 361, - /* 1040 */ 462, 463, 373, 374, 35, 393, 37, 0, 208, 415, - /* 1050 */ 210, 473, 4, 361, 393, 210, 373, 374, 373, 374, - /* 1060 */ 373, 374, 393, 224, 402, 226, 374, 106, 376, 373, - /* 1070 */ 374, 188, 373, 374, 402, 66, 393, 415, 393, 417, - /* 1080 */ 393, 409, 242, 243, 361, 240, 241, 186, 79, 393, - /* 1090 */ 418, 244, 393, 415, 402, 361, 256, 257, 258, 259, - /* 1100 */ 260, 261, 262, 373, 374, 110, 394, 415, 20, 417, - /* 1110 */ 361, 416, 417, 20, 402, 106, 373, 374, 109, 361, - /* 1120 */ 0, 459, 410, 393, 462, 439, 361, 244, 466, 467, - /* 1130 */ 468, 469, 470, 471, 361, 473, 393, 361, 415, 374, - /* 1140 */ 478, 376, 480, 141, 142, 244, 484, 485, 146, 415, - /* 1150 */ 42, 459, 361, 361, 462, 361, 147, 148, 466, 467, - /* 1160 */ 468, 469, 470, 471, 415, 473, 188, 402, 387, 388, - /* 1170 */ 478, 361, 480, 415, 196, 33, 484, 485, 492, 1, - /* 1180 */ 415, 495, 417, 378, 379, 402, 387, 388, 415, 378, - /* 1190 */ 379, 415, 361, 361, 361, 186, 187, 19, 37, 513, - /* 1200 */ 514, 418, 193, 194, 518, 519, 415, 415, 477, 415, - /* 1210 */ 479, 164, 165, 35, 477, 33, 479, 208, 13, 210, - /* 1220 */ 402, 361, 522, 395, 459, 415, 398, 462, 410, 51, - /* 1230 */ 52, 466, 467, 468, 469, 470, 471, 439, 473, 61, - /* 1240 */ 62, 63, 64, 478, 66, 480, 415, 415, 415, 484, - /* 1250 */ 485, 242, 243, 244, 439, 246, 247, 248, 249, 250, - /* 1260 */ 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, - /* 1270 */ 261, 262, 263, 12, 13, 415, 382, 0, 402, 402, - /* 1280 */ 33, 20, 412, 22, 79, 415, 108, 364, 365, 111, - /* 1290 */ 492, 278, 279, 495, 418, 418, 35, 412, 37, 0, - /* 1300 */ 415, 33, 408, 33, 119, 361, 112, 492, 33, 115, - /* 1310 */ 495, 513, 514, 45, 33, 45, 518, 519, 374, 42, - /* 1320 */ 376, 112, 0, 145, 115, 439, 13, 66, 513, 514, - /* 1330 */ 282, 13, 244, 518, 519, 66, 302, 244, 112, 33, - /* 1340 */ 79, 115, 0, 0, 22, 428, 402, 0, 33, 511, - /* 1350 */ 37, 52, 504, 33, 234, 37, 72, 110, 33, 415, - /* 1360 */ 175, 417, 147, 148, 22, 22, 33, 106, 190, 22, - /* 1370 */ 109, 210, 12, 13, 33, 197, 49, 361, 492, 402, - /* 1380 */ 111, 495, 22, 377, 439, 110, 390, 279, 33, 33, - /* 1390 */ 374, 110, 376, 390, 216, 35, 33, 37, 109, 513, - /* 1400 */ 514, 1, 2, 459, 518, 519, 462, 118, 147, 148, - /* 1410 */ 466, 467, 468, 469, 470, 471, 110, 473, 402, 12, - /* 1420 */ 13, 33, 478, 37, 480, 110, 66, 428, 484, 485, - /* 1430 */ 110, 415, 37, 417, 372, 110, 109, 492, 13, 361, - /* 1440 */ 495, 510, 428, 110, 12, 13, 304, 186, 187, 0, - /* 1450 */ 33, 110, 374, 510, 193, 194, 33, 13, 513, 514, - /* 1460 */ 12, 13, 37, 518, 519, 110, 110, 12, 13, 208, - /* 1470 */ 510, 210, 510, 110, 79, 459, 12, 13, 462, 438, - /* 1480 */ 402, 37, 466, 467, 468, 469, 470, 471, 306, 473, - /* 1490 */ 12, 13, 33, 415, 478, 417, 480, 428, 110, 33, - /* 1500 */ 484, 485, 53, 242, 243, 244, 377, 246, 247, 248, - /* 1510 */ 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, - /* 1520 */ 259, 260, 261, 262, 263, 361, 242, 110, 12, 13, - /* 1530 */ 12, 13, 33, 110, 12, 13, 374, 459, 374, 414, - /* 1540 */ 462, 12, 13, 446, 466, 467, 468, 469, 470, 471, - /* 1550 */ 428, 473, 33, 12, 13, 428, 478, 494, 480, 33, - /* 1560 */ 515, 486, 484, 485, 33, 497, 402, 392, 208, 110, - /* 1570 */ 210, 283, 440, 52, 461, 42, 110, 460, 20, 415, - /* 1580 */ 223, 417, 451, 382, 456, 451, 382, 206, 442, 373, - /* 1590 */ 20, 20, 374, 45, 424, 374, 210, 361, 424, 185, - /* 1600 */ 240, 241, 242, 373, 421, 374, 373, 421, 424, 110, - /* 1610 */ 374, 421, 421, 107, 386, 373, 256, 257, 258, 259, - /* 1620 */ 260, 261, 262, 459, 385, 105, 462, 361, 104, 110, - /* 1630 */ 466, 467, 468, 469, 470, 471, 110, 473, 402, 384, - /* 1640 */ 374, 110, 478, 20, 480, 373, 373, 373, 484, 485, - /* 1650 */ 50, 415, 366, 417, 451, 370, 366, 370, 361, 20, - /* 1660 */ 382, 382, 417, 20, 382, 20, 375, 20, 402, 375, - /* 1670 */ 441, 374, 431, 373, 382, 382, 366, 382, 382, 415, - /* 1680 */ 382, 415, 402, 417, 227, 402, 415, 373, 109, 366, - /* 1690 */ 364, 415, 455, 453, 364, 459, 20, 451, 462, 402, - /* 1700 */ 450, 214, 466, 467, 468, 469, 470, 471, 448, 473, - /* 1710 */ 402, 402, 415, 402, 417, 380, 480, 213, 402, 402, - /* 1720 */ 484, 485, 417, 402, 380, 459, 402, 373, 462, 291, - /* 1730 */ 402, 402, 466, 467, 468, 469, 470, 471, 503, 473, - /* 1740 */ 290, 503, 440, 199, 361, 433, 480, 415, 447, 506, - /* 1750 */ 484, 485, 433, 299, 505, 503, 459, 374, 502, 462, - /* 1760 */ 501, 301, 300, 466, 467, 468, 469, 470, 471, 284, - /* 1770 */ 473, 361, 305, 308, 440, 517, 523, 480, 303, 516, - /* 1780 */ 279, 484, 485, 374, 374, 402, 20, 119, 281, 109, - /* 1790 */ 361, 375, 380, 380, 433, 415, 465, 415, 415, 415, - /* 1800 */ 417, 498, 415, 374, 500, 433, 415, 191, 429, 398, - /* 1810 */ 380, 380, 402, 374, 415, 109, 415, 415, 415, 415, - /* 1820 */ 483, 415, 380, 415, 22, 415, 363, 417, 38, 373, - /* 1830 */ 415, 402, 496, 415, 415, 415, 415, 415, 367, 415, - /* 1840 */ 406, 415, 459, 415, 415, 462, 417, 366, 415, 466, - /* 1850 */ 467, 468, 469, 470, 471, 472, 473, 474, 475, 359, - /* 1860 */ 415, 415, 415, 381, 396, 396, 415, 415, 415, 459, - /* 1870 */ 443, 361, 462, 396, 434, 434, 466, 467, 468, 469, - /* 1880 */ 470, 471, 0, 473, 374, 0, 0, 452, 459, 45, - /* 1890 */ 0, 462, 37, 233, 37, 466, 467, 468, 469, 470, - /* 1900 */ 471, 37, 473, 37, 233, 0, 37, 361, 37, 37, - /* 1910 */ 233, 0, 402, 0, 233, 37, 0, 37, 508, 509, - /* 1920 */ 374, 22, 0, 228, 37, 415, 0, 417, 0, 216, - /* 1930 */ 361, 0, 216, 210, 217, 208, 0, 0, 0, 204, - /* 1940 */ 203, 0, 0, 374, 152, 49, 49, 0, 402, 520, - /* 1950 */ 521, 37, 0, 0, 37, 52, 0, 49, 0, 0, - /* 1960 */ 45, 415, 0, 417, 0, 0, 0, 49, 0, 459, - /* 1970 */ 0, 402, 462, 0, 0, 171, 466, 467, 468, 469, - /* 1980 */ 470, 471, 37, 473, 415, 0, 417, 171, 0, 361, - /* 1990 */ 480, 0, 0, 0, 0, 485, 0, 0, 0, 0, - /* 2000 */ 0, 0, 374, 0, 0, 459, 437, 151, 462, 0, - /* 2010 */ 361, 0, 466, 467, 468, 469, 470, 471, 0, 473, - /* 2020 */ 0, 0, 0, 374, 0, 49, 0, 45, 459, 0, - /* 2030 */ 402, 462, 0, 0, 0, 466, 467, 468, 469, 470, - /* 2040 */ 471, 22, 473, 415, 0, 417, 0, 0, 0, 0, - /* 2050 */ 152, 402, 0, 0, 150, 509, 0, 0, 22, 22, - /* 2060 */ 50, 0, 50, 0, 415, 437, 417, 37, 66, 361, - /* 2070 */ 42, 66, 0, 0, 66, 0, 37, 52, 0, 37, - /* 2080 */ 42, 0, 374, 52, 0, 42, 0, 459, 37, 0, - /* 2090 */ 462, 37, 52, 14, 466, 467, 468, 469, 470, 471, - /* 2100 */ 45, 473, 42, 0, 33, 43, 0, 49, 459, 42, - /* 2110 */ 402, 462, 0, 49, 49, 466, 467, 468, 469, 470, - /* 2120 */ 471, 0, 473, 415, 42, 417, 199, 0, 0, 49, - /* 2130 */ 361, 0, 73, 0, 0, 37, 42, 52, 0, 37, - /* 2140 */ 52, 42, 0, 374, 37, 52, 42, 361, 0, 52, - /* 2150 */ 37, 42, 0, 0, 0, 0, 0, 0, 22, 37, - /* 2160 */ 374, 512, 117, 0, 0, 115, 37, 459, 22, 37, - /* 2170 */ 462, 402, 37, 33, 466, 467, 468, 469, 470, 471, - /* 2180 */ 37, 473, 37, 0, 415, 0, 417, 37, 402, 22, - /* 2190 */ 0, 22, 22, 361, 33, 37, 37, 37, 22, 37, - /* 2200 */ 22, 415, 0, 417, 0, 37, 374, 20, 37, 0, - /* 2210 */ 37, 0, 37, 0, 22, 110, 37, 37, 37, 54, - /* 2220 */ 109, 0, 121, 437, 109, 0, 49, 22, 459, 521, - /* 2230 */ 120, 462, 0, 37, 402, 466, 467, 468, 469, 470, - /* 2240 */ 471, 0, 473, 0, 475, 459, 22, 415, 462, 417, - /* 2250 */ 215, 0, 466, 467, 468, 469, 470, 471, 109, 473, - /* 2260 */ 191, 3, 188, 195, 188, 188, 285, 33, 37, 437, - /* 2270 */ 50, 188, 37, 50, 285, 188, 110, 211, 33, 33, - /* 2280 */ 33, 109, 361, 33, 110, 195, 49, 49, 3, 107, - /* 2290 */ 33, 459, 278, 109, 462, 374, 105, 109, 466, 467, - /* 2300 */ 468, 469, 470, 471, 110, 473, 74, 75, 76, 110, - /* 2310 */ 109, 37, 109, 81, 82, 83, 110, 109, 37, 87, - /* 2320 */ 110, 37, 110, 402, 92, 93, 94, 95, 37, 37, - /* 2330 */ 98, 37, 110, 101, 102, 35, 415, 110, 417, 49, - /* 2340 */ 33, 361, 49, 0, 0, 109, 42, 33, 2, 107, - /* 2350 */ 22, 107, 52, 22, 374, 49, 242, 265, 110, 110, - /* 2360 */ 49, 61, 62, 63, 64, 109, 66, 0, 361, 109, - /* 2370 */ 109, 109, 109, 49, 110, 109, 285, 109, 192, 110, - /* 2380 */ 459, 374, 402, 462, 245, 109, 109, 466, 467, 468, - /* 2390 */ 469, 470, 471, 110, 473, 415, 110, 417, 109, 42, - /* 2400 */ 118, 37, 361, 37, 109, 190, 109, 109, 108, 402, - /* 2410 */ 109, 111, 110, 110, 109, 374, 37, 109, 119, 109, - /* 2420 */ 37, 109, 415, 110, 417, 110, 110, 37, 110, 37, - /* 2430 */ 110, 361, 37, 33, 37, 109, 109, 22, 121, 459, - /* 2440 */ 72, 132, 462, 402, 374, 109, 466, 467, 468, 469, - /* 2450 */ 470, 471, 120, 473, 132, 132, 415, 132, 417, 73, - /* 2460 */ 22, 37, 37, 37, 37, 37, 459, 37, 37, 462, - /* 2470 */ 37, 37, 402, 466, 467, 468, 469, 470, 471, 361, - /* 2480 */ 473, 181, 79, 103, 79, 415, 33, 417, 103, 37, - /* 2490 */ 190, 191, 374, 37, 37, 22, 37, 197, 198, 37, - /* 2500 */ 459, 37, 79, 462, 37, 361, 37, 466, 467, 468, - /* 2510 */ 469, 470, 471, 37, 473, 37, 216, 37, 374, 22, - /* 2520 */ 402, 37, 0, 37, 52, 42, 0, 37, 0, 459, - /* 2530 */ 42, 52, 462, 415, 52, 417, 466, 467, 468, 469, - /* 2540 */ 470, 471, 37, 473, 42, 0, 402, 37, 52, 42, - /* 2550 */ 0, 37, 0, 22, 37, 0, 22, 33, 22, 415, - /* 2560 */ 21, 417, 22, 22, 21, 524, 20, 524, 361, 524, - /* 2570 */ 524, 524, 524, 524, 524, 524, 524, 459, 524, 524, - /* 2580 */ 462, 374, 524, 524, 466, 467, 468, 469, 470, 471, - /* 2590 */ 524, 473, 524, 524, 361, 524, 524, 524, 524, 524, - /* 2600 */ 524, 524, 524, 459, 524, 524, 462, 374, 524, 402, - /* 2610 */ 466, 467, 468, 469, 470, 471, 361, 473, 524, 524, - /* 2620 */ 524, 524, 415, 524, 417, 524, 524, 524, 524, 374, - /* 2630 */ 524, 524, 524, 524, 524, 402, 524, 524, 524, 524, - /* 2640 */ 524, 524, 524, 524, 524, 524, 524, 524, 415, 524, - /* 2650 */ 417, 524, 524, 524, 524, 524, 524, 402, 524, 524, - /* 2660 */ 524, 524, 524, 524, 524, 524, 459, 524, 524, 462, - /* 2670 */ 415, 524, 417, 466, 467, 468, 469, 470, 471, 524, - /* 2680 */ 473, 524, 524, 524, 524, 524, 524, 524, 524, 524, - /* 2690 */ 524, 524, 459, 524, 524, 462, 361, 524, 524, 466, - /* 2700 */ 467, 468, 469, 470, 471, 524, 473, 524, 524, 374, - /* 2710 */ 524, 524, 524, 524, 459, 524, 361, 462, 524, 524, - /* 2720 */ 524, 466, 467, 468, 469, 470, 471, 524, 473, 374, - /* 2730 */ 524, 524, 524, 524, 524, 524, 524, 402, 524, 524, - /* 2740 */ 524, 524, 361, 524, 524, 524, 524, 524, 524, 524, - /* 2750 */ 415, 524, 417, 524, 524, 374, 524, 402, 524, 524, - /* 2760 */ 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, - /* 2770 */ 415, 524, 417, 524, 524, 524, 524, 361, 524, 524, - /* 2780 */ 524, 524, 524, 402, 524, 524, 524, 524, 524, 524, - /* 2790 */ 374, 524, 524, 524, 459, 524, 415, 462, 417, 524, - /* 2800 */ 524, 466, 467, 468, 469, 470, 471, 524, 473, 524, - /* 2810 */ 524, 524, 524, 524, 459, 524, 524, 462, 402, 524, - /* 2820 */ 524, 466, 467, 468, 469, 470, 471, 524, 473, 524, - /* 2830 */ 524, 415, 524, 417, 524, 524, 524, 524, 524, 524, - /* 2840 */ 459, 524, 524, 462, 524, 524, 524, 466, 467, 468, - /* 2850 */ 469, 470, 471, 361, 473, 524, 524, 524, 524, 524, - /* 2860 */ 524, 524, 524, 524, 524, 524, 374, 524, 524, 524, - /* 2870 */ 524, 524, 524, 524, 524, 459, 524, 524, 462, 524, - /* 2880 */ 361, 524, 466, 467, 468, 469, 470, 471, 524, 473, - /* 2890 */ 524, 524, 524, 374, 402, 524, 524, 524, 524, 361, - /* 2900 */ 524, 524, 524, 524, 524, 524, 524, 415, 524, 417, - /* 2910 */ 524, 524, 374, 524, 524, 524, 524, 524, 524, 524, - /* 2920 */ 524, 402, 524, 524, 524, 524, 524, 524, 524, 524, - /* 2930 */ 524, 524, 524, 524, 415, 524, 417, 524, 524, 361, - /* 2940 */ 402, 524, 524, 524, 524, 524, 524, 524, 524, 524, - /* 2950 */ 524, 459, 374, 415, 462, 417, 524, 524, 466, 467, - /* 2960 */ 468, 469, 470, 471, 524, 473, 524, 524, 524, 361, - /* 2970 */ 524, 524, 524, 524, 524, 524, 524, 524, 459, 524, - /* 2980 */ 402, 462, 374, 524, 524, 466, 467, 468, 469, 470, - /* 2990 */ 471, 524, 473, 415, 524, 417, 524, 459, 524, 524, - /* 3000 */ 462, 524, 524, 524, 466, 467, 468, 469, 470, 471, - /* 3010 */ 402, 473, 524, 524, 524, 524, 524, 524, 524, 524, - /* 3020 */ 524, 524, 524, 415, 524, 417, 524, 524, 361, 524, - /* 3030 */ 524, 524, 524, 524, 524, 524, 524, 459, 524, 524, - /* 3040 */ 462, 374, 524, 524, 466, 467, 468, 469, 470, 471, - /* 3050 */ 524, 473, 524, 524, 524, 524, 524, 524, 361, 524, - /* 3060 */ 524, 524, 524, 524, 524, 524, 524, 459, 524, 402, - /* 3070 */ 462, 374, 524, 524, 466, 467, 468, 469, 470, 471, - /* 3080 */ 524, 473, 415, 524, 417, 524, 524, 361, 524, 524, - /* 3090 */ 524, 524, 524, 524, 524, 524, 524, 524, 524, 402, - /* 3100 */ 374, 524, 524, 524, 524, 524, 524, 524, 524, 524, - /* 3110 */ 524, 524, 415, 524, 417, 524, 524, 524, 524, 524, - /* 3120 */ 524, 524, 524, 524, 524, 524, 459, 524, 402, 462, - /* 3130 */ 524, 524, 524, 466, 467, 468, 469, 470, 471, 524, - /* 3140 */ 473, 415, 524, 417, 524, 524, 524, 524, 524, 524, - /* 3150 */ 524, 524, 524, 524, 524, 524, 459, 524, 524, 462, - /* 3160 */ 524, 524, 524, 466, 467, 468, 469, 470, 471, 524, - /* 3170 */ 473, 524, 524, 524, 524, 524, 524, 524, 524, 524, - /* 3180 */ 524, 524, 524, 524, 524, 459, 524, 524, 462, 524, - /* 3190 */ 524, 524, 466, 467, 468, 469, 470, 471, 524, 473, - /* 3200 */ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, - /* 3210 */ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, - /* 3220 */ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, - /* 3230 */ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, - /* 3240 */ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, - /* 3250 */ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, - /* 3260 */ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, - /* 3270 */ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, - /* 3280 */ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, - /* 3290 */ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, - /* 3300 */ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, - /* 3310 */ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, - /* 3320 */ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, - /* 3330 */ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, - /* 3340 */ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, - /* 3350 */ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, - /* 3360 */ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, - /* 3370 */ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, - /* 3380 */ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, - /* 3390 */ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, - /* 3400 */ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, - /* 3410 */ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, - /* 3420 */ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, - /* 3430 */ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, - /* 3440 */ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, - /* 3450 */ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, - /* 3460 */ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, - /* 3470 */ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, - /* 3480 */ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, - /* 3490 */ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, - /* 3500 */ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, - /* 3510 */ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, - /* 3520 */ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, - /* 3530 */ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, - /* 3540 */ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, - /* 3550 */ 358, 358, 358, 358, 358, 358, 358, 358, + /* 260 */ 260, 261, 262, 263, 264, 265, 266, 267, 12, 13, + /* 270 */ 421, 189, 185, 18, 0, 20, 20, 372, 22, 365, + /* 280 */ 375, 376, 27, 417, 20, 30, 420, 421, 439, 440, + /* 290 */ 35, 35, 378, 37, 114, 20, 248, 22, 24, 25, + /* 300 */ 26, 27, 28, 29, 30, 31, 32, 52, 211, 54, + /* 310 */ 213, 284, 37, 306, 59, 60, 214, 248, 362, 20, + /* 320 */ 406, 284, 66, 492, 493, 494, 71, 496, 497, 73, + /* 330 */ 113, 56, 72, 419, 113, 421, 80, 377, 8, 9, + /* 340 */ 243, 123, 12, 13, 14, 15, 16, 377, 378, 4, + /* 350 */ 377, 378, 405, 271, 272, 273, 274, 275, 276, 277, + /* 360 */ 278, 279, 280, 281, 71, 418, 110, 112, 377, 113, + /* 370 */ 144, 145, 146, 147, 148, 149, 150, 463, 123, 496, + /* 380 */ 466, 284, 499, 0, 470, 471, 472, 473, 474, 475, + /* 390 */ 268, 477, 0, 214, 434, 435, 482, 0, 484, 443, + /* 400 */ 427, 518, 488, 489, 448, 522, 523, 151, 152, 393, + /* 410 */ 155, 156, 396, 158, 159, 160, 161, 162, 163, 164, + /* 420 */ 165, 166, 167, 244, 245, 511, 171, 172, 173, 174, + /* 430 */ 175, 176, 177, 178, 18, 180, 181, 182, 246, 23, + /* 440 */ 123, 186, 187, 188, 453, 454, 190, 191, 193, 20, + /* 450 */ 151, 152, 496, 197, 198, 499, 40, 41, 113, 33, + /* 460 */ 44, 491, 492, 493, 494, 50, 496, 497, 212, 72, + /* 470 */ 214, 55, 34, 517, 518, 39, 40, 20, 522, 523, + /* 480 */ 421, 377, 378, 67, 68, 69, 70, 71, 296, 297, + /* 490 */ 298, 299, 300, 301, 302, 436, 197, 198, 439, 440, + /* 500 */ 207, 284, 246, 247, 248, 284, 250, 251, 252, 253, + /* 510 */ 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, + /* 520 */ 264, 265, 266, 267, 268, 12, 13, 234, 235, 113, + /* 530 */ 22, 427, 406, 20, 204, 22, 144, 145, 146, 147, + /* 540 */ 148, 149, 150, 110, 80, 37, 377, 378, 35, 37, + /* 550 */ 37, 168, 169, 117, 118, 429, 120, 431, 23, 126, + /* 560 */ 127, 128, 129, 130, 131, 132, 133, 134, 135, 153, + /* 570 */ 137, 138, 139, 140, 141, 142, 143, 387, 365, 66, + /* 580 */ 144, 110, 47, 48, 148, 395, 73, 443, 80, 406, + /* 590 */ 189, 378, 448, 80, 407, 443, 427, 126, 127, 128, + /* 600 */ 129, 130, 131, 132, 133, 134, 135, 192, 137, 138, + /* 610 */ 139, 140, 141, 142, 143, 200, 377, 378, 110, 406, + /* 620 */ 204, 205, 206, 110, 20, 209, 113, 0, 268, 284, + /* 630 */ 270, 146, 419, 406, 421, 150, 397, 365, 222, 223, + /* 640 */ 496, 311, 407, 499, 461, 462, 394, 190, 496, 233, + /* 650 */ 378, 499, 236, 377, 378, 239, 240, 241, 242, 243, + /* 660 */ 407, 517, 518, 377, 151, 152, 522, 523, 378, 517, + /* 670 */ 518, 419, 271, 397, 522, 523, 463, 248, 406, 466, + /* 680 */ 404, 469, 281, 470, 471, 472, 473, 474, 475, 462, + /* 690 */ 477, 419, 481, 421, 483, 482, 406, 484, 12, 13, + /* 700 */ 284, 488, 489, 190, 191, 248, 221, 495, 22, 224, + /* 710 */ 197, 198, 227, 21, 229, 145, 503, 113, 466, 467, + /* 720 */ 212, 35, 214, 37, 511, 212, 214, 214, 36, 477, + /* 730 */ 38, 39, 40, 20, 308, 463, 377, 378, 466, 453, + /* 740 */ 454, 33, 470, 471, 472, 473, 474, 475, 476, 477, + /* 750 */ 478, 479, 66, 45, 246, 247, 244, 245, 13, 246, + /* 760 */ 247, 248, 472, 250, 251, 252, 253, 254, 255, 256, + /* 770 */ 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, + /* 780 */ 267, 12, 13, 14, 22, 365, 365, 407, 4, 20, + /* 790 */ 4, 22, 14, 15, 16, 225, 226, 170, 378, 37, + /* 800 */ 380, 2, 175, 19, 35, 365, 37, 8, 9, 23, + /* 810 */ 183, 12, 13, 14, 15, 16, 365, 2, 378, 35, + /* 820 */ 380, 386, 469, 8, 9, 80, 406, 12, 13, 14, + /* 830 */ 15, 16, 46, 47, 48, 66, 52, 469, 403, 419, + /* 840 */ 419, 421, 80, 59, 60, 395, 406, 412, 495, 80, + /* 850 */ 66, 492, 493, 494, 3, 496, 497, 377, 378, 419, + /* 860 */ 402, 421, 0, 495, 151, 152, 420, 421, 8, 9, + /* 870 */ 419, 20, 12, 13, 14, 15, 16, 397, 4, 110, + /* 880 */ 382, 383, 113, 463, 404, 365, 466, 377, 378, 407, + /* 890 */ 470, 471, 472, 473, 474, 475, 112, 477, 212, 115, + /* 900 */ 214, 384, 482, 463, 484, 443, 466, 397, 488, 489, + /* 910 */ 470, 471, 472, 473, 474, 475, 458, 477, 401, 398, + /* 920 */ 151, 152, 482, 449, 484, 22, 409, 406, 488, 489, + /* 930 */ 244, 245, 246, 377, 378, 414, 432, 8, 9, 419, + /* 940 */ 37, 12, 13, 14, 15, 16, 260, 261, 262, 263, + /* 950 */ 264, 265, 266, 397, 377, 378, 14, 196, 496, 190, + /* 960 */ 191, 499, 20, 366, 20, 114, 197, 198, 526, 75, + /* 970 */ 76, 77, 480, 89, 114, 483, 82, 83, 84, 517, + /* 980 */ 518, 212, 88, 214, 522, 523, 398, 93, 94, 95, + /* 990 */ 96, 382, 383, 99, 406, 57, 58, 103, 104, 105, + /* 1000 */ 106, 20, 414, 20, 365, 365, 144, 145, 146, 147, + /* 1010 */ 148, 149, 150, 110, 394, 246, 247, 248, 378, 250, + /* 1020 */ 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, + /* 1030 */ 261, 262, 263, 264, 265, 266, 267, 12, 13, 419, + /* 1040 */ 398, 157, 365, 192, 515, 20, 406, 22, 406, 461, + /* 1050 */ 462, 290, 291, 292, 293, 378, 414, 380, 419, 419, + /* 1060 */ 35, 421, 37, 406, 377, 378, 14, 183, 184, 492, + /* 1070 */ 493, 494, 20, 496, 497, 416, 499, 365, 419, 422, + /* 1080 */ 365, 377, 378, 406, 397, 20, 466, 467, 468, 508, + /* 1090 */ 378, 66, 380, 386, 517, 518, 419, 477, 421, 522, + /* 1100 */ 523, 397, 33, 463, 365, 80, 466, 377, 378, 406, + /* 1110 */ 470, 471, 472, 473, 474, 475, 413, 477, 406, 412, + /* 1120 */ 365, 192, 482, 406, 484, 422, 22, 397, 488, 489, + /* 1130 */ 413, 419, 190, 421, 419, 110, 192, 365, 113, 422, + /* 1140 */ 463, 37, 42, 466, 377, 378, 406, 470, 471, 472, + /* 1150 */ 473, 474, 475, 413, 477, 33, 406, 365, 419, 482, + /* 1160 */ 286, 484, 422, 413, 397, 488, 489, 45, 377, 378, + /* 1170 */ 378, 443, 422, 192, 419, 463, 151, 152, 466, 381, + /* 1180 */ 391, 392, 470, 471, 472, 473, 474, 475, 397, 477, + /* 1190 */ 248, 419, 248, 365, 482, 481, 484, 483, 406, 496, + /* 1200 */ 488, 489, 499, 391, 392, 145, 146, 185, 377, 378, + /* 1210 */ 150, 419, 14, 421, 110, 190, 191, 20, 20, 22, + /* 1220 */ 517, 518, 197, 198, 496, 522, 523, 499, 397, 377, + /* 1230 */ 378, 248, 377, 378, 377, 378, 406, 212, 216, 214, + /* 1240 */ 377, 378, 190, 365, 414, 517, 518, 419, 0, 397, + /* 1250 */ 522, 523, 397, 56, 397, 463, 416, 192, 466, 419, + /* 1260 */ 397, 365, 470, 471, 472, 473, 474, 475, 228, 477, + /* 1270 */ 230, 246, 247, 248, 378, 250, 251, 252, 253, 254, + /* 1280 */ 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, + /* 1290 */ 265, 266, 267, 12, 13, 365, 365, 419, 398, 0, + /* 1300 */ 248, 20, 406, 22, 512, 513, 406, 33, 378, 123, + /* 1310 */ 380, 377, 378, 248, 414, 419, 35, 421, 37, 406, + /* 1320 */ 377, 378, 365, 377, 378, 377, 378, 365, 365, 368, + /* 1330 */ 369, 397, 33, 365, 416, 422, 406, 419, 282, 283, + /* 1340 */ 397, 406, 443, 397, 0, 397, 378, 66, 380, 419, + /* 1350 */ 419, 421, 365, 399, 365, 365, 402, 422, 406, 463, + /* 1360 */ 394, 80, 466, 0, 394, 179, 470, 471, 472, 473, + /* 1370 */ 474, 475, 365, 477, 406, 13, 419, 432, 482, 310, + /* 1380 */ 484, 419, 419, 283, 488, 489, 42, 419, 114, 421, + /* 1390 */ 376, 110, 37, 463, 113, 496, 466, 66, 499, 37, + /* 1400 */ 470, 471, 472, 473, 474, 475, 419, 477, 419, 419, + /* 1410 */ 443, 73, 482, 13, 484, 52, 517, 518, 488, 489, + /* 1420 */ 116, 522, 523, 119, 116, 116, 419, 119, 119, 0, + /* 1430 */ 33, 463, 151, 152, 466, 80, 33, 37, 470, 471, + /* 1440 */ 472, 473, 474, 475, 116, 477, 115, 119, 0, 33, + /* 1450 */ 482, 22, 484, 151, 152, 49, 488, 489, 12, 13, + /* 1460 */ 0, 37, 365, 496, 1, 2, 499, 37, 22, 0, + /* 1470 */ 22, 190, 191, 33, 33, 378, 33, 33, 197, 198, + /* 1480 */ 33, 35, 22, 37, 517, 518, 238, 12, 13, 522, + /* 1490 */ 523, 22, 33, 212, 33, 214, 432, 33, 514, 33, + /* 1500 */ 12, 13, 514, 406, 12, 13, 33, 12, 13, 514, + /* 1510 */ 33, 114, 66, 0, 12, 13, 419, 114, 421, 113, + /* 1520 */ 12, 13, 33, 12, 13, 442, 80, 246, 247, 248, + /* 1530 */ 114, 250, 251, 252, 253, 254, 255, 256, 257, 258, + /* 1540 */ 259, 260, 261, 262, 263, 264, 265, 266, 267, 12, + /* 1550 */ 13, 12, 13, 33, 114, 114, 110, 114, 114, 37, + /* 1560 */ 463, 114, 33, 466, 12, 13, 33, 470, 471, 472, + /* 1570 */ 473, 474, 475, 114, 477, 114, 12, 13, 114, 482, + /* 1580 */ 114, 484, 33, 33, 246, 488, 489, 114, 75, 76, + /* 1590 */ 77, 114, 37, 0, 514, 82, 83, 84, 13, 13, + /* 1600 */ 381, 88, 80, 114, 432, 378, 93, 94, 95, 96, + /* 1610 */ 418, 450, 99, 432, 432, 498, 103, 104, 105, 106, + /* 1620 */ 519, 490, 37, 37, 501, 35, 396, 365, 287, 444, + /* 1630 */ 52, 465, 464, 42, 114, 80, 20, 227, 214, 455, + /* 1640 */ 378, 386, 52, 114, 214, 455, 53, 114, 460, 386, + /* 1650 */ 446, 61, 62, 63, 64, 210, 66, 20, 212, 365, + /* 1660 */ 214, 377, 20, 114, 114, 378, 45, 428, 406, 378, + /* 1670 */ 428, 189, 378, 377, 425, 378, 425, 377, 428, 425, + /* 1680 */ 111, 419, 425, 421, 109, 390, 20, 389, 377, 377, + /* 1690 */ 108, 388, 246, 247, 377, 377, 377, 370, 50, 374, + /* 1700 */ 406, 455, 112, 370, 374, 115, 260, 261, 262, 263, + /* 1710 */ 264, 265, 266, 419, 20, 421, 20, 20, 386, 379, + /* 1720 */ 386, 386, 421, 445, 379, 463, 20, 435, 466, 386, + /* 1730 */ 377, 370, 470, 471, 472, 473, 474, 475, 386, 477, + /* 1740 */ 365, 368, 386, 386, 386, 406, 484, 368, 406, 377, + /* 1750 */ 488, 489, 406, 378, 406, 406, 406, 463, 370, 231, + /* 1760 */ 466, 384, 113, 457, 470, 471, 472, 473, 474, 475, + /* 1770 */ 406, 477, 406, 365, 406, 185, 406, 406, 484, 419, + /* 1780 */ 459, 406, 488, 489, 194, 195, 378, 20, 419, 218, + /* 1790 */ 454, 201, 202, 419, 419, 384, 421, 421, 217, 365, + /* 1800 */ 377, 419, 455, 452, 295, 451, 294, 303, 203, 444, + /* 1810 */ 220, 305, 378, 288, 406, 437, 509, 507, 437, 304, + /* 1820 */ 507, 505, 507, 309, 510, 307, 506, 419, 504, 421, + /* 1830 */ 444, 312, 527, 378, 283, 20, 469, 123, 463, 285, + /* 1840 */ 406, 466, 384, 521, 379, 470, 471, 472, 473, 474, + /* 1850 */ 475, 384, 477, 419, 113, 421, 437, 520, 419, 484, + /* 1860 */ 195, 502, 437, 488, 489, 433, 113, 487, 419, 419, + /* 1870 */ 419, 463, 419, 402, 466, 384, 1, 384, 470, 471, + /* 1880 */ 472, 473, 474, 475, 500, 477, 38, 419, 378, 419, + /* 1890 */ 410, 419, 22, 419, 19, 419, 370, 463, 419, 365, + /* 1900 */ 466, 384, 419, 419, 470, 471, 472, 473, 474, 475, + /* 1910 */ 35, 477, 378, 419, 367, 419, 419, 419, 484, 419, + /* 1920 */ 419, 377, 365, 489, 419, 447, 51, 52, 438, 371, + /* 1930 */ 385, 363, 524, 525, 45, 378, 61, 62, 63, 64, + /* 1940 */ 406, 66, 419, 419, 0, 365, 419, 0, 400, 419, + /* 1950 */ 419, 419, 0, 419, 419, 421, 400, 419, 378, 456, + /* 1960 */ 400, 0, 37, 406, 237, 37, 37, 37, 237, 0, + /* 1970 */ 37, 237, 37, 37, 438, 0, 419, 237, 421, 0, + /* 1980 */ 37, 0, 37, 0, 22, 0, 406, 112, 37, 232, + /* 1990 */ 115, 0, 220, 0, 220, 214, 221, 463, 441, 419, + /* 2000 */ 466, 421, 212, 0, 470, 471, 472, 473, 474, 475, + /* 2010 */ 0, 477, 0, 208, 207, 0, 0, 156, 0, 49, + /* 2020 */ 463, 441, 49, 466, 149, 365, 37, 470, 471, 472, + /* 2030 */ 473, 474, 475, 0, 477, 0, 37, 0, 378, 52, + /* 2040 */ 0, 49, 45, 463, 0, 0, 466, 513, 0, 365, + /* 2050 */ 470, 471, 472, 473, 474, 475, 49, 477, 0, 0, + /* 2060 */ 0, 0, 378, 0, 0, 175, 406, 37, 0, 194, + /* 2070 */ 175, 0, 0, 365, 0, 0, 201, 0, 0, 419, + /* 2080 */ 0, 421, 0, 0, 0, 0, 378, 0, 0, 0, + /* 2090 */ 406, 0, 0, 0, 0, 220, 0, 0, 49, 0, + /* 2100 */ 45, 0, 0, 419, 0, 421, 0, 0, 0, 0, + /* 2110 */ 0, 0, 365, 156, 406, 0, 0, 22, 155, 154, + /* 2120 */ 0, 0, 22, 463, 0, 378, 466, 419, 66, 421, + /* 2130 */ 470, 471, 472, 473, 474, 475, 50, 477, 0, 22, + /* 2140 */ 50, 0, 66, 0, 0, 66, 0, 463, 0, 365, + /* 2150 */ 466, 37, 0, 406, 470, 471, 472, 473, 474, 475, + /* 2160 */ 37, 477, 378, 37, 66, 52, 419, 42, 421, 42, + /* 2170 */ 52, 463, 37, 42, 466, 0, 516, 37, 470, 471, + /* 2180 */ 472, 473, 474, 475, 52, 477, 0, 479, 441, 33, + /* 2190 */ 406, 42, 45, 14, 49, 365, 0, 43, 0, 42, + /* 2200 */ 49, 0, 49, 419, 0, 421, 0, 42, 378, 525, + /* 2210 */ 463, 203, 0, 466, 0, 49, 0, 470, 471, 472, + /* 2220 */ 473, 474, 475, 0, 477, 441, 0, 37, 52, 365, + /* 2230 */ 42, 0, 74, 52, 37, 42, 406, 0, 0, 37, + /* 2240 */ 0, 52, 378, 52, 37, 42, 0, 463, 0, 419, + /* 2250 */ 466, 421, 42, 0, 470, 471, 472, 473, 474, 475, + /* 2260 */ 0, 477, 0, 121, 37, 365, 22, 0, 0, 22, + /* 2270 */ 406, 37, 37, 37, 119, 0, 37, 0, 378, 37, + /* 2280 */ 37, 22, 37, 419, 33, 421, 37, 37, 33, 37, + /* 2290 */ 0, 37, 22, 463, 37, 22, 466, 0, 22, 365, + /* 2300 */ 470, 471, 472, 473, 474, 475, 406, 477, 37, 22, + /* 2310 */ 54, 0, 378, 0, 0, 37, 37, 0, 22, 419, + /* 2320 */ 20, 421, 37, 114, 113, 37, 37, 463, 0, 192, + /* 2330 */ 466, 113, 124, 49, 470, 471, 472, 473, 474, 475, + /* 2340 */ 406, 477, 125, 0, 37, 22, 0, 219, 215, 22, + /* 2350 */ 0, 192, 192, 419, 0, 421, 195, 33, 3, 289, + /* 2360 */ 192, 199, 192, 463, 3, 50, 466, 37, 199, 37, + /* 2370 */ 470, 471, 472, 473, 474, 475, 113, 477, 114, 113, + /* 2380 */ 33, 50, 33, 114, 33, 113, 365, 49, 114, 49, + /* 2390 */ 109, 111, 33, 33, 289, 37, 114, 463, 0, 378, + /* 2400 */ 466, 289, 37, 37, 470, 471, 472, 473, 474, 475, + /* 2410 */ 37, 477, 365, 114, 113, 37, 113, 113, 113, 37, + /* 2420 */ 114, 49, 114, 114, 114, 378, 33, 406, 49, 0, + /* 2430 */ 42, 113, 365, 33, 2, 22, 111, 111, 246, 49, + /* 2440 */ 419, 269, 421, 114, 49, 378, 282, 114, 113, 113, + /* 2450 */ 113, 0, 113, 406, 113, 194, 114, 113, 113, 22, + /* 2460 */ 42, 196, 114, 49, 249, 113, 419, 114, 421, 33, + /* 2470 */ 114, 37, 37, 406, 22, 113, 113, 113, 37, 122, + /* 2480 */ 113, 113, 113, 113, 463, 114, 419, 466, 421, 113, + /* 2490 */ 113, 470, 471, 472, 473, 474, 475, 123, 477, 114, + /* 2500 */ 114, 114, 113, 37, 37, 114, 114, 124, 37, 37, + /* 2510 */ 463, 114, 74, 466, 37, 365, 136, 470, 471, 472, + /* 2520 */ 473, 474, 475, 73, 477, 113, 125, 22, 378, 113, + /* 2530 */ 463, 37, 365, 466, 113, 136, 37, 470, 471, 472, + /* 2540 */ 473, 474, 475, 136, 477, 378, 136, 37, 365, 37, + /* 2550 */ 37, 37, 37, 37, 37, 37, 406, 37, 80, 80, + /* 2560 */ 107, 378, 107, 33, 37, 37, 37, 22, 37, 419, + /* 2570 */ 37, 421, 37, 406, 37, 80, 37, 37, 37, 37, + /* 2580 */ 22, 37, 0, 37, 52, 42, 419, 0, 421, 406, + /* 2590 */ 37, 42, 0, 37, 42, 0, 37, 42, 0, 52, + /* 2600 */ 52, 37, 419, 52, 421, 0, 22, 0, 37, 33, + /* 2610 */ 22, 22, 21, 463, 20, 22, 466, 528, 22, 528, + /* 2620 */ 470, 471, 472, 473, 474, 475, 528, 477, 528, 21, + /* 2630 */ 463, 528, 528, 466, 528, 528, 528, 470, 471, 472, + /* 2640 */ 473, 474, 475, 528, 477, 528, 463, 528, 528, 466, + /* 2650 */ 528, 365, 528, 470, 471, 472, 473, 474, 475, 528, + /* 2660 */ 477, 528, 528, 528, 378, 528, 528, 365, 528, 528, + /* 2670 */ 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, + /* 2680 */ 378, 528, 528, 528, 528, 365, 528, 528, 528, 528, + /* 2690 */ 528, 528, 406, 528, 528, 528, 528, 528, 378, 528, + /* 2700 */ 528, 528, 528, 528, 528, 419, 528, 421, 406, 528, + /* 2710 */ 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, + /* 2720 */ 528, 419, 528, 421, 528, 528, 406, 528, 528, 528, + /* 2730 */ 528, 528, 528, 528, 528, 528, 528, 528, 528, 419, + /* 2740 */ 528, 421, 528, 528, 528, 528, 528, 528, 528, 463, + /* 2750 */ 528, 528, 466, 528, 528, 528, 470, 471, 472, 473, + /* 2760 */ 474, 475, 528, 477, 528, 463, 528, 528, 466, 528, + /* 2770 */ 528, 365, 470, 471, 472, 473, 474, 475, 528, 477, + /* 2780 */ 528, 528, 528, 463, 378, 528, 466, 528, 528, 528, + /* 2790 */ 470, 471, 472, 473, 474, 475, 528, 477, 365, 528, + /* 2800 */ 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, + /* 2810 */ 528, 378, 406, 528, 528, 528, 528, 528, 528, 365, + /* 2820 */ 528, 528, 528, 528, 528, 419, 528, 421, 528, 528, + /* 2830 */ 528, 528, 378, 528, 528, 528, 528, 528, 528, 406, + /* 2840 */ 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, + /* 2850 */ 528, 528, 419, 528, 421, 528, 528, 365, 528, 528, + /* 2860 */ 406, 528, 528, 528, 528, 528, 528, 528, 528, 463, + /* 2870 */ 378, 528, 466, 419, 528, 421, 470, 471, 472, 473, + /* 2880 */ 474, 475, 528, 477, 528, 528, 528, 528, 528, 528, + /* 2890 */ 528, 528, 528, 528, 528, 528, 463, 528, 406, 466, + /* 2900 */ 528, 528, 528, 470, 471, 472, 473, 474, 475, 528, + /* 2910 */ 477, 419, 528, 421, 528, 528, 528, 463, 528, 528, + /* 2920 */ 466, 528, 528, 528, 470, 471, 472, 473, 474, 475, + /* 2930 */ 528, 477, 528, 528, 528, 365, 528, 528, 528, 528, + /* 2940 */ 528, 528, 528, 528, 528, 528, 528, 528, 378, 528, + /* 2950 */ 528, 528, 528, 528, 528, 463, 528, 528, 466, 528, + /* 2960 */ 528, 528, 470, 471, 472, 473, 474, 475, 365, 477, + /* 2970 */ 528, 528, 528, 528, 528, 528, 406, 528, 528, 528, + /* 2980 */ 528, 378, 528, 528, 528, 528, 528, 528, 528, 419, + /* 2990 */ 528, 421, 528, 528, 528, 528, 528, 528, 528, 528, + /* 3000 */ 528, 528, 528, 528, 528, 365, 528, 528, 528, 406, + /* 3010 */ 528, 528, 528, 528, 528, 528, 528, 528, 378, 528, + /* 3020 */ 528, 528, 419, 528, 421, 528, 528, 528, 528, 528, + /* 3030 */ 528, 528, 528, 463, 528, 528, 466, 528, 528, 528, + /* 3040 */ 470, 471, 472, 473, 474, 475, 406, 477, 528, 528, + /* 3050 */ 528, 365, 528, 528, 528, 528, 528, 528, 528, 419, + /* 3060 */ 528, 421, 528, 528, 378, 528, 463, 528, 528, 466, + /* 3070 */ 528, 528, 528, 470, 471, 472, 473, 474, 475, 528, + /* 3080 */ 477, 528, 528, 528, 528, 528, 528, 365, 528, 528, + /* 3090 */ 528, 528, 406, 528, 528, 528, 528, 528, 528, 528, + /* 3100 */ 378, 528, 528, 463, 528, 419, 466, 421, 528, 528, + /* 3110 */ 470, 471, 472, 473, 474, 475, 528, 477, 528, 528, + /* 3120 */ 528, 528, 528, 528, 528, 528, 528, 528, 406, 528, + /* 3130 */ 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, + /* 3140 */ 528, 419, 528, 421, 528, 528, 528, 528, 528, 463, + /* 3150 */ 528, 528, 466, 528, 528, 528, 470, 471, 472, 473, + /* 3160 */ 474, 475, 528, 477, 528, 528, 528, 528, 528, 528, + /* 3170 */ 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, + /* 3180 */ 528, 528, 528, 528, 528, 463, 528, 528, 466, 528, + /* 3190 */ 528, 528, 470, 471, 472, 473, 474, 475, 528, 477, + /* 3200 */ 362, 362, 362, 362, 362, 362, 362, 362, 362, 362, + /* 3210 */ 362, 362, 362, 362, 362, 362, 362, 362, 362, 362, + /* 3220 */ 362, 362, 362, 362, 362, 362, 362, 362, 362, 362, + /* 3230 */ 362, 362, 362, 362, 362, 362, 362, 362, 362, 362, + /* 3240 */ 362, 362, 362, 362, 362, 362, 362, 362, 362, 362, + /* 3250 */ 362, 362, 362, 362, 362, 362, 362, 362, 362, 362, + /* 3260 */ 362, 362, 362, 362, 362, 362, 362, 362, 362, 362, + /* 3270 */ 362, 362, 362, 362, 362, 362, 362, 362, 362, 362, + /* 3280 */ 362, 362, 362, 362, 362, 362, 362, 362, 362, 362, + /* 3290 */ 362, 362, 362, 362, 362, 362, 362, 362, 362, 362, + /* 3300 */ 362, 362, 362, 362, 362, 362, 362, 362, 362, 362, + /* 3310 */ 362, 362, 362, 362, 362, 362, 362, 362, 362, 362, + /* 3320 */ 362, 362, 362, 362, 362, 362, 362, 362, 362, 362, + /* 3330 */ 362, 362, 362, 362, 362, 362, 362, 362, 362, 362, + /* 3340 */ 362, 362, 362, 362, 362, 362, 362, 362, 362, 362, + /* 3350 */ 362, 362, 362, 362, 362, 362, 362, 362, 362, 362, + /* 3360 */ 362, 362, 362, 362, 362, 362, 362, 362, 362, 362, + /* 3370 */ 362, 362, 362, 362, 362, 362, 362, 362, 362, 362, + /* 3380 */ 362, 362, 362, 362, 362, 362, 362, 362, 362, 362, + /* 3390 */ 362, 362, 362, 362, 362, 362, 362, 362, 362, 362, + /* 3400 */ 362, 362, 362, 362, 362, 362, 362, 362, 362, 362, + /* 3410 */ 362, 362, 362, 362, 362, 362, 362, 362, 362, 362, + /* 3420 */ 362, 362, 362, 362, 362, 362, 362, 362, 362, 362, + /* 3430 */ 362, 362, 362, 362, 362, 362, 362, 362, 362, 362, + /* 3440 */ 362, 362, 362, 362, 362, 362, 362, 362, 362, 362, + /* 3450 */ 362, 362, 362, 362, 362, 362, 362, 362, 362, 362, + /* 3460 */ 362, 362, 362, 362, 362, 362, 362, 362, 362, 362, + /* 3470 */ 362, 362, 362, 362, 362, 362, 362, 362, 362, 362, + /* 3480 */ 362, 362, 362, 362, 362, 362, 362, 362, 362, 362, + /* 3490 */ 362, 362, 362, 362, 362, 362, 362, 362, 362, 362, + /* 3500 */ 362, 362, 362, 362, 362, 362, 362, 362, 362, 362, + /* 3510 */ 362, 362, 362, 362, 362, 362, 362, 362, 362, 362, + /* 3520 */ 362, 362, 362, 362, 362, 362, 362, 362, 362, 362, + /* 3530 */ 362, 362, 362, 362, 362, 362, 362, 362, 362, 362, + /* 3540 */ 362, 362, 362, 362, 362, 362, 362, 362, 362, 362, + /* 3550 */ 362, 362, 362, 362, 362, 362, 362, 362, 362, 362, + /* 3560 */ 362, 362, }; -#define YY_SHIFT_COUNT (904) +#define YY_SHIFT_COUNT (912) #define YY_SHIFT_MIN (0) -#define YY_SHIFT_MAX (2555) +#define YY_SHIFT_MAX (2608) static const unsigned short int yy_shift_ofst[] = { - /* 0 */ 136, 0, 252, 0, 505, 505, 505, 505, 505, 505, - /* 10 */ 505, 505, 505, 505, 505, 505, 757, 1009, 1009, 1261, - /* 20 */ 1009, 1009, 1009, 1009, 1009, 1009, 1009, 1009, 1009, 1009, - /* 30 */ 1009, 1009, 1009, 1009, 1009, 1009, 1009, 1009, 1009, 1009, - /* 40 */ 1009, 1009, 1009, 1009, 1009, 1009, 1009, 1009, 1009, 1009, - /* 50 */ 175, 333, 376, 214, 181, 295, 181, 181, 214, 214, - /* 60 */ 181, 840, 181, 251, 840, 83, 181, 14, 1360, 763, - /* 70 */ 140, 140, 1360, 1360, 582, 582, 763, 180, 192, 268, - /* 80 */ 268, 645, 140, 140, 140, 140, 140, 140, 140, 140, - /* 90 */ 140, 140, 140, 151, 273, 140, 140, 291, 14, 140, - /* 100 */ 151, 140, 14, 140, 140, 14, 140, 140, 14, 140, - /* 110 */ 14, 14, 14, 140, 306, 205, 205, 430, 506, 67, - /* 120 */ 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, - /* 130 */ 246, 246, 246, 246, 246, 246, 246, 246, 246, 756, - /* 140 */ 523, 180, 192, 897, 897, 238, 191, 191, 191, 516, - /* 150 */ 516, 519, 1205, 238, 291, 14, 368, 14, 259, 14, - /* 160 */ 14, 458, 14, 458, 458, 425, 572, 258, 675, 675, - /* 170 */ 675, 675, 675, 675, 1178, 2232, 21, 47, 215, 50, - /* 180 */ 529, 809, 694, 847, 6, 6, 720, 501, 883, 813, - /* 190 */ 813, 813, 978, 901, 813, 804, 1088, 659, 432, 92, - /* 200 */ 1088, 1088, 1093, 1013, 1108, 1034, 1013, 1268, 1048, 1205, - /* 210 */ 1288, 1521, 1533, 1558, 1357, 291, 1558, 291, 1381, 1570, - /* 220 */ 1571, 1548, 1571, 1548, 1414, 1570, 1571, 1570, 1548, 1414, - /* 230 */ 1414, 1414, 1506, 1520, 1570, 1524, 1570, 1570, 1570, 1623, - /* 240 */ 1600, 1623, 1600, 1558, 291, 291, 1639, 291, 1643, 1645, - /* 250 */ 291, 1643, 291, 1647, 291, 291, 1570, 291, 1623, 14, - /* 260 */ 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - /* 270 */ 1570, 572, 572, 1623, 458, 458, 458, 1457, 1579, 1558, - /* 280 */ 306, 1676, 1487, 1504, 1639, 306, 1288, 1570, 458, 1438, - /* 290 */ 1450, 1438, 1450, 1454, 1544, 1438, 1460, 1462, 1485, 1288, - /* 300 */ 1465, 1467, 1475, 1501, 1571, 1766, 1668, 1507, 1643, 306, - /* 310 */ 306, 1680, 1450, 458, 458, 458, 458, 1450, 458, 1616, - /* 320 */ 306, 425, 306, 1571, 458, 458, 458, 458, 458, 458, - /* 330 */ 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, - /* 340 */ 458, 458, 458, 458, 458, 458, 1706, 458, 1570, 306, - /* 350 */ 1802, 1790, 1623, 3200, 3200, 3200, 3200, 3200, 3200, 3200, - /* 360 */ 3200, 3200, 36, 2300, 270, 543, 435, 62, 224, 608, - /* 370 */ 673, 655, 772, 787, 300, 300, 300, 300, 300, 300, - /* 380 */ 300, 300, 300, 388, 807, 657, 314, 314, 290, 34, - /* 390 */ 539, 153, 793, 748, 845, 1047, 513, 961, 553, 626, - /* 400 */ 995, 164, 626, 626, 626, 1002, 1002, 1299, 1120, 1247, - /* 410 */ 1277, 1270, 1185, 68, 588, 1194, 1209, 1226, 1313, 1318, - /* 420 */ 1322, 1342, 1343, 1347, 839, 1275, 1281, 1269, 1306, 1315, - /* 430 */ 1320, 1325, 1215, 1142, 1182, 1333, 1400, 1341, 1284, 1355, - /* 440 */ 1327, 1356, 1363, 1388, 1417, 1423, 1407, 1432, 1448, 1455, - /* 450 */ 1464, 1478, 1516, 1518, 1522, 1529, 1541, 1459, 1466, 1499, - /* 460 */ 1519, 1526, 1531, 1289, 1161, 1386, 1425, 1444, 1395, 1449, - /* 470 */ 1882, 1885, 1886, 1844, 1890, 1855, 1660, 1857, 1864, 1866, - /* 480 */ 1671, 1905, 1869, 1871, 1677, 1872, 1911, 1681, 1913, 1878, - /* 490 */ 1916, 1880, 1926, 1899, 1922, 1887, 1695, 1928, 1713, 1931, - /* 500 */ 1716, 1717, 1723, 1727, 1936, 1937, 1938, 1735, 1737, 1941, - /* 510 */ 1942, 1792, 1896, 1897, 1947, 1914, 1952, 1953, 1917, 1903, - /* 520 */ 1956, 1908, 1958, 1915, 1959, 1962, 1964, 1918, 1965, 1966, - /* 530 */ 1968, 1970, 1973, 1974, 1804, 1945, 1985, 1816, 1988, 1991, - /* 540 */ 1992, 1993, 1994, 1996, 1997, 1998, 1999, 2000, 2001, 2003, - /* 550 */ 2004, 2009, 2011, 2018, 2020, 2021, 2022, 2024, 1976, 2026, - /* 560 */ 1982, 2029, 2032, 2033, 2034, 2044, 2046, 2047, 2048, 2019, - /* 570 */ 2049, 1898, 2052, 1856, 2053, 1904, 2056, 2057, 2036, 2010, - /* 580 */ 2037, 2012, 2061, 2002, 2030, 2063, 2005, 2072, 2008, 2073, - /* 590 */ 2075, 2039, 2025, 2028, 2078, 2042, 2031, 2038, 2081, 2051, - /* 600 */ 2040, 2043, 2084, 2054, 2086, 2055, 2060, 2071, 2058, 2064, - /* 610 */ 2079, 2065, 2089, 2062, 2067, 2103, 2106, 2112, 2121, 2082, - /* 620 */ 1927, 2127, 2058, 2080, 2128, 2131, 2059, 2133, 2134, 2098, - /* 630 */ 2085, 2094, 2138, 2102, 2088, 2099, 2142, 2107, 2093, 2104, - /* 640 */ 2148, 2113, 2097, 2109, 2152, 2153, 2154, 2155, 2156, 2157, - /* 650 */ 2045, 2050, 2122, 2136, 2163, 2146, 2129, 2132, 2135, 2143, - /* 660 */ 2145, 2150, 2158, 2159, 2140, 2161, 2160, 2162, 2167, 2168, - /* 670 */ 2164, 2169, 2183, 2170, 2185, 2176, 2165, 2190, 2178, 2171, - /* 680 */ 2202, 2204, 2209, 2173, 2211, 2175, 2213, 2192, 2187, 2179, - /* 690 */ 2180, 2181, 2105, 2111, 2221, 2074, 2110, 2101, 2115, 2035, - /* 700 */ 2058, 2177, 2225, 2076, 2196, 2205, 2241, 2066, 2224, 2077, - /* 710 */ 2069, 2243, 2251, 2083, 2068, 2087, 2090, 2258, 2234, 1981, - /* 720 */ 2149, 2166, 2172, 2174, 2231, 2235, 2184, 2220, 2182, 2223, - /* 730 */ 2191, 2194, 2245, 2246, 2199, 2188, 2201, 2203, 2206, 2247, - /* 740 */ 2237, 2238, 2208, 2250, 1989, 2210, 2212, 2285, 2257, 2091, - /* 750 */ 2274, 2281, 2284, 2291, 2292, 2294, 2222, 2227, 2290, 2014, - /* 760 */ 2307, 2293, 2343, 2344, 2236, 2304, 2314, 2242, 2092, 2244, - /* 770 */ 2346, 2328, 2114, 2248, 2249, 2256, 2260, 2261, 2262, 2263, - /* 780 */ 2264, 2306, 2266, 2268, 2311, 2269, 2331, 2139, 2276, 2283, - /* 790 */ 2286, 2277, 2289, 2186, 2295, 2367, 2357, 2215, 2297, 2282, - /* 800 */ 2058, 2324, 2298, 2301, 2302, 2305, 2308, 2299, 2303, 2364, - /* 810 */ 2366, 2310, 2313, 2379, 2312, 2315, 2383, 2256, 2316, 2390, - /* 820 */ 2260, 2318, 2392, 2261, 2320, 2395, 2262, 2309, 2322, 2323, - /* 830 */ 2325, 2317, 2332, 2326, 2400, 2327, 2397, 2336, 2400, 2400, - /* 840 */ 2415, 2386, 2368, 2438, 2424, 2425, 2426, 2427, 2428, 2430, - /* 850 */ 2431, 2433, 2434, 2403, 2380, 2405, 2385, 2453, 2452, 2456, - /* 860 */ 2457, 2473, 2459, 2462, 2464, 2423, 2140, 2467, 2161, 2469, - /* 870 */ 2476, 2478, 2480, 2497, 2484, 2522, 2486, 2472, 2483, 2526, - /* 880 */ 2490, 2479, 2488, 2528, 2505, 2482, 2502, 2545, 2510, 2496, - /* 890 */ 2507, 2550, 2514, 2552, 2531, 2517, 2555, 2534, 2524, 2536, - /* 900 */ 2539, 2540, 2541, 2543, 2546, + /* 0 */ 416, 0, 256, 0, 513, 513, 513, 513, 513, 513, + /* 10 */ 513, 513, 513, 513, 513, 513, 769, 1025, 1025, 1281, + /* 20 */ 1025, 1025, 1025, 1025, 1025, 1025, 1025, 1025, 1025, 1025, + /* 30 */ 1025, 1025, 1025, 1025, 1025, 1025, 1025, 1025, 1025, 1025, + /* 40 */ 1025, 1025, 1025, 1025, 1025, 1025, 1025, 1025, 1025, 1025, + /* 50 */ 217, 221, 97, 604, 27, 37, 27, 27, 604, 604, + /* 60 */ 27, 1446, 27, 255, 1446, 345, 27, 79, 686, 299, + /* 70 */ 134, 134, 686, 686, 786, 786, 299, 52, 713, 68, + /* 80 */ 68, 69, 134, 134, 134, 134, 134, 134, 134, 134, + /* 90 */ 134, 134, 134, 141, 264, 134, 134, 128, 79, 134, + /* 100 */ 141, 134, 79, 134, 134, 79, 134, 134, 79, 134, + /* 110 */ 79, 79, 79, 134, 260, 82, 82, 433, 894, 117, + /* 120 */ 508, 508, 508, 508, 508, 508, 508, 508, 508, 508, + /* 130 */ 508, 508, 508, 508, 508, 508, 508, 508, 508, 436, + /* 140 */ 851, 52, 713, 938, 938, 13, 981, 981, 981, 360, + /* 150 */ 360, 397, 745, 13, 128, 79, 218, 79, 122, 79, + /* 160 */ 79, 464, 79, 464, 464, 317, 438, 91, 471, 471, + /* 170 */ 471, 471, 471, 471, 1513, 1875, 15, 48, 330, 192, + /* 180 */ 761, 275, 942, 1052, 102, 102, 944, 535, 1065, 762, + /* 190 */ 762, 762, 415, 457, 762, 1197, 429, 1198, 101, 1022, + /* 200 */ 429, 429, 983, 1056, 1100, 7, 1056, 708, 874, 745, + /* 210 */ 1341, 1578, 1591, 1616, 1410, 128, 1616, 128, 1445, 1637, + /* 220 */ 1642, 1621, 1642, 1621, 1482, 1637, 1642, 1637, 1621, 1482, + /* 230 */ 1482, 1482, 1569, 1575, 1637, 1637, 1582, 1637, 1637, 1637, + /* 240 */ 1666, 1648, 1666, 1648, 1616, 128, 128, 1694, 128, 1696, + /* 250 */ 1697, 128, 1696, 128, 1706, 128, 128, 1637, 128, 1666, + /* 260 */ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, + /* 270 */ 79, 1637, 438, 438, 1666, 464, 464, 464, 1528, 1649, + /* 280 */ 1616, 260, 1767, 1571, 1581, 1694, 260, 1341, 1637, 464, + /* 290 */ 1509, 1512, 1509, 1512, 1504, 1605, 1509, 1506, 1515, 1525, + /* 300 */ 1341, 1519, 1514, 1518, 1551, 1642, 1815, 1714, 1554, 1696, + /* 310 */ 260, 260, 1741, 1512, 464, 464, 464, 464, 1512, 464, + /* 320 */ 1665, 260, 317, 260, 1642, 464, 464, 464, 464, 464, + /* 330 */ 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, + /* 340 */ 464, 464, 464, 464, 464, 464, 464, 1753, 464, 1637, + /* 350 */ 260, 1870, 1848, 1666, 3200, 3200, 3200, 3200, 3200, 3200, + /* 360 */ 3200, 3200, 3200, 81, 1590, 274, 784, 92, 180, 860, + /* 370 */ 799, 815, 929, 392, 862, 62, 62, 62, 62, 62, + /* 380 */ 62, 62, 62, 62, 226, 485, 692, 71, 71, 293, + /* 390 */ 87, 627, 884, 72, 179, 512, 383, 903, 1104, 570, + /* 400 */ 778, 130, 401, 778, 778, 778, 1060, 1060, 1363, 1248, + /* 410 */ 1274, 1344, 1122, 1186, 1299, 1304, 1308, 1309, 1328, 1355, + /* 420 */ 1362, 1400, 1429, 1448, 1460, 1469, 1040, 1397, 1403, 1331, + /* 430 */ 1416, 1440, 1441, 1443, 1302, 426, 1069, 1444, 1463, 1447, + /* 440 */ 1338, 1459, 1406, 1461, 1464, 1466, 1473, 1477, 1475, 1488, + /* 450 */ 1492, 1495, 1502, 1508, 1511, 1537, 1539, 1552, 1564, 1489, + /* 460 */ 1520, 1529, 1533, 1549, 1550, 114, 1522, 1424, 1430, 1585, + /* 470 */ 1586, 1555, 1593, 1944, 1947, 1952, 1889, 1961, 1925, 1727, + /* 480 */ 1928, 1929, 1930, 1731, 1969, 1933, 1935, 1734, 1936, 1975, + /* 490 */ 1740, 1979, 1943, 1981, 1945, 1983, 1962, 1985, 1951, 1757, + /* 500 */ 1991, 1772, 1993, 1774, 1775, 1781, 1790, 2003, 2010, 2012, + /* 510 */ 1805, 1807, 2015, 2016, 1861, 1970, 1973, 2018, 1989, 2033, + /* 520 */ 2035, 1999, 1987, 2037, 1992, 2040, 1997, 2044, 2045, 2048, + /* 530 */ 2007, 2058, 2059, 2060, 2061, 2063, 2064, 1890, 2030, 2068, + /* 540 */ 1895, 2071, 2072, 2074, 2075, 2077, 2078, 2080, 2082, 2083, + /* 550 */ 2084, 2085, 2087, 2088, 2089, 2091, 2092, 2093, 2094, 2096, + /* 560 */ 2097, 2049, 2099, 2055, 2101, 2102, 2104, 2106, 2107, 2108, + /* 570 */ 2109, 2110, 2095, 2111, 1957, 2115, 1963, 2116, 1965, 2120, + /* 580 */ 2121, 2100, 2086, 2117, 2090, 2124, 2062, 2138, 2076, 2114, + /* 590 */ 2141, 2079, 2143, 2098, 2144, 2146, 2123, 2113, 2125, 2148, + /* 600 */ 2126, 2118, 2127, 2152, 2135, 2132, 2131, 2175, 2140, 2186, + /* 610 */ 2147, 2149, 2156, 2145, 2151, 2179, 2153, 2196, 2154, 2157, + /* 620 */ 2198, 2201, 2204, 2206, 2165, 2008, 2212, 2145, 2166, 2214, + /* 630 */ 2216, 2158, 2223, 2226, 2190, 2176, 2188, 2231, 2197, 2181, + /* 640 */ 2193, 2237, 2202, 2189, 2203, 2238, 2207, 2191, 2210, 2240, + /* 650 */ 2246, 2248, 2253, 2260, 2262, 2142, 2155, 2227, 2244, 2267, + /* 660 */ 2247, 2234, 2235, 2236, 2239, 2242, 2243, 2245, 2249, 2250, + /* 670 */ 2251, 2255, 2252, 2254, 2259, 2257, 2268, 2270, 2275, 2273, + /* 680 */ 2277, 2276, 2256, 2290, 2287, 2271, 2297, 2311, 2313, 2278, + /* 690 */ 2314, 2279, 2317, 2296, 2300, 2285, 2288, 2289, 2209, 2211, + /* 700 */ 2328, 2137, 2208, 2217, 2218, 2128, 2145, 2284, 2343, 2159, + /* 710 */ 2307, 2323, 2346, 2133, 2327, 2160, 2161, 2350, 2354, 2168, + /* 720 */ 2162, 2170, 2169, 2355, 2324, 2070, 2263, 2264, 2266, 2269, + /* 730 */ 2330, 2332, 2272, 2315, 2280, 2331, 2281, 2274, 2347, 2349, + /* 740 */ 2282, 2301, 2303, 2304, 2299, 2351, 2338, 2340, 2305, 2359, + /* 750 */ 2105, 2306, 2308, 2361, 2360, 2112, 2358, 2365, 2366, 2373, + /* 760 */ 2378, 2382, 2309, 2310, 2372, 2164, 2393, 2379, 2398, 2429, + /* 770 */ 2318, 2388, 2400, 2325, 2172, 2326, 2432, 2413, 2192, 2329, + /* 780 */ 2333, 2335, 2336, 2337, 2339, 2341, 2342, 2390, 2344, 2345, + /* 790 */ 2395, 2348, 2437, 2215, 2352, 2353, 2356, 2362, 2363, 2265, + /* 800 */ 2364, 2451, 2418, 2261, 2367, 2357, 2145, 2414, 2368, 2369, + /* 810 */ 2371, 2370, 2376, 2374, 2385, 2434, 2435, 2377, 2386, 2441, + /* 820 */ 2389, 2387, 2466, 2335, 2391, 2467, 2336, 2392, 2471, 2337, + /* 830 */ 2397, 2472, 2339, 2380, 2399, 2407, 2410, 2401, 2383, 2412, + /* 840 */ 2436, 2416, 2477, 2421, 2436, 2436, 2452, 2438, 2450, 2505, + /* 850 */ 2494, 2499, 2510, 2512, 2513, 2514, 2515, 2516, 2517, 2518, + /* 860 */ 2520, 2478, 2453, 2479, 2455, 2530, 2527, 2528, 2529, 2545, + /* 870 */ 2531, 2533, 2535, 2495, 2251, 2537, 2255, 2539, 2540, 2541, + /* 880 */ 2542, 2558, 2544, 2582, 2546, 2532, 2543, 2587, 2553, 2547, + /* 890 */ 2549, 2592, 2556, 2548, 2552, 2595, 2559, 2551, 2555, 2598, + /* 900 */ 2564, 2605, 2584, 2571, 2607, 2588, 2576, 2589, 2591, 2593, + /* 910 */ 2596, 2608, 2594, }; -#define YY_REDUCE_COUNT (361) -#define YY_REDUCE_MIN (-487) -#define YY_REDUCE_MAX (2726) +#define YY_REDUCE_COUNT (362) +#define YY_REDUCE_MIN (-492) +#define YY_REDUCE_MAX (2722) static const short yy_reduce_ofst[] = { - /* 0 */ 188, 177, 257, 371, 417, 662, 692, 765, 944, 1016, - /* 10 */ 507, 1078, 1164, 1236, 1266, 1297, 1383, 1410, 1429, 1510, - /* 20 */ 1546, 1569, 1628, 1649, 1708, 1769, 1786, 1832, 1921, 1980, - /* 30 */ 2007, 2041, 2070, 2118, 2144, 2207, 2233, 2255, 2335, 2355, - /* 40 */ 2381, 2416, 2492, 2519, 2538, 2578, 2608, 2667, 2697, 2726, - /* 50 */ -349, -329, -411, -291, 686, 798, 815, 886, -23, 447, - /* 60 */ 945, 508, -487, -269, 578, -340, 225, -393, -404, -210, - /* 70 */ -212, 90, 187, 386, -361, -92, -268, -387, 221, 57, - /* 80 */ 84, -67, -288, -17, 454, 500, -54, 63, 552, 568, - /* 90 */ 586, 589, 118, 124, -164, 652, 661, -226, 168, 669, - /* 100 */ 498, 683, -379, 685, 687, 497, 696, 699, 320, 730, - /* 110 */ 592, 672, 712, 743, -222, 115, 115, 255, 321, -358, - /* 120 */ 37, 56, 316, 634, 678, 723, 734, 749, 758, 773, - /* 130 */ 776, 791, 792, 794, 810, 831, 832, 833, 860, -385, - /* 140 */ -7, -312, 695, 805, 811, 799, -7, 285, 429, 731, - /* 150 */ 737, 329, -348, 781, 894, 288, 536, 783, -422, 876, - /* 160 */ 818, 410, 877, 870, 885, 828, 923, -397, 209, 232, - /* 170 */ 381, 404, 461, -397, 344, 561, 622, 917, 700, 838, - /* 180 */ 848, 1006, 977, 977, 996, 1003, 999, 1062, 1014, 931, - /* 190 */ 943, 960, 1041, 977, 962, 1129, 1069, 1162, 1125, 1097, - /* 200 */ 1122, 1127, 977, 1063, 1063, 1045, 1063, 1075, 1068, 1175, - /* 210 */ 1132, 1113, 1117, 1131, 1128, 1201, 1134, 1204, 1146, 1216, - /* 220 */ 1218, 1170, 1221, 1174, 1183, 1230, 1231, 1233, 1184, 1186, - /* 230 */ 1190, 1191, 1228, 1239, 1242, 1255, 1272, 1273, 1274, 1286, - /* 240 */ 1285, 1290, 1287, 1203, 1278, 1279, 1245, 1282, 1291, 1229, - /* 250 */ 1292, 1294, 1293, 1241, 1295, 1296, 1300, 1298, 1310, 1280, - /* 260 */ 1283, 1308, 1309, 1311, 1316, 1317, 1321, 1324, 1328, 1329, - /* 270 */ 1314, 1326, 1330, 1323, 1264, 1271, 1276, 1237, 1240, 1246, - /* 280 */ 1335, 1250, 1260, 1301, 1305, 1344, 1302, 1354, 1332, 1235, - /* 290 */ 1312, 1238, 1319, 1243, 1249, 1252, 1256, 1259, 1304, 1334, - /* 300 */ 1253, 1258, 1263, 1063, 1409, 1331, 1303, 1336, 1416, 1412, - /* 310 */ 1413, 1337, 1361, 1380, 1382, 1384, 1387, 1372, 1391, 1379, - /* 320 */ 1430, 1411, 1431, 1439, 1399, 1401, 1402, 1403, 1404, 1406, - /* 330 */ 1408, 1415, 1418, 1419, 1420, 1421, 1422, 1424, 1426, 1428, - /* 340 */ 1433, 1445, 1446, 1447, 1451, 1452, 1434, 1453, 1456, 1442, - /* 350 */ 1463, 1471, 1481, 1427, 1435, 1440, 1441, 1468, 1469, 1477, - /* 360 */ 1482, 1500, + /* 0 */ -44, 213, -354, -86, 420, 440, 677, 712, 930, 968, + /* 10 */ 640, 896, 1097, 1262, 1294, 1375, 272, 792, 1408, 1434, + /* 20 */ 1534, 1557, 1580, 1660, 1684, 1708, 1747, 1784, 1830, 1864, + /* 30 */ 1900, 1934, 2021, 2047, 2067, 2150, 2167, 2183, 2286, 2302, + /* 40 */ 2320, 2406, 2433, 2454, 2492, 2570, 2603, 2640, 2686, 2722, + /* 50 */ 577, 703, 144, -30, 152, 462, 728, 899, -169, 359, + /* 60 */ 967, 620, -492, -375, 252, -490, -117, 588, -408, 59, + /* 70 */ 276, 480, -374, -355, -137, -95, -151, 126, -134, -356, + /* 80 */ -166, 290, -359, 239, 510, 556, -27, 104, 687, 704, + /* 90 */ 730, 767, 169, -9, -40, 791, 831, 435, 183, 852, + /* 100 */ 286, 855, 717, 857, 863, 521, 934, 943, 740, 946, + /* 110 */ 642, 750, 900, 948, 517, -281, -281, -399, 190, -337, + /* 120 */ -360, 421, 451, 520, 639, 715, 739, 755, 772, 828, + /* 130 */ 878, 931, 957, 962, 963, 987, 989, 990, 1007, -53, + /* 140 */ 212, -352, 446, 498, 609, 789, 212, 353, 368, 211, + /* 150 */ 714, -282, 16, 812, 707, 227, 458, 657, 492, 913, + /* 160 */ 830, 659, 935, 840, 918, 954, 961, -406, 187, 235, + /* 170 */ 253, 380, 482, -406, 450, 474, 597, 504, 442, 529, + /* 180 */ 581, 798, 952, 952, 966, 970, 945, 1014, 1064, 984, + /* 190 */ 988, 995, 1083, 952, 1080, 1219, 1172, 1227, 1192, 1161, + /* 200 */ 1181, 1182, 952, 1117, 1117, 1101, 1117, 1131, 1123, 1230, + /* 210 */ 1185, 1166, 1168, 1184, 1188, 1255, 1190, 1263, 1204, 1284, + /* 220 */ 1287, 1239, 1291, 1242, 1249, 1296, 1297, 1300, 1250, 1251, + /* 230 */ 1254, 1257, 1295, 1298, 1311, 1312, 1303, 1317, 1318, 1319, + /* 240 */ 1327, 1325, 1333, 1330, 1246, 1332, 1334, 1301, 1335, 1340, + /* 250 */ 1278, 1343, 1345, 1352, 1292, 1356, 1357, 1353, 1358, 1361, + /* 260 */ 1339, 1342, 1346, 1348, 1349, 1350, 1364, 1366, 1368, 1370, + /* 270 */ 1371, 1372, 1373, 1379, 1388, 1360, 1369, 1374, 1321, 1306, + /* 280 */ 1347, 1377, 1336, 1351, 1354, 1376, 1411, 1365, 1423, 1382, + /* 290 */ 1310, 1378, 1313, 1381, 1314, 1307, 1315, 1320, 1316, 1324, + /* 300 */ 1386, 1305, 1322, 1337, 1117, 1455, 1367, 1359, 1384, 1465, + /* 310 */ 1458, 1467, 1380, 1419, 1439, 1449, 1450, 1451, 1425, 1453, + /* 320 */ 1432, 1491, 1471, 1493, 1510, 1468, 1470, 1472, 1474, 1476, + /* 330 */ 1479, 1483, 1484, 1494, 1496, 1497, 1498, 1500, 1501, 1505, + /* 340 */ 1523, 1524, 1527, 1530, 1531, 1532, 1535, 1480, 1538, 1544, + /* 350 */ 1517, 1547, 1558, 1526, 1478, 1503, 1490, 1536, 1548, 1556, + /* 360 */ 1560, 1545, 1568, }; static const YYACTIONTYPE yy_default[] = { - /* 0 */ 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, - /* 10 */ 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, - /* 20 */ 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, - /* 30 */ 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, - /* 40 */ 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, - /* 50 */ 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, - /* 60 */ 2398, 2048, 2048, 2361, 2048, 2048, 2048, 2048, 2048, 2048, - /* 70 */ 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2368, 2048, 2048, - /* 80 */ 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, - /* 90 */ 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2148, 2048, 2048, - /* 100 */ 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, - /* 110 */ 2048, 2048, 2048, 2048, 2146, 2647, 2048, 2048, 2048, 2048, - /* 120 */ 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, - /* 130 */ 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, - /* 140 */ 2659, 2048, 2048, 2120, 2120, 2048, 2659, 2659, 2659, 2619, - /* 150 */ 2619, 2146, 2048, 2048, 2148, 2048, 2440, 2048, 2048, 2048, - /* 160 */ 2048, 2048, 2048, 2048, 2048, 2278, 2078, 2438, 2048, 2048, - /* 170 */ 2048, 2048, 2048, 2048, 2424, 2048, 2048, 2688, 2750, 2048, - /* 180 */ 2691, 2048, 2048, 2048, 2048, 2048, 2373, 2048, 2678, 2048, - /* 190 */ 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2226, 2418, - /* 200 */ 2048, 2048, 2048, 2651, 2665, 2734, 2652, 2649, 2672, 2048, - /* 210 */ 2682, 2048, 2465, 2048, 2454, 2148, 2048, 2148, 2411, 2356, - /* 220 */ 2048, 2366, 2048, 2366, 2363, 2048, 2048, 2048, 2366, 2363, - /* 230 */ 2363, 2363, 2215, 2211, 2048, 2209, 2048, 2048, 2048, 2048, - /* 240 */ 2103, 2048, 2103, 2048, 2148, 2148, 2048, 2148, 2048, 2048, - /* 250 */ 2148, 2048, 2148, 2048, 2148, 2148, 2048, 2148, 2048, 2048, - /* 260 */ 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, - /* 270 */ 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2452, 2434, 2048, - /* 280 */ 2146, 2048, 2422, 2420, 2048, 2146, 2682, 2048, 2048, 2704, - /* 290 */ 2699, 2704, 2699, 2718, 2714, 2704, 2723, 2720, 2684, 2682, - /* 300 */ 2753, 2740, 2736, 2665, 2048, 2048, 2670, 2668, 2048, 2146, - /* 310 */ 2146, 2048, 2699, 2048, 2048, 2048, 2048, 2699, 2048, 2048, - /* 320 */ 2146, 2048, 2146, 2048, 2048, 2048, 2048, 2048, 2048, 2048, - /* 330 */ 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, - /* 340 */ 2048, 2048, 2048, 2048, 2048, 2048, 2242, 2048, 2048, 2146, - /* 350 */ 2048, 2087, 2048, 2413, 2443, 2394, 2394, 2281, 2281, 2281, - /* 360 */ 2149, 2053, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, - /* 370 */ 2048, 2048, 2048, 2048, 2717, 2716, 2570, 2048, 2623, 2622, - /* 380 */ 2621, 2612, 2569, 2238, 2048, 2048, 2568, 2567, 2048, 2048, - /* 390 */ 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2561, - /* 400 */ 2048, 2048, 2562, 2560, 2559, 2385, 2384, 2048, 2048, 2048, - /* 410 */ 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, - /* 420 */ 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, - /* 430 */ 2048, 2048, 2048, 2737, 2741, 2048, 2648, 2048, 2048, 2048, - /* 440 */ 2541, 2048, 2048, 2048, 2048, 2048, 2509, 2504, 2495, 2486, - /* 450 */ 2501, 2492, 2480, 2498, 2489, 2477, 2474, 2048, 2048, 2048, - /* 460 */ 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, - /* 470 */ 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, - /* 480 */ 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, - /* 490 */ 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, - /* 500 */ 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, - /* 510 */ 2048, 2362, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, - /* 520 */ 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, - /* 530 */ 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, - /* 540 */ 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, - /* 550 */ 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, - /* 560 */ 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, - /* 570 */ 2048, 2048, 2048, 2048, 2048, 2377, 2048, 2048, 2048, 2048, - /* 580 */ 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, - /* 590 */ 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, - /* 600 */ 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2092, 2548, 2048, - /* 610 */ 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, - /* 620 */ 2048, 2048, 2551, 2048, 2048, 2048, 2048, 2048, 2048, 2048, - /* 630 */ 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, - /* 640 */ 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, - /* 650 */ 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, - /* 660 */ 2048, 2048, 2048, 2048, 2189, 2188, 2048, 2048, 2048, 2048, - /* 670 */ 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, - /* 680 */ 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, - /* 690 */ 2048, 2048, 2552, 2048, 2048, 2048, 2438, 2048, 2048, 2048, - /* 700 */ 2543, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, - /* 710 */ 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2733, 2685, 2048, - /* 720 */ 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, - /* 730 */ 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, - /* 740 */ 2048, 2541, 2048, 2715, 2048, 2048, 2731, 2048, 2735, 2048, - /* 750 */ 2048, 2048, 2048, 2048, 2048, 2048, 2658, 2654, 2048, 2048, - /* 760 */ 2650, 2048, 2048, 2048, 2048, 2048, 2609, 2048, 2048, 2048, - /* 770 */ 2643, 2048, 2048, 2048, 2048, 2277, 2276, 2275, 2274, 2048, - /* 780 */ 2048, 2048, 2048, 2048, 2048, 2552, 2048, 2555, 2048, 2048, - /* 790 */ 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, - /* 800 */ 2540, 2048, 2594, 2593, 2048, 2048, 2048, 2048, 2048, 2048, - /* 810 */ 2048, 2271, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, - /* 820 */ 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2255, 2253, 2252, - /* 830 */ 2251, 2048, 2248, 2048, 2288, 2048, 2048, 2048, 2284, 2283, - /* 840 */ 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, - /* 850 */ 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2167, 2048, 2048, - /* 860 */ 2048, 2048, 2048, 2048, 2048, 2048, 2159, 2048, 2158, 2048, - /* 870 */ 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, - /* 880 */ 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, - /* 890 */ 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2077, 2048, - /* 900 */ 2048, 2048, 2048, 2048, 2048, + /* 0 */ 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, + /* 10 */ 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, + /* 20 */ 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, + /* 30 */ 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, + /* 40 */ 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, + /* 50 */ 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, + /* 60 */ 2429, 2071, 2071, 2392, 2071, 2071, 2071, 2071, 2071, 2071, + /* 70 */ 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2399, 2071, 2071, + /* 80 */ 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, + /* 90 */ 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2172, 2071, 2071, + /* 100 */ 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, + /* 110 */ 2071, 2071, 2071, 2071, 2170, 2678, 2071, 2071, 2071, 2071, + /* 120 */ 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, + /* 130 */ 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, + /* 140 */ 2690, 2071, 2071, 2143, 2143, 2071, 2690, 2690, 2690, 2650, + /* 150 */ 2650, 2170, 2071, 2071, 2172, 2071, 2471, 2071, 2071, 2071, + /* 160 */ 2071, 2071, 2071, 2071, 2071, 2309, 2101, 2469, 2071, 2071, + /* 170 */ 2071, 2071, 2071, 2071, 2071, 2455, 2071, 2719, 2781, 2071, + /* 180 */ 2722, 2071, 2071, 2071, 2071, 2071, 2404, 2071, 2709, 2071, + /* 190 */ 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2257, 2449, + /* 200 */ 2071, 2071, 2071, 2682, 2696, 2765, 2683, 2680, 2703, 2071, + /* 210 */ 2713, 2071, 2496, 2071, 2485, 2172, 2071, 2172, 2442, 2387, + /* 220 */ 2071, 2397, 2071, 2397, 2394, 2071, 2071, 2071, 2397, 2394, + /* 230 */ 2394, 2394, 2246, 2242, 2071, 2071, 2240, 2071, 2071, 2071, + /* 240 */ 2071, 2126, 2071, 2126, 2071, 2172, 2172, 2071, 2172, 2071, + /* 250 */ 2071, 2172, 2071, 2172, 2071, 2172, 2172, 2071, 2172, 2071, + /* 260 */ 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, + /* 270 */ 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2483, 2465, + /* 280 */ 2071, 2170, 2071, 2453, 2451, 2071, 2170, 2713, 2071, 2071, + /* 290 */ 2735, 2730, 2735, 2730, 2749, 2745, 2735, 2754, 2751, 2715, + /* 300 */ 2713, 2784, 2771, 2767, 2696, 2071, 2071, 2701, 2699, 2071, + /* 310 */ 2170, 2170, 2071, 2730, 2071, 2071, 2071, 2071, 2730, 2071, + /* 320 */ 2071, 2170, 2071, 2170, 2071, 2071, 2071, 2071, 2071, 2071, + /* 330 */ 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, + /* 340 */ 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2273, 2071, 2071, + /* 350 */ 2170, 2071, 2110, 2071, 2444, 2474, 2425, 2425, 2312, 2312, + /* 360 */ 2312, 2173, 2076, 2071, 2071, 2071, 2071, 2071, 2071, 2071, + /* 370 */ 2071, 2071, 2071, 2071, 2071, 2748, 2747, 2601, 2071, 2654, + /* 380 */ 2653, 2652, 2643, 2600, 2269, 2071, 2071, 2599, 2598, 2071, + /* 390 */ 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, + /* 400 */ 2592, 2071, 2071, 2593, 2591, 2590, 2416, 2415, 2071, 2071, + /* 410 */ 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, + /* 420 */ 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, + /* 430 */ 2071, 2071, 2071, 2071, 2071, 2768, 2772, 2071, 2679, 2071, + /* 440 */ 2071, 2071, 2572, 2071, 2071, 2071, 2071, 2071, 2540, 2535, + /* 450 */ 2526, 2517, 2532, 2523, 2511, 2529, 2520, 2508, 2505, 2071, + /* 460 */ 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, + /* 470 */ 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, + /* 480 */ 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, + /* 490 */ 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, + /* 500 */ 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, + /* 510 */ 2071, 2071, 2071, 2071, 2393, 2071, 2071, 2071, 2071, 2071, + /* 520 */ 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, + /* 530 */ 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, + /* 540 */ 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, + /* 550 */ 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, + /* 560 */ 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, + /* 570 */ 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2408, 2071, + /* 580 */ 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, + /* 590 */ 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, + /* 600 */ 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, + /* 610 */ 2071, 2071, 2115, 2579, 2071, 2071, 2071, 2071, 2071, 2071, + /* 620 */ 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2582, 2071, 2071, + /* 630 */ 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, + /* 640 */ 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, + /* 650 */ 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, + /* 660 */ 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, + /* 670 */ 2217, 2216, 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, + /* 680 */ 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, + /* 690 */ 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2583, 2071, + /* 700 */ 2071, 2071, 2469, 2071, 2071, 2071, 2574, 2071, 2071, 2071, + /* 710 */ 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, + /* 720 */ 2071, 2071, 2071, 2764, 2716, 2071, 2071, 2071, 2071, 2071, + /* 730 */ 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, + /* 740 */ 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2572, 2071, 2746, + /* 750 */ 2071, 2071, 2762, 2071, 2766, 2071, 2071, 2071, 2071, 2071, + /* 760 */ 2071, 2071, 2689, 2685, 2071, 2071, 2681, 2071, 2071, 2071, + /* 770 */ 2071, 2071, 2640, 2071, 2071, 2071, 2674, 2071, 2071, 2071, + /* 780 */ 2071, 2308, 2307, 2306, 2305, 2071, 2071, 2071, 2071, 2071, + /* 790 */ 2071, 2583, 2071, 2586, 2071, 2071, 2071, 2071, 2071, 2071, + /* 800 */ 2071, 2071, 2071, 2071, 2071, 2071, 2571, 2071, 2625, 2624, + /* 810 */ 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2302, 2071, 2071, + /* 820 */ 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, + /* 830 */ 2071, 2071, 2071, 2286, 2284, 2283, 2282, 2071, 2279, 2071, + /* 840 */ 2319, 2071, 2071, 2071, 2315, 2314, 2071, 2071, 2071, 2071, + /* 850 */ 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, + /* 860 */ 2071, 2071, 2071, 2071, 2071, 2191, 2071, 2071, 2071, 2071, + /* 870 */ 2071, 2071, 2071, 2071, 2183, 2071, 2182, 2071, 2071, 2071, + /* 880 */ 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, + /* 890 */ 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071, + /* 900 */ 2071, 2071, 2071, 2071, 2071, 2071, 2100, 2071, 2071, 2071, + /* 910 */ 2071, 2071, 2071, }; /********** End of lemon-generated parsing tables *****************************/ @@ -1220,6 +1223,7 @@ static const YYCODETYPE yyFallback[] = { 0, /* USE => nothing */ 0, /* FLUSH => nothing */ 0, /* TRIM => nothing */ + 0, /* S3MIGRATE => nothing */ 0, /* COMPACT => nothing */ 0, /* IF => nothing */ 0, /* NOT => nothing */ @@ -1251,13 +1255,16 @@ static const YYCODETYPE yyFallback[] = { 0, /* STT_TRIGGER => nothing */ 0, /* TABLE_PREFIX => nothing */ 0, /* TABLE_SUFFIX => nothing */ + 0, /* S3_CHUNKSIZE => nothing */ + 0, /* S3_KEEPLOCAL => nothing */ + 0, /* S3_COMPACT => nothing */ 0, /* KEEP_TIME_OFFSET => nothing */ 0, /* ENCRYPT_ALGORITHM => nothing */ 0, /* NK_COLON => nothing */ 0, /* BWLIMIT => nothing */ 0, /* START => nothing */ 0, /* TIMESTAMP => nothing */ - 309, /* END => ABORT */ + 313, /* END => ABORT */ 0, /* TABLE => nothing */ 0, /* NK_LP => nothing */ 0, /* NK_RP => nothing */ @@ -1271,7 +1278,7 @@ static const YYCODETYPE yyFallback[] = { 0, /* USING => nothing */ 0, /* TAGS => nothing */ 0, /* PRIMARY => nothing */ - 309, /* KEY => ABORT */ + 313, /* KEY => ABORT */ 0, /* BOOL => nothing */ 0, /* TINYINT => nothing */ 0, /* SMALLINT => nothing */ @@ -1331,7 +1338,7 @@ static const YYCODETYPE yyFallback[] = { 0, /* VNODES => nothing */ 0, /* ALIVE => nothing */ 0, /* VIEWS => nothing */ - 309, /* VIEW => ABORT */ + 313, /* VIEW => ABORT */ 0, /* COMPACTS => nothing */ 0, /* NORMAL => nothing */ 0, /* CHILD => nothing */ @@ -1460,54 +1467,54 @@ static const YYCODETYPE yyFallback[] = { 0, /* ASC => nothing */ 0, /* NULLS => nothing */ 0, /* ABORT => nothing */ - 309, /* AFTER => ABORT */ - 309, /* ATTACH => ABORT */ - 309, /* BEFORE => ABORT */ - 309, /* BEGIN => ABORT */ - 309, /* BITAND => ABORT */ - 309, /* BITNOT => ABORT */ - 309, /* BITOR => ABORT */ - 309, /* BLOCKS => ABORT */ - 309, /* CHANGE => ABORT */ - 309, /* COMMA => ABORT */ - 309, /* CONCAT => ABORT */ - 309, /* CONFLICT => ABORT */ - 309, /* COPY => ABORT */ - 309, /* DEFERRED => ABORT */ - 309, /* DELIMITERS => ABORT */ - 309, /* DETACH => ABORT */ - 309, /* DIVIDE => ABORT */ - 309, /* DOT => ABORT */ - 309, /* EACH => ABORT */ - 309, /* FAIL => ABORT */ - 309, /* FILE => ABORT */ - 309, /* FOR => ABORT */ - 309, /* GLOB => ABORT */ - 309, /* ID => ABORT */ - 309, /* IMMEDIATE => ABORT */ - 309, /* IMPORT => ABORT */ - 309, /* INITIALLY => ABORT */ - 309, /* INSTEAD => ABORT */ - 309, /* ISNULL => ABORT */ - 309, /* MODULES => ABORT */ - 309, /* NK_BITNOT => ABORT */ - 309, /* NK_SEMI => ABORT */ - 309, /* NOTNULL => ABORT */ - 309, /* OF => ABORT */ - 309, /* PLUS => ABORT */ - 309, /* PRIVILEGE => ABORT */ - 309, /* RAISE => ABORT */ - 309, /* RESTRICT => ABORT */ - 309, /* ROW => ABORT */ - 309, /* SEMI => ABORT */ - 309, /* STAR => ABORT */ - 309, /* STATEMENT => ABORT */ - 309, /* STRICT => ABORT */ - 309, /* STRING => ABORT */ - 309, /* TIMES => ABORT */ - 309, /* VALUES => ABORT */ - 309, /* VARIABLE => ABORT */ - 309, /* WAL => ABORT */ + 313, /* AFTER => ABORT */ + 313, /* ATTACH => ABORT */ + 313, /* BEFORE => ABORT */ + 313, /* BEGIN => ABORT */ + 313, /* BITAND => ABORT */ + 313, /* BITNOT => ABORT */ + 313, /* BITOR => ABORT */ + 313, /* BLOCKS => ABORT */ + 313, /* CHANGE => ABORT */ + 313, /* COMMA => ABORT */ + 313, /* CONCAT => ABORT */ + 313, /* CONFLICT => ABORT */ + 313, /* COPY => ABORT */ + 313, /* DEFERRED => ABORT */ + 313, /* DELIMITERS => ABORT */ + 313, /* DETACH => ABORT */ + 313, /* DIVIDE => ABORT */ + 313, /* DOT => ABORT */ + 313, /* EACH => ABORT */ + 313, /* FAIL => ABORT */ + 313, /* FILE => ABORT */ + 313, /* FOR => ABORT */ + 313, /* GLOB => ABORT */ + 313, /* ID => ABORT */ + 313, /* IMMEDIATE => ABORT */ + 313, /* IMPORT => ABORT */ + 313, /* INITIALLY => ABORT */ + 313, /* INSTEAD => ABORT */ + 313, /* ISNULL => ABORT */ + 313, /* MODULES => ABORT */ + 313, /* NK_BITNOT => ABORT */ + 313, /* NK_SEMI => ABORT */ + 313, /* NOTNULL => ABORT */ + 313, /* OF => ABORT */ + 313, /* PLUS => ABORT */ + 313, /* PRIVILEGE => ABORT */ + 313, /* RAISE => ABORT */ + 313, /* RESTRICT => ABORT */ + 313, /* ROW => ABORT */ + 313, /* SEMI => ABORT */ + 313, /* STAR => ABORT */ + 313, /* STATEMENT => ABORT */ + 313, /* STRICT => ABORT */ + 313, /* STRING => ABORT */ + 313, /* TIMES => ABORT */ + 313, /* VALUES => ABORT */ + 313, /* VARIABLE => ABORT */ + 313, /* WAL => ABORT */ }; #endif /* YYFALLBACK */ @@ -1665,460 +1672,464 @@ static const char *const yyTokenName[] = { /* 67 */ "USE", /* 68 */ "FLUSH", /* 69 */ "TRIM", - /* 70 */ "COMPACT", - /* 71 */ "IF", - /* 72 */ "NOT", - /* 73 */ "EXISTS", - /* 74 */ "BUFFER", - /* 75 */ "CACHEMODEL", - /* 76 */ "CACHESIZE", - /* 77 */ "COMP", - /* 78 */ "DURATION", - /* 79 */ "NK_VARIABLE", - /* 80 */ "MAXROWS", - /* 81 */ "MINROWS", - /* 82 */ "KEEP", - /* 83 */ "PAGES", - /* 84 */ "PAGESIZE", - /* 85 */ "TSDB_PAGESIZE", - /* 86 */ "PRECISION", - /* 87 */ "REPLICA", - /* 88 */ "VGROUPS", - /* 89 */ "SINGLE_STABLE", - /* 90 */ "RETENTIONS", - /* 91 */ "SCHEMALESS", - /* 92 */ "WAL_LEVEL", - /* 93 */ "WAL_FSYNC_PERIOD", - /* 94 */ "WAL_RETENTION_PERIOD", - /* 95 */ "WAL_RETENTION_SIZE", - /* 96 */ "WAL_ROLL_PERIOD", - /* 97 */ "WAL_SEGMENT_SIZE", - /* 98 */ "STT_TRIGGER", - /* 99 */ "TABLE_PREFIX", - /* 100 */ "TABLE_SUFFIX", - /* 101 */ "KEEP_TIME_OFFSET", - /* 102 */ "ENCRYPT_ALGORITHM", - /* 103 */ "NK_COLON", - /* 104 */ "BWLIMIT", - /* 105 */ "START", - /* 106 */ "TIMESTAMP", - /* 107 */ "END", - /* 108 */ "TABLE", - /* 109 */ "NK_LP", - /* 110 */ "NK_RP", - /* 111 */ "STABLE", - /* 112 */ "COLUMN", - /* 113 */ "MODIFY", - /* 114 */ "RENAME", - /* 115 */ "TAG", - /* 116 */ "SET", - /* 117 */ "NK_EQ", - /* 118 */ "USING", - /* 119 */ "TAGS", - /* 120 */ "PRIMARY", - /* 121 */ "KEY", - /* 122 */ "BOOL", - /* 123 */ "TINYINT", - /* 124 */ "SMALLINT", - /* 125 */ "INT", - /* 126 */ "INTEGER", - /* 127 */ "BIGINT", - /* 128 */ "FLOAT", - /* 129 */ "DOUBLE", - /* 130 */ "BINARY", - /* 131 */ "NCHAR", - /* 132 */ "UNSIGNED", - /* 133 */ "JSON", - /* 134 */ "VARCHAR", - /* 135 */ "MEDIUMBLOB", - /* 136 */ "BLOB", - /* 137 */ "VARBINARY", - /* 138 */ "GEOMETRY", - /* 139 */ "DECIMAL", - /* 140 */ "COMMENT", - /* 141 */ "MAX_DELAY", - /* 142 */ "WATERMARK", - /* 143 */ "ROLLUP", - /* 144 */ "TTL", - /* 145 */ "SMA", - /* 146 */ "DELETE_MARK", - /* 147 */ "FIRST", - /* 148 */ "LAST", - /* 149 */ "SHOW", - /* 150 */ "PRIVILEGES", - /* 151 */ "DATABASES", - /* 152 */ "TABLES", - /* 153 */ "STABLES", - /* 154 */ "MNODES", - /* 155 */ "QNODES", - /* 156 */ "ARBGROUPS", - /* 157 */ "FUNCTIONS", - /* 158 */ "INDEXES", - /* 159 */ "ACCOUNTS", - /* 160 */ "APPS", - /* 161 */ "CONNECTIONS", - /* 162 */ "LICENCES", - /* 163 */ "GRANTS", - /* 164 */ "FULL", - /* 165 */ "LOGS", - /* 166 */ "MACHINES", - /* 167 */ "ENCRYPTIONS", - /* 168 */ "QUERIES", - /* 169 */ "SCORES", - /* 170 */ "TOPICS", - /* 171 */ "VARIABLES", - /* 172 */ "BNODES", - /* 173 */ "SNODES", - /* 174 */ "TRANSACTIONS", - /* 175 */ "DISTRIBUTED", - /* 176 */ "CONSUMERS", - /* 177 */ "SUBSCRIPTIONS", - /* 178 */ "VNODES", - /* 179 */ "ALIVE", - /* 180 */ "VIEWS", - /* 181 */ "VIEW", - /* 182 */ "COMPACTS", - /* 183 */ "NORMAL", - /* 184 */ "CHILD", - /* 185 */ "LIKE", - /* 186 */ "TBNAME", - /* 187 */ "QTAGS", - /* 188 */ "AS", - /* 189 */ "SYSTEM", - /* 190 */ "INDEX", - /* 191 */ "FUNCTION", - /* 192 */ "INTERVAL", - /* 193 */ "COUNT", - /* 194 */ "LAST_ROW", - /* 195 */ "META", - /* 196 */ "ONLY", - /* 197 */ "TOPIC", - /* 198 */ "CONSUMER", - /* 199 */ "GROUP", - /* 200 */ "DESC", - /* 201 */ "DESCRIBE", - /* 202 */ "RESET", - /* 203 */ "QUERY", - /* 204 */ "CACHE", - /* 205 */ "EXPLAIN", - /* 206 */ "ANALYZE", - /* 207 */ "VERBOSE", - /* 208 */ "NK_BOOL", - /* 209 */ "RATIO", - /* 210 */ "NK_FLOAT", - /* 211 */ "OUTPUTTYPE", - /* 212 */ "AGGREGATE", - /* 213 */ "BUFSIZE", - /* 214 */ "LANGUAGE", - /* 215 */ "REPLACE", - /* 216 */ "STREAM", - /* 217 */ "INTO", - /* 218 */ "PAUSE", - /* 219 */ "RESUME", - /* 220 */ "TRIGGER", - /* 221 */ "AT_ONCE", - /* 222 */ "WINDOW_CLOSE", - /* 223 */ "IGNORE", - /* 224 */ "EXPIRED", - /* 225 */ "FILL_HISTORY", - /* 226 */ "UPDATE", - /* 227 */ "SUBTABLE", - /* 228 */ "UNTREATED", - /* 229 */ "KILL", - /* 230 */ "CONNECTION", - /* 231 */ "TRANSACTION", - /* 232 */ "BALANCE", - /* 233 */ "VGROUP", - /* 234 */ "LEADER", - /* 235 */ "MERGE", - /* 236 */ "REDISTRIBUTE", - /* 237 */ "SPLIT", - /* 238 */ "DELETE", - /* 239 */ "INSERT", - /* 240 */ "NK_BIN", - /* 241 */ "NK_HEX", - /* 242 */ "NULL", - /* 243 */ "NK_QUESTION", - /* 244 */ "NK_ALIAS", - /* 245 */ "NK_ARROW", - /* 246 */ "ROWTS", - /* 247 */ "QSTART", - /* 248 */ "QEND", - /* 249 */ "QDURATION", - /* 250 */ "WSTART", - /* 251 */ "WEND", - /* 252 */ "WDURATION", - /* 253 */ "IROWTS", - /* 254 */ "ISFILLED", - /* 255 */ "CAST", - /* 256 */ "NOW", - /* 257 */ "TODAY", - /* 258 */ "TIMEZONE", - /* 259 */ "CLIENT_VERSION", - /* 260 */ "SERVER_VERSION", - /* 261 */ "SERVER_STATUS", - /* 262 */ "CURRENT_USER", - /* 263 */ "CASE", - /* 264 */ "WHEN", - /* 265 */ "THEN", - /* 266 */ "ELSE", - /* 267 */ "BETWEEN", - /* 268 */ "IS", - /* 269 */ "NK_LT", - /* 270 */ "NK_GT", - /* 271 */ "NK_LE", - /* 272 */ "NK_GE", - /* 273 */ "NK_NE", - /* 274 */ "MATCH", - /* 275 */ "NMATCH", - /* 276 */ "CONTAINS", - /* 277 */ "IN", - /* 278 */ "JOIN", - /* 279 */ "INNER", - /* 280 */ "SELECT", - /* 281 */ "NK_HINT", - /* 282 */ "DISTINCT", - /* 283 */ "WHERE", - /* 284 */ "PARTITION", - /* 285 */ "BY", - /* 286 */ "SESSION", - /* 287 */ "STATE_WINDOW", - /* 288 */ "EVENT_WINDOW", - /* 289 */ "COUNT_WINDOW", - /* 290 */ "SLIDING", - /* 291 */ "FILL", - /* 292 */ "VALUE", - /* 293 */ "VALUE_F", - /* 294 */ "NONE", - /* 295 */ "PREV", - /* 296 */ "NULL_F", - /* 297 */ "LINEAR", - /* 298 */ "NEXT", - /* 299 */ "HAVING", - /* 300 */ "RANGE", - /* 301 */ "EVERY", - /* 302 */ "ORDER", - /* 303 */ "SLIMIT", - /* 304 */ "SOFFSET", - /* 305 */ "LIMIT", - /* 306 */ "OFFSET", - /* 307 */ "ASC", - /* 308 */ "NULLS", - /* 309 */ "ABORT", - /* 310 */ "AFTER", - /* 311 */ "ATTACH", - /* 312 */ "BEFORE", - /* 313 */ "BEGIN", - /* 314 */ "BITAND", - /* 315 */ "BITNOT", - /* 316 */ "BITOR", - /* 317 */ "BLOCKS", - /* 318 */ "CHANGE", - /* 319 */ "COMMA", - /* 320 */ "CONCAT", - /* 321 */ "CONFLICT", - /* 322 */ "COPY", - /* 323 */ "DEFERRED", - /* 324 */ "DELIMITERS", - /* 325 */ "DETACH", - /* 326 */ "DIVIDE", - /* 327 */ "DOT", - /* 328 */ "EACH", - /* 329 */ "FAIL", - /* 330 */ "FILE", - /* 331 */ "FOR", - /* 332 */ "GLOB", - /* 333 */ "ID", - /* 334 */ "IMMEDIATE", - /* 335 */ "IMPORT", - /* 336 */ "INITIALLY", - /* 337 */ "INSTEAD", - /* 338 */ "ISNULL", - /* 339 */ "MODULES", - /* 340 */ "NK_BITNOT", - /* 341 */ "NK_SEMI", - /* 342 */ "NOTNULL", - /* 343 */ "OF", - /* 344 */ "PLUS", - /* 345 */ "PRIVILEGE", - /* 346 */ "RAISE", - /* 347 */ "RESTRICT", - /* 348 */ "ROW", - /* 349 */ "SEMI", - /* 350 */ "STAR", - /* 351 */ "STATEMENT", - /* 352 */ "STRICT", - /* 353 */ "STRING", - /* 354 */ "TIMES", - /* 355 */ "VALUES", - /* 356 */ "VARIABLE", - /* 357 */ "WAL", - /* 358 */ "cmd", - /* 359 */ "account_options", - /* 360 */ "alter_account_options", - /* 361 */ "literal", - /* 362 */ "alter_account_option", - /* 363 */ "ip_range_list", - /* 364 */ "white_list", - /* 365 */ "white_list_opt", - /* 366 */ "user_name", - /* 367 */ "sysinfo_opt", - /* 368 */ "privileges", - /* 369 */ "priv_level", - /* 370 */ "with_opt", - /* 371 */ "priv_type_list", - /* 372 */ "priv_type", - /* 373 */ "db_name", - /* 374 */ "table_name", - /* 375 */ "topic_name", - /* 376 */ "search_condition", - /* 377 */ "dnode_endpoint", - /* 378 */ "force_opt", - /* 379 */ "unsafe_opt", - /* 380 */ "not_exists_opt", - /* 381 */ "db_options", - /* 382 */ "exists_opt", - /* 383 */ "alter_db_options", - /* 384 */ "speed_opt", - /* 385 */ "start_opt", - /* 386 */ "end_opt", - /* 387 */ "integer_list", - /* 388 */ "variable_list", - /* 389 */ "retention_list", - /* 390 */ "signed", - /* 391 */ "alter_db_option", - /* 392 */ "retention", - /* 393 */ "full_table_name", - /* 394 */ "column_def_list", - /* 395 */ "tags_def_opt", - /* 396 */ "table_options", - /* 397 */ "multi_create_clause", - /* 398 */ "tags_def", - /* 399 */ "multi_drop_clause", - /* 400 */ "alter_table_clause", - /* 401 */ "alter_table_options", - /* 402 */ "column_name", - /* 403 */ "type_name", - /* 404 */ "tags_literal", - /* 405 */ "create_subtable_clause", - /* 406 */ "specific_cols_opt", - /* 407 */ "tags_literal_list", - /* 408 */ "drop_table_clause", - /* 409 */ "col_name_list", - /* 410 */ "column_def", - /* 411 */ "type_name_default_len", - /* 412 */ "duration_list", - /* 413 */ "rollup_func_list", - /* 414 */ "alter_table_option", - /* 415 */ "duration_literal", - /* 416 */ "rollup_func_name", - /* 417 */ "function_name", - /* 418 */ "col_name", - /* 419 */ "db_kind_opt", - /* 420 */ "table_kind_db_name_cond_opt", - /* 421 */ "like_pattern_opt", - /* 422 */ "db_name_cond_opt", - /* 423 */ "table_name_cond", - /* 424 */ "from_db_opt", - /* 425 */ "tag_list_opt", - /* 426 */ "table_kind", - /* 427 */ "tag_item", - /* 428 */ "column_alias", - /* 429 */ "index_options", - /* 430 */ "full_index_name", - /* 431 */ "index_name", - /* 432 */ "func_list", - /* 433 */ "sliding_opt", - /* 434 */ "sma_stream_opt", - /* 435 */ "func", - /* 436 */ "sma_func_name", - /* 437 */ "expression_list", - /* 438 */ "with_meta", - /* 439 */ "query_or_subquery", - /* 440 */ "where_clause_opt", - /* 441 */ "cgroup_name", - /* 442 */ "analyze_opt", - /* 443 */ "explain_options", - /* 444 */ "insert_query", - /* 445 */ "or_replace_opt", - /* 446 */ "agg_func_opt", - /* 447 */ "bufsize_opt", - /* 448 */ "language_opt", - /* 449 */ "full_view_name", - /* 450 */ "view_name", - /* 451 */ "stream_name", - /* 452 */ "stream_options", - /* 453 */ "col_list_opt", - /* 454 */ "tag_def_or_ref_opt", - /* 455 */ "subtable_opt", - /* 456 */ "ignore_opt", - /* 457 */ "column_stream_def_list", - /* 458 */ "column_stream_def", - /* 459 */ "expression", - /* 460 */ "on_vgroup_id", - /* 461 */ "dnode_list", - /* 462 */ "literal_func", - /* 463 */ "signed_literal", - /* 464 */ "literal_list", - /* 465 */ "table_alias", - /* 466 */ "expr_or_subquery", - /* 467 */ "pseudo_column", - /* 468 */ "column_reference", - /* 469 */ "function_expression", - /* 470 */ "case_when_expression", - /* 471 */ "star_func", - /* 472 */ "star_func_para_list", - /* 473 */ "noarg_func", - /* 474 */ "other_para_list", - /* 475 */ "star_func_para", - /* 476 */ "when_then_list", - /* 477 */ "case_when_else_opt", - /* 478 */ "common_expression", - /* 479 */ "when_then_expr", - /* 480 */ "predicate", - /* 481 */ "compare_op", - /* 482 */ "in_op", - /* 483 */ "in_predicate_value", - /* 484 */ "boolean_value_expression", - /* 485 */ "boolean_primary", - /* 486 */ "from_clause_opt", - /* 487 */ "table_reference_list", - /* 488 */ "table_reference", - /* 489 */ "table_primary", - /* 490 */ "joined_table", - /* 491 */ "alias_opt", - /* 492 */ "subquery", - /* 493 */ "parenthesized_joined_table", - /* 494 */ "join_type", - /* 495 */ "query_specification", - /* 496 */ "hint_list", - /* 497 */ "set_quantifier_opt", - /* 498 */ "tag_mode_opt", - /* 499 */ "select_list", - /* 500 */ "partition_by_clause_opt", - /* 501 */ "range_opt", - /* 502 */ "every_opt", - /* 503 */ "fill_opt", - /* 504 */ "twindow_clause_opt", - /* 505 */ "group_by_clause_opt", - /* 506 */ "having_clause_opt", - /* 507 */ "select_item", - /* 508 */ "partition_list", - /* 509 */ "partition_item", - /* 510 */ "interval_sliding_duration_literal", - /* 511 */ "fill_mode", - /* 512 */ "group_by_list", - /* 513 */ "query_expression", - /* 514 */ "query_simple", - /* 515 */ "order_by_clause_opt", - /* 516 */ "slimit_clause_opt", - /* 517 */ "limit_clause_opt", - /* 518 */ "union_query_expression", - /* 519 */ "query_simple_or_subquery", - /* 520 */ "sort_specification_list", - /* 521 */ "sort_specification", - /* 522 */ "ordering_specification_opt", - /* 523 */ "null_ordering_opt", + /* 70 */ "S3MIGRATE", + /* 71 */ "COMPACT", + /* 72 */ "IF", + /* 73 */ "NOT", + /* 74 */ "EXISTS", + /* 75 */ "BUFFER", + /* 76 */ "CACHEMODEL", + /* 77 */ "CACHESIZE", + /* 78 */ "COMP", + /* 79 */ "DURATION", + /* 80 */ "NK_VARIABLE", + /* 81 */ "MAXROWS", + /* 82 */ "MINROWS", + /* 83 */ "KEEP", + /* 84 */ "PAGES", + /* 85 */ "PAGESIZE", + /* 86 */ "TSDB_PAGESIZE", + /* 87 */ "PRECISION", + /* 88 */ "REPLICA", + /* 89 */ "VGROUPS", + /* 90 */ "SINGLE_STABLE", + /* 91 */ "RETENTIONS", + /* 92 */ "SCHEMALESS", + /* 93 */ "WAL_LEVEL", + /* 94 */ "WAL_FSYNC_PERIOD", + /* 95 */ "WAL_RETENTION_PERIOD", + /* 96 */ "WAL_RETENTION_SIZE", + /* 97 */ "WAL_ROLL_PERIOD", + /* 98 */ "WAL_SEGMENT_SIZE", + /* 99 */ "STT_TRIGGER", + /* 100 */ "TABLE_PREFIX", + /* 101 */ "TABLE_SUFFIX", + /* 102 */ "S3_CHUNKSIZE", + /* 103 */ "S3_KEEPLOCAL", + /* 104 */ "S3_COMPACT", + /* 105 */ "KEEP_TIME_OFFSET", + /* 106 */ "ENCRYPT_ALGORITHM", + /* 107 */ "NK_COLON", + /* 108 */ "BWLIMIT", + /* 109 */ "START", + /* 110 */ "TIMESTAMP", + /* 111 */ "END", + /* 112 */ "TABLE", + /* 113 */ "NK_LP", + /* 114 */ "NK_RP", + /* 115 */ "STABLE", + /* 116 */ "COLUMN", + /* 117 */ "MODIFY", + /* 118 */ "RENAME", + /* 119 */ "TAG", + /* 120 */ "SET", + /* 121 */ "NK_EQ", + /* 122 */ "USING", + /* 123 */ "TAGS", + /* 124 */ "PRIMARY", + /* 125 */ "KEY", + /* 126 */ "BOOL", + /* 127 */ "TINYINT", + /* 128 */ "SMALLINT", + /* 129 */ "INT", + /* 130 */ "INTEGER", + /* 131 */ "BIGINT", + /* 132 */ "FLOAT", + /* 133 */ "DOUBLE", + /* 134 */ "BINARY", + /* 135 */ "NCHAR", + /* 136 */ "UNSIGNED", + /* 137 */ "JSON", + /* 138 */ "VARCHAR", + /* 139 */ "MEDIUMBLOB", + /* 140 */ "BLOB", + /* 141 */ "VARBINARY", + /* 142 */ "GEOMETRY", + /* 143 */ "DECIMAL", + /* 144 */ "COMMENT", + /* 145 */ "MAX_DELAY", + /* 146 */ "WATERMARK", + /* 147 */ "ROLLUP", + /* 148 */ "TTL", + /* 149 */ "SMA", + /* 150 */ "DELETE_MARK", + /* 151 */ "FIRST", + /* 152 */ "LAST", + /* 153 */ "SHOW", + /* 154 */ "PRIVILEGES", + /* 155 */ "DATABASES", + /* 156 */ "TABLES", + /* 157 */ "STABLES", + /* 158 */ "MNODES", + /* 159 */ "QNODES", + /* 160 */ "ARBGROUPS", + /* 161 */ "FUNCTIONS", + /* 162 */ "INDEXES", + /* 163 */ "ACCOUNTS", + /* 164 */ "APPS", + /* 165 */ "CONNECTIONS", + /* 166 */ "LICENCES", + /* 167 */ "GRANTS", + /* 168 */ "FULL", + /* 169 */ "LOGS", + /* 170 */ "MACHINES", + /* 171 */ "ENCRYPTIONS", + /* 172 */ "QUERIES", + /* 173 */ "SCORES", + /* 174 */ "TOPICS", + /* 175 */ "VARIABLES", + /* 176 */ "BNODES", + /* 177 */ "SNODES", + /* 178 */ "TRANSACTIONS", + /* 179 */ "DISTRIBUTED", + /* 180 */ "CONSUMERS", + /* 181 */ "SUBSCRIPTIONS", + /* 182 */ "VNODES", + /* 183 */ "ALIVE", + /* 184 */ "VIEWS", + /* 185 */ "VIEW", + /* 186 */ "COMPACTS", + /* 187 */ "NORMAL", + /* 188 */ "CHILD", + /* 189 */ "LIKE", + /* 190 */ "TBNAME", + /* 191 */ "QTAGS", + /* 192 */ "AS", + /* 193 */ "SYSTEM", + /* 194 */ "INDEX", + /* 195 */ "FUNCTION", + /* 196 */ "INTERVAL", + /* 197 */ "COUNT", + /* 198 */ "LAST_ROW", + /* 199 */ "META", + /* 200 */ "ONLY", + /* 201 */ "TOPIC", + /* 202 */ "CONSUMER", + /* 203 */ "GROUP", + /* 204 */ "DESC", + /* 205 */ "DESCRIBE", + /* 206 */ "RESET", + /* 207 */ "QUERY", + /* 208 */ "CACHE", + /* 209 */ "EXPLAIN", + /* 210 */ "ANALYZE", + /* 211 */ "VERBOSE", + /* 212 */ "NK_BOOL", + /* 213 */ "RATIO", + /* 214 */ "NK_FLOAT", + /* 215 */ "OUTPUTTYPE", + /* 216 */ "AGGREGATE", + /* 217 */ "BUFSIZE", + /* 218 */ "LANGUAGE", + /* 219 */ "REPLACE", + /* 220 */ "STREAM", + /* 221 */ "INTO", + /* 222 */ "PAUSE", + /* 223 */ "RESUME", + /* 224 */ "TRIGGER", + /* 225 */ "AT_ONCE", + /* 226 */ "WINDOW_CLOSE", + /* 227 */ "IGNORE", + /* 228 */ "EXPIRED", + /* 229 */ "FILL_HISTORY", + /* 230 */ "UPDATE", + /* 231 */ "SUBTABLE", + /* 232 */ "UNTREATED", + /* 233 */ "KILL", + /* 234 */ "CONNECTION", + /* 235 */ "TRANSACTION", + /* 236 */ "BALANCE", + /* 237 */ "VGROUP", + /* 238 */ "LEADER", + /* 239 */ "MERGE", + /* 240 */ "REDISTRIBUTE", + /* 241 */ "SPLIT", + /* 242 */ "DELETE", + /* 243 */ "INSERT", + /* 244 */ "NK_BIN", + /* 245 */ "NK_HEX", + /* 246 */ "NULL", + /* 247 */ "NK_QUESTION", + /* 248 */ "NK_ALIAS", + /* 249 */ "NK_ARROW", + /* 250 */ "ROWTS", + /* 251 */ "QSTART", + /* 252 */ "QEND", + /* 253 */ "QDURATION", + /* 254 */ "WSTART", + /* 255 */ "WEND", + /* 256 */ "WDURATION", + /* 257 */ "IROWTS", + /* 258 */ "ISFILLED", + /* 259 */ "CAST", + /* 260 */ "NOW", + /* 261 */ "TODAY", + /* 262 */ "TIMEZONE", + /* 263 */ "CLIENT_VERSION", + /* 264 */ "SERVER_VERSION", + /* 265 */ "SERVER_STATUS", + /* 266 */ "CURRENT_USER", + /* 267 */ "CASE", + /* 268 */ "WHEN", + /* 269 */ "THEN", + /* 270 */ "ELSE", + /* 271 */ "BETWEEN", + /* 272 */ "IS", + /* 273 */ "NK_LT", + /* 274 */ "NK_GT", + /* 275 */ "NK_LE", + /* 276 */ "NK_GE", + /* 277 */ "NK_NE", + /* 278 */ "MATCH", + /* 279 */ "NMATCH", + /* 280 */ "CONTAINS", + /* 281 */ "IN", + /* 282 */ "JOIN", + /* 283 */ "INNER", + /* 284 */ "SELECT", + /* 285 */ "NK_HINT", + /* 286 */ "DISTINCT", + /* 287 */ "WHERE", + /* 288 */ "PARTITION", + /* 289 */ "BY", + /* 290 */ "SESSION", + /* 291 */ "STATE_WINDOW", + /* 292 */ "EVENT_WINDOW", + /* 293 */ "COUNT_WINDOW", + /* 294 */ "SLIDING", + /* 295 */ "FILL", + /* 296 */ "VALUE", + /* 297 */ "VALUE_F", + /* 298 */ "NONE", + /* 299 */ "PREV", + /* 300 */ "NULL_F", + /* 301 */ "LINEAR", + /* 302 */ "NEXT", + /* 303 */ "HAVING", + /* 304 */ "RANGE", + /* 305 */ "EVERY", + /* 306 */ "ORDER", + /* 307 */ "SLIMIT", + /* 308 */ "SOFFSET", + /* 309 */ "LIMIT", + /* 310 */ "OFFSET", + /* 311 */ "ASC", + /* 312 */ "NULLS", + /* 313 */ "ABORT", + /* 314 */ "AFTER", + /* 315 */ "ATTACH", + /* 316 */ "BEFORE", + /* 317 */ "BEGIN", + /* 318 */ "BITAND", + /* 319 */ "BITNOT", + /* 320 */ "BITOR", + /* 321 */ "BLOCKS", + /* 322 */ "CHANGE", + /* 323 */ "COMMA", + /* 324 */ "CONCAT", + /* 325 */ "CONFLICT", + /* 326 */ "COPY", + /* 327 */ "DEFERRED", + /* 328 */ "DELIMITERS", + /* 329 */ "DETACH", + /* 330 */ "DIVIDE", + /* 331 */ "DOT", + /* 332 */ "EACH", + /* 333 */ "FAIL", + /* 334 */ "FILE", + /* 335 */ "FOR", + /* 336 */ "GLOB", + /* 337 */ "ID", + /* 338 */ "IMMEDIATE", + /* 339 */ "IMPORT", + /* 340 */ "INITIALLY", + /* 341 */ "INSTEAD", + /* 342 */ "ISNULL", + /* 343 */ "MODULES", + /* 344 */ "NK_BITNOT", + /* 345 */ "NK_SEMI", + /* 346 */ "NOTNULL", + /* 347 */ "OF", + /* 348 */ "PLUS", + /* 349 */ "PRIVILEGE", + /* 350 */ "RAISE", + /* 351 */ "RESTRICT", + /* 352 */ "ROW", + /* 353 */ "SEMI", + /* 354 */ "STAR", + /* 355 */ "STATEMENT", + /* 356 */ "STRICT", + /* 357 */ "STRING", + /* 358 */ "TIMES", + /* 359 */ "VALUES", + /* 360 */ "VARIABLE", + /* 361 */ "WAL", + /* 362 */ "cmd", + /* 363 */ "account_options", + /* 364 */ "alter_account_options", + /* 365 */ "literal", + /* 366 */ "alter_account_option", + /* 367 */ "ip_range_list", + /* 368 */ "white_list", + /* 369 */ "white_list_opt", + /* 370 */ "user_name", + /* 371 */ "sysinfo_opt", + /* 372 */ "privileges", + /* 373 */ "priv_level", + /* 374 */ "with_opt", + /* 375 */ "priv_type_list", + /* 376 */ "priv_type", + /* 377 */ "db_name", + /* 378 */ "table_name", + /* 379 */ "topic_name", + /* 380 */ "search_condition", + /* 381 */ "dnode_endpoint", + /* 382 */ "force_opt", + /* 383 */ "unsafe_opt", + /* 384 */ "not_exists_opt", + /* 385 */ "db_options", + /* 386 */ "exists_opt", + /* 387 */ "alter_db_options", + /* 388 */ "speed_opt", + /* 389 */ "start_opt", + /* 390 */ "end_opt", + /* 391 */ "integer_list", + /* 392 */ "variable_list", + /* 393 */ "retention_list", + /* 394 */ "signed", + /* 395 */ "alter_db_option", + /* 396 */ "retention", + /* 397 */ "full_table_name", + /* 398 */ "column_def_list", + /* 399 */ "tags_def_opt", + /* 400 */ "table_options", + /* 401 */ "multi_create_clause", + /* 402 */ "tags_def", + /* 403 */ "multi_drop_clause", + /* 404 */ "alter_table_clause", + /* 405 */ "alter_table_options", + /* 406 */ "column_name", + /* 407 */ "type_name", + /* 408 */ "tags_literal", + /* 409 */ "create_subtable_clause", + /* 410 */ "specific_cols_opt", + /* 411 */ "tags_literal_list", + /* 412 */ "drop_table_clause", + /* 413 */ "col_name_list", + /* 414 */ "column_def", + /* 415 */ "type_name_default_len", + /* 416 */ "duration_list", + /* 417 */ "rollup_func_list", + /* 418 */ "alter_table_option", + /* 419 */ "duration_literal", + /* 420 */ "rollup_func_name", + /* 421 */ "function_name", + /* 422 */ "col_name", + /* 423 */ "db_kind_opt", + /* 424 */ "table_kind_db_name_cond_opt", + /* 425 */ "like_pattern_opt", + /* 426 */ "db_name_cond_opt", + /* 427 */ "table_name_cond", + /* 428 */ "from_db_opt", + /* 429 */ "tag_list_opt", + /* 430 */ "table_kind", + /* 431 */ "tag_item", + /* 432 */ "column_alias", + /* 433 */ "index_options", + /* 434 */ "full_index_name", + /* 435 */ "index_name", + /* 436 */ "func_list", + /* 437 */ "sliding_opt", + /* 438 */ "sma_stream_opt", + /* 439 */ "func", + /* 440 */ "sma_func_name", + /* 441 */ "expression_list", + /* 442 */ "with_meta", + /* 443 */ "query_or_subquery", + /* 444 */ "where_clause_opt", + /* 445 */ "cgroup_name", + /* 446 */ "analyze_opt", + /* 447 */ "explain_options", + /* 448 */ "insert_query", + /* 449 */ "or_replace_opt", + /* 450 */ "agg_func_opt", + /* 451 */ "bufsize_opt", + /* 452 */ "language_opt", + /* 453 */ "full_view_name", + /* 454 */ "view_name", + /* 455 */ "stream_name", + /* 456 */ "stream_options", + /* 457 */ "col_list_opt", + /* 458 */ "tag_def_or_ref_opt", + /* 459 */ "subtable_opt", + /* 460 */ "ignore_opt", + /* 461 */ "column_stream_def_list", + /* 462 */ "column_stream_def", + /* 463 */ "expression", + /* 464 */ "on_vgroup_id", + /* 465 */ "dnode_list", + /* 466 */ "literal_func", + /* 467 */ "signed_literal", + /* 468 */ "literal_list", + /* 469 */ "table_alias", + /* 470 */ "expr_or_subquery", + /* 471 */ "pseudo_column", + /* 472 */ "column_reference", + /* 473 */ "function_expression", + /* 474 */ "case_when_expression", + /* 475 */ "star_func", + /* 476 */ "star_func_para_list", + /* 477 */ "noarg_func", + /* 478 */ "other_para_list", + /* 479 */ "star_func_para", + /* 480 */ "when_then_list", + /* 481 */ "case_when_else_opt", + /* 482 */ "common_expression", + /* 483 */ "when_then_expr", + /* 484 */ "predicate", + /* 485 */ "compare_op", + /* 486 */ "in_op", + /* 487 */ "in_predicate_value", + /* 488 */ "boolean_value_expression", + /* 489 */ "boolean_primary", + /* 490 */ "from_clause_opt", + /* 491 */ "table_reference_list", + /* 492 */ "table_reference", + /* 493 */ "table_primary", + /* 494 */ "joined_table", + /* 495 */ "alias_opt", + /* 496 */ "subquery", + /* 497 */ "parenthesized_joined_table", + /* 498 */ "join_type", + /* 499 */ "query_specification", + /* 500 */ "hint_list", + /* 501 */ "set_quantifier_opt", + /* 502 */ "tag_mode_opt", + /* 503 */ "select_list", + /* 504 */ "partition_by_clause_opt", + /* 505 */ "range_opt", + /* 506 */ "every_opt", + /* 507 */ "fill_opt", + /* 508 */ "twindow_clause_opt", + /* 509 */ "group_by_clause_opt", + /* 510 */ "having_clause_opt", + /* 511 */ "select_item", + /* 512 */ "partition_list", + /* 513 */ "partition_item", + /* 514 */ "interval_sliding_duration_literal", + /* 515 */ "fill_mode", + /* 516 */ "group_by_list", + /* 517 */ "query_expression", + /* 518 */ "query_simple", + /* 519 */ "order_by_clause_opt", + /* 520 */ "slimit_clause_opt", + /* 521 */ "limit_clause_opt", + /* 522 */ "union_query_expression", + /* 523 */ "query_simple_or_subquery", + /* 524 */ "sort_specification_list", + /* 525 */ "sort_specification", + /* 526 */ "ordering_specification_opt", + /* 527 */ "null_ordering_opt", }; #endif /* defined(YYCOVERAGE) || !defined(NDEBUG) */ @@ -2219,618 +2230,626 @@ static const char *const yyRuleName[] = { /* 90 */ "cmd ::= ALTER DATABASE db_name alter_db_options", /* 91 */ "cmd ::= FLUSH DATABASE db_name", /* 92 */ "cmd ::= TRIM DATABASE db_name speed_opt", - /* 93 */ "cmd ::= COMPACT DATABASE db_name start_opt end_opt", - /* 94 */ "not_exists_opt ::= IF NOT EXISTS", - /* 95 */ "not_exists_opt ::=", - /* 96 */ "exists_opt ::= IF EXISTS", - /* 97 */ "exists_opt ::=", - /* 98 */ "db_options ::=", - /* 99 */ "db_options ::= db_options BUFFER NK_INTEGER", - /* 100 */ "db_options ::= db_options CACHEMODEL NK_STRING", - /* 101 */ "db_options ::= db_options CACHESIZE NK_INTEGER", - /* 102 */ "db_options ::= db_options COMP NK_INTEGER", - /* 103 */ "db_options ::= db_options DURATION NK_INTEGER", - /* 104 */ "db_options ::= db_options DURATION NK_VARIABLE", - /* 105 */ "db_options ::= db_options MAXROWS NK_INTEGER", - /* 106 */ "db_options ::= db_options MINROWS NK_INTEGER", - /* 107 */ "db_options ::= db_options KEEP integer_list", - /* 108 */ "db_options ::= db_options KEEP variable_list", - /* 109 */ "db_options ::= db_options PAGES NK_INTEGER", - /* 110 */ "db_options ::= db_options PAGESIZE NK_INTEGER", - /* 111 */ "db_options ::= db_options TSDB_PAGESIZE NK_INTEGER", - /* 112 */ "db_options ::= db_options PRECISION NK_STRING", - /* 113 */ "db_options ::= db_options REPLICA NK_INTEGER", - /* 114 */ "db_options ::= db_options VGROUPS NK_INTEGER", - /* 115 */ "db_options ::= db_options SINGLE_STABLE NK_INTEGER", - /* 116 */ "db_options ::= db_options RETENTIONS retention_list", - /* 117 */ "db_options ::= db_options SCHEMALESS NK_INTEGER", - /* 118 */ "db_options ::= db_options WAL_LEVEL NK_INTEGER", - /* 119 */ "db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER", - /* 120 */ "db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER", - /* 121 */ "db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER", - /* 122 */ "db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER", - /* 123 */ "db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER", - /* 124 */ "db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER", - /* 125 */ "db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER", - /* 126 */ "db_options ::= db_options STT_TRIGGER NK_INTEGER", - /* 127 */ "db_options ::= db_options TABLE_PREFIX signed", - /* 128 */ "db_options ::= db_options TABLE_SUFFIX signed", - /* 129 */ "db_options ::= db_options KEEP_TIME_OFFSET NK_INTEGER", - /* 130 */ "db_options ::= db_options ENCRYPT_ALGORITHM NK_STRING", - /* 131 */ "alter_db_options ::= alter_db_option", - /* 132 */ "alter_db_options ::= alter_db_options alter_db_option", - /* 133 */ "alter_db_option ::= BUFFER NK_INTEGER", - /* 134 */ "alter_db_option ::= CACHEMODEL NK_STRING", - /* 135 */ "alter_db_option ::= CACHESIZE NK_INTEGER", - /* 136 */ "alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER", - /* 137 */ "alter_db_option ::= KEEP integer_list", - /* 138 */ "alter_db_option ::= KEEP variable_list", - /* 139 */ "alter_db_option ::= PAGES NK_INTEGER", - /* 140 */ "alter_db_option ::= REPLICA NK_INTEGER", - /* 141 */ "alter_db_option ::= WAL_LEVEL NK_INTEGER", - /* 142 */ "alter_db_option ::= STT_TRIGGER NK_INTEGER", - /* 143 */ "alter_db_option ::= MINROWS NK_INTEGER", - /* 144 */ "alter_db_option ::= WAL_RETENTION_PERIOD NK_INTEGER", - /* 145 */ "alter_db_option ::= WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER", - /* 146 */ "alter_db_option ::= WAL_RETENTION_SIZE NK_INTEGER", - /* 147 */ "alter_db_option ::= WAL_RETENTION_SIZE NK_MINUS NK_INTEGER", - /* 148 */ "alter_db_option ::= KEEP_TIME_OFFSET NK_INTEGER", - /* 149 */ "alter_db_option ::= ENCRYPT_ALGORITHM NK_STRING", - /* 150 */ "integer_list ::= NK_INTEGER", - /* 151 */ "integer_list ::= integer_list NK_COMMA NK_INTEGER", - /* 152 */ "variable_list ::= NK_VARIABLE", - /* 153 */ "variable_list ::= variable_list NK_COMMA NK_VARIABLE", - /* 154 */ "retention_list ::= retention", - /* 155 */ "retention_list ::= retention_list NK_COMMA retention", - /* 156 */ "retention ::= NK_VARIABLE NK_COLON NK_VARIABLE", - /* 157 */ "retention ::= NK_MINUS NK_COLON NK_VARIABLE", - /* 158 */ "speed_opt ::=", - /* 159 */ "speed_opt ::= BWLIMIT NK_INTEGER", - /* 160 */ "start_opt ::=", - /* 161 */ "start_opt ::= START WITH NK_INTEGER", - /* 162 */ "start_opt ::= START WITH NK_STRING", - /* 163 */ "start_opt ::= START WITH TIMESTAMP NK_STRING", - /* 164 */ "end_opt ::=", - /* 165 */ "end_opt ::= END WITH NK_INTEGER", - /* 166 */ "end_opt ::= END WITH NK_STRING", - /* 167 */ "end_opt ::= END WITH TIMESTAMP NK_STRING", - /* 168 */ "cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options", - /* 169 */ "cmd ::= CREATE TABLE multi_create_clause", - /* 170 */ "cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options", - /* 171 */ "cmd ::= DROP TABLE multi_drop_clause", - /* 172 */ "cmd ::= DROP STABLE exists_opt full_table_name", - /* 173 */ "cmd ::= ALTER TABLE alter_table_clause", - /* 174 */ "cmd ::= ALTER STABLE alter_table_clause", - /* 175 */ "alter_table_clause ::= full_table_name alter_table_options", - /* 176 */ "alter_table_clause ::= full_table_name ADD COLUMN column_name type_name", - /* 177 */ "alter_table_clause ::= full_table_name DROP COLUMN column_name", - /* 178 */ "alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name", - /* 179 */ "alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name", - /* 180 */ "alter_table_clause ::= full_table_name ADD TAG column_name type_name", - /* 181 */ "alter_table_clause ::= full_table_name DROP TAG column_name", - /* 182 */ "alter_table_clause ::= full_table_name MODIFY TAG column_name type_name", - /* 183 */ "alter_table_clause ::= full_table_name RENAME TAG column_name column_name", - /* 184 */ "alter_table_clause ::= full_table_name SET TAG column_name NK_EQ tags_literal", - /* 185 */ "multi_create_clause ::= create_subtable_clause", - /* 186 */ "multi_create_clause ::= multi_create_clause create_subtable_clause", - /* 187 */ "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", - /* 188 */ "multi_drop_clause ::= drop_table_clause", - /* 189 */ "multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause", - /* 190 */ "drop_table_clause ::= exists_opt full_table_name", - /* 191 */ "specific_cols_opt ::=", - /* 192 */ "specific_cols_opt ::= NK_LP col_name_list NK_RP", - /* 193 */ "full_table_name ::= table_name", - /* 194 */ "full_table_name ::= db_name NK_DOT table_name", - /* 195 */ "column_def_list ::= column_def", - /* 196 */ "column_def_list ::= column_def_list NK_COMMA column_def", - /* 197 */ "column_def ::= column_name type_name", - /* 198 */ "column_def ::= column_name type_name PRIMARY KEY", - /* 199 */ "type_name ::= BOOL", - /* 200 */ "type_name ::= TINYINT", - /* 201 */ "type_name ::= SMALLINT", - /* 202 */ "type_name ::= INT", - /* 203 */ "type_name ::= INTEGER", - /* 204 */ "type_name ::= BIGINT", - /* 205 */ "type_name ::= FLOAT", - /* 206 */ "type_name ::= DOUBLE", - /* 207 */ "type_name ::= BINARY NK_LP NK_INTEGER NK_RP", - /* 208 */ "type_name ::= TIMESTAMP", - /* 209 */ "type_name ::= NCHAR NK_LP NK_INTEGER NK_RP", - /* 210 */ "type_name ::= TINYINT UNSIGNED", - /* 211 */ "type_name ::= SMALLINT UNSIGNED", - /* 212 */ "type_name ::= INT UNSIGNED", - /* 213 */ "type_name ::= BIGINT UNSIGNED", - /* 214 */ "type_name ::= JSON", - /* 215 */ "type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP", - /* 216 */ "type_name ::= MEDIUMBLOB", - /* 217 */ "type_name ::= BLOB", - /* 218 */ "type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP", - /* 219 */ "type_name ::= GEOMETRY NK_LP NK_INTEGER NK_RP", - /* 220 */ "type_name ::= DECIMAL", - /* 221 */ "type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP", - /* 222 */ "type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP", - /* 223 */ "type_name_default_len ::= BINARY", - /* 224 */ "type_name_default_len ::= NCHAR", - /* 225 */ "type_name_default_len ::= VARCHAR", - /* 226 */ "type_name_default_len ::= VARBINARY", - /* 227 */ "tags_def_opt ::=", - /* 228 */ "tags_def_opt ::= tags_def", - /* 229 */ "tags_def ::= TAGS NK_LP column_def_list NK_RP", - /* 230 */ "table_options ::=", - /* 231 */ "table_options ::= table_options COMMENT NK_STRING", - /* 232 */ "table_options ::= table_options MAX_DELAY duration_list", - /* 233 */ "table_options ::= table_options WATERMARK duration_list", - /* 234 */ "table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP", - /* 235 */ "table_options ::= table_options TTL NK_INTEGER", - /* 236 */ "table_options ::= table_options SMA NK_LP col_name_list NK_RP", - /* 237 */ "table_options ::= table_options DELETE_MARK duration_list", - /* 238 */ "alter_table_options ::= alter_table_option", - /* 239 */ "alter_table_options ::= alter_table_options alter_table_option", - /* 240 */ "alter_table_option ::= COMMENT NK_STRING", - /* 241 */ "alter_table_option ::= TTL NK_INTEGER", - /* 242 */ "duration_list ::= duration_literal", - /* 243 */ "duration_list ::= duration_list NK_COMMA duration_literal", - /* 244 */ "rollup_func_list ::= rollup_func_name", - /* 245 */ "rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name", - /* 246 */ "rollup_func_name ::= function_name", - /* 247 */ "rollup_func_name ::= FIRST", - /* 248 */ "rollup_func_name ::= LAST", - /* 249 */ "col_name_list ::= col_name", - /* 250 */ "col_name_list ::= col_name_list NK_COMMA col_name", - /* 251 */ "col_name ::= column_name", - /* 252 */ "cmd ::= SHOW DNODES", - /* 253 */ "cmd ::= SHOW USERS", - /* 254 */ "cmd ::= SHOW USER PRIVILEGES", - /* 255 */ "cmd ::= SHOW db_kind_opt DATABASES", - /* 256 */ "cmd ::= SHOW table_kind_db_name_cond_opt TABLES like_pattern_opt", - /* 257 */ "cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt", - /* 258 */ "cmd ::= SHOW db_name_cond_opt VGROUPS", - /* 259 */ "cmd ::= SHOW MNODES", - /* 260 */ "cmd ::= SHOW QNODES", - /* 261 */ "cmd ::= SHOW ARBGROUPS", - /* 262 */ "cmd ::= SHOW FUNCTIONS", - /* 263 */ "cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt", - /* 264 */ "cmd ::= SHOW INDEXES FROM db_name NK_DOT table_name", - /* 265 */ "cmd ::= SHOW STREAMS", - /* 266 */ "cmd ::= SHOW ACCOUNTS", - /* 267 */ "cmd ::= SHOW APPS", - /* 268 */ "cmd ::= SHOW CONNECTIONS", - /* 269 */ "cmd ::= SHOW LICENCES", - /* 270 */ "cmd ::= SHOW GRANTS", - /* 271 */ "cmd ::= SHOW GRANTS FULL", - /* 272 */ "cmd ::= SHOW GRANTS LOGS", - /* 273 */ "cmd ::= SHOW CLUSTER MACHINES", - /* 274 */ "cmd ::= SHOW CREATE DATABASE db_name", - /* 275 */ "cmd ::= SHOW CREATE TABLE full_table_name", - /* 276 */ "cmd ::= SHOW CREATE STABLE full_table_name", - /* 277 */ "cmd ::= SHOW ENCRYPTIONS", - /* 278 */ "cmd ::= SHOW QUERIES", - /* 279 */ "cmd ::= SHOW SCORES", - /* 280 */ "cmd ::= SHOW TOPICS", - /* 281 */ "cmd ::= SHOW VARIABLES", - /* 282 */ "cmd ::= SHOW CLUSTER VARIABLES", - /* 283 */ "cmd ::= SHOW LOCAL VARIABLES", - /* 284 */ "cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt", - /* 285 */ "cmd ::= SHOW BNODES", - /* 286 */ "cmd ::= SHOW SNODES", - /* 287 */ "cmd ::= SHOW CLUSTER", - /* 288 */ "cmd ::= SHOW TRANSACTIONS", - /* 289 */ "cmd ::= SHOW TABLE DISTRIBUTED full_table_name", - /* 290 */ "cmd ::= SHOW CONSUMERS", - /* 291 */ "cmd ::= SHOW SUBSCRIPTIONS", - /* 292 */ "cmd ::= SHOW TAGS FROM table_name_cond from_db_opt", - /* 293 */ "cmd ::= SHOW TAGS FROM db_name NK_DOT table_name", - /* 294 */ "cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt", - /* 295 */ "cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name", - /* 296 */ "cmd ::= SHOW VNODES ON DNODE NK_INTEGER", - /* 297 */ "cmd ::= SHOW VNODES", - /* 298 */ "cmd ::= SHOW db_name_cond_opt ALIVE", - /* 299 */ "cmd ::= SHOW CLUSTER ALIVE", - /* 300 */ "cmd ::= SHOW db_name_cond_opt VIEWS like_pattern_opt", - /* 301 */ "cmd ::= SHOW CREATE VIEW full_table_name", - /* 302 */ "cmd ::= SHOW COMPACTS", - /* 303 */ "cmd ::= SHOW COMPACT NK_INTEGER", - /* 304 */ "table_kind_db_name_cond_opt ::=", - /* 305 */ "table_kind_db_name_cond_opt ::= table_kind", - /* 306 */ "table_kind_db_name_cond_opt ::= db_name NK_DOT", - /* 307 */ "table_kind_db_name_cond_opt ::= table_kind db_name NK_DOT", - /* 308 */ "table_kind ::= NORMAL", - /* 309 */ "table_kind ::= CHILD", - /* 310 */ "db_name_cond_opt ::=", - /* 311 */ "db_name_cond_opt ::= db_name NK_DOT", - /* 312 */ "like_pattern_opt ::=", - /* 313 */ "like_pattern_opt ::= LIKE NK_STRING", - /* 314 */ "table_name_cond ::= table_name", - /* 315 */ "from_db_opt ::=", - /* 316 */ "from_db_opt ::= FROM db_name", - /* 317 */ "tag_list_opt ::=", - /* 318 */ "tag_list_opt ::= tag_item", - /* 319 */ "tag_list_opt ::= tag_list_opt NK_COMMA tag_item", - /* 320 */ "tag_item ::= TBNAME", - /* 321 */ "tag_item ::= QTAGS", - /* 322 */ "tag_item ::= column_name", - /* 323 */ "tag_item ::= column_name column_alias", - /* 324 */ "tag_item ::= column_name AS column_alias", - /* 325 */ "db_kind_opt ::=", - /* 326 */ "db_kind_opt ::= USER", - /* 327 */ "db_kind_opt ::= SYSTEM", - /* 328 */ "cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options", - /* 329 */ "cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP", - /* 330 */ "cmd ::= DROP INDEX exists_opt full_index_name", - /* 331 */ "full_index_name ::= index_name", - /* 332 */ "full_index_name ::= db_name NK_DOT index_name", - /* 333 */ "index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt", - /* 334 */ "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", - /* 335 */ "func_list ::= func", - /* 336 */ "func_list ::= func_list NK_COMMA func", - /* 337 */ "func ::= sma_func_name NK_LP expression_list NK_RP", - /* 338 */ "sma_func_name ::= function_name", - /* 339 */ "sma_func_name ::= COUNT", - /* 340 */ "sma_func_name ::= FIRST", - /* 341 */ "sma_func_name ::= LAST", - /* 342 */ "sma_func_name ::= LAST_ROW", - /* 343 */ "sma_stream_opt ::=", - /* 344 */ "sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal", - /* 345 */ "sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal", - /* 346 */ "sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal", - /* 347 */ "with_meta ::= AS", - /* 348 */ "with_meta ::= WITH META AS", - /* 349 */ "with_meta ::= ONLY META AS", - /* 350 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery", - /* 351 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name", - /* 352 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt", - /* 353 */ "cmd ::= DROP TOPIC exists_opt topic_name", - /* 354 */ "cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name", - /* 355 */ "cmd ::= DESC full_table_name", - /* 356 */ "cmd ::= DESCRIBE full_table_name", - /* 357 */ "cmd ::= RESET QUERY CACHE", - /* 358 */ "cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery", - /* 359 */ "cmd ::= EXPLAIN analyze_opt explain_options insert_query", - /* 360 */ "analyze_opt ::=", - /* 361 */ "analyze_opt ::= ANALYZE", - /* 362 */ "explain_options ::=", - /* 363 */ "explain_options ::= explain_options VERBOSE NK_BOOL", - /* 364 */ "explain_options ::= explain_options RATIO NK_FLOAT", - /* 365 */ "cmd ::= CREATE or_replace_opt agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt language_opt", - /* 366 */ "cmd ::= DROP FUNCTION exists_opt function_name", - /* 367 */ "agg_func_opt ::=", - /* 368 */ "agg_func_opt ::= AGGREGATE", - /* 369 */ "bufsize_opt ::=", - /* 370 */ "bufsize_opt ::= BUFSIZE NK_INTEGER", - /* 371 */ "language_opt ::=", - /* 372 */ "language_opt ::= LANGUAGE NK_STRING", - /* 373 */ "or_replace_opt ::=", - /* 374 */ "or_replace_opt ::= OR REPLACE", - /* 375 */ "cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery", - /* 376 */ "cmd ::= DROP VIEW exists_opt full_view_name", - /* 377 */ "full_view_name ::= view_name", - /* 378 */ "full_view_name ::= db_name NK_DOT view_name", - /* 379 */ "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", - /* 380 */ "cmd ::= DROP STREAM exists_opt stream_name", - /* 381 */ "cmd ::= PAUSE STREAM exists_opt stream_name", - /* 382 */ "cmd ::= RESUME STREAM exists_opt ignore_opt stream_name", - /* 383 */ "col_list_opt ::=", - /* 384 */ "col_list_opt ::= NK_LP column_stream_def_list NK_RP", - /* 385 */ "column_stream_def_list ::= column_stream_def", - /* 386 */ "column_stream_def_list ::= column_stream_def_list NK_COMMA column_stream_def", - /* 387 */ "column_stream_def ::= column_name", - /* 388 */ "column_stream_def ::= column_name PRIMARY KEY", - /* 389 */ "tag_def_or_ref_opt ::=", - /* 390 */ "tag_def_or_ref_opt ::= tags_def", - /* 391 */ "tag_def_or_ref_opt ::= TAGS NK_LP column_stream_def_list NK_RP", - /* 392 */ "stream_options ::=", - /* 393 */ "stream_options ::= stream_options TRIGGER AT_ONCE", - /* 394 */ "stream_options ::= stream_options TRIGGER WINDOW_CLOSE", - /* 395 */ "stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal", - /* 396 */ "stream_options ::= stream_options WATERMARK duration_literal", - /* 397 */ "stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER", - /* 398 */ "stream_options ::= stream_options FILL_HISTORY NK_INTEGER", - /* 399 */ "stream_options ::= stream_options DELETE_MARK duration_literal", - /* 400 */ "stream_options ::= stream_options IGNORE UPDATE NK_INTEGER", - /* 401 */ "subtable_opt ::=", - /* 402 */ "subtable_opt ::= SUBTABLE NK_LP expression NK_RP", - /* 403 */ "ignore_opt ::=", - /* 404 */ "ignore_opt ::= IGNORE UNTREATED", - /* 405 */ "cmd ::= KILL CONNECTION NK_INTEGER", - /* 406 */ "cmd ::= KILL QUERY NK_STRING", - /* 407 */ "cmd ::= KILL TRANSACTION NK_INTEGER", - /* 408 */ "cmd ::= KILL COMPACT NK_INTEGER", - /* 409 */ "cmd ::= BALANCE VGROUP", - /* 410 */ "cmd ::= BALANCE VGROUP LEADER on_vgroup_id", - /* 411 */ "cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER", - /* 412 */ "cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list", - /* 413 */ "cmd ::= SPLIT VGROUP NK_INTEGER", - /* 414 */ "on_vgroup_id ::=", - /* 415 */ "on_vgroup_id ::= ON NK_INTEGER", - /* 416 */ "dnode_list ::= DNODE NK_INTEGER", - /* 417 */ "dnode_list ::= dnode_list DNODE NK_INTEGER", - /* 418 */ "cmd ::= DELETE FROM full_table_name where_clause_opt", - /* 419 */ "cmd ::= query_or_subquery", - /* 420 */ "cmd ::= insert_query", - /* 421 */ "insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery", - /* 422 */ "insert_query ::= INSERT INTO full_table_name query_or_subquery", - /* 423 */ "tags_literal ::= NK_INTEGER", - /* 424 */ "tags_literal ::= NK_INTEGER NK_PLUS duration_literal", - /* 425 */ "tags_literal ::= NK_INTEGER NK_MINUS duration_literal", - /* 426 */ "tags_literal ::= NK_PLUS NK_INTEGER", - /* 427 */ "tags_literal ::= NK_PLUS NK_INTEGER NK_PLUS duration_literal", - /* 428 */ "tags_literal ::= NK_PLUS NK_INTEGER NK_MINUS duration_literal", - /* 429 */ "tags_literal ::= NK_MINUS NK_INTEGER", - /* 430 */ "tags_literal ::= NK_MINUS NK_INTEGER NK_PLUS duration_literal", - /* 431 */ "tags_literal ::= NK_MINUS NK_INTEGER NK_MINUS duration_literal", - /* 432 */ "tags_literal ::= NK_FLOAT", - /* 433 */ "tags_literal ::= NK_PLUS NK_FLOAT", - /* 434 */ "tags_literal ::= NK_MINUS NK_FLOAT", - /* 435 */ "tags_literal ::= NK_BIN", - /* 436 */ "tags_literal ::= NK_BIN NK_PLUS duration_literal", - /* 437 */ "tags_literal ::= NK_BIN NK_MINUS duration_literal", - /* 438 */ "tags_literal ::= NK_PLUS NK_BIN", - /* 439 */ "tags_literal ::= NK_PLUS NK_BIN NK_PLUS duration_literal", - /* 440 */ "tags_literal ::= NK_PLUS NK_BIN NK_MINUS duration_literal", - /* 441 */ "tags_literal ::= NK_MINUS NK_BIN", - /* 442 */ "tags_literal ::= NK_MINUS NK_BIN NK_PLUS duration_literal", - /* 443 */ "tags_literal ::= NK_MINUS NK_BIN NK_MINUS duration_literal", - /* 444 */ "tags_literal ::= NK_HEX", - /* 445 */ "tags_literal ::= NK_HEX NK_PLUS duration_literal", - /* 446 */ "tags_literal ::= NK_HEX NK_MINUS duration_literal", - /* 447 */ "tags_literal ::= NK_PLUS NK_HEX", - /* 448 */ "tags_literal ::= NK_PLUS NK_HEX NK_PLUS duration_literal", - /* 449 */ "tags_literal ::= NK_PLUS NK_HEX NK_MINUS duration_literal", - /* 450 */ "tags_literal ::= NK_MINUS NK_HEX", - /* 451 */ "tags_literal ::= NK_MINUS NK_HEX NK_PLUS duration_literal", - /* 452 */ "tags_literal ::= NK_MINUS NK_HEX NK_MINUS duration_literal", - /* 453 */ "tags_literal ::= NK_STRING", - /* 454 */ "tags_literal ::= NK_STRING NK_PLUS duration_literal", - /* 455 */ "tags_literal ::= NK_STRING NK_MINUS duration_literal", - /* 456 */ "tags_literal ::= NK_BOOL", - /* 457 */ "tags_literal ::= NULL", - /* 458 */ "tags_literal ::= literal_func", - /* 459 */ "tags_literal ::= literal_func NK_PLUS duration_literal", - /* 460 */ "tags_literal ::= literal_func NK_MINUS duration_literal", - /* 461 */ "tags_literal_list ::= tags_literal", - /* 462 */ "tags_literal_list ::= tags_literal_list NK_COMMA tags_literal", - /* 463 */ "literal ::= NK_INTEGER", - /* 464 */ "literal ::= NK_FLOAT", - /* 465 */ "literal ::= NK_STRING", - /* 466 */ "literal ::= NK_BOOL", - /* 467 */ "literal ::= TIMESTAMP NK_STRING", - /* 468 */ "literal ::= duration_literal", - /* 469 */ "literal ::= NULL", - /* 470 */ "literal ::= NK_QUESTION", - /* 471 */ "duration_literal ::= NK_VARIABLE", - /* 472 */ "signed ::= NK_INTEGER", - /* 473 */ "signed ::= NK_PLUS NK_INTEGER", - /* 474 */ "signed ::= NK_MINUS NK_INTEGER", - /* 475 */ "signed ::= NK_FLOAT", - /* 476 */ "signed ::= NK_PLUS NK_FLOAT", - /* 477 */ "signed ::= NK_MINUS NK_FLOAT", - /* 478 */ "signed_literal ::= signed", - /* 479 */ "signed_literal ::= NK_STRING", - /* 480 */ "signed_literal ::= NK_BOOL", - /* 481 */ "signed_literal ::= TIMESTAMP NK_STRING", - /* 482 */ "signed_literal ::= duration_literal", - /* 483 */ "signed_literal ::= NULL", - /* 484 */ "signed_literal ::= literal_func", - /* 485 */ "signed_literal ::= NK_QUESTION", - /* 486 */ "literal_list ::= signed_literal", - /* 487 */ "literal_list ::= literal_list NK_COMMA signed_literal", - /* 488 */ "db_name ::= NK_ID", - /* 489 */ "table_name ::= NK_ID", - /* 490 */ "column_name ::= NK_ID", - /* 491 */ "function_name ::= NK_ID", - /* 492 */ "view_name ::= NK_ID", - /* 493 */ "table_alias ::= NK_ID", - /* 494 */ "column_alias ::= NK_ID", - /* 495 */ "column_alias ::= NK_ALIAS", - /* 496 */ "user_name ::= NK_ID", - /* 497 */ "topic_name ::= NK_ID", - /* 498 */ "stream_name ::= NK_ID", - /* 499 */ "cgroup_name ::= NK_ID", - /* 500 */ "index_name ::= NK_ID", - /* 501 */ "expr_or_subquery ::= expression", - /* 502 */ "expression ::= literal", - /* 503 */ "expression ::= pseudo_column", - /* 504 */ "expression ::= column_reference", - /* 505 */ "expression ::= function_expression", - /* 506 */ "expression ::= case_when_expression", - /* 507 */ "expression ::= NK_LP expression NK_RP", - /* 508 */ "expression ::= NK_PLUS expr_or_subquery", - /* 509 */ "expression ::= NK_MINUS expr_or_subquery", - /* 510 */ "expression ::= expr_or_subquery NK_PLUS expr_or_subquery", - /* 511 */ "expression ::= expr_or_subquery NK_MINUS expr_or_subquery", - /* 512 */ "expression ::= expr_or_subquery NK_STAR expr_or_subquery", - /* 513 */ "expression ::= expr_or_subquery NK_SLASH expr_or_subquery", - /* 514 */ "expression ::= expr_or_subquery NK_REM expr_or_subquery", - /* 515 */ "expression ::= column_reference NK_ARROW NK_STRING", - /* 516 */ "expression ::= expr_or_subquery NK_BITAND expr_or_subquery", - /* 517 */ "expression ::= expr_or_subquery NK_BITOR expr_or_subquery", - /* 518 */ "expression_list ::= expr_or_subquery", - /* 519 */ "expression_list ::= expression_list NK_COMMA expr_or_subquery", - /* 520 */ "column_reference ::= column_name", - /* 521 */ "column_reference ::= table_name NK_DOT column_name", - /* 522 */ "column_reference ::= NK_ALIAS", - /* 523 */ "column_reference ::= table_name NK_DOT NK_ALIAS", - /* 524 */ "pseudo_column ::= ROWTS", - /* 525 */ "pseudo_column ::= TBNAME", - /* 526 */ "pseudo_column ::= table_name NK_DOT TBNAME", - /* 527 */ "pseudo_column ::= QSTART", - /* 528 */ "pseudo_column ::= QEND", - /* 529 */ "pseudo_column ::= QDURATION", - /* 530 */ "pseudo_column ::= WSTART", - /* 531 */ "pseudo_column ::= WEND", - /* 532 */ "pseudo_column ::= WDURATION", - /* 533 */ "pseudo_column ::= IROWTS", - /* 534 */ "pseudo_column ::= ISFILLED", - /* 535 */ "pseudo_column ::= QTAGS", - /* 536 */ "function_expression ::= function_name NK_LP expression_list NK_RP", - /* 537 */ "function_expression ::= star_func NK_LP star_func_para_list NK_RP", - /* 538 */ "function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP", - /* 539 */ "function_expression ::= CAST NK_LP expr_or_subquery AS type_name_default_len NK_RP", - /* 540 */ "function_expression ::= literal_func", - /* 541 */ "literal_func ::= noarg_func NK_LP NK_RP", - /* 542 */ "literal_func ::= NOW", - /* 543 */ "literal_func ::= TODAY", - /* 544 */ "noarg_func ::= NOW", - /* 545 */ "noarg_func ::= TODAY", - /* 546 */ "noarg_func ::= TIMEZONE", - /* 547 */ "noarg_func ::= DATABASE", - /* 548 */ "noarg_func ::= CLIENT_VERSION", - /* 549 */ "noarg_func ::= SERVER_VERSION", - /* 550 */ "noarg_func ::= SERVER_STATUS", - /* 551 */ "noarg_func ::= CURRENT_USER", - /* 552 */ "noarg_func ::= USER", - /* 553 */ "star_func ::= COUNT", - /* 554 */ "star_func ::= FIRST", - /* 555 */ "star_func ::= LAST", - /* 556 */ "star_func ::= LAST_ROW", - /* 557 */ "star_func_para_list ::= NK_STAR", - /* 558 */ "star_func_para_list ::= other_para_list", - /* 559 */ "other_para_list ::= star_func_para", - /* 560 */ "other_para_list ::= other_para_list NK_COMMA star_func_para", - /* 561 */ "star_func_para ::= expr_or_subquery", - /* 562 */ "star_func_para ::= table_name NK_DOT NK_STAR", - /* 563 */ "case_when_expression ::= CASE when_then_list case_when_else_opt END", - /* 564 */ "case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END", - /* 565 */ "when_then_list ::= when_then_expr", - /* 566 */ "when_then_list ::= when_then_list when_then_expr", - /* 567 */ "when_then_expr ::= WHEN common_expression THEN common_expression", - /* 568 */ "case_when_else_opt ::=", - /* 569 */ "case_when_else_opt ::= ELSE common_expression", - /* 570 */ "predicate ::= expr_or_subquery compare_op expr_or_subquery", - /* 571 */ "predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery", - /* 572 */ "predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery", - /* 573 */ "predicate ::= expr_or_subquery IS NULL", - /* 574 */ "predicate ::= expr_or_subquery IS NOT NULL", - /* 575 */ "predicate ::= expr_or_subquery in_op in_predicate_value", - /* 576 */ "compare_op ::= NK_LT", - /* 577 */ "compare_op ::= NK_GT", - /* 578 */ "compare_op ::= NK_LE", - /* 579 */ "compare_op ::= NK_GE", - /* 580 */ "compare_op ::= NK_NE", - /* 581 */ "compare_op ::= NK_EQ", - /* 582 */ "compare_op ::= LIKE", - /* 583 */ "compare_op ::= NOT LIKE", - /* 584 */ "compare_op ::= MATCH", - /* 585 */ "compare_op ::= NMATCH", - /* 586 */ "compare_op ::= CONTAINS", - /* 587 */ "in_op ::= IN", - /* 588 */ "in_op ::= NOT IN", - /* 589 */ "in_predicate_value ::= NK_LP literal_list NK_RP", - /* 590 */ "boolean_value_expression ::= boolean_primary", - /* 591 */ "boolean_value_expression ::= NOT boolean_primary", - /* 592 */ "boolean_value_expression ::= boolean_value_expression OR boolean_value_expression", - /* 593 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression", - /* 594 */ "boolean_primary ::= predicate", - /* 595 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP", - /* 596 */ "common_expression ::= expr_or_subquery", - /* 597 */ "common_expression ::= boolean_value_expression", - /* 598 */ "from_clause_opt ::=", - /* 599 */ "from_clause_opt ::= FROM table_reference_list", - /* 600 */ "table_reference_list ::= table_reference", - /* 601 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference", - /* 602 */ "table_reference ::= table_primary", - /* 603 */ "table_reference ::= joined_table", - /* 604 */ "table_primary ::= table_name alias_opt", - /* 605 */ "table_primary ::= db_name NK_DOT table_name alias_opt", - /* 606 */ "table_primary ::= subquery alias_opt", - /* 607 */ "table_primary ::= parenthesized_joined_table", - /* 608 */ "alias_opt ::=", - /* 609 */ "alias_opt ::= table_alias", - /* 610 */ "alias_opt ::= AS table_alias", - /* 611 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP", - /* 612 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP", - /* 613 */ "joined_table ::= table_reference join_type JOIN table_reference ON search_condition", - /* 614 */ "join_type ::=", - /* 615 */ "join_type ::= INNER", - /* 616 */ "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", - /* 617 */ "hint_list ::=", - /* 618 */ "hint_list ::= NK_HINT", - /* 619 */ "tag_mode_opt ::=", - /* 620 */ "tag_mode_opt ::= TAGS", - /* 621 */ "set_quantifier_opt ::=", - /* 622 */ "set_quantifier_opt ::= DISTINCT", - /* 623 */ "set_quantifier_opt ::= ALL", - /* 624 */ "select_list ::= select_item", - /* 625 */ "select_list ::= select_list NK_COMMA select_item", - /* 626 */ "select_item ::= NK_STAR", - /* 627 */ "select_item ::= common_expression", - /* 628 */ "select_item ::= common_expression column_alias", - /* 629 */ "select_item ::= common_expression AS column_alias", - /* 630 */ "select_item ::= table_name NK_DOT NK_STAR", - /* 631 */ "where_clause_opt ::=", - /* 632 */ "where_clause_opt ::= WHERE search_condition", - /* 633 */ "partition_by_clause_opt ::=", - /* 634 */ "partition_by_clause_opt ::= PARTITION BY partition_list", - /* 635 */ "partition_list ::= partition_item", - /* 636 */ "partition_list ::= partition_list NK_COMMA partition_item", - /* 637 */ "partition_item ::= expr_or_subquery", - /* 638 */ "partition_item ::= expr_or_subquery column_alias", - /* 639 */ "partition_item ::= expr_or_subquery AS column_alias", - /* 640 */ "twindow_clause_opt ::=", - /* 641 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP", - /* 642 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP", - /* 643 */ "twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt", - /* 644 */ "twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_COMMA interval_sliding_duration_literal NK_RP sliding_opt fill_opt", - /* 645 */ "twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition", - /* 646 */ "twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_RP", - /* 647 */ "twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP", - /* 648 */ "sliding_opt ::=", - /* 649 */ "sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP", - /* 650 */ "interval_sliding_duration_literal ::= NK_VARIABLE", - /* 651 */ "interval_sliding_duration_literal ::= NK_STRING", - /* 652 */ "interval_sliding_duration_literal ::= NK_INTEGER", - /* 653 */ "fill_opt ::=", - /* 654 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP", - /* 655 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP", - /* 656 */ "fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP", - /* 657 */ "fill_mode ::= NONE", - /* 658 */ "fill_mode ::= PREV", - /* 659 */ "fill_mode ::= NULL", - /* 660 */ "fill_mode ::= NULL_F", - /* 661 */ "fill_mode ::= LINEAR", - /* 662 */ "fill_mode ::= NEXT", - /* 663 */ "group_by_clause_opt ::=", - /* 664 */ "group_by_clause_opt ::= GROUP BY group_by_list", - /* 665 */ "group_by_list ::= expr_or_subquery", - /* 666 */ "group_by_list ::= group_by_list NK_COMMA expr_or_subquery", - /* 667 */ "having_clause_opt ::=", - /* 668 */ "having_clause_opt ::= HAVING search_condition", - /* 669 */ "range_opt ::=", - /* 670 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP", - /* 671 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_RP", - /* 672 */ "every_opt ::=", - /* 673 */ "every_opt ::= EVERY NK_LP duration_literal NK_RP", - /* 674 */ "query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt", - /* 675 */ "query_simple ::= query_specification", - /* 676 */ "query_simple ::= union_query_expression", - /* 677 */ "union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery", - /* 678 */ "union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery", - /* 679 */ "query_simple_or_subquery ::= query_simple", - /* 680 */ "query_simple_or_subquery ::= subquery", - /* 681 */ "query_or_subquery ::= query_expression", - /* 682 */ "query_or_subquery ::= subquery", - /* 683 */ "order_by_clause_opt ::=", - /* 684 */ "order_by_clause_opt ::= ORDER BY sort_specification_list", - /* 685 */ "slimit_clause_opt ::=", - /* 686 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER", - /* 687 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER", - /* 688 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER", - /* 689 */ "limit_clause_opt ::=", - /* 690 */ "limit_clause_opt ::= LIMIT NK_INTEGER", - /* 691 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER", - /* 692 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER", - /* 693 */ "subquery ::= NK_LP query_expression NK_RP", - /* 694 */ "subquery ::= NK_LP subquery NK_RP", - /* 695 */ "search_condition ::= common_expression", - /* 696 */ "sort_specification_list ::= sort_specification", - /* 697 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification", - /* 698 */ "sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt", - /* 699 */ "ordering_specification_opt ::=", - /* 700 */ "ordering_specification_opt ::= ASC", - /* 701 */ "ordering_specification_opt ::= DESC", - /* 702 */ "null_ordering_opt ::=", - /* 703 */ "null_ordering_opt ::= NULLS FIRST", - /* 704 */ "null_ordering_opt ::= NULLS LAST", + /* 93 */ "cmd ::= S3MIGRATE DATABASE db_name", + /* 94 */ "cmd ::= COMPACT DATABASE db_name start_opt end_opt", + /* 95 */ "not_exists_opt ::= IF NOT EXISTS", + /* 96 */ "not_exists_opt ::=", + /* 97 */ "exists_opt ::= IF EXISTS", + /* 98 */ "exists_opt ::=", + /* 99 */ "db_options ::=", + /* 100 */ "db_options ::= db_options BUFFER NK_INTEGER", + /* 101 */ "db_options ::= db_options CACHEMODEL NK_STRING", + /* 102 */ "db_options ::= db_options CACHESIZE NK_INTEGER", + /* 103 */ "db_options ::= db_options COMP NK_INTEGER", + /* 104 */ "db_options ::= db_options DURATION NK_INTEGER", + /* 105 */ "db_options ::= db_options DURATION NK_VARIABLE", + /* 106 */ "db_options ::= db_options MAXROWS NK_INTEGER", + /* 107 */ "db_options ::= db_options MINROWS NK_INTEGER", + /* 108 */ "db_options ::= db_options KEEP integer_list", + /* 109 */ "db_options ::= db_options KEEP variable_list", + /* 110 */ "db_options ::= db_options PAGES NK_INTEGER", + /* 111 */ "db_options ::= db_options PAGESIZE NK_INTEGER", + /* 112 */ "db_options ::= db_options TSDB_PAGESIZE NK_INTEGER", + /* 113 */ "db_options ::= db_options PRECISION NK_STRING", + /* 114 */ "db_options ::= db_options REPLICA NK_INTEGER", + /* 115 */ "db_options ::= db_options VGROUPS NK_INTEGER", + /* 116 */ "db_options ::= db_options SINGLE_STABLE NK_INTEGER", + /* 117 */ "db_options ::= db_options RETENTIONS retention_list", + /* 118 */ "db_options ::= db_options SCHEMALESS NK_INTEGER", + /* 119 */ "db_options ::= db_options WAL_LEVEL NK_INTEGER", + /* 120 */ "db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER", + /* 121 */ "db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER", + /* 122 */ "db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER", + /* 123 */ "db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER", + /* 124 */ "db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER", + /* 125 */ "db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER", + /* 126 */ "db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER", + /* 127 */ "db_options ::= db_options STT_TRIGGER NK_INTEGER", + /* 128 */ "db_options ::= db_options TABLE_PREFIX signed", + /* 129 */ "db_options ::= db_options TABLE_SUFFIX signed", + /* 130 */ "db_options ::= db_options S3_CHUNKSIZE NK_INTEGER", + /* 131 */ "db_options ::= db_options S3_KEEPLOCAL NK_INTEGER", + /* 132 */ "db_options ::= db_options S3_KEEPLOCAL NK_VARIABLE", + /* 133 */ "db_options ::= db_options S3_COMPACT NK_INTEGER", + /* 134 */ "db_options ::= db_options KEEP_TIME_OFFSET NK_INTEGER", + /* 135 */ "db_options ::= db_options ENCRYPT_ALGORITHM NK_STRING", + /* 136 */ "alter_db_options ::= alter_db_option", + /* 137 */ "alter_db_options ::= alter_db_options alter_db_option", + /* 138 */ "alter_db_option ::= BUFFER NK_INTEGER", + /* 139 */ "alter_db_option ::= CACHEMODEL NK_STRING", + /* 140 */ "alter_db_option ::= CACHESIZE NK_INTEGER", + /* 141 */ "alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER", + /* 142 */ "alter_db_option ::= KEEP integer_list", + /* 143 */ "alter_db_option ::= KEEP variable_list", + /* 144 */ "alter_db_option ::= PAGES NK_INTEGER", + /* 145 */ "alter_db_option ::= REPLICA NK_INTEGER", + /* 146 */ "alter_db_option ::= WAL_LEVEL NK_INTEGER", + /* 147 */ "alter_db_option ::= STT_TRIGGER NK_INTEGER", + /* 148 */ "alter_db_option ::= MINROWS NK_INTEGER", + /* 149 */ "alter_db_option ::= WAL_RETENTION_PERIOD NK_INTEGER", + /* 150 */ "alter_db_option ::= WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER", + /* 151 */ "alter_db_option ::= WAL_RETENTION_SIZE NK_INTEGER", + /* 152 */ "alter_db_option ::= WAL_RETENTION_SIZE NK_MINUS NK_INTEGER", + /* 153 */ "alter_db_option ::= S3_KEEPLOCAL NK_INTEGER", + /* 154 */ "alter_db_option ::= S3_KEEPLOCAL NK_VARIABLE", + /* 155 */ "alter_db_option ::= S3_COMPACT NK_INTEGER", + /* 156 */ "alter_db_option ::= KEEP_TIME_OFFSET NK_INTEGER", + /* 157 */ "alter_db_option ::= ENCRYPT_ALGORITHM NK_STRING", + /* 158 */ "integer_list ::= NK_INTEGER", + /* 159 */ "integer_list ::= integer_list NK_COMMA NK_INTEGER", + /* 160 */ "variable_list ::= NK_VARIABLE", + /* 161 */ "variable_list ::= variable_list NK_COMMA NK_VARIABLE", + /* 162 */ "retention_list ::= retention", + /* 163 */ "retention_list ::= retention_list NK_COMMA retention", + /* 164 */ "retention ::= NK_VARIABLE NK_COLON NK_VARIABLE", + /* 165 */ "retention ::= NK_MINUS NK_COLON NK_VARIABLE", + /* 166 */ "speed_opt ::=", + /* 167 */ "speed_opt ::= BWLIMIT NK_INTEGER", + /* 168 */ "start_opt ::=", + /* 169 */ "start_opt ::= START WITH NK_INTEGER", + /* 170 */ "start_opt ::= START WITH NK_STRING", + /* 171 */ "start_opt ::= START WITH TIMESTAMP NK_STRING", + /* 172 */ "end_opt ::=", + /* 173 */ "end_opt ::= END WITH NK_INTEGER", + /* 174 */ "end_opt ::= END WITH NK_STRING", + /* 175 */ "end_opt ::= END WITH TIMESTAMP NK_STRING", + /* 176 */ "cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options", + /* 177 */ "cmd ::= CREATE TABLE multi_create_clause", + /* 178 */ "cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options", + /* 179 */ "cmd ::= DROP TABLE multi_drop_clause", + /* 180 */ "cmd ::= DROP STABLE exists_opt full_table_name", + /* 181 */ "cmd ::= ALTER TABLE alter_table_clause", + /* 182 */ "cmd ::= ALTER STABLE alter_table_clause", + /* 183 */ "alter_table_clause ::= full_table_name alter_table_options", + /* 184 */ "alter_table_clause ::= full_table_name ADD COLUMN column_name type_name", + /* 185 */ "alter_table_clause ::= full_table_name DROP COLUMN column_name", + /* 186 */ "alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name", + /* 187 */ "alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name", + /* 188 */ "alter_table_clause ::= full_table_name ADD TAG column_name type_name", + /* 189 */ "alter_table_clause ::= full_table_name DROP TAG column_name", + /* 190 */ "alter_table_clause ::= full_table_name MODIFY TAG column_name type_name", + /* 191 */ "alter_table_clause ::= full_table_name RENAME TAG column_name column_name", + /* 192 */ "alter_table_clause ::= full_table_name SET TAG column_name NK_EQ tags_literal", + /* 193 */ "multi_create_clause ::= create_subtable_clause", + /* 194 */ "multi_create_clause ::= multi_create_clause create_subtable_clause", + /* 195 */ "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", + /* 196 */ "multi_drop_clause ::= drop_table_clause", + /* 197 */ "multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause", + /* 198 */ "drop_table_clause ::= exists_opt full_table_name", + /* 199 */ "specific_cols_opt ::=", + /* 200 */ "specific_cols_opt ::= NK_LP col_name_list NK_RP", + /* 201 */ "full_table_name ::= table_name", + /* 202 */ "full_table_name ::= db_name NK_DOT table_name", + /* 203 */ "column_def_list ::= column_def", + /* 204 */ "column_def_list ::= column_def_list NK_COMMA column_def", + /* 205 */ "column_def ::= column_name type_name", + /* 206 */ "column_def ::= column_name type_name PRIMARY KEY", + /* 207 */ "type_name ::= BOOL", + /* 208 */ "type_name ::= TINYINT", + /* 209 */ "type_name ::= SMALLINT", + /* 210 */ "type_name ::= INT", + /* 211 */ "type_name ::= INTEGER", + /* 212 */ "type_name ::= BIGINT", + /* 213 */ "type_name ::= FLOAT", + /* 214 */ "type_name ::= DOUBLE", + /* 215 */ "type_name ::= BINARY NK_LP NK_INTEGER NK_RP", + /* 216 */ "type_name ::= TIMESTAMP", + /* 217 */ "type_name ::= NCHAR NK_LP NK_INTEGER NK_RP", + /* 218 */ "type_name ::= TINYINT UNSIGNED", + /* 219 */ "type_name ::= SMALLINT UNSIGNED", + /* 220 */ "type_name ::= INT UNSIGNED", + /* 221 */ "type_name ::= BIGINT UNSIGNED", + /* 222 */ "type_name ::= JSON", + /* 223 */ "type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP", + /* 224 */ "type_name ::= MEDIUMBLOB", + /* 225 */ "type_name ::= BLOB", + /* 226 */ "type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP", + /* 227 */ "type_name ::= GEOMETRY NK_LP NK_INTEGER NK_RP", + /* 228 */ "type_name ::= DECIMAL", + /* 229 */ "type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP", + /* 230 */ "type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP", + /* 231 */ "type_name_default_len ::= BINARY", + /* 232 */ "type_name_default_len ::= NCHAR", + /* 233 */ "type_name_default_len ::= VARCHAR", + /* 234 */ "type_name_default_len ::= VARBINARY", + /* 235 */ "tags_def_opt ::=", + /* 236 */ "tags_def_opt ::= tags_def", + /* 237 */ "tags_def ::= TAGS NK_LP column_def_list NK_RP", + /* 238 */ "table_options ::=", + /* 239 */ "table_options ::= table_options COMMENT NK_STRING", + /* 240 */ "table_options ::= table_options MAX_DELAY duration_list", + /* 241 */ "table_options ::= table_options WATERMARK duration_list", + /* 242 */ "table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP", + /* 243 */ "table_options ::= table_options TTL NK_INTEGER", + /* 244 */ "table_options ::= table_options SMA NK_LP col_name_list NK_RP", + /* 245 */ "table_options ::= table_options DELETE_MARK duration_list", + /* 246 */ "alter_table_options ::= alter_table_option", + /* 247 */ "alter_table_options ::= alter_table_options alter_table_option", + /* 248 */ "alter_table_option ::= COMMENT NK_STRING", + /* 249 */ "alter_table_option ::= TTL NK_INTEGER", + /* 250 */ "duration_list ::= duration_literal", + /* 251 */ "duration_list ::= duration_list NK_COMMA duration_literal", + /* 252 */ "rollup_func_list ::= rollup_func_name", + /* 253 */ "rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name", + /* 254 */ "rollup_func_name ::= function_name", + /* 255 */ "rollup_func_name ::= FIRST", + /* 256 */ "rollup_func_name ::= LAST", + /* 257 */ "col_name_list ::= col_name", + /* 258 */ "col_name_list ::= col_name_list NK_COMMA col_name", + /* 259 */ "col_name ::= column_name", + /* 260 */ "cmd ::= SHOW DNODES", + /* 261 */ "cmd ::= SHOW USERS", + /* 262 */ "cmd ::= SHOW USER PRIVILEGES", + /* 263 */ "cmd ::= SHOW db_kind_opt DATABASES", + /* 264 */ "cmd ::= SHOW table_kind_db_name_cond_opt TABLES like_pattern_opt", + /* 265 */ "cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt", + /* 266 */ "cmd ::= SHOW db_name_cond_opt VGROUPS", + /* 267 */ "cmd ::= SHOW MNODES", + /* 268 */ "cmd ::= SHOW QNODES", + /* 269 */ "cmd ::= SHOW ARBGROUPS", + /* 270 */ "cmd ::= SHOW FUNCTIONS", + /* 271 */ "cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt", + /* 272 */ "cmd ::= SHOW INDEXES FROM db_name NK_DOT table_name", + /* 273 */ "cmd ::= SHOW STREAMS", + /* 274 */ "cmd ::= SHOW ACCOUNTS", + /* 275 */ "cmd ::= SHOW APPS", + /* 276 */ "cmd ::= SHOW CONNECTIONS", + /* 277 */ "cmd ::= SHOW LICENCES", + /* 278 */ "cmd ::= SHOW GRANTS", + /* 279 */ "cmd ::= SHOW GRANTS FULL", + /* 280 */ "cmd ::= SHOW GRANTS LOGS", + /* 281 */ "cmd ::= SHOW CLUSTER MACHINES", + /* 282 */ "cmd ::= SHOW CREATE DATABASE db_name", + /* 283 */ "cmd ::= SHOW CREATE TABLE full_table_name", + /* 284 */ "cmd ::= SHOW CREATE STABLE full_table_name", + /* 285 */ "cmd ::= SHOW ENCRYPTIONS", + /* 286 */ "cmd ::= SHOW QUERIES", + /* 287 */ "cmd ::= SHOW SCORES", + /* 288 */ "cmd ::= SHOW TOPICS", + /* 289 */ "cmd ::= SHOW VARIABLES", + /* 290 */ "cmd ::= SHOW CLUSTER VARIABLES", + /* 291 */ "cmd ::= SHOW LOCAL VARIABLES", + /* 292 */ "cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt", + /* 293 */ "cmd ::= SHOW BNODES", + /* 294 */ "cmd ::= SHOW SNODES", + /* 295 */ "cmd ::= SHOW CLUSTER", + /* 296 */ "cmd ::= SHOW TRANSACTIONS", + /* 297 */ "cmd ::= SHOW TABLE DISTRIBUTED full_table_name", + /* 298 */ "cmd ::= SHOW CONSUMERS", + /* 299 */ "cmd ::= SHOW SUBSCRIPTIONS", + /* 300 */ "cmd ::= SHOW TAGS FROM table_name_cond from_db_opt", + /* 301 */ "cmd ::= SHOW TAGS FROM db_name NK_DOT table_name", + /* 302 */ "cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt", + /* 303 */ "cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name", + /* 304 */ "cmd ::= SHOW VNODES ON DNODE NK_INTEGER", + /* 305 */ "cmd ::= SHOW VNODES", + /* 306 */ "cmd ::= SHOW db_name_cond_opt ALIVE", + /* 307 */ "cmd ::= SHOW CLUSTER ALIVE", + /* 308 */ "cmd ::= SHOW db_name_cond_opt VIEWS like_pattern_opt", + /* 309 */ "cmd ::= SHOW CREATE VIEW full_table_name", + /* 310 */ "cmd ::= SHOW COMPACTS", + /* 311 */ "cmd ::= SHOW COMPACT NK_INTEGER", + /* 312 */ "table_kind_db_name_cond_opt ::=", + /* 313 */ "table_kind_db_name_cond_opt ::= table_kind", + /* 314 */ "table_kind_db_name_cond_opt ::= db_name NK_DOT", + /* 315 */ "table_kind_db_name_cond_opt ::= table_kind db_name NK_DOT", + /* 316 */ "table_kind ::= NORMAL", + /* 317 */ "table_kind ::= CHILD", + /* 318 */ "db_name_cond_opt ::=", + /* 319 */ "db_name_cond_opt ::= db_name NK_DOT", + /* 320 */ "like_pattern_opt ::=", + /* 321 */ "like_pattern_opt ::= LIKE NK_STRING", + /* 322 */ "table_name_cond ::= table_name", + /* 323 */ "from_db_opt ::=", + /* 324 */ "from_db_opt ::= FROM db_name", + /* 325 */ "tag_list_opt ::=", + /* 326 */ "tag_list_opt ::= tag_item", + /* 327 */ "tag_list_opt ::= tag_list_opt NK_COMMA tag_item", + /* 328 */ "tag_item ::= TBNAME", + /* 329 */ "tag_item ::= QTAGS", + /* 330 */ "tag_item ::= column_name", + /* 331 */ "tag_item ::= column_name column_alias", + /* 332 */ "tag_item ::= column_name AS column_alias", + /* 333 */ "db_kind_opt ::=", + /* 334 */ "db_kind_opt ::= USER", + /* 335 */ "db_kind_opt ::= SYSTEM", + /* 336 */ "cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options", + /* 337 */ "cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP", + /* 338 */ "cmd ::= DROP INDEX exists_opt full_index_name", + /* 339 */ "full_index_name ::= index_name", + /* 340 */ "full_index_name ::= db_name NK_DOT index_name", + /* 341 */ "index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt", + /* 342 */ "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", + /* 343 */ "func_list ::= func", + /* 344 */ "func_list ::= func_list NK_COMMA func", + /* 345 */ "func ::= sma_func_name NK_LP expression_list NK_RP", + /* 346 */ "sma_func_name ::= function_name", + /* 347 */ "sma_func_name ::= COUNT", + /* 348 */ "sma_func_name ::= FIRST", + /* 349 */ "sma_func_name ::= LAST", + /* 350 */ "sma_func_name ::= LAST_ROW", + /* 351 */ "sma_stream_opt ::=", + /* 352 */ "sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal", + /* 353 */ "sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal", + /* 354 */ "sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal", + /* 355 */ "with_meta ::= AS", + /* 356 */ "with_meta ::= WITH META AS", + /* 357 */ "with_meta ::= ONLY META AS", + /* 358 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery", + /* 359 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name", + /* 360 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt", + /* 361 */ "cmd ::= DROP TOPIC exists_opt topic_name", + /* 362 */ "cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name", + /* 363 */ "cmd ::= DESC full_table_name", + /* 364 */ "cmd ::= DESCRIBE full_table_name", + /* 365 */ "cmd ::= RESET QUERY CACHE", + /* 366 */ "cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery", + /* 367 */ "cmd ::= EXPLAIN analyze_opt explain_options insert_query", + /* 368 */ "analyze_opt ::=", + /* 369 */ "analyze_opt ::= ANALYZE", + /* 370 */ "explain_options ::=", + /* 371 */ "explain_options ::= explain_options VERBOSE NK_BOOL", + /* 372 */ "explain_options ::= explain_options RATIO NK_FLOAT", + /* 373 */ "cmd ::= CREATE or_replace_opt agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt language_opt", + /* 374 */ "cmd ::= DROP FUNCTION exists_opt function_name", + /* 375 */ "agg_func_opt ::=", + /* 376 */ "agg_func_opt ::= AGGREGATE", + /* 377 */ "bufsize_opt ::=", + /* 378 */ "bufsize_opt ::= BUFSIZE NK_INTEGER", + /* 379 */ "language_opt ::=", + /* 380 */ "language_opt ::= LANGUAGE NK_STRING", + /* 381 */ "or_replace_opt ::=", + /* 382 */ "or_replace_opt ::= OR REPLACE", + /* 383 */ "cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery", + /* 384 */ "cmd ::= DROP VIEW exists_opt full_view_name", + /* 385 */ "full_view_name ::= view_name", + /* 386 */ "full_view_name ::= db_name NK_DOT view_name", + /* 387 */ "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", + /* 388 */ "cmd ::= DROP STREAM exists_opt stream_name", + /* 389 */ "cmd ::= PAUSE STREAM exists_opt stream_name", + /* 390 */ "cmd ::= RESUME STREAM exists_opt ignore_opt stream_name", + /* 391 */ "col_list_opt ::=", + /* 392 */ "col_list_opt ::= NK_LP column_stream_def_list NK_RP", + /* 393 */ "column_stream_def_list ::= column_stream_def", + /* 394 */ "column_stream_def_list ::= column_stream_def_list NK_COMMA column_stream_def", + /* 395 */ "column_stream_def ::= column_name", + /* 396 */ "column_stream_def ::= column_name PRIMARY KEY", + /* 397 */ "tag_def_or_ref_opt ::=", + /* 398 */ "tag_def_or_ref_opt ::= tags_def", + /* 399 */ "tag_def_or_ref_opt ::= TAGS NK_LP column_stream_def_list NK_RP", + /* 400 */ "stream_options ::=", + /* 401 */ "stream_options ::= stream_options TRIGGER AT_ONCE", + /* 402 */ "stream_options ::= stream_options TRIGGER WINDOW_CLOSE", + /* 403 */ "stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal", + /* 404 */ "stream_options ::= stream_options WATERMARK duration_literal", + /* 405 */ "stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER", + /* 406 */ "stream_options ::= stream_options FILL_HISTORY NK_INTEGER", + /* 407 */ "stream_options ::= stream_options DELETE_MARK duration_literal", + /* 408 */ "stream_options ::= stream_options IGNORE UPDATE NK_INTEGER", + /* 409 */ "subtable_opt ::=", + /* 410 */ "subtable_opt ::= SUBTABLE NK_LP expression NK_RP", + /* 411 */ "ignore_opt ::=", + /* 412 */ "ignore_opt ::= IGNORE UNTREATED", + /* 413 */ "cmd ::= KILL CONNECTION NK_INTEGER", + /* 414 */ "cmd ::= KILL QUERY NK_STRING", + /* 415 */ "cmd ::= KILL TRANSACTION NK_INTEGER", + /* 416 */ "cmd ::= KILL COMPACT NK_INTEGER", + /* 417 */ "cmd ::= BALANCE VGROUP", + /* 418 */ "cmd ::= BALANCE VGROUP LEADER on_vgroup_id", + /* 419 */ "cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER", + /* 420 */ "cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list", + /* 421 */ "cmd ::= SPLIT VGROUP NK_INTEGER", + /* 422 */ "on_vgroup_id ::=", + /* 423 */ "on_vgroup_id ::= ON NK_INTEGER", + /* 424 */ "dnode_list ::= DNODE NK_INTEGER", + /* 425 */ "dnode_list ::= dnode_list DNODE NK_INTEGER", + /* 426 */ "cmd ::= DELETE FROM full_table_name where_clause_opt", + /* 427 */ "cmd ::= query_or_subquery", + /* 428 */ "cmd ::= insert_query", + /* 429 */ "insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery", + /* 430 */ "insert_query ::= INSERT INTO full_table_name query_or_subquery", + /* 431 */ "tags_literal ::= NK_INTEGER", + /* 432 */ "tags_literal ::= NK_INTEGER NK_PLUS duration_literal", + /* 433 */ "tags_literal ::= NK_INTEGER NK_MINUS duration_literal", + /* 434 */ "tags_literal ::= NK_PLUS NK_INTEGER", + /* 435 */ "tags_literal ::= NK_PLUS NK_INTEGER NK_PLUS duration_literal", + /* 436 */ "tags_literal ::= NK_PLUS NK_INTEGER NK_MINUS duration_literal", + /* 437 */ "tags_literal ::= NK_MINUS NK_INTEGER", + /* 438 */ "tags_literal ::= NK_MINUS NK_INTEGER NK_PLUS duration_literal", + /* 439 */ "tags_literal ::= NK_MINUS NK_INTEGER NK_MINUS duration_literal", + /* 440 */ "tags_literal ::= NK_FLOAT", + /* 441 */ "tags_literal ::= NK_PLUS NK_FLOAT", + /* 442 */ "tags_literal ::= NK_MINUS NK_FLOAT", + /* 443 */ "tags_literal ::= NK_BIN", + /* 444 */ "tags_literal ::= NK_BIN NK_PLUS duration_literal", + /* 445 */ "tags_literal ::= NK_BIN NK_MINUS duration_literal", + /* 446 */ "tags_literal ::= NK_PLUS NK_BIN", + /* 447 */ "tags_literal ::= NK_PLUS NK_BIN NK_PLUS duration_literal", + /* 448 */ "tags_literal ::= NK_PLUS NK_BIN NK_MINUS duration_literal", + /* 449 */ "tags_literal ::= NK_MINUS NK_BIN", + /* 450 */ "tags_literal ::= NK_MINUS NK_BIN NK_PLUS duration_literal", + /* 451 */ "tags_literal ::= NK_MINUS NK_BIN NK_MINUS duration_literal", + /* 452 */ "tags_literal ::= NK_HEX", + /* 453 */ "tags_literal ::= NK_HEX NK_PLUS duration_literal", + /* 454 */ "tags_literal ::= NK_HEX NK_MINUS duration_literal", + /* 455 */ "tags_literal ::= NK_PLUS NK_HEX", + /* 456 */ "tags_literal ::= NK_PLUS NK_HEX NK_PLUS duration_literal", + /* 457 */ "tags_literal ::= NK_PLUS NK_HEX NK_MINUS duration_literal", + /* 458 */ "tags_literal ::= NK_MINUS NK_HEX", + /* 459 */ "tags_literal ::= NK_MINUS NK_HEX NK_PLUS duration_literal", + /* 460 */ "tags_literal ::= NK_MINUS NK_HEX NK_MINUS duration_literal", + /* 461 */ "tags_literal ::= NK_STRING", + /* 462 */ "tags_literal ::= NK_STRING NK_PLUS duration_literal", + /* 463 */ "tags_literal ::= NK_STRING NK_MINUS duration_literal", + /* 464 */ "tags_literal ::= NK_BOOL", + /* 465 */ "tags_literal ::= NULL", + /* 466 */ "tags_literal ::= literal_func", + /* 467 */ "tags_literal ::= literal_func NK_PLUS duration_literal", + /* 468 */ "tags_literal ::= literal_func NK_MINUS duration_literal", + /* 469 */ "tags_literal_list ::= tags_literal", + /* 470 */ "tags_literal_list ::= tags_literal_list NK_COMMA tags_literal", + /* 471 */ "literal ::= NK_INTEGER", + /* 472 */ "literal ::= NK_FLOAT", + /* 473 */ "literal ::= NK_STRING", + /* 474 */ "literal ::= NK_BOOL", + /* 475 */ "literal ::= TIMESTAMP NK_STRING", + /* 476 */ "literal ::= duration_literal", + /* 477 */ "literal ::= NULL", + /* 478 */ "literal ::= NK_QUESTION", + /* 479 */ "duration_literal ::= NK_VARIABLE", + /* 480 */ "signed ::= NK_INTEGER", + /* 481 */ "signed ::= NK_PLUS NK_INTEGER", + /* 482 */ "signed ::= NK_MINUS NK_INTEGER", + /* 483 */ "signed ::= NK_FLOAT", + /* 484 */ "signed ::= NK_PLUS NK_FLOAT", + /* 485 */ "signed ::= NK_MINUS NK_FLOAT", + /* 486 */ "signed_literal ::= signed", + /* 487 */ "signed_literal ::= NK_STRING", + /* 488 */ "signed_literal ::= NK_BOOL", + /* 489 */ "signed_literal ::= TIMESTAMP NK_STRING", + /* 490 */ "signed_literal ::= duration_literal", + /* 491 */ "signed_literal ::= NULL", + /* 492 */ "signed_literal ::= literal_func", + /* 493 */ "signed_literal ::= NK_QUESTION", + /* 494 */ "literal_list ::= signed_literal", + /* 495 */ "literal_list ::= literal_list NK_COMMA signed_literal", + /* 496 */ "db_name ::= NK_ID", + /* 497 */ "table_name ::= NK_ID", + /* 498 */ "column_name ::= NK_ID", + /* 499 */ "function_name ::= NK_ID", + /* 500 */ "view_name ::= NK_ID", + /* 501 */ "table_alias ::= NK_ID", + /* 502 */ "column_alias ::= NK_ID", + /* 503 */ "column_alias ::= NK_ALIAS", + /* 504 */ "user_name ::= NK_ID", + /* 505 */ "topic_name ::= NK_ID", + /* 506 */ "stream_name ::= NK_ID", + /* 507 */ "cgroup_name ::= NK_ID", + /* 508 */ "index_name ::= NK_ID", + /* 509 */ "expr_or_subquery ::= expression", + /* 510 */ "expression ::= literal", + /* 511 */ "expression ::= pseudo_column", + /* 512 */ "expression ::= column_reference", + /* 513 */ "expression ::= function_expression", + /* 514 */ "expression ::= case_when_expression", + /* 515 */ "expression ::= NK_LP expression NK_RP", + /* 516 */ "expression ::= NK_PLUS expr_or_subquery", + /* 517 */ "expression ::= NK_MINUS expr_or_subquery", + /* 518 */ "expression ::= expr_or_subquery NK_PLUS expr_or_subquery", + /* 519 */ "expression ::= expr_or_subquery NK_MINUS expr_or_subquery", + /* 520 */ "expression ::= expr_or_subquery NK_STAR expr_or_subquery", + /* 521 */ "expression ::= expr_or_subquery NK_SLASH expr_or_subquery", + /* 522 */ "expression ::= expr_or_subquery NK_REM expr_or_subquery", + /* 523 */ "expression ::= column_reference NK_ARROW NK_STRING", + /* 524 */ "expression ::= expr_or_subquery NK_BITAND expr_or_subquery", + /* 525 */ "expression ::= expr_or_subquery NK_BITOR expr_or_subquery", + /* 526 */ "expression_list ::= expr_or_subquery", + /* 527 */ "expression_list ::= expression_list NK_COMMA expr_or_subquery", + /* 528 */ "column_reference ::= column_name", + /* 529 */ "column_reference ::= table_name NK_DOT column_name", + /* 530 */ "column_reference ::= NK_ALIAS", + /* 531 */ "column_reference ::= table_name NK_DOT NK_ALIAS", + /* 532 */ "pseudo_column ::= ROWTS", + /* 533 */ "pseudo_column ::= TBNAME", + /* 534 */ "pseudo_column ::= table_name NK_DOT TBNAME", + /* 535 */ "pseudo_column ::= QSTART", + /* 536 */ "pseudo_column ::= QEND", + /* 537 */ "pseudo_column ::= QDURATION", + /* 538 */ "pseudo_column ::= WSTART", + /* 539 */ "pseudo_column ::= WEND", + /* 540 */ "pseudo_column ::= WDURATION", + /* 541 */ "pseudo_column ::= IROWTS", + /* 542 */ "pseudo_column ::= ISFILLED", + /* 543 */ "pseudo_column ::= QTAGS", + /* 544 */ "function_expression ::= function_name NK_LP expression_list NK_RP", + /* 545 */ "function_expression ::= star_func NK_LP star_func_para_list NK_RP", + /* 546 */ "function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP", + /* 547 */ "function_expression ::= CAST NK_LP expr_or_subquery AS type_name_default_len NK_RP", + /* 548 */ "function_expression ::= literal_func", + /* 549 */ "literal_func ::= noarg_func NK_LP NK_RP", + /* 550 */ "literal_func ::= NOW", + /* 551 */ "literal_func ::= TODAY", + /* 552 */ "noarg_func ::= NOW", + /* 553 */ "noarg_func ::= TODAY", + /* 554 */ "noarg_func ::= TIMEZONE", + /* 555 */ "noarg_func ::= DATABASE", + /* 556 */ "noarg_func ::= CLIENT_VERSION", + /* 557 */ "noarg_func ::= SERVER_VERSION", + /* 558 */ "noarg_func ::= SERVER_STATUS", + /* 559 */ "noarg_func ::= CURRENT_USER", + /* 560 */ "noarg_func ::= USER", + /* 561 */ "star_func ::= COUNT", + /* 562 */ "star_func ::= FIRST", + /* 563 */ "star_func ::= LAST", + /* 564 */ "star_func ::= LAST_ROW", + /* 565 */ "star_func_para_list ::= NK_STAR", + /* 566 */ "star_func_para_list ::= other_para_list", + /* 567 */ "other_para_list ::= star_func_para", + /* 568 */ "other_para_list ::= other_para_list NK_COMMA star_func_para", + /* 569 */ "star_func_para ::= expr_or_subquery", + /* 570 */ "star_func_para ::= table_name NK_DOT NK_STAR", + /* 571 */ "case_when_expression ::= CASE when_then_list case_when_else_opt END", + /* 572 */ "case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END", + /* 573 */ "when_then_list ::= when_then_expr", + /* 574 */ "when_then_list ::= when_then_list when_then_expr", + /* 575 */ "when_then_expr ::= WHEN common_expression THEN common_expression", + /* 576 */ "case_when_else_opt ::=", + /* 577 */ "case_when_else_opt ::= ELSE common_expression", + /* 578 */ "predicate ::= expr_or_subquery compare_op expr_or_subquery", + /* 579 */ "predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery", + /* 580 */ "predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery", + /* 581 */ "predicate ::= expr_or_subquery IS NULL", + /* 582 */ "predicate ::= expr_or_subquery IS NOT NULL", + /* 583 */ "predicate ::= expr_or_subquery in_op in_predicate_value", + /* 584 */ "compare_op ::= NK_LT", + /* 585 */ "compare_op ::= NK_GT", + /* 586 */ "compare_op ::= NK_LE", + /* 587 */ "compare_op ::= NK_GE", + /* 588 */ "compare_op ::= NK_NE", + /* 589 */ "compare_op ::= NK_EQ", + /* 590 */ "compare_op ::= LIKE", + /* 591 */ "compare_op ::= NOT LIKE", + /* 592 */ "compare_op ::= MATCH", + /* 593 */ "compare_op ::= NMATCH", + /* 594 */ "compare_op ::= CONTAINS", + /* 595 */ "in_op ::= IN", + /* 596 */ "in_op ::= NOT IN", + /* 597 */ "in_predicate_value ::= NK_LP literal_list NK_RP", + /* 598 */ "boolean_value_expression ::= boolean_primary", + /* 599 */ "boolean_value_expression ::= NOT boolean_primary", + /* 600 */ "boolean_value_expression ::= boolean_value_expression OR boolean_value_expression", + /* 601 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression", + /* 602 */ "boolean_primary ::= predicate", + /* 603 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP", + /* 604 */ "common_expression ::= expr_or_subquery", + /* 605 */ "common_expression ::= boolean_value_expression", + /* 606 */ "from_clause_opt ::=", + /* 607 */ "from_clause_opt ::= FROM table_reference_list", + /* 608 */ "table_reference_list ::= table_reference", + /* 609 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference", + /* 610 */ "table_reference ::= table_primary", + /* 611 */ "table_reference ::= joined_table", + /* 612 */ "table_primary ::= table_name alias_opt", + /* 613 */ "table_primary ::= db_name NK_DOT table_name alias_opt", + /* 614 */ "table_primary ::= subquery alias_opt", + /* 615 */ "table_primary ::= parenthesized_joined_table", + /* 616 */ "alias_opt ::=", + /* 617 */ "alias_opt ::= table_alias", + /* 618 */ "alias_opt ::= AS table_alias", + /* 619 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP", + /* 620 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP", + /* 621 */ "joined_table ::= table_reference join_type JOIN table_reference ON search_condition", + /* 622 */ "join_type ::=", + /* 623 */ "join_type ::= INNER", + /* 624 */ "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", + /* 625 */ "hint_list ::=", + /* 626 */ "hint_list ::= NK_HINT", + /* 627 */ "tag_mode_opt ::=", + /* 628 */ "tag_mode_opt ::= TAGS", + /* 629 */ "set_quantifier_opt ::=", + /* 630 */ "set_quantifier_opt ::= DISTINCT", + /* 631 */ "set_quantifier_opt ::= ALL", + /* 632 */ "select_list ::= select_item", + /* 633 */ "select_list ::= select_list NK_COMMA select_item", + /* 634 */ "select_item ::= NK_STAR", + /* 635 */ "select_item ::= common_expression", + /* 636 */ "select_item ::= common_expression column_alias", + /* 637 */ "select_item ::= common_expression AS column_alias", + /* 638 */ "select_item ::= table_name NK_DOT NK_STAR", + /* 639 */ "where_clause_opt ::=", + /* 640 */ "where_clause_opt ::= WHERE search_condition", + /* 641 */ "partition_by_clause_opt ::=", + /* 642 */ "partition_by_clause_opt ::= PARTITION BY partition_list", + /* 643 */ "partition_list ::= partition_item", + /* 644 */ "partition_list ::= partition_list NK_COMMA partition_item", + /* 645 */ "partition_item ::= expr_or_subquery", + /* 646 */ "partition_item ::= expr_or_subquery column_alias", + /* 647 */ "partition_item ::= expr_or_subquery AS column_alias", + /* 648 */ "twindow_clause_opt ::=", + /* 649 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP", + /* 650 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP", + /* 651 */ "twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt", + /* 652 */ "twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_COMMA interval_sliding_duration_literal NK_RP sliding_opt fill_opt", + /* 653 */ "twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition", + /* 654 */ "twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_RP", + /* 655 */ "twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP", + /* 656 */ "sliding_opt ::=", + /* 657 */ "sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP", + /* 658 */ "interval_sliding_duration_literal ::= NK_VARIABLE", + /* 659 */ "interval_sliding_duration_literal ::= NK_STRING", + /* 660 */ "interval_sliding_duration_literal ::= NK_INTEGER", + /* 661 */ "fill_opt ::=", + /* 662 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP", + /* 663 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP", + /* 664 */ "fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP", + /* 665 */ "fill_mode ::= NONE", + /* 666 */ "fill_mode ::= PREV", + /* 667 */ "fill_mode ::= NULL", + /* 668 */ "fill_mode ::= NULL_F", + /* 669 */ "fill_mode ::= LINEAR", + /* 670 */ "fill_mode ::= NEXT", + /* 671 */ "group_by_clause_opt ::=", + /* 672 */ "group_by_clause_opt ::= GROUP BY group_by_list", + /* 673 */ "group_by_list ::= expr_or_subquery", + /* 674 */ "group_by_list ::= group_by_list NK_COMMA expr_or_subquery", + /* 675 */ "having_clause_opt ::=", + /* 676 */ "having_clause_opt ::= HAVING search_condition", + /* 677 */ "range_opt ::=", + /* 678 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP", + /* 679 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_RP", + /* 680 */ "every_opt ::=", + /* 681 */ "every_opt ::= EVERY NK_LP duration_literal NK_RP", + /* 682 */ "query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt", + /* 683 */ "query_simple ::= query_specification", + /* 684 */ "query_simple ::= union_query_expression", + /* 685 */ "union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery", + /* 686 */ "union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery", + /* 687 */ "query_simple_or_subquery ::= query_simple", + /* 688 */ "query_simple_or_subquery ::= subquery", + /* 689 */ "query_or_subquery ::= query_expression", + /* 690 */ "query_or_subquery ::= subquery", + /* 691 */ "order_by_clause_opt ::=", + /* 692 */ "order_by_clause_opt ::= ORDER BY sort_specification_list", + /* 693 */ "slimit_clause_opt ::=", + /* 694 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER", + /* 695 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER", + /* 696 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER", + /* 697 */ "limit_clause_opt ::=", + /* 698 */ "limit_clause_opt ::= LIMIT NK_INTEGER", + /* 699 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER", + /* 700 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER", + /* 701 */ "subquery ::= NK_LP query_expression NK_RP", + /* 702 */ "subquery ::= NK_LP subquery NK_RP", + /* 703 */ "search_condition ::= common_expression", + /* 704 */ "sort_specification_list ::= sort_specification", + /* 705 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification", + /* 706 */ "sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt", + /* 707 */ "ordering_specification_opt ::=", + /* 708 */ "ordering_specification_opt ::= ASC", + /* 709 */ "ordering_specification_opt ::= DESC", + /* 710 */ "null_ordering_opt ::=", + /* 711 */ "null_ordering_opt ::= NULLS FIRST", + /* 712 */ "null_ordering_opt ::= NULLS LAST", }; #endif /* NDEBUG */ @@ -2957,236 +2976,236 @@ static void yy_destructor( */ /********* Begin destructor definitions ***************************************/ /* Default NON-TERMINAL Destructor */ - case 358: /* cmd */ - case 361: /* literal */ - case 370: /* with_opt */ - case 376: /* search_condition */ - case 381: /* db_options */ - case 383: /* alter_db_options */ - case 385: /* start_opt */ - case 386: /* end_opt */ - case 390: /* signed */ - case 392: /* retention */ - case 393: /* full_table_name */ - case 396: /* table_options */ - case 400: /* alter_table_clause */ - case 401: /* alter_table_options */ - case 404: /* tags_literal */ - case 405: /* create_subtable_clause */ - case 408: /* drop_table_clause */ - case 410: /* column_def */ - case 415: /* duration_literal */ - case 416: /* rollup_func_name */ - case 418: /* col_name */ - case 421: /* like_pattern_opt */ - case 422: /* db_name_cond_opt */ - case 423: /* table_name_cond */ - case 424: /* from_db_opt */ - case 427: /* tag_item */ - case 429: /* index_options */ - case 430: /* full_index_name */ - case 433: /* sliding_opt */ - case 434: /* sma_stream_opt */ - case 435: /* func */ - case 439: /* query_or_subquery */ - case 440: /* where_clause_opt */ - case 443: /* explain_options */ - case 444: /* insert_query */ - case 449: /* full_view_name */ - case 452: /* stream_options */ - case 455: /* subtable_opt */ - case 458: /* column_stream_def */ - case 459: /* expression */ - case 462: /* literal_func */ - case 463: /* signed_literal */ - case 466: /* expr_or_subquery */ - case 467: /* pseudo_column */ - case 468: /* column_reference */ - case 469: /* function_expression */ - case 470: /* case_when_expression */ - case 475: /* star_func_para */ - case 477: /* case_when_else_opt */ - case 478: /* common_expression */ - case 479: /* when_then_expr */ - case 480: /* predicate */ - case 483: /* in_predicate_value */ - case 484: /* boolean_value_expression */ - case 485: /* boolean_primary */ - case 486: /* from_clause_opt */ - case 487: /* table_reference_list */ - case 488: /* table_reference */ - case 489: /* table_primary */ - case 490: /* joined_table */ - case 492: /* subquery */ - case 493: /* parenthesized_joined_table */ - case 495: /* query_specification */ - case 501: /* range_opt */ - case 502: /* every_opt */ - case 503: /* fill_opt */ - case 504: /* twindow_clause_opt */ - case 506: /* having_clause_opt */ - case 507: /* select_item */ - case 509: /* partition_item */ - case 510: /* interval_sliding_duration_literal */ - case 513: /* query_expression */ - case 514: /* query_simple */ - case 516: /* slimit_clause_opt */ - case 517: /* limit_clause_opt */ - case 518: /* union_query_expression */ - case 519: /* query_simple_or_subquery */ - case 521: /* sort_specification */ + case 362: /* cmd */ + case 365: /* literal */ + case 374: /* with_opt */ + case 380: /* search_condition */ + case 385: /* db_options */ + case 387: /* alter_db_options */ + case 389: /* start_opt */ + case 390: /* end_opt */ + case 394: /* signed */ + case 396: /* retention */ + case 397: /* full_table_name */ + case 400: /* table_options */ + case 404: /* alter_table_clause */ + case 405: /* alter_table_options */ + case 408: /* tags_literal */ + case 409: /* create_subtable_clause */ + case 412: /* drop_table_clause */ + case 414: /* column_def */ + case 419: /* duration_literal */ + case 420: /* rollup_func_name */ + case 422: /* col_name */ + case 425: /* like_pattern_opt */ + case 426: /* db_name_cond_opt */ + case 427: /* table_name_cond */ + case 428: /* from_db_opt */ + case 431: /* tag_item */ + case 433: /* index_options */ + case 434: /* full_index_name */ + case 437: /* sliding_opt */ + case 438: /* sma_stream_opt */ + case 439: /* func */ + case 443: /* query_or_subquery */ + case 444: /* where_clause_opt */ + case 447: /* explain_options */ + case 448: /* insert_query */ + case 453: /* full_view_name */ + case 456: /* stream_options */ + case 459: /* subtable_opt */ + case 462: /* column_stream_def */ + case 463: /* expression */ + case 466: /* literal_func */ + case 467: /* signed_literal */ + case 470: /* expr_or_subquery */ + case 471: /* pseudo_column */ + case 472: /* column_reference */ + case 473: /* function_expression */ + case 474: /* case_when_expression */ + case 479: /* star_func_para */ + case 481: /* case_when_else_opt */ + case 482: /* common_expression */ + case 483: /* when_then_expr */ + case 484: /* predicate */ + case 487: /* in_predicate_value */ + case 488: /* boolean_value_expression */ + case 489: /* boolean_primary */ + case 490: /* from_clause_opt */ + case 491: /* table_reference_list */ + case 492: /* table_reference */ + case 493: /* table_primary */ + case 494: /* joined_table */ + case 496: /* subquery */ + case 497: /* parenthesized_joined_table */ + case 499: /* query_specification */ + case 505: /* range_opt */ + case 506: /* every_opt */ + case 507: /* fill_opt */ + case 508: /* twindow_clause_opt */ + case 510: /* having_clause_opt */ + case 511: /* select_item */ + case 513: /* partition_item */ + case 514: /* interval_sliding_duration_literal */ + case 517: /* query_expression */ + case 518: /* query_simple */ + case 520: /* slimit_clause_opt */ + case 521: /* limit_clause_opt */ + case 522: /* union_query_expression */ + case 523: /* query_simple_or_subquery */ + case 525: /* sort_specification */ { - nodesDestroyNode((yypminor->yy1000)); + nodesDestroyNode((yypminor->yy872)); } break; - case 359: /* account_options */ - case 360: /* alter_account_options */ - case 362: /* alter_account_option */ - case 384: /* speed_opt */ - case 438: /* with_meta */ - case 447: /* bufsize_opt */ + case 363: /* account_options */ + case 364: /* alter_account_options */ + case 366: /* alter_account_option */ + case 388: /* speed_opt */ + case 442: /* with_meta */ + case 451: /* bufsize_opt */ { } break; - case 363: /* ip_range_list */ - case 364: /* white_list */ - case 365: /* white_list_opt */ - case 387: /* integer_list */ - case 388: /* variable_list */ - case 389: /* retention_list */ - case 394: /* column_def_list */ - case 395: /* tags_def_opt */ - case 397: /* multi_create_clause */ - case 398: /* tags_def */ - case 399: /* multi_drop_clause */ - case 406: /* specific_cols_opt */ - case 407: /* tags_literal_list */ - case 409: /* col_name_list */ - case 412: /* duration_list */ - case 413: /* rollup_func_list */ - case 425: /* tag_list_opt */ - case 432: /* func_list */ - case 437: /* expression_list */ - case 453: /* col_list_opt */ - case 454: /* tag_def_or_ref_opt */ - case 457: /* column_stream_def_list */ - case 461: /* dnode_list */ - case 464: /* literal_list */ - case 472: /* star_func_para_list */ - case 474: /* other_para_list */ - case 476: /* when_then_list */ - case 496: /* hint_list */ - case 499: /* select_list */ - case 500: /* partition_by_clause_opt */ - case 505: /* group_by_clause_opt */ - case 508: /* partition_list */ - case 512: /* group_by_list */ - case 515: /* order_by_clause_opt */ - case 520: /* sort_specification_list */ + case 367: /* ip_range_list */ + case 368: /* white_list */ + case 369: /* white_list_opt */ + case 391: /* integer_list */ + case 392: /* variable_list */ + case 393: /* retention_list */ + case 398: /* column_def_list */ + case 399: /* tags_def_opt */ + case 401: /* multi_create_clause */ + case 402: /* tags_def */ + case 403: /* multi_drop_clause */ + case 410: /* specific_cols_opt */ + case 411: /* tags_literal_list */ + case 413: /* col_name_list */ + case 416: /* duration_list */ + case 417: /* rollup_func_list */ + case 429: /* tag_list_opt */ + case 436: /* func_list */ + case 441: /* expression_list */ + case 457: /* col_list_opt */ + case 458: /* tag_def_or_ref_opt */ + case 461: /* column_stream_def_list */ + case 465: /* dnode_list */ + case 468: /* literal_list */ + case 476: /* star_func_para_list */ + case 478: /* other_para_list */ + case 480: /* when_then_list */ + case 500: /* hint_list */ + case 503: /* select_list */ + case 504: /* partition_by_clause_opt */ + case 509: /* group_by_clause_opt */ + case 512: /* partition_list */ + case 516: /* group_by_list */ + case 519: /* order_by_clause_opt */ + case 524: /* sort_specification_list */ { - nodesDestroyList((yypminor->yy72)); + nodesDestroyList((yypminor->yy376)); } break; - case 366: /* user_name */ - case 373: /* db_name */ - case 374: /* table_name */ - case 375: /* topic_name */ - case 377: /* dnode_endpoint */ - case 402: /* column_name */ - case 417: /* function_name */ - case 428: /* column_alias */ - case 431: /* index_name */ - case 436: /* sma_func_name */ - case 441: /* cgroup_name */ - case 448: /* language_opt */ - case 450: /* view_name */ - case 451: /* stream_name */ - case 460: /* on_vgroup_id */ - case 465: /* table_alias */ - case 471: /* star_func */ - case 473: /* noarg_func */ - case 491: /* alias_opt */ + case 370: /* user_name */ + case 377: /* db_name */ + case 378: /* table_name */ + case 379: /* topic_name */ + case 381: /* dnode_endpoint */ + case 406: /* column_name */ + case 421: /* function_name */ + case 432: /* column_alias */ + case 435: /* index_name */ + case 440: /* sma_func_name */ + case 445: /* cgroup_name */ + case 452: /* language_opt */ + case 454: /* view_name */ + case 455: /* stream_name */ + case 464: /* on_vgroup_id */ + case 469: /* table_alias */ + case 475: /* star_func */ + case 477: /* noarg_func */ + case 495: /* alias_opt */ { } break; - case 367: /* sysinfo_opt */ + case 371: /* sysinfo_opt */ { } break; - case 368: /* privileges */ - case 371: /* priv_type_list */ - case 372: /* priv_type */ + case 372: /* privileges */ + case 375: /* priv_type_list */ + case 376: /* priv_type */ { } break; - case 369: /* priv_level */ + case 373: /* priv_level */ { } break; - case 378: /* force_opt */ - case 379: /* unsafe_opt */ - case 380: /* not_exists_opt */ - case 382: /* exists_opt */ - case 442: /* analyze_opt */ - case 445: /* or_replace_opt */ - case 446: /* agg_func_opt */ - case 456: /* ignore_opt */ - case 497: /* set_quantifier_opt */ - case 498: /* tag_mode_opt */ + case 382: /* force_opt */ + case 383: /* unsafe_opt */ + case 384: /* not_exists_opt */ + case 386: /* exists_opt */ + case 446: /* analyze_opt */ + case 449: /* or_replace_opt */ + case 450: /* agg_func_opt */ + case 460: /* ignore_opt */ + case 501: /* set_quantifier_opt */ + case 502: /* tag_mode_opt */ { } break; - case 391: /* alter_db_option */ - case 414: /* alter_table_option */ + case 395: /* alter_db_option */ + case 418: /* alter_table_option */ { } break; - case 403: /* type_name */ - case 411: /* type_name_default_len */ + case 407: /* type_name */ + case 415: /* type_name_default_len */ { } break; - case 419: /* db_kind_opt */ - case 426: /* table_kind */ + case 423: /* db_kind_opt */ + case 430: /* table_kind */ { } break; - case 420: /* table_kind_db_name_cond_opt */ + case 424: /* table_kind_db_name_cond_opt */ { } break; - case 481: /* compare_op */ - case 482: /* in_op */ + case 485: /* compare_op */ + case 486: /* in_op */ { } break; - case 494: /* join_type */ + case 498: /* join_type */ { } break; - case 511: /* fill_mode */ + case 515: /* fill_mode */ { } break; - case 522: /* ordering_specification_opt */ + case 526: /* ordering_specification_opt */ { } break; - case 523: /* null_ordering_opt */ + case 527: /* null_ordering_opt */ { } @@ -3477,711 +3496,719 @@ static void yy_shift( /* For rule J, yyRuleInfoLhs[J] contains the symbol on the left-hand side ** of that rule */ static const YYCODETYPE yyRuleInfoLhs[] = { - 358, /* (0) cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */ - 358, /* (1) cmd ::= ALTER ACCOUNT NK_ID alter_account_options */ - 359, /* (2) account_options ::= */ - 359, /* (3) account_options ::= account_options PPS literal */ - 359, /* (4) account_options ::= account_options TSERIES literal */ - 359, /* (5) account_options ::= account_options STORAGE literal */ - 359, /* (6) account_options ::= account_options STREAMS literal */ - 359, /* (7) account_options ::= account_options QTIME literal */ - 359, /* (8) account_options ::= account_options DBS literal */ - 359, /* (9) account_options ::= account_options USERS literal */ - 359, /* (10) account_options ::= account_options CONNS literal */ - 359, /* (11) account_options ::= account_options STATE literal */ - 360, /* (12) alter_account_options ::= alter_account_option */ - 360, /* (13) alter_account_options ::= alter_account_options alter_account_option */ - 362, /* (14) alter_account_option ::= PASS literal */ - 362, /* (15) alter_account_option ::= PPS literal */ - 362, /* (16) alter_account_option ::= TSERIES literal */ - 362, /* (17) alter_account_option ::= STORAGE literal */ - 362, /* (18) alter_account_option ::= STREAMS literal */ - 362, /* (19) alter_account_option ::= QTIME literal */ - 362, /* (20) alter_account_option ::= DBS literal */ - 362, /* (21) alter_account_option ::= USERS literal */ - 362, /* (22) alter_account_option ::= CONNS literal */ - 362, /* (23) alter_account_option ::= STATE literal */ - 363, /* (24) ip_range_list ::= NK_STRING */ - 363, /* (25) ip_range_list ::= ip_range_list NK_COMMA NK_STRING */ - 364, /* (26) white_list ::= HOST ip_range_list */ - 365, /* (27) white_list_opt ::= */ - 365, /* (28) white_list_opt ::= white_list */ - 358, /* (29) cmd ::= CREATE USER user_name PASS NK_STRING sysinfo_opt white_list_opt */ - 358, /* (30) cmd ::= ALTER USER user_name PASS NK_STRING */ - 358, /* (31) cmd ::= ALTER USER user_name ENABLE NK_INTEGER */ - 358, /* (32) cmd ::= ALTER USER user_name SYSINFO NK_INTEGER */ - 358, /* (33) cmd ::= ALTER USER user_name ADD white_list */ - 358, /* (34) cmd ::= ALTER USER user_name DROP white_list */ - 358, /* (35) cmd ::= DROP USER user_name */ - 367, /* (36) sysinfo_opt ::= */ - 367, /* (37) sysinfo_opt ::= SYSINFO NK_INTEGER */ - 358, /* (38) cmd ::= GRANT privileges ON priv_level with_opt TO user_name */ - 358, /* (39) cmd ::= REVOKE privileges ON priv_level with_opt FROM user_name */ - 368, /* (40) privileges ::= ALL */ - 368, /* (41) privileges ::= priv_type_list */ - 368, /* (42) privileges ::= SUBSCRIBE */ - 371, /* (43) priv_type_list ::= priv_type */ - 371, /* (44) priv_type_list ::= priv_type_list NK_COMMA priv_type */ - 372, /* (45) priv_type ::= READ */ - 372, /* (46) priv_type ::= WRITE */ - 372, /* (47) priv_type ::= ALTER */ - 369, /* (48) priv_level ::= NK_STAR NK_DOT NK_STAR */ - 369, /* (49) priv_level ::= db_name NK_DOT NK_STAR */ - 369, /* (50) priv_level ::= db_name NK_DOT table_name */ - 369, /* (51) priv_level ::= topic_name */ - 370, /* (52) with_opt ::= */ - 370, /* (53) with_opt ::= WITH search_condition */ - 358, /* (54) cmd ::= CREATE ENCRYPT_KEY NK_STRING */ - 358, /* (55) cmd ::= CREATE DNODE dnode_endpoint */ - 358, /* (56) cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */ - 358, /* (57) cmd ::= DROP DNODE NK_INTEGER force_opt */ - 358, /* (58) cmd ::= DROP DNODE dnode_endpoint force_opt */ - 358, /* (59) cmd ::= DROP DNODE NK_INTEGER unsafe_opt */ - 358, /* (60) cmd ::= DROP DNODE dnode_endpoint unsafe_opt */ - 358, /* (61) cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ - 358, /* (62) cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */ - 358, /* (63) cmd ::= ALTER ALL DNODES NK_STRING */ - 358, /* (64) cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */ - 358, /* (65) cmd ::= RESTORE DNODE NK_INTEGER */ - 377, /* (66) dnode_endpoint ::= NK_STRING */ - 377, /* (67) dnode_endpoint ::= NK_ID */ - 377, /* (68) dnode_endpoint ::= NK_IPTOKEN */ - 378, /* (69) force_opt ::= */ - 378, /* (70) force_opt ::= FORCE */ - 379, /* (71) unsafe_opt ::= UNSAFE */ - 358, /* (72) cmd ::= ALTER CLUSTER NK_STRING */ - 358, /* (73) cmd ::= ALTER CLUSTER NK_STRING NK_STRING */ - 358, /* (74) cmd ::= ALTER LOCAL NK_STRING */ - 358, /* (75) cmd ::= ALTER LOCAL NK_STRING NK_STRING */ - 358, /* (76) cmd ::= CREATE QNODE ON DNODE NK_INTEGER */ - 358, /* (77) cmd ::= DROP QNODE ON DNODE NK_INTEGER */ - 358, /* (78) cmd ::= RESTORE QNODE ON DNODE NK_INTEGER */ - 358, /* (79) cmd ::= CREATE BNODE ON DNODE NK_INTEGER */ - 358, /* (80) cmd ::= DROP BNODE ON DNODE NK_INTEGER */ - 358, /* (81) cmd ::= CREATE SNODE ON DNODE NK_INTEGER */ - 358, /* (82) cmd ::= DROP SNODE ON DNODE NK_INTEGER */ - 358, /* (83) cmd ::= CREATE MNODE ON DNODE NK_INTEGER */ - 358, /* (84) cmd ::= DROP MNODE ON DNODE NK_INTEGER */ - 358, /* (85) cmd ::= RESTORE MNODE ON DNODE NK_INTEGER */ - 358, /* (86) cmd ::= RESTORE VNODE ON DNODE NK_INTEGER */ - 358, /* (87) cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ - 358, /* (88) cmd ::= DROP DATABASE exists_opt db_name */ - 358, /* (89) cmd ::= USE db_name */ - 358, /* (90) cmd ::= ALTER DATABASE db_name alter_db_options */ - 358, /* (91) cmd ::= FLUSH DATABASE db_name */ - 358, /* (92) cmd ::= TRIM DATABASE db_name speed_opt */ - 358, /* (93) cmd ::= COMPACT DATABASE db_name start_opt end_opt */ - 380, /* (94) not_exists_opt ::= IF NOT EXISTS */ - 380, /* (95) not_exists_opt ::= */ - 382, /* (96) exists_opt ::= IF EXISTS */ - 382, /* (97) exists_opt ::= */ - 381, /* (98) db_options ::= */ - 381, /* (99) db_options ::= db_options BUFFER NK_INTEGER */ - 381, /* (100) db_options ::= db_options CACHEMODEL NK_STRING */ - 381, /* (101) db_options ::= db_options CACHESIZE NK_INTEGER */ - 381, /* (102) db_options ::= db_options COMP NK_INTEGER */ - 381, /* (103) db_options ::= db_options DURATION NK_INTEGER */ - 381, /* (104) db_options ::= db_options DURATION NK_VARIABLE */ - 381, /* (105) db_options ::= db_options MAXROWS NK_INTEGER */ - 381, /* (106) db_options ::= db_options MINROWS NK_INTEGER */ - 381, /* (107) db_options ::= db_options KEEP integer_list */ - 381, /* (108) db_options ::= db_options KEEP variable_list */ - 381, /* (109) db_options ::= db_options PAGES NK_INTEGER */ - 381, /* (110) db_options ::= db_options PAGESIZE NK_INTEGER */ - 381, /* (111) db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */ - 381, /* (112) db_options ::= db_options PRECISION NK_STRING */ - 381, /* (113) db_options ::= db_options REPLICA NK_INTEGER */ - 381, /* (114) db_options ::= db_options VGROUPS NK_INTEGER */ - 381, /* (115) db_options ::= db_options SINGLE_STABLE NK_INTEGER */ - 381, /* (116) db_options ::= db_options RETENTIONS retention_list */ - 381, /* (117) db_options ::= db_options SCHEMALESS NK_INTEGER */ - 381, /* (118) db_options ::= db_options WAL_LEVEL NK_INTEGER */ - 381, /* (119) db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */ - 381, /* (120) db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */ - 381, /* (121) db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ - 381, /* (122) db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */ - 381, /* (123) db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ - 381, /* (124) db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */ - 381, /* (125) db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */ - 381, /* (126) db_options ::= db_options STT_TRIGGER NK_INTEGER */ - 381, /* (127) db_options ::= db_options TABLE_PREFIX signed */ - 381, /* (128) db_options ::= db_options TABLE_SUFFIX signed */ - 381, /* (129) db_options ::= db_options KEEP_TIME_OFFSET NK_INTEGER */ - 381, /* (130) db_options ::= db_options ENCRYPT_ALGORITHM NK_STRING */ - 383, /* (131) alter_db_options ::= alter_db_option */ - 383, /* (132) alter_db_options ::= alter_db_options alter_db_option */ - 391, /* (133) alter_db_option ::= BUFFER NK_INTEGER */ - 391, /* (134) alter_db_option ::= CACHEMODEL NK_STRING */ - 391, /* (135) alter_db_option ::= CACHESIZE NK_INTEGER */ - 391, /* (136) alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */ - 391, /* (137) alter_db_option ::= KEEP integer_list */ - 391, /* (138) alter_db_option ::= KEEP variable_list */ - 391, /* (139) alter_db_option ::= PAGES NK_INTEGER */ - 391, /* (140) alter_db_option ::= REPLICA NK_INTEGER */ - 391, /* (141) alter_db_option ::= WAL_LEVEL NK_INTEGER */ - 391, /* (142) alter_db_option ::= STT_TRIGGER NK_INTEGER */ - 391, /* (143) alter_db_option ::= MINROWS NK_INTEGER */ - 391, /* (144) alter_db_option ::= WAL_RETENTION_PERIOD NK_INTEGER */ - 391, /* (145) alter_db_option ::= WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ - 391, /* (146) alter_db_option ::= WAL_RETENTION_SIZE NK_INTEGER */ - 391, /* (147) alter_db_option ::= WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ - 391, /* (148) alter_db_option ::= KEEP_TIME_OFFSET NK_INTEGER */ - 391, /* (149) alter_db_option ::= ENCRYPT_ALGORITHM NK_STRING */ - 387, /* (150) integer_list ::= NK_INTEGER */ - 387, /* (151) integer_list ::= integer_list NK_COMMA NK_INTEGER */ - 388, /* (152) variable_list ::= NK_VARIABLE */ - 388, /* (153) variable_list ::= variable_list NK_COMMA NK_VARIABLE */ - 389, /* (154) retention_list ::= retention */ - 389, /* (155) retention_list ::= retention_list NK_COMMA retention */ - 392, /* (156) retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ - 392, /* (157) retention ::= NK_MINUS NK_COLON NK_VARIABLE */ - 384, /* (158) speed_opt ::= */ - 384, /* (159) speed_opt ::= BWLIMIT NK_INTEGER */ - 385, /* (160) start_opt ::= */ - 385, /* (161) start_opt ::= START WITH NK_INTEGER */ - 385, /* (162) start_opt ::= START WITH NK_STRING */ - 385, /* (163) start_opt ::= START WITH TIMESTAMP NK_STRING */ - 386, /* (164) end_opt ::= */ - 386, /* (165) end_opt ::= END WITH NK_INTEGER */ - 386, /* (166) end_opt ::= END WITH NK_STRING */ - 386, /* (167) end_opt ::= END WITH TIMESTAMP NK_STRING */ - 358, /* (168) cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ - 358, /* (169) cmd ::= CREATE TABLE multi_create_clause */ - 358, /* (170) cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ - 358, /* (171) cmd ::= DROP TABLE multi_drop_clause */ - 358, /* (172) cmd ::= DROP STABLE exists_opt full_table_name */ - 358, /* (173) cmd ::= ALTER TABLE alter_table_clause */ - 358, /* (174) cmd ::= ALTER STABLE alter_table_clause */ - 400, /* (175) alter_table_clause ::= full_table_name alter_table_options */ - 400, /* (176) alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ - 400, /* (177) alter_table_clause ::= full_table_name DROP COLUMN column_name */ - 400, /* (178) alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ - 400, /* (179) alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ - 400, /* (180) alter_table_clause ::= full_table_name ADD TAG column_name type_name */ - 400, /* (181) alter_table_clause ::= full_table_name DROP TAG column_name */ - 400, /* (182) alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ - 400, /* (183) alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ - 400, /* (184) alter_table_clause ::= full_table_name SET TAG column_name NK_EQ tags_literal */ - 397, /* (185) multi_create_clause ::= create_subtable_clause */ - 397, /* (186) multi_create_clause ::= multi_create_clause create_subtable_clause */ - 405, /* (187) 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 */ - 399, /* (188) multi_drop_clause ::= drop_table_clause */ - 399, /* (189) multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause */ - 408, /* (190) drop_table_clause ::= exists_opt full_table_name */ - 406, /* (191) specific_cols_opt ::= */ - 406, /* (192) specific_cols_opt ::= NK_LP col_name_list NK_RP */ - 393, /* (193) full_table_name ::= table_name */ - 393, /* (194) full_table_name ::= db_name NK_DOT table_name */ - 394, /* (195) column_def_list ::= column_def */ - 394, /* (196) column_def_list ::= column_def_list NK_COMMA column_def */ - 410, /* (197) column_def ::= column_name type_name */ - 410, /* (198) column_def ::= column_name type_name PRIMARY KEY */ - 403, /* (199) type_name ::= BOOL */ - 403, /* (200) type_name ::= TINYINT */ - 403, /* (201) type_name ::= SMALLINT */ - 403, /* (202) type_name ::= INT */ - 403, /* (203) type_name ::= INTEGER */ - 403, /* (204) type_name ::= BIGINT */ - 403, /* (205) type_name ::= FLOAT */ - 403, /* (206) type_name ::= DOUBLE */ - 403, /* (207) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ - 403, /* (208) type_name ::= TIMESTAMP */ - 403, /* (209) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ - 403, /* (210) type_name ::= TINYINT UNSIGNED */ - 403, /* (211) type_name ::= SMALLINT UNSIGNED */ - 403, /* (212) type_name ::= INT UNSIGNED */ - 403, /* (213) type_name ::= BIGINT UNSIGNED */ - 403, /* (214) type_name ::= JSON */ - 403, /* (215) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ - 403, /* (216) type_name ::= MEDIUMBLOB */ - 403, /* (217) type_name ::= BLOB */ - 403, /* (218) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ - 403, /* (219) type_name ::= GEOMETRY NK_LP NK_INTEGER NK_RP */ - 403, /* (220) type_name ::= DECIMAL */ - 403, /* (221) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ - 403, /* (222) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ - 411, /* (223) type_name_default_len ::= BINARY */ - 411, /* (224) type_name_default_len ::= NCHAR */ - 411, /* (225) type_name_default_len ::= VARCHAR */ - 411, /* (226) type_name_default_len ::= VARBINARY */ - 395, /* (227) tags_def_opt ::= */ - 395, /* (228) tags_def_opt ::= tags_def */ - 398, /* (229) tags_def ::= TAGS NK_LP column_def_list NK_RP */ - 396, /* (230) table_options ::= */ - 396, /* (231) table_options ::= table_options COMMENT NK_STRING */ - 396, /* (232) table_options ::= table_options MAX_DELAY duration_list */ - 396, /* (233) table_options ::= table_options WATERMARK duration_list */ - 396, /* (234) table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ - 396, /* (235) table_options ::= table_options TTL NK_INTEGER */ - 396, /* (236) table_options ::= table_options SMA NK_LP col_name_list NK_RP */ - 396, /* (237) table_options ::= table_options DELETE_MARK duration_list */ - 401, /* (238) alter_table_options ::= alter_table_option */ - 401, /* (239) alter_table_options ::= alter_table_options alter_table_option */ - 414, /* (240) alter_table_option ::= COMMENT NK_STRING */ - 414, /* (241) alter_table_option ::= TTL NK_INTEGER */ - 412, /* (242) duration_list ::= duration_literal */ - 412, /* (243) duration_list ::= duration_list NK_COMMA duration_literal */ - 413, /* (244) rollup_func_list ::= rollup_func_name */ - 413, /* (245) rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ - 416, /* (246) rollup_func_name ::= function_name */ - 416, /* (247) rollup_func_name ::= FIRST */ - 416, /* (248) rollup_func_name ::= LAST */ - 409, /* (249) col_name_list ::= col_name */ - 409, /* (250) col_name_list ::= col_name_list NK_COMMA col_name */ - 418, /* (251) col_name ::= column_name */ - 358, /* (252) cmd ::= SHOW DNODES */ - 358, /* (253) cmd ::= SHOW USERS */ - 358, /* (254) cmd ::= SHOW USER PRIVILEGES */ - 358, /* (255) cmd ::= SHOW db_kind_opt DATABASES */ - 358, /* (256) cmd ::= SHOW table_kind_db_name_cond_opt TABLES like_pattern_opt */ - 358, /* (257) cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ - 358, /* (258) cmd ::= SHOW db_name_cond_opt VGROUPS */ - 358, /* (259) cmd ::= SHOW MNODES */ - 358, /* (260) cmd ::= SHOW QNODES */ - 358, /* (261) cmd ::= SHOW ARBGROUPS */ - 358, /* (262) cmd ::= SHOW FUNCTIONS */ - 358, /* (263) cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ - 358, /* (264) cmd ::= SHOW INDEXES FROM db_name NK_DOT table_name */ - 358, /* (265) cmd ::= SHOW STREAMS */ - 358, /* (266) cmd ::= SHOW ACCOUNTS */ - 358, /* (267) cmd ::= SHOW APPS */ - 358, /* (268) cmd ::= SHOW CONNECTIONS */ - 358, /* (269) cmd ::= SHOW LICENCES */ - 358, /* (270) cmd ::= SHOW GRANTS */ - 358, /* (271) cmd ::= SHOW GRANTS FULL */ - 358, /* (272) cmd ::= SHOW GRANTS LOGS */ - 358, /* (273) cmd ::= SHOW CLUSTER MACHINES */ - 358, /* (274) cmd ::= SHOW CREATE DATABASE db_name */ - 358, /* (275) cmd ::= SHOW CREATE TABLE full_table_name */ - 358, /* (276) cmd ::= SHOW CREATE STABLE full_table_name */ - 358, /* (277) cmd ::= SHOW ENCRYPTIONS */ - 358, /* (278) cmd ::= SHOW QUERIES */ - 358, /* (279) cmd ::= SHOW SCORES */ - 358, /* (280) cmd ::= SHOW TOPICS */ - 358, /* (281) cmd ::= SHOW VARIABLES */ - 358, /* (282) cmd ::= SHOW CLUSTER VARIABLES */ - 358, /* (283) cmd ::= SHOW LOCAL VARIABLES */ - 358, /* (284) cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */ - 358, /* (285) cmd ::= SHOW BNODES */ - 358, /* (286) cmd ::= SHOW SNODES */ - 358, /* (287) cmd ::= SHOW CLUSTER */ - 358, /* (288) cmd ::= SHOW TRANSACTIONS */ - 358, /* (289) cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ - 358, /* (290) cmd ::= SHOW CONSUMERS */ - 358, /* (291) cmd ::= SHOW SUBSCRIPTIONS */ - 358, /* (292) cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ - 358, /* (293) cmd ::= SHOW TAGS FROM db_name NK_DOT table_name */ - 358, /* (294) cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ - 358, /* (295) cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name */ - 358, /* (296) cmd ::= SHOW VNODES ON DNODE NK_INTEGER */ - 358, /* (297) cmd ::= SHOW VNODES */ - 358, /* (298) cmd ::= SHOW db_name_cond_opt ALIVE */ - 358, /* (299) cmd ::= SHOW CLUSTER ALIVE */ - 358, /* (300) cmd ::= SHOW db_name_cond_opt VIEWS like_pattern_opt */ - 358, /* (301) cmd ::= SHOW CREATE VIEW full_table_name */ - 358, /* (302) cmd ::= SHOW COMPACTS */ - 358, /* (303) cmd ::= SHOW COMPACT NK_INTEGER */ - 420, /* (304) table_kind_db_name_cond_opt ::= */ - 420, /* (305) table_kind_db_name_cond_opt ::= table_kind */ - 420, /* (306) table_kind_db_name_cond_opt ::= db_name NK_DOT */ - 420, /* (307) table_kind_db_name_cond_opt ::= table_kind db_name NK_DOT */ - 426, /* (308) table_kind ::= NORMAL */ - 426, /* (309) table_kind ::= CHILD */ - 422, /* (310) db_name_cond_opt ::= */ - 422, /* (311) db_name_cond_opt ::= db_name NK_DOT */ - 421, /* (312) like_pattern_opt ::= */ - 421, /* (313) like_pattern_opt ::= LIKE NK_STRING */ - 423, /* (314) table_name_cond ::= table_name */ - 424, /* (315) from_db_opt ::= */ - 424, /* (316) from_db_opt ::= FROM db_name */ - 425, /* (317) tag_list_opt ::= */ - 425, /* (318) tag_list_opt ::= tag_item */ - 425, /* (319) tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ - 427, /* (320) tag_item ::= TBNAME */ - 427, /* (321) tag_item ::= QTAGS */ - 427, /* (322) tag_item ::= column_name */ - 427, /* (323) tag_item ::= column_name column_alias */ - 427, /* (324) tag_item ::= column_name AS column_alias */ - 419, /* (325) db_kind_opt ::= */ - 419, /* (326) db_kind_opt ::= USER */ - 419, /* (327) db_kind_opt ::= SYSTEM */ - 358, /* (328) cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options */ - 358, /* (329) cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP */ - 358, /* (330) cmd ::= DROP INDEX exists_opt full_index_name */ - 430, /* (331) full_index_name ::= index_name */ - 430, /* (332) full_index_name ::= db_name NK_DOT index_name */ - 429, /* (333) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ - 429, /* (334) 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 */ - 432, /* (335) func_list ::= func */ - 432, /* (336) func_list ::= func_list NK_COMMA func */ - 435, /* (337) func ::= sma_func_name NK_LP expression_list NK_RP */ - 436, /* (338) sma_func_name ::= function_name */ - 436, /* (339) sma_func_name ::= COUNT */ - 436, /* (340) sma_func_name ::= FIRST */ - 436, /* (341) sma_func_name ::= LAST */ - 436, /* (342) sma_func_name ::= LAST_ROW */ - 434, /* (343) sma_stream_opt ::= */ - 434, /* (344) sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ - 434, /* (345) sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ - 434, /* (346) sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ - 438, /* (347) with_meta ::= AS */ - 438, /* (348) with_meta ::= WITH META AS */ - 438, /* (349) with_meta ::= ONLY META AS */ - 358, /* (350) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ - 358, /* (351) cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name */ - 358, /* (352) cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt */ - 358, /* (353) cmd ::= DROP TOPIC exists_opt topic_name */ - 358, /* (354) cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ - 358, /* (355) cmd ::= DESC full_table_name */ - 358, /* (356) cmd ::= DESCRIBE full_table_name */ - 358, /* (357) cmd ::= RESET QUERY CACHE */ - 358, /* (358) cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ - 358, /* (359) cmd ::= EXPLAIN analyze_opt explain_options insert_query */ - 442, /* (360) analyze_opt ::= */ - 442, /* (361) analyze_opt ::= ANALYZE */ - 443, /* (362) explain_options ::= */ - 443, /* (363) explain_options ::= explain_options VERBOSE NK_BOOL */ - 443, /* (364) explain_options ::= explain_options RATIO NK_FLOAT */ - 358, /* (365) cmd ::= CREATE or_replace_opt agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt language_opt */ - 358, /* (366) cmd ::= DROP FUNCTION exists_opt function_name */ - 446, /* (367) agg_func_opt ::= */ - 446, /* (368) agg_func_opt ::= AGGREGATE */ - 447, /* (369) bufsize_opt ::= */ - 447, /* (370) bufsize_opt ::= BUFSIZE NK_INTEGER */ - 448, /* (371) language_opt ::= */ - 448, /* (372) language_opt ::= LANGUAGE NK_STRING */ - 445, /* (373) or_replace_opt ::= */ - 445, /* (374) or_replace_opt ::= OR REPLACE */ - 358, /* (375) cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery */ - 358, /* (376) cmd ::= DROP VIEW exists_opt full_view_name */ - 449, /* (377) full_view_name ::= view_name */ - 449, /* (378) full_view_name ::= db_name NK_DOT view_name */ - 358, /* (379) 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 */ - 358, /* (380) cmd ::= DROP STREAM exists_opt stream_name */ - 358, /* (381) cmd ::= PAUSE STREAM exists_opt stream_name */ - 358, /* (382) cmd ::= RESUME STREAM exists_opt ignore_opt stream_name */ - 453, /* (383) col_list_opt ::= */ - 453, /* (384) col_list_opt ::= NK_LP column_stream_def_list NK_RP */ - 457, /* (385) column_stream_def_list ::= column_stream_def */ - 457, /* (386) column_stream_def_list ::= column_stream_def_list NK_COMMA column_stream_def */ - 458, /* (387) column_stream_def ::= column_name */ - 458, /* (388) column_stream_def ::= column_name PRIMARY KEY */ - 454, /* (389) tag_def_or_ref_opt ::= */ - 454, /* (390) tag_def_or_ref_opt ::= tags_def */ - 454, /* (391) tag_def_or_ref_opt ::= TAGS NK_LP column_stream_def_list NK_RP */ - 452, /* (392) stream_options ::= */ - 452, /* (393) stream_options ::= stream_options TRIGGER AT_ONCE */ - 452, /* (394) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ - 452, /* (395) stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ - 452, /* (396) stream_options ::= stream_options WATERMARK duration_literal */ - 452, /* (397) stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ - 452, /* (398) stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ - 452, /* (399) stream_options ::= stream_options DELETE_MARK duration_literal */ - 452, /* (400) stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */ - 455, /* (401) subtable_opt ::= */ - 455, /* (402) subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ - 456, /* (403) ignore_opt ::= */ - 456, /* (404) ignore_opt ::= IGNORE UNTREATED */ - 358, /* (405) cmd ::= KILL CONNECTION NK_INTEGER */ - 358, /* (406) cmd ::= KILL QUERY NK_STRING */ - 358, /* (407) cmd ::= KILL TRANSACTION NK_INTEGER */ - 358, /* (408) cmd ::= KILL COMPACT NK_INTEGER */ - 358, /* (409) cmd ::= BALANCE VGROUP */ - 358, /* (410) cmd ::= BALANCE VGROUP LEADER on_vgroup_id */ - 358, /* (411) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ - 358, /* (412) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ - 358, /* (413) cmd ::= SPLIT VGROUP NK_INTEGER */ - 460, /* (414) on_vgroup_id ::= */ - 460, /* (415) on_vgroup_id ::= ON NK_INTEGER */ - 461, /* (416) dnode_list ::= DNODE NK_INTEGER */ - 461, /* (417) dnode_list ::= dnode_list DNODE NK_INTEGER */ - 358, /* (418) cmd ::= DELETE FROM full_table_name where_clause_opt */ - 358, /* (419) cmd ::= query_or_subquery */ - 358, /* (420) cmd ::= insert_query */ - 444, /* (421) insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ - 444, /* (422) insert_query ::= INSERT INTO full_table_name query_or_subquery */ - 404, /* (423) tags_literal ::= NK_INTEGER */ - 404, /* (424) tags_literal ::= NK_INTEGER NK_PLUS duration_literal */ - 404, /* (425) tags_literal ::= NK_INTEGER NK_MINUS duration_literal */ - 404, /* (426) tags_literal ::= NK_PLUS NK_INTEGER */ - 404, /* (427) tags_literal ::= NK_PLUS NK_INTEGER NK_PLUS duration_literal */ - 404, /* (428) tags_literal ::= NK_PLUS NK_INTEGER NK_MINUS duration_literal */ - 404, /* (429) tags_literal ::= NK_MINUS NK_INTEGER */ - 404, /* (430) tags_literal ::= NK_MINUS NK_INTEGER NK_PLUS duration_literal */ - 404, /* (431) tags_literal ::= NK_MINUS NK_INTEGER NK_MINUS duration_literal */ - 404, /* (432) tags_literal ::= NK_FLOAT */ - 404, /* (433) tags_literal ::= NK_PLUS NK_FLOAT */ - 404, /* (434) tags_literal ::= NK_MINUS NK_FLOAT */ - 404, /* (435) tags_literal ::= NK_BIN */ - 404, /* (436) tags_literal ::= NK_BIN NK_PLUS duration_literal */ - 404, /* (437) tags_literal ::= NK_BIN NK_MINUS duration_literal */ - 404, /* (438) tags_literal ::= NK_PLUS NK_BIN */ - 404, /* (439) tags_literal ::= NK_PLUS NK_BIN NK_PLUS duration_literal */ - 404, /* (440) tags_literal ::= NK_PLUS NK_BIN NK_MINUS duration_literal */ - 404, /* (441) tags_literal ::= NK_MINUS NK_BIN */ - 404, /* (442) tags_literal ::= NK_MINUS NK_BIN NK_PLUS duration_literal */ - 404, /* (443) tags_literal ::= NK_MINUS NK_BIN NK_MINUS duration_literal */ - 404, /* (444) tags_literal ::= NK_HEX */ - 404, /* (445) tags_literal ::= NK_HEX NK_PLUS duration_literal */ - 404, /* (446) tags_literal ::= NK_HEX NK_MINUS duration_literal */ - 404, /* (447) tags_literal ::= NK_PLUS NK_HEX */ - 404, /* (448) tags_literal ::= NK_PLUS NK_HEX NK_PLUS duration_literal */ - 404, /* (449) tags_literal ::= NK_PLUS NK_HEX NK_MINUS duration_literal */ - 404, /* (450) tags_literal ::= NK_MINUS NK_HEX */ - 404, /* (451) tags_literal ::= NK_MINUS NK_HEX NK_PLUS duration_literal */ - 404, /* (452) tags_literal ::= NK_MINUS NK_HEX NK_MINUS duration_literal */ - 404, /* (453) tags_literal ::= NK_STRING */ - 404, /* (454) tags_literal ::= NK_STRING NK_PLUS duration_literal */ - 404, /* (455) tags_literal ::= NK_STRING NK_MINUS duration_literal */ - 404, /* (456) tags_literal ::= NK_BOOL */ - 404, /* (457) tags_literal ::= NULL */ - 404, /* (458) tags_literal ::= literal_func */ - 404, /* (459) tags_literal ::= literal_func NK_PLUS duration_literal */ - 404, /* (460) tags_literal ::= literal_func NK_MINUS duration_literal */ - 407, /* (461) tags_literal_list ::= tags_literal */ - 407, /* (462) tags_literal_list ::= tags_literal_list NK_COMMA tags_literal */ - 361, /* (463) literal ::= NK_INTEGER */ - 361, /* (464) literal ::= NK_FLOAT */ - 361, /* (465) literal ::= NK_STRING */ - 361, /* (466) literal ::= NK_BOOL */ - 361, /* (467) literal ::= TIMESTAMP NK_STRING */ - 361, /* (468) literal ::= duration_literal */ - 361, /* (469) literal ::= NULL */ - 361, /* (470) literal ::= NK_QUESTION */ - 415, /* (471) duration_literal ::= NK_VARIABLE */ - 390, /* (472) signed ::= NK_INTEGER */ - 390, /* (473) signed ::= NK_PLUS NK_INTEGER */ - 390, /* (474) signed ::= NK_MINUS NK_INTEGER */ - 390, /* (475) signed ::= NK_FLOAT */ - 390, /* (476) signed ::= NK_PLUS NK_FLOAT */ - 390, /* (477) signed ::= NK_MINUS NK_FLOAT */ - 463, /* (478) signed_literal ::= signed */ - 463, /* (479) signed_literal ::= NK_STRING */ - 463, /* (480) signed_literal ::= NK_BOOL */ - 463, /* (481) signed_literal ::= TIMESTAMP NK_STRING */ - 463, /* (482) signed_literal ::= duration_literal */ - 463, /* (483) signed_literal ::= NULL */ - 463, /* (484) signed_literal ::= literal_func */ - 463, /* (485) signed_literal ::= NK_QUESTION */ - 464, /* (486) literal_list ::= signed_literal */ - 464, /* (487) literal_list ::= literal_list NK_COMMA signed_literal */ - 373, /* (488) db_name ::= NK_ID */ - 374, /* (489) table_name ::= NK_ID */ - 402, /* (490) column_name ::= NK_ID */ - 417, /* (491) function_name ::= NK_ID */ - 450, /* (492) view_name ::= NK_ID */ - 465, /* (493) table_alias ::= NK_ID */ - 428, /* (494) column_alias ::= NK_ID */ - 428, /* (495) column_alias ::= NK_ALIAS */ - 366, /* (496) user_name ::= NK_ID */ - 375, /* (497) topic_name ::= NK_ID */ - 451, /* (498) stream_name ::= NK_ID */ - 441, /* (499) cgroup_name ::= NK_ID */ - 431, /* (500) index_name ::= NK_ID */ - 466, /* (501) expr_or_subquery ::= expression */ - 459, /* (502) expression ::= literal */ - 459, /* (503) expression ::= pseudo_column */ - 459, /* (504) expression ::= column_reference */ - 459, /* (505) expression ::= function_expression */ - 459, /* (506) expression ::= case_when_expression */ - 459, /* (507) expression ::= NK_LP expression NK_RP */ - 459, /* (508) expression ::= NK_PLUS expr_or_subquery */ - 459, /* (509) expression ::= NK_MINUS expr_or_subquery */ - 459, /* (510) expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ - 459, /* (511) expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ - 459, /* (512) expression ::= expr_or_subquery NK_STAR expr_or_subquery */ - 459, /* (513) expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ - 459, /* (514) expression ::= expr_or_subquery NK_REM expr_or_subquery */ - 459, /* (515) expression ::= column_reference NK_ARROW NK_STRING */ - 459, /* (516) expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ - 459, /* (517) expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ - 437, /* (518) expression_list ::= expr_or_subquery */ - 437, /* (519) expression_list ::= expression_list NK_COMMA expr_or_subquery */ - 468, /* (520) column_reference ::= column_name */ - 468, /* (521) column_reference ::= table_name NK_DOT column_name */ - 468, /* (522) column_reference ::= NK_ALIAS */ - 468, /* (523) column_reference ::= table_name NK_DOT NK_ALIAS */ - 467, /* (524) pseudo_column ::= ROWTS */ - 467, /* (525) pseudo_column ::= TBNAME */ - 467, /* (526) pseudo_column ::= table_name NK_DOT TBNAME */ - 467, /* (527) pseudo_column ::= QSTART */ - 467, /* (528) pseudo_column ::= QEND */ - 467, /* (529) pseudo_column ::= QDURATION */ - 467, /* (530) pseudo_column ::= WSTART */ - 467, /* (531) pseudo_column ::= WEND */ - 467, /* (532) pseudo_column ::= WDURATION */ - 467, /* (533) pseudo_column ::= IROWTS */ - 467, /* (534) pseudo_column ::= ISFILLED */ - 467, /* (535) pseudo_column ::= QTAGS */ - 469, /* (536) function_expression ::= function_name NK_LP expression_list NK_RP */ - 469, /* (537) function_expression ::= star_func NK_LP star_func_para_list NK_RP */ - 469, /* (538) function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ - 469, /* (539) function_expression ::= CAST NK_LP expr_or_subquery AS type_name_default_len NK_RP */ - 469, /* (540) function_expression ::= literal_func */ - 462, /* (541) literal_func ::= noarg_func NK_LP NK_RP */ - 462, /* (542) literal_func ::= NOW */ - 462, /* (543) literal_func ::= TODAY */ - 473, /* (544) noarg_func ::= NOW */ - 473, /* (545) noarg_func ::= TODAY */ - 473, /* (546) noarg_func ::= TIMEZONE */ - 473, /* (547) noarg_func ::= DATABASE */ - 473, /* (548) noarg_func ::= CLIENT_VERSION */ - 473, /* (549) noarg_func ::= SERVER_VERSION */ - 473, /* (550) noarg_func ::= SERVER_STATUS */ - 473, /* (551) noarg_func ::= CURRENT_USER */ - 473, /* (552) noarg_func ::= USER */ - 471, /* (553) star_func ::= COUNT */ - 471, /* (554) star_func ::= FIRST */ - 471, /* (555) star_func ::= LAST */ - 471, /* (556) star_func ::= LAST_ROW */ - 472, /* (557) star_func_para_list ::= NK_STAR */ - 472, /* (558) star_func_para_list ::= other_para_list */ - 474, /* (559) other_para_list ::= star_func_para */ - 474, /* (560) other_para_list ::= other_para_list NK_COMMA star_func_para */ - 475, /* (561) star_func_para ::= expr_or_subquery */ - 475, /* (562) star_func_para ::= table_name NK_DOT NK_STAR */ - 470, /* (563) case_when_expression ::= CASE when_then_list case_when_else_opt END */ - 470, /* (564) case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ - 476, /* (565) when_then_list ::= when_then_expr */ - 476, /* (566) when_then_list ::= when_then_list when_then_expr */ - 479, /* (567) when_then_expr ::= WHEN common_expression THEN common_expression */ - 477, /* (568) case_when_else_opt ::= */ - 477, /* (569) case_when_else_opt ::= ELSE common_expression */ - 480, /* (570) predicate ::= expr_or_subquery compare_op expr_or_subquery */ - 480, /* (571) predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ - 480, /* (572) predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ - 480, /* (573) predicate ::= expr_or_subquery IS NULL */ - 480, /* (574) predicate ::= expr_or_subquery IS NOT NULL */ - 480, /* (575) predicate ::= expr_or_subquery in_op in_predicate_value */ - 481, /* (576) compare_op ::= NK_LT */ - 481, /* (577) compare_op ::= NK_GT */ - 481, /* (578) compare_op ::= NK_LE */ - 481, /* (579) compare_op ::= NK_GE */ - 481, /* (580) compare_op ::= NK_NE */ - 481, /* (581) compare_op ::= NK_EQ */ - 481, /* (582) compare_op ::= LIKE */ - 481, /* (583) compare_op ::= NOT LIKE */ - 481, /* (584) compare_op ::= MATCH */ - 481, /* (585) compare_op ::= NMATCH */ - 481, /* (586) compare_op ::= CONTAINS */ - 482, /* (587) in_op ::= IN */ - 482, /* (588) in_op ::= NOT IN */ - 483, /* (589) in_predicate_value ::= NK_LP literal_list NK_RP */ - 484, /* (590) boolean_value_expression ::= boolean_primary */ - 484, /* (591) boolean_value_expression ::= NOT boolean_primary */ - 484, /* (592) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ - 484, /* (593) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ - 485, /* (594) boolean_primary ::= predicate */ - 485, /* (595) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ - 478, /* (596) common_expression ::= expr_or_subquery */ - 478, /* (597) common_expression ::= boolean_value_expression */ - 486, /* (598) from_clause_opt ::= */ - 486, /* (599) from_clause_opt ::= FROM table_reference_list */ - 487, /* (600) table_reference_list ::= table_reference */ - 487, /* (601) table_reference_list ::= table_reference_list NK_COMMA table_reference */ - 488, /* (602) table_reference ::= table_primary */ - 488, /* (603) table_reference ::= joined_table */ - 489, /* (604) table_primary ::= table_name alias_opt */ - 489, /* (605) table_primary ::= db_name NK_DOT table_name alias_opt */ - 489, /* (606) table_primary ::= subquery alias_opt */ - 489, /* (607) table_primary ::= parenthesized_joined_table */ - 491, /* (608) alias_opt ::= */ - 491, /* (609) alias_opt ::= table_alias */ - 491, /* (610) alias_opt ::= AS table_alias */ - 493, /* (611) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ - 493, /* (612) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ - 490, /* (613) joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ - 494, /* (614) join_type ::= */ - 494, /* (615) join_type ::= INNER */ - 495, /* (616) 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 */ - 496, /* (617) hint_list ::= */ - 496, /* (618) hint_list ::= NK_HINT */ - 498, /* (619) tag_mode_opt ::= */ - 498, /* (620) tag_mode_opt ::= TAGS */ - 497, /* (621) set_quantifier_opt ::= */ - 497, /* (622) set_quantifier_opt ::= DISTINCT */ - 497, /* (623) set_quantifier_opt ::= ALL */ - 499, /* (624) select_list ::= select_item */ - 499, /* (625) select_list ::= select_list NK_COMMA select_item */ - 507, /* (626) select_item ::= NK_STAR */ - 507, /* (627) select_item ::= common_expression */ - 507, /* (628) select_item ::= common_expression column_alias */ - 507, /* (629) select_item ::= common_expression AS column_alias */ - 507, /* (630) select_item ::= table_name NK_DOT NK_STAR */ - 440, /* (631) where_clause_opt ::= */ - 440, /* (632) where_clause_opt ::= WHERE search_condition */ - 500, /* (633) partition_by_clause_opt ::= */ - 500, /* (634) partition_by_clause_opt ::= PARTITION BY partition_list */ - 508, /* (635) partition_list ::= partition_item */ - 508, /* (636) partition_list ::= partition_list NK_COMMA partition_item */ - 509, /* (637) partition_item ::= expr_or_subquery */ - 509, /* (638) partition_item ::= expr_or_subquery column_alias */ - 509, /* (639) partition_item ::= expr_or_subquery AS column_alias */ - 504, /* (640) twindow_clause_opt ::= */ - 504, /* (641) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP */ - 504, /* (642) twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ - 504, /* (643) twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ - 504, /* (644) twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_COMMA interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ - 504, /* (645) twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ - 504, /* (646) twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_RP */ - 504, /* (647) twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ - 433, /* (648) sliding_opt ::= */ - 433, /* (649) sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP */ - 510, /* (650) interval_sliding_duration_literal ::= NK_VARIABLE */ - 510, /* (651) interval_sliding_duration_literal ::= NK_STRING */ - 510, /* (652) interval_sliding_duration_literal ::= NK_INTEGER */ - 503, /* (653) fill_opt ::= */ - 503, /* (654) fill_opt ::= FILL NK_LP fill_mode NK_RP */ - 503, /* (655) fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP */ - 503, /* (656) fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP */ - 511, /* (657) fill_mode ::= NONE */ - 511, /* (658) fill_mode ::= PREV */ - 511, /* (659) fill_mode ::= NULL */ - 511, /* (660) fill_mode ::= NULL_F */ - 511, /* (661) fill_mode ::= LINEAR */ - 511, /* (662) fill_mode ::= NEXT */ - 505, /* (663) group_by_clause_opt ::= */ - 505, /* (664) group_by_clause_opt ::= GROUP BY group_by_list */ - 512, /* (665) group_by_list ::= expr_or_subquery */ - 512, /* (666) group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ - 506, /* (667) having_clause_opt ::= */ - 506, /* (668) having_clause_opt ::= HAVING search_condition */ - 501, /* (669) range_opt ::= */ - 501, /* (670) range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ - 501, /* (671) range_opt ::= RANGE NK_LP expr_or_subquery NK_RP */ - 502, /* (672) every_opt ::= */ - 502, /* (673) every_opt ::= EVERY NK_LP duration_literal NK_RP */ - 513, /* (674) query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ - 514, /* (675) query_simple ::= query_specification */ - 514, /* (676) query_simple ::= union_query_expression */ - 518, /* (677) union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ - 518, /* (678) union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ - 519, /* (679) query_simple_or_subquery ::= query_simple */ - 519, /* (680) query_simple_or_subquery ::= subquery */ - 439, /* (681) query_or_subquery ::= query_expression */ - 439, /* (682) query_or_subquery ::= subquery */ - 515, /* (683) order_by_clause_opt ::= */ - 515, /* (684) order_by_clause_opt ::= ORDER BY sort_specification_list */ - 516, /* (685) slimit_clause_opt ::= */ - 516, /* (686) slimit_clause_opt ::= SLIMIT NK_INTEGER */ - 516, /* (687) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ - 516, /* (688) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - 517, /* (689) limit_clause_opt ::= */ - 517, /* (690) limit_clause_opt ::= LIMIT NK_INTEGER */ - 517, /* (691) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ - 517, /* (692) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - 492, /* (693) subquery ::= NK_LP query_expression NK_RP */ - 492, /* (694) subquery ::= NK_LP subquery NK_RP */ - 376, /* (695) search_condition ::= common_expression */ - 520, /* (696) sort_specification_list ::= sort_specification */ - 520, /* (697) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ - 521, /* (698) sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ - 522, /* (699) ordering_specification_opt ::= */ - 522, /* (700) ordering_specification_opt ::= ASC */ - 522, /* (701) ordering_specification_opt ::= DESC */ - 523, /* (702) null_ordering_opt ::= */ - 523, /* (703) null_ordering_opt ::= NULLS FIRST */ - 523, /* (704) null_ordering_opt ::= NULLS LAST */ + 362, /* (0) cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */ + 362, /* (1) cmd ::= ALTER ACCOUNT NK_ID alter_account_options */ + 363, /* (2) account_options ::= */ + 363, /* (3) account_options ::= account_options PPS literal */ + 363, /* (4) account_options ::= account_options TSERIES literal */ + 363, /* (5) account_options ::= account_options STORAGE literal */ + 363, /* (6) account_options ::= account_options STREAMS literal */ + 363, /* (7) account_options ::= account_options QTIME literal */ + 363, /* (8) account_options ::= account_options DBS literal */ + 363, /* (9) account_options ::= account_options USERS literal */ + 363, /* (10) account_options ::= account_options CONNS literal */ + 363, /* (11) account_options ::= account_options STATE literal */ + 364, /* (12) alter_account_options ::= alter_account_option */ + 364, /* (13) alter_account_options ::= alter_account_options alter_account_option */ + 366, /* (14) alter_account_option ::= PASS literal */ + 366, /* (15) alter_account_option ::= PPS literal */ + 366, /* (16) alter_account_option ::= TSERIES literal */ + 366, /* (17) alter_account_option ::= STORAGE literal */ + 366, /* (18) alter_account_option ::= STREAMS literal */ + 366, /* (19) alter_account_option ::= QTIME literal */ + 366, /* (20) alter_account_option ::= DBS literal */ + 366, /* (21) alter_account_option ::= USERS literal */ + 366, /* (22) alter_account_option ::= CONNS literal */ + 366, /* (23) alter_account_option ::= STATE literal */ + 367, /* (24) ip_range_list ::= NK_STRING */ + 367, /* (25) ip_range_list ::= ip_range_list NK_COMMA NK_STRING */ + 368, /* (26) white_list ::= HOST ip_range_list */ + 369, /* (27) white_list_opt ::= */ + 369, /* (28) white_list_opt ::= white_list */ + 362, /* (29) cmd ::= CREATE USER user_name PASS NK_STRING sysinfo_opt white_list_opt */ + 362, /* (30) cmd ::= ALTER USER user_name PASS NK_STRING */ + 362, /* (31) cmd ::= ALTER USER user_name ENABLE NK_INTEGER */ + 362, /* (32) cmd ::= ALTER USER user_name SYSINFO NK_INTEGER */ + 362, /* (33) cmd ::= ALTER USER user_name ADD white_list */ + 362, /* (34) cmd ::= ALTER USER user_name DROP white_list */ + 362, /* (35) cmd ::= DROP USER user_name */ + 371, /* (36) sysinfo_opt ::= */ + 371, /* (37) sysinfo_opt ::= SYSINFO NK_INTEGER */ + 362, /* (38) cmd ::= GRANT privileges ON priv_level with_opt TO user_name */ + 362, /* (39) cmd ::= REVOKE privileges ON priv_level with_opt FROM user_name */ + 372, /* (40) privileges ::= ALL */ + 372, /* (41) privileges ::= priv_type_list */ + 372, /* (42) privileges ::= SUBSCRIBE */ + 375, /* (43) priv_type_list ::= priv_type */ + 375, /* (44) priv_type_list ::= priv_type_list NK_COMMA priv_type */ + 376, /* (45) priv_type ::= READ */ + 376, /* (46) priv_type ::= WRITE */ + 376, /* (47) priv_type ::= ALTER */ + 373, /* (48) priv_level ::= NK_STAR NK_DOT NK_STAR */ + 373, /* (49) priv_level ::= db_name NK_DOT NK_STAR */ + 373, /* (50) priv_level ::= db_name NK_DOT table_name */ + 373, /* (51) priv_level ::= topic_name */ + 374, /* (52) with_opt ::= */ + 374, /* (53) with_opt ::= WITH search_condition */ + 362, /* (54) cmd ::= CREATE ENCRYPT_KEY NK_STRING */ + 362, /* (55) cmd ::= CREATE DNODE dnode_endpoint */ + 362, /* (56) cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */ + 362, /* (57) cmd ::= DROP DNODE NK_INTEGER force_opt */ + 362, /* (58) cmd ::= DROP DNODE dnode_endpoint force_opt */ + 362, /* (59) cmd ::= DROP DNODE NK_INTEGER unsafe_opt */ + 362, /* (60) cmd ::= DROP DNODE dnode_endpoint unsafe_opt */ + 362, /* (61) cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ + 362, /* (62) cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */ + 362, /* (63) cmd ::= ALTER ALL DNODES NK_STRING */ + 362, /* (64) cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */ + 362, /* (65) cmd ::= RESTORE DNODE NK_INTEGER */ + 381, /* (66) dnode_endpoint ::= NK_STRING */ + 381, /* (67) dnode_endpoint ::= NK_ID */ + 381, /* (68) dnode_endpoint ::= NK_IPTOKEN */ + 382, /* (69) force_opt ::= */ + 382, /* (70) force_opt ::= FORCE */ + 383, /* (71) unsafe_opt ::= UNSAFE */ + 362, /* (72) cmd ::= ALTER CLUSTER NK_STRING */ + 362, /* (73) cmd ::= ALTER CLUSTER NK_STRING NK_STRING */ + 362, /* (74) cmd ::= ALTER LOCAL NK_STRING */ + 362, /* (75) cmd ::= ALTER LOCAL NK_STRING NK_STRING */ + 362, /* (76) cmd ::= CREATE QNODE ON DNODE NK_INTEGER */ + 362, /* (77) cmd ::= DROP QNODE ON DNODE NK_INTEGER */ + 362, /* (78) cmd ::= RESTORE QNODE ON DNODE NK_INTEGER */ + 362, /* (79) cmd ::= CREATE BNODE ON DNODE NK_INTEGER */ + 362, /* (80) cmd ::= DROP BNODE ON DNODE NK_INTEGER */ + 362, /* (81) cmd ::= CREATE SNODE ON DNODE NK_INTEGER */ + 362, /* (82) cmd ::= DROP SNODE ON DNODE NK_INTEGER */ + 362, /* (83) cmd ::= CREATE MNODE ON DNODE NK_INTEGER */ + 362, /* (84) cmd ::= DROP MNODE ON DNODE NK_INTEGER */ + 362, /* (85) cmd ::= RESTORE MNODE ON DNODE NK_INTEGER */ + 362, /* (86) cmd ::= RESTORE VNODE ON DNODE NK_INTEGER */ + 362, /* (87) cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ + 362, /* (88) cmd ::= DROP DATABASE exists_opt db_name */ + 362, /* (89) cmd ::= USE db_name */ + 362, /* (90) cmd ::= ALTER DATABASE db_name alter_db_options */ + 362, /* (91) cmd ::= FLUSH DATABASE db_name */ + 362, /* (92) cmd ::= TRIM DATABASE db_name speed_opt */ + 362, /* (93) cmd ::= S3MIGRATE DATABASE db_name */ + 362, /* (94) cmd ::= COMPACT DATABASE db_name start_opt end_opt */ + 384, /* (95) not_exists_opt ::= IF NOT EXISTS */ + 384, /* (96) not_exists_opt ::= */ + 386, /* (97) exists_opt ::= IF EXISTS */ + 386, /* (98) exists_opt ::= */ + 385, /* (99) db_options ::= */ + 385, /* (100) db_options ::= db_options BUFFER NK_INTEGER */ + 385, /* (101) db_options ::= db_options CACHEMODEL NK_STRING */ + 385, /* (102) db_options ::= db_options CACHESIZE NK_INTEGER */ + 385, /* (103) db_options ::= db_options COMP NK_INTEGER */ + 385, /* (104) db_options ::= db_options DURATION NK_INTEGER */ + 385, /* (105) db_options ::= db_options DURATION NK_VARIABLE */ + 385, /* (106) db_options ::= db_options MAXROWS NK_INTEGER */ + 385, /* (107) db_options ::= db_options MINROWS NK_INTEGER */ + 385, /* (108) db_options ::= db_options KEEP integer_list */ + 385, /* (109) db_options ::= db_options KEEP variable_list */ + 385, /* (110) db_options ::= db_options PAGES NK_INTEGER */ + 385, /* (111) db_options ::= db_options PAGESIZE NK_INTEGER */ + 385, /* (112) db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */ + 385, /* (113) db_options ::= db_options PRECISION NK_STRING */ + 385, /* (114) db_options ::= db_options REPLICA NK_INTEGER */ + 385, /* (115) db_options ::= db_options VGROUPS NK_INTEGER */ + 385, /* (116) db_options ::= db_options SINGLE_STABLE NK_INTEGER */ + 385, /* (117) db_options ::= db_options RETENTIONS retention_list */ + 385, /* (118) db_options ::= db_options SCHEMALESS NK_INTEGER */ + 385, /* (119) db_options ::= db_options WAL_LEVEL NK_INTEGER */ + 385, /* (120) db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */ + 385, /* (121) db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */ + 385, /* (122) db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ + 385, /* (123) db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */ + 385, /* (124) db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ + 385, /* (125) db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */ + 385, /* (126) db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */ + 385, /* (127) db_options ::= db_options STT_TRIGGER NK_INTEGER */ + 385, /* (128) db_options ::= db_options TABLE_PREFIX signed */ + 385, /* (129) db_options ::= db_options TABLE_SUFFIX signed */ + 385, /* (130) db_options ::= db_options S3_CHUNKSIZE NK_INTEGER */ + 385, /* (131) db_options ::= db_options S3_KEEPLOCAL NK_INTEGER */ + 385, /* (132) db_options ::= db_options S3_KEEPLOCAL NK_VARIABLE */ + 385, /* (133) db_options ::= db_options S3_COMPACT NK_INTEGER */ + 385, /* (134) db_options ::= db_options KEEP_TIME_OFFSET NK_INTEGER */ + 385, /* (135) db_options ::= db_options ENCRYPT_ALGORITHM NK_STRING */ + 387, /* (136) alter_db_options ::= alter_db_option */ + 387, /* (137) alter_db_options ::= alter_db_options alter_db_option */ + 395, /* (138) alter_db_option ::= BUFFER NK_INTEGER */ + 395, /* (139) alter_db_option ::= CACHEMODEL NK_STRING */ + 395, /* (140) alter_db_option ::= CACHESIZE NK_INTEGER */ + 395, /* (141) alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */ + 395, /* (142) alter_db_option ::= KEEP integer_list */ + 395, /* (143) alter_db_option ::= KEEP variable_list */ + 395, /* (144) alter_db_option ::= PAGES NK_INTEGER */ + 395, /* (145) alter_db_option ::= REPLICA NK_INTEGER */ + 395, /* (146) alter_db_option ::= WAL_LEVEL NK_INTEGER */ + 395, /* (147) alter_db_option ::= STT_TRIGGER NK_INTEGER */ + 395, /* (148) alter_db_option ::= MINROWS NK_INTEGER */ + 395, /* (149) alter_db_option ::= WAL_RETENTION_PERIOD NK_INTEGER */ + 395, /* (150) alter_db_option ::= WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ + 395, /* (151) alter_db_option ::= WAL_RETENTION_SIZE NK_INTEGER */ + 395, /* (152) alter_db_option ::= WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ + 395, /* (153) alter_db_option ::= S3_KEEPLOCAL NK_INTEGER */ + 395, /* (154) alter_db_option ::= S3_KEEPLOCAL NK_VARIABLE */ + 395, /* (155) alter_db_option ::= S3_COMPACT NK_INTEGER */ + 395, /* (156) alter_db_option ::= KEEP_TIME_OFFSET NK_INTEGER */ + 395, /* (157) alter_db_option ::= ENCRYPT_ALGORITHM NK_STRING */ + 391, /* (158) integer_list ::= NK_INTEGER */ + 391, /* (159) integer_list ::= integer_list NK_COMMA NK_INTEGER */ + 392, /* (160) variable_list ::= NK_VARIABLE */ + 392, /* (161) variable_list ::= variable_list NK_COMMA NK_VARIABLE */ + 393, /* (162) retention_list ::= retention */ + 393, /* (163) retention_list ::= retention_list NK_COMMA retention */ + 396, /* (164) retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ + 396, /* (165) retention ::= NK_MINUS NK_COLON NK_VARIABLE */ + 388, /* (166) speed_opt ::= */ + 388, /* (167) speed_opt ::= BWLIMIT NK_INTEGER */ + 389, /* (168) start_opt ::= */ + 389, /* (169) start_opt ::= START WITH NK_INTEGER */ + 389, /* (170) start_opt ::= START WITH NK_STRING */ + 389, /* (171) start_opt ::= START WITH TIMESTAMP NK_STRING */ + 390, /* (172) end_opt ::= */ + 390, /* (173) end_opt ::= END WITH NK_INTEGER */ + 390, /* (174) end_opt ::= END WITH NK_STRING */ + 390, /* (175) end_opt ::= END WITH TIMESTAMP NK_STRING */ + 362, /* (176) cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ + 362, /* (177) cmd ::= CREATE TABLE multi_create_clause */ + 362, /* (178) cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ + 362, /* (179) cmd ::= DROP TABLE multi_drop_clause */ + 362, /* (180) cmd ::= DROP STABLE exists_opt full_table_name */ + 362, /* (181) cmd ::= ALTER TABLE alter_table_clause */ + 362, /* (182) cmd ::= ALTER STABLE alter_table_clause */ + 404, /* (183) alter_table_clause ::= full_table_name alter_table_options */ + 404, /* (184) alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ + 404, /* (185) alter_table_clause ::= full_table_name DROP COLUMN column_name */ + 404, /* (186) alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ + 404, /* (187) alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ + 404, /* (188) alter_table_clause ::= full_table_name ADD TAG column_name type_name */ + 404, /* (189) alter_table_clause ::= full_table_name DROP TAG column_name */ + 404, /* (190) alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ + 404, /* (191) alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ + 404, /* (192) alter_table_clause ::= full_table_name SET TAG column_name NK_EQ tags_literal */ + 401, /* (193) multi_create_clause ::= create_subtable_clause */ + 401, /* (194) multi_create_clause ::= multi_create_clause create_subtable_clause */ + 409, /* (195) 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 */ + 403, /* (196) multi_drop_clause ::= drop_table_clause */ + 403, /* (197) multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause */ + 412, /* (198) drop_table_clause ::= exists_opt full_table_name */ + 410, /* (199) specific_cols_opt ::= */ + 410, /* (200) specific_cols_opt ::= NK_LP col_name_list NK_RP */ + 397, /* (201) full_table_name ::= table_name */ + 397, /* (202) full_table_name ::= db_name NK_DOT table_name */ + 398, /* (203) column_def_list ::= column_def */ + 398, /* (204) column_def_list ::= column_def_list NK_COMMA column_def */ + 414, /* (205) column_def ::= column_name type_name */ + 414, /* (206) column_def ::= column_name type_name PRIMARY KEY */ + 407, /* (207) type_name ::= BOOL */ + 407, /* (208) type_name ::= TINYINT */ + 407, /* (209) type_name ::= SMALLINT */ + 407, /* (210) type_name ::= INT */ + 407, /* (211) type_name ::= INTEGER */ + 407, /* (212) type_name ::= BIGINT */ + 407, /* (213) type_name ::= FLOAT */ + 407, /* (214) type_name ::= DOUBLE */ + 407, /* (215) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ + 407, /* (216) type_name ::= TIMESTAMP */ + 407, /* (217) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ + 407, /* (218) type_name ::= TINYINT UNSIGNED */ + 407, /* (219) type_name ::= SMALLINT UNSIGNED */ + 407, /* (220) type_name ::= INT UNSIGNED */ + 407, /* (221) type_name ::= BIGINT UNSIGNED */ + 407, /* (222) type_name ::= JSON */ + 407, /* (223) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ + 407, /* (224) type_name ::= MEDIUMBLOB */ + 407, /* (225) type_name ::= BLOB */ + 407, /* (226) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ + 407, /* (227) type_name ::= GEOMETRY NK_LP NK_INTEGER NK_RP */ + 407, /* (228) type_name ::= DECIMAL */ + 407, /* (229) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ + 407, /* (230) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ + 415, /* (231) type_name_default_len ::= BINARY */ + 415, /* (232) type_name_default_len ::= NCHAR */ + 415, /* (233) type_name_default_len ::= VARCHAR */ + 415, /* (234) type_name_default_len ::= VARBINARY */ + 399, /* (235) tags_def_opt ::= */ + 399, /* (236) tags_def_opt ::= tags_def */ + 402, /* (237) tags_def ::= TAGS NK_LP column_def_list NK_RP */ + 400, /* (238) table_options ::= */ + 400, /* (239) table_options ::= table_options COMMENT NK_STRING */ + 400, /* (240) table_options ::= table_options MAX_DELAY duration_list */ + 400, /* (241) table_options ::= table_options WATERMARK duration_list */ + 400, /* (242) table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ + 400, /* (243) table_options ::= table_options TTL NK_INTEGER */ + 400, /* (244) table_options ::= table_options SMA NK_LP col_name_list NK_RP */ + 400, /* (245) table_options ::= table_options DELETE_MARK duration_list */ + 405, /* (246) alter_table_options ::= alter_table_option */ + 405, /* (247) alter_table_options ::= alter_table_options alter_table_option */ + 418, /* (248) alter_table_option ::= COMMENT NK_STRING */ + 418, /* (249) alter_table_option ::= TTL NK_INTEGER */ + 416, /* (250) duration_list ::= duration_literal */ + 416, /* (251) duration_list ::= duration_list NK_COMMA duration_literal */ + 417, /* (252) rollup_func_list ::= rollup_func_name */ + 417, /* (253) rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ + 420, /* (254) rollup_func_name ::= function_name */ + 420, /* (255) rollup_func_name ::= FIRST */ + 420, /* (256) rollup_func_name ::= LAST */ + 413, /* (257) col_name_list ::= col_name */ + 413, /* (258) col_name_list ::= col_name_list NK_COMMA col_name */ + 422, /* (259) col_name ::= column_name */ + 362, /* (260) cmd ::= SHOW DNODES */ + 362, /* (261) cmd ::= SHOW USERS */ + 362, /* (262) cmd ::= SHOW USER PRIVILEGES */ + 362, /* (263) cmd ::= SHOW db_kind_opt DATABASES */ + 362, /* (264) cmd ::= SHOW table_kind_db_name_cond_opt TABLES like_pattern_opt */ + 362, /* (265) cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ + 362, /* (266) cmd ::= SHOW db_name_cond_opt VGROUPS */ + 362, /* (267) cmd ::= SHOW MNODES */ + 362, /* (268) cmd ::= SHOW QNODES */ + 362, /* (269) cmd ::= SHOW ARBGROUPS */ + 362, /* (270) cmd ::= SHOW FUNCTIONS */ + 362, /* (271) cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ + 362, /* (272) cmd ::= SHOW INDEXES FROM db_name NK_DOT table_name */ + 362, /* (273) cmd ::= SHOW STREAMS */ + 362, /* (274) cmd ::= SHOW ACCOUNTS */ + 362, /* (275) cmd ::= SHOW APPS */ + 362, /* (276) cmd ::= SHOW CONNECTIONS */ + 362, /* (277) cmd ::= SHOW LICENCES */ + 362, /* (278) cmd ::= SHOW GRANTS */ + 362, /* (279) cmd ::= SHOW GRANTS FULL */ + 362, /* (280) cmd ::= SHOW GRANTS LOGS */ + 362, /* (281) cmd ::= SHOW CLUSTER MACHINES */ + 362, /* (282) cmd ::= SHOW CREATE DATABASE db_name */ + 362, /* (283) cmd ::= SHOW CREATE TABLE full_table_name */ + 362, /* (284) cmd ::= SHOW CREATE STABLE full_table_name */ + 362, /* (285) cmd ::= SHOW ENCRYPTIONS */ + 362, /* (286) cmd ::= SHOW QUERIES */ + 362, /* (287) cmd ::= SHOW SCORES */ + 362, /* (288) cmd ::= SHOW TOPICS */ + 362, /* (289) cmd ::= SHOW VARIABLES */ + 362, /* (290) cmd ::= SHOW CLUSTER VARIABLES */ + 362, /* (291) cmd ::= SHOW LOCAL VARIABLES */ + 362, /* (292) cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */ + 362, /* (293) cmd ::= SHOW BNODES */ + 362, /* (294) cmd ::= SHOW SNODES */ + 362, /* (295) cmd ::= SHOW CLUSTER */ + 362, /* (296) cmd ::= SHOW TRANSACTIONS */ + 362, /* (297) cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ + 362, /* (298) cmd ::= SHOW CONSUMERS */ + 362, /* (299) cmd ::= SHOW SUBSCRIPTIONS */ + 362, /* (300) cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ + 362, /* (301) cmd ::= SHOW TAGS FROM db_name NK_DOT table_name */ + 362, /* (302) cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ + 362, /* (303) cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name */ + 362, /* (304) cmd ::= SHOW VNODES ON DNODE NK_INTEGER */ + 362, /* (305) cmd ::= SHOW VNODES */ + 362, /* (306) cmd ::= SHOW db_name_cond_opt ALIVE */ + 362, /* (307) cmd ::= SHOW CLUSTER ALIVE */ + 362, /* (308) cmd ::= SHOW db_name_cond_opt VIEWS like_pattern_opt */ + 362, /* (309) cmd ::= SHOW CREATE VIEW full_table_name */ + 362, /* (310) cmd ::= SHOW COMPACTS */ + 362, /* (311) cmd ::= SHOW COMPACT NK_INTEGER */ + 424, /* (312) table_kind_db_name_cond_opt ::= */ + 424, /* (313) table_kind_db_name_cond_opt ::= table_kind */ + 424, /* (314) table_kind_db_name_cond_opt ::= db_name NK_DOT */ + 424, /* (315) table_kind_db_name_cond_opt ::= table_kind db_name NK_DOT */ + 430, /* (316) table_kind ::= NORMAL */ + 430, /* (317) table_kind ::= CHILD */ + 426, /* (318) db_name_cond_opt ::= */ + 426, /* (319) db_name_cond_opt ::= db_name NK_DOT */ + 425, /* (320) like_pattern_opt ::= */ + 425, /* (321) like_pattern_opt ::= LIKE NK_STRING */ + 427, /* (322) table_name_cond ::= table_name */ + 428, /* (323) from_db_opt ::= */ + 428, /* (324) from_db_opt ::= FROM db_name */ + 429, /* (325) tag_list_opt ::= */ + 429, /* (326) tag_list_opt ::= tag_item */ + 429, /* (327) tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ + 431, /* (328) tag_item ::= TBNAME */ + 431, /* (329) tag_item ::= QTAGS */ + 431, /* (330) tag_item ::= column_name */ + 431, /* (331) tag_item ::= column_name column_alias */ + 431, /* (332) tag_item ::= column_name AS column_alias */ + 423, /* (333) db_kind_opt ::= */ + 423, /* (334) db_kind_opt ::= USER */ + 423, /* (335) db_kind_opt ::= SYSTEM */ + 362, /* (336) cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options */ + 362, /* (337) cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP */ + 362, /* (338) cmd ::= DROP INDEX exists_opt full_index_name */ + 434, /* (339) full_index_name ::= index_name */ + 434, /* (340) full_index_name ::= db_name NK_DOT index_name */ + 433, /* (341) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ + 433, /* (342) 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 */ + 436, /* (343) func_list ::= func */ + 436, /* (344) func_list ::= func_list NK_COMMA func */ + 439, /* (345) func ::= sma_func_name NK_LP expression_list NK_RP */ + 440, /* (346) sma_func_name ::= function_name */ + 440, /* (347) sma_func_name ::= COUNT */ + 440, /* (348) sma_func_name ::= FIRST */ + 440, /* (349) sma_func_name ::= LAST */ + 440, /* (350) sma_func_name ::= LAST_ROW */ + 438, /* (351) sma_stream_opt ::= */ + 438, /* (352) sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ + 438, /* (353) sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ + 438, /* (354) sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ + 442, /* (355) with_meta ::= AS */ + 442, /* (356) with_meta ::= WITH META AS */ + 442, /* (357) with_meta ::= ONLY META AS */ + 362, /* (358) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ + 362, /* (359) cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name */ + 362, /* (360) cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt */ + 362, /* (361) cmd ::= DROP TOPIC exists_opt topic_name */ + 362, /* (362) cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ + 362, /* (363) cmd ::= DESC full_table_name */ + 362, /* (364) cmd ::= DESCRIBE full_table_name */ + 362, /* (365) cmd ::= RESET QUERY CACHE */ + 362, /* (366) cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ + 362, /* (367) cmd ::= EXPLAIN analyze_opt explain_options insert_query */ + 446, /* (368) analyze_opt ::= */ + 446, /* (369) analyze_opt ::= ANALYZE */ + 447, /* (370) explain_options ::= */ + 447, /* (371) explain_options ::= explain_options VERBOSE NK_BOOL */ + 447, /* (372) explain_options ::= explain_options RATIO NK_FLOAT */ + 362, /* (373) cmd ::= CREATE or_replace_opt agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt language_opt */ + 362, /* (374) cmd ::= DROP FUNCTION exists_opt function_name */ + 450, /* (375) agg_func_opt ::= */ + 450, /* (376) agg_func_opt ::= AGGREGATE */ + 451, /* (377) bufsize_opt ::= */ + 451, /* (378) bufsize_opt ::= BUFSIZE NK_INTEGER */ + 452, /* (379) language_opt ::= */ + 452, /* (380) language_opt ::= LANGUAGE NK_STRING */ + 449, /* (381) or_replace_opt ::= */ + 449, /* (382) or_replace_opt ::= OR REPLACE */ + 362, /* (383) cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery */ + 362, /* (384) cmd ::= DROP VIEW exists_opt full_view_name */ + 453, /* (385) full_view_name ::= view_name */ + 453, /* (386) full_view_name ::= db_name NK_DOT view_name */ + 362, /* (387) cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name col_list_opt tag_def_or_ref_opt subtable_opt AS query_or_subquery */ + 362, /* (388) cmd ::= DROP STREAM exists_opt stream_name */ + 362, /* (389) cmd ::= PAUSE STREAM exists_opt stream_name */ + 362, /* (390) cmd ::= RESUME STREAM exists_opt ignore_opt stream_name */ + 457, /* (391) col_list_opt ::= */ + 457, /* (392) col_list_opt ::= NK_LP column_stream_def_list NK_RP */ + 461, /* (393) column_stream_def_list ::= column_stream_def */ + 461, /* (394) column_stream_def_list ::= column_stream_def_list NK_COMMA column_stream_def */ + 462, /* (395) column_stream_def ::= column_name */ + 462, /* (396) column_stream_def ::= column_name PRIMARY KEY */ + 458, /* (397) tag_def_or_ref_opt ::= */ + 458, /* (398) tag_def_or_ref_opt ::= tags_def */ + 458, /* (399) tag_def_or_ref_opt ::= TAGS NK_LP column_stream_def_list NK_RP */ + 456, /* (400) stream_options ::= */ + 456, /* (401) stream_options ::= stream_options TRIGGER AT_ONCE */ + 456, /* (402) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ + 456, /* (403) stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ + 456, /* (404) stream_options ::= stream_options WATERMARK duration_literal */ + 456, /* (405) stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ + 456, /* (406) stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ + 456, /* (407) stream_options ::= stream_options DELETE_MARK duration_literal */ + 456, /* (408) stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */ + 459, /* (409) subtable_opt ::= */ + 459, /* (410) subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ + 460, /* (411) ignore_opt ::= */ + 460, /* (412) ignore_opt ::= IGNORE UNTREATED */ + 362, /* (413) cmd ::= KILL CONNECTION NK_INTEGER */ + 362, /* (414) cmd ::= KILL QUERY NK_STRING */ + 362, /* (415) cmd ::= KILL TRANSACTION NK_INTEGER */ + 362, /* (416) cmd ::= KILL COMPACT NK_INTEGER */ + 362, /* (417) cmd ::= BALANCE VGROUP */ + 362, /* (418) cmd ::= BALANCE VGROUP LEADER on_vgroup_id */ + 362, /* (419) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ + 362, /* (420) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ + 362, /* (421) cmd ::= SPLIT VGROUP NK_INTEGER */ + 464, /* (422) on_vgroup_id ::= */ + 464, /* (423) on_vgroup_id ::= ON NK_INTEGER */ + 465, /* (424) dnode_list ::= DNODE NK_INTEGER */ + 465, /* (425) dnode_list ::= dnode_list DNODE NK_INTEGER */ + 362, /* (426) cmd ::= DELETE FROM full_table_name where_clause_opt */ + 362, /* (427) cmd ::= query_or_subquery */ + 362, /* (428) cmd ::= insert_query */ + 448, /* (429) insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ + 448, /* (430) insert_query ::= INSERT INTO full_table_name query_or_subquery */ + 408, /* (431) tags_literal ::= NK_INTEGER */ + 408, /* (432) tags_literal ::= NK_INTEGER NK_PLUS duration_literal */ + 408, /* (433) tags_literal ::= NK_INTEGER NK_MINUS duration_literal */ + 408, /* (434) tags_literal ::= NK_PLUS NK_INTEGER */ + 408, /* (435) tags_literal ::= NK_PLUS NK_INTEGER NK_PLUS duration_literal */ + 408, /* (436) tags_literal ::= NK_PLUS NK_INTEGER NK_MINUS duration_literal */ + 408, /* (437) tags_literal ::= NK_MINUS NK_INTEGER */ + 408, /* (438) tags_literal ::= NK_MINUS NK_INTEGER NK_PLUS duration_literal */ + 408, /* (439) tags_literal ::= NK_MINUS NK_INTEGER NK_MINUS duration_literal */ + 408, /* (440) tags_literal ::= NK_FLOAT */ + 408, /* (441) tags_literal ::= NK_PLUS NK_FLOAT */ + 408, /* (442) tags_literal ::= NK_MINUS NK_FLOAT */ + 408, /* (443) tags_literal ::= NK_BIN */ + 408, /* (444) tags_literal ::= NK_BIN NK_PLUS duration_literal */ + 408, /* (445) tags_literal ::= NK_BIN NK_MINUS duration_literal */ + 408, /* (446) tags_literal ::= NK_PLUS NK_BIN */ + 408, /* (447) tags_literal ::= NK_PLUS NK_BIN NK_PLUS duration_literal */ + 408, /* (448) tags_literal ::= NK_PLUS NK_BIN NK_MINUS duration_literal */ + 408, /* (449) tags_literal ::= NK_MINUS NK_BIN */ + 408, /* (450) tags_literal ::= NK_MINUS NK_BIN NK_PLUS duration_literal */ + 408, /* (451) tags_literal ::= NK_MINUS NK_BIN NK_MINUS duration_literal */ + 408, /* (452) tags_literal ::= NK_HEX */ + 408, /* (453) tags_literal ::= NK_HEX NK_PLUS duration_literal */ + 408, /* (454) tags_literal ::= NK_HEX NK_MINUS duration_literal */ + 408, /* (455) tags_literal ::= NK_PLUS NK_HEX */ + 408, /* (456) tags_literal ::= NK_PLUS NK_HEX NK_PLUS duration_literal */ + 408, /* (457) tags_literal ::= NK_PLUS NK_HEX NK_MINUS duration_literal */ + 408, /* (458) tags_literal ::= NK_MINUS NK_HEX */ + 408, /* (459) tags_literal ::= NK_MINUS NK_HEX NK_PLUS duration_literal */ + 408, /* (460) tags_literal ::= NK_MINUS NK_HEX NK_MINUS duration_literal */ + 408, /* (461) tags_literal ::= NK_STRING */ + 408, /* (462) tags_literal ::= NK_STRING NK_PLUS duration_literal */ + 408, /* (463) tags_literal ::= NK_STRING NK_MINUS duration_literal */ + 408, /* (464) tags_literal ::= NK_BOOL */ + 408, /* (465) tags_literal ::= NULL */ + 408, /* (466) tags_literal ::= literal_func */ + 408, /* (467) tags_literal ::= literal_func NK_PLUS duration_literal */ + 408, /* (468) tags_literal ::= literal_func NK_MINUS duration_literal */ + 411, /* (469) tags_literal_list ::= tags_literal */ + 411, /* (470) tags_literal_list ::= tags_literal_list NK_COMMA tags_literal */ + 365, /* (471) literal ::= NK_INTEGER */ + 365, /* (472) literal ::= NK_FLOAT */ + 365, /* (473) literal ::= NK_STRING */ + 365, /* (474) literal ::= NK_BOOL */ + 365, /* (475) literal ::= TIMESTAMP NK_STRING */ + 365, /* (476) literal ::= duration_literal */ + 365, /* (477) literal ::= NULL */ + 365, /* (478) literal ::= NK_QUESTION */ + 419, /* (479) duration_literal ::= NK_VARIABLE */ + 394, /* (480) signed ::= NK_INTEGER */ + 394, /* (481) signed ::= NK_PLUS NK_INTEGER */ + 394, /* (482) signed ::= NK_MINUS NK_INTEGER */ + 394, /* (483) signed ::= NK_FLOAT */ + 394, /* (484) signed ::= NK_PLUS NK_FLOAT */ + 394, /* (485) signed ::= NK_MINUS NK_FLOAT */ + 467, /* (486) signed_literal ::= signed */ + 467, /* (487) signed_literal ::= NK_STRING */ + 467, /* (488) signed_literal ::= NK_BOOL */ + 467, /* (489) signed_literal ::= TIMESTAMP NK_STRING */ + 467, /* (490) signed_literal ::= duration_literal */ + 467, /* (491) signed_literal ::= NULL */ + 467, /* (492) signed_literal ::= literal_func */ + 467, /* (493) signed_literal ::= NK_QUESTION */ + 468, /* (494) literal_list ::= signed_literal */ + 468, /* (495) literal_list ::= literal_list NK_COMMA signed_literal */ + 377, /* (496) db_name ::= NK_ID */ + 378, /* (497) table_name ::= NK_ID */ + 406, /* (498) column_name ::= NK_ID */ + 421, /* (499) function_name ::= NK_ID */ + 454, /* (500) view_name ::= NK_ID */ + 469, /* (501) table_alias ::= NK_ID */ + 432, /* (502) column_alias ::= NK_ID */ + 432, /* (503) column_alias ::= NK_ALIAS */ + 370, /* (504) user_name ::= NK_ID */ + 379, /* (505) topic_name ::= NK_ID */ + 455, /* (506) stream_name ::= NK_ID */ + 445, /* (507) cgroup_name ::= NK_ID */ + 435, /* (508) index_name ::= NK_ID */ + 470, /* (509) expr_or_subquery ::= expression */ + 463, /* (510) expression ::= literal */ + 463, /* (511) expression ::= pseudo_column */ + 463, /* (512) expression ::= column_reference */ + 463, /* (513) expression ::= function_expression */ + 463, /* (514) expression ::= case_when_expression */ + 463, /* (515) expression ::= NK_LP expression NK_RP */ + 463, /* (516) expression ::= NK_PLUS expr_or_subquery */ + 463, /* (517) expression ::= NK_MINUS expr_or_subquery */ + 463, /* (518) expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ + 463, /* (519) expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ + 463, /* (520) expression ::= expr_or_subquery NK_STAR expr_or_subquery */ + 463, /* (521) expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ + 463, /* (522) expression ::= expr_or_subquery NK_REM expr_or_subquery */ + 463, /* (523) expression ::= column_reference NK_ARROW NK_STRING */ + 463, /* (524) expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ + 463, /* (525) expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ + 441, /* (526) expression_list ::= expr_or_subquery */ + 441, /* (527) expression_list ::= expression_list NK_COMMA expr_or_subquery */ + 472, /* (528) column_reference ::= column_name */ + 472, /* (529) column_reference ::= table_name NK_DOT column_name */ + 472, /* (530) column_reference ::= NK_ALIAS */ + 472, /* (531) column_reference ::= table_name NK_DOT NK_ALIAS */ + 471, /* (532) pseudo_column ::= ROWTS */ + 471, /* (533) pseudo_column ::= TBNAME */ + 471, /* (534) pseudo_column ::= table_name NK_DOT TBNAME */ + 471, /* (535) pseudo_column ::= QSTART */ + 471, /* (536) pseudo_column ::= QEND */ + 471, /* (537) pseudo_column ::= QDURATION */ + 471, /* (538) pseudo_column ::= WSTART */ + 471, /* (539) pseudo_column ::= WEND */ + 471, /* (540) pseudo_column ::= WDURATION */ + 471, /* (541) pseudo_column ::= IROWTS */ + 471, /* (542) pseudo_column ::= ISFILLED */ + 471, /* (543) pseudo_column ::= QTAGS */ + 473, /* (544) function_expression ::= function_name NK_LP expression_list NK_RP */ + 473, /* (545) function_expression ::= star_func NK_LP star_func_para_list NK_RP */ + 473, /* (546) function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ + 473, /* (547) function_expression ::= CAST NK_LP expr_or_subquery AS type_name_default_len NK_RP */ + 473, /* (548) function_expression ::= literal_func */ + 466, /* (549) literal_func ::= noarg_func NK_LP NK_RP */ + 466, /* (550) literal_func ::= NOW */ + 466, /* (551) literal_func ::= TODAY */ + 477, /* (552) noarg_func ::= NOW */ + 477, /* (553) noarg_func ::= TODAY */ + 477, /* (554) noarg_func ::= TIMEZONE */ + 477, /* (555) noarg_func ::= DATABASE */ + 477, /* (556) noarg_func ::= CLIENT_VERSION */ + 477, /* (557) noarg_func ::= SERVER_VERSION */ + 477, /* (558) noarg_func ::= SERVER_STATUS */ + 477, /* (559) noarg_func ::= CURRENT_USER */ + 477, /* (560) noarg_func ::= USER */ + 475, /* (561) star_func ::= COUNT */ + 475, /* (562) star_func ::= FIRST */ + 475, /* (563) star_func ::= LAST */ + 475, /* (564) star_func ::= LAST_ROW */ + 476, /* (565) star_func_para_list ::= NK_STAR */ + 476, /* (566) star_func_para_list ::= other_para_list */ + 478, /* (567) other_para_list ::= star_func_para */ + 478, /* (568) other_para_list ::= other_para_list NK_COMMA star_func_para */ + 479, /* (569) star_func_para ::= expr_or_subquery */ + 479, /* (570) star_func_para ::= table_name NK_DOT NK_STAR */ + 474, /* (571) case_when_expression ::= CASE when_then_list case_when_else_opt END */ + 474, /* (572) case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ + 480, /* (573) when_then_list ::= when_then_expr */ + 480, /* (574) when_then_list ::= when_then_list when_then_expr */ + 483, /* (575) when_then_expr ::= WHEN common_expression THEN common_expression */ + 481, /* (576) case_when_else_opt ::= */ + 481, /* (577) case_when_else_opt ::= ELSE common_expression */ + 484, /* (578) predicate ::= expr_or_subquery compare_op expr_or_subquery */ + 484, /* (579) predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ + 484, /* (580) predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ + 484, /* (581) predicate ::= expr_or_subquery IS NULL */ + 484, /* (582) predicate ::= expr_or_subquery IS NOT NULL */ + 484, /* (583) predicate ::= expr_or_subquery in_op in_predicate_value */ + 485, /* (584) compare_op ::= NK_LT */ + 485, /* (585) compare_op ::= NK_GT */ + 485, /* (586) compare_op ::= NK_LE */ + 485, /* (587) compare_op ::= NK_GE */ + 485, /* (588) compare_op ::= NK_NE */ + 485, /* (589) compare_op ::= NK_EQ */ + 485, /* (590) compare_op ::= LIKE */ + 485, /* (591) compare_op ::= NOT LIKE */ + 485, /* (592) compare_op ::= MATCH */ + 485, /* (593) compare_op ::= NMATCH */ + 485, /* (594) compare_op ::= CONTAINS */ + 486, /* (595) in_op ::= IN */ + 486, /* (596) in_op ::= NOT IN */ + 487, /* (597) in_predicate_value ::= NK_LP literal_list NK_RP */ + 488, /* (598) boolean_value_expression ::= boolean_primary */ + 488, /* (599) boolean_value_expression ::= NOT boolean_primary */ + 488, /* (600) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ + 488, /* (601) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ + 489, /* (602) boolean_primary ::= predicate */ + 489, /* (603) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ + 482, /* (604) common_expression ::= expr_or_subquery */ + 482, /* (605) common_expression ::= boolean_value_expression */ + 490, /* (606) from_clause_opt ::= */ + 490, /* (607) from_clause_opt ::= FROM table_reference_list */ + 491, /* (608) table_reference_list ::= table_reference */ + 491, /* (609) table_reference_list ::= table_reference_list NK_COMMA table_reference */ + 492, /* (610) table_reference ::= table_primary */ + 492, /* (611) table_reference ::= joined_table */ + 493, /* (612) table_primary ::= table_name alias_opt */ + 493, /* (613) table_primary ::= db_name NK_DOT table_name alias_opt */ + 493, /* (614) table_primary ::= subquery alias_opt */ + 493, /* (615) table_primary ::= parenthesized_joined_table */ + 495, /* (616) alias_opt ::= */ + 495, /* (617) alias_opt ::= table_alias */ + 495, /* (618) alias_opt ::= AS table_alias */ + 497, /* (619) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ + 497, /* (620) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ + 494, /* (621) joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ + 498, /* (622) join_type ::= */ + 498, /* (623) join_type ::= INNER */ + 499, /* (624) 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 */ + 500, /* (625) hint_list ::= */ + 500, /* (626) hint_list ::= NK_HINT */ + 502, /* (627) tag_mode_opt ::= */ + 502, /* (628) tag_mode_opt ::= TAGS */ + 501, /* (629) set_quantifier_opt ::= */ + 501, /* (630) set_quantifier_opt ::= DISTINCT */ + 501, /* (631) set_quantifier_opt ::= ALL */ + 503, /* (632) select_list ::= select_item */ + 503, /* (633) select_list ::= select_list NK_COMMA select_item */ + 511, /* (634) select_item ::= NK_STAR */ + 511, /* (635) select_item ::= common_expression */ + 511, /* (636) select_item ::= common_expression column_alias */ + 511, /* (637) select_item ::= common_expression AS column_alias */ + 511, /* (638) select_item ::= table_name NK_DOT NK_STAR */ + 444, /* (639) where_clause_opt ::= */ + 444, /* (640) where_clause_opt ::= WHERE search_condition */ + 504, /* (641) partition_by_clause_opt ::= */ + 504, /* (642) partition_by_clause_opt ::= PARTITION BY partition_list */ + 512, /* (643) partition_list ::= partition_item */ + 512, /* (644) partition_list ::= partition_list NK_COMMA partition_item */ + 513, /* (645) partition_item ::= expr_or_subquery */ + 513, /* (646) partition_item ::= expr_or_subquery column_alias */ + 513, /* (647) partition_item ::= expr_or_subquery AS column_alias */ + 508, /* (648) twindow_clause_opt ::= */ + 508, /* (649) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP */ + 508, /* (650) twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ + 508, /* (651) twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ + 508, /* (652) twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_COMMA interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ + 508, /* (653) twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ + 508, /* (654) twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_RP */ + 508, /* (655) twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ + 437, /* (656) sliding_opt ::= */ + 437, /* (657) sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP */ + 514, /* (658) interval_sliding_duration_literal ::= NK_VARIABLE */ + 514, /* (659) interval_sliding_duration_literal ::= NK_STRING */ + 514, /* (660) interval_sliding_duration_literal ::= NK_INTEGER */ + 507, /* (661) fill_opt ::= */ + 507, /* (662) fill_opt ::= FILL NK_LP fill_mode NK_RP */ + 507, /* (663) fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP */ + 507, /* (664) fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP */ + 515, /* (665) fill_mode ::= NONE */ + 515, /* (666) fill_mode ::= PREV */ + 515, /* (667) fill_mode ::= NULL */ + 515, /* (668) fill_mode ::= NULL_F */ + 515, /* (669) fill_mode ::= LINEAR */ + 515, /* (670) fill_mode ::= NEXT */ + 509, /* (671) group_by_clause_opt ::= */ + 509, /* (672) group_by_clause_opt ::= GROUP BY group_by_list */ + 516, /* (673) group_by_list ::= expr_or_subquery */ + 516, /* (674) group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ + 510, /* (675) having_clause_opt ::= */ + 510, /* (676) having_clause_opt ::= HAVING search_condition */ + 505, /* (677) range_opt ::= */ + 505, /* (678) range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ + 505, /* (679) range_opt ::= RANGE NK_LP expr_or_subquery NK_RP */ + 506, /* (680) every_opt ::= */ + 506, /* (681) every_opt ::= EVERY NK_LP duration_literal NK_RP */ + 517, /* (682) query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ + 518, /* (683) query_simple ::= query_specification */ + 518, /* (684) query_simple ::= union_query_expression */ + 522, /* (685) union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ + 522, /* (686) union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ + 523, /* (687) query_simple_or_subquery ::= query_simple */ + 523, /* (688) query_simple_or_subquery ::= subquery */ + 443, /* (689) query_or_subquery ::= query_expression */ + 443, /* (690) query_or_subquery ::= subquery */ + 519, /* (691) order_by_clause_opt ::= */ + 519, /* (692) order_by_clause_opt ::= ORDER BY sort_specification_list */ + 520, /* (693) slimit_clause_opt ::= */ + 520, /* (694) slimit_clause_opt ::= SLIMIT NK_INTEGER */ + 520, /* (695) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ + 520, /* (696) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + 521, /* (697) limit_clause_opt ::= */ + 521, /* (698) limit_clause_opt ::= LIMIT NK_INTEGER */ + 521, /* (699) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ + 521, /* (700) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + 496, /* (701) subquery ::= NK_LP query_expression NK_RP */ + 496, /* (702) subquery ::= NK_LP subquery NK_RP */ + 380, /* (703) search_condition ::= common_expression */ + 524, /* (704) sort_specification_list ::= sort_specification */ + 524, /* (705) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ + 525, /* (706) sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ + 526, /* (707) ordering_specification_opt ::= */ + 526, /* (708) ordering_specification_opt ::= ASC */ + 526, /* (709) ordering_specification_opt ::= DESC */ + 527, /* (710) null_ordering_opt ::= */ + 527, /* (711) null_ordering_opt ::= NULLS FIRST */ + 527, /* (712) null_ordering_opt ::= NULLS LAST */ }; /* For rule J, yyRuleInfoNRhs[J] contains the negative of the number @@ -4280,618 +4307,626 @@ static const signed char yyRuleInfoNRhs[] = { -4, /* (90) cmd ::= ALTER DATABASE db_name alter_db_options */ -3, /* (91) cmd ::= FLUSH DATABASE db_name */ -4, /* (92) cmd ::= TRIM DATABASE db_name speed_opt */ - -5, /* (93) cmd ::= COMPACT DATABASE db_name start_opt end_opt */ - -3, /* (94) not_exists_opt ::= IF NOT EXISTS */ - 0, /* (95) not_exists_opt ::= */ - -2, /* (96) exists_opt ::= IF EXISTS */ - 0, /* (97) exists_opt ::= */ - 0, /* (98) db_options ::= */ - -3, /* (99) db_options ::= db_options BUFFER NK_INTEGER */ - -3, /* (100) db_options ::= db_options CACHEMODEL NK_STRING */ - -3, /* (101) db_options ::= db_options CACHESIZE NK_INTEGER */ - -3, /* (102) db_options ::= db_options COMP NK_INTEGER */ - -3, /* (103) db_options ::= db_options DURATION NK_INTEGER */ - -3, /* (104) db_options ::= db_options DURATION NK_VARIABLE */ - -3, /* (105) db_options ::= db_options MAXROWS NK_INTEGER */ - -3, /* (106) db_options ::= db_options MINROWS NK_INTEGER */ - -3, /* (107) db_options ::= db_options KEEP integer_list */ - -3, /* (108) db_options ::= db_options KEEP variable_list */ - -3, /* (109) db_options ::= db_options PAGES NK_INTEGER */ - -3, /* (110) db_options ::= db_options PAGESIZE NK_INTEGER */ - -3, /* (111) db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */ - -3, /* (112) db_options ::= db_options PRECISION NK_STRING */ - -3, /* (113) db_options ::= db_options REPLICA NK_INTEGER */ - -3, /* (114) db_options ::= db_options VGROUPS NK_INTEGER */ - -3, /* (115) db_options ::= db_options SINGLE_STABLE NK_INTEGER */ - -3, /* (116) db_options ::= db_options RETENTIONS retention_list */ - -3, /* (117) db_options ::= db_options SCHEMALESS NK_INTEGER */ - -3, /* (118) db_options ::= db_options WAL_LEVEL NK_INTEGER */ - -3, /* (119) db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */ - -3, /* (120) db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */ - -4, /* (121) db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ - -3, /* (122) db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */ - -4, /* (123) db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ - -3, /* (124) db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */ - -3, /* (125) db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */ - -3, /* (126) db_options ::= db_options STT_TRIGGER NK_INTEGER */ - -3, /* (127) db_options ::= db_options TABLE_PREFIX signed */ - -3, /* (128) db_options ::= db_options TABLE_SUFFIX signed */ - -3, /* (129) db_options ::= db_options KEEP_TIME_OFFSET NK_INTEGER */ - -3, /* (130) db_options ::= db_options ENCRYPT_ALGORITHM NK_STRING */ - -1, /* (131) alter_db_options ::= alter_db_option */ - -2, /* (132) alter_db_options ::= alter_db_options alter_db_option */ - -2, /* (133) alter_db_option ::= BUFFER NK_INTEGER */ - -2, /* (134) alter_db_option ::= CACHEMODEL NK_STRING */ - -2, /* (135) alter_db_option ::= CACHESIZE NK_INTEGER */ - -2, /* (136) alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */ - -2, /* (137) alter_db_option ::= KEEP integer_list */ - -2, /* (138) alter_db_option ::= KEEP variable_list */ - -2, /* (139) alter_db_option ::= PAGES NK_INTEGER */ - -2, /* (140) alter_db_option ::= REPLICA NK_INTEGER */ - -2, /* (141) alter_db_option ::= WAL_LEVEL NK_INTEGER */ - -2, /* (142) alter_db_option ::= STT_TRIGGER NK_INTEGER */ - -2, /* (143) alter_db_option ::= MINROWS NK_INTEGER */ - -2, /* (144) alter_db_option ::= WAL_RETENTION_PERIOD NK_INTEGER */ - -3, /* (145) alter_db_option ::= WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ - -2, /* (146) alter_db_option ::= WAL_RETENTION_SIZE NK_INTEGER */ - -3, /* (147) alter_db_option ::= WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ - -2, /* (148) alter_db_option ::= KEEP_TIME_OFFSET NK_INTEGER */ - -2, /* (149) alter_db_option ::= ENCRYPT_ALGORITHM NK_STRING */ - -1, /* (150) integer_list ::= NK_INTEGER */ - -3, /* (151) integer_list ::= integer_list NK_COMMA NK_INTEGER */ - -1, /* (152) variable_list ::= NK_VARIABLE */ - -3, /* (153) variable_list ::= variable_list NK_COMMA NK_VARIABLE */ - -1, /* (154) retention_list ::= retention */ - -3, /* (155) retention_list ::= retention_list NK_COMMA retention */ - -3, /* (156) retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ - -3, /* (157) retention ::= NK_MINUS NK_COLON NK_VARIABLE */ - 0, /* (158) speed_opt ::= */ - -2, /* (159) speed_opt ::= BWLIMIT NK_INTEGER */ - 0, /* (160) start_opt ::= */ - -3, /* (161) start_opt ::= START WITH NK_INTEGER */ - -3, /* (162) start_opt ::= START WITH NK_STRING */ - -4, /* (163) start_opt ::= START WITH TIMESTAMP NK_STRING */ - 0, /* (164) end_opt ::= */ - -3, /* (165) end_opt ::= END WITH NK_INTEGER */ - -3, /* (166) end_opt ::= END WITH NK_STRING */ - -4, /* (167) end_opt ::= END WITH TIMESTAMP NK_STRING */ - -9, /* (168) cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ - -3, /* (169) cmd ::= CREATE TABLE multi_create_clause */ - -9, /* (170) cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ - -3, /* (171) cmd ::= DROP TABLE multi_drop_clause */ - -4, /* (172) cmd ::= DROP STABLE exists_opt full_table_name */ - -3, /* (173) cmd ::= ALTER TABLE alter_table_clause */ - -3, /* (174) cmd ::= ALTER STABLE alter_table_clause */ - -2, /* (175) alter_table_clause ::= full_table_name alter_table_options */ - -5, /* (176) alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ - -4, /* (177) alter_table_clause ::= full_table_name DROP COLUMN column_name */ - -5, /* (178) alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ - -5, /* (179) alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ - -5, /* (180) alter_table_clause ::= full_table_name ADD TAG column_name type_name */ - -4, /* (181) alter_table_clause ::= full_table_name DROP TAG column_name */ - -5, /* (182) alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ - -5, /* (183) alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ - -6, /* (184) alter_table_clause ::= full_table_name SET TAG column_name NK_EQ tags_literal */ - -1, /* (185) multi_create_clause ::= create_subtable_clause */ - -2, /* (186) multi_create_clause ::= multi_create_clause create_subtable_clause */ - -10, /* (187) 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, /* (188) multi_drop_clause ::= drop_table_clause */ - -3, /* (189) multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause */ - -2, /* (190) drop_table_clause ::= exists_opt full_table_name */ - 0, /* (191) specific_cols_opt ::= */ - -3, /* (192) specific_cols_opt ::= NK_LP col_name_list NK_RP */ - -1, /* (193) full_table_name ::= table_name */ - -3, /* (194) full_table_name ::= db_name NK_DOT table_name */ - -1, /* (195) column_def_list ::= column_def */ - -3, /* (196) column_def_list ::= column_def_list NK_COMMA column_def */ - -2, /* (197) column_def ::= column_name type_name */ - -4, /* (198) column_def ::= column_name type_name PRIMARY KEY */ - -1, /* (199) type_name ::= BOOL */ - -1, /* (200) type_name ::= TINYINT */ - -1, /* (201) type_name ::= SMALLINT */ - -1, /* (202) type_name ::= INT */ - -1, /* (203) type_name ::= INTEGER */ - -1, /* (204) type_name ::= BIGINT */ - -1, /* (205) type_name ::= FLOAT */ - -1, /* (206) type_name ::= DOUBLE */ - -4, /* (207) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ - -1, /* (208) type_name ::= TIMESTAMP */ - -4, /* (209) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ - -2, /* (210) type_name ::= TINYINT UNSIGNED */ - -2, /* (211) type_name ::= SMALLINT UNSIGNED */ - -2, /* (212) type_name ::= INT UNSIGNED */ - -2, /* (213) type_name ::= BIGINT UNSIGNED */ - -1, /* (214) type_name ::= JSON */ - -4, /* (215) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ - -1, /* (216) type_name ::= MEDIUMBLOB */ - -1, /* (217) type_name ::= BLOB */ - -4, /* (218) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ - -4, /* (219) type_name ::= GEOMETRY NK_LP NK_INTEGER NK_RP */ - -1, /* (220) type_name ::= DECIMAL */ - -4, /* (221) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ - -6, /* (222) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ - -1, /* (223) type_name_default_len ::= BINARY */ - -1, /* (224) type_name_default_len ::= NCHAR */ - -1, /* (225) type_name_default_len ::= VARCHAR */ - -1, /* (226) type_name_default_len ::= VARBINARY */ - 0, /* (227) tags_def_opt ::= */ - -1, /* (228) tags_def_opt ::= tags_def */ - -4, /* (229) tags_def ::= TAGS NK_LP column_def_list NK_RP */ - 0, /* (230) table_options ::= */ - -3, /* (231) table_options ::= table_options COMMENT NK_STRING */ - -3, /* (232) table_options ::= table_options MAX_DELAY duration_list */ - -3, /* (233) table_options ::= table_options WATERMARK duration_list */ - -5, /* (234) table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ - -3, /* (235) table_options ::= table_options TTL NK_INTEGER */ - -5, /* (236) table_options ::= table_options SMA NK_LP col_name_list NK_RP */ - -3, /* (237) table_options ::= table_options DELETE_MARK duration_list */ - -1, /* (238) alter_table_options ::= alter_table_option */ - -2, /* (239) alter_table_options ::= alter_table_options alter_table_option */ - -2, /* (240) alter_table_option ::= COMMENT NK_STRING */ - -2, /* (241) alter_table_option ::= TTL NK_INTEGER */ - -1, /* (242) duration_list ::= duration_literal */ - -3, /* (243) duration_list ::= duration_list NK_COMMA duration_literal */ - -1, /* (244) rollup_func_list ::= rollup_func_name */ - -3, /* (245) rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ - -1, /* (246) rollup_func_name ::= function_name */ - -1, /* (247) rollup_func_name ::= FIRST */ - -1, /* (248) rollup_func_name ::= LAST */ - -1, /* (249) col_name_list ::= col_name */ - -3, /* (250) col_name_list ::= col_name_list NK_COMMA col_name */ - -1, /* (251) col_name ::= column_name */ - -2, /* (252) cmd ::= SHOW DNODES */ - -2, /* (253) cmd ::= SHOW USERS */ - -3, /* (254) cmd ::= SHOW USER PRIVILEGES */ - -3, /* (255) cmd ::= SHOW db_kind_opt DATABASES */ - -4, /* (256) cmd ::= SHOW table_kind_db_name_cond_opt TABLES like_pattern_opt */ - -4, /* (257) cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ - -3, /* (258) cmd ::= SHOW db_name_cond_opt VGROUPS */ - -2, /* (259) cmd ::= SHOW MNODES */ - -2, /* (260) cmd ::= SHOW QNODES */ - -2, /* (261) cmd ::= SHOW ARBGROUPS */ - -2, /* (262) cmd ::= SHOW FUNCTIONS */ - -5, /* (263) cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ - -6, /* (264) cmd ::= SHOW INDEXES FROM db_name NK_DOT table_name */ - -2, /* (265) cmd ::= SHOW STREAMS */ - -2, /* (266) cmd ::= SHOW ACCOUNTS */ - -2, /* (267) cmd ::= SHOW APPS */ - -2, /* (268) cmd ::= SHOW CONNECTIONS */ - -2, /* (269) cmd ::= SHOW LICENCES */ - -2, /* (270) cmd ::= SHOW GRANTS */ - -3, /* (271) cmd ::= SHOW GRANTS FULL */ - -3, /* (272) cmd ::= SHOW GRANTS LOGS */ - -3, /* (273) cmd ::= SHOW CLUSTER MACHINES */ - -4, /* (274) cmd ::= SHOW CREATE DATABASE db_name */ - -4, /* (275) cmd ::= SHOW CREATE TABLE full_table_name */ - -4, /* (276) cmd ::= SHOW CREATE STABLE full_table_name */ - -2, /* (277) cmd ::= SHOW ENCRYPTIONS */ - -2, /* (278) cmd ::= SHOW QUERIES */ - -2, /* (279) cmd ::= SHOW SCORES */ - -2, /* (280) cmd ::= SHOW TOPICS */ - -2, /* (281) cmd ::= SHOW VARIABLES */ - -3, /* (282) cmd ::= SHOW CLUSTER VARIABLES */ - -3, /* (283) cmd ::= SHOW LOCAL VARIABLES */ - -5, /* (284) cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */ - -2, /* (285) cmd ::= SHOW BNODES */ - -2, /* (286) cmd ::= SHOW SNODES */ - -2, /* (287) cmd ::= SHOW CLUSTER */ - -2, /* (288) cmd ::= SHOW TRANSACTIONS */ - -4, /* (289) cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ - -2, /* (290) cmd ::= SHOW CONSUMERS */ - -2, /* (291) cmd ::= SHOW SUBSCRIPTIONS */ - -5, /* (292) cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ - -6, /* (293) cmd ::= SHOW TAGS FROM db_name NK_DOT table_name */ - -7, /* (294) cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ - -8, /* (295) cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name */ - -5, /* (296) cmd ::= SHOW VNODES ON DNODE NK_INTEGER */ - -2, /* (297) cmd ::= SHOW VNODES */ - -3, /* (298) cmd ::= SHOW db_name_cond_opt ALIVE */ - -3, /* (299) cmd ::= SHOW CLUSTER ALIVE */ - -4, /* (300) cmd ::= SHOW db_name_cond_opt VIEWS like_pattern_opt */ - -4, /* (301) cmd ::= SHOW CREATE VIEW full_table_name */ - -2, /* (302) cmd ::= SHOW COMPACTS */ - -3, /* (303) cmd ::= SHOW COMPACT NK_INTEGER */ - 0, /* (304) table_kind_db_name_cond_opt ::= */ - -1, /* (305) table_kind_db_name_cond_opt ::= table_kind */ - -2, /* (306) table_kind_db_name_cond_opt ::= db_name NK_DOT */ - -3, /* (307) table_kind_db_name_cond_opt ::= table_kind db_name NK_DOT */ - -1, /* (308) table_kind ::= NORMAL */ - -1, /* (309) table_kind ::= CHILD */ - 0, /* (310) db_name_cond_opt ::= */ - -2, /* (311) db_name_cond_opt ::= db_name NK_DOT */ - 0, /* (312) like_pattern_opt ::= */ - -2, /* (313) like_pattern_opt ::= LIKE NK_STRING */ - -1, /* (314) table_name_cond ::= table_name */ - 0, /* (315) from_db_opt ::= */ - -2, /* (316) from_db_opt ::= FROM db_name */ - 0, /* (317) tag_list_opt ::= */ - -1, /* (318) tag_list_opt ::= tag_item */ - -3, /* (319) tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ - -1, /* (320) tag_item ::= TBNAME */ - -1, /* (321) tag_item ::= QTAGS */ - -1, /* (322) tag_item ::= column_name */ - -2, /* (323) tag_item ::= column_name column_alias */ - -3, /* (324) tag_item ::= column_name AS column_alias */ - 0, /* (325) db_kind_opt ::= */ - -1, /* (326) db_kind_opt ::= USER */ - -1, /* (327) db_kind_opt ::= SYSTEM */ - -8, /* (328) cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options */ - -9, /* (329) cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP */ - -4, /* (330) cmd ::= DROP INDEX exists_opt full_index_name */ - -1, /* (331) full_index_name ::= index_name */ - -3, /* (332) full_index_name ::= db_name NK_DOT index_name */ - -10, /* (333) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ - -12, /* (334) 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, /* (335) func_list ::= func */ - -3, /* (336) func_list ::= func_list NK_COMMA func */ - -4, /* (337) func ::= sma_func_name NK_LP expression_list NK_RP */ - -1, /* (338) sma_func_name ::= function_name */ - -1, /* (339) sma_func_name ::= COUNT */ - -1, /* (340) sma_func_name ::= FIRST */ - -1, /* (341) sma_func_name ::= LAST */ - -1, /* (342) sma_func_name ::= LAST_ROW */ - 0, /* (343) sma_stream_opt ::= */ - -3, /* (344) sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ - -3, /* (345) sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ - -3, /* (346) sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ - -1, /* (347) with_meta ::= AS */ - -3, /* (348) with_meta ::= WITH META AS */ - -3, /* (349) with_meta ::= ONLY META AS */ - -6, /* (350) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ - -7, /* (351) cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name */ - -8, /* (352) cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt */ - -4, /* (353) cmd ::= DROP TOPIC exists_opt topic_name */ - -7, /* (354) cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ - -2, /* (355) cmd ::= DESC full_table_name */ - -2, /* (356) cmd ::= DESCRIBE full_table_name */ - -3, /* (357) cmd ::= RESET QUERY CACHE */ - -4, /* (358) cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ - -4, /* (359) cmd ::= EXPLAIN analyze_opt explain_options insert_query */ - 0, /* (360) analyze_opt ::= */ - -1, /* (361) analyze_opt ::= ANALYZE */ - 0, /* (362) explain_options ::= */ - -3, /* (363) explain_options ::= explain_options VERBOSE NK_BOOL */ - -3, /* (364) explain_options ::= explain_options RATIO NK_FLOAT */ - -12, /* (365) 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, /* (366) cmd ::= DROP FUNCTION exists_opt function_name */ - 0, /* (367) agg_func_opt ::= */ - -1, /* (368) agg_func_opt ::= AGGREGATE */ - 0, /* (369) bufsize_opt ::= */ - -2, /* (370) bufsize_opt ::= BUFSIZE NK_INTEGER */ - 0, /* (371) language_opt ::= */ - -2, /* (372) language_opt ::= LANGUAGE NK_STRING */ - 0, /* (373) or_replace_opt ::= */ - -2, /* (374) or_replace_opt ::= OR REPLACE */ - -6, /* (375) cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery */ - -4, /* (376) cmd ::= DROP VIEW exists_opt full_view_name */ - -1, /* (377) full_view_name ::= view_name */ - -3, /* (378) full_view_name ::= db_name NK_DOT view_name */ - -12, /* (379) 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, /* (380) cmd ::= DROP STREAM exists_opt stream_name */ - -4, /* (381) cmd ::= PAUSE STREAM exists_opt stream_name */ - -5, /* (382) cmd ::= RESUME STREAM exists_opt ignore_opt stream_name */ - 0, /* (383) col_list_opt ::= */ - -3, /* (384) col_list_opt ::= NK_LP column_stream_def_list NK_RP */ - -1, /* (385) column_stream_def_list ::= column_stream_def */ - -3, /* (386) column_stream_def_list ::= column_stream_def_list NK_COMMA column_stream_def */ - -1, /* (387) column_stream_def ::= column_name */ - -3, /* (388) column_stream_def ::= column_name PRIMARY KEY */ - 0, /* (389) tag_def_or_ref_opt ::= */ - -1, /* (390) tag_def_or_ref_opt ::= tags_def */ - -4, /* (391) tag_def_or_ref_opt ::= TAGS NK_LP column_stream_def_list NK_RP */ - 0, /* (392) stream_options ::= */ - -3, /* (393) stream_options ::= stream_options TRIGGER AT_ONCE */ - -3, /* (394) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ - -4, /* (395) stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ - -3, /* (396) stream_options ::= stream_options WATERMARK duration_literal */ - -4, /* (397) stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ - -3, /* (398) stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ - -3, /* (399) stream_options ::= stream_options DELETE_MARK duration_literal */ - -4, /* (400) stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */ - 0, /* (401) subtable_opt ::= */ - -4, /* (402) subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ - 0, /* (403) ignore_opt ::= */ - -2, /* (404) ignore_opt ::= IGNORE UNTREATED */ - -3, /* (405) cmd ::= KILL CONNECTION NK_INTEGER */ - -3, /* (406) cmd ::= KILL QUERY NK_STRING */ - -3, /* (407) cmd ::= KILL TRANSACTION NK_INTEGER */ - -3, /* (408) cmd ::= KILL COMPACT NK_INTEGER */ - -2, /* (409) cmd ::= BALANCE VGROUP */ - -4, /* (410) cmd ::= BALANCE VGROUP LEADER on_vgroup_id */ - -4, /* (411) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ - -4, /* (412) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ - -3, /* (413) cmd ::= SPLIT VGROUP NK_INTEGER */ - 0, /* (414) on_vgroup_id ::= */ - -2, /* (415) on_vgroup_id ::= ON NK_INTEGER */ - -2, /* (416) dnode_list ::= DNODE NK_INTEGER */ - -3, /* (417) dnode_list ::= dnode_list DNODE NK_INTEGER */ - -4, /* (418) cmd ::= DELETE FROM full_table_name where_clause_opt */ - -1, /* (419) cmd ::= query_or_subquery */ - -1, /* (420) cmd ::= insert_query */ - -7, /* (421) insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ - -4, /* (422) insert_query ::= INSERT INTO full_table_name query_or_subquery */ - -1, /* (423) tags_literal ::= NK_INTEGER */ - -3, /* (424) tags_literal ::= NK_INTEGER NK_PLUS duration_literal */ - -3, /* (425) tags_literal ::= NK_INTEGER NK_MINUS duration_literal */ - -2, /* (426) tags_literal ::= NK_PLUS NK_INTEGER */ - -4, /* (427) tags_literal ::= NK_PLUS NK_INTEGER NK_PLUS duration_literal */ - -4, /* (428) tags_literal ::= NK_PLUS NK_INTEGER NK_MINUS duration_literal */ - -2, /* (429) tags_literal ::= NK_MINUS NK_INTEGER */ - -4, /* (430) tags_literal ::= NK_MINUS NK_INTEGER NK_PLUS duration_literal */ - -4, /* (431) tags_literal ::= NK_MINUS NK_INTEGER NK_MINUS duration_literal */ - -1, /* (432) tags_literal ::= NK_FLOAT */ - -2, /* (433) tags_literal ::= NK_PLUS NK_FLOAT */ - -2, /* (434) tags_literal ::= NK_MINUS NK_FLOAT */ - -1, /* (435) tags_literal ::= NK_BIN */ - -3, /* (436) tags_literal ::= NK_BIN NK_PLUS duration_literal */ - -3, /* (437) tags_literal ::= NK_BIN NK_MINUS duration_literal */ - -2, /* (438) tags_literal ::= NK_PLUS NK_BIN */ - -4, /* (439) tags_literal ::= NK_PLUS NK_BIN NK_PLUS duration_literal */ - -4, /* (440) tags_literal ::= NK_PLUS NK_BIN NK_MINUS duration_literal */ - -2, /* (441) tags_literal ::= NK_MINUS NK_BIN */ - -4, /* (442) tags_literal ::= NK_MINUS NK_BIN NK_PLUS duration_literal */ - -4, /* (443) tags_literal ::= NK_MINUS NK_BIN NK_MINUS duration_literal */ - -1, /* (444) tags_literal ::= NK_HEX */ - -3, /* (445) tags_literal ::= NK_HEX NK_PLUS duration_literal */ - -3, /* (446) tags_literal ::= NK_HEX NK_MINUS duration_literal */ - -2, /* (447) tags_literal ::= NK_PLUS NK_HEX */ - -4, /* (448) tags_literal ::= NK_PLUS NK_HEX NK_PLUS duration_literal */ - -4, /* (449) tags_literal ::= NK_PLUS NK_HEX NK_MINUS duration_literal */ - -2, /* (450) tags_literal ::= NK_MINUS NK_HEX */ - -4, /* (451) tags_literal ::= NK_MINUS NK_HEX NK_PLUS duration_literal */ - -4, /* (452) tags_literal ::= NK_MINUS NK_HEX NK_MINUS duration_literal */ - -1, /* (453) tags_literal ::= NK_STRING */ - -3, /* (454) tags_literal ::= NK_STRING NK_PLUS duration_literal */ - -3, /* (455) tags_literal ::= NK_STRING NK_MINUS duration_literal */ - -1, /* (456) tags_literal ::= NK_BOOL */ - -1, /* (457) tags_literal ::= NULL */ - -1, /* (458) tags_literal ::= literal_func */ - -3, /* (459) tags_literal ::= literal_func NK_PLUS duration_literal */ - -3, /* (460) tags_literal ::= literal_func NK_MINUS duration_literal */ - -1, /* (461) tags_literal_list ::= tags_literal */ - -3, /* (462) tags_literal_list ::= tags_literal_list NK_COMMA tags_literal */ - -1, /* (463) literal ::= NK_INTEGER */ - -1, /* (464) literal ::= NK_FLOAT */ - -1, /* (465) literal ::= NK_STRING */ - -1, /* (466) literal ::= NK_BOOL */ - -2, /* (467) literal ::= TIMESTAMP NK_STRING */ - -1, /* (468) literal ::= duration_literal */ - -1, /* (469) literal ::= NULL */ - -1, /* (470) literal ::= NK_QUESTION */ - -1, /* (471) duration_literal ::= NK_VARIABLE */ - -1, /* (472) signed ::= NK_INTEGER */ - -2, /* (473) signed ::= NK_PLUS NK_INTEGER */ - -2, /* (474) signed ::= NK_MINUS NK_INTEGER */ - -1, /* (475) signed ::= NK_FLOAT */ - -2, /* (476) signed ::= NK_PLUS NK_FLOAT */ - -2, /* (477) signed ::= NK_MINUS NK_FLOAT */ - -1, /* (478) signed_literal ::= signed */ - -1, /* (479) signed_literal ::= NK_STRING */ - -1, /* (480) signed_literal ::= NK_BOOL */ - -2, /* (481) signed_literal ::= TIMESTAMP NK_STRING */ - -1, /* (482) signed_literal ::= duration_literal */ - -1, /* (483) signed_literal ::= NULL */ - -1, /* (484) signed_literal ::= literal_func */ - -1, /* (485) signed_literal ::= NK_QUESTION */ - -1, /* (486) literal_list ::= signed_literal */ - -3, /* (487) literal_list ::= literal_list NK_COMMA signed_literal */ - -1, /* (488) db_name ::= NK_ID */ - -1, /* (489) table_name ::= NK_ID */ - -1, /* (490) column_name ::= NK_ID */ - -1, /* (491) function_name ::= NK_ID */ - -1, /* (492) view_name ::= NK_ID */ - -1, /* (493) table_alias ::= NK_ID */ - -1, /* (494) column_alias ::= NK_ID */ - -1, /* (495) column_alias ::= NK_ALIAS */ - -1, /* (496) user_name ::= NK_ID */ - -1, /* (497) topic_name ::= NK_ID */ - -1, /* (498) stream_name ::= NK_ID */ - -1, /* (499) cgroup_name ::= NK_ID */ - -1, /* (500) index_name ::= NK_ID */ - -1, /* (501) expr_or_subquery ::= expression */ - -1, /* (502) expression ::= literal */ - -1, /* (503) expression ::= pseudo_column */ - -1, /* (504) expression ::= column_reference */ - -1, /* (505) expression ::= function_expression */ - -1, /* (506) expression ::= case_when_expression */ - -3, /* (507) expression ::= NK_LP expression NK_RP */ - -2, /* (508) expression ::= NK_PLUS expr_or_subquery */ - -2, /* (509) expression ::= NK_MINUS expr_or_subquery */ - -3, /* (510) expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ - -3, /* (511) expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ - -3, /* (512) expression ::= expr_or_subquery NK_STAR expr_or_subquery */ - -3, /* (513) expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ - -3, /* (514) expression ::= expr_or_subquery NK_REM expr_or_subquery */ - -3, /* (515) expression ::= column_reference NK_ARROW NK_STRING */ - -3, /* (516) expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ - -3, /* (517) expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ - -1, /* (518) expression_list ::= expr_or_subquery */ - -3, /* (519) expression_list ::= expression_list NK_COMMA expr_or_subquery */ - -1, /* (520) column_reference ::= column_name */ - -3, /* (521) column_reference ::= table_name NK_DOT column_name */ - -1, /* (522) column_reference ::= NK_ALIAS */ - -3, /* (523) column_reference ::= table_name NK_DOT NK_ALIAS */ - -1, /* (524) pseudo_column ::= ROWTS */ - -1, /* (525) pseudo_column ::= TBNAME */ - -3, /* (526) pseudo_column ::= table_name NK_DOT TBNAME */ - -1, /* (527) pseudo_column ::= QSTART */ - -1, /* (528) pseudo_column ::= QEND */ - -1, /* (529) pseudo_column ::= QDURATION */ - -1, /* (530) pseudo_column ::= WSTART */ - -1, /* (531) pseudo_column ::= WEND */ - -1, /* (532) pseudo_column ::= WDURATION */ - -1, /* (533) pseudo_column ::= IROWTS */ - -1, /* (534) pseudo_column ::= ISFILLED */ - -1, /* (535) pseudo_column ::= QTAGS */ - -4, /* (536) function_expression ::= function_name NK_LP expression_list NK_RP */ - -4, /* (537) function_expression ::= star_func NK_LP star_func_para_list NK_RP */ - -6, /* (538) function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ - -6, /* (539) function_expression ::= CAST NK_LP expr_or_subquery AS type_name_default_len NK_RP */ - -1, /* (540) function_expression ::= literal_func */ - -3, /* (541) literal_func ::= noarg_func NK_LP NK_RP */ - -1, /* (542) literal_func ::= NOW */ - -1, /* (543) literal_func ::= TODAY */ - -1, /* (544) noarg_func ::= NOW */ - -1, /* (545) noarg_func ::= TODAY */ - -1, /* (546) noarg_func ::= TIMEZONE */ - -1, /* (547) noarg_func ::= DATABASE */ - -1, /* (548) noarg_func ::= CLIENT_VERSION */ - -1, /* (549) noarg_func ::= SERVER_VERSION */ - -1, /* (550) noarg_func ::= SERVER_STATUS */ - -1, /* (551) noarg_func ::= CURRENT_USER */ - -1, /* (552) noarg_func ::= USER */ - -1, /* (553) star_func ::= COUNT */ - -1, /* (554) star_func ::= FIRST */ - -1, /* (555) star_func ::= LAST */ - -1, /* (556) star_func ::= LAST_ROW */ - -1, /* (557) star_func_para_list ::= NK_STAR */ - -1, /* (558) star_func_para_list ::= other_para_list */ - -1, /* (559) other_para_list ::= star_func_para */ - -3, /* (560) other_para_list ::= other_para_list NK_COMMA star_func_para */ - -1, /* (561) star_func_para ::= expr_or_subquery */ - -3, /* (562) star_func_para ::= table_name NK_DOT NK_STAR */ - -4, /* (563) case_when_expression ::= CASE when_then_list case_when_else_opt END */ - -5, /* (564) case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ - -1, /* (565) when_then_list ::= when_then_expr */ - -2, /* (566) when_then_list ::= when_then_list when_then_expr */ - -4, /* (567) when_then_expr ::= WHEN common_expression THEN common_expression */ - 0, /* (568) case_when_else_opt ::= */ - -2, /* (569) case_when_else_opt ::= ELSE common_expression */ - -3, /* (570) predicate ::= expr_or_subquery compare_op expr_or_subquery */ - -5, /* (571) predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ - -6, /* (572) predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ - -3, /* (573) predicate ::= expr_or_subquery IS NULL */ - -4, /* (574) predicate ::= expr_or_subquery IS NOT NULL */ - -3, /* (575) predicate ::= expr_or_subquery in_op in_predicate_value */ - -1, /* (576) compare_op ::= NK_LT */ - -1, /* (577) compare_op ::= NK_GT */ - -1, /* (578) compare_op ::= NK_LE */ - -1, /* (579) compare_op ::= NK_GE */ - -1, /* (580) compare_op ::= NK_NE */ - -1, /* (581) compare_op ::= NK_EQ */ - -1, /* (582) compare_op ::= LIKE */ - -2, /* (583) compare_op ::= NOT LIKE */ - -1, /* (584) compare_op ::= MATCH */ - -1, /* (585) compare_op ::= NMATCH */ - -1, /* (586) compare_op ::= CONTAINS */ - -1, /* (587) in_op ::= IN */ - -2, /* (588) in_op ::= NOT IN */ - -3, /* (589) in_predicate_value ::= NK_LP literal_list NK_RP */ - -1, /* (590) boolean_value_expression ::= boolean_primary */ - -2, /* (591) boolean_value_expression ::= NOT boolean_primary */ - -3, /* (592) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ - -3, /* (593) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ - -1, /* (594) boolean_primary ::= predicate */ - -3, /* (595) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ - -1, /* (596) common_expression ::= expr_or_subquery */ - -1, /* (597) common_expression ::= boolean_value_expression */ - 0, /* (598) from_clause_opt ::= */ - -2, /* (599) from_clause_opt ::= FROM table_reference_list */ - -1, /* (600) table_reference_list ::= table_reference */ - -3, /* (601) table_reference_list ::= table_reference_list NK_COMMA table_reference */ - -1, /* (602) table_reference ::= table_primary */ - -1, /* (603) table_reference ::= joined_table */ - -2, /* (604) table_primary ::= table_name alias_opt */ - -4, /* (605) table_primary ::= db_name NK_DOT table_name alias_opt */ - -2, /* (606) table_primary ::= subquery alias_opt */ - -1, /* (607) table_primary ::= parenthesized_joined_table */ - 0, /* (608) alias_opt ::= */ - -1, /* (609) alias_opt ::= table_alias */ - -2, /* (610) alias_opt ::= AS table_alias */ - -3, /* (611) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ - -3, /* (612) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ - -6, /* (613) joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ - 0, /* (614) join_type ::= */ - -1, /* (615) join_type ::= INNER */ - -14, /* (616) 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, /* (617) hint_list ::= */ - -1, /* (618) hint_list ::= NK_HINT */ - 0, /* (619) tag_mode_opt ::= */ - -1, /* (620) tag_mode_opt ::= TAGS */ - 0, /* (621) set_quantifier_opt ::= */ - -1, /* (622) set_quantifier_opt ::= DISTINCT */ - -1, /* (623) set_quantifier_opt ::= ALL */ - -1, /* (624) select_list ::= select_item */ - -3, /* (625) select_list ::= select_list NK_COMMA select_item */ - -1, /* (626) select_item ::= NK_STAR */ - -1, /* (627) select_item ::= common_expression */ - -2, /* (628) select_item ::= common_expression column_alias */ - -3, /* (629) select_item ::= common_expression AS column_alias */ - -3, /* (630) select_item ::= table_name NK_DOT NK_STAR */ - 0, /* (631) where_clause_opt ::= */ - -2, /* (632) where_clause_opt ::= WHERE search_condition */ - 0, /* (633) partition_by_clause_opt ::= */ - -3, /* (634) partition_by_clause_opt ::= PARTITION BY partition_list */ - -1, /* (635) partition_list ::= partition_item */ - -3, /* (636) partition_list ::= partition_list NK_COMMA partition_item */ - -1, /* (637) partition_item ::= expr_or_subquery */ - -2, /* (638) partition_item ::= expr_or_subquery column_alias */ - -3, /* (639) partition_item ::= expr_or_subquery AS column_alias */ - 0, /* (640) twindow_clause_opt ::= */ - -6, /* (641) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP */ - -4, /* (642) twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ - -6, /* (643) twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ - -8, /* (644) twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_COMMA interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ - -7, /* (645) twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ - -4, /* (646) twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_RP */ - -6, /* (647) twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ - 0, /* (648) sliding_opt ::= */ - -4, /* (649) sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP */ - -1, /* (650) interval_sliding_duration_literal ::= NK_VARIABLE */ - -1, /* (651) interval_sliding_duration_literal ::= NK_STRING */ - -1, /* (652) interval_sliding_duration_literal ::= NK_INTEGER */ - 0, /* (653) fill_opt ::= */ - -4, /* (654) fill_opt ::= FILL NK_LP fill_mode NK_RP */ - -6, /* (655) fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP */ - -6, /* (656) fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP */ - -1, /* (657) fill_mode ::= NONE */ - -1, /* (658) fill_mode ::= PREV */ - -1, /* (659) fill_mode ::= NULL */ - -1, /* (660) fill_mode ::= NULL_F */ - -1, /* (661) fill_mode ::= LINEAR */ - -1, /* (662) fill_mode ::= NEXT */ - 0, /* (663) group_by_clause_opt ::= */ - -3, /* (664) group_by_clause_opt ::= GROUP BY group_by_list */ - -1, /* (665) group_by_list ::= expr_or_subquery */ - -3, /* (666) group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ - 0, /* (667) having_clause_opt ::= */ - -2, /* (668) having_clause_opt ::= HAVING search_condition */ - 0, /* (669) range_opt ::= */ - -6, /* (670) range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ - -4, /* (671) range_opt ::= RANGE NK_LP expr_or_subquery NK_RP */ - 0, /* (672) every_opt ::= */ - -4, /* (673) every_opt ::= EVERY NK_LP duration_literal NK_RP */ - -4, /* (674) query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ - -1, /* (675) query_simple ::= query_specification */ - -1, /* (676) query_simple ::= union_query_expression */ - -4, /* (677) union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ - -3, /* (678) union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ - -1, /* (679) query_simple_or_subquery ::= query_simple */ - -1, /* (680) query_simple_or_subquery ::= subquery */ - -1, /* (681) query_or_subquery ::= query_expression */ - -1, /* (682) query_or_subquery ::= subquery */ - 0, /* (683) order_by_clause_opt ::= */ - -3, /* (684) order_by_clause_opt ::= ORDER BY sort_specification_list */ - 0, /* (685) slimit_clause_opt ::= */ - -2, /* (686) slimit_clause_opt ::= SLIMIT NK_INTEGER */ - -4, /* (687) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ - -4, /* (688) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - 0, /* (689) limit_clause_opt ::= */ - -2, /* (690) limit_clause_opt ::= LIMIT NK_INTEGER */ - -4, /* (691) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ - -4, /* (692) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - -3, /* (693) subquery ::= NK_LP query_expression NK_RP */ - -3, /* (694) subquery ::= NK_LP subquery NK_RP */ - -1, /* (695) search_condition ::= common_expression */ - -1, /* (696) sort_specification_list ::= sort_specification */ - -3, /* (697) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ - -3, /* (698) sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ - 0, /* (699) ordering_specification_opt ::= */ - -1, /* (700) ordering_specification_opt ::= ASC */ - -1, /* (701) ordering_specification_opt ::= DESC */ - 0, /* (702) null_ordering_opt ::= */ - -2, /* (703) null_ordering_opt ::= NULLS FIRST */ - -2, /* (704) null_ordering_opt ::= NULLS LAST */ + -3, /* (93) cmd ::= S3MIGRATE DATABASE db_name */ + -5, /* (94) cmd ::= COMPACT DATABASE db_name start_opt end_opt */ + -3, /* (95) not_exists_opt ::= IF NOT EXISTS */ + 0, /* (96) not_exists_opt ::= */ + -2, /* (97) exists_opt ::= IF EXISTS */ + 0, /* (98) exists_opt ::= */ + 0, /* (99) db_options ::= */ + -3, /* (100) db_options ::= db_options BUFFER NK_INTEGER */ + -3, /* (101) db_options ::= db_options CACHEMODEL NK_STRING */ + -3, /* (102) db_options ::= db_options CACHESIZE NK_INTEGER */ + -3, /* (103) db_options ::= db_options COMP NK_INTEGER */ + -3, /* (104) db_options ::= db_options DURATION NK_INTEGER */ + -3, /* (105) db_options ::= db_options DURATION NK_VARIABLE */ + -3, /* (106) db_options ::= db_options MAXROWS NK_INTEGER */ + -3, /* (107) db_options ::= db_options MINROWS NK_INTEGER */ + -3, /* (108) db_options ::= db_options KEEP integer_list */ + -3, /* (109) db_options ::= db_options KEEP variable_list */ + -3, /* (110) db_options ::= db_options PAGES NK_INTEGER */ + -3, /* (111) db_options ::= db_options PAGESIZE NK_INTEGER */ + -3, /* (112) db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */ + -3, /* (113) db_options ::= db_options PRECISION NK_STRING */ + -3, /* (114) db_options ::= db_options REPLICA NK_INTEGER */ + -3, /* (115) db_options ::= db_options VGROUPS NK_INTEGER */ + -3, /* (116) db_options ::= db_options SINGLE_STABLE NK_INTEGER */ + -3, /* (117) db_options ::= db_options RETENTIONS retention_list */ + -3, /* (118) db_options ::= db_options SCHEMALESS NK_INTEGER */ + -3, /* (119) db_options ::= db_options WAL_LEVEL NK_INTEGER */ + -3, /* (120) db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */ + -3, /* (121) db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */ + -4, /* (122) db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ + -3, /* (123) db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */ + -4, /* (124) db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ + -3, /* (125) db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */ + -3, /* (126) db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */ + -3, /* (127) db_options ::= db_options STT_TRIGGER NK_INTEGER */ + -3, /* (128) db_options ::= db_options TABLE_PREFIX signed */ + -3, /* (129) db_options ::= db_options TABLE_SUFFIX signed */ + -3, /* (130) db_options ::= db_options S3_CHUNKSIZE NK_INTEGER */ + -3, /* (131) db_options ::= db_options S3_KEEPLOCAL NK_INTEGER */ + -3, /* (132) db_options ::= db_options S3_KEEPLOCAL NK_VARIABLE */ + -3, /* (133) db_options ::= db_options S3_COMPACT NK_INTEGER */ + -3, /* (134) db_options ::= db_options KEEP_TIME_OFFSET NK_INTEGER */ + -3, /* (135) db_options ::= db_options ENCRYPT_ALGORITHM NK_STRING */ + -1, /* (136) alter_db_options ::= alter_db_option */ + -2, /* (137) alter_db_options ::= alter_db_options alter_db_option */ + -2, /* (138) alter_db_option ::= BUFFER NK_INTEGER */ + -2, /* (139) alter_db_option ::= CACHEMODEL NK_STRING */ + -2, /* (140) alter_db_option ::= CACHESIZE NK_INTEGER */ + -2, /* (141) alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */ + -2, /* (142) alter_db_option ::= KEEP integer_list */ + -2, /* (143) alter_db_option ::= KEEP variable_list */ + -2, /* (144) alter_db_option ::= PAGES NK_INTEGER */ + -2, /* (145) alter_db_option ::= REPLICA NK_INTEGER */ + -2, /* (146) alter_db_option ::= WAL_LEVEL NK_INTEGER */ + -2, /* (147) alter_db_option ::= STT_TRIGGER NK_INTEGER */ + -2, /* (148) alter_db_option ::= MINROWS NK_INTEGER */ + -2, /* (149) alter_db_option ::= WAL_RETENTION_PERIOD NK_INTEGER */ + -3, /* (150) alter_db_option ::= WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ + -2, /* (151) alter_db_option ::= WAL_RETENTION_SIZE NK_INTEGER */ + -3, /* (152) alter_db_option ::= WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ + -2, /* (153) alter_db_option ::= S3_KEEPLOCAL NK_INTEGER */ + -2, /* (154) alter_db_option ::= S3_KEEPLOCAL NK_VARIABLE */ + -2, /* (155) alter_db_option ::= S3_COMPACT NK_INTEGER */ + -2, /* (156) alter_db_option ::= KEEP_TIME_OFFSET NK_INTEGER */ + -2, /* (157) alter_db_option ::= ENCRYPT_ALGORITHM NK_STRING */ + -1, /* (158) integer_list ::= NK_INTEGER */ + -3, /* (159) integer_list ::= integer_list NK_COMMA NK_INTEGER */ + -1, /* (160) variable_list ::= NK_VARIABLE */ + -3, /* (161) variable_list ::= variable_list NK_COMMA NK_VARIABLE */ + -1, /* (162) retention_list ::= retention */ + -3, /* (163) retention_list ::= retention_list NK_COMMA retention */ + -3, /* (164) retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ + -3, /* (165) retention ::= NK_MINUS NK_COLON NK_VARIABLE */ + 0, /* (166) speed_opt ::= */ + -2, /* (167) speed_opt ::= BWLIMIT NK_INTEGER */ + 0, /* (168) start_opt ::= */ + -3, /* (169) start_opt ::= START WITH NK_INTEGER */ + -3, /* (170) start_opt ::= START WITH NK_STRING */ + -4, /* (171) start_opt ::= START WITH TIMESTAMP NK_STRING */ + 0, /* (172) end_opt ::= */ + -3, /* (173) end_opt ::= END WITH NK_INTEGER */ + -3, /* (174) end_opt ::= END WITH NK_STRING */ + -4, /* (175) end_opt ::= END WITH TIMESTAMP NK_STRING */ + -9, /* (176) cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ + -3, /* (177) cmd ::= CREATE TABLE multi_create_clause */ + -9, /* (178) cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ + -3, /* (179) cmd ::= DROP TABLE multi_drop_clause */ + -4, /* (180) cmd ::= DROP STABLE exists_opt full_table_name */ + -3, /* (181) cmd ::= ALTER TABLE alter_table_clause */ + -3, /* (182) cmd ::= ALTER STABLE alter_table_clause */ + -2, /* (183) alter_table_clause ::= full_table_name alter_table_options */ + -5, /* (184) alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ + -4, /* (185) alter_table_clause ::= full_table_name DROP COLUMN column_name */ + -5, /* (186) alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ + -5, /* (187) alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ + -5, /* (188) alter_table_clause ::= full_table_name ADD TAG column_name type_name */ + -4, /* (189) alter_table_clause ::= full_table_name DROP TAG column_name */ + -5, /* (190) alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ + -5, /* (191) alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ + -6, /* (192) alter_table_clause ::= full_table_name SET TAG column_name NK_EQ tags_literal */ + -1, /* (193) multi_create_clause ::= create_subtable_clause */ + -2, /* (194) multi_create_clause ::= multi_create_clause create_subtable_clause */ + -10, /* (195) 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, /* (196) multi_drop_clause ::= drop_table_clause */ + -3, /* (197) multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause */ + -2, /* (198) drop_table_clause ::= exists_opt full_table_name */ + 0, /* (199) specific_cols_opt ::= */ + -3, /* (200) specific_cols_opt ::= NK_LP col_name_list NK_RP */ + -1, /* (201) full_table_name ::= table_name */ + -3, /* (202) full_table_name ::= db_name NK_DOT table_name */ + -1, /* (203) column_def_list ::= column_def */ + -3, /* (204) column_def_list ::= column_def_list NK_COMMA column_def */ + -2, /* (205) column_def ::= column_name type_name */ + -4, /* (206) column_def ::= column_name type_name PRIMARY KEY */ + -1, /* (207) type_name ::= BOOL */ + -1, /* (208) type_name ::= TINYINT */ + -1, /* (209) type_name ::= SMALLINT */ + -1, /* (210) type_name ::= INT */ + -1, /* (211) type_name ::= INTEGER */ + -1, /* (212) type_name ::= BIGINT */ + -1, /* (213) type_name ::= FLOAT */ + -1, /* (214) type_name ::= DOUBLE */ + -4, /* (215) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ + -1, /* (216) type_name ::= TIMESTAMP */ + -4, /* (217) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ + -2, /* (218) type_name ::= TINYINT UNSIGNED */ + -2, /* (219) type_name ::= SMALLINT UNSIGNED */ + -2, /* (220) type_name ::= INT UNSIGNED */ + -2, /* (221) type_name ::= BIGINT UNSIGNED */ + -1, /* (222) type_name ::= JSON */ + -4, /* (223) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ + -1, /* (224) type_name ::= MEDIUMBLOB */ + -1, /* (225) type_name ::= BLOB */ + -4, /* (226) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ + -4, /* (227) type_name ::= GEOMETRY NK_LP NK_INTEGER NK_RP */ + -1, /* (228) type_name ::= DECIMAL */ + -4, /* (229) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ + -6, /* (230) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ + -1, /* (231) type_name_default_len ::= BINARY */ + -1, /* (232) type_name_default_len ::= NCHAR */ + -1, /* (233) type_name_default_len ::= VARCHAR */ + -1, /* (234) type_name_default_len ::= VARBINARY */ + 0, /* (235) tags_def_opt ::= */ + -1, /* (236) tags_def_opt ::= tags_def */ + -4, /* (237) tags_def ::= TAGS NK_LP column_def_list NK_RP */ + 0, /* (238) table_options ::= */ + -3, /* (239) table_options ::= table_options COMMENT NK_STRING */ + -3, /* (240) table_options ::= table_options MAX_DELAY duration_list */ + -3, /* (241) table_options ::= table_options WATERMARK duration_list */ + -5, /* (242) table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ + -3, /* (243) table_options ::= table_options TTL NK_INTEGER */ + -5, /* (244) table_options ::= table_options SMA NK_LP col_name_list NK_RP */ + -3, /* (245) table_options ::= table_options DELETE_MARK duration_list */ + -1, /* (246) alter_table_options ::= alter_table_option */ + -2, /* (247) alter_table_options ::= alter_table_options alter_table_option */ + -2, /* (248) alter_table_option ::= COMMENT NK_STRING */ + -2, /* (249) alter_table_option ::= TTL NK_INTEGER */ + -1, /* (250) duration_list ::= duration_literal */ + -3, /* (251) duration_list ::= duration_list NK_COMMA duration_literal */ + -1, /* (252) rollup_func_list ::= rollup_func_name */ + -3, /* (253) rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ + -1, /* (254) rollup_func_name ::= function_name */ + -1, /* (255) rollup_func_name ::= FIRST */ + -1, /* (256) rollup_func_name ::= LAST */ + -1, /* (257) col_name_list ::= col_name */ + -3, /* (258) col_name_list ::= col_name_list NK_COMMA col_name */ + -1, /* (259) col_name ::= column_name */ + -2, /* (260) cmd ::= SHOW DNODES */ + -2, /* (261) cmd ::= SHOW USERS */ + -3, /* (262) cmd ::= SHOW USER PRIVILEGES */ + -3, /* (263) cmd ::= SHOW db_kind_opt DATABASES */ + -4, /* (264) cmd ::= SHOW table_kind_db_name_cond_opt TABLES like_pattern_opt */ + -4, /* (265) cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ + -3, /* (266) cmd ::= SHOW db_name_cond_opt VGROUPS */ + -2, /* (267) cmd ::= SHOW MNODES */ + -2, /* (268) cmd ::= SHOW QNODES */ + -2, /* (269) cmd ::= SHOW ARBGROUPS */ + -2, /* (270) cmd ::= SHOW FUNCTIONS */ + -5, /* (271) cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ + -6, /* (272) cmd ::= SHOW INDEXES FROM db_name NK_DOT table_name */ + -2, /* (273) cmd ::= SHOW STREAMS */ + -2, /* (274) cmd ::= SHOW ACCOUNTS */ + -2, /* (275) cmd ::= SHOW APPS */ + -2, /* (276) cmd ::= SHOW CONNECTIONS */ + -2, /* (277) cmd ::= SHOW LICENCES */ + -2, /* (278) cmd ::= SHOW GRANTS */ + -3, /* (279) cmd ::= SHOW GRANTS FULL */ + -3, /* (280) cmd ::= SHOW GRANTS LOGS */ + -3, /* (281) cmd ::= SHOW CLUSTER MACHINES */ + -4, /* (282) cmd ::= SHOW CREATE DATABASE db_name */ + -4, /* (283) cmd ::= SHOW CREATE TABLE full_table_name */ + -4, /* (284) cmd ::= SHOW CREATE STABLE full_table_name */ + -2, /* (285) cmd ::= SHOW ENCRYPTIONS */ + -2, /* (286) cmd ::= SHOW QUERIES */ + -2, /* (287) cmd ::= SHOW SCORES */ + -2, /* (288) cmd ::= SHOW TOPICS */ + -2, /* (289) cmd ::= SHOW VARIABLES */ + -3, /* (290) cmd ::= SHOW CLUSTER VARIABLES */ + -3, /* (291) cmd ::= SHOW LOCAL VARIABLES */ + -5, /* (292) cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */ + -2, /* (293) cmd ::= SHOW BNODES */ + -2, /* (294) cmd ::= SHOW SNODES */ + -2, /* (295) cmd ::= SHOW CLUSTER */ + -2, /* (296) cmd ::= SHOW TRANSACTIONS */ + -4, /* (297) cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ + -2, /* (298) cmd ::= SHOW CONSUMERS */ + -2, /* (299) cmd ::= SHOW SUBSCRIPTIONS */ + -5, /* (300) cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ + -6, /* (301) cmd ::= SHOW TAGS FROM db_name NK_DOT table_name */ + -7, /* (302) cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ + -8, /* (303) cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name */ + -5, /* (304) cmd ::= SHOW VNODES ON DNODE NK_INTEGER */ + -2, /* (305) cmd ::= SHOW VNODES */ + -3, /* (306) cmd ::= SHOW db_name_cond_opt ALIVE */ + -3, /* (307) cmd ::= SHOW CLUSTER ALIVE */ + -4, /* (308) cmd ::= SHOW db_name_cond_opt VIEWS like_pattern_opt */ + -4, /* (309) cmd ::= SHOW CREATE VIEW full_table_name */ + -2, /* (310) cmd ::= SHOW COMPACTS */ + -3, /* (311) cmd ::= SHOW COMPACT NK_INTEGER */ + 0, /* (312) table_kind_db_name_cond_opt ::= */ + -1, /* (313) table_kind_db_name_cond_opt ::= table_kind */ + -2, /* (314) table_kind_db_name_cond_opt ::= db_name NK_DOT */ + -3, /* (315) table_kind_db_name_cond_opt ::= table_kind db_name NK_DOT */ + -1, /* (316) table_kind ::= NORMAL */ + -1, /* (317) table_kind ::= CHILD */ + 0, /* (318) db_name_cond_opt ::= */ + -2, /* (319) db_name_cond_opt ::= db_name NK_DOT */ + 0, /* (320) like_pattern_opt ::= */ + -2, /* (321) like_pattern_opt ::= LIKE NK_STRING */ + -1, /* (322) table_name_cond ::= table_name */ + 0, /* (323) from_db_opt ::= */ + -2, /* (324) from_db_opt ::= FROM db_name */ + 0, /* (325) tag_list_opt ::= */ + -1, /* (326) tag_list_opt ::= tag_item */ + -3, /* (327) tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ + -1, /* (328) tag_item ::= TBNAME */ + -1, /* (329) tag_item ::= QTAGS */ + -1, /* (330) tag_item ::= column_name */ + -2, /* (331) tag_item ::= column_name column_alias */ + -3, /* (332) tag_item ::= column_name AS column_alias */ + 0, /* (333) db_kind_opt ::= */ + -1, /* (334) db_kind_opt ::= USER */ + -1, /* (335) db_kind_opt ::= SYSTEM */ + -8, /* (336) cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options */ + -9, /* (337) cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP */ + -4, /* (338) cmd ::= DROP INDEX exists_opt full_index_name */ + -1, /* (339) full_index_name ::= index_name */ + -3, /* (340) full_index_name ::= db_name NK_DOT index_name */ + -10, /* (341) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ + -12, /* (342) 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, /* (343) func_list ::= func */ + -3, /* (344) func_list ::= func_list NK_COMMA func */ + -4, /* (345) func ::= sma_func_name NK_LP expression_list NK_RP */ + -1, /* (346) sma_func_name ::= function_name */ + -1, /* (347) sma_func_name ::= COUNT */ + -1, /* (348) sma_func_name ::= FIRST */ + -1, /* (349) sma_func_name ::= LAST */ + -1, /* (350) sma_func_name ::= LAST_ROW */ + 0, /* (351) sma_stream_opt ::= */ + -3, /* (352) sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ + -3, /* (353) sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ + -3, /* (354) sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ + -1, /* (355) with_meta ::= AS */ + -3, /* (356) with_meta ::= WITH META AS */ + -3, /* (357) with_meta ::= ONLY META AS */ + -6, /* (358) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ + -7, /* (359) cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name */ + -8, /* (360) cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt */ + -4, /* (361) cmd ::= DROP TOPIC exists_opt topic_name */ + -7, /* (362) cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ + -2, /* (363) cmd ::= DESC full_table_name */ + -2, /* (364) cmd ::= DESCRIBE full_table_name */ + -3, /* (365) cmd ::= RESET QUERY CACHE */ + -4, /* (366) cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ + -4, /* (367) cmd ::= EXPLAIN analyze_opt explain_options insert_query */ + 0, /* (368) analyze_opt ::= */ + -1, /* (369) analyze_opt ::= ANALYZE */ + 0, /* (370) explain_options ::= */ + -3, /* (371) explain_options ::= explain_options VERBOSE NK_BOOL */ + -3, /* (372) explain_options ::= explain_options RATIO NK_FLOAT */ + -12, /* (373) 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, /* (374) cmd ::= DROP FUNCTION exists_opt function_name */ + 0, /* (375) agg_func_opt ::= */ + -1, /* (376) agg_func_opt ::= AGGREGATE */ + 0, /* (377) bufsize_opt ::= */ + -2, /* (378) bufsize_opt ::= BUFSIZE NK_INTEGER */ + 0, /* (379) language_opt ::= */ + -2, /* (380) language_opt ::= LANGUAGE NK_STRING */ + 0, /* (381) or_replace_opt ::= */ + -2, /* (382) or_replace_opt ::= OR REPLACE */ + -6, /* (383) cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery */ + -4, /* (384) cmd ::= DROP VIEW exists_opt full_view_name */ + -1, /* (385) full_view_name ::= view_name */ + -3, /* (386) full_view_name ::= db_name NK_DOT view_name */ + -12, /* (387) 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, /* (388) cmd ::= DROP STREAM exists_opt stream_name */ + -4, /* (389) cmd ::= PAUSE STREAM exists_opt stream_name */ + -5, /* (390) cmd ::= RESUME STREAM exists_opt ignore_opt stream_name */ + 0, /* (391) col_list_opt ::= */ + -3, /* (392) col_list_opt ::= NK_LP column_stream_def_list NK_RP */ + -1, /* (393) column_stream_def_list ::= column_stream_def */ + -3, /* (394) column_stream_def_list ::= column_stream_def_list NK_COMMA column_stream_def */ + -1, /* (395) column_stream_def ::= column_name */ + -3, /* (396) column_stream_def ::= column_name PRIMARY KEY */ + 0, /* (397) tag_def_or_ref_opt ::= */ + -1, /* (398) tag_def_or_ref_opt ::= tags_def */ + -4, /* (399) tag_def_or_ref_opt ::= TAGS NK_LP column_stream_def_list NK_RP */ + 0, /* (400) stream_options ::= */ + -3, /* (401) stream_options ::= stream_options TRIGGER AT_ONCE */ + -3, /* (402) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ + -4, /* (403) stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ + -3, /* (404) stream_options ::= stream_options WATERMARK duration_literal */ + -4, /* (405) stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ + -3, /* (406) stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ + -3, /* (407) stream_options ::= stream_options DELETE_MARK duration_literal */ + -4, /* (408) stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */ + 0, /* (409) subtable_opt ::= */ + -4, /* (410) subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ + 0, /* (411) ignore_opt ::= */ + -2, /* (412) ignore_opt ::= IGNORE UNTREATED */ + -3, /* (413) cmd ::= KILL CONNECTION NK_INTEGER */ + -3, /* (414) cmd ::= KILL QUERY NK_STRING */ + -3, /* (415) cmd ::= KILL TRANSACTION NK_INTEGER */ + -3, /* (416) cmd ::= KILL COMPACT NK_INTEGER */ + -2, /* (417) cmd ::= BALANCE VGROUP */ + -4, /* (418) cmd ::= BALANCE VGROUP LEADER on_vgroup_id */ + -4, /* (419) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ + -4, /* (420) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ + -3, /* (421) cmd ::= SPLIT VGROUP NK_INTEGER */ + 0, /* (422) on_vgroup_id ::= */ + -2, /* (423) on_vgroup_id ::= ON NK_INTEGER */ + -2, /* (424) dnode_list ::= DNODE NK_INTEGER */ + -3, /* (425) dnode_list ::= dnode_list DNODE NK_INTEGER */ + -4, /* (426) cmd ::= DELETE FROM full_table_name where_clause_opt */ + -1, /* (427) cmd ::= query_or_subquery */ + -1, /* (428) cmd ::= insert_query */ + -7, /* (429) insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ + -4, /* (430) insert_query ::= INSERT INTO full_table_name query_or_subquery */ + -1, /* (431) tags_literal ::= NK_INTEGER */ + -3, /* (432) tags_literal ::= NK_INTEGER NK_PLUS duration_literal */ + -3, /* (433) tags_literal ::= NK_INTEGER NK_MINUS duration_literal */ + -2, /* (434) tags_literal ::= NK_PLUS NK_INTEGER */ + -4, /* (435) tags_literal ::= NK_PLUS NK_INTEGER NK_PLUS duration_literal */ + -4, /* (436) tags_literal ::= NK_PLUS NK_INTEGER NK_MINUS duration_literal */ + -2, /* (437) tags_literal ::= NK_MINUS NK_INTEGER */ + -4, /* (438) tags_literal ::= NK_MINUS NK_INTEGER NK_PLUS duration_literal */ + -4, /* (439) tags_literal ::= NK_MINUS NK_INTEGER NK_MINUS duration_literal */ + -1, /* (440) tags_literal ::= NK_FLOAT */ + -2, /* (441) tags_literal ::= NK_PLUS NK_FLOAT */ + -2, /* (442) tags_literal ::= NK_MINUS NK_FLOAT */ + -1, /* (443) tags_literal ::= NK_BIN */ + -3, /* (444) tags_literal ::= NK_BIN NK_PLUS duration_literal */ + -3, /* (445) tags_literal ::= NK_BIN NK_MINUS duration_literal */ + -2, /* (446) tags_literal ::= NK_PLUS NK_BIN */ + -4, /* (447) tags_literal ::= NK_PLUS NK_BIN NK_PLUS duration_literal */ + -4, /* (448) tags_literal ::= NK_PLUS NK_BIN NK_MINUS duration_literal */ + -2, /* (449) tags_literal ::= NK_MINUS NK_BIN */ + -4, /* (450) tags_literal ::= NK_MINUS NK_BIN NK_PLUS duration_literal */ + -4, /* (451) tags_literal ::= NK_MINUS NK_BIN NK_MINUS duration_literal */ + -1, /* (452) tags_literal ::= NK_HEX */ + -3, /* (453) tags_literal ::= NK_HEX NK_PLUS duration_literal */ + -3, /* (454) tags_literal ::= NK_HEX NK_MINUS duration_literal */ + -2, /* (455) tags_literal ::= NK_PLUS NK_HEX */ + -4, /* (456) tags_literal ::= NK_PLUS NK_HEX NK_PLUS duration_literal */ + -4, /* (457) tags_literal ::= NK_PLUS NK_HEX NK_MINUS duration_literal */ + -2, /* (458) tags_literal ::= NK_MINUS NK_HEX */ + -4, /* (459) tags_literal ::= NK_MINUS NK_HEX NK_PLUS duration_literal */ + -4, /* (460) tags_literal ::= NK_MINUS NK_HEX NK_MINUS duration_literal */ + -1, /* (461) tags_literal ::= NK_STRING */ + -3, /* (462) tags_literal ::= NK_STRING NK_PLUS duration_literal */ + -3, /* (463) tags_literal ::= NK_STRING NK_MINUS duration_literal */ + -1, /* (464) tags_literal ::= NK_BOOL */ + -1, /* (465) tags_literal ::= NULL */ + -1, /* (466) tags_literal ::= literal_func */ + -3, /* (467) tags_literal ::= literal_func NK_PLUS duration_literal */ + -3, /* (468) tags_literal ::= literal_func NK_MINUS duration_literal */ + -1, /* (469) tags_literal_list ::= tags_literal */ + -3, /* (470) tags_literal_list ::= tags_literal_list NK_COMMA tags_literal */ + -1, /* (471) literal ::= NK_INTEGER */ + -1, /* (472) literal ::= NK_FLOAT */ + -1, /* (473) literal ::= NK_STRING */ + -1, /* (474) literal ::= NK_BOOL */ + -2, /* (475) literal ::= TIMESTAMP NK_STRING */ + -1, /* (476) literal ::= duration_literal */ + -1, /* (477) literal ::= NULL */ + -1, /* (478) literal ::= NK_QUESTION */ + -1, /* (479) duration_literal ::= NK_VARIABLE */ + -1, /* (480) signed ::= NK_INTEGER */ + -2, /* (481) signed ::= NK_PLUS NK_INTEGER */ + -2, /* (482) signed ::= NK_MINUS NK_INTEGER */ + -1, /* (483) signed ::= NK_FLOAT */ + -2, /* (484) signed ::= NK_PLUS NK_FLOAT */ + -2, /* (485) signed ::= NK_MINUS NK_FLOAT */ + -1, /* (486) signed_literal ::= signed */ + -1, /* (487) signed_literal ::= NK_STRING */ + -1, /* (488) signed_literal ::= NK_BOOL */ + -2, /* (489) signed_literal ::= TIMESTAMP NK_STRING */ + -1, /* (490) signed_literal ::= duration_literal */ + -1, /* (491) signed_literal ::= NULL */ + -1, /* (492) signed_literal ::= literal_func */ + -1, /* (493) signed_literal ::= NK_QUESTION */ + -1, /* (494) literal_list ::= signed_literal */ + -3, /* (495) literal_list ::= literal_list NK_COMMA signed_literal */ + -1, /* (496) db_name ::= NK_ID */ + -1, /* (497) table_name ::= NK_ID */ + -1, /* (498) column_name ::= NK_ID */ + -1, /* (499) function_name ::= NK_ID */ + -1, /* (500) view_name ::= NK_ID */ + -1, /* (501) table_alias ::= NK_ID */ + -1, /* (502) column_alias ::= NK_ID */ + -1, /* (503) column_alias ::= NK_ALIAS */ + -1, /* (504) user_name ::= NK_ID */ + -1, /* (505) topic_name ::= NK_ID */ + -1, /* (506) stream_name ::= NK_ID */ + -1, /* (507) cgroup_name ::= NK_ID */ + -1, /* (508) index_name ::= NK_ID */ + -1, /* (509) expr_or_subquery ::= expression */ + -1, /* (510) expression ::= literal */ + -1, /* (511) expression ::= pseudo_column */ + -1, /* (512) expression ::= column_reference */ + -1, /* (513) expression ::= function_expression */ + -1, /* (514) expression ::= case_when_expression */ + -3, /* (515) expression ::= NK_LP expression NK_RP */ + -2, /* (516) expression ::= NK_PLUS expr_or_subquery */ + -2, /* (517) expression ::= NK_MINUS expr_or_subquery */ + -3, /* (518) expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ + -3, /* (519) expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ + -3, /* (520) expression ::= expr_or_subquery NK_STAR expr_or_subquery */ + -3, /* (521) expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ + -3, /* (522) expression ::= expr_or_subquery NK_REM expr_or_subquery */ + -3, /* (523) expression ::= column_reference NK_ARROW NK_STRING */ + -3, /* (524) expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ + -3, /* (525) expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ + -1, /* (526) expression_list ::= expr_or_subquery */ + -3, /* (527) expression_list ::= expression_list NK_COMMA expr_or_subquery */ + -1, /* (528) column_reference ::= column_name */ + -3, /* (529) column_reference ::= table_name NK_DOT column_name */ + -1, /* (530) column_reference ::= NK_ALIAS */ + -3, /* (531) column_reference ::= table_name NK_DOT NK_ALIAS */ + -1, /* (532) pseudo_column ::= ROWTS */ + -1, /* (533) pseudo_column ::= TBNAME */ + -3, /* (534) pseudo_column ::= table_name NK_DOT TBNAME */ + -1, /* (535) pseudo_column ::= QSTART */ + -1, /* (536) pseudo_column ::= QEND */ + -1, /* (537) pseudo_column ::= QDURATION */ + -1, /* (538) pseudo_column ::= WSTART */ + -1, /* (539) pseudo_column ::= WEND */ + -1, /* (540) pseudo_column ::= WDURATION */ + -1, /* (541) pseudo_column ::= IROWTS */ + -1, /* (542) pseudo_column ::= ISFILLED */ + -1, /* (543) pseudo_column ::= QTAGS */ + -4, /* (544) function_expression ::= function_name NK_LP expression_list NK_RP */ + -4, /* (545) function_expression ::= star_func NK_LP star_func_para_list NK_RP */ + -6, /* (546) function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ + -6, /* (547) function_expression ::= CAST NK_LP expr_or_subquery AS type_name_default_len NK_RP */ + -1, /* (548) function_expression ::= literal_func */ + -3, /* (549) literal_func ::= noarg_func NK_LP NK_RP */ + -1, /* (550) literal_func ::= NOW */ + -1, /* (551) literal_func ::= TODAY */ + -1, /* (552) noarg_func ::= NOW */ + -1, /* (553) noarg_func ::= TODAY */ + -1, /* (554) noarg_func ::= TIMEZONE */ + -1, /* (555) noarg_func ::= DATABASE */ + -1, /* (556) noarg_func ::= CLIENT_VERSION */ + -1, /* (557) noarg_func ::= SERVER_VERSION */ + -1, /* (558) noarg_func ::= SERVER_STATUS */ + -1, /* (559) noarg_func ::= CURRENT_USER */ + -1, /* (560) noarg_func ::= USER */ + -1, /* (561) star_func ::= COUNT */ + -1, /* (562) star_func ::= FIRST */ + -1, /* (563) star_func ::= LAST */ + -1, /* (564) star_func ::= LAST_ROW */ + -1, /* (565) star_func_para_list ::= NK_STAR */ + -1, /* (566) star_func_para_list ::= other_para_list */ + -1, /* (567) other_para_list ::= star_func_para */ + -3, /* (568) other_para_list ::= other_para_list NK_COMMA star_func_para */ + -1, /* (569) star_func_para ::= expr_or_subquery */ + -3, /* (570) star_func_para ::= table_name NK_DOT NK_STAR */ + -4, /* (571) case_when_expression ::= CASE when_then_list case_when_else_opt END */ + -5, /* (572) case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ + -1, /* (573) when_then_list ::= when_then_expr */ + -2, /* (574) when_then_list ::= when_then_list when_then_expr */ + -4, /* (575) when_then_expr ::= WHEN common_expression THEN common_expression */ + 0, /* (576) case_when_else_opt ::= */ + -2, /* (577) case_when_else_opt ::= ELSE common_expression */ + -3, /* (578) predicate ::= expr_or_subquery compare_op expr_or_subquery */ + -5, /* (579) predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ + -6, /* (580) predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ + -3, /* (581) predicate ::= expr_or_subquery IS NULL */ + -4, /* (582) predicate ::= expr_or_subquery IS NOT NULL */ + -3, /* (583) predicate ::= expr_or_subquery in_op in_predicate_value */ + -1, /* (584) compare_op ::= NK_LT */ + -1, /* (585) compare_op ::= NK_GT */ + -1, /* (586) compare_op ::= NK_LE */ + -1, /* (587) compare_op ::= NK_GE */ + -1, /* (588) compare_op ::= NK_NE */ + -1, /* (589) compare_op ::= NK_EQ */ + -1, /* (590) compare_op ::= LIKE */ + -2, /* (591) compare_op ::= NOT LIKE */ + -1, /* (592) compare_op ::= MATCH */ + -1, /* (593) compare_op ::= NMATCH */ + -1, /* (594) compare_op ::= CONTAINS */ + -1, /* (595) in_op ::= IN */ + -2, /* (596) in_op ::= NOT IN */ + -3, /* (597) in_predicate_value ::= NK_LP literal_list NK_RP */ + -1, /* (598) boolean_value_expression ::= boolean_primary */ + -2, /* (599) boolean_value_expression ::= NOT boolean_primary */ + -3, /* (600) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ + -3, /* (601) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ + -1, /* (602) boolean_primary ::= predicate */ + -3, /* (603) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ + -1, /* (604) common_expression ::= expr_or_subquery */ + -1, /* (605) common_expression ::= boolean_value_expression */ + 0, /* (606) from_clause_opt ::= */ + -2, /* (607) from_clause_opt ::= FROM table_reference_list */ + -1, /* (608) table_reference_list ::= table_reference */ + -3, /* (609) table_reference_list ::= table_reference_list NK_COMMA table_reference */ + -1, /* (610) table_reference ::= table_primary */ + -1, /* (611) table_reference ::= joined_table */ + -2, /* (612) table_primary ::= table_name alias_opt */ + -4, /* (613) table_primary ::= db_name NK_DOT table_name alias_opt */ + -2, /* (614) table_primary ::= subquery alias_opt */ + -1, /* (615) table_primary ::= parenthesized_joined_table */ + 0, /* (616) alias_opt ::= */ + -1, /* (617) alias_opt ::= table_alias */ + -2, /* (618) alias_opt ::= AS table_alias */ + -3, /* (619) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ + -3, /* (620) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ + -6, /* (621) joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ + 0, /* (622) join_type ::= */ + -1, /* (623) join_type ::= INNER */ + -14, /* (624) 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, /* (625) hint_list ::= */ + -1, /* (626) hint_list ::= NK_HINT */ + 0, /* (627) tag_mode_opt ::= */ + -1, /* (628) tag_mode_opt ::= TAGS */ + 0, /* (629) set_quantifier_opt ::= */ + -1, /* (630) set_quantifier_opt ::= DISTINCT */ + -1, /* (631) set_quantifier_opt ::= ALL */ + -1, /* (632) select_list ::= select_item */ + -3, /* (633) select_list ::= select_list NK_COMMA select_item */ + -1, /* (634) select_item ::= NK_STAR */ + -1, /* (635) select_item ::= common_expression */ + -2, /* (636) select_item ::= common_expression column_alias */ + -3, /* (637) select_item ::= common_expression AS column_alias */ + -3, /* (638) select_item ::= table_name NK_DOT NK_STAR */ + 0, /* (639) where_clause_opt ::= */ + -2, /* (640) where_clause_opt ::= WHERE search_condition */ + 0, /* (641) partition_by_clause_opt ::= */ + -3, /* (642) partition_by_clause_opt ::= PARTITION BY partition_list */ + -1, /* (643) partition_list ::= partition_item */ + -3, /* (644) partition_list ::= partition_list NK_COMMA partition_item */ + -1, /* (645) partition_item ::= expr_or_subquery */ + -2, /* (646) partition_item ::= expr_or_subquery column_alias */ + -3, /* (647) partition_item ::= expr_or_subquery AS column_alias */ + 0, /* (648) twindow_clause_opt ::= */ + -6, /* (649) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP */ + -4, /* (650) twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ + -6, /* (651) twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ + -8, /* (652) twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_COMMA interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ + -7, /* (653) twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ + -4, /* (654) twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_RP */ + -6, /* (655) twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ + 0, /* (656) sliding_opt ::= */ + -4, /* (657) sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP */ + -1, /* (658) interval_sliding_duration_literal ::= NK_VARIABLE */ + -1, /* (659) interval_sliding_duration_literal ::= NK_STRING */ + -1, /* (660) interval_sliding_duration_literal ::= NK_INTEGER */ + 0, /* (661) fill_opt ::= */ + -4, /* (662) fill_opt ::= FILL NK_LP fill_mode NK_RP */ + -6, /* (663) fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP */ + -6, /* (664) fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP */ + -1, /* (665) fill_mode ::= NONE */ + -1, /* (666) fill_mode ::= PREV */ + -1, /* (667) fill_mode ::= NULL */ + -1, /* (668) fill_mode ::= NULL_F */ + -1, /* (669) fill_mode ::= LINEAR */ + -1, /* (670) fill_mode ::= NEXT */ + 0, /* (671) group_by_clause_opt ::= */ + -3, /* (672) group_by_clause_opt ::= GROUP BY group_by_list */ + -1, /* (673) group_by_list ::= expr_or_subquery */ + -3, /* (674) group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ + 0, /* (675) having_clause_opt ::= */ + -2, /* (676) having_clause_opt ::= HAVING search_condition */ + 0, /* (677) range_opt ::= */ + -6, /* (678) range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ + -4, /* (679) range_opt ::= RANGE NK_LP expr_or_subquery NK_RP */ + 0, /* (680) every_opt ::= */ + -4, /* (681) every_opt ::= EVERY NK_LP duration_literal NK_RP */ + -4, /* (682) query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ + -1, /* (683) query_simple ::= query_specification */ + -1, /* (684) query_simple ::= union_query_expression */ + -4, /* (685) union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ + -3, /* (686) union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ + -1, /* (687) query_simple_or_subquery ::= query_simple */ + -1, /* (688) query_simple_or_subquery ::= subquery */ + -1, /* (689) query_or_subquery ::= query_expression */ + -1, /* (690) query_or_subquery ::= subquery */ + 0, /* (691) order_by_clause_opt ::= */ + -3, /* (692) order_by_clause_opt ::= ORDER BY sort_specification_list */ + 0, /* (693) slimit_clause_opt ::= */ + -2, /* (694) slimit_clause_opt ::= SLIMIT NK_INTEGER */ + -4, /* (695) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ + -4, /* (696) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + 0, /* (697) limit_clause_opt ::= */ + -2, /* (698) limit_clause_opt ::= LIMIT NK_INTEGER */ + -4, /* (699) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ + -4, /* (700) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + -3, /* (701) subquery ::= NK_LP query_expression NK_RP */ + -3, /* (702) subquery ::= NK_LP subquery NK_RP */ + -1, /* (703) search_condition ::= common_expression */ + -1, /* (704) sort_specification_list ::= sort_specification */ + -3, /* (705) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ + -3, /* (706) sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ + 0, /* (707) ordering_specification_opt ::= */ + -1, /* (708) ordering_specification_opt ::= ASC */ + -1, /* (709) ordering_specification_opt ::= DESC */ + 0, /* (710) null_ordering_opt ::= */ + -2, /* (711) null_ordering_opt ::= NULLS FIRST */ + -2, /* (712) null_ordering_opt ::= NULLS LAST */ }; static void yy_accept(yyParser*); /* Forward Declaration */ @@ -4983,11 +5018,11 @@ static YYACTIONTYPE yy_reduce( YYMINORTYPE yylhsminor; case 0: /* cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */ { pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); } - yy_destructor(yypParser,359,&yymsp[0].minor); + yy_destructor(yypParser,363,&yymsp[0].minor); break; case 1: /* cmd ::= ALTER ACCOUNT NK_ID alter_account_options */ { pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); } - yy_destructor(yypParser,360,&yymsp[0].minor); + yy_destructor(yypParser,364,&yymsp[0].minor); break; case 2: /* account_options ::= */ { } @@ -5001,20 +5036,20 @@ static YYACTIONTYPE yy_reduce( case 9: /* account_options ::= account_options USERS literal */ yytestcase(yyruleno==9); case 10: /* account_options ::= account_options CONNS literal */ yytestcase(yyruleno==10); case 11: /* account_options ::= account_options STATE literal */ yytestcase(yyruleno==11); -{ yy_destructor(yypParser,359,&yymsp[-2].minor); +{ yy_destructor(yypParser,363,&yymsp[-2].minor); { } - yy_destructor(yypParser,361,&yymsp[0].minor); + yy_destructor(yypParser,365,&yymsp[0].minor); } break; case 12: /* alter_account_options ::= alter_account_option */ -{ yy_destructor(yypParser,362,&yymsp[0].minor); +{ yy_destructor(yypParser,366,&yymsp[0].minor); { } } break; case 13: /* alter_account_options ::= alter_account_options alter_account_option */ -{ yy_destructor(yypParser,360,&yymsp[-1].minor); +{ yy_destructor(yypParser,364,&yymsp[-1].minor); { } - yy_destructor(yypParser,362,&yymsp[0].minor); + yy_destructor(yypParser,366,&yymsp[0].minor); } break; case 14: /* alter_account_option ::= PASS literal */ @@ -5028,157 +5063,157 @@ static YYACTIONTYPE yy_reduce( case 22: /* alter_account_option ::= CONNS literal */ yytestcase(yyruleno==22); case 23: /* alter_account_option ::= STATE literal */ yytestcase(yyruleno==23); { } - yy_destructor(yypParser,361,&yymsp[0].minor); + yy_destructor(yypParser,365,&yymsp[0].minor); break; case 24: /* ip_range_list ::= NK_STRING */ -{ yylhsminor.yy72 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy72 = yylhsminor.yy72; +{ yylhsminor.yy376 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy376 = yylhsminor.yy376; break; case 25: /* ip_range_list ::= ip_range_list NK_COMMA NK_STRING */ -{ yylhsminor.yy72 = addNodeToList(pCxt, yymsp[-2].minor.yy72, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } - yymsp[-2].minor.yy72 = yylhsminor.yy72; +{ yylhsminor.yy376 = addNodeToList(pCxt, yymsp[-2].minor.yy376, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } + yymsp[-2].minor.yy376 = yylhsminor.yy376; break; case 26: /* white_list ::= HOST ip_range_list */ -{ yymsp[-1].minor.yy72 = yymsp[0].minor.yy72; } +{ yymsp[-1].minor.yy376 = yymsp[0].minor.yy376; } break; case 27: /* white_list_opt ::= */ - case 191: /* specific_cols_opt ::= */ yytestcase(yyruleno==191); - case 227: /* tags_def_opt ::= */ yytestcase(yyruleno==227); - case 317: /* tag_list_opt ::= */ yytestcase(yyruleno==317); - case 383: /* col_list_opt ::= */ yytestcase(yyruleno==383); - case 389: /* tag_def_or_ref_opt ::= */ yytestcase(yyruleno==389); - case 633: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==633); - case 663: /* group_by_clause_opt ::= */ yytestcase(yyruleno==663); - case 683: /* order_by_clause_opt ::= */ yytestcase(yyruleno==683); -{ yymsp[1].minor.yy72 = NULL; } + case 199: /* specific_cols_opt ::= */ yytestcase(yyruleno==199); + case 235: /* tags_def_opt ::= */ yytestcase(yyruleno==235); + case 325: /* tag_list_opt ::= */ yytestcase(yyruleno==325); + case 391: /* col_list_opt ::= */ yytestcase(yyruleno==391); + case 397: /* tag_def_or_ref_opt ::= */ yytestcase(yyruleno==397); + case 641: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==641); + case 671: /* group_by_clause_opt ::= */ yytestcase(yyruleno==671); + case 691: /* order_by_clause_opt ::= */ yytestcase(yyruleno==691); +{ yymsp[1].minor.yy376 = NULL; } break; case 28: /* white_list_opt ::= white_list */ - case 228: /* tags_def_opt ::= tags_def */ yytestcase(yyruleno==228); - case 390: /* tag_def_or_ref_opt ::= tags_def */ yytestcase(yyruleno==390); - case 558: /* star_func_para_list ::= other_para_list */ yytestcase(yyruleno==558); -{ yylhsminor.yy72 = yymsp[0].minor.yy72; } - yymsp[0].minor.yy72 = yylhsminor.yy72; + case 236: /* tags_def_opt ::= tags_def */ yytestcase(yyruleno==236); + case 398: /* tag_def_or_ref_opt ::= tags_def */ yytestcase(yyruleno==398); + case 566: /* star_func_para_list ::= other_para_list */ yytestcase(yyruleno==566); +{ yylhsminor.yy376 = yymsp[0].minor.yy376; } + yymsp[0].minor.yy376 = yylhsminor.yy376; break; case 29: /* cmd ::= CREATE USER user_name PASS NK_STRING sysinfo_opt white_list_opt */ { - pCxt->pRootNode = createCreateUserStmt(pCxt, &yymsp[-4].minor.yy305, &yymsp[-2].minor.yy0, yymsp[-1].minor.yy359); - pCxt->pRootNode = addCreateUserStmtWhiteList(pCxt, pCxt->pRootNode, yymsp[0].minor.yy72); + pCxt->pRootNode = createCreateUserStmt(pCxt, &yymsp[-4].minor.yy833, &yymsp[-2].minor.yy0, yymsp[-1].minor.yy311); + pCxt->pRootNode = addCreateUserStmtWhiteList(pCxt, pCxt->pRootNode, yymsp[0].minor.yy376); } break; case 30: /* cmd ::= ALTER USER user_name PASS NK_STRING */ -{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy305, TSDB_ALTER_USER_PASSWD, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy833, TSDB_ALTER_USER_PASSWD, &yymsp[0].minor.yy0); } break; case 31: /* cmd ::= ALTER USER user_name ENABLE NK_INTEGER */ -{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy305, TSDB_ALTER_USER_ENABLE, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy833, TSDB_ALTER_USER_ENABLE, &yymsp[0].minor.yy0); } break; case 32: /* cmd ::= ALTER USER user_name SYSINFO NK_INTEGER */ -{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy305, TSDB_ALTER_USER_SYSINFO, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy833, TSDB_ALTER_USER_SYSINFO, &yymsp[0].minor.yy0); } break; case 33: /* cmd ::= ALTER USER user_name ADD white_list */ -{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy305, TSDB_ALTER_USER_ADD_WHITE_LIST, yymsp[0].minor.yy72); } +{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy833, TSDB_ALTER_USER_ADD_WHITE_LIST, yymsp[0].minor.yy376); } break; case 34: /* cmd ::= ALTER USER user_name DROP white_list */ -{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy305, TSDB_ALTER_USER_DROP_WHITE_LIST, yymsp[0].minor.yy72); } +{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy833, TSDB_ALTER_USER_DROP_WHITE_LIST, yymsp[0].minor.yy376); } break; case 35: /* cmd ::= DROP USER user_name */ -{ pCxt->pRootNode = createDropUserStmt(pCxt, &yymsp[0].minor.yy305); } +{ pCxt->pRootNode = createDropUserStmt(pCxt, &yymsp[0].minor.yy833); } break; case 36: /* sysinfo_opt ::= */ -{ yymsp[1].minor.yy359 = 1; } +{ yymsp[1].minor.yy311 = 1; } break; case 37: /* sysinfo_opt ::= SYSINFO NK_INTEGER */ -{ yymsp[-1].minor.yy359 = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); } +{ yymsp[-1].minor.yy311 = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); } break; case 38: /* cmd ::= GRANT privileges ON priv_level with_opt TO user_name */ -{ pCxt->pRootNode = createGrantStmt(pCxt, yymsp[-5].minor.yy1005, &yymsp[-3].minor.yy361, &yymsp[0].minor.yy305, yymsp[-2].minor.yy1000); } +{ pCxt->pRootNode = createGrantStmt(pCxt, yymsp[-5].minor.yy1053, &yymsp[-3].minor.yy1017, &yymsp[0].minor.yy833, yymsp[-2].minor.yy872); } break; case 39: /* cmd ::= REVOKE privileges ON priv_level with_opt FROM user_name */ -{ pCxt->pRootNode = createRevokeStmt(pCxt, yymsp[-5].minor.yy1005, &yymsp[-3].minor.yy361, &yymsp[0].minor.yy305, yymsp[-2].minor.yy1000); } +{ pCxt->pRootNode = createRevokeStmt(pCxt, yymsp[-5].minor.yy1053, &yymsp[-3].minor.yy1017, &yymsp[0].minor.yy833, yymsp[-2].minor.yy872); } break; case 40: /* privileges ::= ALL */ -{ yymsp[0].minor.yy1005 = PRIVILEGE_TYPE_ALL; } +{ yymsp[0].minor.yy1053 = PRIVILEGE_TYPE_ALL; } break; case 41: /* privileges ::= priv_type_list */ case 43: /* priv_type_list ::= priv_type */ yytestcase(yyruleno==43); -{ yylhsminor.yy1005 = yymsp[0].minor.yy1005; } - yymsp[0].minor.yy1005 = yylhsminor.yy1005; +{ yylhsminor.yy1053 = yymsp[0].minor.yy1053; } + yymsp[0].minor.yy1053 = yylhsminor.yy1053; break; case 42: /* privileges ::= SUBSCRIBE */ -{ yymsp[0].minor.yy1005 = PRIVILEGE_TYPE_SUBSCRIBE; } +{ yymsp[0].minor.yy1053 = PRIVILEGE_TYPE_SUBSCRIBE; } break; case 44: /* priv_type_list ::= priv_type_list NK_COMMA priv_type */ -{ yylhsminor.yy1005 = yymsp[-2].minor.yy1005 | yymsp[0].minor.yy1005; } - yymsp[-2].minor.yy1005 = yylhsminor.yy1005; +{ yylhsminor.yy1053 = yymsp[-2].minor.yy1053 | yymsp[0].minor.yy1053; } + yymsp[-2].minor.yy1053 = yylhsminor.yy1053; break; case 45: /* priv_type ::= READ */ -{ yymsp[0].minor.yy1005 = PRIVILEGE_TYPE_READ; } +{ yymsp[0].minor.yy1053 = PRIVILEGE_TYPE_READ; } break; case 46: /* priv_type ::= WRITE */ -{ yymsp[0].minor.yy1005 = PRIVILEGE_TYPE_WRITE; } +{ yymsp[0].minor.yy1053 = PRIVILEGE_TYPE_WRITE; } break; case 47: /* priv_type ::= ALTER */ -{ yymsp[0].minor.yy1005 = PRIVILEGE_TYPE_ALTER; } +{ yymsp[0].minor.yy1053 = PRIVILEGE_TYPE_ALTER; } break; case 48: /* priv_level ::= NK_STAR NK_DOT NK_STAR */ -{ yylhsminor.yy361.first = yymsp[-2].minor.yy0; yylhsminor.yy361.second = yymsp[0].minor.yy0; } - yymsp[-2].minor.yy361 = yylhsminor.yy361; +{ yylhsminor.yy1017.first = yymsp[-2].minor.yy0; yylhsminor.yy1017.second = yymsp[0].minor.yy0; } + yymsp[-2].minor.yy1017 = yylhsminor.yy1017; break; case 49: /* priv_level ::= db_name NK_DOT NK_STAR */ -{ yylhsminor.yy361.first = yymsp[-2].minor.yy305; yylhsminor.yy361.second = yymsp[0].minor.yy0; } - yymsp[-2].minor.yy361 = yylhsminor.yy361; +{ yylhsminor.yy1017.first = yymsp[-2].minor.yy833; yylhsminor.yy1017.second = yymsp[0].minor.yy0; } + yymsp[-2].minor.yy1017 = yylhsminor.yy1017; break; case 50: /* priv_level ::= db_name NK_DOT table_name */ -{ yylhsminor.yy361.first = yymsp[-2].minor.yy305; yylhsminor.yy361.second = yymsp[0].minor.yy305; } - yymsp[-2].minor.yy361 = yylhsminor.yy361; +{ yylhsminor.yy1017.first = yymsp[-2].minor.yy833; yylhsminor.yy1017.second = yymsp[0].minor.yy833; } + yymsp[-2].minor.yy1017 = yylhsminor.yy1017; break; case 51: /* priv_level ::= topic_name */ -{ yylhsminor.yy361.first = yymsp[0].minor.yy305; yylhsminor.yy361.second = nil_token; } - yymsp[0].minor.yy361 = yylhsminor.yy361; +{ yylhsminor.yy1017.first = yymsp[0].minor.yy833; yylhsminor.yy1017.second = nil_token; } + yymsp[0].minor.yy1017 = yylhsminor.yy1017; break; case 52: /* with_opt ::= */ - case 160: /* start_opt ::= */ yytestcase(yyruleno==160); - case 164: /* end_opt ::= */ yytestcase(yyruleno==164); - case 312: /* like_pattern_opt ::= */ yytestcase(yyruleno==312); - case 401: /* subtable_opt ::= */ yytestcase(yyruleno==401); - case 568: /* case_when_else_opt ::= */ yytestcase(yyruleno==568); - case 598: /* from_clause_opt ::= */ yytestcase(yyruleno==598); - case 631: /* where_clause_opt ::= */ yytestcase(yyruleno==631); - case 640: /* twindow_clause_opt ::= */ yytestcase(yyruleno==640); - case 648: /* sliding_opt ::= */ yytestcase(yyruleno==648); - case 653: /* fill_opt ::= */ yytestcase(yyruleno==653); - case 667: /* having_clause_opt ::= */ yytestcase(yyruleno==667); - case 669: /* range_opt ::= */ yytestcase(yyruleno==669); - case 672: /* every_opt ::= */ yytestcase(yyruleno==672); - case 685: /* slimit_clause_opt ::= */ yytestcase(yyruleno==685); - case 689: /* limit_clause_opt ::= */ yytestcase(yyruleno==689); -{ yymsp[1].minor.yy1000 = NULL; } + case 168: /* start_opt ::= */ yytestcase(yyruleno==168); + case 172: /* end_opt ::= */ yytestcase(yyruleno==172); + case 320: /* like_pattern_opt ::= */ yytestcase(yyruleno==320); + case 409: /* subtable_opt ::= */ yytestcase(yyruleno==409); + case 576: /* case_when_else_opt ::= */ yytestcase(yyruleno==576); + case 606: /* from_clause_opt ::= */ yytestcase(yyruleno==606); + case 639: /* where_clause_opt ::= */ yytestcase(yyruleno==639); + case 648: /* twindow_clause_opt ::= */ yytestcase(yyruleno==648); + case 656: /* sliding_opt ::= */ yytestcase(yyruleno==656); + case 661: /* fill_opt ::= */ yytestcase(yyruleno==661); + case 675: /* having_clause_opt ::= */ yytestcase(yyruleno==675); + case 677: /* range_opt ::= */ yytestcase(yyruleno==677); + case 680: /* every_opt ::= */ yytestcase(yyruleno==680); + case 693: /* slimit_clause_opt ::= */ yytestcase(yyruleno==693); + case 697: /* limit_clause_opt ::= */ yytestcase(yyruleno==697); +{ yymsp[1].minor.yy872 = NULL; } break; case 53: /* with_opt ::= WITH search_condition */ - case 599: /* from_clause_opt ::= FROM table_reference_list */ yytestcase(yyruleno==599); - case 632: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==632); - case 668: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==668); -{ yymsp[-1].minor.yy1000 = yymsp[0].minor.yy1000; } + case 607: /* from_clause_opt ::= FROM table_reference_list */ yytestcase(yyruleno==607); + case 640: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==640); + case 676: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==676); +{ yymsp[-1].minor.yy872 = yymsp[0].minor.yy872; } break; case 54: /* cmd ::= CREATE ENCRYPT_KEY NK_STRING */ { pCxt->pRootNode = createEncryptKeyStmt(pCxt, &yymsp[0].minor.yy0); } break; case 55: /* cmd ::= CREATE DNODE dnode_endpoint */ -{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[0].minor.yy305, NULL); } +{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[0].minor.yy833, NULL); } break; case 56: /* cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */ -{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[-2].minor.yy305, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[-2].minor.yy833, &yymsp[0].minor.yy0); } break; case 57: /* cmd ::= DROP DNODE NK_INTEGER force_opt */ -{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy985, false); } +{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy185, false); } break; case 58: /* cmd ::= DROP DNODE dnode_endpoint force_opt */ -{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy305, yymsp[0].minor.yy985, false); } +{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy833, yymsp[0].minor.yy185, false); } break; case 59: /* cmd ::= DROP DNODE NK_INTEGER unsafe_opt */ -{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy0, false, yymsp[0].minor.yy985); } +{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy0, false, yymsp[0].minor.yy185); } break; case 60: /* cmd ::= DROP DNODE dnode_endpoint unsafe_opt */ -{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy305, false, yymsp[0].minor.yy985); } +{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy833, false, yymsp[0].minor.yy185); } break; case 61: /* cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ { pCxt->pRootNode = createAlterDnodeStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, NULL); } @@ -5198,57 +5233,57 @@ static YYACTIONTYPE yy_reduce( case 66: /* dnode_endpoint ::= NK_STRING */ case 67: /* dnode_endpoint ::= NK_ID */ yytestcase(yyruleno==67); case 68: /* dnode_endpoint ::= NK_IPTOKEN */ yytestcase(yyruleno==68); - case 339: /* sma_func_name ::= COUNT */ yytestcase(yyruleno==339); - case 340: /* sma_func_name ::= FIRST */ yytestcase(yyruleno==340); - case 341: /* sma_func_name ::= LAST */ yytestcase(yyruleno==341); - case 342: /* sma_func_name ::= LAST_ROW */ yytestcase(yyruleno==342); - case 488: /* db_name ::= NK_ID */ yytestcase(yyruleno==488); - case 489: /* table_name ::= NK_ID */ yytestcase(yyruleno==489); - case 490: /* column_name ::= NK_ID */ yytestcase(yyruleno==490); - case 491: /* function_name ::= NK_ID */ yytestcase(yyruleno==491); - case 492: /* view_name ::= NK_ID */ yytestcase(yyruleno==492); - case 493: /* table_alias ::= NK_ID */ yytestcase(yyruleno==493); - case 494: /* column_alias ::= NK_ID */ yytestcase(yyruleno==494); - case 495: /* column_alias ::= NK_ALIAS */ yytestcase(yyruleno==495); - case 496: /* user_name ::= NK_ID */ yytestcase(yyruleno==496); - case 497: /* topic_name ::= NK_ID */ yytestcase(yyruleno==497); - case 498: /* stream_name ::= NK_ID */ yytestcase(yyruleno==498); - case 499: /* cgroup_name ::= NK_ID */ yytestcase(yyruleno==499); - case 500: /* index_name ::= NK_ID */ yytestcase(yyruleno==500); - case 544: /* noarg_func ::= NOW */ yytestcase(yyruleno==544); - case 545: /* noarg_func ::= TODAY */ yytestcase(yyruleno==545); - case 546: /* noarg_func ::= TIMEZONE */ yytestcase(yyruleno==546); - case 547: /* noarg_func ::= DATABASE */ yytestcase(yyruleno==547); - case 548: /* noarg_func ::= CLIENT_VERSION */ yytestcase(yyruleno==548); - case 549: /* noarg_func ::= SERVER_VERSION */ yytestcase(yyruleno==549); - case 550: /* noarg_func ::= SERVER_STATUS */ yytestcase(yyruleno==550); - case 551: /* noarg_func ::= CURRENT_USER */ yytestcase(yyruleno==551); - case 552: /* noarg_func ::= USER */ yytestcase(yyruleno==552); - case 553: /* star_func ::= COUNT */ yytestcase(yyruleno==553); - case 554: /* star_func ::= FIRST */ yytestcase(yyruleno==554); - case 555: /* star_func ::= LAST */ yytestcase(yyruleno==555); - case 556: /* star_func ::= LAST_ROW */ yytestcase(yyruleno==556); -{ yylhsminor.yy305 = yymsp[0].minor.yy0; } - yymsp[0].minor.yy305 = yylhsminor.yy305; + case 347: /* sma_func_name ::= COUNT */ yytestcase(yyruleno==347); + case 348: /* sma_func_name ::= FIRST */ yytestcase(yyruleno==348); + case 349: /* sma_func_name ::= LAST */ yytestcase(yyruleno==349); + case 350: /* sma_func_name ::= LAST_ROW */ yytestcase(yyruleno==350); + case 496: /* db_name ::= NK_ID */ yytestcase(yyruleno==496); + case 497: /* table_name ::= NK_ID */ yytestcase(yyruleno==497); + case 498: /* column_name ::= NK_ID */ yytestcase(yyruleno==498); + case 499: /* function_name ::= NK_ID */ yytestcase(yyruleno==499); + case 500: /* view_name ::= NK_ID */ yytestcase(yyruleno==500); + case 501: /* table_alias ::= NK_ID */ yytestcase(yyruleno==501); + case 502: /* column_alias ::= NK_ID */ yytestcase(yyruleno==502); + case 503: /* column_alias ::= NK_ALIAS */ yytestcase(yyruleno==503); + case 504: /* user_name ::= NK_ID */ yytestcase(yyruleno==504); + case 505: /* topic_name ::= NK_ID */ yytestcase(yyruleno==505); + case 506: /* stream_name ::= NK_ID */ yytestcase(yyruleno==506); + case 507: /* cgroup_name ::= NK_ID */ yytestcase(yyruleno==507); + case 508: /* index_name ::= NK_ID */ yytestcase(yyruleno==508); + case 552: /* noarg_func ::= NOW */ yytestcase(yyruleno==552); + case 553: /* noarg_func ::= TODAY */ yytestcase(yyruleno==553); + case 554: /* noarg_func ::= TIMEZONE */ yytestcase(yyruleno==554); + case 555: /* noarg_func ::= DATABASE */ yytestcase(yyruleno==555); + case 556: /* noarg_func ::= CLIENT_VERSION */ yytestcase(yyruleno==556); + case 557: /* noarg_func ::= SERVER_VERSION */ yytestcase(yyruleno==557); + case 558: /* noarg_func ::= SERVER_STATUS */ yytestcase(yyruleno==558); + case 559: /* noarg_func ::= CURRENT_USER */ yytestcase(yyruleno==559); + case 560: /* noarg_func ::= USER */ yytestcase(yyruleno==560); + case 561: /* star_func ::= COUNT */ yytestcase(yyruleno==561); + case 562: /* star_func ::= FIRST */ yytestcase(yyruleno==562); + case 563: /* star_func ::= LAST */ yytestcase(yyruleno==563); + case 564: /* star_func ::= LAST_ROW */ yytestcase(yyruleno==564); +{ yylhsminor.yy833 = yymsp[0].minor.yy0; } + yymsp[0].minor.yy833 = yylhsminor.yy833; break; case 69: /* force_opt ::= */ - case 95: /* not_exists_opt ::= */ yytestcase(yyruleno==95); - case 97: /* exists_opt ::= */ yytestcase(yyruleno==97); - case 360: /* analyze_opt ::= */ yytestcase(yyruleno==360); - case 367: /* agg_func_opt ::= */ yytestcase(yyruleno==367); - case 373: /* or_replace_opt ::= */ yytestcase(yyruleno==373); - case 403: /* ignore_opt ::= */ yytestcase(yyruleno==403); - case 619: /* tag_mode_opt ::= */ yytestcase(yyruleno==619); - case 621: /* set_quantifier_opt ::= */ yytestcase(yyruleno==621); -{ yymsp[1].minor.yy985 = false; } + case 96: /* not_exists_opt ::= */ yytestcase(yyruleno==96); + case 98: /* exists_opt ::= */ yytestcase(yyruleno==98); + case 368: /* analyze_opt ::= */ yytestcase(yyruleno==368); + case 375: /* agg_func_opt ::= */ yytestcase(yyruleno==375); + case 381: /* or_replace_opt ::= */ yytestcase(yyruleno==381); + case 411: /* ignore_opt ::= */ yytestcase(yyruleno==411); + case 627: /* tag_mode_opt ::= */ yytestcase(yyruleno==627); + case 629: /* set_quantifier_opt ::= */ yytestcase(yyruleno==629); +{ yymsp[1].minor.yy185 = false; } break; case 70: /* force_opt ::= FORCE */ case 71: /* unsafe_opt ::= UNSAFE */ yytestcase(yyruleno==71); - case 361: /* analyze_opt ::= ANALYZE */ yytestcase(yyruleno==361); - case 368: /* agg_func_opt ::= AGGREGATE */ yytestcase(yyruleno==368); - case 620: /* tag_mode_opt ::= TAGS */ yytestcase(yyruleno==620); - case 622: /* set_quantifier_opt ::= DISTINCT */ yytestcase(yyruleno==622); -{ yymsp[0].minor.yy985 = true; } + case 369: /* analyze_opt ::= ANALYZE */ yytestcase(yyruleno==369); + case 376: /* agg_func_opt ::= AGGREGATE */ yytestcase(yyruleno==376); + case 628: /* tag_mode_opt ::= TAGS */ yytestcase(yyruleno==628); + case 630: /* set_quantifier_opt ::= DISTINCT */ yytestcase(yyruleno==630); +{ yymsp[0].minor.yy185 = true; } break; case 72: /* cmd ::= ALTER CLUSTER NK_STRING */ { pCxt->pRootNode = createAlterClusterStmt(pCxt, &yymsp[0].minor.yy0, NULL); } @@ -5296,1664 +5331,1687 @@ static YYACTIONTYPE yy_reduce( { pCxt->pRootNode = createRestoreComponentNodeStmt(pCxt, QUERY_NODE_RESTORE_VNODE_STMT, &yymsp[0].minor.yy0); } break; case 87: /* cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ -{ pCxt->pRootNode = createCreateDatabaseStmt(pCxt, yymsp[-2].minor.yy985, &yymsp[-1].minor.yy305, yymsp[0].minor.yy1000); } +{ pCxt->pRootNode = createCreateDatabaseStmt(pCxt, yymsp[-2].minor.yy185, &yymsp[-1].minor.yy833, yymsp[0].minor.yy872); } break; case 88: /* cmd ::= DROP DATABASE exists_opt db_name */ -{ pCxt->pRootNode = createDropDatabaseStmt(pCxt, yymsp[-1].minor.yy985, &yymsp[0].minor.yy305); } +{ pCxt->pRootNode = createDropDatabaseStmt(pCxt, yymsp[-1].minor.yy185, &yymsp[0].minor.yy833); } break; case 89: /* cmd ::= USE db_name */ -{ pCxt->pRootNode = createUseDatabaseStmt(pCxt, &yymsp[0].minor.yy305); } +{ pCxt->pRootNode = createUseDatabaseStmt(pCxt, &yymsp[0].minor.yy833); } break; case 90: /* cmd ::= ALTER DATABASE db_name alter_db_options */ -{ pCxt->pRootNode = createAlterDatabaseStmt(pCxt, &yymsp[-1].minor.yy305, yymsp[0].minor.yy1000); } +{ pCxt->pRootNode = createAlterDatabaseStmt(pCxt, &yymsp[-1].minor.yy833, yymsp[0].minor.yy872); } break; case 91: /* cmd ::= FLUSH DATABASE db_name */ -{ pCxt->pRootNode = createFlushDatabaseStmt(pCxt, &yymsp[0].minor.yy305); } +{ pCxt->pRootNode = createFlushDatabaseStmt(pCxt, &yymsp[0].minor.yy833); } break; case 92: /* cmd ::= TRIM DATABASE db_name speed_opt */ -{ pCxt->pRootNode = createTrimDatabaseStmt(pCxt, &yymsp[-1].minor.yy305, yymsp[0].minor.yy444); } +{ pCxt->pRootNode = createTrimDatabaseStmt(pCxt, &yymsp[-1].minor.yy833, yymsp[0].minor.yy772); } break; - case 93: /* cmd ::= COMPACT DATABASE db_name start_opt end_opt */ -{ pCxt->pRootNode = createCompactStmt(pCxt, &yymsp[-2].minor.yy305, yymsp[-1].minor.yy1000, yymsp[0].minor.yy1000); } + case 93: /* cmd ::= S3MIGRATE DATABASE db_name */ +{ pCxt->pRootNode = createS3MigrateDatabaseStmt(pCxt, &yymsp[0].minor.yy833); } break; - case 94: /* not_exists_opt ::= IF NOT EXISTS */ -{ yymsp[-2].minor.yy985 = true; } + case 94: /* cmd ::= COMPACT DATABASE db_name start_opt end_opt */ +{ pCxt->pRootNode = createCompactStmt(pCxt, &yymsp[-2].minor.yy833, yymsp[-1].minor.yy872, yymsp[0].minor.yy872); } break; - case 96: /* exists_opt ::= IF EXISTS */ - case 374: /* or_replace_opt ::= OR REPLACE */ yytestcase(yyruleno==374); - case 404: /* ignore_opt ::= IGNORE UNTREATED */ yytestcase(yyruleno==404); -{ yymsp[-1].minor.yy985 = true; } + case 95: /* not_exists_opt ::= IF NOT EXISTS */ +{ yymsp[-2].minor.yy185 = true; } break; - case 98: /* db_options ::= */ -{ yymsp[1].minor.yy1000 = createDefaultDatabaseOptions(pCxt); } + case 97: /* exists_opt ::= IF EXISTS */ + case 382: /* or_replace_opt ::= OR REPLACE */ yytestcase(yyruleno==382); + case 412: /* ignore_opt ::= IGNORE UNTREATED */ yytestcase(yyruleno==412); +{ yymsp[-1].minor.yy185 = true; } break; - case 99: /* db_options ::= db_options BUFFER NK_INTEGER */ -{ yylhsminor.yy1000 = setDatabaseOption(pCxt, yymsp[-2].minor.yy1000, DB_OPTION_BUFFER, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy1000 = yylhsminor.yy1000; + case 99: /* db_options ::= */ +{ yymsp[1].minor.yy872 = createDefaultDatabaseOptions(pCxt); } break; - case 100: /* db_options ::= db_options CACHEMODEL NK_STRING */ -{ yylhsminor.yy1000 = setDatabaseOption(pCxt, yymsp[-2].minor.yy1000, DB_OPTION_CACHEMODEL, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy1000 = yylhsminor.yy1000; + case 100: /* db_options ::= db_options BUFFER NK_INTEGER */ +{ yylhsminor.yy872 = setDatabaseOption(pCxt, yymsp[-2].minor.yy872, DB_OPTION_BUFFER, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy872 = yylhsminor.yy872; break; - case 101: /* db_options ::= db_options CACHESIZE NK_INTEGER */ -{ yylhsminor.yy1000 = setDatabaseOption(pCxt, yymsp[-2].minor.yy1000, DB_OPTION_CACHESIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy1000 = yylhsminor.yy1000; + case 101: /* db_options ::= db_options CACHEMODEL NK_STRING */ +{ yylhsminor.yy872 = setDatabaseOption(pCxt, yymsp[-2].minor.yy872, DB_OPTION_CACHEMODEL, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy872 = yylhsminor.yy872; break; - case 102: /* db_options ::= db_options COMP NK_INTEGER */ -{ yylhsminor.yy1000 = setDatabaseOption(pCxt, yymsp[-2].minor.yy1000, DB_OPTION_COMP, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy1000 = yylhsminor.yy1000; + case 102: /* db_options ::= db_options CACHESIZE NK_INTEGER */ +{ yylhsminor.yy872 = setDatabaseOption(pCxt, yymsp[-2].minor.yy872, DB_OPTION_CACHESIZE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy872 = yylhsminor.yy872; break; - case 103: /* db_options ::= db_options DURATION NK_INTEGER */ - case 104: /* db_options ::= db_options DURATION NK_VARIABLE */ yytestcase(yyruleno==104); -{ yylhsminor.yy1000 = setDatabaseOption(pCxt, yymsp[-2].minor.yy1000, DB_OPTION_DAYS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy1000 = yylhsminor.yy1000; + case 103: /* db_options ::= db_options COMP NK_INTEGER */ +{ yylhsminor.yy872 = setDatabaseOption(pCxt, yymsp[-2].minor.yy872, DB_OPTION_COMP, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy872 = yylhsminor.yy872; break; - case 105: /* db_options ::= db_options MAXROWS NK_INTEGER */ -{ yylhsminor.yy1000 = setDatabaseOption(pCxt, yymsp[-2].minor.yy1000, DB_OPTION_MAXROWS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy1000 = yylhsminor.yy1000; + case 104: /* db_options ::= db_options DURATION NK_INTEGER */ + case 105: /* db_options ::= db_options DURATION NK_VARIABLE */ yytestcase(yyruleno==105); +{ yylhsminor.yy872 = setDatabaseOption(pCxt, yymsp[-2].minor.yy872, DB_OPTION_DAYS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy872 = yylhsminor.yy872; break; - case 106: /* db_options ::= db_options MINROWS NK_INTEGER */ -{ yylhsminor.yy1000 = setDatabaseOption(pCxt, yymsp[-2].minor.yy1000, DB_OPTION_MINROWS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy1000 = yylhsminor.yy1000; + case 106: /* db_options ::= db_options MAXROWS NK_INTEGER */ +{ yylhsminor.yy872 = setDatabaseOption(pCxt, yymsp[-2].minor.yy872, DB_OPTION_MAXROWS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy872 = yylhsminor.yy872; break; - case 107: /* db_options ::= db_options KEEP integer_list */ - case 108: /* db_options ::= db_options KEEP variable_list */ yytestcase(yyruleno==108); -{ yylhsminor.yy1000 = setDatabaseOption(pCxt, yymsp[-2].minor.yy1000, DB_OPTION_KEEP, yymsp[0].minor.yy72); } - yymsp[-2].minor.yy1000 = yylhsminor.yy1000; + case 107: /* db_options ::= db_options MINROWS NK_INTEGER */ +{ yylhsminor.yy872 = setDatabaseOption(pCxt, yymsp[-2].minor.yy872, DB_OPTION_MINROWS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy872 = yylhsminor.yy872; break; - case 109: /* db_options ::= db_options PAGES NK_INTEGER */ -{ yylhsminor.yy1000 = setDatabaseOption(pCxt, yymsp[-2].minor.yy1000, DB_OPTION_PAGES, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy1000 = yylhsminor.yy1000; + case 108: /* db_options ::= db_options KEEP integer_list */ + case 109: /* db_options ::= db_options KEEP variable_list */ yytestcase(yyruleno==109); +{ yylhsminor.yy872 = setDatabaseOption(pCxt, yymsp[-2].minor.yy872, DB_OPTION_KEEP, yymsp[0].minor.yy376); } + yymsp[-2].minor.yy872 = yylhsminor.yy872; break; - case 110: /* db_options ::= db_options PAGESIZE NK_INTEGER */ -{ yylhsminor.yy1000 = setDatabaseOption(pCxt, yymsp[-2].minor.yy1000, DB_OPTION_PAGESIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy1000 = yylhsminor.yy1000; + case 110: /* db_options ::= db_options PAGES NK_INTEGER */ +{ yylhsminor.yy872 = setDatabaseOption(pCxt, yymsp[-2].minor.yy872, DB_OPTION_PAGES, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy872 = yylhsminor.yy872; break; - case 111: /* db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */ -{ yylhsminor.yy1000 = setDatabaseOption(pCxt, yymsp[-2].minor.yy1000, DB_OPTION_TSDB_PAGESIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy1000 = yylhsminor.yy1000; + case 111: /* db_options ::= db_options PAGESIZE NK_INTEGER */ +{ yylhsminor.yy872 = setDatabaseOption(pCxt, yymsp[-2].minor.yy872, DB_OPTION_PAGESIZE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy872 = yylhsminor.yy872; break; - case 112: /* db_options ::= db_options PRECISION NK_STRING */ -{ yylhsminor.yy1000 = setDatabaseOption(pCxt, yymsp[-2].minor.yy1000, DB_OPTION_PRECISION, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy1000 = yylhsminor.yy1000; + case 112: /* db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */ +{ yylhsminor.yy872 = setDatabaseOption(pCxt, yymsp[-2].minor.yy872, DB_OPTION_TSDB_PAGESIZE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy872 = yylhsminor.yy872; break; - case 113: /* db_options ::= db_options REPLICA NK_INTEGER */ -{ yylhsminor.yy1000 = setDatabaseOption(pCxt, yymsp[-2].minor.yy1000, DB_OPTION_REPLICA, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy1000 = yylhsminor.yy1000; + case 113: /* db_options ::= db_options PRECISION NK_STRING */ +{ yylhsminor.yy872 = setDatabaseOption(pCxt, yymsp[-2].minor.yy872, DB_OPTION_PRECISION, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy872 = yylhsminor.yy872; break; - case 114: /* db_options ::= db_options VGROUPS NK_INTEGER */ -{ yylhsminor.yy1000 = setDatabaseOption(pCxt, yymsp[-2].minor.yy1000, DB_OPTION_VGROUPS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy1000 = yylhsminor.yy1000; + case 114: /* db_options ::= db_options REPLICA NK_INTEGER */ +{ yylhsminor.yy872 = setDatabaseOption(pCxt, yymsp[-2].minor.yy872, DB_OPTION_REPLICA, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy872 = yylhsminor.yy872; break; - case 115: /* db_options ::= db_options SINGLE_STABLE NK_INTEGER */ -{ yylhsminor.yy1000 = setDatabaseOption(pCxt, yymsp[-2].minor.yy1000, DB_OPTION_SINGLE_STABLE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy1000 = yylhsminor.yy1000; + case 115: /* db_options ::= db_options VGROUPS NK_INTEGER */ +{ yylhsminor.yy872 = setDatabaseOption(pCxt, yymsp[-2].minor.yy872, DB_OPTION_VGROUPS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy872 = yylhsminor.yy872; break; - case 116: /* db_options ::= db_options RETENTIONS retention_list */ -{ yylhsminor.yy1000 = setDatabaseOption(pCxt, yymsp[-2].minor.yy1000, DB_OPTION_RETENTIONS, yymsp[0].minor.yy72); } - yymsp[-2].minor.yy1000 = yylhsminor.yy1000; + case 116: /* db_options ::= db_options SINGLE_STABLE NK_INTEGER */ +{ yylhsminor.yy872 = setDatabaseOption(pCxt, yymsp[-2].minor.yy872, DB_OPTION_SINGLE_STABLE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy872 = yylhsminor.yy872; break; - case 117: /* db_options ::= db_options SCHEMALESS NK_INTEGER */ -{ yylhsminor.yy1000 = setDatabaseOption(pCxt, yymsp[-2].minor.yy1000, DB_OPTION_SCHEMALESS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy1000 = yylhsminor.yy1000; + case 117: /* db_options ::= db_options RETENTIONS retention_list */ +{ yylhsminor.yy872 = setDatabaseOption(pCxt, yymsp[-2].minor.yy872, DB_OPTION_RETENTIONS, yymsp[0].minor.yy376); } + yymsp[-2].minor.yy872 = yylhsminor.yy872; break; - case 118: /* db_options ::= db_options WAL_LEVEL NK_INTEGER */ -{ yylhsminor.yy1000 = setDatabaseOption(pCxt, yymsp[-2].minor.yy1000, DB_OPTION_WAL, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy1000 = yylhsminor.yy1000; + case 118: /* db_options ::= db_options SCHEMALESS NK_INTEGER */ +{ yylhsminor.yy872 = setDatabaseOption(pCxt, yymsp[-2].minor.yy872, DB_OPTION_SCHEMALESS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy872 = yylhsminor.yy872; break; - case 119: /* db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */ -{ yylhsminor.yy1000 = setDatabaseOption(pCxt, yymsp[-2].minor.yy1000, DB_OPTION_FSYNC, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy1000 = yylhsminor.yy1000; + case 119: /* db_options ::= db_options WAL_LEVEL NK_INTEGER */ +{ yylhsminor.yy872 = setDatabaseOption(pCxt, yymsp[-2].minor.yy872, DB_OPTION_WAL, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy872 = yylhsminor.yy872; break; - case 120: /* db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */ -{ yylhsminor.yy1000 = setDatabaseOption(pCxt, yymsp[-2].minor.yy1000, DB_OPTION_WAL_RETENTION_PERIOD, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy1000 = yylhsminor.yy1000; + case 120: /* db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */ +{ yylhsminor.yy872 = setDatabaseOption(pCxt, yymsp[-2].minor.yy872, DB_OPTION_FSYNC, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy872 = yylhsminor.yy872; break; - case 121: /* db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ + case 121: /* db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */ +{ yylhsminor.yy872 = setDatabaseOption(pCxt, yymsp[-2].minor.yy872, DB_OPTION_WAL_RETENTION_PERIOD, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy872 = yylhsminor.yy872; + break; + case 122: /* db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yylhsminor.yy1000 = setDatabaseOption(pCxt, yymsp[-3].minor.yy1000, DB_OPTION_WAL_RETENTION_PERIOD, &t); + yylhsminor.yy872 = setDatabaseOption(pCxt, yymsp[-3].minor.yy872, DB_OPTION_WAL_RETENTION_PERIOD, &t); } - yymsp[-3].minor.yy1000 = yylhsminor.yy1000; + yymsp[-3].minor.yy872 = yylhsminor.yy872; break; - case 122: /* db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */ -{ yylhsminor.yy1000 = setDatabaseOption(pCxt, yymsp[-2].minor.yy1000, DB_OPTION_WAL_RETENTION_SIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy1000 = yylhsminor.yy1000; + case 123: /* db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */ +{ yylhsminor.yy872 = setDatabaseOption(pCxt, yymsp[-2].minor.yy872, DB_OPTION_WAL_RETENTION_SIZE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy872 = yylhsminor.yy872; break; - case 123: /* db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ + case 124: /* db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yylhsminor.yy1000 = setDatabaseOption(pCxt, yymsp[-3].minor.yy1000, DB_OPTION_WAL_RETENTION_SIZE, &t); + yylhsminor.yy872 = setDatabaseOption(pCxt, yymsp[-3].minor.yy872, DB_OPTION_WAL_RETENTION_SIZE, &t); } - yymsp[-3].minor.yy1000 = yylhsminor.yy1000; + yymsp[-3].minor.yy872 = yylhsminor.yy872; break; - case 124: /* db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */ -{ yylhsminor.yy1000 = setDatabaseOption(pCxt, yymsp[-2].minor.yy1000, DB_OPTION_WAL_ROLL_PERIOD, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy1000 = yylhsminor.yy1000; + case 125: /* db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */ +{ yylhsminor.yy872 = setDatabaseOption(pCxt, yymsp[-2].minor.yy872, DB_OPTION_WAL_ROLL_PERIOD, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy872 = yylhsminor.yy872; break; - case 125: /* db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */ -{ yylhsminor.yy1000 = setDatabaseOption(pCxt, yymsp[-2].minor.yy1000, DB_OPTION_WAL_SEGMENT_SIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy1000 = yylhsminor.yy1000; + case 126: /* db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */ +{ yylhsminor.yy872 = setDatabaseOption(pCxt, yymsp[-2].minor.yy872, DB_OPTION_WAL_SEGMENT_SIZE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy872 = yylhsminor.yy872; break; - case 126: /* db_options ::= db_options STT_TRIGGER NK_INTEGER */ -{ yylhsminor.yy1000 = setDatabaseOption(pCxt, yymsp[-2].minor.yy1000, DB_OPTION_STT_TRIGGER, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy1000 = yylhsminor.yy1000; + case 127: /* db_options ::= db_options STT_TRIGGER NK_INTEGER */ +{ yylhsminor.yy872 = setDatabaseOption(pCxt, yymsp[-2].minor.yy872, DB_OPTION_STT_TRIGGER, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy872 = yylhsminor.yy872; break; - case 127: /* db_options ::= db_options TABLE_PREFIX signed */ -{ yylhsminor.yy1000 = setDatabaseOption(pCxt, yymsp[-2].minor.yy1000, DB_OPTION_TABLE_PREFIX, yymsp[0].minor.yy1000); } - yymsp[-2].minor.yy1000 = yylhsminor.yy1000; + case 128: /* db_options ::= db_options TABLE_PREFIX signed */ +{ yylhsminor.yy872 = setDatabaseOption(pCxt, yymsp[-2].minor.yy872, DB_OPTION_TABLE_PREFIX, yymsp[0].minor.yy872); } + yymsp[-2].minor.yy872 = yylhsminor.yy872; break; - case 128: /* db_options ::= db_options TABLE_SUFFIX signed */ -{ yylhsminor.yy1000 = setDatabaseOption(pCxt, yymsp[-2].minor.yy1000, DB_OPTION_TABLE_SUFFIX, yymsp[0].minor.yy1000); } - yymsp[-2].minor.yy1000 = yylhsminor.yy1000; + case 129: /* db_options ::= db_options TABLE_SUFFIX signed */ +{ yylhsminor.yy872 = setDatabaseOption(pCxt, yymsp[-2].minor.yy872, DB_OPTION_TABLE_SUFFIX, yymsp[0].minor.yy872); } + yymsp[-2].minor.yy872 = yylhsminor.yy872; break; - case 129: /* db_options ::= db_options KEEP_TIME_OFFSET NK_INTEGER */ -{ yylhsminor.yy1000 = setDatabaseOption(pCxt, yymsp[-2].minor.yy1000, DB_OPTION_KEEP_TIME_OFFSET, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy1000 = yylhsminor.yy1000; + case 130: /* db_options ::= db_options S3_CHUNKSIZE NK_INTEGER */ +{ yylhsminor.yy872 = setDatabaseOption(pCxt, yymsp[-2].minor.yy872, DB_OPTION_S3_CHUNKSIZE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy872 = yylhsminor.yy872; break; - case 130: /* db_options ::= db_options ENCRYPT_ALGORITHM NK_STRING */ -{ yylhsminor.yy1000 = setDatabaseOption(pCxt, yymsp[-2].minor.yy1000, DB_OPTION_ENCRYPT_ALGORITHM, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy1000 = yylhsminor.yy1000; + case 131: /* db_options ::= db_options S3_KEEPLOCAL NK_INTEGER */ + case 132: /* db_options ::= db_options S3_KEEPLOCAL NK_VARIABLE */ yytestcase(yyruleno==132); +{ yylhsminor.yy872 = setDatabaseOption(pCxt, yymsp[-2].minor.yy872, DB_OPTION_S3_KEEPLOCAL, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy872 = yylhsminor.yy872; break; - case 131: /* alter_db_options ::= alter_db_option */ -{ yylhsminor.yy1000 = createAlterDatabaseOptions(pCxt); yylhsminor.yy1000 = setAlterDatabaseOption(pCxt, yylhsminor.yy1000, &yymsp[0].minor.yy941); } - yymsp[0].minor.yy1000 = yylhsminor.yy1000; + case 133: /* db_options ::= db_options S3_COMPACT NK_INTEGER */ +{ yylhsminor.yy872 = setDatabaseOption(pCxt, yymsp[-2].minor.yy872, DB_OPTION_S3_COMPACT, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy872 = yylhsminor.yy872; break; - case 132: /* alter_db_options ::= alter_db_options alter_db_option */ -{ yylhsminor.yy1000 = setAlterDatabaseOption(pCxt, yymsp[-1].minor.yy1000, &yymsp[0].minor.yy941); } - yymsp[-1].minor.yy1000 = yylhsminor.yy1000; + case 134: /* db_options ::= db_options KEEP_TIME_OFFSET NK_INTEGER */ +{ yylhsminor.yy872 = setDatabaseOption(pCxt, yymsp[-2].minor.yy872, DB_OPTION_KEEP_TIME_OFFSET, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy872 = yylhsminor.yy872; break; - case 133: /* alter_db_option ::= BUFFER NK_INTEGER */ -{ yymsp[-1].minor.yy941.type = DB_OPTION_BUFFER; yymsp[-1].minor.yy941.val = yymsp[0].minor.yy0; } + case 135: /* db_options ::= db_options ENCRYPT_ALGORITHM NK_STRING */ +{ yylhsminor.yy872 = setDatabaseOption(pCxt, yymsp[-2].minor.yy872, DB_OPTION_ENCRYPT_ALGORITHM, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy872 = yylhsminor.yy872; break; - case 134: /* alter_db_option ::= CACHEMODEL NK_STRING */ -{ yymsp[-1].minor.yy941.type = DB_OPTION_CACHEMODEL; yymsp[-1].minor.yy941.val = yymsp[0].minor.yy0; } + case 136: /* alter_db_options ::= alter_db_option */ +{ yylhsminor.yy872 = createAlterDatabaseOptions(pCxt); yylhsminor.yy872 = setAlterDatabaseOption(pCxt, yylhsminor.yy872, &yymsp[0].minor.yy893); } + yymsp[0].minor.yy872 = yylhsminor.yy872; break; - case 135: /* alter_db_option ::= CACHESIZE NK_INTEGER */ -{ yymsp[-1].minor.yy941.type = DB_OPTION_CACHESIZE; yymsp[-1].minor.yy941.val = yymsp[0].minor.yy0; } + case 137: /* alter_db_options ::= alter_db_options alter_db_option */ +{ yylhsminor.yy872 = setAlterDatabaseOption(pCxt, yymsp[-1].minor.yy872, &yymsp[0].minor.yy893); } + yymsp[-1].minor.yy872 = yylhsminor.yy872; break; - case 136: /* alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */ -{ yymsp[-1].minor.yy941.type = DB_OPTION_FSYNC; yymsp[-1].minor.yy941.val = yymsp[0].minor.yy0; } + case 138: /* alter_db_option ::= BUFFER NK_INTEGER */ +{ yymsp[-1].minor.yy893.type = DB_OPTION_BUFFER; yymsp[-1].minor.yy893.val = yymsp[0].minor.yy0; } break; - case 137: /* alter_db_option ::= KEEP integer_list */ - case 138: /* alter_db_option ::= KEEP variable_list */ yytestcase(yyruleno==138); -{ yymsp[-1].minor.yy941.type = DB_OPTION_KEEP; yymsp[-1].minor.yy941.pList = yymsp[0].minor.yy72; } + case 139: /* alter_db_option ::= CACHEMODEL NK_STRING */ +{ yymsp[-1].minor.yy893.type = DB_OPTION_CACHEMODEL; yymsp[-1].minor.yy893.val = yymsp[0].minor.yy0; } break; - case 139: /* alter_db_option ::= PAGES NK_INTEGER */ -{ yymsp[-1].minor.yy941.type = DB_OPTION_PAGES; yymsp[-1].minor.yy941.val = yymsp[0].minor.yy0; } + case 140: /* alter_db_option ::= CACHESIZE NK_INTEGER */ +{ yymsp[-1].minor.yy893.type = DB_OPTION_CACHESIZE; yymsp[-1].minor.yy893.val = yymsp[0].minor.yy0; } break; - case 140: /* alter_db_option ::= REPLICA NK_INTEGER */ -{ yymsp[-1].minor.yy941.type = DB_OPTION_REPLICA; yymsp[-1].minor.yy941.val = yymsp[0].minor.yy0; } + case 141: /* alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */ +{ yymsp[-1].minor.yy893.type = DB_OPTION_FSYNC; yymsp[-1].minor.yy893.val = yymsp[0].minor.yy0; } break; - case 141: /* alter_db_option ::= WAL_LEVEL NK_INTEGER */ -{ yymsp[-1].minor.yy941.type = DB_OPTION_WAL; yymsp[-1].minor.yy941.val = yymsp[0].minor.yy0; } + case 142: /* alter_db_option ::= KEEP integer_list */ + case 143: /* alter_db_option ::= KEEP variable_list */ yytestcase(yyruleno==143); +{ yymsp[-1].minor.yy893.type = DB_OPTION_KEEP; yymsp[-1].minor.yy893.pList = yymsp[0].minor.yy376; } break; - case 142: /* alter_db_option ::= STT_TRIGGER NK_INTEGER */ -{ yymsp[-1].minor.yy941.type = DB_OPTION_STT_TRIGGER; yymsp[-1].minor.yy941.val = yymsp[0].minor.yy0; } + case 144: /* alter_db_option ::= PAGES NK_INTEGER */ +{ yymsp[-1].minor.yy893.type = DB_OPTION_PAGES; yymsp[-1].minor.yy893.val = yymsp[0].minor.yy0; } break; - case 143: /* alter_db_option ::= MINROWS NK_INTEGER */ -{ yymsp[-1].minor.yy941.type = DB_OPTION_MINROWS; yymsp[-1].minor.yy941.val = yymsp[0].minor.yy0; } + case 145: /* alter_db_option ::= REPLICA NK_INTEGER */ +{ yymsp[-1].minor.yy893.type = DB_OPTION_REPLICA; yymsp[-1].minor.yy893.val = yymsp[0].minor.yy0; } break; - case 144: /* alter_db_option ::= WAL_RETENTION_PERIOD NK_INTEGER */ -{ yymsp[-1].minor.yy941.type = DB_OPTION_WAL_RETENTION_PERIOD; yymsp[-1].minor.yy941.val = yymsp[0].minor.yy0; } + case 146: /* alter_db_option ::= WAL_LEVEL NK_INTEGER */ +{ yymsp[-1].minor.yy893.type = DB_OPTION_WAL; yymsp[-1].minor.yy893.val = yymsp[0].minor.yy0; } break; - case 145: /* alter_db_option ::= WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ + case 147: /* alter_db_option ::= STT_TRIGGER NK_INTEGER */ +{ yymsp[-1].minor.yy893.type = DB_OPTION_STT_TRIGGER; yymsp[-1].minor.yy893.val = yymsp[0].minor.yy0; } + break; + case 148: /* alter_db_option ::= MINROWS NK_INTEGER */ +{ yymsp[-1].minor.yy893.type = DB_OPTION_MINROWS; yymsp[-1].minor.yy893.val = yymsp[0].minor.yy0; } + break; + case 149: /* alter_db_option ::= WAL_RETENTION_PERIOD NK_INTEGER */ +{ yymsp[-1].minor.yy893.type = DB_OPTION_WAL_RETENTION_PERIOD; yymsp[-1].minor.yy893.val = yymsp[0].minor.yy0; } + break; + case 150: /* 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.yy941.type = DB_OPTION_WAL_RETENTION_PERIOD; yymsp[-2].minor.yy941.val = t; + yymsp[-2].minor.yy893.type = DB_OPTION_WAL_RETENTION_PERIOD; yymsp[-2].minor.yy893.val = t; } break; - case 146: /* alter_db_option ::= WAL_RETENTION_SIZE NK_INTEGER */ -{ yymsp[-1].minor.yy941.type = DB_OPTION_WAL_RETENTION_SIZE; yymsp[-1].minor.yy941.val = yymsp[0].minor.yy0; } + case 151: /* alter_db_option ::= WAL_RETENTION_SIZE NK_INTEGER */ +{ yymsp[-1].minor.yy893.type = DB_OPTION_WAL_RETENTION_SIZE; yymsp[-1].minor.yy893.val = yymsp[0].minor.yy0; } break; - case 147: /* alter_db_option ::= WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ + case 152: /* 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.yy941.type = DB_OPTION_WAL_RETENTION_SIZE; yymsp[-2].minor.yy941.val = t; + yymsp[-2].minor.yy893.type = DB_OPTION_WAL_RETENTION_SIZE; yymsp[-2].minor.yy893.val = t; } break; - case 148: /* alter_db_option ::= KEEP_TIME_OFFSET NK_INTEGER */ -{ yymsp[-1].minor.yy941.type = DB_OPTION_KEEP_TIME_OFFSET; yymsp[-1].minor.yy941.val = yymsp[0].minor.yy0; } - break; - case 149: /* alter_db_option ::= ENCRYPT_ALGORITHM NK_STRING */ -{ yymsp[-1].minor.yy941.type = DB_OPTION_ENCRYPT_ALGORITHM; yymsp[-1].minor.yy941.val = yymsp[0].minor.yy0; } - break; - case 150: /* integer_list ::= NK_INTEGER */ -{ yylhsminor.yy72 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy72 = yylhsminor.yy72; - break; - case 151: /* integer_list ::= integer_list NK_COMMA NK_INTEGER */ - case 417: /* dnode_list ::= dnode_list DNODE NK_INTEGER */ yytestcase(yyruleno==417); -{ yylhsminor.yy72 = addNodeToList(pCxt, yymsp[-2].minor.yy72, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } - yymsp[-2].minor.yy72 = yylhsminor.yy72; - break; - case 152: /* variable_list ::= NK_VARIABLE */ -{ yylhsminor.yy72 = createNodeList(pCxt, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy72 = yylhsminor.yy72; - break; - case 153: /* variable_list ::= variable_list NK_COMMA NK_VARIABLE */ -{ yylhsminor.yy72 = addNodeToList(pCxt, yymsp[-2].minor.yy72, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[-2].minor.yy72 = yylhsminor.yy72; - break; - case 154: /* retention_list ::= retention */ - case 185: /* multi_create_clause ::= create_subtable_clause */ yytestcase(yyruleno==185); - case 188: /* multi_drop_clause ::= drop_table_clause */ yytestcase(yyruleno==188); - case 195: /* column_def_list ::= column_def */ yytestcase(yyruleno==195); - case 244: /* rollup_func_list ::= rollup_func_name */ yytestcase(yyruleno==244); - case 249: /* col_name_list ::= col_name */ yytestcase(yyruleno==249); - case 318: /* tag_list_opt ::= tag_item */ yytestcase(yyruleno==318); - case 335: /* func_list ::= func */ yytestcase(yyruleno==335); - case 385: /* column_stream_def_list ::= column_stream_def */ yytestcase(yyruleno==385); - case 461: /* tags_literal_list ::= tags_literal */ yytestcase(yyruleno==461); - case 486: /* literal_list ::= signed_literal */ yytestcase(yyruleno==486); - case 559: /* other_para_list ::= star_func_para */ yytestcase(yyruleno==559); - case 565: /* when_then_list ::= when_then_expr */ yytestcase(yyruleno==565); - case 624: /* select_list ::= select_item */ yytestcase(yyruleno==624); - case 635: /* partition_list ::= partition_item */ yytestcase(yyruleno==635); - case 696: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==696); -{ yylhsminor.yy72 = createNodeList(pCxt, yymsp[0].minor.yy1000); } - yymsp[0].minor.yy72 = yylhsminor.yy72; - break; - case 155: /* retention_list ::= retention_list NK_COMMA retention */ - case 189: /* multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause */ yytestcase(yyruleno==189); - case 196: /* column_def_list ::= column_def_list NK_COMMA column_def */ yytestcase(yyruleno==196); - case 245: /* rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ yytestcase(yyruleno==245); - case 250: /* col_name_list ::= col_name_list NK_COMMA col_name */ yytestcase(yyruleno==250); - case 319: /* tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ yytestcase(yyruleno==319); - case 336: /* func_list ::= func_list NK_COMMA func */ yytestcase(yyruleno==336); - case 386: /* column_stream_def_list ::= column_stream_def_list NK_COMMA column_stream_def */ yytestcase(yyruleno==386); - case 462: /* tags_literal_list ::= tags_literal_list NK_COMMA tags_literal */ yytestcase(yyruleno==462); - case 487: /* literal_list ::= literal_list NK_COMMA signed_literal */ yytestcase(yyruleno==487); - case 560: /* other_para_list ::= other_para_list NK_COMMA star_func_para */ yytestcase(yyruleno==560); - case 625: /* select_list ::= select_list NK_COMMA select_item */ yytestcase(yyruleno==625); - case 636: /* partition_list ::= partition_list NK_COMMA partition_item */ yytestcase(yyruleno==636); - case 697: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==697); -{ yylhsminor.yy72 = addNodeToList(pCxt, yymsp[-2].minor.yy72, yymsp[0].minor.yy1000); } - yymsp[-2].minor.yy72 = yylhsminor.yy72; - break; - case 156: /* retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ - case 157: /* retention ::= NK_MINUS NK_COLON NK_VARIABLE */ yytestcase(yyruleno==157); -{ yylhsminor.yy1000 = createNodeListNodeEx(pCxt, createDurationValueNode(pCxt, &yymsp[-2].minor.yy0), createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[-2].minor.yy1000 = yylhsminor.yy1000; - break; - case 158: /* speed_opt ::= */ - case 369: /* bufsize_opt ::= */ yytestcase(yyruleno==369); -{ yymsp[1].minor.yy444 = 0; } - break; - case 159: /* speed_opt ::= BWLIMIT NK_INTEGER */ - case 370: /* bufsize_opt ::= BUFSIZE NK_INTEGER */ yytestcase(yyruleno==370); -{ yymsp[-1].minor.yy444 = taosStr2Int32(yymsp[0].minor.yy0.z, NULL, 10); } - break; - case 161: /* start_opt ::= START WITH NK_INTEGER */ - case 165: /* end_opt ::= END WITH NK_INTEGER */ yytestcase(yyruleno==165); -{ yymsp[-2].minor.yy1000 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } - break; - case 162: /* start_opt ::= START WITH NK_STRING */ - case 166: /* end_opt ::= END WITH NK_STRING */ yytestcase(yyruleno==166); -{ yymsp[-2].minor.yy1000 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } - break; - case 163: /* start_opt ::= START WITH TIMESTAMP NK_STRING */ - case 167: /* end_opt ::= END WITH TIMESTAMP NK_STRING */ yytestcase(yyruleno==167); -{ yymsp[-3].minor.yy1000 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } - break; - case 168: /* cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ - case 170: /* cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ yytestcase(yyruleno==170); -{ pCxt->pRootNode = createCreateTableStmt(pCxt, yymsp[-6].minor.yy985, yymsp[-5].minor.yy1000, yymsp[-3].minor.yy72, yymsp[-1].minor.yy72, yymsp[0].minor.yy1000); } - break; - case 169: /* cmd ::= CREATE TABLE multi_create_clause */ -{ pCxt->pRootNode = createCreateMultiTableStmt(pCxt, yymsp[0].minor.yy72); } - break; - case 171: /* cmd ::= DROP TABLE multi_drop_clause */ -{ pCxt->pRootNode = createDropTableStmt(pCxt, yymsp[0].minor.yy72); } - break; - case 172: /* cmd ::= DROP STABLE exists_opt full_table_name */ -{ pCxt->pRootNode = createDropSuperTableStmt(pCxt, yymsp[-1].minor.yy985, yymsp[0].minor.yy1000); } - break; - case 173: /* cmd ::= ALTER TABLE alter_table_clause */ - case 419: /* cmd ::= query_or_subquery */ yytestcase(yyruleno==419); - case 420: /* cmd ::= insert_query */ yytestcase(yyruleno==420); -{ pCxt->pRootNode = yymsp[0].minor.yy1000; } - break; - case 174: /* cmd ::= ALTER STABLE alter_table_clause */ -{ pCxt->pRootNode = setAlterSuperTableType(yymsp[0].minor.yy1000); } - break; - case 175: /* alter_table_clause ::= full_table_name alter_table_options */ -{ yylhsminor.yy1000 = createAlterTableModifyOptions(pCxt, yymsp[-1].minor.yy1000, yymsp[0].minor.yy1000); } - yymsp[-1].minor.yy1000 = yylhsminor.yy1000; - break; - case 176: /* alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ -{ yylhsminor.yy1000 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy1000, TSDB_ALTER_TABLE_ADD_COLUMN, &yymsp[-1].minor.yy305, yymsp[0].minor.yy56); } - yymsp[-4].minor.yy1000 = yylhsminor.yy1000; - break; - case 177: /* alter_table_clause ::= full_table_name DROP COLUMN column_name */ -{ yylhsminor.yy1000 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy1000, TSDB_ALTER_TABLE_DROP_COLUMN, &yymsp[0].minor.yy305); } - yymsp[-3].minor.yy1000 = yylhsminor.yy1000; - break; - case 178: /* alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ -{ yylhsminor.yy1000 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy1000, TSDB_ALTER_TABLE_UPDATE_COLUMN_BYTES, &yymsp[-1].minor.yy305, yymsp[0].minor.yy56); } - yymsp[-4].minor.yy1000 = yylhsminor.yy1000; - break; - case 179: /* alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ -{ yylhsminor.yy1000 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy1000, TSDB_ALTER_TABLE_UPDATE_COLUMN_NAME, &yymsp[-1].minor.yy305, &yymsp[0].minor.yy305); } - yymsp[-4].minor.yy1000 = yylhsminor.yy1000; - break; - case 180: /* alter_table_clause ::= full_table_name ADD TAG column_name type_name */ -{ yylhsminor.yy1000 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy1000, TSDB_ALTER_TABLE_ADD_TAG, &yymsp[-1].minor.yy305, yymsp[0].minor.yy56); } - yymsp[-4].minor.yy1000 = yylhsminor.yy1000; - break; - case 181: /* alter_table_clause ::= full_table_name DROP TAG column_name */ -{ yylhsminor.yy1000 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy1000, TSDB_ALTER_TABLE_DROP_TAG, &yymsp[0].minor.yy305); } - yymsp[-3].minor.yy1000 = yylhsminor.yy1000; + case 153: /* alter_db_option ::= S3_KEEPLOCAL NK_INTEGER */ + case 154: /* alter_db_option ::= S3_KEEPLOCAL NK_VARIABLE */ yytestcase(yyruleno==154); +{ yymsp[-1].minor.yy893.type = DB_OPTION_S3_KEEPLOCAL; yymsp[-1].minor.yy893.val = yymsp[0].minor.yy0; } + break; + case 155: /* alter_db_option ::= S3_COMPACT NK_INTEGER */ +{ yymsp[-1].minor.yy893.type = DB_OPTION_S3_COMPACT, yymsp[-1].minor.yy893.val = yymsp[0].minor.yy0; } + break; + case 156: /* alter_db_option ::= KEEP_TIME_OFFSET NK_INTEGER */ +{ yymsp[-1].minor.yy893.type = DB_OPTION_KEEP_TIME_OFFSET; yymsp[-1].minor.yy893.val = yymsp[0].minor.yy0; } + break; + case 157: /* alter_db_option ::= ENCRYPT_ALGORITHM NK_STRING */ +{ yymsp[-1].minor.yy893.type = DB_OPTION_ENCRYPT_ALGORITHM; yymsp[-1].minor.yy893.val = yymsp[0].minor.yy0; } + break; + case 158: /* integer_list ::= NK_INTEGER */ +{ yylhsminor.yy376 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy376 = yylhsminor.yy376; + break; + case 159: /* integer_list ::= integer_list NK_COMMA NK_INTEGER */ + case 425: /* dnode_list ::= dnode_list DNODE NK_INTEGER */ yytestcase(yyruleno==425); +{ yylhsminor.yy376 = addNodeToList(pCxt, yymsp[-2].minor.yy376, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } + yymsp[-2].minor.yy376 = yylhsminor.yy376; + break; + case 160: /* variable_list ::= NK_VARIABLE */ +{ yylhsminor.yy376 = createNodeList(pCxt, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy376 = yylhsminor.yy376; + break; + case 161: /* variable_list ::= variable_list NK_COMMA NK_VARIABLE */ +{ yylhsminor.yy376 = addNodeToList(pCxt, yymsp[-2].minor.yy376, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[-2].minor.yy376 = yylhsminor.yy376; + break; + case 162: /* retention_list ::= retention */ + case 193: /* multi_create_clause ::= create_subtable_clause */ yytestcase(yyruleno==193); + case 196: /* multi_drop_clause ::= drop_table_clause */ yytestcase(yyruleno==196); + case 203: /* column_def_list ::= column_def */ yytestcase(yyruleno==203); + case 252: /* rollup_func_list ::= rollup_func_name */ yytestcase(yyruleno==252); + case 257: /* col_name_list ::= col_name */ yytestcase(yyruleno==257); + case 326: /* tag_list_opt ::= tag_item */ yytestcase(yyruleno==326); + case 343: /* func_list ::= func */ yytestcase(yyruleno==343); + case 393: /* column_stream_def_list ::= column_stream_def */ yytestcase(yyruleno==393); + case 469: /* tags_literal_list ::= tags_literal */ yytestcase(yyruleno==469); + case 494: /* literal_list ::= signed_literal */ yytestcase(yyruleno==494); + case 567: /* other_para_list ::= star_func_para */ yytestcase(yyruleno==567); + case 573: /* when_then_list ::= when_then_expr */ yytestcase(yyruleno==573); + case 632: /* select_list ::= select_item */ yytestcase(yyruleno==632); + case 643: /* partition_list ::= partition_item */ yytestcase(yyruleno==643); + case 704: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==704); +{ yylhsminor.yy376 = createNodeList(pCxt, yymsp[0].minor.yy872); } + yymsp[0].minor.yy376 = yylhsminor.yy376; + break; + case 163: /* retention_list ::= retention_list NK_COMMA retention */ + case 197: /* multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause */ yytestcase(yyruleno==197); + case 204: /* column_def_list ::= column_def_list NK_COMMA column_def */ yytestcase(yyruleno==204); + case 253: /* rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ yytestcase(yyruleno==253); + case 258: /* col_name_list ::= col_name_list NK_COMMA col_name */ yytestcase(yyruleno==258); + case 327: /* tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ yytestcase(yyruleno==327); + case 344: /* func_list ::= func_list NK_COMMA func */ yytestcase(yyruleno==344); + case 394: /* column_stream_def_list ::= column_stream_def_list NK_COMMA column_stream_def */ yytestcase(yyruleno==394); + case 470: /* tags_literal_list ::= tags_literal_list NK_COMMA tags_literal */ yytestcase(yyruleno==470); + case 495: /* literal_list ::= literal_list NK_COMMA signed_literal */ yytestcase(yyruleno==495); + case 568: /* other_para_list ::= other_para_list NK_COMMA star_func_para */ yytestcase(yyruleno==568); + case 633: /* select_list ::= select_list NK_COMMA select_item */ yytestcase(yyruleno==633); + case 644: /* partition_list ::= partition_list NK_COMMA partition_item */ yytestcase(yyruleno==644); + case 705: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==705); +{ yylhsminor.yy376 = addNodeToList(pCxt, yymsp[-2].minor.yy376, yymsp[0].minor.yy872); } + yymsp[-2].minor.yy376 = yylhsminor.yy376; + break; + case 164: /* retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ + case 165: /* retention ::= NK_MINUS NK_COLON NK_VARIABLE */ yytestcase(yyruleno==165); +{ yylhsminor.yy872 = createNodeListNodeEx(pCxt, createDurationValueNode(pCxt, &yymsp[-2].minor.yy0), createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[-2].minor.yy872 = yylhsminor.yy872; + break; + case 166: /* speed_opt ::= */ + case 377: /* bufsize_opt ::= */ yytestcase(yyruleno==377); +{ yymsp[1].minor.yy772 = 0; } + break; + case 167: /* speed_opt ::= BWLIMIT NK_INTEGER */ + case 378: /* bufsize_opt ::= BUFSIZE NK_INTEGER */ yytestcase(yyruleno==378); +{ yymsp[-1].minor.yy772 = taosStr2Int32(yymsp[0].minor.yy0.z, NULL, 10); } + break; + case 169: /* start_opt ::= START WITH NK_INTEGER */ + case 173: /* end_opt ::= END WITH NK_INTEGER */ yytestcase(yyruleno==173); +{ yymsp[-2].minor.yy872 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } + break; + case 170: /* start_opt ::= START WITH NK_STRING */ + case 174: /* end_opt ::= END WITH NK_STRING */ yytestcase(yyruleno==174); +{ yymsp[-2].minor.yy872 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } + break; + case 171: /* start_opt ::= START WITH TIMESTAMP NK_STRING */ + case 175: /* end_opt ::= END WITH TIMESTAMP NK_STRING */ yytestcase(yyruleno==175); +{ yymsp[-3].minor.yy872 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } + break; + case 176: /* cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ + case 178: /* cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ yytestcase(yyruleno==178); +{ pCxt->pRootNode = createCreateTableStmt(pCxt, yymsp[-6].minor.yy185, yymsp[-5].minor.yy872, yymsp[-3].minor.yy376, yymsp[-1].minor.yy376, yymsp[0].minor.yy872); } + break; + case 177: /* cmd ::= CREATE TABLE multi_create_clause */ +{ pCxt->pRootNode = createCreateMultiTableStmt(pCxt, yymsp[0].minor.yy376); } + break; + case 179: /* cmd ::= DROP TABLE multi_drop_clause */ +{ pCxt->pRootNode = createDropTableStmt(pCxt, yymsp[0].minor.yy376); } + break; + case 180: /* cmd ::= DROP STABLE exists_opt full_table_name */ +{ pCxt->pRootNode = createDropSuperTableStmt(pCxt, yymsp[-1].minor.yy185, yymsp[0].minor.yy872); } + break; + case 181: /* cmd ::= ALTER TABLE alter_table_clause */ + case 427: /* cmd ::= query_or_subquery */ yytestcase(yyruleno==427); + case 428: /* cmd ::= insert_query */ yytestcase(yyruleno==428); +{ pCxt->pRootNode = yymsp[0].minor.yy872; } + break; + case 182: /* cmd ::= ALTER STABLE alter_table_clause */ +{ pCxt->pRootNode = setAlterSuperTableType(yymsp[0].minor.yy872); } + break; + case 183: /* alter_table_clause ::= full_table_name alter_table_options */ +{ yylhsminor.yy872 = createAlterTableModifyOptions(pCxt, yymsp[-1].minor.yy872, yymsp[0].minor.yy872); } + yymsp[-1].minor.yy872 = yylhsminor.yy872; + break; + case 184: /* alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ +{ yylhsminor.yy872 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy872, TSDB_ALTER_TABLE_ADD_COLUMN, &yymsp[-1].minor.yy833, yymsp[0].minor.yy400); } + yymsp[-4].minor.yy872 = yylhsminor.yy872; + break; + case 185: /* alter_table_clause ::= full_table_name DROP COLUMN column_name */ +{ yylhsminor.yy872 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy872, TSDB_ALTER_TABLE_DROP_COLUMN, &yymsp[0].minor.yy833); } + yymsp[-3].minor.yy872 = yylhsminor.yy872; + break; + case 186: /* alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ +{ yylhsminor.yy872 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy872, TSDB_ALTER_TABLE_UPDATE_COLUMN_BYTES, &yymsp[-1].minor.yy833, yymsp[0].minor.yy400); } + yymsp[-4].minor.yy872 = yylhsminor.yy872; + break; + case 187: /* alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ +{ yylhsminor.yy872 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy872, TSDB_ALTER_TABLE_UPDATE_COLUMN_NAME, &yymsp[-1].minor.yy833, &yymsp[0].minor.yy833); } + yymsp[-4].minor.yy872 = yylhsminor.yy872; + break; + case 188: /* alter_table_clause ::= full_table_name ADD TAG column_name type_name */ +{ yylhsminor.yy872 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy872, TSDB_ALTER_TABLE_ADD_TAG, &yymsp[-1].minor.yy833, yymsp[0].minor.yy400); } + yymsp[-4].minor.yy872 = yylhsminor.yy872; + break; + case 189: /* alter_table_clause ::= full_table_name DROP TAG column_name */ +{ yylhsminor.yy872 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy872, TSDB_ALTER_TABLE_DROP_TAG, &yymsp[0].minor.yy833); } + yymsp[-3].minor.yy872 = yylhsminor.yy872; break; - case 182: /* alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ -{ yylhsminor.yy1000 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy1000, TSDB_ALTER_TABLE_UPDATE_TAG_BYTES, &yymsp[-1].minor.yy305, yymsp[0].minor.yy56); } - yymsp[-4].minor.yy1000 = yylhsminor.yy1000; + case 190: /* alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ +{ yylhsminor.yy872 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy872, TSDB_ALTER_TABLE_UPDATE_TAG_BYTES, &yymsp[-1].minor.yy833, yymsp[0].minor.yy400); } + yymsp[-4].minor.yy872 = yylhsminor.yy872; break; - case 183: /* alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ -{ yylhsminor.yy1000 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy1000, TSDB_ALTER_TABLE_UPDATE_TAG_NAME, &yymsp[-1].minor.yy305, &yymsp[0].minor.yy305); } - yymsp[-4].minor.yy1000 = yylhsminor.yy1000; + case 191: /* alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ +{ yylhsminor.yy872 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy872, TSDB_ALTER_TABLE_UPDATE_TAG_NAME, &yymsp[-1].minor.yy833, &yymsp[0].minor.yy833); } + yymsp[-4].minor.yy872 = yylhsminor.yy872; break; - case 184: /* alter_table_clause ::= full_table_name SET TAG column_name NK_EQ tags_literal */ -{ yylhsminor.yy1000 = createAlterTableSetTag(pCxt, yymsp[-5].minor.yy1000, &yymsp[-2].minor.yy305, yymsp[0].minor.yy1000); } - yymsp[-5].minor.yy1000 = yylhsminor.yy1000; + case 192: /* alter_table_clause ::= full_table_name SET TAG column_name NK_EQ tags_literal */ +{ yylhsminor.yy872 = createAlterTableSetTag(pCxt, yymsp[-5].minor.yy872, &yymsp[-2].minor.yy833, yymsp[0].minor.yy872); } + yymsp[-5].minor.yy872 = yylhsminor.yy872; break; - case 186: /* multi_create_clause ::= multi_create_clause create_subtable_clause */ - case 566: /* when_then_list ::= when_then_list when_then_expr */ yytestcase(yyruleno==566); -{ yylhsminor.yy72 = addNodeToList(pCxt, yymsp[-1].minor.yy72, yymsp[0].minor.yy1000); } - yymsp[-1].minor.yy72 = yylhsminor.yy72; + case 194: /* multi_create_clause ::= multi_create_clause create_subtable_clause */ + case 574: /* when_then_list ::= when_then_list when_then_expr */ yytestcase(yyruleno==574); +{ yylhsminor.yy376 = addNodeToList(pCxt, yymsp[-1].minor.yy376, yymsp[0].minor.yy872); } + yymsp[-1].minor.yy376 = yylhsminor.yy376; break; - case 187: /* 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.yy1000 = createCreateSubTableClause(pCxt, yymsp[-9].minor.yy985, yymsp[-8].minor.yy1000, yymsp[-6].minor.yy1000, yymsp[-5].minor.yy72, yymsp[-2].minor.yy72, yymsp[0].minor.yy1000); } - yymsp[-9].minor.yy1000 = yylhsminor.yy1000; + case 195: /* 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.yy872 = createCreateSubTableClause(pCxt, yymsp[-9].minor.yy185, yymsp[-8].minor.yy872, yymsp[-6].minor.yy872, yymsp[-5].minor.yy376, yymsp[-2].minor.yy376, yymsp[0].minor.yy872); } + yymsp[-9].minor.yy872 = yylhsminor.yy872; break; - case 190: /* drop_table_clause ::= exists_opt full_table_name */ -{ yylhsminor.yy1000 = createDropTableClause(pCxt, yymsp[-1].minor.yy985, yymsp[0].minor.yy1000); } - yymsp[-1].minor.yy1000 = yylhsminor.yy1000; + case 198: /* drop_table_clause ::= exists_opt full_table_name */ +{ yylhsminor.yy872 = createDropTableClause(pCxt, yymsp[-1].minor.yy185, yymsp[0].minor.yy872); } + yymsp[-1].minor.yy872 = yylhsminor.yy872; break; - case 192: /* specific_cols_opt ::= NK_LP col_name_list NK_RP */ - case 384: /* col_list_opt ::= NK_LP column_stream_def_list NK_RP */ yytestcase(yyruleno==384); -{ yymsp[-2].minor.yy72 = yymsp[-1].minor.yy72; } + case 200: /* specific_cols_opt ::= NK_LP col_name_list NK_RP */ + case 392: /* col_list_opt ::= NK_LP column_stream_def_list NK_RP */ yytestcase(yyruleno==392); +{ yymsp[-2].minor.yy376 = yymsp[-1].minor.yy376; } break; - case 193: /* full_table_name ::= table_name */ -{ yylhsminor.yy1000 = createRealTableNode(pCxt, NULL, &yymsp[0].minor.yy305, NULL); } - yymsp[0].minor.yy1000 = yylhsminor.yy1000; + case 201: /* full_table_name ::= table_name */ +{ yylhsminor.yy872 = createRealTableNode(pCxt, NULL, &yymsp[0].minor.yy833, NULL); } + yymsp[0].minor.yy872 = yylhsminor.yy872; break; - case 194: /* full_table_name ::= db_name NK_DOT table_name */ -{ yylhsminor.yy1000 = createRealTableNode(pCxt, &yymsp[-2].minor.yy305, &yymsp[0].minor.yy305, NULL); } - yymsp[-2].minor.yy1000 = yylhsminor.yy1000; + case 202: /* full_table_name ::= db_name NK_DOT table_name */ +{ yylhsminor.yy872 = createRealTableNode(pCxt, &yymsp[-2].minor.yy833, &yymsp[0].minor.yy833, NULL); } + yymsp[-2].minor.yy872 = yylhsminor.yy872; break; - case 197: /* column_def ::= column_name type_name */ -{ yylhsminor.yy1000 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy305, yymsp[0].minor.yy56, NULL, false); } - yymsp[-1].minor.yy1000 = yylhsminor.yy1000; + case 205: /* column_def ::= column_name type_name */ +{ yylhsminor.yy872 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy833, yymsp[0].minor.yy400, NULL, false); } + yymsp[-1].minor.yy872 = yylhsminor.yy872; break; - case 198: /* column_def ::= column_name type_name PRIMARY KEY */ -{ yylhsminor.yy1000 = createColumnDefNode(pCxt, &yymsp[-3].minor.yy305, yymsp[-2].minor.yy56, NULL, true); } - yymsp[-3].minor.yy1000 = yylhsminor.yy1000; + case 206: /* column_def ::= column_name type_name PRIMARY KEY */ +{ yylhsminor.yy872 = createColumnDefNode(pCxt, &yymsp[-3].minor.yy833, yymsp[-2].minor.yy400, NULL, true); } + yymsp[-3].minor.yy872 = yylhsminor.yy872; break; - case 199: /* type_name ::= BOOL */ -{ yymsp[0].minor.yy56 = createDataType(TSDB_DATA_TYPE_BOOL); } + case 207: /* type_name ::= BOOL */ +{ yymsp[0].minor.yy400 = createDataType(TSDB_DATA_TYPE_BOOL); } break; - case 200: /* type_name ::= TINYINT */ -{ yymsp[0].minor.yy56 = createDataType(TSDB_DATA_TYPE_TINYINT); } + case 208: /* type_name ::= TINYINT */ +{ yymsp[0].minor.yy400 = createDataType(TSDB_DATA_TYPE_TINYINT); } break; - case 201: /* type_name ::= SMALLINT */ -{ yymsp[0].minor.yy56 = createDataType(TSDB_DATA_TYPE_SMALLINT); } + case 209: /* type_name ::= SMALLINT */ +{ yymsp[0].minor.yy400 = createDataType(TSDB_DATA_TYPE_SMALLINT); } break; - case 202: /* type_name ::= INT */ - case 203: /* type_name ::= INTEGER */ yytestcase(yyruleno==203); -{ yymsp[0].minor.yy56 = createDataType(TSDB_DATA_TYPE_INT); } + case 210: /* type_name ::= INT */ + case 211: /* type_name ::= INTEGER */ yytestcase(yyruleno==211); +{ yymsp[0].minor.yy400 = createDataType(TSDB_DATA_TYPE_INT); } break; - case 204: /* type_name ::= BIGINT */ -{ yymsp[0].minor.yy56 = createDataType(TSDB_DATA_TYPE_BIGINT); } + case 212: /* type_name ::= BIGINT */ +{ yymsp[0].minor.yy400 = createDataType(TSDB_DATA_TYPE_BIGINT); } break; - case 205: /* type_name ::= FLOAT */ -{ yymsp[0].minor.yy56 = createDataType(TSDB_DATA_TYPE_FLOAT); } + case 213: /* type_name ::= FLOAT */ +{ yymsp[0].minor.yy400 = createDataType(TSDB_DATA_TYPE_FLOAT); } break; - case 206: /* type_name ::= DOUBLE */ -{ yymsp[0].minor.yy56 = createDataType(TSDB_DATA_TYPE_DOUBLE); } + case 214: /* type_name ::= DOUBLE */ +{ yymsp[0].minor.yy400 = createDataType(TSDB_DATA_TYPE_DOUBLE); } break; - case 207: /* type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy56 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy0); } + case 215: /* type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ +{ yymsp[-3].minor.yy400 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy0); } break; - case 208: /* type_name ::= TIMESTAMP */ -{ yymsp[0].minor.yy56 = createDataType(TSDB_DATA_TYPE_TIMESTAMP); } + case 216: /* type_name ::= TIMESTAMP */ +{ yymsp[0].minor.yy400 = createDataType(TSDB_DATA_TYPE_TIMESTAMP); } break; - case 209: /* type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy56 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, &yymsp[-1].minor.yy0); } + case 217: /* type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ +{ yymsp[-3].minor.yy400 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, &yymsp[-1].minor.yy0); } break; - case 210: /* type_name ::= TINYINT UNSIGNED */ -{ yymsp[-1].minor.yy56 = createDataType(TSDB_DATA_TYPE_UTINYINT); } + case 218: /* type_name ::= TINYINT UNSIGNED */ +{ yymsp[-1].minor.yy400 = createDataType(TSDB_DATA_TYPE_UTINYINT); } break; - case 211: /* type_name ::= SMALLINT UNSIGNED */ -{ yymsp[-1].minor.yy56 = createDataType(TSDB_DATA_TYPE_USMALLINT); } + case 219: /* type_name ::= SMALLINT UNSIGNED */ +{ yymsp[-1].minor.yy400 = createDataType(TSDB_DATA_TYPE_USMALLINT); } break; - case 212: /* type_name ::= INT UNSIGNED */ -{ yymsp[-1].minor.yy56 = createDataType(TSDB_DATA_TYPE_UINT); } + case 220: /* type_name ::= INT UNSIGNED */ +{ yymsp[-1].minor.yy400 = createDataType(TSDB_DATA_TYPE_UINT); } break; - case 213: /* type_name ::= BIGINT UNSIGNED */ -{ yymsp[-1].minor.yy56 = createDataType(TSDB_DATA_TYPE_UBIGINT); } + case 221: /* type_name ::= BIGINT UNSIGNED */ +{ yymsp[-1].minor.yy400 = createDataType(TSDB_DATA_TYPE_UBIGINT); } break; - case 214: /* type_name ::= JSON */ -{ yymsp[0].minor.yy56 = createDataType(TSDB_DATA_TYPE_JSON); } + case 222: /* type_name ::= JSON */ +{ yymsp[0].minor.yy400 = createDataType(TSDB_DATA_TYPE_JSON); } break; - case 215: /* type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy56 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, &yymsp[-1].minor.yy0); } + case 223: /* type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ +{ yymsp[-3].minor.yy400 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, &yymsp[-1].minor.yy0); } break; - case 216: /* type_name ::= MEDIUMBLOB */ -{ yymsp[0].minor.yy56 = createDataType(TSDB_DATA_TYPE_MEDIUMBLOB); } + case 224: /* type_name ::= MEDIUMBLOB */ +{ yymsp[0].minor.yy400 = createDataType(TSDB_DATA_TYPE_MEDIUMBLOB); } break; - case 217: /* type_name ::= BLOB */ -{ yymsp[0].minor.yy56 = createDataType(TSDB_DATA_TYPE_BLOB); } + case 225: /* type_name ::= BLOB */ +{ yymsp[0].minor.yy400 = createDataType(TSDB_DATA_TYPE_BLOB); } break; - case 218: /* type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy56 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, &yymsp[-1].minor.yy0); } + case 226: /* type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ +{ yymsp[-3].minor.yy400 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, &yymsp[-1].minor.yy0); } break; - case 219: /* type_name ::= GEOMETRY NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy56 = createVarLenDataType(TSDB_DATA_TYPE_GEOMETRY, &yymsp[-1].minor.yy0); } + case 227: /* type_name ::= GEOMETRY NK_LP NK_INTEGER NK_RP */ +{ yymsp[-3].minor.yy400 = createVarLenDataType(TSDB_DATA_TYPE_GEOMETRY, &yymsp[-1].minor.yy0); } break; - case 220: /* type_name ::= DECIMAL */ -{ yymsp[0].minor.yy56 = createDataType(TSDB_DATA_TYPE_DECIMAL); } + case 228: /* type_name ::= DECIMAL */ +{ yymsp[0].minor.yy400 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; - case 221: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy56 = createDataType(TSDB_DATA_TYPE_DECIMAL); } + case 229: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ +{ yymsp[-3].minor.yy400 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; - case 222: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ -{ yymsp[-5].minor.yy56 = createDataType(TSDB_DATA_TYPE_DECIMAL); } + case 230: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ +{ yymsp[-5].minor.yy400 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; - case 223: /* type_name_default_len ::= BINARY */ -{ yymsp[0].minor.yy56 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, NULL); } + case 231: /* type_name_default_len ::= BINARY */ +{ yymsp[0].minor.yy400 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, NULL); } break; - case 224: /* type_name_default_len ::= NCHAR */ -{ yymsp[0].minor.yy56 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, NULL); } + case 232: /* type_name_default_len ::= NCHAR */ +{ yymsp[0].minor.yy400 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, NULL); } break; - case 225: /* type_name_default_len ::= VARCHAR */ -{ yymsp[0].minor.yy56 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, NULL); } + case 233: /* type_name_default_len ::= VARCHAR */ +{ yymsp[0].minor.yy400 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, NULL); } break; - case 226: /* type_name_default_len ::= VARBINARY */ -{ yymsp[0].minor.yy56 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, NULL); } + case 234: /* type_name_default_len ::= VARBINARY */ +{ yymsp[0].minor.yy400 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, NULL); } break; - case 229: /* tags_def ::= TAGS NK_LP column_def_list NK_RP */ - case 391: /* tag_def_or_ref_opt ::= TAGS NK_LP column_stream_def_list NK_RP */ yytestcase(yyruleno==391); -{ yymsp[-3].minor.yy72 = yymsp[-1].minor.yy72; } + case 237: /* tags_def ::= TAGS NK_LP column_def_list NK_RP */ + case 399: /* tag_def_or_ref_opt ::= TAGS NK_LP column_stream_def_list NK_RP */ yytestcase(yyruleno==399); +{ yymsp[-3].minor.yy376 = yymsp[-1].minor.yy376; } break; - case 230: /* table_options ::= */ -{ yymsp[1].minor.yy1000 = createDefaultTableOptions(pCxt); } + case 238: /* table_options ::= */ +{ yymsp[1].minor.yy872 = createDefaultTableOptions(pCxt); } break; - case 231: /* table_options ::= table_options COMMENT NK_STRING */ -{ yylhsminor.yy1000 = setTableOption(pCxt, yymsp[-2].minor.yy1000, TABLE_OPTION_COMMENT, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy1000 = yylhsminor.yy1000; + case 239: /* table_options ::= table_options COMMENT NK_STRING */ +{ yylhsminor.yy872 = setTableOption(pCxt, yymsp[-2].minor.yy872, TABLE_OPTION_COMMENT, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy872 = yylhsminor.yy872; break; - case 232: /* table_options ::= table_options MAX_DELAY duration_list */ -{ yylhsminor.yy1000 = setTableOption(pCxt, yymsp[-2].minor.yy1000, TABLE_OPTION_MAXDELAY, yymsp[0].minor.yy72); } - yymsp[-2].minor.yy1000 = yylhsminor.yy1000; + case 240: /* table_options ::= table_options MAX_DELAY duration_list */ +{ yylhsminor.yy872 = setTableOption(pCxt, yymsp[-2].minor.yy872, TABLE_OPTION_MAXDELAY, yymsp[0].minor.yy376); } + yymsp[-2].minor.yy872 = yylhsminor.yy872; break; - case 233: /* table_options ::= table_options WATERMARK duration_list */ -{ yylhsminor.yy1000 = setTableOption(pCxt, yymsp[-2].minor.yy1000, TABLE_OPTION_WATERMARK, yymsp[0].minor.yy72); } - yymsp[-2].minor.yy1000 = yylhsminor.yy1000; + case 241: /* table_options ::= table_options WATERMARK duration_list */ +{ yylhsminor.yy872 = setTableOption(pCxt, yymsp[-2].minor.yy872, TABLE_OPTION_WATERMARK, yymsp[0].minor.yy376); } + yymsp[-2].minor.yy872 = yylhsminor.yy872; break; - case 234: /* table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ -{ yylhsminor.yy1000 = setTableOption(pCxt, yymsp[-4].minor.yy1000, TABLE_OPTION_ROLLUP, yymsp[-1].minor.yy72); } - yymsp[-4].minor.yy1000 = yylhsminor.yy1000; + case 242: /* table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ +{ yylhsminor.yy872 = setTableOption(pCxt, yymsp[-4].minor.yy872, TABLE_OPTION_ROLLUP, yymsp[-1].minor.yy376); } + yymsp[-4].minor.yy872 = yylhsminor.yy872; break; - case 235: /* table_options ::= table_options TTL NK_INTEGER */ -{ yylhsminor.yy1000 = setTableOption(pCxt, yymsp[-2].minor.yy1000, TABLE_OPTION_TTL, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy1000 = yylhsminor.yy1000; + case 243: /* table_options ::= table_options TTL NK_INTEGER */ +{ yylhsminor.yy872 = setTableOption(pCxt, yymsp[-2].minor.yy872, TABLE_OPTION_TTL, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy872 = yylhsminor.yy872; break; - case 236: /* table_options ::= table_options SMA NK_LP col_name_list NK_RP */ -{ yylhsminor.yy1000 = setTableOption(pCxt, yymsp[-4].minor.yy1000, TABLE_OPTION_SMA, yymsp[-1].minor.yy72); } - yymsp[-4].minor.yy1000 = yylhsminor.yy1000; + case 244: /* table_options ::= table_options SMA NK_LP col_name_list NK_RP */ +{ yylhsminor.yy872 = setTableOption(pCxt, yymsp[-4].minor.yy872, TABLE_OPTION_SMA, yymsp[-1].minor.yy376); } + yymsp[-4].minor.yy872 = yylhsminor.yy872; break; - case 237: /* table_options ::= table_options DELETE_MARK duration_list */ -{ yylhsminor.yy1000 = setTableOption(pCxt, yymsp[-2].minor.yy1000, TABLE_OPTION_DELETE_MARK, yymsp[0].minor.yy72); } - yymsp[-2].minor.yy1000 = yylhsminor.yy1000; + case 245: /* table_options ::= table_options DELETE_MARK duration_list */ +{ yylhsminor.yy872 = setTableOption(pCxt, yymsp[-2].minor.yy872, TABLE_OPTION_DELETE_MARK, yymsp[0].minor.yy376); } + yymsp[-2].minor.yy872 = yylhsminor.yy872; break; - case 238: /* alter_table_options ::= alter_table_option */ -{ yylhsminor.yy1000 = createAlterTableOptions(pCxt); yylhsminor.yy1000 = setTableOption(pCxt, yylhsminor.yy1000, yymsp[0].minor.yy941.type, &yymsp[0].minor.yy941.val); } - yymsp[0].minor.yy1000 = yylhsminor.yy1000; + case 246: /* alter_table_options ::= alter_table_option */ +{ yylhsminor.yy872 = createAlterTableOptions(pCxt); yylhsminor.yy872 = setTableOption(pCxt, yylhsminor.yy872, yymsp[0].minor.yy893.type, &yymsp[0].minor.yy893.val); } + yymsp[0].minor.yy872 = yylhsminor.yy872; break; - case 239: /* alter_table_options ::= alter_table_options alter_table_option */ -{ yylhsminor.yy1000 = setTableOption(pCxt, yymsp[-1].minor.yy1000, yymsp[0].minor.yy941.type, &yymsp[0].minor.yy941.val); } - yymsp[-1].minor.yy1000 = yylhsminor.yy1000; + case 247: /* alter_table_options ::= alter_table_options alter_table_option */ +{ yylhsminor.yy872 = setTableOption(pCxt, yymsp[-1].minor.yy872, yymsp[0].minor.yy893.type, &yymsp[0].minor.yy893.val); } + yymsp[-1].minor.yy872 = yylhsminor.yy872; break; - case 240: /* alter_table_option ::= COMMENT NK_STRING */ -{ yymsp[-1].minor.yy941.type = TABLE_OPTION_COMMENT; yymsp[-1].minor.yy941.val = yymsp[0].minor.yy0; } + case 248: /* alter_table_option ::= COMMENT NK_STRING */ +{ yymsp[-1].minor.yy893.type = TABLE_OPTION_COMMENT; yymsp[-1].minor.yy893.val = yymsp[0].minor.yy0; } break; - case 241: /* alter_table_option ::= TTL NK_INTEGER */ -{ yymsp[-1].minor.yy941.type = TABLE_OPTION_TTL; yymsp[-1].minor.yy941.val = yymsp[0].minor.yy0; } + case 249: /* alter_table_option ::= TTL NK_INTEGER */ +{ yymsp[-1].minor.yy893.type = TABLE_OPTION_TTL; yymsp[-1].minor.yy893.val = yymsp[0].minor.yy0; } break; - case 242: /* duration_list ::= duration_literal */ - case 518: /* expression_list ::= expr_or_subquery */ yytestcase(yyruleno==518); -{ yylhsminor.yy72 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy1000)); } - yymsp[0].minor.yy72 = yylhsminor.yy72; + case 250: /* duration_list ::= duration_literal */ + case 526: /* expression_list ::= expr_or_subquery */ yytestcase(yyruleno==526); +{ yylhsminor.yy376 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy872)); } + yymsp[0].minor.yy376 = yylhsminor.yy376; break; - case 243: /* duration_list ::= duration_list NK_COMMA duration_literal */ - case 519: /* expression_list ::= expression_list NK_COMMA expr_or_subquery */ yytestcase(yyruleno==519); -{ yylhsminor.yy72 = addNodeToList(pCxt, yymsp[-2].minor.yy72, releaseRawExprNode(pCxt, yymsp[0].minor.yy1000)); } - yymsp[-2].minor.yy72 = yylhsminor.yy72; + case 251: /* duration_list ::= duration_list NK_COMMA duration_literal */ + case 527: /* expression_list ::= expression_list NK_COMMA expr_or_subquery */ yytestcase(yyruleno==527); +{ yylhsminor.yy376 = addNodeToList(pCxt, yymsp[-2].minor.yy376, releaseRawExprNode(pCxt, yymsp[0].minor.yy872)); } + yymsp[-2].minor.yy376 = yylhsminor.yy376; break; - case 246: /* rollup_func_name ::= function_name */ -{ yylhsminor.yy1000 = createFunctionNode(pCxt, &yymsp[0].minor.yy305, NULL); } - yymsp[0].minor.yy1000 = yylhsminor.yy1000; + case 254: /* rollup_func_name ::= function_name */ +{ yylhsminor.yy872 = createFunctionNode(pCxt, &yymsp[0].minor.yy833, NULL); } + yymsp[0].minor.yy872 = yylhsminor.yy872; break; - case 247: /* rollup_func_name ::= FIRST */ - case 248: /* rollup_func_name ::= LAST */ yytestcase(yyruleno==248); - case 321: /* tag_item ::= QTAGS */ yytestcase(yyruleno==321); -{ yylhsminor.yy1000 = createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL); } - yymsp[0].minor.yy1000 = yylhsminor.yy1000; + case 255: /* rollup_func_name ::= FIRST */ + case 256: /* rollup_func_name ::= LAST */ yytestcase(yyruleno==256); + case 329: /* tag_item ::= QTAGS */ yytestcase(yyruleno==329); +{ yylhsminor.yy872 = createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL); } + yymsp[0].minor.yy872 = yylhsminor.yy872; break; - case 251: /* col_name ::= column_name */ - case 322: /* tag_item ::= column_name */ yytestcase(yyruleno==322); -{ yylhsminor.yy1000 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy305); } - yymsp[0].minor.yy1000 = yylhsminor.yy1000; + case 259: /* col_name ::= column_name */ + case 330: /* tag_item ::= column_name */ yytestcase(yyruleno==330); +{ yylhsminor.yy872 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy833); } + yymsp[0].minor.yy872 = yylhsminor.yy872; break; - case 252: /* cmd ::= SHOW DNODES */ + case 260: /* cmd ::= SHOW DNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DNODES_STMT); } break; - case 253: /* cmd ::= SHOW USERS */ + case 261: /* cmd ::= SHOW USERS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_USERS_STMT); } break; - case 254: /* cmd ::= SHOW USER PRIVILEGES */ + case 262: /* cmd ::= SHOW USER PRIVILEGES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_USER_PRIVILEGES_STMT); } break; - case 255: /* cmd ::= SHOW db_kind_opt DATABASES */ + case 263: /* cmd ::= SHOW db_kind_opt DATABASES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DATABASES_STMT); - setShowKind(pCxt, pCxt->pRootNode, yymsp[-1].minor.yy761); + setShowKind(pCxt, pCxt->pRootNode, yymsp[-1].minor.yy321); } break; - case 256: /* cmd ::= SHOW table_kind_db_name_cond_opt TABLES like_pattern_opt */ + case 264: /* cmd ::= SHOW table_kind_db_name_cond_opt TABLES like_pattern_opt */ { - pCxt->pRootNode = createShowTablesStmt(pCxt, yymsp[-2].minor.yy517, yymsp[0].minor.yy1000, OP_TYPE_LIKE); + pCxt->pRootNode = createShowTablesStmt(pCxt, yymsp[-2].minor.yy685, yymsp[0].minor.yy872, OP_TYPE_LIKE); } break; - case 257: /* cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_STABLES_STMT, yymsp[-2].minor.yy1000, yymsp[0].minor.yy1000, OP_TYPE_LIKE); } + case 265: /* cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_STABLES_STMT, yymsp[-2].minor.yy872, yymsp[0].minor.yy872, OP_TYPE_LIKE); } break; - case 258: /* cmd ::= SHOW db_name_cond_opt VGROUPS */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, yymsp[-1].minor.yy1000, NULL, OP_TYPE_LIKE); } + case 266: /* cmd ::= SHOW db_name_cond_opt VGROUPS */ +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, yymsp[-1].minor.yy872, NULL, OP_TYPE_LIKE); } break; - case 259: /* cmd ::= SHOW MNODES */ + case 267: /* cmd ::= SHOW MNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_MNODES_STMT); } break; - case 260: /* cmd ::= SHOW QNODES */ + case 268: /* cmd ::= SHOW QNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QNODES_STMT); } break; - case 261: /* cmd ::= SHOW ARBGROUPS */ + case 269: /* cmd ::= SHOW ARBGROUPS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_ARBGROUPS_STMT); } break; - case 262: /* cmd ::= SHOW FUNCTIONS */ + case 270: /* cmd ::= SHOW FUNCTIONS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_FUNCTIONS_STMT); } break; - case 263: /* cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, yymsp[0].minor.yy1000, yymsp[-1].minor.yy1000, OP_TYPE_EQUAL); } + case 271: /* cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, yymsp[0].minor.yy872, yymsp[-1].minor.yy872, OP_TYPE_EQUAL); } break; - case 264: /* cmd ::= SHOW INDEXES FROM db_name NK_DOT table_name */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, createIdentifierValueNode(pCxt, &yymsp[-2].minor.yy305), createIdentifierValueNode(pCxt, &yymsp[0].minor.yy305), OP_TYPE_EQUAL); } + case 272: /* cmd ::= SHOW INDEXES FROM db_name NK_DOT table_name */ +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, createIdentifierValueNode(pCxt, &yymsp[-2].minor.yy833), createIdentifierValueNode(pCxt, &yymsp[0].minor.yy833), OP_TYPE_EQUAL); } break; - case 265: /* cmd ::= SHOW STREAMS */ + case 273: /* cmd ::= SHOW STREAMS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_STREAMS_STMT); } break; - case 266: /* cmd ::= SHOW ACCOUNTS */ + case 274: /* cmd ::= SHOW ACCOUNTS */ { pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); } break; - case 267: /* cmd ::= SHOW APPS */ + case 275: /* cmd ::= SHOW APPS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_APPS_STMT); } break; - case 268: /* cmd ::= SHOW CONNECTIONS */ + case 276: /* cmd ::= SHOW CONNECTIONS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CONNECTIONS_STMT); } break; - case 269: /* cmd ::= SHOW LICENCES */ - case 270: /* cmd ::= SHOW GRANTS */ yytestcase(yyruleno==270); + case 277: /* cmd ::= SHOW LICENCES */ + case 278: /* cmd ::= SHOW GRANTS */ yytestcase(yyruleno==278); { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LICENCES_STMT); } break; - case 271: /* cmd ::= SHOW GRANTS FULL */ + case 279: /* cmd ::= SHOW GRANTS FULL */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_GRANTS_FULL_STMT); } break; - case 272: /* cmd ::= SHOW GRANTS LOGS */ + case 280: /* cmd ::= SHOW GRANTS LOGS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_GRANTS_LOGS_STMT); } break; - case 273: /* cmd ::= SHOW CLUSTER MACHINES */ + case 281: /* cmd ::= SHOW CLUSTER MACHINES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CLUSTER_MACHINES_STMT); } break; - case 274: /* cmd ::= SHOW CREATE DATABASE db_name */ -{ pCxt->pRootNode = createShowCreateDatabaseStmt(pCxt, &yymsp[0].minor.yy305); } + case 282: /* cmd ::= SHOW CREATE DATABASE db_name */ +{ pCxt->pRootNode = createShowCreateDatabaseStmt(pCxt, &yymsp[0].minor.yy833); } break; - case 275: /* cmd ::= SHOW CREATE TABLE full_table_name */ -{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_TABLE_STMT, yymsp[0].minor.yy1000); } + case 283: /* cmd ::= SHOW CREATE TABLE full_table_name */ +{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_TABLE_STMT, yymsp[0].minor.yy872); } break; - case 276: /* cmd ::= SHOW CREATE STABLE full_table_name */ + case 284: /* cmd ::= SHOW CREATE STABLE full_table_name */ { pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_STABLE_STMT, -yymsp[0].minor.yy1000); } +yymsp[0].minor.yy872); } break; - case 277: /* cmd ::= SHOW ENCRYPTIONS */ + case 285: /* cmd ::= SHOW ENCRYPTIONS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_ENCRYPTIONS_STMT); } break; - case 278: /* cmd ::= SHOW QUERIES */ + case 286: /* cmd ::= SHOW QUERIES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QUERIES_STMT); } break; - case 279: /* cmd ::= SHOW SCORES */ + case 287: /* cmd ::= SHOW SCORES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SCORES_STMT); } break; - case 280: /* cmd ::= SHOW TOPICS */ + case 288: /* cmd ::= SHOW TOPICS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TOPICS_STMT); } break; - case 281: /* cmd ::= SHOW VARIABLES */ - case 282: /* cmd ::= SHOW CLUSTER VARIABLES */ yytestcase(yyruleno==282); + case 289: /* cmd ::= SHOW VARIABLES */ + case 290: /* cmd ::= SHOW CLUSTER VARIABLES */ yytestcase(yyruleno==290); { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_VARIABLES_STMT); } break; - case 283: /* cmd ::= SHOW LOCAL VARIABLES */ + case 291: /* cmd ::= SHOW LOCAL VARIABLES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LOCAL_VARIABLES_STMT); } break; - case 284: /* 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.yy1000); } + case 292: /* 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.yy872); } break; - case 285: /* cmd ::= SHOW BNODES */ + case 293: /* cmd ::= SHOW BNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_BNODES_STMT); } break; - case 286: /* cmd ::= SHOW SNODES */ + case 294: /* cmd ::= SHOW SNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SNODES_STMT); } break; - case 287: /* cmd ::= SHOW CLUSTER */ + case 295: /* cmd ::= SHOW CLUSTER */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CLUSTER_STMT); } break; - case 288: /* cmd ::= SHOW TRANSACTIONS */ + case 296: /* cmd ::= SHOW TRANSACTIONS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TRANSACTIONS_STMT); } break; - case 289: /* cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ -{ pCxt->pRootNode = createShowTableDistributedStmt(pCxt, yymsp[0].minor.yy1000); } + case 297: /* cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ +{ pCxt->pRootNode = createShowTableDistributedStmt(pCxt, yymsp[0].minor.yy872); } break; - case 290: /* cmd ::= SHOW CONSUMERS */ + case 298: /* cmd ::= SHOW CONSUMERS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CONSUMERS_STMT); } break; - case 291: /* cmd ::= SHOW SUBSCRIPTIONS */ + case 299: /* cmd ::= SHOW SUBSCRIPTIONS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SUBSCRIPTIONS_STMT); } break; - case 292: /* cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TAGS_STMT, yymsp[0].minor.yy1000, yymsp[-1].minor.yy1000, OP_TYPE_EQUAL); } + case 300: /* cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TAGS_STMT, yymsp[0].minor.yy872, yymsp[-1].minor.yy872, OP_TYPE_EQUAL); } break; - case 293: /* cmd ::= SHOW TAGS FROM db_name NK_DOT table_name */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TAGS_STMT, createIdentifierValueNode(pCxt, &yymsp[-2].minor.yy305), createIdentifierValueNode(pCxt, &yymsp[0].minor.yy305), OP_TYPE_EQUAL); } + case 301: /* cmd ::= SHOW TAGS FROM db_name NK_DOT table_name */ +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TAGS_STMT, createIdentifierValueNode(pCxt, &yymsp[-2].minor.yy833), createIdentifierValueNode(pCxt, &yymsp[0].minor.yy833), OP_TYPE_EQUAL); } break; - case 294: /* cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ -{ pCxt->pRootNode = createShowTableTagsStmt(pCxt, yymsp[-1].minor.yy1000, yymsp[0].minor.yy1000, yymsp[-3].minor.yy72); } + case 302: /* cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ +{ pCxt->pRootNode = createShowTableTagsStmt(pCxt, yymsp[-1].minor.yy872, yymsp[0].minor.yy872, yymsp[-3].minor.yy376); } break; - case 295: /* cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name */ -{ pCxt->pRootNode = createShowTableTagsStmt(pCxt, createIdentifierValueNode(pCxt, &yymsp[0].minor.yy305), createIdentifierValueNode(pCxt, &yymsp[-2].minor.yy305), yymsp[-4].minor.yy72); } + case 303: /* cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name */ +{ pCxt->pRootNode = createShowTableTagsStmt(pCxt, createIdentifierValueNode(pCxt, &yymsp[0].minor.yy833), createIdentifierValueNode(pCxt, &yymsp[-2].minor.yy833), yymsp[-4].minor.yy376); } break; - case 296: /* cmd ::= SHOW VNODES ON DNODE NK_INTEGER */ + case 304: /* cmd ::= SHOW VNODES ON DNODE NK_INTEGER */ { pCxt->pRootNode = createShowVnodesStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0), NULL); } break; - case 297: /* cmd ::= SHOW VNODES */ + case 305: /* cmd ::= SHOW VNODES */ { pCxt->pRootNode = createShowVnodesStmt(pCxt, NULL, NULL); } break; - case 298: /* cmd ::= SHOW db_name_cond_opt ALIVE */ -{ pCxt->pRootNode = createShowAliveStmt(pCxt, yymsp[-1].minor.yy1000, QUERY_NODE_SHOW_DB_ALIVE_STMT); } + case 306: /* cmd ::= SHOW db_name_cond_opt ALIVE */ +{ pCxt->pRootNode = createShowAliveStmt(pCxt, yymsp[-1].minor.yy872, QUERY_NODE_SHOW_DB_ALIVE_STMT); } break; - case 299: /* cmd ::= SHOW CLUSTER ALIVE */ + case 307: /* cmd ::= SHOW CLUSTER ALIVE */ { pCxt->pRootNode = createShowAliveStmt(pCxt, NULL, QUERY_NODE_SHOW_CLUSTER_ALIVE_STMT); } break; - case 300: /* cmd ::= SHOW db_name_cond_opt VIEWS like_pattern_opt */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VIEWS_STMT, yymsp[-2].minor.yy1000, yymsp[0].minor.yy1000, OP_TYPE_LIKE); } + case 308: /* cmd ::= SHOW db_name_cond_opt VIEWS like_pattern_opt */ +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VIEWS_STMT, yymsp[-2].minor.yy872, yymsp[0].minor.yy872, OP_TYPE_LIKE); } break; - case 301: /* cmd ::= SHOW CREATE VIEW full_table_name */ -{ pCxt->pRootNode = createShowCreateViewStmt(pCxt, QUERY_NODE_SHOW_CREATE_VIEW_STMT, yymsp[0].minor.yy1000); } + case 309: /* cmd ::= SHOW CREATE VIEW full_table_name */ +{ pCxt->pRootNode = createShowCreateViewStmt(pCxt, QUERY_NODE_SHOW_CREATE_VIEW_STMT, yymsp[0].minor.yy872); } break; - case 302: /* cmd ::= SHOW COMPACTS */ + case 310: /* cmd ::= SHOW COMPACTS */ { pCxt->pRootNode = createShowCompactsStmt(pCxt, QUERY_NODE_SHOW_COMPACTS_STMT); } break; - case 303: /* cmd ::= SHOW COMPACT NK_INTEGER */ + case 311: /* cmd ::= SHOW COMPACT NK_INTEGER */ { pCxt->pRootNode = createShowCompactDetailsStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } break; - case 304: /* table_kind_db_name_cond_opt ::= */ -{ yymsp[1].minor.yy517.kind = SHOW_KIND_ALL; yymsp[1].minor.yy517.dbName = nil_token; } + case 312: /* table_kind_db_name_cond_opt ::= */ +{ yymsp[1].minor.yy685.kind = SHOW_KIND_ALL; yymsp[1].minor.yy685.dbName = nil_token; } break; - case 305: /* table_kind_db_name_cond_opt ::= table_kind */ -{ yylhsminor.yy517.kind = yymsp[0].minor.yy761; yylhsminor.yy517.dbName = nil_token; } - yymsp[0].minor.yy517 = yylhsminor.yy517; + case 313: /* table_kind_db_name_cond_opt ::= table_kind */ +{ yylhsminor.yy685.kind = yymsp[0].minor.yy321; yylhsminor.yy685.dbName = nil_token; } + yymsp[0].minor.yy685 = yylhsminor.yy685; break; - case 306: /* table_kind_db_name_cond_opt ::= db_name NK_DOT */ -{ yylhsminor.yy517.kind = SHOW_KIND_ALL; yylhsminor.yy517.dbName = yymsp[-1].minor.yy305; } - yymsp[-1].minor.yy517 = yylhsminor.yy517; + case 314: /* table_kind_db_name_cond_opt ::= db_name NK_DOT */ +{ yylhsminor.yy685.kind = SHOW_KIND_ALL; yylhsminor.yy685.dbName = yymsp[-1].minor.yy833; } + yymsp[-1].minor.yy685 = yylhsminor.yy685; break; - case 307: /* table_kind_db_name_cond_opt ::= table_kind db_name NK_DOT */ -{ yylhsminor.yy517.kind = yymsp[-2].minor.yy761; yylhsminor.yy517.dbName = yymsp[-1].minor.yy305; } - yymsp[-2].minor.yy517 = yylhsminor.yy517; + case 315: /* table_kind_db_name_cond_opt ::= table_kind db_name NK_DOT */ +{ yylhsminor.yy685.kind = yymsp[-2].minor.yy321; yylhsminor.yy685.dbName = yymsp[-1].minor.yy833; } + yymsp[-2].minor.yy685 = yylhsminor.yy685; break; - case 308: /* table_kind ::= NORMAL */ -{ yymsp[0].minor.yy761 = SHOW_KIND_TABLES_NORMAL; } + case 316: /* table_kind ::= NORMAL */ +{ yymsp[0].minor.yy321 = SHOW_KIND_TABLES_NORMAL; } break; - case 309: /* table_kind ::= CHILD */ -{ yymsp[0].minor.yy761 = SHOW_KIND_TABLES_CHILD; } + case 317: /* table_kind ::= CHILD */ +{ yymsp[0].minor.yy321 = SHOW_KIND_TABLES_CHILD; } break; - case 310: /* db_name_cond_opt ::= */ - case 315: /* from_db_opt ::= */ yytestcase(yyruleno==315); -{ yymsp[1].minor.yy1000 = createDefaultDatabaseCondValue(pCxt); } + case 318: /* db_name_cond_opt ::= */ + case 323: /* from_db_opt ::= */ yytestcase(yyruleno==323); +{ yymsp[1].minor.yy872 = createDefaultDatabaseCondValue(pCxt); } break; - case 311: /* db_name_cond_opt ::= db_name NK_DOT */ -{ yylhsminor.yy1000 = createIdentifierValueNode(pCxt, &yymsp[-1].minor.yy305); } - yymsp[-1].minor.yy1000 = yylhsminor.yy1000; + case 319: /* db_name_cond_opt ::= db_name NK_DOT */ +{ yylhsminor.yy872 = createIdentifierValueNode(pCxt, &yymsp[-1].minor.yy833); } + yymsp[-1].minor.yy872 = yylhsminor.yy872; break; - case 313: /* like_pattern_opt ::= LIKE NK_STRING */ -{ yymsp[-1].minor.yy1000 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } + case 321: /* like_pattern_opt ::= LIKE NK_STRING */ +{ yymsp[-1].minor.yy872 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } break; - case 314: /* table_name_cond ::= table_name */ -{ yylhsminor.yy1000 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy305); } - yymsp[0].minor.yy1000 = yylhsminor.yy1000; + case 322: /* table_name_cond ::= table_name */ +{ yylhsminor.yy872 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy833); } + yymsp[0].minor.yy872 = yylhsminor.yy872; break; - case 316: /* from_db_opt ::= FROM db_name */ -{ yymsp[-1].minor.yy1000 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy305); } + case 324: /* from_db_opt ::= FROM db_name */ +{ yymsp[-1].minor.yy872 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy833); } break; - case 320: /* tag_item ::= TBNAME */ -{ yylhsminor.yy1000 = setProjectionAlias(pCxt, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL), &yymsp[0].minor.yy0); } - yymsp[0].minor.yy1000 = yylhsminor.yy1000; + case 328: /* tag_item ::= TBNAME */ +{ yylhsminor.yy872 = setProjectionAlias(pCxt, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL), &yymsp[0].minor.yy0); } + yymsp[0].minor.yy872 = yylhsminor.yy872; break; - case 323: /* tag_item ::= column_name column_alias */ -{ yylhsminor.yy1000 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-1].minor.yy305), &yymsp[0].minor.yy305); } - yymsp[-1].minor.yy1000 = yylhsminor.yy1000; + case 331: /* tag_item ::= column_name column_alias */ +{ yylhsminor.yy872 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-1].minor.yy833), &yymsp[0].minor.yy833); } + yymsp[-1].minor.yy872 = yylhsminor.yy872; break; - case 324: /* tag_item ::= column_name AS column_alias */ -{ yylhsminor.yy1000 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-2].minor.yy305), &yymsp[0].minor.yy305); } - yymsp[-2].minor.yy1000 = yylhsminor.yy1000; + case 332: /* tag_item ::= column_name AS column_alias */ +{ yylhsminor.yy872 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-2].minor.yy833), &yymsp[0].minor.yy833); } + yymsp[-2].minor.yy872 = yylhsminor.yy872; break; - case 325: /* db_kind_opt ::= */ -{ yymsp[1].minor.yy761 = SHOW_KIND_ALL; } + case 333: /* db_kind_opt ::= */ +{ yymsp[1].minor.yy321 = SHOW_KIND_ALL; } break; - case 326: /* db_kind_opt ::= USER */ -{ yymsp[0].minor.yy761 = SHOW_KIND_DATABASES_USER; } + case 334: /* db_kind_opt ::= USER */ +{ yymsp[0].minor.yy321 = SHOW_KIND_DATABASES_USER; } break; - case 327: /* db_kind_opt ::= SYSTEM */ -{ yymsp[0].minor.yy761 = SHOW_KIND_DATABASES_SYSTEM; } + case 335: /* db_kind_opt ::= SYSTEM */ +{ yymsp[0].minor.yy321 = SHOW_KIND_DATABASES_SYSTEM; } break; - case 328: /* 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.yy985, yymsp[-3].minor.yy1000, yymsp[-1].minor.yy1000, NULL, yymsp[0].minor.yy1000); } + case 336: /* 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.yy185, yymsp[-3].minor.yy872, yymsp[-1].minor.yy872, NULL, yymsp[0].minor.yy872); } break; - case 329: /* 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.yy985, yymsp[-5].minor.yy1000, yymsp[-3].minor.yy1000, yymsp[-1].minor.yy72, NULL); } + case 337: /* 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.yy185, yymsp[-5].minor.yy872, yymsp[-3].minor.yy872, yymsp[-1].minor.yy376, NULL); } break; - case 330: /* cmd ::= DROP INDEX exists_opt full_index_name */ -{ pCxt->pRootNode = createDropIndexStmt(pCxt, yymsp[-1].minor.yy985, yymsp[0].minor.yy1000); } + case 338: /* cmd ::= DROP INDEX exists_opt full_index_name */ +{ pCxt->pRootNode = createDropIndexStmt(pCxt, yymsp[-1].minor.yy185, yymsp[0].minor.yy872); } break; - case 331: /* full_index_name ::= index_name */ -{ yylhsminor.yy1000 = createRealTableNodeForIndexName(pCxt, NULL, &yymsp[0].minor.yy305); } - yymsp[0].minor.yy1000 = yylhsminor.yy1000; + case 339: /* full_index_name ::= index_name */ +{ yylhsminor.yy872 = createRealTableNodeForIndexName(pCxt, NULL, &yymsp[0].minor.yy833); } + yymsp[0].minor.yy872 = yylhsminor.yy872; break; - case 332: /* full_index_name ::= db_name NK_DOT index_name */ -{ yylhsminor.yy1000 = createRealTableNodeForIndexName(pCxt, &yymsp[-2].minor.yy305, &yymsp[0].minor.yy305); } - yymsp[-2].minor.yy1000 = yylhsminor.yy1000; + case 340: /* full_index_name ::= db_name NK_DOT index_name */ +{ yylhsminor.yy872 = createRealTableNodeForIndexName(pCxt, &yymsp[-2].minor.yy833, &yymsp[0].minor.yy833); } + yymsp[-2].minor.yy872 = yylhsminor.yy872; break; - case 333: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ -{ yymsp[-9].minor.yy1000 = createIndexOption(pCxt, yymsp[-7].minor.yy72, releaseRawExprNode(pCxt, yymsp[-3].minor.yy1000), NULL, yymsp[-1].minor.yy1000, yymsp[0].minor.yy1000); } + case 341: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ +{ yymsp[-9].minor.yy872 = createIndexOption(pCxt, yymsp[-7].minor.yy376, releaseRawExprNode(pCxt, yymsp[-3].minor.yy872), NULL, yymsp[-1].minor.yy872, yymsp[0].minor.yy872); } break; - case 334: /* 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.yy1000 = createIndexOption(pCxt, yymsp[-9].minor.yy72, releaseRawExprNode(pCxt, yymsp[-5].minor.yy1000), releaseRawExprNode(pCxt, yymsp[-3].minor.yy1000), yymsp[-1].minor.yy1000, yymsp[0].minor.yy1000); } + case 342: /* 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.yy872 = createIndexOption(pCxt, yymsp[-9].minor.yy376, releaseRawExprNode(pCxt, yymsp[-5].minor.yy872), releaseRawExprNode(pCxt, yymsp[-3].minor.yy872), yymsp[-1].minor.yy872, yymsp[0].minor.yy872); } break; - case 337: /* func ::= sma_func_name NK_LP expression_list NK_RP */ -{ yylhsminor.yy1000 = createFunctionNode(pCxt, &yymsp[-3].minor.yy305, yymsp[-1].minor.yy72); } - yymsp[-3].minor.yy1000 = yylhsminor.yy1000; + case 345: /* func ::= sma_func_name NK_LP expression_list NK_RP */ +{ yylhsminor.yy872 = createFunctionNode(pCxt, &yymsp[-3].minor.yy833, yymsp[-1].minor.yy376); } + yymsp[-3].minor.yy872 = yylhsminor.yy872; break; - case 338: /* sma_func_name ::= function_name */ - case 609: /* alias_opt ::= table_alias */ yytestcase(yyruleno==609); -{ yylhsminor.yy305 = yymsp[0].minor.yy305; } - yymsp[0].minor.yy305 = yylhsminor.yy305; + case 346: /* sma_func_name ::= function_name */ + case 617: /* alias_opt ::= table_alias */ yytestcase(yyruleno==617); +{ yylhsminor.yy833 = yymsp[0].minor.yy833; } + yymsp[0].minor.yy833 = yylhsminor.yy833; break; - case 343: /* sma_stream_opt ::= */ - case 392: /* stream_options ::= */ yytestcase(yyruleno==392); -{ yymsp[1].minor.yy1000 = createStreamOptions(pCxt); } + case 351: /* sma_stream_opt ::= */ + case 400: /* stream_options ::= */ yytestcase(yyruleno==400); +{ yymsp[1].minor.yy872 = createStreamOptions(pCxt); } break; - case 344: /* sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ -{ ((SStreamOptions*)yymsp[-2].minor.yy1000)->pWatermark = releaseRawExprNode(pCxt, yymsp[0].minor.yy1000); yylhsminor.yy1000 = yymsp[-2].minor.yy1000; } - yymsp[-2].minor.yy1000 = yylhsminor.yy1000; + case 352: /* sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ +{ ((SStreamOptions*)yymsp[-2].minor.yy872)->pWatermark = releaseRawExprNode(pCxt, yymsp[0].minor.yy872); yylhsminor.yy872 = yymsp[-2].minor.yy872; } + yymsp[-2].minor.yy872 = yylhsminor.yy872; break; - case 345: /* sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ -{ ((SStreamOptions*)yymsp[-2].minor.yy1000)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy1000); yylhsminor.yy1000 = yymsp[-2].minor.yy1000; } - yymsp[-2].minor.yy1000 = yylhsminor.yy1000; + case 353: /* sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ +{ ((SStreamOptions*)yymsp[-2].minor.yy872)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy872); yylhsminor.yy872 = yymsp[-2].minor.yy872; } + yymsp[-2].minor.yy872 = yylhsminor.yy872; break; - case 346: /* sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ -{ ((SStreamOptions*)yymsp[-2].minor.yy1000)->pDeleteMark = releaseRawExprNode(pCxt, yymsp[0].minor.yy1000); yylhsminor.yy1000 = yymsp[-2].minor.yy1000; } - yymsp[-2].minor.yy1000 = yylhsminor.yy1000; + case 354: /* sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ +{ ((SStreamOptions*)yymsp[-2].minor.yy872)->pDeleteMark = releaseRawExprNode(pCxt, yymsp[0].minor.yy872); yylhsminor.yy872 = yymsp[-2].minor.yy872; } + yymsp[-2].minor.yy872 = yylhsminor.yy872; break; - case 347: /* with_meta ::= AS */ -{ yymsp[0].minor.yy444 = 0; } + case 355: /* with_meta ::= AS */ +{ yymsp[0].minor.yy772 = 0; } break; - case 348: /* with_meta ::= WITH META AS */ -{ yymsp[-2].minor.yy444 = 1; } + case 356: /* with_meta ::= WITH META AS */ +{ yymsp[-2].minor.yy772 = 1; } break; - case 349: /* with_meta ::= ONLY META AS */ -{ yymsp[-2].minor.yy444 = 2; } + case 357: /* with_meta ::= ONLY META AS */ +{ yymsp[-2].minor.yy772 = 2; } break; - case 350: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ -{ pCxt->pRootNode = createCreateTopicStmtUseQuery(pCxt, yymsp[-3].minor.yy985, &yymsp[-2].minor.yy305, yymsp[0].minor.yy1000); } + case 358: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ +{ pCxt->pRootNode = createCreateTopicStmtUseQuery(pCxt, yymsp[-3].minor.yy185, &yymsp[-2].minor.yy833, yymsp[0].minor.yy872); } break; - case 351: /* cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name */ -{ pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-4].minor.yy985, &yymsp[-3].minor.yy305, &yymsp[0].minor.yy305, yymsp[-2].minor.yy444); } + case 359: /* cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name */ +{ pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-4].minor.yy185, &yymsp[-3].minor.yy833, &yymsp[0].minor.yy833, yymsp[-2].minor.yy772); } break; - case 352: /* cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt */ -{ pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-5].minor.yy985, &yymsp[-4].minor.yy305, yymsp[-1].minor.yy1000, yymsp[-3].minor.yy444, yymsp[0].minor.yy1000); } + case 360: /* cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt */ +{ pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-5].minor.yy185, &yymsp[-4].minor.yy833, yymsp[-1].minor.yy872, yymsp[-3].minor.yy772, yymsp[0].minor.yy872); } break; - case 353: /* cmd ::= DROP TOPIC exists_opt topic_name */ -{ pCxt->pRootNode = createDropTopicStmt(pCxt, yymsp[-1].minor.yy985, &yymsp[0].minor.yy305); } + case 361: /* cmd ::= DROP TOPIC exists_opt topic_name */ +{ pCxt->pRootNode = createDropTopicStmt(pCxt, yymsp[-1].minor.yy185, &yymsp[0].minor.yy833); } break; - case 354: /* cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ -{ pCxt->pRootNode = createDropCGroupStmt(pCxt, yymsp[-3].minor.yy985, &yymsp[-2].minor.yy305, &yymsp[0].minor.yy305); } + case 362: /* cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ +{ pCxt->pRootNode = createDropCGroupStmt(pCxt, yymsp[-3].minor.yy185, &yymsp[-2].minor.yy833, &yymsp[0].minor.yy833); } break; - case 355: /* cmd ::= DESC full_table_name */ - case 356: /* cmd ::= DESCRIBE full_table_name */ yytestcase(yyruleno==356); -{ pCxt->pRootNode = createDescribeStmt(pCxt, yymsp[0].minor.yy1000); } + case 363: /* cmd ::= DESC full_table_name */ + case 364: /* cmd ::= DESCRIBE full_table_name */ yytestcase(yyruleno==364); +{ pCxt->pRootNode = createDescribeStmt(pCxt, yymsp[0].minor.yy872); } break; - case 357: /* cmd ::= RESET QUERY CACHE */ + case 365: /* cmd ::= RESET QUERY CACHE */ { pCxt->pRootNode = createResetQueryCacheStmt(pCxt); } break; - case 358: /* cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ - case 359: /* cmd ::= EXPLAIN analyze_opt explain_options insert_query */ yytestcase(yyruleno==359); -{ pCxt->pRootNode = createExplainStmt(pCxt, yymsp[-2].minor.yy985, yymsp[-1].minor.yy1000, yymsp[0].minor.yy1000); } + case 366: /* cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ + case 367: /* cmd ::= EXPLAIN analyze_opt explain_options insert_query */ yytestcase(yyruleno==367); +{ pCxt->pRootNode = createExplainStmt(pCxt, yymsp[-2].minor.yy185, yymsp[-1].minor.yy872, yymsp[0].minor.yy872); } break; - case 362: /* explain_options ::= */ -{ yymsp[1].minor.yy1000 = createDefaultExplainOptions(pCxt); } + case 370: /* explain_options ::= */ +{ yymsp[1].minor.yy872 = createDefaultExplainOptions(pCxt); } break; - case 363: /* explain_options ::= explain_options VERBOSE NK_BOOL */ -{ yylhsminor.yy1000 = setExplainVerbose(pCxt, yymsp[-2].minor.yy1000, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy1000 = yylhsminor.yy1000; + case 371: /* explain_options ::= explain_options VERBOSE NK_BOOL */ +{ yylhsminor.yy872 = setExplainVerbose(pCxt, yymsp[-2].minor.yy872, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy872 = yylhsminor.yy872; break; - case 364: /* explain_options ::= explain_options RATIO NK_FLOAT */ -{ yylhsminor.yy1000 = setExplainRatio(pCxt, yymsp[-2].minor.yy1000, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy1000 = yylhsminor.yy1000; + case 372: /* explain_options ::= explain_options RATIO NK_FLOAT */ +{ yylhsminor.yy872 = setExplainRatio(pCxt, yymsp[-2].minor.yy872, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy872 = yylhsminor.yy872; break; - case 365: /* 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.yy985, yymsp[-9].minor.yy985, &yymsp[-6].minor.yy305, &yymsp[-4].minor.yy0, yymsp[-2].minor.yy56, yymsp[-1].minor.yy444, &yymsp[0].minor.yy305, yymsp[-10].minor.yy985); } + case 373: /* 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.yy185, yymsp[-9].minor.yy185, &yymsp[-6].minor.yy833, &yymsp[-4].minor.yy0, yymsp[-2].minor.yy400, yymsp[-1].minor.yy772, &yymsp[0].minor.yy833, yymsp[-10].minor.yy185); } break; - case 366: /* cmd ::= DROP FUNCTION exists_opt function_name */ -{ pCxt->pRootNode = createDropFunctionStmt(pCxt, yymsp[-1].minor.yy985, &yymsp[0].minor.yy305); } + case 374: /* cmd ::= DROP FUNCTION exists_opt function_name */ +{ pCxt->pRootNode = createDropFunctionStmt(pCxt, yymsp[-1].minor.yy185, &yymsp[0].minor.yy833); } break; - case 371: /* language_opt ::= */ - case 414: /* on_vgroup_id ::= */ yytestcase(yyruleno==414); -{ yymsp[1].minor.yy305 = nil_token; } + case 379: /* language_opt ::= */ + case 422: /* on_vgroup_id ::= */ yytestcase(yyruleno==422); +{ yymsp[1].minor.yy833 = nil_token; } break; - case 372: /* language_opt ::= LANGUAGE NK_STRING */ - case 415: /* on_vgroup_id ::= ON NK_INTEGER */ yytestcase(yyruleno==415); -{ yymsp[-1].minor.yy305 = yymsp[0].minor.yy0; } + case 380: /* language_opt ::= LANGUAGE NK_STRING */ + case 423: /* on_vgroup_id ::= ON NK_INTEGER */ yytestcase(yyruleno==423); +{ yymsp[-1].minor.yy833 = yymsp[0].minor.yy0; } break; - case 375: /* cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery */ -{ pCxt->pRootNode = createCreateViewStmt(pCxt, yymsp[-4].minor.yy985, yymsp[-2].minor.yy1000, &yymsp[-1].minor.yy0, yymsp[0].minor.yy1000); } + case 383: /* cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery */ +{ pCxt->pRootNode = createCreateViewStmt(pCxt, yymsp[-4].minor.yy185, yymsp[-2].minor.yy872, &yymsp[-1].minor.yy0, yymsp[0].minor.yy872); } break; - case 376: /* cmd ::= DROP VIEW exists_opt full_view_name */ -{ pCxt->pRootNode = createDropViewStmt(pCxt, yymsp[-1].minor.yy985, yymsp[0].minor.yy1000); } + case 384: /* cmd ::= DROP VIEW exists_opt full_view_name */ +{ pCxt->pRootNode = createDropViewStmt(pCxt, yymsp[-1].minor.yy185, yymsp[0].minor.yy872); } break; - case 377: /* full_view_name ::= view_name */ -{ yylhsminor.yy1000 = createViewNode(pCxt, NULL, &yymsp[0].minor.yy305); } - yymsp[0].minor.yy1000 = yylhsminor.yy1000; + case 385: /* full_view_name ::= view_name */ +{ yylhsminor.yy872 = createViewNode(pCxt, NULL, &yymsp[0].minor.yy833); } + yymsp[0].minor.yy872 = yylhsminor.yy872; break; - case 378: /* full_view_name ::= db_name NK_DOT view_name */ -{ yylhsminor.yy1000 = createViewNode(pCxt, &yymsp[-2].minor.yy305, &yymsp[0].minor.yy305); } - yymsp[-2].minor.yy1000 = yylhsminor.yy1000; + case 386: /* full_view_name ::= db_name NK_DOT view_name */ +{ yylhsminor.yy872 = createViewNode(pCxt, &yymsp[-2].minor.yy833, &yymsp[0].minor.yy833); } + yymsp[-2].minor.yy872 = yylhsminor.yy872; break; - case 379: /* 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.yy985, &yymsp[-8].minor.yy305, yymsp[-5].minor.yy1000, yymsp[-7].minor.yy1000, yymsp[-3].minor.yy72, yymsp[-2].minor.yy1000, yymsp[0].minor.yy1000, yymsp[-4].minor.yy72); } + case 387: /* 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.yy185, &yymsp[-8].minor.yy833, yymsp[-5].minor.yy872, yymsp[-7].minor.yy872, yymsp[-3].minor.yy376, yymsp[-2].minor.yy872, yymsp[0].minor.yy872, yymsp[-4].minor.yy376); } break; - case 380: /* cmd ::= DROP STREAM exists_opt stream_name */ -{ pCxt->pRootNode = createDropStreamStmt(pCxt, yymsp[-1].minor.yy985, &yymsp[0].minor.yy305); } + case 388: /* cmd ::= DROP STREAM exists_opt stream_name */ +{ pCxt->pRootNode = createDropStreamStmt(pCxt, yymsp[-1].minor.yy185, &yymsp[0].minor.yy833); } break; - case 381: /* cmd ::= PAUSE STREAM exists_opt stream_name */ -{ pCxt->pRootNode = createPauseStreamStmt(pCxt, yymsp[-1].minor.yy985, &yymsp[0].minor.yy305); } + case 389: /* cmd ::= PAUSE STREAM exists_opt stream_name */ +{ pCxt->pRootNode = createPauseStreamStmt(pCxt, yymsp[-1].minor.yy185, &yymsp[0].minor.yy833); } break; - case 382: /* cmd ::= RESUME STREAM exists_opt ignore_opt stream_name */ -{ pCxt->pRootNode = createResumeStreamStmt(pCxt, yymsp[-2].minor.yy985, yymsp[-1].minor.yy985, &yymsp[0].minor.yy305); } + case 390: /* cmd ::= RESUME STREAM exists_opt ignore_opt stream_name */ +{ pCxt->pRootNode = createResumeStreamStmt(pCxt, yymsp[-2].minor.yy185, yymsp[-1].minor.yy185, &yymsp[0].minor.yy833); } break; - case 387: /* column_stream_def ::= column_name */ -{ yylhsminor.yy1000 = createColumnDefNode(pCxt, &yymsp[0].minor.yy305, createDataType(TSDB_DATA_TYPE_NULL), NULL, false); } - yymsp[0].minor.yy1000 = yylhsminor.yy1000; + case 395: /* column_stream_def ::= column_name */ +{ yylhsminor.yy872 = createColumnDefNode(pCxt, &yymsp[0].minor.yy833, createDataType(TSDB_DATA_TYPE_NULL), NULL, false); } + yymsp[0].minor.yy872 = yylhsminor.yy872; break; - case 388: /* column_stream_def ::= column_name PRIMARY KEY */ -{ yylhsminor.yy1000 = createColumnDefNode(pCxt, &yymsp[-2].minor.yy305, createDataType(TSDB_DATA_TYPE_NULL), NULL, true); } - yymsp[-2].minor.yy1000 = yylhsminor.yy1000; + case 396: /* column_stream_def ::= column_name PRIMARY KEY */ +{ yylhsminor.yy872 = createColumnDefNode(pCxt, &yymsp[-2].minor.yy833, createDataType(TSDB_DATA_TYPE_NULL), NULL, true); } + yymsp[-2].minor.yy872 = yylhsminor.yy872; break; - case 393: /* stream_options ::= stream_options TRIGGER AT_ONCE */ - case 394: /* stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ yytestcase(yyruleno==394); -{ yylhsminor.yy1000 = setStreamOptions(pCxt, yymsp[-2].minor.yy1000, SOPT_TRIGGER_TYPE_SET, &yymsp[0].minor.yy0, NULL); } - yymsp[-2].minor.yy1000 = yylhsminor.yy1000; + case 401: /* stream_options ::= stream_options TRIGGER AT_ONCE */ + case 402: /* stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ yytestcase(yyruleno==402); +{ yylhsminor.yy872 = setStreamOptions(pCxt, yymsp[-2].minor.yy872, SOPT_TRIGGER_TYPE_SET, &yymsp[0].minor.yy0, NULL); } + yymsp[-2].minor.yy872 = yylhsminor.yy872; break; - case 395: /* stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ -{ yylhsminor.yy1000 = setStreamOptions(pCxt, yymsp[-3].minor.yy1000, SOPT_TRIGGER_TYPE_SET, &yymsp[-1].minor.yy0, releaseRawExprNode(pCxt, yymsp[0].minor.yy1000)); } - yymsp[-3].minor.yy1000 = yylhsminor.yy1000; + case 403: /* stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ +{ yylhsminor.yy872 = setStreamOptions(pCxt, yymsp[-3].minor.yy872, SOPT_TRIGGER_TYPE_SET, &yymsp[-1].minor.yy0, releaseRawExprNode(pCxt, yymsp[0].minor.yy872)); } + yymsp[-3].minor.yy872 = yylhsminor.yy872; break; - case 396: /* stream_options ::= stream_options WATERMARK duration_literal */ -{ yylhsminor.yy1000 = setStreamOptions(pCxt, yymsp[-2].minor.yy1000, SOPT_WATERMARK_SET, NULL, releaseRawExprNode(pCxt, yymsp[0].minor.yy1000)); } - yymsp[-2].minor.yy1000 = yylhsminor.yy1000; + case 404: /* stream_options ::= stream_options WATERMARK duration_literal */ +{ yylhsminor.yy872 = setStreamOptions(pCxt, yymsp[-2].minor.yy872, SOPT_WATERMARK_SET, NULL, releaseRawExprNode(pCxt, yymsp[0].minor.yy872)); } + yymsp[-2].minor.yy872 = yylhsminor.yy872; break; - case 397: /* stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ -{ yylhsminor.yy1000 = setStreamOptions(pCxt, yymsp[-3].minor.yy1000, SOPT_IGNORE_EXPIRED_SET, &yymsp[0].minor.yy0, NULL); } - yymsp[-3].minor.yy1000 = yylhsminor.yy1000; + case 405: /* stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ +{ yylhsminor.yy872 = setStreamOptions(pCxt, yymsp[-3].minor.yy872, SOPT_IGNORE_EXPIRED_SET, &yymsp[0].minor.yy0, NULL); } + yymsp[-3].minor.yy872 = yylhsminor.yy872; break; - case 398: /* stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ -{ yylhsminor.yy1000 = setStreamOptions(pCxt, yymsp[-2].minor.yy1000, SOPT_FILL_HISTORY_SET, &yymsp[0].minor.yy0, NULL); } - yymsp[-2].minor.yy1000 = yylhsminor.yy1000; + case 406: /* stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ +{ yylhsminor.yy872 = setStreamOptions(pCxt, yymsp[-2].minor.yy872, SOPT_FILL_HISTORY_SET, &yymsp[0].minor.yy0, NULL); } + yymsp[-2].minor.yy872 = yylhsminor.yy872; break; - case 399: /* stream_options ::= stream_options DELETE_MARK duration_literal */ -{ yylhsminor.yy1000 = setStreamOptions(pCxt, yymsp[-2].minor.yy1000, SOPT_DELETE_MARK_SET, NULL, releaseRawExprNode(pCxt, yymsp[0].minor.yy1000)); } - yymsp[-2].minor.yy1000 = yylhsminor.yy1000; + case 407: /* stream_options ::= stream_options DELETE_MARK duration_literal */ +{ yylhsminor.yy872 = setStreamOptions(pCxt, yymsp[-2].minor.yy872, SOPT_DELETE_MARK_SET, NULL, releaseRawExprNode(pCxt, yymsp[0].minor.yy872)); } + yymsp[-2].minor.yy872 = yylhsminor.yy872; break; - case 400: /* stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */ -{ yylhsminor.yy1000 = setStreamOptions(pCxt, yymsp[-3].minor.yy1000, SOPT_IGNORE_UPDATE_SET, &yymsp[0].minor.yy0, NULL); } - yymsp[-3].minor.yy1000 = yylhsminor.yy1000; + case 408: /* stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */ +{ yylhsminor.yy872 = setStreamOptions(pCxt, yymsp[-3].minor.yy872, SOPT_IGNORE_UPDATE_SET, &yymsp[0].minor.yy0, NULL); } + yymsp[-3].minor.yy872 = yylhsminor.yy872; break; - case 402: /* subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ - case 649: /* sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP */ yytestcase(yyruleno==649); - case 673: /* every_opt ::= EVERY NK_LP duration_literal NK_RP */ yytestcase(yyruleno==673); -{ yymsp[-3].minor.yy1000 = releaseRawExprNode(pCxt, yymsp[-1].minor.yy1000); } + case 410: /* subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ + case 657: /* sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP */ yytestcase(yyruleno==657); + case 681: /* every_opt ::= EVERY NK_LP duration_literal NK_RP */ yytestcase(yyruleno==681); +{ yymsp[-3].minor.yy872 = releaseRawExprNode(pCxt, yymsp[-1].minor.yy872); } break; - case 405: /* cmd ::= KILL CONNECTION NK_INTEGER */ + case 413: /* cmd ::= KILL CONNECTION NK_INTEGER */ { pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_CONNECTION_STMT, &yymsp[0].minor.yy0); } break; - case 406: /* cmd ::= KILL QUERY NK_STRING */ + case 414: /* cmd ::= KILL QUERY NK_STRING */ { pCxt->pRootNode = createKillQueryStmt(pCxt, &yymsp[0].minor.yy0); } break; - case 407: /* cmd ::= KILL TRANSACTION NK_INTEGER */ + case 415: /* cmd ::= KILL TRANSACTION NK_INTEGER */ { pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_TRANSACTION_STMT, &yymsp[0].minor.yy0); } break; - case 408: /* cmd ::= KILL COMPACT NK_INTEGER */ + case 416: /* cmd ::= KILL COMPACT NK_INTEGER */ { pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_COMPACT_STMT, &yymsp[0].minor.yy0); } break; - case 409: /* cmd ::= BALANCE VGROUP */ + case 417: /* cmd ::= BALANCE VGROUP */ { pCxt->pRootNode = createBalanceVgroupStmt(pCxt); } break; - case 410: /* cmd ::= BALANCE VGROUP LEADER on_vgroup_id */ -{ pCxt->pRootNode = createBalanceVgroupLeaderStmt(pCxt, &yymsp[0].minor.yy305); } + case 418: /* cmd ::= BALANCE VGROUP LEADER on_vgroup_id */ +{ pCxt->pRootNode = createBalanceVgroupLeaderStmt(pCxt, &yymsp[0].minor.yy833); } break; - case 411: /* cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ + case 419: /* cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ { pCxt->pRootNode = createMergeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } break; - case 412: /* cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ -{ pCxt->pRootNode = createRedistributeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy72); } + case 420: /* cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ +{ pCxt->pRootNode = createRedistributeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy376); } break; - case 413: /* cmd ::= SPLIT VGROUP NK_INTEGER */ + case 421: /* cmd ::= SPLIT VGROUP NK_INTEGER */ { pCxt->pRootNode = createSplitVgroupStmt(pCxt, &yymsp[0].minor.yy0); } break; - case 416: /* dnode_list ::= DNODE NK_INTEGER */ -{ yymsp[-1].minor.yy72 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } + case 424: /* dnode_list ::= DNODE NK_INTEGER */ +{ yymsp[-1].minor.yy376 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } break; - case 418: /* cmd ::= DELETE FROM full_table_name where_clause_opt */ -{ pCxt->pRootNode = createDeleteStmt(pCxt, yymsp[-1].minor.yy1000, yymsp[0].minor.yy1000); } + case 426: /* cmd ::= DELETE FROM full_table_name where_clause_opt */ +{ pCxt->pRootNode = createDeleteStmt(pCxt, yymsp[-1].minor.yy872, yymsp[0].minor.yy872); } break; - case 421: /* insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ -{ yymsp[-6].minor.yy1000 = createInsertStmt(pCxt, yymsp[-4].minor.yy1000, yymsp[-2].minor.yy72, yymsp[0].minor.yy1000); } + case 429: /* insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ +{ yymsp[-6].minor.yy872 = createInsertStmt(pCxt, yymsp[-4].minor.yy872, yymsp[-2].minor.yy376, yymsp[0].minor.yy872); } break; - case 422: /* insert_query ::= INSERT INTO full_table_name query_or_subquery */ -{ yymsp[-3].minor.yy1000 = createInsertStmt(pCxt, yymsp[-1].minor.yy1000, NULL, yymsp[0].minor.yy1000); } + case 430: /* insert_query ::= INSERT INTO full_table_name query_or_subquery */ +{ yymsp[-3].minor.yy872 = createInsertStmt(pCxt, yymsp[-1].minor.yy872, NULL, yymsp[0].minor.yy872); } break; - case 423: /* tags_literal ::= NK_INTEGER */ - case 435: /* tags_literal ::= NK_BIN */ yytestcase(yyruleno==435); - case 444: /* tags_literal ::= NK_HEX */ yytestcase(yyruleno==444); -{ yylhsminor.yy1000 = createRawValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0, NULL); } - yymsp[0].minor.yy1000 = yylhsminor.yy1000; + case 431: /* tags_literal ::= NK_INTEGER */ + case 443: /* tags_literal ::= NK_BIN */ yytestcase(yyruleno==443); + case 452: /* tags_literal ::= NK_HEX */ yytestcase(yyruleno==452); +{ yylhsminor.yy872 = createRawValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0, NULL); } + yymsp[0].minor.yy872 = yylhsminor.yy872; break; - case 424: /* tags_literal ::= NK_INTEGER NK_PLUS duration_literal */ - case 425: /* tags_literal ::= NK_INTEGER NK_MINUS duration_literal */ yytestcase(yyruleno==425); - case 436: /* tags_literal ::= NK_BIN NK_PLUS duration_literal */ yytestcase(yyruleno==436); - case 437: /* tags_literal ::= NK_BIN NK_MINUS duration_literal */ yytestcase(yyruleno==437); - case 445: /* tags_literal ::= NK_HEX NK_PLUS duration_literal */ yytestcase(yyruleno==445); - case 446: /* tags_literal ::= NK_HEX NK_MINUS duration_literal */ yytestcase(yyruleno==446); - case 454: /* tags_literal ::= NK_STRING NK_PLUS duration_literal */ yytestcase(yyruleno==454); - case 455: /* tags_literal ::= NK_STRING NK_MINUS duration_literal */ yytestcase(yyruleno==455); + case 432: /* tags_literal ::= NK_INTEGER NK_PLUS duration_literal */ + case 433: /* tags_literal ::= NK_INTEGER NK_MINUS duration_literal */ yytestcase(yyruleno==433); + case 444: /* tags_literal ::= NK_BIN NK_PLUS duration_literal */ yytestcase(yyruleno==444); + case 445: /* tags_literal ::= NK_BIN NK_MINUS duration_literal */ yytestcase(yyruleno==445); + case 453: /* tags_literal ::= NK_HEX NK_PLUS duration_literal */ yytestcase(yyruleno==453); + case 454: /* tags_literal ::= NK_HEX NK_MINUS duration_literal */ yytestcase(yyruleno==454); + case 462: /* tags_literal ::= NK_STRING NK_PLUS duration_literal */ yytestcase(yyruleno==462); + case 463: /* tags_literal ::= NK_STRING NK_MINUS duration_literal */ yytestcase(yyruleno==463); { SToken l = yymsp[-2].minor.yy0; - SToken r = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy1000); + SToken r = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy872); l.n = (r.z + r.n) - l.z; - yylhsminor.yy1000 = createRawValueNodeExt(pCxt, TSDB_DATA_TYPE_BINARY, &l, NULL, yymsp[0].minor.yy1000); + yylhsminor.yy872 = createRawValueNodeExt(pCxt, TSDB_DATA_TYPE_BINARY, &l, NULL, yymsp[0].minor.yy872); } - yymsp[-2].minor.yy1000 = yylhsminor.yy1000; + yymsp[-2].minor.yy872 = yylhsminor.yy872; break; - case 426: /* tags_literal ::= NK_PLUS NK_INTEGER */ - case 429: /* tags_literal ::= NK_MINUS NK_INTEGER */ yytestcase(yyruleno==429); - case 438: /* tags_literal ::= NK_PLUS NK_BIN */ yytestcase(yyruleno==438); - case 441: /* tags_literal ::= NK_MINUS NK_BIN */ yytestcase(yyruleno==441); - case 447: /* tags_literal ::= NK_PLUS NK_HEX */ yytestcase(yyruleno==447); - case 450: /* tags_literal ::= NK_MINUS NK_HEX */ yytestcase(yyruleno==450); + case 434: /* tags_literal ::= NK_PLUS NK_INTEGER */ + case 437: /* tags_literal ::= NK_MINUS NK_INTEGER */ yytestcase(yyruleno==437); + case 446: /* tags_literal ::= NK_PLUS NK_BIN */ yytestcase(yyruleno==446); + case 449: /* tags_literal ::= NK_MINUS NK_BIN */ yytestcase(yyruleno==449); + case 455: /* tags_literal ::= NK_PLUS NK_HEX */ yytestcase(yyruleno==455); + case 458: /* tags_literal ::= NK_MINUS NK_HEX */ yytestcase(yyruleno==458); { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yylhsminor.yy1000 = createRawValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &t, NULL); + yylhsminor.yy872 = createRawValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &t, NULL); } - yymsp[-1].minor.yy1000 = yylhsminor.yy1000; + yymsp[-1].minor.yy872 = yylhsminor.yy872; break; - case 427: /* tags_literal ::= NK_PLUS NK_INTEGER NK_PLUS duration_literal */ - case 428: /* tags_literal ::= NK_PLUS NK_INTEGER NK_MINUS duration_literal */ yytestcase(yyruleno==428); - case 430: /* tags_literal ::= NK_MINUS NK_INTEGER NK_PLUS duration_literal */ yytestcase(yyruleno==430); - case 431: /* tags_literal ::= NK_MINUS NK_INTEGER NK_MINUS duration_literal */ yytestcase(yyruleno==431); - case 439: /* tags_literal ::= NK_PLUS NK_BIN NK_PLUS duration_literal */ yytestcase(yyruleno==439); - case 440: /* tags_literal ::= NK_PLUS NK_BIN NK_MINUS duration_literal */ yytestcase(yyruleno==440); - case 442: /* tags_literal ::= NK_MINUS NK_BIN NK_PLUS duration_literal */ yytestcase(yyruleno==442); - case 443: /* tags_literal ::= NK_MINUS NK_BIN NK_MINUS duration_literal */ yytestcase(yyruleno==443); - case 448: /* tags_literal ::= NK_PLUS NK_HEX NK_PLUS duration_literal */ yytestcase(yyruleno==448); - case 449: /* tags_literal ::= NK_PLUS NK_HEX NK_MINUS duration_literal */ yytestcase(yyruleno==449); - case 451: /* tags_literal ::= NK_MINUS NK_HEX NK_PLUS duration_literal */ yytestcase(yyruleno==451); - case 452: /* tags_literal ::= NK_MINUS NK_HEX NK_MINUS duration_literal */ yytestcase(yyruleno==452); + case 435: /* tags_literal ::= NK_PLUS NK_INTEGER NK_PLUS duration_literal */ + case 436: /* tags_literal ::= NK_PLUS NK_INTEGER NK_MINUS duration_literal */ yytestcase(yyruleno==436); + case 438: /* tags_literal ::= NK_MINUS NK_INTEGER NK_PLUS duration_literal */ yytestcase(yyruleno==438); + case 439: /* tags_literal ::= NK_MINUS NK_INTEGER NK_MINUS duration_literal */ yytestcase(yyruleno==439); + case 447: /* tags_literal ::= NK_PLUS NK_BIN NK_PLUS duration_literal */ yytestcase(yyruleno==447); + case 448: /* tags_literal ::= NK_PLUS NK_BIN NK_MINUS duration_literal */ yytestcase(yyruleno==448); + case 450: /* tags_literal ::= NK_MINUS NK_BIN NK_PLUS duration_literal */ yytestcase(yyruleno==450); + case 451: /* tags_literal ::= NK_MINUS NK_BIN NK_MINUS duration_literal */ yytestcase(yyruleno==451); + case 456: /* tags_literal ::= NK_PLUS NK_HEX NK_PLUS duration_literal */ yytestcase(yyruleno==456); + case 457: /* tags_literal ::= NK_PLUS NK_HEX NK_MINUS duration_literal */ yytestcase(yyruleno==457); + case 459: /* tags_literal ::= NK_MINUS NK_HEX NK_PLUS duration_literal */ yytestcase(yyruleno==459); + case 460: /* tags_literal ::= NK_MINUS NK_HEX NK_MINUS duration_literal */ yytestcase(yyruleno==460); { SToken l = yymsp[-3].minor.yy0; - SToken r = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy1000); + SToken r = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy872); l.n = (r.z + r.n) - l.z; - yylhsminor.yy1000 = createRawValueNodeExt(pCxt, TSDB_DATA_TYPE_BINARY, &l, NULL, yymsp[0].minor.yy1000); + yylhsminor.yy872 = createRawValueNodeExt(pCxt, TSDB_DATA_TYPE_BINARY, &l, NULL, yymsp[0].minor.yy872); } - yymsp[-3].minor.yy1000 = yylhsminor.yy1000; + yymsp[-3].minor.yy872 = yylhsminor.yy872; break; - case 432: /* tags_literal ::= NK_FLOAT */ -{ yylhsminor.yy1000 = createRawValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0, NULL); } - yymsp[0].minor.yy1000 = yylhsminor.yy1000; + case 440: /* tags_literal ::= NK_FLOAT */ +{ yylhsminor.yy872 = createRawValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0, NULL); } + yymsp[0].minor.yy872 = yylhsminor.yy872; break; - case 433: /* tags_literal ::= NK_PLUS NK_FLOAT */ - case 434: /* tags_literal ::= NK_MINUS NK_FLOAT */ yytestcase(yyruleno==434); + case 441: /* tags_literal ::= NK_PLUS NK_FLOAT */ + case 442: /* tags_literal ::= NK_MINUS NK_FLOAT */ yytestcase(yyruleno==442); { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yylhsminor.yy1000 = createRawValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &t, NULL); + yylhsminor.yy872 = createRawValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &t, NULL); } - yymsp[-1].minor.yy1000 = yylhsminor.yy1000; + yymsp[-1].minor.yy872 = yylhsminor.yy872; break; - case 453: /* tags_literal ::= NK_STRING */ -{ yylhsminor.yy1000 = createRawValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0, NULL); } - yymsp[0].minor.yy1000 = yylhsminor.yy1000; + case 461: /* tags_literal ::= NK_STRING */ +{ yylhsminor.yy872 = createRawValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0, NULL); } + yymsp[0].minor.yy872 = yylhsminor.yy872; break; - case 456: /* tags_literal ::= NK_BOOL */ -{ yylhsminor.yy1000 = createRawValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0, NULL); } - yymsp[0].minor.yy1000 = yylhsminor.yy1000; + case 464: /* tags_literal ::= NK_BOOL */ +{ yylhsminor.yy872 = createRawValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0, NULL); } + yymsp[0].minor.yy872 = yylhsminor.yy872; break; - case 457: /* tags_literal ::= NULL */ -{ yylhsminor.yy1000 = createRawValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0, NULL); } - yymsp[0].minor.yy1000 = yylhsminor.yy1000; + case 465: /* tags_literal ::= NULL */ +{ yylhsminor.yy872 = createRawValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0, NULL); } + yymsp[0].minor.yy872 = yylhsminor.yy872; break; - case 458: /* tags_literal ::= literal_func */ -{ yylhsminor.yy1000 = createRawValueNode(pCxt, TSDB_DATA_TYPE_BINARY, NULL, yymsp[0].minor.yy1000); } - yymsp[0].minor.yy1000 = yylhsminor.yy1000; + case 466: /* tags_literal ::= literal_func */ +{ yylhsminor.yy872 = createRawValueNode(pCxt, TSDB_DATA_TYPE_BINARY, NULL, yymsp[0].minor.yy872); } + yymsp[0].minor.yy872 = yylhsminor.yy872; break; - case 459: /* tags_literal ::= literal_func NK_PLUS duration_literal */ - case 460: /* tags_literal ::= literal_func NK_MINUS duration_literal */ yytestcase(yyruleno==460); + case 467: /* tags_literal ::= literal_func NK_PLUS duration_literal */ + case 468: /* tags_literal ::= literal_func NK_MINUS duration_literal */ yytestcase(yyruleno==468); { - SToken l = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy1000); - SToken r = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy1000); + SToken l = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy872); + SToken r = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy872); l.n = (r.z + r.n) - l.z; - yylhsminor.yy1000 = createRawValueNodeExt(pCxt, TSDB_DATA_TYPE_BINARY, &l, yymsp[-2].minor.yy1000, yymsp[0].minor.yy1000); + yylhsminor.yy872 = createRawValueNodeExt(pCxt, TSDB_DATA_TYPE_BINARY, &l, yymsp[-2].minor.yy872, yymsp[0].minor.yy872); } - yymsp[-2].minor.yy1000 = yylhsminor.yy1000; + yymsp[-2].minor.yy872 = yylhsminor.yy872; break; - case 463: /* literal ::= NK_INTEGER */ -{ yylhsminor.yy1000 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy1000 = yylhsminor.yy1000; + case 471: /* literal ::= NK_INTEGER */ +{ yylhsminor.yy872 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy872 = yylhsminor.yy872; break; - case 464: /* literal ::= NK_FLOAT */ -{ yylhsminor.yy1000 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy1000 = yylhsminor.yy1000; + case 472: /* literal ::= NK_FLOAT */ +{ yylhsminor.yy872 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy872 = yylhsminor.yy872; break; - case 465: /* literal ::= NK_STRING */ -{ yylhsminor.yy1000 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy1000 = yylhsminor.yy1000; + case 473: /* literal ::= NK_STRING */ +{ yylhsminor.yy872 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy872 = yylhsminor.yy872; break; - case 466: /* literal ::= NK_BOOL */ -{ yylhsminor.yy1000 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy1000 = yylhsminor.yy1000; + case 474: /* literal ::= NK_BOOL */ +{ yylhsminor.yy872 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy872 = yylhsminor.yy872; break; - case 467: /* literal ::= TIMESTAMP NK_STRING */ -{ yylhsminor.yy1000 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0)); } - yymsp[-1].minor.yy1000 = yylhsminor.yy1000; + case 475: /* literal ::= TIMESTAMP NK_STRING */ +{ yylhsminor.yy872 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0)); } + yymsp[-1].minor.yy872 = yylhsminor.yy872; break; - case 468: /* literal ::= duration_literal */ - case 478: /* signed_literal ::= signed */ yytestcase(yyruleno==478); - case 501: /* expr_or_subquery ::= expression */ yytestcase(yyruleno==501); - case 502: /* expression ::= literal */ yytestcase(yyruleno==502); - case 504: /* expression ::= column_reference */ yytestcase(yyruleno==504); - case 505: /* expression ::= function_expression */ yytestcase(yyruleno==505); - case 506: /* expression ::= case_when_expression */ yytestcase(yyruleno==506); - case 540: /* function_expression ::= literal_func */ yytestcase(yyruleno==540); - case 590: /* boolean_value_expression ::= boolean_primary */ yytestcase(yyruleno==590); - case 594: /* boolean_primary ::= predicate */ yytestcase(yyruleno==594); - case 596: /* common_expression ::= expr_or_subquery */ yytestcase(yyruleno==596); - case 597: /* common_expression ::= boolean_value_expression */ yytestcase(yyruleno==597); - case 600: /* table_reference_list ::= table_reference */ yytestcase(yyruleno==600); - case 602: /* table_reference ::= table_primary */ yytestcase(yyruleno==602); - case 603: /* table_reference ::= joined_table */ yytestcase(yyruleno==603); - case 607: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==607); - case 675: /* query_simple ::= query_specification */ yytestcase(yyruleno==675); - case 676: /* query_simple ::= union_query_expression */ yytestcase(yyruleno==676); - case 679: /* query_simple_or_subquery ::= query_simple */ yytestcase(yyruleno==679); - case 681: /* query_or_subquery ::= query_expression */ yytestcase(yyruleno==681); -{ yylhsminor.yy1000 = yymsp[0].minor.yy1000; } - yymsp[0].minor.yy1000 = yylhsminor.yy1000; + case 476: /* literal ::= duration_literal */ + case 486: /* signed_literal ::= signed */ yytestcase(yyruleno==486); + case 509: /* expr_or_subquery ::= expression */ yytestcase(yyruleno==509); + case 510: /* expression ::= literal */ yytestcase(yyruleno==510); + case 512: /* expression ::= column_reference */ yytestcase(yyruleno==512); + case 513: /* expression ::= function_expression */ yytestcase(yyruleno==513); + case 514: /* expression ::= case_when_expression */ yytestcase(yyruleno==514); + case 548: /* function_expression ::= literal_func */ yytestcase(yyruleno==548); + case 598: /* boolean_value_expression ::= boolean_primary */ yytestcase(yyruleno==598); + case 602: /* boolean_primary ::= predicate */ yytestcase(yyruleno==602); + case 604: /* common_expression ::= expr_or_subquery */ yytestcase(yyruleno==604); + case 605: /* common_expression ::= boolean_value_expression */ yytestcase(yyruleno==605); + case 608: /* table_reference_list ::= table_reference */ yytestcase(yyruleno==608); + case 610: /* table_reference ::= table_primary */ yytestcase(yyruleno==610); + case 611: /* table_reference ::= joined_table */ yytestcase(yyruleno==611); + case 615: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==615); + case 683: /* query_simple ::= query_specification */ yytestcase(yyruleno==683); + case 684: /* query_simple ::= union_query_expression */ yytestcase(yyruleno==684); + case 687: /* query_simple_or_subquery ::= query_simple */ yytestcase(yyruleno==687); + case 689: /* query_or_subquery ::= query_expression */ yytestcase(yyruleno==689); +{ yylhsminor.yy872 = yymsp[0].minor.yy872; } + yymsp[0].minor.yy872 = yylhsminor.yy872; break; - case 469: /* literal ::= NULL */ -{ yylhsminor.yy1000 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy1000 = yylhsminor.yy1000; + case 477: /* literal ::= NULL */ +{ yylhsminor.yy872 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy872 = yylhsminor.yy872; break; - case 470: /* literal ::= NK_QUESTION */ -{ yylhsminor.yy1000 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy1000 = yylhsminor.yy1000; + case 478: /* literal ::= NK_QUESTION */ +{ yylhsminor.yy872 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy872 = yylhsminor.yy872; break; - case 471: /* duration_literal ::= NK_VARIABLE */ - case 650: /* interval_sliding_duration_literal ::= NK_VARIABLE */ yytestcase(yyruleno==650); - case 651: /* interval_sliding_duration_literal ::= NK_STRING */ yytestcase(yyruleno==651); - case 652: /* interval_sliding_duration_literal ::= NK_INTEGER */ yytestcase(yyruleno==652); -{ yylhsminor.yy1000 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy1000 = yylhsminor.yy1000; + case 479: /* duration_literal ::= NK_VARIABLE */ + case 658: /* interval_sliding_duration_literal ::= NK_VARIABLE */ yytestcase(yyruleno==658); + case 659: /* interval_sliding_duration_literal ::= NK_STRING */ yytestcase(yyruleno==659); + case 660: /* interval_sliding_duration_literal ::= NK_INTEGER */ yytestcase(yyruleno==660); +{ yylhsminor.yy872 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy872 = yylhsminor.yy872; break; - case 472: /* signed ::= NK_INTEGER */ -{ yylhsminor.yy1000 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy1000 = yylhsminor.yy1000; + case 480: /* signed ::= NK_INTEGER */ +{ yylhsminor.yy872 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy872 = yylhsminor.yy872; break; - case 473: /* signed ::= NK_PLUS NK_INTEGER */ -{ yymsp[-1].minor.yy1000 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } + case 481: /* signed ::= NK_PLUS NK_INTEGER */ +{ yymsp[-1].minor.yy872 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } break; - case 474: /* signed ::= NK_MINUS NK_INTEGER */ + case 482: /* signed ::= NK_MINUS NK_INTEGER */ { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yylhsminor.yy1000 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &t); + yylhsminor.yy872 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &t); } - yymsp[-1].minor.yy1000 = yylhsminor.yy1000; + yymsp[-1].minor.yy872 = yylhsminor.yy872; break; - case 475: /* signed ::= NK_FLOAT */ -{ yylhsminor.yy1000 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy1000 = yylhsminor.yy1000; + case 483: /* signed ::= NK_FLOAT */ +{ yylhsminor.yy872 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy872 = yylhsminor.yy872; break; - case 476: /* signed ::= NK_PLUS NK_FLOAT */ -{ yymsp[-1].minor.yy1000 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } + case 484: /* signed ::= NK_PLUS NK_FLOAT */ +{ yymsp[-1].minor.yy872 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } break; - case 477: /* signed ::= NK_MINUS NK_FLOAT */ + case 485: /* signed ::= NK_MINUS NK_FLOAT */ { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yylhsminor.yy1000 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &t); + yylhsminor.yy872 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &t); } - yymsp[-1].minor.yy1000 = yylhsminor.yy1000; + yymsp[-1].minor.yy872 = yylhsminor.yy872; break; - case 479: /* signed_literal ::= NK_STRING */ -{ yylhsminor.yy1000 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy1000 = yylhsminor.yy1000; + case 487: /* signed_literal ::= NK_STRING */ +{ yylhsminor.yy872 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy872 = yylhsminor.yy872; break; - case 480: /* signed_literal ::= NK_BOOL */ -{ yylhsminor.yy1000 = createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy1000 = yylhsminor.yy1000; + case 488: /* signed_literal ::= NK_BOOL */ +{ yylhsminor.yy872 = createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy872 = yylhsminor.yy872; break; - case 481: /* signed_literal ::= TIMESTAMP NK_STRING */ -{ yymsp[-1].minor.yy1000 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } + case 489: /* signed_literal ::= TIMESTAMP NK_STRING */ +{ yymsp[-1].minor.yy872 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } break; - case 482: /* signed_literal ::= duration_literal */ - case 484: /* signed_literal ::= literal_func */ yytestcase(yyruleno==484); - case 561: /* star_func_para ::= expr_or_subquery */ yytestcase(yyruleno==561); - case 627: /* select_item ::= common_expression */ yytestcase(yyruleno==627); - case 637: /* partition_item ::= expr_or_subquery */ yytestcase(yyruleno==637); - case 680: /* query_simple_or_subquery ::= subquery */ yytestcase(yyruleno==680); - case 682: /* query_or_subquery ::= subquery */ yytestcase(yyruleno==682); - case 695: /* search_condition ::= common_expression */ yytestcase(yyruleno==695); -{ yylhsminor.yy1000 = releaseRawExprNode(pCxt, yymsp[0].minor.yy1000); } - yymsp[0].minor.yy1000 = yylhsminor.yy1000; + case 490: /* signed_literal ::= duration_literal */ + case 492: /* signed_literal ::= literal_func */ yytestcase(yyruleno==492); + case 569: /* star_func_para ::= expr_or_subquery */ yytestcase(yyruleno==569); + case 635: /* select_item ::= common_expression */ yytestcase(yyruleno==635); + case 645: /* partition_item ::= expr_or_subquery */ yytestcase(yyruleno==645); + case 688: /* query_simple_or_subquery ::= subquery */ yytestcase(yyruleno==688); + case 690: /* query_or_subquery ::= subquery */ yytestcase(yyruleno==690); + case 703: /* search_condition ::= common_expression */ yytestcase(yyruleno==703); +{ yylhsminor.yy872 = releaseRawExprNode(pCxt, yymsp[0].minor.yy872); } + yymsp[0].minor.yy872 = yylhsminor.yy872; break; - case 483: /* signed_literal ::= NULL */ -{ yylhsminor.yy1000 = createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy1000 = yylhsminor.yy1000; + case 491: /* signed_literal ::= NULL */ +{ yylhsminor.yy872 = createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy872 = yylhsminor.yy872; break; - case 485: /* signed_literal ::= NK_QUESTION */ -{ yylhsminor.yy1000 = createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy1000 = yylhsminor.yy1000; + case 493: /* signed_literal ::= NK_QUESTION */ +{ yylhsminor.yy872 = createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy872 = yylhsminor.yy872; break; - case 503: /* expression ::= pseudo_column */ -{ yylhsminor.yy1000 = yymsp[0].minor.yy1000; setRawExprNodeIsPseudoColumn(pCxt, yylhsminor.yy1000, true); } - yymsp[0].minor.yy1000 = yylhsminor.yy1000; + case 511: /* expression ::= pseudo_column */ +{ yylhsminor.yy872 = yymsp[0].minor.yy872; setRawExprNodeIsPseudoColumn(pCxt, yylhsminor.yy872, true); } + yymsp[0].minor.yy872 = yylhsminor.yy872; break; - case 507: /* expression ::= NK_LP expression NK_RP */ - case 595: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==595); - case 694: /* subquery ::= NK_LP subquery NK_RP */ yytestcase(yyruleno==694); -{ yylhsminor.yy1000 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy1000)); } - yymsp[-2].minor.yy1000 = yylhsminor.yy1000; + case 515: /* expression ::= NK_LP expression NK_RP */ + case 603: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==603); + case 702: /* subquery ::= NK_LP subquery NK_RP */ yytestcase(yyruleno==702); +{ yylhsminor.yy872 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy872)); } + yymsp[-2].minor.yy872 = yylhsminor.yy872; break; - case 508: /* expression ::= NK_PLUS expr_or_subquery */ + case 516: /* expression ::= NK_PLUS expr_or_subquery */ { - SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy1000); - yylhsminor.yy1000 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, releaseRawExprNode(pCxt, yymsp[0].minor.yy1000)); + SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy872); + yylhsminor.yy872 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, releaseRawExprNode(pCxt, yymsp[0].minor.yy872)); } - yymsp[-1].minor.yy1000 = yylhsminor.yy1000; + yymsp[-1].minor.yy872 = yylhsminor.yy872; break; - case 509: /* expression ::= NK_MINUS expr_or_subquery */ + case 517: /* expression ::= NK_MINUS expr_or_subquery */ { - SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy1000); - yylhsminor.yy1000 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, createOperatorNode(pCxt, OP_TYPE_MINUS, releaseRawExprNode(pCxt, yymsp[0].minor.yy1000), NULL)); + SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy872); + yylhsminor.yy872 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, createOperatorNode(pCxt, OP_TYPE_MINUS, releaseRawExprNode(pCxt, yymsp[0].minor.yy872), NULL)); } - yymsp[-1].minor.yy1000 = yylhsminor.yy1000; + yymsp[-1].minor.yy872 = yylhsminor.yy872; break; - case 510: /* expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ + case 518: /* expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy1000); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy1000); - yylhsminor.yy1000 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_ADD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy1000), releaseRawExprNode(pCxt, yymsp[0].minor.yy1000))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy872); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy872); + yylhsminor.yy872 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_ADD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy872), releaseRawExprNode(pCxt, yymsp[0].minor.yy872))); } - yymsp[-2].minor.yy1000 = yylhsminor.yy1000; + yymsp[-2].minor.yy872 = yylhsminor.yy872; break; - case 511: /* expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ + case 519: /* expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy1000); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy1000); - yylhsminor.yy1000 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[-2].minor.yy1000), releaseRawExprNode(pCxt, yymsp[0].minor.yy1000))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy872); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy872); + yylhsminor.yy872 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[-2].minor.yy872), releaseRawExprNode(pCxt, yymsp[0].minor.yy872))); } - yymsp[-2].minor.yy1000 = yylhsminor.yy1000; + yymsp[-2].minor.yy872 = yylhsminor.yy872; break; - case 512: /* expression ::= expr_or_subquery NK_STAR expr_or_subquery */ + case 520: /* expression ::= expr_or_subquery NK_STAR expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy1000); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy1000); - yylhsminor.yy1000 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MULTI, releaseRawExprNode(pCxt, yymsp[-2].minor.yy1000), releaseRawExprNode(pCxt, yymsp[0].minor.yy1000))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy872); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy872); + yylhsminor.yy872 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MULTI, releaseRawExprNode(pCxt, yymsp[-2].minor.yy872), releaseRawExprNode(pCxt, yymsp[0].minor.yy872))); } - yymsp[-2].minor.yy1000 = yylhsminor.yy1000; + yymsp[-2].minor.yy872 = yylhsminor.yy872; break; - case 513: /* expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ + case 521: /* expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy1000); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy1000); - yylhsminor.yy1000 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_DIV, releaseRawExprNode(pCxt, yymsp[-2].minor.yy1000), releaseRawExprNode(pCxt, yymsp[0].minor.yy1000))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy872); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy872); + yylhsminor.yy872 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_DIV, releaseRawExprNode(pCxt, yymsp[-2].minor.yy872), releaseRawExprNode(pCxt, yymsp[0].minor.yy872))); } - yymsp[-2].minor.yy1000 = yylhsminor.yy1000; + yymsp[-2].minor.yy872 = yylhsminor.yy872; break; - case 514: /* expression ::= expr_or_subquery NK_REM expr_or_subquery */ + case 522: /* expression ::= expr_or_subquery NK_REM expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy1000); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy1000); - yylhsminor.yy1000 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_REM, releaseRawExprNode(pCxt, yymsp[-2].minor.yy1000), releaseRawExprNode(pCxt, yymsp[0].minor.yy1000))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy872); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy872); + yylhsminor.yy872 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_REM, releaseRawExprNode(pCxt, yymsp[-2].minor.yy872), releaseRawExprNode(pCxt, yymsp[0].minor.yy872))); } - yymsp[-2].minor.yy1000 = yylhsminor.yy1000; + yymsp[-2].minor.yy872 = yylhsminor.yy872; break; - case 515: /* expression ::= column_reference NK_ARROW NK_STRING */ + case 523: /* expression ::= column_reference NK_ARROW NK_STRING */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy1000); - yylhsminor.yy1000 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_JSON_GET_VALUE, releaseRawExprNode(pCxt, yymsp[-2].minor.yy1000), createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy872); + yylhsminor.yy872 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_JSON_GET_VALUE, releaseRawExprNode(pCxt, yymsp[-2].minor.yy872), createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0))); } - yymsp[-2].minor.yy1000 = yylhsminor.yy1000; + yymsp[-2].minor.yy872 = yylhsminor.yy872; break; - case 516: /* expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ + case 524: /* expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy1000); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy1000); - yylhsminor.yy1000 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy1000), releaseRawExprNode(pCxt, yymsp[0].minor.yy1000))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy872); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy872); + yylhsminor.yy872 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy872), releaseRawExprNode(pCxt, yymsp[0].minor.yy872))); } - yymsp[-2].minor.yy1000 = yylhsminor.yy1000; + yymsp[-2].minor.yy872 = yylhsminor.yy872; break; - case 517: /* expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ + case 525: /* expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy1000); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy1000); - yylhsminor.yy1000 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy1000), releaseRawExprNode(pCxt, yymsp[0].minor.yy1000))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy872); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy872); + yylhsminor.yy872 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy872), releaseRawExprNode(pCxt, yymsp[0].minor.yy872))); } - yymsp[-2].minor.yy1000 = yylhsminor.yy1000; + yymsp[-2].minor.yy872 = yylhsminor.yy872; break; - case 520: /* column_reference ::= column_name */ -{ yylhsminor.yy1000 = createRawExprNode(pCxt, &yymsp[0].minor.yy305, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy305)); } - yymsp[0].minor.yy1000 = yylhsminor.yy1000; + case 528: /* column_reference ::= column_name */ +{ yylhsminor.yy872 = createRawExprNode(pCxt, &yymsp[0].minor.yy833, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy833)); } + yymsp[0].minor.yy872 = yylhsminor.yy872; break; - case 521: /* column_reference ::= table_name NK_DOT column_name */ -{ yylhsminor.yy1000 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy305, &yymsp[0].minor.yy305, createColumnNode(pCxt, &yymsp[-2].minor.yy305, &yymsp[0].minor.yy305)); } - yymsp[-2].minor.yy1000 = yylhsminor.yy1000; + case 529: /* column_reference ::= table_name NK_DOT column_name */ +{ yylhsminor.yy872 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy833, &yymsp[0].minor.yy833, createColumnNode(pCxt, &yymsp[-2].minor.yy833, &yymsp[0].minor.yy833)); } + yymsp[-2].minor.yy872 = yylhsminor.yy872; break; - case 522: /* column_reference ::= NK_ALIAS */ -{ yylhsminor.yy1000 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy1000 = yylhsminor.yy1000; + case 530: /* column_reference ::= NK_ALIAS */ +{ yylhsminor.yy872 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy872 = yylhsminor.yy872; break; - case 523: /* column_reference ::= table_name NK_DOT NK_ALIAS */ -{ yylhsminor.yy1000 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy305, &yymsp[0].minor.yy0, createColumnNode(pCxt, &yymsp[-2].minor.yy305, &yymsp[0].minor.yy0)); } - yymsp[-2].minor.yy1000 = yylhsminor.yy1000; + case 531: /* column_reference ::= table_name NK_DOT NK_ALIAS */ +{ yylhsminor.yy872 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy833, &yymsp[0].minor.yy0, createColumnNode(pCxt, &yymsp[-2].minor.yy833, &yymsp[0].minor.yy0)); } + yymsp[-2].minor.yy872 = yylhsminor.yy872; break; - case 524: /* pseudo_column ::= ROWTS */ - case 525: /* pseudo_column ::= TBNAME */ yytestcase(yyruleno==525); - case 527: /* pseudo_column ::= QSTART */ yytestcase(yyruleno==527); - case 528: /* pseudo_column ::= QEND */ yytestcase(yyruleno==528); - case 529: /* pseudo_column ::= QDURATION */ yytestcase(yyruleno==529); - case 530: /* pseudo_column ::= WSTART */ yytestcase(yyruleno==530); - case 531: /* pseudo_column ::= WEND */ yytestcase(yyruleno==531); - case 532: /* pseudo_column ::= WDURATION */ yytestcase(yyruleno==532); - case 533: /* pseudo_column ::= IROWTS */ yytestcase(yyruleno==533); - case 534: /* pseudo_column ::= ISFILLED */ yytestcase(yyruleno==534); - case 535: /* pseudo_column ::= QTAGS */ yytestcase(yyruleno==535); - case 542: /* literal_func ::= NOW */ yytestcase(yyruleno==542); - case 543: /* literal_func ::= TODAY */ yytestcase(yyruleno==543); -{ yylhsminor.yy1000 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL)); } - yymsp[0].minor.yy1000 = yylhsminor.yy1000; + case 532: /* pseudo_column ::= ROWTS */ + case 533: /* pseudo_column ::= TBNAME */ yytestcase(yyruleno==533); + case 535: /* pseudo_column ::= QSTART */ yytestcase(yyruleno==535); + case 536: /* pseudo_column ::= QEND */ yytestcase(yyruleno==536); + case 537: /* pseudo_column ::= QDURATION */ yytestcase(yyruleno==537); + case 538: /* pseudo_column ::= WSTART */ yytestcase(yyruleno==538); + case 539: /* pseudo_column ::= WEND */ yytestcase(yyruleno==539); + case 540: /* pseudo_column ::= WDURATION */ yytestcase(yyruleno==540); + case 541: /* pseudo_column ::= IROWTS */ yytestcase(yyruleno==541); + case 542: /* pseudo_column ::= ISFILLED */ yytestcase(yyruleno==542); + case 543: /* pseudo_column ::= QTAGS */ yytestcase(yyruleno==543); + case 550: /* literal_func ::= NOW */ yytestcase(yyruleno==550); + case 551: /* literal_func ::= TODAY */ yytestcase(yyruleno==551); +{ yylhsminor.yy872 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL)); } + yymsp[0].minor.yy872 = yylhsminor.yy872; break; - case 526: /* pseudo_column ::= table_name NK_DOT TBNAME */ -{ yylhsminor.yy1000 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy305, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-2].minor.yy305)))); } - yymsp[-2].minor.yy1000 = yylhsminor.yy1000; + case 534: /* pseudo_column ::= table_name NK_DOT TBNAME */ +{ yylhsminor.yy872 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy833, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-2].minor.yy833)))); } + yymsp[-2].minor.yy872 = yylhsminor.yy872; break; - case 536: /* function_expression ::= function_name NK_LP expression_list NK_RP */ - case 537: /* function_expression ::= star_func NK_LP star_func_para_list NK_RP */ yytestcase(yyruleno==537); -{ yylhsminor.yy1000 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy305, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy305, yymsp[-1].minor.yy72)); } - yymsp[-3].minor.yy1000 = yylhsminor.yy1000; + case 544: /* function_expression ::= function_name NK_LP expression_list NK_RP */ + case 545: /* function_expression ::= star_func NK_LP star_func_para_list NK_RP */ yytestcase(yyruleno==545); +{ yylhsminor.yy872 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy833, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy833, yymsp[-1].minor.yy376)); } + yymsp[-3].minor.yy872 = yylhsminor.yy872; break; - case 538: /* function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ - case 539: /* function_expression ::= CAST NK_LP expr_or_subquery AS type_name_default_len NK_RP */ yytestcase(yyruleno==539); -{ yylhsminor.yy1000 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createCastFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy1000), yymsp[-1].minor.yy56)); } - yymsp[-5].minor.yy1000 = yylhsminor.yy1000; + case 546: /* function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ + case 547: /* function_expression ::= CAST NK_LP expr_or_subquery AS type_name_default_len NK_RP */ yytestcase(yyruleno==547); +{ yylhsminor.yy872 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createCastFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy872), yymsp[-1].minor.yy400)); } + yymsp[-5].minor.yy872 = yylhsminor.yy872; break; - case 541: /* literal_func ::= noarg_func NK_LP NK_RP */ -{ yylhsminor.yy1000 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy305, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-2].minor.yy305, NULL)); } - yymsp[-2].minor.yy1000 = yylhsminor.yy1000; + case 549: /* literal_func ::= noarg_func NK_LP NK_RP */ +{ yylhsminor.yy872 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy833, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-2].minor.yy833, NULL)); } + yymsp[-2].minor.yy872 = yylhsminor.yy872; break; - case 557: /* star_func_para_list ::= NK_STAR */ -{ yylhsminor.yy72 = createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy72 = yylhsminor.yy72; + case 565: /* star_func_para_list ::= NK_STAR */ +{ yylhsminor.yy376 = createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy376 = yylhsminor.yy376; break; - case 562: /* star_func_para ::= table_name NK_DOT NK_STAR */ - case 630: /* select_item ::= table_name NK_DOT NK_STAR */ yytestcase(yyruleno==630); -{ yylhsminor.yy1000 = createColumnNode(pCxt, &yymsp[-2].minor.yy305, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy1000 = yylhsminor.yy1000; + case 570: /* star_func_para ::= table_name NK_DOT NK_STAR */ + case 638: /* select_item ::= table_name NK_DOT NK_STAR */ yytestcase(yyruleno==638); +{ yylhsminor.yy872 = createColumnNode(pCxt, &yymsp[-2].minor.yy833, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy872 = yylhsminor.yy872; break; - case 563: /* case_when_expression ::= CASE when_then_list case_when_else_opt END */ -{ yylhsminor.yy1000 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, NULL, yymsp[-2].minor.yy72, yymsp[-1].minor.yy1000)); } - yymsp[-3].minor.yy1000 = yylhsminor.yy1000; + case 571: /* case_when_expression ::= CASE when_then_list case_when_else_opt END */ +{ yylhsminor.yy872 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, NULL, yymsp[-2].minor.yy376, yymsp[-1].minor.yy872)); } + yymsp[-3].minor.yy872 = yylhsminor.yy872; break; - case 564: /* case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ -{ yylhsminor.yy1000 = createRawExprNodeExt(pCxt, &yymsp[-4].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy1000), yymsp[-2].minor.yy72, yymsp[-1].minor.yy1000)); } - yymsp[-4].minor.yy1000 = yylhsminor.yy1000; + case 572: /* case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ +{ yylhsminor.yy872 = createRawExprNodeExt(pCxt, &yymsp[-4].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy872), yymsp[-2].minor.yy376, yymsp[-1].minor.yy872)); } + yymsp[-4].minor.yy872 = yylhsminor.yy872; break; - case 567: /* when_then_expr ::= WHEN common_expression THEN common_expression */ -{ yymsp[-3].minor.yy1000 = createWhenThenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy1000), releaseRawExprNode(pCxt, yymsp[0].minor.yy1000)); } + case 575: /* when_then_expr ::= WHEN common_expression THEN common_expression */ +{ yymsp[-3].minor.yy872 = createWhenThenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy872), releaseRawExprNode(pCxt, yymsp[0].minor.yy872)); } break; - case 569: /* case_when_else_opt ::= ELSE common_expression */ -{ yymsp[-1].minor.yy1000 = releaseRawExprNode(pCxt, yymsp[0].minor.yy1000); } + case 577: /* case_when_else_opt ::= ELSE common_expression */ +{ yymsp[-1].minor.yy872 = releaseRawExprNode(pCxt, yymsp[0].minor.yy872); } break; - case 570: /* predicate ::= expr_or_subquery compare_op expr_or_subquery */ - case 575: /* predicate ::= expr_or_subquery in_op in_predicate_value */ yytestcase(yyruleno==575); + case 578: /* predicate ::= expr_or_subquery compare_op expr_or_subquery */ + case 583: /* predicate ::= expr_or_subquery in_op in_predicate_value */ yytestcase(yyruleno==583); { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy1000); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy1000); - yylhsminor.yy1000 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, yymsp[-1].minor.yy324, releaseRawExprNode(pCxt, yymsp[-2].minor.yy1000), releaseRawExprNode(pCxt, yymsp[0].minor.yy1000))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy872); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy872); + yylhsminor.yy872 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, yymsp[-1].minor.yy1052, releaseRawExprNode(pCxt, yymsp[-2].minor.yy872), releaseRawExprNode(pCxt, yymsp[0].minor.yy872))); } - yymsp[-2].minor.yy1000 = yylhsminor.yy1000; + yymsp[-2].minor.yy872 = yylhsminor.yy872; break; - case 571: /* predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ + case 579: /* predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-4].minor.yy1000); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy1000); - yylhsminor.yy1000 = createRawExprNodeExt(pCxt, &s, &e, createBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-4].minor.yy1000), releaseRawExprNode(pCxt, yymsp[-2].minor.yy1000), releaseRawExprNode(pCxt, yymsp[0].minor.yy1000))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-4].minor.yy872); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy872); + yylhsminor.yy872 = createRawExprNodeExt(pCxt, &s, &e, createBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-4].minor.yy872), releaseRawExprNode(pCxt, yymsp[-2].minor.yy872), releaseRawExprNode(pCxt, yymsp[0].minor.yy872))); } - yymsp[-4].minor.yy1000 = yylhsminor.yy1000; + yymsp[-4].minor.yy872 = yylhsminor.yy872; break; - case 572: /* predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ + case 580: /* predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-5].minor.yy1000); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy1000); - yylhsminor.yy1000 = createRawExprNodeExt(pCxt, &s, &e, createNotBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy1000), releaseRawExprNode(pCxt, yymsp[-2].minor.yy1000), releaseRawExprNode(pCxt, yymsp[0].minor.yy1000))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-5].minor.yy872); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy872); + yylhsminor.yy872 = createRawExprNodeExt(pCxt, &s, &e, createNotBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy872), releaseRawExprNode(pCxt, yymsp[-2].minor.yy872), releaseRawExprNode(pCxt, yymsp[0].minor.yy872))); } - yymsp[-5].minor.yy1000 = yylhsminor.yy1000; + yymsp[-5].minor.yy872 = yylhsminor.yy872; break; - case 573: /* predicate ::= expr_or_subquery IS NULL */ + case 581: /* predicate ::= expr_or_subquery IS NULL */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy1000); - yylhsminor.yy1000 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NULL, releaseRawExprNode(pCxt, yymsp[-2].minor.yy1000), NULL)); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy872); + yylhsminor.yy872 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NULL, releaseRawExprNode(pCxt, yymsp[-2].minor.yy872), NULL)); } - yymsp[-2].minor.yy1000 = yylhsminor.yy1000; + yymsp[-2].minor.yy872 = yylhsminor.yy872; break; - case 574: /* predicate ::= expr_or_subquery IS NOT NULL */ + case 582: /* predicate ::= expr_or_subquery IS NOT NULL */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-3].minor.yy1000); - yylhsminor.yy1000 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NOT_NULL, releaseRawExprNode(pCxt, yymsp[-3].minor.yy1000), NULL)); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-3].minor.yy872); + yylhsminor.yy872 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NOT_NULL, releaseRawExprNode(pCxt, yymsp[-3].minor.yy872), NULL)); } - yymsp[-3].minor.yy1000 = yylhsminor.yy1000; + yymsp[-3].minor.yy872 = yylhsminor.yy872; break; - case 576: /* compare_op ::= NK_LT */ -{ yymsp[0].minor.yy324 = OP_TYPE_LOWER_THAN; } + case 584: /* compare_op ::= NK_LT */ +{ yymsp[0].minor.yy1052 = OP_TYPE_LOWER_THAN; } break; - case 577: /* compare_op ::= NK_GT */ -{ yymsp[0].minor.yy324 = OP_TYPE_GREATER_THAN; } + case 585: /* compare_op ::= NK_GT */ +{ yymsp[0].minor.yy1052 = OP_TYPE_GREATER_THAN; } break; - case 578: /* compare_op ::= NK_LE */ -{ yymsp[0].minor.yy324 = OP_TYPE_LOWER_EQUAL; } + case 586: /* compare_op ::= NK_LE */ +{ yymsp[0].minor.yy1052 = OP_TYPE_LOWER_EQUAL; } break; - case 579: /* compare_op ::= NK_GE */ -{ yymsp[0].minor.yy324 = OP_TYPE_GREATER_EQUAL; } + case 587: /* compare_op ::= NK_GE */ +{ yymsp[0].minor.yy1052 = OP_TYPE_GREATER_EQUAL; } break; - case 580: /* compare_op ::= NK_NE */ -{ yymsp[0].minor.yy324 = OP_TYPE_NOT_EQUAL; } + case 588: /* compare_op ::= NK_NE */ +{ yymsp[0].minor.yy1052 = OP_TYPE_NOT_EQUAL; } break; - case 581: /* compare_op ::= NK_EQ */ -{ yymsp[0].minor.yy324 = OP_TYPE_EQUAL; } + case 589: /* compare_op ::= NK_EQ */ +{ yymsp[0].minor.yy1052 = OP_TYPE_EQUAL; } break; - case 582: /* compare_op ::= LIKE */ -{ yymsp[0].minor.yy324 = OP_TYPE_LIKE; } + case 590: /* compare_op ::= LIKE */ +{ yymsp[0].minor.yy1052 = OP_TYPE_LIKE; } break; - case 583: /* compare_op ::= NOT LIKE */ -{ yymsp[-1].minor.yy324 = OP_TYPE_NOT_LIKE; } + case 591: /* compare_op ::= NOT LIKE */ +{ yymsp[-1].minor.yy1052 = OP_TYPE_NOT_LIKE; } break; - case 584: /* compare_op ::= MATCH */ -{ yymsp[0].minor.yy324 = OP_TYPE_MATCH; } + case 592: /* compare_op ::= MATCH */ +{ yymsp[0].minor.yy1052 = OP_TYPE_MATCH; } break; - case 585: /* compare_op ::= NMATCH */ -{ yymsp[0].minor.yy324 = OP_TYPE_NMATCH; } + case 593: /* compare_op ::= NMATCH */ +{ yymsp[0].minor.yy1052 = OP_TYPE_NMATCH; } break; - case 586: /* compare_op ::= CONTAINS */ -{ yymsp[0].minor.yy324 = OP_TYPE_JSON_CONTAINS; } + case 594: /* compare_op ::= CONTAINS */ +{ yymsp[0].minor.yy1052 = OP_TYPE_JSON_CONTAINS; } break; - case 587: /* in_op ::= IN */ -{ yymsp[0].minor.yy324 = OP_TYPE_IN; } + case 595: /* in_op ::= IN */ +{ yymsp[0].minor.yy1052 = OP_TYPE_IN; } break; - case 588: /* in_op ::= NOT IN */ -{ yymsp[-1].minor.yy324 = OP_TYPE_NOT_IN; } + case 596: /* in_op ::= NOT IN */ +{ yymsp[-1].minor.yy1052 = OP_TYPE_NOT_IN; } break; - case 589: /* in_predicate_value ::= NK_LP literal_list NK_RP */ -{ yylhsminor.yy1000 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createNodeListNode(pCxt, yymsp[-1].minor.yy72)); } - yymsp[-2].minor.yy1000 = yylhsminor.yy1000; + case 597: /* in_predicate_value ::= NK_LP literal_list NK_RP */ +{ yylhsminor.yy872 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createNodeListNode(pCxt, yymsp[-1].minor.yy376)); } + yymsp[-2].minor.yy872 = yylhsminor.yy872; break; - case 591: /* boolean_value_expression ::= NOT boolean_primary */ + case 599: /* boolean_value_expression ::= NOT boolean_primary */ { - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy1000); - yylhsminor.yy1000 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_NOT, releaseRawExprNode(pCxt, yymsp[0].minor.yy1000), NULL)); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy872); + yylhsminor.yy872 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_NOT, releaseRawExprNode(pCxt, yymsp[0].minor.yy872), NULL)); } - yymsp[-1].minor.yy1000 = yylhsminor.yy1000; + yymsp[-1].minor.yy872 = yylhsminor.yy872; break; - case 592: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ + case 600: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy1000); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy1000); - yylhsminor.yy1000 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy1000), releaseRawExprNode(pCxt, yymsp[0].minor.yy1000))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy872); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy872); + yylhsminor.yy872 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy872), releaseRawExprNode(pCxt, yymsp[0].minor.yy872))); } - yymsp[-2].minor.yy1000 = yylhsminor.yy1000; + yymsp[-2].minor.yy872 = yylhsminor.yy872; break; - case 593: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ + case 601: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy1000); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy1000); - yylhsminor.yy1000 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy1000), releaseRawExprNode(pCxt, yymsp[0].minor.yy1000))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy872); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy872); + yylhsminor.yy872 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy872), releaseRawExprNode(pCxt, yymsp[0].minor.yy872))); } - yymsp[-2].minor.yy1000 = yylhsminor.yy1000; + yymsp[-2].minor.yy872 = yylhsminor.yy872; break; - case 601: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */ -{ yylhsminor.yy1000 = createJoinTableNode(pCxt, JOIN_TYPE_INNER, yymsp[-2].minor.yy1000, yymsp[0].minor.yy1000, NULL); } - yymsp[-2].minor.yy1000 = yylhsminor.yy1000; + case 609: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */ +{ yylhsminor.yy872 = createJoinTableNode(pCxt, JOIN_TYPE_INNER, yymsp[-2].minor.yy872, yymsp[0].minor.yy872, NULL); } + yymsp[-2].minor.yy872 = yylhsminor.yy872; break; - case 604: /* table_primary ::= table_name alias_opt */ -{ yylhsminor.yy1000 = createRealTableNode(pCxt, NULL, &yymsp[-1].minor.yy305, &yymsp[0].minor.yy305); } - yymsp[-1].minor.yy1000 = yylhsminor.yy1000; + case 612: /* table_primary ::= table_name alias_opt */ +{ yylhsminor.yy872 = createRealTableNode(pCxt, NULL, &yymsp[-1].minor.yy833, &yymsp[0].minor.yy833); } + yymsp[-1].minor.yy872 = yylhsminor.yy872; break; - case 605: /* table_primary ::= db_name NK_DOT table_name alias_opt */ -{ yylhsminor.yy1000 = createRealTableNode(pCxt, &yymsp[-3].minor.yy305, &yymsp[-1].minor.yy305, &yymsp[0].minor.yy305); } - yymsp[-3].minor.yy1000 = yylhsminor.yy1000; + case 613: /* table_primary ::= db_name NK_DOT table_name alias_opt */ +{ yylhsminor.yy872 = createRealTableNode(pCxt, &yymsp[-3].minor.yy833, &yymsp[-1].minor.yy833, &yymsp[0].minor.yy833); } + yymsp[-3].minor.yy872 = yylhsminor.yy872; break; - case 606: /* table_primary ::= subquery alias_opt */ -{ yylhsminor.yy1000 = createTempTableNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy1000), &yymsp[0].minor.yy305); } - yymsp[-1].minor.yy1000 = yylhsminor.yy1000; + case 614: /* table_primary ::= subquery alias_opt */ +{ yylhsminor.yy872 = createTempTableNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy872), &yymsp[0].minor.yy833); } + yymsp[-1].minor.yy872 = yylhsminor.yy872; break; - case 608: /* alias_opt ::= */ -{ yymsp[1].minor.yy305 = nil_token; } + case 616: /* alias_opt ::= */ +{ yymsp[1].minor.yy833 = nil_token; } break; - case 610: /* alias_opt ::= AS table_alias */ -{ yymsp[-1].minor.yy305 = yymsp[0].minor.yy305; } + case 618: /* alias_opt ::= AS table_alias */ +{ yymsp[-1].minor.yy833 = yymsp[0].minor.yy833; } break; - case 611: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */ - case 612: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==612); -{ yymsp[-2].minor.yy1000 = yymsp[-1].minor.yy1000; } + case 619: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */ + case 620: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==620); +{ yymsp[-2].minor.yy872 = yymsp[-1].minor.yy872; } break; - case 613: /* joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ -{ yylhsminor.yy1000 = createJoinTableNode(pCxt, yymsp[-4].minor.yy828, yymsp[-5].minor.yy1000, yymsp[-2].minor.yy1000, yymsp[0].minor.yy1000); } - yymsp[-5].minor.yy1000 = yylhsminor.yy1000; + case 621: /* joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ +{ yylhsminor.yy872 = createJoinTableNode(pCxt, yymsp[-4].minor.yy948, yymsp[-5].minor.yy872, yymsp[-2].minor.yy872, yymsp[0].minor.yy872); } + yymsp[-5].minor.yy872 = yylhsminor.yy872; break; - case 614: /* join_type ::= */ -{ yymsp[1].minor.yy828 = JOIN_TYPE_INNER; } + case 622: /* join_type ::= */ +{ yymsp[1].minor.yy948 = JOIN_TYPE_INNER; } break; - case 615: /* join_type ::= INNER */ -{ yymsp[0].minor.yy828 = JOIN_TYPE_INNER; } + case 623: /* join_type ::= INNER */ +{ yymsp[0].minor.yy948 = JOIN_TYPE_INNER; } break; - case 616: /* 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 624: /* 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.yy1000 = createSelectStmt(pCxt, yymsp[-11].minor.yy985, yymsp[-9].minor.yy72, yymsp[-8].minor.yy1000, yymsp[-12].minor.yy72); - yymsp[-13].minor.yy1000 = setSelectStmtTagMode(pCxt, yymsp[-13].minor.yy1000, yymsp[-10].minor.yy985); - yymsp[-13].minor.yy1000 = addWhereClause(pCxt, yymsp[-13].minor.yy1000, yymsp[-7].minor.yy1000); - yymsp[-13].minor.yy1000 = addPartitionByClause(pCxt, yymsp[-13].minor.yy1000, yymsp[-6].minor.yy72); - yymsp[-13].minor.yy1000 = addWindowClauseClause(pCxt, yymsp[-13].minor.yy1000, yymsp[-2].minor.yy1000); - yymsp[-13].minor.yy1000 = addGroupByClause(pCxt, yymsp[-13].minor.yy1000, yymsp[-1].minor.yy72); - yymsp[-13].minor.yy1000 = addHavingClause(pCxt, yymsp[-13].minor.yy1000, yymsp[0].minor.yy1000); - yymsp[-13].minor.yy1000 = addRangeClause(pCxt, yymsp[-13].minor.yy1000, yymsp[-5].minor.yy1000); - yymsp[-13].minor.yy1000 = addEveryClause(pCxt, yymsp[-13].minor.yy1000, yymsp[-4].minor.yy1000); - yymsp[-13].minor.yy1000 = addFillClause(pCxt, yymsp[-13].minor.yy1000, yymsp[-3].minor.yy1000); + yymsp[-13].minor.yy872 = createSelectStmt(pCxt, yymsp[-11].minor.yy185, yymsp[-9].minor.yy376, yymsp[-8].minor.yy872, yymsp[-12].minor.yy376); + yymsp[-13].minor.yy872 = setSelectStmtTagMode(pCxt, yymsp[-13].minor.yy872, yymsp[-10].minor.yy185); + yymsp[-13].minor.yy872 = addWhereClause(pCxt, yymsp[-13].minor.yy872, yymsp[-7].minor.yy872); + yymsp[-13].minor.yy872 = addPartitionByClause(pCxt, yymsp[-13].minor.yy872, yymsp[-6].minor.yy376); + yymsp[-13].minor.yy872 = addWindowClauseClause(pCxt, yymsp[-13].minor.yy872, yymsp[-2].minor.yy872); + yymsp[-13].minor.yy872 = addGroupByClause(pCxt, yymsp[-13].minor.yy872, yymsp[-1].minor.yy376); + yymsp[-13].minor.yy872 = addHavingClause(pCxt, yymsp[-13].minor.yy872, yymsp[0].minor.yy872); + yymsp[-13].minor.yy872 = addRangeClause(pCxt, yymsp[-13].minor.yy872, yymsp[-5].minor.yy872); + yymsp[-13].minor.yy872 = addEveryClause(pCxt, yymsp[-13].minor.yy872, yymsp[-4].minor.yy872); + yymsp[-13].minor.yy872 = addFillClause(pCxt, yymsp[-13].minor.yy872, yymsp[-3].minor.yy872); } break; - case 617: /* hint_list ::= */ -{ yymsp[1].minor.yy72 = createHintNodeList(pCxt, NULL); } + case 625: /* hint_list ::= */ +{ yymsp[1].minor.yy376 = createHintNodeList(pCxt, NULL); } break; - case 618: /* hint_list ::= NK_HINT */ -{ yylhsminor.yy72 = createHintNodeList(pCxt, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy72 = yylhsminor.yy72; + case 626: /* hint_list ::= NK_HINT */ +{ yylhsminor.yy376 = createHintNodeList(pCxt, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy376 = yylhsminor.yy376; break; - case 623: /* set_quantifier_opt ::= ALL */ -{ yymsp[0].minor.yy985 = false; } + case 631: /* set_quantifier_opt ::= ALL */ +{ yymsp[0].minor.yy185 = false; } break; - case 626: /* select_item ::= NK_STAR */ -{ yylhsminor.yy1000 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy1000 = yylhsminor.yy1000; + case 634: /* select_item ::= NK_STAR */ +{ yylhsminor.yy872 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy872 = yylhsminor.yy872; break; - case 628: /* select_item ::= common_expression column_alias */ - case 638: /* partition_item ::= expr_or_subquery column_alias */ yytestcase(yyruleno==638); -{ yylhsminor.yy1000 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy1000), &yymsp[0].minor.yy305); } - yymsp[-1].minor.yy1000 = yylhsminor.yy1000; + case 636: /* select_item ::= common_expression column_alias */ + case 646: /* partition_item ::= expr_or_subquery column_alias */ yytestcase(yyruleno==646); +{ yylhsminor.yy872 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy872), &yymsp[0].minor.yy833); } + yymsp[-1].minor.yy872 = yylhsminor.yy872; break; - case 629: /* select_item ::= common_expression AS column_alias */ - case 639: /* partition_item ::= expr_or_subquery AS column_alias */ yytestcase(yyruleno==639); -{ yylhsminor.yy1000 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy1000), &yymsp[0].minor.yy305); } - yymsp[-2].minor.yy1000 = yylhsminor.yy1000; + case 637: /* select_item ::= common_expression AS column_alias */ + case 647: /* partition_item ::= expr_or_subquery AS column_alias */ yytestcase(yyruleno==647); +{ yylhsminor.yy872 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy872), &yymsp[0].minor.yy833); } + yymsp[-2].minor.yy872 = yylhsminor.yy872; break; - case 634: /* partition_by_clause_opt ::= PARTITION BY partition_list */ - case 664: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==664); - case 684: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==684); -{ yymsp[-2].minor.yy72 = yymsp[0].minor.yy72; } + case 642: /* partition_by_clause_opt ::= PARTITION BY partition_list */ + case 672: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==672); + case 692: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==692); +{ yymsp[-2].minor.yy376 = yymsp[0].minor.yy376; } break; - case 641: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP */ -{ yymsp[-5].minor.yy1000 = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy1000), releaseRawExprNode(pCxt, yymsp[-1].minor.yy1000)); } + case 649: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP */ +{ yymsp[-5].minor.yy872 = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy872), releaseRawExprNode(pCxt, yymsp[-1].minor.yy872)); } break; - case 642: /* twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ -{ yymsp[-3].minor.yy1000 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy1000)); } + case 650: /* twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ +{ yymsp[-3].minor.yy872 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy872)); } break; - case 643: /* twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ -{ yymsp[-5].minor.yy1000 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy1000), NULL, yymsp[-1].minor.yy1000, yymsp[0].minor.yy1000); } + case 651: /* twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ +{ yymsp[-5].minor.yy872 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy872), NULL, yymsp[-1].minor.yy872, yymsp[0].minor.yy872); } break; - case 644: /* 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.yy1000 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy1000), releaseRawExprNode(pCxt, yymsp[-3].minor.yy1000), yymsp[-1].minor.yy1000, yymsp[0].minor.yy1000); } + case 652: /* 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.yy872 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy872), releaseRawExprNode(pCxt, yymsp[-3].minor.yy872), yymsp[-1].minor.yy872, yymsp[0].minor.yy872); } break; - case 645: /* twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ -{ yymsp[-6].minor.yy1000 = createEventWindowNode(pCxt, yymsp[-3].minor.yy1000, yymsp[0].minor.yy1000); } + case 653: /* twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ +{ yymsp[-6].minor.yy872 = createEventWindowNode(pCxt, yymsp[-3].minor.yy872, yymsp[0].minor.yy872); } break; - case 646: /* twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy1000 = createCountWindowNode(pCxt, &yymsp[-1].minor.yy0, &yymsp[-1].minor.yy0); } + case 654: /* twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_RP */ +{ yymsp[-3].minor.yy872 = createCountWindowNode(pCxt, &yymsp[-1].minor.yy0, &yymsp[-1].minor.yy0); } break; - case 647: /* twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ -{ yymsp[-5].minor.yy1000 = createCountWindowNode(pCxt, &yymsp[-3].minor.yy0, &yymsp[-1].minor.yy0); } + case 655: /* twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ +{ yymsp[-5].minor.yy872 = createCountWindowNode(pCxt, &yymsp[-3].minor.yy0, &yymsp[-1].minor.yy0); } break; - case 654: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */ -{ yymsp[-3].minor.yy1000 = createFillNode(pCxt, yymsp[-1].minor.yy926, NULL); } + case 662: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */ +{ yymsp[-3].minor.yy872 = createFillNode(pCxt, yymsp[-1].minor.yy294, NULL); } break; - case 655: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP */ -{ yymsp[-5].minor.yy1000 = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, yymsp[-1].minor.yy72)); } + case 663: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP */ +{ yymsp[-5].minor.yy872 = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, yymsp[-1].minor.yy376)); } break; - case 656: /* fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP */ -{ yymsp[-5].minor.yy1000 = createFillNode(pCxt, FILL_MODE_VALUE_F, createNodeListNode(pCxt, yymsp[-1].minor.yy72)); } + case 664: /* fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP */ +{ yymsp[-5].minor.yy872 = createFillNode(pCxt, FILL_MODE_VALUE_F, createNodeListNode(pCxt, yymsp[-1].minor.yy376)); } break; - case 657: /* fill_mode ::= NONE */ -{ yymsp[0].minor.yy926 = FILL_MODE_NONE; } + case 665: /* fill_mode ::= NONE */ +{ yymsp[0].minor.yy294 = FILL_MODE_NONE; } break; - case 658: /* fill_mode ::= PREV */ -{ yymsp[0].minor.yy926 = FILL_MODE_PREV; } + case 666: /* fill_mode ::= PREV */ +{ yymsp[0].minor.yy294 = FILL_MODE_PREV; } break; - case 659: /* fill_mode ::= NULL */ -{ yymsp[0].minor.yy926 = FILL_MODE_NULL; } + case 667: /* fill_mode ::= NULL */ +{ yymsp[0].minor.yy294 = FILL_MODE_NULL; } break; - case 660: /* fill_mode ::= NULL_F */ -{ yymsp[0].minor.yy926 = FILL_MODE_NULL_F; } + case 668: /* fill_mode ::= NULL_F */ +{ yymsp[0].minor.yy294 = FILL_MODE_NULL_F; } break; - case 661: /* fill_mode ::= LINEAR */ -{ yymsp[0].minor.yy926 = FILL_MODE_LINEAR; } + case 669: /* fill_mode ::= LINEAR */ +{ yymsp[0].minor.yy294 = FILL_MODE_LINEAR; } break; - case 662: /* fill_mode ::= NEXT */ -{ yymsp[0].minor.yy926 = FILL_MODE_NEXT; } + case 670: /* fill_mode ::= NEXT */ +{ yymsp[0].minor.yy294 = FILL_MODE_NEXT; } break; - case 665: /* group_by_list ::= expr_or_subquery */ -{ yylhsminor.yy72 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy1000))); } - yymsp[0].minor.yy72 = yylhsminor.yy72; + case 673: /* group_by_list ::= expr_or_subquery */ +{ yylhsminor.yy376 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy872))); } + yymsp[0].minor.yy376 = yylhsminor.yy376; break; - case 666: /* group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ -{ yylhsminor.yy72 = addNodeToList(pCxt, yymsp[-2].minor.yy72, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy1000))); } - yymsp[-2].minor.yy72 = yylhsminor.yy72; + case 674: /* group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ +{ yylhsminor.yy376 = addNodeToList(pCxt, yymsp[-2].minor.yy376, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy872))); } + yymsp[-2].minor.yy376 = yylhsminor.yy376; break; - case 670: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ -{ yymsp[-5].minor.yy1000 = createInterpTimeRange(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy1000), releaseRawExprNode(pCxt, yymsp[-1].minor.yy1000)); } + case 678: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ +{ yymsp[-5].minor.yy872 = createInterpTimeRange(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy872), releaseRawExprNode(pCxt, yymsp[-1].minor.yy872)); } break; - case 671: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_RP */ -{ yymsp[-3].minor.yy1000 = createInterpTimePoint(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy1000)); } + case 679: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_RP */ +{ yymsp[-3].minor.yy872 = createInterpTimePoint(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy872)); } break; - case 674: /* query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ + case 682: /* query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ { - yylhsminor.yy1000 = addOrderByClause(pCxt, yymsp[-3].minor.yy1000, yymsp[-2].minor.yy72); - yylhsminor.yy1000 = addSlimitClause(pCxt, yylhsminor.yy1000, yymsp[-1].minor.yy1000); - yylhsminor.yy1000 = addLimitClause(pCxt, yylhsminor.yy1000, yymsp[0].minor.yy1000); + yylhsminor.yy872 = addOrderByClause(pCxt, yymsp[-3].minor.yy872, yymsp[-2].minor.yy376); + yylhsminor.yy872 = addSlimitClause(pCxt, yylhsminor.yy872, yymsp[-1].minor.yy872); + yylhsminor.yy872 = addLimitClause(pCxt, yylhsminor.yy872, yymsp[0].minor.yy872); } - yymsp[-3].minor.yy1000 = yylhsminor.yy1000; + yymsp[-3].minor.yy872 = yylhsminor.yy872; break; - case 677: /* union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ -{ yylhsminor.yy1000 = createSetOperator(pCxt, SET_OP_TYPE_UNION_ALL, yymsp[-3].minor.yy1000, yymsp[0].minor.yy1000); } - yymsp[-3].minor.yy1000 = yylhsminor.yy1000; + case 685: /* union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ +{ yylhsminor.yy872 = createSetOperator(pCxt, SET_OP_TYPE_UNION_ALL, yymsp[-3].minor.yy872, yymsp[0].minor.yy872); } + yymsp[-3].minor.yy872 = yylhsminor.yy872; break; - case 678: /* union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ -{ yylhsminor.yy1000 = createSetOperator(pCxt, SET_OP_TYPE_UNION, yymsp[-2].minor.yy1000, yymsp[0].minor.yy1000); } - yymsp[-2].minor.yy1000 = yylhsminor.yy1000; + case 686: /* union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ +{ yylhsminor.yy872 = createSetOperator(pCxt, SET_OP_TYPE_UNION, yymsp[-2].minor.yy872, yymsp[0].minor.yy872); } + yymsp[-2].minor.yy872 = yylhsminor.yy872; break; - case 686: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */ - case 690: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==690); -{ yymsp[-1].minor.yy1000 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); } + case 694: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */ + case 698: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==698); +{ yymsp[-1].minor.yy872 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); } break; - case 687: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ - case 691: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==691); -{ yymsp[-3].minor.yy1000 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); } + case 695: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ + case 699: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==699); +{ yymsp[-3].minor.yy872 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); } break; - case 688: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - case 692: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==692); -{ yymsp[-3].minor.yy1000 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); } + case 696: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + case 700: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==700); +{ yymsp[-3].minor.yy872 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); } break; - case 693: /* subquery ::= NK_LP query_expression NK_RP */ -{ yylhsminor.yy1000 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy1000); } - yymsp[-2].minor.yy1000 = yylhsminor.yy1000; + case 701: /* subquery ::= NK_LP query_expression NK_RP */ +{ yylhsminor.yy872 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy872); } + yymsp[-2].minor.yy872 = yylhsminor.yy872; break; - case 698: /* sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ -{ yylhsminor.yy1000 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy1000), yymsp[-1].minor.yy130, yymsp[0].minor.yy681); } - yymsp[-2].minor.yy1000 = yylhsminor.yy1000; + case 706: /* sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ +{ yylhsminor.yy872 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy872), yymsp[-1].minor.yy290, yymsp[0].minor.yy169); } + yymsp[-2].minor.yy872 = yylhsminor.yy872; break; - case 699: /* ordering_specification_opt ::= */ -{ yymsp[1].minor.yy130 = ORDER_ASC; } + case 707: /* ordering_specification_opt ::= */ +{ yymsp[1].minor.yy290 = ORDER_ASC; } break; - case 700: /* ordering_specification_opt ::= ASC */ -{ yymsp[0].minor.yy130 = ORDER_ASC; } + case 708: /* ordering_specification_opt ::= ASC */ +{ yymsp[0].minor.yy290 = ORDER_ASC; } break; - case 701: /* ordering_specification_opt ::= DESC */ -{ yymsp[0].minor.yy130 = ORDER_DESC; } + case 709: /* ordering_specification_opt ::= DESC */ +{ yymsp[0].minor.yy290 = ORDER_DESC; } break; - case 702: /* null_ordering_opt ::= */ -{ yymsp[1].minor.yy681 = NULL_ORDER_DEFAULT; } + case 710: /* null_ordering_opt ::= */ +{ yymsp[1].minor.yy169 = NULL_ORDER_DEFAULT; } break; - case 703: /* null_ordering_opt ::= NULLS FIRST */ -{ yymsp[-1].minor.yy681 = NULL_ORDER_FIRST; } + case 711: /* null_ordering_opt ::= NULLS FIRST */ +{ yymsp[-1].minor.yy169 = NULL_ORDER_FIRST; } break; - case 704: /* null_ordering_opt ::= NULLS LAST */ -{ yymsp[-1].minor.yy681 = NULL_ORDER_LAST; } + case 712: /* null_ordering_opt ::= NULLS LAST */ +{ yymsp[-1].minor.yy169 = NULL_ORDER_LAST; } break; default: break; diff --git a/source/util/src/tconfig.c b/source/util/src/tconfig.c index 29df209309..aec1eba684 100644 --- a/source/util/src/tconfig.c +++ b/source/util/src/tconfig.c @@ -21,8 +21,8 @@ #include "tgrant.h" #include "tjson.h" #include "tlog.h" -#include "tutil.h" #include "tunit.h" +#include "tutil.h" #define CFG_NAME_PRINT_LEN 24 #define CFG_SRC_PRINT_LEN 12 @@ -315,19 +315,19 @@ static int32_t cfgSetTfsItem(SConfig *pCfg, const char *name, const char *value, static int32_t cfgUpdateDebugFlagItem(SConfig *pCfg, const char *name, bool resetArray) { SConfigItem *pDebugFlagItem = cfgGetItem(pCfg, "debugFlag"); if (resetArray) { - // reset - if (pDebugFlagItem == NULL) return -1; + // reset + if (pDebugFlagItem == NULL) return -1; - // logflag names that should 'not' be set by 'debugFlag' + // logflag names that should 'not' be set by 'debugFlag' + if (pDebugFlagItem->array == NULL) { + pDebugFlagItem->array = taosArrayInit(16, sizeof(SLogVar)); if (pDebugFlagItem->array == NULL) { - pDebugFlagItem->array = taosArrayInit(16, sizeof(SLogVar)); - if (pDebugFlagItem->array == NULL) { - terrno = TSDB_CODE_OUT_OF_MEMORY; - return -1; - } + terrno = TSDB_CODE_OUT_OF_MEMORY; + return -1; } - taosArrayClear(pDebugFlagItem->array); - return 0; + } + taosArrayClear(pDebugFlagItem->array); + return 0; } // update @@ -406,8 +406,7 @@ int32_t cfgCheckRangeForDynUpdate(SConfig *pCfg, const char *name, const char *p case CFG_DTYPE_BOOL: { int32_t ival = (int32_t)atoi(pVal); if (ival != 0 && ival != 1) { - uError("cfg:%s, type:%s value:%d out of range[0, 1]", pItem->name, - cfgDtypeStr(pItem->dtype), ival); + uError("cfg:%s, type:%s value:%d out of range[0, 1]", pItem->name, cfgDtypeStr(pItem->dtype), ival); terrno = TSDB_CODE_OUT_OF_RANGE; return -1; } @@ -691,6 +690,89 @@ void cfgDumpItemScope(SConfigItem *pItem, char *buf, int32_t bufSize, int32_t *p *pLen = len; } +void cfgDumpCfgS3(SConfig *pCfg, bool tsc, bool dump) { + if (dump) { + printf(" s3 config"); + printf("\n"); + printf("================================================================="); + printf("\n"); + } else { + uInfo(" s3 config"); + uInfo("================================================================="); + } + + char src[CFG_SRC_PRINT_LEN + 1] = {0}; + char name[CFG_NAME_PRINT_LEN + 1] = {0}; + + int32_t size = taosArrayGetSize(pCfg->array); + for (int32_t i = 0; i < size; ++i) { + SConfigItem *pItem = taosArrayGet(pCfg->array, i); + if (tsc && pItem->scope == CFG_SCOPE_SERVER) continue; + if (dump && strcmp(pItem->name, "scriptDir") == 0) continue; + if (dump && strncmp(pItem->name, "s3", 2) != 0) continue; + tstrncpy(src, cfgStypeStr(pItem->stype), CFG_SRC_PRINT_LEN); + for (int32_t j = 0; j < CFG_SRC_PRINT_LEN; ++j) { + if (src[j] == 0) src[j] = ' '; + } + + tstrncpy(name, pItem->name, CFG_NAME_PRINT_LEN); + for (int32_t j = 0; j < CFG_NAME_PRINT_LEN; ++j) { + if (name[j] == 0) name[j] = ' '; + } + + switch (pItem->dtype) { + case CFG_DTYPE_BOOL: + if (dump) { + printf("%s %s %u\n", src, name, pItem->bval); + } else { + uInfo("%s %s %u", src, name, pItem->bval); + } + + break; + case CFG_DTYPE_INT32: + if (dump) { + printf("%s %s %d\n", src, name, pItem->i32); + } else { + uInfo("%s %s %d", src, name, pItem->i32); + } + break; + case CFG_DTYPE_INT64: + if (dump) { + printf("%s %s %" PRId64 "\n", src, name, pItem->i64); + } else { + uInfo("%s %s %" PRId64, src, name, pItem->i64); + } + break; + case CFG_DTYPE_DOUBLE: + case CFG_DTYPE_FLOAT: + if (dump) { + printf("%s %s %.2f\n", src, name, pItem->fval); + } else { + uInfo("%s %s %.2f", src, name, pItem->fval); + } + break; + case CFG_DTYPE_STRING: + case CFG_DTYPE_DIR: + case CFG_DTYPE_LOCALE: + case CFG_DTYPE_CHARSET: + case CFG_DTYPE_TIMEZONE: + case CFG_DTYPE_NONE: + if (dump) { + printf("%s %s %s\n", src, name, pItem->str); + } else { + uInfo("%s %s %s", src, name, pItem->str); + } + break; + } + } + + if (dump) { + printf("=================================================================\n"); + } else { + uInfo("================================================================="); + } +} + void cfgDumpCfg(SConfig *pCfg, bool tsc, bool dump) { if (dump) { printf(" global config"); @@ -738,7 +820,7 @@ void cfgDumpCfg(SConfig *pCfg, bool tsc, bool dump) { break; case CFG_DTYPE_INT64: if (dump) { - printf("%s %s %" PRId64"\n", src, name, pItem->i64); + printf("%s %s %" PRId64 "\n", src, name, pItem->i64); } else { uInfo("%s %s %" PRId64, src, name, pItem->i64); } diff --git a/tests/develop-test/2-query/show_create_db.py b/tests/develop-test/2-query/show_create_db.py index 6294fa8a3a..3fe68a6803 100644 --- a/tests/develop-test/2-query/show_create_db.py +++ b/tests/develop-test/2-query/show_create_db.py @@ -42,17 +42,17 @@ class TDTestCase: tdSql.query('show create database scd;') tdSql.checkRows(1) tdSql.checkData(0, 0, 'scd') - tdSql.checkData(0, 1, "CREATE DATABASE `scd` BUFFER 256 CACHESIZE 1 CACHEMODEL 'none' COMP 2 DURATION 14400m WAL_FSYNC_PERIOD 3000 MAXROWS 4096 MINROWS 100 STT_TRIGGER 2 KEEP 5256000m,5256000m,5256000m PAGES 256 PAGESIZE 4 PRECISION 'ms' REPLICA 1 WAL_LEVEL 1 VGROUPS 2 SINGLE_STABLE 0 TABLE_PREFIX 0 TABLE_SUFFIX 0 TSDB_PAGESIZE 4 WAL_RETENTION_PERIOD 3600 WAL_RETENTION_SIZE 0 KEEP_TIME_OFFSET 0 ENCRYPT_ALGORITHM 'none'") + tdSql.checkData(0, 1, "CREATE DATABASE `scd` BUFFER 256 CACHESIZE 1 CACHEMODEL 'none' COMP 2 DURATION 14400m WAL_FSYNC_PERIOD 3000 MAXROWS 4096 MINROWS 100 STT_TRIGGER 2 KEEP 5256000m,5256000m,5256000m PAGES 256 PAGESIZE 4 PRECISION 'ms' REPLICA 1 WAL_LEVEL 1 VGROUPS 2 SINGLE_STABLE 0 TABLE_PREFIX 0 TABLE_SUFFIX 0 TSDB_PAGESIZE 4 WAL_RETENTION_PERIOD 3600 WAL_RETENTION_SIZE 0 KEEP_TIME_OFFSET 0 ENCRYPT_ALGORITHM 'none' S3_CHUNKSIZE 262144 S3_KEEPLOCAL 5256000m S3_COMPACT 0") tdSql.query('show create database scd2;') tdSql.checkRows(1) tdSql.checkData(0, 0, 'scd2') - tdSql.checkData(0, 1, "CREATE DATABASE `scd2` BUFFER 256 CACHESIZE 1 CACHEMODEL 'none' COMP 2 DURATION 14400m WAL_FSYNC_PERIOD 3000 MAXROWS 4096 MINROWS 100 STT_TRIGGER 3 KEEP 5256000m,5256000m,5256000m PAGES 256 PAGESIZE 4 PRECISION 'ms' REPLICA 1 WAL_LEVEL 1 VGROUPS 2 SINGLE_STABLE 0 TABLE_PREFIX 0 TABLE_SUFFIX 0 TSDB_PAGESIZE 4 WAL_RETENTION_PERIOD 3600 WAL_RETENTION_SIZE 0 KEEP_TIME_OFFSET 0 ENCRYPT_ALGORITHM 'none'") + tdSql.checkData(0, 1, "CREATE DATABASE `scd2` BUFFER 256 CACHESIZE 1 CACHEMODEL 'none' COMP 2 DURATION 14400m WAL_FSYNC_PERIOD 3000 MAXROWS 4096 MINROWS 100 STT_TRIGGER 3 KEEP 5256000m,5256000m,5256000m PAGES 256 PAGESIZE 4 PRECISION 'ms' REPLICA 1 WAL_LEVEL 1 VGROUPS 2 SINGLE_STABLE 0 TABLE_PREFIX 0 TABLE_SUFFIX 0 TSDB_PAGESIZE 4 WAL_RETENTION_PERIOD 3600 WAL_RETENTION_SIZE 0 KEEP_TIME_OFFSET 0 ENCRYPT_ALGORITHM 'none' S3_CHUNKSIZE 262144 S3_KEEPLOCAL 5256000m S3_COMPACT 0") tdSql.query('show create database scd4') tdSql.checkRows(1) tdSql.checkData(0, 0, 'scd4') - tdSql.checkData(0, 1, "CREATE DATABASE `scd4` BUFFER 256 CACHESIZE 1 CACHEMODEL 'none' COMP 2 DURATION 14400m WAL_FSYNC_PERIOD 3000 MAXROWS 4096 MINROWS 100 STT_TRIGGER 13 KEEP 5256000m,5256000m,5256000m PAGES 256 PAGESIZE 4 PRECISION 'ms' REPLICA 1 WAL_LEVEL 1 VGROUPS 2 SINGLE_STABLE 0 TABLE_PREFIX 0 TABLE_SUFFIX 0 TSDB_PAGESIZE 4 WAL_RETENTION_PERIOD 3600 WAL_RETENTION_SIZE 0 KEEP_TIME_OFFSET 0 ENCRYPT_ALGORITHM 'none'") + tdSql.checkData(0, 1, "CREATE DATABASE `scd4` BUFFER 256 CACHESIZE 1 CACHEMODEL 'none' COMP 2 DURATION 14400m WAL_FSYNC_PERIOD 3000 MAXROWS 4096 MINROWS 100 STT_TRIGGER 13 KEEP 5256000m,5256000m,5256000m PAGES 256 PAGESIZE 4 PRECISION 'ms' REPLICA 1 WAL_LEVEL 1 VGROUPS 2 SINGLE_STABLE 0 TABLE_PREFIX 0 TABLE_SUFFIX 0 TSDB_PAGESIZE 4 WAL_RETENTION_PERIOD 3600 WAL_RETENTION_SIZE 0 KEEP_TIME_OFFSET 0 ENCRYPT_ALGORITHM 'none' S3_CHUNKSIZE 262144 S3_KEEPLOCAL 5256000m S3_COMPACT 0") self.restartTaosd(1, dbname='scd') @@ -60,17 +60,16 @@ class TDTestCase: tdSql.query('show create database scd;') tdSql.checkRows(1) tdSql.checkData(0, 0, 'scd') - tdSql.checkData(0, 1, "CREATE DATABASE `scd` BUFFER 256 CACHESIZE 1 CACHEMODEL 'none' COMP 2 DURATION 14400m WAL_FSYNC_PERIOD 3000 MAXROWS 4096 MINROWS 100 STT_TRIGGER 2 KEEP 5256000m,5256000m,5256000m PAGES 256 PAGESIZE 4 PRECISION 'ms' REPLICA 1 WAL_LEVEL 1 VGROUPS 2 SINGLE_STABLE 0 TABLE_PREFIX 0 TABLE_SUFFIX 0 TSDB_PAGESIZE 4 WAL_RETENTION_PERIOD 3600 WAL_RETENTION_SIZE 0 KEEP_TIME_OFFSET 0 ENCRYPT_ALGORITHM 'none'") + tdSql.checkData(0, 1, "CREATE DATABASE `scd` BUFFER 256 CACHESIZE 1 CACHEMODEL 'none' COMP 2 DURATION 14400m WAL_FSYNC_PERIOD 3000 MAXROWS 4096 MINROWS 100 STT_TRIGGER 2 KEEP 5256000m,5256000m,5256000m PAGES 256 PAGESIZE 4 PRECISION 'ms' REPLICA 1 WAL_LEVEL 1 VGROUPS 2 SINGLE_STABLE 0 TABLE_PREFIX 0 TABLE_SUFFIX 0 TSDB_PAGESIZE 4 WAL_RETENTION_PERIOD 3600 WAL_RETENTION_SIZE 0 KEEP_TIME_OFFSET 0 ENCRYPT_ALGORITHM 'none' S3_CHUNKSIZE 262144 S3_KEEPLOCAL 5256000m S3_COMPACT 0") tdSql.query('show create database scd2;') tdSql.checkRows(1) tdSql.checkData(0, 0, 'scd2') - tdSql.checkData(0, 1, "CREATE DATABASE `scd2` BUFFER 256 CACHESIZE 1 CACHEMODEL 'none' COMP 2 DURATION 14400m WAL_FSYNC_PERIOD 3000 MAXROWS 4096 MINROWS 100 STT_TRIGGER 3 KEEP 5256000m,5256000m,5256000m PAGES 256 PAGESIZE 4 PRECISION 'ms' REPLICA 1 WAL_LEVEL 1 VGROUPS 2 SINGLE_STABLE 0 TABLE_PREFIX 0 TABLE_SUFFIX 0 TSDB_PAGESIZE 4 WAL_RETENTION_PERIOD 3600 WAL_RETENTION_SIZE 0 KEEP_TIME_OFFSET 0 ENCRYPT_ALGORITHM 'none'") - + tdSql.checkData(0, 1, "CREATE DATABASE `scd2` BUFFER 256 CACHESIZE 1 CACHEMODEL 'none' COMP 2 DURATION 14400m WAL_FSYNC_PERIOD 3000 MAXROWS 4096 MINROWS 100 STT_TRIGGER 3 KEEP 5256000m,5256000m,5256000m PAGES 256 PAGESIZE 4 PRECISION 'ms' REPLICA 1 WAL_LEVEL 1 VGROUPS 2 SINGLE_STABLE 0 TABLE_PREFIX 0 TABLE_SUFFIX 0 TSDB_PAGESIZE 4 WAL_RETENTION_PERIOD 3600 WAL_RETENTION_SIZE 0 KEEP_TIME_OFFSET 0 ENCRYPT_ALGORITHM 'none' S3_CHUNKSIZE 262144 S3_KEEPLOCAL 5256000m S3_COMPACT 0") tdSql.query('show create database scd4') tdSql.checkRows(1) tdSql.checkData(0, 0, 'scd4') - tdSql.checkData(0, 1, "CREATE DATABASE `scd4` BUFFER 256 CACHESIZE 1 CACHEMODEL 'none' COMP 2 DURATION 14400m WAL_FSYNC_PERIOD 3000 MAXROWS 4096 MINROWS 100 STT_TRIGGER 13 KEEP 5256000m,5256000m,5256000m PAGES 256 PAGESIZE 4 PRECISION 'ms' REPLICA 1 WAL_LEVEL 1 VGROUPS 2 SINGLE_STABLE 0 TABLE_PREFIX 0 TABLE_SUFFIX 0 TSDB_PAGESIZE 4 WAL_RETENTION_PERIOD 3600 WAL_RETENTION_SIZE 0 KEEP_TIME_OFFSET 0 ENCRYPT_ALGORITHM 'none'") + tdSql.checkData(0, 1, "CREATE DATABASE `scd4` BUFFER 256 CACHESIZE 1 CACHEMODEL 'none' COMP 2 DURATION 14400m WAL_FSYNC_PERIOD 3000 MAXROWS 4096 MINROWS 100 STT_TRIGGER 13 KEEP 5256000m,5256000m,5256000m PAGES 256 PAGESIZE 4 PRECISION 'ms' REPLICA 1 WAL_LEVEL 1 VGROUPS 2 SINGLE_STABLE 0 TABLE_PREFIX 0 TABLE_SUFFIX 0 TSDB_PAGESIZE 4 WAL_RETENTION_PERIOD 3600 WAL_RETENTION_SIZE 0 KEEP_TIME_OFFSET 0 ENCRYPT_ALGORITHM 'none' S3_CHUNKSIZE 262144 S3_KEEPLOCAL 5256000m S3_COMPACT 0") tdSql.execute('drop database scd') diff --git a/tests/script/local.supp b/tests/script/local.supp index c351846f2c..6ff52ebada 100644 --- a/tests/script/local.supp +++ b/tests/script/local.supp @@ -1655,3 +1655,43 @@ fun:start_thread fun:clone } +{ + + Memcheck:Param + write(buf) + fun:__libc_write + fun:write + fun:uv__try_write + fun:uv__write + fun:uv_write2 + fun:uvStartSendRespImpl + fun:uvStartSendResp + fun:uvHandleResp + fun:uvPrepareCb + fun:uv__run_prepare + fun:uv_run + fun:transWorkerThread + fun:start_thread + fun:clone +} + +{ + + Memcheck:Param + write(buf) + fun:__libc_write + fun:write + fun:uv__try_write + fun:uv__write + fun:uv_write2 + fun:uvStartSendRespImpl + fun:uvStartSendResp + fun:uvHandleResp + fun:uvWorkerAsyncCb + fun:uv__async_io + fun:uv__io_poll + fun:uv_run + fun:transWorkerThread + fun:start_thread + fun:clone +} diff --git a/tests/script/tsim/db/alter_option.sim b/tests/script/tsim/db/alter_option.sim index 6c98d43794..749b956a9a 100644 --- a/tests/script/tsim/db/alter_option.sim +++ b/tests/script/tsim/db/alter_option.sim @@ -46,7 +46,7 @@ print ============= create database # | REPLICA value [1 | 3] # | WAL_LEVEL value [1 | 2] -sql create database db CACHEMODEL 'both' COMP 0 DURATION 240 WAL_FSYNC_PERIOD 1000 MAXROWS 8000 MINROWS 10 KEEP 1000 PRECISION 'ns' REPLICA 3 WAL_LEVEL 2 VGROUPS 6 SINGLE_STABLE 1 +sql create database db CACHEMODEL 'both' COMP 0 DURATION 240 WAL_FSYNC_PERIOD 1000 MAXROWS 8000 MINROWS 10 KEEP 1000 S3_KEEPLOCAL 720 PRECISION 'ns' REPLICA 3 WAL_LEVEL 2 VGROUPS 6 SINGLE_STABLE 1 sql select * from information_schema.ins_databases print rows: $rows print $data00 $data01 $data02 $data03 $data04 $data05 $data06 $data07 $data08 $data09 diff --git a/tests/system-test/2-query/distribute_agg_apercentile.py b/tests/system-test/2-query/distribute_agg_apercentile.py index 897580fbcc..23ca0b9fae 100644 --- a/tests/system-test/2-query/distribute_agg_apercentile.py +++ b/tests/system-test/2-query/distribute_agg_apercentile.py @@ -18,7 +18,7 @@ class TDTestCase: def prepare_datas_of_distribute(self, dbname="testdb"): # prepate datas for 20 tables distributed at different vgroups - tdSql.execute(f"create database if not exists {dbname} keep 3650 duration 1000 vgroups 5") + tdSql.execute(f"create database if not exists {dbname} keep 3650 duration 1000 s3_keeplocal 3000 vgroups 5") tdSql.execute(f" use {dbname} ") tdSql.execute( f'''create table {dbname}.stb1 diff --git a/tools/shell/src/shellAuto.c b/tools/shell/src/shellAuto.c index 6c3716519b..299bc6c72a 100644 --- a/tools/shell/src/shellAuto.c +++ b/tools/shell/src/shellAuto.c @@ -214,6 +214,7 @@ SWords shellCommands[] = { {"insert into using values(", 0, 0, NULL}, {"insert into file ", 0, 0, NULL}, {"trim database ", 0, 0, NULL}, + {"s3migrate database ", 0, 0, NULL}, {"use ", 0, 0, NULL}, {"quit", 0, 0, NULL}}; @@ -283,6 +284,9 @@ char* db_options[] = {"keep ", "wal_level ", "vgroups ", "single_stable ", + "s3_chunksize ", + "s3_keeplocal ", + "s3_compact ", "wal_retention_period ", "wal_roll_period ", "wal_retention_size ", @@ -290,6 +294,7 @@ char* db_options[] = {"keep ", char* alter_db_options[] = {"cachemodel ", "replica ", "keep ", "stt_trigger ", "wal_retention_period ", "wal_retention_size ", "cachesize ", + "s3_keeplocal ", "s3_compact ", "wal_fsync_period ", "buffer ", "pages " ,"wal_level "}; char* data_types[] = {"timestamp", "int",