From ef47fd57d6a7cd638dcf303465d68652274ef92b Mon Sep 17 00:00:00 2001 From: wangjiaming0909 <604227650@qq.com> Date: Wed, 29 Nov 2023 19:07:23 +0800 Subject: [PATCH] support tsma catalog cache --- include/common/tmsg.h | 42 + include/common/tmsgdef.h | 1 + include/common/ttokendef.h | 554 +- include/libs/catalog/catalog.h | 22 + include/libs/function/functionMgt.h | 5 + include/libs/nodes/cmdnodes.h | 3 +- source/client/src/clientHb.c | 68 + source/client/src/clientMain.c | 1 + source/common/src/tmsg.c | 150 + source/dnode/mnode/impl/inc/mndDef.h | 1 + source/dnode/mnode/impl/inc/mndSma.h | 2 + source/dnode/mnode/impl/src/mndProfile.c | 11 + source/dnode/mnode/impl/src/mndSma.c | 272 +- source/libs/catalog/inc/catalogInt.h | 63 +- source/libs/catalog/src/catalog.c | 61 + source/libs/catalog/src/ctgAsync.c | 136 +- source/libs/catalog/src/ctgCache.c | 393 +- source/libs/catalog/src/ctgRemote.c | 71 + source/libs/catalog/src/ctgRent.c | 32 + source/libs/catalog/src/ctgUtil.c | 115 +- source/libs/function/inc/builtins.h | 1 + source/libs/function/src/builtins.c | 44 +- source/libs/function/src/functionMgt.c | 47 + source/libs/nodes/src/nodesCodeFuncs.c | 3 +- source/libs/nodes/src/nodesUtilFuncs.c | 22 +- source/libs/parser/inc/parUtil.h | 2 + source/libs/parser/src/parAstParser.c | 4 + source/libs/parser/src/parTranslater.c | 25 +- source/libs/parser/src/parUtil.c | 11 + source/libs/parser/src/parser.c | 2 + source/libs/parser/src/sql.c | 9614 +++++++++++++--------- source/libs/qcom/src/querymsg.c | 33 + source/util/src/terror.c | 4 +- 33 files changed, 7422 insertions(+), 4393 deletions(-) diff --git a/include/common/tmsg.h b/include/common/tmsg.h index fc46a20d3a..5a6fd90e37 100644 --- a/include/common/tmsg.h +++ b/include/common/tmsg.h @@ -110,6 +110,7 @@ enum { HEARTBEAT_KEY_TMQ, HEARTBEAT_KEY_DYN_VIEW, HEARTBEAT_KEY_VIEWINFO, + HEARTBEAT_KEY_TSMA, }; typedef enum _mgmt_table { @@ -4190,6 +4191,47 @@ typedef struct { int32_t tSerializeSViewMetaRsp(void* buf, int32_t bufLen, const SViewMetaRsp* pRsp); int32_t tDeserializeSViewMetaRsp(void* buf, int32_t bufLen, SViewMetaRsp* pRsp); void tFreeSViewMetaRsp(SViewMetaRsp* pRsp); +typedef struct { + char name[TSDB_TABLE_FNAME_LEN]; +}STableTSMAInfoReq; + +int32_t tSerializeTableTSMAInfoReq(void* buf, int32_t bufLen, const STableTSMAInfoReq* pReq); +int32_t tDeserializeTableTSMAInfoReq(void* buf, int32_t bufLen, STableTSMAInfoReq* pReq); + +typedef struct { + int32_t funcId; + col_id_t colId; +} STableTSMAFuncInfo; + +typedef struct { + char name[TSDB_TABLE_NAME_LEN]; + uint64_t tsmaId; + char targetTb[TSDB_TABLE_NAME_LEN]; + char targetDbFName[TSDB_DB_FNAME_LEN]; + char tb[TSDB_TABLE_NAME_LEN]; + char dbFName[TSDB_DB_FNAME_LEN]; + uint64_t suid; + uint64_t dbId; + int32_t version; + int64_t interval; + int8_t unit; + SArray* pFuncs; // SArray +} STableTSMAInfo; + +typedef struct { + SArray* pTsmas; // SArray +} STableTSMAInfoRsp; + +int32_t tSerializeTableTSMAInfoRsp(void* buf, int32_t bufLen, const STableTSMAInfoRsp* pRsp); +int32_t tDeserializeTableTSMAInfoRsp(void* buf, int32_t bufLen, STableTSMAInfoRsp* pReq); +void tFreeTableTSMAInfo(void* p); +void tFreeAndClearTableTSMAInfo(void* p); +void tFreeTableTSMAInfoRsp(STableTSMAInfoRsp* pRsp); + +#define STSMAHbRsp STableTSMAInfoRsp +#define tSerializeTSMAHbRsp tSerializeTableTSMAInfoRsp +#define tDeserializeTSMAHbRsp tDeserializeTableTSMAInfoRsp +#define tFreeTSMAHbRsp tFreeTableTSMAInfoRsp #pragma pack(pop) diff --git a/include/common/tmsgdef.h b/include/common/tmsgdef.h index 5ecd32c083..16b701e875 100644 --- a/include/common/tmsgdef.h +++ b/include/common/tmsgdef.h @@ -226,6 +226,7 @@ TD_DEF_MSG_TYPE(TDMT_MND_CREATE_TSMA, "create-tsma", NULL, NULL) TD_DEF_MSG_TYPE(TDMT_MND_DROP_TSMA, "drop-tsma", NULL, NULL) TD_DEF_MSG_TYPE(TDMT_MND_STB_DROP, "drop-stb", NULL, NULL) + TD_DEF_MSG_TYPE(TDMT_MND_GET_TABLE_TSMA, "get-table-tsma", NULL, NULL) TD_CLOSE_MSG_SEG(TDMT_END_MND_MSG) TD_NEW_MSG_SEG(TDMT_VND_MSG) // 2<<8 diff --git a/include/common/ttokendef.h b/include/common/ttokendef.h index 4b2ac1c95b..e3c7873034 100644 --- a/include/common/ttokendef.h +++ b/include/common/ttokendef.h @@ -16,105 +16,105 @@ #ifndef _TD_COMMON_TOKEN_H_ #define _TD_COMMON_TOKEN_H_ -#define TK_OR 1 -#define TK_AND 2 -#define TK_UNION 3 -#define TK_ALL 4 -#define TK_MINUS 5 -#define TK_EXCEPT 6 -#define TK_INTERSECT 7 -#define TK_NK_BITAND 8 -#define TK_NK_BITOR 9 -#define TK_NK_LSHIFT 10 -#define TK_NK_RSHIFT 11 -#define TK_NK_PLUS 12 -#define TK_NK_MINUS 13 -#define TK_NK_STAR 14 -#define TK_NK_SLASH 15 -#define TK_NK_REM 16 -#define TK_NK_CONCAT 17 -#define TK_CREATE 18 -#define TK_ACCOUNT 19 -#define TK_NK_ID 20 -#define TK_PASS 21 -#define TK_NK_STRING 22 -#define TK_ALTER 23 -#define TK_PPS 24 -#define TK_TSERIES 25 -#define TK_STORAGE 26 -#define TK_STREAMS 27 -#define TK_QTIME 28 -#define TK_DBS 29 -#define TK_USERS 30 -#define TK_CONNS 31 -#define TK_STATE 32 -#define TK_NK_COMMA 33 -#define TK_HOST 34 -#define TK_USER 35 -#define TK_ENABLE 36 -#define TK_NK_INTEGER 37 -#define TK_SYSINFO 38 -#define TK_ADD 39 -#define TK_DROP 40 -#define TK_GRANT 41 -#define TK_ON 42 -#define TK_TO 43 -#define TK_REVOKE 44 -#define TK_FROM 45 -#define TK_SUBSCRIBE 46 -#define TK_READ 47 -#define TK_WRITE 48 -#define TK_NK_DOT 49 -#define TK_WITH 50 -#define TK_DNODE 51 -#define TK_PORT 52 -#define TK_DNODES 53 -#define TK_RESTORE 54 -#define TK_NK_IPTOKEN 55 -#define TK_FORCE 56 -#define TK_UNSAFE 57 -#define TK_CLUSTER 58 -#define TK_LOCAL 59 -#define TK_QNODE 60 -#define TK_BNODE 61 -#define TK_SNODE 62 -#define TK_MNODE 63 -#define TK_VNODE 64 -#define TK_DATABASE 65 -#define TK_USE 66 -#define TK_FLUSH 67 -#define TK_TRIM 68 -#define TK_S3MIGRATE 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_OR 1 +#define TK_AND 2 +#define TK_UNION 3 +#define TK_ALL 4 +#define TK_MINUS 5 +#define TK_EXCEPT 6 +#define TK_INTERSECT 7 +#define TK_NK_BITAND 8 +#define TK_NK_BITOR 9 +#define TK_NK_LSHIFT 10 +#define TK_NK_RSHIFT 11 +#define TK_NK_PLUS 12 +#define TK_NK_MINUS 13 +#define TK_NK_STAR 14 +#define TK_NK_SLASH 15 +#define TK_NK_REM 16 +#define TK_NK_CONCAT 17 +#define TK_CREATE 18 +#define TK_ACCOUNT 19 +#define TK_NK_ID 20 +#define TK_PASS 21 +#define TK_NK_STRING 22 +#define TK_ALTER 23 +#define TK_PPS 24 +#define TK_TSERIES 25 +#define TK_STORAGE 26 +#define TK_STREAMS 27 +#define TK_QTIME 28 +#define TK_DBS 29 +#define TK_USERS 30 +#define TK_CONNS 31 +#define TK_STATE 32 +#define TK_NK_COMMA 33 +#define TK_HOST 34 +#define TK_USER 35 +#define TK_ENABLE 36 +#define TK_NK_INTEGER 37 +#define TK_SYSINFO 38 +#define TK_ADD 39 +#define TK_DROP 40 +#define TK_GRANT 41 +#define TK_ON 42 +#define TK_TO 43 +#define TK_REVOKE 44 +#define TK_FROM 45 +#define TK_SUBSCRIBE 46 +#define TK_READ 47 +#define TK_WRITE 48 +#define TK_NK_DOT 49 +#define TK_WITH 50 +#define TK_DNODE 51 +#define TK_PORT 52 +#define TK_DNODES 53 +#define TK_RESTORE 54 +#define TK_NK_IPTOKEN 55 +#define TK_FORCE 56 +#define TK_UNSAFE 57 +#define TK_CLUSTER 58 +#define TK_LOCAL 59 +#define TK_QNODE 60 +#define TK_BNODE 61 +#define TK_SNODE 62 +#define TK_MNODE 63 +#define TK_VNODE 64 +#define TK_DATABASE 65 +#define TK_USE 66 +#define TK_FLUSH 67 +#define TK_TRIM 68 +#define TK_S3MIGRATE 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_S3_CHUNKSIZE 101 #define TK_S3_KEEPLOCAL 102 @@ -206,184 +206,184 @@ #define TK_QTAGS 188 #define TK_AS 189 #define TK_SYSTEM 190 -#define TK_INDEX 191 -#define TK_FUNCTION 192 -#define TK_INTERVAL 193 -#define TK_COUNT 194 -#define TK_LAST_ROW 195 -#define TK_META 196 -#define TK_ONLY 197 -#define TK_TOPIC 198 -#define TK_CONSUMER 199 -#define TK_GROUP 200 -#define TK_DESC 201 -#define TK_DESCRIBE 202 -#define TK_RESET 203 -#define TK_QUERY 204 -#define TK_CACHE 205 -#define TK_EXPLAIN 206 -#define TK_ANALYZE 207 -#define TK_VERBOSE 208 -#define TK_NK_BOOL 209 -#define TK_RATIO 210 -#define TK_NK_FLOAT 211 -#define TK_OUTPUTTYPE 212 -#define TK_AGGREGATE 213 -#define TK_BUFSIZE 214 -#define TK_LANGUAGE 215 -#define TK_REPLACE 216 -#define TK_STREAM 217 -#define TK_INTO 218 -#define TK_PAUSE 219 -#define TK_RESUME 220 -#define TK_TRIGGER 221 -#define TK_AT_ONCE 222 -#define TK_WINDOW_CLOSE 223 -#define TK_IGNORE 224 -#define TK_EXPIRED 225 -#define TK_FILL_HISTORY 226 -#define TK_UPDATE 227 -#define TK_SUBTABLE 228 -#define TK_UNTREATED 229 -#define TK_KILL 230 -#define TK_CONNECTION 231 -#define TK_TRANSACTION 232 -#define TK_BALANCE 233 -#define TK_VGROUP 234 -#define TK_LEADER 235 -#define TK_MERGE 236 -#define TK_REDISTRIBUTE 237 -#define TK_SPLIT 238 -#define TK_DELETE 239 -#define TK_INSERT 240 -#define TK_NK_BIN 241 -#define TK_NK_HEX 242 -#define TK_NULL 243 -#define TK_NK_QUESTION 244 -#define TK_NK_ALIAS 245 -#define TK_NK_ARROW 246 -#define TK_ROWTS 247 -#define TK_QSTART 248 -#define TK_QEND 249 -#define TK_QDURATION 250 -#define TK_WSTART 251 -#define TK_WEND 252 -#define TK_WDURATION 253 -#define TK_IROWTS 254 -#define TK_ISFILLED 255 -#define TK_CAST 256 -#define TK_NOW 257 -#define TK_TODAY 258 -#define TK_TIMEZONE 259 -#define TK_CLIENT_VERSION 260 -#define TK_SERVER_VERSION 261 -#define TK_SERVER_STATUS 262 -#define TK_CURRENT_USER 263 -#define TK_CASE 264 -#define TK_WHEN 265 -#define TK_THEN 266 -#define TK_ELSE 267 -#define TK_BETWEEN 268 -#define TK_IS 269 -#define TK_NK_LT 270 -#define TK_NK_GT 271 -#define TK_NK_LE 272 -#define TK_NK_GE 273 -#define TK_NK_NE 274 -#define TK_MATCH 275 -#define TK_NMATCH 276 -#define TK_CONTAINS 277 -#define TK_IN 278 -#define TK_JOIN 279 -#define TK_INNER 280 -#define TK_LEFT 281 -#define TK_RIGHT 282 -#define TK_OUTER 283 -#define TK_SEMI 284 -#define TK_ANTI 285 -#define TK_ASOF 286 -#define TK_WINDOW 287 -#define TK_WINDOW_OFFSET 288 -#define TK_JLIMIT 289 -#define TK_SELECT 290 -#define TK_NK_HINT 291 -#define TK_DISTINCT 292 -#define TK_WHERE 293 -#define TK_PARTITION 294 -#define TK_BY 295 -#define TK_SESSION 296 -#define TK_STATE_WINDOW 297 -#define TK_EVENT_WINDOW 298 -#define TK_COUNT_WINDOW 299 -#define TK_SLIDING 300 -#define TK_FILL 301 -#define TK_VALUE 302 -#define TK_VALUE_F 303 -#define TK_NONE 304 -#define TK_PREV 305 -#define TK_NULL_F 306 -#define TK_LINEAR 307 -#define TK_NEXT 308 -#define TK_HAVING 309 -#define TK_RANGE 310 -#define TK_EVERY 311 -#define TK_ORDER 312 -#define TK_SLIMIT 313 -#define TK_SOFFSET 314 -#define TK_LIMIT 315 -#define TK_OFFSET 316 -#define TK_ASC 317 -#define TK_NULLS 318 -#define TK_ABORT 319 -#define TK_AFTER 320 -#define TK_ATTACH 321 -#define TK_BEFORE 322 -#define TK_BEGIN 323 -#define TK_BITAND 324 -#define TK_BITNOT 325 -#define TK_BITOR 326 -#define TK_BLOCKS 327 -#define TK_CHANGE 328 -#define TK_COMMA 329 -#define TK_CONCAT 330 -#define TK_CONFLICT 331 -#define TK_COPY 332 -#define TK_DEFERRED 333 -#define TK_DELIMITERS 334 -#define TK_DETACH 335 -#define TK_DIVIDE 336 -#define TK_DOT 337 -#define TK_EACH 338 -#define TK_FAIL 339 -#define TK_FILE 340 -#define TK_FOR 341 -#define TK_GLOB 342 -#define TK_ID 343 -#define TK_IMMEDIATE 344 -#define TK_IMPORT 345 -#define TK_INITIALLY 346 -#define TK_INSTEAD 347 -#define TK_ISNULL 348 -#define TK_MODULES 349 -#define TK_NK_BITNOT 350 -#define TK_NK_SEMI 351 -#define TK_NOTNULL 352 -#define TK_OF 353 -#define TK_PLUS 354 -#define TK_PRIVILEGE 355 -#define TK_RAISE 356 -#define TK_RESTRICT 357 -#define TK_ROW 358 -#define TK_STAR 359 -#define TK_STATEMENT 360 -#define TK_STRICT 361 -#define TK_STRING 362 -#define TK_TIMES 363 -#define TK_VALUES 364 -#define TK_VARIABLE 365 -#define TK_WAL 366 - - +#define TK_TSMA 191 +#define TK_INTERVAL 192 +#define TK_TSMAS 193 +#define TK_FUNCTION 194 +#define TK_INDEX 195 +#define TK_COUNT 196 +#define TK_LAST_ROW 197 +#define TK_META 198 +#define TK_ONLY 199 +#define TK_TOPIC 200 +#define TK_CONSUMER 201 +#define TK_GROUP 202 +#define TK_DESC 203 +#define TK_DESCRIBE 204 +#define TK_RESET 205 +#define TK_QUERY 206 +#define TK_CACHE 207 +#define TK_EXPLAIN 208 +#define TK_ANALYZE 209 +#define TK_VERBOSE 210 +#define TK_NK_BOOL 211 +#define TK_RATIO 212 +#define TK_NK_FLOAT 213 +#define TK_OUTPUTTYPE 214 +#define TK_AGGREGATE 215 +#define TK_BUFSIZE 216 +#define TK_LANGUAGE 217 +#define TK_REPLACE 218 +#define TK_STREAM 219 +#define TK_INTO 220 +#define TK_PAUSE 221 +#define TK_RESUME 222 +#define TK_TRIGGER 223 +#define TK_AT_ONCE 224 +#define TK_WINDOW_CLOSE 225 +#define TK_IGNORE 226 +#define TK_EXPIRED 227 +#define TK_FILL_HISTORY 228 +#define TK_UPDATE 229 +#define TK_SUBTABLE 230 +#define TK_UNTREATED 231 +#define TK_KILL 232 +#define TK_CONNECTION 233 +#define TK_TRANSACTION 234 +#define TK_BALANCE 235 +#define TK_VGROUP 236 +#define TK_LEADER 237 +#define TK_MERGE 238 +#define TK_REDISTRIBUTE 239 +#define TK_SPLIT 240 +#define TK_DELETE 241 +#define TK_INSERT 242 +#define TK_NK_BIN 243 +#define TK_NK_HEX 244 +#define TK_NULL 245 +#define TK_NK_QUESTION 246 +#define TK_NK_ALIAS 247 +#define TK_NK_ARROW 248 +#define TK_ROWTS 249 +#define TK_QSTART 250 +#define TK_QEND 251 +#define TK_QDURATION 252 +#define TK_WSTART 253 +#define TK_WEND 254 +#define TK_WDURATION 255 +#define TK_IROWTS 256 +#define TK_ISFILLED 257 +#define TK_CAST 258 +#define TK_NOW 259 +#define TK_TODAY 260 +#define TK_TIMEZONE 261 +#define TK_CLIENT_VERSION 262 +#define TK_SERVER_VERSION 263 +#define TK_SERVER_STATUS 264 +#define TK_CURRENT_USER 265 +#define TK_CASE 266 +#define TK_WHEN 267 +#define TK_THEN 268 +#define TK_ELSE 269 +#define TK_BETWEEN 270 +#define TK_IS 271 +#define TK_NK_LT 272 +#define TK_NK_GT 273 +#define TK_NK_LE 274 +#define TK_NK_GE 275 +#define TK_NK_NE 276 +#define TK_MATCH 277 +#define TK_NMATCH 278 +#define TK_CONTAINS 279 +#define TK_IN 280 +#define TK_JOIN 281 +#define TK_INNER 282 +#define TK_LEFT 283 +#define TK_RIGHT 284 +#define TK_OUTER 285 +#define TK_SEMI 286 +#define TK_ANTI 287 +#define TK_ASOF 288 +#define TK_WINDOW 289 +#define TK_WINDOW_OFFSET 290 +#define TK_JLIMIT 291 +#define TK_SELECT 292 +#define TK_NK_HINT 293 +#define TK_DISTINCT 294 +#define TK_WHERE 295 +#define TK_PARTITION 296 +#define TK_BY 297 +#define TK_SESSION 298 +#define TK_STATE_WINDOW 299 +#define TK_EVENT_WINDOW 300 +#define TK_COUNT_WINDOW 301 +#define TK_SLIDING 302 +#define TK_FILL 303 +#define TK_VALUE 304 +#define TK_VALUE_F 305 +#define TK_NONE 306 +#define TK_PREV 307 +#define TK_NULL_F 308 +#define TK_LINEAR 309 +#define TK_NEXT 310 +#define TK_HAVING 311 +#define TK_RANGE 312 +#define TK_EVERY 313 +#define TK_ORDER 314 +#define TK_SLIMIT 315 +#define TK_SOFFSET 316 +#define TK_LIMIT 317 +#define TK_OFFSET 318 +#define TK_ASC 319 +#define TK_NULLS 320 +#define TK_ABORT 321 +#define TK_AFTER 322 +#define TK_ATTACH 323 +#define TK_BEFORE 324 +#define TK_BEGIN 325 +#define TK_BITAND 326 +#define TK_BITNOT 327 +#define TK_BITOR 328 +#define TK_BLOCKS 329 +#define TK_CHANGE 330 +#define TK_COMMA 331 +#define TK_CONCAT 332 +#define TK_CONFLICT 333 +#define TK_COPY 334 +#define TK_DEFERRED 335 +#define TK_DELIMITERS 336 +#define TK_DETACH 337 +#define TK_DIVIDE 338 +#define TK_DOT 339 +#define TK_EACH 340 +#define TK_FAIL 341 +#define TK_FILE 342 +#define TK_FOR 343 +#define TK_GLOB 344 +#define TK_ID 345 +#define TK_IMMEDIATE 346 +#define TK_IMPORT 347 +#define TK_INITIALLY 348 +#define TK_INSTEAD 349 +#define TK_ISNULL 350 +#define TK_MODULES 351 +#define TK_NK_BITNOT 352 +#define TK_NK_SEMI 353 +#define TK_NOTNULL 354 +#define TK_OF 355 +#define TK_PLUS 356 +#define TK_PRIVILEGE 357 +#define TK_RAISE 358 +#define TK_RESTRICT 359 +#define TK_ROW 360 +#define TK_STAR 361 +#define TK_STATEMENT 362 +#define TK_STRICT 363 +#define TK_STRING 364 +#define TK_TIMES 365 +#define TK_VALUES 366 +#define TK_VARIABLE 367 +#define TK_WAL 368 #define TK_NK_SPACE 600 #define TK_NK_COMMENT 601 diff --git a/include/libs/catalog/catalog.h b/include/libs/catalog/catalog.h index 1957bcbb24..c004709728 100644 --- a/include/libs/catalog/catalog.h +++ b/include/libs/catalog/catalog.h @@ -94,6 +94,7 @@ typedef struct SCatalogReq { SArray* pTableCfg; // element is SNAME SArray* pTableTag; // element is SNAME SArray* pView; // element is STablesReq + SArray* pTableTSMAs; // element is STablesReq bool qNodeRequired; // valid qnode bool dNodeRequired; // valid dnode bool svrVerRequired; @@ -122,6 +123,7 @@ typedef struct SMetaData { SArray* pTableTag; // pRes = SArray* SArray* pDnodeList; // pRes = SArray* SArray* pView; // pRes = SViewMeta* + SArray* pTableTsmas; // pRes = SArray* SMetaRes* pSvrVer; // pRes = char* } SMetaData; @@ -130,9 +132,11 @@ typedef struct SCatalogCfg { uint32_t maxViewCacheNum; uint32_t maxDBCacheNum; uint32_t maxUserCacheNum; + uint32_t maxTSMACacheNum; uint32_t dbRentSec; uint32_t stbRentSec; uint32_t viewRentSec; + uint32_t tsmaRentSec; } SCatalogCfg; typedef struct SSTableVersion { @@ -167,6 +171,14 @@ typedef struct SViewVersion { int32_t version; } SViewVersion; +typedef struct STSMAVersion { + char dbFName[TSDB_DB_FNAME_LEN]; + char tbName[TSDB_TABLE_NAME_LEN]; + char name[TSDB_TABLE_NAME_LEN]; + uint64_t dbId; + uint64_t tsmaId; + int32_t version; +} STSMAVersion; typedef struct STbSVersion { char* tbFName; @@ -179,6 +191,8 @@ typedef struct SUserAuthVersion { int32_t version; } SUserAuthVersion; +typedef struct {} STableTSMAVersion; + typedef SUserIndexRsp SIndexInfo; typedef void (*catalogCallback)(SMetaData* pResult, void* param, int32_t code); @@ -342,6 +356,8 @@ int32_t catalogGetExpiredDBs(SCatalog* pCatalog, SDbCacheInfo** dbs, uint32_t* n int32_t catalogGetExpiredUsers(SCatalog* pCtg, SUserAuthVersion** users, uint32_t* num); +int32_t catalogGetExpiredTsmas(SCatalog* pCtg, STSMAVersion** tsmas, uint32_t* num); + int32_t catalogGetDBCfg(SCatalog* pCtg, SRequestConnInfo* pConn, const char* dbFName, SDbCfgInfo* pDbCfg); int32_t catalogGetIndexMeta(SCatalog* pCtg, SRequestConnInfo* pConn, const char* indexName, SIndexInfo* pInfo); @@ -388,6 +404,12 @@ int32_t ctgdEnableDebug(char* option, bool enable); int32_t ctgdHandleDbgCommand(char* command); +int32_t catalogAsyncUpdateTSMA(SCatalog* pCtg, STableTSMAInfo** pTsma); + +int32_t catalogUpdateTSMA(SCatalog* pCtg, STableTSMAInfo** ppTsma); + +int32_t catalogRemoveTSMA(SCatalog* pCtg, const STableTSMAInfo* pTsma); + /** * Destroy catalog and relase all resources */ diff --git a/include/libs/function/functionMgt.h b/include/libs/function/functionMgt.h index 43ece3cf89..8fd2fdd71c 100644 --- a/include/libs/function/functionMgt.h +++ b/include/libs/function/functionMgt.h @@ -164,6 +164,8 @@ typedef enum EFunctionType { FUNCTION_TYPE_STDDEV_MERGE, FUNCTION_TYPE_IRATE_PARTIAL, FUNCTION_TYPE_IRATE_MERGE, + FUNCTION_TYPE_AVG_STATE, + FUNCTION_TYPE_AVG_STATE_MERGE, // geometry functions FUNCTION_TYPE_GEOM_FROM_TEXT = 4250, @@ -271,6 +273,9 @@ bool fmIsInvertible(int32_t funcId); char* fmGetFuncName(int32_t funcId); +bool fmIsTSMASupportedFunc(func_id_t funcid); +int32_t rewriteFuncsForTSMA(SNodeList* pFuncs); + #ifdef __cplusplus } #endif diff --git a/include/libs/nodes/cmdnodes.h b/include/libs/nodes/cmdnodes.h index 3236719ef2..960263a331 100644 --- a/include/libs/nodes/cmdnodes.h +++ b/include/libs/nodes/cmdnodes.h @@ -605,7 +605,7 @@ typedef struct SCreateTSMAStmt { char dbName[TSDB_DB_NAME_LEN]; char tableName[TSDB_TABLE_NAME_LEN]; STSMAOptions* pOptions; - SMCreateSmaReq* pReq; + //SMCreateSmaReq* pReq; } SCreateTSMAStmt; typedef struct SShowCreateTSMAStmt { @@ -619,7 +619,6 @@ typedef struct SDropTSMAStmt { bool ignoreNotExists; char dbName[TSDB_DB_NAME_LEN]; char tsmaName[TSDB_INDEX_NAME_LEN]; - SMDropSmaReq* pReq; } SDropTSMAStmt; #ifdef __cplusplus diff --git a/source/client/src/clientHb.c b/source/client/src/clientHb.c index b1f0ea55d8..f9f1e5d332 100644 --- a/source/client/src/clientHb.c +++ b/source/client/src/clientHb.c @@ -327,6 +327,33 @@ static int32_t hbProcessViewInfoRsp(void *value, int32_t valueLen, struct SCatal return TSDB_CODE_SUCCESS; } +static int32_t hbprocessTSMARsp(void* value, int32_t valueLen, struct SCatalog* pCatalog) { + int32_t code = 0; + + STSMAHbRsp hbRsp = {0}; + if (tDeserializeTSMAHbRsp(value, valueLen, &hbRsp)) { + terrno = TSDB_CODE_INVALID_MSG; + return -1; + } + + int32_t numOfTsma = taosArrayGetSize(hbRsp.pTsmas); + for (int32_t i = 0; i < numOfTsma; ++i) { + STableTSMAInfo* pTsmaInfo = taosArrayGetP(hbRsp.pTsmas, i); + + if (!pTsmaInfo->pFuncs) { + tscDebug("hb to remote tsma: %s.%s", pTsmaInfo->dbFName, pTsmaInfo->name); + catalogRemoveTSMA(pCatalog, pTsmaInfo); + tFreeAndClearTableTSMAInfo(pTsmaInfo); + } else { + tscDebug("hb to update tsma: %s.%s", pTsmaInfo->dbFName, pTsmaInfo->name); + catalogUpdateTSMA(pCatalog, &pTsmaInfo); + tFreeAndClearTableTSMAInfo(pTsmaInfo); + } + } + + taosArrayDestroy(hbRsp.pTsmas); + return TSDB_CODE_SUCCESS; +} static void hbProcessQueryRspKvs(int32_t kvNum, SArray* pKvs, struct SCatalog *pCatalog, SAppHbMgr *pAppHbMgr) { for (int32_t i = 0; i < kvNum; ++i) { @@ -379,6 +406,13 @@ static void hbProcessQueryRspKvs(int32_t kvNum, SArray* pKvs, struct SCatalog *p break; } #endif + case HEARTBEAT_KEY_TSMA: { + if (kv->valueLen <= 0 || !kv->value) { + tscError("Invalid tsma info, len: %d, value: %p", kv->valueLen, kv->value); + } + hbprocessTSMARsp(kv->value, kv->valueLen, pCatalog); + break; + } default: tscError("invalid hb key type:%d", kv->key); break; @@ -871,6 +905,39 @@ int32_t hbGetExpiredViewInfo(SClientHbKey *connKey, struct SCatalog *pCatalog, S return TSDB_CODE_SUCCESS; } +int32_t hbGetExpiredTSMAInfo(SClientHbKey* connKey, struct SCatalog* pCatalog, SClientHbReq* pReq) { + int32_t code = 0; + uint32_t tsmaNum = 0; + STSMAVersion *tsmas = NULL; + + code = catalogGetExpiredTsmas(pCatalog, &tsmas, &tsmaNum); + if (code) { + taosMemoryFree(tsmas); + return code; + } + + if (tsmaNum <= 0) { + taosMemoryFree(tsmas); + return TSDB_CODE_SUCCESS; + } + + for (int32_t i = 0; i < tsmaNum; ++i) { + STSMAVersion* tsma = &tsmas[i]; + tsma->dbId = htobe64(tsma->dbId); + tsma->tsmaId = htobe64(tsma->tsmaId); + tsma->version = htonl(tsma->version); + } + + tscDebug("hb got %d expred tsmas, valueLen: %lu", tsmaNum, sizeof(STSMAVersion) * tsmaNum); + + if (!pReq->info) { + pReq->info = taosHashInit(64, hbKeyHashFunc, 1, HASH_ENTRY_LOCK); + } + + SKv kv = {.key = HEARTBEAT_KEY_TSMA, .valueLen = sizeof(STSMAVersion) * tsmaNum, .value = tsmas}; + taosHashPut(pReq->info, &kv.key, sizeof(kv.key), &kv, sizeof(kv)); + return TSDB_CODE_SUCCESS; +} int32_t hbGetAppInfo(int64_t clusterId, SClientHbReq *req) { SAppHbReq *pApp = taosHashGet(clientHbMgr.appSummary, &clusterId, sizeof(clusterId)); @@ -935,6 +1002,7 @@ int32_t hbQueryHbReqHandle(SClientHbKey *connKey, void *param, SClientHbReq *req return code; } #endif + code = hbGetExpiredTSMAInfo(connKey, pCatalog, req); } else { req->app.appId = 0; } diff --git a/source/client/src/clientMain.c b/source/client/src/clientMain.c index 9464baea52..348dbf4ae9 100644 --- a/source/client/src/clientMain.c +++ b/source/client/src/clientMain.c @@ -936,6 +936,7 @@ int32_t cloneCatalogReq(SCatalogReq **ppTarget, SCatalogReq *pSrc) { pTarget->pTableCfg = taosArrayDup(pSrc->pTableCfg, NULL); pTarget->pTableTag = taosArrayDup(pSrc->pTableTag, NULL); pTarget->pView = taosArrayDup(pSrc->pView, NULL); + pTarget->pTableTSMAs = taosArrayDup(pSrc->pTableTSMAs, NULL); pTarget->qNodeRequired = pSrc->qNodeRequired; pTarget->dNodeRequired = pSrc->dNodeRequired; pTarget->svrVerRequired = pSrc->svrVerRequired; diff --git a/source/common/src/tmsg.c b/source/common/src/tmsg.c index 4200d3d498..3d3a216588 100644 --- a/source/common/src/tmsg.c +++ b/source/common/src/tmsg.c @@ -9936,3 +9936,153 @@ void tFreeSViewHbRsp(SViewHbRsp *pRsp) { taosArrayDestroy(pRsp->pViewRsp); } + +int32_t tSerializeTableTSMAInfoReq(void* buf, int32_t bufLen, const STableTSMAInfoReq* pReq) { + SEncoder encoder = {0}; + tEncoderInit(&encoder, buf, bufLen); + + if (tStartEncode(&encoder) < 0) return -1; + if (tEncodeCStr(&encoder, pReq->name) < 0) return -1; + + tEndEncode(&encoder); + + int32_t tlen = encoder.pos; + tEncoderClear(&encoder); + return tlen; +} + +int32_t tDeserializeTableTSMAInfoReq(void* buf, int32_t bufLen, STableTSMAInfoReq* pReq) { + SDecoder decoder = {0}; + tDecoderInit(&decoder, buf, bufLen); + + if (tStartDecode(&decoder) < 0) return -1; + if (tDecodeCStrTo(&decoder, pReq->name) < 0) return -1; + + tEndDecode(&decoder); + + tDecoderClear(&decoder); + return 0; +} + +static int32_t tEncodeTableTSMAInfo(SEncoder* pEncoder, const STableTSMAInfo* pTsmaInfo) { + if (tEncodeCStr(pEncoder, pTsmaInfo->name) < 0) return -1; + if (tEncodeU64(pEncoder, pTsmaInfo->tsmaId) < 0) return -1; + if (tEncodeCStr(pEncoder, pTsmaInfo->tb) < 0) return -1; + if (tEncodeCStr(pEncoder, pTsmaInfo->dbFName) < 0) return -1; + if (tEncodeU64(pEncoder, pTsmaInfo->suid) < 0) return -1; + if (tEncodeU64(pEncoder, pTsmaInfo->dbId) < 0) return -1; + if (tEncodeI32(pEncoder, pTsmaInfo->version) < 0) return -1; + if (tEncodeCStr(pEncoder, pTsmaInfo->targetTb) < 0) return -1; + if (tEncodeCStr(pEncoder, pTsmaInfo->targetDbFName) < 0) return -1; + if (tEncodeI64(pEncoder, pTsmaInfo->interval) < 0) return -1; + if (tEncodeI8(pEncoder, pTsmaInfo->unit) < 0) return -1; + + int32_t size = pTsmaInfo->pFuncs ? pTsmaInfo->pFuncs->size : 0; + if (tEncodeI32(pEncoder, size) < 0) return -1; + for (int32_t i = 0; i < size; ++i) { + STableTSMAFuncInfo* pFuncInfo = taosArrayGet(pTsmaInfo->pFuncs, i); + if (tEncodeI32(pEncoder, pFuncInfo->funcId) < 0) return -1; + if (tEncodeI16(pEncoder, pFuncInfo->colId) < 0) return -1; + } + return 0; +} + +static int32_t tDecodeTableTSMAInfo(SDecoder* pDecoder, STableTSMAInfo* pTsmaInfo) { + if (tDecodeCStrTo(pDecoder, pTsmaInfo->name) < 0) return -1; + if (tDecodeU64(pDecoder, &pTsmaInfo->tsmaId) < 0) return -1; + if (tDecodeCStrTo(pDecoder, pTsmaInfo->tb) < 0) return -1; + if (tDecodeCStrTo(pDecoder, pTsmaInfo->dbFName) < 0) return -1; + if (tDecodeU64(pDecoder, &pTsmaInfo->suid) < 0) return -1; + if (tDecodeU64(pDecoder, &pTsmaInfo->dbId) < 0) return -1; + if (tDecodeI32(pDecoder, &pTsmaInfo->version) < 0) return -1; + if (tDecodeCStrTo(pDecoder, pTsmaInfo->targetTb) < 0) return -1; + if (tDecodeCStrTo(pDecoder, pTsmaInfo->targetDbFName) < 0) return -1; + if (tDecodeI64(pDecoder, &pTsmaInfo->interval) < 0) return -1; + if (tDecodeI8(pDecoder, &pTsmaInfo->unit) < 0) return -1; + int32_t size = 0; + if (tDecodeI32(pDecoder, &size) < 0) return -1; + if (size <= 0) return 0; + pTsmaInfo->pFuncs = taosArrayInit(size, sizeof(STableTSMAFuncInfo)); + if (!pTsmaInfo->pFuncs) return -1; + for (int32_t i = 0; i < size; ++i) { + STableTSMAFuncInfo funcInfo = {0}; + //TODO free the array when decode failed + if (tDecodeI32(pDecoder, &funcInfo.funcId) < 0) return -1; + if (tDecodeI16(pDecoder, &funcInfo.colId) < 0) return -1; + if (!taosArrayPush(pTsmaInfo->pFuncs, &funcInfo)) return -1; + } + + return 0; +} + +static int32_t tEncodeTableTSMAInfoRsp(SEncoder *pEncoder, const STableTSMAInfoRsp *pRsp) { + int32_t size = pRsp->pTsmas ? pRsp->pTsmas->size : 0; + if (tEncodeI32(pEncoder, size) < 0) return -1; + for (int32_t i = 0; i < size; ++i) { + STableTSMAInfo* pInfo = taosArrayGetP(pRsp->pTsmas, i); + if (tEncodeTableTSMAInfo(pEncoder, pInfo) < 0) return -1; + } + return 0; +} + +static int32_t tDecodeTableTSMAInfoRsp(SDecoder* pDecoder, STableTSMAInfoRsp* pRsp) { + int32_t size = 0; + if (tDecodeI32(pDecoder, &size) < 0) return -1; + if (size <= 0) return 0; + pRsp->pTsmas = taosArrayInit(size, POINTER_BYTES); + if (!pRsp->pTsmas) return -1; + for (int32_t i = 0; i < size; ++i) { + // TODO add a test case when decode failed, to see if the array is freed + STableTSMAInfo *pTsma = taosMemoryCalloc(1, sizeof(STableTSMAInfo)); + if (!pTsma) return -1; + taosArrayPush(pRsp->pTsmas, &pTsma); + if (tDecodeTableTSMAInfo(pDecoder, pTsma) < 0) return -1; + } + return 0; +} + +int32_t tSerializeTableTSMAInfoRsp(void* buf, int32_t bufLen, const STableTSMAInfoRsp* pRsp) { + SEncoder encoder = {0}; + tEncoderInit(&encoder, buf, bufLen); + + if (tStartEncode(&encoder) < 0) return -1; + if (tEncodeTableTSMAInfoRsp(&encoder, pRsp) < 0) return -1; + + tEndEncode(&encoder); + + int32_t tlen = encoder.pos; + tEncoderClear(&encoder); + return tlen; +} + +int32_t tDeserializeTableTSMAInfoRsp(void* buf, int32_t bufLen, STableTSMAInfoRsp* pRsp) { + SDecoder decoder = {0}; + tDecoderInit(&decoder, buf, bufLen); + + if (tStartDecode(&decoder) < 0) return -1; + if (tDecodeTableTSMAInfoRsp(&decoder, pRsp) < 0) return -1; + + tEndDecode(&decoder); + + tDecoderClear(&decoder); + return 0; +} + +void tFreeTableTSMAInfo(void* p) { + STableTSMAInfo *pTsmaInfo = p; + if (pTsmaInfo) taosArrayDestroy(pTsmaInfo->pFuncs); +} + +void tFreeAndClearTableTSMAInfo(void* p) { + STableTSMAInfo* pTsmaInfo = (STableTSMAInfo*)p; + if (pTsmaInfo) { + tFreeTableTSMAInfo(pTsmaInfo); + taosMemoryFree(pTsmaInfo); + } +} + +void tFreeTableTSMAInfoRsp(STableTSMAInfoRsp *pRsp) { + if (pRsp && pRsp->pTsmas) { + taosArrayDestroyP(pRsp->pTsmas, tFreeAndClearTableTSMAInfo); + } +} diff --git a/source/dnode/mnode/impl/inc/mndDef.h b/source/dnode/mnode/impl/inc/mndDef.h index 005bb535bc..cd8c3c9ea5 100644 --- a/source/dnode/mnode/impl/inc/mndDef.h +++ b/source/dnode/mnode/impl/inc/mndDef.h @@ -457,6 +457,7 @@ typedef struct { int32_t tagsFilterLen; int32_t sqlLen; int32_t astLen; + int32_t version; char* expr; char* tagsFilter; char* sql; diff --git a/source/dnode/mnode/impl/inc/mndSma.h b/source/dnode/mnode/impl/inc/mndSma.h index 48e93c43fb..ad727d67ea 100644 --- a/source/dnode/mnode/impl/inc/mndSma.h +++ b/source/dnode/mnode/impl/inc/mndSma.h @@ -29,6 +29,8 @@ void mndReleaseSma(SMnode *pMnode, SSmaObj *pSma); int32_t mndDropSmasByStb(SMnode *pMnode, STrans *pTrans, SDbObj *pDb, SStbObj *pStb); int32_t mndDropSmasByDb(SMnode *pMnode, STrans *pTrans, SDbObj *pDb); int32_t mndGetTableSma(SMnode *pMnode, char *tbFName, STableIndexRsp *rsp, bool *exist); +int32_t mndValidateTSMAInfo(SMnode *pMnode, STSMAVersion *pTsmaVersions, int32_t numOfTsmas, void **ppRsp, + int32_t *pRspLen); #ifdef __cplusplus } diff --git a/source/dnode/mnode/impl/src/mndProfile.c b/source/dnode/mnode/impl/src/mndProfile.c index e0559b4c48..22d2eb5a59 100644 --- a/source/dnode/mnode/impl/src/mndProfile.c +++ b/source/dnode/mnode/impl/src/mndProfile.c @@ -25,6 +25,7 @@ #include "mndStb.h" #include "mndUser.h" #include "mndView.h" +#include "mndSma.h" #include "tglobal.h" #include "tversion.h" @@ -606,6 +607,16 @@ static int32_t mndProcessQueryHeartBeat(SMnode *pMnode, SRpcMsg *pMsg, SClientHb break; } #endif + case HEARTBEAT_KEY_TSMA: { + void * rspMsg = NULL; + int32_t rspLen = 0; + mndValidateTSMAInfo(pMnode, kv->value, kv->valueLen / sizeof(STSMAVersion), &rspMsg, &rspLen); + if (rspMsg && rspLen > 0) { + SKv kv = {.key = HEARTBEAT_KEY_TSMA, .valueLen = rspLen, .value = rspMsg}; + taosArrayPush(hbRsp.info, &kv); + } + break; + } default: mError("invalid kv key:%d", kv->key); hbRsp.status = TSDB_CODE_APP_ERROR; diff --git a/source/dnode/mnode/impl/src/mndSma.c b/source/dnode/mnode/impl/src/mndSma.c index 8887d0d446..aab3c4a1e8 100644 --- a/source/dnode/mnode/impl/src/mndSma.c +++ b/source/dnode/mnode/impl/src/mndSma.c @@ -58,16 +58,17 @@ static void mndCancelRetrieveIdx(SMnode *pMnode, void *pIter); static int32_t mndRetrieveTSMA(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pBlock, int32_t rows); static void mndCancelRetrieveTSMA(SMnode *pMnode, void *pIter); +static int32_t mndProcessGetTbTSMAReq(SRpcMsg *pReq); typedef struct SCreateTSMACxt { - SMnode * pMnode; - const SRpcMsg * pRpcReq; + SMnode * pMnode; + const SRpcMsg *pRpcReq; union { const SMCreateSmaReq *pCreateSmaReq; const SMDropSmaReq * pDropSmaReq; }; - const SDbObj * pDb; - const SStbObj * pSrcStb; + const SDbObj *pDb; + SStbObj * pSrcStb; // TODO normal table SSmaObj * pSma; SCMCreateStreamReq *pCreateStreamReq; @@ -99,6 +100,7 @@ int32_t mndInitSma(SMnode *pMnode) { mndSetMsgHandle(pMnode, TDMT_MND_CREATE_TSMA, mndProcessCreateTSMAReq); mndSetMsgHandle(pMnode, TDMT_MND_DROP_TSMA, mndProcessDropTSMAReq); + mndSetMsgHandle(pMnode, TDMT_MND_GET_TABLE_TSMA, mndProcessGetTbTSMAReq); mndAddShowRetrieveHandle(pMnode, TSDB_MGMT_TABLE_TSMAS, mndRetrieveTSMA); mndAddShowFreeIterHandle(pMnode, TSDB_MGMT_TABLE_TSMAS, mndCancelRetrieveTSMA); @@ -136,6 +138,7 @@ static SSdbRaw *mndSmaActionEncode(SSmaObj *pSma) { SDB_SET_INT32(pRaw, dataPos, pSma->tagsFilterLen, _OVER) SDB_SET_INT32(pRaw, dataPos, pSma->sqlLen, _OVER) SDB_SET_INT32(pRaw, dataPos, pSma->astLen, _OVER) + SDB_SET_INT32(pRaw, dataPos, pSma->version, _OVER) if (pSma->exprLen > 0) { SDB_SET_BINARY(pRaw, dataPos, pSma->expr, pSma->exprLen, _OVER) @@ -207,6 +210,7 @@ static SSdbRow *mndSmaActionDecode(SSdbRaw *pRaw) { SDB_GET_INT32(pRaw, dataPos, &pSma->tagsFilterLen, _OVER) SDB_GET_INT32(pRaw, dataPos, &pSma->sqlLen, _OVER) SDB_GET_INT32(pRaw, dataPos, &pSma->astLen, _OVER) + SDB_GET_INT32(pRaw, dataPos, &pSma->version, _OVER) if (pSma->exprLen > 0) { pSma->expr = taosMemoryCalloc(pSma->exprLen, 1); @@ -1396,6 +1400,7 @@ static void initSMAObj(SCreateTSMACxt* pCxt) { pCxt->pSma->interval = pCxt->pCreateSmaReq->interval; pCxt->pSma->intervalUnit = pCxt->pCreateSmaReq->intervalUnit; pCxt->pSma->timezone = tsTimezone; + pCxt->pSma->version = 1; pCxt->pSma->exprLen = pCxt->pCreateSmaReq->exprLen; pCxt->pSma->sqlLen = pCxt->pCreateSmaReq->sqlLen; @@ -1478,6 +1483,7 @@ static int32_t mndCreateTSMASetCreateStreamUndoAction(SMnode* pMnode) { static int32_t mndCreateTSMATxnPrepare(SCreateTSMACxt* pCxt) { int32_t code = -1; + // TODO change the action name STransAction redoAction = {0}; STransAction undoAction = {0}; // TODO trans conflicting setting, maybe conflict with myself @@ -1528,6 +1534,7 @@ static int32_t mndCreateTSMATxnPrepare(SCreateTSMACxt* pCxt) { if (mndSetCreateSmaCommitLogs(pCxt->pMnode, pTrans, pCxt->pSma) != 0) goto _OVER; if (mndTransAppendRedoAction(pTrans, &redoAction) != 0) goto _OVER; if (mndTransAppendUndoAction(pTrans, &undoAction) != 0) goto _OVER; + //TODO add drop stable undo action if (mndTransPrepare(pCxt->pMnode, pTrans) != 0) goto _OVER; code = TSDB_CODE_SUCCESS; @@ -1560,6 +1567,8 @@ static int32_t mndCreateTSMA(SCreateTSMACxt *pCxt) { } _OVER: + tFreeSCMCreateStreamReq(pCxt->pCreateStreamReq); + tFreeMDropStreamReq(pCxt->pDropStreamReq); pCxt->pCreateStreamReq = NULL; return code; } @@ -1731,6 +1740,7 @@ static int32_t mndDropTSMA(SCreateTSMACxt* pCxt) { if (mndTransPrepare(pCxt->pMnode, pTrans) != 0) goto _OVER; code = TSDB_CODE_SUCCESS; _OVER: + tFreeMDropStreamReq(pCxt->pDropStreamReq); mndTransDrop(pTrans); return code; } @@ -1738,8 +1748,8 @@ _OVER: static int32_t mndProcessDropTSMAReq(SRpcMsg* pReq) { int32_t code = -1; SMDropSmaReq dropReq = {0}; - SSmaObj * pSma; - SDbObj * pDb; + SSmaObj * pSma = NULL; + SDbObj * pDb = NULL; SMnode * pMnode = pReq->info.node; if (tDeserializeSMDropSmaReq(pReq->pCont, pReq->contLen, &dropReq) != TSDB_CODE_SUCCESS) { terrno = TSDB_CODE_INVALID_MSG; @@ -1876,12 +1886,13 @@ static int32_t mndRetrieveTSMA(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pBlo FOREACH(pFunc, ((SSelectStmt *)pNode)->pProjectionList) { if (nodeType(pFunc) == QUERY_NODE_FUNCTION) { SFunctionNode *pFuncNode = (SFunctionNode *)pFunc; - if (!fmIsAggFunc(pFuncNode->funcId)) continue; + if (!fmIsTSMASupportedFunc(pFuncNode->funcId)) continue; len += snprintf(start, TSDB_SHOW_SQL_LEN - len, "%s%s", start != buf + VARSTR_HEADER_SIZE ? "," : "", ((SExprNode *)pFunc)->userAlias); start = buf + VARSTR_HEADER_SIZE + len; } } + nodesDestroyNode(pNode); } varDataSetLen(buf, len); pColInfo = taosArrayGet(pBlock->pDataBlock, cols++); @@ -1893,9 +1904,252 @@ static int32_t mndRetrieveTSMA(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pBlo } mndReleaseDb(pMnode, pDb); pShow->numOfRows += numOfRows; - if (numOfRows < rows) pShow->pIter = NULL; + if (numOfRows < rows) { + taosMemoryFree(pShow->pIter); + pShow->pIter = NULL; + } return numOfRows; } -static void mndCancelRetrieveTSMA(SMnode *pMnode, void *pIter) { +static void mndCancelRetrieveTSMA(SMnode *pMnode, void *pIter) { + SSmaAndTagIter *p = pIter; + if (p != NULL) { + SSdb *pSdb = pMnode->pSdb; + sdbCancelFetch(pSdb, p->pSmaIter); + } + taosMemoryFree(p); +} + +int32_t dumpTSMAInfoFromSmaObj(const SSmaObj* pSma, STableTSMAInfo* pInfo) { + int32_t code = 0; + pInfo->interval = pSma->interval; + pInfo->unit = pSma->intervalUnit; + pInfo->tsmaId = pSma->uid; + pInfo->version = pSma->version; + pInfo->tsmaId = pSma->uid; + SName sName = {0}; + tNameFromString(&sName, pSma->name, T_NAME_ACCT | T_NAME_DB | T_NAME_TABLE); + tstrncpy(pInfo->name, sName.tname, TSDB_TABLE_NAME_LEN); + tstrncpy(pInfo->targetDbFName, pSma->db, TSDB_DB_FNAME_LEN); + tNameFromString(&sName, pSma->dstTbName, T_NAME_ACCT | T_NAME_DB | T_NAME_TABLE); + tstrncpy(pInfo->targetTb, sName.tname, TSDB_TABLE_NAME_LEN); + tstrncpy(pInfo->dbFName, pSma->db, TSDB_DB_FNAME_LEN); + tNameFromString(&sName, pSma->stb, T_NAME_ACCT | T_NAME_DB | T_NAME_TABLE); + tstrncpy(pInfo->tb, sName.tname, TSDB_TABLE_NAME_LEN); + pInfo->pFuncs = taosArrayInit(8, sizeof(STableTSMAFuncInfo)); + if (!pInfo->pFuncs) return TSDB_CODE_OUT_OF_MEMORY; + + SNode *pNode, *pFunc; + if (TSDB_CODE_SUCCESS != nodesStringToNode(pSma->ast, &pNode)) { + taosArrayDestroy(pInfo->pFuncs); + pInfo->pFuncs = NULL; + return TSDB_CODE_TSMA_INVALID_STAT; + } + if (pNode) { + SSelectStmt *pSelect = (SSelectStmt *)pNode; + FOREACH(pFunc, pSelect->pProjectionList) { + STableTSMAFuncInfo funcInfo = {0}; + SFunctionNode * pFuncNode = (SFunctionNode *)pFunc; + if (!fmIsTSMASupportedFunc(pFuncNode->funcId)) continue; + funcInfo.funcId = pFuncNode->funcId; + funcInfo.colId = ((SColumnNode *)pFuncNode->pParameterList->pHead->pNode)->colId; + if (!taosArrayPush(pInfo->pFuncs, &funcInfo)) { + terrno = TSDB_CODE_OUT_OF_MEMORY; + taosArrayDestroy(pInfo->pFuncs); + nodesDestroyNode(pNode); + return code; + } + } + nodesDestroyNode(pNode); + } + return code; +} + +static int32_t mndGetTableTSMA(SMnode *pMnode, char *tbFName, STableTSMAInfoRsp *rsp, bool *exist) { + int32_t code = -1; + SSmaObj * pSma = NULL; + SSdb * pSdb = pMnode->pSdb; + void * pIter = NULL; + + SStbObj *pStb = mndAcquireStb(pMnode, tbFName); + if (NULL == pStb) { + *exist = false; + return TSDB_CODE_SUCCESS; + } + mndReleaseStb(pMnode, pStb); + + while (1) { + pIter = sdbFetch(pSdb, SDB_SMA, pIter, (void **)&pSma); + if (pIter == NULL) break; + + if (pSma->stb[0] != tbFName[0] || strcmp(pSma->stb, tbFName)) { + continue; + } + + STableTSMAInfo *pTsma = taosMemoryCalloc(1, sizeof(STableTSMAInfo)); + if (!pTsma) { + terrno = TSDB_CODE_OUT_OF_MEMORY; + sdbRelease(pSdb, pSma); + return code; + } + terrno = dumpTSMAInfoFromSmaObj(pSma, pTsma); + if (terrno) { + sdbRelease(pSdb, pSma); + return code; + } + if (NULL == taosArrayPush(rsp->pTsmas, &pTsma)) { + terrno = TSDB_CODE_OUT_OF_MEMORY; + tFreeTableTSMAInfo(pTsma); + sdbRelease(pSdb, pSma); + return code; + } + *exist = true; + + sdbRelease(pSdb, pSma); + } + return TSDB_CODE_SUCCESS; +} + +static int32_t mndProcessGetTbTSMAReq(SRpcMsg *pReq) { + STableTSMAInfoRsp rsp = {0}; + int32_t code = -1; + STableTSMAInfoReq tsmaReq = {0}; + bool exist = false; + SMnode * pMnode = pReq->info.node; + + if (tDeserializeTableTSMAInfoReq(pReq->pCont, pReq->contLen, &tsmaReq) != 0) { + terrno = TSDB_CODE_INVALID_MSG; + goto _OVER; + } + + rsp.pTsmas = taosArrayInit(4, POINTER_BYTES); + if (NULL == rsp.pTsmas) { + terrno = TSDB_CODE_OUT_OF_MEMORY; + code = -1; + goto _OVER; + } + + code = mndGetTableTSMA(pMnode, tsmaReq.name, &rsp, &exist); + if (code) { + goto _OVER; + } + + if (!exist) { + code = -1; + terrno = TSDB_CODE_MND_SMA_NOT_EXIST; + } else { + int32_t contLen = tSerializeTableTSMAInfoRsp(NULL, 0, &rsp); + void *pRsp = rpcMallocCont(contLen); + if (pRsp == NULL) { + terrno = TSDB_CODE_OUT_OF_MEMORY; + code = -1; + goto _OVER; + } + + tSerializeTableTSMAInfoRsp(pRsp, contLen, &rsp); + + pReq->info.rsp = pRsp; + pReq->info.rspLen = contLen; + + code = 0; + } + +_OVER: + if (code != 0) { + mError("failed to get table tsma %s since %s", tsmaReq.name, terrstr()); + } + + tFreeTableTSMAInfoRsp(&rsp); + return code; +} + +static int32_t mkNonExistTSMAInfo(const STSMAVersion *pTsmaVer, STableTSMAInfo **ppTsma) { + STableTSMAInfo *pInfo = taosMemoryCalloc(1, sizeof(STableTSMAInfo)); + if (!pInfo) { + return TSDB_CODE_OUT_OF_MEMORY; + } + pInfo->pFuncs = NULL; + pInfo->tsmaId = pTsmaVer->tsmaId; + tstrncpy(pInfo->dbFName, pTsmaVer->dbFName, TSDB_DB_FNAME_LEN); + tstrncpy(pInfo->tb, pTsmaVer->tbName, TSDB_TABLE_NAME_LEN); + tstrncpy(pInfo->name, pTsmaVer->name, TSDB_TABLE_NAME_LEN); + pInfo->dbId = pTsmaVer->dbId; + *ppTsma = pInfo; + return TSDB_CODE_SUCCESS; +} + +int32_t mndValidateTSMAInfo(SMnode *pMnode, STSMAVersion *pTsmaVersions, int32_t numOfTsmas, void **ppRsp, + int32_t *pRspLen) { + int32_t code = -1; + STSMAHbRsp hbRsp = {0}; + int32_t rspLen = 0; + void * pRsp = NULL; + char tsmaFName[TSDB_TABLE_FNAME_LEN] = {0}; + STableTSMAInfo * pTsmaInfo = NULL; + + hbRsp.pTsmas = taosArrayInit(numOfTsmas, POINTER_BYTES); + if (!hbRsp.pTsmas) { + terrno = TSDB_CODE_OUT_OF_MEMORY; + return -1; + } + + for (int32_t i = 0; i < numOfTsmas; ++i) { + STSMAVersion* pTsmaVer = &pTsmaVersions[i]; + pTsmaVer->dbId = be64toh(pTsmaVer->dbId); + pTsmaVer->tsmaId = be64toh(pTsmaVer->tsmaId); + pTsmaVer->version = ntohl(pTsmaVer->version); + + snprintf(tsmaFName, sizeof(tsmaFName), "%s.%s", pTsmaVer->dbFName, pTsmaVer->name); + SSmaObj* pSma = mndAcquireSma(pMnode, tsmaFName); + if (!pSma) { + terrno = mkNonExistTSMAInfo(pTsmaVer, &pTsmaInfo); + if (terrno) goto _OVER; + taosArrayPush(hbRsp.pTsmas, &pTsmaInfo); + continue; + } + + if (pSma->uid != pTsmaVer->tsmaId) { + mDebug("tsma: %s.%" PRIx64 " tsmaId mismatch with current %" PRIx64, tsmaFName, pTsmaVer->tsmaId, pSma->uid); + terrno = mkNonExistTSMAInfo(pTsmaVer, &pTsmaInfo); + if (terrno) goto _OVER; + taosArrayPush(hbRsp.pTsmas, &pTsmaInfo); + continue; + } else if (pSma->version == pTsmaVer->version) { + mndReleaseSma(pMnode, pSma); + continue; + } + + // dump smaObj into rsp + STableTSMAInfo * pInfo = NULL; + pInfo = taosMemoryCalloc(1, sizeof(STableTSMAInfo)); + if (!pInfo || (terrno = dumpTSMAInfoFromSmaObj(pSma, pInfo))) { + mndReleaseSma(pMnode, pSma); + taosMemoryFreeClear(pInfo); + goto _OVER; + } + + taosArrayPush(hbRsp.pTsmas, pInfo); + mndReleaseSma(pMnode, pSma); + } + + rspLen = tSerializeTSMAHbRsp(NULL, 0, &hbRsp); + if (rspLen < 0) { + terrno = TSDB_CODE_INVALID_MSG; + goto _OVER; + } + + pRsp = taosMemoryMalloc(rspLen); + if (!pRsp) { + terrno = TSDB_CODE_OUT_OF_MEMORY; + rspLen = 0; + goto _OVER; + } + + tSerializeTSMAHbRsp(pRsp, rspLen, &hbRsp); + code = 0; +_OVER: + tFreeTSMAHbRsp(&hbRsp); + *ppRsp = pRsp; + *pRspLen = rspLen; + return code; } diff --git a/source/libs/catalog/inc/catalogInt.h b/source/libs/catalog/inc/catalogInt.h index dc30e88b29..7af89e181b 100644 --- a/source/libs/catalog/inc/catalogInt.h +++ b/source/libs/catalog/inc/catalogInt.h @@ -31,6 +31,7 @@ extern "C" { #define CTG_DEFAULT_CACHE_DB_NUMBER 20 #define CTG_DEFAULT_CACHE_TBLMETA_NUMBER 1000 #define CTG_DEFAULT_CACHE_VIEW_NUMBER 256 +#define CTG_DEFAULT_CACHE_TSMA_NUMBER 10 #define CTG_DEFAULT_RENT_SECOND 10 #define CTG_DEFAULT_RENT_SLOT_SIZE 10 #define CTG_DEFAULT_MAX_RETRY_TIMES 3 @@ -69,6 +70,7 @@ typedef enum { CTG_CI_UDF, CTG_CI_SVR_VER, CTG_CI_VIEW, + CTG_CI_TBL_TSMA, CTG_CI_MAX_VALUE, } CTG_CACHE_ITEM; @@ -85,6 +87,7 @@ enum { CTG_RENT_DB = 1, CTG_RENT_STABLE, CTG_RENT_VIEW, + CTG_RENT_TSMA, }; enum { @@ -101,6 +104,8 @@ enum { CTG_OP_DROP_TB_INDEX, CTG_OP_UPDATE_VIEW_META, CTG_OP_DROP_VIEW_META, + CTG_OP_UPDATE_TB_TSMA, + CTG_OP_DROP_TB_TSMA, CTG_OP_CLEAR_CACHE, CTG_OP_MAX }; @@ -123,6 +128,7 @@ typedef enum { CTG_TASK_GET_TB_HASH_BATCH, CTG_TASK_GET_TB_TAG, CTG_TASK_GET_VIEW, + CTG_TASK_GET_TB_TSMA, } CTG_TASK_TYPE; typedef enum { @@ -255,14 +261,22 @@ typedef struct SCtgViewsCtx { SArray* pFetchs; } SCtgViewsCtx; +typedef struct SCtgTbTSMACtx { + int32_t fetchNum; + SArray* pNames; + SArray* pResList; + SArray* pFetches; +} SCtgTbTSMACtx; typedef STableIndexRsp STableIndex; +typedef STableTSMAInfo STSMACache; typedef struct SCtgTbCache { - SRWLatch metaLock; - SRWLatch indexLock; - STableMeta* pMeta; - STableIndex* pIndex; + SRWLatch metaLock; + SRWLatch indexLock; + SRWLatch tsmaLock; + STableMeta* pMeta; + STableIndex* pIndex; } SCtgTbCache; typedef struct SCtgVgCache { @@ -280,6 +294,10 @@ typedef struct SCtgViewCache { SViewMeta* pMeta; } SCtgViewCache; +typedef struct SCtgTSMACache { + SRWLatch tsmaLock; + SArray* pTsmas; // SArray +} SCtgTSMACache; typedef struct SCtgDBCache { SRWLatch dbLock; // RC between destroy tbCache/stbCache and all reads @@ -290,6 +308,7 @@ typedef struct SCtgDBCache { SHashObj* viewCache; // key:viewname, value:SCtgViewCache SHashObj* tbCache; // key:tbname, value:SCtgTbCache SHashObj* stbCache; // key:suid, value:char* + SHashObj* tsmaCache; // key:tbname, value: SCtgTSMACache uint64_t dbCacheNum[CTG_CI_MAX_VALUE]; uint64_t dbCacheSize; } SCtgDBCache; @@ -325,6 +344,7 @@ typedef struct SCatalog { SCtgRentMgmt dbRent; SCtgRentMgmt stbRent; SCtgRentMgmt viewRent; + SCtgRentMgmt tsmaRent; SCtgCacheStat cacheStat; } SCatalog; @@ -370,6 +390,7 @@ typedef struct SCtgJob { int32_t tbCfgNum; int32_t svrVerNum; int32_t viewNum; + int32_t tbTsmaNum; } SCtgJob; typedef struct SCtgMsgCtx { @@ -548,6 +569,21 @@ typedef struct SCtgDropViewMetaMsg { uint64_t viewId; } SCtgDropViewMetaMsg; +typedef struct SCtgUpdateTbTSMAMsg { + SCatalog* pCtg; + STableTSMAInfo* pTsma; +} SCtgUpdateTbTSMAMsg; + +typedef struct SCtgDropTbTSMAMsg { + SCatalog* pCtg; + char dbFName[TSDB_DB_FNAME_LEN]; + char tbName[TSDB_TABLE_NAME_LEN]; + char tsmaName[TSDB_TABLE_NAME_LEN]; + uint64_t tsmaId; + uint64_t dbId; + uint64_t tbId; +} SCtgDropTbTSMAMsg; + typedef struct SCtgCacheOperation { int32_t opId; @@ -943,10 +979,12 @@ int32_t ctgMetaRentGet(SCtgRentMgmt* mgmt, void** res, uint32_t* num, int32_t si int32_t ctgMetaRentRemove(SCtgRentMgmt *mgmt, int64_t id, __compar_fn_t sortCompare, __compar_fn_t searchCompare); void ctgRemoveStbRent(SCatalog *pCtg, SCtgDBCache *dbCache); void ctgRemoveViewRent(SCatalog *pCtg, SCtgDBCache *dbCache); +void ctgRemoveTSMARent(SCatalog* pCtg, SCtgDBCache* dbCache); int32_t ctgUpdateRentStbVersion(SCatalog *pCtg, char *dbFName, char *tbName, uint64_t dbId, uint64_t suid, SCtgTbCache *pCache); int32_t ctgUpdateRentViewVersion(SCatalog *pCtg, char *dbFName, char *viewName, uint64_t dbId, uint64_t viewId, - SCtgViewCache *pCache); + SCtgViewCache *pCache); +int32_t ctgUpdateRentTSMAVersion(SCatalog* pCtg, char* dbFName, const STSMACache* pCache); int32_t ctgUpdateTbMetaToCache(SCatalog* pCtg, STableMetaOutput* pOut, bool syncReq); int32_t ctgUpdateViewMetaToCache(SCatalog *pCtg, SViewMetaRsp *pRsp, bool syncReq); int32_t ctgStartUpdateThread(); @@ -1018,9 +1056,11 @@ void ctgFreeDbCache(SCtgDBCache* dbCache); int32_t ctgStbVersionSortCompare(const void* key1, const void* key2); int32_t ctgViewVersionSortCompare(const void* key1, const void* key2); int32_t ctgDbCacheInfoSortCompare(const void* key1, const void* key2); +int32_t ctgTSMAVersionSortCompare(const void* key1, const void* key2); int32_t ctgStbVersionSearchCompare(const void* key1, const void* key2); int32_t ctgDbCacheInfoSearchCompare(const void* key1, const void* key2); int32_t ctgViewVersionSearchCompare(const void* key1, const void* key2); +int32_t ctgTSMAVersionSearchCompare(const void* key1, const void* key2); void ctgFreeSTableMetaOutput(STableMetaOutput* pOutput); int32_t ctgUpdateMsgCtx(SCtgMsgCtx* pCtx, int32_t reqType, void* out, char* target); int32_t ctgAddMsgCtx(SArray* pCtxs, int32_t reqType, void* out, char* target); @@ -1073,6 +1113,19 @@ int32_t ctgGetCachedStbNameFromSuid(SCatalog* pCtg, char* dbFName, uint64_t suid int32_t ctgGetTbTagCb(SCtgTask* pTask); int32_t ctgGetUserCb(SCtgTask* pTask); +int32_t ctgGetTbTSMAFromCache(SCatalog* pCtg, SCtgTbTSMACtx* pCtx, int32_t dbIdx, int32_t* fetchIdx, int32_t baseResIdx, + SArray* pList); +int32_t ctgGetTbTSMAFromMnode(SCatalog* pCtg, SRequestConnInfo* pConn, SName* name, STableTSMAInfoRsp* out, + SCtgTaskReq* tReq); +int32_t ctgUpdateTbTSMAEnqueue(SCatalog* pCtg, STSMACache** pTsma, bool syncOp); +int32_t ctgDropTSMAForTbEnqueue(SCatalog* pCtg, SName* pName, bool syncOp); +int32_t ctgDropTbTSMAEnqueue(SCatalog* pCtg, const STSMACache* pTsma, bool syncOp); +int32_t ctgCloneTbTSMA(STSMACache* pTsmas, STSMACache** pRes); +int32_t ctgOpDropTbTSMA(SCtgCacheOperation* operation); +int32_t ctgOpUpdateTbTSMA(SCtgCacheOperation* operation); +uint64_t ctgGetTbTSMACacheSize(STSMACache* pTsmaInfo); +void ctgFreeTbTSMAInfo(void* p); + extern SCatalogMgmt gCtgMgmt; extern SCtgDebug gCTGDebug; extern SCtgAsyncFps gCtgAsyncFps[]; diff --git a/source/libs/catalog/src/catalog.c b/source/libs/catalog/src/catalog.c index c2d88e5ce3..5d35037a3b 100644 --- a/source/libs/catalog/src/catalog.c +++ b/source/libs/catalog/src/catalog.c @@ -759,6 +759,10 @@ int32_t catalogInit(SCatalogCfg* cfg) { gCtgMgmt.cfg.maxViewCacheNum = CTG_DEFAULT_CACHE_VIEW_NUMBER; } + if (gCtgMgmt.cfg.maxTSMACacheNum == 0) { + gCtgMgmt.cfg.maxTSMACacheNum = CTG_DEFAULT_CACHE_TSMA_NUMBER; + } + if (gCtgMgmt.cfg.dbRentSec == 0) { gCtgMgmt.cfg.dbRentSec = CTG_DEFAULT_RENT_SECOND; } @@ -770,13 +774,19 @@ int32_t catalogInit(SCatalogCfg* cfg) { if (gCtgMgmt.cfg.viewRentSec == 0) { gCtgMgmt.cfg.viewRentSec = CTG_DEFAULT_RENT_SECOND; } + + if (gCtgMgmt.cfg.tsmaRentSec == 0) { + gCtgMgmt.cfg.tsmaRentSec = CTG_DEFAULT_RENT_SECOND; + } } else { gCtgMgmt.cfg.maxDBCacheNum = CTG_DEFAULT_CACHE_DB_NUMBER; gCtgMgmt.cfg.maxTblCacheNum = CTG_DEFAULT_CACHE_TBLMETA_NUMBER; gCtgMgmt.cfg.maxViewCacheNum = CTG_DEFAULT_CACHE_VIEW_NUMBER; + gCtgMgmt.cfg.maxTSMACacheNum = CTG_DEFAULT_CACHE_TSMA_NUMBER; gCtgMgmt.cfg.dbRentSec = CTG_DEFAULT_RENT_SECOND; gCtgMgmt.cfg.stbRentSec = CTG_DEFAULT_RENT_SECOND; gCtgMgmt.cfg.viewRentSec = CTG_DEFAULT_RENT_SECOND; + gCtgMgmt.cfg.tsmaRentSec = CTG_DEFAULT_RENT_SECOND; } gCtgMgmt.pCluster = taosHashInit(CTG_DEFAULT_CACHE_CLUSTER_NUMBER, taosGetDefaultHashFunction(TSDB_DATA_TYPE_BIGINT), @@ -862,6 +872,7 @@ int32_t catalogGetHandle(uint64_t clusterId, SCatalog** catalogHandle) { CTG_ERR_JRET(ctgMetaRentInit(&clusterCtg->dbRent, gCtgMgmt.cfg.dbRentSec, CTG_RENT_DB, sizeof(SDbCacheInfo))); CTG_ERR_JRET(ctgMetaRentInit(&clusterCtg->stbRent, gCtgMgmt.cfg.stbRentSec, CTG_RENT_STABLE, sizeof(SSTableVersion))); CTG_ERR_JRET(ctgMetaRentInit(&clusterCtg->viewRent, gCtgMgmt.cfg.viewRentSec, CTG_RENT_VIEW, sizeof(SViewVersion))); + CTG_ERR_JRET(ctgMetaRentInit(&clusterCtg->tsmaRent, gCtgMgmt.cfg.tsmaRentSec, CTG_RENT_TSMA, sizeof(STSMAVersion))); clusterCtg->dbCache = taosHashInit(gCtgMgmt.cfg.maxDBCacheNum, taosGetDefaultHashFunction(TSDB_DATA_TYPE_BINARY), false, HASH_ENTRY_LOCK); @@ -1562,6 +1573,16 @@ int32_t catalogGetExpiredUsers(SCatalog* pCtg, SUserAuthVersion** users, uint32_ CTG_API_LEAVE(TSDB_CODE_SUCCESS); } +int32_t catalogGetExpiredTsmas(SCatalog* pCtg, STSMAVersion** tsmas, uint32_t* num) { + CTG_API_ENTER(); + + if (!pCtg || !tsmas || !num) { + CTG_API_LEAVE(TSDB_CODE_CTG_INVALID_INPUT); + } + + CTG_API_LEAVE(ctgMetaRentGet(&pCtg->tsmaRent, (void**)tsmas, num, sizeof(STSMAVersion))); +} + int32_t catalogGetDBCfg(SCatalog* pCtg, SRequestConnInfo* pConn, const char* dbFName, SDbCfgInfo* pDbCfg) { CTG_API_ENTER(); @@ -1769,6 +1790,46 @@ int32_t catalogGetViewMeta(SCatalog* pCtg, SRequestConnInfo* pConn, const SName* CTG_API_LEAVE(TSDB_CODE_OPS_NOT_SUPPORT); } +int32_t catalogAsyncUpdateTSMA(SCatalog* pCtg, STableTSMAInfo** ppTsma) { + CTG_API_ENTER(); + if (!pCtg || !ppTsma) { + CTG_API_LEAVE(TSDB_CODE_CTG_INVALID_INPUT); + } + int32_t code = 0; + CTG_ERR_JRET(ctgUpdateTbTSMAEnqueue(pCtg, ppTsma, false)); + +_return: + CTG_API_LEAVE(code); +} + +int32_t catalogUpdateTSMA(SCatalog* pCtg, STableTSMAInfo** pTsma) { + CTG_API_ENTER(); + if (!pCtg || !pTsma) { + CTG_API_LEAVE(TSDB_CODE_CTG_INVALID_INPUT); + } + int32_t code = 0; + CTG_ERR_JRET(ctgUpdateTbTSMAEnqueue(pCtg, pTsma, true)); + +_return: + CTG_API_LEAVE(code); +} + +int32_t catalogRemoveTSMA(SCatalog* pCtg, const STableTSMAInfo* pTsma) { + CTG_API_ENTER(); + int32_t code = 0; + + if (!pCtg || !pTsma) { + CTG_API_LEAVE(TSDB_CODE_CTG_INVALID_INPUT); + } + + if (!pCtg->dbCache) { + return TSDB_CODE_SUCCESS; + } + CTG_ERR_JRET(ctgDropTbTSMAEnqueue(pCtg, pTsma, true)); +_return: + CTG_API_LEAVE(code); +} + int32_t catalogClearCache(void) { CTG_API_ENTER_NOLOCK(); diff --git a/source/libs/catalog/src/ctgAsync.c b/source/libs/catalog/src/ctgAsync.c index 39d3aa0ff7..44d3cbc61d 100644 --- a/source/libs/catalog/src/ctgAsync.c +++ b/source/libs/catalog/src/ctgAsync.c @@ -476,6 +476,21 @@ int32_t ctgHandleForceUpdateView(SCatalog* pCtg, const SCatalogReq* pReq) { return TSDB_CODE_SUCCESS; } +int32_t ctgInitGetTbTSMATask(SCtgJob* pJob, int32_t taskId, void* param) { + SCtgTask task = {0}; + task.type = CTG_TASK_GET_TB_TSMA; + task.taskId = taskId; + task.pJob = pJob; + + SCtgTbTSMACtx* pTaskCtx = taosMemoryCalloc(1, sizeof(SCtgTbTSMACtx)); + if (!pTaskCtx) CTG_ERR_RET(TSDB_CODE_OUT_OF_MEMORY); + task.taskCtx = pTaskCtx; + pTaskCtx->pNames = param; + pTaskCtx->pResList = taosArrayInit(pJob->tbTsmaNum, sizeof(SMetaRes)); + + taosArrayPush(pJob->pTasks, &task); + return TSDB_CODE_SUCCESS; +} int32_t ctgHandleForceUpdate(SCatalog* pCtg, int32_t taskNum, SCtgJob* pJob, const SCatalogReq* pReq) { SHashObj* pDb = taosHashInit(taskNum, taosGetDefaultHashFunction(TSDB_DATA_TYPE_BINARY), false, HASH_NO_LOCK); @@ -573,6 +588,11 @@ int32_t ctgHandleForceUpdate(SCatalog* pCtg, int32_t taskNum, SCtgJob* pJob, con ctgDropTbIndexEnqueue(pCtg, name, true); } + for (int32_t i = 0; i < pJob->tbTsmaNum; ++i) { + SName* name = taosArrayGet(pReq->pTableTSMAs, i); + ctgDropTSMAForTbEnqueue(pCtg, name, true); + } + // REFRESH VIEW META return ctgHandleForceUpdateView(pCtg, pReq); } @@ -614,9 +634,10 @@ int32_t ctgInitJob(SCatalog* pCtg, SRequestConnInfo* pConn, SCtgJob** job, const int32_t tbCfgNum = (int32_t)taosArrayGetSize(pReq->pTableCfg); int32_t tbTagNum = (int32_t)taosArrayGetSize(pReq->pTableTag); int32_t viewNum = (int32_t)ctgGetTablesReqNum(pReq->pView); + int32_t tbTsmaNum = (int32_t)taosArrayGetSize(pReq->pTableTSMAs); int32_t taskNum = tbMetaNum + dbVgNum + udfNum + tbHashNum + qnodeNum + dnodeNum + svrVerNum + dbCfgNum + indexNum + - userNum + dbInfoNum + tbIndexNum + tbCfgNum + tbTagNum + viewNum; + userNum + dbInfoNum + tbIndexNum + tbCfgNum + tbTagNum + viewNum + tbTsmaNum; *job = taosMemoryCalloc(1, sizeof(SCtgJob)); if (NULL == *job) { @@ -649,6 +670,7 @@ int32_t ctgInitJob(SCatalog* pCtg, SRequestConnInfo* pConn, SCtgJob** job, const pJob->svrVerNum = svrVerNum; pJob->tbTagNum = tbTagNum; pJob->viewNum = viewNum; + pJob->tbTsmaNum = tbTsmaNum; #if CTG_BATCH_FETCH pJob->pBatchs = @@ -741,6 +763,10 @@ int32_t ctgInitJob(SCatalog* pCtg, SRequestConnInfo* pConn, SCtgJob** job, const CTG_ERR_JRET(ctgInitTask(pJob, CTG_TASK_GET_VIEW, pReq->pView, NULL)); } + if (tbTsmaNum > 0) { + CTG_ERR_JRET(ctgInitTask(pJob, CTG_TASK_GET_TB_TSMA, pReq->pTableTSMAs, NULL)); + } + if (qnodeNum) { CTG_ERR_JRET(ctgInitTask(pJob, CTG_TASK_GET_QNODE, NULL, NULL)); } @@ -2574,6 +2600,113 @@ int32_t ctgLaunchGetViewsTask(SCtgTask* pTask) { return TSDB_CODE_SUCCESS; } +int32_t ctgLaunchGetTbTSMATask(SCtgTask* pTask) { + SCatalog* pCtg = pTask->pJob->pCtg; + SCtgTbTSMACtx* pCtx = (SCtgTbTSMACtx*)pTask->taskCtx; + SRequestConnInfo* pConn = &pTask->pJob->conn; + SArray* pRes = NULL; + SCtgJob* pJob = pTask->pJob; + + int32_t dbNum = taosArrayGetSize(pCtx->pNames); + int32_t fetchIdx = 0, baseResIdx = 0; + + for (int32_t idx = 0; idx < dbNum; ++idx) { + STablesReq* pReq = taosArrayGet(pCtx->pNames, idx); + ctgGetTbTSMAFromCache(pCtg, pCtx, idx, &fetchIdx, baseResIdx, pReq->pTables); + baseResIdx += taosArrayGetSize(pReq->pTables); + } + pCtx->fetchNum = taosArrayGetSize(pCtx->pFetches); + if (pCtx->fetchNum <= 0) { + TSWAP(pTask->res, pCtx->pResList); + CTG_ERR_RET(ctgHandleTaskEnd(pTask, 0)); + return TSDB_CODE_SUCCESS; + } + + pTask->msgCtxs = taosArrayInit_s(sizeof(SCtgMsgCtx), pCtx->fetchNum); + for (int32_t i = 0; i < pCtx->fetchNum; ++i) { + SCtgFetch* pFetch = taosArrayGet(pCtx->pFetches, i); + SName* pName = ctgGetFetchName(pCtx->pNames, pFetch); + SCtgMsgCtx* pMsgCtx = CTG_GET_TASK_MSGCTX(pTask, i); + if (!pMsgCtx->pBatchs) pMsgCtx->pBatchs = pJob->pBatchs; + + SCtgTaskReq tReq; + tReq.pTask = pTask; + tReq.msgIdx = pFetch->fetchIdx; + CTG_ERR_RET(ctgGetTbTSMAFromMnode(pCtg, pConn, pName, NULL, &tReq)); + } + + return TSDB_CODE_SUCCESS; +} + +int32_t ctgHandleGetTbTSMARsp(SCtgTaskReq* tReq, int32_t reqType, const SDataBuf* pMsg, int32_t rspCode) { + int32_t code = 0; + SCtgTask* pTask = tReq->pTask; + SCatalog* pCtg = pTask->pJob->pCtg; + SCtgMsgCtx* pMsgCtx = CTG_GET_TASK_MSGCTX(pTask, tReq->msgIdx); + SCtgTbTSMACtx* pCtx = pTask->taskCtx; + SCtgFetch* pFetch = taosArrayGet(pCtx->pFetches, tReq->msgIdx); + SMetaRes* pRes = taosArrayGet(pCtx->pResList, pFetch->resIdx); + SName* pName = ctgGetFetchName(pCtx->pNames, pFetch); + SArray* pTsmas = NULL; + bool taskDone = false; + STableTSMAInfo* pTsma = NULL; + + CTG_ERR_JRET(ctgProcessRspMsg(pMsgCtx->out, reqType, pMsg->pData, pMsg->len, rspCode, pMsgCtx->target)); + + STableTSMAInfoRsp* pOut = pMsgCtx->out; + if (pOut->pTsmas && taosArrayGetSize(pOut->pTsmas) > 0) { + for (int32_t i = 0; i < taosArrayGetSize(pOut->pTsmas); ++i) { + STableTSMAInfo* pInfo = taosArrayGetP(pOut->pTsmas, i); + CTG_ERR_JRET(ctgCloneTbTSMA(pInfo, &pTsma)); + CTG_ERR_JRET(ctgUpdateTbTSMAEnqueue(pTask->pJob->pCtg, &pTsma, false)); + } + } + + pRes->code = 0; + pRes->pRes = pOut; + pMsgCtx->out = NULL; + if (atomic_sub_fetch_32(&pCtx->fetchNum, 1) == 0) { + TSWAP(pTask->res, pCtx->pResList); + taskDone = true; + } + +_return: + + if (pTsma) { + tFreeTableTSMAInfo(pTsma); + pTsma = NULL; + } + if (code) { + SMetaRes* pRes = taosArrayGet(pCtx->pResList, pFetch->resIdx); + pRes->code = code; + pRes->pRes = NULL; + if (TSDB_CODE_MND_SMA_NOT_EXIST == code) { + code = TSDB_CODE_SUCCESS; + } else { + ctgTaskError("Get tsma for %d.%s.%s faield with err: %s", pName->acctId, pName->dbname, pName->tname, + tstrerror(code)); + } + if (0 == atomic_sub_fetch_32(&pCtx->fetchNum, 1)) { + TSWAP(pTask->res, pCtx->pResList); + taskDone = true; + } + } + if (pTask->res && taskDone) { + ctgHandleTaskEnd(pTask, code); + } + + CTG_RET(code); +} + +int32_t ctgDumpTbTSMARes(SCtgTask* pTask) { + if (pTask->subTask) { + return TSDB_CODE_SUCCESS; + } + + SCtgJob* pJob = pTask->pJob; + pJob->jobRes.pTableTsmas = pTask->res; + return TSDB_CODE_SUCCESS; +} int32_t ctgRelaunchGetTbMetaTask(SCtgTask* pTask) { ctgResetTbMetaTask(pTask); @@ -2692,6 +2825,7 @@ SCtgAsyncFps gCtgAsyncFps[] = { {ctgInitGetTbHashsTask, ctgLaunchGetTbHashsTask, ctgHandleGetTbHashsRsp, ctgDumpTbHashsRes, NULL, NULL}, {ctgInitGetTbTagTask, ctgLaunchGetTbTagTask, ctgHandleGetTbTagRsp, ctgDumpTbTagRes, NULL, NULL}, {ctgInitGetViewsTask, ctgLaunchGetViewsTask, ctgHandleGetViewsRsp, ctgDumpViewsRes, NULL, NULL}, + {ctgInitGetTbTSMATask, ctgLaunchGetTbTSMATask, ctgHandleGetTbTSMARsp, ctgDumpTbTSMARes, NULL, NULL}, }; int32_t ctgMakeAsyncRes(SCtgJob* pJob) { diff --git a/source/libs/catalog/src/ctgCache.c b/source/libs/catalog/src/ctgCache.c index f81f9a6954..4f8a8adbf8 100644 --- a/source/libs/catalog/src/ctgCache.c +++ b/source/libs/catalog/src/ctgCache.c @@ -32,6 +32,8 @@ SCtgOperation gCtgCacheOperation[CTG_OP_MAX] = {{CTG_OP_UPDATE_VGROUP, "update v {CTG_OP_DROP_TB_INDEX, "drop tbIndex", ctgOpDropTbIndex}, {CTG_OP_UPDATE_VIEW_META, "update viewMeta", ctgOpUpdateViewMeta}, {CTG_OP_DROP_VIEW_META, "drop viewMeta", ctgOpDropViewMeta}, + {CTG_OP_UPDATE_TB_TSMA, "update tbTSMA", ctgOpUpdateTbTSMA}, + {CTG_OP_DROP_TB_TSMA, "drop tbTSMA", ctgOpDropTbTSMA}, {CTG_OP_CLEAR_CACHE, "clear cache", ctgOpClearCache}}; SCtgCacheItemInfo gCtgStatItem[CTG_CI_MAX_VALUE] = { @@ -52,6 +54,7 @@ SCtgCacheItemInfo gCtgStatItem[CTG_CI_MAX_VALUE] = { {"TblTag ", CTG_CI_FLAG_LEVEL_DB}, //CTG_CI_TBL_TAG, {"IndexInfo ", CTG_CI_FLAG_LEVEL_DB}, //CTG_CI_INDEX_INFO, {"viewMeta ", CTG_CI_FLAG_LEVEL_DB}, //CTG_CI_VIEW, + {"TblTSMA ", CTG_CI_FLAG_LEVEL_DB}, //CTG_CI_TBL_TSMA {"User ", CTG_CI_FLAG_LEVEL_CLUSTER}, //CTG_CI_USER, {"UDF ", CTG_CI_FLAG_LEVEL_CLUSTER}, //CTG_CI_UDF, {"SvrVer ", CTG_CI_FLAG_LEVEL_CLUSTER} //CTG_CI_SVR_VER, @@ -209,6 +212,17 @@ void ctgReleaseVgMetaToCache(SCatalog *pCtg, SCtgDBCache *dbCache, SCtgTbCache * } } +void ctgReleaseTSMAToCache(SCatalog* pCtg, SCtgDBCache* dbCache, SCtgTSMACache* pCache) { + if (pCache && dbCache) { + CTG_UNLOCK(CTG_READ, &pCache->tsmaLock); + taosHashRelease(dbCache->tsmaCache, pCache); + } + + if (dbCache) { + ctgReleaseDBCache(pCtg, dbCache); + } +} + int32_t ctgAcquireVgInfoFromCache(SCatalog *pCtg, const char *dbFName, SCtgDBCache **pCache) { SCtgDBCache *dbCache = NULL; ctgAcquireDBCache(pCtg, dbFName, &dbCache); @@ -1381,6 +1395,13 @@ int32_t ctgAddNewDBCache(SCatalog *pCtg, const char *dbFName, uint64_t dbId) { CTG_ERR_RET(TSDB_CODE_OUT_OF_MEMORY); } + newDBCache.tsmaCache = taosHashInit(gCtgMgmt.cfg.maxTSMACacheNum, taosGetDefaultHashFunction(TSDB_DATA_TYPE_BINARY), + true, HASH_ENTRY_LOCK); + if (!newDBCache.tsmaCache) { + ctgError("taosHashInit %d tsmaCache failed", gCtgMgmt.cfg.maxTSMACacheNum); + CTG_ERR_RET(TSDB_CODE_OUT_OF_MEMORY); + } + code = taosHashPut(pCtg->dbCache, dbFName, strlen(dbFName), &newDBCache, sizeof(SCtgDBCache)); if (code) { if (HASH_NODE_EXIST(code)) { @@ -1424,6 +1445,7 @@ int32_t ctgRemoveDBFromCache(SCatalog *pCtg, SCtgDBCache *dbCache, const char *d atomic_store_8(&dbCache->deleted, 1); ctgRemoveStbRent(pCtg, dbCache); ctgRemoveViewRent(pCtg, dbCache); + ctgRemoveTSMARent(pCtg, dbCache); ctgFreeDbCache(dbCache); CTG_UNLOCK(CTG_WRITE, &dbCache->dbLock); @@ -2074,7 +2096,8 @@ int32_t ctgOpDropStbMeta(SCtgCacheOperation *operation) { } tblType = pTbCache->pMeta->tableType; - atomic_sub_fetch_64(&dbCache->dbCacheSize, ctgGetTbMetaCacheSize(pTbCache->pMeta) + ctgGetTbIndexCacheSize(pTbCache->pIndex)); + atomic_sub_fetch_64(&dbCache->dbCacheSize, + ctgGetTbMetaCacheSize(pTbCache->pMeta) + ctgGetTbIndexCacheSize(pTbCache->pIndex)); ctgFreeTbCacheImpl(pTbCache, true); if (taosHashRemove(dbCache->tbCache, msg->stbName, strlen(msg->stbName))) { @@ -2126,7 +2149,8 @@ int32_t ctgOpDropTbMeta(SCtgCacheOperation *operation) { } tblType = pTbCache->pMeta->tableType; - atomic_sub_fetch_64(&dbCache->dbCacheSize, ctgGetTbMetaCacheSize(pTbCache->pMeta) + ctgGetTbIndexCacheSize(pTbCache->pIndex)); + atomic_sub_fetch_64(&dbCache->dbCacheSize, ctgGetTbMetaCacheSize(pTbCache->pMeta) + + ctgGetTbIndexCacheSize(pTbCache->pIndex)); ctgFreeTbCacheImpl(pTbCache, true); if (taosHashRemove(dbCache->tbCache, msg->tbName, strlen(msg->tbName))) { @@ -2554,6 +2578,7 @@ void ctgFreeCacheOperationData(SCtgCacheOperation *op) { case CTG_OP_UPDATE_VG_EPSET: case CTG_OP_DROP_TB_INDEX: case CTG_OP_DROP_VIEW_META: + case CTG_OP_DROP_TB_TSMA: case CTG_OP_CLEAR_CACHE: { taosMemoryFreeClear(op->data); break; @@ -2582,6 +2607,14 @@ void ctgFreeCacheOperationData(SCtgCacheOperation *op) { taosMemoryFreeClear(op->data); break; } + case CTG_OP_UPDATE_TB_TSMA: { + SCtgUpdateTbTSMAMsg *msg = op->data; + if (msg->pTsma) { + tFreeTableTSMAInfo(msg->pTsma); + taosMemoryFreeClear(msg->pTsma); + } + break; + } default: { qError("invalid cache op id:%d", op->opId); break; @@ -3136,5 +3169,361 @@ int32_t ctgGetViewsFromCache(SCatalog *pCtg, SRequestConnInfo *pConn, SCtgViewsC return TSDB_CODE_SUCCESS; } +void ctgReleaseTbTSMAToCache(SCatalog *pCtg, SCtgDBCache *dbCache, SCtgTbCache *pCache) { + if (pCache) { + CTG_UNLOCK(CTG_READ, &pCache->tsmaLock); + taosHashRelease(dbCache->tbCache, pCache); + } + if (dbCache) { + ctgReleaseDBCache(pCtg, dbCache); + } +} +#if 0 +int32_t ctgAcquireTbTSMAFromCache(SCatalog *pCtg, char *dbFName, char *tbName, SCtgDBCache **pDb, SCtgTbCache **pTb) { + SCtgDBCache *dbCache = NULL; + SCtgTbCache *pCache = NULL; + ctgAcquireDBCache(pCtg, dbFName, &dbCache); + if (NULL == dbCache) { + ctgDebug("db %s not in cache", dbFName); + goto _return; + } + + int32_t sz = 0; + pCache = taosHashAcquire(dbCache->tbCache, tbName, strlen(tbName)); + if (NULL == pCache) { + ctgDebug("tb %s not in cache, dbFName:%s", tbName, dbFName); + goto _return; + } + + CTG_LOCK(CTG_READ, &pCache->tsmaLock); + if (NULL == pCache->pTsmas) { + ctgDebug("tb %s tsma not in cache, dbFName:%s", tbName, dbFName); + goto _return; + } + + *pDb = dbCache; + *pTb = pCache; + + ctgDebug("tb %s tsma got in cache, dbFName:%s", tbName, dbFName); + + CTG_CACHE_HIT_INC(CTG_CI_TBL_TSMA, 1); + + return TSDB_CODE_SUCCESS; + +_return: + + ctgReleaseTbTSMAToCache(pCtg, dbCache, pCache); + + CTG_CACHE_NHIT_INC(CTG_CI_TBL_TSMA, 1); + + return TSDB_CODE_SUCCESS; +} +#endif + +int32_t ctgGetTbTSMAFromCache(SCatalog* pCtg, SCtgTbTSMACtx* pCtx, int32_t dbIdx, int32_t* fetchIdx, int32_t baseResIdx, + SArray* pList) { + int32_t code = 0; + SCtgDBCache * dbCache = NULL; + SCtgTSMACache *pCache = NULL; + char dbFName[TSDB_DB_FNAME_LEN] = {0}; + int32_t flag = CTG_FLAG_UNKNOWN_STB; + uint64_t lastSuid = 0; + STableMeta * lastTableMeta = NULL; + SName * pName = taosArrayGet(pList, 0); + int32_t tbNum = taosArrayGetSize(pList); + + // TODO test sys db + if (IS_SYS_DBNAME(pName->dbname)) { + return TSDB_CODE_SUCCESS; + } + tNameGetFullDbName(pName, dbFName); + + ctgAcquireDBCache(pCtg, dbFName, &dbCache); + if (!dbCache) { + ctgDebug("DB %s not in cache", dbFName); + for (int32_t i = 0; i < tbNum; ++i) { + ctgAddFetch(&pCtx->pFetches, dbIdx, i, fetchIdx, baseResIdx + i, flag); + taosArrayPush(pCtx->pResList, &(SMetaData){0}); + } + return TSDB_CODE_SUCCESS; + } + + for (int32_t i = 0; i < tbNum; ++i) { + pName = taosArrayGet(pList, i); + pCache = taosHashAcquire(dbCache->tsmaCache, pName->tname, strlen(pName->tname)); + if (!pCache) { + ctgDebug("tsma for tb: %s.%s not in cache", dbFName, pName->tname); + ctgAddFetch(&pCtx->pFetches, dbIdx, i, fetchIdx, baseResIdx + i, flag); + taosArrayPush(pCtx->pResList, &(SMetaRes){0}); + CTG_CACHE_NHIT_INC(CTG_CI_TBL_SMA, 1); + continue; + } + + CTG_LOCK(CTG_READ, &pCache->tsmaLock); + if (!pCache->pTsmas) { + CTG_UNLOCK(CTG_READ, &pCache->tsmaLock); + taosHashRelease(dbCache->tsmaCache, pCache); + ctgDebug("tsma for tb: %s.%s not in cache", pName->tname, dbFName); + ctgAddFetch(&pCtx->pFetches, dbIdx, i, fetchIdx, baseResIdx + i, flag); + taosArrayPush(pCtx->pResList, &(SMetaRes){0}); + CTG_CACHE_NHIT_INC(CTG_CI_TBL_TSMA, 1); + continue; + } + + CTG_CACHE_HIT_INC(CTG_CI_TBL_TSMA, 1); + + STableTSMAInfoRsp rsp; + rsp.pTsmas = taosArrayInit(pCache->pTsmas->size, POINTER_BYTES); + if (!rsp.pTsmas) { + ctgReleaseTSMAToCache(pCtg, dbCache, pCache); + CTG_ERR_RET(TSDB_CODE_OUT_OF_MEMORY); + } + SMetaRes res = {0}; + for (int32_t i = 0; i < pCache->pTsmas->size; ++i) { + STSMACache *pTsmaOut = NULL; + STSMACache *pTsmaCache = taosArrayGetP(pCache->pTsmas, i); + code = ctgCloneTbTSMA(pTsmaCache, &pTsmaOut); + if (code) { + ctgReleaseTSMAToCache(pCtg, dbCache, pCache); + tFreeTableTSMAInfoRsp(&rsp); + CTG_ERR_RET(code); + } + taosArrayPush(rsp.pTsmas, &pTsmaOut); + } + res.pRes = rsp.pTsmas; + taosArrayPush(pCtx->pResList, &res); + taosHashRelease(dbCache->tsmaCache, pCache); + } + ctgReleaseDBCache(pCtg, dbCache); + CTG_RET(code); +} + +int32_t ctgUpdateTbTSMAEnqueue(SCatalog *pCtg, STSMACache **pTsma, bool syncOp) { + int32_t code = 0; + SCtgCacheOperation *op = taosMemoryCalloc(1, sizeof(SCtgCacheOperation)); + op->opId = CTG_OP_UPDATE_TB_TSMA; + op->syncOp = syncOp; + + SCtgUpdateTbTSMAMsg *msg = taosMemoryMalloc(sizeof(SCtgUpdateTbTSMAMsg)); + if (NULL == msg) { + ctgError("malloc %d failed", (int32_t)sizeof(SCtgUpdateTbTSMAMsg)); + taosMemoryFree(op); + CTG_ERR_JRET(TSDB_CODE_OUT_OF_MEMORY); + } + + msg->pCtg = pCtg; + msg->pTsma = *pTsma; + + op->data = msg; + + CTG_ERR_JRET(ctgEnqueue(pCtg, op)); + + *pTsma = NULL; + return TSDB_CODE_SUCCESS; + +_return: + CTG_RET(code); +} + +int32_t ctgDropTbTSMAEnqueue(SCatalog* pCtg, const STSMACache* pTsma, bool syncOp) { + int32_t code = 0; + SCtgCacheOperation* op = taosMemoryCalloc(1, sizeof(SCtgCacheOperation)); + if (!op) CTG_ERR_JRET(TSDB_CODE_OUT_OF_MEMORY); + + op->opId = CTG_OP_DROP_TB_TSMA; + op->syncOp = syncOp; + + SCtgDropTbTSMAMsg* msg = taosMemoryMalloc(sizeof(SCtgDropTbTSMAMsg)); + if (!msg) { + ctgError("malloc %d failed", (int32_t)sizeof(SCtgDropTbTSMAMsg)); + taosMemoryFree(op); + CTG_ERR_JRET(TSDB_CODE_OUT_OF_MEMORY); + } + + msg->pCtg = pCtg; + msg->dbId = pTsma->dbId; + msg->tbId = pTsma->suid; + msg->tsmaId = pTsma->tsmaId; + tstrncpy(msg->dbFName, pTsma->dbFName, TSDB_DB_FNAME_LEN); + // TODO use table name len, instead of TSDB_TABLE_FNAME_LEN + tstrncpy(msg->tbName, pTsma->tb, TSDB_TABLE_NAME_LEN); + tstrncpy(msg->tsmaName, pTsma->name, TSDB_TABLE_NAME_LEN); + + op->data = msg; + CTG_ERR_JRET(ctgEnqueue(pCtg, op)); + return TSDB_CODE_SUCCESS; +_return: + CTG_RET(code); +} + +int32_t ctgDropTSMAForTbEnqueue(SCatalog *pCtg, SName *pName, bool syncOp) { + int32_t code = 0; + SCtgCacheOperation* op = taosMemoryCalloc(1, sizeof(SCtgCacheOperation)); + if (!op) CTG_ERR_JRET(TSDB_CODE_OUT_OF_MEMORY); + op->opId = CTG_OP_DROP_TB_TSMA; + op->syncOp = syncOp; + + SCtgDropTbTSMAMsg* msg = taosMemoryMalloc(sizeof(SCtgDropTbTSMAMsg)); + if (!msg) { + ctgError("malloc %d failed", (int32_t)sizeof(SCtgDropTbTSMAMsg)); + taosMemoryFree(op); + CTG_ERR_JRET(TSDB_CODE_OUT_OF_MEMORY); + } + + msg->pCtg = pCtg; + msg->dbId = 0; + msg->tbId = 0; + msg->tsmaId = 0; + msg->tsmaName[0] = '\0'; + tNameGetFullDbName(pName, msg->dbFName); + tstrncpy(msg->tbName, pName->tname, TSDB_TABLE_NAME_LEN); + + op->data = msg; + + CTG_ERR_JRET(ctgEnqueue(pCtg, op)); + return TSDB_CODE_SUCCESS; + +_return: + CTG_RET(code); +} + +int32_t ctgWriteTbTSMAToCache(SCatalog *pCtg, SCtgDBCache *dbCache, char *dbFName, char *tbName, + STSMACache **ppTsmaCache) { + if (NULL == dbCache->tsmaCache) { + ctgError("db is dropping, dbId:0x%" PRIx64, dbCache->dbId); + CTG_ERR_RET(TSDB_CODE_CTG_DB_DROPPED); + } + + STSMACache *pTsmaCache = *ppTsmaCache; + int32_t code = TSDB_CODE_SUCCESS; + + SCtgTSMACache* pCache = taosHashGet(dbCache->tsmaCache, tbName, strlen(tbName)); + if (!pCache) { + SCtgTSMACache cache = {0}; + cache.pTsmas = taosArrayInit(4, sizeof(POINTER_BYTES)); + if (!cache.pTsmas) CTG_ERR_JRET(TSDB_CODE_OUT_OF_MEMORY); + taosArrayPush(cache.pTsmas, &pTsmaCache); + if (taosHashPut(dbCache->tsmaCache, tbName, strlen(tbName), &cache, sizeof(cache))) { + ctgError("taosHashPut new tsmacache for tb: %s.%s failed", dbFName, tbName); + CTG_ERR_JRET(TSDB_CODE_OUT_OF_MEMORY); + } + atomic_add_fetch_64(&dbCache->dbCacheSize, strlen(tbName) + sizeof(STSMACache) + ctgGetTbTSMACacheSize(pTsmaCache)); + CTG_DB_NUM_INC(CTG_CI_TBL_TSMA); + ctgDebug("tb %s tsma updated to cache, name: %s", tbName, pTsmaCache->name); + CTG_ERR_JRET(ctgUpdateRentTSMAVersion(pCtg, dbFName, pTsmaCache)); + *ppTsmaCache = NULL; + goto _return; + } + + CTG_LOCK(CTG_WRITE, &pCache->tsmaLock); + + if (pCache->pTsmas) { + uint64_t cacheSize = 0; + for (int32_t i = 0; i < pCache->pTsmas->size; ++i) { + STableTSMAInfo* pInfo = taosArrayGetP(pCache->pTsmas, i); + if (pInfo->tsmaId == pTsmaCache->tsmaId) { + cacheSize = ctgGetTbTSMACacheSize(pInfo); + taosArrayRemove(pCache->pTsmas, i); + atomic_sub_fetch_64(&dbCache->dbCacheSize, cacheSize); + tFreeTableTSMAInfo(pInfo); + taosMemoryFreeClear(pInfo); + break; + } + } + } else { + pCache->pTsmas = taosArrayInit(4, sizeof(POINTER_BYTES)); + if (!pCache->pTsmas) { + CTG_UNLOCK(CTG_WRITE, &pCache->tsmaLock); + CTG_ERR_JRET(TSDB_CODE_OUT_OF_MEMORY); + } + } + // push the new cache + taosArrayPush(pCache->pTsmas, &pTsmaCache); + *ppTsmaCache = NULL; + + atomic_add_fetch_64(&dbCache->dbCacheSize, ctgGetTbTSMACacheSize(pTsmaCache)); + CTG_ERR_RET(ctgUpdateRentTSMAVersion(pCtg, dbFName, pTsmaCache)); + CTG_UNLOCK(CTG_WRITE, &pCache->tsmaLock); + ctgDebug("table %s tsma updated to cache, tsma: %s", tbName, pTsmaCache->name); +_return: + CTG_RET(code); +} + +int32_t ctgOpDropTbTSMA(SCtgCacheOperation *operation) { + int32_t code = 0; + SCtgDropTbTSMAMsg * msg = operation->data; + SCatalog *pCtg = msg->pCtg; + SCtgDBCache *dbCache = NULL; + + if (pCtg->stopUpdate) { + goto _return; + } + + CTG_ERR_JRET(ctgGetDBCache(pCtg, msg->dbFName, &dbCache)); + if (NULL == dbCache || !dbCache->tsmaCache || (msg->dbId != dbCache->dbId && msg->dbId != 0)) { + goto _return; + } + + SCtgTSMACache* pCtgCache = taosHashGet(dbCache->tsmaCache, msg->tbName, strlen(msg->tbName)); + if (!pCtgCache || !pCtgCache->pTsmas || pCtgCache->pTsmas->size == 0) { + goto _return; + } + + CTG_LOCK(CTG_READ, &pCtgCache->tsmaLock); + STSMACache *pCache = taosArrayGetP(pCtgCache->pTsmas, 0); + uint64_t cacheSize = 0; + if (msg->tbId != 0 && pCache->suid != msg->tbId) { + // table id mismatch, skip drops + CTG_UNLOCK(CTG_READ, &pCtgCache->tsmaLock); + goto _return; + } + for (int32_t i = 0; i < pCtgCache->pTsmas->size; ++i) { + pCache = taosArrayGetP(pCtgCache->pTsmas, i); + if (pCache->tsmaId != msg->tsmaId) { + continue; + } + cacheSize = ctgGetTbTSMACacheSize(pCache); + CTG_ERR_JRET(ctgMetaRentRemove(&msg->pCtg->tsmaRent, pCache->tsmaId, ctgTSMAVersionSearchCompare, + ctgTSMAVersionSearchCompare)); + taosArrayRemove(pCtgCache->pTsmas, i); + tFreeAndClearTableTSMAInfo(pCache); + CTG_DB_NUM_DEC(CTG_CI_TBL_TSMA); + break; + } + CTG_UNLOCK(CTG_READ, &pCtgCache->tsmaLock); + //taosHashRemove(dbCache->tsmaCache, msg->tbName, strlen(msg->tbName)); + atomic_sub_fetch_64(&dbCache->dbCacheSize, cacheSize); + +_return: + + taosMemoryFreeClear(msg); + CTG_RET(code); +} + +int32_t ctgOpUpdateTbTSMA(SCtgCacheOperation *operation) { + int32_t code = 0; + SCtgUpdateTbTSMAMsg *msg = operation->data; + SCatalog * pCtg = msg->pCtg; + STableTSMAInfo * pTsmaInfo = msg->pTsma; + SCtgDBCache * dbCache = NULL; + + if (pCtg->stopUpdate) { + goto _return; + } + + CTG_ERR_JRET(ctgGetAddDBCache(pCtg, pTsmaInfo->dbFName, pTsmaInfo->dbId, &dbCache)); + + CTG_ERR_JRET(ctgWriteTbTSMAToCache(pCtg, dbCache, pTsmaInfo->dbFName, pTsmaInfo->tb, &pTsmaInfo)); + +_return: + + if (pTsmaInfo) { + tFreeTableTSMAInfo(pTsmaInfo); + taosMemoryFreeClear(pTsmaInfo); + } + + taosMemoryFreeClear(msg); + CTG_RET(code); +} diff --git a/source/libs/catalog/src/ctgRemote.c b/source/libs/catalog/src/ctgRemote.c index f374c7fe6e..430fb31354 100644 --- a/source/libs/catalog/src/ctgRemote.c +++ b/source/libs/catalog/src/ctgRemote.c @@ -337,6 +337,23 @@ int32_t ctgProcessRspMsg(void* out, int32_t reqType, char* msg, int32_t msgSize, qDebug("Got view-meta from mnode, viewFName:%s", target); break; } + case TDMT_MND_GET_TABLE_TSMA: { + if (TSDB_CODE_SUCCESS != rspCode) { + if (TSDB_CODE_MND_SMA_NOT_EXIST != rspCode) { + qError("error rsp for get table tsma, error:%s, tbFName:%s", tstrerror(rspCode), target); + } + CTG_ERR_RET(rspCode); + } + + code = queryProcessMsgRsp[TMSG_INDEX(reqType)](out, msg, msgSize); + if (code) { + qError("Process get table tsma rsp failed, error:%s, tbFName:%s", tstrerror(code), target); + CTG_ERR_RET(code); + } + + qDebug("Got table tsma from mnode, tbFName:%s", target); + break; + } default: if (TSDB_CODE_SUCCESS != rspCode) { qError("Got error rsp, error:%s", tstrerror(rspCode)); @@ -1463,4 +1480,58 @@ int32_t ctgGetViewInfoFromMnode(SCatalog* pCtg, SRequestConnInfo* pConn, SName* return TSDB_CODE_SUCCESS; } +int32_t ctgGetTbTSMAFromMnode(SCatalog* pCtg, SRequestConnInfo* pConn, SName* name, STableTSMAInfoRsp* out, + SCtgTaskReq* tReq) { + char* msg = NULL; + int32_t msgLen = 0; + int32_t reqType = TDMT_MND_GET_TABLE_TSMA; + SCtgTask* pTask = tReq->pTask; + void* (*mallocFp)(int64_t) = pTask ? (MallocType)taosMemoryMalloc : (MallocType)rpcMallocCont; + char tbFName[TSDB_TABLE_FNAME_LEN]; + tNameExtractFullName(name, tbFName); + + ctgDebug("try to get tb index from mnode, tbFName:%s", tbFName); + + int32_t code = queryBuildMsg[TMSG_INDEX(reqType)]((void*)tbFName, &msg, 0, &msgLen, mallocFp); + if (code) { + ctgError("Build get index msg failed, code:%s, tbFName:%s", tstrerror(code), tbFName); + CTG_ERR_RET(code); + } + + if (pTask) { + void* pOut = taosMemoryCalloc(1, sizeof(STableTSMAInfoRsp)); + if (NULL == pOut) { + CTG_ERR_RET(TSDB_CODE_OUT_OF_MEMORY); + } + + CTG_ERR_RET(ctgUpdateMsgCtx(CTG_GET_TASK_MSGCTX(pTask, -1), reqType, pOut, (char*)tbFName)); + +#if CTG_BATCH_FETCH + CTG_RET(ctgAddBatch(pCtg, 0, pConn, tReq, reqType, msg, msgLen)); +#else + SArray* pTaskId = taosArrayInit(1, sizeof(int32_t)); + if (NULL == pTaskId) { + CTG_ERR_RET(TSDB_CODE_OUT_OF_MEMORY); + } + taosArrayPush(pTaskId, &pTask->taskId); + + CTG_RET(ctgAsyncSendMsg(pCtg, pConn, pTask->pJob, pTaskId, -1, NULL, NULL, 0, reqType, msg, msgLen)); +#endif + } + + SRpcMsg rpcMsg = { + .msgType = reqType, + .pCont = msg, + .contLen = msgLen, + }; + + SRpcMsg rpcRsp = {0}; + rpcSendRecv(pConn->pTrans, &pConn->mgmtEps, &rpcMsg, &rpcRsp); + + CTG_ERR_RET(ctgProcessRspMsg(out, reqType, rpcRsp.pCont, rpcRsp.contLen, rpcRsp.code, (char*)tbFName)); + + rpcFreeCont(rpcRsp.pCont); + + return TSDB_CODE_SUCCESS; +} diff --git a/source/libs/catalog/src/ctgRent.c b/source/libs/catalog/src/ctgRent.c index a19eb19c02..90c41fb4b1 100755 --- a/source/libs/catalog/src/ctgRent.c +++ b/source/libs/catalog/src/ctgRent.c @@ -259,6 +259,24 @@ void ctgRemoveViewRent(SCatalog *pCtg, SCtgDBCache *dbCache) { } } +void ctgRemoveTSMARent(SCatalog *pCtg, SCtgDBCache *dbCache) { + if (!dbCache->tsmaCache) return; + + void* pIter = taosHashIterate(dbCache->tsmaCache, NULL); + while (pIter) { + SCtgTSMACache* pCtgCache = pIter; + CTG_LOCK(CTG_READ, &pCtgCache->tsmaLock); + int32_t size = pCtgCache ? pCtgCache->pTsmas->size : 0; + for (int32_t i = 0; i < size; ++i) { + STSMACache* pCache = taosArrayGet(pCtgCache->pTsmas, i); + if (TSDB_CODE_SUCCESS == ctgMetaRentRemove(&pCtg->tsmaRent, pCache->tsmaId, ctgTSMAVersionSortCompare, ctgTSMAVersionSearchCompare)) { + ctgDebug("tsma removed from rent, viewId: %" PRIx64 " name: %s.%s.%s", pCache->tsmaId, pCache->dbFName, pCache->tb, pCache->name); + } + } + CTG_UNLOCK(CTG_READ, &pCtgCache->tsmaLock); + pIter = taosHashIterate(dbCache->tsmaCache, pIter); + } +} int32_t ctgUpdateRentStbVersion(SCatalog *pCtg, char *dbFName, char *tbName, uint64_t dbId, uint64_t suid, SCtgTbCache *pCache) { @@ -300,3 +318,17 @@ int32_t ctgUpdateRentViewVersion(SCatalog *pCtg, char *dbFName, char *viewName, return TSDB_CODE_SUCCESS; } + +int32_t ctgUpdateRentTSMAVersion(SCatalog *pCtg, char *dbFName, const STSMACache *pCache) { + const STableTSMAInfo *pTsmaInfo = pCache; + STSMAVersion tsmaRent = {.dbId = pTsmaInfo->dbId, .tsmaId = pTsmaInfo->tsmaId, .version = pTsmaInfo->version}; + tstrncpy(tsmaRent.name, pTsmaInfo->name, TSDB_TABLE_NAME_LEN); + tstrncpy(tsmaRent.dbFName, dbFName, TSDB_DB_FNAME_LEN); + tstrncpy(tsmaRent.tbName, pTsmaInfo->tb, TSDB_TABLE_NAME_LEN); + CTG_ERR_RET(ctgMetaRentUpdate(&pCtg->tsmaRent, &tsmaRent, tsmaRent.tsmaId, sizeof(STSMAVersion), + ctgTSMAVersionSortCompare, ctgTSMAVersionSearchCompare)); + ctgDebug("db %s, 0x%" PRIx64 " tsma %s, 0x%" PRIx64 "version %d updated to tsmaRent", dbFName, tsmaRent.dbId, + pTsmaInfo->name, pTsmaInfo->tsmaId, pTsmaInfo->version); + + return TSDB_CODE_SUCCESS; +} diff --git a/source/libs/catalog/src/ctgUtil.c b/source/libs/catalog/src/ctgUtil.c index cacdfcb8d6..05518cae5c 100644 --- a/source/libs/catalog/src/ctgUtil.c +++ b/source/libs/catalog/src/ctgUtil.c @@ -190,6 +190,9 @@ void ctgFreeSMetaData(SMetaData* pData) { taosArrayDestroy(pData->pView); pData->pView = NULL; + taosArrayDestroy(pData->pTableTsmas); + pData->pTableTsmas = NULL; + taosMemoryFreeClear(pData->pSvrVer); } @@ -297,6 +300,31 @@ void ctgFreeTbCache(SCtgDBCache* dbCache) { dbCache->tbCache = NULL; } +void ctgFreeTSMACacheImpl(SCtgTSMACache* pCache, bool lock) { + if (lock) { + CTG_LOCK(CTG_WRITE, &pCache->tsmaLock); + } + if (pCache->pTsmas) { + taosArrayDestroyP(pCache->pTsmas, tFreeAndClearTableTSMAInfo); + pCache->pTsmas = NULL; + } + if (lock) { + CTG_UNLOCK(CTG_WRITE, &pCache->tsmaLock); + } +} + +void ctgFreeTSMACache(SCtgDBCache* dbCache) { + if (!dbCache) return; + + SCtgTSMACache* pCache = taosHashIterate(dbCache->tsmaCache, NULL); + while (pCache) { + ctgFreeTSMACacheImpl(pCache, false); + pCache = taosHashIterate(dbCache->tsmaCache, pCache); + } + taosHashCleanup(dbCache->tsmaCache); + dbCache->tsmaCache = NULL; +} + void ctgFreeVgInfoCache(SCtgDBCache* dbCache) { freeVgInfo(dbCache->vgCache.vgInfo); } void ctgFreeCfgInfoCache(SCtgDBCache* dbCache) { freeDbCfgInfo(dbCache->cfgCache.cfgInfo); } @@ -310,6 +338,7 @@ void ctgFreeDbCache(SCtgDBCache* dbCache) { ctgFreeStbMetaCache(dbCache); ctgFreeTbCache(dbCache); ctgFreeViewCache(dbCache); + ctgFreeTSMACache(dbCache); } void ctgFreeInstDbCache(SHashObj* pDbCache) { @@ -353,6 +382,7 @@ void ctgFreeHandleImpl(SCatalog* pCtg) { ctgFreeMetaRent(&pCtg->dbRent); ctgFreeMetaRent(&pCtg->stbRent); ctgFreeMetaRent(&pCtg->viewRent); + ctgFreeMetaRent(&pCtg->tsmaRent); ctgFreeInstDbCache(pCtg->dbCache); ctgFreeInstUserCache(pCtg->userCache); @@ -382,6 +412,7 @@ void ctgFreeHandle(SCatalog* pCtg) { ctgFreeMetaRent(&pCtg->dbRent); ctgFreeMetaRent(&pCtg->stbRent); ctgFreeMetaRent(&pCtg->viewRent); + ctgFreeMetaRent(&pCtg->tsmaRent); ctgFreeInstDbCache(pCtg->dbCache); ctgFreeInstUserCache(pCtg->userCache); @@ -410,7 +441,8 @@ void ctgClearHandleMeta(SCatalog* pCtg, int64_t *pClearedSize, int64_t *pCleardN } taosHashRemove(dbCache->tbCache, key, len); - cacheSize = len + sizeof(SCtgTbCache) + ctgGetTbMetaCacheSize(pCache->pMeta) + ctgGetTbIndexCacheSize(pCache->pIndex); + cacheSize = + len + sizeof(SCtgTbCache) + ctgGetTbMetaCacheSize(pCache->pMeta) + ctgGetTbIndexCacheSize(pCache->pIndex); atomic_sub_fetch_64(&dbCache->dbCacheSize, cacheSize); *pClearedSize += cacheSize; (*pCleardNum)++; @@ -468,6 +500,7 @@ void ctgClearHandle(SCatalog* pCtg) { ctgFreeMetaRent(&pCtg->dbRent); ctgFreeMetaRent(&pCtg->stbRent); ctgFreeMetaRent(&pCtg->viewRent); + ctgFreeMetaRent(&pCtg->tsmaRent); ctgFreeInstDbCache(pCtg->dbCache); ctgFreeInstUserCache(pCtg->userCache); @@ -592,6 +625,13 @@ void ctgFreeMsgCtx(SCtgMsgCtx* pCtx) { } break; } + case TDMT_MND_GET_TABLE_TSMA: { + if (pCtx->out) { + tFreeTableTSMAInfoRsp(pCtx->out); + taosMemoryFreeClear(pCtx->out); + } + break; + } default: qError("invalid reqType %d", pCtx->reqType); break; @@ -663,6 +703,20 @@ void ctgFreeViewMetaRes(void* res) { } } +void ctgFreeTbTSMARes(void* res) { + if (!res) { + return; + } + + SMetaRes* pRes = res; + if (pRes->pRes) { + STableTSMAInfoRsp * pTsmaRsp = pRes->pRes; + tFreeTableTSMAInfoRsp(pTsmaRsp); + taosMemoryFree(pTsmaRsp); + pRes->pRes = NULL; + } +} + void ctgFreeJsonTagVal(void* val) { if (NULL == val) { return; @@ -760,6 +814,15 @@ void ctgFreeTaskRes(CTG_TASK_TYPE type, void** pRes) { *pRes = NULL; // no need to free it break; } + case CTG_TASK_GET_TB_TSMA: { + SArray* pArr = (SArray*)*pRes; + int32_t num = taosArrayGetSize(pArr); + for (int32_t i = 0; i < num; ++i) { + ctgFreeTbTSMARes(taosArrayGet(pArr, i)); + } + *pRes = NULL; + break; + } default: qError("invalid task type %d", type); break; @@ -922,7 +985,15 @@ void ctgFreeTaskCtx(SCtgTask* pTask) { taosMemoryFreeClear(pTask->taskCtx); break; - } + } + case CTG_TASK_GET_TB_TSMA: { + SCtgTbTSMACtx* pTsmaCtx = pTask->taskCtx; + taosArrayDestroyEx(pTsmaCtx->pResList, ctgFreeTbTSMARes); + taosArrayDestroy(pTsmaCtx->pFetches); + taosArrayDestroyEx(pTask->msgCtxs, (FDelete)ctgFreeMsgCtx); + taosMemoryFreeClear(pTask->taskCtx); + break; + } default: qError("invalid task type %d", pTask->type); break; @@ -1328,6 +1399,15 @@ int32_t ctgViewVersionSearchCompare(const void* key1, const void* key2) { } } +int32_t ctgTSMAVersionSearchCompare(const void* key1, const void* key2) { + if (*(uint64_t*)key1 < ((STSMAVersion*)key2)->tsmaId) { + return -1; + } else if (*(uint64_t*)key1 > ((STSMAVersion*)key2)->tsmaId) { + return 1; + } else { + return 0; + } +} int32_t ctgStbVersionSortCompare(const void* key1, const void* key2) { if (((SSTableVersion*)key1)->suid < ((SSTableVersion*)key2)->suid) { @@ -1359,6 +1439,15 @@ int32_t ctgViewVersionSortCompare(const void* key1, const void* key2) { } } +int32_t ctgTSMAVersionSortCompare(const void* key1, const void* key2) { + if (((STSMAVersion*)key1)->tsmaId < ((STSMAVersion*)key2)->tsmaId) { + return -1; + } else if (((STSMAVersion*)key1)->tsmaId > ((STSMAVersion*)key2)->tsmaId) { + return 1; + } else { + return 0; + } +} int32_t ctgMakeVgArray(SDBVgInfo* dbInfo) { if (NULL == dbInfo) { @@ -1657,6 +1746,10 @@ static void ctgFreeViewMeta(void* p) { taosMemoryFree(pMeta); } +void ctgFreeTbTSMAInfo(void* p) { + tFreeTableTSMAInfoRsp(((SMetaRes*)p)->pRes); + taosMemoryFree(((SMetaRes*)p)->pRes); +} int32_t ctgChkSetTbAuthRes(SCatalog* pCtg, SCtgAuthReq* req, SCtgAuthRsp* res) { int32_t code = 0; @@ -1990,6 +2083,7 @@ void ctgDestroySMetaData(SMetaData* pData) { taosArrayDestroyEx(pData->pTableCfg, ctgFreeTableCfg); taosArrayDestroyEx(pData->pDnodeList, ctgFreeDnodeList); taosArrayDestroyEx(pData->pView, ctgFreeViewMeta); + taosArrayDestroyEx(pData->pTableTsmas, ctgFreeTbTSMAInfo); taosMemoryFreeClear(pData->pSvrVer); } @@ -2287,5 +2381,22 @@ int32_t dupViewMetaFromRsp(SViewMetaRsp* pRsp, SViewMeta* pViewMeta) { return TSDB_CODE_SUCCESS; } +uint64_t ctgGetTbTSMACacheSize(STableTSMAInfo* pTsmaInfo) { + return 0; +} +int32_t ctgCloneTbTSMA(STSMACache* pInfo, STSMACache** pRes) { + int32_t code = TSDB_CODE_SUCCESS; + if (NULL == pInfo) { + return TSDB_CODE_SUCCESS; + } + STSMACache* pCache = taosMemoryCalloc(1, sizeof(STSMACache)); + if (!pCache) return TSDB_CODE_OUT_OF_MEMORY; + *pCache = *pInfo; + if (pInfo->pFuncs) { + pCache->pFuncs = taosArrayDup(pInfo->pFuncs, NULL); + } + *pRes = pCache; + return code; +} diff --git a/source/libs/function/inc/builtins.h b/source/libs/function/inc/builtins.h index af33c3ffa2..8c07a9d530 100644 --- a/source/libs/function/inc/builtins.h +++ b/source/libs/function/inc/builtins.h @@ -47,6 +47,7 @@ typedef struct SBuiltinFuncDefinition { const char* pPartialFunc; const char* pMiddleFunc; const char* pMergeFunc; + const char* pStateFunc; FCreateMergeFuncParameters createMergeParaFuc; FEstimateReturnRows estimateReturnRowsFunc; } SBuiltinFuncDefinition; diff --git a/source/libs/function/src/builtins.c b/source/libs/function/src/builtins.c index 583255bd20..80fd21d179 100644 --- a/source/libs/function/src/builtins.c +++ b/source/libs/function/src/builtins.c @@ -460,6 +460,18 @@ static int32_t translateAvgMerge(SFunctionNode* pFunc, char* pErrBuf, int32_t le return TSDB_CODE_SUCCESS; } +static int32_t translateAvgState(SFunctionNode* pFunc, char* pErrBuf, int32_t len) { + // TODO check params + pFunc->node.resType = (SDataType){.bytes = getAvgInfoSize() + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_BINARY}; + return TSDB_CODE_SUCCESS; +} + +static int32_t translateAvgStateMerge(SFunctionNode* pFunc, char* pErrBuf, int32_t len) { + // TODO check params + pFunc->node.resType = (SDataType){.bytes = getAvgInfoSize() + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_BINARY}; + return TSDB_CODE_SUCCESS; +} + static int32_t translateStddevPartial(SFunctionNode* pFunc, char* pErrBuf, int32_t len) { if (1 != LIST_LENGTH(pFunc->pParameterList)) { return invaildFuncParaNumErrMsg(pErrBuf, len, pFunc->functionName); @@ -2540,7 +2552,8 @@ const SBuiltinFuncDefinition funcMgtBuiltins[] = { .combineFunc = avgCombine, .pPartialFunc = "_avg_partial", .pMiddleFunc = "_avg_middle", - .pMergeFunc = "_avg_merge" + .pMergeFunc = "_avg_merge", + .pStateFunc = "_avg_state", }, { .name = "_avg_partial", @@ -3824,7 +3837,34 @@ const SBuiltinFuncDefinition funcMgtBuiltins[] = { .initFunc = NULL, .sprocessFunc = qPseudoTagFunction, .finalizeFunc = NULL - } + }, + { + + //TODO test for child table + //TODO for outer use not only internal + .name = "_avg_state", + .type = FUNCTION_TYPE_AVG_STATE, + .classification = FUNC_MGT_AGG_FUNC, + .translateFunc = translateAvgState, + //.dataRequiredFunc = statisDataRequired, + .getEnvFunc = getAvgFuncEnv, + .initFunc = avgFunctionSetup, + .processFunc = avgFunction, + .finalizeFunc = avgPartialFinalize, + //.combineFunc = avgCombine, + .pPartialFunc = "_avg_partial", + .pMergeFunc = "_avg_state_merge" + }, + { + .name = "_avg_state_merge", + .type = FUNCTION_TYPE_AVG_STATE_MERGE, + .classification = FUNC_MGT_AGG_FUNC, + .translateFunc = translateAvgStateMerge, + .getEnvFunc = getAvgFuncEnv, + .initFunc = avgFunctionSetup, + .processFunc = avgFunctionMerge, + .finalizeFunc = avgPartialFinalize, + }, }; // clang-format on diff --git a/source/libs/function/src/functionMgt.c b/source/libs/function/src/functionMgt.c index 6f4949cf26..686ed4b7a8 100644 --- a/source/libs/function/src/functionMgt.c +++ b/source/libs/function/src/functionMgt.c @@ -520,3 +520,50 @@ char* fmGetFuncName(int32_t funcId) { } return taosStrdup(funcMgtBuiltins[funcId].name); } + +/// @param [out] pStateFunc, not changed if error occured or no need to create state func +/// @retval 0 for succ, otherwise err occured +static int32_t fmCreateStateFunc(const SFunctionNode* pFunc, SFunctionNode** pStateFunc) { + if (funcMgtBuiltins[pFunc->funcId].pStateFunc) { + SNodeList* pParams = nodesCloneList(pFunc->pParameterList); + if (!pParams) return TSDB_CODE_OUT_OF_MEMORY; + *pStateFunc = createFunction(funcMgtBuiltins[pFunc->funcId].pStateFunc, pParams); + if (!pStateFunc) { + nodesDestroyList(pParams); + return TSDB_CODE_FUNC_FUNTION_ERROR; + } + strcpy((*pStateFunc)->node.aliasName, pFunc->node.aliasName); + strcpy((*pStateFunc)->node.userAlias, pFunc->node.userAlias); + } + return TSDB_CODE_SUCCESS; +} + +bool fmIsTSMASupportedFunc(func_id_t funcid) { + return fmIsAggFunc(funcid) && !fmIsForbidStreamFunc(funcid); +} + +int32_t rewriteFuncsForTSMA(SNodeList* pFuncs) { + int32_t code; + SNode* pNode; + char buf[128] = {0}; + FOREACH(pNode, pFuncs) { + SFunctionNode* pFunc = (SFunctionNode*)pNode; + code = fmGetFuncInfo(pFunc, buf, 128); + if (code) break; + if (fmIsTSMASupportedFunc(pFunc->funcId)) { + SFunctionNode* pNewFunc = NULL; + code = fmCreateStateFunc(pFunc, &pNewFunc); + if (code) { + // error + break; + } else if (!pNewFunc) { + // no need state func + continue; + } else { + REPLACE_NODE(pNewFunc); + nodesDestroyNode(pNode); + } + } + } + return code; +} diff --git a/source/libs/nodes/src/nodesCodeFuncs.c b/source/libs/nodes/src/nodesCodeFuncs.c index 39d6b061b3..cb0517bbc2 100644 --- a/source/libs/nodes/src/nodesCodeFuncs.c +++ b/source/libs/nodes/src/nodesCodeFuncs.c @@ -7367,6 +7367,7 @@ static int32_t createTSMAStmtToJson(const void* pObj, SJson* pJson) { if (TSDB_CODE_SUCCESS == code) { code = tjsonAddObject(pJson, jkCreateTSMAStmtpOptions, nodeToJson, pNode->pOptions); } + return code; } static int32_t jsonToCreateTSMAStmt(const SJson* pJson, void* pObj) { @@ -7382,7 +7383,7 @@ static int32_t jsonToCreateTSMAStmt(const SJson* pJson, void* pObj) { code = tjsonGetStringValue(pJson, jkCreateTSMAStmtTableName, pNode->tableName); } if (TSDB_CODE_SUCCESS == code) { - code = jsonToNodeObject(pJson, jkCreateTSMAStmtpOptions, &pNode->pOptions); + code = jsonToNodeObject(pJson, jkCreateTSMAStmtpOptions, (SNode**)&pNode->pOptions); } return code; } diff --git a/source/libs/nodes/src/nodesUtilFuncs.c b/source/libs/nodes/src/nodesUtilFuncs.c index 815dae11b0..3da5ba9370 100644 --- a/source/libs/nodes/src/nodesUtilFuncs.c +++ b/source/libs/nodes/src/nodesUtilFuncs.c @@ -519,6 +519,7 @@ SNode* nodesMakeNode(ENodeType type) { case QUERY_NODE_SHOW_GRANTS_FULL_STMT: case QUERY_NODE_SHOW_GRANTS_LOGS_STMT: case QUERY_NODE_SHOW_CLUSTER_MACHINES_STMT: + case QUERY_NODE_SHOW_TSMAS_STMT: return makeNode(type, sizeof(SShowStmt)); case QUERY_NODE_SHOW_TABLE_TAGS_STMT: return makeNode(type, sizeof(SShowTableTagsStmt)); @@ -561,6 +562,12 @@ SNode* nodesMakeNode(ENodeType type) { return makeNode(type, sizeof(SCreateViewStmt)); case QUERY_NODE_DROP_VIEW_STMT: return makeNode(type, sizeof(SDropViewStmt)); + case QUERY_NODE_CREATE_TSMA_STMT: + return makeNode(type, sizeof(SCreateTSMAStmt)); + case QUERY_NODE_DROP_TSMA_STMT: + return makeNode(type, sizeof(SDropTSMAStmt)); + case QUERY_NODE_TSMA_OPTIONS: + return makeNode(type, sizeof(STSMAOptions)); case QUERY_NODE_LOGIC_PLAN_SCAN: return makeNode(type, sizeof(SScanLogicNode)); case QUERY_NODE_LOGIC_PLAN_JOIN: @@ -910,6 +917,13 @@ void nodesDestroyNode(SNode* pNode) { nodesDestroyNode(pOptions->pDeleteMark); break; } + case QUERY_NODE_TSMA_OPTIONS: { + STSMAOptions* pOptions = (STSMAOptions*)pNode; + nodesDestroyList(pOptions->pCols); + nodesDestroyList(pOptions->pFuncs); + nodesDestroyNode(pOptions->pInterval); + break; + } case QUERY_NODE_LEFT_VALUE: // no pointer field case QUERY_NODE_COLUMN_REF: // no pointer field break; @@ -1184,7 +1198,8 @@ void nodesDestroyNode(SNode* pNode) { case QUERY_NODE_SHOW_VIEWS_STMT: case QUERY_NODE_SHOW_GRANTS_FULL_STMT: case QUERY_NODE_SHOW_GRANTS_LOGS_STMT: - case QUERY_NODE_SHOW_CLUSTER_MACHINES_STMT: { + case QUERY_NODE_SHOW_CLUSTER_MACHINES_STMT: + case QUERY_NODE_SHOW_TSMAS_STMT: { SShowStmt* pStmt = (SShowStmt*)pNode; nodesDestroyNode(pStmt->pDbName); nodesDestroyNode(pStmt->pTbName); @@ -1271,6 +1286,11 @@ void nodesDestroyNode(SNode* pNode) { } case QUERY_NODE_DROP_VIEW_STMT: break; + case QUERY_NODE_CREATE_TSMA_STMT: { + SCreateTSMAStmt* pStmt = (SCreateTSMAStmt*)pNode; + nodesDestroyNode((SNode*)pStmt->pOptions); + break; + } case QUERY_NODE_LOGIC_PLAN_SCAN: { SScanLogicNode* pLogicNode = (SScanLogicNode*)pNode; destroyLogicNode((SLogicNode*)pLogicNode); diff --git a/source/libs/parser/inc/parUtil.h b/source/libs/parser/inc/parUtil.h index 7a25e3c4c7..4bd8b80b92 100644 --- a/source/libs/parser/inc/parUtil.h +++ b/source/libs/parser/inc/parUtil.h @@ -110,6 +110,7 @@ typedef struct SParseMetaCache { SHashObj* pTableIndex; // key is tbFName, element is SArray* SHashObj* pTableCfg; // key is tbFName, element is STableCfg* SHashObj* pViews; // key is viewFName, element is SViewMeta* + SHashObj* pTableTSMAs; // key is tbFName, elements are SArray* SArray* pDnodes; // element is SEpSet bool dnodeRequired; } SParseMetaCache; @@ -153,6 +154,7 @@ int32_t reserveUdfInCache(const char* pFunc, SParseMetaCache* pMetaCache); int32_t reserveTableIndexInCache(int32_t acctId, const char* pDb, const char* pTable, SParseMetaCache* pMetaCache); int32_t reserveTableCfgInCache(int32_t acctId, const char* pDb, const char* pTable, SParseMetaCache* pMetaCache); int32_t reserveDnodeRequiredInCache(SParseMetaCache* pMetaCache); +int32_t reserveTableTSMAInfoInCache(int32_t acctId, const char* pDb, const char* pTable, SParseMetaCache* pMetaCache); int32_t getTableMetaFromCache(SParseMetaCache* pMetaCache, const SName* pName, STableMeta** pMeta); int32_t getViewMetaFromCache(SParseMetaCache* pMetaCache, const SName* pName, STableMeta** pMeta); int32_t buildTableMetaFromViewMeta(STableMeta** pMeta, SViewMeta* pViewMeta); diff --git a/source/libs/parser/src/parAstParser.c b/source/libs/parser/src/parAstParser.c index 280d03df44..52bdfd2ab0 100644 --- a/source/libs/parser/src/parAstParser.c +++ b/source/libs/parser/src/parAstParser.c @@ -186,6 +186,10 @@ static int32_t collectMetaKeyFromRealTableImpl(SCollectMetaKeyCxt* pCxt, const c QUERY_NODE_SELECT_STMT == nodeType(pCxt->pStmt)) { code = collectMetaKeyFromInsTags(pCxt); } + if (TSDB_CODE_SUCCESS == code && QUERY_SMA_OPTIMIZE_ENABLE == tsQuerySmaOptimize && + QUERY_NODE_SELECT_STMT == nodeType(pCxt->pStmt)) { + code = reserveTableTSMAInfoInCache(pCxt->pParseCxt->acctId, pDb, pTable, pCxt->pMetaCache); + } return code; } diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c index 39bec5c48d..cdd7f02511 100644 --- a/source/libs/parser/src/parTranslater.c +++ b/source/libs/parser/src/parTranslater.c @@ -10406,6 +10406,9 @@ static int32_t buildTSMAAst(STranslateContext* pCxt, SCreateTSMAStmt* pStmt, SMC } } + if (code == TSDB_CODE_SUCCESS) + code = rewriteFuncsForTSMA(info.pFuncs); + if (code == TSDB_CODE_SUCCESS) { code = buildSampleAst(pCxt, &info, &pReq->ast, &pReq->astLen, &pReq->expr, &pReq->exprLen); } @@ -10522,30 +10525,26 @@ static int32_t buildCreateTSMAReq(STranslateContext* pCxt, SCreateTSMAStmt* pStm static int32_t translateCreateTSMA(STranslateContext* pCxt, SCreateTSMAStmt* pStmt) { int32_t code = doTranslateValue(pCxt, (SValueNode*)pStmt->pOptions->pInterval); - pStmt->pReq = taosMemoryCalloc(1, sizeof(SMCreateSmaReq)); - if (pStmt->pReq == NULL) code = TSDB_CODE_OUT_OF_MEMORY; + SMCreateSmaReq smaReq = {0}; if (code == TSDB_CODE_SUCCESS) { - code = buildCreateTSMAReq(pCxt, pStmt, pStmt->pReq); + code = buildCreateTSMAReq(pCxt, pStmt, &smaReq); } if (TSDB_CODE_SUCCESS == code) { // TODO replace with tsma serialization func - code = buildCmdMsg(pCxt, TDMT_MND_CREATE_TSMA, (FSerializeFunc)tSerializeSMCreateSmaReq, pStmt->pReq); + code = buildCmdMsg(pCxt, TDMT_MND_CREATE_TSMA, (FSerializeFunc)tSerializeSMCreateSmaReq, &smaReq); } - tFreeSMCreateSmaReq(pStmt->pReq); + tFreeSMCreateSmaReq(&smaReq); return code; } static int32_t translateDropTSMA(STranslateContext* pCxt, SDropTSMAStmt* pStmt) { int32_t code = TSDB_CODE_SUCCESS; - pStmt->pReq = taosMemoryCalloc(1, sizeof(SMDropSmaReq)); - if (!pStmt->pReq) code = TSDB_CODE_OUT_OF_MEMORY; - if (code == TSDB_CODE_SUCCESS) { - SName name; - tNameExtractFullName(toName(pCxt->pParseCxt->acctId, pStmt->dbName, pStmt->tsmaName, &name), pStmt->pReq->name); - pStmt->pReq->igNotExists = pStmt->ignoreNotExists; - } + SMDropSmaReq dropReq = {0}; + SName name; + tNameExtractFullName(toName(pCxt->pParseCxt->acctId, pStmt->dbName, pStmt->tsmaName, &name), dropReq.name); + dropReq.igNotExists = pStmt->ignoreNotExists; if (TSDB_CODE_SUCCESS == code) - code = buildCmdMsg(pCxt, TDMT_MND_DROP_TSMA, (FSerializeFunc)tSerializeSMDropSmaReq, pStmt->pReq); + code = buildCmdMsg(pCxt, TDMT_MND_DROP_TSMA, (FSerializeFunc)tSerializeSMDropSmaReq, &dropReq); return code; } diff --git a/source/libs/parser/src/parUtil.c b/source/libs/parser/src/parUtil.c index bd1e8331e7..725989a432 100644 --- a/source/libs/parser/src/parUtil.c +++ b/source/libs/parser/src/parUtil.c @@ -723,6 +723,9 @@ int32_t buildCatalogReq(const SParseMetaCache* pMetaCache, SCatalogReq* pCatalog if (TSDB_CODE_SUCCESS == code) { code = buildTableReq(pMetaCache->pTableCfg, &pCatalogReq->pTableCfg); } + if (TSDB_CODE_SUCCESS == code) { + code = buildTableReqFromDb(pMetaCache->pTableMeta, &pCatalogReq->pTableTSMAs); + } #ifdef TD_ENTERPRISE if (TSDB_CODE_SUCCESS == code) { code = buildTableReqFromDb(pMetaCache->pTableMeta, &pCatalogReq->pView); @@ -864,6 +867,9 @@ int32_t putMetaDataToCache(const SCatalogReq* pCatalogReq, const SMetaData* pMet if (TSDB_CODE_SUCCESS == code) { code = putTableDataToCache(pCatalogReq->pTableCfg, pMetaData->pTableCfg, &pMetaCache->pTableCfg); } + if (TSDB_CODE_SUCCESS == code) { + code = putDbTableDataToCache(pCatalogReq->pTableTSMAs, pMetaData->pTableTsmas, &pMetaCache->pTableTSMAs); + } #ifdef TD_ENTERPRISE if (TSDB_CODE_SUCCESS == code) { code = putDbTableDataToCache(pCatalogReq->pView, pMetaData->pView, &pMetaCache->pViews); @@ -1134,6 +1140,10 @@ int32_t reserveTableCfgInCache(int32_t acctId, const char* pDb, const char* pTab return reserveTableReqInCache(acctId, pDb, pTable, &pMetaCache->pTableCfg); } +int32_t reserveTableTSMAInfoInCache(int32_t acctId, const char *pDb, const char *pTable, SParseMetaCache *pMetaCache) { + return reserveTableReqInCache(acctId, pDb, pTable, &pMetaCache->pTableTSMAs); +} + int32_t getTableIndexFromCache(SParseMetaCache* pMetaCache, const SName* pName, SArray** pIndexes) { char fullName[TSDB_TABLE_FNAME_LEN]; tNameExtractFullName(pName, fullName); @@ -1232,6 +1242,7 @@ void destoryParseMetaCache(SParseMetaCache* pMetaCache, bool request) { taosHashCleanup(pMetaCache->pUdf); taosHashCleanup(pMetaCache->pTableIndex); taosHashCleanup(pMetaCache->pTableCfg); + taosHashCleanup(pMetaCache->pTableTSMAs); } int64_t int64SafeSub(int64_t a, int64_t b) { diff --git a/source/libs/parser/src/parser.c b/source/libs/parser/src/parser.c index 92e25f3ee6..c5b657910e 100644 --- a/source/libs/parser/src/parser.c +++ b/source/libs/parser/src/parser.c @@ -270,12 +270,14 @@ void destoryCatalogReq(SCatalogReq *pCatalogReq) { #ifdef TD_ENTERPRISE taosArrayDestroy(pCatalogReq->pView); #endif + taosArrayDestroy(pCatalogReq->pTableTSMAs); } else { taosArrayDestroyEx(pCatalogReq->pTableMeta, destoryTablesReq); taosArrayDestroyEx(pCatalogReq->pTableHash, destoryTablesReq); #ifdef TD_ENTERPRISE taosArrayDestroyEx(pCatalogReq->pView, destoryTablesReq); #endif + taosArrayDestroyEx(pCatalogReq->pTableTSMAs, destoryTablesReq); } taosArrayDestroy(pCatalogReq->pUdf); taosArrayDestroy(pCatalogReq->pIndex); diff --git a/source/libs/parser/src/sql.c b/source/libs/parser/src/sql.c index 5384846133..b0e6ef024c 100644 --- a/source/libs/parser/src/sql.c +++ b/source/libs/parser/src/sql.c @@ -1,3 +1,5 @@ +/* This file is automatically generated by Lemon from input grammar +** source file "sql.y". */ /* ** 2000-05-29 ** @@ -22,9 +24,8 @@ ** The following is the concatenation of all %include directives from the ** input grammar file: */ -#include -#include /************ Begin %include sections from the grammar ************************/ +#line 11 "sql.y" #include #include @@ -41,12 +42,381 @@ #include "parAst.h" #define YYSTACKDEPTH 0 +#line 46 "sql.c" /**************** End of %include directives **********************************/ -/* These constants specify the various numeric values for terminal symbols -** in a format understandable to "makeheaders". This section is blank unless -** "lemon" is run with the "-m" command-line option. -***************** Begin makeheaders token definitions *************************/ -/**************** End makeheaders token definitions ***************************/ +/* These constants specify the various numeric values for terminal symbols. +***************** Begin token definitions *************************************/ +#ifndef TK_OR +#define TK_OR 1 +#define TK_AND 2 +#define TK_UNION 3 +#define TK_ALL 4 +#define TK_MINUS 5 +#define TK_EXCEPT 6 +#define TK_INTERSECT 7 +#define TK_NK_BITAND 8 +#define TK_NK_BITOR 9 +#define TK_NK_LSHIFT 10 +#define TK_NK_RSHIFT 11 +#define TK_NK_PLUS 12 +#define TK_NK_MINUS 13 +#define TK_NK_STAR 14 +#define TK_NK_SLASH 15 +#define TK_NK_REM 16 +#define TK_NK_CONCAT 17 +#define TK_CREATE 18 +#define TK_ACCOUNT 19 +#define TK_NK_ID 20 +#define TK_PASS 21 +#define TK_NK_STRING 22 +#define TK_ALTER 23 +#define TK_PPS 24 +#define TK_TSERIES 25 +#define TK_STORAGE 26 +#define TK_STREAMS 27 +#define TK_QTIME 28 +#define TK_DBS 29 +#define TK_USERS 30 +#define TK_CONNS 31 +#define TK_STATE 32 +#define TK_NK_COMMA 33 +#define TK_HOST 34 +#define TK_USER 35 +#define TK_ENABLE 36 +#define TK_NK_INTEGER 37 +#define TK_SYSINFO 38 +#define TK_ADD 39 +#define TK_DROP 40 +#define TK_GRANT 41 +#define TK_ON 42 +#define TK_TO 43 +#define TK_REVOKE 44 +#define TK_FROM 45 +#define TK_SUBSCRIBE 46 +#define TK_READ 47 +#define TK_WRITE 48 +#define TK_NK_DOT 49 +#define TK_WITH 50 +#define TK_DNODE 51 +#define TK_PORT 52 +#define TK_DNODES 53 +#define TK_RESTORE 54 +#define TK_NK_IPTOKEN 55 +#define TK_FORCE 56 +#define TK_UNSAFE 57 +#define TK_CLUSTER 58 +#define TK_LOCAL 59 +#define TK_QNODE 60 +#define TK_BNODE 61 +#define TK_SNODE 62 +#define TK_MNODE 63 +#define TK_VNODE 64 +#define TK_DATABASE 65 +#define TK_USE 66 +#define TK_FLUSH 67 +#define TK_TRIM 68 +#define TK_S3MIGRATE 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_S3_CHUNKSIZE 101 +#define TK_S3_KEEPLOCAL 102 +#define TK_S3_COMPACT 103 +#define TK_KEEP_TIME_OFFSET 104 +#define TK_NK_COLON 105 +#define TK_BWLIMIT 106 +#define TK_START 107 +#define TK_TIMESTAMP 108 +#define TK_END 109 +#define TK_TABLE 110 +#define TK_NK_LP 111 +#define TK_NK_RP 112 +#define TK_STABLE 113 +#define TK_COLUMN 114 +#define TK_MODIFY 115 +#define TK_RENAME 116 +#define TK_TAG 117 +#define TK_SET 118 +#define TK_NK_EQ 119 +#define TK_USING 120 +#define TK_TAGS 121 +#define TK_PRIMARY 122 +#define TK_KEY 123 +#define TK_BOOL 124 +#define TK_TINYINT 125 +#define TK_SMALLINT 126 +#define TK_INT 127 +#define TK_INTEGER 128 +#define TK_BIGINT 129 +#define TK_FLOAT 130 +#define TK_DOUBLE 131 +#define TK_BINARY 132 +#define TK_NCHAR 133 +#define TK_UNSIGNED 134 +#define TK_JSON 135 +#define TK_VARCHAR 136 +#define TK_MEDIUMBLOB 137 +#define TK_BLOB 138 +#define TK_VARBINARY 139 +#define TK_GEOMETRY 140 +#define TK_DECIMAL 141 +#define TK_COMMENT 142 +#define TK_MAX_DELAY 143 +#define TK_WATERMARK 144 +#define TK_ROLLUP 145 +#define TK_TTL 146 +#define TK_SMA 147 +#define TK_DELETE_MARK 148 +#define TK_FIRST 149 +#define TK_LAST 150 +#define TK_SHOW 151 +#define TK_PRIVILEGES 152 +#define TK_DATABASES 153 +#define TK_TABLES 154 +#define TK_STABLES 155 +#define TK_MNODES 156 +#define TK_QNODES 157 +#define TK_ARBGROUPS 158 +#define TK_FUNCTIONS 159 +#define TK_INDEXES 160 +#define TK_ACCOUNTS 161 +#define TK_APPS 162 +#define TK_CONNECTIONS 163 +#define TK_LICENCES 164 +#define TK_GRANTS 165 +#define TK_FULL 166 +#define TK_LOGS 167 +#define TK_MACHINES 168 +#define TK_QUERIES 169 +#define TK_SCORES 170 +#define TK_TOPICS 171 +#define TK_VARIABLES 172 +#define TK_BNODES 173 +#define TK_SNODES 174 +#define TK_TRANSACTIONS 175 +#define TK_DISTRIBUTED 176 +#define TK_CONSUMERS 177 +#define TK_SUBSCRIPTIONS 178 +#define TK_VNODES 179 +#define TK_ALIVE 180 +#define TK_VIEWS 181 +#define TK_VIEW 182 +#define TK_COMPACTS 183 +#define TK_NORMAL 184 +#define TK_CHILD 185 +#define TK_LIKE 186 +#define TK_TBNAME 187 +#define TK_QTAGS 188 +#define TK_AS 189 +#define TK_SYSTEM 190 +#define TK_TSMA 191 +#define TK_INTERVAL 192 +#define TK_TSMAS 193 +#define TK_FUNCTION 194 +#define TK_INDEX 195 +#define TK_COUNT 196 +#define TK_LAST_ROW 197 +#define TK_META 198 +#define TK_ONLY 199 +#define TK_TOPIC 200 +#define TK_CONSUMER 201 +#define TK_GROUP 202 +#define TK_DESC 203 +#define TK_DESCRIBE 204 +#define TK_RESET 205 +#define TK_QUERY 206 +#define TK_CACHE 207 +#define TK_EXPLAIN 208 +#define TK_ANALYZE 209 +#define TK_VERBOSE 210 +#define TK_NK_BOOL 211 +#define TK_RATIO 212 +#define TK_NK_FLOAT 213 +#define TK_OUTPUTTYPE 214 +#define TK_AGGREGATE 215 +#define TK_BUFSIZE 216 +#define TK_LANGUAGE 217 +#define TK_REPLACE 218 +#define TK_STREAM 219 +#define TK_INTO 220 +#define TK_PAUSE 221 +#define TK_RESUME 222 +#define TK_TRIGGER 223 +#define TK_AT_ONCE 224 +#define TK_WINDOW_CLOSE 225 +#define TK_IGNORE 226 +#define TK_EXPIRED 227 +#define TK_FILL_HISTORY 228 +#define TK_UPDATE 229 +#define TK_SUBTABLE 230 +#define TK_UNTREATED 231 +#define TK_KILL 232 +#define TK_CONNECTION 233 +#define TK_TRANSACTION 234 +#define TK_BALANCE 235 +#define TK_VGROUP 236 +#define TK_LEADER 237 +#define TK_MERGE 238 +#define TK_REDISTRIBUTE 239 +#define TK_SPLIT 240 +#define TK_DELETE 241 +#define TK_INSERT 242 +#define TK_NK_BIN 243 +#define TK_NK_HEX 244 +#define TK_NULL 245 +#define TK_NK_QUESTION 246 +#define TK_NK_ALIAS 247 +#define TK_NK_ARROW 248 +#define TK_ROWTS 249 +#define TK_QSTART 250 +#define TK_QEND 251 +#define TK_QDURATION 252 +#define TK_WSTART 253 +#define TK_WEND 254 +#define TK_WDURATION 255 +#define TK_IROWTS 256 +#define TK_ISFILLED 257 +#define TK_CAST 258 +#define TK_NOW 259 +#define TK_TODAY 260 +#define TK_TIMEZONE 261 +#define TK_CLIENT_VERSION 262 +#define TK_SERVER_VERSION 263 +#define TK_SERVER_STATUS 264 +#define TK_CURRENT_USER 265 +#define TK_CASE 266 +#define TK_WHEN 267 +#define TK_THEN 268 +#define TK_ELSE 269 +#define TK_BETWEEN 270 +#define TK_IS 271 +#define TK_NK_LT 272 +#define TK_NK_GT 273 +#define TK_NK_LE 274 +#define TK_NK_GE 275 +#define TK_NK_NE 276 +#define TK_MATCH 277 +#define TK_NMATCH 278 +#define TK_CONTAINS 279 +#define TK_IN 280 +#define TK_JOIN 281 +#define TK_INNER 282 +#define TK_LEFT 283 +#define TK_RIGHT 284 +#define TK_OUTER 285 +#define TK_SEMI 286 +#define TK_ANTI 287 +#define TK_ASOF 288 +#define TK_WINDOW 289 +#define TK_WINDOW_OFFSET 290 +#define TK_JLIMIT 291 +#define TK_SELECT 292 +#define TK_NK_HINT 293 +#define TK_DISTINCT 294 +#define TK_WHERE 295 +#define TK_PARTITION 296 +#define TK_BY 297 +#define TK_SESSION 298 +#define TK_STATE_WINDOW 299 +#define TK_EVENT_WINDOW 300 +#define TK_COUNT_WINDOW 301 +#define TK_SLIDING 302 +#define TK_FILL 303 +#define TK_VALUE 304 +#define TK_VALUE_F 305 +#define TK_NONE 306 +#define TK_PREV 307 +#define TK_NULL_F 308 +#define TK_LINEAR 309 +#define TK_NEXT 310 +#define TK_HAVING 311 +#define TK_RANGE 312 +#define TK_EVERY 313 +#define TK_ORDER 314 +#define TK_SLIMIT 315 +#define TK_SOFFSET 316 +#define TK_LIMIT 317 +#define TK_OFFSET 318 +#define TK_ASC 319 +#define TK_NULLS 320 +#define TK_ABORT 321 +#define TK_AFTER 322 +#define TK_ATTACH 323 +#define TK_BEFORE 324 +#define TK_BEGIN 325 +#define TK_BITAND 326 +#define TK_BITNOT 327 +#define TK_BITOR 328 +#define TK_BLOCKS 329 +#define TK_CHANGE 330 +#define TK_COMMA 331 +#define TK_CONCAT 332 +#define TK_CONFLICT 333 +#define TK_COPY 334 +#define TK_DEFERRED 335 +#define TK_DELIMITERS 336 +#define TK_DETACH 337 +#define TK_DIVIDE 338 +#define TK_DOT 339 +#define TK_EACH 340 +#define TK_FAIL 341 +#define TK_FILE 342 +#define TK_FOR 343 +#define TK_GLOB 344 +#define TK_ID 345 +#define TK_IMMEDIATE 346 +#define TK_IMPORT 347 +#define TK_INITIALLY 348 +#define TK_INSTEAD 349 +#define TK_ISNULL 350 +#define TK_MODULES 351 +#define TK_NK_BITNOT 352 +#define TK_NK_SEMI 353 +#define TK_NOTNULL 354 +#define TK_OF 355 +#define TK_PLUS 356 +#define TK_PRIVILEGE 357 +#define TK_RAISE 358 +#define TK_RESTRICT 359 +#define TK_ROW 360 +#define TK_STAR 361 +#define TK_STATEMENT 362 +#define TK_STRICT 363 +#define TK_STRING 364 +#define TK_TIMES 365 +#define TK_VALUES 366 +#define TK_VARIABLE 367 +#define TK_WAL 368 +#endif +/**************** End token definitions ***************************************/ /* The next sections is a series of control #defines. ** various aspects of the generated parser. @@ -104,30 +474,30 @@ #endif /************* Begin control #defines *****************************************/ #define YYCODETYPE unsigned short int -#define YYNOCODE 538 +#define YYNOCODE 545 #define YYACTIONTYPE unsigned short int #define ParseTOKENTYPE SToken typedef union { int yyinit; ParseTOKENTYPE yy0; - SAlterOption yy5; - SShowTablesOption yy165; - SDataType yy232; - EFillMode yy318; - int8_t yy443; - int32_t yy488; - EJoinSubType yy506; - STokenPair yy525; - ENullOrder yy545; - EJoinType yy548; - EOrder yy670; - SNode* yy720; - int64_t yy817; - bool yy833; - SNodeList* yy984; - EOperatorType yy1024; - EShowKind yy1029; - SToken yy1045; + EShowKind yy89; + EJoinType yy92; + EFillMode yy94; + SDataType yy154; + int8_t yy173; + EJoinSubType yy534; + SToken yy659; + SNodeList* yy694; + ENullOrder yy707; + EOrder yy708; + SNode* yy722; + int64_t yy729; + SShowTablesOption yy817; + int32_t yy830; + SAlterOption yy845; + bool yy897; + STokenPair yy967; + EOperatorType yy1070; } YYMINORTYPE; #ifndef YYSTACKDEPTH #define YYSTACKDEPTH 100 @@ -143,18 +513,18 @@ typedef union { #define ParseCTX_FETCH #define ParseCTX_STORE #define YYFALLBACK 1 -#define YYNSTATE 918 -#define YYNRULE 726 -#define YYNRULE_WITH_ACTION 726 -#define YYNTOKEN 367 -#define YY_MAX_SHIFT 917 -#define YY_MIN_SHIFTREDUCE 1374 -#define YY_MAX_SHIFTREDUCE 2099 -#define YY_ERROR_ACTION 2100 -#define YY_ACCEPT_ACTION 2101 -#define YY_NO_ACTION 2102 -#define YY_MIN_REDUCE 2103 -#define YY_MAX_REDUCE 2828 +#define YYNSTATE 945 +#define YYNRULE 738 +#define YYNRULE_WITH_ACTION 738 +#define YYNTOKEN 369 +#define YY_MAX_SHIFT 944 +#define YY_MIN_SHIFTREDUCE 1408 +#define YY_MAX_SHIFTREDUCE 2145 +#define YY_ERROR_ACTION 2146 +#define YY_ACCEPT_ACTION 2147 +#define YY_NO_ACTION 2148 +#define YY_MIN_REDUCE 2149 +#define YY_MAX_REDUCE 2886 /************* End control #defines *******************************************/ #define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0]))) @@ -221,915 +591,915 @@ typedef union { ** yy_default[] Default action for each state. ** *********** Begin parsing tables **********************************************/ -#define YY_ACTTAB_COUNT (3171) +#define YY_ACTTAB_COUNT (3136) static const YYACTIONTYPE yy_action[] = { - /* 0 */ 2804, 2585, 760, 615, 705, 2445, 616, 2146, 2799, 184, - /* 10 */ 2799, 306, 47, 45, 2021, 520, 2585, 43, 42, 41, - /* 20 */ 447, 750, 1843, 2443, 802, 513, 2589, 2803, 759, 210, - /* 30 */ 512, 2800, 2802, 2800, 761, 1930, 2804, 1841, 2189, 1414, - /* 40 */ 1868, 2589, 473, 472, 40, 39, 2609, 2126, 46, 44, - /* 50 */ 43, 42, 41, 1871, 96, 9, 772, 149, 1421, 775, - /* 60 */ 2493, 580, 578, 1869, 397, 1925, 2103, 1850, 223, 2359, - /* 70 */ 2278, 419, 19, 2591, 2593, 444, 415, 66, 726, 1849, - /* 80 */ 2296, 1416, 1419, 1420, 819, 2357, 2799, 2627, 2591, 2594, - /* 90 */ 139, 138, 137, 136, 135, 134, 133, 132, 131, 819, - /* 100 */ 2575, 2575, 797, 623, 2805, 210, 616, 2146, 914, 2800, - /* 110 */ 761, 15, 889, 888, 887, 886, 476, 2716, 885, 884, - /* 120 */ 154, 879, 878, 877, 876, 875, 874, 873, 153, 867, - /* 130 */ 866, 865, 475, 474, 862, 861, 860, 190, 189, 859, - /* 140 */ 471, 858, 857, 2713, 2608, 2089, 814, 2647, 2065, 1932, - /* 150 */ 1933, 115, 2610, 801, 2612, 2613, 796, 191, 819, 760, - /* 160 */ 620, 2568, 2025, 193, 464, 2701, 617, 2799, 1868, 443, - /* 170 */ 2697, 186, 2709, 771, 468, 141, 770, 2352, 2354, 1996, - /* 180 */ 417, 696, 2425, 2799, 62, 759, 210, 1903, 1913, 211, - /* 190 */ 2800, 761, 1626, 1627, 1931, 1934, 694, 2748, 692, 277, - /* 200 */ 276, 759, 210, 2277, 772, 149, 2800, 761, 2104, 1844, - /* 210 */ 635, 1842, 854, 165, 164, 851, 850, 849, 162, 453, - /* 220 */ 40, 39, 311, 788, 46, 44, 43, 42, 41, 130, - /* 230 */ 819, 787, 129, 128, 127, 126, 125, 124, 123, 122, - /* 240 */ 121, 1853, 707, 1847, 1848, 1900, 1900, 1902, 1905, 1906, - /* 250 */ 1907, 1908, 1909, 1910, 1911, 1912, 793, 817, 816, 1924, - /* 260 */ 1926, 1927, 1928, 1929, 2, 47, 45, 529, 2421, 12, - /* 270 */ 395, 1843, 1866, 447, 856, 1843, 2292, 535, 2421, 563, - /* 280 */ 772, 149, 583, 709, 407, 245, 1841, 582, 1930, 618, - /* 290 */ 1841, 2154, 2721, 1993, 1994, 1995, 2721, 2721, 2721, 2721, - /* 300 */ 2721, 631, 33, 543, 1996, 584, 815, 2301, 40, 39, - /* 310 */ 396, 545, 46, 44, 43, 42, 41, 225, 1925, 119, - /* 320 */ 2709, 2710, 523, 147, 2714, 19, 214, 227, 1849, 815, - /* 330 */ 2301, 1959, 1849, 130, 453, 1904, 129, 128, 127, 126, - /* 340 */ 125, 124, 123, 122, 121, 819, 62, 40, 39, 140, - /* 350 */ 2125, 46, 44, 43, 42, 41, 658, 914, 1587, 1872, - /* 360 */ 764, 914, 418, 313, 15, 1998, 1999, 2000, 2001, 2002, - /* 370 */ 2569, 62, 706, 531, 1578, 844, 843, 842, 1582, 841, - /* 380 */ 1584, 1585, 840, 837, 2124, 1593, 834, 1595, 1596, 831, - /* 390 */ 828, 825, 2276, 1901, 774, 179, 2709, 2710, 1960, 147, - /* 400 */ 2714, 856, 1932, 1933, 2575, 2432, 2411, 2054, 571, 570, - /* 410 */ 569, 568, 567, 562, 561, 560, 559, 401, 1993, 1994, - /* 420 */ 1995, 549, 548, 547, 546, 540, 539, 538, 453, 533, - /* 430 */ 532, 416, 37, 317, 113, 524, 1686, 1687, 2575, 819, - /* 440 */ 1903, 1913, 1705, 511, 2378, 510, 710, 1931, 1934, 40, - /* 450 */ 39, 152, 203, 46, 44, 43, 42, 41, 1844, 2293, - /* 460 */ 1842, 177, 1844, 2115, 1842, 2346, 742, 741, 2052, 2053, - /* 470 */ 2055, 2056, 2057, 247, 29, 509, 2445, 618, 1849, 2154, - /* 480 */ 36, 445, 1954, 1955, 1956, 1957, 1958, 1962, 1963, 1964, - /* 490 */ 1965, 450, 1847, 1848, 2442, 802, 1847, 1848, 1900, 869, - /* 500 */ 1902, 1905, 1906, 1907, 1908, 1909, 1910, 1911, 1912, 793, - /* 510 */ 817, 816, 1924, 1926, 1927, 1928, 1929, 2, 12, 47, - /* 520 */ 45, 2716, 625, 2484, 2804, 313, 176, 447, 206, 1843, - /* 530 */ 848, 371, 2799, 2350, 854, 165, 164, 851, 850, 849, - /* 540 */ 162, 2609, 1930, 705, 1841, 1868, 2046, 2712, 369, 75, - /* 550 */ 313, 2803, 74, 2066, 795, 2800, 2801, 35, 565, 2421, - /* 560 */ 2609, 2047, 398, 40, 39, 871, 1872, 46, 44, 43, - /* 570 */ 42, 41, 1925, 798, 243, 597, 595, 592, 590, 19, - /* 580 */ 815, 2301, 2627, 281, 1873, 1440, 1849, 1439, 772, 149, - /* 590 */ 46, 44, 43, 42, 41, 2575, 814, 797, 432, 2492, - /* 600 */ 140, 2627, 145, 2045, 710, 1587, 51, 663, 232, 459, - /* 610 */ 558, 557, 423, 422, 2575, 914, 797, 745, 15, 62, - /* 620 */ 1441, 1578, 844, 843, 842, 1582, 841, 1584, 1585, 792, - /* 630 */ 791, 612, 1593, 790, 1595, 1596, 789, 828, 825, 2608, - /* 640 */ 610, 765, 2647, 606, 602, 749, 387, 2610, 801, 2612, - /* 650 */ 2613, 796, 794, 819, 780, 2666, 1932, 1933, 2608, 63, - /* 660 */ 280, 2647, 1771, 1772, 279, 115, 2610, 801, 2612, 2613, - /* 670 */ 796, 872, 819, 2627, 2262, 151, 1940, 159, 2672, 2701, - /* 680 */ 712, 2484, 1868, 443, 2697, 1871, 1996, 50, 421, 420, - /* 690 */ 2394, 660, 40, 39, 1903, 1913, 46, 44, 43, 42, - /* 700 */ 41, 1931, 1934, 180, 2709, 2710, 847, 147, 2714, 85, - /* 710 */ 84, 516, 1698, 1699, 222, 662, 1844, 814, 1842, 661, - /* 720 */ 751, 746, 739, 735, 462, 40, 39, 508, 506, 46, - /* 730 */ 44, 43, 42, 41, 99, 201, 229, 404, 394, 748, - /* 740 */ 431, 495, 698, 356, 492, 488, 484, 481, 509, 574, - /* 750 */ 1847, 1848, 1900, 2192, 1902, 1905, 1906, 1907, 1908, 1909, - /* 760 */ 1910, 1911, 1912, 793, 817, 816, 1924, 1926, 1927, 1928, - /* 770 */ 1929, 2, 47, 45, 1935, 12, 2609, 10, 497, 2123, - /* 780 */ 447, 91, 1843, 1812, 90, 313, 632, 725, 700, 775, - /* 790 */ 699, 1873, 815, 2301, 263, 1930, 2609, 1841, 313, 2721, - /* 800 */ 1993, 1994, 1995, 2721, 2721, 2721, 2721, 2721, 50, 798, - /* 810 */ 185, 2156, 55, 458, 457, 466, 234, 2627, 174, 652, - /* 820 */ 648, 644, 640, 168, 262, 1925, 2304, 678, 677, 676, - /* 830 */ 2575, 2303, 797, 2575, 668, 146, 672, 2627, 2122, 1849, - /* 840 */ 671, 573, 233, 633, 2438, 670, 675, 426, 425, 1904, - /* 850 */ 2575, 669, 797, 89, 311, 424, 665, 664, 556, 40, - /* 860 */ 39, 846, 555, 46, 44, 43, 42, 41, 914, 97, - /* 870 */ 554, 48, 260, 117, 2608, 786, 2609, 2647, 433, 2492, - /* 880 */ 2359, 115, 2610, 801, 2612, 2613, 796, 442, 819, 798, - /* 890 */ 754, 2756, 2575, 193, 2608, 2701, 2357, 2647, 1811, 443, - /* 900 */ 2697, 115, 2610, 801, 2612, 2613, 796, 1901, 819, 1932, - /* 910 */ 1933, 2716, 501, 2819, 1440, 2701, 1439, 2627, 2096, 443, - /* 920 */ 2697, 1421, 815, 2301, 815, 2301, 60, 2749, 461, 460, - /* 930 */ 2575, 781, 797, 2673, 723, 2290, 1869, 2711, 2121, 503, - /* 940 */ 499, 250, 517, 2519, 518, 1419, 1420, 1903, 1913, 1441, - /* 950 */ 259, 252, 815, 2301, 1931, 1934, 2007, 257, 629, 1961, - /* 960 */ 40, 39, 1868, 2037, 46, 44, 43, 42, 41, 1844, - /* 970 */ 2286, 1842, 537, 1868, 2608, 2528, 249, 2647, 2529, 1872, - /* 980 */ 204, 115, 2610, 801, 2612, 2613, 796, 313, 819, 2609, - /* 990 */ 451, 703, 2575, 2819, 486, 2701, 321, 322, 174, 443, - /* 1000 */ 2697, 320, 798, 1847, 1848, 1900, 2303, 1902, 1905, 1906, - /* 1010 */ 1907, 1908, 1909, 1910, 1911, 1912, 793, 817, 816, 1924, - /* 1020 */ 1926, 1927, 1928, 1929, 2, 47, 45, 2609, 726, 175, - /* 1030 */ 2627, 726, 1541, 447, 2095, 1843, 2799, 2237, 2288, 2799, - /* 1040 */ 798, 34, 2769, 2575, 726, 797, 1951, 1540, 1930, 191, - /* 1050 */ 1841, 1966, 2799, 62, 2805, 210, 466, 2805, 210, 2800, - /* 1060 */ 761, 469, 2800, 761, 174, 1718, 1719, 1529, 2627, 174, - /* 1070 */ 2805, 210, 2303, 2609, 2426, 2800, 761, 2303, 1925, 2353, - /* 1080 */ 2354, 2575, 2497, 797, 815, 2301, 798, 2608, 737, 2120, - /* 1090 */ 2647, 2119, 1849, 2803, 115, 2610, 801, 2612, 2613, 796, - /* 1100 */ 685, 819, 815, 2301, 550, 2118, 2676, 2359, 2701, 1531, - /* 1110 */ 1717, 1720, 443, 2697, 2627, 697, 14, 13, 585, 2117, - /* 1120 */ 1423, 914, 551, 779, 48, 2608, 1867, 2575, 2647, 797, - /* 1130 */ 2284, 278, 115, 2610, 801, 2612, 2613, 796, 282, 819, - /* 1140 */ 1904, 711, 2359, 2575, 2819, 2575, 2701, 688, 205, 452, - /* 1150 */ 443, 2697, 815, 2301, 682, 680, 815, 2301, 2357, 2575, - /* 1160 */ 1545, 275, 1932, 1933, 854, 165, 164, 851, 850, 849, - /* 1170 */ 162, 2608, 552, 2575, 2647, 1544, 634, 2359, 115, 2610, - /* 1180 */ 801, 2612, 2613, 796, 467, 819, 1872, 2114, 1443, 1444, - /* 1190 */ 2819, 2113, 2701, 2357, 726, 2112, 443, 2697, 1901, 2111, - /* 1200 */ 1903, 1913, 2799, 288, 1873, 2110, 71, 1931, 1934, 70, - /* 1210 */ 678, 677, 676, 815, 2301, 815, 2301, 668, 146, 672, - /* 1220 */ 2805, 210, 1844, 671, 1842, 2800, 761, 1973, 670, 675, - /* 1230 */ 426, 425, 313, 2298, 669, 283, 654, 653, 424, 665, - /* 1240 */ 664, 2575, 2609, 662, 776, 2575, 587, 661, 2109, 2575, - /* 1250 */ 656, 655, 2108, 2575, 1868, 798, 1847, 1848, 1900, 2575, - /* 1260 */ 1902, 1905, 1906, 1907, 1908, 1909, 1910, 1911, 1912, 793, - /* 1270 */ 817, 816, 1924, 1926, 1927, 1928, 1929, 2, 47, 45, - /* 1280 */ 2609, 674, 673, 2627, 815, 2301, 447, 2018, 1843, 815, - /* 1290 */ 2301, 815, 2301, 798, 107, 2792, 2575, 726, 797, 2107, - /* 1300 */ 2516, 1930, 2575, 1841, 291, 2799, 2575, 815, 2301, 778, - /* 1310 */ 2106, 325, 815, 2301, 767, 815, 2301, 2359, 783, 2294, - /* 1320 */ 2673, 2627, 150, 2805, 210, 2672, 2609, 812, 2800, 761, - /* 1330 */ 96, 1925, 813, 810, 2575, 352, 797, 815, 2301, 798, - /* 1340 */ 2608, 2733, 2101, 2647, 100, 1849, 163, 115, 2610, 801, - /* 1350 */ 2612, 2613, 796, 2575, 819, 852, 2297, 470, 2350, 2674, - /* 1360 */ 2359, 2701, 883, 881, 2575, 443, 2697, 2627, 853, 365, - /* 1370 */ 2404, 2350, 2336, 2279, 914, 1746, 2358, 15, 2608, 3, - /* 1380 */ 2575, 2647, 797, 2238, 666, 115, 2610, 801, 2612, 2613, - /* 1390 */ 796, 53, 819, 2131, 909, 473, 472, 2819, 142, 2701, - /* 1400 */ 77, 2762, 763, 443, 2697, 1857, 155, 156, 1523, 1525, - /* 1410 */ 87, 1873, 527, 156, 2116, 1932, 1933, 292, 1930, 268, - /* 1420 */ 1850, 733, 266, 479, 2608, 54, 270, 2647, 478, 269, - /* 1430 */ 184, 115, 2610, 801, 2612, 2613, 796, 272, 819, 2609, - /* 1440 */ 271, 274, 667, 2819, 273, 2701, 2176, 2174, 1925, 443, - /* 1450 */ 2697, 1526, 798, 1903, 1913, 88, 2165, 49, 112, 49, - /* 1460 */ 1931, 1934, 1849, 2163, 1504, 101, 1521, 109, 679, 681, - /* 1470 */ 1477, 194, 2596, 2098, 2099, 1844, 726, 1842, 683, 1901, - /* 1480 */ 2627, 163, 14, 13, 2799, 686, 1762, 64, 49, 1852, - /* 1490 */ 49, 785, 1769, 2575, 319, 797, 1851, 76, 331, 330, - /* 1500 */ 2041, 743, 2805, 210, 333, 332, 1505, 2800, 761, 1847, - /* 1510 */ 1848, 1900, 1478, 1902, 1905, 1906, 1907, 1908, 1909, 1910, - /* 1520 */ 1911, 1912, 793, 817, 816, 1924, 1926, 1927, 1928, 1929, - /* 1530 */ 2, 307, 400, 399, 2598, 216, 2051, 2608, 2050, 73, - /* 1540 */ 2647, 161, 454, 163, 115, 2610, 801, 2612, 2613, 796, - /* 1550 */ 297, 819, 823, 335, 334, 1930, 782, 463, 2701, 161, - /* 1560 */ 777, 773, 443, 2697, 337, 336, 1967, 1914, 163, 1715, - /* 1570 */ 339, 338, 299, 323, 144, 2017, 807, 143, 2609, 341, - /* 1580 */ 340, 161, 343, 342, 1587, 1925, 345, 344, 347, 346, - /* 1590 */ 2628, 798, 1858, 2231, 1853, 349, 348, 768, 351, 350, - /* 1600 */ 1578, 844, 843, 842, 1582, 841, 1584, 1585, 840, 837, - /* 1610 */ 2609, 1593, 834, 1595, 1596, 831, 828, 825, 364, 2627, - /* 1620 */ 327, 2157, 1571, 798, 863, 864, 1861, 1863, 2230, 2430, - /* 1630 */ 2147, 1600, 2575, 2752, 797, 740, 438, 747, 1608, 477, - /* 1640 */ 817, 816, 1924, 1926, 1927, 1928, 1929, 1615, 1496, 1494, - /* 1650 */ 434, 2627, 804, 2431, 2153, 2347, 1613, 719, 2753, 2763, - /* 1660 */ 166, 755, 756, 1855, 2575, 304, 797, 312, 309, 2263, - /* 1670 */ 1854, 5, 480, 907, 485, 413, 2608, 1876, 493, 2647, - /* 1680 */ 494, 218, 504, 116, 2610, 801, 2612, 2613, 796, 217, - /* 1690 */ 819, 505, 2609, 507, 220, 1739, 359, 2701, 1866, 521, - /* 1700 */ 1867, 2700, 2697, 528, 231, 798, 530, 536, 701, 534, - /* 1710 */ 576, 2647, 2609, 553, 541, 383, 2610, 801, 2612, 2613, - /* 1720 */ 796, 564, 819, 2423, 566, 798, 572, 575, 577, 1834, - /* 1730 */ 589, 1810, 2609, 2627, 588, 586, 237, 236, 591, 593, - /* 1740 */ 240, 594, 596, 598, 1874, 798, 2575, 4, 797, 624, - /* 1750 */ 613, 2609, 621, 2627, 248, 614, 1869, 93, 622, 626, - /* 1760 */ 251, 456, 455, 1835, 798, 1875, 2575, 1877, 797, 627, - /* 1770 */ 630, 628, 1878, 2627, 2439, 254, 657, 817, 816, 1924, - /* 1780 */ 1926, 1927, 1928, 1929, 256, 94, 2575, 95, 797, 636, - /* 1790 */ 2608, 261, 2627, 2647, 689, 118, 702, 116, 2610, 801, - /* 1800 */ 2612, 2613, 796, 659, 819, 2575, 2291, 797, 265, 2287, - /* 1810 */ 799, 2701, 690, 2647, 267, 784, 2697, 116, 2610, 801, - /* 1820 */ 2612, 2613, 796, 169, 819, 170, 2289, 2285, 171, 172, - /* 1830 */ 2608, 2701, 2609, 2647, 2506, 406, 2697, 178, 2610, 801, - /* 1840 */ 2612, 2613, 796, 391, 819, 798, 2503, 1870, 98, 2608, - /* 1850 */ 360, 704, 2647, 157, 2502, 284, 181, 2610, 801, 2612, - /* 1860 */ 2613, 796, 714, 819, 2609, 2485, 715, 713, 718, 289, - /* 1870 */ 744, 721, 2768, 2627, 720, 287, 294, 798, 805, 296, - /* 1880 */ 8, 2767, 753, 731, 727, 2759, 2575, 2740, 797, 730, - /* 1890 */ 729, 2609, 728, 303, 2822, 758, 757, 439, 766, 769, - /* 1900 */ 148, 298, 1871, 2015, 798, 2627, 183, 2013, 61, 2720, - /* 1910 */ 305, 197, 314, 361, 301, 762, 2820, 2717, 2575, 158, - /* 1920 */ 797, 300, 302, 1, 2682, 803, 2453, 2452, 2451, 362, - /* 1930 */ 2608, 449, 2627, 2647, 808, 809, 160, 116, 2610, 801, - /* 1940 */ 2612, 2613, 796, 363, 819, 2575, 212, 797, 106, 2302, - /* 1950 */ 308, 2701, 2567, 2566, 108, 2562, 2698, 2561, 2553, 2798, - /* 1960 */ 821, 2552, 2608, 2544, 2543, 2647, 2559, 436, 1398, 178, - /* 1970 */ 2610, 801, 2612, 2613, 796, 2609, 819, 2558, 2550, 2549, - /* 1980 */ 2538, 2537, 366, 354, 2556, 2555, 2547, 2546, 798, 2608, - /* 1990 */ 911, 908, 2647, 167, 913, 52, 388, 2610, 801, 2612, - /* 2000 */ 2613, 796, 378, 819, 389, 2609, 2535, 390, 411, 379, - /* 2010 */ 368, 2534, 2532, 2531, 2351, 2527, 2627, 2760, 798, 370, - /* 2020 */ 412, 2526, 2525, 82, 2520, 482, 483, 1794, 1795, 2575, - /* 2030 */ 215, 797, 487, 2518, 489, 490, 491, 1793, 2517, 414, - /* 2040 */ 2515, 496, 2514, 2513, 498, 500, 2627, 2512, 502, 1782, - /* 2050 */ 2489, 437, 219, 2488, 221, 1742, 83, 1741, 2466, 2575, - /* 2060 */ 2465, 797, 2464, 514, 515, 2463, 2462, 2413, 519, 1685, - /* 2070 */ 2410, 522, 2409, 2608, 2403, 2400, 2647, 526, 525, 2399, - /* 2080 */ 388, 2610, 801, 2612, 2613, 796, 224, 819, 2398, 86, - /* 2090 */ 2397, 2402, 2401, 2396, 226, 2395, 2609, 2393, 2392, 2391, - /* 2100 */ 228, 542, 2390, 2608, 544, 2388, 2647, 2387, 2386, 798, - /* 2110 */ 381, 2610, 801, 2612, 2613, 796, 2609, 819, 2385, 2408, - /* 2120 */ 2384, 2383, 2382, 2406, 2389, 2381, 2380, 2379, 2377, 795, - /* 2130 */ 230, 2371, 92, 2609, 2376, 2375, 2374, 2627, 2373, 2372, - /* 2140 */ 2370, 2369, 2368, 2367, 2407, 2405, 798, 2366, 2365, 2364, - /* 2150 */ 2575, 1691, 797, 235, 2363, 579, 2362, 2627, 2361, 2360, - /* 2160 */ 581, 752, 402, 403, 2196, 238, 2195, 2194, 1542, 239, - /* 2170 */ 2575, 241, 797, 1546, 2627, 2193, 242, 2191, 2188, 601, - /* 2180 */ 2187, 2180, 2167, 600, 604, 2142, 1422, 2575, 2141, 797, - /* 2190 */ 1538, 2487, 599, 2483, 2608, 244, 2473, 2647, 603, 605, - /* 2200 */ 607, 181, 2610, 801, 2612, 2613, 796, 609, 819, 446, - /* 2210 */ 611, 608, 79, 2461, 2608, 2460, 2609, 2647, 708, 192, - /* 2220 */ 2595, 387, 2610, 801, 2612, 2613, 796, 255, 819, 798, - /* 2230 */ 2667, 2608, 202, 619, 2647, 2609, 917, 80, 388, 2610, - /* 2240 */ 801, 2612, 2613, 796, 246, 819, 253, 258, 798, 2437, - /* 2250 */ 2280, 2190, 358, 2186, 638, 637, 639, 2627, 2184, 641, - /* 2260 */ 1470, 2821, 2609, 642, 2182, 643, 645, 646, 200, 647, - /* 2270 */ 2575, 2179, 797, 649, 651, 798, 2627, 905, 901, 897, - /* 2280 */ 893, 650, 355, 2162, 2160, 2161, 2159, 2138, 2282, 2575, - /* 2290 */ 1619, 797, 448, 72, 1620, 2281, 264, 1528, 1527, 1524, - /* 2300 */ 1522, 1511, 1520, 2627, 1519, 2177, 1518, 1517, 880, 1516, - /* 2310 */ 882, 1513, 427, 1512, 2608, 2175, 2575, 2647, 797, 1510, - /* 2320 */ 428, 388, 2610, 801, 2612, 2613, 796, 114, 819, 2166, - /* 2330 */ 328, 429, 2164, 2608, 684, 430, 2647, 687, 2609, 2137, - /* 2340 */ 373, 2610, 801, 2612, 2613, 796, 2136, 819, 2135, 691, - /* 2350 */ 2134, 798, 2133, 693, 120, 695, 1776, 1778, 1775, 1780, - /* 2360 */ 2608, 706, 2482, 2647, 811, 28, 2486, 372, 2610, 801, - /* 2370 */ 2612, 2613, 796, 286, 819, 1766, 2609, 67, 56, 2627, - /* 2380 */ 1748, 57, 1750, 2472, 1752, 716, 717, 2459, 173, 798, - /* 2390 */ 2458, 290, 2575, 732, 797, 1727, 722, 1726, 2804, 6, - /* 2400 */ 2609, 724, 20, 30, 17, 2068, 2042, 293, 316, 435, - /* 2410 */ 734, 736, 21, 798, 7, 315, 295, 2627, 738, 22, - /* 2420 */ 2049, 182, 2609, 207, 196, 195, 2596, 32, 31, 81, - /* 2430 */ 2575, 208, 797, 2008, 285, 798, 2608, 2036, 2006, 2647, - /* 2440 */ 2010, 2627, 209, 374, 2610, 801, 2612, 2613, 796, 2088, - /* 2450 */ 819, 65, 2089, 24, 2575, 2083, 797, 23, 2082, 440, - /* 2460 */ 2087, 2086, 441, 2627, 18, 1990, 310, 1989, 59, 58, - /* 2470 */ 2457, 2436, 103, 25, 2608, 187, 2575, 2647, 797, 102, - /* 2480 */ 1942, 380, 2610, 801, 2612, 2613, 796, 11, 819, 13, - /* 2490 */ 1941, 1859, 188, 198, 1917, 1893, 1916, 1915, 2608, 1952, - /* 2500 */ 2609, 2647, 2435, 830, 833, 384, 2610, 801, 2612, 2613, - /* 2510 */ 796, 836, 819, 798, 1885, 839, 38, 16, 26, 800, - /* 2520 */ 2608, 27, 199, 2647, 318, 2044, 324, 375, 2610, 801, - /* 2530 */ 2612, 2613, 796, 104, 819, 806, 326, 329, 69, 105, - /* 2540 */ 820, 2627, 2652, 2651, 822, 1919, 1601, 818, 68, 109, - /* 2550 */ 465, 1598, 824, 826, 2575, 829, 797, 827, 832, 1597, - /* 2560 */ 835, 1594, 1588, 1586, 838, 353, 110, 1614, 111, 78, - /* 2570 */ 1610, 1468, 2609, 855, 1507, 1506, 1592, 1577, 845, 1591, - /* 2580 */ 1503, 1500, 1499, 1498, 1497, 798, 1590, 1589, 1495, 2609, - /* 2590 */ 1493, 1492, 1491, 1536, 868, 870, 1535, 213, 2608, 1489, - /* 2600 */ 1488, 2647, 798, 1487, 1486, 385, 2610, 801, 2612, 2613, - /* 2610 */ 796, 2609, 819, 2627, 1485, 1484, 1483, 1530, 1532, 1474, - /* 2620 */ 1480, 1479, 1476, 2185, 798, 1475, 2575, 1473, 797, 890, - /* 2630 */ 2627, 892, 891, 2183, 2181, 894, 896, 898, 895, 2178, - /* 2640 */ 902, 900, 899, 2575, 903, 797, 904, 2158, 2609, 906, - /* 2650 */ 1411, 2132, 2627, 1399, 910, 2102, 916, 357, 912, 2102, - /* 2660 */ 1845, 798, 367, 915, 2102, 2575, 2102, 797, 2102, 2102, - /* 2670 */ 2608, 2102, 2102, 2647, 2102, 2102, 2102, 376, 2610, 801, - /* 2680 */ 2612, 2613, 796, 2102, 819, 2102, 2102, 2608, 2102, 2627, - /* 2690 */ 2647, 2102, 2102, 2102, 386, 2610, 801, 2612, 2613, 796, - /* 2700 */ 2102, 819, 2575, 2102, 797, 2102, 2102, 2102, 2102, 2608, - /* 2710 */ 2102, 2609, 2647, 2102, 2102, 2102, 377, 2610, 801, 2612, - /* 2720 */ 2613, 796, 2102, 819, 798, 2102, 2102, 2102, 2102, 2102, - /* 2730 */ 2102, 2609, 2102, 2102, 2102, 2102, 2102, 2102, 2102, 2102, - /* 2740 */ 2102, 2102, 2102, 2102, 798, 2102, 2608, 2102, 2102, 2647, - /* 2750 */ 2609, 2102, 2627, 392, 2610, 801, 2612, 2613, 796, 2102, - /* 2760 */ 819, 2102, 2102, 798, 2102, 2575, 2102, 797, 2102, 2102, - /* 2770 */ 2102, 2102, 2627, 2102, 2102, 2102, 2102, 2102, 2102, 2102, - /* 2780 */ 2102, 2102, 2102, 2102, 2102, 2575, 2102, 797, 2102, 2102, - /* 2790 */ 2102, 2627, 2102, 2102, 2102, 2102, 2102, 2102, 2102, 2102, - /* 2800 */ 2102, 2102, 2102, 2102, 2575, 2102, 797, 2102, 2102, 2608, - /* 2810 */ 2102, 2102, 2647, 2102, 2102, 2102, 393, 2610, 801, 2612, - /* 2820 */ 2613, 796, 2102, 819, 2102, 2102, 2102, 2102, 2102, 2608, - /* 2830 */ 2102, 2102, 2647, 2102, 2609, 2102, 2621, 2610, 801, 2612, - /* 2840 */ 2613, 796, 2102, 819, 2102, 2102, 2102, 798, 2608, 2102, - /* 2850 */ 2102, 2647, 2609, 2102, 2102, 2620, 2610, 801, 2612, 2613, - /* 2860 */ 796, 2102, 819, 2102, 2102, 798, 2102, 2102, 2102, 2609, - /* 2870 */ 2102, 2102, 2102, 2102, 2102, 2627, 2102, 2102, 2102, 2102, - /* 2880 */ 2102, 2102, 798, 2102, 2102, 2102, 2102, 2102, 2575, 2102, - /* 2890 */ 797, 2102, 2102, 2627, 2102, 2102, 2102, 2102, 2102, 2102, - /* 2900 */ 2102, 2102, 2102, 2102, 2102, 2102, 2575, 2102, 797, 2102, - /* 2910 */ 2627, 2102, 2102, 2102, 2102, 2102, 2102, 2102, 2102, 2102, - /* 2920 */ 2102, 2102, 2102, 2575, 2102, 797, 2102, 2102, 2102, 2102, - /* 2930 */ 2102, 2102, 2608, 2102, 2102, 2647, 2102, 2102, 2102, 2619, - /* 2940 */ 2610, 801, 2612, 2613, 796, 2102, 819, 2102, 2102, 2102, - /* 2950 */ 2608, 2102, 2102, 2647, 2102, 2102, 2609, 408, 2610, 801, - /* 2960 */ 2612, 2613, 796, 2102, 819, 2102, 2102, 2608, 2102, 798, - /* 2970 */ 2647, 2102, 2609, 2102, 409, 2610, 801, 2612, 2613, 796, - /* 2980 */ 2102, 819, 2102, 2102, 2102, 798, 2102, 2102, 2102, 2102, - /* 2990 */ 2102, 2102, 2102, 2102, 2102, 2609, 2102, 2627, 2102, 2102, - /* 3000 */ 2102, 2102, 2102, 2102, 2102, 2102, 2102, 2102, 798, 2102, - /* 3010 */ 2575, 2102, 797, 2627, 2102, 2102, 2102, 2102, 2102, 2102, - /* 3020 */ 2102, 2102, 2102, 2102, 2102, 2102, 2575, 2102, 797, 2102, - /* 3030 */ 2102, 2102, 2102, 2102, 2102, 2102, 2627, 2102, 2102, 2102, - /* 3040 */ 2102, 2102, 2102, 2102, 2102, 2102, 2102, 2102, 2102, 2575, - /* 3050 */ 2102, 797, 2102, 2102, 2608, 2102, 2102, 2647, 2609, 2102, - /* 3060 */ 2102, 405, 2610, 801, 2612, 2613, 796, 2102, 819, 2102, - /* 3070 */ 2608, 798, 2102, 2647, 2102, 2102, 2102, 410, 2610, 801, - /* 3080 */ 2612, 2613, 796, 2102, 819, 2102, 2102, 2102, 2102, 2102, - /* 3090 */ 2102, 2102, 2102, 799, 2102, 2102, 2647, 2102, 2102, 2627, - /* 3100 */ 383, 2610, 801, 2612, 2613, 796, 2102, 819, 2102, 2102, - /* 3110 */ 2102, 2102, 2575, 2102, 797, 2102, 2102, 2102, 2102, 2102, - /* 3120 */ 2102, 2102, 2102, 2102, 2102, 2102, 2102, 2102, 2102, 2102, - /* 3130 */ 2102, 2102, 2102, 2102, 2102, 2102, 2102, 2102, 2102, 2102, - /* 3140 */ 2102, 2102, 2102, 2102, 2102, 2102, 2102, 2102, 2102, 2102, - /* 3150 */ 2102, 2102, 2102, 2102, 2102, 2102, 2608, 2102, 2102, 2647, - /* 3160 */ 2102, 2102, 2102, 382, 2610, 801, 2612, 2613, 796, 2102, - /* 3170 */ 819, + /* 0 */ 873, 527, 2502, 2338, 631, 2323, 526, 632, 2192, 2405, + /* 10 */ 2626, 2573, 47, 45, 2067, 2625, 454, 33, 478, 821, + /* 20 */ 459, 2585, 1888, 40, 39, 2403, 2500, 46, 44, 43, + /* 30 */ 42, 41, 2774, 35, 2502, 1976, 197, 1886, 2235, 40, + /* 40 */ 39, 480, 2667, 46, 44, 43, 42, 41, 1913, 174, + /* 50 */ 2490, 2491, 791, 155, 745, 794, 9, 2349, 2771, 429, + /* 60 */ 841, 2471, 2857, 40, 39, 1971, 467, 46, 44, 43, + /* 70 */ 42, 41, 19, 467, 745, 715, 883, 846, 467, 1894, + /* 80 */ 2863, 216, 2857, 2685, 846, 2858, 780, 841, 2405, 846, + /* 90 */ 713, 2774, 711, 285, 284, 427, 2632, 729, 816, 639, + /* 100 */ 2863, 216, 632, 2192, 2403, 2858, 780, 650, 941, 445, + /* 110 */ 2549, 15, 916, 915, 914, 913, 490, 2770, 912, 911, + /* 120 */ 160, 906, 905, 904, 903, 902, 901, 900, 159, 894, + /* 130 */ 893, 892, 489, 488, 889, 888, 887, 196, 195, 886, + /* 140 */ 485, 885, 884, 482, 2502, 2666, 2398, 2400, 2705, 1978, + /* 150 */ 1979, 50, 121, 2668, 820, 2670, 2671, 815, 190, 846, + /* 160 */ 314, 821, 1448, 636, 199, 462, 2759, 2111, 2499, 633, + /* 170 */ 455, 2755, 192, 2767, 790, 66, 147, 789, 641, 2541, + /* 180 */ 2042, 1455, 1913, 779, 2857, 543, 2467, 1949, 1959, 1563, + /* 190 */ 217, 2857, 2642, 779, 791, 155, 1977, 1980, 2806, 37, + /* 200 */ 325, 2857, 778, 216, 1450, 1453, 1454, 2858, 780, 778, + /* 210 */ 216, 1889, 2150, 1887, 2858, 780, 590, 2646, 62, 778, + /* 220 */ 216, 728, 40, 39, 2858, 780, 46, 44, 43, 42, + /* 230 */ 41, 1565, 183, 136, 2161, 231, 135, 134, 133, 132, + /* 240 */ 131, 130, 129, 128, 127, 1892, 1893, 1946, 222, 1948, + /* 250 */ 1951, 1952, 1953, 1954, 1955, 1956, 1957, 1958, 812, 844, + /* 260 */ 843, 1970, 1972, 1973, 1974, 1975, 2, 47, 45, 2648, + /* 270 */ 2650, 456, 403, 62, 1911, 459, 534, 1888, 2405, 2862, + /* 280 */ 846, 578, 62, 240, 599, 463, 419, 2857, 1913, 598, + /* 290 */ 1976, 1914, 1886, 896, 2403, 2779, 2039, 2040, 2041, 2779, + /* 300 */ 2779, 2779, 2779, 2779, 841, 557, 2861, 600, 589, 239, + /* 310 */ 2858, 2860, 409, 559, 125, 2767, 2768, 647, 153, 2772, + /* 320 */ 1971, 587, 596, 594, 537, 404, 12, 19, 10, 229, + /* 330 */ 2071, 1913, 321, 2005, 1894, 136, 1913, 768, 135, 134, + /* 340 */ 133, 132, 131, 130, 129, 128, 127, 2667, 51, 697, + /* 350 */ 696, 695, 2172, 2862, 842, 2347, 687, 152, 691, 898, + /* 360 */ 817, 2857, 690, 941, 430, 2685, 15, 689, 694, 438, + /* 370 */ 437, 648, 119, 688, 146, 545, 654, 436, 684, 683, + /* 380 */ 2861, 677, 842, 2347, 2858, 2859, 40, 39, 2685, 158, + /* 390 */ 46, 44, 43, 42, 41, 50, 62, 2339, 1917, 321, + /* 400 */ 2006, 2632, 146, 816, 1978, 1979, 2632, 2478, 2457, 682, + /* 410 */ 586, 585, 584, 583, 582, 577, 576, 575, 574, 413, + /* 420 */ 1660, 1661, 2042, 563, 562, 561, 560, 554, 553, 552, + /* 430 */ 2502, 547, 546, 428, 649, 2495, 767, 538, 1720, 1721, + /* 440 */ 791, 155, 1949, 1959, 1739, 464, 2489, 2491, 791, 155, + /* 450 */ 2666, 1977, 1980, 2705, 321, 1732, 1733, 121, 2668, 820, + /* 460 */ 2670, 2671, 815, 321, 846, 724, 1889, 157, 1887, 165, + /* 470 */ 2730, 2759, 2424, 40, 39, 455, 2755, 46, 44, 43, + /* 480 */ 42, 41, 2171, 209, 36, 457, 2000, 2001, 2002, 2003, + /* 490 */ 2004, 2008, 2009, 2010, 2011, 525, 2392, 524, 1950, 651, + /* 500 */ 1892, 1893, 1946, 1950, 1948, 1951, 1952, 1953, 1954, 1955, + /* 510 */ 1956, 1957, 1958, 812, 844, 843, 1970, 1972, 1973, 1974, + /* 520 */ 1975, 2, 12, 47, 45, 444, 2549, 523, 251, 321, + /* 530 */ 182, 459, 634, 1888, 2200, 383, 2632, 2779, 2039, 2040, + /* 540 */ 2041, 2779, 2779, 2779, 2779, 2779, 1976, 2170, 1886, 43, + /* 550 */ 42, 41, 381, 76, 1897, 2485, 75, 564, 1947, 793, + /* 560 */ 185, 2767, 2768, 1947, 153, 2772, 410, 212, 186, 2767, + /* 570 */ 2768, 156, 153, 2772, 2730, 1621, 1971, 321, 249, 613, + /* 580 */ 611, 608, 606, 19, 2044, 2045, 2046, 2047, 2048, 725, + /* 590 */ 1894, 1612, 871, 870, 869, 1616, 868, 1618, 1619, 867, + /* 600 */ 864, 2632, 1627, 861, 1629, 1630, 858, 855, 852, 100, + /* 610 */ 2100, 412, 411, 46, 44, 43, 42, 41, 883, 941, + /* 620 */ 764, 468, 15, 62, 1621, 1918, 431, 881, 171, 170, + /* 630 */ 878, 877, 876, 168, 1976, 2342, 477, 2222, 573, 572, + /* 640 */ 1612, 871, 870, 869, 1616, 868, 1618, 1619, 811, 810, + /* 650 */ 2862, 1627, 809, 1629, 1630, 808, 855, 852, 807, 698, + /* 660 */ 1978, 1979, 1621, 63, 1971, 1916, 806, 1916, 2142, 761, + /* 670 */ 760, 2098, 2099, 2101, 2102, 2103, 14, 13, 1612, 871, + /* 680 */ 870, 869, 1616, 868, 1618, 1619, 867, 864, 2064, 1627, + /* 690 */ 861, 1629, 1630, 858, 855, 852, 40, 39, 1949, 1959, + /* 700 */ 46, 44, 43, 42, 41, 40, 39, 1977, 1980, 46, + /* 710 */ 44, 43, 42, 41, 288, 87, 86, 530, 287, 253, + /* 720 */ 228, 29, 1889, 634, 1887, 2200, 770, 765, 758, 754, + /* 730 */ 1900, 40, 39, 522, 520, 46, 44, 43, 42, 41, + /* 740 */ 2092, 549, 2467, 2653, 408, 580, 2467, 509, 2399, 2400, + /* 750 */ 506, 502, 498, 495, 523, 2093, 1892, 1893, 1946, 2135, + /* 760 */ 1948, 1951, 1952, 1953, 1954, 1955, 1956, 1957, 1958, 812, + /* 770 */ 844, 843, 1970, 1972, 1973, 1974, 1975, 2, 47, 45, + /* 780 */ 1981, 2667, 1455, 651, 2141, 724, 459, 2019, 1888, 2149, + /* 790 */ 103, 233, 2405, 416, 794, 238, 443, 2091, 717, 466, + /* 800 */ 2112, 1976, 2324, 1886, 321, 2655, 1453, 1454, 2403, 2083, + /* 810 */ 1879, 2667, 1855, 145, 144, 143, 142, 141, 140, 139, + /* 820 */ 138, 137, 2685, 769, 817, 704, 2202, 2322, 842, 2347, + /* 830 */ 2642, 1971, 726, 1917, 319, 2632, 319, 816, 628, 2485, + /* 840 */ 716, 652, 470, 469, 1880, 1894, 2550, 626, 220, 181, + /* 850 */ 622, 618, 2685, 435, 434, 2646, 286, 2283, 844, 843, + /* 860 */ 1970, 1972, 1973, 1974, 1975, 2632, 1474, 816, 1473, 1986, + /* 870 */ 842, 2347, 707, 3, 941, 1913, 1474, 48, 1473, 701, + /* 880 */ 699, 1477, 1478, 151, 2666, 53, 283, 2705, 487, 486, + /* 890 */ 55, 121, 2668, 820, 2670, 2671, 815, 12, 846, 842, + /* 900 */ 2347, 1475, 2440, 199, 795, 2759, 2586, 2648, 2651, 455, + /* 910 */ 2755, 1475, 123, 1895, 2666, 1978, 1979, 2705, 846, 531, + /* 920 */ 2405, 121, 2668, 820, 2670, 2671, 815, 481, 846, 433, + /* 930 */ 432, 72, 679, 2877, 71, 2759, 2403, 2807, 899, 455, + /* 940 */ 2755, 2308, 473, 197, 881, 171, 170, 878, 877, 876, + /* 950 */ 168, 2667, 2169, 1949, 1959, 476, 681, 745, 729, 745, + /* 960 */ 680, 786, 1977, 1980, 817, 2857, 2814, 2857, 2472, 881, + /* 970 */ 171, 170, 878, 877, 876, 168, 2042, 1889, 2063, 1887, + /* 980 */ 800, 744, 2731, 2863, 216, 2863, 216, 2007, 2858, 780, + /* 990 */ 2858, 780, 2685, 40, 39, 2667, 1917, 46, 44, 43, + /* 1000 */ 42, 41, 207, 673, 672, 2632, 2632, 816, 817, 289, + /* 1010 */ 2827, 1892, 1893, 1946, 1914, 1948, 1951, 1952, 1953, 1954, + /* 1020 */ 1955, 1956, 1957, 1958, 812, 844, 843, 1970, 1972, 1973, + /* 1030 */ 1974, 1975, 2, 47, 45, 1917, 2685, 465, 2554, 731, + /* 1040 */ 2541, 459, 1950, 1888, 802, 180, 2731, 842, 2347, 2632, + /* 1050 */ 1946, 816, 2774, 2349, 2666, 2861, 1976, 2705, 1886, 2147, + /* 1060 */ 1918, 121, 2668, 820, 2670, 2671, 815, 532, 846, 100, + /* 1070 */ 571, 34, 2667, 2877, 570, 2759, 842, 2347, 2769, 455, + /* 1080 */ 2755, 2012, 569, 842, 2347, 817, 1971, 756, 235, 1898, + /* 1090 */ 1816, 1817, 2039, 2040, 2041, 2343, 551, 1894, 2666, 290, + /* 1100 */ 1894, 2705, 1947, 565, 148, 121, 2668, 820, 2670, 2671, + /* 1110 */ 815, 2405, 846, 2685, 842, 2347, 89, 2877, 1857, 2759, + /* 1120 */ 60, 842, 2347, 455, 2755, 2667, 2632, 798, 816, 941, + /* 1130 */ 742, 1856, 48, 94, 566, 681, 93, 874, 817, 680, + /* 1140 */ 2850, 567, 722, 1763, 1764, 493, 675, 674, 472, 471, + /* 1150 */ 492, 480, 842, 2347, 842, 2347, 842, 2347, 511, 180, + /* 1160 */ 368, 475, 474, 693, 692, 211, 2685, 2349, 842, 2347, + /* 1170 */ 1978, 1979, 653, 2284, 2344, 2666, 291, 875, 2705, 2632, + /* 1180 */ 2396, 816, 121, 2668, 820, 2670, 2671, 815, 299, 846, + /* 1190 */ 1762, 1765, 329, 330, 2877, 745, 2759, 328, 745, 483, + /* 1200 */ 455, 2755, 2168, 2857, 1575, 92, 2857, 180, 1949, 1959, + /* 1210 */ 910, 908, 180, 879, 91, 2349, 2396, 1977, 1980, 1574, + /* 1220 */ 2350, 2863, 216, 1918, 2863, 216, 2858, 780, 2666, 2858, + /* 1230 */ 780, 2705, 1889, 2238, 1887, 121, 2668, 820, 2670, 2671, + /* 1240 */ 815, 2405, 846, 2167, 842, 2347, 787, 2877, 1913, 2759, + /* 1250 */ 2667, 2166, 880, 455, 2755, 2396, 2632, 829, 377, 2177, + /* 1260 */ 936, 2382, 1918, 817, 797, 2791, 1892, 1893, 1946, 2165, + /* 1270 */ 1948, 1951, 1952, 1953, 1954, 1955, 1956, 1957, 1958, 812, + /* 1280 */ 844, 843, 1970, 1972, 1973, 1974, 1975, 2, 47, 45, + /* 1290 */ 601, 2685, 842, 2347, 515, 1579, 459, 2632, 1888, 842, + /* 1300 */ 2347, 104, 2405, 773, 2632, 2632, 816, 697, 696, 695, + /* 1310 */ 1578, 1976, 333, 1886, 687, 152, 691, 2164, 2404, 336, + /* 1320 */ 690, 517, 513, 2632, 1457, 689, 694, 438, 437, 1888, + /* 1330 */ 1912, 688, 842, 2347, 1791, 436, 684, 683, 842, 2347, + /* 1340 */ 2163, 1971, 2160, 2159, 1886, 2158, 783, 2157, 842, 2347, + /* 1350 */ 842, 2347, 839, 2666, 2156, 1894, 2705, 79, 840, 2155, + /* 1360 */ 121, 2668, 820, 2670, 2671, 815, 782, 846, 364, 2053, + /* 1370 */ 484, 2632, 2877, 2154, 2759, 487, 486, 730, 455, 2755, + /* 1380 */ 2667, 603, 113, 2153, 941, 1902, 1894, 15, 169, 2152, + /* 1390 */ 2576, 2450, 276, 817, 2632, 274, 2632, 2632, 1976, 2632, + /* 1400 */ 1895, 2632, 2325, 278, 1559, 685, 277, 2340, 2632, 2220, + /* 1410 */ 2211, 280, 90, 2632, 279, 941, 282, 162, 300, 281, + /* 1420 */ 686, 2685, 719, 271, 718, 1978, 1979, 2632, 1971, 1557, + /* 1430 */ 745, 700, 702, 541, 2632, 161, 816, 2632, 2857, 191, + /* 1440 */ 805, 500, 1894, 2632, 1555, 162, 1560, 2209, 671, 667, + /* 1450 */ 663, 659, 2336, 270, 2144, 2145, 2863, 216, 14, 13, + /* 1460 */ 1896, 2858, 780, 1949, 1959, 752, 105, 54, 49, 705, + /* 1470 */ 49, 804, 1977, 1980, 2332, 1947, 200, 2334, 169, 64, + /* 1480 */ 2330, 49, 49, 2666, 327, 77, 2705, 1889, 169, 1887, + /* 1490 */ 121, 2668, 820, 2670, 2671, 815, 1807, 846, 101, 78, + /* 1500 */ 296, 268, 2734, 210, 2759, 2162, 167, 169, 455, 2755, + /* 1510 */ 343, 342, 345, 344, 347, 346, 2820, 74, 1889, 850, + /* 1520 */ 1887, 1892, 1893, 1946, 1814, 1948, 1951, 1952, 1953, 1954, + /* 1530 */ 1955, 1956, 1957, 1958, 812, 844, 843, 1970, 1972, 1973, + /* 1540 */ 1974, 1975, 2, 2667, 2087, 349, 348, 2097, 1538, 2096, + /* 1550 */ 351, 350, 1892, 1893, 190, 305, 817, 796, 2013, 167, + /* 1560 */ 1960, 1760, 169, 331, 826, 353, 352, 1747, 355, 354, + /* 1570 */ 256, 357, 356, 149, 1903, 315, 1898, 762, 832, 267, + /* 1580 */ 359, 358, 258, 265, 2685, 339, 1605, 167, 263, 645, + /* 1590 */ 1539, 2667, 361, 360, 363, 362, 376, 2632, 1634, 816, + /* 1600 */ 1511, 118, 792, 307, 817, 150, 890, 255, 1906, 1908, + /* 1610 */ 115, 891, 2203, 1997, 2686, 2277, 2276, 2476, 2193, 2810, + /* 1620 */ 2667, 759, 844, 843, 1970, 1972, 1973, 1974, 1975, 784, + /* 1630 */ 1530, 450, 2685, 817, 766, 1528, 1899, 446, 1642, 823, + /* 1640 */ 491, 1649, 1512, 2477, 2199, 2632, 2666, 816, 2393, 2705, + /* 1650 */ 738, 2811, 1647, 121, 2668, 820, 2670, 2671, 815, 2821, + /* 1660 */ 846, 2685, 774, 775, 934, 2732, 172, 2759, 312, 317, + /* 1670 */ 320, 455, 2755, 2309, 2632, 499, 816, 5, 494, 425, + /* 1680 */ 507, 508, 518, 1921, 224, 519, 2667, 226, 223, 1784, + /* 1690 */ 371, 521, 1911, 535, 2666, 1912, 542, 2705, 237, 817, + /* 1700 */ 544, 121, 2668, 820, 2670, 2671, 815, 548, 846, 550, + /* 1710 */ 592, 555, 568, 801, 579, 2759, 2469, 581, 588, 455, + /* 1720 */ 2755, 605, 604, 2666, 591, 593, 2705, 2685, 2667, 602, + /* 1730 */ 122, 2668, 820, 2670, 2671, 815, 242, 846, 243, 609, + /* 1740 */ 2632, 817, 816, 607, 2759, 610, 246, 1919, 2758, 2755, + /* 1750 */ 612, 629, 2667, 614, 4, 637, 630, 638, 254, 1914, + /* 1760 */ 1920, 642, 640, 96, 257, 814, 1922, 643, 1923, 2685, + /* 1770 */ 260, 646, 644, 2496, 1924, 2486, 262, 676, 655, 97, + /* 1780 */ 98, 124, 2632, 2563, 816, 678, 99, 2560, 269, 2666, + /* 1790 */ 708, 709, 2705, 2685, 2667, 405, 122, 2668, 820, 2670, + /* 1800 */ 2671, 815, 2337, 846, 721, 2559, 2632, 817, 816, 273, + /* 1810 */ 2759, 2333, 275, 723, 803, 2755, 175, 176, 2335, 2331, + /* 1820 */ 102, 177, 292, 1915, 178, 733, 2542, 163, 734, 737, + /* 1830 */ 732, 818, 297, 763, 2705, 2685, 295, 740, 122, 2668, + /* 1840 */ 820, 2670, 2671, 815, 2826, 846, 749, 824, 2632, 772, + /* 1850 */ 816, 2825, 2759, 8, 189, 2666, 418, 2755, 2705, 750, + /* 1860 */ 2667, 2798, 399, 2668, 820, 2670, 2671, 815, 813, 846, + /* 1870 */ 799, 2724, 306, 817, 302, 739, 304, 2667, 748, 777, + /* 1880 */ 372, 747, 776, 311, 451, 2880, 788, 2856, 785, 316, + /* 1890 */ 817, 154, 1916, 2061, 2059, 203, 61, 2666, 322, 164, + /* 1900 */ 2705, 2685, 822, 2510, 184, 2668, 820, 2670, 2671, 815, + /* 1910 */ 373, 846, 374, 2509, 2632, 2775, 816, 2508, 2685, 461, + /* 1920 */ 827, 828, 166, 835, 833, 337, 837, 375, 112, 2740, + /* 1930 */ 2624, 2632, 838, 816, 2348, 114, 2623, 308, 313, 309, + /* 1940 */ 2619, 2618, 310, 2778, 1432, 2610, 2609, 1, 2601, 2600, + /* 1950 */ 218, 746, 2817, 2616, 2615, 2667, 378, 173, 2607, 935, + /* 1960 */ 938, 2606, 2595, 2666, 848, 2594, 2705, 2613, 817, 2612, + /* 1970 */ 187, 2668, 820, 2670, 2671, 815, 2604, 846, 2603, 940, + /* 1980 */ 2666, 2592, 727, 2705, 2591, 366, 2589, 122, 2668, 820, + /* 1990 */ 2670, 2671, 815, 2588, 846, 2667, 2685, 2397, 390, 423, + /* 2000 */ 944, 2759, 401, 52, 391, 382, 2756, 380, 817, 2632, + /* 2010 */ 2584, 816, 424, 2583, 2582, 84, 370, 2577, 497, 402, + /* 2020 */ 501, 496, 1839, 1840, 221, 2575, 503, 504, 505, 781, + /* 2030 */ 2878, 1838, 206, 2574, 2667, 426, 2685, 2572, 510, 2571, + /* 2040 */ 512, 932, 928, 924, 920, 2570, 367, 817, 514, 2632, + /* 2050 */ 2569, 816, 516, 1827, 2546, 2545, 225, 227, 2666, 85, + /* 2060 */ 1787, 2705, 1786, 2523, 2522, 184, 2668, 820, 2670, 2671, + /* 2070 */ 815, 2521, 846, 528, 529, 2685, 448, 2520, 2519, 2667, + /* 2080 */ 2459, 533, 2456, 1719, 2455, 536, 2449, 540, 2632, 539, + /* 2090 */ 816, 120, 817, 2446, 340, 230, 2445, 2444, 2666, 2443, + /* 2100 */ 2448, 2705, 88, 2447, 2442, 400, 2668, 820, 2670, 2671, + /* 2110 */ 815, 232, 846, 2818, 2667, 449, 2441, 2439, 2438, 2437, + /* 2120 */ 2685, 234, 556, 2436, 2434, 558, 2433, 817, 830, 2432, + /* 2130 */ 2431, 2483, 2454, 2632, 2430, 816, 236, 2666, 2429, 2428, + /* 2140 */ 2705, 2452, 2435, 2427, 400, 2668, 820, 2670, 2671, 815, + /* 2150 */ 2426, 846, 2425, 2423, 2422, 2685, 2421, 2420, 2419, 2418, + /* 2160 */ 2417, 2416, 2667, 2415, 2414, 95, 2413, 2484, 2632, 2453, + /* 2170 */ 816, 2451, 338, 2412, 2411, 814, 324, 1725, 2410, 2409, + /* 2180 */ 595, 323, 2666, 241, 2408, 2705, 2407, 597, 2406, 393, + /* 2190 */ 2668, 820, 2670, 2671, 815, 414, 846, 1576, 1580, 415, + /* 2200 */ 293, 2242, 244, 2685, 2241, 245, 2240, 1572, 2667, 247, + /* 2210 */ 2239, 248, 2237, 2234, 615, 2233, 2632, 2666, 816, 616, + /* 2220 */ 2705, 817, 617, 620, 187, 2668, 820, 2670, 2671, 815, + /* 2230 */ 619, 846, 621, 2226, 623, 2213, 624, 625, 2188, 627, + /* 2240 */ 771, 250, 81, 2652, 198, 1456, 2667, 208, 635, 2685, + /* 2250 */ 2187, 252, 2544, 2540, 2530, 2518, 82, 2517, 259, 817, + /* 2260 */ 261, 2494, 2632, 2482, 816, 2666, 264, 2326, 2705, 266, + /* 2270 */ 2236, 2232, 399, 2668, 820, 2670, 2671, 815, 1504, 846, + /* 2280 */ 656, 2725, 658, 657, 2879, 660, 662, 2685, 2230, 458, + /* 2290 */ 661, 2667, 2228, 664, 2225, 668, 665, 669, 2208, 2206, + /* 2300 */ 2632, 666, 816, 2207, 817, 1654, 670, 2205, 2184, 2328, + /* 2310 */ 73, 2666, 1653, 2327, 2705, 1562, 1561, 1558, 400, 2668, + /* 2320 */ 820, 2670, 2671, 815, 2667, 846, 272, 460, 1556, 2223, + /* 2330 */ 1554, 2221, 2685, 1553, 1552, 2212, 703, 817, 1551, 1550, + /* 2340 */ 1545, 1547, 439, 907, 909, 2632, 440, 816, 441, 2666, + /* 2350 */ 2210, 1546, 2705, 1544, 442, 2667, 400, 2668, 820, 2670, + /* 2360 */ 2671, 815, 706, 846, 2183, 2685, 2182, 2181, 817, 714, + /* 2370 */ 710, 2180, 2179, 712, 126, 1821, 1823, 1820, 2632, 2543, + /* 2380 */ 816, 1825, 2539, 28, 725, 67, 294, 1795, 1811, 1793, + /* 2390 */ 2529, 2516, 56, 2515, 720, 735, 2685, 2705, 2862, 1797, + /* 2400 */ 30, 395, 2668, 820, 2670, 2671, 815, 20, 846, 2632, + /* 2410 */ 57, 816, 736, 298, 1772, 1771, 58, 301, 17, 2667, + /* 2420 */ 741, 179, 743, 751, 2114, 447, 753, 2666, 6, 2088, + /* 2430 */ 2705, 755, 817, 7, 385, 2668, 820, 2670, 2671, 815, + /* 2440 */ 2667, 846, 303, 21, 22, 202, 2095, 213, 757, 2653, + /* 2450 */ 2056, 32, 214, 817, 188, 201, 31, 83, 2666, 23, + /* 2460 */ 2685, 2705, 215, 2667, 2054, 384, 2668, 820, 2670, 2671, + /* 2470 */ 815, 2082, 846, 2632, 2052, 816, 817, 65, 24, 18, + /* 2480 */ 2134, 2685, 2135, 2129, 2128, 2667, 452, 2133, 2132, 453, + /* 2490 */ 318, 59, 2036, 2035, 2632, 2514, 816, 193, 817, 107, + /* 2500 */ 106, 25, 11, 1988, 2685, 2493, 1987, 1904, 2667, 13, + /* 2510 */ 857, 1998, 194, 1963, 1962, 860, 863, 2632, 866, 816, + /* 2520 */ 38, 817, 2666, 1939, 204, 2705, 2685, 1961, 16, 386, + /* 2530 */ 2668, 820, 2670, 2671, 815, 26, 846, 1931, 27, 2632, + /* 2540 */ 326, 816, 2090, 2666, 2492, 205, 2705, 332, 819, 2685, + /* 2550 */ 392, 2668, 820, 2670, 2671, 815, 108, 846, 334, 2481, + /* 2560 */ 110, 341, 2632, 115, 816, 834, 2666, 825, 836, 2705, + /* 2570 */ 69, 109, 70, 396, 2668, 820, 2670, 2671, 815, 831, + /* 2580 */ 846, 335, 111, 2710, 2709, 847, 849, 845, 2666, 68, + /* 2590 */ 2667, 2705, 1965, 1635, 479, 387, 2668, 820, 2670, 2671, + /* 2600 */ 815, 851, 846, 817, 1632, 853, 1631, 854, 856, 1628, + /* 2610 */ 859, 2666, 1622, 2667, 2705, 862, 1620, 865, 397, 2668, + /* 2620 */ 820, 2670, 2671, 815, 116, 846, 817, 1626, 365, 1648, + /* 2630 */ 872, 2685, 2667, 1611, 117, 80, 1625, 1624, 1644, 1502, + /* 2640 */ 1623, 882, 1541, 1540, 2632, 817, 816, 1537, 1534, 1533, + /* 2650 */ 1532, 1531, 1529, 1570, 2685, 1527, 1526, 2667, 1525, 895, + /* 2660 */ 1569, 897, 219, 1523, 1520, 1522, 1566, 2632, 1521, 816, + /* 2670 */ 817, 1519, 1518, 2685, 1517, 1564, 1514, 2667, 1513, 1508, + /* 2680 */ 1510, 1509, 1507, 2231, 917, 2229, 2632, 918, 816, 921, + /* 2690 */ 817, 919, 923, 2666, 2227, 925, 2705, 2224, 2685, 922, + /* 2700 */ 388, 2668, 820, 2670, 2671, 815, 926, 846, 927, 929, + /* 2710 */ 930, 2632, 931, 816, 2204, 933, 2666, 1445, 2685, 2705, + /* 2720 */ 2178, 1433, 937, 398, 2668, 820, 2670, 2671, 815, 369, + /* 2730 */ 846, 2632, 939, 816, 1890, 2666, 943, 379, 2705, 942, + /* 2740 */ 2148, 2667, 389, 2668, 820, 2670, 2671, 815, 2148, 846, + /* 2750 */ 2148, 2148, 2148, 2148, 817, 2148, 2148, 2148, 2148, 2148, + /* 2760 */ 2666, 2148, 2148, 2705, 2148, 2148, 2148, 406, 2668, 820, + /* 2770 */ 2670, 2671, 815, 2148, 846, 2148, 2148, 2148, 2148, 2148, + /* 2780 */ 2666, 2148, 2685, 2705, 2148, 2148, 2148, 407, 2668, 820, + /* 2790 */ 2670, 2671, 815, 2148, 846, 2632, 2148, 816, 2148, 2148, + /* 2800 */ 2148, 2148, 2148, 2148, 2148, 2667, 2148, 2148, 2148, 2148, + /* 2810 */ 2148, 2148, 2148, 2148, 2148, 2148, 2148, 2148, 817, 2148, + /* 2820 */ 2148, 2148, 2148, 2148, 2148, 2148, 2667, 2148, 2148, 2148, + /* 2830 */ 2148, 2148, 2148, 2148, 2148, 2148, 2148, 2148, 2148, 817, + /* 2840 */ 2148, 2148, 2148, 2148, 2666, 2148, 2685, 2705, 2148, 2667, + /* 2850 */ 2148, 2679, 2668, 820, 2670, 2671, 815, 2148, 846, 2632, + /* 2860 */ 2148, 816, 817, 2148, 2148, 2148, 2148, 2685, 2148, 2148, + /* 2870 */ 2148, 2667, 2148, 2148, 2148, 2148, 2148, 2148, 2148, 2148, + /* 2880 */ 2632, 2148, 816, 2148, 817, 2148, 2148, 2148, 2148, 2148, + /* 2890 */ 2685, 2148, 2148, 2148, 2667, 2148, 2148, 2148, 2148, 2148, + /* 2900 */ 2148, 2148, 2148, 2632, 2148, 816, 2148, 817, 2666, 2148, + /* 2910 */ 2148, 2705, 2685, 2148, 2148, 2678, 2668, 820, 2670, 2671, + /* 2920 */ 815, 2148, 846, 2148, 2148, 2632, 2148, 816, 2148, 2666, + /* 2930 */ 2148, 2148, 2705, 2148, 2148, 2685, 2677, 2668, 820, 2670, + /* 2940 */ 2671, 815, 2148, 846, 2148, 2148, 2148, 2148, 2632, 2148, + /* 2950 */ 816, 2148, 2666, 2148, 2148, 2705, 2148, 2148, 2148, 420, + /* 2960 */ 2668, 820, 2670, 2671, 815, 2148, 846, 2148, 2148, 2148, + /* 2970 */ 2148, 2148, 2148, 2148, 2666, 2148, 2667, 2705, 2148, 2148, + /* 2980 */ 2148, 421, 2668, 820, 2670, 2671, 815, 2148, 846, 817, + /* 2990 */ 2148, 2148, 2148, 2148, 2148, 2148, 2148, 2666, 2148, 2667, + /* 3000 */ 2705, 2148, 2148, 2148, 417, 2668, 820, 2670, 2671, 815, + /* 3010 */ 2148, 846, 817, 2148, 2148, 2148, 2148, 2685, 2667, 2148, + /* 3020 */ 2148, 2148, 2148, 2148, 2148, 2148, 2148, 2148, 2148, 2148, + /* 3030 */ 2632, 817, 816, 2148, 2148, 2148, 2148, 2148, 2148, 2148, + /* 3040 */ 2685, 2148, 2148, 2148, 2148, 2148, 2148, 2148, 2148, 2148, + /* 3050 */ 2148, 2148, 2148, 2632, 2148, 816, 2148, 2148, 2148, 2685, + /* 3060 */ 2148, 2148, 2148, 2148, 2148, 2148, 2148, 2148, 2148, 2148, + /* 3070 */ 2148, 2148, 2632, 2148, 816, 2148, 2148, 2148, 2148, 2666, + /* 3080 */ 2148, 2148, 2705, 2148, 2148, 2148, 422, 2668, 820, 2670, + /* 3090 */ 2671, 815, 2148, 846, 2148, 2148, 2148, 2148, 2148, 2148, + /* 3100 */ 2148, 2148, 818, 2148, 2148, 2705, 2148, 2148, 2148, 395, + /* 3110 */ 2668, 820, 2670, 2671, 815, 2148, 846, 2148, 2148, 2148, + /* 3120 */ 2148, 2666, 2148, 2148, 2705, 2148, 2148, 2148, 394, 2668, + /* 3130 */ 820, 2670, 2671, 815, 2148, 846, }; static const YYCODETYPE yy_lookahead[] = { - /* 0 */ 501, 399, 501, 377, 411, 426, 380, 381, 509, 503, - /* 10 */ 509, 505, 12, 13, 14, 382, 399, 14, 15, 16, - /* 20 */ 20, 20, 22, 444, 445, 448, 424, 528, 527, 528, - /* 30 */ 453, 532, 533, 532, 533, 35, 3, 37, 0, 4, - /* 40 */ 20, 424, 12, 13, 8, 9, 370, 370, 12, 13, - /* 50 */ 14, 15, 16, 20, 391, 42, 382, 383, 23, 383, - /* 60 */ 467, 428, 429, 20, 431, 65, 0, 37, 435, 411, - /* 70 */ 0, 408, 72, 471, 472, 473, 418, 4, 501, 79, - /* 80 */ 417, 46, 47, 48, 482, 427, 509, 411, 471, 472, - /* 90 */ 24, 25, 26, 27, 28, 29, 30, 31, 32, 482, - /* 100 */ 424, 424, 426, 377, 527, 528, 380, 381, 108, 532, - /* 110 */ 533, 111, 74, 75, 76, 77, 78, 474, 80, 81, + /* 0 */ 414, 455, 428, 415, 379, 0, 460, 382, 383, 413, + /* 10 */ 415, 0, 12, 13, 14, 415, 420, 2, 418, 445, + /* 20 */ 20, 455, 22, 8, 9, 429, 452, 12, 13, 14, + /* 30 */ 15, 16, 481, 2, 428, 35, 413, 37, 0, 8, + /* 40 */ 9, 405, 372, 12, 13, 14, 15, 16, 20, 413, + /* 50 */ 444, 445, 384, 385, 508, 385, 42, 421, 507, 436, + /* 60 */ 20, 438, 516, 8, 9, 65, 478, 12, 13, 14, + /* 70 */ 15, 16, 72, 478, 508, 21, 71, 489, 478, 79, + /* 80 */ 534, 535, 516, 413, 489, 539, 540, 20, 413, 489, + /* 90 */ 36, 481, 38, 39, 40, 420, 426, 384, 428, 379, + /* 100 */ 534, 535, 382, 383, 429, 539, 540, 20, 108, 473, + /* 110 */ 474, 111, 74, 75, 76, 77, 78, 507, 80, 81, /* 120 */ 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, /* 130 */ 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, - /* 140 */ 102, 103, 104, 500, 468, 112, 20, 471, 112, 149, - /* 150 */ 150, 475, 476, 477, 478, 479, 480, 411, 482, 501, - /* 160 */ 14, 413, 14, 487, 416, 489, 20, 509, 20, 493, - /* 170 */ 494, 497, 498, 499, 422, 501, 502, 425, 426, 166, - /* 180 */ 434, 21, 436, 509, 111, 527, 528, 187, 188, 513, - /* 190 */ 532, 533, 149, 150, 194, 195, 36, 521, 38, 39, - /* 200 */ 40, 527, 528, 0, 382, 383, 532, 533, 0, 209, - /* 210 */ 71, 211, 142, 143, 144, 145, 146, 147, 148, 471, - /* 220 */ 8, 9, 189, 412, 12, 13, 14, 15, 16, 21, - /* 230 */ 482, 420, 24, 25, 26, 27, 28, 29, 30, 31, - /* 240 */ 32, 211, 121, 243, 244, 245, 245, 247, 248, 249, + /* 140 */ 102, 103, 104, 424, 428, 475, 427, 428, 478, 149, + /* 150 */ 150, 111, 482, 483, 484, 485, 486, 487, 510, 489, + /* 160 */ 512, 445, 4, 14, 494, 449, 496, 112, 452, 20, + /* 170 */ 500, 501, 504, 505, 506, 4, 508, 509, 465, 466, + /* 180 */ 166, 23, 20, 508, 516, 384, 385, 187, 188, 37, + /* 190 */ 520, 516, 401, 508, 384, 385, 196, 197, 528, 497, + /* 200 */ 498, 516, 534, 535, 46, 47, 48, 539, 540, 534, + /* 210 */ 535, 211, 0, 213, 539, 540, 88, 426, 111, 534, + /* 220 */ 535, 20, 8, 9, 539, 540, 12, 13, 14, 15, + /* 230 */ 16, 79, 371, 21, 373, 434, 24, 25, 26, 27, + /* 240 */ 28, 29, 30, 31, 32, 245, 246, 247, 237, 249, /* 250 */ 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, - /* 260 */ 260, 261, 262, 263, 264, 12, 13, 382, 383, 265, - /* 270 */ 18, 22, 20, 20, 71, 22, 413, 382, 383, 27, - /* 280 */ 382, 383, 30, 20, 72, 378, 37, 35, 35, 382, - /* 290 */ 37, 384, 279, 280, 281, 282, 283, 284, 285, 286, - /* 300 */ 287, 20, 2, 51, 166, 53, 382, 383, 8, 9, - /* 310 */ 58, 59, 12, 13, 14, 15, 16, 432, 65, 497, - /* 320 */ 498, 499, 70, 501, 502, 72, 402, 432, 79, 382, - /* 330 */ 383, 119, 79, 21, 471, 187, 24, 25, 26, 27, - /* 340 */ 28, 29, 30, 31, 32, 482, 111, 8, 9, 402, - /* 350 */ 370, 12, 13, 14, 15, 16, 409, 108, 108, 20, - /* 360 */ 33, 108, 110, 290, 111, 283, 284, 285, 286, 287, - /* 370 */ 413, 111, 122, 121, 124, 125, 126, 127, 128, 129, - /* 380 */ 130, 131, 132, 133, 370, 135, 136, 137, 138, 139, - /* 390 */ 140, 141, 0, 245, 496, 497, 498, 499, 186, 501, - /* 400 */ 502, 71, 149, 150, 424, 153, 154, 243, 156, 157, - /* 410 */ 158, 159, 160, 161, 162, 163, 164, 165, 280, 281, - /* 420 */ 282, 169, 170, 171, 172, 173, 174, 175, 471, 177, - /* 430 */ 178, 179, 490, 491, 389, 183, 184, 185, 424, 482, - /* 440 */ 187, 188, 190, 208, 0, 210, 382, 194, 195, 8, - /* 450 */ 9, 406, 410, 12, 13, 14, 15, 16, 209, 414, - /* 460 */ 211, 369, 209, 371, 211, 423, 302, 303, 304, 305, - /* 470 */ 306, 307, 308, 378, 33, 240, 426, 382, 79, 384, - /* 480 */ 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, - /* 490 */ 278, 441, 243, 244, 444, 445, 243, 244, 245, 13, - /* 500 */ 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, - /* 510 */ 257, 258, 259, 260, 261, 262, 263, 264, 265, 12, - /* 520 */ 13, 474, 458, 459, 501, 290, 18, 20, 189, 22, - /* 530 */ 421, 23, 509, 424, 142, 143, 144, 145, 146, 147, - /* 540 */ 148, 370, 35, 411, 37, 20, 22, 500, 40, 41, - /* 550 */ 290, 528, 44, 112, 383, 532, 533, 2, 382, 383, - /* 560 */ 370, 37, 54, 8, 9, 79, 20, 12, 13, 14, - /* 570 */ 15, 16, 65, 383, 66, 67, 68, 69, 70, 72, - /* 580 */ 382, 383, 411, 143, 245, 20, 79, 22, 382, 383, - /* 590 */ 12, 13, 14, 15, 16, 424, 20, 426, 466, 467, - /* 600 */ 402, 411, 37, 79, 382, 108, 111, 409, 432, 37, - /* 610 */ 166, 167, 39, 40, 424, 108, 426, 193, 111, 111, - /* 620 */ 55, 124, 125, 126, 127, 128, 129, 130, 131, 132, - /* 630 */ 133, 51, 135, 136, 137, 138, 139, 140, 141, 468, - /* 640 */ 60, 314, 471, 63, 64, 383, 475, 476, 477, 478, - /* 650 */ 479, 480, 481, 482, 483, 484, 149, 150, 468, 151, - /* 660 */ 144, 471, 222, 223, 148, 475, 476, 477, 478, 479, - /* 670 */ 480, 398, 482, 411, 401, 485, 14, 487, 488, 489, - /* 680 */ 458, 459, 20, 493, 494, 20, 166, 111, 115, 116, - /* 690 */ 0, 118, 8, 9, 187, 188, 12, 13, 14, 15, - /* 700 */ 16, 194, 195, 497, 498, 499, 121, 501, 502, 201, - /* 710 */ 202, 203, 187, 188, 206, 142, 209, 20, 211, 146, - /* 720 */ 296, 297, 298, 299, 37, 8, 9, 219, 220, 12, - /* 730 */ 13, 14, 15, 16, 218, 189, 65, 221, 230, 477, - /* 740 */ 224, 233, 226, 34, 236, 237, 238, 239, 240, 88, - /* 750 */ 243, 244, 245, 0, 247, 248, 249, 250, 251, 252, - /* 760 */ 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, - /* 770 */ 263, 264, 12, 13, 14, 265, 370, 267, 70, 370, - /* 780 */ 20, 110, 22, 211, 113, 290, 382, 50, 225, 383, - /* 790 */ 227, 245, 382, 383, 35, 35, 370, 37, 290, 279, - /* 800 */ 280, 281, 282, 283, 284, 285, 286, 287, 111, 383, - /* 810 */ 51, 385, 402, 241, 242, 403, 155, 411, 411, 60, - /* 820 */ 61, 62, 63, 411, 65, 65, 419, 74, 75, 76, - /* 830 */ 424, 419, 426, 424, 81, 82, 83, 411, 370, 79, - /* 840 */ 87, 180, 181, 439, 440, 92, 93, 94, 95, 187, - /* 850 */ 424, 98, 426, 182, 189, 102, 103, 104, 168, 8, - /* 860 */ 9, 412, 172, 12, 13, 14, 15, 16, 108, 110, - /* 870 */ 180, 111, 113, 189, 468, 72, 370, 471, 466, 467, - /* 880 */ 411, 475, 476, 477, 478, 479, 480, 418, 482, 383, - /* 890 */ 13, 385, 424, 487, 468, 489, 427, 471, 211, 493, - /* 900 */ 494, 475, 476, 477, 478, 479, 480, 245, 482, 149, - /* 910 */ 150, 474, 204, 487, 20, 489, 22, 411, 201, 493, - /* 920 */ 494, 23, 382, 383, 382, 383, 189, 521, 241, 242, - /* 930 */ 424, 486, 426, 488, 197, 412, 20, 500, 370, 231, - /* 940 */ 232, 182, 402, 0, 402, 47, 48, 187, 188, 55, - /* 950 */ 191, 192, 382, 383, 194, 195, 79, 198, 199, 186, - /* 960 */ 8, 9, 20, 112, 12, 13, 14, 15, 16, 209, - /* 970 */ 412, 211, 402, 20, 468, 448, 217, 471, 448, 20, - /* 980 */ 454, 475, 476, 477, 478, 479, 480, 290, 482, 370, - /* 990 */ 403, 448, 424, 487, 51, 489, 143, 144, 411, 493, - /* 1000 */ 494, 148, 383, 243, 244, 245, 419, 247, 248, 249, - /* 1010 */ 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, - /* 1020 */ 260, 261, 262, 263, 264, 12, 13, 370, 501, 392, - /* 1030 */ 411, 501, 22, 20, 317, 22, 509, 400, 412, 509, - /* 1040 */ 383, 268, 385, 424, 501, 426, 243, 37, 35, 411, - /* 1050 */ 37, 278, 509, 111, 527, 528, 403, 527, 528, 532, - /* 1060 */ 533, 403, 532, 533, 411, 149, 150, 37, 411, 411, - /* 1070 */ 527, 528, 419, 370, 436, 532, 533, 419, 65, 425, - /* 1080 */ 426, 424, 407, 426, 382, 383, 383, 468, 385, 370, - /* 1090 */ 471, 370, 79, 3, 475, 476, 477, 478, 479, 480, - /* 1100 */ 4, 482, 382, 383, 402, 370, 487, 411, 489, 79, - /* 1110 */ 194, 195, 493, 494, 411, 19, 1, 2, 108, 370, - /* 1120 */ 14, 108, 402, 427, 111, 468, 20, 424, 471, 426, - /* 1130 */ 412, 35, 475, 476, 477, 478, 479, 480, 463, 482, - /* 1140 */ 187, 448, 411, 424, 487, 424, 489, 51, 189, 418, - /* 1150 */ 493, 494, 382, 383, 58, 59, 382, 383, 427, 424, - /* 1160 */ 22, 65, 149, 150, 142, 143, 144, 145, 146, 147, - /* 1170 */ 148, 468, 402, 424, 471, 37, 402, 411, 475, 476, - /* 1180 */ 477, 478, 479, 480, 418, 482, 20, 370, 56, 57, - /* 1190 */ 487, 370, 489, 427, 501, 370, 493, 494, 245, 370, - /* 1200 */ 187, 188, 509, 412, 245, 370, 110, 194, 195, 113, - /* 1210 */ 74, 75, 76, 382, 383, 382, 383, 81, 82, 83, - /* 1220 */ 527, 528, 209, 87, 211, 532, 533, 112, 92, 93, - /* 1230 */ 94, 95, 290, 402, 98, 402, 387, 388, 102, 103, - /* 1240 */ 104, 424, 370, 142, 448, 424, 108, 146, 370, 424, - /* 1250 */ 387, 388, 370, 424, 20, 383, 243, 244, 245, 424, - /* 1260 */ 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, - /* 1270 */ 257, 258, 259, 260, 261, 262, 263, 264, 12, 13, - /* 1280 */ 370, 396, 397, 411, 382, 383, 20, 4, 22, 382, - /* 1290 */ 383, 382, 383, 383, 389, 385, 424, 501, 426, 370, - /* 1300 */ 0, 35, 424, 37, 402, 509, 424, 382, 383, 402, - /* 1310 */ 370, 402, 382, 383, 33, 382, 383, 411, 486, 414, - /* 1320 */ 488, 411, 485, 527, 528, 488, 370, 402, 532, 533, - /* 1330 */ 391, 65, 402, 427, 424, 402, 426, 382, 383, 383, - /* 1340 */ 468, 385, 367, 471, 182, 79, 33, 475, 476, 477, - /* 1350 */ 478, 479, 480, 424, 482, 421, 417, 402, 424, 487, - /* 1360 */ 411, 489, 396, 397, 424, 493, 494, 411, 421, 404, - /* 1370 */ 0, 424, 407, 0, 108, 213, 427, 111, 468, 33, - /* 1380 */ 424, 471, 426, 400, 13, 475, 476, 477, 478, 479, - /* 1390 */ 480, 45, 482, 373, 374, 12, 13, 487, 33, 489, - /* 1400 */ 121, 437, 312, 493, 494, 22, 33, 33, 37, 37, - /* 1410 */ 45, 245, 42, 33, 371, 149, 150, 65, 35, 114, - /* 1420 */ 37, 33, 117, 448, 468, 112, 114, 471, 453, 117, - /* 1430 */ 503, 475, 476, 477, 478, 479, 480, 114, 482, 370, - /* 1440 */ 117, 114, 13, 487, 117, 489, 0, 0, 65, 493, - /* 1450 */ 494, 79, 383, 187, 188, 176, 0, 33, 111, 33, - /* 1460 */ 194, 195, 79, 0, 37, 113, 37, 120, 22, 22, - /* 1470 */ 37, 33, 49, 149, 150, 209, 501, 211, 22, 245, - /* 1480 */ 411, 33, 1, 2, 509, 22, 112, 33, 33, 37, - /* 1490 */ 33, 108, 112, 424, 33, 426, 37, 33, 12, 13, - /* 1500 */ 112, 525, 527, 528, 12, 13, 79, 532, 533, 243, - /* 1510 */ 244, 245, 79, 247, 248, 249, 250, 251, 252, 253, - /* 1520 */ 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, - /* 1530 */ 264, 536, 12, 13, 111, 235, 112, 468, 112, 33, - /* 1540 */ 471, 33, 22, 33, 475, 476, 477, 478, 479, 480, - /* 1550 */ 112, 482, 33, 12, 13, 35, 487, 37, 489, 33, - /* 1560 */ 112, 504, 493, 494, 12, 13, 112, 112, 33, 112, - /* 1570 */ 12, 13, 518, 112, 386, 292, 112, 33, 370, 12, - /* 1580 */ 13, 33, 12, 13, 108, 65, 12, 13, 12, 13, - /* 1590 */ 411, 383, 209, 399, 211, 12, 13, 316, 12, 13, - /* 1600 */ 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, - /* 1610 */ 370, 135, 136, 137, 138, 139, 140, 141, 112, 411, - /* 1620 */ 112, 0, 112, 383, 13, 13, 243, 244, 399, 437, - /* 1630 */ 381, 112, 424, 437, 426, 524, 524, 524, 112, 386, - /* 1640 */ 257, 258, 259, 260, 261, 262, 263, 112, 37, 37, - /* 1650 */ 447, 411, 524, 437, 383, 423, 112, 455, 437, 437, - /* 1660 */ 112, 508, 508, 211, 424, 495, 426, 511, 529, 401, - /* 1670 */ 211, 293, 449, 52, 51, 470, 468, 20, 42, 471, - /* 1680 */ 469, 391, 224, 475, 476, 477, 478, 479, 480, 465, - /* 1690 */ 482, 460, 370, 460, 391, 207, 451, 489, 20, 382, - /* 1700 */ 20, 493, 494, 383, 45, 383, 433, 433, 468, 383, - /* 1710 */ 186, 471, 370, 382, 430, 475, 476, 477, 478, 479, - /* 1720 */ 480, 383, 482, 382, 433, 383, 430, 430, 430, 209, - /* 1730 */ 395, 211, 370, 411, 109, 107, 382, 394, 382, 106, - /* 1740 */ 382, 393, 382, 382, 20, 383, 424, 50, 426, 460, - /* 1750 */ 375, 370, 375, 411, 391, 379, 20, 391, 379, 426, - /* 1760 */ 391, 241, 242, 243, 383, 20, 424, 20, 426, 384, - /* 1770 */ 384, 450, 20, 411, 440, 391, 375, 257, 258, 259, - /* 1780 */ 260, 261, 262, 263, 391, 391, 424, 391, 426, 382, - /* 1790 */ 468, 391, 411, 471, 373, 382, 228, 475, 476, 477, - /* 1800 */ 478, 479, 480, 411, 482, 424, 411, 426, 411, 411, - /* 1810 */ 468, 489, 373, 471, 411, 493, 494, 475, 476, 477, - /* 1820 */ 478, 479, 480, 411, 482, 411, 411, 411, 411, 411, - /* 1830 */ 468, 489, 370, 471, 424, 493, 494, 475, 476, 477, - /* 1840 */ 478, 479, 480, 375, 482, 383, 424, 20, 111, 468, - /* 1850 */ 460, 464, 471, 462, 424, 389, 475, 476, 477, 478, - /* 1860 */ 479, 480, 215, 482, 370, 459, 457, 214, 426, 389, - /* 1870 */ 301, 382, 517, 411, 449, 456, 442, 383, 300, 442, - /* 1880 */ 309, 517, 200, 311, 522, 523, 424, 520, 426, 424, - /* 1890 */ 310, 370, 294, 449, 537, 289, 288, 318, 313, 315, - /* 1900 */ 383, 519, 20, 121, 383, 411, 517, 291, 111, 507, - /* 1910 */ 506, 384, 389, 442, 515, 534, 535, 474, 424, 389, - /* 1920 */ 426, 516, 514, 512, 492, 424, 424, 424, 424, 442, - /* 1930 */ 468, 424, 411, 471, 192, 438, 389, 475, 476, 477, - /* 1940 */ 478, 479, 480, 407, 482, 424, 510, 426, 389, 383, - /* 1950 */ 530, 489, 424, 424, 111, 424, 494, 424, 424, 531, - /* 1960 */ 415, 424, 468, 424, 424, 471, 424, 446, 22, 475, - /* 1970 */ 476, 477, 478, 479, 480, 370, 482, 424, 424, 424, - /* 1980 */ 424, 424, 382, 389, 424, 424, 424, 424, 383, 468, - /* 1990 */ 372, 38, 471, 376, 375, 452, 475, 476, 477, 478, - /* 2000 */ 479, 480, 405, 482, 405, 370, 424, 461, 443, 405, - /* 2010 */ 390, 424, 424, 424, 424, 0, 411, 523, 383, 368, - /* 2020 */ 443, 0, 0, 45, 0, 37, 234, 37, 37, 424, - /* 2030 */ 37, 426, 234, 0, 37, 37, 234, 37, 0, 234, - /* 2040 */ 0, 37, 0, 0, 37, 22, 411, 0, 37, 229, - /* 2050 */ 0, 446, 217, 0, 217, 211, 218, 209, 0, 424, - /* 2060 */ 0, 426, 0, 205, 204, 0, 0, 154, 49, 49, - /* 2070 */ 0, 37, 0, 468, 0, 0, 471, 51, 37, 0, - /* 2080 */ 475, 476, 477, 478, 479, 480, 49, 482, 0, 45, - /* 2090 */ 0, 0, 0, 0, 49, 0, 370, 0, 0, 0, - /* 2100 */ 172, 37, 0, 468, 172, 0, 471, 0, 0, 383, - /* 2110 */ 475, 476, 477, 478, 479, 480, 370, 482, 0, 0, - /* 2120 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 383, - /* 2130 */ 49, 0, 45, 370, 0, 0, 0, 411, 0, 0, - /* 2140 */ 0, 0, 0, 0, 0, 0, 383, 0, 0, 0, - /* 2150 */ 424, 22, 426, 154, 0, 153, 0, 411, 0, 0, - /* 2160 */ 152, 526, 50, 50, 0, 65, 0, 0, 22, 65, - /* 2170 */ 424, 65, 426, 22, 411, 0, 65, 0, 0, 42, - /* 2180 */ 0, 0, 0, 51, 51, 0, 14, 424, 0, 426, - /* 2190 */ 37, 0, 37, 0, 468, 45, 0, 471, 37, 42, - /* 2200 */ 37, 475, 476, 477, 478, 479, 480, 42, 482, 446, - /* 2210 */ 37, 51, 42, 0, 468, 0, 370, 471, 1, 33, - /* 2220 */ 49, 475, 476, 477, 478, 479, 480, 200, 482, 383, - /* 2230 */ 484, 468, 49, 49, 471, 370, 19, 42, 475, 476, - /* 2240 */ 477, 478, 479, 480, 43, 482, 42, 49, 383, 0, - /* 2250 */ 0, 0, 35, 0, 51, 37, 42, 411, 0, 37, - /* 2260 */ 73, 535, 370, 51, 0, 42, 37, 51, 51, 42, - /* 2270 */ 424, 0, 426, 37, 42, 383, 411, 60, 61, 62, - /* 2280 */ 63, 51, 65, 0, 0, 0, 0, 0, 0, 424, - /* 2290 */ 22, 426, 446, 119, 37, 0, 117, 37, 37, 37, - /* 2300 */ 37, 22, 37, 411, 37, 0, 37, 37, 33, 37, - /* 2310 */ 33, 37, 22, 37, 468, 0, 424, 471, 426, 37, - /* 2320 */ 22, 475, 476, 477, 478, 479, 480, 110, 482, 0, - /* 2330 */ 113, 22, 0, 468, 53, 22, 471, 37, 370, 0, - /* 2340 */ 475, 476, 477, 478, 479, 480, 0, 482, 0, 37, - /* 2350 */ 0, 383, 0, 37, 20, 22, 37, 37, 37, 112, - /* 2360 */ 468, 122, 0, 471, 147, 111, 0, 475, 476, 477, - /* 2370 */ 478, 479, 480, 49, 482, 123, 370, 111, 189, 411, - /* 2380 */ 37, 189, 22, 0, 216, 22, 189, 0, 212, 383, - /* 2390 */ 0, 192, 424, 37, 426, 189, 196, 189, 3, 50, - /* 2400 */ 370, 196, 33, 111, 295, 112, 112, 111, 191, 37, - /* 2410 */ 111, 109, 33, 383, 50, 198, 112, 411, 107, 33, - /* 2420 */ 112, 111, 370, 49, 33, 111, 49, 33, 111, 111, - /* 2430 */ 424, 33, 426, 79, 217, 383, 468, 112, 112, 471, - /* 2440 */ 37, 411, 111, 475, 476, 477, 478, 479, 480, 112, - /* 2450 */ 482, 3, 112, 33, 424, 37, 426, 295, 37, 37, - /* 2460 */ 37, 37, 37, 411, 295, 112, 49, 112, 33, 279, - /* 2470 */ 0, 0, 42, 33, 468, 49, 424, 471, 426, 111, - /* 2480 */ 109, 475, 476, 477, 478, 479, 480, 266, 482, 2, - /* 2490 */ 109, 22, 49, 49, 112, 22, 112, 112, 468, 243, - /* 2500 */ 370, 471, 0, 111, 111, 475, 476, 477, 478, 479, - /* 2510 */ 480, 111, 482, 383, 112, 111, 111, 111, 111, 246, - /* 2520 */ 468, 111, 111, 471, 112, 112, 111, 475, 476, 477, - /* 2530 */ 478, 479, 480, 42, 482, 193, 191, 49, 111, 111, - /* 2540 */ 121, 411, 111, 111, 37, 112, 112, 111, 111, 120, - /* 2550 */ 37, 112, 111, 37, 424, 37, 426, 111, 37, 112, - /* 2560 */ 37, 112, 112, 112, 37, 33, 111, 37, 111, 111, - /* 2570 */ 22, 73, 370, 72, 37, 37, 134, 123, 122, 134, - /* 2580 */ 37, 37, 37, 37, 37, 383, 134, 134, 37, 370, - /* 2590 */ 37, 37, 37, 79, 105, 105, 79, 33, 468, 37, - /* 2600 */ 37, 471, 383, 37, 22, 475, 476, 477, 478, 479, - /* 2610 */ 480, 370, 482, 411, 37, 37, 37, 37, 79, 22, - /* 2620 */ 37, 37, 37, 0, 383, 37, 424, 37, 426, 37, - /* 2630 */ 411, 42, 51, 0, 0, 37, 42, 37, 51, 0, - /* 2640 */ 37, 42, 51, 424, 51, 426, 42, 0, 370, 37, - /* 2650 */ 37, 0, 411, 22, 33, 538, 20, 22, 21, 538, - /* 2660 */ 22, 383, 22, 21, 538, 424, 538, 426, 538, 538, - /* 2670 */ 468, 538, 538, 471, 538, 538, 538, 475, 476, 477, - /* 2680 */ 478, 479, 480, 538, 482, 538, 538, 468, 538, 411, - /* 2690 */ 471, 538, 538, 538, 475, 476, 477, 478, 479, 480, - /* 2700 */ 538, 482, 424, 538, 426, 538, 538, 538, 538, 468, - /* 2710 */ 538, 370, 471, 538, 538, 538, 475, 476, 477, 478, - /* 2720 */ 479, 480, 538, 482, 383, 538, 538, 538, 538, 538, - /* 2730 */ 538, 370, 538, 538, 538, 538, 538, 538, 538, 538, - /* 2740 */ 538, 538, 538, 538, 383, 538, 468, 538, 538, 471, - /* 2750 */ 370, 538, 411, 475, 476, 477, 478, 479, 480, 538, - /* 2760 */ 482, 538, 538, 383, 538, 424, 538, 426, 538, 538, - /* 2770 */ 538, 538, 411, 538, 538, 538, 538, 538, 538, 538, - /* 2780 */ 538, 538, 538, 538, 538, 424, 538, 426, 538, 538, - /* 2790 */ 538, 411, 538, 538, 538, 538, 538, 538, 538, 538, - /* 2800 */ 538, 538, 538, 538, 424, 538, 426, 538, 538, 468, - /* 2810 */ 538, 538, 471, 538, 538, 538, 475, 476, 477, 478, - /* 2820 */ 479, 480, 538, 482, 538, 538, 538, 538, 538, 468, - /* 2830 */ 538, 538, 471, 538, 370, 538, 475, 476, 477, 478, - /* 2840 */ 479, 480, 538, 482, 538, 538, 538, 383, 468, 538, - /* 2850 */ 538, 471, 370, 538, 538, 475, 476, 477, 478, 479, - /* 2860 */ 480, 538, 482, 538, 538, 383, 538, 538, 538, 370, - /* 2870 */ 538, 538, 538, 538, 538, 411, 538, 538, 538, 538, - /* 2880 */ 538, 538, 383, 538, 538, 538, 538, 538, 424, 538, - /* 2890 */ 426, 538, 538, 411, 538, 538, 538, 538, 538, 538, - /* 2900 */ 538, 538, 538, 538, 538, 538, 424, 538, 426, 538, - /* 2910 */ 411, 538, 538, 538, 538, 538, 538, 538, 538, 538, - /* 2920 */ 538, 538, 538, 424, 538, 426, 538, 538, 538, 538, - /* 2930 */ 538, 538, 468, 538, 538, 471, 538, 538, 538, 475, - /* 2940 */ 476, 477, 478, 479, 480, 538, 482, 538, 538, 538, - /* 2950 */ 468, 538, 538, 471, 538, 538, 370, 475, 476, 477, - /* 2960 */ 478, 479, 480, 538, 482, 538, 538, 468, 538, 383, - /* 2970 */ 471, 538, 370, 538, 475, 476, 477, 478, 479, 480, - /* 2980 */ 538, 482, 538, 538, 538, 383, 538, 538, 538, 538, - /* 2990 */ 538, 538, 538, 538, 538, 370, 538, 411, 538, 538, - /* 3000 */ 538, 538, 538, 538, 538, 538, 538, 538, 383, 538, - /* 3010 */ 424, 538, 426, 411, 538, 538, 538, 538, 538, 538, - /* 3020 */ 538, 538, 538, 538, 538, 538, 424, 538, 426, 538, - /* 3030 */ 538, 538, 538, 538, 538, 538, 411, 538, 538, 538, - /* 3040 */ 538, 538, 538, 538, 538, 538, 538, 538, 538, 424, - /* 3050 */ 538, 426, 538, 538, 468, 538, 538, 471, 370, 538, - /* 3060 */ 538, 475, 476, 477, 478, 479, 480, 538, 482, 538, - /* 3070 */ 468, 383, 538, 471, 538, 538, 538, 475, 476, 477, - /* 3080 */ 478, 479, 480, 538, 482, 538, 538, 538, 538, 538, - /* 3090 */ 538, 538, 538, 468, 538, 538, 471, 538, 538, 411, - /* 3100 */ 475, 476, 477, 478, 479, 480, 538, 482, 538, 538, - /* 3110 */ 538, 538, 424, 538, 426, 538, 538, 538, 538, 538, - /* 3120 */ 538, 538, 538, 538, 538, 538, 538, 538, 538, 538, - /* 3130 */ 538, 538, 538, 538, 538, 538, 538, 538, 538, 538, - /* 3140 */ 538, 538, 538, 538, 538, 538, 538, 538, 538, 538, - /* 3150 */ 538, 538, 538, 538, 538, 538, 468, 538, 538, 471, - /* 3160 */ 538, 538, 538, 475, 476, 477, 478, 479, 480, 538, - /* 3170 */ 482, 367, 367, 367, 367, 367, 367, 367, 367, 367, - /* 3180 */ 367, 367, 367, 367, 367, 367, 367, 367, 367, 367, - /* 3190 */ 367, 367, 367, 367, 367, 367, 367, 367, 367, 367, - /* 3200 */ 367, 367, 367, 367, 367, 367, 367, 367, 367, 367, - /* 3210 */ 367, 367, 367, 367, 367, 367, 367, 367, 367, 367, - /* 3220 */ 367, 367, 367, 367, 367, 367, 367, 367, 367, 367, - /* 3230 */ 367, 367, 367, 367, 367, 367, 367, 367, 367, 367, - /* 3240 */ 367, 367, 367, 367, 367, 367, 367, 367, 367, 367, - /* 3250 */ 367, 367, 367, 367, 367, 367, 367, 367, 367, 367, - /* 3260 */ 367, 367, 367, 367, 367, 367, 367, 367, 367, 367, - /* 3270 */ 367, 367, 367, 367, 367, 367, 367, 367, 367, 367, - /* 3280 */ 367, 367, 367, 367, 367, 367, 367, 367, 367, 367, - /* 3290 */ 367, 367, 367, 367, 367, 367, 367, 367, 367, 367, - /* 3300 */ 367, 367, 367, 367, 367, 367, 367, 367, 367, 367, - /* 3310 */ 367, 367, 367, 367, 367, 367, 367, 367, 367, 367, - /* 3320 */ 367, 367, 367, 367, 367, 367, 367, 367, 367, 367, - /* 3330 */ 367, 367, 367, 367, 367, 367, 367, 367, 367, 367, - /* 3340 */ 367, 367, 367, 367, 367, 367, 367, 367, 367, 367, - /* 3350 */ 367, 367, 367, 367, 367, 367, 367, 367, 367, 367, - /* 3360 */ 367, 367, 367, 367, 367, 367, 367, 367, 367, 367, - /* 3370 */ 367, 367, 367, 367, 367, 367, 367, 367, 367, 367, - /* 3380 */ 367, 367, 367, 367, 367, 367, 367, 367, 367, 367, - /* 3390 */ 367, 367, 367, 367, 367, 367, 367, 367, 367, 367, - /* 3400 */ 367, 367, 367, 367, 367, 367, 367, 367, 367, 367, - /* 3410 */ 367, 367, 367, 367, 367, 367, 367, 367, 367, 367, - /* 3420 */ 367, 367, 367, 367, 367, 367, 367, 367, 367, 367, - /* 3430 */ 367, 367, 367, 367, 367, 367, 367, 367, 367, 367, - /* 3440 */ 367, 367, 367, 367, 367, 367, 367, 367, 367, 367, - /* 3450 */ 367, 367, 367, 367, 367, 367, 367, 367, 367, 367, - /* 3460 */ 367, 367, 367, 367, 367, 367, 367, 367, 367, 367, - /* 3470 */ 367, 367, 367, 367, 367, 367, 367, 367, 367, 367, - /* 3480 */ 367, 367, 367, 367, 367, 367, 367, 367, 367, 367, - /* 3490 */ 367, 367, 367, 367, 367, 367, 367, 367, 367, 367, - /* 3500 */ 367, 367, 367, 367, 367, 367, 367, 367, 367, 367, - /* 3510 */ 367, 367, 367, 367, 367, 367, 367, 367, 367, 367, - /* 3520 */ 367, 367, 367, 367, 367, 367, 367, 367, 367, 367, - /* 3530 */ 367, 367, 367, 367, 367, 367, 367, 367, + /* 260 */ 260, 261, 262, 263, 264, 265, 266, 12, 13, 478, + /* 270 */ 479, 480, 18, 111, 20, 20, 384, 22, 413, 508, + /* 280 */ 489, 27, 111, 155, 30, 420, 72, 516, 20, 35, + /* 290 */ 35, 20, 37, 13, 429, 281, 282, 283, 284, 285, + /* 300 */ 286, 287, 288, 289, 20, 51, 535, 53, 180, 181, + /* 310 */ 539, 540, 58, 59, 504, 505, 506, 20, 508, 509, + /* 320 */ 65, 193, 430, 431, 70, 433, 267, 72, 269, 437, + /* 330 */ 14, 20, 292, 119, 79, 21, 20, 385, 24, 25, + /* 340 */ 26, 27, 28, 29, 30, 31, 32, 372, 111, 74, + /* 350 */ 75, 76, 372, 508, 384, 385, 81, 82, 83, 79, + /* 360 */ 385, 516, 87, 108, 110, 413, 111, 92, 93, 94, + /* 370 */ 95, 384, 391, 98, 404, 121, 71, 102, 103, 104, + /* 380 */ 535, 411, 384, 385, 539, 540, 8, 9, 413, 408, + /* 390 */ 12, 13, 14, 15, 16, 111, 111, 416, 20, 292, + /* 400 */ 186, 426, 404, 428, 149, 150, 426, 153, 154, 411, + /* 410 */ 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, + /* 420 */ 149, 150, 166, 169, 170, 171, 172, 173, 174, 175, + /* 430 */ 428, 177, 178, 179, 447, 448, 484, 183, 184, 185, + /* 440 */ 384, 385, 187, 188, 190, 443, 444, 445, 384, 385, + /* 450 */ 475, 196, 197, 478, 292, 187, 188, 482, 483, 484, + /* 460 */ 485, 486, 487, 292, 489, 413, 211, 492, 213, 494, + /* 470 */ 495, 496, 0, 8, 9, 500, 501, 12, 13, 14, + /* 480 */ 15, 16, 372, 412, 270, 271, 272, 273, 274, 275, + /* 490 */ 276, 277, 278, 279, 280, 210, 425, 212, 187, 384, + /* 500 */ 245, 246, 247, 187, 249, 250, 251, 252, 253, 254, + /* 510 */ 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, + /* 520 */ 265, 266, 267, 12, 13, 473, 474, 242, 380, 292, + /* 530 */ 18, 20, 384, 22, 386, 23, 426, 281, 282, 283, + /* 540 */ 284, 285, 286, 287, 288, 289, 35, 372, 37, 14, + /* 550 */ 15, 16, 40, 41, 37, 440, 44, 442, 247, 503, + /* 560 */ 504, 505, 506, 247, 508, 509, 54, 189, 504, 505, + /* 570 */ 506, 492, 508, 509, 495, 108, 65, 292, 66, 67, + /* 580 */ 68, 69, 70, 72, 285, 286, 287, 288, 289, 122, + /* 590 */ 79, 124, 125, 126, 127, 128, 129, 130, 131, 132, + /* 600 */ 133, 426, 135, 136, 137, 138, 139, 140, 141, 393, + /* 610 */ 245, 12, 13, 12, 13, 14, 15, 16, 71, 108, + /* 620 */ 192, 22, 111, 111, 108, 247, 410, 142, 143, 144, + /* 630 */ 145, 146, 147, 148, 35, 419, 37, 0, 166, 167, + /* 640 */ 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, + /* 650 */ 3, 135, 136, 137, 138, 139, 140, 141, 414, 22, + /* 660 */ 149, 150, 108, 151, 65, 20, 422, 20, 203, 304, + /* 670 */ 305, 306, 307, 308, 309, 310, 1, 2, 124, 125, + /* 680 */ 126, 127, 128, 129, 130, 131, 132, 133, 4, 135, + /* 690 */ 136, 137, 138, 139, 140, 141, 8, 9, 187, 188, + /* 700 */ 12, 13, 14, 15, 16, 8, 9, 196, 197, 12, + /* 710 */ 13, 14, 15, 16, 144, 203, 204, 205, 148, 380, + /* 720 */ 208, 33, 211, 384, 213, 386, 298, 299, 300, 301, + /* 730 */ 213, 8, 9, 221, 222, 12, 13, 14, 15, 16, + /* 740 */ 22, 384, 385, 49, 232, 384, 385, 235, 427, 428, + /* 750 */ 238, 239, 240, 241, 242, 37, 245, 246, 247, 112, + /* 760 */ 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, + /* 770 */ 259, 260, 261, 262, 263, 264, 265, 266, 12, 13, + /* 780 */ 14, 372, 23, 384, 319, 413, 20, 112, 22, 0, + /* 790 */ 220, 434, 413, 223, 385, 434, 226, 79, 228, 420, + /* 800 */ 112, 35, 0, 37, 292, 111, 47, 48, 429, 112, + /* 810 */ 211, 372, 213, 24, 25, 26, 27, 28, 29, 30, + /* 820 */ 31, 32, 413, 20, 385, 4, 387, 0, 384, 385, + /* 830 */ 401, 65, 121, 20, 189, 426, 189, 428, 51, 440, + /* 840 */ 19, 442, 243, 244, 245, 79, 474, 60, 404, 394, + /* 850 */ 63, 64, 413, 39, 40, 426, 35, 402, 259, 260, + /* 860 */ 261, 262, 263, 264, 265, 426, 20, 428, 22, 14, + /* 870 */ 384, 385, 51, 33, 108, 20, 20, 111, 22, 58, + /* 880 */ 59, 56, 57, 37, 475, 45, 65, 478, 12, 13, + /* 890 */ 404, 482, 483, 484, 485, 486, 487, 267, 489, 384, + /* 900 */ 385, 55, 0, 494, 455, 496, 455, 478, 479, 500, + /* 910 */ 501, 55, 189, 37, 475, 149, 150, 478, 489, 404, + /* 920 */ 413, 482, 483, 484, 485, 486, 487, 420, 489, 115, + /* 930 */ 116, 110, 118, 494, 113, 496, 429, 528, 400, 500, + /* 940 */ 501, 403, 37, 413, 142, 143, 144, 145, 146, 147, + /* 950 */ 148, 372, 372, 187, 188, 37, 142, 508, 384, 508, + /* 960 */ 146, 33, 196, 197, 385, 516, 387, 516, 438, 142, + /* 970 */ 143, 144, 145, 146, 147, 148, 166, 211, 294, 213, + /* 980 */ 493, 50, 495, 534, 535, 534, 535, 186, 539, 540, + /* 990 */ 539, 540, 413, 8, 9, 372, 20, 12, 13, 14, + /* 1000 */ 15, 16, 189, 389, 390, 426, 426, 428, 385, 143, + /* 1010 */ 387, 245, 246, 247, 20, 249, 250, 251, 252, 253, + /* 1020 */ 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, + /* 1030 */ 264, 265, 266, 12, 13, 20, 413, 405, 409, 465, + /* 1040 */ 466, 20, 187, 22, 493, 413, 495, 384, 385, 426, + /* 1050 */ 247, 428, 481, 421, 475, 3, 35, 478, 37, 369, + /* 1060 */ 247, 482, 483, 484, 485, 486, 487, 404, 489, 393, + /* 1070 */ 168, 270, 372, 494, 172, 496, 384, 385, 507, 500, + /* 1080 */ 501, 280, 180, 384, 385, 385, 65, 387, 65, 213, + /* 1090 */ 224, 225, 282, 283, 284, 419, 404, 79, 475, 470, + /* 1100 */ 79, 478, 247, 404, 33, 482, 483, 484, 485, 486, + /* 1110 */ 487, 413, 489, 413, 384, 385, 45, 494, 213, 496, + /* 1120 */ 189, 384, 385, 500, 501, 372, 426, 429, 428, 108, + /* 1130 */ 199, 213, 111, 110, 404, 142, 113, 121, 385, 146, + /* 1140 */ 387, 404, 455, 149, 150, 455, 389, 390, 243, 244, + /* 1150 */ 460, 405, 384, 385, 384, 385, 384, 385, 70, 413, + /* 1160 */ 34, 243, 244, 398, 399, 189, 413, 421, 384, 385, + /* 1170 */ 149, 150, 404, 402, 404, 475, 404, 423, 478, 426, + /* 1180 */ 426, 428, 482, 483, 484, 485, 486, 487, 404, 489, + /* 1190 */ 196, 197, 143, 144, 494, 508, 496, 148, 508, 405, + /* 1200 */ 500, 501, 372, 516, 22, 182, 516, 413, 187, 188, + /* 1210 */ 398, 399, 413, 423, 191, 421, 426, 196, 197, 37, + /* 1220 */ 421, 534, 535, 247, 534, 535, 539, 540, 475, 539, + /* 1230 */ 540, 478, 211, 0, 213, 482, 483, 484, 485, 486, + /* 1240 */ 487, 413, 489, 372, 384, 385, 318, 494, 20, 496, + /* 1250 */ 372, 372, 423, 500, 501, 426, 426, 429, 406, 375, + /* 1260 */ 376, 409, 247, 385, 404, 387, 245, 246, 247, 372, + /* 1270 */ 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, + /* 1280 */ 259, 260, 261, 262, 263, 264, 265, 266, 12, 13, + /* 1290 */ 108, 413, 384, 385, 206, 22, 20, 426, 22, 384, + /* 1300 */ 385, 182, 413, 13, 426, 426, 428, 74, 75, 76, + /* 1310 */ 37, 35, 404, 37, 81, 82, 83, 372, 429, 404, + /* 1320 */ 87, 233, 234, 426, 14, 92, 93, 94, 95, 22, + /* 1330 */ 20, 98, 384, 385, 215, 102, 103, 104, 384, 385, + /* 1340 */ 372, 65, 372, 372, 37, 372, 33, 372, 384, 385, + /* 1350 */ 384, 385, 404, 475, 372, 79, 478, 121, 404, 372, + /* 1360 */ 482, 483, 484, 485, 486, 487, 314, 489, 404, 79, + /* 1370 */ 404, 426, 494, 372, 496, 12, 13, 455, 500, 501, + /* 1380 */ 372, 108, 391, 372, 108, 22, 79, 111, 33, 372, + /* 1390 */ 0, 0, 114, 385, 426, 117, 426, 426, 35, 426, + /* 1400 */ 37, 426, 0, 114, 37, 13, 117, 416, 426, 0, + /* 1410 */ 0, 114, 176, 426, 117, 108, 114, 33, 65, 117, + /* 1420 */ 13, 413, 227, 35, 229, 149, 150, 426, 65, 37, + /* 1430 */ 508, 22, 22, 42, 426, 33, 428, 426, 516, 51, + /* 1440 */ 72, 51, 79, 426, 37, 33, 79, 0, 60, 61, + /* 1450 */ 62, 63, 414, 65, 149, 150, 534, 535, 1, 2, + /* 1460 */ 37, 539, 540, 187, 188, 33, 113, 112, 33, 22, + /* 1470 */ 33, 108, 196, 197, 414, 247, 33, 414, 33, 33, + /* 1480 */ 414, 33, 33, 475, 33, 33, 478, 211, 33, 213, + /* 1490 */ 482, 483, 484, 485, 486, 487, 112, 489, 110, 33, + /* 1500 */ 414, 113, 494, 461, 496, 373, 33, 33, 500, 501, + /* 1510 */ 12, 13, 12, 13, 12, 13, 439, 33, 211, 33, + /* 1520 */ 213, 245, 246, 247, 112, 249, 250, 251, 252, 253, + /* 1530 */ 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, + /* 1540 */ 264, 265, 266, 372, 112, 12, 13, 112, 37, 112, + /* 1550 */ 12, 13, 245, 246, 510, 112, 385, 112, 112, 33, + /* 1560 */ 112, 112, 33, 112, 112, 12, 13, 112, 12, 13, + /* 1570 */ 182, 12, 13, 33, 211, 543, 213, 532, 112, 191, + /* 1580 */ 12, 13, 194, 195, 413, 112, 112, 33, 200, 201, + /* 1590 */ 79, 372, 12, 13, 12, 13, 112, 426, 112, 428, + /* 1600 */ 37, 111, 511, 525, 385, 388, 13, 219, 245, 246, + /* 1610 */ 120, 13, 0, 245, 413, 401, 401, 439, 383, 439, + /* 1620 */ 372, 531, 259, 260, 261, 262, 263, 264, 265, 316, + /* 1630 */ 37, 531, 413, 385, 531, 37, 213, 454, 112, 531, + /* 1640 */ 388, 112, 79, 439, 385, 426, 475, 428, 425, 478, + /* 1650 */ 462, 439, 112, 482, 483, 484, 485, 486, 487, 439, + /* 1660 */ 489, 413, 515, 515, 52, 494, 112, 496, 502, 536, + /* 1670 */ 518, 500, 501, 403, 426, 51, 428, 295, 456, 477, + /* 1680 */ 42, 476, 226, 20, 393, 467, 372, 393, 472, 209, + /* 1690 */ 458, 467, 20, 384, 475, 20, 385, 478, 45, 385, + /* 1700 */ 435, 482, 483, 484, 485, 486, 487, 385, 489, 435, + /* 1710 */ 186, 432, 384, 494, 385, 496, 384, 435, 432, 500, + /* 1720 */ 501, 397, 109, 475, 432, 432, 478, 413, 372, 107, + /* 1730 */ 482, 483, 484, 485, 486, 487, 396, 489, 384, 106, + /* 1740 */ 426, 385, 428, 384, 496, 395, 384, 20, 500, 501, + /* 1750 */ 384, 377, 372, 384, 50, 377, 381, 381, 393, 20, + /* 1760 */ 20, 428, 467, 393, 393, 385, 20, 386, 20, 413, + /* 1770 */ 393, 386, 457, 448, 20, 440, 393, 377, 384, 393, + /* 1780 */ 393, 384, 426, 426, 428, 413, 393, 426, 393, 475, + /* 1790 */ 375, 375, 478, 413, 372, 377, 482, 483, 484, 485, + /* 1800 */ 486, 487, 413, 489, 230, 426, 426, 385, 428, 413, + /* 1810 */ 496, 413, 413, 471, 500, 501, 413, 413, 413, 413, + /* 1820 */ 111, 413, 391, 20, 413, 217, 466, 469, 464, 428, + /* 1830 */ 216, 475, 391, 303, 478, 413, 463, 384, 482, 483, + /* 1840 */ 484, 485, 486, 487, 524, 489, 426, 302, 426, 202, + /* 1850 */ 428, 524, 496, 311, 524, 475, 500, 501, 478, 313, + /* 1860 */ 372, 527, 482, 483, 484, 485, 486, 487, 488, 489, + /* 1870 */ 490, 491, 526, 385, 450, 456, 450, 372, 312, 291, + /* 1880 */ 467, 296, 290, 456, 320, 544, 317, 538, 315, 537, + /* 1890 */ 385, 385, 20, 121, 293, 386, 111, 475, 391, 391, + /* 1900 */ 478, 413, 426, 426, 482, 483, 484, 485, 486, 487, + /* 1910 */ 450, 489, 450, 426, 426, 481, 428, 426, 413, 426, + /* 1920 */ 194, 446, 391, 426, 194, 391, 441, 409, 391, 499, + /* 1930 */ 426, 426, 440, 428, 385, 111, 426, 523, 513, 522, + /* 1940 */ 426, 426, 521, 514, 22, 426, 426, 519, 426, 426, + /* 1950 */ 517, 529, 530, 426, 426, 372, 384, 378, 426, 38, + /* 1960 */ 374, 426, 426, 475, 417, 426, 478, 426, 385, 426, + /* 1970 */ 482, 483, 484, 485, 486, 487, 426, 489, 426, 377, + /* 1980 */ 475, 426, 1, 478, 426, 391, 426, 482, 483, 484, + /* 1990 */ 485, 486, 487, 426, 489, 372, 413, 426, 407, 451, + /* 2000 */ 19, 496, 407, 459, 407, 370, 501, 392, 385, 426, + /* 2010 */ 0, 428, 451, 0, 0, 45, 35, 0, 236, 468, + /* 2020 */ 236, 37, 37, 37, 37, 0, 37, 37, 236, 541, + /* 2030 */ 542, 37, 51, 0, 372, 236, 413, 0, 37, 0, + /* 2040 */ 37, 60, 61, 62, 63, 0, 65, 385, 22, 426, + /* 2050 */ 0, 428, 37, 231, 0, 0, 219, 219, 475, 220, + /* 2060 */ 213, 478, 211, 0, 0, 482, 483, 484, 485, 486, + /* 2070 */ 487, 0, 489, 207, 206, 413, 453, 0, 0, 372, + /* 2080 */ 154, 49, 0, 49, 0, 37, 0, 51, 426, 37, + /* 2090 */ 428, 110, 385, 0, 113, 49, 0, 0, 475, 0, + /* 2100 */ 0, 478, 45, 0, 0, 482, 483, 484, 485, 486, + /* 2110 */ 487, 49, 489, 530, 372, 453, 0, 0, 0, 0, + /* 2120 */ 413, 172, 37, 0, 0, 172, 0, 385, 147, 0, + /* 2130 */ 0, 0, 0, 426, 0, 428, 49, 475, 0, 0, + /* 2140 */ 478, 0, 0, 0, 482, 483, 484, 485, 486, 487, + /* 2150 */ 0, 489, 0, 0, 0, 413, 0, 0, 0, 0, + /* 2160 */ 0, 0, 372, 0, 0, 45, 0, 0, 426, 0, + /* 2170 */ 428, 0, 191, 0, 0, 385, 195, 22, 0, 0, + /* 2180 */ 153, 200, 475, 154, 0, 478, 0, 152, 0, 482, + /* 2190 */ 483, 484, 485, 486, 487, 50, 489, 22, 22, 50, + /* 2200 */ 219, 0, 65, 413, 0, 65, 0, 37, 372, 65, + /* 2210 */ 0, 65, 0, 0, 37, 0, 426, 475, 428, 51, + /* 2220 */ 478, 385, 42, 51, 482, 483, 484, 485, 486, 487, + /* 2230 */ 37, 489, 42, 0, 37, 0, 51, 42, 0, 37, + /* 2240 */ 533, 45, 42, 49, 33, 14, 372, 49, 49, 413, + /* 2250 */ 0, 43, 0, 0, 0, 0, 42, 0, 42, 385, + /* 2260 */ 202, 0, 426, 0, 428, 475, 49, 0, 478, 49, + /* 2270 */ 0, 0, 482, 483, 484, 485, 486, 487, 73, 489, + /* 2280 */ 37, 491, 42, 51, 542, 37, 42, 413, 0, 453, + /* 2290 */ 51, 372, 0, 37, 0, 37, 51, 51, 0, 0, + /* 2300 */ 426, 42, 428, 0, 385, 37, 42, 0, 0, 0, + /* 2310 */ 119, 475, 22, 0, 478, 37, 37, 37, 482, 483, + /* 2320 */ 484, 485, 486, 487, 372, 489, 117, 453, 37, 0, + /* 2330 */ 37, 0, 413, 37, 37, 0, 53, 385, 37, 37, + /* 2340 */ 22, 37, 22, 33, 33, 426, 22, 428, 22, 475, + /* 2350 */ 0, 37, 478, 37, 22, 372, 482, 483, 484, 485, + /* 2360 */ 486, 487, 37, 489, 0, 413, 0, 0, 385, 22, + /* 2370 */ 37, 0, 0, 37, 20, 37, 37, 37, 426, 0, + /* 2380 */ 428, 112, 0, 111, 122, 111, 49, 22, 123, 37, + /* 2390 */ 0, 0, 189, 0, 475, 22, 413, 478, 3, 218, + /* 2400 */ 111, 482, 483, 484, 485, 486, 487, 33, 489, 426, + /* 2410 */ 189, 428, 189, 194, 189, 189, 281, 111, 297, 372, + /* 2420 */ 198, 214, 198, 37, 112, 37, 111, 475, 50, 112, + /* 2430 */ 478, 109, 385, 50, 482, 483, 484, 485, 486, 487, + /* 2440 */ 372, 489, 112, 33, 33, 33, 112, 49, 107, 49, + /* 2450 */ 37, 33, 33, 385, 111, 111, 111, 111, 475, 297, + /* 2460 */ 413, 478, 111, 372, 79, 482, 483, 484, 485, 486, + /* 2470 */ 487, 112, 489, 426, 112, 428, 385, 3, 33, 297, + /* 2480 */ 112, 413, 112, 37, 37, 372, 37, 37, 37, 37, + /* 2490 */ 49, 33, 112, 112, 426, 0, 428, 49, 385, 42, + /* 2500 */ 111, 33, 268, 109, 413, 0, 109, 22, 372, 2, + /* 2510 */ 111, 245, 49, 112, 112, 111, 111, 426, 111, 428, + /* 2520 */ 111, 385, 475, 22, 49, 478, 413, 112, 111, 482, + /* 2530 */ 483, 484, 485, 486, 487, 111, 489, 112, 111, 426, + /* 2540 */ 112, 428, 112, 475, 0, 111, 478, 111, 248, 413, + /* 2550 */ 482, 483, 484, 485, 486, 487, 42, 489, 195, 0, + /* 2560 */ 42, 49, 426, 120, 428, 112, 475, 192, 192, 478, + /* 2570 */ 111, 111, 111, 482, 483, 484, 485, 486, 487, 114, + /* 2580 */ 489, 111, 111, 111, 111, 121, 37, 111, 475, 111, + /* 2590 */ 372, 478, 112, 112, 37, 482, 483, 484, 485, 486, + /* 2600 */ 487, 111, 489, 385, 112, 37, 112, 111, 37, 112, + /* 2610 */ 37, 475, 112, 372, 478, 37, 112, 37, 482, 483, + /* 2620 */ 484, 485, 486, 487, 111, 489, 385, 134, 33, 37, + /* 2630 */ 122, 413, 372, 123, 111, 111, 134, 134, 22, 73, + /* 2640 */ 134, 72, 37, 37, 426, 385, 428, 37, 37, 37, + /* 2650 */ 37, 37, 37, 79, 413, 37, 37, 372, 37, 105, + /* 2660 */ 79, 105, 33, 37, 22, 37, 79, 426, 37, 428, + /* 2670 */ 385, 37, 37, 413, 37, 37, 37, 372, 37, 22, + /* 2680 */ 37, 37, 37, 0, 37, 0, 426, 51, 428, 37, + /* 2690 */ 385, 42, 42, 475, 0, 37, 478, 0, 413, 51, + /* 2700 */ 482, 483, 484, 485, 486, 487, 51, 489, 42, 37, + /* 2710 */ 51, 426, 42, 428, 0, 37, 475, 37, 413, 478, + /* 2720 */ 0, 22, 33, 482, 483, 484, 485, 486, 487, 22, + /* 2730 */ 489, 426, 21, 428, 22, 475, 20, 22, 478, 21, + /* 2740 */ 545, 372, 482, 483, 484, 485, 486, 487, 545, 489, + /* 2750 */ 545, 545, 545, 545, 385, 545, 545, 545, 545, 545, + /* 2760 */ 475, 545, 545, 478, 545, 545, 545, 482, 483, 484, + /* 2770 */ 485, 486, 487, 545, 489, 545, 545, 545, 545, 545, + /* 2780 */ 475, 545, 413, 478, 545, 545, 545, 482, 483, 484, + /* 2790 */ 485, 486, 487, 545, 489, 426, 545, 428, 545, 545, + /* 2800 */ 545, 545, 545, 545, 545, 372, 545, 545, 545, 545, + /* 2810 */ 545, 545, 545, 545, 545, 545, 545, 545, 385, 545, + /* 2820 */ 545, 545, 545, 545, 545, 545, 372, 545, 545, 545, + /* 2830 */ 545, 545, 545, 545, 545, 545, 545, 545, 545, 385, + /* 2840 */ 545, 545, 545, 545, 475, 545, 413, 478, 545, 372, + /* 2850 */ 545, 482, 483, 484, 485, 486, 487, 545, 489, 426, + /* 2860 */ 545, 428, 385, 545, 545, 545, 545, 413, 545, 545, + /* 2870 */ 545, 372, 545, 545, 545, 545, 545, 545, 545, 545, + /* 2880 */ 426, 545, 428, 545, 385, 545, 545, 545, 545, 545, + /* 2890 */ 413, 545, 545, 545, 372, 545, 545, 545, 545, 545, + /* 2900 */ 545, 545, 545, 426, 545, 428, 545, 385, 475, 545, + /* 2910 */ 545, 478, 413, 545, 545, 482, 483, 484, 485, 486, + /* 2920 */ 487, 545, 489, 545, 545, 426, 545, 428, 545, 475, + /* 2930 */ 545, 545, 478, 545, 545, 413, 482, 483, 484, 485, + /* 2940 */ 486, 487, 545, 489, 545, 545, 545, 545, 426, 545, + /* 2950 */ 428, 545, 475, 545, 545, 478, 545, 545, 545, 482, + /* 2960 */ 483, 484, 485, 486, 487, 545, 489, 545, 545, 545, + /* 2970 */ 545, 545, 545, 545, 475, 545, 372, 478, 545, 545, + /* 2980 */ 545, 482, 483, 484, 485, 486, 487, 545, 489, 385, + /* 2990 */ 545, 545, 545, 545, 545, 545, 545, 475, 545, 372, + /* 3000 */ 478, 545, 545, 545, 482, 483, 484, 485, 486, 487, + /* 3010 */ 545, 489, 385, 545, 545, 545, 545, 413, 372, 545, + /* 3020 */ 545, 545, 545, 545, 545, 545, 545, 545, 545, 545, + /* 3030 */ 426, 385, 428, 545, 545, 545, 545, 545, 545, 545, + /* 3040 */ 413, 545, 545, 545, 545, 545, 545, 545, 545, 545, + /* 3050 */ 545, 545, 545, 426, 545, 428, 545, 545, 545, 413, + /* 3060 */ 545, 545, 545, 545, 545, 545, 545, 545, 545, 545, + /* 3070 */ 545, 545, 426, 545, 428, 545, 545, 545, 545, 475, + /* 3080 */ 545, 545, 478, 545, 545, 545, 482, 483, 484, 485, + /* 3090 */ 486, 487, 545, 489, 545, 545, 545, 545, 545, 545, + /* 3100 */ 545, 545, 475, 545, 545, 478, 545, 545, 545, 482, + /* 3110 */ 483, 484, 485, 486, 487, 545, 489, 545, 545, 545, + /* 3120 */ 545, 475, 545, 545, 478, 545, 545, 545, 482, 483, + /* 3130 */ 484, 485, 486, 487, 545, 489, 369, 369, 369, 369, + /* 3140 */ 369, 369, 369, 369, 369, 369, 369, 369, 369, 369, + /* 3150 */ 369, 369, 369, 369, 369, 369, 369, 369, 369, 369, + /* 3160 */ 369, 369, 369, 369, 369, 369, 369, 369, 369, 369, + /* 3170 */ 369, 369, 369, 369, 369, 369, 369, 369, 369, 369, + /* 3180 */ 369, 369, 369, 369, 369, 369, 369, 369, 369, 369, + /* 3190 */ 369, 369, 369, 369, 369, 369, 369, 369, 369, 369, + /* 3200 */ 369, 369, 369, 369, 369, 369, 369, 369, 369, 369, + /* 3210 */ 369, 369, 369, 369, 369, 369, 369, 369, 369, 369, + /* 3220 */ 369, 369, 369, 369, 369, 369, 369, 369, 369, 369, + /* 3230 */ 369, 369, 369, 369, 369, 369, 369, 369, 369, 369, + /* 3240 */ 369, 369, 369, 369, 369, 369, 369, 369, 369, 369, + /* 3250 */ 369, 369, 369, 369, 369, 369, 369, 369, 369, 369, + /* 3260 */ 369, 369, 369, 369, 369, 369, 369, 369, 369, 369, + /* 3270 */ 369, 369, 369, 369, 369, 369, 369, 369, 369, 369, + /* 3280 */ 369, 369, 369, 369, 369, 369, 369, 369, 369, 369, + /* 3290 */ 369, 369, 369, 369, 369, 369, 369, 369, 369, 369, + /* 3300 */ 369, 369, 369, 369, 369, 369, 369, 369, 369, 369, + /* 3310 */ 369, 369, 369, 369, 369, 369, 369, 369, 369, 369, + /* 3320 */ 369, 369, 369, 369, 369, 369, 369, 369, 369, 369, + /* 3330 */ 369, 369, 369, 369, 369, 369, 369, 369, 369, 369, + /* 3340 */ 369, 369, 369, 369, 369, 369, 369, 369, 369, 369, + /* 3350 */ 369, 369, 369, 369, 369, 369, 369, 369, 369, 369, + /* 3360 */ 369, 369, 369, 369, 369, 369, 369, 369, 369, 369, + /* 3370 */ 369, 369, 369, 369, 369, 369, 369, 369, 369, 369, + /* 3380 */ 369, 369, 369, 369, 369, 369, 369, 369, 369, 369, + /* 3390 */ 369, 369, 369, 369, 369, 369, 369, 369, 369, 369, + /* 3400 */ 369, 369, 369, 369, 369, 369, 369, 369, 369, 369, + /* 3410 */ 369, 369, 369, 369, 369, 369, 369, 369, 369, 369, + /* 3420 */ 369, 369, 369, 369, 369, 369, 369, 369, 369, 369, + /* 3430 */ 369, 369, 369, 369, 369, 369, 369, 369, 369, 369, + /* 3440 */ 369, 369, 369, 369, 369, 369, 369, 369, 369, 369, + /* 3450 */ 369, 369, 369, 369, 369, 369, 369, 369, 369, 369, + /* 3460 */ 369, 369, 369, 369, 369, 369, 369, 369, 369, 369, + /* 3470 */ 369, 369, 369, 369, 369, 369, 369, 369, 369, 369, + /* 3480 */ 369, 369, 369, 369, 369, 369, 369, 369, 369, 369, + /* 3490 */ 369, 369, 369, 369, 369, 369, 369, 369, 369, 369, + /* 3500 */ 369, 369, 369, 369, 369, }; -#define YY_SHIFT_COUNT (917) +#define YY_SHIFT_COUNT (944) #define YY_SHIFT_MIN (0) -#define YY_SHIFT_MAX (2651) +#define YY_SHIFT_MAX (2720) static const unsigned short int yy_shift_ofst[] = { - /* 0 */ 508, 0, 253, 0, 507, 507, 507, 507, 507, 507, - /* 10 */ 507, 507, 507, 507, 507, 507, 760, 1013, 1013, 1266, - /* 20 */ 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, - /* 30 */ 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, - /* 40 */ 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, - /* 50 */ 697, 942, 235, 576, 260, 495, 260, 260, 576, 576, - /* 60 */ 260, 1383, 260, 252, 1383, 73, 260, 20, 1520, 916, - /* 70 */ 126, 126, 1520, 1520, 35, 35, 916, 525, 43, 146, - /* 80 */ 146, 1, 126, 126, 126, 126, 126, 126, 126, 126, - /* 90 */ 126, 126, 126, 263, 281, 126, 126, 139, 20, 126, - /* 100 */ 263, 126, 20, 126, 126, 20, 126, 126, 20, 126, - /* 110 */ 20, 20, 20, 126, 330, 212, 212, 497, 1136, 13, - /* 120 */ 312, 249, 249, 249, 249, 249, 249, 249, 249, 249, - /* 130 */ 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, - /* 140 */ 573, 33, 525, 43, 1132, 1132, 1030, 665, 665, 665, - /* 150 */ 510, 510, 203, 486, 1030, 139, 20, 121, 20, 4, - /* 160 */ 20, 20, 399, 20, 399, 399, 585, 709, 250, 1476, - /* 170 */ 1476, 1476, 1476, 1476, 1476, 753, 2217, 208, 339, 520, - /* 180 */ 520, 717, 164, 424, 82, 565, 138, 148, 662, 30, - /* 190 */ 30, 546, 898, 959, 524, 524, 524, 737, 953, 524, - /* 200 */ 894, 1166, 1106, 1101, 1162, 1166, 1166, 1234, 877, 877, - /* 210 */ 1090, 1346, 1283, 486, 1378, 1623, 1636, 1657, 1458, 139, - /* 220 */ 1657, 139, 1488, 1678, 1680, 1659, 1680, 1659, 1524, 1678, - /* 230 */ 1680, 1678, 1659, 1524, 1524, 1524, 1625, 1628, 1678, 1678, - /* 240 */ 1633, 1678, 1678, 1678, 1724, 1697, 1724, 1697, 1657, 139, - /* 250 */ 139, 1736, 139, 1745, 1747, 139, 1745, 139, 1752, 139, - /* 260 */ 139, 1678, 139, 1724, 20, 20, 20, 20, 20, 20, - /* 270 */ 20, 20, 20, 20, 20, 1678, 709, 709, 1724, 399, - /* 280 */ 399, 399, 1568, 1737, 1657, 330, 1827, 1647, 1653, 1736, - /* 290 */ 330, 1378, 1678, 399, 1569, 1578, 1569, 1578, 1571, 1682, - /* 300 */ 1569, 1572, 1580, 1598, 1378, 1606, 1608, 1579, 1584, 1585, - /* 310 */ 1680, 1882, 1782, 1616, 1745, 330, 330, 1797, 1578, 399, - /* 320 */ 399, 399, 399, 1578, 399, 1742, 330, 585, 330, 1680, - /* 330 */ 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, - /* 340 */ 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, - /* 350 */ 399, 399, 1843, 399, 1678, 330, 1946, 1953, 1724, 3171, - /* 360 */ 3171, 3171, 3171, 3171, 3171, 3171, 3171, 3171, 38, 759, - /* 370 */ 66, 1096, 441, 36, 851, 300, 555, 684, 70, 392, - /* 380 */ 952, 952, 952, 952, 952, 952, 952, 952, 952, 1022, - /* 390 */ 516, 160, 578, 578, 708, 671, 690, 661, 580, 572, - /* 400 */ 687, 444, 1010, 1138, 440, 3, 1115, 773, 3, 3, - /* 410 */ 3, 853, 853, 943, 1300, 1313, 1370, 1365, 1279, 1373, - /* 420 */ 1305, 1312, 1323, 1327, 1372, 1371, 1429, 1446, 1447, 1456, - /* 430 */ 1463, 563, 1374, 1380, 1352, 1388, 1424, 1426, 1438, 1324, - /* 440 */ 327, 1281, 1448, 1481, 1454, 803, 1455, 1423, 1457, 1461, - /* 450 */ 1464, 1508, 1510, 1486, 1492, 1541, 1552, 1558, 1567, 1570, - /* 460 */ 1574, 1576, 1583, 1586, 1506, 1519, 1526, 1535, 1544, 1548, - /* 470 */ 1347, 1427, 1452, 1459, 1611, 1612, 1433, 1621, 2015, 2021, - /* 480 */ 2022, 1978, 2024, 1988, 1792, 1990, 1991, 1993, 1798, 2033, - /* 490 */ 1997, 1998, 1802, 2000, 2038, 1805, 2040, 2004, 2042, 2007, - /* 500 */ 2043, 2023, 2047, 2011, 1820, 2050, 1835, 2053, 1837, 1838, - /* 510 */ 1844, 1848, 2058, 2060, 2062, 1858, 1860, 2065, 2066, 1913, - /* 520 */ 2019, 2020, 2070, 2034, 2072, 2074, 2041, 2026, 2075, 2037, - /* 530 */ 2079, 2044, 2088, 2090, 2091, 2045, 2092, 2093, 2095, 2097, - /* 540 */ 2098, 2099, 1928, 2064, 2102, 1932, 2105, 2107, 2108, 2118, - /* 550 */ 2119, 2120, 2121, 2122, 2123, 2124, 2125, 2126, 2127, 2128, - /* 560 */ 2134, 2135, 2136, 2138, 2139, 2081, 2131, 2087, 2140, 2141, - /* 570 */ 2142, 2143, 2144, 2145, 2147, 2148, 2129, 2149, 1999, 2154, - /* 580 */ 2002, 2156, 2008, 2158, 2159, 2146, 2112, 2151, 2113, 2164, - /* 590 */ 2100, 2166, 2104, 2153, 2167, 2106, 2175, 2111, 2177, 2178, - /* 600 */ 2155, 2132, 2137, 2180, 2161, 2133, 2157, 2181, 2163, 2160, - /* 610 */ 2165, 2182, 2173, 2185, 2150, 2170, 2186, 2171, 2183, 2172, - /* 620 */ 2184, 2188, 2201, 2195, 2191, 2193, 2196, 2213, 2204, 2027, - /* 630 */ 2215, 2171, 2198, 2249, 2250, 2187, 2251, 2253, 2218, 2203, - /* 640 */ 2214, 2258, 2222, 2212, 2223, 2264, 2229, 2216, 2227, 2271, - /* 650 */ 2236, 2230, 2232, 2283, 2284, 2285, 2286, 2287, 2288, 2174, - /* 660 */ 2179, 2257, 2268, 2295, 2260, 2261, 2262, 2263, 2265, 2267, - /* 670 */ 2269, 2270, 2272, 2275, 2277, 2274, 2276, 2279, 2282, 2305, - /* 680 */ 2290, 2315, 2298, 2329, 2309, 2281, 2332, 2313, 2300, 2339, - /* 690 */ 2346, 2348, 2312, 2350, 2316, 2352, 2333, 2334, 2319, 2320, - /* 700 */ 2321, 2247, 2254, 2366, 2189, 2239, 2252, 2266, 2168, 2171, - /* 710 */ 2324, 2362, 2192, 2343, 2360, 2383, 2176, 2363, 2197, 2199, - /* 720 */ 2387, 2390, 2206, 2200, 2208, 2205, 2395, 2369, 2109, 2292, - /* 730 */ 2293, 2296, 2294, 2356, 2372, 2299, 2349, 2302, 2364, 2311, - /* 740 */ 2304, 2379, 2386, 2308, 2310, 2314, 2317, 2325, 2391, 2374, - /* 750 */ 2377, 2318, 2394, 2162, 2354, 2326, 2398, 2331, 2403, 2337, - /* 760 */ 2340, 2448, 2420, 2169, 2418, 2421, 2422, 2423, 2424, 2425, - /* 770 */ 2353, 2355, 2417, 2190, 2435, 2426, 2470, 2471, 2368, 2430, - /* 780 */ 2440, 2371, 2221, 2381, 2487, 2469, 2256, 2382, 2384, 2392, - /* 790 */ 2393, 2400, 2404, 2405, 2385, 2443, 2406, 2407, 2444, 2402, - /* 800 */ 2473, 2273, 2410, 2412, 2413, 2411, 2415, 2342, 2427, 2502, - /* 810 */ 2491, 2345, 2428, 2429, 2171, 2488, 2431, 2432, 2433, 2436, - /* 820 */ 2437, 2419, 2434, 2507, 2513, 2441, 2439, 2516, 2446, 2447, - /* 830 */ 2518, 2392, 2449, 2521, 2393, 2450, 2523, 2400, 2451, 2527, - /* 840 */ 2404, 2442, 2445, 2452, 2453, 2454, 2456, 2455, 2532, 2457, - /* 850 */ 2530, 2458, 2532, 2532, 2548, 2498, 2501, 2537, 2538, 2543, - /* 860 */ 2544, 2545, 2546, 2547, 2551, 2553, 2554, 2555, 2514, 2489, - /* 870 */ 2517, 2490, 2564, 2562, 2563, 2566, 2582, 2577, 2578, 2579, - /* 880 */ 2539, 2275, 2580, 2277, 2583, 2584, 2585, 2588, 2597, 2590, - /* 890 */ 2623, 2592, 2581, 2589, 2633, 2598, 2587, 2594, 2634, 2600, - /* 900 */ 2591, 2599, 2639, 2603, 2593, 2604, 2647, 2612, 2613, 2651, - /* 910 */ 2631, 2621, 2635, 2637, 2638, 2640, 2642, 2636, + /* 0 */ 512, 0, 255, 0, 511, 511, 511, 511, 511, 511, + /* 10 */ 511, 511, 511, 511, 511, 511, 766, 1021, 1021, 1276, + /* 20 */ 1021, 1021, 1021, 1021, 1021, 1021, 1021, 1021, 1021, 1021, + /* 30 */ 1021, 1021, 1021, 1021, 1021, 1021, 1021, 1021, 1021, 1021, + /* 40 */ 1021, 1021, 1021, 1021, 1021, 1021, 1021, 1021, 1021, 1021, + /* 50 */ 40, 162, 285, 284, 107, 237, 107, 107, 284, 284, + /* 60 */ 107, 1363, 107, 254, 1363, 171, 107, 28, 599, 994, + /* 70 */ 994, 67, 67, 599, 599, 158, 158, 994, 994, 268, + /* 80 */ 271, 149, 149, 803, 67, 67, 67, 67, 67, 67, + /* 90 */ 67, 87, 67, 67, 67, 67, 201, 297, 87, 67, + /* 100 */ 67, 305, 28, 67, 201, 67, 28, 67, 67, 28, + /* 110 */ 67, 28, 67, 67, 28, 67, 28, 28, 28, 67, + /* 120 */ 547, 214, 214, 516, 275, 14, 314, 1307, 1307, 1307, + /* 130 */ 1307, 1307, 1307, 1307, 1307, 1307, 1307, 1307, 1307, 1307, + /* 140 */ 1307, 1307, 1307, 1307, 1307, 1307, 814, 647, 268, 271, + /* 150 */ 825, 825, 152, 645, 645, 645, 59, 59, 5, 280, + /* 160 */ 152, 305, 28, 711, 28, 630, 28, 28, 1018, 28, + /* 170 */ 1018, 1018, 1016, 1126, 467, 554, 554, 554, 554, 554, + /* 180 */ 554, 1233, 1981, 212, 378, 256, 256, 465, 365, 428, + /* 190 */ 299, 846, 810, 316, 855, 876, 876, 813, 759, 976, + /* 200 */ 718, 718, 718, 931, 311, 718, 856, 1015, 1310, 993, + /* 210 */ 1119, 1015, 1015, 1228, 1290, 1290, 1052, 840, 684, 280, + /* 220 */ 1382, 1624, 1638, 1663, 1456, 305, 1663, 305, 1480, 1672, + /* 230 */ 1675, 1653, 1675, 1653, 1524, 1672, 1675, 1672, 1653, 1524, + /* 240 */ 1524, 1524, 1613, 1622, 1672, 1672, 1633, 1672, 1672, 1672, + /* 250 */ 1727, 1704, 1727, 1704, 1663, 305, 305, 1739, 305, 1740, + /* 260 */ 1746, 305, 1740, 305, 1748, 305, 1754, 305, 305, 1672, + /* 270 */ 305, 1727, 28, 28, 28, 28, 28, 28, 28, 28, + /* 280 */ 28, 28, 28, 1672, 1126, 1126, 1727, 1018, 1018, 1018, + /* 290 */ 1574, 1709, 1663, 547, 1803, 1608, 1614, 1739, 547, 1382, + /* 300 */ 1672, 1018, 1530, 1545, 1530, 1545, 1542, 1647, 1530, 1546, + /* 310 */ 1566, 1585, 1382, 1588, 1592, 1564, 1569, 1573, 1675, 1872, + /* 320 */ 1772, 1601, 1740, 547, 547, 1785, 1545, 1018, 1018, 1018, + /* 330 */ 1018, 1545, 1018, 1726, 547, 1018, 1730, 1754, 547, 1016, + /* 340 */ 547, 1675, 1018, 1018, 1018, 1018, 1018, 1018, 1018, 1018, + /* 350 */ 1018, 1018, 1018, 1018, 1018, 1018, 1018, 1018, 1018, 1018, + /* 360 */ 1018, 1018, 1018, 1018, 1824, 1018, 1672, 547, 1922, 1921, + /* 370 */ 1727, 3136, 3136, 3136, 3136, 3136, 3136, 3136, 3136, 3136, + /* 380 */ 38, 1388, 789, 821, 688, 55, 697, 15, 31, 723, + /* 390 */ 802, 827, 985, 985, 985, 985, 985, 985, 985, 985, + /* 400 */ 985, 485, 570, 1023, 128, 54, 601, 601, 1088, 902, + /* 410 */ 787, 905, 918, 472, 1182, 1273, 866, 535, 675, 801, + /* 420 */ 535, 535, 535, 1049, 1049, 1390, 11, 1355, 1391, 1071, + /* 430 */ 1236, 1402, 1278, 1289, 1297, 1302, 1367, 1392, 1407, 637, + /* 440 */ 1409, 1410, 1447, 1195, 1384, 1412, 1353, 1432, 1435, 1437, + /* 450 */ 1443, 1305, 1313, 928, 1445, 1457, 1446, 1368, 1448, 694, + /* 460 */ 1449, 1451, 1452, 1455, 1466, 1473, 1474, 1498, 1500, 1502, + /* 470 */ 1533, 1538, 1553, 1556, 1559, 1568, 1580, 1582, 1484, 1486, + /* 480 */ 1526, 1529, 1540, 1554, 1490, 1511, 517, 1423, 1593, 1598, + /* 490 */ 1563, 1612, 2010, 2013, 2014, 1970, 2017, 1984, 1782, 1985, + /* 500 */ 1986, 1987, 1784, 2025, 1989, 1990, 1792, 1994, 2033, 1799, + /* 510 */ 2037, 2001, 2039, 2003, 2045, 2026, 2050, 2015, 1822, 2054, + /* 520 */ 1837, 2055, 1838, 1839, 1847, 1851, 2063, 2064, 2071, 1866, + /* 530 */ 1868, 2077, 2078, 1926, 2032, 2034, 2082, 2048, 2084, 2086, + /* 540 */ 2052, 2036, 2093, 2046, 2096, 2057, 2097, 2099, 2100, 2062, + /* 550 */ 2103, 2104, 2116, 2117, 2118, 2119, 1949, 2085, 2123, 1953, + /* 560 */ 2124, 2126, 2129, 2130, 2131, 2132, 2134, 2138, 2139, 2141, + /* 570 */ 2142, 2143, 2150, 2152, 2153, 2154, 2156, 2157, 2158, 2159, + /* 580 */ 2087, 2160, 2120, 2161, 2163, 2164, 2166, 2167, 2169, 2171, + /* 590 */ 2173, 2174, 2155, 2178, 2029, 2179, 2027, 2184, 2035, 2186, + /* 600 */ 2188, 2175, 2145, 2176, 2149, 2201, 2137, 2204, 2140, 2170, + /* 610 */ 2206, 2144, 2210, 2146, 2212, 2213, 2177, 2168, 2180, 2215, + /* 620 */ 2193, 2172, 2190, 2233, 2197, 2185, 2195, 2235, 2202, 2238, + /* 630 */ 2196, 2200, 2211, 2194, 2198, 2231, 2199, 2250, 2208, 2214, + /* 640 */ 2252, 2253, 2254, 2255, 2216, 2058, 2257, 2194, 2217, 2261, + /* 650 */ 2194, 2220, 2263, 2267, 2205, 2270, 2271, 2243, 2232, 2240, + /* 660 */ 2288, 2248, 2239, 2244, 2292, 2256, 2245, 2259, 2294, 2258, + /* 670 */ 2246, 2264, 2298, 2299, 2303, 2307, 2308, 2309, 2191, 2209, + /* 680 */ 2268, 2290, 2313, 2278, 2279, 2280, 2291, 2293, 2296, 2297, + /* 690 */ 2301, 2302, 2310, 2311, 2304, 2314, 2318, 2316, 2329, 2320, + /* 700 */ 2331, 2324, 2335, 2326, 2283, 2350, 2332, 2325, 2364, 2366, + /* 710 */ 2367, 2333, 2371, 2336, 2372, 2347, 2354, 2338, 2339, 2340, + /* 720 */ 2269, 2272, 2379, 2203, 2262, 2265, 2274, 2181, 2194, 2337, + /* 730 */ 2382, 2221, 2352, 2365, 2390, 2207, 2373, 2223, 2219, 2391, + /* 740 */ 2393, 2225, 2222, 2226, 2224, 2395, 2374, 2121, 2289, 2312, + /* 750 */ 2306, 2317, 2386, 2388, 2315, 2378, 2322, 2383, 2341, 2330, + /* 760 */ 2410, 2411, 2334, 2343, 2344, 2345, 2359, 2412, 2398, 2400, + /* 770 */ 2346, 2418, 2162, 2385, 2362, 2419, 2351, 2413, 2368, 2370, + /* 780 */ 2474, 2445, 2182, 2446, 2447, 2449, 2450, 2451, 2452, 2380, + /* 790 */ 2381, 2441, 2135, 2458, 2448, 2495, 2505, 2389, 2457, 2468, + /* 800 */ 2394, 2234, 2397, 2507, 2485, 2266, 2401, 2402, 2399, 2404, + /* 810 */ 2405, 2407, 2409, 2415, 2463, 2417, 2424, 2475, 2425, 2501, + /* 820 */ 2300, 2427, 2428, 2430, 2434, 2436, 2375, 2459, 2544, 2514, + /* 830 */ 2363, 2460, 2465, 2461, 2559, 2453, 2470, 2376, 2518, 2471, + /* 840 */ 2443, 2194, 2512, 2472, 2473, 2480, 2476, 2478, 2464, 2481, + /* 850 */ 2549, 2557, 2490, 2492, 2568, 2496, 2494, 2571, 2399, 2497, + /* 860 */ 2573, 2404, 2500, 2578, 2405, 2504, 2580, 2407, 2493, 2502, + /* 870 */ 2503, 2506, 2510, 2508, 2513, 2595, 2523, 2592, 2524, 2595, + /* 880 */ 2595, 2616, 2566, 2569, 2605, 2606, 2610, 2611, 2612, 2613, + /* 890 */ 2614, 2615, 2618, 2619, 2621, 2574, 2554, 2581, 2556, 2629, + /* 900 */ 2626, 2628, 2631, 2642, 2634, 2635, 2637, 2587, 2310, 2638, + /* 910 */ 2311, 2639, 2641, 2643, 2644, 2657, 2645, 2683, 2647, 2636, + /* 920 */ 2649, 2685, 2652, 2648, 2650, 2694, 2658, 2655, 2666, 2697, + /* 930 */ 2672, 2659, 2670, 2714, 2678, 2680, 2720, 2699, 2689, 2707, + /* 940 */ 2711, 2712, 2715, 2718, 2716, }; -#define YY_REDUCE_COUNT (367) -#define YY_REDUCE_MIN (-501) -#define YY_REDUCE_MAX (2688) +#define YY_REDUCE_COUNT (379) +#define YY_REDUCE_MIN (-454) +#define YY_REDUCE_MAX (2646) static const short yy_reduce_ofst[] = { - /* 0 */ 975, -324, 190, 406, 426, 506, 657, 703, 910, 956, - /* 10 */ 619, 872, 1069, 1208, 1322, 1342, 171, 1362, 1381, 1462, - /* 20 */ 1494, 1521, 1605, 1635, 1726, 1746, 1763, 1846, 1240, 1865, - /* 30 */ 1892, 1968, 2006, 2030, 2052, 2130, 2202, 2219, 2241, 2278, - /* 40 */ 2341, 2361, 2380, 2464, 2482, 2499, 2586, 2602, 2625, 2688, - /* 50 */ -326, -342, -423, -102, 527, 530, 543, 693, -178, 206, - /* 60 */ 796, -398, -499, -367, -383, -501, 23, 412, -252, 50, - /* 70 */ -53, 198, -137, -43, -374, -274, -421, -254, -248, -93, - /* 80 */ 95, 262, -76, 410, 540, 542, -115, -105, 570, 702, - /* 90 */ 720, 770, 176, 64, 404, 774, 831, -337, 132, 833, - /* 100 */ 222, 902, 469, 907, 909, 587, 925, 930, 731, 933, - /* 110 */ 653, 766, 658, 955, 45, -58, -58, -189, 637, -494, - /* 120 */ 92, -323, -20, 14, 409, 468, 568, 719, 721, 735, - /* 130 */ 749, 817, 821, 825, 829, 835, 878, 882, 929, 940, - /* 140 */ 42, -357, 638, 654, 849, 863, 885, -357, 47, 437, - /* 150 */ 445, 832, 905, 273, 966, 939, -407, 675, 696, 837, - /* 160 */ 906, 407, 109, 949, 934, 947, 965, 1020, 449, 523, - /* 170 */ 558, 626, 718, 791, 449, 983, 526, 1043, 964, 927, - /* 180 */ 927, 995, 976, 1054, 1057, 1188, 927, 1179, 1179, 1194, - /* 190 */ 1229, 1192, 1249, 1196, 1111, 1112, 1113, 1203, 1179, 1128, - /* 200 */ 1253, 1216, 1271, 1232, 1202, 1221, 1222, 1179, 1153, 1154, - /* 210 */ 1139, 1170, 1156, 1268, 1223, 1205, 1211, 1231, 1224, 1290, - /* 220 */ 1233, 1303, 1245, 1317, 1320, 1273, 1326, 1274, 1284, 1331, - /* 230 */ 1338, 1341, 1291, 1296, 1297, 1298, 1335, 1343, 1354, 1356, - /* 240 */ 1348, 1358, 1360, 1361, 1375, 1376, 1377, 1379, 1289, 1363, - /* 250 */ 1366, 1333, 1369, 1385, 1321, 1384, 1386, 1393, 1334, 1394, - /* 260 */ 1396, 1407, 1400, 1401, 1392, 1395, 1397, 1398, 1403, 1412, - /* 270 */ 1414, 1415, 1416, 1417, 1418, 1413, 1421, 1439, 1468, 1410, - /* 280 */ 1422, 1430, 1387, 1391, 1390, 1466, 1406, 1409, 1419, 1442, - /* 290 */ 1480, 1425, 1489, 1465, 1355, 1434, 1364, 1437, 1367, 1382, - /* 300 */ 1389, 1405, 1399, 1408, 1444, 1402, 1404, 1357, 1428, 1420, - /* 310 */ 1517, 1443, 1411, 1436, 1527, 1523, 1530, 1432, 1471, 1501, - /* 320 */ 1502, 1503, 1504, 1487, 1507, 1497, 1547, 1536, 1559, 1566, - /* 330 */ 1528, 1529, 1531, 1533, 1534, 1537, 1539, 1540, 1542, 1553, - /* 340 */ 1554, 1555, 1556, 1557, 1560, 1561, 1562, 1563, 1582, 1587, - /* 350 */ 1588, 1589, 1545, 1590, 1600, 1594, 1618, 1617, 1619, 1543, - /* 360 */ 1546, 1565, 1577, 1597, 1599, 1604, 1620, 1651, + /* 0 */ 690, -330, -25, 409, 439, 579, 623, 700, 753, 878, + /* 10 */ 1008, 1171, 1219, 1248, 1314, 1356, 1380, 1422, 1488, 1505, + /* 20 */ 1583, 1623, 1662, 1707, 1742, 1790, 1836, 1874, 1919, 1952, + /* 30 */ 1983, 2047, 2068, 2091, 2113, 2136, 2218, 2241, 2260, 2285, + /* 40 */ 2305, 2369, 2433, 2454, 2477, 2499, 2522, 2604, 2627, 2646, + /* 50 */ -332, -325, -454, 56, -434, 451, 687, 922, -190, 64, + /* 60 */ 449, -209, -315, -108, 429, -229, -155, -364, -400, -284, + /* 70 */ 2, -30, -2, -412, -405, -375, -280, -426, -394, -377, + /* 80 */ -281, 148, 339, -48, 444, 486, 515, 663, -199, 357, + /* 90 */ 692, 115, 699, 730, 737, 361, -287, -13, 399, 768, + /* 100 */ 770, 216, 52, 772, 574, 784, -404, 860, 908, -135, + /* 110 */ 915, 632, 948, 954, 379, 964, 746, 507, 794, 966, + /* 120 */ -19, -298, -298, 244, 455, -352, -139, -20, 110, 175, + /* 130 */ 580, 830, 871, 879, 897, 945, 968, 970, 971, 973, + /* 140 */ 975, 982, 987, 1001, 1011, 1017, 71, -449, 530, 321, + /* 150 */ 614, 757, 765, -449, -390, 571, 487, 551, 991, 538, + /* 160 */ 812, 676, 372, 629, 698, 79, 828, 799, 754, 889, + /* 170 */ 790, 829, 852, 884, -414, 1038, 1060, 1063, 1066, 1086, + /* 180 */ -414, 771, 1042, 1132, 1077, 1044, 1044, 1032, 1045, 1078, + /* 190 */ 1091, 1217, 1044, 1201, 1201, 1214, 1215, 1178, 1235, 1180, + /* 200 */ 1090, 1100, 1103, 1183, 1201, 1108, 1252, 1204, 1259, 1223, + /* 210 */ 1188, 1212, 1220, 1201, 1147, 1148, 1133, 1166, 1152, 1270, + /* 220 */ 1222, 1202, 1205, 1218, 1216, 1291, 1224, 1294, 1232, 1309, + /* 230 */ 1311, 1265, 1322, 1274, 1279, 1328, 1329, 1332, 1282, 1286, + /* 240 */ 1292, 1293, 1324, 1340, 1354, 1359, 1350, 1362, 1366, 1369, + /* 250 */ 1374, 1375, 1378, 1376, 1295, 1365, 1370, 1333, 1371, 1381, + /* 260 */ 1315, 1377, 1385, 1383, 1325, 1386, 1335, 1387, 1393, 1394, + /* 270 */ 1395, 1400, 1372, 1389, 1396, 1398, 1399, 1403, 1404, 1405, + /* 280 */ 1406, 1408, 1411, 1397, 1415, 1416, 1418, 1357, 1361, 1379, + /* 290 */ 1342, 1358, 1413, 1431, 1360, 1364, 1373, 1401, 1441, 1419, + /* 300 */ 1453, 1420, 1320, 1424, 1327, 1426, 1334, 1346, 1330, 1414, + /* 310 */ 1417, 1421, 1427, 1429, 1425, 1341, 1349, 1352, 1506, 1434, + /* 320 */ 1428, 1433, 1509, 1507, 1508, 1430, 1460, 1476, 1477, 1487, + /* 330 */ 1491, 1462, 1493, 1475, 1531, 1497, 1485, 1492, 1534, 1518, + /* 340 */ 1537, 1549, 1504, 1510, 1514, 1515, 1519, 1520, 1522, 1523, + /* 350 */ 1527, 1528, 1532, 1535, 1536, 1539, 1541, 1543, 1550, 1552, + /* 360 */ 1555, 1558, 1560, 1567, 1547, 1571, 1572, 1594, 1586, 1579, + /* 370 */ 1602, 1544, 1551, 1548, 1561, 1591, 1595, 1597, 1615, 1635, }; static const YYACTIONTYPE yy_default[] = { - /* 0 */ 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, - /* 10 */ 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, - /* 20 */ 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, - /* 30 */ 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, - /* 40 */ 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, - /* 50 */ 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, - /* 60 */ 2454, 2100, 2100, 2417, 2100, 2100, 2100, 2100, 2100, 2100, - /* 70 */ 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2424, 2100, 2100, - /* 80 */ 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, - /* 90 */ 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2200, 2100, 2100, - /* 100 */ 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, - /* 110 */ 2100, 2100, 2100, 2100, 2198, 2703, 2100, 2100, 2100, 2732, - /* 120 */ 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, - /* 130 */ 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, - /* 140 */ 2100, 2715, 2100, 2100, 2171, 2171, 2100, 2715, 2715, 2715, - /* 150 */ 2675, 2675, 2198, 2100, 2100, 2200, 2100, 2496, 2100, 2100, - /* 160 */ 2100, 2100, 2100, 2100, 2100, 2100, 2335, 2130, 2494, 2100, - /* 170 */ 2100, 2100, 2100, 2100, 2100, 2100, 2480, 2100, 2761, 2707, - /* 180 */ 2708, 2823, 2100, 2764, 2726, 2100, 2721, 2100, 2100, 2100, - /* 190 */ 2100, 2429, 2100, 2751, 2100, 2100, 2100, 2100, 2100, 2100, - /* 200 */ 2100, 2100, 2100, 2283, 2474, 2100, 2100, 2100, 2100, 2100, - /* 210 */ 2807, 2705, 2745, 2100, 2755, 2100, 2521, 2100, 2510, 2200, - /* 220 */ 2100, 2200, 2467, 2412, 2100, 2422, 2100, 2422, 2419, 2100, - /* 230 */ 2100, 2100, 2422, 2419, 2419, 2419, 2272, 2268, 2100, 2100, - /* 240 */ 2266, 2100, 2100, 2100, 2100, 2155, 2100, 2155, 2100, 2200, - /* 250 */ 2200, 2100, 2200, 2100, 2100, 2200, 2100, 2200, 2100, 2200, - /* 260 */ 2200, 2100, 2200, 2100, 2100, 2100, 2100, 2100, 2100, 2100, - /* 270 */ 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, - /* 280 */ 2100, 2100, 2508, 2490, 2100, 2198, 2100, 2478, 2476, 2100, - /* 290 */ 2198, 2755, 2100, 2100, 2777, 2772, 2777, 2772, 2791, 2787, - /* 300 */ 2777, 2796, 2793, 2757, 2755, 2738, 2734, 2826, 2813, 2809, - /* 310 */ 2100, 2100, 2743, 2741, 2100, 2198, 2198, 2100, 2772, 2100, - /* 320 */ 2100, 2100, 2100, 2772, 2100, 2100, 2198, 2100, 2198, 2100, - /* 330 */ 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, - /* 340 */ 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, - /* 350 */ 2100, 2100, 2299, 2100, 2100, 2198, 2100, 2139, 2100, 2469, - /* 360 */ 2499, 2450, 2450, 2338, 2338, 2338, 2201, 2105, 2100, 2100, - /* 370 */ 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, - /* 380 */ 2790, 2789, 2626, 2100, 2679, 2678, 2677, 2668, 2625, 2295, - /* 390 */ 2100, 2100, 2624, 2623, 2100, 2100, 2100, 2100, 2100, 2100, - /* 400 */ 2100, 2100, 2100, 2100, 2100, 2617, 2100, 2100, 2618, 2616, - /* 410 */ 2615, 2441, 2440, 2100, 2100, 2100, 2100, 2100, 2100, 2100, - /* 420 */ 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, - /* 430 */ 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, - /* 440 */ 2810, 2814, 2100, 2704, 2100, 2100, 2100, 2597, 2100, 2100, - /* 450 */ 2100, 2100, 2100, 2565, 2560, 2551, 2542, 2557, 2548, 2536, - /* 460 */ 2554, 2545, 2533, 2530, 2100, 2100, 2100, 2100, 2100, 2100, - /* 470 */ 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, - /* 480 */ 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, - /* 490 */ 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, - /* 500 */ 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, - /* 510 */ 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2418, - /* 520 */ 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, - /* 530 */ 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, - /* 540 */ 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, - /* 550 */ 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, - /* 560 */ 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, - /* 570 */ 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, - /* 580 */ 2100, 2100, 2433, 2100, 2100, 2100, 2100, 2100, 2100, 2100, - /* 590 */ 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, - /* 600 */ 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, - /* 610 */ 2100, 2100, 2100, 2100, 2100, 2100, 2144, 2604, 2100, 2100, - /* 620 */ 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, - /* 630 */ 2100, 2607, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, - /* 640 */ 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, - /* 650 */ 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, - /* 660 */ 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, - /* 670 */ 2100, 2100, 2100, 2244, 2243, 2100, 2100, 2100, 2100, 2100, - /* 680 */ 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, - /* 690 */ 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, - /* 700 */ 2100, 2608, 2100, 2100, 2100, 2494, 2100, 2100, 2100, 2599, - /* 710 */ 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, - /* 720 */ 2100, 2100, 2100, 2100, 2100, 2100, 2806, 2758, 2100, 2100, - /* 730 */ 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, - /* 740 */ 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, - /* 750 */ 2597, 2100, 2788, 2100, 2100, 2100, 2100, 2100, 2100, 2100, - /* 760 */ 2804, 2100, 2808, 2100, 2100, 2100, 2100, 2100, 2100, 2100, - /* 770 */ 2714, 2710, 2100, 2100, 2706, 2100, 2100, 2100, 2100, 2100, - /* 780 */ 2665, 2100, 2100, 2100, 2699, 2100, 2100, 2100, 2100, 2334, - /* 790 */ 2333, 2332, 2331, 2100, 2100, 2100, 2100, 2100, 2100, 2608, - /* 800 */ 2100, 2611, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, - /* 810 */ 2100, 2100, 2100, 2100, 2596, 2100, 2650, 2649, 2100, 2100, - /* 820 */ 2100, 2100, 2100, 2100, 2100, 2328, 2100, 2100, 2100, 2100, - /* 830 */ 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, - /* 840 */ 2100, 2312, 2310, 2309, 2308, 2100, 2305, 2100, 2345, 2100, - /* 850 */ 2100, 2100, 2341, 2340, 2100, 2100, 2100, 2100, 2100, 2100, - /* 860 */ 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, - /* 870 */ 2100, 2100, 2219, 2100, 2100, 2100, 2100, 2100, 2100, 2100, - /* 880 */ 2100, 2211, 2100, 2210, 2100, 2100, 2100, 2100, 2100, 2100, - /* 890 */ 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, - /* 900 */ 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, - /* 910 */ 2100, 2129, 2100, 2100, 2100, 2100, 2100, 2100, + /* 0 */ 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, + /* 10 */ 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, + /* 20 */ 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, + /* 30 */ 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, + /* 40 */ 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, + /* 50 */ 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, + /* 60 */ 2511, 2146, 2146, 2463, 2146, 2146, 2146, 2146, 2146, 2146, + /* 70 */ 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2470, + /* 80 */ 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, + /* 90 */ 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, + /* 100 */ 2146, 2246, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, + /* 110 */ 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, + /* 120 */ 2244, 2761, 2146, 2146, 2146, 2790, 2146, 2146, 2146, 2146, + /* 130 */ 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, + /* 140 */ 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2773, 2146, 2146, + /* 150 */ 2217, 2217, 2146, 2773, 2773, 2773, 2733, 2733, 2244, 2146, + /* 160 */ 2146, 2246, 2146, 2553, 2146, 2146, 2146, 2146, 2146, 2146, + /* 170 */ 2146, 2146, 2381, 2176, 2551, 2146, 2146, 2146, 2146, 2146, + /* 180 */ 2146, 2146, 2537, 2146, 2819, 2765, 2766, 2881, 2146, 2822, + /* 190 */ 2784, 2146, 2779, 2146, 2146, 2146, 2146, 2475, 2146, 2809, + /* 200 */ 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2329, + /* 210 */ 2531, 2146, 2146, 2146, 2146, 2146, 2865, 2763, 2803, 2146, + /* 220 */ 2813, 2146, 2578, 2146, 2567, 2246, 2146, 2246, 2524, 2458, + /* 230 */ 2146, 2468, 2146, 2468, 2465, 2146, 2146, 2146, 2468, 2465, + /* 240 */ 2465, 2465, 2318, 2314, 2146, 2146, 2312, 2146, 2146, 2146, + /* 250 */ 2146, 2201, 2146, 2201, 2146, 2246, 2246, 2146, 2246, 2146, + /* 260 */ 2146, 2246, 2146, 2246, 2146, 2246, 2146, 2246, 2246, 2146, + /* 270 */ 2246, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, + /* 280 */ 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, + /* 290 */ 2565, 2547, 2146, 2244, 2146, 2535, 2533, 2146, 2244, 2813, + /* 300 */ 2146, 2146, 2835, 2830, 2835, 2830, 2849, 2845, 2835, 2854, + /* 310 */ 2851, 2815, 2813, 2796, 2792, 2884, 2871, 2867, 2146, 2146, + /* 320 */ 2801, 2799, 2146, 2244, 2244, 2146, 2830, 2146, 2146, 2146, + /* 330 */ 2146, 2830, 2146, 2146, 2244, 2146, 2487, 2146, 2244, 2146, + /* 340 */ 2244, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, + /* 350 */ 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, + /* 360 */ 2146, 2146, 2146, 2146, 2345, 2146, 2146, 2244, 2146, 2185, + /* 370 */ 2146, 2526, 2556, 2507, 2507, 2384, 2384, 2384, 2247, 2151, + /* 380 */ 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, + /* 390 */ 2146, 2146, 2848, 2847, 2684, 2146, 2737, 2736, 2735, 2726, + /* 400 */ 2683, 2341, 2146, 2146, 2146, 2146, 2682, 2681, 2146, 2146, + /* 410 */ 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2675, 2146, 2146, + /* 420 */ 2676, 2674, 2673, 2498, 2497, 2146, 2146, 2146, 2146, 2146, + /* 430 */ 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, + /* 440 */ 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, + /* 450 */ 2146, 2146, 2868, 2872, 2146, 2762, 2146, 2146, 2146, 2654, + /* 460 */ 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2622, 2617, 2608, + /* 470 */ 2599, 2614, 2605, 2593, 2611, 2602, 2590, 2587, 2146, 2146, + /* 480 */ 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, + /* 490 */ 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, + /* 500 */ 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, + /* 510 */ 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, + /* 520 */ 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, + /* 530 */ 2146, 2146, 2146, 2464, 2146, 2146, 2146, 2146, 2146, 2146, + /* 540 */ 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, + /* 550 */ 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, + /* 560 */ 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, + /* 570 */ 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, + /* 580 */ 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, + /* 590 */ 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2479, 2146, + /* 600 */ 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, + /* 610 */ 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, + /* 620 */ 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, + /* 630 */ 2146, 2146, 2190, 2661, 2146, 2146, 2146, 2146, 2146, 2146, + /* 640 */ 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2664, 2146, 2146, + /* 650 */ 2665, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, + /* 660 */ 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, + /* 670 */ 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, + /* 680 */ 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, + /* 690 */ 2146, 2146, 2290, 2289, 2146, 2146, 2146, 2146, 2146, 2146, + /* 700 */ 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, + /* 710 */ 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, + /* 720 */ 2666, 2146, 2146, 2146, 2551, 2146, 2146, 2146, 2656, 2146, + /* 730 */ 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, + /* 740 */ 2146, 2146, 2146, 2146, 2146, 2864, 2816, 2146, 2146, 2146, + /* 750 */ 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, + /* 760 */ 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2654, + /* 770 */ 2146, 2846, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2862, + /* 780 */ 2146, 2866, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2772, + /* 790 */ 2768, 2146, 2146, 2764, 2146, 2146, 2146, 2146, 2146, 2723, + /* 800 */ 2146, 2146, 2146, 2757, 2146, 2146, 2146, 2146, 2380, 2379, + /* 810 */ 2378, 2377, 2146, 2146, 2146, 2146, 2146, 2146, 2666, 2146, + /* 820 */ 2669, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, + /* 830 */ 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, + /* 840 */ 2146, 2653, 2146, 2708, 2707, 2146, 2146, 2146, 2146, 2146, + /* 850 */ 2146, 2146, 2374, 2146, 2146, 2146, 2146, 2146, 2146, 2146, + /* 860 */ 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2358, 2356, + /* 870 */ 2355, 2354, 2146, 2351, 2146, 2391, 2146, 2146, 2146, 2387, + /* 880 */ 2386, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, + /* 890 */ 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2265, + /* 900 */ 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2257, 2146, + /* 910 */ 2256, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, + /* 920 */ 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, + /* 930 */ 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2175, 2146, + /* 940 */ 2146, 2146, 2146, 2146, 2146, }; /********** End of lemon-generated parsing tables *****************************/ @@ -1258,7 +1628,7 @@ static const YYCODETYPE yyFallback[] = { 0, /* BWLIMIT => nothing */ 0, /* START => nothing */ 0, /* TIMESTAMP => nothing */ - 319, /* END => ABORT */ + 321, /* END => ABORT */ 0, /* TABLE => nothing */ 0, /* NK_LP => nothing */ 0, /* NK_RP => nothing */ @@ -1272,7 +1642,7 @@ static const YYCODETYPE yyFallback[] = { 0, /* USING => nothing */ 0, /* TAGS => nothing */ 0, /* PRIMARY => nothing */ - 319, /* KEY => ABORT */ + 321, /* KEY => ABORT */ 0, /* BOOL => nothing */ 0, /* TINYINT => nothing */ 0, /* SMALLINT => nothing */ @@ -1331,7 +1701,7 @@ static const YYCODETYPE yyFallback[] = { 0, /* VNODES => nothing */ 0, /* ALIVE => nothing */ 0, /* VIEWS => nothing */ - 319, /* VIEW => ABORT */ + 321, /* VIEW => ABORT */ 0, /* COMPACTS => nothing */ 0, /* NORMAL => nothing */ 0, /* CHILD => nothing */ @@ -1435,7 +1805,7 @@ static const YYCODETYPE yyFallback[] = { 0, /* LEFT => nothing */ 0, /* RIGHT => nothing */ 0, /* OUTER => nothing */ - 319, /* SEMI => ABORT */ + 321, /* SEMI => ABORT */ 0, /* ANTI => nothing */ 0, /* ASOF => nothing */ 0, /* WINDOW => nothing */ @@ -1471,53 +1841,53 @@ static const YYCODETYPE yyFallback[] = { 0, /* ASC => nothing */ 0, /* NULLS => nothing */ 0, /* ABORT => nothing */ - 319, /* AFTER => ABORT */ - 319, /* ATTACH => ABORT */ - 319, /* BEFORE => ABORT */ - 319, /* BEGIN => ABORT */ - 319, /* BITAND => ABORT */ - 319, /* BITNOT => ABORT */ - 319, /* BITOR => ABORT */ - 319, /* BLOCKS => ABORT */ - 319, /* CHANGE => ABORT */ - 319, /* COMMA => ABORT */ - 319, /* CONCAT => ABORT */ - 319, /* CONFLICT => ABORT */ - 319, /* COPY => ABORT */ - 319, /* DEFERRED => ABORT */ - 319, /* DELIMITERS => ABORT */ - 319, /* DETACH => ABORT */ - 319, /* DIVIDE => ABORT */ - 319, /* DOT => ABORT */ - 319, /* EACH => ABORT */ - 319, /* FAIL => ABORT */ - 319, /* FILE => ABORT */ - 319, /* FOR => ABORT */ - 319, /* GLOB => ABORT */ - 319, /* ID => ABORT */ - 319, /* IMMEDIATE => ABORT */ - 319, /* IMPORT => ABORT */ - 319, /* INITIALLY => ABORT */ - 319, /* INSTEAD => ABORT */ - 319, /* ISNULL => ABORT */ - 319, /* MODULES => ABORT */ - 319, /* NK_BITNOT => ABORT */ - 319, /* NK_SEMI => ABORT */ - 319, /* NOTNULL => ABORT */ - 319, /* OF => ABORT */ - 319, /* PLUS => ABORT */ - 319, /* PRIVILEGE => ABORT */ - 319, /* RAISE => ABORT */ - 319, /* RESTRICT => ABORT */ - 319, /* ROW => ABORT */ - 319, /* STAR => ABORT */ - 319, /* STATEMENT => ABORT */ - 319, /* STRICT => ABORT */ - 319, /* STRING => ABORT */ - 319, /* TIMES => ABORT */ - 319, /* VALUES => ABORT */ - 319, /* VARIABLE => ABORT */ - 319, /* WAL => ABORT */ + 321, /* AFTER => ABORT */ + 321, /* ATTACH => ABORT */ + 321, /* BEFORE => ABORT */ + 321, /* BEGIN => ABORT */ + 321, /* BITAND => ABORT */ + 321, /* BITNOT => ABORT */ + 321, /* BITOR => ABORT */ + 321, /* BLOCKS => ABORT */ + 321, /* CHANGE => ABORT */ + 321, /* COMMA => ABORT */ + 321, /* CONCAT => ABORT */ + 321, /* CONFLICT => ABORT */ + 321, /* COPY => ABORT */ + 321, /* DEFERRED => ABORT */ + 321, /* DELIMITERS => ABORT */ + 321, /* DETACH => ABORT */ + 321, /* DIVIDE => ABORT */ + 321, /* DOT => ABORT */ + 321, /* EACH => ABORT */ + 321, /* FAIL => ABORT */ + 321, /* FILE => ABORT */ + 321, /* FOR => ABORT */ + 321, /* GLOB => ABORT */ + 321, /* ID => ABORT */ + 321, /* IMMEDIATE => ABORT */ + 321, /* IMPORT => ABORT */ + 321, /* INITIALLY => ABORT */ + 321, /* INSTEAD => ABORT */ + 321, /* ISNULL => ABORT */ + 321, /* MODULES => ABORT */ + 321, /* NK_BITNOT => ABORT */ + 321, /* NK_SEMI => ABORT */ + 321, /* NOTNULL => ABORT */ + 321, /* OF => ABORT */ + 321, /* PLUS => ABORT */ + 321, /* PRIVILEGE => ABORT */ + 321, /* RAISE => ABORT */ + 321, /* RESTRICT => ABORT */ + 321, /* ROW => ABORT */ + 321, /* STAR => ABORT */ + 321, /* STATEMENT => ABORT */ + 321, /* STRICT => ABORT */ + 321, /* STRING => ABORT */ + 321, /* TIMES => ABORT */ + 321, /* VALUES => ABORT */ + 321, /* VARIABLE => ABORT */ + 321, /* WAL => ABORT */ }; #endif /* YYFALLBACK */ @@ -1571,6 +1941,7 @@ typedef struct yyParser yyParser; #ifndef NDEBUG #include +#include static FILE *yyTraceFILE = 0; static char *yyTracePrompt = 0; #endif /* NDEBUG */ @@ -1796,353 +2167,360 @@ static const char *const yyTokenName[] = { /* 188 */ "QTAGS", /* 189 */ "AS", /* 190 */ "SYSTEM", - /* 191 */ "INDEX", - /* 192 */ "FUNCTION", - /* 193 */ "INTERVAL", - /* 194 */ "COUNT", - /* 195 */ "LAST_ROW", - /* 196 */ "META", - /* 197 */ "ONLY", - /* 198 */ "TOPIC", - /* 199 */ "CONSUMER", - /* 200 */ "GROUP", - /* 201 */ "DESC", - /* 202 */ "DESCRIBE", - /* 203 */ "RESET", - /* 204 */ "QUERY", - /* 205 */ "CACHE", - /* 206 */ "EXPLAIN", - /* 207 */ "ANALYZE", - /* 208 */ "VERBOSE", - /* 209 */ "NK_BOOL", - /* 210 */ "RATIO", - /* 211 */ "NK_FLOAT", - /* 212 */ "OUTPUTTYPE", - /* 213 */ "AGGREGATE", - /* 214 */ "BUFSIZE", - /* 215 */ "LANGUAGE", - /* 216 */ "REPLACE", - /* 217 */ "STREAM", - /* 218 */ "INTO", - /* 219 */ "PAUSE", - /* 220 */ "RESUME", - /* 221 */ "TRIGGER", - /* 222 */ "AT_ONCE", - /* 223 */ "WINDOW_CLOSE", - /* 224 */ "IGNORE", - /* 225 */ "EXPIRED", - /* 226 */ "FILL_HISTORY", - /* 227 */ "UPDATE", - /* 228 */ "SUBTABLE", - /* 229 */ "UNTREATED", - /* 230 */ "KILL", - /* 231 */ "CONNECTION", - /* 232 */ "TRANSACTION", - /* 233 */ "BALANCE", - /* 234 */ "VGROUP", - /* 235 */ "LEADER", - /* 236 */ "MERGE", - /* 237 */ "REDISTRIBUTE", - /* 238 */ "SPLIT", - /* 239 */ "DELETE", - /* 240 */ "INSERT", - /* 241 */ "NK_BIN", - /* 242 */ "NK_HEX", - /* 243 */ "NULL", - /* 244 */ "NK_QUESTION", - /* 245 */ "NK_ALIAS", - /* 246 */ "NK_ARROW", - /* 247 */ "ROWTS", - /* 248 */ "QSTART", - /* 249 */ "QEND", - /* 250 */ "QDURATION", - /* 251 */ "WSTART", - /* 252 */ "WEND", - /* 253 */ "WDURATION", - /* 254 */ "IROWTS", - /* 255 */ "ISFILLED", - /* 256 */ "CAST", - /* 257 */ "NOW", - /* 258 */ "TODAY", - /* 259 */ "TIMEZONE", - /* 260 */ "CLIENT_VERSION", - /* 261 */ "SERVER_VERSION", - /* 262 */ "SERVER_STATUS", - /* 263 */ "CURRENT_USER", - /* 264 */ "CASE", - /* 265 */ "WHEN", - /* 266 */ "THEN", - /* 267 */ "ELSE", - /* 268 */ "BETWEEN", - /* 269 */ "IS", - /* 270 */ "NK_LT", - /* 271 */ "NK_GT", - /* 272 */ "NK_LE", - /* 273 */ "NK_GE", - /* 274 */ "NK_NE", - /* 275 */ "MATCH", - /* 276 */ "NMATCH", - /* 277 */ "CONTAINS", - /* 278 */ "IN", - /* 279 */ "JOIN", - /* 280 */ "INNER", - /* 281 */ "LEFT", - /* 282 */ "RIGHT", - /* 283 */ "OUTER", - /* 284 */ "SEMI", - /* 285 */ "ANTI", - /* 286 */ "ASOF", - /* 287 */ "WINDOW", - /* 288 */ "WINDOW_OFFSET", - /* 289 */ "JLIMIT", - /* 290 */ "SELECT", - /* 291 */ "NK_HINT", - /* 292 */ "DISTINCT", - /* 293 */ "WHERE", - /* 294 */ "PARTITION", - /* 295 */ "BY", - /* 296 */ "SESSION", - /* 297 */ "STATE_WINDOW", - /* 298 */ "EVENT_WINDOW", - /* 299 */ "COUNT_WINDOW", - /* 300 */ "SLIDING", - /* 301 */ "FILL", - /* 302 */ "VALUE", - /* 303 */ "VALUE_F", - /* 304 */ "NONE", - /* 305 */ "PREV", - /* 306 */ "NULL_F", - /* 307 */ "LINEAR", - /* 308 */ "NEXT", - /* 309 */ "HAVING", - /* 310 */ "RANGE", - /* 311 */ "EVERY", - /* 312 */ "ORDER", - /* 313 */ "SLIMIT", - /* 314 */ "SOFFSET", - /* 315 */ "LIMIT", - /* 316 */ "OFFSET", - /* 317 */ "ASC", - /* 318 */ "NULLS", - /* 319 */ "ABORT", - /* 320 */ "AFTER", - /* 321 */ "ATTACH", - /* 322 */ "BEFORE", - /* 323 */ "BEGIN", - /* 324 */ "BITAND", - /* 325 */ "BITNOT", - /* 326 */ "BITOR", - /* 327 */ "BLOCKS", - /* 328 */ "CHANGE", - /* 329 */ "COMMA", - /* 330 */ "CONCAT", - /* 331 */ "CONFLICT", - /* 332 */ "COPY", - /* 333 */ "DEFERRED", - /* 334 */ "DELIMITERS", - /* 335 */ "DETACH", - /* 336 */ "DIVIDE", - /* 337 */ "DOT", - /* 338 */ "EACH", - /* 339 */ "FAIL", - /* 340 */ "FILE", - /* 341 */ "FOR", - /* 342 */ "GLOB", - /* 343 */ "ID", - /* 344 */ "IMMEDIATE", - /* 345 */ "IMPORT", - /* 346 */ "INITIALLY", - /* 347 */ "INSTEAD", - /* 348 */ "ISNULL", - /* 349 */ "MODULES", - /* 350 */ "NK_BITNOT", - /* 351 */ "NK_SEMI", - /* 352 */ "NOTNULL", - /* 353 */ "OF", - /* 354 */ "PLUS", - /* 355 */ "PRIVILEGE", - /* 356 */ "RAISE", - /* 357 */ "RESTRICT", - /* 358 */ "ROW", - /* 359 */ "STAR", - /* 360 */ "STATEMENT", - /* 361 */ "STRICT", - /* 362 */ "STRING", - /* 363 */ "TIMES", - /* 364 */ "VALUES", - /* 365 */ "VARIABLE", - /* 366 */ "WAL", - /* 367 */ "cmd", - /* 368 */ "account_options", - /* 369 */ "alter_account_options", - /* 370 */ "literal", - /* 371 */ "alter_account_option", - /* 372 */ "ip_range_list", - /* 373 */ "white_list", - /* 374 */ "white_list_opt", - /* 375 */ "user_name", - /* 376 */ "sysinfo_opt", - /* 377 */ "privileges", - /* 378 */ "priv_level", - /* 379 */ "with_opt", - /* 380 */ "priv_type_list", - /* 381 */ "priv_type", - /* 382 */ "db_name", - /* 383 */ "table_name", - /* 384 */ "topic_name", - /* 385 */ "search_condition", - /* 386 */ "dnode_endpoint", - /* 387 */ "force_opt", - /* 388 */ "unsafe_opt", - /* 389 */ "not_exists_opt", - /* 390 */ "db_options", - /* 391 */ "exists_opt", - /* 392 */ "alter_db_options", - /* 393 */ "speed_opt", - /* 394 */ "start_opt", - /* 395 */ "end_opt", - /* 396 */ "integer_list", - /* 397 */ "variable_list", - /* 398 */ "retention_list", - /* 399 */ "signed", - /* 400 */ "alter_db_option", - /* 401 */ "retention", - /* 402 */ "full_table_name", - /* 403 */ "column_def_list", - /* 404 */ "tags_def_opt", - /* 405 */ "table_options", - /* 406 */ "multi_create_clause", - /* 407 */ "tags_def", - /* 408 */ "multi_drop_clause", - /* 409 */ "alter_table_clause", - /* 410 */ "alter_table_options", - /* 411 */ "column_name", - /* 412 */ "type_name", - /* 413 */ "tags_literal", - /* 414 */ "create_subtable_clause", - /* 415 */ "specific_cols_opt", - /* 416 */ "tags_literal_list", - /* 417 */ "drop_table_clause", - /* 418 */ "col_name_list", - /* 419 */ "column_def", - /* 420 */ "type_name_default_len", - /* 421 */ "duration_list", - /* 422 */ "rollup_func_list", - /* 423 */ "alter_table_option", - /* 424 */ "duration_literal", - /* 425 */ "rollup_func_name", - /* 426 */ "function_name", - /* 427 */ "col_name", - /* 428 */ "db_kind_opt", - /* 429 */ "table_kind_db_name_cond_opt", - /* 430 */ "like_pattern_opt", - /* 431 */ "db_name_cond_opt", - /* 432 */ "table_name_cond", - /* 433 */ "from_db_opt", - /* 434 */ "tag_list_opt", - /* 435 */ "table_kind", - /* 436 */ "tag_item", - /* 437 */ "column_alias", - /* 438 */ "index_options", - /* 439 */ "full_index_name", - /* 440 */ "index_name", - /* 441 */ "func_list", - /* 442 */ "sliding_opt", - /* 443 */ "sma_stream_opt", - /* 444 */ "func", + /* 191 */ "TSMA", + /* 192 */ "INTERVAL", + /* 193 */ "TSMAS", + /* 194 */ "FUNCTION", + /* 195 */ "INDEX", + /* 196 */ "COUNT", + /* 197 */ "LAST_ROW", + /* 198 */ "META", + /* 199 */ "ONLY", + /* 200 */ "TOPIC", + /* 201 */ "CONSUMER", + /* 202 */ "GROUP", + /* 203 */ "DESC", + /* 204 */ "DESCRIBE", + /* 205 */ "RESET", + /* 206 */ "QUERY", + /* 207 */ "CACHE", + /* 208 */ "EXPLAIN", + /* 209 */ "ANALYZE", + /* 210 */ "VERBOSE", + /* 211 */ "NK_BOOL", + /* 212 */ "RATIO", + /* 213 */ "NK_FLOAT", + /* 214 */ "OUTPUTTYPE", + /* 215 */ "AGGREGATE", + /* 216 */ "BUFSIZE", + /* 217 */ "LANGUAGE", + /* 218 */ "REPLACE", + /* 219 */ "STREAM", + /* 220 */ "INTO", + /* 221 */ "PAUSE", + /* 222 */ "RESUME", + /* 223 */ "TRIGGER", + /* 224 */ "AT_ONCE", + /* 225 */ "WINDOW_CLOSE", + /* 226 */ "IGNORE", + /* 227 */ "EXPIRED", + /* 228 */ "FILL_HISTORY", + /* 229 */ "UPDATE", + /* 230 */ "SUBTABLE", + /* 231 */ "UNTREATED", + /* 232 */ "KILL", + /* 233 */ "CONNECTION", + /* 234 */ "TRANSACTION", + /* 235 */ "BALANCE", + /* 236 */ "VGROUP", + /* 237 */ "LEADER", + /* 238 */ "MERGE", + /* 239 */ "REDISTRIBUTE", + /* 240 */ "SPLIT", + /* 241 */ "DELETE", + /* 242 */ "INSERT", + /* 243 */ "NK_BIN", + /* 244 */ "NK_HEX", + /* 245 */ "NULL", + /* 246 */ "NK_QUESTION", + /* 247 */ "NK_ALIAS", + /* 248 */ "NK_ARROW", + /* 249 */ "ROWTS", + /* 250 */ "QSTART", + /* 251 */ "QEND", + /* 252 */ "QDURATION", + /* 253 */ "WSTART", + /* 254 */ "WEND", + /* 255 */ "WDURATION", + /* 256 */ "IROWTS", + /* 257 */ "ISFILLED", + /* 258 */ "CAST", + /* 259 */ "NOW", + /* 260 */ "TODAY", + /* 261 */ "TIMEZONE", + /* 262 */ "CLIENT_VERSION", + /* 263 */ "SERVER_VERSION", + /* 264 */ "SERVER_STATUS", + /* 265 */ "CURRENT_USER", + /* 266 */ "CASE", + /* 267 */ "WHEN", + /* 268 */ "THEN", + /* 269 */ "ELSE", + /* 270 */ "BETWEEN", + /* 271 */ "IS", + /* 272 */ "NK_LT", + /* 273 */ "NK_GT", + /* 274 */ "NK_LE", + /* 275 */ "NK_GE", + /* 276 */ "NK_NE", + /* 277 */ "MATCH", + /* 278 */ "NMATCH", + /* 279 */ "CONTAINS", + /* 280 */ "IN", + /* 281 */ "JOIN", + /* 282 */ "INNER", + /* 283 */ "LEFT", + /* 284 */ "RIGHT", + /* 285 */ "OUTER", + /* 286 */ "SEMI", + /* 287 */ "ANTI", + /* 288 */ "ASOF", + /* 289 */ "WINDOW", + /* 290 */ "WINDOW_OFFSET", + /* 291 */ "JLIMIT", + /* 292 */ "SELECT", + /* 293 */ "NK_HINT", + /* 294 */ "DISTINCT", + /* 295 */ "WHERE", + /* 296 */ "PARTITION", + /* 297 */ "BY", + /* 298 */ "SESSION", + /* 299 */ "STATE_WINDOW", + /* 300 */ "EVENT_WINDOW", + /* 301 */ "COUNT_WINDOW", + /* 302 */ "SLIDING", + /* 303 */ "FILL", + /* 304 */ "VALUE", + /* 305 */ "VALUE_F", + /* 306 */ "NONE", + /* 307 */ "PREV", + /* 308 */ "NULL_F", + /* 309 */ "LINEAR", + /* 310 */ "NEXT", + /* 311 */ "HAVING", + /* 312 */ "RANGE", + /* 313 */ "EVERY", + /* 314 */ "ORDER", + /* 315 */ "SLIMIT", + /* 316 */ "SOFFSET", + /* 317 */ "LIMIT", + /* 318 */ "OFFSET", + /* 319 */ "ASC", + /* 320 */ "NULLS", + /* 321 */ "ABORT", + /* 322 */ "AFTER", + /* 323 */ "ATTACH", + /* 324 */ "BEFORE", + /* 325 */ "BEGIN", + /* 326 */ "BITAND", + /* 327 */ "BITNOT", + /* 328 */ "BITOR", + /* 329 */ "BLOCKS", + /* 330 */ "CHANGE", + /* 331 */ "COMMA", + /* 332 */ "CONCAT", + /* 333 */ "CONFLICT", + /* 334 */ "COPY", + /* 335 */ "DEFERRED", + /* 336 */ "DELIMITERS", + /* 337 */ "DETACH", + /* 338 */ "DIVIDE", + /* 339 */ "DOT", + /* 340 */ "EACH", + /* 341 */ "FAIL", + /* 342 */ "FILE", + /* 343 */ "FOR", + /* 344 */ "GLOB", + /* 345 */ "ID", + /* 346 */ "IMMEDIATE", + /* 347 */ "IMPORT", + /* 348 */ "INITIALLY", + /* 349 */ "INSTEAD", + /* 350 */ "ISNULL", + /* 351 */ "MODULES", + /* 352 */ "NK_BITNOT", + /* 353 */ "NK_SEMI", + /* 354 */ "NOTNULL", + /* 355 */ "OF", + /* 356 */ "PLUS", + /* 357 */ "PRIVILEGE", + /* 358 */ "RAISE", + /* 359 */ "RESTRICT", + /* 360 */ "ROW", + /* 361 */ "STAR", + /* 362 */ "STATEMENT", + /* 363 */ "STRICT", + /* 364 */ "STRING", + /* 365 */ "TIMES", + /* 366 */ "VALUES", + /* 367 */ "VARIABLE", + /* 368 */ "WAL", + /* 369 */ "cmd", + /* 370 */ "account_options", + /* 371 */ "alter_account_options", + /* 372 */ "literal", + /* 373 */ "alter_account_option", + /* 374 */ "ip_range_list", + /* 375 */ "white_list", + /* 376 */ "white_list_opt", + /* 377 */ "user_name", + /* 378 */ "sysinfo_opt", + /* 379 */ "privileges", + /* 380 */ "priv_level", + /* 381 */ "with_opt", + /* 382 */ "priv_type_list", + /* 383 */ "priv_type", + /* 384 */ "db_name", + /* 385 */ "table_name", + /* 386 */ "topic_name", + /* 387 */ "search_condition", + /* 388 */ "dnode_endpoint", + /* 389 */ "force_opt", + /* 390 */ "unsafe_opt", + /* 391 */ "not_exists_opt", + /* 392 */ "db_options", + /* 393 */ "exists_opt", + /* 394 */ "alter_db_options", + /* 395 */ "speed_opt", + /* 396 */ "start_opt", + /* 397 */ "end_opt", + /* 398 */ "integer_list", + /* 399 */ "variable_list", + /* 400 */ "retention_list", + /* 401 */ "signed", + /* 402 */ "alter_db_option", + /* 403 */ "retention", + /* 404 */ "full_table_name", + /* 405 */ "column_def_list", + /* 406 */ "tags_def_opt", + /* 407 */ "table_options", + /* 408 */ "multi_create_clause", + /* 409 */ "tags_def", + /* 410 */ "multi_drop_clause", + /* 411 */ "alter_table_clause", + /* 412 */ "alter_table_options", + /* 413 */ "column_name", + /* 414 */ "type_name", + /* 415 */ "tags_literal", + /* 416 */ "create_subtable_clause", + /* 417 */ "specific_cols_opt", + /* 418 */ "tags_literal_list", + /* 419 */ "drop_table_clause", + /* 420 */ "col_name_list", + /* 421 */ "column_def", + /* 422 */ "type_name_default_len", + /* 423 */ "duration_list", + /* 424 */ "rollup_func_list", + /* 425 */ "alter_table_option", + /* 426 */ "duration_literal", + /* 427 */ "rollup_func_name", + /* 428 */ "function_name", + /* 429 */ "col_name", + /* 430 */ "db_kind_opt", + /* 431 */ "table_kind_db_name_cond_opt", + /* 432 */ "like_pattern_opt", + /* 433 */ "db_name_cond_opt", + /* 434 */ "table_name_cond", + /* 435 */ "from_db_opt", + /* 436 */ "tag_list_opt", + /* 437 */ "table_kind", + /* 438 */ "tag_item", + /* 439 */ "column_alias", + /* 440 */ "tsma_name", + /* 441 */ "tsma_opt", + /* 442 */ "full_tsma_name", + /* 443 */ "tsma_func_list", + /* 444 */ "tsma_func_name", /* 445 */ "sma_func_name", - /* 446 */ "expression_list", - /* 447 */ "with_meta", - /* 448 */ "query_or_subquery", - /* 449 */ "where_clause_opt", - /* 450 */ "cgroup_name", - /* 451 */ "analyze_opt", - /* 452 */ "explain_options", - /* 453 */ "insert_query", - /* 454 */ "or_replace_opt", - /* 455 */ "agg_func_opt", - /* 456 */ "bufsize_opt", - /* 457 */ "language_opt", - /* 458 */ "full_view_name", - /* 459 */ "view_name", - /* 460 */ "stream_name", - /* 461 */ "stream_options", - /* 462 */ "col_list_opt", - /* 463 */ "tag_def_or_ref_opt", - /* 464 */ "subtable_opt", - /* 465 */ "ignore_opt", - /* 466 */ "column_stream_def_list", - /* 467 */ "column_stream_def", - /* 468 */ "expression", - /* 469 */ "on_vgroup_id", - /* 470 */ "dnode_list", - /* 471 */ "literal_func", - /* 472 */ "signed_literal", - /* 473 */ "literal_list", - /* 474 */ "table_alias", - /* 475 */ "expr_or_subquery", - /* 476 */ "pseudo_column", - /* 477 */ "column_reference", - /* 478 */ "function_expression", - /* 479 */ "case_when_expression", - /* 480 */ "star_func", - /* 481 */ "star_func_para_list", - /* 482 */ "noarg_func", - /* 483 */ "other_para_list", - /* 484 */ "star_func_para", - /* 485 */ "when_then_list", - /* 486 */ "case_when_else_opt", - /* 487 */ "common_expression", - /* 488 */ "when_then_expr", - /* 489 */ "predicate", - /* 490 */ "compare_op", - /* 491 */ "in_op", - /* 492 */ "in_predicate_value", - /* 493 */ "boolean_value_expression", - /* 494 */ "boolean_primary", - /* 495 */ "from_clause_opt", - /* 496 */ "table_reference_list", - /* 497 */ "table_reference", - /* 498 */ "table_primary", - /* 499 */ "joined_table", - /* 500 */ "alias_opt", - /* 501 */ "subquery", - /* 502 */ "parenthesized_joined_table", - /* 503 */ "join_type", - /* 504 */ "join_subtype", - /* 505 */ "join_on_clause_opt", - /* 506 */ "window_offset_clause_opt", - /* 507 */ "jlimit_clause_opt", - /* 508 */ "window_offset_literal", - /* 509 */ "query_specification", - /* 510 */ "hint_list", - /* 511 */ "set_quantifier_opt", - /* 512 */ "tag_mode_opt", - /* 513 */ "select_list", - /* 514 */ "partition_by_clause_opt", - /* 515 */ "range_opt", - /* 516 */ "every_opt", - /* 517 */ "fill_opt", - /* 518 */ "twindow_clause_opt", - /* 519 */ "group_by_clause_opt", - /* 520 */ "having_clause_opt", - /* 521 */ "select_item", - /* 522 */ "partition_list", - /* 523 */ "partition_item", - /* 524 */ "interval_sliding_duration_literal", - /* 525 */ "fill_mode", - /* 526 */ "group_by_list", - /* 527 */ "query_expression", - /* 528 */ "query_simple", - /* 529 */ "order_by_clause_opt", - /* 530 */ "slimit_clause_opt", - /* 531 */ "limit_clause_opt", - /* 532 */ "union_query_expression", - /* 533 */ "query_simple_or_subquery", - /* 534 */ "sort_specification_list", - /* 535 */ "sort_specification", - /* 536 */ "ordering_specification_opt", - /* 537 */ "null_ordering_opt", + /* 446 */ "index_options", + /* 447 */ "full_index_name", + /* 448 */ "index_name", + /* 449 */ "func_list", + /* 450 */ "sliding_opt", + /* 451 */ "sma_stream_opt", + /* 452 */ "func", + /* 453 */ "expression_list", + /* 454 */ "with_meta", + /* 455 */ "query_or_subquery", + /* 456 */ "where_clause_opt", + /* 457 */ "cgroup_name", + /* 458 */ "analyze_opt", + /* 459 */ "explain_options", + /* 460 */ "insert_query", + /* 461 */ "or_replace_opt", + /* 462 */ "agg_func_opt", + /* 463 */ "bufsize_opt", + /* 464 */ "language_opt", + /* 465 */ "full_view_name", + /* 466 */ "view_name", + /* 467 */ "stream_name", + /* 468 */ "stream_options", + /* 469 */ "col_list_opt", + /* 470 */ "tag_def_or_ref_opt", + /* 471 */ "subtable_opt", + /* 472 */ "ignore_opt", + /* 473 */ "column_stream_def_list", + /* 474 */ "column_stream_def", + /* 475 */ "expression", + /* 476 */ "on_vgroup_id", + /* 477 */ "dnode_list", + /* 478 */ "literal_func", + /* 479 */ "signed_literal", + /* 480 */ "literal_list", + /* 481 */ "table_alias", + /* 482 */ "expr_or_subquery", + /* 483 */ "pseudo_column", + /* 484 */ "column_reference", + /* 485 */ "function_expression", + /* 486 */ "case_when_expression", + /* 487 */ "star_func", + /* 488 */ "star_func_para_list", + /* 489 */ "noarg_func", + /* 490 */ "other_para_list", + /* 491 */ "star_func_para", + /* 492 */ "when_then_list", + /* 493 */ "case_when_else_opt", + /* 494 */ "common_expression", + /* 495 */ "when_then_expr", + /* 496 */ "predicate", + /* 497 */ "compare_op", + /* 498 */ "in_op", + /* 499 */ "in_predicate_value", + /* 500 */ "boolean_value_expression", + /* 501 */ "boolean_primary", + /* 502 */ "from_clause_opt", + /* 503 */ "table_reference_list", + /* 504 */ "table_reference", + /* 505 */ "table_primary", + /* 506 */ "joined_table", + /* 507 */ "alias_opt", + /* 508 */ "subquery", + /* 509 */ "parenthesized_joined_table", + /* 510 */ "join_type", + /* 511 */ "join_subtype", + /* 512 */ "join_on_clause_opt", + /* 513 */ "window_offset_clause_opt", + /* 514 */ "jlimit_clause_opt", + /* 515 */ "window_offset_literal", + /* 516 */ "query_specification", + /* 517 */ "hint_list", + /* 518 */ "set_quantifier_opt", + /* 519 */ "tag_mode_opt", + /* 520 */ "select_list", + /* 521 */ "partition_by_clause_opt", + /* 522 */ "range_opt", + /* 523 */ "every_opt", + /* 524 */ "fill_opt", + /* 525 */ "twindow_clause_opt", + /* 526 */ "group_by_clause_opt", + /* 527 */ "having_clause_opt", + /* 528 */ "select_item", + /* 529 */ "partition_list", + /* 530 */ "partition_item", + /* 531 */ "interval_sliding_duration_literal", + /* 532 */ "fill_mode", + /* 533 */ "group_by_list", + /* 534 */ "query_expression", + /* 535 */ "query_simple", + /* 536 */ "order_by_clause_opt", + /* 537 */ "slimit_clause_opt", + /* 538 */ "limit_clause_opt", + /* 539 */ "union_query_expression", + /* 540 */ "query_simple_or_subquery", + /* 541 */ "sort_specification_list", + /* 542 */ "sort_specification", + /* 543 */ "ordering_specification_opt", + /* 544 */ "null_ordering_opt", }; #endif /* defined(YYCOVERAGE) || !defined(NDEBUG) */ @@ -2482,400 +2860,412 @@ static const char *const yyRuleName[] = { /* 329 */ "db_kind_opt ::=", /* 330 */ "db_kind_opt ::= USER", /* 331 */ "db_kind_opt ::= SYSTEM", - /* 332 */ "cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options", - /* 333 */ "cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP", - /* 334 */ "cmd ::= DROP INDEX exists_opt full_index_name", - /* 335 */ "full_index_name ::= index_name", - /* 336 */ "full_index_name ::= db_name NK_DOT index_name", - /* 337 */ "index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt", - /* 338 */ "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", - /* 339 */ "func_list ::= func", - /* 340 */ "func_list ::= func_list NK_COMMA func", - /* 341 */ "func ::= sma_func_name NK_LP expression_list NK_RP", - /* 342 */ "sma_func_name ::= function_name", - /* 343 */ "sma_func_name ::= COUNT", - /* 344 */ "sma_func_name ::= FIRST", - /* 345 */ "sma_func_name ::= LAST", - /* 346 */ "sma_func_name ::= LAST_ROW", - /* 347 */ "sma_stream_opt ::=", - /* 348 */ "sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal", - /* 349 */ "sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal", - /* 350 */ "sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal", - /* 351 */ "with_meta ::= AS", - /* 352 */ "with_meta ::= WITH META AS", - /* 353 */ "with_meta ::= ONLY META AS", - /* 354 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery", - /* 355 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name", - /* 356 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt", - /* 357 */ "cmd ::= DROP TOPIC exists_opt topic_name", - /* 358 */ "cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name", - /* 359 */ "cmd ::= DESC full_table_name", - /* 360 */ "cmd ::= DESCRIBE full_table_name", - /* 361 */ "cmd ::= RESET QUERY CACHE", - /* 362 */ "cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery", - /* 363 */ "cmd ::= EXPLAIN analyze_opt explain_options insert_query", - /* 364 */ "analyze_opt ::=", - /* 365 */ "analyze_opt ::= ANALYZE", - /* 366 */ "explain_options ::=", - /* 367 */ "explain_options ::= explain_options VERBOSE NK_BOOL", - /* 368 */ "explain_options ::= explain_options RATIO NK_FLOAT", - /* 369 */ "cmd ::= CREATE or_replace_opt agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt language_opt", - /* 370 */ "cmd ::= DROP FUNCTION exists_opt function_name", - /* 371 */ "agg_func_opt ::=", - /* 372 */ "agg_func_opt ::= AGGREGATE", - /* 373 */ "bufsize_opt ::=", - /* 374 */ "bufsize_opt ::= BUFSIZE NK_INTEGER", - /* 375 */ "language_opt ::=", - /* 376 */ "language_opt ::= LANGUAGE NK_STRING", - /* 377 */ "or_replace_opt ::=", - /* 378 */ "or_replace_opt ::= OR REPLACE", - /* 379 */ "cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery", - /* 380 */ "cmd ::= DROP VIEW exists_opt full_view_name", - /* 381 */ "full_view_name ::= view_name", - /* 382 */ "full_view_name ::= db_name NK_DOT view_name", - /* 383 */ "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", - /* 384 */ "cmd ::= DROP STREAM exists_opt stream_name", - /* 385 */ "cmd ::= PAUSE STREAM exists_opt stream_name", - /* 386 */ "cmd ::= RESUME STREAM exists_opt ignore_opt stream_name", - /* 387 */ "col_list_opt ::=", - /* 388 */ "col_list_opt ::= NK_LP column_stream_def_list NK_RP", - /* 389 */ "column_stream_def_list ::= column_stream_def", - /* 390 */ "column_stream_def_list ::= column_stream_def_list NK_COMMA column_stream_def", - /* 391 */ "column_stream_def ::= column_name", - /* 392 */ "column_stream_def ::= column_name PRIMARY KEY", - /* 393 */ "tag_def_or_ref_opt ::=", - /* 394 */ "tag_def_or_ref_opt ::= tags_def", - /* 395 */ "tag_def_or_ref_opt ::= TAGS NK_LP column_stream_def_list NK_RP", - /* 396 */ "stream_options ::=", - /* 397 */ "stream_options ::= stream_options TRIGGER AT_ONCE", - /* 398 */ "stream_options ::= stream_options TRIGGER WINDOW_CLOSE", - /* 399 */ "stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal", - /* 400 */ "stream_options ::= stream_options WATERMARK duration_literal", - /* 401 */ "stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER", - /* 402 */ "stream_options ::= stream_options FILL_HISTORY NK_INTEGER", - /* 403 */ "stream_options ::= stream_options DELETE_MARK duration_literal", - /* 404 */ "stream_options ::= stream_options IGNORE UPDATE NK_INTEGER", - /* 405 */ "subtable_opt ::=", - /* 406 */ "subtable_opt ::= SUBTABLE NK_LP expression NK_RP", - /* 407 */ "ignore_opt ::=", - /* 408 */ "ignore_opt ::= IGNORE UNTREATED", - /* 409 */ "cmd ::= KILL CONNECTION NK_INTEGER", - /* 410 */ "cmd ::= KILL QUERY NK_STRING", - /* 411 */ "cmd ::= KILL TRANSACTION NK_INTEGER", - /* 412 */ "cmd ::= KILL COMPACT NK_INTEGER", - /* 413 */ "cmd ::= BALANCE VGROUP", - /* 414 */ "cmd ::= BALANCE VGROUP LEADER on_vgroup_id", - /* 415 */ "cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER", - /* 416 */ "cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list", - /* 417 */ "cmd ::= SPLIT VGROUP NK_INTEGER", - /* 418 */ "on_vgroup_id ::=", - /* 419 */ "on_vgroup_id ::= ON NK_INTEGER", - /* 420 */ "dnode_list ::= DNODE NK_INTEGER", - /* 421 */ "dnode_list ::= dnode_list DNODE NK_INTEGER", - /* 422 */ "cmd ::= DELETE FROM full_table_name where_clause_opt", - /* 423 */ "cmd ::= query_or_subquery", - /* 424 */ "cmd ::= insert_query", - /* 425 */ "insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery", - /* 426 */ "insert_query ::= INSERT INTO full_table_name query_or_subquery", - /* 427 */ "tags_literal ::= NK_INTEGER", - /* 428 */ "tags_literal ::= NK_INTEGER NK_PLUS duration_literal", - /* 429 */ "tags_literal ::= NK_INTEGER NK_MINUS duration_literal", - /* 430 */ "tags_literal ::= NK_PLUS NK_INTEGER", - /* 431 */ "tags_literal ::= NK_PLUS NK_INTEGER NK_PLUS duration_literal", - /* 432 */ "tags_literal ::= NK_PLUS NK_INTEGER NK_MINUS duration_literal", - /* 433 */ "tags_literal ::= NK_MINUS NK_INTEGER", - /* 434 */ "tags_literal ::= NK_MINUS NK_INTEGER NK_PLUS duration_literal", - /* 435 */ "tags_literal ::= NK_MINUS NK_INTEGER NK_MINUS duration_literal", - /* 436 */ "tags_literal ::= NK_FLOAT", - /* 437 */ "tags_literal ::= NK_PLUS NK_FLOAT", - /* 438 */ "tags_literal ::= NK_MINUS NK_FLOAT", - /* 439 */ "tags_literal ::= NK_BIN", - /* 440 */ "tags_literal ::= NK_BIN NK_PLUS duration_literal", - /* 441 */ "tags_literal ::= NK_BIN NK_MINUS duration_literal", - /* 442 */ "tags_literal ::= NK_PLUS NK_BIN", - /* 443 */ "tags_literal ::= NK_PLUS NK_BIN NK_PLUS duration_literal", - /* 444 */ "tags_literal ::= NK_PLUS NK_BIN NK_MINUS duration_literal", - /* 445 */ "tags_literal ::= NK_MINUS NK_BIN", - /* 446 */ "tags_literal ::= NK_MINUS NK_BIN NK_PLUS duration_literal", - /* 447 */ "tags_literal ::= NK_MINUS NK_BIN NK_MINUS duration_literal", - /* 448 */ "tags_literal ::= NK_HEX", - /* 449 */ "tags_literal ::= NK_HEX NK_PLUS duration_literal", - /* 450 */ "tags_literal ::= NK_HEX NK_MINUS duration_literal", - /* 451 */ "tags_literal ::= NK_PLUS NK_HEX", - /* 452 */ "tags_literal ::= NK_PLUS NK_HEX NK_PLUS duration_literal", - /* 453 */ "tags_literal ::= NK_PLUS NK_HEX NK_MINUS duration_literal", - /* 454 */ "tags_literal ::= NK_MINUS NK_HEX", - /* 455 */ "tags_literal ::= NK_MINUS NK_HEX NK_PLUS duration_literal", - /* 456 */ "tags_literal ::= NK_MINUS NK_HEX NK_MINUS duration_literal", - /* 457 */ "tags_literal ::= NK_STRING", - /* 458 */ "tags_literal ::= NK_STRING NK_PLUS duration_literal", - /* 459 */ "tags_literal ::= NK_STRING NK_MINUS duration_literal", - /* 460 */ "tags_literal ::= NK_BOOL", - /* 461 */ "tags_literal ::= NULL", - /* 462 */ "tags_literal ::= literal_func", - /* 463 */ "tags_literal ::= literal_func NK_PLUS duration_literal", - /* 464 */ "tags_literal ::= literal_func NK_MINUS duration_literal", - /* 465 */ "tags_literal_list ::= tags_literal", - /* 466 */ "tags_literal_list ::= tags_literal_list NK_COMMA tags_literal", - /* 467 */ "literal ::= NK_INTEGER", - /* 468 */ "literal ::= NK_FLOAT", - /* 469 */ "literal ::= NK_STRING", - /* 470 */ "literal ::= NK_BOOL", - /* 471 */ "literal ::= TIMESTAMP NK_STRING", - /* 472 */ "literal ::= duration_literal", - /* 473 */ "literal ::= NULL", - /* 474 */ "literal ::= NK_QUESTION", - /* 475 */ "duration_literal ::= NK_VARIABLE", - /* 476 */ "signed ::= NK_INTEGER", - /* 477 */ "signed ::= NK_PLUS NK_INTEGER", - /* 478 */ "signed ::= NK_MINUS NK_INTEGER", - /* 479 */ "signed ::= NK_FLOAT", - /* 480 */ "signed ::= NK_PLUS NK_FLOAT", - /* 481 */ "signed ::= NK_MINUS NK_FLOAT", - /* 482 */ "signed_literal ::= signed", - /* 483 */ "signed_literal ::= NK_STRING", - /* 484 */ "signed_literal ::= NK_BOOL", - /* 485 */ "signed_literal ::= TIMESTAMP NK_STRING", - /* 486 */ "signed_literal ::= duration_literal", - /* 487 */ "signed_literal ::= NULL", - /* 488 */ "signed_literal ::= literal_func", - /* 489 */ "signed_literal ::= NK_QUESTION", - /* 490 */ "literal_list ::= signed_literal", - /* 491 */ "literal_list ::= literal_list NK_COMMA signed_literal", - /* 492 */ "db_name ::= NK_ID", - /* 493 */ "table_name ::= NK_ID", - /* 494 */ "column_name ::= NK_ID", - /* 495 */ "function_name ::= NK_ID", - /* 496 */ "view_name ::= NK_ID", - /* 497 */ "table_alias ::= NK_ID", - /* 498 */ "column_alias ::= NK_ID", - /* 499 */ "column_alias ::= NK_ALIAS", - /* 500 */ "user_name ::= NK_ID", - /* 501 */ "topic_name ::= NK_ID", - /* 502 */ "stream_name ::= NK_ID", - /* 503 */ "cgroup_name ::= NK_ID", - /* 504 */ "index_name ::= NK_ID", - /* 505 */ "expr_or_subquery ::= expression", - /* 506 */ "expression ::= literal", - /* 507 */ "expression ::= pseudo_column", - /* 508 */ "expression ::= column_reference", - /* 509 */ "expression ::= function_expression", - /* 510 */ "expression ::= case_when_expression", - /* 511 */ "expression ::= NK_LP expression NK_RP", - /* 512 */ "expression ::= NK_PLUS expr_or_subquery", - /* 513 */ "expression ::= NK_MINUS expr_or_subquery", - /* 514 */ "expression ::= expr_or_subquery NK_PLUS expr_or_subquery", - /* 515 */ "expression ::= expr_or_subquery NK_MINUS expr_or_subquery", - /* 516 */ "expression ::= expr_or_subquery NK_STAR expr_or_subquery", - /* 517 */ "expression ::= expr_or_subquery NK_SLASH expr_or_subquery", - /* 518 */ "expression ::= expr_or_subquery NK_REM expr_or_subquery", - /* 519 */ "expression ::= column_reference NK_ARROW NK_STRING", - /* 520 */ "expression ::= expr_or_subquery NK_BITAND expr_or_subquery", - /* 521 */ "expression ::= expr_or_subquery NK_BITOR expr_or_subquery", - /* 522 */ "expression_list ::= expr_or_subquery", - /* 523 */ "expression_list ::= expression_list NK_COMMA expr_or_subquery", - /* 524 */ "column_reference ::= column_name", - /* 525 */ "column_reference ::= table_name NK_DOT column_name", - /* 526 */ "column_reference ::= NK_ALIAS", - /* 527 */ "column_reference ::= table_name NK_DOT NK_ALIAS", - /* 528 */ "pseudo_column ::= ROWTS", - /* 529 */ "pseudo_column ::= TBNAME", - /* 530 */ "pseudo_column ::= table_name NK_DOT TBNAME", - /* 531 */ "pseudo_column ::= QSTART", - /* 532 */ "pseudo_column ::= QEND", - /* 533 */ "pseudo_column ::= QDURATION", - /* 534 */ "pseudo_column ::= WSTART", - /* 535 */ "pseudo_column ::= WEND", - /* 536 */ "pseudo_column ::= WDURATION", - /* 537 */ "pseudo_column ::= IROWTS", - /* 538 */ "pseudo_column ::= ISFILLED", - /* 539 */ "pseudo_column ::= QTAGS", - /* 540 */ "function_expression ::= function_name NK_LP expression_list NK_RP", - /* 541 */ "function_expression ::= star_func NK_LP star_func_para_list NK_RP", - /* 542 */ "function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP", - /* 543 */ "function_expression ::= CAST NK_LP expr_or_subquery AS type_name_default_len NK_RP", - /* 544 */ "function_expression ::= literal_func", - /* 545 */ "literal_func ::= noarg_func NK_LP NK_RP", - /* 546 */ "literal_func ::= NOW", - /* 547 */ "literal_func ::= TODAY", - /* 548 */ "noarg_func ::= NOW", - /* 549 */ "noarg_func ::= TODAY", - /* 550 */ "noarg_func ::= TIMEZONE", - /* 551 */ "noarg_func ::= DATABASE", - /* 552 */ "noarg_func ::= CLIENT_VERSION", - /* 553 */ "noarg_func ::= SERVER_VERSION", - /* 554 */ "noarg_func ::= SERVER_STATUS", - /* 555 */ "noarg_func ::= CURRENT_USER", - /* 556 */ "noarg_func ::= USER", - /* 557 */ "star_func ::= COUNT", - /* 558 */ "star_func ::= FIRST", - /* 559 */ "star_func ::= LAST", - /* 560 */ "star_func ::= LAST_ROW", - /* 561 */ "star_func_para_list ::= NK_STAR", - /* 562 */ "star_func_para_list ::= other_para_list", - /* 563 */ "other_para_list ::= star_func_para", - /* 564 */ "other_para_list ::= other_para_list NK_COMMA star_func_para", - /* 565 */ "star_func_para ::= expr_or_subquery", - /* 566 */ "star_func_para ::= table_name NK_DOT NK_STAR", - /* 567 */ "case_when_expression ::= CASE when_then_list case_when_else_opt END", - /* 568 */ "case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END", - /* 569 */ "when_then_list ::= when_then_expr", - /* 570 */ "when_then_list ::= when_then_list when_then_expr", - /* 571 */ "when_then_expr ::= WHEN common_expression THEN common_expression", - /* 572 */ "case_when_else_opt ::=", - /* 573 */ "case_when_else_opt ::= ELSE common_expression", - /* 574 */ "predicate ::= expr_or_subquery compare_op expr_or_subquery", - /* 575 */ "predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery", - /* 576 */ "predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery", - /* 577 */ "predicate ::= expr_or_subquery IS NULL", - /* 578 */ "predicate ::= expr_or_subquery IS NOT NULL", - /* 579 */ "predicate ::= expr_or_subquery in_op in_predicate_value", - /* 580 */ "compare_op ::= NK_LT", - /* 581 */ "compare_op ::= NK_GT", - /* 582 */ "compare_op ::= NK_LE", - /* 583 */ "compare_op ::= NK_GE", - /* 584 */ "compare_op ::= NK_NE", - /* 585 */ "compare_op ::= NK_EQ", - /* 586 */ "compare_op ::= LIKE", - /* 587 */ "compare_op ::= NOT LIKE", - /* 588 */ "compare_op ::= MATCH", - /* 589 */ "compare_op ::= NMATCH", - /* 590 */ "compare_op ::= CONTAINS", - /* 591 */ "in_op ::= IN", - /* 592 */ "in_op ::= NOT IN", - /* 593 */ "in_predicate_value ::= NK_LP literal_list NK_RP", - /* 594 */ "boolean_value_expression ::= boolean_primary", - /* 595 */ "boolean_value_expression ::= NOT boolean_primary", - /* 596 */ "boolean_value_expression ::= boolean_value_expression OR boolean_value_expression", - /* 597 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression", - /* 598 */ "boolean_primary ::= predicate", - /* 599 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP", - /* 600 */ "common_expression ::= expr_or_subquery", - /* 601 */ "common_expression ::= boolean_value_expression", - /* 602 */ "from_clause_opt ::=", - /* 603 */ "from_clause_opt ::= FROM table_reference_list", - /* 604 */ "table_reference_list ::= table_reference", - /* 605 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference", - /* 606 */ "table_reference ::= table_primary", - /* 607 */ "table_reference ::= joined_table", - /* 608 */ "table_primary ::= table_name alias_opt", - /* 609 */ "table_primary ::= db_name NK_DOT table_name alias_opt", - /* 610 */ "table_primary ::= subquery alias_opt", - /* 611 */ "table_primary ::= parenthesized_joined_table", - /* 612 */ "alias_opt ::=", - /* 613 */ "alias_opt ::= table_alias", - /* 614 */ "alias_opt ::= AS table_alias", - /* 615 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP", - /* 616 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP", - /* 617 */ "joined_table ::= table_reference join_type join_subtype JOIN table_reference join_on_clause_opt window_offset_clause_opt jlimit_clause_opt", - /* 618 */ "join_type ::=", - /* 619 */ "join_type ::= INNER", - /* 620 */ "join_type ::= LEFT", - /* 621 */ "join_type ::= RIGHT", - /* 622 */ "join_type ::= FULL", - /* 623 */ "join_subtype ::=", - /* 624 */ "join_subtype ::= OUTER", - /* 625 */ "join_subtype ::= SEMI", - /* 626 */ "join_subtype ::= ANTI", - /* 627 */ "join_subtype ::= ASOF", - /* 628 */ "join_subtype ::= WINDOW", - /* 629 */ "join_on_clause_opt ::=", - /* 630 */ "join_on_clause_opt ::= ON search_condition", - /* 631 */ "window_offset_clause_opt ::=", - /* 632 */ "window_offset_clause_opt ::= WINDOW_OFFSET NK_LP window_offset_literal NK_COMMA window_offset_literal NK_RP", - /* 633 */ "window_offset_literal ::= NK_VARIABLE", - /* 634 */ "window_offset_literal ::= NK_MINUS NK_VARIABLE", - /* 635 */ "jlimit_clause_opt ::=", - /* 636 */ "jlimit_clause_opt ::= JLIMIT NK_INTEGER", - /* 637 */ "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", - /* 638 */ "hint_list ::=", - /* 639 */ "hint_list ::= NK_HINT", - /* 640 */ "tag_mode_opt ::=", - /* 641 */ "tag_mode_opt ::= TAGS", - /* 642 */ "set_quantifier_opt ::=", - /* 643 */ "set_quantifier_opt ::= DISTINCT", - /* 644 */ "set_quantifier_opt ::= ALL", - /* 645 */ "select_list ::= select_item", - /* 646 */ "select_list ::= select_list NK_COMMA select_item", - /* 647 */ "select_item ::= NK_STAR", - /* 648 */ "select_item ::= common_expression", - /* 649 */ "select_item ::= common_expression column_alias", - /* 650 */ "select_item ::= common_expression AS column_alias", - /* 651 */ "select_item ::= table_name NK_DOT NK_STAR", - /* 652 */ "where_clause_opt ::=", - /* 653 */ "where_clause_opt ::= WHERE search_condition", - /* 654 */ "partition_by_clause_opt ::=", - /* 655 */ "partition_by_clause_opt ::= PARTITION BY partition_list", - /* 656 */ "partition_list ::= partition_item", - /* 657 */ "partition_list ::= partition_list NK_COMMA partition_item", - /* 658 */ "partition_item ::= expr_or_subquery", - /* 659 */ "partition_item ::= expr_or_subquery column_alias", - /* 660 */ "partition_item ::= expr_or_subquery AS column_alias", - /* 661 */ "twindow_clause_opt ::=", - /* 662 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP", - /* 663 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP", - /* 664 */ "twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt", - /* 665 */ "twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_COMMA interval_sliding_duration_literal NK_RP sliding_opt fill_opt", - /* 666 */ "twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition", - /* 667 */ "twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_RP", - /* 668 */ "twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP", - /* 669 */ "sliding_opt ::=", - /* 670 */ "sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP", - /* 671 */ "interval_sliding_duration_literal ::= NK_VARIABLE", - /* 672 */ "interval_sliding_duration_literal ::= NK_STRING", - /* 673 */ "interval_sliding_duration_literal ::= NK_INTEGER", - /* 674 */ "fill_opt ::=", - /* 675 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP", - /* 676 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP", - /* 677 */ "fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP", - /* 678 */ "fill_mode ::= NONE", - /* 679 */ "fill_mode ::= PREV", - /* 680 */ "fill_mode ::= NULL", - /* 681 */ "fill_mode ::= NULL_F", - /* 682 */ "fill_mode ::= LINEAR", - /* 683 */ "fill_mode ::= NEXT", - /* 684 */ "group_by_clause_opt ::=", - /* 685 */ "group_by_clause_opt ::= GROUP BY group_by_list", - /* 686 */ "group_by_list ::= expr_or_subquery", - /* 687 */ "group_by_list ::= group_by_list NK_COMMA expr_or_subquery", - /* 688 */ "having_clause_opt ::=", - /* 689 */ "having_clause_opt ::= HAVING search_condition", - /* 690 */ "range_opt ::=", - /* 691 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP", - /* 692 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_RP", - /* 693 */ "every_opt ::=", - /* 694 */ "every_opt ::= EVERY NK_LP duration_literal NK_RP", - /* 695 */ "query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt", - /* 696 */ "query_simple ::= query_specification", - /* 697 */ "query_simple ::= union_query_expression", - /* 698 */ "union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery", - /* 699 */ "union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery", - /* 700 */ "query_simple_or_subquery ::= query_simple", - /* 701 */ "query_simple_or_subquery ::= subquery", - /* 702 */ "query_or_subquery ::= query_expression", - /* 703 */ "query_or_subquery ::= subquery", - /* 704 */ "order_by_clause_opt ::=", - /* 705 */ "order_by_clause_opt ::= ORDER BY sort_specification_list", - /* 706 */ "slimit_clause_opt ::=", - /* 707 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER", - /* 708 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER", - /* 709 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER", - /* 710 */ "limit_clause_opt ::=", - /* 711 */ "limit_clause_opt ::= LIMIT NK_INTEGER", - /* 712 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER", - /* 713 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER", - /* 714 */ "subquery ::= NK_LP query_expression NK_RP", - /* 715 */ "subquery ::= NK_LP subquery NK_RP", - /* 716 */ "search_condition ::= common_expression", - /* 717 */ "sort_specification_list ::= sort_specification", - /* 718 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification", - /* 719 */ "sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt", - /* 720 */ "ordering_specification_opt ::=", - /* 721 */ "ordering_specification_opt ::= ASC", - /* 722 */ "ordering_specification_opt ::= DESC", - /* 723 */ "null_ordering_opt ::=", - /* 724 */ "null_ordering_opt ::= NULLS FIRST", - /* 725 */ "null_ordering_opt ::= NULLS LAST", + /* 332 */ "cmd ::= CREATE TSMA not_exists_opt tsma_name ON full_table_name tsma_opt INTERVAL NK_LP duration_literal NK_RP", + /* 333 */ "cmd ::= DROP TSMA exists_opt full_tsma_name", + /* 334 */ "cmd ::= SHOW CREATE TSMA full_tsma_name", + /* 335 */ "cmd ::= SHOW db_name_cond_opt TSMAS", + /* 336 */ "full_tsma_name ::= tsma_name", + /* 337 */ "full_tsma_name ::= db_name NK_DOT tsma_name", + /* 338 */ "tsma_opt ::=", + /* 339 */ "tsma_opt ::= FUNCTION NK_LP tsma_func_list NK_RP COLUMN NK_LP col_name_list NK_RP", + /* 340 */ "tsma_func_list ::= tsma_func_name", + /* 341 */ "tsma_func_list ::= tsma_func_list NK_COMMA tsma_func_name", + /* 342 */ "tsma_func_name ::= sma_func_name", + /* 343 */ "cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options", + /* 344 */ "cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP", + /* 345 */ "cmd ::= DROP INDEX exists_opt full_index_name", + /* 346 */ "full_index_name ::= index_name", + /* 347 */ "full_index_name ::= db_name NK_DOT index_name", + /* 348 */ "index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt", + /* 349 */ "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", + /* 350 */ "func_list ::= func", + /* 351 */ "func_list ::= func_list NK_COMMA func", + /* 352 */ "func ::= sma_func_name NK_LP expression_list NK_RP", + /* 353 */ "sma_func_name ::= function_name", + /* 354 */ "sma_func_name ::= COUNT", + /* 355 */ "sma_func_name ::= FIRST", + /* 356 */ "sma_func_name ::= LAST", + /* 357 */ "sma_func_name ::= LAST_ROW", + /* 358 */ "sma_stream_opt ::=", + /* 359 */ "sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal", + /* 360 */ "sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal", + /* 361 */ "sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal", + /* 362 */ "with_meta ::= AS", + /* 363 */ "with_meta ::= WITH META AS", + /* 364 */ "with_meta ::= ONLY META AS", + /* 365 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery", + /* 366 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name", + /* 367 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt", + /* 368 */ "cmd ::= DROP TOPIC exists_opt topic_name", + /* 369 */ "cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name", + /* 370 */ "cmd ::= DESC full_table_name", + /* 371 */ "cmd ::= DESCRIBE full_table_name", + /* 372 */ "cmd ::= RESET QUERY CACHE", + /* 373 */ "cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery", + /* 374 */ "cmd ::= EXPLAIN analyze_opt explain_options insert_query", + /* 375 */ "analyze_opt ::=", + /* 376 */ "analyze_opt ::= ANALYZE", + /* 377 */ "explain_options ::=", + /* 378 */ "explain_options ::= explain_options VERBOSE NK_BOOL", + /* 379 */ "explain_options ::= explain_options RATIO NK_FLOAT", + /* 380 */ "cmd ::= CREATE or_replace_opt agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt language_opt", + /* 381 */ "cmd ::= DROP FUNCTION exists_opt function_name", + /* 382 */ "agg_func_opt ::=", + /* 383 */ "agg_func_opt ::= AGGREGATE", + /* 384 */ "bufsize_opt ::=", + /* 385 */ "bufsize_opt ::= BUFSIZE NK_INTEGER", + /* 386 */ "language_opt ::=", + /* 387 */ "language_opt ::= LANGUAGE NK_STRING", + /* 388 */ "or_replace_opt ::=", + /* 389 */ "or_replace_opt ::= OR REPLACE", + /* 390 */ "cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery", + /* 391 */ "cmd ::= DROP VIEW exists_opt full_view_name", + /* 392 */ "full_view_name ::= view_name", + /* 393 */ "full_view_name ::= db_name NK_DOT view_name", + /* 394 */ "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", + /* 395 */ "cmd ::= DROP STREAM exists_opt stream_name", + /* 396 */ "cmd ::= PAUSE STREAM exists_opt stream_name", + /* 397 */ "cmd ::= RESUME STREAM exists_opt ignore_opt stream_name", + /* 398 */ "col_list_opt ::=", + /* 399 */ "col_list_opt ::= NK_LP column_stream_def_list NK_RP", + /* 400 */ "column_stream_def_list ::= column_stream_def", + /* 401 */ "column_stream_def_list ::= column_stream_def_list NK_COMMA column_stream_def", + /* 402 */ "column_stream_def ::= column_name", + /* 403 */ "column_stream_def ::= column_name PRIMARY KEY", + /* 404 */ "tag_def_or_ref_opt ::=", + /* 405 */ "tag_def_or_ref_opt ::= tags_def", + /* 406 */ "tag_def_or_ref_opt ::= TAGS NK_LP column_stream_def_list NK_RP", + /* 407 */ "stream_options ::=", + /* 408 */ "stream_options ::= stream_options TRIGGER AT_ONCE", + /* 409 */ "stream_options ::= stream_options TRIGGER WINDOW_CLOSE", + /* 410 */ "stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal", + /* 411 */ "stream_options ::= stream_options WATERMARK duration_literal", + /* 412 */ "stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER", + /* 413 */ "stream_options ::= stream_options FILL_HISTORY NK_INTEGER", + /* 414 */ "stream_options ::= stream_options DELETE_MARK duration_literal", + /* 415 */ "stream_options ::= stream_options IGNORE UPDATE NK_INTEGER", + /* 416 */ "subtable_opt ::=", + /* 417 */ "subtable_opt ::= SUBTABLE NK_LP expression NK_RP", + /* 418 */ "ignore_opt ::=", + /* 419 */ "ignore_opt ::= IGNORE UNTREATED", + /* 420 */ "cmd ::= KILL CONNECTION NK_INTEGER", + /* 421 */ "cmd ::= KILL QUERY NK_STRING", + /* 422 */ "cmd ::= KILL TRANSACTION NK_INTEGER", + /* 423 */ "cmd ::= KILL COMPACT NK_INTEGER", + /* 424 */ "cmd ::= BALANCE VGROUP", + /* 425 */ "cmd ::= BALANCE VGROUP LEADER on_vgroup_id", + /* 426 */ "cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER", + /* 427 */ "cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list", + /* 428 */ "cmd ::= SPLIT VGROUP NK_INTEGER", + /* 429 */ "on_vgroup_id ::=", + /* 430 */ "on_vgroup_id ::= ON NK_INTEGER", + /* 431 */ "dnode_list ::= DNODE NK_INTEGER", + /* 432 */ "dnode_list ::= dnode_list DNODE NK_INTEGER", + /* 433 */ "cmd ::= DELETE FROM full_table_name where_clause_opt", + /* 434 */ "cmd ::= query_or_subquery", + /* 435 */ "cmd ::= insert_query", + /* 436 */ "insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery", + /* 437 */ "insert_query ::= INSERT INTO full_table_name query_or_subquery", + /* 438 */ "tags_literal ::= NK_INTEGER", + /* 439 */ "tags_literal ::= NK_INTEGER NK_PLUS duration_literal", + /* 440 */ "tags_literal ::= NK_INTEGER NK_MINUS duration_literal", + /* 441 */ "tags_literal ::= NK_PLUS NK_INTEGER", + /* 442 */ "tags_literal ::= NK_PLUS NK_INTEGER NK_PLUS duration_literal", + /* 443 */ "tags_literal ::= NK_PLUS NK_INTEGER NK_MINUS duration_literal", + /* 444 */ "tags_literal ::= NK_MINUS NK_INTEGER", + /* 445 */ "tags_literal ::= NK_MINUS NK_INTEGER NK_PLUS duration_literal", + /* 446 */ "tags_literal ::= NK_MINUS NK_INTEGER NK_MINUS duration_literal", + /* 447 */ "tags_literal ::= NK_FLOAT", + /* 448 */ "tags_literal ::= NK_PLUS NK_FLOAT", + /* 449 */ "tags_literal ::= NK_MINUS NK_FLOAT", + /* 450 */ "tags_literal ::= NK_BIN", + /* 451 */ "tags_literal ::= NK_BIN NK_PLUS duration_literal", + /* 452 */ "tags_literal ::= NK_BIN NK_MINUS duration_literal", + /* 453 */ "tags_literal ::= NK_PLUS NK_BIN", + /* 454 */ "tags_literal ::= NK_PLUS NK_BIN NK_PLUS duration_literal", + /* 455 */ "tags_literal ::= NK_PLUS NK_BIN NK_MINUS duration_literal", + /* 456 */ "tags_literal ::= NK_MINUS NK_BIN", + /* 457 */ "tags_literal ::= NK_MINUS NK_BIN NK_PLUS duration_literal", + /* 458 */ "tags_literal ::= NK_MINUS NK_BIN NK_MINUS duration_literal", + /* 459 */ "tags_literal ::= NK_HEX", + /* 460 */ "tags_literal ::= NK_HEX NK_PLUS duration_literal", + /* 461 */ "tags_literal ::= NK_HEX NK_MINUS duration_literal", + /* 462 */ "tags_literal ::= NK_PLUS NK_HEX", + /* 463 */ "tags_literal ::= NK_PLUS NK_HEX NK_PLUS duration_literal", + /* 464 */ "tags_literal ::= NK_PLUS NK_HEX NK_MINUS duration_literal", + /* 465 */ "tags_literal ::= NK_MINUS NK_HEX", + /* 466 */ "tags_literal ::= NK_MINUS NK_HEX NK_PLUS duration_literal", + /* 467 */ "tags_literal ::= NK_MINUS NK_HEX NK_MINUS duration_literal", + /* 468 */ "tags_literal ::= NK_STRING", + /* 469 */ "tags_literal ::= NK_STRING NK_PLUS duration_literal", + /* 470 */ "tags_literal ::= NK_STRING NK_MINUS duration_literal", + /* 471 */ "tags_literal ::= NK_BOOL", + /* 472 */ "tags_literal ::= NULL", + /* 473 */ "tags_literal ::= literal_func", + /* 474 */ "tags_literal ::= literal_func NK_PLUS duration_literal", + /* 475 */ "tags_literal ::= literal_func NK_MINUS duration_literal", + /* 476 */ "tags_literal_list ::= tags_literal", + /* 477 */ "tags_literal_list ::= tags_literal_list NK_COMMA tags_literal", + /* 478 */ "literal ::= NK_INTEGER", + /* 479 */ "literal ::= NK_FLOAT", + /* 480 */ "literal ::= NK_STRING", + /* 481 */ "literal ::= NK_BOOL", + /* 482 */ "literal ::= TIMESTAMP NK_STRING", + /* 483 */ "literal ::= duration_literal", + /* 484 */ "literal ::= NULL", + /* 485 */ "literal ::= NK_QUESTION", + /* 486 */ "duration_literal ::= NK_VARIABLE", + /* 487 */ "signed ::= NK_INTEGER", + /* 488 */ "signed ::= NK_PLUS NK_INTEGER", + /* 489 */ "signed ::= NK_MINUS NK_INTEGER", + /* 490 */ "signed ::= NK_FLOAT", + /* 491 */ "signed ::= NK_PLUS NK_FLOAT", + /* 492 */ "signed ::= NK_MINUS NK_FLOAT", + /* 493 */ "signed_literal ::= signed", + /* 494 */ "signed_literal ::= NK_STRING", + /* 495 */ "signed_literal ::= NK_BOOL", + /* 496 */ "signed_literal ::= TIMESTAMP NK_STRING", + /* 497 */ "signed_literal ::= duration_literal", + /* 498 */ "signed_literal ::= NULL", + /* 499 */ "signed_literal ::= literal_func", + /* 500 */ "signed_literal ::= NK_QUESTION", + /* 501 */ "literal_list ::= signed_literal", + /* 502 */ "literal_list ::= literal_list NK_COMMA signed_literal", + /* 503 */ "db_name ::= NK_ID", + /* 504 */ "table_name ::= NK_ID", + /* 505 */ "column_name ::= NK_ID", + /* 506 */ "function_name ::= NK_ID", + /* 507 */ "view_name ::= NK_ID", + /* 508 */ "table_alias ::= NK_ID", + /* 509 */ "column_alias ::= NK_ID", + /* 510 */ "column_alias ::= NK_ALIAS", + /* 511 */ "user_name ::= NK_ID", + /* 512 */ "topic_name ::= NK_ID", + /* 513 */ "stream_name ::= NK_ID", + /* 514 */ "cgroup_name ::= NK_ID", + /* 515 */ "index_name ::= NK_ID", + /* 516 */ "tsma_name ::= NK_ID", + /* 517 */ "expr_or_subquery ::= expression", + /* 518 */ "expression ::= literal", + /* 519 */ "expression ::= pseudo_column", + /* 520 */ "expression ::= column_reference", + /* 521 */ "expression ::= function_expression", + /* 522 */ "expression ::= case_when_expression", + /* 523 */ "expression ::= NK_LP expression NK_RP", + /* 524 */ "expression ::= NK_PLUS expr_or_subquery", + /* 525 */ "expression ::= NK_MINUS expr_or_subquery", + /* 526 */ "expression ::= expr_or_subquery NK_PLUS expr_or_subquery", + /* 527 */ "expression ::= expr_or_subquery NK_MINUS expr_or_subquery", + /* 528 */ "expression ::= expr_or_subquery NK_STAR expr_or_subquery", + /* 529 */ "expression ::= expr_or_subquery NK_SLASH expr_or_subquery", + /* 530 */ "expression ::= expr_or_subquery NK_REM expr_or_subquery", + /* 531 */ "expression ::= column_reference NK_ARROW NK_STRING", + /* 532 */ "expression ::= expr_or_subquery NK_BITAND expr_or_subquery", + /* 533 */ "expression ::= expr_or_subquery NK_BITOR expr_or_subquery", + /* 534 */ "expression_list ::= expr_or_subquery", + /* 535 */ "expression_list ::= expression_list NK_COMMA expr_or_subquery", + /* 536 */ "column_reference ::= column_name", + /* 537 */ "column_reference ::= table_name NK_DOT column_name", + /* 538 */ "column_reference ::= NK_ALIAS", + /* 539 */ "column_reference ::= table_name NK_DOT NK_ALIAS", + /* 540 */ "pseudo_column ::= ROWTS", + /* 541 */ "pseudo_column ::= TBNAME", + /* 542 */ "pseudo_column ::= table_name NK_DOT TBNAME", + /* 543 */ "pseudo_column ::= QSTART", + /* 544 */ "pseudo_column ::= QEND", + /* 545 */ "pseudo_column ::= QDURATION", + /* 546 */ "pseudo_column ::= WSTART", + /* 547 */ "pseudo_column ::= WEND", + /* 548 */ "pseudo_column ::= WDURATION", + /* 549 */ "pseudo_column ::= IROWTS", + /* 550 */ "pseudo_column ::= ISFILLED", + /* 551 */ "pseudo_column ::= QTAGS", + /* 552 */ "function_expression ::= function_name NK_LP expression_list NK_RP", + /* 553 */ "function_expression ::= star_func NK_LP star_func_para_list NK_RP", + /* 554 */ "function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP", + /* 555 */ "function_expression ::= CAST NK_LP expr_or_subquery AS type_name_default_len NK_RP", + /* 556 */ "function_expression ::= literal_func", + /* 557 */ "literal_func ::= noarg_func NK_LP NK_RP", + /* 558 */ "literal_func ::= NOW", + /* 559 */ "literal_func ::= TODAY", + /* 560 */ "noarg_func ::= NOW", + /* 561 */ "noarg_func ::= TODAY", + /* 562 */ "noarg_func ::= TIMEZONE", + /* 563 */ "noarg_func ::= DATABASE", + /* 564 */ "noarg_func ::= CLIENT_VERSION", + /* 565 */ "noarg_func ::= SERVER_VERSION", + /* 566 */ "noarg_func ::= SERVER_STATUS", + /* 567 */ "noarg_func ::= CURRENT_USER", + /* 568 */ "noarg_func ::= USER", + /* 569 */ "star_func ::= COUNT", + /* 570 */ "star_func ::= FIRST", + /* 571 */ "star_func ::= LAST", + /* 572 */ "star_func ::= LAST_ROW", + /* 573 */ "star_func_para_list ::= NK_STAR", + /* 574 */ "star_func_para_list ::= other_para_list", + /* 575 */ "other_para_list ::= star_func_para", + /* 576 */ "other_para_list ::= other_para_list NK_COMMA star_func_para", + /* 577 */ "star_func_para ::= expr_or_subquery", + /* 578 */ "star_func_para ::= table_name NK_DOT NK_STAR", + /* 579 */ "case_when_expression ::= CASE when_then_list case_when_else_opt END", + /* 580 */ "case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END", + /* 581 */ "when_then_list ::= when_then_expr", + /* 582 */ "when_then_list ::= when_then_list when_then_expr", + /* 583 */ "when_then_expr ::= WHEN common_expression THEN common_expression", + /* 584 */ "case_when_else_opt ::=", + /* 585 */ "case_when_else_opt ::= ELSE common_expression", + /* 586 */ "predicate ::= expr_or_subquery compare_op expr_or_subquery", + /* 587 */ "predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery", + /* 588 */ "predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery", + /* 589 */ "predicate ::= expr_or_subquery IS NULL", + /* 590 */ "predicate ::= expr_or_subquery IS NOT NULL", + /* 591 */ "predicate ::= expr_or_subquery in_op in_predicate_value", + /* 592 */ "compare_op ::= NK_LT", + /* 593 */ "compare_op ::= NK_GT", + /* 594 */ "compare_op ::= NK_LE", + /* 595 */ "compare_op ::= NK_GE", + /* 596 */ "compare_op ::= NK_NE", + /* 597 */ "compare_op ::= NK_EQ", + /* 598 */ "compare_op ::= LIKE", + /* 599 */ "compare_op ::= NOT LIKE", + /* 600 */ "compare_op ::= MATCH", + /* 601 */ "compare_op ::= NMATCH", + /* 602 */ "compare_op ::= CONTAINS", + /* 603 */ "in_op ::= IN", + /* 604 */ "in_op ::= NOT IN", + /* 605 */ "in_predicate_value ::= NK_LP literal_list NK_RP", + /* 606 */ "boolean_value_expression ::= boolean_primary", + /* 607 */ "boolean_value_expression ::= NOT boolean_primary", + /* 608 */ "boolean_value_expression ::= boolean_value_expression OR boolean_value_expression", + /* 609 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression", + /* 610 */ "boolean_primary ::= predicate", + /* 611 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP", + /* 612 */ "common_expression ::= expr_or_subquery", + /* 613 */ "common_expression ::= boolean_value_expression", + /* 614 */ "from_clause_opt ::=", + /* 615 */ "from_clause_opt ::= FROM table_reference_list", + /* 616 */ "table_reference_list ::= table_reference", + /* 617 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference", + /* 618 */ "table_reference ::= table_primary", + /* 619 */ "table_reference ::= joined_table", + /* 620 */ "table_primary ::= table_name alias_opt", + /* 621 */ "table_primary ::= db_name NK_DOT table_name alias_opt", + /* 622 */ "table_primary ::= subquery alias_opt", + /* 623 */ "table_primary ::= parenthesized_joined_table", + /* 624 */ "alias_opt ::=", + /* 625 */ "alias_opt ::= table_alias", + /* 626 */ "alias_opt ::= AS table_alias", + /* 627 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP", + /* 628 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP", + /* 629 */ "joined_table ::= table_reference join_type join_subtype JOIN table_reference join_on_clause_opt window_offset_clause_opt jlimit_clause_opt", + /* 630 */ "join_type ::=", + /* 631 */ "join_type ::= INNER", + /* 632 */ "join_type ::= LEFT", + /* 633 */ "join_type ::= RIGHT", + /* 634 */ "join_type ::= FULL", + /* 635 */ "join_subtype ::=", + /* 636 */ "join_subtype ::= OUTER", + /* 637 */ "join_subtype ::= SEMI", + /* 638 */ "join_subtype ::= ANTI", + /* 639 */ "join_subtype ::= ASOF", + /* 640 */ "join_subtype ::= WINDOW", + /* 641 */ "join_on_clause_opt ::=", + /* 642 */ "join_on_clause_opt ::= ON search_condition", + /* 643 */ "window_offset_clause_opt ::=", + /* 644 */ "window_offset_clause_opt ::= WINDOW_OFFSET NK_LP window_offset_literal NK_COMMA window_offset_literal NK_RP", + /* 645 */ "window_offset_literal ::= NK_VARIABLE", + /* 646 */ "window_offset_literal ::= NK_MINUS NK_VARIABLE", + /* 647 */ "jlimit_clause_opt ::=", + /* 648 */ "jlimit_clause_opt ::= JLIMIT NK_INTEGER", + /* 649 */ "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", + /* 650 */ "hint_list ::=", + /* 651 */ "hint_list ::= NK_HINT", + /* 652 */ "tag_mode_opt ::=", + /* 653 */ "tag_mode_opt ::= TAGS", + /* 654 */ "set_quantifier_opt ::=", + /* 655 */ "set_quantifier_opt ::= DISTINCT", + /* 656 */ "set_quantifier_opt ::= ALL", + /* 657 */ "select_list ::= select_item", + /* 658 */ "select_list ::= select_list NK_COMMA select_item", + /* 659 */ "select_item ::= NK_STAR", + /* 660 */ "select_item ::= common_expression", + /* 661 */ "select_item ::= common_expression column_alias", + /* 662 */ "select_item ::= common_expression AS column_alias", + /* 663 */ "select_item ::= table_name NK_DOT NK_STAR", + /* 664 */ "where_clause_opt ::=", + /* 665 */ "where_clause_opt ::= WHERE search_condition", + /* 666 */ "partition_by_clause_opt ::=", + /* 667 */ "partition_by_clause_opt ::= PARTITION BY partition_list", + /* 668 */ "partition_list ::= partition_item", + /* 669 */ "partition_list ::= partition_list NK_COMMA partition_item", + /* 670 */ "partition_item ::= expr_or_subquery", + /* 671 */ "partition_item ::= expr_or_subquery column_alias", + /* 672 */ "partition_item ::= expr_or_subquery AS column_alias", + /* 673 */ "twindow_clause_opt ::=", + /* 674 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP", + /* 675 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP", + /* 676 */ "twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt", + /* 677 */ "twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_COMMA interval_sliding_duration_literal NK_RP sliding_opt fill_opt", + /* 678 */ "twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition", + /* 679 */ "twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_RP", + /* 680 */ "twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP", + /* 681 */ "sliding_opt ::=", + /* 682 */ "sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP", + /* 683 */ "interval_sliding_duration_literal ::= NK_VARIABLE", + /* 684 */ "interval_sliding_duration_literal ::= NK_STRING", + /* 685 */ "interval_sliding_duration_literal ::= NK_INTEGER", + /* 686 */ "fill_opt ::=", + /* 687 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP", + /* 688 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP", + /* 689 */ "fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP", + /* 690 */ "fill_mode ::= NONE", + /* 691 */ "fill_mode ::= PREV", + /* 692 */ "fill_mode ::= NULL", + /* 693 */ "fill_mode ::= NULL_F", + /* 694 */ "fill_mode ::= LINEAR", + /* 695 */ "fill_mode ::= NEXT", + /* 696 */ "group_by_clause_opt ::=", + /* 697 */ "group_by_clause_opt ::= GROUP BY group_by_list", + /* 698 */ "group_by_list ::= expr_or_subquery", + /* 699 */ "group_by_list ::= group_by_list NK_COMMA expr_or_subquery", + /* 700 */ "having_clause_opt ::=", + /* 701 */ "having_clause_opt ::= HAVING search_condition", + /* 702 */ "range_opt ::=", + /* 703 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP", + /* 704 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_RP", + /* 705 */ "every_opt ::=", + /* 706 */ "every_opt ::= EVERY NK_LP duration_literal NK_RP", + /* 707 */ "query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt", + /* 708 */ "query_simple ::= query_specification", + /* 709 */ "query_simple ::= union_query_expression", + /* 710 */ "union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery", + /* 711 */ "union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery", + /* 712 */ "query_simple_or_subquery ::= query_simple", + /* 713 */ "query_simple_or_subquery ::= subquery", + /* 714 */ "query_or_subquery ::= query_expression", + /* 715 */ "query_or_subquery ::= subquery", + /* 716 */ "order_by_clause_opt ::=", + /* 717 */ "order_by_clause_opt ::= ORDER BY sort_specification_list", + /* 718 */ "slimit_clause_opt ::=", + /* 719 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER", + /* 720 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER", + /* 721 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER", + /* 722 */ "limit_clause_opt ::=", + /* 723 */ "limit_clause_opt ::= LIMIT NK_INTEGER", + /* 724 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER", + /* 725 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER", + /* 726 */ "subquery ::= NK_LP query_expression NK_RP", + /* 727 */ "subquery ::= NK_LP subquery NK_RP", + /* 728 */ "search_condition ::= common_expression", + /* 729 */ "sort_specification_list ::= sort_specification", + /* 730 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification", + /* 731 */ "sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt", + /* 732 */ "ordering_specification_opt ::=", + /* 733 */ "ordering_specification_opt ::= ASC", + /* 734 */ "ordering_specification_opt ::= DESC", + /* 735 */ "null_ordering_opt ::=", + /* 736 */ "null_ordering_opt ::= NULLS FIRST", + /* 737 */ "null_ordering_opt ::= NULLS LAST", }; #endif /* NDEBUG */ @@ -3002,247 +3392,294 @@ static void yy_destructor( */ /********* Begin destructor definitions ***************************************/ /* Default NON-TERMINAL Destructor */ - case 367: /* cmd */ - case 370: /* literal */ - case 379: /* with_opt */ - case 385: /* search_condition */ - case 390: /* db_options */ - case 392: /* alter_db_options */ - case 394: /* start_opt */ - case 395: /* end_opt */ - case 399: /* signed */ - case 401: /* retention */ - case 402: /* full_table_name */ - case 405: /* table_options */ - case 409: /* alter_table_clause */ - case 410: /* alter_table_options */ - case 413: /* tags_literal */ - case 414: /* create_subtable_clause */ - case 417: /* drop_table_clause */ - case 419: /* column_def */ - case 424: /* duration_literal */ - case 425: /* rollup_func_name */ - case 427: /* col_name */ - case 430: /* like_pattern_opt */ - case 431: /* db_name_cond_opt */ - case 432: /* table_name_cond */ - case 433: /* from_db_opt */ - case 436: /* tag_item */ - case 438: /* index_options */ - case 439: /* full_index_name */ - case 442: /* sliding_opt */ - case 443: /* sma_stream_opt */ - case 444: /* func */ - case 448: /* query_or_subquery */ - case 449: /* where_clause_opt */ - case 452: /* explain_options */ - case 453: /* insert_query */ - case 458: /* full_view_name */ - case 461: /* stream_options */ - case 464: /* subtable_opt */ - case 467: /* column_stream_def */ - case 468: /* expression */ - case 471: /* literal_func */ - case 472: /* signed_literal */ - case 475: /* expr_or_subquery */ - case 476: /* pseudo_column */ - case 477: /* column_reference */ - case 478: /* function_expression */ - case 479: /* case_when_expression */ - case 484: /* star_func_para */ - case 486: /* case_when_else_opt */ - case 487: /* common_expression */ - case 488: /* when_then_expr */ - case 489: /* predicate */ - case 492: /* in_predicate_value */ - case 493: /* boolean_value_expression */ - case 494: /* boolean_primary */ - case 495: /* from_clause_opt */ - case 496: /* table_reference_list */ - case 497: /* table_reference */ - case 498: /* table_primary */ - case 499: /* joined_table */ - case 501: /* subquery */ - case 502: /* parenthesized_joined_table */ - case 505: /* join_on_clause_opt */ - case 506: /* window_offset_clause_opt */ - case 507: /* jlimit_clause_opt */ - case 508: /* window_offset_literal */ - case 509: /* query_specification */ - case 515: /* range_opt */ - case 516: /* every_opt */ - case 517: /* fill_opt */ - case 518: /* twindow_clause_opt */ - case 520: /* having_clause_opt */ - case 521: /* select_item */ - case 523: /* partition_item */ - case 524: /* interval_sliding_duration_literal */ - case 527: /* query_expression */ - case 528: /* query_simple */ - case 530: /* slimit_clause_opt */ - case 531: /* limit_clause_opt */ - case 532: /* union_query_expression */ - case 533: /* query_simple_or_subquery */ - case 535: /* sort_specification */ + case 369: /* cmd */ + case 372: /* literal */ + case 381: /* with_opt */ + case 387: /* search_condition */ + case 392: /* db_options */ + case 394: /* alter_db_options */ + case 396: /* start_opt */ + case 397: /* end_opt */ + case 401: /* signed */ + case 403: /* retention */ + case 404: /* full_table_name */ + case 407: /* table_options */ + case 411: /* alter_table_clause */ + case 412: /* alter_table_options */ + case 415: /* tags_literal */ + case 416: /* create_subtable_clause */ + case 419: /* drop_table_clause */ + case 421: /* column_def */ + case 426: /* duration_literal */ + case 427: /* rollup_func_name */ + case 429: /* col_name */ + case 432: /* like_pattern_opt */ + case 433: /* db_name_cond_opt */ + case 434: /* table_name_cond */ + case 435: /* from_db_opt */ + case 438: /* tag_item */ + case 442: /* full_tsma_name */ + case 446: /* index_options */ + case 447: /* full_index_name */ + case 450: /* sliding_opt */ + case 451: /* sma_stream_opt */ + case 452: /* func */ + case 455: /* query_or_subquery */ + case 456: /* where_clause_opt */ + case 459: /* explain_options */ + case 460: /* insert_query */ + case 465: /* full_view_name */ + case 468: /* stream_options */ + case 471: /* subtable_opt */ + case 474: /* column_stream_def */ + case 475: /* expression */ + case 478: /* literal_func */ + case 479: /* signed_literal */ + case 482: /* expr_or_subquery */ + case 483: /* pseudo_column */ + case 484: /* column_reference */ + case 485: /* function_expression */ + case 486: /* case_when_expression */ + case 491: /* star_func_para */ + case 493: /* case_when_else_opt */ + case 494: /* common_expression */ + case 495: /* when_then_expr */ + case 496: /* predicate */ + case 499: /* in_predicate_value */ + case 500: /* boolean_value_expression */ + case 501: /* boolean_primary */ + case 502: /* from_clause_opt */ + case 503: /* table_reference_list */ + case 504: /* table_reference */ + case 505: /* table_primary */ + case 506: /* joined_table */ + case 508: /* subquery */ + case 509: /* parenthesized_joined_table */ + case 512: /* join_on_clause_opt */ + case 513: /* window_offset_clause_opt */ + case 514: /* jlimit_clause_opt */ + case 515: /* window_offset_literal */ + case 516: /* query_specification */ + case 522: /* range_opt */ + case 523: /* every_opt */ + case 524: /* fill_opt */ + case 525: /* twindow_clause_opt */ + case 527: /* having_clause_opt */ + case 528: /* select_item */ + case 530: /* partition_item */ + case 531: /* interval_sliding_duration_literal */ + case 534: /* query_expression */ + case 535: /* query_simple */ + case 537: /* slimit_clause_opt */ + case 538: /* limit_clause_opt */ + case 539: /* union_query_expression */ + case 540: /* query_simple_or_subquery */ + case 542: /* sort_specification */ { - nodesDestroyNode((yypminor->yy720)); +#line 7 "sql.y" + nodesDestroyNode((yypminor->yy722)); +#line 3481 "sql.c" } break; - case 368: /* account_options */ - case 369: /* alter_account_options */ - case 371: /* alter_account_option */ - case 393: /* speed_opt */ - case 447: /* with_meta */ - case 456: /* bufsize_opt */ + case 370: /* account_options */ + case 371: /* alter_account_options */ + case 373: /* alter_account_option */ + case 395: /* speed_opt */ + case 454: /* with_meta */ + case 463: /* bufsize_opt */ { +#line 54 "sql.y" +#line 3493 "sql.c" } break; - case 372: /* ip_range_list */ - case 373: /* white_list */ - case 374: /* white_list_opt */ - case 396: /* integer_list */ - case 397: /* variable_list */ - case 398: /* retention_list */ - case 403: /* column_def_list */ - case 404: /* tags_def_opt */ - case 406: /* multi_create_clause */ - case 407: /* tags_def */ - case 408: /* multi_drop_clause */ - case 415: /* specific_cols_opt */ - case 416: /* tags_literal_list */ - case 418: /* col_name_list */ - case 421: /* duration_list */ - case 422: /* rollup_func_list */ - case 434: /* tag_list_opt */ - case 441: /* func_list */ - case 446: /* expression_list */ - case 462: /* col_list_opt */ - case 463: /* tag_def_or_ref_opt */ - case 466: /* column_stream_def_list */ - case 470: /* dnode_list */ - case 473: /* literal_list */ - case 481: /* star_func_para_list */ - case 483: /* other_para_list */ - case 485: /* when_then_list */ - case 510: /* hint_list */ - case 513: /* select_list */ - case 514: /* partition_by_clause_opt */ - case 519: /* group_by_clause_opt */ - case 522: /* partition_list */ - case 526: /* group_by_list */ - case 529: /* order_by_clause_opt */ - case 534: /* sort_specification_list */ + case 374: /* ip_range_list */ + case 375: /* white_list */ + case 376: /* white_list_opt */ + case 398: /* integer_list */ + case 399: /* variable_list */ + case 400: /* retention_list */ + case 405: /* column_def_list */ + case 406: /* tags_def_opt */ + case 408: /* multi_create_clause */ + case 409: /* tags_def */ + case 410: /* multi_drop_clause */ + case 417: /* specific_cols_opt */ + case 418: /* tags_literal_list */ + case 420: /* col_name_list */ + case 423: /* duration_list */ + case 424: /* rollup_func_list */ + case 436: /* tag_list_opt */ + case 443: /* tsma_func_list */ + case 449: /* func_list */ + case 453: /* expression_list */ + case 469: /* col_list_opt */ + case 470: /* tag_def_or_ref_opt */ + case 473: /* column_stream_def_list */ + case 477: /* dnode_list */ + case 480: /* literal_list */ + case 488: /* star_func_para_list */ + case 490: /* other_para_list */ + case 492: /* when_then_list */ + case 517: /* hint_list */ + case 520: /* select_list */ + case 521: /* partition_by_clause_opt */ + case 526: /* group_by_clause_opt */ + case 529: /* partition_list */ + case 533: /* group_by_list */ + case 536: /* order_by_clause_opt */ + case 541: /* sort_specification_list */ { - nodesDestroyList((yypminor->yy984)); +#line 85 "sql.y" + nodesDestroyList((yypminor->yy694)); +#line 3535 "sql.c" } break; - case 375: /* user_name */ - case 382: /* db_name */ - case 383: /* table_name */ - case 384: /* topic_name */ - case 386: /* dnode_endpoint */ - case 411: /* column_name */ - case 426: /* function_name */ - case 437: /* column_alias */ - case 440: /* index_name */ + case 377: /* user_name */ + case 384: /* db_name */ + case 385: /* table_name */ + case 386: /* topic_name */ + case 388: /* dnode_endpoint */ + case 413: /* column_name */ + case 428: /* function_name */ + case 439: /* column_alias */ + case 440: /* tsma_name */ case 445: /* sma_func_name */ - case 450: /* cgroup_name */ - case 457: /* language_opt */ - case 459: /* view_name */ - case 460: /* stream_name */ - case 469: /* on_vgroup_id */ - case 474: /* table_alias */ - case 480: /* star_func */ - case 482: /* noarg_func */ - case 500: /* alias_opt */ + case 448: /* index_name */ + case 457: /* cgroup_name */ + case 464: /* language_opt */ + case 466: /* view_name */ + case 467: /* stream_name */ + case 476: /* on_vgroup_id */ + case 481: /* table_alias */ + case 487: /* star_func */ + case 489: /* noarg_func */ + case 507: /* alias_opt */ { +#line 1062 "sql.y" +#line 3561 "sql.c" } break; - case 376: /* sysinfo_opt */ + case 378: /* sysinfo_opt */ { +#line 112 "sql.y" +#line 3568 "sql.c" } break; - case 377: /* privileges */ - case 380: /* priv_type_list */ - case 381: /* priv_type */ + case 379: /* privileges */ + case 382: /* priv_type_list */ + case 383: /* priv_type */ { +#line 121 "sql.y" +#line 3577 "sql.c" } break; - case 378: /* priv_level */ + case 380: /* priv_level */ { +#line 138 "sql.y" +#line 3584 "sql.c" } break; - case 387: /* force_opt */ - case 388: /* unsafe_opt */ - case 389: /* not_exists_opt */ - case 391: /* exists_opt */ - case 451: /* analyze_opt */ - case 454: /* or_replace_opt */ - case 455: /* agg_func_opt */ - case 465: /* ignore_opt */ - case 511: /* set_quantifier_opt */ - case 512: /* tag_mode_opt */ + case 389: /* force_opt */ + case 390: /* unsafe_opt */ + case 391: /* not_exists_opt */ + case 393: /* exists_opt */ + case 458: /* analyze_opt */ + case 461: /* or_replace_opt */ + case 462: /* agg_func_opt */ + case 472: /* ignore_opt */ + case 518: /* set_quantifier_opt */ + case 519: /* tag_mode_opt */ { +#line 167 "sql.y" +#line 3600 "sql.c" } break; - case 400: /* alter_db_option */ - case 423: /* alter_table_option */ + case 402: /* alter_db_option */ + case 425: /* alter_table_option */ { +#line 274 "sql.y" +#line 3608 "sql.c" } break; - case 412: /* type_name */ - case 420: /* type_name_default_len */ + case 414: /* type_name */ + case 422: /* type_name_default_len */ { +#line 401 "sql.y" +#line 3616 "sql.c" } break; - case 428: /* db_kind_opt */ - case 435: /* table_kind */ + case 430: /* db_kind_opt */ + case 437: /* table_kind */ { +#line 577 "sql.y" +#line 3624 "sql.c" } break; - case 429: /* table_kind_db_name_cond_opt */ + case 431: /* table_kind_db_name_cond_opt */ { +#line 542 "sql.y" +#line 3631 "sql.c" } break; - case 490: /* compare_op */ - case 491: /* in_op */ + case 441: /* tsma_opt */ + case 444: /* tsma_func_name */ { - +#line 594 "sql.y" + nodesDestroyNode((yypminor->yy722)); +#line 3639 "sql.c" } break; - case 503: /* join_type */ + case 497: /* compare_op */ + case 498: /* in_op */ { +#line 1260 "sql.y" +#line 3647 "sql.c" } break; - case 504: /* join_subtype */ + case 510: /* join_type */ { +#line 1341 "sql.y" +#line 3654 "sql.c" } break; - case 525: /* fill_mode */ + case 511: /* join_subtype */ { +#line 1349 "sql.y" +#line 3661 "sql.c" } break; - case 536: /* ordering_specification_opt */ + case 532: /* fill_mode */ { +#line 1465 "sql.y" +#line 3668 "sql.c" } break; - case 537: /* null_ordering_opt */ + case 543: /* ordering_specification_opt */ { +#line 1550 "sql.y" +#line 3675 "sql.c" +} + break; + case 544: /* null_ordering_opt */ +{ +#line 1556 "sql.y" + +#line 3682 "sql.c" } break; /********* End destructor definitions *****************************************/ @@ -3409,7 +3846,7 @@ static YYACTIONTYPE yy_find_shift_action( #endif /* YYWILDCARD */ return yy_default[stateno]; }else{ - assert( i>=0 && i=0 && i<(int)(sizeof(yy_action)/sizeof(yy_action[0])) ); return yy_action[i]; } }while(1); @@ -3531,732 +3968,744 @@ static void yy_shift( /* For rule J, yyRuleInfoLhs[J] contains the symbol on the left-hand side ** of that rule */ static const YYCODETYPE yyRuleInfoLhs[] = { - 367, /* (0) cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */ - 367, /* (1) cmd ::= ALTER ACCOUNT NK_ID alter_account_options */ - 368, /* (2) account_options ::= */ - 368, /* (3) account_options ::= account_options PPS literal */ - 368, /* (4) account_options ::= account_options TSERIES literal */ - 368, /* (5) account_options ::= account_options STORAGE literal */ - 368, /* (6) account_options ::= account_options STREAMS literal */ - 368, /* (7) account_options ::= account_options QTIME literal */ - 368, /* (8) account_options ::= account_options DBS literal */ - 368, /* (9) account_options ::= account_options USERS literal */ - 368, /* (10) account_options ::= account_options CONNS literal */ - 368, /* (11) account_options ::= account_options STATE literal */ - 369, /* (12) alter_account_options ::= alter_account_option */ - 369, /* (13) alter_account_options ::= alter_account_options alter_account_option */ - 371, /* (14) alter_account_option ::= PASS literal */ - 371, /* (15) alter_account_option ::= PPS literal */ - 371, /* (16) alter_account_option ::= TSERIES literal */ - 371, /* (17) alter_account_option ::= STORAGE literal */ - 371, /* (18) alter_account_option ::= STREAMS literal */ - 371, /* (19) alter_account_option ::= QTIME literal */ - 371, /* (20) alter_account_option ::= DBS literal */ - 371, /* (21) alter_account_option ::= USERS literal */ - 371, /* (22) alter_account_option ::= CONNS literal */ - 371, /* (23) alter_account_option ::= STATE literal */ - 372, /* (24) ip_range_list ::= NK_STRING */ - 372, /* (25) ip_range_list ::= ip_range_list NK_COMMA NK_STRING */ - 373, /* (26) white_list ::= HOST ip_range_list */ - 374, /* (27) white_list_opt ::= */ - 374, /* (28) white_list_opt ::= white_list */ - 367, /* (29) cmd ::= CREATE USER user_name PASS NK_STRING sysinfo_opt white_list_opt */ - 367, /* (30) cmd ::= ALTER USER user_name PASS NK_STRING */ - 367, /* (31) cmd ::= ALTER USER user_name ENABLE NK_INTEGER */ - 367, /* (32) cmd ::= ALTER USER user_name SYSINFO NK_INTEGER */ - 367, /* (33) cmd ::= ALTER USER user_name ADD white_list */ - 367, /* (34) cmd ::= ALTER USER user_name DROP white_list */ - 367, /* (35) cmd ::= DROP USER user_name */ - 376, /* (36) sysinfo_opt ::= */ - 376, /* (37) sysinfo_opt ::= SYSINFO NK_INTEGER */ - 367, /* (38) cmd ::= GRANT privileges ON priv_level with_opt TO user_name */ - 367, /* (39) cmd ::= REVOKE privileges ON priv_level with_opt FROM user_name */ - 377, /* (40) privileges ::= ALL */ - 377, /* (41) privileges ::= priv_type_list */ - 377, /* (42) privileges ::= SUBSCRIBE */ - 380, /* (43) priv_type_list ::= priv_type */ - 380, /* (44) priv_type_list ::= priv_type_list NK_COMMA priv_type */ - 381, /* (45) priv_type ::= READ */ - 381, /* (46) priv_type ::= WRITE */ - 381, /* (47) priv_type ::= ALTER */ - 378, /* (48) priv_level ::= NK_STAR NK_DOT NK_STAR */ - 378, /* (49) priv_level ::= db_name NK_DOT NK_STAR */ - 378, /* (50) priv_level ::= db_name NK_DOT table_name */ - 378, /* (51) priv_level ::= topic_name */ - 379, /* (52) with_opt ::= */ - 379, /* (53) with_opt ::= WITH search_condition */ - 367, /* (54) cmd ::= CREATE DNODE dnode_endpoint */ - 367, /* (55) cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */ - 367, /* (56) cmd ::= DROP DNODE NK_INTEGER force_opt */ - 367, /* (57) cmd ::= DROP DNODE dnode_endpoint force_opt */ - 367, /* (58) cmd ::= DROP DNODE NK_INTEGER unsafe_opt */ - 367, /* (59) cmd ::= DROP DNODE dnode_endpoint unsafe_opt */ - 367, /* (60) cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ - 367, /* (61) cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */ - 367, /* (62) cmd ::= ALTER ALL DNODES NK_STRING */ - 367, /* (63) cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */ - 367, /* (64) cmd ::= RESTORE DNODE NK_INTEGER */ - 386, /* (65) dnode_endpoint ::= NK_STRING */ - 386, /* (66) dnode_endpoint ::= NK_ID */ - 386, /* (67) dnode_endpoint ::= NK_IPTOKEN */ - 387, /* (68) force_opt ::= */ - 387, /* (69) force_opt ::= FORCE */ - 388, /* (70) unsafe_opt ::= UNSAFE */ - 367, /* (71) cmd ::= ALTER CLUSTER NK_STRING */ - 367, /* (72) cmd ::= ALTER CLUSTER NK_STRING NK_STRING */ - 367, /* (73) cmd ::= ALTER LOCAL NK_STRING */ - 367, /* (74) cmd ::= ALTER LOCAL NK_STRING NK_STRING */ - 367, /* (75) cmd ::= CREATE QNODE ON DNODE NK_INTEGER */ - 367, /* (76) cmd ::= DROP QNODE ON DNODE NK_INTEGER */ - 367, /* (77) cmd ::= RESTORE QNODE ON DNODE NK_INTEGER */ - 367, /* (78) cmd ::= CREATE BNODE ON DNODE NK_INTEGER */ - 367, /* (79) cmd ::= DROP BNODE ON DNODE NK_INTEGER */ - 367, /* (80) cmd ::= CREATE SNODE ON DNODE NK_INTEGER */ - 367, /* (81) cmd ::= DROP SNODE ON DNODE NK_INTEGER */ - 367, /* (82) cmd ::= CREATE MNODE ON DNODE NK_INTEGER */ - 367, /* (83) cmd ::= DROP MNODE ON DNODE NK_INTEGER */ - 367, /* (84) cmd ::= RESTORE MNODE ON DNODE NK_INTEGER */ - 367, /* (85) cmd ::= RESTORE VNODE ON DNODE NK_INTEGER */ - 367, /* (86) cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ - 367, /* (87) cmd ::= DROP DATABASE exists_opt db_name */ - 367, /* (88) cmd ::= USE db_name */ - 367, /* (89) cmd ::= ALTER DATABASE db_name alter_db_options */ - 367, /* (90) cmd ::= FLUSH DATABASE db_name */ - 367, /* (91) cmd ::= TRIM DATABASE db_name speed_opt */ - 367, /* (92) cmd ::= S3MIGRATE DATABASE db_name */ - 367, /* (93) cmd ::= COMPACT DATABASE db_name start_opt end_opt */ - 389, /* (94) not_exists_opt ::= IF NOT EXISTS */ - 389, /* (95) not_exists_opt ::= */ - 391, /* (96) exists_opt ::= IF EXISTS */ - 391, /* (97) exists_opt ::= */ - 390, /* (98) db_options ::= */ - 390, /* (99) db_options ::= db_options BUFFER NK_INTEGER */ - 390, /* (100) db_options ::= db_options CACHEMODEL NK_STRING */ - 390, /* (101) db_options ::= db_options CACHESIZE NK_INTEGER */ - 390, /* (102) db_options ::= db_options COMP NK_INTEGER */ - 390, /* (103) db_options ::= db_options DURATION NK_INTEGER */ - 390, /* (104) db_options ::= db_options DURATION NK_VARIABLE */ - 390, /* (105) db_options ::= db_options MAXROWS NK_INTEGER */ - 390, /* (106) db_options ::= db_options MINROWS NK_INTEGER */ - 390, /* (107) db_options ::= db_options KEEP integer_list */ - 390, /* (108) db_options ::= db_options KEEP variable_list */ - 390, /* (109) db_options ::= db_options PAGES NK_INTEGER */ - 390, /* (110) db_options ::= db_options PAGESIZE NK_INTEGER */ - 390, /* (111) db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */ - 390, /* (112) db_options ::= db_options PRECISION NK_STRING */ - 390, /* (113) db_options ::= db_options REPLICA NK_INTEGER */ - 390, /* (114) db_options ::= db_options VGROUPS NK_INTEGER */ - 390, /* (115) db_options ::= db_options SINGLE_STABLE NK_INTEGER */ - 390, /* (116) db_options ::= db_options RETENTIONS retention_list */ - 390, /* (117) db_options ::= db_options SCHEMALESS NK_INTEGER */ - 390, /* (118) db_options ::= db_options WAL_LEVEL NK_INTEGER */ - 390, /* (119) db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */ - 390, /* (120) db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */ - 390, /* (121) db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ - 390, /* (122) db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */ - 390, /* (123) db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ - 390, /* (124) db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */ - 390, /* (125) db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */ - 390, /* (126) db_options ::= db_options STT_TRIGGER NK_INTEGER */ - 390, /* (127) db_options ::= db_options TABLE_PREFIX signed */ - 390, /* (128) db_options ::= db_options TABLE_SUFFIX signed */ - 390, /* (129) db_options ::= db_options S3_CHUNKSIZE NK_INTEGER */ - 390, /* (130) db_options ::= db_options S3_KEEPLOCAL NK_INTEGER */ - 390, /* (131) db_options ::= db_options S3_KEEPLOCAL NK_VARIABLE */ - 390, /* (132) db_options ::= db_options S3_COMPACT NK_INTEGER */ - 390, /* (133) db_options ::= db_options KEEP_TIME_OFFSET NK_INTEGER */ - 392, /* (134) alter_db_options ::= alter_db_option */ - 392, /* (135) alter_db_options ::= alter_db_options alter_db_option */ - 400, /* (136) alter_db_option ::= BUFFER NK_INTEGER */ - 400, /* (137) alter_db_option ::= CACHEMODEL NK_STRING */ - 400, /* (138) alter_db_option ::= CACHESIZE NK_INTEGER */ - 400, /* (139) alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */ - 400, /* (140) alter_db_option ::= KEEP integer_list */ - 400, /* (141) alter_db_option ::= KEEP variable_list */ - 400, /* (142) alter_db_option ::= PAGES NK_INTEGER */ - 400, /* (143) alter_db_option ::= REPLICA NK_INTEGER */ - 400, /* (144) alter_db_option ::= WAL_LEVEL NK_INTEGER */ - 400, /* (145) alter_db_option ::= STT_TRIGGER NK_INTEGER */ - 400, /* (146) alter_db_option ::= MINROWS NK_INTEGER */ - 400, /* (147) alter_db_option ::= WAL_RETENTION_PERIOD NK_INTEGER */ - 400, /* (148) alter_db_option ::= WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ - 400, /* (149) alter_db_option ::= WAL_RETENTION_SIZE NK_INTEGER */ - 400, /* (150) alter_db_option ::= WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ - 400, /* (151) alter_db_option ::= S3_KEEPLOCAL NK_INTEGER */ - 400, /* (152) alter_db_option ::= S3_KEEPLOCAL NK_VARIABLE */ - 400, /* (153) alter_db_option ::= S3_COMPACT NK_INTEGER */ - 400, /* (154) alter_db_option ::= KEEP_TIME_OFFSET NK_INTEGER */ - 396, /* (155) integer_list ::= NK_INTEGER */ - 396, /* (156) integer_list ::= integer_list NK_COMMA NK_INTEGER */ - 397, /* (157) variable_list ::= NK_VARIABLE */ - 397, /* (158) variable_list ::= variable_list NK_COMMA NK_VARIABLE */ - 398, /* (159) retention_list ::= retention */ - 398, /* (160) retention_list ::= retention_list NK_COMMA retention */ - 401, /* (161) retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ - 401, /* (162) retention ::= NK_MINUS NK_COLON NK_VARIABLE */ - 393, /* (163) speed_opt ::= */ - 393, /* (164) speed_opt ::= BWLIMIT NK_INTEGER */ - 394, /* (165) start_opt ::= */ - 394, /* (166) start_opt ::= START WITH NK_INTEGER */ - 394, /* (167) start_opt ::= START WITH NK_STRING */ - 394, /* (168) start_opt ::= START WITH TIMESTAMP NK_STRING */ - 395, /* (169) end_opt ::= */ - 395, /* (170) end_opt ::= END WITH NK_INTEGER */ - 395, /* (171) end_opt ::= END WITH NK_STRING */ - 395, /* (172) end_opt ::= END WITH TIMESTAMP NK_STRING */ - 367, /* (173) cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ - 367, /* (174) cmd ::= CREATE TABLE multi_create_clause */ - 367, /* (175) cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ - 367, /* (176) cmd ::= DROP TABLE multi_drop_clause */ - 367, /* (177) cmd ::= DROP STABLE exists_opt full_table_name */ - 367, /* (178) cmd ::= ALTER TABLE alter_table_clause */ - 367, /* (179) cmd ::= ALTER STABLE alter_table_clause */ - 409, /* (180) alter_table_clause ::= full_table_name alter_table_options */ - 409, /* (181) alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ - 409, /* (182) alter_table_clause ::= full_table_name DROP COLUMN column_name */ - 409, /* (183) alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ - 409, /* (184) alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ - 409, /* (185) alter_table_clause ::= full_table_name ADD TAG column_name type_name */ - 409, /* (186) alter_table_clause ::= full_table_name DROP TAG column_name */ - 409, /* (187) alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ - 409, /* (188) alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ - 409, /* (189) alter_table_clause ::= full_table_name SET TAG column_name NK_EQ tags_literal */ - 406, /* (190) multi_create_clause ::= create_subtable_clause */ - 406, /* (191) multi_create_clause ::= multi_create_clause create_subtable_clause */ - 414, /* (192) 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 */ - 408, /* (193) multi_drop_clause ::= drop_table_clause */ - 408, /* (194) multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause */ - 417, /* (195) drop_table_clause ::= exists_opt full_table_name */ - 415, /* (196) specific_cols_opt ::= */ - 415, /* (197) specific_cols_opt ::= NK_LP col_name_list NK_RP */ - 402, /* (198) full_table_name ::= table_name */ - 402, /* (199) full_table_name ::= db_name NK_DOT table_name */ - 403, /* (200) column_def_list ::= column_def */ - 403, /* (201) column_def_list ::= column_def_list NK_COMMA column_def */ - 419, /* (202) column_def ::= column_name type_name */ - 419, /* (203) column_def ::= column_name type_name PRIMARY KEY */ - 412, /* (204) type_name ::= BOOL */ - 412, /* (205) type_name ::= TINYINT */ - 412, /* (206) type_name ::= SMALLINT */ - 412, /* (207) type_name ::= INT */ - 412, /* (208) type_name ::= INTEGER */ - 412, /* (209) type_name ::= BIGINT */ - 412, /* (210) type_name ::= FLOAT */ - 412, /* (211) type_name ::= DOUBLE */ - 412, /* (212) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ - 412, /* (213) type_name ::= TIMESTAMP */ - 412, /* (214) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ - 412, /* (215) type_name ::= TINYINT UNSIGNED */ - 412, /* (216) type_name ::= SMALLINT UNSIGNED */ - 412, /* (217) type_name ::= INT UNSIGNED */ - 412, /* (218) type_name ::= BIGINT UNSIGNED */ - 412, /* (219) type_name ::= JSON */ - 412, /* (220) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ - 412, /* (221) type_name ::= MEDIUMBLOB */ - 412, /* (222) type_name ::= BLOB */ - 412, /* (223) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ - 412, /* (224) type_name ::= GEOMETRY NK_LP NK_INTEGER NK_RP */ - 412, /* (225) type_name ::= DECIMAL */ - 412, /* (226) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ - 412, /* (227) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ - 420, /* (228) type_name_default_len ::= BINARY */ - 420, /* (229) type_name_default_len ::= NCHAR */ - 420, /* (230) type_name_default_len ::= VARCHAR */ - 420, /* (231) type_name_default_len ::= VARBINARY */ - 404, /* (232) tags_def_opt ::= */ - 404, /* (233) tags_def_opt ::= tags_def */ - 407, /* (234) tags_def ::= TAGS NK_LP column_def_list NK_RP */ - 405, /* (235) table_options ::= */ - 405, /* (236) table_options ::= table_options COMMENT NK_STRING */ - 405, /* (237) table_options ::= table_options MAX_DELAY duration_list */ - 405, /* (238) table_options ::= table_options WATERMARK duration_list */ - 405, /* (239) table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ - 405, /* (240) table_options ::= table_options TTL NK_INTEGER */ - 405, /* (241) table_options ::= table_options SMA NK_LP col_name_list NK_RP */ - 405, /* (242) table_options ::= table_options DELETE_MARK duration_list */ - 410, /* (243) alter_table_options ::= alter_table_option */ - 410, /* (244) alter_table_options ::= alter_table_options alter_table_option */ - 423, /* (245) alter_table_option ::= COMMENT NK_STRING */ - 423, /* (246) alter_table_option ::= TTL NK_INTEGER */ - 421, /* (247) duration_list ::= duration_literal */ - 421, /* (248) duration_list ::= duration_list NK_COMMA duration_literal */ - 422, /* (249) rollup_func_list ::= rollup_func_name */ - 422, /* (250) rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ - 425, /* (251) rollup_func_name ::= function_name */ - 425, /* (252) rollup_func_name ::= FIRST */ - 425, /* (253) rollup_func_name ::= LAST */ - 418, /* (254) col_name_list ::= col_name */ - 418, /* (255) col_name_list ::= col_name_list NK_COMMA col_name */ - 427, /* (256) col_name ::= column_name */ - 367, /* (257) cmd ::= SHOW DNODES */ - 367, /* (258) cmd ::= SHOW USERS */ - 367, /* (259) cmd ::= SHOW USER PRIVILEGES */ - 367, /* (260) cmd ::= SHOW db_kind_opt DATABASES */ - 367, /* (261) cmd ::= SHOW table_kind_db_name_cond_opt TABLES like_pattern_opt */ - 367, /* (262) cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ - 367, /* (263) cmd ::= SHOW db_name_cond_opt VGROUPS */ - 367, /* (264) cmd ::= SHOW MNODES */ - 367, /* (265) cmd ::= SHOW QNODES */ - 367, /* (266) cmd ::= SHOW ARBGROUPS */ - 367, /* (267) cmd ::= SHOW FUNCTIONS */ - 367, /* (268) cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ - 367, /* (269) cmd ::= SHOW INDEXES FROM db_name NK_DOT table_name */ - 367, /* (270) cmd ::= SHOW STREAMS */ - 367, /* (271) cmd ::= SHOW ACCOUNTS */ - 367, /* (272) cmd ::= SHOW APPS */ - 367, /* (273) cmd ::= SHOW CONNECTIONS */ - 367, /* (274) cmd ::= SHOW LICENCES */ - 367, /* (275) cmd ::= SHOW GRANTS */ - 367, /* (276) cmd ::= SHOW GRANTS FULL */ - 367, /* (277) cmd ::= SHOW GRANTS LOGS */ - 367, /* (278) cmd ::= SHOW CLUSTER MACHINES */ - 367, /* (279) cmd ::= SHOW CREATE DATABASE db_name */ - 367, /* (280) cmd ::= SHOW CREATE TABLE full_table_name */ - 367, /* (281) cmd ::= SHOW CREATE STABLE full_table_name */ - 367, /* (282) cmd ::= SHOW QUERIES */ - 367, /* (283) cmd ::= SHOW SCORES */ - 367, /* (284) cmd ::= SHOW TOPICS */ - 367, /* (285) cmd ::= SHOW VARIABLES */ - 367, /* (286) cmd ::= SHOW CLUSTER VARIABLES */ - 367, /* (287) cmd ::= SHOW LOCAL VARIABLES */ - 367, /* (288) cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */ - 367, /* (289) cmd ::= SHOW BNODES */ - 367, /* (290) cmd ::= SHOW SNODES */ - 367, /* (291) cmd ::= SHOW CLUSTER */ - 367, /* (292) cmd ::= SHOW TRANSACTIONS */ - 367, /* (293) cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ - 367, /* (294) cmd ::= SHOW CONSUMERS */ - 367, /* (295) cmd ::= SHOW SUBSCRIPTIONS */ - 367, /* (296) cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ - 367, /* (297) cmd ::= SHOW TAGS FROM db_name NK_DOT table_name */ - 367, /* (298) cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ - 367, /* (299) cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name */ - 367, /* (300) cmd ::= SHOW VNODES ON DNODE NK_INTEGER */ - 367, /* (301) cmd ::= SHOW VNODES */ - 367, /* (302) cmd ::= SHOW db_name_cond_opt ALIVE */ - 367, /* (303) cmd ::= SHOW CLUSTER ALIVE */ - 367, /* (304) cmd ::= SHOW db_name_cond_opt VIEWS like_pattern_opt */ - 367, /* (305) cmd ::= SHOW CREATE VIEW full_table_name */ - 367, /* (306) cmd ::= SHOW COMPACTS */ - 367, /* (307) cmd ::= SHOW COMPACT NK_INTEGER */ - 429, /* (308) table_kind_db_name_cond_opt ::= */ - 429, /* (309) table_kind_db_name_cond_opt ::= table_kind */ - 429, /* (310) table_kind_db_name_cond_opt ::= db_name NK_DOT */ - 429, /* (311) table_kind_db_name_cond_opt ::= table_kind db_name NK_DOT */ - 435, /* (312) table_kind ::= NORMAL */ - 435, /* (313) table_kind ::= CHILD */ - 431, /* (314) db_name_cond_opt ::= */ - 431, /* (315) db_name_cond_opt ::= db_name NK_DOT */ - 430, /* (316) like_pattern_opt ::= */ - 430, /* (317) like_pattern_opt ::= LIKE NK_STRING */ - 432, /* (318) table_name_cond ::= table_name */ - 433, /* (319) from_db_opt ::= */ - 433, /* (320) from_db_opt ::= FROM db_name */ - 434, /* (321) tag_list_opt ::= */ - 434, /* (322) tag_list_opt ::= tag_item */ - 434, /* (323) tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ - 436, /* (324) tag_item ::= TBNAME */ - 436, /* (325) tag_item ::= QTAGS */ - 436, /* (326) tag_item ::= column_name */ - 436, /* (327) tag_item ::= column_name column_alias */ - 436, /* (328) tag_item ::= column_name AS column_alias */ - 428, /* (329) db_kind_opt ::= */ - 428, /* (330) db_kind_opt ::= USER */ - 428, /* (331) db_kind_opt ::= SYSTEM */ - 367, /* (332) cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options */ - 367, /* (333) cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP */ - 367, /* (334) cmd ::= DROP INDEX exists_opt full_index_name */ - 439, /* (335) full_index_name ::= index_name */ - 439, /* (336) full_index_name ::= db_name NK_DOT index_name */ - 438, /* (337) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ - 438, /* (338) 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 */ - 441, /* (339) func_list ::= func */ - 441, /* (340) func_list ::= func_list NK_COMMA func */ - 444, /* (341) func ::= sma_func_name NK_LP expression_list NK_RP */ - 445, /* (342) sma_func_name ::= function_name */ - 445, /* (343) sma_func_name ::= COUNT */ - 445, /* (344) sma_func_name ::= FIRST */ - 445, /* (345) sma_func_name ::= LAST */ - 445, /* (346) sma_func_name ::= LAST_ROW */ - 443, /* (347) sma_stream_opt ::= */ - 443, /* (348) sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ - 443, /* (349) sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ - 443, /* (350) sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ - 447, /* (351) with_meta ::= AS */ - 447, /* (352) with_meta ::= WITH META AS */ - 447, /* (353) with_meta ::= ONLY META AS */ - 367, /* (354) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ - 367, /* (355) cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name */ - 367, /* (356) cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt */ - 367, /* (357) cmd ::= DROP TOPIC exists_opt topic_name */ - 367, /* (358) cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ - 367, /* (359) cmd ::= DESC full_table_name */ - 367, /* (360) cmd ::= DESCRIBE full_table_name */ - 367, /* (361) cmd ::= RESET QUERY CACHE */ - 367, /* (362) cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ - 367, /* (363) cmd ::= EXPLAIN analyze_opt explain_options insert_query */ - 451, /* (364) analyze_opt ::= */ - 451, /* (365) analyze_opt ::= ANALYZE */ - 452, /* (366) explain_options ::= */ - 452, /* (367) explain_options ::= explain_options VERBOSE NK_BOOL */ - 452, /* (368) explain_options ::= explain_options RATIO NK_FLOAT */ - 367, /* (369) cmd ::= CREATE or_replace_opt agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt language_opt */ - 367, /* (370) cmd ::= DROP FUNCTION exists_opt function_name */ - 455, /* (371) agg_func_opt ::= */ - 455, /* (372) agg_func_opt ::= AGGREGATE */ - 456, /* (373) bufsize_opt ::= */ - 456, /* (374) bufsize_opt ::= BUFSIZE NK_INTEGER */ - 457, /* (375) language_opt ::= */ - 457, /* (376) language_opt ::= LANGUAGE NK_STRING */ - 454, /* (377) or_replace_opt ::= */ - 454, /* (378) or_replace_opt ::= OR REPLACE */ - 367, /* (379) cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery */ - 367, /* (380) cmd ::= DROP VIEW exists_opt full_view_name */ - 458, /* (381) full_view_name ::= view_name */ - 458, /* (382) full_view_name ::= db_name NK_DOT view_name */ - 367, /* (383) 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 */ - 367, /* (384) cmd ::= DROP STREAM exists_opt stream_name */ - 367, /* (385) cmd ::= PAUSE STREAM exists_opt stream_name */ - 367, /* (386) cmd ::= RESUME STREAM exists_opt ignore_opt stream_name */ - 462, /* (387) col_list_opt ::= */ - 462, /* (388) col_list_opt ::= NK_LP column_stream_def_list NK_RP */ - 466, /* (389) column_stream_def_list ::= column_stream_def */ - 466, /* (390) column_stream_def_list ::= column_stream_def_list NK_COMMA column_stream_def */ - 467, /* (391) column_stream_def ::= column_name */ - 467, /* (392) column_stream_def ::= column_name PRIMARY KEY */ - 463, /* (393) tag_def_or_ref_opt ::= */ - 463, /* (394) tag_def_or_ref_opt ::= tags_def */ - 463, /* (395) tag_def_or_ref_opt ::= TAGS NK_LP column_stream_def_list NK_RP */ - 461, /* (396) stream_options ::= */ - 461, /* (397) stream_options ::= stream_options TRIGGER AT_ONCE */ - 461, /* (398) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ - 461, /* (399) stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ - 461, /* (400) stream_options ::= stream_options WATERMARK duration_literal */ - 461, /* (401) stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ - 461, /* (402) stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ - 461, /* (403) stream_options ::= stream_options DELETE_MARK duration_literal */ - 461, /* (404) stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */ - 464, /* (405) subtable_opt ::= */ - 464, /* (406) subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ - 465, /* (407) ignore_opt ::= */ - 465, /* (408) ignore_opt ::= IGNORE UNTREATED */ - 367, /* (409) cmd ::= KILL CONNECTION NK_INTEGER */ - 367, /* (410) cmd ::= KILL QUERY NK_STRING */ - 367, /* (411) cmd ::= KILL TRANSACTION NK_INTEGER */ - 367, /* (412) cmd ::= KILL COMPACT NK_INTEGER */ - 367, /* (413) cmd ::= BALANCE VGROUP */ - 367, /* (414) cmd ::= BALANCE VGROUP LEADER on_vgroup_id */ - 367, /* (415) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ - 367, /* (416) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ - 367, /* (417) cmd ::= SPLIT VGROUP NK_INTEGER */ - 469, /* (418) on_vgroup_id ::= */ - 469, /* (419) on_vgroup_id ::= ON NK_INTEGER */ - 470, /* (420) dnode_list ::= DNODE NK_INTEGER */ - 470, /* (421) dnode_list ::= dnode_list DNODE NK_INTEGER */ - 367, /* (422) cmd ::= DELETE FROM full_table_name where_clause_opt */ - 367, /* (423) cmd ::= query_or_subquery */ - 367, /* (424) cmd ::= insert_query */ - 453, /* (425) insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ - 453, /* (426) insert_query ::= INSERT INTO full_table_name query_or_subquery */ - 413, /* (427) tags_literal ::= NK_INTEGER */ - 413, /* (428) tags_literal ::= NK_INTEGER NK_PLUS duration_literal */ - 413, /* (429) tags_literal ::= NK_INTEGER NK_MINUS duration_literal */ - 413, /* (430) tags_literal ::= NK_PLUS NK_INTEGER */ - 413, /* (431) tags_literal ::= NK_PLUS NK_INTEGER NK_PLUS duration_literal */ - 413, /* (432) tags_literal ::= NK_PLUS NK_INTEGER NK_MINUS duration_literal */ - 413, /* (433) tags_literal ::= NK_MINUS NK_INTEGER */ - 413, /* (434) tags_literal ::= NK_MINUS NK_INTEGER NK_PLUS duration_literal */ - 413, /* (435) tags_literal ::= NK_MINUS NK_INTEGER NK_MINUS duration_literal */ - 413, /* (436) tags_literal ::= NK_FLOAT */ - 413, /* (437) tags_literal ::= NK_PLUS NK_FLOAT */ - 413, /* (438) tags_literal ::= NK_MINUS NK_FLOAT */ - 413, /* (439) tags_literal ::= NK_BIN */ - 413, /* (440) tags_literal ::= NK_BIN NK_PLUS duration_literal */ - 413, /* (441) tags_literal ::= NK_BIN NK_MINUS duration_literal */ - 413, /* (442) tags_literal ::= NK_PLUS NK_BIN */ - 413, /* (443) tags_literal ::= NK_PLUS NK_BIN NK_PLUS duration_literal */ - 413, /* (444) tags_literal ::= NK_PLUS NK_BIN NK_MINUS duration_literal */ - 413, /* (445) tags_literal ::= NK_MINUS NK_BIN */ - 413, /* (446) tags_literal ::= NK_MINUS NK_BIN NK_PLUS duration_literal */ - 413, /* (447) tags_literal ::= NK_MINUS NK_BIN NK_MINUS duration_literal */ - 413, /* (448) tags_literal ::= NK_HEX */ - 413, /* (449) tags_literal ::= NK_HEX NK_PLUS duration_literal */ - 413, /* (450) tags_literal ::= NK_HEX NK_MINUS duration_literal */ - 413, /* (451) tags_literal ::= NK_PLUS NK_HEX */ - 413, /* (452) tags_literal ::= NK_PLUS NK_HEX NK_PLUS duration_literal */ - 413, /* (453) tags_literal ::= NK_PLUS NK_HEX NK_MINUS duration_literal */ - 413, /* (454) tags_literal ::= NK_MINUS NK_HEX */ - 413, /* (455) tags_literal ::= NK_MINUS NK_HEX NK_PLUS duration_literal */ - 413, /* (456) tags_literal ::= NK_MINUS NK_HEX NK_MINUS duration_literal */ - 413, /* (457) tags_literal ::= NK_STRING */ - 413, /* (458) tags_literal ::= NK_STRING NK_PLUS duration_literal */ - 413, /* (459) tags_literal ::= NK_STRING NK_MINUS duration_literal */ - 413, /* (460) tags_literal ::= NK_BOOL */ - 413, /* (461) tags_literal ::= NULL */ - 413, /* (462) tags_literal ::= literal_func */ - 413, /* (463) tags_literal ::= literal_func NK_PLUS duration_literal */ - 413, /* (464) tags_literal ::= literal_func NK_MINUS duration_literal */ - 416, /* (465) tags_literal_list ::= tags_literal */ - 416, /* (466) tags_literal_list ::= tags_literal_list NK_COMMA tags_literal */ - 370, /* (467) literal ::= NK_INTEGER */ - 370, /* (468) literal ::= NK_FLOAT */ - 370, /* (469) literal ::= NK_STRING */ - 370, /* (470) literal ::= NK_BOOL */ - 370, /* (471) literal ::= TIMESTAMP NK_STRING */ - 370, /* (472) literal ::= duration_literal */ - 370, /* (473) literal ::= NULL */ - 370, /* (474) literal ::= NK_QUESTION */ - 424, /* (475) duration_literal ::= NK_VARIABLE */ - 399, /* (476) signed ::= NK_INTEGER */ - 399, /* (477) signed ::= NK_PLUS NK_INTEGER */ - 399, /* (478) signed ::= NK_MINUS NK_INTEGER */ - 399, /* (479) signed ::= NK_FLOAT */ - 399, /* (480) signed ::= NK_PLUS NK_FLOAT */ - 399, /* (481) signed ::= NK_MINUS NK_FLOAT */ - 472, /* (482) signed_literal ::= signed */ - 472, /* (483) signed_literal ::= NK_STRING */ - 472, /* (484) signed_literal ::= NK_BOOL */ - 472, /* (485) signed_literal ::= TIMESTAMP NK_STRING */ - 472, /* (486) signed_literal ::= duration_literal */ - 472, /* (487) signed_literal ::= NULL */ - 472, /* (488) signed_literal ::= literal_func */ - 472, /* (489) signed_literal ::= NK_QUESTION */ - 473, /* (490) literal_list ::= signed_literal */ - 473, /* (491) literal_list ::= literal_list NK_COMMA signed_literal */ - 382, /* (492) db_name ::= NK_ID */ - 383, /* (493) table_name ::= NK_ID */ - 411, /* (494) column_name ::= NK_ID */ - 426, /* (495) function_name ::= NK_ID */ - 459, /* (496) view_name ::= NK_ID */ - 474, /* (497) table_alias ::= NK_ID */ - 437, /* (498) column_alias ::= NK_ID */ - 437, /* (499) column_alias ::= NK_ALIAS */ - 375, /* (500) user_name ::= NK_ID */ - 384, /* (501) topic_name ::= NK_ID */ - 460, /* (502) stream_name ::= NK_ID */ - 450, /* (503) cgroup_name ::= NK_ID */ - 440, /* (504) index_name ::= NK_ID */ - 475, /* (505) expr_or_subquery ::= expression */ - 468, /* (506) expression ::= literal */ - 468, /* (507) expression ::= pseudo_column */ - 468, /* (508) expression ::= column_reference */ - 468, /* (509) expression ::= function_expression */ - 468, /* (510) expression ::= case_when_expression */ - 468, /* (511) expression ::= NK_LP expression NK_RP */ - 468, /* (512) expression ::= NK_PLUS expr_or_subquery */ - 468, /* (513) expression ::= NK_MINUS expr_or_subquery */ - 468, /* (514) expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ - 468, /* (515) expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ - 468, /* (516) expression ::= expr_or_subquery NK_STAR expr_or_subquery */ - 468, /* (517) expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ - 468, /* (518) expression ::= expr_or_subquery NK_REM expr_or_subquery */ - 468, /* (519) expression ::= column_reference NK_ARROW NK_STRING */ - 468, /* (520) expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ - 468, /* (521) expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ - 446, /* (522) expression_list ::= expr_or_subquery */ - 446, /* (523) expression_list ::= expression_list NK_COMMA expr_or_subquery */ - 477, /* (524) column_reference ::= column_name */ - 477, /* (525) column_reference ::= table_name NK_DOT column_name */ - 477, /* (526) column_reference ::= NK_ALIAS */ - 477, /* (527) column_reference ::= table_name NK_DOT NK_ALIAS */ - 476, /* (528) pseudo_column ::= ROWTS */ - 476, /* (529) pseudo_column ::= TBNAME */ - 476, /* (530) pseudo_column ::= table_name NK_DOT TBNAME */ - 476, /* (531) pseudo_column ::= QSTART */ - 476, /* (532) pseudo_column ::= QEND */ - 476, /* (533) pseudo_column ::= QDURATION */ - 476, /* (534) pseudo_column ::= WSTART */ - 476, /* (535) pseudo_column ::= WEND */ - 476, /* (536) pseudo_column ::= WDURATION */ - 476, /* (537) pseudo_column ::= IROWTS */ - 476, /* (538) pseudo_column ::= ISFILLED */ - 476, /* (539) pseudo_column ::= QTAGS */ - 478, /* (540) function_expression ::= function_name NK_LP expression_list NK_RP */ - 478, /* (541) function_expression ::= star_func NK_LP star_func_para_list NK_RP */ - 478, /* (542) function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ - 478, /* (543) function_expression ::= CAST NK_LP expr_or_subquery AS type_name_default_len NK_RP */ - 478, /* (544) function_expression ::= literal_func */ - 471, /* (545) literal_func ::= noarg_func NK_LP NK_RP */ - 471, /* (546) literal_func ::= NOW */ - 471, /* (547) literal_func ::= TODAY */ - 482, /* (548) noarg_func ::= NOW */ - 482, /* (549) noarg_func ::= TODAY */ - 482, /* (550) noarg_func ::= TIMEZONE */ - 482, /* (551) noarg_func ::= DATABASE */ - 482, /* (552) noarg_func ::= CLIENT_VERSION */ - 482, /* (553) noarg_func ::= SERVER_VERSION */ - 482, /* (554) noarg_func ::= SERVER_STATUS */ - 482, /* (555) noarg_func ::= CURRENT_USER */ - 482, /* (556) noarg_func ::= USER */ - 480, /* (557) star_func ::= COUNT */ - 480, /* (558) star_func ::= FIRST */ - 480, /* (559) star_func ::= LAST */ - 480, /* (560) star_func ::= LAST_ROW */ - 481, /* (561) star_func_para_list ::= NK_STAR */ - 481, /* (562) star_func_para_list ::= other_para_list */ - 483, /* (563) other_para_list ::= star_func_para */ - 483, /* (564) other_para_list ::= other_para_list NK_COMMA star_func_para */ - 484, /* (565) star_func_para ::= expr_or_subquery */ - 484, /* (566) star_func_para ::= table_name NK_DOT NK_STAR */ - 479, /* (567) case_when_expression ::= CASE when_then_list case_when_else_opt END */ - 479, /* (568) case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ - 485, /* (569) when_then_list ::= when_then_expr */ - 485, /* (570) when_then_list ::= when_then_list when_then_expr */ - 488, /* (571) when_then_expr ::= WHEN common_expression THEN common_expression */ - 486, /* (572) case_when_else_opt ::= */ - 486, /* (573) case_when_else_opt ::= ELSE common_expression */ - 489, /* (574) predicate ::= expr_or_subquery compare_op expr_or_subquery */ - 489, /* (575) predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ - 489, /* (576) predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ - 489, /* (577) predicate ::= expr_or_subquery IS NULL */ - 489, /* (578) predicate ::= expr_or_subquery IS NOT NULL */ - 489, /* (579) predicate ::= expr_or_subquery in_op in_predicate_value */ - 490, /* (580) compare_op ::= NK_LT */ - 490, /* (581) compare_op ::= NK_GT */ - 490, /* (582) compare_op ::= NK_LE */ - 490, /* (583) compare_op ::= NK_GE */ - 490, /* (584) compare_op ::= NK_NE */ - 490, /* (585) compare_op ::= NK_EQ */ - 490, /* (586) compare_op ::= LIKE */ - 490, /* (587) compare_op ::= NOT LIKE */ - 490, /* (588) compare_op ::= MATCH */ - 490, /* (589) compare_op ::= NMATCH */ - 490, /* (590) compare_op ::= CONTAINS */ - 491, /* (591) in_op ::= IN */ - 491, /* (592) in_op ::= NOT IN */ - 492, /* (593) in_predicate_value ::= NK_LP literal_list NK_RP */ - 493, /* (594) boolean_value_expression ::= boolean_primary */ - 493, /* (595) boolean_value_expression ::= NOT boolean_primary */ - 493, /* (596) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ - 493, /* (597) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ - 494, /* (598) boolean_primary ::= predicate */ - 494, /* (599) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ - 487, /* (600) common_expression ::= expr_or_subquery */ - 487, /* (601) common_expression ::= boolean_value_expression */ - 495, /* (602) from_clause_opt ::= */ - 495, /* (603) from_clause_opt ::= FROM table_reference_list */ - 496, /* (604) table_reference_list ::= table_reference */ - 496, /* (605) table_reference_list ::= table_reference_list NK_COMMA table_reference */ - 497, /* (606) table_reference ::= table_primary */ - 497, /* (607) table_reference ::= joined_table */ - 498, /* (608) table_primary ::= table_name alias_opt */ - 498, /* (609) table_primary ::= db_name NK_DOT table_name alias_opt */ - 498, /* (610) table_primary ::= subquery alias_opt */ - 498, /* (611) table_primary ::= parenthesized_joined_table */ - 500, /* (612) alias_opt ::= */ - 500, /* (613) alias_opt ::= table_alias */ - 500, /* (614) alias_opt ::= AS table_alias */ - 502, /* (615) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ - 502, /* (616) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ - 499, /* (617) joined_table ::= table_reference join_type join_subtype JOIN table_reference join_on_clause_opt window_offset_clause_opt jlimit_clause_opt */ - 503, /* (618) join_type ::= */ - 503, /* (619) join_type ::= INNER */ - 503, /* (620) join_type ::= LEFT */ - 503, /* (621) join_type ::= RIGHT */ - 503, /* (622) join_type ::= FULL */ - 504, /* (623) join_subtype ::= */ - 504, /* (624) join_subtype ::= OUTER */ - 504, /* (625) join_subtype ::= SEMI */ - 504, /* (626) join_subtype ::= ANTI */ - 504, /* (627) join_subtype ::= ASOF */ - 504, /* (628) join_subtype ::= WINDOW */ - 505, /* (629) join_on_clause_opt ::= */ - 505, /* (630) join_on_clause_opt ::= ON search_condition */ - 506, /* (631) window_offset_clause_opt ::= */ - 506, /* (632) window_offset_clause_opt ::= WINDOW_OFFSET NK_LP window_offset_literal NK_COMMA window_offset_literal NK_RP */ - 508, /* (633) window_offset_literal ::= NK_VARIABLE */ - 508, /* (634) window_offset_literal ::= NK_MINUS NK_VARIABLE */ - 507, /* (635) jlimit_clause_opt ::= */ - 507, /* (636) jlimit_clause_opt ::= JLIMIT NK_INTEGER */ - 509, /* (637) 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 */ - 510, /* (638) hint_list ::= */ - 510, /* (639) hint_list ::= NK_HINT */ - 512, /* (640) tag_mode_opt ::= */ - 512, /* (641) tag_mode_opt ::= TAGS */ - 511, /* (642) set_quantifier_opt ::= */ - 511, /* (643) set_quantifier_opt ::= DISTINCT */ - 511, /* (644) set_quantifier_opt ::= ALL */ - 513, /* (645) select_list ::= select_item */ - 513, /* (646) select_list ::= select_list NK_COMMA select_item */ - 521, /* (647) select_item ::= NK_STAR */ - 521, /* (648) select_item ::= common_expression */ - 521, /* (649) select_item ::= common_expression column_alias */ - 521, /* (650) select_item ::= common_expression AS column_alias */ - 521, /* (651) select_item ::= table_name NK_DOT NK_STAR */ - 449, /* (652) where_clause_opt ::= */ - 449, /* (653) where_clause_opt ::= WHERE search_condition */ - 514, /* (654) partition_by_clause_opt ::= */ - 514, /* (655) partition_by_clause_opt ::= PARTITION BY partition_list */ - 522, /* (656) partition_list ::= partition_item */ - 522, /* (657) partition_list ::= partition_list NK_COMMA partition_item */ - 523, /* (658) partition_item ::= expr_or_subquery */ - 523, /* (659) partition_item ::= expr_or_subquery column_alias */ - 523, /* (660) partition_item ::= expr_or_subquery AS column_alias */ - 518, /* (661) twindow_clause_opt ::= */ - 518, /* (662) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP */ - 518, /* (663) twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ - 518, /* (664) twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ - 518, /* (665) twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_COMMA interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ - 518, /* (666) twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ - 518, /* (667) twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_RP */ - 518, /* (668) twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ - 442, /* (669) sliding_opt ::= */ - 442, /* (670) sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP */ - 524, /* (671) interval_sliding_duration_literal ::= NK_VARIABLE */ - 524, /* (672) interval_sliding_duration_literal ::= NK_STRING */ - 524, /* (673) interval_sliding_duration_literal ::= NK_INTEGER */ - 517, /* (674) fill_opt ::= */ - 517, /* (675) fill_opt ::= FILL NK_LP fill_mode NK_RP */ - 517, /* (676) fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP */ - 517, /* (677) fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP */ - 525, /* (678) fill_mode ::= NONE */ - 525, /* (679) fill_mode ::= PREV */ - 525, /* (680) fill_mode ::= NULL */ - 525, /* (681) fill_mode ::= NULL_F */ - 525, /* (682) fill_mode ::= LINEAR */ - 525, /* (683) fill_mode ::= NEXT */ - 519, /* (684) group_by_clause_opt ::= */ - 519, /* (685) group_by_clause_opt ::= GROUP BY group_by_list */ - 526, /* (686) group_by_list ::= expr_or_subquery */ - 526, /* (687) group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ - 520, /* (688) having_clause_opt ::= */ - 520, /* (689) having_clause_opt ::= HAVING search_condition */ - 515, /* (690) range_opt ::= */ - 515, /* (691) range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ - 515, /* (692) range_opt ::= RANGE NK_LP expr_or_subquery NK_RP */ - 516, /* (693) every_opt ::= */ - 516, /* (694) every_opt ::= EVERY NK_LP duration_literal NK_RP */ - 527, /* (695) query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ - 528, /* (696) query_simple ::= query_specification */ - 528, /* (697) query_simple ::= union_query_expression */ - 532, /* (698) union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ - 532, /* (699) union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ - 533, /* (700) query_simple_or_subquery ::= query_simple */ - 533, /* (701) query_simple_or_subquery ::= subquery */ - 448, /* (702) query_or_subquery ::= query_expression */ - 448, /* (703) query_or_subquery ::= subquery */ - 529, /* (704) order_by_clause_opt ::= */ - 529, /* (705) order_by_clause_opt ::= ORDER BY sort_specification_list */ - 530, /* (706) slimit_clause_opt ::= */ - 530, /* (707) slimit_clause_opt ::= SLIMIT NK_INTEGER */ - 530, /* (708) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ - 530, /* (709) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - 531, /* (710) limit_clause_opt ::= */ - 531, /* (711) limit_clause_opt ::= LIMIT NK_INTEGER */ - 531, /* (712) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ - 531, /* (713) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - 501, /* (714) subquery ::= NK_LP query_expression NK_RP */ - 501, /* (715) subquery ::= NK_LP subquery NK_RP */ - 385, /* (716) search_condition ::= common_expression */ - 534, /* (717) sort_specification_list ::= sort_specification */ - 534, /* (718) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ - 535, /* (719) sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ - 536, /* (720) ordering_specification_opt ::= */ - 536, /* (721) ordering_specification_opt ::= ASC */ - 536, /* (722) ordering_specification_opt ::= DESC */ - 537, /* (723) null_ordering_opt ::= */ - 537, /* (724) null_ordering_opt ::= NULLS FIRST */ - 537, /* (725) null_ordering_opt ::= NULLS LAST */ + 369, /* (0) cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */ + 369, /* (1) cmd ::= ALTER ACCOUNT NK_ID alter_account_options */ + 370, /* (2) account_options ::= */ + 370, /* (3) account_options ::= account_options PPS literal */ + 370, /* (4) account_options ::= account_options TSERIES literal */ + 370, /* (5) account_options ::= account_options STORAGE literal */ + 370, /* (6) account_options ::= account_options STREAMS literal */ + 370, /* (7) account_options ::= account_options QTIME literal */ + 370, /* (8) account_options ::= account_options DBS literal */ + 370, /* (9) account_options ::= account_options USERS literal */ + 370, /* (10) account_options ::= account_options CONNS literal */ + 370, /* (11) account_options ::= account_options STATE literal */ + 371, /* (12) alter_account_options ::= alter_account_option */ + 371, /* (13) alter_account_options ::= alter_account_options alter_account_option */ + 373, /* (14) alter_account_option ::= PASS literal */ + 373, /* (15) alter_account_option ::= PPS literal */ + 373, /* (16) alter_account_option ::= TSERIES literal */ + 373, /* (17) alter_account_option ::= STORAGE literal */ + 373, /* (18) alter_account_option ::= STREAMS literal */ + 373, /* (19) alter_account_option ::= QTIME literal */ + 373, /* (20) alter_account_option ::= DBS literal */ + 373, /* (21) alter_account_option ::= USERS literal */ + 373, /* (22) alter_account_option ::= CONNS literal */ + 373, /* (23) alter_account_option ::= STATE literal */ + 374, /* (24) ip_range_list ::= NK_STRING */ + 374, /* (25) ip_range_list ::= ip_range_list NK_COMMA NK_STRING */ + 375, /* (26) white_list ::= HOST ip_range_list */ + 376, /* (27) white_list_opt ::= */ + 376, /* (28) white_list_opt ::= white_list */ + 369, /* (29) cmd ::= CREATE USER user_name PASS NK_STRING sysinfo_opt white_list_opt */ + 369, /* (30) cmd ::= ALTER USER user_name PASS NK_STRING */ + 369, /* (31) cmd ::= ALTER USER user_name ENABLE NK_INTEGER */ + 369, /* (32) cmd ::= ALTER USER user_name SYSINFO NK_INTEGER */ + 369, /* (33) cmd ::= ALTER USER user_name ADD white_list */ + 369, /* (34) cmd ::= ALTER USER user_name DROP white_list */ + 369, /* (35) cmd ::= DROP USER user_name */ + 378, /* (36) sysinfo_opt ::= */ + 378, /* (37) sysinfo_opt ::= SYSINFO NK_INTEGER */ + 369, /* (38) cmd ::= GRANT privileges ON priv_level with_opt TO user_name */ + 369, /* (39) cmd ::= REVOKE privileges ON priv_level with_opt FROM user_name */ + 379, /* (40) privileges ::= ALL */ + 379, /* (41) privileges ::= priv_type_list */ + 379, /* (42) privileges ::= SUBSCRIBE */ + 382, /* (43) priv_type_list ::= priv_type */ + 382, /* (44) priv_type_list ::= priv_type_list NK_COMMA priv_type */ + 383, /* (45) priv_type ::= READ */ + 383, /* (46) priv_type ::= WRITE */ + 383, /* (47) priv_type ::= ALTER */ + 380, /* (48) priv_level ::= NK_STAR NK_DOT NK_STAR */ + 380, /* (49) priv_level ::= db_name NK_DOT NK_STAR */ + 380, /* (50) priv_level ::= db_name NK_DOT table_name */ + 380, /* (51) priv_level ::= topic_name */ + 381, /* (52) with_opt ::= */ + 381, /* (53) with_opt ::= WITH search_condition */ + 369, /* (54) cmd ::= CREATE DNODE dnode_endpoint */ + 369, /* (55) cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */ + 369, /* (56) cmd ::= DROP DNODE NK_INTEGER force_opt */ + 369, /* (57) cmd ::= DROP DNODE dnode_endpoint force_opt */ + 369, /* (58) cmd ::= DROP DNODE NK_INTEGER unsafe_opt */ + 369, /* (59) cmd ::= DROP DNODE dnode_endpoint unsafe_opt */ + 369, /* (60) cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ + 369, /* (61) cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */ + 369, /* (62) cmd ::= ALTER ALL DNODES NK_STRING */ + 369, /* (63) cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */ + 369, /* (64) cmd ::= RESTORE DNODE NK_INTEGER */ + 388, /* (65) dnode_endpoint ::= NK_STRING */ + 388, /* (66) dnode_endpoint ::= NK_ID */ + 388, /* (67) dnode_endpoint ::= NK_IPTOKEN */ + 389, /* (68) force_opt ::= */ + 389, /* (69) force_opt ::= FORCE */ + 390, /* (70) unsafe_opt ::= UNSAFE */ + 369, /* (71) cmd ::= ALTER CLUSTER NK_STRING */ + 369, /* (72) cmd ::= ALTER CLUSTER NK_STRING NK_STRING */ + 369, /* (73) cmd ::= ALTER LOCAL NK_STRING */ + 369, /* (74) cmd ::= ALTER LOCAL NK_STRING NK_STRING */ + 369, /* (75) cmd ::= CREATE QNODE ON DNODE NK_INTEGER */ + 369, /* (76) cmd ::= DROP QNODE ON DNODE NK_INTEGER */ + 369, /* (77) cmd ::= RESTORE QNODE ON DNODE NK_INTEGER */ + 369, /* (78) cmd ::= CREATE BNODE ON DNODE NK_INTEGER */ + 369, /* (79) cmd ::= DROP BNODE ON DNODE NK_INTEGER */ + 369, /* (80) cmd ::= CREATE SNODE ON DNODE NK_INTEGER */ + 369, /* (81) cmd ::= DROP SNODE ON DNODE NK_INTEGER */ + 369, /* (82) cmd ::= CREATE MNODE ON DNODE NK_INTEGER */ + 369, /* (83) cmd ::= DROP MNODE ON DNODE NK_INTEGER */ + 369, /* (84) cmd ::= RESTORE MNODE ON DNODE NK_INTEGER */ + 369, /* (85) cmd ::= RESTORE VNODE ON DNODE NK_INTEGER */ + 369, /* (86) cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ + 369, /* (87) cmd ::= DROP DATABASE exists_opt db_name */ + 369, /* (88) cmd ::= USE db_name */ + 369, /* (89) cmd ::= ALTER DATABASE db_name alter_db_options */ + 369, /* (90) cmd ::= FLUSH DATABASE db_name */ + 369, /* (91) cmd ::= TRIM DATABASE db_name speed_opt */ + 369, /* (92) cmd ::= S3MIGRATE DATABASE db_name */ + 369, /* (93) cmd ::= COMPACT DATABASE db_name start_opt end_opt */ + 391, /* (94) not_exists_opt ::= IF NOT EXISTS */ + 391, /* (95) not_exists_opt ::= */ + 393, /* (96) exists_opt ::= IF EXISTS */ + 393, /* (97) exists_opt ::= */ + 392, /* (98) db_options ::= */ + 392, /* (99) db_options ::= db_options BUFFER NK_INTEGER */ + 392, /* (100) db_options ::= db_options CACHEMODEL NK_STRING */ + 392, /* (101) db_options ::= db_options CACHESIZE NK_INTEGER */ + 392, /* (102) db_options ::= db_options COMP NK_INTEGER */ + 392, /* (103) db_options ::= db_options DURATION NK_INTEGER */ + 392, /* (104) db_options ::= db_options DURATION NK_VARIABLE */ + 392, /* (105) db_options ::= db_options MAXROWS NK_INTEGER */ + 392, /* (106) db_options ::= db_options MINROWS NK_INTEGER */ + 392, /* (107) db_options ::= db_options KEEP integer_list */ + 392, /* (108) db_options ::= db_options KEEP variable_list */ + 392, /* (109) db_options ::= db_options PAGES NK_INTEGER */ + 392, /* (110) db_options ::= db_options PAGESIZE NK_INTEGER */ + 392, /* (111) db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */ + 392, /* (112) db_options ::= db_options PRECISION NK_STRING */ + 392, /* (113) db_options ::= db_options REPLICA NK_INTEGER */ + 392, /* (114) db_options ::= db_options VGROUPS NK_INTEGER */ + 392, /* (115) db_options ::= db_options SINGLE_STABLE NK_INTEGER */ + 392, /* (116) db_options ::= db_options RETENTIONS retention_list */ + 392, /* (117) db_options ::= db_options SCHEMALESS NK_INTEGER */ + 392, /* (118) db_options ::= db_options WAL_LEVEL NK_INTEGER */ + 392, /* (119) db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */ + 392, /* (120) db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */ + 392, /* (121) db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ + 392, /* (122) db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */ + 392, /* (123) db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ + 392, /* (124) db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */ + 392, /* (125) db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */ + 392, /* (126) db_options ::= db_options STT_TRIGGER NK_INTEGER */ + 392, /* (127) db_options ::= db_options TABLE_PREFIX signed */ + 392, /* (128) db_options ::= db_options TABLE_SUFFIX signed */ + 392, /* (129) db_options ::= db_options S3_CHUNKSIZE NK_INTEGER */ + 392, /* (130) db_options ::= db_options S3_KEEPLOCAL NK_INTEGER */ + 392, /* (131) db_options ::= db_options S3_KEEPLOCAL NK_VARIABLE */ + 392, /* (132) db_options ::= db_options S3_COMPACT NK_INTEGER */ + 392, /* (133) db_options ::= db_options KEEP_TIME_OFFSET NK_INTEGER */ + 394, /* (134) alter_db_options ::= alter_db_option */ + 394, /* (135) alter_db_options ::= alter_db_options alter_db_option */ + 402, /* (136) alter_db_option ::= BUFFER NK_INTEGER */ + 402, /* (137) alter_db_option ::= CACHEMODEL NK_STRING */ + 402, /* (138) alter_db_option ::= CACHESIZE NK_INTEGER */ + 402, /* (139) alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */ + 402, /* (140) alter_db_option ::= KEEP integer_list */ + 402, /* (141) alter_db_option ::= KEEP variable_list */ + 402, /* (142) alter_db_option ::= PAGES NK_INTEGER */ + 402, /* (143) alter_db_option ::= REPLICA NK_INTEGER */ + 402, /* (144) alter_db_option ::= WAL_LEVEL NK_INTEGER */ + 402, /* (145) alter_db_option ::= STT_TRIGGER NK_INTEGER */ + 402, /* (146) alter_db_option ::= MINROWS NK_INTEGER */ + 402, /* (147) alter_db_option ::= WAL_RETENTION_PERIOD NK_INTEGER */ + 402, /* (148) alter_db_option ::= WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ + 402, /* (149) alter_db_option ::= WAL_RETENTION_SIZE NK_INTEGER */ + 402, /* (150) alter_db_option ::= WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ + 402, /* (151) alter_db_option ::= S3_KEEPLOCAL NK_INTEGER */ + 402, /* (152) alter_db_option ::= S3_KEEPLOCAL NK_VARIABLE */ + 402, /* (153) alter_db_option ::= S3_COMPACT NK_INTEGER */ + 402, /* (154) alter_db_option ::= KEEP_TIME_OFFSET NK_INTEGER */ + 398, /* (155) integer_list ::= NK_INTEGER */ + 398, /* (156) integer_list ::= integer_list NK_COMMA NK_INTEGER */ + 399, /* (157) variable_list ::= NK_VARIABLE */ + 399, /* (158) variable_list ::= variable_list NK_COMMA NK_VARIABLE */ + 400, /* (159) retention_list ::= retention */ + 400, /* (160) retention_list ::= retention_list NK_COMMA retention */ + 403, /* (161) retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ + 403, /* (162) retention ::= NK_MINUS NK_COLON NK_VARIABLE */ + 395, /* (163) speed_opt ::= */ + 395, /* (164) speed_opt ::= BWLIMIT NK_INTEGER */ + 396, /* (165) start_opt ::= */ + 396, /* (166) start_opt ::= START WITH NK_INTEGER */ + 396, /* (167) start_opt ::= START WITH NK_STRING */ + 396, /* (168) start_opt ::= START WITH TIMESTAMP NK_STRING */ + 397, /* (169) end_opt ::= */ + 397, /* (170) end_opt ::= END WITH NK_INTEGER */ + 397, /* (171) end_opt ::= END WITH NK_STRING */ + 397, /* (172) end_opt ::= END WITH TIMESTAMP NK_STRING */ + 369, /* (173) cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ + 369, /* (174) cmd ::= CREATE TABLE multi_create_clause */ + 369, /* (175) cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ + 369, /* (176) cmd ::= DROP TABLE multi_drop_clause */ + 369, /* (177) cmd ::= DROP STABLE exists_opt full_table_name */ + 369, /* (178) cmd ::= ALTER TABLE alter_table_clause */ + 369, /* (179) cmd ::= ALTER STABLE alter_table_clause */ + 411, /* (180) alter_table_clause ::= full_table_name alter_table_options */ + 411, /* (181) alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ + 411, /* (182) alter_table_clause ::= full_table_name DROP COLUMN column_name */ + 411, /* (183) alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ + 411, /* (184) alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ + 411, /* (185) alter_table_clause ::= full_table_name ADD TAG column_name type_name */ + 411, /* (186) alter_table_clause ::= full_table_name DROP TAG column_name */ + 411, /* (187) alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ + 411, /* (188) alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ + 411, /* (189) alter_table_clause ::= full_table_name SET TAG column_name NK_EQ tags_literal */ + 408, /* (190) multi_create_clause ::= create_subtable_clause */ + 408, /* (191) multi_create_clause ::= multi_create_clause create_subtable_clause */ + 416, /* (192) 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 */ + 410, /* (193) multi_drop_clause ::= drop_table_clause */ + 410, /* (194) multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause */ + 419, /* (195) drop_table_clause ::= exists_opt full_table_name */ + 417, /* (196) specific_cols_opt ::= */ + 417, /* (197) specific_cols_opt ::= NK_LP col_name_list NK_RP */ + 404, /* (198) full_table_name ::= table_name */ + 404, /* (199) full_table_name ::= db_name NK_DOT table_name */ + 405, /* (200) column_def_list ::= column_def */ + 405, /* (201) column_def_list ::= column_def_list NK_COMMA column_def */ + 421, /* (202) column_def ::= column_name type_name */ + 421, /* (203) column_def ::= column_name type_name PRIMARY KEY */ + 414, /* (204) type_name ::= BOOL */ + 414, /* (205) type_name ::= TINYINT */ + 414, /* (206) type_name ::= SMALLINT */ + 414, /* (207) type_name ::= INT */ + 414, /* (208) type_name ::= INTEGER */ + 414, /* (209) type_name ::= BIGINT */ + 414, /* (210) type_name ::= FLOAT */ + 414, /* (211) type_name ::= DOUBLE */ + 414, /* (212) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ + 414, /* (213) type_name ::= TIMESTAMP */ + 414, /* (214) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ + 414, /* (215) type_name ::= TINYINT UNSIGNED */ + 414, /* (216) type_name ::= SMALLINT UNSIGNED */ + 414, /* (217) type_name ::= INT UNSIGNED */ + 414, /* (218) type_name ::= BIGINT UNSIGNED */ + 414, /* (219) type_name ::= JSON */ + 414, /* (220) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ + 414, /* (221) type_name ::= MEDIUMBLOB */ + 414, /* (222) type_name ::= BLOB */ + 414, /* (223) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ + 414, /* (224) type_name ::= GEOMETRY NK_LP NK_INTEGER NK_RP */ + 414, /* (225) type_name ::= DECIMAL */ + 414, /* (226) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ + 414, /* (227) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ + 422, /* (228) type_name_default_len ::= BINARY */ + 422, /* (229) type_name_default_len ::= NCHAR */ + 422, /* (230) type_name_default_len ::= VARCHAR */ + 422, /* (231) type_name_default_len ::= VARBINARY */ + 406, /* (232) tags_def_opt ::= */ + 406, /* (233) tags_def_opt ::= tags_def */ + 409, /* (234) tags_def ::= TAGS NK_LP column_def_list NK_RP */ + 407, /* (235) table_options ::= */ + 407, /* (236) table_options ::= table_options COMMENT NK_STRING */ + 407, /* (237) table_options ::= table_options MAX_DELAY duration_list */ + 407, /* (238) table_options ::= table_options WATERMARK duration_list */ + 407, /* (239) table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ + 407, /* (240) table_options ::= table_options TTL NK_INTEGER */ + 407, /* (241) table_options ::= table_options SMA NK_LP col_name_list NK_RP */ + 407, /* (242) table_options ::= table_options DELETE_MARK duration_list */ + 412, /* (243) alter_table_options ::= alter_table_option */ + 412, /* (244) alter_table_options ::= alter_table_options alter_table_option */ + 425, /* (245) alter_table_option ::= COMMENT NK_STRING */ + 425, /* (246) alter_table_option ::= TTL NK_INTEGER */ + 423, /* (247) duration_list ::= duration_literal */ + 423, /* (248) duration_list ::= duration_list NK_COMMA duration_literal */ + 424, /* (249) rollup_func_list ::= rollup_func_name */ + 424, /* (250) rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ + 427, /* (251) rollup_func_name ::= function_name */ + 427, /* (252) rollup_func_name ::= FIRST */ + 427, /* (253) rollup_func_name ::= LAST */ + 420, /* (254) col_name_list ::= col_name */ + 420, /* (255) col_name_list ::= col_name_list NK_COMMA col_name */ + 429, /* (256) col_name ::= column_name */ + 369, /* (257) cmd ::= SHOW DNODES */ + 369, /* (258) cmd ::= SHOW USERS */ + 369, /* (259) cmd ::= SHOW USER PRIVILEGES */ + 369, /* (260) cmd ::= SHOW db_kind_opt DATABASES */ + 369, /* (261) cmd ::= SHOW table_kind_db_name_cond_opt TABLES like_pattern_opt */ + 369, /* (262) cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ + 369, /* (263) cmd ::= SHOW db_name_cond_opt VGROUPS */ + 369, /* (264) cmd ::= SHOW MNODES */ + 369, /* (265) cmd ::= SHOW QNODES */ + 369, /* (266) cmd ::= SHOW ARBGROUPS */ + 369, /* (267) cmd ::= SHOW FUNCTIONS */ + 369, /* (268) cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ + 369, /* (269) cmd ::= SHOW INDEXES FROM db_name NK_DOT table_name */ + 369, /* (270) cmd ::= SHOW STREAMS */ + 369, /* (271) cmd ::= SHOW ACCOUNTS */ + 369, /* (272) cmd ::= SHOW APPS */ + 369, /* (273) cmd ::= SHOW CONNECTIONS */ + 369, /* (274) cmd ::= SHOW LICENCES */ + 369, /* (275) cmd ::= SHOW GRANTS */ + 369, /* (276) cmd ::= SHOW GRANTS FULL */ + 369, /* (277) cmd ::= SHOW GRANTS LOGS */ + 369, /* (278) cmd ::= SHOW CLUSTER MACHINES */ + 369, /* (279) cmd ::= SHOW CREATE DATABASE db_name */ + 369, /* (280) cmd ::= SHOW CREATE TABLE full_table_name */ + 369, /* (281) cmd ::= SHOW CREATE STABLE full_table_name */ + 369, /* (282) cmd ::= SHOW QUERIES */ + 369, /* (283) cmd ::= SHOW SCORES */ + 369, /* (284) cmd ::= SHOW TOPICS */ + 369, /* (285) cmd ::= SHOW VARIABLES */ + 369, /* (286) cmd ::= SHOW CLUSTER VARIABLES */ + 369, /* (287) cmd ::= SHOW LOCAL VARIABLES */ + 369, /* (288) cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */ + 369, /* (289) cmd ::= SHOW BNODES */ + 369, /* (290) cmd ::= SHOW SNODES */ + 369, /* (291) cmd ::= SHOW CLUSTER */ + 369, /* (292) cmd ::= SHOW TRANSACTIONS */ + 369, /* (293) cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ + 369, /* (294) cmd ::= SHOW CONSUMERS */ + 369, /* (295) cmd ::= SHOW SUBSCRIPTIONS */ + 369, /* (296) cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ + 369, /* (297) cmd ::= SHOW TAGS FROM db_name NK_DOT table_name */ + 369, /* (298) cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ + 369, /* (299) cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name */ + 369, /* (300) cmd ::= SHOW VNODES ON DNODE NK_INTEGER */ + 369, /* (301) cmd ::= SHOW VNODES */ + 369, /* (302) cmd ::= SHOW db_name_cond_opt ALIVE */ + 369, /* (303) cmd ::= SHOW CLUSTER ALIVE */ + 369, /* (304) cmd ::= SHOW db_name_cond_opt VIEWS like_pattern_opt */ + 369, /* (305) cmd ::= SHOW CREATE VIEW full_table_name */ + 369, /* (306) cmd ::= SHOW COMPACTS */ + 369, /* (307) cmd ::= SHOW COMPACT NK_INTEGER */ + 431, /* (308) table_kind_db_name_cond_opt ::= */ + 431, /* (309) table_kind_db_name_cond_opt ::= table_kind */ + 431, /* (310) table_kind_db_name_cond_opt ::= db_name NK_DOT */ + 431, /* (311) table_kind_db_name_cond_opt ::= table_kind db_name NK_DOT */ + 437, /* (312) table_kind ::= NORMAL */ + 437, /* (313) table_kind ::= CHILD */ + 433, /* (314) db_name_cond_opt ::= */ + 433, /* (315) db_name_cond_opt ::= db_name NK_DOT */ + 432, /* (316) like_pattern_opt ::= */ + 432, /* (317) like_pattern_opt ::= LIKE NK_STRING */ + 434, /* (318) table_name_cond ::= table_name */ + 435, /* (319) from_db_opt ::= */ + 435, /* (320) from_db_opt ::= FROM db_name */ + 436, /* (321) tag_list_opt ::= */ + 436, /* (322) tag_list_opt ::= tag_item */ + 436, /* (323) tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ + 438, /* (324) tag_item ::= TBNAME */ + 438, /* (325) tag_item ::= QTAGS */ + 438, /* (326) tag_item ::= column_name */ + 438, /* (327) tag_item ::= column_name column_alias */ + 438, /* (328) tag_item ::= column_name AS column_alias */ + 430, /* (329) db_kind_opt ::= */ + 430, /* (330) db_kind_opt ::= USER */ + 430, /* (331) db_kind_opt ::= SYSTEM */ + 369, /* (332) cmd ::= CREATE TSMA not_exists_opt tsma_name ON full_table_name tsma_opt INTERVAL NK_LP duration_literal NK_RP */ + 369, /* (333) cmd ::= DROP TSMA exists_opt full_tsma_name */ + 369, /* (334) cmd ::= SHOW CREATE TSMA full_tsma_name */ + 369, /* (335) cmd ::= SHOW db_name_cond_opt TSMAS */ + 442, /* (336) full_tsma_name ::= tsma_name */ + 442, /* (337) full_tsma_name ::= db_name NK_DOT tsma_name */ + 441, /* (338) tsma_opt ::= */ + 441, /* (339) tsma_opt ::= FUNCTION NK_LP tsma_func_list NK_RP COLUMN NK_LP col_name_list NK_RP */ + 443, /* (340) tsma_func_list ::= tsma_func_name */ + 443, /* (341) tsma_func_list ::= tsma_func_list NK_COMMA tsma_func_name */ + 444, /* (342) tsma_func_name ::= sma_func_name */ + 369, /* (343) cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options */ + 369, /* (344) cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP */ + 369, /* (345) cmd ::= DROP INDEX exists_opt full_index_name */ + 447, /* (346) full_index_name ::= index_name */ + 447, /* (347) full_index_name ::= db_name NK_DOT index_name */ + 446, /* (348) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ + 446, /* (349) 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 */ + 449, /* (350) func_list ::= func */ + 449, /* (351) func_list ::= func_list NK_COMMA func */ + 452, /* (352) func ::= sma_func_name NK_LP expression_list NK_RP */ + 445, /* (353) sma_func_name ::= function_name */ + 445, /* (354) sma_func_name ::= COUNT */ + 445, /* (355) sma_func_name ::= FIRST */ + 445, /* (356) sma_func_name ::= LAST */ + 445, /* (357) sma_func_name ::= LAST_ROW */ + 451, /* (358) sma_stream_opt ::= */ + 451, /* (359) sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ + 451, /* (360) sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ + 451, /* (361) sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ + 454, /* (362) with_meta ::= AS */ + 454, /* (363) with_meta ::= WITH META AS */ + 454, /* (364) with_meta ::= ONLY META AS */ + 369, /* (365) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ + 369, /* (366) cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name */ + 369, /* (367) cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt */ + 369, /* (368) cmd ::= DROP TOPIC exists_opt topic_name */ + 369, /* (369) cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ + 369, /* (370) cmd ::= DESC full_table_name */ + 369, /* (371) cmd ::= DESCRIBE full_table_name */ + 369, /* (372) cmd ::= RESET QUERY CACHE */ + 369, /* (373) cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ + 369, /* (374) cmd ::= EXPLAIN analyze_opt explain_options insert_query */ + 458, /* (375) analyze_opt ::= */ + 458, /* (376) analyze_opt ::= ANALYZE */ + 459, /* (377) explain_options ::= */ + 459, /* (378) explain_options ::= explain_options VERBOSE NK_BOOL */ + 459, /* (379) explain_options ::= explain_options RATIO NK_FLOAT */ + 369, /* (380) cmd ::= CREATE or_replace_opt agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt language_opt */ + 369, /* (381) cmd ::= DROP FUNCTION exists_opt function_name */ + 462, /* (382) agg_func_opt ::= */ + 462, /* (383) agg_func_opt ::= AGGREGATE */ + 463, /* (384) bufsize_opt ::= */ + 463, /* (385) bufsize_opt ::= BUFSIZE NK_INTEGER */ + 464, /* (386) language_opt ::= */ + 464, /* (387) language_opt ::= LANGUAGE NK_STRING */ + 461, /* (388) or_replace_opt ::= */ + 461, /* (389) or_replace_opt ::= OR REPLACE */ + 369, /* (390) cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery */ + 369, /* (391) cmd ::= DROP VIEW exists_opt full_view_name */ + 465, /* (392) full_view_name ::= view_name */ + 465, /* (393) full_view_name ::= db_name NK_DOT view_name */ + 369, /* (394) 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 */ + 369, /* (395) cmd ::= DROP STREAM exists_opt stream_name */ + 369, /* (396) cmd ::= PAUSE STREAM exists_opt stream_name */ + 369, /* (397) cmd ::= RESUME STREAM exists_opt ignore_opt stream_name */ + 469, /* (398) col_list_opt ::= */ + 469, /* (399) col_list_opt ::= NK_LP column_stream_def_list NK_RP */ + 473, /* (400) column_stream_def_list ::= column_stream_def */ + 473, /* (401) column_stream_def_list ::= column_stream_def_list NK_COMMA column_stream_def */ + 474, /* (402) column_stream_def ::= column_name */ + 474, /* (403) column_stream_def ::= column_name PRIMARY KEY */ + 470, /* (404) tag_def_or_ref_opt ::= */ + 470, /* (405) tag_def_or_ref_opt ::= tags_def */ + 470, /* (406) tag_def_or_ref_opt ::= TAGS NK_LP column_stream_def_list NK_RP */ + 468, /* (407) stream_options ::= */ + 468, /* (408) stream_options ::= stream_options TRIGGER AT_ONCE */ + 468, /* (409) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ + 468, /* (410) stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ + 468, /* (411) stream_options ::= stream_options WATERMARK duration_literal */ + 468, /* (412) stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ + 468, /* (413) stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ + 468, /* (414) stream_options ::= stream_options DELETE_MARK duration_literal */ + 468, /* (415) stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */ + 471, /* (416) subtable_opt ::= */ + 471, /* (417) subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ + 472, /* (418) ignore_opt ::= */ + 472, /* (419) ignore_opt ::= IGNORE UNTREATED */ + 369, /* (420) cmd ::= KILL CONNECTION NK_INTEGER */ + 369, /* (421) cmd ::= KILL QUERY NK_STRING */ + 369, /* (422) cmd ::= KILL TRANSACTION NK_INTEGER */ + 369, /* (423) cmd ::= KILL COMPACT NK_INTEGER */ + 369, /* (424) cmd ::= BALANCE VGROUP */ + 369, /* (425) cmd ::= BALANCE VGROUP LEADER on_vgroup_id */ + 369, /* (426) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ + 369, /* (427) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ + 369, /* (428) cmd ::= SPLIT VGROUP NK_INTEGER */ + 476, /* (429) on_vgroup_id ::= */ + 476, /* (430) on_vgroup_id ::= ON NK_INTEGER */ + 477, /* (431) dnode_list ::= DNODE NK_INTEGER */ + 477, /* (432) dnode_list ::= dnode_list DNODE NK_INTEGER */ + 369, /* (433) cmd ::= DELETE FROM full_table_name where_clause_opt */ + 369, /* (434) cmd ::= query_or_subquery */ + 369, /* (435) cmd ::= insert_query */ + 460, /* (436) insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ + 460, /* (437) insert_query ::= INSERT INTO full_table_name query_or_subquery */ + 415, /* (438) tags_literal ::= NK_INTEGER */ + 415, /* (439) tags_literal ::= NK_INTEGER NK_PLUS duration_literal */ + 415, /* (440) tags_literal ::= NK_INTEGER NK_MINUS duration_literal */ + 415, /* (441) tags_literal ::= NK_PLUS NK_INTEGER */ + 415, /* (442) tags_literal ::= NK_PLUS NK_INTEGER NK_PLUS duration_literal */ + 415, /* (443) tags_literal ::= NK_PLUS NK_INTEGER NK_MINUS duration_literal */ + 415, /* (444) tags_literal ::= NK_MINUS NK_INTEGER */ + 415, /* (445) tags_literal ::= NK_MINUS NK_INTEGER NK_PLUS duration_literal */ + 415, /* (446) tags_literal ::= NK_MINUS NK_INTEGER NK_MINUS duration_literal */ + 415, /* (447) tags_literal ::= NK_FLOAT */ + 415, /* (448) tags_literal ::= NK_PLUS NK_FLOAT */ + 415, /* (449) tags_literal ::= NK_MINUS NK_FLOAT */ + 415, /* (450) tags_literal ::= NK_BIN */ + 415, /* (451) tags_literal ::= NK_BIN NK_PLUS duration_literal */ + 415, /* (452) tags_literal ::= NK_BIN NK_MINUS duration_literal */ + 415, /* (453) tags_literal ::= NK_PLUS NK_BIN */ + 415, /* (454) tags_literal ::= NK_PLUS NK_BIN NK_PLUS duration_literal */ + 415, /* (455) tags_literal ::= NK_PLUS NK_BIN NK_MINUS duration_literal */ + 415, /* (456) tags_literal ::= NK_MINUS NK_BIN */ + 415, /* (457) tags_literal ::= NK_MINUS NK_BIN NK_PLUS duration_literal */ + 415, /* (458) tags_literal ::= NK_MINUS NK_BIN NK_MINUS duration_literal */ + 415, /* (459) tags_literal ::= NK_HEX */ + 415, /* (460) tags_literal ::= NK_HEX NK_PLUS duration_literal */ + 415, /* (461) tags_literal ::= NK_HEX NK_MINUS duration_literal */ + 415, /* (462) tags_literal ::= NK_PLUS NK_HEX */ + 415, /* (463) tags_literal ::= NK_PLUS NK_HEX NK_PLUS duration_literal */ + 415, /* (464) tags_literal ::= NK_PLUS NK_HEX NK_MINUS duration_literal */ + 415, /* (465) tags_literal ::= NK_MINUS NK_HEX */ + 415, /* (466) tags_literal ::= NK_MINUS NK_HEX NK_PLUS duration_literal */ + 415, /* (467) tags_literal ::= NK_MINUS NK_HEX NK_MINUS duration_literal */ + 415, /* (468) tags_literal ::= NK_STRING */ + 415, /* (469) tags_literal ::= NK_STRING NK_PLUS duration_literal */ + 415, /* (470) tags_literal ::= NK_STRING NK_MINUS duration_literal */ + 415, /* (471) tags_literal ::= NK_BOOL */ + 415, /* (472) tags_literal ::= NULL */ + 415, /* (473) tags_literal ::= literal_func */ + 415, /* (474) tags_literal ::= literal_func NK_PLUS duration_literal */ + 415, /* (475) tags_literal ::= literal_func NK_MINUS duration_literal */ + 418, /* (476) tags_literal_list ::= tags_literal */ + 418, /* (477) tags_literal_list ::= tags_literal_list NK_COMMA tags_literal */ + 372, /* (478) literal ::= NK_INTEGER */ + 372, /* (479) literal ::= NK_FLOAT */ + 372, /* (480) literal ::= NK_STRING */ + 372, /* (481) literal ::= NK_BOOL */ + 372, /* (482) literal ::= TIMESTAMP NK_STRING */ + 372, /* (483) literal ::= duration_literal */ + 372, /* (484) literal ::= NULL */ + 372, /* (485) literal ::= NK_QUESTION */ + 426, /* (486) duration_literal ::= NK_VARIABLE */ + 401, /* (487) signed ::= NK_INTEGER */ + 401, /* (488) signed ::= NK_PLUS NK_INTEGER */ + 401, /* (489) signed ::= NK_MINUS NK_INTEGER */ + 401, /* (490) signed ::= NK_FLOAT */ + 401, /* (491) signed ::= NK_PLUS NK_FLOAT */ + 401, /* (492) signed ::= NK_MINUS NK_FLOAT */ + 479, /* (493) signed_literal ::= signed */ + 479, /* (494) signed_literal ::= NK_STRING */ + 479, /* (495) signed_literal ::= NK_BOOL */ + 479, /* (496) signed_literal ::= TIMESTAMP NK_STRING */ + 479, /* (497) signed_literal ::= duration_literal */ + 479, /* (498) signed_literal ::= NULL */ + 479, /* (499) signed_literal ::= literal_func */ + 479, /* (500) signed_literal ::= NK_QUESTION */ + 480, /* (501) literal_list ::= signed_literal */ + 480, /* (502) literal_list ::= literal_list NK_COMMA signed_literal */ + 384, /* (503) db_name ::= NK_ID */ + 385, /* (504) table_name ::= NK_ID */ + 413, /* (505) column_name ::= NK_ID */ + 428, /* (506) function_name ::= NK_ID */ + 466, /* (507) view_name ::= NK_ID */ + 481, /* (508) table_alias ::= NK_ID */ + 439, /* (509) column_alias ::= NK_ID */ + 439, /* (510) column_alias ::= NK_ALIAS */ + 377, /* (511) user_name ::= NK_ID */ + 386, /* (512) topic_name ::= NK_ID */ + 467, /* (513) stream_name ::= NK_ID */ + 457, /* (514) cgroup_name ::= NK_ID */ + 448, /* (515) index_name ::= NK_ID */ + 440, /* (516) tsma_name ::= NK_ID */ + 482, /* (517) expr_or_subquery ::= expression */ + 475, /* (518) expression ::= literal */ + 475, /* (519) expression ::= pseudo_column */ + 475, /* (520) expression ::= column_reference */ + 475, /* (521) expression ::= function_expression */ + 475, /* (522) expression ::= case_when_expression */ + 475, /* (523) expression ::= NK_LP expression NK_RP */ + 475, /* (524) expression ::= NK_PLUS expr_or_subquery */ + 475, /* (525) expression ::= NK_MINUS expr_or_subquery */ + 475, /* (526) expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ + 475, /* (527) expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ + 475, /* (528) expression ::= expr_or_subquery NK_STAR expr_or_subquery */ + 475, /* (529) expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ + 475, /* (530) expression ::= expr_or_subquery NK_REM expr_or_subquery */ + 475, /* (531) expression ::= column_reference NK_ARROW NK_STRING */ + 475, /* (532) expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ + 475, /* (533) expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ + 453, /* (534) expression_list ::= expr_or_subquery */ + 453, /* (535) expression_list ::= expression_list NK_COMMA expr_or_subquery */ + 484, /* (536) column_reference ::= column_name */ + 484, /* (537) column_reference ::= table_name NK_DOT column_name */ + 484, /* (538) column_reference ::= NK_ALIAS */ + 484, /* (539) column_reference ::= table_name NK_DOT NK_ALIAS */ + 483, /* (540) pseudo_column ::= ROWTS */ + 483, /* (541) pseudo_column ::= TBNAME */ + 483, /* (542) pseudo_column ::= table_name NK_DOT TBNAME */ + 483, /* (543) pseudo_column ::= QSTART */ + 483, /* (544) pseudo_column ::= QEND */ + 483, /* (545) pseudo_column ::= QDURATION */ + 483, /* (546) pseudo_column ::= WSTART */ + 483, /* (547) pseudo_column ::= WEND */ + 483, /* (548) pseudo_column ::= WDURATION */ + 483, /* (549) pseudo_column ::= IROWTS */ + 483, /* (550) pseudo_column ::= ISFILLED */ + 483, /* (551) pseudo_column ::= QTAGS */ + 485, /* (552) function_expression ::= function_name NK_LP expression_list NK_RP */ + 485, /* (553) function_expression ::= star_func NK_LP star_func_para_list NK_RP */ + 485, /* (554) function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ + 485, /* (555) function_expression ::= CAST NK_LP expr_or_subquery AS type_name_default_len NK_RP */ + 485, /* (556) function_expression ::= literal_func */ + 478, /* (557) literal_func ::= noarg_func NK_LP NK_RP */ + 478, /* (558) literal_func ::= NOW */ + 478, /* (559) literal_func ::= TODAY */ + 489, /* (560) noarg_func ::= NOW */ + 489, /* (561) noarg_func ::= TODAY */ + 489, /* (562) noarg_func ::= TIMEZONE */ + 489, /* (563) noarg_func ::= DATABASE */ + 489, /* (564) noarg_func ::= CLIENT_VERSION */ + 489, /* (565) noarg_func ::= SERVER_VERSION */ + 489, /* (566) noarg_func ::= SERVER_STATUS */ + 489, /* (567) noarg_func ::= CURRENT_USER */ + 489, /* (568) noarg_func ::= USER */ + 487, /* (569) star_func ::= COUNT */ + 487, /* (570) star_func ::= FIRST */ + 487, /* (571) star_func ::= LAST */ + 487, /* (572) star_func ::= LAST_ROW */ + 488, /* (573) star_func_para_list ::= NK_STAR */ + 488, /* (574) star_func_para_list ::= other_para_list */ + 490, /* (575) other_para_list ::= star_func_para */ + 490, /* (576) other_para_list ::= other_para_list NK_COMMA star_func_para */ + 491, /* (577) star_func_para ::= expr_or_subquery */ + 491, /* (578) star_func_para ::= table_name NK_DOT NK_STAR */ + 486, /* (579) case_when_expression ::= CASE when_then_list case_when_else_opt END */ + 486, /* (580) case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ + 492, /* (581) when_then_list ::= when_then_expr */ + 492, /* (582) when_then_list ::= when_then_list when_then_expr */ + 495, /* (583) when_then_expr ::= WHEN common_expression THEN common_expression */ + 493, /* (584) case_when_else_opt ::= */ + 493, /* (585) case_when_else_opt ::= ELSE common_expression */ + 496, /* (586) predicate ::= expr_or_subquery compare_op expr_or_subquery */ + 496, /* (587) predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ + 496, /* (588) predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ + 496, /* (589) predicate ::= expr_or_subquery IS NULL */ + 496, /* (590) predicate ::= expr_or_subquery IS NOT NULL */ + 496, /* (591) predicate ::= expr_or_subquery in_op in_predicate_value */ + 497, /* (592) compare_op ::= NK_LT */ + 497, /* (593) compare_op ::= NK_GT */ + 497, /* (594) compare_op ::= NK_LE */ + 497, /* (595) compare_op ::= NK_GE */ + 497, /* (596) compare_op ::= NK_NE */ + 497, /* (597) compare_op ::= NK_EQ */ + 497, /* (598) compare_op ::= LIKE */ + 497, /* (599) compare_op ::= NOT LIKE */ + 497, /* (600) compare_op ::= MATCH */ + 497, /* (601) compare_op ::= NMATCH */ + 497, /* (602) compare_op ::= CONTAINS */ + 498, /* (603) in_op ::= IN */ + 498, /* (604) in_op ::= NOT IN */ + 499, /* (605) in_predicate_value ::= NK_LP literal_list NK_RP */ + 500, /* (606) boolean_value_expression ::= boolean_primary */ + 500, /* (607) boolean_value_expression ::= NOT boolean_primary */ + 500, /* (608) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ + 500, /* (609) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ + 501, /* (610) boolean_primary ::= predicate */ + 501, /* (611) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ + 494, /* (612) common_expression ::= expr_or_subquery */ + 494, /* (613) common_expression ::= boolean_value_expression */ + 502, /* (614) from_clause_opt ::= */ + 502, /* (615) from_clause_opt ::= FROM table_reference_list */ + 503, /* (616) table_reference_list ::= table_reference */ + 503, /* (617) table_reference_list ::= table_reference_list NK_COMMA table_reference */ + 504, /* (618) table_reference ::= table_primary */ + 504, /* (619) table_reference ::= joined_table */ + 505, /* (620) table_primary ::= table_name alias_opt */ + 505, /* (621) table_primary ::= db_name NK_DOT table_name alias_opt */ + 505, /* (622) table_primary ::= subquery alias_opt */ + 505, /* (623) table_primary ::= parenthesized_joined_table */ + 507, /* (624) alias_opt ::= */ + 507, /* (625) alias_opt ::= table_alias */ + 507, /* (626) alias_opt ::= AS table_alias */ + 509, /* (627) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ + 509, /* (628) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ + 506, /* (629) joined_table ::= table_reference join_type join_subtype JOIN table_reference join_on_clause_opt window_offset_clause_opt jlimit_clause_opt */ + 510, /* (630) join_type ::= */ + 510, /* (631) join_type ::= INNER */ + 510, /* (632) join_type ::= LEFT */ + 510, /* (633) join_type ::= RIGHT */ + 510, /* (634) join_type ::= FULL */ + 511, /* (635) join_subtype ::= */ + 511, /* (636) join_subtype ::= OUTER */ + 511, /* (637) join_subtype ::= SEMI */ + 511, /* (638) join_subtype ::= ANTI */ + 511, /* (639) join_subtype ::= ASOF */ + 511, /* (640) join_subtype ::= WINDOW */ + 512, /* (641) join_on_clause_opt ::= */ + 512, /* (642) join_on_clause_opt ::= ON search_condition */ + 513, /* (643) window_offset_clause_opt ::= */ + 513, /* (644) window_offset_clause_opt ::= WINDOW_OFFSET NK_LP window_offset_literal NK_COMMA window_offset_literal NK_RP */ + 515, /* (645) window_offset_literal ::= NK_VARIABLE */ + 515, /* (646) window_offset_literal ::= NK_MINUS NK_VARIABLE */ + 514, /* (647) jlimit_clause_opt ::= */ + 514, /* (648) jlimit_clause_opt ::= JLIMIT NK_INTEGER */ + 516, /* (649) 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 */ + 517, /* (650) hint_list ::= */ + 517, /* (651) hint_list ::= NK_HINT */ + 519, /* (652) tag_mode_opt ::= */ + 519, /* (653) tag_mode_opt ::= TAGS */ + 518, /* (654) set_quantifier_opt ::= */ + 518, /* (655) set_quantifier_opt ::= DISTINCT */ + 518, /* (656) set_quantifier_opt ::= ALL */ + 520, /* (657) select_list ::= select_item */ + 520, /* (658) select_list ::= select_list NK_COMMA select_item */ + 528, /* (659) select_item ::= NK_STAR */ + 528, /* (660) select_item ::= common_expression */ + 528, /* (661) select_item ::= common_expression column_alias */ + 528, /* (662) select_item ::= common_expression AS column_alias */ + 528, /* (663) select_item ::= table_name NK_DOT NK_STAR */ + 456, /* (664) where_clause_opt ::= */ + 456, /* (665) where_clause_opt ::= WHERE search_condition */ + 521, /* (666) partition_by_clause_opt ::= */ + 521, /* (667) partition_by_clause_opt ::= PARTITION BY partition_list */ + 529, /* (668) partition_list ::= partition_item */ + 529, /* (669) partition_list ::= partition_list NK_COMMA partition_item */ + 530, /* (670) partition_item ::= expr_or_subquery */ + 530, /* (671) partition_item ::= expr_or_subquery column_alias */ + 530, /* (672) partition_item ::= expr_or_subquery AS column_alias */ + 525, /* (673) twindow_clause_opt ::= */ + 525, /* (674) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP */ + 525, /* (675) twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ + 525, /* (676) twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ + 525, /* (677) twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_COMMA interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ + 525, /* (678) twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ + 525, /* (679) twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_RP */ + 525, /* (680) twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ + 450, /* (681) sliding_opt ::= */ + 450, /* (682) sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP */ + 531, /* (683) interval_sliding_duration_literal ::= NK_VARIABLE */ + 531, /* (684) interval_sliding_duration_literal ::= NK_STRING */ + 531, /* (685) interval_sliding_duration_literal ::= NK_INTEGER */ + 524, /* (686) fill_opt ::= */ + 524, /* (687) fill_opt ::= FILL NK_LP fill_mode NK_RP */ + 524, /* (688) fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP */ + 524, /* (689) fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP */ + 532, /* (690) fill_mode ::= NONE */ + 532, /* (691) fill_mode ::= PREV */ + 532, /* (692) fill_mode ::= NULL */ + 532, /* (693) fill_mode ::= NULL_F */ + 532, /* (694) fill_mode ::= LINEAR */ + 532, /* (695) fill_mode ::= NEXT */ + 526, /* (696) group_by_clause_opt ::= */ + 526, /* (697) group_by_clause_opt ::= GROUP BY group_by_list */ + 533, /* (698) group_by_list ::= expr_or_subquery */ + 533, /* (699) group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ + 527, /* (700) having_clause_opt ::= */ + 527, /* (701) having_clause_opt ::= HAVING search_condition */ + 522, /* (702) range_opt ::= */ + 522, /* (703) range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ + 522, /* (704) range_opt ::= RANGE NK_LP expr_or_subquery NK_RP */ + 523, /* (705) every_opt ::= */ + 523, /* (706) every_opt ::= EVERY NK_LP duration_literal NK_RP */ + 534, /* (707) query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ + 535, /* (708) query_simple ::= query_specification */ + 535, /* (709) query_simple ::= union_query_expression */ + 539, /* (710) union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ + 539, /* (711) union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ + 540, /* (712) query_simple_or_subquery ::= query_simple */ + 540, /* (713) query_simple_or_subquery ::= subquery */ + 455, /* (714) query_or_subquery ::= query_expression */ + 455, /* (715) query_or_subquery ::= subquery */ + 536, /* (716) order_by_clause_opt ::= */ + 536, /* (717) order_by_clause_opt ::= ORDER BY sort_specification_list */ + 537, /* (718) slimit_clause_opt ::= */ + 537, /* (719) slimit_clause_opt ::= SLIMIT NK_INTEGER */ + 537, /* (720) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ + 537, /* (721) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + 538, /* (722) limit_clause_opt ::= */ + 538, /* (723) limit_clause_opt ::= LIMIT NK_INTEGER */ + 538, /* (724) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ + 538, /* (725) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + 508, /* (726) subquery ::= NK_LP query_expression NK_RP */ + 508, /* (727) subquery ::= NK_LP subquery NK_RP */ + 387, /* (728) search_condition ::= common_expression */ + 541, /* (729) sort_specification_list ::= sort_specification */ + 541, /* (730) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ + 542, /* (731) sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ + 543, /* (732) ordering_specification_opt ::= */ + 543, /* (733) ordering_specification_opt ::= ASC */ + 543, /* (734) ordering_specification_opt ::= DESC */ + 544, /* (735) null_ordering_opt ::= */ + 544, /* (736) null_ordering_opt ::= NULLS FIRST */ + 544, /* (737) null_ordering_opt ::= NULLS LAST */ }; /* For rule J, yyRuleInfoNRhs[J] contains the negative of the number @@ -4594,400 +5043,412 @@ static const signed char yyRuleInfoNRhs[] = { 0, /* (329) db_kind_opt ::= */ -1, /* (330) db_kind_opt ::= USER */ -1, /* (331) db_kind_opt ::= SYSTEM */ - -8, /* (332) cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options */ - -9, /* (333) cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP */ - -4, /* (334) cmd ::= DROP INDEX exists_opt full_index_name */ - -1, /* (335) full_index_name ::= index_name */ - -3, /* (336) full_index_name ::= db_name NK_DOT index_name */ - -10, /* (337) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ - -12, /* (338) 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, /* (339) func_list ::= func */ - -3, /* (340) func_list ::= func_list NK_COMMA func */ - -4, /* (341) func ::= sma_func_name NK_LP expression_list NK_RP */ - -1, /* (342) sma_func_name ::= function_name */ - -1, /* (343) sma_func_name ::= COUNT */ - -1, /* (344) sma_func_name ::= FIRST */ - -1, /* (345) sma_func_name ::= LAST */ - -1, /* (346) sma_func_name ::= LAST_ROW */ - 0, /* (347) sma_stream_opt ::= */ - -3, /* (348) sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ - -3, /* (349) sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ - -3, /* (350) sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ - -1, /* (351) with_meta ::= AS */ - -3, /* (352) with_meta ::= WITH META AS */ - -3, /* (353) with_meta ::= ONLY META AS */ - -6, /* (354) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ - -7, /* (355) cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name */ - -8, /* (356) cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt */ - -4, /* (357) cmd ::= DROP TOPIC exists_opt topic_name */ - -7, /* (358) cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ - -2, /* (359) cmd ::= DESC full_table_name */ - -2, /* (360) cmd ::= DESCRIBE full_table_name */ - -3, /* (361) cmd ::= RESET QUERY CACHE */ - -4, /* (362) cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ - -4, /* (363) cmd ::= EXPLAIN analyze_opt explain_options insert_query */ - 0, /* (364) analyze_opt ::= */ - -1, /* (365) analyze_opt ::= ANALYZE */ - 0, /* (366) explain_options ::= */ - -3, /* (367) explain_options ::= explain_options VERBOSE NK_BOOL */ - -3, /* (368) explain_options ::= explain_options RATIO NK_FLOAT */ - -12, /* (369) 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, /* (370) cmd ::= DROP FUNCTION exists_opt function_name */ - 0, /* (371) agg_func_opt ::= */ - -1, /* (372) agg_func_opt ::= AGGREGATE */ - 0, /* (373) bufsize_opt ::= */ - -2, /* (374) bufsize_opt ::= BUFSIZE NK_INTEGER */ - 0, /* (375) language_opt ::= */ - -2, /* (376) language_opt ::= LANGUAGE NK_STRING */ - 0, /* (377) or_replace_opt ::= */ - -2, /* (378) or_replace_opt ::= OR REPLACE */ - -6, /* (379) cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery */ - -4, /* (380) cmd ::= DROP VIEW exists_opt full_view_name */ - -1, /* (381) full_view_name ::= view_name */ - -3, /* (382) full_view_name ::= db_name NK_DOT view_name */ - -12, /* (383) 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, /* (384) cmd ::= DROP STREAM exists_opt stream_name */ - -4, /* (385) cmd ::= PAUSE STREAM exists_opt stream_name */ - -5, /* (386) cmd ::= RESUME STREAM exists_opt ignore_opt stream_name */ - 0, /* (387) col_list_opt ::= */ - -3, /* (388) col_list_opt ::= NK_LP column_stream_def_list NK_RP */ - -1, /* (389) column_stream_def_list ::= column_stream_def */ - -3, /* (390) column_stream_def_list ::= column_stream_def_list NK_COMMA column_stream_def */ - -1, /* (391) column_stream_def ::= column_name */ - -3, /* (392) column_stream_def ::= column_name PRIMARY KEY */ - 0, /* (393) tag_def_or_ref_opt ::= */ - -1, /* (394) tag_def_or_ref_opt ::= tags_def */ - -4, /* (395) tag_def_or_ref_opt ::= TAGS NK_LP column_stream_def_list NK_RP */ - 0, /* (396) stream_options ::= */ - -3, /* (397) stream_options ::= stream_options TRIGGER AT_ONCE */ - -3, /* (398) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ - -4, /* (399) stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ - -3, /* (400) stream_options ::= stream_options WATERMARK duration_literal */ - -4, /* (401) stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ - -3, /* (402) stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ - -3, /* (403) stream_options ::= stream_options DELETE_MARK duration_literal */ - -4, /* (404) stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */ - 0, /* (405) subtable_opt ::= */ - -4, /* (406) subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ - 0, /* (407) ignore_opt ::= */ - -2, /* (408) ignore_opt ::= IGNORE UNTREATED */ - -3, /* (409) cmd ::= KILL CONNECTION NK_INTEGER */ - -3, /* (410) cmd ::= KILL QUERY NK_STRING */ - -3, /* (411) cmd ::= KILL TRANSACTION NK_INTEGER */ - -3, /* (412) cmd ::= KILL COMPACT NK_INTEGER */ - -2, /* (413) cmd ::= BALANCE VGROUP */ - -4, /* (414) cmd ::= BALANCE VGROUP LEADER on_vgroup_id */ - -4, /* (415) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ - -4, /* (416) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ - -3, /* (417) cmd ::= SPLIT VGROUP NK_INTEGER */ - 0, /* (418) on_vgroup_id ::= */ - -2, /* (419) on_vgroup_id ::= ON NK_INTEGER */ - -2, /* (420) dnode_list ::= DNODE NK_INTEGER */ - -3, /* (421) dnode_list ::= dnode_list DNODE NK_INTEGER */ - -4, /* (422) cmd ::= DELETE FROM full_table_name where_clause_opt */ - -1, /* (423) cmd ::= query_or_subquery */ - -1, /* (424) cmd ::= insert_query */ - -7, /* (425) insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ - -4, /* (426) insert_query ::= INSERT INTO full_table_name query_or_subquery */ - -1, /* (427) tags_literal ::= NK_INTEGER */ - -3, /* (428) tags_literal ::= NK_INTEGER NK_PLUS duration_literal */ - -3, /* (429) tags_literal ::= NK_INTEGER NK_MINUS duration_literal */ - -2, /* (430) tags_literal ::= NK_PLUS NK_INTEGER */ - -4, /* (431) tags_literal ::= NK_PLUS NK_INTEGER NK_PLUS duration_literal */ - -4, /* (432) tags_literal ::= NK_PLUS NK_INTEGER NK_MINUS duration_literal */ - -2, /* (433) tags_literal ::= NK_MINUS NK_INTEGER */ - -4, /* (434) tags_literal ::= NK_MINUS NK_INTEGER NK_PLUS duration_literal */ - -4, /* (435) tags_literal ::= NK_MINUS NK_INTEGER NK_MINUS duration_literal */ - -1, /* (436) tags_literal ::= NK_FLOAT */ - -2, /* (437) tags_literal ::= NK_PLUS NK_FLOAT */ - -2, /* (438) tags_literal ::= NK_MINUS NK_FLOAT */ - -1, /* (439) tags_literal ::= NK_BIN */ - -3, /* (440) tags_literal ::= NK_BIN NK_PLUS duration_literal */ - -3, /* (441) tags_literal ::= NK_BIN NK_MINUS duration_literal */ - -2, /* (442) tags_literal ::= NK_PLUS NK_BIN */ - -4, /* (443) tags_literal ::= NK_PLUS NK_BIN NK_PLUS duration_literal */ - -4, /* (444) tags_literal ::= NK_PLUS NK_BIN NK_MINUS duration_literal */ - -2, /* (445) tags_literal ::= NK_MINUS NK_BIN */ - -4, /* (446) tags_literal ::= NK_MINUS NK_BIN NK_PLUS duration_literal */ - -4, /* (447) tags_literal ::= NK_MINUS NK_BIN NK_MINUS duration_literal */ - -1, /* (448) tags_literal ::= NK_HEX */ - -3, /* (449) tags_literal ::= NK_HEX NK_PLUS duration_literal */ - -3, /* (450) tags_literal ::= NK_HEX NK_MINUS duration_literal */ - -2, /* (451) tags_literal ::= NK_PLUS NK_HEX */ - -4, /* (452) tags_literal ::= NK_PLUS NK_HEX NK_PLUS duration_literal */ - -4, /* (453) tags_literal ::= NK_PLUS NK_HEX NK_MINUS duration_literal */ - -2, /* (454) tags_literal ::= NK_MINUS NK_HEX */ - -4, /* (455) tags_literal ::= NK_MINUS NK_HEX NK_PLUS duration_literal */ - -4, /* (456) tags_literal ::= NK_MINUS NK_HEX NK_MINUS duration_literal */ - -1, /* (457) tags_literal ::= NK_STRING */ - -3, /* (458) tags_literal ::= NK_STRING NK_PLUS duration_literal */ - -3, /* (459) tags_literal ::= NK_STRING NK_MINUS duration_literal */ - -1, /* (460) tags_literal ::= NK_BOOL */ - -1, /* (461) tags_literal ::= NULL */ - -1, /* (462) tags_literal ::= literal_func */ - -3, /* (463) tags_literal ::= literal_func NK_PLUS duration_literal */ - -3, /* (464) tags_literal ::= literal_func NK_MINUS duration_literal */ - -1, /* (465) tags_literal_list ::= tags_literal */ - -3, /* (466) tags_literal_list ::= tags_literal_list NK_COMMA tags_literal */ - -1, /* (467) literal ::= NK_INTEGER */ - -1, /* (468) literal ::= NK_FLOAT */ - -1, /* (469) literal ::= NK_STRING */ - -1, /* (470) literal ::= NK_BOOL */ - -2, /* (471) literal ::= TIMESTAMP NK_STRING */ - -1, /* (472) literal ::= duration_literal */ - -1, /* (473) literal ::= NULL */ - -1, /* (474) literal ::= NK_QUESTION */ - -1, /* (475) duration_literal ::= NK_VARIABLE */ - -1, /* (476) signed ::= NK_INTEGER */ - -2, /* (477) signed ::= NK_PLUS NK_INTEGER */ - -2, /* (478) signed ::= NK_MINUS NK_INTEGER */ - -1, /* (479) signed ::= NK_FLOAT */ - -2, /* (480) signed ::= NK_PLUS NK_FLOAT */ - -2, /* (481) signed ::= NK_MINUS NK_FLOAT */ - -1, /* (482) signed_literal ::= signed */ - -1, /* (483) signed_literal ::= NK_STRING */ - -1, /* (484) signed_literal ::= NK_BOOL */ - -2, /* (485) signed_literal ::= TIMESTAMP NK_STRING */ - -1, /* (486) signed_literal ::= duration_literal */ - -1, /* (487) signed_literal ::= NULL */ - -1, /* (488) signed_literal ::= literal_func */ - -1, /* (489) signed_literal ::= NK_QUESTION */ - -1, /* (490) literal_list ::= signed_literal */ - -3, /* (491) literal_list ::= literal_list NK_COMMA signed_literal */ - -1, /* (492) db_name ::= NK_ID */ - -1, /* (493) table_name ::= NK_ID */ - -1, /* (494) column_name ::= NK_ID */ - -1, /* (495) function_name ::= NK_ID */ - -1, /* (496) view_name ::= NK_ID */ - -1, /* (497) table_alias ::= NK_ID */ - -1, /* (498) column_alias ::= NK_ID */ - -1, /* (499) column_alias ::= NK_ALIAS */ - -1, /* (500) user_name ::= NK_ID */ - -1, /* (501) topic_name ::= NK_ID */ - -1, /* (502) stream_name ::= NK_ID */ - -1, /* (503) cgroup_name ::= NK_ID */ - -1, /* (504) index_name ::= NK_ID */ - -1, /* (505) expr_or_subquery ::= expression */ - -1, /* (506) expression ::= literal */ - -1, /* (507) expression ::= pseudo_column */ - -1, /* (508) expression ::= column_reference */ - -1, /* (509) expression ::= function_expression */ - -1, /* (510) expression ::= case_when_expression */ - -3, /* (511) expression ::= NK_LP expression NK_RP */ - -2, /* (512) expression ::= NK_PLUS expr_or_subquery */ - -2, /* (513) expression ::= NK_MINUS expr_or_subquery */ - -3, /* (514) expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ - -3, /* (515) expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ - -3, /* (516) expression ::= expr_or_subquery NK_STAR expr_or_subquery */ - -3, /* (517) expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ - -3, /* (518) expression ::= expr_or_subquery NK_REM expr_or_subquery */ - -3, /* (519) expression ::= column_reference NK_ARROW NK_STRING */ - -3, /* (520) expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ - -3, /* (521) expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ - -1, /* (522) expression_list ::= expr_or_subquery */ - -3, /* (523) expression_list ::= expression_list NK_COMMA expr_or_subquery */ - -1, /* (524) column_reference ::= column_name */ - -3, /* (525) column_reference ::= table_name NK_DOT column_name */ - -1, /* (526) column_reference ::= NK_ALIAS */ - -3, /* (527) column_reference ::= table_name NK_DOT NK_ALIAS */ - -1, /* (528) pseudo_column ::= ROWTS */ - -1, /* (529) pseudo_column ::= TBNAME */ - -3, /* (530) pseudo_column ::= table_name NK_DOT TBNAME */ - -1, /* (531) pseudo_column ::= QSTART */ - -1, /* (532) pseudo_column ::= QEND */ - -1, /* (533) pseudo_column ::= QDURATION */ - -1, /* (534) pseudo_column ::= WSTART */ - -1, /* (535) pseudo_column ::= WEND */ - -1, /* (536) pseudo_column ::= WDURATION */ - -1, /* (537) pseudo_column ::= IROWTS */ - -1, /* (538) pseudo_column ::= ISFILLED */ - -1, /* (539) pseudo_column ::= QTAGS */ - -4, /* (540) function_expression ::= function_name NK_LP expression_list NK_RP */ - -4, /* (541) function_expression ::= star_func NK_LP star_func_para_list NK_RP */ - -6, /* (542) function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ - -6, /* (543) function_expression ::= CAST NK_LP expr_or_subquery AS type_name_default_len NK_RP */ - -1, /* (544) function_expression ::= literal_func */ - -3, /* (545) literal_func ::= noarg_func NK_LP NK_RP */ - -1, /* (546) literal_func ::= NOW */ - -1, /* (547) literal_func ::= TODAY */ - -1, /* (548) noarg_func ::= NOW */ - -1, /* (549) noarg_func ::= TODAY */ - -1, /* (550) noarg_func ::= TIMEZONE */ - -1, /* (551) noarg_func ::= DATABASE */ - -1, /* (552) noarg_func ::= CLIENT_VERSION */ - -1, /* (553) noarg_func ::= SERVER_VERSION */ - -1, /* (554) noarg_func ::= SERVER_STATUS */ - -1, /* (555) noarg_func ::= CURRENT_USER */ - -1, /* (556) noarg_func ::= USER */ - -1, /* (557) star_func ::= COUNT */ - -1, /* (558) star_func ::= FIRST */ - -1, /* (559) star_func ::= LAST */ - -1, /* (560) star_func ::= LAST_ROW */ - -1, /* (561) star_func_para_list ::= NK_STAR */ - -1, /* (562) star_func_para_list ::= other_para_list */ - -1, /* (563) other_para_list ::= star_func_para */ - -3, /* (564) other_para_list ::= other_para_list NK_COMMA star_func_para */ - -1, /* (565) star_func_para ::= expr_or_subquery */ - -3, /* (566) star_func_para ::= table_name NK_DOT NK_STAR */ - -4, /* (567) case_when_expression ::= CASE when_then_list case_when_else_opt END */ - -5, /* (568) case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ - -1, /* (569) when_then_list ::= when_then_expr */ - -2, /* (570) when_then_list ::= when_then_list when_then_expr */ - -4, /* (571) when_then_expr ::= WHEN common_expression THEN common_expression */ - 0, /* (572) case_when_else_opt ::= */ - -2, /* (573) case_when_else_opt ::= ELSE common_expression */ - -3, /* (574) predicate ::= expr_or_subquery compare_op expr_or_subquery */ - -5, /* (575) predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ - -6, /* (576) predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ - -3, /* (577) predicate ::= expr_or_subquery IS NULL */ - -4, /* (578) predicate ::= expr_or_subquery IS NOT NULL */ - -3, /* (579) predicate ::= expr_or_subquery in_op in_predicate_value */ - -1, /* (580) compare_op ::= NK_LT */ - -1, /* (581) compare_op ::= NK_GT */ - -1, /* (582) compare_op ::= NK_LE */ - -1, /* (583) compare_op ::= NK_GE */ - -1, /* (584) compare_op ::= NK_NE */ - -1, /* (585) compare_op ::= NK_EQ */ - -1, /* (586) compare_op ::= LIKE */ - -2, /* (587) compare_op ::= NOT LIKE */ - -1, /* (588) compare_op ::= MATCH */ - -1, /* (589) compare_op ::= NMATCH */ - -1, /* (590) compare_op ::= CONTAINS */ - -1, /* (591) in_op ::= IN */ - -2, /* (592) in_op ::= NOT IN */ - -3, /* (593) in_predicate_value ::= NK_LP literal_list NK_RP */ - -1, /* (594) boolean_value_expression ::= boolean_primary */ - -2, /* (595) boolean_value_expression ::= NOT boolean_primary */ - -3, /* (596) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ - -3, /* (597) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ - -1, /* (598) boolean_primary ::= predicate */ - -3, /* (599) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ - -1, /* (600) common_expression ::= expr_or_subquery */ - -1, /* (601) common_expression ::= boolean_value_expression */ - 0, /* (602) from_clause_opt ::= */ - -2, /* (603) from_clause_opt ::= FROM table_reference_list */ - -1, /* (604) table_reference_list ::= table_reference */ - -3, /* (605) table_reference_list ::= table_reference_list NK_COMMA table_reference */ - -1, /* (606) table_reference ::= table_primary */ - -1, /* (607) table_reference ::= joined_table */ - -2, /* (608) table_primary ::= table_name alias_opt */ - -4, /* (609) table_primary ::= db_name NK_DOT table_name alias_opt */ - -2, /* (610) table_primary ::= subquery alias_opt */ - -1, /* (611) table_primary ::= parenthesized_joined_table */ - 0, /* (612) alias_opt ::= */ - -1, /* (613) alias_opt ::= table_alias */ - -2, /* (614) alias_opt ::= AS table_alias */ - -3, /* (615) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ - -3, /* (616) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ - -8, /* (617) joined_table ::= table_reference join_type join_subtype JOIN table_reference join_on_clause_opt window_offset_clause_opt jlimit_clause_opt */ - 0, /* (618) join_type ::= */ - -1, /* (619) join_type ::= INNER */ - -1, /* (620) join_type ::= LEFT */ - -1, /* (621) join_type ::= RIGHT */ - -1, /* (622) join_type ::= FULL */ - 0, /* (623) join_subtype ::= */ - -1, /* (624) join_subtype ::= OUTER */ - -1, /* (625) join_subtype ::= SEMI */ - -1, /* (626) join_subtype ::= ANTI */ - -1, /* (627) join_subtype ::= ASOF */ - -1, /* (628) join_subtype ::= WINDOW */ - 0, /* (629) join_on_clause_opt ::= */ - -2, /* (630) join_on_clause_opt ::= ON search_condition */ - 0, /* (631) window_offset_clause_opt ::= */ - -6, /* (632) window_offset_clause_opt ::= WINDOW_OFFSET NK_LP window_offset_literal NK_COMMA window_offset_literal NK_RP */ - -1, /* (633) window_offset_literal ::= NK_VARIABLE */ - -2, /* (634) window_offset_literal ::= NK_MINUS NK_VARIABLE */ - 0, /* (635) jlimit_clause_opt ::= */ - -2, /* (636) jlimit_clause_opt ::= JLIMIT NK_INTEGER */ - -14, /* (637) 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, /* (638) hint_list ::= */ - -1, /* (639) hint_list ::= NK_HINT */ - 0, /* (640) tag_mode_opt ::= */ - -1, /* (641) tag_mode_opt ::= TAGS */ - 0, /* (642) set_quantifier_opt ::= */ - -1, /* (643) set_quantifier_opt ::= DISTINCT */ - -1, /* (644) set_quantifier_opt ::= ALL */ - -1, /* (645) select_list ::= select_item */ - -3, /* (646) select_list ::= select_list NK_COMMA select_item */ - -1, /* (647) select_item ::= NK_STAR */ - -1, /* (648) select_item ::= common_expression */ - -2, /* (649) select_item ::= common_expression column_alias */ - -3, /* (650) select_item ::= common_expression AS column_alias */ - -3, /* (651) select_item ::= table_name NK_DOT NK_STAR */ - 0, /* (652) where_clause_opt ::= */ - -2, /* (653) where_clause_opt ::= WHERE search_condition */ - 0, /* (654) partition_by_clause_opt ::= */ - -3, /* (655) partition_by_clause_opt ::= PARTITION BY partition_list */ - -1, /* (656) partition_list ::= partition_item */ - -3, /* (657) partition_list ::= partition_list NK_COMMA partition_item */ - -1, /* (658) partition_item ::= expr_or_subquery */ - -2, /* (659) partition_item ::= expr_or_subquery column_alias */ - -3, /* (660) partition_item ::= expr_or_subquery AS column_alias */ - 0, /* (661) twindow_clause_opt ::= */ - -6, /* (662) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP */ - -4, /* (663) twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ - -6, /* (664) twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ - -8, /* (665) twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_COMMA interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ - -7, /* (666) twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ - -4, /* (667) twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_RP */ - -6, /* (668) twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ - 0, /* (669) sliding_opt ::= */ - -4, /* (670) sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP */ - -1, /* (671) interval_sliding_duration_literal ::= NK_VARIABLE */ - -1, /* (672) interval_sliding_duration_literal ::= NK_STRING */ - -1, /* (673) interval_sliding_duration_literal ::= NK_INTEGER */ - 0, /* (674) fill_opt ::= */ - -4, /* (675) fill_opt ::= FILL NK_LP fill_mode NK_RP */ - -6, /* (676) fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP */ - -6, /* (677) fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP */ - -1, /* (678) fill_mode ::= NONE */ - -1, /* (679) fill_mode ::= PREV */ - -1, /* (680) fill_mode ::= NULL */ - -1, /* (681) fill_mode ::= NULL_F */ - -1, /* (682) fill_mode ::= LINEAR */ - -1, /* (683) fill_mode ::= NEXT */ - 0, /* (684) group_by_clause_opt ::= */ - -3, /* (685) group_by_clause_opt ::= GROUP BY group_by_list */ - -1, /* (686) group_by_list ::= expr_or_subquery */ - -3, /* (687) group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ - 0, /* (688) having_clause_opt ::= */ - -2, /* (689) having_clause_opt ::= HAVING search_condition */ - 0, /* (690) range_opt ::= */ - -6, /* (691) range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ - -4, /* (692) range_opt ::= RANGE NK_LP expr_or_subquery NK_RP */ - 0, /* (693) every_opt ::= */ - -4, /* (694) every_opt ::= EVERY NK_LP duration_literal NK_RP */ - -4, /* (695) query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ - -1, /* (696) query_simple ::= query_specification */ - -1, /* (697) query_simple ::= union_query_expression */ - -4, /* (698) union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ - -3, /* (699) union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ - -1, /* (700) query_simple_or_subquery ::= query_simple */ - -1, /* (701) query_simple_or_subquery ::= subquery */ - -1, /* (702) query_or_subquery ::= query_expression */ - -1, /* (703) query_or_subquery ::= subquery */ - 0, /* (704) order_by_clause_opt ::= */ - -3, /* (705) order_by_clause_opt ::= ORDER BY sort_specification_list */ - 0, /* (706) slimit_clause_opt ::= */ - -2, /* (707) slimit_clause_opt ::= SLIMIT NK_INTEGER */ - -4, /* (708) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ - -4, /* (709) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - 0, /* (710) limit_clause_opt ::= */ - -2, /* (711) limit_clause_opt ::= LIMIT NK_INTEGER */ - -4, /* (712) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ - -4, /* (713) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - -3, /* (714) subquery ::= NK_LP query_expression NK_RP */ - -3, /* (715) subquery ::= NK_LP subquery NK_RP */ - -1, /* (716) search_condition ::= common_expression */ - -1, /* (717) sort_specification_list ::= sort_specification */ - -3, /* (718) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ - -3, /* (719) sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ - 0, /* (720) ordering_specification_opt ::= */ - -1, /* (721) ordering_specification_opt ::= ASC */ - -1, /* (722) ordering_specification_opt ::= DESC */ - 0, /* (723) null_ordering_opt ::= */ - -2, /* (724) null_ordering_opt ::= NULLS FIRST */ - -2, /* (725) null_ordering_opt ::= NULLS LAST */ + -11, /* (332) cmd ::= CREATE TSMA not_exists_opt tsma_name ON full_table_name tsma_opt INTERVAL NK_LP duration_literal NK_RP */ + -4, /* (333) cmd ::= DROP TSMA exists_opt full_tsma_name */ + -4, /* (334) cmd ::= SHOW CREATE TSMA full_tsma_name */ + -3, /* (335) cmd ::= SHOW db_name_cond_opt TSMAS */ + -1, /* (336) full_tsma_name ::= tsma_name */ + -3, /* (337) full_tsma_name ::= db_name NK_DOT tsma_name */ + 0, /* (338) tsma_opt ::= */ + -8, /* (339) tsma_opt ::= FUNCTION NK_LP tsma_func_list NK_RP COLUMN NK_LP col_name_list NK_RP */ + -1, /* (340) tsma_func_list ::= tsma_func_name */ + -3, /* (341) tsma_func_list ::= tsma_func_list NK_COMMA tsma_func_name */ + -1, /* (342) tsma_func_name ::= sma_func_name */ + -8, /* (343) cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options */ + -9, /* (344) cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP */ + -4, /* (345) cmd ::= DROP INDEX exists_opt full_index_name */ + -1, /* (346) full_index_name ::= index_name */ + -3, /* (347) full_index_name ::= db_name NK_DOT index_name */ + -10, /* (348) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ + -12, /* (349) 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, /* (350) func_list ::= func */ + -3, /* (351) func_list ::= func_list NK_COMMA func */ + -4, /* (352) func ::= sma_func_name NK_LP expression_list NK_RP */ + -1, /* (353) sma_func_name ::= function_name */ + -1, /* (354) sma_func_name ::= COUNT */ + -1, /* (355) sma_func_name ::= FIRST */ + -1, /* (356) sma_func_name ::= LAST */ + -1, /* (357) sma_func_name ::= LAST_ROW */ + 0, /* (358) sma_stream_opt ::= */ + -3, /* (359) sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ + -3, /* (360) sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ + -3, /* (361) sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ + -1, /* (362) with_meta ::= AS */ + -3, /* (363) with_meta ::= WITH META AS */ + -3, /* (364) with_meta ::= ONLY META AS */ + -6, /* (365) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ + -7, /* (366) cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name */ + -8, /* (367) cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt */ + -4, /* (368) cmd ::= DROP TOPIC exists_opt topic_name */ + -7, /* (369) cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ + -2, /* (370) cmd ::= DESC full_table_name */ + -2, /* (371) cmd ::= DESCRIBE full_table_name */ + -3, /* (372) cmd ::= RESET QUERY CACHE */ + -4, /* (373) cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ + -4, /* (374) cmd ::= EXPLAIN analyze_opt explain_options insert_query */ + 0, /* (375) analyze_opt ::= */ + -1, /* (376) analyze_opt ::= ANALYZE */ + 0, /* (377) explain_options ::= */ + -3, /* (378) explain_options ::= explain_options VERBOSE NK_BOOL */ + -3, /* (379) explain_options ::= explain_options RATIO NK_FLOAT */ + -12, /* (380) 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, /* (381) cmd ::= DROP FUNCTION exists_opt function_name */ + 0, /* (382) agg_func_opt ::= */ + -1, /* (383) agg_func_opt ::= AGGREGATE */ + 0, /* (384) bufsize_opt ::= */ + -2, /* (385) bufsize_opt ::= BUFSIZE NK_INTEGER */ + 0, /* (386) language_opt ::= */ + -2, /* (387) language_opt ::= LANGUAGE NK_STRING */ + 0, /* (388) or_replace_opt ::= */ + -2, /* (389) or_replace_opt ::= OR REPLACE */ + -6, /* (390) cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery */ + -4, /* (391) cmd ::= DROP VIEW exists_opt full_view_name */ + -1, /* (392) full_view_name ::= view_name */ + -3, /* (393) full_view_name ::= db_name NK_DOT view_name */ + -12, /* (394) 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, /* (395) cmd ::= DROP STREAM exists_opt stream_name */ + -4, /* (396) cmd ::= PAUSE STREAM exists_opt stream_name */ + -5, /* (397) cmd ::= RESUME STREAM exists_opt ignore_opt stream_name */ + 0, /* (398) col_list_opt ::= */ + -3, /* (399) col_list_opt ::= NK_LP column_stream_def_list NK_RP */ + -1, /* (400) column_stream_def_list ::= column_stream_def */ + -3, /* (401) column_stream_def_list ::= column_stream_def_list NK_COMMA column_stream_def */ + -1, /* (402) column_stream_def ::= column_name */ + -3, /* (403) column_stream_def ::= column_name PRIMARY KEY */ + 0, /* (404) tag_def_or_ref_opt ::= */ + -1, /* (405) tag_def_or_ref_opt ::= tags_def */ + -4, /* (406) tag_def_or_ref_opt ::= TAGS NK_LP column_stream_def_list NK_RP */ + 0, /* (407) stream_options ::= */ + -3, /* (408) stream_options ::= stream_options TRIGGER AT_ONCE */ + -3, /* (409) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ + -4, /* (410) stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ + -3, /* (411) stream_options ::= stream_options WATERMARK duration_literal */ + -4, /* (412) stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ + -3, /* (413) stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ + -3, /* (414) stream_options ::= stream_options DELETE_MARK duration_literal */ + -4, /* (415) stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */ + 0, /* (416) subtable_opt ::= */ + -4, /* (417) subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ + 0, /* (418) ignore_opt ::= */ + -2, /* (419) ignore_opt ::= IGNORE UNTREATED */ + -3, /* (420) cmd ::= KILL CONNECTION NK_INTEGER */ + -3, /* (421) cmd ::= KILL QUERY NK_STRING */ + -3, /* (422) cmd ::= KILL TRANSACTION NK_INTEGER */ + -3, /* (423) cmd ::= KILL COMPACT NK_INTEGER */ + -2, /* (424) cmd ::= BALANCE VGROUP */ + -4, /* (425) cmd ::= BALANCE VGROUP LEADER on_vgroup_id */ + -4, /* (426) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ + -4, /* (427) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ + -3, /* (428) cmd ::= SPLIT VGROUP NK_INTEGER */ + 0, /* (429) on_vgroup_id ::= */ + -2, /* (430) on_vgroup_id ::= ON NK_INTEGER */ + -2, /* (431) dnode_list ::= DNODE NK_INTEGER */ + -3, /* (432) dnode_list ::= dnode_list DNODE NK_INTEGER */ + -4, /* (433) cmd ::= DELETE FROM full_table_name where_clause_opt */ + -1, /* (434) cmd ::= query_or_subquery */ + -1, /* (435) cmd ::= insert_query */ + -7, /* (436) insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ + -4, /* (437) insert_query ::= INSERT INTO full_table_name query_or_subquery */ + -1, /* (438) tags_literal ::= NK_INTEGER */ + -3, /* (439) tags_literal ::= NK_INTEGER NK_PLUS duration_literal */ + -3, /* (440) tags_literal ::= NK_INTEGER NK_MINUS duration_literal */ + -2, /* (441) tags_literal ::= NK_PLUS NK_INTEGER */ + -4, /* (442) tags_literal ::= NK_PLUS NK_INTEGER NK_PLUS duration_literal */ + -4, /* (443) tags_literal ::= NK_PLUS NK_INTEGER NK_MINUS duration_literal */ + -2, /* (444) tags_literal ::= NK_MINUS NK_INTEGER */ + -4, /* (445) tags_literal ::= NK_MINUS NK_INTEGER NK_PLUS duration_literal */ + -4, /* (446) tags_literal ::= NK_MINUS NK_INTEGER NK_MINUS duration_literal */ + -1, /* (447) tags_literal ::= NK_FLOAT */ + -2, /* (448) tags_literal ::= NK_PLUS NK_FLOAT */ + -2, /* (449) tags_literal ::= NK_MINUS NK_FLOAT */ + -1, /* (450) tags_literal ::= NK_BIN */ + -3, /* (451) tags_literal ::= NK_BIN NK_PLUS duration_literal */ + -3, /* (452) tags_literal ::= NK_BIN NK_MINUS duration_literal */ + -2, /* (453) tags_literal ::= NK_PLUS NK_BIN */ + -4, /* (454) tags_literal ::= NK_PLUS NK_BIN NK_PLUS duration_literal */ + -4, /* (455) tags_literal ::= NK_PLUS NK_BIN NK_MINUS duration_literal */ + -2, /* (456) tags_literal ::= NK_MINUS NK_BIN */ + -4, /* (457) tags_literal ::= NK_MINUS NK_BIN NK_PLUS duration_literal */ + -4, /* (458) tags_literal ::= NK_MINUS NK_BIN NK_MINUS duration_literal */ + -1, /* (459) tags_literal ::= NK_HEX */ + -3, /* (460) tags_literal ::= NK_HEX NK_PLUS duration_literal */ + -3, /* (461) tags_literal ::= NK_HEX NK_MINUS duration_literal */ + -2, /* (462) tags_literal ::= NK_PLUS NK_HEX */ + -4, /* (463) tags_literal ::= NK_PLUS NK_HEX NK_PLUS duration_literal */ + -4, /* (464) tags_literal ::= NK_PLUS NK_HEX NK_MINUS duration_literal */ + -2, /* (465) tags_literal ::= NK_MINUS NK_HEX */ + -4, /* (466) tags_literal ::= NK_MINUS NK_HEX NK_PLUS duration_literal */ + -4, /* (467) tags_literal ::= NK_MINUS NK_HEX NK_MINUS duration_literal */ + -1, /* (468) tags_literal ::= NK_STRING */ + -3, /* (469) tags_literal ::= NK_STRING NK_PLUS duration_literal */ + -3, /* (470) tags_literal ::= NK_STRING NK_MINUS duration_literal */ + -1, /* (471) tags_literal ::= NK_BOOL */ + -1, /* (472) tags_literal ::= NULL */ + -1, /* (473) tags_literal ::= literal_func */ + -3, /* (474) tags_literal ::= literal_func NK_PLUS duration_literal */ + -3, /* (475) tags_literal ::= literal_func NK_MINUS duration_literal */ + -1, /* (476) tags_literal_list ::= tags_literal */ + -3, /* (477) tags_literal_list ::= tags_literal_list NK_COMMA tags_literal */ + -1, /* (478) literal ::= NK_INTEGER */ + -1, /* (479) literal ::= NK_FLOAT */ + -1, /* (480) literal ::= NK_STRING */ + -1, /* (481) literal ::= NK_BOOL */ + -2, /* (482) literal ::= TIMESTAMP NK_STRING */ + -1, /* (483) literal ::= duration_literal */ + -1, /* (484) literal ::= NULL */ + -1, /* (485) literal ::= NK_QUESTION */ + -1, /* (486) duration_literal ::= NK_VARIABLE */ + -1, /* (487) signed ::= NK_INTEGER */ + -2, /* (488) signed ::= NK_PLUS NK_INTEGER */ + -2, /* (489) signed ::= NK_MINUS NK_INTEGER */ + -1, /* (490) signed ::= NK_FLOAT */ + -2, /* (491) signed ::= NK_PLUS NK_FLOAT */ + -2, /* (492) signed ::= NK_MINUS NK_FLOAT */ + -1, /* (493) signed_literal ::= signed */ + -1, /* (494) signed_literal ::= NK_STRING */ + -1, /* (495) signed_literal ::= NK_BOOL */ + -2, /* (496) signed_literal ::= TIMESTAMP NK_STRING */ + -1, /* (497) signed_literal ::= duration_literal */ + -1, /* (498) signed_literal ::= NULL */ + -1, /* (499) signed_literal ::= literal_func */ + -1, /* (500) signed_literal ::= NK_QUESTION */ + -1, /* (501) literal_list ::= signed_literal */ + -3, /* (502) literal_list ::= literal_list NK_COMMA signed_literal */ + -1, /* (503) db_name ::= NK_ID */ + -1, /* (504) table_name ::= NK_ID */ + -1, /* (505) column_name ::= NK_ID */ + -1, /* (506) function_name ::= NK_ID */ + -1, /* (507) view_name ::= NK_ID */ + -1, /* (508) table_alias ::= NK_ID */ + -1, /* (509) column_alias ::= NK_ID */ + -1, /* (510) column_alias ::= NK_ALIAS */ + -1, /* (511) user_name ::= NK_ID */ + -1, /* (512) topic_name ::= NK_ID */ + -1, /* (513) stream_name ::= NK_ID */ + -1, /* (514) cgroup_name ::= NK_ID */ + -1, /* (515) index_name ::= NK_ID */ + -1, /* (516) tsma_name ::= NK_ID */ + -1, /* (517) expr_or_subquery ::= expression */ + -1, /* (518) expression ::= literal */ + -1, /* (519) expression ::= pseudo_column */ + -1, /* (520) expression ::= column_reference */ + -1, /* (521) expression ::= function_expression */ + -1, /* (522) expression ::= case_when_expression */ + -3, /* (523) expression ::= NK_LP expression NK_RP */ + -2, /* (524) expression ::= NK_PLUS expr_or_subquery */ + -2, /* (525) expression ::= NK_MINUS expr_or_subquery */ + -3, /* (526) expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ + -3, /* (527) expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ + -3, /* (528) expression ::= expr_or_subquery NK_STAR expr_or_subquery */ + -3, /* (529) expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ + -3, /* (530) expression ::= expr_or_subquery NK_REM expr_or_subquery */ + -3, /* (531) expression ::= column_reference NK_ARROW NK_STRING */ + -3, /* (532) expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ + -3, /* (533) expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ + -1, /* (534) expression_list ::= expr_or_subquery */ + -3, /* (535) expression_list ::= expression_list NK_COMMA expr_or_subquery */ + -1, /* (536) column_reference ::= column_name */ + -3, /* (537) column_reference ::= table_name NK_DOT column_name */ + -1, /* (538) column_reference ::= NK_ALIAS */ + -3, /* (539) column_reference ::= table_name NK_DOT NK_ALIAS */ + -1, /* (540) pseudo_column ::= ROWTS */ + -1, /* (541) pseudo_column ::= TBNAME */ + -3, /* (542) pseudo_column ::= table_name NK_DOT TBNAME */ + -1, /* (543) pseudo_column ::= QSTART */ + -1, /* (544) pseudo_column ::= QEND */ + -1, /* (545) pseudo_column ::= QDURATION */ + -1, /* (546) pseudo_column ::= WSTART */ + -1, /* (547) pseudo_column ::= WEND */ + -1, /* (548) pseudo_column ::= WDURATION */ + -1, /* (549) pseudo_column ::= IROWTS */ + -1, /* (550) pseudo_column ::= ISFILLED */ + -1, /* (551) pseudo_column ::= QTAGS */ + -4, /* (552) function_expression ::= function_name NK_LP expression_list NK_RP */ + -4, /* (553) function_expression ::= star_func NK_LP star_func_para_list NK_RP */ + -6, /* (554) function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ + -6, /* (555) function_expression ::= CAST NK_LP expr_or_subquery AS type_name_default_len NK_RP */ + -1, /* (556) function_expression ::= literal_func */ + -3, /* (557) literal_func ::= noarg_func NK_LP NK_RP */ + -1, /* (558) literal_func ::= NOW */ + -1, /* (559) literal_func ::= TODAY */ + -1, /* (560) noarg_func ::= NOW */ + -1, /* (561) noarg_func ::= TODAY */ + -1, /* (562) noarg_func ::= TIMEZONE */ + -1, /* (563) noarg_func ::= DATABASE */ + -1, /* (564) noarg_func ::= CLIENT_VERSION */ + -1, /* (565) noarg_func ::= SERVER_VERSION */ + -1, /* (566) noarg_func ::= SERVER_STATUS */ + -1, /* (567) noarg_func ::= CURRENT_USER */ + -1, /* (568) noarg_func ::= USER */ + -1, /* (569) star_func ::= COUNT */ + -1, /* (570) star_func ::= FIRST */ + -1, /* (571) star_func ::= LAST */ + -1, /* (572) star_func ::= LAST_ROW */ + -1, /* (573) star_func_para_list ::= NK_STAR */ + -1, /* (574) star_func_para_list ::= other_para_list */ + -1, /* (575) other_para_list ::= star_func_para */ + -3, /* (576) other_para_list ::= other_para_list NK_COMMA star_func_para */ + -1, /* (577) star_func_para ::= expr_or_subquery */ + -3, /* (578) star_func_para ::= table_name NK_DOT NK_STAR */ + -4, /* (579) case_when_expression ::= CASE when_then_list case_when_else_opt END */ + -5, /* (580) case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ + -1, /* (581) when_then_list ::= when_then_expr */ + -2, /* (582) when_then_list ::= when_then_list when_then_expr */ + -4, /* (583) when_then_expr ::= WHEN common_expression THEN common_expression */ + 0, /* (584) case_when_else_opt ::= */ + -2, /* (585) case_when_else_opt ::= ELSE common_expression */ + -3, /* (586) predicate ::= expr_or_subquery compare_op expr_or_subquery */ + -5, /* (587) predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ + -6, /* (588) predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ + -3, /* (589) predicate ::= expr_or_subquery IS NULL */ + -4, /* (590) predicate ::= expr_or_subquery IS NOT NULL */ + -3, /* (591) predicate ::= expr_or_subquery in_op in_predicate_value */ + -1, /* (592) compare_op ::= NK_LT */ + -1, /* (593) compare_op ::= NK_GT */ + -1, /* (594) compare_op ::= NK_LE */ + -1, /* (595) compare_op ::= NK_GE */ + -1, /* (596) compare_op ::= NK_NE */ + -1, /* (597) compare_op ::= NK_EQ */ + -1, /* (598) compare_op ::= LIKE */ + -2, /* (599) compare_op ::= NOT LIKE */ + -1, /* (600) compare_op ::= MATCH */ + -1, /* (601) compare_op ::= NMATCH */ + -1, /* (602) compare_op ::= CONTAINS */ + -1, /* (603) in_op ::= IN */ + -2, /* (604) in_op ::= NOT IN */ + -3, /* (605) in_predicate_value ::= NK_LP literal_list NK_RP */ + -1, /* (606) boolean_value_expression ::= boolean_primary */ + -2, /* (607) boolean_value_expression ::= NOT boolean_primary */ + -3, /* (608) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ + -3, /* (609) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ + -1, /* (610) boolean_primary ::= predicate */ + -3, /* (611) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ + -1, /* (612) common_expression ::= expr_or_subquery */ + -1, /* (613) common_expression ::= boolean_value_expression */ + 0, /* (614) from_clause_opt ::= */ + -2, /* (615) from_clause_opt ::= FROM table_reference_list */ + -1, /* (616) table_reference_list ::= table_reference */ + -3, /* (617) table_reference_list ::= table_reference_list NK_COMMA table_reference */ + -1, /* (618) table_reference ::= table_primary */ + -1, /* (619) table_reference ::= joined_table */ + -2, /* (620) table_primary ::= table_name alias_opt */ + -4, /* (621) table_primary ::= db_name NK_DOT table_name alias_opt */ + -2, /* (622) table_primary ::= subquery alias_opt */ + -1, /* (623) table_primary ::= parenthesized_joined_table */ + 0, /* (624) alias_opt ::= */ + -1, /* (625) alias_opt ::= table_alias */ + -2, /* (626) alias_opt ::= AS table_alias */ + -3, /* (627) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ + -3, /* (628) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ + -8, /* (629) joined_table ::= table_reference join_type join_subtype JOIN table_reference join_on_clause_opt window_offset_clause_opt jlimit_clause_opt */ + 0, /* (630) join_type ::= */ + -1, /* (631) join_type ::= INNER */ + -1, /* (632) join_type ::= LEFT */ + -1, /* (633) join_type ::= RIGHT */ + -1, /* (634) join_type ::= FULL */ + 0, /* (635) join_subtype ::= */ + -1, /* (636) join_subtype ::= OUTER */ + -1, /* (637) join_subtype ::= SEMI */ + -1, /* (638) join_subtype ::= ANTI */ + -1, /* (639) join_subtype ::= ASOF */ + -1, /* (640) join_subtype ::= WINDOW */ + 0, /* (641) join_on_clause_opt ::= */ + -2, /* (642) join_on_clause_opt ::= ON search_condition */ + 0, /* (643) window_offset_clause_opt ::= */ + -6, /* (644) window_offset_clause_opt ::= WINDOW_OFFSET NK_LP window_offset_literal NK_COMMA window_offset_literal NK_RP */ + -1, /* (645) window_offset_literal ::= NK_VARIABLE */ + -2, /* (646) window_offset_literal ::= NK_MINUS NK_VARIABLE */ + 0, /* (647) jlimit_clause_opt ::= */ + -2, /* (648) jlimit_clause_opt ::= JLIMIT NK_INTEGER */ + -14, /* (649) 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, /* (650) hint_list ::= */ + -1, /* (651) hint_list ::= NK_HINT */ + 0, /* (652) tag_mode_opt ::= */ + -1, /* (653) tag_mode_opt ::= TAGS */ + 0, /* (654) set_quantifier_opt ::= */ + -1, /* (655) set_quantifier_opt ::= DISTINCT */ + -1, /* (656) set_quantifier_opt ::= ALL */ + -1, /* (657) select_list ::= select_item */ + -3, /* (658) select_list ::= select_list NK_COMMA select_item */ + -1, /* (659) select_item ::= NK_STAR */ + -1, /* (660) select_item ::= common_expression */ + -2, /* (661) select_item ::= common_expression column_alias */ + -3, /* (662) select_item ::= common_expression AS column_alias */ + -3, /* (663) select_item ::= table_name NK_DOT NK_STAR */ + 0, /* (664) where_clause_opt ::= */ + -2, /* (665) where_clause_opt ::= WHERE search_condition */ + 0, /* (666) partition_by_clause_opt ::= */ + -3, /* (667) partition_by_clause_opt ::= PARTITION BY partition_list */ + -1, /* (668) partition_list ::= partition_item */ + -3, /* (669) partition_list ::= partition_list NK_COMMA partition_item */ + -1, /* (670) partition_item ::= expr_or_subquery */ + -2, /* (671) partition_item ::= expr_or_subquery column_alias */ + -3, /* (672) partition_item ::= expr_or_subquery AS column_alias */ + 0, /* (673) twindow_clause_opt ::= */ + -6, /* (674) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP */ + -4, /* (675) twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ + -6, /* (676) twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ + -8, /* (677) twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_COMMA interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ + -7, /* (678) twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ + -4, /* (679) twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_RP */ + -6, /* (680) twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ + 0, /* (681) sliding_opt ::= */ + -4, /* (682) sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP */ + -1, /* (683) interval_sliding_duration_literal ::= NK_VARIABLE */ + -1, /* (684) interval_sliding_duration_literal ::= NK_STRING */ + -1, /* (685) interval_sliding_duration_literal ::= NK_INTEGER */ + 0, /* (686) fill_opt ::= */ + -4, /* (687) fill_opt ::= FILL NK_LP fill_mode NK_RP */ + -6, /* (688) fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP */ + -6, /* (689) fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP */ + -1, /* (690) fill_mode ::= NONE */ + -1, /* (691) fill_mode ::= PREV */ + -1, /* (692) fill_mode ::= NULL */ + -1, /* (693) fill_mode ::= NULL_F */ + -1, /* (694) fill_mode ::= LINEAR */ + -1, /* (695) fill_mode ::= NEXT */ + 0, /* (696) group_by_clause_opt ::= */ + -3, /* (697) group_by_clause_opt ::= GROUP BY group_by_list */ + -1, /* (698) group_by_list ::= expr_or_subquery */ + -3, /* (699) group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ + 0, /* (700) having_clause_opt ::= */ + -2, /* (701) having_clause_opt ::= HAVING search_condition */ + 0, /* (702) range_opt ::= */ + -6, /* (703) range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ + -4, /* (704) range_opt ::= RANGE NK_LP expr_or_subquery NK_RP */ + 0, /* (705) every_opt ::= */ + -4, /* (706) every_opt ::= EVERY NK_LP duration_literal NK_RP */ + -4, /* (707) query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ + -1, /* (708) query_simple ::= query_specification */ + -1, /* (709) query_simple ::= union_query_expression */ + -4, /* (710) union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ + -3, /* (711) union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ + -1, /* (712) query_simple_or_subquery ::= query_simple */ + -1, /* (713) query_simple_or_subquery ::= subquery */ + -1, /* (714) query_or_subquery ::= query_expression */ + -1, /* (715) query_or_subquery ::= subquery */ + 0, /* (716) order_by_clause_opt ::= */ + -3, /* (717) order_by_clause_opt ::= ORDER BY sort_specification_list */ + 0, /* (718) slimit_clause_opt ::= */ + -2, /* (719) slimit_clause_opt ::= SLIMIT NK_INTEGER */ + -4, /* (720) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ + -4, /* (721) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + 0, /* (722) limit_clause_opt ::= */ + -2, /* (723) limit_clause_opt ::= LIMIT NK_INTEGER */ + -4, /* (724) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ + -4, /* (725) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + -3, /* (726) subquery ::= NK_LP query_expression NK_RP */ + -3, /* (727) subquery ::= NK_LP subquery NK_RP */ + -1, /* (728) search_condition ::= common_expression */ + -1, /* (729) sort_specification_list ::= sort_specification */ + -3, /* (730) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ + -3, /* (731) sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ + 0, /* (732) ordering_specification_opt ::= */ + -1, /* (733) ordering_specification_opt ::= ASC */ + -1, /* (734) ordering_specification_opt ::= DESC */ + 0, /* (735) null_ordering_opt ::= */ + -2, /* (736) null_ordering_opt ::= NULLS FIRST */ + -2, /* (737) null_ordering_opt ::= NULLS LAST */ }; static void yy_accept(yyParser*); /* Forward Declaration */ @@ -5017,8 +5478,9 @@ static YYACTIONTYPE yy_reduce( (void)yyLookahead; (void)yyLookaheadToken; yymsp = yypParser->yytos; + assert( yyruleno<(int)(sizeof(yyRuleName)/sizeof(yyRuleName[0])) ); #ifndef NDEBUG - if( yyTraceFILE && yyruleno<(int)(sizeof(yyRuleName)/sizeof(yyRuleName[0])) ){ + if( yyTraceFILE ){ yysize = yyRuleInfoNRhs[yyruleno]; if( yysize ){ fprintf(yyTraceFILE, "%sReduce %d [%s]%s, pop back to state %d.\n", @@ -5078,15 +5540,21 @@ static YYACTIONTYPE yy_reduce( /********** Begin reduce actions **********************************************/ YYMINORTYPE yylhsminor; case 0: /* cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */ +#line 50 "sql.y" { pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); } - yy_destructor(yypParser,368,&yymsp[0].minor); +#line 5545 "sql.c" + yy_destructor(yypParser,370,&yymsp[0].minor); break; case 1: /* cmd ::= ALTER ACCOUNT NK_ID alter_account_options */ +#line 51 "sql.y" { pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); } - yy_destructor(yypParser,369,&yymsp[0].minor); +#line 5551 "sql.c" + yy_destructor(yypParser,371,&yymsp[0].minor); break; case 2: /* account_options ::= */ +#line 55 "sql.y" { } +#line 5557 "sql.c" break; case 3: /* account_options ::= account_options PPS literal */ case 4: /* account_options ::= account_options TSERIES literal */ yytestcase(yyruleno==4); @@ -5097,20 +5565,26 @@ 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,368,&yymsp[-2].minor); +{ yy_destructor(yypParser,370,&yymsp[-2].minor); +#line 56 "sql.y" { } - yy_destructor(yypParser,370,&yymsp[0].minor); +#line 5571 "sql.c" + yy_destructor(yypParser,372,&yymsp[0].minor); } break; case 12: /* alter_account_options ::= alter_account_option */ -{ yy_destructor(yypParser,371,&yymsp[0].minor); +{ yy_destructor(yypParser,373,&yymsp[0].minor); +#line 68 "sql.y" { } +#line 5579 "sql.c" } break; case 13: /* alter_account_options ::= alter_account_options alter_account_option */ -{ yy_destructor(yypParser,369,&yymsp[-1].minor); +{ yy_destructor(yypParser,371,&yymsp[-1].minor); +#line 69 "sql.y" { } - yy_destructor(yypParser,371,&yymsp[0].minor); +#line 5586 "sql.c" + yy_destructor(yypParser,373,&yymsp[0].minor); } break; case 14: /* alter_account_option ::= PASS literal */ @@ -5123,534 +5597,785 @@ static YYACTIONTYPE yy_reduce( case 21: /* alter_account_option ::= USERS literal */ yytestcase(yyruleno==21); case 22: /* alter_account_option ::= CONNS literal */ yytestcase(yyruleno==22); case 23: /* alter_account_option ::= STATE literal */ yytestcase(yyruleno==23); +#line 73 "sql.y" { } - yy_destructor(yypParser,370,&yymsp[0].minor); +#line 5602 "sql.c" + yy_destructor(yypParser,372,&yymsp[0].minor); break; case 24: /* ip_range_list ::= NK_STRING */ -{ yylhsminor.yy984 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy984 = yylhsminor.yy984; +#line 86 "sql.y" +{ yylhsminor.yy694 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } +#line 5608 "sql.c" + yymsp[0].minor.yy694 = yylhsminor.yy694; break; case 25: /* ip_range_list ::= ip_range_list NK_COMMA NK_STRING */ -{ yylhsminor.yy984 = addNodeToList(pCxt, yymsp[-2].minor.yy984, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } - yymsp[-2].minor.yy984 = yylhsminor.yy984; +#line 87 "sql.y" +{ yylhsminor.yy694 = addNodeToList(pCxt, yymsp[-2].minor.yy694, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } +#line 5614 "sql.c" + yymsp[-2].minor.yy694 = yylhsminor.yy694; break; case 26: /* white_list ::= HOST ip_range_list */ -{ yymsp[-1].minor.yy984 = yymsp[0].minor.yy984; } +#line 91 "sql.y" +{ yymsp[-1].minor.yy694 = yymsp[0].minor.yy694; } +#line 5620 "sql.c" break; case 27: /* white_list_opt ::= */ case 196: /* specific_cols_opt ::= */ yytestcase(yyruleno==196); case 232: /* tags_def_opt ::= */ yytestcase(yyruleno==232); case 321: /* tag_list_opt ::= */ yytestcase(yyruleno==321); - case 387: /* col_list_opt ::= */ yytestcase(yyruleno==387); - case 393: /* tag_def_or_ref_opt ::= */ yytestcase(yyruleno==393); - case 654: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==654); - case 684: /* group_by_clause_opt ::= */ yytestcase(yyruleno==684); - case 704: /* order_by_clause_opt ::= */ yytestcase(yyruleno==704); -{ yymsp[1].minor.yy984 = NULL; } + case 398: /* col_list_opt ::= */ yytestcase(yyruleno==398); + case 404: /* tag_def_or_ref_opt ::= */ yytestcase(yyruleno==404); + case 666: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==666); + case 696: /* group_by_clause_opt ::= */ yytestcase(yyruleno==696); + case 716: /* order_by_clause_opt ::= */ yytestcase(yyruleno==716); +#line 95 "sql.y" +{ yymsp[1].minor.yy694 = NULL; } +#line 5633 "sql.c" break; case 28: /* white_list_opt ::= white_list */ case 233: /* tags_def_opt ::= tags_def */ yytestcase(yyruleno==233); - case 394: /* tag_def_or_ref_opt ::= tags_def */ yytestcase(yyruleno==394); - case 562: /* star_func_para_list ::= other_para_list */ yytestcase(yyruleno==562); -{ yylhsminor.yy984 = yymsp[0].minor.yy984; } - yymsp[0].minor.yy984 = yylhsminor.yy984; + case 405: /* tag_def_or_ref_opt ::= tags_def */ yytestcase(yyruleno==405); + case 574: /* star_func_para_list ::= other_para_list */ yytestcase(yyruleno==574); +#line 96 "sql.y" +{ yylhsminor.yy694 = yymsp[0].minor.yy694; } +#line 5641 "sql.c" + yymsp[0].minor.yy694 = yylhsminor.yy694; break; case 29: /* cmd ::= CREATE USER user_name PASS NK_STRING sysinfo_opt white_list_opt */ +#line 100 "sql.y" { - pCxt->pRootNode = createCreateUserStmt(pCxt, &yymsp[-4].minor.yy1045, &yymsp[-2].minor.yy0, yymsp[-1].minor.yy443); - pCxt->pRootNode = addCreateUserStmtWhiteList(pCxt, pCxt->pRootNode, yymsp[0].minor.yy984); + pCxt->pRootNode = createCreateUserStmt(pCxt, &yymsp[-4].minor.yy659, &yymsp[-2].minor.yy0, yymsp[-1].minor.yy173); + pCxt->pRootNode = addCreateUserStmtWhiteList(pCxt, pCxt->pRootNode, yymsp[0].minor.yy694); } +#line 5650 "sql.c" break; case 30: /* cmd ::= ALTER USER user_name PASS NK_STRING */ -{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy1045, TSDB_ALTER_USER_PASSWD, &yymsp[0].minor.yy0); } +#line 104 "sql.y" +{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy659, TSDB_ALTER_USER_PASSWD, &yymsp[0].minor.yy0); } +#line 5655 "sql.c" break; case 31: /* cmd ::= ALTER USER user_name ENABLE NK_INTEGER */ -{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy1045, TSDB_ALTER_USER_ENABLE, &yymsp[0].minor.yy0); } +#line 105 "sql.y" +{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy659, TSDB_ALTER_USER_ENABLE, &yymsp[0].minor.yy0); } +#line 5660 "sql.c" break; case 32: /* cmd ::= ALTER USER user_name SYSINFO NK_INTEGER */ -{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy1045, TSDB_ALTER_USER_SYSINFO, &yymsp[0].minor.yy0); } +#line 106 "sql.y" +{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy659, TSDB_ALTER_USER_SYSINFO, &yymsp[0].minor.yy0); } +#line 5665 "sql.c" break; case 33: /* cmd ::= ALTER USER user_name ADD white_list */ -{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy1045, TSDB_ALTER_USER_ADD_WHITE_LIST, yymsp[0].minor.yy984); } +#line 107 "sql.y" +{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy659, TSDB_ALTER_USER_ADD_WHITE_LIST, yymsp[0].minor.yy694); } +#line 5670 "sql.c" break; case 34: /* cmd ::= ALTER USER user_name DROP white_list */ -{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy1045, TSDB_ALTER_USER_DROP_WHITE_LIST, yymsp[0].minor.yy984); } +#line 108 "sql.y" +{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy659, TSDB_ALTER_USER_DROP_WHITE_LIST, yymsp[0].minor.yy694); } +#line 5675 "sql.c" break; case 35: /* cmd ::= DROP USER user_name */ -{ pCxt->pRootNode = createDropUserStmt(pCxt, &yymsp[0].minor.yy1045); } +#line 109 "sql.y" +{ pCxt->pRootNode = createDropUserStmt(pCxt, &yymsp[0].minor.yy659); } +#line 5680 "sql.c" break; case 36: /* sysinfo_opt ::= */ -{ yymsp[1].minor.yy443 = 1; } +#line 113 "sql.y" +{ yymsp[1].minor.yy173 = 1; } +#line 5685 "sql.c" break; case 37: /* sysinfo_opt ::= SYSINFO NK_INTEGER */ -{ yymsp[-1].minor.yy443 = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); } +#line 114 "sql.y" +{ yymsp[-1].minor.yy173 = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); } +#line 5690 "sql.c" break; case 38: /* cmd ::= GRANT privileges ON priv_level with_opt TO user_name */ -{ pCxt->pRootNode = createGrantStmt(pCxt, yymsp[-5].minor.yy817, &yymsp[-3].minor.yy525, &yymsp[0].minor.yy1045, yymsp[-2].minor.yy720); } +#line 117 "sql.y" +{ pCxt->pRootNode = createGrantStmt(pCxt, yymsp[-5].minor.yy729, &yymsp[-3].minor.yy967, &yymsp[0].minor.yy659, yymsp[-2].minor.yy722); } +#line 5695 "sql.c" break; case 39: /* cmd ::= REVOKE privileges ON priv_level with_opt FROM user_name */ -{ pCxt->pRootNode = createRevokeStmt(pCxt, yymsp[-5].minor.yy817, &yymsp[-3].minor.yy525, &yymsp[0].minor.yy1045, yymsp[-2].minor.yy720); } +#line 118 "sql.y" +{ pCxt->pRootNode = createRevokeStmt(pCxt, yymsp[-5].minor.yy729, &yymsp[-3].minor.yy967, &yymsp[0].minor.yy659, yymsp[-2].minor.yy722); } +#line 5700 "sql.c" break; case 40: /* privileges ::= ALL */ -{ yymsp[0].minor.yy817 = PRIVILEGE_TYPE_ALL; } +#line 122 "sql.y" +{ yymsp[0].minor.yy729 = PRIVILEGE_TYPE_ALL; } +#line 5705 "sql.c" break; case 41: /* privileges ::= priv_type_list */ case 43: /* priv_type_list ::= priv_type */ yytestcase(yyruleno==43); -{ yylhsminor.yy817 = yymsp[0].minor.yy817; } - yymsp[0].minor.yy817 = yylhsminor.yy817; +#line 123 "sql.y" +{ yylhsminor.yy729 = yymsp[0].minor.yy729; } +#line 5711 "sql.c" + yymsp[0].minor.yy729 = yylhsminor.yy729; break; case 42: /* privileges ::= SUBSCRIBE */ -{ yymsp[0].minor.yy817 = PRIVILEGE_TYPE_SUBSCRIBE; } +#line 124 "sql.y" +{ yymsp[0].minor.yy729 = PRIVILEGE_TYPE_SUBSCRIBE; } +#line 5717 "sql.c" break; case 44: /* priv_type_list ::= priv_type_list NK_COMMA priv_type */ -{ yylhsminor.yy817 = yymsp[-2].minor.yy817 | yymsp[0].minor.yy817; } - yymsp[-2].minor.yy817 = yylhsminor.yy817; +#line 129 "sql.y" +{ yylhsminor.yy729 = yymsp[-2].minor.yy729 | yymsp[0].minor.yy729; } +#line 5722 "sql.c" + yymsp[-2].minor.yy729 = yylhsminor.yy729; break; case 45: /* priv_type ::= READ */ -{ yymsp[0].minor.yy817 = PRIVILEGE_TYPE_READ; } +#line 133 "sql.y" +{ yymsp[0].minor.yy729 = PRIVILEGE_TYPE_READ; } +#line 5728 "sql.c" break; case 46: /* priv_type ::= WRITE */ -{ yymsp[0].minor.yy817 = PRIVILEGE_TYPE_WRITE; } +#line 134 "sql.y" +{ yymsp[0].minor.yy729 = PRIVILEGE_TYPE_WRITE; } +#line 5733 "sql.c" break; case 47: /* priv_type ::= ALTER */ -{ yymsp[0].minor.yy817 = PRIVILEGE_TYPE_ALTER; } +#line 135 "sql.y" +{ yymsp[0].minor.yy729 = PRIVILEGE_TYPE_ALTER; } +#line 5738 "sql.c" break; case 48: /* priv_level ::= NK_STAR NK_DOT NK_STAR */ -{ yylhsminor.yy525.first = yymsp[-2].minor.yy0; yylhsminor.yy525.second = yymsp[0].minor.yy0; } - yymsp[-2].minor.yy525 = yylhsminor.yy525; +#line 139 "sql.y" +{ yylhsminor.yy967.first = yymsp[-2].minor.yy0; yylhsminor.yy967.second = yymsp[0].minor.yy0; } +#line 5743 "sql.c" + yymsp[-2].minor.yy967 = yylhsminor.yy967; break; case 49: /* priv_level ::= db_name NK_DOT NK_STAR */ -{ yylhsminor.yy525.first = yymsp[-2].minor.yy1045; yylhsminor.yy525.second = yymsp[0].minor.yy0; } - yymsp[-2].minor.yy525 = yylhsminor.yy525; +#line 140 "sql.y" +{ yylhsminor.yy967.first = yymsp[-2].minor.yy659; yylhsminor.yy967.second = yymsp[0].minor.yy0; } +#line 5749 "sql.c" + yymsp[-2].minor.yy967 = yylhsminor.yy967; break; case 50: /* priv_level ::= db_name NK_DOT table_name */ -{ yylhsminor.yy525.first = yymsp[-2].minor.yy1045; yylhsminor.yy525.second = yymsp[0].minor.yy1045; } - yymsp[-2].minor.yy525 = yylhsminor.yy525; +#line 141 "sql.y" +{ yylhsminor.yy967.first = yymsp[-2].minor.yy659; yylhsminor.yy967.second = yymsp[0].minor.yy659; } +#line 5755 "sql.c" + yymsp[-2].minor.yy967 = yylhsminor.yy967; break; case 51: /* priv_level ::= topic_name */ -{ yylhsminor.yy525.first = yymsp[0].minor.yy1045; yylhsminor.yy525.second = nil_token; } - yymsp[0].minor.yy525 = yylhsminor.yy525; +#line 142 "sql.y" +{ yylhsminor.yy967.first = yymsp[0].minor.yy659; yylhsminor.yy967.second = nil_token; } +#line 5761 "sql.c" + yymsp[0].minor.yy967 = yylhsminor.yy967; break; case 52: /* with_opt ::= */ case 165: /* start_opt ::= */ yytestcase(yyruleno==165); case 169: /* end_opt ::= */ yytestcase(yyruleno==169); case 316: /* like_pattern_opt ::= */ yytestcase(yyruleno==316); - case 405: /* subtable_opt ::= */ yytestcase(yyruleno==405); - case 572: /* case_when_else_opt ::= */ yytestcase(yyruleno==572); - case 602: /* from_clause_opt ::= */ yytestcase(yyruleno==602); - case 629: /* join_on_clause_opt ::= */ yytestcase(yyruleno==629); - case 631: /* window_offset_clause_opt ::= */ yytestcase(yyruleno==631); - case 635: /* jlimit_clause_opt ::= */ yytestcase(yyruleno==635); - case 652: /* where_clause_opt ::= */ yytestcase(yyruleno==652); - case 661: /* twindow_clause_opt ::= */ yytestcase(yyruleno==661); - case 669: /* sliding_opt ::= */ yytestcase(yyruleno==669); - case 674: /* fill_opt ::= */ yytestcase(yyruleno==674); - case 688: /* having_clause_opt ::= */ yytestcase(yyruleno==688); - case 690: /* range_opt ::= */ yytestcase(yyruleno==690); - case 693: /* every_opt ::= */ yytestcase(yyruleno==693); - case 706: /* slimit_clause_opt ::= */ yytestcase(yyruleno==706); - case 710: /* limit_clause_opt ::= */ yytestcase(yyruleno==710); -{ yymsp[1].minor.yy720 = NULL; } + case 416: /* subtable_opt ::= */ yytestcase(yyruleno==416); + case 584: /* case_when_else_opt ::= */ yytestcase(yyruleno==584); + case 614: /* from_clause_opt ::= */ yytestcase(yyruleno==614); + case 641: /* join_on_clause_opt ::= */ yytestcase(yyruleno==641); + case 643: /* window_offset_clause_opt ::= */ yytestcase(yyruleno==643); + case 647: /* jlimit_clause_opt ::= */ yytestcase(yyruleno==647); + case 664: /* where_clause_opt ::= */ yytestcase(yyruleno==664); + case 673: /* twindow_clause_opt ::= */ yytestcase(yyruleno==673); + case 681: /* sliding_opt ::= */ yytestcase(yyruleno==681); + case 686: /* fill_opt ::= */ yytestcase(yyruleno==686); + case 700: /* having_clause_opt ::= */ yytestcase(yyruleno==700); + case 702: /* range_opt ::= */ yytestcase(yyruleno==702); + case 705: /* every_opt ::= */ yytestcase(yyruleno==705); + case 718: /* slimit_clause_opt ::= */ yytestcase(yyruleno==718); + case 722: /* limit_clause_opt ::= */ yytestcase(yyruleno==722); +#line 144 "sql.y" +{ yymsp[1].minor.yy722 = NULL; } +#line 5785 "sql.c" break; case 53: /* with_opt ::= WITH search_condition */ - case 603: /* from_clause_opt ::= FROM table_reference_list */ yytestcase(yyruleno==603); - case 630: /* join_on_clause_opt ::= ON search_condition */ yytestcase(yyruleno==630); - case 653: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==653); - case 689: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==689); -{ yymsp[-1].minor.yy720 = yymsp[0].minor.yy720; } + case 615: /* from_clause_opt ::= FROM table_reference_list */ yytestcase(yyruleno==615); + case 642: /* join_on_clause_opt ::= ON search_condition */ yytestcase(yyruleno==642); + case 665: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==665); + case 701: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==701); +#line 145 "sql.y" +{ yymsp[-1].minor.yy722 = yymsp[0].minor.yy722; } +#line 5794 "sql.c" break; case 54: /* cmd ::= CREATE DNODE dnode_endpoint */ -{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[0].minor.yy1045, NULL); } +#line 148 "sql.y" +{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[0].minor.yy659, NULL); } +#line 5799 "sql.c" break; case 55: /* cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */ -{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[-2].minor.yy1045, &yymsp[0].minor.yy0); } +#line 149 "sql.y" +{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[-2].minor.yy659, &yymsp[0].minor.yy0); } +#line 5804 "sql.c" break; case 56: /* cmd ::= DROP DNODE NK_INTEGER force_opt */ -{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy833, false); } +#line 150 "sql.y" +{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy897, false); } +#line 5809 "sql.c" break; case 57: /* cmd ::= DROP DNODE dnode_endpoint force_opt */ -{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy1045, yymsp[0].minor.yy833, false); } +#line 151 "sql.y" +{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy659, yymsp[0].minor.yy897, false); } +#line 5814 "sql.c" break; case 58: /* cmd ::= DROP DNODE NK_INTEGER unsafe_opt */ -{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy0, false, yymsp[0].minor.yy833); } +#line 152 "sql.y" +{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy0, false, yymsp[0].minor.yy897); } +#line 5819 "sql.c" break; case 59: /* cmd ::= DROP DNODE dnode_endpoint unsafe_opt */ -{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy1045, false, yymsp[0].minor.yy833); } +#line 153 "sql.y" +{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy659, false, yymsp[0].minor.yy897); } +#line 5824 "sql.c" break; case 60: /* cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ +#line 154 "sql.y" { pCxt->pRootNode = createAlterDnodeStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, NULL); } +#line 5829 "sql.c" break; case 61: /* cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */ +#line 155 "sql.y" { pCxt->pRootNode = createAlterDnodeStmt(pCxt, &yymsp[-2].minor.yy0, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } +#line 5834 "sql.c" break; case 62: /* cmd ::= ALTER ALL DNODES NK_STRING */ +#line 156 "sql.y" { pCxt->pRootNode = createAlterDnodeStmt(pCxt, NULL, &yymsp[0].minor.yy0, NULL); } +#line 5839 "sql.c" break; case 63: /* cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */ +#line 157 "sql.y" { pCxt->pRootNode = createAlterDnodeStmt(pCxt, NULL, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } +#line 5844 "sql.c" break; case 64: /* cmd ::= RESTORE DNODE NK_INTEGER */ +#line 158 "sql.y" { pCxt->pRootNode = createRestoreComponentNodeStmt(pCxt, QUERY_NODE_RESTORE_DNODE_STMT, &yymsp[0].minor.yy0); } +#line 5849 "sql.c" break; case 65: /* dnode_endpoint ::= NK_STRING */ case 66: /* dnode_endpoint ::= NK_ID */ yytestcase(yyruleno==66); case 67: /* dnode_endpoint ::= NK_IPTOKEN */ yytestcase(yyruleno==67); - case 343: /* sma_func_name ::= COUNT */ yytestcase(yyruleno==343); - case 344: /* sma_func_name ::= FIRST */ yytestcase(yyruleno==344); - case 345: /* sma_func_name ::= LAST */ yytestcase(yyruleno==345); - case 346: /* sma_func_name ::= LAST_ROW */ yytestcase(yyruleno==346); - case 492: /* db_name ::= NK_ID */ yytestcase(yyruleno==492); - case 493: /* table_name ::= NK_ID */ yytestcase(yyruleno==493); - case 494: /* column_name ::= NK_ID */ yytestcase(yyruleno==494); - case 495: /* function_name ::= NK_ID */ yytestcase(yyruleno==495); - case 496: /* view_name ::= NK_ID */ yytestcase(yyruleno==496); - case 497: /* table_alias ::= NK_ID */ yytestcase(yyruleno==497); - case 498: /* column_alias ::= NK_ID */ yytestcase(yyruleno==498); - case 499: /* column_alias ::= NK_ALIAS */ yytestcase(yyruleno==499); - case 500: /* user_name ::= NK_ID */ yytestcase(yyruleno==500); - case 501: /* topic_name ::= NK_ID */ yytestcase(yyruleno==501); - case 502: /* stream_name ::= NK_ID */ yytestcase(yyruleno==502); - case 503: /* cgroup_name ::= NK_ID */ yytestcase(yyruleno==503); - case 504: /* index_name ::= NK_ID */ yytestcase(yyruleno==504); - case 548: /* noarg_func ::= NOW */ yytestcase(yyruleno==548); - case 549: /* noarg_func ::= TODAY */ yytestcase(yyruleno==549); - case 550: /* noarg_func ::= TIMEZONE */ yytestcase(yyruleno==550); - case 551: /* noarg_func ::= DATABASE */ yytestcase(yyruleno==551); - case 552: /* noarg_func ::= CLIENT_VERSION */ yytestcase(yyruleno==552); - case 553: /* noarg_func ::= SERVER_VERSION */ yytestcase(yyruleno==553); - case 554: /* noarg_func ::= SERVER_STATUS */ yytestcase(yyruleno==554); - case 555: /* noarg_func ::= CURRENT_USER */ yytestcase(yyruleno==555); - case 556: /* noarg_func ::= USER */ yytestcase(yyruleno==556); - case 557: /* star_func ::= COUNT */ yytestcase(yyruleno==557); - case 558: /* star_func ::= FIRST */ yytestcase(yyruleno==558); - case 559: /* star_func ::= LAST */ yytestcase(yyruleno==559); - case 560: /* star_func ::= LAST_ROW */ yytestcase(yyruleno==560); -{ yylhsminor.yy1045 = yymsp[0].minor.yy0; } - yymsp[0].minor.yy1045 = yylhsminor.yy1045; + case 354: /* sma_func_name ::= COUNT */ yytestcase(yyruleno==354); + case 355: /* sma_func_name ::= FIRST */ yytestcase(yyruleno==355); + case 356: /* sma_func_name ::= LAST */ yytestcase(yyruleno==356); + case 357: /* sma_func_name ::= LAST_ROW */ yytestcase(yyruleno==357); + case 503: /* db_name ::= NK_ID */ yytestcase(yyruleno==503); + case 504: /* table_name ::= NK_ID */ yytestcase(yyruleno==504); + case 505: /* column_name ::= NK_ID */ yytestcase(yyruleno==505); + case 506: /* function_name ::= NK_ID */ yytestcase(yyruleno==506); + case 507: /* view_name ::= NK_ID */ yytestcase(yyruleno==507); + case 508: /* table_alias ::= NK_ID */ yytestcase(yyruleno==508); + case 509: /* column_alias ::= NK_ID */ yytestcase(yyruleno==509); + case 510: /* column_alias ::= NK_ALIAS */ yytestcase(yyruleno==510); + case 511: /* user_name ::= NK_ID */ yytestcase(yyruleno==511); + case 512: /* topic_name ::= NK_ID */ yytestcase(yyruleno==512); + case 513: /* stream_name ::= NK_ID */ yytestcase(yyruleno==513); + case 514: /* cgroup_name ::= NK_ID */ yytestcase(yyruleno==514); + case 515: /* index_name ::= NK_ID */ yytestcase(yyruleno==515); + case 516: /* tsma_name ::= NK_ID */ yytestcase(yyruleno==516); + case 560: /* noarg_func ::= NOW */ yytestcase(yyruleno==560); + case 561: /* noarg_func ::= TODAY */ yytestcase(yyruleno==561); + case 562: /* noarg_func ::= TIMEZONE */ yytestcase(yyruleno==562); + case 563: /* noarg_func ::= DATABASE */ yytestcase(yyruleno==563); + case 564: /* noarg_func ::= CLIENT_VERSION */ yytestcase(yyruleno==564); + case 565: /* noarg_func ::= SERVER_VERSION */ yytestcase(yyruleno==565); + case 566: /* noarg_func ::= SERVER_STATUS */ yytestcase(yyruleno==566); + case 567: /* noarg_func ::= CURRENT_USER */ yytestcase(yyruleno==567); + case 568: /* noarg_func ::= USER */ yytestcase(yyruleno==568); + case 569: /* star_func ::= COUNT */ yytestcase(yyruleno==569); + case 570: /* star_func ::= FIRST */ yytestcase(yyruleno==570); + case 571: /* star_func ::= LAST */ yytestcase(yyruleno==571); + case 572: /* star_func ::= LAST_ROW */ yytestcase(yyruleno==572); +#line 162 "sql.y" +{ yylhsminor.yy659 = yymsp[0].minor.yy0; } +#line 5887 "sql.c" + yymsp[0].minor.yy659 = yylhsminor.yy659; break; case 68: /* force_opt ::= */ case 95: /* not_exists_opt ::= */ yytestcase(yyruleno==95); case 97: /* exists_opt ::= */ yytestcase(yyruleno==97); - case 364: /* analyze_opt ::= */ yytestcase(yyruleno==364); - case 371: /* agg_func_opt ::= */ yytestcase(yyruleno==371); - case 377: /* or_replace_opt ::= */ yytestcase(yyruleno==377); - case 407: /* ignore_opt ::= */ yytestcase(yyruleno==407); - case 640: /* tag_mode_opt ::= */ yytestcase(yyruleno==640); - case 642: /* set_quantifier_opt ::= */ yytestcase(yyruleno==642); -{ yymsp[1].minor.yy833 = false; } + case 375: /* analyze_opt ::= */ yytestcase(yyruleno==375); + case 382: /* agg_func_opt ::= */ yytestcase(yyruleno==382); + case 388: /* or_replace_opt ::= */ yytestcase(yyruleno==388); + case 418: /* ignore_opt ::= */ yytestcase(yyruleno==418); + case 652: /* tag_mode_opt ::= */ yytestcase(yyruleno==652); + case 654: /* set_quantifier_opt ::= */ yytestcase(yyruleno==654); +#line 168 "sql.y" +{ yymsp[1].minor.yy897 = false; } +#line 5901 "sql.c" break; case 69: /* force_opt ::= FORCE */ case 70: /* unsafe_opt ::= UNSAFE */ yytestcase(yyruleno==70); - case 365: /* analyze_opt ::= ANALYZE */ yytestcase(yyruleno==365); - case 372: /* agg_func_opt ::= AGGREGATE */ yytestcase(yyruleno==372); - case 641: /* tag_mode_opt ::= TAGS */ yytestcase(yyruleno==641); - case 643: /* set_quantifier_opt ::= DISTINCT */ yytestcase(yyruleno==643); -{ yymsp[0].minor.yy833 = true; } + case 376: /* analyze_opt ::= ANALYZE */ yytestcase(yyruleno==376); + case 383: /* agg_func_opt ::= AGGREGATE */ yytestcase(yyruleno==383); + case 653: /* tag_mode_opt ::= TAGS */ yytestcase(yyruleno==653); + case 655: /* set_quantifier_opt ::= DISTINCT */ yytestcase(yyruleno==655); +#line 169 "sql.y" +{ yymsp[0].minor.yy897 = true; } +#line 5911 "sql.c" break; case 71: /* cmd ::= ALTER CLUSTER NK_STRING */ +#line 176 "sql.y" { pCxt->pRootNode = createAlterClusterStmt(pCxt, &yymsp[0].minor.yy0, NULL); } +#line 5916 "sql.c" break; case 72: /* cmd ::= ALTER CLUSTER NK_STRING NK_STRING */ +#line 177 "sql.y" { pCxt->pRootNode = createAlterClusterStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } +#line 5921 "sql.c" break; case 73: /* cmd ::= ALTER LOCAL NK_STRING */ +#line 180 "sql.y" { pCxt->pRootNode = createAlterLocalStmt(pCxt, &yymsp[0].minor.yy0, NULL); } +#line 5926 "sql.c" break; case 74: /* cmd ::= ALTER LOCAL NK_STRING NK_STRING */ +#line 181 "sql.y" { pCxt->pRootNode = createAlterLocalStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } +#line 5931 "sql.c" break; case 75: /* cmd ::= CREATE QNODE ON DNODE NK_INTEGER */ +#line 184 "sql.y" { pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_QNODE_STMT, &yymsp[0].minor.yy0); } +#line 5936 "sql.c" break; case 76: /* cmd ::= DROP QNODE ON DNODE NK_INTEGER */ +#line 185 "sql.y" { pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_QNODE_STMT, &yymsp[0].minor.yy0); } +#line 5941 "sql.c" break; case 77: /* cmd ::= RESTORE QNODE ON DNODE NK_INTEGER */ +#line 186 "sql.y" { pCxt->pRootNode = createRestoreComponentNodeStmt(pCxt, QUERY_NODE_RESTORE_QNODE_STMT, &yymsp[0].minor.yy0); } +#line 5946 "sql.c" break; case 78: /* cmd ::= CREATE BNODE ON DNODE NK_INTEGER */ +#line 189 "sql.y" { pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_BNODE_STMT, &yymsp[0].minor.yy0); } +#line 5951 "sql.c" break; case 79: /* cmd ::= DROP BNODE ON DNODE NK_INTEGER */ +#line 190 "sql.y" { pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_BNODE_STMT, &yymsp[0].minor.yy0); } +#line 5956 "sql.c" break; case 80: /* cmd ::= CREATE SNODE ON DNODE NK_INTEGER */ +#line 193 "sql.y" { pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_SNODE_STMT, &yymsp[0].minor.yy0); } +#line 5961 "sql.c" break; case 81: /* cmd ::= DROP SNODE ON DNODE NK_INTEGER */ +#line 194 "sql.y" { pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_SNODE_STMT, &yymsp[0].minor.yy0); } +#line 5966 "sql.c" break; case 82: /* cmd ::= CREATE MNODE ON DNODE NK_INTEGER */ +#line 197 "sql.y" { pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_MNODE_STMT, &yymsp[0].minor.yy0); } +#line 5971 "sql.c" break; case 83: /* cmd ::= DROP MNODE ON DNODE NK_INTEGER */ +#line 198 "sql.y" { pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_MNODE_STMT, &yymsp[0].minor.yy0); } +#line 5976 "sql.c" break; case 84: /* cmd ::= RESTORE MNODE ON DNODE NK_INTEGER */ +#line 199 "sql.y" { pCxt->pRootNode = createRestoreComponentNodeStmt(pCxt, QUERY_NODE_RESTORE_MNODE_STMT, &yymsp[0].minor.yy0); } +#line 5981 "sql.c" break; case 85: /* cmd ::= RESTORE VNODE ON DNODE NK_INTEGER */ +#line 202 "sql.y" { pCxt->pRootNode = createRestoreComponentNodeStmt(pCxt, QUERY_NODE_RESTORE_VNODE_STMT, &yymsp[0].minor.yy0); } +#line 5986 "sql.c" break; case 86: /* cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ -{ pCxt->pRootNode = createCreateDatabaseStmt(pCxt, yymsp[-2].minor.yy833, &yymsp[-1].minor.yy1045, yymsp[0].minor.yy720); } +#line 205 "sql.y" +{ pCxt->pRootNode = createCreateDatabaseStmt(pCxt, yymsp[-2].minor.yy897, &yymsp[-1].minor.yy659, yymsp[0].minor.yy722); } +#line 5991 "sql.c" break; case 87: /* cmd ::= DROP DATABASE exists_opt db_name */ -{ pCxt->pRootNode = createDropDatabaseStmt(pCxt, yymsp[-1].minor.yy833, &yymsp[0].minor.yy1045); } +#line 206 "sql.y" +{ pCxt->pRootNode = createDropDatabaseStmt(pCxt, yymsp[-1].minor.yy897, &yymsp[0].minor.yy659); } +#line 5996 "sql.c" break; case 88: /* cmd ::= USE db_name */ -{ pCxt->pRootNode = createUseDatabaseStmt(pCxt, &yymsp[0].minor.yy1045); } +#line 207 "sql.y" +{ pCxt->pRootNode = createUseDatabaseStmt(pCxt, &yymsp[0].minor.yy659); } +#line 6001 "sql.c" break; case 89: /* cmd ::= ALTER DATABASE db_name alter_db_options */ -{ pCxt->pRootNode = createAlterDatabaseStmt(pCxt, &yymsp[-1].minor.yy1045, yymsp[0].minor.yy720); } +#line 208 "sql.y" +{ pCxt->pRootNode = createAlterDatabaseStmt(pCxt, &yymsp[-1].minor.yy659, yymsp[0].minor.yy722); } +#line 6006 "sql.c" break; case 90: /* cmd ::= FLUSH DATABASE db_name */ -{ pCxt->pRootNode = createFlushDatabaseStmt(pCxt, &yymsp[0].minor.yy1045); } +#line 209 "sql.y" +{ pCxt->pRootNode = createFlushDatabaseStmt(pCxt, &yymsp[0].minor.yy659); } +#line 6011 "sql.c" break; case 91: /* cmd ::= TRIM DATABASE db_name speed_opt */ -{ pCxt->pRootNode = createTrimDatabaseStmt(pCxt, &yymsp[-1].minor.yy1045, yymsp[0].minor.yy488); } +#line 210 "sql.y" +{ pCxt->pRootNode = createTrimDatabaseStmt(pCxt, &yymsp[-1].minor.yy659, yymsp[0].minor.yy830); } +#line 6016 "sql.c" break; case 92: /* cmd ::= S3MIGRATE DATABASE db_name */ -{ pCxt->pRootNode = createS3MigrateDatabaseStmt(pCxt, &yymsp[0].minor.yy1045); } +#line 211 "sql.y" +{ pCxt->pRootNode = createS3MigrateDatabaseStmt(pCxt, &yymsp[0].minor.yy659); } +#line 6021 "sql.c" break; case 93: /* cmd ::= COMPACT DATABASE db_name start_opt end_opt */ -{ pCxt->pRootNode = createCompactStmt(pCxt, &yymsp[-2].minor.yy1045, yymsp[-1].minor.yy720, yymsp[0].minor.yy720); } +#line 212 "sql.y" +{ pCxt->pRootNode = createCompactStmt(pCxt, &yymsp[-2].minor.yy659, yymsp[-1].minor.yy722, yymsp[0].minor.yy722); } +#line 6026 "sql.c" break; case 94: /* not_exists_opt ::= IF NOT EXISTS */ -{ yymsp[-2].minor.yy833 = true; } +#line 216 "sql.y" +{ yymsp[-2].minor.yy897 = true; } +#line 6031 "sql.c" break; case 96: /* exists_opt ::= IF EXISTS */ - case 378: /* or_replace_opt ::= OR REPLACE */ yytestcase(yyruleno==378); - case 408: /* ignore_opt ::= IGNORE UNTREATED */ yytestcase(yyruleno==408); -{ yymsp[-1].minor.yy833 = true; } + case 389: /* or_replace_opt ::= OR REPLACE */ yytestcase(yyruleno==389); + case 419: /* ignore_opt ::= IGNORE UNTREATED */ yytestcase(yyruleno==419); +#line 221 "sql.y" +{ yymsp[-1].minor.yy897 = true; } +#line 6038 "sql.c" break; case 98: /* db_options ::= */ -{ yymsp[1].minor.yy720 = createDefaultDatabaseOptions(pCxt); } +#line 224 "sql.y" +{ yymsp[1].minor.yy722 = createDefaultDatabaseOptions(pCxt); } +#line 6043 "sql.c" break; case 99: /* db_options ::= db_options BUFFER NK_INTEGER */ -{ yylhsminor.yy720 = setDatabaseOption(pCxt, yymsp[-2].minor.yy720, DB_OPTION_BUFFER, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy720 = yylhsminor.yy720; +#line 225 "sql.y" +{ yylhsminor.yy722 = setDatabaseOption(pCxt, yymsp[-2].minor.yy722, DB_OPTION_BUFFER, &yymsp[0].minor.yy0); } +#line 6048 "sql.c" + yymsp[-2].minor.yy722 = yylhsminor.yy722; break; case 100: /* db_options ::= db_options CACHEMODEL NK_STRING */ -{ yylhsminor.yy720 = setDatabaseOption(pCxt, yymsp[-2].minor.yy720, DB_OPTION_CACHEMODEL, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy720 = yylhsminor.yy720; +#line 226 "sql.y" +{ yylhsminor.yy722 = setDatabaseOption(pCxt, yymsp[-2].minor.yy722, DB_OPTION_CACHEMODEL, &yymsp[0].minor.yy0); } +#line 6054 "sql.c" + yymsp[-2].minor.yy722 = yylhsminor.yy722; break; case 101: /* db_options ::= db_options CACHESIZE NK_INTEGER */ -{ yylhsminor.yy720 = setDatabaseOption(pCxt, yymsp[-2].minor.yy720, DB_OPTION_CACHESIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy720 = yylhsminor.yy720; +#line 227 "sql.y" +{ yylhsminor.yy722 = setDatabaseOption(pCxt, yymsp[-2].minor.yy722, DB_OPTION_CACHESIZE, &yymsp[0].minor.yy0); } +#line 6060 "sql.c" + yymsp[-2].minor.yy722 = yylhsminor.yy722; break; case 102: /* db_options ::= db_options COMP NK_INTEGER */ -{ yylhsminor.yy720 = setDatabaseOption(pCxt, yymsp[-2].minor.yy720, DB_OPTION_COMP, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy720 = yylhsminor.yy720; +#line 228 "sql.y" +{ yylhsminor.yy722 = setDatabaseOption(pCxt, yymsp[-2].minor.yy722, DB_OPTION_COMP, &yymsp[0].minor.yy0); } +#line 6066 "sql.c" + yymsp[-2].minor.yy722 = yylhsminor.yy722; break; case 103: /* db_options ::= db_options DURATION NK_INTEGER */ case 104: /* db_options ::= db_options DURATION NK_VARIABLE */ yytestcase(yyruleno==104); -{ yylhsminor.yy720 = setDatabaseOption(pCxt, yymsp[-2].minor.yy720, DB_OPTION_DAYS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy720 = yylhsminor.yy720; +#line 229 "sql.y" +{ yylhsminor.yy722 = setDatabaseOption(pCxt, yymsp[-2].minor.yy722, DB_OPTION_DAYS, &yymsp[0].minor.yy0); } +#line 6073 "sql.c" + yymsp[-2].minor.yy722 = yylhsminor.yy722; break; case 105: /* db_options ::= db_options MAXROWS NK_INTEGER */ -{ yylhsminor.yy720 = setDatabaseOption(pCxt, yymsp[-2].minor.yy720, DB_OPTION_MAXROWS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy720 = yylhsminor.yy720; +#line 231 "sql.y" +{ yylhsminor.yy722 = setDatabaseOption(pCxt, yymsp[-2].minor.yy722, DB_OPTION_MAXROWS, &yymsp[0].minor.yy0); } +#line 6079 "sql.c" + yymsp[-2].minor.yy722 = yylhsminor.yy722; break; case 106: /* db_options ::= db_options MINROWS NK_INTEGER */ -{ yylhsminor.yy720 = setDatabaseOption(pCxt, yymsp[-2].minor.yy720, DB_OPTION_MINROWS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy720 = yylhsminor.yy720; +#line 232 "sql.y" +{ yylhsminor.yy722 = setDatabaseOption(pCxt, yymsp[-2].minor.yy722, DB_OPTION_MINROWS, &yymsp[0].minor.yy0); } +#line 6085 "sql.c" + yymsp[-2].minor.yy722 = yylhsminor.yy722; break; case 107: /* db_options ::= db_options KEEP integer_list */ case 108: /* db_options ::= db_options KEEP variable_list */ yytestcase(yyruleno==108); -{ yylhsminor.yy720 = setDatabaseOption(pCxt, yymsp[-2].minor.yy720, DB_OPTION_KEEP, yymsp[0].minor.yy984); } - yymsp[-2].minor.yy720 = yylhsminor.yy720; +#line 233 "sql.y" +{ yylhsminor.yy722 = setDatabaseOption(pCxt, yymsp[-2].minor.yy722, DB_OPTION_KEEP, yymsp[0].minor.yy694); } +#line 6092 "sql.c" + yymsp[-2].minor.yy722 = yylhsminor.yy722; break; case 109: /* db_options ::= db_options PAGES NK_INTEGER */ -{ yylhsminor.yy720 = setDatabaseOption(pCxt, yymsp[-2].minor.yy720, DB_OPTION_PAGES, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy720 = yylhsminor.yy720; +#line 235 "sql.y" +{ yylhsminor.yy722 = setDatabaseOption(pCxt, yymsp[-2].minor.yy722, DB_OPTION_PAGES, &yymsp[0].minor.yy0); } +#line 6098 "sql.c" + yymsp[-2].minor.yy722 = yylhsminor.yy722; break; case 110: /* db_options ::= db_options PAGESIZE NK_INTEGER */ -{ yylhsminor.yy720 = setDatabaseOption(pCxt, yymsp[-2].minor.yy720, DB_OPTION_PAGESIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy720 = yylhsminor.yy720; +#line 236 "sql.y" +{ yylhsminor.yy722 = setDatabaseOption(pCxt, yymsp[-2].minor.yy722, DB_OPTION_PAGESIZE, &yymsp[0].minor.yy0); } +#line 6104 "sql.c" + yymsp[-2].minor.yy722 = yylhsminor.yy722; break; case 111: /* db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */ -{ yylhsminor.yy720 = setDatabaseOption(pCxt, yymsp[-2].minor.yy720, DB_OPTION_TSDB_PAGESIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy720 = yylhsminor.yy720; +#line 237 "sql.y" +{ yylhsminor.yy722 = setDatabaseOption(pCxt, yymsp[-2].minor.yy722, DB_OPTION_TSDB_PAGESIZE, &yymsp[0].minor.yy0); } +#line 6110 "sql.c" + yymsp[-2].minor.yy722 = yylhsminor.yy722; break; case 112: /* db_options ::= db_options PRECISION NK_STRING */ -{ yylhsminor.yy720 = setDatabaseOption(pCxt, yymsp[-2].minor.yy720, DB_OPTION_PRECISION, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy720 = yylhsminor.yy720; +#line 238 "sql.y" +{ yylhsminor.yy722 = setDatabaseOption(pCxt, yymsp[-2].minor.yy722, DB_OPTION_PRECISION, &yymsp[0].minor.yy0); } +#line 6116 "sql.c" + yymsp[-2].minor.yy722 = yylhsminor.yy722; break; case 113: /* db_options ::= db_options REPLICA NK_INTEGER */ -{ yylhsminor.yy720 = setDatabaseOption(pCxt, yymsp[-2].minor.yy720, DB_OPTION_REPLICA, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy720 = yylhsminor.yy720; +#line 239 "sql.y" +{ yylhsminor.yy722 = setDatabaseOption(pCxt, yymsp[-2].minor.yy722, DB_OPTION_REPLICA, &yymsp[0].minor.yy0); } +#line 6122 "sql.c" + yymsp[-2].minor.yy722 = yylhsminor.yy722; break; case 114: /* db_options ::= db_options VGROUPS NK_INTEGER */ -{ yylhsminor.yy720 = setDatabaseOption(pCxt, yymsp[-2].minor.yy720, DB_OPTION_VGROUPS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy720 = yylhsminor.yy720; +#line 241 "sql.y" +{ yylhsminor.yy722 = setDatabaseOption(pCxt, yymsp[-2].minor.yy722, DB_OPTION_VGROUPS, &yymsp[0].minor.yy0); } +#line 6128 "sql.c" + yymsp[-2].minor.yy722 = yylhsminor.yy722; break; case 115: /* db_options ::= db_options SINGLE_STABLE NK_INTEGER */ -{ yylhsminor.yy720 = setDatabaseOption(pCxt, yymsp[-2].minor.yy720, DB_OPTION_SINGLE_STABLE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy720 = yylhsminor.yy720; +#line 242 "sql.y" +{ yylhsminor.yy722 = setDatabaseOption(pCxt, yymsp[-2].minor.yy722, DB_OPTION_SINGLE_STABLE, &yymsp[0].minor.yy0); } +#line 6134 "sql.c" + yymsp[-2].minor.yy722 = yylhsminor.yy722; break; case 116: /* db_options ::= db_options RETENTIONS retention_list */ -{ yylhsminor.yy720 = setDatabaseOption(pCxt, yymsp[-2].minor.yy720, DB_OPTION_RETENTIONS, yymsp[0].minor.yy984); } - yymsp[-2].minor.yy720 = yylhsminor.yy720; +#line 243 "sql.y" +{ yylhsminor.yy722 = setDatabaseOption(pCxt, yymsp[-2].minor.yy722, DB_OPTION_RETENTIONS, yymsp[0].minor.yy694); } +#line 6140 "sql.c" + yymsp[-2].minor.yy722 = yylhsminor.yy722; break; case 117: /* db_options ::= db_options SCHEMALESS NK_INTEGER */ -{ yylhsminor.yy720 = setDatabaseOption(pCxt, yymsp[-2].minor.yy720, DB_OPTION_SCHEMALESS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy720 = yylhsminor.yy720; +#line 244 "sql.y" +{ yylhsminor.yy722 = setDatabaseOption(pCxt, yymsp[-2].minor.yy722, DB_OPTION_SCHEMALESS, &yymsp[0].minor.yy0); } +#line 6146 "sql.c" + yymsp[-2].minor.yy722 = yylhsminor.yy722; break; case 118: /* db_options ::= db_options WAL_LEVEL NK_INTEGER */ -{ yylhsminor.yy720 = setDatabaseOption(pCxt, yymsp[-2].minor.yy720, DB_OPTION_WAL, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy720 = yylhsminor.yy720; +#line 245 "sql.y" +{ yylhsminor.yy722 = setDatabaseOption(pCxt, yymsp[-2].minor.yy722, DB_OPTION_WAL, &yymsp[0].minor.yy0); } +#line 6152 "sql.c" + yymsp[-2].minor.yy722 = yylhsminor.yy722; break; case 119: /* db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */ -{ yylhsminor.yy720 = setDatabaseOption(pCxt, yymsp[-2].minor.yy720, DB_OPTION_FSYNC, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy720 = yylhsminor.yy720; +#line 246 "sql.y" +{ yylhsminor.yy722 = setDatabaseOption(pCxt, yymsp[-2].minor.yy722, DB_OPTION_FSYNC, &yymsp[0].minor.yy0); } +#line 6158 "sql.c" + yymsp[-2].minor.yy722 = yylhsminor.yy722; break; case 120: /* db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */ -{ yylhsminor.yy720 = setDatabaseOption(pCxt, yymsp[-2].minor.yy720, DB_OPTION_WAL_RETENTION_PERIOD, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy720 = yylhsminor.yy720; +#line 247 "sql.y" +{ yylhsminor.yy722 = setDatabaseOption(pCxt, yymsp[-2].minor.yy722, DB_OPTION_WAL_RETENTION_PERIOD, &yymsp[0].minor.yy0); } +#line 6164 "sql.c" + yymsp[-2].minor.yy722 = yylhsminor.yy722; break; case 121: /* db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ +#line 248 "sql.y" { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yylhsminor.yy720 = setDatabaseOption(pCxt, yymsp[-3].minor.yy720, DB_OPTION_WAL_RETENTION_PERIOD, &t); + yylhsminor.yy722 = setDatabaseOption(pCxt, yymsp[-3].minor.yy722, DB_OPTION_WAL_RETENTION_PERIOD, &t); } - yymsp[-3].minor.yy720 = yylhsminor.yy720; +#line 6174 "sql.c" + yymsp[-3].minor.yy722 = yylhsminor.yy722; break; case 122: /* db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */ -{ yylhsminor.yy720 = setDatabaseOption(pCxt, yymsp[-2].minor.yy720, DB_OPTION_WAL_RETENTION_SIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy720 = yylhsminor.yy720; +#line 253 "sql.y" +{ yylhsminor.yy722 = setDatabaseOption(pCxt, yymsp[-2].minor.yy722, DB_OPTION_WAL_RETENTION_SIZE, &yymsp[0].minor.yy0); } +#line 6180 "sql.c" + yymsp[-2].minor.yy722 = yylhsminor.yy722; break; case 123: /* db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ +#line 254 "sql.y" { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yylhsminor.yy720 = setDatabaseOption(pCxt, yymsp[-3].minor.yy720, DB_OPTION_WAL_RETENTION_SIZE, &t); + yylhsminor.yy722 = setDatabaseOption(pCxt, yymsp[-3].minor.yy722, DB_OPTION_WAL_RETENTION_SIZE, &t); } - yymsp[-3].minor.yy720 = yylhsminor.yy720; +#line 6190 "sql.c" + yymsp[-3].minor.yy722 = yylhsminor.yy722; break; case 124: /* db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */ -{ yylhsminor.yy720 = setDatabaseOption(pCxt, yymsp[-2].minor.yy720, DB_OPTION_WAL_ROLL_PERIOD, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy720 = yylhsminor.yy720; +#line 259 "sql.y" +{ yylhsminor.yy722 = setDatabaseOption(pCxt, yymsp[-2].minor.yy722, DB_OPTION_WAL_ROLL_PERIOD, &yymsp[0].minor.yy0); } +#line 6196 "sql.c" + yymsp[-2].minor.yy722 = yylhsminor.yy722; break; case 125: /* db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */ -{ yylhsminor.yy720 = setDatabaseOption(pCxt, yymsp[-2].minor.yy720, DB_OPTION_WAL_SEGMENT_SIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy720 = yylhsminor.yy720; +#line 260 "sql.y" +{ yylhsminor.yy722 = setDatabaseOption(pCxt, yymsp[-2].minor.yy722, DB_OPTION_WAL_SEGMENT_SIZE, &yymsp[0].minor.yy0); } +#line 6202 "sql.c" + yymsp[-2].minor.yy722 = yylhsminor.yy722; break; case 126: /* db_options ::= db_options STT_TRIGGER NK_INTEGER */ -{ yylhsminor.yy720 = setDatabaseOption(pCxt, yymsp[-2].minor.yy720, DB_OPTION_STT_TRIGGER, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy720 = yylhsminor.yy720; +#line 261 "sql.y" +{ yylhsminor.yy722 = setDatabaseOption(pCxt, yymsp[-2].minor.yy722, DB_OPTION_STT_TRIGGER, &yymsp[0].minor.yy0); } +#line 6208 "sql.c" + yymsp[-2].minor.yy722 = yylhsminor.yy722; break; case 127: /* db_options ::= db_options TABLE_PREFIX signed */ -{ yylhsminor.yy720 = setDatabaseOption(pCxt, yymsp[-2].minor.yy720, DB_OPTION_TABLE_PREFIX, yymsp[0].minor.yy720); } - yymsp[-2].minor.yy720 = yylhsminor.yy720; +#line 262 "sql.y" +{ yylhsminor.yy722 = setDatabaseOption(pCxt, yymsp[-2].minor.yy722, DB_OPTION_TABLE_PREFIX, yymsp[0].minor.yy722); } +#line 6214 "sql.c" + yymsp[-2].minor.yy722 = yylhsminor.yy722; break; case 128: /* db_options ::= db_options TABLE_SUFFIX signed */ -{ yylhsminor.yy720 = setDatabaseOption(pCxt, yymsp[-2].minor.yy720, DB_OPTION_TABLE_SUFFIX, yymsp[0].minor.yy720); } - yymsp[-2].minor.yy720 = yylhsminor.yy720; +#line 263 "sql.y" +{ yylhsminor.yy722 = setDatabaseOption(pCxt, yymsp[-2].minor.yy722, DB_OPTION_TABLE_SUFFIX, yymsp[0].minor.yy722); } +#line 6220 "sql.c" + yymsp[-2].minor.yy722 = yylhsminor.yy722; break; case 129: /* db_options ::= db_options S3_CHUNKSIZE NK_INTEGER */ -{ yylhsminor.yy720 = setDatabaseOption(pCxt, yymsp[-2].minor.yy720, DB_OPTION_S3_CHUNKSIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy720 = yylhsminor.yy720; +#line 264 "sql.y" +{ yylhsminor.yy722 = setDatabaseOption(pCxt, yymsp[-2].minor.yy722, DB_OPTION_S3_CHUNKSIZE, &yymsp[0].minor.yy0); } +#line 6226 "sql.c" + yymsp[-2].minor.yy722 = yylhsminor.yy722; break; case 130: /* db_options ::= db_options S3_KEEPLOCAL NK_INTEGER */ case 131: /* db_options ::= db_options S3_KEEPLOCAL NK_VARIABLE */ yytestcase(yyruleno==131); -{ yylhsminor.yy720 = setDatabaseOption(pCxt, yymsp[-2].minor.yy720, DB_OPTION_S3_KEEPLOCAL, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy720 = yylhsminor.yy720; +#line 265 "sql.y" +{ yylhsminor.yy722 = setDatabaseOption(pCxt, yymsp[-2].minor.yy722, DB_OPTION_S3_KEEPLOCAL, &yymsp[0].minor.yy0); } +#line 6233 "sql.c" + yymsp[-2].minor.yy722 = yylhsminor.yy722; break; case 132: /* db_options ::= db_options S3_COMPACT NK_INTEGER */ -{ yylhsminor.yy720 = setDatabaseOption(pCxt, yymsp[-2].minor.yy720, DB_OPTION_S3_COMPACT, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy720 = yylhsminor.yy720; +#line 267 "sql.y" +{ yylhsminor.yy722 = setDatabaseOption(pCxt, yymsp[-2].minor.yy722, DB_OPTION_S3_COMPACT, &yymsp[0].minor.yy0); } +#line 6239 "sql.c" + yymsp[-2].minor.yy722 = yylhsminor.yy722; break; case 133: /* db_options ::= db_options KEEP_TIME_OFFSET NK_INTEGER */ -{ yylhsminor.yy720 = setDatabaseOption(pCxt, yymsp[-2].minor.yy720, DB_OPTION_KEEP_TIME_OFFSET, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy720 = yylhsminor.yy720; +#line 268 "sql.y" +{ yylhsminor.yy722 = setDatabaseOption(pCxt, yymsp[-2].minor.yy722, DB_OPTION_KEEP_TIME_OFFSET, &yymsp[0].minor.yy0); } +#line 6245 "sql.c" + yymsp[-2].minor.yy722 = yylhsminor.yy722; break; case 134: /* alter_db_options ::= alter_db_option */ -{ yylhsminor.yy720 = createAlterDatabaseOptions(pCxt); yylhsminor.yy720 = setAlterDatabaseOption(pCxt, yylhsminor.yy720, &yymsp[0].minor.yy5); } - yymsp[0].minor.yy720 = yylhsminor.yy720; +#line 270 "sql.y" +{ yylhsminor.yy722 = createAlterDatabaseOptions(pCxt); yylhsminor.yy722 = setAlterDatabaseOption(pCxt, yylhsminor.yy722, &yymsp[0].minor.yy845); } +#line 6251 "sql.c" + yymsp[0].minor.yy722 = yylhsminor.yy722; break; case 135: /* alter_db_options ::= alter_db_options alter_db_option */ -{ yylhsminor.yy720 = setAlterDatabaseOption(pCxt, yymsp[-1].minor.yy720, &yymsp[0].minor.yy5); } - yymsp[-1].minor.yy720 = yylhsminor.yy720; +#line 271 "sql.y" +{ yylhsminor.yy722 = setAlterDatabaseOption(pCxt, yymsp[-1].minor.yy722, &yymsp[0].minor.yy845); } +#line 6257 "sql.c" + yymsp[-1].minor.yy722 = yylhsminor.yy722; break; case 136: /* alter_db_option ::= BUFFER NK_INTEGER */ -{ yymsp[-1].minor.yy5.type = DB_OPTION_BUFFER; yymsp[-1].minor.yy5.val = yymsp[0].minor.yy0; } +#line 275 "sql.y" +{ yymsp[-1].minor.yy845.type = DB_OPTION_BUFFER; yymsp[-1].minor.yy845.val = yymsp[0].minor.yy0; } +#line 6263 "sql.c" break; case 137: /* alter_db_option ::= CACHEMODEL NK_STRING */ -{ yymsp[-1].minor.yy5.type = DB_OPTION_CACHEMODEL; yymsp[-1].minor.yy5.val = yymsp[0].minor.yy0; } +#line 276 "sql.y" +{ yymsp[-1].minor.yy845.type = DB_OPTION_CACHEMODEL; yymsp[-1].minor.yy845.val = yymsp[0].minor.yy0; } +#line 6268 "sql.c" break; case 138: /* alter_db_option ::= CACHESIZE NK_INTEGER */ -{ yymsp[-1].minor.yy5.type = DB_OPTION_CACHESIZE; yymsp[-1].minor.yy5.val = yymsp[0].minor.yy0; } +#line 277 "sql.y" +{ yymsp[-1].minor.yy845.type = DB_OPTION_CACHESIZE; yymsp[-1].minor.yy845.val = yymsp[0].minor.yy0; } +#line 6273 "sql.c" break; case 139: /* alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */ -{ yymsp[-1].minor.yy5.type = DB_OPTION_FSYNC; yymsp[-1].minor.yy5.val = yymsp[0].minor.yy0; } +#line 278 "sql.y" +{ yymsp[-1].minor.yy845.type = DB_OPTION_FSYNC; yymsp[-1].minor.yy845.val = yymsp[0].minor.yy0; } +#line 6278 "sql.c" break; case 140: /* alter_db_option ::= KEEP integer_list */ case 141: /* alter_db_option ::= KEEP variable_list */ yytestcase(yyruleno==141); -{ yymsp[-1].minor.yy5.type = DB_OPTION_KEEP; yymsp[-1].minor.yy5.pList = yymsp[0].minor.yy984; } +#line 279 "sql.y" +{ yymsp[-1].minor.yy845.type = DB_OPTION_KEEP; yymsp[-1].minor.yy845.pList = yymsp[0].minor.yy694; } +#line 6284 "sql.c" break; case 142: /* alter_db_option ::= PAGES NK_INTEGER */ -{ yymsp[-1].minor.yy5.type = DB_OPTION_PAGES; yymsp[-1].minor.yy5.val = yymsp[0].minor.yy0; } +#line 281 "sql.y" +{ yymsp[-1].minor.yy845.type = DB_OPTION_PAGES; yymsp[-1].minor.yy845.val = yymsp[0].minor.yy0; } +#line 6289 "sql.c" break; case 143: /* alter_db_option ::= REPLICA NK_INTEGER */ -{ yymsp[-1].minor.yy5.type = DB_OPTION_REPLICA; yymsp[-1].minor.yy5.val = yymsp[0].minor.yy0; } +#line 282 "sql.y" +{ yymsp[-1].minor.yy845.type = DB_OPTION_REPLICA; yymsp[-1].minor.yy845.val = yymsp[0].minor.yy0; } +#line 6294 "sql.c" break; case 144: /* alter_db_option ::= WAL_LEVEL NK_INTEGER */ -{ yymsp[-1].minor.yy5.type = DB_OPTION_WAL; yymsp[-1].minor.yy5.val = yymsp[0].minor.yy0; } +#line 284 "sql.y" +{ yymsp[-1].minor.yy845.type = DB_OPTION_WAL; yymsp[-1].minor.yy845.val = yymsp[0].minor.yy0; } +#line 6299 "sql.c" break; case 145: /* alter_db_option ::= STT_TRIGGER NK_INTEGER */ -{ yymsp[-1].minor.yy5.type = DB_OPTION_STT_TRIGGER; yymsp[-1].minor.yy5.val = yymsp[0].minor.yy0; } +#line 285 "sql.y" +{ yymsp[-1].minor.yy845.type = DB_OPTION_STT_TRIGGER; yymsp[-1].minor.yy845.val = yymsp[0].minor.yy0; } +#line 6304 "sql.c" break; case 146: /* alter_db_option ::= MINROWS NK_INTEGER */ -{ yymsp[-1].minor.yy5.type = DB_OPTION_MINROWS; yymsp[-1].minor.yy5.val = yymsp[0].minor.yy0; } +#line 286 "sql.y" +{ yymsp[-1].minor.yy845.type = DB_OPTION_MINROWS; yymsp[-1].minor.yy845.val = yymsp[0].minor.yy0; } +#line 6309 "sql.c" break; case 147: /* alter_db_option ::= WAL_RETENTION_PERIOD NK_INTEGER */ -{ yymsp[-1].minor.yy5.type = DB_OPTION_WAL_RETENTION_PERIOD; yymsp[-1].minor.yy5.val = yymsp[0].minor.yy0; } +#line 287 "sql.y" +{ yymsp[-1].minor.yy845.type = DB_OPTION_WAL_RETENTION_PERIOD; yymsp[-1].minor.yy845.val = yymsp[0].minor.yy0; } +#line 6314 "sql.c" break; case 148: /* alter_db_option ::= WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ +#line 288 "sql.y" { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yymsp[-2].minor.yy5.type = DB_OPTION_WAL_RETENTION_PERIOD; yymsp[-2].minor.yy5.val = t; + yymsp[-2].minor.yy845.type = DB_OPTION_WAL_RETENTION_PERIOD; yymsp[-2].minor.yy845.val = t; } +#line 6323 "sql.c" break; case 149: /* alter_db_option ::= WAL_RETENTION_SIZE NK_INTEGER */ -{ yymsp[-1].minor.yy5.type = DB_OPTION_WAL_RETENTION_SIZE; yymsp[-1].minor.yy5.val = yymsp[0].minor.yy0; } +#line 293 "sql.y" +{ yymsp[-1].minor.yy845.type = DB_OPTION_WAL_RETENTION_SIZE; yymsp[-1].minor.yy845.val = yymsp[0].minor.yy0; } +#line 6328 "sql.c" break; case 150: /* alter_db_option ::= WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ +#line 294 "sql.y" { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yymsp[-2].minor.yy5.type = DB_OPTION_WAL_RETENTION_SIZE; yymsp[-2].minor.yy5.val = t; + yymsp[-2].minor.yy845.type = DB_OPTION_WAL_RETENTION_SIZE; yymsp[-2].minor.yy845.val = t; } +#line 6337 "sql.c" break; case 151: /* alter_db_option ::= S3_KEEPLOCAL NK_INTEGER */ case 152: /* alter_db_option ::= S3_KEEPLOCAL NK_VARIABLE */ yytestcase(yyruleno==152); -{ yymsp[-1].minor.yy5.type = DB_OPTION_S3_KEEPLOCAL; yymsp[-1].minor.yy5.val = yymsp[0].minor.yy0; } +#line 299 "sql.y" +{ yymsp[-1].minor.yy845.type = DB_OPTION_S3_KEEPLOCAL; yymsp[-1].minor.yy845.val = yymsp[0].minor.yy0; } +#line 6343 "sql.c" break; case 153: /* alter_db_option ::= S3_COMPACT NK_INTEGER */ -{ yymsp[-1].minor.yy5.type = DB_OPTION_S3_COMPACT, yymsp[-1].minor.yy5.val = yymsp[0].minor.yy0; } +#line 301 "sql.y" +{ yymsp[-1].minor.yy845.type = DB_OPTION_S3_COMPACT, yymsp[-1].minor.yy845.val = yymsp[0].minor.yy0; } +#line 6348 "sql.c" break; case 154: /* alter_db_option ::= KEEP_TIME_OFFSET NK_INTEGER */ -{ yymsp[-1].minor.yy5.type = DB_OPTION_KEEP_TIME_OFFSET; yymsp[-1].minor.yy5.val = yymsp[0].minor.yy0; } +#line 302 "sql.y" +{ yymsp[-1].minor.yy845.type = DB_OPTION_KEEP_TIME_OFFSET; yymsp[-1].minor.yy845.val = yymsp[0].minor.yy0; } +#line 6353 "sql.c" break; case 155: /* integer_list ::= NK_INTEGER */ -{ yylhsminor.yy984 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy984 = yylhsminor.yy984; +#line 306 "sql.y" +{ yylhsminor.yy694 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } +#line 6358 "sql.c" + yymsp[0].minor.yy694 = yylhsminor.yy694; break; case 156: /* integer_list ::= integer_list NK_COMMA NK_INTEGER */ - case 421: /* dnode_list ::= dnode_list DNODE NK_INTEGER */ yytestcase(yyruleno==421); -{ yylhsminor.yy984 = addNodeToList(pCxt, yymsp[-2].minor.yy984, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } - yymsp[-2].minor.yy984 = yylhsminor.yy984; + case 432: /* dnode_list ::= dnode_list DNODE NK_INTEGER */ yytestcase(yyruleno==432); +#line 307 "sql.y" +{ yylhsminor.yy694 = addNodeToList(pCxt, yymsp[-2].minor.yy694, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } +#line 6365 "sql.c" + yymsp[-2].minor.yy694 = yylhsminor.yy694; break; case 157: /* variable_list ::= NK_VARIABLE */ -{ yylhsminor.yy984 = createNodeList(pCxt, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy984 = yylhsminor.yy984; +#line 311 "sql.y" +{ yylhsminor.yy694 = createNodeList(pCxt, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } +#line 6371 "sql.c" + yymsp[0].minor.yy694 = yylhsminor.yy694; break; case 158: /* variable_list ::= variable_list NK_COMMA NK_VARIABLE */ -{ yylhsminor.yy984 = addNodeToList(pCxt, yymsp[-2].minor.yy984, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[-2].minor.yy984 = yylhsminor.yy984; +#line 312 "sql.y" +{ yylhsminor.yy694 = addNodeToList(pCxt, yymsp[-2].minor.yy694, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } +#line 6377 "sql.c" + yymsp[-2].minor.yy694 = yylhsminor.yy694; break; case 159: /* retention_list ::= retention */ case 190: /* multi_create_clause ::= create_subtable_clause */ yytestcase(yyruleno==190); @@ -5659,17 +6384,20 @@ static YYACTIONTYPE yy_reduce( case 249: /* rollup_func_list ::= rollup_func_name */ yytestcase(yyruleno==249); case 254: /* col_name_list ::= col_name */ yytestcase(yyruleno==254); case 322: /* tag_list_opt ::= tag_item */ yytestcase(yyruleno==322); - case 339: /* func_list ::= func */ yytestcase(yyruleno==339); - case 389: /* column_stream_def_list ::= column_stream_def */ yytestcase(yyruleno==389); - case 465: /* tags_literal_list ::= tags_literal */ yytestcase(yyruleno==465); - case 490: /* literal_list ::= signed_literal */ yytestcase(yyruleno==490); - case 563: /* other_para_list ::= star_func_para */ yytestcase(yyruleno==563); - case 569: /* when_then_list ::= when_then_expr */ yytestcase(yyruleno==569); - case 645: /* select_list ::= select_item */ yytestcase(yyruleno==645); - case 656: /* partition_list ::= partition_item */ yytestcase(yyruleno==656); - case 717: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==717); -{ yylhsminor.yy984 = createNodeList(pCxt, yymsp[0].minor.yy720); } - yymsp[0].minor.yy984 = yylhsminor.yy984; + case 340: /* tsma_func_list ::= tsma_func_name */ yytestcase(yyruleno==340); + case 350: /* func_list ::= func */ yytestcase(yyruleno==350); + case 400: /* column_stream_def_list ::= column_stream_def */ yytestcase(yyruleno==400); + case 476: /* tags_literal_list ::= tags_literal */ yytestcase(yyruleno==476); + case 501: /* literal_list ::= signed_literal */ yytestcase(yyruleno==501); + case 575: /* other_para_list ::= star_func_para */ yytestcase(yyruleno==575); + case 581: /* when_then_list ::= when_then_expr */ yytestcase(yyruleno==581); + case 657: /* select_list ::= select_item */ yytestcase(yyruleno==657); + case 668: /* partition_list ::= partition_item */ yytestcase(yyruleno==668); + case 729: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==729); +#line 316 "sql.y" +{ yylhsminor.yy694 = createNodeList(pCxt, yymsp[0].minor.yy722); } +#line 6399 "sql.c" + yymsp[0].minor.yy694 = yylhsminor.yy694; break; case 160: /* retention_list ::= retention_list NK_COMMA retention */ case 194: /* multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause */ yytestcase(yyruleno==194); @@ -5677,1439 +6405,2171 @@ static YYACTIONTYPE yy_reduce( case 250: /* rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ yytestcase(yyruleno==250); case 255: /* col_name_list ::= col_name_list NK_COMMA col_name */ yytestcase(yyruleno==255); case 323: /* tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ yytestcase(yyruleno==323); - case 340: /* func_list ::= func_list NK_COMMA func */ yytestcase(yyruleno==340); - case 390: /* column_stream_def_list ::= column_stream_def_list NK_COMMA column_stream_def */ yytestcase(yyruleno==390); - case 466: /* tags_literal_list ::= tags_literal_list NK_COMMA tags_literal */ yytestcase(yyruleno==466); - case 491: /* literal_list ::= literal_list NK_COMMA signed_literal */ yytestcase(yyruleno==491); - case 564: /* other_para_list ::= other_para_list NK_COMMA star_func_para */ yytestcase(yyruleno==564); - case 646: /* select_list ::= select_list NK_COMMA select_item */ yytestcase(yyruleno==646); - case 657: /* partition_list ::= partition_list NK_COMMA partition_item */ yytestcase(yyruleno==657); - case 718: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==718); -{ yylhsminor.yy984 = addNodeToList(pCxt, yymsp[-2].minor.yy984, yymsp[0].minor.yy720); } - yymsp[-2].minor.yy984 = yylhsminor.yy984; + case 341: /* tsma_func_list ::= tsma_func_list NK_COMMA tsma_func_name */ yytestcase(yyruleno==341); + case 351: /* func_list ::= func_list NK_COMMA func */ yytestcase(yyruleno==351); + case 401: /* column_stream_def_list ::= column_stream_def_list NK_COMMA column_stream_def */ yytestcase(yyruleno==401); + case 477: /* tags_literal_list ::= tags_literal_list NK_COMMA tags_literal */ yytestcase(yyruleno==477); + case 502: /* literal_list ::= literal_list NK_COMMA signed_literal */ yytestcase(yyruleno==502); + case 576: /* other_para_list ::= other_para_list NK_COMMA star_func_para */ yytestcase(yyruleno==576); + case 658: /* select_list ::= select_list NK_COMMA select_item */ yytestcase(yyruleno==658); + case 669: /* partition_list ::= partition_list NK_COMMA partition_item */ yytestcase(yyruleno==669); + case 730: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==730); +#line 317 "sql.y" +{ yylhsminor.yy694 = addNodeToList(pCxt, yymsp[-2].minor.yy694, yymsp[0].minor.yy722); } +#line 6419 "sql.c" + yymsp[-2].minor.yy694 = yylhsminor.yy694; break; case 161: /* retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ case 162: /* retention ::= NK_MINUS NK_COLON NK_VARIABLE */ yytestcase(yyruleno==162); -{ yylhsminor.yy720 = createNodeListNodeEx(pCxt, createDurationValueNode(pCxt, &yymsp[-2].minor.yy0), createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[-2].minor.yy720 = yylhsminor.yy720; +#line 319 "sql.y" +{ yylhsminor.yy722 = createNodeListNodeEx(pCxt, createDurationValueNode(pCxt, &yymsp[-2].minor.yy0), createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } +#line 6426 "sql.c" + yymsp[-2].minor.yy722 = yylhsminor.yy722; break; case 163: /* speed_opt ::= */ - case 373: /* bufsize_opt ::= */ yytestcase(yyruleno==373); -{ yymsp[1].minor.yy488 = 0; } + case 384: /* bufsize_opt ::= */ yytestcase(yyruleno==384); +#line 324 "sql.y" +{ yymsp[1].minor.yy830 = 0; } +#line 6433 "sql.c" break; case 164: /* speed_opt ::= BWLIMIT NK_INTEGER */ - case 374: /* bufsize_opt ::= BUFSIZE NK_INTEGER */ yytestcase(yyruleno==374); -{ yymsp[-1].minor.yy488 = taosStr2Int32(yymsp[0].minor.yy0.z, NULL, 10); } + case 385: /* bufsize_opt ::= BUFSIZE NK_INTEGER */ yytestcase(yyruleno==385); +#line 325 "sql.y" +{ yymsp[-1].minor.yy830 = taosStr2Int32(yymsp[0].minor.yy0.z, NULL, 10); } +#line 6439 "sql.c" break; case 166: /* start_opt ::= START WITH NK_INTEGER */ case 170: /* end_opt ::= END WITH NK_INTEGER */ yytestcase(yyruleno==170); -{ yymsp[-2].minor.yy720 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } +#line 328 "sql.y" +{ yymsp[-2].minor.yy722 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } +#line 6445 "sql.c" break; case 167: /* start_opt ::= START WITH NK_STRING */ case 171: /* end_opt ::= END WITH NK_STRING */ yytestcase(yyruleno==171); -{ yymsp[-2].minor.yy720 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } +#line 329 "sql.y" +{ yymsp[-2].minor.yy722 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } +#line 6451 "sql.c" break; case 168: /* start_opt ::= START WITH TIMESTAMP NK_STRING */ case 172: /* end_opt ::= END WITH TIMESTAMP NK_STRING */ yytestcase(yyruleno==172); -{ yymsp[-3].minor.yy720 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } +#line 330 "sql.y" +{ yymsp[-3].minor.yy722 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } +#line 6457 "sql.c" break; case 173: /* cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ case 175: /* cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ yytestcase(yyruleno==175); -{ pCxt->pRootNode = createCreateTableStmt(pCxt, yymsp[-6].minor.yy833, yymsp[-5].minor.yy720, yymsp[-3].minor.yy984, yymsp[-1].minor.yy984, yymsp[0].minor.yy720); } +#line 339 "sql.y" +{ pCxt->pRootNode = createCreateTableStmt(pCxt, yymsp[-6].minor.yy897, yymsp[-5].minor.yy722, yymsp[-3].minor.yy694, yymsp[-1].minor.yy694, yymsp[0].minor.yy722); } +#line 6463 "sql.c" break; case 174: /* cmd ::= CREATE TABLE multi_create_clause */ -{ pCxt->pRootNode = createCreateMultiTableStmt(pCxt, yymsp[0].minor.yy984); } +#line 340 "sql.y" +{ pCxt->pRootNode = createCreateMultiTableStmt(pCxt, yymsp[0].minor.yy694); } +#line 6468 "sql.c" break; case 176: /* cmd ::= DROP TABLE multi_drop_clause */ -{ pCxt->pRootNode = createDropTableStmt(pCxt, yymsp[0].minor.yy984); } +#line 343 "sql.y" +{ pCxt->pRootNode = createDropTableStmt(pCxt, yymsp[0].minor.yy694); } +#line 6473 "sql.c" break; case 177: /* cmd ::= DROP STABLE exists_opt full_table_name */ -{ pCxt->pRootNode = createDropSuperTableStmt(pCxt, yymsp[-1].minor.yy833, yymsp[0].minor.yy720); } +#line 344 "sql.y" +{ pCxt->pRootNode = createDropSuperTableStmt(pCxt, yymsp[-1].minor.yy897, yymsp[0].minor.yy722); } +#line 6478 "sql.c" break; case 178: /* cmd ::= ALTER TABLE alter_table_clause */ - case 423: /* cmd ::= query_or_subquery */ yytestcase(yyruleno==423); - case 424: /* cmd ::= insert_query */ yytestcase(yyruleno==424); -{ pCxt->pRootNode = yymsp[0].minor.yy720; } + case 434: /* cmd ::= query_or_subquery */ yytestcase(yyruleno==434); + case 435: /* cmd ::= insert_query */ yytestcase(yyruleno==435); +#line 346 "sql.y" +{ pCxt->pRootNode = yymsp[0].minor.yy722; } +#line 6485 "sql.c" break; case 179: /* cmd ::= ALTER STABLE alter_table_clause */ -{ pCxt->pRootNode = setAlterSuperTableType(yymsp[0].minor.yy720); } +#line 347 "sql.y" +{ pCxt->pRootNode = setAlterSuperTableType(yymsp[0].minor.yy722); } +#line 6490 "sql.c" break; case 180: /* alter_table_clause ::= full_table_name alter_table_options */ -{ yylhsminor.yy720 = createAlterTableModifyOptions(pCxt, yymsp[-1].minor.yy720, yymsp[0].minor.yy720); } - yymsp[-1].minor.yy720 = yylhsminor.yy720; +#line 349 "sql.y" +{ yylhsminor.yy722 = createAlterTableModifyOptions(pCxt, yymsp[-1].minor.yy722, yymsp[0].minor.yy722); } +#line 6495 "sql.c" + yymsp[-1].minor.yy722 = yylhsminor.yy722; break; case 181: /* alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ -{ yylhsminor.yy720 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy720, TSDB_ALTER_TABLE_ADD_COLUMN, &yymsp[-1].minor.yy1045, yymsp[0].minor.yy232); } - yymsp[-4].minor.yy720 = yylhsminor.yy720; +#line 351 "sql.y" +{ yylhsminor.yy722 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy722, TSDB_ALTER_TABLE_ADD_COLUMN, &yymsp[-1].minor.yy659, yymsp[0].minor.yy154); } +#line 6501 "sql.c" + yymsp[-4].minor.yy722 = yylhsminor.yy722; break; case 182: /* alter_table_clause ::= full_table_name DROP COLUMN column_name */ -{ yylhsminor.yy720 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy720, TSDB_ALTER_TABLE_DROP_COLUMN, &yymsp[0].minor.yy1045); } - yymsp[-3].minor.yy720 = yylhsminor.yy720; +#line 352 "sql.y" +{ yylhsminor.yy722 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy722, TSDB_ALTER_TABLE_DROP_COLUMN, &yymsp[0].minor.yy659); } +#line 6507 "sql.c" + yymsp[-3].minor.yy722 = yylhsminor.yy722; break; case 183: /* alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ -{ yylhsminor.yy720 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy720, TSDB_ALTER_TABLE_UPDATE_COLUMN_BYTES, &yymsp[-1].minor.yy1045, yymsp[0].minor.yy232); } - yymsp[-4].minor.yy720 = yylhsminor.yy720; +#line 354 "sql.y" +{ yylhsminor.yy722 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy722, TSDB_ALTER_TABLE_UPDATE_COLUMN_BYTES, &yymsp[-1].minor.yy659, yymsp[0].minor.yy154); } +#line 6513 "sql.c" + yymsp[-4].minor.yy722 = yylhsminor.yy722; break; case 184: /* alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ -{ yylhsminor.yy720 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy720, TSDB_ALTER_TABLE_UPDATE_COLUMN_NAME, &yymsp[-1].minor.yy1045, &yymsp[0].minor.yy1045); } - yymsp[-4].minor.yy720 = yylhsminor.yy720; +#line 356 "sql.y" +{ yylhsminor.yy722 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy722, TSDB_ALTER_TABLE_UPDATE_COLUMN_NAME, &yymsp[-1].minor.yy659, &yymsp[0].minor.yy659); } +#line 6519 "sql.c" + yymsp[-4].minor.yy722 = yylhsminor.yy722; break; case 185: /* alter_table_clause ::= full_table_name ADD TAG column_name type_name */ -{ yylhsminor.yy720 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy720, TSDB_ALTER_TABLE_ADD_TAG, &yymsp[-1].minor.yy1045, yymsp[0].minor.yy232); } - yymsp[-4].minor.yy720 = yylhsminor.yy720; +#line 358 "sql.y" +{ yylhsminor.yy722 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy722, TSDB_ALTER_TABLE_ADD_TAG, &yymsp[-1].minor.yy659, yymsp[0].minor.yy154); } +#line 6525 "sql.c" + yymsp[-4].minor.yy722 = yylhsminor.yy722; break; case 186: /* alter_table_clause ::= full_table_name DROP TAG column_name */ -{ yylhsminor.yy720 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy720, TSDB_ALTER_TABLE_DROP_TAG, &yymsp[0].minor.yy1045); } - yymsp[-3].minor.yy720 = yylhsminor.yy720; +#line 359 "sql.y" +{ yylhsminor.yy722 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy722, TSDB_ALTER_TABLE_DROP_TAG, &yymsp[0].minor.yy659); } +#line 6531 "sql.c" + yymsp[-3].minor.yy722 = yylhsminor.yy722; break; case 187: /* alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ -{ yylhsminor.yy720 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy720, TSDB_ALTER_TABLE_UPDATE_TAG_BYTES, &yymsp[-1].minor.yy1045, yymsp[0].minor.yy232); } - yymsp[-4].minor.yy720 = yylhsminor.yy720; +#line 361 "sql.y" +{ yylhsminor.yy722 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy722, TSDB_ALTER_TABLE_UPDATE_TAG_BYTES, &yymsp[-1].minor.yy659, yymsp[0].minor.yy154); } +#line 6537 "sql.c" + yymsp[-4].minor.yy722 = yylhsminor.yy722; break; case 188: /* alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ -{ yylhsminor.yy720 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy720, TSDB_ALTER_TABLE_UPDATE_TAG_NAME, &yymsp[-1].minor.yy1045, &yymsp[0].minor.yy1045); } - yymsp[-4].minor.yy720 = yylhsminor.yy720; +#line 363 "sql.y" +{ yylhsminor.yy722 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy722, TSDB_ALTER_TABLE_UPDATE_TAG_NAME, &yymsp[-1].minor.yy659, &yymsp[0].minor.yy659); } +#line 6543 "sql.c" + yymsp[-4].minor.yy722 = yylhsminor.yy722; break; case 189: /* alter_table_clause ::= full_table_name SET TAG column_name NK_EQ tags_literal */ -{ yylhsminor.yy720 = createAlterTableSetTag(pCxt, yymsp[-5].minor.yy720, &yymsp[-2].minor.yy1045, yymsp[0].minor.yy720); } - yymsp[-5].minor.yy720 = yylhsminor.yy720; +#line 365 "sql.y" +{ yylhsminor.yy722 = createAlterTableSetTag(pCxt, yymsp[-5].minor.yy722, &yymsp[-2].minor.yy659, yymsp[0].minor.yy722); } +#line 6549 "sql.c" + yymsp[-5].minor.yy722 = yylhsminor.yy722; break; case 191: /* multi_create_clause ::= multi_create_clause create_subtable_clause */ - case 570: /* when_then_list ::= when_then_list when_then_expr */ yytestcase(yyruleno==570); -{ yylhsminor.yy984 = addNodeToList(pCxt, yymsp[-1].minor.yy984, yymsp[0].minor.yy720); } - yymsp[-1].minor.yy984 = yylhsminor.yy984; + case 582: /* when_then_list ::= when_then_list when_then_expr */ yytestcase(yyruleno==582); +#line 370 "sql.y" +{ yylhsminor.yy694 = addNodeToList(pCxt, yymsp[-1].minor.yy694, yymsp[0].minor.yy722); } +#line 6556 "sql.c" + yymsp[-1].minor.yy694 = yylhsminor.yy694; break; case 192: /* 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.yy720 = createCreateSubTableClause(pCxt, yymsp[-9].minor.yy833, yymsp[-8].minor.yy720, yymsp[-6].minor.yy720, yymsp[-5].minor.yy984, yymsp[-2].minor.yy984, yymsp[0].minor.yy720); } - yymsp[-9].minor.yy720 = yylhsminor.yy720; +#line 374 "sql.y" +{ yylhsminor.yy722 = createCreateSubTableClause(pCxt, yymsp[-9].minor.yy897, yymsp[-8].minor.yy722, yymsp[-6].minor.yy722, yymsp[-5].minor.yy694, yymsp[-2].minor.yy694, yymsp[0].minor.yy722); } +#line 6562 "sql.c" + yymsp[-9].minor.yy722 = yylhsminor.yy722; break; case 195: /* drop_table_clause ::= exists_opt full_table_name */ -{ yylhsminor.yy720 = createDropTableClause(pCxt, yymsp[-1].minor.yy833, yymsp[0].minor.yy720); } - yymsp[-1].minor.yy720 = yylhsminor.yy720; +#line 381 "sql.y" +{ yylhsminor.yy722 = createDropTableClause(pCxt, yymsp[-1].minor.yy897, yymsp[0].minor.yy722); } +#line 6568 "sql.c" + yymsp[-1].minor.yy722 = yylhsminor.yy722; break; case 197: /* specific_cols_opt ::= NK_LP col_name_list NK_RP */ - case 388: /* col_list_opt ::= NK_LP column_stream_def_list NK_RP */ yytestcase(yyruleno==388); -{ yymsp[-2].minor.yy984 = yymsp[-1].minor.yy984; } + case 399: /* col_list_opt ::= NK_LP column_stream_def_list NK_RP */ yytestcase(yyruleno==399); +#line 386 "sql.y" +{ yymsp[-2].minor.yy694 = yymsp[-1].minor.yy694; } +#line 6575 "sql.c" break; case 198: /* full_table_name ::= table_name */ -{ yylhsminor.yy720 = createRealTableNode(pCxt, NULL, &yymsp[0].minor.yy1045, NULL); } - yymsp[0].minor.yy720 = yylhsminor.yy720; +#line 388 "sql.y" +{ yylhsminor.yy722 = createRealTableNode(pCxt, NULL, &yymsp[0].minor.yy659, NULL); } +#line 6580 "sql.c" + yymsp[0].minor.yy722 = yylhsminor.yy722; break; case 199: /* full_table_name ::= db_name NK_DOT table_name */ -{ yylhsminor.yy720 = createRealTableNode(pCxt, &yymsp[-2].minor.yy1045, &yymsp[0].minor.yy1045, NULL); } - yymsp[-2].minor.yy720 = yylhsminor.yy720; +#line 389 "sql.y" +{ yylhsminor.yy722 = createRealTableNode(pCxt, &yymsp[-2].minor.yy659, &yymsp[0].minor.yy659, NULL); } +#line 6586 "sql.c" + yymsp[-2].minor.yy722 = yylhsminor.yy722; break; case 202: /* column_def ::= column_name type_name */ -{ yylhsminor.yy720 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy1045, yymsp[0].minor.yy232, NULL, false); } - yymsp[-1].minor.yy720 = yylhsminor.yy720; +#line 396 "sql.y" +{ yylhsminor.yy722 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy659, yymsp[0].minor.yy154, NULL, false); } +#line 6592 "sql.c" + yymsp[-1].minor.yy722 = yylhsminor.yy722; break; case 203: /* column_def ::= column_name type_name PRIMARY KEY */ -{ yylhsminor.yy720 = createColumnDefNode(pCxt, &yymsp[-3].minor.yy1045, yymsp[-2].minor.yy232, NULL, true); } - yymsp[-3].minor.yy720 = yylhsminor.yy720; +#line 397 "sql.y" +{ yylhsminor.yy722 = createColumnDefNode(pCxt, &yymsp[-3].minor.yy659, yymsp[-2].minor.yy154, NULL, true); } +#line 6598 "sql.c" + yymsp[-3].minor.yy722 = yylhsminor.yy722; break; case 204: /* type_name ::= BOOL */ -{ yymsp[0].minor.yy232 = createDataType(TSDB_DATA_TYPE_BOOL); } +#line 402 "sql.y" +{ yymsp[0].minor.yy154 = createDataType(TSDB_DATA_TYPE_BOOL); } +#line 6604 "sql.c" break; case 205: /* type_name ::= TINYINT */ -{ yymsp[0].minor.yy232 = createDataType(TSDB_DATA_TYPE_TINYINT); } +#line 403 "sql.y" +{ yymsp[0].minor.yy154 = createDataType(TSDB_DATA_TYPE_TINYINT); } +#line 6609 "sql.c" break; case 206: /* type_name ::= SMALLINT */ -{ yymsp[0].minor.yy232 = createDataType(TSDB_DATA_TYPE_SMALLINT); } +#line 404 "sql.y" +{ yymsp[0].minor.yy154 = createDataType(TSDB_DATA_TYPE_SMALLINT); } +#line 6614 "sql.c" break; case 207: /* type_name ::= INT */ case 208: /* type_name ::= INTEGER */ yytestcase(yyruleno==208); -{ yymsp[0].minor.yy232 = createDataType(TSDB_DATA_TYPE_INT); } +#line 405 "sql.y" +{ yymsp[0].minor.yy154 = createDataType(TSDB_DATA_TYPE_INT); } +#line 6620 "sql.c" break; case 209: /* type_name ::= BIGINT */ -{ yymsp[0].minor.yy232 = createDataType(TSDB_DATA_TYPE_BIGINT); } +#line 407 "sql.y" +{ yymsp[0].minor.yy154 = createDataType(TSDB_DATA_TYPE_BIGINT); } +#line 6625 "sql.c" break; case 210: /* type_name ::= FLOAT */ -{ yymsp[0].minor.yy232 = createDataType(TSDB_DATA_TYPE_FLOAT); } +#line 408 "sql.y" +{ yymsp[0].minor.yy154 = createDataType(TSDB_DATA_TYPE_FLOAT); } +#line 6630 "sql.c" break; case 211: /* type_name ::= DOUBLE */ -{ yymsp[0].minor.yy232 = createDataType(TSDB_DATA_TYPE_DOUBLE); } +#line 409 "sql.y" +{ yymsp[0].minor.yy154 = createDataType(TSDB_DATA_TYPE_DOUBLE); } +#line 6635 "sql.c" break; case 212: /* type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy232 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy0); } +#line 410 "sql.y" +{ yymsp[-3].minor.yy154 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy0); } +#line 6640 "sql.c" break; case 213: /* type_name ::= TIMESTAMP */ -{ yymsp[0].minor.yy232 = createDataType(TSDB_DATA_TYPE_TIMESTAMP); } +#line 411 "sql.y" +{ yymsp[0].minor.yy154 = createDataType(TSDB_DATA_TYPE_TIMESTAMP); } +#line 6645 "sql.c" break; case 214: /* type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy232 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, &yymsp[-1].minor.yy0); } +#line 412 "sql.y" +{ yymsp[-3].minor.yy154 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, &yymsp[-1].minor.yy0); } +#line 6650 "sql.c" break; case 215: /* type_name ::= TINYINT UNSIGNED */ -{ yymsp[-1].minor.yy232 = createDataType(TSDB_DATA_TYPE_UTINYINT); } +#line 413 "sql.y" +{ yymsp[-1].minor.yy154 = createDataType(TSDB_DATA_TYPE_UTINYINT); } +#line 6655 "sql.c" break; case 216: /* type_name ::= SMALLINT UNSIGNED */ -{ yymsp[-1].minor.yy232 = createDataType(TSDB_DATA_TYPE_USMALLINT); } +#line 414 "sql.y" +{ yymsp[-1].minor.yy154 = createDataType(TSDB_DATA_TYPE_USMALLINT); } +#line 6660 "sql.c" break; case 217: /* type_name ::= INT UNSIGNED */ -{ yymsp[-1].minor.yy232 = createDataType(TSDB_DATA_TYPE_UINT); } +#line 415 "sql.y" +{ yymsp[-1].minor.yy154 = createDataType(TSDB_DATA_TYPE_UINT); } +#line 6665 "sql.c" break; case 218: /* type_name ::= BIGINT UNSIGNED */ -{ yymsp[-1].minor.yy232 = createDataType(TSDB_DATA_TYPE_UBIGINT); } +#line 416 "sql.y" +{ yymsp[-1].minor.yy154 = createDataType(TSDB_DATA_TYPE_UBIGINT); } +#line 6670 "sql.c" break; case 219: /* type_name ::= JSON */ -{ yymsp[0].minor.yy232 = createDataType(TSDB_DATA_TYPE_JSON); } +#line 417 "sql.y" +{ yymsp[0].minor.yy154 = createDataType(TSDB_DATA_TYPE_JSON); } +#line 6675 "sql.c" break; case 220: /* type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy232 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, &yymsp[-1].minor.yy0); } +#line 418 "sql.y" +{ yymsp[-3].minor.yy154 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, &yymsp[-1].minor.yy0); } +#line 6680 "sql.c" break; case 221: /* type_name ::= MEDIUMBLOB */ -{ yymsp[0].minor.yy232 = createDataType(TSDB_DATA_TYPE_MEDIUMBLOB); } +#line 419 "sql.y" +{ yymsp[0].minor.yy154 = createDataType(TSDB_DATA_TYPE_MEDIUMBLOB); } +#line 6685 "sql.c" break; case 222: /* type_name ::= BLOB */ -{ yymsp[0].minor.yy232 = createDataType(TSDB_DATA_TYPE_BLOB); } +#line 420 "sql.y" +{ yymsp[0].minor.yy154 = createDataType(TSDB_DATA_TYPE_BLOB); } +#line 6690 "sql.c" break; case 223: /* type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy232 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, &yymsp[-1].minor.yy0); } +#line 421 "sql.y" +{ yymsp[-3].minor.yy154 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, &yymsp[-1].minor.yy0); } +#line 6695 "sql.c" break; case 224: /* type_name ::= GEOMETRY NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy232 = createVarLenDataType(TSDB_DATA_TYPE_GEOMETRY, &yymsp[-1].minor.yy0); } +#line 422 "sql.y" +{ yymsp[-3].minor.yy154 = createVarLenDataType(TSDB_DATA_TYPE_GEOMETRY, &yymsp[-1].minor.yy0); } +#line 6700 "sql.c" break; case 225: /* type_name ::= DECIMAL */ -{ yymsp[0].minor.yy232 = createDataType(TSDB_DATA_TYPE_DECIMAL); } +#line 423 "sql.y" +{ yymsp[0].minor.yy154 = createDataType(TSDB_DATA_TYPE_DECIMAL); } +#line 6705 "sql.c" break; case 226: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy232 = createDataType(TSDB_DATA_TYPE_DECIMAL); } +#line 424 "sql.y" +{ yymsp[-3].minor.yy154 = createDataType(TSDB_DATA_TYPE_DECIMAL); } +#line 6710 "sql.c" break; case 227: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ -{ yymsp[-5].minor.yy232 = createDataType(TSDB_DATA_TYPE_DECIMAL); } +#line 425 "sql.y" +{ yymsp[-5].minor.yy154 = createDataType(TSDB_DATA_TYPE_DECIMAL); } +#line 6715 "sql.c" break; case 228: /* type_name_default_len ::= BINARY */ -{ yymsp[0].minor.yy232 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, NULL); } +#line 429 "sql.y" +{ yymsp[0].minor.yy154 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, NULL); } +#line 6720 "sql.c" break; case 229: /* type_name_default_len ::= NCHAR */ -{ yymsp[0].minor.yy232 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, NULL); } +#line 430 "sql.y" +{ yymsp[0].minor.yy154 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, NULL); } +#line 6725 "sql.c" break; case 230: /* type_name_default_len ::= VARCHAR */ -{ yymsp[0].minor.yy232 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, NULL); } +#line 431 "sql.y" +{ yymsp[0].minor.yy154 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, NULL); } +#line 6730 "sql.c" break; case 231: /* type_name_default_len ::= VARBINARY */ -{ yymsp[0].minor.yy232 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, NULL); } +#line 432 "sql.y" +{ yymsp[0].minor.yy154 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, NULL); } +#line 6735 "sql.c" break; case 234: /* tags_def ::= TAGS NK_LP column_def_list NK_RP */ - case 395: /* tag_def_or_ref_opt ::= TAGS NK_LP column_stream_def_list NK_RP */ yytestcase(yyruleno==395); -{ yymsp[-3].minor.yy984 = yymsp[-1].minor.yy984; } + case 406: /* tag_def_or_ref_opt ::= TAGS NK_LP column_stream_def_list NK_RP */ yytestcase(yyruleno==406); +#line 441 "sql.y" +{ yymsp[-3].minor.yy694 = yymsp[-1].minor.yy694; } +#line 6741 "sql.c" break; case 235: /* table_options ::= */ -{ yymsp[1].minor.yy720 = createDefaultTableOptions(pCxt); } +#line 443 "sql.y" +{ yymsp[1].minor.yy722 = createDefaultTableOptions(pCxt); } +#line 6746 "sql.c" break; case 236: /* table_options ::= table_options COMMENT NK_STRING */ -{ yylhsminor.yy720 = setTableOption(pCxt, yymsp[-2].minor.yy720, TABLE_OPTION_COMMENT, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy720 = yylhsminor.yy720; +#line 444 "sql.y" +{ yylhsminor.yy722 = setTableOption(pCxt, yymsp[-2].minor.yy722, TABLE_OPTION_COMMENT, &yymsp[0].minor.yy0); } +#line 6751 "sql.c" + yymsp[-2].minor.yy722 = yylhsminor.yy722; break; case 237: /* table_options ::= table_options MAX_DELAY duration_list */ -{ yylhsminor.yy720 = setTableOption(pCxt, yymsp[-2].minor.yy720, TABLE_OPTION_MAXDELAY, yymsp[0].minor.yy984); } - yymsp[-2].minor.yy720 = yylhsminor.yy720; +#line 445 "sql.y" +{ yylhsminor.yy722 = setTableOption(pCxt, yymsp[-2].minor.yy722, TABLE_OPTION_MAXDELAY, yymsp[0].minor.yy694); } +#line 6757 "sql.c" + yymsp[-2].minor.yy722 = yylhsminor.yy722; break; case 238: /* table_options ::= table_options WATERMARK duration_list */ -{ yylhsminor.yy720 = setTableOption(pCxt, yymsp[-2].minor.yy720, TABLE_OPTION_WATERMARK, yymsp[0].minor.yy984); } - yymsp[-2].minor.yy720 = yylhsminor.yy720; +#line 446 "sql.y" +{ yylhsminor.yy722 = setTableOption(pCxt, yymsp[-2].minor.yy722, TABLE_OPTION_WATERMARK, yymsp[0].minor.yy694); } +#line 6763 "sql.c" + yymsp[-2].minor.yy722 = yylhsminor.yy722; break; case 239: /* table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ -{ yylhsminor.yy720 = setTableOption(pCxt, yymsp[-4].minor.yy720, TABLE_OPTION_ROLLUP, yymsp[-1].minor.yy984); } - yymsp[-4].minor.yy720 = yylhsminor.yy720; +#line 447 "sql.y" +{ yylhsminor.yy722 = setTableOption(pCxt, yymsp[-4].minor.yy722, TABLE_OPTION_ROLLUP, yymsp[-1].minor.yy694); } +#line 6769 "sql.c" + yymsp[-4].minor.yy722 = yylhsminor.yy722; break; case 240: /* table_options ::= table_options TTL NK_INTEGER */ -{ yylhsminor.yy720 = setTableOption(pCxt, yymsp[-2].minor.yy720, TABLE_OPTION_TTL, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy720 = yylhsminor.yy720; +#line 448 "sql.y" +{ yylhsminor.yy722 = setTableOption(pCxt, yymsp[-2].minor.yy722, TABLE_OPTION_TTL, &yymsp[0].minor.yy0); } +#line 6775 "sql.c" + yymsp[-2].minor.yy722 = yylhsminor.yy722; break; case 241: /* table_options ::= table_options SMA NK_LP col_name_list NK_RP */ -{ yylhsminor.yy720 = setTableOption(pCxt, yymsp[-4].minor.yy720, TABLE_OPTION_SMA, yymsp[-1].minor.yy984); } - yymsp[-4].minor.yy720 = yylhsminor.yy720; +#line 449 "sql.y" +{ yylhsminor.yy722 = setTableOption(pCxt, yymsp[-4].minor.yy722, TABLE_OPTION_SMA, yymsp[-1].minor.yy694); } +#line 6781 "sql.c" + yymsp[-4].minor.yy722 = yylhsminor.yy722; break; case 242: /* table_options ::= table_options DELETE_MARK duration_list */ -{ yylhsminor.yy720 = setTableOption(pCxt, yymsp[-2].minor.yy720, TABLE_OPTION_DELETE_MARK, yymsp[0].minor.yy984); } - yymsp[-2].minor.yy720 = yylhsminor.yy720; +#line 450 "sql.y" +{ yylhsminor.yy722 = setTableOption(pCxt, yymsp[-2].minor.yy722, TABLE_OPTION_DELETE_MARK, yymsp[0].minor.yy694); } +#line 6787 "sql.c" + yymsp[-2].minor.yy722 = yylhsminor.yy722; break; case 243: /* alter_table_options ::= alter_table_option */ -{ yylhsminor.yy720 = createAlterTableOptions(pCxt); yylhsminor.yy720 = setTableOption(pCxt, yylhsminor.yy720, yymsp[0].minor.yy5.type, &yymsp[0].minor.yy5.val); } - yymsp[0].minor.yy720 = yylhsminor.yy720; +#line 452 "sql.y" +{ yylhsminor.yy722 = createAlterTableOptions(pCxt); yylhsminor.yy722 = setTableOption(pCxt, yylhsminor.yy722, yymsp[0].minor.yy845.type, &yymsp[0].minor.yy845.val); } +#line 6793 "sql.c" + yymsp[0].minor.yy722 = yylhsminor.yy722; break; case 244: /* alter_table_options ::= alter_table_options alter_table_option */ -{ yylhsminor.yy720 = setTableOption(pCxt, yymsp[-1].minor.yy720, yymsp[0].minor.yy5.type, &yymsp[0].minor.yy5.val); } - yymsp[-1].minor.yy720 = yylhsminor.yy720; +#line 453 "sql.y" +{ yylhsminor.yy722 = setTableOption(pCxt, yymsp[-1].minor.yy722, yymsp[0].minor.yy845.type, &yymsp[0].minor.yy845.val); } +#line 6799 "sql.c" + yymsp[-1].minor.yy722 = yylhsminor.yy722; break; case 245: /* alter_table_option ::= COMMENT NK_STRING */ -{ yymsp[-1].minor.yy5.type = TABLE_OPTION_COMMENT; yymsp[-1].minor.yy5.val = yymsp[0].minor.yy0; } +#line 457 "sql.y" +{ yymsp[-1].minor.yy845.type = TABLE_OPTION_COMMENT; yymsp[-1].minor.yy845.val = yymsp[0].minor.yy0; } +#line 6805 "sql.c" break; case 246: /* alter_table_option ::= TTL NK_INTEGER */ -{ yymsp[-1].minor.yy5.type = TABLE_OPTION_TTL; yymsp[-1].minor.yy5.val = yymsp[0].minor.yy0; } +#line 458 "sql.y" +{ yymsp[-1].minor.yy845.type = TABLE_OPTION_TTL; yymsp[-1].minor.yy845.val = yymsp[0].minor.yy0; } +#line 6810 "sql.c" break; case 247: /* duration_list ::= duration_literal */ - case 522: /* expression_list ::= expr_or_subquery */ yytestcase(yyruleno==522); -{ yylhsminor.yy984 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy720)); } - yymsp[0].minor.yy984 = yylhsminor.yy984; + case 534: /* expression_list ::= expr_or_subquery */ yytestcase(yyruleno==534); +#line 462 "sql.y" +{ yylhsminor.yy694 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy722)); } +#line 6816 "sql.c" + yymsp[0].minor.yy694 = yylhsminor.yy694; break; case 248: /* duration_list ::= duration_list NK_COMMA duration_literal */ - case 523: /* expression_list ::= expression_list NK_COMMA expr_or_subquery */ yytestcase(yyruleno==523); -{ yylhsminor.yy984 = addNodeToList(pCxt, yymsp[-2].minor.yy984, releaseRawExprNode(pCxt, yymsp[0].minor.yy720)); } - yymsp[-2].minor.yy984 = yylhsminor.yy984; + case 535: /* expression_list ::= expression_list NK_COMMA expr_or_subquery */ yytestcase(yyruleno==535); +#line 463 "sql.y" +{ yylhsminor.yy694 = addNodeToList(pCxt, yymsp[-2].minor.yy694, releaseRawExprNode(pCxt, yymsp[0].minor.yy722)); } +#line 6823 "sql.c" + yymsp[-2].minor.yy694 = yylhsminor.yy694; break; case 251: /* rollup_func_name ::= function_name */ -{ yylhsminor.yy720 = createFunctionNode(pCxt, &yymsp[0].minor.yy1045, NULL); } - yymsp[0].minor.yy720 = yylhsminor.yy720; + case 342: /* tsma_func_name ::= sma_func_name */ yytestcase(yyruleno==342); +#line 470 "sql.y" +{ yylhsminor.yy722 = createFunctionNode(pCxt, &yymsp[0].minor.yy659, NULL); } +#line 6830 "sql.c" + yymsp[0].minor.yy722 = yylhsminor.yy722; break; case 252: /* rollup_func_name ::= FIRST */ case 253: /* rollup_func_name ::= LAST */ yytestcase(yyruleno==253); case 325: /* tag_item ::= QTAGS */ yytestcase(yyruleno==325); -{ yylhsminor.yy720 = createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL); } - yymsp[0].minor.yy720 = yylhsminor.yy720; +#line 471 "sql.y" +{ yylhsminor.yy722 = createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL); } +#line 6838 "sql.c" + yymsp[0].minor.yy722 = yylhsminor.yy722; break; case 256: /* col_name ::= column_name */ case 326: /* tag_item ::= column_name */ yytestcase(yyruleno==326); -{ yylhsminor.yy720 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy1045); } - yymsp[0].minor.yy720 = yylhsminor.yy720; +#line 479 "sql.y" +{ yylhsminor.yy722 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy659); } +#line 6845 "sql.c" + yymsp[0].minor.yy722 = yylhsminor.yy722; break; case 257: /* cmd ::= SHOW DNODES */ +#line 482 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DNODES_STMT); } +#line 6851 "sql.c" break; case 258: /* cmd ::= SHOW USERS */ +#line 483 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_USERS_STMT); } +#line 6856 "sql.c" break; case 259: /* cmd ::= SHOW USER PRIVILEGES */ +#line 484 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_USER_PRIVILEGES_STMT); } +#line 6861 "sql.c" break; case 260: /* cmd ::= SHOW db_kind_opt DATABASES */ +#line 485 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DATABASES_STMT); - setShowKind(pCxt, pCxt->pRootNode, yymsp[-1].minor.yy1029); + setShowKind(pCxt, pCxt->pRootNode, yymsp[-1].minor.yy89); } +#line 6869 "sql.c" break; case 261: /* cmd ::= SHOW table_kind_db_name_cond_opt TABLES like_pattern_opt */ +#line 489 "sql.y" { - pCxt->pRootNode = createShowTablesStmt(pCxt, yymsp[-2].minor.yy165, yymsp[0].minor.yy720, OP_TYPE_LIKE); + pCxt->pRootNode = createShowTablesStmt(pCxt, yymsp[-2].minor.yy817, yymsp[0].minor.yy722, OP_TYPE_LIKE); } +#line 6876 "sql.c" break; case 262: /* cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_STABLES_STMT, yymsp[-2].minor.yy720, yymsp[0].minor.yy720, OP_TYPE_LIKE); } +#line 492 "sql.y" +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_STABLES_STMT, yymsp[-2].minor.yy722, yymsp[0].minor.yy722, OP_TYPE_LIKE); } +#line 6881 "sql.c" break; case 263: /* cmd ::= SHOW db_name_cond_opt VGROUPS */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, yymsp[-1].minor.yy720, NULL, OP_TYPE_LIKE); } +#line 493 "sql.y" +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, yymsp[-1].minor.yy722, NULL, OP_TYPE_LIKE); } +#line 6886 "sql.c" break; case 264: /* cmd ::= SHOW MNODES */ +#line 494 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_MNODES_STMT); } +#line 6891 "sql.c" break; case 265: /* cmd ::= SHOW QNODES */ +#line 496 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QNODES_STMT); } +#line 6896 "sql.c" break; case 266: /* cmd ::= SHOW ARBGROUPS */ +#line 497 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_ARBGROUPS_STMT); } +#line 6901 "sql.c" break; case 267: /* cmd ::= SHOW FUNCTIONS */ +#line 498 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_FUNCTIONS_STMT); } +#line 6906 "sql.c" break; case 268: /* cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, yymsp[0].minor.yy720, yymsp[-1].minor.yy720, OP_TYPE_EQUAL); } +#line 499 "sql.y" +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, yymsp[0].minor.yy722, yymsp[-1].minor.yy722, OP_TYPE_EQUAL); } +#line 6911 "sql.c" break; case 269: /* cmd ::= SHOW INDEXES FROM db_name NK_DOT table_name */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, createIdentifierValueNode(pCxt, &yymsp[-2].minor.yy1045), createIdentifierValueNode(pCxt, &yymsp[0].minor.yy1045), OP_TYPE_EQUAL); } +#line 500 "sql.y" +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, createIdentifierValueNode(pCxt, &yymsp[-2].minor.yy659), createIdentifierValueNode(pCxt, &yymsp[0].minor.yy659), OP_TYPE_EQUAL); } +#line 6916 "sql.c" break; case 270: /* cmd ::= SHOW STREAMS */ +#line 501 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_STREAMS_STMT); } +#line 6921 "sql.c" break; case 271: /* cmd ::= SHOW ACCOUNTS */ +#line 502 "sql.y" { pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); } +#line 6926 "sql.c" break; case 272: /* cmd ::= SHOW APPS */ +#line 503 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_APPS_STMT); } +#line 6931 "sql.c" break; case 273: /* cmd ::= SHOW CONNECTIONS */ +#line 504 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CONNECTIONS_STMT); } +#line 6936 "sql.c" break; case 274: /* cmd ::= SHOW LICENCES */ case 275: /* cmd ::= SHOW GRANTS */ yytestcase(yyruleno==275); +#line 505 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LICENCES_STMT); } +#line 6942 "sql.c" break; case 276: /* cmd ::= SHOW GRANTS FULL */ +#line 507 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_GRANTS_FULL_STMT); } +#line 6947 "sql.c" break; case 277: /* cmd ::= SHOW GRANTS LOGS */ +#line 508 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_GRANTS_LOGS_STMT); } +#line 6952 "sql.c" break; case 278: /* cmd ::= SHOW CLUSTER MACHINES */ +#line 509 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CLUSTER_MACHINES_STMT); } +#line 6957 "sql.c" break; case 279: /* cmd ::= SHOW CREATE DATABASE db_name */ -{ pCxt->pRootNode = createShowCreateDatabaseStmt(pCxt, &yymsp[0].minor.yy1045); } +#line 510 "sql.y" +{ pCxt->pRootNode = createShowCreateDatabaseStmt(pCxt, &yymsp[0].minor.yy659); } +#line 6962 "sql.c" break; case 280: /* cmd ::= SHOW CREATE TABLE full_table_name */ -{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_TABLE_STMT, yymsp[0].minor.yy720); } +#line 511 "sql.y" +{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_TABLE_STMT, yymsp[0].minor.yy722); } +#line 6967 "sql.c" break; case 281: /* cmd ::= SHOW CREATE STABLE full_table_name */ -{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_STABLE_STMT, yymsp[0].minor.yy720); } +#line 512 "sql.y" +{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_STABLE_STMT, yymsp[0].minor.yy722); } +#line 6972 "sql.c" break; case 282: /* cmd ::= SHOW QUERIES */ +#line 513 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QUERIES_STMT); } +#line 6977 "sql.c" break; case 283: /* cmd ::= SHOW SCORES */ +#line 514 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SCORES_STMT); } +#line 6982 "sql.c" break; case 284: /* cmd ::= SHOW TOPICS */ +#line 515 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TOPICS_STMT); } +#line 6987 "sql.c" break; case 285: /* cmd ::= SHOW VARIABLES */ case 286: /* cmd ::= SHOW CLUSTER VARIABLES */ yytestcase(yyruleno==286); +#line 516 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_VARIABLES_STMT); } +#line 6993 "sql.c" break; case 287: /* cmd ::= SHOW LOCAL VARIABLES */ +#line 518 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LOCAL_VARIABLES_STMT); } +#line 6998 "sql.c" break; case 288: /* 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.yy720); } +#line 519 "sql.y" +{ pCxt->pRootNode = createShowDnodeVariablesStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[-2].minor.yy0), yymsp[0].minor.yy722); } +#line 7003 "sql.c" break; case 289: /* cmd ::= SHOW BNODES */ +#line 520 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_BNODES_STMT); } +#line 7008 "sql.c" break; case 290: /* cmd ::= SHOW SNODES */ +#line 521 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SNODES_STMT); } +#line 7013 "sql.c" break; case 291: /* cmd ::= SHOW CLUSTER */ +#line 522 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CLUSTER_STMT); } +#line 7018 "sql.c" break; case 292: /* cmd ::= SHOW TRANSACTIONS */ +#line 523 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TRANSACTIONS_STMT); } +#line 7023 "sql.c" break; case 293: /* cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ -{ pCxt->pRootNode = createShowTableDistributedStmt(pCxt, yymsp[0].minor.yy720); } +#line 524 "sql.y" +{ pCxt->pRootNode = createShowTableDistributedStmt(pCxt, yymsp[0].minor.yy722); } +#line 7028 "sql.c" break; case 294: /* cmd ::= SHOW CONSUMERS */ +#line 525 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CONSUMERS_STMT); } +#line 7033 "sql.c" break; case 295: /* cmd ::= SHOW SUBSCRIPTIONS */ +#line 526 "sql.y" { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SUBSCRIPTIONS_STMT); } +#line 7038 "sql.c" break; case 296: /* cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TAGS_STMT, yymsp[0].minor.yy720, yymsp[-1].minor.yy720, OP_TYPE_EQUAL); } +#line 527 "sql.y" +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TAGS_STMT, yymsp[0].minor.yy722, yymsp[-1].minor.yy722, OP_TYPE_EQUAL); } +#line 7043 "sql.c" break; case 297: /* cmd ::= SHOW TAGS FROM db_name NK_DOT table_name */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TAGS_STMT, createIdentifierValueNode(pCxt, &yymsp[-2].minor.yy1045), createIdentifierValueNode(pCxt, &yymsp[0].minor.yy1045), OP_TYPE_EQUAL); } +#line 528 "sql.y" +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TAGS_STMT, createIdentifierValueNode(pCxt, &yymsp[-2].minor.yy659), createIdentifierValueNode(pCxt, &yymsp[0].minor.yy659), OP_TYPE_EQUAL); } +#line 7048 "sql.c" break; case 298: /* cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ -{ pCxt->pRootNode = createShowTableTagsStmt(pCxt, yymsp[-1].minor.yy720, yymsp[0].minor.yy720, yymsp[-3].minor.yy984); } +#line 529 "sql.y" +{ pCxt->pRootNode = createShowTableTagsStmt(pCxt, yymsp[-1].minor.yy722, yymsp[0].minor.yy722, yymsp[-3].minor.yy694); } +#line 7053 "sql.c" break; case 299: /* cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name */ -{ pCxt->pRootNode = createShowTableTagsStmt(pCxt, createIdentifierValueNode(pCxt, &yymsp[0].minor.yy1045), createIdentifierValueNode(pCxt, &yymsp[-2].minor.yy1045), yymsp[-4].minor.yy984); } +#line 530 "sql.y" +{ pCxt->pRootNode = createShowTableTagsStmt(pCxt, createIdentifierValueNode(pCxt, &yymsp[0].minor.yy659), createIdentifierValueNode(pCxt, &yymsp[-2].minor.yy659), yymsp[-4].minor.yy694); } +#line 7058 "sql.c" break; case 300: /* cmd ::= SHOW VNODES ON DNODE NK_INTEGER */ +#line 531 "sql.y" { pCxt->pRootNode = createShowVnodesStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0), NULL); } +#line 7063 "sql.c" break; case 301: /* cmd ::= SHOW VNODES */ +#line 532 "sql.y" { pCxt->pRootNode = createShowVnodesStmt(pCxt, NULL, NULL); } +#line 7068 "sql.c" break; case 302: /* cmd ::= SHOW db_name_cond_opt ALIVE */ -{ pCxt->pRootNode = createShowAliveStmt(pCxt, yymsp[-1].minor.yy720, QUERY_NODE_SHOW_DB_ALIVE_STMT); } +#line 534 "sql.y" +{ pCxt->pRootNode = createShowAliveStmt(pCxt, yymsp[-1].minor.yy722, QUERY_NODE_SHOW_DB_ALIVE_STMT); } +#line 7073 "sql.c" break; case 303: /* cmd ::= SHOW CLUSTER ALIVE */ +#line 535 "sql.y" { pCxt->pRootNode = createShowAliveStmt(pCxt, NULL, QUERY_NODE_SHOW_CLUSTER_ALIVE_STMT); } +#line 7078 "sql.c" break; case 304: /* cmd ::= SHOW db_name_cond_opt VIEWS like_pattern_opt */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VIEWS_STMT, yymsp[-2].minor.yy720, yymsp[0].minor.yy720, OP_TYPE_LIKE); } +#line 536 "sql.y" +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VIEWS_STMT, yymsp[-2].minor.yy722, yymsp[0].minor.yy722, OP_TYPE_LIKE); } +#line 7083 "sql.c" break; case 305: /* cmd ::= SHOW CREATE VIEW full_table_name */ -{ pCxt->pRootNode = createShowCreateViewStmt(pCxt, QUERY_NODE_SHOW_CREATE_VIEW_STMT, yymsp[0].minor.yy720); } +#line 537 "sql.y" +{ pCxt->pRootNode = createShowCreateViewStmt(pCxt, QUERY_NODE_SHOW_CREATE_VIEW_STMT, yymsp[0].minor.yy722); } +#line 7088 "sql.c" break; case 306: /* cmd ::= SHOW COMPACTS */ +#line 538 "sql.y" { pCxt->pRootNode = createShowCompactsStmt(pCxt, QUERY_NODE_SHOW_COMPACTS_STMT); } +#line 7093 "sql.c" break; case 307: /* cmd ::= SHOW COMPACT NK_INTEGER */ +#line 539 "sql.y" { pCxt->pRootNode = createShowCompactDetailsStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } +#line 7098 "sql.c" break; case 308: /* table_kind_db_name_cond_opt ::= */ -{ yymsp[1].minor.yy165.kind = SHOW_KIND_ALL; yymsp[1].minor.yy165.dbName = nil_token; } +#line 543 "sql.y" +{ yymsp[1].minor.yy817.kind = SHOW_KIND_ALL; yymsp[1].minor.yy817.dbName = nil_token; } +#line 7103 "sql.c" break; case 309: /* table_kind_db_name_cond_opt ::= table_kind */ -{ yylhsminor.yy165.kind = yymsp[0].minor.yy1029; yylhsminor.yy165.dbName = nil_token; } - yymsp[0].minor.yy165 = yylhsminor.yy165; +#line 544 "sql.y" +{ yylhsminor.yy817.kind = yymsp[0].minor.yy89; yylhsminor.yy817.dbName = nil_token; } +#line 7108 "sql.c" + yymsp[0].minor.yy817 = yylhsminor.yy817; break; case 310: /* table_kind_db_name_cond_opt ::= db_name NK_DOT */ -{ yylhsminor.yy165.kind = SHOW_KIND_ALL; yylhsminor.yy165.dbName = yymsp[-1].minor.yy1045; } - yymsp[-1].minor.yy165 = yylhsminor.yy165; +#line 545 "sql.y" +{ yylhsminor.yy817.kind = SHOW_KIND_ALL; yylhsminor.yy817.dbName = yymsp[-1].minor.yy659; } +#line 7114 "sql.c" + yymsp[-1].minor.yy817 = yylhsminor.yy817; break; case 311: /* table_kind_db_name_cond_opt ::= table_kind db_name NK_DOT */ -{ yylhsminor.yy165.kind = yymsp[-2].minor.yy1029; yylhsminor.yy165.dbName = yymsp[-1].minor.yy1045; } - yymsp[-2].minor.yy165 = yylhsminor.yy165; +#line 546 "sql.y" +{ yylhsminor.yy817.kind = yymsp[-2].minor.yy89; yylhsminor.yy817.dbName = yymsp[-1].minor.yy659; } +#line 7120 "sql.c" + yymsp[-2].minor.yy817 = yylhsminor.yy817; break; case 312: /* table_kind ::= NORMAL */ -{ yymsp[0].minor.yy1029 = SHOW_KIND_TABLES_NORMAL; } +#line 550 "sql.y" +{ yymsp[0].minor.yy89 = SHOW_KIND_TABLES_NORMAL; } +#line 7126 "sql.c" break; case 313: /* table_kind ::= CHILD */ -{ yymsp[0].minor.yy1029 = SHOW_KIND_TABLES_CHILD; } +#line 551 "sql.y" +{ yymsp[0].minor.yy89 = SHOW_KIND_TABLES_CHILD; } +#line 7131 "sql.c" break; case 314: /* db_name_cond_opt ::= */ case 319: /* from_db_opt ::= */ yytestcase(yyruleno==319); -{ yymsp[1].minor.yy720 = createDefaultDatabaseCondValue(pCxt); } +#line 553 "sql.y" +{ yymsp[1].minor.yy722 = createDefaultDatabaseCondValue(pCxt); } +#line 7137 "sql.c" break; case 315: /* db_name_cond_opt ::= db_name NK_DOT */ -{ yylhsminor.yy720 = createIdentifierValueNode(pCxt, &yymsp[-1].minor.yy1045); } - yymsp[-1].minor.yy720 = yylhsminor.yy720; +#line 554 "sql.y" +{ yylhsminor.yy722 = createIdentifierValueNode(pCxt, &yymsp[-1].minor.yy659); } +#line 7142 "sql.c" + yymsp[-1].minor.yy722 = yylhsminor.yy722; break; case 317: /* like_pattern_opt ::= LIKE NK_STRING */ -{ yymsp[-1].minor.yy720 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } +#line 557 "sql.y" +{ yymsp[-1].minor.yy722 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } +#line 7148 "sql.c" break; case 318: /* table_name_cond ::= table_name */ -{ yylhsminor.yy720 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy1045); } - yymsp[0].minor.yy720 = yylhsminor.yy720; +#line 559 "sql.y" +{ yylhsminor.yy722 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy659); } +#line 7153 "sql.c" + yymsp[0].minor.yy722 = yylhsminor.yy722; break; case 320: /* from_db_opt ::= FROM db_name */ -{ yymsp[-1].minor.yy720 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy1045); } +#line 562 "sql.y" +{ yymsp[-1].minor.yy722 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy659); } +#line 7159 "sql.c" break; case 324: /* tag_item ::= TBNAME */ -{ yylhsminor.yy720 = setProjectionAlias(pCxt, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL), &yymsp[0].minor.yy0); } - yymsp[0].minor.yy720 = yylhsminor.yy720; +#line 570 "sql.y" +{ yylhsminor.yy722 = setProjectionAlias(pCxt, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL), &yymsp[0].minor.yy0); } +#line 7164 "sql.c" + yymsp[0].minor.yy722 = yylhsminor.yy722; break; case 327: /* tag_item ::= column_name column_alias */ -{ yylhsminor.yy720 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-1].minor.yy1045), &yymsp[0].minor.yy1045); } - yymsp[-1].minor.yy720 = yylhsminor.yy720; +#line 573 "sql.y" +{ yylhsminor.yy722 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-1].minor.yy659), &yymsp[0].minor.yy659); } +#line 7170 "sql.c" + yymsp[-1].minor.yy722 = yylhsminor.yy722; break; case 328: /* tag_item ::= column_name AS column_alias */ -{ yylhsminor.yy720 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-2].minor.yy1045), &yymsp[0].minor.yy1045); } - yymsp[-2].minor.yy720 = yylhsminor.yy720; +#line 574 "sql.y" +{ yylhsminor.yy722 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-2].minor.yy659), &yymsp[0].minor.yy659); } +#line 7176 "sql.c" + yymsp[-2].minor.yy722 = yylhsminor.yy722; break; case 329: /* db_kind_opt ::= */ -{ yymsp[1].minor.yy1029 = SHOW_KIND_ALL; } +#line 578 "sql.y" +{ yymsp[1].minor.yy89 = SHOW_KIND_ALL; } +#line 7182 "sql.c" break; case 330: /* db_kind_opt ::= USER */ -{ yymsp[0].minor.yy1029 = SHOW_KIND_DATABASES_USER; } +#line 579 "sql.y" +{ yymsp[0].minor.yy89 = SHOW_KIND_DATABASES_USER; } +#line 7187 "sql.c" break; case 331: /* db_kind_opt ::= SYSTEM */ -{ yymsp[0].minor.yy1029 = SHOW_KIND_DATABASES_SYSTEM; } +#line 580 "sql.y" +{ yymsp[0].minor.yy89 = SHOW_KIND_DATABASES_SYSTEM; } +#line 7192 "sql.c" break; - case 332: /* 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.yy833, yymsp[-3].minor.yy720, yymsp[-1].minor.yy720, NULL, yymsp[0].minor.yy720); } + case 332: /* cmd ::= CREATE TSMA not_exists_opt tsma_name ON full_table_name tsma_opt INTERVAL NK_LP duration_literal NK_RP */ +#line 585 "sql.y" +{ pCxt->pRootNode = createCreateTSMAStmt(pCxt, yymsp[-8].minor.yy897, &yymsp[-7].minor.yy659, yymsp[-4].minor.yy722, yymsp[-5].minor.yy722, releaseRawExprNode(pCxt, yymsp[-1].minor.yy722)); } +#line 7197 "sql.c" break; - case 333: /* 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.yy833, yymsp[-5].minor.yy720, yymsp[-3].minor.yy720, yymsp[-1].minor.yy984, NULL); } + case 333: /* cmd ::= DROP TSMA exists_opt full_tsma_name */ +#line 586 "sql.y" +{ pCxt->pRootNode = createDropTSMAStmt(pCxt, yymsp[-1].minor.yy897, yymsp[0].minor.yy722); } +#line 7202 "sql.c" break; - case 334: /* cmd ::= DROP INDEX exists_opt full_index_name */ -{ pCxt->pRootNode = createDropIndexStmt(pCxt, yymsp[-1].minor.yy833, yymsp[0].minor.yy720); } + case 334: /* cmd ::= SHOW CREATE TSMA full_tsma_name */ +#line 587 "sql.y" +{ pCxt->pRootNode = createShowCreateTSMAStmt(pCxt, yymsp[0].minor.yy722); } +#line 7207 "sql.c" break; - case 335: /* full_index_name ::= index_name */ -{ yylhsminor.yy720 = createRealTableNodeForIndexName(pCxt, NULL, &yymsp[0].minor.yy1045); } - yymsp[0].minor.yy720 = yylhsminor.yy720; + case 335: /* cmd ::= SHOW db_name_cond_opt TSMAS */ +#line 588 "sql.y" +{ pCxt->pRootNode = createShowTSMASStmt(pCxt, yymsp[-1].minor.yy722); } +#line 7212 "sql.c" break; - case 336: /* full_index_name ::= db_name NK_DOT index_name */ -{ yylhsminor.yy720 = createRealTableNodeForIndexName(pCxt, &yymsp[-2].minor.yy1045, &yymsp[0].minor.yy1045); } - yymsp[-2].minor.yy720 = yylhsminor.yy720; + case 336: /* full_tsma_name ::= tsma_name */ + case 346: /* full_index_name ::= index_name */ yytestcase(yyruleno==346); +#line 590 "sql.y" +{ yylhsminor.yy722 = createRealTableNodeForIndexName(pCxt, NULL, &yymsp[0].minor.yy659); } +#line 7218 "sql.c" + yymsp[0].minor.yy722 = yylhsminor.yy722; break; - case 337: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ -{ yymsp[-9].minor.yy720 = createIndexOption(pCxt, yymsp[-7].minor.yy984, releaseRawExprNode(pCxt, yymsp[-3].minor.yy720), NULL, yymsp[-1].minor.yy720, yymsp[0].minor.yy720); } + case 337: /* full_tsma_name ::= db_name NK_DOT tsma_name */ + case 347: /* full_index_name ::= db_name NK_DOT index_name */ yytestcase(yyruleno==347); +#line 591 "sql.y" +{ yylhsminor.yy722 = createRealTableNodeForIndexName(pCxt, &yymsp[-2].minor.yy659, &yymsp[0].minor.yy659); } +#line 7225 "sql.c" + yymsp[-2].minor.yy722 = yylhsminor.yy722; break; - case 338: /* 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.yy720 = createIndexOption(pCxt, yymsp[-9].minor.yy984, releaseRawExprNode(pCxt, yymsp[-5].minor.yy720), releaseRawExprNode(pCxt, yymsp[-3].minor.yy720), yymsp[-1].minor.yy720, yymsp[0].minor.yy720); } + case 338: /* tsma_opt ::= */ +#line 595 "sql.y" +{ yymsp[1].minor.yy722 = createDefaultTSMAOptions(pCxt); } +#line 7231 "sql.c" break; - case 341: /* func ::= sma_func_name NK_LP expression_list NK_RP */ -{ yylhsminor.yy720 = createFunctionNode(pCxt, &yymsp[-3].minor.yy1045, yymsp[-1].minor.yy984); } - yymsp[-3].minor.yy720 = yylhsminor.yy720; + case 339: /* tsma_opt ::= FUNCTION NK_LP tsma_func_list NK_RP COLUMN NK_LP col_name_list NK_RP */ +#line 597 "sql.y" +{ yymsp[-7].minor.yy722 = createTSMAOptions(pCxt, yymsp[-5].minor.yy694, yymsp[-1].minor.yy694); } +#line 7236 "sql.c" break; - case 342: /* sma_func_name ::= function_name */ - case 613: /* alias_opt ::= table_alias */ yytestcase(yyruleno==613); -{ yylhsminor.yy1045 = yymsp[0].minor.yy1045; } - yymsp[0].minor.yy1045 = yylhsminor.yy1045; + case 343: /* cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options */ +#line 610 "sql.y" +{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_SMA, yymsp[-4].minor.yy897, yymsp[-3].minor.yy722, yymsp[-1].minor.yy722, NULL, yymsp[0].minor.yy722); } +#line 7241 "sql.c" break; - case 347: /* sma_stream_opt ::= */ - case 396: /* stream_options ::= */ yytestcase(yyruleno==396); -{ yymsp[1].minor.yy720 = createStreamOptions(pCxt); } + case 344: /* cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP */ +#line 612 "sql.y" +{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_NORMAL, yymsp[-6].minor.yy897, yymsp[-5].minor.yy722, yymsp[-3].minor.yy722, yymsp[-1].minor.yy694, NULL); } +#line 7246 "sql.c" break; - case 348: /* sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ -{ ((SStreamOptions*)yymsp[-2].minor.yy720)->pWatermark = releaseRawExprNode(pCxt, yymsp[0].minor.yy720); yylhsminor.yy720 = yymsp[-2].minor.yy720; } - yymsp[-2].minor.yy720 = yylhsminor.yy720; + case 345: /* cmd ::= DROP INDEX exists_opt full_index_name */ +#line 613 "sql.y" +{ pCxt->pRootNode = createDropIndexStmt(pCxt, yymsp[-1].minor.yy897, yymsp[0].minor.yy722); } +#line 7251 "sql.c" break; - case 349: /* sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ -{ ((SStreamOptions*)yymsp[-2].minor.yy720)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy720); yylhsminor.yy720 = yymsp[-2].minor.yy720; } - yymsp[-2].minor.yy720 = yylhsminor.yy720; + case 348: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ +#line 619 "sql.y" +{ yymsp[-9].minor.yy722 = createIndexOption(pCxt, yymsp[-7].minor.yy694, releaseRawExprNode(pCxt, yymsp[-3].minor.yy722), NULL, yymsp[-1].minor.yy722, yymsp[0].minor.yy722); } +#line 7256 "sql.c" break; - case 350: /* sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ -{ ((SStreamOptions*)yymsp[-2].minor.yy720)->pDeleteMark = releaseRawExprNode(pCxt, yymsp[0].minor.yy720); yylhsminor.yy720 = yymsp[-2].minor.yy720; } - yymsp[-2].minor.yy720 = yylhsminor.yy720; + case 349: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt sma_stream_opt */ +#line 622 "sql.y" +{ yymsp[-11].minor.yy722 = createIndexOption(pCxt, yymsp[-9].minor.yy694, releaseRawExprNode(pCxt, yymsp[-5].minor.yy722), releaseRawExprNode(pCxt, yymsp[-3].minor.yy722), yymsp[-1].minor.yy722, yymsp[0].minor.yy722); } +#line 7261 "sql.c" break; - case 351: /* with_meta ::= AS */ -{ yymsp[0].minor.yy488 = 0; } + case 352: /* func ::= sma_func_name NK_LP expression_list NK_RP */ +#line 629 "sql.y" +{ yylhsminor.yy722 = createFunctionNode(pCxt, &yymsp[-3].minor.yy659, yymsp[-1].minor.yy694); } +#line 7266 "sql.c" + yymsp[-3].minor.yy722 = yylhsminor.yy722; break; - case 352: /* with_meta ::= WITH META AS */ -{ yymsp[-2].minor.yy488 = 1; } + case 353: /* sma_func_name ::= function_name */ + case 625: /* alias_opt ::= table_alias */ yytestcase(yyruleno==625); +#line 633 "sql.y" +{ yylhsminor.yy659 = yymsp[0].minor.yy659; } +#line 7273 "sql.c" + yymsp[0].minor.yy659 = yylhsminor.yy659; break; - case 353: /* with_meta ::= ONLY META AS */ -{ yymsp[-2].minor.yy488 = 2; } + case 358: /* sma_stream_opt ::= */ + case 407: /* stream_options ::= */ yytestcase(yyruleno==407); +#line 639 "sql.y" +{ yymsp[1].minor.yy722 = createStreamOptions(pCxt); } +#line 7280 "sql.c" break; - case 354: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ -{ pCxt->pRootNode = createCreateTopicStmtUseQuery(pCxt, yymsp[-3].minor.yy833, &yymsp[-2].minor.yy1045, yymsp[0].minor.yy720); } + case 359: /* sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ +#line 640 "sql.y" +{ ((SStreamOptions*)yymsp[-2].minor.yy722)->pWatermark = releaseRawExprNode(pCxt, yymsp[0].minor.yy722); yylhsminor.yy722 = yymsp[-2].minor.yy722; } +#line 7285 "sql.c" + yymsp[-2].minor.yy722 = yylhsminor.yy722; break; - case 355: /* cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name */ -{ pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-4].minor.yy833, &yymsp[-3].minor.yy1045, &yymsp[0].minor.yy1045, yymsp[-2].minor.yy488); } + case 360: /* sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ +#line 641 "sql.y" +{ ((SStreamOptions*)yymsp[-2].minor.yy722)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy722); yylhsminor.yy722 = yymsp[-2].minor.yy722; } +#line 7291 "sql.c" + yymsp[-2].minor.yy722 = yylhsminor.yy722; break; - case 356: /* cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt */ -{ pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-5].minor.yy833, &yymsp[-4].minor.yy1045, yymsp[-1].minor.yy720, yymsp[-3].minor.yy488, yymsp[0].minor.yy720); } + case 361: /* sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ +#line 642 "sql.y" +{ ((SStreamOptions*)yymsp[-2].minor.yy722)->pDeleteMark = releaseRawExprNode(pCxt, yymsp[0].minor.yy722); yylhsminor.yy722 = yymsp[-2].minor.yy722; } +#line 7297 "sql.c" + yymsp[-2].minor.yy722 = yylhsminor.yy722; break; - case 357: /* cmd ::= DROP TOPIC exists_opt topic_name */ -{ pCxt->pRootNode = createDropTopicStmt(pCxt, yymsp[-1].minor.yy833, &yymsp[0].minor.yy1045); } + case 362: /* with_meta ::= AS */ +#line 647 "sql.y" +{ yymsp[0].minor.yy830 = 0; } +#line 7303 "sql.c" break; - case 358: /* cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ -{ pCxt->pRootNode = createDropCGroupStmt(pCxt, yymsp[-3].minor.yy833, &yymsp[-2].minor.yy1045, &yymsp[0].minor.yy1045); } + case 363: /* with_meta ::= WITH META AS */ +#line 648 "sql.y" +{ yymsp[-2].minor.yy830 = 1; } +#line 7308 "sql.c" break; - case 359: /* cmd ::= DESC full_table_name */ - case 360: /* cmd ::= DESCRIBE full_table_name */ yytestcase(yyruleno==360); -{ pCxt->pRootNode = createDescribeStmt(pCxt, yymsp[0].minor.yy720); } + case 364: /* with_meta ::= ONLY META AS */ +#line 649 "sql.y" +{ yymsp[-2].minor.yy830 = 2; } +#line 7313 "sql.c" break; - case 361: /* cmd ::= RESET QUERY CACHE */ + case 365: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ +#line 651 "sql.y" +{ pCxt->pRootNode = createCreateTopicStmtUseQuery(pCxt, yymsp[-3].minor.yy897, &yymsp[-2].minor.yy659, yymsp[0].minor.yy722); } +#line 7318 "sql.c" + break; + case 366: /* cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name */ +#line 653 "sql.y" +{ pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-4].minor.yy897, &yymsp[-3].minor.yy659, &yymsp[0].minor.yy659, yymsp[-2].minor.yy830); } +#line 7323 "sql.c" + break; + case 367: /* cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt */ +#line 655 "sql.y" +{ pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-5].minor.yy897, &yymsp[-4].minor.yy659, yymsp[-1].minor.yy722, yymsp[-3].minor.yy830, yymsp[0].minor.yy722); } +#line 7328 "sql.c" + break; + case 368: /* cmd ::= DROP TOPIC exists_opt topic_name */ +#line 657 "sql.y" +{ pCxt->pRootNode = createDropTopicStmt(pCxt, yymsp[-1].minor.yy897, &yymsp[0].minor.yy659); } +#line 7333 "sql.c" + break; + case 369: /* cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ +#line 658 "sql.y" +{ pCxt->pRootNode = createDropCGroupStmt(pCxt, yymsp[-3].minor.yy897, &yymsp[-2].minor.yy659, &yymsp[0].minor.yy659); } +#line 7338 "sql.c" + break; + case 370: /* cmd ::= DESC full_table_name */ + case 371: /* cmd ::= DESCRIBE full_table_name */ yytestcase(yyruleno==371); +#line 661 "sql.y" +{ pCxt->pRootNode = createDescribeStmt(pCxt, yymsp[0].minor.yy722); } +#line 7344 "sql.c" + break; + case 372: /* cmd ::= RESET QUERY CACHE */ +#line 665 "sql.y" { pCxt->pRootNode = createResetQueryCacheStmt(pCxt); } +#line 7349 "sql.c" break; - case 362: /* cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ - case 363: /* cmd ::= EXPLAIN analyze_opt explain_options insert_query */ yytestcase(yyruleno==363); -{ pCxt->pRootNode = createExplainStmt(pCxt, yymsp[-2].minor.yy833, yymsp[-1].minor.yy720, yymsp[0].minor.yy720); } + case 373: /* cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ + case 374: /* cmd ::= EXPLAIN analyze_opt explain_options insert_query */ yytestcase(yyruleno==374); +#line 668 "sql.y" +{ pCxt->pRootNode = createExplainStmt(pCxt, yymsp[-2].minor.yy897, yymsp[-1].minor.yy722, yymsp[0].minor.yy722); } +#line 7355 "sql.c" break; - case 366: /* explain_options ::= */ -{ yymsp[1].minor.yy720 = createDefaultExplainOptions(pCxt); } + case 377: /* explain_options ::= */ +#line 676 "sql.y" +{ yymsp[1].minor.yy722 = createDefaultExplainOptions(pCxt); } +#line 7360 "sql.c" break; - case 367: /* explain_options ::= explain_options VERBOSE NK_BOOL */ -{ yylhsminor.yy720 = setExplainVerbose(pCxt, yymsp[-2].minor.yy720, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy720 = yylhsminor.yy720; + case 378: /* explain_options ::= explain_options VERBOSE NK_BOOL */ +#line 677 "sql.y" +{ yylhsminor.yy722 = setExplainVerbose(pCxt, yymsp[-2].minor.yy722, &yymsp[0].minor.yy0); } +#line 7365 "sql.c" + yymsp[-2].minor.yy722 = yylhsminor.yy722; break; - case 368: /* explain_options ::= explain_options RATIO NK_FLOAT */ -{ yylhsminor.yy720 = setExplainRatio(pCxt, yymsp[-2].minor.yy720, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy720 = yylhsminor.yy720; + case 379: /* explain_options ::= explain_options RATIO NK_FLOAT */ +#line 678 "sql.y" +{ yylhsminor.yy722 = setExplainRatio(pCxt, yymsp[-2].minor.yy722, &yymsp[0].minor.yy0); } +#line 7371 "sql.c" + yymsp[-2].minor.yy722 = yylhsminor.yy722; break; - case 369: /* 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.yy833, yymsp[-9].minor.yy833, &yymsp[-6].minor.yy1045, &yymsp[-4].minor.yy0, yymsp[-2].minor.yy232, yymsp[-1].minor.yy488, &yymsp[0].minor.yy1045, yymsp[-10].minor.yy833); } + case 380: /* cmd ::= CREATE or_replace_opt agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt language_opt */ +#line 683 "sql.y" +{ pCxt->pRootNode = createCreateFunctionStmt(pCxt, yymsp[-7].minor.yy897, yymsp[-9].minor.yy897, &yymsp[-6].minor.yy659, &yymsp[-4].minor.yy0, yymsp[-2].minor.yy154, yymsp[-1].minor.yy830, &yymsp[0].minor.yy659, yymsp[-10].minor.yy897); } +#line 7377 "sql.c" break; - case 370: /* cmd ::= DROP FUNCTION exists_opt function_name */ -{ pCxt->pRootNode = createDropFunctionStmt(pCxt, yymsp[-1].minor.yy833, &yymsp[0].minor.yy1045); } + case 381: /* cmd ::= DROP FUNCTION exists_opt function_name */ +#line 684 "sql.y" +{ pCxt->pRootNode = createDropFunctionStmt(pCxt, yymsp[-1].minor.yy897, &yymsp[0].minor.yy659); } +#line 7382 "sql.c" break; - case 375: /* language_opt ::= */ - case 418: /* on_vgroup_id ::= */ yytestcase(yyruleno==418); -{ yymsp[1].minor.yy1045 = nil_token; } + case 386: /* language_opt ::= */ + case 429: /* on_vgroup_id ::= */ yytestcase(yyruleno==429); +#line 698 "sql.y" +{ yymsp[1].minor.yy659 = nil_token; } +#line 7388 "sql.c" break; - case 376: /* language_opt ::= LANGUAGE NK_STRING */ - case 419: /* on_vgroup_id ::= ON NK_INTEGER */ yytestcase(yyruleno==419); -{ yymsp[-1].minor.yy1045 = yymsp[0].minor.yy0; } + case 387: /* language_opt ::= LANGUAGE NK_STRING */ + case 430: /* on_vgroup_id ::= ON NK_INTEGER */ yytestcase(yyruleno==430); +#line 699 "sql.y" +{ yymsp[-1].minor.yy659 = yymsp[0].minor.yy0; } +#line 7394 "sql.c" break; - case 379: /* cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery */ -{ pCxt->pRootNode = createCreateViewStmt(pCxt, yymsp[-4].minor.yy833, yymsp[-2].minor.yy720, &yymsp[-1].minor.yy0, yymsp[0].minor.yy720); } + case 390: /* cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery */ +#line 708 "sql.y" +{ pCxt->pRootNode = createCreateViewStmt(pCxt, yymsp[-4].minor.yy897, yymsp[-2].minor.yy722, &yymsp[-1].minor.yy0, yymsp[0].minor.yy722); } +#line 7399 "sql.c" break; - case 380: /* cmd ::= DROP VIEW exists_opt full_view_name */ -{ pCxt->pRootNode = createDropViewStmt(pCxt, yymsp[-1].minor.yy833, yymsp[0].minor.yy720); } + case 391: /* cmd ::= DROP VIEW exists_opt full_view_name */ +#line 709 "sql.y" +{ pCxt->pRootNode = createDropViewStmt(pCxt, yymsp[-1].minor.yy897, yymsp[0].minor.yy722); } +#line 7404 "sql.c" break; - case 381: /* full_view_name ::= view_name */ -{ yylhsminor.yy720 = createViewNode(pCxt, NULL, &yymsp[0].minor.yy1045); } - yymsp[0].minor.yy720 = yylhsminor.yy720; + case 392: /* full_view_name ::= view_name */ +#line 711 "sql.y" +{ yylhsminor.yy722 = createViewNode(pCxt, NULL, &yymsp[0].minor.yy659); } +#line 7409 "sql.c" + yymsp[0].minor.yy722 = yylhsminor.yy722; break; - case 382: /* full_view_name ::= db_name NK_DOT view_name */ -{ yylhsminor.yy720 = createViewNode(pCxt, &yymsp[-2].minor.yy1045, &yymsp[0].minor.yy1045); } - yymsp[-2].minor.yy720 = yylhsminor.yy720; + case 393: /* full_view_name ::= db_name NK_DOT view_name */ +#line 712 "sql.y" +{ yylhsminor.yy722 = createViewNode(pCxt, &yymsp[-2].minor.yy659, &yymsp[0].minor.yy659); } +#line 7415 "sql.c" + yymsp[-2].minor.yy722 = yylhsminor.yy722; break; - case 383: /* 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.yy833, &yymsp[-8].minor.yy1045, yymsp[-5].minor.yy720, yymsp[-7].minor.yy720, yymsp[-3].minor.yy984, yymsp[-2].minor.yy720, yymsp[0].minor.yy720, yymsp[-4].minor.yy984); } + case 394: /* cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name col_list_opt tag_def_or_ref_opt subtable_opt AS query_or_subquery */ +#line 717 "sql.y" +{ pCxt->pRootNode = createCreateStreamStmt(pCxt, yymsp[-9].minor.yy897, &yymsp[-8].minor.yy659, yymsp[-5].minor.yy722, yymsp[-7].minor.yy722, yymsp[-3].minor.yy694, yymsp[-2].minor.yy722, yymsp[0].minor.yy722, yymsp[-4].minor.yy694); } +#line 7421 "sql.c" break; - case 384: /* cmd ::= DROP STREAM exists_opt stream_name */ -{ pCxt->pRootNode = createDropStreamStmt(pCxt, yymsp[-1].minor.yy833, &yymsp[0].minor.yy1045); } + case 395: /* cmd ::= DROP STREAM exists_opt stream_name */ +#line 718 "sql.y" +{ pCxt->pRootNode = createDropStreamStmt(pCxt, yymsp[-1].minor.yy897, &yymsp[0].minor.yy659); } +#line 7426 "sql.c" break; - case 385: /* cmd ::= PAUSE STREAM exists_opt stream_name */ -{ pCxt->pRootNode = createPauseStreamStmt(pCxt, yymsp[-1].minor.yy833, &yymsp[0].minor.yy1045); } + case 396: /* cmd ::= PAUSE STREAM exists_opt stream_name */ +#line 719 "sql.y" +{ pCxt->pRootNode = createPauseStreamStmt(pCxt, yymsp[-1].minor.yy897, &yymsp[0].minor.yy659); } +#line 7431 "sql.c" break; - case 386: /* cmd ::= RESUME STREAM exists_opt ignore_opt stream_name */ -{ pCxt->pRootNode = createResumeStreamStmt(pCxt, yymsp[-2].minor.yy833, yymsp[-1].minor.yy833, &yymsp[0].minor.yy1045); } + case 397: /* cmd ::= RESUME STREAM exists_opt ignore_opt stream_name */ +#line 720 "sql.y" +{ pCxt->pRootNode = createResumeStreamStmt(pCxt, yymsp[-2].minor.yy897, yymsp[-1].minor.yy897, &yymsp[0].minor.yy659); } +#line 7436 "sql.c" break; - case 391: /* column_stream_def ::= column_name */ -{ yylhsminor.yy720 = createColumnDefNode(pCxt, &yymsp[0].minor.yy1045, createDataType(TSDB_DATA_TYPE_NULL), NULL, false); } - yymsp[0].minor.yy720 = yylhsminor.yy720; + case 402: /* column_stream_def ::= column_name */ +#line 733 "sql.y" +{ yylhsminor.yy722 = createColumnDefNode(pCxt, &yymsp[0].minor.yy659, createDataType(TSDB_DATA_TYPE_NULL), NULL, false); } +#line 7441 "sql.c" + yymsp[0].minor.yy722 = yylhsminor.yy722; break; - case 392: /* column_stream_def ::= column_name PRIMARY KEY */ -{ yylhsminor.yy720 = createColumnDefNode(pCxt, &yymsp[-2].minor.yy1045, createDataType(TSDB_DATA_TYPE_NULL), NULL, true); } - yymsp[-2].minor.yy720 = yylhsminor.yy720; + case 403: /* column_stream_def ::= column_name PRIMARY KEY */ +#line 734 "sql.y" +{ yylhsminor.yy722 = createColumnDefNode(pCxt, &yymsp[-2].minor.yy659, createDataType(TSDB_DATA_TYPE_NULL), NULL, true); } +#line 7447 "sql.c" + yymsp[-2].minor.yy722 = yylhsminor.yy722; break; - case 397: /* stream_options ::= stream_options TRIGGER AT_ONCE */ - case 398: /* stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ yytestcase(yyruleno==398); -{ yylhsminor.yy720 = setStreamOptions(pCxt, yymsp[-2].minor.yy720, SOPT_TRIGGER_TYPE_SET, &yymsp[0].minor.yy0, NULL); } - yymsp[-2].minor.yy720 = yylhsminor.yy720; + case 408: /* stream_options ::= stream_options TRIGGER AT_ONCE */ + case 409: /* stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ yytestcase(yyruleno==409); +#line 744 "sql.y" +{ yylhsminor.yy722 = setStreamOptions(pCxt, yymsp[-2].minor.yy722, SOPT_TRIGGER_TYPE_SET, &yymsp[0].minor.yy0, NULL); } +#line 7454 "sql.c" + yymsp[-2].minor.yy722 = yylhsminor.yy722; break; - case 399: /* stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ -{ yylhsminor.yy720 = setStreamOptions(pCxt, yymsp[-3].minor.yy720, SOPT_TRIGGER_TYPE_SET, &yymsp[-1].minor.yy0, releaseRawExprNode(pCxt, yymsp[0].minor.yy720)); } - yymsp[-3].minor.yy720 = yylhsminor.yy720; + case 410: /* stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ +#line 746 "sql.y" +{ yylhsminor.yy722 = setStreamOptions(pCxt, yymsp[-3].minor.yy722, SOPT_TRIGGER_TYPE_SET, &yymsp[-1].minor.yy0, releaseRawExprNode(pCxt, yymsp[0].minor.yy722)); } +#line 7460 "sql.c" + yymsp[-3].minor.yy722 = yylhsminor.yy722; break; - case 400: /* stream_options ::= stream_options WATERMARK duration_literal */ -{ yylhsminor.yy720 = setStreamOptions(pCxt, yymsp[-2].minor.yy720, SOPT_WATERMARK_SET, NULL, releaseRawExprNode(pCxt, yymsp[0].minor.yy720)); } - yymsp[-2].minor.yy720 = yylhsminor.yy720; + case 411: /* stream_options ::= stream_options WATERMARK duration_literal */ +#line 747 "sql.y" +{ yylhsminor.yy722 = setStreamOptions(pCxt, yymsp[-2].minor.yy722, SOPT_WATERMARK_SET, NULL, releaseRawExprNode(pCxt, yymsp[0].minor.yy722)); } +#line 7466 "sql.c" + yymsp[-2].minor.yy722 = yylhsminor.yy722; break; - case 401: /* stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ -{ yylhsminor.yy720 = setStreamOptions(pCxt, yymsp[-3].minor.yy720, SOPT_IGNORE_EXPIRED_SET, &yymsp[0].minor.yy0, NULL); } - yymsp[-3].minor.yy720 = yylhsminor.yy720; + case 412: /* stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ +#line 748 "sql.y" +{ yylhsminor.yy722 = setStreamOptions(pCxt, yymsp[-3].minor.yy722, SOPT_IGNORE_EXPIRED_SET, &yymsp[0].minor.yy0, NULL); } +#line 7472 "sql.c" + yymsp[-3].minor.yy722 = yylhsminor.yy722; break; - case 402: /* stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ -{ yylhsminor.yy720 = setStreamOptions(pCxt, yymsp[-2].minor.yy720, SOPT_FILL_HISTORY_SET, &yymsp[0].minor.yy0, NULL); } - yymsp[-2].minor.yy720 = yylhsminor.yy720; + case 413: /* stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ +#line 749 "sql.y" +{ yylhsminor.yy722 = setStreamOptions(pCxt, yymsp[-2].minor.yy722, SOPT_FILL_HISTORY_SET, &yymsp[0].minor.yy0, NULL); } +#line 7478 "sql.c" + yymsp[-2].minor.yy722 = yylhsminor.yy722; break; - case 403: /* stream_options ::= stream_options DELETE_MARK duration_literal */ -{ yylhsminor.yy720 = setStreamOptions(pCxt, yymsp[-2].minor.yy720, SOPT_DELETE_MARK_SET, NULL, releaseRawExprNode(pCxt, yymsp[0].minor.yy720)); } - yymsp[-2].minor.yy720 = yylhsminor.yy720; + case 414: /* stream_options ::= stream_options DELETE_MARK duration_literal */ +#line 750 "sql.y" +{ yylhsminor.yy722 = setStreamOptions(pCxt, yymsp[-2].minor.yy722, SOPT_DELETE_MARK_SET, NULL, releaseRawExprNode(pCxt, yymsp[0].minor.yy722)); } +#line 7484 "sql.c" + yymsp[-2].minor.yy722 = yylhsminor.yy722; break; - case 404: /* stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */ -{ yylhsminor.yy720 = setStreamOptions(pCxt, yymsp[-3].minor.yy720, SOPT_IGNORE_UPDATE_SET, &yymsp[0].minor.yy0, NULL); } - yymsp[-3].minor.yy720 = yylhsminor.yy720; + case 415: /* stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */ +#line 751 "sql.y" +{ yylhsminor.yy722 = setStreamOptions(pCxt, yymsp[-3].minor.yy722, SOPT_IGNORE_UPDATE_SET, &yymsp[0].minor.yy0, NULL); } +#line 7490 "sql.c" + yymsp[-3].minor.yy722 = yylhsminor.yy722; break; - case 406: /* subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ - case 670: /* sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP */ yytestcase(yyruleno==670); - case 694: /* every_opt ::= EVERY NK_LP duration_literal NK_RP */ yytestcase(yyruleno==694); -{ yymsp[-3].minor.yy720 = releaseRawExprNode(pCxt, yymsp[-1].minor.yy720); } + case 417: /* subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ + case 682: /* sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP */ yytestcase(yyruleno==682); + case 706: /* every_opt ::= EVERY NK_LP duration_literal NK_RP */ yytestcase(yyruleno==706); +#line 754 "sql.y" +{ yymsp[-3].minor.yy722 = releaseRawExprNode(pCxt, yymsp[-1].minor.yy722); } +#line 7498 "sql.c" break; - case 409: /* cmd ::= KILL CONNECTION NK_INTEGER */ + case 420: /* cmd ::= KILL CONNECTION NK_INTEGER */ +#line 762 "sql.y" { pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_CONNECTION_STMT, &yymsp[0].minor.yy0); } +#line 7503 "sql.c" break; - case 410: /* cmd ::= KILL QUERY NK_STRING */ + case 421: /* cmd ::= KILL QUERY NK_STRING */ +#line 763 "sql.y" { pCxt->pRootNode = createKillQueryStmt(pCxt, &yymsp[0].minor.yy0); } +#line 7508 "sql.c" break; - case 411: /* cmd ::= KILL TRANSACTION NK_INTEGER */ + case 422: /* cmd ::= KILL TRANSACTION NK_INTEGER */ +#line 764 "sql.y" { pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_TRANSACTION_STMT, &yymsp[0].minor.yy0); } +#line 7513 "sql.c" break; - case 412: /* cmd ::= KILL COMPACT NK_INTEGER */ + case 423: /* cmd ::= KILL COMPACT NK_INTEGER */ +#line 765 "sql.y" { pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_COMPACT_STMT, &yymsp[0].minor.yy0); } +#line 7518 "sql.c" break; - case 413: /* cmd ::= BALANCE VGROUP */ + case 424: /* cmd ::= BALANCE VGROUP */ +#line 768 "sql.y" { pCxt->pRootNode = createBalanceVgroupStmt(pCxt); } +#line 7523 "sql.c" break; - case 414: /* cmd ::= BALANCE VGROUP LEADER on_vgroup_id */ -{ pCxt->pRootNode = createBalanceVgroupLeaderStmt(pCxt, &yymsp[0].minor.yy1045); } + case 425: /* cmd ::= BALANCE VGROUP LEADER on_vgroup_id */ +#line 769 "sql.y" +{ pCxt->pRootNode = createBalanceVgroupLeaderStmt(pCxt, &yymsp[0].minor.yy659); } +#line 7528 "sql.c" break; - case 415: /* cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ + case 426: /* cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ +#line 770 "sql.y" { pCxt->pRootNode = createMergeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } +#line 7533 "sql.c" break; - case 416: /* cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ -{ pCxt->pRootNode = createRedistributeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy984); } + case 427: /* cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ +#line 771 "sql.y" +{ pCxt->pRootNode = createRedistributeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy694); } +#line 7538 "sql.c" break; - case 417: /* cmd ::= SPLIT VGROUP NK_INTEGER */ + case 428: /* cmd ::= SPLIT VGROUP NK_INTEGER */ +#line 772 "sql.y" { pCxt->pRootNode = createSplitVgroupStmt(pCxt, &yymsp[0].minor.yy0); } +#line 7543 "sql.c" break; - case 420: /* dnode_list ::= DNODE NK_INTEGER */ -{ yymsp[-1].minor.yy984 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } + case 431: /* dnode_list ::= DNODE NK_INTEGER */ +#line 781 "sql.y" +{ yymsp[-1].minor.yy694 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } +#line 7548 "sql.c" break; - case 422: /* cmd ::= DELETE FROM full_table_name where_clause_opt */ -{ pCxt->pRootNode = createDeleteStmt(pCxt, yymsp[-1].minor.yy720, yymsp[0].minor.yy720); } + case 433: /* cmd ::= DELETE FROM full_table_name where_clause_opt */ +#line 788 "sql.y" +{ pCxt->pRootNode = createDeleteStmt(pCxt, yymsp[-1].minor.yy722, yymsp[0].minor.yy722); } +#line 7553 "sql.c" break; - case 425: /* insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ -{ yymsp[-6].minor.yy720 = createInsertStmt(pCxt, yymsp[-4].minor.yy720, yymsp[-2].minor.yy984, yymsp[0].minor.yy720); } + case 436: /* insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ +#line 797 "sql.y" +{ yymsp[-6].minor.yy722 = createInsertStmt(pCxt, yymsp[-4].minor.yy722, yymsp[-2].minor.yy694, yymsp[0].minor.yy722); } +#line 7558 "sql.c" break; - case 426: /* insert_query ::= INSERT INTO full_table_name query_or_subquery */ -{ yymsp[-3].minor.yy720 = createInsertStmt(pCxt, yymsp[-1].minor.yy720, NULL, yymsp[0].minor.yy720); } + case 437: /* insert_query ::= INSERT INTO full_table_name query_or_subquery */ +#line 798 "sql.y" +{ yymsp[-3].minor.yy722 = createInsertStmt(pCxt, yymsp[-1].minor.yy722, NULL, yymsp[0].minor.yy722); } +#line 7563 "sql.c" break; - case 427: /* tags_literal ::= NK_INTEGER */ - case 439: /* tags_literal ::= NK_BIN */ yytestcase(yyruleno==439); - case 448: /* tags_literal ::= NK_HEX */ yytestcase(yyruleno==448); -{ yylhsminor.yy720 = createRawValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0, NULL); } - yymsp[0].minor.yy720 = yylhsminor.yy720; + case 438: /* tags_literal ::= NK_INTEGER */ + case 450: /* tags_literal ::= NK_BIN */ yytestcase(yyruleno==450); + case 459: /* tags_literal ::= NK_HEX */ yytestcase(yyruleno==459); +#line 801 "sql.y" +{ yylhsminor.yy722 = createRawValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0, NULL); } +#line 7570 "sql.c" + yymsp[0].minor.yy722 = yylhsminor.yy722; break; - case 428: /* tags_literal ::= NK_INTEGER NK_PLUS duration_literal */ - case 429: /* tags_literal ::= NK_INTEGER NK_MINUS duration_literal */ yytestcase(yyruleno==429); - case 440: /* tags_literal ::= NK_BIN NK_PLUS duration_literal */ yytestcase(yyruleno==440); - case 441: /* tags_literal ::= NK_BIN NK_MINUS duration_literal */ yytestcase(yyruleno==441); - case 449: /* tags_literal ::= NK_HEX NK_PLUS duration_literal */ yytestcase(yyruleno==449); - case 450: /* tags_literal ::= NK_HEX NK_MINUS duration_literal */ yytestcase(yyruleno==450); - case 458: /* tags_literal ::= NK_STRING NK_PLUS duration_literal */ yytestcase(yyruleno==458); - case 459: /* tags_literal ::= NK_STRING NK_MINUS duration_literal */ yytestcase(yyruleno==459); + case 439: /* tags_literal ::= NK_INTEGER NK_PLUS duration_literal */ + case 440: /* tags_literal ::= NK_INTEGER NK_MINUS duration_literal */ yytestcase(yyruleno==440); + case 451: /* tags_literal ::= NK_BIN NK_PLUS duration_literal */ yytestcase(yyruleno==451); + case 452: /* tags_literal ::= NK_BIN NK_MINUS duration_literal */ yytestcase(yyruleno==452); + case 460: /* tags_literal ::= NK_HEX NK_PLUS duration_literal */ yytestcase(yyruleno==460); + case 461: /* tags_literal ::= NK_HEX NK_MINUS duration_literal */ yytestcase(yyruleno==461); + case 469: /* tags_literal ::= NK_STRING NK_PLUS duration_literal */ yytestcase(yyruleno==469); + case 470: /* tags_literal ::= NK_STRING NK_MINUS duration_literal */ yytestcase(yyruleno==470); +#line 802 "sql.y" { SToken l = yymsp[-2].minor.yy0; - SToken r = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy720); + SToken r = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy722); l.n = (r.z + r.n) - l.z; - yylhsminor.yy720 = createRawValueNodeExt(pCxt, TSDB_DATA_TYPE_BINARY, &l, NULL, yymsp[0].minor.yy720); + yylhsminor.yy722 = createRawValueNodeExt(pCxt, TSDB_DATA_TYPE_BINARY, &l, NULL, yymsp[0].minor.yy722); } - yymsp[-2].minor.yy720 = yylhsminor.yy720; +#line 7588 "sql.c" + yymsp[-2].minor.yy722 = yylhsminor.yy722; break; - case 430: /* tags_literal ::= NK_PLUS NK_INTEGER */ - case 433: /* tags_literal ::= NK_MINUS NK_INTEGER */ yytestcase(yyruleno==433); - case 442: /* tags_literal ::= NK_PLUS NK_BIN */ yytestcase(yyruleno==442); - case 445: /* tags_literal ::= NK_MINUS NK_BIN */ yytestcase(yyruleno==445); - case 451: /* tags_literal ::= NK_PLUS NK_HEX */ yytestcase(yyruleno==451); - case 454: /* tags_literal ::= NK_MINUS NK_HEX */ yytestcase(yyruleno==454); + case 441: /* tags_literal ::= NK_PLUS NK_INTEGER */ + case 444: /* tags_literal ::= NK_MINUS NK_INTEGER */ yytestcase(yyruleno==444); + case 453: /* tags_literal ::= NK_PLUS NK_BIN */ yytestcase(yyruleno==453); + case 456: /* tags_literal ::= NK_MINUS NK_BIN */ yytestcase(yyruleno==456); + case 462: /* tags_literal ::= NK_PLUS NK_HEX */ yytestcase(yyruleno==462); + case 465: /* tags_literal ::= NK_MINUS NK_HEX */ yytestcase(yyruleno==465); +#line 814 "sql.y" { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yylhsminor.yy720 = createRawValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &t, NULL); + yylhsminor.yy722 = createRawValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &t, NULL); } - yymsp[-1].minor.yy720 = yylhsminor.yy720; +#line 7603 "sql.c" + yymsp[-1].minor.yy722 = yylhsminor.yy722; break; - case 431: /* tags_literal ::= NK_PLUS NK_INTEGER NK_PLUS duration_literal */ - case 432: /* tags_literal ::= NK_PLUS NK_INTEGER NK_MINUS duration_literal */ yytestcase(yyruleno==432); - case 434: /* tags_literal ::= NK_MINUS NK_INTEGER NK_PLUS duration_literal */ yytestcase(yyruleno==434); - case 435: /* tags_literal ::= NK_MINUS NK_INTEGER NK_MINUS duration_literal */ yytestcase(yyruleno==435); - case 443: /* tags_literal ::= NK_PLUS NK_BIN NK_PLUS duration_literal */ yytestcase(yyruleno==443); - case 444: /* tags_literal ::= NK_PLUS NK_BIN NK_MINUS duration_literal */ yytestcase(yyruleno==444); - case 446: /* tags_literal ::= NK_MINUS NK_BIN NK_PLUS duration_literal */ yytestcase(yyruleno==446); - case 447: /* tags_literal ::= NK_MINUS NK_BIN NK_MINUS duration_literal */ yytestcase(yyruleno==447); - case 452: /* tags_literal ::= NK_PLUS NK_HEX NK_PLUS duration_literal */ yytestcase(yyruleno==452); - case 453: /* tags_literal ::= NK_PLUS NK_HEX NK_MINUS duration_literal */ yytestcase(yyruleno==453); - case 455: /* tags_literal ::= NK_MINUS NK_HEX NK_PLUS duration_literal */ yytestcase(yyruleno==455); - case 456: /* tags_literal ::= NK_MINUS NK_HEX NK_MINUS duration_literal */ yytestcase(yyruleno==456); + case 442: /* tags_literal ::= NK_PLUS NK_INTEGER NK_PLUS duration_literal */ + case 443: /* tags_literal ::= NK_PLUS NK_INTEGER NK_MINUS duration_literal */ yytestcase(yyruleno==443); + case 445: /* tags_literal ::= NK_MINUS NK_INTEGER NK_PLUS duration_literal */ yytestcase(yyruleno==445); + case 446: /* tags_literal ::= NK_MINUS NK_INTEGER NK_MINUS duration_literal */ yytestcase(yyruleno==446); + case 454: /* tags_literal ::= NK_PLUS NK_BIN NK_PLUS duration_literal */ yytestcase(yyruleno==454); + case 455: /* tags_literal ::= NK_PLUS NK_BIN NK_MINUS duration_literal */ yytestcase(yyruleno==455); + case 457: /* tags_literal ::= NK_MINUS NK_BIN NK_PLUS duration_literal */ yytestcase(yyruleno==457); + case 458: /* tags_literal ::= NK_MINUS NK_BIN NK_MINUS duration_literal */ yytestcase(yyruleno==458); + case 463: /* tags_literal ::= NK_PLUS NK_HEX NK_PLUS duration_literal */ yytestcase(yyruleno==463); + case 464: /* tags_literal ::= NK_PLUS NK_HEX NK_MINUS duration_literal */ yytestcase(yyruleno==464); + case 466: /* tags_literal ::= NK_MINUS NK_HEX NK_PLUS duration_literal */ yytestcase(yyruleno==466); + case 467: /* tags_literal ::= NK_MINUS NK_HEX NK_MINUS duration_literal */ yytestcase(yyruleno==467); +#line 819 "sql.y" { SToken l = yymsp[-3].minor.yy0; - SToken r = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy720); + SToken r = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy722); l.n = (r.z + r.n) - l.z; - yylhsminor.yy720 = createRawValueNodeExt(pCxt, TSDB_DATA_TYPE_BINARY, &l, NULL, yymsp[0].minor.yy720); + yylhsminor.yy722 = createRawValueNodeExt(pCxt, TSDB_DATA_TYPE_BINARY, &l, NULL, yymsp[0].minor.yy722); } - yymsp[-3].minor.yy720 = yylhsminor.yy720; +#line 7625 "sql.c" + yymsp[-3].minor.yy722 = yylhsminor.yy722; break; - case 436: /* tags_literal ::= NK_FLOAT */ -{ yylhsminor.yy720 = createRawValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0, NULL); } - yymsp[0].minor.yy720 = yylhsminor.yy720; + case 447: /* tags_literal ::= NK_FLOAT */ +#line 848 "sql.y" +{ yylhsminor.yy722 = createRawValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0, NULL); } +#line 7631 "sql.c" + yymsp[0].minor.yy722 = yylhsminor.yy722; break; - case 437: /* tags_literal ::= NK_PLUS NK_FLOAT */ - case 438: /* tags_literal ::= NK_MINUS NK_FLOAT */ yytestcase(yyruleno==438); + case 448: /* tags_literal ::= NK_PLUS NK_FLOAT */ + case 449: /* tags_literal ::= NK_MINUS NK_FLOAT */ yytestcase(yyruleno==449); +#line 849 "sql.y" { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yylhsminor.yy720 = createRawValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &t, NULL); + yylhsminor.yy722 = createRawValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &t, NULL); } - yymsp[-1].minor.yy720 = yylhsminor.yy720; +#line 7642 "sql.c" + yymsp[-1].minor.yy722 = yylhsminor.yy722; break; - case 457: /* tags_literal ::= NK_STRING */ -{ yylhsminor.yy720 = createRawValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0, NULL); } - yymsp[0].minor.yy720 = yylhsminor.yy720; + case 468: /* tags_literal ::= NK_STRING */ +#line 955 "sql.y" +{ yylhsminor.yy722 = createRawValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0, NULL); } +#line 7648 "sql.c" + yymsp[0].minor.yy722 = yylhsminor.yy722; break; - case 460: /* tags_literal ::= NK_BOOL */ -{ yylhsminor.yy720 = createRawValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0, NULL); } - yymsp[0].minor.yy720 = yylhsminor.yy720; + case 471: /* tags_literal ::= NK_BOOL */ +#line 968 "sql.y" +{ yylhsminor.yy722 = createRawValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0, NULL); } +#line 7654 "sql.c" + yymsp[0].minor.yy722 = yylhsminor.yy722; break; - case 461: /* tags_literal ::= NULL */ -{ yylhsminor.yy720 = createRawValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0, NULL); } - yymsp[0].minor.yy720 = yylhsminor.yy720; + case 472: /* tags_literal ::= NULL */ +#line 969 "sql.y" +{ yylhsminor.yy722 = createRawValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0, NULL); } +#line 7660 "sql.c" + yymsp[0].minor.yy722 = yylhsminor.yy722; break; - case 462: /* tags_literal ::= literal_func */ -{ yylhsminor.yy720 = createRawValueNode(pCxt, TSDB_DATA_TYPE_BINARY, NULL, yymsp[0].minor.yy720); } - yymsp[0].minor.yy720 = yylhsminor.yy720; + case 473: /* tags_literal ::= literal_func */ +#line 971 "sql.y" +{ yylhsminor.yy722 = createRawValueNode(pCxt, TSDB_DATA_TYPE_BINARY, NULL, yymsp[0].minor.yy722); } +#line 7666 "sql.c" + yymsp[0].minor.yy722 = yylhsminor.yy722; break; - case 463: /* tags_literal ::= literal_func NK_PLUS duration_literal */ - case 464: /* tags_literal ::= literal_func NK_MINUS duration_literal */ yytestcase(yyruleno==464); + case 474: /* tags_literal ::= literal_func NK_PLUS duration_literal */ + case 475: /* tags_literal ::= literal_func NK_MINUS duration_literal */ yytestcase(yyruleno==475); +#line 972 "sql.y" { - SToken l = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy720); - SToken r = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy720); + SToken l = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy722); + SToken r = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy722); l.n = (r.z + r.n) - l.z; - yylhsminor.yy720 = createRawValueNodeExt(pCxt, TSDB_DATA_TYPE_BINARY, &l, yymsp[-2].minor.yy720, yymsp[0].minor.yy720); + yylhsminor.yy722 = createRawValueNodeExt(pCxt, TSDB_DATA_TYPE_BINARY, &l, yymsp[-2].minor.yy722, yymsp[0].minor.yy722); } - yymsp[-2].minor.yy720 = yylhsminor.yy720; +#line 7678 "sql.c" + yymsp[-2].minor.yy722 = yylhsminor.yy722; break; - case 467: /* literal ::= NK_INTEGER */ -{ yylhsminor.yy720 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy720 = yylhsminor.yy720; + case 478: /* literal ::= NK_INTEGER */ +#line 991 "sql.y" +{ yylhsminor.yy722 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0)); } +#line 7684 "sql.c" + yymsp[0].minor.yy722 = yylhsminor.yy722; break; - case 468: /* literal ::= NK_FLOAT */ -{ yylhsminor.yy720 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy720 = yylhsminor.yy720; + case 479: /* literal ::= NK_FLOAT */ +#line 992 "sql.y" +{ yylhsminor.yy722 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0)); } +#line 7690 "sql.c" + yymsp[0].minor.yy722 = yylhsminor.yy722; break; - case 469: /* literal ::= NK_STRING */ -{ yylhsminor.yy720 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy720 = yylhsminor.yy720; + case 480: /* literal ::= NK_STRING */ +#line 993 "sql.y" +{ yylhsminor.yy722 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } +#line 7696 "sql.c" + yymsp[0].minor.yy722 = yylhsminor.yy722; break; - case 470: /* literal ::= NK_BOOL */ -{ yylhsminor.yy720 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy720 = yylhsminor.yy720; + case 481: /* literal ::= NK_BOOL */ +#line 994 "sql.y" +{ yylhsminor.yy722 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0)); } +#line 7702 "sql.c" + yymsp[0].minor.yy722 = yylhsminor.yy722; break; - case 471: /* literal ::= TIMESTAMP NK_STRING */ -{ yylhsminor.yy720 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0)); } - yymsp[-1].minor.yy720 = yylhsminor.yy720; + case 482: /* literal ::= TIMESTAMP NK_STRING */ +#line 995 "sql.y" +{ yylhsminor.yy722 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0)); } +#line 7708 "sql.c" + yymsp[-1].minor.yy722 = yylhsminor.yy722; break; - case 472: /* literal ::= duration_literal */ - case 482: /* signed_literal ::= signed */ yytestcase(yyruleno==482); - case 505: /* expr_or_subquery ::= expression */ yytestcase(yyruleno==505); - case 506: /* expression ::= literal */ yytestcase(yyruleno==506); - case 508: /* expression ::= column_reference */ yytestcase(yyruleno==508); - case 509: /* expression ::= function_expression */ yytestcase(yyruleno==509); - case 510: /* expression ::= case_when_expression */ yytestcase(yyruleno==510); - case 544: /* function_expression ::= literal_func */ yytestcase(yyruleno==544); - case 594: /* boolean_value_expression ::= boolean_primary */ yytestcase(yyruleno==594); - case 598: /* boolean_primary ::= predicate */ yytestcase(yyruleno==598); - case 600: /* common_expression ::= expr_or_subquery */ yytestcase(yyruleno==600); - case 601: /* common_expression ::= boolean_value_expression */ yytestcase(yyruleno==601); - case 604: /* table_reference_list ::= table_reference */ yytestcase(yyruleno==604); - case 606: /* table_reference ::= table_primary */ yytestcase(yyruleno==606); - case 607: /* table_reference ::= joined_table */ yytestcase(yyruleno==607); - case 611: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==611); - case 696: /* query_simple ::= query_specification */ yytestcase(yyruleno==696); - case 697: /* query_simple ::= union_query_expression */ yytestcase(yyruleno==697); - case 700: /* query_simple_or_subquery ::= query_simple */ yytestcase(yyruleno==700); - case 702: /* query_or_subquery ::= query_expression */ yytestcase(yyruleno==702); -{ yylhsminor.yy720 = yymsp[0].minor.yy720; } - yymsp[0].minor.yy720 = yylhsminor.yy720; + case 483: /* literal ::= duration_literal */ + case 493: /* signed_literal ::= signed */ yytestcase(yyruleno==493); + case 517: /* expr_or_subquery ::= expression */ yytestcase(yyruleno==517); + case 518: /* expression ::= literal */ yytestcase(yyruleno==518); + case 520: /* expression ::= column_reference */ yytestcase(yyruleno==520); + case 521: /* expression ::= function_expression */ yytestcase(yyruleno==521); + case 522: /* expression ::= case_when_expression */ yytestcase(yyruleno==522); + case 556: /* function_expression ::= literal_func */ yytestcase(yyruleno==556); + case 606: /* boolean_value_expression ::= boolean_primary */ yytestcase(yyruleno==606); + case 610: /* boolean_primary ::= predicate */ yytestcase(yyruleno==610); + case 612: /* common_expression ::= expr_or_subquery */ yytestcase(yyruleno==612); + case 613: /* common_expression ::= boolean_value_expression */ yytestcase(yyruleno==613); + case 616: /* table_reference_list ::= table_reference */ yytestcase(yyruleno==616); + case 618: /* table_reference ::= table_primary */ yytestcase(yyruleno==618); + case 619: /* table_reference ::= joined_table */ yytestcase(yyruleno==619); + case 623: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==623); + case 708: /* query_simple ::= query_specification */ yytestcase(yyruleno==708); + case 709: /* query_simple ::= union_query_expression */ yytestcase(yyruleno==709); + case 712: /* query_simple_or_subquery ::= query_simple */ yytestcase(yyruleno==712); + case 714: /* query_or_subquery ::= query_expression */ yytestcase(yyruleno==714); +#line 996 "sql.y" +{ yylhsminor.yy722 = yymsp[0].minor.yy722; } +#line 7733 "sql.c" + yymsp[0].minor.yy722 = yylhsminor.yy722; break; - case 473: /* literal ::= NULL */ -{ yylhsminor.yy720 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy720 = yylhsminor.yy720; + case 484: /* literal ::= NULL */ +#line 997 "sql.y" +{ yylhsminor.yy722 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0)); } +#line 7739 "sql.c" + yymsp[0].minor.yy722 = yylhsminor.yy722; break; - case 474: /* literal ::= NK_QUESTION */ -{ yylhsminor.yy720 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy720 = yylhsminor.yy720; + case 485: /* literal ::= NK_QUESTION */ +#line 998 "sql.y" +{ yylhsminor.yy722 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0)); } +#line 7745 "sql.c" + yymsp[0].minor.yy722 = yylhsminor.yy722; break; - case 475: /* duration_literal ::= NK_VARIABLE */ - case 671: /* interval_sliding_duration_literal ::= NK_VARIABLE */ yytestcase(yyruleno==671); - case 672: /* interval_sliding_duration_literal ::= NK_STRING */ yytestcase(yyruleno==672); - case 673: /* interval_sliding_duration_literal ::= NK_INTEGER */ yytestcase(yyruleno==673); -{ yylhsminor.yy720 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy720 = yylhsminor.yy720; + case 486: /* duration_literal ::= NK_VARIABLE */ + case 683: /* interval_sliding_duration_literal ::= NK_VARIABLE */ yytestcase(yyruleno==683); + case 684: /* interval_sliding_duration_literal ::= NK_STRING */ yytestcase(yyruleno==684); + case 685: /* interval_sliding_duration_literal ::= NK_INTEGER */ yytestcase(yyruleno==685); +#line 1000 "sql.y" +{ yylhsminor.yy722 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } +#line 7754 "sql.c" + yymsp[0].minor.yy722 = yylhsminor.yy722; break; - case 476: /* signed ::= NK_INTEGER */ -{ yylhsminor.yy720 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy720 = yylhsminor.yy720; + case 487: /* signed ::= NK_INTEGER */ +#line 1002 "sql.y" +{ yylhsminor.yy722 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } +#line 7760 "sql.c" + yymsp[0].minor.yy722 = yylhsminor.yy722; break; - case 477: /* signed ::= NK_PLUS NK_INTEGER */ -{ yymsp[-1].minor.yy720 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } + case 488: /* signed ::= NK_PLUS NK_INTEGER */ +#line 1003 "sql.y" +{ yymsp[-1].minor.yy722 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } +#line 7766 "sql.c" break; - case 478: /* signed ::= NK_MINUS NK_INTEGER */ + case 489: /* signed ::= NK_MINUS NK_INTEGER */ +#line 1004 "sql.y" { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yylhsminor.yy720 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &t); + yylhsminor.yy722 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &t); } - yymsp[-1].minor.yy720 = yylhsminor.yy720; +#line 7775 "sql.c" + yymsp[-1].minor.yy722 = yylhsminor.yy722; break; - case 479: /* signed ::= NK_FLOAT */ -{ yylhsminor.yy720 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy720 = yylhsminor.yy720; + case 490: /* signed ::= NK_FLOAT */ +#line 1009 "sql.y" +{ yylhsminor.yy722 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } +#line 7781 "sql.c" + yymsp[0].minor.yy722 = yylhsminor.yy722; break; - case 480: /* signed ::= NK_PLUS NK_FLOAT */ -{ yymsp[-1].minor.yy720 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } + case 491: /* signed ::= NK_PLUS NK_FLOAT */ +#line 1010 "sql.y" +{ yymsp[-1].minor.yy722 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } +#line 7787 "sql.c" break; - case 481: /* signed ::= NK_MINUS NK_FLOAT */ + case 492: /* signed ::= NK_MINUS NK_FLOAT */ +#line 1011 "sql.y" { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yylhsminor.yy720 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &t); + yylhsminor.yy722 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &t); } - yymsp[-1].minor.yy720 = yylhsminor.yy720; +#line 7796 "sql.c" + yymsp[-1].minor.yy722 = yylhsminor.yy722; break; - case 483: /* signed_literal ::= NK_STRING */ -{ yylhsminor.yy720 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy720 = yylhsminor.yy720; + case 494: /* signed_literal ::= NK_STRING */ +#line 1018 "sql.y" +{ yylhsminor.yy722 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } +#line 7802 "sql.c" + yymsp[0].minor.yy722 = yylhsminor.yy722; break; - case 484: /* signed_literal ::= NK_BOOL */ -{ yylhsminor.yy720 = createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy720 = yylhsminor.yy720; + case 495: /* signed_literal ::= NK_BOOL */ +#line 1019 "sql.y" +{ yylhsminor.yy722 = createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0); } +#line 7808 "sql.c" + yymsp[0].minor.yy722 = yylhsminor.yy722; break; - case 485: /* signed_literal ::= TIMESTAMP NK_STRING */ -{ yymsp[-1].minor.yy720 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } + case 496: /* signed_literal ::= TIMESTAMP NK_STRING */ +#line 1020 "sql.y" +{ yymsp[-1].minor.yy722 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } +#line 7814 "sql.c" break; - case 486: /* signed_literal ::= duration_literal */ - case 488: /* signed_literal ::= literal_func */ yytestcase(yyruleno==488); - case 565: /* star_func_para ::= expr_or_subquery */ yytestcase(yyruleno==565); - case 648: /* select_item ::= common_expression */ yytestcase(yyruleno==648); - case 658: /* partition_item ::= expr_or_subquery */ yytestcase(yyruleno==658); - case 701: /* query_simple_or_subquery ::= subquery */ yytestcase(yyruleno==701); - case 703: /* query_or_subquery ::= subquery */ yytestcase(yyruleno==703); - case 716: /* search_condition ::= common_expression */ yytestcase(yyruleno==716); -{ yylhsminor.yy720 = releaseRawExprNode(pCxt, yymsp[0].minor.yy720); } - yymsp[0].minor.yy720 = yylhsminor.yy720; + case 497: /* signed_literal ::= duration_literal */ + case 499: /* signed_literal ::= literal_func */ yytestcase(yyruleno==499); + case 577: /* star_func_para ::= expr_or_subquery */ yytestcase(yyruleno==577); + case 660: /* select_item ::= common_expression */ yytestcase(yyruleno==660); + case 670: /* partition_item ::= expr_or_subquery */ yytestcase(yyruleno==670); + case 713: /* query_simple_or_subquery ::= subquery */ yytestcase(yyruleno==713); + case 715: /* query_or_subquery ::= subquery */ yytestcase(yyruleno==715); + case 728: /* search_condition ::= common_expression */ yytestcase(yyruleno==728); +#line 1021 "sql.y" +{ yylhsminor.yy722 = releaseRawExprNode(pCxt, yymsp[0].minor.yy722); } +#line 7826 "sql.c" + yymsp[0].minor.yy722 = yylhsminor.yy722; break; - case 487: /* signed_literal ::= NULL */ -{ yylhsminor.yy720 = createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy720 = yylhsminor.yy720; + case 498: /* signed_literal ::= NULL */ +#line 1022 "sql.y" +{ yylhsminor.yy722 = createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0); } +#line 7832 "sql.c" + yymsp[0].minor.yy722 = yylhsminor.yy722; break; - case 489: /* signed_literal ::= NK_QUESTION */ -{ yylhsminor.yy720 = createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy720 = yylhsminor.yy720; + case 500: /* signed_literal ::= NK_QUESTION */ +#line 1024 "sql.y" +{ yylhsminor.yy722 = createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0); } +#line 7838 "sql.c" + yymsp[0].minor.yy722 = yylhsminor.yy722; break; - case 507: /* expression ::= pseudo_column */ -{ yylhsminor.yy720 = yymsp[0].minor.yy720; setRawExprNodeIsPseudoColumn(pCxt, yylhsminor.yy720, true); } - yymsp[0].minor.yy720 = yylhsminor.yy720; + case 519: /* expression ::= pseudo_column */ +#line 1090 "sql.y" +{ yylhsminor.yy722 = yymsp[0].minor.yy722; setRawExprNodeIsPseudoColumn(pCxt, yylhsminor.yy722, true); } +#line 7844 "sql.c" + yymsp[0].minor.yy722 = yylhsminor.yy722; break; - case 511: /* expression ::= NK_LP expression NK_RP */ - case 599: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==599); - case 715: /* subquery ::= NK_LP subquery NK_RP */ yytestcase(yyruleno==715); -{ yylhsminor.yy720 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy720)); } - yymsp[-2].minor.yy720 = yylhsminor.yy720; + case 523: /* expression ::= NK_LP expression NK_RP */ + case 611: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==611); + case 727: /* subquery ::= NK_LP subquery NK_RP */ yytestcase(yyruleno==727); +#line 1094 "sql.y" +{ yylhsminor.yy722 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy722)); } +#line 7852 "sql.c" + yymsp[-2].minor.yy722 = yylhsminor.yy722; break; - case 512: /* expression ::= NK_PLUS expr_or_subquery */ + case 524: /* expression ::= NK_PLUS expr_or_subquery */ +#line 1095 "sql.y" { - SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy720); - yylhsminor.yy720 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, releaseRawExprNode(pCxt, yymsp[0].minor.yy720)); + SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy722); + yylhsminor.yy722 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, releaseRawExprNode(pCxt, yymsp[0].minor.yy722)); } - yymsp[-1].minor.yy720 = yylhsminor.yy720; +#line 7861 "sql.c" + yymsp[-1].minor.yy722 = yylhsminor.yy722; break; - case 513: /* expression ::= NK_MINUS expr_or_subquery */ + case 525: /* expression ::= NK_MINUS expr_or_subquery */ +#line 1099 "sql.y" { - SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy720); - yylhsminor.yy720 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, createOperatorNode(pCxt, OP_TYPE_MINUS, releaseRawExprNode(pCxt, yymsp[0].minor.yy720), NULL)); + SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy722); + yylhsminor.yy722 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, createOperatorNode(pCxt, OP_TYPE_MINUS, releaseRawExprNode(pCxt, yymsp[0].minor.yy722), NULL)); } - yymsp[-1].minor.yy720 = yylhsminor.yy720; +#line 7870 "sql.c" + yymsp[-1].minor.yy722 = yylhsminor.yy722; break; - case 514: /* expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ + case 526: /* expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ +#line 1103 "sql.y" { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy720); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy720); - yylhsminor.yy720 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_ADD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy720), releaseRawExprNode(pCxt, yymsp[0].minor.yy720))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy722); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy722); + yylhsminor.yy722 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_ADD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy722), releaseRawExprNode(pCxt, yymsp[0].minor.yy722))); } - yymsp[-2].minor.yy720 = yylhsminor.yy720; +#line 7880 "sql.c" + yymsp[-2].minor.yy722 = yylhsminor.yy722; break; - case 515: /* expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ + case 527: /* expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ +#line 1108 "sql.y" { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy720); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy720); - yylhsminor.yy720 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[-2].minor.yy720), releaseRawExprNode(pCxt, yymsp[0].minor.yy720))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy722); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy722); + yylhsminor.yy722 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[-2].minor.yy722), releaseRawExprNode(pCxt, yymsp[0].minor.yy722))); } - yymsp[-2].minor.yy720 = yylhsminor.yy720; +#line 7890 "sql.c" + yymsp[-2].minor.yy722 = yylhsminor.yy722; break; - case 516: /* expression ::= expr_or_subquery NK_STAR expr_or_subquery */ + case 528: /* expression ::= expr_or_subquery NK_STAR expr_or_subquery */ +#line 1113 "sql.y" { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy720); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy720); - yylhsminor.yy720 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MULTI, releaseRawExprNode(pCxt, yymsp[-2].minor.yy720), releaseRawExprNode(pCxt, yymsp[0].minor.yy720))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy722); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy722); + yylhsminor.yy722 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MULTI, releaseRawExprNode(pCxt, yymsp[-2].minor.yy722), releaseRawExprNode(pCxt, yymsp[0].minor.yy722))); } - yymsp[-2].minor.yy720 = yylhsminor.yy720; +#line 7900 "sql.c" + yymsp[-2].minor.yy722 = yylhsminor.yy722; break; - case 517: /* expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ + case 529: /* expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ +#line 1118 "sql.y" { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy720); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy720); - yylhsminor.yy720 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_DIV, releaseRawExprNode(pCxt, yymsp[-2].minor.yy720), releaseRawExprNode(pCxt, yymsp[0].minor.yy720))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy722); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy722); + yylhsminor.yy722 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_DIV, releaseRawExprNode(pCxt, yymsp[-2].minor.yy722), releaseRawExprNode(pCxt, yymsp[0].minor.yy722))); } - yymsp[-2].minor.yy720 = yylhsminor.yy720; +#line 7910 "sql.c" + yymsp[-2].minor.yy722 = yylhsminor.yy722; break; - case 518: /* expression ::= expr_or_subquery NK_REM expr_or_subquery */ + case 530: /* expression ::= expr_or_subquery NK_REM expr_or_subquery */ +#line 1123 "sql.y" { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy720); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy720); - yylhsminor.yy720 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_REM, releaseRawExprNode(pCxt, yymsp[-2].minor.yy720), releaseRawExprNode(pCxt, yymsp[0].minor.yy720))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy722); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy722); + yylhsminor.yy722 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_REM, releaseRawExprNode(pCxt, yymsp[-2].minor.yy722), releaseRawExprNode(pCxt, yymsp[0].minor.yy722))); } - yymsp[-2].minor.yy720 = yylhsminor.yy720; +#line 7920 "sql.c" + yymsp[-2].minor.yy722 = yylhsminor.yy722; break; - case 519: /* expression ::= column_reference NK_ARROW NK_STRING */ + case 531: /* expression ::= column_reference NK_ARROW NK_STRING */ +#line 1128 "sql.y" { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy720); - yylhsminor.yy720 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_JSON_GET_VALUE, releaseRawExprNode(pCxt, yymsp[-2].minor.yy720), createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy722); + yylhsminor.yy722 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_JSON_GET_VALUE, releaseRawExprNode(pCxt, yymsp[-2].minor.yy722), createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0))); } - yymsp[-2].minor.yy720 = yylhsminor.yy720; +#line 7929 "sql.c" + yymsp[-2].minor.yy722 = yylhsminor.yy722; break; - case 520: /* expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ + case 532: /* expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ +#line 1132 "sql.y" { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy720); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy720); - yylhsminor.yy720 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy720), releaseRawExprNode(pCxt, yymsp[0].minor.yy720))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy722); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy722); + yylhsminor.yy722 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy722), releaseRawExprNode(pCxt, yymsp[0].minor.yy722))); } - yymsp[-2].minor.yy720 = yylhsminor.yy720; +#line 7939 "sql.c" + yymsp[-2].minor.yy722 = yylhsminor.yy722; break; - case 521: /* expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ + case 533: /* expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ +#line 1137 "sql.y" { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy720); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy720); - yylhsminor.yy720 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy720), releaseRawExprNode(pCxt, yymsp[0].minor.yy720))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy722); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy722); + yylhsminor.yy722 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy722), releaseRawExprNode(pCxt, yymsp[0].minor.yy722))); } - yymsp[-2].minor.yy720 = yylhsminor.yy720; +#line 7949 "sql.c" + yymsp[-2].minor.yy722 = yylhsminor.yy722; break; - case 524: /* column_reference ::= column_name */ -{ yylhsminor.yy720 = createRawExprNode(pCxt, &yymsp[0].minor.yy1045, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy1045)); } - yymsp[0].minor.yy720 = yylhsminor.yy720; + case 536: /* column_reference ::= column_name */ +#line 1148 "sql.y" +{ yylhsminor.yy722 = createRawExprNode(pCxt, &yymsp[0].minor.yy659, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy659)); } +#line 7955 "sql.c" + yymsp[0].minor.yy722 = yylhsminor.yy722; break; - case 525: /* column_reference ::= table_name NK_DOT column_name */ -{ yylhsminor.yy720 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy1045, &yymsp[0].minor.yy1045, createColumnNode(pCxt, &yymsp[-2].minor.yy1045, &yymsp[0].minor.yy1045)); } - yymsp[-2].minor.yy720 = yylhsminor.yy720; + case 537: /* column_reference ::= table_name NK_DOT column_name */ +#line 1149 "sql.y" +{ yylhsminor.yy722 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy659, &yymsp[0].minor.yy659, createColumnNode(pCxt, &yymsp[-2].minor.yy659, &yymsp[0].minor.yy659)); } +#line 7961 "sql.c" + yymsp[-2].minor.yy722 = yylhsminor.yy722; break; - case 526: /* column_reference ::= NK_ALIAS */ -{ yylhsminor.yy720 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy720 = yylhsminor.yy720; + case 538: /* column_reference ::= NK_ALIAS */ +#line 1150 "sql.y" +{ yylhsminor.yy722 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); } +#line 7967 "sql.c" + yymsp[0].minor.yy722 = yylhsminor.yy722; break; - case 527: /* column_reference ::= table_name NK_DOT NK_ALIAS */ -{ yylhsminor.yy720 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy1045, &yymsp[0].minor.yy0, createColumnNode(pCxt, &yymsp[-2].minor.yy1045, &yymsp[0].minor.yy0)); } - yymsp[-2].minor.yy720 = yylhsminor.yy720; + case 539: /* column_reference ::= table_name NK_DOT NK_ALIAS */ +#line 1151 "sql.y" +{ yylhsminor.yy722 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy659, &yymsp[0].minor.yy0, createColumnNode(pCxt, &yymsp[-2].minor.yy659, &yymsp[0].minor.yy0)); } +#line 7973 "sql.c" + yymsp[-2].minor.yy722 = yylhsminor.yy722; break; - case 528: /* pseudo_column ::= ROWTS */ - case 529: /* pseudo_column ::= TBNAME */ yytestcase(yyruleno==529); - case 531: /* pseudo_column ::= QSTART */ yytestcase(yyruleno==531); - case 532: /* pseudo_column ::= QEND */ yytestcase(yyruleno==532); - case 533: /* pseudo_column ::= QDURATION */ yytestcase(yyruleno==533); - case 534: /* pseudo_column ::= WSTART */ yytestcase(yyruleno==534); - case 535: /* pseudo_column ::= WEND */ yytestcase(yyruleno==535); - case 536: /* pseudo_column ::= WDURATION */ yytestcase(yyruleno==536); - case 537: /* pseudo_column ::= IROWTS */ yytestcase(yyruleno==537); - case 538: /* pseudo_column ::= ISFILLED */ yytestcase(yyruleno==538); - case 539: /* pseudo_column ::= QTAGS */ yytestcase(yyruleno==539); - case 546: /* literal_func ::= NOW */ yytestcase(yyruleno==546); - case 547: /* literal_func ::= TODAY */ yytestcase(yyruleno==547); -{ yylhsminor.yy720 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL)); } - yymsp[0].minor.yy720 = yylhsminor.yy720; + case 540: /* pseudo_column ::= ROWTS */ + case 541: /* pseudo_column ::= TBNAME */ yytestcase(yyruleno==541); + case 543: /* pseudo_column ::= QSTART */ yytestcase(yyruleno==543); + case 544: /* pseudo_column ::= QEND */ yytestcase(yyruleno==544); + case 545: /* pseudo_column ::= QDURATION */ yytestcase(yyruleno==545); + case 546: /* pseudo_column ::= WSTART */ yytestcase(yyruleno==546); + case 547: /* pseudo_column ::= WEND */ yytestcase(yyruleno==547); + case 548: /* pseudo_column ::= WDURATION */ yytestcase(yyruleno==548); + case 549: /* pseudo_column ::= IROWTS */ yytestcase(yyruleno==549); + case 550: /* pseudo_column ::= ISFILLED */ yytestcase(yyruleno==550); + case 551: /* pseudo_column ::= QTAGS */ yytestcase(yyruleno==551); + case 558: /* literal_func ::= NOW */ yytestcase(yyruleno==558); + case 559: /* literal_func ::= TODAY */ yytestcase(yyruleno==559); +#line 1153 "sql.y" +{ yylhsminor.yy722 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL)); } +#line 7991 "sql.c" + yymsp[0].minor.yy722 = yylhsminor.yy722; break; - case 530: /* pseudo_column ::= table_name NK_DOT TBNAME */ -{ yylhsminor.yy720 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy1045, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-2].minor.yy1045)))); } - yymsp[-2].minor.yy720 = yylhsminor.yy720; + case 542: /* pseudo_column ::= table_name NK_DOT TBNAME */ +#line 1155 "sql.y" +{ yylhsminor.yy722 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy659, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-2].minor.yy659)))); } +#line 7997 "sql.c" + yymsp[-2].minor.yy722 = yylhsminor.yy722; break; - case 540: /* function_expression ::= function_name NK_LP expression_list NK_RP */ - case 541: /* function_expression ::= star_func NK_LP star_func_para_list NK_RP */ yytestcase(yyruleno==541); -{ yylhsminor.yy720 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy1045, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy1045, yymsp[-1].minor.yy984)); } - yymsp[-3].minor.yy720 = yylhsminor.yy720; + case 552: /* function_expression ::= function_name NK_LP expression_list NK_RP */ + case 553: /* function_expression ::= star_func NK_LP star_func_para_list NK_RP */ yytestcase(yyruleno==553); +#line 1166 "sql.y" +{ yylhsminor.yy722 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy659, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy659, yymsp[-1].minor.yy694)); } +#line 8004 "sql.c" + yymsp[-3].minor.yy722 = yylhsminor.yy722; break; - case 542: /* function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ - case 543: /* function_expression ::= CAST NK_LP expr_or_subquery AS type_name_default_len NK_RP */ yytestcase(yyruleno==543); -{ yylhsminor.yy720 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createCastFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy720), yymsp[-1].minor.yy232)); } - yymsp[-5].minor.yy720 = yylhsminor.yy720; + case 554: /* function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ + case 555: /* function_expression ::= CAST NK_LP expr_or_subquery AS type_name_default_len NK_RP */ yytestcase(yyruleno==555); +#line 1169 "sql.y" +{ yylhsminor.yy722 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createCastFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy722), yymsp[-1].minor.yy154)); } +#line 8011 "sql.c" + yymsp[-5].minor.yy722 = yylhsminor.yy722; break; - case 545: /* literal_func ::= noarg_func NK_LP NK_RP */ -{ yylhsminor.yy720 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy1045, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-2].minor.yy1045, NULL)); } - yymsp[-2].minor.yy720 = yylhsminor.yy720; + case 557: /* literal_func ::= noarg_func NK_LP NK_RP */ +#line 1175 "sql.y" +{ yylhsminor.yy722 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy659, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-2].minor.yy659, NULL)); } +#line 8017 "sql.c" + yymsp[-2].minor.yy722 = yylhsminor.yy722; break; - case 561: /* star_func_para_list ::= NK_STAR */ -{ yylhsminor.yy984 = createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy984 = yylhsminor.yy984; + case 573: /* star_func_para_list ::= NK_STAR */ +#line 1200 "sql.y" +{ yylhsminor.yy694 = createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); } +#line 8023 "sql.c" + yymsp[0].minor.yy694 = yylhsminor.yy694; break; - case 566: /* star_func_para ::= table_name NK_DOT NK_STAR */ - case 651: /* select_item ::= table_name NK_DOT NK_STAR */ yytestcase(yyruleno==651); -{ yylhsminor.yy720 = createColumnNode(pCxt, &yymsp[-2].minor.yy1045, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy720 = yylhsminor.yy720; + case 578: /* star_func_para ::= table_name NK_DOT NK_STAR */ + case 663: /* select_item ::= table_name NK_DOT NK_STAR */ yytestcase(yyruleno==663); +#line 1209 "sql.y" +{ yylhsminor.yy722 = createColumnNode(pCxt, &yymsp[-2].minor.yy659, &yymsp[0].minor.yy0); } +#line 8030 "sql.c" + yymsp[-2].minor.yy722 = yylhsminor.yy722; break; - case 567: /* case_when_expression ::= CASE when_then_list case_when_else_opt END */ -{ yylhsminor.yy720 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, NULL, yymsp[-2].minor.yy984, yymsp[-1].minor.yy720)); } - yymsp[-3].minor.yy720 = yylhsminor.yy720; + case 579: /* case_when_expression ::= CASE when_then_list case_when_else_opt END */ +#line 1212 "sql.y" +{ yylhsminor.yy722 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, NULL, yymsp[-2].minor.yy694, yymsp[-1].minor.yy722)); } +#line 8036 "sql.c" + yymsp[-3].minor.yy722 = yylhsminor.yy722; break; - case 568: /* case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ -{ yylhsminor.yy720 = createRawExprNodeExt(pCxt, &yymsp[-4].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy720), yymsp[-2].minor.yy984, yymsp[-1].minor.yy720)); } - yymsp[-4].minor.yy720 = yylhsminor.yy720; + case 580: /* case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ +#line 1214 "sql.y" +{ yylhsminor.yy722 = createRawExprNodeExt(pCxt, &yymsp[-4].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy722), yymsp[-2].minor.yy694, yymsp[-1].minor.yy722)); } +#line 8042 "sql.c" + yymsp[-4].minor.yy722 = yylhsminor.yy722; break; - case 571: /* when_then_expr ::= WHEN common_expression THEN common_expression */ -{ yymsp[-3].minor.yy720 = createWhenThenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy720), releaseRawExprNode(pCxt, yymsp[0].minor.yy720)); } + case 583: /* when_then_expr ::= WHEN common_expression THEN common_expression */ +#line 1221 "sql.y" +{ yymsp[-3].minor.yy722 = createWhenThenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy722), releaseRawExprNode(pCxt, yymsp[0].minor.yy722)); } +#line 8048 "sql.c" break; - case 573: /* case_when_else_opt ::= ELSE common_expression */ -{ yymsp[-1].minor.yy720 = releaseRawExprNode(pCxt, yymsp[0].minor.yy720); } + case 585: /* case_when_else_opt ::= ELSE common_expression */ +#line 1224 "sql.y" +{ yymsp[-1].minor.yy722 = releaseRawExprNode(pCxt, yymsp[0].minor.yy722); } +#line 8053 "sql.c" break; - case 574: /* predicate ::= expr_or_subquery compare_op expr_or_subquery */ - case 579: /* predicate ::= expr_or_subquery in_op in_predicate_value */ yytestcase(yyruleno==579); + case 586: /* predicate ::= expr_or_subquery compare_op expr_or_subquery */ + case 591: /* predicate ::= expr_or_subquery in_op in_predicate_value */ yytestcase(yyruleno==591); +#line 1227 "sql.y" { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy720); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy720); - yylhsminor.yy720 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, yymsp[-1].minor.yy1024, releaseRawExprNode(pCxt, yymsp[-2].minor.yy720), releaseRawExprNode(pCxt, yymsp[0].minor.yy720))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy722); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy722); + yylhsminor.yy722 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, yymsp[-1].minor.yy1070, releaseRawExprNode(pCxt, yymsp[-2].minor.yy722), releaseRawExprNode(pCxt, yymsp[0].minor.yy722))); } - yymsp[-2].minor.yy720 = yylhsminor.yy720; +#line 8063 "sql.c" + yymsp[-2].minor.yy722 = yylhsminor.yy722; break; - case 575: /* predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ + case 587: /* predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ +#line 1234 "sql.y" { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-4].minor.yy720); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy720); - yylhsminor.yy720 = createRawExprNodeExt(pCxt, &s, &e, createBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-4].minor.yy720), releaseRawExprNode(pCxt, yymsp[-2].minor.yy720), releaseRawExprNode(pCxt, yymsp[0].minor.yy720))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-4].minor.yy722); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy722); + yylhsminor.yy722 = createRawExprNodeExt(pCxt, &s, &e, createBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-4].minor.yy722), releaseRawExprNode(pCxt, yymsp[-2].minor.yy722), releaseRawExprNode(pCxt, yymsp[0].minor.yy722))); } - yymsp[-4].minor.yy720 = yylhsminor.yy720; +#line 8073 "sql.c" + yymsp[-4].minor.yy722 = yylhsminor.yy722; break; - case 576: /* predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ + case 588: /* predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ +#line 1240 "sql.y" { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-5].minor.yy720); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy720); - yylhsminor.yy720 = createRawExprNodeExt(pCxt, &s, &e, createNotBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy720), releaseRawExprNode(pCxt, yymsp[-2].minor.yy720), releaseRawExprNode(pCxt, yymsp[0].minor.yy720))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-5].minor.yy722); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy722); + yylhsminor.yy722 = createRawExprNodeExt(pCxt, &s, &e, createNotBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy722), releaseRawExprNode(pCxt, yymsp[-2].minor.yy722), releaseRawExprNode(pCxt, yymsp[0].minor.yy722))); } - yymsp[-5].minor.yy720 = yylhsminor.yy720; +#line 8083 "sql.c" + yymsp[-5].minor.yy722 = yylhsminor.yy722; break; - case 577: /* predicate ::= expr_or_subquery IS NULL */ + case 589: /* predicate ::= expr_or_subquery IS NULL */ +#line 1245 "sql.y" { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy720); - yylhsminor.yy720 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NULL, releaseRawExprNode(pCxt, yymsp[-2].minor.yy720), NULL)); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy722); + yylhsminor.yy722 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NULL, releaseRawExprNode(pCxt, yymsp[-2].minor.yy722), NULL)); } - yymsp[-2].minor.yy720 = yylhsminor.yy720; +#line 8092 "sql.c" + yymsp[-2].minor.yy722 = yylhsminor.yy722; break; - case 578: /* predicate ::= expr_or_subquery IS NOT NULL */ + case 590: /* predicate ::= expr_or_subquery IS NOT NULL */ +#line 1249 "sql.y" { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-3].minor.yy720); - yylhsminor.yy720 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NOT_NULL, releaseRawExprNode(pCxt, yymsp[-3].minor.yy720), NULL)); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-3].minor.yy722); + yylhsminor.yy722 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NOT_NULL, releaseRawExprNode(pCxt, yymsp[-3].minor.yy722), NULL)); } - yymsp[-3].minor.yy720 = yylhsminor.yy720; +#line 8101 "sql.c" + yymsp[-3].minor.yy722 = yylhsminor.yy722; break; - case 580: /* compare_op ::= NK_LT */ -{ yymsp[0].minor.yy1024 = OP_TYPE_LOWER_THAN; } + case 592: /* compare_op ::= NK_LT */ +#line 1261 "sql.y" +{ yymsp[0].minor.yy1070 = OP_TYPE_LOWER_THAN; } +#line 8107 "sql.c" break; - case 581: /* compare_op ::= NK_GT */ -{ yymsp[0].minor.yy1024 = OP_TYPE_GREATER_THAN; } + case 593: /* compare_op ::= NK_GT */ +#line 1262 "sql.y" +{ yymsp[0].minor.yy1070 = OP_TYPE_GREATER_THAN; } +#line 8112 "sql.c" break; - case 582: /* compare_op ::= NK_LE */ -{ yymsp[0].minor.yy1024 = OP_TYPE_LOWER_EQUAL; } + case 594: /* compare_op ::= NK_LE */ +#line 1263 "sql.y" +{ yymsp[0].minor.yy1070 = OP_TYPE_LOWER_EQUAL; } +#line 8117 "sql.c" break; - case 583: /* compare_op ::= NK_GE */ -{ yymsp[0].minor.yy1024 = OP_TYPE_GREATER_EQUAL; } + case 595: /* compare_op ::= NK_GE */ +#line 1264 "sql.y" +{ yymsp[0].minor.yy1070 = OP_TYPE_GREATER_EQUAL; } +#line 8122 "sql.c" break; - case 584: /* compare_op ::= NK_NE */ -{ yymsp[0].minor.yy1024 = OP_TYPE_NOT_EQUAL; } + case 596: /* compare_op ::= NK_NE */ +#line 1265 "sql.y" +{ yymsp[0].minor.yy1070 = OP_TYPE_NOT_EQUAL; } +#line 8127 "sql.c" break; - case 585: /* compare_op ::= NK_EQ */ -{ yymsp[0].minor.yy1024 = OP_TYPE_EQUAL; } + case 597: /* compare_op ::= NK_EQ */ +#line 1266 "sql.y" +{ yymsp[0].minor.yy1070 = OP_TYPE_EQUAL; } +#line 8132 "sql.c" break; - case 586: /* compare_op ::= LIKE */ -{ yymsp[0].minor.yy1024 = OP_TYPE_LIKE; } + case 598: /* compare_op ::= LIKE */ +#line 1267 "sql.y" +{ yymsp[0].minor.yy1070 = OP_TYPE_LIKE; } +#line 8137 "sql.c" break; - case 587: /* compare_op ::= NOT LIKE */ -{ yymsp[-1].minor.yy1024 = OP_TYPE_NOT_LIKE; } + case 599: /* compare_op ::= NOT LIKE */ +#line 1268 "sql.y" +{ yymsp[-1].minor.yy1070 = OP_TYPE_NOT_LIKE; } +#line 8142 "sql.c" break; - case 588: /* compare_op ::= MATCH */ -{ yymsp[0].minor.yy1024 = OP_TYPE_MATCH; } + case 600: /* compare_op ::= MATCH */ +#line 1269 "sql.y" +{ yymsp[0].minor.yy1070 = OP_TYPE_MATCH; } +#line 8147 "sql.c" break; - case 589: /* compare_op ::= NMATCH */ -{ yymsp[0].minor.yy1024 = OP_TYPE_NMATCH; } + case 601: /* compare_op ::= NMATCH */ +#line 1270 "sql.y" +{ yymsp[0].minor.yy1070 = OP_TYPE_NMATCH; } +#line 8152 "sql.c" break; - case 590: /* compare_op ::= CONTAINS */ -{ yymsp[0].minor.yy1024 = OP_TYPE_JSON_CONTAINS; } + case 602: /* compare_op ::= CONTAINS */ +#line 1271 "sql.y" +{ yymsp[0].minor.yy1070 = OP_TYPE_JSON_CONTAINS; } +#line 8157 "sql.c" break; - case 591: /* in_op ::= IN */ -{ yymsp[0].minor.yy1024 = OP_TYPE_IN; } + case 603: /* in_op ::= IN */ +#line 1275 "sql.y" +{ yymsp[0].minor.yy1070 = OP_TYPE_IN; } +#line 8162 "sql.c" break; - case 592: /* in_op ::= NOT IN */ -{ yymsp[-1].minor.yy1024 = OP_TYPE_NOT_IN; } + case 604: /* in_op ::= NOT IN */ +#line 1276 "sql.y" +{ yymsp[-1].minor.yy1070 = OP_TYPE_NOT_IN; } +#line 8167 "sql.c" break; - case 593: /* in_predicate_value ::= NK_LP literal_list NK_RP */ -{ yylhsminor.yy720 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createNodeListNode(pCxt, yymsp[-1].minor.yy984)); } - yymsp[-2].minor.yy720 = yylhsminor.yy720; + case 605: /* in_predicate_value ::= NK_LP literal_list NK_RP */ +#line 1278 "sql.y" +{ yylhsminor.yy722 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createNodeListNode(pCxt, yymsp[-1].minor.yy694)); } +#line 8172 "sql.c" + yymsp[-2].minor.yy722 = yylhsminor.yy722; break; - case 595: /* boolean_value_expression ::= NOT boolean_primary */ + case 607: /* boolean_value_expression ::= NOT boolean_primary */ +#line 1282 "sql.y" { - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy720); - yylhsminor.yy720 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_NOT, releaseRawExprNode(pCxt, yymsp[0].minor.yy720), NULL)); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy722); + yylhsminor.yy722 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_NOT, releaseRawExprNode(pCxt, yymsp[0].minor.yy722), NULL)); } - yymsp[-1].minor.yy720 = yylhsminor.yy720; +#line 8181 "sql.c" + yymsp[-1].minor.yy722 = yylhsminor.yy722; break; - case 596: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ + case 608: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ +#line 1287 "sql.y" { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy720); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy720); - yylhsminor.yy720 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy720), releaseRawExprNode(pCxt, yymsp[0].minor.yy720))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy722); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy722); + yylhsminor.yy722 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy722), releaseRawExprNode(pCxt, yymsp[0].minor.yy722))); } - yymsp[-2].minor.yy720 = yylhsminor.yy720; +#line 8191 "sql.c" + yymsp[-2].minor.yy722 = yylhsminor.yy722; break; - case 597: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ + case 609: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ +#line 1293 "sql.y" { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy720); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy720); - yylhsminor.yy720 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy720), releaseRawExprNode(pCxt, yymsp[0].minor.yy720))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy722); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy722); + yylhsminor.yy722 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy722), releaseRawExprNode(pCxt, yymsp[0].minor.yy722))); } - yymsp[-2].minor.yy720 = yylhsminor.yy720; +#line 8201 "sql.c" + yymsp[-2].minor.yy722 = yylhsminor.yy722; break; - case 605: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */ -{ yylhsminor.yy720 = createJoinTableNode(pCxt, JOIN_TYPE_INNER, JOIN_STYPE_NONE, yymsp[-2].minor.yy720, yymsp[0].minor.yy720, NULL); } - yymsp[-2].minor.yy720 = yylhsminor.yy720; + case 617: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */ +#line 1311 "sql.y" +{ yylhsminor.yy722 = createJoinTableNode(pCxt, JOIN_TYPE_INNER, JOIN_STYPE_NONE, yymsp[-2].minor.yy722, yymsp[0].minor.yy722, NULL); } +#line 8207 "sql.c" + yymsp[-2].minor.yy722 = yylhsminor.yy722; break; - case 608: /* table_primary ::= table_name alias_opt */ -{ yylhsminor.yy720 = createRealTableNode(pCxt, NULL, &yymsp[-1].minor.yy1045, &yymsp[0].minor.yy1045); } - yymsp[-1].minor.yy720 = yylhsminor.yy720; + case 620: /* table_primary ::= table_name alias_opt */ +#line 1317 "sql.y" +{ yylhsminor.yy722 = createRealTableNode(pCxt, NULL, &yymsp[-1].minor.yy659, &yymsp[0].minor.yy659); } +#line 8213 "sql.c" + yymsp[-1].minor.yy722 = yylhsminor.yy722; break; - case 609: /* table_primary ::= db_name NK_DOT table_name alias_opt */ -{ yylhsminor.yy720 = createRealTableNode(pCxt, &yymsp[-3].minor.yy1045, &yymsp[-1].minor.yy1045, &yymsp[0].minor.yy1045); } - yymsp[-3].minor.yy720 = yylhsminor.yy720; + case 621: /* table_primary ::= db_name NK_DOT table_name alias_opt */ +#line 1318 "sql.y" +{ yylhsminor.yy722 = createRealTableNode(pCxt, &yymsp[-3].minor.yy659, &yymsp[-1].minor.yy659, &yymsp[0].minor.yy659); } +#line 8219 "sql.c" + yymsp[-3].minor.yy722 = yylhsminor.yy722; break; - case 610: /* table_primary ::= subquery alias_opt */ -{ yylhsminor.yy720 = createTempTableNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy720), &yymsp[0].minor.yy1045); } - yymsp[-1].minor.yy720 = yylhsminor.yy720; + case 622: /* table_primary ::= subquery alias_opt */ +#line 1319 "sql.y" +{ yylhsminor.yy722 = createTempTableNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy722), &yymsp[0].minor.yy659); } +#line 8225 "sql.c" + yymsp[-1].minor.yy722 = yylhsminor.yy722; break; - case 612: /* alias_opt ::= */ -{ yymsp[1].minor.yy1045 = nil_token; } + case 624: /* alias_opt ::= */ +#line 1324 "sql.y" +{ yymsp[1].minor.yy659 = nil_token; } +#line 8231 "sql.c" break; - case 614: /* alias_opt ::= AS table_alias */ -{ yymsp[-1].minor.yy1045 = yymsp[0].minor.yy1045; } + case 626: /* alias_opt ::= AS table_alias */ +#line 1326 "sql.y" +{ yymsp[-1].minor.yy659 = yymsp[0].minor.yy659; } +#line 8236 "sql.c" break; - case 615: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */ - case 616: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==616); -{ yymsp[-2].minor.yy720 = yymsp[-1].minor.yy720; } + case 627: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */ + case 628: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==628); +#line 1328 "sql.y" +{ yymsp[-2].minor.yy722 = yymsp[-1].minor.yy722; } +#line 8242 "sql.c" break; - case 617: /* joined_table ::= table_reference join_type join_subtype JOIN table_reference join_on_clause_opt window_offset_clause_opt jlimit_clause_opt */ + case 629: /* joined_table ::= table_reference join_type join_subtype JOIN table_reference join_on_clause_opt window_offset_clause_opt jlimit_clause_opt */ +#line 1334 "sql.y" { - yylhsminor.yy720 = createJoinTableNode(pCxt, yymsp[-6].minor.yy548, yymsp[-5].minor.yy506, yymsp[-7].minor.yy720, yymsp[-3].minor.yy720, yymsp[-2].minor.yy720); - yylhsminor.yy720 = addWindowOffsetClause(pCxt, yylhsminor.yy720, yymsp[-1].minor.yy720); - yylhsminor.yy720 = addJLimitClause(pCxt, yylhsminor.yy720, yymsp[0].minor.yy720); + yylhsminor.yy722 = createJoinTableNode(pCxt, yymsp[-6].minor.yy92, yymsp[-5].minor.yy534, yymsp[-7].minor.yy722, yymsp[-3].minor.yy722, yymsp[-2].minor.yy722); + yylhsminor.yy722 = addWindowOffsetClause(pCxt, yylhsminor.yy722, yymsp[-1].minor.yy722); + yylhsminor.yy722 = addJLimitClause(pCxt, yylhsminor.yy722, yymsp[0].minor.yy722); } - yymsp[-7].minor.yy720 = yylhsminor.yy720; +#line 8251 "sql.c" + yymsp[-7].minor.yy722 = yylhsminor.yy722; break; - case 618: /* join_type ::= */ -{ yymsp[1].minor.yy548 = JOIN_TYPE_INNER; } + case 630: /* join_type ::= */ +#line 1342 "sql.y" +{ yymsp[1].minor.yy92 = JOIN_TYPE_INNER; } +#line 8257 "sql.c" break; - case 619: /* join_type ::= INNER */ -{ yymsp[0].minor.yy548 = JOIN_TYPE_INNER; } + case 631: /* join_type ::= INNER */ +#line 1343 "sql.y" +{ yymsp[0].minor.yy92 = JOIN_TYPE_INNER; } +#line 8262 "sql.c" break; - case 620: /* join_type ::= LEFT */ -{ yymsp[0].minor.yy548 = JOIN_TYPE_LEFT; } + case 632: /* join_type ::= LEFT */ +#line 1344 "sql.y" +{ yymsp[0].minor.yy92 = JOIN_TYPE_LEFT; } +#line 8267 "sql.c" break; - case 621: /* join_type ::= RIGHT */ -{ yymsp[0].minor.yy548 = JOIN_TYPE_RIGHT; } + case 633: /* join_type ::= RIGHT */ +#line 1345 "sql.y" +{ yymsp[0].minor.yy92 = JOIN_TYPE_RIGHT; } +#line 8272 "sql.c" break; - case 622: /* join_type ::= FULL */ -{ yymsp[0].minor.yy548 = JOIN_TYPE_FULL; } + case 634: /* join_type ::= FULL */ +#line 1346 "sql.y" +{ yymsp[0].minor.yy92 = JOIN_TYPE_FULL; } +#line 8277 "sql.c" break; - case 623: /* join_subtype ::= */ -{ yymsp[1].minor.yy506 = JOIN_STYPE_NONE; } + case 635: /* join_subtype ::= */ +#line 1350 "sql.y" +{ yymsp[1].minor.yy534 = JOIN_STYPE_NONE; } +#line 8282 "sql.c" break; - case 624: /* join_subtype ::= OUTER */ -{ yymsp[0].minor.yy506 = JOIN_STYPE_OUTER; } + case 636: /* join_subtype ::= OUTER */ +#line 1351 "sql.y" +{ yymsp[0].minor.yy534 = JOIN_STYPE_OUTER; } +#line 8287 "sql.c" break; - case 625: /* join_subtype ::= SEMI */ -{ yymsp[0].minor.yy506 = JOIN_STYPE_SEMI; } + case 637: /* join_subtype ::= SEMI */ +#line 1352 "sql.y" +{ yymsp[0].minor.yy534 = JOIN_STYPE_SEMI; } +#line 8292 "sql.c" break; - case 626: /* join_subtype ::= ANTI */ -{ yymsp[0].minor.yy506 = JOIN_STYPE_ANTI; } + case 638: /* join_subtype ::= ANTI */ +#line 1353 "sql.y" +{ yymsp[0].minor.yy534 = JOIN_STYPE_ANTI; } +#line 8297 "sql.c" break; - case 627: /* join_subtype ::= ASOF */ -{ yymsp[0].minor.yy506 = JOIN_STYPE_ASOF; } + case 639: /* join_subtype ::= ASOF */ +#line 1354 "sql.y" +{ yymsp[0].minor.yy534 = JOIN_STYPE_ASOF; } +#line 8302 "sql.c" break; - case 628: /* join_subtype ::= WINDOW */ -{ yymsp[0].minor.yy506 = JOIN_STYPE_WIN; } + case 640: /* join_subtype ::= WINDOW */ +#line 1355 "sql.y" +{ yymsp[0].minor.yy534 = JOIN_STYPE_WIN; } +#line 8307 "sql.c" break; - case 632: /* window_offset_clause_opt ::= WINDOW_OFFSET NK_LP window_offset_literal NK_COMMA window_offset_literal NK_RP */ -{ yymsp[-5].minor.yy720 = createWindowOffsetNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy720), releaseRawExprNode(pCxt, yymsp[-1].minor.yy720)); } + case 644: /* window_offset_clause_opt ::= WINDOW_OFFSET NK_LP window_offset_literal NK_COMMA window_offset_literal NK_RP */ +#line 1362 "sql.y" +{ yymsp[-5].minor.yy722 = createWindowOffsetNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy722), releaseRawExprNode(pCxt, yymsp[-1].minor.yy722)); } +#line 8312 "sql.c" break; - case 633: /* window_offset_literal ::= NK_VARIABLE */ -{ yylhsminor.yy720 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createTimeOffsetValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy720 = yylhsminor.yy720; + case 645: /* window_offset_literal ::= NK_VARIABLE */ +#line 1364 "sql.y" +{ yylhsminor.yy722 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createTimeOffsetValueNode(pCxt, &yymsp[0].minor.yy0)); } +#line 8317 "sql.c" + yymsp[0].minor.yy722 = yylhsminor.yy722; break; - case 634: /* window_offset_literal ::= NK_MINUS NK_VARIABLE */ + case 646: /* window_offset_literal ::= NK_MINUS NK_VARIABLE */ +#line 1365 "sql.y" { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yylhsminor.yy720 = createRawExprNode(pCxt, &t, createTimeOffsetValueNode(pCxt, &t)); + yylhsminor.yy722 = createRawExprNode(pCxt, &t, createTimeOffsetValueNode(pCxt, &t)); } - yymsp[-1].minor.yy720 = yylhsminor.yy720; +#line 8327 "sql.c" + yymsp[-1].minor.yy722 = yylhsminor.yy722; break; - case 636: /* jlimit_clause_opt ::= JLIMIT NK_INTEGER */ - case 707: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */ yytestcase(yyruleno==707); - case 711: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==711); -{ yymsp[-1].minor.yy720 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); } + case 648: /* jlimit_clause_opt ::= JLIMIT NK_INTEGER */ + case 719: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */ yytestcase(yyruleno==719); + case 723: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==723); +#line 1372 "sql.y" +{ yymsp[-1].minor.yy722 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); } +#line 8335 "sql.c" break; - case 637: /* 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 649: /* query_specification ::= SELECT hint_list set_quantifier_opt tag_mode_opt select_list from_clause_opt where_clause_opt partition_by_clause_opt range_opt every_opt fill_opt twindow_clause_opt group_by_clause_opt having_clause_opt */ +#line 1378 "sql.y" { - yymsp[-13].minor.yy720 = createSelectStmt(pCxt, yymsp[-11].minor.yy833, yymsp[-9].minor.yy984, yymsp[-8].minor.yy720, yymsp[-12].minor.yy984); - yymsp[-13].minor.yy720 = setSelectStmtTagMode(pCxt, yymsp[-13].minor.yy720, yymsp[-10].minor.yy833); - yymsp[-13].minor.yy720 = addWhereClause(pCxt, yymsp[-13].minor.yy720, yymsp[-7].minor.yy720); - yymsp[-13].minor.yy720 = addPartitionByClause(pCxt, yymsp[-13].minor.yy720, yymsp[-6].minor.yy984); - yymsp[-13].minor.yy720 = addWindowClauseClause(pCxt, yymsp[-13].minor.yy720, yymsp[-2].minor.yy720); - yymsp[-13].minor.yy720 = addGroupByClause(pCxt, yymsp[-13].minor.yy720, yymsp[-1].minor.yy984); - yymsp[-13].minor.yy720 = addHavingClause(pCxt, yymsp[-13].minor.yy720, yymsp[0].minor.yy720); - yymsp[-13].minor.yy720 = addRangeClause(pCxt, yymsp[-13].minor.yy720, yymsp[-5].minor.yy720); - yymsp[-13].minor.yy720 = addEveryClause(pCxt, yymsp[-13].minor.yy720, yymsp[-4].minor.yy720); - yymsp[-13].minor.yy720 = addFillClause(pCxt, yymsp[-13].minor.yy720, yymsp[-3].minor.yy720); + yymsp[-13].minor.yy722 = createSelectStmt(pCxt, yymsp[-11].minor.yy897, yymsp[-9].minor.yy694, yymsp[-8].minor.yy722, yymsp[-12].minor.yy694); + yymsp[-13].minor.yy722 = setSelectStmtTagMode(pCxt, yymsp[-13].minor.yy722, yymsp[-10].minor.yy897); + yymsp[-13].minor.yy722 = addWhereClause(pCxt, yymsp[-13].minor.yy722, yymsp[-7].minor.yy722); + yymsp[-13].minor.yy722 = addPartitionByClause(pCxt, yymsp[-13].minor.yy722, yymsp[-6].minor.yy694); + yymsp[-13].minor.yy722 = addWindowClauseClause(pCxt, yymsp[-13].minor.yy722, yymsp[-2].minor.yy722); + yymsp[-13].minor.yy722 = addGroupByClause(pCxt, yymsp[-13].minor.yy722, yymsp[-1].minor.yy694); + yymsp[-13].minor.yy722 = addHavingClause(pCxt, yymsp[-13].minor.yy722, yymsp[0].minor.yy722); + yymsp[-13].minor.yy722 = addRangeClause(pCxt, yymsp[-13].minor.yy722, yymsp[-5].minor.yy722); + yymsp[-13].minor.yy722 = addEveryClause(pCxt, yymsp[-13].minor.yy722, yymsp[-4].minor.yy722); + yymsp[-13].minor.yy722 = addFillClause(pCxt, yymsp[-13].minor.yy722, yymsp[-3].minor.yy722); } +#line 8351 "sql.c" break; - case 638: /* hint_list ::= */ -{ yymsp[1].minor.yy984 = createHintNodeList(pCxt, NULL); } + case 650: /* hint_list ::= */ +#line 1393 "sql.y" +{ yymsp[1].minor.yy694 = createHintNodeList(pCxt, NULL); } +#line 8356 "sql.c" break; - case 639: /* hint_list ::= NK_HINT */ -{ yylhsminor.yy984 = createHintNodeList(pCxt, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy984 = yylhsminor.yy984; + case 651: /* hint_list ::= NK_HINT */ +#line 1394 "sql.y" +{ yylhsminor.yy694 = createHintNodeList(pCxt, &yymsp[0].minor.yy0); } +#line 8361 "sql.c" + yymsp[0].minor.yy694 = yylhsminor.yy694; break; - case 644: /* set_quantifier_opt ::= ALL */ -{ yymsp[0].minor.yy833 = false; } + case 656: /* set_quantifier_opt ::= ALL */ +#line 1405 "sql.y" +{ yymsp[0].minor.yy897 = false; } +#line 8367 "sql.c" break; - case 647: /* select_item ::= NK_STAR */ -{ yylhsminor.yy720 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy720 = yylhsminor.yy720; + case 659: /* select_item ::= NK_STAR */ +#line 1412 "sql.y" +{ yylhsminor.yy722 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0); } +#line 8372 "sql.c" + yymsp[0].minor.yy722 = yylhsminor.yy722; break; - case 649: /* select_item ::= common_expression column_alias */ - case 659: /* partition_item ::= expr_or_subquery column_alias */ yytestcase(yyruleno==659); -{ yylhsminor.yy720 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy720), &yymsp[0].minor.yy1045); } - yymsp[-1].minor.yy720 = yylhsminor.yy720; + case 661: /* select_item ::= common_expression column_alias */ + case 671: /* partition_item ::= expr_or_subquery column_alias */ yytestcase(yyruleno==671); +#line 1414 "sql.y" +{ yylhsminor.yy722 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy722), &yymsp[0].minor.yy659); } +#line 8379 "sql.c" + yymsp[-1].minor.yy722 = yylhsminor.yy722; break; - case 650: /* select_item ::= common_expression AS column_alias */ - case 660: /* partition_item ::= expr_or_subquery AS column_alias */ yytestcase(yyruleno==660); -{ yylhsminor.yy720 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy720), &yymsp[0].minor.yy1045); } - yymsp[-2].minor.yy720 = yylhsminor.yy720; + case 662: /* select_item ::= common_expression AS column_alias */ + case 672: /* partition_item ::= expr_or_subquery AS column_alias */ yytestcase(yyruleno==672); +#line 1415 "sql.y" +{ yylhsminor.yy722 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy722), &yymsp[0].minor.yy659); } +#line 8386 "sql.c" + yymsp[-2].minor.yy722 = yylhsminor.yy722; break; - case 655: /* partition_by_clause_opt ::= PARTITION BY partition_list */ - case 685: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==685); - case 705: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==705); -{ yymsp[-2].minor.yy984 = yymsp[0].minor.yy984; } + case 667: /* partition_by_clause_opt ::= PARTITION BY partition_list */ + case 697: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==697); + case 717: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==717); +#line 1424 "sql.y" +{ yymsp[-2].minor.yy694 = yymsp[0].minor.yy694; } +#line 8394 "sql.c" break; - case 662: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP */ -{ yymsp[-5].minor.yy720 = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy720), releaseRawExprNode(pCxt, yymsp[-1].minor.yy720)); } + case 674: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP */ +#line 1437 "sql.y" +{ yymsp[-5].minor.yy722 = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy722), releaseRawExprNode(pCxt, yymsp[-1].minor.yy722)); } +#line 8399 "sql.c" break; - case 663: /* twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ -{ yymsp[-3].minor.yy720 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy720)); } + case 675: /* twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ +#line 1438 "sql.y" +{ yymsp[-3].minor.yy722 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy722)); } +#line 8404 "sql.c" break; - case 664: /* twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ -{ yymsp[-5].minor.yy720 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy720), NULL, yymsp[-1].minor.yy720, yymsp[0].minor.yy720); } + case 676: /* twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ +#line 1440 "sql.y" +{ yymsp[-5].minor.yy722 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy722), NULL, yymsp[-1].minor.yy722, yymsp[0].minor.yy722); } +#line 8409 "sql.c" break; - case 665: /* 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.yy720 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy720), releaseRawExprNode(pCxt, yymsp[-3].minor.yy720), yymsp[-1].minor.yy720, yymsp[0].minor.yy720); } + case 677: /* twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_COMMA interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ +#line 1444 "sql.y" +{ yymsp[-7].minor.yy722 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy722), releaseRawExprNode(pCxt, yymsp[-3].minor.yy722), yymsp[-1].minor.yy722, yymsp[0].minor.yy722); } +#line 8414 "sql.c" break; - case 666: /* twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ -{ yymsp[-6].minor.yy720 = createEventWindowNode(pCxt, yymsp[-3].minor.yy720, yymsp[0].minor.yy720); } + case 678: /* twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ +#line 1446 "sql.y" +{ yymsp[-6].minor.yy722 = createEventWindowNode(pCxt, yymsp[-3].minor.yy722, yymsp[0].minor.yy722); } +#line 8419 "sql.c" break; - case 667: /* twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy720 = createCountWindowNode(pCxt, &yymsp[-1].minor.yy0, &yymsp[-1].minor.yy0); } + case 679: /* twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_RP */ +#line 1448 "sql.y" +{ yymsp[-3].minor.yy722 = createCountWindowNode(pCxt, &yymsp[-1].minor.yy0, &yymsp[-1].minor.yy0); } +#line 8424 "sql.c" break; - case 668: /* twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ -{ yymsp[-5].minor.yy720 = createCountWindowNode(pCxt, &yymsp[-3].minor.yy0, &yymsp[-1].minor.yy0); } + case 680: /* twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ +#line 1450 "sql.y" +{ yymsp[-5].minor.yy722 = createCountWindowNode(pCxt, &yymsp[-3].minor.yy0, &yymsp[-1].minor.yy0); } +#line 8429 "sql.c" break; - case 675: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */ -{ yymsp[-3].minor.yy720 = createFillNode(pCxt, yymsp[-1].minor.yy318, NULL); } + case 687: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */ +#line 1460 "sql.y" +{ yymsp[-3].minor.yy722 = createFillNode(pCxt, yymsp[-1].minor.yy94, NULL); } +#line 8434 "sql.c" break; - case 676: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP */ -{ yymsp[-5].minor.yy720 = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, yymsp[-1].minor.yy984)); } + case 688: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP */ +#line 1461 "sql.y" +{ yymsp[-5].minor.yy722 = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, yymsp[-1].minor.yy694)); } +#line 8439 "sql.c" break; - case 677: /* fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP */ -{ yymsp[-5].minor.yy720 = createFillNode(pCxt, FILL_MODE_VALUE_F, createNodeListNode(pCxt, yymsp[-1].minor.yy984)); } + case 689: /* fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP */ +#line 1462 "sql.y" +{ yymsp[-5].minor.yy722 = createFillNode(pCxt, FILL_MODE_VALUE_F, createNodeListNode(pCxt, yymsp[-1].minor.yy694)); } +#line 8444 "sql.c" break; - case 678: /* fill_mode ::= NONE */ -{ yymsp[0].minor.yy318 = FILL_MODE_NONE; } + case 690: /* fill_mode ::= NONE */ +#line 1466 "sql.y" +{ yymsp[0].minor.yy94 = FILL_MODE_NONE; } +#line 8449 "sql.c" break; - case 679: /* fill_mode ::= PREV */ -{ yymsp[0].minor.yy318 = FILL_MODE_PREV; } + case 691: /* fill_mode ::= PREV */ +#line 1467 "sql.y" +{ yymsp[0].minor.yy94 = FILL_MODE_PREV; } +#line 8454 "sql.c" break; - case 680: /* fill_mode ::= NULL */ -{ yymsp[0].minor.yy318 = FILL_MODE_NULL; } + case 692: /* fill_mode ::= NULL */ +#line 1468 "sql.y" +{ yymsp[0].minor.yy94 = FILL_MODE_NULL; } +#line 8459 "sql.c" break; - case 681: /* fill_mode ::= NULL_F */ -{ yymsp[0].minor.yy318 = FILL_MODE_NULL_F; } + case 693: /* fill_mode ::= NULL_F */ +#line 1469 "sql.y" +{ yymsp[0].minor.yy94 = FILL_MODE_NULL_F; } +#line 8464 "sql.c" break; - case 682: /* fill_mode ::= LINEAR */ -{ yymsp[0].minor.yy318 = FILL_MODE_LINEAR; } + case 694: /* fill_mode ::= LINEAR */ +#line 1470 "sql.y" +{ yymsp[0].minor.yy94 = FILL_MODE_LINEAR; } +#line 8469 "sql.c" break; - case 683: /* fill_mode ::= NEXT */ -{ yymsp[0].minor.yy318 = FILL_MODE_NEXT; } + case 695: /* fill_mode ::= NEXT */ +#line 1471 "sql.y" +{ yymsp[0].minor.yy94 = FILL_MODE_NEXT; } +#line 8474 "sql.c" break; - case 686: /* group_by_list ::= expr_or_subquery */ -{ yylhsminor.yy984 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy720))); } - yymsp[0].minor.yy984 = yylhsminor.yy984; + case 698: /* group_by_list ::= expr_or_subquery */ +#line 1480 "sql.y" +{ yylhsminor.yy694 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy722))); } +#line 8479 "sql.c" + yymsp[0].minor.yy694 = yylhsminor.yy694; break; - case 687: /* group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ -{ yylhsminor.yy984 = addNodeToList(pCxt, yymsp[-2].minor.yy984, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy720))); } - yymsp[-2].minor.yy984 = yylhsminor.yy984; + case 699: /* group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ +#line 1481 "sql.y" +{ yylhsminor.yy694 = addNodeToList(pCxt, yymsp[-2].minor.yy694, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy722))); } +#line 8485 "sql.c" + yymsp[-2].minor.yy694 = yylhsminor.yy694; break; - case 691: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ -{ yymsp[-5].minor.yy720 = createInterpTimeRange(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy720), releaseRawExprNode(pCxt, yymsp[-1].minor.yy720)); } + case 703: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ +#line 1488 "sql.y" +{ yymsp[-5].minor.yy722 = createInterpTimeRange(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy722), releaseRawExprNode(pCxt, yymsp[-1].minor.yy722)); } +#line 8491 "sql.c" break; - case 692: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_RP */ -{ yymsp[-3].minor.yy720 = createInterpTimePoint(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy720)); } + case 704: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_RP */ +#line 1490 "sql.y" +{ yymsp[-3].minor.yy722 = createInterpTimePoint(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy722)); } +#line 8496 "sql.c" break; - case 695: /* query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ + case 707: /* query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ +#line 1497 "sql.y" { - yylhsminor.yy720 = addOrderByClause(pCxt, yymsp[-3].minor.yy720, yymsp[-2].minor.yy984); - yylhsminor.yy720 = addSlimitClause(pCxt, yylhsminor.yy720, yymsp[-1].minor.yy720); - yylhsminor.yy720 = addLimitClause(pCxt, yylhsminor.yy720, yymsp[0].minor.yy720); + yylhsminor.yy722 = addOrderByClause(pCxt, yymsp[-3].minor.yy722, yymsp[-2].minor.yy694); + yylhsminor.yy722 = addSlimitClause(pCxt, yylhsminor.yy722, yymsp[-1].minor.yy722); + yylhsminor.yy722 = addLimitClause(pCxt, yylhsminor.yy722, yymsp[0].minor.yy722); } - yymsp[-3].minor.yy720 = yylhsminor.yy720; +#line 8505 "sql.c" + yymsp[-3].minor.yy722 = yylhsminor.yy722; break; - case 698: /* union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ -{ yylhsminor.yy720 = createSetOperator(pCxt, SET_OP_TYPE_UNION_ALL, yymsp[-3].minor.yy720, yymsp[0].minor.yy720); } - yymsp[-3].minor.yy720 = yylhsminor.yy720; + case 710: /* union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ +#line 1507 "sql.y" +{ yylhsminor.yy722 = createSetOperator(pCxt, SET_OP_TYPE_UNION_ALL, yymsp[-3].minor.yy722, yymsp[0].minor.yy722); } +#line 8511 "sql.c" + yymsp[-3].minor.yy722 = yylhsminor.yy722; break; - case 699: /* union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ -{ yylhsminor.yy720 = createSetOperator(pCxt, SET_OP_TYPE_UNION, yymsp[-2].minor.yy720, yymsp[0].minor.yy720); } - yymsp[-2].minor.yy720 = yylhsminor.yy720; + case 711: /* union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ +#line 1509 "sql.y" +{ yylhsminor.yy722 = createSetOperator(pCxt, SET_OP_TYPE_UNION, yymsp[-2].minor.yy722, yymsp[0].minor.yy722); } +#line 8517 "sql.c" + yymsp[-2].minor.yy722 = yylhsminor.yy722; break; - case 708: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ - case 712: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==712); -{ yymsp[-3].minor.yy720 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); } + case 720: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ + case 724: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==724); +#line 1524 "sql.y" +{ yymsp[-3].minor.yy722 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); } +#line 8524 "sql.c" break; - case 709: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - case 713: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==713); -{ yymsp[-3].minor.yy720 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); } + case 721: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + case 725: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==725); +#line 1525 "sql.y" +{ yymsp[-3].minor.yy722 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); } +#line 8530 "sql.c" break; - case 714: /* subquery ::= NK_LP query_expression NK_RP */ -{ yylhsminor.yy720 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy720); } - yymsp[-2].minor.yy720 = yylhsminor.yy720; + case 726: /* subquery ::= NK_LP query_expression NK_RP */ +#line 1533 "sql.y" +{ yylhsminor.yy722 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy722); } +#line 8535 "sql.c" + yymsp[-2].minor.yy722 = yylhsminor.yy722; break; - case 719: /* sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ -{ yylhsminor.yy720 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy720), yymsp[-1].minor.yy670, yymsp[0].minor.yy545); } - yymsp[-2].minor.yy720 = yylhsminor.yy720; + case 731: /* sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ +#line 1547 "sql.y" +{ yylhsminor.yy722 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy722), yymsp[-1].minor.yy708, yymsp[0].minor.yy707); } +#line 8541 "sql.c" + yymsp[-2].minor.yy722 = yylhsminor.yy722; break; - case 720: /* ordering_specification_opt ::= */ -{ yymsp[1].minor.yy670 = ORDER_ASC; } + case 732: /* ordering_specification_opt ::= */ +#line 1551 "sql.y" +{ yymsp[1].minor.yy708 = ORDER_ASC; } +#line 8547 "sql.c" break; - case 721: /* ordering_specification_opt ::= ASC */ -{ yymsp[0].minor.yy670 = ORDER_ASC; } + case 733: /* ordering_specification_opt ::= ASC */ +#line 1552 "sql.y" +{ yymsp[0].minor.yy708 = ORDER_ASC; } +#line 8552 "sql.c" break; - case 722: /* ordering_specification_opt ::= DESC */ -{ yymsp[0].minor.yy670 = ORDER_DESC; } + case 734: /* ordering_specification_opt ::= DESC */ +#line 1553 "sql.y" +{ yymsp[0].minor.yy708 = ORDER_DESC; } +#line 8557 "sql.c" break; - case 723: /* null_ordering_opt ::= */ -{ yymsp[1].minor.yy545 = NULL_ORDER_DEFAULT; } + case 735: /* null_ordering_opt ::= */ +#line 1557 "sql.y" +{ yymsp[1].minor.yy707 = NULL_ORDER_DEFAULT; } +#line 8562 "sql.c" break; - case 724: /* null_ordering_opt ::= NULLS FIRST */ -{ yymsp[-1].minor.yy545 = NULL_ORDER_FIRST; } + case 736: /* null_ordering_opt ::= NULLS FIRST */ +#line 1558 "sql.y" +{ yymsp[-1].minor.yy707 = NULL_ORDER_FIRST; } +#line 8567 "sql.c" break; - case 725: /* null_ordering_opt ::= NULLS LAST */ -{ yymsp[-1].minor.yy545 = NULL_ORDER_LAST; } + case 737: /* null_ordering_opt ::= NULLS LAST */ +#line 1559 "sql.y" +{ yymsp[-1].minor.yy707 = NULL_ORDER_LAST; } +#line 8572 "sql.c" break; default: break; @@ -7171,6 +8631,7 @@ static void yy_syntax_error( ParseCTX_FETCH #define TOKEN yyminor /************ Begin %syntax_error code ****************************************/ +#line 29 "sql.y" if (TSDB_CODE_SUCCESS == pCxt->errCode) { if(TOKEN.z) { @@ -7181,6 +8642,7 @@ static void yy_syntax_error( } else if (TSDB_CODE_PAR_DB_NOT_SPECIFIED == pCxt->errCode && TK_NK_FLOAT == TOKEN.type) { pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_SYNTAX_ERROR, TOKEN.z); } +#line 8645 "sql.c" /************ End %syntax_error code ******************************************/ ParseARG_STORE /* Suppress warning about unused %extra_argument variable */ ParseCTX_STORE diff --git a/source/libs/qcom/src/querymsg.c b/source/libs/qcom/src/querymsg.c index 7948bbbceb..0051753b07 100644 --- a/source/libs/qcom/src/querymsg.c +++ b/source/libs/qcom/src/querymsg.c @@ -304,6 +304,24 @@ int32_t queryBuildGetViewMetaMsg(void *input, char **msg, int32_t msgSize, int32 return TSDB_CODE_SUCCESS; } +int32_t queryBuildGetTableTSMAMsg(void *input, char **msg, int32_t msgSize, int32_t *msgLen, + void *(*mallcFp)(int64_t)) { + if (NULL == msg || NULL == msgLen) { + return TSDB_CODE_TSC_INVALID_INPUT; + } + + STableTSMAInfoReq req = {0}; + strncpy(req.name, input, sizeof(req.name) - 1); + + int32_t bufLen = tSerializeTableTSMAInfoReq(NULL, 0, &req); + void * pBuf = (*mallcFp)(bufLen); + tSerializeTableTSMAInfoReq(pBuf, bufLen, &req); + + *msg = pBuf; + *msgLen = bufLen; + return TSDB_CODE_SUCCESS; +} + int32_t queryProcessUseDBRsp(void *output, char *msg, int32_t msgSize) { SUseDbOutput *pOut = output; SUseDbRsp usedbRsp = {0}; @@ -683,6 +701,19 @@ int32_t queryProcessGetViewMetaRsp(void *output, char *msg, int32_t msgSize) { return TSDB_CODE_SUCCESS; } +int32_t queryProcessGetTbTSMARsp(void* output, char* msg, int32_t msgSize) { + if (NULL == output || NULL == msg || msgSize <= 0) { + return TSDB_CODE_TSC_INVALID_INPUT; + } + + if (tDeserializeTableTSMAInfoRsp(msg, msgSize, output) != 0) { + qError("tDeserializeSViewMetaRsp failed, msgSize:%d", msgSize); + return TSDB_CODE_INVALID_MSG; + } + + return TSDB_CODE_SUCCESS; +} + void initQueryModuleMsgHandle() { queryBuildMsg[TMSG_INDEX(TDMT_VND_TABLE_META)] = queryBuildTableMetaReqMsg; @@ -699,6 +730,7 @@ void initQueryModuleMsgHandle() { queryBuildMsg[TMSG_INDEX(TDMT_MND_TABLE_CFG)] = queryBuildGetTbCfgMsg; queryBuildMsg[TMSG_INDEX(TDMT_MND_SERVER_VERSION)] = queryBuildGetSerVerMsg; queryBuildMsg[TMSG_INDEX(TDMT_MND_VIEW_META)] = queryBuildGetViewMetaMsg; + queryBuildMsg[TMSG_INDEX(TDMT_MND_GET_TABLE_TSMA)] = queryBuildGetTableTSMAMsg; queryProcessMsgRsp[TMSG_INDEX(TDMT_VND_TABLE_META)] = queryProcessTableMetaRsp; queryProcessMsgRsp[TMSG_INDEX(TDMT_MND_TABLE_META)] = queryProcessTableMetaRsp; @@ -714,6 +746,7 @@ void initQueryModuleMsgHandle() { queryProcessMsgRsp[TMSG_INDEX(TDMT_MND_TABLE_CFG)] = queryProcessGetTbCfgRsp; queryProcessMsgRsp[TMSG_INDEX(TDMT_MND_SERVER_VERSION)] = queryProcessGetSerVerRsp; queryProcessMsgRsp[TMSG_INDEX(TDMT_MND_VIEW_META)] = queryProcessGetViewMetaRsp; + queryProcessMsgRsp[TMSG_INDEX(TDMT_MND_GET_TABLE_TSMA)] = queryProcessGetTbTSMARsp; } #pragma GCC diagnostic pop diff --git a/source/util/src/terror.c b/source/util/src/terror.c index 4230abc8b8..95b1f40ab4 100644 --- a/source/util/src/terror.c +++ b/source/util/src/terror.c @@ -323,8 +323,8 @@ TAOS_DEFINE_ERROR(TSDB_CODE_MND_INVALID_TARGET_TABLE, "Cannot write the same // mnode-sma TAOS_DEFINE_ERROR(TSDB_CODE_MND_SMA_ALREADY_EXIST, "SMA already exists in db") -TAOS_DEFINE_ERROR(TSDB_CODE_MND_SMA_NOT_EXIST, "index not exist") -TAOS_DEFINE_ERROR(TSDB_CODE_MND_INVALID_SMA_OPTION, "Invalid sma index option") +TAOS_DEFINE_ERROR(TSDB_CODE_MND_SMA_NOT_EXIST, "sma not exist") +TAOS_DEFINE_ERROR(TSDB_CODE_MND_INVALID_SMA_OPTION, "Invalid sma option") // mnode-view TAOS_DEFINE_ERROR(TSDB_CODE_MND_VIEW_ALREADY_EXIST, "view already exists in db")